summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorClint Adams <clint@debian.org>2017-01-04 20:39:58 -0500
committerClint Adams <clint@debian.org>2017-01-04 20:39:58 -0500
commit29d3f78df4630dbee0a141e2be8e77275724b3a8 (patch)
tree89a97129c5b799046be2af10bde88ea035b59bd1
parentd75f3c567505ad7acd2c1943207b367593652739 (diff)
New upstream version 4.3
-rw-r--r--.mailmap12
-rw-r--r--.tarball-version1
-rw-r--r--.version1
-rw-r--r--ABOUT-NLS1956
-rw-r--r--AUTHORS7
-rw-r--r--BUGS9
-rw-r--r--COPYING18
-rw-r--r--COPYING.DOC18
-rw-r--r--ChangeLog4908
-rw-r--r--ChangeLog-20143630
-rw-r--r--GNUmakefile127
-rw-r--r--INSTALL322
-rw-r--r--Makefile.am126
-rw-r--r--Makefile.in4743
-rw-r--r--NEWS115
-rw-r--r--README12
-rw-r--r--README-alpha8
-rw-r--r--README-release100
-rw-r--r--THANKS138
-rw-r--r--THANKS.in64
-rw-r--r--aclocal.m4796
-rw-r--r--basicdefs.h9
-rwxr-xr-xbootstrap954
-rw-r--r--bootstrap.conf135
-rwxr-xr-xbuild-aux/announce-gen557
-rwxr-xr-xbuild-aux/ar-lib270
-rwxr-xr-xbuild-aux/compile235
-rwxr-xr-xbuild-aux/config.guess498
-rwxr-xr-xbuild-aux/config.rpath152
-rwxr-xr-xbuild-aux/config.sub170
-rwxr-xr-xbuild-aux/depcomp479
-rwxr-xr-xbuild-aux/do-release-commit-and-tag179
-rwxr-xr-xbuild-aux/gendocs.sh504
-rwxr-xr-xbuild-aux/git-version-gen226
-rwxr-xr-xbuild-aux/gitlog-to-changelog499
-rwxr-xr-xbuild-aux/gnu-web-doc-update210
-rwxr-xr-xbuild-aux/gnupload440
-rwxr-xr-xbuild-aux/help2man5
-rwxr-xr-xbuild-aux/install-sh368
-rwxr-xr-xbuild-aux/mdate-sh6
-rwxr-xr-xbuild-aux/missing407
-rwxr-xr-xbuild-aux/prefix-gnulib-mk238
-rw-r--r--build-aux/snippet/arg-nonnull.h4
-rw-r--r--build-aux/snippet/c++defs.h91
-rw-r--r--build-aux/snippet/unused-parameter.h4
-rw-r--r--build-aux/snippet/warn-on-use.h4
-rwxr-xr-xbuild-aux/test-driver148
-rwxr-xr-xbuild-aux/texi2dvi656
-rw-r--r--build-aux/texinfo.tex5355
-rwxr-xr-xbuild-aux/update-copyright274
-rwxr-xr-xbuild-aux/useless-if-before-free210
-rwxr-xr-xbuild-aux/vc-list-files113
-rw-r--r--config_h.in680
-rwxr-xr-xconfigure21160
-rw-r--r--configure.ac160
-rw-r--r--doc/Makefile.am33
-rw-r--r--doc/Makefile.in1497
-rw-r--r--doc/config.texi26
-rw-r--r--doc/fdl.texi505
-rwxr-xr-xdoc/groupify.sed59
-rw-r--r--doc/local.mk33
-rw-r--r--doc/s-texi1
-rw-r--r--doc/sed-in.texi4187
-rw-r--r--doc/sed.122
-rw-r--r--doc/sed.info4634
-rw-r--r--doc/sed.texi4670
-rw-r--r--doc/sed.x5
-rw-r--r--doc/stamp-vti8
-rw-r--r--doc/version.texi8
-rw-r--r--gnulib-tests/Makefile.am1
-rw-r--r--gnulib-tests/Makefile.in4674
-rw-r--r--gnulib-tests/binary-io.c4
-rw-r--r--gnulib-tests/binary-io.h75
-rw-r--r--gnulib-tests/close.c69
-rw-r--r--gnulib-tests/closedir.c71
-rwxr-xr-xgnulib-tests/dfa-invalid-char-class.sh30
-rw-r--r--gnulib-tests/dfa-match-aux.c73
-rwxr-xr-xgnulib-tests/dfa-match.sh39
-rw-r--r--gnulib-tests/dirent-private.h40
-rw-r--r--gnulib-tests/dirent.in.h267
-rw-r--r--gnulib-tests/dirfd.c98
-rw-r--r--gnulib-tests/dup2.c215
-rw-r--r--gnulib-tests/fd-hook.c116
-rw-r--r--gnulib-tests/fd-hook.h119
-rw-r--r--gnulib-tests/fdopen.c69
-rw-r--r--gnulib-tests/fflush.c229
-rw-r--r--gnulib-tests/file-has-acl.c503
-rw-r--r--gnulib-tests/filename.h54
-rw-r--r--gnulib-tests/flexmember.h42
-rw-r--r--gnulib-tests/fpurge.c147
-rw-r--r--gnulib-tests/freading.c75
-rw-r--r--gnulib-tests/freading.h53
-rw-r--r--gnulib-tests/fseek.c30
-rw-r--r--gnulib-tests/fseeko.c162
-rw-r--r--gnulib-tests/ftell.c37
-rw-r--r--gnulib-tests/ftello.c85
-rw-r--r--gnulib-tests/getcwd-lgpl.c126
-rw-r--r--gnulib-tests/getdtablesize.c121
-rw-r--r--gnulib-tests/getpagesize.c39
-rw-r--r--gnulib-tests/gnulib.mk1390
-rw-r--r--gnulib-tests/init.sh605
-rw-r--r--gnulib-tests/inttypes.in.h1144
-rw-r--r--gnulib-tests/link.c211
-rw-r--r--gnulib-tests/localename.c2971
-rw-r--r--gnulib-tests/localename.h99
-rw-r--r--gnulib-tests/lseek.c67
-rw-r--r--gnulib-tests/macros.h73
-rw-r--r--gnulib-tests/open.c181
-rw-r--r--gnulib-tests/opendir.c169
-rw-r--r--gnulib-tests/putenv.c194
-rw-r--r--gnulib-tests/read-file.c188
-rw-r--r--gnulib-tests/read-file.h33
-rw-r--r--gnulib-tests/readdir.c98
-rw-r--r--gnulib-tests/realloc.c (renamed from lib/realloc.c)2
-rw-r--r--gnulib-tests/setenv.c390
-rw-r--r--gnulib-tests/setlocale.c939
-rw-r--r--gnulib-tests/signature.h48
-rw-r--r--gnulib-tests/stdio-impl.h140
-rw-r--r--gnulib-tests/strdup.c54
-rw-r--r--gnulib-tests/symlink.c57
-rw-r--r--gnulib-tests/test-alignof.c59
-rw-r--r--gnulib-tests/test-alloca-opt.c62
-rw-r--r--gnulib-tests/test-binary-io.c69
-rwxr-xr-xgnulib-tests/test-binary-io.sh14
-rw-r--r--gnulib-tests/test-btowc.c63
-rwxr-xr-xgnulib-tests/test-btowc1.sh15
-rwxr-xr-xgnulib-tests/test-btowc2.sh15
-rw-r--r--gnulib-tests/test-c-ctype.c228
-rwxr-xr-xgnulib-tests/test-c-strcase.sh21
-rw-r--r--gnulib-tests/test-c-strcasecmp.c68
-rw-r--r--gnulib-tests/test-c-strncasecmp.c82
-rw-r--r--gnulib-tests/test-canonicalize-lgpl.c226
-rw-r--r--gnulib-tests/test-chdir.c33
-rw-r--r--gnulib-tests/test-close.c45
-rwxr-xr-xgnulib-tests/test-copy-acl-1.sh13
-rwxr-xr-xgnulib-tests/test-copy-acl-2.sh9
-rw-r--r--gnulib-tests/test-copy-acl.c73
-rwxr-xr-xgnulib-tests/test-copy-acl.sh659
-rw-r--r--gnulib-tests/test-ctype.c27
-rw-r--r--gnulib-tests/test-dirent.c32
-rw-r--r--gnulib-tests/test-dup2.c218
-rw-r--r--gnulib-tests/test-environ.c44
-rw-r--r--gnulib-tests/test-errno.c119
-rw-r--r--gnulib-tests/test-fcntl-h.c130
-rw-r--r--gnulib-tests/test-fdopen.c49
-rw-r--r--gnulib-tests/test-fflush.c191
-rw-r--r--gnulib-tests/test-fflush2.c108
-rwxr-xr-xgnulib-tests/test-fflush2.sh9
-rw-r--r--gnulib-tests/test-fgetc.c97
-rwxr-xr-xgnulib-tests/test-file-has-acl-1.sh13
-rwxr-xr-xgnulib-tests/test-file-has-acl-2.sh9
-rw-r--r--gnulib-tests/test-file-has-acl.c74
-rwxr-xr-xgnulib-tests/test-file-has-acl.sh384
-rw-r--r--gnulib-tests/test-fpending.c41
-rwxr-xr-xgnulib-tests/test-fpending.sh12
-rw-r--r--gnulib-tests/test-fpurge.c134
-rw-r--r--gnulib-tests/test-fputc.c91
-rw-r--r--gnulib-tests/test-fread.c100
-rw-r--r--gnulib-tests/test-freading.c130
-rw-r--r--gnulib-tests/test-fseek.c70
-rwxr-xr-xgnulib-tests/test-fseek.sh5
-rwxr-xr-xgnulib-tests/test-fseek2.sh3
-rw-r--r--gnulib-tests/test-fseeko.c74
-rwxr-xr-xgnulib-tests/test-fseeko.sh5
-rwxr-xr-xgnulib-tests/test-fseeko2.sh3
-rw-r--r--gnulib-tests/test-fseeko3.c51
-rwxr-xr-xgnulib-tests/test-fseeko3.sh7
-rw-r--r--gnulib-tests/test-fseeko4.c73
-rwxr-xr-xgnulib-tests/test-fseeko4.sh5
-rw-r--r--gnulib-tests/test-fstat.c50
-rw-r--r--gnulib-tests/test-ftell.c107
-rwxr-xr-xgnulib-tests/test-ftell.sh5
-rwxr-xr-xgnulib-tests/test-ftell2.sh3
-rw-r--r--gnulib-tests/test-ftell3.c78
-rw-r--r--gnulib-tests/test-ftello.c118
-rwxr-xr-xgnulib-tests/test-ftello.sh5
-rwxr-xr-xgnulib-tests/test-ftello2.sh3
-rw-r--r--gnulib-tests/test-ftello3.c78
-rw-r--r--gnulib-tests/test-ftello4.c70
-rwxr-xr-xgnulib-tests/test-ftello4.sh5
-rw-r--r--gnulib-tests/test-fwrite.c94
-rw-r--r--gnulib-tests/test-fwriting.c164
-rw-r--r--gnulib-tests/test-getcwd-lgpl.c102
-rw-r--r--gnulib-tests/test-getdelim.c94
-rw-r--r--gnulib-tests/test-getdtablesize.c36
-rw-r--r--gnulib-tests/test-getopt-gnu.c45
-rw-r--r--gnulib-tests/test-getopt-main.h76
-rw-r--r--gnulib-tests/test-getopt-posix.c34
-rw-r--r--gnulib-tests/test-getopt.h1391
-rw-r--r--gnulib-tests/test-getopt_long.h2144
-rw-r--r--gnulib-tests/test-getprogname.c58
-rw-r--r--gnulib-tests/test-gettimeofday.c47
-rw-r--r--gnulib-tests/test-ignore-value.c84
-rwxr-xr-xgnulib-tests/test-init.sh74
-rw-r--r--gnulib-tests/test-intprops.c370
-rw-r--r--gnulib-tests/test-inttypes.c118
-rw-r--r--gnulib-tests/test-isblank.c50
-rw-r--r--gnulib-tests/test-langinfo.c92
-rw-r--r--gnulib-tests/test-limits-h.c50
-rw-r--r--gnulib-tests/test-link.c47
-rw-r--r--gnulib-tests/test-link.h182
-rw-r--r--gnulib-tests/test-locale.c80
-rw-r--r--gnulib-tests/test-localeconv.c72
-rw-r--r--gnulib-tests/test-localename.c769
-rw-r--r--gnulib-tests/test-lseek.c109
-rwxr-xr-xgnulib-tests/test-lseek.sh18
-rw-r--r--gnulib-tests/test-lstat.c60
-rw-r--r--gnulib-tests/test-lstat.h116
-rw-r--r--gnulib-tests/test-malloca.c62
-rwxr-xr-xgnulib-tests/test-mbrtowc-w32-1.sh4
-rwxr-xr-xgnulib-tests/test-mbrtowc-w32-2.sh4
-rwxr-xr-xgnulib-tests/test-mbrtowc-w32-3.sh4
-rwxr-xr-xgnulib-tests/test-mbrtowc-w32-4.sh4
-rwxr-xr-xgnulib-tests/test-mbrtowc-w32-5.sh4
-rw-r--r--gnulib-tests/test-mbrtowc-w32.c735
-rw-r--r--gnulib-tests/test-mbrtowc.c349
-rwxr-xr-xgnulib-tests/test-mbrtowc1.sh15
-rwxr-xr-xgnulib-tests/test-mbrtowc2.sh15
-rwxr-xr-xgnulib-tests/test-mbrtowc3.sh15
-rwxr-xr-xgnulib-tests/test-mbrtowc4.sh15
-rwxr-xr-xgnulib-tests/test-mbrtowc5.sh6
-rw-r--r--gnulib-tests/test-mbsinit.c55
-rwxr-xr-xgnulib-tests/test-mbsinit.sh15
-rw-r--r--gnulib-tests/test-memchr.c132
-rw-r--r--gnulib-tests/test-memrchr.c91
-rw-r--r--gnulib-tests/test-nl_langinfo.c126
-rwxr-xr-xgnulib-tests/test-nl_langinfo.sh17
-rw-r--r--gnulib-tests/test-open.c41
-rw-r--r--gnulib-tests/test-open.h104
-rw-r--r--gnulib-tests/test-pathmax.c32
-rw-r--r--gnulib-tests/test-quotearg-simple.c366
-rw-r--r--gnulib-tests/test-quotearg.h128
-rw-r--r--gnulib-tests/test-read-file.c111
-rw-r--r--gnulib-tests/test-readlink.c48
-rw-r--r--gnulib-tests/test-readlink.h119
-rw-r--r--gnulib-tests/test-regex.c253
-rw-r--r--gnulib-tests/test-rename.c47
-rw-r--r--gnulib-tests/test-rename.h949
-rw-r--r--gnulib-tests/test-rmdir.c47
-rw-r--r--gnulib-tests/test-rmdir.h102
-rw-r--r--gnulib-tests/test-sameacls.c695
-rwxr-xr-xgnulib-tests/test-set-mode-acl-1.sh13
-rwxr-xr-xgnulib-tests/test-set-mode-acl-2.sh9
-rw-r--r--gnulib-tests/test-set-mode-acl.c41
-rwxr-xr-xgnulib-tests/test-set-mode-acl.sh229
-rw-r--r--gnulib-tests/test-setenv.c56
-rw-r--r--gnulib-tests/test-setlocale1.c61
-rwxr-xr-xgnulib-tests/test-setlocale1.sh34
-rw-r--r--gnulib-tests/test-setlocale2.c55
-rwxr-xr-xgnulib-tests/test-setlocale2.sh17
-rw-r--r--gnulib-tests/test-stat.c56
-rw-r--r--gnulib-tests/test-stat.h101
-rw-r--r--gnulib-tests/test-stdalign.c116
-rw-r--r--gnulib-tests/test-stdbool.c118
-rw-r--r--gnulib-tests/test-stddef.c73
-rw-r--r--gnulib-tests/test-stdint.c426
-rw-r--r--gnulib-tests/test-stdio.c43
-rw-r--r--gnulib-tests/test-stdlib.c54
-rw-r--r--gnulib-tests/test-strerror.c75
-rw-r--r--gnulib-tests/test-string.c33
-rw-r--r--gnulib-tests/test-strverscmp.c59
-rw-r--r--gnulib-tests/test-symlink.c47
-rw-r--r--gnulib-tests/test-symlink.h95
-rw-r--r--gnulib-tests/test-sys_stat.c340
-rw-r--r--gnulib-tests/test-sys_time.c34
-rw-r--r--gnulib-tests/test-sys_types.c34
-rw-r--r--gnulib-tests/test-sys_wait.h53
-rw-r--r--gnulib-tests/test-time.c41
-rw-r--r--gnulib-tests/test-unistd.c56
-rw-r--r--gnulib-tests/test-unsetenv.c61
-rwxr-xr-xgnulib-tests/test-update-copyright.sh547
-rwxr-xr-xgnulib-tests/test-vc-list-files-cvs.sh53
-rwxr-xr-xgnulib-tests/test-vc-list-files-git.sh42
-rw-r--r--gnulib-tests/test-verify.c69
-rwxr-xr-xgnulib-tests/test-verify.sh24
-rw-r--r--gnulib-tests/test-version-etc.c31
-rwxr-xr-xgnulib-tests/test-version-etc.sh43
-rw-r--r--gnulib-tests/test-wchar.c37
-rwxr-xr-xgnulib-tests/test-wcrtomb-w32-1.sh4
-rwxr-xr-xgnulib-tests/test-wcrtomb-w32-2.sh4
-rwxr-xr-xgnulib-tests/test-wcrtomb-w32-3.sh4
-rwxr-xr-xgnulib-tests/test-wcrtomb-w32-4.sh4
-rwxr-xr-xgnulib-tests/test-wcrtomb-w32-5.sh4
-rw-r--r--gnulib-tests/test-wcrtomb-w32.c332
-rw-r--r--gnulib-tests/test-wcrtomb.c162
-rwxr-xr-xgnulib-tests/test-wcrtomb.sh35
-rw-r--r--gnulib-tests/test-wctype-h.c74
-rw-r--r--gnulib-tests/test-xalloc-die.c28
-rwxr-xr-xgnulib-tests/test-xalloc-die.sh36
-rw-r--r--gnulib-tests/unsetenv.c127
-rw-r--r--gnulib-tests/zerosize-ptr.h68
-rw-r--r--init.cfg105
-rw-r--r--lib/Makefile.am8
-rw-r--r--lib/Makefile.in2636
-rw-r--r--lib/acl-errno-valid.c52
-rw-r--r--lib/acl-internal.c (renamed from lib/file-has-acl.c)479
-rw-r--r--lib/acl-internal.h106
-rw-r--r--lib/acl.h9
-rw-r--r--lib/acl_entries.c2
-rw-r--r--lib/alignof.h50
-rw-r--r--lib/alloca.in.h6
-rw-r--r--lib/basename-lgpl.c2
-rw-r--r--lib/btowc.c2
-rw-r--r--lib/c-ctype.c396
-rw-r--r--lib/c-ctype.h454
-rw-r--r--lib/c-strcase.h4
-rw-r--r--lib/c-strcasecmp.c4
-rw-r--r--lib/c-strcaseeq.h7
-rw-r--r--lib/c-strncasecmp.c4
-rw-r--r--lib/canonicalize-lgpl.c47
-rw-r--r--lib/close-stream.c78
-rw-r--r--lib/close-stream.h2
-rw-r--r--lib/closeout.c124
-rw-r--r--lib/closeout.h36
-rw-r--r--lib/config.charset6
-rw-r--r--lib/copy-acl.c567
-rw-r--r--lib/ctype.in.h57
-rw-r--r--lib/dfa.c4113
-rw-r--r--lib/dfa.h123
-rw-r--r--lib/dirname-lgpl.c2
-rw-r--r--lib/dirname.h10
-rw-r--r--lib/dosname.h2
-rw-r--r--lib/errno.in.h4
-rw-r--r--lib/error.c33
-rw-r--r--lib/error.h16
-rw-r--r--lib/exitfail.c2
-rw-r--r--lib/exitfail.h2
-rw-r--r--lib/fcntl.in.h22
-rw-r--r--lib/fpending.c60
-rw-r--r--lib/fpending.h29
-rw-r--r--lib/fstat.c2
-rw-r--r--lib/fwriting.c9
-rw-r--r--lib/fwriting.h4
-rw-r--r--lib/get-permissions.c291
-rw-r--r--lib/getdelim.c20
-rw-r--r--lib/getfilecon.c3
-rw-r--r--lib/getopt.c54
-rw-r--r--lib/getopt.in.h22
-rw-r--r--lib/getopt1.c2
-rw-r--r--lib/getopt_int.h2
-rw-r--r--lib/getprogname.c151
-rw-r--r--lib/getprogname.h40
-rw-r--r--lib/gettext.h12
-rw-r--r--lib/gettimeofday.c4
-rw-r--r--lib/glthread/lock.c1057
-rw-r--r--lib/glthread/lock.h927
-rw-r--r--lib/glthread/threadlib.c73
-rw-r--r--lib/gnulib.mk892
-rw-r--r--lib/hard-locale.c72
-rw-r--r--lib/hard-locale.h25
-rw-r--r--lib/ignore-value.h50
-rw-r--r--lib/intprops.h273
-rw-r--r--lib/isblank.c33
-rw-r--r--lib/langinfo.in.h22
-rw-r--r--lib/limits.in.h63
-rw-r--r--lib/local.mk17
-rw-r--r--lib/localcharset.c90
-rw-r--r--lib/localcharset.h4
-rw-r--r--lib/locale.in.h21
-rw-r--r--lib/localeconv.c2
-rw-r--r--lib/localeinfo.c113
-rw-r--r--lib/localeinfo.h54
-rw-r--r--lib/lstat.c2
-rw-r--r--lib/malloc.c4
-rw-r--r--lib/malloca.c33
-rw-r--r--lib/malloca.h19
-rw-r--r--lib/mbrlen.c2
-rw-r--r--lib/mbrtowc.c63
-rw-r--r--lib/mbsinit.c2
-rw-r--r--lib/mbtowc-impl.h2
-rw-r--r--lib/mbtowc.c2
-rw-r--r--lib/memchr.c2
-rw-r--r--lib/memrchr.c161
-rw-r--r--lib/minmax.h60
-rw-r--r--lib/mkostemp.c2
-rw-r--r--lib/msvc-inval.c10
-rw-r--r--lib/msvc-inval.h4
-rw-r--r--lib/msvc-nothrow.c4
-rw-r--r--lib/msvc-nothrow.h4
-rw-r--r--lib/nl_langinfo.c286
-rw-r--r--lib/obstack.c372
-rw-r--r--lib/obstack.h792
-rw-r--r--lib/pathmax.h4
-rw-r--r--lib/progname.c92
-rw-r--r--lib/progname.h62
-rw-r--r--lib/qcopy-acl.c51
-rw-r--r--lib/qset-acl.c49
-rw-r--r--lib/quote.h2
-rw-r--r--lib/quotearg.c174
-rw-r--r--lib/quotearg.h38
-rw-r--r--lib/readlink.c2
-rw-r--r--lib/ref-add.sin2
-rw-r--r--lib/ref-del.sin2
-rw-r--r--lib/regcomp.c360
-rw-r--r--lib/regex.c24
-rw-r--r--lib/regex.h79
-rw-r--r--lib/regex_internal.c109
-rw-r--r--lib/regex_internal.h181
-rw-r--r--lib/regexec.c248
-rw-r--r--lib/rename.c8
-rw-r--r--lib/rmdir.c2
-rw-r--r--lib/same-inode.h8
-rw-r--r--lib/se-context.in.h11
-rw-r--r--lib/se-selinux.in.h13
-rw-r--r--lib/secure_getenv.c54
-rw-r--r--lib/set-acl.c48
-rw-r--r--lib/set-permissions.c (renamed from lib/set-mode-acl.c)830
-rw-r--r--lib/stat.c2
-rw-r--r--lib/stdalign.in.h121
-rw-r--r--lib/stdarg.in.h4
-rw-r--r--lib/stdbool.in.h4
-rw-r--r--lib/stddef.in.h58
-rw-r--r--lib/stdint.in.h769
-rw-r--r--lib/stdio-impl.h36
-rw-r--r--lib/stdio.c3
-rw-r--r--lib/stdio.in.h78
-rw-r--r--lib/stdlib.in.h61
-rw-r--r--lib/streq.h4
-rw-r--r--lib/strerror-override.c2
-rw-r--r--lib/strerror-override.h4
-rw-r--r--lib/strerror.c5
-rw-r--r--lib/string.in.h41
-rw-r--r--lib/stripslash.c2
-rw-r--r--lib/strverscmp.c102
-rw-r--r--lib/sys_stat.in.h4
-rw-r--r--lib/sys_time.in.h207
-rw-r--r--lib/sys_types.in.h6
-rw-r--r--lib/tempname.c125
-rw-r--r--lib/tempname.h17
-rw-r--r--lib/time.in.h77
-rw-r--r--lib/unistd.c1
-rw-r--r--lib/unistd.in.h99
-rw-r--r--lib/unlocked-io.h2
-rw-r--r--lib/verify.h136
-rw-r--r--lib/version-etc-fsf.c2
-rw-r--r--lib/version-etc.c4
-rw-r--r--lib/version-etc.h2
-rw-r--r--lib/wchar.in.h25
-rw-r--r--lib/wcrtomb.c2
-rw-r--r--lib/wctob.c2
-rw-r--r--lib/wctomb-impl.h2
-rw-r--r--lib/wctomb.c2
-rw-r--r--lib/wctype.in.h35
-rw-r--r--lib/xalloc-die.c2
-rw-r--r--lib/xalloc-oversized.h58
-rw-r--r--lib/xalloc.h32
-rw-r--r--lib/xmalloc.c12
-rw-r--r--m4/00gnulib.m422
-rw-r--r--m4/absolute-header.m4102
-rw-r--r--m4/acl.m486
-rw-r--r--m4/alloca.m42
-rw-r--r--m4/assert.m424
-rw-r--r--m4/btowc.m42
-rw-r--r--m4/builtin-expect.m449
-rw-r--r--m4/canonicalize.m411
-rw-r--r--m4/close-stream.m411
-rw-r--r--m4/close.m433
-rw-r--r--m4/closedir.m430
-rw-r--r--m4/closeout.m412
-rw-r--r--m4/codeset.m43
-rw-r--r--m4/configmake.m413
-rw-r--r--m4/ctype.m432
-rw-r--r--m4/dirent_h.m464
-rw-r--r--m4/dirfd.m485
-rw-r--r--m4/dirname.m42
-rw-r--r--m4/double-slash-root.m42
-rw-r--r--m4/dup2.m4117
-rw-r--r--m4/eealloc.m42
-rw-r--r--m4/environ.m447
-rw-r--r--m4/errno_h.m42
-rw-r--r--m4/error.m42
-rw-r--r--m4/extensions.m486
-rw-r--r--m4/extern-inline.m480
-rw-r--r--m4/fcntl-o.m42
-rw-r--r--m4/fcntl_h.m42
-rw-r--r--m4/fdopen.m447
-rw-r--r--m4/fflush.m489
-rw-r--r--m4/flexmember.m443
-rw-r--r--m4/fpending.m436
-rw-r--r--m4/fpurge.m445
-rw-r--r--m4/freading.m410
-rw-r--r--m4/fseek.m415
-rw-r--r--m4/fseeko.m473
-rw-r--r--m4/fstat.m42
-rw-r--r--m4/ftell.m415
-rw-r--r--m4/ftello.m4140
-rw-r--r--m4/fwriting.m42
-rw-r--r--m4/getcwd.m4162
-rw-r--r--m4/getdelim.m46
-rw-r--r--m4/getdtablesize.m446
-rw-r--r--m4/getopt.m42
-rw-r--r--m4/getpagesize.m432
-rw-r--r--m4/getprogname.m443
-rw-r--r--m4/gettext.m497
-rw-r--r--m4/gettimeofday.m410
-rw-r--r--m4/glibc21.m42
-rw-r--r--m4/gnulib-common.m4163
-rw-r--r--m4/gnulib-comp.m4803
-rw-r--r--m4/hard-locale.m411
-rw-r--r--m4/iconv.m4166
-rw-r--r--m4/include_next.m455
-rw-r--r--m4/intlmacosx.m439
-rw-r--r--m4/inttypes-pri.m442
-rw-r--r--m4/inttypes.m4158
-rw-r--r--m4/isblank.m417
-rw-r--r--m4/langinfo_h.m42
-rw-r--r--m4/largefile.m425
-rw-r--r--m4/lcmessage.m435
-rw-r--r--m4/lib-ld.m489
-rw-r--r--m4/lib-link.m4140
-rw-r--r--m4/lib-prefix.m493
-rw-r--r--m4/limits-h.m431
-rw-r--r--m4/link.m456
-rw-r--r--m4/localcharset.m42
-rw-r--r--m4/locale-fr.m42
-rw-r--r--m4/locale-ja.m42
-rw-r--r--m4/locale-tr.m4127
-rw-r--r--m4/locale-zh.m42
-rw-r--r--m4/locale_h.m42
-rw-r--r--m4/localeconv.m42
-rw-r--r--m4/localename.m417
-rw-r--r--m4/lock.m442
-rw-r--r--m4/longlong.m42
-rw-r--r--m4/lseek.m471
-rw-r--r--m4/lstat.m450
-rw-r--r--m4/malloc.m413
-rw-r--r--m4/malloca.m42
-rw-r--r--m4/manywarnings.m4276
-rw-r--r--m4/mbrlen.m438
-rw-r--r--m4/mbrtowc.m4104
-rw-r--r--m4/mbsinit.m42
-rw-r--r--m4/mbstate_t.m42
-rw-r--r--m4/mbtowc.m42
-rw-r--r--m4/memchr.m42
-rw-r--r--m4/memrchr.m423
-rw-r--r--m4/minmax.m444
-rw-r--r--m4/mkostemp.m42
-rw-r--r--m4/mmap-anon.m42
-rw-r--r--m4/mode_t.m426
-rw-r--r--m4/msvc-inval.m42
-rw-r--r--m4/msvc-nothrow.m42
-rw-r--r--m4/multiarch.m42
-rw-r--r--m4/nl_langinfo.m42
-rw-r--r--m4/nls.m415
-rw-r--r--m4/nocrash.m45
-rw-r--r--m4/non-recursive-gnulib-prefix-hack.m432
-rw-r--r--m4/obstack.m435
-rw-r--r--m4/off_t.m42
-rw-r--r--m4/open.m491
-rw-r--r--m4/opendir.m431
-rw-r--r--m4/pathmax.m42
-rw-r--r--m4/po.m442
-rw-r--r--m4/progtest.m433
-rw-r--r--m4/putenv.m456
-rw-r--r--m4/quote.m42
-rw-r--r--m4/quotearg.m42
-rw-r--r--m4/read-file.m48
-rw-r--r--m4/readdir.m415
-rw-r--r--m4/readlink.m42
-rw-r--r--m4/realloc.m413
-rw-r--r--m4/regex.m4119
-rw-r--r--m4/rename.m42
-rw-r--r--m4/rmdir.m42
-rw-r--r--m4/secure_getenv.m426
-rw-r--r--m4/selinux-context-h.m42
-rw-r--r--m4/selinux-selinux-h.m412
-rw-r--r--m4/setenv.m4160
-rw-r--r--m4/setlocale.m429
-rw-r--r--m4/ssize_t.m42
-rw-r--r--m4/stat.m42
-rw-r--r--m4/stdalign.m457
-rw-r--r--m4/stdarg.m42
-rw-r--r--m4/stdbool.m460
-rw-r--r--m4/stddef_h.m410
-rw-r--r--m4/stdint.m491
-rw-r--r--m4/stdio_h.m435
-rw-r--r--m4/stdlib_h.m413
-rw-r--r--m4/strdup.m436
-rw-r--r--m4/strerror.m42
-rw-r--r--m4/string_h.m42
-rw-r--r--m4/strverscmp.m42
-rw-r--r--m4/symlink.m453
-rw-r--r--m4/sys_socket_h.m42
-rw-r--r--m4/sys_stat_h.m42
-rw-r--r--m4/sys_time_h.m43
-rw-r--r--m4/sys_types_h.m431
-rw-r--r--m4/tempname.m42
-rw-r--r--m4/threadlib.m444
-rw-r--r--m4/time_h.m431
-rw-r--r--m4/ungetc.m447
-rw-r--r--m4/unistd_h.m48
-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.m479
-rw-r--r--m4/wchar_h.m416
-rw-r--r--m4/wchar_t.m42
-rw-r--r--m4/wcrtomb.m42
-rw-r--r--m4/wctob.m42
-rw-r--r--m4/wctomb.m42
-rw-r--r--m4/wctype_h.m42
-rw-r--r--m4/wint_t.m436
-rw-r--r--m4/xalloc.m42
-rw-r--r--maint.mk1671
-rw-r--r--po/ChangeLog-2014 (renamed from po/ChangeLog)2
-rw-r--r--po/LINGUAS1
-rw-r--r--po/Makefile.in.in90
-rw-r--r--po/Makevars46
-rw-r--r--po/POTFILES.in14
-rw-r--r--po/Rules-quot15
-rw-r--r--po/af.gmobin3125 -> 2980 bytes
-rw-r--r--po/af.po652
-rw-r--r--po/ast.gmobin9247 -> 8685 bytes
-rw-r--r--po/ast.po697
-rw-r--r--po/bg.gmobin0 -> 20003 bytes
-rw-r--r--po/bg.po859
-rw-r--r--po/ca.gmobin10203 -> 9210 bytes
-rw-r--r--po/ca.po654
-rw-r--r--po/cs.gmobin10479 -> 10084 bytes
-rw-r--r--po/cs.po677
-rw-r--r--po/da.gmobin9770 -> 9471 bytes
-rw-r--r--po/da.po680
-rw-r--r--po/de.gmobin9655 -> 14480 bytes
-rw-r--r--po/de.po825
-rw-r--r--po/el.gmobin13318 -> 11966 bytes
-rw-r--r--po/el.po660
-rw-r--r--po/eo.gmobin8931 -> 9449 bytes
-rw-r--r--po/eo.po706
-rw-r--r--po/es.gmobin10440 -> 9401 bytes
-rw-r--r--po/es.po655
-rw-r--r--po/et.gmobin9429 -> 14676 bytes
-rw-r--r--po/et.po813
-rw-r--r--po/eu.gmobin1686 -> 1750 bytes
-rw-r--r--po/eu.po640
-rw-r--r--po/fi.gmobin10492 -> 16180 bytes
-rw-r--r--po/fi.po743
-rw-r--r--po/fr.gmobin10475 -> 9421 bytes
-rw-r--r--po/fr.po659
-rw-r--r--po/ga.gmobin9534 -> 8665 bytes
-rw-r--r--po/ga.po653
-rw-r--r--po/gl.gmobin10434 -> 10032 bytes
-rw-r--r--po/gl.po707
-rw-r--r--po/he.gmobin1269 -> 1333 bytes
-rw-r--r--po/he.po648
-rw-r--r--po/hr.gmobin10091 -> 9086 bytes
-rw-r--r--po/hr.po652
-rw-r--r--po/hu.gmobin7946 -> 10145 bytes
-rw-r--r--po/hu.po874
-rw-r--r--po/id.gmobin9214 -> 9027 bytes
-rw-r--r--po/id.po670
-rw-r--r--po/it.gmobin9297 -> 8506 bytes
-rw-r--r--po/it.po696
-rw-r--r--po/ja.gmobin11228 -> 13921 bytes
-rw-r--r--po/ja.po842
-rw-r--r--po/ko.gmobin1318 -> 1382 bytes
-rw-r--r--po/ko.po648
-rw-r--r--po/nb.gmobin9758 -> 9484 bytes
-rw-r--r--po/nb.po683
-rw-r--r--po/nl.gmobin9987 -> 15637 bytes
-rw-r--r--po/nl.po713
-rw-r--r--po/pl.gmobin10591 -> 9515 bytes
-rw-r--r--po/pl.po652
-rw-r--r--po/pt.gmobin9494 -> 8692 bytes
-rw-r--r--po/pt.po652
-rw-r--r--po/pt_BR.gmobin10316 -> 15888 bytes
-rw-r--r--po/pt_BR.po848
-rw-r--r--po/ro.gmobin8589 -> 7820 bytes
-rw-r--r--po/ro.po651
-rw-r--r--po/ru.gmobin11937 -> 20080 bytes
-rw-r--r--po/ru.po752
-rw-r--r--po/sed.pot633
-rw-r--r--po/sk.gmobin10463 -> 15848 bytes
-rw-r--r--po/sk.po717
-rw-r--r--po/sl.gmobin10048 -> 8959 bytes
-rw-r--r--po/sl.po652
-rw-r--r--po/sr.gmobin12388 -> 18868 bytes
-rw-r--r--po/sr.po716
-rw-r--r--po/sv.gmobin9029 -> 9718 bytes
-rw-r--r--po/sv.po744
-rw-r--r--po/tr.gmobin8197 -> 8983 bytes
-rw-r--r--po/tr.po722
-rw-r--r--po/uk.gmobin13187 -> 19993 bytes
-rw-r--r--po/uk.po704
-rw-r--r--po/vi.gmobin11244 -> 17239 bytes
-rw-r--r--po/vi.po768
-rw-r--r--po/zh_CN.gmobin8616 -> 7918 bytes
-rw-r--r--po/zh_CN.po651
-rw-r--r--po/zh_TW.gmobin8114 -> 8632 bytes
-rw-r--r--po/zh_TW.po705
-rw-r--r--sed/Makefile.am17
-rw-r--r--sed/Makefile.in1274
-rw-r--r--sed/compile.c1475
-rw-r--r--sed/execute.c1464
-rw-r--r--sed/fmt.c577
-rw-r--r--sed/local.mk57
-rw-r--r--sed/mbcs.c51
-rw-r--r--sed/regexp.c237
-rw-r--r--sed/sed.c272
-rw-r--r--sed/sed.h45
-rw-r--r--sed/utils.c233
-rw-r--r--sed/utils.h22
-rw-r--r--testsuite/8bit.sed2
-rw-r--r--testsuite/BOOST.tests29
-rw-r--r--testsuite/Makefile.am103
-rw-r--r--testsuite/Makefile.in1553
-rw-r--r--testsuite/Makefile.tests127
-rw-r--r--testsuite/PCRE.tests178
-rw-r--r--testsuite/badenc.sed2
-rw-r--r--testsuite/binary.sed8
-rw-r--r--testsuite/binary2.sed8
-rw-r--r--testsuite/binary3.sed8
-rw-r--r--testsuite/bug-regex10.c6
-rw-r--r--testsuite/bug-regex11.c6
-rw-r--r--testsuite/bug-regex12.c6
-rw-r--r--testsuite/bug-regex13.c6
-rw-r--r--testsuite/bug-regex14.c6
-rw-r--r--testsuite/bug-regex15.c4
-rw-r--r--testsuite/bug-regex16.c4
-rw-r--r--testsuite/bug-regex21.c6
-rw-r--r--testsuite/bug-regex27.c2
-rw-r--r--testsuite/bug-regex28.c2
-rw-r--r--testsuite/bug-regex7.c6
-rw-r--r--testsuite/bug-regex8.c6
-rw-r--r--testsuite/bug-regex9.c6
-rw-r--r--testsuite/cmd-R.sh49
-rwxr-xr-xtestsuite/cmd-l.sh77
-rwxr-xr-xtestsuite/colon-with-no-label.sh33
-rw-r--r--testsuite/comment-n.sh97
-rw-r--r--testsuite/compile-errors.sh292
-rw-r--r--testsuite/compile-tests.sh138
-rwxr-xr-xtestsuite/convert-number.sh181
-rw-r--r--testsuite/dc.inp2
-rw-r--r--testsuite/distrib.sh2
-rw-r--r--testsuite/envvar-check64
-rw-r--r--testsuite/eval.good18
-rw-r--r--testsuite/eval.inp4
-rw-r--r--testsuite/eval.sed12
-rw-r--r--testsuite/execute-tests.sh145
-rw-r--r--testsuite/fasts.sed3
-rw-r--r--testsuite/flipcase.sed2
-rwxr-xr-xtestsuite/follow-symlinks-stdin.sh29
-rw-r--r--testsuite/follow-symlinks.sh74
-rw-r--r--testsuite/get-mb-cur-max.c37
-rwxr-xr-xtestsuite/help-version.sh276
-rwxr-xr-xtestsuite/in-place-hyphen.sh30
-rw-r--r--testsuite/in-place-suffix-backup.sh64
-rw-r--r--testsuite/inclib.good68
-rw-r--r--testsuite/inclib.inp68
-rw-r--r--testsuite/init.sh613
-rwxr-xr-xtestsuite/invalid-mb-seq-UMR.sh42
-rw-r--r--testsuite/khadafy.good2
-rw-r--r--testsuite/khadafy.inp2
-rw-r--r--testsuite/linecnt.good4
-rw-r--r--testsuite/linecnt.inp4
-rw-r--r--testsuite/local.mk370
-rw-r--r--testsuite/mac-mf.good54
-rw-r--r--testsuite/mac-mf.inp36
-rw-r--r--testsuite/mac-mf.sed3
-rw-r--r--testsuite/manis.sed4
-rwxr-xr-xtestsuite/mb-bad-delim.sh84
-rwxr-xr-xtestsuite/mb-charclass-non-utf8.sh132
-rwxr-xr-xtestsuite/mb-match-slash.sh48
-rwxr-xr-xtestsuite/mb-y-translate.sh135
-rw-r--r--testsuite/newline-anchor.good3
-rw-r--r--testsuite/newline-anchor.inp3
-rw-r--r--testsuite/newline-anchor.sed6
-rw-r--r--testsuite/normalize-text.sh83
-rwxr-xr-xtestsuite/nulldata.sh87
-rw-r--r--testsuite/panic-tests.sh101
-rw-r--r--testsuite/posix-char-class.sh67
-rwxr-xr-xtestsuite/posix-mode-N.sh58
-rw-r--r--testsuite/posix-mode-addr.sh91
-rwxr-xr-xtestsuite/posix-mode-bad-ref.sh34
-rw-r--r--testsuite/posix-mode-s.sh73
-rwxr-xr-xtestsuite/range-overlap.sh35
-rw-r--r--testsuite/recursive-escape-c.sh72
-rw-r--r--testsuite/regex-errors.sh43
-rw-r--r--testsuite/runptests.c6
-rwxr-xr-xtestsuite/runtest32
-rw-r--r--testsuite/runtests.c8
-rwxr-xr-xtestsuite/sandbox.sh92
-rw-r--r--testsuite/stdin-prog.sh39
-rwxr-xr-xtestsuite/subst-mb-incomplete.sh34
-rw-r--r--testsuite/subst-options.sh125
-rw-r--r--testsuite/subst-replacement.sh88
-rwxr-xr-xtestsuite/temp-file-cleanup.sh37
-rw-r--r--testsuite/test-mbrtowc.c172
-rwxr-xr-xtestsuite/title-case.sh36
-rw-r--r--testsuite/tst-boost.c6
-rw-r--r--testsuite/tst-pcre.c8
-rw-r--r--testsuite/tst-regex2.c4
-rw-r--r--testsuite/tst-rxspencer.c8
-rw-r--r--testsuite/unbuffered.sh37
-rw-r--r--testsuite/uniq.good2
-rw-r--r--testsuite/uniq.inp4
-rw-r--r--testsuite/utf8-1.good2
-rw-r--r--testsuite/utf8-1.inp2
-rw-r--r--testsuite/utf8-2.good2
-rw-r--r--testsuite/utf8-2.inp2
-rw-r--r--testsuite/utf8-3.good2
-rw-r--r--testsuite/utf8-3.inp2
-rw-r--r--testsuite/utf8-4.good2
-rw-r--r--testsuite/utf8-4.inp2
-rw-r--r--testsuite/version.gin12
-rw-r--r--testsuite/xbxcx.good2
-rw-r--r--testsuite/xbxcx.inp2
-rw-r--r--testsuite/xemacs.good5
-rw-r--r--testsuite/xemacs.inp5
-rw-r--r--testsuite/y-bracket.good2
-rw-r--r--testsuite/y-bracket.inp2
-rw-r--r--testsuite/y-newline.good2
-rw-r--r--testsuite/y-newline.inp2
-rw-r--r--testsuite/y-zero.goodbin0 -> 4 bytes
-rw-r--r--testsuite/y-zero.inp1
-rw-r--r--testsuite/y-zero.sed1
-rw-r--r--testsuite/zero-anchor.goodbin0 -> 14 bytes
-rw-r--r--testsuite/zero-anchor.inpbin0 -> 6 bytes
-rw-r--r--testsuite/zero-anchor.sed6
-rwxr-xr-xthanks-gen16
819 files changed, 130039 insertions, 44242 deletions
diff --git a/.mailmap b/.mailmap
new file mode 100644
index 0000000..4724c39
--- /dev/null
+++ b/.mailmap
@@ -0,0 +1,12 @@
+# Map git author names and email addresses to canonical/preferred form.
+<jim@meyering.net> <meyering@fb.com>
+<jim@meyering.net> <meyering@redhat.com>
+<karl@gnu.org> <karl@tug.org>
+Paul Eggert <eggert@cs.ucla.edu> <eggert@penguin.cs.ucla.edu>
+Paul Eggert <eggert@cs.ucla.edu> <eggert@CS.UCLA.EDU>
+<eggert@cs.ucla.edu> <eggert@twinsun.com>
+<karl@gnu.org> <karl@freefriends.org>
+<bonzini@gnu.org> <pbonzini@redhat.com>
+
+# Consolidate upper/lower case email
+<Ralf.Wildenhues@gmx.de> <ralf.wildenhues@gmx.de>
diff --git a/.tarball-version b/.tarball-version
new file mode 100644
index 0000000..69df05f
--- /dev/null
+++ b/.tarball-version
@@ -0,0 +1 @@
+4.3
diff --git a/.version b/.version
new file mode 100644
index 0000000..69df05f
--- /dev/null
+++ b/.version
@@ -0,0 +1 @@
+4.3
diff --git a/ABOUT-NLS b/ABOUT-NLS
index 83bc72e..b1de1b6 100644
--- a/ABOUT-NLS
+++ b/ABOUT-NLS
@@ -18,35 +18,7 @@ explain how users should proceed for getting the programs to use the
available translations. They tell how people wanting to contribute and
work on translations can contact the appropriate team.
- When reporting bugs in the `intl/' directory or bugs which may be
-related to internationalization, you should tell about the version of
-`gettext' which is used. The information can be found in the
-`intl/VERSION' file, in internationalized packages.
-
-1.1 Quick configuration advice
-==============================
-
-If you want to exploit the full power of internationalization, you
-should configure it using
-
- ./configure --with-included-gettext
-
-to force usage of internationalizing routines provided within this
-package, despite the existence of internationalizing capabilities in the
-operating system where this package is being installed. So far, only
-the `gettext' implementation in the GNU C library version 2 provides as
-many features (such as locale alias, message inheritance, automatic
-charset conversion or plural form handling) as the implementation here.
-It is also not possible to offer this additional functionality on top
-of a `catgets' implementation. Future versions of GNU `gettext' will
-very likely convey even more functionality. So it might be a good idea
-to change to GNU `gettext' as soon as possible.
-
- So you need _not_ provide this option if you are using GNU libc 2 or
-you have installed a recent copy of the GNU gettext package with the
-included `libintl'.
-
-1.2 INSTALL Matters
+1.1 INSTALL Matters
===================
Some packages are "localizable" when properly installed; the programs
@@ -56,36 +28,19 @@ internationalization, predating GNU `gettext'.
By default, this package will be installed to allow translation of
messages. It will automatically detect whether the system already
-provides the GNU `gettext' functions. If not, the included GNU
-`gettext' library will be used. This library is wholly contained
-within this package, usually in the `intl/' subdirectory, so prior
-installation of the GNU `gettext' package is _not_ required.
-Installers may use special options at configuration time for changing
-the default behaviour. The commands:
+provides the GNU `gettext' functions. Installers may use special
+options at configuration time for changing the default behaviour. The
+command:
- ./configure --with-included-gettext
./configure --disable-nls
-will, respectively, bypass any pre-existing `gettext' to use the
-internationalizing routines provided within this package, or else,
-_totally_ disable translation of messages.
+will _totally_ disable translation of messages.
When you already have GNU `gettext' installed on your system and run
configure without an option for your new package, `configure' will
-probably detect the previously built and installed `libintl.a' file and
-will decide to use this. This might not be desirable. You should use
-the more recent version of the GNU `gettext' library. I.e. if the file
-`intl/VERSION' shows that the library which comes with this package is
-more recent, you should use
-
- ./configure --with-included-gettext
-
-to prevent auto-detection.
-
- The configuration process will not test for the `catgets' function
-and therefore it will not be used. The reason is that even an
-emulation of `gettext' on top of `catgets' could not provide all the
-extensions of the GNU `gettext' library.
+probably detect the previously built and installed `libintl' library
+and will decide to use it. If not, you may have to to use the
+`--with-libintl-prefix' option to tell `configure' where to look for it.
Internationalized packages usually have many `po/LL.po' files, where
LL gives an ISO 639 two-letter code identifying the language. Unless
@@ -96,7 +51,7 @@ may be set, prior to configuration, to limit the installed set.
`LINGUAS' should then contain a space separated list of two-letter
codes, stating which languages are allowed.
-1.3 Using This Package
+1.2 Using This Package
======================
As a user, if your language has been installed for this package, you
@@ -148,7 +103,7 @@ to denote the language's main dialect. For example, `de' is equivalent
to `de_DE' (German as spoken in Germany), and `pt' to `pt_PT'
(Portuguese as spoken in Portugal) in this context.
-1.4 Translating Teams
+1.3 Translating Teams
=====================
For the Free Translation Project to be a success, we need interested
@@ -177,859 +132,1118 @@ reach the coordinator for all translator teams.
the terminology in use. Proven linguistic skills are praised more than
programming skills, here.
-1.5 Available Packages
+1.4 Available Packages
======================
Languages are not equally supported in all packages. The following
-matrix shows the current state of internationalization, as of November
-2007. The matrix shows, in regard of each package, for which languages
+matrix shows the current state of internationalization, as of June
+2010. The matrix shows, in regard of each package, for which languages
PO files have been submitted to translation coordination, with a
translation percentage of at least 50%.
- Ready PO files af am ar az be bg bs ca cs cy da de el en en_GB eo
- +----------------------------------------------------+
- Compendium | [] [] [] [] |
- a2ps | [] [] [] [] [] |
- aegis | () |
- ant-phone | () |
- anubis | [] |
- ap-utils | |
- aspell | [] [] [] [] [] |
- bash | [] |
- bfd | |
- bibshelf | [] |
- binutils | |
- bison | [] [] |
- bison-runtime | [] |
- bluez-pin | [] [] [] [] [] |
- cflow | [] |
- clisp | [] [] [] |
- console-tools | [] [] |
- coreutils | [] [] [] [] |
- cpio | |
- cpplib | [] [] [] |
- cryptonit | [] |
- dialog | |
- diffutils | [] [] [] [] [] [] |
- doodle | [] |
- e2fsprogs | [] [] |
- enscript | [] [] [] [] |
- fetchmail | [] [] () [] [] |
- findutils | [] |
- findutils_stable | [] [] [] |
- flex | [] [] [] |
- fslint | |
- gas | |
- gawk | [] [] [] |
- gcal | [] |
- gcc | [] |
- gettext-examples | [] [] [] [] [] |
- gettext-runtime | [] [] [] [] [] |
- gettext-tools | [] [] |
- gip | [] |
- gliv | [] [] |
- glunarclock | [] |
- gmult | [] [] |
- gnubiff | () |
- gnucash | [] [] () () [] |
- gnuedu | |
- gnulib | [] |
- gnunet | |
- gnunet-gtk | |
- gnutls | [] |
- gpe-aerial | [] [] |
- gpe-beam | [] [] |
- gpe-calendar | |
- gpe-clock | [] [] |
- gpe-conf | [] [] |
- gpe-contacts | |
- gpe-edit | [] |
- gpe-filemanager | |
- gpe-go | [] |
- gpe-login | [] [] |
- gpe-ownerinfo | [] [] |
- gpe-package | |
- gpe-sketchbook | [] [] |
- gpe-su | [] [] |
- gpe-taskmanager | [] [] |
- gpe-timesheet | [] |
- gpe-today | [] [] |
- gpe-todo | |
- gphoto2 | [] [] [] [] |
- gprof | [] [] |
- gpsdrive | |
- gramadoir | [] [] |
- grep | [] [] |
- gretl | () |
- gsasl | |
- gss | |
- gst-plugins-bad | [] [] |
- gst-plugins-base | [] [] |
- gst-plugins-good | [] [] [] |
- gst-plugins-ugly | [] [] |
- gstreamer | [] [] [] [] [] [] [] |
- gtick | () |
- gtkam | [] [] [] [] |
- gtkorphan | [] [] |
- gtkspell | [] [] [] [] |
- gutenprint | [] |
- hello | [] [] [] [] [] |
- herrie | [] |
- hylafax | |
- idutils | [] [] |
- indent | [] [] [] [] |
- iso_15924 | |
- iso_3166 | [] [] [] [] [] [] [] [] [] [] [] |
- iso_3166_2 | |
- iso_4217 | [] [] [] |
- iso_639 | [] [] [] [] |
- jpilot | [] |
- jtag | |
- jwhois | |
- kbd | [] [] [] [] |
- keytouch | [] [] |
- keytouch-editor | [] |
- keytouch-keyboa... | [] |
- latrine | () |
- ld | [] |
- leafpad | [] [] [] [] [] |
- libc | [] [] [] [] |
- libexif | [] |
- libextractor | [] |
- libgpewidget | [] [] [] |
- libgpg-error | [] |
- libgphoto2 | [] [] |
- libgphoto2_port | [] [] |
- libgsasl | |
- libiconv | [] [] |
- libidn | [] [] [] |
- lifelines | [] () |
- lilypond | [] |
- lingoteach | |
- lprng | |
- lynx | [] [] [] [] |
- m4 | [] [] [] [] |
- mailfromd | |
- mailutils | [] |
- make | [] [] |
- man-db | [] [] [] |
- minicom | [] [] [] |
- nano | [] [] [] |
- opcodes | [] |
- parted | [] [] |
- pilot-qof | |
- popt | [] [] [] |
- psmisc | [] |
- pwdutils | |
- qof | |
- radius | [] |
- recode | [] [] [] [] [] [] |
- rpm | [] |
- screem | |
- scrollkeeper | [] [] [] [] [] [] [] [] |
- sed | [] [] [] |
- shared-mime-info | [] [] [] [] () [] [] [] |
- sharutils | [] [] [] [] [] [] |
- shishi | |
- skencil | [] () |
- solfege | |
- soundtracker | [] [] |
- sp | [] |
- system-tools-ba... | [] [] [] [] [] [] [] [] [] |
- tar | [] [] |
- texinfo | [] [] [] |
- tin | () () |
- tuxpaint | [] [] [] [] [] [] |
- unicode-han-tra... | |
- unicode-transla... | |
- util-linux | [] [] [] [] |
- util-linux-ng | [] [] [] [] |
- vorbis-tools | [] |
- wastesedge | () |
- wdiff | [] [] [] [] |
- wget | [] [] [] |
- xchat | [] [] [] [] [] [] [] |
- xkeyboard-config | [] |
- xpad | [] [] [] |
- +----------------------------------------------------+
- af am ar az be bg bs ca cs cy da de el en en_GB eo
- 6 0 2 1 8 26 2 40 48 2 56 88 15 1 15 18
-
- es et eu fa fi fr ga gl gu he hi hr hu id is it
+ Ready PO files af am an ar as ast az be be@latin bg bn_IN bs ca
+--------------------------------------------------+
- Compendium | [] [] [] [] [] |
- a2ps | [] [] [] () |
+ a2ps | [] [] |
aegis | |
- ant-phone | [] |
- anubis | [] |
- ap-utils | [] [] |
- aspell | [] [] [] |
- bash | [] |
- bfd | [] [] |
- bibshelf | [] [] [] |
- binutils | [] [] [] |
- bison | [] [] [] [] [] [] |
- bison-runtime | [] [] [] [] [] |
- bluez-pin | [] [] [] [] [] |
- cflow | [] |
- clisp | [] [] |
- console-tools | |
- coreutils | [] [] [] [] [] [] |
- cpio | [] [] [] |
- cpplib | [] [] |
- cryptonit | [] |
- dialog | [] [] [] |
- diffutils | [] [] [] [] [] [] [] [] [] |
- doodle | [] [] |
- e2fsprogs | [] [] [] |
- enscript | [] [] [] |
- fetchmail | [] |
- findutils | [] [] [] |
- findutils_stable | [] [] [] [] |
- flex | [] [] [] |
- fslint | |
- gas | [] [] |
- gawk | [] [] [] [] () |
- gcal | [] [] |
- gcc | [] |
- gettext-examples | [] [] [] [] [] [] [] |
- gettext-runtime | [] [] [] [] [] [] |
- gettext-tools | [] [] [] [] |
- gip | [] [] [] [] |
- gliv | () |
- glunarclock | [] [] [] |
- gmult | [] [] [] |
- gnubiff | () () |
- gnucash | () () () |
- gnuedu | [] |
- gnulib | [] [] [] |
- gnunet | |
- gnunet-gtk | |
- gnutls | |
- gpe-aerial | [] [] |
- gpe-beam | [] [] |
- gpe-calendar | |
- gpe-clock | [] [] [] [] |
- gpe-conf | [] |
- gpe-contacts | [] [] |
- gpe-edit | [] [] [] [] |
- gpe-filemanager | [] |
- gpe-go | [] [] [] |
- gpe-login | [] [] [] |
- gpe-ownerinfo | [] [] [] [] [] |
- gpe-package | [] |
- gpe-sketchbook | [] [] |
- gpe-su | [] [] [] [] |
- gpe-taskmanager | [] [] [] |
- gpe-timesheet | [] [] [] [] |
- gpe-today | [] [] [] [] |
- gpe-todo | [] |
- gphoto2 | [] [] [] [] [] |
- gprof | [] [] [] [] [] |
- gpsdrive | [] |
- gramadoir | [] [] |
- grep | [] [] [] |
- gretl | [] [] [] () |
- gsasl | [] [] |
- gss | [] [] |
- gst-plugins-bad | [] [] [] [] |
- gst-plugins-base | [] [] [] [] |
- gst-plugins-good | [] [] [] [] [] |
- gst-plugins-ugly | [] [] [] [] |
- gstreamer | [] [] [] |
- gtick | [] [] [] |
- gtkam | [] [] [] [] |
- gtkorphan | [] [] |
- gtkspell | [] [] [] [] [] [] [] |
- gutenprint | [] |
- hello | [] [] [] [] [] [] [] [] [] [] [] [] [] |
- herrie | [] |
- hylafax | |
- idutils | [] [] [] [] [] |
- indent | [] [] [] [] [] [] [] [] [] [] |
- iso_15924 | [] |
- iso_3166 | [] [] [] [] [] [] [] [] [] [] [] [] [] |
- iso_3166_2 | [] |
- iso_4217 | [] [] [] [] [] [] |
- iso_639 | [] [] [] [] [] [] |
- jpilot | [] [] |
- jtag | [] |
- jwhois | [] [] [] [] [] |
- kbd | [] [] |
- keytouch | [] [] [] |
- keytouch-editor | [] |
- keytouch-keyboa... | [] [] |
- latrine | [] [] |
- ld | [] [] [] [] |
- leafpad | [] [] [] [] [] [] |
- libc | [] [] [] [] [] |
- libexif | [] |
- libextractor | [] |
- libgpewidget | [] [] [] [] [] |
- libgpg-error | [] |
- libgphoto2 | [] [] [] |
- libgphoto2_port | [] [] |
- libgsasl | [] [] |
- libiconv | [] [] [] |
- libidn | [] [] |
- lifelines | () |
- lilypond | [] [] [] |
- lingoteach | [] [] [] |
- lprng | |
- lynx | [] [] [] |
- m4 | [] [] [] [] |
- mailfromd | |
- mailutils | [] [] |
- make | [] [] [] [] [] [] [] [] |
- man-db | [] |
- minicom | [] [] [] [] |
- nano | [] [] [] [] [] [] [] |
- opcodes | [] [] [] [] |
- parted | [] [] [] |
- pilot-qof | |
- popt | [] [] [] [] |
- psmisc | [] [] |
- pwdutils | |
- qof | [] |
- radius | [] [] |
- recode | [] [] [] [] [] [] [] [] |
- rpm | [] [] |
- screem | |
- scrollkeeper | [] [] [] |
- sed | [] [] [] [] [] |
- shared-mime-info | [] [] [] [] [] [] |
- sharutils | [] [] [] [] [] [] [] [] |
- shishi | [] |
- skencil | [] [] |
- solfege | [] |
- soundtracker | [] [] [] |
- sp | [] |
- system-tools-ba... | [] [] [] [] [] [] [] [] [] |
- tar | [] [] [] [] [] |
- texinfo | [] [] [] |
- tin | [] () |
- tuxpaint | [] [] |
- unicode-han-tra... | |
- unicode-transla... | [] [] |
- util-linux | [] [] [] [] [] [] [] |
- util-linux-ng | [] [] [] [] [] [] [] |
- vorbis-tools | |
- wastesedge | () |
- wdiff | [] [] [] [] [] [] [] [] |
- wget | [] [] [] [] [] [] [] [] |
- xchat | [] [] [] [] [] [] [] |
- xkeyboard-config | [] [] [] [] |
- xpad | [] [] [] |
- +--------------------------------------------------+
- es et eu fa fi fr ga gl gu he hi hr hu id is it
- 85 22 14 2 48 101 61 12 2 8 2 6 53 29 1 52
-
- ja ka ko ku ky lg lt lv mk mn ms mt nb ne nl nn
- +--------------------------------------------------+
- Compendium | [] |
- a2ps | () [] [] |
- aegis | () |
- ant-phone | [] |
- anubis | [] [] [] |
- ap-utils | [] |
- aspell | [] [] |
- bash | [] |
+ ant-phone | |
+ anubis | |
+ aspell | [] [] |
+ bash | |
bfd | |
- bibshelf | [] |
+ bibshelf | [] |
binutils | |
- bison | [] [] [] |
- bison-runtime | [] [] [] |
- bluez-pin | [] [] [] |
+ bison | |
+ bison-runtime | [] |
+ bluez-pin | [] [] |
+ bombono-dvd | |
+ buzztard | |
cflow | |
- clisp | [] |
- console-tools | |
- coreutils | [] |
- cpio | [] |
- cpplib | [] |
- cryptonit | [] |
- dialog | [] [] |
- diffutils | [] [] [] |
+ clisp | |
+ coreutils | [] [] |
+ cpio | |
+ cppi | |
+ cpplib | [] |
+ cryptsetup | |
+ dfarc | |
+ dialog | [] [] |
+ dico | |
+ diffutils | [] |
+ dink | |
doodle | |
- e2fsprogs | [] |
- enscript | [] |
- fetchmail | [] [] |
- findutils | [] |
- findutils_stable | [] |
- flex | [] [] |
- fslint | |
+ e2fsprogs | [] |
+ enscript | [] |
+ exif | |
+ fetchmail | [] |
+ findutils | [] |
+ flex | [] |
+ freedink | |
gas | |
- gawk | [] [] |
- gcal | |
+ gawk | [] [] |
+ gcal | [] |
gcc | |
- gettext-examples | [] [] [] |
- gettext-runtime | [] [] [] |
- gettext-tools | [] [] |
- gip | [] [] |
- gliv | [] |
- glunarclock | [] [] |
- gmult | [] [] [] |
+ gettext-examples | [] [] [] [] |
+ gettext-runtime | [] [] |
+ gettext-tools | [] [] |
+ gip | [] |
+ gjay | |
+ gliv | [] |
+ glunarclock | [] [] |
gnubiff | |
- gnucash | () () () |
+ gnucash | [] |
gnuedu | |
- gnulib | [] [] |
+ gnulib | |
gnunet | |
gnunet-gtk | |
- gnutls | [] |
- gpe-aerial | [] |
- gpe-beam | [] |
- gpe-calendar | [] |
- gpe-clock | [] [] [] |
- gpe-conf | [] [] [] |
- gpe-contacts | [] |
- gpe-edit | [] [] [] |
- gpe-filemanager | [] [] |
- gpe-go | [] [] [] |
- gpe-login | [] [] [] |
- gpe-ownerinfo | [] [] |
- gpe-package | [] [] |
- gpe-sketchbook | [] [] |
- gpe-su | [] [] [] |
- gpe-taskmanager | [] [] [] [] |
- gpe-timesheet | [] |
- gpe-today | [] [] |
- gpe-todo | [] |
- gphoto2 | [] [] |
- gprof | [] |
- gpsdrive | [] |
- gramadoir | () |
- grep | [] [] |
- gretl | |
- gsasl | [] |
+ gnutls | |
+ gold | |
+ gpe-aerial | |
+ gpe-beam | |
+ gpe-bluetooth | |
+ gpe-calendar | |
+ gpe-clock | [] |
+ gpe-conf | |
+ gpe-contacts | |
+ gpe-edit | |
+ gpe-filemanager | |
+ gpe-go | |
+ gpe-login | |
+ gpe-ownerinfo | [] |
+ gpe-package | |
+ gpe-sketchbook | |
+ gpe-su | [] |
+ gpe-taskmanager | [] |
+ gpe-timesheet | [] |
+ gpe-today | [] |
+ gpe-todo | |
+ gphoto2 | |
+ gprof | [] |
+ gpsdrive | |
+ gramadoir | |
+ grep | |
+ grub | [] [] |
+ gsasl | |
gss | |
- gst-plugins-bad | [] |
- gst-plugins-base | [] |
- gst-plugins-good | [] |
- gst-plugins-ugly | [] |
- gstreamer | [] |
- gtick | [] |
- gtkam | [] [] |
- gtkorphan | [] |
- gtkspell | [] [] |
- gutenprint | [] |
- hello | [] [] [] [] [] [] [] |
- herrie | [] |
+ gst-plugins-bad | [] |
+ gst-plugins-base | [] |
+ gst-plugins-good | [] |
+ gst-plugins-ugly | [] |
+ gstreamer | [] [] [] |
+ gtick | |
+ gtkam | [] |
+ gtkorphan | [] |
+ gtkspell | [] [] [] |
+ gutenprint | |
+ hello | [] |
+ help2man | |
hylafax | |
- idutils | [] |
- indent | [] [] |
- iso_15924 | [] |
- iso_3166 | [] [] [] [] [] [] [] [] |
- iso_3166_2 | [] |
- iso_4217 | [] [] [] |
- iso_639 | [] [] [] [] |
- jpilot | () () |
- jtag | |
- jwhois | [] |
- kbd | [] |
- keytouch | [] |
- keytouch-editor | [] |
- keytouch-keyboa... | |
- latrine | [] |
- ld | |
- leafpad | [] [] |
- libc | [] [] [] |
- libexif | |
+ idutils | |
+ indent | [] [] |
+ iso_15924 | |
+ iso_3166 | [] [] [] [] [] [] [] |
+ iso_3166_2 | |
+ iso_4217 | |
+ iso_639 | [] [] [] [] |
+ iso_639_3 | |
+ jwhois | |
+ kbd | |
+ keytouch | [] |
+ keytouch-editor | |
+ keytouch-keyboa... | [] |
+ klavaro | [] |
+ latrine | |
+ ld | [] |
+ leafpad | [] [] |
+ libc | [] [] |
+ libexif | () |
libextractor | |
- libgpewidget | [] |
+ libgnutls | |
+ libgpewidget | |
libgpg-error | |
- libgphoto2 | [] |
- libgphoto2_port | [] |
- libgsasl | [] |
- libiconv | [] |
- libidn | [] [] |
- lifelines | [] |
- lilypond | [] |
- lingoteach | [] |
+ libgphoto2 | |
+ libgphoto2_port | |
+ libgsasl | |
+ libiconv | [] |
+ libidn | |
+ lifelines | |
+ liferea | [] [] |
+ lilypond | |
+ linkdr | [] |
+ lordsawar | |
lprng | |
- lynx | [] [] |
- m4 | [] [] |
+ lynx | [] |
+ m4 | |
mailfromd | |
mailutils | |
- make | [] [] [] |
+ make | |
man-db | |
- minicom | [] |
- nano | [] [] [] |
- opcodes | [] |
- parted | [] [] |
- pilot-qof | |
- popt | [] [] [] |
- psmisc | [] [] [] |
+ man-db-manpages | |
+ minicom | |
+ mkisofs | |
+ myserver | |
+ nano | [] [] |
+ opcodes | |
+ parted | |
+ pies | |
+ popt | |
+ psmisc | |
+ pspp | [] |
pwdutils | |
- qof | |
- radius | |
- recode | [] |
- rpm | [] [] |
- screem | [] |
- scrollkeeper | [] [] [] [] |
- sed | [] [] |
- shared-mime-info | [] [] [] [] [] [] [] |
- sharutils | [] [] |
+ radius | [] |
+ recode | [] [] |
+ rosegarden | |
+ rpm | |
+ rush | |
+ sarg | |
+ screem | |
+ scrollkeeper | [] [] [] |
+ sed | [] [] |
+ sharutils | [] [] |
shishi | |
skencil | |
- solfege | () () |
+ solfege | |
+ solfege-manual | |
soundtracker | |
- sp | () |
- system-tools-ba... | [] [] [] [] |
- tar | [] [] [] |
- texinfo | [] [] |
+ sp | |
+ sysstat | |
+ tar | [] |
+ texinfo | |
tin | |
- tuxpaint | () [] [] |
unicode-han-tra... | |
unicode-transla... | |
- util-linux | [] [] |
- util-linux-ng | [] [] |
+ util-linux-ng | [] |
+ vice | |
+ vmm | |
vorbis-tools | |
- wastesedge | [] |
- wdiff | [] [] |
- wget | [] [] |
- xchat | [] [] [] [] |
- xkeyboard-config | [] [] [] |
- xpad | [] [] [] |
- +--------------------------------------------------+
- ja ka ko ku ky lg lt lv mk mn ms mt nb ne nl nn
- 51 2 25 3 2 0 6 0 2 2 20 0 11 1 103 6
-
- or pa pl pt pt_BR rm ro ru rw sk sl sq sr sv ta
- +--------------------------------------------------+
- Compendium | [] [] [] [] [] |
- a2ps | () [] [] [] [] [] [] |
- aegis | () () |
- ant-phone | [] [] |
- anubis | [] [] [] |
- ap-utils | () |
- aspell | [] [] [] |
- bash | [] [] |
- bfd | |
- bibshelf | [] |
- binutils | [] [] |
- bison | [] [] [] [] [] |
- bison-runtime | [] [] [] [] [] |
- bluez-pin | [] [] [] [] [] [] [] [] [] |
- cflow | [] |
- clisp | [] |
- console-tools | [] |
- coreutils | [] [] [] [] |
- cpio | [] [] [] |
- cpplib | [] |
- cryptonit | [] [] |
- dialog | [] |
- diffutils | [] [] [] [] [] [] |
- doodle | [] [] |
- e2fsprogs | [] [] |
- enscript | [] [] [] [] [] |
- fetchmail | [] [] [] |
- findutils | [] [] [] |
- findutils_stable | [] [] [] [] [] [] |
- flex | [] [] [] [] [] |
- fslint | [] |
- gas | |
- gawk | [] [] [] [] |
- gcal | [] |
- gcc | [] [] |
- gettext-examples | [] [] [] [] [] [] [] [] |
- gettext-runtime | [] [] [] [] [] [] [] [] |
- gettext-tools | [] [] [] [] [] [] [] |
- gip | [] [] [] [] |
- gliv | [] [] [] [] [] [] |
- glunarclock | [] [] [] [] [] [] |
- gmult | [] [] [] [] |
- gnubiff | () [] |
- gnucash | () [] |
- gnuedu | |
- gnulib | [] [] [] |
- gnunet | |
- gnunet-gtk | [] |
- gnutls | [] [] |
- gpe-aerial | [] [] [] [] [] [] [] |
- gpe-beam | [] [] [] [] [] [] [] |
- gpe-calendar | [] [] [] [] |
- gpe-clock | [] [] [] [] [] [] [] [] |
- gpe-conf | [] [] [] [] [] [] [] |
- gpe-contacts | [] [] [] [] [] |
- gpe-edit | [] [] [] [] [] [] [] [] [] |
- gpe-filemanager | [] [] |
- gpe-go | [] [] [] [] [] [] [] [] |
- gpe-login | [] [] [] [] [] [] [] [] |
- gpe-ownerinfo | [] [] [] [] [] [] [] [] |
- gpe-package | [] [] |
- gpe-sketchbook | [] [] [] [] [] [] [] [] |
- gpe-su | [] [] [] [] [] [] [] [] |
- gpe-taskmanager | [] [] [] [] [] [] [] [] |
- gpe-timesheet | [] [] [] [] [] [] [] [] |
- gpe-today | [] [] [] [] [] [] [] [] |
- gpe-todo | [] [] [] [] |
- gphoto2 | [] [] [] [] [] [] |
- gprof | [] [] [] |
- gpsdrive | [] [] |
- gramadoir | [] [] |
- grep | [] [] [] [] |
- gretl | [] [] [] |
- gsasl | [] [] [] |
- gss | [] [] [] [] |
- gst-plugins-bad | [] [] [] |
- gst-plugins-base | [] [] |
- gst-plugins-good | [] [] |
- gst-plugins-ugly | [] [] [] |
- gstreamer | [] [] [] [] |
- gtick | [] |
- gtkam | [] [] [] [] [] |
- gtkorphan | [] |
- gtkspell | [] [] [] [] [] [] [] [] |
- gutenprint | [] |
- hello | [] [] [] [] [] [] [] [] |
- herrie | [] [] [] |
- hylafax | |
- idutils | [] [] [] [] [] |
- indent | [] [] [] [] [] [] [] |
- iso_15924 | |
- iso_3166 | [] [] [] [] [] [] [] [] [] [] [] [] [] |
- iso_3166_2 | |
- iso_4217 | [] [] [] [] [] [] [] |
- iso_639 | [] [] [] [] [] [] [] |
- jpilot | |
- jtag | [] |
- jwhois | [] [] [] [] |
- kbd | [] [] [] |
- keytouch | [] |
- keytouch-editor | [] |
- keytouch-keyboa... | [] |
- latrine | |
- ld | [] |
- leafpad | [] [] [] [] [] [] |
- libc | [] [] [] [] |
- libexif | [] [] |
- libextractor | [] [] |
- libgpewidget | [] [] [] [] [] [] [] [] |
- libgpg-error | [] [] [] |
- libgphoto2 | [] |
- libgphoto2_port | [] [] [] |
- libgsasl | [] [] [] [] |
- libiconv | [] [] [] |
- libidn | [] [] () |
- lifelines | [] [] |
- lilypond | |
- lingoteach | [] |
- lprng | [] |
- lynx | [] [] [] |
- m4 | [] [] [] [] [] |
- mailfromd | [] |
- mailutils | [] [] [] |
- make | [] [] [] [] |
- man-db | [] [] [] [] |
- minicom | [] [] [] [] [] |
- nano | [] [] [] [] |
- opcodes | [] [] |
- parted | [] |
- pilot-qof | |
- popt | [] [] [] [] |
- psmisc | [] [] |
- pwdutils | [] [] |
- qof | [] [] |
- radius | [] [] |
- recode | [] [] [] [] [] [] [] |
- rpm | [] [] [] [] |
- screem | |
- scrollkeeper | [] [] [] [] [] [] [] |
- sed | [] [] [] [] [] [] [] [] [] |
- shared-mime-info | [] [] [] [] [] [] |
- sharutils | [] [] [] [] |
- shishi | [] |
- skencil | [] [] [] |
- solfege | [] |
- soundtracker | [] [] |
- sp | |
- system-tools-ba... | [] [] [] [] [] [] [] [] [] |
- tar | [] [] [] [] |
- texinfo | [] [] [] [] |
- tin | () |
- tuxpaint | [] [] [] [] [] [] |
- unicode-han-tra... | |
- unicode-transla... | |
- util-linux | [] [] [] [] |
- util-linux-ng | [] [] [] [] |
- vorbis-tools | [] |
wastesedge | |
- wdiff | [] [] [] [] [] [] [] |
- wget | [] [] [] [] |
- xchat | [] [] [] [] [] [] [] |
- xkeyboard-config | [] [] [] |
- xpad | [] [] [] |
+ wdiff | |
+ wget | [] [] |
+ wyslij-po | |
+ xchat | [] [] [] [] |
+ xdg-user-dirs | [] [] [] [] [] [] [] [] [] |
+ xkeyboard-config | [] [] |
+--------------------------------------------------+
- or pa pl pt pt_BR rm ro ru rw sk sl sq sr sv ta
- 0 5 77 31 53 4 58 72 3 45 46 9 45 122 3
+ af am an ar as ast az be be@latin bg bn_IN bs ca
+ 6 0 1 2 3 19 1 10 3 28 3 1 38
+
+ crh cs da de el en en_GB en_ZA eo es et eu fa
+ +-------------------------------------------------+
+ a2ps | [] [] [] [] [] [] [] |
+ aegis | [] [] [] |
+ ant-phone | [] () |
+ anubis | [] [] |
+ aspell | [] [] [] [] [] |
+ bash | [] [] [] |
+ bfd | [] |
+ bibshelf | [] [] [] |
+ binutils | [] |
+ bison | [] [] |
+ bison-runtime | [] [] [] [] |
+ bluez-pin | [] [] [] [] [] [] |
+ bombono-dvd | [] |
+ buzztard | [] [] [] |
+ cflow | [] [] |
+ clisp | [] [] [] [] |
+ coreutils | [] [] [] [] |
+ cpio | |
+ cppi | |
+ cpplib | [] [] [] |
+ cryptsetup | [] |
+ dfarc | [] [] [] |
+ dialog | [] [] [] [] [] |
+ dico | |
+ diffutils | [] [] [] [] [] [] |
+ dink | [] [] [] |
+ doodle | [] |
+ e2fsprogs | [] [] [] |
+ enscript | [] [] [] |
+ exif | () [] [] |
+ fetchmail | [] [] () [] [] [] |
+ findutils | [] [] [] |
+ flex | [] [] |
+ freedink | [] [] [] |
+ gas | [] |
+ gawk | [] [] [] |
+ gcal | [] |
+ gcc | [] [] |
+ gettext-examples | [] [] [] [] |
+ gettext-runtime | [] [] [] [] |
+ gettext-tools | [] [] [] |
+ gip | [] [] [] [] |
+ gjay | [] |
+ gliv | [] [] [] |
+ glunarclock | [] [] |
+ gnubiff | () |
+ gnucash | [] () () () () |
+ gnuedu | [] [] |
+ gnulib | [] [] |
+ gnunet | |
+ gnunet-gtk | [] |
+ gnutls | [] [] |
+ gold | [] |
+ gpe-aerial | [] [] [] [] |
+ gpe-beam | [] [] [] [] |
+ gpe-bluetooth | [] [] |
+ gpe-calendar | [] |
+ gpe-clock | [] [] [] [] |
+ gpe-conf | [] [] [] |
+ gpe-contacts | [] [] [] |
+ gpe-edit | [] [] |
+ gpe-filemanager | [] [] [] |
+ gpe-go | [] [] [] [] |
+ gpe-login | [] [] |
+ gpe-ownerinfo | [] [] [] [] |
+ gpe-package | [] [] [] |
+ gpe-sketchbook | [] [] [] [] |
+ gpe-su | [] [] [] [] |
+ gpe-taskmanager | [] [] [] [] |
+ gpe-timesheet | [] [] [] [] |
+ gpe-today | [] [] [] [] |
+ gpe-todo | [] [] [] |
+ gphoto2 | [] [] () [] [] [] |
+ gprof | [] [] [] |
+ gpsdrive | [] [] [] |
+ gramadoir | [] [] [] |
+ grep | [] |
+ grub | [] [] |
+ gsasl | [] |
+ gss | |
+ gst-plugins-bad | [] [] [] [] [] |
+ gst-plugins-base | [] [] [] [] [] |
+ gst-plugins-good | [] [] [] [] [] [] |
+ gst-plugins-ugly | [] [] [] [] [] [] |
+ gstreamer | [] [] [] [] [] |
+ gtick | [] () [] |
+ gtkam | [] [] () [] [] |
+ gtkorphan | [] [] [] [] |
+ gtkspell | [] [] [] [] [] [] [] |
+ gutenprint | [] [] [] |
+ hello | [] [] [] [] |
+ help2man | [] |
+ hylafax | [] [] |
+ idutils | [] [] |
+ indent | [] [] [] [] [] [] [] |
+ iso_15924 | [] () [] [] |
+ iso_3166 | [] [] [] [] () [] [] [] () |
+ iso_3166_2 | () |
+ iso_4217 | [] [] [] () [] [] |
+ iso_639 | [] [] [] [] () [] [] |
+ iso_639_3 | [] |
+ jwhois | [] |
+ kbd | [] [] [] [] [] |
+ keytouch | [] [] |
+ keytouch-editor | [] [] |
+ keytouch-keyboa... | [] |
+ klavaro | [] [] [] [] |
+ latrine | [] () |
+ ld | [] [] |
+ leafpad | [] [] [] [] [] [] |
+ libc | [] [] [] [] |
+ libexif | [] [] () |
+ libextractor | |
+ libgnutls | [] |
+ libgpewidget | [] [] |
+ libgpg-error | [] [] |
+ libgphoto2 | [] () |
+ libgphoto2_port | [] () [] |
+ libgsasl | |
+ libiconv | [] [] [] [] [] |
+ libidn | [] [] [] |
+ lifelines | [] () |
+ liferea | [] [] [] [] [] |
+ lilypond | [] [] [] |
+ linkdr | [] [] [] |
+ lordsawar | [] |
+ lprng | |
+ lynx | [] [] [] [] |
+ m4 | [] [] [] [] |
+ mailfromd | |
+ mailutils | [] |
+ make | [] [] [] |
+ man-db | |
+ man-db-manpages | |
+ minicom | [] [] [] [] |
+ mkisofs | |
+ myserver | |
+ nano | [] [] [] |
+ opcodes | [] [] |
+ parted | [] [] |
+ pies | |
+ popt | [] [] [] [] [] |
+ psmisc | [] [] [] |
+ pspp | [] |
+ pwdutils | [] |
+ radius | [] |
+ recode | [] [] [] [] [] [] |
+ rosegarden | () () () |
+ rpm | [] [] [] |
+ rush | |
+ sarg | |
+ screem | |
+ scrollkeeper | [] [] [] [] [] |
+ sed | [] [] [] [] [] [] |
+ sharutils | [] [] [] [] |
+ shishi | |
+ skencil | [] () [] |
+ solfege | [] [] [] |
+ solfege-manual | [] [] |
+ soundtracker | [] [] [] |
+ sp | [] |
+ sysstat | [] [] [] |
+ tar | [] [] [] [] |
+ texinfo | [] [] [] |
+ tin | [] [] |
+ unicode-han-tra... | |
+ unicode-transla... | |
+ util-linux-ng | [] [] [] [] |
+ vice | () () |
+ vmm | [] |
+ vorbis-tools | [] [] |
+ wastesedge | [] |
+ wdiff | [] [] |
+ wget | [] [] [] |
+ wyslij-po | |
+ xchat | [] [] [] [] [] |
+ xdg-user-dirs | [] [] [] [] [] [] [] [] [] |
+ xkeyboard-config | [] [] [] [] [] [] |
+ +-------------------------------------------------+
+ crh cs da de el en en_GB en_ZA eo es et eu fa
+ 5 64 105 117 18 1 8 0 28 89 18 19 0
+
+ fi fr ga gl gu he hi hr hu hy id is it ja ka kn
+ +----------------------------------------------------+
+ a2ps | [] [] [] [] |
+ aegis | [] [] |
+ ant-phone | [] [] |
+ anubis | [] [] [] [] |
+ aspell | [] [] [] [] |
+ bash | [] [] [] [] |
+ bfd | [] [] [] |
+ bibshelf | [] [] [] [] [] |
+ binutils | [] [] [] |
+ bison | [] [] [] [] |
+ bison-runtime | [] [] [] [] [] [] |
+ bluez-pin | [] [] [] [] [] [] [] [] |
+ bombono-dvd | [] |
+ buzztard | [] |
+ cflow | [] [] [] |
+ clisp | [] |
+ coreutils | [] [] [] [] [] |
+ cpio | [] [] [] [] |
+ cppi | [] [] |
+ cpplib | [] [] [] |
+ cryptsetup | [] [] [] |
+ dfarc | [] [] [] |
+ dialog | [] [] [] [] [] [] [] |
+ dico | |
+ diffutils | [] [] [] [] [] [] [] [] [] |
+ dink | [] |
+ doodle | [] [] |
+ e2fsprogs | [] [] |
+ enscript | [] [] [] [] |
+ exif | [] [] [] [] [] [] |
+ fetchmail | [] [] [] [] |
+ findutils | [] [] [] [] [] [] |
+ flex | [] [] [] |
+ freedink | [] [] [] |
+ gas | [] [] |
+ gawk | [] [] [] [] () [] |
+ gcal | [] |
+ gcc | [] |
+ gettext-examples | [] [] [] [] [] [] [] |
+ gettext-runtime | [] [] [] [] [] [] |
+ gettext-tools | [] [] [] [] |
+ gip | [] [] [] [] [] [] |
+ gjay | [] |
+ gliv | [] () |
+ glunarclock | [] [] [] [] |
+ gnubiff | () [] () |
+ gnucash | () () () () () [] |
+ gnuedu | [] [] |
+ gnulib | [] [] [] [] [] [] |
+ gnunet | |
+ gnunet-gtk | [] |
+ gnutls | [] [] |
+ gold | [] [] |
+ gpe-aerial | [] [] [] |
+ gpe-beam | [] [] [] [] |
+ gpe-bluetooth | [] [] [] [] |
+ gpe-calendar | [] [] |
+ gpe-clock | [] [] [] [] [] |
+ gpe-conf | [] [] [] [] |
+ gpe-contacts | [] [] [] [] |
+ gpe-edit | [] [] [] |
+ gpe-filemanager | [] [] [] [] |
+ gpe-go | [] [] [] [] [] |
+ gpe-login | [] [] [] |
+ gpe-ownerinfo | [] [] [] [] [] |
+ gpe-package | [] [] [] |
+ gpe-sketchbook | [] [] [] [] |
+ gpe-su | [] [] [] [] [] [] |
+ gpe-taskmanager | [] [] [] [] [] |
+ gpe-timesheet | [] [] [] [] [] |
+ gpe-today | [] [] [] [] [] [] [] |
+ gpe-todo | [] [] [] |
+ gphoto2 | [] [] [] [] [] [] |
+ gprof | [] [] [] [] |
+ gpsdrive | [] [] [] |
+ gramadoir | [] [] [] |
+ grep | [] [] |
+ grub | [] [] [] [] |
+ gsasl | [] [] [] [] [] |
+ gss | [] [] [] [] [] |
+ gst-plugins-bad | [] [] [] [] [] [] |
+ gst-plugins-base | [] [] [] [] [] [] |
+ gst-plugins-good | [] [] [] [] [] [] |
+ gst-plugins-ugly | [] [] [] [] [] [] |
+ gstreamer | [] [] [] [] [] |
+ gtick | [] [] [] [] [] |
+ gtkam | [] [] [] [] [] |
+ gtkorphan | [] [] [] |
+ gtkspell | [] [] [] [] [] [] [] [] [] |
+ gutenprint | [] [] [] [] |
+ hello | [] [] [] |
+ help2man | [] [] |
+ hylafax | [] |
+ idutils | [] [] [] [] [] [] |
+ indent | [] [] [] [] [] [] [] [] |
+ iso_15924 | [] () [] [] |
+ iso_3166 | [] () [] [] [] [] [] [] [] [] [] [] |
+ iso_3166_2 | () [] [] [] |
+ iso_4217 | [] () [] [] [] [] |
+ iso_639 | [] () [] [] [] [] [] [] [] |
+ iso_639_3 | () [] [] |
+ jwhois | [] [] [] [] [] |
+ kbd | [] [] |
+ keytouch | [] [] [] [] [] [] |
+ keytouch-editor | [] [] [] [] [] |
+ keytouch-keyboa... | [] [] [] [] [] |
+ klavaro | [] [] |
+ latrine | [] [] [] |
+ ld | [] [] [] [] |
+ leafpad | [] [] [] [] [] [] [] () |
+ libc | [] [] [] [] [] |
+ libexif | [] |
+ libextractor | |
+ libgnutls | [] [] |
+ libgpewidget | [] [] [] [] |
+ libgpg-error | [] [] |
+ libgphoto2 | [] [] [] |
+ libgphoto2_port | [] [] [] |
+ libgsasl | [] [] [] [] [] |
+ libiconv | [] [] [] [] [] [] |
+ libidn | [] [] [] [] |
+ lifelines | () |
+ liferea | [] [] [] [] |
+ lilypond | [] [] |
+ linkdr | [] [] [] [] [] |
+ lordsawar | |
+ lprng | [] |
+ lynx | [] [] [] [] [] |
+ m4 | [] [] [] [] [] [] |
+ mailfromd | |
+ mailutils | [] [] |
+ make | [] [] [] [] [] [] [] [] [] |
+ man-db | [] [] |
+ man-db-manpages | [] |
+ minicom | [] [] [] [] [] |
+ mkisofs | [] [] [] [] |
+ myserver | |
+ nano | [] [] [] [] [] [] |
+ opcodes | [] [] [] [] |
+ parted | [] [] [] [] |
+ pies | |
+ popt | [] [] [] [] [] [] [] [] [] |
+ psmisc | [] [] [] |
+ pspp | |
+ pwdutils | [] [] |
+ radius | [] [] |
+ recode | [] [] [] [] [] [] [] [] |
+ rosegarden | () () () () () |
+ rpm | [] [] |
+ rush | |
+ sarg | [] |
+ screem | [] [] |
+ scrollkeeper | [] [] [] [] |
+ sed | [] [] [] [] [] [] [] [] |
+ sharutils | [] [] [] [] [] [] [] |
+ shishi | [] |
+ skencil | [] |
+ solfege | [] [] [] [] |
+ solfege-manual | [] [] |
+ soundtracker | [] [] |
+ sp | [] () |
+ sysstat | [] [] [] [] [] |
+ tar | [] [] [] [] [] [] [] |
+ texinfo | [] [] [] [] |
+ tin | [] |
+ unicode-han-tra... | |
+ unicode-transla... | [] [] |
+ util-linux-ng | [] [] [] [] [] [] |
+ vice | () () () |
+ vmm | [] |
+ vorbis-tools | [] |
+ wastesedge | () () |
+ wdiff | [] |
+ wget | [] [] [] [] [] [] [] [] |
+ wyslij-po | [] [] [] |
+ xchat | [] [] [] [] [] [] [] [] [] |
+ xdg-user-dirs | [] [] [] [] [] [] [] [] [] [] [] [] [] |
+ xkeyboard-config | [] [] [] [] [] |
+ +----------------------------------------------------+
+ fi fr ga gl gu he hi hr hu hy id is it ja ka kn
+ 105 121 53 20 4 8 3 5 53 2 120 5 84 67 0 4
+
+ ko ku ky lg lt lv mk ml mn mr ms mt nb nds ne
+ +-----------------------------------------------+
+ a2ps | [] |
+ aegis | |
+ ant-phone | |
+ anubis | [] [] |
+ aspell | [] |
+ bash | |
+ bfd | |
+ bibshelf | [] [] |
+ binutils | |
+ bison | [] |
+ bison-runtime | [] [] [] [] [] |
+ bluez-pin | [] [] [] [] [] |
+ bombono-dvd | |
+ buzztard | |
+ cflow | |
+ clisp | |
+ coreutils | [] |
+ cpio | |
+ cppi | |
+ cpplib | |
+ cryptsetup | |
+ dfarc | [] |
+ dialog | [] [] [] [] [] |
+ dico | |
+ diffutils | [] [] |
+ dink | |
+ doodle | |
+ e2fsprogs | |
+ enscript | |
+ exif | [] |
+ fetchmail | |
+ findutils | |
+ flex | |
+ freedink | [] |
+ gas | |
+ gawk | |
+ gcal | |
+ gcc | |
+ gettext-examples | [] [] [] [] |
+ gettext-runtime | [] |
+ gettext-tools | [] |
+ gip | [] [] |
+ gjay | |
+ gliv | |
+ glunarclock | [] |
+ gnubiff | |
+ gnucash | () () () () |
+ gnuedu | |
+ gnulib | |
+ gnunet | |
+ gnunet-gtk | |
+ gnutls | [] |
+ gold | |
+ gpe-aerial | [] |
+ gpe-beam | [] |
+ gpe-bluetooth | [] [] |
+ gpe-calendar | [] |
+ gpe-clock | [] [] [] [] [] |
+ gpe-conf | [] [] |
+ gpe-contacts | [] [] |
+ gpe-edit | [] |
+ gpe-filemanager | [] [] |
+ gpe-go | [] [] [] |
+ gpe-login | [] |
+ gpe-ownerinfo | [] [] |
+ gpe-package | [] [] |
+ gpe-sketchbook | [] [] |
+ gpe-su | [] [] [] [] [] [] |
+ gpe-taskmanager | [] [] [] [] [] [] |
+ gpe-timesheet | [] [] |
+ gpe-today | [] [] [] [] |
+ gpe-todo | [] [] |
+ gphoto2 | |
+ gprof | [] |
+ gpsdrive | |
+ gramadoir | |
+ grep | |
+ grub | |
+ gsasl | |
+ gss | |
+ gst-plugins-bad | [] [] [] [] |
+ gst-plugins-base | [] [] |
+ gst-plugins-good | [] [] |
+ gst-plugins-ugly | [] [] [] [] [] |
+ gstreamer | |
+ gtick | |
+ gtkam | [] |
+ gtkorphan | [] [] |
+ gtkspell | [] [] [] [] [] [] [] |
+ gutenprint | |
+ hello | [] [] [] |
+ help2man | |
+ hylafax | |
+ idutils | |
+ indent | |
+ iso_15924 | [] [] |
+ iso_3166 | [] [] () [] [] [] [] [] |
+ iso_3166_2 | |
+ iso_4217 | [] [] |
+ iso_639 | [] [] |
+ iso_639_3 | [] |
+ jwhois | [] |
+ kbd | |
+ keytouch | [] |
+ keytouch-editor | [] |
+ keytouch-keyboa... | [] |
+ klavaro | [] |
+ latrine | [] |
+ ld | |
+ leafpad | [] [] [] |
+ libc | [] |
+ libexif | |
+ libextractor | |
+ libgnutls | [] |
+ libgpewidget | [] [] |
+ libgpg-error | |
+ libgphoto2 | |
+ libgphoto2_port | |
+ libgsasl | |
+ libiconv | |
+ libidn | |
+ lifelines | |
+ liferea | |
+ lilypond | |
+ linkdr | |
+ lordsawar | |
+ lprng | |
+ lynx | |
+ m4 | |
+ mailfromd | |
+ mailutils | |
+ make | [] |
+ man-db | |
+ man-db-manpages | |
+ minicom | [] |
+ mkisofs | |
+ myserver | |
+ nano | [] [] |
+ opcodes | |
+ parted | |
+ pies | |
+ popt | [] [] [] |
+ psmisc | |
+ pspp | |
+ pwdutils | |
+ radius | |
+ recode | |
+ rosegarden | |
+ rpm | |
+ rush | |
+ sarg | |
+ screem | |
+ scrollkeeper | [] [] |
+ sed | |
+ sharutils | |
+ shishi | |
+ skencil | |
+ solfege | [] |
+ solfege-manual | |
+ soundtracker | |
+ sp | |
+ sysstat | [] |
+ tar | [] |
+ texinfo | [] |
+ tin | |
+ unicode-han-tra... | |
+ unicode-transla... | |
+ util-linux-ng | |
+ vice | |
+ vmm | |
+ vorbis-tools | |
+ wastesedge | |
+ wdiff | |
+ wget | [] |
+ wyslij-po | |
+ xchat | [] [] [] |
+ xdg-user-dirs | [] [] [] [] [] [] [] [] |
+ xkeyboard-config | [] [] [] |
+ +-----------------------------------------------+
+ ko ku ky lg lt lv mk ml mn mr ms mt nb nds ne
+ 20 5 10 1 13 48 4 2 2 4 24 10 20 3 1
+
+ nl nn or pa pl ps pt pt_BR ro ru rw sk sl sq sr
+ +---------------------------------------------------+
+ a2ps | [] [] [] [] [] [] [] [] |
+ aegis | [] [] [] |
+ ant-phone | [] [] |
+ anubis | [] [] [] |
+ aspell | [] [] [] [] [] |
+ bash | [] [] |
+ bfd | [] |
+ bibshelf | [] [] |
+ binutils | [] [] |
+ bison | [] [] [] |
+ bison-runtime | [] [] [] [] [] [] [] |
+ bluez-pin | [] [] [] [] [] [] [] [] |
+ bombono-dvd | [] () |
+ buzztard | [] [] |
+ cflow | [] |
+ clisp | [] [] |
+ coreutils | [] [] [] [] [] [] |
+ cpio | [] [] [] |
+ cppi | [] |
+ cpplib | [] |
+ cryptsetup | [] |
+ dfarc | [] |
+ dialog | [] [] [] [] |
+ dico | [] |
+ diffutils | [] [] [] [] [] [] |
+ dink | () |
+ doodle | [] [] |
+ e2fsprogs | [] [] |
+ enscript | [] [] [] [] [] |
+ exif | [] [] [] () [] |
+ fetchmail | [] [] [] [] |
+ findutils | [] [] [] [] [] |
+ flex | [] [] [] [] [] |
+ freedink | [] [] |
+ gas | |
+ gawk | [] [] [] [] |
+ gcal | |
+ gcc | [] |
+ gettext-examples | [] [] [] [] [] [] [] [] |
+ gettext-runtime | [] [] [] [] [] [] [] [] [] |
+ gettext-tools | [] [] [] [] [] [] |
+ gip | [] [] [] [] [] |
+ gjay | |
+ gliv | [] [] [] [] [] [] |
+ glunarclock | [] [] [] [] [] |
+ gnubiff | [] () |
+ gnucash | [] () () () |
+ gnuedu | [] |
+ gnulib | [] [] [] [] |
+ gnunet | |
+ gnunet-gtk | |
+ gnutls | [] [] |
+ gold | |
+ gpe-aerial | [] [] [] [] [] [] [] |
+ gpe-beam | [] [] [] [] [] [] [] |
+ gpe-bluetooth | [] [] |
+ gpe-calendar | [] [] [] [] |
+ gpe-clock | [] [] [] [] [] [] [] [] |
+ gpe-conf | [] [] [] [] [] [] [] |
+ gpe-contacts | [] [] [] [] [] |
+ gpe-edit | [] [] [] |
+ gpe-filemanager | [] [] [] |
+ gpe-go | [] [] [] [] [] [] [] [] |
+ gpe-login | [] [] |
+ gpe-ownerinfo | [] [] [] [] [] [] [] [] |
+ gpe-package | [] [] |
+ gpe-sketchbook | [] [] [] [] [] [] [] |
+ gpe-su | [] [] [] [] [] [] [] [] |
+ gpe-taskmanager | [] [] [] [] [] [] [] [] |
+ gpe-timesheet | [] [] [] [] [] [] [] [] |
+ gpe-today | [] [] [] [] [] [] [] [] |
+ gpe-todo | [] [] [] [] [] |
+ gphoto2 | [] [] [] [] [] [] [] [] |
+ gprof | [] [] [] |
+ gpsdrive | [] [] |
+ gramadoir | [] [] |
+ grep | [] [] [] [] |
+ grub | [] [] [] |
+ gsasl | [] [] [] [] |
+ gss | [] [] [] |
+ gst-plugins-bad | [] [] [] [] [] [] |
+ gst-plugins-base | [] [] [] [] [] |
+ gst-plugins-good | [] [] [] [] [] |
+ gst-plugins-ugly | [] [] [] [] [] [] |
+ gstreamer | [] [] [] [] [] |
+ gtick | [] [] [] |
+ gtkam | [] [] [] [] [] [] |
+ gtkorphan | [] |
+ gtkspell | [] [] [] [] [] [] [] [] [] [] |
+ gutenprint | [] [] |
+ hello | [] [] [] [] |
+ help2man | [] [] |
+ hylafax | [] |
+ idutils | [] [] [] [] [] |
+ indent | [] [] [] [] [] [] [] |
+ iso_15924 | [] [] [] [] |
+ iso_3166 | [] [] [] [] [] () [] [] [] [] [] [] [] [] |
+ iso_3166_2 | [] [] [] |
+ iso_4217 | [] [] [] [] [] [] [] [] |
+ iso_639 | [] [] [] [] [] [] [] [] [] |
+ iso_639_3 | [] [] |
+ jwhois | [] [] [] [] |
+ kbd | [] [] [] |
+ keytouch | [] [] [] |
+ keytouch-editor | [] [] [] |
+ keytouch-keyboa... | [] [] [] |
+ klavaro | [] [] |
+ latrine | [] [] |
+ ld | |
+ leafpad | [] [] [] [] [] [] [] [] [] |
+ libc | [] [] [] [] |
+ libexif | [] [] () [] |
+ libextractor | |
+ libgnutls | [] [] |
+ libgpewidget | [] [] [] |
+ libgpg-error | [] [] |
+ libgphoto2 | [] [] |
+ libgphoto2_port | [] [] [] [] [] |
+ libgsasl | [] [] [] [] [] |
+ libiconv | [] [] [] [] [] |
+ libidn | [] [] |
+ lifelines | [] [] |
+ liferea | [] [] [] [] [] () () [] |
+ lilypond | [] |
+ linkdr | [] [] [] |
+ lordsawar | |
+ lprng | [] |
+ lynx | [] [] [] |
+ m4 | [] [] [] [] [] |
+ mailfromd | [] |
+ mailutils | [] |
+ make | [] [] [] [] |
+ man-db | [] [] [] |
+ man-db-manpages | [] [] [] |
+ minicom | [] [] [] [] |
+ mkisofs | [] [] [] |
+ myserver | |
+ nano | [] [] [] [] |
+ opcodes | [] [] |
+ parted | [] [] [] [] |
+ pies | [] |
+ popt | [] [] [] [] |
+ psmisc | [] [] [] |
+ pspp | [] [] |
+ pwdutils | [] |
+ radius | [] [] [] |
+ recode | [] [] [] [] [] [] [] [] |
+ rosegarden | () () |
+ rpm | [] [] [] |
+ rush | [] [] |
+ sarg | |
+ screem | |
+ scrollkeeper | [] [] [] [] [] [] [] [] |
+ sed | [] [] [] [] [] [] [] [] [] |
+ sharutils | [] [] [] [] |
+ shishi | [] |
+ skencil | [] [] |
+ solfege | [] [] [] [] |
+ solfege-manual | [] [] [] |
+ soundtracker | [] |
+ sp | |
+ sysstat | [] [] [] [] |
+ tar | [] [] [] [] |
+ texinfo | [] [] [] [] |
+ tin | [] |
+ unicode-han-tra... | |
+ unicode-transla... | |
+ util-linux-ng | [] [] [] [] [] |
+ vice | [] |
+ vmm | [] |
+ vorbis-tools | [] [] |
+ wastesedge | [] |
+ wdiff | [] [] |
+ wget | [] [] [] [] [] [] [] |
+ wyslij-po | [] [] [] |
+ xchat | [] [] [] [] [] [] [] [] [] |
+ xdg-user-dirs | [] [] [] [] [] [] [] [] [] [] [] [] [] [] |
+ xkeyboard-config | [] [] [] |
+ +---------------------------------------------------+
+ nl nn or pa pl ps pt pt_BR ro ru rw sk sl sq sr
+ 135 10 4 7 105 1 29 62 47 91 3 54 46 9 37
- tg th tk tr uk ven vi wa xh zh_CN zh_HK zh_TW zu
+ sv sw ta te tg th tr uk vi wa zh_CN zh_HK zh_TW
+---------------------------------------------------+
- Compendium | [] [] [] [] | 19
- a2ps | [] [] [] | 19
- aegis | [] | 1
- ant-phone | [] [] | 6
- anubis | [] [] [] | 11
- ap-utils | () [] | 4
- aspell | [] [] [] | 16
- bash | [] | 6
- bfd | | 2
- bibshelf | [] | 7
- binutils | [] [] [] [] | 9
- bison | [] [] [] [] | 20
- bison-runtime | [] [] [] [] | 18
- bluez-pin | [] [] [] [] [] [] | 28
- cflow | [] [] | 5
- clisp | | 9
- console-tools | [] [] | 5
- coreutils | [] [] [] | 18
- cpio | [] [] [] [] | 11
- cpplib | [] [] [] [] [] | 12
- cryptonit | [] | 6
- dialog | [] [] [] | 9
- diffutils | [] [] [] [] [] | 29
- doodle | [] | 6
- e2fsprogs | [] [] | 10
- enscript | [] [] [] | 16
- fetchmail | [] [] | 12
- findutils | [] [] [] | 11
- findutils_stable | [] [] [] [] | 18
- flex | [] [] | 15
- fslint | [] | 2
- gas | [] | 3
- gawk | [] [] [] | 16
- gcal | [] | 5
- gcc | [] [] [] | 7
- gettext-examples | [] [] [] [] [] [] | 29
- gettext-runtime | [] [] [] [] [] [] | 28
- gettext-tools | [] [] [] [] [] | 20
- gip | [] [] | 13
- gliv | [] [] | 11
- glunarclock | [] [] [] | 15
- gmult | [] [] [] [] | 16
- gnubiff | [] | 2
- gnucash | () [] | 5
- gnuedu | [] | 2
- gnulib | [] | 10
- gnunet | | 0
- gnunet-gtk | [] [] | 3
- gnutls | | 4
- gpe-aerial | [] [] | 14
- gpe-beam | [] [] | 14
- gpe-calendar | [] [] | 7
- gpe-clock | [] [] [] [] | 21
- gpe-conf | [] [] [] | 16
- gpe-contacts | [] [] | 10
- gpe-edit | [] [] [] [] [] | 22
- gpe-filemanager | [] [] | 7
- gpe-go | [] [] [] [] | 19
- gpe-login | [] [] [] [] [] | 21
- gpe-ownerinfo | [] [] [] [] | 21
- gpe-package | [] | 6
- gpe-sketchbook | [] [] | 16
- gpe-su | [] [] [] [] | 21
- gpe-taskmanager | [] [] [] [] | 21
- gpe-timesheet | [] [] [] [] | 18
- gpe-today | [] [] [] [] [] | 21
- gpe-todo | [] [] | 8
- gphoto2 | [] [] [] [] | 21
- gprof | [] [] | 13
- gpsdrive | [] | 5
- gramadoir | [] | 7
- grep | [] | 12
- gretl | | 6
- gsasl | [] [] [] | 9
- gss | [] | 7
- gst-plugins-bad | [] [] [] | 13
- gst-plugins-base | [] [] | 11
- gst-plugins-good | [] [] [] [] [] | 16
- gst-plugins-ugly | [] [] [] | 13
- gstreamer | [] [] [] | 18
- gtick | [] [] | 7
- gtkam | [] | 16
- gtkorphan | [] | 7
- gtkspell | [] [] [] [] [] [] | 27
- gutenprint | | 4
- hello | [] [] [] [] [] | 38
- herrie | [] [] | 8
- hylafax | | 0
- idutils | [] [] | 15
- indent | [] [] [] [] [] | 28
- iso_15924 | [] [] | 4
- iso_3166 | [] [] [] [] [] [] [] [] [] | 54
- iso_3166_2 | [] [] | 4
- iso_4217 | [] [] [] [] [] | 24
- iso_639 | [] [] [] [] [] | 26
- jpilot | [] [] [] [] | 7
- jtag | [] | 3
- jwhois | [] [] [] | 13
- kbd | [] [] [] | 13
- keytouch | [] | 8
- keytouch-editor | [] | 5
- keytouch-keyboa... | [] | 5
- latrine | [] [] | 5
- ld | [] [] [] [] | 10
- leafpad | [] [] [] [] [] | 24
- libc | [] [] [] | 19
- libexif | [] | 5
- libextractor | [] | 5
- libgpewidget | [] [] [] | 20
- libgpg-error | [] | 6
- libgphoto2 | [] [] | 9
- libgphoto2_port | [] [] [] | 11
- libgsasl | [] | 8
- libiconv | [] [] | 11
- libidn | [] [] | 11
- lifelines | | 4
- lilypond | [] | 6
- lingoteach | [] | 6
- lprng | [] | 2
- lynx | [] [] [] | 15
- m4 | [] [] [] | 18
- mailfromd | [] [] | 3
- mailutils | [] [] | 8
- make | [] [] [] | 20
- man-db | [] | 9
- minicom | [] | 14
- nano | [] [] [] | 20
- opcodes | [] [] | 10
- parted | [] [] [] | 11
- pilot-qof | [] | 1
- popt | [] [] [] [] | 18
- psmisc | [] [] | 10
- pwdutils | [] | 3
- qof | [] | 4
- radius | [] [] | 7
- recode | [] [] [] | 25
- rpm | [] [] [] [] | 13
- screem | [] | 2
- scrollkeeper | [] [] [] [] | 26
- sed | [] [] [] [] | 23
- shared-mime-info | [] [] [] | 29
- sharutils | [] [] [] | 23
- shishi | [] | 3
- skencil | [] | 7
- solfege | [] | 3
- soundtracker | [] [] | 9
- sp | [] | 3
- system-tools-ba... | [] [] [] [] [] [] [] | 38
- tar | [] [] [] | 17
- texinfo | [] [] [] | 15
- tin | | 1
- tuxpaint | [] [] [] | 19
+ a2ps | [] [] [] [] [] | 27
+ aegis | [] | 9
+ ant-phone | [] [] [] [] | 9
+ anubis | [] [] [] [] | 15
+ aspell | [] [] [] | 20
+ bash | [] [] [] | 12
+ bfd | [] | 6
+ bibshelf | [] [] [] | 16
+ binutils | [] [] | 8
+ bison | [] [] | 12
+ bison-runtime | [] [] [] [] [] [] | 29
+ bluez-pin | [] [] [] [] [] [] [] [] | 37
+ bombono-dvd | [] | 4
+ buzztard | [] | 7
+ cflow | [] [] [] | 9
+ clisp | | 10
+ coreutils | [] [] [] [] | 22
+ cpio | [] [] [] [] [] [] | 13
+ cppi | [] [] | 5
+ cpplib | [] [] [] [] [] [] | 14
+ cryptsetup | [] [] | 7
+ dfarc | [] | 9
+ dialog | [] [] [] [] [] [] [] | 30
+ dico | [] | 2
+ diffutils | [] [] [] [] [] [] | 30
+ dink | | 4
+ doodle | [] [] | 7
+ e2fsprogs | [] [] [] | 11
+ enscript | [] [] [] [] | 17
+ exif | [] [] [] | 16
+ fetchmail | [] [] [] | 17
+ findutils | [] [] [] [] [] | 20
+ flex | [] [] [] [] | 15
+ freedink | [] | 10
+ gas | [] | 4
+ gawk | [] [] [] [] | 18
+ gcal | [] [] | 5
+ gcc | [] [] [] | 7
+ gettext-examples | [] [] [] [] [] [] [] | 34
+ gettext-runtime | [] [] [] [] [] [] [] | 29
+ gettext-tools | [] [] [] [] [] [] | 22
+ gip | [] [] [] [] | 22
+ gjay | [] | 3
+ gliv | [] [] [] | 14
+ glunarclock | [] [] [] [] [] | 19
+ gnubiff | [] [] | 4
+ gnucash | () [] () [] () | 10
+ gnuedu | [] [] | 7
+ gnulib | [] [] [] [] | 16
+ gnunet | [] | 1
+ gnunet-gtk | [] [] [] | 5
+ gnutls | [] [] [] | 10
+ gold | [] | 4
+ gpe-aerial | [] [] [] | 18
+ gpe-beam | [] [] [] | 19
+ gpe-bluetooth | [] [] [] | 13
+ gpe-calendar | [] [] [] [] | 12
+ gpe-clock | [] [] [] [] [] | 28
+ gpe-conf | [] [] [] [] | 20
+ gpe-contacts | [] [] [] | 17
+ gpe-edit | [] [] [] | 12
+ gpe-filemanager | [] [] [] [] | 16
+ gpe-go | [] [] [] [] [] | 25
+ gpe-login | [] [] [] | 11
+ gpe-ownerinfo | [] [] [] [] [] | 25
+ gpe-package | [] [] [] | 13
+ gpe-sketchbook | [] [] [] | 20
+ gpe-su | [] [] [] [] [] | 30
+ gpe-taskmanager | [] [] [] [] [] | 29
+ gpe-timesheet | [] [] [] [] [] | 25
+ gpe-today | [] [] [] [] [] [] | 30
+ gpe-todo | [] [] [] [] | 17
+ gphoto2 | [] [] [] [] [] | 24
+ gprof | [] [] [] | 15
+ gpsdrive | [] [] [] | 11
+ gramadoir | [] [] [] | 11
+ grep | [] [] [] | 10
+ grub | [] [] [] | 14
+ gsasl | [] [] [] [] | 14
+ gss | [] [] [] | 11
+ gst-plugins-bad | [] [] [] [] | 26
+ gst-plugins-base | [] [] [] [] [] | 24
+ gst-plugins-good | [] [] [] [] | 24
+ gst-plugins-ugly | [] [] [] [] [] | 29
+ gstreamer | [] [] [] [] | 22
+ gtick | [] [] [] | 13
+ gtkam | [] [] [] | 20
+ gtkorphan | [] [] [] | 14
+ gtkspell | [] [] [] [] [] [] [] [] [] | 45
+ gutenprint | [] | 10
+ hello | [] [] [] [] [] [] | 21
+ help2man | [] [] | 7
+ hylafax | [] | 5
+ idutils | [] [] [] [] | 17
+ indent | [] [] [] [] [] [] | 30
+ iso_15924 | () [] () [] [] | 16
+ iso_3166 | [] [] () [] [] () [] [] [] () | 53
+ iso_3166_2 | () [] () [] | 9
+ iso_4217 | [] () [] [] () [] [] | 26
+ iso_639 | [] [] [] () [] () [] [] [] [] | 38
+ iso_639_3 | [] () | 8
+ jwhois | [] [] [] [] [] | 16
+ kbd | [] [] [] [] [] | 15
+ keytouch | [] [] [] | 16
+ keytouch-editor | [] [] [] | 14
+ keytouch-keyboa... | [] [] [] | 14
+ klavaro | [] | 11
+ latrine | [] [] [] | 10
+ ld | [] [] [] [] | 11
+ leafpad | [] [] [] [] [] [] | 33
+ libc | [] [] [] [] [] | 21
+ libexif | [] () | 7
+ libextractor | [] | 1
+ libgnutls | [] [] [] | 9
+ libgpewidget | [] [] [] | 14
+ libgpg-error | [] [] [] | 9
+ libgphoto2 | [] [] | 8
+ libgphoto2_port | [] [] [] [] | 14
+ libgsasl | [] [] [] | 13
+ libiconv | [] [] [] [] | 21
+ libidn | () [] [] | 11
+ lifelines | [] | 4
+ liferea | [] [] [] | 21
+ lilypond | [] | 7
+ linkdr | [] [] [] [] [] | 17
+ lordsawar | | 1
+ lprng | [] | 3
+ lynx | [] [] [] [] | 17
+ m4 | [] [] [] [] | 19
+ mailfromd | [] [] | 3
+ mailutils | [] | 5
+ make | [] [] [] [] | 21
+ man-db | [] [] [] | 8
+ man-db-manpages | | 4
+ minicom | [] [] | 16
+ mkisofs | [] [] | 9
+ myserver | | 0
+ nano | [] [] [] [] | 21
+ opcodes | [] [] [] | 11
+ parted | [] [] [] [] [] | 15
+ pies | [] [] | 3
+ popt | [] [] [] [] [] [] | 27
+ psmisc | [] [] | 11
+ pspp | | 4
+ pwdutils | [] [] | 6
+ radius | [] [] | 9
+ recode | [] [] [] [] | 28
+ rosegarden | () | 0
+ rpm | [] [] [] | 11
+ rush | [] [] | 4
+ sarg | | 1
+ screem | [] | 3
+ scrollkeeper | [] [] [] [] [] | 27
+ sed | [] [] [] [] [] | 30
+ sharutils | [] [] [] [] [] | 22
+ shishi | [] | 3
+ skencil | [] [] | 7
+ solfege | [] [] [] [] | 16
+ solfege-manual | [] | 8
+ soundtracker | [] [] [] | 9
+ sp | [] | 3
+ sysstat | [] [] | 15
+ tar | [] [] [] [] [] [] | 23
+ texinfo | [] [] [] [] [] | 17
+ tin | | 4
unicode-han-tra... | | 0
unicode-transla... | | 2
- util-linux | [] [] [] | 20
- util-linux-ng | [] [] [] | 20
- vorbis-tools | [] [] | 4
- wastesedge | | 1
- wdiff | [] [] | 23
- wget | [] [] [] | 20
- xchat | [] [] [] [] | 29
- xkeyboard-config | [] [] [] | 14
- xpad | [] [] [] | 15
+ util-linux-ng | [] [] [] [] | 20
+ vice | () () | 1
+ vmm | [] | 4
+ vorbis-tools | [] | 6
+ wastesedge | | 2
+ wdiff | [] [] | 7
+ wget | [] [] [] [] [] | 26
+ wyslij-po | [] [] | 8
+ xchat | [] [] [] [] [] [] | 36
+ xdg-user-dirs | [] [] [] [] [] [] [] [] [] [] | 63
+ xkeyboard-config | [] [] [] | 22
+---------------------------------------------------+
- 76 teams tg th tk tr uk ven vi wa xh zh_CN zh_HK zh_TW zu
- 163 domains 0 3 1 74 51 0 143 21 1 57 7 45 0 2036
+ 85 teams sv sw ta te tg th tr uk vi wa zh_CN zh_HK zh_TW
+ 178 domains 119 1 3 3 0 10 65 51 155 17 98 7 41 2618
Some counters in the preceding matrix are higher than the number of
visible blocks let us expect. This is because a few extra PO files are
@@ -1042,12 +1256,12 @@ distributed as such by its maintainer. There might be an observable
lag between the mere existence a PO file and its wide availability in a
distribution.
- If November 2007 seems to be old, you may fetch a more recent copy
-of this `ABOUT-NLS' file on most GNU archive sites. The most
-up-to-date matrix with full percentage details can be found at
+ If June 2010 seems to be old, you may fetch a more recent copy of
+this `ABOUT-NLS' file on most GNU archive sites. The most up-to-date
+matrix with full percentage details can be found at
`http://translationproject.org/extra/matrix.html'.
-1.6 Using `gettext' in new packages
+1.5 Using `gettext' in new packages
===================================
If you are writing a freely available program and want to
diff --git a/AUTHORS b/AUTHORS
index 4474df9..38604a7 100644
--- a/AUTHORS
+++ b/AUTHORS
@@ -1,5 +1,8 @@
GNU Sed was first authored by Jay Fenlason (hack@gnu.org)
and later modified by Tom Lord (lord@gnu.org).
-It is currently being maintained by Ken Pizzini (ken@gnu.org)
-and Paolo Bonzini (bonzini@gnu.org).
+Ken Pizzini (ken@gnu.org) and Paolo Bonzini (bonzini@gnu.org)
+took over and maintained it for many years.
+
+GNU Sed is currently being maintained by Jim Meyering (jim@meyering.net)
+and Assaf Gordon (agn@gnu.org).
diff --git a/BUGS b/BUGS
index 138f3cd..0d95ad4 100644
--- a/BUGS
+++ b/BUGS
@@ -9,9 +9,9 @@ include in the Subject: header the first line of the output of
Please do not send a bug report like this:
- [while building frobme-1.3.4]
- $ configure
- sed: file sedscr line 1: Unknown option to 's'
+ [while building frobme-1.3.4]
+ $ configure
+ sed: file sedscr line 1: Unknown option to 's'
If sed doesn't configure your favorite package, take a few extra
minutes to identify the specific problem and make a stand-alone test
@@ -76,7 +76,7 @@ regex syntax clashes (problems with backslashes)
In short, `sed d -i' will let one delete the contents of
a read-only file, and in general the `-i' option will let
one clobber protected files. This is not a bug, but rather a
- consequence of how the Unix filesystem works.
+ consequence of how the Unix file system works.
The permissions on a file say what can happen to the data
in that file, while the permissions on a directory say what can
@@ -130,4 +130,3 @@ regex syntax clashes (problems with backslashes)
in shell scripts, you can set the LC_ALL environment variable to `C',
or set the locale on a more fine-grained basis with the other LC_*
environment variables.
-
diff --git a/COPYING b/COPYING
index 4432540..94a9ed0 100644
--- a/COPYING
+++ b/COPYING
@@ -1,12 +1,11 @@
-
- GNU GENERAL PUBLIC LICENSE
- Version 3, 29 June 2007
+ GNU GENERAL PUBLIC LICENSE
+ Version 3, 29 June 2007
Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
- Preamble
+ Preamble
The GNU General Public License is a free, copyleft license for
software and other kinds of works.
@@ -69,7 +68,7 @@ patents cannot be used to render the program non-free.
The precise terms and conditions for copying, distribution and
modification follow.
- TERMS AND CONDITIONS
+ TERMS AND CONDITIONS
0. Definitions.
@@ -77,7 +76,7 @@ modification follow.
"Copyright" also means copyright-like laws that apply to other kinds of
works, such as semiconductor masks.
-
+
"The Program" refers to any copyrightable work licensed under this
License. Each licensee is addressed as "you". "Licensees" and
"recipients" may be individuals or organizations.
@@ -510,7 +509,7 @@ actual knowledge that, but for the patent license, your conveying the
covered work in a country, or your recipient's use of the covered work
in a country, would infringe one or more identifiable patents in that
country that you have reason to believe are valid.
-
+
If, pursuant to or in connection with a single transaction or
arrangement, you convey, or propagate by procuring conveyance of, a
covered work, and grant a patent license to some of the parties
@@ -619,9 +618,9 @@ an absolute waiver of all civil liability in connection with the
Program, unless a warranty or assumption of liability accompanies a
copy of the Program in return for a fee.
- END OF TERMS AND CONDITIONS
+ END OF TERMS AND CONDITIONS
- How to Apply These Terms to Your New Programs
+ How to Apply These Terms to Your New Programs
If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
@@ -673,4 +672,3 @@ 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>.
-
diff --git a/COPYING.DOC b/COPYING.DOC
index 2f7e03c..ea854f0 100644
--- a/COPYING.DOC
+++ b/COPYING.DOC
@@ -401,19 +401,19 @@ public wiki that anybody can edit is an example of such a server. A
"Massive Multiauthor Collaboration" (or "MMC") contained in the site
means any set of copyrightable works thus published on the MMC site.
-"CC-BY-SA" means the Creative Commons Attribution-Share Alike 3.0
-license published by Creative Commons Corporation, a not-for-profit
-corporation with a principal place of business in San Francisco,
-California, as well as future copyleft versions of that license
+"CC-BY-SA" means the Creative Commons Attribution-Share Alike 3.0
+license published by Creative Commons Corporation, a not-for-profit
+corporation with a principal place of business in San Francisco,
+California, as well as future copyleft versions of that license
published by that same organization.
-"Incorporate" means to publish or republish a Document, in whole or in
+"Incorporate" means to publish or republish a Document, in whole or in
part, as part of another Document.
-An MMC is "eligible for relicensing" if it is licensed under this
-License, and if all works that were first published under this License
-somewhere other than this MMC, and subsequently incorporated in whole or
-in part into the MMC, (1) had no cover texts or invariant sections, and
+An MMC is "eligible for relicensing" if it is licensed under this
+License, and if all works that were first published under this License
+somewhere other than this MMC, and subsequently incorporated in whole or
+in part into the MMC, (1) had no cover texts or invariant sections, and
(2) were thus incorporated prior to November 1, 2008.
The operator of an MMC Site may republish an MMC contained in the site
diff --git a/ChangeLog b/ChangeLog
index 83109e7..441f929 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3523 +1,1645 @@
-2012-12-21 Paolo Bonzini <bonzini@gnu.org>
+2016-12-30 Jim Meyering <meyering@fb.com>
- * configure.ac: Bump version number. Replace COPYRIGHT_YEAR.
- * Makefile.am (dist-hook): Revert 2010-08-10 change.
+ version 4.3
+ * NEWS: Record release date.
-2012-12-21 Paolo Bonzini <bonzini@gnu.org>
+ gnulib: update to latest, to fix parallel getopt test failure
- * autoboot: Rename to bootstrap.
- * autoboot.conf: Rename to bootstrap.conf.
- * README.boot: Remove.
- * Makefile.am: Remove README.boot, add bootstrap and bootstrap.conf.
+2016-12-28 Assaf Gordon <assafgordon@gmail.com>
-2012-12-21 Paolo Bonzini <bonzini@gnu.org>
+ doc: new annotated example for N/P/D/b commands
+ Illustrates how to restructure line breaks over multiple lines.
- * gnulib: Update.
- * testsuite/version.gin: Regenerate.
+ * doc/sed.texi (Line length adjustment): New section.
-2012-12-21 Paolo Bonzini <bonzini@gnu.org>
+2016-12-28 Assaf Gordon <assafgordon@gmail.com>
- * doc/sed.texi: Regenerate.
- * doc/sed.1: Regenerate.
- * po/sed.pot: Regenerate.
-
-2012-07-25 Paolo Bonzini <bonzini@gnu.org>
-
- * doc/sed-in.texi: Document difference between "e" and "r"
- commands.
-
-2012-04-29 Jim Hill <gjthill@gmail.com>
-
- * Makefile.am (noinst_DATA, dist-hook): build failed after git
- clean -dfx finish bootstrap.sh removal.
-
-2012-04-13 Paolo Bonzini <bonzini@gnu.org>
-
- * sed/compile.c (convert_number): Remove default_char argument,
- expect buf to point to it. Remove maxdigits argument and compute
- it on the fly.
- (normalize_text): Unify calls to convert_number under the convert
- label. For TEXT_REPLACEMENT add a backslash to the output if
- convert_number returns ch == '&'.
-
-2012-03-16 Paolo Bonzini <bonzini@gnu.org>
-
- * testsuite/version.gin: Regenerate.
-
-2012-03-16 Paolo Bonzini <bonzini@gnu.org>
-
- * basicdefs.h (P_): Remove.
- * sed/compile.c: Adjust.
- * sed/execute.c: Likewise.
- * sed/fmt.c: Likewise.
- * sed/sed.c: Likewise.
- * sed/sed.h: Likewise.
- * sed/utils.c: Likewise.
- * sed/utils.h: Likewise.
-
-2012-03-16 Paolo Bonzini <bonzini@gnu.org>
-
- * basicdefs.h (FREE): Remove.
- * sed/compile.c: Adjust.
- * sed/execute.c: Adjust.
- * sed/regexp.c: Adjust.
- * sed/utils.c: Adjust, remove ck_free.
- * sed/utils.h: Adjust, remove ck_free.
-
-2012-03-16 Paolo Bonzini <bonzini@gnu.org>
-
- * basicdefs.h (CAST, VCAST, VOID, MEMCPY, MEMMOVE): Rip out.
- * sed/compile.c: Adjust.
- * sed/execute.c: Adjust.
- * sed/regexp.c: Adjust.
- * sed/utils.c: Adjust.
- * sed/utils.h: Adjust.
-
-2012-03-16 Paolo Bonzini <bonzini@gnu.org>
-
- * sed/execute.c: Unconditionally compile for MBCS.
- * sed/mbcs.c: Unconditionally compile for MBCS.
- * sed/sed.h: Unconditionally compile for MBCS.
-
-2012-03-16 Paolo Bonzini <bonzini@gnu.org>
-
- * basicdefs.h: Enjoy gnulib's headers.
- * sed/compile.c: Likewise.
- * sed/execute.c: Likewise.
- * sed/regexp.c: Likewise.
- * sed/sed.c: Likewise.
- * sed/sed.h: Likewise.
- * sed/utils.c: Likewise.
-
-2012-03-16 Paolo Bonzini <bonzini@gnu.org>
-
- * bootstrap.sh.in: Remove.
- * bootstrap.sh: Remove.
- * configure.ac: Do not create bootstrap.sh.
- * basicdefs.h: Remove guards.
- * sed/execute.c [BOOTSTRAP]: Remove guards.
- * sed/sed.c [BOOTSTRAP]: Remove guards.
- * sed/sed.h [BOOTSTRAP]: Remove guards.
-
-2012-03-16 Paolo Bonzini <bonzini@gnu.org>
-
- * gnulib: Update.
-
-2012-03-16 Paolo Bonzini <bonzini@gnu.org>
-
- * doc/sed.x: Document address behavior across input files.
- * doc/sed.1: Regenerate.
-
-2012-02-13 Paolo Bonzini <bonzini@gnu.org>
-
- * configure.ac: Test whether fopen("foo", "rt") works.
- * sed/compile.c: Do not open scripts with "rt" mode if it doesn't.
- * sed/sed.c: Never open input files with "rt" mode.
-
-2012-02-05 Paolo Bonzini <bonzini@gnu.org>
- Jim Hill <gjthill@gmail.com>
-
- * autoboot.conf: Change getline to getdelim.
- * doc/sed-in.texi: Document -z/--null-data.
- * doc/sed.texi: Regenerate.
- * doc/sed.1: Regenerate.
- * sed/execute.c: Change '\n' to buffer_delimiter.
- * sed/sed.c: Add support for -z/--null-data.
- * sed/sed.h: Add buffer_delimiter.
- * sed/utils.c: Change ck_getline to ck_getdelim.
- * sed/utils.h: Change ck_getline to ck_getdelim.
- * NEWS: Document new option.
-
-2011-11-23 Paolo Bonzini <bonzini@gnu.org>
-
- * doc/sed-in.texi: Document how multiline mode affects matching
- newlines against period. Reported by Dmitry Bolshakov.
-
-2011-08-29 Paolo Bonzini <bonzini@gnu.org>
-
- * sed/sed.c (usage): Fix documentation for -i. Reported by
- Dennis Bartlett.
+ doc: new annotated example section for N/D commands
+ Illustrate how to use N/D to search for doubled-word spanning
+ multiple lines.
-2011-07-11 Jim Meyering <meyering@redhat.com>
+ * doc/sed.texi (Text search across mutliple lines): New section.
- avoid silent data loss when an input line is 2^31 bytes or longer
- If one line in a file has length (including newline) of 2^31, then
- applying sed -i to that file truncates it to size 0. I first
- noticed it like this: Create a file with line of length 2^31-1
- $ perl -le 'print "v"x(2**31-1)' > k
- Then prepend a byte to that line:
- $ sed -i 's/^/v/' k
- Surprise! The file is empty.
- * sed/utils.c (ck_getline): Declare "result" to be of type ssize_t,
- rather than int, to match the return type of getline.
+2016-12-28 Assaf Gordon <assafgordon@gmail.com>
-2011-07-14 Padraig Brady <p@draigbrady.com>
+ doc: add 'multiline techniques' section
+ Expand on using D,G,H,N,P commands to process multiple lines.
- * execute.c (open_next_file): Only reopen stdin on Windows/DOS.
+ * doc/sed.texi (Multiline techniques): New section.
-2011-05-27 Paolo Bonzini <bonzini@gnu.org>
+2016-12-22 Assaf Gordon <assafgordon@gmail.com>
- * doc/sed-in.texi: Explain behavior of \l and \u at the end
- of the replacement text.
- * doc/sed.texi: Regenerate.
- * sed/execute.c (append_replacement, do_subst): Further
- simplification.
-
-2011-05-27 Paolo Bonzini <bonzini@gnu.org>
-
- * doc/sed-in.texi: Fix incorrect comment in the "Increment a
- number" example. Reported by Wu Liang and Micah Cowan.
- * doc/sed.texi: Regenerate.
-
-2011-03-11 Paolo Bonzini <bonzini@gnu.org>
-
- * sed/compile.c (normalize_text): Clang analyzer cleanup.
- * sed/execute.c (append_replacement, do_subst): Same.
- * sed/utils.c (ck_getline): Same.
-
-2010-11-13 Jari Aalto <jari.aalto@cante.net>
-
- * doc/sed.x: Order commands alphabetically.
- * doc/sed.1: Regenerate.
- * doc/sed.texi: Regenerate.
-
-2010-11-10 Paolo Bonzini <bonzini@gnu.org>
-
- * doc/sed-in.texi: Fix double negation in comment, escape
- file names.
-
-2010-11-03 Eric Blake <eblake@redhat.com>
-
- * basicdefs.h (ISDIGIT): Avoid compiler warning on cygwin.
- * sed/compile.c (normalize_text): Avoid undefined behavior.
-
- * sed/sed.c (includes): Supply missing header.
-
-2010-11-01 Paolo Bonzini <bonzini@gnu.org>
-
- * autoboot.conf: Replace gettext with gettext-h. Suggested by
- Gerald Pfeifer and Eric Blake.
- * configure.ac: Downgrade minimum requested version of gettext
- to 0.17.
-
-2010-10-31 Gerald Pfeifer <gerald@pfeifer.com>
-
- * doc/sed-in.texi (Extended regexps): Add '|' to the list of
- differences. Note that "\|" is a GNU extension to begin with.
- * doc/sed.texi: Rebuild.
-
-2010-10-20 Paolo Bonzini <bonzini@gnu.org>
-
- * autoboot.conf: Add fwriting.
- * sed/utils.c: Use it.
-
-2010-09-20 Paolo Bonzini <bonzini@gnu.org>
-
- * doc/configure.ac: Mention bug-sed@gnu.org.
- * doc/sed.x: Mention bug-sed@gnu.org.
- * doc/sed-in.texi: Mention bug-sed@gnu.org.
-
-2010-08-30 Paolo Bonzini <bonzini@gnu.org>
+ maint: update m4/.gitignore
+ * m4/.gitignore: Add 'dirfd.m4', 'hard-locale.m4'.
- * Makefile.am (dist-hook): Remove COPYRIGHT_YEAR check.
- * autoboot.conf (gnulib_modules): Add version-etc-fsf.
- * configure.ac (COPYRIGHT_YEAR): Remove. Change package name to
- "GNU sed".
- * doc/sed.1: Regenerate.
- * sed/sed.c (AUTHORS): New.
- (main): Use version_etc.
+2016-12-20 Jim Meyering <meyering@fb.com>
-2010-07-18 Paolo Bonzini <bonzini@gnu.org>
+ maint: RE_ICASE, RE_NO_SUB: remove useless '#ifdef's
+ * sed/regexp.c (compile_regex_1): Remove #ifdef RE_ICASE guard,
+ since dfa.c uses it unconditionally. Suggested by Norihiro Tanaka.
+ Also remove the nearby "#ifdef RE_NO_SUB". Those macros are guaranteed
+ to be defined by virtue of configure-time tests that ensure we're using
+ either a new-enough native glibc (RE_NO_SUB was added in 2004), or the
+ included replacement.
- * sed.c (write_mode): New.
- (main): Initialize it to "wb" if --binary is passed.
- * sed.h (write_mode): New.
- * compile.c (mark_subst_opts, compile_program): Use it instead
- of "w".
- * execute.c (open_next_file): Pass write_mode to ck_mkstemp.
- * utils.c (ck_mkstemp): Accept mode, pass it to fdopen. Constify.
- * utils.h (ck_mkstemp): Adjust prototype.
+2016-12-19 Jim Meyering <meyering@fb.com>
-2010-08-17 Paolo Bonzini <bonzini@gnu.org>
+ gnulib: update to latest; dfa improvement and getopt-posix-tests build fix
- Fix imprecision in the documentation of `D'.
- * doc/sed-in.texi (D command): Fix documentation of behavior for
- pattern space ending with \n and with no other newline.
- Reported by Randall Cotton.
- * doc/sed.x (D command): Fix documentation of behavior for
- pattern space ending with \n and with no other newline.
- * doc/sed.texi: Regenerate.
- * doc/sed.1: Regenerate.
+2016-12-18 Jim Meyering <meyering@fb.com>
-2010-07-19 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
+ gnulib: update to latest and adapt to modified dfa API
+ * sed/regexp.c (compile_regex_1): Do away with use of DFA_CASE_FOLD.
+ This gnulib update pulls in a dfa module in which that symbol no
+ longer exists. Instead, it uses RE_ICASE in syntax bits.
+ * m4/.gitignore: Add files created by running bootstrap.
+ * lib/.gitignore: Likewise.
- Let --posix turn off nonportable scripts ending in backslash.
- * sed/compile.c (errors, INCOMPLETE_CMD): New error string.
- (compile_program): In strict posix mode, complain about incomplete
- command.
- * NEWS: Update.
- Report by Bruno Haible.
+ tests: use just-built sed in more places
+ * cfg.mk (PATH): Prepend $(srcdir)/src, so that we use the just-
+ built sed also when running commands like those of "make distcheck".
+ Tested by running this in a just-built directory:
+ f=sed/sed; printf '%s\n' '#!/bin/sh' 'sleep 9h' > $f; chmod a+x $f
+ and then verifying that nearly every "make syntax-check" rule hangs.
-2010-07-16 Paolo Bonzini <bonzini@gnu.org>
+2016-12-14 Jim Meyering <meyering@fb.com>
- * autoboot.conf (gnulib_modules): Replace mkstemp with mkostemp.
- * bootstrap.sh.in: Compile mkostemp.c instead of mkstemp.c.
- * gnulib: Update.
- * NEWS: Mention change.
- * sed/utils.c (ck_mkstemp): Use mkostemp to work around Cygwin
- oddity. Reported by Stepan Kasal.
+ doc: fix sed.1-building rule to work on mingw
+ * doc/local.mk (doc/sed.1): Add $(EXEEXT) suffix on "sed/sed" dependent.
+ Patch by Miodrag Milanovic via Stephan T. Lavavej, in
+ https://lists.gnu.org/archive/html/sed-devel/2016-12/msg00026.html
-2010-05-03 Timothy Baker <timothypaulbaker@gmail.com> (tiny change)
+2016-12-12 Jim Meyering <meyering@fb.com>
- * doc/sed.texi (Regular expressions): Fix typo.
+ tests: port tests to avoid tr NUL-eliding behavior on Solaris
+ * testsuite/Makefile.tests (elide_cr): Define this to use sed.
+ Replace every prior use of "$(TR) -d \\r" with it.
+ Our just-built sed can do that job (elide CR bytes) even when the
+ input contains NUL bytes. Solaris 11.3's /bin/tr would remove any
+ NUL byte from the result. Reported by Nelson H.F. Beebe in
+ https://lists.gnu.org/archive/html/sed-devel/2016-12/msg00006.html
-2009-11-15 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
+ gnulib: update to latest, for solaris-10-vs-configure fix
- * doc/sed.texi (Extended Commands): Document F command.
- * doc/sed-in.texi: Regenerate.
- * sed/compile.c (compile_program): Accept 'F' if not --posix.
- * sed/execute.c (open_next_file): Always initialize in_file_name.
- (execute_program): Handle 'F'.
- * configure.ac: Bump SED_FEATURE_VERSION.
- * NEWS: Update.
+ doc: add a README-hacking file
+ * README-hacking: New file: instructions for building from a git clone.
+ Copied from grep's repo, but with s/grep/sed/.
-2009-12-07 Clint Adams <schizo@debian.org> (tiny change)
+2016-12-11 Jim Meyering <meyering@fb.com>
- * sed/execute.c (open_next_file): If is_selinux_enabled returns -1,
- treat it as "disabled".
+ build: avoid "make dist" failure due to missing dependencies
+ * sed/local.mk ($(sed_sed_OBJECTS)): Depend on $(BUILT_SOURCES).
+ Reported by Assaf Gordon in
+ https://lists.gnu.org/archive/html/sed-devel/2016-12/msg00016.html
-2009-10-15 Paolo Bonzini <bonzini@gnu.org>
+2016-12-10 Assaf Gordon <assafgordon@gmail.com>
- * sed/execute.c (closedown): First change owner (while permissions
- stay 0?00), then mode.
+ doc: simplify documentation building
+ Do not bother autogenerating sed.texi from sed-in.texi. All it did
+ was to add a few '@group' commands. Since these are rarely modified,
+ add them manually. This simplifies the documentation-building rules
+ and lets us distribute only one copy of the texinfo manual.
+ See http://lists.gnu.org/archive/html/sed-devel/2016-12/msg00013.html
-2009-10-15 Paolo Bonzini <bonzini@gnu.org>
- WANG Yunfeng <uhuruh@gmail.com>
+ * doc/groupify.sed, doc/sed-in.texi: Remove files.
+ * doc/sed.texi: Remove the 'auto-generated' warning, as this file is no
+ longer auto-generated.
+ * doc/local.mk (doc_sed_TEXINFOS): Rename from sed_TEXINFOS.
+ (dist_noinst_DATA): The above renaming enables us to remove
+ doc/config.texi and doc/fdl.texi from this list.
+ (dist_noinst_SCRIPTS): Remove.
+ (doc/sed.texi): Remove rule.
+ (doc/s-texi): Likewise.
+
+2016-12-06 Assaf Gordon <assafgordon@gmail.com>
+
+ maint: add missing fdl.texi to distribution
+ Neglected to add it in commit v4.2.2-175-gc6a55aa.
+
+ * doc/local.mk (sed_TEXINFOS, dist_noinst_DATA): Add doc/fdl.texi.
+
+2016-12-06 Assaf Gordon <assafgordon@gmail.com>
+
+ doc: follow-up changes for manual improvements
+ Fixes few missing issues from commit v4.2.2-176-g801a2c8,
+ discussed in
+ http://lists.gnu.org/archive/html/sed-devel/2016-12/msg00005.html
+
+ * doc/config.texi: Add stub texinfo macros '@codequotebacktick' and
+ '@codequoteundirected' (needed if using older versions of texinfo).
+ * doc/sed-in.texi: Fix syntax that's accepted by newer texinfo but
+ rejected by texinfo-4.13; Disable directed quote characters in examples.
+ * doc/sed.texi: Auto-regenerated.
+
+2016-12-05 Jim Meyering <meyering@fb.com>
+
+ gnulib: update to latest
+
+2016-12-05 Assaf Gordon <assafgordon@gmail.com>
+
+ doc: reorganize and expand manual
+ Discussed in
+ http://lists.gnu.org/archive/html/sed-devel/2016-11/msg00005.html
+
+ * doc/sed-in.texi: Reorganize and expand.
+ * doc/sed.texi: Auto-regenerated.
+
+2016-12-02 Assaf Gordon <assafgordon@gmail.com>
+
+ maint: upgrade documentation license to GFDL-1.3 (or later)
+ * bootstrap.conf: Add gnulib's fdl module.
+ * doc/sed-in.texi: Update license blurb to latest recommended text.
+ Remove duplicated copyright information from title page (copied from
+ coreutil's texinfo style). Include fdl.texi in a new appendix.
+
+2016-11-29 Jim Meyering <meyering@fb.com>
+
+ tests: use "returns_ N env VAR=val ..."
+ Use "returns_ N env VAR=val ..." rather than "VAR=val returns_ N ...".
+ Some shells do not propagate envvar settings through our use
+ of the "returns_" function, so set any envvar via use of "env".
+ This was an issue at least on Ubuntu, Debian and *BSD-based systems.
+ * testsuite/mb-bad-delim.sh: As above.
+ * testsuite/mb-y-translate.sh: Likewise.
- * sed/execute.c (str_append, str_append_modified): Handle incomplete
- sequences as if they were invalid.
+ gnulib: update to latest
-2009-10-14 Paolo Bonzini <bonzini@gnu.org>
+2016-11-27 Jim Meyering <meyering@fb.com>
- * po/sed.pot: Update.
+ tests: use "returns_ 1" rather than "&& fail=1"
+ * testsuite/colon-with-no-label.sh: Rather than failing only upon
+ success (exit 0), fail upon exit with any value other than 1.
-2009-10-14 Paolo Bonzini <bonzini@gnu.org>
+ build: stop suppressing many -W... warnings
+ This code in configure.ac added many -W options to the list
+ of warnings that we do *not* enable. When I copied most of
+ this code into this file from coreutils, I did not try to
+ remove the options that happened not to be needed for sed.
+ Now, compilers have improved and I have done that triage.
+ Many -W options can be left enabled.
+ * configure.ac (GNULIB_WARN_CFLAGS): There is no longer any
+ need to use a different set of warnings for lib/ files, so
+ remove this variable, along with many -W-related exemptions.
+
+ build: avoid "make distcheck" failure due to leftover .Po files
+ The following definitions caused trouble for no gain. They caused
+ some .o file names to have a long additional prefix and even
+ resulted in some .Po files not being removed by "make distclean"
+ when building with recent automake. The only reason to use these
+ definitions was -- long ago -- to require different compiler options
+ for files in lib/ than elsewhere. That is no longer necessary.
+ * lib/local.mk (lib_libsed_a_CPPFLAGS): Remove definition.
+ (lib_libsed_a_CFLAGS, lib_libsed_a_LIBADD): Likewise.
+ (lib_libsed_a_DEPENDENCIES): Likewise.
+
+ maint: fix -Wformat-exposed errors in uses of "panic"
+ * sed/utils.h (panic): Add __printf__ attribute, so that compilers
+ can diagnose format/arg-type errors. This exposed the following:
+ * sed/utils.c (ck_fwrite): Don't try to print size_t via %u.
+ Instead, use %llu and a cast to unsigned long long.
+ * sed/mbcs.c (is_mb_char): Cast an "int" to unsigned int, to avoid
+ mismatch with %x.
+
+ maint: remove unused parameters
+ * sed/compile.c (finish_program): This function's sole argument
+ was unused. Remove it and update callers.
+ * sed/sed.h: Update prototype.
+ * sed/utils.c (register_open_file): This functions's third argument,
+ "temp", was unused. Remove it and update callers.
+ * sed/sed.c: Update use.
- * configure.ac: Use cache variables rather than AC_CHECK_FUNC.
+ maint: fix two "make syntax-check" failures
+ * cfg.mk (exclude_file_name_regexp--sc_prohibit_empty_lines_at_EOF):
+ Also exempt zero-anchor.{inp,good}.
+ * sed/regexp.c (match_regex): s/can not/cannot/
-2009-10-14 Paolo Bonzini <bonzini@gnu.org>
+2016-11-16 Assaf Gordon <assafgordon@gmail.com>
- * configure.ac: Remove obselete configure tests.
- * sed/fmt.c: Assume limits.h is always present.
- * sed/utils.c: Assume vfprintf is always present.
+ build: remove explicit 'html' makefile target
+ The 'html' target was a left-over from the recursive Makefiles,
+ which were converted to non-recursive in sed v4.2.2-129-g3b29bec.
+
+ With this removed, the 'html' target in 'Makefile' is correctly
+ genererated by automake (from doc/local.mk), and 'make html' works again.
+
+ * Makefile.am: Remove explicit 'html' target.
+
+2016-11-12 Jim Meyering <meyering@fb.com>
+
+ tests: use "returns_ 1" rather than testing $? = 1
+ * testsuite/temp-file-cleanup.sh: As above.
+
+2016-11-04 Assaf Gordon <assafgordon@gmail.com>
-2009-10-14 Yuri G. Kudryashov <urkud.urkud@gmail.com> (tiny change)
+ sed: standardize exit code values
+ Use exit-code constants, and document them:
+ 1=syntax error, 2=bad input files, 4=I/O error or panic.
+ Add "Exit Status" section in manual.
+
+ * sed/utils.h: Define new constants.
+ * sed/utils.c,
+ sed/compile.c,
+ sed/execute.c,
+ sed/sed.c: Use constants instead of hard-coded values.
+ * doc/sed-in.texi: Add "Exit Status" section.
+ * doc/sed.texi: Automatically re-generated.
+
+2016-11-04 Assaf Gordon <assafgordon@gmail.com>
+
+ maint: regenerate sed.texi after doc change
+ Regenerate sed.texi from sed-in.texi after
+ doc change in v4.2.2-160-10549b7 ( https://bugs.gnu.org/24799 ).
+
+ * doc/sed.texi: Regenerated with 'make info'.
+
+2016-11-04 Norihiro Tanaka <noritnk@kcn.ne.jp>
+
+ sed: fix multi-line regex matching with -z
+ Sed incorrectly matches the anchor '^' to a newline character
+ (ASCII 10) despite using NUL line terminators (-z).
+ See https://bugs.gnu.org/24615 .
+
+ Previous (incorrect) behavior:
+
+ $ printf "a\0b\0" | sed -z 'N;s/^/X/mg;' | od -An -a
+ X a nul b nul
+
+ With this fix:
+
+ $ printf "a\0b\0" | sed -z 'N;s/^/X/mg;' | od -An -a
+ X a nul X b nul
+
+ Current regex engine can not handle NUL multiline anchors.
+ Implement such search manually (by breaking the pattern into separate
+ NUL-terminated lines) and searching each one individually.
+
+ * NEWS: Mention it.
+ * sed/regexp.c (compile_regex_1): Don't use newline_anchor of regex, if
+ the buffer delimiter is not newline character.
+ (match_regex): Do above case line-by-line.
+ * testsuite/zero-anchor.good, testsuite/zero-anchor.inp,
+ testsuite/zero-anchor.sed: New test.
+ * testsuite/local.mk: Add the test.
+ * testsuite/Makefile.tests: Add the test.
+ * bootstrap.conf: Add memrchr.
+ * lib/.gitignore, m4/.gitignore: Ignore memrchr files.
+
+2016-11-04 Norihiro Tanaka <noritnk@kcn.ne.jp>
+
+ sed: optimize regex processing of lone ^ or $
+ Optimize /^/ and /$/ patterns and avoid invoking the regular expression
+ engine if possible.
+ See https://bugs.gnu.org/24615 .
- * testsuite/Makefile.tests: Override LC_ALL, not LANG.
+ * sed/regex.c (compile_regex_1): Mark the patterns which consist of ^ or $.
+ (match_regex): Handle the patterns which consist of ^ or $ manually.
+ * sed/sed.h (struct regex): New members 'begline' and 'endline'.
+ * testsuite/newline-anchor.good, testsuite/newline-anchor.sed,
+ testsuite/newline-anchor.sed: New test.
+ * testsuite/Makefile.tests: Add the test.
+ * testsuite/local.mk: Add the test.
-2009-10-12 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
+2016-10-26 Vincenzo Romano <vincenzo.romano@notorand.it>
- * doc/sed-in.texi (Invoking sed): Add index entries for --posix,
- -s, --separate.
- (Other Commands): Fix typo.
- * doc/sed.texi: Regenerate.
+ doc: make an example's description more precise
+ * doc/sed-in.texi (Regular Expressions): Mention that the match
+ must be at the end of a line.
-2009-09-07 Dmitry Chistikov <dd1email@gmail.com> (tiny change)
+2016-10-02 Jim Meyering <meyering@fb.com>
- * doc/sed-in.texi: Document how to separate commands.
+ maint: address syntax-check warnings about @pxref
+ * doc/sed-in.texi: Improve cross-references.
* doc/sed.texi: Regenerate.
-2009-08-30 Paolo Bonzini <bonzini@gnu.org>
-
- * autoboot.conf: Add ssize_t.
- * configure.ac: Remove useless stuff, bump gettext requirement to 0.17.
-
-2009-08-10 Bake Timmons <b3timmons@speedymail.org> (tiny change)
-
- * doc/sed-in.texi: Fix typo.
-
-2009-06-27 Paolo Bonzini <bonzini@gnu.org>
-
- * configure.ac: Bump version.
- * NEWS: Bump version.
- * gnulib: Update.
- * doc/sed.1: Regenerate.
-
-2009-06-25 Paolo Bonzini <bonzini@gnu.org>
-
- * autoboot.conf: Add selinux-h.
- * execute.c: Copy over file creation context before creating a new file.
-
-2009-06-25 Paolo Bonzini <bonzini@gnu.org>
-
- * execute.c: Do not copy ACLs until the file is copied.
- * utils.c (ck_mkstemp): Set a restrictive umask on temporary files.
-
-2009-06-26 Paolo Bonzini <bonzini@gnu.org>
+ build: address warnings from GCC 7
+ * sed/sed.c (usage): Declare with the _Noreturn attribute to suppress
+ this warning/error:
+ sed/sed.c:359:11: error: this statement may fall through \
+ [-Werror=implicit-fallthrough]
+ usage(0);
+ ^~~~~~~~
+ * sed/execute.c (execute_program) [case 'q']: Add FALLTHROUGH comment
+ to avoid warning from GCC 7's -Wimplicit-fallthrough.
+ * sed/compile.c (compile_program): Likewise.
+
+ gnulib: update to latest
+
+2016-09-25 Norihiro Tanaka <noritnk@kcn.ne.jp>
+
+ sed: fix incorrect match for title case
+ * sed/regexp.c (compile_regex_1): Avoid building fastmap for case-
+ insensitive matching.
+ * testsuite/title-case.sh: New file, to test for this fix.
+ * testsuite/local.mk (T): Add the new file name and sort alphabetically.
+ * init.cfg (require_el_iso88597_locale_): Define.
+
+2016-09-11 Jim Meyering <meyering@fb.com>
+
+ dfa: reflect move of dfa code to new gnulib module
+ * bootstrap.conf (gnulib_modules): Add dfa.
+ * sed/dfa.c: Remove file.
+ * sed/dfa.h: Likewise.
+ * sed/local.mk (sed_sed_SOURCES): Remove dfa.c.
+ (NOINST_HEADERS): Remove dfa.h.
+ * sed/regexp.c (compile_regex_1): Use new dfasyntax API.
+ * sed/sed.c (localeinfo): New global.
+ (main): Call init_localeinfo to initialize it.
+ * sed/sed.h: Include localeinfo.h and declare the new global.
+ * lib/.gitignore: Ignore new gnulib-imported files.
+ * m4/.gitignore: Likewise.
+ * po/POTFILES.in: s,sed/dfa.c,lib/dfa.c,
+
+ gnulib: update to latest, for new dfa module
+
+2016-09-04 Assaf Gordon <assafgordon@gmail.com>
+
+ sed: new --sandbox option
+ In sandbox mode, r/w/e commands are not allowed.
+ This ensures sed operates only on files designated on the command line,
+ and cannot execute external programs.
+
+ * sed/sed.c (sandbox): New option variable.
+ (usage): List new option.
+ (main): Accept new option in getopt.
+ * sed/sed.h (sandbox): New extern option variable.
+ * sed/compile.c (DISALLOWED_CMD): New error message.
+ (read_filename): Abort in sandbox mode (r/w commands).
+ (compile_program): Abort on 'e' in sandbox mode.
+ * testsuite/sandbox.sh: Test new option.
+ * testsuite/local.mk: Add new test.
+ * NEWS: Mention new option.
+ * doc/sed-in.texi, doc/sed.texi: Document new option.
+
+2016-08-27 Jim Meyering <meyering@fb.com>
+
+ maint: fix distclean-vs-excess-.Po files more cleanly
+ * doc/local.mk (distclean-local): Remove rule. Moved to ...
+ * Makefile.am (distclean-local): ...here, and add a command to
+ remove all .deps directories. It could have stayed in that .mk
+ file, but since with this change, it is no longer specific to doc/,
+ the top level makes more sense.
+ * lib/local.mk (MOSTLYCLEANFILES): Remove this. Covered by the above.
+ Reported by Assaf Gordon in
+ https://lists.gnu.org/archive/html/sed-devel/2016-08/msg00019.html
+
+2016-08-26 Assaf Gordon <assafgordon@gmail.com>
+
+ maint: update .mailmap
+ Consolidate author's upper/lower case email addresses.
+ Fixes the following problem:
+ $ make THANKS
+ GEN THANKS
+ ./thanks-gen: THANKS.in: duplicate name: Ralf Wildenhues
+
+ Due to:
+ $ git log --pretty=format:'%aN %aE' | grep -i ralf | sort -u
+ Ralf Wildenhues ralf.wildenhues@gmx.de
+ Ralf Wildenhues Ralf.Wildenhues@gmx.de
+
+ see http://lists.gnu.org/archive/html/sed-devel/2016-08/msg00023.html
+ http://lists.gnu.org/archive/html/sed-devel/2016-08/msg00025.html
+
+ * .mailmap: Add email mapping.
+
+2016-08-24 Assaf Gordon <assafgordon@gmail.com>
+
+ doc: update README
+ * README: Update information: remove mention of README.boot, mention
+ AUTHORS, THANKS, website and help/usage information.
+
+ maint: update program name in THANKS.in
+ * THANKS.in: Replace 'grep' with 'sed'.
+
+ maint: remove superfluous name from THANKS.in
+ * THANKS.in: Remove Pádraig Brady: He is the author of two commits
+ (v4.2.1-1-g737ca5e and v4.2.1-37-g629ef76) and will be automatically
+ included in the auto-generated THANKS file.
+
+ maint: remove README-alpha
+ * README-alpha: Removed.
+
+2016-08-22 Assaf Gordon <assafgordon@gmail.com>
+
+ maint: update AUTHORS
+ * AUTHORS: Update information.
+
+2016-08-18 Jim Meyering <meyering@fb.com>
+
+ doc: work with read-only sed.1
+ * doc/local.mk (doc/sed.1): Also remove $@, so that mv does not
+ prompt about read-only target.
+
+2016-08-14 Jim Meyering <meyering@fb.com>
+
+ build: fix sed.1 dependency; work with latest automake
+ * doc/local.mk (doc/sed.1): Depend not on sed.c, but on the binary
+ that help2man must run. Also depend on .version, to be sure we
+ pick up a version change. Also, be careful not to write directly
+ to $@: instead write to $@-t, and make read-only to mark as generated,
+ and then, only if all is well, rename atomically to $@.
+ Also, prefix commands with $(AM_V_GEN) and $(AM_V_at) and ensure
+ that doc/ exists via $(MKDIR_P).
+ (distclean-local): New target. Use this instead of ...
+ (dist-hook-man-page): ... this. Remove rule.
+ (SEDBIN): Remove unnecessary $(top_builddir)/ prefix.
+ (doc/sed.texi, doc/s-texi): Remove some uses of $(top_builddir).
+ Replace others with $(srcdir).
+ * Makefile (dist-hook): remove dependency on dist-hook-man-page.
+ * lib/local.mk (MOSTLYCLEANFILES): Arrange for lib/.deps/*.Po
+ to be removed as part of "make distclean", so that make distcheck
+ no longer fails when using latest automake.
- * autoboot: Do not use GIT_CONFIG_LOCAL.
+ sed: remove obsolete advice from --help output
+ * sed/sed.c (contact): Now that there is a sed-specific
+ mailing list, there is no longer any need to include "sed"
+ in the subject. Remove that advice.
+
+2016-08-11 Assaf Gordon <assafgordon@gmail.com>
+
+ doc: mention \s,\S,\<,\> regex gnu-extensions
+ * doc/sed-in.texi: Mention the extensions.
+ * doc/sed.texi: Automatically re-generated.
+
+ doc: expand on N command
+ * doc/sed-in.texi: Expand on gnu-extension of 'N' command.
+ * doc/sed.texi: Automatically re-generated.
-2009-06-15 Paolo Bonzini <bonzini@gnu.org>
+2016-08-09 Jim Meyering <meyering@fb.com>
- * autoboot.conf: Add memchr again.
- * gnulib: Update.
+ sed: avoid one-byte heap buffer overrun
+ * sed/execute.c (DFA_SLOP): Define.
+ (resize_line): Use it in each line-related allocation.
+ (line_init): Likewise.
+ (line_copy): Likewise.
-2009-06-11 Sergey Farbotka <z8sergey8z@gmail.com> (tiny change)
+2016-08-08 Assaf Gordon <assafgordon@gmail.com>
- * sed/execute.c (open_next_file): Fix off-by-one causing problems
- under Cygwin.
+ sed: adjust line-terminator of F/l/= commands when -z is used
+ Change F/l/= commands to use NUL line terminator if '-z' option is used.
+ Previously F/l/= used '\n' regardless of -z option.
+ See: http://lists.gnu.org/archive/html/sed-devel/2016-08/msg00000.html
+ http://lists.gnu.org/archive/html/sed-devel/2016-08/msg00002.html .
-2009-05-11 Paolo Bonzini <bonzini@gnu.org>
+ * sed/execute.c: (do_list,execute_program): Use 'buffer_delimiter' as
+ line delimiter instead of hard-coded '\n'.
+ * testsuite/nulldata.sh: Adjust tests accordingly.
+
+2016-08-08 Norihiro Tanaka <noritnk@kcn.ne.jp>
+
+ sed: use grep's DFA matcher to speed up regular expression matching
+ When possible, sed now uses grep's DFA matcher to match regular
+ expression, often resulting in a 10x speed-up.
+ * NEWS (Improvements): Mention it. Move this section to the top.
+ * sed/local.mk (sed_sed_SOURCES): Add dfa.c, and sort file names.
+ (noinst_HEADERS): Add dfa.h, and sort file names.
+ * sed/regexp.c (dfaerror, dfawarn): New functions.
+ (compile_regex_1): Compile pattern with dfa.
+ (match_regex): Use dfa.
+ * sed/sed.h: Include dfa.h.
+ (struct regex): New member dfa.
+ * sed/dfa.c: New file, copied from grep.
+ * sed/dfa.h: New file, copied from grep.
+ * po/POTFILES.in: Add sed/dfa.c.
+
+2016-08-08 Assaf Gordon <assafgordon@gmail.com>
+
+ sed: reject 's///e' in --posix mode
+ 's///e' modifier is a gnu extension - reject it in --posix mode.
+
+ * sed/compile.c: (mark_subst_opt): Exit upon 's///e' in posix mode.
+ * testsuite/posix-mode-s.sh: Adjust tests accordingly.
+
+2016-08-08 Assaf Gordon <assafgordon@gmail.com>
+
+ sed: allow multiple (non-conflicting) -E/-r parameters
+ Accept multiple -E/-r parameters as they enable the same ERE operation
+ mode. Previously, sed would reject multiple -E/-r/-R parameters (as
+ preparation to supporting PERL syntax and wanting to avoid -E/-r/-R
+ conflicts). This enables 'sed -E -E -r =' which previously would exit with
+ a failure (and print the help screen).
+
+ * sed/sed.c: (main): Don't exit on multiple -E/-r parameters.
+
+2016-07-26 Assaf Gordon <assafgordon@gmail.com>
+
+ maint: add static-analysis target to cfg.mk
+ Run 'make static-anslysis' to perform static code analysis using
+ clang's 'scan-build' tool.
+
+ * cfk.mk: (static-analysis,static-analysis-init,static-analysis-config,
+ static-analysis-make): New targets.
+
+2016-07-26 Assaf Gordon <assafgordon@gmail.com>
+
+ maint: add copyright/license information to configure.ac
+ Starting year chosen as 1993 based on earliest 'configure.in' found in
+ sed-1.18.tar.gz from that year.
+
+ * configure.ac: Add standard copyright and license information.
+
+2016-07-26 Assaf Gordon <assafgordon@gmail.com>
+
+ maint: update .gitignore after bootstrap
+ Added by running ./bootstrap on a clean sed repository.
+
+ * build-aux/.gitignore: Add config.rpath.
+ * lib/.gitignore: Add additional gnulib C files.
+ * m4/.gitignore: Add additional gnulib m4 files.
+ * po/.gitignore: Add additional PO-related files.
+
+2016-07-26 Assaf Gordon <assafgordon@gmail.com>
+
+ maint: update .gitignore
+ * .gitignore: Add coverage files, .dirstamp files, testsuite files.
+
+2016-07-25 Jim Meyering <meyering@fb.com>
+
+ maint: skip a check when en_US.UTF-8 collation rules are broken
+ * cfg.mk (sc_THANKS_in_sorted): This check would fail on systems
+ for which "." is not ignored. Add a quick sort-based check for
+ that error, and skip the check on any broken system.
+ This also corrects the command to use $(srcdir)/THANKS.in,
+ rather than just THANKS.in.
+
+2016-07-24 Jim Meyering <meyering@fb.com>
+
+ maint: sort THANKS.in
+ * THANKS.in: Move J.T. Conklin's name "down" so it is in
+ en_US.UTF-8-sorted order.
+
+2016-07-24 Assaf Gordon <assafgordon@gmail.com>
+
+ build: switch to non-recursive makefile
+ * .gitignore: Ignore '.dirstamp' files
+ * bootstrap.conf: Add 'non-recursive-gnulib-prefix-hack' gnulib module.
+ Add missing 'stdalign' module.
+ (bootstrap_post_import_hook): Use module to adjust gnulib.mk file.
+ * configure.ac: Add 'subdir-objects' automake option, don't generate
+ makefiles in subdirectories. Adjust path of XFAIL tests.
+ * Makefile.am: Include 'local.mk' files, adjust for non-recursive make.
+ * doc/Makefile.am: Rename to ...
+ * doc/local.mk: Adjust paths. Rename SED to
+ SEDBIN variable, to avoid overriding the default system-wide SED value
+ which is automatically set by autotools.
+ * lib/Makefile.am: Rename to ...
+ * lib/local.mk: Adjust paths.
+ * lib/.gitignore: Ignore 'stdalign.h' from gnulib module.
+ * sed/Makefile.am: Rename to ...
+ * sed/local.mk: Adjust paths.
+ * testsuite/Makefile.am: Rename to ...
+ * testsuite/local.mk: Adjust paths.
+ * testsuite/init.cfg: Move to ...
+ * init.cfg: ... here. Moved to avoid changing the path in init.sh, and to
+ keep the same directory structure as coreutils.
+ (require_en_utf8_locale_): Adjust path for get-mb-cur-max executable.
+ (require_ja_shiftjis_locale_,require_valid_ja_shiftjis_locale_): Adjust
+ path for test-mbrtowc executable.
+ * m4/.gitignore: Add gnulib's non-recusive-make module.
+ * testsuite/runtest: Adjust paths of Makefile.tests and dir variables,
+ Skip utility program 'get-mb-cur-max' which is not a standalone test.
+ * testsuite/Makefile.tests: Adjust path of sed exeutable.
+ * testsuite/eval.sed, testsuite/eval.good: Adjust path of sed executable.
+ * testsuite/cmd-R.sh,
+ testsuite/cmd-l.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/follow-symlinks-stdin.sh,
+ testsuite/follow-symlinks.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/normalize-text.sh,
+ testsuite/nulldata.sh,
+ testsuite/panic-tests.sh,
+ testsuite/posix-char-class.sh,
+ testsuite/posix-mode-N.sh,
+ testsuite/posix-mode-addr.sh,
+ testsuite/posix-mode-bad-ref.sh,
+ testsuite/posix-mode-s.sh,
+ testsuite/range-overlap.sh,
+ testsuite/recursive-escape-c.sh,
+ testsuite/regex-errors.sh,
+ testsuite/stdin-prog.sh,
+ testsuite/subst-mb-incomplete.sh,
+ testsuite/subst-options.sh,
+ testsuite/subst-replacement.sh,
+ testsuite/temp-file-cleanup.sh,
+ testsuite/unbuffered.sh: Adjust paths of init.sh, sed executable.
+
+2016-07-17 Assaf Gordon <assafgordon@gmail.com>
+
+ tests: test --follow-symlinks option
+ * configure.ac: (TEST_SYMLINKS): New AM_CONDITIONAL.
+ * testsuite/follow-symlinks.sh: New tests.
+ * testsuite/Makefile.am: (T): Conditionally add new test (and existing test
+ 'follow-symlink-stdin.sh') based on TEST_SYMLINKS.
+
+ tests: test y command in multibyte locales
+ * testsuite/mb-y-translate.sh: New test.
+ * testsuite/Makefile.am: Add new test.
+
+2016-07-16 Assaf Gordon <assafgordon@gmail.com>
+
+ tests: test y,s non-slash multibyte delimiters
+ Test various scenarios of using a multibyte delimiters (instead of
+ slash) for s,y commands under UTF-8 and C locales.
+
+ * testsuite/mb-bad-delim.sh: New test.
+ * testsuite/Makefile.am: Add new test.
+
+2016-07-06 Assaf Gordon <assafgordon@gmail.com>
+
+ tests: skip tests upon buggy mbrtowc implementations
+ Sed tests purposefully use invalid non-utf8 multibyte sequences to
+ test sed's handling of invalid input/program.
+ Some implementations wrongly accept invalid sequences, causing false
+ alarms. Add a test program to detect such buggy implementations and skip
+ the tests if needed.
+ See discussion in:
+ http://lists.gnu.org/archive/html/sed-devel/2016-07/msg00005.html
+ http://lists.gnu.org/archive/html/sed-devel/2016-07/msg00000.html
+ http://lists.gnu.org/archive/html/sed-devel/2016-06/msg00031.html
+ http://lists.gnu.org/archive/html/sed-devel/2016-06/msg00014.html
+
+ * bootstrap.conf: Add gnulib's closeout module.
+ * m4/.gitignore, lib/.gitignore, po/POTFILES.in: Adjust after adding
+ closeout module.
+ * testsuite/Makefile.am (check_PROGRAMS): Add new program.
+ * testsuite/test-mbrtowc.c: New program.
+ * testsuite/init.cfg (require_valid_ja_eucjp_locale_)
+ (require_valid_ja_shiftjis_locale_): New functions. Call test-mbrtowc
+ with known invalid multibyte sequences to ensure implementation is not
+ buggy and rejects them; Skip test otherwise.
+ * testsuite/invalid-mb-seq-UMR.sh: Use require_valid_ja_eucjp_locale_.
+ * testsuite/mb-charclass-non-utf8.sh: Use require_valid_ja_shiftjis_locale_.
+
+2016-07-04 Assaf Gordon <assafgordon@gmail.com>
+
+ sed: fix minor multibyte parsing bug
+ Previously sed would parse multibyte characters incorrectly in two scenarios:
+
+ 1. Slash following an incomplete-yet-valid multibyte sequence (match_slash):
+ $ LC_ALL=en_US.UTF-8 sed $'s/\316/X/'
+ sed: -e expression #1, char 6: unterminated `s' command
+
+ 2. Open/close brackets as part of a valid mutilbyte string inside a character
+ class (snarf_char_class). In the example below, '\203]' is a valid
+ multibyte character in SHIFT-JIS locale:
+
+ $ LC_ALL=ja_JP.shiftjis sed $'/[\203]/]/p'
+ sed: -e expression #1, char #5: Unmatched [ or [^
+
+ Both cases stem from mbcs.c:brlen() being non-intuitive:
+ It returned 1 for valid single-byte character, invalid multibyte-character,
+ and a for the last byte of a valid multibyte sequence - making it
+ non-trivial to use correctly.
+
+ This commit replaces brlen() with a simpler is_mb_char() function:
+ returns non-zero for multibyte sequences, zero for single/invalid sequences.
+
+ * sed/sed.h: (BRLEN, brlen): Remove delaration.
+ (IS_MB_CHAR,is_mb_char): Add macro and function declaration.
+ * sed/mbcs.c: (brlen): Remove function. (is_mb_char): New function.
+ * sed/compile.c: (snarf_char_class, match_slash): Use IS_MB_CHAR instead of
+ BRLEN; Adjust local variables accordingly.
+ * testsuite/mb-match-slash.sh: New test for scenario 1.
+ * testsuite/mb-charclass-non-utf8.sh: New test for scenario 2,
+ requires SHIFT-JIS locale.
+ * testsuite/Makefile.am: Add new tests
+ * testsuite/init.cfg: (require_ja_shiftjis_locale_): New function.
+ * NEWS: Mention bug fix.
- * sed/compile.c (snarf_char_class): Fix logic bug with [[[ in regular
- expressions (and a possibly uninitialized use of variable delim stemming
- from the bug). Uninitialized variable bug reported by Zhongxing Xu.
- * testsuite/brackets.good: New.
- * testsuite/brackets.inp: New.
- * testsuite/brackets.sed: New.
- * testsuite/Makefile.am: Add test.
- * testsuite/Makefile.tests: Add test.
+2016-06-26 Tristan Verniquet <tverniquet@gmail.com>
-2009-05-11 Paolo Bonzini <bonzini@gnu.org>
+ sed: use unlocked-io
+ Sed already imports gnulib's unlocked-io module, but it was not included
+ in 'utils.c'. Suggested in http://bugs.gnu.org/23848 .
- * configure.ac: Define COPYRIGHT_YEAR.
- * Makefile.am (dist-hook): Test it.
- * sed/mbcs.c: Fix copyright years.
- * sed/sed.c: Fix copyright years. Change COPYRIGHT_NOTICE to
- COPYRIGHT_YEAR.
- * sed/utils.c: Fix copyright years.
- * testsuite/version.gin: Use COPYRIGHT_YEAR.
+ * sed/utils.c: Include 'unlocked-io.h' header.
+ * NEWS: Mention improvement.
-2009-04-30 Paolo Bonzini <bonzini@gnu.org>
+2016-06-05 Assaf Gordon <assafgordon@gmail.com>
- * sed/compile.c: Declare bool arguments as int instead to please AIX XLC.
- * sed/execute.c: Declare bool arguments as int instead to please AIX XLC.
- * sed/utils.c: Declare bool arguments as int instead to please AIX XLC.
- * sed/utils.h: Declare bool arguments as int instead to please AIX XLC.
+ tests: test text normalization (\X sequences)
+ Sed understands escape-sequences such as \r \t \n \cX.
+ Test various scenarios of text normalization.
-2009-04-27 Paolo Bonzini <bonzini@gnu.org>
+ * testsuite/normalize-text.sh: new test.
+ * testsuite/Makefile.am: add new test.
- * configure.ac: Bump version number.
- * configure: Regenerate.
+2016-06-02 Assaf Gordon <assafgordon@gmail.com>
-2009-04-27 Paolo Bonzini <bonzini@gnu.org>
+ tests: test \dNNN \oNNN \xNN escape sequences
+ Test different variations of \dNNN \oNNN \xNN escape sequences,
+ exercising compile.c:convert_number().
- * configure.ac: Do not create homonymous links from builddir to srcdir.
- * testsuite/Makefile.tests: Create readin.in2 here.
- * testsuite/Makefile.am: Do not distribute it.
+ * testsuite/convert-number.sh: new test.
+ * testsuite/Makefile.am: add new test
-2009-04-27 Paolo Bonzini <bonzini@gnu.org>
-
- * autoboot.conf: Add rename.
- * gnulib: Update.
+2016-06-02 Assaf Gordon <assafgordon@gmail.com>
-2009-04-27 Paolo Bonzini <bonzini@gnu.org>
+ tests: test less-common compilation cases
+ Test various odds-and-ends stemming from GNU sed implementation
+ of the program compilation module.
- * configure.ac: XFAIL UTF-8 tests where appropriate.
+ * testsuite/compile-tests.sh: new test.
+ * testsuite/Makefile.am: add new test.
-2009-04-27 Paolo Bonzini <bonzini@gnu.org>
+2016-06-01 Assaf Gordon <assafgordon@gmail.com>
- * testsuite/Makefile.tests: Handle CRLF endings for mingw.
+ tests: test less-common execution cases
+ * testsuite/execute-tests.sh: new test.
+ * testsuite/Makefile.am: add new test.
-2009-04-27 Paolo Bonzini <bonzini@gnu.org>
+ tests: test 'R' command
+ * testsuite/cmd-R.sh: new test.
+ * testsuite/Makefile.am: add new test.
- * configure.ac: Link readin.in2 into builddir.
- * configure: Regenerate.
- * doc/Makefile.am: Do not distribute sed.html. Do not update
- sed.texi if the output does not change.
- * sed/Makefile.am: Order libraries according to their dependencies.
- * sed/compile.c (get_openfile): Declare FAIL as int.
- * sed/sed.c: Avoid printf ("") if REG_PERL is not defined.
- * testsuite/eval.in2: Do not include in the repository.
- * testsuite/Makefile.am: Clean always eval.in2 and never readin.in2.
- * testsuite/Makefile.tests: Provide a default empty definition of TIME
- and remove rules for readin.in2.
+ tests: test program file from STDIN
+ * testsuite/stdin-prog.sh: new test.
+ * testsuite/Makefile.am: add new test.
-2009-03-31 Paolo Bonzini <bonzini@gnu.org>
+ tests: test auto-silent mode with '#n' comments
+ * testsuite/comment-n.sh: new test.
+ * testsuite/Makefile.am: add new test.
- * bootstrap.sh.in: Add __bool_true_false_are_defined.
- * bootstrap.sh: Regenerate.
- * basicdefs.h: Do not provide bool definitions for BOOTSTRAP at all.
+2016-06-01 Assaf Gordon <assafgordon@gmail.com>
-2009-03-31 Paolo Bonzini <bonzini@gnu.org>
+ tests: test character-classes escaping in POSIX mode
+ No \X escaping inside character classes in POSIX mode.
- * sed/sed.c (contact): New.
- (usage): From here.
- (main): Use it for `sed --version' too.
+ Compare:
+ $ printf "t\t\n" | sed 's/[\t]/X/' | od -a
+ 0000000 t X nl
+ $ printf "t\t\n" | sed --posix 's/[\t]/X/' | od -a
+ 0000000 X ht nl
- * configure.ac: Point to GNU project mailing lists.
- * sed/sed.c (contact): Use PACKAGE_BUGREPORT.
- * testsuite/version.gin: Likewise.
- * testsuite/version.good: Regenerate.
- * doc/sed.1: Regenerate.
+ * testsuite/posix-char-class.sh: new test.
+ * testsuite/Makefile.am: add new test.
- * bootstrap.sh.in (PACKAGE_BUGREPORT): New.
- * bootstrap.sh: Regenerate.
+2016-06-01 Assaf Gordon <assafgordon@gmail.com>
-2009-03-31 Paolo Bonzini <bonzini@gnu.org>
+ tests: test substitue replacements (s//\N/)
+ Test standard POSIX (e.g. \1 \2 \3) and gnu extension (\U \u \L \l \E)
+ replacements in s/// command.
- * testsuite/Makefile.am: Distribute utf8-3 and utf8-4 test files.
+ * testsuite/subst-replacement.st: new test.
+ * testsuite/Makefile.am: add new test.
-2009-02-17 Paolo Bonzini <bonzini@gnu.org>
+2016-06-01 Assaf Gordon <assafgordon@gmail.com>
- * testsuite/Makefile.tests: Rewrite rule for utf8-[1234].
- Reported by Ralf Wildenhues.
+ tests: test s/// modifiers
+ Test standard posix and gnu extension modifiers to s/// command.
-2009-02-17 Paolo Bonzini <bonzini@gnu.org>
+ * testsuite/subst-options.sh: new test.
+ * testsuite/Makefile.am: add new test.
- * sed/sed.c (usage): Print homepage URL.
- * testsuite/version.gin: Update.
+2016-06-01 Assaf Gordon <assafgordon@gmail.com>
-2009-01-28 Paolo Bonzini <bonzini@gnu.org>
+ tests: test compilation-related errors
+ Cover code paths in copmile.c leading to errors.
- * sed/sed.c (usage): Only print the bug report address for `sed --help'.
- (main): Print it for `sed --version' too.
- * testsuite/version.gin: Adapt.
- * testsuite/Makefile.tests: Refine help message test.
+ * testsuite/compile-errors.sh: new test.
+ * testsuite/Makefile.am: add new test.
-2009-01-23 Paolo Bonzini <bonzini@gnu.org>
- Hideo AOKI <hideo.aoki.tk@hitachi.com>
+2016-06-01 Assaf Gordon <assafgordon@gmail.com>
- * sed/compile.c (match_slash): Fix MBCS behavior.
- * sed/sed.h (MBSINIT): New.
+ tests: test regex compilation errors
+ Test scenarios leading to regex compilation errors.
-2009-01-20 Paolo Bonzini <bonzini@gnu.org>
+ * testsuite/regex-errors.sh: new test.
+ * testsuite/Makefile.am: add new test.
- * autoboot.conf, bootstrap.sh.in: Remove memchr, memcmp, memmove
- compatibility code.
- * gnulib: Update.
+2016-06-01 Assaf Gordon <assafgordon@gmail.com>
-2009-01-09 Paolo Bonzini <bonzini@gnu.org>
+ tests: exercise 'panic' calls
+ Test scenarios in which GNU sed terminates with a panic error message
+ (and verify the error message text).
- * tests/SPENCER.tests: Add testcases for glibc bugzilla 697.
- * gnulib: Update.
+ * testsuite/panic-tests.sh: new test.
+ * testsuite/Makefile.am: add new test.
-2009-01-05 Paolo Bonzini <bonzini@gnu.org>
+2016-06-01 Assaf Gordon <assafgordon@gmail.com>
- * execute.c (read_pattern_space): Reset hold space at end-of-file
- if input->reset_at_next_file.
+ tests: test -i/--inplace with backup suffix option
+ GNU Sed accepts optional backup filename/suffix with -i option.
+ If the name contains '*', sed replaces it with the input filename.
+ Test various scenarios of suffix names.
+ Example:
+ sed -i'*-*-*.txt' = a
+ will generate backup file 'a-a-a.txt'.
-2008-12-31 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
+ * testsuite/in-place-suffix-backup.sh: new test.
+ * testsuite/Makefile.am: add new test.
- Let --posix turn off more GNU extensions.
- * sed/compile.c (mark_subst_opts): Turn off subst options i, I,
- s, S, x, X, m, and M in --posix mode.
- (compile_address): Disallow address modifiers, `FIRST~STEP',
- `ADDR1,+N', and `ADDR1,~N' in --posix mode.
- (compile_program): In --posix mode, do not accept e or z commands;
- do not accept text between an a, c, or i command and the following
- backslash; do not accept an argument to the l command.
+2016-06-01 Assaf Gordon <assafgordon@gmail.com>
-2008-12-22 Paolo Bonzini <bonzini@gnu.org>
+ tests: test -u/--unbuffered mode
+ Test GNU Sed behaviour in --unbuffered mode (reading only the minimum
+ needed characters from STDIN, leaving output for next program when sed
+ terminates). Example:
+ seq 10 | (sed -u 1q ; sort -nr )
- * autoboot.conf: Request modules emulating mb functions.
- * configure.ac: Do not look for mb functions here.
+ * testsuite/unbuffered.sh: new test.
+ * testsuite/Makefile.am: add new test.
-2008-10-03 Paolo Bonzini <bonzini@gnu.org>
- Jim Meyering <meyering@redhat.com>
+2016-06-01 Assaf Gordon <assafgordon@gmail.com>
- * autoboot.conf: Add localcharset.
- * Makefile.am: Remove intl subdir. Require Automake 1.10.
- * configure.ac: Remove useless macros, switch to external gettext.
- * lib/Makefile.am: Remove intl subdir from CPPFLAGS.
- * sed/Makefile.am: Remove intl subdir from CPPFLAGS.
+ tests: test -z/--null-data option
+ Test input/output line-terminators with -z option.
-2008-10-02 Paolo Bonzini <bonzini@gnu.org>
+ * testsuite/nulldata.sh: new test.
+ * testsuite/Makefile.am: add new test.
- * autoboot: Sync with gnulib's build-aux/bootstrap.
+2016-06-01 Assaf Gordon <assafgordon@gmail.com>
-2008-09-29 Paolo Bonzini <bonzini@gnu.org>
+ tests: test 'l' command
+ Test output width of 'l' command, based on COLS envvar,
+ lN (GNU Extension), '-l N' command-line parameter,
+ and default output width.
- * autoboot: Sync with gnulib's build-aux/bootstrap.
+ * testsuite/cmd-l.sh: new test.
+ * testsuite/Makefile.am: add new test.
-2008-09-29 Paolo Bonzini <bonzini@gnu.org>
+2016-06-01 Assaf Gordon <assafgordon@gmail.com>
- * testsuite/Makefile.am: Add the utf8-{1,2,3,4} tests.
- * testsuite/Makefile.tests: Add the utf8-{1,2,3,4} tests.
- * testsuite/runtest: Support skipping tests.
- * testsuite/utf8-1.good: New.
- * testsuite/utf8-1.inp: New.
- * testsuite/utf8-1.sed: New.
- * testsuite/utf8-2.good: New.
- * testsuite/utf8-2.inp: New.
- * testsuite/utf8-2.sed: New.
- * testsuite/utf8-3.good: New.
- * testsuite/utf8-3.inp: New.
- * testsuite/utf8-3.sed: New.
- * testsuite/utf8-4.good: New.
- * testsuite/utf8-4.inp: New.
- * testsuite/utf8-4.sed: New.
+ tests: test gnu address extension in gnu/posix modes
+ The following addresses are gnu extensions:
+ 0,/regexp/
+ addr1,+N
+ addr2,~N
-2008-09-29 Paolo Bonzini <bonzini@gnu.org>
+ * testsuite/posix-mode-addr.sh: new test.
+ * testsuite/Makefile.am: add new test.
- * BUGS: Document s/.*.// behavior with invalid multibyte sequences.
- * NEWS: Document `z' extension.
- * doc/sed-in.texi: Document both things.
- * sed/compile.c (compile_program): Recognize `z'.
- * sed/execute.c (execute_program): Execute `z'.
- * testsuite/Makefile.am: Add badenc test.
- * testsuite/Makefile.tests: Add badenc test.
- * testsuite/badenc.good: New.
- * testsuite/badenc.inp: New.
- * testsuite/badenc.sed: New.
+2016-06-01 Assaf Gordon <assafgordon@gmail.com>
-2008-09-28 Paolo Bonzini <bonzini@gnu.org>
+ tests: test 's///' gnu extensions in gnu/posix modes
+ s///[iImMe] should be rejected in --posix mode.
+ s//\[lLuUN]// should have no special meaning in --posix mode.
- * basicdefs.h: Replace alloca cruft with alloca.h.
- * bootstrap.sh.in: Update for new gnulib.
- * bootstrap.sh: Update for new gnulib.
- * configure.ac: Move gnulib macros earlier.
- * sed/execute.c: Do not include acl.h when bootstrapping.
-
-2008-08-27 Paolo Bonzini <bonzini@gnu.org>
-
- * sed/execute.c (closedown): Close the input file!
-
-2008-08-20 Paolo Bonzini <bonzini@gnu.org>
-
- * configure.ac: Add gl_DISABLE_THREADS.
-
-2008-08-20 Ralf Wildenhues <ralf.wildenhues@gmx.de
-
- * doc/sed-in.texi: Drop leading whitespace where appropriate,
- do not use TABs.
- * doc/sed.texi: Regnerate.
-
-2008-08-19 Paolo Bonzini <bonzini@gnu.org>
-
- * sed/compile.c: Do not include strverscmp.c.
-
-2008-07-21 Paolo Bonzini <bonzini@gnu.org>
-
- * doc/sed-in.texi: Remove northpark.edu address for sed FAQ.
- * doc/sed.texi: Regenerate.
+ * testsuite/posix-mode-s.sh: new test.
+ * testsuite/Makefile.am: add new test.
-2008-07-10 Paolo Bonzini <bonzini@gnu.org>
+2016-06-01 Assaf Gordon <assafgordon@gmail.com>
- * doc/sed-in.texi: Make the description of ^ and $ more precise.
- * doc/sed.texi: Regenerate.
+ tests: test invalid backreferences in gnu/posix modes
+ 's/foo/\1/' is rejected by default (gnu extension),
+ silently accepted in POSIX.
-2008-06-04 Vladimir Marek <vladimir.marek@sun.com>
+ * testsuite/posix-mode-bad-ref.sh: new test.
+ * testsuite/Makefile.am: add new test.
- * basicdefs.h: Don't hardcode usage of prototypes on SunStudio.
+2016-06-01 Assaf Gordon <assafgordon@gmail.com>
-2008-05-15 Paolo Bonzini <bonzini@gnu.org>
+ tests: test N command in gnu/posix modes
+ 'N' with insufficient output prints nothing in POSIX mode, prints the
+ last read line in GNU Extension mode.
- * autoboot.conf: Update for newer gnulib.
+ Compare:
+ echo a | sed N
+ echo a | sed --posix N
+ echo a | POSIXLY_CORRECT=y sed N
-2008-05-15 Paolo Bonzini <bonzini@gnu.org>
+ * testsuite/posix-mode-N.sh: test output of N command under gnu and
+ posix modes.
+ * testsuite/Makefile.am: add new test.
- * bootstrap.sh.in: Define bool, true, false. Reported by
- Jason Stover. Adjust for gnulib changes.
- * bootstrap.sh: Regenerate.
+2016-06-01 Assaf Gordon <assafgordon@gmail.com>
-2008-04-24 Paul Eggert <eggert@twinsun.com>
+ tests: invalid-mb-seq-UMR: avoid false-failure
+ * testsuite/Makefile.am (TESTS_ENVIRONMENT): Propagate the
+ LOCALE_JA envvar setting determined at configure time into
+ the test environment. Without this, the test would fail on
+ some systems: at least CentOS6 and 7, but not Fedora 24.
- * sed/compile.c (match_slash): Treat 's&foo&\&&' compatibly with
- traditional 'sed'.
- * testsuite/bsd.sh: Add test case for this.
- * testsuite/bsd.good: Add test case output.
+2016-06-01 Jim Meyering <meyering@fb.com>
-2008-04-24 Paolo Bonzini <bonzini@gnu.org>
+ tests: don't let any envvar setting perturb tests
+ * testsuite/envvar-check: New file. Identical to the one from
+ grep, but with the addition of sed-specific "COLS".
+ * testsuite/Makefile.am (EXTRA_DIST): Add it here.
+ (TESTS_ENVIRONMENT): New prologue, mostly copied from grep.
- * sed/compile.c (setup_replacement): Fix bug with \& in POSIX mode.
+2016-05-29 Assaf Gordon <assafgordon@gmail.com>
+
+ sed: reject recursive escaping after \c
+ previously, sed 's/./\c\\/' or 's/./\c\d/' would produce incorrect
+ results. Require two backslashes after \c to denote control sequence
+ ^\ (ASCII 0x34), and reject recursive escaping (e.g. \c\x61).
-2008-01-16 Jim Meyering <meyering@redhat.com>
+ * sed/compile.c: (RECURSIVE_ESCAPE_C): New error message.
+ (normalize_text): Check for \c-backslash, reject recursive escaping.
+ * testsuite/recursive-escape-c.sh: New file. Test new behaviour.
+ * testsuite/Makefile.am (T): Add new test.
+ * NEWS (Bug fixes): Mention it.
- * sed/execute.c (open_next_file, get_backup_file_name): Avoid
- warnings from gcc.
+2016-01-02 Jim Meyering <meyering@fb.com>
-2008-01-16 Jim Meyering <meyering@redhat.com>
+ revert v4.2.2-87-gc033bde, to make sed -i treat "-" as a file name
+ Stephane Chazelas made a fine case for why sed's --in-place (-i)
+ should treat "-" as a file name, and not as standard input in
+ http://debbugs.gnu.org/21249
- * sed/compile.c (snarf_char_class): Reverse order of conjuncts
- so that "delim" is not used uninitialized.
+ There was no specific test for the prior behavior, so rather than
+ letting the revert remove the sole test, adapt and retain it:
+ * testsuite/in-place-hyphen.sh: However, retain and adapt this
+ file to test for the restored behavior.
+ * testsuite/Makefile.am: Retain this change, too.
-2008-01-16 Jim Meyering <meyering@redhat.com>
+2016-01-01 Jim Meyering <meyering@fb.com>
- * sed/utils.c (panic): Remove declaration of unused local, "fd".
+ maint: update copyright year, bootstrap, init.sh
+ Run "make update-copyright" and then...
+
+ * gnulib: Update to latest.
+ * tests/init.sh: Update from gnulib.
+ * bootstrap: Likewise.
+
+2015-12-27 Jim Meyering <meyering@fb.com>
-2008-01-16 Jim Meyering <meyering@redhat.com>
-
- * sed/execute.c (open_next_file, get_backup_file_name): Avoid
- warnings from gcc. Avoid shadowing global "pipe".
-
-2008-01-16 Jim Meyering <meyering@redhat.com>
-
- * autoboot.conf (gnulib_modules): Add stat-macros and pathmax.
-
-2007-10-25 Paolo Bonzini <bonzini@gnu.org>
- Mike Frysinger <vapier@gentoo.org>
-
- * doc/sed.x (q, Q): Document argument.
- * configure.ac: Remove texi2html checks.
- * doc/Makefile.am: Remove rules for sed.html, always distribute it.
-
-2007-08-14 Paolo Bonzini <bonzini@gnu.org>
-
- * sed/execute.c (open_next_file): Follow symlink here...
- (closedown): ... not here.
-
-2007-06-29 Paolo Bonzini <bonzini@gnu.org>
-
- * sed/mbcs.c: Upgrade to GPLv3.
- * sed/regexp.c: Upgrade to GPLv3.
- * sed/sed.c: Upgrade to GPLv3.
- * sed/sed.h: Upgrade to GPLv3.
- * sed/utils.c: Upgrade to GPLv3.
- * sed/utils.h: Upgrade to GPLv3.
- * sed/compile.c: Upgrade to GPLv3.
- * sed/execute.c: Upgrade to GPLv3.
- * sed/fmt.c: Upgrade to GPLv3.
-
-2007-03-01 Masatake YAMATO <jet@gyve.org> (tiny change)
-
- * sed/compile.c (compile_program): Accept 0,/REGEXP/ address
- specification only if --posix is not specified.
-
-2007-02-05 Paolo Bonzini <bonzini@gnu.org>
-
- * testsuite/bug-regex27.c, testsuite/bug-regex28.c: New, from
- glibc (written by Jakub Jelinek).
-
-2007-01-26 Paolo Bonzini <bonzini@gnu.org>
-
- * sed/compile.c (check_final_program): Don't set text if the
- pending_text is initialized but empty.
- * sed/execute.c (output_line): Don't print text if it is NULL.
- * testsuite/Makefile.am (TESTS): Add insert.
- * testsuite/Makefile.tests (insert): New.
- * testsuite/insert.good, testsuite/insert.sed, testsuite/insert.inp: New
- testcase from Jonas Koelker.
-
-2006-12-29 Paolo Bonzini <bonzini@gnu.org>
-
- * sed/compile.c: Fix warnings.
- * sed/execute.c: Fix warnings.
-
-2006-12-22 Bruno Haible <bruno@clisp.org>
-
- * sed/utils.c: Include pathmax.
- * sed/mbcs.c: Use local_charset.
- * sed/execute.c: Copy with padding after the mbstate_t member.
-
-2006-12-21 Paolo Bonzini <bonzini@gnu.org>
+ sed: do not elide an invalid byte in a substitution RHS
+ Now, sed copies such bytes into the output.
+ * sed/execute.c (str_append_modified): Copy each invalid byte
+ into the result string, as the comment suggests.
+ * testsuite/invalid-mb-seq-UMR.sh: Adjust this test to conform.
+ Perl does the same thing. Also, remove an unnecessary "-e" option.
+ * NEWS (Bug fixes): Mention it.
+ Bug introduced prior to the switch to git in 2004,
+ between the releases of sed-4.0.9 and sed-4.1.
+ This addresses http://debbugs.gnu.org/22254.
+
+ sed: fix a heap-clobbering buffer overrun
+ * sed/execute.c (str_append_modified): Upon encountering an
+ incomplete multi-byte sequence in a substitution replacement
+ string, do not treat mbrtowc's return value of -2 as a large,
+ positive number.
+ * testsuite/subst-mb-incomplete.sh: New file/test.
+ * testsuite/Makefile.am (T): Add it.
+ Reported by Hanno Böck in http://debbugs.gnu.org/22127.
+ Hanno used the AFL fuzzer to find the segfault-inducing input
+ from which I derived the test's input.
+ Introduced by v4.2.2-76-g78e8e58, this bug was never in a release.
+
+2015-12-12 Jim Meyering <meyering@fb.com>
+
+ tests: add helper prog, get-mb-cur-max and re_en_utf8_locale_ function
+
+2015-08-23 Jim Meyering <meyering@fb.com>
+
+ sed: reject a ":" command without a label
+ Before, sed would accept it and treat it as a label whose name
+ had length 0, and that could be referenced via a "b" or "t"
+ command with no label.
+ * sed/compile.c (errors): Add the new diagnostic.
+ (COLON_LACKS_LABEL): Define.
+ (compile_program): Reject ":" command with no label.
+ * testsuite/colon-with-no-label.sh: New file.
+ * testsuite/Makefile.am (T): Add it.
+ * NEWS (Bug fixes): Mention it.
+ Reported by Stephane Chazelas in http://bugs.gnu.org/21250
+
+2015-08-01 Assaf Gordon <assafgordon@gmail.com>
+
+ build: comment out definitions of unused macros
+ * sed/compile.c (OPEN_BRACE): Comment out definition, to prevent gcc-5.2
+ from failing with -Werror -Wunused-macros.
+ (END_ERRORS): Likewise.
+
+2015-07-30 Jim Meyering <meyering@fb.com>
+
+ tests: avoid false-failure on system with no ja_JP.eucJP locale
+ * testsuite/invalid-mb-seq-UMR.sh: Use the configure-detected
+ locale name, $LOCALE_JA, rather than hard-coding ja_JP.eucJP.
+ If the required type of locale was not detected, then skip
+ this test. Reported by Assaf Gordon in http://bugs.gnu.org/21124
+
+2015-07-24 Jim Meyering <meyering@fb.com>
+
+ maint: remove dead code
+ * sed/utils.c (ck_mkstemp): Remove $TMP/$TMPDIR-envvar-using code
+ that would have been run only if this function's second parameter
+ were to be NULL, but that could never happen, given the current
+ and sole caller.
+ Also, use mode_t as the type for the saved umask value, not "int".
+ Also, move each declaration down to point of definition.
+ * sed/utils.h (ck_mkstemp): Mark each of the four parameters as nonnull.
+
+2015-07-15 Stanislav Brabec <sbrabec@suse.com>
+
+ sed: fix --follow-symlinks to work when reading stdin
+ When reading from stdin, use of --follow-symlinks would cause failure:
+
+ $ echo abc | sed --follow-symlinks s/a/d/
+ sed: cannot stat -: No such file or directory
+
+ * sed/execute.c (open_next_file): Set input->in_file_name earlier,
+ so we can rearrange logic to avoid calling follow_symlink("-").
+ * testsuite/follow-symlinks-stdin.sh: New file.
+ * testsuite/Makefile.am (T): Add it.
+ * NEWS (Bug fixes): Mention it.
+ Bug introduced by commit v4.2.1-13-g84066bf.
+ http://bugs.gnu.org/20795
+
+2015-06-23 Jim Meyering <meyering@fb.com>
+
+ typo fix: s/singlebyte/single-byte/
+ * sed/compile.c (compile_program, normalize_text): Fix typo.
+ * sed/mbcs.c (brlen): Likewise.
+
+2015-06-20 Jim Meyering <meyering@fb.com>
+
+ sed -i: do not treat "-" as a file name
+ Most GNU utilities treat "-" as standard input, sed itself does that --
+ in most contexts. However, since the addition of support for
+ --in-place (-i) in sed-4.0, sed -i has treated a "-" argument as a
+ file name, i.e., like ./-. Now, that usage evokes a diagnostic:
+
+ $ sed -i s/a/b/ -
+ sed: couldn't edit -: is a terminal
+
+ If you require the old behavior, specify the file name as "./-".
+ Prompted by the report/patch from Stanislav Brabec in
+ http://bugs.gnu.org/20796 to document the strangely
+ inconsistent legacy behavior.
+
+ * sed/execute.c (open_next_file): Call panic before
+ even attempting to operate on the file descriptor.
+ * testsuite/in-place-hyphen.sh: New file. Test for this.
+ * testsuite/Makefile.am (T): Add it.
+ * NEWS (Feature removal): Mention it. Admittedly, the old behavior
+ feels more like a misfeature.
+
+2015-06-20 Jim Meyering <meyering@fb.com>
+
+ tests: initialize $fail to 0
+ * testsuite/range-overlap.sh: Otherwise, with $fail set to
+ nonzero in the environment, this test would report failure,
+ even when it should pass.
+
+2015-05-10 Jim Meyering <meyering@fb.com>
+
+ build: avoid warning about implicit declaration of unlink
+ * sed/sed.c: Include <unistd.h>, for declaration of unlink.
+ Without this change, commit makes sed v4.2.2-84-g7689015 fail
+ to compile when configured with --enable-gcc-warnings.
+
+ sed -i: don't leave behind a temporary sedXXXXXX file
+ For example, running a command like "sed -i s//b/ F" would fail
+ to remove a temporary file named sedXXXXXX (for random XXXXXX)
+ in the directory alongside F.
+ * sed/sed.c (G_file_to_unlink): New global.
+ (register_cleanup_file, cancel_cleanup, cleanup): New functions.
+ (main): Call atexit.
+ * sed/execute.c (open_next_file): Register for unlink.
+ (closedown): Call cancel_cleanup right after the rename.
+ * sed/sed.h: Declare two of the new functions.
+ * NEWS (Bug fixes): Mention it.
+ * testsuite/temp-file-cleanup.sh: New file. Test for this.
+ * testsuite/Makefile.am (T): Add it.
+ Reported by David Jones in http://bugs.gnu.org/20002.
+
+2015-05-07 Jim Meyering <meyering@fb.com>
+
+ maint: remove stray blank line in the middle of a comment
+ * sed/utils.c (ck_mkstemp): As above.
+
+ tests: skip the new test in presence of buggy valgrind
+ * testsuite/invalid-mb-seq-UMR.sh: Upon failure due to a
+ valgrind-internal assertion, skip this test.
+ Reported by Norihiro Tanaka in http://debbugs.gnu.org/20490
+
+2015-05-06 Norihiro Tanaka <noritnk@kcn.ne.jp>
+
+ sed: fix mishandling of overlapping address ranges
+ When the line number ranges of two or more editing commands overlap,
+ sed applies all commands but the first to a line that is just beyond
+ the union of all ranges. E.g., with this command,
+ seq 9|sed '2,7d;3,6d', sed would mistakenly delete line 8.
+
+ * sed/execute.c (match_an_address_p) [ADDR_IS_NUM]: Make this
+ function work also in this case.
+ (match_address_p): Move the ADDR_IS_NUM +
+ ...->line_number == ...->addr_number comparison "up" into
+ match_an_address_p, so we can hoist two similar if/return
+ blocks out of "if" and "else" branches.
+ Change so that this function returns false when the current
+ line number is outside the specified range.
+ * testsuite/range-overlap.sh: New file, to test for this.
+ * testsuite/Makefile.am (T): Add it to the list.
+ * NEWS (Bug fixes): Mention it.
+ Reported as http://bugs.gnu.org/19899
+
+2015-05-04 Jim Meyering <meyering@fb.com>
+
+ build: do not require autoconf.git
+ * configure.ac: Use AC_CONFIG_MACRO_DIR, not
+ the new (as yet unreleased) AC_CONFIG_MACRO_DIRS.
+ Reported by Hongyi Zhao in http://debbugs.gnu.org/20424
+
+2015-05-03 Jim Meyering <meyering@fb.com>
+
+ maint: housekeeping: sync a few rules from coreutils
+ * cfg.mk (sc_preprocessor_indentation): New rule, from coreutils.
+ (local-checks-to-skip): Exempt it, for now.
+ (sc_THANKS_in_sorted): Another rule from coreutils. Enabled.
+ (announcement_Cc_): Define, so the auto-generated announcement
+ message template includes sed-devel@ as a recipient.
+ (update-copyright-env) [UPDATE_COPYRIGHT_USE_INTERVALS]: Update
+ to use =2, rather than=1, so that the next time we update
+ copyright dates, it will collapse a few more ranges.
+
+ maint: tweak comments and rearrange code slightly
+ * sed/execute.c (str_append): Trivial NSC code transformation.
+ (str_append_modified): Tweak another comment.
+
+ tests: test for just-fixed UMR bug
+ * testsuite/invalid-mb-seq-UMR.sh: New file. Test for just-fixed bug.
+ * testsuite/Makefile.am (T): New variable.
+ Add the two init.sh-using test names here, rather than in
+ two separate lists.
+ (SEDTESTS, EXTRA_DIST): Use $(T).
+ (EXTRA_DIST): Add init.cfg.
+ * testsuite/init.cfg: New file, to add functions from coreutils.
+ (require_valgrind_, print_ver_): New functions.
+
+2015-05-03 Norihiro Tanaka <noritnk@kcn.ne.jp>
+
+ sed: avoid a UMR bug when processing an invalid multibyte sequence
+ * sed/execute.c (str_append_modified): When attempting to append an
+ invalid multibyte sequence, e.g., from the RHS of a substitution
+ expression, we would read uninitialized memory.
+ Don't capitalize first word of diagnostic; remove exclamation point.
+ Wrap new translatable strings in _(...).
+ * NEWS (Bug fixes): Mention it.
+ This addresses http://debbugs.gnu.org/20490
+
+2015-05-02 Jim Meyering <meyering@fb.com>
+
+ maint: remove SED_FEATURE_VERSION; use PACKAGE_VERSION instead
+ * configure.ac (SED_FEATURE_VERSION): Remove definition et al.
+ * sed/compile.c (compile_program): Remove sole use.
+ Use PACKAGE_VERSION instead.
+
+ maint: add "/*~" to build-aux/ and m4/.gitignore files
+ Otherwise, bootstrap would add entries for individual file names.
+ * build-aux/.gitignore: Add /*~
+ * m4/.gitignore: Likewise.
+
+2015-05-01 Jim Meyering <meyering@fb.com>
+
+ maint: enable sc_file_system
+ * cfg.mk (local-checks-to-skip): Remove its exemption.
+ * BUGS (characters): s/filesystem/file system/
+ * ChangeLog-2014 (setup_jump): Likewise.
+ * doc/sed-in.texi: Likewise.
+ * doc/sed.texi: Likewise.
+
+ build: require gettext 0.19.2, perl-5.5
+ * configure.ac: Require gettext-0.19.2.
+ * bootstrap.conf: List perl and gettext version requirements.
+
+2015-04-27 Jim Meyering <meyering@fb.com>
+
+ tests: set sed's expected failure status to 4
+ * testsuite/help-version.sh (expected_failure_status_sed): As above.
+
+2015-04-26 Jim Meyering <meyering@fb.com>
+
+ maint: invoke make via $(MAKE), not via "make"
+ * Makefile.am (html): Invoke make via $(MAKE).
+ (full-distcheck): Likewise.
+
+ use generated version.[ch] and add init.sh and help-version.sh
+ * Makefile.am (DISTCLEANFILES): Initialize.
+ (EXTRA_DIST): Add .version.
+ (BUILT_SOURCES): Set to .version.
+ (.version): New rule.
+ (THANKS): Depend on .version.
+ * sed/Makefile.am: Add rules to build version.[ch].
+ * sed/sed.c: Include version.h, and use the new variable, Version.
+ * testsuite/Makefile.am: Arrange to distribute and run the new
+ help-version.sh test. Also distribute the new init.sh.
+ * testsuite/help-version.sh: New file.
+ * testsuite/init.sh: Likewise.
+ * .gitignore: Ignore the generated files, .version and src/version.[ch].
+
+2015-03-01 Jim Meyering <meyering@fb.com>
+
+ maint: COPYRIGHT_YEAR: remove, along with tests that use it
+ This is covered by other tests, and the general --help/--version
+ checks provided by help-version.sh (about to be added) are more
+ thorough.
+ * configure.ac (COPYRIGHT_YEAR): Remove definition and AC_SUBST.
+ * Makefile.am (dist-hook): Remove test.
+ * testsuite/Makefile.am (SEDTESTS): Remove "version".
+ * testsuite/version.gin: Remove file.
+ * .gitignore: Remove mention of generated file, version.good.
+
+2015-01-01 Jim Meyering <meyering@fb.com>
+
+ maint: initialize an mbstate_t with "= { 0, };", rather than with memset
+ I.e., use this:
+ mbstate_t mbstate = { 0, };
+ rather than this:
+ mbstate_t mbstate;
+ memset (&cur_stat, 0, sizeof (mbstate_t));
+ Also, prefer "sizeof VAR" over sizeof(TYPE).
+ * sed/execute.c (execute_program, translate_mb): As above.
+ * sed/compile.c (match_slash, compile_program, normalize_text):
+ Likewise.
+
+ maint: enable sc_prohibit_long_lines
+ * cfg.mk (local-checks-to-skip): Remove the overall exemption,
+ but continue to exempt some files in testsuite/.
+ * configure.ac: Split a long line.
+ * doc/sed-in.texi: Split long lines.
+ * doc/sed.texi: Likewise.
+ * sed/compile.c: Likewise.
+ * sed/execute.c: Split long lines.
+ (execute_program): Reorder "#ifdef HAVE_POPEN" and
+ "if (pipe_fp != NULL)" if/else blocks to make the code
+ clearer and (incidentally) the lines shorter, due to a
+ decrease in nesting level.
+ * sed/sed.c: Split long lines.
+ * sed/utils.c: Likewise.
+ * sed/utils.h: Likewise.
- * sed/mbcs.c: Include string.h (reported by Henning Nielsen Lund).
+ maint: translate_mb: new function factored out of 'y'-handling case
+ * sed/execute.c (translate_mb): New function, factored out of
+ the "case 'y':" part of...
+ (execute_program): ...here.
+
+ maint: remove more unnecessary declarations
+ * sed/execute.c: Remove now-duplicate forward declarations.
+
+ maint: update copyright year ranges to include 2015; update gnulib
+
+2014-12-20 Jim Meyering <meyering@fb.com>
+
+ maint: enable sc_prohibit_strncpy check
+ * cfg.mk (exclude_file_name_regexp--sc_prohibit_strncpy): Remove
+ its exemption.
+ * sed/compile.c (compile_program): Remove two misuses of strncpy;
+ use memcpy instead.
+ * sed/execute.c (do_list): Likewise, for one instance.
+
+ maint: begin to use "size_t" more, where appropriate
+ * sed/execute.c (do_list): Update some "int" locals to "size_t",
+ and combine a few declarations with needlessly separate initializations.
+
+ maint: update .gitignore
+ * .gitignore: Ignore build artifacts.
+
+ maint: remove po/sed.pot from version control
+ * po/sed.pot: Remove file. It is unnecessary and undesirable to
+ version-control a file like this (mechanically-derived).
+
+ build: update build tool version requirements
+ * bootstrap.conf (buildreq): Blindly update tool-version number
+ requirements from those required by coreutils.
+
+ maint: fix "make distcheck" failure
+ * Makefile.am (EXTRA_DIST): List THANKS.in, not THANKS.
+ Add .mailmap, too.
+
+ build: build-aux/texi2dvi: remove file
+ * build-aux/texi2dvi: Remove file. It was out of date and could
+ no longer parse our .texi files.
+ * Makefile.am (EXTRA_DIST): Don't list it here.
+ * cfg.mk: Remove an exemption for that file.
+ * doc/Makefile.am (TEXI2DVI): Remove definition.
+
+2014-12-16 Jim Meyering <meyering@fb.com>
+
+ remove support for the 'L' (fmt/flow-paragraph) command
+ * sed/Makefile.am (sed_SOURCES): Remove fmt.c.
+ * sed/execute.c (execute_program):
+ * sed/fmt.c: Remove file.
+ * sed/sed.h (fmt): Remove declaration.
+ * doc/sed.texi: Remove documentation for 'L' command.
+ * doc/sed-in.texi: Likewise.
+ * NEWS (Feature removal): Document it.
+ Prompted by the report from Jodie Cunningham that using this
+ command with a large number could cause sed to segfault:
+ https://bugs.launchpad.net/ubuntu/+source/sed/+bug/1400575
+
+2014-12-01 Jim Meyering <meyering@fb.com>
+
+ doc: NEWS: mention the gzip->xz release tarball switch
+ * NEWS (Build-related): Mention that we are now distributing
+ only .tar.xz archives; no more gzip-compressed tarballs.
+
+ build: avoid warning about unused fchown result
+ * sed/execute.c: Include "ignore-value.h".
+ (closedown): Explicitly ignore fchown return value.
+ * bootstrap.conf (gnulib_modules): Add ignore-value.
+ * lib/.gitignore: Ignore the new .h file.
+ * .gitignore: Ignore all **~ backup files.
+
+2014-11-30 Jim Meyering <meyering@fb.com>
+
+ build: use gnulib's manywarnings module
+ bootstrap.conf: Add the module name.
+ configure.ac: Copy boilerplate and exclusions from coreutils.
+ sed/Makefile.am (AM_CFLAGS): Define in terms of the two new
+ variables, $(WARN_CFLAGS) and $(WERROR_CFLAGS).
+ m4/.gitignore: Add the two new .m4 files.
+
+ maint: add three casts-in-initialization to avoid warnings
+ * sed/compile.c (special_files): When initializing, cast string
+ literals to (char *) to avoid warnings.
+
+ maint: avoid a gcc "const discard" warning
+ * sed/compile.c (compile_program): Make a local "const" to avoid
+ discarding "const" attribute in assignment.
+
+ maint: avoid more gcc warnings: apply _GL_ATTRIBUTE_PURE
+ * sed/utils.h (get_buffer, size_buffer): Make each functions
+ sole parameter "const" and declare the function itself with the
+ "pure" attribute.
+ * sed/utils.c (get_buffer, size_buffer): Adjust definitions to match.
+
+ maint: add _Noreturn attribute to two functions
+ This avoids two gcc may-be-noreturn warnings:
+ * sed/sed.h (bad_prog): Add _Noreturn attribute.
+ * sed/utils.h (panic): Likewise.
+
+ maint: manually convert K&R to ANSI style decls; and add "static"
+ Convert many function definitions from K&R to ANSI style.
+ When possible, make a function static and remove the immediately-
+ preceding declaration of that same function.
+ Also, add the const to a few declarations.
+ * sed/compile.c: As above.
+ (special_files): Likewise.
+ * sed/execute.c: Likewise.
* sed/fmt.c: Likewise.
+ * sed/mbcs.c: Likewise.
* sed/regexp.c: Likewise.
-
-2006-12-18 Paolo Bonzini <bonzini@gnu.org>
-
- * sed/execute.c (closedown): Remove dead code.
-
-2006-12-17 Paolo Bonzini <bonzini@gnu.org>
-
- * sed/utils.c: Include limits.h.
-
-2006-12-16 Paolo Bonzini <bonzini@gnu.org>
-
- * doc/sed-in.texi: Document --follow-symlinks.
-
-2006-12-15 Paolo Bonzini <bonzini@gnu.org>
-
- * sed/regexp.c: Disable all extensions on --posix.
-
-2006-09-24 Paolo Bonzini <bonzini@gnu.org>
-
- * sed/execute.c: Support ACLs.
- * lib/utils.c: Move...
- * sed/utils.c: ... here, and remove xmalloc.
-
-2006-08-21 Paolo Bonzini <bonzini@gnu.org>
-
- * sed/regexp.c: Accept NUL bytes for `.'. Accept 'a\(b' in
- POSIXLY_CORRECT/POSIXLY_BASIC posixicity.
-
-2006-08-03 Paolo Bonzini <bonzini@gnu.org>
-
- Revert this part of the previous change:
-
- 2006-08-03 Paolo Bonzini <bonzini@gnu.org>
-
- * sed/compile.c (get_openfile): Change second argument to char
- and turn it into a string within the function. Adjust callers.
-
-2006-08-03 Paolo Bonzini <bonzini@gnu.org>
- Corinna Vinschen <vinschen@redhat.com>
-
- * lib/getline.c (getline): Remove Windows special casing.
- * lib/utils.c (register_open_file, ck_fdopen): New.
- (ck_fopen, ck_mkstemp): Use register_open_file.
- * lib/utils.h (ck_fdopen): New.
- * sed/execute.c (open_next_file): Reopen stdin.
- * sed/sed.h (read_mode): New.
- * sed/sed.c (read_mode): New.
- (main): Set it on --binary.
- (usage): Document --binary.
- * sed/compile.c (get_openfile): Change second argument to char
- and turn it into a string within the function. Adjust callers.
- * sed/execute.c (dump_append_queue, open_next_file): Use it
- as mode for ck_fopen.
-
-2006-08-03 Paolo Bonzini <bonzini@gnu.org>
-
- * sed/execute.c (str_append): Use is_utf8 to skip useless work.
- * sed/mbcs.c (initialize_mbcs): Look for a UTF-8 locale.
- (is_utf8): New.
- * sed/sed.h (is_utf8): New.
-
-2006-07-13 Paolo Bonzini <bonzini@gnu.org>
-
- * bootstrap.sh.in: Add a few autoconfy tests.
- * Makefile.am: Update distributed bootstrap.sh.
-
-2006-05-15 Hans-Bernhard Broeker <broeker@physik.rwth-aachen.de>
-
- * sed/basicdefs.h (OB_MALLOC): Turn VCAST into void * cast.
-
-2006-02-03 Paolo Bonzini <bonzini@gnu.org>
-
- * sed/compile.c (compile_program) <case 'y'>: Pass false to match_slash.
-
-2005-09-07 Paolo Bonzini <bonzini@gnu.org>
-
- * lib/regcomp.c: Update from upstream.
- * lib/regex.c: Update from upstream.
- * lib/regex_.h: Update from upstream.
- * lib/regex_internal.c: Update from upstream.
- * lib/regex_internal.h: Update from upstream.
- * lib/regexec.c: Update from upstream.
-
-2005-08-30 Paolo Bonzini <bonzini@gnu.org>
-
- * sed/execute.c (reset_addresses): Never activate ADDR_IS_NUM_MOD
- addresses.
- * testsuite/modulo.good, testsuite/modulo.inp, testsuite/modulo.sed:
- New.
- * testsuite/Makefile.tests: Add new testcase.
- * testsuite/Makefile.am: Add new testcase.
- * testsuite/Makefile.in: Regenerate.
-
-2005-05-18 Maciej W. Rozycki <macro@linux-mips.org>
-
- * configure.ac: Use a cache variable for the libcP test.
- * configure: Regenerate.
-
-2005-05-16 Eero Hakkinen <eero17@bigfoot.com>
-
- * sed/compile.c (snarf_char_class): Fix handling of
- [^]xyz].
-
-2005-04-04 Paolo Bonzini <bonzini@gnu.org>
-
- * sed/execute.c (process_files): Do not add a default
- command-line in in-place editing mode.
-
-2005-02-10 Paolo Bonzini <bonzini@gnu.org>
-
- * testsuite/Makefile.tests: Add new testcase.
- * testsuite/Makefile.am: Add new testcase.
- * testsuite/Makefile.in: Regenerate.
- * testsuite/appquit.good, testsuite/appquit.inp,
- testsuite/appquit.sed: New testcase.
- * testsuite/readin.sed: Quit after the last r command.
- * testsuite/readin.good: Adjust.
- * sed/execute.c (execute_program): Dump the results of the
- a/r/R commands just before quitting.
-
-2005-02-10 Paolo Bonzini <bonzini@gnu.org>
-
- * sed/regexp.c: Fix off-by-one error in the "invalid reference
- to subexpression" message. Debian bug 294339.
-
-2005-02-08 Paolo Bonzini <bonzini@gnu.org>
-
- * lib/obstack.h: include config.h.
-
-2005-02-01 Paolo Bonzini <bonzini@gnu.org>
-
- * doc/Makefile.am: Don't enable MAKEINFO_HTML and TEXI2HTML_HTML
- rules unless BUILD_HTML.
-
-2005-01-25 Paolo Bonzini <bonzini@gnu.org>
-
- * sed/regexp.c: Fix building on GCC 2.95 and earlier.
-
-2004-12-26 Paolo Bonzini <bonzini@gnu.org>
-
- Do not use leftmost-longest matching for addresses.
-
- * NEWS: Add a note about this.
- * testsuite/recall2.good, testsuite/recall2.inp,
- testsuite/recall2.sed: New test.
- * testsuite/Makefile.am, testsuite/Makefile.tests: Add the
- recall2 test.
- * sed/sed.h (struct regex): New.
- (struct addr, struct subst, compile_regex, match_regex,
- release_regex): Use it instead of regex_t.
- * sed/compile.c (compile_program): Update for new meaning of
- the third parameter of compile_regex.
- * sed/execute.c (do_subst): Pass less conservative value to
- the regsize parameter of match_regex.
- * sed/regexp.c (compile_regex_1): New, extracted out of
- compile_regex. The third parameter, needed_sub, now includes
- \0 (so 10 means that \0 .. \9 are needed). Pass RE_NO_SUB
- if needed_sub is zero.
- (compile_regex): Accept a struct regex instead of a regex_t.
- Save the regular expression's text.
- (match_regex): Accept a struct regex instead of a regex_t.
- Recompile the pattern if it was compiled with RE_NO_SUB.
- (release_regex): Accept a struct regex instead of a regex_t.
-
- * doc/Makefile.am: Generate sed.texi correctly when
- building outside srcdir.
-
-2004-12-26 Paolo Bonzini <bonzini@gnu.org>
-
- * BUGS: Add section about [a-z] matching uppercase characters,
- and other locale issues.
- * doc/sed-in.texi [!PERL]: Likewise.
-
-2004-11-15 Paolo Bonzini <bonzini@gnu.org>
-
- * sed/execute.c (str_append_modified): Copy the first character
- when using \l or \u in a multi-byte configuration. Use
- WCRTOMB instead of wcrtomb.
- * sed/sed.h (WCRTOMB): New.
-
-2004-11-11 Paolo Bonzini <bonzini@gnu.org>
-
- * tst-rxspecer.c: Do not mix instructions and
- declarations.
- * basicdefs.h: Include locale.h before #defining
- gettext, to avoid breakage under Solaris.
- * sed/sed.c: do not include locale.h.
-
-2004-11-03 Paolo Bonzini <bonzini@gnu.org>
-
- * bug-regex11.c: Improve portability.
- * bug-regex12.c: Improve portability.
- * bug-regex13.c: Improve portability.
- * bug-regex14.c: Improve portability.
- * bug-regex21.c: Improve portability.
- * bug-regex9.c: Improve portability.
- * tst-boost.c: Improve portability.
- * tst-pcre.c: Improve portability.
- * tst-regex.c: Improve portability.
- * tst-rxspencer.c: Improve portability.
-
-2004-10-08 Paolo Bonzini <bonzini@gnu.org>
-
- * lib/utils.c (utils_id_s): Renamed to open_files.
- (struct id): Renamed to struct open_file.
-
-2004-10-08 Jakub Jelinek <jakub@redhat.com>
-
- * testsuite/Makefile.tests (bug-regex*, run-tests,
- run-ptests): Use $(SED).
- (version): Likewise; prepend $(SED) invocation with $(SEDENV).
-
-2004-08-16 Paolo Bonzini <bonzini@gnu.org>
-
- *** Version 4.1.2 released.
-
-2004-08-06 Paolo Bonzini <bonzini@gnu.org>
-
- * sed/compile.c (bad_command): Fix off-by-one error.
- (snarf_char_class): Fix problem with [.....[] (i.e.
- last char in class is a bracket.
-
-2004-06-30 Paolo Bonzini <bonzini@gnu.org>
-
- *** Version 4.1.1 released.
-
-2004-06-29 Paolo Bonzini <bonzini@gnu.org>
-
- * sed/compile.c (mark_subst_opts): Return int.
- * sed/execute.c (open_next_file): Fix uninitialized
- variable.
-
-2004-06-10 Paolo Bonzini <bonzini@gnu.org>
-
- *** Version 4.1 released.
-
-2004-03-25 Paolo Bonzini <bonzini@gnu.org>
-
- * lib/obstack.h: Get current version.
-
-2004-03-13 Paolo Bonzini <bonzini@gnu.org>
-
- Exit as soon as possible on an I/O error, and with
- a better error message.
-
- * lib/utils.c (ck_mkstemp, ck_rename, ck_getline): New
- functions. Save temporary files into utils_id_s.
- (struct id): Add a field named temp.
- (ck_fopen): Init the new temp field of struct id.
- (panic): Unlink temporary files before exiting.
- * sed/execute.c (read_file_line): Use ck_getline.
- (closedown): Use ck_rename.
- (open_next_file): Use ck_mkstemp.
-
-2004-01-20 Paolo Bonzini <bonzini@gnu.org>
-
- * sed/sed.h (enum addr_state): New definition.
- (enum addr_type): Remove ADDR_IS_NUM2.
- (struct sed_cmd): Replace a1_matched with range_state.
- * sed/compile.c (next_cmd_entry): Use range_state.
- (compile_program): Death to ADDR_IS_NUM2. Compile
- N,Mp as Np if N>=M.
- * sed/execute.c (match_address_p): Rewritten. Handle
- ADDR_IS_NUM here.
- (match_an_address_p): Suit to new match_address_p.
- (execute_program): Adjust to use range_state in `c'.
- Handle addr_bang here.
- (reset_addresses): Use range_state.
-
- (struct input): New field "reset_at_next_file".
- (read_pattern_space): Use it instead of "separate_files".
- (process_files): Initialize it.
-
-2004-01-17 Paolo Bonzini <bonzini@gnu.org>
-
- * sed/sed.h: Do not include wchar.h and wctype.h, and do
- not include the alloca stuff.
- * basicdefs.h: Move all that here.
-
-2004-01-15 Paolo Bonzini <bonzini@gnu.org>
-
- * sed/regexp.c [REG_PERL]: Use REG_STARTEND instead of regexec2.
-
-2004-01-09 Paul Eggert <eggert@twinsun.com>
- Paolo Bonzini <bonzini@gnu.org>
-
- * sed/sed.h (posixicity): New variable, replaces POSIXLY_CORRECT.
- * sed/sed.c (main): Set it.
- * sed/compile.c: Use it instead of POSIXLY_CORRECT.
- * sed/execute.c: Use it instead of POSIXLY_CORRECT.
- * doc/sed-in.texi: Document it and --posix.
-
-2004-01-05 Paul Eggert <eggert@twinsun.com>
- Paolo Bonzini <bonzini@gnu.org>
-
- * NEWS: Fix [\n] to match either backslash or n in POSIXLY_CORRECT mode.
- * doc/sed-in.texi: Document this. Also, document regular expressions
- a bit better overall, using terminology that's more similar to POSIX.
- * sed/sed.h (enum text_types): New definition.
- * sed/compile.c (normalize_text): Replace final parameter with one of
- type normalize_text. If TEXT_REGEX and in POSIXLY_CORRECT mode,
- grok character classes without replacing \n inside them.
-
-2004-01-03 Paolo Bonzini <bonzini@gnu.org>
-
- * sed/execute.c (execute_program): print final line
- after executing N, if not POSIXLY_CORRECT.
-
-2003-12-28 Paolo Bonzini <bonzini@gnu.org>
-
- * sed/compile.c: fix "\\\n" in RHS of s command.
- Reported by Mike Castle.
- * testsuite/bkslashes.inp, testsuite/bkslashes.good,
- testsuite/bkslashes.sed: New files.
- * testsuite/Makefile.am, testsuite/Makefile.tests: Add
- the bkslashes test.
-
-2003-12-16 Paolo Bonzini <bonzini@gnu.org>
-
- *** Version 4.0b released.
-
- * sed/mbcs.c: New file.
- * sed/sed.h: Declare macros for mbcs.c.
- * sed/compile.c: Use them.
- (brlen): Moved to mbcs.c.
- * sed/execute.c: Use them.
- * sed/sed.c: call initialize_mbcs ().
-
-2003-12-14 Paolo Bonzini <bonzini@gnu.org>
-
- * sed/regex.c (match_regex): fix memory leak.
-
-2003-11-27 Paolo Bonzini <bonzini@gnu.org>
-
- * sed/execute.c (reset_addresses): leave addresses 0
- and 0~STEP enabled.
-
-2003-11-15 Jakub Jelinek <jakub@redhat.com>
-
- * sed/regex.c: Use fastmap.
-
-2003-09-21 Paolo Bonzini <bonzini@gnu.org>
-
- *** Version 4.0a released.
-
- * sed/execute.c (struct line): Add mbstate field.
- (str_append): Keep mbstate up to date.
- (str_append_modified): Likewise, and use towupper/towlower.
- (line_init): Initialize mbstate.
- (line_copy): Copy mbstate.
- (line_append): Copy mbstate.
-
-2003-07-15 Stepan Kasal <kasal@ucw.cz>
- Paolo Bonzini <bonzini@fnu.org>
-
- Change the way we treat lines which are not terminated by a newline.
- Such lines are printed without the terminating newline (as before)
- but as soon as more text is sent to the same output stream, the
- missing newline is printed, so that the two lines don't concatenate.
-
- * sed/execute.c (output_file): Is now struct output; users adjusted
- to access the fp field, call output_missing_newline before, and
- call flush_output afterwards.
- (read_file_line): Set line.chomped FALSE each time we encounter a
- line without the newline terminator, no matter whether this is the
- last input file or not, and no matter whether we are in
- POSIXLY_CORRECT mode or not.
- (output_missing_newline): New function which prints the suppressed
- newline, if necessary.
- (flush_output): New function for a common pattern.
- (output_line): Use struct output, set its flag accordingly.
- (dump_append_queue): Use `ck_fwrite' instead of output_line.
- (do_list): Flush the output stream at the end.
- (closedown): The code ``if(separate_files) rewind_read_files();''
- (read_pattern_space): ... has been moved here.
- (process_files): Don't do the default `p' at the end, ...
- (execute_program): ... as this function is now responsible for it;
- add the code to the end of the function and to the command `q';
- the commands `d', `D' and `Q' thus no longer have to forge an empty
- line.
- (execute_program): Commands `c' and `i' no longer call the
- function output_line with chomped==FALSE; instead, they chomp
- the text and call the function with chomped==TRUE.
- (execute_program): Command `e' no longer uses output_line; it
- calls ck_fwrite directly. Commands `e', `L' and `=' flush
- the output stream at the end.
- * sed/compile.c (special_files): Use `struct output' instead of the
- file name.
- (get_openfile): ... special files are no longer copied to file_read
- or file_write.
- (fp_list): Move to sed.h (users adjusted) and rename as...
- * sed/sed.h (struct output): ...this. New flag missing_newline
- associated to the output stream.
- (struct sed_cmd, struct subst): Use `struct output *' instead of mere
- `FILE *'; adjust compile.c and execute.c.
- * testsuite/noeolw.sed, testsuite/noeolw.good, testsuite/noeolw.1good,
- testsuite/noeolw.2good: New tests
-
-2003-07-15 Stepan Kasal <kasal@ucw.cz>
-
- * lib/utils.h, sed/sed.h: #include "basicdefs.h",
- don't include it from various *.c files.
- * sed/regex.c: Don't include regex.h as it's included via sed.h.
-
-2003-06-11 Paolo Bonzini <bonzini@gnu.org>
-
- * lib/getline.c: Don't realloc with first param = NULL.
-
-2003-05-07 Paolo Bonzini <bonzini@gnu.org>
-
- * sed/execute.c: Make treatment of ADDR_IS_NUM_MOD
- simpler, and fix bugs in 0~5,+1
- * sed/compile.c: Complain about addresses like 0
- and 0,3 which are sources of misunderstandings.
- Reported by Akim Demaille <akim@epita.fr>
-
-2003-03-25 Paolo Bonzini <bonzini@gnu.org>
-
- *** Version 4.0.7 released
-
- * sed/execute.c (append_replacement): Extract from
- do_subst
- (do_subst): Don't update count when a match was
- skipped.
- * testsuite/xbxcx3.good, testsuite/xbxcx3.sed,
- testsuite/xbxcx3.inp: Regression tests
-
-2003-03-23 Paolo Bonzini <bonzini@gnu.org>
-
- * sed/execute.c (do_subst): Fix several bugs with
- numbered matches
- * 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:
- regression tests for the bugs
-
-2003-03-15 Paolo Bonzini <bonzini@gnu.org>
-
- *** Version 4.0.6 released
-
- * lib/mkstemp.c: Include sys/file.h if available for the
- benefit of Ultrix
-
-2003-03-14 Paolo Bonzini <bonzini@gnu.org>
-
- * sed/compile.c: Replace flagT with bool
- * sed/execute.c: Replace flagT with bool
- * sed/fmt.c: Replace flagT with bool
- * sed/sed.c: Replace flagT with bool
- * sed/regex.c: Replace flagT with bool
-
-2003-03-13 Paolo Bonzini <bonzini@gnu.org>
-
- * sed/compile.c (compile_program): Understand parameter
- of `v'.
-
- * sed/sed.c (usage): Split help message into multiple
- strings
- (main): Don't understand -h and -V
-
-2003-03-12 Paolo Bonzini <bonzini@gnu.org>
-
- * sed/compile.c (match_slash, snarf_char_class): More
- multibyte character support
- (brlen): New function
- * testsuite/classes.good, testsuite/classes.inp,
- testsuite/classes.sed: New files
-
-2003-03-10 Paolo Bonzini <bonzini@gnu.org>
-
- * sed/compile.c (match_slash): Strip the \ in front of
- slashes (so that the matcher sees x/ for s/x\///). Don't
- match / and [ unless at the start of a character.
-
-2003-02-18 Paolo Bonzini <bonzini@gnu.org>
-
- * sed/regex.c (compile_regex): // matches the last regular
- expression even in POSIXLY_CORRECT mode.
- * sed/compile.c (normalize_text): Treat multibyte character
- sets correctly
- (read_text): Don't swallow backslash sequences, run text
- through normalize_text
- (compile_program): Ditto for y command
-
- * sed/compile.c (normalize_text): Add parameter that says
- whether the text will be processed further to remove more
- backslash escapes. Callers adjusted
- (match_slash): Remove same parameter from here. Callers adjusted.
-
-2003-02-15 Paolo Bonzini <bonzini@gnu.org>
-
- * sed/sed.h: Fix prototype for match_regex, declare re_registers
- if REG_PERL
- * sed/execute.c (do_subst): Use re_registers
- * sed/regex.c (copy_regs): New function
- [REG_PERL]: Use re_registers
- [!REG_PERL]: Avoid using internal entry points, support pre-glibc
- 2.3 regex for the sake of --without-included-regex.
-
-2003-01-04 Paolo Bonzini <bonzini@gnu.org>
-
- * sed/sed.h: Move some stuff from here...
- * sed/basicdefs.h: ...to here
- * lib/utils.c (ck_fopen): Add FAIL parameter
- * lib/utils.h: Adjust parameter
- * sed/compile.c, sed/execute.c, sed/sed.c: Adjust callers
-
- * sed/basicdefs.h: Add TRUE/FALSE
- * sed/compile.c, sed/execute.c, sed/sed.c: Use them
- * sed/fmt.c: Do not redefine them
-
-2003-01-02 Paolo Bonzini <bonzini@gnu.org>
-
- * sed/sed.c: Bump copyright year
-
-2002-12-24 Paolo Bonzini <bonzini@gnu.org>
-
- * sed/sed.c: Use bindtextdomain
- * sed/basicdefs.h [__EMX__]: Define initialize_main
- * lib/getline.c [__EMX__]: Strip trailing CR
-
- * sed/regex.c: Don't use N_ on the lines that define
- error messages, some compilers complain.
-
-2002-12-18 Paolo Bonzini <bonzini@gnu.org>
-
- *** Version 4.0.5 released
-
- * sed/compile.c: Don't use N_ on the lines that define
- error messages, some compilers complain.
-
-2002-12-16 Paolo Bonzini <bonzini@gnu.org>
-
- * sed/compile.c: Improvements to some error messages;
- `a', `i', `l', `L', `r' accept two addresses except in
- POSIXLY_CORRECT mode.
-
-2002-12-14 Paolo Bonzini <bonzini@gnu.org>
-
- * lib/regex_internal.c: Fix problem on non-glibc
- systems, from Jakub Jelinek
- * lib/regex.c (RE_ENABLE_I18N): Conditionalize on
- HAVE_MBRTOWC and HAVE_WCRTOMB.
- * lib/getline.c: Fix compilation on non-glibc system
- * lib/snprintf.c: Fix compilation on non-glibc system
- * lib/basicdefs.h [P_]: Make more portable
-
-2002-12-12 Paolo Bonzini <bonzini@gnu.org>
-
- *** Version 4.0.4 released
-
-2002-11-21 Paolo Bonzini <bonzini@gnu.org>
-
- *** Version 4.0.3 released
-
-2002-11-19 Paolo Bonzini <bonzini@gnu.org>
-
- *** Version 4.0.2 released
-
-2002-11-05 Paolo Bonzini <bonzini@gnu.org>
-
- *** Version 4.0.1 released
-
-2002-10-23 Paolo Bonzini <bonzini@gnu.org>
-
- *** Version 4.0 released
-
-2002-10-28 Paolo Bonzini <bonzini@gnu.org>
-
- * lib/utils.c: Don't fail for EBADF in fflush
- * src/sed.c: the_program is now a global
-
-2002-10-19 Paolo Bonzini <bonzini@gnu.org>
-
- * src/sed.c: Print GNU sed in --version for GNU sed,
- and super-sed for super-sed (thanks to Bruno Haible)
-
-2002-10-17 Paolo Bonzini <bonzini@gnu.org>
-
- *** Version 3.96 released
-
-2002-10-16 Isamu Hasegawa <isamu@yamato.ibm.com>
-
- * src/execute.c (execute_program): Multibyte 'y'
- * src/compile.c (compile_program): Likewise
- * src/sed.h: Likewise
-
-2002-10-08 Paolo Bonzini <bonzini@gnu.org>
-
- *** Version 3.95 released
-
-2002-07-15 Paolo Bonzini <bonzini@gnu.org>
-
- * src/sed.h: rfile --> fname, wfile --> fp
- * src/compile.c (compile_command): Parse 'R' like 'w', use
- separate lists for file read and file write
- * src/compile.c (get_openfile): New name of get_writefile
- * src/compile.c (rewind_read_files): New function
- * src/sed.h: Declared here
- * src/execute.c (closedown): And called here
- * src/execute.c (append_queue): Added 'free' field
- * src/execute.c (execute_program): Implement 'R'
-
-2002-06-09 Paolo Bonzini <bonzini@gnu.org>
-
- * src/execute.c (do_subst): Replaced flag was set on every
- regexp match, while the first matches should not set it
- for s///N.
-
-2002-06-08 Paolo Bonzini <bonzini@gnu.org>
-
- * src/compile.c (compile_file): Open the script in text mode
- * lib/utils.c (utils_fp_name): Shorten the output
- * lib/utils.c (ck_fread, ck_fwrite, ck_fflush): Clearerr
- after printing an error.
- * lib/utils.c (ck_fclose): Work on stdout as well if stream == NULL
- and flush before closing to check for errors
-
-2002-05-30 Paolo Bonzini <bonzini@gnu.org>
-
- * src/compile.c (compile_program): Implement W
- * src/execute.c (execute_program): Likewise
-
-2002-04-23 Paolo Bonzini <bonzini@gnu.org>
-
- * src/sed.c (usage, main): Parse -s
- * src/sed.h (separate_files): New variable
- * src/execute.c (separate_files): New variable
- * src/execute.c (reset_addresses): New function to make range
- addresses work separately on each file when using in-place
- editing
- * src/execute.c (execute_program): The `n' and `N' use test_eof
- so that the script restarts at end of file, not at end of input
- * src/execute.c (test_dollar_EOF): Make $ work separately
- on each file when using -s; renamed to test_eof
-
-2002-02-28 Paolo Bonzini <bonzini@gnu.org>
-
- * src/sed.h (struct sed_cmd): exit_status -> int_arg
- * src/compile.c: Likewise
- * src/execute.c: Likewise
-
- * src/compile.c (compile_command): Parse `l' like
- `q' and `Q'; default for int_arg is -1
- * src/execute.c (do_list): New argument, used instead
- of lcmd_out_line_len
- (execute_program): Interpret int_arg for the `l' command;
- return 0 for `q' and `Q' if int_arg is -1
-
- * src/fmt.c: New file, looted from GNU textutils
- * src/compile.c: Parse `L'
- * src/execute.c: Execute `L'
-
-2002-02-14 Paolo Bonzini <bonzini@gnu.org>
-
- * src/execute.c (str_append_modified): Fixed a stupid
- bug (stop condition was *start == *end, meant to be
- start == end)
-
-2002-02-05 Paolo Bonzini <bonzini@gnu.org>
-
- * lib/utils.c: Added directory parameter to
- temp_file_template
- * lib/utils.h: Adjusted
- * src/execute.c: Adjusted
-
-2002-01-29 Paolo Bonzini <bonzini@gnu.org>
-
- * src/compile.c (mark_subst_opts): Signal an error if
- there are multiple g or p options
- * src/compile.c (compile_program): Raise appropriate
- error if second string in y command is longer than
- first (used to be "excess junk after command")
-
-2001-12-31 Paolo Bonzini <bonzini@gnu.org>
-
- * lib/getline.c: Strip the terminating \r under Windows
- or MS-DOS.
-
- * testsuite/xemacs.sed, testsuite/xemacs.inp,
- testsuite/xemacs.good: Submitted by John Fremlin
- (john@fremlin.de)
-
-2001-12-27 Paolo Bonzini <bonzini@gnu.org>
-
- * sed/execute.c (do_subst): Flags in optimized s/^xx/
- commands were discarded (see the change below)
-
-2001-12-19 Paolo Bonzini <bonzini@gnu.org>
-
- * sed/execute.c (resize_line): Limit inactive space to two
- thirds of a buffer
- * sed/execute.c (line_init): Initialize buf->active
- * sed/execute.c (str_append, str_append_modified, line_copy,
- do_list, do_subst, execute_program, process_files): Operate
- on active space
-
- * sed/execute.c (do_subst): Optimize s/^xx// by making a part
- of the buffer inactive and s/xx$// by truncating it.
- * sed/execute.c (execute_program): Optimize D by making a part
- of the buffer inactive
-
- * testsuite/uniq.sed, testsuite/uniq.inp, testsuite/uniq.good:
- added to test P and D commands.
- * testsuite/fasts.sed, testsuite/fasts.inp, testsuite/fasts.good:
- added to test the new optimization done on the `s' command.
-
-2001-12-17 Paolo Bonzini <bonzini@gnu.org>
-
- * testsuite/dc.inp: Also compute Easter of 2002 :-)
-
- * sed/execute.c [!HAVE_FCHMOD]: Don't chmod the output file
- if working in-place
-
-2001-11-12 Paolo Bonzini <bonzini@gnu.org>
-
- * sed/sed.h (struct sed_cmd): a1 is a pointer too
- * sed/compile.c: Likewise
- * sed/execute.c: Likewise
-
- * sed/compile.c: Use obstacks
- * sed/execute.c: Likewise
-
-2001-11-09 Paolo Bonzini <bonzini@gnu.org>
-
- * sed/compile.c (mark_subst_opts): Parse option `e',
- preserve two occurrences of the `e' and `p' options.
- * sed/execute.c (do_subst) [HAVE_POPEN]: Interpret option
- `e' (evaluate, like Perl's but uses Bourne shell).
- * sed/sed.h (struct subst): Add an `eval' flag.
-
- * sed/compile.c (compile_program): Compile command `e'
- like `c'.
- * sed/execute.c (execute_program): Execute command `e'.
-
-2001-09-25 Paolo Bonzini <bonzini@gnu.org>
-
- * sed/compile.c (get_writefile) [!POSIXLY_CORRECT]:
- support /dev/stdout
- * sed/execute.c (open_next_file, closedown): Support
- in-place editing
- * sed/execute.c (backup_file_name): New function to
- support in-place editing
- * sed/main.c (usage, main): Parse -i.
- * sed/utils.c: Moved to lib directory
-
- * lib/utils.c (temp_file_template): New function.
- * sed/utils.h: Declared temp_file_template.
-
-2001-09-05 Paolo Bonzini <bonzini@gnu.org>
-
- * sed/execute.c (do_subst): `baaac', if passed through
- s/a*/x/g, gave `xbxxcx' rather than `xbxcx' (because an
- empty string matched before the `c'. Fixed.
-
- * sed/execute.c: Removed mmap support, I/O is done using
- getline (slower but more bug-proof).
+ * sed/sed.c: Likewise.
+ * sed/sed.h: Likewise.
* sed/utils.c: Likewise.
- * lib/getline.c: New file
-
-2001-03-22 Paolo Bonzini <bonzini@gnu.org>
-
- * sed/compile.c (normalize_text) [POSIXLY_CORRECT]: Enable
- escapes in modes other than BRE.
-
-2001-03-21 Paolo Bonzini <bonzini@gnu.org>
-
- * sed/compile.c (normalize_text): Support \XXX in Perl mode,
- \oXXX in non-Perl mode.
-
-2001-03-18 Paolo Bonzini <bonzini@gnu.org>
-
- * sed/compile.c (compile_program): Fixed missing break when
- compiling 'q' and 'Q'.
-
- * sed/compile.c (check_final_program): Removed now spurious
- call to compile_regex
- * sed/regex.c (compile_regex): Don't track the last compiled
- regex
- * sed/regex.c (execute_regex): Track here the last compiled
- regex
-
-2001-03-02 Paolo Bonzini <bonzini@gnu.org>
-
- * sed/compile.c (setup_replacement): Support \[lLuUE] like
- Perl and vi.
- * sed/compile.c (new_replacement): Accept new parameter
- to support \[lLUuE].
- * sed/sed.h (enum replacement_types): New declaration
- * sed/execute.c (do_subst): Use new function str_append_modified
- to apply the changes required via \[lLUuE].
- * sed/execute.c (str_append_modified): New function
-
-2001-03-02 Paolo Bonzini <bonzini@gnu.org>
-
- * sed/compile.c (setup_replacement): Count the number of backreferences
- that the RHS needs
- * sed/regex.c (compile_regex): Check if there is a sufficient number
- of backreferences (new argument needed_sub replaces nosub)
- * sed/compile.c (compile_address, compile_program,
- check_final_program): Callers adjusted
-
-2001-02-08 Paolo Bonzini <bonzini@gnu.org>
-
- * sed/compile.c (compile_program): Added `Q' (quit without output)
- * sed/execute.c (execute_program): Ditto
-
- * sed/compile.c (compile_program): Fill in exit_status for `q' and `Q'
- * sed/execute.c (execute_program): Return -1 for `go on', 0..255
- to set the exit status
- * sed/execute.c (process_files): Interpret new convention for
- execute_program, return sed's exit code
- * sed/sed.c (main): Return process_files's exit code
- * sed/sed.h (struct sed_cmd): Declare exit_status
-
-2001-01-07 Paolo Bonzini <bonzini@gnu.org>
-
- * sed/compile.c (compile_program): Added `T' (branch if failed)
- * sed/execute.c (shrink_program, execute_program): Ditto
-
-2001-01-04 Paolo Bonzini <bonzini@gnu.org>
-
- * testsuite/Makefile.am: Use automake's implementation
- of `make check'. Removed the test targets
- * testsuite/Makefile.tests: Moved the test targets here
- (new file).
- * testsuite/runtest: New file
-
- * testsuite/Makefile.tests: `khadafy' test uses EREs.
-
- * testsuite/spencer.inp: Removed the ^* test
-
- * testsuite/spencer.sh: Don't rely on awk; more comments too
-
-2001-01-03 Paolo Bonzini <bonzini@gnu.org>
-
- * sed/compile.c(snarf_char_class) [REG_PERL]: Don't parse
- `\n' specially
- * sed/compile.c(match_slash) [REG_PERL]: Ditto
-
- * sed/compile.c(read_text) [REG_PERL]: Support [xX] modifiers
- * sed/compile.c(mark_subst_opts) [REG_PERL]: Ditto
-
-2000-12-21 Paolo Bonzini <bonzini@gnu.org>
-
- * lib/snprintf.c [BOOTSTRAP]: Don't include stdio.h
- * lib/strerror.c [BOOTSTRAP]: Don't include stdio.h
- * sed/execute.c [!HAVE_ISATTY]: Don't buffer stdin
-
-2000-12-11 Paolo Bonzini <bonzini@gnu.org>
-
- * sed/compile.c(mark_subst_opts): Support [mMsS] flags
- * sed/compile.c(read_text): Support [MS] flags for
- addresses
- * sed/regex.c(compile_regex): Support arbitrary flags for
- regncomp.
-
- * sed/regex.c(compile_regex) [REG_PERL]: Don't call
- normalize_text.
-
-2000-12-08 Paolo Bonzini <bonzini@gnu.org>
-
- * basicdefs.h: Moved here from the `sed' subdirectory.
-
- * configure.in: Removed crap to pick a regex engine.
- Added snprintf to the AC_REPLACE_FUNCS call.
-
- * lib/snprintf.c: New file.
-
- * sed/regex.c(compile_regex): Use regncomp
- * sed/regex.c(match_regex): Use regexec2
-
- * sed/compile.c(compile_program): Implemented the `v' command.
-
- * sed/sed.c(main): Implemented the `r' and `R' options
-
- * sed/sed.h: Replaced use_extended_syntax_t with
- extended_regexp_flags to support Perl regular expressions.
-
- * sed/execute.c(open_next_file): Don't mmap stdin (because
- we cannot seek into it, so a redirected stdin's contents
- would not be "eaten" by sed)
-
-Mon Aug 30 23:40:08 PDT 1999 Ken Pizzini <ken@gnu.org>
-
- *** Version 3.02.80 released
-
- * sed/execute.c(do_subst): lib/regex.c(re_search_2) seems to
- want one extra backreference register; humor it.
-
- * sed/regex.c(compile_regex): work around some odd assumptions
- that lib/regex.c(re_compile_pattern) makes about our desired
- RE syntax.
-
- * configure.in: tweaked version to 3.02.80; added new entries
- to the ALL_LINGUAS definition.
-
- * doc/sed.1, doc/sed.texi, BUGS: explicitly request the output
- of sed --version in bug-reporting instructions.
-
- * doc/sed.texi: the old "informal seders list" is dead; document
- the new sed-users mailing list instead (under Other Resources).
-
-
-Thu Aug 19 23:27:54 PDT 1999 Ken Pizzini <ken@gnu.org>
-
- * sed/sed.h: Add explicit #include of "regex-sed.h" (rather
- than relying on parent file doing so); change the "cmd_regex"
- member of sed_cmd: make it a pointer (instead of a struct),
- and change its name to cmd_subst; add prototypes for newly
- exported functions bad_prog(), normalize_text(), compile_regex(),
- match_regex(), and release_regex(); drop rx_testing variable.
-
- * sed/compile.c: move the compile_regex() function to regex.c;
- export bad_prog() and normalize_text() functions; eliminate the
- rx_testing debris; rename the NOLEAKS symbol to more descriptive
- DEBUG_LEAKS; make cmd_regex to cmd_subst fixes (see above);
- make use of newly abstracted release_regex() function.
-
- * sed/execute.c: abstract out the regex matching to
- regex.c:match_regex(); NOLEAKS to DEBUG_LEAKS change;
- cmd_regex to cmd_subst structure member name change.
-
- * sed/execute.c(do_subst): use re_registers/regoff_t instead of
- regmatch_t to hold the backreference registers, make "offset"
- always be relative to the beginning of the string (rather than
- a delta from "start"), defer some matching bookkeeping (e.g.,
- not_bol_p) to match_regex().
-
- * sed/sed.c(main): loose rx_testing variable; NOLEAKS
- (aka DEBUG_LEAKS) code attempting to release
- _nl_current_default_domain is problematic, so omit it.
-
- * sed/regex.c: new file --- abstracts out the interface to the
- regex engine so that less conditional code is required in
- compile.c and execute.c, and so as to make a change of engine
- easier; implements compile_regex() (which looks an awful lot
- like the one that used to live in compile.c), match_regex(),
- and (if DEBUG_LEAKS is set) release_regex().
-
-Sun Apr 18 04:40:46 PDT 1999 Ken Pizzini <ken@gnu.org>
-
- * sed/sed.c(main): conditionalize calls to setlocale() and
- textdomain() to only occur if their support is needed/wanted.
-
-Sun Apr 18 03:01:46 PDT 1999 Ken Pizzini <ken@gnu.org>
-
- * bootstrap.sh: "foo || bar && baz" was not grouping like I
- expected ("foo || (bar && baz)") under at least one shell,
- so change the test for a pre-existing config.h file to an
- if statement.
-
- * bootstrap.sh: added -DUSE_REGEX_GNU_H option to the
- compiler invocation, to ensure that we get a usable
- regex library included.
-
-Sun Apr 18 02:59:42 PDT 1999 Ken Pizzini <ken@gnu.org>
-
- * sed/sed.h, sed/utils.c: conditionalized inclusion of <libintl.h>
- to occur only if ENABLE_NLS is defined.
-
-Sun Apr 18 01:48:45 PDT 1999 Ken Pizzini <ken@gnu.org>
-
- * sed/compile.c(xofa,normalize_text,convert_number): change
- name of xofa() function to convert_number(); change semantics
- to do all of the work of the text->number conversion.
-
- * sed/compile.c(normalize_text): add new \dDDD decimal
- and \oOOO octal escapes.
-
-Sun Mar 28 21:05:07 PST 1999 Ken Pizzini <ken@gnu.org>
-
- * sed/sed.c(main): if NOLEAKS is set, free up a word that
- the call to textdomain() allocated.
-
- * sed/execute.c(read_file_line): plug up (minor) memory leak:
- if buffer.alloc==0 we may have malloc()'d 1 byte anyway,
- so be sure to FREE(buffer.text) before calling line_init();
-
-Fri Mar 26 16:52:10 PST 1999 Ken Pizzini <ken@gnu.org>
-
- * sed/compile.c(match_slash): somewhere between 3.02
- and 3.02a we lost the ability to use a newline as
- the s/// delimiter; restore this ability.
-
- * sed/compile.c(compile_regex): forget about trying
- to cache the compiled form of the last RE --- it
- causes more problems than its worth. We now only
- cache the source form.
-
- * testsuite/help.good: update to reflect output containing
- new options.
-
-Sun Dec 6 00:51:23 PST 1998 Ken Pizzini <ken@gnu.org>
-
- * sed/utils.c(ck_fwrite): fix i18n bug of using a printf
- fragment of "item%s" to handle plural text.
-
-Mon Nov 23 11:03:40 PST 1998 Ken Pizzini <ken@gnu.org>
-
- * doc/sed.1, doc/sed.texi: ran ispell over these
- files to catch the more obvious typos...
-
-Sun Nov 1 00:09:07 PST 1998 Ken Pizzini <ken@gnu.org>
-
- * sed/execute.c(do_list): make a `lcmd_out_line_len'
- (--line-length) of zero mean "infinite length",
- i.e., "never wrap".
-
-Sat Oct 31 23:06:50 PST 1998 Ken Pizzini <ken@gnu.org>
-
- * execute.c(match_an_address_p,process_files),
- compile.c(compile_program): back out the "zero-address"
- changes of 1998-09-27. It was a neat idea, but there are
- too many dark corners which don't work well. The
- special code for handling line ranges starting at
- address zero (from 1998-08-31) are still there though:
- this seems to work fine with no surprises.
-
-Sat Oct 31 22:18:59 PST 1998 Ken Pizzini <ken@gnu.org>
-
- * sed/sed.c, sed/sed.h, sed/execute.c: added new
- `lcmd_out_line_len' variable. (Idea suggested by
- Carlos J. G. Duarte <l38076@alfa.ist.utl.pt>.)
- Also added ATOI macro (which uses strtoul() if available,
- with fall-back to atoi()).
- * sed/sed.c(main): attempt to use COLS environment variable
- to set a reasonable `lcmd_out_line_len'; added -l/--line-length
- command-line options to set the new `lcmd_out_line_len' flag.
- * sed/sed.c(usage): documented new -l/--line-length options.
- * sed/execute.c(do_list): use `lcmd_out_line_len' variable
- instead of `LCMD_OUT_LINE_LEN'.
- * sed/execute.c: deleted now obsolete LCMD_OUT_LINE_LEN define.
- * configure.in: added strtoul to the AC_CHECK_FUNCS call.
-
-Sat Oct 31 21:37:17 PST 1998 Ken Pizzini <ken@gnu.org>
-
- * sed/sed.c, sed/sed.h, sed/execute.c: added new `force_unbuffered'
- flag. (Idea suggested by Frank Strauss <strauss@escape.de>.)
- * sed/sed.c(main): added -u/--unbuffered command-line options
- to set the new `force_unbuffered' flag.
- * sed/sed.c(usage): documented new -u/--unbuffered options.
- * sed/execute.c: changed the name of the `is_tty' flag in struct
- input to a more generic `no_buffering'; also removed HAVE_ISATTY
- conditional on this member.
- * sed/execute.c(slow_getline): removed HAVE_ISATTY conditonal
- compilation of this function.
- * sed/execute.c(output_line): if force_unbuffered is set,
- then force a fflush() even if writing to stdout.
- * sed/execute.c(open_next_file): added handling of the
- new `force_unbuffered' flag so that slow_getline()
- will always be used for input.
- * sed/execute.c(read_file_line): changed the (conditionally
- compiled) test of `input->is_tty' to (unconditionally)
- use the new spelling `input->no_buffering'.
-
-Thu Oct 15 12:08:09 PDT 1998 Ken Pizzini <ken@gnu.org>
-
- * configure.in: deleted AC_ARG_PROGRAM call; this is already
- done for us by AM_INIT_AUTOMAKE, and we were winding up
- with a doubled-transform.
-
-Sun Sep 27 01:42:42 PDT 1998 Ken Pizzini <ken@gnu.org>
-
- * compile.c(compile_program): remove special-case code for matching
- address range with a `0' beginning.
-
- * compile.c(compile_address): change default addr_number to
- be a pragmatically impossible countT value, instead of zero.
-
- * execute.c: spell macro REGNEXEC() unconditionally instead of
- playing with conditional definition of regnexec() macro.
-
- * execute.c(match_an_address_p): added third argument (and changed
- callers in match_address_p). Added special code to ignore
- non-numeric matches when processing "line zero".
-
- * execute.c(process_files): added a "line zero" pass through the
- commands script.
-
-Sun Sep 27 00:20:53 PDT 1998 Ken Pizzini <ken@gnu.org>
-
- * compile.c(xofa,normalize_text): new functions.
- * compile.c(compile_regex): cache last_compiled_re (with its
- associated flags); add POSIXLY_CORRECT behavior for empty RE.
- Make use of the new normalize_text() function.
- * compile.c(setup_replacement): Make use of the new normalize_text()
- function.
-
-Sat Sep 26 22:59:13 PDT 1998 Ken Pizzini <ken@gnu.org>
-
- * lib/regex-gnu.h: added missing prototype for regncomp().
-
-Mon Sep 14 20:47:23 PDT 1998 Ken Pizzini <ken@gnu.org>
-
- * sed/sed.c(main): use EXIT_SUCCESS instead of 0, in case
- we are built on a system (such as VMS) where EXIT_SUCCESS
- is distinct from 0.
-
-Wed Sep 9 22:17:28 PDT 1998 Ken Pizzini <ken@gnu.org>
-
- * sed/Makefile.am: added -I../intl the INCLUDES line; if we are
- building in a directory outside the source tree and the system
- we are building on does not have a <libintl.h> header, then
- the build was failing, because libintl.h is a build-time
- constructed source file.
-
- * configure.in: tweaked version to be 3.02b.
-
-Wed Sep 9 19:28:14 PDT 1998 Ken Pizzini <ken@gnu.org>
-
- *** Version 3.02a released
-
- * sed/compile.c(mark_subst_opts,read_label,compile_program):
- wherever we accept a ; as a command terminator, also allow a } or
- a # to appear. (This allows for less cluttered-looking scripts,
- such as: sed '/foo/{x;G}' (instead of: sed '/foo/{x;G;}').)
-
-Wed Sep 9 18:17:07 PDT 1998 Ken Pizzini <ken@gnu.org>
-
- * sed/compile.c(compile_regex): use regncomp() instead
- of regcomp(), so that a script with NULs in its REs
- will work in the expected manner.
-
- * sed/compile.c(ADDNUL,REGNCOMP): added support macros
- for above.
-
- * lib/regex.c(regncomp,regcomp): added regncomp() and
- made regcomp() a simple wrapper function.
-
-Mon Aug 31 21:48:30 PDT 1998 Ken Pizzini <ken@gnu.org>
-
- * sed/sed.c(compile_program): if the first address of
- a range is the number 0 (or a 0~N sequence), start
- out in the "a1_matched" state. This allows one
- to match an initial chunk of a file without undue
- convolutions for handling the case where the match
- for the end of the sequence happens to be the first
- line.
-
-Sun Aug 16 03:34:25 PDT 1998 Ken Pizzini <ken@gnu.org>
-
- * sed/compile.c(snarf_char_class,match_slash): simplify
- handling of "premature newline" error. Also, get the
- line number right in the error message if we encounter
- a "premature newline" during char-class snarfing.
-
-Sun Aug 16 02:59:20 PDT 1998 Ken Pizzini <ken@gnu.org>
-
- * sed/compile.c: added N_() markers and corresponding gettext()
- (er, _()) calls.
-
- * Merged in i18n contribution from Erick Branderhorst
- <Erick.Branderhorst@asml.nl>. His ChangeLog entry
- for the changes I've incorporated so far:
-
-1998-07-24 Erick Branderhorst <Erick.Branderhorst@asml.nl>
- * configure.in (ALL_LINGUAS, AM_GNU_GETTEXT): nl
- * sed/{sed.h,utils.c}: #include <libintl.h> #define _(String)
- gettext (String)
- * sed/sed.c: #include <locale.h>
- * po/POTFILES.in: sed/{compile,execute,sed,utils}.c
- * run gettextize -f
- * acconfig.h: #undef LOCALEDIR ENABLE_NLS HAVE_CATGETS
- HAVE_GETTEXT HAVE_LC_MESSAGES HAVE_STPCPY
-
-Fri Aug 14 13:52:57 PDT 1998 Ken Pizzini <ken@gnu.org>
-
- * Merged code from 3.02 with a branched development
- tree from late May; the following (out-of-order)
- changelog entry is from the branched tree.
-
-Sat May 30 12:23:16 PDT 1998 Ken Pizzini <ken@gnu.org>
-
- * sed/compile.c, sed/execute.c: added (conditional on NOLEAKS macro)
- code to free all dynamically allocated memory.
-
- * sed/sed.c, sed/compile.c, sed/execute.c: much shuffling
- of code --- ordered functions such that no forward
- declarations are necessary, and placed all static prototypes
- immediately before the actual function definition.
- This accomplished two things: first, I find the new ordering
- a more natural way to read the code than the previous
- ordering, and second, the new ordering give the compiler
- a better opportunity to discover inlining possibilities.
- (The odd "prototype declaration+old-style definition"
- style is used because I feel it is the least ugly way
- of supporting K&R1 C while still getting the benefit of
- prototypes when they are available.)
-
- * sed/basicdefs.h: added MEMCPY() macro to hide the VCAST()s
- that ought to be used with memcpy().
-
- * sed/execute.c: Change calls to memcpy() to go through the
- new MEMCPY() macro. Various prototypes: elide variable name
- if it does not add any human-useful documentary information
- to the bare type.
-
- * sed/sed.c(main): Updated calls to compile_string() to add third
- (length) argument. Changed call to obsolete close_all_files()
- to a call to the new finish_program().
-
- * sed/sed.c(map_file): Attempt to clean-up how "size" gets
- cast and tested; remove spurious S_ISREG test (just let
- mmap() fail if it doesn't support the underlying file type).
-
- * sed/sed.c: Deleted old RX library stub declarations.
-
- * sed/sed.c(map_file,unmap_file): added VCAST()s to the
- mmap()/munmap() calls.
-
- * sed/utils.c(ck_fclose): added support for ANSI C
- functionality where passing a NULL argument means
- to fclose() _all_ open streams. (Well, almost.
- Only closes streams which were previously ck_fopen()ed,
- as I don't care to figure out how to autoconf-detect
- whether fclose(NULL) is properly supported on a given
- platform.)
-
- * sed/sed.h: Renamed `struct text_buf' member `text_len'
- to `text_length'. Abstracted out `enum addr_types'
- from `struct addr'; added new enum types num2,step,step_mod;
- renamed mod to num_mod. De-unionized the regex,number,
- {modulo-offset/step} components of `struct addr', in
- anticipation of new features. Changed type of `a2' member
- of `struct sed_cmd': now a pointer to save space.
- Abstracted out `struct replacement' from `struct subst'.
- Cleaned up declaration of `x' union of `struct addr'.
- Fixed prototype for compile_string(). Replaced prototype
- for old close_all_files() with one for new finish_program().
-
- * sed/sed.h, sed/compile.c, sed/execute.c: changed to
- simplify the data structures used for branches and
- command blocks: simplified `struct vector'; made
- `struct label' local to compile.c; `struct sed_cmd'
- was modified to support a simpler design for branches
- and blocks.
-
- * sed/execute.c: Conditionally added ADDNUL() macro so that
- the function call overhead is only incurred if nul_append()
- _must_ be called. Made some commentary edits, including
- typo fixes.
- * sed/execute.c(resize_line): changed semantics of "len" argument
- from "additional length" to "target length"; made
- INITIAL_BUFFER_SIZE a minimum allocation length.
- * sed/execute.c(str_append): adjusted to new resize_line()
- semantics.
- * sed/execute.c(line_copy): use FREE()+MALLOC() instead of
- REALLOC() to avoid unnecessary copying of old text; add the
- "try doubling first" allocation heuristic (just like
- resize_line() does).
- * sed/execute.c(line_exchange): new function.
- * sed/execute.c(nul_append): make whole function (not just its
- body) conditional on HAVE_REGNEXEC macro; adjust to new
- resize_line() semantics.
- * sed/execute.c(read_mem_line): use str_append() instead if
- custom in-line code; compensate for new default of
- "line.chomped = 0" in read_pattern_space() by setting
- "line.chomped = 1" where appropriate.
- * sed/execute.c(read_file_line): use different trigger to
- determine that "buffer" is uninitialized, and do a full
- initialization if required; use str_append() instead of custom
- in-line code in two places; compensate for new default of
- "line.chomped = 0" in read_pattern_space() by setting
- "line.chomped = 1" where appropriate.
- * sed/execute.c(output_line): don't bother calling ck_fwrite()
- if length==0.
- * sed/execute.c(release_append_queue): new function.
- * sed/execute.c(dump_append_queue): use release_append_queue()
- instead of in-line equivalent.
- * sed/execute.c(read_pattern_space): conditionalize call to
- dump_append_queue() for alleged performance reasons; changed
- default "line.chomped" value to more common "1", and added an
- assignment of "0" where this made a difference.
- * sed/execute.c(match_an_address_p): deleted "is_addr2_p"
- argument; reorder cases to match order in enum declaration; add
- cases for new "addr_is_num2", "addr_is_step", and
- "addr_is_step_mod" address types; alter nul_append() call to be
- through ADDNUL() macro; fix to new struct member and enum
- spellings in (formerly addr_is_mod); addr_is_num_mod case.
- * sed/execute.c(match_address_p): remove oblsolete third argument
- to calls to match_address_p(); alter references to sed_cmd
- member a2 to reflect new pointer status; add new support for
- a2->addr_type addr_is_step and addr_is_step_mod cases.
- * sed/execute.c(do_subst): add NOLEAKS support logic; use
- ADDNUL() wrapper to nul_append(); simplify replacement
- expansion by using the new "struct replacement" data structure;
- use line_exchange() function instead of custom in-line code.
- * sed/execute.c(process_files): added NOLEAKS code.
- * sed/execute.c(execute_program): updated implementations
- of the `{', `}', `:', `b', and `t' commands; modified
- `c' command gratuituosly; fixed potential memory
- overrun in `D' command. Simplified how nonstandard
- `loop increments' work. Use line_exchange() instead of
- custom in-line code in 'x' case.
- * sed/execute.c[EXPERIMENTAL_DASH_N_OPTIMIZATION conditional
- code]: various modifications intended to keep this
- code in sync with the new changes, but the code still
- retains its previous bugs.
-
- * sed/compile.c: use "exit(EXIT_FAILURE) instead of "exit(1)",
- just in case we get compiled under VMS.
- * sed/compile.c: Change type of prog_info.base to decrease needs
- for casting; then elimiated the casts in question ;-).
- * sed/compile.c: Added struct sed_label (moved from sed.h, then
- modified).
- * sed/compile.c: Removed "readit_p" flag from struct fp_list.
- * sed/compile.c: Added module-global "blocks" variable.
- * sed/compile.c: Extracted more error-message constant strings
- to named variables.
- * sed/compile.c(check_final_program): updated to
- reflect new data structures and use new fucntions.
- Added call to compile_regex() to release unneeded
- memory.
- * sed/compile.c: deleted obsolete new_vector() function;
- abstracted new read_label() function; abstracted new
- release_label() function; added new `blocks' module-static
- variable.
- * sed/compile.c(compile_program): updated implementations
- of the `{', `}', `:', `b', and `t' commands; modified
- initialization from NULL vector.
- * sed/compile.c(compile_regex): added mechanism to
- release memory consumed by the cached `last' RE.
- * sed/compile.c(setup_jump,setup_label): updated
- name (from setup_jump to setup_label) and prototype;
- changed body to reflect data structure changes.
- * sed/compile.c: Add OPEN_BRACE and CLOSE_BRACE macros for better
- "vi" editing behavior.
- * sed/compile.c(compile_filename,read_filename,get_writefile):
- Replaced function compile_filename() with more orthogonal functions
- read_filename(), get_writefile().
- * sed/compile.c(compile_regex): Added ability to free the remembered
- "last RE" in compile_regex (for benifit of "NOLEAKS" code).
- * Made adjustments dictated by the change to struct sed_cmd which made
- the a2 member a pointer-to-addr instead of an addr.
- * sed/compile.c(setup_jump,read_label,setup_label,release_label):
- Added functions read_label(), setup_label(), release_label(); deleted
- function setup_jump().
- * sed/compile.c(new_replacement,setup_replacement,release_replacement):
- new functions.
- * sed/compile.c: Adjusted to new spelling of text_buf member
- ("text_length" instead of "text_len").
- * sed/compile.c(new_vector): deleted function. (Due to new handling
- of blocks, only one instance remained, and that one was just as
- clear in-lined.)
- * sed/compile.c(compile_string): Added third argument; it now
- takes a counted string instead of a NUL-terminated string.
- * sed/compile.c(compile_file): added variable "map_base" to
- compensate for new type of prog_info.base.
- * sed/compile.c(check_final_program): reflect new style of
- handling blocks and struct sed_label.
- * sed/compile.c(close_all_files,finish_program): replaced function
- close_all_files() with more generic finish_program().
- * sed/compile.c(read_text): added new feature: if first non-blank
- character after the {a,i,c} command character is not "\", then
- use the trailing text on that line as the (first) line of text.
- Also added code conditional on NO_INPUT_INDENT to support the
- "feature" of stripping leading blanks from each input line; I
- do not read POSIX as permitting this behavior, nor do I think
- it is a good idea, so it is disabled by default, but some have
- argued that this blank-stripping is the "correct" behavior, so
- I offer them the option of building their sed that way.
- * sed/compile.c(compile_address): added xxx,+n and xxx,~n addressing;
- simplified code.
- * sed/compile.c(compile_program): added BAD_PLUS error detection;
- adjusted to new cur_cmd->a2 pointer status; added addr_is_num2
- detection; deleted pointless "a2->addr_number < a1.addr_number"
- check (addr_is_num2 semantics handle this just fine); updated
- code for '{', '}', ':', 'b', and 't' to reflect new design
- of branch handling, including making use of new functions
- related to the new design); added support for feature already
- mentioned in read_text() where {a,i,c} commands are able to have
- their text start on the same line as the command; changed some
- error messages (hopefully for the better); localized variables
- specific to individual commands (particularly 's' and 'y');
- made use of new setup_replacement() function in 's' command.
-
-Mon Aug 10 19:58:49 PDT 1998 Ken Pizzini <ken@gnu.org>
-
- * doc/sed.texi, doc/sed.1: sedtut10.txt is apparently dead.
- Deleted references to it and added a pointer to
- http://seders.icheme.org/tutorials/. (Pointed out by
- Joerg Heitkoetter <joerg@de.uu.net>.)
-
-Sat Aug 8 18:11:57 PDT 1998 Ken Pizzini <ken@gnu.org>
-
- * djgpp/config.btm: per request by Michel de Ruiter
- <mdruiter@cs.vu.nl>, added "%1" to "%9" parameters.
-
-Mon Aug 3 11:44:55 PDT 1998 Ken Pizzini <ken@gnu.org>
-
- * doc/sed.texi: fix a couple of typos. (Submitted by
- Alan Modra <alan@spri.levels.unisa.edu.au>.)
-
-Sat Aug 01 17:49:06 PDT 1998 Ken Pizzini <ken@gnu.org>
-
- *** Version 3.02 released
-
- * configure.in: Because of code change in 3.01a, bump the
- minor revision number for the release (now 3.02).
-
-Sun Jul 26 16:07:55 PDT 1998 Ken Pizzini <ken@gnu.org>
-
- *** Version 3.01a released
-
- * sed/compile.c(snarf_char_class): the POSIX char-class
- recognition loop forgot to update its concept of "prev"
- as the loop progressed.
-
- * testsuite/Makefile.am: The dependency of version.good
- on [testsuite/]Makefile introduced in the previous
- release was botched -- it referred to "Makefile"
- as "$(srcdir)/Makefile, which of course doesn't work
- if you aren't building in the source tree.
-
- * djgpp/Makefile.am: add forgotten "config.btm" EXTRA_DIST
- member.
-
- * configure.in: update version.
-
-Tue Jul 21 06:04:42 PDT 1998 Ken Pizzini <ken@gnu.org>
-
- *** Version 3.01 released
-
- * configure.in: mark as release version!
-
- * Makefile.am: add BUGS and THANKS to the EXTRA_DIST target.
-
- * testsuite/Makefile.am: add dependency of version.good
- on [testsuite/]Makefile.
-
-Mon Jul 20 12:38:10 PDT 1998 Ken Pizzini <ken@gnu.org>
-
- * djgpp/config.btm: New file to support the 4DOS alternative
- to command.com. (Sumitted by Eli Zaretskii on behalf of
- an anonymous 4DOS user.)
-
-Fri Jul 17 00:36:34 PDT 1998 Ken Pizzini <ken@gnu.org>
-
- *** Version 3.01-beta18 released
-
- * djgpp/config.sed: my "tweak" in beta17 was too
- hastily considered. Back it out.
-
- * configure.in: update to beta18.
-
-Wed Jul 15 01:02:15 PDT 1998 Ken Pizzini <ken@gnu.org>
-
- *** Version 3.01-beta17 released
-
- * djgpp/config.sed: tweak/simplify s,,, commands at end.
-
- * configure.in: update to beta17.
-
-1998-07-14 Eli Zaretskii <eliz@is.elta.co.il>
-
- * djgpp/config.sed: Edit all the occurences of = in the context of
- --option=value, including in the help messages, into
- --option:value, but leave DOS-style d:/foo/bar file names intact.
-
- * djgpp/config.bat: Use --srcdir:foo instead of --srcdir=foo.
-
- * testsuite/Makefile.am (help, version): Remove temporary files
- explicitly, don't use shell wildcards, so it works under DOS 8+3
- limits.
-
-Thu Jul 9 13:06:00 PDT 1998 16:51:43 PDT 1998 Ken Pizzini <ken@gnu.org>
-
- *** Version 3.01-beta16 released
-
- * djgpp/config.sed: tweak the configure script to use :
- instead of = for --with-foo=bar option parsing, to
- work around problems with how command.com handles =s.
-
-Wed Jul 8 16:51:43 PDT 1998 Ken Pizzini <ken@gnu.org>
-
- * djgpp/config.bat: correct inappropriate behavior that I
- introduced in the beta13 changes (if first argument is
- a directory, it needs to be handled as the --srcdir).
-
- * testsuite/version.gin, testsuite/version.good, testsuite/Makefile.am:
- Add target to automake to automatically update version.good
- from (new file) version.gin, instead of hand-editing the version
- number each release.
-
- * testsuite/Makefile.am: miscellaneous gratuitious tweakage --
- mainly adding $(RM) commands just because I didn't like
- leaving the tmp* files from successful runs laying about.
- Also some editorial comments.
- * configure.in: update to beta16. Added and commented out
- experiment with AC_OUTPUT() for testsuite/version.good.
- Added code to properly handle bare (without =xxx)
- "--with-regex" option.
-
-Sun Jul 5 21:02:16 PDT 1998 Ken Pizzini <ken@gnu.org>
-
- *** Version 3.01-beta15 released
-
- * sed/utils.c(ck_fflush), sed/utils.h, sed/execute.c(output_line):
- add and use new ck_fflush() function.
-
-Sun Jul 5 15:23:47 PDT 1998 Ken Pizzini <ken@gnu.org>
-
- * sed/compile.c(bad_prog): add more detail to error
- messages about -e strings.
-
-Sun Jul 5 14:29:45 PDT 1998 Ken Pizzini <ken@gnu.org>
-
- * sed/compile.c(mark_subst_opts), sed/execute.c(do_subst):
- Define better semantics for interaction of the `g' flag
- with a numeric flag to the s/// command. It used to
- be that the `g' command siezed control; now the first
- (number-1) matches are skipped and then `g' gets control
- after that. (It is not clear whether this is a feature
- sneaking in during late beta, or a bug fix; the changes
- involved were trivial, so I decided to treat it as a bug
- fix.)
-
- * configure.in, testsuite/version.good: update to beta15.
-
-Sat Jul 4 09:54:45 PDT 1998 Ken Pizzini <ken@gnu.org>
-
- *** Version 3.01-beta14 released
-
- * sed/basicdefs.h, sed/compile.c, sed/execute.c:
- per report by "Kaveh R. Ghazi" <ghazi@caip.rutgers.edu>,
- copied the ISXXX macros from lib/regex.c so that
- silly machines which require isascii() to be true
- before the other isXXX() macros are valid will
- still work.
-
- * configure.in, testsuite/version.good: update to beta14.
-
-Thu Jul 2 23:46:13 PDT 1998 Ken Pizzini <ken@gnu.org>
-
- *** Version 3.01-beta13 released
-
- * configure.in, acconfig.h: set USE_REGEX_GNU_H symbol if we
- are going to be using lib/regex.c.
-
- * lib/Makefile.am, lib/regex.h, lib/regex-gnu.h, lib/regex.c:
- rename lib/regex.h to lib/regex-gnu.h, so that those who
- choose to use a different regex implementation will not
- pick-up lib/regex.h when doing "#include <regex.h>".
-
- * sed/regex-sed.h, sed/Makefile.am, sed/compile.c, sed/execute.c,
- sed/sed.c: create sed/regex-sed.h which acts as a switch
- to choose either lib/regex.h or the user-supplied <regex.h>,
- depending on the value passed to configure's --with-regex=
- option.
-
-Thu Jul 2 17:22:31 PDT 1998 Ken Pizzini <ken@gnu.org>
-
- * configure.in: if an alternative --with-regex= is given,
- do an AC_CHECK_FUNCS(regnexec regexec) to ensure that
- at least one of these functions is available. Also,
- parallel changes for the default case.
-
- * sed/execute.c, acconfig.h: retire use of the WITH_REGNEXEC
- test macro in favor of HAVE_REGNEXEC test macro created
- by above change.
-
- * djgpp/config.bat: Play games to handle "install-sh",
- DOS filename restrictions, GNU makefile default rules,
- and getting a correct run of "configure" (contributed
- by Eli Zaretskii <eliz@is.elta.co.il>).
-
- * djgpp/Makefile.am, testsuite/Makefile.am, testsuite/Makefile.in,
- Makefile.am, configure.in: Various automake targets
- (such as distcheck) failed with old configuration.
- The simplest solution was to just add these .am
- files. (The testsuite/Makefile.in was just renamed to
- testsuite/Makefile.am, then various redundant defines and
- targets were deleted.) (Reported by Erick Branderhorst
- <Erick.Branderhorst@asml.nl>.)
-
- * testsuite/dc.good, testsuite/dc.inp: per suggestion from
- Greg Ubben <gsu@romulus.ncsc.mil>, use base 16 output to
- exercise even more of the dc.sed script.
-
- * configure.in, testsuite/version.good: update to beta13.
-
-Sun Jun 28 16:21:02 PDT 1998 Ken Pizzini <ken@gnu.org>
-
- *** Version 3.01-beta12 released
-
- * doc/sed.texi: Avoid mixing @code and @samp markups together:
- they look ugly in Info. Use @url and @email instead of @example.
- Add indexes. (Basis of changes contributed by Eli Zaretskii.)
-
- * djgpp/*, Makefile.am: add support for the DJGPP compiler,
- contributed by Eli Zaretskii <eliz@is.elta.co.il>.
-
- * dc.sed, testsuite/Makefile.in, testsuite/dc.inp, testsuite/dc.good:
- added this remarkable script, written and contributed
- by Greg Ubben <gsu@romulus.ncsc.mil>, both as a work of
- art for general admiration, and also for use in regression
- testing.
-
- * configure.in, lib/Makefile.am: add --with-regex=regexlib
- option, which overrides the use of lib/regex.c.
-
- * configure.in, testsuite/version.good: update to beta12.
-
-Fri Jun 12 16:41:48 PDT 1998 Ken Pizzini <ken@gnu.org>
-
- *** Version 3.01-beta11 released
-
- * sed/compile.c: add module-static variables first_script
- (for #n change below) and pending_text (for a/c/i change
- below).
-
- * sed/compile.c(compile_file), sed/compile.c(compile_program):
- Instead of having #n trigger the -n option in *any file*,
- have #n trigger the -n option only if they are the first
- two bytes of the first script or script-file.
-
- * sed/compile.c(compile_string), sed/compile.c(compile_file):
- clear the first_script variable at end of these functions.
-
- * sed/sed.h: tease out the struct text_buf declaration from
- struct sed_cmd, so that a pointer to such can be passed
- to new sed/compile.c(read_text) function.
-
- * sed/compile.c(compile_program), sed/compile.c(read_text):
- Tease out handling of text to a/c/i commands to new
- read_text() function. Handle (via aid of pending_text
- variable) texts which span more than one script/script-file
- option. In particular, restore the ability to have this
- work: sed -e '1i\' -e 'foo'
-
- * sed/compile.c(check_final_program): close off any dangling
- pending_text allocation.
-
-Thu Jun 11 11:17:46 PDT 1998 Ken Pizzini <ken@gnu.org>
-
- * sed/execute.c(do_subst): fixed two bugs: s/ */X/g was failing
- to match the final empty string after the end of the pattern
- space; and /^foo$/s/o/x/3p was printing, despite the failure
- to do a substition.
-
-Fri Jun 5 04:40:24 PDT 1998 Ken Pizzini <ken@gnu.org>
-
- * configure.in: change the AC_ARG_WITH(regnexec, ...)
- to be the more appropriate AC_ARG_ENABLE(regnexec, ...).
-
- * configure.in, testsuite/version.good: update to beta11.
-
-Fri Jun 5 00:54:25 PDT 1998 Ken Pizzini <ken@gnu.org>
-
- *** Version 3.01-beta10 released
-
- * sed/execute.c: forgot to P_() the prototype and
- old-style the declaration for bootstrap_memchr()!
-
-Thu Jun 4 18:42:30 PDT 1998 Ken Pizzini <ken@gnu.org>
-
- * sed/compile.c(snarf_char_class): added code to
- recognize \n or \<newline> sequence within a
- char-class as the newline character.
-
-Tue Jun 2 11:56:02 PDT 1998 Ken Pizzini <ken@gnu.org>
-
- * configure.in: added check for <sys/types.h> and
- a AC_ARG_WITH(regnexec,...) check, to simplify use
- of other regex libraries which have regexec() but
- not regnexec(), with the corresponding loss of
- functionality (regexps will not work right against
- input lines which contain NULs).
-
- * sed/execute.c: add nul_append() function, a #define
- for a regnexec() -> regexec() macro (conditional on
- the lack of the WITH_REGNEXEC symbol), and a couple
- of calls to nul_append() (in match_an_address_p()
- and do_subst()) to permit the use of the POSIX standard
- regexec() function call instead of the suggested
- regnexec() call.
-
- * sed/compile.c, sed/execute.c, sed/sed.c: check for
- <sys/types.h> and include it (before "regex.h") if
- available. This makes it simpler to use the system's
- regex library instead of the one in lib/regex.c, should
- that be desired.
-
-Tue Jun 2 08:41:05 PDT 1998 Ken Pizzini <ken@gnu.org>
-
- * sed/basicdefs.h: define VCAST macros to allow sed to
- compile on systems which predate the definition
- of "void *", and yet still get feedback about
- stupid programming errors from systems which *do*
- know about "void *"s. Also define MALLOC, REALLOC,
- MEMDUP, and FREE macros to keep under control the
- degree of code ugliness which would otherwise be
- introduced in making use of the VCAST macro.
-
- * sed/compile.c, sed/execute.c, sed/sed.c, sed/utils.c:
- pervasively use the new VCAST, MALLOC, REALLOC, MEMDUP,
- and FREE macros wherever appropriate.
-
- * sed/utils.c, sed/utils.h: correct type of first arguments
- to ck_fread() and ck_fwrite() to be [const] VOID *.
-
- * sed/basicdefs.h, sed/execute.c: protect against
- the rumored systems which stupidly #define __STDC__ 0.
-
- * testsuite/help.good, testsuite/Makefile.in: make
- the ``help'' test insensitive to the spelling of
- the executable's name. Also, enhanced `make clean'
- target.
-
- * doc/sed.texi, doc/sed.1: correct documentation of `q'
- command; fix typos.
-
- * configure, testsuite/version.good: update to beta10.
-
-Sat May 30 17:28:00 PDT 1998 Ken Pizzini <ken@gnu.org>
-
- *** Version 3.01-beta9 released
-
- * Makefile.am: make testsuite a normal SUBDIR.
-
- * configure.in: discontinue using AC_ISC_POSIX --
- check for -lcposix library instead; added
- testsuite/Makefile to AC_OUTPUT list.
-
- * lib/memmove.c(memmove): fixed wrong sense used
- for HAVE_BCOPY test.
-
- * sed/execute.c: checked more specifically for a version
- of gcc which supports __attribute__ (i.e., >= 2.7).
-
- * testsuite/*: renamed files to fit 14 char limit.
-
- * testsuite/Makefile, testsuite/Makefile.in: Makefile
- renamed to Makefile.in and then modified so that
- "make -j check" from top directory will work.
-
- * testsuite/subwrite.sed, testsuite/writeout.sed: changed
- file name of the "w" command to be consistent with the
- new naming used in testsuite/Makefile.in.
-
- * doc/sed.1, doc/sed.texi: fixed some typos, formatting
- glitches, and poor wordings.
-
-Sat May 30 04:02:29 PDT 1998 Ken Pizzini <ken@gnu.org>
-
- * configure.in: specify that config.h is to be derived
- from config_h.in in order to avoid the braindead
- DOS filesystem limitations.
-
-Fri May 29 21:56:30 PDT 1998 Ken Pizzini <ken@gnu.org>
-
- * sed/compile.c(compile_address), doc/sed.texi: gave
- a better definition to the meaning of N~0 address
- forms -- N~M addresses now mean that lines match
- when there exists a non-negative x such that
- lineno == N+x*M.
-
-Fri May 29 12:07:38 PDT 1998 Ken Pizzini <ken@gnu.org>
-
- * sed/compile.c(compile_address),
- sed/execute.c(match_an_address_p): update semantics of
- N~M address form: now N is the first line which will
- match and M is the step between succeeding matches.
- If N<M this works out to the same as before, but the
- new behavior for N>=M seems more useful.
-
- * doc/sed.1, doc/sed.texi: update documentation of N~M
- address form; added "Other Resources" node to sed.texi;
- minor formatting changes to some items in sed.1 with
- an eye to improving clarity.
-
- * configure.in, testsuite/version.good: update to beta9.
-
-Sat May 23 20:04:31 HST 1998 Ken Pizzini <ken@gnu.org>
-
- *** Version 3.01-beta8 released
-
- * sed/compile.c(compile_regex): forgot to make last_re be
- a *copy* of the buffered text in today's earlier fix.
-
- * sed/execute.c(read_file_line): EOF check was wrong --
- it forgot to allow for the possibility that we were
- appending to the end of the ``line'' (instead of merely
- reading a fresh line).
-
-Sat May 23 18:07:18 HST 1998 Ken Pizzini <ken@gnu.org>
-
- * sed/compile.c(compile_regex): don't track compiled version
- of regex -- the modifiers may change. Track the regex
- source instead. (For "last regex" (aka //) notation.)
-
- * configure.in, testsuite/version.good: update to beta8.
-
-Sat May 23 16:07:09 HST 1998 Ken Pizzini <ken@gnu.org>
-
- *** Version 3.01-beta7 released
-
- * sed/execute.c: #undef'd EXPERIMENTAL_DASH_N_OPTIMIZATION
- because its code is buggy.
-
-Tue May 19 17:03:52 HST 1998 Ken Pizzini <ken@gnu.org>
-
- * sed/sed.c: label rx library code as such with #ifdefs
- (instead of just #if 0).
-
- * sed/compile.c(compile_program): make incremental
- improvement to the "Unknown command" error message.
-
-Sat May 16 23:16:26 HST 1998 Ken Pizzini <ken@gnu.org>
-
- * testsuite/Makefile: simplify: get rid of automatic run
- against system's sed; don't time by default; allow for
- alternative comparison command.
-
- * configure.in, testsuite/version.good: update to beta7.
-
-Wed May 13 21:44:28 PDT 1998 Ken Pizzini <ken@gnu.org>
-
- *** Version 3.01-beta6 released
-
- * lib/Makefile.am: fix spelling of libsed_a_LIBADD in
- libsed_a_DEPENDENCIES.
-
- * configure.in, testsuite/version.good: update to beta6.
-
-Wed May 13 14:38:08 PDT 1998 Ken Pizzini <ken@gnu.org>
-
- *** Version 3.01-beta5 released
-
- * sed/execute.c(do_subst): added not_bol_p variable to track when
- we have iterated past the beginning of the pattern.
- [Thanks to Jim Meyering <meyering@ascend.com> for the bug report.]
-
-Wed May 13 13:54:04 PDT 1998 Ken Pizzini <ken@gnu.org>
-
- * sed/execute.c(bootstrap_memchr): new function. When
- bootstrapping we don't know if we are on a 64-bit machine,
- so lib/memchr.c breaks. Supply this (slow) implementation
- just to get us bootstrapped.
-
- * bootstrap.sh: add a #define BOOTSTRAP symbol; add -I.
- for emphasis for the compiles in sed/; be explicit
- about what files we're bothering to compile.
-
- * configure.in, testsuite/version.good: update version
- to beta5.
-
-Wed May 13 06:39:06 PDT 1998 Ken Pizzini <ken@gnu.org>
-
- *** Version 3.01-beta4 released
-
- * rename writeout.good? to wrtout?.good and subwrite.good? to
- subwrt?.good to comply with DOS 8+3 file name restrictions.
- [Eli Zaretskii <eliz@is.elta.co.il> suggested this to
- simplify DJGPP ports, and it was easy.]
-
- * testsuite/Makefile: reflect above name changes.
-
-Wed May 12 21:09:32 PDT 1998 Ken Pizzini <ken@gnu.org>
-
- * sed/sed.c(usage): fix non-portable omission of \n\ at end of
- lines within long string.
-
- * sed/sed.c(main): remove spurious argument to fprintf() in the
- 'V'ersion output.
-
- * sed/execute.c(line_append): embed newline between the two
- text fragments unconditionally.
-
- * sed/execute.c(do_subst): change structure assignment to memcpy()
- (for portability reasons).
-
- * README.bootstrap: suggest using -w option.
-
-Tue May 12 10:02:37 PDT 1998 Ken Pizzini <ken@gnu.org>
-
- * configure.in: use AC_REPLACE_FUNCS where appropriate.
-
- * lib/Makefile.am: updated to reflect AC_REPLACE_FUNCS change in
- configure.in.
-
- * lib/memchr.c lib/memcmp.c: revert to standard GNU versions.
-
- * lib/alloca.c: added this missing file.
-
- * testsuite/version.good: updated for new version identifier.
-
-Mon May 11 18:50:56 PDT 1998 Ken Pizzini <ken@gnu.org>
-
- *** Version 3.01-beta3 released
-
- * sed/Makefile.am: fix INCLUDES to work right with VPATH.
- [Thanks to Jim Meyering <meyering@ascend.com> for the bug report.]
-
- * sed/sed.c(usage): make --help output more user-friendly?
-
- * sed/execute.c(execute_program): fix bug in 'x' command introduced
- in the alleged portability fix of May 9.
-
- * configure.in: update version to 3.01-beta3.
-
- * testsuite/version.good, testsuite/help.good: freshen with
- latest output.
-
-Sat May 9 22:35:45 PDT 1998 Ken Pizzini <ken@gnu.org>
-
- *** Version 3.01-beta2 released
-
- * sed/sed.c: add #include <sys/types.h> in HAVE_MMAP
- block (needed on some machines).
-
- * lib/memmove.c: #include <memory.h>, if HAVE_MEMORY_H.
-
-Sat May 9 21:29:00 PDT 1998 Ken Pizzini <ken@gnu.org>
-
- * configure.in: remove dangling references to rx library;
- added HEADER and FUNC checks for items used by source in
- lib/.
-
- * lib/ansidecl.h, lib/memcopy.h, lib/pagecopy.h, lib/string.h
- lib/memcpy.c, lib/memmove.c: deletes these files. There
- are still pieces of glibc missing to support these, and
- it isn't worth the headache right now.
-
- * lib/memmove.c: de novo, simpler version. Uses bcopy()
- if available, and slow-but-simple code if not.
-
- * lib/Makefile.am: remove references to deleted files.
- Added forgotten reference to memcpy.c. Re-ordered
- SOURCE entries to reflect dependencies for systems
- which lack ranlib.
-
- * sed/basicdefs.h: updated to reflect above changes to lib/,
- and experience with non-STDC compilers.
-
- * lib/regex.c: made regerror() function publicly visible.
-
- * lib/strerror.c: use old-style function declaration.
-
- * sed/compile.c, sed/execute.c, sed/sed.c, sed/utils.c,
- sed/sed.h, sed/utils.h: ensure that private definitions of
- some symbols do not cause problems when #include'ing system
- headers (mainly by re-ordering the #include directives).
- (This is particularly an issue for bootstrap.sh runs.)
-
- * sed/execute.c (execute_program): use memcpy() instead of
- structure assingment ('x' command), for portablility to
- old compilers.
-
- * sed/execute.c (slow_getline): use old-style function
- declaration, with a P_ prototype.
-
- * sed/sed.c: change the type of the fallback MAP_FAILED
- definition to work on archaic systems. (Modern systems
- should be defining it themselves, so the change from
- void * shouldn't be a problem.)
-
- * bootstrap.sh, README.bootstrap: actual testing of bootstrap
- code revealed that I was too optimistic. Redesigned and
- replaced implementation.
-
- * testsuite/Makefile: ignore errors from reference-implementation
- seds that aren't up to snuff.
-
- * testsuite/help.good, testsuite/version.good: update to
- current version's output.
-
-Fri May 8 15:08:28 PDT 1998 Ken Pizzini <ken@gnu.org>
-
- *** Version 3.01-beta1 released
-
- * sed/sed.c (main, usage): once again tweak the --help and
- --version output to bettery comply with GNU coding standards.
-
- * testsuite/help.good, testsuite/version.good: update to
- reflect above change.
-
- * doc/sed.texi: fix "Invoking" node's spelling to comply
- with GNU standards.
-
-Fri May 8 11:43:10 PDT 1998 Ken Pizzini <ken@gnu.org>
-
- * doc/sed.1, doc/Makefile.am: wrote (very basic) man page.
-
-Thu May 7 20:40:21 PDT 1998 Ken Pizzini <ken@gnu.org>
-
- * lib/Makefile.am, lib/memmove.c, lib/memchr.c, lib/regex.c,
- lib/memcpy.c, lib/regex.h, lib/memcopy.h, lib/string.h,
- lib/pagecopy.h, lib/ansidecl.h: grab yet-another-version
- from gnu.org for baseline and/or edit copyright boilerplate
- using official lgpl2gpl.sed script. Take care not to
- loose regnexec() interface or special conditional-compilation
- code.
-
-Wed May 6 23:35:12 PDT 1998 Ken Pizzini <ken@gnu.org>
-
- * lib/regex.c, lib/regex.h: take from grep-2.1 distribution,
- then trivially added the regnexec() interface.
-
- * sed/sed.c, sed/compile.c, sed/execute.c: made modifications
- to work with regex instead of rx.
-
- * rx/*: deleted directory; the code is just too slow.
- I think it will be easier to extend regex to fully
- support POSIX.2 than to tune rx to be reasonable.
- Even if this supposition is wrong, I'd rather make
- the 3.01 release with the slightly deficient regex.
-
- * Makefile.am lib/Makefile.am, sed/Makefile.am: made changes
- related to the substitution of regex for rx.
-
- * lib/Makefile.am, sed/Makefile.am: since regex is not a
- ``compatability'' module, changed name of library to
- ``libsed.a''.
-
- * lib/memchr.c, lib/memcpy.c, lib/memmove.c: add conditional
- compilation code to leave zero-sized .o file if system
- already supports the implemented function.
-
- * testsuite/help.good, testsuite/version.good: brought
- up-to-date (once again).
-
- * NEWS, ANNOUNCE: changes to reflect this batch of changes.
-
-Wed May 6 18:40:47 PDT 1998 Ken Pizzini <ken@gnu.org>
-
- * sed/execute.c: discovered awful bug in '}' handling:
- it could read past the end of vec (because `n' was
- being decremented below zero)! Needed to "continue"
- instead of "break".
-
-Tue May 5 14:34:38 PDT 1998 Ken Pizzini <ken@gnu.org>
-
- * doc/sed.texi, doc/version.texi: wrote some rudimentary
- texinfo documentation.
-
- * ANNOUNCE, NEWS, README, README.rx, Makefile.am:
- more updates for the upcoming beta-release.
-
- * sed/compile.c, sed/execute.c, sed/sed.c, sed/utils.c,
- sed/sed.h, lib/strerror.c: update copyright notice text.
-
-Fri May 1 15:41:37 PDT 1998 Ken Pizzini <ken@gnu.org>
-
- * sed/execute.c (match_an_address_p, match_address_p): if
- the second element of an address range is a line number,
- and that line number is *less than* (or equal to) the
- current line number, we only match the one line (per
- POSIX.2, section 4.55.7.1). [Bug discovered as reported
- in the seders mailing list FAQ.]
-
- * AUTHORS, NEWS, acconfig.h, configure.in, doc/Makefile.am,
- lib/Makefile.am, sed/Makefile.am, lib/README,
- testsuite/help.good, testsuite/version.good:
- Updated in anticipation of the 3.01-beta1 release.
- Reorganized development source tree to make creation
- of a distribution simpler. Most notable changes were
- to the various Makefile.am files and configure.in, but
- some minor edits (such as deleting or changing #include
- directives) have been made in many other source files.
-
- * bootstrap.sh, README.bootstrap: created a mechanism for
- creating sed on a system which lacks a working sed.
-
-Thu Apr 16 23:52:11 PDT 1998 Ken Pizzini <ken@gnu.org>
-
- * sed.h, sed.c, execute.c, compile.c: did a spell-check on
- the comments; fixed several typos.
-
-Thu Apr 16 13:43:01 PDT 1998 Ken Pizzini <ken@gnu.org>
-
- * execute.c (do_subst): fixed bug where the "replaced" flag
- was being set to one inappropriately when at least one
- but fewer than sub->numb matches of the regexp were found.
- (Thanks to Simon Taylor <staylor@hermes.iaccess.com.au>
- for the bug report.)
-
-Wed Apr 15 11:35:31 PDT 1998 Ken Pizzini <ken@gnu.org>
-
- * sed.h, sed.c, compile.c, execute.c: having a concern that
- a cast was being done inappropriately, and realizing that
- there is no quick way to locate all casts in a program, I
- went through and marked all casts with a simple macro.
- Now it is a simple matter to locate the casts, and it is
- also a simple matter to turn of casts for a lint session
- (if it should be desired).
-
-Wed Apr 15 10:29:21 PDT 1998 Ken Pizzini <ken@gnu.org>
-
- * compile.c, sed.c: redo compile phase so that brace
- expressions can be spread across multiple files.
- For example:
- printf '{' >a; printf 'l;d' >b; printf '}' >c
- sed -f a -f b -f c foo
- will now compile (and work), instead of complaining
- about an unmatched '{'. The mess created in compile.c
- allowed a little simplification to the command-line
- processing of "-e" options in sed.c.
-
- sed.h: added (opaque) err_info member to struct vector;
- added comments to the members of struct vector.
-
-Wed Apr 14 23:50:50 PDT 1998 Ken Pizzini <ken@gnu.org>
-
- * sed.h, sed.c, compile.c, execute.c: added types countT and
- flagT in order to clarify what various "int"s were doing.
- Also makes it easy to change the type used for counts
- (for example, to "unsigned long long") if desired, although
- there are still some gotchas (such as the printf() format
- for the '=' command).
-
-Tue Apr 14 17:34:54 PDT 1998 Ken Pizzini <ken@gnu.org>
-
- * execute.c (execute_program, process_files, count_branches,
- shrink_program): Added a first attempt at program optimization.
- We now can quit early if we are running with the "-n"
- and all of the commands are known to be valid only for
- lines less than the current line. Thus the "sed" in
- "foo | sed -n 1,2p" will print read three lines, printint
- the first two, and then quit, regardless of how much longer
- "foo" might run or output. This optimization does not buy
- much in most cases (it sometimes even costs a little),
- but when it does help it can help big. The code is
- all conditionally compiled based on the
- EXPERIMENTAL_DASH_N_OPTIMIZATION symbol being #defined,
- so it can be easily omitted if it causes problems.
-
-Tue Apr 14 12:25:06 PDT 1998 Ken Pizzini <ken@gnu.org>
-
- * execute.c (test_dollar_EOF, last_file_with_data_p):
- test_dollar_EOF() was incorrectly returning a false (0)
- when there were unprocessed files, none of which had any
- data (either unopenable or zero-length). Created
- last_file_with_data_p() to detect this situation, and
- modified test_dollar_EOF() to make use of it.
-
-Thu Apr 2 23:02:18 PST 1998 Ken Pizzini <ken@gnu.org>
-
- * compile.c (match_slash): match_slash() did not handle
- [.coll.], [=equiv=], and [:class:] sequences within a
- character class. Added snarf_char_class() [which is a
- remote derivative of parse_char_class() from GNU ed-0.2]
- to deal with the details, and altered match_slash()
- to make use of it. Also created the trivial
- add_then_next() to avoid clutter in snarf_char_class().
-
-Thu Apr 2 20:34:42 PST 1998 Ken Pizzini <ken@gnu.org>
-
- * execute.c, sed.c, sed.h: There was a severe bug in
- how the code handled "sed 5n a b" when "a" consists
- of exactly five lines -- it behaved like "sed 5q a b"!
-
- Rearranged where files get opened -- large scale
- changes primarily involving main(), process_files(),
- and read_pattern_space(), but also touching on several
- other parts of execute.c. The read_pattern_space()
- function became unwieldly and parts were split into
- open_next_file(), closedown(), read_always_fail(),
- read_mem_line(), and read_file_line(). The
- at_end_of_file_p() function became obsolete and was
- eliminated; test_dollar_EOF_p() was updated. A few
- global and module-static variables were elminated, and
- "struct line" was extended; comments were added to the
- "struct line" declartation to document some important
- dependencies in it.
-
- I undertook the reorganization with dread, but I
- feel that the new organization is an improvement
- well beyond just fixing the bug that inspired it.
-
-Thu Apr 2 01:16:25 PST 1998 Ken Pizzini <ken@gnu.org>
-
- * execute.c (read_file_line, slow_getline): the fread()
- buffering code gives insufficient feedback to a user
- running sed with a tty input device, so I created
- slow_getline() for reading from a tty device.
- Additionally, EOF detection has been made a little more
- sensitive to avoid requiring multiple EOFs to be entered
- from a tty.
-
- * configure.in: added isatty() check.
-
-Wed Apr 1 11:04:30 PST 1998 Ken Pizzini <ken@gnu.org>
-
- * configure.in (CPPFLAGS, LDFLAGS, LIBS):
- Set to appropriate values if large file support needs
- explicit enabling. Code fragment taken from a 1997-10-25
- patch to gawk by Paul Eggert <eggert@twinsun.com>
-
-Thu Aug 14 17:43:27 PDT 1997 Ken Pizzini <ken@gnu.org>
-
- * utils.c (ck_fclose): modified to ignore NULL parameter.
-
-Thu Aug 14 12:08:45 PDT 1997 Ken Pizzini <ken@gnu.org>
-
- * execute.c: tweaked execute_program() to eliminate
- gratuitous "goto" usage.
-
-Thu Aug 14 11:30:04 PDT 1997 Ken Pizzini <ken@gnu.org>
-
- * compile.c: added case-insensitive modifier ('I') to
- address and s/// regexps. The s/// case also accepts
- the more popular 'i' modifier. (The address regexp
- cannot use 'i' as a modifier, as that conflicts with
- the use of the 'i'nsert command.)
-
-Thu Aug 14 09:29:06 PDT 1997 Ken Pizzini <ken@gnu.org>
-
- * compile.c: abstracted out match_slash() from the s///, y///,
- and address-regexp special-case codes.
-
- * execute.c: made dump_append_queue() use ck_fread() instead
- of hand-rolled error checking.
-
-Mon Jul 28 10:50:41 PDT 1997 Ken Pizzini <ken@gnu.org>
-
- * sed.c, sed.h, execute.c: POSIX.2, section 4.55.7, says that
- a newline must end *every* output line. But I think that
- it is useful (when seding a binary file) to omit a trailing
- newline if the input lacks one. Thus the addition of
- POSIXLY_CORRECT behavior.
-
- * execute.c: however, when seding multiple files my feeling
- is that it makes sense to have each file but the last
- behave as-if it ended in a newline. Modified read_pattern_space()
- accordingly.
-
- * utils.c: realized that add1_buffer(), for performance reasons,
- shouldn't be calling memcpy() (indirectly via add_buffer()),
- so rewrote it.
-
-Sat Jul 26 23:08:28 PDT 1997 Ken Pizzini <ken@gnu.org>
-
- * execute.c: attempted to make read_pattern_space more
- efficient for the the non-mmap() case.
-
- * utils.c, utils.h, execute.c: new function ck_fread()
- created and used.
-
-Sat Jul 26 20:22:14 PDT 1997 Ken Pizzini <ken@gnu.org>
-
- * execute.c, compile.c, sed.c: abstracted the mmap()
- interface into map_file()/unmap_file() [sed.c], and
- changed the ad-hoc code in compile_file() [compile.c]
- and process_file() [execute.c] to make use of the new
- interface.
-
-Sat Jul 26 19:45:46 PDT 1997 Ken Pizzini <ken@gnu.org>
-
- * execute.c, compile.c, configure.in: Check to see if mmap()
- is available; if so make use of it on regular files.
-
- * compile.c: compile_file() now closes the input file
- when it is through!
-
-Sun Jul 20 23:57:02 PDT 1997 Ken Pizzini <ken@gnu.org>
-
- * compile.c: modified parsing to permit whitespace in more
- places where it makes sense;
- added backslash escaping to the y/// command, per POSIX.
-
- * execute.c: Merged append_pattern_space() into read_pattern_space();
- moved body of 's' command to new function do_subst();
- moved body of 'l' command to new function do_list();
- changed output of 'l' command to conform to POSIX.2;
- made line handling conform to POSIX; added output_line() function;
- redesigned append-space algorithm; added append_queue structure and
- the next_append_slot() and dump_append_queue() functions.
-
- * sed.h: moved the definition of what is now struct subst
- outside of the definition of struct sed_cmd.
-
-Sat Jul 19 16:29:09 PDT 1997 Ken Pizzini <ken@gnu.org>
-
- * sed.c, execute.c, sed.h, Makefile.am: Separated out the
- pieces dealing with executing the program from the top-level
- parameter parsing and control.
-
-Sat Jul 19 01:16:35 PDT 1997 Ken Pizzini <ken@gnu.org>
-
- * sed.c, compile.c, sed.h, Makefile.am: separate out the
- pieces dealing with compiling the program from the pieces
- dealing with interpreting the result.
-
- * compile.c: add functions in_nonblank() and in_integer(),
- and change interface to compile_address() with an eye
- to making code clearer.
-
-Fri Jul 18 13:35:50 PDT 1997 Ken Pizzini <ken@gnu.org>
-
- * utils.c: attempt at a quasi-unification of the
- STDC and traditional C approaches to panic().
-
- * sed.c: eliminate some gratuitous bit twiddling.
- (Using flag bits can be a useful technique, but
- this code is cleaner without them.)
-
- * sed.c: place mutually exclusive members of struct addr
- within a union, mainly to document the exclusivity;
- eliminate unused structure members from struct fp_list;
- eliminate unnecessary module-global variables;
- remove some #if 0 code that is too odd to keep;
- allegedly simplified the 'l' case of execute_program();
- allegedly simplified inchar();
- localized some static variables;
- renamed some variables to better document their purpose;
- removed some goto-s rendered obsolete by other changes.
-
-Thu Jul 17 15:30:44 PDT 1997 Ken Pizzini <ken@gnu.org>
-
- * utils.c, utils.h, sed.c: added and made use of
- ck_free() function.
-
- * utils.c, utils.h, sed.c: changed all the *_buffer()
- functions to take/return an incomplete type
- "struct buffer *" instead of using VOID *.
-
- * utils.c, utils.h, sed.c: renamed "finish_buffer()"
- to "free_buffer()", on the premise that the new
- name better describes the function's purpose.
-
-Wed Jul 16 13:52:14 PDT 1997 Ken Pizzini <ken@gnu.org>
-
- * utils.c, utils.h, sed.c: added and made use of
- ck_memdup() function.
-
- * sed.c: protected a call to add1_buffer() in
- compile_program() which could have tried to
- push an EOF if a a/i/c command ended with
- a '\', EOF sequence.
-
- * utils.c: added sanity check to add1_buffer() so that
- EOF will not be added to the buffer.
-
-Wed Jul 16 03:56:26 PDT 1997 Ken Pizzini <ken@gnu.org>
-
- * configure.in, compat.h, compat.c: added memchr.
-
- * sed.c: got rid of arbitrary NUM_FPS limit;
- made global functions and variables "static" where appropriate;
- make various cosmetic changes, hopefully improving readability;
- simplified some redundant predicates;
- simplified some code, but nothing fundamental (yet?).
-
-Wed Jul 16 00:24:54 PDT 1997 Ken Pizzini <ken@gnu.org>
-
- * alloca.c, getopt.c, getopt.h, getopt1.c: updated from
- versions in textutils-1.22.
-
- * Makefile.in, Makefile.am, configure.in: put in automake support.
-
- * basicdefs.h, compat.h, compat.c [, sed.c, utils.c]: took out
- some very ugly compatibility #ifdefs and packaged into one
- place.
-
- * sed.c, utils.c: some gratuitous formatting changes.
-
- * utils.c: changed datatype of utils_id_s in order to
- eliminate arbitrary array size.
-
-Sun Jul 13 17:00:26 PDT 1997 Ken Pizzini <ken@gnu.org>
-
- * sed.c, utils.c, utils.h: de-linting oriented cleanup.
-
-Sun Jul 13 00:46:48 PDT 1997 Ken Pizzini <ken@gnu.org>
-
- * sed.c: fixed bug which caused SEGV for files missing a
- final newline. Corrected calls to regnexec to pass the
- proper parameters, in the proper order.
-
-Sat Dec 30 20:16:59 1995 Tom Lord <lord@beehive>
-
- *** Version 3.00 released
-
- * sed.c: Use posix entry points to regexp functions.
- Fix enough bugs to pass the test-suite.
-
-....... Jason Molenda <crash@cygnus.com>
-
- * testsuite/: trippy test suite.
-
-
-Wed May 11 07:46:24 1994 Chip Salzenberg (chip@fin.uucp)
-
- *** Version 2.05 released
-
- * sed.c (compile_address): Recognize numeric addresses.
- Fixes typo made during installation of "~" feature.
-
-Sat Apr 30 17:17:38 1994 Tom Lord (lord@x1.cygnus.com)
-
- *** Version 2.04 released
-
- * sed.c: applied a patch from
- From: kap1@tao.cpe.uchicago.edu (Dietrich Kappe)
-
- Dietrich writes:
-
- As my contribution to the creeping feature creature in sed,
- here is a new type of address. The address has form n~m,
- which means "the line number is equal to n modulo m." The
- modifications to sed are trivial, and the general
- usefulness of this address should be obvious. If m is 0 or
- missing, 1 is used in its place (could be a bug or a
- feature :-).
-
-Sat Apr 30 17:17:38 1994 Tom Lord (lord@x1.cygnus.com)
-
- * rx.c (solve_destination): protect `solution' more carefully.
- This is a cleanup of a patch from Kevin Buettner
- (kev@cujo.geg.mot.com).
-
-Sat Apr 30 17:17:38 1994 Tom Lord (lord@x1.cygnus.com)
-
- * rx.c: make translation tables unsigned chars
-
- * sed.c (main): Compile accumulated -e commands as
- soon as a -f command comes along. This ensures that
- the commands are executed in the right order.
-
-Mon Oct 25 14:41:47 1993 Tom Lord (lord@rtl.cygnus.com)
-
- * sed.c (execute_program): 'w' flushes the buffer after it
- writes -- diagnosed by doug@research.att.com. 'r' and 'w' to
- the same file is now supported -- hopefully even in a way that
- satisfies Posix (it now behaves differently from some
- /bin/sed's and the spec is hard to read so i'm not sure).
-
- Also, 'r' of a non-existent file is now permitted.
-
-Mon Oct 11 21:06:10 1993 Tom Lord (lord@cygnus.com)
-
- * sed.c (execute_program): remember that 'b' and 't' are more
- like longjmp than goto. Patch from tom@basil.icce.rug.nl (Tom
- R.Hageman)
-
- * rx.c: patch from From: fin!chip@rutgers.edu (Chip
- Salzenberg) to get rid of compiler warnings.
-
-
-Sat Aug 7 01:04:59 1993 Tom Lord (lord@unix7.andrew.cmu.edu)
-
- *** Version 2.03 released
-
- * sed.c (compile_regex): report error messages for bogus
- regexps.
-
- SEE ALSO: ChangeLog.rx
-
-
-Wed Jul 21 00:28:03 1993 Tom Lord (lord@unix8.andrew.cmu.edu)
-
- * alloca.c: upgraded to a more recent version
-
- * rx.c (re_search_2): prefer matches with longer
- subexpressions to those with shorter ones, giving precedence
- to low numbered subexpressions.
-
- * rx.c (re_compile): don't free `params' if its null.
-
-Fri Jul 16 01:12:08 1993 Tom Lord (lord@unix8.andrew.cmu.edu)
-
- * rx.[ch], sed.c: rx replaces regex.
-
-
-
-Thu May 27 11:13:03 1993 Tom Lord (lord@unix3.andrew.cmu.edu)
-
- * sed.c (execute_program, match_addr): caught more cases
- that need to be sensitive to a missing \n at EOF.
-
-Fri May 21 00:39:22 1993 Tom Lord (lord@unix8.andrew.cmu.edu)
-
- * sed.c (execute_program): apply gaumondp's patch
- to fix '\xabcxs/foo/bar/'.
-
- * sed.c (execute_program):
- If a second address is a regexp, never match it on the
- same line as the first address.
-
- * sed.c (compile_regexp):
- Numeric ranges x,y s.t. y < x are now treated as x,x.
- There was a bug in that they were being handled like x,x+1.
-
- * sed.c (execute_program, read_pattern_space,
- append_pattern_space) don't add newlines to lines
- that don't have them.
-
-Wed May 19 13:34:45 1993 Tom Lord (lord@unix9.andrew.cmu.edu)
-
- * sed.c (compile_program): grok \\n in comments.
-
-Mon May 17 16:34:50 1993 Tom Lord (lord@unix9.andrew.cmu.edu)
-
- * alloca.c: new (standard) file
-
- * configure.in: AC_CONSTified
-
- * sed.c (compile_program): properly diagnose the error of
- a missing command (e.g. sed /x/). (thanks gaumondp)
-
- * sed.c (compile_regexp): handle character classes correctly.
- Thanks gaumondp@ERE.UMontreal.CA
- and schwab@issan.informatik.uni-dortmund.de.
-
-Thu May 6 12:37:18 1993 Tom Lord (lord@unix10.andrew.cmu.edu)
-
- * sed.c (compile_filename, execute_program): don't use
- `access' or `/dev/null'.
-
- * sed.c (execute_program): 'N' at EOF should delete the pat buf.
-
- * sed.c (compile_filename): truncate, don't append files
- being openned for `w' or `s///w'
-
- * sed.c (execute_program): -n switch shouldn't effect `i' or `c'.
-
- * sed.c (compile_program): don't compile unescaped newlines
- into the substitution string of an `s' command (they are an error).
-
- * sed.c (compile_regex): correctly skip over character
- sets that contain `]'.
-
- * sed.c (execute_program): patch from gaumondp
- Correctly handle empty-string matches in the case of an `s'
- command with a repeat count.
-
- * sed.c (compile_program): patch from gaumondp@ere.UMontreal.ca.
- Don't consume characters after the label of a `b', `t' or `:' command.
-
- * sed.c (compile_program): unmatched open braces are an error.
-
- * sed.c (compile_file): when consuming an initial comment,
- count lines correctly.
-
-Wed Nov 18 02:10:58 1992 Tom Lord (lord@unix2.andrew.cmu.edu)
-
- * sed.c (execute_program): Made s///p print even if -n was
- specified.
-
- * sed.c (compile_string): Changed the type of this function to
- fix a compile warning.
-
-Wed Nov 4 17:15:34 1992 Tom Lord (lord@unix7.andrew.cmu.edu)
-
- * sed.c (main): Initialize the hold area to contain "\n"
- instead of "". In execute_program, all lines are expected
- to be newline terminated. Also, if H is the first command
- in the script, the result is a pattern buffer that begins
- with a blank line. Thanks to pinard@iro.umontreal.ca
- (Francois Pinard) for pointing out this and many other bugs.
-
- * sed.c (execute_program): Fixed a case of `D' command.
- Thanks Chris Weber <weber@bucknell.edu>
-
- * sed.c: added new tests of no_default_output to make -n work.
- Thanks Andrew Herbert <andrew@werple.apana.org.au>
-
- * sed.c, configure.in,Makefile.in: autoconfed bcopy and const.
- Thanks "J.T. Conklin" <jtc@gain.com>
-
- * sed.c: made prog_cur, prog_start, and prog_end unsigned so
- that users could write `sed -e s//foo/g'.
-
-Tue Oct 13 00:04:05 1992 Tom Lord (lord@unix3.andrew.cmu.edu)
-
- * sed.c (execute_program): fixed the cycling behavior of 'D'
-
- * sed.c: integrated patch that closes files
-
- * sed.c: changed regexp syntax
-
-Fri May 22 15:11:12 1992 Tom Lord (lord at moriarty.bh.andrew.cmu.edu)
-
- * regex.c: this is not my change, but a pointer to the fact
- that karl@gnu fixed some regexp bugs that were plaguing sed.
-
-Thu Apr 30 13:02:21 1992 Tom Lord (lord at unix3.andrew.cmu.edu)
-
- * sed.c (compile_program, execute_program)
- subprograms are now compiled with an explicit continuation ;)
- return_v and return_i in struct vector. execute_program
- no longer recurses to execute subprograms (case '{') and now
- understands a return instruction (case '{').
-
-Tue Apr 28 17:13:04 1992 Tom Lord (lord at unix7.andrew.cmu.edu)
-
- * sed.c (compile_address) added \?regexp? syntax for addresses.
-
- * sed.c (main) added {} intervals to the obscure regexp
- syntax.
-
- * sed.c (compile_program) after calling compile_address,
- normalize numeric addresses (make a2.addr_number > a1.addr_number).
- This is necessary because line numbers must match exactly,
- but sed does not try to match a2 until after a1 has matched,
- yet a1,a2 where a2 <= a1 is defined to be equivelent to
- a1,a1+1
-
-Sat Feb 29 10:55:54 1992 David J. MacKenzie (djm@nutrimat)
-
- * sed.c (usage): Document long options as starting with `--'.
-
-Mon Dec 9 23:56:40 1991 David J. MacKenzie (djm at wookumz.gnu.ai.mit.edu)
-
- * sed.c: Include sys/types.h, for new regex.h.
-
-Tue Nov 5 02:16:01 1991 David J. MacKenzie (djm at wookumz.gnu.ai.mit.edu)
-
- * utils.c: Change NO_VFPRINTF to VPRINTF_MISSING, for
- compatibility with autoconf.
-
-Mon Sep 2 22:02:40 1991 David J. MacKenzie (djm at apple-gunkies)
-
- * sed.c (compile_regex): Treat \ as a normal character when in
- a char class.
-
-Thu Aug 8 00:15:33 1991 David J. MacKenzie (djm at bleen)
-
- * Version 1.08.
-
- * sed.c (compile_filename): If reading a file fails, read
- /dev/null instead. It's what Unix and POSIX do, effectively.
-
- * sed.c (compile_regex): The 'slash' character doesn't
- terminate the regex if it's in a character class.
-
- * sed.c (main): If given no args, or bad option, print usage
- message.
- (usage): New function.
-
- * sed.c (execute_program): Amount written for 'P' command was
- wrong. From stephend@ksr.com (Stephen Davis).
-
-Wed Aug 7 16:51:14 1991 David J. MacKenzie (djm at apple-gunkies)
-
- * sed.c (append_pattern_space): Check for buffer full before
- instead of after writing to buffer. Don't need to test for
- EOF initially anymore, due to the next change.
- (execute_program): For 'n' and 'N' commands, if eof is reached
- in input, quit the script like Unix sed does.
- Fix memory allocation problems for 'a' and 'r' commands.
- (compile_program): Fix off by one error in processing comments.
- All of the above are from Tapani Tarvainen, tarvaine@tukki.jyu.fi.
-
- * sed.c (setup_jump): Use isblank instead of testing for ' '
- or '\t', for POSIX locales.
-
- * utils.c (ck_strdup): Renamed from strdup.
- * sed.c: Change callers.
-
- * sed.c, utils.c: Clean up declarations and includes to get
- rid of compiler warnings.
-
- * sed.c (main): Add long-named options. Don't complain if -n
- is given twice.
-
-Fri Aug 2 12:33:16 1991 David J. MacKenzie (djm at apple-gunkies)
-
- * configure: Support +srcdir arg. Create config.status and
- remove it and Makefile if interrupted while creating them.
- * Makefile.in: Change DESTDIR to prefix.
-
-Mon Jul 15 13:07:39 1991 David J. MacKenzie (djm at wookumz.gnu.ai.mit.edu)
-
- * sed.c (main): Add -V option to print version number.
- (USAGE): Mention -V.
-
-Mon Jul 8 01:42:22 1991 David J. MacKenzie (djm at geech.gnu.ai.mit.edu)
-
- * sed.c: Define bcopy in terms of memcpy if STDC_HEADERS as
- well as if USG.
- (compile_filename): Don't glob filename (for 'r' and 'w'
- commands). Unix sed doesn't do it and it's not very useful,
- since it can only match 0 or 1 files.
- (execute_program): Change '\a' to 007 since some compilers
- don't recognize \a.
- * utils.c: New file; code moved from sed.c.
- * Replace Makefile with Makefile.in and configure.
- Update README.
-
-Tue Mar 26 13:00:48 EST 1991 Jay Fenlason (hack@gnu.ai.mit.edu)
-
- * sed.c (match_address) Added a trivial cast for portability.
-
-Mon Feb 25 13:23:29 EST 1991 Jay Fenlason (hack@ai.mit.edu)
-
- * sed.c Changed 's' command to work with latest version of regex()
- routines, which mysteriously changed somewhere in there. . .
- A one-line patch from David Eckelkamp (eckelkamp@mcc.com).
-
- Initialize the fastmap in the hopes that it'll make sed faster.
-
-Thu Feb 21 13:42:27 EST 1991 Jay Fenlason (hack@ai.mti.edu)
-
- * sed.c Change panic to compile with other __STDC__ compilers.
-
-Wed Jan 30 10:46:38 EST 1991 Jay Fenlason (hack@ai.mit.edu)
-
- * sed.c Changed version number. Made new release.
-
-Tue Nov 27 15:34:51 EST 1990 Jay Fenlason (hack@ai.mit.edu)
-
- * sed.c (setup_jump) Don't blow chunks if there isn't a label
- after a b or t command.
-
- (main) Don't panic if it a branch command doesn't have
- a label to branch to.
-
- (main) Collect all the -e arguments together and parse them
- all at once. This way, -e { -e mumble -e } will work.
-
- All these small patches from David Schmidt (davids@isc-br.isc-br.com)
-
-Tue Sep 11 12:51:37 EDT 1990 Jay Fenlason (hack@ai.mit.edu)
-
- * sed.c Changed some function forward declarations to use VOID *
- instead of char *
-
-Mon Jul 16 11:12:54 EDT 1990 Jay Fenlason (hack@ai.mit.edu)
-
- * sed.c (ck_malloc) Use malloc(1) instead of malloc(0) if given
- a request for zero bytes.
-
-Tue Jun 5 02:05:37 1990 David J. MacKenzie (djm at albert.ai.mit.edu)
-
- * sed.c: Remove excess newlines from calls to panic.
- Reformat some comments to fit in 79 columns.
- Base whether to use void * on __STDC__, not __GNU__.
- (main): Add missing arg when printing usage message.
- Print usage if given invalid arg.
- (panic) [__STDC__]: Add missing ", ...".
- (compile_filename): Print correct error message if glob_filename
- returns NULL.
-
-Thu Apr 5 21:41:12 1990 Jim Kingdon (kingdon at pogo.ai.mit.edu)
-
- * sed.c (execute_program, case 'r'): When need to realloc append.text,
- multiply append.alloc by 2 instead of adding
- cur_cmd->x.cmd_txt.text_len.
-
-Tue Mar 6 15:55:35 EST 1990 Jay Fenlason (hack@ai.mit.edu)
-
- * sed.c (compile_regex) Allocate 10 bytes extra space needed by
- re_compile_pattern.
-
-Sun Feb 25 16:32:10 1990 Jim Kingdon (kingdon at pogo.ai.mit.edu)
-
- * sed.c (execute_program, case 'l'): Print \00 instead of \0.
- Print backslash as \\ not \.
- Print \xx instead of /xx.
-
-Thu Feb 1 14:02:28 EST 1990 hack@wookumz
-
- * sed.c (memchr) Use () inside inner loop so it will work correctly.
- A two character patch from Robert A Bruce (rab@allspice.berkeley.edu)
-
-Wed Sep 27 18:47:39 EDT 1989 hack@ai.mit.edu
-
- * sed.c (compile_regex) New function. When compiling regex,
- turn ^ into \` and $ into \' so that they won't match on embedded
- newlines. UN*X pattern matching is a crock.
- (compile_program, compile_address) call compile_regex.
-
-Mon Sep 18 10:15:32 EDT 1989 hack@ai.mit.edu
-
- * sed.c (compile_program): define translate as unsigned char * so
- that y command will work on non-ascii characters.
-
- Changed version number to 1.06.
-
-Thu Sep 14 15:57:08 EDT 1989 hack@ai.mit.edu
-
- * sed.c (compile_program) Let programs use ; to terminate } as
- well as newline.
-
- (read_file) Print an error msg to stderr if it can't open an
- input file.
-
-Thu Mar 23 18:04:46 1989 Randall Smith (randy at apple-gunkies.ai.mit.edu)
-
- * Makefile, sed.c: Added new copyright notice.
-
- * Makefile: Make distributions which follow the symlinks.
-
-hack@ai.mit.edu
-
- 1.05 Fixed error in 'r' (now does things in the right order)
-
- 1.04 Fixed s/re/rep/[number]
-
- 1.03 Fixes from Mike Haertel for regexps that match the
- empty string, and for Ritchie stdio (non-sticky EOF)
-
- 1.02 Fixed 't', 'b', ':' to trim leading spaces and tabs
- Fixed \\ in replacement of 's' command
- Added comments
-
- 1.01 Added s/re/rep/[digits]
- added #n as first line of script
- added filename globbing
- added 'l' command
- All in the name of POSIX
-
- 1.00 Began (thinking about) distributing this file
-
-Local Variables:
-mode: indented-text
-left-margin: 8
-version-control: never
-End:
+ maint: declare several "int" locals to be of type size_t
+ * sed/compile.c (compile_program): Using "int" was wrong: not only
+ too narrow, but would also evoke warnings from gcc when comparing
+ with variables of unsigned type.
+
+ maint: avoid gcc warning about unused macro
+ * sed/regexp.c (END_ERRORS): Remove definition of unused macro.
+
+ maint: avoid false-positive used-uninit. warning from gcc
+ * sed/sed.h (IF_LINT): Define.
+ * sed/compile.c (snarf_char_class) [lint]: Use it to initialize DELIM,
+ so that gcc doesn't report it is used uninitialized.
+
+ maint: enable sc_prohibit_empty_lines_at_EOF check
+ * cfg.mk (exclude_file_name_regexp--sc_prohibit_empty_lines_at_EOF):
+ * cfg.mk (local-checks-to-skip): Remove its exemption.
+ Adjust many files to end in a single newline, but exempt a few
+ test suite input and output files.
+ * testsuite/fasts.sed: Remove three empty lines at EOF.
+ * BUGS: Remove empty line at EOF.
+ * sed/mbcs.c: Likewise.
+ * sed/sed.h: Likewise.
+ * testsuite/BOOST.tests: Likewise.
+ * testsuite/dc.inp: Add a newline at EOF; there was none.
+ * testsuite/flipcase.sed: Likewise.
+ * testsuite/utf8-1.good: Likewise.
+ * testsuite/utf8-1.inp: Likewise.
+ * testsuite/utf8-2.good: Likewise.
+ * testsuite/utf8-2.inp: Likewise.
+ * testsuite/utf8-3.good: Likewise.
+ * testsuite/utf8-3.inp: Likewise.
+ * testsuite/utf8-4.good: Likewise.
+ * testsuite/utf8-4.inp: Likewise.
+ * testsuite/xbxcx.good: Likewise.
+ * testsuite/xbxcx.inp: Likewise.
+ * testsuite/xemacs.good: Likewise.
+ * testsuite/xemacs.inp: Likewise.
+
+ maint: enable sc_prohibit_tab_based_indentation syntax check
+ * cfg.mk (local-checks-to-skip): Remove its exemption.
+ Exempt all files under testsuite/, for now, and a few others.
+ * .gitmodules: Change each leading TAB to 8 spaces spaces.
+ * BUGS: Likewise.
+ * NEWS: Likewise.
+ * configure.ac: Likewise.
+ * sed/compile.c: Likewise.
+ * sed/execute.c: Likewise.
+ * sed/fmt.c: Likewise.
+ * sed/regexp.c: Likewise.
+ * sed/sed.c: Likewise.
+ * sed/sed.h: Likewise.
+ * sed/utils.c: Likewise.
+ * sed/utils.h: Likewise.
+ * COPYING: Update from coreutils.
+
+ maint: enable sc_m4_quote_check syntax check
+ * cfg.mk (local-checks-to-skip): Remove its exemption.
+ * configure.ac: Fix the under-quoting problems thus exposed.
+
+ maint: enable sc_cast_of_argument_to_free syntax check
+ * cfg.mk (local-checks-to-skip): Remove its exemption.
+ * testsuite/tst-rxspencer.c (mb_test): Remove a cast.
+
+ maint: enable sc_cast_of_alloca_return_value syntax check
+ * cfg.mk (local-checks-to-skip): Remove its exemption.
+ * sed/regexp.c (match_regex): Do not cast return value of alloca.
+
+ maint: enable sc_po_check syntax check
+ * cfg.mk (local-checks-to-skip): Remove its exemption.
+ * po/POTFILES.in: Adjust to reflect added/removed file names.
+
+ maint: enable sc_prohibit_always_true_header_tests syntax check
+ * cfg.mk (local-checks-to-skip): Remove its exemption.
+ Exempt configure.ac.
+
+ maint: enable sc_makefile_at_at_check syntax check
+ * cfg.mk (local-checks-to-skip): Remove its exemption.
+ * testsuite/Makefile.am (LDADD, TESTS_ENVIRONMENT): Use $(...)
+ rather than obsolescent @...@ notation.
+
+ maint: enable sc_space_tab syntax check
+ * cfg.mk (local-checks-to-skip): Remove its exemption.
+ * doc/groupify.sed: Reverse SP-TAB sequences.
+ * sed/compile.c (compile_program): Remove spaces before TAB.
+ * sed/execute.c (append_replacement): Likewise.
+
+ maint: enable sc_program_name syntax check
+ * cfg.mk (local-checks-to-skip): Remove its exemption.
+ * sed/sed.c: Include progname.h".
+ (program_name): Remove now-unnecessary declaration.
+ (main): Call set_program_name.
+ * bootstrap.conf (gnulib_modules): Add progname.
+ * lib/.gitignore: Append the two new names.
+
+ maint: enable more checks
+ * cfg.mk (local-checks-to-skip): Remove exemptions
+ for immutable NEWS as well as the two config.h checks.
+ Also accept "sed.h", since the first thing it does is
+ to include <config.h>.
+ * sed/sed.h: Change "config.h" to <config.h>, for consistency
+ with other GNU tools.
+ * sed/utils.c: Likewise, here and for each of the following.
+ * 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-regex7.c:
+ * testsuite/bug-regex8.c:
+ * testsuite/bug-regex9.c:
+ * testsuite/runptests.c:
+ * testsuite/runtests.c:
+ * testsuite/tst-boost.c:
+ * testsuite/tst-pcre.c:
+ * testsuite/tst-regex.c:
+ * testsuite/tst-regex2.c:
+ * testsuite/tst-rxspencer.c:
+
+ maint: enable sc_const_long_option syntax check
+ * sed/sed.c (main): Add "const" to decl of longopts.
+ * cfg.mk (local-checks-to-skip): Remove its exemption.
+
+ maint: enable double-word prohibition
+ * cfg.mk (local-checks-to-skip): Remove exemption for
+ sc_prohibit_doubled_word.
+ Exempt 4 files under testsuite/.
+
+ doc: remove doubled word
+ * doc/sed-in.texi: Remove doubled "the".
+ * doc/sed.texi: Likewise.
+
+ maint: add .prev-version
+ * .prev-version: New file.
+
+ maint: turn on the test that prohibits use of HAVE_CONFIG_H
+ * cfg.mk (local-checks-to-skip): Remove the exemption here.
+ * testsuite/bug-regex10.c: Remove the use of the offending macro.
+ * testsuite/bug-regex11.c: Likewise.
+ * testsuite/bug-regex12.c: Likewise.
+ * testsuite/bug-regex13.c: Likewise.
+ * testsuite/bug-regex14.c: Likewise.
+ * testsuite/bug-regex15.c: Likewise.
+ * testsuite/bug-regex16.c: Likewise.
+ * testsuite/bug-regex21.c: Likewise.
+ * testsuite/bug-regex7.c: Likewise.
+ * testsuite/bug-regex8.c: Likewise.
+ * testsuite/bug-regex9.c: Likewise.
+ * testsuite/runptests.c: Likewise.
+ * testsuite/runtests.c: Likewise.
+ * testsuite/tst-boost.c: Likewise.
+ * testsuite/tst-pcre.c: Likewise.
+ * testsuite/tst-regex.c: Likewise.
+ * testsuite/tst-regex2.c: Likewise.
+ * testsuite/tst-rxspencer.c: Likewise.
+
+ maint: generate THANKS from THANKS.in
+ * THANKS.in: Renamed from THANKS, adjusted formatting
+ and added header. Also remove from this list of names those
+ that are now generated automatically.
+ * THANKS: Removed, now that it's generated.
+ * thanks-gen: New file.
+ * Makefile.am (EXTRA_DIST): Add thanks-gen
+ (THANKS): New rule.
+ * .mailmap: New file.
+
+ maint: add cfg.mk, derived from grep's
+ * cfg.mk (local-checks-to-skip): Exempt many failing tests.
+ (old_NEWS_hash): Define.
+ * NEWS: Tweak wording to avoid semblance of doubled word: in in-place.
+
+ tests: hook up gnulib-tests
+ * Makefile.am (SUBDIRS): Add gnulib-tests.
+ * gnulib-tests/Makefile.am: New file.
+ * configure.ac (AC_CONFIG_FILES): Add gnulib-tests/Makefile.
+ * .gitignore: Ignore all but Makefile.am.
+
+ maint: .gitignore: ignore more
+
+ maint: remove ACLOCAL_AMFLAGS in favor of AC_CONFIG_MACRO_DIRS
+ * Makefile.am (ACLOCAL_AMFLAGS): Remove this assignment.
+ * configure.ac: Use this macro instead.
+
+ maint: do not version-control generated files.
+ * doc/sed.1: Remove.
+ * po/sed.pot: Likewise.
+ * po/Makevars: Likewise.
+ * .gitignore: Add their names.
+
+ maint: begin to modernize configure.ac
+ * configure.ac: Turn on silent rules, by default.
+ Use git-derived versions all the time. Required a new, signed
+ v4.2.2 tag, which I've pushed.
+ Distribute .tar.xz tarballs, not .bzip2 or .gz.
+ * Makefile.am (AUTOMAKE_OPTIONS): Remove.
+ * bootstrap.conf (gnulib_modules): Add git-version-gen.
+
+ maint: convert obsolescent @VAR@ notation to $(VAR)
+ * sed/Makefile.am (sed_LDADD): Use $(VAR), no @VAR@.
+
+ maint: update copyright dates; use gnulib's update-copyright module
+ * bootstrap.conf (gnulib_modules): Add update-copyright.
+ Then, run "make update-copyright".
+ * Makefile.am: Add copyright header.
+
+ maint: remove all trailing white space
+ First, run this command:
+ git grep -l ' $'|xargs perl -pi -e 's/[ \t]+$//'
+ Then some minor fix-up to make the two newly-failing tests
+ pass once again:
+ * testsuite/mac-mf.sed: Append this, s/ $//,
+ to eliminate trailing spaces in the actual output.
+ * testsuite/y-newline.good: Manually remove a trailing
+ space between two concatenated prompts.
+
+ maint: update autogenerated .gitignore files
+
+ maint: update build/gnulib infrastructure; generate ChangeLog
+ * ChangeLog-2014: Renamed from ChangeLog.
+ * po/ChangeLog-2014: Renamed from po/ChangeLog.
+ * Makefile.am (EXTRA_DIST): Add the two new file names.
+ (dist-hook): Generate ChangeLog at tarball-creation time.
+ (gen-ChangeLog): New rule. Just like the one in coreutils and grep.
+ * bootstrap.conf (gnulib_modules): Add the modules, readme-release
+ and gitlog-to-changelog, and revamp to be much more like grep and
+ coreutils.
+ * lib/Makefile.am: Update.
+
+ maint: update bootstrap from gnulib
+
+2014-09-06 Jim Meyering <meyering@fb.com>
+
+ fixup: add the properly-named new test files
+ * testsuite/Makefile.am (EXTRA_DIST): Add y-zero.*,
+ not y-NUL.* here.
+
+ maint: correct failing "version" test
+ * configure.ac (COPYRIGHT_YEAR): Update to 2014, so
+ the "version" test passes once again.
+ * doc/sed.1: Also commit this auto-generated-yet-VC'd file.
+
+ fix "y" to work with NUL in the RHS
+ * sed/execute.c (do_list) [case 'y']: Handle NUL bytes
+ in the RHS of a y/LHS/RHS/ transliteration.
+ * testsuite/y-zero.good: New test-related files.
+ * testsuite/y-zero.inp:
+ * testsuite/y-zero.sed:
+ * testsuite/Makefile.am (SEDTESTS): Add y-zero here.
+ * testsuite/Makefile.tests: And here.
+ * NEWS (Bug fixes): Describe it.
+ The bug was reported by table@inventati.org,
+ with the execute.c change mostly by Paolo Bonzini.
diff --git a/ChangeLog-2014 b/ChangeLog-2014
new file mode 100644
index 0000000..9cc8dab
--- /dev/null
+++ b/ChangeLog-2014
@@ -0,0 +1,3630 @@
+2014-09-06 Jim Meyering <meyering@fb.com>
+
+ maint: remove all trailing white space
+ First, run this command:
+ git grep -l ' $'|xargs perl -pi -e 's/[ \t]+$//'
+ Then some minor fix-up to make the two newly-failing tests
+ pass once again:
+ * testsuite/mac-mf.sed: Append this, s/ $//,
+ to eliminate trailing spaces in the actual output.
+ * testsuite/y-newline.good: Manually remove a trailing
+ space between two concatenated prompts.
+
+2014-09-06 Jim Meyering <meyering@fb.com>
+
+ fixup: add the properly-named new test files
+ * testsuite/Makefile.am (EXTRA_DIST): Add y-zero.*,
+ not y-NUL.* here.
+
+ maint: correct failing "version" test
+ * configure.ac (COPYRIGHT_YEAR): Update to 2014, so
+ the "version" test passes once again.
+ * doc/sed.1: Also commit this auto-generated-yet-VC'd file.
+
+2014-09-04 Jim Meyering <meyering@fb.com>
+
+ fix "y" to work with NUL in the RHS
+ * sed/execute.c (do_list) [case 'y']: Handle NUL bytes
+ in the RHS of a y/LHS/RHS/ transliteration.
+ * testsuite/y-zero.good: New test-related files.
+ * testsuite/y-zero.inp:
+ * testsuite/y-zero.sed:
+ * testsuite/Makefile.am (SEDTESTS): Add y-zero here.
+ * testsuite/Makefile.tests: And here.
+ * NEWS (Bug fixes): Describe it.
+ The bug was reported by table@inventati.org,
+ with the execute.c change mostly by Paolo Bonzini.
+
+2014-07-24 Jose E. Marchesi <jemarch@gnu.org>
+
+ * gnulib: Update.
+
+2014-03-26 Jose E. Marchesi <jemarch@gnu.org>
+
+ * doc/sed.texi (Regular Expressions): avoid a potential
+ misunderstanding in the description of the \| operator.
+
+2013-10-16 David A. Wheeler <dwheeler@dwheeler.com>
+
+ * doc/sed-in.texi: Document "-E" option to use EREs. GNU sed already
+ supported "-E" as an undocumented synonym for "-r", but "-E" is now
+ in POSIX. See: http://austingroupbugs.net/view.php?id=528.
+ * doc/sed.1: Likewise.
+ * doc/sed.texi: Likewise.
+ * doc/sed.x: Likewise.
+ * sed/sed.c: Likewise.
+
+2013-10-06 Jose E. Marchesi <jemarch@gnu.org>
+
+ * basicdefs.h (PATH_MAX): Defined to some constant in case it is
+ not defined by system headers.
+ * sed/utils.c: Do not include pathmax.h anymore.
+ * bootstrap.conf (gnulib_modules): Do not use the gnulib module
+ pathmax.
+
+2013-09-30 Jose E. Marchesi <jemarch@gnu.org>
+
+ * doc/sed.texi (Regular Expressions): Typo: implicity numbered ->
+ implicitly numbered.
+ Reported by Arthur Budco.
+
+2013-07-12 Jose E. Marchesi <jemarch@gnu.org>
+
+ * doc/sed-in.texi (Extended regexps): Add an example on using | in
+ extended regular expressions. Suggested by Nils Barth.
+
+2013-02-02 Jose E. Marchesi <jemarch@gnu.org>
+
+ * gnulib: Update.
+ * configure.ac (COPYRIGHT_YEAR): Updated to 2013.
+
+2012-12-29 Stefano Lattarini <stefano.lattarini@gnu.org> (tiny change)
+
+ testsuite: make test logs more verbose
+ * testsuite/runtest: Adjust and simplify.
+
+2012-12-29 Stefano Lattarini <stefano.lattarini@gnu.org> (tiny change)
+
+ maint: enable Automake parallel testsuite harness
+ It is better than the older test driver. It is also the
+ default now, starting from Automake 1.13; so having it
+ enabled unconditionally will allow GNU sed to be seamlessly
+ bootstrapped by Automake 1.13.
+ * configure.ac (AM_INIT_AUTOMAKE): Add 'parallel-tests' option.
+ Also require Automake 1.11.1, since that is the minimal version
+ to have a sane 'parallel-tests' support.
+ (AC_PREREQ): Bump requirement to 2.62, since that is the
+ minimal version required by Automake 1.11.1.
+ * testsuite/Makefile.am (TESTS_ENVIRONMENT): Remove the
+ invocation for the test runner "$(srcdir)/runtest"; it's
+ correct place is ...
+ (LOG_COMPILER): ... here.
+
+2012-12-29 Stefano Lattarini <stefano.lattarini@gnu.org> (tiny change)
+
+ build: avoid bootstrap failure
+ * bootstrap.conf (gnulib_modules): Add 'threadlib'.
+
+2012-12-21 Paolo Bonzini <bonzini@gnu.org>
+
+ * configure.ac: Bump version number. Replace COPYRIGHT_YEAR.
+ * Makefile.am (dist-hook): Revert 2010-08-10 change.
+
+2012-12-21 Paolo Bonzini <bonzini@gnu.org>
+
+ * autoboot: Rename to bootstrap.
+ * autoboot.conf: Rename to bootstrap.conf.
+ * README.boot: Remove.
+ * Makefile.am: Remove README.boot, add bootstrap and bootstrap.conf.
+
+2012-12-21 Paolo Bonzini <bonzini@gnu.org>
+
+ * gnulib: Update.
+ * testsuite/version.gin: Regenerate.
+
+2012-12-21 Paolo Bonzini <bonzini@gnu.org>
+
+ * doc/sed.texi: Regenerate.
+ * doc/sed.1: Regenerate.
+ * po/sed.pot: Regenerate.
+
+2012-07-25 Paolo Bonzini <bonzini@gnu.org>
+
+ * doc/sed-in.texi: Document difference between "e" and "r"
+ commands.
+
+2012-04-29 Jim Hill <gjthill@gmail.com>
+
+ * Makefile.am (noinst_DATA, dist-hook): build failed after git
+ clean -dfx finish bootstrap.sh removal.
+
+2012-04-13 Paolo Bonzini <bonzini@gnu.org>
+
+ * sed/compile.c (convert_number): Remove default_char argument,
+ expect buf to point to it. Remove maxdigits argument and compute
+ it on the fly.
+ (normalize_text): Unify calls to convert_number under the convert
+ label. For TEXT_REPLACEMENT add a backslash to the output if
+ convert_number returns ch == '&'.
+
+2012-03-16 Paolo Bonzini <bonzini@gnu.org>
+
+ * testsuite/version.gin: Regenerate.
+
+2012-03-16 Paolo Bonzini <bonzini@gnu.org>
+
+ * basicdefs.h (P_): Remove.
+ * sed/compile.c: Adjust.
+ * sed/execute.c: Likewise.
+ * sed/fmt.c: Likewise.
+ * sed/sed.c: Likewise.
+ * sed/sed.h: Likewise.
+ * sed/utils.c: Likewise.
+ * sed/utils.h: Likewise.
+
+2012-03-16 Paolo Bonzini <bonzini@gnu.org>
+
+ * basicdefs.h (FREE): Remove.
+ * sed/compile.c: Adjust.
+ * sed/execute.c: Adjust.
+ * sed/regexp.c: Adjust.
+ * sed/utils.c: Adjust, remove ck_free.
+ * sed/utils.h: Adjust, remove ck_free.
+
+2012-03-16 Paolo Bonzini <bonzini@gnu.org>
+
+ * basicdefs.h (CAST, VCAST, VOID, MEMCPY, MEMMOVE): Rip out.
+ * sed/compile.c: Adjust.
+ * sed/execute.c: Adjust.
+ * sed/regexp.c: Adjust.
+ * sed/utils.c: Adjust.
+ * sed/utils.h: Adjust.
+
+2012-03-16 Paolo Bonzini <bonzini@gnu.org>
+
+ * sed/execute.c: Unconditionally compile for MBCS.
+ * sed/mbcs.c: Unconditionally compile for MBCS.
+ * sed/sed.h: Unconditionally compile for MBCS.
+
+2012-03-16 Paolo Bonzini <bonzini@gnu.org>
+
+ * basicdefs.h: Enjoy gnulib's headers.
+ * sed/compile.c: Likewise.
+ * sed/execute.c: Likewise.
+ * sed/regexp.c: Likewise.
+ * sed/sed.c: Likewise.
+ * sed/sed.h: Likewise.
+ * sed/utils.c: Likewise.
+
+2012-03-16 Paolo Bonzini <bonzini@gnu.org>
+
+ * bootstrap.sh.in: Remove.
+ * bootstrap.sh: Remove.
+ * configure.ac: Do not create bootstrap.sh.
+ * basicdefs.h: Remove guards.
+ * sed/execute.c [BOOTSTRAP]: Remove guards.
+ * sed/sed.c [BOOTSTRAP]: Remove guards.
+ * sed/sed.h [BOOTSTRAP]: Remove guards.
+
+2012-03-16 Paolo Bonzini <bonzini@gnu.org>
+
+ * gnulib: Update.
+
+2012-03-16 Paolo Bonzini <bonzini@gnu.org>
+
+ * doc/sed.x: Document address behavior across input files.
+ * doc/sed.1: Regenerate.
+
+2012-02-13 Paolo Bonzini <bonzini@gnu.org>
+
+ * configure.ac: Test whether fopen("foo", "rt") works.
+ * sed/compile.c: Do not open scripts with "rt" mode if it doesn't.
+ * sed/sed.c: Never open input files with "rt" mode.
+
+2012-02-05 Paolo Bonzini <bonzini@gnu.org>
+ Jim Hill <gjthill@gmail.com>
+
+ * autoboot.conf: Change getline to getdelim.
+ * doc/sed-in.texi: Document -z/--null-data.
+ * doc/sed.texi: Regenerate.
+ * doc/sed.1: Regenerate.
+ * sed/execute.c: Change '\n' to buffer_delimiter.
+ * sed/sed.c: Add support for -z/--null-data.
+ * sed/sed.h: Add buffer_delimiter.
+ * sed/utils.c: Change ck_getline to ck_getdelim.
+ * sed/utils.h: Change ck_getline to ck_getdelim.
+ * NEWS: Document new option.
+
+2011-11-23 Paolo Bonzini <bonzini@gnu.org>
+
+ * doc/sed-in.texi: Document how multiline mode affects matching
+ newlines against period. Reported by Dmitry Bolshakov.
+
+2011-08-29 Paolo Bonzini <bonzini@gnu.org>
+
+ * sed/sed.c (usage): Fix documentation for -i. Reported by
+ Dennis Bartlett.
+
+2011-07-11 Jim Meyering <meyering@redhat.com>
+
+ avoid silent data loss when an input line is 2^31 bytes or longer
+ If one line in a file has length (including newline) of 2^31, then
+ applying sed -i to that file truncates it to size 0. I first
+ noticed it like this: Create a file with line of length 2^31-1
+ $ perl -le 'print "v"x(2**31-1)' > k
+ Then prepend a byte to that line:
+ $ sed -i 's/^/v/' k
+ Surprise! The file is empty.
+ * sed/utils.c (ck_getline): Declare "result" to be of type ssize_t,
+ rather than int, to match the return type of getline.
+
+2011-07-14 Padraig Brady <p@draigbrady.com>
+
+ * execute.c (open_next_file): Only reopen stdin on Windows/DOS.
+
+2011-05-27 Paolo Bonzini <bonzini@gnu.org>
+
+ * doc/sed-in.texi: Explain behavior of \l and \u at the end
+ of the replacement text.
+ * doc/sed.texi: Regenerate.
+ * sed/execute.c (append_replacement, do_subst): Further
+ simplification.
+
+2011-05-27 Paolo Bonzini <bonzini@gnu.org>
+
+ * doc/sed-in.texi: Fix incorrect comment in the "Increment a
+ number" example. Reported by Wu Liang and Micah Cowan.
+ * doc/sed.texi: Regenerate.
+
+2011-03-11 Paolo Bonzini <bonzini@gnu.org>
+
+ * sed/compile.c (normalize_text): Clang analyzer cleanup.
+ * sed/execute.c (append_replacement, do_subst): Same.
+ * sed/utils.c (ck_getline): Same.
+
+2010-11-13 Jari Aalto <jari.aalto@cante.net>
+
+ * doc/sed.x: Order commands alphabetically.
+ * doc/sed.1: Regenerate.
+ * doc/sed.texi: Regenerate.
+
+2010-11-10 Paolo Bonzini <bonzini@gnu.org>
+
+ * doc/sed-in.texi: Fix double negation in comment, escape
+ file names.
+
+2010-11-03 Eric Blake <eblake@redhat.com>
+
+ * basicdefs.h (ISDIGIT): Avoid compiler warning on cygwin.
+ * sed/compile.c (normalize_text): Avoid undefined behavior.
+
+ * sed/sed.c (includes): Supply missing header.
+
+2010-11-01 Paolo Bonzini <bonzini@gnu.org>
+
+ * autoboot.conf: Replace gettext with gettext-h. Suggested by
+ Gerald Pfeifer and Eric Blake.
+ * configure.ac: Downgrade minimum requested version of gettext
+ to 0.17.
+
+2010-10-31 Gerald Pfeifer <gerald@pfeifer.com>
+
+ * doc/sed-in.texi (Extended regexps): Add '|' to the list of
+ differences. Note that "\|" is a GNU extension to begin with.
+ * doc/sed.texi: Rebuild.
+
+2010-10-20 Paolo Bonzini <bonzini@gnu.org>
+
+ * autoboot.conf: Add fwriting.
+ * sed/utils.c: Use it.
+
+2010-09-20 Paolo Bonzini <bonzini@gnu.org>
+
+ * doc/configure.ac: Mention bug-sed@gnu.org.
+ * doc/sed.x: Mention bug-sed@gnu.org.
+ * doc/sed-in.texi: Mention bug-sed@gnu.org.
+
+2010-08-30 Paolo Bonzini <bonzini@gnu.org>
+
+ * Makefile.am (dist-hook): Remove COPYRIGHT_YEAR check.
+ * autoboot.conf (gnulib_modules): Add version-etc-fsf.
+ * configure.ac (COPYRIGHT_YEAR): Remove. Change package name to
+ "GNU sed".
+ * doc/sed.1: Regenerate.
+ * sed/sed.c (AUTHORS): New.
+ (main): Use version_etc.
+
+2010-07-18 Paolo Bonzini <bonzini@gnu.org>
+
+ * sed.c (write_mode): New.
+ (main): Initialize it to "wb" if --binary is passed.
+ * sed.h (write_mode): New.
+ * compile.c (mark_subst_opts, compile_program): Use it instead
+ of "w".
+ * execute.c (open_next_file): Pass write_mode to ck_mkstemp.
+ * utils.c (ck_mkstemp): Accept mode, pass it to fdopen. Constify.
+ * utils.h (ck_mkstemp): Adjust prototype.
+
+2010-08-17 Paolo Bonzini <bonzini@gnu.org>
+
+ Fix imprecision in the documentation of `D'.
+ * doc/sed-in.texi (D command): Fix documentation of behavior for
+ pattern space ending with \n and with no other newline.
+ Reported by Randall Cotton.
+ * doc/sed.x (D command): Fix documentation of behavior for
+ pattern space ending with \n and with no other newline.
+ * doc/sed.texi: Regenerate.
+ * doc/sed.1: Regenerate.
+
+2010-07-19 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
+
+ Let --posix turn off nonportable scripts ending in backslash.
+ * sed/compile.c (errors, INCOMPLETE_CMD): New error string.
+ (compile_program): In strict posix mode, complain about incomplete
+ command.
+ * NEWS: Update.
+ Report by Bruno Haible.
+
+2010-07-16 Paolo Bonzini <bonzini@gnu.org>
+
+ * autoboot.conf (gnulib_modules): Replace mkstemp with mkostemp.
+ * bootstrap.sh.in: Compile mkostemp.c instead of mkstemp.c.
+ * gnulib: Update.
+ * NEWS: Mention change.
+ * sed/utils.c (ck_mkstemp): Use mkostemp to work around Cygwin
+ oddity. Reported by Stepan Kasal.
+
+2010-05-03 Timothy Baker <timothypaulbaker@gmail.com> (tiny change)
+
+ * doc/sed.texi (Regular expressions): Fix typo.
+
+2009-11-15 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
+
+ * doc/sed.texi (Extended Commands): Document F command.
+ * doc/sed-in.texi: Regenerate.
+ * sed/compile.c (compile_program): Accept 'F' if not --posix.
+ * sed/execute.c (open_next_file): Always initialize in_file_name.
+ (execute_program): Handle 'F'.
+ * configure.ac: Bump SED_FEATURE_VERSION.
+ * NEWS: Update.
+
+2009-12-07 Clint Adams <schizo@debian.org> (tiny change)
+
+ * sed/execute.c (open_next_file): If is_selinux_enabled returns -1,
+ treat it as "disabled".
+
+2009-10-15 Paolo Bonzini <bonzini@gnu.org>
+
+ * sed/execute.c (closedown): First change owner (while permissions
+ stay 0?00), then mode.
+
+2009-10-15 Paolo Bonzini <bonzini@gnu.org>
+ WANG Yunfeng <uhuruh@gmail.com>
+
+ * sed/execute.c (str_append, str_append_modified): Handle incomplete
+ sequences as if they were invalid.
+
+2009-10-14 Paolo Bonzini <bonzini@gnu.org>
+
+ * po/sed.pot: Update.
+
+2009-10-14 Paolo Bonzini <bonzini@gnu.org>
+
+ * configure.ac: Use cache variables rather than AC_CHECK_FUNC.
+
+2009-10-14 Paolo Bonzini <bonzini@gnu.org>
+
+ * configure.ac: Remove obselete configure tests.
+ * sed/fmt.c: Assume limits.h is always present.
+ * sed/utils.c: Assume vfprintf is always present.
+
+2009-10-14 Yuri G. Kudryashov <urkud.urkud@gmail.com> (tiny change)
+
+ * testsuite/Makefile.tests: Override LC_ALL, not LANG.
+
+2009-10-12 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
+
+ * doc/sed-in.texi (Invoking sed): Add index entries for --posix,
+ -s, --separate.
+ (Other Commands): Fix typo.
+ * doc/sed.texi: Regenerate.
+
+2009-09-07 Dmitry Chistikov <dd1email@gmail.com> (tiny change)
+
+ * doc/sed-in.texi: Document how to separate commands.
+ * doc/sed.texi: Regenerate.
+
+2009-08-30 Paolo Bonzini <bonzini@gnu.org>
+
+ * autoboot.conf: Add ssize_t.
+ * configure.ac: Remove useless stuff, bump gettext requirement to 0.17.
+
+2009-08-10 Bake Timmons <b3timmons@speedymail.org> (tiny change)
+
+ * doc/sed-in.texi: Fix typo.
+
+2009-06-27 Paolo Bonzini <bonzini@gnu.org>
+
+ * configure.ac: Bump version.
+ * NEWS: Bump version.
+ * gnulib: Update.
+ * doc/sed.1: Regenerate.
+
+2009-06-25 Paolo Bonzini <bonzini@gnu.org>
+
+ * autoboot.conf: Add selinux-h.
+ * execute.c: Copy over file creation context before creating a new file.
+
+2009-06-25 Paolo Bonzini <bonzini@gnu.org>
+
+ * execute.c: Do not copy ACLs until the file is copied.
+ * utils.c (ck_mkstemp): Set a restrictive umask on temporary files.
+
+2009-06-26 Paolo Bonzini <bonzini@gnu.org>
+
+ * autoboot: Do not use GIT_CONFIG_LOCAL.
+
+2009-06-15 Paolo Bonzini <bonzini@gnu.org>
+
+ * autoboot.conf: Add memchr again.
+ * gnulib: Update.
+
+2009-06-11 Sergey Farbotka <z8sergey8z@gmail.com> (tiny change)
+
+ * sed/execute.c (open_next_file): Fix off-by-one causing problems
+ under Cygwin.
+
+2009-05-11 Paolo Bonzini <bonzini@gnu.org>
+
+ * sed/compile.c (snarf_char_class): Fix logic bug with [[[ in regular
+ expressions (and a possibly uninitialized use of variable delim stemming
+ from the bug). Uninitialized variable bug reported by Zhongxing Xu.
+ * testsuite/brackets.good: New.
+ * testsuite/brackets.inp: New.
+ * testsuite/brackets.sed: New.
+ * testsuite/Makefile.am: Add test.
+ * testsuite/Makefile.tests: Add test.
+
+2009-05-11 Paolo Bonzini <bonzini@gnu.org>
+
+ * configure.ac: Define COPYRIGHT_YEAR.
+ * Makefile.am (dist-hook): Test it.
+ * sed/mbcs.c: Fix copyright years.
+ * sed/sed.c: Fix copyright years. Change COPYRIGHT_NOTICE to
+ COPYRIGHT_YEAR.
+ * sed/utils.c: Fix copyright years.
+ * testsuite/version.gin: Use COPYRIGHT_YEAR.
+
+2009-04-30 Paolo Bonzini <bonzini@gnu.org>
+
+ * sed/compile.c: Declare bool arguments as int instead to please AIX XLC.
+ * sed/execute.c: Declare bool arguments as int instead to please AIX XLC.
+ * sed/utils.c: Declare bool arguments as int instead to please AIX XLC.
+ * sed/utils.h: Declare bool arguments as int instead to please AIX XLC.
+
+2009-04-27 Paolo Bonzini <bonzini@gnu.org>
+
+ * configure.ac: Bump version number.
+ * configure: Regenerate.
+
+2009-04-27 Paolo Bonzini <bonzini@gnu.org>
+
+ * configure.ac: Do not create homonymous links from builddir to srcdir.
+ * testsuite/Makefile.tests: Create readin.in2 here.
+ * testsuite/Makefile.am: Do not distribute it.
+
+2009-04-27 Paolo Bonzini <bonzini@gnu.org>
+
+ * autoboot.conf: Add rename.
+ * gnulib: Update.
+
+2009-04-27 Paolo Bonzini <bonzini@gnu.org>
+
+ * configure.ac: XFAIL UTF-8 tests where appropriate.
+
+2009-04-27 Paolo Bonzini <bonzini@gnu.org>
+
+ * testsuite/Makefile.tests: Handle CRLF endings for mingw.
+
+2009-04-27 Paolo Bonzini <bonzini@gnu.org>
+
+ * configure.ac: Link readin.in2 into builddir.
+ * configure: Regenerate.
+ * doc/Makefile.am: Do not distribute sed.html. Do not update
+ sed.texi if the output does not change.
+ * sed/Makefile.am: Order libraries according to their dependencies.
+ * sed/compile.c (get_openfile): Declare FAIL as int.
+ * sed/sed.c: Avoid printf ("") if REG_PERL is not defined.
+ * testsuite/eval.in2: Do not include in the repository.
+ * testsuite/Makefile.am: Clean always eval.in2 and never readin.in2.
+ * testsuite/Makefile.tests: Provide a default empty definition of TIME
+ and remove rules for readin.in2.
+
+2009-03-31 Paolo Bonzini <bonzini@gnu.org>
+
+ * bootstrap.sh.in: Add __bool_true_false_are_defined.
+ * bootstrap.sh: Regenerate.
+ * basicdefs.h: Do not provide bool definitions for BOOTSTRAP at all.
+
+2009-03-31 Paolo Bonzini <bonzini@gnu.org>
+
+ * sed/sed.c (contact): New.
+ (usage): From here.
+ (main): Use it for `sed --version' too.
+
+ * configure.ac: Point to GNU project mailing lists.
+ * sed/sed.c (contact): Use PACKAGE_BUGREPORT.
+ * testsuite/version.gin: Likewise.
+ * testsuite/version.good: Regenerate.
+ * doc/sed.1: Regenerate.
+
+ * bootstrap.sh.in (PACKAGE_BUGREPORT): New.
+ * bootstrap.sh: Regenerate.
+
+2009-03-31 Paolo Bonzini <bonzini@gnu.org>
+
+ * testsuite/Makefile.am: Distribute utf8-3 and utf8-4 test files.
+
+2009-02-17 Paolo Bonzini <bonzini@gnu.org>
+
+ * testsuite/Makefile.tests: Rewrite rule for utf8-[1234].
+ Reported by Ralf Wildenhues.
+
+2009-02-17 Paolo Bonzini <bonzini@gnu.org>
+
+ * sed/sed.c (usage): Print homepage URL.
+ * testsuite/version.gin: Update.
+
+2009-01-28 Paolo Bonzini <bonzini@gnu.org>
+
+ * sed/sed.c (usage): Only print the bug report address for `sed --help'.
+ (main): Print it for `sed --version' too.
+ * testsuite/version.gin: Adapt.
+ * testsuite/Makefile.tests: Refine help message test.
+
+2009-01-23 Paolo Bonzini <bonzini@gnu.org>
+ Hideo AOKI <hideo.aoki.tk@hitachi.com>
+
+ * sed/compile.c (match_slash): Fix MBCS behavior.
+ * sed/sed.h (MBSINIT): New.
+
+2009-01-20 Paolo Bonzini <bonzini@gnu.org>
+
+ * autoboot.conf, bootstrap.sh.in: Remove memchr, memcmp, memmove
+ compatibility code.
+ * gnulib: Update.
+
+2009-01-09 Paolo Bonzini <bonzini@gnu.org>
+
+ * tests/SPENCER.tests: Add testcases for glibc bugzilla 697.
+ * gnulib: Update.
+
+2009-01-05 Paolo Bonzini <bonzini@gnu.org>
+
+ * execute.c (read_pattern_space): Reset hold space at end-of-file
+ if input->reset_at_next_file.
+
+2008-12-31 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
+
+ Let --posix turn off more GNU extensions.
+ * sed/compile.c (mark_subst_opts): Turn off subst options i, I,
+ s, S, x, X, m, and M in --posix mode.
+ (compile_address): Disallow address modifiers, `FIRST~STEP',
+ `ADDR1,+N', and `ADDR1,~N' in --posix mode.
+ (compile_program): In --posix mode, do not accept e or z commands;
+ do not accept text between an a, c, or i command and the following
+ backslash; do not accept an argument to the l command.
+
+2008-12-22 Paolo Bonzini <bonzini@gnu.org>
+
+ * autoboot.conf: Request modules emulating mb functions.
+ * configure.ac: Do not look for mb functions here.
+
+2008-10-03 Paolo Bonzini <bonzini@gnu.org>
+ Jim Meyering <meyering@redhat.com>
+
+ * autoboot.conf: Add localcharset.
+ * Makefile.am: Remove intl subdir. Require Automake 1.10.
+ * configure.ac: Remove useless macros, switch to external gettext.
+ * lib/Makefile.am: Remove intl subdir from CPPFLAGS.
+ * sed/Makefile.am: Remove intl subdir from CPPFLAGS.
+
+2008-10-02 Paolo Bonzini <bonzini@gnu.org>
+
+ * autoboot: Sync with gnulib's build-aux/bootstrap.
+
+2008-09-29 Paolo Bonzini <bonzini@gnu.org>
+
+ * autoboot: Sync with gnulib's build-aux/bootstrap.
+
+2008-09-29 Paolo Bonzini <bonzini@gnu.org>
+
+ * testsuite/Makefile.am: Add the utf8-{1,2,3,4} tests.
+ * testsuite/Makefile.tests: Add the utf8-{1,2,3,4} tests.
+ * testsuite/runtest: Support skipping tests.
+ * testsuite/utf8-1.good: New.
+ * testsuite/utf8-1.inp: New.
+ * testsuite/utf8-1.sed: New.
+ * testsuite/utf8-2.good: New.
+ * testsuite/utf8-2.inp: New.
+ * testsuite/utf8-2.sed: New.
+ * testsuite/utf8-3.good: New.
+ * testsuite/utf8-3.inp: New.
+ * testsuite/utf8-3.sed: New.
+ * testsuite/utf8-4.good: New.
+ * testsuite/utf8-4.inp: New.
+ * testsuite/utf8-4.sed: New.
+
+2008-09-29 Paolo Bonzini <bonzini@gnu.org>
+
+ * BUGS: Document s/.*.// behavior with invalid multibyte sequences.
+ * NEWS: Document `z' extension.
+ * doc/sed-in.texi: Document both things.
+ * sed/compile.c (compile_program): Recognize `z'.
+ * sed/execute.c (execute_program): Execute `z'.
+ * testsuite/Makefile.am: Add badenc test.
+ * testsuite/Makefile.tests: Add badenc test.
+ * testsuite/badenc.good: New.
+ * testsuite/badenc.inp: New.
+ * testsuite/badenc.sed: New.
+
+2008-09-28 Paolo Bonzini <bonzini@gnu.org>
+
+ * basicdefs.h: Replace alloca cruft with alloca.h.
+ * bootstrap.sh.in: Update for new gnulib.
+ * bootstrap.sh: Update for new gnulib.
+ * configure.ac: Move gnulib macros earlier.
+ * sed/execute.c: Do not include acl.h when bootstrapping.
+
+2008-08-27 Paolo Bonzini <bonzini@gnu.org>
+
+ * sed/execute.c (closedown): Close the input file!
+
+2008-08-20 Paolo Bonzini <bonzini@gnu.org>
+
+ * configure.ac: Add gl_DISABLE_THREADS.
+
+2008-08-20 Ralf Wildenhues <ralf.wildenhues@gmx.de
+
+ * doc/sed-in.texi: Drop leading whitespace where appropriate,
+ do not use TABs.
+ * doc/sed.texi: Regnerate.
+
+2008-08-19 Paolo Bonzini <bonzini@gnu.org>
+
+ * sed/compile.c: Do not include strverscmp.c.
+
+2008-07-21 Paolo Bonzini <bonzini@gnu.org>
+
+ * doc/sed-in.texi: Remove northpark.edu address for sed FAQ.
+ * doc/sed.texi: Regenerate.
+
+2008-07-10 Paolo Bonzini <bonzini@gnu.org>
+
+ * doc/sed-in.texi: Make the description of ^ and $ more precise.
+ * doc/sed.texi: Regenerate.
+
+2008-06-04 Vladimir Marek <vladimir.marek@sun.com>
+
+ * basicdefs.h: Don't hardcode usage of prototypes on SunStudio.
+
+2008-05-15 Paolo Bonzini <bonzini@gnu.org>
+
+ * autoboot.conf: Update for newer gnulib.
+
+2008-05-15 Paolo Bonzini <bonzini@gnu.org>
+
+ * bootstrap.sh.in: Define bool, true, false. Reported by
+ Jason Stover. Adjust for gnulib changes.
+ * bootstrap.sh: Regenerate.
+
+2008-04-24 Paul Eggert <eggert@twinsun.com>
+
+ * sed/compile.c (match_slash): Treat 's&foo&\&&' compatibly with
+ traditional 'sed'.
+ * testsuite/bsd.sh: Add test case for this.
+ * testsuite/bsd.good: Add test case output.
+
+2008-04-24 Paolo Bonzini <bonzini@gnu.org>
+
+ * sed/compile.c (setup_replacement): Fix bug with \& in POSIX mode.
+
+2008-01-16 Jim Meyering <meyering@redhat.com>
+
+ * sed/execute.c (open_next_file, get_backup_file_name): Avoid
+ warnings from gcc.
+
+2008-01-16 Jim Meyering <meyering@redhat.com>
+
+ * sed/compile.c (snarf_char_class): Reverse order of conjuncts
+ so that "delim" is not used uninitialized.
+
+2008-01-16 Jim Meyering <meyering@redhat.com>
+
+ * sed/utils.c (panic): Remove declaration of unused local, "fd".
+
+2008-01-16 Jim Meyering <meyering@redhat.com>
+
+ * sed/execute.c (open_next_file, get_backup_file_name): Avoid
+ warnings from gcc. Avoid shadowing global "pipe".
+
+2008-01-16 Jim Meyering <meyering@redhat.com>
+
+ * autoboot.conf (gnulib_modules): Add stat-macros and pathmax.
+
+2007-10-25 Paolo Bonzini <bonzini@gnu.org>
+ Mike Frysinger <vapier@gentoo.org>
+
+ * doc/sed.x (q, Q): Document argument.
+ * configure.ac: Remove texi2html checks.
+ * doc/Makefile.am: Remove rules for sed.html, always distribute it.
+
+2007-08-14 Paolo Bonzini <bonzini@gnu.org>
+
+ * sed/execute.c (open_next_file): Follow symlink here...
+ (closedown): ... not here.
+
+2007-06-29 Paolo Bonzini <bonzini@gnu.org>
+
+ * sed/mbcs.c: Upgrade to GPLv3.
+ * sed/regexp.c: Upgrade to GPLv3.
+ * sed/sed.c: Upgrade to GPLv3.
+ * sed/sed.h: Upgrade to GPLv3.
+ * sed/utils.c: Upgrade to GPLv3.
+ * sed/utils.h: Upgrade to GPLv3.
+ * sed/compile.c: Upgrade to GPLv3.
+ * sed/execute.c: Upgrade to GPLv3.
+ * sed/fmt.c: Upgrade to GPLv3.
+
+2007-03-01 Masatake YAMATO <jet@gyve.org> (tiny change)
+
+ * sed/compile.c (compile_program): Accept 0,/REGEXP/ address
+ specification only if --posix is not specified.
+
+2007-02-05 Paolo Bonzini <bonzini@gnu.org>
+
+ * testsuite/bug-regex27.c, testsuite/bug-regex28.c: New, from
+ glibc (written by Jakub Jelinek).
+
+2007-01-26 Paolo Bonzini <bonzini@gnu.org>
+
+ * sed/compile.c (check_final_program): Don't set text if the
+ pending_text is initialized but empty.
+ * sed/execute.c (output_line): Don't print text if it is NULL.
+ * testsuite/Makefile.am (TESTS): Add insert.
+ * testsuite/Makefile.tests (insert): New.
+ * testsuite/insert.good, testsuite/insert.sed, testsuite/insert.inp: New
+ testcase from Jonas Koelker.
+
+2006-12-29 Paolo Bonzini <bonzini@gnu.org>
+
+ * sed/compile.c: Fix warnings.
+ * sed/execute.c: Fix warnings.
+
+2006-12-22 Bruno Haible <bruno@clisp.org>
+
+ * sed/utils.c: Include pathmax.
+ * sed/mbcs.c: Use local_charset.
+ * sed/execute.c: Copy with padding after the mbstate_t member.
+
+2006-12-21 Paolo Bonzini <bonzini@gnu.org>
+
+ * sed/mbcs.c: Include string.h (reported by Henning Nielsen Lund).
+ * sed/fmt.c: Likewise.
+ * sed/regexp.c: Likewise.
+
+2006-12-18 Paolo Bonzini <bonzini@gnu.org>
+
+ * sed/execute.c (closedown): Remove dead code.
+
+2006-12-17 Paolo Bonzini <bonzini@gnu.org>
+
+ * sed/utils.c: Include limits.h.
+
+2006-12-16 Paolo Bonzini <bonzini@gnu.org>
+
+ * doc/sed-in.texi: Document --follow-symlinks.
+
+2006-12-15 Paolo Bonzini <bonzini@gnu.org>
+
+ * sed/regexp.c: Disable all extensions on --posix.
+
+2006-09-24 Paolo Bonzini <bonzini@gnu.org>
+
+ * sed/execute.c: Support ACLs.
+ * lib/utils.c: Move...
+ * sed/utils.c: ... here, and remove xmalloc.
+
+2006-08-21 Paolo Bonzini <bonzini@gnu.org>
+
+ * sed/regexp.c: Accept NUL bytes for `.'. Accept 'a\(b' in
+ POSIXLY_CORRECT/POSIXLY_BASIC posixicity.
+
+2006-08-03 Paolo Bonzini <bonzini@gnu.org>
+
+ Revert this part of the previous change:
+
+ 2006-08-03 Paolo Bonzini <bonzini@gnu.org>
+
+ * sed/compile.c (get_openfile): Change second argument to char
+ and turn it into a string within the function. Adjust callers.
+
+2006-08-03 Paolo Bonzini <bonzini@gnu.org>
+ Corinna Vinschen <vinschen@redhat.com>
+
+ * lib/getline.c (getline): Remove Windows special casing.
+ * lib/utils.c (register_open_file, ck_fdopen): New.
+ (ck_fopen, ck_mkstemp): Use register_open_file.
+ * lib/utils.h (ck_fdopen): New.
+ * sed/execute.c (open_next_file): Reopen stdin.
+ * sed/sed.h (read_mode): New.
+ * sed/sed.c (read_mode): New.
+ (main): Set it on --binary.
+ (usage): Document --binary.
+ * sed/compile.c (get_openfile): Change second argument to char
+ and turn it into a string within the function. Adjust callers.
+ * sed/execute.c (dump_append_queue, open_next_file): Use it
+ as mode for ck_fopen.
+
+2006-08-03 Paolo Bonzini <bonzini@gnu.org>
+
+ * sed/execute.c (str_append): Use is_utf8 to skip useless work.
+ * sed/mbcs.c (initialize_mbcs): Look for a UTF-8 locale.
+ (is_utf8): New.
+ * sed/sed.h (is_utf8): New.
+
+2006-07-13 Paolo Bonzini <bonzini@gnu.org>
+
+ * bootstrap.sh.in: Add a few autoconfy tests.
+ * Makefile.am: Update distributed bootstrap.sh.
+
+2006-05-15 Hans-Bernhard Broeker <broeker@physik.rwth-aachen.de>
+
+ * sed/basicdefs.h (OB_MALLOC): Turn VCAST into void * cast.
+
+2006-02-03 Paolo Bonzini <bonzini@gnu.org>
+
+ * sed/compile.c (compile_program) <case 'y'>: Pass false to match_slash.
+
+2005-09-07 Paolo Bonzini <bonzini@gnu.org>
+
+ * lib/regcomp.c: Update from upstream.
+ * lib/regex.c: Update from upstream.
+ * lib/regex_.h: Update from upstream.
+ * lib/regex_internal.c: Update from upstream.
+ * lib/regex_internal.h: Update from upstream.
+ * lib/regexec.c: Update from upstream.
+
+2005-08-30 Paolo Bonzini <bonzini@gnu.org>
+
+ * sed/execute.c (reset_addresses): Never activate ADDR_IS_NUM_MOD
+ addresses.
+ * testsuite/modulo.good, testsuite/modulo.inp, testsuite/modulo.sed:
+ New.
+ * testsuite/Makefile.tests: Add new testcase.
+ * testsuite/Makefile.am: Add new testcase.
+ * testsuite/Makefile.in: Regenerate.
+
+2005-05-18 Maciej W. Rozycki <macro@linux-mips.org>
+
+ * configure.ac: Use a cache variable for the libcP test.
+ * configure: Regenerate.
+
+2005-05-16 Eero Hakkinen <eero17@bigfoot.com>
+
+ * sed/compile.c (snarf_char_class): Fix handling of
+ [^]xyz].
+
+2005-04-04 Paolo Bonzini <bonzini@gnu.org>
+
+ * sed/execute.c (process_files): Do not add a default
+ command-line in in-place editing mode.
+
+2005-02-10 Paolo Bonzini <bonzini@gnu.org>
+
+ * testsuite/Makefile.tests: Add new testcase.
+ * testsuite/Makefile.am: Add new testcase.
+ * testsuite/Makefile.in: Regenerate.
+ * testsuite/appquit.good, testsuite/appquit.inp,
+ testsuite/appquit.sed: New testcase.
+ * testsuite/readin.sed: Quit after the last r command.
+ * testsuite/readin.good: Adjust.
+ * sed/execute.c (execute_program): Dump the results of the
+ a/r/R commands just before quitting.
+
+2005-02-10 Paolo Bonzini <bonzini@gnu.org>
+
+ * sed/regexp.c: Fix off-by-one error in the "invalid reference
+ to subexpression" message. Debian bug 294339.
+
+2005-02-08 Paolo Bonzini <bonzini@gnu.org>
+
+ * lib/obstack.h: include config.h.
+
+2005-02-01 Paolo Bonzini <bonzini@gnu.org>
+
+ * doc/Makefile.am: Don't enable MAKEINFO_HTML and TEXI2HTML_HTML
+ rules unless BUILD_HTML.
+
+2005-01-25 Paolo Bonzini <bonzini@gnu.org>
+
+ * sed/regexp.c: Fix building on GCC 2.95 and earlier.
+
+2004-12-26 Paolo Bonzini <bonzini@gnu.org>
+
+ Do not use leftmost-longest matching for addresses.
+
+ * NEWS: Add a note about this.
+ * testsuite/recall2.good, testsuite/recall2.inp,
+ testsuite/recall2.sed: New test.
+ * testsuite/Makefile.am, testsuite/Makefile.tests: Add the
+ recall2 test.
+ * sed/sed.h (struct regex): New.
+ (struct addr, struct subst, compile_regex, match_regex,
+ release_regex): Use it instead of regex_t.
+ * sed/compile.c (compile_program): Update for new meaning of
+ the third parameter of compile_regex.
+ * sed/execute.c (do_subst): Pass less conservative value to
+ the regsize parameter of match_regex.
+ * sed/regexp.c (compile_regex_1): New, extracted out of
+ compile_regex. The third parameter, needed_sub, now includes
+ \0 (so 10 means that \0 .. \9 are needed). Pass RE_NO_SUB
+ if needed_sub is zero.
+ (compile_regex): Accept a struct regex instead of a regex_t.
+ Save the regular expression's text.
+ (match_regex): Accept a struct regex instead of a regex_t.
+ Recompile the pattern if it was compiled with RE_NO_SUB.
+ (release_regex): Accept a struct regex instead of a regex_t.
+
+ * doc/Makefile.am: Generate sed.texi correctly when
+ building outside srcdir.
+
+2004-12-26 Paolo Bonzini <bonzini@gnu.org>
+
+ * BUGS: Add section about [a-z] matching uppercase characters,
+ and other locale issues.
+ * doc/sed-in.texi [!PERL]: Likewise.
+
+2004-11-15 Paolo Bonzini <bonzini@gnu.org>
+
+ * sed/execute.c (str_append_modified): Copy the first character
+ when using \l or \u in a multi-byte configuration. Use
+ WCRTOMB instead of wcrtomb.
+ * sed/sed.h (WCRTOMB): New.
+
+2004-11-11 Paolo Bonzini <bonzini@gnu.org>
+
+ * tst-rxspecer.c: Do not mix instructions and
+ declarations.
+ * basicdefs.h: Include locale.h before #defining
+ gettext, to avoid breakage under Solaris.
+ * sed/sed.c: do not include locale.h.
+
+2004-11-03 Paolo Bonzini <bonzini@gnu.org>
+
+ * bug-regex11.c: Improve portability.
+ * bug-regex12.c: Improve portability.
+ * bug-regex13.c: Improve portability.
+ * bug-regex14.c: Improve portability.
+ * bug-regex21.c: Improve portability.
+ * bug-regex9.c: Improve portability.
+ * tst-boost.c: Improve portability.
+ * tst-pcre.c: Improve portability.
+ * tst-regex.c: Improve portability.
+ * tst-rxspencer.c: Improve portability.
+
+2004-10-08 Paolo Bonzini <bonzini@gnu.org>
+
+ * lib/utils.c (utils_id_s): Renamed to open_files.
+ (struct id): Renamed to struct open_file.
+
+2004-10-08 Jakub Jelinek <jakub@redhat.com>
+
+ * testsuite/Makefile.tests (bug-regex*, run-tests,
+ run-ptests): Use $(SED).
+ (version): Likewise; prepend $(SED) invocation with $(SEDENV).
+
+2004-08-16 Paolo Bonzini <bonzini@gnu.org>
+
+ *** Version 4.1.2 released.
+
+2004-08-06 Paolo Bonzini <bonzini@gnu.org>
+
+ * sed/compile.c (bad_command): Fix off-by-one error.
+ (snarf_char_class): Fix problem with [.....[] (i.e.
+ last char in class is a bracket.
+
+2004-06-30 Paolo Bonzini <bonzini@gnu.org>
+
+ *** Version 4.1.1 released.
+
+2004-06-29 Paolo Bonzini <bonzini@gnu.org>
+
+ * sed/compile.c (mark_subst_opts): Return int.
+ * sed/execute.c (open_next_file): Fix uninitialized
+ variable.
+
+2004-06-10 Paolo Bonzini <bonzini@gnu.org>
+
+ *** Version 4.1 released.
+
+2004-03-25 Paolo Bonzini <bonzini@gnu.org>
+
+ * lib/obstack.h: Get current version.
+
+2004-03-13 Paolo Bonzini <bonzini@gnu.org>
+
+ Exit as soon as possible on an I/O error, and with
+ a better error message.
+
+ * lib/utils.c (ck_mkstemp, ck_rename, ck_getline): New
+ functions. Save temporary files into utils_id_s.
+ (struct id): Add a field named temp.
+ (ck_fopen): Init the new temp field of struct id.
+ (panic): Unlink temporary files before exiting.
+ * sed/execute.c (read_file_line): Use ck_getline.
+ (closedown): Use ck_rename.
+ (open_next_file): Use ck_mkstemp.
+
+2004-01-17 Paolo Bonzini <bonzini@gnu.org>
+
+ * sed/sed.h: Do not include wchar.h and wctype.h, and do
+ not include the alloca stuff.
+ * basicdefs.h: Move all that here.
+
+2004-01-20 Paolo Bonzini <bonzini@gnu.org>
+
+ * sed/sed.h (enum addr_state): New definition.
+ (enum addr_type): Remove ADDR_IS_NUM2.
+ (struct sed_cmd): Replace a1_matched with range_state.
+ * sed/compile.c (next_cmd_entry): Use range_state.
+ (compile_program): Death to ADDR_IS_NUM2. Compile
+ N,Mp as Np if N>=M.
+ * sed/execute.c (match_address_p): Rewritten. Handle
+ ADDR_IS_NUM here.
+ (match_an_address_p): Suit to new match_address_p.
+ (execute_program): Adjust to use range_state in `c'.
+ Handle addr_bang here.
+ (reset_addresses): Use range_state.
+
+ (struct input): New field "reset_at_next_file".
+ (read_pattern_space): Use it instead of "separate_files".
+ (process_files): Initialize it.
+
+2004-01-15 Paolo Bonzini <bonzini@gnu.org>
+
+ * sed/regexp.c [REG_PERL]: Use REG_STARTEND instead of regexec2.
+
+2004-01-09 Paul Eggert <eggert@twinsun.com>
+ Paolo Bonzini <bonzini@gnu.org>
+
+ * sed/sed.h (posixicity): New variable, replaces POSIXLY_CORRECT.
+ * sed/sed.c (main): Set it.
+ * sed/compile.c: Use it instead of POSIXLY_CORRECT.
+ * sed/execute.c: Use it instead of POSIXLY_CORRECT.
+ * doc/sed-in.texi: Document it and --posix.
+
+2004-01-05 Paul Eggert <eggert@twinsun.com>
+ Paolo Bonzini <bonzini@gnu.org>
+
+ * NEWS: Fix [\n] to match either backslash or n in POSIXLY_CORRECT mode.
+ * doc/sed-in.texi: Document this. Also, document regular expressions
+ a bit better overall, using terminology that's more similar to POSIX.
+ * sed/sed.h (enum text_types): New definition.
+ * sed/compile.c (normalize_text): Replace final parameter with one of
+ type normalize_text. If TEXT_REGEX and in POSIXLY_CORRECT mode,
+ grok character classes without replacing \n inside them.
+
+2004-01-03 Paolo Bonzini <bonzini@gnu.org>
+
+ * sed/execute.c (execute_program): print final line
+ after executing N, if not POSIXLY_CORRECT.
+
+2003-12-28 Paolo Bonzini <bonzini@gnu.org>
+
+ * sed/compile.c: fix "\\\n" in RHS of s command.
+ Reported by Mike Castle.
+ * testsuite/bkslashes.inp, testsuite/bkslashes.good,
+ testsuite/bkslashes.sed: New files.
+ * testsuite/Makefile.am, testsuite/Makefile.tests: Add
+ the bkslashes test.
+
+2003-12-16 Paolo Bonzini <bonzini@gnu.org>
+
+ *** Version 4.0b released.
+
+ * sed/mbcs.c: New file.
+ * sed/sed.h: Declare macros for mbcs.c.
+ * sed/compile.c: Use them.
+ (brlen): Moved to mbcs.c.
+ * sed/execute.c: Use them.
+ * sed/sed.c: call initialize_mbcs ().
+
+2003-12-14 Paolo Bonzini <bonzini@gnu.org>
+
+ * sed/regex.c (match_regex): fix memory leak.
+
+2003-11-27 Paolo Bonzini <bonzini@gnu.org>
+
+ * sed/execute.c (reset_addresses): leave addresses 0
+ and 0~STEP enabled.
+
+2003-11-15 Jakub Jelinek <jakub@redhat.com>
+
+ * sed/regex.c: Use fastmap.
+
+2003-09-21 Paolo Bonzini <bonzini@gnu.org>
+
+ *** Version 4.0a released.
+
+ * sed/execute.c (struct line): Add mbstate field.
+ (str_append): Keep mbstate up to date.
+ (str_append_modified): Likewise, and use towupper/towlower.
+ (line_init): Initialize mbstate.
+ (line_copy): Copy mbstate.
+ (line_append): Copy mbstate.
+
+2003-07-15 Stepan Kasal <kasal@ucw.cz>
+ Paolo Bonzini <bonzini@fnu.org>
+
+ Change the way we treat lines which are not terminated by a newline.
+ Such lines are printed without the terminating newline (as before)
+ but as soon as more text is sent to the same output stream, the
+ missing newline is printed, so that the two lines don't concatenate.
+
+ * sed/execute.c (output_file): Is now struct output; users adjusted
+ to access the fp field, call output_missing_newline before, and
+ call flush_output afterwards.
+ (read_file_line): Set line.chomped FALSE each time we encounter a
+ line without the newline terminator, no matter whether this is the
+ last input file or not, and no matter whether we are in
+ POSIXLY_CORRECT mode or not.
+ (output_missing_newline): New function which prints the suppressed
+ newline, if necessary.
+ (flush_output): New function for a common pattern.
+ (output_line): Use struct output, set its flag accordingly.
+ (dump_append_queue): Use `ck_fwrite' instead of output_line.
+ (do_list): Flush the output stream at the end.
+ (closedown): The code ``if(separate_files) rewind_read_files();''
+ (read_pattern_space): ... has been moved here.
+ (process_files): Don't do the default `p' at the end, ...
+ (execute_program): ... as this function is now responsible for it;
+ add the code to the end of the function and to the command `q';
+ the commands `d', `D' and `Q' thus no longer have to forge an empty
+ line.
+ (execute_program): Commands `c' and `i' no longer call the
+ function output_line with chomped==FALSE; instead, they chomp
+ the text and call the function with chomped==TRUE.
+ (execute_program): Command `e' no longer uses output_line; it
+ calls ck_fwrite directly. Commands `e', `L' and `=' flush
+ the output stream at the end.
+ * sed/compile.c (special_files): Use `struct output' instead of the
+ file name.
+ (get_openfile): ... special files are no longer copied to file_read
+ or file_write.
+ (fp_list): Move to sed.h (users adjusted) and rename as...
+ * sed/sed.h (struct output): ...this. New flag missing_newline
+ associated to the output stream.
+ (struct sed_cmd, struct subst): Use `struct output *' instead of mere
+ `FILE *'; adjust compile.c and execute.c.
+ * testsuite/noeolw.sed, testsuite/noeolw.good, testsuite/noeolw.1good,
+ testsuite/noeolw.2good: New tests
+
+2003-07-15 Stepan Kasal <kasal@ucw.cz>
+
+ * lib/utils.h, sed/sed.h: #include "basicdefs.h",
+ don't include it from various *.c files.
+ * sed/regex.c: Don't include regex.h as it's included via sed.h.
+
+2003-06-11 Paolo Bonzini <bonzini@gnu.org>
+
+ * lib/getline.c: Don't realloc with first param = NULL.
+
+2003-05-07 Paolo Bonzini <bonzini@gnu.org>
+
+ * sed/execute.c: Make treatment of ADDR_IS_NUM_MOD
+ simpler, and fix bugs in 0~5,+1
+ * sed/compile.c: Complain about addresses like 0
+ and 0,3 which are sources of misunderstandings.
+ Reported by Akim Demaille <akim@epita.fr>
+
+2003-03-25 Paolo Bonzini <bonzini@gnu.org>
+
+ *** Version 4.0.7 released
+
+ * sed/execute.c (append_replacement): Extract from
+ do_subst
+ (do_subst): Don't update count when a match was
+ skipped.
+ * testsuite/xbxcx3.good, testsuite/xbxcx3.sed,
+ testsuite/xbxcx3.inp: Regression tests
+
+2003-03-23 Paolo Bonzini <bonzini@gnu.org>
+
+ * sed/execute.c (do_subst): Fix several bugs with
+ numbered matches
+ * 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:
+ regression tests for the bugs
+
+2003-03-15 Paolo Bonzini <bonzini@gnu.org>
+
+ *** Version 4.0.6 released
+
+ * lib/mkstemp.c: Include sys/file.h if available for the
+ benefit of Ultrix
+
+2003-03-14 Paolo Bonzini <bonzini@gnu.org>
+
+ * sed/compile.c: Replace flagT with bool
+ * sed/execute.c: Replace flagT with bool
+ * sed/fmt.c: Replace flagT with bool
+ * sed/sed.c: Replace flagT with bool
+ * sed/regex.c: Replace flagT with bool
+
+2003-03-13 Paolo Bonzini <bonzini@gnu.org>
+
+ * sed/compile.c (compile_program): Understand parameter
+ of `v'.
+
+ * sed/sed.c (usage): Split help message into multiple
+ strings
+ (main): Don't understand -h and -V
+
+2003-03-12 Paolo Bonzini <bonzini@gnu.org>
+
+ * sed/compile.c (match_slash, snarf_char_class): More
+ multibyte character support
+ (brlen): New function
+ * testsuite/classes.good, testsuite/classes.inp,
+ testsuite/classes.sed: New files
+
+2003-03-10 Paolo Bonzini <bonzini@gnu.org>
+
+ * sed/compile.c (match_slash): Strip the \ in front of
+ slashes (so that the matcher sees x/ for s/x\///). Don't
+ match / and [ unless at the start of a character.
+
+2003-02-18 Paolo Bonzini <bonzini@gnu.org>
+
+ * sed/regex.c (compile_regex): // matches the last regular
+ expression even in POSIXLY_CORRECT mode.
+ * sed/compile.c (normalize_text): Treat multibyte character
+ sets correctly
+ (read_text): Don't swallow backslash sequences, run text
+ through normalize_text
+ (compile_program): Ditto for y command
+
+ * sed/compile.c (normalize_text): Add parameter that says
+ whether the text will be processed further to remove more
+ backslash escapes. Callers adjusted
+ (match_slash): Remove same parameter from here. Callers adjusted.
+
+2003-02-15 Paolo Bonzini <bonzini@gnu.org>
+
+ * sed/sed.h: Fix prototype for match_regex, declare re_registers
+ if REG_PERL
+ * sed/execute.c (do_subst): Use re_registers
+ * sed/regex.c (copy_regs): New function
+ [REG_PERL]: Use re_registers
+ [!REG_PERL]: Avoid using internal entry points, support pre-glibc
+ 2.3 regex for the sake of --without-included-regex.
+
+2003-01-04 Paolo Bonzini <bonzini@gnu.org>
+
+ * sed/sed.h: Move some stuff from here...
+ * sed/basicdefs.h: ...to here
+ * lib/utils.c (ck_fopen): Add FAIL parameter
+ * lib/utils.h: Adjust parameter
+ * sed/compile.c, sed/execute.c, sed/sed.c: Adjust callers
+
+ * sed/basicdefs.h: Add TRUE/FALSE
+ * sed/compile.c, sed/execute.c, sed/sed.c: Use them
+ * sed/fmt.c: Do not redefine them
+
+2003-01-02 Paolo Bonzini <bonzini@gnu.org>
+
+ * sed/sed.c: Bump copyright year
+
+2002-12-24 Paolo Bonzini <bonzini@gnu.org>
+
+ * sed/sed.c: Use bindtextdomain
+ * sed/basicdefs.h [__EMX__]: Define initialize_main
+ * lib/getline.c [__EMX__]: Strip trailing CR
+
+ * sed/regex.c: Don't use N_ on the lines that define
+ error messages, some compilers complain.
+
+2002-12-18 Paolo Bonzini <bonzini@gnu.org>
+
+ *** Version 4.0.5 released
+
+ * sed/compile.c: Don't use N_ on the lines that define
+ error messages, some compilers complain.
+
+2002-12-16 Paolo Bonzini <bonzini@gnu.org>
+
+ * sed/compile.c: Improvements to some error messages;
+ `a', `i', `l', `L', `r' accept two addresses except in
+ POSIXLY_CORRECT mode.
+
+2002-12-14 Paolo Bonzini <bonzini@gnu.org>
+
+ * lib/regex_internal.c: Fix problem on non-glibc
+ systems, from Jakub Jelinek
+ * lib/regex.c (RE_ENABLE_I18N): Conditionalize on
+ HAVE_MBRTOWC and HAVE_WCRTOMB.
+ * lib/getline.c: Fix compilation on non-glibc system
+ * lib/snprintf.c: Fix compilation on non-glibc system
+ * lib/basicdefs.h [P_]: Make more portable
+
+2002-12-12 Paolo Bonzini <bonzini@gnu.org>
+
+ *** Version 4.0.4 released
+
+2002-11-21 Paolo Bonzini <bonzini@gnu.org>
+
+ *** Version 4.0.3 released
+
+2002-11-19 Paolo Bonzini <bonzini@gnu.org>
+
+ *** Version 4.0.2 released
+
+2002-11-05 Paolo Bonzini <bonzini@gnu.org>
+
+ *** Version 4.0.1 released
+
+2002-10-23 Paolo Bonzini <bonzini@gnu.org>
+
+ *** Version 4.0 released
+
+2002-10-28 Paolo Bonzini <bonzini@gnu.org>
+
+ * lib/utils.c: Don't fail for EBADF in fflush
+ * src/sed.c: the_program is now a global
+
+2002-10-19 Paolo Bonzini <bonzini@gnu.org>
+
+ * src/sed.c: Print GNU sed in --version for GNU sed,
+ and super-sed for super-sed (thanks to Bruno Haible)
+
+2002-10-17 Paolo Bonzini <bonzini@gnu.org>
+
+ *** Version 3.96 released
+
+2002-10-16 Isamu Hasegawa <isamu@yamato.ibm.com>
+
+ * src/execute.c (execute_program): Multibyte 'y'
+ * src/compile.c (compile_program): Likewise
+ * src/sed.h: Likewise
+
+2002-10-08 Paolo Bonzini <bonzini@gnu.org>
+
+ *** Version 3.95 released
+
+2002-07-15 Paolo Bonzini <bonzini@gnu.org>
+
+ * src/sed.h: rfile --> fname, wfile --> fp
+ * src/compile.c (compile_command): Parse 'R' like 'w', use
+ separate lists for file read and file write
+ * src/compile.c (get_openfile): New name of get_writefile
+ * src/compile.c (rewind_read_files): New function
+ * src/sed.h: Declared here
+ * src/execute.c (closedown): And called here
+ * src/execute.c (append_queue): Added 'free' field
+ * src/execute.c (execute_program): Implement 'R'
+
+2002-06-09 Paolo Bonzini <bonzini@gnu.org>
+
+ * src/execute.c (do_subst): Replaced flag was set on every
+ regexp match, while the first matches should not set it
+ for s///N.
+
+2002-06-08 Paolo Bonzini <bonzini@gnu.org>
+
+ * src/compile.c (compile_file): Open the script in text mode
+ * lib/utils.c (utils_fp_name): Shorten the output
+ * lib/utils.c (ck_fread, ck_fwrite, ck_fflush): Clearerr
+ after printing an error.
+ * lib/utils.c (ck_fclose): Work on stdout as well if stream == NULL
+ and flush before closing to check for errors
+
+2002-05-30 Paolo Bonzini <bonzini@gnu.org>
+
+ * src/compile.c (compile_program): Implement W
+ * src/execute.c (execute_program): Likewise
+
+2002-02-14 Paolo Bonzini <bonzini@gnu.org>
+
+ * src/execute.c (str_append_modified): Fixed a stupid
+ bug (stop condition was *start == *end, meant to be
+ start == end)
+
+2002-02-28 Paolo Bonzini <bonzini@gnu.org>
+
+ * src/sed.h (struct sed_cmd): exit_status -> int_arg
+ * src/compile.c: Likewise
+ * src/execute.c: Likewise
+
+ * src/compile.c (compile_command): Parse `l' like
+ `q' and `Q'; default for int_arg is -1
+ * src/execute.c (do_list): New argument, used instead
+ of lcmd_out_line_len
+ (execute_program): Interpret int_arg for the `l' command;
+ return 0 for `q' and `Q' if int_arg is -1
+
+ * src/fmt.c: New file, looted from GNU textutils
+ * src/compile.c: Parse `L'
+ * src/execute.c: Execute `L'
+
+2002-04-23 Paolo Bonzini <bonzini@gnu.org>
+
+ * src/sed.c (usage, main): Parse -s
+ * src/sed.h (separate_files): New variable
+ * src/execute.c (separate_files): New variable
+ * src/execute.c (reset_addresses): New function to make range
+ addresses work separately on each file when using in-place
+ editing
+ * src/execute.c (execute_program): The `n' and `N' use test_eof
+ so that the script restarts at end of file, not at end of input
+ * src/execute.c (test_dollar_EOF): Make $ work separately
+ on each file when using -s; renamed to test_eof
+
+2002-02-05 Paolo Bonzini <bonzini@gnu.org>
+
+ * lib/utils.c: Added directory parameter to
+ temp_file_template
+ * lib/utils.h: Adjusted
+ * src/execute.c: Adjusted
+
+2002-01-29 Paolo Bonzini <bonzini@gnu.org>
+
+ * src/compile.c (mark_subst_opts): Signal an error if
+ there are multiple g or p options
+ * src/compile.c (compile_program): Raise appropriate
+ error if second string in y command is longer than
+ first (used to be "excess junk after command")
+
+2001-12-31 Paolo Bonzini <bonzini@gnu.org>
+
+ * lib/getline.c: Strip the terminating \r under Windows
+ or MS-DOS.
+
+ * testsuite/xemacs.sed, testsuite/xemacs.inp,
+ testsuite/xemacs.good: Submitted by John Fremlin
+ (john@fremlin.de)
+
+2001-12-27 Paolo Bonzini <bonzini@gnu.org>
+
+ * sed/execute.c (do_subst): Flags in optimized s/^xx/
+ commands were discarded (see the change below)
+
+2001-12-19 Paolo Bonzini <bonzini@gnu.org>
+
+ * sed/execute.c (resize_line): Limit inactive space to two
+ thirds of a buffer
+ * sed/execute.c (line_init): Initialize buf->active
+ * sed/execute.c (str_append, str_append_modified, line_copy,
+ do_list, do_subst, execute_program, process_files): Operate
+ on active space
+
+ * sed/execute.c (do_subst): Optimize s/^xx// by making a part
+ of the buffer inactive and s/xx$// by truncating it.
+ * sed/execute.c (execute_program): Optimize D by making a part
+ of the buffer inactive
+
+ * testsuite/uniq.sed, testsuite/uniq.inp, testsuite/uniq.good:
+ added to test P and D commands.
+ * testsuite/fasts.sed, testsuite/fasts.inp, testsuite/fasts.good:
+ added to test the new optimization done on the `s' command.
+
+2001-12-17 Paolo Bonzini <bonzini@gnu.org>
+
+ * testsuite/dc.inp: Also compute Easter of 2002 :-)
+
+ * sed/execute.c [!HAVE_FCHMOD]: Don't chmod the output file
+ if working in-place
+
+2001-11-12 Paolo Bonzini <bonzini@gnu.org>
+
+ * sed/sed.h (struct sed_cmd): a1 is a pointer too
+ * sed/compile.c: Likewise
+ * sed/execute.c: Likewise
+
+ * sed/compile.c: Use obstacks
+ * sed/execute.c: Likewise
+
+2001-11-09 Paolo Bonzini <bonzini@gnu.org>
+
+ * sed/compile.c (mark_subst_opts): Parse option `e',
+ preserve two occurrences of the `e' and `p' options.
+ * sed/execute.c (do_subst) [HAVE_POPEN]: Interpret option
+ `e' (evaluate, like Perl's but uses Bourne shell).
+ * sed/sed.h (struct subst): Add an `eval' flag.
+
+ * sed/compile.c (compile_program): Compile command `e'
+ like `c'.
+ * sed/execute.c (execute_program): Execute command `e'.
+
+2001-09-25 Paolo Bonzini <bonzini@gnu.org>
+
+ * sed/compile.c (get_writefile) [!POSIXLY_CORRECT]:
+ support /dev/stdout
+ * sed/execute.c (open_next_file, closedown): Support
+ in-place editing
+ * sed/execute.c (backup_file_name): New function to
+ support in-place editing
+ * sed/main.c (usage, main): Parse -i.
+ * sed/utils.c: Moved to lib directory
+
+ * lib/utils.c (temp_file_template): New function.
+ * sed/utils.h: Declared temp_file_template.
+
+2001-09-05 Paolo Bonzini <bonzini@gnu.org>
+
+ * sed/execute.c (do_subst): `baaac', if passed through
+ s/a*/x/g, gave `xbxxcx' rather than `xbxcx' (because an
+ empty string matched before the `c'. Fixed.
+
+ * sed/execute.c: Removed mmap support, I/O is done using
+ getline (slower but more bug-proof).
+ * sed/utils.c: Likewise.
+ * lib/getline.c: New file
+
+2001-03-22 Paolo Bonzini <bonzini@gnu.org>
+
+ * sed/compile.c (normalize_text) [POSIXLY_CORRECT]: Enable
+ escapes in modes other than BRE.
+
+2001-03-21 Paolo Bonzini <bonzini@gnu.org>
+
+ * sed/compile.c (normalize_text): Support \XXX in Perl mode,
+ \oXXX in non-Perl mode.
+
+2001-03-18 Paolo Bonzini <bonzini@gnu.org>
+
+ * sed/compile.c (compile_program): Fixed missing break when
+ compiling 'q' and 'Q'.
+
+ * sed/compile.c (check_final_program): Removed now spurious
+ call to compile_regex
+ * sed/regex.c (compile_regex): Don't track the last compiled
+ regex
+ * sed/regex.c (execute_regex): Track here the last compiled
+ regex
+
+2001-03-02 Paolo Bonzini <bonzini@gnu.org>
+
+ * sed/compile.c (setup_replacement): Support \[lLuUE] like
+ Perl and vi.
+ * sed/compile.c (new_replacement): Accept new parameter
+ to support \[lLUuE].
+ * sed/sed.h (enum replacement_types): New declaration
+ * sed/execute.c (do_subst): Use new function str_append_modified
+ to apply the changes required via \[lLUuE].
+ * sed/execute.c (str_append_modified): New function
+
+2001-03-02 Paolo Bonzini <bonzini@gnu.org>
+
+ * sed/compile.c (setup_replacement): Count the number of backreferences
+ that the RHS needs
+ * sed/regex.c (compile_regex): Check if there is a sufficient number
+ of backreferences (new argument needed_sub replaces nosub)
+ * sed/compile.c (compile_address, compile_program,
+ check_final_program): Callers adjusted
+
+2001-01-03 Paolo Bonzini <bonzini@gnu.org>
+
+ * sed/compile.c(snarf_char_class) [REG_PERL]: Don't parse
+ `\n' specially
+ * sed/compile.c(match_slash) [REG_PERL]: Ditto
+
+ * sed/compile.c(read_text) [REG_PERL]: Support [xX] modifiers
+ * sed/compile.c(mark_subst_opts) [REG_PERL]: Ditto
+
+2001-01-04 Paolo Bonzini <bonzini@gnu.org>
+
+ * testsuite/Makefile.am: Use automake's implementation
+ of `make check'. Removed the test targets
+ * testsuite/Makefile.tests: Moved the test targets here
+ (new file).
+ * testsuite/runtest: New file
+
+ * testsuite/Makefile.tests: `khadafy' test uses EREs.
+
+ * testsuite/spencer.inp: Removed the ^* test
+
+ * testsuite/spencer.sh: Don't rely on awk; more comments too
+
+2001-01-07 Paolo Bonzini <bonzini@gnu.org>
+
+ * sed/compile.c (compile_program): Added `T' (branch if failed)
+ * sed/execute.c (shrink_program, execute_program): Ditto
+
+2001-02-08 Paolo Bonzini <bonzini@gnu.org>
+
+ * sed/compile.c (compile_program): Added `Q' (quit without output)
+ * sed/execute.c (execute_program): Ditto
+
+ * sed/compile.c (compile_program): Fill in exit_status for `q' and `Q'
+ * sed/execute.c (execute_program): Return -1 for `go on', 0..255
+ to set the exit status
+ * sed/execute.c (process_files): Interpret new convention for
+ execute_program, return sed's exit code
+ * sed/sed.c (main): Return process_files's exit code
+ * sed/sed.h (struct sed_cmd): Declare exit_status
+
+2000-12-21 Paolo Bonzini <bonzini@gnu.org>
+
+ * lib/snprintf.c [BOOTSTRAP]: Don't include stdio.h
+ * lib/strerror.c [BOOTSTRAP]: Don't include stdio.h
+ * sed/execute.c [!HAVE_ISATTY]: Don't buffer stdin
+
+2000-12-11 Paolo Bonzini <bonzini@gnu.org>
+
+ * sed/compile.c(mark_subst_opts): Support [mMsS] flags
+ * sed/compile.c(read_text): Support [MS] flags for
+ addresses
+ * sed/regex.c(compile_regex): Support arbitrary flags for
+ regncomp.
+
+ * sed/regex.c(compile_regex) [REG_PERL]: Don't call
+ normalize_text.
+
+2000-12-08 Paolo Bonzini <bonzini@gnu.org>
+
+ * basicdefs.h: Moved here from the `sed' subdirectory.
+
+ * configure.in: Removed crap to pick a regex engine.
+ Added snprintf to the AC_REPLACE_FUNCS call.
+
+ * lib/snprintf.c: New file.
+
+ * sed/regex.c(compile_regex): Use regncomp
+ * sed/regex.c(match_regex): Use regexec2
+
+ * sed/compile.c(compile_program): Implemented the `v' command.
+
+ * sed/sed.c(main): Implemented the `r' and `R' options
+
+ * sed/sed.h: Replaced use_extended_syntax_t with
+ extended_regexp_flags to support Perl regular expressions.
+
+ * sed/execute.c(open_next_file): Don't mmap stdin (because
+ we cannot seek into it, so a redirected stdin's contents
+ would not be "eaten" by sed)
+
+Mon Aug 30 23:40:08 PDT 1999 Ken Pizzini <ken@gnu.org>
+
+ *** Version 3.02.80 released
+
+ * sed/execute.c(do_subst): lib/regex.c(re_search_2) seems to
+ want one extra backreference register; humor it.
+
+ * sed/regex.c(compile_regex): work around some odd assumptions
+ that lib/regex.c(re_compile_pattern) makes about our desired
+ RE syntax.
+
+ * configure.in: tweaked version to 3.02.80; added new entries
+ to the ALL_LINGUAS definition.
+
+ * doc/sed.1, doc/sed.texi, BUGS: explicitly request the output
+ of sed --version in bug-reporting instructions.
+
+ * doc/sed.texi: the old "informal seders list" is dead; document
+ the new sed-users mailing list instead (under Other Resources).
+
+
+Thu Aug 19 23:27:54 PDT 1999 Ken Pizzini <ken@gnu.org>
+
+ * sed/sed.h: Add explicit #include of "regex-sed.h" (rather
+ than relying on parent file doing so); change the "cmd_regex"
+ member of sed_cmd: make it a pointer (instead of a struct),
+ and change its name to cmd_subst; add prototypes for newly
+ exported functions bad_prog(), normalize_text(), compile_regex(),
+ match_regex(), and release_regex(); drop rx_testing variable.
+
+ * sed/compile.c: move the compile_regex() function to regex.c;
+ export bad_prog() and normalize_text() functions; eliminate the
+ rx_testing debris; rename the NOLEAKS symbol to more descriptive
+ DEBUG_LEAKS; make cmd_regex to cmd_subst fixes (see above);
+ make use of newly abstracted release_regex() function.
+
+ * sed/execute.c: abstract out the regex matching to
+ regex.c:match_regex(); NOLEAKS to DEBUG_LEAKS change;
+ cmd_regex to cmd_subst structure member name change.
+
+ * sed/execute.c(do_subst): use re_registers/regoff_t instead of
+ regmatch_t to hold the backreference registers, make "offset"
+ always be relative to the beginning of the string (rather than
+ a delta from "start"), defer some matching bookkeeping (e.g.,
+ not_bol_p) to match_regex().
+
+ * sed/sed.c(main): loose rx_testing variable; NOLEAKS
+ (aka DEBUG_LEAKS) code attempting to release
+ _nl_current_default_domain is problematic, so omit it.
+
+ * sed/regex.c: new file --- abstracts out the interface to the
+ regex engine so that less conditional code is required in
+ compile.c and execute.c, and so as to make a change of engine
+ easier; implements compile_regex() (which looks an awful lot
+ like the one that used to live in compile.c), match_regex(),
+ and (if DEBUG_LEAKS is set) release_regex().
+
+Sun Apr 18 04:40:46 PDT 1999 Ken Pizzini <ken@gnu.org>
+
+ * sed/sed.c(main): conditionalize calls to setlocale() and
+ textdomain() to only occur if their support is needed/wanted.
+
+Sun Apr 18 03:01:46 PDT 1999 Ken Pizzini <ken@gnu.org>
+
+ * bootstrap.sh: "foo || bar && baz" was not grouping like I
+ expected ("foo || (bar && baz)") under at least one shell,
+ so change the test for a pre-existing config.h file to an
+ if statement.
+
+ * bootstrap.sh: added -DUSE_REGEX_GNU_H option to the
+ compiler invocation, to ensure that we get a usable
+ regex library included.
+
+Sun Apr 18 02:59:42 PDT 1999 Ken Pizzini <ken@gnu.org>
+
+ * sed/sed.h, sed/utils.c: conditionalized inclusion of <libintl.h>
+ to occur only if ENABLE_NLS is defined.
+
+Sun Apr 18 01:48:45 PDT 1999 Ken Pizzini <ken@gnu.org>
+
+ * sed/compile.c(xofa,normalize_text,convert_number): change
+ name of xofa() function to convert_number(); change semantics
+ to do all of the work of the text->number conversion.
+
+ * sed/compile.c(normalize_text): add new \dDDD decimal
+ and \oOOO octal escapes.
+
+Sun Mar 28 21:05:07 PST 1999 Ken Pizzini <ken@gnu.org>
+
+ * sed/sed.c(main): if NOLEAKS is set, free up a word that
+ the call to textdomain() allocated.
+
+ * sed/execute.c(read_file_line): plug up (minor) memory leak:
+ if buffer.alloc==0 we may have malloc()'d 1 byte anyway,
+ so be sure to FREE(buffer.text) before calling line_init();
+
+Fri Mar 26 16:52:10 PST 1999 Ken Pizzini <ken@gnu.org>
+
+ * sed/compile.c(match_slash): somewhere between 3.02
+ and 3.02a we lost the ability to use a newline as
+ the s/// delimiter; restore this ability.
+
+ * sed/compile.c(compile_regex): forget about trying
+ to cache the compiled form of the last RE --- it
+ causes more problems than its worth. We now only
+ cache the source form.
+
+ * testsuite/help.good: update to reflect output containing
+ new options.
+
+Sun Dec 6 00:51:23 PST 1998 Ken Pizzini <ken@gnu.org>
+
+ * sed/utils.c(ck_fwrite): fix i18n bug of using a printf
+ fragment of "item%s" to handle plural text.
+
+Mon Nov 23 11:03:40 PST 1998 Ken Pizzini <ken@gnu.org>
+
+ * doc/sed.1, doc/sed.texi: ran ispell over these
+ files to catch the more obvious typos...
+
+Sun Nov 1 00:09:07 PST 1998 Ken Pizzini <ken@gnu.org>
+
+ * sed/execute.c(do_list): make a `lcmd_out_line_len'
+ (--line-length) of zero mean "infinite length",
+ i.e., "never wrap".
+
+Sat Oct 31 23:06:50 PST 1998 Ken Pizzini <ken@gnu.org>
+
+ * execute.c(match_an_address_p,process_files),
+ compile.c(compile_program): back out the "zero-address"
+ changes of 1998-09-27. It was a neat idea, but there are
+ too many dark corners which don't work well. The
+ special code for handling line ranges starting at
+ address zero (from 1998-08-31) are still there though:
+ this seems to work fine with no surprises.
+
+Sat Oct 31 22:18:59 PST 1998 Ken Pizzini <ken@gnu.org>
+
+ * sed/sed.c, sed/sed.h, sed/execute.c: added new
+ `lcmd_out_line_len' variable. (Idea suggested by
+ Carlos J. G. Duarte <l38076@alfa.ist.utl.pt>.)
+ Also added ATOI macro (which uses strtoul() if available,
+ with fall-back to atoi()).
+ * sed/sed.c(main): attempt to use COLS environment variable
+ to set a reasonable `lcmd_out_line_len'; added -l/--line-length
+ command-line options to set the new `lcmd_out_line_len' flag.
+ * sed/sed.c(usage): documented new -l/--line-length options.
+ * sed/execute.c(do_list): use `lcmd_out_line_len' variable
+ instead of `LCMD_OUT_LINE_LEN'.
+ * sed/execute.c: deleted now obsolete LCMD_OUT_LINE_LEN define.
+ * configure.in: added strtoul to the AC_CHECK_FUNCS call.
+
+Sat Oct 31 21:37:17 PST 1998 Ken Pizzini <ken@gnu.org>
+
+ * sed/sed.c, sed/sed.h, sed/execute.c: added new `force_unbuffered'
+ flag. (Idea suggested by Frank Strauss <strauss@escape.de>.)
+ * sed/sed.c(main): added -u/--unbuffered command-line options
+ to set the new `force_unbuffered' flag.
+ * sed/sed.c(usage): documented new -u/--unbuffered options.
+ * sed/execute.c: changed the name of the `is_tty' flag in struct
+ input to a more generic `no_buffering'; also removed HAVE_ISATTY
+ conditional on this member.
+ * sed/execute.c(slow_getline): removed HAVE_ISATTY conditonal
+ compilation of this function.
+ * sed/execute.c(output_line): if force_unbuffered is set,
+ then force a fflush() even if writing to stdout.
+ * sed/execute.c(open_next_file): added handling of the
+ new `force_unbuffered' flag so that slow_getline()
+ will always be used for input.
+ * sed/execute.c(read_file_line): changed the (conditionally
+ compiled) test of `input->is_tty' to (unconditionally)
+ use the new spelling `input->no_buffering'.
+
+Thu Oct 15 12:08:09 PDT 1998 Ken Pizzini <ken@gnu.org>
+
+ * configure.in: deleted AC_ARG_PROGRAM call; this is already
+ done for us by AM_INIT_AUTOMAKE, and we were winding up
+ with a doubled-transform.
+
+Sun Sep 27 01:42:42 PDT 1998 Ken Pizzini <ken@gnu.org>
+
+ * compile.c(compile_program): remove special-case code for matching
+ address range with a `0' beginning.
+
+ * compile.c(compile_address): change default addr_number to
+ be a pragmatically impossible countT value, instead of zero.
+
+ * execute.c: spell macro REGNEXEC() unconditionally instead of
+ playing with conditional definition of regnexec() macro.
+
+ * execute.c(match_an_address_p): added third argument (and changed
+ callers in match_address_p). Added special code to ignore
+ non-numeric matches when processing "line zero".
+
+ * execute.c(process_files): added a "line zero" pass through the
+ commands script.
+
+Sun Sep 27 00:20:53 PDT 1998 Ken Pizzini <ken@gnu.org>
+
+ * compile.c(xofa,normalize_text): new functions.
+ * compile.c(compile_regex): cache last_compiled_re (with its
+ associated flags); add POSIXLY_CORRECT behavior for empty RE.
+ Make use of the new normalize_text() function.
+ * compile.c(setup_replacement): Make use of the new normalize_text()
+ function.
+
+Sat Sep 26 22:59:13 PDT 1998 Ken Pizzini <ken@gnu.org>
+
+ * lib/regex-gnu.h: added missing prototype for regncomp().
+
+Mon Sep 14 20:47:23 PDT 1998 Ken Pizzini <ken@gnu.org>
+
+ * sed/sed.c(main): use EXIT_SUCCESS instead of 0, in case
+ we are built on a system (such as VMS) where EXIT_SUCCESS
+ is distinct from 0.
+
+Wed Sep 9 22:17:28 PDT 1998 Ken Pizzini <ken@gnu.org>
+
+ * sed/Makefile.am: added -I../intl the INCLUDES line; if we are
+ building in a directory outside the source tree and the system
+ we are building on does not have a <libintl.h> header, then
+ the build was failing, because libintl.h is a build-time
+ constructed source file.
+
+ * configure.in: tweaked version to be 3.02b.
+
+Wed Sep 9 19:28:14 PDT 1998 Ken Pizzini <ken@gnu.org>
+
+ *** Version 3.02a released
+
+ * sed/compile.c(mark_subst_opts,read_label,compile_program):
+ wherever we accept a ; as a command terminator, also allow a } or
+ a # to appear. (This allows for less cluttered-looking scripts,
+ such as: sed '/foo/{x;G}' (instead of: sed '/foo/{x;G;}').)
+
+Wed Sep 9 18:17:07 PDT 1998 Ken Pizzini <ken@gnu.org>
+
+ * sed/compile.c(compile_regex): use regncomp() instead
+ of regcomp(), so that a script with NULs in its REs
+ will work in the expected manner.
+
+ * sed/compile.c(ADDNUL,REGNCOMP): added support macros
+ for above.
+
+ * lib/regex.c(regncomp,regcomp): added regncomp() and
+ made regcomp() a simple wrapper function.
+
+Mon Aug 31 21:48:30 PDT 1998 Ken Pizzini <ken@gnu.org>
+
+ * sed/sed.c(compile_program): if the first address of
+ a range is the number 0 (or a 0~N sequence), start
+ out in the "a1_matched" state. This allows one
+ to match an initial chunk of a file without undue
+ convolutions for handling the case where the match
+ for the end of the sequence happens to be the first
+ line.
+
+Sun Aug 16 03:34:25 PDT 1998 Ken Pizzini <ken@gnu.org>
+
+ * sed/compile.c(snarf_char_class,match_slash): simplify
+ handling of "premature newline" error. Also, get the
+ line number right in the error message if we encounter
+ a "premature newline" during char-class snarfing.
+
+Sun Aug 16 02:59:20 PDT 1998 Ken Pizzini <ken@gnu.org>
+
+ * sed/compile.c: added N_() markers and corresponding gettext()
+ (er, _()) calls.
+
+ * Merged in i18n contribution from Erick Branderhorst
+ <Erick.Branderhorst@asml.nl>. His ChangeLog entry
+ for the changes I've incorporated so far:
+
+1998-07-24 Erick Branderhorst <Erick.Branderhorst@asml.nl>
+ * configure.in (ALL_LINGUAS, AM_GNU_GETTEXT): nl
+ * sed/{sed.h,utils.c}: #include <libintl.h> #define _(String)
+ gettext (String)
+ * sed/sed.c: #include <locale.h>
+ * po/POTFILES.in: sed/{compile,execute,sed,utils}.c
+ * run gettextize -f
+ * acconfig.h: #undef LOCALEDIR ENABLE_NLS HAVE_CATGETS
+ HAVE_GETTEXT HAVE_LC_MESSAGES HAVE_STPCPY
+
+Fri Aug 14 13:52:57 PDT 1998 Ken Pizzini <ken@gnu.org>
+
+ * Merged code from 3.02 with a branched development
+ tree from late May; the following (out-of-order)
+ changelog entry is from the branched tree.
+
+Sat May 30 12:23:16 PDT 1998 Ken Pizzini <ken@gnu.org>
+
+ * sed/compile.c, sed/execute.c: added (conditional on NOLEAKS macro)
+ code to free all dynamically allocated memory.
+
+ * sed/sed.c, sed/compile.c, sed/execute.c: much shuffling
+ of code --- ordered functions such that no forward
+ declarations are necessary, and placed all static prototypes
+ immediately before the actual function definition.
+ This accomplished two things: first, I find the new ordering
+ a more natural way to read the code than the previous
+ ordering, and second, the new ordering give the compiler
+ a better opportunity to discover inlining possibilities.
+ (The odd "prototype declaration+old-style definition"
+ style is used because I feel it is the least ugly way
+ of supporting K&R1 C while still getting the benefit of
+ prototypes when they are available.)
+
+ * sed/basicdefs.h: added MEMCPY() macro to hide the VCAST()s
+ that ought to be used with memcpy().
+
+ * sed/execute.c: Change calls to memcpy() to go through the
+ new MEMCPY() macro. Various prototypes: elide variable name
+ if it does not add any human-useful documentary information
+ to the bare type.
+
+ * sed/sed.c(main): Updated calls to compile_string() to add third
+ (length) argument. Changed call to obsolete close_all_files()
+ to a call to the new finish_program().
+
+ * sed/sed.c(map_file): Attempt to clean-up how "size" gets
+ cast and tested; remove spurious S_ISREG test (just let
+ mmap() fail if it doesn't support the underlying file type).
+
+ * sed/sed.c: Deleted old RX library stub declarations.
+
+ * sed/sed.c(map_file,unmap_file): added VCAST()s to the
+ mmap()/munmap() calls.
+
+ * sed/utils.c(ck_fclose): added support for ANSI C
+ functionality where passing a NULL argument means
+ to fclose() _all_ open streams. (Well, almost.
+ Only closes streams which were previously ck_fopen()ed,
+ as I don't care to figure out how to autoconf-detect
+ whether fclose(NULL) is properly supported on a given
+ platform.)
+
+ * sed/sed.h: Renamed `struct text_buf' member `text_len'
+ to `text_length'. Abstracted out `enum addr_types'
+ from `struct addr'; added new enum types num2,step,step_mod;
+ renamed mod to num_mod. De-unionized the regex,number,
+ {modulo-offset/step} components of `struct addr', in
+ anticipation of new features. Changed type of `a2' member
+ of `struct sed_cmd': now a pointer to save space.
+ Abstracted out `struct replacement' from `struct subst'.
+ Cleaned up declaration of `x' union of `struct addr'.
+ Fixed prototype for compile_string(). Replaced prototype
+ for old close_all_files() with one for new finish_program().
+
+ * sed/sed.h, sed/compile.c, sed/execute.c: changed to
+ simplify the data structures used for branches and
+ command blocks: simplified `struct vector'; made
+ `struct label' local to compile.c; `struct sed_cmd'
+ was modified to support a simpler design for branches
+ and blocks.
+
+ * sed/execute.c: Conditionally added ADDNUL() macro so that
+ the function call overhead is only incurred if nul_append()
+ _must_ be called. Made some commentary edits, including
+ typo fixes.
+ * sed/execute.c(resize_line): changed semantics of "len" argument
+ from "additional length" to "target length"; made
+ INITIAL_BUFFER_SIZE a minimum allocation length.
+ * sed/execute.c(str_append): adjusted to new resize_line()
+ semantics.
+ * sed/execute.c(line_copy): use FREE()+MALLOC() instead of
+ REALLOC() to avoid unnecessary copying of old text; add the
+ "try doubling first" allocation heuristic (just like
+ resize_line() does).
+ * sed/execute.c(line_exchange): new function.
+ * sed/execute.c(nul_append): make whole function (not just its
+ body) conditional on HAVE_REGNEXEC macro; adjust to new
+ resize_line() semantics.
+ * sed/execute.c(read_mem_line): use str_append() instead if
+ custom in-line code; compensate for new default of
+ "line.chomped = 0" in read_pattern_space() by setting
+ "line.chomped = 1" where appropriate.
+ * sed/execute.c(read_file_line): use different trigger to
+ determine that "buffer" is uninitialized, and do a full
+ initialization if required; use str_append() instead of custom
+ in-line code in two places; compensate for new default of
+ "line.chomped = 0" in read_pattern_space() by setting
+ "line.chomped = 1" where appropriate.
+ * sed/execute.c(output_line): don't bother calling ck_fwrite()
+ if length==0.
+ * sed/execute.c(release_append_queue): new function.
+ * sed/execute.c(dump_append_queue): use release_append_queue()
+ instead of in-line equivalent.
+ * sed/execute.c(read_pattern_space): conditionalize call to
+ dump_append_queue() for alleged performance reasons; changed
+ default "line.chomped" value to more common "1", and added an
+ assignment of "0" where this made a difference.
+ * sed/execute.c(match_an_address_p): deleted "is_addr2_p"
+ argument; reorder cases to match order in enum declaration; add
+ cases for new "addr_is_num2", "addr_is_step", and
+ "addr_is_step_mod" address types; alter nul_append() call to be
+ through ADDNUL() macro; fix to new struct member and enum
+ spellings in (formerly addr_is_mod); addr_is_num_mod case.
+ * sed/execute.c(match_address_p): remove oblsolete third argument
+ to calls to match_address_p(); alter references to sed_cmd
+ member a2 to reflect new pointer status; add new support for
+ a2->addr_type addr_is_step and addr_is_step_mod cases.
+ * sed/execute.c(do_subst): add NOLEAKS support logic; use
+ ADDNUL() wrapper to nul_append(); simplify replacement
+ expansion by using the new "struct replacement" data structure;
+ use line_exchange() function instead of custom in-line code.
+ * sed/execute.c(process_files): added NOLEAKS code.
+ * sed/execute.c(execute_program): updated implementations
+ of the `{', `}', `:', `b', and `t' commands; modified
+ `c' command gratuituosly; fixed potential memory
+ overrun in `D' command. Simplified how nonstandard
+ `loop increments' work. Use line_exchange() instead of
+ custom in-line code in 'x' case.
+ * sed/execute.c[EXPERIMENTAL_DASH_N_OPTIMIZATION conditional
+ code]: various modifications intended to keep this
+ code in sync with the new changes, but the code still
+ retains its previous bugs.
+
+ * sed/compile.c: use "exit(EXIT_FAILURE) instead of "exit(1)",
+ just in case we get compiled under VMS.
+ * sed/compile.c: Change type of prog_info.base to decrease needs
+ for casting; then elimiated the casts in question ;-).
+ * sed/compile.c: Added struct sed_label (moved from sed.h, then
+ modified).
+ * sed/compile.c: Removed "readit_p" flag from struct fp_list.
+ * sed/compile.c: Added module-global "blocks" variable.
+ * sed/compile.c: Extracted more error-message constant strings
+ to named variables.
+ * sed/compile.c(check_final_program): updated to
+ reflect new data structures and use new fucntions.
+ Added call to compile_regex() to release unneeded
+ memory.
+ * sed/compile.c: deleted obsolete new_vector() function;
+ abstracted new read_label() function; abstracted new
+ release_label() function; added new `blocks' module-static
+ variable.
+ * sed/compile.c(compile_program): updated implementations
+ of the `{', `}', `:', `b', and `t' commands; modified
+ initialization from NULL vector.
+ * sed/compile.c(compile_regex): added mechanism to
+ release memory consumed by the cached `last' RE.
+ * sed/compile.c(setup_jump,setup_label): updated
+ name (from setup_jump to setup_label) and prototype;
+ changed body to reflect data structure changes.
+ * sed/compile.c: Add OPEN_BRACE and CLOSE_BRACE macros for better
+ "vi" editing behavior.
+ * sed/compile.c(compile_filename,read_filename,get_writefile):
+ Replaced function compile_filename() with more orthogonal functions
+ read_filename(), get_writefile().
+ * sed/compile.c(compile_regex): Added ability to free the remembered
+ "last RE" in compile_regex (for benifit of "NOLEAKS" code).
+ * Made adjustments dictated by the change to struct sed_cmd which made
+ the a2 member a pointer-to-addr instead of an addr.
+ * sed/compile.c(setup_jump,read_label,setup_label,release_label):
+ Added functions read_label(), setup_label(), release_label(); deleted
+ function setup_jump().
+ * sed/compile.c(new_replacement,setup_replacement,release_replacement):
+ new functions.
+ * sed/compile.c: Adjusted to new spelling of text_buf member
+ ("text_length" instead of "text_len").
+ * sed/compile.c(new_vector): deleted function. (Due to new handling
+ of blocks, only one instance remained, and that one was just as
+ clear in-lined.)
+ * sed/compile.c(compile_string): Added third argument; it now
+ takes a counted string instead of a NUL-terminated string.
+ * sed/compile.c(compile_file): added variable "map_base" to
+ compensate for new type of prog_info.base.
+ * sed/compile.c(check_final_program): reflect new style of
+ handling blocks and struct sed_label.
+ * sed/compile.c(close_all_files,finish_program): replaced function
+ close_all_files() with more generic finish_program().
+ * sed/compile.c(read_text): added new feature: if first non-blank
+ character after the {a,i,c} command character is not "\", then
+ use the trailing text on that line as the (first) line of text.
+ Also added code conditional on NO_INPUT_INDENT to support the
+ "feature" of stripping leading blanks from each input line; I
+ do not read POSIX as permitting this behavior, nor do I think
+ it is a good idea, so it is disabled by default, but some have
+ argued that this blank-stripping is the "correct" behavior, so
+ I offer them the option of building their sed that way.
+ * sed/compile.c(compile_address): added xxx,+n and xxx,~n addressing;
+ simplified code.
+ * sed/compile.c(compile_program): added BAD_PLUS error detection;
+ adjusted to new cur_cmd->a2 pointer status; added addr_is_num2
+ detection; deleted pointless "a2->addr_number < a1.addr_number"
+ check (addr_is_num2 semantics handle this just fine); updated
+ code for '{', '}', ':', 'b', and 't' to reflect new design
+ of branch handling, including making use of new functions
+ related to the new design); added support for feature already
+ mentioned in read_text() where {a,i,c} commands are able to have
+ their text start on the same line as the command; changed some
+ error messages (hopefully for the better); localized variables
+ specific to individual commands (particularly 's' and 'y');
+ made use of new setup_replacement() function in 's' command.
+
+Mon Aug 10 19:58:49 PDT 1998 Ken Pizzini <ken@gnu.org>
+
+ * doc/sed.texi, doc/sed.1: sedtut10.txt is apparently dead.
+ Deleted references to it and added a pointer to
+ http://seders.icheme.org/tutorials/. (Pointed out by
+ Joerg Heitkoetter <joerg@de.uu.net>.)
+
+Sat Aug 8 18:11:57 PDT 1998 Ken Pizzini <ken@gnu.org>
+
+ * djgpp/config.btm: per request by Michel de Ruiter
+ <mdruiter@cs.vu.nl>, added "%1" to "%9" parameters.
+
+Mon Aug 3 11:44:55 PDT 1998 Ken Pizzini <ken@gnu.org>
+
+ * doc/sed.texi: fix a couple of typos. (Submitted by
+ Alan Modra <alan@spri.levels.unisa.edu.au>.)
+
+Sat Aug 01 17:49:06 PDT 1998 Ken Pizzini <ken@gnu.org>
+
+ *** Version 3.02 released
+
+ * configure.in: Because of code change in 3.01a, bump the
+ minor revision number for the release (now 3.02).
+
+Sun Jul 26 16:07:55 PDT 1998 Ken Pizzini <ken@gnu.org>
+
+ *** Version 3.01a released
+
+ * sed/compile.c(snarf_char_class): the POSIX char-class
+ recognition loop forgot to update its concept of "prev"
+ as the loop progressed.
+
+ * testsuite/Makefile.am: The dependency of version.good
+ on [testsuite/]Makefile introduced in the previous
+ release was botched -- it referred to "Makefile"
+ as "$(srcdir)/Makefile, which of course doesn't work
+ if you aren't building in the source tree.
+
+ * djgpp/Makefile.am: add forgotten "config.btm" EXTRA_DIST
+ member.
+
+ * configure.in: update version.
+
+Tue Jul 21 06:04:42 PDT 1998 Ken Pizzini <ken@gnu.org>
+
+ *** Version 3.01 released
+
+ * configure.in: mark as release version!
+
+ * Makefile.am: add BUGS and THANKS to the EXTRA_DIST target.
+
+ * testsuite/Makefile.am: add dependency of version.good
+ on [testsuite/]Makefile.
+
+Mon Jul 20 12:38:10 PDT 1998 Ken Pizzini <ken@gnu.org>
+
+ * djgpp/config.btm: New file to support the 4DOS alternative
+ to command.com. (Sumitted by Eli Zaretskii on behalf of
+ an anonymous 4DOS user.)
+
+Fri Jul 17 00:36:34 PDT 1998 Ken Pizzini <ken@gnu.org>
+
+ *** Version 3.01-beta18 released
+
+ * djgpp/config.sed: my "tweak" in beta17 was too
+ hastily considered. Back it out.
+
+ * configure.in: update to beta18.
+
+Wed Jul 15 01:02:15 PDT 1998 Ken Pizzini <ken@gnu.org>
+
+ *** Version 3.01-beta17 released
+
+ * djgpp/config.sed: tweak/simplify s,,, commands at end.
+
+ * configure.in: update to beta17.
+
+1998-07-14 Eli Zaretskii <eliz@is.elta.co.il>
+
+ * djgpp/config.sed: Edit all the occurences of = in the context of
+ --option=value, including in the help messages, into
+ --option:value, but leave DOS-style d:/foo/bar file names intact.
+
+ * djgpp/config.bat: Use --srcdir:foo instead of --srcdir=foo.
+
+ * testsuite/Makefile.am (help, version): Remove temporary files
+ explicitly, don't use shell wildcards, so it works under DOS 8+3
+ limits.
+
+Thu Jul 9 13:06:00 PDT 1998 16:51:43 PDT 1998 Ken Pizzini <ken@gnu.org>
+
+ *** Version 3.01-beta16 released
+
+ * djgpp/config.sed: tweak the configure script to use :
+ instead of = for --with-foo=bar option parsing, to
+ work around problems with how command.com handles =s.
+
+Wed Jul 8 16:51:43 PDT 1998 Ken Pizzini <ken@gnu.org>
+
+ * djgpp/config.bat: correct inappropriate behavior that I
+ introduced in the beta13 changes (if first argument is
+ a directory, it needs to be handled as the --srcdir).
+
+ * testsuite/version.gin, testsuite/version.good, testsuite/Makefile.am:
+ Add target to automake to automatically update version.good
+ from (new file) version.gin, instead of hand-editing the version
+ number each release.
+
+ * testsuite/Makefile.am: miscellaneous gratuitious tweakage --
+ mainly adding $(RM) commands just because I didn't like
+ leaving the tmp* files from successful runs laying about.
+ Also some editorial comments.
+
+ * configure.in: update to beta16. Added and commented out
+ experiment with AC_OUTPUT() for testsuite/version.good.
+ Added code to properly handle bare (without =xxx)
+ "--with-regex" option.
+
+Sun Jul 5 21:02:16 PDT 1998 Ken Pizzini <ken@gnu.org>
+
+ *** Version 3.01-beta15 released
+
+ * sed/utils.c(ck_fflush), sed/utils.h, sed/execute.c(output_line):
+ add and use new ck_fflush() function.
+
+Sun Jul 5 15:23:47 PDT 1998 Ken Pizzini <ken@gnu.org>
+
+ * sed/compile.c(bad_prog): add more detail to error
+ messages about -e strings.
+
+Sun Jul 5 14:29:45 PDT 1998 Ken Pizzini <ken@gnu.org>
+
+ * sed/compile.c(mark_subst_opts), sed/execute.c(do_subst):
+ Define better semantics for interaction of the `g' flag
+ with a numeric flag to the s/// command. It used to
+ be that the `g' command siezed control; now the first
+ (number-1) matches are skipped and then `g' gets control
+ after that. (It is not clear whether this is a feature
+ sneaking in during late beta, or a bug fix; the changes
+ involved were trivial, so I decided to treat it as a bug
+ fix.)
+
+ * configure.in, testsuite/version.good: update to beta15.
+
+Sat Jul 4 09:54:45 PDT 1998 Ken Pizzini <ken@gnu.org>
+
+ *** Version 3.01-beta14 released
+
+ * sed/basicdefs.h, sed/compile.c, sed/execute.c:
+ per report by "Kaveh R. Ghazi" <ghazi@caip.rutgers.edu>,
+ copied the ISXXX macros from lib/regex.c so that
+ silly machines which require isascii() to be true
+ before the other isXXX() macros are valid will
+ still work.
+
+ * configure.in, testsuite/version.good: update to beta14.
+
+Thu Jul 2 23:46:13 PDT 1998 Ken Pizzini <ken@gnu.org>
+
+ *** Version 3.01-beta13 released
+
+ * configure.in, acconfig.h: set USE_REGEX_GNU_H symbol if we
+ are going to be using lib/regex.c.
+
+ * lib/Makefile.am, lib/regex.h, lib/regex-gnu.h, lib/regex.c:
+ rename lib/regex.h to lib/regex-gnu.h, so that those who
+ choose to use a different regex implementation will not
+ pick-up lib/regex.h when doing "#include <regex.h>".
+
+ * sed/regex-sed.h, sed/Makefile.am, sed/compile.c, sed/execute.c,
+ sed/sed.c: create sed/regex-sed.h which acts as a switch
+ to choose either lib/regex.h or the user-supplied <regex.h>,
+ depending on the value passed to configure's --with-regex=
+ option.
+
+Thu Jul 2 17:22:31 PDT 1998 Ken Pizzini <ken@gnu.org>
+
+ * configure.in: if an alternative --with-regex= is given,
+ do an AC_CHECK_FUNCS(regnexec regexec) to ensure that
+ at least one of these functions is available. Also,
+ parallel changes for the default case.
+
+ * sed/execute.c, acconfig.h: retire use of the WITH_REGNEXEC
+ test macro in favor of HAVE_REGNEXEC test macro created
+ by above change.
+
+ * djgpp/config.bat: Play games to handle "install-sh",
+ DOS filename restrictions, GNU makefile default rules,
+ and getting a correct run of "configure" (contributed
+ by Eli Zaretskii <eliz@is.elta.co.il>).
+
+ * djgpp/Makefile.am, testsuite/Makefile.am, testsuite/Makefile.in,
+ Makefile.am, configure.in: Various automake targets
+ (such as distcheck) failed with old configuration.
+ The simplest solution was to just add these .am
+ files. (The testsuite/Makefile.in was just renamed to
+ testsuite/Makefile.am, then various redundant defines and
+ targets were deleted.) (Reported by Erick Branderhorst
+ <Erick.Branderhorst@asml.nl>.)
+
+ * testsuite/dc.good, testsuite/dc.inp: per suggestion from
+ Greg Ubben <gsu@romulus.ncsc.mil>, use base 16 output to
+ exercise even more of the dc.sed script.
+
+ * configure.in, testsuite/version.good: update to beta13.
+
+Sun Jun 28 16:21:02 PDT 1998 Ken Pizzini <ken@gnu.org>
+
+ *** Version 3.01-beta12 released
+
+ * doc/sed.texi: Avoid mixing @code and @samp markups together:
+ they look ugly in Info. Use @url and @email instead of @example.
+ Add indexes. (Basis of changes contributed by Eli Zaretskii.)
+
+ * djgpp/*, Makefile.am: add support for the DJGPP compiler,
+ contributed by Eli Zaretskii <eliz@is.elta.co.il>.
+
+ * dc.sed, testsuite/Makefile.in, testsuite/dc.inp, testsuite/dc.good:
+ added this remarkable script, written and contributed
+ by Greg Ubben <gsu@romulus.ncsc.mil>, both as a work of
+ art for general admiration, and also for use in regression
+ testing.
+
+ * configure.in, lib/Makefile.am: add --with-regex=regexlib
+ option, which overrides the use of lib/regex.c.
+
+ * configure.in, testsuite/version.good: update to beta12.
+
+Fri Jun 12 16:41:48 PDT 1998 Ken Pizzini <ken@gnu.org>
+
+ *** Version 3.01-beta11 released
+
+ * sed/compile.c: add module-static variables first_script
+ (for #n change below) and pending_text (for a/c/i change
+ below).
+
+ * sed/compile.c(compile_file), sed/compile.c(compile_program):
+ Instead of having #n trigger the -n option in *any file*,
+ have #n trigger the -n option only if they are the first
+ two bytes of the first script or script-file.
+
+ * sed/compile.c(compile_string), sed/compile.c(compile_file):
+ clear the first_script variable at end of these functions.
+
+ * sed/sed.h: tease out the struct text_buf declaration from
+ struct sed_cmd, so that a pointer to such can be passed
+ to new sed/compile.c(read_text) function.
+
+ * sed/compile.c(compile_program), sed/compile.c(read_text):
+ Tease out handling of text to a/c/i commands to new
+ read_text() function. Handle (via aid of pending_text
+ variable) texts which span more than one script/script-file
+ option. In particular, restore the ability to have this
+ work: sed -e '1i\' -e 'foo'
+
+ * sed/compile.c(check_final_program): close off any dangling
+ pending_text allocation.
+
+Thu Jun 11 11:17:46 PDT 1998 Ken Pizzini <ken@gnu.org>
+
+ * sed/execute.c(do_subst): fixed two bugs: s/ */X/g was failing
+ to match the final empty string after the end of the pattern
+ space; and /^foo$/s/o/x/3p was printing, despite the failure
+ to do a substition.
+
+Fri Jun 5 04:40:24 PDT 1998 Ken Pizzini <ken@gnu.org>
+
+ * configure.in: change the AC_ARG_WITH(regnexec, ...)
+ to be the more appropriate AC_ARG_ENABLE(regnexec, ...).
+
+ * configure.in, testsuite/version.good: update to beta11.
+
+Fri Jun 5 00:54:25 PDT 1998 Ken Pizzini <ken@gnu.org>
+
+ *** Version 3.01-beta10 released
+
+ * sed/execute.c: forgot to P_() the prototype and
+ old-style the declaration for bootstrap_memchr()!
+
+Thu Jun 4 18:42:30 PDT 1998 Ken Pizzini <ken@gnu.org>
+
+ * sed/compile.c(snarf_char_class): added code to
+ recognize \n or \<newline> sequence within a
+ char-class as the newline character.
+
+Tue Jun 2 11:56:02 PDT 1998 Ken Pizzini <ken@gnu.org>
+
+ * configure.in: added check for <sys/types.h> and
+ a AC_ARG_WITH(regnexec,...) check, to simplify use
+ of other regex libraries which have regexec() but
+ not regnexec(), with the corresponding loss of
+ functionality (regexps will not work right against
+ input lines which contain NULs).
+
+ * sed/execute.c: add nul_append() function, a #define
+ for a regnexec() -> regexec() macro (conditional on
+ the lack of the WITH_REGNEXEC symbol), and a couple
+ of calls to nul_append() (in match_an_address_p()
+ and do_subst()) to permit the use of the POSIX standard
+ regexec() function call instead of the suggested
+ regnexec() call.
+
+ * sed/compile.c, sed/execute.c, sed/sed.c: check for
+ <sys/types.h> and include it (before "regex.h") if
+ available. This makes it simpler to use the system's
+ regex library instead of the one in lib/regex.c, should
+ that be desired.
+
+Tue Jun 2 08:41:05 PDT 1998 Ken Pizzini <ken@gnu.org>
+
+ * sed/basicdefs.h: define VCAST macros to allow sed to
+ compile on systems which predate the definition
+ of "void *", and yet still get feedback about
+ stupid programming errors from systems which *do*
+ know about "void *"s. Also define MALLOC, REALLOC,
+ MEMDUP, and FREE macros to keep under control the
+ degree of code ugliness which would otherwise be
+ introduced in making use of the VCAST macro.
+
+ * sed/compile.c, sed/execute.c, sed/sed.c, sed/utils.c:
+ pervasively use the new VCAST, MALLOC, REALLOC, MEMDUP,
+ and FREE macros wherever appropriate.
+
+ * sed/utils.c, sed/utils.h: correct type of first arguments
+ to ck_fread() and ck_fwrite() to be [const] VOID *.
+
+ * sed/basicdefs.h, sed/execute.c: protect against
+ the rumored systems which stupidly #define __STDC__ 0.
+
+ * testsuite/help.good, testsuite/Makefile.in: make
+ the ``help'' test insensitive to the spelling of
+ the executable's name. Also, enhanced `make clean'
+ target.
+
+ * doc/sed.texi, doc/sed.1: correct documentation of `q'
+ command; fix typos.
+
+ * configure, testsuite/version.good: update to beta10.
+
+Sat May 30 17:28:00 PDT 1998 Ken Pizzini <ken@gnu.org>
+
+ *** Version 3.01-beta9 released
+
+ * Makefile.am: make testsuite a normal SUBDIR.
+
+ * configure.in: discontinue using AC_ISC_POSIX --
+ check for -lcposix library instead; added
+ testsuite/Makefile to AC_OUTPUT list.
+
+ * lib/memmove.c(memmove): fixed wrong sense used
+ for HAVE_BCOPY test.
+
+ * sed/execute.c: checked more specifically for a version
+ of gcc which supports __attribute__ (i.e., >= 2.7).
+
+ * testsuite/*: renamed files to fit 14 char limit.
+
+ * testsuite/Makefile, testsuite/Makefile.in: Makefile
+ renamed to Makefile.in and then modified so that
+ "make -j check" from top directory will work.
+
+ * testsuite/subwrite.sed, testsuite/writeout.sed: changed
+ file name of the "w" command to be consistent with the
+ new naming used in testsuite/Makefile.in.
+
+ * doc/sed.1, doc/sed.texi: fixed some typos, formatting
+ glitches, and poor wordings.
+
+Sat May 30 04:02:29 PDT 1998 Ken Pizzini <ken@gnu.org>
+
+ * configure.in: specify that config.h is to be derived
+ from config_h.in in order to avoid the braindead
+ DOS file system limitations.
+
+Fri May 29 21:56:30 PDT 1998 Ken Pizzini <ken@gnu.org>
+
+ * sed/compile.c(compile_address), doc/sed.texi: gave
+ a better definition to the meaning of N~0 address
+ forms -- N~M addresses now mean that lines match
+ when there exists a non-negative x such that
+ lineno == N+x*M.
+
+Fri May 29 12:07:38 PDT 1998 Ken Pizzini <ken@gnu.org>
+
+ * sed/compile.c(compile_address),
+ sed/execute.c(match_an_address_p): update semantics of
+ N~M address form: now N is the first line which will
+ match and M is the step between succeeding matches.
+ If N<M this works out to the same as before, but the
+ new behavior for N>=M seems more useful.
+
+ * doc/sed.1, doc/sed.texi: update documentation of N~M
+ address form; added "Other Resources" node to sed.texi;
+ minor formatting changes to some items in sed.1 with
+ an eye to improving clarity.
+
+ * configure.in, testsuite/version.good: update to beta9.
+
+Sat May 23 20:04:31 HST 1998 Ken Pizzini <ken@gnu.org>
+
+ *** Version 3.01-beta8 released
+
+ * sed/compile.c(compile_regex): forgot to make last_re be
+ a *copy* of the buffered text in today's earlier fix.
+
+ * sed/execute.c(read_file_line): EOF check was wrong --
+ it forgot to allow for the possibility that we were
+ appending to the end of the ``line'' (instead of merely
+ reading a fresh line).
+
+Sat May 23 18:07:18 HST 1998 Ken Pizzini <ken@gnu.org>
+
+ * sed/compile.c(compile_regex): don't track compiled version
+ of regex -- the modifiers may change. Track the regex
+ source instead. (For "last regex" (aka //) notation.)
+
+ * configure.in, testsuite/version.good: update to beta8.
+
+Sat May 23 16:07:09 HST 1998 Ken Pizzini <ken@gnu.org>
+
+ *** Version 3.01-beta7 released
+
+ * sed/execute.c: #undef'd EXPERIMENTAL_DASH_N_OPTIMIZATION
+ because its code is buggy.
+
+Tue May 19 17:03:52 HST 1998 Ken Pizzini <ken@gnu.org>
+
+ * sed/sed.c: label rx library code as such with #ifdefs
+ (instead of just #if 0).
+
+ * sed/compile.c(compile_program): make incremental
+ improvement to the "Unknown command" error message.
+
+Sat May 16 23:16:26 HST 1998 Ken Pizzini <ken@gnu.org>
+
+ * testsuite/Makefile: simplify: get rid of automatic run
+ against system's sed; don't time by default; allow for
+ alternative comparison command.
+
+ * configure.in, testsuite/version.good: update to beta7.
+
+Wed May 13 21:44:28 PDT 1998 Ken Pizzini <ken@gnu.org>
+
+ *** Version 3.01-beta6 released
+
+ * lib/Makefile.am: fix spelling of libsed_a_LIBADD in
+ libsed_a_DEPENDENCIES.
+
+ * configure.in, testsuite/version.good: update to beta6.
+
+Wed May 13 14:38:08 PDT 1998 Ken Pizzini <ken@gnu.org>
+
+ *** Version 3.01-beta5 released
+
+ * sed/execute.c(do_subst): added not_bol_p variable to track when
+ we have iterated past the beginning of the pattern.
+ [Thanks to Jim Meyering <meyering@ascend.com> for the bug report.]
+
+Wed May 13 13:54:04 PDT 1998 Ken Pizzini <ken@gnu.org>
+
+ * sed/execute.c(bootstrap_memchr): new function. When
+ bootstrapping we don't know if we are on a 64-bit machine,
+ so lib/memchr.c breaks. Supply this (slow) implementation
+ just to get us bootstrapped.
+
+ * bootstrap.sh: add a #define BOOTSTRAP symbol; add -I.
+ for emphasis for the compiles in sed/; be explicit
+ about what files we're bothering to compile.
+
+ * configure.in, testsuite/version.good: update version
+ to beta5.
+
+Wed May 13 06:39:06 PDT 1998 Ken Pizzini <ken@gnu.org>
+
+ *** Version 3.01-beta4 released
+
+ * rename writeout.good? to wrtout?.good and subwrite.good? to
+ subwrt?.good to comply with DOS 8+3 file name restrictions.
+ [Eli Zaretskii <eliz@is.elta.co.il> suggested this to
+ simplify DJGPP ports, and it was easy.]
+
+ * testsuite/Makefile: reflect above name changes.
+
+Wed May 12 21:09:32 PDT 1998 Ken Pizzini <ken@gnu.org>
+
+ * sed/sed.c(usage): fix non-portable omission of \n\ at end of
+ lines within long string.
+
+ * sed/sed.c(main): remove spurious argument to fprintf() in the
+ 'V'ersion output.
+
+ * sed/execute.c(line_append): embed newline between the two
+ text fragments unconditionally.
+
+ * sed/execute.c(do_subst): change structure assignment to memcpy()
+ (for portability reasons).
+
+ * README.bootstrap: suggest using -w option.
+
+Tue May 12 10:02:37 PDT 1998 Ken Pizzini <ken@gnu.org>
+
+ * configure.in: use AC_REPLACE_FUNCS where appropriate.
+
+ * lib/Makefile.am: updated to reflect AC_REPLACE_FUNCS change in
+ configure.in.
+
+ * lib/memchr.c lib/memcmp.c: revert to standard GNU versions.
+
+ * lib/alloca.c: added this missing file.
+
+ * testsuite/version.good: updated for new version identifier.
+
+Mon May 11 18:50:56 PDT 1998 Ken Pizzini <ken@gnu.org>
+
+ *** Version 3.01-beta3 released
+
+ * sed/Makefile.am: fix INCLUDES to work right with VPATH.
+ [Thanks to Jim Meyering <meyering@ascend.com> for the bug report.]
+
+ * sed/sed.c(usage): make --help output more user-friendly?
+
+ * sed/execute.c(execute_program): fix bug in 'x' command introduced
+ in the alleged portability fix of May 9.
+
+ * configure.in: update version to 3.01-beta3.
+
+ * testsuite/version.good, testsuite/help.good: freshen with
+ latest output.
+
+Sat May 9 22:35:45 PDT 1998 Ken Pizzini <ken@gnu.org>
+
+ *** Version 3.01-beta2 released
+
+ * sed/sed.c: add #include <sys/types.h> in HAVE_MMAP
+ block (needed on some machines).
+
+ * lib/memmove.c: #include <memory.h>, if HAVE_MEMORY_H.
+
+Sat May 9 21:29:00 PDT 1998 Ken Pizzini <ken@gnu.org>
+
+ * configure.in: remove dangling references to rx library;
+ added HEADER and FUNC checks for items used by source in
+ lib/.
+
+ * lib/ansidecl.h, lib/memcopy.h, lib/pagecopy.h, lib/string.h
+ lib/memcpy.c, lib/memmove.c: deletes these files. There
+ are still pieces of glibc missing to support these, and
+ it isn't worth the headache right now.
+
+ * lib/memmove.c: de novo, simpler version. Uses bcopy()
+ if available, and slow-but-simple code if not.
+
+ * lib/Makefile.am: remove references to deleted files.
+ Added forgotten reference to memcpy.c. Re-ordered
+ SOURCE entries to reflect dependencies for systems
+ which lack ranlib.
+
+ * sed/basicdefs.h: updated to reflect above changes to lib/,
+ and experience with non-STDC compilers.
+
+ * lib/regex.c: made regerror() function publicly visible.
+
+ * lib/strerror.c: use old-style function declaration.
+
+ * sed/compile.c, sed/execute.c, sed/sed.c, sed/utils.c,
+ sed/sed.h, sed/utils.h: ensure that private definitions of
+ some symbols do not cause problems when #include'ing system
+ headers (mainly by re-ordering the #include directives).
+ (This is particularly an issue for bootstrap.sh runs.)
+
+ * sed/execute.c (execute_program): use memcpy() instead of
+ structure assingment ('x' command), for portablility to
+ old compilers.
+
+ * sed/execute.c (slow_getline): use old-style function
+ declaration, with a P_ prototype.
+
+ * sed/sed.c: change the type of the fallback MAP_FAILED
+ definition to work on archaic systems. (Modern systems
+ should be defining it themselves, so the change from
+ void * shouldn't be a problem.)
+
+ * bootstrap.sh, README.bootstrap: actual testing of bootstrap
+ code revealed that I was too optimistic. Redesigned and
+ replaced implementation.
+
+ * testsuite/Makefile: ignore errors from reference-implementation
+ seds that aren't up to snuff.
+
+ * testsuite/help.good, testsuite/version.good: update to
+ current version's output.
+
+Fri May 8 15:08:28 PDT 1998 Ken Pizzini <ken@gnu.org>
+
+ *** Version 3.01-beta1 released
+
+ * sed/sed.c (main, usage): once again tweak the --help and
+ --version output to bettery comply with GNU coding standards.
+
+ * testsuite/help.good, testsuite/version.good: update to
+ reflect above change.
+
+ * doc/sed.texi: fix "Invoking" node's spelling to comply
+ with GNU standards.
+
+Fri May 8 11:43:10 PDT 1998 Ken Pizzini <ken@gnu.org>
+
+ * doc/sed.1, doc/Makefile.am: wrote (very basic) man page.
+
+Thu May 7 20:40:21 PDT 1998 Ken Pizzini <ken@gnu.org>
+
+ * lib/Makefile.am, lib/memmove.c, lib/memchr.c, lib/regex.c,
+ lib/memcpy.c, lib/regex.h, lib/memcopy.h, lib/string.h,
+ lib/pagecopy.h, lib/ansidecl.h: grab yet-another-version
+ from gnu.org for baseline and/or edit copyright boilerplate
+ using official lgpl2gpl.sed script. Take care not to
+ loose regnexec() interface or special conditional-compilation
+ code.
+
+Wed May 6 23:35:12 PDT 1998 Ken Pizzini <ken@gnu.org>
+
+ * lib/regex.c, lib/regex.h: take from grep-2.1 distribution,
+ then trivially added the regnexec() interface.
+
+ * sed/sed.c, sed/compile.c, sed/execute.c: made modifications
+ to work with regex instead of rx.
+
+ * rx/*: deleted directory; the code is just too slow.
+ I think it will be easier to extend regex to fully
+ support POSIX.2 than to tune rx to be reasonable.
+ Even if this supposition is wrong, I'd rather make
+ the 3.01 release with the slightly deficient regex.
+
+ * Makefile.am lib/Makefile.am, sed/Makefile.am: made changes
+ related to the substitution of regex for rx.
+
+ * lib/Makefile.am, sed/Makefile.am: since regex is not a
+ ``compatability'' module, changed name of library to
+ ``libsed.a''.
+
+ * lib/memchr.c, lib/memcpy.c, lib/memmove.c: add conditional
+ compilation code to leave zero-sized .o file if system
+ already supports the implemented function.
+
+ * testsuite/help.good, testsuite/version.good: brought
+ up-to-date (once again).
+
+ * NEWS, ANNOUNCE: changes to reflect this batch of changes.
+
+Wed May 6 18:40:47 PDT 1998 Ken Pizzini <ken@gnu.org>
+
+ * sed/execute.c: discovered awful bug in '}' handling:
+ it could read past the end of vec (because `n' was
+ being decremented below zero)! Needed to "continue"
+ instead of "break".
+
+Tue May 5 14:34:38 PDT 1998 Ken Pizzini <ken@gnu.org>
+
+ * doc/sed.texi, doc/version.texi: wrote some rudimentary
+ texinfo documentation.
+
+ * ANNOUNCE, NEWS, README, README.rx, Makefile.am:
+ more updates for the upcoming beta-release.
+
+ * sed/compile.c, sed/execute.c, sed/sed.c, sed/utils.c,
+ sed/sed.h, lib/strerror.c: update copyright notice text.
+
+Fri May 1 15:41:37 PDT 1998 Ken Pizzini <ken@gnu.org>
+
+ * sed/execute.c (match_an_address_p, match_address_p): if
+ the second element of an address range is a line number,
+ and that line number is *less than* (or equal to) the
+ current line number, we only match the one line (per
+ POSIX.2, section 4.55.7.1). [Bug discovered as reported
+ in the seders mailing list FAQ.]
+
+ * AUTHORS, NEWS, acconfig.h, configure.in, doc/Makefile.am,
+ lib/Makefile.am, sed/Makefile.am, lib/README,
+ testsuite/help.good, testsuite/version.good:
+ Updated in anticipation of the 3.01-beta1 release.
+ Reorganized development source tree to make creation
+ of a distribution simpler. Most notable changes were
+ to the various Makefile.am files and configure.in, but
+ some minor edits (such as deleting or changing #include
+ directives) have been made in many other source files.
+
+ * bootstrap.sh, README.bootstrap: created a mechanism for
+ creating sed on a system which lacks a working sed.
+
+Thu Apr 16 23:52:11 PDT 1998 Ken Pizzini <ken@gnu.org>
+
+ * sed.h, sed.c, execute.c, compile.c: did a spell-check on
+ the comments; fixed several typos.
+
+Thu Apr 16 13:43:01 PDT 1998 Ken Pizzini <ken@gnu.org>
+
+ * execute.c (do_subst): fixed bug where the "replaced" flag
+ was being set to one inappropriately when at least one
+ but fewer than sub->numb matches of the regexp were found.
+ (Thanks to Simon Taylor <staylor@hermes.iaccess.com.au>
+ for the bug report.)
+
+Wed Apr 15 11:35:31 PDT 1998 Ken Pizzini <ken@gnu.org>
+
+ * sed.h, sed.c, compile.c, execute.c: having a concern that
+ a cast was being done inappropriately, and realizing that
+ there is no quick way to locate all casts in a program, I
+ went through and marked all casts with a simple macro.
+ Now it is a simple matter to locate the casts, and it is
+ also a simple matter to turn of casts for a lint session
+ (if it should be desired).
+
+Wed Apr 15 10:29:21 PDT 1998 Ken Pizzini <ken@gnu.org>
+
+ * compile.c, sed.c: redo compile phase so that brace
+ expressions can be spread across multiple files.
+ For example:
+ printf '{' >a; printf 'l;d' >b; printf '}' >c
+ sed -f a -f b -f c foo
+ will now compile (and work), instead of complaining
+ about an unmatched '{'. The mess created in compile.c
+ allowed a little simplification to the command-line
+ processing of "-e" options in sed.c.
+
+ sed.h: added (opaque) err_info member to struct vector;
+ added comments to the members of struct vector.
+
+Wed Apr 14 23:50:50 PDT 1998 Ken Pizzini <ken@gnu.org>
+
+ * sed.h, sed.c, compile.c, execute.c: added types countT and
+ flagT in order to clarify what various "int"s were doing.
+ Also makes it easy to change the type used for counts
+ (for example, to "unsigned long long") if desired, although
+ there are still some gotchas (such as the printf() format
+ for the '=' command).
+
+Tue Apr 14 17:34:54 PDT 1998 Ken Pizzini <ken@gnu.org>
+
+ * execute.c (execute_program, process_files, count_branches,
+ shrink_program): Added a first attempt at program optimization.
+ We now can quit early if we are running with the "-n"
+ and all of the commands are known to be valid only for
+ lines less than the current line. Thus the "sed" in
+ "foo | sed -n 1,2p" will print read three lines, printint
+ the first two, and then quit, regardless of how much longer
+ "foo" might run or output. This optimization does not buy
+ much in most cases (it sometimes even costs a little),
+ but when it does help it can help big. The code is
+ all conditionally compiled based on the
+ EXPERIMENTAL_DASH_N_OPTIMIZATION symbol being #defined,
+ so it can be easily omitted if it causes problems.
+
+Tue Apr 14 12:25:06 PDT 1998 Ken Pizzini <ken@gnu.org>
+
+ * execute.c (test_dollar_EOF, last_file_with_data_p):
+ test_dollar_EOF() was incorrectly returning a false (0)
+ when there were unprocessed files, none of which had any
+ data (either unopenable or zero-length). Created
+ last_file_with_data_p() to detect this situation, and
+ modified test_dollar_EOF() to make use of it.
+
+Thu Apr 2 23:02:18 PST 1998 Ken Pizzini <ken@gnu.org>
+
+ * compile.c (match_slash): match_slash() did not handle
+ [.coll.], [=equiv=], and [:class:] sequences within a
+ character class. Added snarf_char_class() [which is a
+ remote derivative of parse_char_class() from GNU ed-0.2]
+ to deal with the details, and altered match_slash()
+ to make use of it. Also created the trivial
+ add_then_next() to avoid clutter in snarf_char_class().
+
+Thu Apr 2 20:34:42 PST 1998 Ken Pizzini <ken@gnu.org>
+
+ * execute.c, sed.c, sed.h: There was a severe bug in
+ how the code handled "sed 5n a b" when "a" consists
+ of exactly five lines -- it behaved like "sed 5q a b"!
+
+ Rearranged where files get opened -- large scale
+ changes primarily involving main(), process_files(),
+ and read_pattern_space(), but also touching on several
+ other parts of execute.c. The read_pattern_space()
+ function became unwieldly and parts were split into
+ open_next_file(), closedown(), read_always_fail(),
+ read_mem_line(), and read_file_line(). The
+ at_end_of_file_p() function became obsolete and was
+ eliminated; test_dollar_EOF_p() was updated. A few
+ global and module-static variables were elminated, and
+ "struct line" was extended; comments were added to the
+ "struct line" declartation to document some important
+ dependencies in it.
+
+ I undertook the reorganization with dread, but I
+ feel that the new organization is an improvement
+ well beyond just fixing the bug that inspired it.
+
+Thu Apr 2 01:16:25 PST 1998 Ken Pizzini <ken@gnu.org>
+
+ * execute.c (read_file_line, slow_getline): the fread()
+ buffering code gives insufficient feedback to a user
+ running sed with a tty input device, so I created
+ slow_getline() for reading from a tty device.
+ Additionally, EOF detection has been made a little more
+ sensitive to avoid requiring multiple EOFs to be entered
+ from a tty.
+
+ * configure.in: added isatty() check.
+
+Wed Apr 1 11:04:30 PST 1998 Ken Pizzini <ken@gnu.org>
+
+ * configure.in (CPPFLAGS, LDFLAGS, LIBS):
+ Set to appropriate values if large file support needs
+ explicit enabling. Code fragment taken from a 1997-10-25
+ patch to gawk by Paul Eggert <eggert@twinsun.com>
+
+Thu Aug 14 17:43:27 PDT 1997 Ken Pizzini <ken@gnu.org>
+
+ * utils.c (ck_fclose): modified to ignore NULL parameter.
+
+Thu Aug 14 12:08:45 PDT 1997 Ken Pizzini <ken@gnu.org>
+
+ * execute.c: tweaked execute_program() to eliminate
+ gratuitous "goto" usage.
+
+Thu Aug 14 11:30:04 PDT 1997 Ken Pizzini <ken@gnu.org>
+
+ * compile.c: added case-insensitive modifier ('I') to
+ address and s/// regexps. The s/// case also accepts
+ the more popular 'i' modifier. (The address regexp
+ cannot use 'i' as a modifier, as that conflicts with
+ the use of the 'i'nsert command.)
+
+Thu Aug 14 09:29:06 PDT 1997 Ken Pizzini <ken@gnu.org>
+
+ * compile.c: abstracted out match_slash() from the s///, y///,
+ and address-regexp special-case codes.
+
+ * execute.c: made dump_append_queue() use ck_fread() instead
+ of hand-rolled error checking.
+
+Mon Jul 28 10:50:41 PDT 1997 Ken Pizzini <ken@gnu.org>
+
+ * sed.c, sed.h, execute.c: POSIX.2, section 4.55.7, says that
+ a newline must end *every* output line. But I think that
+ it is useful (when seding a binary file) to omit a trailing
+ newline if the input lacks one. Thus the addition of
+ POSIXLY_CORRECT behavior.
+
+ * execute.c: however, when seding multiple files my feeling
+ is that it makes sense to have each file but the last
+ behave as-if it ended in a newline. Modified read_pattern_space()
+ accordingly.
+
+ * utils.c: realized that add1_buffer(), for performance reasons,
+ shouldn't be calling memcpy() (indirectly via add_buffer()),
+ so rewrote it.
+
+Sat Jul 26 23:08:28 PDT 1997 Ken Pizzini <ken@gnu.org>
+
+ * execute.c: attempted to make read_pattern_space more
+ efficient for the the non-mmap() case.
+
+ * utils.c, utils.h, execute.c: new function ck_fread()
+ created and used.
+
+Sat Jul 26 20:22:14 PDT 1997 Ken Pizzini <ken@gnu.org>
+
+ * execute.c, compile.c, sed.c: abstracted the mmap()
+ interface into map_file()/unmap_file() [sed.c], and
+ changed the ad-hoc code in compile_file() [compile.c]
+ and process_file() [execute.c] to make use of the new
+ interface.
+
+Sat Jul 26 19:45:46 PDT 1997 Ken Pizzini <ken@gnu.org>
+
+ * execute.c, compile.c, configure.in: Check to see if mmap()
+ is available; if so make use of it on regular files.
+
+ * compile.c: compile_file() now closes the input file
+ when it is through!
+
+Sun Jul 20 23:57:02 PDT 1997 Ken Pizzini <ken@gnu.org>
+
+ * compile.c: modified parsing to permit whitespace in more
+ places where it makes sense;
+ added backslash escaping to the y/// command, per POSIX.
+
+ * execute.c: Merged append_pattern_space() into read_pattern_space();
+ moved body of 's' command to new function do_subst();
+ moved body of 'l' command to new function do_list();
+ changed output of 'l' command to conform to POSIX.2;
+ made line handling conform to POSIX; added output_line() function;
+ redesigned append-space algorithm; added append_queue structure and
+ the next_append_slot() and dump_append_queue() functions.
+
+ * sed.h: moved the definition of what is now struct subst
+ outside of the definition of struct sed_cmd.
+
+Sat Jul 19 16:29:09 PDT 1997 Ken Pizzini <ken@gnu.org>
+
+ * sed.c, execute.c, sed.h, Makefile.am: Separated out the
+ pieces dealing with executing the program from the top-level
+ parameter parsing and control.
+
+Sat Jul 19 01:16:35 PDT 1997 Ken Pizzini <ken@gnu.org>
+
+ * sed.c, compile.c, sed.h, Makefile.am: separate out the
+ pieces dealing with compiling the program from the pieces
+ dealing with interpreting the result.
+
+ * compile.c: add functions in_nonblank() and in_integer(),
+ and change interface to compile_address() with an eye
+ to making code clearer.
+
+Fri Jul 18 13:35:50 PDT 1997 Ken Pizzini <ken@gnu.org>
+
+ * utils.c: attempt at a quasi-unification of the
+ STDC and traditional C approaches to panic().
+
+ * sed.c: eliminate some gratuitous bit twiddling.
+ (Using flag bits can be a useful technique, but
+ this code is cleaner without them.)
+
+ * sed.c: place mutually exclusive members of struct addr
+ within a union, mainly to document the exclusivity;
+ eliminate unused structure members from struct fp_list;
+ eliminate unnecessary module-global variables;
+ remove some #if 0 code that is too odd to keep;
+ allegedly simplified the 'l' case of execute_program();
+ allegedly simplified inchar();
+ localized some static variables;
+ renamed some variables to better document their purpose;
+ removed some goto-s rendered obsolete by other changes.
+
+Thu Jul 17 15:30:44 PDT 1997 Ken Pizzini <ken@gnu.org>
+
+ * utils.c, utils.h, sed.c: added and made use of
+ ck_free() function.
+
+ * utils.c, utils.h, sed.c: changed all the *_buffer()
+ functions to take/return an incomplete type
+ "struct buffer *" instead of using VOID *.
+
+ * utils.c, utils.h, sed.c: renamed "finish_buffer()"
+ to "free_buffer()", on the premise that the new
+ name better describes the function's purpose.
+
+Wed Jul 16 13:52:14 PDT 1997 Ken Pizzini <ken@gnu.org>
+
+ * utils.c, utils.h, sed.c: added and made use of
+ ck_memdup() function.
+
+ * sed.c: protected a call to add1_buffer() in
+ compile_program() which could have tried to
+ push an EOF if a a/i/c command ended with
+ a '\', EOF sequence.
+
+ * utils.c: added sanity check to add1_buffer() so that
+ EOF will not be added to the buffer.
+
+Wed Jul 16 03:56:26 PDT 1997 Ken Pizzini <ken@gnu.org>
+
+ * configure.in, compat.h, compat.c: added memchr.
+
+ * sed.c: got rid of arbitrary NUM_FPS limit;
+ made global functions and variables "static" where appropriate;
+ make various cosmetic changes, hopefully improving readability;
+ simplified some redundant predicates;
+ simplified some code, but nothing fundamental (yet?).
+
+Wed Jul 16 00:24:54 PDT 1997 Ken Pizzini <ken@gnu.org>
+
+ * alloca.c, getopt.c, getopt.h, getopt1.c: updated from
+ versions in textutils-1.22.
+
+ * Makefile.in, Makefile.am, configure.in: put in automake support.
+
+ * basicdefs.h, compat.h, compat.c [, sed.c, utils.c]: took out
+ some very ugly compatibility #ifdefs and packaged into one
+ place.
+
+ * sed.c, utils.c: some gratuitous formatting changes.
+
+ * utils.c: changed datatype of utils_id_s in order to
+ eliminate arbitrary array size.
+
+Sun Jul 13 17:00:26 PDT 1997 Ken Pizzini <ken@gnu.org>
+
+ * sed.c, utils.c, utils.h: de-linting oriented cleanup.
+
+Sun Jul 13 00:46:48 PDT 1997 Ken Pizzini <ken@gnu.org>
+
+ * sed.c: fixed bug which caused SEGV for files missing a
+ final newline. Corrected calls to regnexec to pass the
+ proper parameters, in the proper order.
+
+Sat Dec 30 20:16:59 1995 Tom Lord <lord@beehive>
+
+ *** Version 3.00 released
+
+ * sed.c: Use posix entry points to regexp functions.
+ Fix enough bugs to pass the test-suite.
+
+....... Jason Molenda <crash@cygnus.com>
+
+ * testsuite/: trippy test suite.
+
+
+Wed May 11 07:46:24 1994 Chip Salzenberg (chip@fin.uucp)
+
+ *** Version 2.05 released
+
+ * sed.c (compile_address): Recognize numeric addresses.
+ Fixes typo made during installation of "~" feature.
+
+Sat Apr 30 17:17:38 1994 Tom Lord (lord@x1.cygnus.com)
+
+ *** Version 2.04 released
+
+ * sed.c: applied a patch from
+ From: kap1@tao.cpe.uchicago.edu (Dietrich Kappe)
+
+ Dietrich writes:
+
+ As my contribution to the creeping feature creature in sed,
+ here is a new type of address. The address has form n~m,
+ which means "the line number is equal to n modulo m." The
+ modifications to sed are trivial, and the general
+ usefulness of this address should be obvious. If m is 0 or
+ missing, 1 is used in its place (could be a bug or a
+ feature :-).
+
+Sat Apr 30 17:17:38 1994 Tom Lord (lord@x1.cygnus.com)
+
+ * rx.c (solve_destination): protect `solution' more carefully.
+ This is a cleanup of a patch from Kevin Buettner
+ (kev@cujo.geg.mot.com).
+
+Sat Apr 30 17:17:38 1994 Tom Lord (lord@x1.cygnus.com)
+
+ * rx.c: make translation tables unsigned chars
+
+ * sed.c (main): Compile accumulated -e commands as
+ soon as a -f command comes along. This ensures that
+ the commands are executed in the right order.
+
+Mon Oct 25 14:41:47 1993 Tom Lord (lord@rtl.cygnus.com)
+
+ * sed.c (execute_program): 'w' flushes the buffer after it
+ writes -- diagnosed by doug@research.att.com. 'r' and 'w' to
+ the same file is now supported -- hopefully even in a way that
+ satisfies Posix (it now behaves differently from some
+ /bin/sed's and the spec is hard to read so i'm not sure).
+
+ Also, 'r' of a non-existent file is now permitted.
+
+Mon Oct 11 21:06:10 1993 Tom Lord (lord@cygnus.com)
+
+ * sed.c (execute_program): remember that 'b' and 't' are more
+ like longjmp than goto. Patch from tom@basil.icce.rug.nl (Tom
+ R.Hageman)
+
+ * rx.c: patch from From: fin!chip@rutgers.edu (Chip
+ Salzenberg) to get rid of compiler warnings.
+
+
+Sat Aug 7 01:04:59 1993 Tom Lord (lord@unix7.andrew.cmu.edu)
+
+ *** Version 2.03 released
+
+ * sed.c (compile_regex): report error messages for bogus
+ regexps.
+
+ SEE ALSO: ChangeLog.rx
+
+
+Wed Jul 21 00:28:03 1993 Tom Lord (lord@unix8.andrew.cmu.edu)
+
+ * alloca.c: upgraded to a more recent version
+
+ * rx.c (re_search_2): prefer matches with longer
+ subexpressions to those with shorter ones, giving precedence
+ to low numbered subexpressions.
+
+ * rx.c (re_compile): don't free `params' if its null.
+
+Fri Jul 16 01:12:08 1993 Tom Lord (lord@unix8.andrew.cmu.edu)
+
+ * rx.[ch], sed.c: rx replaces regex.
+
+
+
+Thu May 27 11:13:03 1993 Tom Lord (lord@unix3.andrew.cmu.edu)
+
+ * sed.c (execute_program, match_addr): caught more cases
+ that need to be sensitive to a missing \n at EOF.
+
+Fri May 21 00:39:22 1993 Tom Lord (lord@unix8.andrew.cmu.edu)
+
+ * sed.c (execute_program): apply gaumondp's patch
+ to fix '\xabcxs/foo/bar/'.
+
+ * sed.c (execute_program):
+ If a second address is a regexp, never match it on the
+ same line as the first address.
+
+ * sed.c (compile_regexp):
+ Numeric ranges x,y s.t. y < x are now treated as x,x.
+ There was a bug in that they were being handled like x,x+1.
+
+ * sed.c (execute_program, read_pattern_space,
+ append_pattern_space) don't add newlines to lines
+ that don't have them.
+
+Wed May 19 13:34:45 1993 Tom Lord (lord@unix9.andrew.cmu.edu)
+
+ * sed.c (compile_program): grok \\n in comments.
+
+Mon May 17 16:34:50 1993 Tom Lord (lord@unix9.andrew.cmu.edu)
+
+ * alloca.c: new (standard) file
+
+ * configure.in: AC_CONSTified
+
+ * sed.c (compile_program): properly diagnose the error of
+ a missing command (e.g. sed /x/). (thanks gaumondp)
+
+ * sed.c (compile_regexp): handle character classes correctly.
+ Thanks gaumondp@ERE.UMontreal.CA
+ and schwab@issan.informatik.uni-dortmund.de.
+
+Thu May 6 12:37:18 1993 Tom Lord (lord@unix10.andrew.cmu.edu)
+
+ * sed.c (compile_filename, execute_program): don't use
+ `access' or `/dev/null'.
+
+ * sed.c (execute_program): 'N' at EOF should delete the pat buf.
+
+ * sed.c (compile_filename): truncate, don't append files
+ being openned for `w' or `s///w'
+
+ * sed.c (execute_program): -n switch shouldn't effect `i' or `c'.
+
+ * sed.c (compile_program): don't compile unescaped newlines
+ into the substitution string of an `s' command (they are an error).
+
+ * sed.c (compile_regex): correctly skip over character
+ sets that contain `]'.
+
+ * sed.c (execute_program): patch from gaumondp
+ Correctly handle empty-string matches in the case of an `s'
+ command with a repeat count.
+
+ * sed.c (compile_program): patch from gaumondp@ere.UMontreal.ca.
+ Don't consume characters after the label of a `b', `t' or `:' command.
+
+ * sed.c (compile_program): unmatched open braces are an error.
+
+ * sed.c (compile_file): when consuming an initial comment,
+ count lines correctly.
+
+Wed Nov 18 02:10:58 1992 Tom Lord (lord@unix2.andrew.cmu.edu)
+
+ * sed.c (execute_program): Made s///p print even if -n was
+ specified.
+
+ * sed.c (compile_string): Changed the type of this function to
+ fix a compile warning.
+
+Wed Nov 4 17:15:34 1992 Tom Lord (lord@unix7.andrew.cmu.edu)
+
+ * sed.c (main): Initialize the hold area to contain "\n"
+ instead of "". In execute_program, all lines are expected
+ to be newline terminated. Also, if H is the first command
+ in the script, the result is a pattern buffer that begins
+ with a blank line. Thanks to pinard@iro.umontreal.ca
+ (Francois Pinard) for pointing out this and many other bugs.
+
+ * sed.c (execute_program): Fixed a case of `D' command.
+ Thanks Chris Weber <weber@bucknell.edu>
+
+ * sed.c: added new tests of no_default_output to make -n work.
+ Thanks Andrew Herbert <andrew@werple.apana.org.au>
+
+ * sed.c, configure.in,Makefile.in: autoconfed bcopy and const.
+ Thanks "J.T. Conklin" <jtc@gain.com>
+
+ * sed.c: made prog_cur, prog_start, and prog_end unsigned so
+ that users could write `sed -e s//foo/g'.
+
+Tue Oct 13 00:04:05 1992 Tom Lord (lord@unix3.andrew.cmu.edu)
+
+ * sed.c (execute_program): fixed the cycling behavior of 'D'
+
+ * sed.c: integrated patch that closes files
+
+ * sed.c: changed regexp syntax
+
+Fri May 22 15:11:12 1992 Tom Lord (lord at moriarty.bh.andrew.cmu.edu)
+
+ * regex.c: this is not my change, but a pointer to the fact
+ that karl@gnu fixed some regexp bugs that were plaguing sed.
+
+Thu Apr 30 13:02:21 1992 Tom Lord (lord at unix3.andrew.cmu.edu)
+
+ * sed.c (compile_program, execute_program)
+ subprograms are now compiled with an explicit continuation ;)
+ return_v and return_i in struct vector. execute_program
+ no longer recurses to execute subprograms (case '{') and now
+ understands a return instruction (case '{').
+
+Tue Apr 28 17:13:04 1992 Tom Lord (lord at unix7.andrew.cmu.edu)
+
+ * sed.c (compile_address) added \?regexp? syntax for addresses.
+
+ * sed.c (main) added {} intervals to the obscure regexp
+ syntax.
+
+ * sed.c (compile_program) after calling compile_address,
+ normalize numeric addresses (make a2.addr_number > a1.addr_number).
+ This is necessary because line numbers must match exactly,
+ but sed does not try to match a2 until after a1 has matched,
+ yet a1,a2 where a2 <= a1 is defined to be equivelent to
+ a1,a1+1
+
+Sat Feb 29 10:55:54 1992 David J. MacKenzie (djm@nutrimat)
+
+ * sed.c (usage): Document long options as starting with `--'.
+
+Mon Dec 9 23:56:40 1991 David J. MacKenzie (djm at wookumz.gnu.ai.mit.edu)
+
+ * sed.c: Include sys/types.h, for new regex.h.
+
+Tue Nov 5 02:16:01 1991 David J. MacKenzie (djm at wookumz.gnu.ai.mit.edu)
+
+ * utils.c: Change NO_VFPRINTF to VPRINTF_MISSING, for
+ compatibility with autoconf.
+
+Mon Sep 2 22:02:40 1991 David J. MacKenzie (djm at apple-gunkies)
+
+ * sed.c (compile_regex): Treat \ as a normal character when in
+ a char class.
+
+Thu Aug 8 00:15:33 1991 David J. MacKenzie (djm at bleen)
+
+ * Version 1.08.
+
+ * sed.c (compile_filename): If reading a file fails, read
+ /dev/null instead. It's what Unix and POSIX do, effectively.
+
+ * sed.c (compile_regex): The 'slash' character doesn't
+ terminate the regex if it's in a character class.
+
+ * sed.c (main): If given no args, or bad option, print usage
+ message.
+ (usage): New function.
+
+ * sed.c (execute_program): Amount written for 'P' command was
+ wrong. From stephend@ksr.com (Stephen Davis).
+
+Wed Aug 7 16:51:14 1991 David J. MacKenzie (djm at apple-gunkies)
+
+ * sed.c (append_pattern_space): Check for buffer full before
+ instead of after writing to buffer. Don't need to test for
+ EOF initially anymore, due to the next change.
+ (execute_program): For 'n' and 'N' commands, if eof is reached
+ in input, quit the script like Unix sed does.
+ Fix memory allocation problems for 'a' and 'r' commands.
+ (compile_program): Fix off by one error in processing comments.
+ All of the above are from Tapani Tarvainen, tarvaine@tukki.jyu.fi.
+
+ * sed.c (setup_jump): Use isblank instead of testing for ' '
+ or '\t', for POSIX locales.
+
+ * utils.c (ck_strdup): Renamed from strdup.
+ * sed.c: Change callers.
+
+ * sed.c, utils.c: Clean up declarations and includes to get
+ rid of compiler warnings.
+
+ * sed.c (main): Add long-named options. Don't complain if -n
+ is given twice.
+
+Fri Aug 2 12:33:16 1991 David J. MacKenzie (djm at apple-gunkies)
+
+ * configure: Support +srcdir arg. Create config.status and
+ remove it and Makefile if interrupted while creating them.
+ * Makefile.in: Change DESTDIR to prefix.
+
+Mon Jul 15 13:07:39 1991 David J. MacKenzie (djm at wookumz.gnu.ai.mit.edu)
+
+ * sed.c (main): Add -V option to print version number.
+ (USAGE): Mention -V.
+
+Mon Jul 8 01:42:22 1991 David J. MacKenzie (djm at geech.gnu.ai.mit.edu)
+
+ * sed.c: Define bcopy in terms of memcpy if STDC_HEADERS as
+ well as if USG.
+ (compile_filename): Don't glob filename (for 'r' and 'w'
+ commands). Unix sed doesn't do it and it's not very useful,
+ since it can only match 0 or 1 files.
+ (execute_program): Change '\a' to 007 since some compilers
+ don't recognize \a.
+ * utils.c: New file; code moved from sed.c.
+ * Replace Makefile with Makefile.in and configure.
+ Update README.
+
+Tue Mar 26 13:00:48 EST 1991 Jay Fenlason (hack@gnu.ai.mit.edu)
+
+ * sed.c (match_address) Added a trivial cast for portability.
+
+Mon Feb 25 13:23:29 EST 1991 Jay Fenlason (hack@ai.mit.edu)
+
+ * sed.c Changed 's' command to work with latest version of regex()
+ routines, which mysteriously changed somewhere in there. . .
+ A one-line patch from David Eckelkamp (eckelkamp@mcc.com).
+
+ Initialize the fastmap in the hopes that it'll make sed faster.
+
+Thu Feb 21 13:42:27 EST 1991 Jay Fenlason (hack@ai.mti.edu)
+
+ * sed.c Change panic to compile with other __STDC__ compilers.
+
+Wed Jan 30 10:46:38 EST 1991 Jay Fenlason (hack@ai.mit.edu)
+
+ * sed.c Changed version number. Made new release.
+
+Tue Nov 27 15:34:51 EST 1990 Jay Fenlason (hack@ai.mit.edu)
+
+ * sed.c (setup_jump) Don't blow chunks if there isn't a label
+ after a b or t command.
+
+ (main) Don't panic if it a branch command doesn't have
+ a label to branch to.
+
+ (main) Collect all the -e arguments together and parse them
+ all at once. This way, -e { -e mumble -e } will work.
+
+ All these small patches from David Schmidt (davids@isc-br.isc-br.com)
+
+Tue Sep 11 12:51:37 EDT 1990 Jay Fenlason (hack@ai.mit.edu)
+
+ * sed.c Changed some function forward declarations to use VOID *
+ instead of char *
+
+Mon Jul 16 11:12:54 EDT 1990 Jay Fenlason (hack@ai.mit.edu)
+
+ * sed.c (ck_malloc) Use malloc(1) instead of malloc(0) if given
+ a request for zero bytes.
+
+Tue Jun 5 02:05:37 1990 David J. MacKenzie (djm at albert.ai.mit.edu)
+
+ * sed.c: Remove excess newlines from calls to panic.
+ Reformat some comments to fit in 79 columns.
+ Base whether to use void * on __STDC__, not __GNU__.
+ (main): Add missing arg when printing usage message.
+ Print usage if given invalid arg.
+ (panic) [__STDC__]: Add missing ", ...".
+ (compile_filename): Print correct error message if glob_filename
+ returns NULL.
+
+Thu Apr 5 21:41:12 1990 Jim Kingdon (kingdon at pogo.ai.mit.edu)
+
+ * sed.c (execute_program, case 'r'): When need to realloc append.text,
+ multiply append.alloc by 2 instead of adding
+ cur_cmd->x.cmd_txt.text_len.
+
+Tue Mar 6 15:55:35 EST 1990 Jay Fenlason (hack@ai.mit.edu)
+
+ * sed.c (compile_regex) Allocate 10 bytes extra space needed by
+ re_compile_pattern.
+
+Sun Feb 25 16:32:10 1990 Jim Kingdon (kingdon at pogo.ai.mit.edu)
+
+ * sed.c (execute_program, case 'l'): Print \00 instead of \0.
+ Print backslash as \\ not \.
+ Print \xx instead of /xx.
+
+Thu Feb 1 14:02:28 EST 1990 hack@wookumz
+
+ * sed.c (memchr) Use () inside inner loop so it will work correctly.
+ A two character patch from Robert A Bruce (rab@allspice.berkeley.edu)
+
+Wed Sep 27 18:47:39 EDT 1989 hack@ai.mit.edu
+
+ * sed.c (compile_regex) New function. When compiling regex,
+ turn ^ into \` and $ into \' so that they won't match on embedded
+ newlines. UN*X pattern matching is a crock.
+ (compile_program, compile_address) call compile_regex.
+
+Mon Sep 18 10:15:32 EDT 1989 hack@ai.mit.edu
+
+ * sed.c (compile_program): define translate as unsigned char * so
+ that y command will work on non-ascii characters.
+
+ Changed version number to 1.06.
+
+Thu Sep 14 15:57:08 EDT 1989 hack@ai.mit.edu
+
+ * sed.c (compile_program) Let programs use ; to terminate } as
+ well as newline.
+
+ (read_file) Print an error msg to stderr if it can't open an
+ input file.
+
+Thu Mar 23 18:04:46 1989 Randall Smith (randy at apple-gunkies.ai.mit.edu)
+
+ * Makefile, sed.c: Added new copyright notice.
+
+ * Makefile: Make distributions which follow the symlinks.
+
+hack@ai.mit.edu
+
+ 1.05 Fixed error in 'r' (now does things in the right order)
+
+ 1.04 Fixed s/re/rep/[number]
+
+ 1.03 Fixes from Mike Haertel for regexps that match the
+ empty string, and for Ritchie stdio (non-sticky EOF)
+
+ 1.02 Fixed 't', 'b', ':' to trim leading spaces and tabs
+ Fixed \\ in replacement of 's' command
+ Added comments
+
+ 1.01 Added s/re/rep/[digits]
+ added #n as first line of script
+ added filename globbing
+ added 'l' command
+ All in the name of POSIX
+
+ 1.00 Began (thinking about) distributing this file
+
+Local Variables:
+mode: indented-text
+left-margin: 8
+version-control: never
+End:
diff --git a/GNUmakefile b/GNUmakefile
new file mode 100644
index 0000000..a869da5
--- /dev/null
+++ b/GNUmakefile
@@ -0,0 +1,127 @@
+# Having a separate GNUmakefile lets me 'include' the dynamically
+# generated rules created via cfg.mk (package-local configuration)
+# as well as maint.mk (generic maintainer rules).
+# This makefile is used only if you run GNU Make.
+# It is necessary if you want to build targets usually of interest
+# only to the maintainer.
+
+# Copyright (C) 2001, 2003, 2006-2016 Free Software Foundation, Inc.
+
+# This 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/>.
+
+# If the user runs GNU make but has not yet run ./configure,
+# give them a diagnostic.
+_gl-Makefile := $(wildcard [M]akefile)
+ifneq ($(_gl-Makefile),)
+
+# Make tar archive easier to reproduce.
+export TAR_OPTIONS = --owner=0 --group=0 --numeric-owner
+
+# Allow the user to add to this in the Makefile.
+ALL_RECURSIVE_TARGETS =
+
+include Makefile
+
+# Some projects override e.g., _autoreconf here.
+-include $(srcdir)/cfg.mk
+
+# Allow cfg.mk to override these.
+_build-aux ?= build-aux
+_autoreconf ?= autoreconf -v
+
+include $(srcdir)/maint.mk
+
+# Ensure that $(VERSION) is up to date for dist-related targets, but not
+# for others: rerunning autoreconf and recompiling everything isn't cheap.
+_have-git-version-gen := \
+ $(shell test -f $(srcdir)/$(_build-aux)/git-version-gen && echo yes)
+ifeq ($(_have-git-version-gen)0,yes$(MAKELEVEL))
+ _is-dist-target ?= $(filter-out %clean, \
+ $(filter maintainer-% dist% alpha beta stable,$(MAKECMDGOALS)))
+ _is-install-target ?= $(filter-out %check, $(filter install%,$(MAKECMDGOALS)))
+ ifneq (,$(_is-dist-target)$(_is-install-target))
+ _curr-ver := $(shell cd $(srcdir) \
+ && $(_build-aux)/git-version-gen \
+ .tarball-version \
+ $(git-version-gen-tag-sed-script))
+ ifneq ($(_curr-ver),$(VERSION))
+ ifeq ($(_curr-ver),UNKNOWN)
+ $(info WARNING: unable to verify if $(VERSION) is the correct version)
+ else
+ ifneq (,$(_is-install-target))
+ # GNU Coding Standards state that 'make install' should not cause
+ # recompilation after 'make all'. But as long as changing the version
+ # string alters config.h, the cost of having 'make all' always have an
+ # up-to-date version is prohibitive. So, as a compromise, we merely
+ # warn when installing a version string that is out of date; the user
+ # should run 'autoreconf' (or something like 'make distcheck') to
+ # fix the version, 'make all' to propagate it, then 'make install'.
+ $(info WARNING: version string $(VERSION) is out of date;)
+ $(info run '$(MAKE) _version' to fix it)
+ else
+ $(info INFO: running autoreconf for new version string: $(_curr-ver))
+GNUmakefile: _version
+ touch GNUmakefile
+ endif
+ endif
+ endif
+ endif
+endif
+
+.PHONY: _version
+_version:
+ cd $(srcdir) && rm -rf autom4te.cache .version && $(_autoreconf)
+ $(MAKE) $(AM_MAKEFLAGS) Makefile
+
+else
+
+.DEFAULT_GOAL := abort-due-to-no-makefile
+srcdir = .
+
+# The package can override .DEFAULT_GOAL to run actions like autoreconf.
+-include ./cfg.mk
+
+# Allow cfg.mk to override these.
+_build-aux ?= build-aux
+_autoreconf ?= autoreconf -v
+
+include ./maint.mk
+
+ifeq ($(.DEFAULT_GOAL),abort-due-to-no-makefile)
+$(MAKECMDGOALS): abort-due-to-no-makefile
+endif
+
+abort-due-to-no-makefile:
+ @echo There seems to be no Makefile in this directory. 1>&2
+ @echo "You must run ./configure before running 'make'." 1>&2
+ @exit 1
+
+endif
+
+# Tell version 3.79 and up of GNU make to not build goals in this
+# directory in parallel, in case someone tries to build multiple
+# targets, and one of them can cause a recursive target to be invoked.
+
+# Only set this if Automake doesn't provide it.
+AM_RECURSIVE_TARGETS ?= $(RECURSIVE_TARGETS:-recursive=) \
+ $(RECURSIVE_CLEAN_TARGETS:-recursive=) \
+ dist distcheck tags ctags
+
+ALL_RECURSIVE_TARGETS += $(AM_RECURSIVE_TARGETS)
+
+ifneq ($(word 2, $(MAKECMDGOALS)), )
+ifneq ($(filter $(ALL_RECURSIVE_TARGETS), $(MAKECMDGOALS)), )
+.NOTPARALLEL:
+endif
+endif
diff --git a/INSTALL b/INSTALL
index 6e90e07..8865734 100644
--- a/INSTALL
+++ b/INSTALL
@@ -1,8 +1,8 @@
Installation Instructions
*************************
-Copyright (C) 1994-1996, 1999-2002, 2004-2012 Free Software Foundation,
-Inc.
+ Copyright (C) 1994-1996, 1999-2002, 2004-2016 Free Software
+Foundation, Inc.
Copying and distribution of this file, with or without modification,
are permitted in any medium without royalty provided the copyright
@@ -12,97 +12,96 @@ without warranty of any kind.
Basic Installation
==================
- Briefly, the shell commands `./configure; make; make install' should
-configure, build, and install this package. The following
-more-detailed instructions are generic; see the `README' file for
+ Briefly, the shell command './configure && make && make install'
+should configure, build, and install this package. The following
+more-detailed instructions are generic; see the 'README' file for
instructions specific to this package. Some packages provide this
-`INSTALL' file but do not implement all of the features documented
+'INSTALL' file but do not implement all of the features documented
below. The lack of an optional feature in a given package is not
necessarily a bug. More recommendations for GNU packages can be found
in *note Makefile Conventions: (standards)Makefile Conventions.
- The `configure' shell script attempts to guess correct values for
+ The 'configure' shell script attempts to guess correct values for
various system-dependent variables used during compilation. It uses
-those values to create a `Makefile' in each directory of the package.
-It may also create one or more `.h' files containing system-dependent
-definitions. Finally, it creates a shell script `config.status' that
+those values to create a 'Makefile' in each directory of the package.
+It may also create one or more '.h' files containing system-dependent
+definitions. Finally, it creates a shell script 'config.status' that
you can run in the future to recreate the current configuration, and a
-file `config.log' containing compiler output (useful mainly for
-debugging `configure').
+file 'config.log' containing compiler output (useful mainly for
+debugging 'configure').
- It can also use an optional file (typically called `config.cache'
-and enabled with `--cache-file=config.cache' or simply `-C') that saves
-the results of its tests to speed up reconfiguring. Caching is
-disabled by default to prevent problems with accidental use of stale
-cache files.
+ It can also use an optional file (typically called 'config.cache' and
+enabled with '--cache-file=config.cache' or simply '-C') that saves the
+results of its tests to speed up reconfiguring. Caching is disabled by
+default to prevent problems with accidental use of stale cache files.
If you need to do unusual things to compile the package, please try
-to figure out how `configure' could check whether to do them, and mail
-diffs or instructions to the address given in the `README' so they can
+to figure out how 'configure' could check whether to do them, and mail
+diffs or instructions to the address given in the 'README' so they can
be considered for the next release. If you are using the cache, and at
-some point `config.cache' contains results you don't want to keep, you
+some point 'config.cache' contains results you don't want to keep, you
may remove or edit it.
- The file `configure.ac' (or `configure.in') is used to create
-`configure' by a program called `autoconf'. You need `configure.ac' if
-you want to change it or regenerate `configure' using a newer version
-of `autoconf'.
+ The file 'configure.ac' (or 'configure.in') is used to create
+'configure' by a program called 'autoconf'. You need 'configure.ac' if
+you want to change it or regenerate 'configure' using a newer version of
+'autoconf'.
The simplest way to compile this package is:
- 1. `cd' to the directory containing the package's source code and type
- `./configure' to configure the package for your system.
+ 1. 'cd' to the directory containing the package's source code and type
+ './configure' to configure the package for your system.
- Running `configure' might take a while. While running, it prints
+ Running 'configure' might take a while. While running, it prints
some messages telling which features it is checking for.
- 2. Type `make' to compile the package.
+ 2. Type 'make' to compile the package.
- 3. Optionally, type `make check' to run any self-tests that come with
+ 3. Optionally, type 'make check' to run any self-tests that come with
the package, generally using the just-built uninstalled binaries.
- 4. Type `make install' to install the programs and any data files and
+ 4. Type 'make install' to install the programs and any data files and
documentation. When installing into a prefix owned by root, it is
recommended that the package be configured and built as a regular
- user, and only the `make install' phase executed with root
+ user, and only the 'make install' phase executed with root
privileges.
- 5. Optionally, type `make installcheck' to repeat any self-tests, but
+ 5. Optionally, type 'make installcheck' to repeat any self-tests, but
this time using the binaries in their final installed location.
This target does not install anything. Running this target as a
- regular user, particularly if the prior `make install' required
+ regular user, particularly if the prior 'make install' required
root privileges, verifies that the installation completed
correctly.
6. You can remove the program binaries and object files from the
- source code directory by typing `make clean'. To also remove the
- files that `configure' created (so you can compile the package for
- a different kind of computer), type `make distclean'. There is
- also a `make maintainer-clean' target, but that is intended mainly
+ source code directory by typing 'make clean'. To also remove the
+ files that 'configure' created (so you can compile the package for
+ a different kind of computer), type 'make distclean'. There is
+ also a 'make maintainer-clean' target, but that is intended mainly
for the package's developers. If you use it, you may have to get
all sorts of other programs in order to regenerate files that came
with the distribution.
- 7. Often, you can also type `make uninstall' to remove the installed
+ 7. Often, you can also type 'make uninstall' to remove the installed
files again. In practice, not all packages have tested that
uninstallation works correctly, even though it is required by the
GNU Coding Standards.
- 8. Some packages, particularly those that use Automake, provide `make
+ 8. Some packages, particularly those that use Automake, provide 'make
distcheck', which can by used by developers to test that all other
- targets like `make install' and `make uninstall' work correctly.
+ targets like 'make install' and 'make uninstall' work correctly.
This target is generally not run by end users.
Compilers and Options
=====================
Some systems require unusual options for compilation or linking that
-the `configure' script does not know about. Run `./configure --help'
+the 'configure' script does not know about. Run './configure --help'
for details on some of the pertinent environment variables.
- You can give `configure' initial values for configuration parameters
-by setting variables in the command line or in the environment. Here
-is an example:
+ You can give 'configure' initial values for configuration parameters
+by setting variables in the command line or in the environment. Here is
+an example:
./configure CC=c99 CFLAGS=-g LIBS=-lposix
@@ -113,21 +112,21 @@ Compiling For Multiple Architectures
You can compile the package for more than one kind of computer at the
same time, by placing the object files for each architecture in their
-own directory. To do this, you can use GNU `make'. `cd' to the
+own directory. To do this, you can use GNU 'make'. 'cd' to the
directory where you want the object files and executables to go and run
-the `configure' script. `configure' automatically checks for the
-source code in the directory that `configure' is in and in `..'. This
-is known as a "VPATH" build.
+the 'configure' script. 'configure' automatically checks for the source
+code in the directory that 'configure' is in and in '..'. This is known
+as a "VPATH" build.
- With a non-GNU `make', it is safer to compile the package for one
+ With a non-GNU 'make', it is safer to compile the package for one
architecture at a time in the source code directory. After you have
-installed the package for one architecture, use `make distclean' before
+installed the package for one architecture, use 'make distclean' before
reconfiguring for another architecture.
On MacOS X 10.5 and later systems, you can create libraries and
executables that work on multiple system types--known as "fat" or
-"universal" binaries--by specifying multiple `-arch' options to the
-compiler but only a single `-arch' option to the preprocessor. Like
+"universal" binaries--by specifying multiple '-arch' options to the
+compiler but only a single '-arch' option to the preprocessor. Like
this:
./configure CC="gcc -arch i386 -arch x86_64 -arch ppc -arch ppc64" \
@@ -136,105 +135,104 @@ this:
This is not guaranteed to produce working output in all cases, you
may have to build one architecture at a time and combine the results
-using the `lipo' tool if you have problems.
+using the 'lipo' tool if you have problems.
Installation Names
==================
- By default, `make install' installs the package's commands under
-`/usr/local/bin', include files under `/usr/local/include', etc. You
-can specify an installation prefix other than `/usr/local' by giving
-`configure' the option `--prefix=PREFIX', where PREFIX must be an
+ By default, 'make install' installs the package's commands under
+'/usr/local/bin', include files under '/usr/local/include', etc. You
+can specify an installation prefix other than '/usr/local' by giving
+'configure' the option '--prefix=PREFIX', where PREFIX must be an
absolute file name.
You can specify separate installation prefixes for
architecture-specific files and architecture-independent files. If you
-pass the option `--exec-prefix=PREFIX' to `configure', the package uses
+pass the option '--exec-prefix=PREFIX' to 'configure', the package uses
PREFIX as the prefix for installing programs and libraries.
Documentation and other data files still use the regular prefix.
In addition, if you use an unusual directory layout you can give
-options like `--bindir=DIR' to specify different values for particular
-kinds of files. Run `configure --help' for a list of the directories
-you can set and what kinds of files go in them. In general, the
-default for these options is expressed in terms of `${prefix}', so that
-specifying just `--prefix' will affect all of the other directory
+options like '--bindir=DIR' to specify different values for particular
+kinds of files. Run 'configure --help' for a list of the directories
+you can set and what kinds of files go in them. In general, the default
+for these options is expressed in terms of '${prefix}', so that
+specifying just '--prefix' will affect all of the other directory
specifications that were not explicitly provided.
The most portable way to affect installation locations is to pass the
-correct locations to `configure'; however, many packages provide one or
+correct locations to 'configure'; however, many packages provide one or
both of the following shortcuts of passing variable assignments to the
-`make install' command line to change installation locations without
+'make install' command line to change installation locations without
having to reconfigure or recompile.
The first method involves providing an override variable for each
-affected directory. For example, `make install
+affected directory. For example, 'make install
prefix=/alternate/directory' will choose an alternate location for all
directory configuration variables that were expressed in terms of
-`${prefix}'. Any directories that were specified during `configure',
-but not in terms of `${prefix}', must each be overridden at install
-time for the entire installation to be relocated. The approach of
-makefile variable overrides for each directory variable is required by
-the GNU Coding Standards, and ideally causes no recompilation.
-However, some platforms have known limitations with the semantics of
-shared libraries that end up requiring recompilation when using this
-method, particularly noticeable in packages that use GNU Libtool.
-
- The second method involves providing the `DESTDIR' variable. For
-example, `make install DESTDIR=/alternate/directory' will prepend
-`/alternate/directory' before all installation names. The approach of
-`DESTDIR' overrides is not required by the GNU Coding Standards, and
+'${prefix}'. Any directories that were specified during 'configure',
+but not in terms of '${prefix}', must each be overridden at install time
+for the entire installation to be relocated. The approach of makefile
+variable overrides for each directory variable is required by the GNU
+Coding Standards, and ideally causes no recompilation. However, some
+platforms have known limitations with the semantics of shared libraries
+that end up requiring recompilation when using this method, particularly
+noticeable in packages that use GNU Libtool.
+
+ The second method involves providing the 'DESTDIR' variable. For
+example, 'make install DESTDIR=/alternate/directory' will prepend
+'/alternate/directory' before all installation names. The approach of
+'DESTDIR' overrides is not required by the GNU Coding Standards, and
does not work on platforms that have drive letters. On the other hand,
it does better at avoiding recompilation issues, and works well even
-when some directory options were not specified in terms of `${prefix}'
-at `configure' time.
+when some directory options were not specified in terms of '${prefix}'
+at 'configure' time.
Optional Features
=================
If the package supports it, you can cause programs to be installed
-with an extra prefix or suffix on their names by giving `configure' the
-option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'.
-
- Some packages pay attention to `--enable-FEATURE' options to
-`configure', where FEATURE indicates an optional part of the package.
-They may also pay attention to `--with-PACKAGE' options, where PACKAGE
-is something like `gnu-as' or `x' (for the X Window System). The
-`README' should mention any `--enable-' and `--with-' options that the
+with an extra prefix or suffix on their names by giving 'configure' the
+option '--program-prefix=PREFIX' or '--program-suffix=SUFFIX'.
+
+ Some packages pay attention to '--enable-FEATURE' options to
+'configure', where FEATURE indicates an optional part of the package.
+They may also pay attention to '--with-PACKAGE' options, where PACKAGE
+is something like 'gnu-as' or 'x' (for the X Window System). The
+'README' should mention any '--enable-' and '--with-' options that the
package recognizes.
- For packages that use the X Window System, `configure' can usually
+ For packages that use the X Window System, 'configure' can usually
find the X include and library files automatically, but if it doesn't,
-you can use the `configure' options `--x-includes=DIR' and
-`--x-libraries=DIR' to specify their locations.
+you can use the 'configure' options '--x-includes=DIR' and
+'--x-libraries=DIR' to specify their locations.
Some packages offer the ability to configure how verbose the
-execution of `make' will be. For these packages, running `./configure
+execution of 'make' will be. For these packages, running './configure
--enable-silent-rules' sets the default to minimal output, which can be
-overridden with `make V=1'; while running `./configure
+overridden with 'make V=1'; while running './configure
--disable-silent-rules' sets the default to verbose, which can be
-overridden with `make V=0'.
+overridden with 'make V=0'.
Particular systems
==================
- On HP-UX, the default C compiler is not ANSI C compatible. If GNU
-CC is not installed, it is recommended to use the following options in
+ On HP-UX, the default C compiler is not ANSI C compatible. If GNU CC
+is not installed, it is recommended to use the following options in
order to use an ANSI C compiler:
./configure CC="cc -Ae -D_XOPEN_SOURCE=500"
and if that doesn't work, install pre-built binaries of GCC for HP-UX.
- HP-UX `make' updates targets which have the same time stamps as
-their prerequisites, which makes it generally unusable when shipped
-generated files such as `configure' are involved. Use GNU `make'
-instead.
+ HP-UX 'make' updates targets which have the same time stamps as their
+prerequisites, which makes it generally unusable when shipped generated
+files such as 'configure' are involved. Use GNU 'make' instead.
On OSF/1 a.k.a. Tru64, some versions of the default C compiler cannot
-parse its `<wchar.h>' header file. The option `-nodtk' can be used as
-a workaround. If GNU CC is not installed, it is therefore recommended
-to try
+parse its '<wchar.h>' header file. The option '-nodtk' can be used as a
+workaround. If GNU CC is not installed, it is therefore recommended to
+try
./configure CC="cc"
@@ -242,26 +240,26 @@ and if that doesn't work, try
./configure CC="cc -nodtk"
- On Solaris, don't put `/usr/ucb' early in your `PATH'. This
+ On Solaris, don't put '/usr/ucb' early in your 'PATH'. This
directory contains several dysfunctional programs; working variants of
-these programs are available in `/usr/bin'. So, if you need `/usr/ucb'
-in your `PATH', put it _after_ `/usr/bin'.
+these programs are available in '/usr/bin'. So, if you need '/usr/ucb'
+in your 'PATH', put it _after_ '/usr/bin'.
- On Haiku, software installed for all users goes in `/boot/common',
-not `/usr/local'. It is recommended to use the following options:
+ On Haiku, software installed for all users goes in '/boot/common',
+not '/usr/local'. It is recommended to use the following options:
./configure --prefix=/boot/common
Specifying the System Type
==========================
- There may be some features `configure' cannot figure out
+ There may be some features 'configure' cannot figure out
automatically, but needs to determine by the type of machine the package
will run on. Usually, assuming the package is built to be run on the
-_same_ architectures, `configure' can figure that out, but if it prints
+_same_ architectures, 'configure' can figure that out, but if it prints
a message saying it cannot guess the machine type, give it the
-`--build=TYPE' option. TYPE can either be a short name for the system
-type, such as `sun4', or a canonical name which has the form:
+'--build=TYPE' option. TYPE can either be a short name for the system
+type, such as 'sun4', or a canonical name which has the form:
CPU-COMPANY-SYSTEM
@@ -270,101 +268,101 @@ where SYSTEM can have one of these forms:
OS
KERNEL-OS
- See the file `config.sub' for the possible values of each field. If
-`config.sub' isn't included in this package, then this package doesn't
+ See the file 'config.sub' for the possible values of each field. If
+'config.sub' isn't included in this package, then this package doesn't
need to know the machine type.
If you are _building_ compiler tools for cross-compiling, you should
-use the option `--target=TYPE' to select the type of system they will
+use the option '--target=TYPE' to select the type of system they will
produce code for.
If you want to _use_ a cross compiler, that generates code for a
platform different from the build platform, you should specify the
"host" platform (i.e., that on which the generated programs will
-eventually be run) with `--host=TYPE'.
+eventually be run) with '--host=TYPE'.
Sharing Defaults
================
- If you want to set default values for `configure' scripts to share,
-you can create a site shell script called `config.site' that gives
-default values for variables like `CC', `cache_file', and `prefix'.
-`configure' looks for `PREFIX/share/config.site' if it exists, then
-`PREFIX/etc/config.site' if it exists. Or, you can set the
-`CONFIG_SITE' environment variable to the location of the site script.
-A warning: not all `configure' scripts look for a site script.
+ If you want to set default values for 'configure' scripts to share,
+you can create a site shell script called 'config.site' that gives
+default values for variables like 'CC', 'cache_file', and 'prefix'.
+'configure' looks for 'PREFIX/share/config.site' if it exists, then
+'PREFIX/etc/config.site' if it exists. Or, you can set the
+'CONFIG_SITE' environment variable to the location of the site script.
+A warning: not all 'configure' scripts look for a site script.
Defining Variables
==================
Variables not defined in a site shell script can be set in the
-environment passed to `configure'. However, some packages may run
+environment passed to 'configure'. However, some packages may run
configure again during the build, and the customized values of these
variables may be lost. In order to avoid this problem, you should set
-them in the `configure' command line, using `VAR=value'. For example:
+them in the 'configure' command line, using 'VAR=value'. For example:
./configure CC=/usr/local2/bin/gcc
-causes the specified `gcc' to be used as the C compiler (unless it is
+causes the specified 'gcc' to be used as the C compiler (unless it is
overridden in the site shell script).
-Unfortunately, this technique does not work for `CONFIG_SHELL' due to
-an Autoconf limitation. Until the limitation is lifted, you can use
-this workaround:
+Unfortunately, this technique does not work for 'CONFIG_SHELL' due to an
+Autoconf limitation. Until the limitation is lifted, you can use this
+workaround:
CONFIG_SHELL=/bin/bash ./configure CONFIG_SHELL=/bin/bash
-`configure' Invocation
+'configure' Invocation
======================
- `configure' recognizes the following options to control how it
+ 'configure' recognizes the following options to control how it
operates.
-`--help'
-`-h'
- Print a summary of all of the options to `configure', and exit.
+'--help'
+'-h'
+ Print a summary of all of the options to 'configure', and exit.
-`--help=short'
-`--help=recursive'
+'--help=short'
+'--help=recursive'
Print a summary of the options unique to this package's
- `configure', and exit. The `short' variant lists options used
- only in the top level, while the `recursive' variant lists options
- also present in any nested packages.
+ 'configure', and exit. The 'short' variant lists options used only
+ in the top level, while the 'recursive' variant lists options also
+ present in any nested packages.
-`--version'
-`-V'
- Print the version of Autoconf used to generate the `configure'
+'--version'
+'-V'
+ Print the version of Autoconf used to generate the 'configure'
script, and exit.
-`--cache-file=FILE'
+'--cache-file=FILE'
Enable the cache: use and save the results of the tests in FILE,
- traditionally `config.cache'. FILE defaults to `/dev/null' to
+ traditionally 'config.cache'. FILE defaults to '/dev/null' to
disable caching.
-`--config-cache'
-`-C'
- Alias for `--cache-file=config.cache'.
+'--config-cache'
+'-C'
+ Alias for '--cache-file=config.cache'.
-`--quiet'
-`--silent'
-`-q'
+'--quiet'
+'--silent'
+'-q'
Do not print messages saying which checks are being made. To
- suppress all normal output, redirect it to `/dev/null' (any error
+ suppress all normal output, redirect it to '/dev/null' (any error
messages will still be shown).
-`--srcdir=DIR'
+'--srcdir=DIR'
Look for the package's source code in directory DIR. Usually
- `configure' can determine that directory automatically.
+ 'configure' can determine that directory automatically.
-`--prefix=DIR'
- Use DIR as the installation prefix. *note Installation Names::
- for more details, including other options available for fine-tuning
- the installation locations.
+'--prefix=DIR'
+ Use DIR as the installation prefix. *note Installation Names:: for
+ more details, including other options available for fine-tuning the
+ installation locations.
-`--no-create'
-`-n'
+'--no-create'
+'-n'
Run the configure checks, but stop before creating any output
files.
-`configure' also accepts some other, not widely useful, options. Run
-`configure --help' for more details.
+'configure' also accepts some other, not widely useful, options. Run
+'configure --help' for more details.
diff --git a/Makefile.am b/Makefile.am
index 9b88c86..cc1fdbe 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -1,39 +1,109 @@
-## Process this file with automake to produce Makefile.in
+# Copyright (C) 1990-2016 Free Software Foundation, Inc.
-# Automake requirements
-AUTOMAKE_OPTIONS = gnits 1.10 dist-bzip2
-ACLOCAL_AMFLAGS = -I m4
+# This 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/>.
PACKAGE = sed
-SUBDIRS = lib po sed doc testsuite
+SUBDIRS = po . gnulib-tests
+
+
+# This applies to all parts: gnulib, sed, testsuites
+AM_CPPFLAGS = -I$(top_srcdir) \
+ -I$(top_srcdir)/lib \
+ -I$(top_builddir)/lib \
+ -I$(top_builddir)/sed
+AM_CFLAGS =
+BUILT_SOURCES =
+CLEANFILES =
+EXTRA_DIST =
+MAINTAINERCLEANFILES =
+MOSTLYCLEANDIRS =
+MOSTLYCLEANFILES =
+SUFFIXES =
+bin_PROGRAMS =
+noinst_LIBRARIES =
noinst_DATA =
noinst_HEADERS = basicdefs.h
+DISTCLEANFILES =
-EXTRA_DIST = BUGS THANKS COPYING.DOC \
- bootstrap bootstrap.conf build-aux/texi2dvi build-aux/help2man
+EXTRA_DIST += BUGS THANKS.in COPYING.DOC \
+ .version \
+ .mailmap ChangeLog-2014 po/ChangeLog-2014 \
+ bootstrap bootstrap.conf build-aux/help2man \
+ thanks-gen
-html:
- cd doc && make html
+BUILT_SOURCES += .version
+.version:
+ $(AM_V_GEN)echo $(VERSION) > $@-t && mv $@-t $@
-DISTCHECK_CONFIGURE_FLAGS = XGETTEXT='$(SHELL) -c : dummy' $(EXTRA_DC_FLAGS)
-EXTRA_DC_FLAGS =
+# Arrange so that .tarball-version appears only in the distribution
+# tarball, and never in a checked-out repository.
+dist-hook: gen-ChangeLog
+ $(AM_V_GEN)echo $(VERSION) > $(distdir)/.tarball-version
+
+gen_start_date = 2014-09-06
+.PHONY: gen-ChangeLog
+gen-ChangeLog:
+ $(AM_V_GEN)if test -d .git; then \
+ log_fix="$(srcdir)/build-aux/git-log-fix"; \
+ test -e "$$log_fix" \
+ && amend_git_log="--amend=$$log_fix" \
+ || amend_git_log=; \
+ $(top_srcdir)/build-aux/gitlog-to-changelog \
+ $$amend_git_log --since=$(gen_start_date) > $(distdir)/cl-t && \
+ { rm -f $(distdir)/ChangeLog && \
+ mv $(distdir)/cl-t $(distdir)/ChangeLog; } \
+ fi
+
+# Sort in traditional ASCII order, regardless of the current locale;
+# otherwise we may get into trouble with distinct strings that the
+# current locale considers to be equal.
+ASSORT = LC_ALL=C sort
-dist-hook:
- test $(COPYRIGHT_YEAR) = `date +%Y` || \
- { echo Copyright year not updated; exit 1; }
+# Extract all lines up to the first one starting with "##".
+prologue = perl -ne '/^\#\#/ and exit; print' $(srcdir)/THANKS.in
+
+THANKS: THANKS.in Makefile.am .mailmap thanks-gen .version
+ $(AM_V_GEN)rm -f $@-t $@; \
+ { \
+ $(prologue); echo; \
+ { perl -ne '/^$$/.../^$$/ and print' $(srcdir)/THANKS.in \
+ | grep -v '^$$' | perl -pe 's/ +/\0/'; \
+ git log --pretty=format:'%aN%x00%aE' \
+ | $(ASSORT) -u; \
+ } | $(srcdir)/thanks-gen \
+ | LC_ALL=en_US.UTF-8 sort -f; \
+ echo; \
+ printf ';; %s\n' 'Local Variables:' 'coding: utf-8' End:; \
+ } > $@-t && chmod a-w $@-t && mv $@-t $@
+
+
+DISTCHECK_CONFIGURE_FLAGS = XGETTEXT='$(SHELL) -c : dummy' $(EXTRA_DC_FLAGS)
+EXTRA_DC_FLAGS =
full-distcheck:
- make distcheck EXTRA_DC_FLAGS='--enable-regex-tests'
- make distcheck EXTRA_DC_FLAGS='--enable-html'
- make distcheck EXTRA_DC_FLAGS='--disable-i18n'
- make distcheck EXTRA_DC_FLAGS='--disable-nls'
- make distcheck EXTRA_DC_FLAGS='--without-included-gettext'
+ $(MAKE) distcheck EXTRA_DC_FLAGS='--enable-regex-tests'
+ $(MAKE) distcheck EXTRA_DC_FLAGS='--enable-html'
+ $(MAKE) distcheck EXTRA_DC_FLAGS='--disable-i18n'
+ $(MAKE) distcheck EXTRA_DC_FLAGS='--disable-nls'
+ $(MAKE) distcheck EXTRA_DC_FLAGS='--without-included-gettext'
@case "$(host)" in \
*-linux*|*-gnu*) \
- echo make distcheck EXTRA_DC_FLAGS=\'--without-included-regex\'; \
- make distcheck EXTRA_DC_FLAGS='--without-included-regex' \
+ echo $(MAKE) distcheck \
+ EXTRA_DC_FLAGS=\'--without-included-regex\'; \
+ $(MAKE) distcheck EXTRA_DC_FLAGS='--without-included-regex' \
;; \
*) \
echo Skipping check --without-included-regex \
@@ -54,3 +124,17 @@ full-distcheck:
## wget -O testsuite/PCRE.tests "$$BASEURL/PCRE.tests?$$QUERY" && \
## wget -O testsuite/SPENCER.tests "$$BASEURL/rxspencer/tests?$$QUERY"
+
+include $(top_srcdir)/lib/local.mk
+include $(top_srcdir)/sed/local.mk
+include $(top_srcdir)/doc/local.mk
+include $(top_srcdir)/testsuite/local.mk
+
+# Remove the generated sed.1 file, but only for a non-srcdir build.
+# Without this, 'make distcheck's final comparison would fail.
+# Also remove lib/.deps/{getfilecon,obstack}.Po,
+# which are left behind by bleeding edge automake.
+# Without this, 'make distcheck's final comparison would fail.
+distclean-local:
+ test x$(srcdir) = x$(builddir) || rm -f $(dist_man_MANS)
+ rm -f lib/.deps/getfilecon.Po lib/.deps/obstack.Po
diff --git a/Makefile.in b/Makefile.in
index 3158710..6cf9e32 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.12.2 from Makefile.am.
+# Makefile.in generated by automake 1.99a from Makefile.am.
# @configure_input@
-# Copyright (C) 1994-2012 Free Software Foundation, Inc.
+# Copyright (C) 1994-2015 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -14,25 +14,164 @@
@SET_MAKE@
+# Copyright (C) 1990-2016 Free Software Foundation, Inc.
+
+# This 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/>.
+
+# Copyright 1997-2016 Free Software Foundation, Inc.
+#
+# This 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 <http://www.gnu.org/licenses/>.
+#
+
+# Copyright (C) 2002-2016 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
+# 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 this file. If not, see <http://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
+# contains a configuration script generated by Autoconf, under
+# the same distribution terms as the rest of that program.
+#
+# 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 Free Software Foundation, Inc.
+
+# This 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/>.
+
+# Copyright (C) 2016 Free Software Foundation, Inc.
+
+# This 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/>.
+
+# Copyright (C) 2016 Free Software Foundation, Inc.
+
+# This 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/>.
+
+
+
VPATH = @srcdir@
-am__make_dryrun = \
- { \
- am__dry=no; \
+am__is_gnu_make = { \
+ if test -z '$(MAKELEVEL)'; then \
+ false; \
+ elif test -n '$(MAKE_HOST)'; then \
+ true; \
+ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
+ true; \
+ else \
+ false; \
+ fi; \
+}
+am__make_running_with_option = \
+ case $${target_option-} in \
+ ?) ;; \
+ *) echo "am__make_running_with_option: internal error: invalid" \
+ "target option '$${target_option-}' specified" >&2; \
+ exit 1;; \
+ esac; \
+ has_opt=no; \
+ sane_makeflags=$$MAKEFLAGS; \
+ if $(am__is_gnu_make); then \
+ sane_makeflags=$$MFLAGS; \
+ else \
case $$MAKEFLAGS in \
*\\[\ \ ]*) \
- echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \
- | grep '^AM OK$$' >/dev/null || am__dry=yes;; \
- *) \
- for am__flg in $$MAKEFLAGS; do \
- case $$am__flg in \
- *=*|--*) ;; \
- *n*) am__dry=yes; break;; \
- esac; \
- done;; \
+ bs=\\; \
+ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
+ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \
esac; \
- test $$am__dry = yes; \
- }
+ fi; \
+ skip_next=no; \
+ strip_trailopt () \
+ { \
+ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
+ }; \
+ for flg in $$sane_makeflags; do \
+ test $$skip_next = yes && { skip_next=no; continue; }; \
+ case $$flg in \
+ *=*|--*) continue;; \
+ -*I) strip_trailopt 'I'; skip_next=yes;; \
+ -*I?*) strip_trailopt 'I';; \
+ -*O) strip_trailopt 'O'; skip_next=yes;; \
+ -*O?*) strip_trailopt 'O';; \
+ -*l) strip_trailopt 'l'; skip_next=yes;; \
+ -*l?*) strip_trailopt 'l';; \
+ -[dEDm]) skip_next=yes;; \
+ -[JT]) skip_next=yes;; \
+ esac; \
+ case $$flg in \
+ *$$target_option*) has_opt=yes; break;; \
+ esac; \
+ done; \
+ test $$has_opt = yes
+am__make_dryrun = (target_option=n; $(am__make_running_with_option))
+am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
pkgdatadir = $(datadir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
@@ -50,109 +189,680 @@ PRE_UNINSTALL = :
POST_UNINSTALL = :
build_triplet = @build@
host_triplet = @host@
+bin_PROGRAMS = sed/sed$(EXEEXT)
+@TEST_SYMLINKS_TRUE@am__append_1 = testsuite/follow-symlinks.sh \
+@TEST_SYMLINKS_TRUE@ testsuite/follow-symlinks-stdin.sh
+
+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
subdir = .
-DIST_COMMON = README $(am__configure_deps) $(noinst_HEADERS) \
- $(srcdir)/Makefile.am $(srcdir)/Makefile.in \
- $(srcdir)/config_h.in $(top_srcdir)/build-aux/config.guess \
- $(top_srcdir)/build-aux/config.rpath \
- $(top_srcdir)/build-aux/config.sub \
- $(top_srcdir)/build-aux/install-sh \
- $(top_srcdir)/build-aux/missing $(top_srcdir)/configure \
- ABOUT-NLS AUTHORS COPYING COPYING.DOC ChangeLog INSTALL NEWS \
- README-alpha THANKS build-aux/compile build-aux/config.guess \
- build-aux/config.rpath build-aux/config.sub build-aux/depcomp \
- build-aux/install-sh build-aux/mdate-sh build-aux/missing \
- build-aux/texinfo.tex
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/m4/00gnulib.m4 \
- $(top_srcdir)/m4/acl.m4 $(top_srcdir)/m4/alloca.m4 \
- $(top_srcdir)/m4/btowc.m4 $(top_srcdir)/m4/canonicalize.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/btowc.m4 $(top_srcdir)/m4/builtin-expect.m4 \
+ $(top_srcdir)/m4/canonicalize.m4 \
+ $(top_srcdir)/m4/close-stream.m4 $(top_srcdir)/m4/close.m4 \
+ $(top_srcdir)/m4/closedir.m4 $(top_srcdir)/m4/closeout.m4 \
$(top_srcdir)/m4/codeset.m4 $(top_srcdir)/m4/configmake.m4 \
- $(top_srcdir)/m4/dirname.m4 \
- $(top_srcdir)/m4/double-slash-root.m4 \
- $(top_srcdir)/m4/eealloc.m4 $(top_srcdir)/m4/errno_h.m4 \
- $(top_srcdir)/m4/error.m4 $(top_srcdir)/m4/extensions.m4 \
+ $(top_srcdir)/m4/ctype.m4 $(top_srcdir)/m4/dirent_h.m4 \
+ $(top_srcdir)/m4/dirfd.m4 $(top_srcdir)/m4/dirname.m4 \
+ $(top_srcdir)/m4/double-slash-root.m4 $(top_srcdir)/m4/dup2.m4 \
+ $(top_srcdir)/m4/eealloc.m4 $(top_srcdir)/m4/environ.m4 \
+ $(top_srcdir)/m4/errno_h.m4 $(top_srcdir)/m4/error.m4 \
+ $(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/fstat.m4 \
- $(top_srcdir)/m4/fwriting.m4 $(top_srcdir)/m4/getdelim.m4 \
- $(top_srcdir)/m4/getopt.m4 $(top_srcdir)/m4/gettext.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/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 \
+ $(top_srcdir)/m4/getprogname.m4 $(top_srcdir)/m4/gettext.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/iconv.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/intlmacosx.m4 $(top_srcdir)/m4/langinfo_h.m4 \
- $(top_srcdir)/m4/largefile.m4 $(top_srcdir)/m4/lib-ld.m4 \
- $(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \
- $(top_srcdir)/m4/localcharset.m4 $(top_srcdir)/m4/locale-fr.m4 \
- $(top_srcdir)/m4/locale-ja.m4 $(top_srcdir)/m4/locale-zh.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/longlong.m4 $(top_srcdir)/m4/lstat.m4 \
- $(top_srcdir)/m4/malloc.m4 $(top_srcdir)/m4/malloca.m4 \
+ $(top_srcdir)/m4/localename.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 \
$(top_srcdir)/m4/mbrlen.m4 $(top_srcdir)/m4/mbrtowc.m4 \
$(top_srcdir)/m4/mbsinit.m4 $(top_srcdir)/m4/mbstate_t.m4 \
$(top_srcdir)/m4/mbtowc.m4 $(top_srcdir)/m4/memchr.m4 \
+ $(top_srcdir)/m4/memrchr.m4 $(top_srcdir)/m4/minmax.m4 \
$(top_srcdir)/m4/mkostemp.m4 $(top_srcdir)/m4/mmap-anon.m4 \
- $(top_srcdir)/m4/msvc-inval.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/nl_langinfo.m4 $(top_srcdir)/m4/nls.m4 \
- $(top_srcdir)/m4/nocrash.m4 $(top_srcdir)/m4/off_t.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/quote.m4 \
- $(top_srcdir)/m4/quotearg.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/progtest.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/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/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/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/string_h.m4 \
- $(top_srcdir)/m4/strverscmp.m4 \
+ $(top_srcdir)/m4/strverscmp.m4 $(top_srcdir)/m4/symlink.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/unistd_h.m4 $(top_srcdir)/m4/unlocked-io.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/wchar_h.m4 \
- $(top_srcdir)/m4/wchar_t.m4 $(top_srcdir)/m4/wcrtomb.m4 \
- $(top_srcdir)/m4/wctob.m4 $(top_srcdir)/m4/wctomb.m4 \
- $(top_srcdir)/m4/wctype_h.m4 $(top_srcdir)/m4/wint_t.m4 \
- $(top_srcdir)/m4/xalloc.m4 $(top_srcdir)/configure.ac
+ $(top_srcdir)/m4/warn-on-use.m4 $(top_srcdir)/m4/warnings.m4 \
+ $(top_srcdir)/m4/wchar_h.m4 $(top_srcdir)/m4/wchar_t.m4 \
+ $(top_srcdir)/m4/wcrtomb.m4 $(top_srcdir)/m4/wctob.m4 \
+ $(top_srcdir)/m4/wctomb.m4 $(top_srcdir)/m4/wctype_h.m4 \
+ $(top_srcdir)/m4/wint_t.m4 $(top_srcdir)/m4/xalloc.m4 \
+ $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
+DIST_COMMON = $(srcdir)/Makefile.am $(top_srcdir)/configure \
+ $(am__configure_deps) $(srcdir)/doc/version.texi \
+ $(srcdir)/doc/stamp-vti $(dist_noinst_DATA) $(noinst_HEADERS) \
+ $(am__DIST_COMMON)
am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \
configure.lineno config.status.lineno
mkinstalldirs = $(install_sh) -d
CONFIG_HEADER = config.h
CONFIG_CLEAN_FILES =
CONFIG_CLEAN_VPATH_FILES =
-SOURCES =
-DIST_SOURCES =
-RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \
- html-recursive info-recursive install-data-recursive \
- install-dvi-recursive install-exec-recursive \
- install-html-recursive install-info-recursive \
- install-pdf-recursive install-ps-recursive install-recursive \
- installcheck-recursive installdirs-recursive pdf-recursive \
- ps-recursive uninstall-recursive
+LIBRARIES = $(noinst_LIBRARIES)
+AM_V_AR = $(am__v_AR_@AM_V@)
+am__v_AR_ = $(am__v_AR_@AM_DEFAULT_V@)
+am__v_AR_0 = @echo " AR " $@;
+am__v_AR_1 =
+lib_libsed_a_AR = $(AR) $(ARFLAGS)
+am__DEPENDENCIES_1 =
+LIBOBJDIR = lib/
+am__dirstamp = .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) \
+ lib/c-ctype.$(OBJEXT) lib/c-strcasecmp.$(OBJEXT) \
+ lib/c-strncasecmp.$(OBJEXT) lib/close-stream.$(OBJEXT) \
+ lib/closeout.$(OBJEXT) lib/dfa.$(OBJEXT) \
+ lib/localeinfo.$(OBJEXT) lib/dirname-lgpl.$(OBJEXT) \
+ lib/basename-lgpl.$(OBJEXT) lib/stripslash.$(OBJEXT) \
+ lib/exitfail.$(OBJEXT) lib/getprogname.$(OBJEXT) \
+ lib/hard-locale.$(OBJEXT) lib/localcharset.$(OBJEXT) \
+ lib/glthread/lock.$(OBJEXT) lib/malloca.$(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_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)
+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
+am__v_P_1 = :
+AM_V_GEN = $(am__v_GEN_@AM_V@)
+am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
+am__v_GEN_0 = @echo " GEN " $@;
+am__v_GEN_1 =
+AM_V_at = $(am__v_at_@AM_V@)
+am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
+am__v_at_0 = @
+am__v_at_1 =
+DEFAULT_INCLUDES = -I.@am__isrc@
+depcomp = $(SHELL) $(top_srcdir)/build-aux/depcomp
+am__maybe_remake_depfiles = depfiles
+am__depfiles_remade = lib/$(DEPDIR)/acl-errno-valid.Po \
+ lib/$(DEPDIR)/acl-internal.Po lib/$(DEPDIR)/acl_entries.Po \
+ lib/$(DEPDIR)/alloca.Po lib/$(DEPDIR)/basename-lgpl.Po \
+ lib/$(DEPDIR)/btowc.Po lib/$(DEPDIR)/c-ctype.Po \
+ lib/$(DEPDIR)/c-strcasecmp.Po lib/$(DEPDIR)/c-strncasecmp.Po \
+ lib/$(DEPDIR)/canonicalize-lgpl.Po \
+ lib/$(DEPDIR)/close-stream.Po lib/$(DEPDIR)/closeout.Po \
+ lib/$(DEPDIR)/copy-acl.Po lib/$(DEPDIR)/dfa.Po \
+ lib/$(DEPDIR)/dirname-lgpl.Po lib/$(DEPDIR)/error.Po \
+ lib/$(DEPDIR)/exitfail.Po lib/$(DEPDIR)/fpending.Po \
+ lib/$(DEPDIR)/fstat.Po lib/$(DEPDIR)/fwriting.Po \
+ lib/$(DEPDIR)/get-permissions.Po lib/$(DEPDIR)/getdelim.Po \
+ lib/$(DEPDIR)/getfilecon.Po lib/$(DEPDIR)/getopt.Po \
+ lib/$(DEPDIR)/getopt1.Po lib/$(DEPDIR)/getprogname.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)/set-acl.Po lib/$(DEPDIR)/set-permissions.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 \
+ lib/$(DEPDIR)/unistd.Po lib/$(DEPDIR)/version-etc-fsf.Po \
+ lib/$(DEPDIR)/version-etc.Po lib/$(DEPDIR)/wcrtomb.Po \
+ lib/$(DEPDIR)/wctob.Po lib/$(DEPDIR)/wctomb.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
+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
+am__v_lt_1 =
+COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
+ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+AM_V_CC = $(am__v_CC_@AM_V@)
+am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@)
+am__v_CC_0 = @echo " CC " $@;
+am__v_CC_1 =
+CCLD = $(CC)
+LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
+AM_V_CCLD = $(am__v_CCLD_@AM_V@)
+am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@)
+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
+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
+AM_V_DVIPS = $(am__v_DVIPS_@AM_V@)
+am__v_DVIPS_ = $(am__v_DVIPS_@AM_DEFAULT_V@)
+am__v_DVIPS_0 = @echo " DVIPS " $@;
+am__v_DVIPS_1 =
+AM_V_MAKEINFO = $(am__v_MAKEINFO_@AM_V@)
+am__v_MAKEINFO_ = $(am__v_MAKEINFO_@AM_DEFAULT_V@)
+am__v_MAKEINFO_0 = @echo " MAKEINFO" $@;
+am__v_MAKEINFO_1 =
+AM_V_INFOHTML = $(am__v_INFOHTML_@AM_V@)
+am__v_INFOHTML_ = $(am__v_INFOHTML_@AM_DEFAULT_V@)
+am__v_INFOHTML_0 = @echo " INFOHTML" $@;
+am__v_INFOHTML_1 =
+AM_V_TEXI2DVI = $(am__v_TEXI2DVI_@AM_V@)
+am__v_TEXI2DVI_ = $(am__v_TEXI2DVI_@AM_DEFAULT_V@)
+am__v_TEXI2DVI_0 = @echo " TEXI2DVI" $@;
+am__v_TEXI2DVI_1 =
+AM_V_TEXI2PDF = $(am__v_TEXI2PDF_@AM_V@)
+am__v_TEXI2PDF_ = $(am__v_TEXI2PDF_@AM_DEFAULT_V@)
+am__v_TEXI2PDF_0 = @echo " TEXI2PDF" $@;
+am__v_TEXI2PDF_1 =
+AM_V_texinfo = $(am__v_texinfo_@AM_V@)
+am__v_texinfo_ = $(am__v_texinfo_@AM_DEFAULT_V@)
+am__v_texinfo_0 = -q
+am__v_texinfo_1 =
+AM_V_texidevnull = $(am__v_texidevnull_@AM_V@)
+am__v_texidevnull_ = $(am__v_texidevnull_@AM_DEFAULT_V@)
+am__v_texidevnull_0 = > /dev/null
+am__v_texidevnull_1 =
+INFO_DEPS = $(srcdir)/doc/sed.info
+TEXINFO_TEX = $(top_srcdir)/build-aux/texinfo.tex
+am__TEXINFO_TEX_DIR = $(top_srcdir)/build-aux
+DVIS = doc/sed.dvi
+PDFS = doc/sed.pdf
+PSS = doc/sed.ps
+HTMLS = doc/sed.html
+TEXINFOS = doc/sed.texi
+TEXI2DVI = texi2dvi
+TEXI2PDF = $(TEXI2DVI) --pdf --batch
+MAKEINFOHTML = $(MAKEINFO) --html
+DVIPS = dvips
+RECURSIVE_TARGETS = all-recursive check-recursive cscopelist-recursive \
+ ctags-recursive dvi-recursive html-recursive info-recursive \
+ install-data-recursive install-dvi-recursive \
+ install-exec-recursive install-html-recursive \
+ install-info-recursive install-pdf-recursive \
+ install-ps-recursive install-recursive installcheck-recursive \
+ installdirs-recursive pdf-recursive ps-recursive \
+ tags-recursive uninstall-recursive
am__can_run_installinfo = \
case $$AM_UPDATE_INFO_DIR in \
n|no|NO) false;; \
*) (install-info --version) >/dev/null 2>&1;; \
esac
-DATA = $(noinst_DATA)
+am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
+am__vpath_adj = case $$p in \
+ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
+ *) f=$$p;; \
+ esac;
+am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
+am__install_max = 40
+am__nobase_strip_setup = \
+ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
+am__nobase_strip = \
+ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
+am__nobase_list = $(am__nobase_strip_setup); \
+ for p in $$list; do echo "$$p $$p"; done | \
+ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
+ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
+ if (++n[$$2] == $(am__install_max)) \
+ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
+ END { for (dir in files) print dir, files[dir] }'
+am__base_list = \
+ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
+ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
+am__uninstall_files_from_dir = { \
+ test -z "$$files" \
+ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \
+ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \
+ $(am__cd) "$$dir" && rm -f $$files; }; \
+ }
+man1dir = $(mandir)/man1
+NROFF = nroff
+MANS = $(dist_man_MANS)
+DATA = $(dist_noinst_DATA) $(noinst_DATA)
HEADERS = $(noinst_HEADERS)
RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \
distclean-recursive maintainer-clean-recursive
-AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \
- $(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \
- cscope distdir dist dist-all distcheck
+am__recursive_targets = \
+ $(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
+am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) \
+ $(LISP)config_h.in
+# Read a list of newline-separated strings from the standard input,
+# and print each of them once, without duplicates. Input order is
+# *not* preserved.
+am__uniquify_input = $(AWK) '\
+ BEGIN { nonempty = 0; } \
+ { items[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in items) print i; }; } \
+'
+# Make sure the list of sources is unique. This is necessary because,
+# e.g., the same source file might be shared among _SOURCES variables
+# for different programs/libraries.
+am__define_uniq_tagged_files = \
+ list='$(am__tagged_files)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | $(am__uniquify_input)`
ETAGS = etags
CTAGS = ctags
CSCOPE = cscope
+am__tty_colors_dummy = \
+ mgn= red= grn= lgn= blu= brg= std=; \
+ am__color_tests=no
+am__tty_colors = { \
+ $(am__tty_colors_dummy); \
+ if test "X$(AM_COLOR_TESTS)" = Xno; then \
+ am__color_tests=no; \
+ elif test "X$(AM_COLOR_TESTS)" = Xalways; then \
+ am__color_tests=yes; \
+ elif test "X$$TERM" != Xdumb && { test -t 1; } 2>/dev/null; then \
+ am__color_tests=yes; \
+ fi; \
+ if test $$am__color_tests = yes; then \
+ red=''; \
+ grn=''; \
+ lgn=''; \
+ blu=''; \
+ mgn=''; \
+ brg=''; \
+ std=''; \
+ fi; \
+}
+am__recheck_rx = ^[ ]*:recheck:[ ]*
+am__global_test_result_rx = ^[ ]*:global-test-result:[ ]*
+am__copy_in_global_log_rx = ^[ ]*:copy-in-global-log:[ ]*
+# A command that, given a newline-separated list of test names on the
+# standard input, print the name of the tests that are to be re-run
+# upon "make recheck".
+am__list_recheck_tests = $(AWK) '{ \
+ recheck = 1; \
+ while ((rc = (getline line < ($$0 ".trs"))) != 0) \
+ { \
+ if (rc < 0) \
+ { \
+ if ((getline line2 < ($$0 ".log")) < 0) \
+ recheck = 0; \
+ break; \
+ } \
+ else if (line ~ /$(am__recheck_rx)[nN][Oo]/) \
+ { \
+ recheck = 0; \
+ break; \
+ } \
+ else if (line ~ /$(am__recheck_rx)[yY][eE][sS]/) \
+ { \
+ break; \
+ } \
+ }; \
+ if (recheck) \
+ print $$0; \
+ close ($$0 ".trs"); \
+ close ($$0 ".log"); \
+}'
+# A command that, given a newline-separated list of test names on the
+# standard input, create the global log from their .trs and .log files.
+am__create_global_log = $(AWK) ' \
+function fatal(msg) \
+{ \
+ print "fatal: making $@: " msg | "cat >&2"; \
+ exit 1; \
+} \
+function rst_section(header) \
+{ \
+ print header; \
+ len = length(header); \
+ for (i = 1; i <= len; i = i + 1) \
+ printf "="; \
+ printf "\n\n"; \
+} \
+{ \
+ copy_in_global_log = 1; \
+ global_test_result = "RUN"; \
+ while ((rc = (getline line < ($$0 ".trs"))) != 0) \
+ { \
+ if (rc < 0) \
+ fatal("failed to read from " $$0 ".trs"); \
+ if (line ~ /$(am__global_test_result_rx)/) \
+ { \
+ sub("$(am__global_test_result_rx)", "", line); \
+ sub("[ ]*$$", "", line); \
+ global_test_result = line; \
+ } \
+ else if (line ~ /$(am__copy_in_global_log_rx)[nN][oO]/) \
+ copy_in_global_log = 0; \
+ }; \
+ if (copy_in_global_log) \
+ { \
+ rst_section(global_test_result ": " $$0); \
+ while ((rc = (getline line < ($$0 ".log"))) != 0) \
+ { \
+ if (rc < 0) \
+ fatal("failed to read from " $$0 ".log"); \
+ print line; \
+ }; \
+ printf "\n"; \
+ }; \
+ close ($$0 ".trs"); \
+ close ($$0 ".log"); \
+}'
+# Restructured Text title.
+am__rst_title = { sed 's/.*/ & /;h;s/./=/g;p;x;s/ *$$//;p;g' && echo; }
+# Solaris 10 'make', and several other traditional 'make' implementations,
+# pass "-e" to $(SHELL), and POSIX 2008 even requires this. Work around it
+# by disabling -e (using the XSI extension "set +e") if it's set.
+am__sh_e_setup = case $$- in *e*) set +e;; esac
+# Default flags passed to test drivers.
+am__common_driver_flags = \
+ --color-tests "$$am__color_tests" \
+ --enable-hard-errors "$$am__enable_hard_errors" \
+ --expect-failure "$$am__expect_failure"
+# To be inserted before the command running the test. Creates the
+# directory for the log if needed. Stores in $dir the directory
+# containing $f, in $tst the test, in $log the log. Executes the
+# developer- defined test setup AM_TESTS_ENVIRONMENT (if any), and
+# passes TESTS_ENVIRONMENT. Set up options for the wrapper that
+# will run the test scripts (or their associated LOG_COMPILER, if
+# thy have one).
+am__check_pre = \
+$(am__sh_e_setup); \
+$(am__vpath_adj_setup) $(am__vpath_adj) \
+$(am__tty_colors); \
+srcdir=$(srcdir); export srcdir; \
+case "$@" in \
+ */*) am__odir=`echo "./$@" | sed 's|/[^/]*$$||'`;; \
+ *) am__odir=.;; \
+esac; \
+test "x$$am__odir" = x"." || test -d "$$am__odir" \
+ || $(MKDIR_P) "$$am__odir" || exit $$?; \
+if test -f "./$$f"; then dir=./; \
+elif test -f "$$f"; then dir=; \
+else dir="$(srcdir)/"; fi; \
+tst=$$dir$$f; log='$@'; \
+if test -n '$(DISABLE_HARD_ERRORS)'; then \
+ am__enable_hard_errors=no; \
+else \
+ am__enable_hard_errors=yes; \
+fi; \
+case " $(XFAIL_TESTS) " in \
+ *[\ \ ]$$f[\ \ ]* | *[\ \ ]$$dir$$f[\ \ ]*) \
+ am__expect_failure=yes;; \
+ *) \
+ am__expect_failure=no;; \
+esac; \
+$(AM_TESTS_ENVIRONMENT) $(TESTS_ENVIRONMENT)
+# A shell command to get the names of the tests scripts with any registered
+# extension removed (i.e., equivalently, the names of the test logs, with
+# the '.log' extension removed). The result is saved in the shell variable
+# '$bases'. This honors runtime overriding of TESTS and TEST_LOGS. Sadly,
+# we cannot use something simpler, involving e.g., "$(TEST_LOGS:.log=)",
+# since that might cause problem with VPATH rewrites for suffix-less tests.
+# See also 'test-harness-vpath-rewrite.sh' and 'test-trs-basic.sh'.
+am__set_TESTS_bases = \
+ bases='$(TEST_LOGS)'; \
+ bases=`for i in $$bases; do echo $$i; done | sed 's/\.log$$//'`; \
+ bases=`echo $$bases`
+RECHECK_LOGS = $(TEST_LOGS)
+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__set_b = \
+ case '$@' in \
+ */*) \
+ case '$*' in \
+ */*) b='$*';; \
+ *) b=`echo '$@' | sed 's/\.log$$//'`; \
+ esac;; \
+ *) \
+ 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)
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/compile \
+ $(top_srcdir)/build-aux/config.guess \
+ $(top_srcdir)/build-aux/config.rpath \
+ $(top_srcdir)/build-aux/config.sub \
+ $(top_srcdir)/build-aux/depcomp \
+ $(top_srcdir)/build-aux/install-sh \
+ $(top_srcdir)/build-aux/mdate-sh \
+ $(top_srcdir)/build-aux/missing \
+ $(top_srcdir)/build-aux/test-driver \
+ $(top_srcdir)/build-aux/texinfo.tex $(top_srcdir)/doc/local.mk \
+ $(top_srcdir)/lib/alloca.c $(top_srcdir)/lib/local.mk \
+ $(top_srcdir)/sed/local.mk $(top_srcdir)/testsuite/local.mk \
+ ABOUT-NLS AUTHORS COPYING COPYING.DOC ChangeLog INSTALL NEWS \
+ README THANKS build-aux/ar-lib build-aux/compile \
+ build-aux/config.guess build-aux/config.rpath \
+ build-aux/config.sub build-aux/depcomp build-aux/install-sh \
+ build-aux/mdate-sh build-aux/missing build-aux/texinfo.tex
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
distdir = $(PACKAGE)-$(VERSION)
top_distdir = $(distdir)
@@ -188,9 +898,9 @@ am__relativize = \
dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \
done; \
reldir="$$dir2"
-DIST_ARCHIVES = $(distdir).tar.gz $(distdir).tar.bz2
GZIP_ENV = --best
-DIST_TARGETS = dist-bzip2 dist-gzip
+DIST_ARCHIVES = $(distdir).tar.xz
+DIST_TARGETS = dist-xz
distuninstallcheck_listfiles = find . -type f -print
am__distuninstallcheck_listfiles = $(distuninstallcheck_listfiles) \
| sed 's|^\./|$(prefix)/|' | grep -v '$(infodir)/dir$$'
@@ -200,6 +910,7 @@ ACLOCAL = @ACLOCAL@
ALLOCA = @ALLOCA@
ALLOCA_H = @ALLOCA_H@
AMTAR = @AMTAR@
+AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
APPLE_UNIVERSAL_BUILD = @APPLE_UNIVERSAL_BUILD@
AR = @AR@
ARFLAGS = @ARFLAGS@
@@ -215,7 +926,7 @@ BITSIZEOF_WINT_T = @BITSIZEOF_WINT_T@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
-COPYRIGHT_YEAR = @COPYRIGHT_YEAR@
+CONFIG_INCLUDE = @CONFIG_INCLUDE@
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
CYGPATH_W = @CYGPATH_W@
@@ -238,6 +949,7 @@ GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@
GLIBC21 = @GLIBC21@
GMSGFMT = @GMSGFMT@
GMSGFMT_015 = @GMSGFMT_015@
+GNULIB_ALPHASORT = @GNULIB_ALPHASORT@
GNULIB_ATOLL = @GNULIB_ATOLL@
GNULIB_BTOWC = @GNULIB_BTOWC@
GNULIB_CALLOC_POSIX = @GNULIB_CALLOC_POSIX@
@@ -245,6 +957,8 @@ GNULIB_CANONICALIZE_FILE_NAME = @GNULIB_CANONICALIZE_FILE_NAME@
GNULIB_CHDIR = @GNULIB_CHDIR@
GNULIB_CHOWN = @GNULIB_CHOWN@
GNULIB_CLOSE = @GNULIB_CLOSE@
+GNULIB_CLOSEDIR = @GNULIB_CLOSEDIR@
+GNULIB_DIRFD = @GNULIB_DIRFD@
GNULIB_DPRINTF = @GNULIB_DPRINTF@
GNULIB_DUP = @GNULIB_DUP@
GNULIB_DUP2 = @GNULIB_DUP2@
@@ -260,6 +974,7 @@ GNULIB_FCLOSE = @GNULIB_FCLOSE@
GNULIB_FCNTL = @GNULIB_FCNTL@
GNULIB_FDATASYNC = @GNULIB_FDATASYNC@
GNULIB_FDOPEN = @GNULIB_FDOPEN@
+GNULIB_FDOPENDIR = @GNULIB_FDOPENDIR@
GNULIB_FFLUSH = @GNULIB_FFLUSH@
GNULIB_FFSL = @GNULIB_FFSL@
GNULIB_FFSLL = @GNULIB_FFSLL@
@@ -303,7 +1018,10 @@ GNULIB_GETUSERSHELL = @GNULIB_GETUSERSHELL@
GNULIB_GL_UNISTD_H_GETOPT = @GNULIB_GL_UNISTD_H_GETOPT@
GNULIB_GRANTPT = @GNULIB_GRANTPT@
GNULIB_GROUP_MEMBER = @GNULIB_GROUP_MEMBER@
+GNULIB_IMAXABS = @GNULIB_IMAXABS@
+GNULIB_IMAXDIV = @GNULIB_IMAXDIV@
GNULIB_ISATTY = @GNULIB_ISATTY@
+GNULIB_ISBLANK = @GNULIB_ISBLANK@
GNULIB_ISWBLANK = @GNULIB_ISWBLANK@
GNULIB_ISWCTYPE = @GNULIB_ISWCTYPE@
GNULIB_LCHMOD = @GNULIB_LCHMOD@
@@ -356,6 +1074,8 @@ GNULIB_OBSTACK_PRINTF = @GNULIB_OBSTACK_PRINTF@
GNULIB_OBSTACK_PRINTF_POSIX = @GNULIB_OBSTACK_PRINTF_POSIX@
GNULIB_OPEN = @GNULIB_OPEN@
GNULIB_OPENAT = @GNULIB_OPENAT@
+GNULIB_OPENDIR = @GNULIB_OPENDIR@
+GNULIB_OVERRIDES_WINT_T = @GNULIB_OVERRIDES_WINT_T@
GNULIB_PCLOSE = @GNULIB_PCLOSE@
GNULIB_PERROR = @GNULIB_PERROR@
GNULIB_PIPE = @GNULIB_PIPE@
@@ -372,10 +1092,12 @@ GNULIB_PUTCHAR = @GNULIB_PUTCHAR@
GNULIB_PUTENV = @GNULIB_PUTENV@
GNULIB_PUTS = @GNULIB_PUTS@
GNULIB_PWRITE = @GNULIB_PWRITE@
+GNULIB_QSORT_R = @GNULIB_QSORT_R@
GNULIB_RANDOM = @GNULIB_RANDOM@
GNULIB_RANDOM_R = @GNULIB_RANDOM_R@
GNULIB_RAWMEMCHR = @GNULIB_RAWMEMCHR@
GNULIB_READ = @GNULIB_READ@
+GNULIB_READDIR = @GNULIB_READDIR@
GNULIB_READLINK = @GNULIB_READLINK@
GNULIB_READLINKAT = @GNULIB_READLINKAT@
GNULIB_REALLOC_POSIX = @GNULIB_REALLOC_POSIX@
@@ -383,9 +1105,12 @@ GNULIB_REALPATH = @GNULIB_REALPATH@
GNULIB_REMOVE = @GNULIB_REMOVE@
GNULIB_RENAME = @GNULIB_RENAME@
GNULIB_RENAMEAT = @GNULIB_RENAMEAT@
+GNULIB_REWINDDIR = @GNULIB_REWINDDIR@
GNULIB_RMDIR = @GNULIB_RMDIR@
GNULIB_RPMATCH = @GNULIB_RPMATCH@
+GNULIB_SCANDIR = @GNULIB_SCANDIR@
GNULIB_SCANF = @GNULIB_SCANF@
+GNULIB_SECURE_GETENV = @GNULIB_SECURE_GETENV@
GNULIB_SETENV = @GNULIB_SETENV@
GNULIB_SETHOSTNAME = @GNULIB_SETHOSTNAME@
GNULIB_SETLOCALE = @GNULIB_SETLOCALE@
@@ -411,15 +1136,19 @@ GNULIB_STRSEP = @GNULIB_STRSEP@
GNULIB_STRSIGNAL = @GNULIB_STRSIGNAL@
GNULIB_STRSTR = @GNULIB_STRSTR@
GNULIB_STRTOD = @GNULIB_STRTOD@
+GNULIB_STRTOIMAX = @GNULIB_STRTOIMAX@
GNULIB_STRTOK_R = @GNULIB_STRTOK_R@
GNULIB_STRTOLL = @GNULIB_STRTOLL@
GNULIB_STRTOULL = @GNULIB_STRTOULL@
+GNULIB_STRTOUMAX = @GNULIB_STRTOUMAX@
GNULIB_STRVERSCMP = @GNULIB_STRVERSCMP@
GNULIB_SYMLINK = @GNULIB_SYMLINK@
GNULIB_SYMLINKAT = @GNULIB_SYMLINKAT@
GNULIB_SYSTEM_POSIX = @GNULIB_SYSTEM_POSIX@
+GNULIB_TEST_WARN_CFLAGS = @GNULIB_TEST_WARN_CFLAGS@
GNULIB_TIMEGM = @GNULIB_TIMEGM@
GNULIB_TIME_R = @GNULIB_TIME_R@
+GNULIB_TIME_RZ = @GNULIB_TIME_RZ@
GNULIB_TMPFILE = @GNULIB_TMPFILE@
GNULIB_TOWCTRANS = @GNULIB_TOWCTRANS@
GNULIB_TTYNAME_R = @GNULIB_TTYNAME_R@
@@ -480,13 +1209,18 @@ GNULIB_WMEMSET = @GNULIB_WMEMSET@
GNULIB_WRITE = @GNULIB_WRITE@
GNULIB__EXIT = @GNULIB__EXIT@
GREP = @GREP@
+HAVE_ALPHASORT = @HAVE_ALPHASORT@
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_DECL_DIRFD = @HAVE_DECL_DIRFD@
HAVE_DECL_ENVIRON = @HAVE_DECL_ENVIRON@
HAVE_DECL_FCHDIR = @HAVE_DECL_FCHDIR@
HAVE_DECL_FDATASYNC = @HAVE_DECL_FDATASYNC@
+HAVE_DECL_FDOPENDIR = @HAVE_DECL_FDOPENDIR@
HAVE_DECL_FPURGE = @HAVE_DECL_FPURGE@
HAVE_DECL_FSEEKO = @HAVE_DECL_FSEEKO@
HAVE_DECL_FTELLO = @HAVE_DECL_FTELLO@
@@ -494,9 +1228,12 @@ HAVE_DECL_GETDELIM = @HAVE_DECL_GETDELIM@
HAVE_DECL_GETDOMAINNAME = @HAVE_DECL_GETDOMAINNAME@
HAVE_DECL_GETLINE = @HAVE_DECL_GETLINE@
HAVE_DECL_GETLOADAVG = @HAVE_DECL_GETLOADAVG@
+HAVE_DECL_GETLOGIN = @HAVE_DECL_GETLOGIN@
HAVE_DECL_GETLOGIN_R = @HAVE_DECL_GETLOGIN_R@
HAVE_DECL_GETPAGESIZE = @HAVE_DECL_GETPAGESIZE@
HAVE_DECL_GETUSERSHELL = @HAVE_DECL_GETUSERSHELL@
+HAVE_DECL_IMAXABS = @HAVE_DECL_IMAXABS@
+HAVE_DECL_IMAXDIV = @HAVE_DECL_IMAXDIV@
HAVE_DECL_LOCALTIME_R = @HAVE_DECL_LOCALTIME_R@
HAVE_DECL_MEMMEM = @HAVE_DECL_MEMMEM@
HAVE_DECL_MEMRCHR = @HAVE_DECL_MEMRCHR@
@@ -509,12 +1246,15 @@ HAVE_DECL_STRERROR_R = @HAVE_DECL_STRERROR_R@
HAVE_DECL_STRNDUP = @HAVE_DECL_STRNDUP@
HAVE_DECL_STRNLEN = @HAVE_DECL_STRNLEN@
HAVE_DECL_STRSIGNAL = @HAVE_DECL_STRSIGNAL@
+HAVE_DECL_STRTOIMAX = @HAVE_DECL_STRTOIMAX@
HAVE_DECL_STRTOK_R = @HAVE_DECL_STRTOK_R@
+HAVE_DECL_STRTOUMAX = @HAVE_DECL_STRTOUMAX@
HAVE_DECL_TTYNAME_R = @HAVE_DECL_TTYNAME_R@
HAVE_DECL_UNSETENV = @HAVE_DECL_UNSETENV@
HAVE_DECL_VSNPRINTF = @HAVE_DECL_VSNPRINTF@
HAVE_DECL_WCTOB = @HAVE_DECL_WCTOB@
HAVE_DECL_WCWIDTH = @HAVE_DECL_WCWIDTH@
+HAVE_DIRENT_H = @HAVE_DIRENT_H@
HAVE_DPRINTF = @HAVE_DPRINTF@
HAVE_DUP2 = @HAVE_DUP2@
HAVE_DUP3 = @HAVE_DUP3@
@@ -526,6 +1266,7 @@ HAVE_FCHMODAT = @HAVE_FCHMODAT@
HAVE_FCHOWNAT = @HAVE_FCHOWNAT@
HAVE_FCNTL = @HAVE_FCNTL@
HAVE_FDATASYNC = @HAVE_FDATASYNC@
+HAVE_FDOPENDIR = @HAVE_FDOPENDIR@
HAVE_FEATURES_H = @HAVE_FEATURES_H@
HAVE_FFSL = @HAVE_FFSL@
HAVE_FFSLL = @HAVE_FFSLL@
@@ -546,6 +1287,7 @@ HAVE_GETTIMEOFDAY = @HAVE_GETTIMEOFDAY@
HAVE_GRANTPT = @HAVE_GRANTPT@
HAVE_GROUP_MEMBER = @HAVE_GROUP_MEMBER@
HAVE_INTTYPES_H = @HAVE_INTTYPES_H@
+HAVE_ISBLANK = @HAVE_ISBLANK@
HAVE_ISWBLANK = @HAVE_ISWBLANK@
HAVE_ISWCNTRL = @HAVE_ISWCNTRL@
HAVE_LANGINFO_CODESET = @HAVE_LANGINFO_CODESET@
@@ -559,6 +1301,7 @@ HAVE_LINK = @HAVE_LINK@
HAVE_LINKAT = @HAVE_LINKAT@
HAVE_LONG_LONG_INT = @HAVE_LONG_LONG_INT@
HAVE_LSTAT = @HAVE_LSTAT@
+HAVE_MAX_ALIGN_T = @HAVE_MAX_ALIGN_T@
HAVE_MBRLEN = @HAVE_MBRLEN@
HAVE_MBRTOWC = @HAVE_MBRTOWC@
HAVE_MBSINIT = @HAVE_MBSINIT@
@@ -581,6 +1324,7 @@ HAVE_MSVC_INVALID_PARAMETER_HANDLER = @HAVE_MSVC_INVALID_PARAMETER_HANDLER@
HAVE_NANOSLEEP = @HAVE_NANOSLEEP@
HAVE_NL_LANGINFO = @HAVE_NL_LANGINFO@
HAVE_OPENAT = @HAVE_OPENAT@
+HAVE_OPENDIR = @HAVE_OPENDIR@
HAVE_OS_H = @HAVE_OS_H@
HAVE_PCLOSE = @HAVE_PCLOSE@
HAVE_PIPE = @HAVE_PIPE@
@@ -591,15 +1335,20 @@ HAVE_PREAD = @HAVE_PREAD@
HAVE_PTSNAME = @HAVE_PTSNAME@
HAVE_PTSNAME_R = @HAVE_PTSNAME_R@
HAVE_PWRITE = @HAVE_PWRITE@
+HAVE_QSORT_R = @HAVE_QSORT_R@
HAVE_RANDOM = @HAVE_RANDOM@
HAVE_RANDOM_H = @HAVE_RANDOM_H@
HAVE_RANDOM_R = @HAVE_RANDOM_R@
HAVE_RAWMEMCHR = @HAVE_RAWMEMCHR@
+HAVE_READDIR = @HAVE_READDIR@
HAVE_READLINK = @HAVE_READLINK@
HAVE_READLINKAT = @HAVE_READLINKAT@
HAVE_REALPATH = @HAVE_REALPATH@
HAVE_RENAMEAT = @HAVE_RENAMEAT@
+HAVE_REWINDDIR = @HAVE_REWINDDIR@
HAVE_RPMATCH = @HAVE_RPMATCH@
+HAVE_SCANDIR = @HAVE_SCANDIR@
+HAVE_SECURE_GETENV = @HAVE_SECURE_GETENV@
HAVE_SETENV = @HAVE_SETENV@
HAVE_SETHOSTNAME = @HAVE_SETHOSTNAME@
HAVE_SIGNED_SIG_ATOMIC_T = @HAVE_SIGNED_SIG_ATOMIC_T@
@@ -629,6 +1378,7 @@ HAVE_SYS_PARAM_H = @HAVE_SYS_PARAM_H@
HAVE_SYS_TIME_H = @HAVE_SYS_TIME_H@
HAVE_SYS_TYPES_H = @HAVE_SYS_TYPES_H@
HAVE_TIMEGM = @HAVE_TIMEGM@
+HAVE_TIMEZONE_T = @HAVE_TIMEZONE_T@
HAVE_UNISTD_H = @HAVE_UNISTD_H@
HAVE_UNLINKAT = @HAVE_UNLINKAT@
HAVE_UNLOCKPT = @HAVE_UNLOCKPT@
@@ -685,34 +1435,51 @@ INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+INT32_MAX_LT_INTMAX_MAX = @INT32_MAX_LT_INTMAX_MAX@
+INT64_MAX_EQ_LONG_MAX = @INT64_MAX_EQ_LONG_MAX@
INTLLIBS = @INTLLIBS@
INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@
LDFLAGS = @LDFLAGS@
LIBICONV = @LIBICONV@
LIBINTL = @LIBINTL@
+LIBMULTITHREAD = @LIBMULTITHREAD@
LIBOBJS = @LIBOBJS@
+LIBPTH = @LIBPTH@
+LIBPTH_PREFIX = @LIBPTH_PREFIX@
LIBS = @LIBS@
LIBSED_LIBDEPS = @LIBSED_LIBDEPS@
LIBSED_LTLIBDEPS = @LIBSED_LTLIBDEPS@
+LIBTESTS_LIBDEPS = @LIBTESTS_LIBDEPS@
+LIBTHREAD = @LIBTHREAD@
LIB_ACL = @LIB_ACL@
+LIB_HAS_ACL = @LIB_HAS_ACL@
LIB_SELINUX = @LIB_SELINUX@
+LIMITS_H = @LIMITS_H@
LOCALCHARSET_TESTS_ENVIRONMENT = @LOCALCHARSET_TESTS_ENVIRONMENT@
LOCALE_FR = @LOCALE_FR@
LOCALE_FR_UTF8 = @LOCALE_FR_UTF8@
LOCALE_JA = @LOCALE_JA@
+LOCALE_TR_UTF8 = @LOCALE_TR_UTF8@
LOCALE_ZH_CN = @LOCALE_ZH_CN@
LTLIBICONV = @LTLIBICONV@
LTLIBINTL = @LTLIBINTL@
+LTLIBMULTITHREAD = @LTLIBMULTITHREAD@
LTLIBOBJS = @LTLIBOBJS@
+LTLIBPTH = @LTLIBPTH@
+LTLIBTHREAD = @LTLIBTHREAD@
MAKEINFO = @MAKEINFO@
MKDIR_P = @MKDIR_P@
MSGFMT = @MSGFMT@
MSGFMT_015 = @MSGFMT_015@
MSGMERGE = @MSGMERGE@
+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@
NEXT_AS_FIRST_DIRECTIVE_FCNTL_H = @NEXT_AS_FIRST_DIRECTIVE_FCNTL_H@
NEXT_AS_FIRST_DIRECTIVE_GETOPT_H = @NEXT_AS_FIRST_DIRECTIVE_GETOPT_H@
+NEXT_AS_FIRST_DIRECTIVE_INTTYPES_H = @NEXT_AS_FIRST_DIRECTIVE_INTTYPES_H@
NEXT_AS_FIRST_DIRECTIVE_LANGINFO_H = @NEXT_AS_FIRST_DIRECTIVE_LANGINFO_H@
+NEXT_AS_FIRST_DIRECTIVE_LIMITS_H = @NEXT_AS_FIRST_DIRECTIVE_LIMITS_H@
NEXT_AS_FIRST_DIRECTIVE_LOCALE_H = @NEXT_AS_FIRST_DIRECTIVE_LOCALE_H@
NEXT_AS_FIRST_DIRECTIVE_SELINUX_SELINUX_H = @NEXT_AS_FIRST_DIRECTIVE_SELINUX_SELINUX_H@
NEXT_AS_FIRST_DIRECTIVE_STDARG_H = @NEXT_AS_FIRST_DIRECTIVE_STDARG_H@
@@ -728,10 +1495,14 @@ 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@
NEXT_AS_FIRST_DIRECTIVE_WCTYPE_H = @NEXT_AS_FIRST_DIRECTIVE_WCTYPE_H@
+NEXT_CTYPE_H = @NEXT_CTYPE_H@
+NEXT_DIRENT_H = @NEXT_DIRENT_H@
NEXT_ERRNO_H = @NEXT_ERRNO_H@
NEXT_FCNTL_H = @NEXT_FCNTL_H@
NEXT_GETOPT_H = @NEXT_GETOPT_H@
+NEXT_INTTYPES_H = @NEXT_INTTYPES_H@
NEXT_LANGINFO_H = @NEXT_LANGINFO_H@
+NEXT_LIMITS_H = @NEXT_LIMITS_H@
NEXT_LOCALE_H = @NEXT_LOCALE_H@
NEXT_SELINUX_SELINUX_H = @NEXT_SELINUX_SELINUX_H@
NEXT_STDARG_H = @NEXT_STDARG_H@
@@ -759,6 +1530,8 @@ PATH_SEPARATOR = @PATH_SEPARATOR@
POSUB = @POSUB@
PRAGMA_COLUMNS = @PRAGMA_COLUMNS@
PRAGMA_SYSTEM_HEADER = @PRAGMA_SYSTEM_HEADER@
+PRIPTR_PREFIX = @PRIPTR_PREFIX@
+PRI_MACROS_BROKEN = @PRI_MACROS_BROKEN@
PTHREAD_H_DEFINES_STRUCT_TIMESPEC = @PTHREAD_H_DEFINES_STRUCT_TIMESPEC@
PTRDIFF_T_SUFFIX = @PTRDIFF_T_SUFFIX@
RANLIB = @RANLIB@
@@ -767,6 +1540,8 @@ REPLACE_CALLOC = @REPLACE_CALLOC@
REPLACE_CANONICALIZE_FILE_NAME = @REPLACE_CANONICALIZE_FILE_NAME@
REPLACE_CHOWN = @REPLACE_CHOWN@
REPLACE_CLOSE = @REPLACE_CLOSE@
+REPLACE_CLOSEDIR = @REPLACE_CLOSEDIR@
+REPLACE_DIRFD = @REPLACE_DIRFD@
REPLACE_DPRINTF = @REPLACE_DPRINTF@
REPLACE_DUP = @REPLACE_DUP@
REPLACE_DUP2 = @REPLACE_DUP2@
@@ -775,6 +1550,7 @@ REPLACE_FCHOWNAT = @REPLACE_FCHOWNAT@
REPLACE_FCLOSE = @REPLACE_FCLOSE@
REPLACE_FCNTL = @REPLACE_FCNTL@
REPLACE_FDOPEN = @REPLACE_FDOPEN@
+REPLACE_FDOPENDIR = @REPLACE_FDOPENDIR@
REPLACE_FFLUSH = @REPLACE_FFLUSH@
REPLACE_FOPEN = @REPLACE_FOPEN@
REPLACE_FPRINTF = @REPLACE_FPRINTF@
@@ -791,11 +1567,13 @@ REPLACE_FUTIMENS = @REPLACE_FUTIMENS@
REPLACE_GETCWD = @REPLACE_GETCWD@
REPLACE_GETDELIM = @REPLACE_GETDELIM@
REPLACE_GETDOMAINNAME = @REPLACE_GETDOMAINNAME@
+REPLACE_GETDTABLESIZE = @REPLACE_GETDTABLESIZE@
REPLACE_GETGROUPS = @REPLACE_GETGROUPS@
REPLACE_GETLINE = @REPLACE_GETLINE@
REPLACE_GETLOGIN_R = @REPLACE_GETLOGIN_R@
REPLACE_GETPAGESIZE = @REPLACE_GETPAGESIZE@
REPLACE_GETTIMEOFDAY = @REPLACE_GETTIMEOFDAY@
+REPLACE_GMTIME = @REPLACE_GMTIME@
REPLACE_ISATTY = @REPLACE_ISATTY@
REPLACE_ISWBLANK = @REPLACE_ISWBLANK@
REPLACE_ISWCNTRL = @REPLACE_ISWCNTRL@
@@ -803,6 +1581,7 @@ REPLACE_LCHOWN = @REPLACE_LCHOWN@
REPLACE_LINK = @REPLACE_LINK@
REPLACE_LINKAT = @REPLACE_LINKAT@
REPLACE_LOCALECONV = @REPLACE_LOCALECONV@
+REPLACE_LOCALTIME = @REPLACE_LOCALTIME@
REPLACE_LOCALTIME_R = @REPLACE_LOCALTIME_R@
REPLACE_LSEEK = @REPLACE_LSEEK@
REPLACE_LSTAT = @REPLACE_LSTAT@
@@ -827,6 +1606,7 @@ REPLACE_NULL = @REPLACE_NULL@
REPLACE_OBSTACK_PRINTF = @REPLACE_OBSTACK_PRINTF@
REPLACE_OPEN = @REPLACE_OPEN@
REPLACE_OPENAT = @REPLACE_OPENAT@
+REPLACE_OPENDIR = @REPLACE_OPENDIR@
REPLACE_PERROR = @REPLACE_PERROR@
REPLACE_POPEN = @REPLACE_POPEN@
REPLACE_PREAD = @REPLACE_PREAD@
@@ -835,9 +1615,11 @@ 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_RANDOM_R = @REPLACE_RANDOM_R@
REPLACE_READ = @REPLACE_READ@
REPLACE_READLINK = @REPLACE_READLINK@
+REPLACE_READLINKAT = @REPLACE_READLINKAT@
REPLACE_REALLOC = @REPLACE_REALLOC@
REPLACE_REALPATH = @REPLACE_REALPATH@
REPLACE_REMOVE = @REPLACE_REMOVE@
@@ -864,10 +1646,13 @@ REPLACE_STRNLEN = @REPLACE_STRNLEN@
REPLACE_STRSIGNAL = @REPLACE_STRSIGNAL@
REPLACE_STRSTR = @REPLACE_STRSTR@
REPLACE_STRTOD = @REPLACE_STRTOD@
+REPLACE_STRTOIMAX = @REPLACE_STRTOIMAX@
REPLACE_STRTOK_R = @REPLACE_STRTOK_R@
+REPLACE_STRTOUMAX = @REPLACE_STRTOUMAX@
REPLACE_STRUCT_LCONV = @REPLACE_STRUCT_LCONV@
REPLACE_STRUCT_TIMEVAL = @REPLACE_STRUCT_TIMEVAL@
REPLACE_SYMLINK = @REPLACE_SYMLINK@
+REPLACE_SYMLINKAT = @REPLACE_SYMLINKAT@
REPLACE_TIMEGM = @REPLACE_TIMEGM@
REPLACE_TMPFILE = @REPLACE_TMPFILE@
REPLACE_TOWLOWER = @REPLACE_TOWLOWER@
@@ -891,12 +1676,13 @@ REPLACE_WCTOB = @REPLACE_WCTOB@
REPLACE_WCTOMB = @REPLACE_WCTOMB@
REPLACE_WCWIDTH = @REPLACE_WCWIDTH@
REPLACE_WRITE = @REPLACE_WRITE@
-SED_FEATURE_VERSION = @SED_FEATURE_VERSION@
+SED = @SED@
SELINUX_CONTEXT_H = @SELINUX_CONTEXT_H@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
SIG_ATOMIC_T_SUFFIX = @SIG_ATOMIC_T_SUFFIX@
SIZE_T_SUFFIX = @SIZE_T_SUFFIX@
+STDALIGN_H = @STDALIGN_H@
STDARG_H = @STDARG_H@
STDBOOL_H = @STDBOOL_H@
STDDEF_H = @STDDEF_H@
@@ -904,13 +1690,18 @@ STDINT_H = @STDINT_H@
STRIP = @STRIP@
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@
+UINT64_MAX_EQ_ULONG_MAX = @UINT64_MAX_EQ_ULONG_MAX@
UNDEFINE_STRTOK_R = @UNDEFINE_STRTOK_R@
+UNISTD_H_DEFINES_STRUCT_TIMESPEC = @UNISTD_H_DEFINES_STRUCT_TIMESPEC@
UNISTD_H_HAVE_WINSOCK2_H = @UNISTD_H_HAVE_WINSOCK2_H@
UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS = @UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS@
USE_ACL = @USE_ACL@
USE_NLS = @USE_NLS@
VERSION = @VERSION@
+WARN_CFLAGS = @WARN_CFLAGS@
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@
WINT_T_SUFFIX = @WINT_T_SUFFIX@
@@ -918,13 +1709,14 @@ XFAIL_TESTS = @XFAIL_TESTS@
XGETTEXT = @XGETTEXT@
XGETTEXT_015 = @XGETTEXT_015@
XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@
+abs_aux_dir = @abs_aux_dir@
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@
@@ -957,7 +1749,7 @@ install_sh = @install_sh@
libdir = @libdir@
libexecdir = @libexecdir@
lispdir = @lispdir@
-localedir = @localedir@
+localedir = $(datadir)/locale
localstatedir = @localstatedir@
mandir = @mandir@
mkdir_p = @mkdir_p@
@@ -966,6 +1758,7 @@ pdfdir = @pdfdir@
prefix = @prefix@
program_transform_name = @program_transform_name@
psdir = @psdir@
+runstatedir = @runstatedir@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
srcdir = @srcdir@
@@ -974,47 +1767,421 @@ target_alias = @target_alias@
top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
+SUBDIRS = po . gnulib-tests
+
+# This applies to all parts: gnulib, sed, testsuites
+AM_CPPFLAGS = -I$(top_srcdir) \
+ -I$(top_srcdir)/lib \
+ -I$(top_builddir)/lib \
+ -I$(top_builddir)/sed
+
+AM_CFLAGS =
-# Automake requirements
-AUTOMAKE_OPTIONS = gnits 1.10 dist-bzip2
-ACLOCAL_AMFLAGS = -I m4
-SUBDIRS = lib po sed doc testsuite
+# 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) \
+ $(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_DIST = BUGS THANKS.in COPYING.DOC .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 lib/alignof.h lib/alloca.c lib/alloca.in.h \
+ $(top_srcdir)/build-aux/announce-gen lib/btowc.c \
+ lib/c-strcaseeq.h lib/canonicalize-lgpl.c lib/close-stream.h \
+ lib/closeout.h lib/ctype.in.h lib/dfa.h lib/localeinfo.h \
+ 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 \
+ $(top_srcdir)/build-aux/gitlog-to-changelog \
+ $(top_srcdir)/build-aux/gnu-web-doc-update \
+ $(top_srcdir)/GNUmakefile $(top_srcdir)/build-aux/gnupload \
+ lib/hard-locale.h $(top_srcdir)/build-aux/config.rpath \
+ 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 \
+ $(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/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 \
+ lib/string.in.h lib/strverscmp.c lib/sys_stat.in.h \
+ lib/sys_time.in.h lib/sys_types.in.h lib/tempname.h \
+ $(top_srcdir)/build-aux/config.rpath lib/time.in.h \
+ lib/unistd.in.h lib/unlocked-io.h \
+ $(top_srcdir)/build-aux/update-copyright \
+ $(top_srcdir)/build-aux/useless-if-before-free \
+ $(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 \
+ 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
+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
+SUFFIXES =
+noinst_LIBRARIES = lib/libsed.a sed/libver.a
noinst_DATA =
-noinst_HEADERS = basicdefs.h
-EXTRA_DIST = BUGS THANKS COPYING.DOC \
- bootstrap bootstrap.conf build-aux/texi2dvi build-aux/help2man
+noinst_HEADERS = basicdefs.h sed/sed.h sed/utils.h \
+ testsuite/testcases.h testsuite/ptestcases.h
+DISTCLEANFILES = sed/version.c sed/version.h
+gen_start_date = 2014-09-06
+# Sort in traditional ASCII order, regardless of the current locale;
+# otherwise we may get into trouble with distinct strings that the
+# current locale considers to be equal.
+ASSORT = LC_ALL=C sort
+
+# Extract all lines up to the first one starting with "##".
+prologue = perl -ne '/^\#\#/ and exit; print' $(srcdir)/THANKS.in
DISTCHECK_CONFIGURE_FLAGS = XGETTEXT='$(SHELL) -c : dummy' $(EXTRA_DC_FLAGS)
EXTRA_DC_FLAGS =
-all: config.h
+lib_libsed_a_SOURCES = lib/copy-acl.c lib/set-acl.c \
+ lib/acl-errno-valid.c lib/acl-internal.c lib/get-permissions.c \
+ lib/set-permissions.c lib/c-ctype.h lib/c-ctype.c \
+ lib/c-strcase.h lib/c-strcasecmp.c lib/c-strncasecmp.c \
+ lib/close-stream.c lib/closeout.c lib/dfa.c lib/localeinfo.c \
+ lib/dirname-lgpl.c lib/basename-lgpl.c lib/stripslash.c \
+ lib/exitfail.c lib/getprogname.h lib/getprogname.c \
+ lib/gettext.h lib/hard-locale.c lib/localcharset.h \
+ lib/localcharset.c lib/glthread/lock.h lib/glthread/lock.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_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/strerror-override.c lib/strverscmp.c lib/wcrtomb.c \
+ lib/wctob.c lib/wctomb.c
+
+# Use this preprocessor expression to decide whether #include_next works.
+# Do not rely on a 'configure'-time test for this, since the expression
+# might appear in an installed header, which is used by some other compiler.
+HAVE_INCLUDE_NEXT = lib/(__GNUC__ lib/|| lib/60000000 lib/<= lib/__DECC_VER)
+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
+# 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
+sed_sed_SOURCES = \
+ sed/compile.c \
+ sed/execute.c \
+ sed/mbcs.c \
+ sed/regexp.c \
+ sed/sed.c \
+ sed/utils.c
+
+sed_sed_CPPFLAGS = $(AM_CPPFLAGS) -DLOCALEDIR=\"$(localedir)\"
+sed_sed_CFLAGS = $(AM_CFLAGS) $(WARN_CFLAGS) $(WERROR_CFLAGS)
+sed_sed_LDADD = sed/libver.a lib/libsed.a $(INTLLIBS) $(LIB_ACL) $(LIB_SELINUX)
+sed_sed_DEPENDENCIES = lib/libsed.a sed/libver.a
+nodist_sed_libver_a_SOURCES = sed/version.c sed/version.h
+info_TEXINFOS = doc/sed.texi
+doc_sed_TEXINFOS = doc/config.texi doc/version.texi doc/fdl.texi
+dist_man_MANS = doc/sed.1
+dist_noinst_DATA = doc/sed.x
+HELP2MAN = $(top_srcdir)/build-aux/help2man
+SEDBIN = sed/sed
+AM_MAKEINFOHTMLFLAGS = --no-split
+TEST_EXTENSIONS = .sh
+SH_LOG_COMPILER = $(SHELL)
+
+# 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 \
+ 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/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/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-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/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
+testsuite_get_mb_cur_max_LDADD = lib/libsed.a $(INTLLIBS)
+testsuite_test_mbrtowc_LDADD = lib/libsed.a $(INTLLIBS)
+
+# 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
+# variables to test scripts.
+TESTS_ENVIRONMENT = \
+ tmp__=$${TMPDIR-/tmp}; \
+ test -d "$$tmp__" && test -w "$$tmp__" || tmp__=.; \
+ . $(srcdir)/testsuite/envvar-check; \
+ TMPDIR=$$tmp__; export TMPDIR; \
+ \
+ if test -n "$$BASH_VERSION" || (eval "export v=x") 2>/dev/null; then \
+ export_with_values () { export "$$@"; }; \
+ else \
+ export_with_values () \
+ { \
+ sed_extract_var='s/=.*//'; \
+ sed_quote_value="s/'/'\\\\''/g;s/=\\(.*\\)/='\\1'/";\
+ for arg in "$$@"; do \
+ var=`echo "$$arg" | sed "$$sed_extract_var"`; \
+ arg=`echo "$$arg" | sed "$$sed_quote_value"`; \
+ eval "$$arg"; \
+ export "$$var"; \
+ done; \
+ }; \
+ fi; \
+ \
+ export_with_values \
+ VERSION='$(VERSION)' \
+ LOCALE_FR='$(LOCALE_FR)' \
+ LOCALE_FR_UTF8='$(LOCALE_FR_UTF8)' \
+ LOCALE_JA='$(LOCALE_JA)' \
+ AWK=$(AWK) \
+ LC_ALL=C \
+ abs_top_builddir='$(abs_top_builddir)' \
+ abs_top_srcdir='$(abs_top_srcdir)' \
+ abs_srcdir='$(abs_srcdir)' \
+ built_programs=sed; \
+ srcdir='$(srcdir)' \
+ top_srcdir='$(top_srcdir)' \
+ CC='$(CC)' \
+ SED_TEST_NAME=`echo $$tst|sed 's,^\./,,;s,/,-,g'` \
+ MAKE=$(MAKE) \
+ MALLOC_PERTURB_=$(MALLOC_PERTURB_) \
+ PACKAGE_BUGREPORT='$(PACKAGE_BUGREPORT)' \
+ PACKAGE_VERSION=$(PACKAGE_VERSION) \
+ PERL='$(PERL)' \
+ SHELL='$(SHELL)' \
+ PATH='$(abs_top_builddir)/src$(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
am--refresh: Makefile
@:
-$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
+$(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)
@for dep in $?; do \
case '$(am__configure_deps)' in \
*$$dep*) \
- echo ' cd $(srcdir) && $(AUTOMAKE) --gnits'; \
- $(am__cd) $(srcdir) && $(AUTOMAKE) --gnits \
+ echo ' cd $(srcdir) && $(AUTOMAKE) --gnu'; \
+ $(am__cd) $(srcdir) && $(AUTOMAKE) --gnu \
&& exit 0; \
exit 1;; \
esac; \
done; \
- echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnits Makefile'; \
+ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu Makefile'; \
$(am__cd) $(top_srcdir) && \
- $(AUTOMAKE) --gnits Makefile
-.PRECIOUS: Makefile
+ $(AUTOMAKE) --gnu Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
@case '$?' in \
*config.status*) \
echo ' $(SHELL) ./config.status'; \
$(SHELL) ./config.status;; \
*) \
- echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \
- cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \
+ echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__maybe_remake_depfiles)'; \
+ cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__maybe_remake_depfiles);; \
esac;
+$(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__empty):
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
$(SHELL) ./config.status --recheck
@@ -1026,8 +2193,8 @@ $(ACLOCAL_M4): $(am__aclocal_m4_deps)
$(am__aclocal_m4_deps):
config.h: stamp-h1
- @if test ! -f $@; then rm -f stamp-h1; else :; fi
- @if test ! -f $@; then $(MAKE) $(AM_MAKEFLAGS) stamp-h1; else :; fi
+ @test -f $@ || rm -f stamp-h1
+ @test -f $@ || $(MAKE) $(AM_MAKEFLAGS) stamp-h1
stamp-h1: $(srcdir)/config_h.in $(top_builddir)/config.status
@rm -f stamp-h1
@@ -1040,20 +2207,826 @@ $(srcdir)/config_h.in: $(am__configure_deps)
distclean-hdr:
-rm -f config.h stamp-h1
+clean-noinstLIBRARIES:
+ -test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES)
+lib/$(am__dirstamp):
+ @$(MKDIR_P) lib
+ @: > lib/$(am__dirstamp)
+lib/$(DEPDIR)/$(am__dirstamp):
+ @$(MKDIR_P) lib/$(DEPDIR)
+ @: > lib/$(DEPDIR)/$(am__dirstamp)
+lib/copy-acl.$(OBJEXT): lib/$(am__dirstamp) \
+ lib/$(DEPDIR)/$(am__dirstamp)
+lib/set-acl.$(OBJEXT): lib/$(am__dirstamp) \
+ lib/$(DEPDIR)/$(am__dirstamp)
+lib/acl-errno-valid.$(OBJEXT): lib/$(am__dirstamp) \
+ lib/$(DEPDIR)/$(am__dirstamp)
+lib/acl-internal.$(OBJEXT): lib/$(am__dirstamp) \
+ lib/$(DEPDIR)/$(am__dirstamp)
+lib/get-permissions.$(OBJEXT): lib/$(am__dirstamp) \
+ lib/$(DEPDIR)/$(am__dirstamp)
+lib/set-permissions.$(OBJEXT): lib/$(am__dirstamp) \
+ lib/$(DEPDIR)/$(am__dirstamp)
+lib/c-ctype.$(OBJEXT): lib/$(am__dirstamp) \
+ lib/$(DEPDIR)/$(am__dirstamp)
+lib/c-strcasecmp.$(OBJEXT): lib/$(am__dirstamp) \
+ lib/$(DEPDIR)/$(am__dirstamp)
+lib/c-strncasecmp.$(OBJEXT): lib/$(am__dirstamp) \
+ lib/$(DEPDIR)/$(am__dirstamp)
+lib/close-stream.$(OBJEXT): lib/$(am__dirstamp) \
+ lib/$(DEPDIR)/$(am__dirstamp)
+lib/closeout.$(OBJEXT): lib/$(am__dirstamp) \
+ lib/$(DEPDIR)/$(am__dirstamp)
+lib/dfa.$(OBJEXT): lib/$(am__dirstamp) lib/$(DEPDIR)/$(am__dirstamp)
+lib/localeinfo.$(OBJEXT): lib/$(am__dirstamp) \
+ lib/$(DEPDIR)/$(am__dirstamp)
+lib/dirname-lgpl.$(OBJEXT): lib/$(am__dirstamp) \
+ lib/$(DEPDIR)/$(am__dirstamp)
+lib/basename-lgpl.$(OBJEXT): lib/$(am__dirstamp) \
+ lib/$(DEPDIR)/$(am__dirstamp)
+lib/stripslash.$(OBJEXT): lib/$(am__dirstamp) \
+ lib/$(DEPDIR)/$(am__dirstamp)
+lib/exitfail.$(OBJEXT): lib/$(am__dirstamp) \
+ lib/$(DEPDIR)/$(am__dirstamp)
+lib/getprogname.$(OBJEXT): lib/$(am__dirstamp) \
+ lib/$(DEPDIR)/$(am__dirstamp)
+lib/hard-locale.$(OBJEXT): lib/$(am__dirstamp) \
+ lib/$(DEPDIR)/$(am__dirstamp)
+lib/localcharset.$(OBJEXT): lib/$(am__dirstamp) \
+ lib/$(DEPDIR)/$(am__dirstamp)
+lib/glthread/$(am__dirstamp):
+ @$(MKDIR_P) lib/glthread
+ @: > lib/glthread/$(am__dirstamp)
+lib/glthread/$(DEPDIR)/$(am__dirstamp):
+ @$(MKDIR_P) lib/glthread/$(DEPDIR)
+ @: > lib/glthread/$(DEPDIR)/$(am__dirstamp)
+lib/glthread/lock.$(OBJEXT): lib/glthread/$(am__dirstamp) \
+ lib/glthread/$(DEPDIR)/$(am__dirstamp)
+lib/malloca.$(OBJEXT): lib/$(am__dirstamp) \
+ lib/$(DEPDIR)/$(am__dirstamp)
+lib/progname.$(OBJEXT): lib/$(am__dirstamp) \
+ lib/$(DEPDIR)/$(am__dirstamp)
+lib/qcopy-acl.$(OBJEXT): lib/$(am__dirstamp) \
+ lib/$(DEPDIR)/$(am__dirstamp)
+lib/qset-acl.$(OBJEXT): lib/$(am__dirstamp) \
+ lib/$(DEPDIR)/$(am__dirstamp)
+lib/quotearg.$(OBJEXT): lib/$(am__dirstamp) \
+ lib/$(DEPDIR)/$(am__dirstamp)
+lib/se-context.$(OBJEXT): lib/$(am__dirstamp) \
+ lib/$(DEPDIR)/$(am__dirstamp)
+lib/se-selinux.$(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) \
+ lib/glthread/$(DEPDIR)/$(am__dirstamp)
+lib/unistd.$(OBJEXT): lib/$(am__dirstamp) \
+ lib/$(DEPDIR)/$(am__dirstamp)
+lib/version-etc.$(OBJEXT): lib/$(am__dirstamp) \
+ lib/$(DEPDIR)/$(am__dirstamp)
+lib/version-etc-fsf.$(OBJEXT): lib/$(am__dirstamp) \
+ lib/$(DEPDIR)/$(am__dirstamp)
+lib/wctype-h.$(OBJEXT): lib/$(am__dirstamp) \
+ lib/$(DEPDIR)/$(am__dirstamp)
+lib/xmalloc.$(OBJEXT): lib/$(am__dirstamp) \
+ lib/$(DEPDIR)/$(am__dirstamp)
+lib/xalloc-die.$(OBJEXT): lib/$(am__dirstamp) \
+ lib/$(DEPDIR)/$(am__dirstamp)
+lib/acl_entries.$(OBJEXT): lib/$(am__dirstamp) \
+ lib/$(DEPDIR)/$(am__dirstamp)
+lib/alloca.$(OBJEXT): lib/$(am__dirstamp) \
+ lib/$(DEPDIR)/$(am__dirstamp)
+lib/btowc.$(OBJEXT): lib/$(am__dirstamp) lib/$(DEPDIR)/$(am__dirstamp)
+lib/canonicalize-lgpl.$(OBJEXT): lib/$(am__dirstamp) \
+ lib/$(DEPDIR)/$(am__dirstamp)
+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/fwriting.$(OBJEXT): lib/$(am__dirstamp) \
+ lib/$(DEPDIR)/$(am__dirstamp)
+lib/getdelim.$(OBJEXT): lib/$(am__dirstamp) \
+ lib/$(DEPDIR)/$(am__dirstamp)
+lib/getopt.$(OBJEXT): lib/$(am__dirstamp) \
+ lib/$(DEPDIR)/$(am__dirstamp)
+lib/getopt1.$(OBJEXT): lib/$(am__dirstamp) \
+ lib/$(DEPDIR)/$(am__dirstamp)
+lib/gettimeofday.$(OBJEXT): lib/$(am__dirstamp) \
+ lib/$(DEPDIR)/$(am__dirstamp)
+lib/isblank.$(OBJEXT): lib/$(am__dirstamp) \
+ lib/$(DEPDIR)/$(am__dirstamp)
+lib/localeconv.$(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)
+lib/mbrlen.$(OBJEXT): lib/$(am__dirstamp) \
+ lib/$(DEPDIR)/$(am__dirstamp)
+lib/mbrtowc.$(OBJEXT): lib/$(am__dirstamp) \
+ lib/$(DEPDIR)/$(am__dirstamp)
+lib/mbsinit.$(OBJEXT): lib/$(am__dirstamp) \
+ lib/$(DEPDIR)/$(am__dirstamp)
+lib/mbtowc.$(OBJEXT): lib/$(am__dirstamp) \
+ lib/$(DEPDIR)/$(am__dirstamp)
+lib/memchr.$(OBJEXT): lib/$(am__dirstamp) \
+ lib/$(DEPDIR)/$(am__dirstamp)
+lib/memrchr.$(OBJEXT): lib/$(am__dirstamp) \
+ lib/$(DEPDIR)/$(am__dirstamp)
+lib/mkostemp.$(OBJEXT): lib/$(am__dirstamp) \
+ lib/$(DEPDIR)/$(am__dirstamp)
+lib/msvc-inval.$(OBJEXT): lib/$(am__dirstamp) \
+ lib/$(DEPDIR)/$(am__dirstamp)
+lib/msvc-nothrow.$(OBJEXT): lib/$(am__dirstamp) \
+ lib/$(DEPDIR)/$(am__dirstamp)
+lib/nl_langinfo.$(OBJEXT): lib/$(am__dirstamp) \
+ lib/$(DEPDIR)/$(am__dirstamp)
+lib/obstack.$(OBJEXT): lib/$(am__dirstamp) \
+ lib/$(DEPDIR)/$(am__dirstamp)
+lib/readlink.$(OBJEXT): lib/$(am__dirstamp) \
+ lib/$(DEPDIR)/$(am__dirstamp)
+lib/regcomp.$(OBJEXT): lib/$(am__dirstamp) \
+ lib/$(DEPDIR)/$(am__dirstamp)
+lib/regex.$(OBJEXT): lib/$(am__dirstamp) lib/$(DEPDIR)/$(am__dirstamp)
+lib/regex_internal.$(OBJEXT): lib/$(am__dirstamp) \
+ lib/$(DEPDIR)/$(am__dirstamp)
+lib/regexec.$(OBJEXT): lib/$(am__dirstamp) \
+ lib/$(DEPDIR)/$(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)
+lib/strerror.$(OBJEXT): lib/$(am__dirstamp) \
+ lib/$(DEPDIR)/$(am__dirstamp)
+lib/strerror-override.$(OBJEXT): lib/$(am__dirstamp) \
+ lib/$(DEPDIR)/$(am__dirstamp)
+lib/strverscmp.$(OBJEXT): lib/$(am__dirstamp) \
+ lib/$(DEPDIR)/$(am__dirstamp)
+lib/wcrtomb.$(OBJEXT): lib/$(am__dirstamp) \
+ lib/$(DEPDIR)/$(am__dirstamp)
+lib/wctob.$(OBJEXT): lib/$(am__dirstamp) lib/$(DEPDIR)/$(am__dirstamp)
+lib/wctomb.$(OBJEXT): lib/$(am__dirstamp) \
+ lib/$(DEPDIR)/$(am__dirstamp)
+
+lib/libsed.a: $(lib_libsed_a_OBJECTS) $(lib_libsed_a_DEPENDENCIES) $(EXTRA_lib_libsed_a_DEPENDENCIES) lib/$(am__dirstamp)
+ $(AM_V_at)-rm -f lib/libsed.a
+ $(AM_V_AR)$(lib_libsed_a_AR) lib/libsed.a $(lib_libsed_a_OBJECTS) $(lib_libsed_a_LIBADD)
+ $(AM_V_at)$(RANLIB) lib/libsed.a
+sed/$(am__dirstamp):
+ @$(MKDIR_P) sed
+ @: > sed/$(am__dirstamp)
+sed/$(DEPDIR)/$(am__dirstamp):
+ @$(MKDIR_P) sed/$(DEPDIR)
+ @: > sed/$(DEPDIR)/$(am__dirstamp)
+sed/version.$(OBJEXT): sed/$(am__dirstamp) \
+ sed/$(DEPDIR)/$(am__dirstamp)
+
+sed/libver.a: $(sed_libver_a_OBJECTS) $(sed_libver_a_DEPENDENCIES) $(EXTRA_sed_libver_a_DEPENDENCIES) sed/$(am__dirstamp)
+ $(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/$(DEPDIR)/$(am__dirstamp)
+sed/sed_sed-execute.$(OBJEXT): sed/$(am__dirstamp) \
+ sed/$(DEPDIR)/$(am__dirstamp)
+sed/sed_sed-mbcs.$(OBJEXT): sed/$(am__dirstamp) \
+ sed/$(DEPDIR)/$(am__dirstamp)
+sed/sed_sed-regexp.$(OBJEXT): sed/$(am__dirstamp) \
+ sed/$(DEPDIR)/$(am__dirstamp)
+sed/sed_sed-sed.$(OBJEXT): sed/$(am__dirstamp) \
+ sed/$(DEPDIR)/$(am__dirstamp)
+sed/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)
+ @rm -f sed/sed$(EXEEXT)
+ $(AM_V_CCLD)$(sed_sed_LINK) $(sed_sed_OBJECTS) $(sed_sed_LDADD) $(LIBS)
+testsuite/$(am__dirstamp):
+ @$(MKDIR_P) testsuite
+ @: > 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)
+ -rm -f lib/*.$(OBJEXT)
+ -rm -f lib/glthread/*.$(OBJEXT)
+ -rm -f sed/*.$(OBJEXT)
+ -rm -f testsuite/*.$(OBJEXT)
+
+distclean-compile:
+ -rm -f *.tab.c
+
+@AMDEP_TRUE@@am__include@ @am__quote@lib/$(DEPDIR)/acl-errno-valid.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@lib/$(DEPDIR)/acl-internal.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@lib/$(DEPDIR)/acl_entries.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@lib/$(DEPDIR)/alloca.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@lib/$(DEPDIR)/basename-lgpl.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@lib/$(DEPDIR)/btowc.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@lib/$(DEPDIR)/c-ctype.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@lib/$(DEPDIR)/c-strcasecmp.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@lib/$(DEPDIR)/c-strncasecmp.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@lib/$(DEPDIR)/canonicalize-lgpl.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@lib/$(DEPDIR)/close-stream.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@lib/$(DEPDIR)/closeout.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@lib/$(DEPDIR)/copy-acl.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@lib/$(DEPDIR)/dfa.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@lib/$(DEPDIR)/dirname-lgpl.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@lib/$(DEPDIR)/error.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@lib/$(DEPDIR)/exitfail.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@lib/$(DEPDIR)/fpending.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@lib/$(DEPDIR)/fstat.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@lib/$(DEPDIR)/fwriting.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@lib/$(DEPDIR)/get-permissions.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@lib/$(DEPDIR)/getdelim.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@lib/$(DEPDIR)/getfilecon.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@lib/$(DEPDIR)/getopt.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@lib/$(DEPDIR)/getopt1.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@lib/$(DEPDIR)/getprogname.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@lib/$(DEPDIR)/gettimeofday.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@lib/$(DEPDIR)/hard-locale.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@lib/$(DEPDIR)/isblank.Po@am__quote@ # am--include-marker
+@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)/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
+@AMDEP_TRUE@@am__include@ @am__quote@lib/$(DEPDIR)/mbrlen.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@lib/$(DEPDIR)/mbrtowc.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@lib/$(DEPDIR)/mbsinit.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@lib/$(DEPDIR)/mbtowc.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@lib/$(DEPDIR)/memchr.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@lib/$(DEPDIR)/memrchr.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@lib/$(DEPDIR)/mkostemp.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@lib/$(DEPDIR)/msvc-inval.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@lib/$(DEPDIR)/msvc-nothrow.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@lib/$(DEPDIR)/nl_langinfo.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@lib/$(DEPDIR)/obstack.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@lib/$(DEPDIR)/progname.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@lib/$(DEPDIR)/qcopy-acl.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@lib/$(DEPDIR)/qset-acl.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@lib/$(DEPDIR)/quotearg.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@lib/$(DEPDIR)/readlink.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@lib/$(DEPDIR)/regcomp.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@lib/$(DEPDIR)/regex.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@lib/$(DEPDIR)/regex_internal.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@lib/$(DEPDIR)/regexec.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@lib/$(DEPDIR)/rename.Po@am__quote@ # am--include-marker
+@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.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
+@AMDEP_TRUE@@am__include@ @am__quote@lib/$(DEPDIR)/stripslash.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@lib/$(DEPDIR)/strverscmp.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@lib/$(DEPDIR)/tempname.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@lib/$(DEPDIR)/unistd.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@lib/$(DEPDIR)/version-etc-fsf.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@lib/$(DEPDIR)/version-etc.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@lib/$(DEPDIR)/wcrtomb.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@lib/$(DEPDIR)/wctob.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@lib/$(DEPDIR)/wctomb.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@lib/$(DEPDIR)/wctype-h.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@lib/$(DEPDIR)/xalloc-die.Po@am__quote@ # am--include-marker
+@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)/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)
+ @echo '# dummy' >$@-t && $(am__mv) $@-t $@
+
+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
+@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 $@ $<
+
+.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
+@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@
+@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@
+@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@
+@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@
+@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@
+@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@
+@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@
+@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@
+@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@
+@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@
+@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@
+@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@
+@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)
+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 $@
+
+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" \
+ MAKEINFO='$(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) -I doc -I $(srcdir)/doc' \
+ $(TEXI2DVI) $(AM_V_texinfo) --build-dir=$(@:.dvi=.t2d) -o $@ $(AM_V_texidevnull) \
+ `test -f 'doc/sed.texi' || echo '$(srcdir)/'`doc/sed.texi
+
+doc/sed.pdf: doc/sed.texi $(srcdir)/doc/version.texi $(doc_sed_TEXINFOS) doc/$(am__dirstamp)
+ $(AM_V_TEXI2PDF)TEXINPUTS="$(am__TEXINFO_TEX_DIR)$(PATH_SEPARATOR)$$TEXINPUTS" \
+ MAKEINFO='$(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) -I doc -I $(srcdir)/doc' \
+ $(TEXI2PDF) $(AM_V_texinfo) --build-dir=$(@:.pdf=.t2p) -o $@ $(AM_V_texidevnull) \
+ `test -f 'doc/sed.texi' || echo '$(srcdir)/'`doc/sed.texi
+
+doc/sed.html: doc/sed.texi $(srcdir)/doc/version.texi $(doc_sed_TEXINFOS) doc/$(am__dirstamp)
+ $(AM_V_MAKEINFO)rm -rf $(@:.html=.htp)
+ $(AM_V_at)if $(MAKEINFOHTML) $(AM_MAKEINFOHTMLFLAGS) $(MAKEINFOFLAGS) -I doc -I $(srcdir)/doc \
+ -o $(@:.html=.htp) `test -f 'doc/sed.texi' || echo '$(srcdir)/'`doc/sed.texi; \
+ then \
+ rm -rf $@ && mv $(@:.html=.htp) $@; \
+ else \
+ rm -rf $(@:.html=.htp); exit 1; \
+ fi
+$(srcdir)/doc/version.texi: $(srcdir)/doc/stamp-vti
+$(srcdir)/doc/stamp-vti: doc/sed.texi $(top_srcdir)/configure
+ @test -f doc/$(am__dirstamp) || $(MAKE) $(AM_MAKEFLAGS) doc/$(am__dirstamp)
+ @(dir=.; test -f ./doc/sed.texi || dir=$(srcdir); \
+ set `$(SHELL) $(top_srcdir)/build-aux/mdate-sh $$dir/doc/sed.texi`; \
+ echo "@set UPDATED $$1 $$2 $$3"; \
+ echo "@set UPDATED-MONTH $$2 $$3"; \
+ echo "@set EDITION $(VERSION)"; \
+ echo "@set VERSION $(VERSION)") > vti.tmp$$$$ && \
+ (cmp -s vti.tmp$$$$ $(srcdir)/doc/version.texi \
+ || (echo "Updating $(srcdir)/doc/version.texi" && \
+ cp vti.tmp$$$$ $(srcdir)/doc/version.texi.tmp$$$$ && \
+ mv $(srcdir)/doc/version.texi.tmp$$$$ $(srcdir)/doc/version.texi)) && \
+ rm -f vti.tmp$$$$ $(srcdir)/doc/version.texi.$$$$
+ @cp $(srcdir)/doc/version.texi $@
+
+mostlyclean-vti:
+ -rm -f vti.tmp* $(srcdir)/doc/version.texi.tmp*
+
+maintainer-clean-vti:
+ -rm -f $(srcdir)/doc/stamp-vti $(srcdir)/doc/version.texi
+.dvi.ps:
+ $(AM_V_DVIPS)TEXINPUTS="$(am__TEXINFO_TEX_DIR)$(PATH_SEPARATOR)$$TEXINPUTS" \
+ $(DVIPS) $(AM_V_texinfo) -o $@ $<
+
+uninstall-dvi-am:
+ @$(NORMAL_UNINSTALL)
+ @list='$(DVIS)'; test -n "$(dvidir)" || list=; \
+ for p in $$list; do \
+ $(am__strip_dir) \
+ echo " rm -f '$(DESTDIR)$(dvidir)/$$f'"; \
+ rm -f "$(DESTDIR)$(dvidir)/$$f"; \
+ done
+
+uninstall-html-am:
+ @$(NORMAL_UNINSTALL)
+ @list='$(HTMLS)'; test -n "$(htmldir)" || list=; \
+ for p in $$list; do \
+ $(am__strip_dir) \
+ echo " rm -rf '$(DESTDIR)$(htmldir)/$$f'"; \
+ rm -rf "$(DESTDIR)$(htmldir)/$$f"; \
+ done
+
+uninstall-info-am:
+ @$(PRE_UNINSTALL)
+ @if test -d '$(DESTDIR)$(infodir)' && $(am__can_run_installinfo); then \
+ list='$(INFO_DEPS)'; \
+ for file in $$list; do \
+ relfile=`echo "$$file" | sed 's|^.*/||'`; \
+ echo " install-info --info-dir='$(DESTDIR)$(infodir)' --remove '$(DESTDIR)$(infodir)/$$relfile'"; \
+ if install-info --info-dir="$(DESTDIR)$(infodir)" --remove "$(DESTDIR)$(infodir)/$$relfile"; \
+ then :; else test ! -f "$(DESTDIR)$(infodir)/$$relfile" || exit 1; fi; \
+ done; \
+ else :; fi
+ @$(NORMAL_UNINSTALL)
+ @list='$(INFO_DEPS)'; \
+ for file in $$list; do \
+ relfile=`echo "$$file" | sed 's|^.*/||'`; \
+ (if test -d "$(DESTDIR)$(infodir)" && cd "$(DESTDIR)$(infodir)"; then \
+ echo " cd '$(DESTDIR)$(infodir)' && rm -f $$relfile"; \
+ rm -f $$relfile; \
+ else :; fi); \
+ done
+
+uninstall-pdf-am:
+ @$(NORMAL_UNINSTALL)
+ @list='$(PDFS)'; test -n "$(pdfdir)" || list=; \
+ for p in $$list; do \
+ $(am__strip_dir) \
+ echo " rm -f '$(DESTDIR)$(pdfdir)/$$f'"; \
+ rm -f "$(DESTDIR)$(pdfdir)/$$f"; \
+ done
+
+uninstall-ps-am:
+ @$(NORMAL_UNINSTALL)
+ @list='$(PSS)'; test -n "$(psdir)" || list=; \
+ for p in $$list; do \
+ $(am__strip_dir) \
+ echo " rm -f '$(DESTDIR)$(psdir)/$$f'"; \
+ rm -f "$(DESTDIR)$(psdir)/$$f"; \
+ done
+
+dist-info: $(INFO_DEPS)
+ @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
+ list='$(INFO_DEPS)'; \
+ for base in $$list; do \
+ 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; \
+ done
+
+mostlyclean-aminfo:
+ -rm -rf doc/sed.t2d doc/sed.t2p
+
+clean-aminfo:
+ -test -z "doc/sed.dvi doc/sed.pdf doc/sed.ps doc/sed.html" \
+ || 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)
+install-man1: $(dist_man_MANS)
+ @$(NORMAL_INSTALL)
+ @list1=''; \
+ list2='$(dist_man_MANS)'; \
+ test -n "$(man1dir)" \
+ && test -n "`echo $$list1$$list2`" \
+ || exit 0; \
+ echo " $(MKDIR_P) '$(DESTDIR)$(man1dir)'"; \
+ $(MKDIR_P) "$(DESTDIR)$(man1dir)" || exit 1; \
+ { for i in $$list1; do echo "$$i"; done; \
+ if test -n "$$list2"; then \
+ for i in $$list2; do echo "$$i"; done \
+ | sed -n '/\.1[a-z]*$$/p'; \
+ fi; \
+ } | while read p; do \
+ if test -f $$p; then d=; else d="$(srcdir)/"; fi; \
+ echo "$$d$$p"; echo "$$p"; \
+ done | \
+ sed -e 'n;s,.*/,,;p;h;s,.*\.,,;s,^[^1][0-9a-z]*$$,1,;x' \
+ -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,' | \
+ sed 'N;N;s,\n, ,g' | { \
+ list=; while read file base inst; do \
+ if test "$$base" = "$$inst"; then list="$$list $$file"; else \
+ echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man1dir)/$$inst'"; \
+ $(INSTALL_DATA) "$$file" "$(DESTDIR)$(man1dir)/$$inst" || exit $$?; \
+ fi; \
+ done; \
+ for i in $$list; do echo "$$i"; done | $(am__base_list) | \
+ while read files; do \
+ test -z "$$files" || { \
+ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(man1dir)'"; \
+ $(INSTALL_DATA) $$files "$(DESTDIR)$(man1dir)" || exit $$?; }; \
+ done; }
+
+uninstall-man1:
+ @$(NORMAL_UNINSTALL)
+ @list=''; test -n "$(man1dir)" || exit 0; \
+ files=`{ for i in $$list; do echo "$$i"; done; \
+ l2='$(dist_man_MANS)'; for i in $$l2; do echo "$$i"; done | \
+ sed -n '/\.1[a-z]*$$/p'; \
+ } | sed -e 's,.*/,,;h;s,.*\.,,;s,^[^1][0-9a-z]*$$,1,;x' \
+ -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,'`; \
+ dir='$(DESTDIR)$(man1dir)'; $(am__uninstall_files_from_dir)
+
# This directory's subdirectories are mostly independent; you can cd
# into them and run 'make' without going through this Makefile.
# To change the values of 'make' variables: instead of editing Makefiles,
# (1) if the variable is set in 'config.status', edit 'config.status'
# (which will cause the Makefiles to be regenerated when you run 'make');
# (2) otherwise, pass the desired values on the 'make' command line.
-$(RECURSIVE_TARGETS) $(RECURSIVE_CLEAN_TARGETS):
- @fail= failcom='exit 1'; \
- for f in x $$MAKEFLAGS; do \
- case $$f in \
- *=* | --[!k]*);; \
- *k*) failcom='fail=yes';; \
- esac; \
- done; \
+$(am__recursive_targets):
+ @fail=; \
+ if $(am__make_keepgoing); then \
+ failcom='fail=yes'; \
+ else \
+ failcom='exit 1'; \
+ fi; \
dot_seen=no; \
target=`echo $@ | sed s/-recursive//`; \
case "$@" in \
@@ -1074,31 +3047,13 @@ $(RECURSIVE_TARGETS) $(RECURSIVE_CLEAN_TARGETS):
if test "$$dot_seen" = "no"; then \
$(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
fi; test -z "$$fail"
-tags-recursive:
- list='$(SUBDIRS)'; for subdir in $$list; do \
- test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \
- done
-ctags-recursive:
- list='$(SUBDIRS)'; for subdir in $$list; do \
- test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \
- done
-cscopelist-recursive:
- list='$(SUBDIRS)'; for subdir in $$list; do \
- test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) cscopelist); \
- done
-ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
- list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
- unique=`for i in $$list; do \
- if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
- done | \
- $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
- END { if (nonempty) { for (i in files) print i; }; }'`; \
- mkid -fID $$unique
-tags: TAGS
-
-TAGS: tags-recursive $(HEADERS) $(SOURCES) config_h.in $(TAGS_DEPENDENCIES) \
- $(TAGS_FILES) $(LISP)
+ID: $(am__tagged_files)
+ $(am__define_uniq_tagged_files); mkid -fID $$unique
+tags: tags-recursive
+TAGS: tags
+
+tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
set x; \
here=`pwd`; \
if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \
@@ -1114,12 +3069,7 @@ TAGS: tags-recursive $(HEADERS) $(SOURCES) config_h.in $(TAGS_DEPENDENCIES) \
set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \
fi; \
done; \
- list='$(SOURCES) $(HEADERS) config_h.in $(LISP) $(TAGS_FILES)'; \
- unique=`for i in $$list; do \
- if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
- done | \
- $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
- END { if (nonempty) { for (i in files) print i; }; }'`; \
+ $(am__define_uniq_tagged_files); \
shift; \
if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
test -n "$$unique" || unique=$$empty_fix; \
@@ -1131,15 +3081,11 @@ TAGS: tags-recursive $(HEADERS) $(SOURCES) config_h.in $(TAGS_DEPENDENCIES) \
$$unique; \
fi; \
fi
-ctags: CTAGS
-CTAGS: ctags-recursive $(HEADERS) $(SOURCES) config_h.in $(TAGS_DEPENDENCIES) \
- $(TAGS_FILES) $(LISP)
- list='$(SOURCES) $(HEADERS) config_h.in $(LISP) $(TAGS_FILES)'; \
- unique=`for i in $$list; do \
- if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
- done | \
- $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
- END { if (nonempty) { for (i in files) print i; }; }'`; \
+ctags: ctags-recursive
+
+CTAGS: ctags
+ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
+ $(am__define_uniq_tagged_files); \
test -z "$(CTAGS_ARGS)$$unique" \
|| $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
$$unique
@@ -1148,18 +3094,16 @@ GTAGS:
here=`$(am__cd) $(top_builddir) && pwd` \
&& $(am__cd) $(top_srcdir) \
&& gtags -i $(GTAGS_ARGS) "$$here"
-
cscope: cscope.files
test ! -s cscope.files \
|| $(CSCOPE) -b -q $(AM_CSCOPEFLAGS) $(CSCOPEFLAGS) -i cscope.files $(CSCOPE_ARGS)
-
clean-cscope:
-rm -f cscope.files
+cscope.files: clean-cscope cscopelist
+cscopelist: cscopelist-recursive
-cscope.files: clean-cscope cscopelist-recursive cscopelist
-
-cscopelist: cscopelist-recursive $(HEADERS) $(SOURCES) $(LISP)
- list='$(SOURCES) $(HEADERS) $(LISP)'; \
+cscopelist-am: $(am__tagged_files)
+ list='$(am__tagged_files)'; \
case "$(srcdir)" in \
[\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \
*) sdir=$(subdir)/$(srcdir) ;; \
@@ -1176,13 +3120,793 @@ distclean-tags:
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
-rm -f cscope.out cscope.in.out cscope.po.out cscope.files
+# Recover from deleted '.trs' file; this should ensure that
+# "rm -f foo.log; make foo.trs" re-run 'foo.test', and re-create
+# both 'foo.log' and 'foo.trs'. Break the recipe in two subshells
+# to avoid problems with "make -n".
+.log.trs:
+ rm -f $< $@
+ $(MAKE) $(AM_MAKEFLAGS) $<
+
+# Leading 'am--fnord' is there to ensure the list of targets does not
+# expand to empty, as could happen e.g. with make check TESTS=''.
+am--fnord $(TEST_LOGS) $(TEST_LOGS:.log=.trs): $(am__force_recheck)
+am--force-recheck:
+ @:
+
+$(TEST_SUITE_LOG): $(TEST_LOGS)
+ @$(am__set_TESTS_bases); \
+ am__f_ok () { test -f "$$1" && test -r "$$1"; }; \
+ redo_bases=`for i in $$bases; do \
+ am__f_ok $$i.trs && am__f_ok $$i.log || echo $$i; \
+ done`; \
+ if test -n "$$redo_bases"; then \
+ redo_logs=`for i in $$redo_bases; do echo $$i.log; done`; \
+ redo_results=`for i in $$redo_bases; do echo $$i.trs; done`; \
+ if $(am__make_dryrun); then :; else \
+ rm -f $$redo_logs && rm -f $$redo_results || exit 1; \
+ fi; \
+ fi; \
+ if test -n "$$am__remaking_logs"; then \
+ echo "fatal: making $(TEST_SUITE_LOG): possible infinite" \
+ "recursion detected" >&2; \
+ elif test -n "$$redo_logs"; then \
+ am__remaking_logs=yes $(MAKE) $(AM_MAKEFLAGS) $$redo_logs; \
+ fi; \
+ if $(am__make_dryrun); then :; else \
+ st=0; \
+ errmsg="fatal: making $(TEST_SUITE_LOG): failed to create"; \
+ for i in $$redo_bases; do \
+ test -f $$i.trs && test -r $$i.trs \
+ || { echo "$$errmsg $$i.trs" >&2; st=1; }; \
+ test -f $$i.log && test -r $$i.log \
+ || { echo "$$errmsg $$i.log" >&2; st=1; }; \
+ done; \
+ test $$st -eq 0 || exit 1; \
+ fi
+ @$(am__sh_e_setup); $(am__tty_colors); $(am__set_TESTS_bases); \
+ ws='[ ]'; \
+ results=`for b in $$bases; do echo $$b.trs; done`; \
+ test -n "$$results" || results=/dev/null; \
+ all=` grep "^$$ws*:test-result:" $$results | wc -l`; \
+ pass=` grep "^$$ws*:test-result:$$ws*PASS" $$results | wc -l`; \
+ fail=` grep "^$$ws*:test-result:$$ws*FAIL" $$results | wc -l`; \
+ skip=` grep "^$$ws*:test-result:$$ws*SKIP" $$results | wc -l`; \
+ xfail=`grep "^$$ws*:test-result:$$ws*XFAIL" $$results | wc -l`; \
+ xpass=`grep "^$$ws*:test-result:$$ws*XPASS" $$results | wc -l`; \
+ error=`grep "^$$ws*:test-result:$$ws*ERROR" $$results | wc -l`; \
+ if test `expr $$fail + $$xpass + $$error` -eq 0; then \
+ success=true; \
+ else \
+ success=false; \
+ fi; \
+ br='==================='; br=$$br$$br$$br$$br; \
+ result_count () \
+ { \
+ if test x"$$1" = x"--maybe-color"; then \
+ maybe_colorize=yes; \
+ elif test x"$$1" = x"--no-color"; then \
+ maybe_colorize=no; \
+ else \
+ echo "$@: invalid 'result_count' usage" >&2; exit 4; \
+ fi; \
+ shift; \
+ desc=$$1 count=$$2; \
+ if test $$maybe_colorize = yes && test $$count -gt 0; then \
+ color_start=$$3 color_end=$$std; \
+ else \
+ color_start= color_end=; \
+ fi; \
+ echo "$${color_start}# $$desc $$count$${color_end}"; \
+ }; \
+ create_testsuite_report () \
+ { \
+ result_count $$1 "TOTAL:" $$all "$$brg"; \
+ result_count $$1 "PASS: " $$pass "$$grn"; \
+ result_count $$1 "SKIP: " $$skip "$$blu"; \
+ result_count $$1 "XFAIL:" $$xfail "$$lgn"; \
+ result_count $$1 "FAIL: " $$fail "$$red"; \
+ result_count $$1 "XPASS:" $$xpass "$$red"; \
+ result_count $$1 "ERROR:" $$error "$$mgn"; \
+ }; \
+ { \
+ echo "$(PACKAGE_STRING): $(subdir)/$(TEST_SUITE_LOG)" | \
+ $(am__rst_title); \
+ create_testsuite_report --no-color; \
+ echo; \
+ echo ".. contents:: :depth: 2"; \
+ echo; \
+ for b in $$bases; do echo $$b; done \
+ | $(am__create_global_log); \
+ } >$(TEST_SUITE_LOG).tmp || exit 1; \
+ mv $(TEST_SUITE_LOG).tmp $(TEST_SUITE_LOG); \
+ if $$success; then \
+ col="$$grn"; \
+ else \
+ col="$$red"; \
+ test x"$$VERBOSE" = x || cat $(TEST_SUITE_LOG); \
+ fi; \
+ echo "$${col}$$br$${std}"; \
+ echo "$${col}Testsuite summary for $(PACKAGE_STRING)$${std}"; \
+ echo "$${col}$$br$${std}"; \
+ create_testsuite_report --maybe-color; \
+ echo "$$col$$br$$std"; \
+ if $$success; then :; else \
+ echo "$${col}See $(subdir)/$(TEST_SUITE_LOG)$${std}"; \
+ if test -n "$(PACKAGE_BUGREPORT)"; then \
+ echo "$${col}Please report to $(PACKAGE_BUGREPORT)$${std}"; \
+ fi; \
+ echo "$$col$$br$$std"; \
+ fi; \
+ $$success || exit 1
+
+check-TESTS:
+ @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)
+ @set +e; $(am__set_TESTS_bases); \
+ log_list=`for i in $$bases; do echo $$i.log; done`; \
+ trs_list=`for i in $$bases; do echo $$i.trs; done`; \
+ log_list=`echo $$log_list`; trs_list=`echo $$trs_list`; \
+ $(MAKE) $(AM_MAKEFLAGS) $(TEST_SUITE_LOG) TEST_LOGS="$$log_list"; \
+ exit $$?;
+recheck: all $(check_PROGRAMS)
+ @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 \
+ | $(am__list_recheck_tests)` || exit 1; \
+ log_list=`for i in $$bases; do echo $$i.log; done`; \
+ log_list=`echo $$log_list`; \
+ $(MAKE) $(AM_MAKEFLAGS) $(TEST_SUITE_LOG) \
+ 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); \
+ $(am__check_pre) $(SH_LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_SH_LOG_DRIVER_FLAGS) $(SH_LOG_DRIVER_FLAGS) -- $(SH_LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+@am__EXEEXT_TRUE@.sh$(EXEEXT).log:
+@am__EXEEXT_TRUE@ @p='$<'; \
+@am__EXEEXT_TRUE@ $(am__set_b); \
+@am__EXEEXT_TRUE@ $(am__check_pre) $(SH_LOG_DRIVER) --test-name "$$f" \
+@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)
+
distdir: $(DISTFILES)
- @case `sed 15q $(srcdir)/NEWS` in \
- *"$(VERSION)"*) : ;; \
- *) \
- echo "NEWS not updated; not releasing" 1>&2; \
- exit 1;; \
- esac
$(am__remove_distdir)
test -d "$(distdir)" || mkdir "$(distdir)"
@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
@@ -1241,7 +3965,7 @@ distdir: $(DISTFILES)
done
$(MAKE) $(AM_MAKEFLAGS) \
top_distdir="$(top_distdir)" distdir="$(distdir)" \
- dist-hook
+ dist-info dist-hook
-test -n "$(am__skip_mode_fix)" \
|| find "$(distdir)" -type d ! -perm -755 \
-exec chmod u+rwx,go+rx {} \; -o \
@@ -1250,8 +3974,9 @@ distdir: $(DISTFILES)
! -type d ! -perm -444 -exec $(install_sh) -c -m a+r {} {} \; \
|| chmod -R a+r "$(distdir)"
dist-gzip: distdir
- tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
+ tardir=$(distdir) && $(am__tar) | eval GZIP= gzip $(GZIP_ENV) -c >$(distdir).tar.gz
$(am__post_remove_distdir)
+
dist-bzip2: distdir
tardir=$(distdir) && $(am__tar) | BZIP2=$${BZIP2--9} bzip2 -c >$(distdir).tar.bz2
$(am__post_remove_distdir)
@@ -1259,19 +3984,10 @@ dist-bzip2: distdir
dist-lzip: distdir
tardir=$(distdir) && $(am__tar) | lzip -c $${LZIP_OPT--9} >$(distdir).tar.lz
$(am__post_remove_distdir)
-
dist-xz: distdir
tardir=$(distdir) && $(am__tar) | XZ_OPT=$${XZ_OPT--e} xz -c >$(distdir).tar.xz
$(am__post_remove_distdir)
-dist-tarZ: distdir
- tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z
- $(am__post_remove_distdir)
-
-dist-shar: distdir
- shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz
- $(am__post_remove_distdir)
-
dist-zip: distdir
-rm -f $(distdir).zip
zip -rq $(distdir).zip $(distdir)
@@ -1287,7 +4003,7 @@ dist dist-all:
distcheck: dist
case '$(DIST_ARCHIVES)' in \
*.tar.gz*) \
- GZIP=$(GZIP_ENV) gzip -dc $(distdir).tar.gz | $(am__untar) ;;\
+ eval GZIP= gzip $(GZIP_ENV) -dc $(distdir).tar.gz | $(am__untar) ;;\
*.tar.bz2*) \
bzip2 -dc $(distdir).tar.bz2 | $(am__untar) ;;\
*.tar.lz*) \
@@ -1297,22 +4013,23 @@ distcheck: dist
*.tar.Z*) \
uncompress -c $(distdir).tar.Z | $(am__untar) ;;\
*.shar.gz*) \
- GZIP=$(GZIP_ENV) gzip -dc $(distdir).shar.gz | unshar ;;\
+ eval GZIP= gzip $(GZIP_ENV) -dc $(distdir).shar.gz | unshar ;;\
*.zip*) \
unzip $(distdir).zip ;;\
esac
- chmod -R a-w $(distdir); chmod u+w $(distdir)
- mkdir $(distdir)/_build
- mkdir $(distdir)/_inst
+ chmod -R a-w $(distdir)
+ chmod u+w $(distdir)
+ mkdir $(distdir)/_build $(distdir)/_build/sub $(distdir)/_inst
chmod a-w $(distdir)
test -d $(distdir)/_build || exit 0; \
dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \
&& dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \
&& am__cwd=`pwd` \
- && $(am__cd) $(distdir)/_build \
- && ../configure --srcdir=.. --prefix="$$dc_install_base" \
+ && $(am__cd) $(distdir)/_build/sub \
+ && ../../configure \
$(AM_DISTCHECK_CONFIGURE_FLAGS) \
$(DISTCHECK_CONFIGURE_FLAGS) \
+ --srcdir=../.. --prefix="$$dc_install_base" \
&& $(MAKE) $(AM_MAKEFLAGS) \
&& $(MAKE) $(AM_MAKEFLAGS) dvi \
&& $(MAKE) $(AM_MAKEFLAGS) check \
@@ -1366,11 +4083,19 @@ distcleancheck: distclean
$(distcleancheck_listfiles) ; \
exit 1; } >&2
check-am: all-am
-check: check-recursive
-all-am: Makefile $(DATA) $(HEADERS) config.h
+ $(MAKE) $(AM_MAKEFLAGS) $(check_PROGRAMS)
+ $(MAKE) $(AM_MAKEFLAGS) check-TESTS
+check: $(BUILT_SOURCES)
+ $(MAKE) $(AM_MAKEFLAGS) check-recursive
+all-am: Makefile $(INFO_DEPS) $(LIBRARIES) $(PROGRAMS) $(MANS) $(DATA) \
+ $(HEADERS) config.h all-local
installdirs: installdirs-recursive
installdirs-am:
-install: install-recursive
+ for dir in "$(DESTDIR)$(bindir)" "$(DESTDIR)$(infodir)" "$(DESTDIR)$(man1dir)"; do \
+ test -z "$$dir" || $(MKDIR_P) "$$dir"; \
+ done
+install: $(BUILT_SOURCES)
+ $(MAKE) $(AM_MAKEFLAGS) install-recursive
install-exec: install-exec-recursive
install-data: install-data-recursive
uninstall: uninstall-recursive
@@ -1390,127 +4115,1685 @@ install-strip:
"INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
fi
mostlyclean-generic:
+ -test -z "$(ALLOCA)" || rm -f $(ALLOCA)
+ -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)
+ -test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG)
clean-generic:
+ -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
distclean-generic:
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
+ -rm -f doc/$(am__dirstamp)
+ -rm -f lib/$(DEPDIR)/$(am__dirstamp)
+ -rm -f lib/$(am__dirstamp)
+ -rm -f lib/glthread/$(DEPDIR)/$(am__dirstamp)
+ -rm -f lib/glthread/$(am__dirstamp)
+ -rm -f sed/$(DEPDIR)/$(am__dirstamp)
+ -rm -f sed/$(am__dirstamp)
+ -rm -f testsuite/$(DEPDIR)/$(am__dirstamp)
+ -rm -f testsuite/$(am__dirstamp)
+ -test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES)
maintainer-clean-generic:
@echo "This command is intended for maintainers to use"
@echo "it deletes files that may require special tools to rebuild."
+ -test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES)
+ -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES)
clean: clean-recursive
-clean-am: clean-generic mostlyclean-am
+clean-am: clean-aminfo clean-binPROGRAMS clean-checkPROGRAMS \
+ clean-generic clean-noinstLIBRARIES mostlyclean-am
distclean: distclean-recursive
-rm -f $(am__CONFIG_DISTCLEAN_FILES)
+ -rm -f lib/$(DEPDIR)/acl-errno-valid.Po
+ -rm -f lib/$(DEPDIR)/acl-internal.Po
+ -rm -f lib/$(DEPDIR)/acl_entries.Po
+ -rm -f lib/$(DEPDIR)/alloca.Po
+ -rm -f lib/$(DEPDIR)/basename-lgpl.Po
+ -rm -f lib/$(DEPDIR)/btowc.Po
+ -rm -f lib/$(DEPDIR)/c-ctype.Po
+ -rm -f lib/$(DEPDIR)/c-strcasecmp.Po
+ -rm -f lib/$(DEPDIR)/c-strncasecmp.Po
+ -rm -f lib/$(DEPDIR)/canonicalize-lgpl.Po
+ -rm -f lib/$(DEPDIR)/close-stream.Po
+ -rm -f lib/$(DEPDIR)/closeout.Po
+ -rm -f lib/$(DEPDIR)/copy-acl.Po
+ -rm -f lib/$(DEPDIR)/dfa.Po
+ -rm -f lib/$(DEPDIR)/dirname-lgpl.Po
+ -rm -f lib/$(DEPDIR)/error.Po
+ -rm -f lib/$(DEPDIR)/exitfail.Po
+ -rm -f lib/$(DEPDIR)/fpending.Po
+ -rm -f lib/$(DEPDIR)/fstat.Po
+ -rm -f lib/$(DEPDIR)/fwriting.Po
+ -rm -f lib/$(DEPDIR)/get-permissions.Po
+ -rm -f lib/$(DEPDIR)/getdelim.Po
+ -rm -f lib/$(DEPDIR)/getfilecon.Po
+ -rm -f lib/$(DEPDIR)/getopt.Po
+ -rm -f lib/$(DEPDIR)/getopt1.Po
+ -rm -f lib/$(DEPDIR)/getprogname.Po
+ -rm -f lib/$(DEPDIR)/gettimeofday.Po
+ -rm -f lib/$(DEPDIR)/hard-locale.Po
+ -rm -f lib/$(DEPDIR)/isblank.Po
+ -rm -f lib/$(DEPDIR)/localcharset.Po
+ -rm -f lib/$(DEPDIR)/localeconv.Po
+ -rm -f lib/$(DEPDIR)/localeinfo.Po
+ -rm -f lib/$(DEPDIR)/lstat.Po
+ -rm -f lib/$(DEPDIR)/malloc.Po
+ -rm -f lib/$(DEPDIR)/malloca.Po
+ -rm -f lib/$(DEPDIR)/mbrlen.Po
+ -rm -f lib/$(DEPDIR)/mbrtowc.Po
+ -rm -f lib/$(DEPDIR)/mbsinit.Po
+ -rm -f lib/$(DEPDIR)/mbtowc.Po
+ -rm -f lib/$(DEPDIR)/memchr.Po
+ -rm -f lib/$(DEPDIR)/memrchr.Po
+ -rm -f lib/$(DEPDIR)/mkostemp.Po
+ -rm -f lib/$(DEPDIR)/msvc-inval.Po
+ -rm -f lib/$(DEPDIR)/msvc-nothrow.Po
+ -rm -f lib/$(DEPDIR)/nl_langinfo.Po
+ -rm -f lib/$(DEPDIR)/obstack.Po
+ -rm -f lib/$(DEPDIR)/progname.Po
+ -rm -f lib/$(DEPDIR)/qcopy-acl.Po
+ -rm -f lib/$(DEPDIR)/qset-acl.Po
+ -rm -f lib/$(DEPDIR)/quotearg.Po
+ -rm -f lib/$(DEPDIR)/readlink.Po
+ -rm -f lib/$(DEPDIR)/regcomp.Po
+ -rm -f lib/$(DEPDIR)/regex.Po
+ -rm -f lib/$(DEPDIR)/regex_internal.Po
+ -rm -f lib/$(DEPDIR)/regexec.Po
+ -rm -f lib/$(DEPDIR)/rename.Po
+ -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.Po
+ -rm -f lib/$(DEPDIR)/strerror-override.Po
+ -rm -f lib/$(DEPDIR)/strerror.Po
+ -rm -f lib/$(DEPDIR)/stripslash.Po
+ -rm -f lib/$(DEPDIR)/strverscmp.Po
+ -rm -f lib/$(DEPDIR)/tempname.Po
+ -rm -f lib/$(DEPDIR)/unistd.Po
+ -rm -f lib/$(DEPDIR)/version-etc-fsf.Po
+ -rm -f lib/$(DEPDIR)/version-etc.Po
+ -rm -f lib/$(DEPDIR)/wcrtomb.Po
+ -rm -f lib/$(DEPDIR)/wctob.Po
+ -rm -f lib/$(DEPDIR)/wctomb.Po
+ -rm -f lib/$(DEPDIR)/wctype-h.Po
+ -rm -f lib/$(DEPDIR)/xalloc-die.Po
+ -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)/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-generic distclean-hdr distclean-tags
+distclean-am: clean-am distclean-compile distclean-generic \
+ distclean-hdr distclean-local distclean-tags
dvi: dvi-recursive
-dvi-am:
+dvi-am: $(DVIS)
-html-am:
+html: html-recursive
+
+html-am: $(HTMLS)
info: info-recursive
-info-am:
+info-am: $(INFO_DEPS)
-install-data-am:
+install-data-am: install-info-am install-man
install-dvi: install-dvi-recursive
-install-dvi-am:
-
-install-exec-am:
+install-dvi-am: $(DVIS)
+ @$(NORMAL_INSTALL)
+ @list='$(DVIS)'; test -n "$(dvidir)" || list=; \
+ if test -n "$$list"; then \
+ echo " $(MKDIR_P) '$(DESTDIR)$(dvidir)'"; \
+ $(MKDIR_P) "$(DESTDIR)$(dvidir)" || exit 1; \
+ fi; \
+ for p in $$list; do \
+ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+ echo "$$d$$p"; \
+ done | $(am__base_list) | \
+ while read files; do \
+ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(dvidir)'"; \
+ $(INSTALL_DATA) $$files "$(DESTDIR)$(dvidir)" || exit $$?; \
+ done
+install-exec-am: install-binPROGRAMS install-exec-local
install-html: install-html-recursive
-install-html-am:
-
+install-html-am: $(HTMLS)
+ @$(NORMAL_INSTALL)
+ @list='$(HTMLS)'; list2=; test -n "$(htmldir)" || list=; \
+ if test -n "$$list"; then \
+ echo " $(MKDIR_P) '$(DESTDIR)$(htmldir)'"; \
+ $(MKDIR_P) "$(DESTDIR)$(htmldir)" || exit 1; \
+ fi; \
+ for p in $$list; do \
+ if test -f "$$p" || test -d "$$p"; then d=; else d="$(srcdir)/"; fi; \
+ $(am__strip_dir) \
+ d2=$$d$$p; \
+ if test -d "$$d2"; then \
+ echo " $(MKDIR_P) '$(DESTDIR)$(htmldir)/$$f'"; \
+ $(MKDIR_P) "$(DESTDIR)$(htmldir)/$$f" || exit 1; \
+ echo " $(INSTALL_DATA) '$$d2'/* '$(DESTDIR)$(htmldir)/$$f'"; \
+ $(INSTALL_DATA) "$$d2"/* "$(DESTDIR)$(htmldir)/$$f" || exit $$?; \
+ else \
+ list2="$$list2 $$d2"; \
+ fi; \
+ done; \
+ test -z "$$list2" || { echo "$$list2" | $(am__base_list) | \
+ while read files; do \
+ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(htmldir)'"; \
+ $(INSTALL_DATA) $$files "$(DESTDIR)$(htmldir)" || exit $$?; \
+ done; }
install-info: install-info-recursive
-install-info-am:
-
-install-man:
+install-info-am: $(INFO_DEPS)
+ @$(NORMAL_INSTALL)
+ @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
+ list='$(INFO_DEPS)'; test -n "$(infodir)" || list=; \
+ if test -n "$$list"; then \
+ echo " $(MKDIR_P) '$(DESTDIR)$(infodir)'"; \
+ $(MKDIR_P) "$(DESTDIR)$(infodir)" || exit 1; \
+ fi; \
+ for file in $$list; do \
+ case $$file in \
+ $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
+ esac; \
+ if test -f $$file; then \
+ echo ./$$file; \
+ else \
+ echo $(srcdir)/$$file; \
+ fi; \
+ done | $(am__base_list) | \
+ while read files; do \
+ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(infodir)'"; \
+ $(INSTALL_DATA) $$files "$(DESTDIR)$(infodir)" || exit $$?; done
+ @$(POST_INSTALL)
+ @if $(am__can_run_installinfo); then \
+ list='$(INFO_DEPS)'; test -n "$(infodir)" || list=; \
+ for file in $$list; do \
+ relfile=`echo "$$file" | sed 's|^.*/||'`; \
+ echo " install-info --info-dir='$(DESTDIR)$(infodir)' '$(DESTDIR)$(infodir)/$$relfile'";\
+ install-info --info-dir="$(DESTDIR)$(infodir)" "$(DESTDIR)$(infodir)/$$relfile" || :;\
+ done; \
+ else : ; fi
+install-man: install-man1
install-pdf: install-pdf-recursive
-install-pdf-am:
-
+install-pdf-am: $(PDFS)
+ @$(NORMAL_INSTALL)
+ @list='$(PDFS)'; test -n "$(pdfdir)" || list=; \
+ if test -n "$$list"; then \
+ echo " $(MKDIR_P) '$(DESTDIR)$(pdfdir)'"; \
+ $(MKDIR_P) "$(DESTDIR)$(pdfdir)" || exit 1; \
+ fi; \
+ for p in $$list; do \
+ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+ echo "$$d$$p"; \
+ done | $(am__base_list) | \
+ while read files; do \
+ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(pdfdir)'"; \
+ $(INSTALL_DATA) $$files "$(DESTDIR)$(pdfdir)" || exit $$?; done
install-ps: install-ps-recursive
-install-ps-am:
-
+install-ps-am: $(PSS)
+ @$(NORMAL_INSTALL)
+ @list='$(PSS)'; test -n "$(psdir)" || list=; \
+ if test -n "$$list"; then \
+ echo " $(MKDIR_P) '$(DESTDIR)$(psdir)'"; \
+ $(MKDIR_P) "$(DESTDIR)$(psdir)" || exit 1; \
+ fi; \
+ for p in $$list; do \
+ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+ echo "$$d$$p"; \
+ done | $(am__base_list) | \
+ while read files; do \
+ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(psdir)'"; \
+ $(INSTALL_DATA) $$files "$(DESTDIR)$(psdir)" || exit $$?; done
installcheck-am:
maintainer-clean: maintainer-clean-recursive
-rm -f $(am__CONFIG_DISTCLEAN_FILES)
-rm -rf $(top_srcdir)/autom4te.cache
+ -rm -f lib/$(DEPDIR)/acl-errno-valid.Po
+ -rm -f lib/$(DEPDIR)/acl-internal.Po
+ -rm -f lib/$(DEPDIR)/acl_entries.Po
+ -rm -f lib/$(DEPDIR)/alloca.Po
+ -rm -f lib/$(DEPDIR)/basename-lgpl.Po
+ -rm -f lib/$(DEPDIR)/btowc.Po
+ -rm -f lib/$(DEPDIR)/c-ctype.Po
+ -rm -f lib/$(DEPDIR)/c-strcasecmp.Po
+ -rm -f lib/$(DEPDIR)/c-strncasecmp.Po
+ -rm -f lib/$(DEPDIR)/canonicalize-lgpl.Po
+ -rm -f lib/$(DEPDIR)/close-stream.Po
+ -rm -f lib/$(DEPDIR)/closeout.Po
+ -rm -f lib/$(DEPDIR)/copy-acl.Po
+ -rm -f lib/$(DEPDIR)/dfa.Po
+ -rm -f lib/$(DEPDIR)/dirname-lgpl.Po
+ -rm -f lib/$(DEPDIR)/error.Po
+ -rm -f lib/$(DEPDIR)/exitfail.Po
+ -rm -f lib/$(DEPDIR)/fpending.Po
+ -rm -f lib/$(DEPDIR)/fstat.Po
+ -rm -f lib/$(DEPDIR)/fwriting.Po
+ -rm -f lib/$(DEPDIR)/get-permissions.Po
+ -rm -f lib/$(DEPDIR)/getdelim.Po
+ -rm -f lib/$(DEPDIR)/getfilecon.Po
+ -rm -f lib/$(DEPDIR)/getopt.Po
+ -rm -f lib/$(DEPDIR)/getopt1.Po
+ -rm -f lib/$(DEPDIR)/getprogname.Po
+ -rm -f lib/$(DEPDIR)/gettimeofday.Po
+ -rm -f lib/$(DEPDIR)/hard-locale.Po
+ -rm -f lib/$(DEPDIR)/isblank.Po
+ -rm -f lib/$(DEPDIR)/localcharset.Po
+ -rm -f lib/$(DEPDIR)/localeconv.Po
+ -rm -f lib/$(DEPDIR)/localeinfo.Po
+ -rm -f lib/$(DEPDIR)/lstat.Po
+ -rm -f lib/$(DEPDIR)/malloc.Po
+ -rm -f lib/$(DEPDIR)/malloca.Po
+ -rm -f lib/$(DEPDIR)/mbrlen.Po
+ -rm -f lib/$(DEPDIR)/mbrtowc.Po
+ -rm -f lib/$(DEPDIR)/mbsinit.Po
+ -rm -f lib/$(DEPDIR)/mbtowc.Po
+ -rm -f lib/$(DEPDIR)/memchr.Po
+ -rm -f lib/$(DEPDIR)/memrchr.Po
+ -rm -f lib/$(DEPDIR)/mkostemp.Po
+ -rm -f lib/$(DEPDIR)/msvc-inval.Po
+ -rm -f lib/$(DEPDIR)/msvc-nothrow.Po
+ -rm -f lib/$(DEPDIR)/nl_langinfo.Po
+ -rm -f lib/$(DEPDIR)/obstack.Po
+ -rm -f lib/$(DEPDIR)/progname.Po
+ -rm -f lib/$(DEPDIR)/qcopy-acl.Po
+ -rm -f lib/$(DEPDIR)/qset-acl.Po
+ -rm -f lib/$(DEPDIR)/quotearg.Po
+ -rm -f lib/$(DEPDIR)/readlink.Po
+ -rm -f lib/$(DEPDIR)/regcomp.Po
+ -rm -f lib/$(DEPDIR)/regex.Po
+ -rm -f lib/$(DEPDIR)/regex_internal.Po
+ -rm -f lib/$(DEPDIR)/regexec.Po
+ -rm -f lib/$(DEPDIR)/rename.Po
+ -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.Po
+ -rm -f lib/$(DEPDIR)/strerror-override.Po
+ -rm -f lib/$(DEPDIR)/strerror.Po
+ -rm -f lib/$(DEPDIR)/stripslash.Po
+ -rm -f lib/$(DEPDIR)/strverscmp.Po
+ -rm -f lib/$(DEPDIR)/tempname.Po
+ -rm -f lib/$(DEPDIR)/unistd.Po
+ -rm -f lib/$(DEPDIR)/version-etc-fsf.Po
+ -rm -f lib/$(DEPDIR)/version-etc.Po
+ -rm -f lib/$(DEPDIR)/wcrtomb.Po
+ -rm -f lib/$(DEPDIR)/wctob.Po
+ -rm -f lib/$(DEPDIR)/wctomb.Po
+ -rm -f lib/$(DEPDIR)/wctype-h.Po
+ -rm -f lib/$(DEPDIR)/xalloc-die.Po
+ -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)/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-generic
+maintainer-clean-am: distclean-am maintainer-clean-aminfo \
+ maintainer-clean-generic maintainer-clean-vti
mostlyclean: mostlyclean-recursive
-mostlyclean-am: mostlyclean-generic
+mostlyclean-am: mostlyclean-aminfo mostlyclean-compile \
+ mostlyclean-generic mostlyclean-local mostlyclean-vti
pdf: pdf-recursive
-pdf-am:
+pdf-am: $(PDFS)
ps: ps-recursive
-ps-am:
+ps-am: $(PSS)
+
+uninstall-am: uninstall-binPROGRAMS uninstall-dvi-am uninstall-html-am \
+ uninstall-info-am uninstall-local uninstall-man \
+ uninstall-pdf-am uninstall-ps-am
-uninstall-am:
+uninstall-man: uninstall-man1
-.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) all \
- cscopelist-recursive ctags-recursive install-am install-strip \
- tags-recursive
+.MAKE: $(am__recursive_targets) all check check-am install install-am \
+ install-strip
-.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \
- all all-am am--refresh check check-am clean clean-cscope \
- clean-generic cscope cscopelist cscopelist-recursive ctags \
- ctags-recursive dist dist-all dist-bzip2 dist-gzip dist-hook \
- dist-lzip dist-shar dist-tarZ dist-xz dist-zip distcheck \
- distclean distclean-generic distclean-hdr distclean-tags \
- distcleancheck distdir distuninstallcheck dvi dvi-am html \
- html-am info info-am install install-am install-data \
+.PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am all-local \
+ am--depfiles am--refresh check check-TESTS check-am clean \
+ 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-html install-html-am install-info \
- install-info-am install-man install-pdf install-pdf-am \
- install-ps install-ps-am install-strip installcheck \
- installcheck-am installdirs installdirs-am maintainer-clean \
- maintainer-clean-generic mostlyclean mostlyclean-generic pdf \
- pdf-am ps ps-am tags tags-recursive uninstall uninstall-am
+ 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 \
+ installdirs installdirs-am maintainer-clean \
+ maintainer-clean-aminfo maintainer-clean-generic \
+ maintainer-clean-vti mostlyclean mostlyclean-aminfo \
+ mostlyclean-compile mostlyclean-generic mostlyclean-local \
+ mostlyclean-vti pdf pdf-am ps ps-am recheck tags tags-am \
+ uninstall uninstall-am uninstall-binPROGRAMS uninstall-dvi-am \
+ uninstall-html-am uninstall-info-am uninstall-local \
+ uninstall-man uninstall-man1 uninstall-pdf-am uninstall-ps-am
+.PRECIOUS: Makefile
+
+.version:
+ $(AM_V_GEN)echo $(VERSION) > $@-t && mv $@-t $@
-html:
- cd doc && make html
+# Arrange so that .tarball-version appears only in the distribution
+# tarball, and never in a checked-out repository.
+dist-hook: gen-ChangeLog
+ $(AM_V_GEN)echo $(VERSION) > $(distdir)/.tarball-version
+.PHONY: gen-ChangeLog
+gen-ChangeLog:
+ $(AM_V_GEN)if test -d .git; then \
+ log_fix="$(srcdir)/build-aux/git-log-fix"; \
+ test -e "$$log_fix" \
+ && amend_git_log="--amend=$$log_fix" \
+ || amend_git_log=; \
+ $(top_srcdir)/build-aux/gitlog-to-changelog \
+ $$amend_git_log --since=$(gen_start_date) > $(distdir)/cl-t && \
+ { rm -f $(distdir)/ChangeLog && \
+ mv $(distdir)/cl-t $(distdir)/ChangeLog; } \
+ fi
-dist-hook:
- test $(COPYRIGHT_YEAR) = `date +%Y` || \
- { echo Copyright year not updated; exit 1; }
+THANKS: THANKS.in Makefile.am .mailmap thanks-gen .version
+ $(AM_V_GEN)rm -f $@-t $@; \
+ { \
+ $(prologue); echo; \
+ { perl -ne '/^$$/.../^$$/ and print' $(srcdir)/THANKS.in \
+ | grep -v '^$$' | perl -pe 's/ +/\0/'; \
+ git log --pretty=format:'%aN%x00%aE' \
+ | $(ASSORT) -u; \
+ } | $(srcdir)/thanks-gen \
+ | LC_ALL=en_US.UTF-8 sort -f; \
+ echo; \
+ printf ';; %s\n' 'Local Variables:' 'coding: utf-8' End:; \
+ } > $@-t && chmod a-w $@-t && mv $@-t $@
full-distcheck:
- make distcheck EXTRA_DC_FLAGS='--enable-regex-tests'
- make distcheck EXTRA_DC_FLAGS='--enable-html'
- make distcheck EXTRA_DC_FLAGS='--disable-i18n'
- make distcheck EXTRA_DC_FLAGS='--disable-nls'
- make distcheck EXTRA_DC_FLAGS='--without-included-gettext'
+ $(MAKE) distcheck EXTRA_DC_FLAGS='--enable-regex-tests'
+ $(MAKE) distcheck EXTRA_DC_FLAGS='--enable-html'
+ $(MAKE) distcheck EXTRA_DC_FLAGS='--disable-i18n'
+ $(MAKE) distcheck EXTRA_DC_FLAGS='--disable-nls'
+ $(MAKE) distcheck EXTRA_DC_FLAGS='--without-included-gettext'
@case "$(host)" in \
*-linux*|*-gnu*) \
- echo make distcheck EXTRA_DC_FLAGS=\'--without-included-regex\'; \
- make distcheck EXTRA_DC_FLAGS='--without-included-regex' \
+ echo $(MAKE) distcheck \
+ EXTRA_DC_FLAGS=\'--without-included-regex\'; \
+ $(MAKE) distcheck EXTRA_DC_FLAGS='--without-included-regex' \
;; \
*) \
echo Skipping check --without-included-regex \
;; \
esac
+# We need the following in order to create <alloca.h> when the system
+# doesn't have one that works with the given compiler.
+@GL_GENERATE_ALLOCA_H_TRUE@lib/alloca.h: lib/alloca.in.h $(top_builddir)/config.status
+@GL_GENERATE_ALLOCA_H_TRUE@ $(AM_V_GEN)rm -f $@-t $@ && \
+@GL_GENERATE_ALLOCA_H_TRUE@ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
+@GL_GENERATE_ALLOCA_H_TRUE@ cat $(top_srcdir)/lib/alloca.in.h; \
+@GL_GENERATE_ALLOCA_H_TRUE@ } > $@-t && \
+@GL_GENERATE_ALLOCA_H_TRUE@ mv -f $@-t $@
+@GL_GENERATE_ALLOCA_H_FALSE@lib/alloca.h: $(top_builddir)/config.status
+@GL_GENERATE_ALLOCA_H_FALSE@ rm -f $@
+
+# Listed in the same order as the GNU makefile conventions, and
+# provided by autoconf 2.59c+ or 2.70.
+# The Automake-defined pkg* macros are appended, in the order
+# listed in the Automake 1.10a+ documentation.
+lib/configmake.h: Makefile
+ $(AM_V_GEN)rm -f $@-t && \
+ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
+ echo '#define PREFIX "$(prefix)"'; \
+ echo '#define EXEC_PREFIX "$(exec_prefix)"'; \
+ echo '#define BINDIR "$(bindir)"'; \
+ echo '#define SBINDIR "$(sbindir)"'; \
+ echo '#define LIBEXECDIR "$(libexecdir)"'; \
+ echo '#define DATAROOTDIR "$(datarootdir)"'; \
+ echo '#define DATADIR "$(datadir)"'; \
+ echo '#define SYSCONFDIR "$(sysconfdir)"'; \
+ echo '#define SHAREDSTATEDIR "$(sharedstatedir)"'; \
+ echo '#define LOCALSTATEDIR "$(localstatedir)"'; \
+ echo '#define RUNSTATEDIR "$(runstatedir)"'; \
+ echo '#define INCLUDEDIR "$(includedir)"'; \
+ echo '#define OLDINCLUDEDIR "$(oldincludedir)"'; \
+ echo '#define DOCDIR "$(docdir)"'; \
+ echo '#define INFODIR "$(infodir)"'; \
+ echo '#define HTMLDIR "$(htmldir)"'; \
+ echo '#define DVIDIR "$(dvidir)"'; \
+ echo '#define PDFDIR "$(pdfdir)"'; \
+ echo '#define PSDIR "$(psdir)"'; \
+ echo '#define LIBDIR "$(libdir)"'; \
+ echo '#define LISPDIR "$(lispdir)"'; \
+ echo '#define LOCALEDIR "$(localedir)"'; \
+ echo '#define MANDIR "$(mandir)"'; \
+ echo '#define MANEXT "$(manext)"'; \
+ echo '#define PKGDATADIR "$(pkgdatadir)"'; \
+ echo '#define PKGINCLUDEDIR "$(pkgincludedir)"'; \
+ echo '#define PKGLIBDIR "$(pkglibdir)"'; \
+ echo '#define PKGLIBEXECDIR "$(pkglibexecdir)"'; \
+ } | sed '/""/d' > $@-t && \
+ mv -f $@-t $@
+
+# We need the following in order to create <ctype.h> when the system
+# doesn't have one that works with the given compiler.
+lib/ctype.h: lib/ctype.in.h $(top_builddir)/config.status $(CXXDEFS_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_CTYPE_H''@|$(NEXT_CTYPE_H)|g' \
+ -e 's/@''GNULIB_ISBLANK''@/$(GNULIB_ISBLANK)/g' \
+ -e 's/@''HAVE_ISBLANK''@/$(HAVE_ISBLANK)/g' \
+ -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \
+ -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \
+ < $(top_srcdir)/lib/ctype.in.h; \
+ } > $@-t && \
+ mv $@-t $@
+
+# We need the following in order to create <errno.h> when the system
+# doesn't have one that is POSIX compliant.
+@GL_GENERATE_ERRNO_H_TRUE@lib/errno.h: lib/errno.in.h $(top_builddir)/config.status
+@GL_GENERATE_ERRNO_H_TRUE@ $(AM_V_GEN)rm -f $@-t $@ && \
+@GL_GENERATE_ERRNO_H_TRUE@ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \
+@GL_GENERATE_ERRNO_H_TRUE@ sed -e 's|@''GUARD_PREFIX''@|GL|g' \
+@GL_GENERATE_ERRNO_H_TRUE@ -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
+@GL_GENERATE_ERRNO_H_TRUE@ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
+@GL_GENERATE_ERRNO_H_TRUE@ -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \
+@GL_GENERATE_ERRNO_H_TRUE@ -e 's|@''NEXT_ERRNO_H''@|$(NEXT_ERRNO_H)|g' \
+@GL_GENERATE_ERRNO_H_TRUE@ -e 's|@''EMULTIHOP_HIDDEN''@|$(EMULTIHOP_HIDDEN)|g' \
+@GL_GENERATE_ERRNO_H_TRUE@ -e 's|@''EMULTIHOP_VALUE''@|$(EMULTIHOP_VALUE)|g' \
+@GL_GENERATE_ERRNO_H_TRUE@ -e 's|@''ENOLINK_HIDDEN''@|$(ENOLINK_HIDDEN)|g' \
+@GL_GENERATE_ERRNO_H_TRUE@ -e 's|@''ENOLINK_VALUE''@|$(ENOLINK_VALUE)|g' \
+@GL_GENERATE_ERRNO_H_TRUE@ -e 's|@''EOVERFLOW_HIDDEN''@|$(EOVERFLOW_HIDDEN)|g' \
+@GL_GENERATE_ERRNO_H_TRUE@ -e 's|@''EOVERFLOW_VALUE''@|$(EOVERFLOW_VALUE)|g' \
+@GL_GENERATE_ERRNO_H_TRUE@ < $(top_srcdir)/lib/errno.in.h; \
+@GL_GENERATE_ERRNO_H_TRUE@ } > $@-t && \
+@GL_GENERATE_ERRNO_H_TRUE@ mv $@-t $@
+@GL_GENERATE_ERRNO_H_FALSE@lib/errno.h: $(top_builddir)/config.status
+@GL_GENERATE_ERRNO_H_FALSE@ rm -f $@
+
+# We need the following in order to create <fcntl.h> when the system
+# doesn't have one that works with the given compiler.
+lib/fcntl.h: lib/fcntl.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_FCNTL_H''@|$(NEXT_FCNTL_H)|g' \
+ -e 's/@''GNULIB_FCNTL''@/$(GNULIB_FCNTL)/g' \
+ -e 's/@''GNULIB_NONBLOCKING''@/$(GNULIB_NONBLOCKING)/g' \
+ -e 's/@''GNULIB_OPEN''@/$(GNULIB_OPEN)/g' \
+ -e 's/@''GNULIB_OPENAT''@/$(GNULIB_OPENAT)/g' \
+ -e 's|@''HAVE_FCNTL''@|$(HAVE_FCNTL)|g' \
+ -e 's|@''HAVE_OPENAT''@|$(HAVE_OPENAT)|g' \
+ -e 's|@''REPLACE_FCNTL''@|$(REPLACE_FCNTL)|g' \
+ -e 's|@''REPLACE_OPEN''@|$(REPLACE_OPEN)|g' \
+ -e 's|@''REPLACE_OPENAT''@|$(REPLACE_OPENAT)|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)' \
+ < $(top_srcdir)/lib/fcntl.in.h; \
+ } > $@-t && \
+ mv $@-t $@
+
+# 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)
+ $(AM_V_GEN)rm -f $@-t $@ && \
+ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
+ sed -e 's|@''GUARD_PREFIX''@|GL|g' \
+ -e 's|@''HAVE_GETOPT_H''@|$(HAVE_GETOPT_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_GETOPT_H''@|$(NEXT_GETOPT_H)|g' \
+ -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \
+ < $(top_srcdir)/lib/getopt.in.h; \
+ } > $@-t && \
+ mv -f $@-t $@
+
+distclean-local: clean-GNUmakefile
+clean-GNUmakefile:
+ test '$(srcdir)' = . || rm -f $(top_builddir)/GNUmakefile
+
+# We need the following in order to create an empty placeholder for
+# <langinfo.h> when the system doesn't have one.
+lib/langinfo.h: lib/langinfo.in.h $(top_builddir)/config.status $(CXXDEFS_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|@''HAVE_LANGINFO_H''@|$(HAVE_LANGINFO_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_LANGINFO_H''@|$(NEXT_LANGINFO_H)|g' \
+ -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_ERA''@|$(HAVE_LANGINFO_ERA)|g' \
+ -e 's|@''HAVE_LANGINFO_YESEXPR''@|$(HAVE_LANGINFO_YESEXPR)|g' \
+ -e 's|@''HAVE_NL_LANGINFO''@|$(HAVE_NL_LANGINFO)|g' \
+ -e 's|@''REPLACE_NL_LANGINFO''@|$(REPLACE_NL_LANGINFO)|g' \
+ -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \
+ -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \
+ < $(top_srcdir)/lib/langinfo.in.h; \
+ } > $@-t && \
+ mv $@-t $@
+
+# We need the following in order to create <limits.h> when the system
+# doesn't have one that is compatible with GNU.
+@GL_GENERATE_LIMITS_H_TRUE@lib/limits.h: lib/limits.in.h $(top_builddir)/config.status
+@GL_GENERATE_LIMITS_H_TRUE@ $(AM_V_GEN)rm -f $@-t $@ && \
+@GL_GENERATE_LIMITS_H_TRUE@ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \
+@GL_GENERATE_LIMITS_H_TRUE@ sed -e 's|@''GUARD_PREFIX''@|GL|g' \
+@GL_GENERATE_LIMITS_H_TRUE@ -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
+@GL_GENERATE_LIMITS_H_TRUE@ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
+@GL_GENERATE_LIMITS_H_TRUE@ -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \
+@GL_GENERATE_LIMITS_H_TRUE@ -e 's|@''NEXT_LIMITS_H''@|$(NEXT_LIMITS_H)|g' \
+@GL_GENERATE_LIMITS_H_TRUE@ < $(top_srcdir)/lib/limits.in.h; \
+@GL_GENERATE_LIMITS_H_TRUE@ } > $@-t && \
+@GL_GENERATE_LIMITS_H_TRUE@ mv $@-t $@
+@GL_GENERATE_LIMITS_H_FALSE@lib/limits.h: $(top_builddir)/config.status
+@GL_GENERATE_LIMITS_H_FALSE@ rm -f $@
+
+# We need the following in order to install a simple file in $(libdir)
+# which is shared with other installed packages. We use a list of referencing
+# packages so that "make uninstall" will remove the file if and only if it
+# is not used by another installed package.
+# On systems with glibc-2.1 or newer, the file is redundant, therefore we
+# avoid installing it.
+
+all-local: lib/charset.alias lib/ref-add.sed lib/ref-del.sed
+install-exec-local: install-exec-localcharset
+install-exec-localcharset: all-local
+ if test $(GLIBC21) = no; then \
+ case '$(host_os)' in \
+ darwin[56]*) \
+ need_charset_alias=true ;; \
+ darwin* | cygwin* | mingw* | pw32* | cegcc*) \
+ need_charset_alias=false ;; \
+ *) \
+ need_charset_alias=true ;; \
+ esac ; \
+ else \
+ need_charset_alias=false ; \
+ fi ; \
+ if $$need_charset_alias; then \
+ $(mkinstalldirs) $(DESTDIR)$(libdir) ; \
+ fi ; \
+ if test -f $(charset_alias); then \
+ sed -f lib/ref-add.sed $(charset_alias) > $(charset_tmp) ; \
+ $(INSTALL_DATA) $(charset_tmp) $(charset_alias) ; \
+ rm -f $(charset_tmp) ; \
+ else \
+ if $$need_charset_alias; then \
+ sed -f lib/ref-add.sed lib/charset.alias > $(charset_tmp) ; \
+ $(INSTALL_DATA) $(charset_tmp) $(charset_alias) ; \
+ rm -f $(charset_tmp) ; \
+ fi ; \
+ fi
+
+uninstall-local: uninstall-localcharset
+uninstall-localcharset: all-local
+ if test -f $(charset_alias); then \
+ sed -f lib/ref-del.sed $(charset_alias) > $(charset_tmp); \
+ if grep '^# Packages using this file: $$' $(charset_tmp) \
+ > /dev/null; then \
+ rm -f $(charset_alias); \
+ else \
+ $(INSTALL_DATA) $(charset_tmp) $(charset_alias); \
+ fi; \
+ rm -f $(charset_tmp); \
+ fi
+
+lib/charset.alias: lib/config.charset
+ $(AM_V_GEN)rm -f $@-t $@ && \
+ $(SHELL) $(top_srcdir)/lib/config.charset '$(host)' > $@-t && \
+ mv $@-t $@
+
+# SUFFIXES += .sed .sin
+.sin.sed:
+ $(AM_V_GEN)rm -f $@-t $@ && \
+ sed -e '/^#/d' -e 's/@''PACKAGE''@/$(PACKAGE)/g' $< > $@-t && \
+ mv $@-t $@
+
+# We need the following in order to create <locale.h> when the system
+# doesn't have one that provides all definitions.
+lib/locale.h: lib/locale.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_LOCALE_H''@|$(NEXT_LOCALE_H)|g' \
+ -e 's/@''GNULIB_LOCALECONV''@/$(GNULIB_LOCALECONV)/g' \
+ -e 's/@''GNULIB_SETLOCALE''@/$(GNULIB_SETLOCALE)/g' \
+ -e 's/@''GNULIB_DUPLOCALE''@/$(GNULIB_DUPLOCALE)/g' \
+ -e 's|@''HAVE_DUPLOCALE''@|$(HAVE_DUPLOCALE)|g' \
+ -e 's|@''HAVE_XLOCALE_H''@|$(HAVE_XLOCALE_H)|g' \
+ -e 's|@''REPLACE_LOCALECONV''@|$(REPLACE_LOCALECONV)|g' \
+ -e 's|@''REPLACE_SETLOCALE''@|$(REPLACE_SETLOCALE)|g' \
+ -e 's|@''REPLACE_DUPLOCALE''@|$(REPLACE_DUPLOCALE)|g' \
+ -e 's|@''REPLACE_STRUCT_LCONV''@|$(REPLACE_STRUCT_LCONV)|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)' \
+ < $(top_srcdir)/lib/locale.in.h; \
+ } > $@-t && \
+ mv $@-t $@
+lib/selinux/selinux.h: lib/se-selinux.in.h $(top_builddir)/config.status $(UNUSED_PARAMETER_H)
+ $(AM_V_at)$(MKDIR_P) lib/selinux
+ $(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_SELINUX_SELINUX_H''@|$(NEXT_SELINUX_SELINUX_H)|g' \
+ -e '/definition of _GL_UNUSED_PARAMETER/r $(UNUSED_PARAMETER_H)' \
+ < $(top_srcdir)/lib/se-selinux.in.h; \
+ } > $@-t && \
+ chmod a-x $@-t && \
+ mv $@-t $@
+@GL_GENERATE_SELINUX_CONTEXT_H_TRUE@lib/selinux/context.h: lib/se-context.in.h $(top_builddir)/config.status $(UNUSED_PARAMETER_H)
+@GL_GENERATE_SELINUX_CONTEXT_H_TRUE@ $(AM_V_at)$(MKDIR_P) lib/selinux
+@GL_GENERATE_SELINUX_CONTEXT_H_TRUE@ $(AM_V_GEN)rm -f $@-t $@ && \
+@GL_GENERATE_SELINUX_CONTEXT_H_TRUE@ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \
+@GL_GENERATE_SELINUX_CONTEXT_H_TRUE@ sed -e '/definition of _GL_UNUSED_PARAMETER/r $(UNUSED_PARAMETER_H)' \
+@GL_GENERATE_SELINUX_CONTEXT_H_TRUE@ < $(top_srcdir)/lib/se-context.in.h; \
+@GL_GENERATE_SELINUX_CONTEXT_H_TRUE@ } > $@-t && \
+@GL_GENERATE_SELINUX_CONTEXT_H_TRUE@ chmod a-x $@-t && \
+@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.
+@GL_GENERATE_STDALIGN_H_TRUE@lib/stdalign.h: lib/stdalign.in.h $(top_builddir)/config.status
+@GL_GENERATE_STDALIGN_H_TRUE@ $(AM_V_GEN)rm -f $@-t $@ && \
+@GL_GENERATE_STDALIGN_H_TRUE@ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
+@GL_GENERATE_STDALIGN_H_TRUE@ cat $(top_srcdir)/lib/stdalign.in.h; \
+@GL_GENERATE_STDALIGN_H_TRUE@ } > $@-t && \
+@GL_GENERATE_STDALIGN_H_TRUE@ mv $@-t $@
+@GL_GENERATE_STDALIGN_H_FALSE@lib/stdalign.h: $(top_builddir)/config.status
+@GL_GENERATE_STDALIGN_H_FALSE@ rm -f $@
+
+# We need the following in order to create <stdarg.h> when the system
+# doesn't have one that works with the given compiler.
+@GL_GENERATE_STDARG_H_TRUE@lib/stdarg.h: lib/stdarg.in.h $(top_builddir)/config.status
+@GL_GENERATE_STDARG_H_TRUE@ $(AM_V_GEN)rm -f $@-t $@ && \
+@GL_GENERATE_STDARG_H_TRUE@ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \
+@GL_GENERATE_STDARG_H_TRUE@ sed -e 's|@''GUARD_PREFIX''@|GL|g' \
+@GL_GENERATE_STDARG_H_TRUE@ -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
+@GL_GENERATE_STDARG_H_TRUE@ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
+@GL_GENERATE_STDARG_H_TRUE@ -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \
+@GL_GENERATE_STDARG_H_TRUE@ -e 's|@''NEXT_STDARG_H''@|$(NEXT_STDARG_H)|g' \
+@GL_GENERATE_STDARG_H_TRUE@ < $(top_srcdir)/lib/stdarg.in.h; \
+@GL_GENERATE_STDARG_H_TRUE@ } > $@-t && \
+@GL_GENERATE_STDARG_H_TRUE@ mv $@-t $@
+@GL_GENERATE_STDARG_H_FALSE@lib/stdarg.h: $(top_builddir)/config.status
+@GL_GENERATE_STDARG_H_FALSE@ rm -f $@
+
+# We need the following in order to create <stdbool.h> when the system
+# doesn't have one that works.
+@GL_GENERATE_STDBOOL_H_TRUE@lib/stdbool.h: lib/stdbool.in.h $(top_builddir)/config.status
+@GL_GENERATE_STDBOOL_H_TRUE@ $(AM_V_GEN)rm -f $@-t $@ && \
+@GL_GENERATE_STDBOOL_H_TRUE@ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
+@GL_GENERATE_STDBOOL_H_TRUE@ sed -e 's/@''HAVE__BOOL''@/$(HAVE__BOOL)/g' < $(top_srcdir)/lib/stdbool.in.h; \
+@GL_GENERATE_STDBOOL_H_TRUE@ } > $@-t && \
+@GL_GENERATE_STDBOOL_H_TRUE@ mv $@-t $@
+@GL_GENERATE_STDBOOL_H_FALSE@lib/stdbool.h: $(top_builddir)/config.status
+@GL_GENERATE_STDBOOL_H_FALSE@ rm -f $@
+
+# We need the following in order to create <stddef.h> when the system
+# doesn't have one that works with the given compiler.
+@GL_GENERATE_STDDEF_H_TRUE@lib/stddef.h: lib/stddef.in.h $(top_builddir)/config.status
+@GL_GENERATE_STDDEF_H_TRUE@ $(AM_V_GEN)rm -f $@-t $@ && \
+@GL_GENERATE_STDDEF_H_TRUE@ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \
+@GL_GENERATE_STDDEF_H_TRUE@ sed -e 's|@''GUARD_PREFIX''@|GL|g' \
+@GL_GENERATE_STDDEF_H_TRUE@ -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
+@GL_GENERATE_STDDEF_H_TRUE@ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
+@GL_GENERATE_STDDEF_H_TRUE@ -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \
+@GL_GENERATE_STDDEF_H_TRUE@ -e 's|@''NEXT_STDDEF_H''@|$(NEXT_STDDEF_H)|g' \
+@GL_GENERATE_STDDEF_H_TRUE@ -e 's|@''HAVE_MAX_ALIGN_T''@|$(HAVE_MAX_ALIGN_T)|g' \
+@GL_GENERATE_STDDEF_H_TRUE@ -e 's|@''HAVE_WCHAR_T''@|$(HAVE_WCHAR_T)|g' \
+@GL_GENERATE_STDDEF_H_TRUE@ -e 's|@''REPLACE_NULL''@|$(REPLACE_NULL)|g' \
+@GL_GENERATE_STDDEF_H_TRUE@ < $(top_srcdir)/lib/stddef.in.h; \
+@GL_GENERATE_STDDEF_H_TRUE@ } > $@-t && \
+@GL_GENERATE_STDDEF_H_TRUE@ mv $@-t $@
+@GL_GENERATE_STDDEF_H_FALSE@lib/stddef.h: $(top_builddir)/config.status
+@GL_GENERATE_STDDEF_H_FALSE@ rm -f $@
+
+# We need the following in order to create <stdint.h> when the system
+# doesn't have one that works with the given compiler.
+@GL_GENERATE_STDINT_H_TRUE@lib/stdint.h: lib/stdint.in.h $(top_builddir)/config.status
+@GL_GENERATE_STDINT_H_TRUE@ $(AM_V_GEN)rm -f $@-t $@ && \
+@GL_GENERATE_STDINT_H_TRUE@ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
+@GL_GENERATE_STDINT_H_TRUE@ sed -e 's|@''GUARD_PREFIX''@|GL|g' \
+@GL_GENERATE_STDINT_H_TRUE@ -e 's/@''HAVE_STDINT_H''@/$(HAVE_STDINT_H)/g' \
+@GL_GENERATE_STDINT_H_TRUE@ -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
+@GL_GENERATE_STDINT_H_TRUE@ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
+@GL_GENERATE_STDINT_H_TRUE@ -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \
+@GL_GENERATE_STDINT_H_TRUE@ -e 's|@''NEXT_STDINT_H''@|$(NEXT_STDINT_H)|g' \
+@GL_GENERATE_STDINT_H_TRUE@ -e 's/@''HAVE_C99_STDINT_H''@/$(HAVE_C99_STDINT_H)/g' \
+@GL_GENERATE_STDINT_H_TRUE@ -e 's/@''HAVE_SYS_TYPES_H''@/$(HAVE_SYS_TYPES_H)/g' \
+@GL_GENERATE_STDINT_H_TRUE@ -e 's/@''HAVE_INTTYPES_H''@/$(HAVE_INTTYPES_H)/g' \
+@GL_GENERATE_STDINT_H_TRUE@ -e 's/@''HAVE_SYS_INTTYPES_H''@/$(HAVE_SYS_INTTYPES_H)/g' \
+@GL_GENERATE_STDINT_H_TRUE@ -e 's/@''HAVE_SYS_BITYPES_H''@/$(HAVE_SYS_BITYPES_H)/g' \
+@GL_GENERATE_STDINT_H_TRUE@ -e 's/@''HAVE_WCHAR_H''@/$(HAVE_WCHAR_H)/g' \
+@GL_GENERATE_STDINT_H_TRUE@ -e 's/@''HAVE_LONG_LONG_INT''@/$(HAVE_LONG_LONG_INT)/g' \
+@GL_GENERATE_STDINT_H_TRUE@ -e 's/@''HAVE_UNSIGNED_LONG_LONG_INT''@/$(HAVE_UNSIGNED_LONG_LONG_INT)/g' \
+@GL_GENERATE_STDINT_H_TRUE@ -e 's/@''APPLE_UNIVERSAL_BUILD''@/$(APPLE_UNIVERSAL_BUILD)/g' \
+@GL_GENERATE_STDINT_H_TRUE@ -e 's/@''BITSIZEOF_PTRDIFF_T''@/$(BITSIZEOF_PTRDIFF_T)/g' \
+@GL_GENERATE_STDINT_H_TRUE@ -e 's/@''PTRDIFF_T_SUFFIX''@/$(PTRDIFF_T_SUFFIX)/g' \
+@GL_GENERATE_STDINT_H_TRUE@ -e 's/@''BITSIZEOF_SIG_ATOMIC_T''@/$(BITSIZEOF_SIG_ATOMIC_T)/g' \
+@GL_GENERATE_STDINT_H_TRUE@ -e 's/@''HAVE_SIGNED_SIG_ATOMIC_T''@/$(HAVE_SIGNED_SIG_ATOMIC_T)/g' \
+@GL_GENERATE_STDINT_H_TRUE@ -e 's/@''SIG_ATOMIC_T_SUFFIX''@/$(SIG_ATOMIC_T_SUFFIX)/g' \
+@GL_GENERATE_STDINT_H_TRUE@ -e 's/@''BITSIZEOF_SIZE_T''@/$(BITSIZEOF_SIZE_T)/g' \
+@GL_GENERATE_STDINT_H_TRUE@ -e 's/@''SIZE_T_SUFFIX''@/$(SIZE_T_SUFFIX)/g' \
+@GL_GENERATE_STDINT_H_TRUE@ -e 's/@''BITSIZEOF_WCHAR_T''@/$(BITSIZEOF_WCHAR_T)/g' \
+@GL_GENERATE_STDINT_H_TRUE@ -e 's/@''HAVE_SIGNED_WCHAR_T''@/$(HAVE_SIGNED_WCHAR_T)/g' \
+@GL_GENERATE_STDINT_H_TRUE@ -e 's/@''WCHAR_T_SUFFIX''@/$(WCHAR_T_SUFFIX)/g' \
+@GL_GENERATE_STDINT_H_TRUE@ -e 's/@''BITSIZEOF_WINT_T''@/$(BITSIZEOF_WINT_T)/g' \
+@GL_GENERATE_STDINT_H_TRUE@ -e 's/@''HAVE_SIGNED_WINT_T''@/$(HAVE_SIGNED_WINT_T)/g' \
+@GL_GENERATE_STDINT_H_TRUE@ -e 's/@''WINT_T_SUFFIX''@/$(WINT_T_SUFFIX)/g' \
+@GL_GENERATE_STDINT_H_TRUE@ -e 's/@''GNULIB_OVERRIDES_WINT_T''@/$(GNULIB_OVERRIDES_WINT_T)/g' \
+@GL_GENERATE_STDINT_H_TRUE@ < $(top_srcdir)/lib/stdint.in.h; \
+@GL_GENERATE_STDINT_H_TRUE@ } > $@-t && \
+@GL_GENERATE_STDINT_H_TRUE@ mv $@-t $@
+@GL_GENERATE_STDINT_H_FALSE@lib/stdint.h: $(top_builddir)/config.status
+@GL_GENERATE_STDINT_H_FALSE@ rm -f $@
+
+# We need the following in order to create <stdio.h> when the system
+# doesn't have one that works with the given compiler.
+lib/stdio.h: lib/stdio.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_STDIO_H''@|$(NEXT_STDIO_H)|g' \
+ -e 's/@''GNULIB_DPRINTF''@/$(GNULIB_DPRINTF)/g' \
+ -e 's/@''GNULIB_FCLOSE''@/$(GNULIB_FCLOSE)/g' \
+ -e 's/@''GNULIB_FDOPEN''@/$(GNULIB_FDOPEN)/g' \
+ -e 's/@''GNULIB_FFLUSH''@/$(GNULIB_FFLUSH)/g' \
+ -e 's/@''GNULIB_FGETC''@/$(GNULIB_FGETC)/g' \
+ -e 's/@''GNULIB_FGETS''@/$(GNULIB_FGETS)/g' \
+ -e 's/@''GNULIB_FOPEN''@/$(GNULIB_FOPEN)/g' \
+ -e 's/@''GNULIB_FPRINTF''@/$(GNULIB_FPRINTF)/g' \
+ -e 's/@''GNULIB_FPRINTF_POSIX''@/$(GNULIB_FPRINTF_POSIX)/g' \
+ -e 's/@''GNULIB_FPURGE''@/$(GNULIB_FPURGE)/g' \
+ -e 's/@''GNULIB_FPUTC''@/$(GNULIB_FPUTC)/g' \
+ -e 's/@''GNULIB_FPUTS''@/$(GNULIB_FPUTS)/g' \
+ -e 's/@''GNULIB_FREAD''@/$(GNULIB_FREAD)/g' \
+ -e 's/@''GNULIB_FREOPEN''@/$(GNULIB_FREOPEN)/g' \
+ -e 's/@''GNULIB_FSCANF''@/$(GNULIB_FSCANF)/g' \
+ -e 's/@''GNULIB_FSEEK''@/$(GNULIB_FSEEK)/g' \
+ -e 's/@''GNULIB_FSEEKO''@/$(GNULIB_FSEEKO)/g' \
+ -e 's/@''GNULIB_FTELL''@/$(GNULIB_FTELL)/g' \
+ -e 's/@''GNULIB_FTELLO''@/$(GNULIB_FTELLO)/g' \
+ -e 's/@''GNULIB_FWRITE''@/$(GNULIB_FWRITE)/g' \
+ -e 's/@''GNULIB_GETC''@/$(GNULIB_GETC)/g' \
+ -e 's/@''GNULIB_GETCHAR''@/$(GNULIB_GETCHAR)/g' \
+ -e 's/@''GNULIB_GETDELIM''@/$(GNULIB_GETDELIM)/g' \
+ -e 's/@''GNULIB_GETLINE''@/$(GNULIB_GETLINE)/g' \
+ -e 's/@''GNULIB_OBSTACK_PRINTF''@/$(GNULIB_OBSTACK_PRINTF)/g' \
+ -e 's/@''GNULIB_OBSTACK_PRINTF_POSIX''@/$(GNULIB_OBSTACK_PRINTF_POSIX)/g' \
+ -e 's/@''GNULIB_PCLOSE''@/$(GNULIB_PCLOSE)/g' \
+ -e 's/@''GNULIB_PERROR''@/$(GNULIB_PERROR)/g' \
+ -e 's/@''GNULIB_POPEN''@/$(GNULIB_POPEN)/g' \
+ -e 's/@''GNULIB_PRINTF''@/$(GNULIB_PRINTF)/g' \
+ -e 's/@''GNULIB_PRINTF_POSIX''@/$(GNULIB_PRINTF_POSIX)/g' \
+ -e 's/@''GNULIB_PUTC''@/$(GNULIB_PUTC)/g' \
+ -e 's/@''GNULIB_PUTCHAR''@/$(GNULIB_PUTCHAR)/g' \
+ -e 's/@''GNULIB_PUTS''@/$(GNULIB_PUTS)/g' \
+ -e 's/@''GNULIB_REMOVE''@/$(GNULIB_REMOVE)/g' \
+ -e 's/@''GNULIB_RENAME''@/$(GNULIB_RENAME)/g' \
+ -e 's/@''GNULIB_RENAMEAT''@/$(GNULIB_RENAMEAT)/g' \
+ -e 's/@''GNULIB_SCANF''@/$(GNULIB_SCANF)/g' \
+ -e 's/@''GNULIB_SNPRINTF''@/$(GNULIB_SNPRINTF)/g' \
+ -e 's/@''GNULIB_SPRINTF_POSIX''@/$(GNULIB_SPRINTF_POSIX)/g' \
+ -e 's/@''GNULIB_STDIO_H_NONBLOCKING''@/$(GNULIB_STDIO_H_NONBLOCKING)/g' \
+ -e 's/@''GNULIB_STDIO_H_SIGPIPE''@/$(GNULIB_STDIO_H_SIGPIPE)/g' \
+ -e 's/@''GNULIB_TMPFILE''@/$(GNULIB_TMPFILE)/g' \
+ -e 's/@''GNULIB_VASPRINTF''@/$(GNULIB_VASPRINTF)/g' \
+ -e 's/@''GNULIB_VDPRINTF''@/$(GNULIB_VDPRINTF)/g' \
+ -e 's/@''GNULIB_VFPRINTF''@/$(GNULIB_VFPRINTF)/g' \
+ -e 's/@''GNULIB_VFPRINTF_POSIX''@/$(GNULIB_VFPRINTF_POSIX)/g' \
+ -e 's/@''GNULIB_VFSCANF''@/$(GNULIB_VFSCANF)/g' \
+ -e 's/@''GNULIB_VSCANF''@/$(GNULIB_VSCANF)/g' \
+ -e 's/@''GNULIB_VPRINTF''@/$(GNULIB_VPRINTF)/g' \
+ -e 's/@''GNULIB_VPRINTF_POSIX''@/$(GNULIB_VPRINTF_POSIX)/g' \
+ -e 's/@''GNULIB_VSNPRINTF''@/$(GNULIB_VSNPRINTF)/g' \
+ -e 's/@''GNULIB_VSPRINTF_POSIX''@/$(GNULIB_VSPRINTF_POSIX)/g' \
+ < $(top_srcdir)/lib/stdio.in.h | \
+ sed -e 's|@''HAVE_DECL_FPURGE''@|$(HAVE_DECL_FPURGE)|g' \
+ -e 's|@''HAVE_DECL_FSEEKO''@|$(HAVE_DECL_FSEEKO)|g' \
+ -e 's|@''HAVE_DECL_FTELLO''@|$(HAVE_DECL_FTELLO)|g' \
+ -e 's|@''HAVE_DECL_GETDELIM''@|$(HAVE_DECL_GETDELIM)|g' \
+ -e 's|@''HAVE_DECL_GETLINE''@|$(HAVE_DECL_GETLINE)|g' \
+ -e 's|@''HAVE_DECL_OBSTACK_PRINTF''@|$(HAVE_DECL_OBSTACK_PRINTF)|g' \
+ -e 's|@''HAVE_DECL_SNPRINTF''@|$(HAVE_DECL_SNPRINTF)|g' \
+ -e 's|@''HAVE_DECL_VSNPRINTF''@|$(HAVE_DECL_VSNPRINTF)|g' \
+ -e 's|@''HAVE_DPRINTF''@|$(HAVE_DPRINTF)|g' \
+ -e 's|@''HAVE_FSEEKO''@|$(HAVE_FSEEKO)|g' \
+ -e 's|@''HAVE_FTELLO''@|$(HAVE_FTELLO)|g' \
+ -e 's|@''HAVE_PCLOSE''@|$(HAVE_PCLOSE)|g' \
+ -e 's|@''HAVE_POPEN''@|$(HAVE_POPEN)|g' \
+ -e 's|@''HAVE_RENAMEAT''@|$(HAVE_RENAMEAT)|g' \
+ -e 's|@''HAVE_VASPRINTF''@|$(HAVE_VASPRINTF)|g' \
+ -e 's|@''HAVE_VDPRINTF''@|$(HAVE_VDPRINTF)|g' \
+ -e 's|@''REPLACE_DPRINTF''@|$(REPLACE_DPRINTF)|g' \
+ -e 's|@''REPLACE_FCLOSE''@|$(REPLACE_FCLOSE)|g' \
+ -e 's|@''REPLACE_FDOPEN''@|$(REPLACE_FDOPEN)|g' \
+ -e 's|@''REPLACE_FFLUSH''@|$(REPLACE_FFLUSH)|g' \
+ -e 's|@''REPLACE_FOPEN''@|$(REPLACE_FOPEN)|g' \
+ -e 's|@''REPLACE_FPRINTF''@|$(REPLACE_FPRINTF)|g' \
+ -e 's|@''REPLACE_FPURGE''@|$(REPLACE_FPURGE)|g' \
+ -e 's|@''REPLACE_FREOPEN''@|$(REPLACE_FREOPEN)|g' \
+ -e 's|@''REPLACE_FSEEK''@|$(REPLACE_FSEEK)|g' \
+ -e 's|@''REPLACE_FSEEKO''@|$(REPLACE_FSEEKO)|g' \
+ -e 's|@''REPLACE_FTELL''@|$(REPLACE_FTELL)|g' \
+ -e 's|@''REPLACE_FTELLO''@|$(REPLACE_FTELLO)|g' \
+ -e 's|@''REPLACE_GETDELIM''@|$(REPLACE_GETDELIM)|g' \
+ -e 's|@''REPLACE_GETLINE''@|$(REPLACE_GETLINE)|g' \
+ -e 's|@''REPLACE_OBSTACK_PRINTF''@|$(REPLACE_OBSTACK_PRINTF)|g' \
+ -e 's|@''REPLACE_PERROR''@|$(REPLACE_PERROR)|g' \
+ -e 's|@''REPLACE_POPEN''@|$(REPLACE_POPEN)|g' \
+ -e 's|@''REPLACE_PRINTF''@|$(REPLACE_PRINTF)|g' \
+ -e 's|@''REPLACE_REMOVE''@|$(REPLACE_REMOVE)|g' \
+ -e 's|@''REPLACE_RENAME''@|$(REPLACE_RENAME)|g' \
+ -e 's|@''REPLACE_RENAMEAT''@|$(REPLACE_RENAMEAT)|g' \
+ -e 's|@''REPLACE_SNPRINTF''@|$(REPLACE_SNPRINTF)|g' \
+ -e 's|@''REPLACE_SPRINTF''@|$(REPLACE_SPRINTF)|g' \
+ -e 's|@''REPLACE_STDIO_READ_FUNCS''@|$(REPLACE_STDIO_READ_FUNCS)|g' \
+ -e 's|@''REPLACE_STDIO_WRITE_FUNCS''@|$(REPLACE_STDIO_WRITE_FUNCS)|g' \
+ -e 's|@''REPLACE_TMPFILE''@|$(REPLACE_TMPFILE)|g' \
+ -e 's|@''REPLACE_VASPRINTF''@|$(REPLACE_VASPRINTF)|g' \
+ -e 's|@''REPLACE_VDPRINTF''@|$(REPLACE_VDPRINTF)|g' \
+ -e 's|@''REPLACE_VFPRINTF''@|$(REPLACE_VFPRINTF)|g' \
+ -e 's|@''REPLACE_VPRINTF''@|$(REPLACE_VPRINTF)|g' \
+ -e 's|@''REPLACE_VSNPRINTF''@|$(REPLACE_VSNPRINTF)|g' \
+ -e 's|@''REPLACE_VSPRINTF''@|$(REPLACE_VSPRINTF)|g' \
+ -e 's|@''ASM_SYMBOL_PREFIX''@|$(ASM_SYMBOL_PREFIX)|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)'; \
+ } > $@-t && \
+ mv $@-t $@
+
+# We need the following in order to create <stdlib.h> when the system
+# doesn't have one that works with the given compiler.
+lib/stdlib.h: lib/stdlib.in.h $(top_builddir)/config.status $(CXXDEFS_H) \
+ $(_NORETURN_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_STDLIB_H''@|$(NEXT_STDLIB_H)|g' \
+ -e 's/@''GNULIB__EXIT''@/$(GNULIB__EXIT)/g' \
+ -e 's/@''GNULIB_ATOLL''@/$(GNULIB_ATOLL)/g' \
+ -e 's/@''GNULIB_CALLOC_POSIX''@/$(GNULIB_CALLOC_POSIX)/g' \
+ -e 's/@''GNULIB_CANONICALIZE_FILE_NAME''@/$(GNULIB_CANONICALIZE_FILE_NAME)/g' \
+ -e 's/@''GNULIB_GETLOADAVG''@/$(GNULIB_GETLOADAVG)/g' \
+ -e 's/@''GNULIB_GETSUBOPT''@/$(GNULIB_GETSUBOPT)/g' \
+ -e 's/@''GNULIB_GRANTPT''@/$(GNULIB_GRANTPT)/g' \
+ -e 's/@''GNULIB_MALLOC_POSIX''@/$(GNULIB_MALLOC_POSIX)/g' \
+ -e 's/@''GNULIB_MBTOWC''@/$(GNULIB_MBTOWC)/g' \
+ -e 's/@''GNULIB_MKDTEMP''@/$(GNULIB_MKDTEMP)/g' \
+ -e 's/@''GNULIB_MKOSTEMP''@/$(GNULIB_MKOSTEMP)/g' \
+ -e 's/@''GNULIB_MKOSTEMPS''@/$(GNULIB_MKOSTEMPS)/g' \
+ -e 's/@''GNULIB_MKSTEMP''@/$(GNULIB_MKSTEMP)/g' \
+ -e 's/@''GNULIB_MKSTEMPS''@/$(GNULIB_MKSTEMPS)/g' \
+ -e 's/@''GNULIB_POSIX_OPENPT''@/$(GNULIB_POSIX_OPENPT)/g' \
+ -e 's/@''GNULIB_PTSNAME''@/$(GNULIB_PTSNAME)/g' \
+ -e 's/@''GNULIB_PTSNAME_R''@/$(GNULIB_PTSNAME_R)/g' \
+ -e 's/@''GNULIB_PUTENV''@/$(GNULIB_PUTENV)/g' \
+ -e 's/@''GNULIB_QSORT_R''@/$(GNULIB_QSORT_R)/g' \
+ -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_REALPATH''@/$(GNULIB_REALPATH)/g' \
+ -e 's/@''GNULIB_RPMATCH''@/$(GNULIB_RPMATCH)/g' \
+ -e 's/@''GNULIB_SECURE_GETENV''@/$(GNULIB_SECURE_GETENV)/g' \
+ -e 's/@''GNULIB_SETENV''@/$(GNULIB_SETENV)/g' \
+ -e 's/@''GNULIB_STRTOD''@/$(GNULIB_STRTOD)/g' \
+ -e 's/@''GNULIB_STRTOLL''@/$(GNULIB_STRTOLL)/g' \
+ -e 's/@''GNULIB_STRTOULL''@/$(GNULIB_STRTOULL)/g' \
+ -e 's/@''GNULIB_SYSTEM_POSIX''@/$(GNULIB_SYSTEM_POSIX)/g' \
+ -e 's/@''GNULIB_UNLOCKPT''@/$(GNULIB_UNLOCKPT)/g' \
+ -e 's/@''GNULIB_UNSETENV''@/$(GNULIB_UNSETENV)/g' \
+ -e 's/@''GNULIB_WCTOMB''@/$(GNULIB_WCTOMB)/g' \
+ < $(top_srcdir)/lib/stdlib.in.h | \
+ sed -e 's|@''HAVE__EXIT''@|$(HAVE__EXIT)|g' \
+ -e 's|@''HAVE_ATOLL''@|$(HAVE_ATOLL)|g' \
+ -e 's|@''HAVE_CANONICALIZE_FILE_NAME''@|$(HAVE_CANONICALIZE_FILE_NAME)|g' \
+ -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_MKDTEMP''@|$(HAVE_MKDTEMP)|g' \
+ -e 's|@''HAVE_MKOSTEMP''@|$(HAVE_MKOSTEMP)|g' \
+ -e 's|@''HAVE_MKOSTEMPS''@|$(HAVE_MKOSTEMPS)|g' \
+ -e 's|@''HAVE_MKSTEMP''@|$(HAVE_MKSTEMP)|g' \
+ -e 's|@''HAVE_MKSTEMPS''@|$(HAVE_MKSTEMPS)|g' \
+ -e 's|@''HAVE_POSIX_OPENPT''@|$(HAVE_POSIX_OPENPT)|g' \
+ -e 's|@''HAVE_PTSNAME''@|$(HAVE_PTSNAME)|g' \
+ -e 's|@''HAVE_PTSNAME_R''@|$(HAVE_PTSNAME_R)|g' \
+ -e 's|@''HAVE_QSORT_R''@|$(HAVE_QSORT_R)|g' \
+ -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_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_STRTOD''@|$(HAVE_STRTOD)|g' \
+ -e 's|@''HAVE_STRTOLL''@|$(HAVE_STRTOLL)|g' \
+ -e 's|@''HAVE_STRTOULL''@|$(HAVE_STRTOULL)|g' \
+ -e 's|@''HAVE_STRUCT_RANDOM_DATA''@|$(HAVE_STRUCT_RANDOM_DATA)|g' \
+ -e 's|@''HAVE_SYS_LOADAVG_H''@|$(HAVE_SYS_LOADAVG_H)|g' \
+ -e 's|@''HAVE_UNLOCKPT''@|$(HAVE_UNLOCKPT)|g' \
+ -e 's|@''HAVE_DECL_UNSETENV''@|$(HAVE_DECL_UNSETENV)|g' \
+ -e 's|@''REPLACE_CALLOC''@|$(REPLACE_CALLOC)|g' \
+ -e 's|@''REPLACE_CANONICALIZE_FILE_NAME''@|$(REPLACE_CANONICALIZE_FILE_NAME)|g' \
+ -e 's|@''REPLACE_MALLOC''@|$(REPLACE_MALLOC)|g' \
+ -e 's|@''REPLACE_MBTOWC''@|$(REPLACE_MBTOWC)|g' \
+ -e 's|@''REPLACE_MKSTEMP''@|$(REPLACE_MKSTEMP)|g' \
+ -e 's|@''REPLACE_PTSNAME''@|$(REPLACE_PTSNAME)|g' \
+ -e 's|@''REPLACE_PTSNAME_R''@|$(REPLACE_PTSNAME_R)|g' \
+ -e 's|@''REPLACE_PUTENV''@|$(REPLACE_PUTENV)|g' \
+ -e 's|@''REPLACE_QSORT_R''@|$(REPLACE_QSORT_R)|g' \
+ -e 's|@''REPLACE_RANDOM_R''@|$(REPLACE_RANDOM_R)|g' \
+ -e 's|@''REPLACE_REALLOC''@|$(REPLACE_REALLOC)|g' \
+ -e 's|@''REPLACE_REALPATH''@|$(REPLACE_REALPATH)|g' \
+ -e 's|@''REPLACE_SETENV''@|$(REPLACE_SETENV)|g' \
+ -e 's|@''REPLACE_STRTOD''@|$(REPLACE_STRTOD)|g' \
+ -e 's|@''REPLACE_UNSETENV''@|$(REPLACE_UNSETENV)|g' \
+ -e 's|@''REPLACE_WCTOMB''@|$(REPLACE_WCTOMB)|g' \
+ -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \
+ -e '/definition of _Noreturn/r $(_NORETURN_H)' \
+ -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \
+ -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)'; \
+ } > $@-t && \
+ mv $@-t $@
+
+# We need the following in order to create <string.h> when the system
+# doesn't have one that works with the given compiler.
+lib/string.h: lib/string.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_STRING_H''@|$(NEXT_STRING_H)|g' \
+ -e 's/@''GNULIB_FFSL''@/$(GNULIB_FFSL)/g' \
+ -e 's/@''GNULIB_FFSLL''@/$(GNULIB_FFSLL)/g' \
+ -e 's/@''GNULIB_MBSLEN''@/$(GNULIB_MBSLEN)/g' \
+ -e 's/@''GNULIB_MBSNLEN''@/$(GNULIB_MBSNLEN)/g' \
+ -e 's/@''GNULIB_MBSCHR''@/$(GNULIB_MBSCHR)/g' \
+ -e 's/@''GNULIB_MBSRCHR''@/$(GNULIB_MBSRCHR)/g' \
+ -e 's/@''GNULIB_MBSSTR''@/$(GNULIB_MBSSTR)/g' \
+ -e 's/@''GNULIB_MBSCASECMP''@/$(GNULIB_MBSCASECMP)/g' \
+ -e 's/@''GNULIB_MBSNCASECMP''@/$(GNULIB_MBSNCASECMP)/g' \
+ -e 's/@''GNULIB_MBSPCASECMP''@/$(GNULIB_MBSPCASECMP)/g' \
+ -e 's/@''GNULIB_MBSCASESTR''@/$(GNULIB_MBSCASESTR)/g' \
+ -e 's/@''GNULIB_MBSCSPN''@/$(GNULIB_MBSCSPN)/g' \
+ -e 's/@''GNULIB_MBSPBRK''@/$(GNULIB_MBSPBRK)/g' \
+ -e 's/@''GNULIB_MBSSPN''@/$(GNULIB_MBSSPN)/g' \
+ -e 's/@''GNULIB_MBSSEP''@/$(GNULIB_MBSSEP)/g' \
+ -e 's/@''GNULIB_MBSTOK_R''@/$(GNULIB_MBSTOK_R)/g' \
+ -e 's/@''GNULIB_MEMCHR''@/$(GNULIB_MEMCHR)/g' \
+ -e 's/@''GNULIB_MEMMEM''@/$(GNULIB_MEMMEM)/g' \
+ -e 's/@''GNULIB_MEMPCPY''@/$(GNULIB_MEMPCPY)/g' \
+ -e 's/@''GNULIB_MEMRCHR''@/$(GNULIB_MEMRCHR)/g' \
+ -e 's/@''GNULIB_RAWMEMCHR''@/$(GNULIB_RAWMEMCHR)/g' \
+ -e 's/@''GNULIB_STPCPY''@/$(GNULIB_STPCPY)/g' \
+ -e 's/@''GNULIB_STPNCPY''@/$(GNULIB_STPNCPY)/g' \
+ -e 's/@''GNULIB_STRCHRNUL''@/$(GNULIB_STRCHRNUL)/g' \
+ -e 's/@''GNULIB_STRDUP''@/$(GNULIB_STRDUP)/g' \
+ -e 's/@''GNULIB_STRNCAT''@/$(GNULIB_STRNCAT)/g' \
+ -e 's/@''GNULIB_STRNDUP''@/$(GNULIB_STRNDUP)/g' \
+ -e 's/@''GNULIB_STRNLEN''@/$(GNULIB_STRNLEN)/g' \
+ -e 's/@''GNULIB_STRPBRK''@/$(GNULIB_STRPBRK)/g' \
+ -e 's/@''GNULIB_STRSEP''@/$(GNULIB_STRSEP)/g' \
+ -e 's/@''GNULIB_STRSTR''@/$(GNULIB_STRSTR)/g' \
+ -e 's/@''GNULIB_STRCASESTR''@/$(GNULIB_STRCASESTR)/g' \
+ -e 's/@''GNULIB_STRTOK_R''@/$(GNULIB_STRTOK_R)/g' \
+ -e 's/@''GNULIB_STRERROR''@/$(GNULIB_STRERROR)/g' \
+ -e 's/@''GNULIB_STRERROR_R''@/$(GNULIB_STRERROR_R)/g' \
+ -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' \
+ -e 's|@''HAVE_FFSLL''@|$(HAVE_FFSLL)|g' \
+ -e 's|@''HAVE_MBSLEN''@|$(HAVE_MBSLEN)|g' \
+ -e 's|@''HAVE_MEMCHR''@|$(HAVE_MEMCHR)|g' \
+ -e 's|@''HAVE_DECL_MEMMEM''@|$(HAVE_DECL_MEMMEM)|g' \
+ -e 's|@''HAVE_MEMPCPY''@|$(HAVE_MEMPCPY)|g' \
+ -e 's|@''HAVE_DECL_MEMRCHR''@|$(HAVE_DECL_MEMRCHR)|g' \
+ -e 's|@''HAVE_RAWMEMCHR''@|$(HAVE_RAWMEMCHR)|g' \
+ -e 's|@''HAVE_STPCPY''@|$(HAVE_STPCPY)|g' \
+ -e 's|@''HAVE_STPNCPY''@|$(HAVE_STPNCPY)|g' \
+ -e 's|@''HAVE_STRCHRNUL''@|$(HAVE_STRCHRNUL)|g' \
+ -e 's|@''HAVE_DECL_STRDUP''@|$(HAVE_DECL_STRDUP)|g' \
+ -e 's|@''HAVE_DECL_STRNDUP''@|$(HAVE_DECL_STRNDUP)|g' \
+ -e 's|@''HAVE_DECL_STRNLEN''@|$(HAVE_DECL_STRNLEN)|g' \
+ -e 's|@''HAVE_STRPBRK''@|$(HAVE_STRPBRK)|g' \
+ -e 's|@''HAVE_STRSEP''@|$(HAVE_STRSEP)|g' \
+ -e 's|@''HAVE_STRCASESTR''@|$(HAVE_STRCASESTR)|g' \
+ -e 's|@''HAVE_DECL_STRTOK_R''@|$(HAVE_DECL_STRTOK_R)|g' \
+ -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_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_STRTOK_R''@|$(REPLACE_STRTOK_R)|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)' \
+ -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)'; \
+ < $(top_srcdir)/lib/string.in.h; \
+ } > $@-t && \
+ mv $@-t $@
+
+# We need the following in order to create <sys/stat.h> when the system
+# has one that is incomplete.
+lib/sys/stat.h: lib/sys_stat.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H)
+ $(AM_V_at)$(MKDIR_P) lib/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_STAT_H''@|$(NEXT_SYS_STAT_H)|g' \
+ -e 's|@''WINDOWS_64_BIT_ST_SIZE''@|$(WINDOWS_64_BIT_ST_SIZE)|g' \
+ -e 's/@''GNULIB_FCHMODAT''@/$(GNULIB_FCHMODAT)/g' \
+ -e 's/@''GNULIB_FSTAT''@/$(GNULIB_FSTAT)/g' \
+ -e 's/@''GNULIB_FSTATAT''@/$(GNULIB_FSTATAT)/g' \
+ -e 's/@''GNULIB_FUTIMENS''@/$(GNULIB_FUTIMENS)/g' \
+ -e 's/@''GNULIB_LCHMOD''@/$(GNULIB_LCHMOD)/g' \
+ -e 's/@''GNULIB_LSTAT''@/$(GNULIB_LSTAT)/g' \
+ -e 's/@''GNULIB_MKDIRAT''@/$(GNULIB_MKDIRAT)/g' \
+ -e 's/@''GNULIB_MKFIFO''@/$(GNULIB_MKFIFO)/g' \
+ -e 's/@''GNULIB_MKFIFOAT''@/$(GNULIB_MKFIFOAT)/g' \
+ -e 's/@''GNULIB_MKNOD''@/$(GNULIB_MKNOD)/g' \
+ -e 's/@''GNULIB_MKNODAT''@/$(GNULIB_MKNODAT)/g' \
+ -e 's/@''GNULIB_STAT''@/$(GNULIB_STAT)/g' \
+ -e 's/@''GNULIB_UTIMENSAT''@/$(GNULIB_UTIMENSAT)/g' \
+ -e 's|@''HAVE_FCHMODAT''@|$(HAVE_FCHMODAT)|g' \
+ -e 's|@''HAVE_FSTATAT''@|$(HAVE_FSTATAT)|g' \
+ -e 's|@''HAVE_FUTIMENS''@|$(HAVE_FUTIMENS)|g' \
+ -e 's|@''HAVE_LCHMOD''@|$(HAVE_LCHMOD)|g' \
+ -e 's|@''HAVE_LSTAT''@|$(HAVE_LSTAT)|g' \
+ -e 's|@''HAVE_MKDIRAT''@|$(HAVE_MKDIRAT)|g' \
+ -e 's|@''HAVE_MKFIFO''@|$(HAVE_MKFIFO)|g' \
+ -e 's|@''HAVE_MKFIFOAT''@|$(HAVE_MKFIFOAT)|g' \
+ -e 's|@''HAVE_MKNOD''@|$(HAVE_MKNOD)|g' \
+ -e 's|@''HAVE_MKNODAT''@|$(HAVE_MKNODAT)|g' \
+ -e 's|@''HAVE_UTIMENSAT''@|$(HAVE_UTIMENSAT)|g' \
+ -e 's|@''REPLACE_FSTAT''@|$(REPLACE_FSTAT)|g' \
+ -e 's|@''REPLACE_FSTATAT''@|$(REPLACE_FSTATAT)|g' \
+ -e 's|@''REPLACE_FUTIMENS''@|$(REPLACE_FUTIMENS)|g' \
+ -e 's|@''REPLACE_LSTAT''@|$(REPLACE_LSTAT)|g' \
+ -e 's|@''REPLACE_MKDIR''@|$(REPLACE_MKDIR)|g' \
+ -e 's|@''REPLACE_MKFIFO''@|$(REPLACE_MKFIFO)|g' \
+ -e 's|@''REPLACE_MKNOD''@|$(REPLACE_MKNOD)|g' \
+ -e 's|@''REPLACE_STAT''@|$(REPLACE_STAT)|g' \
+ -e 's|@''REPLACE_UTIMENSAT''@|$(REPLACE_UTIMENSAT)|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)' \
+ < $(top_srcdir)/lib/sys_stat.in.h; \
+ } > $@-t && \
+ mv $@-t $@
+
+# We need the following in order to create <sys/time.h> when the system
+# doesn't have one that works with the given compiler.
+lib/sys/time.h: lib/sys_time.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H)
+ $(AM_V_at)$(MKDIR_P) lib/sys
+ $(AM_V_GEN)rm -f $@-t $@ && \
+ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
+ sed -e 's|@''GUARD_PREFIX''@|GL|g' \
+ -e 's/@''HAVE_SYS_TIME_H''@/$(HAVE_SYS_TIME_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_TIME_H''@|$(NEXT_SYS_TIME_H)|g' \
+ -e 's/@''GNULIB_GETTIMEOFDAY''@/$(GNULIB_GETTIMEOFDAY)/g' \
+ -e 's|@''HAVE_WINSOCK2_H''@|$(HAVE_WINSOCK2_H)|g' \
+ -e 's/@''HAVE_GETTIMEOFDAY''@/$(HAVE_GETTIMEOFDAY)/g' \
+ -e 's/@''HAVE_STRUCT_TIMEVAL''@/$(HAVE_STRUCT_TIMEVAL)/g' \
+ -e 's/@''REPLACE_GETTIMEOFDAY''@/$(REPLACE_GETTIMEOFDAY)/g' \
+ -e 's/@''REPLACE_STRUCT_TIMEVAL''@/$(REPLACE_STRUCT_TIMEVAL)/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)' \
+ < $(top_srcdir)/lib/sys_time.in.h; \
+ } > $@-t && \
+ mv $@-t $@
+
+# We need the following in order to create <sys/types.h> when the system
+# doesn't have one that works with the given compiler.
+lib/sys/types.h: lib/sys_types.in.h $(top_builddir)/config.status
+ $(AM_V_at)$(MKDIR_P) lib/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_TYPES_H''@|$(NEXT_SYS_TYPES_H)|g' \
+ -e 's|@''WINDOWS_64_BIT_OFF_T''@|$(WINDOWS_64_BIT_OFF_T)|g' \
+ < $(top_srcdir)/lib/sys_types.in.h; \
+ } > $@-t && \
+ mv $@-t $@
+
+# We need the following in order to create <time.h> when the system
+# doesn't have one that works with the given compiler.
+lib/time.h: lib/time.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_TIME_H''@|$(NEXT_TIME_H)|g' \
+ -e 's/@''GNULIB_GETTIMEOFDAY''@/$(GNULIB_GETTIMEOFDAY)/g' \
+ -e 's/@''GNULIB_MKTIME''@/$(GNULIB_MKTIME)/g' \
+ -e 's/@''GNULIB_NANOSLEEP''@/$(GNULIB_NANOSLEEP)/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|@''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|@''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_TIMEGM''@|$(REPLACE_TIMEGM)|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' \
+ -e 's|@''UNISTD_H_DEFINES_STRUCT_TIMESPEC''@|$(UNISTD_H_DEFINES_STRUCT_TIMESPEC)|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)' \
+ < $(top_srcdir)/lib/time.in.h; \
+ } > $@-t && \
+ mv $@-t $@
+
+# We need the following in order to create an empty placeholder for
+# <unistd.h> when the system doesn't have one.
+lib/unistd.h: lib/unistd.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|@''HAVE_UNISTD_H''@|$(HAVE_UNISTD_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_UNISTD_H''@|$(NEXT_UNISTD_H)|g' \
+ -e 's|@''WINDOWS_64_BIT_OFF_T''@|$(WINDOWS_64_BIT_OFF_T)|g' \
+ -e 's/@''GNULIB_CHDIR''@/$(GNULIB_CHDIR)/g' \
+ -e 's/@''GNULIB_CHOWN''@/$(GNULIB_CHOWN)/g' \
+ -e 's/@''GNULIB_CLOSE''@/$(GNULIB_CLOSE)/g' \
+ -e 's/@''GNULIB_DUP''@/$(GNULIB_DUP)/g' \
+ -e 's/@''GNULIB_DUP2''@/$(GNULIB_DUP2)/g' \
+ -e 's/@''GNULIB_DUP3''@/$(GNULIB_DUP3)/g' \
+ -e 's/@''GNULIB_ENVIRON''@/$(GNULIB_ENVIRON)/g' \
+ -e 's/@''GNULIB_EUIDACCESS''@/$(GNULIB_EUIDACCESS)/g' \
+ -e 's/@''GNULIB_FACCESSAT''@/$(GNULIB_FACCESSAT)/g' \
+ -e 's/@''GNULIB_FCHDIR''@/$(GNULIB_FCHDIR)/g' \
+ -e 's/@''GNULIB_FCHOWNAT''@/$(GNULIB_FCHOWNAT)/g' \
+ -e 's/@''GNULIB_FDATASYNC''@/$(GNULIB_FDATASYNC)/g' \
+ -e 's/@''GNULIB_FSYNC''@/$(GNULIB_FSYNC)/g' \
+ -e 's/@''GNULIB_FTRUNCATE''@/$(GNULIB_FTRUNCATE)/g' \
+ -e 's/@''GNULIB_GETCWD''@/$(GNULIB_GETCWD)/g' \
+ -e 's/@''GNULIB_GETDOMAINNAME''@/$(GNULIB_GETDOMAINNAME)/g' \
+ -e 's/@''GNULIB_GETDTABLESIZE''@/$(GNULIB_GETDTABLESIZE)/g' \
+ -e 's/@''GNULIB_GETGROUPS''@/$(GNULIB_GETGROUPS)/g' \
+ -e 's/@''GNULIB_GETHOSTNAME''@/$(GNULIB_GETHOSTNAME)/g' \
+ -e 's/@''GNULIB_GETLOGIN''@/$(GNULIB_GETLOGIN)/g' \
+ -e 's/@''GNULIB_GETLOGIN_R''@/$(GNULIB_GETLOGIN_R)/g' \
+ -e 's/@''GNULIB_GETPAGESIZE''@/$(GNULIB_GETPAGESIZE)/g' \
+ -e 's/@''GNULIB_GETUSERSHELL''@/$(GNULIB_GETUSERSHELL)/g' \
+ -e 's/@''GNULIB_GROUP_MEMBER''@/$(GNULIB_GROUP_MEMBER)/g' \
+ -e 's/@''GNULIB_ISATTY''@/$(GNULIB_ISATTY)/g' \
+ -e 's/@''GNULIB_LCHOWN''@/$(GNULIB_LCHOWN)/g' \
+ -e 's/@''GNULIB_LINK''@/$(GNULIB_LINK)/g' \
+ -e 's/@''GNULIB_LINKAT''@/$(GNULIB_LINKAT)/g' \
+ -e 's/@''GNULIB_LSEEK''@/$(GNULIB_LSEEK)/g' \
+ -e 's/@''GNULIB_PIPE''@/$(GNULIB_PIPE)/g' \
+ -e 's/@''GNULIB_PIPE2''@/$(GNULIB_PIPE2)/g' \
+ -e 's/@''GNULIB_PREAD''@/$(GNULIB_PREAD)/g' \
+ -e 's/@''GNULIB_PWRITE''@/$(GNULIB_PWRITE)/g' \
+ -e 's/@''GNULIB_READ''@/$(GNULIB_READ)/g' \
+ -e 's/@''GNULIB_READLINK''@/$(GNULIB_READLINK)/g' \
+ -e 's/@''GNULIB_READLINKAT''@/$(GNULIB_READLINKAT)/g' \
+ -e 's/@''GNULIB_RMDIR''@/$(GNULIB_RMDIR)/g' \
+ -e 's/@''GNULIB_SETHOSTNAME''@/$(GNULIB_SETHOSTNAME)/g' \
+ -e 's/@''GNULIB_SLEEP''@/$(GNULIB_SLEEP)/g' \
+ -e 's/@''GNULIB_SYMLINK''@/$(GNULIB_SYMLINK)/g' \
+ -e 's/@''GNULIB_SYMLINKAT''@/$(GNULIB_SYMLINKAT)/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' \
+ -e 's/@''GNULIB_UNISTD_H_SIGPIPE''@/$(GNULIB_UNISTD_H_SIGPIPE)/g' \
+ -e 's/@''GNULIB_UNLINK''@/$(GNULIB_UNLINK)/g' \
+ -e 's/@''GNULIB_UNLINKAT''@/$(GNULIB_UNLINKAT)/g' \
+ -e 's/@''GNULIB_USLEEP''@/$(GNULIB_USLEEP)/g' \
+ -e 's/@''GNULIB_WRITE''@/$(GNULIB_WRITE)/g' \
+ < $(top_srcdir)/lib/unistd.in.h | \
+ sed -e 's|@''HAVE_CHOWN''@|$(HAVE_CHOWN)|g' \
+ -e 's|@''HAVE_DUP2''@|$(HAVE_DUP2)|g' \
+ -e 's|@''HAVE_DUP3''@|$(HAVE_DUP3)|g' \
+ -e 's|@''HAVE_EUIDACCESS''@|$(HAVE_EUIDACCESS)|g' \
+ -e 's|@''HAVE_FACCESSAT''@|$(HAVE_FACCESSAT)|g' \
+ -e 's|@''HAVE_FCHDIR''@|$(HAVE_FCHDIR)|g' \
+ -e 's|@''HAVE_FCHOWNAT''@|$(HAVE_FCHOWNAT)|g' \
+ -e 's|@''HAVE_FDATASYNC''@|$(HAVE_FDATASYNC)|g' \
+ -e 's|@''HAVE_FSYNC''@|$(HAVE_FSYNC)|g' \
+ -e 's|@''HAVE_FTRUNCATE''@|$(HAVE_FTRUNCATE)|g' \
+ -e 's|@''HAVE_GETDTABLESIZE''@|$(HAVE_GETDTABLESIZE)|g' \
+ -e 's|@''HAVE_GETGROUPS''@|$(HAVE_GETGROUPS)|g' \
+ -e 's|@''HAVE_GETHOSTNAME''@|$(HAVE_GETHOSTNAME)|g' \
+ -e 's|@''HAVE_GETPAGESIZE''@|$(HAVE_GETPAGESIZE)|g' \
+ -e 's|@''HAVE_GROUP_MEMBER''@|$(HAVE_GROUP_MEMBER)|g' \
+ -e 's|@''HAVE_LCHOWN''@|$(HAVE_LCHOWN)|g' \
+ -e 's|@''HAVE_LINK''@|$(HAVE_LINK)|g' \
+ -e 's|@''HAVE_LINKAT''@|$(HAVE_LINKAT)|g' \
+ -e 's|@''HAVE_PIPE''@|$(HAVE_PIPE)|g' \
+ -e 's|@''HAVE_PIPE2''@|$(HAVE_PIPE2)|g' \
+ -e 's|@''HAVE_PREAD''@|$(HAVE_PREAD)|g' \
+ -e 's|@''HAVE_PWRITE''@|$(HAVE_PWRITE)|g' \
+ -e 's|@''HAVE_READLINK''@|$(HAVE_READLINK)|g' \
+ -e 's|@''HAVE_READLINKAT''@|$(HAVE_READLINKAT)|g' \
+ -e 's|@''HAVE_SETHOSTNAME''@|$(HAVE_SETHOSTNAME)|g' \
+ -e 's|@''HAVE_SLEEP''@|$(HAVE_SLEEP)|g' \
+ -e 's|@''HAVE_SYMLINK''@|$(HAVE_SYMLINK)|g' \
+ -e 's|@''HAVE_SYMLINKAT''@|$(HAVE_SYMLINKAT)|g' \
+ -e 's|@''HAVE_UNLINKAT''@|$(HAVE_UNLINKAT)|g' \
+ -e 's|@''HAVE_USLEEP''@|$(HAVE_USLEEP)|g' \
+ -e 's|@''HAVE_DECL_ENVIRON''@|$(HAVE_DECL_ENVIRON)|g' \
+ -e 's|@''HAVE_DECL_FCHDIR''@|$(HAVE_DECL_FCHDIR)|g' \
+ -e 's|@''HAVE_DECL_FDATASYNC''@|$(HAVE_DECL_FDATASYNC)|g' \
+ -e 's|@''HAVE_DECL_GETDOMAINNAME''@|$(HAVE_DECL_GETDOMAINNAME)|g' \
+ -e 's|@''HAVE_DECL_GETLOGIN''@|$(HAVE_DECL_GETLOGIN)|g' \
+ -e 's|@''HAVE_DECL_GETLOGIN_R''@|$(HAVE_DECL_GETLOGIN_R)|g' \
+ -e 's|@''HAVE_DECL_GETPAGESIZE''@|$(HAVE_DECL_GETPAGESIZE)|g' \
+ -e 's|@''HAVE_DECL_GETUSERSHELL''@|$(HAVE_DECL_GETUSERSHELL)|g' \
+ -e 's|@''HAVE_DECL_SETHOSTNAME''@|$(HAVE_DECL_SETHOSTNAME)|g' \
+ -e 's|@''HAVE_DECL_TTYNAME_R''@|$(HAVE_DECL_TTYNAME_R)|g' \
+ -e 's|@''HAVE_OS_H''@|$(HAVE_OS_H)|g' \
+ -e 's|@''HAVE_SYS_PARAM_H''@|$(HAVE_SYS_PARAM_H)|g' \
+ | \
+ sed -e 's|@''REPLACE_CHOWN''@|$(REPLACE_CHOWN)|g' \
+ -e 's|@''REPLACE_CLOSE''@|$(REPLACE_CLOSE)|g' \
+ -e 's|@''REPLACE_DUP''@|$(REPLACE_DUP)|g' \
+ -e 's|@''REPLACE_DUP2''@|$(REPLACE_DUP2)|g' \
+ -e 's|@''REPLACE_FCHOWNAT''@|$(REPLACE_FCHOWNAT)|g' \
+ -e 's|@''REPLACE_FTRUNCATE''@|$(REPLACE_FTRUNCATE)|g' \
+ -e 's|@''REPLACE_GETCWD''@|$(REPLACE_GETCWD)|g' \
+ -e 's|@''REPLACE_GETDOMAINNAME''@|$(REPLACE_GETDOMAINNAME)|g' \
+ -e 's|@''REPLACE_GETDTABLESIZE''@|$(REPLACE_GETDTABLESIZE)|g' \
+ -e 's|@''REPLACE_GETLOGIN_R''@|$(REPLACE_GETLOGIN_R)|g' \
+ -e 's|@''REPLACE_GETGROUPS''@|$(REPLACE_GETGROUPS)|g' \
+ -e 's|@''REPLACE_GETPAGESIZE''@|$(REPLACE_GETPAGESIZE)|g' \
+ -e 's|@''REPLACE_ISATTY''@|$(REPLACE_ISATTY)|g' \
+ -e 's|@''REPLACE_LCHOWN''@|$(REPLACE_LCHOWN)|g' \
+ -e 's|@''REPLACE_LINK''@|$(REPLACE_LINK)|g' \
+ -e 's|@''REPLACE_LINKAT''@|$(REPLACE_LINKAT)|g' \
+ -e 's|@''REPLACE_LSEEK''@|$(REPLACE_LSEEK)|g' \
+ -e 's|@''REPLACE_PREAD''@|$(REPLACE_PREAD)|g' \
+ -e 's|@''REPLACE_PWRITE''@|$(REPLACE_PWRITE)|g' \
+ -e 's|@''REPLACE_READ''@|$(REPLACE_READ)|g' \
+ -e 's|@''REPLACE_READLINK''@|$(REPLACE_READLINK)|g' \
+ -e 's|@''REPLACE_READLINKAT''@|$(REPLACE_READLINKAT)|g' \
+ -e 's|@''REPLACE_RMDIR''@|$(REPLACE_RMDIR)|g' \
+ -e 's|@''REPLACE_SLEEP''@|$(REPLACE_SLEEP)|g' \
+ -e 's|@''REPLACE_SYMLINK''@|$(REPLACE_SYMLINK)|g' \
+ -e 's|@''REPLACE_SYMLINKAT''@|$(REPLACE_SYMLINKAT)|g' \
+ -e 's|@''REPLACE_TTYNAME_R''@|$(REPLACE_TTYNAME_R)|g' \
+ -e 's|@''REPLACE_UNLINK''@|$(REPLACE_UNLINK)|g' \
+ -e 's|@''REPLACE_UNLINKAT''@|$(REPLACE_UNLINKAT)|g' \
+ -e 's|@''REPLACE_USLEEP''@|$(REPLACE_USLEEP)|g' \
+ -e 's|@''REPLACE_WRITE''@|$(REPLACE_WRITE)|g' \
+ -e 's|@''UNISTD_H_HAVE_WINSOCK2_H''@|$(UNISTD_H_HAVE_WINSOCK2_H)|g' \
+ -e 's|@''UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS''@|$(UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS)|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)'; \
+ } > $@-t && \
+ mv $@-t $@
+
+# We need the following in order to create <wchar.h> when the system
+# version does not work standalone.
+lib/wchar.h: lib/wchar.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|@''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/@''GNULIB_OVERRIDES_WINT_T''@/$(GNULIB_OVERRIDES_WINT_T)/g' \
+ -e 's/@''GNULIB_BTOWC''@/$(GNULIB_BTOWC)/g' \
+ -e 's/@''GNULIB_WCTOB''@/$(GNULIB_WCTOB)/g' \
+ -e 's/@''GNULIB_MBSINIT''@/$(GNULIB_MBSINIT)/g' \
+ -e 's/@''GNULIB_MBRTOWC''@/$(GNULIB_MBRTOWC)/g' \
+ -e 's/@''GNULIB_MBRLEN''@/$(GNULIB_MBRLEN)/g' \
+ -e 's/@''GNULIB_MBSRTOWCS''@/$(GNULIB_MBSRTOWCS)/g' \
+ -e 's/@''GNULIB_MBSNRTOWCS''@/$(GNULIB_MBSNRTOWCS)/g' \
+ -e 's/@''GNULIB_WCRTOMB''@/$(GNULIB_WCRTOMB)/g' \
+ -e 's/@''GNULIB_WCSRTOMBS''@/$(GNULIB_WCSRTOMBS)/g' \
+ -e 's/@''GNULIB_WCSNRTOMBS''@/$(GNULIB_WCSNRTOMBS)/g' \
+ -e 's/@''GNULIB_WCWIDTH''@/$(GNULIB_WCWIDTH)/g' \
+ -e 's/@''GNULIB_WMEMCHR''@/$(GNULIB_WMEMCHR)/g' \
+ -e 's/@''GNULIB_WMEMCMP''@/$(GNULIB_WMEMCMP)/g' \
+ -e 's/@''GNULIB_WMEMCPY''@/$(GNULIB_WMEMCPY)/g' \
+ -e 's/@''GNULIB_WMEMMOVE''@/$(GNULIB_WMEMMOVE)/g' \
+ -e 's/@''GNULIB_WMEMSET''@/$(GNULIB_WMEMSET)/g' \
+ -e 's/@''GNULIB_WCSLEN''@/$(GNULIB_WCSLEN)/g' \
+ -e 's/@''GNULIB_WCSNLEN''@/$(GNULIB_WCSNLEN)/g' \
+ -e 's/@''GNULIB_WCSCPY''@/$(GNULIB_WCSCPY)/g' \
+ -e 's/@''GNULIB_WCPCPY''@/$(GNULIB_WCPCPY)/g' \
+ -e 's/@''GNULIB_WCSNCPY''@/$(GNULIB_WCSNCPY)/g' \
+ -e 's/@''GNULIB_WCPNCPY''@/$(GNULIB_WCPNCPY)/g' \
+ -e 's/@''GNULIB_WCSCAT''@/$(GNULIB_WCSCAT)/g' \
+ -e 's/@''GNULIB_WCSNCAT''@/$(GNULIB_WCSNCAT)/g' \
+ -e 's/@''GNULIB_WCSCMP''@/$(GNULIB_WCSCMP)/g' \
+ -e 's/@''GNULIB_WCSNCMP''@/$(GNULIB_WCSNCMP)/g' \
+ -e 's/@''GNULIB_WCSCASECMP''@/$(GNULIB_WCSCASECMP)/g' \
+ -e 's/@''GNULIB_WCSNCASECMP''@/$(GNULIB_WCSNCASECMP)/g' \
+ -e 's/@''GNULIB_WCSCOLL''@/$(GNULIB_WCSCOLL)/g' \
+ -e 's/@''GNULIB_WCSXFRM''@/$(GNULIB_WCSXFRM)/g' \
+ -e 's/@''GNULIB_WCSDUP''@/$(GNULIB_WCSDUP)/g' \
+ -e 's/@''GNULIB_WCSCHR''@/$(GNULIB_WCSCHR)/g' \
+ -e 's/@''GNULIB_WCSRCHR''@/$(GNULIB_WCSRCHR)/g' \
+ -e 's/@''GNULIB_WCSCSPN''@/$(GNULIB_WCSCSPN)/g' \
+ -e 's/@''GNULIB_WCSSPN''@/$(GNULIB_WCSSPN)/g' \
+ -e 's/@''GNULIB_WCSPBRK''@/$(GNULIB_WCSPBRK)/g' \
+ -e 's/@''GNULIB_WCSSTR''@/$(GNULIB_WCSSTR)/g' \
+ -e 's/@''GNULIB_WCSTOK''@/$(GNULIB_WCSTOK)/g' \
+ -e 's/@''GNULIB_WCSWIDTH''@/$(GNULIB_WCSWIDTH)/g' \
+ < $(top_srcdir)/lib/wchar.in.h | \
+ sed -e 's|@''HAVE_WINT_T''@|$(HAVE_WINT_T)|g' \
+ -e 's|@''HAVE_BTOWC''@|$(HAVE_BTOWC)|g' \
+ -e 's|@''HAVE_MBSINIT''@|$(HAVE_MBSINIT)|g' \
+ -e 's|@''HAVE_MBRTOWC''@|$(HAVE_MBRTOWC)|g' \
+ -e 's|@''HAVE_MBRLEN''@|$(HAVE_MBRLEN)|g' \
+ -e 's|@''HAVE_MBSRTOWCS''@|$(HAVE_MBSRTOWCS)|g' \
+ -e 's|@''HAVE_MBSNRTOWCS''@|$(HAVE_MBSNRTOWCS)|g' \
+ -e 's|@''HAVE_WCRTOMB''@|$(HAVE_WCRTOMB)|g' \
+ -e 's|@''HAVE_WCSRTOMBS''@|$(HAVE_WCSRTOMBS)|g' \
+ -e 's|@''HAVE_WCSNRTOMBS''@|$(HAVE_WCSNRTOMBS)|g' \
+ -e 's|@''HAVE_WMEMCHR''@|$(HAVE_WMEMCHR)|g' \
+ -e 's|@''HAVE_WMEMCMP''@|$(HAVE_WMEMCMP)|g' \
+ -e 's|@''HAVE_WMEMCPY''@|$(HAVE_WMEMCPY)|g' \
+ -e 's|@''HAVE_WMEMMOVE''@|$(HAVE_WMEMMOVE)|g' \
+ -e 's|@''HAVE_WMEMSET''@|$(HAVE_WMEMSET)|g' \
+ -e 's|@''HAVE_WCSLEN''@|$(HAVE_WCSLEN)|g' \
+ -e 's|@''HAVE_WCSNLEN''@|$(HAVE_WCSNLEN)|g' \
+ -e 's|@''HAVE_WCSCPY''@|$(HAVE_WCSCPY)|g' \
+ -e 's|@''HAVE_WCPCPY''@|$(HAVE_WCPCPY)|g' \
+ -e 's|@''HAVE_WCSNCPY''@|$(HAVE_WCSNCPY)|g' \
+ -e 's|@''HAVE_WCPNCPY''@|$(HAVE_WCPNCPY)|g' \
+ -e 's|@''HAVE_WCSCAT''@|$(HAVE_WCSCAT)|g' \
+ -e 's|@''HAVE_WCSNCAT''@|$(HAVE_WCSNCAT)|g' \
+ -e 's|@''HAVE_WCSCMP''@|$(HAVE_WCSCMP)|g' \
+ -e 's|@''HAVE_WCSNCMP''@|$(HAVE_WCSNCMP)|g' \
+ -e 's|@''HAVE_WCSCASECMP''@|$(HAVE_WCSCASECMP)|g' \
+ -e 's|@''HAVE_WCSNCASECMP''@|$(HAVE_WCSNCASECMP)|g' \
+ -e 's|@''HAVE_WCSCOLL''@|$(HAVE_WCSCOLL)|g' \
+ -e 's|@''HAVE_WCSXFRM''@|$(HAVE_WCSXFRM)|g' \
+ -e 's|@''HAVE_WCSDUP''@|$(HAVE_WCSDUP)|g' \
+ -e 's|@''HAVE_WCSCHR''@|$(HAVE_WCSCHR)|g' \
+ -e 's|@''HAVE_WCSRCHR''@|$(HAVE_WCSRCHR)|g' \
+ -e 's|@''HAVE_WCSCSPN''@|$(HAVE_WCSCSPN)|g' \
+ -e 's|@''HAVE_WCSSPN''@|$(HAVE_WCSSPN)|g' \
+ -e 's|@''HAVE_WCSPBRK''@|$(HAVE_WCSPBRK)|g' \
+ -e 's|@''HAVE_WCSSTR''@|$(HAVE_WCSSTR)|g' \
+ -e 's|@''HAVE_WCSTOK''@|$(HAVE_WCSTOK)|g' \
+ -e 's|@''HAVE_WCSWIDTH''@|$(HAVE_WCSWIDTH)|g' \
+ -e 's|@''HAVE_DECL_WCTOB''@|$(HAVE_DECL_WCTOB)|g' \
+ -e 's|@''HAVE_DECL_WCWIDTH''@|$(HAVE_DECL_WCWIDTH)|g' \
+ | \
+ sed -e 's|@''REPLACE_MBSTATE_T''@|$(REPLACE_MBSTATE_T)|g' \
+ -e 's|@''REPLACE_BTOWC''@|$(REPLACE_BTOWC)|g' \
+ -e 's|@''REPLACE_WCTOB''@|$(REPLACE_WCTOB)|g' \
+ -e 's|@''REPLACE_MBSINIT''@|$(REPLACE_MBSINIT)|g' \
+ -e 's|@''REPLACE_MBRTOWC''@|$(REPLACE_MBRTOWC)|g' \
+ -e 's|@''REPLACE_MBRLEN''@|$(REPLACE_MBRLEN)|g' \
+ -e 's|@''REPLACE_MBSRTOWCS''@|$(REPLACE_MBSRTOWCS)|g' \
+ -e 's|@''REPLACE_MBSNRTOWCS''@|$(REPLACE_MBSNRTOWCS)|g' \
+ -e 's|@''REPLACE_WCRTOMB''@|$(REPLACE_WCRTOMB)|g' \
+ -e 's|@''REPLACE_WCSRTOMBS''@|$(REPLACE_WCSRTOMBS)|g' \
+ -e 's|@''REPLACE_WCSNRTOMBS''@|$(REPLACE_WCSNRTOMBS)|g' \
+ -e 's|@''REPLACE_WCWIDTH''@|$(REPLACE_WCWIDTH)|g' \
+ -e 's|@''REPLACE_WCSWIDTH''@|$(REPLACE_WCSWIDTH)|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)'; \
+ } > $@-t && \
+ mv $@-t $@
+
+# We need the following in order to create <wctype.h> when the system
+# doesn't have one that works with the given compiler.
+lib/wctype.h: lib/wctype.in.h $(top_builddir)/config.status $(CXXDEFS_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/@''HAVE_WCTYPE_H''@/$(HAVE_WCTYPE_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_WCTYPE_H''@|$(NEXT_WCTYPE_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' \
+ -e 's/@''GNULIB_ISWCTYPE''@/$(GNULIB_ISWCTYPE)/g' \
+ -e 's/@''GNULIB_WCTRANS''@/$(GNULIB_WCTRANS)/g' \
+ -e 's/@''GNULIB_TOWCTRANS''@/$(GNULIB_TOWCTRANS)/g' \
+ -e 's/@''HAVE_ISWBLANK''@/$(HAVE_ISWBLANK)/g' \
+ -e 's/@''HAVE_ISWCNTRL''@/$(HAVE_ISWCNTRL)/g' \
+ -e 's/@''HAVE_WCTYPE_T''@/$(HAVE_WCTYPE_T)/g' \
+ -e 's/@''HAVE_WCTRANS_T''@/$(HAVE_WCTRANS_T)/g' \
+ -e 's/@''HAVE_WINT_T''@/$(HAVE_WINT_T)/g' \
+ -e 's/@''REPLACE_ISWBLANK''@/$(REPLACE_ISWBLANK)/g' \
+ -e 's/@''REPLACE_ISWCNTRL''@/$(REPLACE_ISWCNTRL)/g' \
+ -e 's/@''REPLACE_TOWLOWER''@/$(REPLACE_TOWLOWER)/g' \
+ -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \
+ -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \
+ < $(top_srcdir)/lib/wctype.in.h; \
+ } > $@-t && \
+ mv $@-t $@
+
+mostlyclean-local: mostlyclean-generic
+ @for dir in '' $(MOSTLYCLEANDIRS); do \
+ if test -n "$$dir" && test -d $$dir; then \
+ echo "rmdir $$dir"; rmdir $$dir; \
+ fi; \
+ done; \
+ :
+
+$(sed_sed_OBJECTS): $(BUILT_SOURCES)
+sed/version.c: Makefile
+ $(AM_V_GEN)rm -f $@
+ $(AM_V_at)printf '#include <config.h>\n' > $@t
+ $(AM_V_at)printf 'char const *Version = "$(PACKAGE_VERSION)";\n' >> $@t
+ $(AM_V_at)chmod a-w $@t
+ $(AM_V_at)mv $@t $@
+sed/version.h: Makefile
+ $(AM_V_GEN)rm -f $@
+ $(AM_V_at)printf 'extern char const *Version;\n' > $@t
+ $(AM_V_at)chmod a-w $@t
+ $(AM_V_at)mv $@t $@
+
+doc/sed.1: sed/sed$(EXEEXT) .version $(srcdir)/doc/sed.x
+ $(AM_V_GEN)$(MKDIR_P) doc
+ $(AM_V_at)rm -rf $@ $@-t
+ $(AM_V_at)$(HELP2MAN) \
+ --name 'stream editor for filtering and transforming text' \
+ -p sed --include $(srcdir)/doc/sed.x \
+ -o $@-t $(SEDBIN) \
+ && chmod a-w $@-t \
+ && mv $@-t $@
+
+# automake makes `check' depend on $(TESTS). Declare
+# dummy targets for $(TESTS) so that make does not complain.
+
+.PHONY: $(SEDTESTS)
+$(SEDTESTS):
+
+# Remove the generated sed.1 file, but only for a non-srcdir build.
+# Without this, 'make distcheck's final comparison would fail.
+# Also remove lib/.deps/{getfilecon,obstack}.Po,
+# which are left behind by bleeding edge automake.
+# Without this, 'make distcheck's final comparison would fail.
+distclean-local:
+ test x$(srcdir) = x$(builddir) || rm -f $(dist_man_MANS)
+ rm -f lib/.deps/getfilecon.Po lib/.deps/obstack.Po
+
# 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 e3c94c7..6c610f2 100644
--- a/NEWS
+++ b/NEWS
@@ -1,4 +1,97 @@
-Sed 4.2.2
+GNU sed NEWS -*- outline -*-
+
+* Noteworthy changes in release 4.3 (2016-12-30) [stable]
+
+** Improvements
+
+ sed's regular expression matching is now typically 10x faster
+
+ sed now uses unlocked-io where available, resulting in faster I/O
+ operations.
+
+** Bug fixes
+
+ sed no longer mishandles anchors ^/$ in multiline regex (s///mg)
+ with -z option (NUL terminated lines). [Bug introducted in sed-4.2.2
+ with the initial implementation of -z]
+
+ sed no longer accepts a ":" command without a label; before, it would
+ treat that as defining a label whose name is empty, and subsequent
+ label-free "t" and "b" commands would use that label. Now, sed emits
+ a diagnostic and fails for that invalid construct.
+
+ sed no longer accesses uninitialized memory when processing certain
+ invalid multibyte sequences. Demonstrate with this:
+ echo a | LC_ALL=ja_JP.eucJP valgrind sed/sed 's/a/b\U\xb2c/'
+ The error appears to have been introduced with the sed-4.0a release.
+
+ The 'y' (transliterate) operator once again works with a NUL byte
+ on the RHS. E.g., sed 'y/b/\x00/' now works like tr b '\0'. GNU sed
+ has never before recognized \x00 in this context. However, sed-3.02
+ and prior did accept a literal NUL byte in the RHS, which was possible
+ only when reading a script from a file. For example, this:
+ echo abc|sed -f <(printf 'y/b/\x00/\n')|cat -A
+ is what stopped working. [bug introduced some time after sed-3.02 and
+ prior to the first sed-4* test release]
+
+ When the closed-above line number ranges of N editing commands
+ overlap (N>1), sed would apply commands 2..N to the line just
+ beyond the largest range endpoint.
+ [bug introduced some time after sed-4.09 and prior to release in sed-4.1]
+ Before, this command would mistakenly modify line 5:
+ $ seq 6|sed '2,4d;2,3s/^/x/;3,4s/^/y/'
+ 1
+ yx5
+ 6
+ Now, it does not:
+ $ seq 6|sed '2,4d;2,3s/^/x/;3,4s/^/y/'
+ 1
+ 5
+ 6
+
+ An erroneous sed invocation like "echo > F; sed -i s//b/ F" no longer
+ leaves behind a temporary file. Before, that command would create a file
+ alongside F with a name matching /^sed......$/ and fail to remove it.
+
+ sed --follow-symlinks now works again for stdin.
+ [bug introduced in sed-4.2.2]
+
+ sed no longer elides invalid bytes in a substitution RHS.
+ Now, sed copies such bytes into the output, just as Perl does.
+ [bug introduced in sed-4.1 -- it was also present prior to 4.0.6]
+
+ sed no longer prints extraneous character when a backslash follows \c.
+ '\c\\' generates control character ^\ (ASCII 0x1C).
+ Other characters after the second backslash are rejected (e.g. '\c\d').
+ [bug introduced in the sed-4.0.* releases]
+
+ sed no longer mishandles incomplete multibyte sequences in s,y commands
+ and valid multibyte SHIFT-JIS characters in character classes.
+ Previously, the following commands would fail:
+ LC_ALL=en_US.UTF-8 sed $'s/\316/X/'
+ LC_ALL=ja_JP.shiftjis sed $'/[\203]/]/p'
+ [bug introduced some time after sed-4.1.5 and before sed-4.2.1]
+
+** Feature removal
+
+ The "L" command (format a paragraph like the fmt(1) command would)
+ has been listed in the documentation as a failed experiment for at
+ least 10 years. That command is now removed.
+
+** Build-related
+
+ "make dist" now builds .tar.xz files, rather than .tar.gz ones.
+ xz is portable enough and in wide-enough use that distributing
+ only .tar.xz files is enough. It has been fine for coreutils, grep,
+ diffutils and parted for a few years.
+
+
+** New Features
+
+ new --sandbox option rejects programs with r/w/e commands.
+
+
+* Noteworthy changes in release 4.2.2 (2012-12-22) [stable]
* don't misbehave (truncate input) for lines of length 2^31 and longer
@@ -120,7 +213,7 @@ Sed 4.1.1
* yield an error when running -i on terminals or other non regular files
-* do not interpret - as stdin when running in in-place editing mode
+* do not interpret - as stdin when using in-place editing mode
* fix bug that prevented 's' command modifiers from working
@@ -426,15 +519,15 @@ NUL character. Had the glibc folk fix a bug in lib/regex.c where
* The s/// command now understands the following escapes
(in both halves):
- \a an "alert" (BEL)
- \f a form-feed
- \n a newline
- \r a carriage-return
- \t a horizontal tab
- \v a vertical tab
- \oNNN a character with the octal value NNN
- \dNNN a character with the decimal value NNN
- \xNN a character with the hexadecimal value NN
+ \a an "alert" (BEL)
+ \f a form-feed
+ \n a newline
+ \r a carriage-return
+ \t a horizontal tab
+ \v a vertical tab
+ \oNNN a character with the octal value NNN
+ \dNNN a character with the decimal value NNN
+ \xNN a character with the hexadecimal value NN
This behavior is disabled if POSIXLY_CORRECT is set, at least for the
time being (until I can be convinced that this behavior does not violate
the POSIX standard). (Incidentally, \b (backspace) was omitted because
diff --git a/README b/README
index 3da31c2..b746b5c 100644
--- a/README
+++ b/README
@@ -1,6 +1,8 @@
This is the GNU implementation of sed, the Unix stream editor.
-See the NEWS file for a brief summary and the ChangeLog for
+GNU Sed website: https://www.gnu.org/software/sed/
+
+See the NEWS file for a brief summary and the ChangeLog for
more detailed descriptions of changes.
See the file INSTALL for generic compilation and installation
@@ -8,6 +10,8 @@ instructions.
See the file BUGS for instructions about reporting bugs.
-The file README.boot gives instructions for making a "bootstrap"
-version of sed on systems which lack any pre-existing and working
-version of sed.
+See the files AUTHORS and THANKS for a list of authors and other contributors.
+
+After installation run 'sed --help' or 'man sed' for short usage information,
+and 'info sed' for the complete manual. The manual is also available on
+sed's website.
diff --git a/README-alpha b/README-alpha
deleted file mode 100644
index 50bda6b..0000000
--- a/README-alpha
+++ /dev/null
@@ -1,8 +0,0 @@
-This is an alpha version of GNU sed. Please try it on a wide
-range of scripts (especially configure scripts) and submit
-bug reports to bug-sed@gnu.org.
-
-Thanks,
-
-Paolo Bonzini
-GNU sed maintainer
diff --git a/README-release b/README-release
new file mode 100644
index 0000000..3c0787d
--- /dev/null
+++ b/README-release
@@ -0,0 +1,100 @@
+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 3a54613..4f611ba 100644
--- a/THANKS
+++ b/THANKS
@@ -1,59 +1,81 @@
-Akim Demaille <akim@epita.fr>
-Alan Modra <alan@spri.levels.unisa.edu.au>
-Arnold Robbins <arnold@skeeve.com>
-Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
-Andrew Herbert <andrew@werple.apana.org.au>
-Bake Timmons <b3timmons@speedymail.org>
-Bruno Haible <haible@ilog.fr>
-Chip Salzenberg <chip@fin.uucp>
-Chris Weber <weber@bucknell.edu>
-Corinna Vinschen <vinschen@redhat.com>
-Daniel R. Grayson <dan@math.uiuc.edu>
-David Eckelkamp <eckelkamp@mcc.com>
-David J. MacKenzie <djm@nutrimat>
-David Schmidt <davids@isc-br.isc-br.com>
-Dietrich Kappe <kap1@tao.cpe.uchicago.edu>
-Doug McIlroy <doug@research.att.com>
-Eero Hakkinen <eero17@bigfoot.com>
-Eli Zaretskii <eliz@is.elta.co.il>
-Eric Pement <epement@moody.edu>
-Erick Branderhorst <Erick.Branderhorst@asml.nl>
-Francois Pinard <pinard@iro.umontreal.ca>
-Gaumond Pierre <gaumondp@ERE.UMontreal.CA>
-Greg Ubben <gsu@romulus.ncsc.mil>
-Isamu Hasegawa <isamu@yamato.ibm.com>
-J.T. Conklin <jtc@gain.com>
-Jakub Jelinek <jakub@redhat.com>
-Jari Aalto <jari.aalto@cante.net>
-Jason Molenda <crash@cygnus.com>
-Jim Meyering <meyering@ascend.com>
-Laurent Vogel <lvl@club-internet.fr>
-Karl Berry <karl@freefriends.org>
-Karl Heuer <kwzh@gnu.org>
-Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
-Kevin Buettner <kev@cujo.geg.mot.com>
-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>
-Padraig Brady <p@draigbrady.com>
-Paul Eggert <eggert@twinsun.com>
-Randall Cotton <recotton@earthlink.net>
-Robert A Bruce <rab@allspice.berkeley.edu>
-Ronnie Glasscock <Ronnie.N.Glasscock@bridge.bellsouth.com>
-Sergey Farbotka <z8sergey8z@gmail.com>
-Simon Taylor <simon@unisolve.com.au>
-Stepan Kasal <kasal@ucw.cz>
-Stephen Davis <stephend@ksr.com>
-Steve Ingram <si@maps-r-us.com>
-Tapani Tarvainen <tarvaine@tukki.jyu.fi>
-Timothy J Luoma <luomat@peak.org>
-Timothy Baker <timothypaulbaker@gmail.com>
-Tom R.Hageman <tom@basil.icce.rug.nl>
-Ulrich Drepper <drepper@redhat.com>
-Vladimir Marek <vladimir.marek@sun.com>
-Vladimir Volovich <vvv@vvv.vsu.ru>
-Wichert Akkerman <wakkerma@debian.org>
-Zhongxing Xu <xuzhongxing@gmail.com>
+These people have contributed to the GNU sed. Those contributions are
+described in the version control logs. If your name has been left out,
+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).
-And the GNU translation teams.
+Akim Demaille akim@epita.fr
+Alan Modra alan@spri.levels.unisa.edu.au
+Andreas Schwab schwab@issan.informatik.uni-dortmund.de
+Andrew Herbert andrew@werple.apana.org.au
+Arnold Robbins arnold@skeeve.com
+Assaf Gordon assafgordon@gmail.com
+Bake Timmons b3timmons@speedymail.org
+Bruno Haible haible@ilog.fr
+Chip Salzenberg chip@fin.uucp
+Chris Weber weber@bucknell.edu
+Corinna Vinschen vinschen@redhat.com
+Daniel R. Grayson dan@math.uiuc.edu
+David A. Wheeler dwheeler@dwheeler.com
+David Eckelkamp eckelkamp@mcc.com
+David J. MacKenzie djm@nutrimat
+David Schmidt davids@isc-br.isc-br.com
+Dietrich Kappe kap1@tao.cpe.uchicago.edu
+Doug McIlroy doug@research.att.com
+Eero Hakkinen eero17@bigfoot.com
+Eli Zaretskii eliz@is.elta.co.il
+Eric Blake eblake@redhat.com
+Erick Branderhorst Erick.Branderhorst@asml.nl
+Eric Pement epement@moody.edu
+Francois Pinard pinard@iro.umontreal.ca
+Gaumond Pierre gaumondp@ERE.UMontreal.CA
+Greg Ubben gsu@romulus.ncsc.mil
+Isamu Hasegawa isamu@yamato.ibm.com
+Jakub Jelinek jakub@redhat.com
+Jari Aalto jari.aalto@cante.net
+Jason Molenda crash@cygnus.com
+Jim Hill gjthill@gmail.com
+Jim Meyering jim@meyering.net
+Jose E. Marchesi jemarch@gnu.org
+J.T. Conklin jtc@gain.com
+Karl Berry karl@freefriends.org
+Karl Heuer kwzh@gnu.org
+Kaveh R. Ghazi ghazi@caip.rutgers.edu
+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@gentoo.org
+Norihiro Tanaka noritnk@kcn.ne.jp
+Pádraig Brady P@draigBrady.com
+Paolo Bonzini bonzini@gnu.org
+Paul Eggert eggert@cs.ucla.edu
+Ralf Wildenhues Ralf.Wildenhues@gmx.de
+Randall Cotton recotton@earthlink.net
+Robert A Bruce rab@allspice.berkeley.edu
+Ronnie Glasscock Ronnie.N.Glasscock@bridge.bellsouth.com
+Sergey Farbotka z8sergey8z@gmail.com
+Simon Taylor simon@unisolve.com.au
+Stanislav Brabec sbrabec@suse.com
+Stefano Lattarini stefano.lattarini@gmail.com
+Stepan Kasal kasal@ucw.cz
+Stephen Davis stephend@ksr.com
+Steve Ingram si@maps-r-us.com
+Tapani Tarvainen tarvaine@tukki.jyu.fi
+Timothy Baker timothypaulbaker@gmail.com
+Timothy J Luoma luomat@peak.org
+Tom R.Hageman tom@basil.icce.rug.nl
+Tristan Verniquet tverniquet@gmail.com
+Ulrich Drepper drepper@redhat.com
+Vincenzo Romano vincenzo.romano@notorand.it
+Vladimir Marek vladimir.marek@sun.com
+Vladimir Volovich vvv@vvv.vsu.ru
+Wichert Akkerman wakkerma@debian.org
+Yury G. Kudryashov urkud.urkud@gmail.com
+Zhongxing Xu xuzhongxing@gmail.com
+
+;; Local Variables:
+;; coding: utf-8
+;; End:
diff --git a/THANKS.in b/THANKS.in
new file mode 100644
index 0000000..143c4d4
--- /dev/null
+++ b/THANKS.in
@@ -0,0 +1,64 @@
+These people have contributed to the GNU sed. Those contributions are
+described in the version control logs. If your name has been left out,
+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).
+##
+## There is no need to list here any name that appears as an Author in
+## "git log" output. Those are automatically added when this template
+## is used to generate the THANKS file. Note that numerous people listed
+## here would have been listed as commit authors if we had been using git
+## for version control when they contributed.
+
+Akim Demaille akim@epita.fr
+Alan Modra alan@spri.levels.unisa.edu.au
+Andreas Schwab schwab@issan.informatik.uni-dortmund.de
+Andrew Herbert andrew@werple.apana.org.au
+Arnold Robbins arnold@skeeve.com
+Bruno Haible haible@ilog.fr
+Chip Salzenberg chip@fin.uucp
+Chris Weber weber@bucknell.edu
+Corinna Vinschen vinschen@redhat.com
+Daniel R. Grayson dan@math.uiuc.edu
+David Eckelkamp eckelkamp@mcc.com
+David J. MacKenzie djm@nutrimat
+David Schmidt davids@isc-br.isc-br.com
+Dietrich Kappe kap1@tao.cpe.uchicago.edu
+Doug McIlroy doug@research.att.com
+Eero Hakkinen eero17@bigfoot.com
+Eli Zaretskii eliz@is.elta.co.il
+Eric Pement epement@moody.edu
+Erick Branderhorst Erick.Branderhorst@asml.nl
+Francois Pinard pinard@iro.umontreal.ca
+Gaumond Pierre gaumondp@ERE.UMontreal.CA
+Greg Ubben gsu@romulus.ncsc.mil
+Isamu Hasegawa isamu@yamato.ibm.com
+Jakub Jelinek jakub@redhat.com
+Jason Molenda crash@cygnus.com
+J.T. Conklin jtc@gain.com
+Karl Berry karl@freefriends.org
+Karl Heuer kwzh@gnu.org
+Kaveh R. Ghazi ghazi@caip.rutgers.edu
+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
+Randall Cotton recotton@earthlink.net
+Robert A Bruce rab@allspice.berkeley.edu
+Ronnie Glasscock Ronnie.N.Glasscock@bridge.bellsouth.com
+Sergey Farbotka z8sergey8z@gmail.com
+Simon Taylor simon@unisolve.com.au
+Stepan Kasal kasal@ucw.cz
+Stephen Davis stephend@ksr.com
+Steve Ingram si@maps-r-us.com
+Tapani Tarvainen tarvaine@tukki.jyu.fi
+Timothy Baker timothypaulbaker@gmail.com
+Timothy J Luoma luomat@peak.org
+Tom R.Hageman tom@basil.icce.rug.nl
+Ulrich Drepper drepper@redhat.com
+Vladimir Marek vladimir.marek@sun.com
+Vladimir Volovich vvv@vvv.vsu.ru
+Wichert Akkerman wakkerma@debian.org
+Zhongxing Xu xuzhongxing@gmail.com
diff --git a/aclocal.m4 b/aclocal.m4
index 1b04dbe..f4e972f 100644
--- a/aclocal.m4
+++ b/aclocal.m4
@@ -1,6 +1,6 @@
-# generated automatically by aclocal 1.12.2 -*- Autoconf -*-
+# generated automatically by aclocal 1.99a -*- Autoconf -*-
-# Copyright (C) 1996-2012 Free Software Foundation, Inc.
+# Copyright (C) 1996-2015 Free Software Foundation, Inc.
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -11,32 +11,31 @@
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE.
+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],,
-[m4_warning([this file was generated for autoconf 2.69.
+m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.69.183-96821],,
+[m4_warning([this file was generated for autoconf 2.69.183-96821.
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-2012 Free Software Foundation, Inc.
+# Copyright (C) 2002-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.
-# serial 8
-
# AM_AUTOMAKE_VERSION(VERSION)
# ----------------------------
# Automake X.Y traces this macro to ensure aclocal.m4 has been
# 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.12'
+[am__api_version='1.99a'
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.12.2], [],
+m4_if([$1], [1.99a], [],
[AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
])
@@ -52,21 +51,79 @@ 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.12.2])dnl
+[AM_AUTOMAKE_VERSION([1.99a])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-2012 Free Software Foundation, Inc.
+# Copyright (C) 2001-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.
-# serial 2
-
# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
# $ac_aux_dir to '$srcdir/foo'. In other projects, it is set to
# '$srcdir', '$srcdir/..', or '$srcdir/../..'.
@@ -106,22 +163,19 @@ _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
# configured tree to be moved without reconfiguration.
AC_DEFUN([AM_AUX_DIR_EXPAND],
-[dnl Rely on autoconf to set up CDPATH properly.
-AC_PREREQ([2.50])dnl
-# expand $ac_aux_dir to an absolute path
-am_aux_dir=`cd $ac_aux_dir && pwd`
+[AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl
+# Expand $ac_aux_dir to an absolute path.
+am_aux_dir=`cd "$ac_aux_dir" && pwd`
])
# AM_CONDITIONAL -*- Autoconf -*-
-# Copyright (C) 1997-2012 Free Software Foundation, Inc.
+# Copyright (C) 1997-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.
-# serial 10
-
# AM_CONDITIONAL(NAME, SHELL-CONDITION)
# -------------------------------------
# Define a conditional.
@@ -147,13 +201,12 @@ AC_CONFIG_COMMANDS_PRE(
Usually this means the macro was only invoked conditionally.]])
fi])])
-# Copyright (C) 1999-2012 Free Software Foundation, Inc.
+# Copyright (C) 1999-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.
-# serial 17
# There are a few dirty hacks below to avoid letting 'AC_PROG_CC' be
# written in clear, in which case automake, when reading aclocal.m4,
@@ -309,10 +362,7 @@ 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_REQUIRE([AM_SET_LEADING_DOT])dnl
-AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
-])
+AC_DEFUN([AM_SET_DEPDIR], [AC_SUBST([DEPDIR], [.deps])])
# AM_DEP_TRACK
@@ -339,64 +389,54 @@ _AM_SUBST_NOTMAKE([am__nodep])dnl
# Generate code to set up dependency tracking. -*- Autoconf -*-
-# Copyright (C) 1999-2012 Free Software Foundation, Inc.
+# Copyright (C) 1999-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.
-# serial 6
-
# _AM_OUTPUT_DEPENDENCY_COMMANDS
# ------------------------------
AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
[{
- # Autoconf 2.62 quotes --file arguments for eval, but not when files
+ # Older Autoconf quotes --file arguments for eval, but not when files
# are listed without --file. Let's play safe and only enable the eval
# if we detect the quoting.
- case $CONFIG_FILES in
- *\'*) eval set x "$CONFIG_FILES" ;;
- *) set x $CONFIG_FILES ;;
- esac
+ # TODO: see whether this extra hack can be removed once we start
+ # requiring Autoconf 2.70 or later.
+ AS_CASE([$CONFIG_FILES],
+ [*\'*], [eval set x "$CONFIG_FILES"],
+ [*], [set x $CONFIG_FILES])
shift
- for mf
+ # Used to flag and report bootstrapping failures.
+ am_rc=0
+ for am_mf
do
# Strip MF so we end up with the name of the file.
- mf=`echo "$mf" | sed -e 's/:.*$//'`
- # Check whether this is an Automake generated Makefile or not.
- # We used to match only the files named 'Makefile.in', but
- # some people rename them; so instead we look at the file content.
- # Grep'ing the first line is not enough: some people post-process
- # each Makefile.in and add a new line on top of each file to say so.
- # Grep'ing the whole file is not good either: AIX grep has a line
+ am_mf=`AS_ECHO(["$am_mf"]) | sed -e 's/:.*$//'`
+ # Check whether this is an Automake generated Makefile which includes
+ # dependency-tracking related rules and includes.
+ # Grep'ing the whole file directly is not great: AIX grep has a line
# limit of 2048, but all sed's we know have understand at least 4000.
- if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
- dirpart=`AS_DIRNAME("$mf")`
- else
- continue
- fi
- # Extract the definition of DEPDIR, am__include, and am__quote
- # from the Makefile without running 'make'.
- DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
- test -z "$DEPDIR" && continue
- am__include=`sed -n 's/^am__include = //p' < "$mf"`
- test -z "am__include" && continue
- am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
- # Find all dependency output files, they are included files with
- # $(DEPDIR) in their names. We invoke sed twice because it is the
- # simplest approach to changing $(DEPDIR) to its actual value in the
- # expansion.
- for file in `sed -n "
- s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
- sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g'`; do
- # Make sure the directory exists.
- test -f "$dirpart/$file" && continue
- fdir=`AS_DIRNAME(["$file"])`
- AS_MKDIR_P([$dirpart/$fdir])
- # echo "creating $dirpart/$file"
- echo '# dummy' > "$dirpart/$file"
- done
+ sed -n 's,^am--depfiles:.*,X,p' "$am_mf" | grep X >/dev/null 2>&1 \
+ || continue
+ am_dirpart=`AS_DIRNAME(["$am_mf"])`
+ am_filepart=`AS_BASENAME(["$am_mf"])`
+ AM_RUN_LOG([cd "$am_dirpart" \
+ && sed -e '/# am--include-marker/d' "$am_filepart" \
+ | $MAKE -f - am--depfiles]) || am_rc=$?
done
+ if test $am_rc -ne 0; then
+ AC_MSG_FAILURE([Something went wrong bootstrapping makefile fragments
+ for automatic dependency tracking. Try re-running configure with the
+ '--disable-dependency-tracking' option to at least be able to build
+ the package (albeit without support for automatic dependency tracking).])
+ fi
+ AS_UNSET([am_dirpart])
+ AS_UNSET([am_filepart])
+ AS_UNSET([am_mf])
+ AS_UNSET([am_rc])
+ rm -f conftest-deps.mk
}
])# _AM_OUTPUT_DEPENDENCY_COMMANDS
@@ -405,39 +445,31 @@ AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
# -----------------------------
# This macro should only be invoked once -- use via AC_REQUIRE.
#
-# This code is only required when automatic dependency tracking
-# is enabled. FIXME. This creates each '.P' file that we will
-# need in order to bootstrap the dependency handling code.
+# This code is only required when automatic dependency tracking is enabled.
+# This creates each '.Po' and '.Plo' makefile fragment that we'll need in
+# order to bootstrap the dependency handling code.
AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
[AC_CONFIG_COMMANDS([depfiles],
[test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
- [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
-])
-
-# Copyright (C) 1996-2012 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 8
-
-# AM_CONFIG_HEADER is obsolete. It has been replaced by AC_CONFIG_HEADERS.
-AU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)])
+ [AMDEP_TRUE="$AMDEP_TRUE" MAKE="${MAKE-make}"])])
# Do all the work for Automake. -*- Autoconf -*-
-# Copyright (C) 1996-2012 Free Software Foundation, Inc.
+# Copyright (C) 1996-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.
-# serial 19
-
# This macro actually does too much. Some checks are only needed if
# your package does certain things. But this isn't really a big deal.
+dnl Redefine AC_PROG_CC to automatically invoke _AM_PROG_CC_C_O.
+m4_define([AC_PROG_CC],
+m4_defn([AC_PROG_CC])
+[_AM_PROG_CC_C_O
+])
+
# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
# AM_INIT_AUTOMAKE([OPTIONS])
# -----------------------------------------------
@@ -450,7 +482,9 @@ AU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)])
# arguments mandatory, and then we can depend on a new Autoconf
# release and drop the old call support.
AC_DEFUN([AM_INIT_AUTOMAKE],
-[AC_PREREQ([2.62])dnl
+[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
@@ -480,8 +514,7 @@ AC_SUBST([CYGPATH_W])
dnl Distinguish between old-style and new-style calls.
m4_ifval([$2],
[AC_DIAGNOSE([obsolete],
-[$0: two- and three-arguments forms are deprecated. For more info, see:
-http://www.gnu.org/software/automake/manual/automake.html#Modernize-AM_INIT_AUTOMAKE-invocation])
+ [$0: two- and three-arguments forms are deprecated.])
m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
AC_SUBST([PACKAGE], [$1])dnl
AC_SUBST([VERSION], [$2])],
@@ -509,16 +542,10 @@ 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:
-# <http://lists.gnu.org/archive/html/automake/2012-07/msg00001.html>
-# <http://lists.gnu.org/archive/html/automake/2012-07/msg00014.html>
-AC_SUBST([mkdir_p], ['$(MKDIR_P)'])
-# We need awk for the "check" target. The system "awk" is bad on
-# some platforms.
+# 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])])])
@@ -535,21 +562,63 @@ AC_PROVIDE_IFELSE([AC_PROG_OBJC],
[_AM_DEPENDENCIES([OBJC])],
[m4_define([AC_PROG_OBJC],
m4_defn([AC_PROG_OBJC])[_AM_DEPENDENCIES([OBJC])])])dnl
-dnl Support for Objective C++ was only introduced in Autoconf 2.65,
-dnl but we still cater to Autoconf 2.62.
-m4_ifdef([AC_PROG_OBJCXX],
-[AC_PROVIDE_IFELSE([AC_PROG_OBJCXX],
+AC_PROVIDE_IFELSE([AC_PROG_OBJCXX],
[_AM_DEPENDENCIES([OBJCXX])],
[m4_define([AC_PROG_OBJCXX],
- m4_defn([AC_PROG_OBJCXX])[_AM_DEPENDENCIES([OBJCXX])])])])dnl
+ m4_defn([AC_PROG_OBJCXX])[_AM_DEPENDENCIES([OBJCXX])])])dnl
])
-_AM_IF_OPTION([silent-rules], [AC_REQUIRE([AM_SILENT_RULES])])dnl
-dnl The 'parallel-tests' driver may need to know about EXEEXT, so add the
-dnl 'am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This macro
-dnl is hooked onto _AC_COMPILER_EXEEXT early, see below.
+AC_REQUIRE([AM_SILENT_RULES])dnl
+dnl The testsuite driver may need to know about EXEEXT, so add the
+dnl 'am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This
+dnl macro is hooked onto _AC_COMPILER_EXEEXT early, see below.
AC_CONFIG_COMMANDS_PRE(dnl
[m4_provide_if([_AM_COMPILER_EXEEXT],
[AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl
+
+# POSIX will say in a future version that running "rm -f" with no argument
+# is OK; and we want to be able to make that assumption in our Makefile
+# recipes. So use an aggressive probe to check that the usage we want is
+# actually supported "in the wild" to an acceptable degree.
+# See automake bug#10828.
+# To make any issue more visible, cause the running configure to be aborted
+# by default if the 'rm' program in use doesn't match our expectations; the
+# user can still override this though.
+if rm -f && rm -fr && rm -rf; then : OK; else
+ cat >&2 <<'END'
+Oops!
+
+Your 'rm' program seems unable to run without file operands specified
+on the command line, even when the '-f' option is present. This is contrary
+to the behaviour of most rm programs out there, and not conforming with
+the upcoming POSIX standard: <http://austingroupbugs.net/view.php?id=542>
+
+Please tell bug-automake@gnu.org about your system, including the value
+of your $PATH and any error possibly output before this message. This
+can help us improve future automake versions.
+
+END
+ if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then
+ echo 'Configuration will proceed anyway, since you have set the' >&2
+ echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2
+ echo >&2
+ else
+ cat >&2 <<'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/>.
+
+If you want to complete the configuration process using your problematic
+'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM
+to "yes", and re-run configure.
+
+END
+ AC_MSG_ERROR([Your 'rm' program is bad, sorry.])
+ fi
+fi
+dnl The trailing newline in this macro's definition is deliberate, for
+dnl backward compatibility and to allow trailing 'dnl'-style comments
+dnl after the AM_INIT_AUTOMAKE invocation. See automake bug#16841.
])
dnl Hook into '_AC_COMPILER_EXEEXT' early to learn its expansion. Do not
@@ -558,7 +627,6 @@ dnl mangled by Autoconf and run in a shell conditional statement.
m4_define([_AC_COMPILER_EXEEXT],
m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])])
-
# When config.status generates a header, we must update the stamp-h file.
# This file resides in the same directory as the config header
# that is generated. The stamp files are numbered to have different names.
@@ -580,20 +648,18 @@ 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-2012 Free Software Foundation, Inc.
+# Copyright (C) 2001-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.
-# serial 8
-
# AM_PROG_INSTALL_SH
# ------------------
# Define $install_sh.
AC_DEFUN([AM_PROG_INSTALL_SH],
[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
-if test x"${install_sh}" != xset; then
+if test x"${install_sh+set}" != xset; then
case $am_aux_dir in
*\ * | *\ *)
install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
@@ -603,89 +669,57 @@ if test x"${install_sh}" != xset; then
fi
AC_SUBST([install_sh])])
-# Copyright (C) 2003-2012 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 2
-
-# 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-2012 Free Software Foundation, Inc.
+# Copyright (C) 2001-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.
-# serial 5
-
# AM_MAKE_INCLUDE()
# -----------------
-# Check to see how make treats includes.
+# Check whether make has an 'include' directive that can support all
+# the idioms we need for our automatic dependency tracking code.
AC_DEFUN([AM_MAKE_INCLUDE],
-[am_make=${MAKE-make}
-cat > confinc << 'END'
+[AC_MSG_CHECKING([whether ${MAKE-make} supports the include directive])
+cat > confinc.mk << 'END'
am__doit:
- @echo this is the am__doit target
+ @echo this is the am__doit target >confinc.out
.PHONY: am__doit
END
-# If we don't find an include directive, just comment out the code.
-AC_MSG_CHECKING([for style of include used by $am_make])
am__include="#"
am__quote=
-_am_result=none
-# First try GNU make style include.
-echo "include confinc" > confmf
-# Ignore all kinds of additional output from 'make'.
-case `$am_make -s -f confmf 2> /dev/null` in #(
-*the\ am__doit\ target*)
- am__include=include
- am__quote=
- _am_result=GNU
- ;;
-esac
-# Now try BSD make style include.
-if test "$am__include" = "#"; then
- echo '.include "confinc"' > confmf
- case `$am_make -s -f confmf 2> /dev/null` in #(
- *the\ am__doit\ target*)
- am__include=.include
- am__quote="\""
- _am_result=BSD
- ;;
- esac
-fi
-AC_SUBST([am__include])
-AC_SUBST([am__quote])
-AC_MSG_RESULT([$_am_result])
-rm -f confinc confmf
-])
+# BSD make does it like this.
+echo '.include "confinc.mk" # ignored' > confmf.BSD
+# Other make implementations (GNU, Solaris 10, AIX) do it like this.
+echo 'include confinc.mk # ignored' > confmf.GNU
+_am_result=no
+for s in GNU BSD; do
+ AM_RUN_LOG([${MAKE-make} -f confmf.$s && cat confinc.out])
+ AS_CASE([$?:`cat confinc.out 2>/dev/null`],
+ ['0:this is the am__doit target'],
+ [AS_CASE([$s],
+ [BSD], [am__include='.include' am__quote='"'],
+ [am__include='include' am__quote=''])])
+ if test "$am__include" != "#"; then
+ _am_result="yes ($s style)"
+ break
+ fi
+done
+rm -f confinc.* confmf.*
+AC_MSG_RESULT([${_am_result}])
+AC_SUBST([am__include])])
+AC_SUBST([am__quote])])
# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*-
-# Copyright (C) 1997-2012 Free Software Foundation, Inc.
+# Copyright (C) 1997-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.
-# serial 7
-
# AM_MISSING_PROG(NAME, PROGRAM)
# ------------------------------
AC_DEFUN([AM_MISSING_PROG],
@@ -693,11 +727,10 @@ AC_DEFUN([AM_MISSING_PROG],
$1=${$1-"${am_missing_run}$2"}
AC_SUBST($1)])
-
# AM_MISSING_HAS_RUN
# ------------------
-# Define MISSING if not defined so far and test if it supports --run.
-# If it does, set am_missing_run to use it, otherwise, to nothing.
+# Define MISSING if not defined so far and test if it is modern enough.
+# If it is, set am_missing_run to use it, otherwise, to nothing.
AC_DEFUN([AM_MISSING_HAS_RUN],
[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
AC_REQUIRE_AUX_FILE([missing])dnl
@@ -710,57 +743,58 @@ if test x"${MISSING+set}" != xset; then
esac
fi
# Use eval to expand $SHELL
-if eval "$MISSING --run true"; then
- am_missing_run="$MISSING --run "
+if eval "$MISSING --is-lightweight"; then
+ am_missing_run="$MISSING "
else
am_missing_run=
AC_MSG_WARN(['missing' script is too old or missing])
fi
])
-# Copyright (C) 2003-2012 Free Software Foundation, Inc.
+# -*- Autoconf -*-
+# Deprecated, obsolescent or and obsolete macros.
+#
+# Copyright (C) 1996-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.
-# serial 3
-
-# AM_PROG_MKDIR_P
-# ---------------
-# Check for 'mkdir -p'.
AC_DEFUN([AM_PROG_MKDIR_P],
-[AC_PREREQ([2.60])dnl
-AC_REQUIRE([AC_PROG_MKDIR_P])dnl
-dnl FIXME to be removed in Automake 1.13.
+[AC_REQUIRE([AC_PROG_MKDIR_P])dnl
+AC_SUBST([mkdir_p], ['$(MKDIR_P)'])dnl
AC_DIAGNOSE([obsolete],
-[$0: this macro is deprecated, and will soon be removed.
+[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.])
-dnl Automake 1.8 to 1.9.6 used to define mkdir_p. We now use MKDIR_P,
-dnl while keeping a definition of mkdir_p for backward compatibility.
-dnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile.
-dnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of
-dnl Makefile.ins that do not define MKDIR_P, so we do our own
-dnl adjustment using top_builddir (which is defined more often than
-dnl MKDIR_P).
-AC_SUBST([mkdir_p], ["$MKDIR_P"])dnl
-case $mkdir_p in
- [[\\/$]]* | ?:[[\\/]]*) ;;
- */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;;
-esac
-])
+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.
+You should use the 'AC][_CONFIG_HEADERS' macro instead.])dnl
+AC_CONFIG_HEADERS($@)])
+
+AC_DEFUN([AM_PROG_CC_STDC],
+[AC_PROG_CC
+am_cv_prog_cc_stdc=$ac_cv_prog_cc_stdc
+AC_DIAGNOSE([obsolete],
+['$0': this macro is obsolete.
+You should simply use the 'AC][_PROG_CC' macro instead.
+Also, your code should no longer depend upon 'am_cv_prog_cc_stdc',
+but upon 'ac_cv_prog_cc_stdc'.])])
+
+AC_DEFUN([AM_C_PROTOTYPES],
+ [AC_FATAL([automatic de-ANSI-fication support has been removed])])
+AU_DEFUN([fp_C_PROTOTYPES], [AM_C_PROTOTYPES])
# Helper functions for option handling. -*- Autoconf -*-
-# Copyright (C) 2001-2012 Free Software Foundation, Inc.
+# Copyright (C) 2001-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.
-# serial 6
-
# _AM_MANGLE_OPTION(NAME)
# -----------------------
AC_DEFUN([_AM_MANGLE_OPTION],
@@ -784,15 +818,77 @@ AC_DEFUN([_AM_SET_OPTIONS],
AC_DEFUN([_AM_IF_OPTION],
[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
-# Check to make sure that the build environment is sane. -*- Autoconf -*-
+# Copyright (C) 1999-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_CC_C_O
+# ---------------
+# Like AC_PROG_CC_C_O, but changed for automake. We rewrite AC_PROG_CC
+# to automatically call this.
+AC_DEFUN([_AM_PROG_CC_C_O],
+[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
+AC_REQUIRE_AUX_FILE([compile])dnl
+AC_LANG_PUSH([C])dnl
+AC_CACHE_CHECK(
+ [whether $CC understands -c and -o together],
+ [am_cv_prog_cc_c_o],
+ [AC_LANG_CONFTEST([AC_LANG_PROGRAM([])])
+ # Make sure it works both with $CC and with simple cc.
+ # Following AC_PROG_CC_C_O, we do the test twice because some
+ # compilers refuse to overwrite an existing .o file with -o,
+ # though they will create one.
+ am_cv_prog_cc_c_o=yes
+ for am_i in 1 2; do
+ if AM_RUN_LOG([$CC -c conftest.$ac_ext -o conftest2.$ac_objext]) \
+ && test -f conftest2.$ac_objext; then
+ : OK
+ else
+ am_cv_prog_cc_c_o=no
+ break
+ fi
+ done
+ rm -f core conftest*
+ unset am_i])
+if test "$am_cv_prog_cc_c_o" != yes; then
+ # Losing compiler, so override with the script.
+ # FIXME: It is wrong to rewrite CC.
+ # 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__CC in this case,
+ # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)"
+ CC="$am_aux_dir/compile $CC"
+fi
+AC_LANG_POP([C])])
+
+# For backward compatibility.
+AC_DEFUN_ONCE([AM_PROG_CC_C_O], [AC_REQUIRE([AC_PROG_CC])])
-# Copyright (C) 1996-2012 Free Software Foundation, Inc.
+# Copyright (C) 2001-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.
-# serial 9
+# AM_RUN_LOG(COMMAND)
+# -------------------
+# Run COMMAND, save the exit status in ac_status, and log it.
+# (This has been adapted from Autoconf's _AC_RUN_LOG macro.)
+AC_DEFUN([AM_RUN_LOG],
+[{ echo "$as_me:$LINENO: $1" >&AS_MESSAGE_LOG_FD
+ ($1) >&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
+ (exit $ac_status); }])
+
+# Check to make sure that the build environment is sane. -*- Autoconf -*-
+
+# Copyright (C) 1996-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_SANITY_CHECK
# ---------------
@@ -869,13 +965,71 @@ AC_CONFIG_COMMANDS_PRE(
rm -f conftest.file
])
-# Copyright (C) 2001-2012 Free Software Foundation, Inc.
+# Copyright (C) 2009-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.
-# serial 2
+# AM_SILENT_RULES([DEFAULT])
+# --------------------------
+# Enable less verbose build rules; with the default set to DEFAULT
+# ("yes" being less verbose, "no" or empty being verbose).
+AC_DEFUN([AM_SILENT_RULES],
+[AC_ARG_ENABLE([silent-rules], [dnl
+AS_HELP_STRING(
+ [--enable-silent-rules],
+ [less verbose build output (undo: "make V=1")])
+AS_HELP_STRING(
+ [--disable-silent-rules],
+ [verbose build output (undo: "make V=0")])dnl
+])
+case $enable_silent_rules in @%:@ (((
+ yes) AM_DEFAULT_VERBOSITY=0;;
+ no) AM_DEFAULT_VERBOSITY=1;;
+ *) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);;
+esac
+dnl
+dnl A few 'make' implementations (e.g., NonStop OS and NextStep)
+dnl do not support nested variable expansions.
+dnl See automake bug#9928 and bug#10237.
+am_make=${MAKE-make}
+AC_CACHE_CHECK([whether $am_make supports nested variables],
+ [am_cv_make_support_nested_variables],
+ [if AS_ECHO([['TRUE=$(BAR$(V))
+BAR0=false
+BAR1=true
+V=1
+am__doit:
+ @$(TRUE)
+.PHONY: am__doit']]) | $am_make -f - >/dev/null 2>&1; then
+ am_cv_make_support_nested_variables=yes
+else
+ am_cv_make_support_nested_variables=no
+fi])
+if test $am_cv_make_support_nested_variables = yes; then
+ dnl Using '$V' instead of '$(V)' breaks IRIX make.
+ AM_V='$(V)'
+ AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)'
+else
+ AM_V=$AM_DEFAULT_VERBOSITY
+ AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY
+fi
+AC_SUBST([AM_V])dnl
+AM_SUBST_NOTMAKE([AM_V])dnl
+AC_SUBST([AM_DEFAULT_V])dnl
+AM_SUBST_NOTMAKE([AM_DEFAULT_V])dnl
+AC_SUBST([AM_DEFAULT_VERBOSITY])dnl
+AM_BACKSLASH='\'
+AC_SUBST([AM_BACKSLASH])dnl
+_AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl
+])
+
+# Copyright (C) 2001-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_INSTALL_STRIP
# ---------------------
@@ -899,14 +1053,12 @@ fi
INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
AC_SUBST([INSTALL_STRIP_PROGRAM])])
-# Copyright (C) 2006-2012 Free Software Foundation, Inc.
+# Copyright (C) 2006-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.
-# serial 3
-
# _AM_SUBST_NOTMAKE(VARIABLE)
# ---------------------------
# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in.
@@ -920,14 +1072,12 @@ AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)])
# Check how to create a tarball. -*- Autoconf -*-
-# Copyright (C) 2004-2012 Free Software Foundation, Inc.
+# Copyright (C) 2004-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.
-# serial 3
-
# _AM_PROG_TAR(FORMAT)
# --------------------
# Check how to create a tarball in format FORMAT.
@@ -941,161 +1091,253 @@ AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)])
# Substitute a variable $(am__untar) that extract such
# a tarball read from stdin.
# $(am__untar) < result.tar
+#
AC_DEFUN([_AM_PROG_TAR],
[# Always define AMTAR for backward compatibility. Yes, it's still used
# in the wild :-( We should find a proper way to deprecate it ...
AC_SUBST([AMTAR], ['$${TAR-tar}'])
-m4_if([$1], [v7],
- [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'],
- [m4_case([$1], [ustar],, [pax],,
- [m4_fatal([Unknown tar format])])
-AC_MSG_CHECKING([how to create a $1 tar archive])
-# Loop over all known methods to create a tar archive until one works.
+
+# We'll loop over all known methods to create a tar archive until one works.
_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
-_am_tools=${am_cv_prog_tar_$1-$_am_tools}
-# Do not fold the above two line into one, because Tru64 sh and
-# Solaris sh will not grok spaces in the rhs of '-'.
-for _am_tool in $_am_tools
-do
- case $_am_tool in
- gnutar)
- for _am_tar in tar gnutar gtar;
- do
- AM_RUN_LOG([$_am_tar --version]) && break
- done
- am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
- am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
- am__untar="$_am_tar -xf -"
- ;;
- plaintar)
- # Must skip GNU tar: if it does not support --format= it doesn't create
- # ustar tarball either.
- (tar --version) >/dev/null 2>&1 && continue
- am__tar='tar chf - "$$tardir"'
- am__tar_='tar chf - "$tardir"'
- am__untar='tar xf -'
- ;;
- pax)
- am__tar='pax -L -x $1 -w "$$tardir"'
- am__tar_='pax -L -x $1 -w "$tardir"'
- am__untar='pax -r'
- ;;
- cpio)
- am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
- am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
- am__untar='cpio -i -H $1 -d'
- ;;
- none)
- am__tar=false
- am__tar_=false
- am__untar=false
- ;;
- esac
- # If the value was cached, stop now. We just wanted to have am__tar
- # and am__untar set.
- test -n "${am_cv_prog_tar_$1}" && break
+m4_if([$1], [v7],
+ [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'],
+
+ [m4_case([$1],
+ [ustar],
+ [# The POSIX 1988 'ustar' format is defined with fixed-size fields.
+ # There is notably a 21 bits limit for the UID and the GID. In fact,
+ # the 'pax' utility can hang on bigger UID/GID (see automake bug#8343
+ # and bug#13588).
+ am_max_uid=2097151 # 2^21 - 1
+ am_max_gid=$am_max_uid
+ # The $UID and $GID variables are not portable, so we need to resort
+ # to the POSIX-mandated id(1) utility. Errors in the 'id' calls
+ # below are definitely unexpected, so allow the users to see them
+ # (that is, avoid stderr redirection).
+ am_uid=`id -u || echo unknown`
+ am_gid=`id -g || echo unknown`
+ AC_MSG_CHECKING([whether UID '$am_uid' is supported by ustar format])
+ if test $am_uid -le $am_max_uid; then
+ AC_MSG_RESULT([yes])
+ else
+ AC_MSG_RESULT([no])
+ _am_tools=none
+ fi
+ AC_MSG_CHECKING([whether GID '$am_gid' is supported by ustar format])
+ if test $am_gid -le $am_max_gid; then
+ AC_MSG_RESULT([yes])
+ else
+ AC_MSG_RESULT([no])
+ _am_tools=none
+ fi],
+
+ [pax],
+ [],
+
+ [m4_fatal([Unknown tar format])])
+
+ AC_MSG_CHECKING([how to create a $1 tar archive])
+
+ # Go ahead even if we have the value already cached. We do so because we
+ # need to set the values for the 'am__tar' and 'am__untar' variables.
+ _am_tools=${am_cv_prog_tar_$1-$_am_tools}
+
+ for _am_tool in $_am_tools; do
+ case $_am_tool in
+ gnutar)
+ for _am_tar in tar gnutar gtar; do
+ AM_RUN_LOG([$_am_tar --version]) && break
+ done
+ am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
+ am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
+ am__untar="$_am_tar -xf -"
+ ;;
+ plaintar)
+ # Must skip GNU tar: if it does not support --format= it doesn't create
+ # ustar tarball either.
+ (tar --version) >/dev/null 2>&1 && continue
+ am__tar='tar chf - "$$tardir"'
+ am__tar_='tar chf - "$tardir"'
+ am__untar='tar xf -'
+ ;;
+ pax)
+ am__tar='pax -L -x $1 -w "$$tardir"'
+ am__tar_='pax -L -x $1 -w "$tardir"'
+ am__untar='pax -r'
+ ;;
+ cpio)
+ am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
+ am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
+ am__untar='cpio -i -H $1 -d'
+ ;;
+ none)
+ am__tar=false
+ am__tar_=false
+ am__untar=false
+ ;;
+ esac
- # tar/untar a dummy directory, and stop if the command works
- rm -rf conftest.dir
- mkdir conftest.dir
- echo GrepMe > conftest.dir/file
- AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
+ # If the value was cached, stop now. We just wanted to have am__tar
+ # and am__untar set.
+ test -n "${am_cv_prog_tar_$1}" && break
+
+ # tar/untar a dummy directory, and stop if the command works.
+ rm -rf conftest.dir
+ mkdir conftest.dir
+ echo GrepMe > conftest.dir/file
+ AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
+ rm -rf conftest.dir
+ if test -s conftest.tar; then
+ AM_RUN_LOG([$am__untar <conftest.tar])
+ AM_RUN_LOG([cat conftest.dir/file])
+ grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
+ fi
+ done
rm -rf conftest.dir
- if test -s conftest.tar; then
- AM_RUN_LOG([$am__untar <conftest.tar])
- grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
- fi
-done
-rm -rf conftest.dir
-AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
-AC_MSG_RESULT([$am_cv_prog_tar_$1])])
+ AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
+ AC_MSG_RESULT([$am_cv_prog_tar_$1])])
+
AC_SUBST([am__tar])
AC_SUBST([am__untar])
]) # _AM_PROG_TAR
m4_include([m4/00gnulib.m4])
+m4_include([m4/absolute-header.m4])
m4_include([m4/acl.m4])
m4_include([m4/alloca.m4])
+m4_include([m4/assert.m4])
m4_include([m4/btowc.m4])
+m4_include([m4/builtin-expect.m4])
m4_include([m4/canonicalize.m4])
+m4_include([m4/close-stream.m4])
+m4_include([m4/close.m4])
+m4_include([m4/closedir.m4])
+m4_include([m4/closeout.m4])
m4_include([m4/codeset.m4])
m4_include([m4/configmake.m4])
+m4_include([m4/ctype.m4])
+m4_include([m4/dirent_h.m4])
+m4_include([m4/dirfd.m4])
m4_include([m4/dirname.m4])
m4_include([m4/double-slash-root.m4])
+m4_include([m4/dup2.m4])
m4_include([m4/eealloc.m4])
+m4_include([m4/environ.m4])
m4_include([m4/errno_h.m4])
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_h.m4])
+m4_include([m4/fdopen.m4])
+m4_include([m4/fflush.m4])
+m4_include([m4/flexmember.m4])
+m4_include([m4/fpending.m4])
+m4_include([m4/fpurge.m4])
+m4_include([m4/freading.m4])
+m4_include([m4/fseek.m4])
+m4_include([m4/fseeko.m4])
m4_include([m4/fstat.m4])
+m4_include([m4/ftell.m4])
+m4_include([m4/ftello.m4])
m4_include([m4/fwriting.m4])
+m4_include([m4/getcwd.m4])
m4_include([m4/getdelim.m4])
+m4_include([m4/getdtablesize.m4])
m4_include([m4/getopt.m4])
+m4_include([m4/getpagesize.m4])
+m4_include([m4/getprogname.m4])
m4_include([m4/gettext.m4])
m4_include([m4/gettimeofday.m4])
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/iconv.m4])
m4_include([m4/include_next.m4])
m4_include([m4/intlmacosx.m4])
+m4_include([m4/inttypes-pri.m4])
+m4_include([m4/inttypes.m4])
+m4_include([m4/isblank.m4])
m4_include([m4/langinfo_h.m4])
m4_include([m4/largefile.m4])
+m4_include([m4/lcmessage.m4])
m4_include([m4/lib-ld.m4])
m4_include([m4/lib-link.m4])
m4_include([m4/lib-prefix.m4])
+m4_include([m4/limits-h.m4])
+m4_include([m4/link.m4])
m4_include([m4/localcharset.m4])
m4_include([m4/locale-fr.m4])
m4_include([m4/locale-ja.m4])
+m4_include([m4/locale-tr.m4])
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/lock.m4])
m4_include([m4/longlong.m4])
+m4_include([m4/lseek.m4])
m4_include([m4/lstat.m4])
m4_include([m4/malloc.m4])
m4_include([m4/malloca.m4])
+m4_include([m4/manywarnings.m4])
m4_include([m4/mbrlen.m4])
m4_include([m4/mbrtowc.m4])
m4_include([m4/mbsinit.m4])
m4_include([m4/mbstate_t.m4])
m4_include([m4/mbtowc.m4])
m4_include([m4/memchr.m4])
+m4_include([m4/memrchr.m4])
+m4_include([m4/minmax.m4])
m4_include([m4/mkostemp.m4])
m4_include([m4/mmap-anon.m4])
+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/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.m4])
+m4_include([m4/opendir.m4])
m4_include([m4/pathmax.m4])
m4_include([m4/po.m4])
m4_include([m4/progtest.m4])
+m4_include([m4/putenv.m4])
m4_include([m4/quote.m4])
m4_include([m4/quotearg.m4])
+m4_include([m4/read-file.m4])
+m4_include([m4/readdir.m4])
m4_include([m4/readlink.m4])
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/selinux-context-h.m4])
m4_include([m4/selinux-selinux-h.m4])
+m4_include([m4/setenv.m4])
+m4_include([m4/setlocale.m4])
m4_include([m4/ssize_t.m4])
m4_include([m4/stat.m4])
+m4_include([m4/stdalign.m4])
m4_include([m4/stdarg.m4])
m4_include([m4/stdbool.m4])
m4_include([m4/stddef_h.m4])
m4_include([m4/stdint.m4])
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/string_h.m4])
m4_include([m4/strverscmp.m4])
+m4_include([m4/symlink.m4])
m4_include([m4/sys_socket_h.m4])
m4_include([m4/sys_stat_h.m4])
m4_include([m4/sys_time_h.m4])
@@ -1103,10 +1345,12 @@ m4_include([m4/sys_types_h.m4])
m4_include([m4/tempname.m4])
m4_include([m4/threadlib.m4])
m4_include([m4/time_h.m4])
+m4_include([m4/ungetc.m4])
m4_include([m4/unistd_h.m4])
m4_include([m4/unlocked-io.m4])
m4_include([m4/version-etc.m4])
m4_include([m4/warn-on-use.m4])
+m4_include([m4/warnings.m4])
m4_include([m4/wchar_h.m4])
m4_include([m4/wchar_t.m4])
m4_include([m4/wcrtomb.m4])
diff --git a/basicdefs.h b/basicdefs.h
index 0d28a97..0b574b3 100644
--- a/basicdefs.h
+++ b/basicdefs.h
@@ -1,5 +1,5 @@
/* GNU SED, a batch stream editor.
- Copyright (C) 1998, 1999, 2002, 2003, 2010 Free Software Foundation, Inc.
+ Copyright (C) 1998-2016 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -40,6 +40,13 @@ typedef unsigned long countT;
#define obstack_chunk_alloc ck_malloc
#define obstack_chunk_free free
+/* MAX_PATH is not defined in some platforms, most notably GNU/Hurd.
+ In that case we define it here to some constant. Note however that
+ this relies in the fact that sed does reallocation if a buffer
+ needs to be larger than PATH_MAX. */
+#ifndef PATH_MAX
+# define PATH_MAX 200
+#endif
/* handle misdesigned <ctype.h> macros (snarfed from lib/regex.c) */
/* Jim Meyering writes:
diff --git a/bootstrap b/bootstrap
index b8b2cbd..294c0bc 100755
--- a/bootstrap
+++ b/bootstrap
@@ -1,8 +1,10 @@
#! /bin/sh
+# Print a version string.
+scriptversion=2014-12-08.12; # UTC
# Bootstrap this package from checked-out sources.
-# Copyright (C) 2003-2008 Free Software Foundation, Inc.
+# Copyright (C) 2003-2016 Free Software Foundation, Inc.
# This 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 +19,15 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-# Written by Paul Eggert.
+# Originally written by Paul Eggert. The canonical version of this
+# script is maintained as build-aux/bootstrap in gnulib, however, to
+# be useful to your project, you should place a copy of it under
+# version control in the top-level directory of your project. The
+# intent is that all customization can be done with a bootstrap.conf
+# file also maintained in your version control; gnulib comes with a
+# template build-aux/bootstrap.conf to get you started.
+
+# Please report bugs or propose patches to bug-gnulib@gnu.org.
nl='
'
@@ -26,36 +36,77 @@ nl='
LC_ALL=C
export LC_ALL
+# Ensure that CDPATH is not set. Otherwise, the output from cd
+# would cause trouble in at least one use below.
+(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
+
local_gl_dir=gl
-# Temporary directory names.
-bt='._bootmp'
-bt_regex=`echo "$bt"| sed 's/\./[.]/g'`
-bt2=${bt}2
+# Honour $PERL, but work even if there is none
+PERL="${PERL-perl}"
+
+me=$0
usage() {
- echo >&2 "\
-Usage: $0 [OPTION]...
+ cat <<EOF
+Usage: $me [OPTION]...
Bootstrap this package from the checked-out sources.
Options:
- --gnulib-srcdir=DIRNAME Specify the local directory where gnulib
+ --gnulib-srcdir=DIRNAME specify the local directory where gnulib
sources reside. Use this if you already
have gnulib sources on your machine, and
do not want to waste your bandwidth downloading
- them again.
- --copy Copy files instead of creating symbolic links.
- --force Attempt to bootstrap even if the sources seem
- not to have been checked out.
- --skip-po Do not download po files.
-
-If the file $0.conf exists in the same directory as this script, its
+ them again. Defaults to \$GNULIB_SRCDIR
+ --bootstrap-sync if this bootstrap script is not identical to
+ the version in the local gnulib sources,
+ update this script, and then restart it with
+ /bin/sh or the shell \$CONFIG_SHELL
+ --no-bootstrap-sync do not check whether bootstrap is out of sync
+ --copy copy files instead of creating symbolic links
+ --force attempt to bootstrap even if the sources seem
+ not to have been checked out
+ --no-git do not use git to update gnulib. Requires that
+ --gnulib-srcdir point to a correct gnulib snapshot
+ --skip-po do not download po files
+
+If the file $me.conf exists in the same directory as this script, its
contents are read as shell variables to configure the bootstrap.
+For build prerequisites, environment variables like \$AUTOCONF and \$AMTAR
+are honored.
+
Running without arguments will suffice in most cases.
-"
+EOF
}
+# warnf_ FORMAT-STRING ARG1...
+warnf_ ()
+{
+ warnf_format_=$1
+ shift
+ nl='
+'
+ case $* in
+ *$nl*) me_=$(printf "$me"|tr "$nl|" '??')
+ printf "$warnf_format_" "$@" | sed "s|^|$me_: |" ;;
+ *) printf "$me: $warnf_format_" "$@" ;;
+ esac >&2
+}
+
+# warn_ WORD1...
+warn_ ()
+{
+ # If IFS does not start with ' ', set it and emit the warning in a subshell.
+ case $IFS in
+ ' '*) warnf_ '%s\n' "$*";;
+ *) (IFS=' '; warn_ "$@");;
+ esac
+}
+
+# die WORD1...
+die() { warn_ "$@"; exit 1; }
+
# Configuration.
# Name of the Makefile.am
@@ -67,32 +118,51 @@ gnulib_modules=
# Any gnulib files needed that are not in modules.
gnulib_files=
+: ${AUTOPOINT=autopoint}
+: ${AUTORECONF=autoreconf}
+
+# A function to be called right after gnulib-tool is run.
+# Override it via your own definition in bootstrap.conf.
+bootstrap_post_import_hook() { :; }
+
+# A function to be called after everything else in this script.
+# Override it via your own definition in bootstrap.conf.
+bootstrap_epilogue() { :; }
+
# The command to download all .po files for a specified domain into
# a specified directory. Fill in the first %s is the domain name, and
# the second with the destination directory. Use rsync's -L and -r
# options because the latest/%s directory and the .po files within are
# all symlinks.
po_download_command_format=\
-"rsync -Lrtvz 'translationproject.org::tp/latest/%s/' '%s'"
+"rsync --delete --exclude '*.s1' -Lrtvz \
+ 'translationproject.org::tp/latest/%s/' '%s'"
+
+# 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/"
+# Prefer a non-empty tarname (4th argument of AC_INIT if given), else
+# fall back to the package name (1st argument with munging)
extract_package_name='
- /^AC_INIT(/{
- /.*,.*,.*, */{
- s///
- s/[][]//g
- s/)$//
+ /^AC_INIT(\[*/{
+ s///
+ /^[^,]*,[^,]*,[^,]*,[ []*\([^][ ,)]\)/{
+ s//\1/
+ s/[],)].*//
p
q
}
- s/AC_INIT(\[*//
- s/]*,.*//
+ s/[],)].*//
s/^GNU //
y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/
- s/[^A-Za-z0-9_]/-/g
+ s/[^abcdefghijklmnopqrstuvwxyz0123456789_]/-/g
p
}
'
-package=`sed -n "$extract_package_name" configure.ac` || exit
+package=$(sed -n "$extract_package_name" configure.ac) \
+ || die 'cannot find package name in configure.ac'
gnulib_name=lib$package
build_aux=build-aux
@@ -100,18 +170,7 @@ source_base=lib
m4_base=m4
doc_base=doc
tests_base=tests
-
-# Extra files from gnulib, which override files from other sources.
-gnulib_extra_files="
- $build_aux/install-sh
- $build_aux/missing
- $build_aux/mdate-sh
- $build_aux/texinfo.tex
- $build_aux/depcomp
- $build_aux/config.guess
- $build_aux/config.sub
- doc/INSTALL
-"
+gnulib_extra_files=''
# Additional gnulib-tool options to use. Use "\newline" to break lines.
gnulib_tool_option_extras=
@@ -126,7 +185,8 @@ XGETTEXT_OPTIONS='\\\
--flag=error:3:c-format --flag=error_at_line:5:c-format\\\
'
-# Package bug report address for gettext files
+# Package bug report address and copyright holder for gettext files
+COPYRIGHT_HOLDER='Free Software Foundation, Inc.'
MSGID_BUGS_ADDRESS=bug-$package@gnu.org
# Files we don't want to import.
@@ -145,6 +205,57 @@ copy=false
# on which version control system (if any) is used in the source directory.
vc_ignore=auto
+# Set this to true in bootstrap.conf to enable --bootstrap-sync by
+# default.
+bootstrap_sync=false
+
+# Use git to update gnulib sources
+use_git=true
+
+check_exists() {
+ if test "$1" = "--verbose"; then
+ ($2 --version </dev/null) >/dev/null 2>&1
+ if test $? -ge 126; then
+ # If not found, run with diagnostics as one may be
+ # presented with env variables to set to find the right version
+ ($2 --version </dev/null)
+ fi
+ else
+ ($1 --version </dev/null) >/dev/null 2>&1
+ fi
+
+ test $? -lt 126
+}
+
+# find_tool ENVVAR NAMES...
+# -------------------------
+# Search for a required program. Use the value of ENVVAR, if set,
+# otherwise find the first of the NAMES that can be run.
+# If found, set ENVVAR to the program name, die otherwise.
+#
+# FIXME: code duplication, see also gnu-web-doc-update.
+find_tool ()
+{
+ find_tool_envvar=$1
+ shift
+ find_tool_names=$@
+ eval "find_tool_res=\$$find_tool_envvar"
+ if test x"$find_tool_res" = x; then
+ for i; do
+ if check_exists $i; then
+ find_tool_res=$i
+ break
+ fi
+ done
+ fi
+ if test x"$find_tool_res" = x; then
+ warn_ "one of these is required: $find_tool_names;"
+ die "alternatively set $find_tool_envvar to a compatible tool"
+ fi
+ eval "$find_tool_envvar=\$find_tool_res"
+ eval "export $find_tool_envvar"
+}
+
# Override the default configuration, if necessary.
# Make sure that bootstrap.conf is sourced from the current directory
# if we were invoked as "sh bootstrap".
@@ -153,6 +264,17 @@ case "$0" in
*) test -r "$0.conf" && . ./"$0.conf" ;;
esac
+# Extra files from gnulib, which override files from other sources.
+test -z "${gnulib_extra_files}" && \
+ gnulib_extra_files="
+ build-aux/install-sh
+ build-aux/mdate-sh
+ build-aux/texinfo.tex
+ build-aux/depcomp
+ build-aux/config.guess
+ build-aux/config.sub
+ doc/INSTALL
+"
if test "$vc_ignore" = auto; then
vc_ignore=
@@ -171,33 +293,70 @@ do
usage
exit;;
--gnulib-srcdir=*)
- GNULIB_SRCDIR=`expr "X$option" : 'X--gnulib-srcdir=\(.*\)'`;;
+ GNULIB_SRCDIR=${option#--gnulib-srcdir=};;
--skip-po)
SKIP_PO=t;;
--force)
checkout_only_file=;;
--copy)
copy=true;;
+ --bootstrap-sync)
+ bootstrap_sync=true;;
+ --no-bootstrap-sync)
+ bootstrap_sync=false;;
+ --no-git)
+ use_git=false;;
*)
- echo >&2 "$0: $option: unknown option"
- exit 1;;
+ die "$option: unknown option";;
esac
done
+$use_git || test -d "$GNULIB_SRCDIR" \
+ || die "Error: --no-git requires --gnulib-srcdir"
+
if test -n "$checkout_only_file" && test ! -r "$checkout_only_file"; then
- echo "$0: Bootstrapping from a non-checked-out distribution is risky." >&2
- exit 1
+ die "Bootstrapping from a non-checked-out distribution is risky."
fi
-# If $STR is not already on a line by itself in $FILE, insert it,
-# sorting the new contents of the file and replacing $FILE with the result.
-insert_sorted_if_absent() {
+# Strip blank and comment lines to leave significant entries.
+gitignore_entries() {
+ sed '/^#/d; /^$/d' "$@"
+}
+
+# If $STR is not already on a line by itself in $FILE, insert it at the start.
+# Entries are inserted at the start of the ignore list to ensure existing
+# entries starting with ! are not overridden. Such entries support
+# whitelisting exceptions after a more generic blacklist pattern.
+insert_if_absent() {
file=$1
str=$2
test -f $file || touch $file
- echo "$str" | sort -u - $file | cmp -s - $file \
- || echo "$str" | sort -u - $file -o $file \
- || exit 1
+ test -r $file || die "Error: failed to read ignore file: $file"
+ duplicate_entries=$(gitignore_entries $file | sort | uniq -d)
+ if [ "$duplicate_entries" ] ; then
+ die "Error: Duplicate entries in $file: " $duplicate_entries
+ fi
+ linesold=$(gitignore_entries $file | wc -l)
+ linesnew=$( { echo "$str"; cat $file; } | gitignore_entries | sort -u | wc -l)
+ if [ $linesold != $linesnew ] ; then
+ { echo "$str" | cat - $file > $file.bak && mv $file.bak $file; } \
+ || die "insert_if_absent $file $str: failed"
+ fi
+}
+
+# Adjust $PATTERN for $VC_IGNORE_FILE and insert it with
+# insert_if_absent.
+insert_vc_ignore() {
+ vc_ignore_file="$1"
+ pattern="$2"
+ case $vc_ignore_file in
+ *.gitignore)
+ # A .gitignore entry that does not start with '/' applies
+ # recursively to subdirectories, so prepend '/' to every
+ # .gitignore entry.
+ pattern=$(echo "$pattern" | sed s,^,/,);;
+ esac
+ insert_if_absent "$vc_ignore_file" "$pattern"
}
# Die if there is no AC_CONFIG_AUX_DIR($build_aux) line in configure.ac.
@@ -206,11 +365,8 @@ grep '^[ ]*AC_CONFIG_AUX_DIR(\['"$build_aux"'\])' configure.ac \
>/dev/null && found_aux_dir=yes
grep '^[ ]*AC_CONFIG_AUX_DIR('"$build_aux"')' configure.ac \
>/dev/null && found_aux_dir=yes
-if test $found_aux_dir = no; then
- echo "$0: expected line not found in configure.ac. Add the following:" >&2
- echo " AC_CONFIG_AUX_DIR([$build_aux])" >&2
- exit 1
-fi
+test $found_aux_dir = yes \
+ || die "configure.ac lacks 'AC_CONFIG_AUX_DIR([$build_aux])'; add it"
# If $build_aux doesn't exist, create it now, otherwise some bits
# below will malfunction. If creating it, also mark it as ignored.
@@ -218,29 +374,235 @@ if test ! -d $build_aux; then
mkdir $build_aux
for dot_ig in x $vc_ignore; do
test $dot_ig = x && continue
- insert_sorted_if_absent $dot_ig $build_aux
+ insert_vc_ignore $dot_ig $build_aux
+ done
+fi
+
+# Note this deviates from the version comparison in automake
+# in that it treats 1.5 < 1.5.0, and treats 1.4.4a < 1.4-p3a
+# but this should suffice as we won't be specifying old
+# version formats or redundant trailing .0 in bootstrap.conf.
+# If we did want full compatibility then we should probably
+# use m4_version_compare from autoconf.
+sort_ver() { # sort -V is not generally available
+ ver1="$1"
+ ver2="$2"
+
+ # split on '.' and compare each component
+ i=1
+ while : ; do
+ p1=$(echo "$ver1" | cut -d. -f$i)
+ p2=$(echo "$ver2" | cut -d. -f$i)
+ if [ ! "$p1" ]; then
+ echo "$1 $2"
+ break
+ elif [ ! "$p2" ]; then
+ echo "$2 $1"
+ break
+ elif [ ! "$p1" = "$p2" ]; then
+ if [ "$p1" -gt "$p2" ] 2>/dev/null; then # numeric comparison
+ echo "$2 $1"
+ elif [ "$p2" -gt "$p1" ] 2>/dev/null; then # numeric comparison
+ echo "$1 $2"
+ else # numeric, then lexicographic comparison
+ lp=$(printf "$p1\n$p2\n" | LANG=C sort -n | tail -n1)
+ if [ "$lp" = "$p2" ]; then
+ echo "$1 $2"
+ else
+ echo "$2 $1"
+ fi
+ fi
+ break
+ fi
+ i=$(($i+1))
+ done
+}
+
+get_version() {
+ app=$1
+
+ $app --version >/dev/null 2>&1 || { $app --version; return 1; }
+
+ $app --version 2>&1 |
+ sed -n '# Move version to start of line.
+ s/.*[v ]\([0-9]\)/\1/
+
+ # Skip lines that do not start with version.
+ /^[0-9]/!d
+
+ # Remove characters after the version.
+ s/[^.a-z0-9-].*//
+
+ # The first component must be digits only.
+ s/^\([0-9]*\)[a-z-].*/\1/
+
+ #the following essentially does s/5.005/5.5/
+ s/\.0*\([1-9]\)/.\1/g
+ p
+ q'
+}
+
+check_versions() {
+ ret=0
+
+ while read app req_ver; do
+ # We only need libtoolize from the libtool package.
+ if test "$app" = libtool; then
+ app=libtoolize
+ fi
+ # Exempt git if --no-git is in effect.
+ if test "$app" = git; then
+ $use_git || continue
+ fi
+ # Honor $APP variables ($TAR, $AUTOCONF, etc.)
+ appvar=$(echo $app | LC_ALL=C tr '[a-z]-' '[A-Z]_')
+ test "$appvar" = TAR && appvar=AMTAR
+ case $appvar in
+ GZIP) ;; # Do not use $GZIP: it contains gzip options.
+ PERL::*) ;; # Keep perl modules as-is
+ *) eval "app=\${$appvar-$app}" ;;
+ esac
+
+ # Handle the still-experimental Automake-NG programs specially.
+ # They remain named as the mainstream Automake programs ("automake",
+ # and "aclocal") to avoid gratuitous incompatibilities with
+ # pre-existing usages (by, say, autoreconf, or custom autogen.sh
+ # scripts), but correctly identify themselves (as being part of
+ # "GNU automake-ng") when asked their version.
+ case $app in
+ automake-ng|aclocal-ng)
+ app=${app%-ng}
+ ($app --version | grep '(GNU automake-ng)') >/dev/null 2>&1 || {
+ warn_ "Error: '$app' not found or not from Automake-NG"
+ ret=1
+ continue
+ } ;;
+ # Another check is for perl modules. These can be written as
+ # e.g. perl::XML::XPath in case of XML::XPath module, etc.
+ perl::*)
+ # Extract module name
+ app="${app#perl::}"
+ if ! $PERL -m"$app" -e 'exit 0' >/dev/null 2>&1; then
+ warn_ "Error: perl module '$app' not found"
+ ret=1
+ fi
+ continue
+ ;;
+ esac
+ if [ "$req_ver" = "-" ]; then
+ # Merely require app to exist; not all prereq apps are well-behaved
+ # so we have to rely on $? rather than get_version.
+ if ! check_exists --verbose $app; then
+ warn_ "Error: '$app' not found"
+ ret=1
+ fi
+ else
+ # Require app to produce a new enough version string.
+ inst_ver=$(get_version $app)
+ if [ ! "$inst_ver" ]; then
+ warn_ "Error: '$app' not found"
+ ret=1
+ else
+ latest_ver=$(sort_ver $req_ver $inst_ver | cut -d' ' -f2)
+ if [ ! "$latest_ver" = "$inst_ver" ]; then
+ warnf_ '%s\n' \
+ "Error: '$app' version == $inst_ver is too old" \
+ " '$app' version >= $req_ver is required"
+ ret=1
+ fi
+ fi
+ fi
done
+
+ return $ret
+}
+
+print_versions() {
+ echo "Program Min_version"
+ echo "----------------------"
+ printf %s "$buildreq"
+ echo "----------------------"
+ # can't depend on column -t
+}
+
+# Find sha1sum, named gsha1sum on MacPorts, shasum on Mac OS X 10.6.
+# Also find the compatible sha1 utility on the BSDs
+if test x"$SKIP_PO" = x; then
+ find_tool SHA1SUM sha1sum gsha1sum shasum sha1
+fi
+
+use_libtool=0
+# We'd like to use grep -E, to see if any of LT_INIT,
+# AC_PROG_LIBTOOL, AM_PROG_LIBTOOL is used in configure.ac,
+# but that's not portable enough (e.g., for Solaris).
+grep '^[ ]*A[CM]_PROG_LIBTOOL' configure.ac >/dev/null \
+ && use_libtool=1
+grep '^[ ]*LT_INIT' configure.ac >/dev/null \
+ && use_libtool=1
+if test $use_libtool = 1; then
+ find_tool LIBTOOLIZE glibtoolize libtoolize
+fi
+
+# gnulib-tool requires at least automake and autoconf.
+# If either is not listed, add it (with minimum version) as a prerequisite.
+case $buildreq in
+ *automake*) ;;
+ *) buildreq="automake 1.9
+$buildreq" ;;
+esac
+case $buildreq in
+ *autoconf*) ;;
+ *) buildreq="autoconf 2.59
+$buildreq" ;;
+esac
+
+# When we can deduce that gnulib-tool will require patch,
+# and when patch is not already listed as a prerequisite, add it, too.
+if test -d "$local_gl_dir" \
+ && ! find "$local_gl_dir" -name '*.diff' -exec false {} +; then
+ case $buildreq in
+ *patch*) ;;
+ *) buildreq="patch -
+$buildreq" ;;
+ esac
+fi
+
+if ! printf "$buildreq" | check_versions; then
+ echo >&2
+ if test -f README-prereq; then
+ die "See README-prereq for how to get the prerequisite programs"
+ else
+ die "Please install the prerequisite programs"
+ fi
+fi
+
+# Warn the user if autom4te appears to be broken; this causes known
+# issues with at least gettext 0.18.3.
+probe=$(echo 'm4_quote([hi])' | autom4te -l M4sugar -t 'm4_quote:$%' -)
+if test "x$probe" != xhi; then
+ warn_ "WARNING: your autom4te wrapper eats stdin;"
+ warn_ "if bootstrap fails, consider upgrading your autotools"
fi
echo "$0: Bootstrapping from checked-out $package sources..."
# See if we can use gnulib's git-merge-changelog merge driver.
-if test -d .git && (git --version) >/dev/null 2>/dev/null ; then
+if $use_git && test -d .git && check_exists git; then
if git config merge.merge-changelog.driver >/dev/null ; then
:
- elif (git-merge-changelog --version) >/dev/null 2>/dev/null ; then
- echo "initializing git-merge-changelog driver"
+ elif check_exists git-merge-changelog; then
+ echo "$0: initializing git-merge-changelog driver"
git config merge.merge-changelog.name 'GNU-style ChangeLog merge driver'
git config merge.merge-changelog.driver 'git-merge-changelog %O %A %B'
else
- echo "consider installing git-merge-changelog from gnulib"
+ echo "$0: consider installing git-merge-changelog from gnulib"
fi
fi
cleanup_gnulib() {
status=$?
- rm -fr gnulib
+ rm -fr "$gnulib_path"
exit $status
}
@@ -248,83 +610,129 @@ git_modules_config () {
test -f .gitmodules && git config --file .gitmodules "$@"
}
-# Get gnulib files.
+if $use_git; then
+ gnulib_path=$(git_modules_config submodule.gnulib.path)
+ test -z "$gnulib_path" && gnulib_path=gnulib
+fi
+
+# Get gnulib files. Populate $GNULIB_SRCDIR, possibly updating a
+# submodule, for use in the rest of the script.
case ${GNULIB_SRCDIR--} in
-)
+ # Note that $use_git is necessarily true in this case.
if git_modules_config submodule.gnulib.url >/dev/null; then
echo "$0: getting gnulib files..."
- git submodule init || exit $?
- git submodule update || exit $?
+ git submodule init -- "$gnulib_path" || exit $?
+ git submodule update -- "$gnulib_path" || exit $?
- elif [ ! -d gnulib ]; then
+ elif [ ! -d "$gnulib_path" ]; then
echo "$0: getting gnulib files..."
trap cleanup_gnulib 1 2 13 15
- git clone --depth 2 git://git.sv.gnu.org/gnulib ||
+ shallow=
+ git clone -h 2>&1 | grep -- --depth > /dev/null && shallow='--depth 2'
+ git clone $shallow git://git.sv.gnu.org/gnulib "$gnulib_path" ||
cleanup_gnulib
trap - 1 2 13 15
fi
- GNULIB_SRCDIR=gnulib
+ GNULIB_SRCDIR=$gnulib_path
;;
*)
- # Redirect the gnulib submodule to the directory on the command line
- # if possible.
- if test -d "$GNULIB_SRCDIR"/.git && \
- git_modules_config submodule.gnulib.url >/dev/null; then
- git submodule init
- GNULIB_SRCDIR=`cd $GNULIB_SRCDIR && pwd`
- git config --replace-all submodule.gnulib.url $GNULIB_SRCDIR
+ # Use GNULIB_SRCDIR directly or as a reference.
+ if $use_git && test -d "$GNULIB_SRCDIR"/.git && \
+ git_modules_config submodule.gnulib.url >/dev/null; then
echo "$0: getting gnulib files..."
- git submodule update || exit $?
- GNULIB_SRCDIR=gnulib
+ if git submodule -h|grep -- --reference > /dev/null; then
+ # Prefer the one-liner available in git 1.6.4 or newer.
+ git submodule update --init --reference "$GNULIB_SRCDIR" \
+ "$gnulib_path" || exit $?
+ else
+ # This fallback allows at least git 1.5.5.
+ if test -f "$gnulib_path"/gnulib-tool; then
+ # Since file already exists, assume submodule init already complete.
+ git submodule update -- "$gnulib_path" || exit $?
+ else
+ # Older git can't clone into an empty directory.
+ rmdir "$gnulib_path" 2>/dev/null
+ git clone --reference "$GNULIB_SRCDIR" \
+ "$(git_modules_config submodule.gnulib.url)" "$gnulib_path" \
+ && git submodule init -- "$gnulib_path" \
+ && git submodule update -- "$gnulib_path" \
+ || exit $?
+ fi
+ fi
+ GNULIB_SRCDIR=$gnulib_path
fi
;;
esac
+# $GNULIB_SRCDIR now points to the version of gnulib to use, and
+# we no longer need to use git or $gnulib_path below here.
+
+if $bootstrap_sync; then
+ cmp -s "$0" "$GNULIB_SRCDIR/build-aux/bootstrap" || {
+ echo "$0: updating bootstrap and restarting..."
+ case $(sh -c 'echo "$1"' -- a) in
+ a) ignored=--;;
+ *) ignored=ignored;;
+ esac
+ exec sh -c \
+ 'cp "$1" "$2" && shift && exec "${CONFIG_SHELL-/bin/sh}" "$@"' \
+ $ignored "$GNULIB_SRCDIR/build-aux/bootstrap" \
+ "$0" "$@" --no-bootstrap-sync
+ }
+fi
+
gnulib_tool=$GNULIB_SRCDIR/gnulib-tool
-<$gnulib_tool || exit
+<$gnulib_tool || exit $?
# Get translations.
download_po_files() {
subdir=$1
domain=$2
- echo "$0: getting translations into $subdir for $domain..."
- cmd=`printf "$po_download_command_format" "$domain" "$subdir"`
+ echo "$me: getting translations into $subdir for $domain..."
+ cmd=$(printf "$po_download_command_format" "$domain" "$subdir")
+ eval "$cmd" && return
+ # Fallback to HTTP.
+ cmd=$(printf "$po_download_command_format2" "$subdir" "$domain")
eval "$cmd"
}
-# Download .po files to $po_dir/.reference and copy only the new
+# Mirror .po files to $po_dir/.reference and copy only the new
# or modified ones into $po_dir. Also update $po_dir/LINGUAS.
+# Note po files that exist locally only are left in $po_dir but will
+# not be included in LINGUAS and hence will not be distributed.
update_po_files() {
# Directory containing primary .po files.
# Overwrite them only when we're sure a .po file is new.
po_dir=$1
domain=$2
- # Download *.po files into this dir.
+ # Mirror *.po files into this dir.
# Usually contains *.s1 checksum files.
ref_po_dir="$po_dir/.reference"
test -d $ref_po_dir || mkdir $ref_po_dir || return
download_po_files $ref_po_dir $domain \
&& ls "$ref_po_dir"/*.po 2>/dev/null |
- sed 's|.*/||; s|\.po$||' > "$po_dir/LINGUAS"
+ sed 's|.*/||; s|\.po$||' > "$po_dir/LINGUAS" || return
- langs=`cd $ref_po_dir && echo *.po|sed 's/\.po//g'`
+ langs=$(cd $ref_po_dir && echo *.po | sed 's/\.po//g')
test "$langs" = '*' && langs=x
for po in $langs; do
case $po in x) continue;; esac
new_po="$ref_po_dir/$po.po"
cksum_file="$ref_po_dir/$po.s1"
if ! test -f "$cksum_file" ||
- ! test -f "$po_dir/$po.po" ||
- ! sha1sum -c --status "$cksum_file" < "$new_po" > /dev/null; then
- echo "updated $po_dir/$po.po..."
- cp "$new_po" "$po_dir/$po.po" && sha1sum < "$new_po" > "$cksum_file"
+ ! test -f "$po_dir/$po.po" ||
+ ! $SHA1SUM -c "$cksum_file" < "$new_po" > /dev/null 2>&1; then
+ echo "$me: updated $po_dir/$po.po..."
+ cp "$new_po" "$po_dir/$po.po" \
+ && $SHA1SUM < "$new_po" > "$cksum_file" || return
fi
done
}
@@ -349,231 +757,174 @@ symlink_to_dir()
# If the destination directory doesn't exist, create it.
# This is required at least for "lib/uniwidth/cjk.h".
- dst_dir=`dirname "$dst"`
+ dst_dir=$(dirname "$dst")
if ! test -d "$dst_dir"; then
mkdir -p "$dst_dir"
# If we've just created a directory like lib/uniwidth,
# tell version control system(s) it's ignorable.
# FIXME: for now, this does only one level
- parent=`dirname "$dst_dir"`
+ parent=$(dirname "$dst_dir")
for dot_ig in x $vc_ignore; do
- test $dot_ig = x && continue
- ig=$parent/$dot_ig
- insert_sorted_if_absent $ig `echo "$dst_dir"|sed 's,.*/,,'`
+ test $dot_ig = x && continue
+ ig=$parent/$dot_ig
+ insert_vc_ignore $ig "${dst_dir##*/}"
done
fi
if $copy; then
{
- test ! -h "$dst" || {
- echo "$0: rm -f $dst" &&
- rm -f "$dst"
- }
+ test ! -h "$dst" || {
+ echo "$me: rm -f $dst" &&
+ rm -f "$dst"
+ }
} &&
test -f "$dst" &&
cmp -s "$src" "$dst" || {
- echo "$0: cp -fp $src $dst" &&
- cp -fp "$src" "$dst"
+ echo "$me: cp -fp $src $dst" &&
+ cp -fp "$src" "$dst"
}
else
+ # Leave any existing symlink alone, if it already points to the source,
+ # so that broken build tools that care about symlink times
+ # aren't confused into doing unnecessary builds. Conversely, if the
+ # existing symlink's time stamp 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>.
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 &&
- test "$src_i" = "$dst_i" || {
- dot_dots=
- case $src in
- /*) ;;
- *)
- case /$dst/ in
- *//* | */../* | */./* | /*/*/*/*/*/)
- echo >&2 "$0: invalid symlink calculation: $src -> $dst"
- exit 1;;
- /*/*/*/*/) dot_dots=../../../;;
- /*/*/*/) dot_dots=../../;;
- /*/*/) dot_dots=../;;
- esac;;
- esac
-
- echo "$0: ln -fs $dot_dots$src $dst" &&
- ln -fs "$dot_dots$src" "$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 &&
+ test "$src_i" = "$dst_i" &&
+ both_ls=$(ls -dt "$src" "$dst") &&
+ test "X$both_ls" = "X$dst$nl$src" || {
+ dot_dots=
+ case $src in
+ /*) ;;
+ *)
+ case /$dst/ in
+ *//* | */../* | */./* | /*/*/*/*/*/)
+ die "invalid symlink calculation: $src -> $dst";;
+ /*/*/*/*/) dot_dots=../../../;;
+ /*/*/*/) dot_dots=../../;;
+ /*/*/) dot_dots=../;;
+ esac;;
+ esac
+
+ echo "$me: ln -fs $dot_dots$src $dst" &&
+ ln -fs "$dot_dots$src" "$dst"
}
fi
}
}
-cp_mark_as_generated()
-{
- cp_src=$1
- cp_dst=$2
-
- if cmp -s "$cp_src" "$GNULIB_SRCDIR/$cp_dst"; then
- symlink_to_dir "$GNULIB_SRCDIR" "$cp_dst"
- elif cmp -s "$cp_src" "$local_gl_dir/$cp_dst"; then
- symlink_to_dir $local_gl_dir "$cp_dst"
- else
- case $cp_dst in
- *.[ch]) c1='/* '; c2=' */';;
- *.texi) c1='@c '; c2= ;;
- *.m4|*/Make*|Make*) c1='# ' ; c2= ;;
- *) c1= ; c2= ;;
- esac
-
- # If the destination directory doesn't exist, create it.
- # This is required at least for "lib/uniwidth/cjk.h".
- dst_dir=`dirname "$cp_dst"`
- test -d "$dst_dir" || mkdir -p "$dst_dir"
-
- if test -z "$c1"; then
- cmp -s "$cp_src" "$cp_dst" || {
- # Copy the file first to get proper permissions if it
- # doesn't already exist. Then overwrite the copy.
- echo "$0: cp -f $cp_src $cp_dst" &&
- rm -f "$cp_dst" &&
- cp "$cp_src" "$cp_dst-t" &&
- sed "s!$bt_regex/!!g" "$cp_src" > "$cp_dst-t" &&
- mv -f "$cp_dst-t" "$cp_dst"
- }
- else
- # Copy the file first to get proper permissions if it
- # doesn't already exist. Then overwrite the copy.
- cp "$cp_src" "$cp_dst-t" &&
- (
- echo "$c1-*- buffer-read-only: t -*- vi: set ro:$c2" &&
- echo "${c1}DO NOT EDIT! GENERATED AUTOMATICALLY!$c2" &&
- sed "s!$bt_regex/!!g" "$cp_src"
- ) > $cp_dst-t &&
- if cmp -s "$cp_dst-t" "$cp_dst"; then
- rm -f "$cp_dst-t"
- else
- echo "$0: cp $cp_src $cp_dst # with edits" &&
- mv -f "$cp_dst-t" "$cp_dst"
- fi
- fi
- fi
-}
-
version_controlled_file() {
- dir=$1
+ parent=$1
file=$2
- found=no
- if test -d CVS; then
- grep -F "/$file/" $dir/CVS/Entries 2>/dev/null |
- grep '^/[^/]*/[0-9]' > /dev/null && found=yes
- elif test -d .git; then
- git rm -n "$dir/$file" > /dev/null 2>&1 && found=yes
+ if test -d .git; then
+ git rm -n "$file" > /dev/null 2>&1
elif test -d .svn; then
- svn log -r HEAD "$dir/$file" > /dev/null 2>&1 && found=yes
+ svn log -r HEAD "$file" > /dev/null 2>&1
+ elif test -d CVS; then
+ grep -F "/${file##*/}/" "$parent/CVS/Entries" 2>/dev/null |
+ grep '^/[^/]*/[0-9]' > /dev/null
else
- echo "$0: no version control for $dir/$file?" >&2
+ warn_ "no version control for $file?"
+ false
fi
- test $found = yes
}
-slurp() {
- for dir in . `(cd $1 && find * -type d -print)`; do
- copied=
- sep=
- for file in `ls -a $1/$dir`; do
- case $file in
- .|..) continue;;
- .*) continue;; # FIXME: should all file names starting with "." be ignored?
- esac
- test -d $1/$dir/$file && continue
- for excluded_file in $excluded_files; do
- test "$dir/$file" = "$excluded_file" && continue 2
- done
- if test $file = Makefile.am; then
- copied=$copied${sep}$gnulib_mk; sep=$nl
- remove_intl='/^[^#].*\/intl/s/^/#/;'"s!$bt_regex/!!g"
- sed "$remove_intl" $1/$dir/$file | cmp -s - $dir/$gnulib_mk || {
- echo "$0: Copying $1/$dir/$file to $dir/$gnulib_mk ..." &&
- rm -f $dir/$gnulib_mk &&
- sed "$remove_intl" $1/$dir/$file >$dir/$gnulib_mk
- }
- elif { test "${2+set}" = set && test -r $2/$dir/$file; } ||
- version_controlled_file $dir $file; then
- echo "$0: $dir/$file overrides $1/$dir/$file"
- else
- copied=$copied$sep$file; sep=$nl
- if test $file = gettext.m4; then
- echo "$0: patching m4/gettext.m4 to remove need for intl/* ..."
- rm -f $dir/$file
- sed '
- /^AC_DEFUN(\[AM_INTL_SUBDIR],/,/^]/c\
- AC_DEFUN([AM_INTL_SUBDIR], [
- /^AC_DEFUN(\[gt_INTL_SUBDIR_CORE],/,/^]/c\
- AC_DEFUN([gt_INTL_SUBDIR_CORE], [])
- $a\
- AC_DEFUN([gl_LOCK_EARLY], [])
- ' $1/$dir/$file >$dir/$file
- else
- cp_mark_as_generated $1/$dir/$file $dir/$file
- fi
- fi || exit
- done
+# NOTE: we have to be careful to run both autopoint and libtoolize
+# before gnulib-tool, since gnulib-tool is likely to provide newer
+# versions of files "installed" by these two programs.
+# Then, *after* gnulib-tool (see below), we have to be careful to
+# run autoreconf in such a way that it does not run either of these
+# two just-pre-run programs.
- for dot_ig in x $vc_ignore; do
- test $dot_ig = x && continue
- ig=$dir/$dot_ig
- if test -n "$copied"; then
- insert_sorted_if_absent $ig "$copied"
- # If an ignored file name ends with .in.h, then also add
- # the name with just ".h". Many gnulib headers are generated,
- # e.g., stdint.in.h -> stdint.h, dirent.in.h ->..., etc.
- # Likewise for .gperf -> .h, .y -> .c, and .sin -> .sed
- f=`echo "$copied"|sed 's/\.in\.h$/.h/;s/\.sin$/.sed/;s/\.y$/.c/;s/\.gperf$/.h/'`
- insert_sorted_if_absent $ig "$f"
-
- # For files like sys_stat.in.h and sys_time.in.h, record as
- # ignorable the directory we might eventually create: sys/.
- f=`echo "$copied"|sed 's/sys_.*\.in\.h$/sys/'`
- insert_sorted_if_absent $ig "$f"
- fi
- done
- done
-}
+# Import from gettext.
+with_gettext=yes
+grep '^[ ]*AM_GNU_GETTEXT_VERSION(' configure.ac >/dev/null || \
+ with_gettext=no
+if test $with_gettext = yes || test $use_libtool = 1; then
+
+ tempbase=.bootstrap$$
+ trap "rm -f $tempbase.0 $tempbase.1" 1 2 13 15
+
+ > $tempbase.0 > $tempbase.1 &&
+ find . ! -type d -print | sort > $tempbase.0 || exit
+
+ if test $with_gettext = yes; then
+ # Released autopoint has the tendency to install macros that have been
+ # obsoleted in current gnulib, so run this before gnulib-tool.
+ echo "$0: $AUTOPOINT --force"
+ $AUTOPOINT --force || exit
+ fi
+
+ # Autoreconf runs aclocal before libtoolize, which causes spurious
+ # warnings if the initial aclocal is confused by the libtoolized
+ # (or worse out-of-date) macro directory.
+ # libtoolize 1.9b added the --install option; but we support back
+ # to libtoolize 1.5.22, where the install action was default.
+ if test $use_libtool = 1; then
+ install=
+ case $($LIBTOOLIZE --help) in
+ *--install*) install=--install ;;
+ esac
+ echo "running: $LIBTOOLIZE $install --copy"
+ $LIBTOOLIZE $install --copy
+ fi
+
+ find . ! -type d -print | sort >$tempbase.1
+ old_IFS=$IFS
+ IFS=$nl
+ for file in $(comm -13 $tempbase.0 $tempbase.1); do
+ IFS=$old_IFS
+ parent=${file%/*}
+ version_controlled_file "$parent" "$file" || {
+ for dot_ig in x $vc_ignore; do
+ test $dot_ig = x && continue
+ ig=$parent/$dot_ig
+ insert_vc_ignore "$ig" "${file##*/}"
+ done
+ }
+ done
+ IFS=$old_IFS
-# Create boot temporary directories to import from gnulib and gettext.
-rm -fr $bt $bt2 &&
-mkdir $bt $bt2 || exit
+ rm -f $tempbase.0 $tempbase.1
+ trap - 1 2 13 15
+fi
# Import from gnulib.
gnulib_tool_options="\
--import\
--no-changelog\
- --aux-dir $bt/$build_aux\
- --doc-base $bt/$doc_base\
+ --aux-dir $build_aux\
+ --doc-base $doc_base\
--lib $gnulib_name\
- --m4-base $bt/$m4_base/\
- --source-base $bt/$source_base/\
- --tests-base $bt/$tests_base\
+ --m4-base $m4_base/\
+ --source-base $source_base/\
+ --tests-base $tests_base\
--local-dir $local_gl_dir\
$gnulib_tool_option_extras\
"
+if test $use_libtool = 1; then
+ case "$gnulib_tool_options " in
+ *' --libtool '*) ;;
+ *) gnulib_tool_options="$gnulib_tool_options --libtool" ;;
+ esac
+fi
echo "$0: $gnulib_tool $gnulib_tool_options --import ..."
-$gnulib_tool $gnulib_tool_options --import $gnulib_modules &&
-slurp $bt || exit
+$gnulib_tool $gnulib_tool_options --import $gnulib_modules \
+ || die "gnulib-tool failed"
for file in $gnulib_files; do
- symlink_to_dir "$GNULIB_SRCDIR" $file || exit
+ symlink_to_dir "$GNULIB_SRCDIR" $file \
+ || die "failed to symlink $file"
done
-
-# Import from gettext.
-with_gettext=yes
-grep '^[ ]*AM_GNU_GETTEXT_VERSION(' configure.ac >/dev/null || \
- with_gettext=no
-
-if test $with_gettext = yes; then
- echo "$0: (cd $bt2; autopoint) ..."
- cp configure.ac $bt2 &&
- (cd $bt2 && autopoint && rm configure.ac) &&
- slurp $bt2 $bt || exit
-fi
-rm -fr $bt $bt2 || exit
+bootstrap_post_import_hook \
+ || die "bootstrap_post_import_hook failed"
# Remove any dangling symlink matching "*.m4" or "*.[ch]" in some
# gnulib-populated directories. Such .m4 files would cause aclocal to fail.
@@ -587,33 +938,32 @@ find "$m4_base" "$source_base" \
-depth \( -name '*.m4' -o -name '*.[ch]' \) \
-type l -xtype l -delete > /dev/null 2>&1
-# Reconfigure, getting other files.
+# Invoke autoreconf with --force --install to ensure upgrades of tools
+# such as ylwrap.
+AUTORECONFFLAGS="--verbose --install --force -I $m4_base $ACLOCAL_FLAGS"
-for command in \
- libtool \
- 'aclocal --force -I m4' \
- 'autoconf --force' \
- 'autoheader --force' \
- 'automake --add-missing --copy --force-missing';
-do
- if test "$command" = libtool; then
- grep '^[ ]*AM_PROG_LIBTOOL\>' configure.ac >/dev/null ||
- continue
- command='libtoolize -c -f'
- fi
- echo "$0: $command ..."
- $command || exit
-done
+# Some systems (RHEL 5) are using ancient autotools, for which the
+# --no-recursive option had not been invented. Detect that lack and
+# omit the option when it's not supported. FIXME in 2017: remove this
+# hack when RHEL 5 autotools are updated, or when they become irrelevant.
+case $($AUTORECONF --help) in
+ *--no-recursive*) AUTORECONFFLAGS="$AUTORECONFFLAGS --no-recursive";;
+esac
+# Tell autoreconf not to invoke autopoint or libtoolize; they were run above.
+echo "running: AUTOPOINT=true LIBTOOLIZE=true $AUTORECONF $AUTORECONFFLAGS"
+AUTOPOINT=true LIBTOOLIZE=true $AUTORECONF $AUTORECONFFLAGS \
+ || die "autoreconf failed"
# Get some extra files from gnulib, overriding existing files.
for file in $gnulib_extra_files; do
case $file in
*/INSTALL) dst=INSTALL;;
- build-aux/*) dst=$build_aux/`expr "$file" : 'build-aux/\(.*\)'`;;
+ build-aux/*) dst=$build_aux/${file#build-aux/};;
*) dst=$file;;
esac
- symlink_to_dir "$GNULIB_SRCDIR" $file $dst || exit
+ symlink_to_dir "$GNULIB_SRCDIR" $file $dst \
+ || die "failed to symlink $file"
done
if test $with_gettext = yes; then
@@ -622,13 +972,26 @@ if test $with_gettext = yes; then
rm -f po/Makevars
sed '
/^EXTRA_LOCALE_CATEGORIES *=/s/=.*/= '"$EXTRA_LOCALE_CATEGORIES"'/
- /^MSGID_BUGS_ADDRESS *=/s/=.*/= '"$MSGID_BUGS_ADDRESS"'/
+ /^COPYRIGHT_HOLDER *=/s/=.*/= '"$COPYRIGHT_HOLDER"'/
+ /^MSGID_BUGS_ADDRESS *=/s|=.*|= '"$MSGID_BUGS_ADDRESS"'|
/^XGETTEXT_OPTIONS *=/{
s/$/ \\/
a\
- '"$XGETTEXT_OPTIONS"' $${end_of_xgettext_options+}
+ '"$XGETTEXT_OPTIONS"' $${end_of_xgettext_options+}
}
- ' po/Makevars.template >po/Makevars
+ ' po/Makevars.template >po/Makevars \
+ || die 'cannot generate po/Makevars'
+
+ # If the 'gettext' module is in use, grab the latest Makefile.in.in.
+ # If only the 'gettext-h' module is in use, assume autopoint already
+ # put the correct version of this file into place.
+ case $gnulib_modules in
+ *gettext-h*) ;;
+ *gettext*)
+ cp $GNULIB_SRCDIR/build-aux/po/Makefile.in.in po/Makefile.in.in \
+ || die "cannot create po/Makefile.in.in"
+ ;;
+ esac
if test -d runtime-po; then
# Similarly for runtime-po/Makevars, but not quite the same.
@@ -638,15 +1001,26 @@ if test $with_gettext = yes; then
/^subdir *=.*/s/=.*/= runtime-po/
/^MSGID_BUGS_ADDRESS *=/s/=.*/= bug-'"$package"'@gnu.org/
/^XGETTEXT_OPTIONS *=/{
- s/$/ \\/
- a\
- '"$XGETTEXT_OPTIONS_RUNTIME"' $${end_of_xgettext_options+}
+ s/$/ \\/
+ a\
+ '"$XGETTEXT_OPTIONS_RUNTIME"' $${end_of_xgettext_options+}
}
- ' <po/Makevars.template >runtime-po/Makevars
+ ' po/Makevars.template >runtime-po/Makevars \
+ || die 'cannot generate runtime-po/Makevars'
# Copy identical files from po to runtime-po.
(cd po && cp -p Makefile.in.in *-quot *.header *.sed *.sin ../runtime-po)
fi
fi
+bootstrap_epilogue
+
echo "$0: done. Now you can run './configure'."
+
+# Local variables:
+# eval: (add-hook 'write-file-hooks 'time-stamp)
+# time-stamp-start: "scriptversion="
+# time-stamp-format: "%:y-%02m-%02d.%02H"
+# time-stamp-time-zone: "UTC"
+# time-stamp-end: "; # UTC"
+# End:
diff --git a/bootstrap.conf b/bootstrap.conf
index c6919ac..fdbf3d7 100644
--- a/bootstrap.conf
+++ b/bootstrap.conf
@@ -1,6 +1,6 @@
# Bootstrap configuration.
-# Copyright (C) 2006-2008 Free Software Foundation, Inc.
+# Copyright (C) 2006-2016 Free Software Foundation, Inc.
# This 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,52 +15,113 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
+avoided_gnulib_modules='
+ --avoid=lock-tests
+'
# gnulib modules used by this package.
-gnulib_modules="
- acl alloca btowc c-ctype extensions fwriting getdelim getopt gettext-h
- localcharset mbrlen mbrtowc mbsinit memchr mkostemp obstack pathmax regex
- rename selinux-h stdbool stat-macros ssize_t strerror strverscmp
- unlocked-io verify version-etc-fsf wcrtomb wctob"
+gnulib_modules='
+acl
+alloca
+stdalign
+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
+stdbool
+strerror
+strverscmp
+threadlib
+unlocked-io
+update-copyright
+verify
+version-etc-fsf
+wcrtomb
+wctob
+'
+gnulib_name=libsed
checkout_only_file=
MSGID_BUGS_ADDRESS=bug-gnu-utils@gnu.org
# Additional xgettext options to use. Use "\\\newline" to break lines.
XGETTEXT_OPTIONS=$XGETTEXT_OPTIONS'\\\
- --from-code=UTF-8\\\
- --flag=asprintf:2:c-format --flag=vasprintf:2:c-format\\\
- --flag=asnprintf:3:c-format --flag=vasnprintf:3:c-format\\\
+ --flag=asnprintf:3:c-format\\\
+ --flag=asprintf:2:c-format\\\
+ --flag=error:3:c-format\\\
+ --flag=error_at_line:5:c-format\\\
+ --flag=vasnprintf:3:c-format\\\
+ --flag=vasprintf:2:c-format\\\
--flag=wrapf:1:c-format\\\
- --flag=error:3:c-format --flag=error_at_line:5:c-format\\\
+ --from-code=UTF-8\\\
'
-# If "AM_GNU_GETTEXT(external" or "AM_GNU_GETTEXT([external]"
-# appears in configure.ac, exclude some unnecessary files.
-# Without grep's -E option (not portable enough, pre-configure),
-# the following test is ugly. Also, this depends on the existence
-# of configure.ac, not the obsolescent-named configure.in. But if
-# you're using this infrastructure, you should care about such things.
+gnulib_tool_option_extras="--tests-base=gnulib-tests --with-tests --symlink\
+ --makefile-name=gnulib.mk
+ $avoided_gnulib_modules
+"
+
+# Build prerequisites
+buildreq="\
+autoconf 2.64
+automake 1.11.2
+autopoint -
+gettext 0.19.2
+git 1.4.4
+gzip -
+makeinfo 4.13
+perl 5.5
+rsync -
+tar -
+"
+
+bootstrap_post_import_hook ()
+{
+ # Automake requires that ChangeLog exist.
+ touch ChangeLog || return 1
+
+ # Massage lib/gnulib.mk before using it later in the bootstrapping process.
+ build-aux/prefix-gnulib-mk --lib-name=$gnulib_name lib/$gnulib_mk
+}
-gettext_external=0
-grep '^[ ]*AM_GNU_GETTEXT(external\>' configure.ac > /dev/null &&
- gettext_external=1
-grep '^[ ]*AM_GNU_GETTEXT(\[external\]' configure.ac > /dev/null &&
- gettext_external=1
+bootstrap_epilogue()
+{
+ perl -pi -e "s/\@PACKAGE\@/$package/g" README-release
-if test $gettext_external = 1; then
- # Gettext supplies these files, but we don't need them since
- # we don't have an intl subdirectory.
- excluded_files='
- m4/glibc2.m4
- m4/intdiv0.m4
- m4/lcmessage.m4
- m4/lock.m4
- m4/printf-posix.m4
- m4/size_max.m4
- m4/uintmax_t.m4
- m4/ulonglong.m4
- m4/visibility.m4
- m4/xsize.m4
- '
-fi
+ # Since this is a "GNU" package, replace this line
+ # if LC_ALL=C grep 'GNU @PACKAGE@' $(top_srcdir)/* 2>/dev/null \
+ # | grep -v 'libtool:' >/dev/null; then
+ # with this:
+ # if true; then
+ # Why? That pipeline searches all files in $(top_srcdir), and if you
+ # happen to have large files (or apparently large sparse files), the
+ # 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
+}
diff --git a/build-aux/announce-gen b/build-aux/announce-gen
new file mode 100755
index 0000000..b461174
--- /dev/null
+++ b/build-aux/announce-gen
@@ -0,0 +1,557 @@
+eval '(exit $?0)' && eval 'exec perl -wS "$0" "$@"'
+ & eval 'exec perl -wS "$0" $argv:q'
+ if 0;
+# Generate a release announcement message.
+
+my $VERSION = '2016-01-12 23:09'; # 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-2016 Free Software Foundation, Inc.
+
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# Written by Jim Meyering
+
+use strict;
+
+use Getopt::Long;
+use POSIX qw(strftime);
+
+(my $ME = $0) =~ s|.*/||;
+
+my %valid_release_types = map {$_ => 1} qw (alpha beta stable);
+my @archive_suffixes = ('tar.gz', 'tar.bz2', 'tar.lzma', 'tar.xz');
+my %digest_classes =
+ (
+ 'md5' => (eval { require Digest::MD5; } and 'Digest::MD5'),
+ 'sha1' => ((eval { require Digest::SHA; } and 'Digest::SHA')
+ or (eval { require Digest::SHA1; } and 'Digest::SHA1'))
+ );
+my $srcdir = '.';
+
+sub usage ($)
+{
+ my ($exit_code) = @_;
+ my $STREAM = ($exit_code == 0 ? *STDOUT : *STDERR);
+ if ($exit_code != 0)
+ {
+ print $STREAM "Try '$ME --help' for more information.\n";
+ }
+ else
+ {
+ my @types = sort keys %valid_release_types;
+ print $STREAM <<EOF;
+Usage: $ME [OPTIONS]
+Generate an announcement message. Run this from builddir.
+
+OPTIONS:
+
+These options must be specified:
+
+ --release-type=TYPE TYPE must be one of @types
+ --package-name=PACKAGE_NAME
+ --previous-version=VER
+ --current-version=VER
+ --gpg-key-id=ID The GnuPG ID of the key used to sign the tarballs
+ --url-directory=URL_DIR
+
+The following are optional:
+
+ --news=NEWS_FILE include the NEWS section about this release
+ from this NEWS_FILE; accumulates.
+ --srcdir=DIR where to find the NEWS_FILEs (default: $srcdir)
+ --bootstrap-tools=TOOL_LIST a comma-separated list of tools, e.g.,
+ autoconf,automake,bison,gnulib
+ --gnulib-version=VERSION report VERSION as the gnulib version, where
+ VERSION is the result of running git describe
+ in the gnulib source directory.
+ required if gnulib is in TOOL_LIST.
+ --no-print-checksums do not emit MD5 or SHA1 checksums
+ --archive-suffix=SUF add SUF to the list of archive suffixes
+ --mail-headers=HEADERS a space-separated list of mail headers, e.g.,
+ To: x\@example.com Cc: y-announce\@example.com,...
+
+ --help display this help and exit
+ --version output version information and exit
+
+EOF
+ }
+ exit $exit_code;
+}
+
+
+=item C<%size> = C<sizes (@file)>
+
+Compute the sizes of the C<@file> and return them as a hash. Return
+C<undef> if one of the computation failed.
+
+=cut
+
+sub sizes (@)
+{
+ my (@file) = @_;
+
+ my $fail = 0;
+ my %res;
+ foreach my $f (@file)
+ {
+ my $cmd = "du -h $f";
+ my $t = `$cmd`;
+ # FIXME-someday: give a better diagnostic, a la $PROCESS_STATUS
+ $@
+ and (warn "command failed: '$cmd'\n"), $fail = 1;
+ chomp $t;
+ $t =~ s/^\s*([\d.]+[MkK]).*/${1}B/;
+ $res{$f} = $t;
+ }
+ return $fail ? undef : %res;
+}
+
+=item C<print_locations ($title, \@url, \%size, @file)
+
+Print a section C<$title> dedicated to the list of <@file>, which
+sizes are stored in C<%size>, and which are available from the C<@url>.
+
+=cut
+
+sub print_locations ($\@\%@)
+{
+ my ($title, $url, $size, @file) = @_;
+ print "Here are the $title:\n";
+ foreach my $url (@{$url})
+ {
+ for my $file (@file)
+ {
+ print " $url/$file";
+ print " (", $$size{$file}, ")"
+ if exists $$size{$file};
+ print "\n";
+ }
+ }
+ print "\n";
+}
+
+=item C<print_checksums (@file)
+
+Print the MD5 and SHA1 signature section for each C<@file>.
+
+=cut
+
+sub print_checksums (@)
+{
+ my (@file) = @_;
+
+ print "Here are the MD5 and SHA1 checksums:\n";
+ print "\n";
+
+ foreach my $meth (qw (md5 sha1))
+ {
+ my $class = $digest_classes{$meth} or next;
+ foreach my $f (@file)
+ {
+ open IN, '<', $f
+ or die "$ME: $f: cannot open for reading: $!\n";
+ binmode IN;
+ my $dig = $class->new->addfile(*IN)->hexdigest;
+ close IN;
+ print "$dig $f\n";
+ }
+ }
+ print "\n";
+}
+
+=item C<print_news_deltas ($news_file, $prev_version, $curr_version)
+
+Print the section of the NEWS file C<$news_file> addressing changes
+between versions C<$prev_version> and C<$curr_version>.
+
+=cut
+
+sub print_news_deltas ($$$)
+{
+ my ($news_file, $prev_version, $curr_version) = @_;
+
+ my $news_name = $news_file;
+ $news_name =~ s|^\Q$srcdir\E/||;
+
+ print "\n$news_name\n\n";
+
+ # Print all lines from $news_file, starting with the first one
+ # that mentions $curr_version up to but not including
+ # the first occurrence of $prev_version.
+ my $in_items;
+
+ my $re_prefix = qr/(?:\* )?(?:Noteworthy c|Major c|C)(?i:hanges)/;
+
+ my $found_news;
+ open NEWS, '<', $news_file
+ or die "$ME: $news_file: cannot open for reading: $!\n";
+ while (defined (my $line = <NEWS>))
+ {
+ if ( ! $in_items)
+ {
+ # Match lines like these:
+ # * Major changes in release 5.0.1:
+ # * Noteworthy changes in release 6.6 (2006-11-22) [stable]
+ $line =~ /^$re_prefix.*(?:[^\d.]|$)\Q$curr_version\E(?:[^\d.]|$)/o
+ or next;
+ $in_items = 1;
+ print $line;
+ }
+ else
+ {
+ # This regexp must not match version numbers in NEWS items.
+ # For example, they might well say "introduced in 4.5.5",
+ # and we don't want that to match.
+ $line =~ /^$re_prefix.*(?:[^\d.]|$)\Q$prev_version\E(?:[^\d.]|$)/o
+ and last;
+ print $line;
+ $line =~ /\S/
+ and $found_news = 1;
+ }
+ }
+ close NEWS;
+
+ $in_items
+ or die "$ME: $news_file: no matching lines for '$curr_version'\n";
+ $found_news
+ or die "$ME: $news_file: no news item found for '$curr_version'\n";
+}
+
+sub print_changelog_deltas ($$)
+{
+ my ($package_name, $prev_version) = @_;
+
+ # Print new ChangeLog entries.
+
+ # First find all CVS-controlled ChangeLog files.
+ use File::Find;
+ my @changelog;
+ find ({wanted => sub {$_ eq 'ChangeLog' && -d 'CVS'
+ and push @changelog, $File::Find::name}},
+ '.');
+
+ # If there are no ChangeLog files, we're done.
+ @changelog
+ or return;
+ my %changelog = map {$_ => 1} @changelog;
+
+ # Reorder the list of files so that if there are ChangeLog
+ # files in the specified directories, they're listed first,
+ # in this order:
+ my @dir = qw ( . src lib m4 config doc );
+
+ # A typical @changelog array might look like this:
+ # ./ChangeLog
+ # ./po/ChangeLog
+ # ./m4/ChangeLog
+ # ./lib/ChangeLog
+ # ./doc/ChangeLog
+ # ./config/ChangeLog
+ my @reordered;
+ foreach my $d (@dir)
+ {
+ my $dot_slash = $d eq '.' ? $d : "./$d";
+ my $target = "$dot_slash/ChangeLog";
+ delete $changelog{$target}
+ and push @reordered, $target;
+ }
+
+ # Append any remaining ChangeLog files.
+ push @reordered, sort keys %changelog;
+
+ # Remove leading './'.
+ @reordered = map { s!^\./!!; $_ } @reordered;
+
+ print "\nChangeLog entries:\n\n";
+ # print join ("\n", @reordered), "\n";
+
+ $prev_version =~ s/\./_/g;
+ my $prev_cvs_tag = "\U$package_name\E-$prev_version";
+
+ my $cmd = "cvs -n diff -u -r$prev_cvs_tag -rHEAD @reordered";
+ open DIFF, '-|', $cmd
+ or die "$ME: cannot run '$cmd': $!\n";
+ # Print two types of lines, making minor changes:
+ # Lines starting with '+++ ', e.g.,
+ # +++ ChangeLog 22 Feb 2003 16:52:51 -0000 1.247
+ # and those starting with '+'.
+ # Don't print the others.
+ my $prev_printed_line_empty = 1;
+ while (defined (my $line = <DIFF>))
+ {
+ if ($line =~ /^\+\+\+ /)
+ {
+ my $separator = "*"x70 ."\n";
+ $line =~ s///;
+ $line =~ s/\s.*//;
+ $prev_printed_line_empty
+ or print "\n";
+ print $separator, $line, $separator;
+ }
+ elsif ($line =~ /^\+/)
+ {
+ $line =~ s///;
+ print $line;
+ $prev_printed_line_empty = ($line =~ /^$/);
+ }
+ }
+ close DIFF;
+
+ # The exit code should be 1.
+ # Allow in case there are no modified ChangeLog entries.
+ $? == 256 || $? == 128
+ or warn "warning: '$cmd' had unexpected exit code or signal ($?)\n";
+}
+
+sub get_tool_versions ($$)
+{
+ my ($tool_list, $gnulib_version) = @_;
+ @$tool_list
+ or return ();
+
+ my $fail;
+ my @tool_version_pair;
+ foreach my $t (@$tool_list)
+ {
+ if ($t eq 'gnulib')
+ {
+ push @tool_version_pair, ucfirst $t . ' ' . $gnulib_version;
+ next;
+ }
+ # Assume that the last "word" on the first line of
+ # 'tool --version' output is the version string.
+ my ($first_line, undef) = split ("\n", `$t --version`);
+ if ($first_line =~ /.* (\d[\w.-]+)$/)
+ {
+ $t = ucfirst $t;
+ push @tool_version_pair, "$t $1";
+ }
+ else
+ {
+ defined $first_line
+ and $first_line = '';
+ warn "$t: unexpected --version output\n:$first_line";
+ $fail = 1;
+ }
+ }
+
+ $fail
+ and exit 1;
+
+ return @tool_version_pair;
+}
+
+{
+ # Neutralize the locale, so that, for instance, "du" does not
+ # issue "1,2" instead of "1.2", what confuses our regexps.
+ $ENV{LC_ALL} = "C";
+
+ my $mail_headers;
+ my $release_type;
+ my $package_name;
+ my $prev_version;
+ my $curr_version;
+ my $gpg_key_id;
+ my @url_dir_list;
+ my @news_file;
+ my $bootstrap_tools;
+ my $gnulib_version;
+ my $print_checksums_p = 1;
+
+ # Reformat the warnings before displaying them.
+ local $SIG{__WARN__} = sub
+ {
+ my ($msg) = @_;
+ # Warnings from GetOptions.
+ $msg =~ s/Option (\w)/option --$1/;
+ warn "$ME: $msg";
+ };
+
+ GetOptions
+ (
+ 'mail-headers=s' => \$mail_headers,
+ 'release-type=s' => \$release_type,
+ 'package-name=s' => \$package_name,
+ 'previous-version=s' => \$prev_version,
+ 'current-version=s' => \$curr_version,
+ 'gpg-key-id=s' => \$gpg_key_id,
+ 'url-directory=s' => \@url_dir_list,
+ 'news=s' => \@news_file,
+ 'srcdir=s' => \$srcdir,
+ 'bootstrap-tools=s' => \$bootstrap_tools,
+ 'gnulib-version=s' => \$gnulib_version,
+ 'print-checksums!' => \$print_checksums_p,
+ 'archive-suffix=s' => \@archive_suffixes,
+
+ help => sub { usage 0 },
+ version => sub { print "$ME version $VERSION\n"; exit },
+ ) or usage 1;
+
+ my $fail = 0;
+ # Ensure that each required option is specified.
+ $release_type
+ or (warn "release type not specified\n"), $fail = 1;
+ $package_name
+ or (warn "package name not specified\n"), $fail = 1;
+ $prev_version
+ or (warn "previous version string not specified\n"), $fail = 1;
+ $curr_version
+ or (warn "current version string not specified\n"), $fail = 1;
+ $gpg_key_id
+ or (warn "GnuPG key ID not specified\n"), $fail = 1;
+ @url_dir_list
+ or (warn "URL directory name(s) not specified\n"), $fail = 1;
+
+ my @tool_list = split ',', $bootstrap_tools
+ if $bootstrap_tools;
+
+ grep (/^gnulib$/, @tool_list) ^ defined $gnulib_version
+ and (warn "when specifying gnulib as a tool, you must also specify\n"
+ . "--gnulib-version=V, where V is the result of running git describe\n"
+ . "in the gnulib source directory.\n"), $fail = 1;
+
+ !$release_type || exists $valid_release_types{$release_type}
+ or (warn "'$release_type': invalid release type\n"), $fail = 1;
+
+ @ARGV
+ and (warn "too many arguments:\n", join ("\n", @ARGV), "\n"),
+ $fail = 1;
+ $fail
+ and usage 1;
+
+ my $my_distdir = "$package_name-$curr_version";
+
+ my $xd = "$package_name-$prev_version-$curr_version.xdelta";
+
+ my @candidates = map { "$my_distdir.$_" } @archive_suffixes;
+ my @tarballs = grep {-f $_} @candidates;
+
+ @tarballs
+ or die "$ME: none of " . join(', ', @candidates) . " were found\n";
+ my @sizable = @tarballs;
+ -f $xd
+ and push @sizable, $xd;
+ my %size = sizes (@sizable);
+ %size
+ or exit 1;
+
+ my $headers = '';
+ if (defined $mail_headers)
+ {
+ ($headers = $mail_headers) =~ s/\s+(\S+:)/\n$1/g;
+ $headers .= "\n";
+ }
+
+ # The markup is escaped as <\# so that when this script is sent by
+ # mail (or part of a diff), Gnus is not triggered.
+ print <<EOF;
+
+${headers}Subject: $my_distdir released [$release_type]
+
+<\#secure method=pgpmime mode=sign>
+
+FIXME: put comments here
+
+EOF
+
+ if (@url_dir_list == 1 && @tarballs == 1)
+ {
+ # When there's only one tarball and one URL, use a more concise form.
+ my $m = "$url_dir_list[0]/$tarballs[0]";
+ print "Here are the compressed sources and a GPG detached signature[*]:\n"
+ . " $m\n"
+ . " $m.sig\n\n";
+ }
+ else
+ {
+ print_locations ("compressed sources", @url_dir_list, %size, @tarballs);
+ -f $xd
+ and print_locations ("xdelta diffs (useful? if so, "
+ . "please tell bug-gnulib\@gnu.org)",
+ @url_dir_list, %size, $xd);
+ my @sig_files = map { "$_.sig" } @tarballs;
+ print_locations ("GPG detached signatures[*]", @url_dir_list, %size,
+ @sig_files);
+ }
+
+ 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/!)
+ {
+ (my $m = "$url_dir_list[0]/$tarballs[0]")
+ =~ s!http://ftp\.gnu\.org/gnu/!http://ftpmirror\.gnu\.org/!;
+ print " $m\n"
+ . " $m.sig\n\n";
+
+ }
+ else
+ {
+ print " http://www.gnu.org/order/ftp.html\n\n";
+ }
+ }
+
+ $print_checksums_p
+ and print_checksums (@sizable);
+
+ print <<EOF;
+[*] Use a .sig file to verify that the corresponding file (without the
+.sig suffix) is intact. First, be sure to download both the .sig file
+and the corresponding tarball. Then, run a command like this:
+
+ gpg --verify $tarballs[0].sig
+
+If that command fails because you don't have the required public key,
+then run this command to import it:
+
+ gpg --keyserver keys.gnupg.net --recv-keys $gpg_key_id
+
+and rerun the 'gpg --verify' command.
+EOF
+
+ my @tool_versions = get_tool_versions (\@tool_list, $gnulib_version);
+ @tool_versions
+ and print "\nThis release was bootstrapped with the following tools:",
+ join ('', map {"\n $_"} @tool_versions), "\n";
+
+ print_news_deltas ($_, $prev_version, $curr_version)
+ foreach @news_file;
+
+ $release_type eq 'stable'
+ or print_changelog_deltas ($package_name, $prev_version);
+
+ exit 0;
+}
+
+### Setup "GNU" style for perl-mode and cperl-mode.
+## Local Variables:
+## mode: perl
+## perl-indent-level: 2
+## perl-continued-statement-offset: 2
+## perl-continued-brace-offset: 0
+## perl-brace-offset: 0
+## perl-brace-imaginary-offset: 0
+## perl-label-offset: -2
+## perl-extra-newline-before-brace: t
+## perl-merge-trailing-else: nil
+## eval: (add-hook 'write-file-hooks 'time-stamp)
+## time-stamp-start: "my $VERSION = '"
+## time-stamp-format: "%:y-%02m-%02d %02H:%02M"
+## time-stamp-time-zone: "UTC0"
+## time-stamp-end: "'; # UTC"
+## End:
diff --git a/build-aux/ar-lib b/build-aux/ar-lib
new file mode 100755
index 0000000..1700c5e
--- /dev/null
+++ b/build-aux/ar-lib
@@ -0,0 +1,270 @@
+#! /bin/sh
+# Wrapper for Microsoft lib.exe
+
+me=ar-lib
+scriptversion=2012-03-01.08; # UTC
+
+# Copyright (C) 2010-2015 Free Software Foundation, Inc.
+# Written by Peter Rosin <peda@lysator.liu.se>.
+#
+# This 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 2, 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/>.
+
+# As a special exception to the GNU General Public License, if you
+# distribute this file as part of a program that contains a
+# configuration script generated by Autoconf, you may include it under
+# the same distribution terms that you use for the rest of that program.
+
+# This file is maintained in Automake, please report
+# bugs to <bug-automake@gnu.org> or send patches to
+# <automake-patches@gnu.org>.
+
+
+# func_error message
+func_error ()
+{
+ echo "$me: $1" 1>&2
+ exit 1
+}
+
+file_conv=
+
+# func_file_conv build_file
+# Convert a $build file to $host form and store it in $file
+# Currently only supports Windows hosts.
+func_file_conv ()
+{
+ file=$1
+ case $file in
+ / | /[!/]*) # absolute file, and not a UNC file
+ if test -z "$file_conv"; then
+ # lazily determine how to convert abs files
+ case `uname -s` in
+ MINGW*)
+ file_conv=mingw
+ ;;
+ CYGWIN*)
+ file_conv=cygwin
+ ;;
+ *)
+ file_conv=wine
+ ;;
+ esac
+ fi
+ case $file_conv in
+ mingw)
+ file=`cmd //C echo "$file " | sed -e 's/"\(.*\) " *$/\1/'`
+ ;;
+ cygwin)
+ file=`cygpath -m "$file" || echo "$file"`
+ ;;
+ wine)
+ file=`winepath -w "$file" || echo "$file"`
+ ;;
+ esac
+ ;;
+ esac
+}
+
+# func_at_file at_file operation archive
+# Iterate over all members in AT_FILE performing OPERATION on ARCHIVE
+# for each of them.
+# When interpreting the content of the @FILE, do NOT use func_file_conv,
+# since the user would need to supply preconverted file names to
+# binutils ar, at least for MinGW.
+func_at_file ()
+{
+ operation=$2
+ archive=$3
+ at_file_contents=`cat "$1"`
+ eval set x "$at_file_contents"
+ shift
+
+ for member
+ do
+ $AR -NOLOGO $operation:"$member" "$archive" || exit $?
+ done
+}
+
+case $1 in
+ '')
+ func_error "no command. Try '$0 --help' for more information."
+ ;;
+ -h | --h*)
+ cat <<EOF
+Usage: $me [--help] [--version] PROGRAM ACTION ARCHIVE [MEMBER...]
+
+Members may be specified in a file named with @FILE.
+EOF
+ exit $?
+ ;;
+ -v | --v*)
+ echo "$me, version $scriptversion"
+ exit $?
+ ;;
+esac
+
+if test $# -lt 3; then
+ func_error "you must specify a program, an action and an archive"
+fi
+
+AR=$1
+shift
+while :
+do
+ if test $# -lt 2; then
+ func_error "you must specify a program, an action and an archive"
+ fi
+ case $1 in
+ -lib | -LIB \
+ | -ltcg | -LTCG \
+ | -machine* | -MACHINE* \
+ | -subsystem* | -SUBSYSTEM* \
+ | -verbose | -VERBOSE \
+ | -wx* | -WX* )
+ AR="$AR $1"
+ shift
+ ;;
+ *)
+ action=$1
+ shift
+ break
+ ;;
+ esac
+done
+orig_archive=$1
+shift
+func_file_conv "$orig_archive"
+archive=$file
+
+# strip leading dash in $action
+action=${action#-}
+
+delete=
+extract=
+list=
+quick=
+replace=
+index=
+create=
+
+while test -n "$action"
+do
+ case $action in
+ d*) delete=yes ;;
+ x*) extract=yes ;;
+ t*) list=yes ;;
+ q*) quick=yes ;;
+ r*) replace=yes ;;
+ s*) index=yes ;;
+ S*) ;; # the index is always updated implicitly
+ c*) create=yes ;;
+ u*) ;; # TODO: don't ignore the update modifier
+ v*) ;; # TODO: don't ignore the verbose modifier
+ *)
+ func_error "unknown action specified"
+ ;;
+ esac
+ action=${action#?}
+done
+
+case $delete$extract$list$quick$replace,$index in
+ yes,* | ,yes)
+ ;;
+ yesyes*)
+ func_error "more than one action specified"
+ ;;
+ *)
+ func_error "no action specified"
+ ;;
+esac
+
+if test -n "$delete"; then
+ if test ! -f "$orig_archive"; then
+ func_error "archive not found"
+ fi
+ for member
+ do
+ case $1 in
+ @*)
+ func_at_file "${1#@}" -REMOVE "$archive"
+ ;;
+ *)
+ func_file_conv "$1"
+ $AR -NOLOGO -REMOVE:"$file" "$archive" || exit $?
+ ;;
+ esac
+ done
+
+elif test -n "$extract"; then
+ if test ! -f "$orig_archive"; then
+ func_error "archive not found"
+ fi
+ if test $# -gt 0; then
+ for member
+ do
+ case $1 in
+ @*)
+ func_at_file "${1#@}" -EXTRACT "$archive"
+ ;;
+ *)
+ func_file_conv "$1"
+ $AR -NOLOGO -EXTRACT:"$file" "$archive" || exit $?
+ ;;
+ esac
+ done
+ else
+ $AR -NOLOGO -LIST "$archive" | sed -e 's/\\/\\\\/g' | while read member
+ do
+ $AR -NOLOGO -EXTRACT:"$member" "$archive" || exit $?
+ done
+ fi
+
+elif test -n "$quick$replace"; then
+ if test ! -f "$orig_archive"; then
+ if test -z "$create"; then
+ echo "$me: creating $orig_archive"
+ fi
+ orig_archive=
+ else
+ orig_archive=$archive
+ fi
+
+ for member
+ do
+ case $1 in
+ @*)
+ func_file_conv "${1#@}"
+ set x "$@" "@$file"
+ ;;
+ *)
+ func_file_conv "$1"
+ set x "$@" "$file"
+ ;;
+ esac
+ shift
+ shift
+ done
+
+ if test -n "$orig_archive"; then
+ $AR -NOLOGO -OUT:"$archive" "$orig_archive" "$@" || exit $?
+ else
+ $AR -NOLOGO -OUT:"$archive" "$@" || exit $?
+ fi
+
+elif test -n "$list"; then
+ if test ! -f "$orig_archive"; then
+ func_error "archive not found"
+ fi
+ $AR -NOLOGO -LIST "$archive" || exit $?
+fi
diff --git a/build-aux/compile b/build-aux/compile
index c0096a7..4bfd30c 100755
--- a/build-aux/compile
+++ b/build-aux/compile
@@ -1,10 +1,9 @@
#! /bin/sh
-# Wrapper for compilers which do not understand `-c -o'.
+# Wrapper for compilers which do not understand '-c -o'.
-scriptversion=2009-10-06.20; # UTC
+scriptversion=2016-01-11.22; # UTC
-# Copyright (C) 1999, 2000, 2003, 2004, 2005, 2009 Free Software
-# Foundation, Inc.
+# Copyright (C) 1999-2015 Free Software Foundation, Inc.
# Written by Tom Tromey <tromey@cygnus.com>.
#
# This program is free software; you can redistribute it and/or modify
@@ -29,21 +28,224 @@ scriptversion=2009-10-06.20; # UTC
# bugs to <bug-automake@gnu.org> or send patches to
# <automake-patches@gnu.org>.
+nl='
+'
+
+# We need space, tab and new line, in precisely that order. Quoting is
+# there to prevent tools from complaining about whitespace usage.
+IFS=" "" $nl"
+
+file_conv=
+
+# func_file_conv build_file lazy
+# Convert a $build file to $host form and store it in $file
+# Currently only supports Windows hosts. If the determined conversion
+# type is listed in (the comma separated) LAZY, no conversion will
+# take place.
+func_file_conv ()
+{
+ file=$1
+ case $file in
+ / | /[!/]*) # absolute file, and not a UNC file
+ if test -z "$file_conv"; then
+ # lazily determine how to convert abs files
+ case `uname -s` in
+ MINGW*)
+ file_conv=mingw
+ ;;
+ CYGWIN*)
+ file_conv=cygwin
+ ;;
+ *)
+ file_conv=wine
+ ;;
+ esac
+ fi
+ case $file_conv/,$2, in
+ *,$file_conv,*)
+ ;;
+ mingw/*)
+ file=`cmd //C echo "$file " | sed -e 's/"\(.*\) " *$/\1/'`
+ ;;
+ cygwin/*)
+ file=`cygpath -m "$file" || echo "$file"`
+ ;;
+ wine/*)
+ file=`winepath -w "$file" || echo "$file"`
+ ;;
+ esac
+ ;;
+ esac
+}
+
+# func_cl_dashL linkdir
+# Make cl look for libraries in LINKDIR
+func_cl_dashL ()
+{
+ func_file_conv "$1"
+ if test -z "$lib_path"; then
+ lib_path=$file
+ else
+ lib_path="$lib_path;$file"
+ fi
+ linker_opts="$linker_opts -LIBPATH:$file"
+}
+
+# func_cl_dashl library
+# Do a library search-path lookup for cl
+func_cl_dashl ()
+{
+ lib=$1
+ found=no
+ save_IFS=$IFS
+ IFS=';'
+ for dir in $lib_path $LIB
+ do
+ IFS=$save_IFS
+ if $shared && test -f "$dir/$lib.dll.lib"; then
+ found=yes
+ lib=$dir/$lib.dll.lib
+ break
+ fi
+ if test -f "$dir/$lib.lib"; then
+ found=yes
+ lib=$dir/$lib.lib
+ break
+ fi
+ if test -f "$dir/lib$lib.a"; then
+ found=yes
+ lib=$dir/lib$lib.a
+ break
+ fi
+ done
+ IFS=$save_IFS
+
+ if test "$found" != yes; then
+ lib=$lib.lib
+ fi
+}
+
+# func_cl_wrapper cl arg...
+# Adjust compile command to suit cl
+func_cl_wrapper ()
+{
+ # Assume a capable shell
+ lib_path=
+ shared=:
+ linker_opts=
+ for arg
+ do
+ if test -n "$eat"; then
+ eat=
+ else
+ case $1 in
+ -o)
+ # configure might choose to run compile as 'compile cc -o foo foo.c'.
+ eat=1
+ case $2 in
+ *.o | *.[oO][bB][jJ])
+ func_file_conv "$2"
+ set x "$@" -Fo"$file"
+ shift
+ ;;
+ *)
+ func_file_conv "$2"
+ set x "$@" -Fe"$file"
+ shift
+ ;;
+ esac
+ ;;
+ -I)
+ eat=1
+ func_file_conv "$2" mingw
+ set x "$@" -I"$file"
+ shift
+ ;;
+ -I*)
+ func_file_conv "${1#-I}" mingw
+ set x "$@" -I"$file"
+ shift
+ ;;
+ -l)
+ eat=1
+ func_cl_dashl "$2"
+ set x "$@" "$lib"
+ shift
+ ;;
+ -l*)
+ func_cl_dashl "${1#-l}"
+ set x "$@" "$lib"
+ shift
+ ;;
+ -L)
+ eat=1
+ func_cl_dashL "$2"
+ ;;
+ -L*)
+ func_cl_dashL "${1#-L}"
+ ;;
+ -static)
+ shared=false
+ ;;
+ -Wl,*)
+ arg=${1#-Wl,}
+ save_ifs="$IFS"; IFS=','
+ for flag in $arg; do
+ IFS="$save_ifs"
+ linker_opts="$linker_opts $flag"
+ done
+ IFS="$save_ifs"
+ ;;
+ -Xlinker)
+ eat=1
+ linker_opts="$linker_opts $2"
+ ;;
+ -*)
+ set x "$@" "$1"
+ shift
+ ;;
+ *.cc | *.CC | *.cxx | *.CXX | *.[cC]++)
+ func_file_conv "$1"
+ set x "$@" -Tp"$file"
+ shift
+ ;;
+ *.c | *.cpp | *.CPP | *.lib | *.LIB | *.Lib | *.OBJ | *.obj | *.[oO])
+ func_file_conv "$1" mingw
+ set x "$@" "$file"
+ shift
+ ;;
+ *)
+ set x "$@" "$1"
+ shift
+ ;;
+ esac
+ fi
+ shift
+ done
+ if test -n "$linker_opts"; then
+ linker_opts="-link$linker_opts"
+ fi
+ exec "$@" $linker_opts
+ exit 1
+}
+
+eat=
+
case $1 in
'')
- echo "$0: No command. Try \`$0 --help' for more information." 1>&2
+ echo "$0: No command. Try '$0 --help' for more information." 1>&2
exit 1;
;;
-h | --h*)
cat <<\EOF
Usage: compile [--help] [--version] PROGRAM [ARGS]
-Wrapper for compilers which do not understand `-c -o'.
-Remove `-o dest.o' from ARGS, run PROGRAM with the remaining
+Wrapper for compilers which do not understand '-c -o'.
+Remove '-o dest.o' from ARGS, run PROGRAM with the remaining
arguments, and rename the output as expected.
If you are trying to build a whole package this is not the
-right script to run: please start by reading the file `INSTALL'.
+right script to run: please start by reading the file 'INSTALL'.
Report bugs to <bug-automake@gnu.org>.
EOF
@@ -53,11 +255,14 @@ EOF
echo "compile $scriptversion"
exit $?
;;
+ cl | *[/\\]cl | cl.exe | *[/\\]cl.exe | \
+ icl | *[/\\]icl | icl.exe | *[/\\]icl.exe )
+ func_cl_wrapper "$@" # Doesn't return...
+ ;;
esac
ofile=
cfile=
-eat=
for arg
do
@@ -66,8 +271,8 @@ do
else
case $1 in
-o)
- # configure might choose to run compile as `compile cc -o foo foo.c'.
- # So we strip `-o arg' only if arg is an object.
+ # configure might choose to run compile as 'compile cc -o foo foo.c'.
+ # So we strip '-o arg' only if arg is an object.
eat=1
case $2 in
*.o | *.obj)
@@ -94,10 +299,10 @@ do
done
if test -z "$ofile" || test -z "$cfile"; then
- # If no `-o' option was seen then we might have been invoked from a
+ # If no '-o' option was seen then we might have been invoked from a
# pattern rule where we don't need one. That is ok -- this is a
# normal compilation that the losing compiler can handle. If no
- # `.c' file was seen then we are probably linking. That is also
+ # '.c' file was seen then we are probably linking. That is also
# ok.
exec "$@"
fi
@@ -106,7 +311,7 @@ fi
cofile=`echo "$cfile" | sed 's|^.*[\\/]||; s|^[a-zA-Z]:||; s/\.c$/.o/'`
# Create the lock directory.
-# Note: use `[/\\:.-]' here to ensure that we don't use the same name
+# Note: use '[/\\:.-]' here to ensure that we don't use the same name
# that we are using for the .o file. Also, base the name on the expected
# object file name, since that is what matters with a parallel build.
lockdir=`echo "$cofile" | sed -e 's|[/\\:.-]|_|g'`.d
@@ -138,6 +343,6 @@ exit $ret
# eval: (add-hook 'write-file-hooks 'time-stamp)
# time-stamp-start: "scriptversion="
# time-stamp-format: "%:y-%02m-%02d.%02H"
-# time-stamp-time-zone: "UTC"
+# time-stamp-time-zone: "UTC0"
# time-stamp-end: "; # UTC"
# End:
diff --git a/build-aux/config.guess b/build-aux/config.guess
index c0adba9..2e9ad7f 100755
--- a/build-aux/config.guess
+++ b/build-aux/config.guess
@@ -1,14 +1,12 @@
#! /bin/sh
# Attempt to guess a canonical system name.
-# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
-# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010,
-# 2011, 2012 Free Software Foundation, Inc.
+# Copyright 1992-2016 Free Software Foundation, Inc.
-timestamp='2012-06-10'
+timestamp='2016-10-02'
# 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 2 of the License, or
+# 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
@@ -22,19 +20,17 @@ timestamp='2012-06-10'
# As a special exception to the GNU General Public License, if you
# distribute this file as part of a program that contains a
# configuration script generated by Autoconf, you may include it under
-# the same distribution terms that you use for the rest of that program.
-
-
-# Originally written by Per Bothner. Please send patches (context
-# diff format) to <config-patches@gnu.org> and include a ChangeLog
-# entry.
+# the same distribution terms that you use for the rest of that
+# program. This Exception is an additional permission under section 7
+# of the GNU General Public License, version 3 ("GPLv3").
#
-# This script attempts to guess a canonical system name similar to
-# config.sub. If it succeeds, it prints the system name on stdout, and
-# exits with 0. Otherwise, it exits with 1.
+# 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;hb=HEAD
+# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess
+#
+# Please send patches to <config-patches@gnu.org>.
+
me=`echo "$0" | sed -e 's,.*/,,'`
@@ -54,9 +50,7 @@ version="\
GNU config.guess ($timestamp)
Originally written by Per Bothner.
-Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
-2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012
-Free Software Foundation, Inc.
+Copyright 1992-2016 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."
@@ -138,6 +132,27 @@ 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
+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
+ #include <features.h>
+ #if defined(__UCLIBC__)
+ LIBC=uclibc
+ #elif defined(__dietlibc__)
+ LIBC=dietlibc
+ #else
+ LIBC=gnu
+ #endif
+ EOF
+ eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC' | sed 's, ,,g'`
+ ;;
+esac
+
# Note: order is significant - the case branches are not exclusive.
case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
@@ -153,19 +168,29 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
# Note: NetBSD doesn't particularly care about the vendor
# portion of the name. We always set it to "unknown".
sysctl="sysctl -n hw.machine_arch"
- UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \
- /usr/sbin/$sysctl 2>/dev/null || echo unknown)`
+ UNAME_MACHINE_ARCH=`(uname -p 2>/dev/null || \
+ /sbin/$sysctl 2>/dev/null || \
+ /usr/sbin/$sysctl 2>/dev/null || \
+ echo unknown)`
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
+ ;;
*) machine=${UNAME_MACHINE_ARCH}-unknown ;;
esac
# The Operating System including object format, if it has switched
- # to ELF recently, or will in the future.
+ # to ELF recently (or will in the future) and ABI.
case "${UNAME_MACHINE_ARCH}" in
+ earm*)
+ os=netbsdelf
+ ;;
arm*|i386|m68k|ns32k|sh3*|sparc|vax)
eval $set_cc_for_build
if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \
@@ -182,6 +207,13 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
os=netbsd
;;
esac
+ # Determine ABI tags.
+ case "${UNAME_MACHINE_ARCH}" in
+ earm*)
+ expr='s/^earmv[0-9]/-eabi/;s/eb$//'
+ abi=`echo ${UNAME_MACHINE_ARCH} | sed -e "$expr"`
+ ;;
+ esac
# The OS release
# Debian GNU/NetBSD machines have a different userland, and
# thus, need a distinct triplet. However, they do not need
@@ -192,18 +224,26 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
release='-gnu'
;;
*)
- release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
+ 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}"
+ echo "${machine}-${os}${release}${abi}"
+ exit ;;
+ *:Bitrig:*:*)
+ UNAME_MACHINE_ARCH=`arch | sed 's/Bitrig.//'`
+ 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}
exit ;;
+ *:LibertyBSD:*:*)
+ UNAME_MACHINE_ARCH=`arch | sed 's/^.*BSD\.//'`
+ echo ${UNAME_MACHINE_ARCH}-unknown-libertybsd${UNAME_RELEASE}
+ exit ;;
*:ekkoBSD:*:*)
echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE}
exit ;;
@@ -216,6 +256,9 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
*:MirBSD:*:*)
echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE}
exit ;;
+ *:Sortix:*:*)
+ echo ${UNAME_MACHINE}-unknown-sortix
+ exit ;;
alpha:OSF1:*:*)
case $UNAME_RELEASE in
*4.0)
@@ -232,42 +275,42 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1`
case "$ALPHA_CPU_TYPE" in
"EV4 (21064)")
- UNAME_MACHINE="alpha" ;;
+ UNAME_MACHINE=alpha ;;
"EV4.5 (21064)")
- UNAME_MACHINE="alpha" ;;
+ UNAME_MACHINE=alpha ;;
"LCA4 (21066/21068)")
- UNAME_MACHINE="alpha" ;;
+ UNAME_MACHINE=alpha ;;
"EV5 (21164)")
- UNAME_MACHINE="alphaev5" ;;
+ UNAME_MACHINE=alphaev5 ;;
"EV5.6 (21164A)")
- UNAME_MACHINE="alphaev56" ;;
+ UNAME_MACHINE=alphaev56 ;;
"EV5.6 (21164PC)")
- UNAME_MACHINE="alphapca56" ;;
+ UNAME_MACHINE=alphapca56 ;;
"EV5.7 (21164PC)")
- UNAME_MACHINE="alphapca57" ;;
+ UNAME_MACHINE=alphapca57 ;;
"EV6 (21264)")
- UNAME_MACHINE="alphaev6" ;;
+ UNAME_MACHINE=alphaev6 ;;
"EV6.7 (21264A)")
- UNAME_MACHINE="alphaev67" ;;
+ UNAME_MACHINE=alphaev67 ;;
"EV6.8CB (21264C)")
- UNAME_MACHINE="alphaev68" ;;
+ UNAME_MACHINE=alphaev68 ;;
"EV6.8AL (21264B)")
- UNAME_MACHINE="alphaev68" ;;
+ UNAME_MACHINE=alphaev68 ;;
"EV6.8CX (21264D)")
- UNAME_MACHINE="alphaev68" ;;
+ UNAME_MACHINE=alphaev68 ;;
"EV6.9A (21264/EV69A)")
- UNAME_MACHINE="alphaev69" ;;
+ UNAME_MACHINE=alphaev69 ;;
"EV7 (21364)")
- UNAME_MACHINE="alphaev7" ;;
+ UNAME_MACHINE=alphaev7 ;;
"EV7.9 (21364A)")
- UNAME_MACHINE="alphaev79" ;;
+ UNAME_MACHINE=alphaev79 ;;
esac
# A Pn.n version is a patched version.
# A Vn.n version is a released version.
# 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
@@ -302,7 +345,7 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)
echo arm-acorn-riscix${UNAME_RELEASE}
exit ;;
- arm:riscos:*:*|arm:RISCOS:*:*)
+ arm*:riscos:*:*|arm*:RISCOS:*:*)
echo arm-unknown-riscos
exit ;;
SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*)
@@ -340,16 +383,16 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
exit ;;
i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*)
eval $set_cc_for_build
- SUN_ARCH="i386"
+ 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.
# This test works for both compilers.
- if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then
+ if [ "$CC_FOR_BUILD" != no_compiler_found ]; then
if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \
- (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \
+ (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \
grep IS_64BIT_ARCH >/dev/null
then
- SUN_ARCH="x86_64"
+ SUN_ARCH=x86_64
fi
fi
echo ${SUN_ARCH}-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
@@ -374,7 +417,7 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
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}
@@ -560,8 +603,9 @@ EOF
else
IBM_ARCH=powerpc
fi
- if [ -x /usr/bin/oslevel ] ; then
- IBM_REV=`/usr/bin/oslevel`
+ if [ -x /usr/bin/lslpp ] ; then
+ 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}
fi
@@ -598,13 +642,13 @@ EOF
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
- 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0
- 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1
+ 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
- 32) HP_ARCH="hppa2.0n" ;;
- 64) HP_ARCH="hppa2.0w" ;;
- '') HP_ARCH="hppa2.0" ;; # HP-UX 10.20
+ 32) HP_ARCH=hppa2.0n ;;
+ 64) HP_ARCH=hppa2.0w ;;
+ '') HP_ARCH=hppa2.0 ;; # HP-UX 10.20
esac ;;
esac
fi
@@ -643,11 +687,11 @@ 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
@@ -660,12 +704,12 @@ EOF
# $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess
# => hppa64-hp-hpux11.23
- if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) |
+ if echo __LP64__ | (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) |
grep -q __LP64__
then
- HP_ARCH="hppa2.0w"
+ HP_ARCH=hppa2.0w
else
- HP_ARCH="hppa64"
+ HP_ARCH=hppa64
fi
fi
echo ${HP_ARCH}-hp-hpux${HPUX_REV}
@@ -770,14 +814,14 @@ EOF
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_PROC=`uname -m | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz`
+ FUJITSU_SYS=`uname -p | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | 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_SYS=`uname -p | 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:*:*)
@@ -801,10 +845,13 @@ EOF
i*:CYGWIN*:*)
echo ${UNAME_MACHINE}-pc-cygwin
exit ;;
+ *:MINGW64*:*)
+ echo ${UNAME_MACHINE}-pc-mingw64
+ exit ;;
*:MINGW*:*)
echo ${UNAME_MACHINE}-pc-mingw32
exit ;;
- i*:MSYS*:*)
+ *:MSYS*:*)
echo ${UNAME_MACHINE}-pc-msys
exit ;;
i*:windows32*:*)
@@ -852,21 +899,21 @@ EOF
exit ;;
*:GNU:*:*)
# the GNU system
- echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`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 '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu
+ 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
exit ;;
aarch64:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-gnu
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
exit ;;
aarch64_be:Linux:*:*)
UNAME_MACHINE=aarch64_be
- echo ${UNAME_MACHINE}-unknown-linux-gnu
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
exit ;;
alpha:Linux:*:*)
case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
@@ -879,59 +926,60 @@ EOF
EV68*) UNAME_MACHINE=alphaev68 ;;
esac
objdump --private-headers /bin/sh | grep -q ld.so.1
- if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi
- echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC}
+ if test "$?" = 0 ; then LIBC=gnulibc1 ; fi
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ exit ;;
+ arc:Linux:*:* | arceb:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
exit ;;
arm*:Linux:*:*)
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-gnu
+ 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-gnueabi
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabi
else
- echo ${UNAME_MACHINE}-unknown-linux-gnueabihf
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabihf
fi
fi
exit ;;
avr32*:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-gnu
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
exit ;;
cris:Linux:*:*)
- echo ${UNAME_MACHINE}-axis-linux-gnu
+ echo ${UNAME_MACHINE}-axis-linux-${LIBC}
exit ;;
crisv32:Linux:*:*)
- echo ${UNAME_MACHINE}-axis-linux-gnu
+ echo ${UNAME_MACHINE}-axis-linux-${LIBC}
+ exit ;;
+ e2k:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
exit ;;
frv:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-gnu
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
exit ;;
hexagon:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-gnu
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
exit ;;
i*86:Linux:*:*)
- LIBC=gnu
- eval $set_cc_for_build
- sed 's/^ //' << EOF >$dummy.c
- #ifdef __dietlibc__
- LIBC=dietlibc
- #endif
-EOF
- eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC'`
- echo "${UNAME_MACHINE}-pc-linux-${LIBC}"
+ echo ${UNAME_MACHINE}-pc-linux-${LIBC}
exit ;;
ia64:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-gnu
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ exit ;;
+ k1om:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
exit ;;
m32r*:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-gnu
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
exit ;;
m68*:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-gnu
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
exit ;;
mips:Linux:*:* | mips64:Linux:*:*)
eval $set_cc_for_build
@@ -950,54 +998,69 @@ EOF
#endif
EOF
eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'`
- test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
+ test x"${CPU}" != x && { echo "${CPU}-unknown-linux-${LIBC}"; exit; }
;;
- or32:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-gnu
+ mips64el:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ exit ;;
+ openrisc*:Linux:*:*)
+ echo or1k-unknown-linux-${LIBC}
+ exit ;;
+ or32:Linux:*:* | or1k*:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
exit ;;
padre:Linux:*:*)
- echo sparc-unknown-linux-gnu
+ echo sparc-unknown-linux-${LIBC}
exit ;;
parisc64:Linux:*:* | hppa64:Linux:*:*)
- echo hppa64-unknown-linux-gnu
+ 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-gnu ;;
- PA8*) echo hppa2.0-unknown-linux-gnu ;;
- *) echo hppa-unknown-linux-gnu ;;
+ 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-gnu
+ echo powerpc64-unknown-linux-${LIBC}
exit ;;
ppc:Linux:*:*)
- echo powerpc-unknown-linux-gnu
+ echo powerpc-unknown-linux-${LIBC}
+ exit ;;
+ ppc64le:Linux:*:*)
+ echo powerpc64le-unknown-linux-${LIBC}
+ exit ;;
+ ppcle:Linux:*:*)
+ echo powerpcle-unknown-linux-${LIBC}
+ exit ;;
+ riscv32:Linux:*:* | riscv64:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
exit ;;
s390:Linux:*:* | s390x:Linux:*:*)
- echo ${UNAME_MACHINE}-ibm-linux
+ echo ${UNAME_MACHINE}-ibm-linux-${LIBC}
exit ;;
sh64*:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-gnu
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
exit ;;
sh*:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-gnu
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
exit ;;
sparc:Linux:*:* | sparc64:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-gnu
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
exit ;;
tile*:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-gnu
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
exit ;;
vax:Linux:*:*)
- echo ${UNAME_MACHINE}-dec-linux-gnu
+ echo ${UNAME_MACHINE}-dec-linux-${LIBC}
exit ;;
x86_64:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-gnu
+ echo ${UNAME_MACHINE}-pc-linux-${LIBC}
exit ;;
xtensa*:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-gnu
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
exit ;;
i*86:DYNIX/ptx:4*:*)
# ptx 4.0 does uname -s correctly, with DYNIX/ptx in there.
@@ -1073,7 +1136,7 @@ EOF
# uname -m prints for DJGPP always 'pc', but it prints nothing about
# the processor, so we play safe by assuming i586.
# Note: whatever this is, it MUST be the same as what config.sub
- # prints for the "djgpp" host, or else GDB configury will decide that
+ # prints for the "djgpp" host, or else GDB configure will decide that
# this is a cross-build.
echo i586-pc-msdosdjgpp
exit ;;
@@ -1201,6 +1264,9 @@ EOF
BePC:Haiku:*:*) # Haiku running on Intel PC compatible.
echo i586-pc-haiku
exit ;;
+ x86_64:Haiku:*:*)
+ echo x86_64-unknown-haiku
+ exit ;;
SX-4:SUPER-UX:*:*)
echo sx4-nec-superux${UNAME_RELEASE}
exit ;;
@@ -1219,6 +1285,9 @@ EOF
SX-8R:SUPER-UX:*:*)
echo sx8r-nec-superux${UNAME_RELEASE}
exit ;;
+ SX-ACE:SUPER-UX:*:*)
+ echo sxace-nec-superux${UNAME_RELEASE}
+ exit ;;
Power*:Rhapsody:*:*)
echo powerpc-apple-rhapsody${UNAME_RELEASE}
exit ;;
@@ -1227,24 +1296,36 @@ EOF
exit ;;
*:Darwin:*:*)
UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown
- case $UNAME_PROCESSOR in
- i386)
- eval $set_cc_for_build
- 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
- then
- UNAME_PROCESSOR="x86_64"
- fi
- fi ;;
- unknown) UNAME_PROCESSOR=powerpc ;;
- esac
+ 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 [ "$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
+ then
+ case $UNAME_PROCESSOR in
+ i386) UNAME_PROCESSOR=x86_64 ;;
+ powerpc) UNAME_PROCESSOR=powerpc64 ;;
+ esac
+ fi
+ fi
+ elif test "$UNAME_PROCESSOR" = i386 ; then
+ # Avoid executing cc on OS X 10.9, as it ships with a stub
+ # that puts up a graphical alert prompting to install
+ # developer tools. Any system running Mac OS X 10.7 or
+ # later (Darwin 11 and later) is required to have a 64-bit
+ # processor. This is not true of the ARM version of Darwin
+ # that Apple uses in portable devices.
+ UNAME_PROCESSOR=x86_64
+ fi
echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE}
exit ;;
*:procnto*:*:* | *:QNX:[0123456789]*:*)
UNAME_PROCESSOR=`uname -p`
- if test "$UNAME_PROCESSOR" = "x86"; then
+ if test "$UNAME_PROCESSOR" = x86; then
UNAME_PROCESSOR=i386
UNAME_MACHINE=pc
fi
@@ -1275,7 +1356,7 @@ EOF
# "uname -m" is not consistent, so use $cputype instead. 386
# is converted to i386 for consistency with other x86
# operating systems.
- if test "$cputype" = "386"; then
+ if test "$cputype" = 386; then
UNAME_MACHINE=i386
else
UNAME_MACHINE="$cputype"
@@ -1317,7 +1398,7 @@ 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
@@ -1328,174 +1409,25 @@ EOF
x86_64:VMkernel:*:*)
echo ${UNAME_MACHINE}-unknown-esx
exit ;;
-esac
-
-#echo '(No uname command or uname output not recognized.)' 1>&2
-#echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2
-
-eval $set_cc_for_build
-cat >$dummy.c <<EOF
-#ifdef _SEQUENT_
-# include <sys/types.h>
-# include <sys/utsname.h>
-#endif
-main ()
-{
-#if defined (sony)
-#if defined (MIPSEB)
- /* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed,
- I don't know.... */
- printf ("mips-sony-bsd\n"); exit (0);
-#else
-#include <sys/param.h>
- printf ("m68k-sony-newsos%s\n",
-#ifdef NEWSOS4
- "4"
-#else
- ""
-#endif
- ); exit (0);
-#endif
-#endif
-
-#if defined (__arm) && defined (__acorn) && defined (__unix)
- printf ("arm-acorn-riscix\n"); exit (0);
-#endif
-
-#if defined (hp300) && !defined (hpux)
- printf ("m68k-hp-bsd\n"); exit (0);
-#endif
-
-#if defined (NeXT)
-#if !defined (__ARCHITECTURE__)
-#define __ARCHITECTURE__ "m68k"
-#endif
- int version;
- version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`;
- if (version < 4)
- printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version);
- else
- printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version);
- exit (0);
-#endif
-
-#if defined (MULTIMAX) || defined (n16)
-#if defined (UMAXV)
- printf ("ns32k-encore-sysv\n"); exit (0);
-#else
-#if defined (CMU)
- printf ("ns32k-encore-mach\n"); exit (0);
-#else
- printf ("ns32k-encore-bsd\n"); exit (0);
-#endif
-#endif
-#endif
-
-#if defined (__386BSD__)
- printf ("i386-pc-bsd\n"); exit (0);
-#endif
-
-#if defined (sequent)
-#if defined (i386)
- printf ("i386-sequent-dynix\n"); exit (0);
-#endif
-#if defined (ns32000)
- printf ("ns32k-sequent-dynix\n"); exit (0);
-#endif
-#endif
-
-#if defined (_SEQUENT_)
- struct utsname un;
-
- uname(&un);
-
- if (strncmp(un.version, "V2", 2) == 0) {
- printf ("i386-sequent-ptx2\n"); exit (0);
- }
- if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */
- printf ("i386-sequent-ptx1\n"); exit (0);
- }
- printf ("i386-sequent-ptx\n"); exit (0);
-
-#endif
-
-#if defined (vax)
-# if !defined (ultrix)
-# include <sys/param.h>
-# if defined (BSD)
-# if BSD == 43
- printf ("vax-dec-bsd4.3\n"); exit (0);
-# else
-# if BSD == 199006
- printf ("vax-dec-bsd4.3reno\n"); exit (0);
-# else
- printf ("vax-dec-bsd\n"); exit (0);
-# endif
-# endif
-# else
- printf ("vax-dec-bsd\n"); exit (0);
-# endif
-# else
- printf ("vax-dec-ultrix\n"); exit (0);
-# endif
-#endif
-
-#if defined (alliant) && defined (i860)
- printf ("i860-alliant-bsd\n"); exit (0);
-#endif
-
- exit (1);
-}
-EOF
-
-$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && SYSTEM_NAME=`$dummy` &&
- { echo "$SYSTEM_NAME"; exit; }
-
-# Apollos put the system type in the environment.
-
-test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit; }
-
-# Convex versions that predate uname can use getsysinfo(1)
-
-if [ -x /usr/convex/getsysinfo ]
-then
- case `getsysinfo -f cpu_type` in
- c1*)
- echo c1-convex-bsd
+ amd64:Isilon\ OneFS:*:*)
+ echo x86_64-unknown-onefs
exit ;;
- c2*)
- if getsysinfo -f scalar_acc
- then echo c32-convex-bsd
- else echo c2-convex-bsd
- fi
- exit ;;
- c34*)
- echo c34-convex-bsd
- exit ;;
- c38*)
- echo c38-convex-bsd
- exit ;;
- c4*)
- echo c4-convex-bsd
- exit ;;
- esac
-fi
+esac
cat >&2 <<EOF
$0: unable to guess system type
-This script, last modified $timestamp, has failed to recognize
-the operating system you are using. It is advised that you
-download the most up to date version of the config scripts from
+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:
- http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD
+ http://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;hb=HEAD
+ http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub
-If the version you run ($0) is already up to date, please
-send the following data and any information you think might be
-pertinent to <config-patches@gnu.org> in order to provide the needed
-information to handle your system.
+If $0 has already been updated, send the following data and any
+information you think might be pertinent to config-patches@gnu.org to
+provide the necessary information to handle your system.
config.guess timestamp = $timestamp
diff --git a/build-aux/config.rpath b/build-aux/config.rpath
index c547c68..98183ff 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-2007 Free Software Foundation, Inc.
+# Copyright 1996-2016 Free Software Foundation, Inc.
# Taken from GNU libtool, 2001
# Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
#
@@ -25,7 +25,7 @@
# known workaround is to choose shorter directory names for the build
# directory and/or the installation directory.
-# All known linkers require a `.a' archive for static linking (except MSVC,
+# All known linkers require a '.a' archive for static linking (except MSVC,
# which needs '.lib').
libext=a
shrext=.so
@@ -47,7 +47,7 @@ for cc_temp in $CC""; do
done
cc_basename=`echo "$cc_temp" | sed -e 's%^.*/%%'`
-# Code taken from libtool.m4's AC_LIBTOOL_PROG_COMPILER_PIC.
+# Code taken from libtool.m4's _LT_COMPILER_PIC.
wl=
if test "$GCC" = yes; then
@@ -57,14 +57,7 @@ else
aix*)
wl='-Wl,'
;;
- darwin*)
- case $cc_basename in
- xlc*)
- wl='-Wl,'
- ;;
- esac
- ;;
- mingw* | cygwin* | pw32* | os2*)
+ mingw* | cygwin* | pw32* | os2* | cegcc*)
;;
hpux9* | hpux10* | hpux11*)
wl='-Wl,'
@@ -72,24 +65,37 @@ else
irix5* | irix6* | nonstopux*)
wl='-Wl,'
;;
- newsos6)
- ;;
- linux* | k*bsd*-gnu)
+ linux* | k*bsd*-gnu | kopensolaris*-gnu)
case $cc_basename in
- icc* | ecc*)
+ ecc*)
+ wl='-Wl,'
+ ;;
+ icc* | ifort*)
+ wl='-Wl,'
+ ;;
+ lf95*)
wl='-Wl,'
;;
- pgcc | pgf77 | pgf90)
+ nagfor*)
+ wl='-Wl,-Wl,,'
+ ;;
+ pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*)
wl='-Wl,'
;;
ccc*)
wl='-Wl,'
;;
+ xl* | bgxl* | bgf* | mpixl*)
+ wl='-Wl,'
+ ;;
como)
wl='-lopt='
;;
*)
case `$CC -V 2>&1 | sed 5q` in
+ *Sun\ F* | *Sun*Fortran*)
+ wl=
+ ;;
*Sun\ C*)
wl='-Wl,'
;;
@@ -97,13 +103,24 @@ else
;;
esac
;;
+ newsos6)
+ ;;
+ *nto* | *qnx*)
+ ;;
osf3* | osf4* | osf5*)
wl='-Wl,'
;;
rdos*)
;;
solaris*)
- wl='-Wl,'
+ case $cc_basename in
+ f77* | f90* | f95* | sunf77* | sunf90* | sunf95*)
+ wl='-Qoption ld '
+ ;;
+ *)
+ wl='-Wl,'
+ ;;
+ esac
;;
sunos4*)
wl='-Qoption ld '
@@ -124,7 +141,7 @@ else
esac
fi
-# Code taken from libtool.m4's AC_LIBTOOL_PROG_LD_SHLIBS.
+# Code taken from libtool.m4's _LT_LINKER_SHLIBS.
hardcode_libdir_flag_spec=
hardcode_libdir_separator=
@@ -132,7 +149,7 @@ hardcode_direct=no
hardcode_minus_L=no
case "$host_os" in
- cygwin* | mingw* | pw32*)
+ cygwin* | mingw* | pw32* | cegcc*)
# FIXME: the MSVC++ port hasn't been tested in a loooong time
# When not using gcc, we currently assume that we are using
# Microsoft Visual C++.
@@ -158,22 +175,21 @@ if test "$with_gnu_ld" = yes; then
# option of GNU ld is called -rpath, not --rpath.
hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
case "$host_os" in
- aix3* | aix4* | aix5*)
+ aix[3-9]*)
# On AIX/PPC, the GNU linker is very broken
if test "$host_cpu" != ia64; then
ld_shlibs=no
fi
;;
amigaos*)
- hardcode_libdir_flag_spec='-L$libdir'
- hardcode_minus_L=yes
- # Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports
- # that the semantics of dynamic libraries on AmigaOS, at least up
- # to version 4, is to share data among multiple programs linked
- # with the same dynamic library. Since this doesn't match the
- # behavior of shared libraries on other platforms, we cannot use
- # them.
- ld_shlibs=no
+ case "$host_cpu" in
+ powerpc)
+ ;;
+ m68k)
+ hardcode_libdir_flag_spec='-L$libdir'
+ hardcode_minus_L=yes
+ ;;
+ esac
;;
beos*)
if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
@@ -182,7 +198,7 @@ if test "$with_gnu_ld" = yes; then
ld_shlibs=no
fi
;;
- cygwin* | mingw* | pw32*)
+ cygwin* | mingw* | pw32* | cegcc*)
# hardcode_libdir_flag_spec is actually meaningless, as there is
# no search path for DLLs.
hardcode_libdir_flag_spec='-L$libdir'
@@ -192,11 +208,13 @@ if test "$with_gnu_ld" = yes; then
ld_shlibs=no
fi
;;
+ haiku*)
+ ;;
interix[3-9]*)
hardcode_direct=no
hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
;;
- gnu* | linux* | k*bsd*-gnu)
+ gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu)
if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
:
else
@@ -254,7 +272,7 @@ else
hardcode_direct=unsupported
fi
;;
- aix4* | aix5*)
+ aix[4-9]*)
if test "$host_cpu" = ia64; then
# On IA64, the linker does run time linking by default, so we don't
# have to do anything special.
@@ -264,7 +282,7 @@ else
# Test if we are trying to use run time linking or normal
# AIX style linking. If -brtl is somewhere in LDFLAGS, we
# need to do runtime linking.
- case $host_os in aix4.[23]|aix4.[23].*|aix5*)
+ case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*)
for ld_flag in $LDFLAGS; do
if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
aix_use_runtimelinking=yes
@@ -319,14 +337,18 @@ else
fi
;;
amigaos*)
- hardcode_libdir_flag_spec='-L$libdir'
- hardcode_minus_L=yes
- # see comment about different semantics on the GNU ld section
- ld_shlibs=no
+ case "$host_cpu" in
+ powerpc)
+ ;;
+ m68k)
+ hardcode_libdir_flag_spec='-L$libdir'
+ hardcode_minus_L=yes
+ ;;
+ esac
;;
bsdi[45]*)
;;
- cygwin* | mingw* | pw32*)
+ cygwin* | mingw* | pw32* | cegcc*)
# When not using gcc, we currently assume that we are using
# Microsoft Visual C++.
# hardcode_libdir_flag_spec is actually meaningless, as there is
@@ -336,29 +358,16 @@ else
;;
darwin* | rhapsody*)
hardcode_direct=no
- if test "$GCC" = yes ; then
+ if { case $cc_basename in ifort*) true;; *) test "$GCC" = yes;; esac; }; then
:
else
- case $cc_basename in
- xlc*)
- ;;
- *)
- ld_shlibs=no
- ;;
- esac
+ ld_shlibs=no
fi
;;
dgux*)
hardcode_libdir_flag_spec='-L$libdir'
;;
- freebsd1*)
- ld_shlibs=no
- ;;
- freebsd2.2*)
- hardcode_libdir_flag_spec='-R$libdir'
- hardcode_direct=yes
- ;;
- freebsd2*)
+ freebsd2.[01]*)
hardcode_direct=yes
hardcode_minus_L=yes
;;
@@ -414,6 +423,8 @@ else
hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
hardcode_libdir_separator=:
;;
+ *nto* | *qnx*)
+ ;;
openbsd*)
if test -f /usr/libexec/ld.so; then
hardcode_direct=yes
@@ -494,7 +505,7 @@ else
fi
# Check dynamic linker characteristics
-# Code taken from libtool.m4's AC_LIBTOOL_SYS_DYNAMIC_LINKER.
+# Code taken from libtool.m4's _LT_SYS_DYNAMIC_LINKER.
# Unlike libtool.m4, here we don't care about _all_ names of the library, but
# only about the one the linker finds when passed -lNAME. This is the last
# element of library_names_spec in libtool.m4, or possibly two of them if the
@@ -505,11 +516,16 @@ case "$host_os" in
aix3*)
library_names_spec='$libname.a'
;;
- aix4* | aix5*)
+ aix[4-9]*)
library_names_spec='$libname$shrext'
;;
amigaos*)
- library_names_spec='$libname.a'
+ case "$host_cpu" in
+ powerpc*)
+ library_names_spec='$libname$shrext' ;;
+ m68k)
+ library_names_spec='$libname.a' ;;
+ esac
;;
beos*)
library_names_spec='$libname$shrext'
@@ -517,7 +533,7 @@ case "$host_os" in
bsdi[45]*)
library_names_spec='$libname$shrext'
;;
- cygwin* | mingw* | pw32*)
+ cygwin* | mingw* | pw32* | cegcc*)
shrext=.dll
library_names_spec='$libname.dll.a $libname.lib'
;;
@@ -528,19 +544,18 @@ case "$host_os" in
dgux*)
library_names_spec='$libname$shrext'
;;
- freebsd1*)
+ freebsd[23].*)
+ library_names_spec='$libname$shrext$versuffix'
;;
freebsd* | dragonfly*)
- case "$host_os" in
- freebsd[123]*)
- library_names_spec='$libname$shrext$versuffix' ;;
- *)
- library_names_spec='$libname$shrext' ;;
- esac
+ library_names_spec='$libname$shrext'
;;
gnu*)
library_names_spec='$libname$shrext'
;;
+ haiku*)
+ library_names_spec='$libname$shrext'
+ ;;
hpux9* | hpux10* | hpux11*)
case $host_cpu in
ia64*)
@@ -576,7 +591,7 @@ case "$host_os" in
;;
linux*oldld* | linux*aout* | linux*coff*)
;;
- linux* | k*bsd*-gnu)
+ linux* | k*bsd*-gnu | kopensolaris*-gnu)
library_names_spec='$libname$shrext'
;;
knetbsd*-gnu)
@@ -588,7 +603,7 @@ case "$host_os" in
newsos6)
library_names_spec='$libname$shrext'
;;
- nto-qnx*)
+ *nto* | *qnx*)
library_names_spec='$libname$shrext'
;;
openbsd*)
@@ -619,6 +634,9 @@ case "$host_os" in
sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
library_names_spec='$libname$shrext'
;;
+ tpf*)
+ library_names_spec='$libname$shrext'
+ ;;
uts4*)
library_names_spec='$libname$shrext'
;;
diff --git a/build-aux/config.sub b/build-aux/config.sub
index 6205f84..62b8259 100755
--- a/build-aux/config.sub
+++ b/build-aux/config.sub
@@ -1,24 +1,18 @@
#! /bin/sh
# Configuration validation subroutine script.
-# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
-# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010,
-# 2011, 2012 Free Software Foundation, Inc.
+# Copyright 1992-2016 Free Software Foundation, Inc.
-timestamp='2012-04-18'
+timestamp='2016-12-24'
-# This file is (in principle) common to ALL GNU software.
-# The presence of a machine in this file suggests that SOME GNU software
-# can handle that machine. It does not imply ALL GNU software can.
-#
-# 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 2 of the License, or
+# 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 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/>.
@@ -26,11 +20,12 @@ timestamp='2012-04-18'
# As a special exception to the GNU General Public License, if you
# distribute this file as part of a program that contains a
# configuration script generated by Autoconf, you may include it under
-# the same distribution terms that you use for the rest of that program.
+# the same distribution terms that you use for the rest of that
+# program. This Exception is an additional permission under section 7
+# of the GNU General Public License, version 3 ("GPLv3").
-# Please send patches to <config-patches@gnu.org>. Submit a context
-# diff and a properly formatted GNU ChangeLog entry.
+# Please send patches to <config-patches@gnu.org>.
#
# Configuration subroutine to validate and canonicalize a configuration type.
# Supply the specified configuration type as an argument.
@@ -38,7 +33,7 @@ timestamp='2012-04-18'
# 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;hb=HEAD
+# http://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
@@ -58,8 +53,7 @@ timestamp='2012-04-18'
me=`echo "$0" | sed -e 's,.*/,,'`
usage="\
-Usage: $0 [OPTION] CPU-MFR-OPSYS
- $0 [OPTION] ALIAS
+Usage: $0 [OPTION] CPU-MFR-OPSYS or ALIAS
Canonicalize a configuration name.
@@ -73,9 +67,7 @@ Report bugs and patches to <config-patches@gnu.org>."
version="\
GNU config.sub ($timestamp)
-Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
-2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012
-Free Software Foundation, Inc.
+Copyright 1992-2016 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."
@@ -123,9 +115,9 @@ esac
maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
case $maybe_os in
nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc | linux-newlib* | \
- linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \
- knetbsd*-gnu* | netbsd*-gnu* | \
- kopensolaris*-gnu* | \
+ linux-musl* | linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \
+ knetbsd*-gnu* | netbsd*-gnu* | netbsd*-eabi* | \
+ kopensolaris*-gnu* | cloudabi*-eabi* | \
storm-chaos* | os2-emx* | rtmk-nova*)
os=-$maybe_os
basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
@@ -156,7 +148,7 @@ case $os in
-convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\
-c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \
-harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \
- -apple | -axis | -knuth | -cray | -microblaze)
+ -apple | -axis | -knuth | -cray | -microblaze*)
os=
basic_machine=$1
;;
@@ -259,21 +251,25 @@ case $basic_machine in
| alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \
| alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \
| am33_2.0 \
- | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr | avr32 \
- | be32 | be64 \
+ | arc | arceb \
+ | arm | arm[bl]e | arme[lb] | armv[2-8] | armv[3-8][lb] | armv7[arm] \
+ | avr | avr32 \
+ | ba \
+ | be32 | be64 \
| bfin \
- | c4x | clipper \
+ | c4x | c8051 | clipper \
| d10v | d30v | dlx | dsp16xx \
- | epiphany \
- | fido | fr30 | frv \
+ | e2k | epiphany \
+ | fido | fr30 | frv | ft32 \
| h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
| hexagon \
| i370 | i860 | i960 | ia64 \
| ip2k | iq2000 \
+ | k1om \
| le32 | le64 \
| lm32 \
| m32c | m32r | m32rle | m68000 | m68k | m88k \
- | maxq | mb | microblaze | mcore | mep | metag \
+ | maxq | mb | microblaze | microblazeel | mcore | mep | metag \
| mips | mipsbe | mipseb | mipsel | mipsle \
| mips16 \
| mips64 | mips64el \
@@ -287,26 +283,30 @@ case $basic_machine in
| mips64vr5900 | mips64vr5900el \
| mipsisa32 | mipsisa32el \
| mipsisa32r2 | mipsisa32r2el \
+ | mipsisa32r6 | mipsisa32r6el \
| mipsisa64 | mipsisa64el \
| mipsisa64r2 | mipsisa64r2el \
+ | mipsisa64r6 | mipsisa64r6el \
| mipsisa64sb1 | mipsisa64sb1el \
| mipsisa64sr71k | mipsisa64sr71kel \
+ | mipsr5900 | mipsr5900el \
| mipstx39 | mipstx39el \
| mn10200 | mn10300 \
| moxie \
| mt \
| msp430 \
| nds32 | nds32le | nds32be \
- | nios | nios2 \
+ | nios | nios2 | nios2eb | nios2el \
| ns16k | ns32k \
- | open8 \
- | or32 \
+ | open8 | or1k | or1knd | or32 \
| pdp10 | pdp11 | pj | pjl \
| powerpc | powerpc64 | powerpc64le | powerpcle \
+ | pru \
| pyramid \
+ | riscv32 | riscv64 \
| rl78 | rx \
| score \
- | sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \
+ | sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[234]eb | sheb | shbe | shle | sh[1234]le | sh3ele \
| sh64 | sh64le \
| sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \
| sparcv8 | sparcv9 | sparcv9b | sparcv9v \
@@ -314,6 +314,7 @@ case $basic_machine in
| tahoe | tic4x | tic54x | tic55x | tic6x | tic80 | tron \
| ubicom32 \
| v850 | v850e | v850e1 | v850e2 | v850es | v850e2v3 \
+ | visium \
| we32k \
| x86 | xc16x | xstormy16 | xtensa \
| z8k | z80)
@@ -328,7 +329,10 @@ case $basic_machine in
c6x)
basic_machine=tic6x-unknown
;;
- m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x | picochip)
+ leon|leon[3-9])
+ basic_machine=sparc-$basic_machine
+ ;;
+ m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x | nvptx | picochip)
basic_machine=$basic_machine-unknown
os=-none
;;
@@ -370,26 +374,29 @@ case $basic_machine in
| aarch64-* | aarch64_be-* \
| alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \
| alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \
- | alphapca5[67]-* | alpha64pca5[67]-* | arc-* \
+ | alphapca5[67]-* | alpha64pca5[67]-* | arc-* | arceb-* \
| arm-* | armbe-* | armle-* | armeb-* | armv*-* \
| avr-* | avr32-* \
+ | ba-* \
| be32-* | be64-* \
| bfin-* | bs2000-* \
| c[123]* | c30-* | [cjt]90-* | c4x-* \
- | clipper-* | craynv-* | cydra-* \
+ | c8051-* | clipper-* | craynv-* | cydra-* \
| d10v-* | d30v-* | dlx-* \
- | elxsi-* \
+ | e2k-* | elxsi-* \
| f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \
| h8300-* | h8500-* \
| hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \
| hexagon-* \
| i*86-* | i860-* | i960-* | ia64-* \
| ip2k-* | iq2000-* \
+ | k1om-* \
| le32-* | le64-* \
| lm32-* \
| m32c-* | m32r-* | m32rle-* \
| m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \
- | m88110-* | m88k-* | maxq-* | mcore-* | metag-* | microblaze-* \
+ | m88110-* | m88k-* | maxq-* | mcore-* | metag-* \
+ | microblaze-* | microblazeel-* \
| mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \
| mips16-* \
| mips64-* | mips64el-* \
@@ -403,28 +410,34 @@ case $basic_machine in
| mips64vr5900-* | mips64vr5900el-* \
| mipsisa32-* | mipsisa32el-* \
| mipsisa32r2-* | mipsisa32r2el-* \
+ | mipsisa32r6-* | mipsisa32r6el-* \
| mipsisa64-* | mipsisa64el-* \
| mipsisa64r2-* | mipsisa64r2el-* \
+ | mipsisa64r6-* | mipsisa64r6el-* \
| mipsisa64sb1-* | mipsisa64sb1el-* \
| mipsisa64sr71k-* | mipsisa64sr71kel-* \
+ | mipsr5900-* | mipsr5900el-* \
| mipstx39-* | mipstx39el-* \
| mmix-* \
| mt-* \
| msp430-* \
| nds32-* | nds32le-* | nds32be-* \
- | nios-* | nios2-* \
+ | nios-* | nios2-* | nios2eb-* | nios2el-* \
| none-* | np1-* | ns16k-* | ns32k-* \
| open8-* \
+ | or1k*-* \
| orion-* \
| pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
| powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* \
+ | pru-* \
| pyramid-* \
+ | riscv32-* | riscv64-* \
| rl78-* | romp-* | rs6000-* | rx-* \
| sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \
| shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \
| sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \
| sparclite-* \
- | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | sv1-* | sx?-* \
+ | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | sv1-* | sx*-* \
| tahoe-* \
| tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \
| tile*-* \
@@ -432,6 +445,7 @@ case $basic_machine in
| ubicom32-* \
| v850-* | v850e-* | v850e1-* | v850es-* | v850e2-* | v850e2v3-* \
| vax-* \
+ | visium-* \
| we32k-* \
| x86-* | x86_64-* | xc16x-* | xps100-* \
| xstormy16-* | xtensa*-* \
@@ -508,6 +522,9 @@ case $basic_machine in
basic_machine=i386-pc
os=-aros
;;
+ asmjs)
+ basic_machine=asmjs-unknown
+ ;;
aux)
basic_machine=m68k-apple
os=-aux
@@ -628,6 +645,14 @@ case $basic_machine in
basic_machine=m68k-bull
os=-sysv3
;;
+ e500v[12])
+ basic_machine=powerpc-unknown
+ os=$os"spe"
+ ;;
+ e500v[12]-*)
+ basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'`
+ os=$os"spe"
+ ;;
ebmon29k)
basic_machine=a29k-amd
os=-ebmon
@@ -769,6 +794,9 @@ case $basic_machine in
basic_machine=m68k-isi
os=-sysv
;;
+ leon-*|leon[3-9]-*)
+ basic_machine=sparc-`echo $basic_machine | sed 's/-.*//'`
+ ;;
m68knommu)
basic_machine=m68k-unknown
os=-linux
@@ -788,11 +816,15 @@ case $basic_machine in
basic_machine=ns32k-utek
os=-sysv
;;
- microblaze)
+ microblaze*)
basic_machine=microblaze-xilinx
;;
+ mingw64)
+ basic_machine=x86_64-pc
+ os=-mingw64
+ ;;
mingw32)
- basic_machine=i386-pc
+ basic_machine=i686-pc
os=-mingw32
;;
mingw32ce)
@@ -820,6 +852,10 @@ case $basic_machine in
basic_machine=powerpc-unknown
os=-morphos
;;
+ moxiebox)
+ basic_machine=moxie-unknown
+ os=-moxiebox
+ ;;
msdos)
basic_machine=i386-pc
os=-msdos
@@ -828,7 +864,7 @@ case $basic_machine in
basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'`
;;
msys)
- basic_machine=i386-pc
+ basic_machine=i686-pc
os=-msys
;;
mvs)
@@ -996,7 +1032,7 @@ case $basic_machine in
ppc-* | ppcbe-*)
basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'`
;;
- ppcle | powerpclittle | ppc-le | powerpc-little)
+ ppcle | powerpclittle)
basic_machine=powerpcle-unknown
;;
ppcle-* | powerpclittle-*)
@@ -1006,7 +1042,7 @@ case $basic_machine in
;;
ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'`
;;
- ppc64le | powerpc64little | ppc64-le | powerpc64-little)
+ ppc64le | powerpc64little)
basic_machine=powerpc64le-unknown
;;
ppc64le-* | powerpc64little-*)
@@ -1019,7 +1055,11 @@ case $basic_machine in
basic_machine=i586-unknown
os=-pw32
;;
- rdos)
+ rdos | rdos64)
+ basic_machine=x86_64-pc
+ os=-rdos
+ ;;
+ rdos32)
basic_machine=i386-pc
os=-rdos
;;
@@ -1346,29 +1386,30 @@ case $os in
-gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \
| -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\
| -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \
- | -sym* | -kopensolaris* \
+ | -sym* | -kopensolaris* | -plan9* \
| -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \
- | -aos* | -aros* \
+ | -aos* | -aros* | -cloudabi* | -sortix* \
| -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
| -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
| -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \
- | -openbsd* | -solidbsd* \
+ | -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* \
- | -chorusos* | -chorusrdb* | -cegcc* \
+ | -chorusos* | -chorusrdb* | -cegcc* | -glidix* \
| -cygwin* | -msys* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
- | -mingw32* | -linux-gnu* | -linux-android* \
- | -linux-newlib* | -linux-uclibc* \
- | -uxpv* | -beos* | -mpeix* | -udk* \
+ | -midipix* | -mingw32* | -mingw64* | -linux-gnu* | -linux-android* \
+ | -linux-newlib* | -linux-musl* | -linux-uclibc* \
+ | -uxpv* | -beos* | -mpeix* | -udk* | -moxiebox* \
| -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \
| -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
| -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \
| -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \
| -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \
| -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \
- | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es*)
+ | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es* \
+ | -onefs* | -tirtos* | -phoenix* | -fuchsia* | -redox*)
# Remember, each alternative MUST END IN *, to match a version number.
;;
-qnx*)
@@ -1492,9 +1533,6 @@ case $os in
-aros*)
os=-aros
;;
- -kaos*)
- os=-kaos
- ;;
-zvmoe)
os=-zvmoe
;;
@@ -1503,6 +1541,8 @@ case $os in
;;
-nacl*)
;;
+ -ios)
+ ;;
-none)
;;
*)
@@ -1543,6 +1583,9 @@ case $basic_machine in
c4x-* | tic4x-*)
os=-coff
;;
+ c8051-*)
+ os=-elf
+ ;;
hexagon-*)
os=-elf
;;
@@ -1595,6 +1638,9 @@ case $basic_machine in
sparc-* | *-sun)
os=-sunos4.1.1
;;
+ pru-*)
+ os=-elf
+ ;;
*-be)
os=-beos
;;
diff --git a/build-aux/depcomp b/build-aux/depcomp
index debb6ff..28ce42a 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=2012-03-27.16; # UTC
+scriptversion=2016-01-11.22; # UTC
-# Copyright (C) 1999-2012 Free Software Foundation, Inc.
+# Copyright (C) 1999-2015 Free Software Foundation, Inc.
# This 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 @@ scriptversion=2012-03-27.16; # UTC
case $1 in
'')
- echo "$0: No command. Try '$0 --help' for more information." 1>&2
- exit 1;
- ;;
+ echo "$0: No command. Try '$0 --help' for more information." 1>&2
+ exit 1;
+ ;;
-h | --h*)
cat <<\EOF
Usage: depcomp [--help] [--version] PROGRAM [ARGS]
@@ -56,11 +56,65 @@ EOF
;;
esac
+# Get the directory component of the given path, and save it in the
+# global variables '$dir'. Note that this directory component will
+# be either empty or ending with a '/' character. This is deliberate.
+set_dir_from ()
+{
+ case $1 in
+ */*) dir=`echo "$1" | sed -e 's|/[^/]*$|/|'`;;
+ *) dir=;;
+ esac
+}
+
+# Get the suffix-stripped basename of the given path, and save it the
+# global variable '$base'.
+set_base_from ()
+{
+ base=`echo "$1" | sed -e 's|^.*/||' -e 's/\.[^.]*$//'`
+}
+
+# If no dependency file was actually created by the compiler invocation,
+# we still have to create a dummy depfile, to avoid errors with the
+# Makefile "include basename.Plo" scheme.
+make_dummy_depfile ()
+{
+ echo "#dummy" > "$depfile"
+}
+
+# Factor out some common post-processing of the generated depfile.
+# Requires the auxiliary global variable '$tmpdepfile' to be set.
+aix_post_process_depfile ()
+{
+ # If the compiler actually managed to produce a dependency file,
+ # post-process it.
+ if test -f "$tmpdepfile"; then
+ # Each line is of the form 'foo.o: dependency.h'.
+ # Do two passes, one to just change these to
+ # $object: dependency.h
+ # and one to simply output
+ # dependency.h:
+ # which is needed to avoid the deleted-header problem.
+ { sed -e "s,^.*\.[$lower]*:,$object:," < "$tmpdepfile"
+ sed -e "s,^.*\.[$lower]*:[$tab ]*,," -e 's,$,:,' < "$tmpdepfile"
+ } > "$depfile"
+ rm -f "$tmpdepfile"
+ else
+ make_dummy_depfile
+ fi
+}
+
# A tabulation character.
tab=' '
# A newline character.
nl='
'
+# Character ranges might be problematic outside the C locale.
+# These definitions help.
+upper=ABCDEFGHIJKLMNOPQRSTUVWXYZ
+lower=abcdefghijklmnopqrstuvwxyz
+digits=0123456789
+alpha=${upper}${lower}
if test -z "$depmode" || test -z "$source" || test -z "$object"; then
echo "depcomp: Variables source, object and depmode must be set" 1>&2
@@ -74,6 +128,9 @@ tmpdepfile=${tmpdepfile-`echo "$depfile" | sed 's/\.\([^.]*\)$/.T\1/'`}
rm -f "$tmpdepfile"
+# Avoid interferences from the environment.
+gccflag= dashmflag=
+
# Some modes work just like other modes, but use different flags. We
# parameterize here, but still list the modes in the big case below,
# to make depend.m4 easier to write. Note that we *cannot* use a case
@@ -85,32 +142,32 @@ if test "$depmode" = hp; then
fi
if test "$depmode" = dashXmstdout; then
- # This is just like dashmstdout with a different argument.
- dashmflag=-xM
- depmode=dashmstdout
+ # This is just like dashmstdout with a different argument.
+ dashmflag=-xM
+ depmode=dashmstdout
fi
cygpath_u="cygpath -u -f -"
if test "$depmode" = msvcmsys; then
- # This is just like msvisualcpp but w/o cygpath translation.
- # Just convert the backslash-escaped backslashes to single forward
- # slashes to satisfy depend.m4
- cygpath_u='sed s,\\\\,/,g'
- depmode=msvisualcpp
+ # This is just like msvisualcpp but w/o cygpath translation.
+ # Just convert the backslash-escaped backslashes to single forward
+ # slashes to satisfy depend.m4
+ cygpath_u='sed s,\\\\,/,g'
+ depmode=msvisualcpp
fi
if test "$depmode" = msvc7msys; then
- # This is just like msvc7 but w/o cygpath translation.
- # Just convert the backslash-escaped backslashes to single forward
- # slashes to satisfy depend.m4
- cygpath_u='sed s,\\\\,/,g'
- depmode=msvc7
+ # This is just like msvc7 but w/o cygpath translation.
+ # Just convert the backslash-escaped backslashes to single forward
+ # slashes to satisfy depend.m4
+ cygpath_u='sed s,\\\\,/,g'
+ depmode=msvc7
fi
if test "$depmode" = xlc; then
- # IBM C/C++ Compilers xlc/xlC can output gcc-like dependency informations.
- gccflag=-qmakedep=gcc,-MF
- depmode=gcc
+ # IBM C/C++ Compilers xlc/xlC can output gcc-like dependency information.
+ gccflag=-qmakedep=gcc,-MF
+ depmode=gcc
fi
case "$depmode" in
@@ -133,8 +190,7 @@ gcc3)
done
"$@"
stat=$?
- if test $stat -eq 0; then :
- else
+ if test $stat -ne 0; then
rm -f "$tmpdepfile"
exit $stat
fi
@@ -142,13 +198,17 @@ gcc3)
;;
gcc)
+## Note that this doesn't just cater to obsosete pre-3.x GCC compilers.
+## but also to in-use compilers like IMB xlc/xlC and the HP C compiler.
+## (see the conditional assignment to $gccflag above).
## There are various ways to get dependency output from gcc. Here's
## why we pick this rather obscure method:
## - Don't want to use -MD because we'd like the dependencies to end
## up in a subdir. Having to rename by hand is ugly.
## (We might end up doing this anyway to support other compilers.)
## - The DEPENDENCIES_OUTPUT environment variable makes gcc act like
-## -MM, not -M (despite what the docs say).
+## -MM, not -M (despite what the docs say). Also, it might not be
+## supported by the other compilers which use the 'gcc' depmode.
## - Using -M directly means running the compiler twice (even worse
## than renaming).
if test -z "$gccflag"; then
@@ -156,15 +216,14 @@ gcc)
fi
"$@" -Wp,"$gccflag$tmpdepfile"
stat=$?
- if test $stat -eq 0; then :
- else
+ if test $stat -ne 0; then
rm -f "$tmpdepfile"
exit $stat
fi
rm -f "$depfile"
echo "$object : \\" > "$depfile"
- alpha=ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz
-## The second -e expression handles DOS-style file names with drive letters.
+ # The second -e expression handles DOS-style file names with drive
+ # letters.
sed -e 's/^[^:]*: / /' \
-e 's/^['$alpha']:\/[^:]*: / /' < "$tmpdepfile" >> "$depfile"
## This next piece of magic avoids the "deleted header file" problem.
@@ -173,15 +232,15 @@ gcc)
## typically no way to rebuild the header). We avoid this by adding
## dummy dependencies for each header file. Too bad gcc doesn't do
## this for us directly.
- tr ' ' "$nl" < "$tmpdepfile" |
## Some versions of gcc put a space before the ':'. On the theory
## that the space means something, we add a space to the output as
## well. hp depmode also adds that space, but also prefixes the VPATH
## to the object. Take care to not repeat it in the output.
## Some versions of the HPUX 10.20 sed can't process this invocation
## correctly. Breaking it into two sed invocations is a workaround.
- sed -e 's/^\\$//' -e '/^$/d' -e "s|.*$object$||" -e '/:$/d' \
- | sed -e 's/$/ :/' >> "$depfile"
+ tr ' ' "$nl" < "$tmpdepfile" \
+ | sed -e 's/^\\$//' -e '/^$/d' -e "s|.*$object$||" -e '/:$/d' \
+ | sed -e 's/$/ :/' >> "$depfile"
rm -f "$tmpdepfile"
;;
@@ -192,47 +251,6 @@ hp)
exit 1
;;
-sgi)
- if test "$libtool" = yes; then
- "$@" "-Wp,-MDupdate,$tmpdepfile"
- else
- "$@" -MDupdate "$tmpdepfile"
- fi
- stat=$?
- if test $stat -eq 0; then :
- else
- 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
- # The sourcefile does not contain any dependencies, so just
- # store a dummy comment line, to avoid errors with the Makefile
- # "include basename.Plo" scheme.
- echo "#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,
@@ -246,9 +264,8 @@ aix)
# current directory. Also, the AIX compiler puts '$object:' at the
# start of each line; $object doesn't have directory information.
# Version 6 uses the directory in both cases.
- dir=`echo "$object" | sed -e 's|/[^/]*$|/|'`
- test "x$dir" = "x$object" && dir=
- base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'`
+ set_dir_from "$object"
+ set_base_from "$object"
if test "$libtool" = yes; then
tmpdepfile1=$dir$base.u
tmpdepfile2=$base.u
@@ -261,9 +278,7 @@ aix)
"$@" -M
fi
stat=$?
-
- if test $stat -eq 0; then :
- else
+ if test $stat -ne 0; then
rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3"
exit $stat
fi
@@ -272,65 +287,113 @@ aix)
do
test -f "$tmpdepfile" && break
done
- if test -f "$tmpdepfile"; then
- # Each line is of the form 'foo.o: dependent.h'.
- # Do two passes, one to just change these to
- # '$object: dependent.h' and one to simply 'dependent.h:'.
- sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile"
- sed -e 's,^.*\.[a-z]*:['"$tab"' ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile"
- else
- # The sourcefile does not contain any dependencies, so just
- # store a dummy comment line, to avoid errors with the Makefile
- # "include basename.Plo" scheme.
- echo "#dummy" > "$depfile"
+ aix_post_process_depfile
+ ;;
+
+tcc)
+ # tcc (Tiny C Compiler) understand '-MD -MF file' since version 0.9.26
+ # FIXME: That version still under development at the moment of writing.
+ # Make that this statement remains true also for stable, released
+ # versions.
+ # It will wrap lines (doesn't matter whether long or short) with a
+ # trailing '\', as in:
+ #
+ # foo.o : \
+ # foo.c \
+ # foo.h \
+ #
+ # It will put a trailing '\' even on the last line, and will use leading
+ # spaces rather than leading tabs (at least since its commit 0394caf7
+ # "Emit spaces for -MD").
+ "$@" -MD -MF "$tmpdepfile"
+ stat=$?
+ if test $stat -ne 0; then
+ rm -f "$tmpdepfile"
+ exit $stat
fi
+ rm -f "$depfile"
+ # Each non-empty line is of the form 'foo.o : \' or ' dep.h \'.
+ # We have to change lines of the first kind to '$object: \'.
+ sed -e "s|.*:|$object :|" < "$tmpdepfile" > "$depfile"
+ # And for each line of the second kind, we have to emit a 'dep.h:'
+ # dummy dependency, to avoid the deleted-header problem.
+ sed -n -e 's|^ *\(.*\) *\\$|\1:|p' < "$tmpdepfile" >> "$depfile"
rm -f "$tmpdepfile"
;;
-icc)
- # Intel's C compiler anf tcc (Tiny C Compiler) understand '-MD -MF file'.
- # However on
- # $CC -MD -MF foo.d -c -o sub/foo.o sub/foo.c
- # ICC 7.0 will fill foo.d with something like
- # foo.o: sub/foo.c
- # foo.o: sub/foo.h
- # which is wrong. We want
- # sub/foo.o: sub/foo.c
- # sub/foo.o: sub/foo.h
- # sub/foo.c:
- # sub/foo.h:
- # ICC 7.1 will output
+## The order of this option in the case statement is important, since the
+## shell code in configure will try each of these formats in the order
+## listed in this file. A plain '-MD' option would be understood by many
+## compilers, so we must ensure this comes after the gcc and icc options.
+pgcc)
+ # Portland's C compiler understands '-MD'.
+ # Will always output deps to 'file.d' where file is the root name of the
+ # source file under compilation, even if file resides in a subdirectory.
+ # The object file name does not affect the name of the '.d' file.
+ # pgcc 10.2 will output
# foo.o: sub/foo.c sub/foo.h
- # and will wrap long lines using '\':
+ # and will wrap long lines using '\' :
# foo.o: sub/foo.c ... \
# sub/foo.h ... \
# ...
- # tcc 0.9.26 (FIXME still under development at the moment of writing)
- # will emit a similar output, but also prepend the continuation lines
- # with horizontal tabulation characters.
- "$@" -MD -MF "$tmpdepfile"
- stat=$?
- if test $stat -eq 0; then :
- else
+ set_dir_from "$object"
+ # Use the source, not the object, to determine the base name, since
+ # that's sadly what pgcc will do too.
+ set_base_from "$source"
+ tmpdepfile=$base.d
+
+ # For projects that build the same source file twice into different object
+ # files, the pgcc approach of using the *source* file root name can cause
+ # problems in parallel builds. Use a locking strategy to avoid stomping on
+ # the same $tmpdepfile.
+ lockdir=$base.d-lock
+ trap "
+ echo '$0: caught signal, cleaning up...' >&2
+ rmdir '$lockdir'
+ exit 1
+ " 1 2 13 15
+ numtries=100
+ i=$numtries
+ while test $i -gt 0; do
+ # mkdir is a portable test-and-set.
+ if mkdir "$lockdir" 2>/dev/null; then
+ # This process acquired the lock.
+ "$@" -MD
+ stat=$?
+ # Release the lock.
+ rmdir "$lockdir"
+ break
+ else
+ # If the lock is being held by a different process, wait
+ # until the winning process is done or we timeout.
+ while test -d "$lockdir" && test $i -gt 0; do
+ sleep 1
+ i=`expr $i - 1`
+ done
+ fi
+ i=`expr $i - 1`
+ done
+ trap - 1 2 13 15
+ if test $i -le 0; then
+ echo "$0: failed to acquire lock after $numtries attempts" >&2
+ echo "$0: check lockdir '$lockdir'" >&2
+ exit 1
+ fi
+
+ if test $stat -ne 0; then
rm -f "$tmpdepfile"
exit $stat
fi
rm -f "$depfile"
- # Each line is of the form 'foo.o: dependent.h',
- # or 'foo.o: dep1.h dep2.h \', or ' dep3.h dep4.h \'.
+ # Each line is of the form `foo.o: dependent.h',
+ # or `foo.o: dep1.h dep2.h \', or ` dep3.h dep4.h \'.
# Do two passes, one to just change these to
- # '$object: dependent.h' and one to simply 'dependent.h:'.
- sed -e "s/^[ $tab][ $tab]*/ /" -e "s,^[^:]*:,$object :," \
- < "$tmpdepfile" > "$depfile"
- sed '
- s/[ '"$tab"'][ '"$tab"']*/ /g
- s/^ *//
- s/ *\\*$//
- s/^[^:]*: *//
- /^$/d
- /:$/d
- s/$/ :/
- ' < "$tmpdepfile" >> "$depfile"
+ # `$object: dependent.h' and one to simply `dependent.h:'.
+ sed "s,^[^:]*:,$object :," < "$tmpdepfile" > "$depfile"
+ # Some versions of the HPUX 10.20 sed can't process this invocation
+ # correctly. Breaking it into two sed invocations is a workaround.
+ sed 's,^[^:]*: \(.*\)$,\1,;s/^\\$//;/^$/d;/:$/d' < "$tmpdepfile" \
+ | sed -e 's/$/ :/' >> "$depfile"
rm -f "$tmpdepfile"
;;
@@ -341,9 +404,8 @@ hp2)
# 'foo.d', which lands next to the object file, wherever that
# happens to be.
# Much of this is similar to the tru64 case; see comments there.
- dir=`echo "$object" | sed -e 's|/[^/]*$|/|'`
- test "x$dir" = "x$object" && dir=
- base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'`
+ set_dir_from "$object"
+ set_base_from "$object"
if test "$libtool" = yes; then
tmpdepfile1=$dir$base.d
tmpdepfile2=$dir.libs/$base.d
@@ -354,8 +416,7 @@ hp2)
"$@" +Maked
fi
stat=$?
- if test $stat -eq 0; then :
- else
+ if test $stat -ne 0; then
rm -f "$tmpdepfile1" "$tmpdepfile2"
exit $stat
fi
@@ -365,76 +426,61 @@ hp2)
test -f "$tmpdepfile" && break
done
if test -f "$tmpdepfile"; then
- sed -e "s,^.*\.[a-z]*:,$object:," "$tmpdepfile" > "$depfile"
+ sed -e "s,^.*\.[$lower]*:,$object:," "$tmpdepfile" > "$depfile"
# Add 'dependent.h:' lines.
sed -ne '2,${
- s/^ *//
- s/ \\*$//
- s/$/:/
- p
- }' "$tmpdepfile" >> "$depfile"
+ s/^ *//
+ s/ \\*$//
+ s/$/:/
+ p
+ }' "$tmpdepfile" >> "$depfile"
else
- echo "#dummy" > "$depfile"
+ make_dummy_depfile
fi
rm -f "$tmpdepfile" "$tmpdepfile2"
;;
tru64)
- # The Tru64 compiler uses -MD to generate dependencies as a side
- # effect. 'cc -MD -o foo.o ...' puts the dependencies into 'foo.o.d'.
- # At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put
- # dependencies in 'foo.d' instead, so we check for that too.
- # Subdirectories are respected.
- dir=`echo "$object" | sed -e 's|/[^/]*$|/|'`
- test "x$dir" = "x$object" && dir=
- base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'`
-
- if test "$libtool" = yes; then
- # With Tru64 cc, shared objects can also be used to make a
- # static library. This mechanism is used in libtool 1.4 series to
- # handle both shared and static libraries in a single compilation.
- # With libtool 1.4, dependencies were output in $dir.libs/$base.lo.d.
- #
- # With libtool 1.5 this exception was removed, and libtool now
- # generates 2 separate objects for the 2 libraries. These two
- # compilations output dependencies in $dir.libs/$base.o.d and
- # in $dir$base.o.d. We have to check for both files, because
- # one of the two compilations can be disabled. We should prefer
- # $dir$base.o.d over $dir.libs/$base.o.d because the latter is
- # automatically cleaned when .libs/ is deleted, while ignoring
- # the former would cause a distcleancheck panic.
- tmpdepfile1=$dir.libs/$base.lo.d # libtool 1.4
- tmpdepfile2=$dir$base.o.d # libtool 1.5
- tmpdepfile3=$dir.libs/$base.o.d # libtool 1.5
- tmpdepfile4=$dir.libs/$base.d # Compaq CCC V6.2-504
- "$@" -Wc,-MD
- else
- tmpdepfile1=$dir$base.o.d
- tmpdepfile2=$dir$base.d
- tmpdepfile3=$dir$base.d
- tmpdepfile4=$dir$base.d
- "$@" -MD
- fi
-
- stat=$?
- if test $stat -eq 0; then :
- else
- rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4"
- exit $stat
- fi
-
- for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4"
- do
- test -f "$tmpdepfile" && break
- done
- if test -f "$tmpdepfile"; then
- sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile"
- sed -e 's,^.*\.[a-z]*:['"$tab"' ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile"
- else
- echo "#dummy" > "$depfile"
- fi
- rm -f "$tmpdepfile"
- ;;
+ # The Tru64 compiler uses -MD to generate dependencies as a side
+ # effect. 'cc -MD -o foo.o ...' puts the dependencies into 'foo.o.d'.
+ # At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put
+ # dependencies in 'foo.d' instead, so we check for that too.
+ # Subdirectories are respected.
+ set_dir_from "$object"
+ set_base_from "$object"
+
+ if test "$libtool" = yes; then
+ # Libtool generates 2 separate objects for the 2 libraries. These
+ # two compilations output dependencies in $dir.libs/$base.o.d and
+ # in $dir$base.o.d. We have to check for both files, because
+ # one of the two compilations can be disabled. We should prefer
+ # $dir$base.o.d over $dir.libs/$base.o.d because the latter is
+ # automatically cleaned when .libs/ is deleted, while ignoring
+ # the former would cause a distcleancheck panic.
+ tmpdepfile1=$dir$base.o.d # libtool 1.5
+ tmpdepfile2=$dir.libs/$base.o.d # Likewise.
+ tmpdepfile3=$dir.libs/$base.d # Compaq CCC V6.2-504
+ "$@" -Wc,-MD
+ else
+ tmpdepfile1=$dir$base.d
+ tmpdepfile2=$dir$base.d
+ tmpdepfile3=$dir$base.d
+ "$@" -MD
+ fi
+
+ stat=$?
+ if test $stat -ne 0; then
+ rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3"
+ exit $stat
+ fi
+
+ for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3"
+ do
+ test -f "$tmpdepfile" && break
+ done
+ # Same post-processing that is required for AIX mode.
+ aix_post_process_depfile
+ ;;
msvc7)
if test "$libtool" = yes; then
@@ -445,8 +491,7 @@ msvc7)
"$@" $showIncludes > "$tmpdepfile"
stat=$?
grep -v '^Note: including file: ' "$tmpdepfile"
- if test "$stat" = 0; then :
- else
+ if test $stat -ne 0; then
rm -f "$tmpdepfile"
exit $stat
fi
@@ -472,6 +517,7 @@ $ {
G
p
}' >> "$depfile"
+ echo >> "$depfile" # make sure the fragment doesn't end with a backslash
rm -f "$tmpdepfile"
;;
@@ -523,13 +569,14 @@ dashmstdout)
# in the target name. This is to cope with DOS-style filenames:
# a dependency such as 'c:/foo/bar' could be seen as target 'c' otherwise.
"$@" $dashmflag |
- sed 's:^['"$tab"' ]*[^:'"$tab"' ][^:][^:]*\:['"$tab"' ]*:'"$object"'\: :' > "$tmpdepfile"
+ sed "s|^[$tab ]*[^:$tab ][^:][^:]*:[$tab ]*|$object: |" > "$tmpdepfile"
rm -f "$depfile"
cat < "$tmpdepfile" > "$depfile"
- tr ' ' "$nl" < "$tmpdepfile" | \
-## Some versions of the HPUX 10.20 sed can't process this invocation
-## correctly. Breaking it into two sed invocations is a workaround.
- sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
+ # Some versions of the HPUX 10.20 sed can't process this sed invocation
+ # correctly. Breaking it into two sed invocations is a workaround.
+ tr ' ' "$nl" < "$tmpdepfile" \
+ | sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' \
+ | sed -e 's/$/ :/' >> "$depfile"
rm -f "$tmpdepfile"
;;
@@ -582,10 +629,12 @@ makedepend)
# makedepend may prepend the VPATH from the source file name to the object.
# No need to regex-escape $object, excess matching of '.' is harmless.
sed "s|^.*\($object *:\)|\1|" "$tmpdepfile" > "$depfile"
- sed '1,2d' "$tmpdepfile" | tr ' ' "$nl" | \
-## Some versions of the HPUX 10.20 sed can't process this invocation
-## correctly. Breaking it into two sed invocations is a workaround.
- sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
+ # Some versions of the HPUX 10.20 sed can't process the last invocation
+ # correctly. Breaking it into two sed invocations is a workaround.
+ sed '1,2d' "$tmpdepfile" \
+ | tr ' ' "$nl" \
+ | sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' \
+ | sed -e 's/$/ :/' >> "$depfile"
rm -f "$tmpdepfile" "$tmpdepfile".bak
;;
@@ -621,10 +670,10 @@ cpp)
esac
done
- "$@" -E |
- sed -n -e '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \
- -e '/^#line [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' |
- sed '$ s: \\$::' > "$tmpdepfile"
+ "$@" -E \
+ | sed -n -e '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \
+ -e '/^#line [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \
+ | sed '$ s: \\$::' > "$tmpdepfile"
rm -f "$depfile"
echo "$object : \\" > "$depfile"
cat < "$tmpdepfile" >> "$depfile"
@@ -656,15 +705,15 @@ msvisualcpp)
shift
;;
"-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI")
- set fnord "$@"
- shift
- shift
- ;;
+ set fnord "$@"
+ shift
+ shift
+ ;;
*)
- set fnord "$@" "$arg"
- shift
- shift
- ;;
+ set fnord "$@" "$arg"
+ shift
+ shift
+ ;;
esac
done
"$@" -E 2>/dev/null |
@@ -702,6 +751,6 @@ exit 0
# eval: (add-hook 'write-file-hooks 'time-stamp)
# time-stamp-start: "scriptversion="
# time-stamp-format: "%:y-%02m-%02d.%02H"
-# time-stamp-time-zone: "UTC"
+# time-stamp-time-zone: "UTC0"
# time-stamp-end: "; # UTC"
# End:
diff --git a/build-aux/do-release-commit-and-tag b/build-aux/do-release-commit-and-tag
new file mode 100755
index 0000000..b4f3251
--- /dev/null
+++ b/build-aux/do-release-commit-and-tag
@@ -0,0 +1,179 @@
+#!/bin/sh
+# In a git/autoconf/automake-enabled project with a NEWS file and a version-
+# 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-01-12.23 # UTC
+
+# Note: this is a bash script (could be zsh or dash)
+
+# Copyright (C) 2009-2016 Free Software Foundation, Inc.
+
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# Written by Jim Meyering
+
+ME=$(basename "$0")
+warn() { printf '%s: %s\n' "$ME" "$*" >&2; }
+die() { warn "$*"; exit 1; }
+
+help()
+{
+ cat <<EOF
+Usage: $ME [OPTION...] VERSION RELEASE_TYPE
+
+Run this script from top_srcdir to perform the final pre-release NEWS
+update in which the date, release-type and version string are
+recorded. Commit that result with a log entry marking the release,
+and apply a signed tag. Run it from your project's top-level
+directory.
+
+Requirements:
+- you use git for version-control
+- a version-controlled .prev-version file
+- a NEWS file, with line 3 identical to this:
+$noteworthy_stub
+
+Options:
+ --branch=BRANCH set release branch (default: $branch)
+ -C, --builddir=DIR location of (configured) Makefile (default: $builddir)
+ --help print this help, then exit
+ --version print version number, then exit
+
+EXAMPLE:
+To update NEWS and tag the beta 8.1 release of coreutils, I would run this:
+
+ $ME 8.1 beta
+
+Report bugs and patches to <bug-gnulib@gnu.org>.
+EOF
+ exit
+}
+
+version()
+{
+ year=$(echo "$VERSION" | sed 's/[^0-9].*//')
+ 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>
+This is free software: you are free to change and redistribute it.
+There is NO WARRANTY, to the extent permitted by law.
+EOF
+ exit
+}
+
+## ------ ##
+## Main. ##
+## ------ ##
+
+# Constants.
+noteworthy='* Noteworthy changes in release'
+noteworthy_stub="$noteworthy ?.? (????-??-??) [?]"
+
+# Variables.
+branch=$(git branch | sed -ne '/^\* /{s///;p;q;}')
+builddir=.
+
+while test $# != 0
+do
+ # Handle --option=value by splitting apart and putting back on argv.
+ case $1 in
+ --*=*)
+ opt=$(echo "$1" | sed -e 's/=.*//')
+ val=$(echo "$1" | sed -e 's/[^=]*=//')
+ shift
+ set dummy "$opt" "$val" "$@"; shift
+ ;;
+ esac
+
+ case $1 in
+ --help|--version) ${1#--};;
+ --branch) shift; branch=$1; shift ;;
+ -C|--builddir) shift; builddir=$1; shift ;;
+ --*) die "unrecognized option: $1";;
+ *) break;;
+ esac
+done
+
+test $# = 2 \
+ || die "Usage: $ME [OPTION...] VERSION TYPE"
+
+ver=$1
+type=$2
+
+
+## ---------------------- ##
+## First, sanity checks. ##
+## ---------------------- ##
+
+# Verify that $ver looks like a version number, and...
+echo "$ver"|grep -E '^[0-9][0-9.]*[0-9]$' > /dev/null \
+ || die "invalid version: $ver"
+prev_ver=$(cat .prev-version) \
+ || die 'failed to determine previous version number from .prev-version'
+
+# Verify that $ver is sensible (> .prev-version).
+case $(printf "$prev_ver\n$ver\n"|sort -V -u|tr '\n' ':') in
+ "$prev_ver:$ver:") ;;
+ *) die "invalid version: $ver (<= $prev_ver)";;
+esac
+
+case $type in
+ alpha|beta|stable) ;;
+ *) die "invalid release type: $type";;
+esac
+
+# No local modifications allowed.
+case $(git diff-index --name-only HEAD) in
+ '') ;;
+ *) die 'this tree is dirty; commit your changes first';;
+esac
+
+# Ensure the current branch name is correct:
+curr_br=$(git rev-parse --symbolic-full-name HEAD)
+test "$curr_br" = refs/heads/$branch || die not on branch $branch
+
+# Extract package name from Makefile.
+Makefile=$builddir/Makefile
+pkg=$(sed -n 's/^PACKAGE = \(.*\)/\1/p' "$Makefile") \
+ || die "failed to determine package name from $Makefile"
+
+# Check that line 3 of NEWS is the stub line about to be replaced.
+test "$(sed -n 3p NEWS)" = "$noteworthy_stub" \
+ || die "line 3 of NEWS must be exactly '$noteworthy_stub'"
+
+## --------------- ##
+## Then, changes. ##
+## --------------- ##
+
+# Update NEWS to have today's date, plus desired version number and $type.
+perl -MPOSIX -ni -e 'my $today = strftime "%F", localtime time;' \
+ -e 'my ($type, $ver) = qw('"$type $ver"');' \
+ -e 'my $pfx = "'"$noteworthy"'";' \
+ -e 'print $.==3 ? "$pfx $ver ($today) [$type]\n" : $_' \
+ NEWS || die 'failed to update NEWS'
+
+printf "version $ver\n\n* NEWS: Record release date.\n" \
+ | git commit -F - -a || die 'git commit failed'
+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)
+# time-stamp-start: "VERSION="
+# time-stamp-format: "%:y-%02m-%02d.%02H"
+# time-stamp-time-zone: "UTC0"
+# time-stamp-end: " # UTC"
+# End:
diff --git a/build-aux/gendocs.sh b/build-aux/gendocs.sh
new file mode 100755
index 0000000..fef6280
--- /dev/null
+++ b/build-aux/gendocs.sh
@@ -0,0 +1,504 @@
+#!/bin/sh -e
+# 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-05-20.09
+
+# Copyright 2003-2016 Free Software Foundation, Inc.
+#
+# This 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/>.
+#
+# Original author: Mohit Agarwal.
+# Send bug reports and any other correspondence to bug-gnulib@gnu.org.
+#
+# 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
+
+# TODO:
+# - image importing was only implemented for HTML generated by
+# makeinfo. But it should be simple enough to adjust.
+# - images are not imported in the source tarball. All the needed
+# formats (PDF, PNG, etc.) should be included.
+
+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"
+
+: ${SETLANG="env LANG= LC_MESSAGES= LC_ALL= LANGUAGE="}
+: ${MAKEINFO="makeinfo"}
+: ${TEXI2DVI="texi2dvi"}
+: ${DOCBOOK2HTML="docbook2html"}
+: ${DOCBOOK2PDF="docbook2pdf"}
+: ${DOCBOOK2TXT="docbook2txt"}
+: ${GENDOCS_TEMPLATE_DIR="."}
+: ${PERL='perl'}
+: ${TEXI2HTML="texi2html"}
+unset CDPATH
+unset use_texi2html
+
+MANUAL_TITLE=
+PACKAGE=
+EMAIL=webmasters@gnu.org # please override with --email
+commonarg= # passed to all makeinfo/texi2html invcations.
+dirargs= # passed to all tools (-I dir).
+dirs= # -I directories.
+htmlarg="--css-ref=/software/gnulib/manual.css -c TOP_NODE_UP_URL=/manual"
+infoarg=--no-split
+generate_ascii=true
+generate_html=true
+generate_info=true
+generate_tex=true
+outdir=manual
+source_extra=
+split=node
+srcfile=
+texarg="-t @finalout"
+
+version="gendocs.sh $scriptversion
+
+Copyright 2016 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."
+
+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
+
+Options:
+ --email ADR use ADR as contact in generated web pages; always give this.
+
+ -s SRCFILE read Texinfo from SRCFILE, instead of PACKAGE.{texinfo|texi|txi}
+ -o OUTDIR write files into OUTDIR, instead of manual/.
+ -I DIR append DIR to the Texinfo search path.
+ --common ARG pass ARG in all invocations.
+ --html ARG pass ARG to makeinfo or texi2html for HTML targets,
+ instead of '$htmlarg'.
+ --info ARG pass ARG to makeinfo for Info, instead of --no-split.
+ --no-ascii skip generating the plain text output.
+ --no-html skip generating the html output.
+ --no-info skip generating the info output.
+ --no-tex skip generating the dvi and pdf output.
+ --source ARG include ARG in tar archive of sources.
+ --split HOW make split HTML by node, section, chapter; default node.
+ --tex ARG pass ARG to texi2dvi for DVI and PDF, instead of -t @finalout.
+
+ --texi2html use texi2html to make HTML target, with all split versions.
+ --docbook convert through DocBook too (xml, txt, html, pdf).
+
+ --help display this help and exit successfully.
+ --version display version information and exit successfully.
+
+Simple example: $prog --email bug-gnu-emacs@gnu.org emacs \"GNU Emacs Manual\"
+
+Typical sequence:
+ cd PACKAGESOURCE/doc
+ wget \"$scripturl\"
+ wget \"$templateurl\"
+ $prog --email BUGLIST MANUAL \"GNU MANUAL - One-line description\"
+
+Output will be in a new subdirectory \"manual\" (by default;
+use -o OUTDIR to override). Move all the new files into your web CVS
+tree, as explained in the Web Pages node of maintain.texi.
+
+Please use the --email ADDRESS option so your own bug-reporting
+address will be used in the generated HTML pages.
+
+MANUAL-TITLE is included as part of the HTML <title> of the overall
+manual/index.html file. It should include the name of the package being
+documented. manual/index.html is created by substitution from the file
+$GENDOCS_TEMPLATE_DIR/gendocs_template. (Feel free to modify the
+generic template for your own purposes.)
+
+If you have several manuals, you'll need to run this script several
+times with different MANUAL values, specifying a different output
+directory with -o each time. Then write (by hand) an overall index.html
+with links to them all.
+
+If a manual's Texinfo sources are spread across several directories,
+first copy or symlink all Texinfo sources into a single directory.
+(Part of the script's work is to make a tar.gz of the sources.)
+
+As implied above, by default monolithic Info files are generated.
+If you want split Info, or other Info options, use --info to override.
+
+You can set the environment variables MAKEINFO, TEXI2DVI, TEXI2HTML,
+and PERL to control the programs that get executed, and
+GENDOCS_TEMPLATE_DIR to control where the gendocs_template file is
+looked for. With --docbook, the environment variables DOCBOOK2HTML,
+DOCBOOK2PDF, and DOCBOOK2TXT are also consulted.
+
+By default, makeinfo and texi2dvi are run in the default (English)
+locale, since that's the language of most Texinfo manuals. If you
+happen to have a non-English manual and non-English web site, see the
+SETLANG setting in the source.
+
+Email bug reports or enhancement requests to bug-gnulib@gnu.org.
+"
+
+while test $# -gt 0; do
+ case $1 in
+ -s) shift; srcfile=$1;;
+ -o) shift; outdir=$1;;
+ -I) shift; dirargs="$dirargs -I '$1'"; dirs="$dirs $1";;
+ --common) shift; commonarg=$1;;
+ --docbook) docbook=yes;;
+ --email) shift; EMAIL=$1;;
+ --html) shift; htmlarg=$1;;
+ --info) shift; infoarg=$1;;
+ --no-ascii) generate_ascii=false;;
+ --no-html) generate_ascii=false;;
+ --no-info) generate_info=false;;
+ --no-tex) generate_tex=false;;
+ --source) shift; source_extra=$1;;
+ --split) shift; split=$1;;
+ --tex) shift; texarg=$1;;
+ --texi2html) use_texi2html=1;;
+
+ --help) echo "$usage"; exit 0;;
+ --version) echo "$version"; exit 0;;
+ -*)
+ echo "$0: Unknown option \`$1'." >&2
+ echo "$0: Try \`--help' for more information." >&2
+ exit 1;;
+ *)
+ if test -z "$PACKAGE"; then
+ PACKAGE=$1
+ elif test -z "$MANUAL_TITLE"; then
+ MANUAL_TITLE=$1
+ else
+ echo "$0: extra non-option argument \`$1'." >&2
+ exit 1
+ fi;;
+ esac
+ shift
+done
+
+# makeinfo uses the dirargs, but texi2dvi doesn't.
+commonarg=" $dirargs $commonarg"
+
+# For most of the following, the base name is just $PACKAGE
+base=$PACKAGE
+
+if test -n "$srcfile"; then
+ # but here, we use the basename of $srcfile
+ base=`basename "$srcfile"`
+ case $base in
+ *.txi|*.texi|*.texinfo) base=`echo "$base"|sed 's/\.[texinfo]*$//'`;;
+ esac
+ PACKAGE=$base
+elif test -s "$srcdir/$PACKAGE.texinfo"; then
+ srcfile=$srcdir/$PACKAGE.texinfo
+elif test -s "$srcdir/$PACKAGE.texi"; then
+ srcfile=$srcdir/$PACKAGE.texi
+elif test -s "$srcdir/$PACKAGE.txi"; then
+ srcfile=$srcdir/$PACKAGE.txi
+else
+ echo "$0: cannot find .texinfo or .texi or .txi for $PACKAGE in $srcdir." >&2
+ exit 1
+fi
+
+if test ! -r $GENDOCS_TEMPLATE_DIR/gendocs_template; then
+ echo "$0: cannot read $GENDOCS_TEMPLATE_DIR/gendocs_template." >&2
+ echo "$0: it is available from $templateurl." >&2
+ exit 1
+fi
+
+# Function to return size of $1 in something resembling kilobytes.
+calcsize()
+{
+ size=`ls -ksl $1 | awk '{print $1}'`
+ echo $size
+}
+
+# copy_images OUTDIR HTML-FILE...
+# -------------------------------
+# Copy all the images needed by the HTML-FILEs into OUTDIR.
+# Look for them in . and the -I directories; this is simpler than what
+# makeinfo supports with -I, but hopefully it will suffice.
+copy_images()
+{
+ local odir
+ odir=$1
+ shift
+ $PERL -n -e "
+BEGIN {
+ \$me = '$prog';
+ \$odir = '$odir';
+ @dirs = qw(. $dirs);
+}
+" -e '
+/<img src="(.*?)"/g && ++$need{$1};
+
+END {
+ #print "$me: @{[keys %need]}\n"; # for debugging, show images found.
+ FILE: for my $f (keys %need) {
+ for my $d (@dirs) {
+ if (-f "$d/$f") {
+ use File::Basename;
+ my $dest = dirname ("$odir/$f");
+ #
+ use File::Path;
+ -d $dest || mkpath ($dest)
+ || die "$me: cannot mkdir $dest: $!\n";
+ #
+ use File::Copy;
+ copy ("$d/$f", $dest)
+ || die "$me: cannot copy $d/$f to $dest: $!\n";
+ next FILE;
+ }
+ }
+ die "$me: $ARGV: cannot find image $f\n";
+ }
+}
+' -- "$@" || exit 1
+}
+
+case $outdir in
+ /*) abs_outdir=$outdir;;
+ *) abs_outdir=$srcdir/$outdir;;
+esac
+
+echo "Making output for $srcfile"
+echo " in `pwd`"
+mkdir -p "$outdir/"
+
+#
+if $generate_info; then
+ cmd="$SETLANG $MAKEINFO -o $PACKAGE.info $commonarg $infoarg \"$srcfile\""
+ echo "Generating info... ($cmd)"
+ rm -f $PACKAGE.info* # get rid of any strays
+ eval "$cmd"
+ tar czf "$outdir/$PACKAGE.info.tar.gz" $PACKAGE.info*
+ ls -l "$outdir/$PACKAGE.info.tar.gz"
+ info_tgz_size=`calcsize "$outdir/$PACKAGE.info.tar.gz"`
+ # do not mv the info files, there's no point in having them available
+ # separately on the web.
+fi # end info
+
+#
+if $generate_tex; then
+ cmd="$SETLANG $TEXI2DVI $dirargs $texarg \"$srcfile\""
+ printf "\nGenerating dvi... ($cmd)\n"
+ eval "$cmd"
+ # compress/finish dvi:
+ gzip -f -9 $PACKAGE.dvi
+ dvi_gz_size=`calcsize $PACKAGE.dvi.gz`
+ mv $PACKAGE.dvi.gz "$outdir/"
+ ls -l "$outdir/$PACKAGE.dvi.gz"
+
+ cmd="$SETLANG $TEXI2DVI --pdf $dirargs $texarg \"$srcfile\""
+ printf "\nGenerating pdf... ($cmd)\n"
+ eval "$cmd"
+ pdf_size=`calcsize $PACKAGE.pdf`
+ mv $PACKAGE.pdf "$outdir/"
+ ls -l "$outdir/$PACKAGE.pdf"
+fi # end tex (dvi + pdf)
+
+#
+if $generate_ascii; then
+ opt="-o $PACKAGE.txt --no-split --no-headers $commonarg"
+ cmd="$SETLANG $MAKEINFO $opt \"$srcfile\""
+ printf "\nGenerating ascii... ($cmd)\n"
+ eval "$cmd"
+ ascii_size=`calcsize $PACKAGE.txt`
+ gzip -f -9 -c $PACKAGE.txt >"$outdir/$PACKAGE.txt.gz"
+ ascii_gz_size=`calcsize "$outdir/$PACKAGE.txt.gz"`
+ mv $PACKAGE.txt "$outdir/"
+ ls -l "$outdir/$PACKAGE.txt" "$outdir/$PACKAGE.txt.gz"
+fi
+
+#
+
+if $generate_html; then
+# Split HTML at level $1. Used for texi2html.
+html_split()
+{
+ opt="--split=$1 --node-files $commonarg $htmlarg"
+ cmd="$SETLANG $TEXI2HTML --output $PACKAGE.html $opt \"$srcfile\""
+ printf "\nGenerating html by $1... ($cmd)\n"
+ eval "$cmd"
+ split_html_dir=$PACKAGE.html
+ (
+ cd ${split_html_dir} || exit 1
+ ln -sf ${PACKAGE}.html index.html
+ tar -czf "$abs_outdir/${PACKAGE}.html_$1.tar.gz" -- *.html
+ )
+ eval html_$1_tgz_size=`calcsize "$outdir/${PACKAGE}.html_$1.tar.gz"`
+ rm -f "$outdir"/html_$1/*.html
+ mkdir -p "$outdir/html_$1/"
+ mv ${split_html_dir}/*.html "$outdir/html_$1/"
+ rmdir ${split_html_dir}
+}
+
+if test -z "$use_texi2html"; then
+ opt="--no-split --html -o $PACKAGE.html $commonarg $htmlarg"
+ cmd="$SETLANG $MAKEINFO $opt \"$srcfile\""
+ printf "\nGenerating monolithic html... ($cmd)\n"
+ rm -rf $PACKAGE.html # in case a directory is left over
+ eval "$cmd"
+ html_mono_size=`calcsize $PACKAGE.html`
+ gzip -f -9 -c $PACKAGE.html >"$outdir/$PACKAGE.html.gz"
+ html_mono_gz_size=`calcsize "$outdir/$PACKAGE.html.gz"`
+ copy_images "$outdir/" $PACKAGE.html
+ mv $PACKAGE.html "$outdir/"
+ ls -l "$outdir/$PACKAGE.html" "$outdir/$PACKAGE.html.gz"
+
+ # Before Texinfo 5.0, makeinfo did not accept a --split=HOW option,
+ # it just always split by node. So if we're splitting by node anyway,
+ # leave it out.
+ if test "x$split" = xnode; then
+ split_arg=
+ else
+ split_arg=--split=$split
+ fi
+ #
+ opt="--html -o $PACKAGE.html $split_arg $commonarg $htmlarg"
+ cmd="$SETLANG $MAKEINFO $opt \"$srcfile\""
+ printf "\nGenerating html by $split... ($cmd)\n"
+ eval "$cmd"
+ split_html_dir=$PACKAGE.html
+ copy_images $split_html_dir/ $split_html_dir/*.html
+ (
+ cd $split_html_dir || exit 1
+ tar -czf "$abs_outdir/$PACKAGE.html_$split.tar.gz" -- *
+ )
+ eval \
+ html_${split}_tgz_size=`calcsize "$outdir/$PACKAGE.html_$split.tar.gz"`
+ rm -rf "$outdir/html_$split/"
+ mv $split_html_dir "$outdir/html_$split/"
+ du -s "$outdir/html_$split/"
+ ls -l "$outdir/$PACKAGE.html_$split.tar.gz"
+
+else # use texi2html:
+ opt="--output $PACKAGE.html $commonarg $htmlarg"
+ cmd="$SETLANG $TEXI2HTML $opt \"$srcfile\""
+ printf "\nGenerating monolithic html with texi2html... ($cmd)\n"
+ rm -rf $PACKAGE.html # in case a directory is left over
+ eval "$cmd"
+ html_mono_size=`calcsize $PACKAGE.html`
+ gzip -f -9 -c $PACKAGE.html >"$outdir/$PACKAGE.html.gz"
+ html_mono_gz_size=`calcsize "$outdir/$PACKAGE.html.gz"`
+ mv $PACKAGE.html "$outdir/"
+
+ html_split node
+ html_split chapter
+ html_split section
+fi
+fi # end html
+
+#
+printf "\nMaking .tar.gz for sources...\n"
+d=`dirname $srcfile`
+(
+ cd "$d"
+ srcfiles=`ls -d *.texinfo *.texi *.txi *.eps $source_extra 2>/dev/null` || true
+ tar czfh "$abs_outdir/$PACKAGE.texi.tar.gz" $srcfiles
+ ls -l "$abs_outdir/$PACKAGE.texi.tar.gz"
+)
+texi_tgz_size=`calcsize "$outdir/$PACKAGE.texi.tar.gz"`
+
+#
+# Do everything again through docbook.
+if test -n "$docbook"; then
+ opt="-o - --docbook $commonarg"
+ cmd="$SETLANG $MAKEINFO $opt \"$srcfile\" >${srcdir}/$PACKAGE-db.xml"
+ printf "\nGenerating docbook XML... ($cmd)\n"
+ eval "$cmd"
+ docbook_xml_size=`calcsize $PACKAGE-db.xml`
+ gzip -f -9 -c $PACKAGE-db.xml >"$outdir/$PACKAGE-db.xml.gz"
+ docbook_xml_gz_size=`calcsize "$outdir/$PACKAGE-db.xml.gz"`
+ mv $PACKAGE-db.xml "$outdir/"
+
+ split_html_db_dir=html_node_db
+ opt="$commonarg -o $split_html_db_dir"
+ cmd="$DOCBOOK2HTML $opt \"${outdir}/$PACKAGE-db.xml\""
+ printf "\nGenerating docbook HTML... ($cmd)\n"
+ eval "$cmd"
+ (
+ cd ${split_html_db_dir} || exit 1
+ tar -czf "$abs_outdir/${PACKAGE}.html_node_db.tar.gz" -- *.html
+ )
+ html_node_db_tgz_size=`calcsize "$outdir/${PACKAGE}.html_node_db.tar.gz"`
+ rm -f "$outdir"/html_node_db/*.html
+ mkdir -p "$outdir/html_node_db"
+ mv ${split_html_db_dir}/*.html "$outdir/html_node_db/"
+ rmdir ${split_html_db_dir}
+
+ cmd="$DOCBOOK2TXT \"${outdir}/$PACKAGE-db.xml\""
+ printf "\nGenerating docbook ASCII... ($cmd)\n"
+ eval "$cmd"
+ docbook_ascii_size=`calcsize $PACKAGE-db.txt`
+ mv $PACKAGE-db.txt "$outdir/"
+
+ cmd="$DOCBOOK2PDF \"${outdir}/$PACKAGE-db.xml\""
+ printf "\nGenerating docbook PDF... ($cmd)\n"
+ eval "$cmd"
+ docbook_pdf_size=`calcsize $PACKAGE-db.pdf`
+ mv $PACKAGE-db.pdf "$outdir/"
+fi
+
+#
+printf "\nMaking index.html for $PACKAGE...\n"
+if test -z "$use_texi2html"; then
+ CONDS="/%%IF *HTML_SECTION%%/,/%%ENDIF *HTML_SECTION%%/d;\
+ /%%IF *HTML_CHAPTER%%/,/%%ENDIF *HTML_CHAPTER%%/d"
+else
+ # should take account of --split here.
+ CONDS="/%%ENDIF.*%%/d;/%%IF *HTML_SECTION%%/d;/%%IF *HTML_CHAPTER%%/d"
+fi
+
+curdate=`$SETLANG date '+%B %d, %Y'`
+sed \
+ -e "s!%%TITLE%%!$MANUAL_TITLE!g" \
+ -e "s!%%EMAIL%%!$EMAIL!g" \
+ -e "s!%%PACKAGE%%!$PACKAGE!g" \
+ -e "s!%%DATE%%!$curdate!g" \
+ -e "s!%%HTML_MONO_SIZE%%!$html_mono_size!g" \
+ -e "s!%%HTML_MONO_GZ_SIZE%%!$html_mono_gz_size!g" \
+ -e "s!%%HTML_NODE_TGZ_SIZE%%!$html_node_tgz_size!g" \
+ -e "s!%%HTML_SECTION_TGZ_SIZE%%!$html_section_tgz_size!g" \
+ -e "s!%%HTML_CHAPTER_TGZ_SIZE%%!$html_chapter_tgz_size!g" \
+ -e "s!%%INFO_TGZ_SIZE%%!$info_tgz_size!g" \
+ -e "s!%%DVI_GZ_SIZE%%!$dvi_gz_size!g" \
+ -e "s!%%PDF_SIZE%%!$pdf_size!g" \
+ -e "s!%%ASCII_SIZE%%!$ascii_size!g" \
+ -e "s!%%ASCII_GZ_SIZE%%!$ascii_gz_size!g" \
+ -e "s!%%TEXI_TGZ_SIZE%%!$texi_tgz_size!g" \
+ -e "s!%%DOCBOOK_HTML_NODE_TGZ_SIZE%%!$html_node_db_tgz_size!g" \
+ -e "s!%%DOCBOOK_ASCII_SIZE%%!$docbook_ascii_size!g" \
+ -e "s!%%DOCBOOK_PDF_SIZE%%!$docbook_pdf_size!g" \
+ -e "s!%%DOCBOOK_XML_SIZE%%!$docbook_xml_size!g" \
+ -e "s!%%DOCBOOK_XML_GZ_SIZE%%!$docbook_xml_gz_size!g" \
+ -e "s,%%SCRIPTURL%%,$scripturl,g" \
+ -e "s!%%SCRIPTNAME%%!$prog!g" \
+ -e "$CONDS" \
+$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)
+# time-stamp-start: "scriptversion="
+# time-stamp-format: "%:y-%02m-%02d.%02H"
+# time-stamp-end: "$"
+# End:
diff --git a/build-aux/git-version-gen b/build-aux/git-version-gen
new file mode 100755
index 0000000..bd2c4b6
--- /dev/null
+++ b/build-aux/git-version-gen
@@ -0,0 +1,226 @@
+#!/bin/sh
+# Print a version string.
+scriptversion=2016-05-08.18; # UTC
+
+# Copyright (C) 2007-2016 Free Software Foundation, Inc.
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# This script is derived from GIT-VERSION-GEN from GIT: http://git.or.cz/.
+# 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)
+# - from a non-git-repo directory containing a .tarball-version file, which
+# presumes this script is invoked like "./git-version-gen .tarball-version".
+
+# In order to use intra-version strings in your project, you will need two
+# separate generated version string files:
+#
+# .tarball-version - present only in a distribution tarball, and not in
+# a checked-out repository. Created with contents that were learned at
+# the last time autoconf was run, and used by git-version-gen. Must not
+# be present in either $(srcdir) or $(builddir) for git-version-gen to
+# give accurate answers during normal development with a checked out tree,
+# but must be present in a tarball when there is no version control system.
+# Therefore, it cannot be used in any dependencies. GNUmakefile has
+# hooks to force a reconfigure at distribution time to get the value
+# correct, without penalizing normal development with extra reconfigures.
+#
+# .version - present in a checked-out repository and in a distribution
+# tarball. Usable in dependencies, particularly for files that don't
+# want to depend on config.h but do want to track version changes.
+# Delete this file prior to any autoconf run where you want to rebuild
+# files to pick up a version string change; and leave it stale to
+# minimize rebuild time after unrelated changes to configure sources.
+#
+# As with any generated file in a VC'd directory, you should add
+# /.version to .gitignore, so that you don't accidentally commit it.
+# .tarball-version is never generated in a VC'd directory, so needn't
+# be listed there.
+#
+# Use the following line in your configure.ac, so that $(VERSION) will
+# automatically be up-to-date each time configure is run (and note that
+# since configure.ac no longer includes a version string, Makefile rules
+# should not depend on configure.ac for version updates).
+#
+# AC_INIT([GNU project],
+# m4_esyscmd([build-aux/git-version-gen .tarball-version]),
+# [bug-project@example])
+#
+# Then use the following lines in your Makefile.am, so that .version
+# will be present for dependencies, and so that .version and
+# .tarball-version will exist in distribution tarballs.
+#
+# EXTRA_DIST = $(top_srcdir)/.version
+# BUILT_SOURCES = $(top_srcdir)/.version
+# $(top_srcdir)/.version:
+# echo $(VERSION) > $@-t && mv $@-t $@
+# dist-hook:
+# echo $(VERSION) > $(distdir)/.tarball-version
+
+
+me=$0
+
+version="git-version-gen $scriptversion
+
+Copyright 2011 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."
+
+usage="\
+Usage: $me [OPTION]... \$srcdir/.tarball-version [TAG-NORMALIZATION-SED-SCRIPT]
+Print a version string.
+
+Options:
+
+ --prefix PREFIX prefix of git tags (default 'v')
+ --fallback VERSION
+ fallback version to use if \"git --version\" fails
+
+ --help display this help and exit
+ --version output version information and exit
+
+Running without arguments will suffice in most cases."
+
+prefix=v
+fallback=
+
+while test $# -gt 0; do
+ case $1 in
+ --help) echo "$usage"; exit 0;;
+ --version) echo "$version"; exit 0;;
+ --prefix) shift; prefix=${1?};;
+ --fallback) shift; fallback=${1?};;
+ -*)
+ echo "$0: Unknown option '$1'." >&2
+ echo "$0: Try '--help' for more information." >&2
+ exit 1;;
+ *)
+ if test "x$tarball_version_file" = x; then
+ tarball_version_file="$1"
+ elif test "x$tag_sed_script" = x; then
+ tag_sed_script="$1"
+ else
+ echo "$0: extra non-option argument '$1'." >&2
+ exit 1
+ fi;;
+ esac
+ shift
+done
+
+if test "x$tarball_version_file" = x; then
+ echo "$usage"
+ exit 1
+fi
+
+tag_sed_script="${tag_sed_script:-s/x/x/}"
+
+nl='
+'
+
+# Avoid meddling by environment variable of the same name.
+v=
+v_from_git=
+
+# First see if there is a tarball-only version file.
+# then try "git describe", then default.
+if test -f $tarball_version_file
+then
+ v=`cat $tarball_version_file` || v=
+ case $v in
+ *$nl*) v= ;; # reject multi-line output
+ [0-9]*) ;;
+ *) v= ;;
+ esac
+ test "x$v" = x \
+ && echo "$0: WARNING: $tarball_version_file is missing or damaged" 1>&2
+fi
+
+if test "x$v" != x
+then
+ : # use $v
+# Otherwise, if there is at least one git commit involving the working
+# directory, and "git describe" output looks sensible, use that to
+# derive a version string.
+elif test "`git log -1 --pretty=format:x . 2>&1`" = x \
+ && v=`git describe --abbrev=4 --match="$prefix*" HEAD 2>/dev/null \
+ || git describe --abbrev=4 HEAD 2>/dev/null` \
+ && v=`printf '%s\n' "$v" | sed "$tag_sed_script"` \
+ && case $v in
+ $prefix[0-9]*) ;;
+ *) (exit 1) ;;
+ esac
+then
+ # Is this a new git that lists number of commits since the last
+ # 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 ;;
+ *-*)
+ : 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
+ # of git describe.
+ vtag=`echo "$v" | sed 's/-.*//'`
+ commit_list=`git rev-list "$vtag"..HEAD 2>/dev/null` \
+ || { commit_list=failed;
+ echo "$0: WARNING: git rev-list failed" 1>&2; }
+ numcommits=`echo "$commit_list" | wc -l`
+ v=`echo "$v" | sed "s/\(.*\)-\(.*\)/\1-$numcommits-\2/"`;
+ test "$commit_list" = failed && v=UNKNOWN
+ ;;
+ 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-/'`;
+ v_from_git=1
+elif test "x$fallback" = x || git --version >/dev/null 2>&1; then
+ v=UNKNOWN
+else
+ v=$fallback
+fi
+
+v=`echo "$v" |sed "s/^$prefix//"`
+
+# Test whether to append the "-dirty" suffix only if the version
+# string we're using came from git. I.e., skip the test if it's "UNKNOWN"
+# or if it came from .tarball-version.
+if test "x$v_from_git" != x; then
+ # Don't declare a version "dirty" merely because a time stamp has changed.
+ git update-index --refresh > /dev/null 2>&1
+
+ dirty=`exec 2>/dev/null;git diff-index --name-only HEAD` || dirty=
+ case "$dirty" in
+ '') ;;
+ *) # Append the suffix only if there isn't one already.
+ case $v in
+ *-dirty) ;;
+ *) v="$v-dirty" ;;
+ esac ;;
+ esac
+fi
+
+# Omit the trailing newline, so that m4_esyscmd can use the result directly.
+printf %s "$v"
+
+# Local variables:
+# eval: (add-hook 'write-file-hooks 'time-stamp)
+# time-stamp-start: "scriptversion="
+# time-stamp-format: "%:y-%02m-%02d.%02H"
+# time-stamp-time-zone: "UTC0"
+# time-stamp-end: "; # UTC"
+# End:
diff --git a/build-aux/gitlog-to-changelog b/build-aux/gitlog-to-changelog
new file mode 100755
index 0000000..83bafdf
--- /dev/null
+++ b/build-aux/gitlog-to-changelog
@@ -0,0 +1,499 @@
+eval '(exit $?0)' && eval 'exec perl -wS "$0" "$@"'
+ & eval 'exec perl -wS "$0" $argv:q'
+ if 0;
+# Convert git log output to ChangeLog format.
+
+my $VERSION = '2016-03-22 21:49'; # 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-2016 Free Software Foundation, Inc.
+
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# Written by Jim Meyering
+
+use strict;
+use warnings;
+use Getopt::Long;
+use POSIX qw(strftime);
+
+(my $ME = $0) =~ s|.*/||;
+
+# use File::Coda; # http://meyering.net/code/Coda/
+END {
+ defined fileno STDOUT or return;
+ close STDOUT and return;
+ warn "$ME: failed to close standard output: $!\n";
+ $? ||= 1;
+}
+
+sub usage ($)
+{
+ my ($exit_code) = @_;
+ my $STREAM = ($exit_code == 0 ? *STDOUT : *STDERR);
+ if ($exit_code != 0)
+ {
+ print $STREAM "Try '$ME --help' for more information.\n";
+ }
+ else
+ {
+ print $STREAM <<EOF;
+Usage: $ME [OPTIONS] [ARGS]
+
+Convert git log output to ChangeLog format. If present, any ARGS
+are passed to "git log". To avoid ARGS being parsed as options to
+$ME, they may be preceded by '--'.
+
+OPTIONS:
+
+ --amend=FILE FILE maps from an SHA1 to perl code (i.e., s/old/new/) that
+ makes a change to SHA1's commit log text or metadata.
+ --append-dot append a dot to the first line of each commit message if
+ there is no other punctuation or blank at the end.
+ --no-cluster never cluster commit messages under the same date/author
+ header; the default is to cluster adjacent commit messages
+ if their headers are the same and neither commit message
+ contains multiple paragraphs.
+ --srcdir=DIR the root of the source tree, from which the .git/
+ directory can be derived.
+ --since=DATE convert only the logs since DATE;
+ the default is to convert all log entries.
+ --until=DATE convert only the logs older than DATE.
+ --ignore-matching=PAT ignore commit messages whose first lines match PAT.
+ --ignore-line=PAT ignore lines of commit messages that match PAT.
+ --format=FMT set format string for commit subject and body;
+ see 'man git-log' for the list of format metacharacters;
+ the default is '%s%n%b%n'
+ --strip-tab remove one additional leading TAB from commit message lines.
+ --strip-cherry-pick remove data inserted by "git cherry-pick";
+ this includes the "cherry picked from commit ..." line,
+ and the possible final "Conflicts:" paragraph.
+ --help display this help and exit
+ --version output version information and exit
+
+EXAMPLE:
+
+ $ME --since=2008-01-01 > ChangeLog
+ $ME -- -n 5 foo > last-5-commits-to-branch-foo
+
+SPECIAL SYNTAX:
+
+The following types of strings are interpreted specially when they appear
+at the beginning of a log message line. They are not copied to the output.
+
+ Copyright-paperwork-exempt: Yes
+ Append the "(tiny change)" notation to the usual "date name email"
+ ChangeLog header to mark a change that does not require a copyright
+ assignment.
+ Co-authored-by: Joe User <user\@example.com>
+ List the specified name and email address on a second
+ ChangeLog header, denoting a co-author.
+ Signed-off-by: Joe User <user\@example.com>
+ These lines are simply elided.
+
+In a FILE specified via --amend, comment lines (starting with "#") are ignored.
+FILE must consist of <SHA,CODE+> pairs where SHA is a 40-byte SHA1 (alone on
+a line) referring to a commit in the current project, and CODE refers to one
+or more consecutive lines of Perl code. Pairs must be separated by one or
+more blank line.
+
+Here is sample input for use with --amend=FILE, from coreutils:
+
+3a169f4c5d9159283548178668d2fae6fced3030
+# fix typo in title:
+s/all tile types/all file types/
+
+1379ed974f1fa39b12e2ffab18b3f7a607082202
+# Due to a bug in vc-dwim, I mis-attributed a patch by Paul to myself.
+# Change the author to be Paul. Note the escaped "@":
+s,Jim .*>,Paul Eggert <eggert\\\@cs.ucla.edu>,
+
+EOF
+ }
+ exit $exit_code;
+}
+
+# If the string $S is a well-behaved file name, simply return it.
+# If it contains white space, quotes, etc., quote it, and return the new string.
+sub shell_quote($)
+{
+ my ($s) = @_;
+ if ($s =~ m![^\w+/.,-]!)
+ {
+ # Convert each single quote to '\''
+ $s =~ s/\'/\'\\\'\'/g;
+ # Then single quote the string.
+ $s = "'$s'";
+ }
+ return $s;
+}
+
+sub quoted_cmd(@)
+{
+ return join (' ', map {shell_quote $_} @_);
+}
+
+# Parse file F.
+# Comment lines (starting with "#") are ignored.
+# F must consist of <SHA,CODE+> pairs where SHA is a 40-byte SHA1
+# (alone on a line) referring to a commit in the current project, and
+# CODE refers to one or more consecutive lines of Perl code.
+# Pairs must be separated by one or more blank line.
+sub parse_amend_file($)
+{
+ my ($f) = @_;
+
+ open F, '<', $f
+ or die "$ME: $f: failed to open for reading: $!\n";
+
+ my $fail;
+ my $h = {};
+ my $in_code = 0;
+ my $sha;
+ while (defined (my $line = <F>))
+ {
+ $line =~ /^\#/
+ and next;
+ chomp $line;
+ $line eq ''
+ and $in_code = 0, next;
+
+ if (!$in_code)
+ {
+ $line =~ /^([0-9a-fA-F]{40})$/
+ or (warn "$ME: $f:$.: invalid line; expected an SHA1\n"),
+ $fail = 1, next;
+ $sha = lc $1;
+ $in_code = 1;
+ exists $h->{$sha}
+ and (warn "$ME: $f:$.: duplicate SHA1\n"),
+ $fail = 1, next;
+ }
+ else
+ {
+ $h->{$sha} ||= '';
+ $h->{$sha} .= "$line\n";
+ }
+ }
+ close F;
+
+ $fail
+ and exit 1;
+
+ return $h;
+}
+
+# git_dir_option $SRCDIR
+#
+# From $SRCDIR, the --git-dir option to pass to git (none if $SRCDIR
+# is undef). Return as a list (0 or 1 element).
+sub git_dir_option($)
+{
+ my ($srcdir) = @_;
+ my @res = ();
+ if (defined $srcdir)
+ {
+ my $qdir = shell_quote $srcdir;
+ my $cmd = "cd $qdir && git rev-parse --show-toplevel";
+ my $qcmd = shell_quote $cmd;
+ my $git_dir = qx($cmd);
+ defined $git_dir
+ or die "$ME: cannot run $qcmd: $!\n";
+ $? == 0
+ or die "$ME: $qcmd had unexpected exit code or signal ($?)\n";
+ chomp $git_dir;
+ push @res, "--git-dir=$git_dir/.git";
+ }
+ @res;
+}
+
+{
+ my $since_date;
+ my $until_date;
+ my $format_string = '%s%n%b%n';
+ my $amend_file;
+ my $append_dot = 0;
+ my $cluster = 1;
+ my $ignore_matching;
+ my $ignore_line;
+ my $strip_tab = 0;
+ my $strip_cherry_pick = 0;
+ my $srcdir;
+ GetOptions
+ (
+ help => sub { usage 0 },
+ version => sub { print "$ME version $VERSION\n"; exit },
+ 'since=s' => \$since_date,
+ 'until=s' => \$until_date,
+ 'format=s' => \$format_string,
+ 'amend=s' => \$amend_file,
+ 'append-dot' => \$append_dot,
+ 'cluster!' => \$cluster,
+ 'ignore-matching=s' => \$ignore_matching,
+ 'ignore-line=s' => \$ignore_line,
+ 'strip-tab' => \$strip_tab,
+ 'strip-cherry-pick' => \$strip_cherry_pick,
+ 'srcdir=s' => \$srcdir,
+ ) or usage 1;
+
+ defined $since_date
+ and unshift @ARGV, "--since=$since_date";
+ defined $until_date
+ and unshift @ARGV, "--until=$until_date";
+
+ # This is a hash that maps an SHA1 to perl code (i.e., s/old/new/)
+ # that makes a correction in the log or attribution of that commit.
+ my $amend_code = defined $amend_file ? parse_amend_file $amend_file : {};
+
+ my @cmd = ('git',
+ git_dir_option $srcdir,
+ qw(log --log-size),
+ '--pretty=format:%H:%ct %an <%ae>%n%n'.$format_string, @ARGV);
+ open PIPE, '-|', @cmd
+ or die ("$ME: failed to run '". quoted_cmd (@cmd) ."': $!\n"
+ . "(Is your Git too old? Version 1.5.1 or later is required.)\n");
+
+ my $prev_multi_paragraph;
+ my $prev_date_line = '';
+ my @prev_coauthors = ();
+ my @skipshas = ();
+ while (1)
+ {
+ defined (my $in = <PIPE>)
+ or last;
+ $in =~ /^log size (\d+)$/
+ or die "$ME:$.: Invalid line (expected log size):\n$in";
+ my $log_nbytes = $1;
+
+ my $log;
+ my $n_read = read PIPE, $log, $log_nbytes;
+ $n_read == $log_nbytes
+ or die "$ME:$.: unexpected EOF\n";
+
+ # Extract leading hash.
+ my ($sha, $rest) = split ':', $log, 2;
+ defined $sha
+ or die "$ME:$.: malformed log entry\n";
+ $sha =~ /^[0-9a-fA-F]{40}$/
+ or die "$ME:$.: invalid SHA1: $sha\n";
+
+ my $skipflag = 0;
+ if (@skipshas)
+ {
+ foreach(@skipshas)
+ {
+ if ($sha =~ /^$_/)
+ {
+ $skipflag = $_;
+ last;
+ }
+ }
+ }
+
+ # If this commit's log requires any transformation, do it now.
+ my $code = $amend_code->{$sha};
+ if (defined $code)
+ {
+ eval 'use Safe';
+ my $s = new Safe;
+ # Put the unpreprocessed entry into "$_".
+ $_ = $rest;
+
+ # Let $code operate on it, safely.
+ my $r = $s->reval("$code")
+ or die "$ME:$.:$sha: failed to eval \"$code\":\n$@\n";
+
+ # Note that we've used this entry.
+ delete $amend_code->{$sha};
+
+ # Update $rest upon success.
+ $rest = $_;
+ }
+
+ # Remove lines inserted by "git cherry-pick".
+ if ($strip_cherry_pick)
+ {
+ $rest =~ s/^\s*Conflicts:\n.*//sm;
+ $rest =~ s/^\s*\(cherry picked from commit [\da-f]+\)\n//m;
+ }
+
+ my @line = split /[ \t]*\n/, $rest;
+ my $author_line = shift @line;
+ defined $author_line
+ or die "$ME:$.: unexpected EOF\n";
+ $author_line =~ /^(\d+) (.*>)$/
+ or die "$ME:$.: Invalid line "
+ . "(expected date/author/email):\n$author_line\n";
+
+ # Format 'Copyright-paperwork-exempt: Yes' as a standard ChangeLog
+ # `(tiny change)' annotation.
+ my $tiny = (grep (/^(?:Copyright-paperwork-exempt|Tiny-change):\s+[Yy]es$/, @line)
+ ? ' (tiny change)' : '');
+
+ my $date_line = sprintf "%s %s$tiny\n",
+ strftime ("%Y-%m-%d", localtime ($1)), $2;
+
+ my @coauthors = grep /^Co-authored-by:.*$/, @line;
+ # Omit meta-data lines we've already interpreted.
+ @line = grep !/^(?:Signed-off-by:[ ].*>$
+ |Co-authored-by:[ ]
+ |Copyright-paperwork-exempt:[ ]
+ |Tiny-change:[ ]
+ )/x, @line;
+
+ # Remove leading and trailing blank lines.
+ if (@line)
+ {
+ while ($line[0] =~ /^\s*$/) { shift @line; }
+ while ($line[$#line] =~ /^\s*$/) { pop @line; }
+ }
+
+ # Handle Emacs gitmerge.el "skipped" commits.
+ # Yes, this should be controlled by an option. So sue me.
+ if ( grep /^(; )?Merge from /, @line )
+ {
+ my $found = 0;
+ foreach (@line)
+ {
+ if (grep /^The following commit.*skipped:$/, $_)
+ {
+ $found = 1;
+ ## Reset at each merge to reduce chance of false matches.
+ @skipshas = ();
+ next;
+ }
+ if ($found && $_ =~ /^([0-9a-fA-F]{7,}) [^ ]/)
+ {
+ push ( @skipshas, $1 );
+ }
+ }
+ }
+
+ # Ignore commits that match the --ignore-matching pattern, if specified.
+ if (defined $ignore_matching && @line && $line[0] =~ /$ignore_matching/)
+ {
+ $skipflag = 1;
+ }
+ elsif ($skipflag)
+ {
+ ## Perhaps only warn if a pattern matches more than once?
+ warn "$ME: warning: skipping $sha due to $skipflag\n";
+ }
+
+ if (! $skipflag)
+ {
+ if (defined $ignore_line && @line)
+ {
+ @line = grep ! /$ignore_line/, @line;
+ while ($line[$#line] =~ /^\s*$/) { pop @line; }
+ }
+
+ # Record whether there are two or more paragraphs.
+ my $multi_paragraph = grep /^\s*$/, @line;
+
+ # Format 'Co-authored-by: A U Thor <email@example.com>' lines in
+ # standard multi-author ChangeLog format.
+ for (@coauthors)
+ {
+ s/^Co-authored-by:\s*/\t /;
+ s/\s*</ </;
+
+ /<.*?@.*\..*>/
+ or warn "$ME: warning: missing email address for "
+ . substr ($_, 5) . "\n";
+ }
+
+ # If clustering of commit messages has been disabled, if this header
+ # would be different from the previous date/name/etc. header,
+ # or if this or the previous entry consists of two or more paragraphs,
+ # then print the header.
+ if ( ! $cluster
+ || $date_line ne $prev_date_line
+ || "@coauthors" ne "@prev_coauthors"
+ || $multi_paragraph
+ || $prev_multi_paragraph)
+ {
+ $prev_date_line eq ''
+ or print "\n";
+ print $date_line;
+ @coauthors
+ and print join ("\n", @coauthors), "\n";
+ }
+ $prev_date_line = $date_line;
+ @prev_coauthors = @coauthors;
+ $prev_multi_paragraph = $multi_paragraph;
+
+ # If there were any lines
+ if (@line == 0)
+ {
+ warn "$ME: warning: empty commit message:\n $date_line\n";
+ }
+ else
+ {
+ if ($append_dot)
+ {
+ # If the first line of the message has enough room, then
+ if (length $line[0] < 72)
+ {
+ # append a dot if there is no other punctuation or blank
+ # at the end.
+ $line[0] =~ /[[:punct:]\s]$/
+ or $line[0] .= '.';
+ }
+ }
+
+ # Remove one additional leading TAB from each line.
+ $strip_tab
+ and map { s/^\t// } @line;
+
+ # Prefix each non-empty line with a TAB.
+ @line = map { length $_ ? "\t$_" : '' } @line;
+
+ print "\n", join ("\n", @line), "\n";
+ }
+ }
+
+ defined ($in = <PIPE>)
+ or last;
+ $in ne "\n"
+ and die "$ME:$.: unexpected line:\n$in";
+ }
+
+ close PIPE
+ or die "$ME: error closing pipe from " . quoted_cmd (@cmd) . "\n";
+ # FIXME-someday: include $PROCESS_STATUS in the diagnostic
+
+ # Complain about any unused entry in the --amend=F specified file.
+ my $fail = 0;
+ foreach my $sha (keys %$amend_code)
+ {
+ warn "$ME:$amend_file: unused entry: $sha\n";
+ $fail = 1;
+ }
+
+ exit $fail;
+}
+
+# Local Variables:
+# mode: perl
+# indent-tabs-mode: nil
+# eval: (add-hook 'write-file-hooks 'time-stamp)
+# time-stamp-start: "my $VERSION = '"
+# time-stamp-format: "%:y-%02m-%02d %02H:%02M"
+# time-stamp-time-zone: "UTC0"
+# time-stamp-end: "'; # UTC"
+# End:
diff --git a/build-aux/gnu-web-doc-update b/build-aux/gnu-web-doc-update
new file mode 100755
index 0000000..271e693
--- /dev/null
+++ b/build-aux/gnu-web-doc-update
@@ -0,0 +1,210 @@
+#!/bin/sh
+# Run this after each non-alpha release, to update the web documentation at
+# http://www.gnu.org/software/$pkg/manual/
+
+VERSION=2016-01-12.23; # UTC
+
+# Copyright (C) 2009-2016 Free Software Foundation, Inc.
+
+# This 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/>.
+
+ME=$(basename "$0")
+warn() { printf '%s: %s\n' "$ME" "$*" >&2; }
+die() { warn "$*"; exit 1; }
+
+help()
+{
+ cat <<EOF
+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/
+
+This script assumes you're using git for revision control, and
+requires a .prev-version file as well as a Makefile, from which it
+extracts the version number and package name, respectively. Also, it
+assumes all documentation is in the doc/ sub-directory.
+
+Options:
+ -C, --builddir=DIR location of (configured) Makefile (default: .)
+ -n, --dry-run don't actually commit anything
+ -m, --mirror remove out of date files from document server
+ --help print this help, then exit
+ --version print version number, then exit
+
+Report bugs and patches to <bug-gnulib@gnu.org>.
+EOF
+ exit
+}
+
+version()
+{
+ year=$(echo "$VERSION" | sed 's/[^0-9].*//')
+ 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>
+This is free software: you are free to change and redistribute it.
+There is NO WARRANTY, to the extent permitted by law.
+EOF
+ exit
+}
+
+# find_tool ENVVAR NAMES...
+# -------------------------
+# Search for a required program. Use the value of ENVVAR, if set,
+# otherwise find the first of the NAMES that can be run (i.e.,
+# supports --version). If found, set ENVVAR to the program name,
+# die otherwise.
+#
+# FIXME: code duplication, see also bootstrap.
+find_tool ()
+{
+ find_tool_envvar=$1
+ shift
+ find_tool_names=$@
+ eval "find_tool_res=\$$find_tool_envvar"
+ if test x"$find_tool_res" = x; then
+ for i
+ do
+ if ($i --version </dev/null) >/dev/null 2>&1; then
+ find_tool_res=$i
+ break
+ fi
+ done
+ else
+ find_tool_error_prefix="\$$find_tool_envvar: "
+ fi
+ test x"$find_tool_res" != x \
+ || die "one of these is required: $find_tool_names"
+ ($find_tool_res --version </dev/null) >/dev/null 2>&1 \
+ || die "${find_tool_error_prefix}cannot run $find_tool_res --version"
+ eval "$find_tool_envvar=\$find_tool_res"
+ eval "export $find_tool_envvar"
+}
+
+## ------ ##
+## Main. ##
+## ------ ##
+
+# Requirements: everything required to bootstrap your package, plus
+# these.
+find_tool CVS cvs
+find_tool GIT git
+find_tool RSYNC rsync
+find_tool XARGS gxargs xargs
+
+builddir=.
+dryrun=
+rm_stale='echo'
+while test $# != 0
+do
+ # Handle --option=value by splitting apart and putting back on argv.
+ case $1 in
+ --*=*)
+ opt=$(echo "$1" | sed -e 's/=.*//')
+ val=$(echo "$1" | sed -e 's/[^=]*=//')
+ shift
+ set dummy "$opt" "$val" "$@"; shift
+ ;;
+ esac
+
+ case $1 in
+ --help|--version) ${1#--};;
+ -C|--builddir) shift; builddir=$1; shift ;;
+ -n|--dry-run) dryrun=echo; shift;;
+ -m|--mirror) rm_stale=''; shift;;
+ --*) die "unrecognized option: $1";;
+ *) break;;
+ esac
+done
+
+test $# = 0 \
+ || die "too many arguments"
+
+prev=.prev-version
+version=$(cat $prev) || die "no $prev file?"
+pkg=$(sed -n 's/^PACKAGE = \(.*\)/\1/p' $builddir/Makefile) \
+ || die "no Makefile?"
+tmp_branch=web-doc-$version-$$
+current_branch=$($GIT branch | sed -ne '/^\* /{s///;p;q;}')
+
+cleanup()
+{
+ __st=$?
+ $dryrun rm -rf "$tmp"
+ $GIT checkout "$current_branch"
+ $GIT submodule update --recursive
+ $GIT branch -d $tmp_branch
+ exit $__st
+}
+trap cleanup 0
+trap 'exit $?' 1 2 13 15
+
+# We must build using sources for which --version reports the
+# just-released version number, not some string like 7.6.18-20761.
+# That version string propagates into all documentation.
+set -e
+$GIT checkout -b $tmp_branch v$version
+$GIT submodule update --recursive
+./bootstrap
+srcdir=$(pwd)
+cd "$builddir"
+builddir=$(pwd)
+ ./config.status --recheck
+ ./config.status
+ make
+ make web-manual
+cd "$srcdir"
+set +e
+
+tmp=$(mktemp -d web-doc-update.XXXXXX) || exit 1
+( cd $tmp \
+ && $CVS -d $USER@cvs.sv.gnu.org:/webcvs/$pkg co $pkg )
+$RSYNC -avP "$builddir"/doc/manual/ $tmp/$pkg/manual
+
+(
+ cd $tmp/$pkg/manual
+
+ # Add all the files. This is simpler than trying to add only the
+ # new ones because of new directories
+ # First add non empty dirs individually
+ find . -name CVS -prune -o -type d \! -empty -print \
+ | $XARGS -n1 --no-run-if-empty -- $dryrun $CVS add -ko
+ # Now add all files
+ find . -name CVS -prune -o -type f -print \
+ | $XARGS --no-run-if-empty -- $dryrun $CVS add -ko
+
+ # Report/Remove stale files
+ # excluding doc server specific files like CVS/* and .symlinks
+ if test -n "$rm_stale"; then
+ echo 'Consider the --mirror option if all of the manual is generated,' >&2
+ echo 'which will run `cvs remove` to remove stale files.' >&2
+ fi
+ { find . \( -name CVS -o -type f -name '.*' \) -prune -o -type f -print
+ (cd "$builddir"/doc/manual/ && find . -type f -print | sed p)
+ } | sort | uniq -u \
+ | $XARGS --no-run-if-empty -- ${rm_stale:-$dryrun} $CVS remove -f
+
+ $dryrun $CVS ci -m $version
+)
+
+# Local variables:
+# eval: (add-hook 'write-file-hooks 'time-stamp)
+# time-stamp-start: "VERSION="
+# time-stamp-format: "%:y-%02m-%02d.%02H"
+# time-stamp-time-zone: "UTC0"
+# time-stamp-end: "; # UTC"
+# End:
diff --git a/build-aux/gnupload b/build-aux/gnupload
new file mode 100755
index 0000000..8d0299d
--- /dev/null
+++ b/build-aux/gnupload
@@ -0,0 +1,440 @@
+#!/bin/sh
+# Sign files and upload them.
+
+scriptversion=2016-01-11.22; # UTC
+
+# Copyright (C) 2004-2016 Free Software Foundation, Inc.
+#
+# This 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 <http://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.
+# Please send bug reports and feature requests to bug-gnulib@gnu.org.
+
+set -e
+
+GPG='gpg --batch --no-tty'
+conffile=.gnuploadrc
+to=
+dry_run=false
+replace=
+symlink_files=
+delete_files=
+delete_symlinks=
+collect_var=
+dbg=
+nl='
+'
+
+usage="Usage: $0 [OPTION]... [CMD] FILE... [[CMD] FILE...]
+
+Sign all FILES, and process them at the destinations specified with --to.
+If CMD is not given, it defaults to uploading. See examples below.
+
+Commands:
+ --delete delete FILES from destination
+ --symlink create symbolic links
+ --rmsymlink remove symbolic links
+ -- treat the remaining arguments as files to upload
+
+Options:
+ --to DEST specify a destination DEST for FILES
+ (multiple --to options are allowed)
+ --user NAME sign with key NAME
+ --replace allow replacements of existing files
+ --symlink-regex[=EXPR] use sed script EXPR to compute symbolic link names
+ --dry-run do nothing, show what would have been done
+ (including the constructed directive file)
+ --version output version information and exit
+ --help print this help text and exit
+
+If --symlink-regex is given without EXPR, then the link target name
+is created by replacing the version information with '-latest', e.g.:
+ foo-1.3.4.tar.gz -> foo-latest.tar.gz
+
+Recognized destinations are:
+ alpha.gnu.org:DIRECTORY
+ savannah.gnu.org:DIRECTORY
+ savannah.nongnu.org:DIRECTORY
+ ftp.gnu.org:DIRECTORY
+ build directive files and upload files by FTP
+ download.gnu.org.ua:{alpha|ftp}/DIRECTORY
+ build directive files and upload files by SFTP
+ [user@]host:DIRECTORY upload files with scp
+
+Options and commands are applied in order. If the file $conffile exists
+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>
+gives some further background.
+
+Examples:
+1. Upload foobar-1.0.tar.gz to ftp.gnu.org:
+ gnupload --to ftp.gnu.org:foobar foobar-1.0.tar.gz
+
+2. Upload foobar-1.0.tar.gz and foobar-1.0.tar.xz to ftp.gnu.org:
+ gnupload --to ftp.gnu.org:foobar foobar-1.0.tar.gz foobar-1.0.tar.xz
+
+3. Same as above, and also create symbolic links to foobar-latest.tar.*:
+ gnupload --to ftp.gnu.org:foobar \\
+ --symlink-regex \\
+ foobar-1.0.tar.gz foobar-1.0.tar.xz
+
+4. Upload foobar-0.9.90.tar.gz to two sites:
+ gnupload --to alpha.gnu.org:foobar \\
+ --to sources.redhat.com:~ftp/pub/foobar \\
+ foobar-0.9.90.tar.gz
+
+5. Delete oopsbar-0.9.91.tar.gz and upload foobar-0.9.91.tar.gz
+ (the -- terminates the list of files to delete):
+ gnupload --to alpha.gnu.org:foobar \\
+ --to sources.redhat.com:~ftp/pub/foobar \\
+ --delete oopsbar-0.9.91.tar.gz \\
+ -- foobar-0.9.91.tar.gz
+
+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.
+
+Send patches and bug reports to <bug-gnulib@gnu.org>."
+
+# Read local configuration file
+if test -r "$conffile"; then
+ echo "$0: Reading configuration file $conffile"
+ conf=`sed 's/#.*$//;/^$/d' "$conffile" | tr "\015$nl" ' '`
+ eval set x "$conf \"\$@\""
+ shift
+fi
+
+while test -n "$1"; do
+ case $1 in
+ -*)
+ collect_var=
+ case $1 in
+ --help)
+ echo "$usage"
+ exit $?
+ ;;
+ --to)
+ if test -z "$2"; then
+ echo "$0: Missing argument for --to" 1>&2
+ exit 1
+ elif echo "$2" | grep 'ftp-upload\.gnu\.org' >/dev/null; then
+ echo "$0: Use ftp.gnu.org:PKGNAME or alpha.gnu.org:PKGNAME" >&2
+ echo "$0: for the destination, not ftp-upload.gnu.org (which" >&2
+ echo "$0: is used for direct ftp uploads, not with gnupload)." >&2
+ echo "$0: See --help and its examples if need be." >&2
+ exit 1
+ else
+ to="$to $2"
+ shift
+ fi
+ ;;
+ --user)
+ if test -z "$2"; then
+ echo "$0: Missing argument for --user" 1>&2
+ exit 1
+ else
+ GPG="$GPG --local-user $2"
+ shift
+ fi
+ ;;
+ --delete)
+ collect_var=delete_files
+ ;;
+ --replace)
+ replace="replace: true"
+ ;;
+ --rmsymlink)
+ collect_var=delete_symlinks
+ ;;
+ --symlink-regex=*)
+ symlink_expr=`expr "$1" : '[^=]*=\(.*\)'`
+ ;;
+ --symlink-regex)
+ symlink_expr='s|-[0-9][0-9\.]*\(-[0-9][0-9]*\)\{0,1\}\.|-latest.|'
+ ;;
+ --symlink)
+ collect_var=symlink_files
+ ;;
+ --dry-run|-n)
+ dry_run=:
+ ;;
+ --version)
+ echo "gnupload $scriptversion"
+ exit $?
+ ;;
+ --)
+ shift
+ break
+ ;;
+ -*)
+ echo "$0: Unknown option '$1', try '$0 --help'" 1>&2
+ exit 1
+ ;;
+ esac
+ ;;
+ *)
+ if test -z "$collect_var"; then
+ break
+ else
+ eval "$collect_var=\"\$$collect_var $1\""
+ fi
+ ;;
+ esac
+ shift
+done
+
+dprint()
+{
+ echo "Running $* ..."
+}
+
+if $dry_run; then
+ dbg=dprint
+fi
+
+if test -z "$to"; then
+ echo "$0: Missing destination sites" >&2
+ exit 1
+fi
+
+if test -n "$symlink_files"; then
+ x=`echo "$symlink_files" | sed 's/[^ ]//g;s/ //g'`
+ if test -n "$x"; then
+ echo "$0: Odd number of symlink arguments" >&2
+ exit 1
+ fi
+fi
+
+if test $# = 0; then
+ if test -z "${symlink_files}${delete_files}${delete_symlinks}"; then
+ echo "$0: No file to upload" 1>&2
+ exit 1
+ fi
+else
+ # Make sure all files exist. We don't want to ask
+ # for the passphrase if the script will fail.
+ for file
+ do
+ if test ! -f $file; then
+ echo "$0: Cannot find '$file'" 1>&2
+ exit 1
+ elif test -n "$symlink_expr"; then
+ linkname=`echo $file | sed "$symlink_expr"`
+ if test -z "$linkname"; then
+ echo "$0: symlink expression produces empty results" >&2
+ exit 1
+ elif test "$linkname" = $file; then
+ echo "$0: symlink expression does not alter file name" >&2
+ exit 1
+ fi
+ fi
+ done
+fi
+
+# Make sure passphrase is not exported in the environment.
+unset passphrase
+unset passphrase_fd_0
+GNUPGHOME=${GNUPGHOME:-$HOME/.gnupg}
+
+# Reset PATH to be sure that echo is a built-in. We will later use
+# 'echo $passphrase' to output the passphrase, so it is important that
+# it is a built-in (third-party programs tend to appear in 'ps'
+# listings with their arguments...).
+# Remember this script runs with 'set -e', so if echo is not built-in
+# it will exit now.
+if $dry_run || grep -q "^use-agent" $GNUPGHOME/gpg.conf; then :; else
+ PATH=/empty echo -n "Enter GPG passphrase: "
+ stty -echo
+ read -r passphrase
+ stty echo
+ echo
+ passphrase_fd_0="--passphrase-fd 0"
+fi
+
+if test $# -ne 0; then
+ for file
+ do
+ echo "Signing $file ..."
+ rm -f $file.sig
+ echo "$passphrase" | $dbg $GPG $passphrase_fd_0 -ba -o $file.sig $file
+ done
+fi
+
+
+# mkdirective DESTDIR BASE FILE STMT
+# Arguments: See upload, below
+mkdirective ()
+{
+ stmt="$4"
+ if test -n "$3"; then
+ stmt="
+filename: $3$stmt"
+ fi
+
+ cat >${2}.directive<<EOF
+version: 1.2
+directory: $1
+comment: gnupload v. $scriptversion$stmt
+EOF
+ if $dry_run; then
+ echo "File ${2}.directive:"
+ cat ${2}.directive
+ echo "File ${2}.directive:" | sed 's/./-/g'
+ fi
+}
+
+mksymlink ()
+{
+ while test $# -ne 0
+ do
+ echo "symlink: $1 $2"
+ shift
+ shift
+ done
+}
+
+# upload DEST DESTDIR BASE FILE STMT FILES
+# Arguments:
+# DEST Destination site;
+# DESTDIR Destination directory;
+# BASE Base name for the directive file;
+# FILE Name of the file to distribute (may be empty);
+# STMT Additional statements for the directive file;
+# FILES List of files to upload.
+upload ()
+{
+ dest=$1
+ destdir=$2
+ base=$3
+ file=$4
+ stmt=$5
+ files=$6
+
+ rm -f $base.directive $base.directive.asc
+ case $dest in
+ alpha.gnu.org:*)
+ mkdirective "$destdir" "$base" "$file" "$stmt"
+ echo "$passphrase" | $dbg $GPG $passphrase_fd_0 --clearsign $base.directive
+ $dbg ncftpput ftp-upload.gnu.org /incoming/alpha $files $base.directive.asc
+ ;;
+ ftp.gnu.org:*)
+ mkdirective "$destdir" "$base" "$file" "$stmt"
+ echo "$passphrase" | $dbg $GPG $passphrase_fd_0 --clearsign $base.directive
+ $dbg ncftpput ftp-upload.gnu.org /incoming/ftp $files $base.directive.asc
+ ;;
+ savannah.gnu.org:*)
+ if test -z "$files"; then
+ echo "$0: warning: standalone directives not applicable for $dest" >&2
+ fi
+ $dbg ncftpput savannah.gnu.org /incoming/savannah/$destdir $files
+ ;;
+ savannah.nongnu.org:*)
+ if test -z "$files"; then
+ echo "$0: warning: standalone directives not applicable for $dest" >&2
+ fi
+ $dbg ncftpput savannah.nongnu.org /incoming/savannah/$destdir $files
+ ;;
+ download.gnu.org.ua:alpha/*|download.gnu.org.ua:ftp/*)
+ destdir_p1=`echo "$destdir" | sed 's,^[^/]*/,,'`
+ destdir_topdir=`echo "$destdir" | sed 's,/.*,,'`
+ mkdirective "$destdir_p1" "$base" "$file" "$stmt"
+ echo "$passphrase" | $dbg $GPG $passphrase_fd_0 --clearsign $base.directive
+ for f in $files $base.directive.asc
+ do
+ echo put $f
+ done | $dbg sftp -b - puszcza.gnu.org.ua:/incoming/$destdir_topdir
+ ;;
+ /*)
+ dest_host=`echo "$dest" | sed 's,:.*,,'`
+ mkdirective "$destdir" "$base" "$file" "$stmt"
+ echo "$passphrase" | $dbg $GPG $passphrase_fd_0 --clearsign $base.directive
+ $dbg cp $files $base.directive.asc $dest_host
+ ;;
+ *)
+ if test -z "$files"; then
+ echo "$0: warning: standalone directives not applicable for $dest" >&2
+ fi
+ $dbg scp $files $dest
+ ;;
+ esac
+ rm -f $base.directive $base.directive.asc
+}
+
+#####
+# Process any standalone directives
+stmt=
+if test -n "$symlink_files"; then
+ stmt="$stmt
+`mksymlink $symlink_files`"
+fi
+
+for file in $delete_files
+do
+ stmt="$stmt
+archive: $file"
+done
+
+for file in $delete_symlinks
+do
+ stmt="$stmt
+rmsymlink: $file"
+done
+
+if test -n "$stmt"; then
+ for dest in $to
+ do
+ destdir=`echo $dest | sed 's/[^:]*://'`
+ upload "$dest" "$destdir" "`hostname`-$$" "" "$stmt"
+ done
+fi
+
+# Process actual uploads
+for dest in $to
+do
+ for file
+ do
+ echo "Uploading $file to $dest ..."
+ stmt=
+ #
+ # allowing file replacement is all or nothing.
+ if test -n "$replace"; then stmt="$stmt
+$replace"
+ fi
+ #
+ files="$file $file.sig"
+ destdir=`echo $dest | sed 's/[^:]*://'`
+ if test -n "$symlink_expr"; then
+ linkname=`echo $file | sed "$symlink_expr"`
+ stmt="$stmt
+symlink: $file $linkname
+symlink: $file.sig $linkname.sig"
+ fi
+ upload "$dest" "$destdir" "$file" "$file" "$stmt" "$files"
+ done
+done
+
+exit 0
+
+# Local variables:
+# eval: (add-hook 'write-file-hooks 'time-stamp)
+# time-stamp-start: "scriptversion="
+# time-stamp-format: "%:y-%02m-%02d.%02H"
+# time-stamp-time-zone: "UTC0"
+# time-stamp-end: "; # UTC"
+# End:
diff --git a/build-aux/help2man b/build-aux/help2man
index af57f41..262b947 100755
--- a/build-aux/help2man
+++ b/build-aux/help2man
@@ -1,8 +1,7 @@
#!/usr/bin/env perl
# Generate a short man page from --help and --version output.
-# Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002 Free Software
-# Foundation, Inc.
+# Copyright (C) 1997-2016 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -527,7 +526,7 @@ for (@pre, (grep ! /^($filter)$/o, @include), @post)
{
my $quote = /\W/ ? '"' : '';
print ".SH $quote$_$quote\n";
-
+
for ($include{$_})
{
# Replace leading dot, apostrophe and backslash tokens.
diff --git a/build-aux/install-sh b/build-aux/install-sh
index 377bb86..0360b79 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=2011-11-20.07; # UTC
+scriptversion=2016-01-11.22; # UTC
# This originates from X11R5 (mit/util/scripts/install.sh), which was
# later released in X11R6 (xc/config/util/install.sh) with the
@@ -41,19 +41,15 @@ scriptversion=2011-11-20.07; # UTC
# This script is compatible with the BSD install script, but was written
# from scratch.
+tab=' '
nl='
'
-IFS=" "" $nl"
+IFS=" $tab$nl"
-# set DOITPROG to echo to test this script
+# Set DOITPROG to "echo" to test this script.
-# Don't use :- since 4.3BSD and earlier shells don't like it.
doit=${DOITPROG-}
-if test -z "$doit"; then
- doit_exec=exec
-else
- doit_exec=$doit
-fi
+doit_exec=${doit:-exec}
# Put in absolute file names if you don't have them in your path;
# or use environment vars.
@@ -68,17 +64,6 @@ mvprog=${MVPROG-mv}
rmprog=${RMPROG-rm}
stripprog=${STRIPPROG-strip}
-posix_glob='?'
-initialize_posix_glob='
- test "$posix_glob" != "?" || {
- if (set -f) 2>/dev/null; then
- posix_glob=
- else
- posix_glob=:
- fi
- }
-'
-
posix_mkdir=
# Desired mode of installed file.
@@ -97,7 +82,7 @@ dir_arg=
dst_arg=
copy_on_change=false
-no_target_directory=
+is_target_a_directory=possibly
usage="\
Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE
@@ -137,46 +122,57 @@ while test $# -ne 0; do
-d) dir_arg=true;;
-g) chgrpcmd="$chgrpprog $2"
- shift;;
+ shift;;
--help) echo "$usage"; exit $?;;
-m) mode=$2
- case $mode in
- *' '* | *' '* | *'
-'* | *'*'* | *'?'* | *'['*)
- echo "$0: invalid mode: $mode" >&2
- exit 1;;
- esac
- shift;;
+ case $mode in
+ *' '* | *"$tab"* | *"$nl"* | *'*'* | *'?'* | *'['*)
+ echo "$0: invalid mode: $mode" >&2
+ exit 1;;
+ esac
+ shift;;
-o) chowncmd="$chownprog $2"
- shift;;
+ shift;;
-s) stripcmd=$stripprog;;
- -t) dst_arg=$2
- # Protect names problematic for 'test' and other utilities.
- case $dst_arg in
- -* | [=\(\)!]) dst_arg=./$dst_arg;;
- esac
- shift;;
+ -t)
+ is_target_a_directory=always
+ dst_arg=$2
+ # Protect names problematic for 'test' and other utilities.
+ case $dst_arg in
+ -* | [=\(\)!]) dst_arg=./$dst_arg;;
+ esac
+ shift;;
- -T) no_target_directory=true;;
+ -T) is_target_a_directory=never;;
--version) echo "$0 $scriptversion"; exit $?;;
- --) shift
- break;;
+ --) shift
+ break;;
- -*) echo "$0: invalid option: $1" >&2
- exit 1;;
+ -*) echo "$0: invalid option: $1" >&2
+ exit 1;;
*) break;;
esac
shift
done
+# We allow the use of options -d and -T together, by making -d
+# take the precedence; this is for compatibility with GNU install.
+
+if test -n "$dir_arg"; then
+ if test -n "$dst_arg"; then
+ echo "$0: target directory not allowed when installing a directory." >&2
+ exit 1
+ fi
+fi
+
if test $# -ne 0 && test -z "$dir_arg$dst_arg"; then
# When -d is used, all remaining arguments are directories to create.
# When -t is used, the destination is already specified.
@@ -208,6 +204,15 @@ if test $# -eq 0; then
fi
if test -z "$dir_arg"; then
+ if test $# -gt 1 || test "$is_target_a_directory" = always; then
+ if test ! -d "$dst_arg"; then
+ echo "$0: $dst_arg: Is not a directory." >&2
+ exit 1
+ fi
+ fi
+fi
+
+if test -z "$dir_arg"; then
do_exit='(exit $ret); exit $ret'
trap "ret=129; $do_exit" 1
trap "ret=130; $do_exit" 2
@@ -223,16 +228,16 @@ if test -z "$dir_arg"; then
*[0-7])
if test -z "$stripcmd"; then
- u_plus_rw=
+ u_plus_rw=
else
- u_plus_rw='% 200'
+ u_plus_rw='% 200'
fi
cp_umask=`expr '(' 777 - $mode % 1000 ')' $u_plus_rw`;;
*)
if test -z "$stripcmd"; then
- u_plus_rw=
+ u_plus_rw=
else
- u_plus_rw=,u+rw
+ u_plus_rw=,u+rw
fi
cp_umask=$mode$u_plus_rw;;
esac
@@ -269,41 +274,15 @@ do
# If destination is a directory, append the input filename; won't work
# if double slashes aren't ignored.
if test -d "$dst"; then
- if test -n "$no_target_directory"; then
- echo "$0: $dst_arg: Is a directory" >&2
- exit 1
+ 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"`
dstdir_status=0
else
- # Prefer dirname, but fall back on a substitute if dirname fails.
- dstdir=`
- (dirname "$dst") 2>/dev/null ||
- expr X"$dst" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
- X"$dst" : 'X\(//\)[^/]' \| \
- X"$dst" : 'X\(//\)$' \| \
- X"$dst" : 'X\(/\)' \| . 2>/dev/null ||
- echo X"$dst" |
- sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
- s//\1/
- q
- }
- /^X\(\/\/\)[^/].*/{
- s//\1/
- q
- }
- /^X\(\/\/\)$/{
- s//\1/
- q
- }
- /^X\(\/\).*/{
- s//\1/
- q
- }
- s/.*/./; q'
- `
-
+ dstdir=`dirname "$dst"`
test -d "$dstdir"
dstdir_status=$?
fi
@@ -314,74 +293,74 @@ do
if test $dstdir_status != 0; then
case $posix_mkdir in
'')
- # Create intermediate dirs using mode 755 as modified by the umask.
- # This is like FreeBSD 'install' as of 1997-10-28.
- umask=`umask`
- case $stripcmd.$umask in
- # Optimize common cases.
- *[2367][2367]) mkdir_umask=$umask;;
- .*0[02][02] | .[02][02] | .[02]) mkdir_umask=22;;
-
- *[0-7])
- mkdir_umask=`expr $umask + 22 \
- - $umask % 100 % 40 + $umask % 20 \
- - $umask % 10 % 4 + $umask % 2
- `;;
- *) mkdir_umask=$umask,go-w;;
- esac
-
- # With -d, create the new directory with the user-specified mode.
- # Otherwise, rely on $mkdir_umask.
- if test -n "$dir_arg"; then
- mkdir_mode=-m$mode
- else
- mkdir_mode=
- fi
-
- posix_mkdir=false
- case $umask in
- *[123567][0-7][0-7])
- # POSIX mkdir -p sets u+wx bits regardless of umask, which
- # is incompatible with FreeBSD 'install' when (umask & 300) != 0.
- ;;
- *)
- tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$
- trap 'ret=$?; rmdir "$tmpdir/d" "$tmpdir" 2>/dev/null; exit $ret' 0
-
- if (umask $mkdir_umask &&
- exec $mkdirprog $mkdir_mode -p -- "$tmpdir/d") >/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"`
- 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"`
- test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1"
- }
- }
- then posix_mkdir=:
- fi
- rmdir "$tmpdir/d" "$tmpdir"
- else
- # Remove any dirs left behind by ancient mkdir implementations.
- rmdir ./$mkdir_mode ./-p ./-- 2>/dev/null
- fi
- trap '' 0;;
- esac;;
+ # Create intermediate dirs using mode 755 as modified by the umask.
+ # This is like FreeBSD 'install' as of 1997-10-28.
+ umask=`umask`
+ case $stripcmd.$umask in
+ # Optimize common cases.
+ *[2367][2367]) mkdir_umask=$umask;;
+ .*0[02][02] | .[02][02] | .[02]) mkdir_umask=22;;
+
+ *[0-7])
+ mkdir_umask=`expr $umask + 22 \
+ - $umask % 100 % 40 + $umask % 20 \
+ - $umask % 10 % 4 + $umask % 2
+ `;;
+ *) mkdir_umask=$umask,go-w;;
+ esac
+
+ # With -d, create the new directory with the user-specified mode.
+ # Otherwise, rely on $mkdir_umask.
+ if test -n "$dir_arg"; then
+ mkdir_mode=-m$mode
+ else
+ mkdir_mode=
+ fi
+
+ posix_mkdir=false
+ case $umask in
+ *[123567][0-7][0-7])
+ # POSIX mkdir -p sets u+wx bits regardless of umask, which
+ # is incompatible with FreeBSD 'install' when (umask & 300) != 0.
+ ;;
+ *)
+ tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$
+ trap 'ret=$?; rmdir "$tmpdir/d" "$tmpdir" 2>/dev/null; exit $ret' 0
+
+ if (umask $mkdir_umask &&
+ exec $mkdirprog $mkdir_mode -p -- "$tmpdir/d") >/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"`
+ 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"`
+ test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1"
+ }
+ }
+ then posix_mkdir=:
+ fi
+ rmdir "$tmpdir/d" "$tmpdir"
+ else
+ # Remove any dirs left behind by ancient mkdir implementations.
+ rmdir ./$mkdir_mode ./-p ./-- 2>/dev/null
+ fi
+ trap '' 0;;
+ esac;;
esac
if
$posix_mkdir && (
- umask $mkdir_umask &&
- $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir"
+ umask $mkdir_umask &&
+ $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir"
)
then :
else
@@ -391,53 +370,51 @@ do
# directory the slow way, step by step, checking for races as we go.
case $dstdir in
- /*) prefix='/';;
- [-=\(\)!]*) prefix='./';;
- *) prefix='';;
+ /*) prefix='/';;
+ [-=\(\)!]*) prefix='./';;
+ *) prefix='';;
esac
- eval "$initialize_posix_glob"
-
oIFS=$IFS
IFS=/
- $posix_glob set -f
+ set -f
set fnord $dstdir
shift
- $posix_glob set +f
+ set +f
IFS=$oIFS
prefixes=
for d
do
- test X"$d" = X && continue
-
- prefix=$prefix$d
- if test -d "$prefix"; then
- prefixes=
- else
- if $posix_mkdir; then
- (umask=$mkdir_umask &&
- $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break
- # Don't fail if two instances are running concurrently.
- test -d "$prefix" || exit 1
- else
- case $prefix in
- *\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;;
- *) qprefix=$prefix;;
- esac
- prefixes="$prefixes '$qprefix'"
- fi
- fi
- prefix=$prefix/
+ test X"$d" = X && continue
+
+ prefix=$prefix$d
+ if test -d "$prefix"; then
+ prefixes=
+ else
+ if $posix_mkdir; then
+ (umask=$mkdir_umask &&
+ $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break
+ # Don't fail if two instances are running concurrently.
+ test -d "$prefix" || exit 1
+ else
+ case $prefix in
+ *\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;;
+ *) qprefix=$prefix;;
+ esac
+ prefixes="$prefixes '$qprefix'"
+ fi
+ fi
+ prefix=$prefix/
done
if test -n "$prefixes"; then
- # Don't fail if two instances are running concurrently.
- (umask $mkdir_umask &&
- eval "\$doit_exec \$mkdirprog $prefixes") ||
- test -d "$dstdir" || exit 1
- obsolete_mkdir_used=true
+ # Don't fail if two instances are running concurrently.
+ (umask $mkdir_umask &&
+ eval "\$doit_exec \$mkdirprog $prefixes") ||
+ test -d "$dstdir" || exit 1
+ obsolete_mkdir_used=true
fi
fi
fi
@@ -472,15 +449,12 @@ do
# If -C, don't bother to copy if it wouldn't change the file.
if $copy_on_change &&
- old=`LC_ALL=C ls -dlL "$dst" 2>/dev/null` &&
- new=`LC_ALL=C ls -dlL "$dsttmp" 2>/dev/null` &&
-
- eval "$initialize_posix_glob" &&
- $posix_glob set -f &&
+ old=`LC_ALL=C ls -dlL "$dst" 2>/dev/null` &&
+ new=`LC_ALL=C ls -dlL "$dsttmp" 2>/dev/null` &&
+ set -f &&
set X $old && old=:$2:$4:$5:$6 &&
set X $new && new=:$2:$4:$5:$6 &&
- $posix_glob set +f &&
-
+ set +f &&
test "$old" = "$new" &&
$cmpprog "$dst" "$dsttmp" >/dev/null 2>&1
then
@@ -493,24 +467,24 @@ do
# to itself, or perhaps because mv is so ancient that it does not
# support -f.
{
- # Now remove or move aside any old file at destination location.
- # We try this two ways since rm can't unlink itself on some
- # systems and the destination file might be busy for other
- # reasons. In this case, the final cleanup might fail but the new
- # file should still install successfully.
- {
- test ! -f "$dst" ||
- $doit $rmcmd -f "$dst" 2>/dev/null ||
- { $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null &&
- { $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; }
- } ||
- { echo "$0: cannot unlink or rename $dst" >&2
- (exit 1); exit 1
- }
- } &&
-
- # Now rename the file to the real destination.
- $doit $mvcmd "$dsttmp" "$dst"
+ # Now remove or move aside any old file at destination location.
+ # We try this two ways since rm can't unlink itself on some
+ # systems and the destination file might be busy for other
+ # reasons. In this case, the final cleanup might fail but the new
+ # file should still install successfully.
+ {
+ test ! -f "$dst" ||
+ $doit $rmcmd -f "$dst" 2>/dev/null ||
+ { $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null &&
+ { $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; }
+ } ||
+ { echo "$0: cannot unlink or rename $dst" >&2
+ (exit 1); exit 1
+ }
+ } &&
+
+ # Now rename the file to the real destination.
+ $doit $mvcmd "$dsttmp" "$dst"
}
fi || exit 1
@@ -522,6 +496,6 @@ done
# eval: (add-hook 'write-file-hooks 'time-stamp)
# time-stamp-start: "scriptversion="
# time-stamp-format: "%:y-%02m-%02d.%02H"
-# time-stamp-time-zone: "UTC"
+# time-stamp-time-zone: "UTC0"
# time-stamp-end: "; # UTC"
# End:
diff --git a/build-aux/mdate-sh b/build-aux/mdate-sh
index 4614441..6022eff 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=2010-08-21.06; # UTC
+scriptversion=2016-01-11.22; # UTC
-# Copyright (C) 1995-2012 Free Software Foundation, Inc.
+# Copyright (C) 1995-2015 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
@@ -219,6 +219,6 @@ echo $day $month $year
# eval: (add-hook 'write-file-hooks 'time-stamp)
# time-stamp-start: "scriptversion="
# time-stamp-format: "%:y-%02m-%02d.%02H"
-# time-stamp-time-zone: "UTC"
+# time-stamp-time-zone: "UTC0"
# time-stamp-end: "; # UTC"
# End:
diff --git a/build-aux/missing b/build-aux/missing
index 9a55648..594918c 100755
--- a/build-aux/missing
+++ b/build-aux/missing
@@ -1,10 +1,10 @@
#! /bin/sh
-# Common stub for a few missing GNU programs while installing.
+# Common wrapper for a few potentially missing GNU programs.
-scriptversion=2012-01-06.18; # UTC
+scriptversion=2016-01-11.22; # UTC
-# Copyright (C) 1996-2012 Free Software Foundation, Inc.
-# Originally by Fran,cois Pinard <pinard@iro.umontreal.ca>, 1996.
+# Copyright (C) 1996-2015 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
# it under the terms of the GNU General Public License as published by
@@ -29,61 +29,33 @@ if test $# -eq 0; then
exit 1
fi
-run=:
-sed_output='s/.* --output[ =]\([^ ]*\).*/\1/p'
-sed_minuso='s/.* -o \([^ ]*\).*/\1/p'
-
-# In the cases where this matters, 'missing' is being run in the
-# srcdir already.
-if test -f configure.ac; then
- configure_ac=configure.ac
-else
- configure_ac=configure.in
-fi
+case $1 in
-msg="missing on your system"
+ --is-lightweight)
+ # Used by our autoconf macros to check whether the available missing
+ # script is modern enough.
+ exit 0
+ ;;
-case $1 in
---run)
- # Try to run requested program, and just exit if it succeeds.
- run=
- shift
- "$@" && exit 0
- # Exit code 63 means version mismatch. This often happens
- # when the user try to use an ancient version of a tool on
- # a file that requires a minimum version. In this case we
- # we should proceed has if the program had been absent, or
- # if --run hadn't been passed.
- if test $? = 63; then
- run=:
- msg="probably too old"
- fi
- ;;
+ --run)
+ # Back-compat with the calling convention used by older automake.
+ shift
+ ;;
-h|--h|--he|--hel|--help)
echo "\
$0 [OPTION]... PROGRAM [ARGUMENT]...
-Handle 'PROGRAM [ARGUMENT]...' for when PROGRAM is missing, or return an
-error status if there is no known handling for PROGRAM.
+Run 'PROGRAM [ARGUMENT]...', returning a proper advice when this fails due
+to PROGRAM being missing or too old.
Options:
-h, --help display this help and exit
-v, --version output version information and exit
- --run try to run the given command, and emulate it if it fails
Supported PROGRAM values:
- aclocal touch file 'aclocal.m4'
- autoconf touch file 'configure'
- autoheader touch file 'config.h.in'
- autom4te touch the output file, or create a stub one
- automake touch all 'Makefile.in' files
- bison create 'y.tab.[ch]', if possible, from existing .[ch]
- flex create 'lex.yy.c', if possible, from existing .c
- help2man touch the output file
- lex create 'lex.yy.c', if possible, from existing .c
- makeinfo touch the output file
- yacc create 'y.tab.[ch]', if possible, from existing .[ch]
+ aclocal autoconf autoheader autom4te automake makeinfo
+ bison yacc flex lex help2man
Version suffixes to PROGRAM as well as the prefixes 'gnu-', 'gnu', and
'g' are ignored when checking the name.
@@ -98,233 +70,146 @@ Send bug reports to <bug-automake@gnu.org>."
;;
-*)
- echo 1>&2 "$0: Unknown '$1' option"
+ echo 1>&2 "$0: unknown '$1' option"
echo 1>&2 "Try '$0 --help' for more information"
exit 1
;;
esac
-# normalize program name to check for.
-program=`echo "$1" | sed '
- s/^gnu-//; t
- s/^gnu//; t
- s/^g//; t'`
-
-# Now exit if we have it, but it failed. Also exit now if we
-# don't have it and --version was passed (most likely to detect
-# the program). This is about non-GNU programs, so use $1 not
-# $program.
-case $1 in
- lex*|yacc*)
- # Not GNU programs, they don't have --version.
- ;;
-
- *)
- if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
- # We have it, but it failed.
- exit 1
- elif test "x$2" = "x--version" || test "x$2" = "x--help"; then
- # Could not run --version or --help. This is probably someone
- # running '$TOOL --version' or '$TOOL --help' to check whether
- # $TOOL exists and not knowing $TOOL uses missing.
- exit 1
- fi
- ;;
-esac
-
-# If it does not exist, or fails to run (possibly an outdated version),
-# try to emulate it.
-case $program in
- aclocal*)
- echo 1>&2 "\
-WARNING: '$1' is $msg. You should only need it if
- you modified 'acinclude.m4' or '${configure_ac}'. You might want
- to install the Automake and Perl packages. Grab them from
- any GNU archive site."
- touch aclocal.m4
- ;;
-
- autoconf*)
- echo 1>&2 "\
-WARNING: '$1' is $msg. You should only need it if
- you modified '${configure_ac}'. You might want to install the
- Autoconf and GNU m4 packages. Grab them from any GNU
- archive site."
- touch configure
- ;;
-
- autoheader*)
- echo 1>&2 "\
-WARNING: '$1' is $msg. You should only need it if
- you modified 'acconfig.h' or '${configure_ac}'. You might want
- to install the Autoconf and GNU m4 packages. Grab them
- from any GNU archive site."
- files=`sed -n 's/^[ ]*A[CM]_CONFIG_HEADER(\([^)]*\)).*/\1/p' ${configure_ac}`
- test -z "$files" && files="config.h"
- touch_files=
- for f in $files; do
- case $f in
- *:*) touch_files="$touch_files "`echo "$f" |
- sed -e 's/^[^:]*://' -e 's/:.*//'`;;
- *) touch_files="$touch_files $f.in";;
- esac
- done
- touch $touch_files
- ;;
-
- automake*)
- echo 1>&2 "\
-WARNING: '$1' is $msg. You should only need it if
- you modified 'Makefile.am', 'acinclude.m4' or '${configure_ac}'.
- You might want to install the Automake and Perl packages.
- Grab them from any GNU archive site."
- find . -type f -name Makefile.am -print |
- sed 's/\.am$/.in/' |
- while read f; do touch "$f"; done
- ;;
-
- autom4te*)
- echo 1>&2 "\
-WARNING: '$1' is needed, but is $msg.
- You might have modified some files without having the
- proper tools for further handling them.
- You can get '$1' as part of Autoconf from any GNU
- archive site."
-
- file=`echo "$*" | sed -n "$sed_output"`
- test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"`
- if test -f "$file"; then
- touch $file
- else
- test -z "$file" || exec >$file
- echo "#! /bin/sh"
- echo "# Created by GNU Automake missing as a replacement of"
- echo "# $ $@"
- echo "exit 0"
- chmod +x $file
- exit 1
- fi
- ;;
-
- bison*|yacc*)
- echo 1>&2 "\
-WARNING: '$1' $msg. You should only need it if
- you modified a '.y' file. You may need the Bison package
- in order for those modifications to take effect. You can get
- Bison from any GNU archive site."
- rm -f y.tab.c y.tab.h
- if test $# -ne 1; then
- eval LASTARG=\${$#}
- case $LASTARG in
- *.y)
- SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'`
- if test -f "$SRCFILE"; then
- cp "$SRCFILE" y.tab.c
- fi
- SRCFILE=`echo "$LASTARG" | sed 's/y$/h/'`
- if test -f "$SRCFILE"; then
- cp "$SRCFILE" y.tab.h
- fi
- ;;
- esac
- fi
- if test ! -f y.tab.h; then
- echo >y.tab.h
- fi
- if test ! -f y.tab.c; then
- echo 'main() { return 0; }' >y.tab.c
- fi
- ;;
-
- lex*|flex*)
- echo 1>&2 "\
-WARNING: '$1' is $msg. You should only need it if
- you modified a '.l' file. You may need the Flex package
- in order for those modifications to take effect. You can get
- Flex from any GNU archive site."
- rm -f lex.yy.c
- if test $# -ne 1; then
- eval LASTARG=\${$#}
- case $LASTARG in
- *.l)
- SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'`
- if test -f "$SRCFILE"; then
- cp "$SRCFILE" lex.yy.c
- fi
- ;;
- esac
- fi
- if test ! -f lex.yy.c; then
- echo 'main() { return 0; }' >lex.yy.c
- fi
- ;;
-
- help2man*)
- echo 1>&2 "\
-WARNING: '$1' is $msg. You should only need it if
- you modified a dependency of a manual page. You may need the
- Help2man package in order for those modifications to take
- effect. You can get Help2man from any GNU archive site."
-
- file=`echo "$*" | sed -n "$sed_output"`
- test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"`
- if test -f "$file"; then
- touch $file
- else
- test -z "$file" || exec >$file
- echo ".ab help2man is required to generate this page"
- exit $?
- fi
- ;;
-
- makeinfo*)
- echo 1>&2 "\
-WARNING: '$1' is $msg. You should only need it if
- you modified a '.texi' or '.texinfo' file, or any other file
- indirectly affecting the aspect of the manual. The spurious
- call might also be the consequence of using a buggy 'make' (AIX,
- DU, IRIX). You might want to install the Texinfo package or
- the GNU make package. Grab either from any GNU archive site."
- # The file to touch is that specified with -o ...
- file=`echo "$*" | sed -n "$sed_output"`
- test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"`
- if test -z "$file"; then
- # ... or it is the one specified with @setfilename ...
- infile=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'`
- file=`sed -n '
- /^@setfilename/{
- s/.* \([^ ]*\) *$/\1/
- p
- q
- }' $infile`
- # ... or it is derived from the source name (dir/f.texi becomes f.info)
- test -z "$file" && file=`echo "$infile" | sed 's,.*/,,;s,.[^.]*$,,'`.info
- fi
- # If the file does not exist, the user really needs makeinfo;
- # let's fail without touching anything.
- test -f $file || exit 1
- touch $file
- ;;
+# Run the given program, remember its exit status.
+"$@"; st=$?
+
+# If it succeeded, we are done.
+test $st -eq 0 && exit 0
+
+# Also exit now if we it failed (or wasn't found), and '--version' was
+# passed; such an option is passed most likely to detect whether the
+# program is present and works.
+case $2 in --version|--help) exit $st;; esac
+
+# Exit code 63 means version mismatch. This often happens when the user
+# tries to use an ancient version of a tool on a file that requires a
+# minimum version.
+if test $st -eq 63; then
+ msg="probably too old"
+elif test $st -eq 127; then
+ # Program was missing.
+ msg="missing on your system"
+else
+ # Program was found and executed, but failed. Give up.
+ exit $st
+fi
- *)
- echo 1>&2 "\
-WARNING: '$1' is needed, and is $msg.
- You might have modified some files without having the
- proper tools for further handling them. Check the 'README' file,
- it often tells you about the needed prerequisites for installing
- this package. You may also peek at any GNU archive site, in case
- some other package would contain this missing '$1' program."
- exit 1
+perl_URL=http://www.perl.org/
+flex_URL=http://flex.sourceforge.net/
+gnu_software_URL=http://www.gnu.org/software
+
+program_details ()
+{
+ case $1 in
+ aclocal|automake)
+ echo "The '$1' program is part of the GNU Automake package:"
+ echo "<$gnu_software_URL/automake>"
+ echo "It also requires GNU Autoconf, GNU m4 and Perl in order to run:"
+ echo "<$gnu_software_URL/autoconf>"
+ echo "<$gnu_software_URL/m4/>"
+ echo "<$perl_URL>"
+ ;;
+ autoconf|autom4te|autoheader)
+ echo "The '$1' program is part of the GNU Autoconf package:"
+ echo "<$gnu_software_URL/autoconf/>"
+ echo "It also requires GNU m4 and Perl in order to run:"
+ echo "<$gnu_software_URL/m4/>"
+ echo "<$perl_URL>"
+ ;;
+ esac
+}
+
+give_advice ()
+{
+ # Normalize program name to check for.
+ normalized_program=`echo "$1" | sed '
+ s/^gnu-//; t
+ s/^gnu//; t
+ s/^g//; t'`
+
+ printf '%s\n' "'$1' is $msg."
+
+ configure_deps="'configure.ac' or m4 files included by 'configure.ac'"
+ case $normalized_program in
+ autoconf*)
+ echo "You should only need it if you modified 'configure.ac',"
+ echo "or m4 files included by it."
+ program_details 'autoconf'
+ ;;
+ autoheader*)
+ echo "You should only need it if you modified 'acconfig.h' or"
+ echo "$configure_deps."
+ program_details 'autoheader'
+ ;;
+ automake*)
+ echo "You should only need it if you modified 'Makefile.am' or"
+ echo "$configure_deps."
+ program_details 'automake'
+ ;;
+ aclocal*)
+ echo "You should only need it if you modified 'acinclude.m4' or"
+ echo "$configure_deps."
+ program_details 'aclocal'
+ ;;
+ autom4te*)
+ echo "You might have modified some maintainer files that require"
+ echo "the 'autom4te' program to be rebuilt."
+ program_details 'autom4te'
+ ;;
+ bison*|yacc*)
+ echo "You should only need it if you modified a '.y' file."
+ echo "You may want to install the GNU Bison package:"
+ echo "<$gnu_software_URL/bison/>"
+ ;;
+ lex*|flex*)
+ echo "You should only need it if you modified a '.l' file."
+ echo "You may want to install the Fast Lexical Analyzer package:"
+ echo "<$flex_URL>"
+ ;;
+ help2man*)
+ echo "You should only need it if you modified a dependency" \
+ "of a man page."
+ echo "You may want to install the GNU Help2man package:"
+ echo "<$gnu_software_URL/help2man/>"
;;
-esac
-
-exit 0
+ makeinfo*)
+ echo "You should only need it if you modified a '.texi' file, or"
+ echo "any other file indirectly affecting the aspect of the manual."
+ echo "You might want to install the Texinfo package:"
+ echo "<$gnu_software_URL/texinfo/>"
+ echo "The spurious makeinfo call might also be the consequence of"
+ echo "using a buggy 'make' (AIX, DU, IRIX), in which case you might"
+ echo "want to install GNU make:"
+ echo "<$gnu_software_URL/make/>"
+ ;;
+ *)
+ echo "You might have modified some files without having the proper"
+ echo "tools for further handling them. Check the 'README' file, it"
+ echo "often tells you about the needed prerequisites for installing"
+ echo "this package. You may also peek at any GNU archive site, in"
+ echo "case some other package contains this missing '$1' program."
+ ;;
+ esac
+}
+
+give_advice "$1" | sed -e '1s/^/WARNING: /' \
+ -e '2,$s/^/ /' >&2
+
+# Propagate the correct exit status (expected to be 127 for a program
+# not found, 63 for a program that failed due to version mismatch).
+exit $st
# Local variables:
# eval: (add-hook 'write-file-hooks 'time-stamp)
# time-stamp-start: "scriptversion="
# time-stamp-format: "%:y-%02m-%02d.%02H"
-# time-stamp-time-zone: "UTC"
+# time-stamp-time-zone: "UTC0"
# time-stamp-end: "; # UTC"
# End:
diff --git a/build-aux/prefix-gnulib-mk b/build-aux/prefix-gnulib-mk
new file mode 100755
index 0000000..62caca8
--- /dev/null
+++ b/build-aux/prefix-gnulib-mk
@@ -0,0 +1,238 @@
+eval '(exit $?0)' && eval 'exec perl -wS "$0" "$@"'
+ & eval 'exec perl -wS "$0" $argv:q'
+ if 0;
+
+use strict;
+use IO::File;
+use Getopt::Long;
+use File::Basename; # for dirname
+
+my $VERSION = '2012-01-21 17:13'; # UTC
+(my $ME = $0) =~ s|.*/||;
+
+my $prefix;
+my $lib_name;
+
+sub usage ($)
+{
+ my ($exit_code) = @_;
+ my $STREAM = ($exit_code == 0 ? *STDOUT : *STDERR);
+ if ($exit_code != 0)
+ {
+ print $STREAM "Try '$ME --help' for more information.\n";
+ }
+ else
+ {
+ print $STREAM <<EOF;
+Usage: $ME --lib-name=NAME FILE
+ or: $ME [--help|--version]
+Rewrite a gnulib-tool-generated FILE like lib/gnulib.mk to work with
+automake's subdir-objects.
+
+OPTIONS:
+
+This option must be specified:
+
+ --lib-name=NAME library name, often "lib\$project"
+
+The following are optional:
+
+ --help display this help and exit
+ --version output version information and exit
+
+EOF
+ }
+ exit $exit_code;
+}
+
+# contents ($FILE_NAME)
+# ---------------------
+sub contents ($)
+{
+ my ($file) = @_;
+ local $/; # Turn on slurp-mode.
+ my $f = new IO::File "< $file" or die "$file";
+ my $contents = $f->getline or die "$file";
+ $f->close;
+ return $contents;
+}
+
+# prefix_word ($WORD)
+# -------------------
+# Do not prefix special words such as variable dereferences. Also,
+# "Makefile" is really "Makefile", since precisely there is no
+# lib/Makefile.
+sub prefix_word ($)
+{
+ local ($_) = @_;
+ $_ = $prefix . $_
+ unless (/^-/ || m{^\$\(\w+\)} || $_ eq "Makefile" || $_ eq '\\'
+ || $_ eq '@ALLOCA@');
+ return $_;
+}
+
+
+# prefix_words ($TEXT)
+# --------------------
+sub prefix_words ($)
+{
+ local ($_) = @_;
+ s{(\S+)}{prefix_word($1)}gem;
+ return $_;
+}
+
+
+# prefix_assignment ($LHS-AND-ASSIGN-OP, $RHS)
+# --------------------------------------------
+sub prefix_assignment ($$)
+{
+ my ($lhs_and_assign_op, $rhs) = @_;
+ my $res;
+
+ # Some variables are initialized by gnulib.mk, and we don't want
+ # that. Change '=' to '+='.
+ if ($lhs_and_assign_op =~ /^(GPERF|V_GPERF.*) =$/)
+ {
+ # Do not change the RHS, which specifies the GPERF program.
+ }
+ elsif ($lhs_and_assign_op =~
+ /^(SUBDIRS|EXTRA_DIST|BUILT_SOURCES|SUFFIXES|MOSTLYCLEANFILES
+ |CLEANFILES|DISTCLEANFILES|MAINTAINERCLEANFILES|AM_CFLAGS
+ |AM_CPPFLAGS|AM_GNU_GETTEXT)\ =/x)
+ {
+ $lhs_and_assign_op =~ s/=/+=/;
+ }
+ # We don't want to inherit gnulib's AUTOMAKE_OPTIONS, comment them.
+ elsif ($lhs_and_assign_op =~ /^AUTOMAKE_OPTIONS =/)
+ {
+ $lhs_and_assign_op =~ s/^/# /;
+ }
+ elsif ($lhs_and_assign_op =~ /^SUFFIXES /)
+ {
+ # Elide any SUFFIXES assignment or concatenation.
+ $lhs_and_assign_op =~ s/^/# /;
+ }
+ # The words are (probably) paths to files in lib/: prefix them.
+ else
+ {
+ $rhs = prefix_words($rhs)
+ }
+
+ # Variables which name depend on the location: libbison_a_SOURCES =>
+ # lib_libbison_a_SOURCES.
+ $lhs_and_assign_op =~ s/($lib_name)/lib_$1/g;
+
+ return $lhs_and_assign_op . $rhs;
+}
+
+# prefix $CONTENTS
+# ----------------
+# $CONTENTS is a Makefile content. Post-process it so that each file-name
+# is prefixed with $prefix (e.g., "lib/").
+#
+# Relies heavily on the regularity of the file generated by gnulib-tool.
+sub prefix ($)
+{
+ # Work on $_.
+ local ($_) = @_;
+
+ # Prefix all the occurrence of files in rules. If there is nothing
+ # after in the :, it's probably a phony target, or a suffix rule.
+ # Don't touch it.
+ s{^([-\w+/]+\.[-\w.]+ *: *\S.*)$}
+ {prefix_words($1)}gem;
+
+ # Prefix files in variables.
+ s{^([\w.]+\s*\+?=)(.*)$}
+ {prefix_assignment($1, $2)}gem;
+
+ # These three guys escape all the other regular rules.
+ # Require the leading white space to avoid inserting the prefix
+ # on a line like this:
+ # charset_alias = $(DESTDIR)$(libdir)/charset.alias
+ # With $(libdir), it would be erroneous.
+ s{(\s)(charset\.alias|ref-add\.sed|ref-del\.sed)}{$1$prefix$2}g;
+ # Unfortunately, as a result we sometimes have lib/lib.
+ s{($prefix){2}}{$1}g;
+
+ # $(srcdir)/ is actually $(top_srcdir)/$prefix/.
+ # The trailing slash is required to avoid matching this rule:
+ # test '$(srcdir)' = . || rm -f $(top_builddir)/GNUmakefile
+ s{\$\(srcdir\)/}{\$(top_srcdir)/$prefix}g;
+
+ # Sometimes, t-$@ is used instead of $@-t, which, of course, does
+ # not work when we have a $@ with a directory in it.
+ s{t-\$\@}{\$\@-t}g;
+
+ # Some AC_SUBST patterns remain and would better be Make macros.
+ s{\@(MKDIR_P)\@}{\$($1)}g;
+
+ # Adjust paths in mkdir.
+ s{(\$\(MKDIR_P\))\s*(\w+)}{$1 $prefix$2}g;
+
+ return $_;
+}
+
+# process ($IN)
+# -------------
+sub process ($)
+{
+ my ($file) = @_;
+ my ($bak) = "$file.bak";
+ rename ($file, $bak) or die "$ME: rename $file $bak failed: $!\n";
+ my $contents = contents ($bak);
+ $contents = prefix ($contents);
+ my $out = new IO::File(">$file")
+ or die "$ME: $file: failed to open for writing: $!\n";
+ print $out $contents;
+}
+
+{
+ GetOptions
+ (
+ 'lib-name=s' => \$lib_name,
+ help => sub { usage 0 },
+ version => sub { print "$ME version $VERSION\n"; exit },
+ ) or usage 1;
+
+ my $fail = 0;
+ defined $lib_name
+ or (warn "$ME: no library name; use --lib-name=NAME\n"), $fail = 1;
+
+ # There must be exactly one argument.
+ @ARGV == 0
+ and (warn "$ME: missing FILE argument\n"), $fail = 1;
+ 1 < @ARGV
+ and (warn "$ME: too many arguments:\n", join ("\n", @ARGV), "\n"),
+ $fail = 1;
+ $fail
+ and usage 1;
+
+ my $file = $ARGV[0];
+ $prefix = (dirname $file) . '/';
+ warn "prefix=$prefix\n";
+
+ process $file;
+}
+
+### Setup "GNU" style for perl-mode and cperl-mode.
+## Local Variables:
+## perl-indent-level: 2
+## perl-continued-statement-offset: 2
+## perl-continued-brace-offset: 0
+## perl-brace-offset: 0
+## perl-brace-imaginary-offset: 0
+## perl-label-offset: -2
+## cperl-indent-level: 2
+## cperl-brace-offset: 0
+## cperl-continued-brace-offset: 0
+## cperl-label-offset: -2
+## cperl-extra-newline-before-brace: t
+## cperl-merge-trailing-else: nil
+## cperl-continued-statement-offset: 2
+## eval: (add-hook 'write-file-hooks 'time-stamp)
+## time-stamp-start: "my $VERSION = '"
+## time-stamp-format: "%:y-%02m-%02d %02H:%02M"
+## time-stamp-time-zone: "UTC0"
+## time-stamp-end: "'; # UTC"
+## End:
diff --git a/build-aux/snippet/arg-nonnull.h b/build-aux/snippet/arg-nonnull.h
index 7a62981..584649f 100644
--- a/build-aux/snippet/arg-nonnull.h
+++ b/build-aux/snippet/arg-nonnull.h
@@ -1,7 +1,5 @@
-/* -*- buffer-read-only: t -*- vi: set ro: */
-/* DO NOT EDIT! GENERATED AUTOMATICALLY! */
/* A C macro for declaring that specific arguments must not be NULL.
- Copyright (C) 2009-2012 Free Software Foundation, Inc.
+ Copyright (C) 2009-2016 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify it
under the terms of the GNU General Public License as published
diff --git a/build-aux/snippet/c++defs.h b/build-aux/snippet/c++defs.h
index 745ae87..2b819da 100644
--- a/build-aux/snippet/c++defs.h
+++ b/build-aux/snippet/c++defs.h
@@ -1,7 +1,5 @@
-/* -*- buffer-read-only: t -*- vi: set ro: */
-/* DO NOT EDIT! GENERATED AUTOMATICALLY! */
/* C++ compatible function declaration macros.
- Copyright (C) 2010-2012 Free Software Foundation, Inc.
+ Copyright (C) 2010-2016 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify it
under the terms of the GNU General Public License as published
@@ -19,6 +17,15 @@
#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
@@ -113,14 +120,25 @@
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 \
{ \
- rettype (*const func) parameters = ::rpl_func; \
+ 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
@@ -137,8 +155,15 @@
# define _GL_CXXALIAS_RPL_CAST_1(func,rpl_func,rettype,parameters) \
namespace GNULIB_NAMESPACE \
{ \
- rettype (*const func) parameters = \
- reinterpret_cast<rettype(*)parameters>(::rpl_func); \
+ 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
@@ -152,19 +177,24 @@
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
- /* If we were to write
- rettype (*const func) parameters = ::func;
- like above in _GL_CXXALIAS_RPL_1, the compiler could optimize calls
- better (remove an indirection through a 'static' pointer variable),
- but then the _GL_CXXALIASWARN macro below would cause a warning not only
- for uses of ::func but also for uses of GNULIB_NAMESPACE::func. */
-# define _GL_CXXALIAS_SYS(func,rettype,parameters) \
- namespace GNULIB_NAMESPACE \
- { \
- static rettype (*func) parameters = ::func; \
- } \
+# 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) \
@@ -180,8 +210,15 @@
# define _GL_CXXALIAS_SYS_CAST(func,rettype,parameters) \
namespace GNULIB_NAMESPACE \
{ \
- static rettype (*func) parameters = \
- reinterpret_cast<rettype(*)parameters>(::func); \
+ 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
@@ -204,9 +241,15 @@
# define _GL_CXXALIAS_SYS_CAST2(func,rettype,parameters,rettype2,parameters2) \
namespace GNULIB_NAMESPACE \
{ \
- static rettype (*func) parameters = \
- reinterpret_cast<rettype(*)parameters>( \
- (rettype2(*)parameters2)(::func)); \
+ 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
diff --git a/build-aux/snippet/unused-parameter.h b/build-aux/snippet/unused-parameter.h
index 6b60482..843db76 100644
--- a/build-aux/snippet/unused-parameter.h
+++ b/build-aux/snippet/unused-parameter.h
@@ -1,7 +1,5 @@
-/* -*- buffer-read-only: t -*- vi: set ro: */
-/* DO NOT EDIT! GENERATED AUTOMATICALLY! */
/* A C macro for declaring that specific function parameters are not used.
- Copyright (C) 2008-2012 Free Software Foundation, Inc.
+ Copyright (C) 2008-2016 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify it
under the terms of the GNU General Public License as published
diff --git a/build-aux/snippet/warn-on-use.h b/build-aux/snippet/warn-on-use.h
index ab857bf..2948b47 100644
--- a/build-aux/snippet/warn-on-use.h
+++ b/build-aux/snippet/warn-on-use.h
@@ -1,7 +1,5 @@
-/* -*- buffer-read-only: t -*- vi: set ro: */
-/* DO NOT EDIT! GENERATED AUTOMATICALLY! */
/* A C macro for emitting warnings if a function is used.
- Copyright (C) 2010-2012 Free Software Foundation, Inc.
+ Copyright (C) 2010-2016 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify it
under the terms of the GNU General Public License as published
diff --git a/build-aux/test-driver b/build-aux/test-driver
new file mode 100755
index 0000000..d7eac82
--- /dev/null
+++ b/build-aux/test-driver
@@ -0,0 +1,148 @@
+#! /bin/sh
+# test-driver - basic testsuite driver script.
+
+scriptversion=2016-01-11.22; # UTC
+
+# Copyright (C) 2011-2015 Free Software Foundation, Inc.
+#
+# This 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 2, 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/>.
+
+# As a special exception to the GNU General Public License, if you
+# distribute this file as part of a program that contains a
+# configuration script generated by Autoconf, you may include it under
+# the same distribution terms that you use for the rest of that program.
+
+# This file is maintained in Automake, please report
+# bugs to <bug-automake@gnu.org> or send patches to
+# <automake-patches@gnu.org>.
+
+# Make unconditional expansion of undefined variables an error. This
+# helps a lot in preventing typo-related bugs.
+set -u
+
+usage_error ()
+{
+ echo "$0: $*" >&2
+ print_usage >&2
+ exit 2
+}
+
+print_usage ()
+{
+ cat <<END
+Usage:
+ test-driver --test-name=NAME --log-file=PATH --trs-file=PATH
+ [--expect-failure={yes|no}] [--color-tests={yes|no}]
+ [--enable-hard-errors={yes|no}] [--]
+ TEST-SCRIPT [TEST-SCRIPT-ARGUMENTS]
+The '--test-name', '--log-file' and '--trs-file' options are mandatory.
+END
+}
+
+test_name= # Used for reporting.
+log_file= # Where to save the output of the test script.
+trs_file= # Where to save the metadata of the test run.
+expect_failure=no
+color_tests=no
+enable_hard_errors=yes
+while test $# -gt 0; do
+ case $1 in
+ --help) print_usage; exit $?;;
+ --version) echo "test-driver $scriptversion"; exit $?;;
+ --test-name) test_name=$2; shift;;
+ --log-file) log_file=$2; shift;;
+ --trs-file) trs_file=$2; shift;;
+ --color-tests) color_tests=$2; shift;;
+ --expect-failure) expect_failure=$2; shift;;
+ --enable-hard-errors) enable_hard_errors=$2; shift;;
+ --) shift; break;;
+ -*) usage_error "invalid option: '$1'";;
+ *) break;;
+ esac
+ shift
+done
+
+missing_opts=
+test x"$test_name" = x && missing_opts="$missing_opts --test-name"
+test x"$log_file" = x && missing_opts="$missing_opts --log-file"
+test x"$trs_file" = x && missing_opts="$missing_opts --trs-file"
+if test x"$missing_opts" != x; then
+ usage_error "the following mandatory options are missing:$missing_opts"
+fi
+
+if test $# -eq 0; then
+ usage_error "missing argument"
+fi
+
+if test $color_tests = yes; then
+ # Keep this in sync with 'lib/am/check.am:$(am__tty_colors)'.
+ red='' # Red.
+ grn='' # Green.
+ lgn='' # Light green.
+ blu='' # Blue.
+ mgn='' # Magenta.
+ std='' # No color.
+else
+ red= grn= lgn= blu= mgn= std=
+fi
+
+do_exit='rm -f $log_file $trs_file; (exit $st); exit $st'
+trap "st=129; $do_exit" 1
+trap "st=130; $do_exit" 2
+trap "st=141; $do_exit" 13
+trap "st=143; $do_exit" 15
+
+# Test script is run here.
+"$@" >$log_file 2>&1
+estatus=$?
+
+if test $enable_hard_errors = no && test $estatus -eq 99; then
+ tweaked_estatus=1
+else
+ tweaked_estatus=$estatus
+fi
+
+case $tweaked_estatus:$expect_failure in
+ 0:yes) col=$red res=XPASS recheck=yes gcopy=yes;;
+ 0:*) col=$grn res=PASS recheck=no gcopy=no;;
+ 77:*) col=$blu res=SKIP recheck=no gcopy=yes;;
+ 99:*) col=$mgn res=ERROR recheck=yes gcopy=yes;;
+ *:yes) col=$lgn res=XFAIL recheck=no gcopy=yes;;
+ *:*) col=$red res=FAIL recheck=yes gcopy=yes;;
+esac
+
+# Report the test outcome and exit status in the logs, so that one can
+# know whether the test passed or failed simply by looking at the '.log'
+# file, without the need of also peaking into the corresponding '.trs'
+# file (automake bug#11814).
+echo "$res $test_name (exit status: $estatus)" >>$log_file
+
+# Report outcome to console.
+echo "${col}${res}${std}: $test_name"
+
+# Register the test result, and other relevant metadata.
+echo ":test-result: $res" > $trs_file
+echo ":global-test-result: $res" >> $trs_file
+echo ":recheck: $recheck" >> $trs_file
+echo ":copy-in-global-log: $gcopy" >> $trs_file
+
+# Local Variables:
+# mode: shell-script
+# sh-indentation: 2
+# eval: (add-hook 'write-file-hooks 'time-stamp)
+# time-stamp-start: "scriptversion="
+# time-stamp-format: "%:y-%02m-%02d.%02H"
+# time-stamp-time-zone: "UTC0"
+# time-stamp-end: "; # UTC"
+# End:
diff --git a/build-aux/texi2dvi b/build-aux/texi2dvi
deleted file mode 100755
index 0286bd7..0000000
--- a/build-aux/texi2dvi
+++ /dev/null
@@ -1,656 +0,0 @@
-#! /bin/sh
-# texi2dvi --- produce DVI (or PDF) files from Texinfo (or LaTeX) sources.
-#
-# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2001,
-# 2002, 2003 Free Software Foundation, Inc.
-#
-# This 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 2, 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, you can either send email to this
-# program's maintainer or write to: The Free Software Foundation,
-# Inc.; 51 Franklin Street, Fifth Floor; Boston, MA 02110-1301, USA.
-#
-# Original author: Noah Friedman <friedman@gnu.org>.
-#
-# Please send bug reports, etc. to bug-texinfo@gnu.org.
-# If possible, please send a copy of the output of the script called with
-# the `--debug' option when making a bug report.
-
-program=`echo $0 | sed -e 's!.*/!!'`
-version="texi2dvi (GNU Texinfo 4.5)
-
-Copyright (C) 2003 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."
-
-usage="Usage: $program [OPTION]... FILE...
-
-Run each Texinfo or LaTeX FILE through TeX in turn until all
-cross-references are resolved, building all indices. The directory
-containing each FILE is searched for included files. The suffix of FILE
-is used to determine its language (LaTeX or Texinfo).
-
-Makeinfo is used to perform Texinfo macro expansion before running TeX
-when needed.
-
-Operation modes:
- -b, --batch no interaction
- -c, --clean remove all auxiliary files
- -D, --debug turn on shell debugging (set -x)
- -h, --help display this help and exit successfully
- -o, --output=OFILE leave output in OFILE (implies --clean);
- Only one input FILE may be specified in this case
- -q, --quiet no output unless errors (implies --batch)
- -s, --silent same as --quiet
- -v, --version display version information and exit successfully
- -V, --verbose report on what is done
-
-TeX tuning:
- -@ use @input instead of \input; for preloaded Texinfo
- -e, -E, --expand force macro expansion using makeinfo
- -I DIR search DIR for Texinfo files
- -l, --language=LANG specify the LANG of FILE (LaTeX or Texinfo)
- -p, --pdf use pdftex or pdflatex for processing
- -t, --texinfo=CMD insert CMD after @setfilename in copy of input file
- multiple values accumulate
-
-The values of the BIBTEX, LATEX (or PDFLATEX), MAKEINDEX, MAKEINFO,
-TEX (or PDFTEX), and TEXINDEX environment variables are used to run
-those commands, if they are set.
-
-Email bug reports to <bug-texinfo@gnu.org>,
-general questions and discussion to <help-texinfo@gnu.org>.
-Texinfo home page: http://www.gnu.org/software/texinfo/"
-
-# Initialize variables for option overriding and otherwise.
-# Don't use `unset' since old bourne shells don't have this command.
-# Instead, assign them an empty value.
-batch=false # eval for batch mode
-clean=
-debug=
-escape='\'
-expand= # t for expansion via makeinfo
-miincludes= # makeinfo include path
-oformat=dvi
-oname= # --output
-quiet= # by default let the tools' message be displayed
-set_language=
-textra=
-tmpdir=${TMPDIR:-/tmp}/t2d$$ # avoid collisions on 8.3 filesystems.
-txincludes= # TEXINPUTS extensions, with trailing colon
-txiprereq=19990129 # minimum texinfo.tex version to have macro expansion
-verbose=false # echo for verbose mode
-
-orig_pwd=`pwd`
-
-# Systems which define $COMSPEC or $ComSpec use semicolons to separate
-# directories in TEXINPUTS.
-if test -n "$COMSPEC$ComSpec"; then
- path_sep=";"
-else
- path_sep=":"
-fi
-
-# Pacify verbose cds.
-CDPATH=${ZSH_VERSION+.}$path_sep
-
-# In case someone crazy insists on using grep -E.
-: ${EGREP=egrep}
-
-# Save this so we can construct a new TEXINPUTS path for each file.
-TEXINPUTS_orig="$TEXINPUTS"
-# Unfortunately makeindex does not read TEXINPUTS.
-INDEXSTYLE_orig="$INDEXSTYLE"
-export TEXINPUTS INDEXSTYLE
-
-# Push a token among the arguments that will be used to notice when we
-# ended options/arguments parsing.
-# Use "set dummy ...; shift" rather than 'set - ..." because on
-# Solaris set - turns off set -x (but keeps set -e).
-# Use ${1+"$@"} rather than "$@" because Digital Unix and Ultrix 4.3
-# still expand "$@" to a single argument (the empty string) rather
-# than nothing at all.
-arg_sep="$$--$$"
-set dummy ${1+"$@"} "$arg_sep"; shift
-
-#
-# Parse command line arguments.
-while test x"$1" != x"$arg_sep"; do
-
- # Handle --option=value by splitting apart and putting back on argv.
- case "$1" in
- --*=*)
- opt=`echo "$1" | sed -e 's/=.*//'`
- val=`echo "$1" | sed -e 's/[^=]*=//'`
- shift
- set dummy "$opt" "$val" ${1+"$@"}; shift
- ;;
- esac
-
- # This recognizes --quark as --quiet. So what.
- case "$1" in
- -@ ) escape=@;;
- # Silently and without documentation accept -b and --b[atch] as synonyms.
- -b | --b*) batch=eval;;
- -q | -s | --q* | --s*) quiet=t; batch=eval;;
- -c | --c*) clean=t;;
- -D | --d*) debug=t;;
- -e | -E | --e*) expand=t;;
- -h | --h*) echo "$usage"; exit 0;;
- -I | --I*)
- shift
- miincludes="$miincludes -I $1"
- txincludes="$txincludes$1$path_sep"
- ;;
- -l | --l*) shift; set_language=$1;;
- -o | --o*)
- shift
- clean=t
- case "$1" in
- /* | ?:/*) oname=$1;;
- *) oname="$orig_pwd/$1";;
- esac;;
- -p | --p*) oformat=pdf;;
- -t | --t*) shift; textra="$textra\\
-$1";;
- -v | --vers*) echo "$version"; exit 0;;
- -V | --verb*) verbose=echo;;
- --) # What remains are not options.
- shift
- while test x"$1" != x"$arg_sep"; do
- set dummy ${1+"$@"} "$1"; shift
- shift
- done
- break;;
- -*)
- echo "$0: Unknown or ambiguous option \`$1'." >&2
- echo "$0: Try \`--help' for more information." >&2
- exit 1;;
- *) set dummy ${1+"$@"} "$1"; shift;;
- esac
- shift
-done
-# Pop the token
-shift
-
-# Interpret remaining command line args as filenames.
-case $# in
- 0)
- echo "$0: Missing file arguments." >&2
- echo "$0: Try \`--help' for more information." >&2
- exit 2
- ;;
- 1) ;;
- *)
- if test -n "$oname"; then
- echo "$0: Can't use option \`--output' with more than one argument." >&2
- exit 2
- fi
- ;;
-esac
-
-# Prepare the temporary directory. Remove it at exit, unless debugging.
-if test -z "$debug"; then
- trap "cd / && rm -rf $tmpdir" 0 1 2 15
-fi
-
-# Create the temporary directory with strict rights
-(umask 077 && mkdir $tmpdir) || exit 1
-
-# Prepare the tools we might need. This may be extra work in some
-# cases, but improves the readibility of the script.
-utildir=$tmpdir/utils
-mkdir $utildir || exit 1
-
-# A sed script that preprocesses Texinfo sources in order to keep the
-# iftex sections only. We want to remove non TeX sections, and
-# comment (with `@c texi2dvi') TeX sections so that makeinfo does not
-# try to parse them. Nevertheless, while commenting TeX sections,
-# don't comment @macro/@end macro so that makeinfo does propagate
-# them. Unfortunately makeinfo --iftex --no-ifhtml --no-ifinfo
-# doesn't work well enough (yet) to use that, so work around with sed.
-comment_iftex_sed=$utildir/comment.sed
-cat <<EOF >$comment_iftex_sed
-/^@tex/,/^@end tex/{
- s/^/@c texi2dvi/
-}
-/^@iftex/,/^@end iftex/{
- s/^/@c texi2dvi/
- /^@c texi2dvi@macro/,/^@c texi2dvi@end macro/{
- s/^@c texi2dvi//
- }
-}
-/^@html/,/^@end html/{
- s/^/@c (texi2dvi)/
-}
-/^@ifhtml/,/^@end ifhtml/{
- s/^/@c (texi2dvi)/
-}
-/^@ifnottex/,/^@end ifnottex/{
- s/^/@c (texi2dvi)/
-}
-/^@ifinfo/,/^@end ifinfo/{
- /^@node/p
- /^@menu/,/^@end menu/p
- t
- s/^/@c (texi2dvi)/
-}
-s/^@ifnotinfo/@c texi2dvi@ifnotinfo/
-s/^@end ifnotinfo/@c texi2dvi@end ifnotinfo/
-EOF
-# Uncommenting is simple: Remove any leading `@c texi2dvi'.
-uncomment_iftex_sed=$utildir/uncomment.sed
-cat <<EOF >$uncomment_iftex_sed
-s/^@c texi2dvi//
-EOF
-
-# A shell script that computes the list of xref files.
-# Takes the filename (without extension) of which we look for xref
-# files as argument. The index files must be reported last.
-get_xref_files=$utildir/get_xref.sh
-cat <<\EOF >$get_xref_files
-#! /bin/sh
-
-# Get list of xref files (indexes, tables and lists).
-# Find all files having root filename with a two-letter extension,
-# saves the ones that are really Texinfo-related files. .?o? catches
-# many files: .toc, .log, LaTeX tables and lists, FiXme's .lox, maybe more.
-for this_file in "$1".?o? "$1".aux "$1".?? "$1".idx; do
- # If file is empty, skip it.
- test -s "$this_file" || continue
- # If the file is not suitable to be an index or xref file, don't
- # process it. The file can't be if its first character is not a
- # backslash or single quote.
- first_character=`sed -n '1s/^\(.\).*$/\1/p;q' $this_file`
- if test "x$first_character" = "x\\" \
- || test "x$first_character" = "x'"; then
- xref_files="$xref_files ./$this_file"
- fi
-done
-echo "$xref_files"
-EOF
-chmod 500 $get_xref_files
-
-# File descriptor usage:
-# 0 standard input
-# 1 standard output (--verbose messages)
-# 2 standard error
-# 3 some systems may open it to /dev/tty
-# 4 used on the Kubota Titan
-# 5 tools output (turned off by --quiet)
-
-# Tools' output. If quiet, discard, else redirect to the message flow.
-if test "$quiet" = t; then
- exec 5>/dev/null
-else
- exec 5>&1
-fi
-
-# Enable tracing
-test "$debug" = t && set -x
-
-#
-# TeXify files.
-
-for command_line_filename in ${1+"$@"}; do
- $verbose "Processing $command_line_filename ..."
-
- # If the COMMAND_LINE_FILENAME is not absolute (e.g., --debug.tex),
- # prepend `./' in order to avoid that the tools take it as an option.
- echo "$command_line_filename" | $EGREP '^(/|[A-z]:/)' >/dev/null \
- || command_line_filename="./$command_line_filename"
-
- # See if the file exists. If it doesn't we're in trouble since, even
- # though the user may be able to reenter a valid filename at the tex
- # prompt (assuming they're attending the terminal), this script won't
- # be able to find the right xref files and so forth.
- if test ! -r "$command_line_filename"; then
- echo "$0: Could not read $command_line_filename, skipping." >&2
- continue
- fi
-
- # Get the name of the current directory. We want the full path
- # because in clean mode we are in tmp, in which case a relative
- # path has no meaning.
- filename_dir=`echo $command_line_filename | sed 's!/[^/]*$!!;s!^$!.!'`
- filename_dir=`cd "$filename_dir" >/dev/null && pwd`
-
- # Strip directory part but leave extension.
- filename_ext=`basename "$command_line_filename"`
- # Strip extension.
- filename_noext=`echo "$filename_ext" | sed 's/\.[^.]*$//'`
- ext=`echo "$filename_ext" | sed 's/^.*\.//'`
-
- # _src. Use same basename since we want to generate aux files with
- # the same basename as the manual. If --expand, then output the
- # macro-expanded file to here, else copy the original file.
- tmpdir_src=$tmpdir/src
- filename_src=$tmpdir_src/$filename_noext.$ext
-
- # _xtr. The file with the user's extra commands.
- tmpdir_xtr=$tmpdir/xtr
- filename_xtr=$tmpdir_xtr/$filename_noext.$ext
-
- # _bak. Copies of the previous xref files (another round is run if
- # they differ from the new one).
- tmpdir_bak=$tmpdir/bak
-
- # Make all those directories and give up if we can't succeed.
- mkdir $tmpdir_src $tmpdir_xtr $tmpdir_bak || exit 1
-
- # Source file might include additional sources.
- # We want `.:$orig_pwd' before anything else. (We'll add `.:' later
- # after all other directories have been turned into absolute paths.)
- # `.' goes first to ensure that any old .aux, .cps,
- # etc. files in ${directory} don't get used in preference to fresher
- # files in `.'. Include orig_pwd in case we are in clean mode, where
- # we've cd'd to a temp directory.
- common="$orig_pwd$path_sep$filename_dir$path_sep$txincludes"
- TEXINPUTS="$common$TEXINPUTS_orig"
- INDEXSTYLE="$common$INDEXSTYLE_orig"
-
- # Convert relative paths to absolute paths, so we can run in another
- # directory (e.g., in --clean mode, or during the macro-support
- # detection.)
- #
- # Empty path components are meaningful to tex. We rewrite them
- # as `EMPTY' so they don't get lost when we split on $path_sep.
- TEXINPUTS=`echo $TEXINPUTS |sed 's/^:/EMPTY:/;s/:$/:EMPTY/;s/::/:EMPTY:/g'`
- INDEXSTYLE=`echo $INDEXSTYLE |sed 's/^:/EMPTY:/;s/:$/:EMPTY/;s/::/:EMPTY:/g'`
- save_IFS=$IFS
- IFS=$path_sep
- set x $TEXINPUTS; shift
- TEXINPUTS=.
- for dir
- do
- case $dir in
- EMPTY)
- TEXINPUTS=$TEXINPUTS$path_sep
- ;;
- [\\/]* | ?:[\\/]*) # Absolute paths don't need to be expansed.
- TEXINPUTS=$TEXINPUTS$path_sep$dir
- ;;
- *)
- abs=`cd "$dir" && pwd` && TEXINPUTS=$TEXINPUTS$path_sep$abs
- ;;
- esac
- done
- set x $INDEXSTYLE; shift
- INDEXSTYLE=.
- for dir
- do
- case $dir in
- EMPTY)
- INDEXSTYLE=$INDEXSTYLE$path_sep
- ;;
- [\\/]* | ?:[\\/]*) # Absolute paths don't need to be expansed.
- INDEXSTYLE=$INDEXSTYLE$path_sep$dir
- ;;
- *)
- abs=`cd "$dir" && pwd` && INDEXSTYLE=$INDEXSTYLE$path_sep$abs
- ;;
- esac
- done
- IFS=$save_IFS
-
- # If the user explicitly specified the language, use that.
- # Otherwise, if the first line is \input texinfo, assume it's texinfo.
- # Otherwise, guess from the file extension.
- if test -n "$set_language"; then
- language=$set_language
- elif sed 1q "$command_line_filename" | grep 'input texinfo' >/dev/null; then
- language=texinfo
- else
- language=
- fi
-
- # Get the type of the file (latex or texinfo) from the given language
- # we just guessed, or from the file extension if not set yet.
- case ${language:-$filename_ext} in
- [lL]a[tT]e[xX] | *.ltx | *.tex)
- # Assume a LaTeX file. LaTeX needs bibtex and uses latex for
- # compilation. No makeinfo.
- bibtex=${BIBTEX:-bibtex}
- makeinfo= # no point in running makeinfo on latex source.
- texindex=${MAKEINDEX:-makeindex}
- if test $oformat = dvi; then
- tex=${LATEX:-latex}
- else
- tex=${PDFLATEX:-pdflatex}
- fi
- ;;
-
- *)
- # Assume a Texinfo file. Texinfo files need makeinfo, texindex and tex.
- bibtex=
- texindex=${TEXINDEX:-texindex}
- if test $oformat = dvi; then
- tex=${TEX:-tex}
- else
- tex=${PDFTEX:-pdftex}
- fi
- # Unless required by the user, makeinfo expansion is wanted only
- # if texinfo.tex is too old.
- if test "$expand" = t; then
- makeinfo=${MAKEINFO:-makeinfo}
- else
- # Check if texinfo.tex performs macro expansion by looking for
- # its version. The version is a date of the form YEAR-MO-DA.
- # We don't need to use [0-9] to match the digits since anyway
- # the comparison with $txiprereq, a number, will fail with non
- # digits.
- txiversion_tex=txiversion.tex
- echo '\input texinfo.tex @bye' >$tmpdir/$txiversion_tex
- # Run in the tmpdir to avoid leaving files.
- eval `cd $tmpdir >/dev/null &&
- $tex $txiversion_tex 2>/dev/null |
- sed -n 's/^.*\[\(.*\)version \(....\)-\(..\)-\(..\).*$/txiformat=\1 txiversion="\2\3\4"/p'`
- $verbose "texinfo.tex preloaded as \`$txiformat', version is \`$txiversion' ..."
- if test "$txiprereq" -le "$txiversion" >/dev/null 2>&1; then
- makeinfo=
- else
- makeinfo=${MAKEINFO:-makeinfo}
- fi
- # As long as we had to run TeX, offer the user this convenience
- if test "$txiformat" = Texinfo; then
- escape=@
- fi
- fi
- ;;
- esac
-
- # Expand macro commands in the original source file using Makeinfo.
- # Always use `end' footnote style, since the `separate' style
- # generates different output (arguably this is a bug in -E).
- # Discard main info output, the user asked to run TeX, not makeinfo.
- if test -n "$makeinfo"; then
- $verbose "Macro-expanding $command_line_filename to $filename_src ..."
- sed -f $comment_iftex_sed "$command_line_filename" \
- | $makeinfo --footnote-style=end -I "$filename_dir" $miincludes \
- -o /dev/null --macro-expand=- \
- | sed -f $uncomment_iftex_sed >"$filename_src"
- filename_input=$filename_src
- fi
-
- # If makeinfo failed (or was not even run), use the original file as input.
- if test $? -ne 0 \
- || test ! -r "$filename_src"; then
- $verbose "Reverting to $command_line_filename ..."
- filename_input=$filename_dir/$filename_ext
- fi
-
- # Used most commonly for @finalout, @smallbook, etc.
- if test -n "$textra"; then
- $verbose "Inserting extra commands: $textra"
- sed '/^@setfilename/a\
-'"$textra" "$filename_input" >$filename_xtr
- filename_input=$filename_xtr
- fi
-
- # If clean mode was specified, then move to the temporary directory.
- if test "$clean" = t; then
- $verbose "cd $tmpdir_src"
- cd "$tmpdir_src" || exit 1
- fi
-
- while :; do # will break out of loop below
- orig_xref_files=`$get_xref_files "$filename_noext"`
-
- # Save copies of originals for later comparison.
- if test -n "$orig_xref_files"; then
- $verbose "Backing up xref files: `echo $orig_xref_files | sed 's|\./||g'`"
- cp $orig_xref_files $tmpdir_bak
- fi
-
- # Run bibtex on current file.
- # - If its input (AUX) exists.
- # - If AUX contains both `\bibdata' and `\bibstyle'.
- # - If some citations are missing (LOG contains `Citation').
- # or the LOG complains of a missing .bbl
- #
- # We run bibtex first, because I can see reasons for the indexes
- # to change after bibtex is run, but I see no reason for the
- # converse.
- #
- # Don't try to be too smart. Running bibtex only if the bbl file
- # exists and is older than the LaTeX file is wrong, since the
- # document might include files that have changed. Because there
- # can be several AUX (if there are \include's), but a single LOG,
- # looking for missing citations in LOG is easier, though we take
- # the risk to match false messages.
- if test -n "$bibtex" \
- && test -r "$filename_noext.aux" \
- && test -r "$filename_noext.log" \
- && (grep '^\\bibdata[{]' "$filename_noext.aux" \
- && grep '^\\bibstyle[{]' "$filename_noext.aux" \
- && (grep 'Warning:.*Citation.*undefined' "$filename_noext.log" \
- || grep 'No file .*\.bbl\.' "$filename_noext.log")) \
- >/dev/null 2>&1; \
- then
- $verbose "Running $bibtex $filename_noext ..."
- if $bibtex "$filename_noext" >&5; then :; else
- echo "$0: $bibtex exited with bad status, quitting." >&2
- exit 1
- fi
- fi
-
- # What we'll run texindex on -- exclude non-index files.
- # Since we know index files are last, it is correct to remove everything
- # before .aux and .?o?. But don't really do <anything>o<anything>
- # -- don't match whitespace as <anything>.
- # Otherwise, if orig_xref_files contains something like
- # foo.xo foo.whatever
- # the space after the o will get matched.
- index_files=`echo "$orig_xref_files" \
- | sed "s!.*\.aux!!g;
- s!./$filename_noext\.[^ ]o[^ ]!!g;
- s/^[ ]*//;s/[ ]*$//"`
- # Run texindex (or makeindex) on current index files. If they
- # already exist, and after running TeX a first time the index
- # files don't change, then there's no reason to run TeX again.
- # But we won't know that if the index files are out of date or
- # nonexistent.
- if test -n "$texindex" && test -n "$index_files"; then
- $verbose "Running $texindex $index_files ..."
- if $texindex $index_files 2>&5 1>&2; then :; else
- echo "$0: $texindex exited with bad status, quitting." >&2
- exit 1
- fi
- fi
-
- # Finally, run TeX.
- # Prevent $ESCAPE from being interpreted by the shell if it happens
- # to be `/'.
- $batch tex_args="\\${escape}nonstopmode\ \\${escape}input"
- cmd="$tex $tex_args $filename_input"
- $verbose "Running $cmd ..."
- if $cmd >&5; then :; else
- echo "$0: $tex exited with bad status, quitting." >&2
- echo "$0: see $filename_noext.log for errors." >&2
- test "$clean" = t \
- && cp "$filename_noext.log" "$orig_pwd"
- exit 1
- fi
-
-
- # Decide if looping again is needed.
- finished=t
-
- # LaTeX (and the package changebar) report in the LOG file if it
- # should be rerun. This is needed for files included from
- # subdirs, since texi2dvi does not try to compare xref files in
- # subdirs. Performing xref files test is still good since LaTeX
- # does not report changes in xref files.
- if grep "Rerun to get" "$filename_noext.log" >/dev/null 2>&1; then
- finished=
- fi
-
- # Check if xref files changed.
- new_xref_files=`$get_xref_files "$filename_noext"`
- $verbose "Original xref files = `echo $orig_xref_files | sed 's|\./||g'`"
- $verbose "New xref files = `echo $new_xref_files | sed 's|\./||g'`"
-
- # If old and new lists don't at least have the same file list,
- # then one file or another has definitely changed.
- test "x$orig_xref_files" != "x$new_xref_files" && finished=
-
- # File list is the same. We must compare each file until we find
- # a difference.
- if test -n "$finished"; then
- for this_file in $new_xref_files; do
- $verbose "Comparing xref file `echo $this_file | sed 's|\./||g'` ..."
- # cmp -s returns nonzero exit status if files differ.
- if cmp -s "$this_file" "$tmpdir_bak/$this_file"; then :; else
- # We only need to keep comparing until we find one that
- # differs, because we'll have to run texindex & tex again no
- # matter how many more there might be.
- finished=
- $verbose "xref file `echo $this_file | sed 's|\./||g'` differed ..."
- test "$debug" = t && diff -c "$tmpdir_bak/$this_file" "$this_file"
- break
- fi
- done
- fi
-
- # If finished, exit the loop, else rerun the loop.
- test -n "$finished" && break
- done
-
- # If we were in clean mode, compilation was in a tmp directory.
- # Copy the DVI (or PDF) file into the directory where the compilation
- # has been done. (The temp dir is about to get removed anyway.)
- # We also return to the original directory so that
- # - the next file is processed in correct conditions
- # - the temporary file can be removed
- if test -n "$clean"; then
- if test -n "$oname"; then
- dest=$oname
- else
- dest=$orig_pwd
- fi
- $verbose "Copying $oformat file from `pwd` to $dest"
- cp -p "./$filename_noext.$oformat" "$dest"
- cd / # in case $orig_pwd is on a different drive (for DOS)
- cd $orig_pwd || exit 1
- fi
-
- # Remove temporary files.
- if test "x$debug" = "x"; then
- $verbose "Removing $tmpdir_src $tmpdir_xtr $tmpdir_bak ..."
- cd /
- rm -rf $tmpdir_src $tmpdir_xtr $tmpdir_bak
- fi
-done
-
-$verbose "$0 done."
-exit 0 # exit successfully, not however we ended the loop.
diff --git a/build-aux/texinfo.tex b/build-aux/texinfo.tex
index a5a7b2b..c8913ab 100644
--- a/build-aux/texinfo.tex
+++ b/build-aux/texinfo.tex
@@ -3,11 +3,12 @@
% Load plain if necessary, i.e., if running under initex.
\expandafter\ifx\csname fmtname\endcsname\relax\input plain\fi
%
-\def\texinfoversion{2012-06-05.14}
+\def\texinfoversion{2016-09-18.18}
%
% 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 Free Software Foundation, Inc.
+% 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016
+% Free Software Foundation, Inc.
%
% This texinfo.tex file is free software: you can redistribute it and/or
% modify it under the terms of the GNU General Public License as
@@ -24,7 +25,8 @@
%
% As a special exception, when this file is read by TeX when processing
% a Texinfo source document, you may use the result without
-% restriction. (This has been our intent since Texinfo was invented.)
+% restriction. This Exception is an additional permission under section 7
+% of the GNU General Public License, version 3 ("GPLv3").
%
% Please try the latest version of texinfo.tex before submitting bug
% reports; you can get the latest version from:
@@ -65,6 +67,10 @@
\everyjob{\message{[Texinfo version \texinfoversion]}%
\catcode`+=\active \catcode`\_=\active}
+% LaTeX's \typeout. This ensures that the messages it is used for
+% are identical in format to the corresponding ones from latex/pdflatex.
+\def\typeout{\immediate\write17}%
+
\chardef\other=12
% We never want plain's \outer definition of \+ in Texinfo.
@@ -95,7 +101,9 @@
\let\ptexraggedright=\raggedright
\let\ptexrbrace=\}
\let\ptexslash=\/
+\let\ptexsp=\sp
\let\ptexstar=\*
+\let\ptexsup=\sup
\let\ptext=\t
\let\ptextop=\top
{\catcode`\'=\active \global\let\ptexquoteright'}% active in plain's math mode
@@ -154,22 +162,10 @@
\ifx\putwordDefopt\undefined \gdef\putwordDefopt{User Option}\fi
\ifx\putwordDeffunc\undefined \gdef\putwordDeffunc{Function}\fi
-% Since the category of space is not known, we have to be careful.
-\chardef\spacecat = 10
-\def\spaceisspace{\catcode`\ =\spacecat}
+% Give the space character the catcode for a space.
+\def\spaceisspace{\catcode`\ =10\relax}
-% sometimes characters are active, so we need control sequences.
-\chardef\ampChar = `\&
-\chardef\colonChar = `\:
-\chardef\commaChar = `\,
\chardef\dashChar = `\-
-\chardef\dotChar = `\.
-\chardef\exclamChar= `\!
-\chardef\hashChar = `\#
-\chardef\lquoteChar= `\`
-\chardef\questChar = `\?
-\chardef\rquoteChar= `\'
-\chardef\semiChar = `\;
\chardef\slashChar = `\/
\chardef\underChar = `\_
@@ -192,17 +188,6 @@
wide-spread wrap-around
}
-% Margin to add to right of even pages, to left of odd pages.
-\newdimen\bindingoffset
-\newdimen\normaloffset
-\newdimen\pagewidth \newdimen\pageheight
-
-% For a final copy, take out the rectangles
-% that mark overfull boxes (in case you have decided
-% that the text looks ok even though it passes the margin).
-%
-\def\finalout{\overfullrule=0pt }
-
% Sometimes it is convenient to have everything in the transcript file
% and nothing on the terminal. We don't just call \tracingall here,
% since that produces some useless output on the terminal. We also make
@@ -247,6 +232,15 @@
\def\bigbreak{\ifnum\lastpenalty<10000\par\ifdim\lastskip<\bigskipamount
\removelastskip\penalty-200\bigskip\fi\fi}
+% Output routine
+%
+
+% For a final copy, take out the rectangles
+% that mark overfull boxes (in case you have decided
+% that the text looks ok even though it passes the margin).
+%
+\def\finalout{\overfullrule=0pt }
+
% Do @cropmarks to get crop marks.
%
\newif\ifcropmarks
@@ -269,10 +263,18 @@
%
% Another complication is to let the user choose whether \thischapter
% (\thissection) refers to the chapter (section) in effect at the top
-% of a page, or that at the bottom of a page. The solution is
-% described on page 260 of The TeXbook. It involves outputting two
-% marks for the sectioning macros, one before the section break, and
-% one after. I won't pretend I can describe this better than DEK...
+% of a page, or that at the bottom of a page.
+
+% \domark is called twice inside \chapmacro, to add one
+% mark before the section break, and one after.
+% In the second call \prevchapterdefs is the same as \lastchapterdefs,
+% and \prevsectiondefs is the same as \lastsectiondefs.
+% Then if the page is not broken at the mark, some of the previous
+% section appears on the page, and we can get the name of this section
+% from \firstmark for @everyheadingmarks top.
+% @everyheadingmarks bottom uses \botmark.
+%
+% See page 260 of The TeXbook.
\def\domark{%
\toks0=\expandafter{\lastchapterdefs}%
\toks2=\expandafter{\lastsectiondefs}%
@@ -280,11 +282,15 @@
\toks6=\expandafter{\prevsectiondefs}%
\toks8=\expandafter{\lastcolordefs}%
\mark{%
- \the\toks0 \the\toks2
- \noexpand\or \the\toks4 \the\toks6
- \noexpand\else \the\toks8
+ \the\toks0 \the\toks2 % 0: marks for @everyheadingmarks top
+ \noexpand\or \the\toks4 \the\toks6 % 1: for @everyheadingmarks bottom
+ \noexpand\else \the\toks8 % 2: color marks
}%
}
+
+% \gettopheadingmarks, \getbottomheadingmarks,
+% \getcolormarks - extract needed part of mark.
+%
% \topmark doesn't work for the very first chapter (after the title
% page or the contents), so we use \firstmark there -- this gets us
% the mark with the chapter defs, unless the user sneaks in, e.g.,
@@ -300,33 +306,67 @@
% Avoid "undefined control sequence" errors.
\def\lastchapterdefs{}
\def\lastsectiondefs{}
+\def\lastsection{}
\def\prevchapterdefs{}
\def\prevsectiondefs{}
\def\lastcolordefs{}
+% Margin to add to right of even pages, to left of odd pages.
+\newdimen\bindingoffset
+\newdimen\normaloffset
+\newdimen\txipagewidth \newdimen\txipageheight
+
% Main output routine.
+%
\chardef\PAGE = 255
\output = {\onepageout{\pagecontents\PAGE}}
\newbox\headlinebox
\newbox\footlinebox
-% \onepageout takes a vbox as an argument. Note that \pagecontents
-% does insertions, but you have to call it yourself.
+% \onepageout takes a vbox as an argument.
+% \shipout a vbox for a single page, adding an optional header, footer,
+% cropmarks, and footnote. This also causes index entries for this page
+% to be written to the auxiliary files.
+%
\def\onepageout#1{%
\ifcropmarks \hoffset=0pt \else \hoffset=\normaloffset \fi
%
\ifodd\pageno \advance\hoffset by \bindingoffset
\else \advance\hoffset by -\bindingoffset\fi
%
+ % Common context changes for both heading and footing.
% Do this outside of the \shipout so @code etc. will be expanded in
% the headline as they should be, not taken literally (outputting ''code).
+ \def\commmonheadfootline{\let\hsize=\txipagewidth \texinfochars}
+ %
+ % Retrieve the information for the headings from the marks in the page,
+ % and call Plain TeX's \makeheadline and \makefootline, which use the
+ % values in \headline and \footline.
+ %
+ % This is used to check if we are on the first page of a chapter.
+ \ifcase1\topmark\fi
+ \let\prevchaptername\thischaptername
+ \ifcase0\firstmark\fi
+ \let\curchaptername\thischaptername
+ %
\ifodd\pageno \getoddheadingmarks \else \getevenheadingmarks \fi
- \setbox\headlinebox = \vbox{\let\hsize=\pagewidth \makeheadline}%
\ifodd\pageno \getoddfootingmarks \else \getevenfootingmarks \fi
- \setbox\footlinebox = \vbox{\let\hsize=\pagewidth \makefootline}%
+ %
+ \ifx\curchaptername\prevchaptername
+ \let\thischapterheading\thischapter
+ \else
+ % \thischapterheading is the same as \thischapter except it is blank
+ % for the first page of a chapter. This is to prevent the chapter name
+ % being shown twice.
+ \def\thischapterheading{}%
+ \fi
+ %
+ \global\setbox\headlinebox = \vbox{\commmonheadfootline \makeheadline}%
+ \global\setbox\footlinebox = \vbox{\commmonheadfootline \makefootline}%
%
{%
+ % Set context for writing to auxiliary files like index files.
% Have to do this stuff outside the \shipout because we want it to
% take effect in \write's, yet the group defined by the \vbox ends
% before the \shipout runs.
@@ -335,10 +375,10 @@
\normalturnoffactive % \ in index entries must not stay \, e.g., if
% the page break happens to be in the middle of an example.
% We don't want .vr (or whatever) entries like this:
- % \entry{{\tt \indexbackslash }acronym}{32}{\code {\acronym}}
+ % \entry{{\indexbackslash }acronym}{32}{\code {\acronym}}
% "\acronym" won't work when it's read back in;
% it needs to be
- % {\code {{\tt \backslashcurfont }acronym}
+ % {\code {{\backslashcurfont }acronym}
\shipout\vbox{%
% Do this early so pdf references go to the beginning of the page.
\ifpdfmakepagedest \pdfdest name{\the\pageno} xyz\fi
@@ -396,7 +436,8 @@
\newinsert\margin \dimen\margin=\maxdimen
-\def\pagebody#1{\vbox to\pageheight{\boxmaxdepth=\maxdepth #1}}
+% Main part of page, including any footnotes
+\def\pagebody#1{\vbox to\txipageheight{\boxmaxdepth=\maxdepth #1}}
{\catcode`\@ =11
\gdef\pagecontents#1{\ifvoid\topins\else\unvbox\topins\fi
% marginal hacks, juha@viisa.uucp (Juha Takala)
@@ -418,9 +459,13 @@
\def\nsbot{\vbox
{\hrule height\cornerlong depth\cornerthick width\cornerthick}}
+
+% Argument parsing
+
% Parse an argument, then pass it to #1. The argument is the rest of
% the input line (except we remove a trailing comment). #1 should be a
% macro which expects an ordinary undelimited TeX argument.
+% For example, \def\foo{\parsearg\fooxxx}.
%
\def\parsearg{\parseargusing{}}
\def\parseargusing#1#2{%
@@ -439,9 +484,11 @@
}%
}
-% First remove any @comment, then any @c comment.
+% First remove any @comment, then any @c comment. Also remove a @texinfoc
+% comment (see \scanmacro for details). Pass the result on to \argcheckspaces.
\def\argremovecomment#1\comment#2\ArgTerm{\argremovec #1\c\ArgTerm}
-\def\argremovec#1\c#2\ArgTerm{\argcheckspaces#1\^^M\ArgTerm}
+\def\argremovec#1\c#2\ArgTerm{\argremovetexinfoc #1\texinfoc\ArgTerm}
+\def\argremovetexinfoc#1\texinfoc#2\ArgTerm{\argcheckspaces#1\^^M\ArgTerm}
% Each occurrence of `\^^M' or `<space>\^^M' is replaced by a single space.
%
@@ -476,14 +523,13 @@
%
\def\finishparsearg#1 \ArgTerm{\expandafter\argtorun\expandafter{#1}}
+
+% \parseargdef - define a command taking an argument on the line
+%
% \parseargdef\foo{...}
% is roughly equivalent to
% \def\foo{\parsearg\Xfoo}
% \def\Xfoo#1{...}
-%
-% Actually, I use \csname\string\foo\endcsname, ie. \\foo, as it is my
-% favourite TeX trick. --kasal, 16nov03
-
\def\parseargdef#1{%
\expandafter \doparseargdef \csname\string#1\endcsname #1%
}
@@ -594,7 +640,7 @@
\def\:{\spacefactor=1000 }
% @* forces a line break.
-\def\*{\hfil\break\hbox{}\ignorespaces}
+\def\*{\unskip\hfil\break\hbox{}\ignorespaces}
% @/ allows a line break.
\let\/=\allowbreak
@@ -673,21 +719,26 @@
\endgraf % Not \par, as it may have been set to \lisppar.
\global\dimen1 = \prevdepth
\egroup % End the \vtop.
+ \addgroupbox
+ \prevdepth = \dimen1
+ \checkinserts
+}
+
+\def\addgroupbox{
% \dimen0 is the vertical size of the group's box.
\dimen0 = \ht\groupbox \advance\dimen0 by \dp\groupbox
% \dimen2 is how much space is left on the page (more or less).
- \dimen2 = \pageheight \advance\dimen2 by -\pagetotal
+ \dimen2 = \txipageheight \advance\dimen2 by -\pagetotal
% if the group doesn't fit on the current page, and it's a big big
% group, force a page break.
\ifdim \dimen0 > \dimen2
- \ifdim \pagetotal < \vfilllimit\pageheight
+ \ifdim \pagetotal < \vfilllimit\txipageheight
\page
\fi
\fi
\box\groupbox
- \prevdepth = \dimen1
- \checkinserts
}
+
%
% TeX puts in an \escapechar (i.e., `@') at the beginning of the help
% message, so this ends up printing `@group can only ...'.
@@ -811,36 +862,6 @@ where each line of input produces a line of output.}
\temp
}
-% @| inserts a changebar to the left of the current line. It should
-% surround any changed text. This approach does *not* work if the
-% change spans more than two lines of output. To handle that, we would
-% have adopt a much more difficult approach (putting marks into the main
-% vertical list for the beginning and end of each change). This command
-% is not documented, not supported, and doesn't work.
-%
-\def\|{%
- % \vadjust can only be used in horizontal mode.
- \leavevmode
- %
- % Append this vertical mode material after the current line in the output.
- \vadjust{%
- % We want to insert a rule with the height and depth of the current
- % leading; that is exactly what \strutbox is supposed to record.
- \vskip-\baselineskip
- %
- % \vadjust-items are inserted at the left edge of the type. So
- % the \llap here moves out into the left-hand margin.
- \llap{%
- %
- % For a thicker or thinner bar, change the `1pt'.
- \vrule height\baselineskip width1pt
- %
- % This is the space between the bar and the text.
- \hskip 12pt
- }%
- }%
-}
-
% @include FILE -- \input text of FILE.
%
\def\include{\parseargusing\filenamecatcodes\includezzz}
@@ -930,12 +951,20 @@ where each line of input produces a line of output.}
% @c is the same as @comment
% @ignore ... @end ignore is another way to write a comment
%
-\def\comment{\begingroup \catcode`\^^M=\other%
+\def\comment{\begingroup \catcode`\^^M=\active%
+\catcode`\@=\other \catcode`\{=\other \catcode`\}=\other\commentxxx}%
+
+{\catcode`\^^M=\active%
+\gdef\commentxxx#1^^M{\endgroup%
+\futurelet\nexttoken\commentxxxx}%
+\gdef\commentxxxx{\ifx\nexttoken\aftermacro\expandafter\comment\fi}%
+}
+
+\def\c{\begingroup \catcode`\^^M=\active%
\catcode`\@=\other \catcode`\{=\other \catcode`\}=\other%
-\commentxxx}
-{\catcode`\^^M=\other \gdef\commentxxx#1^^M{\endgroup}}
-%
-\let\c=\comment
+\cxxx}
+{\catcode`\^^M=\active \gdef\cxxx#1^^M{\endgroup}}
+% See comment in \scanmacro about why the definitions of @c and @comment differ
% @paragraphindent NCHARS
% We'll use ems for NCHARS, close enough.
@@ -1006,69 +1035,23 @@ where each line of input produces a line of output.}
% paragraph.
%
\gdef\dosuppressfirstparagraphindent{%
- \gdef\indent{%
- \restorefirstparagraphindent
- \indent
- }%
- \gdef\noindent{%
- \restorefirstparagraphindent
- \noindent
- }%
- \global\everypar = {%
- \kern -\parindent
- \restorefirstparagraphindent
- }%
+ \gdef\indent {\restorefirstparagraphindent \indent}%
+ \gdef\noindent{\restorefirstparagraphindent \noindent}%
+ \global\everypar = {\kern -\parindent \restorefirstparagraphindent}%
}
-
+%
\gdef\restorefirstparagraphindent{%
- \global \let \indent = \ptexindent
- \global \let \noindent = \ptexnoindent
- \global \everypar = {}%
+ \global\let\indent = \ptexindent
+ \global\let\noindent = \ptexnoindent
+ \global\everypar = {}%
}
% @refill is a no-op.
\let\refill=\relax
-% If working on a large document in chapters, it is convenient to
-% be able to disable indexing, cross-referencing, and contents, for test runs.
-% This is done with @novalidate (before @setfilename).
-%
-\newif\iflinks \linkstrue % by default we want the aux files.
-\let\novalidate = \linksfalse
-
-% @setfilename is done at the beginning of every texinfo file.
-% So open here the files we need to have open while reading the input.
-% This makes it possible to make a .fmt file for texinfo.
-\def\setfilename{%
- \fixbackslash % Turn off hack to swallow `\input texinfo'.
- \iflinks
- \tryauxfile
- % Open the new aux file. TeX will close it automatically at exit.
- \immediate\openout\auxfile=\jobname.aux
- \fi % \openindices needs to do some work in any case.
- \openindices
- \let\setfilename=\comment % Ignore extra @setfilename cmds.
- %
- % If texinfo.cnf is present on the system, read it.
- % Useful for site-wide @afourpaper, etc.
- \openin 1 texinfo.cnf
- \ifeof 1 \else \input texinfo.cnf \fi
- \closein 1
- %
- \comment % Ignore the actual filename.
-}
-
-% Called from \setfilename.
-%
-\def\openindices{%
- \newindex{cp}%
- \newcodeindex{fn}%
- \newcodeindex{vr}%
- \newcodeindex{tp}%
- \newcodeindex{ky}%
- \newcodeindex{pg}%
-}
+% @setfilename INFO-FILENAME - ignored
+\let\setfilename=\comment
% @bye.
\outer\def\bye{\pagealignmacro\tracingstats=1\ptexend}
@@ -1086,10 +1069,91 @@ where each line of input produces a line of output.}
\newtoks\toksC
\newtoks\toksD
\newbox\boxA
+\newbox\boxB
\newcount\countA
\newif\ifpdf
\newif\ifpdfmakepagedest
+%
+% For LuaTeX
+%
+
+\newif\iftxiuseunicodedestname
+\txiuseunicodedestnamefalse % For pdfTeX etc.
+
+\ifx\luatexversion\thisisundefined
+\else
+ % Use Unicode destination names
+ \txiuseunicodedestnametrue
+ % Escape PDF strings with converting UTF-16 from UTF-8
+ \begingroup
+ \catcode`\%=12
+ \directlua{
+ function UTF16oct(str)
+ tex.sprint(string.char(0x5c) .. '376' .. string.char(0x5c) .. '377')
+ for c in string.utfvalues(str) do
+ if c < 0x10000 then
+ tex.sprint(
+ string.format(string.char(0x5c) .. string.char(0x25) .. '03o' ..
+ string.char(0x5c) .. string.char(0x25) .. '03o',
+ (c / 256), (c % 256)))
+ else
+ c = c - 0x10000
+ local c_hi = c / 1024 + 0xd800
+ local c_lo = c % 1024 + 0xdc00
+ tex.sprint(
+ string.format(string.char(0x5c) .. string.char(0x25) .. '03o' ..
+ string.char(0x5c) .. string.char(0x25) .. '03o' ..
+ string.char(0x5c) .. string.char(0x25) .. '03o' ..
+ string.char(0x5c) .. string.char(0x25) .. '03o',
+ (c_hi / 256), (c_hi % 256),
+ (c_lo / 256), (c_lo % 256)))
+ end
+ end
+ end
+ }
+ \endgroup
+ \def\pdfescapestrutfsixteen#1{\directlua{UTF16oct('\luaescapestring{#1}')}}
+ % Escape PDF strings without converting
+ \begingroup
+ \directlua{
+ function PDFescstr(str)
+ for c in string.bytes(str) do
+ if c <= 0x20 or c >= 0x80 or c == 0x28 or c == 0x29 or c == 0x5c then
+ tex.sprint(
+ string.format(string.char(0x5c) .. string.char(0x25) .. '03o',
+ c))
+ else
+ tex.sprint(string.char(c))
+ end
+ end
+ end
+ }
+ \endgroup
+ \def\pdfescapestring#1{\directlua{PDFescstr('\luaescapestring{#1}')}}
+ \ifnum\luatexversion>84
+ % For LuaTeX >= 0.85
+ \def\pdfdest{\pdfextension dest}
+ \let\pdfoutput\outputmode
+ \def\pdfliteral{\pdfextension literal}
+ \def\pdfcatalog{\pdfextension catalog}
+ \def\pdftexversion{\numexpr\pdffeedback version\relax}
+ \let\pdfximage\saveimageresource
+ \let\pdfrefximage\useimageresource
+ \let\pdflastximage\lastsavedimageresourceindex
+ \def\pdfendlink{\pdfextension endlink\relax}
+ \def\pdfoutline{\pdfextension outline}
+ \def\pdfstartlink{\pdfextension startlink}
+ \def\pdffontattr{\pdfextension fontattr}
+ \def\pdfobj{\pdfextension obj}
+ \def\pdflastobj{\numexpr\pdffeedback lastobj\relax}
+ \let\pdfpagewidth\pagewidth
+ \let\pdfpageheight\pageheight
+ \edef\pdfhorigin{\pdfvariable horigin}
+ \edef\pdfvorigin{\pdfvariable vorigin}
+ \fi
+\fi
+
% when pdftex is run in dvi mode, \pdfoutput is defined (so \pdfoutput=1
% can be set). So we test for \relax and 0 as well as being undefined.
\ifx\pdfoutput\thisisundefined
@@ -1120,12 +1184,21 @@ where each line of input produces a line of output.}
\ifx\pdfescapestring\thisisundefined
% No primitive available; should we give a warning or log?
% Many times it won't matter.
+ \xdef#1{#1}%
\else
% The expandable \pdfescapestring primitive escapes parentheses,
% backslashes, and other special chars.
\xdef#1{\pdfescapestring{#1}}%
\fi
}
+\def\txiescapepdfutfsixteen#1{%
+ \ifx\pdfescapestrutfsixteen\thisisundefined
+ % No UTF-16 converting macro available.
+ \txiescapepdf{#1}%
+ \else
+ \xdef#1{\pdfescapestrutfsixteen{#1}}%
+ \fi
+}
\newhelp\nopdfimagehelp{Texinfo supports .png, .jpg, .jpeg, and .pdf images
with PDF output, and none of those formats could be found. (.eps cannot
@@ -1134,15 +1207,17 @@ output) for that.)}
\ifpdf
%
- % Color manipulation macros based on pdfcolor.tex,
+ % Color manipulation macros using ideas from pdfcolor.tex,
% except using rgb instead of cmyk; the latter is said to render as a
% very dark gray on-screen and a very dark halftone in print, instead
- % of actual black.
+ % of actual black. The dark red here is dark enough to print on paper as
+ % nearly black, but still distinguishable for online viewing. We use
+ % black by default, though.
\def\rgbDarkRed{0.50 0.09 0.12}
\def\rgbBlack{0 0 0}
%
- % k sets the color for filling (usual text, etc.);
- % K sets the color for stroking (thin rules, e.g., normal _'s).
+ % rg sets the color for filling (usual text, etc.);
+ % RG sets the color for stroking (thin rules, e.g., normal _'s).
\def\pdfsetcolor#1{\pdfliteral{#1 rg #1 RG}}
%
% Set color, and create a mark which defines \thiscolor accordingly,
@@ -1233,24 +1308,83 @@ output) for that.)}
\pdfrefximage \pdflastximage
\fi}
%
- \def\pdfmkdest#1{{%
+ \def\setpdfdestname#1{{%
% We have to set dummies so commands such as @code, and characters
% such as \, aren't expanded when present in a section title.
\indexnofonts
- \turnoffactive
\makevalueexpandable
+ \turnoffactive
+ \iftxiuseunicodedestname
+ \ifx \declaredencoding \latone
+ % Pass through Latin-1 characters.
+ % LuaTeX with byte wise I/O converts Latin-1 characters to Unicode.
+ \else
+ \ifx \declaredencoding \utfeight
+ % Pass through Unicode characters.
+ \else
+ % Use ASCII approximations in destination names.
+ \passthroughcharsfalse
+ \fi
+ \fi
+ \else
+ % Use ASCII approximations in destination names.
+ \passthroughcharsfalse
+ \fi
\def\pdfdestname{#1}%
\txiescapepdf\pdfdestname
- \safewhatsit{\pdfdest name{\pdfdestname} xyz}%
}}
%
+ \def\setpdfoutlinetext#1{{%
+ \indexnofonts
+ \makevalueexpandable
+ \turnoffactive
+ \ifx \declaredencoding \latone
+ % The PDF format can use an extended form of Latin-1 in bookmark
+ % strings. See Appendix D of the PDF Reference, Sixth Edition, for
+ % the "PDFDocEncoding".
+ \passthroughcharstrue
+ % Pass through Latin-1 characters.
+ % LuaTeX: Convert to Unicode
+ % pdfTeX: Use Latin-1 as PDFDocEncoding
+ \def\pdfoutlinetext{#1}%
+ \else
+ \ifx \declaredencoding \utfeight
+ \ifx\luatexversion\thisisundefined
+ % For pdfTeX with UTF-8.
+ % TODO: the PDF format can use UTF-16 in bookmark strings,
+ % but the code for this isn't done yet.
+ % Use ASCII approximations.
+ \passthroughcharsfalse
+ \def\pdfoutlinetext{#1}%
+ \else
+ % For LuaTeX with UTF-8.
+ % Pass through Unicode characters for title texts.
+ \passthroughcharstrue
+ \def\pdfoutlinetext{#1}%
+ \fi
+ \else
+ % For non-Latin-1 or non-UTF-8 encodings.
+ % Use ASCII approximations.
+ \passthroughcharsfalse
+ \def\pdfoutlinetext{#1}%
+ \fi
+ \fi
+ % LuaTeX: Convert to UTF-16
+ % pdfTeX: Use Latin-1 as PDFDocEncoding
+ \txiescapepdfutfsixteen\pdfoutlinetext
+ }}
+ %
+ \def\pdfmkdest#1{%
+ \setpdfdestname{#1}%
+ \safewhatsit{\pdfdest name{\pdfdestname} xyz}%
+ }
+ %
% used to mark target names; must be expandable.
\def\pdfmkpgn#1{#1}
%
- % by default, use a color that is dark enough to print on paper as
- % nearly black, but still distinguishable for online viewing.
- \def\urlcolor{\rgbDarkRed}
- \def\linkcolor{\rgbDarkRed}
+ % by default, use black for everything.
+ \def\urlcolor{\rgbBlack}
+ \def\linkcolor{\rgbBlack}
\def\endlink{\setcolor{\maincolor}\pdfendlink}
%
% Adding outlines to PDF; macros for calculating structure of outlines
@@ -1272,18 +1406,13 @@ output) for that.)}
% page number. We could generate a destination for the section
% text in the case where a section has no node, but it doesn't
% seem worth the trouble, since most documents are normally structured.
- \edef\pdfoutlinedest{#3}%
- \ifx\pdfoutlinedest\empty
- \def\pdfoutlinedest{#4}%
- \else
- \txiescapepdf\pdfoutlinedest
+ \setpdfoutlinetext{#1}
+ \setpdfdestname{#3}
+ \ifx\pdfdestname\empty
+ \def\pdfdestname{#4}%
\fi
%
- % Also escape PDF chars in the display string.
- \edef\pdfoutlinetext{#1}%
- \txiescapepdf\pdfoutlinetext
- %
- \pdfoutline goto name{\pdfmkpgn{\pdfoutlinedest}}#2{\pdfoutlinetext}%
+ \pdfoutline goto name{\pdfmkpgn{\pdfdestname}}#2{\pdfoutlinetext}%
}
%
\def\pdfmakeoutlines{%
@@ -1438,41 +1567,297 @@ output) for that.)}
\let\pdfmakeoutlines = \relax
\fi % \ifx\pdfoutput
-
-\message{fonts,}
-
-% Change the current font style to #1, remembering it in \curfontstyle.
-% For now, we do not accumulate font styles: @b{@i{foo}} prints foo in
-% italics, not bold italics.
%
-\def\setfontstyle#1{%
- \def\curfontstyle{#1}% not as a control sequence, because we are \edef'd.
- \csname ten#1\endcsname % change the current font
-}
-
-% Select #1 fonts with the current style.
+% For XeTeX
%
-\def\selectfonts#1{\csname #1fonts\endcsname \csname\curfontstyle\endcsname}
-
-\def\rm{\fam=0 \setfontstyle{rm}}
-\def\it{\fam=\itfam \setfontstyle{it}}
-\def\sl{\fam=\slfam \setfontstyle{sl}}
-\def\bf{\fam=\bffam \setfontstyle{bf}}\def\bfstylename{bf}
-\def\tt{\fam=\ttfam \setfontstyle{tt}}
-
-% Unfortunately, we have to override this for titles and the like, since
-% in those cases "rm" is bold. Sigh.
-\def\rmisbold{\rm\def\curfontstyle{bf}}
+\ifx\XeTeXrevision\thisisundefined
+\else
+ %
+ % XeTeX version check
+ %
+ \ifnum\strcmp{\the\XeTeXversion\XeTeXrevision}{0.99996}>-1
+ % TeX Live 2016 contains XeTeX 0.99996 and xdvipdfmx 20160307.
+ % It can use the `dvipdfmx:config' special (from TeX Live SVN r40941).
+ % For avoiding PDF destination name replacement, we use this special
+ % instead of xdvipdfmx's command line option `-C 0x0010'.
+ \special{dvipdfmx:config C 0x0010}
+ % XeTeX 0.99995+ comes with xdvipdfmx 20160307+.
+ % It can handle Unicode destination names for PDF.
+ \txiuseunicodedestnametrue
+ \else
+ % XeTeX < 0.99996 (TeX Live < 2016) cannot use the
+ % `dvipdfmx:config' special.
+ % So for avoiding PDF destination name replacement,
+ % xdvipdfmx's command line option `-C 0x0010' is necessary.
+ %
+ % XeTeX < 0.99995 can not handle Unicode destination names for PDF
+ % because xdvipdfmx 20150315 has a UTF-16 conversion issue.
+ % It is fixed by xdvipdfmx 20160106 (TeX Live SVN r39753).
+ \txiuseunicodedestnamefalse
+ \fi
+ %
+ % Color support
+ %
+ \def\rgbDarkRed{0.50 0.09 0.12}
+ \def\rgbBlack{0 0 0}
+ %
+ \def\pdfsetcolor#1{\special{pdf:scolor [#1]}}
+ %
+ % Set color, and create a mark which defines \thiscolor accordingly,
+ % so that \makeheadline knows which color to restore.
+ \def\setcolor#1{%
+ \xdef\lastcolordefs{\gdef\noexpand\thiscolor{#1}}%
+ \domark
+ \pdfsetcolor{#1}%
+ }
+ %
+ \def\maincolor{\rgbBlack}
+ \pdfsetcolor{\maincolor}
+ \edef\thiscolor{\maincolor}
+ \def\lastcolordefs{}
+ %
+ \def\makefootline{%
+ \baselineskip24pt
+ \line{\pdfsetcolor{\maincolor}\the\footline}%
+ }
+ %
+ \def\makeheadline{%
+ \vbox to 0pt{%
+ \vskip-22.5pt
+ \line{%
+ \vbox to8.5pt{}%
+ % Extract \thiscolor definition from the marks.
+ \getcolormarks
+ % Typeset the headline with \maincolor, then restore the color.
+ \pdfsetcolor{\maincolor}\the\headline\pdfsetcolor{\thiscolor}%
+ }%
+ \vss
+ }%
+ \nointerlineskip
+ }
+ %
+ % PDF outline support
+ %
+ % Emulate pdfTeX primitive
+ \def\pdfdest name#1 xyz{%
+ \special{pdf:dest (#1) [@thispage /XYZ @xpos @ypos null]}%
+ }
+ %
+ \def\setpdfdestname#1{{%
+ % We have to set dummies so commands such as @code, and characters
+ % such as \, aren't expanded when present in a section title.
+ \indexnofonts
+ \makevalueexpandable
+ \turnoffactive
+ \iftxiuseunicodedestname
+ % Pass through Unicode characters.
+ \else
+ % Use ASCII approximations in destination names.
+ \passthroughcharsfalse
+ \fi
+ \def\pdfdestname{#1}%
+ \txiescapepdf\pdfdestname
+ }}
+ %
+ \def\setpdfoutlinetext#1{{%
+ \turnoffactive
+ % Always use Unicode characters in title texts.
+ \def\pdfoutlinetext{#1}%
+ % For XeTeX, xdvipdfmx converts to UTF-16.
+ % So we do not convert.
+ \txiescapepdf\pdfoutlinetext
+ }}
+ %
+ \def\pdfmkdest#1{%
+ \setpdfdestname{#1}%
+ \safewhatsit{\pdfdest name{\pdfdestname} xyz}%
+ }
+ %
+ % by default, use black for everything.
+ \def\urlcolor{\rgbBlack}
+ \def\linkcolor{\rgbBlack}
+ \def\endlink{\setcolor{\maincolor}\pdfendlink}
+ %
+ \def\dopdfoutline#1#2#3#4{%
+ \setpdfoutlinetext{#1}
+ \setpdfdestname{#3}
+ \ifx\pdfdestname\empty
+ \def\pdfdestname{#4}%
+ \fi
+ %
+ \special{pdf:out [-] #2 << /Title (\pdfoutlinetext) /A
+ << /S /GoTo /D (\pdfdestname) >> >> }%
+ }
+ %
+ \def\pdfmakeoutlines{%
+ \begingroup
+ %
+ % For XeTeX, counts of subentries are not necessary.
+ % Therefore, we read toc only once.
+ %
+ % We use node names as destinations.
+ \def\partentry##1##2##3##4{}% ignore parts in the outlines
+ \def\numchapentry##1##2##3##4{%
+ \dopdfoutline{##1}{1}{##3}{##4}}%
+ \def\numsecentry##1##2##3##4{%
+ \dopdfoutline{##1}{2}{##3}{##4}}%
+ \def\numsubsecentry##1##2##3##4{%
+ \dopdfoutline{##1}{3}{##3}{##4}}%
+ \def\numsubsubsecentry##1##2##3##4{%
+ \dopdfoutline{##1}{4}{##3}{##4}}%
+ %
+ \let\appentry\numchapentry%
+ \let\appsecentry\numsecentry%
+ \let\appsubsecentry\numsubsecentry%
+ \let\appsubsubsecentry\numsubsubsecentry%
+ \let\unnchapentry\numchapentry%
+ \let\unnsecentry\numsecentry%
+ \let\unnsubsecentry\numsubsecentry%
+ \let\unnsubsubsecentry\numsubsubsecentry%
+ %
+ % For XeTeX, xdvipdfmx converts strings to UTF-16.
+ % Therefore, the encoding and the language may not be considered.
+ %
+ \indexnofonts
+ \setupdatafile
+ % We can have normal brace characters in the PDF outlines, unlike
+ % Texinfo index files. So set that up.
+ \def\{{\lbracecharliteral}%
+ \def\}{\rbracecharliteral}%
+ \catcode`\\=\active \otherbackslash
+ \input \tocreadfilename
+ \endgroup
+ }
+ {\catcode`[=1 \catcode`]=2
+ \catcode`{=\other \catcode`}=\other
+ \gdef\lbracecharliteral[{]%
+ \gdef\rbracecharliteral[}]%
+ ]
-% Texinfo sort of supports the sans serif font style, which plain TeX does not.
-% So we set up a \sf.
-\newfam\sffam
-\def\sf{\fam=\sffam \setfontstyle{sf}}
-\let\li = \sf % Sometimes we call it \li, not \sf.
+ \special{pdf:docview << /PageMode /UseOutlines >> }
+ % ``\special{pdf:tounicode ...}'' is not necessary
+ % because xdvipdfmx converts strings from UTF-8 to UTF-16 without it.
+ % However, due to a UTF-16 conversion issue of xdvipdfmx 20150315,
+ % ``\special{pdf:dest ...}'' cannot handle non-ASCII strings.
+ % It is fixed by xdvipdfmx 20160106 (TeX Live SVN r39753).
+%
+ \def\skipspaces#1{\def\PP{#1}\def\D{|}%
+ \ifx\PP\D\let\nextsp\relax
+ \else\let\nextsp\skipspaces
+ \addtokens{\filename}{\PP}%
+ \advance\filenamelength by 1
+ \fi
+ \nextsp}
+ \def\getfilename#1{%
+ \filenamelength=0
+ % If we don't expand the argument now, \skipspaces will get
+ % snagged on things like "@value{foo}".
+ \edef\temp{#1}%
+ \expandafter\skipspaces\temp|\relax
+ }
+ % make a live url in pdf output.
+ \def\pdfurl#1{%
+ \begingroup
+ % it seems we really need yet another set of dummies; have not
+ % tried to figure out what each command should do in the context
+ % of @url. for now, just make @/ a no-op, that's the only one
+ % people have actually reported a problem with.
+ %
+ \normalturnoffactive
+ \def\@{@}%
+ \let\/=\empty
+ \makevalueexpandable
+ % do we want to go so far as to use \indexnofonts instead of just
+ % special-casing \var here?
+ \def\var##1{##1}%
+ %
+ \leavevmode\setcolor{\urlcolor}%
+ \special{pdf:bann << /Border [0 0 0]
+ /Subtype /Link /A << /S /URI /URI (#1) >> >>}%
+ \endgroup}
+ \def\endlink{\setcolor{\maincolor}\special{pdf:eann}}
+ \def\pdfgettoks#1.{\setbox\boxA=\hbox{\toksA={#1.}\toksB={}\maketoks}}
+ \def\addtokens#1#2{\edef\addtoks{\noexpand#1={\the#1#2}}\addtoks}
+ \def\adn#1{\addtokens{\toksC}{#1}\global\countA=1\let\next=\maketoks}
+ \def\poptoks#1#2|ENDTOKS|{\let\first=#1\toksD={#1}\toksA={#2}}
+ \def\maketoks{%
+ \expandafter\poptoks\the\toksA|ENDTOKS|\relax
+ \ifx\first0\adn0
+ \else\ifx\first1\adn1 \else\ifx\first2\adn2 \else\ifx\first3\adn3
+ \else\ifx\first4\adn4 \else\ifx\first5\adn5 \else\ifx\first6\adn6
+ \else\ifx\first7\adn7 \else\ifx\first8\adn8 \else\ifx\first9\adn9
+ \else
+ \ifnum0=\countA\else\makelink\fi
+ \ifx\first.\let\next=\done\else
+ \let\next=\maketoks
+ \addtokens{\toksB}{\the\toksD}
+ \ifx\first,\addtokens{\toksB}{\space}\fi
+ \fi
+ \fi\fi\fi\fi\fi\fi\fi\fi\fi\fi
+ \next}
+ \def\makelink{\addtokens{\toksB}%
+ {\noexpand\pdflink{\the\toksC}}\toksC={}\global\countA=0}
+ \def\pdflink#1{%
+ \special{pdf:bann << /Border [0 0 0]
+ /Type /Annot /Subtype /Link /A << /S /GoTo /D (#1) >> >>}%
+ \setcolor{\linkcolor}#1\endlink}
+ \def\done{\edef\st{\global\noexpand\toksA={\the\toksB}}\st}
+%
+ %
+ % @image support
+ %
+ % #1 is image name, #2 width (might be empty/whitespace), #3 height (ditto).
+ \def\doxeteximage#1#2#3{%
+ \def\xeteximagewidth{#2}\setbox0 = \hbox{\ignorespaces #2}%
+ \def\xeteximageheight{#3}\setbox2 = \hbox{\ignorespaces #3}%
+ %
+ % XeTeX (and the PDF format) supports .pdf, .png, .jpg (among
+ % others). Let's try in that order, PDF first since if
+ % someone has a scalable image, presumably better to use that than a
+ % bitmap.
+ \let\xeteximgext=\empty
+ \begingroup
+ \openin 1 #1.pdf \ifeof 1
+ \openin 1 #1.PDF \ifeof 1
+ \openin 1 #1.png \ifeof 1
+ \openin 1 #1.jpg \ifeof 1
+ \openin 1 #1.jpeg \ifeof 1
+ \openin 1 #1.JPG \ifeof 1
+ \errmessage{Could not find image file #1 for XeTeX}%
+ \else \gdef\xeteximgext{JPG}%
+ \fi
+ \else \gdef\xeteximgext{jpeg}%
+ \fi
+ \else \gdef\xeteximgext{jpg}%
+ \fi
+ \else \gdef\xeteximgext{png}%
+ \fi
+ \else \gdef\xeteximgext{PDF}%
+ \fi
+ \else \gdef\xeteximgext{pdf}%
+ \fi
+ \closein 1
+ \endgroup
+ %
+ \def\xetexpdfext{pdf}%
+ \ifx\xeteximgext\xetexpdfext
+ \XeTeXpdffile "#1".\xeteximgext ""
+ \else
+ \def\xetexpdfext{PDF}%
+ \ifx\xeteximgext\xetexpdfext
+ \XeTeXpdffile "#1".\xeteximgext ""
+ \else
+ \XeTeXpicfile "#1".\xeteximgext ""
+ \fi
+ \fi
+ \ifdim \wd0 >0pt width \xeteximagewidth \fi
+ \ifdim \wd2 >0pt height \xeteximageheight \fi \relax
+ }
+\fi
-% We don't need math for this font style.
-\def\ttsl{\setfontstyle{ttsl}}
+%
+\message{fonts,}
% Set the baselineskip to #1, and the lineskip and strut size
% correspondingly. There is no deep meaning behind these magic numbers
@@ -1821,8 +2206,10 @@ end
% A few fonts for @defun names and args.
\setfont\defbf\bfshape{10}{\magstep1}{OT1}
\setfont\deftt\ttshape{10}{\magstep1}{OT1TT}
+\setfont\defsl\slshape{10}{\magstep1}{OT1TT}
\setfont\defttsl\ttslshape{10}{\magstep1}{OT1TT}
-\def\df{\let\tentt=\deftt \let\tenbf = \defbf \let\tenttsl=\defttsl \bf}
+\def\df{\let\ttfont=\deftt \let\bffont = \defbf
+\let\ttslfont=\defttsl \let\slfont=\defsl \bf}
% Fonts for indices, footnotes, small examples (9pt).
\def\smallnominalsize{9pt}
@@ -1883,6 +2270,7 @@ end
% Section fonts (14.4pt).
\def\secnominalsize{14pt}
\setfont\secrm\rmbshape{12}{\magstep1}{OT1}
+\setfont\secrmnotbold\rmshape{12}{\magstep1}{OT1}
\setfont\secit\itbshape{10}{\magstep2}{OT1IT}
\setfont\secsl\slbshape{10}{\magstep2}{OT1}
\setfont\sectt\ttbshape{12}{\magstep1}{OT1TT}
@@ -1908,7 +2296,7 @@ end
\font\ssecsy=cmsy10 scaled 1315
\def\ssececsize{1200}
-% Reduced fonts for @acro in text (10pt).
+% Reduced fonts for @acronym in text (10pt).
\def\reducednominalsize{10pt}
\setfont\reducedrm\rmshape{10}{1000}{OT1}
\setfont\reducedtt\ttshape{10}{1000}{OT1TT}
@@ -1952,8 +2340,10 @@ end
% A few fonts for @defun names and args.
\setfont\defbf\bfshape{10}{\magstephalf}{OT1}
\setfont\deftt\ttshape{10}{\magstephalf}{OT1TT}
+\setfont\defsl\slshape{10}{\magstephalf}{OT1TT}
\setfont\defttsl\ttslshape{10}{\magstephalf}{OT1TT}
-\def\df{\let\tentt=\deftt \let\tenbf = \defbf \let\tenttsl=\defttsl \bf}
+\def\df{\let\ttfont=\deftt \let\bffont = \defbf
+\let\slfont=\defsl \let\ttslfont=\defttsl \bf}
% Fonts for indices, footnotes, small examples (9pt).
\def\smallnominalsize{9pt}
@@ -2039,7 +2429,7 @@ end
\font\ssecsy=cmsy10
\def\ssececsize{1000}
-% Reduced fonts for @acro in text (9pt).
+% Reduced fonts for @acronym in text (9pt).
\def\reducednominalsize{9pt}
\setfont\reducedrm\rmshape{9}{1000}{OT1}
\setfont\reducedtt\ttshape{9}{1000}{OT1TT}
@@ -2059,6 +2449,12 @@ end
\rm
} % end of 10pt text font size definitions, \definetextfontsizex
+% Fonts for short table of contents.
+\setfont\shortcontrm\rmshape{12}{1000}{OT1}
+\setfont\shortcontbf\bfshape{10}{\magstep1}{OT1} % no cmb12
+\setfont\shortcontsl\slshape{12}{1000}{OT1}
+\setfont\shortconttt\ttshape{12}{1000}{OT1TT}
+
% We provide the user-level command
% @fonttextsize 10
@@ -2085,102 +2481,111 @@ end
\endgroup
}
+%
+% Change the current font style to #1, remembering it in \curfontstyle.
+% For now, we do not accumulate font styles: @b{@i{foo}} prints foo in
+% italics, not bold italics.
+%
+\def\setfontstyle#1{%
+ \def\curfontstyle{#1}% not as a control sequence, because we are \edef'd.
+ \csname #1font\endcsname % change the current font
+}
+
+\def\rm{\fam=0 \setfontstyle{rm}}
+\def\it{\fam=\itfam \setfontstyle{it}}
+\def\sl{\fam=\slfam \setfontstyle{sl}}
+\def\bf{\fam=\bffam \setfontstyle{bf}}\def\bfstylename{bf}
+\def\tt{\fam=\ttfam \setfontstyle{tt}}
+
+% Texinfo sort of supports the sans serif font style, which plain TeX does not.
+% So we set up a \sf.
+\newfam\sffam
+\def\sf{\fam=\sffam \setfontstyle{sf}}
+
+% We don't need math for this font style.
+\def\ttsl{\setfontstyle{ttsl}}
+
% In order for the font changes to affect most math symbols and letters,
-% we have to define the \textfont of the standard families. Since
-% texinfo doesn't allow for producing subscripts and superscripts except
-% in the main text, we don't bother to reset \scriptfont and
-% \scriptscriptfont (which would also require loading a lot more fonts).
+% we have to define the \textfont of the standard families. We don't
+% bother to reset \scriptfont and \scriptscriptfont; awaiting user need.
%
\def\resetmathfonts{%
- \textfont0=\tenrm \textfont1=\teni \textfont2=\tensy
- \textfont\itfam=\tenit \textfont\slfam=\tensl \textfont\bffam=\tenbf
- \textfont\ttfam=\tentt \textfont\sffam=\tensf
+ \textfont0=\rmfont \textfont1=\ifont \textfont2=\syfont
+ \textfont\itfam=\itfont \textfont\slfam=\slfont \textfont\bffam=\bffont
+ \textfont\ttfam=\ttfont \textfont\sffam=\sffont
}
-% The font-changing commands redefine the meanings of \tenSTYLE, instead
-% of just \STYLE. We do this because \STYLE needs to also set the
-% current \fam for math mode. Our \STYLE (e.g., \rm) commands hardwire
-% \tenSTYLE to set the current font.
+%
+
+% The font-changing commands (all called \...fonts) redefine the meanings
+% of \STYLEfont, instead of just \STYLE. We do this because \STYLE needs
+% to also set the current \fam for math mode. Our \STYLE (e.g., \rm)
+% commands hardwire \STYLEfont to set the current font.
%
% Each font-changing command also sets the names \lsize (one size lower)
-% and \lllsize (three sizes lower). These relative commands are used in
-% the LaTeX logo and acronyms.
+% and \lllsize (three sizes lower). These relative commands are used
+% in, e.g., the LaTeX logo and acronyms.
%
% This all needs generalizing, badly.
%
-\def\textfonts{%
- \let\tenrm=\textrm \let\tenit=\textit \let\tensl=\textsl
- \let\tenbf=\textbf \let\tentt=\texttt \let\smallcaps=\textsc
- \let\tensf=\textsf \let\teni=\texti \let\tensy=\textsy
- \let\tenttsl=\textttsl
- \def\curfontsize{text}%
- \def\lsize{reduced}\def\lllsize{smaller}%
- \resetmathfonts \setleading{\textleading}}
-\def\titlefonts{%
- \let\tenrm=\titlerm \let\tenit=\titleit \let\tensl=\titlesl
- \let\tenbf=\titlebf \let\tentt=\titlett \let\smallcaps=\titlesc
- \let\tensf=\titlesf \let\teni=\titlei \let\tensy=\titlesy
- \let\tenttsl=\titlettsl
- \def\curfontsize{title}%
- \def\lsize{chap}\def\lllsize{subsec}%
- \resetmathfonts \setleading{27pt}}
-\def\titlefont#1{{\titlefonts\rmisbold #1}}
-\def\chapfonts{%
- \let\tenrm=\chaprm \let\tenit=\chapit \let\tensl=\chapsl
- \let\tenbf=\chapbf \let\tentt=\chaptt \let\smallcaps=\chapsc
- \let\tensf=\chapsf \let\teni=\chapi \let\tensy=\chapsy
- \let\tenttsl=\chapttsl
- \def\curfontsize{chap}%
- \def\lsize{sec}\def\lllsize{text}%
- \resetmathfonts \setleading{19pt}}
-\def\secfonts{%
- \let\tenrm=\secrm \let\tenit=\secit \let\tensl=\secsl
- \let\tenbf=\secbf \let\tentt=\sectt \let\smallcaps=\secsc
- \let\tensf=\secsf \let\teni=\seci \let\tensy=\secsy
- \let\tenttsl=\secttsl
- \def\curfontsize{sec}%
- \def\lsize{subsec}\def\lllsize{reduced}%
- \resetmathfonts \setleading{16pt}}
-\def\subsecfonts{%
- \let\tenrm=\ssecrm \let\tenit=\ssecit \let\tensl=\ssecsl
- \let\tenbf=\ssecbf \let\tentt=\ssectt \let\smallcaps=\ssecsc
- \let\tensf=\ssecsf \let\teni=\sseci \let\tensy=\ssecsy
- \let\tenttsl=\ssecttsl
- \def\curfontsize{ssec}%
- \def\lsize{text}\def\lllsize{small}%
- \resetmathfonts \setleading{15pt}}
-\let\subsubsecfonts = \subsecfonts
-\def\reducedfonts{%
- \let\tenrm=\reducedrm \let\tenit=\reducedit \let\tensl=\reducedsl
- \let\tenbf=\reducedbf \let\tentt=\reducedtt \let\reducedcaps=\reducedsc
- \let\tensf=\reducedsf \let\teni=\reducedi \let\tensy=\reducedsy
- \let\tenttsl=\reducedttsl
- \def\curfontsize{reduced}%
- \def\lsize{small}\def\lllsize{smaller}%
- \resetmathfonts \setleading{10.5pt}}
-\def\smallfonts{%
- \let\tenrm=\smallrm \let\tenit=\smallit \let\tensl=\smallsl
- \let\tenbf=\smallbf \let\tentt=\smalltt \let\smallcaps=\smallsc
- \let\tensf=\smallsf \let\teni=\smalli \let\tensy=\smallsy
- \let\tenttsl=\smallttsl
- \def\curfontsize{small}%
- \def\lsize{smaller}\def\lllsize{smaller}%
- \resetmathfonts \setleading{10.5pt}}
-\def\smallerfonts{%
- \let\tenrm=\smallerrm \let\tenit=\smallerit \let\tensl=\smallersl
- \let\tenbf=\smallerbf \let\tentt=\smallertt \let\smallcaps=\smallersc
- \let\tensf=\smallersf \let\teni=\smalleri \let\tensy=\smallersy
- \let\tenttsl=\smallerttsl
- \def\curfontsize{smaller}%
- \def\lsize{smaller}\def\lllsize{smaller}%
- \resetmathfonts \setleading{9.5pt}}
-% Fonts for short table of contents.
-\setfont\shortcontrm\rmshape{12}{1000}{OT1}
-\setfont\shortcontbf\bfshape{10}{\magstep1}{OT1} % no cmb12
-\setfont\shortcontsl\slshape{12}{1000}{OT1}
-\setfont\shortconttt\ttshape{12}{1000}{OT1TT}
+\def\assignfonts#1{%
+ \expandafter\let\expandafter\rmfont\csname #1rm\endcsname
+ \expandafter\let\expandafter\itfont\csname #1it\endcsname
+ \expandafter\let\expandafter\slfont\csname #1sl\endcsname
+ \expandafter\let\expandafter\bffont\csname #1bf\endcsname
+ \expandafter\let\expandafter\ttfont\csname #1tt\endcsname
+ \expandafter\let\expandafter\smallcaps\csname #1sc\endcsname
+ \expandafter\let\expandafter\sffont \csname #1sf\endcsname
+ \expandafter\let\expandafter\ifont \csname #1i\endcsname
+ \expandafter\let\expandafter\syfont \csname #1sy\endcsname
+ \expandafter\let\expandafter\ttslfont\csname #1ttsl\endcsname
+}
+
+\newif\ifrmisbold
+
+% Select smaller font size with the current style. Used to change font size
+% in, e.g., the LaTeX logo and acronyms. If we are using bold fonts for
+% normal roman text, also use bold fonts for roman text in the smaller size.
+\def\switchtolllsize{%
+ \expandafter\assignfonts\expandafter{\lllsize}%
+ \ifrmisbold
+ \let\rmfont\bffont
+ \fi
+ \csname\curfontstyle\endcsname
+}%
+
+\def\switchtolsize{%
+ \expandafter\assignfonts\expandafter{\lsize}%
+ \ifrmisbold
+ \let\rmfont\bffont
+ \fi
+ \csname\curfontstyle\endcsname
+}%
+
+\def\definefontsetatsize#1#2#3#4#5{%
+\expandafter\def\csname #1fonts\endcsname{%
+ \def\curfontsize{#1}%
+ \def\lsize{#2}\def\lllsize{#3}%
+ \csname rmisbold#5\endcsname
+ \assignfonts{#1}%
+ \resetmathfonts
+ \setleading{#4}%
+}}
+
+\definefontsetatsize{text} {reduced}{smaller}{\textleading}{false}
+\definefontsetatsize{title} {chap} {subsec} {27pt} {true}
+\definefontsetatsize{chap} {sec} {text} {19pt} {true}
+\definefontsetatsize{sec} {subsec} {reduced}{17pt} {true}
+\definefontsetatsize{ssec} {text} {small} {15pt} {true}
+\definefontsetatsize{reduced}{small} {smaller}{10.5pt}{false}
+\definefontsetatsize{small} {smaller}{smaller}{10.5pt}{false}
+\definefontsetatsize{smaller}{smaller}{smaller}{9.5pt} {false}
+
+\def\titlefont#1{{\titlefonts\rm #1}}
+\let\subsecfonts = \ssecfonts
+\let\subsubsecfonts = \ssecfonts
% Define these just so they can be easily changed for other fonts.
\def\angleleft{$\langle$}
@@ -2272,8 +2677,6 @@ end
\gdef\markupsetcodequoteleft{\let`\codequoteleft}
\gdef\markupsetcodequoteright{\let'\codequoteright}
-
-\gdef\markupsetnoligaturesquoteleft{\let`\noligaturesquoteleft}
}
\let\markupsetuplqcode \markupsetcodequoteleft
@@ -2282,6 +2685,9 @@ end
\let\markupsetuplqexample \markupsetcodequoteleft
\let\markupsetuprqexample \markupsetcodequoteright
%
+\let\markupsetuplqkbd \markupsetcodequoteleft
+\let\markupsetuprqkbd \markupsetcodequoteright
+%
\let\markupsetuplqsamp \markupsetcodequoteleft
\let\markupsetuprqsamp \markupsetcodequoteright
%
@@ -2291,8 +2697,6 @@ end
\let\markupsetuplqverbatim \markupsetcodequoteleft
\let\markupsetuprqverbatim \markupsetcodequoteright
-\let\markupsetuplqkbd \markupsetnoligaturesquoteleft
-
% Allow an option to not use regular directed right quote/apostrophe
% (char 0x27), but instead the undirected quote from cmtt (char 0x0d).
% The undirected quote is ugly, so don't make it the default, but it
@@ -2377,13 +2781,14 @@ end
\ifx\next,%
\else\ifx\next-%
\else\ifx\next.%
+ \else\ifx\next\.%
+ \else\ifx\next\comma%
\else\ptexslash
- \fi\fi\fi
+ \fi\fi\fi\fi\fi
\aftersmartic
}
-% like \smartslanted except unconditionally uses \ttsl, and no ic.
-% @var is set to this for defun arguments.
+% Unconditional use \ttsl, and no ic. @var is set to this for defuns.
\def\ttslanted#1{{\ttsl #1}}
% @cite is like \smartslanted except unconditionally use \sl. We never want
@@ -2427,8 +2832,8 @@ end
%
\catcode`@=11
\def\plainfrenchspacing{%
- \sfcode\dotChar =\@m \sfcode\questChar=\@m \sfcode\exclamChar=\@m
- \sfcode\colonChar=\@m \sfcode\semiChar =\@m \sfcode\commaChar =\@m
+ \sfcode`\.=\@m \sfcode`\?=\@m \sfcode`\!=\@m
+ \sfcode`\:=\@m \sfcode`\;=\@m \sfcode`\,=\@m
\def\endofsentencespacefactor{1000}% for @. and friends
}
\def\plainnonfrenchspacing{%
@@ -2448,34 +2853,12 @@ end
% @samp.
\def\samp#1{{\setupmarkupstyle{samp}\lq\tclose{#1}\rq\null}}
-% definition of @key that produces a lozenge. Doesn't adjust to text size.
-%\setfont\keyrm\rmshape{8}{1000}{OT1}
-%\font\keysy=cmsy9
-%\def\key#1{{\keyrm\textfont2=\keysy \leavevmode\hbox{%
-% \raise0.4pt\hbox{\angleleft}\kern-.08em\vtop{%
-% \vbox{\hrule\kern-0.4pt
-% \hbox{\raise0.4pt\hbox{\vphantom{\angleleft}}#1}}%
-% \kern-0.4pt\hrule}%
-% \kern-.06em\raise0.4pt\hbox{\angleright}}}}
+% @indicateurl is \samp, that is, with quotes.
+\let\indicateurl=\samp
-% definition of @key with no lozenge. If the current font is already
-% monospace, don't change it; that way, we respect @kbdinputstyle. But
-% if it isn't monospace, then use \tt.
-%
-\def\key#1{{\setupmarkupstyle{key}%
- \nohyphenation
- \ifmonospace\else\tt\fi
- #1}\null}
-
-% ctrl is no longer a Texinfo command.
-\def\ctrl #1{{\tt \rawbackslash \hat}#1}
-
-% @file, @option are the same as @samp.
-\let\file=\samp
-\let\option=\samp
-
-% @code is a modification of @t,
-% which makes spaces the same size as normal in the surrounding text.
+% @code (and similar) prints in typewriter, but with spaces the same
+% size as normal in the surrounding text, without hyphenation, etc.
+% This is a subroutine for that.
\def\tclose#1{%
{%
% Change normal interword space to be same as for the current font.
@@ -2498,14 +2881,14 @@ end
}
% We *must* turn on hyphenation at `-' and `_' in @code.
+% (But see \codedashfinish below.)
% Otherwise, it is too hard to avoid overfull hboxes
% in the Emacs manual, the Library manual, etc.
-
+%
% Unfortunately, TeX uses one parameter (\hyphenchar) to control
% both hyphenation at - and hyphenation within words.
% We must therefore turn them both off (\tclose does that)
-% and arrange explicitly to hyphenate at a dash.
-% -- rms.
+% and arrange explicitly to hyphenate at a dash. -- rms.
{
\catcode`\-=\active \catcode`\_=\active
\catcode`\'=\active \catcode`\`=\active
@@ -2519,17 +2902,38 @@ end
\let-\codedash
\let_\codeunder
\else
- \let-\realdash
+ \let-\normaldash
\let_\realunder
\fi
+ % Given -foo (with a single dash), we do not want to allow a break
+ % after the hyphen.
+ \global\let\codedashprev=\codedash
+ %
\codex
}
+ %
+ \gdef\codedash{\futurelet\next\codedashfinish}
+ \gdef\codedashfinish{%
+ \normaldash % always output the dash character itself.
+ %
+ % Now, output a discretionary to allow a line break, unless
+ % (a) the next character is a -, or
+ % (b) the preceding character is a -.
+ % E.g., given --posix, we do not want to allow a break after either -.
+ % Given --foo-bar, we do want to allow a break between the - and the b.
+ \ifx\next\codedash \else
+ \ifx\codedashprev\codedash
+ \else \discretionary{}{}{}\fi
+ \fi
+ % we need the space after the = for the case when \next itself is a
+ % space token; it would get swallowed otherwise. As in @code{- a}.
+ \global\let\codedashprev= \next
+ }
}
-
+\def\normaldash{-}
+%
\def\codex #1{\tclose{#1}\endgroup}
-\def\realdash{-}
-\def\codedash{-\discretionary{}{}{}}
\def\codeunder{%
% this is all so @math{@code{var_name}+1} can work. In math mode, _
% is "active" (mathcode"8000) and \normalunderscore (or \char95, etc.)
@@ -2543,9 +2947,9 @@ end
}
% An additional complication: the above will allow breaks after, e.g.,
-% each of the four underscores in __typeof__. This is undesirable in
-% some manuals, especially if they don't have long identifiers in
-% general. @allowcodebreaks provides a way to control this.
+% each of the four underscores in __typeof__. This is bad.
+% @allowcodebreaks provides a document-level way to turn breaking at -
+% and _ on and off.
%
\newif\ifallowcodebreaks \allowcodebreakstrue
@@ -2564,37 +2968,28 @@ end
\fi\fi
}
-% @uref (abbreviation for `urlref') takes an optional (comma-separated)
-% second argument specifying the text to display and an optional third
-% arg as text to display instead of (rather than in addition to) the url
-% itself. First (mandatory) arg is the url.
-% (This \urefnobreak definition isn't used now, leaving it for a while
-% for comparison.)
-\def\urefnobreak#1{\dourefnobreak #1,,,\finish}
-\def\dourefnobreak#1,#2,#3,#4\finish{\begingroup
- \unsepspaces
- \pdfurl{#1}%
- \setbox0 = \hbox{\ignorespaces #3}%
- \ifdim\wd0 > 0pt
- \unhbox0 % third arg given, show only that
- \else
- \setbox0 = \hbox{\ignorespaces #2}%
- \ifdim\wd0 > 0pt
- \ifpdf
- \unhbox0 % PDF: 2nd arg given, show only it
- \else
- \unhbox0\ (\code{#1})% DVI: 2nd arg given, show both it and url
- \fi
- \else
- \code{#1}% only url given, so show it
- \fi
- \fi
- \endlink
-\endgroup}
+% For @command, @env, @file, @option quotes seem unnecessary,
+% so use \code rather than \samp.
+\let\command=\code
+\let\env=\code
+\let\file=\code
+\let\option=\code
-% This \urefbreak definition is the active one.
+% @uref (abbreviation for `urlref') aka @url takes an optional
+% (comma-separated) second argument specifying the text to display and
+% an optional third arg as text to display instead of (rather than in
+% addition to) the url itself. First (mandatory) arg is the url.
+
+% TeX-only option to allow changing PDF output to show only the second
+% arg (if given), and not the url (which is then just the link target).
+\newif\ifurefurlonlylink
+
+% The main macro is \urefbreak, which allows breaking at expected
+% places within the url. (There used to be another version, which
+% didn't support automatic breaking.)
\def\urefbreak{\begingroup \urefcatcodes \dourefbreak}
\let\uref=\urefbreak
+%
\def\dourefbreak#1{\urefbreakfinish #1,,,\finish}
\def\urefbreakfinish#1,#2,#3,#4\finish{% doesn't work in @example
\unsepspaces
@@ -2603,12 +2998,32 @@ end
\ifdim\wd0 > 0pt
\unhbox0 % third arg given, show only that
\else
- \setbox0 = \hbox{\ignorespaces #2}%
+ \setbox0 = \hbox{\ignorespaces #2}% look for second arg
\ifdim\wd0 > 0pt
\ifpdf
- \unhbox0 % PDF: 2nd arg given, show only it
+ % For pdfTeX and LuaTeX
+ \ifurefurlonlylink
+ % PDF plus option to not display url, show just arg
+ \unhbox0
+ \else
+ % PDF, normally display both arg and url for consistency,
+ % visibility, if the pdf is eventually used to print, etc.
+ \unhbox0\ (\urefcode{#1})%
+ \fi
\else
- \unhbox0\ (\urefcode{#1})% DVI: 2nd arg given, show both it and url
+ \ifx\XeTeXrevision\thisisundefined
+ \unhbox0\ (\urefcode{#1})% DVI, always show arg and url
+ \else
+ % For XeTeX
+ \ifurefurlonlylink
+ % PDF plus option to not display url, show just arg
+ \unhbox0
+ \else
+ % PDF, normally display both arg and url for consistency,
+ % visibility, if the pdf is eventually used to print, etc.
+ \unhbox0\ (\urefcode{#1})%
+ \fi
+ \fi
\fi
\else
\urefcode{#1}% only url given, so show it
@@ -2619,9 +3034,9 @@ end
% Allow line breaks around only a few characters (only).
\def\urefcatcodes{%
- \catcode\ampChar=\active \catcode\dotChar=\active
- \catcode\hashChar=\active \catcode\questChar=\active
- \catcode\slashChar=\active
+ \catcode`\&=\active \catcode`\.=\active
+ \catcode`\#=\active \catcode`\?=\active
+ \catcode`\/=\active
}
{
\urefcatcodes
@@ -2648,8 +3063,10 @@ end
% we put a little stretch before and after the breakable chars, to help
% line breaking of long url's. The unequal skips make look better in
% cmtt at least, especially for dots.
-\def\urefprestretch{\urefprebreak \hskip0pt plus.13em }
-\def\urefpoststretch{\urefpostbreak \hskip0pt plus.1em }
+\def\urefprestretchamount{.13em}
+\def\urefpoststretchamount{.1em}
+\def\urefprestretch{\urefprebreak \hskip0pt plus\urefprestretchamount\relax}
+\def\urefpoststretch{\urefpostbreak \hskip0pt plus\urefprestretchamount\relax}
%
\def\urefcodeamp{\urefprestretch \&\urefpoststretch}
\def\urefcodedot{\urefprestretch .\urefpoststretch}
@@ -2707,13 +3124,20 @@ end
\endlink
\endgroup}
\else
- \let\email=\uref
+ \ifx\XeTeXrevision\thisisundefined
+ \let\email=\uref
+ \else
+ \def\email#1{\doemail#1,,\finish}
+ \def\doemail#1,#2,#3\finish{\begingroup
+ \unsepspaces
+ \pdfurl{mailto:#1}%
+ \setbox0 = \hbox{\ignorespaces #2}%
+ \ifdim\wd0>0pt\unhbox0\else\code{#1}\fi
+ \endlink
+ \endgroup}
+ \fi
\fi
-% @kbd is like @code, except that if the argument is just one @key command,
-% then @kbd has no effect.
-\def\kbd#1{{\setupmarkupstyle{kbd}\def\look{#1}\expandafter\kbdfoo\look??\par}}
-
% @kbdinputstyle -- arg is `distinct' (@kbd uses slanted tty font always),
% `example' (@kbd uses ttsl only inside of @example and friends),
% or `code' (@kbd uses normal tty font always).
@@ -2737,16 +3161,36 @@ end
% Default is `distinct'.
\kbdinputstyle distinct
+% @kbd is like @code, except that if the argument is just one @key command,
+% then @kbd has no effect.
+\def\kbd#1{{\def\look{#1}\expandafter\kbdsub\look??\par}}
+
\def\xkey{\key}
-\def\kbdfoo#1#2#3\par{\def\one{#1}\def\three{#3}\def\threex{??}%
-\ifx\one\xkey\ifx\threex\three \key{#2}%
-\else{\tclose{\kbdfont\setupmarkupstyle{kbd}\look}}\fi
-\else{\tclose{\kbdfont\setupmarkupstyle{kbd}\look}}\fi}
+\def\kbdsub#1#2#3\par{%
+ \def\one{#1}\def\three{#3}\def\threex{??}%
+ \ifx\one\xkey\ifx\threex\three \key{#2}%
+ \else{\tclose{\kbdfont\setupmarkupstyle{kbd}\look}}\fi
+ \else{\tclose{\kbdfont\setupmarkupstyle{kbd}\look}}\fi
+}
-% For @indicateurl, @env, @command quotes seem unnecessary, so use \code.
-\let\indicateurl=\code
-\let\env=\code
-\let\command=\code
+% definition of @key that produces a lozenge. Doesn't adjust to text size.
+%\setfont\keyrm\rmshape{8}{1000}{OT1}
+%\font\keysy=cmsy9
+%\def\key#1{{\keyrm\textfont2=\keysy \leavevmode\hbox{%
+% \raise0.4pt\hbox{\angleleft}\kern-.08em\vtop{%
+% \vbox{\hrule\kern-0.4pt
+% \hbox{\raise0.4pt\hbox{\vphantom{\angleleft}}#1}}%
+% \kern-0.4pt\hrule}%
+% \kern-.06em\raise0.4pt\hbox{\angleright}}}}
+
+% definition of @key with no lozenge. If the current font is already
+% monospace, don't change it; that way, we respect @kbdinputstyle. But
+% if it isn't monospace, then use \tt.
+%
+\def\key#1{{\setupmarkupstyle{key}%
+ \nohyphenation
+ \ifmonospace\else\tt\fi
+ #1}\null}
% @clicksequence{File @click{} Open ...}
\def\clicksequence#1{\begingroup #1\endgroup}
@@ -2760,18 +3204,13 @@ end
%
\def\dmn#1{\thinspace #1}
-% @l was never documented to mean ``switch to the Lisp font'',
-% and it is not used as such in any manual I can find. We need it for
-% Polish suppressed-l. --karl, 22sep96.
-%\def\l#1{{\li #1}\null}
-
% @acronym for "FBI", "NATO", and the like.
% We print this one point size smaller, since it's intended for
% all-uppercase.
%
\def\acronym#1{\doacronym #1,,\finish}
\def\doacronym#1,#2,#3\finish{%
- {\selectfonts\lsize #1}%
+ {\switchtolsize #1}%
\def\temp{#2}%
\ifx\temp\empty \else
\space ({\unsepspaces \ignorespaces \temp \unskip})%
@@ -2817,21 +3256,24 @@ end
\def\mathbackslash{\ifnum\fam=\ttfam \mathchar"075C \else\backslash \fi}
%
\def\math{%
- \tex
- \mathunderscore
- \let\\ = \mathbackslash
- \mathactive
- % make the texinfo accent commands work in math mode
- \let\"=\ddot
- \let\'=\acute
- \let\==\bar
- \let\^=\hat
- \let\`=\grave
- \let\u=\breve
- \let\v=\check
- \let\~=\tilde
- \let\dotaccent=\dot
- $\finishmath
+ \ifmmode\else % only go into math if not in math mode already
+ \tex
+ \mathunderscore
+ \let\\ = \mathbackslash
+ \mathactive
+ % make the texinfo accent commands work in math mode
+ \let\"=\ddot
+ \let\'=\acute
+ \let\==\bar
+ \let\^=\hat
+ \let\`=\grave
+ \let\u=\breve
+ \let\v=\check
+ \let\~=\tilde
+ \let\dotaccent=\dot
+ % have to provide another name for sup operator
+ \let\mathopsup=\sup
+ $\expandafter\finishmath\fi
}
\def\finishmath#1{#1$\endgroup} % Close the group opened by \tex.
@@ -2854,6 +3296,18 @@ end
}
}
+% for @sub and @sup, if in math mode, just do a normal sub/superscript.
+% If in text, use math to place as sub/superscript, but switch
+% into text mode, with smaller fonts. This is a different font than the
+% one used for real math sub/superscripts (8pt vs. 7pt), but let's not
+% fix it (significant additions to font machinery) until someone notices.
+%
+\def\sub{\ifmmode \expandafter\sb \else \expandafter\finishsub\fi}
+\def\finishsub#1{$\sb{\hbox{\switchtolllsize #1}}$}%
+%
+\def\sup{\ifmmode \expandafter\ptexsp \else \expandafter\finishsup\fi}
+\def\finishsup#1{$\ptexsp{\hbox{\switchtolllsize #1}}$}%
+
% @inlinefmt{FMTNAME,PROCESSED-TEXT} and @inlineraw{FMTNAME,RAW-TEXT}.
% Ignore unless FMTNAME == tex; then it is like @iftex and @tex,
% except specified as a normal braced arg, so no newlines to worry about.
@@ -2865,6 +3319,15 @@ end
\def\inlinefmtname{#1}%
\ifx\inlinefmtname\outfmtnametex \ignorespaces #2\fi
}
+%
+% @inlinefmtifelse{FMTNAME,THEN-TEXT,ELSE-TEXT} expands THEN-TEXT if
+% FMTNAME is tex, else ELSE-TEXT.
+\long\def\inlinefmtifelse#1{\doinlinefmtifelse #1,,,\finish}
+\long\def\doinlinefmtifelse#1,#2,#3,#4,\finish{%
+ \def\inlinefmtname{#1}%
+ \ifx\inlinefmtname\outfmtnametex \ignorespaces #2\else \ignorespaces #3\fi
+}
+%
% For raw, must switch into @tex before parsing the argument, to avoid
% setting catcodes prematurely. Doing it this way means that, for
% example, @inlineraw{html, foo{bar} gets a parse error instead of being
@@ -2881,6 +3344,23 @@ end
\endgroup % close group opened by \tex.
}
+% @inlineifset{VAR, TEXT} expands TEXT if VAR is @set.
+%
+\long\def\inlineifset#1{\doinlineifset #1,\finish}
+\long\def\doinlineifset#1,#2,\finish{%
+ \def\inlinevarname{#1}%
+ \expandafter\ifx\csname SET\inlinevarname\endcsname\relax
+ \else\ignorespaces#2\fi
+}
+
+% @inlineifclear{VAR, TEXT} expands TEXT if VAR is not @set.
+%
+\long\def\inlineifclear#1{\doinlineifclear #1,\finish}
+\long\def\doinlineifclear#1,#2,\finish{%
+ \def\inlinevarname{#1}%
+ \expandafter\ifx\csname SET\inlinevarname\endcsname\relax \ignorespaces#2\fi
+}
+
\message{glyphs,}
% and logos.
@@ -2890,23 +3370,10 @@ end
\let\atchar=\@
% @{ @} @lbracechar{} @rbracechar{} all generate brace characters.
-% Unless we're in typewriter, use \ecfont because the CM text fonts do
-% not have braces, and we don't want to switch into math.
-\def\mylbrace{{\ifmonospace\else\ecfont\fi \char123}}
-\def\myrbrace{{\ifmonospace\else\ecfont\fi \char125}}
-\let\{=\mylbrace \let\lbracechar=\{
-\let\}=\myrbrace \let\rbracechar=\}
-\begingroup
- % Definitions to produce \{ and \} commands for indices,
- % and @{ and @} for the aux/toc files.
- \catcode`\{ = \other \catcode`\} = \other
- \catcode`\[ = 1 \catcode`\] = 2
- \catcode`\! = 0 \catcode`\\ = \other
- !gdef!lbracecmd[\{]%
- !gdef!rbracecmd[\}]%
- !gdef!lbraceatcmd[@{]%
- !gdef!rbraceatcmd[@}]%
-!endgroup
+\def\lbracechar{{\ifmonospace\char123\else\ensuremath\lbrace\fi}}
+\def\rbracechar{{\ifmonospace\char125\else\ensuremath\rbrace\fi}}
+\let\{=\lbracechar
+\let\}=\rbracechar
% @comma{} to avoid , parsing problems.
\let\comma = ,
@@ -2924,8 +3391,8 @@ end
% Plain TeX defines: @AA @AE @O @OE @L (plus lowercase versions) @ss.
\def\questiondown{?`}
\def\exclamdown{!`}
-\def\ordf{\leavevmode\raise1ex\hbox{\selectfonts\lllsize \underbar{a}}}
-\def\ordm{\leavevmode\raise1ex\hbox{\selectfonts\lllsize \underbar{o}}}
+\def\ordf{\leavevmode\raise1ex\hbox{\switchtolllsize \underbar{a}}}
+\def\ordm{\leavevmode\raise1ex\hbox{\switchtolllsize \underbar{o}}}
% Dotless i and dotless j, used for accents.
\def\imacro{i}
@@ -2954,12 +3421,12 @@ end
{\setbox0=\hbox{T}%
\vbox to \ht0{\hbox{%
\ifx\textnominalsize\xwordpt
- % for 10pt running text, \lllsize (8pt) is too small for the A in LaTeX.
+ % for 10pt running text, lllsize (8pt) is too small for the A in LaTeX.
% Revert to plain's \scriptsize, which is 7pt.
\count255=\the\fam $\fam\count255 \scriptstyle A$%
\else
% For 11pt, we can use our lllsize.
- \selectfonts\lllsize A%
+ \switchtolllsize A%
\fi
}%
\vss
@@ -2968,11 +3435,16 @@ end
\TeX
}
-% Some math mode symbols.
-\def\bullet{$\ptexbullet$}
-\def\geq{\ifmmode \ge\else $\ge$\fi}
-\def\leq{\ifmmode \le\else $\le$\fi}
-\def\minus{\ifmmode -\else $-$\fi}
+% Some math mode symbols. Define \ensuremath to switch into math mode
+% unless we are already there. Expansion tricks may not be needed here,
+% but safer, and can't hurt.
+\def\ensuremath{\ifmmode \expandafter\asis \else\expandafter\ensuredmath \fi}
+\def\ensuredmath#1{$\relax#1$}
+%
+\def\bullet{\ensuremath\ptexbullet}
+\def\geq{\ensuremath\ge}
+\def\leq{\ensuremath\le}
+\def\minus{\ensuremath-}
% @dots{} outputs an ellipsis using the current font.
% We do .5em per period so that it has the same spacing in the cm
@@ -3020,7 +3492,7 @@ end
%
\newbox\errorbox
%
-{\tentt \global\dimen0 = 3em}% Width of the box.
+{\ttfont \global\dimen0 = 3em}% Width of the box.
\dimen2 = .55pt % Thickness of rules
% The text. (`r' is open on the right, `e' somewhat less so on the left.)
\setbox0 = \hbox{\kern-.75pt \reducedsf \putworderror\kern-1.5pt}
@@ -3136,20 +3608,32 @@ end
\def\Eogonek{{\ecfont \char"86}}\def\macrocharE{E}
\def\eogonek{{\ecfont \char"A6}}\def\macrochare{e}
%
-% Use the ec* fonts (cm-super in outline format) for non-CM glyphs.
-\def\ecfont{%
+% Use the European Computer Modern fonts (cm-super in outline format)
+% for non-CM glyphs. That is ec* for regular text and tc* for the text
+% companion symbols (LaTeX TS1 encoding). Both are part of the ec
+% package and follow the same conventions.
+%
+\def\ecfont{\etcfont{e}}
+\def\tcfont{\etcfont{t}}
+%
+\def\etcfont#1{%
% We can't distinguish serif/sans and italic/slanted, but this
% is used for crude hacks anyway (like adding French and German
% quotes to documents typeset with CM, where we lose kerning), so
% hopefully nobody will notice/care.
\edef\ecsize{\csname\curfontsize ecsize\endcsname}%
\edef\nominalsize{\csname\curfontsize nominalsize\endcsname}%
- \ifx\curfontstyle\bfstylename
- % bold:
- \font\thisecfont = ecb\ifusingit{i}{x}\ecsize \space at \nominalsize
+ \ifmonospace
+ % typewriter:
+ \font\thisecfont = #1ctt\ecsize \space at \nominalsize
\else
- % regular:
- \font\thisecfont = ec\ifusingit{ti}{rm}\ecsize \space at \nominalsize
+ \ifx\curfontstyle\bfstylename
+ % bold:
+ \font\thisecfont = #1cb\ifusingit{i}{x}\ecsize \space at \nominalsize
+ \else
+ % regular:
+ \font\thisecfont = #1c\ifusingit{ti}{rm}\ecsize \space at \nominalsize
+ \fi
\fi
\thisecfont
}
@@ -3159,7 +3643,7 @@ end
% Adapted from the plain.tex definition of \copyright.
%
\def\registeredsymbol{%
- $^{{\ooalign{\hfil\raise.07ex\hbox{\selectfonts\lllsize R}%
+ $^{{\ooalign{\hfil\raise.07ex\hbox{\switchtolllsize R}%
\hfil\crcr\Orb}}%
}$%
}
@@ -3192,13 +3676,16 @@ end
\newif\ifseenauthor
\newif\iffinishedtitlepage
-% Do an implicit @contents or @shortcontents after @end titlepage if the
-% user says @setcontentsaftertitlepage or @setshortcontentsaftertitlepage.
-%
-\newif\ifsetcontentsaftertitlepage
- \let\setcontentsaftertitlepage = \setcontentsaftertitlepagetrue
-\newif\ifsetshortcontentsaftertitlepage
- \let\setshortcontentsaftertitlepage = \setshortcontentsaftertitlepagetrue
+% @setcontentsaftertitlepage used to do an implicit @contents or
+% @shortcontents after @end titlepage, but it is now obsolete.
+\def\setcontentsaftertitlepage{%
+ \errmessage{@setcontentsaftertitlepage has been removed as a Texinfo
+ command; move your @contents command if you want the contents
+ after the title page.}}%
+\def\setshortcontentsaftertitlepage{%
+ \errmessage{@setshortcontentsaftertitlepage has been removed as a Texinfo
+ command; move your @shortcontents and @contents commands if you
+ want the contents after the title page.}}%
\parseargdef\shorttitlepage{%
\begingroup \hbox{}\vskip 1.5in \chaprm \centerline{#1}%
@@ -3240,20 +3727,6 @@ end
% Need this before the \...aftertitlepage checks so that if they are
% in effect the toc pages will come out with page numbers.
\HEADINGSon
- %
- % If they want short, they certainly want long too.
- \ifsetshortcontentsaftertitlepage
- \shortcontents
- \contents
- \global\let\shortcontents = \relax
- \global\let\contents = \relax
- \fi
- %
- \ifsetcontentsaftertitlepage
- \contents
- \global\let\contents = \relax
- \global\let\shortcontents = \relax
- \fi
}
\def\finishtitlepage{%
@@ -3262,14 +3735,27 @@ end
\finishedtitlepagetrue
}
+% Settings used for typesetting titles: no hyphenation, no indentation,
+% don't worry much about spacing, ragged right. This should be used
+% inside a \vbox, and fonts need to be set appropriately first. \par should
+% be specified before the end of the \vbox, since a vbox is a group.
+%
+\def\raggedtitlesettings{%
+ \rm
+ \hyphenpenalty=10000
+ \parindent=0pt
+ \tolerance=5000
+ \ptexraggedright
+}
+
% Macros to be used within @titlepage:
-\let\subtitlerm=\tenrm
+\let\subtitlerm=\rmfont
\def\subtitlefont{\subtitlerm \normalbaselineskip = 13pt \normalbaselines}
\parseargdef\title{%
\checkenv\titlepage
- \leftline{\titlefonts\rmisbold #1}
+ \vbox{\titlefonts \raggedtitlesettings #1\par}%
% print a rule at the page bottom also.
\finishedtitlepagefalse
\vskip4pt \hrule height 4pt width \hsize \vskip4pt
@@ -3290,7 +3776,7 @@ end
\else
\checkenv\titlepage
\ifseenauthor\else \vskip 0pt plus 1filll \seenauthortrue \fi
- {\secfonts\rmisbold \leftline{#1}}%
+ {\secfonts\rm \leftline{#1}}%
\fi
}
@@ -3304,7 +3790,7 @@ end
\newtoks\evenfootline % footline on even pages
\newtoks\oddfootline % footline on odd pages
-% Now make TeX use those variables
+% Now make \makeheadline and \makefootline in Plain TeX use those variables
\headline={{\textfonts\rm \ifodd\pageno \the\oddheadline
\else \the\evenheadline \fi}}
\footline={{\textfonts\rm \ifodd\pageno \the\oddfootline
@@ -3343,7 +3829,7 @@ end
%
% Leave some space for the footline. Hopefully ok to assume
% @evenfooting will not be used by itself.
- \global\advance\pageheight by -12pt
+ \global\advance\txipageheight by -12pt
\global\advance\vsize by -12pt
}
@@ -3360,13 +3846,17 @@ end
% @everyheadingmarks
% @everyfootingmarks
+% These define \getoddheadingmarks, \getevenheadingmarks,
+% \getoddfootingmarks, and \getevenfootingmarks, each to one of
+% \gettopheadingmarks, \getbottomheadingmarks.
+%
\def\evenheadingmarks{\headingmarks{even}{heading}}
\def\oddheadingmarks{\headingmarks{odd}{heading}}
\def\evenfootingmarks{\headingmarks{even}{footing}}
\def\oddfootingmarks{\headingmarks{odd}{footing}}
-\def\everyheadingmarks#1 {\headingmarks{even}{heading}{#1}
+\parseargdef\everyheadingmarks{\headingmarks{even}{heading}{#1}
\headingmarks{odd}{heading}{#1} }
-\def\everyfootingmarks#1 {\headingmarks{even}{footing}{#1}
+\parseargdef\everyfootingmarks{\headingmarks{even}{footing}{#1}
\headingmarks{odd}{footing}{#1} }
% #1 = even/odd, #2 = heading/footing, #3 = top/bottom.
\def\headingmarks#1#2#3 {%
@@ -3387,7 +3877,7 @@ end
% By default, they are off at the start of a document,
% and turned `on' after @end titlepage.
-\def\headings #1 {\csname HEADINGS#1\endcsname}
+\parseargdef\headings{\csname HEADINGS#1\endcsname}
\def\headingsoff{% non-global headings elimination
\evenheadline={\hfil}\evenfootline={\hfil}%
@@ -3407,7 +3897,7 @@ end
\global\evenfootline={\hfil}
\global\oddfootline={\hfil}
\global\evenheadline={\line{\folio\hfil\thistitle}}
-\global\oddheadline={\line{\thischapter\hfil\folio}}
+\global\oddheadline={\line{\thischapterheading\hfil\folio}}
\global\let\contentsalignmacro = \chapoddpage
}
\let\contentsalignmacro = \chappager
@@ -3418,8 +3908,8 @@ end
\global\pageno=1
\global\evenfootline={\hfil}
\global\oddfootline={\hfil}
-\global\evenheadline={\line{\thischapter\hfil\folio}}
-\global\oddheadline={\line{\thischapter\hfil\folio}}
+\global\evenheadline={\line{\thischapterheading\hfil\folio}}
+\global\oddheadline={\line{\thischapterheading\hfil\folio}}
\global\let\contentsalignmacro = \chappager
}
\def\HEADINGSon{\HEADINGSdouble}
@@ -3430,7 +3920,7 @@ end
\global\evenfootline={\hfil}
\global\oddfootline={\hfil}
\global\evenheadline={\line{\folio\hfil\thistitle}}
-\global\oddheadline={\line{\thischapter\hfil\folio}}
+\global\oddheadline={\line{\thischapterheading\hfil\folio}}
\global\let\contentsalignmacro = \chapoddpage
}
@@ -3438,8 +3928,8 @@ end
\def\HEADINGSsinglex{%
\global\evenfootline={\hfil}
\global\oddfootline={\hfil}
-\global\evenheadline={\line{\thischapter\hfil\folio}}
-\global\oddheadline={\line{\thischapter\hfil\folio}}
+\global\evenheadline={\line{\thischapterheading\hfil\folio}}
+\global\oddheadline={\line{\thischapterheading\hfil\folio}}
\global\let\contentsalignmacro = \chappager
}
@@ -3617,7 +4107,7 @@ end
\parskip=\smallskipamount
\ifdim\parskip=0pt \parskip=2pt \fi
%
- % Try typesetting the item mark that if the document erroneously says
+ % Try typesetting the item mark so that if the document erroneously says
% something like @itemize @samp (intending @table), there's an error
% right away at the @itemize. It's not the best error message in the
% world, but it's better than leaving it to the @item. This means if
@@ -3649,7 +4139,12 @@ end
\noindent
\hbox to 0pt{\hss \itemcontents \kern\itemmargin}%
%
- \vadjust{\penalty 1200}}% not good to break after first line of item.
+ \ifinner\else
+ \vadjust{\penalty 1200}% not good to break after first line of item.
+ \fi
+ % We can be in inner vertical mode in a footnote, although an
+ % @itemize looks awful there.
+ }%
\flushcr
}
@@ -3867,19 +4362,23 @@ end
}
% multitable-only commands.
-%
-% @headitem starts a heading row, which we typeset in bold.
-% Assignments have to be global since we are inside the implicit group
-% of an alignment entry. \everycr resets \everytab so we don't have to
+%
+% @headitem starts a heading row, which we typeset in bold. Assignments
+% have to be global since we are inside the implicit group of an
+% alignment entry. \everycr below resets \everytab so we don't have to
% undo it ourselves.
\def\headitemfont{\b}% for people to use in the template row; not changeable
\def\headitem{%
\checkenv\multitable
\crcr
+ \gdef\headitemcrhook{\nobreak}% attempt to avoid page break after headings
\global\everytab={\bf}% can't use \headitemfont since the parsing differs
\the\everytab % for the first item
}%
%
+% default for tables with no headings.
+\let\headitemcrhook=\relax
+%
% A \tab used to include \hskip1sp. But then the space in a template
% line is not enough. That is bad. So let's go back to just `&' until
% we again encounter the problem the 1sp was intended to solve.
@@ -3910,15 +4409,15 @@ end
%
\everycr = {%
\noalign{%
- \global\everytab={}%
+ \global\everytab={}% Reset from possible headitem.
\global\colcount=0 % Reset the column counter.
- % Check for saved footnotes, etc.
+ %
+ % Check for saved footnotes, etc.:
\checkinserts
- % Keeps underfull box messages off when table breaks over pages.
- %\filbreak
- % Maybe so, but it also creates really weird page breaks when the
- % table breaks over pages. Wouldn't \vfil be better? Wait until the
- % problem manifests itself, so it can be fixed for real --karl.
+ %
+ % Perhaps a \nobreak, then reset:
+ \headitemcrhook
+ \global\let\headitemcrhook=\relax
}%
}%
%
@@ -4157,7 +4656,7 @@ end
\def\value{\begingroup\makevalueexpandable\valuexxx}
\def\valuexxx#1{\expandablevalue{#1}\endgroup}
{
- \catcode`\- = \active \catcode`\_ = \active
+ \catcode`\-=\active \catcode`\_=\active
%
\gdef\makevalueexpandable{%
\let\value = \expandablevalue
@@ -4166,7 +4665,7 @@ end
% ..., but we might end up with active ones in the argument if
% we're called from @code, as @code{@value{foo-bar_}}, though.
% So \let them to their normal equivalents.
- \let-\realdash \let_\normalunderscore
+ \let-\normaldash \let_\normalunderscore
}
}
@@ -4177,7 +4676,12 @@ end
% variable's value contains other Texinfo commands, it's almost certain
% it will fail (although perhaps we could fix that with sufficient work
% to do a one-level expansion on the result, instead of complete).
-%
+%
+% Unfortunately, this has the consequence that when _ is in the *value*
+% of an @set, it does not print properly in the roman fonts (get the cmr
+% dot accent at position 126 instead). No fix comes to mind, and it's
+% been this way since 2003 or earlier, so just ignore it.
+%
\def\expandablevalue#1{%
\expandafter\ifx\csname SET#1\endcsname\relax
{[No value for ``#1'']}%
@@ -4187,10 +4691,36 @@ end
\fi
}
+% Like \expandablevalue, but completely expandable (the \message in the
+% definition above operates at the execution level of TeX). Used when
+% writing to auxiliary files, due to the expansion that \write does.
+% If flag is undefined, pass through an unexpanded @value command: maybe it
+% will be set by the time it is read back in.
+%
+% NB flag names containing - or _ may not work here.
+\def\dummyvalue#1{%
+ \expandafter\ifx\csname SET#1\endcsname\relax
+ \noexpand\value{#1}%
+ \else
+ \csname SET#1\endcsname
+ \fi
+}
+
+% Used for @value's in index entries to form the sort key: expand the @value
+% if possible, otherwise sort late.
+\def\indexnofontsvalue#1{%
+ \expandafter\ifx\csname SET#1\endcsname\relax
+ ZZZZZZZ
+ \else
+ \csname SET#1\endcsname
+ \fi
+}
+
% @ifset VAR ... @end ifset reads the `...' iff VAR has been defined
% with @set.
-%
-% To get special treatment of `@end ifset,' call \makeond and the redefine.
+%
+% To get the special treatment we need for `@end ifset,' we call
+% \makecond and then redefine.
%
\makecond{ifset}
\def\ifset{\parsearg{\doifset{\let\next=\ifsetfail}}}
@@ -4206,7 +4736,7 @@ end
}
\def\ifsetfail{\doignore{ifset}}
-% @ifclear VAR ... @end ifclear reads the `...' iff VAR has never been
+% @ifclear VAR ... @end executes the `...' iff VAR has never been
% defined with @set, or has been undefined with @clear.
%
% The `\else' inside the `\doifset' parameter is a trick to reuse the
@@ -4217,6 +4747,35 @@ end
\def\ifclear{\parsearg{\doifset{\else \let\next=\ifclearfail}}}
\def\ifclearfail{\doignore{ifclear}}
+% @ifcommandisdefined CMD ... @end executes the `...' if CMD (written
+% without the @) is in fact defined. We can only feasibly check at the
+% TeX level, so something like `mathcode' is going to considered
+% defined even though it is not a Texinfo command.
+%
+\makecond{ifcommanddefined}
+\def\ifcommanddefined{\parsearg{\doifcmddefined{\let\next=\ifcmddefinedfail}}}
+%
+\def\doifcmddefined#1#2{{%
+ \makevalueexpandable
+ \let\next=\empty
+ \expandafter\ifx\csname #2\endcsname\relax
+ #1% If not defined, \let\next as above.
+ \fi
+ \expandafter
+ }\next
+}
+\def\ifcmddefinedfail{\doignore{ifcommanddefined}}
+
+% @ifcommandnotdefined CMD ... handled similar to @ifclear above.
+\makecond{ifcommandnotdefined}
+\def\ifcommandnotdefined{%
+ \parsearg{\doifcmddefined{\else \let\next=\ifcmdnotdefinedfail}}}
+\def\ifcmdnotdefinedfail{\doignore{ifcommandnotdefined}}
+
+% Set the `txicommandconditionals' variable, so documents have a way to
+% test if the @ifcommand...defined conditionals are available.
+\set txicommandconditionals
+
% @dircategory CATEGORY -- specify a category of the dir file
% which this file should belong to. Ignore this in TeX.
\let\dircategory=\comment
@@ -4232,19 +4791,16 @@ end
% except not \outer, so it can be used within macros and \if's.
\edef\newwrite{\makecsname{ptexnewwrite}}
-% \newindex {foo} defines an index named foo.
-% It automatically defines \fooindex such that
-% \fooindex ...rest of line... puts an entry in the index foo.
-% It also defines \fooindfile to be the number of the output channel for
-% the file that accumulates this index. The file's extension is foo.
+% \newindex {foo} defines an index named IX.
+% It automatically defines \IXindex such that
+% \IXindex ...rest of line... puts an entry in the index IX.
+% It also defines \IXindfile to be the number of the output channel for
+% the file that accumulates this index. The file's extension is IX.
% The name of an index should be no more than 2 characters long
% for the sake of vms.
%
\def\newindex#1{%
- \iflinks
- \expandafter\newwrite \csname#1indfile\endcsname
- \openout \csname#1indfile\endcsname \jobname.#1 % Open the file
- \fi
+ \expandafter\chardef\csname#1indfile\endcsname=0
\expandafter\xdef\csname#1index\endcsname{% % Define @#1index
\noexpand\doindex{#1}}
}
@@ -4258,14 +4814,19 @@ end
\def\defcodeindex{\parsearg\newcodeindex}
%
\def\newcodeindex#1{%
- \iflinks
- \expandafter\newwrite \csname#1indfile\endcsname
- \openout \csname#1indfile\endcsname \jobname.#1
- \fi
+ \expandafter\chardef\csname#1indfile\endcsname=0
\expandafter\xdef\csname#1index\endcsname{%
\noexpand\docodeindex{#1}}%
}
+% The default indices:
+\newindex{cp}% concepts,
+\newcodeindex{fn}% functions,
+\newcodeindex{vr}% variables,
+\newcodeindex{tp}% types,
+\newcodeindex{ky}% keys
+\newcodeindex{pg}% and programs.
+
% @synindex foo bar makes index foo feed into index bar.
% Do this instead of @defindex foo if you don't want it as a separate index.
@@ -4279,14 +4840,7 @@ end
% #1 is \doindex or \docodeindex, #2 the index getting redefined (foo),
% #3 the target index (bar).
\def\dosynindex#1#2#3{%
- % Only do \closeout if we haven't already done it, else we'll end up
- % closing the target index.
- \expandafter \ifx\csname donesynindex#2\endcsname \relax
- % The \closeout helps reduce unnecessary open files; the limit on the
- % Acorn RISC OS is a mere 16 files.
- \expandafter\closeout\csname#2indfile\endcsname
- \expandafter\let\csname donesynindex#2\endcsname = 1
- \fi
+ \requireopenindexfile{#3}%
% redefine \fooindfile:
\expandafter\let\expandafter\temp\expandafter=\csname#3indfile\endcsname
\expandafter\let\csname#2indfile\endcsname=\temp
@@ -4294,108 +4848,72 @@ end
\expandafter\xdef\csname#2index\endcsname{\noexpand#1{#3}}%
}
-% Define \doindex, the driver for all \fooindex macros.
+% Define \doindex, the driver for all index macros.
% Argument #1 is generated by the calling \fooindex macro,
-% and it is "foo", the name of the index.
+% and it is the two-letter name of the index.
-% \doindex just uses \parsearg; it calls \doind for the actual work.
-% This is because \doind is more useful to call from other macros.
-
-% There is also \dosubind {index}{topic}{subtopic}
-% which makes an entry in a two-level index such as the operation index.
-
-\def\doindex#1{\edef\indexname{#1}\parsearg\singleindexer}
-\def\singleindexer #1{\doind{\indexname}{#1}}
+\def\doindex#1{\edef\indexname{#1}\parsearg\doindexxxx}
+\def\doindexxxx #1{\doind{\indexname}{#1}}
% like the previous two, but they put @code around the argument.
-\def\docodeindex#1{\edef\indexname{#1}\parsearg\singlecodeindexer}
-\def\singlecodeindexer #1{\doind{\indexname}{\code{#1}}}
+\def\docodeindex#1{\edef\indexname{#1}\parsearg\docodeindexxxx}
+\def\docodeindexxxx #1{\doind{\indexname}{\code{#1}}}
-% Take care of Texinfo commands that can appear in an index entry.
-% Since there are some commands we want to expand, and others we don't,
-% we have to laboriously prevent expansion for those that we don't.
+
+% Used when writing an index entry out to an index file to prevent
+% expansion of Texinfo commands that can appear in an index entry.
%
\def\indexdummies{%
\escapechar = `\\ % use backslash in output files.
- \def\@{@}% change to @@ when we switch to @ as escape char in index files.
- \def\ {\realbackslash\space }%
- %
- % Need these unexpandable (because we define \tt as a dummy)
- % definitions when @{ or @} appear in index entry text. Also, more
- % complicated, when \tex is in effect and \{ is a \delimiter again.
- % We can't use \lbracecmd and \rbracecmd because texindex assumes
- % braces and backslashes are used only as delimiters. Perhaps we
- % should define @lbrace and @rbrace commands a la @comma.
- \def\{{{\tt\char123}}%
- \def\}{{\tt\char125}}%
- %
- % I don't entirely understand this, but when an index entry is
- % generated from a macro call, the \endinput which \scanmacro inserts
- % causes processing to be prematurely terminated. This is,
- % apparently, because \indexsorttmp is fully expanded, and \endinput
- % is an expandable command. The redefinition below makes \endinput
- % disappear altogether for that purpose -- although logging shows that
- % processing continues to some further point. On the other hand, it
- % seems \endinput does not hurt in the printed index arg, since that
- % is still getting written without apparent harm.
- %
- % Sample source (mac-idx3.tex, reported by Graham Percival to
- % help-texinfo, 22may06):
- % @macro funindex {WORD}
- % @findex xyz
- % @end macro
- % ...
- % @funindex commtest
- %
- % The above is not enough to reproduce the bug, but it gives the flavor.
- %
- % Sample whatsit resulting:
- % .@write3{\entry{xyz}{@folio }{@code {xyz@endinput }}}
- %
- % So:
- \let\endinput = \empty
+ \definedummyletter\@%
+ \definedummyletter\ %
+ %
+ % For texindex which always views { and } as separators.
+ \def\{{\lbracechar{}}%
+ \def\}{\rbracechar{}}%
%
% Do the redefinitions.
- \commondummies
+ \definedummies
}
-% For the aux and toc files, @ is the escape character. So we want to
-% redefine everything using @ as the escape character (instead of
-% \realbackslash, still used for index files). When everything uses @,
-% this will be simpler.
+% Used for the aux and toc files, where @ is the escape character.
%
\def\atdummies{%
- \def\@{@@}%
- \def\ {@ }%
- \let\{ = \lbraceatcmd
- \let\} = \rbraceatcmd
+ \definedummyletter\@%
+ \definedummyletter\ %
+ \definedummyletter\{%
+ \definedummyletter\}%
%
% Do the redefinitions.
- \commondummies
+ \definedummies
\otherbackslash
}
-% Called from \indexdummies and \atdummies.
+% \definedummyword defines \#1 as \string\#1\space, thus effectively
+% preventing its expansion. This is used only for control words,
+% not control letters, because the \space would be incorrect for
+% control characters, but is needed to separate the control word
+% from whatever follows.
%
-\def\commondummies{%
- %
- % \definedummyword defines \#1 as \string\#1\space, thus effectively
- % preventing its expansion. This is used only for control words,
- % not control letters, because the \space would be incorrect for
- % control characters, but is needed to separate the control word
- % from whatever follows.
- %
- % For control letters, we have \definedummyletter, which omits the
- % space.
- %
- % These can be used both for control words that take an argument and
- % those that do not. If it is followed by {arg} in the input, then
- % that will dutifully get written to the index (or wherever).
- %
- \def\definedummyword ##1{\def##1{\string##1\space}}%
- \def\definedummyletter##1{\def##1{\string##1}}%
- \let\definedummyaccent\definedummyletter
+% These can be used both for control words that take an argument and
+% those that do not. If it is followed by {arg} in the input, then
+% that will dutifully get written to the index (or wherever).
+%
+% For control letters, we have \definedummyletter, which omits the
+% space.
+%
+\def\definedummyword #1{\def#1{\string#1\space}}%
+\def\definedummyletter#1{\def#1{\string#1}}%
+\let\definedummyaccent\definedummyletter
+
+% Called from \indexdummies and \atdummies, to effectively prevent
+% the expansion of commands.
+%
+\def\definedummies{%
%
+ \let\commondummyword\definedummyword
+ \let\commondummyletter\definedummyletter
+ \let\commondummyaccent\definedummyaccent
\commondummiesnofonts
%
\definedummyletter\_%
@@ -4436,6 +4954,7 @@ end
\definedummyword\TeX
%
% Assorted special characters.
+ \definedummyword\atchar
\definedummyword\arrow
\definedummyword\bullet
\definedummyword\comma
@@ -4455,6 +4974,7 @@ end
\definedummyword\guilsinglright
\definedummyword\lbracechar
\definedummyword\leq
+ \definedummyword\mathopsup
\definedummyword\minus
\definedummyword\ogonek
\definedummyword\pounds
@@ -4468,88 +4988,136 @@ end
\definedummyword\quotesinglbase
\definedummyword\rbracechar
\definedummyword\result
+ \definedummyword\sub
+ \definedummyword\sup
\definedummyword\textdegree
%
% We want to disable all macros so that they are not expanded by \write.
\macrolist
+ \let\value\dummyvalue
%
\normalturnoffactive
- %
- % Handle some cases of @value -- where it does not contain any
- % (non-fully-expandable) commands.
- \makevalueexpandable
}
-% \commondummiesnofonts: common to \commondummies and \indexnofonts.
+% \commondummiesnofonts: common to \definedummies and \indexnofonts.
+% Define \commondummyletter, \commondummyaccent and \commondummyword before
+% using. Used for accents, font commands, and various control letters.
%
\def\commondummiesnofonts{%
% Control letters and accents.
- \definedummyletter\!%
- \definedummyaccent\"%
- \definedummyaccent\'%
- \definedummyletter\*%
- \definedummyaccent\,%
- \definedummyletter\.%
- \definedummyletter\/%
- \definedummyletter\:%
- \definedummyaccent\=%
- \definedummyletter\?%
- \definedummyaccent\^%
- \definedummyaccent\`%
- \definedummyaccent\~%
- \definedummyword\u
- \definedummyword\v
- \definedummyword\H
- \definedummyword\dotaccent
- \definedummyword\ogonek
- \definedummyword\ringaccent
- \definedummyword\tieaccent
- \definedummyword\ubaraccent
- \definedummyword\udotaccent
- \definedummyword\dotless
+ \commondummyletter\!%
+ \commondummyaccent\"%
+ \commondummyaccent\'%
+ \commondummyletter\*%
+ \commondummyaccent\,%
+ \commondummyletter\.%
+ \commondummyletter\/%
+ \commondummyletter\:%
+ \commondummyaccent\=%
+ \commondummyletter\?%
+ \commondummyaccent\^%
+ \commondummyaccent\`%
+ \commondummyaccent\~%
+ \commondummyword\u
+ \commondummyword\v
+ \commondummyword\H
+ \commondummyword\dotaccent
+ \commondummyword\ogonek
+ \commondummyword\ringaccent
+ \commondummyword\tieaccent
+ \commondummyword\ubaraccent
+ \commondummyword\udotaccent
+ \commondummyword\dotless
%
% Texinfo font commands.
- \definedummyword\b
- \definedummyword\i
- \definedummyword\r
- \definedummyword\sansserif
- \definedummyword\sc
- \definedummyword\slanted
- \definedummyword\t
+ \commondummyword\b
+ \commondummyword\i
+ \commondummyword\r
+ \commondummyword\sansserif
+ \commondummyword\sc
+ \commondummyword\slanted
+ \commondummyword\t
%
% Commands that take arguments.
- \definedummyword\abbr
- \definedummyword\acronym
- \definedummyword\anchor
- \definedummyword\cite
- \definedummyword\code
- \definedummyword\command
- \definedummyword\dfn
- \definedummyword\dmn
- \definedummyword\email
- \definedummyword\emph
- \definedummyword\env
- \definedummyword\file
- \definedummyword\image
- \definedummyword\indicateurl
- \definedummyword\inforef
- \definedummyword\kbd
- \definedummyword\key
- \definedummyword\math
- \definedummyword\option
- \definedummyword\pxref
- \definedummyword\ref
- \definedummyword\samp
- \definedummyword\strong
- \definedummyword\tie
- \definedummyword\uref
- \definedummyword\url
- \definedummyword\var
- \definedummyword\verb
- \definedummyword\w
- \definedummyword\xref
+ \commondummyword\abbr
+ \commondummyword\acronym
+ \commondummyword\anchor
+ \commondummyword\cite
+ \commondummyword\code
+ \commondummyword\command
+ \commondummyword\dfn
+ \commondummyword\dmn
+ \commondummyword\email
+ \commondummyword\emph
+ \commondummyword\env
+ \commondummyword\file
+ \commondummyword\image
+ \commondummyword\indicateurl
+ \commondummyword\inforef
+ \commondummyword\kbd
+ \commondummyword\key
+ \commondummyword\math
+ \commondummyword\option
+ \commondummyword\pxref
+ \commondummyword\ref
+ \commondummyword\samp
+ \commondummyword\strong
+ \commondummyword\tie
+ \commondummyword\U
+ \commondummyword\uref
+ \commondummyword\url
+ \commondummyword\var
+ \commondummyword\verb
+ \commondummyword\w
+ \commondummyword\xref
+}
+
+% For testing: output @{ and @} in index sort strings as \{ and \}.
+\newif\ifusebracesinindexes
+
+\let\indexlbrace\relax
+\let\indexrbrace\relax
+
+{\catcode`\@=0
+\catcode`\\=13
+ @gdef@backslashdisappear{@def\{}}
}
+{
+\catcode`\<=13
+\catcode`\-=13
+\catcode`\`=13
+ \gdef\indexnonalnumdisappear{%
+ \expandafter\ifx\csname SETtxiindexlquoteignore\endcsname\relax\else
+ % @set txiindexlquoteignore makes us ignore left quotes in the sort term.
+ % (Introduced for FSFS 2nd ed.)
+ \let`=\empty
+ \fi
+ %
+ \expandafter\ifx\csname SETtxiindexbackslashignore\endcsname\relax\else
+ \backslashdisappear
+ \fi
+ %
+ \expandafter\ifx\csname SETtxiindexhyphenignore\endcsname\relax\else
+ \def-{}%
+ \fi
+ \expandafter\ifx\csname SETtxiindexlessthanignore\endcsname\relax\else
+ \def<{}%
+ \fi
+ \expandafter\ifx\csname SETtxiindexatsignignore\endcsname\relax\else
+ \def\@{}%
+ \fi
+ }
+
+ \gdef\indexnonalnumreappear{%
+ \useindexbackslash
+ \let-\normaldash
+ \let<\normalless
+ \def\@{@}%
+ }
+}
+
+
% \indexnofonts is used when outputting the strings to sort the index
% by, and when constructing control sequence names. It eliminates all
% control sequences and just writes whatever the best ASCII sort string
@@ -4557,12 +5125,11 @@ end
%
\def\indexnofonts{%
% Accent commands should become @asis.
- \def\definedummyaccent##1{\let##1\asis}%
+ \def\commondummyaccent##1{\let##1\asis}%
% We can just ignore other control letters.
- \def\definedummyletter##1{\let##1\empty}%
+ \def\commondummyletter##1{\let##1\empty}%
% All control words become @asis by default; overrides below.
- \let\definedummyword\definedummyaccent
- %
+ \let\commondummyword\commondummyaccent
\commondummiesnofonts
%
% Don't no-op \tt, since it isn't a user-level command
@@ -4575,14 +5142,10 @@ end
\def\_{\normalunderscore}%
\def\-{}% @- shouldn't affect sorting
%
- % Unfortunately, texindex is not prepared to handle braces in the
- % content at all. So for index sorting, we map @{ and @} to strings
- % starting with |, since that ASCII character is between ASCII { and }.
- \def\{{|a}%
- \def\lbracechar{|a}%
- %
- \def\}{|b}%
- \def\rbracechar{|b}%
+ \uccode`\1=`\{ \uppercase{\def\{{1}}%
+ \uccode`\1=`\} \uppercase{\def\}{1}}%
+ \let\lbracechar\{%
+ \let\rbracechar\}%
%
% Non-English letters.
\def\AA{AA}%
@@ -4591,7 +5154,7 @@ end
\def\L{L}%
\def\OE{OE}%
\def\O{O}%
- \def\TH{ZZZ}%
+ \def\TH{TH}%
\def\aa{aa}%
\def\ae{ae}%
\def\dh{dzz}%
@@ -4603,45 +5166,45 @@ end
\def\o{o}%
\def\questiondown{?}%
\def\ss{ss}%
- \def\th{zzz}%
+ \def\th{th}%
%
\def\LaTeX{LaTeX}%
\def\TeX{TeX}%
%
- % Assorted special characters.
- % (The following {} will end up in the sort string, but that's ok.)
- \def\arrow{->}%
- \def\bullet{bullet}%
- \def\comma{,}%
- \def\copyright{copyright}%
- \def\dots{...}%
- \def\enddots{...}%
- \def\equiv{==}%
- \def\error{error}%
- \def\euro{euro}%
- \def\expansion{==>}%
- \def\geq{>=}%
- \def\guillemetleft{<<}%
- \def\guillemetright{>>}%
- \def\guilsinglleft{<}%
- \def\guilsinglright{>}%
- \def\leq{<=}%
- \def\minus{-}%
- \def\point{.}%
- \def\pounds{pounds}%
- \def\print{-|}%
- \def\quotedblbase{"}%
- \def\quotedblleft{"}%
- \def\quotedblright{"}%
- \def\quoteleft{`}%
- \def\quoteright{'}%
- \def\quotesinglbase{,}%
- \def\registeredsymbol{R}%
- \def\result{=>}%
- \def\textdegree{o}%
- %
- \expandafter\ifx\csname SETtxiindexlquoteignore\endcsname\relax
- \else \indexlquoteignore \fi
+ % Assorted special characters. \defglyph gives the control sequence a
+ % definition that removes the {} that follows its use.
+ \defglyph\atchar{@}%
+ \defglyph\arrow{->}%
+ \defglyph\bullet{bullet}%
+ \defglyph\comma{,}%
+ \defglyph\copyright{copyright}%
+ \defglyph\dots{...}%
+ \defglyph\enddots{...}%
+ \defglyph\equiv{==}%
+ \defglyph\error{error}%
+ \defglyph\euro{euro}%
+ \defglyph\expansion{==>}%
+ \defglyph\geq{>=}%
+ \defglyph\guillemetleft{<<}%
+ \defglyph\guillemetright{>>}%
+ \defglyph\guilsinglleft{<}%
+ \defglyph\guilsinglright{>}%
+ \defglyph\leq{<=}%
+ \defglyph\lbracechar{\{}%
+ \defglyph\minus{-}%
+ \defglyph\point{.}%
+ \defglyph\pounds{pounds}%
+ \defglyph\print{-|}%
+ \defglyph\quotedblbase{"}%
+ \defglyph\quotedblleft{"}%
+ \defglyph\quotedblright{"}%
+ \defglyph\quoteleft{`}%
+ \defglyph\quoteright{'}%
+ \defglyph\quotesinglbase{,}%
+ \defglyph\rbracechar{\}}%
+ \defglyph\registeredsymbol{R}%
+ \defglyph\result{=>}%
+ \defglyph\textdegree{o}%
%
% We need to get rid of all macros, leaving only the arguments (if present).
% Of course this is not nearly correct, but it is the best we can do for now.
@@ -4654,21 +5217,24 @@ end
% goes to end-of-line is not handled.
%
\macrolist
+ \let\value\indexnofontsvalue
}
+\def\defglyph#1#2{\def#1##1{#2}} % see above
+
+
-% Undocumented (for FSFS 2nd ed.): @set txiindexlquoteignore makes us
-% ignore left quotes in the sort term.
-{\catcode`\`=\active
- \gdef\indexlquoteignore{\let`=\empty}}
-\let\indexbackslash=0 %overridden during \printindex.
\let\SETmarginindex=\relax % put index entries in margin (undocumented)?
% Most index entries go through here, but \dosubind is the general case.
% #1 is the index name, #2 is the entry text.
\def\doind#1#2{\dosubind{#1}{#2}{}}
-% Workhorse for all \fooindexes.
+% There is also \dosubind {index}{topic}{subtopic}
+% which makes an entry in a two-level index such as the operation index.
+% TODO: Two-level index? Operation index?
+
+% Workhorse for all indexes.
% #1 is name of index, #2 is stuff to put there, #3 is subentry --
% empty if called from \doind, as we usually are (the main exception
% is with most defuns, which call us directly).
@@ -4676,6 +5242,7 @@ end
\def\dosubind#1#2#3{%
\iflinks
{%
+ \requireopenindexfile{#1}%
% Store the main index entry text (including the third arg).
\toks0 = {#2}%
% If third arg is present, precede it with a space.
@@ -4691,7 +5258,50 @@ end
\fi
}
-% Write the entry in \toks0 to the index file:
+% Check if an index file has been opened, and if not, open it.
+\def\requireopenindexfile#1{%
+\ifnum\csname #1indfile\endcsname=0
+ \expandafter\newwrite \csname#1indfile\endcsname
+ \edef\suffix{#1}%
+ % A .fls suffix would conflict with the file extension for the output
+ % of -recorder, so use .f1s instead.
+ \ifx\suffix\indexisfl\def\suffix{f1}\fi
+ % Open the file
+ \immediate\openout\csname#1indfile\endcsname \jobname.\suffix
+ % Using \immediate above here prevents an object entering into the current
+ % box, which could confound checks such as those in \safewhatsit for
+ % preceding skips.
+ \typeout{Writing index file \jobname.\suffix}%
+\fi}
+\def\indexisfl{fl}
+
+% Output \ as {\indexbackslash}, because \ is an escape character in
+% the index files.
+\let\indexbackslash=\relax
+{\catcode`\@=0 \catcode`\\=\active
+ @gdef@useindexbackslash{@def\{{@indexbackslash}}}
+}
+
+% Definition for writing index entry text.
+\def\sortas#1{\ignorespaces}%
+
+% Definition for writing index entry sort key. Should occur at the at
+% the beginning of the index entry, like
+% @cindex @sortas{september} \september
+% The \ignorespaces takes care of following space, but there's no way
+% to remove space before it.
+{
+\catcode`\-=13
+\gdef\indexwritesortas{%
+ \begingroup
+ \indexnonalnumreappear
+ \indexwritesortasxxx}
+\gdef\indexwritesortasxxx#1{%
+ \xdef\indexsortkey{#1}\endgroup}
+}
+
+
+% Write the entry in \toks0 to the index file.
%
\def\dosubindwrite{%
% Put the index entry in the margin if desired.
@@ -4701,14 +5311,26 @@ end
%
% Remember, we are within a group.
\indexdummies % Must do this here, since \bf, etc expand at this stage
- \def\backslashcurfont{\indexbackslash}% \indexbackslash isn't defined now
- % so it will be output as is; and it will print as backslash.
+ \useindexbackslash % \indexbackslash isn't defined now so it will be output
+ % as is; and it will print as backslash.
+ % The braces around \indexbrace are recognized by texindex.
%
- % Process the index entry with all font commands turned off, to
- % get the string to sort by.
+ % Get the string to sort by, by processing the index entry with all
+ % font commands turned off.
{\indexnofonts
- \edef\temp{\the\toks0}% need full expansion
- \xdef\indexsorttmp{\temp}%
+ \def\lbracechar{{\indexlbrace}}%
+ \def\rbracechar{{\indexrbrace}}%
+ \let\{=\lbracechar
+ \let\}=\rbracechar
+ \indexnonalnumdisappear
+ \xdef\indexsortkey{}%
+ \let\sortas=\indexwritesortas
+ \edef\temp{\the\toks0}%
+ \setbox\dummybox = \hbox{\temp}% Make sure to execute any \sortas
+ \ifx\indexsortkey\empty
+ \xdef\indexsortkey{\temp}%
+ \ifx\indexsortkey\empty\xdef\indexsortkey{ }\fi
+ \fi
}%
%
% Set up the complete index entry, with both the sort key and
@@ -4718,10 +5340,11 @@ end
% sorted result.
\edef\temp{%
\write\writeto{%
- \string\entry{\indexsorttmp}{\noexpand\folio}{\the\toks0}}%
+ \string\entry{\indexsortkey}{\noexpand\folio}{\the\toks0}}%
}%
\temp
}
+\newbox\dummybox % used above
% Take care of unwanted page breaks/skips around a whatsit:
%
@@ -4846,52 +5469,107 @@ end
% \initial {@}
% as its first line, TeX doesn't complain about mismatched braces
% (because it thinks @} is a control sequence).
- \catcode`\@ = 11
- \openin 1 \jobname.#1s
+ \catcode`\@ = 12
+ % See comment in \requireopenindexfile.
+ \def\indexname{#1}\ifx\indexname\indexisfl\def\indexname{f1}\fi
+ \openin 1 \jobname.\indexname s
\ifeof 1
% \enddoublecolumns gets confused if there is no text in the index,
% and it loses the chapter title and the aux file entries for the
% index. The easiest way to prevent this problem is to make sure
% there is some text.
\putwordIndexNonexistent
+ \typeout{No file \jobname.\indexname s.}%
\else
+ \catcode`\\ = 0
%
% If the index file exists but is empty, then \openin leaves \ifeof
% false. We have to make TeX try to read something from the file, so
% it can discover if there is anything in it.
- \read 1 to \temp
+ \read 1 to \thisline
\ifeof 1
\putwordIndexIsEmpty
\else
% Index files are almost Texinfo source, but we use \ as the escape
% character. It would be better to use @, but that's too big a change
% to make right now.
- \def\indexbackslash{\backslashcurfont}%
- \catcode`\\ = 0
- \escapechar = `\\
+ \def\indexbackslash{\ttbackslash}%
+ \let\indexlbrace\{ % Likewise, set these sequences for braces
+ \let\indexrbrace\} % used in the sort key.
\begindoublecolumns
- \input \jobname.#1s
+ \let\entrywidowpenalty=\indexwidowpenalty
+ %
+ % Read input from the index file line by line.
+ \loopdo
+ \ifeof1
+ \let\firsttoken\relax
+ \else
+ \read 1 to \nextline
+ \edef\act{\gdef\noexpand\firsttoken{\getfirsttoken\nextline}}%
+ \act
+ \fi
+ \thisline
+ %
+ \ifeof1\else
+ \let\thisline\nextline
+ \repeat
+ %%
\enddoublecolumns
\fi
\fi
\closein 1
\endgroup}
+\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.
-\def\initial#1{{%
- % Some minor font changes for the special characters.
- \let\tentt=\sectt \let\tt=\sectt \let\sf=\sectt
- %
+{\catcode`\/=13 \catcode`\-=13 \catcode`\^=13 \catcode`\~=13 \catcode`\_=13
+\catcode`\|=13 \catcode`\<=13 \catcode`\>=13 \catcode`\+=13 \catcode`\"=13
+\catcode`\$=3
+\gdef\initialglyphs{%
+ % Some changes for non-alphabetic characters. Using the glyphs from the
+ % math fonts looks more consistent than the typewriter font used elsewhere
+ % for these characters.
+ \def\indexbackslash{\math{\backslash}}%
+ \let\\=\indexbackslash
+ %
+ % Can't get bold backslash so don't use bold forward slash
+ \catcode`\/=13
+ \def/{{\secrmnotbold \normalslash}}%
+ \def-{{\normaldash\normaldash}}% en dash `--'
+ \def^{{\chapbf \normalcaret}}%
+ \def~{{\chapbf \normaltilde}}%
+ \def\_{%
+ \leavevmode \kern.07em \vbox{\hrule width.3em height.1ex}\kern .07em }%
+ \def|{$\vert$}%
+ \def<{$\less$}%
+ \def>{$\gtr$}%
+ \def+{$\normalplus$}%
+}}
+
+\def\initial{%
+ \bgroup
+ \initialglyphs
+ \initialx
+}
+
+\def\initialx#1{%
% Remove any glue we may have, we'll be inserting our own.
\removelastskip
%
% We like breaks before the index initials, so insert a bonus.
+ % The glue before the bonus allows a little bit of space at the
+ % bottom of a column to reduce an increase in inter-line spacing.
\nobreak
- \vskip 0pt plus 3\baselineskip
- \penalty 0
- \vskip 0pt plus -3\baselineskip
+ \vskip 0pt plus 5\baselineskip
+ \penalty -300
+ \vskip 0pt plus -5\baselineskip
%
% Typeset the initial. Making this add up to a whole number of
% baselineskips increases the chance of the dots lining up from column
@@ -4899,63 +5577,45 @@ end
% we need before each entry, but it's better.
%
% No shrink because it confuses \balancecolumns.
- \vskip 1.67\baselineskip plus .5\baselineskip
- \leftline{\secbf #1}%
+ \vskip 1.67\baselineskip plus 1\baselineskip
+ \leftline{\secfonts \kern-0.05em \secbf #1}%
+ % \secfonts is inside the argument of \leftline so that the change of
+ % \baselineskip will not affect any glue inserted before the vbox that
+ % \leftline creates.
% Do our best not to break after the initial.
\nobreak
\vskip .33\baselineskip plus .1\baselineskip
-}}
+ \egroup % \initialglyphs
+}
+
+\newdimen\entryrightmargin
+\entryrightmargin=0pt
% \entry typesets a paragraph consisting of the text (#1), dot leaders, and
% then page number (#2) flushed to the right margin. It is used for index
% and table of contents entries. The paragraph is indented by \leftskip.
%
-% A straightforward implementation would start like this:
-% \def\entry#1#2{...
-% But this freezes the catcodes in the argument, and can cause problems to
-% @code, which sets - active. This problem was fixed by a kludge---
-% ``-'' was active throughout whole index, but this isn't really right.
-% The right solution is to prevent \entry from swallowing the whole text.
-% --kasal, 21nov03
\def\entry{%
\begingroup
%
+ % 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.
+ \let\domark\relax
+ %
% Start a new paragraph if necessary, so our assignments below can't
% affect previous text.
\par
%
- % Do not fill out the last line with white space.
- \parfillskip = 0in
- %
% No extra space above this paragraph.
\parskip = 0in
%
- % Do not prefer a separate line ending with a hyphen to fewer lines.
- \finalhyphendemerits = 0
- %
- % \hangindent is only relevant when the entry text and page number
- % don't both fit on one line. In that case, bob suggests starting the
- % dots pretty far over on the line. Unfortunately, a large
- % indentation looks wrong when the entry text itself is broken across
- % lines. So we use a small indentation and put up with long leaders.
- %
- % \hangafter is reset to 1 (which is the value we want) at the start
- % of each paragraph, so we need not do anything with that.
- \hangindent = 2em
- %
- % When the entry text needs to be broken, just fill out the first line
- % with blank space.
- \rightskip = 0pt plus1fil
- %
- % A bit of stretch before each entry for the benefit of balancing
- % columns.
- \vskip 0pt plus1pt
- %
% When reading the text of entry, convert explicit line breaks
% from @* into spaces. The user might give these in long section
% titles, for instance.
\def\*{\unskip\space\ignorespaces}%
- \def\entrybreak{\hfil\break}%
+ \def\entrybreak{\hfil\break}% An undocumented command
%
% Swallow the left brace of the text (first parameter):
\afterassignment\doentry
@@ -4963,45 +5623,166 @@ end
}
\def\entrybreak{\unskip\space\ignorespaces}%
\def\doentry{%
+ % Save the text of the entry
+ \global\setbox\boxA=\hbox\bgroup
\bgroup % Instead of the swallowed brace.
\noindent
\aftergroup\finishentry
% And now comes the text of the entry.
+ % Not absorbing as a macro argument reduces the chance of problems
+ % with catcodes occurring.
}
-\def\finishentry#1{%
+{\catcode`\@=11
+\gdef\finishentry#1{%
+ \egroup % end box A
+ \dimen@ = \wd\boxA % Length of text of entry
+ \global\setbox\boxA=\hbox\bgroup\unhbox\boxA
% #1 is the page number.
%
- % The following is kludged to not output a line of dots in the index if
- % there are no page numbers. The next person who breaks this will be
- % cursed by a Unix daemon.
- \setbox\boxA = \hbox{#1}%
- \ifdim\wd\boxA = 0pt
- \ %
+ % Get the width of the page numbers, and only use
+ % leaders if they are present.
+ \global\setbox\boxB = \hbox{#1}%
+ \ifdim\wd\boxB = 0pt
+ \null\nobreak\hfill\ %
\else
%
- % If we must, put the page number on a line of its own, and fill out
- % this line with blank space. (The \hfil is overwhelmed with the
- % fill leaders glue in \indexdotfill if the page number does fit.)
- \hfil\penalty50
\null\nobreak\indexdotfill % Have leaders before the page number.
%
- % The `\ ' here is removed by the implicit \unskip that TeX does as
- % part of (the primitive) \par. Without it, a spurious underfull
- % \hbox ensues.
\ifpdf
- \pdfgettoks#1.%
- \ \the\toksA
+ \pdfgettoks#1.%
+ \hskip\skip\thinshrinkable\the\toksA
\else
- \ #1%
+ \ifx\XeTeXrevision\thisisundefined
+ \hskip\skip\thinshrinkable #1%
+ \else
+ \pdfgettoks#1.%
+ \hskip\skip\thinshrinkable\the\toksA
+ \fi
\fi
\fi
- \par
+ \egroup % end \boxA
+ \ifdim\wd\boxB = 0pt
+ \global\setbox\entryindexbox=\vbox{\unhbox\boxA}%
+ \else
+ \global\setbox\entryindexbox=\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.
+ %
+ \parindent = 0pt
+ \advance\leftskip by 0pt plus 1fil
+ \advance\leftskip by 0pt plus -1fill
+ \rightskip = 0pt plus -1fil
+ \advance\rightskip by 0pt plus 1fill
+ % Cause last line, which could consist of page numbers on their own
+ % if the list of page numbers is long, to be aligned to the right.
+ \parfillskip=0pt plus -1fill
+ %
+ \advance\rightskip by \entryrightmargin
+ % Determine how far we can stretch into the margin.
+ % This allows, e.g., "Appendix H GNU Free Documentation License" to
+ % fit on one line in @letterpaper format.
+ \ifdim\entryrightmargin>2.1em
+ \dimen@i=2.1em
+ \else
+ \dimen@i=0em
+ \fi
+ \advance \parfillskip by 0pt minus 1\dimen@i
+ %
+ \dimen@ii = \hsize
+ \advance\dimen@ii by -1\leftskip
+ \advance\dimen@ii by -1\entryrightmargin
+ \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
+ \dimen@ii = \hsize
+ \ifnum\dimen@>\dimen@ii
+ % If the entry is too long, use the whole line
+ \dimen@ = \dimen@ii
+ \fi
+ \advance\leftskip by 0pt plus 1fill % ragged right
+ \advance \dimen@ by 1\rightskip
+ \parshape = 2 0pt \dimen@ 0em \dimen@ii
+ % Ideally we'd add a finite glue at the end of the first line only,
+ % 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
+ \fi\fi
+ \indent % start paragraph
+ \unhbox\boxA
+ %
+ % Do not prefer a separate line ending with a hyphen to fewer lines.
+ \finalhyphendemerits = 0
+ %
+ % Word spacing - no stretch
+ \spaceskip=\fontdimen2\font minus \fontdimen4\font
+ %
+ \linepenalty=1000 % Discourage line breaks.
+ \hyphenpenalty=5000 % Discourage hyphenation.
+ %
+ \par % format the paragraph
+ \egroup % The \vbox
+ \fi
\endgroup
+ % delay text of entry until after penalty
+ \bgroup\aftergroup\insertindexentrybox
+ \entrywidowpenalty
+}}
+
+\newskip\thinshrinkable
+\skip\thinshrinkable=.15em minus .15em
+
+\newbox\entryindexbox
+\def\insertindexentrybox{%
+ \ourunvbox\entryindexbox
+}
+
+% Use \lastbox to take apart vbox box by box, and add each sub-box
+% to the current vertical list.
+\def\ourunvbox#1{%
+\bgroup % for local binding of \delayedbox
+ % Remove the last box from box #1
+ \global\setbox#1=\vbox{%
+ \unvbox#1%
+ \unskip % remove any glue
+ \unpenalty
+ \global\setbox\interbox=\lastbox
+ }%
+ \setbox\delayedbox=\box\interbox
+ \ifdim\ht#1=0pt\else
+ \ourunvbox#1 % Repeat on what's left of the box
+ \nobreak
+ \fi
+ \box\delayedbox
+\egroup
+}
+\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}%
+ \ifx\firsttoken\isentry
+ \else
+ \penalty 9000
+ \fi
+ \egroup % now comes the box added with \aftergroup
}
% 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
+% the page number to the right.
\def\indexdotfill{\cleaders
- \hbox{$\mathsurround=0pt \mkern1.5mu.\mkern1.5mu$}\hskip 1em plus 1fill}
+ \hbox{$\mathsurround=0pt \mkern1.5mu.\mkern1.5mu$}\hskip 1em plus 1filll}
+
\def\primary #1{\line{#1\hfil}}
@@ -5015,7 +5796,11 @@ end
\ifpdf
\pdfgettoks#2.\ \the\toksA % The page number ends the paragraph.
\else
- #2
+ \ifx\XeTeXrevision\thisisundefined
+ #2
+ \else
+ \pdfgettoks#2.\ \the\toksA % The page number ends the paragraph.
+ \fi
\fi
\par
}}
@@ -5023,12 +5808,37 @@ end
% Define two-column mode, which we use to typeset indexes.
% Adapted from the TeXbook, page 416, which is to say,
% the manmac.tex format used to print the TeXbook itself.
-\catcode`\@=11
+\catcode`\@=11 % private names
\newbox\partialpage
\newdimen\doublecolumnhsize
+% Use inside an output routine to save \topmark and \firstmark
+\def\savemarks{%
+ \global\savedtopmark=\expandafter{\topmark }%
+ \global\savedfirstmark=\expandafter{\firstmark }%
+}
+\newtoks\savedtopmark
+\newtoks\savedfirstmark
+
+% Set \topmark and \firstmark for next time \output runs.
+% Can't be run from withinside \output (because any material
+% added while an output routine is active, including
+% penalties, is saved for after it finishes). The page so far
+% should be empty, otherwise what's on it will be thrown away.
+\def\restoremarks{%
+ \mark{\the\savedtopmark}%
+ \bgroup\output = {%
+ \setbox\dummybox=\box\PAGE
+ }abc\eject\egroup
+ % "abc" because output routine doesn't fire for a completely empty page.
+ \mark{\the\savedfirstmark}%
+}
+
\def\begindoublecolumns{\begingroup % ended by \enddoublecolumns
+ % If not much space left on page, start a new page.
+ \ifdim\pagetotal>0.8\vsize\vfill\eject\fi
+ %
% Grab any single-column material above us.
\output = {%
%
@@ -5048,8 +5858,15 @@ end
\unvbox\PAGE
\kern-\topskip \kern\baselineskip
}%
+ \savemarks
}%
\eject % run that output routine to set \partialpage
+ \restoremarks
+ %
+ % We recover the two marks that the last output routine saved in order
+ % to propagate the information in marks added around a chapter heading,
+ % which could be otherwise be lost by the time the final page is output.
+ %
%
% Use the double-column output routine for subsequent pages.
\output = {\doublecolumnout}%
@@ -5078,12 +5895,16 @@ end
% Double the \vsize as well. (We don't need a separate register here,
% since nobody clobbers \vsize.)
\vsize = 2\vsize
+ %
+ % For the benefit of balancing columns
+ \advance\baselineskip by 0pt plus 0.5pt
}
% The double-column output routine for all double-column pages except
-% the last.
+% the last, which is done by \balancecolumns.
%
\def\doublecolumnout{%
+ %
\splittopskip=\topskip \splitmaxdepth=\maxdepth
% Get the available space for the double columns -- the normal
% (undoubled) page height minus any material left over from the
@@ -5106,10 +5927,11 @@ end
%
\hsize = \doublecolumnhsize
\wd0=\hsize \wd2=\hsize
- \hbox to\pagewidth{\box0\hfil\box2}%
+ \hbox to\txipagewidth{\box0\hfil\box2}%
}
-%
-% All done with double columns.
+
+
+% Finished with with double columns.
\def\enddoublecolumns{%
% The following penalty ensures that the page builder is exercised
% _before_ we change the output routine. This is necessary in the
@@ -5132,7 +5954,7 @@ end
% goal. When TeX sees \eject from below which follows the final
% section, it invokes the new output routine that we've set after
% \balancecolumns below; \onepageout will try to fit the two columns
- % and the final section into the vbox of \pageheight (see
+ % and the final section into the vbox of \txipageheight (see
% \pagebody), causing an overfull box.
%
% Note that glue won't work here, because glue does not exercise the
@@ -5140,21 +5962,21 @@ end
\penalty0
%
\output = {%
- % Split the last of the double-column material. Leave it on the
- % current page, no automatic page break.
+ % Split the last of the double-column material.
+ \savemarks
\balancecolumns
%
- % If we end up splitting too much material for the current page,
- % though, there will be another page break right after this \output
- % invocation ends. Having called \balancecolumns once, we do not
+ % Having called \balancecolumns once, we do not
% want to call it again. Therefore, reset \output to its normal
- % definition right away. (We hope \balancecolumns will never be
- % called on to balance too much material, but if it is, this makes
- % the output somewhat more palatable.)
+ % 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
@@ -5162,31 +5984,59 @@ end
% \endgroup where \vsize got restored).
\pagegoal = \vsize
}
+\newbox\balancedcolumns
+\setbox\balancedcolumns=\vbox{shouldnt see this}%
%
-% Called at the end of the double column material.
+% 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.
\dimen@ = \ht0
\advance\dimen@ by \topskip
\advance\dimen@ by-\baselineskip
- \divide\dimen@ by 2 % target to split to
- %debug\message{final 2-column material height=\the\ht0, target=\the\dimen@.}%
- \splittopskip = \topskip
- % Loop until we get a decent breakpoint.
- {%
- \vbadness = 10000
- \loop
- \global\setbox3 = \copy0
- \global\setbox1 = \vsplit3 to \dimen@
- \ifdim\ht3>\dimen@
- \global\advance\dimen@ by 1pt
- \repeat
- }%
- %debug\message{split to \the\dimen@, column heights: \the\ht1, \the\ht3.}%
- \setbox0=\vbox to\dimen@{\unvbox1}%
- \setbox2=\vbox to\dimen@{\unvbox3}%
+ \ifdim\dimen@<5\baselineskip
+ % Don't split a short final column in two.
+ \setbox2=\vbox{}%
+ \else
+ \divide\dimen@ by 2 % target to split to
+ \dimen@ii = \dimen@
+ \splittopskip = \topskip
+ % Loop until left column is at least as high as the right column.
+ {%
+ \vbadness = 10000
+ \loop
+ \global\setbox3 = \copy0
+ \global\setbox1 = \vsplit3 to \dimen@
+ \ifdim\ht1<\ht3
+ \global\advance\dimen@ by 1pt
+ \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}%
+ \else
+ % Compare the heights of the two columns.
+ \ifdim4\ht1>5\ht3
+ % Column heights are too different, so don't make their bottoms
+ % flush with each other.
+ \setbox2=\vbox to \ht1 {\unvbox3\vfill}%
+ \setbox0=\vbox to \ht1 {\unvbox1\vfill}%
+ \else
+ % Make column bottoms flush with each other.
+ \setbox2=\vbox to\ht1{\unvbox3\unskip}%
+ \setbox0=\vbox to\ht1{\unvbox1\unskip}%
+ \fi
+ \fi
+ \fi
%
- \pagesofar
+ \global\setbox\balancedcolumns=\vbox{\pagesofar}%
}
\catcode`\@ = \other
@@ -5201,10 +6051,14 @@ end
\null
\vskip.3\vsize % move it down on the page a bit
\begingroup
- \noindent \titlefonts\rmisbold #1\par % the text
+ \noindent \titlefonts\rm #1\par % the text
\let\lastnode=\empty % no node to associate with
\writetocentry{part}{#1}{}% but put it in the toc
\headingsoff % no headline or footline on the part page
+ % This outputs a mark at the end of the page that clears \thischapter
+ % and \thissection, as is done in \startcontents.
+ \let\pchapsepmacro\relax
+ \chapmacro{}{Yomitfromtoc}{}%
\chapoddpage
\endgroup
}
@@ -5449,9 +6303,6 @@ end
% @centerchap is like @unnumbered, but the heading is centered.
\outer\parseargdef\centerchap{%
- % Well, we could do the following in a group, but that would break
- % an assumption that \chapmacro is called at the outermost level.
- % Thus we are safer this way: --kasal, 24feb04
\let\centerparametersmaybe = \centerparameters
\unnmhead0{#1}%
\let\centerparametersmaybe = \relax
@@ -5543,14 +6394,6 @@ end
% Define @majorheading, @heading and @subheading
-% NOTE on use of \vbox for chapter headings, section headings, and such:
-% 1) We use \vbox rather than the earlier \line to permit
-% overlong headings to fold.
-% 2) \hyphenpenalty is set to 10000 because hyphenation in a
-% heading is obnoxious; this forbids it.
-% 3) Likewise, headings look best if no \parindent is used, and
-% if justification is not attempted. Hence \raggedright.
-
\def\majorheading{%
{\advance\chapheadingskip by 10pt \chapbreak }%
\parsearg\chapheadingzzz
@@ -5558,10 +6401,8 @@ end
\def\chapheading{\chapbreak \parsearg\chapheadingzzz}
\def\chapheadingzzz#1{%
- {\chapfonts \vbox{\hyphenpenalty=10000\tolerance=5000
- \parindent=0pt\ptexraggedright
- \rmisbold #1\hfill}}%
- \bigskip \par\penalty 200\relax
+ \vbox{\chapfonts \raggedtitlesettings #1\par}%
+ \nobreak\bigskip \nobreak
\suppressfirstparagraphindent
}
@@ -5585,7 +6426,11 @@ end
% Define plain chapter starts, and page on/off switching for it.
\def\chapbreak{\dobreak \chapheadingskip {-4000}}
+
+% Start a new page
\def\chappager{\par\vfill\supereject}
+
+% \chapoddpage - start on an odd page for a new chapter
% Because \domark is called before \chapoddpage, the filler page will
% get the headings for the next chapter, which is wrong. But we don't
% care -- we just disable all headings on the filler page.
@@ -5600,7 +6445,7 @@ end
\fi
}
-\def\setchapternewpage #1 {\csname CHAPPAG#1\endcsname}
+\parseargdef\setchapternewpage{\csname CHAPPAG#1\endcsname}
\def\CHAPPAGoff{%
\global\let\contentsalignmacro = \chappager
@@ -5621,17 +6466,26 @@ end
\CHAPPAGon
-% Chapter opening.
+% \chapmacro - Chapter opening.
%
% #1 is the text, #2 is the section type (Ynumbered, Ynothing,
% Yappendix, Yomitfromtoc), #3 the chapter number.
+% Not used for @heading series.
%
% To test against our argument.
\def\Ynothingkeyword{Ynothing}
-\def\Yomitfromtockeyword{Yomitfromtoc}
\def\Yappendixkeyword{Yappendix}
+\def\Yomitfromtockeyword{Yomitfromtoc}
%
\def\chapmacro#1#2#3{%
+ \expandafter\ifx\thisenv\titlepage\else
+ \checkenv{}% chapters, etc., should not start inside an environment.
+ \fi
+ % FIXME: \chapmacro is currently called from inside \titlepage when
+ % \setcontentsaftertitlepage to print the "Table of Contents" heading, but
+ % this should probably be done by \sectionheading with an option to print
+ % in chapter size.
+ %
% Insert the first mark before the heading break (see notes for \domark).
\let\prevchapterdefs=\lastchapterdefs
\let\prevsectiondefs=\lastsectiondefs
@@ -5683,7 +6537,8 @@ end
\domark
%
{%
- \chapfonts \rmisbold
+ \chapfonts \rm
+ \let\footnote=\errfootnoteheading % give better error message
%
% Have to define \lastsection before calling \donoderef, because the
% xref code eventually uses it. On the other hand, it has to be called
@@ -5720,8 +6575,7 @@ end
%
% Typeset the actual heading.
\nobreak % Avoid page breaks at the interline glue.
- \vbox{\hyphenpenalty=10000 \tolerance=5000 \parindent=0pt \ptexraggedright
- \hangindent=\wd0 \centerparametersmaybe
+ \vbox{\raggedtitlesettings \hangindent=\wd0 \centerparametersmaybe
\unhbox0 #1\par}%
}%
\nobreak\bigskip % no page break after a chapter title
@@ -5737,30 +6591,6 @@ end
}
-% I don't think this chapter style is supported any more, so I'm not
-% updating it with the new noderef stuff. We'll see. --karl, 11aug03.
-%
-\def\setchapterstyle #1 {\csname CHAPF#1\endcsname}
-%
-\def\unnchfopen #1{%
-\chapoddpage {\chapfonts \vbox{\hyphenpenalty=10000\tolerance=5000
- \parindent=0pt\ptexraggedright
- \rmisbold #1\hfill}}\bigskip \par\nobreak
-}
-\def\chfopen #1#2{\chapoddpage {\chapfonts
-\vbox to 3in{\vfil \hbox to\hsize{\hfil #2} \hbox to\hsize{\hfil #1} \vfil}}%
-\par\penalty 5000 %
-}
-\def\centerchfopen #1{%
-\chapoddpage {\chapfonts \vbox{\hyphenpenalty=10000\tolerance=5000
- \parindent=0pt
- \hfill {\rmisbold #1}\hfill}}\bigskip \par\nobreak
-}
-\def\CHAPFopen{%
- \global\let\chapmacro=\chfopen
- \global\let\centerchapmacro=\centerchfopen}
-
-
% Section titles. These macros combine the section number parts and
% call the generic \sectionheading to do the printing.
%
@@ -5778,22 +6608,29 @@ end
% Print any size, any type, section title.
%
-% #1 is the text, #2 is the section level (sec/subsec/subsubsec), #3 is
-% the section type for xrefs (Ynumbered, Ynothing, Yappendix), #4 is the
-% section number.
+% #1 is the text of the title,
+% #2 is the section level (sec/subsec/subsubsec),
+% #3 is the section type (Ynumbered, Ynothing, Yappendix, Yomitfromtoc),
+% #4 is the section number.
%
\def\seckeyword{sec}
%
\def\sectionheading#1#2#3#4{%
{%
- \checkenv{}% should not be in an environment.
- %
- % Switch to the right set of fonts.
- \csname #2fonts\endcsname \rmisbold
- %
\def\sectionlevel{#2}%
\def\temptype{#3}%
%
+ % It is ok for the @heading series commands to appear inside an
+ % environment (it's been historically allowed, though the logic is
+ % dubious), but not the others.
+ \ifx\temptype\Yomitfromtockeyword\else
+ \checkenv{}% non-@*heading should not be in an environment.
+ \fi
+ \let\footnote=\errfootnoteheading
+ %
+ % Switch to the right set of fonts.
+ \csname #2fonts\endcsname \rm
+ %
% Insert first mark before the heading break (see notes for \domark).
\let\prevsectiondefs=\lastsectiondefs
\ifx\temptype\Ynothingkeyword
@@ -5845,7 +6682,7 @@ end
%
% Now the second mark, after the heading break. No break points
% between here and the heading.
- \let\prevsectiondefs=\lastsectiondefs
+ \global\let\prevsectiondefs=\lastsectiondefs
\domark
%
% Only insert the space after the number if we have a section number.
@@ -5956,7 +6793,14 @@ end
% 1 and 2 (the page numbers aren't printed), and so are the first
% two pages of the document. Thus, we'd have two destinations named
% `1', and two named `2'.
- \ifpdf \global\pdfmakepagedesttrue \fi
+ \ifpdf
+ \global\pdfmakepagedesttrue
+ \else
+ \ifx\XeTeXrevision\thisisundefined
+ \else
+ \global\pdfmakepagedesttrue
+ \fi
+ \fi
}
@@ -6005,7 +6849,7 @@ end
\savepageno = \pageno
\begingroup % Set up to handle contents files properly.
\raggedbottom % Worry more about breakpoints than the bottom.
- \advance\hsize by -\contentsrightmargin % Don't use the full line length.
+ \entryrightmargin=\contentsrightmargin % Don't use the full line length.
%
% Roman numerals for page numbers.
\ifnum \pageno>0 \global\pageno = \lastnegativepageno \fi
@@ -6110,7 +6954,7 @@ end
% Chapters, in the main contents.
\def\numchapentry#1#2#3#4{\dochapentry{#2\labelspace#1}{#4}}
-%
+
% Chapters, in the short toc.
% See comments in \dochapentry re vbox and related settings.
\def\shortchapentry#1#2#3#4{%
@@ -6125,7 +6969,7 @@ end
\setbox0 = \hbox{\putwordAppendix{} M}%
\hbox to \wd0{\putwordAppendix{} #1\hss}}
%
-\def\appentry#1#2#3#4{\dochapentry{\appendixbox{#2}\labelspace#1}{#4}}
+\def\appentry#1#2#3#4{\dochapentry{\appendixbox{#2}\hskip.7em#1}{#4}}
% Unnumbered chapters.
\def\unnchapentry#1#2#3#4{\dochapentry{#1}{#4}}
@@ -6158,6 +7002,8 @@ end
\def\dochapentry#1#2{%
\penalty-300 \vskip1\baselineskip plus.33\baselineskip minus.25\baselineskip
\begingroup
+ % Move the page numbers slightly to the right
+ \advance\entryrightmargin by -0.05em
\chapentryfonts
\tocentry{#1}{\dopageno\bgroup#2\egroup}%
\endgroup
@@ -6212,14 +7058,14 @@ end
\catcode `\|=\other
\catcode `\<=\other
\catcode `\>=\other
- \catcode`\`=\other
- \catcode`\'=\other
- \escapechar=`\\
+ \catcode `\`=\other
+ \catcode `\'=\other
%
% ' is active in math mode (mathcode"8000). So reset it, and all our
% other math active characters (just in case), to plain's definitions.
\mathactive
%
+ % Inverse of the list at the beginning of the file.
\let\b=\ptexb
\let\bullet=\ptexbullet
\let\c=\ptexc
@@ -6235,9 +7081,11 @@ end
\let\+=\tabalign
\let\}=\ptexrbrace
\let\/=\ptexslash
+ \let\sp=\ptexsp
\let\*=\ptexstar
+ %\let\sup=\ptexsup % do not redefine, we want @sup to work in math mode
\let\t=\ptext
- \expandafter \let\csname top\endcsname=\ptextop % outer
+ \expandafter \let\csname top\endcsname=\ptextop % we've made it outer
\let\frenchspacing=\plainfrenchspacing
%
\def\endldots{\mathinner{\ldots\ldots\ldots\ldots}}%
@@ -6274,6 +7122,24 @@ end
\endgraf
\ifdim\lastskip<\envskipamount
\removelastskip
+ \ifnum\lastpenalty<10000
+ % Penalize breaking before the environment, because preceding text
+ % often leads into it.
+ \penalty100
+ \fi
+ \vskip\envskipamount
+ \fi
+ \fi
+}}
+
+\def\afterenvbreak{{%
+ % =10000 instead of <10000 because of a special case in \itemzzz and
+ % \sectionheading, q.v.
+ \ifnum \lastpenalty=10000 \else
+ \advance\envskipamount by \parskip
+ \endgraf
+ \ifdim\lastskip<\envskipamount
+ \removelastskip
% it's not a good place to break if the last penalty was \nobreak
% or better ...
\ifnum\lastpenalty<10000 \penalty-50 \fi
@@ -6282,8 +7148,6 @@ end
\fi
}}
-\let\afterenvbreak = \aboveenvbreak
-
% \nonarrowing is a flag. If "set", @lisp etc don't narrow margins; it will
% also clear it, so that its embedded environments do the narrowing again.
\let\nonarrowing=\relax
@@ -6321,15 +7185,13 @@ end
% side, and for 6pt waste from
% each corner char, and rule thickness
\normbskip=\baselineskip \normpskip=\parskip \normlskip=\lineskip
- % Flag to tell @lisp, etc., not to narrow margin.
- \let\nonarrowing = t%
%
% If this cartouche directly follows a sectioning command, we need the
% \parskip glue (backspaced over by default) or the cartouche can
% collide with the section heading.
\ifnum\lastpenalty>10000 \vskip\parskip \penalty\lastpenalty \fi
%
- \vbox\bgroup
+ \setbox\groupbox=\vbox\bgroup
\baselineskip=0pt\parskip=0pt\lineskip=0pt
\carttop
\hbox\bgroup
@@ -6353,6 +7215,7 @@ end
\egroup
\cartbot
\egroup
+ \addgroupbox
\checkinserts
}
@@ -6362,7 +7225,7 @@ end
\newdimen\nonfillparindent
\def\nonfillstart{%
\aboveenvbreak
- \hfuzz = 12pt % Don't be fussy
+ \ifdim\hfuzz < 12pt \hfuzz = 12pt \fi % Don't be fussy
\sepspaces % Make spaces be word-separators rather than space tokens.
\let\par = \lisppar % don't ignore blank lines
\obeylines % each line of input is a line of output
@@ -6489,9 +7352,13 @@ end
% @raggedright does more-or-less normal line breaking but no right
-% justification. From plain.tex.
+% justification. From plain.tex. Don't stretch around special
+% characters in urls in this environment, since the stretch at the right
+% should be enough.
\envdef\raggedright{%
- \rightskip0pt plus2em \spaceskip.3333em \xspaceskip.5em\relax
+ \rightskip0pt plus2.4em \spaceskip.3333em \xspaceskip.5em\relax
+ \def\urefprestretchamount{0pt}%
+ \def\urefpoststretchamount{0pt}%
}
\let\Eraggedright\par
@@ -6520,16 +7387,9 @@ end
\makedispenvdef{quotation}{\quotationstart}
%
\def\quotationstart{%
- {\parskip=0pt \aboveenvbreak}% because \aboveenvbreak inserts \parskip
- \parindent=0pt
- %
- % @cartouche defines \nonarrowing to inhibit narrowing at next level down.
+ \indentedblockstart % same as \indentedblock, but increase right margin too.
\ifx\nonarrowing\relax
- \advance\leftskip by \lispnarrowing
\advance\rightskip by \lispnarrowing
- \exdentamount = \lispnarrowing
- \else
- \let\nonarrowing = \relax
\fi
\parsearg\quotationlabel
}
@@ -6555,6 +7415,32 @@ end
\fi
}
+% @indentedblock is like @quotation, but indents only on the left and
+% has no optional argument.
+%
+\makedispenvdef{indentedblock}{\indentedblockstart}
+%
+\def\indentedblockstart{%
+ {\parskip=0pt \aboveenvbreak}% because \aboveenvbreak inserts \parskip
+ \parindent=0pt
+ %
+ % @cartouche defines \nonarrowing to inhibit narrowing at next level down.
+ \ifx\nonarrowing\relax
+ \advance\leftskip by \lispnarrowing
+ \exdentamount = \lispnarrowing
+ \else
+ \let\nonarrowing = \relax
+ \fi
+}
+
+% Keep a nonzero parskip for the environment, since we're doing normal filling.
+%
+\def\Eindentedblock{%
+ \par
+ {\parskip=0pt \afterenvbreak}%
+}
+\def\Esmallindentedblock{\Eindentedblock}
+
% LaTeX-like @verbatim...@end verbatim and @verb{<char>...<char>}
% If we want to allow any <char> as delimiter,
@@ -6712,7 +7598,7 @@ end
% typesetting commands (@smallbook, font changes, etc.) have to be done
% beforehand -- and a) we want @copying to be done first in the source
% file; b) letting users define the frontmatter in as flexible order as
-% possible is very desirable.
+% possible is desirable.
%
\def\copying{\checkenv{}\begingroup\scanargctxt\docopying}
\def\docopying#1@end copying{\endgroup\def\copyingtext{#1}}
@@ -6807,7 +7693,7 @@ end
\temp
}
-% \domakedefun \deffn \deffnx \deffnheader
+% \domakedefun \deffn \deffnx \deffnheader { (defn. of \deffnheader) }
%
% Define \deffn and \deffnx, without parameters.
% \deffnheader has to be defined explicitly.
@@ -7016,7 +7902,7 @@ end
\fi % no return type
#3% output function name
}%
- {\rm\enskip}% hskip 0.5 em of \tenrm
+ {\rm\enskip}% hskip 0.5 em of \rmfont
%
\boldbrax
% arguments will be output next, if any.
@@ -7033,7 +7919,10 @@ end
\df \sl \hyphenchar\font=0
%
% On the other hand, if an argument has two dashes (for instance), we
- % want a way to get ttsl. Let's try @var for that.
+ % want a way to get ttsl. We used to recommend @var for that, so
+ % leave the code in, but it's strange for @var to lead to typewriter.
+ % Nowadays we recommend @code, since the difference between a ttsl hyphen
+ % and a tt hyphen is pretty tiny. @code also disables ?` !`.
\def\var##1{{\setupmarkupstyle{var}\ttslanted{##1}}}%
#1%
\sl\hyphenchar\font=45
@@ -7142,34 +8031,49 @@ end
}
\fi
-\def\scanmacro#1{\begingroup
+\let\aftermacroxxx\relax
+\def\aftermacro{\aftermacroxxx}
+
+% alias because \c means cedilla in @tex or @math
+\let\texinfoc=\c
+
+\newcount\savedcatcodeone
+\newcount\savedcatcodetwo
+
+% Used at the time of macro expansion.
+% Argument is macro body with arguments substituted
+\def\scanmacro#1{%
\newlinechar`\^^M
- \let\xeatspaces\eatspaces
+ \def\xeatspaces{\eatspaces}%
%
- % Undo catcode changes of \startcontents and \doprintindex
- % When called from @insertcopying or (short)caption, we need active
- % backslash to get it printed correctly. Previously, we had
- % \catcode`\\=\other instead. We'll see whether a problem appears
- % with macro expansion. --kasal, 19aug04
- \catcode`\@=0 \catcode`\\=\active \escapechar=`\@
+ % Temporarily undo catcode changes of \printindex. Set catcode of @ to
+ % 0 so that @-commands in macro expansions aren't printed literally when
+ % formatting an index file, where \ is used as the escape character.
+ \savedcatcodeone=\catcode`\@
+ \savedcatcodetwo=\catcode`\\
+ \catcode`\@=0
+ \catcode`\\=\active
%
- % ... and for \example:
- \spaceisspace
+ % Process the macro body under the current catcode regime.
+ \scantokens{#1@texinfoc}\aftermacro%
%
- % The \empty here causes a following catcode 5 newline to be eaten as
- % part of reading whitespace after a control sequence. It does not
- % eat a catcode 13 newline. There's no good way to handle the two
- % cases (untried: maybe e-TeX's \everyeof could help, though plain TeX
- % would then have different behavior). See the Macro Details node in
- % the manual for the workaround we recommend for macros and
- % line-oriented commands.
- %
- \scantokens{#1\empty}%
-\endgroup}
+ \catcode`\@=\savedcatcodeone
+ \catcode`\\=\savedcatcodetwo
+ %
+ % The \texinfoc is to remove the \newlinechar added by \scantokens, and
+ % can be noticed by \parsearg.
+ % The \aftermacro allows a \comment at the end of the macro definition
+ % to duplicate itself past the final \newlinechar added by \scantokens:
+ % this is used in the definition of \group to comment out a newline. We
+ % don't do the same for \c to support Texinfo files with macros that ended
+ % with a @c, which should no longer be necessary.
+ % We avoid surrounding the call to \scantokens with \bgroup and \egroup
+ % to allow macros to open or close groups themselves.
+}
+% Used for copying and captions
\def\scanexp#1{%
- \edef\temp{\noexpand\scanmacro{#1}}%
- \temp
+ \expandafter\scanmacro\expandafter{#1}%
}
\newcount\paramno % Count of parameters
@@ -7177,7 +8081,7 @@ end
\newif\ifrecursive % Is it recursive?
% List of all defined macros in the form
-% \definedummyword\macro1\definedummyword\macro2...
+% \commondummyword\macro1\commondummyword\macro2...
% Currently is also contains all @aliases; the list can be split
% if there is a need.
\def\macrolist{}
@@ -7185,7 +8089,7 @@ end
% Add the macro to \macrolist
\def\addtomacrolist#1{\expandafter \addtomacrolistxxx \csname#1\endcsname}
\def\addtomacrolistxxx#1{%
- \toks0 = \expandafter{\macrolist\definedummyword#1}%
+ \toks0 = \expandafter{\macrolist\commondummyword#1}%
\xdef\macrolist{\the\toks0}%
}
@@ -7235,48 +8139,45 @@ end
\catcode`\+=\other
\catcode`\<=\other
\catcode`\>=\other
- \catcode`\@=\other
\catcode`\^=\other
\catcode`\_=\other
\catcode`\|=\other
\catcode`\~=\other
- \ifx\declaredencoding\ascii \else \setnonasciicharscatcodenonglobal\other \fi
+ \passthroughcharstrue
}
\def\scanargctxt{% used for copying and captions, not macros.
\scanctxt
+ \catcode`\@=\other
\catcode`\\=\other
\catcode`\^^M=\other
}
\def\macrobodyctxt{% used for @macro definitions
\scanctxt
+ \catcode`\ =\other
+ \catcode`\@=\other
\catcode`\{=\other
\catcode`\}=\other
\catcode`\^^M=\other
\usembodybackslash
}
-\def\macroargctxt{% used when scanning invocations
+% Used when scanning braced macro arguments. Note, however, that catcode
+% changes here are ineffectual if the macro invocation was nested inside
+% an argument to another Texinfo command.
+\def\macroargctxt{%
\scanctxt
- \catcode`\\=0
+ \catcode`\ =\active
+ \catcode`\^^M=\other
+ \catcode`\\=\active
}
-% why catcode 0 for \ in the above? To recognize \\ \{ \} as "escapes"
-% for the single characters \ { }. Thus, we end up with the "commands"
-% that would be written @\ @{ @} in a Texinfo document.
-%
-% We already have @{ and @}. For @\, we define it here, and only for
-% this purpose, to produce a typewriter backslash (so, the @\ that we
-% define for @math can't be used with @macro calls):
-%
-\def\\{\normalbackslash}%
-%
-% We would like to do this for \, too, since that is what makeinfo does.
-% But it is not possible, because Texinfo already has a command @, for a
-% cedilla accent. Documents must use @comma{} instead.
-%
-% \anythingelse will almost certainly be an error of some kind.
+\def\macrolineargctxt{% used for whole-line arguments without braces
+ \scanctxt
+ \catcode`\{=\other
+ \catcode`\}=\other
+}
% \mbodybackslash is the definition of \ in @macro bodies.
% It maps \foo\ => \csname macarg.foo\endcsname => #N
@@ -7329,7 +8230,7 @@ end
% Remove the macro name from \macrolist:
\begingroup
\expandafter\let\csname#1\endcsname \relax
- \let\definedummyword\unmacrodo
+ \let\commondummyword\unmacrodo
\xdef\macrolist{\macrolist}%
\endgroup
\else
@@ -7344,61 +8245,40 @@ end
\ifx #1\relax
% remove this
\else
- \noexpand\definedummyword \noexpand#1%
+ \noexpand\commondummyword \noexpand#1%
\fi
}
-% This makes use of the obscure feature that if the last token of a
-% <parameter list> is #, then the preceding argument is delimited by
-% an opening brace, and that opening brace is not consumed.
+% \getargs -- Parse the arguments to a @macro line. Set \macname to
+% the name of the macro, and \argl to the braced argument list.
\def\getargs#1{\getargsxxx#1{}}
\def\getargsxxx#1#{\getmacname #1 \relax\getmacargs}
\def\getmacname#1 #2\relax{\macname={#1}}
\def\getmacargs#1{\def\argl{#1}}
+% This made use of the feature that if the last token of a
+% <parameter list> is #, then the preceding argument is delimited by
+% an opening brace, and that opening brace is not consumed.
-% For macro processing make @ a letter so that we can make Texinfo private macro names.
-\edef\texiatcatcode{\the\catcode`\@}
-\catcode `@=11\relax
-
-% Parse the optional {params} list. Set up \paramno and \paramlist
-% so \defmacro knows what to do. Define \macarg.BLAH for each BLAH
-% in the params list to some hook where the argument si to be expanded. If
-% there are less than 10 arguments that hook is to be replaced by ##N where N
+% Parse the optional {params} list to @macro or @rmacro.
+% Set \paramno to the number of arguments,
+% and \paramlist to a parameter text for the macro (e.g. #1,#2,#3 for a
+% three-param macro.) Define \macarg.BLAH for each BLAH in the params
+% list to some hook where the argument is to be expanded. If there are
+% less than 10 arguments that hook is to be replaced by ##N where N
% is the position in that list, that is to say the macro arguments are to be
% defined `a la TeX in the macro body.
%
% That gets used by \mbodybackslash (above).
%
-% We need to get `macro parameter char #' into several definitions.
-% The technique used is stolen from LaTeX: let \hash be something
-% unexpandable, insert that wherever you need a #, and then redefine
-% it to # just before using the token list produced.
-%
-% The same technique is used to protect \eatspaces till just before
-% the macro is used.
+% If there are 10 or more arguments, a different technique is used: see
+% \parsemmanyargdef.
%
-% If there are 10 or more arguments, a different technique is used, where the
-% hook remains in the body, and when macro is to be expanded the body is
-% processed again to replace the arguments.
-%
-% In that case, the hook is \the\toks N-1, and we simply set \toks N-1 to the
-% argument N value and then \edef the body (nothing else will expand because of
-% the catcode regime underwhich the body was input).
-%
-% If you compile with TeX (not eTeX), and you have macros with 10 or more
-% arguments, you need that no macro has more than 256 arguments, otherwise an
-% error is produced.
\def\parsemargdef#1;{%
\paramno=0\def\paramlist{}%
\let\hash\relax
+ % \hash is redefined to `#' later to get it into definitions
\let\xeatspaces\relax
\parsemargdefxxx#1,;,%
- % In case that there are 10 or more arguments we parse again the arguments
- % list to set new definitions for the \macarg.BLAH macros corresponding to
- % each BLAH argument. It was anyhow needed to parse already once this list
- % in order to count the arguments, and as macros with at most 9 arguments
- % are by far more frequent than macro with 10 or more arguments, defining
- % twice the \macarg.BLAH macros does not cost too much processing power.
\ifnum\paramno<10\relax\else
\paramno0\relax
\parsemmanyargdef@@#1,;,% 10 or more arguments
@@ -7413,6 +8293,43 @@ end
\edef\paramlist{\paramlist\hash\the\paramno,}%
\fi\next}
+% \parsemacbody, \parsermacbody
+%
+% Read recursive and nonrecursive macro bodies. (They're different since
+% rec and nonrec macros end differently.)
+%
+% We are in \macrobodyctxt, and the \xdef causes backslashshes in the macro
+% body to be transformed.
+% Set \macrobody to the body of the macro, and call \defmacro.
+%
+{\catcode`\ =\other\long\gdef\parsemacbody#1@end macro{%
+\xdef\macrobody{\eatcr{#1}}\endgroup\defmacro}}%
+{\catcode`\ =\other\long\gdef\parsermacbody#1@end rmacro{%
+\xdef\macrobody{\eatcr{#1}}\endgroup\defmacro}}%
+
+% Make @ a letter, so that we can make private-to-Texinfo macro names.
+\edef\texiatcatcode{\the\catcode`\@}
+\catcode `@=11\relax
+
+%%%%%%%%%%%%%% Code for > 10 arguments only %%%%%%%%%%%%%%%%%%
+
+% If there are 10 or more arguments, a different technique is used, where the
+% hook remains in the body, and when macro is to be expanded the body is
+% processed again to replace the arguments.
+%
+% In that case, the hook is \the\toks N-1, and we simply set \toks N-1 to the
+% argument N value and then \edef the body (nothing else will expand because of
+% the catcode regime under which the body was input).
+%
+% If you compile with TeX (not eTeX), and you have macros with 10 or more
+% arguments, no macro can have more than 256 arguments (else error).
+%
+% In case that there are 10 or more arguments we parse again the arguments
+% list to set new definitions for the \macarg.BLAH macros corresponding to
+% each BLAH argument. It was anyhow needed to parse already once this list
+% in order to count the arguments, and as macros with at most 9 arguments
+% are by far more frequent than macro with 10 or more arguments, defining
+% twice the \macarg.BLAH macros does not cost too much processing power.
\def\parsemmanyargdef@@#1,{%
\if#1;\let\next=\relax
\else
@@ -7428,16 +8345,6 @@ end
\advance\paramno by 1\relax
\fi\next}
-% These two commands read recursive and nonrecursive macro bodies.
-% (They're different since rec and nonrec macros end differently.)
-%
-
-\catcode `\@\texiatcatcode
-\long\def\parsemacbody#1@end macro%
-{\xdef\temp{\eatcr{#1}}\endgroup\defmacro}%
-\long\def\parsermacbody#1@end rmacro%
-{\xdef\temp{\eatcr{#1}}\endgroup\defmacro}%
-\catcode `\@=11\relax
\let\endargs@\relax
\let\nil@\relax
@@ -7445,7 +8352,7 @@ end
\long\def\nillm@{\nil@}%
% This macro is expanded during the Texinfo macro expansion, not during its
-% definition. It gets all the arguments values and assigns them to macros
+% definition. It gets all the arguments' values and assigns them to macros
% macarg.ARGNAME
%
% #1 is the macro name
@@ -7466,8 +8373,6 @@ end
\getargvals@@
\fi
}
-
-%
\def\getargvals@@{%
\ifx\paramlist\nilm@
% Some sanity check needed here that \argvaluelist is also empty.
@@ -7511,7 +8416,8 @@ end
}
% Replace arguments by their values in the macro body, and place the result
-% in macro \@tempa
+% in macro \@tempa.
+%
\def\macvalstoargs@{%
% To do this we use the property that token registers that are \the'ed
% within an \edef expand only once. So we are going to place all argument
@@ -7535,8 +8441,9 @@ end
\expandafter\def\expandafter\@tempa\expandafter{\@tempc}%
}
+% Define the named-macro outside of this group and then close this group.
+%
\def\macargexpandinbody@{%
- %% Define the named-macro outside of this group and then close this group.
\expandafter
\endgroup
\macargdeflist@
@@ -7573,14 +8480,8 @@ end
\next
}
-% Save the token stack pointer into macro #1
-\def\texisavetoksstackpoint#1{\edef#1{\the\@cclvi}}
-% Restore the token stack pointer from number in macro #1
-\def\texirestoretoksstackpoint#1{\expandafter\mathchardef\expandafter\@cclvi#1\relax}
-% newtoks that can be used non \outer .
-\def\texinonouternewtoks{\alloc@ 5\toks \toksdef \@cclvi}
-
-% Tailing missing arguments are set to empty
+% Trailing missing arguments are set to empty.
+%
\def\setemptyargvalues@{%
\ifx\paramlist\nilm@
\let\next\macargexpandinbody@
@@ -7610,99 +8511,184 @@ end
\long\def#2{#4}%
}
-% This defines a Texinfo @macro. There are eight cases: recursive and
-% nonrecursive macros of zero, one, up to nine, and many arguments.
-% Much magic with \expandafter here.
+
+%%%%%%%%%%%%%% End of code for > 10 arguments %%%%%%%%%%%%%%%%%%
+
+
+% This defines a Texinfo @macro or @rmacro, called by \parsemacbody.
+% \macrobody has the body of the macro in it, with placeholders for
+% its parameters, looking like "\xeatspaces{\hash 1}".
+% \paramno is the number of parameters
+% \paramlist is a TeX parameter text, e.g. "#1,#2,#3,"
+% There are four cases: macros of zero, one, up to nine, and many arguments.
% \xdef is used so that macro definitions will survive the file
-% they're defined in; @include reads the file inside a group.
+% they're defined in: @include reads the file inside a group.
%
\def\defmacro{%
\let\hash=##% convert placeholders to macro parameter chars
- \ifrecursive
- \ifcase\paramno
- % 0
- \expandafter\xdef\csname\the\macname\endcsname{%
- \noexpand\scanmacro{\temp}}%
- \or % 1
- \expandafter\xdef\csname\the\macname\endcsname{%
- \bgroup\noexpand\macroargctxt
- \noexpand\braceorline
- \expandafter\noexpand\csname\the\macname xxx\endcsname}%
- \expandafter\xdef\csname\the\macname xxx\endcsname##1{%
- \egroup\noexpand\scanmacro{\temp}}%
- \else
- \ifnum\paramno<10\relax % at most 9
- \expandafter\xdef\csname\the\macname\endcsname{%
- \bgroup\noexpand\macroargctxt
- \noexpand\csname\the\macname xx\endcsname}%
- \expandafter\xdef\csname\the\macname xx\endcsname##1{%
- \expandafter\noexpand\csname\the\macname xxx\endcsname ##1,}%
- \expandafter\expandafter
- \expandafter\xdef
- \expandafter\expandafter
- \csname\the\macname xxx\endcsname
- \paramlist{\egroup\noexpand\scanmacro{\temp}}%
- \else % 10 or more
- \expandafter\xdef\csname\the\macname\endcsname{%
- \noexpand\getargvals@{\the\macname}{\argl}%
- }%
- \global\expandafter\let\csname mac.\the\macname .body\endcsname\temp
- \global\expandafter\let\csname mac.\the\macname .recurse\endcsname\gobble
- \fi
- \fi
+ \ifnum\paramno=1
+ \def\xeatspaces##1{##1}%
+ % This removes the pair of braces around the argument. We don't
+ % use \eatspaces, because this can cause ends of lines to be lost
+ % when the argument to \eatspaces is read, leading to line-based
+ % commands like "@itemize" not being read correctly.
\else
- \ifcase\paramno
- % 0
+ \let\xeatspaces\relax % suppress expansion
+ \fi
+ \ifcase\paramno
+ % 0
+ \expandafter\xdef\csname\the\macname\endcsname{%
+ \noexpand\scanmacro{\macrobody}}%
+ \or % 1
+ \expandafter\xdef\csname\the\macname\endcsname{%
+ \bgroup
+ \noexpand\braceorline
+ \expandafter\noexpand\csname\the\macname @@@\endcsname}%
+ \expandafter\xdef\csname\the\macname @@@\endcsname##1{%
+ \egroup
+ \noexpand\scanmacro{\macrobody}%
+ }%
+ \else % at most 9
+ \ifnum\paramno<10\relax
+ % @MACNAME sets the context for reading the macro argument
+ % @MACNAME@@ gets the argument, processes backslashes and appends a
+ % comma.
+ % @MACNAME@@@ removes braces surrounding the argument list.
+ % @MACNAME@@@@ scans the macro body with arguments substituted.
\expandafter\xdef\csname\the\macname\endcsname{%
- \noexpand\norecurse{\the\macname}%
- \noexpand\scanmacro{\temp}\egroup}%
- \or % 1
+ \bgroup
+ \noexpand\expandafter % This \expandafter skip any spaces after the
+ \noexpand\macroargctxt % macro before we change the catcode of space.
+ \noexpand\expandafter
+ \expandafter\noexpand\csname\the\macname @@\endcsname}%
+ \expandafter\xdef\csname\the\macname @@\endcsname##1{%
+ \noexpand\passargtomacro
+ \expandafter\noexpand\csname\the\macname @@@\endcsname{##1,}}%
+ \expandafter\xdef\csname\the\macname @@@\endcsname##1{%
+ \expandafter\noexpand\csname\the\macname @@@@\endcsname ##1}%
+ \expandafter\expandafter
+ \expandafter\xdef
+ \expandafter\expandafter
+ \csname\the\macname @@@@\endcsname\paramlist{%
+ \egroup\noexpand\scanmacro{\macrobody}}%
+ \else % 10 or more:
\expandafter\xdef\csname\the\macname\endcsname{%
- \bgroup\noexpand\macroargctxt
- \noexpand\braceorline
- \expandafter\noexpand\csname\the\macname xxx\endcsname}%
- \expandafter\xdef\csname\the\macname xxx\endcsname##1{%
- \egroup
- \noexpand\norecurse{\the\macname}%
- \noexpand\scanmacro{\temp}\egroup}%
- \else % at most 9
- \ifnum\paramno<10\relax
- \expandafter\xdef\csname\the\macname\endcsname{%
- \bgroup\noexpand\macroargctxt
- \expandafter\noexpand\csname\the\macname xx\endcsname}%
- \expandafter\xdef\csname\the\macname xx\endcsname##1{%
- \expandafter\noexpand\csname\the\macname xxx\endcsname ##1,}%
- \expandafter\expandafter
- \expandafter\xdef
- \expandafter\expandafter
- \csname\the\macname xxx\endcsname
- \paramlist{%
- \egroup
- \noexpand\norecurse{\the\macname}%
- \noexpand\scanmacro{\temp}\egroup}%
- \else % 10 or more:
- \expandafter\xdef\csname\the\macname\endcsname{%
- \noexpand\getargvals@{\the\macname}{\argl}%
- }%
- \global\expandafter\let\csname mac.\the\macname .body\endcsname\temp
- \global\expandafter\let\csname mac.\the\macname .recurse\endcsname\norecurse
- \fi
+ \noexpand\getargvals@{\the\macname}{\argl}%
+ }%
+ \global\expandafter\let\csname mac.\the\macname .body\endcsname\macrobody
+ \global\expandafter\let\csname mac.\the\macname .recurse\endcsname\gobble
\fi
\fi}
-\catcode `\@\texiatcatcode\relax
+\catcode `\@\texiatcatcode\relax % end private-to-Texinfo catcodes
\def\norecurse#1{\bgroup\cslet{#1}{macsave.#1}}
-% \braceorline decides whether the next nonwhitespace character is a
-% {. If so it reads up to the closing }, if not, it reads the whole
-% line. Whatever was read is then fed to the next control sequence
-% as an argument (by \parsebrace or \parsearg).
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%
+{\catcode`\@=0 \catcode`\\=13 % We need to manipulate \ so use @ as escape
+@catcode`@_=11 % private names
+@catcode`@!=11 % used as argument separator
+
+% \passargtomacro#1#2 -
+% Call #1 with a list of tokens #2, with any doubled backslashes in #2
+% compressed to one.
+%
+% This implementation works by expansion, and not execution (so we cannot use
+% \def or similar). This reduces the risk of this failing in contexts where
+% complete expansion is done with no execution (for example, in writing out to
+% an auxiliary file for an index entry).
+%
+% State is kept in the input stream: the argument passed to
+% @look_ahead, @gobble_and_check_finish and @add_segment is
+%
+% THE_MACRO ARG_RESULT ! {PENDING_BS} NEXT_TOKEN (... rest of input)
+%
+% where:
+% THE_MACRO - name of the macro we want to call
+% ARG_RESULT - argument list we build to pass to that macro
+% PENDING_BS - either a backslash or nothing
+% NEXT_TOKEN - used to look ahead in the input stream to see what's coming next
+
+@gdef@passargtomacro#1#2{%
+ @add_segment #1!{}@relax#2\@_finish\%
+}
+@gdef@_finish{@_finishx} @global@let@_finishx@relax
+
+% #1 - THE_MACRO ARG_RESULT
+% #2 - PENDING_BS
+% #3 - NEXT_TOKEN
+% #4 used to look ahead
+%
+% If the next token is not a backslash, process the rest of the argument;
+% otherwise, remove the next token.
+@gdef@look_ahead#1!#2#3#4{%
+ @ifx#4\%
+ @expandafter@gobble_and_check_finish
+ @else
+ @expandafter@add_segment
+ @fi#1!{#2}#4#4%
+}
+
+% #1 - THE_MACRO ARG_RESULT
+% #2 - PENDING_BS
+% #3 - NEXT_TOKEN
+% #4 should be a backslash, which is gobbled.
+% #5 looks ahead
+%
+% Double backslash found. Add a single backslash, and look ahead.
+@gdef@gobble_and_check_finish#1!#2#3#4#5{%
+ @add_segment#1\!{}#5#5%
+}
+
+@gdef@is_fi{@fi}
+
+% #1 - THE_MACRO ARG_RESULT
+% #2 - PENDING_BS
+% #3 - NEXT_TOKEN
+% #4 is input stream until next backslash
+%
+% Input stream is either at the start of the argument, or just after a
+% backslash sequence, either a lone backslash, or a doubled backslash.
+% NEXT_TOKEN contains the first token in the input stream: if it is \finish,
+% finish; otherwise, append to ARG_RESULT the segment of the argument up until
+% the next backslash. PENDING_BACKSLASH contains a backslash to represent
+% a backslash just before the start of the input stream that has not been
+% added to ARG_RESULT.
+@gdef@add_segment#1!#2#3#4\{%
+@ifx#3@_finish
+ @call_the_macro#1!%
+@else
+ % append the pending backslash to the result, followed by the next segment
+ @expandafter@is_fi@look_ahead#1#2#4!{\}@fi
+ % this @fi is discarded by @look_ahead.
+ % we can't get rid of it with \expandafter because we don't know how
+ % long #4 is.
+}
+
+% #1 - THE_MACRO
+% #2 - ARG_RESULT
+% #3 discards the res of the conditional in @add_segment, and @is_fi ends the
+% conditional.
+@gdef@call_the_macro#1#2!#3@fi{@is_fi #1{#2}}
+
+}
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+% \braceorline MAC is used for a one-argument macro MAC. It checks
+% whether the next non-whitespace character is a {. It sets the context
+% for reading the argument (slightly different in the two cases). Then,
+% to read the argument, in the whole-line case, it then calls the regular
+% \parsearg MAC; in the lbrace case, it calls \passargtomacro MAC.
%
\def\braceorline#1{\let\macnamexxx=#1\futurelet\nchar\braceorlinexxx}
\def\braceorlinexxx{%
- \ifx\nchar\bgroup\else
- \expandafter\parsearg
+ \ifx\nchar\bgroup
+ \macroargctxt
+ \expandafter\passargtomacro
+ \else
+ \macrolineargctxt\expandafter\parsearg
\fi \macnamexxx}
@@ -7784,7 +8770,10 @@ end
\pdfmkdest{#1}%
\iflinks
{%
+ \requireauxfile
\atdummies % preserve commands, but don't expand them
+ % match definition in \xrdef, \refx, \xrefX.
+ \def\value##1{##1}%
\edef\writexrdef##1##2{%
\write\auxfile{@xrdef{#1-% #1 of \setref, expanded by the \edef
##1}{##2}}% these are parameters of \writexrdef
@@ -7823,9 +8812,12 @@ end
% node name, #4 the name of the Info file, #5 the name of the printed
% manual. All but the node name can be omitted.
%
-\def\pxref#1{\putwordsee{} \xrefX[#1,,,,,,,]}
-\def\xref#1{\putwordSee{} \xrefX[#1,,,,,,,]}
-\def\ref#1{\xrefX[#1,,,,,,,]}
+\def\pxref{\putwordsee{} \xrefXX}
+\def\xref{\putwordSee{} \xrefXX}
+\def\ref{\xrefXX}
+
+\def\xrefXX#1{\def\xrefXXarg{#1}\futurelet\tokenafterxref\xrefXXX}
+\def\xrefXXX{\expandafter\xrefX\expandafter[\xrefXXarg,,,,,,,]}
%
\newbox\toprefbox
\newbox\printedrefnamebox
@@ -7872,9 +8864,10 @@ end
%
% Make link in pdf output.
\ifpdf
+ % For pdfTeX and LuaTeX
{\indexnofonts
- \turnoffactive
\makevalueexpandable
+ \turnoffactive
% This expands tokens, so do it after making catcode changes, so _
% etc. don't get their TeX definitions. This ignores all spaces in
% #4, including (wrongly) those in the middle of the filename.
@@ -7882,35 +8875,74 @@ end
%
% This (wrongly) does not take account of leading or trailing
% spaces in #1, which should be ignored.
- \edef\pdfxrefdest{#1}%
- \ifx\pdfxrefdest\empty
- \def\pdfxrefdest{Top}% no empty targets
- \else
- \txiescapepdf\pdfxrefdest % escape PDF special chars
+ \setpdfdestname{#1}%
+ %
+ \ifx\pdfdestname\empty
+ \def\pdfdestname{Top}% no empty targets
\fi
%
\leavevmode
\startlink attr{/Border [0 0 0]}%
\ifnum\filenamelength>0
- goto file{\the\filename.pdf} name{\pdfxrefdest}%
+ goto file{\the\filename.pdf} name{\pdfdestname}%
\else
- goto name{\pdfmkpgn{\pdfxrefdest}}%
+ goto name{\pdfmkpgn{\pdfdestname}}%
\fi
}%
\setcolor{\linkcolor}%
+ \else
+ \ifx\XeTeXrevision\thisisundefined
+ \else
+ % For XeTeX
+ {\indexnofonts
+ \makevalueexpandable
+ \turnoffactive
+ % This expands tokens, so do it after making catcode changes, so _
+ % etc. don't get their TeX definitions. This ignores all spaces in
+ % #4, including (wrongly) those in the middle of the filename.
+ \getfilename{#4}%
+ %
+ % This (wrongly) does not take account of leading or trailing
+ % spaces in #1, which should be ignored.
+ \setpdfdestname{#1}%
+ %
+ \ifx\pdfdestname\empty
+ \def\pdfdestname{Top}% no empty targets
+ \fi
+ %
+ \leavevmode
+ \ifnum\filenamelength>0
+ % With default settings,
+ % XeTeX (xdvipdfmx) replaces link destination names with integers.
+ % In this case, the replaced destination names of
+ % remote PDFs are no longer known. In order to avoid a replacement,
+ % you can use xdvipdfmx's command line option `-C 0x0010'.
+ % If you use XeTeX 0.99996+ (TeX Live 2016+),
+ % this command line option is no longer necessary
+ % because we can use the `dvipdfmx:config' special.
+ \special{pdf:bann << /Border [0 0 0] /Type /Annot /Subtype /Link /A
+ << /S /GoToR /F (\the\filename.pdf) /D (\pdfdestname) >> >>}%
+ \else
+ \special{pdf:bann << /Border [0 0 0] /Type /Annot /Subtype /Link /A
+ << /S /GoTo /D (\pdfdestname) >> >>}%
+ \fi
+ }%
+ \setcolor{\linkcolor}%
+ \fi
\fi
- %
- % Float references are printed completely differently: "Figure 1.2"
- % instead of "[somenode], p.3". We distinguish them by the
- % LABEL-title being set to a magic string.
{%
% Have to otherify everything special to allow the \csname to
% include an _ in the xref name, etc.
\indexnofonts
\turnoffactive
+ \def\value##1{##1}%
\expandafter\global\expandafter\let\expandafter\Xthisreftitle
\csname XR#1-title\endcsname
}%
+ %
+ % Float references are printed completely differently: "Figure 1.2"
+ % instead of "[somenode], p.3". \iffloat distinguishes them by
+ % \Xthisreftitle being set to a magic string.
\iffloat\Xthisreftitle
% If the user specified the print name (third arg) to the ref,
% print it instead of our usual "Figure 1.2".
@@ -7969,6 +9001,15 @@ end
%
% output the `page 3'.
\turnoffactive \putwordpage\tie\refx{#1-pg}{}%
+ % Add a , if xref followed by a space
+ \if\space\noexpand\tokenafterxref ,%
+ \else\ifx\ \tokenafterxref ,% @TAB
+ \else\ifx\*\tokenafterxref ,% @*
+ \else\ifx\ \tokenafterxref ,% @SPACE
+ \else\ifx\
+ \tokenafterxref ,% @NL
+ \else\ifx\tie\tokenafterxref ,% @tie
+ \fi\fi\fi\fi\fi\fi
\fi\fi
\fi
\endlink
@@ -8035,13 +9076,14 @@ end
\fi\fi\fi
}
-% Define \refx{NAME}{SUFFIX} to reference a cross-reference string named NAME.
-% If its value is nonempty, SUFFIX is output afterward.
-%
+% \refx{NAME}{SUFFIX} - reference a cross-reference string named NAME. SUFFIX
+% is output afterwards if non-empty.
\def\refx#1#2{%
+ \requireauxfile
{%
\indexnofonts
\otherbackslash
+ \def\value##1{##1}%
\expandafter\global\expandafter\let\expandafter\thisrefX
\csname XR#1\endcsname
}%
@@ -8066,16 +9108,18 @@ end
#2% Output the suffix in any case.
}
-% This is the macro invoked by entries in the aux file. Usually it's
-% just a \def (we prepend XR to the control sequence name to avoid
-% collisions). But if this is a float type, we have more work to do.
+% This is the macro invoked by entries in the aux file. Define a control
+% sequence for a cross-reference target (we prepend XR to the control sequence
+% name to avoid collisions). The value is the page number. If this is a float
+% type, we have more work to do.
%
\def\xrdef#1#2{%
- {% The node name might contain 8-bit characters, which in our current
- % implementation are changed to commands like @'e. Don't let these
- % mess up the control sequence name.
+ {% Expand the node or anchor name to remove control sequences.
+ % \turnoffactive stops 8-bit characters being changed to commands
+ % like @'e. \refx does the same to retrieve the value in the definition.
\indexnofonts
\turnoffactive
+ \def\value##1{##1}%
\xdef\safexrefname{#1}%
}%
%
@@ -8102,6 +9146,23 @@ end
\fi
}
+% If working on a large document in chapters, it is convenient to
+% be able to disable indexing, cross-referencing, and contents, for test runs.
+% This is done with @novalidate at the beginning of the file.
+%
+\newif\iflinks \linkstrue % by default we want the aux files.
+\let\novalidate = \linksfalse
+
+% Used when writing to the aux file, or when using data from it.
+\def\requireauxfile{%
+ \iflinks
+ \tryauxfile
+ % Open the new aux file. TeX will close it automatically at exit.
+ \immediate\openout\auxfile=\jobname.aux
+ \fi
+ \global\let\requireauxfile=\relax % Only do this once.
+}
+
% Read the last existing aux file, if any. No error if none exists.
%
\def\tryauxfile{%
@@ -8180,16 +9241,6 @@ end
% now. --karl, 15jan04.
\catcode`\\=\other
%
- % Make the characters 128-255 be printing characters.
- {%
- \count1=128
- \def\loop{%
- \catcode\count1=\other
- \advance\count1 by 1
- \ifnum \count1<256 \loop \fi
- }%
- }%
- %
% @ is our escape character in .aux files, and we need braces.
\catcode`\{=1
\catcode`\}=2
@@ -8222,8 +9273,6 @@ end
%
% Auto-number footnotes. Otherwise like plain.
\gdef\footnote{%
- \let\indent=\ptexindent
- \let\noindent=\ptexnoindent
\global\advance\footnoteno by \@ne
\edef\thisfootno{$^{\the\footnoteno}$}%
%
@@ -8247,10 +9296,15 @@ end
%
\gdef\dofootnote{%
\insert\footins\bgroup
+ %
+ % Nested footnotes are not supported in TeX, that would take a lot
+ % more work. (\startsavinginserts does not suffice.)
+ \let\footnote=\errfootnotenest
+ %
% We want to typeset this text as a normal paragraph, even if the
% footnote reference occurs in (for example) a display environment.
% So reset some parameters.
- \hsize=\pagewidth
+ \hsize=\txipagewidth
\interlinepenalty\interfootnotelinepenalty
\splittopskip\ht\strutbox % top baseline for broken footnotes
\splitmaxdepth\dp\strutbox
@@ -8284,13 +9338,24 @@ end
}
}%end \catcode `\@=11
+\def\errfootnotenest{%
+ \errhelp=\EMsimple
+ \errmessage{Nested footnotes not supported in texinfo.tex,
+ even though they work in makeinfo; sorry}
+}
+
+\def\errfootnoteheading{%
+ \errhelp=\EMsimple
+ \errmessage{Footnotes in chapters, sections, etc., are not supported}
+}
+
% In case a @footnote appears in a vbox, save the footnote text and create
% the real \insert just after the vbox finished. Otherwise, the insertion
% would be lost.
% Similarly, if a @footnote appears inside an alignment, save the footnote
% text to a box and make the \insert when a row of the table is finished.
% And the same can be done for other insert classes. --kasal, 16nov03.
-
+%
% Replace the \insert primitive by a cheating macro.
% Deeper inside, just make sure that the saved insertions are not spilled
% out prematurely.
@@ -8388,6 +9453,7 @@ end
\def\imagexxx#1,#2,#3,#4,#5,#6\finish{\begingroup
\catcode`\^^M = 5 % in case we're inside an example
\normalturnoffactive % allow _ et al. in names
+ \def\xprocessmacroarg{\eatspaces}% in case we are being used via a macro
% If the image is by itself, center it.
\ifvmode
\imagevmodetrue
@@ -8417,12 +9483,21 @@ end
%
% Output the image.
\ifpdf
+ % For pdfTeX and LuaTeX <= 0.80
\dopdfimage{#1}{#2}{#3}%
\else
- % \epsfbox itself resets \epsf?size at each figure.
- \setbox0 = \hbox{\ignorespaces #2}\ifdim\wd0 > 0pt \epsfxsize=#2\relax \fi
- \setbox0 = \hbox{\ignorespaces #3}\ifdim\wd0 > 0pt \epsfysize=#3\relax \fi
- \epsfbox{#1.eps}%
+ \ifx\XeTeXrevision\thisisundefined
+ % For epsf.tex
+ % \epsfbox itself resets \epsf?size at each figure.
+ \setbox0 = \hbox{\ignorespaces #2}%
+ \ifdim\wd0 > 0pt \epsfxsize=#2\relax \fi
+ \setbox0 = \hbox{\ignorespaces #3}%
+ \ifdim\wd0 > 0pt \epsfysize=#3\relax \fi
+ \epsfbox{#1.eps}%
+ \else
+ % For XeTeX
+ \doxeteximage{#1}{#2}{#3}%
+ \fi
\fi
%
\ifimagevmode
@@ -8544,7 +9619,7 @@ end
%
\ifx\thiscaption\empty \else
\ifx\floatident\empty \else
- \appendtomacro\captionline{: }% had ident, so need a colon between
+ \appendtomacro\captionline{: }% had ident, so need a colon between
\fi
%
% caption text.
@@ -8568,32 +9643,20 @@ end
% \floatlabel-lof. Besides \floatident, we include the short
% caption if specified, else the full caption if specified, else nothing.
{%
+ \requireauxfile
\atdummies
%
- % since we read the caption text in the macro world, where ^^M
- % is turned into a normal character, we have to scan it back, so
- % we don't write the literal three characters "^^M" into the aux file.
- \scanexp{%
- \xdef\noexpand\gtemp{%
- \ifx\thisshortcaption\empty
- \thiscaption
- \else
- \thisshortcaption
- \fi
- }%
- }%
+ \ifx\thisshortcaption\empty
+ \def\gtemp{\thiscaption}%
+ \else
+ \def\gtemp{\thisshortcaption}%
+ \fi
\immediate\write\auxfile{@xrdef{\floatlabel-lof}{\floatident
- \ifx\gtemp\empty \else : \gtemp \fi}}%
+ \ifx\gtemp\empty \else : \gtemp \fi}}%
}%
\fi
\egroup % end of \vtop
%
- % place the captured inserts
- %
- % BEWARE: when the floats start floating, we have to issue warning
- % whenever an insert appears inside a float which could possibly
- % float. --kasal, 26may04
- %
\checkinserts
}
@@ -8707,20 +9770,20 @@ end
{
\catcode`\_ = \active
\globaldefs=1
-\parseargdef\documentlanguage{\begingroup
- \let_=\normalunderscore % normal _ character for filenames
+\parseargdef\documentlanguage{%
\tex % read txi-??.tex file in plain TeX.
% Read the file by the name they passed if it exists.
+ \let_ = \normalunderscore % normal _ character for filename test
\openin 1 txi-#1.tex
\ifeof 1
- \documentlanguagetrywithoutunderscore{#1_\finish}%
+ \documentlanguagetrywithoutunderscore #1_\finish
\else
\globaldefs = 1 % everything in the txi-LL files needs to persist
\input txi-#1.tex
\fi
\closein 1
\endgroup % end raw TeX
-\endgroup}
+}
%
% If they passed de_DE, and txi-de_DE.tex doesn't exist,
% try txi-de.tex.
@@ -8768,6 +9831,70 @@ directory should work if nowhere else does.}
\global\righthyphenmin = #3\relax
}
+% XeTeX and LuaTeX can handle Unicode natively.
+% Their default I/O uses UTF-8 sequences instead of a byte-wise operation.
+% Other TeX engines' I/O (pdfTeX, etc.) is byte-wise.
+%
+\newif\iftxinativeunicodecapable
+\newif\iftxiusebytewiseio
+
+\ifx\XeTeXrevision\thisisundefined
+ \ifx\luatexversion\thisisundefined
+ \txinativeunicodecapablefalse
+ \txiusebytewiseiotrue
+ \else
+ \txinativeunicodecapabletrue
+ \txiusebytewiseiofalse
+ \fi
+\else
+ \txinativeunicodecapabletrue
+ \txiusebytewiseiofalse
+\fi
+
+% Set I/O by bytes instead of UTF-8 sequence for XeTeX and LuaTex
+% for non-UTF-8 (byte-wise) encodings.
+%
+\def\setbytewiseio{%
+ \ifx\XeTeXrevision\thisisundefined
+ \else
+ \XeTeXdefaultencoding "bytes" % For subsequent files to be read
+ \XeTeXinputencoding "bytes" % For document root file
+ % Unfortunately, there seems to be no corresponding XeTeX command for
+ % output encoding. This is a problem for auxiliary index and TOC files.
+ % The only solution would be perhaps to write out @U{...} sequences in
+ % place of non-ASCII characters.
+ \fi
+
+ \ifx\luatexversion\thisisundefined
+ \else
+ \directlua{
+ local utf8_char, byte, gsub = unicode.utf8.char, string.byte, string.gsub
+ local function convert_char (char)
+ return utf8_char(byte(char))
+ end
+
+ local function convert_line (line)
+ return gsub(line, ".", convert_char)
+ end
+
+ callback.register("process_input_buffer", convert_line)
+
+ local function convert_line_out (line)
+ local line_out = ""
+ for c in string.utfvalues(line) do
+ line_out = line_out .. string.char(c)
+ end
+ return line_out
+ end
+
+ callback.register("process_output_buffer", convert_line_out)
+ }
+ \fi
+
+ \txiusebytewiseiotrue
+}
+
+
% Helpers for encodings.
% Set the catcode of characters 128 through 255 to the specified number.
%
@@ -8790,7 +9917,9 @@ directory should work if nowhere else does.}
% @documentencoding sets the definition of non-ASCII characters
% according to the specified encoding.
%
-\parseargdef\documentencoding{%
+\def\documentencoding{\parseargusing\filenamecatcodes\documentencodingzzz}
+\def\documentencodingzzz#1{%
+ %
% Encoding being declared for the document.
\def\declaredencoding{\csname #1.enc\endcsname}%
%
@@ -8806,35 +9935,66 @@ directory should work if nowhere else does.}
\asciichardefs
%
\else \ifx \declaredencoding \lattwo
+ \iftxinativeunicodecapable
+ \setbytewiseio
+ \fi
\setnonasciicharscatcode\active
\lattwochardefs
%
\else \ifx \declaredencoding \latone
+ \iftxinativeunicodecapable
+ \setbytewiseio
+ \fi
\setnonasciicharscatcode\active
\latonechardefs
%
\else \ifx \declaredencoding \latnine
+ \iftxinativeunicodecapable
+ \setbytewiseio
+ \fi
\setnonasciicharscatcode\active
\latninechardefs
%
\else \ifx \declaredencoding \utfeight
- \setnonasciicharscatcode\active
- \utfeightchardefs
+ \iftxinativeunicodecapable
+ % For native Unicode handling (XeTeX and LuaTeX)
+ \nativeunicodechardefs
+ \else
+ % For treating UTF-8 as byte sequences (TeX, eTeX and pdfTeX)
+ \setnonasciicharscatcode\active
+ % since we already invoked \utfeightchardefs at the top level
+ % (below), do not re-invoke it, otherwise our check for duplicated
+ % definitions gets triggered. Making non-ascii chars active is
+ % sufficient.
+ \fi
%
\else
- \message{Unknown document encoding #1, ignoring.}%
+ \message{Ignoring unknown document encoding: #1.}%
%
\fi % utfeight
\fi % latnine
\fi % latone
\fi % lattwo
\fi % ascii
+ %
+ \ifx\XeTeXrevision\thisisundefined
+ \else
+ \ifx \declaredencoding \utfeight
+ \else
+ \ifx \declaredencoding \ascii
+ \else
+ \message{Warning: XeTeX with non-UTF-8 encodings cannot handle %
+ non-ASCII characters in auxiliary files.}%
+ \fi
+ \fi
+ \fi
}
+% emacs-page
% A message to be logged when using a character that isn't available
% the default font encoding (OT1).
%
-\def\missingcharmsg#1{\message{Character missing in OT1 encoding: #1.}}
+\def\missingcharmsg#1{\message{Character missing, sorry: #1.}}
% Take account of \c (plain) vs. \, (Texinfo) difference.
\def\cedilla#1{\ifx\c\ptexc\c{#1}\else\,{#1}\fi}
@@ -8844,111 +10004,119 @@ directory should work if nowhere else does.}
% macros containing the character definitions.
\setnonasciicharscatcode\active
%
+
+\def\gdefchar#1#2{%
+\gdef#1{%
+ \ifpassthroughchars
+ \string#1%
+ \else
+ #2%
+ \fi
+}}
+
% Latin1 (ISO-8859-1) character definitions.
\def\latonechardefs{%
- \gdef^^a0{\tie}
- \gdef^^a1{\exclamdown}
- \gdef^^a2{\missingcharmsg{CENT SIGN}}
- \gdef^^a3{{\pounds}}
- \gdef^^a4{\missingcharmsg{CURRENCY SIGN}}
- \gdef^^a5{\missingcharmsg{YEN SIGN}}
- \gdef^^a6{\missingcharmsg{BROKEN BAR}}
- \gdef^^a7{\S}
- \gdef^^a8{\"{}}
- \gdef^^a9{\copyright}
- \gdef^^aa{\ordf}
- \gdef^^ab{\guillemetleft}
- \gdef^^ac{$\lnot$}
- \gdef^^ad{\-}
- \gdef^^ae{\registeredsymbol}
- \gdef^^af{\={}}
- %
- \gdef^^b0{\textdegree}
- \gdef^^b1{$\pm$}
- \gdef^^b2{$^2$}
- \gdef^^b3{$^3$}
- \gdef^^b4{\'{}}
- \gdef^^b5{$\mu$}
- \gdef^^b6{\P}
- %
- \gdef^^b7{$^.$}
- \gdef^^b8{\cedilla\ }
- \gdef^^b9{$^1$}
- \gdef^^ba{\ordm}
- %
- \gdef^^bb{\guillemetright}
- \gdef^^bc{$1\over4$}
- \gdef^^bd{$1\over2$}
- \gdef^^be{$3\over4$}
- \gdef^^bf{\questiondown}
- %
- \gdef^^c0{\`A}
- \gdef^^c1{\'A}
- \gdef^^c2{\^A}
- \gdef^^c3{\~A}
- \gdef^^c4{\"A}
- \gdef^^c5{\ringaccent A}
- \gdef^^c6{\AE}
- \gdef^^c7{\cedilla C}
- \gdef^^c8{\`E}
- \gdef^^c9{\'E}
- \gdef^^ca{\^E}
- \gdef^^cb{\"E}
- \gdef^^cc{\`I}
- \gdef^^cd{\'I}
- \gdef^^ce{\^I}
- \gdef^^cf{\"I}
- %
- \gdef^^d0{\DH}
- \gdef^^d1{\~N}
- \gdef^^d2{\`O}
- \gdef^^d3{\'O}
- \gdef^^d4{\^O}
- \gdef^^d5{\~O}
- \gdef^^d6{\"O}
- \gdef^^d7{$\times$}
- \gdef^^d8{\O}
- \gdef^^d9{\`U}
- \gdef^^da{\'U}
- \gdef^^db{\^U}
- \gdef^^dc{\"U}
- \gdef^^dd{\'Y}
- \gdef^^de{\TH}
- \gdef^^df{\ss}
- %
- \gdef^^e0{\`a}
- \gdef^^e1{\'a}
- \gdef^^e2{\^a}
- \gdef^^e3{\~a}
- \gdef^^e4{\"a}
- \gdef^^e5{\ringaccent a}
- \gdef^^e6{\ae}
- \gdef^^e7{\cedilla c}
- \gdef^^e8{\`e}
- \gdef^^e9{\'e}
- \gdef^^ea{\^e}
- \gdef^^eb{\"e}
- \gdef^^ec{\`{\dotless i}}
- \gdef^^ed{\'{\dotless i}}
- \gdef^^ee{\^{\dotless i}}
- \gdef^^ef{\"{\dotless i}}
- %
- \gdef^^f0{\dh}
- \gdef^^f1{\~n}
- \gdef^^f2{\`o}
- \gdef^^f3{\'o}
- \gdef^^f4{\^o}
- \gdef^^f5{\~o}
- \gdef^^f6{\"o}
- \gdef^^f7{$\div$}
- \gdef^^f8{\o}
- \gdef^^f9{\`u}
- \gdef^^fa{\'u}
- \gdef^^fb{\^u}
- \gdef^^fc{\"u}
- \gdef^^fd{\'y}
- \gdef^^fe{\th}
- \gdef^^ff{\"y}
+ \gdefchar^^a0{\tie}
+ \gdefchar^^a1{\exclamdown}
+ \gdefchar^^a2{{\tcfont \char162}} % cent
+ \gdefchar^^a3{\pounds{}}
+ \gdefchar^^a4{{\tcfont \char164}} % currency
+ \gdefchar^^a5{{\tcfont \char165}} % yen
+ \gdefchar^^a6{{\tcfont \char166}} % broken bar
+ \gdefchar^^a7{\S}
+ \gdefchar^^a8{\"{}}
+ \gdefchar^^a9{\copyright{}}
+ \gdefchar^^aa{\ordf}
+ \gdefchar^^ab{\guillemetleft{}}
+ \gdefchar^^ac{\ensuremath\lnot}
+ \gdefchar^^ad{\-}
+ \gdefchar^^ae{\registeredsymbol{}}
+ \gdefchar^^af{\={}}
+ %
+ \gdefchar^^b0{\textdegree}
+ \gdefchar^^b1{$\pm$}
+ \gdefchar^^b2{$^2$}
+ \gdefchar^^b3{$^3$}
+ \gdefchar^^b4{\'{}}
+ \gdefchar^^b5{$\mu$}
+ \gdefchar^^b6{\P}
+ \gdefchar^^b7{\ensuremath\cdot}
+ \gdefchar^^b8{\cedilla\ }
+ \gdefchar^^b9{$^1$}
+ \gdefchar^^ba{\ordm}
+ \gdefchar^^bb{\guillemetright{}}
+ \gdefchar^^bc{$1\over4$}
+ \gdefchar^^bd{$1\over2$}
+ \gdefchar^^be{$3\over4$}
+ \gdefchar^^bf{\questiondown}
+ %
+ \gdefchar^^c0{\`A}
+ \gdefchar^^c1{\'A}
+ \gdefchar^^c2{\^A}
+ \gdefchar^^c3{\~A}
+ \gdefchar^^c4{\"A}
+ \gdefchar^^c5{\ringaccent A}
+ \gdefchar^^c6{\AE}
+ \gdefchar^^c7{\cedilla C}
+ \gdefchar^^c8{\`E}
+ \gdefchar^^c9{\'E}
+ \gdefchar^^ca{\^E}
+ \gdefchar^^cb{\"E}
+ \gdefchar^^cc{\`I}
+ \gdefchar^^cd{\'I}
+ \gdefchar^^ce{\^I}
+ \gdefchar^^cf{\"I}
+ %
+ \gdefchar^^d0{\DH}
+ \gdefchar^^d1{\~N}
+ \gdefchar^^d2{\`O}
+ \gdefchar^^d3{\'O}
+ \gdefchar^^d4{\^O}
+ \gdefchar^^d5{\~O}
+ \gdefchar^^d6{\"O}
+ \gdefchar^^d7{$\times$}
+ \gdefchar^^d8{\O}
+ \gdefchar^^d9{\`U}
+ \gdefchar^^da{\'U}
+ \gdefchar^^db{\^U}
+ \gdefchar^^dc{\"U}
+ \gdefchar^^dd{\'Y}
+ \gdefchar^^de{\TH}
+ \gdefchar^^df{\ss}
+ %
+ \gdefchar^^e0{\`a}
+ \gdefchar^^e1{\'a}
+ \gdefchar^^e2{\^a}
+ \gdefchar^^e3{\~a}
+ \gdefchar^^e4{\"a}
+ \gdefchar^^e5{\ringaccent a}
+ \gdefchar^^e6{\ae}
+ \gdefchar^^e7{\cedilla c}
+ \gdefchar^^e8{\`e}
+ \gdefchar^^e9{\'e}
+ \gdefchar^^ea{\^e}
+ \gdefchar^^eb{\"e}
+ \gdefchar^^ec{\`{\dotless i}}
+ \gdefchar^^ed{\'{\dotless i}}
+ \gdefchar^^ee{\^{\dotless i}}
+ \gdefchar^^ef{\"{\dotless i}}
+ %
+ \gdefchar^^f0{\dh}
+ \gdefchar^^f1{\~n}
+ \gdefchar^^f2{\`o}
+ \gdefchar^^f3{\'o}
+ \gdefchar^^f4{\^o}
+ \gdefchar^^f5{\~o}
+ \gdefchar^^f6{\"o}
+ \gdefchar^^f7{$\div$}
+ \gdefchar^^f8{\o}
+ \gdefchar^^f9{\`u}
+ \gdefchar^^fa{\'u}
+ \gdefchar^^fb{\^u}
+ \gdefchar^^fc{\"u}
+ \gdefchar^^fd{\'y}
+ \gdefchar^^fe{\th}
+ \gdefchar^^ff{\"y}
}
% Latin9 (ISO-8859-15) encoding character definitions.
@@ -8956,119 +10124,119 @@ directory should work if nowhere else does.}
% Encoding is almost identical to Latin1.
\latonechardefs
%
- \gdef^^a4{\euro}
- \gdef^^a6{\v S}
- \gdef^^a8{\v s}
- \gdef^^b4{\v Z}
- \gdef^^b8{\v z}
- \gdef^^bc{\OE}
- \gdef^^bd{\oe}
- \gdef^^be{\"Y}
+ \gdefchar^^a4{\euro{}}
+ \gdefchar^^a6{\v S}
+ \gdefchar^^a8{\v s}
+ \gdefchar^^b4{\v Z}
+ \gdefchar^^b8{\v z}
+ \gdefchar^^bc{\OE}
+ \gdefchar^^bd{\oe}
+ \gdefchar^^be{\"Y}
}
% Latin2 (ISO-8859-2) character definitions.
\def\lattwochardefs{%
- \gdef^^a0{\tie}
- \gdef^^a1{\ogonek{A}}
- \gdef^^a2{\u{}}
- \gdef^^a3{\L}
- \gdef^^a4{\missingcharmsg{CURRENCY SIGN}}
- \gdef^^a5{\v L}
- \gdef^^a6{\'S}
- \gdef^^a7{\S}
- \gdef^^a8{\"{}}
- \gdef^^a9{\v S}
- \gdef^^aa{\cedilla S}
- \gdef^^ab{\v T}
- \gdef^^ac{\'Z}
- \gdef^^ad{\-}
- \gdef^^ae{\v Z}
- \gdef^^af{\dotaccent Z}
- %
- \gdef^^b0{\textdegree}
- \gdef^^b1{\ogonek{a}}
- \gdef^^b2{\ogonek{ }}
- \gdef^^b3{\l}
- \gdef^^b4{\'{}}
- \gdef^^b5{\v l}
- \gdef^^b6{\'s}
- \gdef^^b7{\v{}}
- \gdef^^b8{\cedilla\ }
- \gdef^^b9{\v s}
- \gdef^^ba{\cedilla s}
- \gdef^^bb{\v t}
- \gdef^^bc{\'z}
- \gdef^^bd{\H{}}
- \gdef^^be{\v z}
- \gdef^^bf{\dotaccent z}
- %
- \gdef^^c0{\'R}
- \gdef^^c1{\'A}
- \gdef^^c2{\^A}
- \gdef^^c3{\u A}
- \gdef^^c4{\"A}
- \gdef^^c5{\'L}
- \gdef^^c6{\'C}
- \gdef^^c7{\cedilla C}
- \gdef^^c8{\v C}
- \gdef^^c9{\'E}
- \gdef^^ca{\ogonek{E}}
- \gdef^^cb{\"E}
- \gdef^^cc{\v E}
- \gdef^^cd{\'I}
- \gdef^^ce{\^I}
- \gdef^^cf{\v D}
- %
- \gdef^^d0{\DH}
- \gdef^^d1{\'N}
- \gdef^^d2{\v N}
- \gdef^^d3{\'O}
- \gdef^^d4{\^O}
- \gdef^^d5{\H O}
- \gdef^^d6{\"O}
- \gdef^^d7{$\times$}
- \gdef^^d8{\v R}
- \gdef^^d9{\ringaccent U}
- \gdef^^da{\'U}
- \gdef^^db{\H U}
- \gdef^^dc{\"U}
- \gdef^^dd{\'Y}
- \gdef^^de{\cedilla T}
- \gdef^^df{\ss}
- %
- \gdef^^e0{\'r}
- \gdef^^e1{\'a}
- \gdef^^e2{\^a}
- \gdef^^e3{\u a}
- \gdef^^e4{\"a}
- \gdef^^e5{\'l}
- \gdef^^e6{\'c}
- \gdef^^e7{\cedilla c}
- \gdef^^e8{\v c}
- \gdef^^e9{\'e}
- \gdef^^ea{\ogonek{e}}
- \gdef^^eb{\"e}
- \gdef^^ec{\v e}
- \gdef^^ed{\'{\dotless{i}}}
- \gdef^^ee{\^{\dotless{i}}}
- \gdef^^ef{\v d}
- %
- \gdef^^f0{\dh}
- \gdef^^f1{\'n}
- \gdef^^f2{\v n}
- \gdef^^f3{\'o}
- \gdef^^f4{\^o}
- \gdef^^f5{\H o}
- \gdef^^f6{\"o}
- \gdef^^f7{$\div$}
- \gdef^^f8{\v r}
- \gdef^^f9{\ringaccent u}
- \gdef^^fa{\'u}
- \gdef^^fb{\H u}
- \gdef^^fc{\"u}
- \gdef^^fd{\'y}
- \gdef^^fe{\cedilla t}
- \gdef^^ff{\dotaccent{}}
+ \gdefchar^^a0{\tie}
+ \gdefchar^^a1{\ogonek{A}}
+ \gdefchar^^a2{\u{}}
+ \gdefchar^^a3{\L}
+ \gdefchar^^a4{\missingcharmsg{CURRENCY SIGN}}
+ \gdefchar^^a5{\v L}
+ \gdefchar^^a6{\'S}
+ \gdefchar^^a7{\S}
+ \gdefchar^^a8{\"{}}
+ \gdefchar^^a9{\v S}
+ \gdefchar^^aa{\cedilla S}
+ \gdefchar^^ab{\v T}
+ \gdefchar^^ac{\'Z}
+ \gdefchar^^ad{\-}
+ \gdefchar^^ae{\v Z}
+ \gdefchar^^af{\dotaccent Z}
+ %
+ \gdefchar^^b0{\textdegree{}}
+ \gdefchar^^b1{\ogonek{a}}
+ \gdefchar^^b2{\ogonek{ }}
+ \gdefchar^^b3{\l}
+ \gdefchar^^b4{\'{}}
+ \gdefchar^^b5{\v l}
+ \gdefchar^^b6{\'s}
+ \gdefchar^^b7{\v{}}
+ \gdefchar^^b8{\cedilla\ }
+ \gdefchar^^b9{\v s}
+ \gdefchar^^ba{\cedilla s}
+ \gdefchar^^bb{\v t}
+ \gdefchar^^bc{\'z}
+ \gdefchar^^bd{\H{}}
+ \gdefchar^^be{\v z}
+ \gdefchar^^bf{\dotaccent z}
+ %
+ \gdefchar^^c0{\'R}
+ \gdefchar^^c1{\'A}
+ \gdefchar^^c2{\^A}
+ \gdefchar^^c3{\u A}
+ \gdefchar^^c4{\"A}
+ \gdefchar^^c5{\'L}
+ \gdefchar^^c6{\'C}
+ \gdefchar^^c7{\cedilla C}
+ \gdefchar^^c8{\v C}
+ \gdefchar^^c9{\'E}
+ \gdefchar^^ca{\ogonek{E}}
+ \gdefchar^^cb{\"E}
+ \gdefchar^^cc{\v E}
+ \gdefchar^^cd{\'I}
+ \gdefchar^^ce{\^I}
+ \gdefchar^^cf{\v D}
+ %
+ \gdefchar^^d0{\DH}
+ \gdefchar^^d1{\'N}
+ \gdefchar^^d2{\v N}
+ \gdefchar^^d3{\'O}
+ \gdefchar^^d4{\^O}
+ \gdefchar^^d5{\H O}
+ \gdefchar^^d6{\"O}
+ \gdefchar^^d7{$\times$}
+ \gdefchar^^d8{\v R}
+ \gdefchar^^d9{\ringaccent U}
+ \gdefchar^^da{\'U}
+ \gdefchar^^db{\H U}
+ \gdefchar^^dc{\"U}
+ \gdefchar^^dd{\'Y}
+ \gdefchar^^de{\cedilla T}
+ \gdefchar^^df{\ss}
+ %
+ \gdefchar^^e0{\'r}
+ \gdefchar^^e1{\'a}
+ \gdefchar^^e2{\^a}
+ \gdefchar^^e3{\u a}
+ \gdefchar^^e4{\"a}
+ \gdefchar^^e5{\'l}
+ \gdefchar^^e6{\'c}
+ \gdefchar^^e7{\cedilla c}
+ \gdefchar^^e8{\v c}
+ \gdefchar^^e9{\'e}
+ \gdefchar^^ea{\ogonek{e}}
+ \gdefchar^^eb{\"e}
+ \gdefchar^^ec{\v e}
+ \gdefchar^^ed{\'{\dotless{i}}}
+ \gdefchar^^ee{\^{\dotless{i}}}
+ \gdefchar^^ef{\v d}
+ %
+ \gdefchar^^f0{\dh}
+ \gdefchar^^f1{\'n}
+ \gdefchar^^f2{\v n}
+ \gdefchar^^f3{\'o}
+ \gdefchar^^f4{\^o}
+ \gdefchar^^f5{\H o}
+ \gdefchar^^f6{\"o}
+ \gdefchar^^f7{$\div$}
+ \gdefchar^^f8{\v r}
+ \gdefchar^^f9{\ringaccent u}
+ \gdefchar^^fa{\'u}
+ \gdefchar^^fb{\H u}
+ \gdefchar^^fc{\"u}
+ \gdefchar^^fd{\'y}
+ \gdefchar^^fe{\cedilla t}
+ \gdefchar^^ff{\dotaccent{}}
}
% UTF-8 character definitions.
@@ -9098,38 +10266,94 @@ directory should work if nowhere else does.}
\fi
}
+% Give non-ASCII bytes the active definitions for processing UTF-8 sequences
\begingroup
\catcode`\~13
+ \catcode`\$12
\catcode`\"12
+ % Loop from \countUTFx to \countUTFy, performing \UTFviiiTmp
+ % substituting ~ and $ with a character token of that value.
\def\UTFviiiLoop{%
\global\catcode\countUTFx\active
\uccode`\~\countUTFx
+ \uccode`\$\countUTFx
\uppercase\expandafter{\UTFviiiTmp}%
\advance\countUTFx by 1
\ifnum\countUTFx < \countUTFy
\expandafter\UTFviiiLoop
\fi}
+ % For bytes other than the first in a UTF-8 sequence. Not expected to
+ % be expanded except when writing to auxiliary files.
+ \countUTFx = "80
+ \countUTFy = "C2
+ \def\UTFviiiTmp{%
+ \gdef~{%
+ \ifpassthroughchars $\fi}}%
+ \UTFviiiLoop
+
\countUTFx = "C2
\countUTFy = "E0
\def\UTFviiiTmp{%
- \xdef~{\noexpand\UTFviiiTwoOctets\string~}}
+ \gdef~{%
+ \ifpassthroughchars $%
+ \else\expandafter\UTFviiiTwoOctets\expandafter$\fi}}%
\UTFviiiLoop
\countUTFx = "E0
\countUTFy = "F0
\def\UTFviiiTmp{%
- \xdef~{\noexpand\UTFviiiThreeOctets\string~}}
+ \gdef~{%
+ \ifpassthroughchars $%
+ \else\expandafter\UTFviiiThreeOctets\expandafter$\fi}}%
\UTFviiiLoop
\countUTFx = "F0
\countUTFy = "F4
\def\UTFviiiTmp{%
- \xdef~{\noexpand\UTFviiiFourOctets\string~}}
+ \gdef~{%
+ \ifpassthroughchars $%
+ \else\expandafter\UTFviiiFourOctets\expandafter$\fi
+ }}%
\UTFviiiLoop
\endgroup
+\def\globallet{\global\let} % save some \expandafter's below
+
+% @U{xxxx} to produce U+xxxx, if we support it.
+\def\U#1{%
+ \expandafter\ifx\csname uni:#1\endcsname \relax
+ \iftxinativeunicodecapable
+ % All Unicode characters can be used if native Unicode handling is
+ % active. However, if the font does not have the glyph,
+ % letters are missing.
+ \begingroup
+ \uccode`\.="#1\relax
+ \uppercase{.}
+ \endgroup
+ \else
+ \errhelp = \EMsimple
+ \errmessage{Unicode character U+#1 not supported, sorry}%
+ \fi
+ \else
+ \csname uni:#1\endcsname
+ \fi
+}
+
+% These macros are used here to construct the name of a control
+% sequence to be defined.
+\def\UTFviiiTwoOctetsName#1#2{%
+ \csname u8:#1\string #2\endcsname}%
+\def\UTFviiiThreeOctetsName#1#2#3{%
+ \csname u8:#1\string #2\string #3\endcsname}%
+\def\UTFviiiFourOctetsName#1#2#3#4{%
+ \csname u8:#1\string #2\string #3\string #4\endcsname}%
+
+% For UTF-8 byte sequences (TeX, e-TeX and pdfTeX),
+% provide a definition macro to replace a Unicode character;
+% this gets used by the @U command
+%
\begingroup
\catcode`\"=12
\catcode`\<=12
@@ -9138,459 +10362,849 @@ directory should work if nowhere else does.}
\catcode`\;=12
\catcode`\!=12
\catcode`\~=13
-
- \gdef\DeclareUnicodeCharacter#1#2{%
+ \gdef\DeclareUnicodeCharacterUTFviii#1#2{%
\countUTFz = "#1\relax
- %\wlog{\space\space defining Unicode char U+#1 (decimal \the\countUTFz)}%
\begingroup
\parseXMLCharref
- \def\UTFviiiTwoOctets##1##2{%
- \csname u8:##1\string ##2\endcsname}%
- \def\UTFviiiThreeOctets##1##2##3{%
- \csname u8:##1\string ##2\string ##3\endcsname}%
- \def\UTFviiiFourOctets##1##2##3##4{%
- \csname u8:##1\string ##2\string ##3\string ##4\endcsname}%
- \expandafter\expandafter\expandafter\expandafter
- \expandafter\expandafter\expandafter
- \gdef\UTFviiiTmp{#2}%
+
+ % Give \u8:... its definition. The sequence of seven \expandafter's
+ % expands after the \gdef three times, e.g.
+ %
+ % 1. \UTFviiTwoOctetsName B1 B2
+ % 2. \csname u8:B1 \string B2 \endcsname
+ % 3. \u8: B1 B2 (a single control sequence token)
+ %
+ \expandafter\expandafter
+ \expandafter\expandafter
+ \expandafter\expandafter
+ \expandafter\gdef \UTFviiiTmp{#2}%
+ %
+ \expandafter\ifx\csname uni:#1\endcsname \relax \else
+ \message{Internal error, already defined: #1}%
+ \fi
+ %
+ % define an additional control sequence for this code point.
+ \expandafter\globallet\csname uni:#1\endcsname \UTFviiiTmp
\endgroup}
-
+ %
+ % Given the value in \countUTFz as a Unicode code point, set \UTFviiiTmp
+ % to the corresponding UTF-8 sequence.
\gdef\parseXMLCharref{%
\ifnum\countUTFz < "A0\relax
\errhelp = \EMsimple
\errmessage{Cannot define Unicode char value < 00A0}%
\else\ifnum\countUTFz < "800\relax
\parseUTFviiiA,%
- \parseUTFviiiB C\UTFviiiTwoOctets.,%
+ \parseUTFviiiB C\UTFviiiTwoOctetsName.,%
\else\ifnum\countUTFz < "10000\relax
\parseUTFviiiA;%
\parseUTFviiiA,%
- \parseUTFviiiB E\UTFviiiThreeOctets.{,;}%
+ \parseUTFviiiB E\UTFviiiThreeOctetsName.{,;}%
\else
\parseUTFviiiA;%
\parseUTFviiiA,%
\parseUTFviiiA!%
- \parseUTFviiiB F\UTFviiiFourOctets.{!,;}%
+ \parseUTFviiiB F\UTFviiiFourOctetsName.{!,;}%
\fi\fi\fi
}
+ % Extract a byte from the end of the UTF-8 representation of \countUTFx.
+ % It must be a non-initial byte in the sequence.
+ % Change \uccode of #1 for it to be used in \parseUTFviiiB as one
+ % of the bytes.
\gdef\parseUTFviiiA#1{%
\countUTFx = \countUTFz
\divide\countUTFz by 64
- \countUTFy = \countUTFz
+ \countUTFy = \countUTFz % Save to be the future value of \countUTFz.
\multiply\countUTFz by 64
+
+ % \countUTFz is now \countUTFx with the last 5 bits cleared. Subtract
+ % in order to get the last five bits.
\advance\countUTFx by -\countUTFz
+
+ % Convert this to the byte in the UTF-8 sequence.
\advance\countUTFx by 128
\uccode `#1\countUTFx
\countUTFz = \countUTFy}
+ % Used to put a UTF-8 byte sequence into \UTFviiiTmp
+ % #1 is the increment for \countUTFz to yield a the first byte of the UTF-8
+ % sequence.
+ % #2 is one of the \UTFviii*OctetsName macros.
+ % #3 is always a full stop (.)
+ % #4 is a template for the other bytes in the sequence. The values for these
+ % bytes is substituted in here with \uppercase using the \uccode's.
\gdef\parseUTFviiiB#1#2#3#4{%
\advance\countUTFz by "#10\relax
\uccode `#3\countUTFz
\uppercase{\gdef\UTFviiiTmp{#2#3#4}}}
\endgroup
+% For native Unicode handling (XeTeX and LuaTeX),
+% provide a definition macro that sets a catcode to `other' non-globally
+%
+\def\DeclareUnicodeCharacterNativeOther#1#2{%
+ \catcode"#1=\other
+}
+
+% https://en.wikipedia.org/wiki/Plane_(Unicode)#Basic_M
+% U+0000..U+007F = https://en.wikipedia.org/wiki/Basic_Latin_(Unicode_block)
+% U+0080..U+00FF = https://en.wikipedia.org/wiki/Latin-1_Supplement_(Unicode_block)
+% U+0100..U+017F = https://en.wikipedia.org/wiki/Latin_Extended-A
+% U+0180..U+024F = https://en.wikipedia.org/wiki/Latin_Extended-B
+%
+% Many of our renditions are less than wonderful, and all the missing
+% characters are available somewhere. Loading the necessary fonts
+% awaits user request. We can't truly support Unicode without
+% reimplementing everything that's been done in LaTeX for many years,
+% plus probably using luatex or xetex, and who knows what else.
+% We won't be doing that here in this simple file. But we can try to at
+% least make most of the characters not bomb out.
+%
+\def\unicodechardefs{%
+ \DeclareUnicodeCharacter{00A0}{\tie}%
+ \DeclareUnicodeCharacter{00A1}{\exclamdown}%
+ \DeclareUnicodeCharacter{00A2}{{\tcfont \char162}}% 0242=cent
+ \DeclareUnicodeCharacter{00A3}{\pounds{}}%
+ \DeclareUnicodeCharacter{00A4}{{\tcfont \char164}}% 0244=currency
+ \DeclareUnicodeCharacter{00A5}{{\tcfont \char165}}% 0245=yen
+ \DeclareUnicodeCharacter{00A6}{{\tcfont \char166}}% 0246=brokenbar
+ \DeclareUnicodeCharacter{00A7}{\S}%
+ \DeclareUnicodeCharacter{00A8}{\"{ }}%
+ \DeclareUnicodeCharacter{00A9}{\copyright{}}%
+ \DeclareUnicodeCharacter{00AA}{\ordf}%
+ \DeclareUnicodeCharacter{00AB}{\guillemetleft{}}%
+ \DeclareUnicodeCharacter{00AC}{\ensuremath\lnot}%
+ \DeclareUnicodeCharacter{00AD}{\-}%
+ \DeclareUnicodeCharacter{00AE}{\registeredsymbol{}}%
+ \DeclareUnicodeCharacter{00AF}{\={ }}%
+ %
+ \DeclareUnicodeCharacter{00B0}{\ringaccent{ }}%
+ \DeclareUnicodeCharacter{00B1}{\ensuremath\pm}%
+ \DeclareUnicodeCharacter{00B2}{$^2$}%
+ \DeclareUnicodeCharacter{00B3}{$^3$}%
+ \DeclareUnicodeCharacter{00B4}{\'{ }}%
+ \DeclareUnicodeCharacter{00B5}{$\mu$}%
+ \DeclareUnicodeCharacter{00B6}{\P}%
+ \DeclareUnicodeCharacter{00B7}{\ensuremath\cdot}%
+ \DeclareUnicodeCharacter{00B8}{\cedilla{ }}%
+ \DeclareUnicodeCharacter{00B9}{$^1$}%
+ \DeclareUnicodeCharacter{00BA}{\ordm}%
+ \DeclareUnicodeCharacter{00BB}{\guillemetright{}}%
+ \DeclareUnicodeCharacter{00BC}{$1\over4$}%
+ \DeclareUnicodeCharacter{00BD}{$1\over2$}%
+ \DeclareUnicodeCharacter{00BE}{$3\over4$}%
+ \DeclareUnicodeCharacter{00BF}{\questiondown}%
+ %
+ \DeclareUnicodeCharacter{00C0}{\`A}%
+ \DeclareUnicodeCharacter{00C1}{\'A}%
+ \DeclareUnicodeCharacter{00C2}{\^A}%
+ \DeclareUnicodeCharacter{00C3}{\~A}%
+ \DeclareUnicodeCharacter{00C4}{\"A}%
+ \DeclareUnicodeCharacter{00C5}{\AA}%
+ \DeclareUnicodeCharacter{00C6}{\AE}%
+ \DeclareUnicodeCharacter{00C7}{\cedilla{C}}%
+ \DeclareUnicodeCharacter{00C8}{\`E}%
+ \DeclareUnicodeCharacter{00C9}{\'E}%
+ \DeclareUnicodeCharacter{00CA}{\^E}%
+ \DeclareUnicodeCharacter{00CB}{\"E}%
+ \DeclareUnicodeCharacter{00CC}{\`I}%
+ \DeclareUnicodeCharacter{00CD}{\'I}%
+ \DeclareUnicodeCharacter{00CE}{\^I}%
+ \DeclareUnicodeCharacter{00CF}{\"I}%
+ %
+ \DeclareUnicodeCharacter{00D0}{\DH}%
+ \DeclareUnicodeCharacter{00D1}{\~N}%
+ \DeclareUnicodeCharacter{00D2}{\`O}%
+ \DeclareUnicodeCharacter{00D3}{\'O}%
+ \DeclareUnicodeCharacter{00D4}{\^O}%
+ \DeclareUnicodeCharacter{00D5}{\~O}%
+ \DeclareUnicodeCharacter{00D6}{\"O}%
+ \DeclareUnicodeCharacter{00D7}{\ensuremath\times}%
+ \DeclareUnicodeCharacter{00D8}{\O}%
+ \DeclareUnicodeCharacter{00D9}{\`U}%
+ \DeclareUnicodeCharacter{00DA}{\'U}%
+ \DeclareUnicodeCharacter{00DB}{\^U}%
+ \DeclareUnicodeCharacter{00DC}{\"U}%
+ \DeclareUnicodeCharacter{00DD}{\'Y}%
+ \DeclareUnicodeCharacter{00DE}{\TH}%
+ \DeclareUnicodeCharacter{00DF}{\ss}%
+ %
+ \DeclareUnicodeCharacter{00E0}{\`a}%
+ \DeclareUnicodeCharacter{00E1}{\'a}%
+ \DeclareUnicodeCharacter{00E2}{\^a}%
+ \DeclareUnicodeCharacter{00E3}{\~a}%
+ \DeclareUnicodeCharacter{00E4}{\"a}%
+ \DeclareUnicodeCharacter{00E5}{\aa}%
+ \DeclareUnicodeCharacter{00E6}{\ae}%
+ \DeclareUnicodeCharacter{00E7}{\cedilla{c}}%
+ \DeclareUnicodeCharacter{00E8}{\`e}%
+ \DeclareUnicodeCharacter{00E9}{\'e}%
+ \DeclareUnicodeCharacter{00EA}{\^e}%
+ \DeclareUnicodeCharacter{00EB}{\"e}%
+ \DeclareUnicodeCharacter{00EC}{\`{\dotless{i}}}%
+ \DeclareUnicodeCharacter{00ED}{\'{\dotless{i}}}%
+ \DeclareUnicodeCharacter{00EE}{\^{\dotless{i}}}%
+ \DeclareUnicodeCharacter{00EF}{\"{\dotless{i}}}%
+ %
+ \DeclareUnicodeCharacter{00F0}{\dh}%
+ \DeclareUnicodeCharacter{00F1}{\~n}%
+ \DeclareUnicodeCharacter{00F2}{\`o}%
+ \DeclareUnicodeCharacter{00F3}{\'o}%
+ \DeclareUnicodeCharacter{00F4}{\^o}%
+ \DeclareUnicodeCharacter{00F5}{\~o}%
+ \DeclareUnicodeCharacter{00F6}{\"o}%
+ \DeclareUnicodeCharacter{00F7}{\ensuremath\div}%
+ \DeclareUnicodeCharacter{00F8}{\o}%
+ \DeclareUnicodeCharacter{00F9}{\`u}%
+ \DeclareUnicodeCharacter{00FA}{\'u}%
+ \DeclareUnicodeCharacter{00FB}{\^u}%
+ \DeclareUnicodeCharacter{00FC}{\"u}%
+ \DeclareUnicodeCharacter{00FD}{\'y}%
+ \DeclareUnicodeCharacter{00FE}{\th}%
+ \DeclareUnicodeCharacter{00FF}{\"y}%
+ %
+ \DeclareUnicodeCharacter{0100}{\=A}%
+ \DeclareUnicodeCharacter{0101}{\=a}%
+ \DeclareUnicodeCharacter{0102}{\u{A}}%
+ \DeclareUnicodeCharacter{0103}{\u{a}}%
+ \DeclareUnicodeCharacter{0104}{\ogonek{A}}%
+ \DeclareUnicodeCharacter{0105}{\ogonek{a}}%
+ \DeclareUnicodeCharacter{0106}{\'C}%
+ \DeclareUnicodeCharacter{0107}{\'c}%
+ \DeclareUnicodeCharacter{0108}{\^C}%
+ \DeclareUnicodeCharacter{0109}{\^c}%
+ \DeclareUnicodeCharacter{010A}{\dotaccent{C}}%
+ \DeclareUnicodeCharacter{010B}{\dotaccent{c}}%
+ \DeclareUnicodeCharacter{010C}{\v{C}}%
+ \DeclareUnicodeCharacter{010D}{\v{c}}%
+ \DeclareUnicodeCharacter{010E}{\v{D}}%
+ \DeclareUnicodeCharacter{010F}{d'}%
+ %
+ \DeclareUnicodeCharacter{0110}{\DH}%
+ \DeclareUnicodeCharacter{0111}{\dh}%
+ \DeclareUnicodeCharacter{0112}{\=E}%
+ \DeclareUnicodeCharacter{0113}{\=e}%
+ \DeclareUnicodeCharacter{0114}{\u{E}}%
+ \DeclareUnicodeCharacter{0115}{\u{e}}%
+ \DeclareUnicodeCharacter{0116}{\dotaccent{E}}%
+ \DeclareUnicodeCharacter{0117}{\dotaccent{e}}%
+ \DeclareUnicodeCharacter{0118}{\ogonek{E}}%
+ \DeclareUnicodeCharacter{0119}{\ogonek{e}}%
+ \DeclareUnicodeCharacter{011A}{\v{E}}%
+ \DeclareUnicodeCharacter{011B}{\v{e}}%
+ \DeclareUnicodeCharacter{011C}{\^G}%
+ \DeclareUnicodeCharacter{011D}{\^g}%
+ \DeclareUnicodeCharacter{011E}{\u{G}}%
+ \DeclareUnicodeCharacter{011F}{\u{g}}%
+ %
+ \DeclareUnicodeCharacter{0120}{\dotaccent{G}}%
+ \DeclareUnicodeCharacter{0121}{\dotaccent{g}}%
+ \DeclareUnicodeCharacter{0122}{\cedilla{G}}%
+ \DeclareUnicodeCharacter{0123}{\cedilla{g}}%
+ \DeclareUnicodeCharacter{0124}{\^H}%
+ \DeclareUnicodeCharacter{0125}{\^h}%
+ \DeclareUnicodeCharacter{0126}{\missingcharmsg{H WITH STROKE}}%
+ \DeclareUnicodeCharacter{0127}{\missingcharmsg{h WITH STROKE}}%
+ \DeclareUnicodeCharacter{0128}{\~I}%
+ \DeclareUnicodeCharacter{0129}{\~{\dotless{i}}}%
+ \DeclareUnicodeCharacter{012A}{\=I}%
+ \DeclareUnicodeCharacter{012B}{\={\dotless{i}}}%
+ \DeclareUnicodeCharacter{012C}{\u{I}}%
+ \DeclareUnicodeCharacter{012D}{\u{\dotless{i}}}%
+ \DeclareUnicodeCharacter{012E}{\ogonek{I}}%
+ \DeclareUnicodeCharacter{012F}{\ogonek{i}}%
+ %
+ \DeclareUnicodeCharacter{0130}{\dotaccent{I}}%
+ \DeclareUnicodeCharacter{0131}{\dotless{i}}%
+ \DeclareUnicodeCharacter{0132}{IJ}%
+ \DeclareUnicodeCharacter{0133}{ij}%
+ \DeclareUnicodeCharacter{0134}{\^J}%
+ \DeclareUnicodeCharacter{0135}{\^{\dotless{j}}}%
+ \DeclareUnicodeCharacter{0136}{\cedilla{K}}%
+ \DeclareUnicodeCharacter{0137}{\cedilla{k}}%
+ \DeclareUnicodeCharacter{0138}{\ensuremath\kappa}%
+ \DeclareUnicodeCharacter{0139}{\'L}%
+ \DeclareUnicodeCharacter{013A}{\'l}%
+ \DeclareUnicodeCharacter{013B}{\cedilla{L}}%
+ \DeclareUnicodeCharacter{013C}{\cedilla{l}}%
+ \DeclareUnicodeCharacter{013D}{L'}% should kern
+ \DeclareUnicodeCharacter{013E}{l'}% should kern
+ \DeclareUnicodeCharacter{013F}{L\U{00B7}}%
+ %
+ \DeclareUnicodeCharacter{0140}{l\U{00B7}}%
+ \DeclareUnicodeCharacter{0141}{\L}%
+ \DeclareUnicodeCharacter{0142}{\l}%
+ \DeclareUnicodeCharacter{0143}{\'N}%
+ \DeclareUnicodeCharacter{0144}{\'n}%
+ \DeclareUnicodeCharacter{0145}{\cedilla{N}}%
+ \DeclareUnicodeCharacter{0146}{\cedilla{n}}%
+ \DeclareUnicodeCharacter{0147}{\v{N}}%
+ \DeclareUnicodeCharacter{0148}{\v{n}}%
+ \DeclareUnicodeCharacter{0149}{'n}%
+ \DeclareUnicodeCharacter{014A}{\missingcharmsg{ENG}}%
+ \DeclareUnicodeCharacter{014B}{\missingcharmsg{eng}}%
+ \DeclareUnicodeCharacter{014C}{\=O}%
+ \DeclareUnicodeCharacter{014D}{\=o}%
+ \DeclareUnicodeCharacter{014E}{\u{O}}%
+ \DeclareUnicodeCharacter{014F}{\u{o}}%
+ %
+ \DeclareUnicodeCharacter{0150}{\H{O}}%
+ \DeclareUnicodeCharacter{0151}{\H{o}}%
+ \DeclareUnicodeCharacter{0152}{\OE}%
+ \DeclareUnicodeCharacter{0153}{\oe}%
+ \DeclareUnicodeCharacter{0154}{\'R}%
+ \DeclareUnicodeCharacter{0155}{\'r}%
+ \DeclareUnicodeCharacter{0156}{\cedilla{R}}%
+ \DeclareUnicodeCharacter{0157}{\cedilla{r}}%
+ \DeclareUnicodeCharacter{0158}{\v{R}}%
+ \DeclareUnicodeCharacter{0159}{\v{r}}%
+ \DeclareUnicodeCharacter{015A}{\'S}%
+ \DeclareUnicodeCharacter{015B}{\'s}%
+ \DeclareUnicodeCharacter{015C}{\^S}%
+ \DeclareUnicodeCharacter{015D}{\^s}%
+ \DeclareUnicodeCharacter{015E}{\cedilla{S}}%
+ \DeclareUnicodeCharacter{015F}{\cedilla{s}}%
+ %
+ \DeclareUnicodeCharacter{0160}{\v{S}}%
+ \DeclareUnicodeCharacter{0161}{\v{s}}%
+ \DeclareUnicodeCharacter{0162}{\cedilla{T}}%
+ \DeclareUnicodeCharacter{0163}{\cedilla{t}}%
+ \DeclareUnicodeCharacter{0164}{\v{T}}%
+ \DeclareUnicodeCharacter{0165}{\v{t}}%
+ \DeclareUnicodeCharacter{0166}{\missingcharmsg{H WITH STROKE}}%
+ \DeclareUnicodeCharacter{0167}{\missingcharmsg{h WITH STROKE}}%
+ \DeclareUnicodeCharacter{0168}{\~U}%
+ \DeclareUnicodeCharacter{0169}{\~u}%
+ \DeclareUnicodeCharacter{016A}{\=U}%
+ \DeclareUnicodeCharacter{016B}{\=u}%
+ \DeclareUnicodeCharacter{016C}{\u{U}}%
+ \DeclareUnicodeCharacter{016D}{\u{u}}%
+ \DeclareUnicodeCharacter{016E}{\ringaccent{U}}%
+ \DeclareUnicodeCharacter{016F}{\ringaccent{u}}%
+ %
+ \DeclareUnicodeCharacter{0170}{\H{U}}%
+ \DeclareUnicodeCharacter{0171}{\H{u}}%
+ \DeclareUnicodeCharacter{0172}{\ogonek{U}}%
+ \DeclareUnicodeCharacter{0173}{\ogonek{u}}%
+ \DeclareUnicodeCharacter{0174}{\^W}%
+ \DeclareUnicodeCharacter{0175}{\^w}%
+ \DeclareUnicodeCharacter{0176}{\^Y}%
+ \DeclareUnicodeCharacter{0177}{\^y}%
+ \DeclareUnicodeCharacter{0178}{\"Y}%
+ \DeclareUnicodeCharacter{0179}{\'Z}%
+ \DeclareUnicodeCharacter{017A}{\'z}%
+ \DeclareUnicodeCharacter{017B}{\dotaccent{Z}}%
+ \DeclareUnicodeCharacter{017C}{\dotaccent{z}}%
+ \DeclareUnicodeCharacter{017D}{\v{Z}}%
+ \DeclareUnicodeCharacter{017E}{\v{z}}%
+ \DeclareUnicodeCharacter{017F}{\missingcharmsg{LONG S}}%
+ %
+ \DeclareUnicodeCharacter{01C4}{D\v{Z}}%
+ \DeclareUnicodeCharacter{01C5}{D\v{z}}%
+ \DeclareUnicodeCharacter{01C6}{d\v{z}}%
+ \DeclareUnicodeCharacter{01C7}{LJ}%
+ \DeclareUnicodeCharacter{01C8}{Lj}%
+ \DeclareUnicodeCharacter{01C9}{lj}%
+ \DeclareUnicodeCharacter{01CA}{NJ}%
+ \DeclareUnicodeCharacter{01CB}{Nj}%
+ \DeclareUnicodeCharacter{01CC}{nj}%
+ \DeclareUnicodeCharacter{01CD}{\v{A}}%
+ \DeclareUnicodeCharacter{01CE}{\v{a}}%
+ \DeclareUnicodeCharacter{01CF}{\v{I}}%
+ %
+ \DeclareUnicodeCharacter{01D0}{\v{\dotless{i}}}%
+ \DeclareUnicodeCharacter{01D1}{\v{O}}%
+ \DeclareUnicodeCharacter{01D2}{\v{o}}%
+ \DeclareUnicodeCharacter{01D3}{\v{U}}%
+ \DeclareUnicodeCharacter{01D4}{\v{u}}%
+ %
+ \DeclareUnicodeCharacter{01E2}{\={\AE}}%
+ \DeclareUnicodeCharacter{01E3}{\={\ae}}%
+ \DeclareUnicodeCharacter{01E6}{\v{G}}%
+ \DeclareUnicodeCharacter{01E7}{\v{g}}%
+ \DeclareUnicodeCharacter{01E8}{\v{K}}%
+ \DeclareUnicodeCharacter{01E9}{\v{k}}%
+ %
+ \DeclareUnicodeCharacter{01F0}{\v{\dotless{j}}}%
+ \DeclareUnicodeCharacter{01F1}{DZ}%
+ \DeclareUnicodeCharacter{01F2}{Dz}%
+ \DeclareUnicodeCharacter{01F3}{dz}%
+ \DeclareUnicodeCharacter{01F4}{\'G}%
+ \DeclareUnicodeCharacter{01F5}{\'g}%
+ \DeclareUnicodeCharacter{01F8}{\`N}%
+ \DeclareUnicodeCharacter{01F9}{\`n}%
+ \DeclareUnicodeCharacter{01FC}{\'{\AE}}%
+ \DeclareUnicodeCharacter{01FD}{\'{\ae}}%
+ \DeclareUnicodeCharacter{01FE}{\'{\O}}%
+ \DeclareUnicodeCharacter{01FF}{\'{\o}}%
+ %
+ \DeclareUnicodeCharacter{021E}{\v{H}}%
+ \DeclareUnicodeCharacter{021F}{\v{h}}%
+ %
+ \DeclareUnicodeCharacter{0226}{\dotaccent{A}}%
+ \DeclareUnicodeCharacter{0227}{\dotaccent{a}}%
+ \DeclareUnicodeCharacter{0228}{\cedilla{E}}%
+ \DeclareUnicodeCharacter{0229}{\cedilla{e}}%
+ \DeclareUnicodeCharacter{022E}{\dotaccent{O}}%
+ \DeclareUnicodeCharacter{022F}{\dotaccent{o}}%
+ %
+ \DeclareUnicodeCharacter{0232}{\=Y}%
+ \DeclareUnicodeCharacter{0233}{\=y}%
+ \DeclareUnicodeCharacter{0237}{\dotless{j}}%
+ %
+ \DeclareUnicodeCharacter{02DB}{\ogonek{ }}%
+ %
+ % Greek letters upper case
+ \DeclareUnicodeCharacter{0391}{{\it A}}%
+ \DeclareUnicodeCharacter{0392}{{\it B}}%
+ \DeclareUnicodeCharacter{0393}{\ensuremath{\mit\Gamma}}%
+ \DeclareUnicodeCharacter{0394}{\ensuremath{\mit\Delta}}%
+ \DeclareUnicodeCharacter{0395}{{\it E}}%
+ \DeclareUnicodeCharacter{0396}{{\it Z}}%
+ \DeclareUnicodeCharacter{0397}{{\it H}}%
+ \DeclareUnicodeCharacter{0398}{\ensuremath{\mit\Theta}}%
+ \DeclareUnicodeCharacter{0399}{{\it I}}%
+ \DeclareUnicodeCharacter{039A}{{\it K}}%
+ \DeclareUnicodeCharacter{039B}{\ensuremath{\mit\Lambda}}%
+ \DeclareUnicodeCharacter{039C}{{\it M}}%
+ \DeclareUnicodeCharacter{039D}{{\it N}}%
+ \DeclareUnicodeCharacter{039E}{\ensuremath{\mit\Xi}}%
+ \DeclareUnicodeCharacter{039F}{{\it O}}%
+ \DeclareUnicodeCharacter{03A0}{\ensuremath{\mit\Pi}}%
+ \DeclareUnicodeCharacter{03A1}{{\it P}}%
+ %\DeclareUnicodeCharacter{03A2}{} % none - corresponds to final sigma
+ \DeclareUnicodeCharacter{03A3}{\ensuremath{\mit\Sigma}}%
+ \DeclareUnicodeCharacter{03A4}{{\it T}}%
+ \DeclareUnicodeCharacter{03A5}{\ensuremath{\mit\Upsilon}}%
+ \DeclareUnicodeCharacter{03A6}{\ensuremath{\mit\Phi}}%
+ \DeclareUnicodeCharacter{03A7}{{\it X}}%
+ \DeclareUnicodeCharacter{03A8}{\ensuremath{\mit\Psi}}%
+ \DeclareUnicodeCharacter{03A9}{\ensuremath{\mit\Omega}}%
+ %
+ % Vowels with accents
+ \DeclareUnicodeCharacter{0390}{\ensuremath{\ddot{\acute\iota}}}%
+ \DeclareUnicodeCharacter{03AC}{\ensuremath{\acute\alpha}}%
+ \DeclareUnicodeCharacter{03AD}{\ensuremath{\acute\epsilon}}%
+ \DeclareUnicodeCharacter{03AE}{\ensuremath{\acute\eta}}%
+ \DeclareUnicodeCharacter{03AF}{\ensuremath{\acute\iota}}%
+ \DeclareUnicodeCharacter{03B0}{\ensuremath{\acute{\ddot\upsilon}}}%
+ %
+ % Standalone accent
+ \DeclareUnicodeCharacter{0384}{\ensuremath{\acute{\ }}}%
+ %
+ % Greek letters lower case
+ \DeclareUnicodeCharacter{03B1}{\ensuremath\alpha}%
+ \DeclareUnicodeCharacter{03B2}{\ensuremath\beta}%
+ \DeclareUnicodeCharacter{03B3}{\ensuremath\gamma}%
+ \DeclareUnicodeCharacter{03B4}{\ensuremath\delta}%
+ \DeclareUnicodeCharacter{03B5}{\ensuremath\epsilon}%
+ \DeclareUnicodeCharacter{03B6}{\ensuremath\zeta}%
+ \DeclareUnicodeCharacter{03B7}{\ensuremath\eta}%
+ \DeclareUnicodeCharacter{03B8}{\ensuremath\theta}%
+ \DeclareUnicodeCharacter{03B9}{\ensuremath\iota}%
+ \DeclareUnicodeCharacter{03BA}{\ensuremath\kappa}%
+ \DeclareUnicodeCharacter{03BB}{\ensuremath\lambda}%
+ \DeclareUnicodeCharacter{03BC}{\ensuremath\mu}%
+ \DeclareUnicodeCharacter{03BD}{\ensuremath\nu}%
+ \DeclareUnicodeCharacter{03BE}{\ensuremath\xi}%
+ \DeclareUnicodeCharacter{03BF}{{\it o}}% omicron
+ \DeclareUnicodeCharacter{03C0}{\ensuremath\pi}%
+ \DeclareUnicodeCharacter{03C1}{\ensuremath\rho}%
+ \DeclareUnicodeCharacter{03C2}{\ensuremath\varsigma}%
+ \DeclareUnicodeCharacter{03C3}{\ensuremath\sigma}%
+ \DeclareUnicodeCharacter{03C4}{\ensuremath\tau}%
+ \DeclareUnicodeCharacter{03C5}{\ensuremath\upsilon}%
+ \DeclareUnicodeCharacter{03C6}{\ensuremath\phi}%
+ \DeclareUnicodeCharacter{03C7}{\ensuremath\chi}%
+ \DeclareUnicodeCharacter{03C8}{\ensuremath\psi}%
+ \DeclareUnicodeCharacter{03C9}{\ensuremath\omega}%
+ %
+ % More Greek vowels with accents
+ \DeclareUnicodeCharacter{03CA}{\ensuremath{\ddot\iota}}%
+ \DeclareUnicodeCharacter{03CB}{\ensuremath{\ddot\upsilon}}%
+ \DeclareUnicodeCharacter{03CC}{\ensuremath{\acute o}}%
+ \DeclareUnicodeCharacter{03CD}{\ensuremath{\acute\upsilon}}%
+ \DeclareUnicodeCharacter{03CE}{\ensuremath{\acute\omega}}%
+ %
+ % Variant Greek letters
+ \DeclareUnicodeCharacter{03D1}{\ensuremath\vartheta}%
+ \DeclareUnicodeCharacter{03D6}{\ensuremath\varpi}%
+ \DeclareUnicodeCharacter{03F1}{\ensuremath\varrho}%
+ %
+ \DeclareUnicodeCharacter{1E02}{\dotaccent{B}}%
+ \DeclareUnicodeCharacter{1E03}{\dotaccent{b}}%
+ \DeclareUnicodeCharacter{1E04}{\udotaccent{B}}%
+ \DeclareUnicodeCharacter{1E05}{\udotaccent{b}}%
+ \DeclareUnicodeCharacter{1E06}{\ubaraccent{B}}%
+ \DeclareUnicodeCharacter{1E07}{\ubaraccent{b}}%
+ \DeclareUnicodeCharacter{1E0A}{\dotaccent{D}}%
+ \DeclareUnicodeCharacter{1E0B}{\dotaccent{d}}%
+ \DeclareUnicodeCharacter{1E0C}{\udotaccent{D}}%
+ \DeclareUnicodeCharacter{1E0D}{\udotaccent{d}}%
+ \DeclareUnicodeCharacter{1E0E}{\ubaraccent{D}}%
+ \DeclareUnicodeCharacter{1E0F}{\ubaraccent{d}}%
+ %
+ \DeclareUnicodeCharacter{1E1E}{\dotaccent{F}}%
+ \DeclareUnicodeCharacter{1E1F}{\dotaccent{f}}%
+ %
+ \DeclareUnicodeCharacter{1E20}{\=G}%
+ \DeclareUnicodeCharacter{1E21}{\=g}%
+ \DeclareUnicodeCharacter{1E22}{\dotaccent{H}}%
+ \DeclareUnicodeCharacter{1E23}{\dotaccent{h}}%
+ \DeclareUnicodeCharacter{1E24}{\udotaccent{H}}%
+ \DeclareUnicodeCharacter{1E25}{\udotaccent{h}}%
+ \DeclareUnicodeCharacter{1E26}{\"H}%
+ \DeclareUnicodeCharacter{1E27}{\"h}%
+ %
+ \DeclareUnicodeCharacter{1E30}{\'K}%
+ \DeclareUnicodeCharacter{1E31}{\'k}%
+ \DeclareUnicodeCharacter{1E32}{\udotaccent{K}}%
+ \DeclareUnicodeCharacter{1E33}{\udotaccent{k}}%
+ \DeclareUnicodeCharacter{1E34}{\ubaraccent{K}}%
+ \DeclareUnicodeCharacter{1E35}{\ubaraccent{k}}%
+ \DeclareUnicodeCharacter{1E36}{\udotaccent{L}}%
+ \DeclareUnicodeCharacter{1E37}{\udotaccent{l}}%
+ \DeclareUnicodeCharacter{1E3A}{\ubaraccent{L}}%
+ \DeclareUnicodeCharacter{1E3B}{\ubaraccent{l}}%
+ \DeclareUnicodeCharacter{1E3E}{\'M}%
+ \DeclareUnicodeCharacter{1E3F}{\'m}%
+ %
+ \DeclareUnicodeCharacter{1E40}{\dotaccent{M}}%
+ \DeclareUnicodeCharacter{1E41}{\dotaccent{m}}%
+ \DeclareUnicodeCharacter{1E42}{\udotaccent{M}}%
+ \DeclareUnicodeCharacter{1E43}{\udotaccent{m}}%
+ \DeclareUnicodeCharacter{1E44}{\dotaccent{N}}%
+ \DeclareUnicodeCharacter{1E45}{\dotaccent{n}}%
+ \DeclareUnicodeCharacter{1E46}{\udotaccent{N}}%
+ \DeclareUnicodeCharacter{1E47}{\udotaccent{n}}%
+ \DeclareUnicodeCharacter{1E48}{\ubaraccent{N}}%
+ \DeclareUnicodeCharacter{1E49}{\ubaraccent{n}}%
+ %
+ \DeclareUnicodeCharacter{1E54}{\'P}%
+ \DeclareUnicodeCharacter{1E55}{\'p}%
+ \DeclareUnicodeCharacter{1E56}{\dotaccent{P}}%
+ \DeclareUnicodeCharacter{1E57}{\dotaccent{p}}%
+ \DeclareUnicodeCharacter{1E58}{\dotaccent{R}}%
+ \DeclareUnicodeCharacter{1E59}{\dotaccent{r}}%
+ \DeclareUnicodeCharacter{1E5A}{\udotaccent{R}}%
+ \DeclareUnicodeCharacter{1E5B}{\udotaccent{r}}%
+ \DeclareUnicodeCharacter{1E5E}{\ubaraccent{R}}%
+ \DeclareUnicodeCharacter{1E5F}{\ubaraccent{r}}%
+ %
+ \DeclareUnicodeCharacter{1E60}{\dotaccent{S}}%
+ \DeclareUnicodeCharacter{1E61}{\dotaccent{s}}%
+ \DeclareUnicodeCharacter{1E62}{\udotaccent{S}}%
+ \DeclareUnicodeCharacter{1E63}{\udotaccent{s}}%
+ \DeclareUnicodeCharacter{1E6A}{\dotaccent{T}}%
+ \DeclareUnicodeCharacter{1E6B}{\dotaccent{t}}%
+ \DeclareUnicodeCharacter{1E6C}{\udotaccent{T}}%
+ \DeclareUnicodeCharacter{1E6D}{\udotaccent{t}}%
+ \DeclareUnicodeCharacter{1E6E}{\ubaraccent{T}}%
+ \DeclareUnicodeCharacter{1E6F}{\ubaraccent{t}}%
+ %
+ \DeclareUnicodeCharacter{1E7C}{\~V}%
+ \DeclareUnicodeCharacter{1E7D}{\~v}%
+ \DeclareUnicodeCharacter{1E7E}{\udotaccent{V}}%
+ \DeclareUnicodeCharacter{1E7F}{\udotaccent{v}}%
+ %
+ \DeclareUnicodeCharacter{1E80}{\`W}%
+ \DeclareUnicodeCharacter{1E81}{\`w}%
+ \DeclareUnicodeCharacter{1E82}{\'W}%
+ \DeclareUnicodeCharacter{1E83}{\'w}%
+ \DeclareUnicodeCharacter{1E84}{\"W}%
+ \DeclareUnicodeCharacter{1E85}{\"w}%
+ \DeclareUnicodeCharacter{1E86}{\dotaccent{W}}%
+ \DeclareUnicodeCharacter{1E87}{\dotaccent{w}}%
+ \DeclareUnicodeCharacter{1E88}{\udotaccent{W}}%
+ \DeclareUnicodeCharacter{1E89}{\udotaccent{w}}%
+ \DeclareUnicodeCharacter{1E8A}{\dotaccent{X}}%
+ \DeclareUnicodeCharacter{1E8B}{\dotaccent{x}}%
+ \DeclareUnicodeCharacter{1E8C}{\"X}%
+ \DeclareUnicodeCharacter{1E8D}{\"x}%
+ \DeclareUnicodeCharacter{1E8E}{\dotaccent{Y}}%
+ \DeclareUnicodeCharacter{1E8F}{\dotaccent{y}}%
+ %
+ \DeclareUnicodeCharacter{1E90}{\^Z}%
+ \DeclareUnicodeCharacter{1E91}{\^z}%
+ \DeclareUnicodeCharacter{1E92}{\udotaccent{Z}}%
+ \DeclareUnicodeCharacter{1E93}{\udotaccent{z}}%
+ \DeclareUnicodeCharacter{1E94}{\ubaraccent{Z}}%
+ \DeclareUnicodeCharacter{1E95}{\ubaraccent{z}}%
+ \DeclareUnicodeCharacter{1E96}{\ubaraccent{h}}%
+ \DeclareUnicodeCharacter{1E97}{\"t}%
+ \DeclareUnicodeCharacter{1E98}{\ringaccent{w}}%
+ \DeclareUnicodeCharacter{1E99}{\ringaccent{y}}%
+ %
+ \DeclareUnicodeCharacter{1EA0}{\udotaccent{A}}%
+ \DeclareUnicodeCharacter{1EA1}{\udotaccent{a}}%
+ %
+ \DeclareUnicodeCharacter{1EB8}{\udotaccent{E}}%
+ \DeclareUnicodeCharacter{1EB9}{\udotaccent{e}}%
+ \DeclareUnicodeCharacter{1EBC}{\~E}%
+ \DeclareUnicodeCharacter{1EBD}{\~e}%
+ %
+ \DeclareUnicodeCharacter{1ECA}{\udotaccent{I}}%
+ \DeclareUnicodeCharacter{1ECB}{\udotaccent{i}}%
+ \DeclareUnicodeCharacter{1ECC}{\udotaccent{O}}%
+ \DeclareUnicodeCharacter{1ECD}{\udotaccent{o}}%
+ %
+ \DeclareUnicodeCharacter{1EE4}{\udotaccent{U}}%
+ \DeclareUnicodeCharacter{1EE5}{\udotaccent{u}}%
+ %
+ \DeclareUnicodeCharacter{1EF2}{\`Y}%
+ \DeclareUnicodeCharacter{1EF3}{\`y}%
+ \DeclareUnicodeCharacter{1EF4}{\udotaccent{Y}}%
+ %
+ \DeclareUnicodeCharacter{1EF8}{\~Y}%
+ \DeclareUnicodeCharacter{1EF9}{\~y}%
+ %
+ % Punctuation
+ \DeclareUnicodeCharacter{2013}{--}%
+ \DeclareUnicodeCharacter{2014}{---}%
+ \DeclareUnicodeCharacter{2018}{\quoteleft{}}%
+ \DeclareUnicodeCharacter{2019}{\quoteright{}}%
+ \DeclareUnicodeCharacter{201A}{\quotesinglbase{}}%
+ \DeclareUnicodeCharacter{201C}{\quotedblleft{}}%
+ \DeclareUnicodeCharacter{201D}{\quotedblright{}}%
+ \DeclareUnicodeCharacter{201E}{\quotedblbase{}}%
+ \DeclareUnicodeCharacter{2020}{\ensuremath\dagger}%
+ \DeclareUnicodeCharacter{2021}{\ensuremath\ddagger}%
+ \DeclareUnicodeCharacter{2022}{\bullet{}}%
+ \DeclareUnicodeCharacter{202F}{\thinspace}%
+ \DeclareUnicodeCharacter{2026}{\dots{}}%
+ \DeclareUnicodeCharacter{2039}{\guilsinglleft{}}%
+ \DeclareUnicodeCharacter{203A}{\guilsinglright{}}%
+ %
+ \DeclareUnicodeCharacter{20AC}{\euro{}}%
+ %
+ \DeclareUnicodeCharacter{2192}{\expansion{}}%
+ \DeclareUnicodeCharacter{21D2}{\result{}}%
+ %
+ % Mathematical symbols
+ \DeclareUnicodeCharacter{2200}{\ensuremath\forall}%
+ \DeclareUnicodeCharacter{2203}{\ensuremath\exists}%
+ \DeclareUnicodeCharacter{2208}{\ensuremath\in}%
+ \DeclareUnicodeCharacter{2212}{\minus{}}%
+ \DeclareUnicodeCharacter{2217}{\ast}%
+ \DeclareUnicodeCharacter{221E}{\ensuremath\infty}%
+ \DeclareUnicodeCharacter{2225}{\ensuremath\parallel}%
+ \DeclareUnicodeCharacter{2227}{\ensuremath\wedge}%
+ \DeclareUnicodeCharacter{2229}{\ensuremath\cap}%
+ \DeclareUnicodeCharacter{2261}{\equiv{}}%
+ \DeclareUnicodeCharacter{2264}{\ensuremath\leq}%
+ \DeclareUnicodeCharacter{2265}{\ensuremath\geq}%
+ \DeclareUnicodeCharacter{2282}{\ensuremath\subset}%
+ \DeclareUnicodeCharacter{2287}{\ensuremath\supseteq}%
+ %
+ \DeclareUnicodeCharacter{2016}{\ensuremath\Vert}%
+ \DeclareUnicodeCharacter{2032}{\ensuremath\prime}%
+ \DeclareUnicodeCharacter{210F}{\ensuremath\hbar}%
+ \DeclareUnicodeCharacter{2111}{\ensuremath\Im}%
+ \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}%
+ \DeclareUnicodeCharacter{2193}{\ensuremath\downarrow}%
+ \DeclareUnicodeCharacter{2194}{\ensuremath\leftrightarrow}%
+ \DeclareUnicodeCharacter{2195}{\ensuremath\updownarrow}%
+ \DeclareUnicodeCharacter{2196}{\ensuremath\nwarrow}%
+ \DeclareUnicodeCharacter{2197}{\ensuremath\nearrow}%
+ \DeclareUnicodeCharacter{2198}{\ensuremath\searrow}%
+ \DeclareUnicodeCharacter{2199}{\ensuremath\swarrow}%
+ \DeclareUnicodeCharacter{21A6}{\ensuremath\mapsto}%
+ \DeclareUnicodeCharacter{21A9}{\ensuremath\hookleftarrow}%
+ \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}%
+ \DeclareUnicodeCharacter{21D0}{\ensuremath\Leftarrow}%
+ \DeclareUnicodeCharacter{21D1}{\ensuremath\Uparrow}%
+ \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}%
+ \DeclareUnicodeCharacter{2209}{\ensuremath\notin}%
+ \DeclareUnicodeCharacter{220B}{\ensuremath\owns}%
+ \DeclareUnicodeCharacter{220F}{\ensuremath\prod}%
+ \DeclareUnicodeCharacter{2210}{\ensuremath\coprod}%
+ \DeclareUnicodeCharacter{2211}{\ensuremath\sum}%
+ \DeclareUnicodeCharacter{2213}{\ensuremath\mp}%
+ \DeclareUnicodeCharacter{2218}{\ensuremath\circ}%
+ \DeclareUnicodeCharacter{221A}{\ensuremath\surd}%
+ \DeclareUnicodeCharacter{221D}{\ensuremath\propto}%
+ \DeclareUnicodeCharacter{2220}{\ensuremath\angle}%
+ \DeclareUnicodeCharacter{2223}{\ensuremath\mid}%
+ \DeclareUnicodeCharacter{2228}{\ensuremath\vee}%
+ \DeclareUnicodeCharacter{222A}{\ensuremath\cup}%
+ \DeclareUnicodeCharacter{222B}{\ensuremath\smallint}%
+ \DeclareUnicodeCharacter{222E}{\ensuremath\oint}%
+ \DeclareUnicodeCharacter{223C}{\ensuremath\sim}%
+ \DeclareUnicodeCharacter{2240}{\ensuremath\wr}%
+ \DeclareUnicodeCharacter{2243}{\ensuremath\simeq}%
+ \DeclareUnicodeCharacter{2245}{\ensuremath\cong}%
+ \DeclareUnicodeCharacter{2248}{\ensuremath\approx}%
+ \DeclareUnicodeCharacter{224D}{\ensuremath\asymp}%
+ \DeclareUnicodeCharacter{2250}{\ensuremath\doteq}%
+ \DeclareUnicodeCharacter{2260}{\ensuremath\neq}%
+ \DeclareUnicodeCharacter{226A}{\ensuremath\ll}%
+ \DeclareUnicodeCharacter{226B}{\ensuremath\gg}%
+ \DeclareUnicodeCharacter{227A}{\ensuremath\prec}%
+ \DeclareUnicodeCharacter{227B}{\ensuremath\succ}%
+ \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}%
+ \DeclareUnicodeCharacter{2294}{\ensuremath\sqcup}%
+ \DeclareUnicodeCharacter{2295}{\ensuremath\oplus}%
+ \DeclareUnicodeCharacter{2296}{\ensuremath\ominus}%
+ \DeclareUnicodeCharacter{2297}{\ensuremath\otimes}%
+ \DeclareUnicodeCharacter{2298}{\ensuremath\oslash}%
+ \DeclareUnicodeCharacter{2299}{\ensuremath\odot}%
+ \DeclareUnicodeCharacter{22A2}{\ensuremath\vdash}%
+ \DeclareUnicodeCharacter{22A3}{\ensuremath\dashv}%
+ \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}%
+ \DeclareUnicodeCharacter{22C3}{\ensuremath\bigcup}%
+ \DeclareUnicodeCharacter{22C4}{\ensuremath\diamond}%
+ \DeclareUnicodeCharacter{22C5}{\ensuremath\cdot}%
+ \DeclareUnicodeCharacter{22C6}{\ensuremath\star}%
+ \DeclareUnicodeCharacter{22C8}{\ensuremath\bowtie}%
+ \DeclareUnicodeCharacter{2308}{\ensuremath\lceil}%
+ \DeclareUnicodeCharacter{2309}{\ensuremath\rceil}%
+ \DeclareUnicodeCharacter{230A}{\ensuremath\lfloor}%
+ \DeclareUnicodeCharacter{230B}{\ensuremath\rfloor}%
+ \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{2660}{\ensuremath\spadesuit}%
+ \DeclareUnicodeCharacter{2661}{\ensuremath\heartsuit}%
+ \DeclareUnicodeCharacter{2662}{\ensuremath\diamondsuit}%
+ \DeclareUnicodeCharacter{2663}{\ensuremath\clubsuit}%
+ \DeclareUnicodeCharacter{266D}{\ensuremath\flat}%
+ \DeclareUnicodeCharacter{266E}{\ensuremath\natural}%
+ \DeclareUnicodeCharacter{266F}{\ensuremath\sharp}%
+ \DeclareUnicodeCharacter{26AA}{\ensuremath\bigcirc}%
+ \DeclareUnicodeCharacter{27B9}{\ensuremath\rangle}%
+ \DeclareUnicodeCharacter{27C2}{\ensuremath\perp}%
+ \DeclareUnicodeCharacter{27E8}{\ensuremath\langle}%
+ \DeclareUnicodeCharacter{27F5}{\ensuremath\longleftarrow}%
+ \DeclareUnicodeCharacter{27F6}{\ensuremath\longrightarrow}%
+ \DeclareUnicodeCharacter{27F7}{\ensuremath\longleftrightarrow}%
+ \DeclareUnicodeCharacter{27FC}{\ensuremath\longmapsto}%
+ \DeclareUnicodeCharacter{29F5}{\ensuremath\setminus}%
+ \DeclareUnicodeCharacter{2A00}{\ensuremath\bigodot}%
+ \DeclareUnicodeCharacter{2A01}{\ensuremath\bigoplus}%
+ \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}%
+ %
+ \global\mathchardef\checkmark="1370% actually the square root sign
+ \DeclareUnicodeCharacter{2713}{\ensuremath\checkmark}%
+}% end of \unicodechardefs
+
+% UTF-8 byte sequence (pdfTeX) definitions (replacing and @U command)
+% It makes the setting that replace UTF-8 byte sequence.
\def\utfeightchardefs{%
- \DeclareUnicodeCharacter{00A0}{\tie}
- \DeclareUnicodeCharacter{00A1}{\exclamdown}
- \DeclareUnicodeCharacter{00A3}{\pounds}
- \DeclareUnicodeCharacter{00A8}{\"{ }}
- \DeclareUnicodeCharacter{00A9}{\copyright}
- \DeclareUnicodeCharacter{00AA}{\ordf}
- \DeclareUnicodeCharacter{00AB}{\guillemetleft}
- \DeclareUnicodeCharacter{00AD}{\-}
- \DeclareUnicodeCharacter{00AE}{\registeredsymbol}
- \DeclareUnicodeCharacter{00AF}{\={ }}
-
- \DeclareUnicodeCharacter{00B0}{\ringaccent{ }}
- \DeclareUnicodeCharacter{00B4}{\'{ }}
- \DeclareUnicodeCharacter{00B8}{\cedilla{ }}
- \DeclareUnicodeCharacter{00BA}{\ordm}
- \DeclareUnicodeCharacter{00BB}{\guillemetright}
- \DeclareUnicodeCharacter{00BF}{\questiondown}
-
- \DeclareUnicodeCharacter{00C0}{\`A}
- \DeclareUnicodeCharacter{00C1}{\'A}
- \DeclareUnicodeCharacter{00C2}{\^A}
- \DeclareUnicodeCharacter{00C3}{\~A}
- \DeclareUnicodeCharacter{00C4}{\"A}
- \DeclareUnicodeCharacter{00C5}{\AA}
- \DeclareUnicodeCharacter{00C6}{\AE}
- \DeclareUnicodeCharacter{00C7}{\cedilla{C}}
- \DeclareUnicodeCharacter{00C8}{\`E}
- \DeclareUnicodeCharacter{00C9}{\'E}
- \DeclareUnicodeCharacter{00CA}{\^E}
- \DeclareUnicodeCharacter{00CB}{\"E}
- \DeclareUnicodeCharacter{00CC}{\`I}
- \DeclareUnicodeCharacter{00CD}{\'I}
- \DeclareUnicodeCharacter{00CE}{\^I}
- \DeclareUnicodeCharacter{00CF}{\"I}
-
- \DeclareUnicodeCharacter{00D0}{\DH}
- \DeclareUnicodeCharacter{00D1}{\~N}
- \DeclareUnicodeCharacter{00D2}{\`O}
- \DeclareUnicodeCharacter{00D3}{\'O}
- \DeclareUnicodeCharacter{00D4}{\^O}
- \DeclareUnicodeCharacter{00D5}{\~O}
- \DeclareUnicodeCharacter{00D6}{\"O}
- \DeclareUnicodeCharacter{00D8}{\O}
- \DeclareUnicodeCharacter{00D9}{\`U}
- \DeclareUnicodeCharacter{00DA}{\'U}
- \DeclareUnicodeCharacter{00DB}{\^U}
- \DeclareUnicodeCharacter{00DC}{\"U}
- \DeclareUnicodeCharacter{00DD}{\'Y}
- \DeclareUnicodeCharacter{00DE}{\TH}
- \DeclareUnicodeCharacter{00DF}{\ss}
-
- \DeclareUnicodeCharacter{00E0}{\`a}
- \DeclareUnicodeCharacter{00E1}{\'a}
- \DeclareUnicodeCharacter{00E2}{\^a}
- \DeclareUnicodeCharacter{00E3}{\~a}
- \DeclareUnicodeCharacter{00E4}{\"a}
- \DeclareUnicodeCharacter{00E5}{\aa}
- \DeclareUnicodeCharacter{00E6}{\ae}
- \DeclareUnicodeCharacter{00E7}{\cedilla{c}}
- \DeclareUnicodeCharacter{00E8}{\`e}
- \DeclareUnicodeCharacter{00E9}{\'e}
- \DeclareUnicodeCharacter{00EA}{\^e}
- \DeclareUnicodeCharacter{00EB}{\"e}
- \DeclareUnicodeCharacter{00EC}{\`{\dotless{i}}}
- \DeclareUnicodeCharacter{00ED}{\'{\dotless{i}}}
- \DeclareUnicodeCharacter{00EE}{\^{\dotless{i}}}
- \DeclareUnicodeCharacter{00EF}{\"{\dotless{i}}}
-
- \DeclareUnicodeCharacter{00F0}{\dh}
- \DeclareUnicodeCharacter{00F1}{\~n}
- \DeclareUnicodeCharacter{00F2}{\`o}
- \DeclareUnicodeCharacter{00F3}{\'o}
- \DeclareUnicodeCharacter{00F4}{\^o}
- \DeclareUnicodeCharacter{00F5}{\~o}
- \DeclareUnicodeCharacter{00F6}{\"o}
- \DeclareUnicodeCharacter{00F8}{\o}
- \DeclareUnicodeCharacter{00F9}{\`u}
- \DeclareUnicodeCharacter{00FA}{\'u}
- \DeclareUnicodeCharacter{00FB}{\^u}
- \DeclareUnicodeCharacter{00FC}{\"u}
- \DeclareUnicodeCharacter{00FD}{\'y}
- \DeclareUnicodeCharacter{00FE}{\th}
- \DeclareUnicodeCharacter{00FF}{\"y}
-
- \DeclareUnicodeCharacter{0100}{\=A}
- \DeclareUnicodeCharacter{0101}{\=a}
- \DeclareUnicodeCharacter{0102}{\u{A}}
- \DeclareUnicodeCharacter{0103}{\u{a}}
- \DeclareUnicodeCharacter{0104}{\ogonek{A}}
- \DeclareUnicodeCharacter{0105}{\ogonek{a}}
- \DeclareUnicodeCharacter{0106}{\'C}
- \DeclareUnicodeCharacter{0107}{\'c}
- \DeclareUnicodeCharacter{0108}{\^C}
- \DeclareUnicodeCharacter{0109}{\^c}
- \DeclareUnicodeCharacter{0118}{\ogonek{E}}
- \DeclareUnicodeCharacter{0119}{\ogonek{e}}
- \DeclareUnicodeCharacter{010A}{\dotaccent{C}}
- \DeclareUnicodeCharacter{010B}{\dotaccent{c}}
- \DeclareUnicodeCharacter{010C}{\v{C}}
- \DeclareUnicodeCharacter{010D}{\v{c}}
- \DeclareUnicodeCharacter{010E}{\v{D}}
-
- \DeclareUnicodeCharacter{0112}{\=E}
- \DeclareUnicodeCharacter{0113}{\=e}
- \DeclareUnicodeCharacter{0114}{\u{E}}
- \DeclareUnicodeCharacter{0115}{\u{e}}
- \DeclareUnicodeCharacter{0116}{\dotaccent{E}}
- \DeclareUnicodeCharacter{0117}{\dotaccent{e}}
- \DeclareUnicodeCharacter{011A}{\v{E}}
- \DeclareUnicodeCharacter{011B}{\v{e}}
- \DeclareUnicodeCharacter{011C}{\^G}
- \DeclareUnicodeCharacter{011D}{\^g}
- \DeclareUnicodeCharacter{011E}{\u{G}}
- \DeclareUnicodeCharacter{011F}{\u{g}}
-
- \DeclareUnicodeCharacter{0120}{\dotaccent{G}}
- \DeclareUnicodeCharacter{0121}{\dotaccent{g}}
- \DeclareUnicodeCharacter{0124}{\^H}
- \DeclareUnicodeCharacter{0125}{\^h}
- \DeclareUnicodeCharacter{0128}{\~I}
- \DeclareUnicodeCharacter{0129}{\~{\dotless{i}}}
- \DeclareUnicodeCharacter{012A}{\=I}
- \DeclareUnicodeCharacter{012B}{\={\dotless{i}}}
- \DeclareUnicodeCharacter{012C}{\u{I}}
- \DeclareUnicodeCharacter{012D}{\u{\dotless{i}}}
-
- \DeclareUnicodeCharacter{0130}{\dotaccent{I}}
- \DeclareUnicodeCharacter{0131}{\dotless{i}}
- \DeclareUnicodeCharacter{0132}{IJ}
- \DeclareUnicodeCharacter{0133}{ij}
- \DeclareUnicodeCharacter{0134}{\^J}
- \DeclareUnicodeCharacter{0135}{\^{\dotless{j}}}
- \DeclareUnicodeCharacter{0139}{\'L}
- \DeclareUnicodeCharacter{013A}{\'l}
-
- \DeclareUnicodeCharacter{0141}{\L}
- \DeclareUnicodeCharacter{0142}{\l}
- \DeclareUnicodeCharacter{0143}{\'N}
- \DeclareUnicodeCharacter{0144}{\'n}
- \DeclareUnicodeCharacter{0147}{\v{N}}
- \DeclareUnicodeCharacter{0148}{\v{n}}
- \DeclareUnicodeCharacter{014C}{\=O}
- \DeclareUnicodeCharacter{014D}{\=o}
- \DeclareUnicodeCharacter{014E}{\u{O}}
- \DeclareUnicodeCharacter{014F}{\u{o}}
-
- \DeclareUnicodeCharacter{0150}{\H{O}}
- \DeclareUnicodeCharacter{0151}{\H{o}}
- \DeclareUnicodeCharacter{0152}{\OE}
- \DeclareUnicodeCharacter{0153}{\oe}
- \DeclareUnicodeCharacter{0154}{\'R}
- \DeclareUnicodeCharacter{0155}{\'r}
- \DeclareUnicodeCharacter{0158}{\v{R}}
- \DeclareUnicodeCharacter{0159}{\v{r}}
- \DeclareUnicodeCharacter{015A}{\'S}
- \DeclareUnicodeCharacter{015B}{\'s}
- \DeclareUnicodeCharacter{015C}{\^S}
- \DeclareUnicodeCharacter{015D}{\^s}
- \DeclareUnicodeCharacter{015E}{\cedilla{S}}
- \DeclareUnicodeCharacter{015F}{\cedilla{s}}
-
- \DeclareUnicodeCharacter{0160}{\v{S}}
- \DeclareUnicodeCharacter{0161}{\v{s}}
- \DeclareUnicodeCharacter{0162}{\cedilla{t}}
- \DeclareUnicodeCharacter{0163}{\cedilla{T}}
- \DeclareUnicodeCharacter{0164}{\v{T}}
-
- \DeclareUnicodeCharacter{0168}{\~U}
- \DeclareUnicodeCharacter{0169}{\~u}
- \DeclareUnicodeCharacter{016A}{\=U}
- \DeclareUnicodeCharacter{016B}{\=u}
- \DeclareUnicodeCharacter{016C}{\u{U}}
- \DeclareUnicodeCharacter{016D}{\u{u}}
- \DeclareUnicodeCharacter{016E}{\ringaccent{U}}
- \DeclareUnicodeCharacter{016F}{\ringaccent{u}}
-
- \DeclareUnicodeCharacter{0170}{\H{U}}
- \DeclareUnicodeCharacter{0171}{\H{u}}
- \DeclareUnicodeCharacter{0174}{\^W}
- \DeclareUnicodeCharacter{0175}{\^w}
- \DeclareUnicodeCharacter{0176}{\^Y}
- \DeclareUnicodeCharacter{0177}{\^y}
- \DeclareUnicodeCharacter{0178}{\"Y}
- \DeclareUnicodeCharacter{0179}{\'Z}
- \DeclareUnicodeCharacter{017A}{\'z}
- \DeclareUnicodeCharacter{017B}{\dotaccent{Z}}
- \DeclareUnicodeCharacter{017C}{\dotaccent{z}}
- \DeclareUnicodeCharacter{017D}{\v{Z}}
- \DeclareUnicodeCharacter{017E}{\v{z}}
-
- \DeclareUnicodeCharacter{01C4}{D\v{Z}}
- \DeclareUnicodeCharacter{01C5}{D\v{z}}
- \DeclareUnicodeCharacter{01C6}{d\v{z}}
- \DeclareUnicodeCharacter{01C7}{LJ}
- \DeclareUnicodeCharacter{01C8}{Lj}
- \DeclareUnicodeCharacter{01C9}{lj}
- \DeclareUnicodeCharacter{01CA}{NJ}
- \DeclareUnicodeCharacter{01CB}{Nj}
- \DeclareUnicodeCharacter{01CC}{nj}
- \DeclareUnicodeCharacter{01CD}{\v{A}}
- \DeclareUnicodeCharacter{01CE}{\v{a}}
- \DeclareUnicodeCharacter{01CF}{\v{I}}
-
- \DeclareUnicodeCharacter{01D0}{\v{\dotless{i}}}
- \DeclareUnicodeCharacter{01D1}{\v{O}}
- \DeclareUnicodeCharacter{01D2}{\v{o}}
- \DeclareUnicodeCharacter{01D3}{\v{U}}
- \DeclareUnicodeCharacter{01D4}{\v{u}}
-
- \DeclareUnicodeCharacter{01E2}{\={\AE}}
- \DeclareUnicodeCharacter{01E3}{\={\ae}}
- \DeclareUnicodeCharacter{01E6}{\v{G}}
- \DeclareUnicodeCharacter{01E7}{\v{g}}
- \DeclareUnicodeCharacter{01E8}{\v{K}}
- \DeclareUnicodeCharacter{01E9}{\v{k}}
-
- \DeclareUnicodeCharacter{01F0}{\v{\dotless{j}}}
- \DeclareUnicodeCharacter{01F1}{DZ}
- \DeclareUnicodeCharacter{01F2}{Dz}
- \DeclareUnicodeCharacter{01F3}{dz}
- \DeclareUnicodeCharacter{01F4}{\'G}
- \DeclareUnicodeCharacter{01F5}{\'g}
- \DeclareUnicodeCharacter{01F8}{\`N}
- \DeclareUnicodeCharacter{01F9}{\`n}
- \DeclareUnicodeCharacter{01FC}{\'{\AE}}
- \DeclareUnicodeCharacter{01FD}{\'{\ae}}
- \DeclareUnicodeCharacter{01FE}{\'{\O}}
- \DeclareUnicodeCharacter{01FF}{\'{\o}}
-
- \DeclareUnicodeCharacter{021E}{\v{H}}
- \DeclareUnicodeCharacter{021F}{\v{h}}
-
- \DeclareUnicodeCharacter{0226}{\dotaccent{A}}
- \DeclareUnicodeCharacter{0227}{\dotaccent{a}}
- \DeclareUnicodeCharacter{0228}{\cedilla{E}}
- \DeclareUnicodeCharacter{0229}{\cedilla{e}}
- \DeclareUnicodeCharacter{022E}{\dotaccent{O}}
- \DeclareUnicodeCharacter{022F}{\dotaccent{o}}
-
- \DeclareUnicodeCharacter{0232}{\=Y}
- \DeclareUnicodeCharacter{0233}{\=y}
- \DeclareUnicodeCharacter{0237}{\dotless{j}}
-
- \DeclareUnicodeCharacter{02DB}{\ogonek{ }}
-
- \DeclareUnicodeCharacter{1E02}{\dotaccent{B}}
- \DeclareUnicodeCharacter{1E03}{\dotaccent{b}}
- \DeclareUnicodeCharacter{1E04}{\udotaccent{B}}
- \DeclareUnicodeCharacter{1E05}{\udotaccent{b}}
- \DeclareUnicodeCharacter{1E06}{\ubaraccent{B}}
- \DeclareUnicodeCharacter{1E07}{\ubaraccent{b}}
- \DeclareUnicodeCharacter{1E0A}{\dotaccent{D}}
- \DeclareUnicodeCharacter{1E0B}{\dotaccent{d}}
- \DeclareUnicodeCharacter{1E0C}{\udotaccent{D}}
- \DeclareUnicodeCharacter{1E0D}{\udotaccent{d}}
- \DeclareUnicodeCharacter{1E0E}{\ubaraccent{D}}
- \DeclareUnicodeCharacter{1E0F}{\ubaraccent{d}}
-
- \DeclareUnicodeCharacter{1E1E}{\dotaccent{F}}
- \DeclareUnicodeCharacter{1E1F}{\dotaccent{f}}
-
- \DeclareUnicodeCharacter{1E20}{\=G}
- \DeclareUnicodeCharacter{1E21}{\=g}
- \DeclareUnicodeCharacter{1E22}{\dotaccent{H}}
- \DeclareUnicodeCharacter{1E23}{\dotaccent{h}}
- \DeclareUnicodeCharacter{1E24}{\udotaccent{H}}
- \DeclareUnicodeCharacter{1E25}{\udotaccent{h}}
- \DeclareUnicodeCharacter{1E26}{\"H}
- \DeclareUnicodeCharacter{1E27}{\"h}
-
- \DeclareUnicodeCharacter{1E30}{\'K}
- \DeclareUnicodeCharacter{1E31}{\'k}
- \DeclareUnicodeCharacter{1E32}{\udotaccent{K}}
- \DeclareUnicodeCharacter{1E33}{\udotaccent{k}}
- \DeclareUnicodeCharacter{1E34}{\ubaraccent{K}}
- \DeclareUnicodeCharacter{1E35}{\ubaraccent{k}}
- \DeclareUnicodeCharacter{1E36}{\udotaccent{L}}
- \DeclareUnicodeCharacter{1E37}{\udotaccent{l}}
- \DeclareUnicodeCharacter{1E3A}{\ubaraccent{L}}
- \DeclareUnicodeCharacter{1E3B}{\ubaraccent{l}}
- \DeclareUnicodeCharacter{1E3E}{\'M}
- \DeclareUnicodeCharacter{1E3F}{\'m}
-
- \DeclareUnicodeCharacter{1E40}{\dotaccent{M}}
- \DeclareUnicodeCharacter{1E41}{\dotaccent{m}}
- \DeclareUnicodeCharacter{1E42}{\udotaccent{M}}
- \DeclareUnicodeCharacter{1E43}{\udotaccent{m}}
- \DeclareUnicodeCharacter{1E44}{\dotaccent{N}}
- \DeclareUnicodeCharacter{1E45}{\dotaccent{n}}
- \DeclareUnicodeCharacter{1E46}{\udotaccent{N}}
- \DeclareUnicodeCharacter{1E47}{\udotaccent{n}}
- \DeclareUnicodeCharacter{1E48}{\ubaraccent{N}}
- \DeclareUnicodeCharacter{1E49}{\ubaraccent{n}}
-
- \DeclareUnicodeCharacter{1E54}{\'P}
- \DeclareUnicodeCharacter{1E55}{\'p}
- \DeclareUnicodeCharacter{1E56}{\dotaccent{P}}
- \DeclareUnicodeCharacter{1E57}{\dotaccent{p}}
- \DeclareUnicodeCharacter{1E58}{\dotaccent{R}}
- \DeclareUnicodeCharacter{1E59}{\dotaccent{r}}
- \DeclareUnicodeCharacter{1E5A}{\udotaccent{R}}
- \DeclareUnicodeCharacter{1E5B}{\udotaccent{r}}
- \DeclareUnicodeCharacter{1E5E}{\ubaraccent{R}}
- \DeclareUnicodeCharacter{1E5F}{\ubaraccent{r}}
-
- \DeclareUnicodeCharacter{1E60}{\dotaccent{S}}
- \DeclareUnicodeCharacter{1E61}{\dotaccent{s}}
- \DeclareUnicodeCharacter{1E62}{\udotaccent{S}}
- \DeclareUnicodeCharacter{1E63}{\udotaccent{s}}
- \DeclareUnicodeCharacter{1E6A}{\dotaccent{T}}
- \DeclareUnicodeCharacter{1E6B}{\dotaccent{t}}
- \DeclareUnicodeCharacter{1E6C}{\udotaccent{T}}
- \DeclareUnicodeCharacter{1E6D}{\udotaccent{t}}
- \DeclareUnicodeCharacter{1E6E}{\ubaraccent{T}}
- \DeclareUnicodeCharacter{1E6F}{\ubaraccent{t}}
-
- \DeclareUnicodeCharacter{1E7C}{\~V}
- \DeclareUnicodeCharacter{1E7D}{\~v}
- \DeclareUnicodeCharacter{1E7E}{\udotaccent{V}}
- \DeclareUnicodeCharacter{1E7F}{\udotaccent{v}}
-
- \DeclareUnicodeCharacter{1E80}{\`W}
- \DeclareUnicodeCharacter{1E81}{\`w}
- \DeclareUnicodeCharacter{1E82}{\'W}
- \DeclareUnicodeCharacter{1E83}{\'w}
- \DeclareUnicodeCharacter{1E84}{\"W}
- \DeclareUnicodeCharacter{1E85}{\"w}
- \DeclareUnicodeCharacter{1E86}{\dotaccent{W}}
- \DeclareUnicodeCharacter{1E87}{\dotaccent{w}}
- \DeclareUnicodeCharacter{1E88}{\udotaccent{W}}
- \DeclareUnicodeCharacter{1E89}{\udotaccent{w}}
- \DeclareUnicodeCharacter{1E8A}{\dotaccent{X}}
- \DeclareUnicodeCharacter{1E8B}{\dotaccent{x}}
- \DeclareUnicodeCharacter{1E8C}{\"X}
- \DeclareUnicodeCharacter{1E8D}{\"x}
- \DeclareUnicodeCharacter{1E8E}{\dotaccent{Y}}
- \DeclareUnicodeCharacter{1E8F}{\dotaccent{y}}
-
- \DeclareUnicodeCharacter{1E90}{\^Z}
- \DeclareUnicodeCharacter{1E91}{\^z}
- \DeclareUnicodeCharacter{1E92}{\udotaccent{Z}}
- \DeclareUnicodeCharacter{1E93}{\udotaccent{z}}
- \DeclareUnicodeCharacter{1E94}{\ubaraccent{Z}}
- \DeclareUnicodeCharacter{1E95}{\ubaraccent{z}}
- \DeclareUnicodeCharacter{1E96}{\ubaraccent{h}}
- \DeclareUnicodeCharacter{1E97}{\"t}
- \DeclareUnicodeCharacter{1E98}{\ringaccent{w}}
- \DeclareUnicodeCharacter{1E99}{\ringaccent{y}}
-
- \DeclareUnicodeCharacter{1EA0}{\udotaccent{A}}
- \DeclareUnicodeCharacter{1EA1}{\udotaccent{a}}
-
- \DeclareUnicodeCharacter{1EB8}{\udotaccent{E}}
- \DeclareUnicodeCharacter{1EB9}{\udotaccent{e}}
- \DeclareUnicodeCharacter{1EBC}{\~E}
- \DeclareUnicodeCharacter{1EBD}{\~e}
-
- \DeclareUnicodeCharacter{1ECA}{\udotaccent{I}}
- \DeclareUnicodeCharacter{1ECB}{\udotaccent{i}}
- \DeclareUnicodeCharacter{1ECC}{\udotaccent{O}}
- \DeclareUnicodeCharacter{1ECD}{\udotaccent{o}}
-
- \DeclareUnicodeCharacter{1EE4}{\udotaccent{U}}
- \DeclareUnicodeCharacter{1EE5}{\udotaccent{u}}
-
- \DeclareUnicodeCharacter{1EF2}{\`Y}
- \DeclareUnicodeCharacter{1EF3}{\`y}
- \DeclareUnicodeCharacter{1EF4}{\udotaccent{Y}}
-
- \DeclareUnicodeCharacter{1EF8}{\~Y}
- \DeclareUnicodeCharacter{1EF9}{\~y}
-
- \DeclareUnicodeCharacter{2013}{--}
- \DeclareUnicodeCharacter{2014}{---}
- \DeclareUnicodeCharacter{2018}{\quoteleft}
- \DeclareUnicodeCharacter{2019}{\quoteright}
- \DeclareUnicodeCharacter{201A}{\quotesinglbase}
- \DeclareUnicodeCharacter{201C}{\quotedblleft}
- \DeclareUnicodeCharacter{201D}{\quotedblright}
- \DeclareUnicodeCharacter{201E}{\quotedblbase}
- \DeclareUnicodeCharacter{2022}{\bullet}
- \DeclareUnicodeCharacter{2026}{\dots}
- \DeclareUnicodeCharacter{2039}{\guilsinglleft}
- \DeclareUnicodeCharacter{203A}{\guilsinglright}
- \DeclareUnicodeCharacter{20AC}{\euro}
-
- \DeclareUnicodeCharacter{2192}{\expansion}
- \DeclareUnicodeCharacter{21D2}{\result}
-
- \DeclareUnicodeCharacter{2212}{\minus}
- \DeclareUnicodeCharacter{2217}{\point}
- \DeclareUnicodeCharacter{2261}{\equiv}
-}% end of \utfeightchardefs
+ \let\DeclareUnicodeCharacter\DeclareUnicodeCharacterUTFviii
+ \unicodechardefs
+}
+% Whether the active definitions of non-ASCII characters expand to
+% non-active tokens with the same character code. This is used to
+% write characters literally, instead of using active definitions for
+% printing the correct glyphs.
+\newif\ifpassthroughchars
+\passthroughcharsfalse
+
+% For native Unicode handling (XeTeX and LuaTeX),
+% provide a definition macro to replace/pass-through a Unicode character
+%
+\def\DeclareUnicodeCharacterNative#1#2{%
+ \catcode"#1=\active
+ \def\dodeclareunicodecharacternative##1##2##3{%
+ \begingroup
+ \uccode`\~="##2\relax
+ \uppercase{\gdef~}{%
+ \ifpassthroughchars
+ ##1%
+ \else
+ ##3%
+ \fi
+ }
+ \endgroup
+ }
+ \begingroup
+ \uccode`\.="#1\relax
+ \uppercase{\def\UTFNativeTmp{.}}%
+ \expandafter\dodeclareunicodecharacternative\UTFNativeTmp{#1}{#2}%
+ \endgroup
+}
+
+% Native Unicode handling (XeTeX and LuaTeX) character replacing definition.
+% It activates the setting that replaces Unicode characters.
+\def\nativeunicodechardefs{%
+ \let\DeclareUnicodeCharacter\DeclareUnicodeCharacterNative
+ \unicodechardefs
+}
+
+% For native Unicode handling (XeTeX and LuaTeX),
+% make the character token expand
+% to the sequences given in \unicodechardefs for printing.
+\def\DeclareUnicodeCharacterNativeAtU#1#2{%
+ \def\UTFAtUTmp{#2}
+ \expandafter\globallet\csname uni:#1\endcsname \UTFAtUTmp
+}
+
+% @U command definitions for native Unicode handling (XeTeX and LuaTeX).
+\def\nativeunicodechardefsatu{%
+ \let\DeclareUnicodeCharacter\DeclareUnicodeCharacterNativeAtU
+ \unicodechardefs
+}
% US-ASCII character definitions.
\def\asciichardefs{% nothing need be done
\relax
}
+% define all Unicode characters we know about, for the sake of @U.
+\iftxinativeunicodecapable
+ \nativeunicodechardefsatu
+\else
+ \utfeightchardefs
+\fi
+
+
% Make non-ASCII characters printable again for compatibility with
% existing Texinfo documents that may use them, even without declaring a
% document encoding.
@@ -9646,12 +11260,12 @@ directory should work if nowhere else does.}
\advance\vsize by \topskip
\outervsize = \vsize
\advance\outervsize by 2\topandbottommargin
- \pageheight = \vsize
+ \txipageheight = \vsize
%
\hsize = #2\relax
\outerhsize = \hsize
\advance\outerhsize by 0.5in
- \pagewidth = \hsize
+ \txipagewidth = \hsize
%
\normaloffset = #4\relax
\bindingoffset = #5\relax
@@ -9663,6 +11277,13 @@ directory should work if nowhere else does.}
% whatever layout pdftex was dumped with.
\pdfhorigin = 1 true in
\pdfvorigin = 1 true in
+ \else
+ \ifx\XeTeXrevision\thisisundefined
+ \else
+ \pdfpageheight #7\relax
+ \pdfpagewidth #8\relax
+ % XeTeX does not have \pdfhorigin and \pdfvorigin.
+ \fi
\fi
%
\setleading{\textleading}
@@ -9850,44 +11471,47 @@ directory should work if nowhere else does.}
% this is not a problem.
\def\ifusingit#1#2{\ifdim \fontdimen1\font>0pt #1\else #2\fi}
-% Turn off all special characters except @
-% (and those which the user can use as if they were ordinary).
+% Set catcodes for Texinfo file
+
+% Active characters for printing the wanted glyph.
% Most of these we simply print from the \tt font, but for some, we can
% use math or other variants that look better in normal text.
-
+%
\catcode`\"=\active
\def\activedoublequote{{\tt\char34}}
\let"=\activedoublequote
-\catcode`\~=\active
-\def~{{\tt\char126}}
-\chardef\hat=`\^
-\catcode`\^=\active
-\def^{{\tt \hat}}
+\catcode`\~=\active \def\activetilde{{\tt\char126}} \let~ = \activetilde
+\chardef\hatchar=`\^
+\catcode`\^=\active \def\activehat{{\tt \hatchar}} \let^ = \activehat
\catcode`\_=\active
\def_{\ifusingtt\normalunderscore\_}
-\let\realunder=_
-% Subroutine for the previous macro.
\def\_{\leavevmode \kern.07em \vbox{\hrule width.3em height.1ex}\kern .07em }
+\let\realunder=_
+
+\catcode`\|=\active \def|{{\tt\char124}}
-\catcode`\|=\active
-\def|{{\tt\char124}}
\chardef \less=`\<
-\catcode`\<=\active
-\def<{{\tt \less}}
+\catcode`\<=\active \def\activeless{{\tt \less}}\let< = \activeless
\chardef \gtr=`\>
-\catcode`\>=\active
-\def>{{\tt \gtr}}
-\catcode`\+=\active
-\def+{{\tt \char 43}}
-\catcode`\$=\active
-\def${\ifusingit{{\sl\$}}\normaldollar}%$ font-lock fix
+\catcode`\>=\active \def\activegtr{{\tt \gtr}}\let> = \activegtr
+\catcode`\+=\active \def+{{\tt \char 43}}
+\catcode`\$=\active \def${\ifusingit{{\sl\$}}\normaldollar}%$ font-lock fix
+\catcode`\-=\active \let-=\normaldash
-% If a .fmt file is being used, characters that might appear in a file
-% name cannot be active until we have parsed the command line.
-% So turn them off again, and have \everyjob (or @setfilename) turn them on.
-% \otherifyactive is called near the end of this file.
-\def\otherifyactive{\catcode`+=\other \catcode`\_=\other}
+
+% used for headline/footline in the output routine, in case the page
+% breaks in the middle of an @tex block.
+\def\texinfochars{%
+ \let< = \activeless
+ \let> = \activegtr
+ \let~ = \activetilde
+ \let^ = \activehat
+ \markupsetuplqdefault \markupsetuprqdefault
+ \let\b = \strong
+ \let\i = \smartitalic
+ % in principle, all other definitions in \tex have to be undone too.
+}
% Used sometimes to turn off (effectively) the active characters even after
% parsing them.
@@ -9907,23 +11531,22 @@ directory should work if nowhere else does.}
% \doublebackslash is two of them (for the pdf outlines).
{\catcode`\\=\other @gdef@realbackslash{\} @gdef@doublebackslash{\\}}
-% In texinfo, backslash is an active character; it prints the backslash
+% In Texinfo, backslash is an active character; it prints the backslash
% in fixed width font.
\catcode`\\=\active % @ for escape char from now on.
-% The story here is that in math mode, the \char of \backslashcurfont
-% ends up printing the roman \ from the math symbol font (because \char
-% in math mode uses the \mathcode, and plain.tex sets
-% \mathcode`\\="026E). It seems better for @backslashchar{} to always
-% print a typewriter backslash, hence we use an explicit \mathchar,
+% Print a typewriter backslash. For math mode, we can't simply use
+% \backslashcurfont: the story here is that in math mode, the \char
+% of \backslashcurfont ends up printing the roman \ from the math symbol
+% font (because \char in math mode uses the \mathcode, and plain.tex
+% sets \mathcode`\\="026E). Hence we use an explicit \mathchar,
% which is the decimal equivalent of "715c (class 7, e.g., use \fam;
% ignored family value; char position "5C). We can't use " for the
% usual hex value because it has already been made active.
-@def@normalbackslash{{@tt @ifmmode @mathchar29020 @else @backslashcurfont @fi}}
-@let@backslashchar = @normalbackslash % @backslashchar{} is for user documents.
-% On startup, @fixbackslash assigns:
-% @let \ = @normalbackslash
+@def@ttbackslash{{@tt @ifmmode @mathchar29020 @else @backslashcurfont @fi}}
+@let@backslashchar = @ttbackslash % @backslashchar{} is for user documents.
+
% \rawbackslash defines an active \ to do \backslashcurfont.
% \otherbackslash defines an active \ to be a literal `\' character with
% catcode other. We switch back and forth between these.
@@ -9933,45 +11556,87 @@ directory should work if nowhere else does.}
% Same as @turnoffactive except outputs \ as {\tt\char`\\} instead of
% the literal character `\'.
%
-@def@normalturnoffactive{%
- @let"=@normaldoublequote
- @let$=@normaldollar %$ font-lock fix
- @let+=@normalplus
- @let<=@normalless
- @let>=@normalgreater
- @let\=@normalbackslash
- @let^=@normalcaret
- @let_=@normalunderscore
- @let|=@normalverticalbar
- @let~=@normaltilde
- @markupsetuplqdefault
- @markupsetuprqdefault
- @unsepspaces
-}
-
-% Make _ and + \other characters, temporarily.
-% This is canceled by @fixbackslash.
-@otherifyactive
+{@catcode`- = @active
+ @gdef@normalturnoffactive{%
+ @passthroughcharstrue
+ @let-=@normaldash
+ @let"=@normaldoublequote
+ @let$=@normaldollar %$ font-lock fix
+ @let+=@normalplus
+ @let<=@normalless
+ @let>=@normalgreater
+ @let^=@normalcaret
+ @let_=@normalunderscore
+ @let|=@normalverticalbar
+ @let~=@normaltilde
+ @let\=@ttbackslash
+ @markupsetuplqdefault
+ @markupsetuprqdefault
+ @unsepspaces
+ }
+}
+
+% If a .fmt file is being used, characters that might appear in a file
+% name cannot be active until we have parsed the command line.
+% So turn them off again, and have @fixbackslash turn them back on.
+@catcode`+=@other @catcode`@_=@other
+% \enablebackslashhack - allow file to begin `\input texinfo'
+%
% If a .fmt file is being used, we don't want the `\input texinfo' to show up.
% That is what \eatinput is for; after that, the `\' should revert to printing
% a backslash.
-%
-@gdef@eatinput input texinfo{@fixbackslash}
-@global@let\ = @eatinput
+% If the file did not have a `\input texinfo', then it is turned off after
+% the first line; otherwise the first `\' in the file would cause an error.
+% This is used on the very last line of this file, texinfo.tex.
+% We also use @c to call @fixbackslash, in case ends of lines are hidden.
+{
+@catcode`@^=7
+@catcode`@^^M=13@gdef@enablebackslashhack{%
+ @global@let\ = @eatinput%
+ @catcode`@^^M=13%
+ @def@c{@fixbackslash@c}%
+ % Definition for the newline at the end of this file.
+ @def ^^M{@let^^M@secondlinenl}%
+ % Definition for a newline in the main Texinfo file.
+ @gdef @secondlinenl{@fixbackslash}%
+}}
+
+{@catcode`@^=7 @catcode`@^^M=13%
+@gdef@eatinput input texinfo#1^^M{@fixbackslash}}
+
+% Emergency active definition of newline, in case an active newline token
+% appears by mistake.
+{@catcode`@^=7 @catcode13=13%
+@gdef@enableemergencynewline{%
+ @gdef^^M{%
+ @par%
+ %<warning: active newline>@par%
+}}}
+
-% On the other hand, perhaps the file did not have a `\input texinfo'. Then
-% the first `\' in the file would cause an error. This macro tries to fix
-% that, assuming it is called before the first `\' could plausibly occur.
-% Also turn back on active characters that might appear in the input
-% file name, in case not using a pre-dumped format.
-%
@gdef@fixbackslash{%
- @ifx\@eatinput @let\ = @normalbackslash @fi
+ @ifx\@eatinput @let\ = @ttbackslash @fi
+ @catcode13=5 % regular end of line
+ @enableemergencynewline
+ @let@c=@texinfoc
+ % Also turn back on active characters that might appear in the input
+ % file name, in case not using a pre-dumped format.
@catcode`+=@active
@catcode`@_=@active
+ %
+ % If texinfo.cnf is present on the system, read it.
+ % Useful for site-wide @afourpaper, etc. This macro, @fixbackslash, gets
+ % called at the beginning of every Texinfo file. Not opening texinfo.cnf
+ % directly in this file, texinfo.tex, makes it possible to make a format
+ % file for Texinfo.
+ %
+ @openin 1 texinfo.cnf
+ @ifeof 1 @else @input texinfo.cnf @fi
+ @closein 1
}
+
% Say @foo, not \foo, in error messages.
@escapechar = `@@
@@ -10000,7 +11665,7 @@ directory should work if nowhere else does.}
@c Local variables:
@c eval: (add-hook 'write-file-hooks 'time-stamp)
-@c page-delimiter: "^\\\\message"
+@c page-delimiter: "^\\\\message\\|emacs-page"
@c time-stamp-start: "def\\\\texinfoversion{"
@c time-stamp-format: "%:y-%02m-%02d.%02H"
@c time-stamp-end: "}"
@@ -10008,6 +11673,4 @@ directory should work if nowhere else does.}
@c vim:sw=2:
-@ignore
- arch-tag: e1b36e32-c96e-4135-a41a-0b2efa2ea115
-@end ignore
+@enablebackslashhack
diff --git a/build-aux/update-copyright b/build-aux/update-copyright
new file mode 100755
index 0000000..17ee6b1
--- /dev/null
+++ b/build-aux/update-copyright
@@ -0,0 +1,274 @@
+eval '(exit $?0)' && eval 'exec perl -wS -0777 -pi "$0" "$@"'
+ & eval 'exec perl -wS -0777 -pi "$0" $argv:q'
+ if 0;
+# Update an FSF copyright year list to include the current year.
+
+my $VERSION = '2016-01-12.23:13'; # UTC
+
+# Copyright (C) 2009-2016 Free Software Foundation, Inc.
+#
+# This 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 <http://www.gnu.org/licenses/>.
+
+# Written by Jim Meyering and Joel E. Denny
+
+# The arguments to this script should be names of files that contain
+# copyright statements to be updated. The copyright holder's name
+# defaults to "Free Software Foundation, Inc." but may be changed to
+# any other name by using the "UPDATE_COPYRIGHT_HOLDER" environment
+# variable.
+#
+# For example, you might wish to use the update-copyright target rule
+# in maint.mk from gnulib's maintainer-makefile module.
+#
+# Iff a copyright statement is recognized in a file and the final
+# year is not the current year, then the statement is updated for the
+# new year and it is reformatted to:
+#
+# 1. Fit within 72 columns.
+# 2. Convert 2-digit years to 4-digit years by prepending "19".
+# 3. Expand copyright year intervals. (See "Environment variables"
+# below.)
+#
+# A warning is printed for every file for which no copyright
+# statement is recognized.
+#
+# Each file's copyright statement must be formatted correctly in
+# order to be recognized. For example, each of these is fine:
+#
+# Copyright @copyright{} 1990-2005, 2007-2009 Free Software
+# Foundation, Inc.
+#
+# # Copyright (C) 1990-2005, 2007-2009 Free Software
+# # Foundation, Inc.
+#
+# /*
+# * Copyright &copy; 90,2005,2007-2009
+# * Free Software Foundation, Inc.
+# */
+#
+# However, the following format is not recognized because the line
+# prefix changes after the first line:
+#
+# ## Copyright (C) 1990-2005, 2007-2009 Free Software
+# # Foundation, Inc.
+#
+# However, any correctly formatted copyright statement following
+# a non-matching copyright statements would be recognized.
+#
+# The exact conditions that a file's copyright statement must meet
+# to be recognized are:
+#
+# 1. It is the first copyright statement that meets all of the
+# following conditions. Subsequent copyright statements are
+# ignored.
+# 2. Its format is "Copyright (C)", then a list of copyright years,
+# and then the name of the copyright holder.
+# 3. The "(C)" takes one of the following forms or is omitted
+# entirely:
+#
+# A. (C)
+# B. (c)
+# C. @copyright{}
+# D. &copy;
+#
+# 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
+# 5 characters -- including white space.
+# 5. Iff such a prefix is present, the same prefix appears at the
+# beginning of each remaining line within the FSF copyright
+# statement. There is one exception in order to support C-style
+# comments: if the first line's prefix contains nothing but
+# whitespace surrounding a "/*", then the prefix for all subsequent
+# lines is the same as the first line's prefix except with each of
+# "/" and possibly "*" replaced by a " ". The replacement of "*"
+# by " " is consistent throughout all subsequent lines.
+# 6. Blank lines, even if preceded by the prefix, do not appear
+# within the FSF copyright statement.
+# 7. Each copyright year is 2 or 4 digits, and years are separated by
+# commas or dashes. Whitespace may appear after commas.
+#
+# Environment variables:
+#
+# 1. If UPDATE_COPYRIGHT_FORCE=1, a recognized FSF copyright statement
+# is reformatted even if it does not need updating for the new
+# year. If unset or set to 0, only updated FSF copyright
+# statements are reformatted.
+# 2. If UPDATE_COPYRIGHT_USE_INTERVALS=1, every series of consecutive
+# copyright years (such as 90, 1991, 1992-2007, 2008) in a
+# reformatted FSF copyright statement is collapsed to a single
+# interval (such as 1990-2008). If unset or set to 0, all existing
+# copyright year intervals in a reformatted FSF copyright statement
+# are expanded instead.
+# If UPDATE_COPYRIGHT_USE_INTERVALS=2, convert a sequence with gaps
+# to the minimal containing range. For example, convert
+# 2000, 2004-2007, 2009 to 2000-2009.
+# 3. For testing purposes, you can set the assumed current year in
+# UPDATE_COPYRIGHT_YEAR.
+# 4. The default maximum line length for a copyright line is 72.
+# Set UPDATE_COPYRIGHT_MAX_LINE_LENGTH to use a different length.
+# 5. Set UPDATE_COPYRIGHT_HOLDER if the copyright holder is other
+# than "Free Software Foundation, Inc.".
+
+use strict;
+use warnings;
+
+my $copyright_re = 'Copyright';
+my $circle_c_re = '(?:\([cC]\)|@copyright\{}|\\\\\(co|&copy;)';
+my $holder = $ENV{UPDATE_COPYRIGHT_HOLDER};
+$holder ||= 'Free Software Foundation, Inc.';
+my $prefix_max = 5;
+my $margin = $ENV{UPDATE_COPYRIGHT_MAX_LINE_LENGTH};
+!$margin || $margin !~ m/^\d+$/
+ and $margin = 72;
+
+my $tab_width = 8;
+
+my $this_year = $ENV{UPDATE_COPYRIGHT_YEAR};
+if (!$this_year || $this_year !~ m/^\d{4}$/)
+ {
+ my ($sec, $min, $hour, $mday, $month, $year) = localtime (time ());
+ $this_year = $year + 1900;
+ }
+
+# Unless the file consistently uses "\r\n" as the EOL, use "\n" instead.
+my $eol = /(?:^|[^\r])\n/ ? "\n" : "\r\n";
+
+my $leading;
+my $prefix;
+my $ws_re;
+my $stmt_re;
+while (/(^|\n)(.{0,$prefix_max})$copyright_re/g)
+ {
+ $leading = "$1$2";
+ $prefix = $2;
+ if ($prefix =~ /^(\s*\/)\*(\s*)$/)
+ {
+ $prefix =~ s,/, ,;
+ my $prefix_ws = $prefix;
+ $prefix_ws =~ s/\*/ /; # Only whitespace.
+ if (/\G(?:[^*\n]|\*[^\/\n])*\*?\n$prefix_ws/)
+ {
+ $prefix = $prefix_ws;
+ }
+ }
+ $ws_re = '[ \t\r\f]'; # \s without \n
+ $ws_re =
+ "(?:$ws_re*(?:$ws_re|\\n" . quotemeta($prefix) . ")$ws_re*)";
+ my $holder_re = $holder;
+ $holder_re =~ s/\s/$ws_re/g;
+ my $stmt_remainder_re =
+ "(?:$ws_re$circle_c_re)?"
+ . "$ws_re(?:(?:\\d\\d)?\\d\\d(?:,$ws_re?|-))*"
+ . "((?:\\d\\d)?\\d\\d)$ws_re$holder_re";
+ if (/\G$stmt_remainder_re/)
+ {
+ $stmt_re =
+ quotemeta($leading) . "($copyright_re$stmt_remainder_re)";
+ last;
+ }
+ }
+if (defined $stmt_re)
+ {
+ /$stmt_re/ or die; # Should never die.
+ my $stmt = $1;
+ my $final_year_orig = $2;
+
+ # Handle two-digit year numbers like "98" and "99".
+ my $final_year = $final_year_orig;
+ $final_year <= 99
+ and $final_year += 1900;
+
+ if ($final_year != $this_year)
+ {
+ # Update the year.
+ $stmt =~ s/\b$final_year_orig\b/$final_year, $this_year/;
+ }
+ if ($final_year != $this_year || $ENV{'UPDATE_COPYRIGHT_FORCE'})
+ {
+ # Normalize all whitespace including newline-prefix sequences.
+ $stmt =~ s/$ws_re/ /g;
+
+ # Put spaces after commas.
+ $stmt =~ s/, ?/, /g;
+
+ # Convert 2-digit to 4-digit years.
+ $stmt =~ s/(\b\d\d\b)/19$1/g;
+
+ # Make the use of intervals consistent.
+ if (!$ENV{UPDATE_COPYRIGHT_USE_INTERVALS})
+ {
+ $stmt =~ s/(\d{4})-(\d{4})/join(', ', $1..$2)/eg;
+ }
+ else
+ {
+ $stmt =~
+ s/
+ (\d{4})
+ (?:
+ (,\ |-)
+ ((??{
+ if ($2 eq '-') { '\d{4}'; }
+ elsif (!$3) { $1 + 1; }
+ else { $3 + 1; }
+ }))
+ )+
+ /$1-$3/gx;
+
+ # When it's 2, emit a single range encompassing all year numbers.
+ $ENV{UPDATE_COPYRIGHT_USE_INTERVALS} == 2
+ and $stmt =~ s/\b(\d{4})\b.*\b(\d{4})\b/$1-$2/;
+ }
+
+ # Format within margin.
+ my $stmt_wrapped;
+ my $text_margin = $margin - length($prefix);
+ if ($prefix =~ /^(\t+)/)
+ {
+ $text_margin -= length($1) * ($tab_width - 1);
+ }
+ while (length $stmt)
+ {
+ if (($stmt =~ s/^(.{1,$text_margin})(?: |$)//)
+ || ($stmt =~ s/^([\S]+)(?: |$)//))
+ {
+ my $line = $1;
+ $stmt_wrapped .= $stmt_wrapped ? "$eol$prefix" : $leading;
+ $stmt_wrapped .= $line;
+ }
+ else
+ {
+ # Should be unreachable, but we don't want an infinite
+ # loop if it can be reached.
+ die;
+ }
+ }
+
+ # Replace the old copyright statement.
+ s/$stmt_re/$stmt_wrapped/;
+ }
+ }
+else
+ {
+ print STDERR "$ARGV: warning: copyright statement not found\n";
+ }
+
+# Local variables:
+# mode: perl
+# indent-tabs-mode: nil
+# eval: (add-hook 'write-file-hooks 'time-stamp)
+# time-stamp-start: "my $VERSION = '"
+# time-stamp-format: "%:y-%02m-%02d.%02H:%02M"
+# time-stamp-time-zone: "UTC0"
+# time-stamp-end: "'; # UTC"
+# End:
diff --git a/build-aux/useless-if-before-free b/build-aux/useless-if-before-free
new file mode 100755
index 0000000..d7a8c0d
--- /dev/null
+++ b/build-aux/useless-if-before-free
@@ -0,0 +1,210 @@
+eval '(exit $?0)' && eval 'exec perl -wST "$0" "$@"'
+ & eval 'exec perl -wST "$0" $argv:q'
+ if 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
+# 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-2016 Free Software Foundation, Inc.
+
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# Written by Jim Meyering
+
+use strict;
+use warnings;
+use Getopt::Long;
+
+(my $ME = $0) =~ s|.*/||;
+
+# use File::Coda; # http://meyering.net/code/Coda/
+END {
+ defined fileno STDOUT or return;
+ close STDOUT and return;
+ warn "$ME: failed to close standard output: $!\n";
+ $? ||= 1;
+}
+
+sub usage ($)
+{
+ my ($exit_code) = @_;
+ my $STREAM = ($exit_code == 0 ? *STDOUT : *STDERR);
+ if ($exit_code != 0)
+ {
+ print $STREAM "Try '$ME --help' for more information.\n";
+ }
+ else
+ {
+ print $STREAM <<EOF;
+Usage: $ME [OPTIONS] FILE...
+
+Detect any instance in FILE of a useless "if" test before a free call, e.g.,
+"if (p) free (p);". Any such test may be safely removed without affecting
+the semantics of the C code in FILE. Use --name=FOO --name=BAR to also
+detect free-like functions named FOO and BAR.
+
+OPTIONS:
+
+ --list print only the name of each matching FILE (\\0-terminated)
+ --name=N add name N to the list of \'free\'-like functions to detect;
+ may be repeated
+
+ --help display this help and exit
+ --version output version information and exit
+
+Exit status:
+
+ 0 one or more matches
+ 1 no match
+ 2 an error
+
+EXAMPLE:
+
+For example, this command prints all removable "if" tests before "free"
+and "kfree" calls in the linux kernel sources:
+
+ git ls-files -z |xargs -0 $ME --name=kfree
+
+EOF
+ }
+ exit $exit_code;
+}
+
+sub is_NULL ($)
+{
+ my ($expr) = @_;
+ return ($expr eq 'NULL' || $expr eq '0');
+}
+
+{
+ sub EXIT_MATCH {0}
+ sub EXIT_NO_MATCH {1}
+ sub EXIT_ERROR {2}
+ my $err = EXIT_NO_MATCH;
+
+ my $list;
+ my @name = qw(free);
+ GetOptions
+ (
+ help => sub { usage 0 },
+ version => sub { print "$ME version $VERSION\n"; exit },
+ list => \$list,
+ 'name=s@' => \@name,
+ ) or usage 1;
+
+ # Make sure we have the right number of non-option arguments.
+ # Always tell the user why we fail.
+ @ARGV < 1
+ and (warn "$ME: missing FILE argument\n"), usage EXIT_ERROR;
+
+ my $or = join '|', @name;
+ my $regexp = qr/(?:$or)/;
+
+ # Set the input record separator.
+ # Note: this makes it impractical to print line numbers.
+ $/ = '"';
+
+ my $found_match = 0;
+ FILE:
+ foreach my $file (@ARGV)
+ {
+ open FH, '<', $file
+ or (warn "$ME: can't open '$file' for reading: $!\n"),
+ $err = EXIT_ERROR, next;
+ while (defined (my $line = <FH>))
+ {
+ # Skip non-matching lines early to save time
+ $line =~ /\bif\b/
+ or next;
+ while ($line =~
+ /\b(if\s*\(\s*([^)]+?)(?:\s*!=\s*([^)]+?))?\s*\)
+ # 1 2 3
+ (?: \s*$regexp\s*\((?:\s*\([^)]+\))?\s*([^)]+)\)\s*;|
+ \s*\{\s*$regexp\s*\((?:\s*\([^)]+\))?\s*([^)]+)\)\s*;\s*\}))/sxg)
+ {
+ my $all = $1;
+ my ($lhs, $rhs) = ($2, $3);
+ my ($free_opnd, $braced_free_opnd) = ($4, $5);
+ my $non_NULL;
+ if (!defined $rhs) { $non_NULL = $lhs }
+ elsif (is_NULL $rhs) { $non_NULL = $lhs }
+ elsif (is_NULL $lhs) { $non_NULL = $rhs }
+ else { next }
+
+ # Compare the non-NULL part of the "if" expression and the
+ # free'd expression, without regard to white space.
+ $non_NULL =~ tr/ \t//d;
+ my $e2 = defined $free_opnd ? $free_opnd : $braced_free_opnd;
+ $e2 =~ tr/ \t//d;
+ if ($non_NULL eq $e2)
+ {
+ $found_match = 1;
+ $list
+ and (print "$file\0"), next FILE;
+ print "$file: $all\n";
+ }
+ }
+ }
+ }
+ continue
+ {
+ close FH;
+ }
+
+ $found_match && $err == EXIT_NO_MATCH
+ and $err = EXIT_MATCH;
+
+ exit $err;
+}
+
+my $foo = <<'EOF';
+# The above is to *find* them.
+# This adjusts them, removing the unnecessary "if (p)" part.
+
+# FIXME: do something like this as an option (doesn't do braces):
+free=xfree
+git grep -l -z "$free *(" \
+ | xargs -0 useless-if-before-free -l --name="$free" \
+ | xargs -0 perl -0x3b -pi -e \
+ 's/\bif\s*\(\s*(\S+?)(?:\s*!=\s*(?:0|NULL))?\s*\)\s+('"$free"'\s*\((?:\s*\([^)]+\))?\s*\1\s*\)\s*;)/$2/s'
+
+# Use the following to remove redundant uses of kfree inside braces.
+# Note that -0777 puts perl in slurp-whole-file mode;
+# but we have plenty of memory, these days...
+free=kfree
+git grep -l -z "$free *(" \
+ | xargs -0 useless-if-before-free -l --name="$free" \
+ | xargs -0 perl -0777 -pi -e \
+ 's/\bif\s*\(\s*(\S+?)(?:\s*!=\s*(?:0|NULL))?\s*\)\s*\{\s*('"$free"'\s*\((?:\s*\([^)]+\))?\s*\1\s*\);)\s*\}[^\n]*$/$2/gms'
+
+Be careful that the result of the above transformation is valid.
+If the matched string is followed by "else", then obviously, it won't be.
+
+When modifying files, refuse to process anything other than a regular file.
+EOF
+
+## Local Variables:
+## mode: perl
+## indent-tabs-mode: nil
+## eval: (add-hook 'write-file-hooks 'time-stamp)
+## time-stamp-start: "my $VERSION = '"
+## time-stamp-format: "%:y-%02m-%02d %02H:%02M"
+## time-stamp-time-zone: "UTC0"
+## time-stamp-end: "'; # UTC"
+## End:
diff --git a/build-aux/vc-list-files b/build-aux/vc-list-files
new file mode 100755
index 0000000..c5c420a
--- /dev/null
+++ b/build-aux/vc-list-files
@@ -0,0 +1,113 @@
+#!/bin/sh
+# List version-controlled file names.
+
+# Print a version string.
+scriptversion=2016-01-11.22; # UTC
+
+# Copyright (C) 2006-2016 Free Software Foundation, Inc.
+
+# This 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/>.
+
+
+# List the specified version-controlled files.
+# With no argument, list them all. With a single DIRECTORY argument,
+# list the version-controlled files in that directory.
+
+# If there's an argument, it must be a single, "."-relative directory name.
+# cvsu is part of the cvsutils package: http://www.red-bean.com/cvsutils/
+
+postprocess=
+case $1 in
+ --help) cat <<EOF
+Usage: $0 [-C SRCDIR] [DIR...]
+
+Output a list of version-controlled files in DIR (default .), relative to
+SRCDIR (default .). SRCDIR must be the top directory of a checkout.
+
+Options:
+ --help print this help, then exit
+ --version print version number, then exit
+ -C SRCDIR change directory to SRCDIR before generating list
+
+Report bugs and patches to <bug-gnulib@gnu.org>.
+EOF
+ exit ;;
+
+ --version)
+ year=`echo "$scriptversion" | sed 's/[^0-9].*//'`
+ 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>
+This is free software: you are free to change and redistribute it.
+There is NO WARRANTY, to the extent permitted by law.
+EOF
+ exit ;;
+
+ -C)
+ test "$2" = . || postprocess="| sed 's|^|$2/|'"
+ cd "$2" || exit 1
+ shift; shift ;;
+esac
+
+test $# = 0 && set .
+
+for dir
+do
+ if test -d .git; then
+ test "x$dir" = x. \
+ && dir= sed_esc= \
+ || { dir="$dir/"; sed_esc=`echo "$dir"|env sed 's,\([\\/]\),\\\\\1,g'`; }
+ # Ignore git symlinks - either they point into the tree, in which case
+ # we don't need to visit the target twice, or they point somewhere
+ # else (often into a submodule), in which case the content does not
+ # belong to this package.
+ eval exec git ls-tree -r 'HEAD:"$dir"' \
+ \| sed -n '"s/^100[^ ]*./$sed_esc/p"' $postprocess
+ elif test -d .hg; then
+ eval exec hg locate '"$dir/*"' $postprocess
+ elif test -d .bzr; then
+ test "$postprocess" = '' && postprocess="| sed 's|^\./||'"
+ eval exec bzr ls -R --versioned '"$dir"' $postprocess
+ elif test -d CVS; then
+ test "$postprocess" = '' && postprocess="| sed 's|^\./||'"
+ if test -x build-aux/cvsu; then
+ eval build-aux/cvsu --find --types=AFGM '"$dir"' $postprocess
+ elif (cvsu --help) >/dev/null 2>&1; then
+ eval cvsu --find --types=AFGM '"$dir"' $postprocess
+ else
+ eval awk -F/ \''{ \
+ if (!$1 && $3 !~ /^-/) { \
+ f=FILENAME; \
+ if (f ~ /CVS\/Entries$/) \
+ f = substr(f, 1, length(f)-11); \
+ print f $2; \
+ }}'\'' \
+ `find "$dir" -name Entries -print` /dev/null' $postprocess
+ fi
+ elif test -d .svn; then
+ eval exec svn list -R '"$dir"' $postprocess
+ else
+ echo "$0: Failed to determine type of version control used in `pwd`" 1>&2
+ exit 1
+ fi
+done
+
+# Local variables:
+# eval: (add-hook 'write-file-hooks 'time-stamp)
+# time-stamp-start: "scriptversion="
+# time-stamp-format: "%:y-%02m-%02d.%02H"
+# time-stamp-time-zone: "UTC0"
+# time-stamp-end: "; # UTC"
+# End:
diff --git a/config_h.in b/config_h.in
index f29c0c4..d6bf61d 100644
--- a/config_h.in
+++ b/config_h.in
@@ -23,6 +23,19 @@
/* Define to 1 if using `alloca.c'. */
#undef C_ALLOCA
+/* Define to 1 if the C locale may have encoding errors. */
+#undef C_LOCALE_MAYBE_EILSEQ
+
+/* the name of the file descriptor member of DIR */
+#undef DIR_FD_MEMBER_NAME
+
+#ifdef DIR_FD_MEMBER_NAME
+# define DIR_TO_FD(Dir_p) ((Dir_p)->DIR_FD_MEMBER_NAME)
+#else
+# define DIR_TO_FD(Dir_p) -1
+#endif
+
+
/* Define to 1 if // is a file system root distinct from /. */
#undef DOUBLE_SLASH_IS_DISTINCT_ROOT
@@ -33,6 +46,29 @@
language is requested. */
#undef ENABLE_NLS
+/* 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
+ compilers. When computing the size of such an object, don't use 'sizeof
+ (struct s)' as it overestimates the size. Use 'offsetof (struct s, d)'
+ instead. Don't use 'offsetof (struct s, d[0])', as this doesn't work with
+ MSVC and with C++ compilers. */
+#undef FLEXIBLE_ARRAY_MEMBER
+
+/* Enable compile-time and run-time bounds-checking, and some warnings,
+ without upsetting glibc 2.15+. */
+ #if !defined _FORTIFY_SOURCE && defined __OPTIMIZE__ && __OPTIMIZE__
+ # define _FORTIFY_SOURCE 2
+ #endif
+
+
+/* Define to 1 if the system's ftello function has the Solaris bug. */
+#undef FTELLO_BROKEN_AFTER_SWITCHING_FROM_READ_TO_WRITE
+
+/* Define to 1 if fflush is known to work on stdin as per POSIX.1-2008, 0 if
+ fflush is known to not work, -1 if unknown. */
+#undef FUNC_FFLUSH_STDIN
+
/* Define to 1 if nl_langinfo (YESEXPR) returns a non-empty string. */
#undef FUNC_NL_LANGINFO_YESEXPR_WORKS
@@ -40,6 +76,9 @@
and handles trailing slash correctly. */
#undef FUNC_REALPATH_WORKS
+/* Define to 1 if ungetc is broken when used on arbitrary bytes. */
+#undef FUNC_UNGETC_BROKEN
+
/* Define if gettimeofday clobbers the localtime buffer. */
#undef GETTIMEOFDAY_CLOBBERS_LOCALTIME
@@ -47,22 +86,41 @@
declaration of the second argument to gettimeofday. */
#undef GETTIMEOFDAY_TIMEZONE
+/* Define to 1 if getxattr works with XATTR_NAME_POSIX_ACL_ACCESS and
+ XATTR_NAME_POSIX_ACL_DEFAULT. */
+#undef GETXATTR_WITH_POSIX_ACLS
+
/* Define to a C preprocessor expression that evaluates to 1 or 0, depending
whether the gnulib module canonicalize-lgpl shall be considered present. */
#undef GNULIB_CANONICALIZE_LGPL
/* Define to a C preprocessor expression that evaluates to 1 or 0, depending
+ whether the gnulib module close-stream shall be considered present. */
+#undef GNULIB_CLOSE_STREAM
+
+/* Define to a C preprocessor expression that evaluates to 1 or 0, depending
+ whether the gnulib module fflush shall be considered present. */
+#undef GNULIB_FFLUSH
+
+/* Define to a C preprocessor expression that evaluates to 1 or 0, depending
whether the gnulib module fscanf shall be considered present. */
#undef GNULIB_FSCANF
/* Define to a C preprocessor expression that evaluates to 1 or 0, depending
- whether the gnulib module malloc-gnu shall be considered present. */
-#undef GNULIB_MALLOC_GNU
+ whether the gnulib module lock shall be considered present. */
+#undef GNULIB_LOCK
/* Define to a C preprocessor expression that evaluates to 1 or 0, depending
whether the gnulib module mkostemp shall be considered present. */
#undef GNULIB_MKOSTEMP
+/* enable some gnulib portability checks */
+#undef GNULIB_PORTCHECK
+
+/* Define to 1 if printf and friends should be labeled with attribute
+ "__gnu_printf__" instead of "__printf__" */
+#undef GNULIB_PRINTF_ATTRIBUTE_FLAVOR_GNU
+
/* Define to a C preprocessor expression that evaluates to 1 or 0, depending
whether the gnulib module scanf shall be considered present. */
#undef GNULIB_SCANF
@@ -81,21 +139,69 @@
/* Define to 1 when the gnulib module chdir should be tested. */
#undef GNULIB_TEST_CHDIR
+/* 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 dirfd should be tested. */
+#undef GNULIB_TEST_DIRFD
+
+/* Define to 1 when the gnulib module dup2 should be tested. */
+#undef GNULIB_TEST_DUP2
+
+/* Define to 1 when the gnulib module environ should be tested. */
+#undef GNULIB_TEST_ENVIRON
+
+/* Define to 1 when the gnulib module fdopen should be tested. */
+#undef GNULIB_TEST_FDOPEN
+
+/* Define to 1 when the gnulib module fflush should be tested. */
+#undef GNULIB_TEST_FFLUSH
+
+/* Define to 1 when the gnulib module fpurge should be tested. */
+#undef GNULIB_TEST_FPURGE
+
+/* Define to 1 when the gnulib module fseek should be tested. */
+#undef GNULIB_TEST_FSEEK
+
+/* Define to 1 when the gnulib module fseeko should be tested. */
+#undef GNULIB_TEST_FSEEKO
+
/* Define to 1 when the gnulib module fstat should be tested. */
#undef GNULIB_TEST_FSTAT
+/* Define to 1 when the gnulib module ftell should be tested. */
+#undef GNULIB_TEST_FTELL
+
+/* Define to 1 when the gnulib module ftello should be tested. */
+#undef GNULIB_TEST_FTELLO
+
+/* Define to 1 when the gnulib module getcwd should be tested. */
+#undef GNULIB_TEST_GETCWD
+
/* Define to 1 when the gnulib module getdelim should be tested. */
#undef GNULIB_TEST_GETDELIM
-/* Define to 1 when the gnulib module getopt-gnu should be tested. */
-#undef GNULIB_TEST_GETOPT_GNU
+/* Define to 1 when the gnulib module getdtablesize should be tested. */
+#undef GNULIB_TEST_GETDTABLESIZE
+
+/* Define to 1 when the gnulib module getpagesize should be tested. */
+#undef GNULIB_TEST_GETPAGESIZE
/* Define to 1 when the gnulib module gettimeofday should be tested. */
#undef GNULIB_TEST_GETTIMEOFDAY
+/* Define to 1 when the gnulib module link should be tested. */
+#undef GNULIB_TEST_LINK
+
/* Define to 1 when the gnulib module localeconv should be tested. */
#undef GNULIB_TEST_LOCALECONV
+/* Define to 1 when the gnulib module lseek should be tested. */
+#undef GNULIB_TEST_LSEEK
+
/* Define to 1 when the gnulib module lstat should be tested. */
#undef GNULIB_TEST_LSTAT
@@ -117,12 +223,27 @@
/* Define to 1 when the gnulib module memchr should be tested. */
#undef GNULIB_TEST_MEMCHR
+/* Define to 1 when the gnulib module memrchr should be tested. */
+#undef GNULIB_TEST_MEMRCHR
+
/* Define to 1 when the gnulib module mkostemp should be tested. */
#undef GNULIB_TEST_MKOSTEMP
/* Define to 1 when the gnulib module nl_langinfo should be tested. */
#undef GNULIB_TEST_NL_LANGINFO
+/* Define to 1 when the gnulib module open should be tested. */
+#undef GNULIB_TEST_OPEN
+
+/* Define to 1 when the gnulib module opendir should be tested. */
+#undef GNULIB_TEST_OPENDIR
+
+/* Define to 1 when the gnulib module putenv should be tested. */
+#undef GNULIB_TEST_PUTENV
+
+/* Define to 1 when the gnulib module readdir should be tested. */
+#undef GNULIB_TEST_READDIR
+
/* Define to 1 when the gnulib module readlink should be tested. */
#undef GNULIB_TEST_READLINK
@@ -138,15 +259,33 @@
/* 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 setenv should be tested. */
+#undef GNULIB_TEST_SETENV
+
+/* Define to 1 when the gnulib module setlocale should be tested. */
+#undef GNULIB_TEST_SETLOCALE
+
/* Define to 1 when the gnulib module stat should be tested. */
#undef GNULIB_TEST_STAT
+/* Define to 1 when the gnulib module strdup should be tested. */
+#undef GNULIB_TEST_STRDUP
+
/* Define to 1 when the gnulib module strerror should be tested. */
#undef GNULIB_TEST_STRERROR
/* Define to 1 when the gnulib module strverscmp should be tested. */
#undef GNULIB_TEST_STRVERSCMP
+/* Define to 1 when the gnulib module symlink should be tested. */
+#undef GNULIB_TEST_SYMLINK
+
+/* Define to 1 when the gnulib module unsetenv should be tested. */
+#undef GNULIB_TEST_UNSETENV
+
/* Define to 1 when the gnulib module wcrtomb should be tested. */
#undef GNULIB_TEST_WCRTOMB
@@ -229,8 +368,7 @@
may be supplied by this distribution. */
#undef HAVE_ALLOCA
-/* Define to 1 if you have <alloca.h> and it should be used (not on Ultrix).
- */
+/* Define to 1 if <alloca.h> works. */
#undef HAVE_ALLOCA_H
/* Define to 1 if you have the <bp-sym.h> header file. */
@@ -242,22 +380,33 @@
/* Define to 1 if you have the `canonicalize_file_name' function. */
#undef HAVE_CANONICALIZE_FILE_NAME
-/* Define to 1 if you have the MacOS X function CFLocaleCopyCurrent in the
+/* Define to 1 if you have the Mac OS X function CFLocaleCopyCurrent in the
CoreFoundation framework. */
#undef HAVE_CFLOCALECOPYCURRENT
-/* Define to 1 if you have the MacOS X function CFPreferencesCopyAppValue in
+/* Define to 1 if you have the Mac OS X function CFPreferencesCopyAppValue in
the CoreFoundation framework. */
#undef HAVE_CFPREFERENCESCOPYAPPVALUE
+/* Define to 1 if you have the `closedir' function. */
+#undef HAVE_CLOSEDIR
+
/* Define if the GNU dcgettext() function is already present or preinstalled.
*/
#undef HAVE_DCGETTEXT
+/* Define to 1 if you have the declaration of `alarm', and to 0 if you don't.
+ */
+#undef HAVE_DECL_ALARM
+
/* Define to 1 if you have the declaration of `clearerr_unlocked', and to 0 if
you don't. */
#undef HAVE_DECL_CLEARERR_UNLOCKED
+/* Define to 1 if you have the declaration of `dirfd', and to 0 if you don't.
+ */
+#undef HAVE_DECL_DIRFD
+
/* Define to 1 if you have the declaration of `feof_unlocked', and to 0 if you
don't. */
#undef HAVE_DECL_FEOF_UNLOCKED
@@ -274,6 +423,10 @@
you don't. */
#undef HAVE_DECL_FGETS_UNLOCKED
+/* Define to 1 if you have the declaration of `fpurge', and to 0 if you don't.
+ */
+#undef HAVE_DECL_FPURGE
+
/* Define to 1 if you have the declaration of `fputc_unlocked', and to 0 if
you don't. */
#undef HAVE_DECL_FPUTC_UNLOCKED
@@ -286,6 +439,14 @@
you don't. */
#undef HAVE_DECL_FREAD_UNLOCKED
+/* Define to 1 if you have the declaration of `fseeko', and to 0 if you don't.
+ */
+#undef HAVE_DECL_FSEEKO
+
+/* Define to 1 if you have the declaration of `ftello', and to 0 if you don't.
+ */
+#undef HAVE_DECL_FTELLO
+
/* Define to 1 if you have the declaration of `fwrite_unlocked', and to 0 if
you don't. */
#undef HAVE_DECL_FWRITE_UNLOCKED
@@ -302,6 +463,10 @@
don't. */
#undef HAVE_DECL_GETDELIM
+/* Define to 1 if you have the declaration of `getdtablesize', and to 0 if you
+ 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
@@ -322,6 +487,18 @@
don't. */
#undef HAVE_DECL_MBSINIT
+/* Define to 1 if you have the declaration of `memrchr', and to 0 if you
+ don't. */
+#undef HAVE_DECL_MEMRCHR
+
+/* Define to 1 if you have the declaration of `program_invocation_name', and
+ to 0 if you don't. */
+#undef HAVE_DECL_PROGRAM_INVOCATION_NAME
+
+/* Define to 1 if you have the declaration of `program_invocation_short_name',
+ and to 0 if you don't. */
+#undef HAVE_DECL_PROGRAM_INVOCATION_SHORT_NAME
+
/* Define to 1 if you have the declaration of `putchar_unlocked', and to 0 if
you don't. */
#undef HAVE_DECL_PUTCHAR_UNLOCKED
@@ -330,6 +507,14 @@
don't. */
#undef HAVE_DECL_PUTC_UNLOCKED
+/* Define to 1 if you have the declaration of `setenv', and to 0 if you don't.
+ */
+#undef HAVE_DECL_SETENV
+
+/* Define to 1 if you have the declaration of `strdup', and to 0 if you don't.
+ */
+#undef HAVE_DECL_STRDUP
+
/* Define to 1 if you have the declaration of `strerror_r', and to 0 if you
don't. */
#undef HAVE_DECL_STRERROR_R
@@ -338,6 +523,10 @@
don't. */
#undef HAVE_DECL_TOWLOWER
+/* Define to 1 if you have the declaration of `unsetenv', and to 0 if you
+ don't. */
+#undef HAVE_DECL_UNSETENV
+
/* Define to 1 if you have the declaration of `wcrtomb', and to 0 if you
don't. */
#undef HAVE_DECL_WCRTOMB
@@ -346,6 +535,30 @@
*/
#undef HAVE_DECL_WCTOB
+/* Define to 1 if you have the declaration of `_putenv', and to 0 if you
+ don't. */
+#undef HAVE_DECL__PUTENV
+
+/* Define to 1 if you have the declaration of `__argv', and to 0 if you don't.
+ */
+#undef HAVE_DECL___ARGV
+
+/* Define to 1 if you have the declaration of `__fpending', and to 0 if you
+ don't. */
+#undef HAVE_DECL___FPENDING
+
+/* Define to 1 if you have the <dirent.h> header file. */
+#undef HAVE_DIRENT_H
+
+/* Define to 1 if you have the `dirfd' function. */
+#undef HAVE_DIRFD
+
+/* Define to 1 if you have the 'dup2' function. */
+#undef HAVE_DUP2
+
+/* Define if you have the declaration of environ. */
+#undef HAVE_ENVIRON_DECL
+
/* Define to 1 if you have the <errno.h> header file. */
#undef HAVE_ERRNO_H
@@ -367,6 +580,12 @@
/* Defined if "rt" can be used as a mode to fopen. */
#undef HAVE_FOPEN_RT
+/* Define to 1 if you have the `fpurge' function. */
+#undef HAVE_FPURGE
+
+/* Define to 1 if fseeko (and presumably ftello) exists and is declared. */
+#undef HAVE_FSEEKO
+
/* Define to 1 if you have the `funlockfile' function. */
#undef HAVE_FUNLOCKFILE
@@ -379,18 +598,45 @@
/* Define to 1 if you have the `getdelim' function. */
#undef HAVE_GETDELIM
+/* 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
+
/* Define to 1 if you have the <getopt.h> header file. */
#undef HAVE_GETOPT_H
/* Define to 1 if you have the `getopt_long_only' function. */
#undef HAVE_GETOPT_LONG_ONLY
+/* Define to 1 if you have the `getpagesize' function. */
+#undef HAVE_GETPAGESIZE
+
+/* Define to 1 if you have the `getprogname' function. */
+#undef HAVE_GETPROGNAME
+
/* Define if the GNU gettext() function is already present or preinstalled. */
#undef HAVE_GETTEXT
/* 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
@@ -406,6 +652,9 @@
/* 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
@@ -418,9 +667,15 @@
/* Define to 1 if you have the <langinfo.h> header file. */
#undef HAVE_LANGINFO_H
+/* Define if your <locale.h> file defines LC_MESSAGES. */
+#undef HAVE_LC_MESSAGES
+
/* Define to 1 if you have the <libintl.h> header file. */
#undef HAVE_LIBINTL_H
+/* Define to 1 if you have the <limits.h> header file. */
+#undef HAVE_LIMITS_H
+
/* Define to 1 if you have the `link' function. */
#undef HAVE_LINK
@@ -433,9 +688,8 @@
/* Define to 1 if you have the `lstat' function. */
#undef HAVE_LSTAT
-/* Define to 1 if your system has a GNU libc compatible 'malloc' function, and
- to 0 otherwise. */
-#undef HAVE_MALLOC_GNU
+/* Define to 1 if you have the <malloc.h> header file. */
+#undef HAVE_MALLOC_H
/* Define if the 'malloc' function is POSIX compliant. */
#undef HAVE_MALLOC_POSIX
@@ -462,8 +716,14 @@
/* Define to 1 if you have the `memcpy' function. */
#undef HAVE_MEMCPY
-/* Define to 1 if you have the <memory.h> header file. */
-#undef HAVE_MEMORY_H
+/* Define to 1 if you have the `memrchr' function. */
+#undef HAVE_MEMRCHR
+
+/* Define to 1 if <limits.h> defines the MIN and MAX macros. */
+#undef HAVE_MINMAX_IN_LIMITS_H
+
+/* Define to 1 if <sys/param.h> defines the MIN and MAX macros. */
+#undef HAVE_MINMAX_IN_SYS_PARAM_H
/* Define to 1 if you have the `mkostemp' function. */
#undef HAVE_MKOSTEMP
@@ -475,18 +735,36 @@
concept. */
#undef HAVE_MSVC_INVALID_PARAMETER_HANDLER
+/* Define to 1 if you have the `newlocale' function. */
+#undef HAVE_NEWLOCALE
+
/* Define to 1 if you have the `nl_langinfo' function. */
#undef HAVE_NL_LANGINFO
-/* Define to 1 if libc includes obstacks. */
+/* Define to 1 if the system has obstacks that work with any size object. */
#undef HAVE_OBSTACK
+/* Define to 1 if you have the `opendir' function. */
+#undef HAVE_OPENDIR
+
+/* Define to 1 if you have the <OS.h> header file. */
+#undef HAVE_OS_H
+
/* Define to 1 if you have the `pathconf' function. */
#undef HAVE_PATHCONF
/* Define to 1 if you have the `popen' function. */
#undef HAVE_POPEN
+/* Define if the <pthread.h> defines PTHREAD_MUTEX_RECURSIVE. */
+#undef HAVE_PTHREAD_MUTEX_RECURSIVE
+
+/* Define if the POSIX multithreading library has read/write locks. */
+#undef HAVE_PTHREAD_RWLOCK
+
+/* 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
@@ -503,6 +781,12 @@
/* Define to 1 if chown is declared even after undefining macros. */
#undef HAVE_RAW_DECL_CHOWN
+/* Define to 1 if closedir is declared even after undefining macros. */
+#undef HAVE_RAW_DECL_CLOSEDIR
+
+/* Define to 1 if dirfd is declared even after undefining macros. */
+#undef HAVE_RAW_DECL_DIRFD
+
/* Define to 1 if dprintf is declared even after undefining macros. */
#undef HAVE_RAW_DECL_DPRINTF
@@ -545,6 +829,9 @@
/* Define to 1 if fdatasync is declared even after undefining macros. */
#undef HAVE_RAW_DECL_FDATASYNC
+/* Define to 1 if fdopendir is declared even after undefining macros. */
+#undef HAVE_RAW_DECL_FDOPENDIR
+
/* Define to 1 if ffsl is declared even after undefining macros. */
#undef HAVE_RAW_DECL_FFSL
@@ -626,6 +913,12 @@
/* Define to 1 if group_member is declared even after undefining macros. */
#undef HAVE_RAW_DECL_GROUP_MEMBER
+/* Define to 1 if imaxabs is declared even after undefining macros. */
+#undef HAVE_RAW_DECL_IMAXABS
+
+/* Define to 1 if imaxdiv is declared even after undefining macros. */
+#undef HAVE_RAW_DECL_IMAXDIV
+
/* Define to 1 if initstate is declared even after undefining macros. */
#undef HAVE_RAW_DECL_INITSTATE
@@ -635,6 +928,9 @@
/* Define to 1 if isatty is declared even after undefining macros. */
#undef HAVE_RAW_DECL_ISATTY
+/* Define to 1 if isblank is declared even after undefining macros. */
+#undef HAVE_RAW_DECL_ISBLANK
+
/* Define to 1 if iswctype is declared even after undefining macros. */
#undef HAVE_RAW_DECL_ISWCTYPE
@@ -716,6 +1012,9 @@
/* Define to 1 if openat is declared even after undefining macros. */
#undef HAVE_RAW_DECL_OPENAT
+/* Define to 1 if opendir is declared even after undefining macros. */
+#undef HAVE_RAW_DECL_OPENDIR
+
/* Define to 1 if pclose is declared even after undefining macros. */
#undef HAVE_RAW_DECL_PCLOSE
@@ -743,6 +1042,9 @@
/* Define to 1 if pwrite is declared even after undefining macros. */
#undef HAVE_RAW_DECL_PWRITE
+/* Define to 1 if qsort_r is declared even after undefining macros. */
+#undef HAVE_RAW_DECL_QSORT_R
+
/* Define to 1 if random is declared even after undefining macros. */
#undef HAVE_RAW_DECL_RANDOM
@@ -752,6 +1054,9 @@
/* Define to 1 if rawmemchr is declared even after undefining macros. */
#undef HAVE_RAW_DECL_RAWMEMCHR
+/* Define to 1 if readdir is declared even after undefining macros. */
+#undef HAVE_RAW_DECL_READDIR
+
/* Define to 1 if readlink is declared even after undefining macros. */
#undef HAVE_RAW_DECL_READLINK
@@ -764,12 +1069,21 @@
/* Define to 1 if renameat is declared even after undefining macros. */
#undef HAVE_RAW_DECL_RENAMEAT
+/* Define to 1 if rewinddir is declared even after undefining macros. */
+#undef HAVE_RAW_DECL_REWINDDIR
+
/* Define to 1 if rmdir is declared even after undefining macros. */
#undef HAVE_RAW_DECL_RMDIR
/* Define to 1 if rpmatch is declared even after undefining macros. */
#undef HAVE_RAW_DECL_RPMATCH
+/* Define to 1 if scandir is declared even after undefining macros. */
+#undef HAVE_RAW_DECL_SCANDIR
+
+/* Define to 1 if secure_getenv is declared even after undefining macros. */
+#undef HAVE_RAW_DECL_SECURE_GETENV
+
/* Define to 1 if setenv is declared even after undefining macros. */
#undef HAVE_RAW_DECL_SETENV
@@ -842,6 +1156,9 @@
/* Define to 1 if strtod is declared even after undefining macros. */
#undef HAVE_RAW_DECL_STRTOD
+/* Define to 1 if strtoimax is declared even after undefining macros. */
+#undef HAVE_RAW_DECL_STRTOIMAX
+
/* Define to 1 if strtok_r is declared even after undefining macros. */
#undef HAVE_RAW_DECL_STRTOK_R
@@ -851,6 +1168,9 @@
/* Define to 1 if strtoull is declared even after undefining macros. */
#undef HAVE_RAW_DECL_STRTOULL
+/* Define to 1 if strtoumax is declared even after undefining macros. */
+#undef HAVE_RAW_DECL_STRTOUMAX
+
/* Define to 1 if strverscmp is declared even after undefining macros. */
#undef HAVE_RAW_DECL_STRVERSCMP
@@ -1001,6 +1321,9 @@
/* Define to 1 if _Exit is declared even after undefining macros. */
#undef HAVE_RAW_DECL__EXIT
+/* Define to 1 if you have the `readdir' function. */
+#undef HAVE_READDIR
+
/* Define to 1 if you have the `readlink' function. */
#undef HAVE_READLINK
@@ -1010,12 +1333,24 @@
/* Define to 1 if you have the `realpath' function. */
#undef HAVE_REALPATH
+/* 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
/* Define to 1 if you have the <selinux/selinux.h> header file. */
#undef HAVE_SELINUX_SELINUX_H
+/* Define to 1 if you have the `setdtablesize' function. */
+#undef HAVE_SETDTABLESIZE
+
+/* Define to 1 if you have the `setenv' function. */
+#undef HAVE_SETENV
+
/* Define to 1 if you have the `setlocale' function. */
#undef HAVE_SETLOCALE
@@ -1034,19 +1369,26 @@
/* Define to 1 if you have the <stdint.h> header file. */
#undef HAVE_STDINT_H
+/* Define to 1 if you have the <stdio_ext.h> header file. */
+#undef HAVE_STDIO_EXT_H
+
/* Define to 1 if you have the <stdlib.h> header file. */
#undef HAVE_STDLIB_H
/* Define to 1 if you have the `strchr' function. */
#undef HAVE_STRCHR
+/* Define to 1 if you have the `strdup' function. */
+#undef HAVE_STRDUP
+
/* Define to 1 if you have the `strerror_r' function. */
#undef HAVE_STRERROR_R
/* Define to 1 if you have the <strings.h> header file. */
#undef HAVE_STRINGS_H
-/* Define to 1 if you have the <string.h> header file. */
+/* Always define to 1, for backward compatibility. You can assume <string.h>
+ exists. */
#undef HAVE_STRING_H
/* Define to 1 if you have the `strtoul' function. */
@@ -1094,12 +1436,24 @@
/* Define to 1 if you have the `towlower' function. */
#undef HAVE_TOWLOWER
+/* Define to 1 if you have the `tsearch' function. */
+#undef HAVE_TSEARCH
+
/* Define to 1 if you have the <unistd.h> header file. */
#undef HAVE_UNISTD_H
+/* Define to 1 if you have the `unsetenv' function. */
+#undef HAVE_UNSETENV
+
/* Define to 1 if the system has the type 'unsigned long long int'. */
#undef HAVE_UNSIGNED_LONG_LONG_INT
+/* Define to 1 if you have the `uselocale' function. */
+#undef HAVE_USELOCALE
+
+/* Define if you have a global __progname variable */
+#undef HAVE_VAR___PROGNAME
+
/* Define to 1 if you have the <wchar.h> header file. */
#undef HAVE_WCHAR_H
@@ -1109,9 +1463,6 @@
/* Define to 1 if you have the `wcrtomb' function. */
#undef HAVE_WCRTOMB
-/* Define to 1 if you have the `wcscoll' function. */
-#undef HAVE_WCSCOLL
-
/* Define to 1 if you have the `wctob' function. */
#undef HAVE_WCTOB
@@ -1136,15 +1487,43 @@
/* Define to 1 if the system has the type `_Bool'. */
#undef HAVE__BOOL
+/* Define to 1 if you have the `_fseeki64' function. */
+#undef HAVE__FSEEKI64
+
+/* 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
+/* Define to 1 if the compiler supports __builtin_expect,
+ and to 2 if <builtins.h> does. */
+#undef HAVE___BUILTIN_EXPECT
+#ifndef HAVE___BUILTIN_EXPECT
+# define __builtin_expect(e, c) (e)
+#elif HAVE___BUILTIN_EXPECT == 2
+# include <builtins.h>
+#endif
+
+
+/* Define to 1 if you have the `__fpurge' function. */
+#undef HAVE___FPURGE
+
+/* Define to 1 if you have the `__freading' function. */
+#undef HAVE___FREADING
+
/* 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 lseek does not detect pipes. */
+#undef LSEEK_PIPE_BROKEN
+
/* Define to 1 if 'lstat' dereferences a symlink specified with a trailing
slash. */
#undef LSTAT_FOLLOWS_SLASHED_SYMLINK
@@ -1155,6 +1534,10 @@
/* Define to a substitute value for mmap()'s MAP_ANONYMOUS flag. */
#undef MAP_ANONYMOUS
+/* Define if the mbrtowc function does not return (size_t) -2 for empty input.
+ */
+#undef MBRTOWC_EMPTY_INPUT_BUG
+
/* Define if the mbrtowc function has the NULL pwc argument bug. */
#undef MBRTOWC_NULL_ARG1_BUG
@@ -1167,6 +1550,18 @@
/* Define if the mbrtowc function returns a wrong return value. */
#undef MBRTOWC_RETVAL_BUG
+/* Use GNU style printf and scanf. */
+#ifndef __USE_MINGW_ANSI_STDIO
+# undef __USE_MINGW_ANSI_STDIO
+#endif
+
+
+/* Define to 1 if assertions should be disabled. */
+#undef NDEBUG
+
+/* Define to 1 if open() fails to recognize a trailing slash. */
+#undef OPEN_TRAILING_SLASH_BUG
+
/* Name of package */
#undef PACKAGE
@@ -1197,6 +1592,16 @@
/* Define to the version of this package. */
#undef PACKAGE_VERSION
+/* Define if <inttypes.h> exists and defines unusable PRI* macros. */
+#undef PRI_MACROS_BROKEN
+
+/* Define to the type that is the result of default argument promotions of
+ type mode_t. */
+#undef PROMOTED_MODE_T
+
+/* Define if the pthread_in_use() detection is hard. */
+#undef PTHREAD_IN_USE_DETECTION_HARD
+
/* Define to l, ll, u, ul, ull, etc., as suitable for constants of type
'ptrdiff_t'. */
#undef PTRDIFF_T_SUFFIX
@@ -1220,6 +1625,9 @@
such as on Solaris 9 or cygwin 1.5. */
#undef RENAME_TRAILING_SLASH_SOURCE_BUG
+/* 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
@@ -1234,10 +1642,6 @@
/* Define to 1 if strerror(0) does not return a message implying success. */
#undef REPLACE_STRERROR_0
-/* Define to the version of GNU sed whose features are supported by this sed.
- */
-#undef SED_FEATURE_VERSION
-
/* Define to l, ll, u, ul, ull, etc., as suitable for constants of type
'sig_atomic_t'. */
#undef SIG_ATOMIC_T_SUFFIX
@@ -1257,7 +1661,8 @@
/* Define to 1 if the `S_IS*' macros in <sys/stat.h> do not work properly. */
#undef STAT_MACROS_BROKEN
-/* Define to 1 if you have the ANSI C header files. */
+/* Always define to 1, for backward compatibility. You can assume the C90
+ standard headers exist. */
#undef STDC_HEADERS
/* Define to 1 if strerror_r returns char *. */
@@ -1266,14 +1671,101 @@
/* Define to nonzero if you want access control list support. */
#undef USE_ACL
+/* Define if the POSIX multithreading library can be used. */
+#undef USE_POSIX_THREADS
+
+/* Define if references to the POSIX multithreading library should be made
+ weak. */
+#undef USE_POSIX_THREADS_WEAK
+
+/* Define if the GNU Pth multithreading library can be used. */
+#undef USE_PTH_THREADS
+
+/* Define if references to the GNU Pth multithreading library should be made
+ weak. */
+#undef USE_PTH_THREADS_WEAK
+
+/* Define if the old Solaris multithreading library can be used. */
+#undef USE_SOLARIS_THREADS
+
+/* Define if references to the old Solaris multithreading library should be
+ made weak. */
+#undef USE_SOLARIS_THREADS_WEAK
+
+/* Enable extensions on AIX 3, Interix. */
+#ifndef _ALL_SOURCE
+# undef _ALL_SOURCE
+#endif
+/* Enable general extensions on macOS. */
+#ifndef _DARWIN_C_SOURCE
+# undef _DARWIN_C_SOURCE
+#endif
+/* Enable GNU extensions on systems that have them. */
+#ifndef _GNU_SOURCE
+# undef _GNU_SOURCE
+#endif
+/* Enable threading extensions on Solaris. */
+#ifndef _POSIX_PTHREAD_SEMANTICS
+# undef _POSIX_PTHREAD_SEMANTICS
+#endif
+/* Enable extensions specified by ISO/IEC TS 18661-5:2014. */
+#ifndef __STDC_WANT_IEC_60559_ATTRIBS_EXT__
+# undef __STDC_WANT_IEC_60559_ATTRIBS_EXT__
+#endif
+/* Enable extensions specified by ISO/IEC TS 18661-1:2014. */
+#ifndef __STDC_WANT_IEC_60559_BFP_EXT__
+# undef __STDC_WANT_IEC_60559_BFP_EXT__
+#endif
+/* Enable extensions specified by ISO/IEC TS 18661-2:2015. */
+#ifndef __STDC_WANT_IEC_60559_DFP_EXT__
+# undef __STDC_WANT_IEC_60559_DFP_EXT__
+#endif
+/* Enable extensions specified by ISO/IEC TS 18661-4:2015. */
+#ifndef __STDC_WANT_IEC_60559_FUNCS_EXT__
+# undef __STDC_WANT_IEC_60559_FUNCS_EXT__
+#endif
+/* Enable extensions specified by ISO/IEC TS 18661-3:2015. */
+#ifndef __STDC_WANT_IEC_60559_TYPES_EXT__
+# undef __STDC_WANT_IEC_60559_TYPES_EXT__
+#endif
+/* Enable extensions specified by ISO/IEC TR 24731-2:2010. */
+#ifndef __STDC_WANT_LIB_EXT2__
+# undef __STDC_WANT_LIB_EXT2__
+#endif
+/* Enable extensions specified by ISO/IEC 24747:2009. */
+#ifndef __STDC_WANT_MATH_SPEC_FUNCS__
+# undef __STDC_WANT_MATH_SPEC_FUNCS__
+#endif
+/* Enable extensions on HP NonStop. */
+#ifndef _TANDEM_SOURCE
+# undef _TANDEM_SOURCE
+#endif
+/* Enable X/Open extensions if necessary. HP-UX 11.11 defines
+ mbstate_t only if _XOPEN_SOURCE is defined to 500, regardless of
+ whether compiling with -Ae or -D_HPUX_SOURCE=1. */
+#ifndef _XOPEN_SOURCE
+# undef _XOPEN_SOURCE
+#endif
+/* Enable general extensions on Solaris. */
+#ifndef __EXTENSIONS__
+# undef __EXTENSIONS__
+#endif
+
+
/* Define to 1 if you want getc etc. to use unlocked I/O if available.
Unlocked I/O can improve performance in unithreaded apps, but it is not
safe for multithreaded apps. */
#undef USE_UNLOCKED_IO
+/* Define if the native Windows multithreading API can be used. */
+#undef USE_WINDOWS_THREADS
+
/* Version number of package */
#undef VERSION
+/* Define to 1 if unsetenv returns void instead of int. */
+#undef VOID_UNSETENV
+
/* Define to l, ll, u, ul, ull, etc., as suitable for constants of type
'wchar_t'. */
#undef WCHAR_T_SUFFIX
@@ -1282,10 +1774,8 @@
'wint_t'. */
#undef WINT_T_SUFFIX
-/* Enable large inode numbers on Mac OS X 10.5. */
-#ifndef _DARWIN_USE_64_BIT_INODE
-# define _DARWIN_USE_64_BIT_INODE 1
-#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
@@ -1294,6 +1784,9 @@
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
+
/* Define for large files, on AIX-style hosts. */
#undef _LARGE_FILES
@@ -1303,6 +1796,9 @@
/* Define to 1 if on MINIX. */
#undef _MINIX
+/* Define to 1 to make NetBSD features available. MINIX 3 needs this. */
+#undef _NETBSD_SOURCE
+
/* The _Noreturn keyword of C11. */
#if ! (defined _Noreturn \
|| (defined __STDC_VERSION__ && 201112 <= __STDC_VERSION__))
@@ -1334,76 +1830,93 @@
/* Include BSD functions in regex, used by the testsuite */
#undef _REGEX_RE_COMP
-/* Define to 500 only on HP-UX. */
-#undef _XOPEN_SOURCE
-
-/* Enable extensions on AIX 3, Interix. */
-#ifndef _ALL_SOURCE
-# undef _ALL_SOURCE
-#endif
-/* Enable general extensions on Mac OS X. */
-#ifndef _DARWIN_C_SOURCE
-# undef _DARWIN_C_SOURCE
-#endif
-/* Enable GNU extensions on systems that have them. */
-#ifndef _GNU_SOURCE
-# undef _GNU_SOURCE
-#endif
-/* Enable threading extensions on Solaris. */
-#ifndef _POSIX_PTHREAD_SEMANTICS
-# undef _POSIX_PTHREAD_SEMANTICS
-#endif
-/* Enable extensions on HP NonStop. */
-#ifndef _TANDEM_SOURCE
-# undef _TANDEM_SOURCE
-#endif
-/* Enable general extensions on Solaris. */
-#ifndef __EXTENSIONS__
-# undef __EXTENSIONS__
-#endif
-
-
/* Define to rpl_ if the getopt replacement functions and variables should be
used. */
#undef __GETOPT_PREFIX
+/* Define to 1 if the system <stdint.h> predates C++11. */
+#undef __STDC_CONSTANT_MACROS
+
+/* Define to 1 if the system <stdint.h> predates C++11. */
+#undef __STDC_LIMIT_MACROS
+
/* Define to empty if `const' does not conform to ANSI C. */
#undef const
-/* _GL_INLINE is a portable alternative to ISO C99 plain 'inline'.
- _GL_EXTERN_INLINE is a portable alternative to 'extern inline'.
- _GL_INLINE_HEADER_BEGIN contains useful stuff to put
- in an include file, before uses of _GL_INLINE.
- It suppresses GCC's bogus "no previous prototype for 'FOO'" diagnostic,
- when FOO is an inline function in the header; see
- <http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54113>.
- _GL_INLINE_HEADER_END contains useful stuff to put
- in the same include file, after uses of _GL_INLINE.
-
- Suppress the use of extern inline on Apple's platforms,
- as Libc-825.25 (2012-09-19) is incompatible with it; see
- <http://lists.gnu.org/archive/html/bug-gnulib/2012-12/msg00023.html>.
- Perhaps Apple will fix this some day. */
+/* 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>.
+
+ 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
+ (void) { } inline void g (void) { f (); }', c99 incorrectly complains
+ 'reference to static identifier "f" in extern inline function'.
+ This bug was observed with Sun C 5.12 SunOS_i386 2011/11/16.
+
+ Suppress extern inline (with or without __attribute__ ((__gnu_inline__)))
+ on configurations that mistakenly use 'static inline' to implement
+ functions or macros in standard C headers like <ctype.h>. For example,
+ if isdigit is mistakenly implemented via a static inline function,
+ a program containing an extern inline function that calls isdigit
+ may not work since the C standard prohibits extern inline functions
+ 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
+
+ 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
+
+ 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>.
+ Assume DragonFly and FreeBSD will be similar. */
+#if (((defined __APPLE__ && defined __MACH__) \
+ || defined __DragonFly__ || defined __FreeBSD__) \
+ && (defined __header_inline \
+ ? (defined __cplusplus && defined __GNUC_STDC_INLINE__ \
+ && ! defined __clang__) \
+ : ((! defined _DONT_USE_CTYPE_INLINE_ \
+ && (defined __GNUC__ || defined __cplusplus)) \
+ || (defined _FORTIFY_SOURCE && 0 < _FORTIFY_SOURCE \
+ && defined __GNUC__ && ! defined __cplusplus))))
+# define _GL_EXTERN_INLINE_STDHEADER_BUG
+#endif
#if ((__GNUC__ \
? defined __GNUC_STDC_INLINE__ && __GNUC_STDC_INLINE__ \
- : 199901L <= __STDC_VERSION__) \
- && !defined __APPLE__)
+ : (199901L <= __STDC_VERSION__ \
+ && !defined __HP_cc \
+ && !defined __PGI \
+ && !(defined __SUNPRO_C && __STDC__))) \
+ && !defined _GL_EXTERN_INLINE_STDHEADER_BUG)
# define _GL_INLINE inline
# define _GL_EXTERN_INLINE extern inline
-#elif 2 < __GNUC__ + (7 <= __GNUC_MINOR__) && !defined __APPLE__
-# if __GNUC_GNU_INLINE__
+# define _GL_EXTERN_INLINE_IN_USE
+#elif (2 < __GNUC__ + (7 <= __GNUC_MINOR__) && !defined __STRICT_ANSI__ \
+ && !defined _GL_EXTERN_INLINE_STDHEADER_BUG)
+# if defined __GNUC_GNU_INLINE__ && __GNUC_GNU_INLINE__
/* __gnu_inline__ suppresses a GCC 4.2 diagnostic. */
# define _GL_INLINE extern inline __attribute__ ((__gnu_inline__))
# else
# define _GL_INLINE extern inline
# endif
# define _GL_EXTERN_INLINE extern
+# define _GL_EXTERN_INLINE_IN_USE
#else
# define _GL_INLINE static _GL_UNUSED
# define _GL_EXTERN_INLINE static _GL_UNUSED
#endif
-#if 4 < __GNUC__ + (6 <= __GNUC_MINOR__)
+/* In GCC 4.6 (inclusive) to 5.1 (exclusive),
+ suppress bogus "no previous prototype for 'FOO'"
+ and "no previous declaration for 'FOO'" diagnostics,
+ when FOO is an inline function in the header; see
+ <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=54113> and
+ <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63877>. */
+#if __GNUC__ == 4 && 6 <= __GNUC_MINOR__
# if defined __GNUC_STDC_INLINE__ && __GNUC_STDC_INLINE__
# define _GL_INLINE_HEADER_CONST_PRAGMA
# else
@@ -1431,9 +1944,6 @@
/* A replacement for va_copy, if needed. */
#define gl_va_copy(a,b) ((a) = (b))
-/* Define to rpl_gmtime if the replacement function should be used. */
-#undef gmtime
-
/* Define to `__inline__' or `__inline' if that's what the C compiler
calls it, or to nothing if 'inline' is not supported under any name. */
#ifndef __cplusplus
@@ -1453,8 +1963,8 @@
/* Always use our lgetfilecon wrapper. */
#undef lgetfilecon
-/* Define to rpl_localtime if the replacement function should be used. */
-#undef localtime
+/* Define to 1 if the compiler is checking for lint. */
+#undef lint
/* Define to a type if <wchar.h> does not define. */
#undef mbstate_t
@@ -1545,6 +2055,16 @@
is a misnomer outside of parameter lists. */
#define _UNUSED_PARAMETER_ _GL_UNUSED
+/* gcc supports the "unused" attribute on possibly unused labels, and
+ g++ has since version 4.5. Note to support C++ as well as C,
+ _GL_UNUSED_LABEL should be used with a trailing ; */
+#if !defined __cplusplus || __GNUC__ > 4 \
+ || (__GNUC__ == 4 && __GNUC_MINOR__ >= 5)
+# define _GL_UNUSED_LABEL _GL_UNUSED
+#else
+# define _GL_UNUSED_LABEL
+#endif
+
/* The __pure__ attribute was added in gcc 2.96. */
#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 96)
# define _GL_ATTRIBUTE_PURE __attribute__ ((__pure__))
diff --git a/configure b/configure
index 6991ab4..c886aeb 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 for GNU sed 4.2.2.
+# Generated by GNU Autoconf 2.69.183-96821 for GNU sed 4.3.
#
# Report bugs to <bug-sed@gnu.org>.
#
#
-# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
+# Copyright (C) 1992-1996, 1998-2016 Free Software Foundation, Inc.
#
#
# This configure script is free software; the Free Software Foundation
@@ -16,7 +16,8 @@
# Be more Bourne compatible
DUALCASE=1; export DUALCASE # for MKS sh
-if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
+if test ${ZSH_VERSION+y} && (emulate sh) >/dev/null 2>&1
+then :
emulate sh
NULLCMD=:
# Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
@@ -33,46 +34,8 @@ esac
fi
-as_nl='
-'
-export as_nl
-# Printing a long string crashes Solaris 7 /usr/bin/printf.
-as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
-as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
-as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
-# Prefer a ksh shell builtin over an external printf program on Solaris,
-# but without wasting forks for bash or zsh.
-if test -z "$BASH_VERSION$ZSH_VERSION" \
- && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
- as_echo='print -r --'
- as_echo_n='print -rn --'
-elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
- as_echo='printf %s\n'
- as_echo_n='printf %s'
-else
- if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
- as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
- as_echo_n='/usr/ucb/echo -n'
- else
- as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
- as_echo_n_body='eval
- arg=$1;
- case $arg in #(
- *"$as_nl"*)
- expr "X$arg" : "X\\(.*\\)$as_nl";
- arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
- esac;
- expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
- '
- export as_echo_n_body
- as_echo_n='sh -c $as_echo_n_body as_echo'
- fi
- export as_echo_body
- as_echo='sh -c $as_echo_body as_echo'
-fi
-
# The user is always right.
-if test "${PATH_SEPARATOR+set}" != set; then
+if ${PATH_SEPARATOR+false} :; then
PATH_SEPARATOR=:
(PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
(PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
@@ -86,6 +49,9 @@ fi
# there to prevent editors from complaining about space-tab.
# (If _AS_PATH_WALK were called with IFS unset, it would disable word
# splitting by setting IFS to empty value.)
+as_nl='
+'
+export as_nl
IFS=" "" $as_nl"
# Find who we are. Look in the path if we contain no directory separator.
@@ -96,8 +62,12 @@ case $0 in #((
for as_dir in $PATH
do
IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
+ test -r "$as_dir$0" && as_myself=$as_dir$0 && break
done
IFS=$as_save_IFS
@@ -109,7 +79,7 @@ if test "x$as_myself" = x; then
as_myself=$0
fi
if test ! -f "$as_myself"; then
- $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
+ printf "%s\n" "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
exit 1
fi
@@ -118,7 +88,7 @@ fi
# suppresses any "Segmentation fault" message there. '((' could
# trigger a bug in pdksh 5.2.14.
for as_var in BASH_ENV ENV MAIL MAILPATH
-do eval test x\${$as_var+set} = xset \
+do eval test \${$as_var+y} \
&& ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
done
PS1='$ '
@@ -154,13 +124,14 @@ esac
exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
# Admittedly, this is quite paranoid, since all the known shells bail
# out after a failed `exec'.
-$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
+printf "%s\n" "$0: could not re-execute with $CONFIG_SHELL" >&2
as_fn_exit 255
fi
# We don't want this to propagate to other subprocesses.
{ _as_can_reexec=; unset _as_can_reexec;}
if test "x$CONFIG_SHELL" = x; then
- as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
+ as_bourne_compatible="if test \${ZSH_VERSION+y} && (emulate sh) >/dev/null 2>&1
+then :
emulate sh
NULLCMD=:
# Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
@@ -187,7 +158,8 @@ as_fn_success || { exitcode=1; echo as_fn_success failed.; }
as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
-if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
+if ( set x; as_fn_ret_success y && test x = \"\$1\" )
+then :
else
exitcode=1; echo positional parameters were not saved.
@@ -199,12 +171,14 @@ test -x / || exit 1"
eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
test \$(( 1 + 1 )) = 2 || exit 1"
- if (eval "$as_required") 2>/dev/null; then :
+ if (eval "$as_required") 2>/dev/null
+then :
as_have_required=yes
else
as_have_required=no
fi
- if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
+ if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null
+then :
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
@@ -212,17 +186,23 @@ as_found=false
for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
do
IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
as_found=:
case $as_dir in #(
/*)
for as_base in sh bash ksh sh5; do
# Try only shells that exist, to save several forks.
- as_shell=$as_dir/$as_base
+ as_shell=$as_dir$as_base
if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
- { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
+ { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null
+then :
CONFIG_SHELL=$as_shell as_have_required=yes
- if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
+ if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null
+then :
break 2
fi
fi
@@ -230,14 +210,16 @@ fi
esac
as_found=false
done
+IFS=$as_save_IFS
$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
- { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then :
+ { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null
+then :
CONFIG_SHELL=$SHELL as_have_required=yes
fi; }
-IFS=$as_save_IFS
- if test "x$CONFIG_SHELL" != x; then :
+ if test "x$CONFIG_SHELL" != x
+then :
export CONFIG_SHELL
# We cannot yet assume a decent shell, so we have to provide a
# neutralization value for shells without unset; and this also
@@ -255,18 +237,19 @@ esac
exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
# Admittedly, this is quite paranoid, since all the known shells bail
# out after a failed `exec'.
-$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
+printf "%s\n" "$0: could not re-execute with $CONFIG_SHELL" >&2
exit 255
fi
- if test x$as_have_required = xno; then :
- $as_echo "$0: This script requires a shell more modern than all"
- $as_echo "$0: the shells that I found on your system."
- if test x${ZSH_VERSION+set} = xset ; then
- $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
- $as_echo "$0: be upgraded to zsh 4.3.4 or later."
+ if test x$as_have_required = xno
+then :
+ printf "%s\n" "$0: This script requires a shell more modern than all"
+ printf "%s\n" "$0: the shells that I found on your system."
+ if test ${ZSH_VERSION+y} ; then
+ printf "%s\n" "$0: In particular, zsh $ZSH_VERSION has bugs and should"
+ printf "%s\n" "$0: be upgraded to zsh 4.3.4 or later."
else
- $as_echo "$0: Please tell bug-autoconf@gnu.org and bug-sed@gnu.org
+ printf "%s\n" "$0: Please tell bug-autoconf@gnu.org and bug-sed@gnu.org
$0: about your system, including any error possibly output
$0: before this message. Then install a modern shell, or
$0: manually run the script under such a shell if you do
@@ -325,7 +308,7 @@ as_fn_mkdir_p ()
as_dirs=
while :; do
case $as_dir in #(
- *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
+ *\'*) as_qdir=`printf "%s\n" "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
*) as_qdir=$as_dir;;
esac
as_dirs="'$as_qdir' $as_dirs"
@@ -334,7 +317,7 @@ $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
X"$as_dir" : 'X\(//\)[^/]' \| \
X"$as_dir" : 'X\(//\)$' \| \
X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
-$as_echo X"$as_dir" |
+printf "%s\n" X"$as_dir" |
sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
s//\1/
q
@@ -373,7 +356,8 @@ as_fn_executable_p ()
# advantage of any shell optimizations that allow amortized linear growth over
# repeated appends, instead of the typical quadratic growth present in naive
# implementations.
-if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
+if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null
+then :
eval 'as_fn_append ()
{
eval $1+=\$2
@@ -390,7 +374,8 @@ fi # as_fn_append
# Perform arithmetic evaluation on the ARGs, and store the result in the
# global $as_val. Take advantage of shells that can avoid forks. The arguments
# must be portable across $(()) and expr.
-if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
+if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null
+then :
eval 'as_fn_arith ()
{
as_val=$(( $* ))
@@ -413,9 +398,9 @@ as_fn_error ()
as_status=$1; test $as_status -eq 0 && as_status=1
if test "$4"; then
as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
- $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
fi
- $as_echo "$as_me: error: $2" >&2
+ printf "%s\n" "$as_me: error: $2" >&2
as_fn_exit $as_status
} # as_fn_error
@@ -442,7 +427,7 @@ as_me=`$as_basename -- "$0" ||
$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
X"$0" : 'X\(//\)$' \| \
X"$0" : 'X\(/\)' \| . 2>/dev/null ||
-$as_echo X/"$0" |
+printf "%s\n" X/"$0" |
sed '/^.*\/\([^/][^/]*\)\/*$/{
s//\1/
q
@@ -486,7 +471,7 @@ as_cr_alnum=$as_cr_Letters$as_cr_digits
s/-\n.*//
' >$as_me.lineno &&
chmod +x "$as_me.lineno" ||
- { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
+ { printf "%s\n" "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
# If we had to re-execute with $CONFIG_SHELL, we're ensured to have
# already done that, so ensure we don't try to do so again and fall
@@ -580,35 +565,24 @@ MAKEFLAGS=
# Identity of this package.
PACKAGE_NAME='GNU sed'
PACKAGE_TARNAME='sed'
-PACKAGE_VERSION='4.2.2'
-PACKAGE_STRING='GNU sed 4.2.2'
+PACKAGE_VERSION='4.3'
+PACKAGE_STRING='GNU sed 4.3'
PACKAGE_BUGREPORT='bug-sed@gnu.org'
PACKAGE_URL='http://www.gnu.org/software/sed/'
ac_unique_file="sed/sed.c"
# Factoring default headers for most tests.
ac_includes_default="\
+#include <stddef.h>
#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
#ifdef HAVE_SYS_TYPES_H
# include <sys/types.h>
#endif
#ifdef HAVE_SYS_STAT_H
# include <sys/stat.h>
#endif
-#ifdef STDC_HEADERS
-# include <stdlib.h>
-# include <stddef.h>
-#else
-# ifdef HAVE_STDLIB_H
-# include <stdlib.h>
-# endif
-#endif
-#ifdef HAVE_STRING_H
-# if !defined STDC_HEADERS && defined HAVE_MEMORY_H
-# include <memory.h>
-# endif
-# include <string.h>
-#endif
#ifdef HAVE_STRINGS_H
# include <strings.h>
#endif
@@ -622,27 +596,34 @@ ac_includes_default="\
# include <unistd.h>
#endif"
-ac_func_list=
-ac_header_list=
+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
gltests_LIBOBJS
gl_LTLIBOBJS
gl_LIBOBJS
+CONFIG_INCLUDE
am__EXEEXT_FALSE
am__EXEEXT_TRUE
LTLIBOBJS
LIBOBJS
+GNULIB_TEST_WARN_CFLAGS
+WARN_CFLAGS
+WERROR_CFLAGS
XFAIL_TESTS
TEST_REGEX_FALSE
TEST_REGEX_TRUE
+TEST_SYMLINKS_FALSE
+TEST_SYMLINKS_TRUE
POSUB
INTLLIBS
LTLIBICONV
LIBICONV
-INTL_MACOSX_LIBS
XGETTEXT_EXTRA_OPTIONS
MSGMERGE
XGETTEXT_015
@@ -653,8 +634,55 @@ GMSGFMT
MSGFMT
GETTEXT_MACRO_VERSION
USE_NLS
+LIBTESTS_LIBDEPS
LIBSED_LTLIBDEPS
LIBSED_LIBDEPS
+abs_aux_dir
+INTL_MACOSX_LIBS
+NEXT_AS_FIRST_DIRECTIVE_INTTYPES_H
+NEXT_INTTYPES_H
+UINT64_MAX_EQ_ULONG_MAX
+UINT32_MAX_LT_UINTMAX_MAX
+PRIPTR_PREFIX
+PRI_MACROS_BROKEN
+INT64_MAX_EQ_LONG_MAX
+INT32_MAX_LT_INTMAX_MAX
+REPLACE_STRTOUMAX
+REPLACE_STRTOIMAX
+HAVE_DECL_STRTOUMAX
+HAVE_DECL_STRTOIMAX
+HAVE_DECL_IMAXDIV
+HAVE_DECL_IMAXABS
+GNULIB_STRTOUMAX
+GNULIB_STRTOIMAX
+GNULIB_IMAXDIV
+GNULIB_IMAXABS
+LIB_HAS_ACL
+HAVE_DIRENT_H
+NEXT_AS_FIRST_DIRECTIVE_DIRENT_H
+NEXT_DIRENT_H
+REPLACE_FDOPENDIR
+REPLACE_DIRFD
+REPLACE_CLOSEDIR
+REPLACE_OPENDIR
+HAVE_ALPHASORT
+HAVE_SCANDIR
+HAVE_FDOPENDIR
+HAVE_DECL_FDOPENDIR
+HAVE_DECL_DIRFD
+HAVE_CLOSEDIR
+HAVE_REWINDDIR
+HAVE_READDIR
+HAVE_OPENDIR
+GNULIB_ALPHASORT
+GNULIB_SCANDIR
+GNULIB_FDOPENDIR
+GNULIB_DIRFD
+GNULIB_CLOSEDIR
+GNULIB_REWINDDIR
+GNULIB_READDIR
+GNULIB_OPENDIR
+LOCALE_TR_UTF8
gltests_WITNESS
REPLACE_TOWLOWER
REPLACE_ISWCNTRL
@@ -678,11 +706,14 @@ NEXT_WCHAR_H
HAVE_UNISTD_H
NEXT_AS_FIRST_DIRECTIVE_UNISTD_H
NEXT_UNISTD_H
+UNISTD_H_DEFINES_STRUCT_TIMESPEC
PTHREAD_H_DEFINES_STRUCT_TIMESPEC
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
@@ -691,6 +722,7 @@ HAVE_TIMEGM
HAVE_STRPTIME
HAVE_NANOSLEEP
HAVE_DECL_LOCALTIME_R
+GNULIB_TIME_RZ
GNULIB_TIME_R
GNULIB_TIMEGM
GNULIB_STRPTIME
@@ -708,6 +740,9 @@ NEXT_STDIO_H
GL_GENERATE_STDINT_H_FALSE
GL_GENERATE_STDINT_H_TRUE
STDINT_H
+HAVE_SYS_INTTYPES_H
+HAVE_SYS_BITYPES_H
+HAVE_C99_STDINT_H
WINT_T_SUFFIX
WCHAR_T_SUFFIX
SIG_ATOMIC_T_SUFFIX
@@ -721,8 +756,6 @@ BITSIZEOF_WCHAR_T
BITSIZEOF_SIG_ATOMIC_T
BITSIZEOF_SIZE_T
BITSIZEOF_PTRDIFF_T
-HAVE_SYS_BITYPES_H
-HAVE_SYS_INTTYPES_H
HAVE_STDINT_H
NEXT_AS_FIRST_DIRECTIVE_STDINT_H
NEXT_STDINT_H
@@ -731,6 +764,7 @@ HAVE_INTTYPES_H
HAVE_WCHAR_H
HAVE_UNSIGNED_LONG_LONG_INT
HAVE_LONG_LONG_INT
+GNULIB_OVERRIDES_WINT_T
HAVE__BOOL
GL_GENERATE_STDBOOL_H_FALSE
GL_GENERATE_STDBOOL_H_TRUE
@@ -740,6 +774,9 @@ GL_GENERATE_STDARG_H_TRUE
STDARG_H
NEXT_AS_FIRST_DIRECTIVE_STDARG_H
NEXT_STDARG_H
+GL_GENERATE_STDALIGN_H_FALSE
+GL_GENERATE_STDALIGN_H_TRUE
+STDALIGN_H
GL_GENERATE_SELINUX_CONTEXT_H_FALSE
GL_GENERATE_SELINUX_CONTEXT_H_TRUE
SELINUX_CONTEXT_H
@@ -823,6 +860,14 @@ GNULIB_FFSL
LOCALE_FR_UTF8
LOCALE_ZH_CN
LOCALE_JA
+SED
+LTLIBMULTITHREAD
+LIBMULTITHREAD
+LTLIBTHREAD
+LIBTHREAD
+LIBPTH_PREFIX
+LTLIBPTH
+LIBPTH
NEXT_AS_FIRST_DIRECTIVE_LOCALE_H
NEXT_LOCALE_H
HAVE_XLOCALE_H
@@ -832,6 +877,7 @@ GL_GENERATE_STDDEF_H_FALSE
GL_GENERATE_STDDEF_H_TRUE
STDDEF_H
HAVE_WCHAR_T
+HAVE_MAX_ALIGN_T
REPLACE_NULL
REPLACE_STRUCT_LCONV
REPLACE_DUPLOCALE
@@ -843,6 +889,11 @@ GNULIB_SETLOCALE
GNULIB_LOCALECONV
LOCALCHARSET_TESTS_ENVIRONMENT
GLIBC21
+GL_GENERATE_LIMITS_H_FALSE
+GL_GENERATE_LIMITS_H_TRUE
+LIMITS_H
+NEXT_AS_FIRST_DIRECTIVE_LIMITS_H
+NEXT_LIMITS_H
HAVE_LANGINFO_YESEXPR
HAVE_LANGINFO_ERA
HAVE_LANGINFO_T_FMT_AMPM
@@ -858,6 +909,7 @@ 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
@@ -1029,10 +1081,14 @@ GL_GENERATE_ERRNO_H_TRUE
ERRNO_H
NEXT_AS_FIRST_DIRECTIVE_ERRNO_H
NEXT_ERRNO_H
+NEXT_AS_FIRST_DIRECTIVE_CTYPE_H
+NEXT_CTYPE_H
PRAGMA_COLUMNS
PRAGMA_SYSTEM_HEADER
INCLUDE_NEXT_AS_FIRST_DIRECTIVE
INCLUDE_NEXT
+HAVE_ISBLANK
+GNULIB_ISBLANK
pkglibexecdir
lispdir
UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS
@@ -1042,9 +1098,11 @@ REPLACE_USLEEP
REPLACE_UNLINKAT
REPLACE_UNLINK
REPLACE_TTYNAME_R
+REPLACE_SYMLINKAT
REPLACE_SYMLINK
REPLACE_SLEEP
REPLACE_RMDIR
+REPLACE_READLINKAT
REPLACE_READLINK
REPLACE_READ
REPLACE_PWRITE
@@ -1057,6 +1115,7 @@ REPLACE_ISATTY
REPLACE_GETPAGESIZE
REPLACE_GETGROUPS
REPLACE_GETLOGIN_R
+REPLACE_GETDTABLESIZE
REPLACE_GETDOMAINNAME
REPLACE_GETCWD
REPLACE_FTRUNCATE
@@ -1072,6 +1131,7 @@ HAVE_DECL_SETHOSTNAME
HAVE_DECL_GETUSERSHELL
HAVE_DECL_GETPAGESIZE
HAVE_DECL_GETLOGIN_R
+HAVE_DECL_GETLOGIN
HAVE_DECL_GETDOMAINNAME
HAVE_DECL_FDATASYNC
HAVE_DECL_FCHDIR
@@ -1162,6 +1222,7 @@ REPLACE_SETENV
REPLACE_REALPATH
REPLACE_REALLOC
REPLACE_RANDOM_R
+REPLACE_QSORT_R
REPLACE_PUTENV
REPLACE_PTSNAME_R
REPLACE_PTSNAME
@@ -1179,11 +1240,13 @@ HAVE_STRTOLL
HAVE_STRTOD
HAVE_DECL_SETENV
HAVE_SETENV
+HAVE_SECURE_GETENV
HAVE_RPMATCH
HAVE_REALPATH
HAVE_RANDOM_R
HAVE_RANDOM_H
HAVE_RANDOM
+HAVE_QSORT_R
HAVE_PTSNAME_R
HAVE_PTSNAME
HAVE_POSIX_OPENPT
@@ -1206,11 +1269,13 @@ GNULIB_STRTOULL
GNULIB_STRTOLL
GNULIB_STRTOD
GNULIB_SETENV
+GNULIB_SECURE_GETENV
GNULIB_RPMATCH
GNULIB_REALPATH
GNULIB_REALLOC_POSIX
GNULIB_RANDOM_R
GNULIB_RANDOM
+GNULIB_QSORT_R
GNULIB_PUTENV
GNULIB_PTSNAME_R
GNULIB_PTSNAME
@@ -1339,6 +1404,7 @@ build_cpu
build
RANLIB
ARFLAGS
+ac_ct_AR
AR
EGREP
GREP
@@ -1350,7 +1416,6 @@ am__nodep
AMDEPBACKSLASH
AMDEP_FALSE
AMDEP_TRUE
-am__quote
am__include
DEPDIR
OBJEXT
@@ -1360,15 +1425,15 @@ CPPFLAGS
LDFLAGS
CFLAGS
CC
-COPYRIGHT_YEAR
-SED_FEATURE_VERSION
+AM_BACKSLASH
+AM_DEFAULT_VERBOSITY
+AM_DEFAULT_V
+AM_V
am__untar
am__tar
AMTAR
-am__leading_dot
SET_MAKE
AWK
-mkdir_p
MKDIR_P
INSTALL_STRIP_PROGRAM
STRIP
@@ -1385,6 +1450,7 @@ am__isrc
INSTALL_DATA
INSTALL_SCRIPT
INSTALL_PROGRAM
+mkdir_p
target_alias
host_alias
build_alias
@@ -1404,6 +1470,7 @@ infodir
docdir
oldincludedir
includedir
+runstatedir
localstatedir
sharedstatedir
sysconfdir
@@ -1422,25 +1489,31 @@ PACKAGE_VERSION
PACKAGE_TARNAME
PACKAGE_NAME
PATH_SEPARATOR
-SHELL'
+SHELL
+am__quote'
ac_subst_files=''
ac_user_opts='
enable_option_checking
+enable_silent_rules
enable_dependency_tracking
enable_largefile
+enable_threads
enable_acl
+enable_assert
+with_gnu_ld
+enable_rpath
+with_libpth_prefix
with_included_regex
with_selinux
with_packager
with_packager_version
with_packager_bug_reports
enable_nls
-with_gnu_ld
-enable_rpath
with_libiconv_prefix
with_libintl_prefix
enable_i18n
enable_regex_tests
+enable_gcc_warnings
'
ac_precious_vars='build_alias
host_alias
@@ -1489,6 +1562,7 @@ datadir='${datarootdir}'
sysconfdir='${prefix}/etc'
sharedstatedir='${prefix}/com'
localstatedir='${prefix}/var'
+runstatedir='${localstatedir}/run'
includedir='${prefix}/include'
oldincludedir='/usr/include'
docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
@@ -1560,9 +1634,9 @@ do
ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
# Reject names that are not valid shell variable names.
expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
- as_fn_error $? "invalid feature name: $ac_useropt"
+ as_fn_error $? "invalid feature name: \`$ac_useropt'"
ac_useropt_orig=$ac_useropt
- ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
+ ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'`
case $ac_user_opts in
*"
"enable_$ac_useropt"
@@ -1586,9 +1660,9 @@ do
ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
# Reject names that are not valid shell variable names.
expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
- as_fn_error $? "invalid feature name: $ac_useropt"
+ as_fn_error $? "invalid feature name: \`$ac_useropt'"
ac_useropt_orig=$ac_useropt
- ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
+ ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'`
case $ac_user_opts in
*"
"enable_$ac_useropt"
@@ -1741,6 +1815,15 @@ do
| -silent | --silent | --silen | --sile | --sil)
silent=yes ;;
+ -runstatedir | --runstatedir | --runstatedi | --runstated \
+ | --runstate | --runstat | --runsta | --runst | --runs \
+ | --run | --ru | --r)
+ ac_prev=runstatedir ;;
+ -runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \
+ | --runstate=* | --runstat=* | --runsta=* | --runst=* | --runs=* \
+ | --run=* | --ru=* | --r=*)
+ runstatedir=$ac_optarg ;;
+
-sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
ac_prev=sbindir ;;
-sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
@@ -1790,9 +1873,9 @@ do
ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
# Reject names that are not valid shell variable names.
expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
- as_fn_error $? "invalid package name: $ac_useropt"
+ as_fn_error $? "invalid package name: \`$ac_useropt'"
ac_useropt_orig=$ac_useropt
- ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
+ ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'`
case $ac_user_opts in
*"
"with_$ac_useropt"
@@ -1806,9 +1889,9 @@ do
ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
# Reject names that are not valid shell variable names.
expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
- as_fn_error $? "invalid package name: $ac_useropt"
+ as_fn_error $? "invalid package name: \`$ac_useropt'"
ac_useropt_orig=$ac_useropt
- ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
+ ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'`
case $ac_user_opts in
*"
"with_$ac_useropt"
@@ -1852,9 +1935,9 @@ Try \`$0 --help' for more information"
*)
# FIXME: should be removed in autoconf 3.0.
- $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
+ printf "%s\n" "$as_me: WARNING: you should use --build, --host, --target" >&2
expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
- $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
+ printf "%s\n" "$as_me: WARNING: invalid host type: $ac_option" >&2
: "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
;;
@@ -1870,7 +1953,7 @@ if test -n "$ac_unrecognized_opts"; then
case $enable_option_checking in
no) ;;
fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
- *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
+ *) printf "%s\n" "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
esac
fi
@@ -1878,7 +1961,7 @@ fi
for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
datadir sysconfdir sharedstatedir localstatedir includedir \
oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
- libdir localedir mandir
+ libdir localedir mandir runstatedir
do
eval ac_val=\$$ac_var
# Remove trailing slashes.
@@ -1934,7 +2017,7 @@ $as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
X"$as_myself" : 'X\(//\)[^/]' \| \
X"$as_myself" : 'X\(//\)$' \| \
X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
-$as_echo X"$as_myself" |
+printf "%s\n" X"$as_myself" |
sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
s//\1/
q
@@ -1991,7 +2074,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.2.2 to adapt to many kinds of systems.
+\`configure' configures GNU sed 4.3 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -2031,6 +2114,7 @@ Fine tuning of the installation directories:
--sysconfdir=DIR read-only single-machine data [PREFIX/etc]
--sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
--localstatedir=DIR modifiable single-machine data [PREFIX/var]
+ --runstatedir=DIR modifiable per-process data [LOCALSTATEDIR/run]
--libdir=DIR object code libraries [EPREFIX/lib]
--includedir=DIR C header files [PREFIX/include]
--oldincludedir=DIR C header files for non-gcc [/usr/include]
@@ -2061,7 +2145,7 @@ fi
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of GNU sed 4.2.2:";;
+ short | recursive ) echo "Configuration of GNU sed 4.3:";;
esac
cat <<\_ACEOF
@@ -2069,20 +2153,31 @@ Optional Features:
--disable-option-checking ignore unrecognized --enable/--with options
--disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
--enable-FEATURE[=ARG] include FEATURE [ARG=yes]
+ --enable-silent-rules less verbose build output (undo: "make V=1")
+ --disable-silent-rules verbose build output (undo: "make V=0")
--enable-dependency-tracking
do not reject slow dependency extractors
--disable-dependency-tracking
speeds up one-time build
--disable-largefile omit support for large files
+ --enable-threads={posix|solaris|pth|windows}
+ specify multithreading API
+ --disable-threads build without multithread safety
--disable-acl do not support ACLs
- --disable-nls do not use Native Language Support
+ --disable-assert turn off assertions
--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)
Optional Packages:
--with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
--without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
+ --with-gnu-ld assume the C compiler uses GNU ld [default=no]
+ --with-libpth-prefix[=DIR] search for libpth in DIR/include and DIR/lib
+ --without-libpth-prefix don't search for libpth in includedir and libdir
--without-included-regex
don't compile regex; this is the default on systems
with recent-enough versions of the GNU C Library
@@ -2092,7 +2187,6 @@ Optional Packages:
--with-packager-version Packager-specific version information
--with-packager-bug-reports
Packager info for bug reports (URL/e-mail/...)
- --with-gnu-ld assume the C compiler uses GNU ld default=no
--with-libiconv-prefix[=DIR] search for libiconv in DIR/include and DIR/lib
--without-libiconv-prefix don't search for libiconv in includedir and libdir
--with-libintl-prefix[=DIR] search for libintl in DIR/include and DIR/lib
@@ -2129,9 +2223,9 @@ if test "$ac_init_help" = "recursive"; then
case "$ac_dir" in
.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
*)
- ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
+ ac_dir_suffix=/`printf "%s\n" "$ac_dir" | sed 's|^\.[\\/]||'`
# A ".." for each directory in $ac_dir_suffix.
- ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
+ ac_top_builddir_sub=`printf "%s\n" "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
case $ac_top_builddir_sub in
"") ac_top_builddir_sub=. ac_top_build_prefix= ;;
*) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
@@ -2167,7 +2261,7 @@ ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
echo &&
$SHELL "$ac_srcdir/configure" --help=recursive
else
- $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
+ printf "%s\n" "$as_me: WARNING: no configuration information is in $ac_dir" >&2
fi || ac_status=$?
cd "$ac_pwd" || { ac_status=$?; break; }
done
@@ -2176,10 +2270,10 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-GNU sed configure 4.2.2
-generated by GNU Autoconf 2.69
+GNU sed configure 4.3
+generated by GNU Autoconf 2.69.183-96821
-Copyright (C) 2012 Free Software Foundation, Inc.
+Copyright (C) 2016 Free Software Foundation, Inc.
This configure script is free software; the Free Software Foundation
gives unlimited permission to copy, distribute and modify it.
_ACEOF
@@ -2203,7 +2297,7 @@ case "(($ac_try" in
*) ac_try_echo=$ac_try;;
esac
eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
-$as_echo "$ac_try_echo"; } >&5
+printf "%s\n" "$ac_try_echo"; } >&5
(eval "$ac_compile") 2>conftest.err
ac_status=$?
if test -s conftest.err; then
@@ -2211,14 +2305,15 @@ $as_echo "$ac_try_echo"; } >&5
cat conftest.er1 >&5
mv -f conftest.er1 conftest.err
fi
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
test $ac_status = 0; } && {
test -z "$ac_c_werror_flag" ||
test ! -s conftest.err
- } && test -s conftest.$ac_objext; then :
+ } && test -s conftest.$ac_objext
+then :
ac_retval=0
else
- $as_echo "$as_me: failed program was:" >&5
+ printf "%s\n" "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
ac_retval=1
@@ -2228,206 +2323,76 @@ fi
} # ac_fn_c_try_compile
-# ac_fn_c_try_cpp LINENO
-# ----------------------
-# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
-ac_fn_c_try_cpp ()
-{
- as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
- if { { ac_try="$ac_cpp conftest.$ac_ext"
-case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
-$as_echo "$ac_try_echo"; } >&5
- (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
- ac_status=$?
- if test -s conftest.err; then
- grep -v '^ *+' conftest.err >conftest.er1
- cat conftest.er1 >&5
- mv -f conftest.er1 conftest.err
- fi
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; } > conftest.i && {
- test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
- test ! -s conftest.err
- }; then :
- ac_retval=0
-else
- $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
- ac_retval=1
-fi
- eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
- as_fn_set_status $ac_retval
-
-} # ac_fn_c_try_cpp
-
-# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
+# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
# -------------------------------------------------------
-# Tests whether HEADER exists, giving a warning if it cannot be compiled using
-# the include files in INCLUDES and setting the cache variable VAR
-# accordingly.
-ac_fn_c_check_header_mongrel ()
+# Tests whether HEADER exists and can be compiled using the include files in
+# INCLUDES, setting the cache variable VAR accordingly.
+ac_fn_c_check_header_compile ()
{
as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
- if eval \${$3+:} false; then :
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
-$as_echo_n "checking for $2... " >&6; }
-if eval \${$3+:} false; then :
- $as_echo_n "(cached) " >&6
-fi
-eval ac_res=\$$3
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
-$as_echo "$ac_res" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
+printf %s "checking for $2... " >&6; }
+if eval test \${$3+y}
+then :
+ printf %s "(cached) " >&6
else
- # Is the header compilable?
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
-$as_echo_n "checking $2 usability... " >&6; }
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
$4
#include <$2>
_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
- ac_header_compiler=yes
+if ac_fn_c_try_compile "$LINENO"
+then :
+ eval "$3=yes"
else
- ac_header_compiler=no
+ eval "$3=no"
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
-$as_echo "$ac_header_compiler" >&6; }
-
-# Is the header present?
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
-$as_echo_n "checking $2 presence... " >&6; }
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-#include <$2>
-_ACEOF
-if ac_fn_c_try_cpp "$LINENO"; then :
- ac_header_preproc=yes
-else
- ac_header_preproc=no
-fi
-rm -f conftest.err conftest.i conftest.$ac_ext
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
-$as_echo "$ac_header_preproc" >&6; }
-
-# So? What about this header?
-case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
- yes:no: )
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
-$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
-$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
- ;;
- no:yes:* )
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
-$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
-$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
-$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
-$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
-$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
-( $as_echo "## ------------------------------ ##
-## Report this to bug-sed@gnu.org ##
-## ------------------------------ ##"
- ) | sed "s/^/$as_me: WARNING: /" >&2
- ;;
-esac
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
-$as_echo_n "checking for $2... " >&6; }
-if eval \${$3+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- eval "$3=\$ac_header_compiler"
fi
eval ac_res=\$$3
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
-$as_echo "$ac_res" >&6; }
-fi
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+printf "%s\n" "$ac_res" >&6; }
eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
-} # ac_fn_c_check_header_mongrel
+} # ac_fn_c_check_header_compile
-# ac_fn_c_try_run LINENO
+# ac_fn_c_try_cpp LINENO
# ----------------------
-# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
-# that executables *can* be run.
-ac_fn_c_try_run ()
+# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
+ac_fn_c_try_cpp ()
{
as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
- if { { ac_try="$ac_link"
+ if { { ac_try="$ac_cpp conftest.$ac_ext"
case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
-$as_echo "$ac_try_echo"; } >&5
- (eval "$ac_link") 2>&5
- ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
- { { case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
-$as_echo "$ac_try_echo"; } >&5
- (eval "$ac_try") 2>&5
+printf "%s\n" "$ac_try_echo"; } >&5
+ (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; }; }; then :
+ if test -s conftest.err; then
+ grep -v '^ *+' conftest.err >conftest.er1
+ cat conftest.er1 >&5
+ mv -f conftest.er1 conftest.err
+ fi
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; } > conftest.i && {
+ test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ }
+then :
ac_retval=0
else
- $as_echo "$as_me: program exited with status $ac_status" >&5
- $as_echo "$as_me: failed program was:" >&5
+ printf "%s\n" "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
- ac_retval=$ac_status
+ ac_retval=1
fi
- rm -rf conftest.dSYM conftest_ipa8_conftest.oo
eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
as_fn_set_status $ac_retval
-} # ac_fn_c_try_run
-
-# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
-# -------------------------------------------------------
-# Tests whether HEADER exists and can be compiled using the include files in
-# INCLUDES, setting the cache variable VAR accordingly.
-ac_fn_c_check_header_compile ()
-{
- as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
-$as_echo_n "checking for $2... " >&6; }
-if eval \${$3+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-$4
-#include <$2>
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
- eval "$3=yes"
-else
- eval "$3=no"
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-eval ac_res=\$$3
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
-$as_echo "$ac_res" >&6; }
- eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
-
-} # ac_fn_c_check_header_compile
+} # ac_fn_c_try_cpp
# ac_fn_c_try_link LINENO
# -----------------------
@@ -2442,7 +2407,7 @@ case "(($ac_try" in
*) ac_try_echo=$ac_try;;
esac
eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
-$as_echo "$ac_try_echo"; } >&5
+printf "%s\n" "$ac_try_echo"; } >&5
(eval "$ac_link") 2>conftest.err
ac_status=$?
if test -s conftest.err; then
@@ -2450,17 +2415,18 @@ $as_echo "$ac_try_echo"; } >&5
cat conftest.er1 >&5
mv -f conftest.er1 conftest.err
fi
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
test $ac_status = 0; } && {
test -z "$ac_c_werror_flag" ||
test ! -s conftest.err
} && test -s conftest$ac_exeext && {
test "$cross_compiling" = yes ||
test -x conftest$ac_exeext
- }; then :
+ }
+then :
ac_retval=0
else
- $as_echo "$as_me: failed program was:" >&5
+ printf "%s\n" "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
ac_retval=1
@@ -2481,10 +2447,11 @@ fi
ac_fn_c_check_func ()
{
as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
-$as_echo_n "checking for $2... " >&6; }
-if eval \${$3+:} false; then :
- $as_echo_n "(cached) " >&6
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
+printf %s "checking for $2... " >&6; }
+if eval test \${$3+y}
+then :
+ printf %s "(cached) " >&6
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -2493,16 +2460,9 @@ else
#define $2 innocuous_$2
/* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char $2 (); below.
- Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
- <limits.h> exists even on freestanding compilers. */
-
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
+ which can conflict with char $2 (); below. */
+#include <limits.h>
#undef $2
/* Override any GCC internal prototype to avoid an error.
@@ -2520,14 +2480,15 @@ choke me
#endif
int
-main ()
+main (void)
{
return $2 ();
;
return 0;
}
_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
+if ac_fn_c_try_link "$LINENO"
+then :
eval "$3=yes"
else
eval "$3=no"
@@ -2536,8 +2497,8 @@ rm -f core conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
fi
eval ac_res=\$$3
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
-$as_echo "$ac_res" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+printf "%s\n" "$ac_res" >&6; }
eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
} # ac_fn_c_check_func
@@ -2549,17 +2510,18 @@ $as_echo "$ac_res" >&6; }
ac_fn_c_check_type ()
{
as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
-$as_echo_n "checking for $2... " >&6; }
-if eval \${$3+:} false; then :
- $as_echo_n "(cached) " >&6
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
+printf %s "checking for $2... " >&6; }
+if eval test \${$3+y}
+then :
+ printf %s "(cached) " >&6
else
eval "$3=no"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
$4
int
-main ()
+main (void)
{
if (sizeof ($2))
return 0;
@@ -2567,12 +2529,13 @@ if (sizeof ($2))
return 0;
}
_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_c_try_compile "$LINENO"
+then :
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
$4
int
-main ()
+main (void)
{
if (sizeof (($2)))
return 0;
@@ -2580,7 +2543,8 @@ if (sizeof (($2)))
return 0;
}
_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_c_try_compile "$LINENO"
+then :
else
eval "$3=yes"
@@ -2590,12 +2554,55 @@ fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
eval ac_res=\$$3
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
-$as_echo "$ac_res" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+printf "%s\n" "$ac_res" >&6; }
eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
} # ac_fn_c_check_type
+# ac_fn_c_try_run LINENO
+# ----------------------
+# Try to run conftest.$ac_ext, and return whether this succeeded. Assumes that
+# executables *can* be run.
+ac_fn_c_try_run ()
+{
+ as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+ if { { ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+printf "%s\n" "$ac_try_echo"; } >&5
+ (eval "$ac_link") 2>&5
+ ac_status=$?
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
+ { { case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+printf "%s\n" "$ac_try_echo"; } >&5
+ (eval "$ac_try") 2>&5
+ ac_status=$?
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; }
+then :
+ ac_retval=0
+else
+ printf "%s\n" "$as_me: program exited with status $ac_status" >&5
+ printf "%s\n" "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_retval=$ac_status
+fi
+ rm -rf conftest.dSYM conftest_ipa8_conftest.oo
+ eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
+ as_fn_set_status $ac_retval
+
+} # ac_fn_c_try_run
+
# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
# --------------------------------------------
# Tries to find the compile-time value of EXPR in a program that includes
@@ -2610,7 +2617,7 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
$4
int
-main ()
+main (void)
{
static int test_array [1 - 2 * !(($2) >= 0)];
test_array [0] = 0;
@@ -2620,14 +2627,15 @@ return test_array [0];
return 0;
}
_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_c_try_compile "$LINENO"
+then :
ac_lo=0 ac_mid=0
while :; do
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
$4
int
-main ()
+main (void)
{
static int test_array [1 - 2 * !(($2) <= $ac_mid)];
test_array [0] = 0;
@@ -2637,7 +2645,8 @@ return test_array [0];
return 0;
}
_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_c_try_compile "$LINENO"
+then :
ac_hi=$ac_mid; break
else
as_fn_arith $ac_mid + 1 && ac_lo=$as_val
@@ -2654,7 +2663,7 @@ else
/* end confdefs.h. */
$4
int
-main ()
+main (void)
{
static int test_array [1 - 2 * !(($2) < 0)];
test_array [0] = 0;
@@ -2664,14 +2673,15 @@ return test_array [0];
return 0;
}
_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_c_try_compile "$LINENO"
+then :
ac_hi=-1 ac_mid=-1
while :; do
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
$4
int
-main ()
+main (void)
{
static int test_array [1 - 2 * !(($2) >= $ac_mid)];
test_array [0] = 0;
@@ -2681,7 +2691,8 @@ return test_array [0];
return 0;
}
_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_c_try_compile "$LINENO"
+then :
ac_lo=$ac_mid; break
else
as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
@@ -2706,7 +2717,7 @@ while test "x$ac_lo" != "x$ac_hi"; do
/* end confdefs.h. */
$4
int
-main ()
+main (void)
{
static int test_array [1 - 2 * !(($2) <= $ac_mid)];
test_array [0] = 0;
@@ -2716,7 +2727,8 @@ return test_array [0];
return 0;
}
_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_c_try_compile "$LINENO"
+then :
ac_hi=$ac_mid
else
as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
@@ -2736,7 +2748,7 @@ static unsigned long int ulongval () { return $2; }
#include <stdio.h>
#include <stdlib.h>
int
-main ()
+main (void)
{
FILE *f = fopen ("conftest.val", "w");
@@ -2764,7 +2776,8 @@ main ()
return 0;
}
_ACEOF
-if ac_fn_c_try_run "$LINENO"; then :
+if ac_fn_c_try_run "$LINENO"
+then :
echo >>conftest.val; read $3 <conftest.val; ac_retval=0
else
ac_retval=1
@@ -2786,18 +2799,22 @@ rm -f conftest.val
ac_fn_c_check_decl ()
{
as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
- as_decl_name=`echo $2|sed 's/ *(.*//'`
+ # Initialize each $ac_[]_AC_LANG_ABBREV[]_decl_warn_flag once.
+ as_decl_name=`echo $2|sed 's/ *(.*//'`
as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
-$as_echo_n "checking whether $as_decl_name is declared... " >&6; }
-if eval \${$3+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
+printf %s "checking whether $as_decl_name is declared... " >&6; }
+if eval test \${$3+y}
+then :
+ printf %s "(cached) " >&6
+else
+ ac_save_werror_flag=$ac_c_werror_flag
+ ac_c_werror_flag="$ac_c_decl_warn_flag$ac_c_werror_flag"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
$4
int
-main ()
+main (void)
{
#ifndef $as_decl_name
#ifdef __cplusplus
@@ -2811,7 +2828,8 @@ main ()
return 0;
}
_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_c_try_compile "$LINENO"
+then :
eval "$3=yes"
else
eval "$3=no"
@@ -2819,8 +2837,9 @@ fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
eval ac_res=\$$3
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
-$as_echo "$ac_res" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+printf "%s\n" "$ac_res" >&6; }
+ ac_c_werror_flag=$ac_save_werror_flag
eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
} # ac_fn_c_check_decl
@@ -2832,16 +2851,17 @@ $as_echo "$ac_res" >&6; }
ac_fn_c_check_member ()
{
as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
-$as_echo_n "checking for $2.$3... " >&6; }
-if eval \${$4+:} false; then :
- $as_echo_n "(cached) " >&6
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
+printf %s "checking for $2.$3... " >&6; }
+if eval test \${$4+y}
+then :
+ printf %s "(cached) " >&6
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
$5
int
-main ()
+main (void)
{
static $2 ac_aggr;
if (ac_aggr.$3)
@@ -2850,14 +2870,15 @@ return 0;
return 0;
}
_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_c_try_compile "$LINENO"
+then :
eval "$4=yes"
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
$5
int
-main ()
+main (void)
{
static $2 ac_aggr;
if (sizeof ac_aggr.$3)
@@ -2866,7 +2887,8 @@ return 0;
return 0;
}
_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_c_try_compile "$LINENO"
+then :
eval "$4=yes"
else
eval "$4=no"
@@ -2876,8 +2898,8 @@ fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
eval ac_res=\$$4
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
-$as_echo "$ac_res" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+printf "%s\n" "$ac_res" >&6; }
eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
} # ac_fn_c_check_member
@@ -2885,8 +2907,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.2.2, which was
-generated by GNU Autoconf 2.69. Invocation command line was
+It was created by GNU sed $as_me 4.3, which was
+generated by GNU Autoconf 2.69.183-96821. Invocation command line was
$ $0 $@
@@ -2921,8 +2943,12 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- $as_echo "PATH: $as_dir"
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
+ printf "%s\n" "PATH: $as_dir"
done
IFS=$as_save_IFS
@@ -2957,7 +2983,7 @@ do
| -silent | --silent | --silen | --sile | --sil)
continue ;;
*\'*)
- ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
+ ac_arg=`printf "%s\n" "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
esac
case $ac_pass in
1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
@@ -2992,11 +3018,13 @@ done
# WARNING: Use '\'' to represent an apostrophe within the trap.
# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
trap 'exit_status=$?
+ # Sanitize IFS.
+ IFS=" "" $as_nl"
# Save into config.log some information that might help in debugging.
{
echo
- $as_echo "## ---------------- ##
+ printf "%s\n" "## ---------------- ##
## Cache variables. ##
## ---------------- ##"
echo
@@ -3007,8 +3035,8 @@ trap 'exit_status=$?
case $ac_val in #(
*${as_nl}*)
case $ac_var in #(
- *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
-$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
+ *_cv_*) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
+printf "%s\n" "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
esac
case $ac_var in #(
_ | IFS | as_nl) ;; #(
@@ -3032,7 +3060,7 @@ $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
)
echo
- $as_echo "## ----------------- ##
+ printf "%s\n" "## ----------------- ##
## Output variables. ##
## ----------------- ##"
echo
@@ -3040,14 +3068,14 @@ $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
do
eval ac_val=\$$ac_var
case $ac_val in
- *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
+ *\'\''*) ac_val=`printf "%s\n" "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
esac
- $as_echo "$ac_var='\''$ac_val'\''"
+ printf "%s\n" "$ac_var='\''$ac_val'\''"
done | sort
echo
if test -n "$ac_subst_files"; then
- $as_echo "## ------------------- ##
+ printf "%s\n" "## ------------------- ##
## File substitutions. ##
## ------------------- ##"
echo
@@ -3055,15 +3083,15 @@ $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
do
eval ac_val=\$$ac_var
case $ac_val in
- *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
+ *\'\''*) ac_val=`printf "%s\n" "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
esac
- $as_echo "$ac_var='\''$ac_val'\''"
+ printf "%s\n" "$ac_var='\''$ac_val'\''"
done | sort
echo
fi
if test -s confdefs.h; then
- $as_echo "## ----------- ##
+ printf "%s\n" "## ----------- ##
## confdefs.h. ##
## ----------- ##"
echo
@@ -3071,8 +3099,8 @@ $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
echo
fi
test "$ac_signal" != 0 &&
- $as_echo "$as_me: caught signal $ac_signal"
- $as_echo "$as_me: exit $exit_status"
+ printf "%s\n" "$as_me: caught signal $ac_signal"
+ printf "%s\n" "$as_me: exit $exit_status"
} >&5
rm -f core *.core core.conftest.* &&
rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
@@ -3086,33 +3114,21 @@ ac_signal=0
# confdefs.h avoids OS command line length limits that DEFS can exceed.
rm -f -r conftest* confdefs.h
-$as_echo "/* confdefs.h */" > confdefs.h
+printf "%s\n" "/* confdefs.h */" > confdefs.h
# Predefined preprocessor variables.
-cat >>confdefs.h <<_ACEOF
-#define PACKAGE_NAME "$PACKAGE_NAME"
-_ACEOF
+printf "%s\n" "#define PACKAGE_NAME \"$PACKAGE_NAME\"" >>confdefs.h
-cat >>confdefs.h <<_ACEOF
-#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
-_ACEOF
+printf "%s\n" "#define PACKAGE_TARNAME \"$PACKAGE_TARNAME\"" >>confdefs.h
-cat >>confdefs.h <<_ACEOF
-#define PACKAGE_VERSION "$PACKAGE_VERSION"
-_ACEOF
+printf "%s\n" "#define PACKAGE_VERSION \"$PACKAGE_VERSION\"" >>confdefs.h
-cat >>confdefs.h <<_ACEOF
-#define PACKAGE_STRING "$PACKAGE_STRING"
-_ACEOF
+printf "%s\n" "#define PACKAGE_STRING \"$PACKAGE_STRING\"" >>confdefs.h
-cat >>confdefs.h <<_ACEOF
-#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
-_ACEOF
+printf "%s\n" "#define PACKAGE_BUGREPORT \"$PACKAGE_BUGREPORT\"" >>confdefs.h
-cat >>confdefs.h <<_ACEOF
-#define PACKAGE_URL "$PACKAGE_URL"
-_ACEOF
+printf "%s\n" "#define PACKAGE_URL \"$PACKAGE_URL\"" >>confdefs.h
# Let the site file select an alternate cache file if it wants to.
@@ -3137,12 +3153,12 @@ for ac_site_file in "$ac_site_file1" "$ac_site_file2"
do
test "x$ac_site_file" = xNONE && continue
if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
-$as_echo "$as_me: loading site script $ac_site_file" >&6;}
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
+printf "%s\n" "$as_me: loading site script $ac_site_file" >&6;}
sed 's/^/| /' "$ac_site_file" >&5
. "$ac_site_file" \
- || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+ || { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
as_fn_error $? "failed to load site script $ac_site_file
See \`config.log' for more details" "$LINENO" 5; }
fi
@@ -3152,73 +3168,94 @@ if test -r "$cache_file"; then
# Some versions of bash will fail to source /dev/null (special files
# actually), so we avoid doing that. DJGPP emulates it as a regular file.
if test /dev/null != "$cache_file" && test -f "$cache_file"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
-$as_echo "$as_me: loading cache $cache_file" >&6;}
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
+printf "%s\n" "$as_me: loading cache $cache_file" >&6;}
case $cache_file in
[\\/]* | ?:[\\/]* ) . "$cache_file";;
*) . "./$cache_file";;
esac
fi
else
- { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
-$as_echo "$as_me: creating cache $cache_file" >&6;}
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
+printf "%s\n" "$as_me: creating cache $cache_file" >&6;}
>$cache_file
fi
-as_fn_append ac_func_list " btowc"
-as_fn_append ac_func_list " canonicalize_file_name"
-as_fn_append ac_func_list " getcwd"
-as_fn_append ac_func_list " readlink"
-as_fn_append ac_func_list " realpath"
-as_fn_append ac_header_list " sys/param.h"
-as_fn_append ac_header_list " unistd.h"
-as_fn_append ac_func_list " symlink"
-as_fn_append ac_func_list " _set_invalid_parameter_handler"
-as_fn_append ac_header_list " sys/stat.h"
-as_fn_append ac_func_list " __fwriting"
-as_fn_append ac_func_list " getdelim"
+as_fn_append ac_header_c_list " sys/types.h sys_types_h HAVE_SYS_TYPES_H"
+as_fn_append ac_header_c_list " sys/stat.h sys_stat_h HAVE_SYS_STAT_H"
+as_fn_append ac_header_c_list " strings.h strings_h HAVE_STRINGS_H"
+as_fn_append ac_header_c_list " inttypes.h inttypes_h HAVE_INTTYPES_H"
+as_fn_append ac_header_c_list " stdint.h stdint_h HAVE_STDINT_H"
+as_fn_append ac_header_c_list " unistd.h unistd_h HAVE_UNISTD_H"
+as_fn_append ac_func_c_list " fchmod HAVE_FCHMOD"
+as_fn_append ac_func_c_list " btowc HAVE_BTOWC"
+as_fn_append ac_func_c_list " canonicalize_file_name HAVE_CANONICALIZE_FILE_NAME"
+as_fn_append ac_func_c_list " getcwd HAVE_GETCWD"
+as_fn_append ac_func_c_list " readlink HAVE_READLINK"
+as_fn_append ac_func_c_list " realpath HAVE_REALPATH"
+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_list " getopt.h"
-as_fn_append ac_header_list " sys/time.h"
-as_fn_append ac_header_list " sys/socket.h"
-as_fn_append ac_func_list " gettimeofday"
-as_fn_append ac_header_list " langinfo.h"
-as_fn_append ac_header_list " xlocale.h"
-as_fn_append ac_func_list " lstat"
-as_fn_append ac_func_list " mbsinit"
-as_fn_append ac_func_list " mbrtowc"
-as_fn_append ac_func_list " mbrlen"
-as_fn_append ac_header_list " sys/mman.h"
-as_fn_append ac_func_list " mprotect"
-as_fn_append ac_func_list " mkostemp"
-as_fn_append ac_func_list " nl_langinfo"
-as_fn_append ac_func_list " isblank"
-as_fn_append ac_func_list " iswctype"
-as_fn_append ac_func_list " wcscoll"
-as_fn_append ac_func_list " link"
-as_fn_append ac_header_list " selinux/selinux.h"
-as_fn_append ac_header_list " wchar.h"
-as_fn_append ac_header_list " stdint.h"
-as_fn_append ac_header_list " features.h"
-as_fn_append ac_func_list " wcrtomb"
-as_fn_append ac_func_list " wctob"
-as_fn_append ac_func_list " iswcntrl"
-as_fn_append ac_header_list " wctype.h"
+as_fn_append ac_header_c_list " getopt.h getopt_h HAVE_GETOPT_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"
+as_fn_append ac_header_c_list " sys/socket.h sys_socket_h HAVE_SYS_SOCKET_H"
+as_fn_append ac_func_c_list " gettimeofday HAVE_GETTIMEOFDAY"
+as_fn_append ac_func_c_list " isblank HAVE_ISBLANK"
+as_fn_append ac_header_c_list " langinfo.h langinfo_h HAVE_LANGINFO_H"
+as_fn_append ac_header_c_list " limits.h limits_h HAVE_LIMITS_H"
+as_fn_append ac_header_c_list " xlocale.h xlocale_h HAVE_XLOCALE_H"
+as_fn_append ac_func_c_list " lstat HAVE_LSTAT"
+as_fn_append ac_func_c_list " mbsinit HAVE_MBSINIT"
+as_fn_append ac_func_c_list " mbrtowc HAVE_MBRTOWC"
+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 " 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_header_c_list " features.h features_h HAVE_FEATURES_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 " dirent.h dirent_h HAVE_DIRENT_H"
+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 " getdtablesize HAVE_GETDTABLESIZE"
+as_fn_append ac_func_c_list " newlocale HAVE_NEWLOCALE"
+as_fn_append ac_func_c_list " setenv HAVE_SETENV"
+as_fn_append ac_func_c_list " strdup HAVE_STRDUP"
gl_use_threads_default=no
-as_fn_append ac_header_list " locale.h"
-as_fn_append ac_header_list " errno.h"
-as_fn_append ac_header_list " mcheck.h"
+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"
+as_fn_append ac_header_c_list " mcheck.h mcheck_h HAVE_MCHECK_H"
gt_needs="$gt_needs "
-as_fn_append ac_func_list " isatty"
-as_fn_append ac_func_list " isascii"
-as_fn_append ac_func_list " memcpy"
-as_fn_append ac_func_list " strchr"
-as_fn_append ac_func_list " strtoul"
-as_fn_append ac_func_list " popen"
-as_fn_append ac_func_list " pathconf"
-as_fn_append ac_func_list " fchown"
-as_fn_append ac_func_list " fchmod"
-as_fn_append ac_func_list " setlocale"
+as_fn_append ac_func_c_list " isatty HAVE_ISATTY"
+as_fn_append ac_func_c_list " isascii HAVE_ISASCII"
+as_fn_append ac_func_c_list " memcpy HAVE_MEMCPY"
+as_fn_append ac_func_c_list " strchr HAVE_STRCHR"
+as_fn_append ac_func_c_list " strtoul HAVE_STRTOUL"
+as_fn_append ac_func_c_list " popen HAVE_POPEN"
+as_fn_append ac_func_c_list " pathconf HAVE_PATHCONF"
+as_fn_append ac_func_c_list " fchown HAVE_FCHOWN"
+as_fn_append ac_func_c_list " setlocale HAVE_SETLOCALE"
# Check that the precious variables saved in the cache have kept the same
# value.
ac_cache_corrupted=false
@@ -3229,12 +3266,12 @@ for ac_var in $ac_precious_vars; do
eval ac_new_val=\$ac_env_${ac_var}_value
case $ac_old_set,$ac_new_set in
set,)
- { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
-$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
+printf "%s\n" "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
ac_cache_corrupted=: ;;
,set)
- { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
-$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
+printf "%s\n" "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
ac_cache_corrupted=: ;;
,);;
*)
@@ -3243,24 +3280,24 @@ $as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
ac_old_val_w=`echo x $ac_old_val`
ac_new_val_w=`echo x $ac_new_val`
if test "$ac_old_val_w" != "$ac_new_val_w"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
-$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
+printf "%s\n" "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
ac_cache_corrupted=:
else
- { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
-$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
+printf "%s\n" "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
eval $ac_var=\$ac_old_val
fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
-$as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
- { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
-$as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
+printf "%s\n" "$as_me: former value: \`$ac_old_val'" >&2;}
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
+printf "%s\n" "$as_me: current value: \`$ac_new_val'" >&2;}
fi;;
esac
# Pass precious variables to config.status.
if test "$ac_new_set" = set; then
case $ac_new_val in
- *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
+ *\'*) ac_arg=$ac_var=`printf "%s\n" "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
*) ac_arg=$ac_var=$ac_new_val ;;
esac
case " $ac_configure_args " in
@@ -3270,10 +3307,10 @@ $as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
fi
done
if $ac_cache_corrupted; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
- { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
-$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
+printf "%s\n" "$as_me: error: changes in the environment can compromise the build" >&2;}
as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
fi
## -------------------- ##
@@ -3288,7 +3325,8 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
ac_aux_dir=
-for ac_dir in build-aux "$srcdir"/build-aux; do
+for ac_dir in build-aux "$srcdir"/build-aux
+do
if test -f "$ac_dir/install-sh"; then
ac_aux_dir=$ac_dir
ac_install_sh="$ac_aux_dir/install-sh -c"
@@ -3320,7 +3358,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.12'
+am__api_version='1.99a'
# Find a good install program. We prefer a C program (faster),
# so one script is as good as another. But avoid the broken or
@@ -3336,20 +3374,25 @@ am__api_version='1.12'
# OS/2's system install, which has a completely different semantic
# ./install, which can be erroneously created by make from ./install.sh.
# Reject install programs that cannot install multiple files.
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
-$as_echo_n "checking for a BSD-compatible install... " >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
+printf %s "checking for a BSD-compatible install... " >&6; }
if test -z "$INSTALL"; then
-if ${ac_cv_path_install+:} false; then :
- $as_echo_n "(cached) " >&6
+if test ${ac_cv_path_install+y}
+then :
+ printf %s "(cached) " >&6
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- # Account for people who put trailing slashes in PATH elements.
-case $as_dir/ in #((
- ./ | .// | /[cC]/* | \
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
+ # Account for fact that we put trailing slashes in our PATH walk.
+case $as_dir in #((
+ ./ | /[cC]/* | \
/etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
/usr/ucb/* ) ;;
@@ -3359,13 +3402,13 @@ case $as_dir/ in #((
# by default.
for ac_prog in ginstall scoinst install; do
for ac_exec_ext in '' $ac_executable_extensions; do
- if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
+ if as_fn_executable_p "$as_dir$ac_prog$ac_exec_ext"; then
if test $ac_prog = install &&
- grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
+ grep dspmsg "$as_dir$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
# AIX install. It has an incompatible calling convention.
:
elif test $ac_prog = install &&
- grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
+ grep pwplus "$as_dir$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
# program-specific install script used by HP pwplus--don't use.
:
else
@@ -3373,12 +3416,12 @@ 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
then
- ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
+ ac_cv_path_install="$as_dir$ac_prog$ac_exec_ext -c"
break 3
fi
fi
@@ -3394,7 +3437,7 @@ IFS=$as_save_IFS
rm -rf conftest.one conftest.two conftest.dir
fi
- if test "${ac_cv_path_install+set}" = set; then
+ if test ${ac_cv_path_install+y}; then
INSTALL=$ac_cv_path_install
else
# As a last resort, use the slow shell script. Don't cache a
@@ -3404,8 +3447,8 @@ fi
INSTALL=$ac_install_sh
fi
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
-$as_echo "$INSTALL" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
+printf "%s\n" "$INSTALL" >&6; }
# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
# It thinks the first close brace ends the variable substitution.
@@ -3415,8 +3458,8 @@ test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5
-$as_echo_n "checking whether build environment is sane... " >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5
+printf %s "checking whether build environment is sane... " >&6; }
# Reject unsafe characters in $srcdir or the absolute working directory
# name. Accept space and tab only in the latter.
am_lf='
@@ -3470,8 +3513,8 @@ else
as_fn_error $? "newly created file is older than distributed files!
Check your system clock" "$LINENO" 5
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+printf "%s\n" "yes" >&6; }
# If we didn't sleep, we still need to ensure time stamps of config.status and
# generated files are strictly newer.
am_sleep_pid=
@@ -3490,10 +3533,10 @@ test "$program_suffix" != NONE &&
# Double any \ or $.
# By default was `s,x,x', remove it if useless.
ac_script='s/[\\$]/&&/g;s/;s,x,x,$//'
-program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"`
+program_transform_name=`printf "%s\n" "$program_transform_name" | sed "$ac_script"`
-# expand $ac_aux_dir to an absolute path
-am_aux_dir=`cd $ac_aux_dir && pwd`
+# Expand $ac_aux_dir to an absolute path.
+am_aux_dir=`cd "$ac_aux_dir" && pwd`
if test x"${MISSING+set}" != xset; then
case $am_aux_dir in
@@ -3504,15 +3547,15 @@ if test x"${MISSING+set}" != xset; then
esac
fi
# Use eval to expand $SHELL
-if eval "$MISSING --run true"; then
- am_missing_run="$MISSING --run "
+if eval "$MISSING --is-lightweight"; then
+ am_missing_run="$MISSING "
else
am_missing_run=
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: 'missing' script is too old or missing" >&5
-$as_echo "$as_me: WARNING: 'missing' script is too old or missing" >&2;}
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: 'missing' script is too old or missing" >&5
+printf "%s\n" "$as_me: WARNING: 'missing' script is too old or missing" >&2;}
fi
-if test x"${install_sh}" != xset; then
+if test x"${install_sh+set}" != xset; then
case $am_aux_dir in
*\ * | *\ *)
install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
@@ -3529,10 +3572,11 @@ if test "$cross_compiling" != no; then
if test -n "$ac_tool_prefix"; then
# Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
set dummy ${ac_tool_prefix}strip; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_STRIP+:} false; then :
- $as_echo_n "(cached) " >&6
+{ 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_STRIP+y}
+then :
+ printf %s "(cached) " >&6
else
if test -n "$STRIP"; then
ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
@@ -3541,11 +3585,15 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
+ 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
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
ac_cv_prog_STRIP="${ac_tool_prefix}strip"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
break 2
fi
done
@@ -3556,11 +3604,11 @@ fi
fi
STRIP=$ac_cv_prog_STRIP
if test -n "$STRIP"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
-$as_echo "$STRIP" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
+printf "%s\n" "$STRIP" >&6; }
else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
fi
@@ -3569,10 +3617,11 @@ if test -z "$ac_cv_prog_STRIP"; then
ac_ct_STRIP=$STRIP
# Extract the first word of "strip", so it can be a program name with args.
set dummy strip; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
- $as_echo_n "(cached) " >&6
+{ 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_STRIP+y}
+then :
+ printf %s "(cached) " >&6
else
if test -n "$ac_ct_STRIP"; then
ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
@@ -3581,11 +3630,15 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
+ 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
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
ac_cv_prog_ac_ct_STRIP="strip"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
break 2
fi
done
@@ -3596,11 +3649,11 @@ fi
fi
ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
if test -n "$ac_ct_STRIP"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
-$as_echo "$ac_ct_STRIP" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
+printf "%s\n" "$ac_ct_STRIP" >&6; }
else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
fi
if test "x$ac_ct_STRIP" = x; then
@@ -3608,8 +3661,8 @@ fi
else
case $cross_compiling:$ac_tool_warned in
yes:)
-{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
-$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+{ 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
STRIP=$ac_ct_STRIP
@@ -3621,25 +3674,30 @@ fi
fi
INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
-$as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
+printf %s "checking for a thread-safe mkdir -p... " >&6; }
if test -z "$MKDIR_P"; then
- if ${ac_cv_path_mkdir+:} false; then :
- $as_echo_n "(cached) " >&6
+ if test ${ac_cv_path_mkdir+y}
+then :
+ printf %s "(cached) " >&6
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
do
IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
for ac_prog in mkdir gmkdir; do
for ac_exec_ext in '' $ac_executable_extensions; do
- as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue
- case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
- 'mkdir (GNU coreutils) '* | \
- 'mkdir (coreutils) '* | \
+ as_fn_executable_p "$as_dir$ac_prog$ac_exec_ext" || continue
+ case `"$as_dir$ac_prog$ac_exec_ext" --version 2>&1` in #(
+ 'mkdir ('*'coreutils) '* | \
+ 'BusyBox '* | \
'mkdir (fileutils) '4.1*)
- ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
+ ac_cv_path_mkdir=$as_dir$ac_prog$ac_exec_ext
break 3;;
esac
done
@@ -3650,7 +3708,7 @@ IFS=$as_save_IFS
fi
test -d ./--version && rmdir ./--version
- if test "${ac_cv_path_mkdir+set}" = set; then
+ if test ${ac_cv_path_mkdir+y}; then
MKDIR_P="$ac_cv_path_mkdir -p"
else
# As a last resort, use the slow shell script. Don't cache a
@@ -3660,17 +3718,18 @@ fi
MKDIR_P="$ac_install_sh -d"
fi
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
-$as_echo "$MKDIR_P" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
+printf "%s\n" "$MKDIR_P" >&6; }
for ac_prog in gawk mawk nawk awk
do
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_AWK+:} false; then :
- $as_echo_n "(cached) " >&6
+{ 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_AWK+y}
+then :
+ printf %s "(cached) " >&6
else
if test -n "$AWK"; then
ac_cv_prog_AWK="$AWK" # Let the user override the test.
@@ -3679,11 +3738,15 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
+ 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
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
ac_cv_prog_AWK="$ac_prog"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
break 2
fi
done
@@ -3694,23 +3757,24 @@ fi
fi
AWK=$ac_cv_prog_AWK
if test -n "$AWK"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
-$as_echo "$AWK" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
+printf "%s\n" "$AWK" >&6; }
else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
fi
test -n "$AWK" && break
done
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5
-$as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5
+printf %s "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; }
set x ${MAKE-make}
-ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
-if eval \${ac_cv_prog_make_${ac_make}_set+:} false; then :
- $as_echo_n "(cached) " >&6
+ac_make=`printf "%s\n" "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
+if eval test \${ac_cv_prog_make_${ac_make}_set+y}
+then :
+ printf %s "(cached) " >&6
else
cat >conftest.make <<\_ACEOF
SHELL = /bin/sh
@@ -3727,24 +3791,57 @@ esac
rm -f conftest.make
fi
if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+printf "%s\n" "yes" >&6; }
SET_MAKE=
else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+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=.
+# Check whether --enable-silent-rules was given.
+if test ${enable_silent_rules+y}
+then :
+ enableval=$enable_silent_rules;
+fi
+
+case $enable_silent_rules in # (((
+ yes) AM_DEFAULT_VERBOSITY=0;;
+ no) AM_DEFAULT_VERBOSITY=1;;
+ *) AM_DEFAULT_VERBOSITY=1;;
+esac
+am_make=${MAKE-make}
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $am_make supports nested variables" >&5
+printf %s "checking whether $am_make supports nested variables... " >&6; }
+if test ${am_cv_make_support_nested_variables+y}
+then :
+ printf %s "(cached) " >&6
+else
+ if printf "%s\n" 'TRUE=$(BAR$(V))
+BAR0=false
+BAR1=true
+V=1
+am__doit:
+ @$(TRUE)
+.PHONY: am__doit' | $am_make -f - >/dev/null 2>&1; then
+ am_cv_make_support_nested_variables=yes
+else
+ am_cv_make_support_nested_variables=no
+fi
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_make_support_nested_variables" >&5
+printf "%s\n" "$am_cv_make_support_nested_variables" >&6; }
+if test $am_cv_make_support_nested_variables = yes; then
+ AM_V='$(V)'
+ AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)'
else
- am__leading_dot=_
+ AM_V=$AM_DEFAULT_VERBOSITY
+ AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY
fi
-rmdir .tst 2>/dev/null
+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."
@@ -3767,17 +3864,13 @@ fi
# Define the identity of the package.
PACKAGE='sed'
- VERSION='4.2.2'
+ VERSION='4.3'
-cat >>confdefs.h <<_ACEOF
-#define PACKAGE "$PACKAGE"
-_ACEOF
+printf "%s\n" "#define PACKAGE \"$PACKAGE\"" >>confdefs.h
-cat >>confdefs.h <<_ACEOF
-#define VERSION "$VERSION"
-_ACEOF
+printf "%s\n" "#define VERSION \"$VERSION\"" >>confdefs.h
# Some tools Automake needs.
@@ -3795,18 +3888,16 @@ 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:
-# <http://lists.gnu.org/archive/html/automake/2012-07/msg00001.html>
-# <http://lists.gnu.org/archive/html/automake/2012-07/msg00014.html>
-mkdir_p='$(MKDIR_P)'
-
-# We need awk for the "check" target. The system "awk" is bad on
-# some platforms.
+# 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
# in the wild :-( We should find a proper way to deprecate it ...
AMTAR='$${TAR-tar}'
+
+# We'll loop over all known methods to create a tar archive until one works.
+_am_tools='gnutar pax cpio none'
+
am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'
@@ -3814,15 +3905,153 @@ am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'
-SED_FEATURE_VERSION=4.2.2
+# POSIX will say in a future version that running "rm -f" with no argument
+# is OK; and we want to be able to make that assumption in our Makefile
+# recipes. So use an aggressive probe to check that the usage we want is
+# actually supported "in the wild" to an acceptable degree.
+# See automake bug#10828.
+# To make any issue more visible, cause the running configure to be aborted
+# by default if the 'rm' program in use doesn't match our expectations; the
+# user can still override this though.
+if rm -f && rm -fr && rm -rf; then : OK; else
+ cat >&2 <<'END'
+Oops!
-cat >>confdefs.h <<_ACEOF
-#define SED_FEATURE_VERSION "$SED_FEATURE_VERSION"
-_ACEOF
+Your 'rm' program seems unable to run without file operands specified
+on the command line, even when the '-f' option is present. This is contrary
+to the behaviour of most rm programs out there, and not conforming with
+the upcoming POSIX standard: <http://austingroupbugs.net/view.php?id=542>
+
+Please tell bug-automake@gnu.org about your system, including the value
+of your $PATH and any error possibly output before this message. This
+can help us improve future automake versions.
+
+END
+ if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then
+ echo 'Configuration will proceed anyway, since you have set the' >&2
+ echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2
+ echo >&2
+ else
+ cat >&2 <<'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/>.
+
+If you want to complete the configuration process using your problematic
+'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM
+to "yes", and re-run configure.
+
+END
+ as_fn_error $? "Your 'rm' program is bad, sorry." "$LINENO" 5
+ fi
+fi
+
+# Check whether --enable-silent-rules was given.
+if test ${enable_silent_rules+y}
+then :
+ enableval=$enable_silent_rules;
+fi
+
+case $enable_silent_rules in # (((
+ yes) AM_DEFAULT_VERBOSITY=0;;
+ no) AM_DEFAULT_VERBOSITY=1;;
+ *) AM_DEFAULT_VERBOSITY=0;;
+esac
+am_make=${MAKE-make}
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $am_make supports nested variables" >&5
+printf %s "checking whether $am_make supports nested variables... " >&6; }
+if test ${am_cv_make_support_nested_variables+y}
+then :
+ printf %s "(cached) " >&6
+else
+ if printf "%s\n" 'TRUE=$(BAR$(V))
+BAR0=false
+BAR1=true
+V=1
+am__doit:
+ @$(TRUE)
+.PHONY: am__doit' | $am_make -f - >/dev/null 2>&1; then
+ am_cv_make_support_nested_variables=yes
+else
+ am_cv_make_support_nested_variables=no
+fi
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_make_support_nested_variables" >&5
+printf "%s\n" "$am_cv_make_support_nested_variables" >&6; }
+if test $am_cv_make_support_nested_variables = yes; then
+ AM_V='$(V)'
+ AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)'
+else
+ AM_V=$AM_DEFAULT_VERBOSITY
+ AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY
+fi
+AM_BACKSLASH='\'
+ # make --enable-silent-rules the default.
+
+
+DEPDIR=.deps
+
+ac_config_commands="$ac_config_commands depfiles"
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} supports the include directive" >&5
+printf %s "checking whether ${MAKE-make} supports the include directive... " >&6; }
+cat > confinc.mk << 'END'
+am__doit:
+ @echo this is the am__doit target >confinc.out
+.PHONY: am__doit
+END
+am__include="#"
+am__quote=
+# BSD make does it like this.
+echo '.include "confinc.mk" # ignored' > confmf.BSD
+# Other make implementations (GNU, Solaris 10, AIX) do it like this.
+echo 'include confinc.mk # ignored' > confmf.GNU
+_am_result=no
+for s in GNU BSD; do
+ { echo "$as_me:$LINENO: ${MAKE-make} -f confmf.$s && cat confinc.out" >&5
+ (${MAKE-make} -f confmf.$s && cat confinc.out) >&5 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }
+ case $?:`cat confinc.out 2>/dev/null` in #(
+ '0:this is the am__doit target') :
+ case $s in #(
+ BSD) :
+ am__include='.include' am__quote='"' ;; #(
+ *) :
+ am__include='include' am__quote='' ;;
+esac ;; #(
+ *) :
+ ;;
+esac
+ if test "$am__include" != "#"; then
+ _am_result="yes ($s style)"
+ break
+ fi
+done
+rm -f confinc.* confmf.*
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: ${_am_result}" >&5
+printf "%s\n" "${_am_result}" >&6; }
+# Check whether --enable-dependency-tracking was given.
+if test ${enable_dependency_tracking+y}
+then :
+ enableval=$enable_dependency_tracking;
+fi
-COPYRIGHT_YEAR=2012
+if test "x$enable_dependency_tracking" != xno; then
+ am_depcomp="$ac_aux_dir/depcomp"
+ AMDEPBACKSLASH='\'
+ am__nodep='_no'
+fi
+ if test "x$enable_dependency_tracking" != xno; then
+ AMDEP_TRUE=
+ AMDEP_FALSE='#'
+else
+ AMDEP_TRUE='#'
+ AMDEP_FALSE=
+fi
ac_ext=c
@@ -3833,10 +4062,11 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
if test -n "$ac_tool_prefix"; then
# Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
set dummy ${ac_tool_prefix}gcc; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_CC+:} false; then :
- $as_echo_n "(cached) " >&6
+{ 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_CC+y}
+then :
+ printf %s "(cached) " >&6
else
if test -n "$CC"; then
ac_cv_prog_CC="$CC" # Let the user override the test.
@@ -3845,11 +4075,15 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
+ 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
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
ac_cv_prog_CC="${ac_tool_prefix}gcc"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
break 2
fi
done
@@ -3860,11 +4094,11 @@ fi
fi
CC=$ac_cv_prog_CC
if test -n "$CC"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
-$as_echo "$CC" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
+printf "%s\n" "$CC" >&6; }
else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
fi
@@ -3873,10 +4107,11 @@ if test -z "$ac_cv_prog_CC"; then
ac_ct_CC=$CC
# Extract the first word of "gcc", so it can be a program name with args.
set dummy gcc; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_ac_ct_CC+:} false; then :
- $as_echo_n "(cached) " >&6
+{ 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_CC+y}
+then :
+ printf %s "(cached) " >&6
else
if test -n "$ac_ct_CC"; then
ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
@@ -3885,11 +4120,15 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
+ 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
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
ac_cv_prog_ac_ct_CC="gcc"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
break 2
fi
done
@@ -3900,11 +4139,11 @@ fi
fi
ac_ct_CC=$ac_cv_prog_ac_ct_CC
if test -n "$ac_ct_CC"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
-$as_echo "$ac_ct_CC" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
+printf "%s\n" "$ac_ct_CC" >&6; }
else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
fi
if test "x$ac_ct_CC" = x; then
@@ -3912,8 +4151,8 @@ fi
else
case $cross_compiling:$ac_tool_warned in
yes:)
-{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
-$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+{ 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
CC=$ac_ct_CC
@@ -3926,10 +4165,11 @@ if test -z "$CC"; then
if test -n "$ac_tool_prefix"; then
# Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
set dummy ${ac_tool_prefix}cc; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_CC+:} false; then :
- $as_echo_n "(cached) " >&6
+{ 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_CC+y}
+then :
+ printf %s "(cached) " >&6
else
if test -n "$CC"; then
ac_cv_prog_CC="$CC" # Let the user override the test.
@@ -3938,11 +4178,15 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
+ 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
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
ac_cv_prog_CC="${ac_tool_prefix}cc"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
break 2
fi
done
@@ -3953,11 +4197,11 @@ fi
fi
CC=$ac_cv_prog_CC
if test -n "$CC"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
-$as_echo "$CC" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
+printf "%s\n" "$CC" >&6; }
else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
fi
@@ -3966,10 +4210,11 @@ fi
if test -z "$CC"; then
# Extract the first word of "cc", so it can be a program name with args.
set dummy cc; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_CC+:} false; then :
- $as_echo_n "(cached) " >&6
+{ 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_CC+y}
+then :
+ printf %s "(cached) " >&6
else
if test -n "$CC"; then
ac_cv_prog_CC="$CC" # Let the user override the test.
@@ -3979,15 +4224,19 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
+ 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
- if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
+ if test "$as_dir$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
ac_prog_rejected=yes
continue
fi
ac_cv_prog_CC="cc"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
break 2
fi
done
@@ -4003,18 +4252,18 @@ if test $ac_prog_rejected = yes; then
# However, it has the same basename, so the bogon will be chosen
# first if we set CC to just the basename; use the full file name.
shift
- ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
+ ac_cv_prog_CC="$as_dir$ac_word${1+' '}$@"
fi
fi
fi
fi
CC=$ac_cv_prog_CC
if test -n "$CC"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
-$as_echo "$CC" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
+printf "%s\n" "$CC" >&6; }
else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
fi
@@ -4025,10 +4274,11 @@ if test -z "$CC"; then
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
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_CC+:} false; then :
- $as_echo_n "(cached) " >&6
+{ 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_CC+y}
+then :
+ printf %s "(cached) " >&6
else
if test -n "$CC"; then
ac_cv_prog_CC="$CC" # Let the user override the test.
@@ -4037,11 +4287,15 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
+ 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
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
break 2
fi
done
@@ -4052,11 +4306,11 @@ fi
fi
CC=$ac_cv_prog_CC
if test -n "$CC"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
-$as_echo "$CC" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
+printf "%s\n" "$CC" >&6; }
else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
fi
@@ -4069,10 +4323,11 @@ if test -z "$CC"; then
do
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_ac_ct_CC+:} false; then :
- $as_echo_n "(cached) " >&6
+{ 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_CC+y}
+then :
+ printf %s "(cached) " >&6
else
if test -n "$ac_ct_CC"; then
ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
@@ -4081,11 +4336,15 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
+ 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
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
ac_cv_prog_ac_ct_CC="$ac_prog"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
break 2
fi
done
@@ -4096,11 +4355,11 @@ fi
fi
ac_ct_CC=$ac_cv_prog_ac_ct_CC
if test -n "$ac_ct_CC"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
-$as_echo "$ac_ct_CC" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
+printf "%s\n" "$ac_ct_CC" >&6; }
else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
fi
@@ -4112,34 +4371,138 @@ done
else
case $cross_compiling:$ac_tool_warned in
yes:)
-{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
-$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+{ 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
+ CC=$ac_ct_CC
+ fi
+fi
+
+fi
+if test -z "$CC"; then
+ if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}clang", so it can be a program name with args.
+set dummy ${ac_tool_prefix}clang; 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_CC+y}
+then :
+ printf %s "(cached) " >&6
+else
+ if test -n "$CC"; then
+ ac_cv_prog_CC="$CC" # 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_CC="${ac_tool_prefix}clang"
+ 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
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
+printf "%s\n" "$CC" >&6; }
+else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_CC"; then
+ ac_ct_CC=$CC
+ # Extract the first word of "clang", so it can be a program name with args.
+set dummy clang; 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_CC+y}
+then :
+ printf %s "(cached) " >&6
+else
+ if test -n "$ac_ct_CC"; then
+ ac_cv_prog_ac_ct_CC="$ac_ct_CC" # 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_CC="clang"
+ 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_CC=$ac_cv_prog_ac_ct_CC
+if test -n "$ac_ct_CC"; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
+printf "%s\n" "$ac_ct_CC" >&6; }
+else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+fi
+
+ if test "x$ac_ct_CC" = x; then
+ CC=""
+ 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
CC=$ac_ct_CC
fi
+else
+ CC="$ac_cv_prog_CC"
fi
fi
-test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+test -z "$CC" && { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
as_fn_error $? "no acceptable C compiler found in \$PATH
See \`config.log' for more details" "$LINENO" 5; }
# Provide some information about the compiler.
-$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
+printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
set X $ac_compile
ac_compiler=$2
-for ac_option in --version -v -V -qversion; do
+for ac_option in --version -v -V -qversion -version; do
{ { ac_try="$ac_compiler $ac_option >&5"
case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
-$as_echo "$ac_try_echo"; } >&5
+printf "%s\n" "$ac_try_echo"; } >&5
(eval "$ac_compiler $ac_option >&5") 2>conftest.err
ac_status=$?
if test -s conftest.err; then
@@ -4149,7 +4512,7 @@ $as_echo "$ac_try_echo"; } >&5
cat conftest.er1 >&5
fi
rm -f conftest.er1 conftest.err
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
test $ac_status = 0; }
done
@@ -4157,7 +4520,7 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
int
-main ()
+main (void)
{
;
@@ -4169,9 +4532,9 @@ ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
# Try to create an executable without -o first, disregard a.out.
# It will help us diagnose broken compilers, and finding out an intuition
# of exeext.
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
-$as_echo_n "checking whether the C compiler works... " >&6; }
-ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
+printf %s "checking whether the C compiler works... " >&6; }
+ac_link_default=`printf "%s\n" "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
# The possible output files:
ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
@@ -4192,11 +4555,12 @@ case "(($ac_try" in
*) ac_try_echo=$ac_try;;
esac
eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
-$as_echo "$ac_try_echo"; } >&5
+printf "%s\n" "$ac_try_echo"; } >&5
(eval "$ac_link_default") 2>&5
ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; }; then :
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }
+then :
# Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
# in a Makefile. We should not override ac_cv_exeext if it was cached,
@@ -4213,7 +4577,7 @@ do
# certainly right.
break;;
*.* )
- if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
+ if test ${ac_cv_exeext+y} && test "$ac_cv_exeext" != no;
then :; else
ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
fi
@@ -4232,41 +4596,43 @@ test "$ac_cv_exeext" = no && ac_cv_exeext=
else
ac_file=''
fi
-if test -z "$ac_file"; then :
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-$as_echo "$as_me: failed program was:" >&5
+if test -z "$ac_file"
+then :
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+printf "%s\n" "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
-{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+{ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
as_fn_error 77 "C compiler cannot create executables
See \`config.log' for more details" "$LINENO" 5; }
else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+printf "%s\n" "yes" >&6; }
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
-$as_echo_n "checking for C compiler default output file name... " >&6; }
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
-$as_echo "$ac_file" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
+printf %s "checking for C compiler default output file name... " >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
+printf "%s\n" "$ac_file" >&6; }
ac_exeext=$ac_cv_exeext
rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
ac_clean_files=$ac_clean_files_save
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
-$as_echo_n "checking for suffix of executables... " >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
+printf %s "checking for suffix of executables... " >&6; }
if { { ac_try="$ac_link"
case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
-$as_echo "$ac_try_echo"; } >&5
+printf "%s\n" "$ac_try_echo"; } >&5
(eval "$ac_link") 2>&5
ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; }; then :
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }
+then :
# If both `conftest.exe' and `conftest' are `present' (well, observable)
# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
# work properly (i.e., refer to `conftest.exe'), while it won't with
@@ -4281,14 +4647,14 @@ for ac_file in conftest.exe conftest conftest.*; do
esac
done
else
- { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
as_fn_error $? "cannot compute suffix of executables: cannot compile and link
See \`config.log' for more details" "$LINENO" 5; }
fi
rm -f conftest conftest$ac_cv_exeext
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
-$as_echo "$ac_cv_exeext" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
+printf "%s\n" "$ac_cv_exeext" >&6; }
rm -f conftest.$ac_ext
EXEEXT=$ac_cv_exeext
@@ -4297,7 +4663,7 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <stdio.h>
int
-main ()
+main (void)
{
FILE *f = fopen ("conftest.out", "w");
return ferror (f) || fclose (f) != 0;
@@ -4309,19 +4675,21 @@ _ACEOF
ac_clean_files="$ac_clean_files conftest.out"
# Check that the compiler produces executables we can run. If not, either
# the compiler is broken, or we cross compile.
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
-$as_echo_n "checking whether we are cross compiling... " >&6; }
-if test "$cross_compiling" != yes; then
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
+printf %s "checking whether we are cross compiling... " >&6; }
+if test "$cross_compiling" = maybe && test "x$build" != "x$host"; then
+ cross_compiling=yes
+elif test "$cross_compiling" != yes; then
{ { ac_try="$ac_link"
case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
-$as_echo "$ac_try_echo"; } >&5
+printf "%s\n" "$ac_try_echo"; } >&5
(eval "$ac_link") 2>&5
ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
test $ac_status = 0; }
if { ac_try='./conftest$ac_cv_exeext'
{ { case "(($ac_try" in
@@ -4329,39 +4697,40 @@ $as_echo "$ac_try_echo"; } >&5
*) ac_try_echo=$ac_try;;
esac
eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
-$as_echo "$ac_try_echo"; } >&5
+printf "%s\n" "$ac_try_echo"; } >&5
(eval "$ac_try") 2>&5
ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
test $ac_status = 0; }; }; then
cross_compiling=no
else
if test "$cross_compiling" = maybe; then
cross_compiling=yes
else
- { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
as_fn_error $? "cannot run C compiled programs.
If you meant to cross compile, use \`--host'.
See \`config.log' for more details" "$LINENO" 5; }
fi
fi
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
-$as_echo "$cross_compiling" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
+printf "%s\n" "$cross_compiling" >&6; }
rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
ac_clean_files=$ac_clean_files_save
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
-$as_echo_n "checking for suffix of object files... " >&6; }
-if ${ac_cv_objext+:} false; then :
- $as_echo_n "(cached) " >&6
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
+printf %s "checking for suffix of object files... " >&6; }
+if test ${ac_cv_objext+y}
+then :
+ printf %s "(cached) " >&6
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
int
-main ()
+main (void)
{
;
@@ -4375,11 +4744,12 @@ case "(($ac_try" in
*) ac_try_echo=$ac_try;;
esac
eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
-$as_echo "$ac_try_echo"; } >&5
+printf "%s\n" "$ac_try_echo"; } >&5
(eval "$ac_compile") 2>&5
ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; }; then :
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }
+then :
for ac_file in conftest.o conftest.obj conftest.*; do
test -f "$ac_file" || continue;
case $ac_file in
@@ -4389,30 +4759,31 @@ $as_echo "$ac_try_echo"; } >&5
esac
done
else
- $as_echo "$as_me: failed program was:" >&5
+ printf "%s\n" "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
-{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+{ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
as_fn_error $? "cannot compute suffix of object files: cannot compile
See \`config.log' for more details" "$LINENO" 5; }
fi
rm -f conftest.$ac_cv_objext conftest.$ac_ext
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
-$as_echo "$ac_cv_objext" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
+printf "%s\n" "$ac_cv_objext" >&6; }
OBJEXT=$ac_cv_objext
ac_objext=$OBJEXT
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
-$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
-if ${ac_cv_c_compiler_gnu+:} false; then :
- $as_echo_n "(cached) " >&6
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports GNU C" >&5
+printf %s "checking whether the compiler supports GNU C... " >&6; }
+if test ${ac_cv_c_compiler_gnu+y}
+then :
+ printf %s "(cached) " >&6
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
int
-main ()
+main (void)
{
#ifndef __GNUC__
choke me
@@ -4422,7 +4793,8 @@ main ()
return 0;
}
_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_c_try_compile "$LINENO"
+then :
ac_compiler_gnu=yes
else
ac_compiler_gnu=no
@@ -4431,19 +4803,20 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
ac_cv_c_compiler_gnu=$ac_compiler_gnu
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
-$as_echo "$ac_cv_c_compiler_gnu" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
+printf "%s\n" "$ac_cv_c_compiler_gnu" >&6; }
if test $ac_compiler_gnu = yes; then
GCC=yes
else
GCC=
fi
-ac_test_CFLAGS=${CFLAGS+set}
+ac_test_CFLAGS=${CFLAGS+y}
ac_save_CFLAGS=$CFLAGS
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
-$as_echo_n "checking whether $CC accepts -g... " >&6; }
-if ${ac_cv_prog_cc_g+:} false; then :
- $as_echo_n "(cached) " >&6
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
+printf %s "checking whether $CC accepts -g... " >&6; }
+if test ${ac_cv_prog_cc_g+y}
+then :
+ printf %s "(cached) " >&6
else
ac_save_c_werror_flag=$ac_c_werror_flag
ac_c_werror_flag=yes
@@ -4453,14 +4826,15 @@ else
/* end confdefs.h. */
int
-main ()
+main (void)
{
;
return 0;
}
_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_c_try_compile "$LINENO"
+then :
ac_cv_prog_cc_g=yes
else
CFLAGS=""
@@ -4468,14 +4842,15 @@ else
/* end confdefs.h. */
int
-main ()
+main (void)
{
;
return 0;
}
_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_c_try_compile "$LINENO"
+then :
else
ac_c_werror_flag=$ac_save_c_werror_flag
@@ -4484,14 +4859,15 @@ else
/* end confdefs.h. */
int
-main ()
+main (void)
{
;
return 0;
}
_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_c_try_compile "$LINENO"
+then :
ac_cv_prog_cc_g=yes
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
@@ -4501,9 +4877,9 @@ fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
ac_c_werror_flag=$ac_save_c_werror_flag
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
-$as_echo "$ac_cv_prog_cc_g" >&6; }
-if test "$ac_test_CFLAGS" = set; then
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
+printf "%s\n" "$ac_cv_prog_cc_g" >&6; }
+if test $ac_test_CFLAGS; then
CFLAGS=$ac_save_CFLAGS
elif test $ac_cv_prog_cc_g = yes; then
if test "$GCC" = yes; then
@@ -4518,10 +4894,429 @@ else
CFLAGS=
fi
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
-$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
-if ${ac_cv_prog_cc_c89+:} false; then :
- $as_echo_n "(cached) " >&6
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C11 features" >&5
+printf %s "checking for $CC option to enable C11 features... " >&6; }
+if test ${ac_cv_prog_cc_c11+y}
+then :
+ printf %s "(cached) " >&6
+else
+ ac_cv_prog_cc_c11=no
+ac_save_CC=$CC
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <stdarg.h>
+#include <stdbool.h>
+#include <stddef.h>
+#include <stdlib.h>
+#include <wchar.h>
+#include <stdio.h>
+
+// Check varargs macros. These examples are taken from C99 6.10.3.5.
+#define debug(...) fprintf (stderr, __VA_ARGS__)
+#define showlist(...) puts (#__VA_ARGS__)
+#define report(test,...) ((test) ? puts (#test) : printf (__VA_ARGS__))
+static void
+test_varargs_macros (void)
+{
+ int x = 1234;
+ int y = 5678;
+ debug ("Flag");
+ debug ("X = %d\n", x);
+ showlist (The first, second, and third items.);
+ report (x>y, "x is %d but y is %d", x, y);
+}
+
+// Check long long types.
+#define BIG64 18446744073709551615ull
+#define BIG32 4294967295ul
+#define BIG_OK (BIG64 / BIG32 == 4294967297ull && BIG64 % BIG32 == 0)
+#if !BIG_OK
+ your preprocessor is broken;
+#endif
+#if BIG_OK
+#else
+ your preprocessor is broken;
+#endif
+static long long int bignum = -9223372036854775807LL;
+static unsigned long long int ubignum = BIG64;
+
+struct incomplete_array
+{
+ int datasize;
+ double data[];
+};
+
+struct named_init {
+ int number;
+ const wchar_t *name;
+ double average;
+};
+
+typedef const char *ccp;
+
+static inline int
+test_restrict (ccp restrict text)
+{
+ // See if C++-style comments work.
+ // Iterate through items via the restricted pointer.
+ // Also check for declarations in for loops.
+ for (unsigned int i = 0; *(text+i) != '\0'; ++i)
+ continue;
+ return 0;
+}
+
+// Check varargs and va_copy.
+static bool
+test_varargs (const char *format, ...)
+{
+ va_list args;
+ va_start (args, format);
+ va_list args_copy;
+ va_copy (args_copy, args);
+
+ const char *str = "";
+ int number = 0;
+ float fnumber = 0;
+
+ while (*format)
+ {
+ switch (*format++)
+ {
+ case 's': // string
+ str = va_arg (args_copy, const char *);
+ break;
+ case 'd': // int
+ number = va_arg (args_copy, int);
+ break;
+ case 'f': // float
+ fnumber = va_arg (args_copy, double);
+ break;
+ default:
+ break;
+ }
+ }
+ va_end (args_copy);
+ va_end (args);
+
+ return *str && number && fnumber;
+}
+// Check _Alignas.
+char _Alignas (double) aligned_as_double;
+char _Alignas (0) no_special_alignment;
+extern char aligned_as_int;
+char _Alignas (0) _Alignas (int) aligned_as_int;
+
+// Check _Alignof.
+enum
+{
+ int_alignment = _Alignof (int),
+ int_array_alignment = _Alignof (int[100]),
+ char_alignment = _Alignof (char)
+};
+_Static_assert (0 < -_Alignof (int), "_Alignof is signed");
+
+// Check _Noreturn.
+int _Noreturn does_not_return (void) { for (;;) continue; }
+
+// Check _Static_assert.
+struct test_static_assert
+{
+ int x;
+ _Static_assert (sizeof (int) <= sizeof (long int),
+ "_Static_assert does not work in struct");
+ long int y;
+};
+
+// Check UTF-8 literals.
+#define u8 syntax error!
+char const utf8_literal[] = u8"happens to be ASCII" "another string";
+
+// Check duplicate typedefs.
+typedef long *long_ptr;
+typedef long int *long_ptr;
+typedef long_ptr long_ptr;
+
+// Anonymous structures and unions -- taken from C11 6.7.2.1 Example 1.
+struct anonymous
+{
+ union {
+ struct { int i; int j; };
+ struct { int k; long int l; } w;
+ };
+ int m;
+} v1;
+
+int
+main (void)
+{
+
+ // Check bool.
+ _Bool success = false;
+
+ // Check restrict.
+ if (test_restrict ("String literal") == 0)
+ success = true;
+ char *restrict newvar = "Another string";
+
+ // Check varargs.
+ success &= test_varargs ("s, d' f .", "string", 65, 34.234);
+ test_varargs_macros ();
+
+ // Check flexible array members.
+ struct incomplete_array *ia =
+ malloc (sizeof (struct incomplete_array) + (sizeof (double) * 10));
+ ia->datasize = 10;
+ for (int i = 0; i < ia->datasize; ++i)
+ ia->data[i] = i * 1.234;
+
+ // Check named initializers.
+ struct named_init ni = {
+ .number = 34,
+ .name = L"Test wide string",
+ .average = 543.34343,
+ };
+
+ ni.number = 58;
+
+ int dynamic_array[ni.number];
+ dynamic_array[ni.number - 1] = 543;
+
+ // work around unused variable warnings
+ return (!success || bignum == 0LL || ubignum == 0uLL || newvar[0] == 'x'
+ || dynamic_array[ni.number - 1] != 543);
+
+ v1.i = 2;
+ v1.w.k = 5;
+ _Static_assert ((offsetof (struct anonymous, i)
+ == offsetof (struct anonymous, w.k)),
+ "Anonymous union alignment botch");
+
+ ;
+ return 0;
+}
+_ACEOF
+for ac_arg in '' -std=gnu11
+do
+ CC="$ac_save_CC $ac_arg"
+ if ac_fn_c_try_compile "$LINENO"
+then :
+ ac_cv_prog_cc_c11=$ac_arg
+fi
+rm -f core conftest.err conftest.$ac_objext
+ test "x$ac_cv_prog_cc_c11" != "xno" && break
+done
+rm -f conftest.$ac_ext
+CC=$ac_save_CC
+
+fi
+# AC_CACHE_VAL
+ac_prog_cc_stdc_options=
+case "x$ac_cv_prog_cc_c11" in
+ x)
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
+printf "%s\n" "none needed" >&6; } ;;
+ xno)
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
+printf "%s\n" "unsupported" >&6; } ;;
+ *)
+ ac_prog_cc_stdc_options=" $ac_cv_prog_cc_c11"
+ CC=$CC$ac_prog_cc_stdc_options
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c11" >&5
+printf "%s\n" "$ac_cv_prog_cc_c11" >&6; } ;;
+esac
+if test "x$ac_cv_prog_cc_c11" != xno
+then :
+ ac_prog_cc_stdc=c11
+ ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c11
+else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C99 features" >&5
+printf %s "checking for $CC option to enable C99 features... " >&6; }
+if test ${ac_cv_prog_cc_c99+y}
+then :
+ printf %s "(cached) " >&6
+else
+ ac_cv_prog_cc_c99=no
+ac_save_CC=$CC
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <stdarg.h>
+#include <stdbool.h>
+#include <stddef.h>
+#include <stdlib.h>
+#include <wchar.h>
+#include <stdio.h>
+
+// Check varargs macros. These examples are taken from C99 6.10.3.5.
+#define debug(...) fprintf (stderr, __VA_ARGS__)
+#define showlist(...) puts (#__VA_ARGS__)
+#define report(test,...) ((test) ? puts (#test) : printf (__VA_ARGS__))
+static void
+test_varargs_macros (void)
+{
+ int x = 1234;
+ int y = 5678;
+ debug ("Flag");
+ debug ("X = %d\n", x);
+ showlist (The first, second, and third items.);
+ report (x>y, "x is %d but y is %d", x, y);
+}
+
+// Check long long types.
+#define BIG64 18446744073709551615ull
+#define BIG32 4294967295ul
+#define BIG_OK (BIG64 / BIG32 == 4294967297ull && BIG64 % BIG32 == 0)
+#if !BIG_OK
+ your preprocessor is broken;
+#endif
+#if BIG_OK
+#else
+ your preprocessor is broken;
+#endif
+static long long int bignum = -9223372036854775807LL;
+static unsigned long long int ubignum = BIG64;
+
+struct incomplete_array
+{
+ int datasize;
+ double data[];
+};
+
+struct named_init {
+ int number;
+ const wchar_t *name;
+ double average;
+};
+
+typedef const char *ccp;
+
+static inline int
+test_restrict (ccp restrict text)
+{
+ // See if C++-style comments work.
+ // Iterate through items via the restricted pointer.
+ // Also check for declarations in for loops.
+ for (unsigned int i = 0; *(text+i) != '\0'; ++i)
+ continue;
+ return 0;
+}
+
+// Check varargs and va_copy.
+static bool
+test_varargs (const char *format, ...)
+{
+ va_list args;
+ va_start (args, format);
+ va_list args_copy;
+ va_copy (args_copy, args);
+
+ const char *str = "";
+ int number = 0;
+ float fnumber = 0;
+
+ while (*format)
+ {
+ switch (*format++)
+ {
+ case 's': // string
+ str = va_arg (args_copy, const char *);
+ break;
+ case 'd': // int
+ number = va_arg (args_copy, int);
+ break;
+ case 'f': // float
+ fnumber = va_arg (args_copy, double);
+ break;
+ default:
+ break;
+ }
+ }
+ va_end (args_copy);
+ va_end (args);
+
+ return *str && number && fnumber;
+}
+int
+main (void)
+{
+
+ // Check bool.
+ _Bool success = false;
+
+ // Check restrict.
+ if (test_restrict ("String literal") == 0)
+ success = true;
+ char *restrict newvar = "Another string";
+
+ // Check varargs.
+ success &= test_varargs ("s, d' f .", "string", 65, 34.234);
+ test_varargs_macros ();
+
+ // Check flexible array members.
+ struct incomplete_array *ia =
+ malloc (sizeof (struct incomplete_array) + (sizeof (double) * 10));
+ ia->datasize = 10;
+ for (int i = 0; i < ia->datasize; ++i)
+ ia->data[i] = i * 1.234;
+
+ // Check named initializers.
+ struct named_init ni = {
+ .number = 34,
+ .name = L"Test wide string",
+ .average = 543.34343,
+ };
+
+ ni.number = 58;
+
+ int dynamic_array[ni.number];
+ dynamic_array[ni.number - 1] = 543;
+
+ // work around unused variable warnings
+ return (!success || bignum == 0LL || ubignum == 0uLL || newvar[0] == 'x'
+ || dynamic_array[ni.number - 1] != 543);
+
+ ;
+ return 0;
+}
+_ACEOF
+for ac_arg in '' -std=gnu99 -std=c99 -c99 -AC99 -D_STDC_C99= -qlanglvl=extc1x -qlanglvl=extc99
+do
+ CC="$ac_save_CC $ac_arg"
+ if ac_fn_c_try_compile "$LINENO"
+then :
+ ac_cv_prog_cc_c99=$ac_arg
+fi
+rm -f core conftest.err conftest.$ac_objext
+ test "x$ac_cv_prog_cc_c99" != "xno" && break
+done
+rm -f conftest.$ac_ext
+CC=$ac_save_CC
+
+fi
+# AC_CACHE_VAL
+ac_prog_cc_stdc_options=
+case "x$ac_cv_prog_cc_c99" in
+ x)
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
+printf "%s\n" "none needed" >&6; } ;;
+ xno)
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
+printf "%s\n" "unsupported" >&6; } ;;
+ *)
+ ac_prog_cc_stdc_options=" $ac_cv_prog_cc_c99"
+ CC=$CC$ac_prog_cc_stdc_options
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c99" >&5
+printf "%s\n" "$ac_cv_prog_cc_c99" >&6; } ;;
+esac
+if test "x$ac_cv_prog_cc_c99" != xno
+then :
+ ac_prog_cc_stdc=c99
+ ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c99
+else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C89 features" >&5
+printf %s "checking for $CC option to enable C89 features... " >&6; }
+if test ${ac_cv_prog_cc_c89+y}
+then :
+ printf %s "(cached) " >&6
else
ac_cv_prog_cc_c89=no
ac_save_CC=$CC
@@ -4570,7 +5365,7 @@ int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, i
int argc;
char **argv;
int
-main ()
+main (void)
{
return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
;
@@ -4581,7 +5376,8 @@ for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
-Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
do
CC="$ac_save_CC $ac_arg"
- if ac_fn_c_try_compile "$LINENO"; then :
+ if ac_fn_c_try_compile "$LINENO"
+then :
ac_cv_prog_cc_c89=$ac_arg
fi
rm -f core conftest.err conftest.$ac_objext
@@ -4592,19 +5388,30 @@ CC=$ac_save_CC
fi
# AC_CACHE_VAL
+ac_prog_cc_stdc_options=
case "x$ac_cv_prog_cc_c89" in
x)
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
-$as_echo "none needed" >&6; } ;;
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
+printf "%s\n" "none needed" >&6; } ;;
xno)
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
-$as_echo "unsupported" >&6; } ;;
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
+printf "%s\n" "unsupported" >&6; } ;;
*)
- CC="$CC $ac_cv_prog_cc_c89"
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
-$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
+ ac_prog_cc_stdc_options=" $ac_cv_prog_cc_c89"
+ CC=$CC$ac_prog_cc_stdc_options
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
+printf "%s\n" "$ac_cv_prog_cc_c89" >&6; } ;;
esac
-if test "x$ac_cv_prog_cc_c89" != xno; then :
+if test "x$ac_cv_prog_cc_c89" != xno
+then :
+ ac_prog_cc_stdc=c89
+ ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c89
+else
+ ac_prog_cc_stdc=no
+ ac_cv_prog_cc_stdc=no
+fi
+
+fi
fi
@@ -4613,76 +5420,74 @@ 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
-DEPDIR="${am__leading_dot}deps"
-
-ac_config_commands="$ac_config_commands depfiles"
-
-
-am_make=${MAKE-make}
-cat > confinc << 'END'
-am__doit:
- @echo this is the am__doit target
-.PHONY: am__doit
-END
-# If we don't find an include directive, just comment out the code.
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for style of include used by $am_make" >&5
-$as_echo_n "checking for style of include used by $am_make... " >&6; }
-am__include="#"
-am__quote=
-_am_result=none
-# First try GNU make style include.
-echo "include confinc" > confmf
-# Ignore all kinds of additional output from 'make'.
-case `$am_make -s -f confmf 2> /dev/null` in #(
-*the\ am__doit\ target*)
- am__include=include
- am__quote=
- _am_result=GNU
- ;;
-esac
-# Now try BSD make style include.
-if test "$am__include" = "#"; then
- echo '.include "confinc"' > confmf
- case `$am_make -s -f confmf 2> /dev/null` in #(
- *the\ am__doit\ target*)
- am__include=.include
- am__quote="\""
- _am_result=BSD
- ;;
- esac
-fi
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $_am_result" >&5
-$as_echo "$_am_result" >&6; }
-rm -f confinc confmf
+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 $CC understands -c and -o together" >&5
+printf %s "checking whether $CC understands -c and -o together... " >&6; }
+if test ${am_cv_prog_cc_c_o+y}
+then :
+ printf %s "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
-# Check whether --enable-dependency-tracking was given.
-if test "${enable_dependency_tracking+set}" = set; then :
- enableval=$enable_dependency_tracking;
-fi
+int
+main (void)
+{
-if test "x$enable_dependency_tracking" != xno; then
- am_depcomp="$ac_aux_dir/depcomp"
- AMDEPBACKSLASH='\'
- am__nodep='_no'
-fi
- if test "x$enable_dependency_tracking" != xno; then
- AMDEP_TRUE=
- AMDEP_FALSE='#'
-else
- AMDEP_TRUE='#'
- AMDEP_FALSE=
+ ;
+ return 0;
+}
+_ACEOF
+ # Make sure it works both with $CC and with simple cc.
+ # Following AC_PROG_CC_C_O, we do the test twice because some
+ # compilers refuse to overwrite an existing .o file with -o,
+ # though they will create one.
+ am_cv_prog_cc_c_o=yes
+ for am_i in 1 2; do
+ if { echo "$as_me:$LINENO: $CC -c conftest.$ac_ext -o conftest2.$ac_objext" >&5
+ ($CC -c conftest.$ac_ext -o conftest2.$ac_objext) >&5 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } \
+ && test -f conftest2.$ac_objext; then
+ : OK
+ else
+ am_cv_prog_cc_c_o=no
+ break
+ fi
+ done
+ rm -f core conftest*
+ unset am_i
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_cc_c_o" >&5
+printf "%s\n" "$am_cv_prog_cc_c_o" >&6; }
+if test "$am_cv_prog_cc_c_o" != yes; then
+ # Losing compiler, so override with the script.
+ # FIXME: It is wrong to rewrite CC.
+ # 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__CC in this case,
+ # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)"
+ CC="$am_aux_dir/compile $CC"
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
depcc="$CC" am_compiler_list=
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
-$as_echo_n "checking dependency style of $depcc... " >&6; }
-if ${am_cv_CC_dependencies_compiler_type+:} false; then :
- $as_echo_n "(cached) " >&6
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
+printf %s "checking dependency style of $depcc... " >&6; }
+if test ${am_cv_CC_dependencies_compiler_type+y}
+then :
+ printf %s "(cached) " >&6
else
if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
# We make a subdir and do the tests there. Otherwise we can end up
@@ -4790,8 +5595,8 @@ else
fi
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5
-$as_echo "$am_cv_CC_dependencies_compiler_type" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5
+printf "%s\n" "$am_cv_CC_dependencies_compiler_type" >&6; }
CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
if
@@ -4806,20 +5611,189 @@ fi
+
+
+ac_header= ac_cache=
+for ac_item in $ac_header_c_list
+do
+ if test $ac_cache; then
+ ac_fn_c_check_header_compile "$LINENO" $ac_header ac_cv_header_$ac_cache "$ac_includes_default"
+ if eval test \"x\$ac_cv_header_$ac_cache\" = xyes; then
+ printf "%s\n" "#define $ac_item 1" >> confdefs.h
+ fi
+ ac_header= ac_cache=
+ elif test $ac_header; then
+ ac_cache=$ac_item
+ else
+ ac_header=$ac_item
+ fi
+done
+
+
+
+
+
+
+printf "%s\n" "#define HAVE_STDLIB_H 1" >>confdefs.h
+
+printf "%s\n" "#define HAVE_STRING_H 1" >>confdefs.h
+
+printf "%s\n" "#define STDC_HEADERS 1" >>confdefs.h
+
+
+ ac_fn_c_check_header_compile "$LINENO" "minix/config.h" "ac_cv_header_minix_config_h" "$ac_includes_default"
+if test "x$ac_cv_header_minix_config_h" = xyes
+then :
+ MINIX=yes
+else
+ MINIX=
+fi
+
+ if test "$MINIX" = yes; then
+
+printf "%s\n" "#define _POSIX_SOURCE 1" >>confdefs.h
+
+
+printf "%s\n" "#define _POSIX_1_SOURCE 2" >>confdefs.h
+
+
+printf "%s\n" "#define _MINIX 1" >>confdefs.h
+
+
+printf "%s\n" "#define _NETBSD_SOURCE 1" >>confdefs.h
+
+ fi
+
+
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
+printf %s "checking whether it is safe to define __EXTENSIONS__... " >&6; }
+if test ${ac_cv_safe_to_define___extensions__+y}
+then :
+ printf %s "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+# define __EXTENSIONS__ 1
+ $ac_includes_default
+int
+main (void)
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"
+then :
+ ac_cv_safe_to_define___extensions__=yes
+else
+ ac_cv_safe_to_define___extensions__=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_safe_to_define___extensions__" >&5
+printf "%s\n" "$ac_cv_safe_to_define___extensions__" >&6; }
+ test $ac_cv_safe_to_define___extensions__ = yes &&
+ printf "%s\n" "#define __EXTENSIONS__ 1" >>confdefs.h
+
+ printf "%s\n" "#define _ALL_SOURCE 1" >>confdefs.h
+
+ printf "%s\n" "#define _DARWIN_C_SOURCE 1" >>confdefs.h
+
+ printf "%s\n" "#define _GNU_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
+
+ printf "%s\n" "#define __STDC_WANT_IEC_60559_BFP_EXT__ 1" >>confdefs.h
+
+ printf "%s\n" "#define __STDC_WANT_IEC_60559_DFP_EXT__ 1" >>confdefs.h
+
+ printf "%s\n" "#define __STDC_WANT_IEC_60559_FUNCS_EXT__ 1" >>confdefs.h
+
+ printf "%s\n" "#define __STDC_WANT_IEC_60559_TYPES_EXT__ 1" >>confdefs.h
+
+ printf "%s\n" "#define __STDC_WANT_LIB_EXT2__ 1" >>confdefs.h
+
+ printf "%s\n" "#define __STDC_WANT_MATH_SPEC_FUNCS__ 1" >>confdefs.h
+
+ printf "%s\n" "#define _TANDEM_SOURCE 1" >>confdefs.h
+
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether _XOPEN_SOURCE should be defined" >&5
+printf %s "checking whether _XOPEN_SOURCE should be defined... " >&6; }
+if test ${ac_cv_should_define__xopen_source+y}
+then :
+ printf %s "(cached) " >&6
+else
+ ac_cv_should_define__xopen_source=no
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+ #include <wchar.h>
+ mbstate_t x;
+int
+main (void)
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"
+then :
+
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+ #define _XOPEN_SOURCE 500
+ #include <wchar.h>
+ mbstate_t x;
+int
+main (void)
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"
+then :
+ ac_cv_should_define__xopen_source=yes
+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
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_should_define__xopen_source" >&5
+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
+
+
+
+
+
+
+
+
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
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
-$as_echo_n "checking how to run the C preprocessor... " >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
+printf %s "checking how to run the C preprocessor... " >&6; }
# On Suns, sometimes $CPP names a directory.
if test -n "$CPP" && test -d "$CPP"; then
CPP=
fi
if test -z "$CPP"; then
- if ${ac_cv_prog_CPP+:} false; then :
- $as_echo_n "(cached) " >&6
+ if test ${ac_cv_prog_CPP+y}
+then :
+ printf %s "(cached) " >&6
else
# Double quotes because CPP needs to be expanded
for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
@@ -4829,20 +5803,15 @@ for ac_c_preproc_warn_flag in '' yes
do
# Use a header file that comes with gcc, so configuring glibc
# with a fresh cross-compiler works.
- # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
- # <limits.h> exists even on freestanding compilers.
# On the NeXT, cc -E runs the code through the compiler's parser,
# not just through cpp. "Syntax error" is here to catch this case.
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
+#include <limits.h>
Syntax error
_ACEOF
-if ac_fn_c_try_cpp "$LINENO"; then :
+if ac_fn_c_try_cpp "$LINENO"
+then :
else
# Broken: fails on valid input.
@@ -4856,7 +5825,8 @@ rm -f conftest.err conftest.i conftest.$ac_ext
/* end confdefs.h. */
#include <ac_nonexistent.h>
_ACEOF
-if ac_fn_c_try_cpp "$LINENO"; then :
+if ac_fn_c_try_cpp "$LINENO"
+then :
# Broken: success on invalid input.
continue
else
@@ -4869,7 +5839,8 @@ rm -f conftest.err conftest.i conftest.$ac_ext
done
# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
rm -f conftest.i conftest.err conftest.$ac_ext
-if $ac_preproc_ok; then :
+if $ac_preproc_ok
+then :
break
fi
@@ -4881,27 +5852,22 @@ fi
else
ac_cv_prog_CPP=$CPP
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
-$as_echo "$CPP" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
+printf "%s\n" "$CPP" >&6; }
ac_preproc_ok=false
for ac_c_preproc_warn_flag in '' yes
do
# Use a header file that comes with gcc, so configuring glibc
# with a fresh cross-compiler works.
- # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
- # <limits.h> exists even on freestanding compilers.
# On the NeXT, cc -E runs the code through the compiler's parser,
# not just through cpp. "Syntax error" is here to catch this case.
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
+#include <limits.h>
Syntax error
_ACEOF
-if ac_fn_c_try_cpp "$LINENO"; then :
+if ac_fn_c_try_cpp "$LINENO"
+then :
else
# Broken: fails on valid input.
@@ -4915,7 +5881,8 @@ rm -f conftest.err conftest.i conftest.$ac_ext
/* end confdefs.h. */
#include <ac_nonexistent.h>
_ACEOF
-if ac_fn_c_try_cpp "$LINENO"; then :
+if ac_fn_c_try_cpp "$LINENO"
+then :
# Broken: success on invalid input.
continue
else
@@ -4928,11 +5895,12 @@ rm -f conftest.err conftest.i conftest.$ac_ext
done
# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
rm -f conftest.i conftest.err conftest.$ac_ext
-if $ac_preproc_ok; then :
+if $ac_preproc_ok
+then :
else
- { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
See \`config.log' for more details" "$LINENO" 5; }
fi
@@ -4944,10 +5912,11 @@ ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $
ac_compiler_gnu=$ac_cv_c_compiler_gnu
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
-$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
-if ${ac_cv_path_GREP+:} false; then :
- $as_echo_n "(cached) " >&6
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
+printf %s "checking for grep that handles long lines and -e... " >&6; }
+if test ${ac_cv_path_GREP+y}
+then :
+ printf %s "(cached) " >&6
else
if test -z "$GREP"; then
ac_path_GREP_found=false
@@ -4956,10 +5925,15 @@ else
for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
do
IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_prog in grep ggrep; do
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
+ for ac_prog in grep ggrep
+ do
for ac_exec_ext in '' $ac_executable_extensions; do
- ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
+ ac_path_GREP="$as_dir$ac_prog$ac_exec_ext"
as_fn_executable_p "$ac_path_GREP" || continue
# Check for GNU ac_path_GREP and select it if it is found.
# Check for GNU $ac_path_GREP
@@ -4968,13 +5942,13 @@ case `"$ac_path_GREP" --version 2>&1` in
ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
*)
ac_count=0
- $as_echo_n 0123456789 >"conftest.in"
+ printf %s 0123456789 >"conftest.in"
while :
do
cat "conftest.in" "conftest.in" >"conftest.tmp"
mv "conftest.tmp" "conftest.in"
cp "conftest.in" "conftest.nl"
- $as_echo 'GREP' >> "conftest.nl"
+ printf "%s\n" 'GREP' >> "conftest.nl"
"$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
as_fn_arith $ac_count + 1 && ac_count=$as_val
@@ -5002,15 +5976,16 @@ else
fi
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
-$as_echo "$ac_cv_path_GREP" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
+printf "%s\n" "$ac_cv_path_GREP" >&6; }
GREP="$ac_cv_path_GREP"
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
-$as_echo_n "checking for egrep... " >&6; }
-if ${ac_cv_path_EGREP+:} false; then :
- $as_echo_n "(cached) " >&6
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
+printf %s "checking for egrep... " >&6; }
+if test ${ac_cv_path_EGREP+y}
+then :
+ printf %s "(cached) " >&6
else
if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
then ac_cv_path_EGREP="$GREP -E"
@@ -5022,10 +5997,15 @@ else
for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
do
IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_prog in egrep; do
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
+ for ac_prog in egrep
+ do
for ac_exec_ext in '' $ac_executable_extensions; do
- ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
+ ac_path_EGREP="$as_dir$ac_prog$ac_exec_ext"
as_fn_executable_p "$ac_path_EGREP" || continue
# Check for GNU ac_path_EGREP and select it if it is found.
# Check for GNU $ac_path_EGREP
@@ -5034,13 +6014,13 @@ case `"$ac_path_EGREP" --version 2>&1` in
ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
*)
ac_count=0
- $as_echo_n 0123456789 >"conftest.in"
+ printf %s 0123456789 >"conftest.in"
while :
do
cat "conftest.in" "conftest.in" >"conftest.tmp"
mv "conftest.tmp" "conftest.in"
cp "conftest.in" "conftest.nl"
- $as_echo 'EGREP' >> "conftest.nl"
+ printf "%s\n" 'EGREP' >> "conftest.nl"
"$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
as_fn_arith $ac_count + 1 && ac_count=$as_val
@@ -5069,17 +6049,19 @@ fi
fi
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
-$as_echo "$ac_cv_path_EGREP" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
+printf "%s\n" "$ac_cv_path_EGREP" >&6; }
EGREP="$ac_cv_path_EGREP"
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Minix Amsterdam compiler" >&5
-$as_echo_n "checking for Minix Amsterdam compiler... " >&6; }
-if ${gl_cv_c_amsterdam_compiler+:} false; then :
- $as_echo_n "(cached) " >&6
+
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for Minix Amsterdam compiler" >&5
+printf %s "checking for Minix Amsterdam compiler... " >&6; }
+if test ${gl_cv_c_amsterdam_compiler+y}
+then :
+ printf %s "(cached) " >&6
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -5091,31 +6073,220 @@ Amsterdam
_ACEOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- $EGREP "Amsterdam" >/dev/null 2>&1; then :
+ $EGREP "Amsterdam" >/dev/null 2>&1
+then :
gl_cv_c_amsterdam_compiler=yes
else
gl_cv_c_amsterdam_compiler=no
fi
-rm -f conftest*
+rm -rf conftest*
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_c_amsterdam_compiler" >&5
-$as_echo "$gl_cv_c_amsterdam_compiler" >&6; }
- if test -z "$AR"; then
- if test $gl_cv_c_amsterdam_compiler = yes; then
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_c_amsterdam_compiler" >&5
+printf "%s\n" "$gl_cv_c_amsterdam_compiler" >&6; }
+
+ if test $gl_cv_c_amsterdam_compiler = yes; then
+ if test -z "$AR"; then
AR='cc -c.a'
- if test -z "$ARFLAGS"; then
- ARFLAGS='-o'
+ fi
+ if test -z "$ARFLAGS"; then
+ 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
- else
- if test -n "$ac_tool_prefix"; then
+ 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
# Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
set dummy ${ac_tool_prefix}ar; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_AR+:} false; then :
- $as_echo_n "(cached) " >&6
+{ 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.
@@ -5124,11 +6295,15 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
+ 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
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
ac_cv_prog_AR="${ac_tool_prefix}ar"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
break 2
fi
done
@@ -5139,11 +6314,11 @@ fi
fi
AR=$ac_cv_prog_AR
if test -n "$AR"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
-$as_echo "$AR" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
+printf "%s\n" "$AR" >&6; }
else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
fi
@@ -5152,10 +6327,11 @@ if test -z "$ac_cv_prog_AR"; then
ac_ct_AR=$AR
# Extract the first word of "ar", so it can be a program name with args.
set dummy ar; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_ac_ct_AR+:} false; then :
- $as_echo_n "(cached) " >&6
+{ 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.
@@ -5164,11 +6340,15 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
+ 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
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
ac_cv_prog_ac_ct_AR="ar"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
break 2
fi
done
@@ -5179,11 +6359,11 @@ fi
fi
ac_ct_AR=$ac_cv_prog_ac_ct_AR
if test -n "$ac_ct_AR"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
-$as_echo "$ac_ct_AR" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
+printf "%s\n" "$ac_ct_AR" >&6; }
else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
fi
if test "x$ac_ct_AR" = x; then
@@ -5191,8 +6371,8 @@ fi
else
case $cross_compiling:$ac_tool_warned in
yes:)
-{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
-$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+{ 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
@@ -5201,17 +6381,12 @@ else
AR="$ac_cv_prog_AR"
fi
- if test -z "$ARFLAGS"; then
- ARFLAGS='cru'
- fi
- fi
- else
- if test -z "$ARFLAGS"; then
- ARFLAGS='cru'
- fi
+ if test -z "$ARFLAGS"; then
+ ARFLAGS='cr'
fi
+
if test -z "$RANLIB"; then
if test $gl_cv_c_amsterdam_compiler = yes; then
RANLIB=':'
@@ -5219,10 +6394,11 @@ fi
if test -n "$ac_tool_prefix"; then
# Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
set dummy ${ac_tool_prefix}ranlib; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_RANLIB+:} false; then :
- $as_echo_n "(cached) " >&6
+{ 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_RANLIB+y}
+then :
+ printf %s "(cached) " >&6
else
if test -n "$RANLIB"; then
ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
@@ -5231,11 +6407,15 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
+ 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
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
break 2
fi
done
@@ -5246,11 +6426,11 @@ fi
fi
RANLIB=$ac_cv_prog_RANLIB
if test -n "$RANLIB"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
-$as_echo "$RANLIB" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
+printf "%s\n" "$RANLIB" >&6; }
else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
fi
@@ -5259,10 +6439,11 @@ if test -z "$ac_cv_prog_RANLIB"; then
ac_ct_RANLIB=$RANLIB
# Extract the first word of "ranlib", so it can be a program name with args.
set dummy ranlib; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
- $as_echo_n "(cached) " >&6
+{ 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_RANLIB+y}
+then :
+ printf %s "(cached) " >&6
else
if test -n "$ac_ct_RANLIB"; then
ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
@@ -5271,11 +6452,15 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
+ 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
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
ac_cv_prog_ac_ct_RANLIB="ranlib"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
break 2
fi
done
@@ -5286,11 +6471,11 @@ fi
fi
ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
if test -n "$ac_ct_RANLIB"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
-$as_echo "$ac_ct_RANLIB" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
+printf "%s\n" "$ac_ct_RANLIB" >&6; }
else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
fi
if test "x$ac_ct_RANLIB" = x; then
@@ -5298,8 +6483,8 @@ fi
else
case $cross_compiling:$ac_tool_warned in
yes:)
-{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
-$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+{ 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
RANLIB=$ac_ct_RANLIB
@@ -5312,304 +6497,96 @@ fi
fi
-# Make sure we can run config.sub.
-$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
- as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
-$as_echo_n "checking build system type... " >&6; }
-if ${ac_cv_build+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- ac_build_alias=$build_alias
-test "x$ac_build_alias" = x &&
- ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
-test "x$ac_build_alias" = x &&
- as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
-ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
- as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
-$as_echo "$ac_cv_build" >&6; }
-case $ac_cv_build in
-*-*-*) ;;
-*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
-esac
-build=$ac_cv_build
-ac_save_IFS=$IFS; IFS='-'
-set x $ac_cv_build
-shift
-build_cpu=$1
-build_vendor=$2
-shift; shift
-# Remember, the first character of IFS is used to create $*,
-# except with old shells:
-build_os=$*
-IFS=$ac_save_IFS
-case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
-
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
-$as_echo_n "checking host system type... " >&6; }
-if ${ac_cv_host+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- if test "x$host_alias" = x; then
- ac_cv_host=$ac_cv_build
-else
- ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
- as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
-fi
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
-$as_echo "$ac_cv_host" >&6; }
-case $ac_cv_host in
-*-*-*) ;;
-*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
-esac
-host=$ac_cv_host
-ac_save_IFS=$IFS; IFS='-'
-set x $ac_cv_host
-shift
-host_cpu=$1
-host_vendor=$2
-shift; shift
-# Remember, the first character of IFS is used to create $*,
-# except with old shells:
-host_os=$*
-IFS=$ac_save_IFS
-case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
-
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
-$as_echo_n "checking for ANSI C header files... " >&6; }
-if ${ac_cv_header_stdc+:} false; then :
- $as_echo_n "(cached) " >&6
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for _LARGEFILE_SOURCE value needed for large files" >&5
+printf %s "checking for _LARGEFILE_SOURCE value needed for large files... " >&6; }
+if test ${ac_cv_sys_largefile_source+y}
+then :
+ printf %s "(cached) " >&6
else
+ while :; do
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
-#include <stdlib.h>
-#include <stdarg.h>
-#include <string.h>
-#include <float.h>
-
+#include <sys/types.h> /* for off_t */
+ #include <stdio.h>
int
-main ()
+main (void)
{
-
+int (*fp) (FILE *, off_t, int) = fseeko;
+ return fseeko (stdin, 0, 0) && fp (stdin, 0, 0);
;
return 0;
}
_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
- ac_cv_header_stdc=yes
-else
- ac_cv_header_stdc=no
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-
-if test $ac_cv_header_stdc = yes; then
- # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-#include <string.h>
-
-_ACEOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- $EGREP "memchr" >/dev/null 2>&1; then :
-
-else
- ac_cv_header_stdc=no
-fi
-rm -f conftest*
-
-fi
-
-if test $ac_cv_header_stdc = yes; then
- # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-#include <stdlib.h>
-
-_ACEOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- $EGREP "free" >/dev/null 2>&1; then :
-
-else
- ac_cv_header_stdc=no
-fi
-rm -f conftest*
-
+if ac_fn_c_try_link "$LINENO"
+then :
+ ac_cv_sys_largefile_source=no; break
fi
-
-if test $ac_cv_header_stdc = yes; then
- # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
- if test "$cross_compiling" = yes; then :
- :
-else
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
-#include <ctype.h>
-#include <stdlib.h>
-#if ((' ' & 0x0FF) == 0x020)
-# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
-# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
-#else
-# define ISLOWER(c) \
- (('a' <= (c) && (c) <= 'i') \
- || ('j' <= (c) && (c) <= 'r') \
- || ('s' <= (c) && (c) <= 'z'))
-# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
-#endif
-
-#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
+#define _LARGEFILE_SOURCE 1
+#include <sys/types.h> /* for off_t */
+ #include <stdio.h>
int
-main ()
+main (void)
{
- int i;
- for (i = 0; i < 256; i++)
- if (XOR (islower (i), ISLOWER (i))
- || toupper (i) != TOUPPER (i))
- return 2;
+int (*fp) (FILE *, off_t, int) = fseeko;
+ return fseeko (stdin, 0, 0) && fp (stdin, 0, 0);
+ ;
return 0;
}
_ACEOF
-if ac_fn_c_try_run "$LINENO"; then :
-
-else
- ac_cv_header_stdc=no
-fi
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
- conftest.$ac_objext conftest.beam conftest.$ac_ext
+if ac_fn_c_try_link "$LINENO"
+then :
+ ac_cv_sys_largefile_source=1; break
fi
-
-fi
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
-$as_echo "$ac_cv_header_stdc" >&6; }
-if test $ac_cv_header_stdc = yes; then
-
-$as_echo "#define STDC_HEADERS 1" >>confdefs.h
-
-fi
-
-# On IRIX 5.3, sys/types and inttypes.h are conflicting.
-for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
- inttypes.h stdint.h unistd.h
-do :
- as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
-ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
-"
-if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
- cat >>confdefs.h <<_ACEOF
-#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
-_ACEOF
-
-fi
-
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+ ac_cv_sys_largefile_source=unknown
+ break
done
-
-
-
-
-
- ac_fn_c_check_header_mongrel "$LINENO" "minix/config.h" "ac_cv_header_minix_config_h" "$ac_includes_default"
-if test "x$ac_cv_header_minix_config_h" = xyes; then :
- MINIX=yes
-else
- MINIX=
fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_source" >&5
+printf "%s\n" "$ac_cv_sys_largefile_source" >&6; }
+case $ac_cv_sys_largefile_source in #(
+ no | unknown) ;;
+ *)
+printf "%s\n" "#define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source" >>confdefs.h
+;;
+esac
+rm -rf conftest*
+# We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
+# in glibc 2.1.3, but that breaks too many other things.
+# If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
+if test $ac_cv_sys_largefile_source != unknown; then
- if test "$MINIX" = yes; then
-
-$as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
-
-
-$as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
-
-
-$as_echo "#define _MINIX 1" >>confdefs.h
-
- fi
-
- case "$host_os" in
- hpux*)
-
-$as_echo "#define _XOPEN_SOURCE 500" >>confdefs.h
-
- ;;
- esac
-
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
-$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
-if ${ac_cv_safe_to_define___extensions__+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-# define __EXTENSIONS__ 1
- $ac_includes_default
-int
-main ()
-{
+printf "%s\n" "#define HAVE_FSEEKO 1" >>confdefs.h
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
- ac_cv_safe_to_define___extensions__=yes
-else
- ac_cv_safe_to_define___extensions__=no
fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
-$as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
- test $ac_cv_safe_to_define___extensions__ = yes &&
- $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
-
- $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
-
- $as_echo "#define _DARWIN_C_SOURCE 1" >>confdefs.h
-
- $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
-
- $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
-
- $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
-
-
-
-
-
-
-
# Check whether --enable-largefile was given.
-if test "${enable_largefile+set}" = set; then :
+if test ${enable_largefile+y}
+then :
enableval=$enable_largefile;
fi
if test "$enable_largefile" != no; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5
-$as_echo_n "checking for special C compiler options needed for large files... " >&6; }
-if ${ac_cv_sys_largefile_CC+:} false; then :
- $as_echo_n "(cached) " >&6
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5
+printf %s "checking for special C compiler options needed for large files... " >&6; }
+if test ${ac_cv_sys_largefile_CC+y}
+then :
+ printf %s "(cached) " >&6
else
ac_cv_sys_largefile_CC=no
if test "$GCC" != yes; then
ac_save_CC=$CC
while :; do
- # IRIX 6.2 and later do not support large files by default,
- # so use the C compiler's -n32 option if that helps.
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ # IRIX 6.2 and later do not support large files by default,
+ # so use the C compiler's -n32 option if that helps.
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <sys/types.h>
/* Check that off_t can represent 2**63 - 1 correctly.
@@ -5618,41 +6595,44 @@ else
incorrectly reject 9223372036854775807. */
#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
- && LARGE_OFF_T % 2147483647 == 1)
- ? 1 : -1];
+ && LARGE_OFF_T % 2147483647 == 1)
+ ? 1 : -1];
int
-main ()
+main (void)
{
;
return 0;
}
_ACEOF
- if ac_fn_c_try_compile "$LINENO"; then :
+ if ac_fn_c_try_compile "$LINENO"
+then :
break
fi
rm -f core conftest.err conftest.$ac_objext
- CC="$CC -n32"
- if ac_fn_c_try_compile "$LINENO"; then :
+ CC="$CC -n32"
+ if ac_fn_c_try_compile "$LINENO"
+then :
ac_cv_sys_largefile_CC=' -n32'; break
fi
rm -f core conftest.err conftest.$ac_objext
- break
+ break
done
CC=$ac_save_CC
rm -f conftest.$ac_ext
fi
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5
-$as_echo "$ac_cv_sys_largefile_CC" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5
+printf "%s\n" "$ac_cv_sys_largefile_CC" >&6; }
if test "$ac_cv_sys_largefile_CC" != no; then
CC=$CC$ac_cv_sys_largefile_CC
fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5
-$as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; }
-if ${ac_cv_sys_file_offset_bits+:} false; then :
- $as_echo_n "(cached) " >&6
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5
+printf %s "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; }
+if test ${ac_cv_sys_file_offset_bits+y}
+then :
+ printf %s "(cached) " >&6
else
while :; do
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -5664,17 +6644,18 @@ else
incorrectly reject 9223372036854775807. */
#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
- && LARGE_OFF_T % 2147483647 == 1)
- ? 1 : -1];
+ && LARGE_OFF_T % 2147483647 == 1)
+ ? 1 : -1];
int
-main ()
+main (void)
{
;
return 0;
}
_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_c_try_compile "$LINENO"
+then :
ac_cv_sys_file_offset_bits=no; break
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
@@ -5688,17 +6669,18 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
incorrectly reject 9223372036854775807. */
#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
- && LARGE_OFF_T % 2147483647 == 1)
- ? 1 : -1];
+ && LARGE_OFF_T % 2147483647 == 1)
+ ? 1 : -1];
int
-main ()
+main (void)
{
;
return 0;
}
_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_c_try_compile "$LINENO"
+then :
ac_cv_sys_file_offset_bits=64; break
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
@@ -5706,22 +6688,21 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
break
done
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5
-$as_echo "$ac_cv_sys_file_offset_bits" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5
+printf "%s\n" "$ac_cv_sys_file_offset_bits" >&6; }
case $ac_cv_sys_file_offset_bits in #(
no | unknown) ;;
*)
-cat >>confdefs.h <<_ACEOF
-#define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
-_ACEOF
+printf "%s\n" "#define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits" >>confdefs.h
;;
esac
rm -rf conftest*
if test $ac_cv_sys_file_offset_bits = unknown; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5
-$as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; }
-if ${ac_cv_sys_large_files+:} false; then :
- $as_echo_n "(cached) " >&6
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5
+printf %s "checking for _LARGE_FILES value needed for large files... " >&6; }
+if test ${ac_cv_sys_large_files+y}
+then :
+ printf %s "(cached) " >&6
else
while :; do
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -5733,17 +6714,18 @@ else
incorrectly reject 9223372036854775807. */
#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
- && LARGE_OFF_T % 2147483647 == 1)
- ? 1 : -1];
+ && LARGE_OFF_T % 2147483647 == 1)
+ ? 1 : -1];
int
-main ()
+main (void)
{
;
return 0;
}
_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_c_try_compile "$LINENO"
+then :
ac_cv_sys_large_files=no; break
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
@@ -5757,17 +6739,18 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
incorrectly reject 9223372036854775807. */
#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
- && LARGE_OFF_T % 2147483647 == 1)
- ? 1 : -1];
+ && LARGE_OFF_T % 2147483647 == 1)
+ ? 1 : -1];
int
-main ()
+main (void)
{
;
return 0;
}
_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_c_try_compile "$LINENO"
+then :
ac_cv_sys_large_files=1; break
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
@@ -5775,379 +6758,353 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
break
done
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5
-$as_echo "$ac_cv_sys_large_files" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5
+printf "%s\n" "$ac_cv_sys_large_files" >&6; }
case $ac_cv_sys_large_files in #(
no | unknown) ;;
*)
-cat >>confdefs.h <<_ACEOF
-#define _LARGE_FILES $ac_cv_sys_large_files
-_ACEOF
+printf "%s\n" "#define _LARGE_FILES $ac_cv_sys_large_files" >>confdefs.h
;;
esac
rm -rf conftest*
fi
-fi
-
- case $ac_cv_prog_cc_stdc in #(
- no) :
- ac_cv_prog_cc_c99=no; ac_cv_prog_cc_c89=no ;; #(
- *) :
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C99" >&5
-$as_echo_n "checking for $CC option to accept ISO C99... " >&6; }
-if ${ac_cv_prog_cc_c99+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- ac_cv_prog_cc_c99=no
-ac_save_CC=$CC
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-#include <stdarg.h>
-#include <stdbool.h>
-#include <stdlib.h>
-#include <wchar.h>
-#include <stdio.h>
-
-// Check varargs macros. These examples are taken from C99 6.10.3.5.
-#define debug(...) fprintf (stderr, __VA_ARGS__)
-#define showlist(...) puts (#__VA_ARGS__)
-#define report(test,...) ((test) ? puts (#test) : printf (__VA_ARGS__))
-static void
-test_varargs_macros (void)
-{
- int x = 1234;
- int y = 5678;
- debug ("Flag");
- debug ("X = %d\n", x);
- showlist (The first, second, and third items.);
- report (x>y, "x is %d but y is %d", x, y);
-}
-
-// Check long long types.
-#define BIG64 18446744073709551615ull
-#define BIG32 4294967295ul
-#define BIG_OK (BIG64 / BIG32 == 4294967297ull && BIG64 % BIG32 == 0)
-#if !BIG_OK
- your preprocessor is broken;
-#endif
-#if BIG_OK
-#else
- your preprocessor is broken;
-#endif
-static long long int bignum = -9223372036854775807LL;
-static unsigned long long int ubignum = BIG64;
-
-struct incomplete_array
-{
- int datasize;
- double data[];
-};
-
-struct named_init {
- int number;
- const wchar_t *name;
- double average;
-};
+printf "%s\n" "#define _DARWIN_USE_64_BIT_INODE 1" >>confdefs.h
-typedef const char *ccp;
-
-static inline int
-test_restrict (ccp restrict text)
-{
- // See if C++-style comments work.
- // Iterate through items via the restricted pointer.
- // Also check for declarations in for loops.
- for (unsigned int i = 0; *(text+i) != '\0'; ++i)
- continue;
- return 0;
-}
+fi
-// Check varargs and va_copy.
-static void
-test_varargs (const char *format, ...)
-{
- va_list args;
- va_start (args, format);
- va_list args_copy;
- va_copy (args_copy, args);
+# Make sure we can run config.sub.
+$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
+ as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
- const char *str;
- int number;
- float fnumber;
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
+printf %s "checking build system type... " >&6; }
+if test ${ac_cv_build+y}
+then :
+ printf %s "(cached) " >&6
+else
+ ac_build_alias=$build_alias
+test "x$ac_build_alias" = x &&
+ ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
+test "x$ac_build_alias" = x &&
+ as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
+ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
+ as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
- while (*format)
- {
- switch (*format++)
- {
- case 's': // string
- str = va_arg (args_copy, const char *);
- break;
- case 'd': // int
- number = va_arg (args_copy, int);
- break;
- case 'f': // float
- fnumber = va_arg (args_copy, double);
- break;
- default:
- break;
- }
- }
- va_end (args_copy);
- va_end (args);
-}
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
+printf "%s\n" "$ac_cv_build" >&6; }
+case $ac_cv_build in
+*-*-*) ;;
+*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
+esac
+build=$ac_cv_build
+ac_save_IFS=$IFS; IFS='-'
+set x $ac_cv_build
+shift
+build_cpu=$1
+build_vendor=$2
+shift; shift
+# Remember, the first character of IFS is used to create $*,
+# except with old shells:
+build_os=$*
+IFS=$ac_save_IFS
+case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
-int
-main ()
-{
- // Check bool.
- _Bool success = false;
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
+printf %s "checking host system type... " >&6; }
+if test ${ac_cv_host+y}
+then :
+ printf %s "(cached) " >&6
+else
+ if test "x$host_alias" = x; then
+ ac_cv_host=$ac_cv_build
+else
+ ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
+ as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
+fi
- // Check restrict.
- if (test_restrict ("String literal") == 0)
- success = true;
- char *restrict newvar = "Another string";
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
+printf "%s\n" "$ac_cv_host" >&6; }
+case $ac_cv_host in
+*-*-*) ;;
+*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
+esac
+host=$ac_cv_host
+ac_save_IFS=$IFS; IFS='-'
+set x $ac_cv_host
+shift
+host_cpu=$1
+host_vendor=$2
+shift; shift
+# Remember, the first character of IFS is used to create $*,
+# except with old shells:
+host_os=$*
+IFS=$ac_save_IFS
+case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
- // Check varargs.
- test_varargs ("s, d' f .", "string", 65, 34.234);
- test_varargs_macros ();
- // Check flexible array members.
- struct incomplete_array *ia =
- malloc (sizeof (struct incomplete_array) + (sizeof (double) * 10));
- ia->datasize = 10;
- for (int i = 0; i < ia->datasize; ++i)
- ia->data[i] = i * 1.234;
- // Check named initializers.
- struct named_init ni = {
- .number = 34,
- .name = L"Test wide string",
- .average = 543.34343,
- };
- ni.number = 58;
- int dynamic_array[ni.number];
- dynamic_array[ni.number - 1] = 543;
- // work around unused variable warnings
- return (!success || bignum == 0LL || ubignum == 0uLL || newvar[0] == 'x'
- || dynamic_array[ni.number - 1] != 543);
- ;
- return 0;
-}
-_ACEOF
-for ac_arg in '' -std=gnu99 -std=c99 -c99 -AC99 -D_STDC_C99= -qlanglvl=extc99
-do
- CC="$ac_save_CC $ac_arg"
- if ac_fn_c_try_compile "$LINENO"; then :
- ac_cv_prog_cc_c99=$ac_arg
-fi
-rm -f core conftest.err conftest.$ac_objext
- test "x$ac_cv_prog_cc_c99" != "xno" && break
-done
-rm -f conftest.$ac_ext
-CC=$ac_save_CC
+ # Check whether --enable-threads was given.
+if test ${enable_threads+y}
+then :
+ enableval=$enable_threads; gl_use_threads=$enableval
+else
+ if test -n "$gl_use_threads_default"; then
+ gl_use_threads="$gl_use_threads_default"
+ else
+ case "$host_os" in
+ osf*) gl_use_threads=no ;;
+ cygwin*)
+ case `uname -r` in
+ 1.[0-5].*) gl_use_threads=no ;;
+ *) gl_use_threads=yes ;;
+ esac
+ ;;
+ *) gl_use_threads=yes ;;
+ esac
+ fi
fi
-# AC_CACHE_VAL
-case "x$ac_cv_prog_cc_c99" in
- x)
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
-$as_echo "none needed" >&6; } ;;
- xno)
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
-$as_echo "unsupported" >&6; } ;;
- *)
- CC="$CC $ac_cv_prog_cc_c99"
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c99" >&5
-$as_echo "$ac_cv_prog_cc_c99" >&6; } ;;
-esac
-if test "x$ac_cv_prog_cc_c99" != xno; then :
- ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c99
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
-$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
-if ${ac_cv_prog_cc_c89+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- ac_cv_prog_cc_c89=no
-ac_save_CC=$CC
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-#include <stdarg.h>
-#include <stdio.h>
-struct stat;
-/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
-struct buf { int x; };
-FILE * (*rcsopen) (struct buf *, struct stat *, int);
-static char *e (p, i)
- char **p;
- int i;
-{
- return p[i];
-}
-static char *f (char * (*g) (char **, int), char **p, ...)
-{
- char *s;
- va_list v;
- va_start (v,p);
- s = g (p, va_arg (v,int));
- va_end (v);
- return s;
-}
-/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
- function prototypes and stuff, but not '\xHH' hex character constants.
- These don't provoke an error unfortunately, instead are silently treated
- as 'x'. The following induces an error, until -std is added to get
- proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
- array size at least. It's necessary to write '\x00'==0 to get something
- that's true only with -std. */
-int osf4_cc_array ['\x00' == 0 ? 1 : -1];
+ if test "$gl_use_threads" = yes || test "$gl_use_threads" = posix; then
+ # For using <pthread.h>:
+ case "$host_os" in
+ osf*)
+ # On OSF/1, the compiler needs the flag -D_REENTRANT so that it
+ # groks <pthread.h>. cc also understands the flag -pthread, but
+ # we don't use it because 1. gcc-2.95 doesn't understand -pthread,
+ # 2. putting a flag into CPPFLAGS that has an effect on the linker
+ # causes the AC_LINK_IFELSE test below to succeed unexpectedly,
+ # leading to wrong values of LIBTHREAD and LTLIBTHREAD.
+ CPPFLAGS="$CPPFLAGS -D_REENTRANT"
+ ;;
+ esac
+ # Some systems optimize for single-threaded programs by default, and
+ # need special flags to disable these optimizations. For example, the
+ # definition of 'errno' in <errno.h>.
+ case "$host_os" in
+ aix* | freebsd*) CPPFLAGS="$CPPFLAGS -D_THREAD_SAFE" ;;
+ solaris*) CPPFLAGS="$CPPFLAGS -D_REENTRANT" ;;
+ esac
+ fi
-/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
- inside strings and character constants. */
-#define FOO(x) 'x'
-int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
-int test (int i, double x);
-struct s1 {int (*f) (int a);};
-struct s2 {int (*f) (double a);};
-int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
-int argc;
-char **argv;
-int
-main ()
-{
-return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
- ;
- return 0;
-}
-_ACEOF
-for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
- -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
-do
- CC="$ac_save_CC $ac_arg"
- if ac_fn_c_try_compile "$LINENO"; then :
- ac_cv_prog_cc_c89=$ac_arg
-fi
-rm -f core conftest.err conftest.$ac_objext
- test "x$ac_cv_prog_cc_c89" != "xno" && break
-done
-rm -f conftest.$ac_ext
-CC=$ac_save_CC
-fi
-# AC_CACHE_VAL
-case "x$ac_cv_prog_cc_c89" in
- x)
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
-$as_echo "none needed" >&6; } ;;
- xno)
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
-$as_echo "unsupported" >&6; } ;;
- *)
- CC="$CC $ac_cv_prog_cc_c89"
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
-$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
-esac
-if test "x$ac_cv_prog_cc_c89" != xno; then :
- ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c89
-else
- ac_cv_prog_cc_stdc=no
-fi
+ # Pre-early section.
-fi
- ;;
-esac
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO Standard C" >&5
-$as_echo_n "checking for $CC option to accept ISO Standard C... " >&6; }
- if ${ac_cv_prog_cc_stdc+:} false; then :
- $as_echo_n "(cached) " >&6
-fi
-
- case $ac_cv_prog_cc_stdc in #(
- no) :
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
-$as_echo "unsupported" >&6; } ;; #(
- '') :
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
-$as_echo "none needed" >&6; } ;; #(
- *) :
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_stdc" >&5
-$as_echo "$ac_cv_prog_cc_stdc" >&6; } ;;
-esac
+ # Code from module absolute-header:
# Code from module acl:
+ # Code from module acl-permissions:
+ # Code from module acl-tests:
+ # Code from module alignof:
+ # Code from module alignof-tests:
# Code from module alloca:
# Code from module alloca-opt:
+ # Code from module alloca-opt-tests:
+ # Code from module announce-gen:
+ # Code from module assert:
+ # Code from module binary-io:
+ # Code from module binary-io-tests:
# Code from module btowc:
+ # Code from module btowc-tests:
+ # Code from module builtin-expect:
# Code from module c-ctype:
+ # Code from module c-ctype-tests:
# Code from module c-strcase:
+ # Code from module c-strcase-tests:
# Code from module c-strcaseeq:
# Code from module canonicalize-lgpl:
+ # Code from module canonicalize-lgpl-tests:
# Code from module chdir:
+ # Code from module chdir-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 ctype:
+ # Code from module ctype-tests:
+ # Code from module dfa:
+ # Code from module dfa-tests:
+ # Code from module dirent:
+ # Code from module dirent-tests:
+ # Code from module dirfd:
# Code from module dirname-lgpl:
+ # Code from module do-release-commit-and-tag:
# Code from module dosname:
# Code from module double-slash-root:
+ # Code from module dup2:
+ # Code from module dup2-tests:
+ # Code from module environ:
+ # Code from module environ-tests:
# Code from module errno:
+ # Code from module errno-tests:
# Code from module error:
# Code from module exitfail:
# Code from module extensions:
-
# Code from module extern-inline:
# Code from module fcntl-h:
+ # Code from module fcntl-h-tests:
+ # Code from module fd-hook:
+ # Code from module fdl:
+ # Code from module fdopen:
+ # Code from module fdopen-tests:
+ # Code from module fflush:
+
+ # Code from module fflush-tests:
+ # Code from module fgetc-tests:
+ # Code from module file-has-acl:
+ # Code from module file-has-acl-tests:
+ # Code from module filename:
+ # Code from module flexmember:
+ # Code from module fpending:
+ # Code from module fpending-tests:
+ # Code from module fpurge:
+ # Code from module fpurge-tests:
+ # Code from module fputc-tests:
+ # Code from module fread-tests:
+ # Code from module freading:
+ # Code from module freading-tests:
+ # Code from module fseek:
+ # Code from module fseek-tests:
+ # Code from module fseeko:
+
+ # Code from module fseeko-tests:
# Code from module fstat:
+ # Code from module fstat-tests:
+ # Code from module ftell:
+ # Code from module ftell-tests:
+ # Code from module ftello:
+
+ # Code from module ftello-tests:
+ # Code from module fwrite-tests:
# Code from module fwriting:
+ # Code from module fwriting-tests:
+ # Code from module gendocs:
+ # Code from module getcwd-lgpl:
+ # Code from module getcwd-lgpl-tests:
# Code from module getdelim:
+ # Code from module getdelim-tests:
+ # Code from module getdtablesize:
+ # Code from module getdtablesize-tests:
# Code from module getopt:
# Code from module getopt-gnu:
+ # Code from module getopt-gnu-tests:
# Code from module getopt-posix:
+ # Code from module getopt-posix-tests:
+ # Code from module getpagesize:
+ # Code from module getprogname:
+ # Code from module getprogname-tests:
# Code from module gettext-h:
# Code from module gettimeofday:
+ # Code from module gettimeofday-tests:
+ # Code from module git-version-gen:
+ # Code from module gitlog-to-changelog:
+ # Code from module gnu-web-doc-update:
+ # Code from module gnumakefile:
+ # Code from module gnupload:
+ # Code from module hard-locale:
+ # Code from module havelib:
+ # Code from module ignore-value:
+ # Code from module ignore-value-tests:
# Code from module include_next:
# 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 isblank:
+ # Code from module isblank-tests:
# Code from module langinfo:
+ # Code from module langinfo-tests:
# Code from module largefile:
+ # Code from module limits-h:
+ # Code from module limits-h-tests:
+ # Code from module link:
+ # Code from module link-tests:
# Code from module localcharset:
# Code from module locale:
+ # Code from module locale-tests:
# Code from module localeconv:
+ # Code from module localeconv-tests:
+ # Code from module localename:
+ # Code from module localename-tests:
+ # Code from module lock:
+ # Code from module lseek:
+ # Code from module lseek-tests:
# Code from module lstat:
- # Code from module malloc-gnu:
+ # Code from module lstat-tests:
+ # Code from module maintainer-makefile:
# Code from module malloc-posix:
# Code from module malloca:
+ # Code from module malloca-tests:
+ # Code from module manywarnings:
# Code from module mbrlen:
# Code from module mbrtowc:
+ # Code from module mbrtowc-tests:
# Code from module mbsinit:
+ # Code from module mbsinit-tests:
# Code from module mbtowc:
# Code from module memchr:
+ # Code from module memchr-tests:
+ # Code from module memrchr:
+ # Code from module memrchr-tests:
+ # Code from module minmax:
# Code from module mkostemp:
# Code from module msvc-inval:
# Code from module msvc-nothrow:
# Code from module multiarch:
# Code from module nl_langinfo:
+ # Code from module nl_langinfo-tests:
# Code from module nocrash:
+ # Code from module non-recursive-gnulib-prefix-hack:
# Code from module obstack:
+ # Code from module open:
+ # Code from module open-tests:
+ # Code from module opendir:
# Code from module pathmax:
+ # Code from module pathmax-tests:
+ # Code from module progname:
+ # Code from module putenv:
+ # Code from module qcopy-acl:
+ # Code from module qset-acl:
# Code from module quote:
# Code from module quotearg:
# Code from module quotearg-simple:
+ # Code from module quotearg-simple-tests:
+ # Code from module read-file:
+ # Code from module read-file-tests:
+ # Code from module readdir:
# Code from module readlink:
+ # Code from module readlink-tests:
+ # Code from module readme-release:
# Code from module realloc-posix:
# Code from module regex:
+ # Code from module regex-tests:
# Code from module rename:
+ # Code from module rename-tests:
# Code from module rmdir:
+ # Code from module rmdir-tests:
# Code from module same-inode:
+ # Code from module secure_getenv:
# 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 snippet/_Noreturn:
# Code from module snippet/arg-nonnull:
# Code from module snippet/c++defs:
@@ -6156,37 +7113,76 @@ esac
# Code from module ssize_t:
# Code from module stat:
# Code from module stat-macros:
+ # Code from module stat-tests:
+ # Code from module stdalign:
+ # Code from module stdalign-tests:
# Code from module stdarg:
# Code from module stdbool:
+ # Code from module stdbool-tests:
# Code from module stddef:
+ # Code from module stddef-tests:
# Code from module stdint:
+ # Code from module stdint-tests:
# Code from module stdio:
+ # Code from module stdio-tests:
# Code from module stdlib:
+ # Code from module stdlib-tests:
+ # Code from module strdup-posix:
# Code from module streq:
# Code from module strerror:
# Code from module strerror-override:
+ # Code from module strerror-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_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 tempname:
+ # Code from module test-framework-sh:
+ # Code from module test-framework-sh-tests:
+ # Code from module threadlib:
+
+
+
# Code from module time:
+ # Code from module time-tests:
# Code from module unistd:
+ # Code from module unistd-tests:
# Code from module unlocked-io:
+ # Code from module unsetenv:
+ # Code from module unsetenv-tests:
+ # Code from module update-copyright:
+ # Code from module update-copyright-tests:
+ # Code from module useless-if-before-free:
+ # Code from module vc-list-files:
+ # Code from module vc-list-files-tests:
# Code from module verify:
+ # Code from module verify-tests:
# Code from module version-etc:
# Code from module version-etc-fsf:
+ # Code from module version-etc-tests:
+ # Code from module warnings:
# Code from module wchar:
+ # Code from module wchar-tests:
# Code from module wcrtomb:
+ # Code from module wcrtomb-tests:
# Code from module wctob:
# Code from module wctomb:
# Code from module wctype-h:
+ # Code from module wctype-h-tests:
# Code from module xalloc:
# Code from module xalloc-die:
+ # Code from module xalloc-die-tests:
# Code from module xalloc-oversized:
@@ -6197,29 +7193,53 @@ esac
LIBC_FATAL_STDERR_=1
export LIBC_FATAL_STDERR_
+
+ gl_need_lib_has_acl=
+ # Check whether --enable-acl was given.
+if test ${enable_acl+y}
+then :
+ enableval=$enable_acl;
+else
+ enable_acl=auto
+fi
+
+
+ac_func=
+for ac_item in $ac_func_c_list
+do
+ if test $ac_func; then
+ ac_fn_c_check_func "$LINENO" $ac_func ac_cv_func_$ac_func
+ if eval test \"x\$ac_cv_func_$ac_func\" = xyes; then
+ echo "#define $ac_item 1" >> confdefs.h
+ fi
+ ac_func=
+ else
+ ac_func=$ac_item
+ fi
+done
ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
-if test "x$ac_cv_type_size_t" = xyes; then :
+if test "x$ac_cv_type_size_t" = xyes
+then :
else
-cat >>confdefs.h <<_ACEOF
-#define size_t unsigned int
-_ACEOF
+printf "%s\n" "#define size_t unsigned int" >>confdefs.h
fi
# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
# for constant arguments. Useless!
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working alloca.h" >&5
-$as_echo_n "checking for working alloca.h... " >&6; }
-if ${ac_cv_working_alloca_h+:} false; then :
- $as_echo_n "(cached) " >&6
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working alloca.h" >&5
+printf %s "checking for working alloca.h... " >&6; }
+if test ${ac_cv_working_alloca_h+y}
+then :
+ printf %s "(cached) " >&6
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <alloca.h>
int
-main ()
+main (void)
{
char *p = (char *) alloca (2 * sizeof (int));
if (p) return 0;
@@ -6227,7 +7247,8 @@ char *p = (char *) alloca (2 * sizeof (int));
return 0;
}
_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
+if ac_fn_c_try_link "$LINENO"
+then :
ac_cv_working_alloca_h=yes
else
ac_cv_working_alloca_h=no
@@ -6235,44 +7256,43 @@ fi
rm -f core conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_alloca_h" >&5
-$as_echo "$ac_cv_working_alloca_h" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_alloca_h" >&5
+printf "%s\n" "$ac_cv_working_alloca_h" >&6; }
if test $ac_cv_working_alloca_h = yes; then
-$as_echo "#define HAVE_ALLOCA_H 1" >>confdefs.h
+printf "%s\n" "#define HAVE_ALLOCA_H 1" >>confdefs.h
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for alloca" >&5
-$as_echo_n "checking for alloca... " >&6; }
-if ${ac_cv_func_alloca_works+:} false; then :
- $as_echo_n "(cached) " >&6
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for alloca" >&5
+printf %s "checking for alloca... " >&6; }
+if test ${ac_cv_func_alloca_works+y}
+then :
+ printf %s "(cached) " >&6
+else
+ if test $ac_cv_working_alloca_h = yes; then
+ ac_cv_func_alloca_works=yes
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
-#ifdef __GNUC__
-# define alloca __builtin_alloca
-#else
-# ifdef _MSC_VER
+#include <stdlib.h>
+#include <stddef.h>
+#ifndef alloca
+# ifdef __GNUC__
+# define alloca __builtin_alloca
+# elif defined _MSC_VER
# include <malloc.h>
# define alloca _alloca
# else
-# ifdef HAVE_ALLOCA_H
-# include <alloca.h>
-# else
-# ifdef _AIX
- #pragma alloca
-# else
-# ifndef alloca /* predefined by HP cc +Olibcalls */
-void *alloca (size_t);
-# endif
-# endif
+# ifdef __cplusplus
+extern "C"
# endif
+void *alloca (size_t);
# endif
#endif
int
-main ()
+main (void)
{
char *p = (char *) alloca (1);
if (p) return 0;
@@ -6280,7 +7300,8 @@ char *p = (char *) alloca (1);
return 0;
}
_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
+if ac_fn_c_try_link "$LINENO"
+then :
ac_cv_func_alloca_works=yes
else
ac_cv_func_alloca_works=no
@@ -6288,12 +7309,13 @@ fi
rm -f core conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_alloca_works" >&5
-$as_echo "$ac_cv_func_alloca_works" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_alloca_works" >&5
+printf "%s\n" "$ac_cv_func_alloca_works" >&6; }
+fi
if test $ac_cv_func_alloca_works = yes; then
-$as_echo "#define HAVE_ALLOCA 1" >>confdefs.h
+printf "%s\n" "#define HAVE_ALLOCA 1" >>confdefs.h
else
# The SVR3 libPW and SVR4 libucb both contain incompatible functions
@@ -6307,13 +7329,14 @@ else
ALLOCA=\${LIBOBJDIR}alloca.$ac_objext
-$as_echo "#define C_ALLOCA 1" >>confdefs.h
+printf "%s\n" "#define C_ALLOCA 1" >>confdefs.h
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether \`alloca.c' needs Cray hooks" >&5
-$as_echo_n "checking whether \`alloca.c' needs Cray hooks... " >&6; }
-if ${ac_cv_os_cray+:} false; then :
- $as_echo_n "(cached) " >&6
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether \`alloca.c' needs Cray hooks" >&5
+printf %s "checking whether \`alloca.c' needs Cray hooks... " >&6; }
+if test ${ac_cv_os_cray+y}
+then :
+ printf %s "(cached) " >&6
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -6325,25 +7348,25 @@ wenotbecray
_ACEOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- $EGREP "webecray" >/dev/null 2>&1; then :
+ $EGREP "webecray" >/dev/null 2>&1
+then :
ac_cv_os_cray=yes
else
ac_cv_os_cray=no
fi
-rm -f conftest*
+rm -rf conftest*
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_os_cray" >&5
-$as_echo "$ac_cv_os_cray" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_os_cray" >&5
+printf "%s\n" "$ac_cv_os_cray" >&6; }
if test $ac_cv_os_cray = yes; then
for ac_func in _getb67 GETB67 getb67; do
- as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
+ as_ac_var=`printf "%s\n" "ac_cv_func_$ac_func" | $as_tr_sh`
ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
-if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
+if eval test \"x\$"$as_ac_var"\" = x"yes"
+then :
-cat >>confdefs.h <<_ACEOF
-#define CRAY_STACKSEG_END $ac_func
-_ACEOF
+printf "%s\n" "#define CRAY_STACKSEG_END $ac_func" >>confdefs.h
break
fi
@@ -6351,12 +7374,14 @@ fi
done
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking stack direction for C alloca" >&5
-$as_echo_n "checking stack direction for C alloca... " >&6; }
-if ${ac_cv_c_stack_direction+:} false; then :
- $as_echo_n "(cached) " >&6
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking stack direction for C alloca" >&5
+printf %s "checking stack direction for C alloca... " >&6; }
+if test ${ac_cv_c_stack_direction+y}
+then :
+ printf %s "(cached) " >&6
else
- if test "$cross_compiling" = yes; then :
+ if test "$cross_compiling" = yes
+then :
ac_cv_c_stack_direction=0
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -6379,7 +7404,8 @@ main (int argc, char **argv)
return find_stack_direction (0, argc + !argv + 20) < 0;
}
_ACEOF
-if ac_fn_c_try_run "$LINENO"; then :
+if ac_fn_c_try_run "$LINENO"
+then :
ac_cv_c_stack_direction=1
else
ac_cv_c_stack_direction=-1
@@ -6389,11 +7415,9 @@ rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
fi
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_stack_direction" >&5
-$as_echo "$ac_cv_c_stack_direction" >&6; }
-cat >>confdefs.h <<_ACEOF
-#define STACK_DIRECTION $ac_cv_c_stack_direction
-_ACEOF
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_stack_direction" >&5
+printf "%s\n" "$ac_cv_c_stack_direction" >&6; }
+printf "%s\n" "#define STACK_DIRECTION $ac_cv_c_stack_direction" >>confdefs.h
fi
@@ -6492,10 +7516,11 @@ fi
REPLACE_WCSWIDTH=0;
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <wchar.h> uses 'inline' correctly" >&5
-$as_echo_n "checking whether <wchar.h> uses 'inline' correctly... " >&6; }
-if ${gl_cv_header_wchar_h_correct_inline+:} false; then :
- $as_echo_n "(cached) " >&6
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether <wchar.h> uses 'inline' correctly" >&5
+printf %s "checking whether <wchar.h> uses 'inline' correctly... " >&6; }
+if test ${gl_cv_header_wchar_h_correct_inline+y}
+then :
+ printf %s "(cached) " >&6
else
gl_cv_header_wchar_h_correct_inline=yes
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -6514,12 +7539,13 @@ extern int zero (void);
int main () { return zero(); }
_ACEOF
+ save_ac_compile="$ac_compile"
+ ac_compile=`echo "$save_ac_compile" | sed s/conftest/conftest1/`
if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
(eval $ac_compile) 2>&5
ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
test $ac_status = 0; }; then
- mv conftest.$ac_objext conftest1.$ac_objext
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -6535,12 +7561,12 @@ _ACEOF
int zero (void) { return 0; }
_ACEOF
+ ac_compile=`echo "$save_ac_compile" | sed s/conftest/conftest2/`
if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
(eval $ac_compile) 2>&5
ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
test $ac_status = 0; }; then
- mv conftest.$ac_objext conftest2.$ac_objext
if $CC -o conftest$ac_exeext $CFLAGS $LDFLAGS conftest1.$ac_objext conftest2.$ac_objext $LIBS >&5 2>&1; then
:
else
@@ -6548,11 +7574,12 @@ _ACEOF
fi
fi
fi
+ ac_compile="$save_ac_compile"
rm -f conftest1.$ac_objext conftest2.$ac_objext conftest$ac_exeext
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_wchar_h_correct_inline" >&5
-$as_echo "$gl_cv_header_wchar_h_correct_inline" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_wchar_h_correct_inline" >&5
+printf "%s\n" "$gl_cv_header_wchar_h_correct_inline" >&6; }
if test $gl_cv_header_wchar_h_correct_inline = no; then
as_fn_error $? "<wchar.h> cannot be used with this compiler ($CC $CFLAGS $CPPFLAGS).
This is a known interoperability problem of glibc <= 2.5 with gcc >= 4.3 in
@@ -6567,39 +7594,25 @@ Configuration aborted." "$LINENO" 5
-
- for ac_func in $ac_func_list
-do :
- as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
-ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
-if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
- cat >>confdefs.h <<_ACEOF
-#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
-_ACEOF
-
-fi
-done
-
-
-
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for nl_langinfo and CODESET" >&5
-$as_echo_n "checking for nl_langinfo and CODESET... " >&6; }
-if ${am_cv_langinfo_codeset+:} false; then :
- $as_echo_n "(cached) " >&6
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for nl_langinfo and CODESET" >&5
+printf %s "checking for nl_langinfo and CODESET... " >&6; }
+if test ${am_cv_langinfo_codeset+y}
+then :
+ printf %s "(cached) " >&6
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <langinfo.h>
int
-main ()
+main (void)
{
char* cs = nl_langinfo(CODESET); return !cs;
;
return 0;
}
_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
+if ac_fn_c_try_link "$LINENO"
+then :
am_cv_langinfo_codeset=yes
else
am_cv_langinfo_codeset=no
@@ -6608,21 +7621,22 @@ rm -f core conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_langinfo_codeset" >&5
-$as_echo "$am_cv_langinfo_codeset" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_langinfo_codeset" >&5
+printf "%s\n" "$am_cv_langinfo_codeset" >&6; }
if test $am_cv_langinfo_codeset = yes; then
-$as_echo "#define HAVE_LANGINFO_CODESET 1" >>confdefs.h
+printf "%s\n" "#define HAVE_LANGINFO_CODESET 1" >>confdefs.h
fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a traditional french locale" >&5
-$as_echo_n "checking for a traditional french locale... " >&6; }
-if ${gt_cv_locale_fr+:} false; then :
- $as_echo_n "(cached) " >&6
+ { 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}
+then :
+ printf %s "(cached) " >&6
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -6690,7 +7704,7 @@ _ACEOF
if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
(eval $ac_link) 2>&5
ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
test $ac_status = 0; } && test -s conftest$ac_exeext; then
case "$host_os" in
# Handle native Windows specially, because there setlocale() interprets
@@ -6746,8 +7760,8 @@ _ACEOF
rm -fr conftest*
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr" >&5
-$as_echo "$gt_cv_locale_fr" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr" >&5
+printf "%s\n" "$gt_cv_locale_fr" >&6; }
LOCALE_FR=$gt_cv_locale_fr
@@ -6770,11 +7784,13 @@ $as_echo "$gt_cv_locale_fr" >&6; }
GNULIB_PTSNAME=0;
GNULIB_PTSNAME_R=0;
GNULIB_PUTENV=0;
+ GNULIB_QSORT_R=0;
GNULIB_RANDOM=0;
GNULIB_RANDOM_R=0;
GNULIB_REALLOC_POSIX=0;
GNULIB_REALPATH=0;
GNULIB_RPMATCH=0;
+ GNULIB_SECURE_GETENV=0;
GNULIB_SETENV=0;
GNULIB_STRTOD=0;
GNULIB_STRTOLL=0;
@@ -6797,11 +7813,13 @@ $as_echo "$gt_cv_locale_fr" >&6; }
HAVE_POSIX_OPENPT=1;
HAVE_PTSNAME=1;
HAVE_PTSNAME_R=1;
+ HAVE_QSORT_R=1;
HAVE_RANDOM=1;
HAVE_RANDOM_H=1;
HAVE_RANDOM_R=1;
HAVE_REALPATH=1;
HAVE_RPMATCH=1;
+ HAVE_SECURE_GETENV=1;
HAVE_SETENV=1;
HAVE_DECL_SETENV=1;
HAVE_STRTOD=1;
@@ -6819,6 +7837,7 @@ $as_echo "$gt_cv_locale_fr" >&6; }
REPLACE_PTSNAME=0;
REPLACE_PTSNAME_R=0;
REPLACE_PUTENV=0;
+ REPLACE_QSORT_R=0;
REPLACE_RANDOM_R=0;
REPLACE_REALLOC=0;
REPLACE_REALPATH=0;
@@ -6832,13 +7851,11 @@ $as_echo "$gt_cv_locale_fr" >&6; }
-
-
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether // is distinct from /" >&5
-$as_echo_n "checking whether // is distinct from /... " >&6; }
-if ${gl_cv_double_slash_root+:} false; then :
- $as_echo_n "(cached) " >&6
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether // is distinct from /" >&5
+printf %s "checking whether // is distinct from /... " >&6; }
+if test ${gl_cv_double_slash_root+y}
+then :
+ printf %s "(cached) " >&6
else
if test x"$cross_compiling" = xyes ; then
# When cross-compiling, there is no way to tell whether // is special
@@ -6864,27 +7881,28 @@ else
fi
fi
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_double_slash_root" >&5
-$as_echo "$gl_cv_double_slash_root" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_double_slash_root" >&5
+printf "%s\n" "$gl_cv_double_slash_root" >&6; }
if test "$gl_cv_double_slash_root" = yes; then
-$as_echo "#define DOUBLE_SLASH_IS_DISTINCT_ROOT 1" >>confdefs.h
+printf "%s\n" "#define DOUBLE_SLASH_IS_DISTINCT_ROOT 1" >>confdefs.h
fi
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether realpath works" >&5
-$as_echo_n "checking whether realpath works... " >&6; }
-if ${gl_cv_func_realpath_works+:} false; then :
- $as_echo_n "(cached) " >&6
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether realpath works" >&5
+printf %s "checking whether realpath works... " >&6; }
+if test ${gl_cv_func_realpath_works+y}
+then :
+ printf %s "(cached) " >&6
else
touch conftest.a
mkdir conftest.d
- if test "$cross_compiling" = yes; then :
+ if test "$cross_compiling" = yes
+then :
case "$host_os" in
# Guess yes on glibc systems.
*-gnu* | gnu*) gl_cv_func_realpath_works="guessing yes" ;;
@@ -6992,11 +8010,12 @@ nocrash_init (void)
#else
/* Avoid a crash on POSIX systems. */
#include <signal.h>
+#include <unistd.h>
/* A POSIX signal handler. */
static void
exception_handler (int sig)
{
- exit (1);
+ _exit (1);
}
static void
nocrash_init (void)
@@ -7014,7 +8033,7 @@ nocrash_init (void)
#include <string.h>
int
-main ()
+main (void)
{
int result = 0;
@@ -7022,22 +8041,27 @@ main ()
char *name = realpath ("conftest.a", NULL);
if (!(name && *name == '/'))
result |= 1;
+ free (name);
}
{
char *name = realpath ("conftest.b/../conftest.a", NULL);
if (name != NULL)
result |= 2;
+ free (name);
}
{
char *name = realpath ("conftest.a/", NULL);
if (name != NULL)
result |= 4;
+ free (name);
}
{
char *name1 = realpath (".", NULL);
char *name2 = realpath ("conftest.d//./..", NULL);
- if (strcmp (name1, name2) != 0)
+ if (! name1 || ! name2 || strcmp (name1, name2))
result |= 8;
+ free (name1);
+ free (name2);
}
return result;
@@ -7046,7 +8070,8 @@ main ()
}
_ACEOF
-if ac_fn_c_try_run "$LINENO"; then :
+if ac_fn_c_try_run "$LINENO"
+then :
gl_cv_func_realpath_works=yes
else
gl_cv_func_realpath_works=no
@@ -7058,12 +8083,12 @@ fi
rm -rf conftest.a conftest.d
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_realpath_works" >&5
-$as_echo "$gl_cv_func_realpath_works" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_realpath_works" >&5
+printf "%s\n" "$gl_cv_func_realpath_works" >&6; }
case "$gl_cv_func_realpath_works" in
*yes)
-$as_echo "#define FUNC_REALPATH_WORKS 1" >>confdefs.h
+printf "%s\n" "#define FUNC_REALPATH_WORKS 1" >>confdefs.h
;;
esac
@@ -7071,24 +8096,6 @@ $as_echo "#define FUNC_REALPATH_WORKS 1" >>confdefs.h
- for ac_header in $ac_header_list
-do :
- as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
-ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
-"
-if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
- cat >>confdefs.h <<_ACEOF
-#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
-_ACEOF
-
-fi
-
-done
-
-
-
-
-
@@ -7178,6 +8185,7 @@ done
HAVE_DECL_FCHDIR=1;
HAVE_DECL_FDATASYNC=1;
HAVE_DECL_GETDOMAINNAME=1;
+ HAVE_DECL_GETLOGIN=1;
HAVE_DECL_GETLOGIN_R=1;
HAVE_DECL_GETPAGESIZE=1;
HAVE_DECL_GETUSERSHELL=1;
@@ -7193,6 +8201,7 @@ done
REPLACE_FTRUNCATE=0;
REPLACE_GETCWD=0;
REPLACE_GETDOMAINNAME=0;
+ REPLACE_GETDTABLESIZE=0;
REPLACE_GETLOGIN_R=0;
REPLACE_GETGROUPS=0;
REPLACE_GETPAGESIZE=0;
@@ -7205,9 +8214,11 @@ done
REPLACE_PWRITE=0;
REPLACE_READ=0;
REPLACE_READLINK=0;
+ REPLACE_READLINKAT=0;
REPLACE_RMDIR=0;
REPLACE_SLEEP=0;
REPLACE_SYMLINK=0;
+ REPLACE_SYMLINKAT=0;
REPLACE_TTYNAME_R=0;
REPLACE_UNLINK=0;
REPLACE_UNLINKAT=0;
@@ -7218,11 +8229,16 @@ done
+ GNULIB_ISBLANK=0;
+ HAVE_ISBLANK=1;
+
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the preprocessor supports include_next" >&5
-$as_echo_n "checking whether the preprocessor supports include_next... " >&6; }
-if ${gl_cv_have_include_next+:} false; then :
- $as_echo_n "(cached) " >&6
+
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the preprocessor supports include_next" >&5
+printf %s "checking whether the preprocessor supports include_next... " >&6; }
+if test ${gl_cv_have_include_next+y}
+then :
+ printf %s "(cached) " >&6
else
rm -rf conftestd1a conftestd1b conftestd2
mkdir conftestd1a conftestd1b conftestd2
@@ -7257,7 +8273,8 @@ EOF
/* end confdefs.h. */
#include <conftest.h>
_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_c_try_compile "$LINENO"
+then :
gl_cv_have_include_next=yes
else
CPPFLAGS="$gl_save_CPPFLAGS -Iconftestd1a -Iconftestd2"
@@ -7265,7 +8282,8 @@ else
/* end confdefs.h. */
#include <conftest.h>
_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_c_try_compile "$LINENO"
+then :
gl_cv_have_include_next=buggy
else
gl_cv_have_include_next=no
@@ -7278,8 +8296,8 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
rm -rf conftestd1a conftestd1b conftestd2
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_have_include_next" >&5
-$as_echo "$gl_cv_have_include_next" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_have_include_next" >&5
+printf "%s\n" "$gl_cv_have_include_next" >&6; }
PRAGMA_SYSTEM_HEADER=
if test $gl_cv_have_include_next = yes; then
INCLUDE_NEXT=include_next
@@ -7299,10 +8317,11 @@ $as_echo "$gl_cv_have_include_next" >&6; }
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether system header files limit the line length" >&5
-$as_echo_n "checking whether system header files limit the line length... " >&6; }
-if ${gl_cv_pragma_columns+:} false; then :
- $as_echo_n "(cached) " >&6
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether system header files limit the line length" >&5
+printf %s "checking whether system header files limit the line length... " >&6; }
+if test ${gl_cv_pragma_columns+y}
+then :
+ printf %s "(cached) " >&6
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -7313,17 +8332,18 @@ choke me
_ACEOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- $EGREP "choke me" >/dev/null 2>&1; then :
+ $EGREP "choke me" >/dev/null 2>&1
+then :
gl_cv_pragma_columns=yes
else
gl_cv_pragma_columns=no
fi
-rm -f conftest*
+rm -rf conftest*
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_pragma_columns" >&5
-$as_echo "$gl_cv_pragma_columns" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_pragma_columns" >&5
+printf "%s\n" "$gl_cv_pragma_columns" >&6; }
if test $gl_cv_pragma_columns = yes; then
PRAGMA_COLUMNS="#pragma COLUMNS 10000"
else
@@ -7333,10 +8353,11 @@ $as_echo "$gl_cv_pragma_columns" >&6; }
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for complete errno.h" >&5
-$as_echo_n "checking for complete errno.h... " >&6; }
-if ${gl_cv_header_errno_h_complete+:} false; then :
- $as_echo_n "(cached) " >&6
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for complete errno.h" >&5
+printf %s "checking for complete errno.h... " >&6; }
+if test ${gl_cv_header_errno_h_complete+y}
+then :
+ printf %s "(cached) " >&6
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -7397,17 +8418,18 @@ booboo
_ACEOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- $EGREP "booboo" >/dev/null 2>&1; then :
+ $EGREP "booboo" >/dev/null 2>&1
+then :
gl_cv_header_errno_h_complete=no
else
gl_cv_header_errno_h_complete=yes
fi
-rm -f conftest*
+rm -rf conftest*
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_errno_h_complete" >&5
-$as_echo "$gl_cv_header_errno_h_complete" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_errno_h_complete" >&5
+printf "%s\n" "$gl_cv_header_errno_h_complete" >&6; }
if test $gl_cv_header_errno_h_complete = yes; then
ERRNO_H=''
else
@@ -7422,47 +8444,52 @@ $as_echo "$gl_cv_header_errno_h_complete" >&6; }
if test $gl_cv_have_include_next = yes; then
gl_cv_next_errno_h='<'errno.h'>'
else
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <errno.h>" >&5
-$as_echo_n "checking absolute name of <errno.h>... " >&6; }
-if ${gl_cv_next_errno_h+:} false; then :
- $as_echo_n "(cached) " >&6
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <errno.h>" >&5
+printf %s "checking absolute name of <errno.h>... " >&6; }
+if test ${gl_cv_next_errno_h+y}
+then :
+ printf %s "(cached) " >&6
else
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+
+
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <errno.h>
-
_ACEOF
- case "$host_os" in
- aix*) gl_absname_cpp="$ac_cpp -C" ;;
- *) gl_absname_cpp="$ac_cpp" ;;
- esac
+ 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'
+ case "$host_os" in
+ mingw*)
+ gl_dirsep_regex='[/\\]'
+ ;;
+ *)
+ gl_dirsep_regex='\/'
+ ;;
+ esac
+ gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
+ gl_header_literal_regex=`echo 'errno.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_header_literal_regex=`echo 'errno.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_next_errno_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
- sed -n "$gl_absolute_header_sed"`'"'
+ gl_cv_absolute_errno_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
+ sed -n "$gl_absolute_header_sed"`
+
+ gl_header=$gl_cv_absolute_errno_h
+ gl_cv_next_errno_h='"'$gl_header'"'
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_errno_h" >&5
-$as_echo "$gl_cv_next_errno_h" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_errno_h" >&5
+printf "%s\n" "$gl_cv_next_errno_h" >&6; }
fi
NEXT_ERRNO_H=$gl_cv_next_errno_h
@@ -7491,10 +8518,11 @@ fi
if test -n "$ERRNO_H"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EMULTIHOP value" >&5
-$as_echo_n "checking for EMULTIHOP value... " >&6; }
-if ${gl_cv_header_errno_h_EMULTIHOP+:} false; then :
- $as_echo_n "(cached) " >&6
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for EMULTIHOP value" >&5
+printf %s "checking for EMULTIHOP value... " >&6; }
+if test ${gl_cv_header_errno_h_EMULTIHOP+y}
+then :
+ printf %s "(cached) " >&6
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -7507,12 +8535,13 @@ yes
_ACEOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- $EGREP "yes" >/dev/null 2>&1; then :
+ $EGREP "yes" >/dev/null 2>&1
+then :
gl_cv_header_errno_h_EMULTIHOP=yes
else
gl_cv_header_errno_h_EMULTIHOP=no
fi
-rm -f conftest*
+rm -rf conftest*
if test $gl_cv_header_errno_h_EMULTIHOP = no; then
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -7526,10 +8555,11 @@ yes
_ACEOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- $EGREP "yes" >/dev/null 2>&1; then :
+ $EGREP "yes" >/dev/null 2>&1
+then :
gl_cv_header_errno_h_EMULTIHOP=hidden
fi
-rm -f conftest*
+rm -rf conftest*
if test $gl_cv_header_errno_h_EMULTIHOP = hidden; then
if ac_fn_c_compute_int "$LINENO" "EMULTIHOP" "gl_cv_header_errno_h_EMULTIHOP" "
@@ -7538,7 +8568,8 @@ rm -f conftest*
/* The following two lines are a workaround against an autoconf-2.52 bug. */
#include <stdio.h>
#include <stdlib.h>
-"; then :
+"
+then :
fi
@@ -7546,8 +8577,8 @@ fi
fi
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_errno_h_EMULTIHOP" >&5
-$as_echo "$gl_cv_header_errno_h_EMULTIHOP" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_errno_h_EMULTIHOP" >&5
+printf "%s\n" "$gl_cv_header_errno_h_EMULTIHOP" >&6; }
case $gl_cv_header_errno_h_EMULTIHOP in
yes | no)
EMULTIHOP_HIDDEN=0; EMULTIHOP_VALUE=
@@ -7562,10 +8593,11 @@ $as_echo "$gl_cv_header_errno_h_EMULTIHOP" >&6; }
if test -n "$ERRNO_H"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ENOLINK value" >&5
-$as_echo_n "checking for ENOLINK value... " >&6; }
-if ${gl_cv_header_errno_h_ENOLINK+:} false; then :
- $as_echo_n "(cached) " >&6
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ENOLINK value" >&5
+printf %s "checking for ENOLINK value... " >&6; }
+if test ${gl_cv_header_errno_h_ENOLINK+y}
+then :
+ printf %s "(cached) " >&6
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -7578,12 +8610,13 @@ yes
_ACEOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- $EGREP "yes" >/dev/null 2>&1; then :
+ $EGREP "yes" >/dev/null 2>&1
+then :
gl_cv_header_errno_h_ENOLINK=yes
else
gl_cv_header_errno_h_ENOLINK=no
fi
-rm -f conftest*
+rm -rf conftest*
if test $gl_cv_header_errno_h_ENOLINK = no; then
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -7597,10 +8630,11 @@ yes
_ACEOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- $EGREP "yes" >/dev/null 2>&1; then :
+ $EGREP "yes" >/dev/null 2>&1
+then :
gl_cv_header_errno_h_ENOLINK=hidden
fi
-rm -f conftest*
+rm -rf conftest*
if test $gl_cv_header_errno_h_ENOLINK = hidden; then
if ac_fn_c_compute_int "$LINENO" "ENOLINK" "gl_cv_header_errno_h_ENOLINK" "
@@ -7609,7 +8643,8 @@ rm -f conftest*
/* The following two lines are a workaround against an autoconf-2.52 bug. */
#include <stdio.h>
#include <stdlib.h>
-"; then :
+"
+then :
fi
@@ -7617,8 +8652,8 @@ fi
fi
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_errno_h_ENOLINK" >&5
-$as_echo "$gl_cv_header_errno_h_ENOLINK" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_errno_h_ENOLINK" >&5
+printf "%s\n" "$gl_cv_header_errno_h_ENOLINK" >&6; }
case $gl_cv_header_errno_h_ENOLINK in
yes | no)
ENOLINK_HIDDEN=0; ENOLINK_VALUE=
@@ -7633,10 +8668,11 @@ $as_echo "$gl_cv_header_errno_h_ENOLINK" >&6; }
if test -n "$ERRNO_H"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EOVERFLOW value" >&5
-$as_echo_n "checking for EOVERFLOW value... " >&6; }
-if ${gl_cv_header_errno_h_EOVERFLOW+:} false; then :
- $as_echo_n "(cached) " >&6
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for EOVERFLOW value" >&5
+printf %s "checking for EOVERFLOW value... " >&6; }
+if test ${gl_cv_header_errno_h_EOVERFLOW+y}
+then :
+ printf %s "(cached) " >&6
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -7649,12 +8685,13 @@ yes
_ACEOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- $EGREP "yes" >/dev/null 2>&1; then :
+ $EGREP "yes" >/dev/null 2>&1
+then :
gl_cv_header_errno_h_EOVERFLOW=yes
else
gl_cv_header_errno_h_EOVERFLOW=no
fi
-rm -f conftest*
+rm -rf conftest*
if test $gl_cv_header_errno_h_EOVERFLOW = no; then
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -7668,10 +8705,11 @@ yes
_ACEOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- $EGREP "yes" >/dev/null 2>&1; then :
+ $EGREP "yes" >/dev/null 2>&1
+then :
gl_cv_header_errno_h_EOVERFLOW=hidden
fi
-rm -f conftest*
+rm -rf conftest*
if test $gl_cv_header_errno_h_EOVERFLOW = hidden; then
if ac_fn_c_compute_int "$LINENO" "EOVERFLOW" "gl_cv_header_errno_h_EOVERFLOW" "
@@ -7680,7 +8718,8 @@ rm -f conftest*
/* The following two lines are a workaround against an autoconf-2.52 bug. */
#include <stdio.h>
#include <stdlib.h>
-"; then :
+"
+then :
fi
@@ -7688,8 +8727,8 @@ fi
fi
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_errno_h_EOVERFLOW" >&5
-$as_echo "$gl_cv_header_errno_h_EOVERFLOW" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_errno_h_EOVERFLOW" >&5
+printf "%s\n" "$gl_cv_header_errno_h_EOVERFLOW" >&6; }
case $gl_cv_header_errno_h_EOVERFLOW in
yes | no)
EOVERFLOW_HIDDEN=0; EOVERFLOW_VALUE=
@@ -7703,32 +8742,117 @@ $as_echo "$gl_cv_header_errno_h_EOVERFLOW" >&6; }
fi
+# The Clang compiler raises a warning for an undeclared identifier that matches
+# a compiler builtin function. All extant Clang versions are affected, as of
+# Clang 3.6.0. Test a builtin known to every version. This problem affects the
+# C and Objective C languages, but Clang does report an error under C++ and
+# Objective C++.
+#
+# Passing -fno-builtin to the compiler would suppress this problem. That
+# strategy would have the advantage of being insensitive to stray warnings, but
+# it would make tests less realistic.
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how $CC reports undeclared, standard C functions" >&5
+printf %s "checking how $CC reports undeclared, standard C functions... " >&6; }
+if test ${ac_cv_c_decl_report+y}
+then :
+ printf %s "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main (void)
+{
+(void) strchr;
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"
+then :
+ if test -s conftest.err
+then :
+ # For AC_CHECK_DECL to react to warnings, the compiler must be silent on
+ # valid AC_CHECK_DECL input. No library function is consistently available
+ # on freestanding implementations, so test against a dummy declaration.
+ # Include always-available headers on the off chance that they somehow
+ # elicit warnings.
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <float.h>
+#include <limits.h>
+#include <stdarg.h>
+#include <stddef.h>
+extern void ac_decl (int, char *);
+int
+main (void)
+{
+#ifdef __cplusplus
+ (void) ac_decl ((int) 0, (char *) 0);
+ (void) ac_decl;
+#else
+ (void) ac_decl;
+#endif
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"
+then :
+ if test -s conftest.err
+then :
+ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "cannot detect from compiler exit status or warnings
+See \`config.log' for more details" "$LINENO" 5; }
+else
+ ac_cv_c_decl_report=warning
+fi
+else
+ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "cannot compile a simple declaration test
+See \`config.log' for more details" "$LINENO" 5; }
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+else
+ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "compiler does not report undeclared identifiers
+See \`config.log' for more details" "$LINENO" 5; }
+fi
+else
+ ac_cv_c_decl_report=error
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_decl_report" >&5
+printf "%s\n" "$ac_cv_c_decl_report" >&6; }
+
+case $ac_cv_c_decl_report in
+ warning) ac_c_decl_warn_flag=yes ;;
+ *) ac_c_decl_warn_flag= ;;
+esac
+
ac_fn_c_check_decl "$LINENO" "strerror_r" "ac_cv_have_decl_strerror_r" "$ac_includes_default"
-if test "x$ac_cv_have_decl_strerror_r" = xyes; then :
+if test "x$ac_cv_have_decl_strerror_r" = xyes
+then :
ac_have_decl=1
else
ac_have_decl=0
fi
-cat >>confdefs.h <<_ACEOF
-#define HAVE_DECL_STRERROR_R $ac_have_decl
-_ACEOF
+printf "%s\n" "#define HAVE_DECL_STRERROR_R $ac_have_decl" >>confdefs.h
+
-for ac_func in strerror_r
-do :
- ac_fn_c_check_func "$LINENO" "strerror_r" "ac_cv_func_strerror_r"
-if test "x$ac_cv_func_strerror_r" = xyes; then :
- cat >>confdefs.h <<_ACEOF
-#define HAVE_STRERROR_R 1
-_ACEOF
-fi
-done
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strerror_r returns char *" >&5
-$as_echo_n "checking whether strerror_r returns char *... " >&6; }
-if ${ac_cv_func_strerror_r_char_p+:} false; then :
- $as_echo_n "(cached) " >&6
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether strerror_r returns char *" >&5
+printf %s "checking whether strerror_r returns char *... " >&6; }
+if test ${ac_cv_func_strerror_r_char_p+y}
+then :
+ printf %s "(cached) " >&6
else
ac_cv_func_strerror_r_char_p=no
@@ -7737,7 +8861,7 @@ else
/* end confdefs.h. */
$ac_includes_default
int
-main ()
+main (void)
{
char buf[100];
@@ -7749,7 +8873,8 @@ main ()
return 0;
}
_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_c_try_compile "$LINENO"
+then :
ac_cv_func_strerror_r_char_p=yes
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
@@ -7760,7 +8885,8 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
# former has a strerror_r that returns char*, while the latter
# has a strerror_r that returns `int'.
# This test should segfault on the DEC system.
- if test "$cross_compiling" = yes; then :
+ if test "$cross_compiling" = yes
+then :
:
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -7768,7 +8894,7 @@ else
$ac_includes_default
extern char *strerror_r ();
int
-main ()
+main (void)
{
char buf[100];
char x = *strerror_r (0, buf, sizeof buf);
@@ -7777,7 +8903,8 @@ char buf[100];
return 0;
}
_ACEOF
-if ac_fn_c_try_run "$LINENO"; then :
+if ac_fn_c_try_run "$LINENO"
+then :
ac_cv_func_strerror_r_char_p=yes
fi
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
@@ -7787,11 +8914,11 @@ fi
fi
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_strerror_r_char_p" >&5
-$as_echo "$ac_cv_func_strerror_r_char_p" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_strerror_r_char_p" >&5
+printf "%s\n" "$ac_cv_func_strerror_r_char_p" >&6; }
if test $ac_cv_func_strerror_r_char_p = yes; then
-$as_echo "#define STRERROR_R_CHAR_P 1" >>confdefs.h
+printf "%s\n" "#define STRERROR_R_CHAR_P 1" >>confdefs.h
fi
@@ -7818,15 +8945,14 @@ fi
-
-
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working fcntl.h" >&5
-$as_echo_n "checking for working fcntl.h... " >&6; }
-if ${gl_cv_header_working_fcntl_h+:} false; then :
- $as_echo_n "(cached) " >&6
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working fcntl.h" >&5
+printf %s "checking for working fcntl.h... " >&6; }
+if test ${gl_cv_header_working_fcntl_h+y}
+then :
+ printf %s "(cached) " >&6
else
- if test "$cross_compiling" = yes; then :
+ if test "$cross_compiling" = yes
+then :
gl_cv_header_working_fcntl_h=cross-compiling
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -7854,7 +8980,7 @@ else
};
int
-main ()
+main (void)
{
int result = !constants;
@@ -7924,7 +9050,8 @@ main ()
return 0;
}
_ACEOF
-if ac_fn_c_try_run "$LINENO"; then :
+if ac_fn_c_try_run "$LINENO"
+then :
gl_cv_header_working_fcntl_h=yes
else
case $? in #(
@@ -7939,17 +9066,15 @@ rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
fi
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_working_fcntl_h" >&5
-$as_echo "$gl_cv_header_working_fcntl_h" >&6; }
+{ 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; }
case $gl_cv_header_working_fcntl_h in #(
*O_NOATIME* | no | cross-compiling) ac_val=0;; #(
*) ac_val=1;;
esac
-cat >>confdefs.h <<_ACEOF
-#define HAVE_WORKING_O_NOATIME $ac_val
-_ACEOF
+printf "%s\n" "#define HAVE_WORKING_O_NOATIME $ac_val" >>confdefs.h
case $gl_cv_header_working_fcntl_h in #(
@@ -7957,34 +9082,31 @@ _ACEOF
*) ac_val=1;;
esac
-cat >>confdefs.h <<_ACEOF
-#define HAVE_WORKING_O_NOFOLLOW $ac_val
-_ACEOF
+printf "%s\n" "#define HAVE_WORKING_O_NOFOLLOW $ac_val" >>confdefs.h
ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
-if test "x$ac_cv_type_pid_t" = xyes; then :
+if test "x$ac_cv_type_pid_t" = xyes
+then :
else
-cat >>confdefs.h <<_ACEOF
-#define pid_t int
-_ACEOF
+printf "%s\n" "#define pid_t int" >>confdefs.h
fi
ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default"
-if test "x$ac_cv_type_mode_t" = xyes; then :
+if test "x$ac_cv_type_mode_t" = xyes
+then :
else
-cat >>confdefs.h <<_ACEOF
-#define mode_t int
-_ACEOF
+printf "%s\n" "#define mode_t int" >>confdefs.h
fi
+
GNULIB_FCHMODAT=0;
GNULIB_FSTAT=0;
GNULIB_FSTATAT=0;
@@ -8022,21 +9144,21 @@ fi
-
if test $ac_cv_func__set_invalid_parameter_handler = yes; then
HAVE_MSVC_INVALID_PARAMETER_HANDLER=1
-$as_echo "#define HAVE_MSVC_INVALID_PARAMETER_HANDLER 1" >>confdefs.h
+printf "%s\n" "#define HAVE_MSVC_INVALID_PARAMETER_HANDLER 1" >>confdefs.h
else
HAVE_MSVC_INVALID_PARAMETER_HANDLER=0
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stat file-mode macros are broken" >&5
-$as_echo_n "checking whether stat file-mode macros are broken... " >&6; }
-if ${ac_cv_header_stat_broken+:} false; then :
- $as_echo_n "(cached) " >&6
+{ 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}
+then :
+ printf %s "(cached) " >&6
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -8060,31 +9182,31 @@ extern char c4[S_ISSOCK (S_IFREG) ? -1 : 1];
#endif
_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_c_try_compile "$LINENO"
+then :
ac_cv_header_stat_broken=no
else
ac_cv_header_stat_broken=yes
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stat_broken" >&5
-$as_echo "$ac_cv_header_stat_broken" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stat_broken" >&5
+printf "%s\n" "$ac_cv_header_stat_broken" >&6; }
if test $ac_cv_header_stat_broken = yes; then
-$as_echo "#define STAT_MACROS_BROKEN 1" >>confdefs.h
+printf "%s\n" "#define STAT_MACROS_BROKEN 1" >>confdefs.h
fi
-
-
case "$host_os" in
mingw*)
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for 64-bit off_t" >&5
-$as_echo_n "checking for 64-bit off_t... " >&6; }
-if ${gl_cv_type_off_t_64+:} false; then :
- $as_echo_n "(cached) " >&6
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for 64-bit off_t" >&5
+printf %s "checking for 64-bit off_t... " >&6; }
+if test ${gl_cv_type_off_t_64+y}
+then :
+ printf %s "(cached) " >&6
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -8092,14 +9214,15 @@ else
int verify_off_t_size[sizeof (off_t) >= 8 ? 1 : -1];
int
-main ()
+main (void)
{
;
return 0;
}
_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_c_try_compile "$LINENO"
+then :
gl_cv_type_off_t_64=yes
else
gl_cv_type_off_t_64=no
@@ -8107,8 +9230,8 @@ fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_type_off_t_64" >&5
-$as_echo "$gl_cv_type_off_t_64" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_type_off_t_64" >&5
+printf "%s\n" "$gl_cv_type_off_t_64" >&6; }
if test $gl_cv_type_off_t_64 = no; then
WINDOWS_64_BIT_OFF_T=1
else
@@ -8139,53 +9262,58 @@ $as_echo "$gl_cv_type_off_t_64" >&6; }
if test $gl_cv_have_include_next = yes; then
gl_cv_next_sys_stat_h='<'sys/stat.h'>'
else
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/stat.h>" >&5
-$as_echo_n "checking absolute name of <sys/stat.h>... " >&6; }
-if ${gl_cv_next_sys_stat_h+:} false; then :
- $as_echo_n "(cached) " >&6
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/stat.h>" >&5
+printf %s "checking absolute name of <sys/stat.h>... " >&6; }
+if test ${gl_cv_next_sys_stat_h+y}
+then :
+ printf %s "(cached) " >&6
else
if test $ac_cv_header_sys_stat_h = yes; then
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+
+
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <sys/stat.h>
-
_ACEOF
- case "$host_os" in
- aix*) gl_absname_cpp="$ac_cpp -C" ;;
- *) gl_absname_cpp="$ac_cpp" ;;
- esac
+ 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/stat.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_next_sys_stat_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
- sed -n "$gl_absolute_header_sed"`'"'
+ 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/stat.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_stat_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
+ sed -n "$gl_absolute_header_sed"`
+
+ gl_header=$gl_cv_absolute_sys_stat_h
+ gl_cv_next_sys_stat_h='"'$gl_header'"'
else
gl_cv_next_sys_stat_h='<'sys/stat.h'>'
fi
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_stat_h" >&5
-$as_echo "$gl_cv_next_sys_stat_h" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_stat_h" >&5
+printf "%s\n" "$gl_cv_next_sys_stat_h" >&6; }
fi
NEXT_SYS_STAT_H=$gl_cv_next_sys_stat_h
@@ -8210,36 +9338,38 @@ $as_echo "$gl_cv_next_sys_stat_h" >&6; }
if test $WINDOWS_64_BIT_ST_SIZE = 1; then
-$as_echo "#define _GL_WINDOWS_64_BIT_ST_SIZE 1" >>confdefs.h
+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>
"
-if test "x$ac_cv_type_nlink_t" = xyes; then :
+if test "x$ac_cv_type_nlink_t" = xyes
+then :
else
-$as_echo "#define nlink_t int" >>confdefs.h
+printf "%s\n" "#define nlink_t int" >>confdefs.h
fi
for gl_func in fchmodat fstat fstatat futimens lchmod lstat mkdirat mkfifo mkfifoat mknod mknodat stat utimensat; do
- as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
-$as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
-if eval \${$as_gl_Symbol+:} false; then :
- $as_echo_n "(cached) " >&6
+ 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/stat.h>
int
-main ()
+main (void)
{
#undef $gl_func
(void) $gl_func;
@@ -8247,7 +9377,8 @@ main ()
return 0;
}
_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_c_try_compile "$LINENO"
+then :
eval "$as_gl_Symbol=yes"
else
eval "$as_gl_Symbol=no"
@@ -8255,11 +9386,12 @@ fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
eval ac_res=\$$as_gl_Symbol
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
-$as_echo "$ac_res" >&6; }
- if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
+ { 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 `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
+#define `printf "%s\n" "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
_ACEOF
eval ac_cv_have_decl_$gl_func=yes
@@ -8269,7 +9401,6 @@ fi
-
GNULIB_DPRINTF=0;
GNULIB_FCLOSE=0;
GNULIB_FDOPEN=0;
@@ -8373,17 +9504,14 @@ fi
REPLACE_VSPRINTF=0;
ac_fn_c_check_decl "$LINENO" "getdelim" "ac_cv_have_decl_getdelim" "$ac_includes_default"
-if test "x$ac_cv_have_decl_getdelim" = xyes; then :
+if test "x$ac_cv_have_decl_getdelim" = xyes
+then :
ac_have_decl=1
else
ac_have_decl=0
fi
-cat >>confdefs.h <<_ACEOF
-#define HAVE_DECL_GETDELIM $ac_have_decl
-_ACEOF
-
-
+printf "%s\n" "#define HAVE_DECL_GETDELIM $ac_have_decl" >>confdefs.h
@@ -8403,53 +9531,58 @@ _ACEOF
if test $gl_cv_have_include_next = yes; then
gl_cv_next_getopt_h='<'getopt.h'>'
else
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <getopt.h>" >&5
-$as_echo_n "checking absolute name of <getopt.h>... " >&6; }
-if ${gl_cv_next_getopt_h+:} false; then :
- $as_echo_n "(cached) " >&6
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <getopt.h>" >&5
+printf %s "checking absolute name of <getopt.h>... " >&6; }
+if test ${gl_cv_next_getopt_h+y}
+then :
+ printf %s "(cached) " >&6
else
if test $ac_cv_header_getopt_h = yes; then
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+
+
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <getopt.h>
-
_ACEOF
- case "$host_os" in
- aix*) gl_absname_cpp="$ac_cpp -C" ;;
- *) gl_absname_cpp="$ac_cpp" ;;
- esac
+ 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 'getopt.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_next_getopt_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
- sed -n "$gl_absolute_header_sed"`'"'
+ case "$host_os" in
+ mingw*)
+ gl_dirsep_regex='[/\\]'
+ ;;
+ *)
+ gl_dirsep_regex='\/'
+ ;;
+ esac
+ gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
+ gl_header_literal_regex=`echo 'getopt.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_getopt_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
+ sed -n "$gl_absolute_header_sed"`
+
+ gl_header=$gl_cv_absolute_getopt_h
+ gl_cv_next_getopt_h='"'$gl_header'"'
else
gl_cv_next_getopt_h='<'getopt.h'>'
fi
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_getopt_h" >&5
-$as_echo "$gl_cv_next_getopt_h" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_getopt_h" >&5
+printf "%s\n" "$gl_cv_next_getopt_h" >&6; }
fi
NEXT_GETOPT_H=$gl_cv_next_getopt_h
@@ -8477,47 +9610,46 @@ $as_echo "$gl_cv_next_getopt_h" >&6; }
if test -z "$gl_replace_getopt" && test $gl_getopt_required = GNU; then
for ac_header in getopt.h
do :
- ac_fn_c_check_header_mongrel "$LINENO" "getopt.h" "ac_cv_header_getopt_h" "$ac_includes_default"
-if test "x$ac_cv_header_getopt_h" = xyes; then :
- cat >>confdefs.h <<_ACEOF
-#define HAVE_GETOPT_H 1
-_ACEOF
+ ac_fn_c_check_header_compile "$LINENO" "getopt.h" "ac_cv_header_getopt_h" "$ac_includes_default"
+if test "x$ac_cv_header_getopt_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_GETOPT_H 1" >>confdefs.h
else
gl_replace_getopt=yes
fi
done
-
fi
if test -z "$gl_replace_getopt" && test $gl_getopt_required = GNU; then
for ac_func in getopt_long_only
do :
ac_fn_c_check_func "$LINENO" "getopt_long_only" "ac_cv_func_getopt_long_only"
-if test "x$ac_cv_func_getopt_long_only" = xyes; then :
- cat >>confdefs.h <<_ACEOF
-#define HAVE_GETOPT_LONG_ONLY 1
-_ACEOF
+if test "x$ac_cv_func_getopt_long_only" = xyes
+then :
+ printf "%s\n" "#define HAVE_GETOPT_LONG_ONLY 1" >>confdefs.h
else
gl_replace_getopt=yes
fi
-done
+done
fi
if test -z "$gl_replace_getopt"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether getopt is POSIX compatible" >&5
-$as_echo_n "checking whether getopt is POSIX compatible... " >&6; }
-if ${gl_cv_func_getopt_posix+:} false; then :
- $as_echo_n "(cached) " >&6
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether getopt is POSIX compatible" >&5
+printf %s "checking whether getopt is POSIX compatible... " >&6; }
+if test ${gl_cv_func_getopt_posix+y}
+then :
+ printf %s "(cached) " >&6
else
if test $cross_compiling = no; then
- if test "$cross_compiling" = yes; then :
- { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+ if test "$cross_compiling" = yes
+then :
+ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
as_fn_error $? "cannot run test program while cross compiling
See \`config.log' for more details" "$LINENO" 5; }
else
@@ -8550,7 +9682,8 @@ main ()
}
_ACEOF
-if ac_fn_c_try_run "$LINENO"; then :
+if ac_fn_c_try_run "$LINENO"
+then :
gl_cv_func_getopt_posix=maybe
else
gl_cv_func_getopt_posix=no
@@ -8560,9 +9693,10 @@ rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
fi
if test $gl_cv_func_getopt_posix = maybe; then
- if test "$cross_compiling" = yes; then :
- { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+ if test "$cross_compiling" = yes
+then :
+ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
as_fn_error $? "cannot run test program while cross compiling
See \`config.log' for more details" "$LINENO" 5; }
else
@@ -8609,7 +9743,8 @@ main ()
}
_ACEOF
-if ac_fn_c_try_run "$LINENO"; then :
+if ac_fn_c_try_run "$LINENO"
+then :
gl_cv_func_getopt_posix=maybe
else
gl_cv_func_getopt_posix=no
@@ -8620,9 +9755,10 @@ fi
fi
if test $gl_cv_func_getopt_posix = maybe; then
- if test "$cross_compiling" = yes; then :
- { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+ if test "$cross_compiling" = yes
+then :
+ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
as_fn_error $? "cannot run test program while cross compiling
See \`config.log' for more details" "$LINENO" 5; }
else
@@ -8651,7 +9787,8 @@ main ()
}
_ACEOF
-if ac_fn_c_try_run "$LINENO"; then :
+if ac_fn_c_try_run "$LINENO"
+then :
gl_cv_func_getopt_posix=yes
else
gl_cv_func_getopt_posix=no
@@ -8669,18 +9806,19 @@ fi
fi
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getopt_posix" >&5
-$as_echo "$gl_cv_func_getopt_posix" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getopt_posix" >&5
+printf "%s\n" "$gl_cv_func_getopt_posix" >&6; }
case "$gl_cv_func_getopt_posix" in
*no) gl_replace_getopt=yes ;;
esac
fi
if test -z "$gl_replace_getopt" && test $gl_getopt_required = GNU; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working GNU getopt function" >&5
-$as_echo_n "checking for working GNU getopt function... " >&6; }
-if ${gl_cv_func_getopt_gnu+:} false; then :
- $as_echo_n "(cached) " >&6
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working GNU getopt function" >&5
+printf %s "checking for working GNU getopt function... " >&6; }
+if test ${gl_cv_func_getopt_gnu+y}
+then :
+ printf %s "(cached) " >&6
else
# Even with POSIXLY_CORRECT, the GNU extension of leading '-' in the
# optstring is necessary for programs like m4 that have POSIX-mandated
@@ -8696,7 +9834,8 @@ else
esac
POSIXLY_CORRECT=1
export POSIXLY_CORRECT
- if test "$cross_compiling" = yes; then :
+ if test "$cross_compiling" = yes
+then :
gl_cv_func_getopt_gnu="guessing no"
else
@@ -8800,11 +9939,12 @@ nocrash_init (void)
#else
/* Avoid a crash on POSIX systems. */
#include <signal.h>
+#include <unistd.h>
/* A POSIX signal handler. */
static void
exception_handler (int sig)
{
- exit (1);
+ _exit (1);
}
static void
nocrash_init (void)
@@ -8820,7 +9960,7 @@ nocrash_init (void)
int
-main ()
+main (void)
{
int result = 0;
@@ -8898,7 +10038,8 @@ main ()
return 0;
}
_ACEOF
-if ac_fn_c_try_run "$LINENO"; then :
+if ac_fn_c_try_run "$LINENO"
+then :
gl_cv_func_getopt_gnu=yes
else
gl_cv_func_getopt_gnu=no
@@ -8914,17 +10055,19 @@ fi
esac
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getopt_gnu" >&5
-$as_echo "$gl_cv_func_getopt_gnu" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getopt_gnu" >&5
+printf "%s\n" "$gl_cv_func_getopt_gnu" >&6; }
if test "$gl_cv_func_getopt_gnu" != yes; then
gl_replace_getopt=yes
else
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working GNU getopt_long function" >&5
-$as_echo_n "checking for working GNU getopt_long function... " >&6; }
-if ${gl_cv_func_getopt_long_gnu+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- if test "$cross_compiling" = yes; then :
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working GNU getopt_long function" >&5
+printf %s "checking for working GNU getopt_long function... " >&6; }
+if test ${gl_cv_func_getopt_long_gnu+y}
+then :
+ printf %s "(cached) " >&6
+else
+ if test "$cross_compiling" = yes
+then :
case "$host_os" in
openbsd*) gl_cv_func_getopt_long_gnu="guessing no";;
*) gl_cv_func_getopt_long_gnu="guessing yes";;
@@ -8938,7 +10081,7 @@ else
#include <string.h>
int
-main ()
+main (void)
{
static const struct option long_options[] =
{
@@ -8964,7 +10107,8 @@ static const struct option long_options[] =
return 0;
}
_ACEOF
-if ac_fn_c_try_run "$LINENO"; then :
+if ac_fn_c_try_run "$LINENO"
+then :
gl_cv_func_getopt_long_gnu=yes
else
gl_cv_func_getopt_long_gnu=no
@@ -8975,8 +10119,8 @@ fi
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getopt_long_gnu" >&5
-$as_echo "$gl_cv_func_getopt_long_gnu" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getopt_long_gnu" >&5
+printf "%s\n" "$gl_cv_func_getopt_long_gnu" >&6; }
case "$gl_cv_func_getopt_long_gnu" in
*yes) ;;
*) gl_replace_getopt=yes ;;
@@ -8998,49 +10142,54 @@ $as_echo "$gl_cv_func_getopt_long_gnu" >&6; }
GETOPT_H=getopt.h
-$as_echo "#define __GETOPT_PREFIX rpl_" >>confdefs.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 :
+if test "x$ac_cv_have_decl_getenv" = xyes
+then :
ac_have_decl=1
else
ac_have_decl=0
fi
-cat >>confdefs.h <<_ACEOF
-#define HAVE_DECL_GETENV $ac_have_decl
-_ACEOF
+printf "%s\n" "#define HAVE_DECL_GETENV $ac_have_decl" >>confdefs.h
+
+
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C/C++ restrict keyword" >&5
-$as_echo_n "checking for C/C++ restrict keyword... " >&6; }
-if ${ac_cv_c_restrict+:} false; then :
- $as_echo_n "(cached) " >&6
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for C/C++ restrict keyword" >&5
+printf %s "checking for C/C++ restrict keyword... " >&6; }
+if test ${ac_cv_c_restrict+y}
+then :
+ printf %s "(cached) " >&6
else
ac_cv_c_restrict=no
# The order here caters to the fact that C++ does not require restrict.
for ac_kw in __restrict __restrict__ _Restrict restrict; do
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
-typedef int * int_ptr;
- int foo (int_ptr $ac_kw ip) {
- return ip[0];
- }
+typedef int *int_ptr;
+ int foo (int_ptr $ac_kw ip) { return ip[0]; }
+ int bar (int [$ac_kw]); /* Catch GCC bug 14050. */
+ int bar (int ip[$ac_kw]) { return ip[0]; }
+
int
-main ()
+main (void)
{
int s[1];
- int * $ac_kw t = s;
- t[0] = 0;
- return foo(t)
+ int *$ac_kw t = s;
+ t[0] = 0;
+ return foo (t) + bar (t);
+
;
return 0;
}
_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_c_try_compile "$LINENO"
+then :
ac_cv_c_restrict=$ac_kw
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
@@ -9048,16 +10197,14 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
done
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_restrict" >&5
-$as_echo "$ac_cv_c_restrict" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_restrict" >&5
+printf "%s\n" "$ac_cv_c_restrict" >&6; }
case $ac_cv_c_restrict in
restrict) ;;
- no) $as_echo "#define restrict /**/" >>confdefs.h
+ no) printf "%s\n" "#define restrict /**/" >>confdefs.h
;;
- *) cat >>confdefs.h <<_ACEOF
-#define restrict $ac_cv_c_restrict
-_ACEOF
+ *) printf "%s\n" "#define restrict $ac_cv_c_restrict" >>confdefs.h
;;
esac
@@ -9066,6 +10213,7 @@ _ACEOF
HAVE_GETTIMEOFDAY=1;
HAVE_STRUCT_TIMEVAL=1;
HAVE_SYS_TIME_H=1;
+ HAVE_TIMEZONE_T=0;
REPLACE_GETTIMEOFDAY=0;
REPLACE_STRUCT_TIMEVAL=0;
@@ -9084,58 +10232,61 @@ _ACEOF
-
-
if test $gl_cv_have_include_next = yes; then
gl_cv_next_sys_time_h='<'sys/time.h'>'
else
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/time.h>" >&5
-$as_echo_n "checking absolute name of <sys/time.h>... " >&6; }
-if ${gl_cv_next_sys_time_h+:} false; then :
- $as_echo_n "(cached) " >&6
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/time.h>" >&5
+printf %s "checking absolute name of <sys/time.h>... " >&6; }
+if test ${gl_cv_next_sys_time_h+y}
+then :
+ printf %s "(cached) " >&6
else
if test $ac_cv_header_sys_time_h = yes; then
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+
+
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <sys/time.h>
-
_ACEOF
- case "$host_os" in
- aix*) gl_absname_cpp="$ac_cpp -C" ;;
- *) gl_absname_cpp="$ac_cpp" ;;
- esac
+ 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/time.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_next_sys_time_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
- sed -n "$gl_absolute_header_sed"`'"'
+ 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/time.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_time_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
+ sed -n "$gl_absolute_header_sed"`
+
+ gl_header=$gl_cv_absolute_sys_time_h
+ gl_cv_next_sys_time_h='"'$gl_header'"'
else
gl_cv_next_sys_time_h='<'sys/time.h'>'
fi
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_time_h" >&5
-$as_echo "$gl_cv_next_sys_time_h" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_time_h" >&5
+printf "%s\n" "$gl_cv_next_sys_time_h" >&6; }
fi
NEXT_SYS_TIME_H=$gl_cv_next_sys_time_h
@@ -9161,18 +10312,13 @@ $as_echo "$gl_cv_next_sys_time_h" >&6; }
if test $ac_cv_header_sys_socket_h != yes; then
- for ac_header in winsock2.h
-do :
- ac_fn_c_check_header_mongrel "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default"
-if test "x$ac_cv_header_winsock2_h" = xyes; then :
- cat >>confdefs.h <<_ACEOF
-#define HAVE_WINSOCK2_H 1
-_ACEOF
+ 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
-done
-
fi
if test "$ac_cv_header_winsock2_h" = yes; then
HAVE_WINSOCK2_H=1
@@ -9183,10 +10329,11 @@ done
fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timeval" >&5
-$as_echo_n "checking for struct timeval... " >&6; }
-if ${gl_cv_sys_struct_timeval+:} false; then :
- $as_echo_n "(cached) " >&6
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for struct timeval" >&5
+printf %s "checking for struct timeval... " >&6; }
+if test ${gl_cv_sys_struct_timeval+y}
+then :
+ printf %s "(cached) " >&6
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -9199,14 +10346,15 @@ else
#endif
int
-main ()
+main (void)
{
static struct timeval x; x.tv_sec = x.tv_usec;
;
return 0;
}
_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_c_try_compile "$LINENO"
+then :
gl_cv_sys_struct_timeval=yes
else
gl_cv_sys_struct_timeval=no
@@ -9214,15 +10362,16 @@ fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timeval" >&5
-$as_echo "$gl_cv_sys_struct_timeval" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timeval" >&5
+printf "%s\n" "$gl_cv_sys_struct_timeval" >&6; }
if test $gl_cv_sys_struct_timeval != yes; then
HAVE_STRUCT_TIMEVAL=0
else
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wide-enough struct timeval.tv_sec member" >&5
-$as_echo_n "checking for wide-enough struct timeval.tv_sec member... " >&6; }
-if ${gl_cv_sys_struct_timeval_tv_sec+:} false; then :
- $as_echo_n "(cached) " >&6
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for wide-enough struct timeval.tv_sec member" >&5
+printf %s "checking for wide-enough struct timeval.tv_sec member... " >&6; }
+if test ${gl_cv_sys_struct_timeval_tv_sec+y}
+then :
+ printf %s "(cached) " >&6
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -9235,7 +10384,7 @@ else
#endif
int
-main ()
+main (void)
{
static struct timeval x;
typedef int verify_tv_sec_type[
@@ -9246,7 +10395,8 @@ static struct timeval x;
return 0;
}
_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_c_try_compile "$LINENO"
+then :
gl_cv_sys_struct_timeval_tv_sec=yes
else
gl_cv_sys_struct_timeval_tv_sec=no
@@ -9254,8 +10404,8 @@ fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timeval_tv_sec" >&5
-$as_echo "$gl_cv_sys_struct_timeval_tv_sec" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timeval_tv_sec" >&5
+printf "%s\n" "$gl_cv_sys_struct_timeval_tv_sec" >&6; }
if test $gl_cv_sys_struct_timeval_tv_sec != yes; then
REPLACE_STRUCT_TIMEVAL=1
fi
@@ -9263,11 +10413,12 @@ $as_echo "$gl_cv_sys_struct_timeval_tv_sec" >&6; }
for gl_func in gettimeofday; do
- as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
-$as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
-if eval \${$as_gl_Symbol+:} false; then :
- $as_echo_n "(cached) " >&6
+ 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. */
@@ -9278,7 +10429,7 @@ else
#include <time.h>
int
-main ()
+main (void)
{
#undef $gl_func
(void) $gl_func;
@@ -9286,7 +10437,8 @@ main ()
return 0;
}
_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_c_try_compile "$LINENO"
+then :
eval "$as_gl_Symbol=yes"
else
eval "$as_gl_Symbol=no"
@@ -9294,11 +10446,12 @@ fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
eval ac_res=\$$as_gl_Symbol
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
-$as_echo "$ac_res" >&6; }
- if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
+ { 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 `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
+#define `printf "%s\n" "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
_ACEOF
eval ac_cv_have_decl_$gl_func=yes
@@ -9318,22 +10471,149 @@ fi
+
+
+
+
+
+
+
+
+
+
+ if test $gl_cv_have_include_next = yes; then
+ gl_cv_next_limits_h='<'limits.h'>'
+ else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <limits.h>" >&5
+printf %s "checking absolute name of <limits.h>... " >&6; }
+if test ${gl_cv_next_limits_h+y}
+then :
+ printf %s "(cached) " >&6
+else
+
+ if test $ac_cv_header_limits_h = yes; then
+
+
+
+
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <limits.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 'limits.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_limits_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
+ sed -n "$gl_absolute_header_sed"`
+
+ gl_header=$gl_cv_absolute_limits_h
+ gl_cv_next_limits_h='"'$gl_header'"'
+ else
+ gl_cv_next_limits_h='<'limits.h'>'
+ fi
+
+
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_limits_h" >&5
+printf "%s\n" "$gl_cv_next_limits_h" >&6; }
+ fi
+ NEXT_LIMITS_H=$gl_cv_next_limits_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='<'limits.h'>'
+ else
+ # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
+ gl_next_as_first_directive=$gl_cv_next_limits_h
+ fi
+ NEXT_AS_FIRST_DIRECTIVE_LIMITS_H=$gl_next_as_first_directive
+
+
+
+
+
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether limits.h has ULLONG_WIDTH etc." >&5
+printf %s "checking whether limits.h has ULLONG_WIDTH etc.... " >&6; }
+if test ${gl_cv_header_limits_width+y}
+then :
+ printf %s "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#ifndef __STDC_WANT_IEC_60559_BFP_EXT__
+ #define __STDC_WANT_IEC_60559_BFP_EXT__ 1
+ #endif
+ #include <limits.h>
+ int ullw = ULLONG_WIDTH;
+int
+main (void)
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"
+then :
+ gl_cv_header_limits_width=yes
+else
+ gl_cv_header_limits_width=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_limits_width" >&5
+printf "%s\n" "$gl_cv_header_limits_width" >&6; }
+ if test "$gl_cv_header_limits_width" = yes; then
+ LIMITS_H=
+ else
+ LIMITS_H=limits.h
+ fi
+
+ if test -n "$LIMITS_H"; then
+ GL_GENERATE_LIMITS_H_TRUE=
+ GL_GENERATE_LIMITS_H_FALSE='#'
+else
+ GL_GENERATE_LIMITS_H_TRUE='#'
+ GL_GENERATE_LIMITS_H_FALSE=
+fi
+
+
ac_fn_c_check_decl "$LINENO" "getc_unlocked" "ac_cv_have_decl_getc_unlocked" "$ac_includes_default"
-if test "x$ac_cv_have_decl_getc_unlocked" = xyes; then :
+if test "x$ac_cv_have_decl_getc_unlocked" = xyes
+then :
ac_have_decl=1
else
ac_have_decl=0
fi
-cat >>confdefs.h <<_ACEOF
-#define HAVE_DECL_GETC_UNLOCKED $ac_have_decl
-_ACEOF
+printf "%s\n" "#define HAVE_DECL_GETC_UNLOCKED $ac_have_decl" >>confdefs.h
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C Library >= 2.1 or uClibc" >&5
-$as_echo_n "checking whether we are using the GNU C Library >= 2.1 or uClibc... " >&6; }
-if ${ac_cv_gnu_library_2_1+:} false; then :
- $as_echo_n "(cached) " >&6
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C Library >= 2.1 or uClibc" >&5
+printf %s "checking whether we are using the GNU C Library >= 2.1 or uClibc... " >&6; }
+if test ${ac_cv_gnu_library_2_1+y}
+then :
+ printf %s "(cached) " >&6
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -9350,18 +10630,19 @@ else
_ACEOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- $EGREP "Lucky" >/dev/null 2>&1; then :
+ $EGREP "Lucky" >/dev/null 2>&1
+then :
ac_cv_gnu_library_2_1=yes
else
ac_cv_gnu_library_2_1=no
fi
-rm -f conftest*
+rm -rf conftest*
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_gnu_library_2_1" >&5
-$as_echo "$ac_cv_gnu_library_2_1" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_gnu_library_2_1" >&5
+printf "%s\n" "$ac_cv_gnu_library_2_1" >&6; }
GLIBC21="$ac_cv_gnu_library_2_1"
@@ -9378,38 +10659,41 @@ $as_echo "$ac_cv_gnu_library_2_1" >&6; }
REPLACE_NULL=0;
+ HAVE_MAX_ALIGN_T=1;
HAVE_WCHAR_T=1;
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wchar_t" >&5
-$as_echo_n "checking for wchar_t... " >&6; }
-if ${gt_cv_c_wchar_t+:} false; then :
- $as_echo_n "(cached) " >&6
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for wchar_t" >&5
+printf %s "checking for wchar_t... " >&6; }
+if test ${gt_cv_c_wchar_t+y}
+then :
+ printf %s "(cached) " >&6
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <stddef.h>
wchar_t foo = (wchar_t)'\0';
int
-main ()
+main (void)
{
;
return 0;
}
_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_c_try_compile "$LINENO"
+then :
gt_cv_c_wchar_t=yes
else
gt_cv_c_wchar_t=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_c_wchar_t" >&5
-$as_echo "$gt_cv_c_wchar_t" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_c_wchar_t" >&5
+printf "%s\n" "$gt_cv_c_wchar_t" >&6; }
if test $gt_cv_c_wchar_t = yes; then
-$as_echo "#define HAVE_WCHAR_T 1" >>confdefs.h
+printf "%s\n" "#define HAVE_WCHAR_T 1" >>confdefs.h
fi
@@ -9417,14 +10701,25 @@ $as_echo "#define HAVE_WCHAR_T 1" >>confdefs.h
STDDEF_H=
+ ac_fn_c_check_type "$LINENO" "max_align_t" "ac_cv_type_max_align_t" "#include <stddef.h>
+
+"
+if test "x$ac_cv_type_max_align_t" = xyes
+then :
+
+else
+ HAVE_MAX_ALIGN_T=0; STDDEF_H=stddef.h
+fi
+
if test $gt_cv_c_wchar_t = no; then
HAVE_WCHAR_T=0
STDDEF_H=stddef.h
fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NULL can be used in arbitrary expressions" >&5
-$as_echo_n "checking whether NULL can be used in arbitrary expressions... " >&6; }
-if ${gl_cv_decl_null_works+:} false; then :
- $as_echo_n "(cached) " >&6
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether NULL can be used in arbitrary expressions" >&5
+printf %s "checking whether NULL can be used in arbitrary expressions... " >&6; }
+if test ${gl_cv_decl_null_works+y}
+then :
+ printf %s "(cached) " >&6
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -9432,22 +10727,23 @@ else
int test[2 * (sizeof NULL == sizeof (void *)) -1];
int
-main ()
+main (void)
{
;
return 0;
}
_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_c_try_compile "$LINENO"
+then :
gl_cv_decl_null_works=yes
else
gl_cv_decl_null_works=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_decl_null_works" >&5
-$as_echo "$gl_cv_decl_null_works" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_decl_null_works" >&5
+printf "%s\n" "$gl_cv_decl_null_works" >&6; }
if test $gl_cv_decl_null_works = no; then
REPLACE_NULL=1
STDDEF_H=stddef.h
@@ -9473,47 +10769,52 @@ fi
if test $gl_cv_have_include_next = yes; then
gl_cv_next_stddef_h='<'stddef.h'>'
else
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stddef.h>" >&5
-$as_echo_n "checking absolute name of <stddef.h>... " >&6; }
-if ${gl_cv_next_stddef_h+:} false; then :
- $as_echo_n "(cached) " >&6
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <stddef.h>" >&5
+printf %s "checking absolute name of <stddef.h>... " >&6; }
+if test ${gl_cv_next_stddef_h+y}
+then :
+ printf %s "(cached) " >&6
else
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+
+
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <stddef.h>
-
_ACEOF
- case "$host_os" in
- aix*) gl_absname_cpp="$ac_cpp -C" ;;
- *) gl_absname_cpp="$ac_cpp" ;;
- esac
+ 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'
+ case "$host_os" in
+ mingw*)
+ gl_dirsep_regex='[/\\]'
+ ;;
+ *)
+ gl_dirsep_regex='\/'
+ ;;
+ esac
+ gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
+ gl_header_literal_regex=`echo 'stddef.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_stddef_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
+ sed -n "$gl_absolute_header_sed"`
- gl_header_literal_regex=`echo 'stddef.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_next_stddef_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
- sed -n "$gl_absolute_header_sed"`'"'
+ gl_header=$gl_cv_absolute_stddef_h
+ gl_cv_next_stddef_h='"'$gl_header'"'
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stddef_h" >&5
-$as_echo "$gl_cv_next_stddef_h" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stddef_h" >&5
+printf "%s\n" "$gl_cv_next_stddef_h" >&6; }
fi
NEXT_STDDEF_H=$gl_cv_next_stddef_h
@@ -9533,43 +10834,1228 @@ $as_echo "$gl_cv_next_stddef_h" >&6; }
+ if test "X$prefix" = "XNONE"; then
+ acl_final_prefix="$ac_default_prefix"
+ else
+ acl_final_prefix="$prefix"
+ fi
+ if test "X$exec_prefix" = "XNONE"; then
+ acl_final_exec_prefix='${prefix}'
+ else
+ acl_final_exec_prefix="$exec_prefix"
+ fi
+ acl_save_prefix="$prefix"
+ prefix="$acl_final_prefix"
+ eval acl_final_exec_prefix=\"$acl_final_exec_prefix\"
+ prefix="$acl_save_prefix"
+
+
+
+# Check whether --with-gnu-ld was given.
+if test ${with_gnu_ld+y}
+then :
+ withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes
+else
+ with_gnu_ld=no
+fi
+
+# 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
+
+ac_prog=ld
+if test "$GCC" = yes; then
+ # Check if gcc -print-prog-name=ld gives a path.
+ { 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; }
+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}
+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
+ ;;
+ esac
+ fi
+ done
+ IFS="$acl_save_ifs"
+else
+ acl_cv_path_LD="$LD" # Let the user override the test with a path.
+fi
+fi
+
+LD="$acl_cv_path_LD"
+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; }
+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}
+then :
+ printf %s "(cached) " >&6
+else
+ # I'd rather use --version here, but apparently some GNU lds only accept -v.
+case `$LD -v 2>&1 </dev/null` in
+*GNU* | *'with BFD'*)
+ acl_cv_prog_gnu_ld=yes
+ ;;
+*)
+ acl_cv_prog_gnu_ld=no
+ ;;
+esac
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $acl_cv_prog_gnu_ld" >&5
+printf "%s\n" "$acl_cv_prog_gnu_ld" >&6; }
+with_gnu_ld=$acl_cv_prog_gnu_ld
+
+
+
+
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for shared library run path origin" >&5
+printf %s "checking for shared library run path origin... " >&6; }
+if test ${acl_cv_rpath+y}
+then :
+ printf %s "(cached) " >&6
+else
+
+ CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \
+ ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh
+ . ./conftest.sh
+ rm -f ./conftest.sh
+ acl_cv_rpath=done
+
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $acl_cv_rpath" >&5
+printf "%s\n" "$acl_cv_rpath" >&6; }
+ wl="$acl_cv_wl"
+ acl_libext="$acl_cv_libext"
+ acl_shlibext="$acl_cv_shlibext"
+ acl_libname_spec="$acl_cv_libname_spec"
+ acl_library_names_spec="$acl_cv_library_names_spec"
+ acl_hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec"
+ acl_hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator"
+ acl_hardcode_direct="$acl_cv_hardcode_direct"
+ acl_hardcode_minus_L="$acl_cv_hardcode_minus_L"
+ # Check whether --enable-rpath was given.
+if test ${enable_rpath+y}
+then :
+ enableval=$enable_rpath; :
+else
+ enable_rpath=yes
+fi
+
+
+
+
+ acl_libdirstem=lib
+ 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 :
+ printf %s "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#ifdef _LP64
+sixtyfour bits
+#endif
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ $EGREP "sixtyfour bits" >/dev/null 2>&1
+then :
+ gl_cv_solaris_64bit=yes
+else
+ gl_cv_solaris_64bit=no
+fi
+rm -rf conftest*
+
+
+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"
+
+
+
+ gl_threads_api=none
+ LIBTHREAD=
+ LTLIBTHREAD=
+ LIBMULTITHREAD=
+ LTLIBMULTITHREAD=
+ if test "$gl_use_threads" != no; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether imported symbols can be declared weak" >&5
+printf %s "checking whether imported symbols can be declared weak... " >&6; }
+if test ${gl_cv_have_weak+y}
+then :
+ printf %s "(cached) " >&6
+else
+ gl_cv_have_weak=no
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+extern void xyzzy ();
+#pragma weak xyzzy
+int
+main (void)
+{
+xyzzy();
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"
+then :
+ gl_cv_have_weak=maybe
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+ if test $gl_cv_have_weak = maybe; then
+ if test "$cross_compiling" = yes
+then :
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#ifdef __ELF__
+ Extensible Linking Format
+ #endif
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ $EGREP "Extensible Linking Format" >/dev/null 2>&1
+then :
+ gl_cv_have_weak="guessing yes"
+else
+ gl_cv_have_weak="guessing no"
+fi
+rm -rf conftest*
+
+
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#include <stdio.h>
+#pragma weak fputs
+int main ()
+{
+ return (fputs == NULL);
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"
+then :
+ gl_cv_have_weak=yes
+else
+ gl_cv_have_weak=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
+
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_have_weak" >&5
+printf "%s\n" "$gl_cv_have_weak" >&6; }
+ 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
+ # it groks <pthread.h>. It's added above, in gl_THREADLIB_EARLY_BODY.
+ ac_fn_c_check_header_compile "$LINENO" "pthread.h" "ac_cv_header_pthread_h" "$ac_includes_default"
+if test "x$ac_cv_header_pthread_h" = xyes
+then :
+ gl_have_pthread_h=yes
+else
+ gl_have_pthread_h=no
+fi
+
+ if test "$gl_have_pthread_h" = yes; then
+ # Other possible tests:
+ # -lpthreads (FSU threads, PCthreads)
+ # -lgthreads
+ gl_have_pthread=
+ # Test whether both pthread_mutex_lock and pthread_mutexattr_init exist
+ # in libc. IRIX 6.5 has the first one in both libc and libpthread, but
+ # the second one only in libpthread, and lock.c needs it.
+ #
+ # 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
+ save_LIBS=$LIBS
+ for gl_pthread in '' '-pthread'; do
+ LIBS="$LIBS $gl_pthread"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <pthread.h>
+ pthread_mutex_t m;
+ pthread_mutexattr_t ma;
+
+int
+main (void)
+{
+pthread_mutex_lock (&m);
+ pthread_mutexattr_init (&ma);
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"
+then :
+ gl_have_pthread=yes
+ LIBTHREAD=$gl_pthread LTLIBTHREAD=$gl_pthread
+ LIBMULTITHREAD=$gl_pthread LTLIBMULTITHREAD=$gl_pthread
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+ LIBS=$save_LIBS
+ test -n "$gl_have_pthread" && break
+ done
+
+ # Test for libpthread by looking for pthread_kill. (Not pthread_self,
+ # since it is defined as a macro on OSF/1.)
+ if test -n "$gl_have_pthread" && test -z "$LIBTHREAD"; then
+ # The program links fine without libpthread. But it may actually
+ # need to link with libpthread in order to create multiple threads.
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for pthread_kill in -lpthread" >&5
+printf %s "checking for pthread_kill in -lpthread... " >&6; }
+if test ${ac_cv_lib_pthread_pthread_kill+y}
+then :
+ printf %s "(cached) " >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lpthread $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 pthread_kill ();
+int
+main (void)
+{
+return pthread_kill ();
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"
+then :
+ ac_cv_lib_pthread_pthread_kill=yes
+else
+ ac_cv_lib_pthread_pthread_kill=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_kill" >&5
+printf "%s\n" "$ac_cv_lib_pthread_pthread_kill" >&6; }
+if test "x$ac_cv_lib_pthread_pthread_kill" = xyes
+then :
+ LIBMULTITHREAD=-lpthread LTLIBMULTITHREAD=-lpthread
+ # On Solaris and HP-UX, most pthread functions exist also in libc.
+ # Therefore pthread_in_use() needs to actually try to create a
+ # thread: pthread_create from libc will fail, whereas
+ # pthread_create will actually create a thread.
+ # On Solaris 10 or newer, this test is no longer needed, because
+ # libc contains the fully functional pthread functions.
+ case "$host_os" in
+ solaris | solaris2.1-9 | solaris2.1-9.* | hpux*)
+
+printf "%s\n" "#define PTHREAD_IN_USE_DETECTION_HARD 1" >>confdefs.h
+
+ esac
+
+fi
+
+ elif test -z "$gl_have_pthread"; then
+ # Some library is needed. Try libpthread and libc_r.
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for pthread_kill in -lpthread" >&5
+printf %s "checking for pthread_kill in -lpthread... " >&6; }
+if test ${ac_cv_lib_pthread_pthread_kill+y}
+then :
+ printf %s "(cached) " >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lpthread $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 pthread_kill ();
+int
+main (void)
+{
+return pthread_kill ();
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"
+then :
+ ac_cv_lib_pthread_pthread_kill=yes
+else
+ ac_cv_lib_pthread_pthread_kill=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_kill" >&5
+printf "%s\n" "$ac_cv_lib_pthread_pthread_kill" >&6; }
+if test "x$ac_cv_lib_pthread_pthread_kill" = xyes
+then :
+ gl_have_pthread=yes
+ LIBTHREAD=-lpthread LTLIBTHREAD=-lpthread
+ LIBMULTITHREAD=-lpthread LTLIBMULTITHREAD=-lpthread
+fi
+
+ if test -z "$gl_have_pthread"; then
+ # For FreeBSD 4.
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for pthread_kill in -lc_r" >&5
+printf %s "checking for pthread_kill in -lc_r... " >&6; }
+if test ${ac_cv_lib_c_r_pthread_kill+y}
+then :
+ printf %s "(cached) " >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lc_r $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 pthread_kill ();
+int
+main (void)
+{
+return pthread_kill ();
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"
+then :
+ ac_cv_lib_c_r_pthread_kill=yes
+else
+ ac_cv_lib_c_r_pthread_kill=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_pthread_kill" >&5
+printf "%s\n" "$ac_cv_lib_c_r_pthread_kill" >&6; }
+if test "x$ac_cv_lib_c_r_pthread_kill" = xyes
+then :
+ gl_have_pthread=yes
+ LIBTHREAD=-lc_r LTLIBTHREAD=-lc_r
+ LIBMULTITHREAD=-lc_r LTLIBMULTITHREAD=-lc_r
+fi
+
+ fi
+ fi
+ if test -n "$gl_have_pthread"; then
+ gl_threads_api=posix
+
+printf "%s\n" "#define USE_POSIX_THREADS 1" >>confdefs.h
+
+ if test -n "$LIBMULTITHREAD" || test -n "$LTLIBMULTITHREAD"; then
+ if case "$gl_cv_have_weak" in *yes) true;; *) false;; esac; then
+
+printf "%s\n" "#define USE_POSIX_THREADS_WEAK 1" >>confdefs.h
+
+ LIBTHREAD=
+ LTLIBTHREAD=
+ fi
+ fi
+ fi
+ fi
+ fi
+ if test -z "$gl_have_pthread"; then
+ if test "$gl_use_threads" = yes || test "$gl_use_threads" = solaris; then
+ gl_have_solaristhread=
+ gl_save_LIBS="$LIBS"
+ LIBS="$LIBS -lthread"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#include <thread.h>
+#include <synch.h>
+
+int
+main (void)
+{
+thr_self();
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"
+then :
+ gl_have_solaristhread=yes
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+ LIBS="$gl_save_LIBS"
+ if test -n "$gl_have_solaristhread"; then
+ gl_threads_api=solaris
+ LIBTHREAD=-lthread
+ LTLIBTHREAD=-lthread
+ LIBMULTITHREAD="$LIBTHREAD"
+ LTLIBMULTITHREAD="$LTLIBTHREAD"
+
+printf "%s\n" "#define USE_SOLARIS_THREADS 1" >>confdefs.h
+
+ if case "$gl_cv_have_weak" in *yes) true;; *) false;; esac; then
+
+printf "%s\n" "#define USE_SOLARIS_THREADS_WEAK 1" >>confdefs.h
+
+ LIBTHREAD=
+ LTLIBTHREAD=
+ fi
+ fi
+ fi
+ fi
+ if test "$gl_use_threads" = pth; then
+ gl_save_CPPFLAGS="$CPPFLAGS"
+
+
+
+
+
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to link with libpth" >&5
+printf %s "checking how to link with libpth... " >&6; }
+if test ${ac_cv_libpth_libs+y}
+then :
+ printf %s "(cached) " >&6
+else
+
+
+
+
+
+
+
+
+ use_additional=yes
+
+ acl_save_prefix="$prefix"
+ prefix="$acl_final_prefix"
+ acl_save_exec_prefix="$exec_prefix"
+ exec_prefix="$acl_final_exec_prefix"
+
+ eval additional_includedir=\"$includedir\"
+ eval additional_libdir=\"$libdir\"
+
+ exec_prefix="$acl_save_exec_prefix"
+ prefix="$acl_save_prefix"
+
+
+# Check whether --with-libpth-prefix was given.
+if test ${with_libpth_prefix+y}
+then :
+ withval=$with_libpth_prefix;
+ if test "X$withval" = "Xno"; then
+ use_additional=no
+ else
+ if test "X$withval" = "X"; then
+
+ acl_save_prefix="$prefix"
+ prefix="$acl_final_prefix"
+ acl_save_exec_prefix="$exec_prefix"
+ exec_prefix="$acl_final_exec_prefix"
+
+ eval additional_includedir=\"$includedir\"
+ eval additional_libdir=\"$libdir\"
+
+ exec_prefix="$acl_save_exec_prefix"
+ prefix="$acl_save_prefix"
+
+ else
+ additional_includedir="$withval/include"
+ additional_libdir="$withval/$acl_libdirstem"
+ if test "$acl_libdirstem2" != "$acl_libdirstem" \
+ && ! test -d "$withval/$acl_libdirstem"; then
+ additional_libdir="$withval/$acl_libdirstem2"
+ fi
+ fi
+ fi
+
+fi
+
+ LIBPTH=
+ LTLIBPTH=
+ INCPTH=
+ LIBPTH_PREFIX=
+ HAVE_LIBPTH=
+ rpathdirs=
+ ltrpathdirs=
+ names_already_handled=
+ names_next_round='pth '
+ while test -n "$names_next_round"; do
+ names_this_round="$names_next_round"
+ names_next_round=
+ for name in $names_this_round; do
+ already_handled=
+ for n in $names_already_handled; do
+ if test "$n" = "$name"; then
+ already_handled=yes
+ break
+ fi
+ done
+ if test -z "$already_handled"; then
+ names_already_handled="$names_already_handled $name"
+ uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./+-|ABCDEFGHIJKLMNOPQRSTUVWXYZ____|'`
+ eval value=\"\$HAVE_LIB$uppername\"
+ if test -n "$value"; then
+ if test "$value" = yes; then
+ eval value=\"\$LIB$uppername\"
+ test -z "$value" || LIBPTH="${LIBPTH}${LIBPTH:+ }$value"
+ eval value=\"\$LTLIB$uppername\"
+ test -z "$value" || LTLIBPTH="${LTLIBPTH}${LTLIBPTH:+ }$value"
+ else
+ :
+ fi
+ else
+ found_dir=
+ found_la=
+ found_so=
+ found_a=
+ eval libname=\"$acl_libname_spec\" # typically: libname=lib$name
+ if test -n "$acl_shlibext"; then
+ shrext=".$acl_shlibext" # typically: shrext=.so
+ else
+ shrext=
+ fi
+ if test $use_additional = yes; then
+ dir="$additional_libdir"
+ if test -n "$acl_shlibext"; then
+ if test -f "$dir/$libname$shrext"; then
+ found_dir="$dir"
+ found_so="$dir/$libname$shrext"
+ else
+ if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then
+ ver=`(cd "$dir" && \
+ for f in "$libname$shrext".*; do echo "$f"; done \
+ | sed -e "s,^$libname$shrext\\\\.,," \
+ | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
+ | sed 1q ) 2>/dev/null`
+ if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then
+ found_dir="$dir"
+ found_so="$dir/$libname$shrext.$ver"
+ fi
+ else
+ eval library_names=\"$acl_library_names_spec\"
+ for f in $library_names; do
+ if test -f "$dir/$f"; then
+ found_dir="$dir"
+ found_so="$dir/$f"
+ break
+ fi
+ done
+ fi
+ fi
+ fi
+ if test "X$found_dir" = "X"; then
+ if test -f "$dir/$libname.$acl_libext"; then
+ found_dir="$dir"
+ found_a="$dir/$libname.$acl_libext"
+ fi
+ fi
+ if test "X$found_dir" != "X"; then
+ if test -f "$dir/$libname.la"; then
+ found_la="$dir/$libname.la"
+ fi
+ fi
+ fi
+ if test "X$found_dir" = "X"; then
+ for x in $LDFLAGS $LTLIBPTH; do
+
+ acl_save_prefix="$prefix"
+ prefix="$acl_final_prefix"
+ acl_save_exec_prefix="$exec_prefix"
+ exec_prefix="$acl_final_exec_prefix"
+ eval x=\"$x\"
+ exec_prefix="$acl_save_exec_prefix"
+ prefix="$acl_save_prefix"
+
+ case "$x" in
+ -L*)
+ dir=`echo "X$x" | sed -e 's/^X-L//'`
+ if test -n "$acl_shlibext"; then
+ if test -f "$dir/$libname$shrext"; then
+ found_dir="$dir"
+ found_so="$dir/$libname$shrext"
+ else
+ if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then
+ ver=`(cd "$dir" && \
+ for f in "$libname$shrext".*; do echo "$f"; done \
+ | sed -e "s,^$libname$shrext\\\\.,," \
+ | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
+ | sed 1q ) 2>/dev/null`
+ if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then
+ found_dir="$dir"
+ found_so="$dir/$libname$shrext.$ver"
+ fi
+ else
+ eval library_names=\"$acl_library_names_spec\"
+ for f in $library_names; do
+ if test -f "$dir/$f"; then
+ found_dir="$dir"
+ found_so="$dir/$f"
+ break
+ fi
+ done
+ fi
+ fi
+ fi
+ if test "X$found_dir" = "X"; then
+ if test -f "$dir/$libname.$acl_libext"; then
+ found_dir="$dir"
+ found_a="$dir/$libname.$acl_libext"
+ fi
+ fi
+ if test "X$found_dir" != "X"; then
+ if test -f "$dir/$libname.la"; then
+ found_la="$dir/$libname.la"
+ fi
+ fi
+ ;;
+ esac
+ if test "X$found_dir" != "X"; then
+ break
+ fi
+ done
+ fi
+ if test "X$found_dir" != "X"; then
+ LTLIBPTH="${LTLIBPTH}${LTLIBPTH:+ }-L$found_dir -l$name"
+ if test "X$found_so" != "X"; then
+ if test "$enable_rpath" = no \
+ || test "X$found_dir" = "X/usr/$acl_libdirstem" \
+ || test "X$found_dir" = "X/usr/$acl_libdirstem2"; then
+ LIBPTH="${LIBPTH}${LIBPTH:+ }$found_so"
+ else
+ haveit=
+ for x in $ltrpathdirs; do
+ if test "X$x" = "X$found_dir"; then
+ haveit=yes
+ break
+ fi
+ done
+ if test -z "$haveit"; then
+ ltrpathdirs="$ltrpathdirs $found_dir"
+ fi
+ if test "$acl_hardcode_direct" = yes; then
+ LIBPTH="${LIBPTH}${LIBPTH:+ }$found_so"
+ else
+ if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then
+ LIBPTH="${LIBPTH}${LIBPTH:+ }$found_so"
+ haveit=
+ for x in $rpathdirs; do
+ if test "X$x" = "X$found_dir"; then
+ haveit=yes
+ break
+ fi
+ done
+ if test -z "$haveit"; then
+ rpathdirs="$rpathdirs $found_dir"
+ fi
+ else
+ haveit=
+ for x in $LDFLAGS $LIBPTH; do
+
+ acl_save_prefix="$prefix"
+ prefix="$acl_final_prefix"
+ acl_save_exec_prefix="$exec_prefix"
+ exec_prefix="$acl_final_exec_prefix"
+ eval x=\"$x\"
+ exec_prefix="$acl_save_exec_prefix"
+ prefix="$acl_save_prefix"
+
+ if test "X$x" = "X-L$found_dir"; then
+ haveit=yes
+ break
+ fi
+ done
+ if test -z "$haveit"; then
+ LIBPTH="${LIBPTH}${LIBPTH:+ }-L$found_dir"
+ fi
+ if test "$acl_hardcode_minus_L" != no; then
+ LIBPTH="${LIBPTH}${LIBPTH:+ }$found_so"
+ else
+ LIBPTH="${LIBPTH}${LIBPTH:+ }-l$name"
+ fi
+ fi
+ fi
+ fi
+ else
+ if test "X$found_a" != "X"; then
+ LIBPTH="${LIBPTH}${LIBPTH:+ }$found_a"
+ else
+ LIBPTH="${LIBPTH}${LIBPTH:+ }-L$found_dir -l$name"
+ fi
+ fi
+ additional_includedir=
+ case "$found_dir" in
+ */$acl_libdirstem | */$acl_libdirstem/)
+ basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem/"'*$,,'`
+ if test "$name" = 'pth'; then
+ LIBPTH_PREFIX="$basedir"
+ fi
+ additional_includedir="$basedir/include"
+ ;;
+ */$acl_libdirstem2 | */$acl_libdirstem2/)
+ basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem2/"'*$,,'`
+ if test "$name" = 'pth'; then
+ LIBPTH_PREFIX="$basedir"
+ fi
+ additional_includedir="$basedir/include"
+ ;;
+ esac
+ if test "X$additional_includedir" != "X"; then
+ if test "X$additional_includedir" != "X/usr/include"; then
+ haveit=
+ if test "X$additional_includedir" = "X/usr/local/include"; then
+ if test -n "$GCC"; then
+ case $host_os in
+ linux* | gnu* | k*bsd*-gnu) haveit=yes;;
+ esac
+ fi
+ fi
+ if test -z "$haveit"; then
+ for x in $CPPFLAGS $INCPTH; do
+
+ acl_save_prefix="$prefix"
+ prefix="$acl_final_prefix"
+ acl_save_exec_prefix="$exec_prefix"
+ exec_prefix="$acl_final_exec_prefix"
+ eval x=\"$x\"
+ exec_prefix="$acl_save_exec_prefix"
+ prefix="$acl_save_prefix"
+
+ if test "X$x" = "X-I$additional_includedir"; then
+ haveit=yes
+ break
+ fi
+ done
+ if test -z "$haveit"; then
+ if test -d "$additional_includedir"; then
+ INCPTH="${INCPTH}${INCPTH:+ }-I$additional_includedir"
+ fi
+ fi
+ fi
+ fi
+ fi
+ if test -n "$found_la"; then
+ save_libdir="$libdir"
+ case "$found_la" in
+ */* | *\\*) . "$found_la" ;;
+ *) . "./$found_la" ;;
+ esac
+ libdir="$save_libdir"
+ for dep in $dependency_libs; do
+ case "$dep" in
+ -L*)
+ additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
+ if test "X$additional_libdir" != "X/usr/$acl_libdirstem" \
+ && test "X$additional_libdir" != "X/usr/$acl_libdirstem2"; then
+ haveit=
+ if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem" \
+ || test "X$additional_libdir" = "X/usr/local/$acl_libdirstem2"; then
+ if test -n "$GCC"; then
+ case $host_os in
+ linux* | gnu* | k*bsd*-gnu) haveit=yes;;
+ esac
+ fi
+ fi
+ if test -z "$haveit"; then
+ haveit=
+ for x in $LDFLAGS $LIBPTH; do
+
+ acl_save_prefix="$prefix"
+ prefix="$acl_final_prefix"
+ acl_save_exec_prefix="$exec_prefix"
+ exec_prefix="$acl_final_exec_prefix"
+ eval x=\"$x\"
+ exec_prefix="$acl_save_exec_prefix"
+ prefix="$acl_save_prefix"
+
+ if test "X$x" = "X-L$additional_libdir"; then
+ haveit=yes
+ break
+ fi
+ done
+ if test -z "$haveit"; then
+ if test -d "$additional_libdir"; then
+ LIBPTH="${LIBPTH}${LIBPTH:+ }-L$additional_libdir"
+ fi
+ fi
+ haveit=
+ for x in $LDFLAGS $LTLIBPTH; do
+
+ acl_save_prefix="$prefix"
+ prefix="$acl_final_prefix"
+ acl_save_exec_prefix="$exec_prefix"
+ exec_prefix="$acl_final_exec_prefix"
+ eval x=\"$x\"
+ exec_prefix="$acl_save_exec_prefix"
+ prefix="$acl_save_prefix"
+
+ if test "X$x" = "X-L$additional_libdir"; then
+ haveit=yes
+ break
+ fi
+ done
+ if test -z "$haveit"; then
+ if test -d "$additional_libdir"; then
+ LTLIBPTH="${LTLIBPTH}${LTLIBPTH:+ }-L$additional_libdir"
+ fi
+ fi
+ fi
+ fi
+ ;;
+ -R*)
+ dir=`echo "X$dep" | sed -e 's/^X-R//'`
+ if test "$enable_rpath" != no; then
+ haveit=
+ for x in $rpathdirs; do
+ if test "X$x" = "X$dir"; then
+ haveit=yes
+ break
+ fi
+ done
+ if test -z "$haveit"; then
+ rpathdirs="$rpathdirs $dir"
+ fi
+ haveit=
+ for x in $ltrpathdirs; do
+ if test "X$x" = "X$dir"; then
+ haveit=yes
+ break
+ fi
+ done
+ if test -z "$haveit"; then
+ ltrpathdirs="$ltrpathdirs $dir"
+ fi
+ fi
+ ;;
+ -l*)
+ names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
+ ;;
+ *.la)
+ names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
+ ;;
+ *)
+ LIBPTH="${LIBPTH}${LIBPTH:+ }$dep"
+ LTLIBPTH="${LTLIBPTH}${LTLIBPTH:+ }$dep"
+ ;;
+ esac
+ done
+ fi
+ else
+ LIBPTH="${LIBPTH}${LIBPTH:+ }-l$name"
+ LTLIBPTH="${LTLIBPTH}${LTLIBPTH:+ }-l$name"
+ fi
+ fi
+ fi
+ done
+ done
+ if test "X$rpathdirs" != "X"; then
+ if test -n "$acl_hardcode_libdir_separator"; then
+ alldirs=
+ for found_dir in $rpathdirs; do
+ alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$found_dir"
+ done
+ acl_save_libdir="$libdir"
+ libdir="$alldirs"
+ eval flag=\"$acl_hardcode_libdir_flag_spec\"
+ libdir="$acl_save_libdir"
+ LIBPTH="${LIBPTH}${LIBPTH:+ }$flag"
+ else
+ for found_dir in $rpathdirs; do
+ acl_save_libdir="$libdir"
+ libdir="$found_dir"
+ eval flag=\"$acl_hardcode_libdir_flag_spec\"
+ libdir="$acl_save_libdir"
+ LIBPTH="${LIBPTH}${LIBPTH:+ }$flag"
+ done
+ fi
+ fi
+ if test "X$ltrpathdirs" != "X"; then
+ for found_dir in $ltrpathdirs; do
+ LTLIBPTH="${LTLIBPTH}${LTLIBPTH:+ }-R$found_dir"
+ done
+ fi
+
+
+
+
+
+
+ ac_cv_libpth_libs="$LIBPTH"
+ ac_cv_libpth_ltlibs="$LTLIBPTH"
+ ac_cv_libpth_cppflags="$INCPTH"
+ ac_cv_libpth_prefix="$LIBPTH_PREFIX"
+
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libpth_libs" >&5
+printf "%s\n" "$ac_cv_libpth_libs" >&6; }
+ LIBPTH="$ac_cv_libpth_libs"
+ LTLIBPTH="$ac_cv_libpth_ltlibs"
+ INCPTH="$ac_cv_libpth_cppflags"
+ LIBPTH_PREFIX="$ac_cv_libpth_prefix"
+
+ for element in $INCPTH; do
+ haveit=
+ for x in $CPPFLAGS; do
+
+ acl_save_prefix="$prefix"
+ prefix="$acl_final_prefix"
+ acl_save_exec_prefix="$exec_prefix"
+ exec_prefix="$acl_final_exec_prefix"
+ eval x=\"$x\"
+ exec_prefix="$acl_save_exec_prefix"
+ prefix="$acl_save_prefix"
+
+ if test "X$x" = "X$element"; then
+ haveit=yes
+ break
+ fi
+ done
+ if test -z "$haveit"; then
+ CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
+ fi
+ done
+
+
+
+
+ HAVE_LIBPTH=yes
+
+
+
+ gl_have_pth=
+ gl_save_LIBS="$LIBS"
+ LIBS="$LIBS $LIBPTH"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <pth.h>
+int
+main (void)
+{
+pth_self();
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"
+then :
+ gl_have_pth=yes
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+ LIBS="$gl_save_LIBS"
+ if test -n "$gl_have_pth"; then
+ gl_threads_api=pth
+ LIBTHREAD="$LIBPTH"
+ LTLIBTHREAD="$LTLIBPTH"
+ LIBMULTITHREAD="$LIBTHREAD"
+ LTLIBMULTITHREAD="$LTLIBTHREAD"
+
+printf "%s\n" "#define USE_PTH_THREADS 1" >>confdefs.h
+
+ if test -n "$LIBMULTITHREAD" || test -n "$LTLIBMULTITHREAD"; then
+ if case "$gl_cv_have_weak" in *yes) true;; *) false;; esac; then
+
+printf "%s\n" "#define USE_PTH_THREADS_WEAK 1" >>confdefs.h
+
+ LIBTHREAD=
+ LTLIBTHREAD=
+ fi
+ fi
+ else
+ CPPFLAGS="$gl_save_CPPFLAGS"
+ fi
+ fi
+ if test -z "$gl_have_pthread"; then
+ case "$gl_use_threads" in
+ yes | windows | win32) # The 'win32' is for backward compatibility.
+ if { case "$host_os" in
+ mingw*) true;;
+ *) false;;
+ esac
+ }; then
+ gl_threads_api=windows
+
+printf "%s\n" "#define USE_WINDOWS_THREADS 1" >>confdefs.h
+
+ fi
+ ;;
+ esac
+ fi
+ fi
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for multithread API to use" >&5
+printf %s "checking for multithread API to use... " >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_threads_api" >&5
+printf "%s\n" "$gl_threads_api" >&6; }
+
+
+
+
+
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether lstat correctly handles trailing slash" >&5
-$as_echo_n "checking whether lstat correctly handles trailing slash... " >&6; }
-if ${gl_cv_func_lstat_dereferences_slashed_symlink+:} false; then :
- $as_echo_n "(cached) " >&6
+
+
+
+ { 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 :
+ printf %s "(cached) " >&6
else
rm -f conftest.sym conftest.file
echo >conftest.file
- if test "$as_ln_s" = "ln -s" && ln -s conftest.file conftest.sym; then
- if test "$cross_compiling" = yes; then :
+ if test "$cross_compiling" = yes
+then :
case "$host_os" in
- # Guess yes on glibc systems.
- *-gnu*) gl_cv_func_lstat_dereferences_slashed_symlink="guessing yes" ;;
- # If we don't know, assume the worst.
- *) gl_cv_func_lstat_dereferences_slashed_symlink="guessing no" ;;
- esac
+ *-gnu*)
+ # Guess yes on glibc systems.
+ gl_cv_func_lstat_dereferences_slashed_symlink="guessing yes" ;;
+ *)
+ # If we don't know, assume the worst.
+ gl_cv_func_lstat_dereferences_slashed_symlink="guessing no" ;;
+ esac
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
$ac_includes_default
int
-main ()
+main (void)
{
struct stat sbuf;
- /* Linux will dereference the symlink and fail, as required by
- POSIX. That is better in the sense that it means we will not
- have to compile and use the lstat wrapper. */
- return lstat ("conftest.sym/", &sbuf) == 0;
+ if (symlink ("conftest.file", "conftest.sym") != 0)
+ return 1;
+ /* Linux will dereference the symlink and fail, as required by
+ POSIX. That is better in the sense that it means we will not
+ have to compile and use the lstat wrapper. */
+ return lstat ("conftest.sym/", &sbuf) == 0;
;
return 0;
}
_ACEOF
-if ac_fn_c_try_run "$LINENO"; then :
+if ac_fn_c_try_run "$LINENO"
+then :
gl_cv_func_lstat_dereferences_slashed_symlink=yes
else
gl_cv_func_lstat_dereferences_slashed_symlink=no
@@ -9578,38 +12064,107 @@ rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
conftest.$ac_objext conftest.beam conftest.$ac_ext
fi
- else
- # If the 'ln -s' command failed, then we probably don't even
- # have an lstat function.
- gl_cv_func_lstat_dereferences_slashed_symlink="guessing no"
- fi
rm -f conftest.sym conftest.file
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_lstat_dereferences_slashed_symlink" >&5
-$as_echo "$gl_cv_func_lstat_dereferences_slashed_symlink" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_lstat_dereferences_slashed_symlink" >&5
+printf "%s\n" "$gl_cv_func_lstat_dereferences_slashed_symlink" >&6; }
case "$gl_cv_func_lstat_dereferences_slashed_symlink" in
*yes)
-cat >>confdefs.h <<_ACEOF
-#define LSTAT_FOLLOWS_SLASHED_SYMLINK 1
-_ACEOF
+printf "%s\n" "#define LSTAT_FOLLOWS_SLASHED_SYMLINK 1" >>confdefs.h
;;
esac
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
+printf %s "checking for a sed that does not truncate output... " >&6; }
+if test ${ac_cv_path_SED+y}
+then :
+ printf %s "(cached) " >&6
+else
+ ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
+ for ac_i in 1 2 3 4 5 6 7; do
+ ac_script="$ac_script$as_nl$ac_script"
+ done
+ echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
+ { ac_script=; unset ac_script;}
+ if test -z "$SED"; then
+ ac_path_SED_found=false
+ # Loop through the user's path and test for each of PROGNAME-LIST
+ 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_prog in sed gsed
+ do
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ ac_path_SED="$as_dir$ac_prog$ac_exec_ext"
+ as_fn_executable_p "$ac_path_SED" || continue
+# Check for GNU ac_path_SED and select it if it is found.
+ # Check for GNU $ac_path_SED
+case `"$ac_path_SED" --version 2>&1` in
+*GNU*)
+ ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
+*)
+ ac_count=0
+ printf %s 0123456789 >"conftest.in"
+ while :
+ do
+ cat "conftest.in" "conftest.in" >"conftest.tmp"
+ mv "conftest.tmp" "conftest.in"
+ cp "conftest.in" "conftest.nl"
+ printf "%s\n" '' >> "conftest.nl"
+ "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
+ diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
+ as_fn_arith $ac_count + 1 && ac_count=$as_val
+ if test $ac_count -gt ${ac_path_SED_max-0}; then
+ # Best one so far, save it but keep looking for a better one
+ ac_cv_path_SED="$ac_path_SED"
+ ac_path_SED_max=$ac_count
+ fi
+ # 10*(2^10) chars as input seems more than enough
+ test $ac_count -gt 10 && break
+ done
+ rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
+esac
+
+ $ac_path_SED_found && break 3
+ done
+ done
+ done
+IFS=$as_save_IFS
+ if test -z "$ac_cv_path_SED"; then
+ as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
+ fi
+else
+ ac_cv_path_SED=$SED
+fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether malloc, realloc, calloc are POSIX compliant" >&5
-$as_echo_n "checking whether malloc, realloc, calloc are POSIX compliant... " >&6; }
-if ${gl_cv_func_malloc_posix+:} false; then :
- $as_echo_n "(cached) " >&6
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
+printf "%s\n" "$ac_cv_path_SED" >&6; }
+ SED="$ac_cv_path_SED"
+ rm -f conftest.sed
+
+
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether malloc, realloc, calloc are POSIX compliant" >&5
+printf %s "checking whether malloc, realloc, calloc are POSIX compliant... " >&6; }
+if test ${gl_cv_func_malloc_posix+y}
+then :
+ printf %s "(cached) " >&6
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
int
-main ()
+main (void)
{
#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
choke me
@@ -9619,7 +12174,8 @@ main ()
return 0;
}
_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_c_try_compile "$LINENO"
+then :
gl_cv_func_malloc_posix=yes
else
gl_cv_func_malloc_posix=no
@@ -9627,29 +12183,29 @@ fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_malloc_posix" >&5
-$as_echo "$gl_cv_func_malloc_posix" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_malloc_posix" >&5
+printf "%s\n" "$gl_cv_func_malloc_posix" >&6; }
+# Autoupdate added the following line to ensure that your configure
+# script's behavior did not change. It is probably safe to remove.
- for ac_header in stdlib.h
-do :
- ac_fn_c_check_header_mongrel "$LINENO" "stdlib.h" "ac_cv_header_stdlib_h" "$ac_includes_default"
-if test "x$ac_cv_header_stdlib_h" = xyes; then :
- cat >>confdefs.h <<_ACEOF
-#define HAVE_STDLIB_H 1
-_ACEOF
-fi
+ ac_fn_c_check_header_compile "$LINENO" "stdlib.h" "ac_cv_header_stdlib_h" "$ac_includes_default"
+if test "x$ac_cv_header_stdlib_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_STDLIB_H 1" >>confdefs.h
-done
+fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU libc compatible malloc" >&5
-$as_echo_n "checking for GNU libc compatible malloc... " >&6; }
-if ${ac_cv_func_malloc_0_nonnull+:} false; then :
- $as_echo_n "(cached) " >&6
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for GNU libc compatible malloc" >&5
+printf %s "checking for GNU libc compatible malloc... " >&6; }
+if test ${ac_cv_func_malloc_0_nonnull+y}
+then :
+ printf %s "(cached) " >&6
else
- if test "$cross_compiling" = yes; then :
+ if test "$cross_compiling" = yes
+then :
case "$host_os" in
# Guess yes on platforms where we know the result.
*-gnu* | freebsd* | netbsd* | openbsd* \
@@ -9669,15 +12225,19 @@ else
#endif
int
-main ()
+main (void)
{
-return ! malloc (0);
+char *p = malloc (0);
+ int result = !p;
+ free (p);
+ return result;
;
return 0;
}
_ACEOF
-if ac_fn_c_try_run "$LINENO"; then :
+if ac_fn_c_try_run "$LINENO"
+then :
ac_cv_func_malloc_0_nonnull=yes
else
ac_cv_func_malloc_0_nonnull=no
@@ -9688,25 +12248,25 @@ fi
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_malloc_0_nonnull" >&5
-$as_echo "$ac_cv_func_malloc_0_nonnull" >&6; }
- if test $ac_cv_func_malloc_0_nonnull = yes; then :
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_malloc_0_nonnull" >&5
+printf "%s\n" "$ac_cv_func_malloc_0_nonnull" >&6; }
+ if test $ac_cv_func_malloc_0_nonnull = yes
+then :
gl_cv_func_malloc_0_nonnull=1
else
gl_cv_func_malloc_0_nonnull=0
fi
-cat >>confdefs.h <<_ACEOF
-#define MALLOC_0_IS_NONNULL $gl_cv_func_malloc_0_nonnull
-_ACEOF
+printf "%s\n" "#define MALLOC_0_IS_NONNULL $gl_cv_func_malloc_0_nonnull" >>confdefs.h
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for unsigned long long int" >&5
-$as_echo_n "checking for unsigned long long int... " >&6; }
-if ${ac_cv_type_unsigned_long_long_int+:} false; then :
- $as_echo_n "(cached) " >&6
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for unsigned long long int" >&5
+printf %s "checking for unsigned long long int... " >&6; }
+if test ${ac_cv_type_unsigned_long_long_int+y}
+then :
+ printf %s "(cached) " >&6
else
ac_cv_type_unsigned_long_long_int=yes
if test "x${ac_cv_prog_cc_c99-no}" = xno; then
@@ -9728,7 +12288,7 @@ else
? 1 : -1)];
int i = 63;
int
-main ()
+main (void)
{
/* Test availability of runtime routines for shift and division. */
long long int llmax = 9223372036854775807ll;
@@ -9742,7 +12302,8 @@ main ()
}
_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
+if ac_fn_c_try_link "$LINENO"
+then :
else
ac_cv_type_unsigned_long_long_int=no
@@ -9751,26 +12312,28 @@ rm -f core conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
fi
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_unsigned_long_long_int" >&5
-$as_echo "$ac_cv_type_unsigned_long_long_int" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_unsigned_long_long_int" >&5
+printf "%s\n" "$ac_cv_type_unsigned_long_long_int" >&6; }
if test $ac_cv_type_unsigned_long_long_int = yes; then
-$as_echo "#define HAVE_UNSIGNED_LONG_LONG_INT 1" >>confdefs.h
+printf "%s\n" "#define HAVE_UNSIGNED_LONG_LONG_INT 1" >>confdefs.h
fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long int" >&5
-$as_echo_n "checking for long long int... " >&6; }
-if ${ac_cv_type_long_long_int+:} false; then :
- $as_echo_n "(cached) " >&6
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for long long int" >&5
+printf %s "checking for long long int... " >&6; }
+if test ${ac_cv_type_long_long_int+y}
+then :
+ printf %s "(cached) " >&6
else
ac_cv_type_long_long_int=yes
if test "x${ac_cv_prog_cc_c99-no}" = xno; then
ac_cv_type_long_long_int=$ac_cv_type_unsigned_long_long_int
if test $ac_cv_type_long_long_int = yes; then
- if test "$cross_compiling" = yes; then :
+ if test "$cross_compiling" = yes
+then :
:
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -9782,7 +12345,7 @@ else
# define LLONG_MAX (HALF - 1 + HALF)
#endif
int
-main ()
+main (void)
{
long long int n = 1;
int i;
@@ -9799,7 +12362,8 @@ long long int n = 1;
return 0;
}
_ACEOF
-if ac_fn_c_try_run "$LINENO"; then :
+if ac_fn_c_try_run "$LINENO"
+then :
else
ac_cv_type_long_long_int=no
@@ -9811,20 +12375,21 @@ fi
fi
fi
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_long_long_int" >&5
-$as_echo "$ac_cv_type_long_long_int" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_long_long_int" >&5
+printf "%s\n" "$ac_cv_type_long_long_int" >&6; }
if test $ac_cv_type_long_long_int = yes; then
-$as_echo "#define HAVE_LONG_LONG_INT 1" >>confdefs.h
+printf "%s\n" "#define HAVE_LONG_LONG_INT 1" >>confdefs.h
fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for mbstate_t" >&5
-$as_echo_n "checking for mbstate_t... " >&6; }
-if ${ac_cv_type_mbstate_t+:} false; then :
- $as_echo_n "(cached) " >&6
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for mbstate_t" >&5
+printf %s "checking for mbstate_t... " >&6; }
+if test ${ac_cv_type_mbstate_t+y}
+then :
+ printf %s "(cached) " >&6
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -9838,29 +12403,30 @@ $ac_includes_default
#include <time.h>
#include <wchar.h>
int
-main ()
+main (void)
{
mbstate_t x; return sizeof x;
;
return 0;
}
_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_c_try_compile "$LINENO"
+then :
ac_cv_type_mbstate_t=yes
else
ac_cv_type_mbstate_t=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_mbstate_t" >&5
-$as_echo "$ac_cv_type_mbstate_t" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_mbstate_t" >&5
+printf "%s\n" "$ac_cv_type_mbstate_t" >&6; }
if test $ac_cv_type_mbstate_t = yes; then
-$as_echo "#define HAVE_MBSTATE_T 1" >>confdefs.h
+printf "%s\n" "#define HAVE_MBSTATE_T 1" >>confdefs.h
else
-$as_echo "#define mbstate_t int" >>confdefs.h
+printf "%s\n" "#define mbstate_t int" >>confdefs.h
fi
@@ -9869,12 +12435,11 @@ $as_echo "#define mbstate_t int" >>confdefs.h
-
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a traditional japanese locale" >&5
-$as_echo_n "checking for a traditional japanese locale... " >&6; }
-if ${gt_cv_locale_ja+:} false; then :
- $as_echo_n "(cached) " >&6
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a traditional japanese locale" >&5
+printf %s "checking for a traditional japanese locale... " >&6; }
+if test ${gt_cv_locale_ja+y}
+then :
+ printf %s "(cached) " >&6
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -9944,7 +12509,7 @@ _ACEOF
if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
(eval $ac_link) 2>&5
ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
test $ac_status = 0; } && test -s conftest$ac_exeext; then
case "$host_os" in
# Handle native Windows specially, because there setlocale() interprets
@@ -10002,18 +12567,19 @@ _ACEOF
rm -fr conftest*
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_ja" >&5
-$as_echo "$gt_cv_locale_ja" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_ja" >&5
+printf "%s\n" "$gt_cv_locale_ja" >&6; }
LOCALE_JA=$gt_cv_locale_ja
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a transitional chinese locale" >&5
-$as_echo_n "checking for a transitional chinese locale... " >&6; }
-if ${gt_cv_locale_zh_CN+:} false; then :
- $as_echo_n "(cached) " >&6
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a transitional chinese locale" >&5
+printf %s "checking for a transitional chinese locale... " >&6; }
+if test ${gt_cv_locale_zh_CN+y}
+then :
+ printf %s "(cached) " >&6
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -10084,7 +12650,7 @@ _ACEOF
if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
(eval $ac_link) 2>&5
ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
test $ac_status = 0; } && test -s conftest$ac_exeext; then
case "$host_os" in
# Handle native Windows specially, because there setlocale() interprets
@@ -10135,17 +12701,18 @@ _ACEOF
rm -fr conftest*
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_zh_CN" >&5
-$as_echo "$gt_cv_locale_zh_CN" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_zh_CN" >&5
+printf "%s\n" "$gt_cv_locale_zh_CN" >&6; }
LOCALE_ZH_CN=$gt_cv_locale_zh_CN
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a french Unicode locale" >&5
-$as_echo_n "checking for a french Unicode locale... " >&6; }
-if ${gt_cv_locale_fr_utf8+:} false; then :
- $as_echo_n "(cached) " >&6
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a french Unicode locale" >&5
+printf %s "checking for a french Unicode locale... " >&6; }
+if test ${gt_cv_locale_fr_utf8+y}
+then :
+ printf %s "(cached) " >&6
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -10217,7 +12784,7 @@ _ACEOF
if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
(eval $ac_link) 2>&5
ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
test $ac_status = 0; } && test -s conftest$ac_exeext; then
case "$host_os" in
# Handle native Windows specially, because there setlocale() interprets
@@ -10263,8 +12830,8 @@ _ACEOF
rm -fr conftest*
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr_utf8" >&5
-$as_echo "$gt_cv_locale_fr_utf8" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr_utf8" >&5
+printf "%s\n" "$gt_cv_locale_fr_utf8" >&6; }
LOCALE_FR_UTF8=$gt_cv_locale_fr_utf8
@@ -10282,10 +12849,11 @@ $as_echo "$gt_cv_locale_fr_utf8" >&6; }
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc handles incomplete characters" >&5
-$as_echo_n "checking whether mbrtowc handles incomplete characters... " >&6; }
-if ${gl_cv_func_mbrtowc_incomplete_state+:} false; then :
- $as_echo_n "(cached) " >&6
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc handles incomplete characters" >&5
+printf %s "checking whether mbrtowc handles incomplete characters... " >&6; }
+if test ${gl_cv_func_mbrtowc_incomplete_state+y}
+then :
+ printf %s "(cached) " >&6
else
case "$host_os" in
@@ -10295,7 +12863,8 @@ else
*) gl_cv_func_mbrtowc_incomplete_state="guessing yes" ;;
esac
if test $LOCALE_JA != none; then
- if test "$cross_compiling" = yes; then :
+ if test "$cross_compiling" = yes
+then :
:
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -10322,12 +12891,13 @@ int main ()
memset (&state, '\0', sizeof (mbstate_t));
if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
if (mbsinit (&state))
- return 1;
+ return 2;
}
return 0;
}
_ACEOF
-if ac_fn_c_try_run "$LINENO"; then :
+if ac_fn_c_try_run "$LINENO"
+then :
gl_cv_func_mbrtowc_incomplete_state=yes
else
gl_cv_func_mbrtowc_incomplete_state=no
@@ -10339,16 +12909,17 @@ fi
fi
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_incomplete_state" >&5
-$as_echo "$gl_cv_func_mbrtowc_incomplete_state" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_incomplete_state" >&5
+printf "%s\n" "$gl_cv_func_mbrtowc_incomplete_state" >&6; }
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc works as well as mbtowc" >&5
-$as_echo_n "checking whether mbrtowc works as well as mbtowc... " >&6; }
-if ${gl_cv_func_mbrtowc_sanitycheck+:} false; then :
- $as_echo_n "(cached) " >&6
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc works as well as mbtowc" >&5
+printf %s "checking whether mbrtowc works as well as mbtowc... " >&6; }
+if test ${gl_cv_func_mbrtowc_sanitycheck+y}
+then :
+ printf %s "(cached) " >&6
else
case "$host_os" in
@@ -10358,7 +12929,8 @@ else
*) gl_cv_func_mbrtowc_sanitycheck="guessing yes" ;;
esac
if test $LOCALE_ZH_CN != none; then
- if test "$cross_compiling" = yes; then :
+ if test "$cross_compiling" = yes
+then :
:
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -10389,12 +12961,13 @@ int main ()
memset (&state, '\0', sizeof (mbstate_t));
if (mbrtowc (&wc, input + 3, 6, &state) != 4
&& mbtowc (&wc, input + 3, 6) == 4)
- return 1;
+ return 2;
}
return 0;
}
_ACEOF
-if ac_fn_c_try_run "$LINENO"; then :
+if ac_fn_c_try_run "$LINENO"
+then :
gl_cv_func_mbrtowc_sanitycheck=yes
else
gl_cv_func_mbrtowc_sanitycheck=no
@@ -10406,8 +12979,8 @@ fi
fi
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_sanitycheck" >&5
-$as_echo "$gl_cv_func_mbrtowc_sanitycheck" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_sanitycheck" >&5
+printf "%s\n" "$gl_cv_func_mbrtowc_sanitycheck" >&6; }
REPLACE_MBSTATE_T=0
case "$gl_cv_func_mbrtowc_incomplete_state" in
@@ -10437,15 +13010,14 @@ $as_echo "$gl_cv_func_mbrtowc_sanitycheck" >&6; }
#include <wchar.h>
"
-if test "x$ac_cv_have_decl_mbrtowc" = xyes; then :
+if test "x$ac_cv_have_decl_mbrtowc" = xyes
+then :
ac_have_decl=1
else
ac_have_decl=0
fi
-cat >>confdefs.h <<_ACEOF
-#define HAVE_DECL_MBRTOWC $ac_have_decl
-_ACEOF
+printf "%s\n" "#define HAVE_DECL_MBRTOWC $ac_have_decl" >>confdefs.h
if test $ac_cv_have_decl_mbrtowc = yes; then
REPLACE_MBRTOWC=1
@@ -10457,10 +13029,11 @@ _ACEOF
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc handles a NULL pwc argument" >&5
-$as_echo_n "checking whether mbrtowc handles a NULL pwc argument... " >&6; }
-if ${gl_cv_func_mbrtowc_null_arg1+:} false; then :
- $as_echo_n "(cached) " >&6
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc handles a NULL pwc argument" >&5
+printf %s "checking whether mbrtowc handles a NULL pwc argument... " >&6; }
+if test ${gl_cv_func_mbrtowc_null_arg1+y}
+then :
+ printf %s "(cached) " >&6
else
case "$host_os" in
@@ -10470,7 +13043,8 @@ else
*) gl_cv_func_mbrtowc_null_arg1="guessing yes" ;;
esac
if test $LOCALE_FR_UTF8 != none; then
- if test "$cross_compiling" = yes; then :
+ if test "$cross_compiling" = yes
+then :
:
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -10516,7 +13090,8 @@ int main ()
return result;
}
_ACEOF
-if ac_fn_c_try_run "$LINENO"; then :
+if ac_fn_c_try_run "$LINENO"
+then :
gl_cv_func_mbrtowc_null_arg1=yes
else
gl_cv_func_mbrtowc_null_arg1=no
@@ -10528,16 +13103,17 @@ fi
fi
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_null_arg1" >&5
-$as_echo "$gl_cv_func_mbrtowc_null_arg1" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_null_arg1" >&5
+printf "%s\n" "$gl_cv_func_mbrtowc_null_arg1" >&6; }
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc handles a NULL string argument" >&5
-$as_echo_n "checking whether mbrtowc handles a NULL string argument... " >&6; }
-if ${gl_cv_func_mbrtowc_null_arg2+:} false; then :
- $as_echo_n "(cached) " >&6
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc handles a NULL string argument" >&5
+printf %s "checking whether mbrtowc handles a NULL string argument... " >&6; }
+if test ${gl_cv_func_mbrtowc_null_arg2+y}
+then :
+ printf %s "(cached) " >&6
else
case "$host_os" in
@@ -10547,7 +13123,8 @@ else
*) gl_cv_func_mbrtowc_null_arg2="guessing yes" ;;
esac
if test $LOCALE_FR_UTF8 != none; then
- if test "$cross_compiling" = yes; then :
+ if test "$cross_compiling" = yes
+then :
:
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -10576,12 +13153,13 @@ int main ()
mbrtowc (&wc, NULL, 5, &state);
/* Check that wc was not modified. */
if (wc != (wchar_t) 0xBADFACE)
- return 1;
+ return 2;
}
return 0;
}
_ACEOF
-if ac_fn_c_try_run "$LINENO"; then :
+if ac_fn_c_try_run "$LINENO"
+then :
gl_cv_func_mbrtowc_null_arg2=yes
else
gl_cv_func_mbrtowc_null_arg2=no
@@ -10593,18 +13171,19 @@ fi
fi
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_null_arg2" >&5
-$as_echo "$gl_cv_func_mbrtowc_null_arg2" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_null_arg2" >&5
+printf "%s\n" "$gl_cv_func_mbrtowc_null_arg2" >&6; }
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc has a correct return value" >&5
-$as_echo_n "checking whether mbrtowc has a correct return value... " >&6; }
-if ${gl_cv_func_mbrtowc_retval+:} false; then :
- $as_echo_n "(cached) " >&6
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc has a correct return value" >&5
+printf %s "checking whether mbrtowc has a correct return value... " >&6; }
+if test ${gl_cv_func_mbrtowc_retval+y}
+then :
+ printf %s "(cached) " >&6
else
case "$host_os" in
@@ -10615,7 +13194,8 @@ else
esac
if test $LOCALE_FR_UTF8 != none || test $LOCALE_JA != none \
|| { case "$host_os" in mingw*) true;; *) false;; esac; }; then
- if test "$cross_compiling" = yes; then :
+ if test "$cross_compiling" = yes
+then :
:
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -10716,7 +13296,8 @@ int main ()
return (found_some_locale ? result : 77);
}
_ACEOF
-if ac_fn_c_try_run "$LINENO"; then :
+if ac_fn_c_try_run "$LINENO"
+then :
gl_cv_func_mbrtowc_retval=yes
else
if test $? != 77; then
@@ -10731,16 +13312,17 @@ fi
fi
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_retval" >&5
-$as_echo "$gl_cv_func_mbrtowc_retval" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_retval" >&5
+printf "%s\n" "$gl_cv_func_mbrtowc_retval" >&6; }
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc returns 0 when parsing a NUL character" >&5
-$as_echo_n "checking whether mbrtowc returns 0 when parsing a NUL character... " >&6; }
-if ${gl_cv_func_mbrtowc_nul_retval+:} false; then :
- $as_echo_n "(cached) " >&6
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc returns 0 when parsing a NUL character" >&5
+printf %s "checking whether mbrtowc returns 0 when parsing a NUL character... " >&6; }
+if test ${gl_cv_func_mbrtowc_nul_retval+y}
+then :
+ printf %s "(cached) " >&6
else
case "$host_os" in
@@ -10750,7 +13332,8 @@ else
*) gl_cv_func_mbrtowc_nul_retval="guessing yes" ;;
esac
if test $LOCALE_ZH_CN != none; then
- if test "$cross_compiling" = yes; then :
+ if test "$cross_compiling" = yes
+then :
:
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -10776,12 +13359,13 @@ int main ()
memset (&state, '\0', sizeof (mbstate_t));
if (mbrtowc (&wc, "", 1, &state) != 0)
- return 1;
+ return 2;
}
return 0;
}
_ACEOF
-if ac_fn_c_try_run "$LINENO"; then :
+if ac_fn_c_try_run "$LINENO"
+then :
gl_cv_func_mbrtowc_nul_retval=yes
else
gl_cv_func_mbrtowc_nul_retval=no
@@ -10793,13 +13377,116 @@ fi
fi
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_nul_retval" >&5
-$as_echo "$gl_cv_func_mbrtowc_nul_retval" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_nul_retval" >&5
+printf "%s\n" "$gl_cv_func_mbrtowc_nul_retval" >&6; }
+
+
+
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc works on empty input" >&5
+printf %s "checking whether mbrtowc works on empty input... " >&6; }
+if test ${gl_cv_func_mbrtowc_empty_input+y}
+then :
+ printf %s "(cached) " >&6
+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" ;;
+ esac
+ if test "$cross_compiling" = yes
+then :
+ :
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+ #include <wchar.h>
+ static wchar_t wc;
+ static mbstate_t mbs;
+ int
+ main (void)
+ {
+ return mbrtowc (&wc, "", 0, &mbs) != (size_t) -2;
+ }
+_ACEOF
+if ac_fn_c_try_run "$LINENO"
+then :
+ gl_cv_func_mbrtowc_empty_input=yes
+else
+ gl_cv_func_mbrtowc_empty_input=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_mbrtowc_empty_input" >&5
+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 "checking whether the C locale is free of encoding errors... " >&6; }
+if test ${gl_cv_C_locale_sans_EILSEQ+y}
+then :
+ printf %s "(cached) " >&6
+else
+
+ gl_cv_C_locale_sans_EILSEQ="guessing no"
+
+ if test "$cross_compiling" = yes
+then :
+ :
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <limits.h>
+ #include <locale.h>
+ #include <wchar.h>
+
+int
+main (void)
+{
+
+ int i;
+ char *locale = setlocale (LC_ALL, "C");
+ if (! locale)
+ return 2;
+ for (i = CHAR_MIN; i <= CHAR_MAX; i++)
+ {
+ char c = i;
+ wchar_t wc;
+ mbstate_t mbs = { 0, };
+ size_t ss = mbrtowc (&wc, &c, 1, &mbs);
+ if (1 < ss)
+ return 3;
+ }
+ return 0;
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"
+then :
+ gl_cv_C_locale_sans_EILSEQ=yes
+else
+ gl_cv_C_locale_sans_EILSEQ=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_C_locale_sans_EILSEQ" >&5
+printf "%s\n" "$gl_cv_C_locale_sans_EILSEQ" >&6; }
case "$gl_cv_func_mbrtowc_null_arg1" in
*yes) ;;
*)
-$as_echo "#define MBRTOWC_NULL_ARG1_BUG 1" >>confdefs.h
+printf "%s\n" "#define MBRTOWC_NULL_ARG1_BUG 1" >>confdefs.h
REPLACE_MBRTOWC=1
;;
@@ -10807,7 +13494,7 @@ $as_echo "#define MBRTOWC_NULL_ARG1_BUG 1" >>confdefs.h
case "$gl_cv_func_mbrtowc_null_arg2" in
*yes) ;;
*)
-$as_echo "#define MBRTOWC_NULL_ARG2_BUG 1" >>confdefs.h
+printf "%s\n" "#define MBRTOWC_NULL_ARG2_BUG 1" >>confdefs.h
REPLACE_MBRTOWC=1
;;
@@ -10815,7 +13502,7 @@ $as_echo "#define MBRTOWC_NULL_ARG2_BUG 1" >>confdefs.h
case "$gl_cv_func_mbrtowc_retval" in
*yes) ;;
*)
-$as_echo "#define MBRTOWC_RETVAL_BUG 1" >>confdefs.h
+printf "%s\n" "#define MBRTOWC_RETVAL_BUG 1" >>confdefs.h
REPLACE_MBRTOWC=1
;;
@@ -10823,16 +13510,29 @@ $as_echo "#define MBRTOWC_RETVAL_BUG 1" >>confdefs.h
case "$gl_cv_func_mbrtowc_nul_retval" in
*yes) ;;
*)
-$as_echo "#define MBRTOWC_NUL_RETVAL_BUG 1" >>confdefs.h
+printf "%s\n" "#define MBRTOWC_NUL_RETVAL_BUG 1" >>confdefs.h
REPLACE_MBRTOWC=1
;;
esac
- fi
- fi
-
+ case "$gl_cv_func_mbrtowc_empty_input" in
+ *yes) ;;
+ *)
+printf "%s\n" "#define MBRTOWC_EMPTY_INPUT_BUG 1" >>confdefs.h
+ REPLACE_MBRTOWC=1
+ ;;
+ esac
+ case $gl_cv_C_locale_sans_EILSEQ in
+ *yes) ;;
+ *)
+printf "%s\n" "#define C_LOCALE_MAYBE_EILSEQ 1" >>confdefs.h
+ REPLACE_MBRTOWC=1
+ ;;
+ esac
+ fi
+ fi
@@ -10920,7 +13620,8 @@ $as_echo "#define MBRTOWC_NUL_RETVAL_BUG 1" >>confdefs.h
# fails on HP-UX 11, because MAP_FIXED mappings do not work. But this is
# irrelevant for anonymous mappings.
ac_fn_c_check_func "$LINENO" "mmap" "ac_cv_func_mmap"
-if test "x$ac_cv_func_mmap" = xyes; then :
+if test "x$ac_cv_func_mmap" = xyes
+then :
gl_have_mmap=yes
else
gl_have_mmap=no
@@ -10930,8 +13631,8 @@ fi
# Try to allow MAP_ANONYMOUS.
gl_have_mmap_anonymous=no
if test $gl_have_mmap = yes; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MAP_ANONYMOUS" >&5
-$as_echo_n "checking for MAP_ANONYMOUS... " >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for MAP_ANONYMOUS" >&5
+printf %s "checking for MAP_ANONYMOUS... " >&6; }
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -10942,10 +13643,11 @@ $as_echo_n "checking for MAP_ANONYMOUS... " >&6; }
_ACEOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- $EGREP "I cannot identify this map" >/dev/null 2>&1; then :
+ $EGREP "I cannot identify this map" >/dev/null 2>&1
+then :
gl_have_mmap_anonymous=yes
fi
-rm -f conftest*
+rm -rf conftest*
if test $gl_have_mmap_anonymous != yes; then
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -10958,20 +13660,21 @@ rm -f conftest*
_ACEOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- $EGREP "I cannot identify this map" >/dev/null 2>&1; then :
+ $EGREP "I cannot identify this map" >/dev/null 2>&1
+then :
-$as_echo "#define MAP_ANONYMOUS MAP_ANON" >>confdefs.h
+printf "%s\n" "#define MAP_ANONYMOUS MAP_ANON" >>confdefs.h
gl_have_mmap_anonymous=yes
fi
-rm -f conftest*
+rm -rf conftest*
fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_have_mmap_anonymous" >&5
-$as_echo "$gl_have_mmap_anonymous" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_have_mmap_anonymous" >&5
+printf "%s\n" "$gl_have_mmap_anonymous" >&6; }
if test $gl_have_mmap_anonymous = yes; then
-$as_echo "#define HAVE_MAP_ANONYMOUS 1" >>confdefs.h
+printf "%s\n" "#define HAVE_MAP_ANONYMOUS 1" >>confdefs.h
fi
fi
@@ -10989,12 +13692,14 @@ $as_echo "#define HAVE_MAP_ANONYMOUS 1" >>confdefs.h
# http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=521737
# http://sourceware.org/bugzilla/show_bug.cgi?id=10162
# Assume that memchr works on platforms that lack mprotect.
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether memchr works" >&5
-$as_echo_n "checking whether memchr works... " >&6; }
-if ${gl_cv_func_memchr_works+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- if test "$cross_compiling" = yes; then :
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether memchr works" >&5
+printf %s "checking whether memchr works... " >&6; }
+if test ${gl_cv_func_memchr_works+y}
+then :
+ printf %s "(cached) " >&6
+else
+ if test "$cross_compiling" = yes
+then :
gl_cv_func_memchr_works="guessing no"
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -11012,7 +13717,7 @@ else
#endif
int
-main ()
+main (void)
{
int result = 0;
@@ -11052,7 +13757,8 @@ main ()
return 0;
}
_ACEOF
-if ac_fn_c_try_run "$LINENO"; then :
+if ac_fn_c_try_run "$LINENO"
+then :
gl_cv_func_memchr_works=yes
else
gl_cv_func_memchr_works=no
@@ -11062,13 +13768,105 @@ rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
fi
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_memchr_works" >&5
-$as_echo "$gl_cv_func_memchr_works" >&6; }
+{ 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
fi
+ac_fn_c_check_decl "$LINENO" "memrchr" "ac_cv_have_decl_memrchr" "$ac_includes_default"
+if test "x$ac_cv_have_decl_memrchr" = xyes
+then :
+ ac_have_decl=1
+else
+ ac_have_decl=0
+fi
+
+printf "%s\n" "#define HAVE_DECL_MEMRCHR $ac_have_decl" >>confdefs.h
+
+
+
+
+
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether <limits.h> defines MIN and MAX" >&5
+printf %s "checking whether <limits.h> defines MIN and MAX... " >&6; }
+if test ${gl_cv_minmax_in_limits_h+y}
+then :
+ printf %s "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <limits.h>
+ int x = MIN (42, 17);
+int
+main (void)
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"
+then :
+ gl_cv_minmax_in_limits_h=yes
+else
+ gl_cv_minmax_in_limits_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_minmax_in_limits_h" >&5
+printf "%s\n" "$gl_cv_minmax_in_limits_h" >&6; }
+ if test $gl_cv_minmax_in_limits_h = yes; then
+
+printf "%s\n" "#define HAVE_MINMAX_IN_LIMITS_H 1" >>confdefs.h
+
+ fi
+
+
+
+
+
+
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether <sys/param.h> defines MIN and MAX" >&5
+printf %s "checking whether <sys/param.h> defines MIN and MAX... " >&6; }
+if test ${gl_cv_minmax_in_sys_param_h+y}
+then :
+ printf %s "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <sys/param.h>
+ int x = MIN (42, 17);
+int
+main (void)
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"
+then :
+ gl_cv_minmax_in_sys_param_h=yes
+else
+ gl_cv_minmax_in_sys_param_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_minmax_in_sys_param_h" >&5
+printf "%s\n" "$gl_cv_minmax_in_sys_param_h" >&6; }
+ if test $gl_cv_minmax_in_sys_param_h = yes; then
+
+printf "%s\n" "#define HAVE_MINMAX_IN_SYS_PARAM_H 1" >>confdefs.h
+
+ fi
+
+
+
+
+
+
@@ -11081,7 +13879,8 @@ $as_echo "$gl_cv_func_memchr_works" >&6; }
typedef int dummy;
_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_c_try_compile "$LINENO"
+then :
arch=
prev=
@@ -11114,11 +13913,22 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ac_fn_c_check_decl "$LINENO" "alarm" "ac_cv_have_decl_alarm" "$ac_includes_default"
+if test "x$ac_cv_have_decl_alarm" = xyes
+then :
+ ac_have_decl=1
+else
+ ac_have_decl=0
+fi
+
+printf "%s\n" "#define HAVE_DECL_ALARM $ac_have_decl" >>confdefs.h
+
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
-$as_echo_n "checking for inline... " >&6; }
-if ${ac_cv_c_inline+:} false; then :
- $as_echo_n "(cached) " >&6
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
+printf %s "checking for inline... " >&6; }
+if test ${ac_cv_c_inline+y}
+then :
+ printf %s "(cached) " >&6
else
ac_cv_c_inline=no
for ac_kw in inline __inline__ __inline; do
@@ -11131,7 +13941,8 @@ $ac_kw foo_t foo () {return 0; }
#endif
_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_c_try_compile "$LINENO"
+then :
ac_cv_c_inline=$ac_kw
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
@@ -11139,8 +13950,8 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
done
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
-$as_echo "$ac_cv_c_inline" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
+printf "%s\n" "$ac_cv_c_inline" >&6; }
case $ac_cv_c_inline in
inline | yes) ;;
@@ -11169,9 +13980,9 @@ esac
-
# Check whether --with-selinux was given.
-if test "${with_selinux+set}" = set; then :
+if test ${with_selinux+y}
+then :
withval=$with_selinux;
else
with_selinux=maybe
@@ -11181,10 +13992,11 @@ fi
LIB_SELINUX=
if test "$with_selinux" != no; then
gl_save_LIBS=$LIBS
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing setfilecon" >&5
-$as_echo_n "checking for library containing setfilecon... " >&6; }
-if ${ac_cv_search_setfilecon+:} false; then :
- $as_echo_n "(cached) " >&6
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing setfilecon" >&5
+printf %s "checking for library containing setfilecon... " >&6; }
+if test ${ac_cv_search_setfilecon+y}
+then :
+ printf %s "(cached) " >&6
else
ac_func_search_save_LIBS=$LIBS
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -11198,30 +14010,34 @@ extern "C"
#endif
char setfilecon ();
int
-main ()
+main (void)
{
return setfilecon ();
;
return 0;
}
_ACEOF
-for ac_lib in '' selinux; do
+for ac_lib in '' selinux
+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 :
+ if ac_fn_c_try_link "$LINENO"
+then :
ac_cv_search_setfilecon=$ac_res
fi
rm -f core conftest.err conftest.$ac_objext \
conftest$ac_exeext
- if ${ac_cv_search_setfilecon+:} false; then :
+ if test ${ac_cv_search_setfilecon+y}
+then :
break
fi
done
-if ${ac_cv_search_setfilecon+:} false; then :
+if test ${ac_cv_search_setfilecon+y}
+then :
else
ac_cv_search_setfilecon=no
@@ -11229,10 +14045,11 @@ fi
rm conftest.$ac_ext
LIBS=$ac_func_search_save_LIBS
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_setfilecon" >&5
-$as_echo "$ac_cv_search_setfilecon" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_setfilecon" >&5
+printf "%s\n" "$ac_cv_search_setfilecon" >&6; }
ac_res=$ac_cv_search_setfilecon
-if test "$ac_res" != no; then :
+if test "$ac_res" != no
+then :
test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
test "$ac_cv_search_setfilecon" = "none required" ||
LIB_SELINUX=$ac_cv_search_setfilecon
@@ -11243,101 +14060,202 @@ fi
# Warn if SELinux is found but libselinux is absent;
- if test "$ac_cv_search_setfilecon" = no &&
- test "$host" = "$build" && test -d /selinux; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This system supports SELinux but libselinux is missing." >&5
-$as_echo "$as_me: WARNING: This system supports SELinux but libselinux is missing." >&2;}
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: GNU sed will be compiled without SELinux support." >&5
-$as_echo "$as_me: WARNING: GNU sed will be compiled without SELinux support." >&2;}
+ if test "$ac_cv_search_setfilecon" = no; then
+ if test "$host" = "$build" && test -d /selinux; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: This system supports SELinux but libselinux is missing." >&5
+printf "%s\n" "$as_me: WARNING: This system supports SELinux but libselinux is missing." >&2;}
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: GNU sed will be compiled without SELinux support." >&5
+printf "%s\n" "$as_me: WARNING: GNU sed will be compiled without SELinux support." >&2;}
+ fi
+ with_selinux=no
fi
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdbool.h that conforms to C99" >&5
-$as_echo_n "checking for stdbool.h that conforms to C99... " >&6; }
-if ${ac_cv_header_stdbool_h+:} false; then :
- $as_echo_n "(cached) " >&6
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for stdbool.h that conforms to C99" >&5
+printf %s "checking for stdbool.h that conforms to C99... " >&6; }
+if test ${ac_cv_header_stdbool_h+y}
+then :
+ printf %s "(cached) " >&6
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <stdbool.h>
- #ifndef bool
- "error: bool is not defined"
- #endif
- #ifndef false
- "error: false is not defined"
- #endif
- #if false
- "error: false is not 0"
- #endif
- #ifndef true
- "error: true is not defined"
- #endif
- #if true != 1
- "error: true is not 1"
+
+ #ifdef __cplusplus
+ typedef bool Bool;
+ #else
+ typedef _Bool Bool;
+ #ifndef bool
+ "error: bool is not defined"
+ #endif
+ #ifndef false
+ "error: false is not defined"
+ #endif
+ #if false
+ "error: false is not 0"
+ #endif
+ #ifndef true
+ "error: true is not defined"
+ #endif
+ #if true != 1
+ "error: true is not 1"
+ #endif
#endif
+
#ifndef __bool_true_false_are_defined
"error: __bool_true_false_are_defined is not defined"
#endif
- struct s { _Bool s: 1; _Bool t; } s;
+ struct s { Bool s: 1; Bool t; bool u: 1; bool v; } s;
char a[true == 1 ? 1 : -1];
char b[false == 0 ? 1 : -1];
char c[__bool_true_false_are_defined == 1 ? 1 : -1];
char d[(bool) 0.5 == true ? 1 : -1];
/* See body of main program for 'e'. */
- char f[(_Bool) 0.0 == false ? 1 : -1];
+ char f[(Bool) 0.0 == false ? 1 : -1];
char g[true];
- char h[sizeof (_Bool)];
+ char h[sizeof (Bool)];
char i[sizeof s.t];
enum { j = false, k = true, l = false * true, m = true * 256 };
/* The following fails for
HP aC++/ANSI C B3910B A.05.55 [Dec 04 2003]. */
- _Bool n[m];
+ 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];
+ 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
*/
- _Bool q = true;
- _Bool *pq = &q;
+ Bool q = true;
+ Bool *pq = &q;
+ bool *qq = &q;
int
-main ()
+main (void)
{
bool e = &s;
- *pq |= q;
- *pq |= ! q;
+ *pq |= q; *pq |= ! q;
+ *qq |= q; *qq |= ! q;
/* Refer to every declared value, to avoid compiler optimizations. */
return (!a + !b + !c + !d + !e + !f + !g + !h + !i + !!j + !k + !!l
- + !m + !n + !o + !p + !q + !pq);
+ + !m + !n + !o + !p + !q + !pq + !qq);
;
return 0;
}
_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_c_try_compile "$LINENO"
+then :
ac_cv_header_stdbool_h=yes
else
ac_cv_header_stdbool_h=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdbool_h" >&5
-$as_echo "$ac_cv_header_stdbool_h" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdbool_h" >&5
+printf "%s\n" "$ac_cv_header_stdbool_h" >&6; }
ac_fn_c_check_type "$LINENO" "_Bool" "ac_cv_type__Bool" "$ac_includes_default"
-if test "x$ac_cv_type__Bool" = xyes; then :
+if test "x$ac_cv_type__Bool" = xyes
+then :
+
+printf "%s\n" "#define HAVE__BOOL 1" >>confdefs.h
+
+
+fi
+
+
+
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for wint_t" >&5
+printf %s "checking for wint_t... " >&6; }
+if test ${gt_cv_c_wint_t+y}
+then :
+ printf %s "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
+ <wchar.h>.
+ BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be included
+ before <wchar.h>. */
+#include <stddef.h>
+#include <stdio.h>
+#include <time.h>
+#include <wchar.h>
+ wint_t foo = (wchar_t)'\0';
+int
+main (void)
+{
-cat >>confdefs.h <<_ACEOF
-#define HAVE__BOOL 1
+ ;
+ return 0;
+}
_ACEOF
+if ac_fn_c_try_compile "$LINENO"
+then :
+ gt_cv_c_wint_t=yes
+else
+ gt_cv_c_wint_t=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_c_wint_t" >&5
+printf "%s\n" "$gt_cv_c_wint_t" >&6; }
+ if test $gt_cv_c_wint_t = yes; then
+
+printf "%s\n" "#define HAVE_WINT_T 1" >>confdefs.h
+
+
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether wint_t is too small" >&5
+printf %s "checking whether wint_t is too small... " >&6; }
+if test ${gl_cv_type_wint_t_too_small+y}
+then :
+ printf %s "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
+ <wchar.h>.
+ BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
+ included before <wchar.h>. */
+#if !(defined __GLIBC__ && !defined __UCLIBC__)
+# include <stddef.h>
+# include <stdio.h>
+# include <time.h>
+#endif
+#include <wchar.h>
+ int verify[sizeof (wint_t) < sizeof (int) ? -1 : 1];
+int
+main (void)
+{
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"
+then :
+ gl_cv_type_wint_t_too_small=no
+else
+ gl_cv_type_wint_t_too_small=yes
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_type_wint_t_too_small" >&5
+printf "%s\n" "$gl_cv_type_wint_t_too_small" >&6; }
+ if test $gl_cv_type_wint_t_too_small = yes; then
+ GNULIB_OVERRIDES_WINT_T=1
+ else
+ GNULIB_OVERRIDES_WINT_T=0
+ fi
+ else
+ GNULIB_OVERRIDES_WINT_T=0
+ fi
@@ -11395,53 +14313,58 @@ fi
if test $gl_cv_have_include_next = yes; then
gl_cv_next_stdint_h='<'stdint.h'>'
else
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stdint.h>" >&5
-$as_echo_n "checking absolute name of <stdint.h>... " >&6; }
-if ${gl_cv_next_stdint_h+:} false; then :
- $as_echo_n "(cached) " >&6
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <stdint.h>" >&5
+printf %s "checking absolute name of <stdint.h>... " >&6; }
+if test ${gl_cv_next_stdint_h+y}
+then :
+ printf %s "(cached) " >&6
else
if test $ac_cv_header_stdint_h = yes; then
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+
+
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <stdint.h>
-
_ACEOF
- case "$host_os" in
- aix*) gl_absname_cpp="$ac_cpp -C" ;;
- *) gl_absname_cpp="$ac_cpp" ;;
- esac
+ 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 'stdint.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_next_stdint_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
- sed -n "$gl_absolute_header_sed"`'"'
+ case "$host_os" in
+ mingw*)
+ gl_dirsep_regex='[/\\]'
+ ;;
+ *)
+ gl_dirsep_regex='\/'
+ ;;
+ esac
+ gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
+ gl_header_literal_regex=`echo 'stdint.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_stdint_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
+ sed -n "$gl_absolute_header_sed"`
+
+ gl_header=$gl_cv_absolute_stdint_h
+ gl_cv_next_stdint_h='"'$gl_header'"'
else
gl_cv_next_stdint_h='<'stdint.h'>'
fi
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stdint_h" >&5
-$as_echo "$gl_cv_next_stdint_h" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stdint_h" >&5
+printf "%s\n" "$gl_cv_next_stdint_h" >&6; }
fi
NEXT_STDINT_H=$gl_cv_next_stdint_h
@@ -11465,10 +14388,11 @@ $as_echo "$gl_cv_next_stdint_h" >&6; }
if test $ac_cv_header_stdint_h = yes; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stdint.h conforms to C99" >&5
-$as_echo_n "checking whether stdint.h conforms to C99... " >&6; }
-if ${gl_cv_header_working_stdint_h+:} false; then :
- $as_echo_n "(cached) " >&6
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether stdint.h conforms to C99" >&5
+printf %s "checking whether stdint.h conforms to C99... " >&6; }
+if test ${gl_cv_header_working_stdint_h+y}
+then :
+ printf %s "(cached) " >&6
else
gl_cv_header_working_stdint_h=no
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -11476,6 +14400,8 @@ else
#define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */
+#define __STDC_CONSTANT_MACROS 1
+#define __STDC_LIMIT_MACROS 1
#include <stdint.h>
/* Dragonfly defines WCHAR_MIN, WCHAR_MAX only in <wchar.h>. */
#if !(defined WCHAR_MIN && defined WCHAR_MAX)
@@ -11566,6 +14492,15 @@ uintptr_t h = UINTPTR_MAX;
intmax_t i = INTMAX_MAX;
uintmax_t j = UINTMAX_MAX;
+/* Check that SIZE_MAX has the correct type, if possible. */
+#if 201112 <= __STDC_VERSION__
+int k = _Generic (SIZE_MAX, size_t: 0);
+#elif (2 <= __GNUC__ || defined __IBM__TYPEOF__ \
+ || (0x5110 <= __SUNPRO_C && !__STDC__))
+extern size_t k;
+extern __typeof__ (SIZE_MAX) k;
+#endif
+
#include <limits.h> /* for CHAR_BIT */
#define TYPE_MINIMUM(t) \
((t) ((t) 0 < (t) -1 ? (t) 0 : ~ TYPE_MAXIMUM (t)))
@@ -11627,15 +14562,17 @@ struct s {
};
int
-main ()
+main (void)
{
;
return 0;
}
_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
- if test "$cross_compiling" = yes; then :
+if ac_fn_c_try_compile "$LINENO"
+then :
+ if test "$cross_compiling" = yes
+then :
gl_cv_header_working_stdint_h=yes
else
@@ -11644,6 +14581,8 @@ else
#define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */
+#define __STDC_CONSTANT_MACROS 1
+#define __STDC_LIMIT_MACROS 1
#include <stdint.h>
@@ -11692,7 +14631,7 @@ static const char *macro_values[] =
};
int
-main ()
+main (void)
{
const char **mv;
@@ -11714,7 +14653,8 @@ main ()
return 0;
}
_ACEOF
-if ac_fn_c_try_run "$LINENO"; then :
+if ac_fn_c_try_run "$LINENO"
+then :
gl_cv_header_working_stdint_h=yes
fi
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
@@ -11726,48 +14666,149 @@ fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_working_stdint_h" >&5
-$as_echo "$gl_cv_header_working_stdint_h" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_working_stdint_h" >&5
+printf "%s\n" "$gl_cv_header_working_stdint_h" >&6; }
fi
+
+ HAVE_C99_STDINT_H=0
+ HAVE_SYS_BITYPES_H=0
+ HAVE_SYS_INTTYPES_H=0
+ STDINT_H=stdint.h
if test "$gl_cv_header_working_stdint_h" = yes; then
- STDINT_H=
- else
- for ac_header in sys/inttypes.h sys/bitypes.h
-do :
- as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
-ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
-if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
- cat >>confdefs.h <<_ACEOF
-#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
+ 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
+/* end confdefs.h. */
+
+
+#define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */
+#include <stdint.h>
+
+
+ /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
+ included before <wchar.h>. */
+ #include <stddef.h>
+ #include <signal.h>
+ #if HAVE_WCHAR_H
+ # include <stdio.h>
+ # include <time.h>
+ # include <wchar.h>
+ #endif
+
+
+intmax_t im = INTMAX_MAX;
+int32_t i32 = INT32_C (0x7fffffff);
+
+int
+main (void)
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"
+then :
+ gl_cv_header_stdint_predates_cxx11_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_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
+
+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
+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
+/* 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>
+
+ /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
+ included before <wchar.h>. */
+ #include <stddef.h>
+ #include <signal.h>
+ #if HAVE_WCHAR_H
+ # include <stdio.h>
+ # include <time.h>
+ # include <wchar.h>
+ #endif
+
+ int iw = UINTMAX_WIDTH;
+
+int
+main (void)
+{
+
+ ;
+ return 0;
+}
_ACEOF
+if ac_fn_c_try_compile "$LINENO"
+then :
+ gl_cv_header_stdint_width=yes
+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_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 "x$ac_cv_header_sys_inttypes_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_SYS_INTTYPES_H 1" >>confdefs.h
fi
+ac_fn_c_check_header_compile "$LINENO" "sys/bitypes.h" "ac_cv_header_sys_bitypes_h" "$ac_includes_default"
+if test "x$ac_cv_header_sys_bitypes_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_SYS_BITYPES_H 1" >>confdefs.h
-done
+fi
if test $ac_cv_header_sys_inttypes_h = yes; then
HAVE_SYS_INTTYPES_H=1
- else
- HAVE_SYS_INTTYPES_H=0
fi
-
if test $ac_cv_header_sys_bitypes_h = yes; then
HAVE_SYS_BITYPES_H=1
- else
- HAVE_SYS_BITYPES_H=0
fi
-
-
if test $APPLE_UNIVERSAL_BUILD = 0; then
for gltype in ptrdiff_t size_t ; do
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for bit size of $gltype" >&5
-$as_echo_n "checking for bit size of $gltype... " >&6; }
-if eval \${gl_cv_bitsizeof_${gltype}+:} false; then :
- $as_echo_n "(cached) " >&6
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for bit size of $gltype" >&5
+printf %s "checking for bit size of $gltype... " >&6; }
+if eval test \${gl_cv_bitsizeof_${gltype}+y}
+then :
+ printf %s "(cached) " >&6
else
if ac_fn_c_compute_int "$LINENO" "sizeof ($gltype) * CHAR_BIT" "result" "
/* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
@@ -11780,7 +14821,8 @@ else
# include <wchar.h>
#endif
-#include <limits.h>"; then :
+#include <limits.h>"
+then :
else
result=unknown
@@ -11790,16 +14832,14 @@ fi
fi
eval ac_res=\$gl_cv_bitsizeof_${gltype}
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
-$as_echo "$ac_res" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+printf "%s\n" "$ac_res" >&6; }
eval result=\$gl_cv_bitsizeof_${gltype}
if test $result = unknown; then
result=0
fi
GLTYPE=`echo "$gltype" | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
- cat >>confdefs.h <<_ACEOF
-#define BITSIZEOF_${GLTYPE} $result
-_ACEOF
+ printf "%s\n" "#define BITSIZEOF_${GLTYPE} $result" >>confdefs.h
eval BITSIZEOF_${GLTYPE}=\$result
done
@@ -11809,10 +14849,11 @@ _ACEOF
for gltype in sig_atomic_t wchar_t wint_t ; do
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for bit size of $gltype" >&5
-$as_echo_n "checking for bit size of $gltype... " >&6; }
-if eval \${gl_cv_bitsizeof_${gltype}+:} false; then :
- $as_echo_n "(cached) " >&6
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for bit size of $gltype" >&5
+printf %s "checking for bit size of $gltype... " >&6; }
+if eval test \${gl_cv_bitsizeof_${gltype}+y}
+then :
+ printf %s "(cached) " >&6
else
if ac_fn_c_compute_int "$LINENO" "sizeof ($gltype) * CHAR_BIT" "result" "
/* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
@@ -11825,7 +14866,8 @@ else
# include <wchar.h>
#endif
-#include <limits.h>"; then :
+#include <limits.h>"
+then :
else
result=unknown
@@ -11835,16 +14877,14 @@ fi
fi
eval ac_res=\$gl_cv_bitsizeof_${gltype}
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
-$as_echo "$ac_res" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+printf "%s\n" "$ac_res" >&6; }
eval result=\$gl_cv_bitsizeof_${gltype}
if test $result = unknown; then
result=0
fi
GLTYPE=`echo "$gltype" | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
- cat >>confdefs.h <<_ACEOF
-#define BITSIZEOF_${GLTYPE} $result
-_ACEOF
+ printf "%s\n" "#define BITSIZEOF_${GLTYPE} $result" >>confdefs.h
eval BITSIZEOF_${GLTYPE}=\$result
done
@@ -11853,10 +14893,11 @@ _ACEOF
for gltype in sig_atomic_t wchar_t wint_t ; do
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gltype is signed" >&5
-$as_echo_n "checking whether $gltype is signed... " >&6; }
-if eval \${gl_cv_type_${gltype}_signed+:} false; then :
- $as_echo_n "(cached) " >&6
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $gltype is signed" >&5
+printf %s "checking whether $gltype is signed... " >&6; }
+if eval test \${gl_cv_type_${gltype}_signed+y}
+then :
+ printf %s "(cached) " >&6
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -11873,14 +14914,15 @@ else
int verify[2 * (($gltype) -1 < ($gltype) 0) - 1];
int
-main ()
+main (void)
{
;
return 0;
}
_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_c_try_compile "$LINENO"
+then :
result=yes
else
result=no
@@ -11890,14 +14932,12 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
eval ac_res=\$gl_cv_type_${gltype}_signed
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
-$as_echo "$ac_res" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+printf "%s\n" "$ac_res" >&6; }
eval result=\$gl_cv_type_${gltype}_signed
GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
if test "$result" = yes; then
- cat >>confdefs.h <<_ACEOF
-#define HAVE_SIGNED_${GLTYPE} 1
-_ACEOF
+ printf "%s\n" "#define HAVE_SIGNED_${GLTYPE} 1" >>confdefs.h
eval HAVE_SIGNED_${GLTYPE}=1
else
@@ -11912,10 +14952,11 @@ _ACEOF
for gltype in ptrdiff_t size_t ; do
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $gltype integer literal suffix" >&5
-$as_echo_n "checking for $gltype integer literal suffix... " >&6; }
-if eval \${gl_cv_type_${gltype}_suffix+:} false; then :
- $as_echo_n "(cached) " >&6
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $gltype integer literal suffix" >&5
+printf %s "checking for $gltype integer literal suffix... " >&6; }
+if eval test \${gl_cv_type_${gltype}_suffix+y}
+then :
+ printf %s "(cached) " >&6
else
eval gl_cv_type_${gltype}_suffix=no
eval result=\$gl_cv_type_${gltype}_signed
@@ -11951,14 +14992,15 @@ else
extern $gltype foo;
extern $gltype1 foo;
int
-main ()
+main (void)
{
;
return 0;
}
_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_c_try_compile "$LINENO"
+then :
eval gl_cv_type_${gltype}_suffix=\$glsuf
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
@@ -11967,15 +15009,13 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
done
fi
eval ac_res=\$gl_cv_type_${gltype}_suffix
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
-$as_echo "$ac_res" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+printf "%s\n" "$ac_res" >&6; }
GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
eval result=\$gl_cv_type_${gltype}_suffix
test "$result" = no && result=
eval ${GLTYPE}_SUFFIX=\$result
- cat >>confdefs.h <<_ACEOF
-#define ${GLTYPE}_SUFFIX $result
-_ACEOF
+ printf "%s\n" "#define ${GLTYPE}_SUFFIX $result" >>confdefs.h
done
@@ -11984,10 +15024,11 @@ _ACEOF
for gltype in sig_atomic_t wchar_t wint_t ; do
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $gltype integer literal suffix" >&5
-$as_echo_n "checking for $gltype integer literal suffix... " >&6; }
-if eval \${gl_cv_type_${gltype}_suffix+:} false; then :
- $as_echo_n "(cached) " >&6
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $gltype integer literal suffix" >&5
+printf %s "checking for $gltype integer literal suffix... " >&6; }
+if eval test \${gl_cv_type_${gltype}_suffix+y}
+then :
+ printf %s "(cached) " >&6
else
eval gl_cv_type_${gltype}_suffix=no
eval result=\$gl_cv_type_${gltype}_signed
@@ -12023,14 +15064,15 @@ else
extern $gltype foo;
extern $gltype1 foo;
int
-main ()
+main (void)
{
;
return 0;
}
_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_c_try_compile "$LINENO"
+then :
eval gl_cv_type_${gltype}_suffix=\$glsuf
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
@@ -12039,27 +15081,38 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
done
fi
eval ac_res=\$gl_cv_type_${gltype}_suffix
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
-$as_echo "$ac_res" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+printf "%s\n" "$ac_res" >&6; }
GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
eval result=\$gl_cv_type_${gltype}_suffix
test "$result" = no && result=
eval ${GLTYPE}_SUFFIX=\$result
- cat >>confdefs.h <<_ACEOF
-#define ${GLTYPE}_SUFFIX $result
-_ACEOF
+ printf "%s\n" "#define ${GLTYPE}_SUFFIX $result" >>confdefs.h
done
- if test $BITSIZEOF_WINT_T -lt 32; then
+ if test $GNULIB_OVERRIDES_WINT_T = 1; then
BITSIZEOF_WINT_T=32
fi
- STDINT_H=stdint.h
fi
+ LIMITS_H=limits.h
+ if test -n "$LIMITS_H"; then
+ GL_GENERATE_LIMITS_H_TRUE=
+ GL_GENERATE_LIMITS_H_FALSE='#'
+else
+ GL_GENERATE_LIMITS_H_TRUE='#'
+ GL_GENERATE_LIMITS_H_FALSE=
+fi
+
+
+
+
+
+
if test -n "$STDINT_H"; then
GL_GENERATE_STDINT_H_TRUE=
GL_GENERATE_STDINT_H_FALSE='#'
@@ -12071,12 +15124,14 @@ fi
REPLACE_STRERROR_0=0
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strerror(0) succeeds" >&5
-$as_echo_n "checking whether strerror(0) succeeds... " >&6; }
-if ${gl_cv_func_strerror_0_works+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- if test "$cross_compiling" = yes; then :
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether strerror(0) succeeds" >&5
+printf %s "checking whether strerror(0) succeeds... " >&6; }
+if test ${gl_cv_func_strerror_0_works+y}
+then :
+ printf %s "(cached) " >&6
+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" ;;
@@ -12091,7 +15146,7 @@ else
#include <errno.h>
int
-main ()
+main (void)
{
int result = 0;
char *str;
@@ -12106,7 +15161,8 @@ int result = 0;
return 0;
}
_ACEOF
-if ac_fn_c_try_run "$LINENO"; then :
+if ac_fn_c_try_run "$LINENO"
+then :
gl_cv_func_strerror_0_works=yes
else
gl_cv_func_strerror_0_works=no
@@ -12117,14 +15173,14 @@ fi
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strerror_0_works" >&5
-$as_echo "$gl_cv_func_strerror_0_works" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strerror_0_works" >&5
+printf "%s\n" "$gl_cv_func_strerror_0_works" >&6; }
case "$gl_cv_func_strerror_0_works" in
*yes) ;;
*)
REPLACE_STRERROR_0=1
-$as_echo "#define REPLACE_STRERROR_0 1" >>confdefs.h
+printf "%s\n" "#define REPLACE_STRERROR_0 1" >>confdefs.h
;;
esac
@@ -12143,47 +15199,52 @@ $as_echo "#define REPLACE_STRERROR_0 1" >>confdefs.h
if test $gl_cv_have_include_next = yes; then
gl_cv_next_string_h='<'string.h'>'
else
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <string.h>" >&5
-$as_echo_n "checking absolute name of <string.h>... " >&6; }
-if ${gl_cv_next_string_h+:} false; then :
- $as_echo_n "(cached) " >&6
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <string.h>" >&5
+printf %s "checking absolute name of <string.h>... " >&6; }
+if test ${gl_cv_next_string_h+y}
+then :
+ printf %s "(cached) " >&6
else
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+
+
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <string.h>
-
_ACEOF
- case "$host_os" in
- aix*) gl_absname_cpp="$ac_cpp -C" ;;
- *) gl_absname_cpp="$ac_cpp" ;;
- esac
+ 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'
+ case "$host_os" in
+ mingw*)
+ gl_dirsep_regex='[/\\]'
+ ;;
+ *)
+ gl_dirsep_regex='\/'
+ ;;
+ esac
+ gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
+ gl_header_literal_regex=`echo 'string.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_header_literal_regex=`echo 'string.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_next_string_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
- sed -n "$gl_absolute_header_sed"`'"'
+ gl_cv_absolute_string_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
+ sed -n "$gl_absolute_header_sed"`
+
+ gl_header=$gl_cv_absolute_string_h
+ gl_cv_next_string_h='"'$gl_header'"'
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_string_h" >&5
-$as_echo "$gl_cv_next_string_h" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_string_h" >&5
+printf "%s\n" "$gl_cv_next_string_h" >&6; }
fi
NEXT_STRING_H=$gl_cv_next_string_h
@@ -12202,18 +15263,19 @@ $as_echo "$gl_cv_next_string_h" >&6; }
for gl_func in ffsl ffsll memmem mempcpy memrchr rawmemchr stpcpy stpncpy strchrnul strdup strncat strndup strnlen strpbrk strsep strcasestr strtok_r strerror_r strsignal strverscmp; do
- as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
-$as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
-if eval \${$as_gl_Symbol+:} false; then :
- $as_echo_n "(cached) " >&6
+ 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 <string.h>
int
-main ()
+main (void)
{
#undef $gl_func
(void) $gl_func;
@@ -12221,7 +15283,8 @@ main ()
return 0;
}
_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_c_try_compile "$LINENO"
+then :
eval "$as_gl_Symbol=yes"
else
eval "$as_gl_Symbol=no"
@@ -12229,11 +15292,12 @@ fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
eval ac_res=\$$as_gl_Symbol
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
-$as_echo "$ac_res" >&6; }
- if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
+ { 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 `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
+#define `printf "%s\n" "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
_ACEOF
eval ac_cv_have_decl_$gl_func=yes
@@ -12250,11 +15314,93 @@ fi
+
+
+
+
+
+
+
+
+
+ if test $gl_cv_have_include_next = yes; then
+ gl_cv_next_sys_types_h='<'sys/types.h'>'
+ else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/types.h>" >&5
+printf %s "checking absolute name of <sys/types.h>... " >&6; }
+if test ${gl_cv_next_sys_types_h+y}
+then :
+ printf %s "(cached) " >&6
+else
+
+
+
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <sys/types.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/types.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_types_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
+ sed -n "$gl_absolute_header_sed"`
+
+ gl_header=$gl_cv_absolute_sys_types_h
+ gl_cv_next_sys_types_h='"'$gl_header'"'
+
+
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_types_h" >&5
+printf "%s\n" "$gl_cv_next_sys_types_h" >&6; }
+ fi
+ NEXT_SYS_TYPES_H=$gl_cv_next_sys_types_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/types.h'>'
+ else
+ # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
+ gl_next_as_first_directive=$gl_cv_next_sys_types_h
+ fi
+ NEXT_AS_FIRST_DIRECTIVE_SYS_TYPES_H=$gl_next_as_first_directive
+
+
+
+
+
+
+
+
+
+
+
+
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;
@@ -12264,98 +15410,141 @@ fi
REPLACE_NANOSLEEP=GNULIB_PORTCHECK;
REPLACE_TIMEGM=GNULIB_PORTCHECK;
+ : ${GNULIB_GETTIMEOFDAY=0};
+ REPLACE_GMTIME=0;
+ REPLACE_LOCALTIME=0;
+
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timespec in <time.h>" >&5
-$as_echo_n "checking for struct timespec in <time.h>... " >&6; }
-if ${gl_cv_sys_struct_timespec_in_time_h+:} false; then :
- $as_echo_n "(cached) " >&6
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for struct timespec in <time.h>" >&5
+printf %s "checking for struct timespec in <time.h>... " >&6; }
+if test ${gl_cv_sys_struct_timespec_in_time_h+y}
+then :
+ printf %s "(cached) " >&6
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <time.h>
int
-main ()
+main (void)
{
static struct timespec x; x.tv_sec = x.tv_nsec;
;
return 0;
}
_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_c_try_compile "$LINENO"
+then :
gl_cv_sys_struct_timespec_in_time_h=yes
else
gl_cv_sys_struct_timespec_in_time_h=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timespec_in_time_h" >&5
-$as_echo "$gl_cv_sys_struct_timespec_in_time_h" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timespec_in_time_h" >&5
+printf "%s\n" "$gl_cv_sys_struct_timespec_in_time_h" >&6; }
TIME_H_DEFINES_STRUCT_TIMESPEC=0
SYS_TIME_H_DEFINES_STRUCT_TIMESPEC=0
PTHREAD_H_DEFINES_STRUCT_TIMESPEC=0
+ UNISTD_H_DEFINES_STRUCT_TIMESPEC=0
if test $gl_cv_sys_struct_timespec_in_time_h = yes; then
TIME_H_DEFINES_STRUCT_TIMESPEC=1
else
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timespec in <sys/time.h>" >&5
-$as_echo_n "checking for struct timespec in <sys/time.h>... " >&6; }
-if ${gl_cv_sys_struct_timespec_in_sys_time_h+:} false; then :
- $as_echo_n "(cached) " >&6
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for struct timespec in <sys/time.h>" >&5
+printf %s "checking for struct timespec in <sys/time.h>... " >&6; }
+if test ${gl_cv_sys_struct_timespec_in_sys_time_h+y}
+then :
+ printf %s "(cached) " >&6
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <sys/time.h>
int
-main ()
+main (void)
{
static struct timespec x; x.tv_sec = x.tv_nsec;
;
return 0;
}
_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_c_try_compile "$LINENO"
+then :
gl_cv_sys_struct_timespec_in_sys_time_h=yes
else
gl_cv_sys_struct_timespec_in_sys_time_h=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timespec_in_sys_time_h" >&5
-$as_echo "$gl_cv_sys_struct_timespec_in_sys_time_h" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timespec_in_sys_time_h" >&5
+printf "%s\n" "$gl_cv_sys_struct_timespec_in_sys_time_h" >&6; }
if test $gl_cv_sys_struct_timespec_in_sys_time_h = yes; then
SYS_TIME_H_DEFINES_STRUCT_TIMESPEC=1
else
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timespec in <pthread.h>" >&5
-$as_echo_n "checking for struct timespec in <pthread.h>... " >&6; }
-if ${gl_cv_sys_struct_timespec_in_pthread_h+:} false; then :
- $as_echo_n "(cached) " >&6
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for struct timespec in <pthread.h>" >&5
+printf %s "checking for struct timespec in <pthread.h>... " >&6; }
+if test ${gl_cv_sys_struct_timespec_in_pthread_h+y}
+then :
+ printf %s "(cached) " >&6
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <pthread.h>
int
-main ()
+main (void)
{
static struct timespec x; x.tv_sec = x.tv_nsec;
;
return 0;
}
_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_c_try_compile "$LINENO"
+then :
gl_cv_sys_struct_timespec_in_pthread_h=yes
else
gl_cv_sys_struct_timespec_in_pthread_h=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timespec_in_pthread_h" >&5
-$as_echo "$gl_cv_sys_struct_timespec_in_pthread_h" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timespec_in_pthread_h" >&5
+printf "%s\n" "$gl_cv_sys_struct_timespec_in_pthread_h" >&6; }
if test $gl_cv_sys_struct_timespec_in_pthread_h = yes; then
PTHREAD_H_DEFINES_STRUCT_TIMESPEC=1
+ else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for struct timespec in <unistd.h>" >&5
+printf %s "checking for struct timespec in <unistd.h>... " >&6; }
+if test ${gl_cv_sys_struct_timespec_in_unistd_h+y}
+then :
+ printf %s "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <unistd.h>
+
+int
+main (void)
+{
+static struct timespec x; x.tv_sec = x.tv_nsec;
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"
+then :
+ gl_cv_sys_struct_timespec_in_unistd_h=yes
+else
+ gl_cv_sys_struct_timespec_in_unistd_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_sys_struct_timespec_in_unistd_h" >&5
+printf "%s\n" "$gl_cv_sys_struct_timespec_in_unistd_h" >&6; }
+ if test $gl_cv_sys_struct_timespec_in_unistd_h = yes; then
+ UNISTD_H_DEFINES_STRUCT_TIMESPEC=1
+ fi
fi
fi
fi
@@ -12374,50 +15563,56 @@ $as_echo "$gl_cv_sys_struct_timespec_in_pthread_h" >&6; }
+
if test $gl_cv_have_include_next = yes; then
gl_cv_next_time_h='<'time.h'>'
else
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <time.h>" >&5
-$as_echo_n "checking absolute name of <time.h>... " >&6; }
-if ${gl_cv_next_time_h+:} false; then :
- $as_echo_n "(cached) " >&6
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <time.h>" >&5
+printf %s "checking absolute name of <time.h>... " >&6; }
+if test ${gl_cv_next_time_h+y}
+then :
+ printf %s "(cached) " >&6
else
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+
+
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <time.h>
-
_ACEOF
- case "$host_os" in
- aix*) gl_absname_cpp="$ac_cpp -C" ;;
- *) gl_absname_cpp="$ac_cpp" ;;
- esac
+ 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'
+ case "$host_os" in
+ mingw*)
+ gl_dirsep_regex='[/\\]'
+ ;;
+ *)
+ gl_dirsep_regex='\/'
+ ;;
+ esac
+ gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
+ gl_header_literal_regex=`echo 'time.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_header_literal_regex=`echo 'time.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_next_time_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
- sed -n "$gl_absolute_header_sed"`'"'
+ gl_cv_absolute_time_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
+ sed -n "$gl_absolute_header_sed"`
+
+ gl_header=$gl_cv_absolute_time_h
+ gl_cv_next_time_h='"'$gl_header'"'
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_time_h" >&5
-$as_echo "$gl_cv_next_time_h" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_time_h" >&5
+printf "%s\n" "$gl_cv_next_time_h" >&6; }
fi
NEXT_TIME_H=$gl_cv_next_time_h
@@ -12436,137 +15631,124 @@ $as_echo "$gl_cv_next_time_h" >&6; }
ac_fn_c_check_decl "$LINENO" "clearerr_unlocked" "ac_cv_have_decl_clearerr_unlocked" "$ac_includes_default"
-if test "x$ac_cv_have_decl_clearerr_unlocked" = xyes; then :
+if test "x$ac_cv_have_decl_clearerr_unlocked" = xyes
+then :
ac_have_decl=1
else
ac_have_decl=0
fi
-cat >>confdefs.h <<_ACEOF
-#define HAVE_DECL_CLEARERR_UNLOCKED $ac_have_decl
-_ACEOF
+printf "%s\n" "#define HAVE_DECL_CLEARERR_UNLOCKED $ac_have_decl" >>confdefs.h
ac_fn_c_check_decl "$LINENO" "feof_unlocked" "ac_cv_have_decl_feof_unlocked" "$ac_includes_default"
-if test "x$ac_cv_have_decl_feof_unlocked" = xyes; then :
+if test "x$ac_cv_have_decl_feof_unlocked" = xyes
+then :
ac_have_decl=1
else
ac_have_decl=0
fi
-cat >>confdefs.h <<_ACEOF
-#define HAVE_DECL_FEOF_UNLOCKED $ac_have_decl
-_ACEOF
+printf "%s\n" "#define HAVE_DECL_FEOF_UNLOCKED $ac_have_decl" >>confdefs.h
ac_fn_c_check_decl "$LINENO" "ferror_unlocked" "ac_cv_have_decl_ferror_unlocked" "$ac_includes_default"
-if test "x$ac_cv_have_decl_ferror_unlocked" = xyes; then :
+if test "x$ac_cv_have_decl_ferror_unlocked" = xyes
+then :
ac_have_decl=1
else
ac_have_decl=0
fi
-cat >>confdefs.h <<_ACEOF
-#define HAVE_DECL_FERROR_UNLOCKED $ac_have_decl
-_ACEOF
+printf "%s\n" "#define HAVE_DECL_FERROR_UNLOCKED $ac_have_decl" >>confdefs.h
ac_fn_c_check_decl "$LINENO" "fflush_unlocked" "ac_cv_have_decl_fflush_unlocked" "$ac_includes_default"
-if test "x$ac_cv_have_decl_fflush_unlocked" = xyes; then :
+if test "x$ac_cv_have_decl_fflush_unlocked" = xyes
+then :
ac_have_decl=1
else
ac_have_decl=0
fi
-cat >>confdefs.h <<_ACEOF
-#define HAVE_DECL_FFLUSH_UNLOCKED $ac_have_decl
-_ACEOF
+printf "%s\n" "#define HAVE_DECL_FFLUSH_UNLOCKED $ac_have_decl" >>confdefs.h
ac_fn_c_check_decl "$LINENO" "fgets_unlocked" "ac_cv_have_decl_fgets_unlocked" "$ac_includes_default"
-if test "x$ac_cv_have_decl_fgets_unlocked" = xyes; then :
+if test "x$ac_cv_have_decl_fgets_unlocked" = xyes
+then :
ac_have_decl=1
else
ac_have_decl=0
fi
-cat >>confdefs.h <<_ACEOF
-#define HAVE_DECL_FGETS_UNLOCKED $ac_have_decl
-_ACEOF
+printf "%s\n" "#define HAVE_DECL_FGETS_UNLOCKED $ac_have_decl" >>confdefs.h
ac_fn_c_check_decl "$LINENO" "fputc_unlocked" "ac_cv_have_decl_fputc_unlocked" "$ac_includes_default"
-if test "x$ac_cv_have_decl_fputc_unlocked" = xyes; then :
+if test "x$ac_cv_have_decl_fputc_unlocked" = xyes
+then :
ac_have_decl=1
else
ac_have_decl=0
fi
-cat >>confdefs.h <<_ACEOF
-#define HAVE_DECL_FPUTC_UNLOCKED $ac_have_decl
-_ACEOF
+printf "%s\n" "#define HAVE_DECL_FPUTC_UNLOCKED $ac_have_decl" >>confdefs.h
ac_fn_c_check_decl "$LINENO" "fputs_unlocked" "ac_cv_have_decl_fputs_unlocked" "$ac_includes_default"
-if test "x$ac_cv_have_decl_fputs_unlocked" = xyes; then :
+if test "x$ac_cv_have_decl_fputs_unlocked" = xyes
+then :
ac_have_decl=1
else
ac_have_decl=0
fi
-cat >>confdefs.h <<_ACEOF
-#define HAVE_DECL_FPUTS_UNLOCKED $ac_have_decl
-_ACEOF
+printf "%s\n" "#define HAVE_DECL_FPUTS_UNLOCKED $ac_have_decl" >>confdefs.h
ac_fn_c_check_decl "$LINENO" "fread_unlocked" "ac_cv_have_decl_fread_unlocked" "$ac_includes_default"
-if test "x$ac_cv_have_decl_fread_unlocked" = xyes; then :
+if test "x$ac_cv_have_decl_fread_unlocked" = xyes
+then :
ac_have_decl=1
else
ac_have_decl=0
fi
-cat >>confdefs.h <<_ACEOF
-#define HAVE_DECL_FREAD_UNLOCKED $ac_have_decl
-_ACEOF
+printf "%s\n" "#define HAVE_DECL_FREAD_UNLOCKED $ac_have_decl" >>confdefs.h
ac_fn_c_check_decl "$LINENO" "fwrite_unlocked" "ac_cv_have_decl_fwrite_unlocked" "$ac_includes_default"
-if test "x$ac_cv_have_decl_fwrite_unlocked" = xyes; then :
+if test "x$ac_cv_have_decl_fwrite_unlocked" = xyes
+then :
ac_have_decl=1
else
ac_have_decl=0
fi
-cat >>confdefs.h <<_ACEOF
-#define HAVE_DECL_FWRITE_UNLOCKED $ac_have_decl
-_ACEOF
+printf "%s\n" "#define HAVE_DECL_FWRITE_UNLOCKED $ac_have_decl" >>confdefs.h
ac_fn_c_check_decl "$LINENO" "getchar_unlocked" "ac_cv_have_decl_getchar_unlocked" "$ac_includes_default"
-if test "x$ac_cv_have_decl_getchar_unlocked" = xyes; then :
+if test "x$ac_cv_have_decl_getchar_unlocked" = xyes
+then :
ac_have_decl=1
else
ac_have_decl=0
fi
-cat >>confdefs.h <<_ACEOF
-#define HAVE_DECL_GETCHAR_UNLOCKED $ac_have_decl
-_ACEOF
+printf "%s\n" "#define HAVE_DECL_GETCHAR_UNLOCKED $ac_have_decl" >>confdefs.h
ac_fn_c_check_decl "$LINENO" "putc_unlocked" "ac_cv_have_decl_putc_unlocked" "$ac_includes_default"
-if test "x$ac_cv_have_decl_putc_unlocked" = xyes; then :
+if test "x$ac_cv_have_decl_putc_unlocked" = xyes
+then :
ac_have_decl=1
else
ac_have_decl=0
fi
-cat >>confdefs.h <<_ACEOF
-#define HAVE_DECL_PUTC_UNLOCKED $ac_have_decl
-_ACEOF
+printf "%s\n" "#define HAVE_DECL_PUTC_UNLOCKED $ac_have_decl" >>confdefs.h
ac_fn_c_check_decl "$LINENO" "putchar_unlocked" "ac_cv_have_decl_putchar_unlocked" "$ac_includes_default"
-if test "x$ac_cv_have_decl_putchar_unlocked" = xyes; then :
+if test "x$ac_cv_have_decl_putchar_unlocked" = xyes
+then :
ac_have_decl=1
else
ac_have_decl=0
fi
-cat >>confdefs.h <<_ACEOF
-#define HAVE_DECL_PUTCHAR_UNLOCKED $ac_have_decl
-_ACEOF
-
+printf "%s\n" "#define HAVE_DECL_PUTCHAR_UNLOCKED $ac_have_decl" >>confdefs.h
@@ -12579,64 +15761,1069 @@ _ACEOF
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wint_t" >&5
-$as_echo_n "checking for wint_t... " >&6; }
-if ${gt_cv_c_wint_t+:} false; then :
- $as_echo_n "(cached) " >&6
+
+
+ GNULIB_ISWBLANK=0;
+ GNULIB_WCTYPE=0;
+ GNULIB_ISWCTYPE=0;
+ GNULIB_WCTRANS=0;
+ GNULIB_TOWCTRANS=0;
+ HAVE_ISWBLANK=1;
+ HAVE_WCTYPE_T=1;
+ HAVE_WCTRANS_T=1;
+ REPLACE_ISWBLANK=0;
+
+
+
+
+ GNULIB_OPENDIR=0;
+ GNULIB_READDIR=0;
+ GNULIB_REWINDDIR=0;
+ GNULIB_CLOSEDIR=0;
+ GNULIB_DIRFD=0;
+ GNULIB_FDOPENDIR=0;
+ GNULIB_SCANDIR=0;
+ GNULIB_ALPHASORT=0;
+ HAVE_OPENDIR=1;
+ HAVE_READDIR=1;
+ HAVE_REWINDDIR=1;
+ HAVE_CLOSEDIR=1;
+ HAVE_DECL_DIRFD=1;
+ HAVE_DECL_FDOPENDIR=1;
+ HAVE_FDOPENDIR=1;
+ HAVE_SCANDIR=1;
+ HAVE_ALPHASORT=1;
+ REPLACE_OPENDIR=0;
+ REPLACE_CLOSEDIR=0;
+ REPLACE_DIRFD=0;
+ REPLACE_FDOPENDIR=0;
+
+
+
+
+
+
+
+
+
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if environ is properly declared" >&5
+printf %s "checking if environ is properly declared... " >&6; }
+ if test ${gt_cv_var_environ_declaration+y}
+then :
+ printf %s "(cached) " >&6
+else
+
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#if HAVE_UNISTD_H
+ #include <unistd.h>
+ #endif
+ /* mingw, BeOS, Haiku declare environ in <stdlib.h>, not in <unistd.h>. */
+ #include <stdlib.h>
+
+ extern struct { int foo; } environ;
+int
+main (void)
+{
+environ.foo = 1;
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"
+then :
+ gt_cv_var_environ_declaration=no
+else
+ gt_cv_var_environ_declaration=yes
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_var_environ_declaration" >&5
+printf "%s\n" "$gt_cv_var_environ_declaration" >&6; }
+ if test $gt_cv_var_environ_declaration = yes; then
+
+printf "%s\n" "#define HAVE_ENVIRON_DECL 1" >>confdefs.h
+
+ fi
+
+
+ if test $gt_cv_var_environ_declaration != yes; then
+ HAVE_DECL_ENVIRON=0
+ fi
+
+
+
+
+
+ { 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}
+then :
+ printf %s "(cached) " >&6
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
+#include <stdio.h>
+int
+main (void)
+{
+#if defined __SL64 && defined __SCLE /* cygwin */
+ /* Cygwin 1.5.24 and earlier fail to put stdin in 64-bit mode, making
+ fseeko/ftello needlessly fail. This bug was fixed in 1.5.25, and
+ it is easier to do a version check than building a runtime test. */
+# include <cygwin/version.h>
+# if CYGWIN_VERSION_DLL_COMBINED < CYGWIN_VERSION_DLL_MAKE_COMBINED (1005, 25)
+ choke me
+# endif
+#endif
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"
+then :
+ gl_cv_var_stdin_large_offset=yes
+else
+ gl_cv_var_stdin_large_offset=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_var_stdin_large_offset" >&5
+printf "%s\n" "$gl_cv_var_stdin_large_offset" >&6; }
-/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
- <wchar.h>.
- BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be included
- before <wchar.h>. */
-#include <stddef.h>
+ac_fn_c_check_decl "$LINENO" "fseeko" "ac_cv_have_decl_fseeko" "$ac_includes_default"
+if test "x$ac_cv_have_decl_fseeko" = xyes
+then :
+ ac_have_decl=1
+else
+ ac_have_decl=0
+fi
+
+printf "%s\n" "#define HAVE_DECL_FSEEKO $ac_have_decl" >>confdefs.h
+
+
+
+
+
+
+
+
+
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for fseeko" >&5
+printf %s "checking for fseeko... " >&6; }
+if test ${gl_cv_func_fseeko+y}
+then :
+ printf %s "(cached) " >&6
+else
+
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
#include <stdio.h>
-#include <time.h>
-#include <wchar.h>
- wint_t foo = (wchar_t)'\0';
+
int
-main ()
+main (void)
+{
+fseeko (stdin, 0, 0);
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"
+then :
+ gl_cv_func_fseeko=yes
+else
+ gl_cv_func_fseeko=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fseeko" >&5
+printf "%s\n" "$gl_cv_func_fseeko" >&6; }
+
+
+ if test $ac_cv_have_decl_fseeko = no; then
+ HAVE_DECL_FSEEKO=0
+ fi
+
+ if test $gl_cv_func_fseeko = no; then
+ HAVE_FSEEKO=0
+ else
+ if test $WINDOWS_64_BIT_OFF_T = 1; then
+ REPLACE_FSEEKO=1
+ fi
+ if test $gl_cv_var_stdin_large_offset = no; then
+ REPLACE_FSEEKO=1
+ fi
+
+
+
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether fflush works on input streams" >&5
+printf %s "checking whether fflush works on input streams... " >&6; }
+if test ${gl_cv_func_fflush_stdin+y}
+then :
+ printf %s "(cached) " >&6
+else
+ echo hello world > conftest.txt
+ if test "$cross_compiling" = yes
+then :
+ gl_cv_func_fflush_stdin=cross
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#include <stdio.h>
+#if HAVE_UNISTD_H
+# include <unistd.h>
+#else /* on Windows with MSVC */
+# include <io.h>
+#endif
+
+int
+main (void)
{
+FILE *f = fopen ("conftest.txt", "r");
+ char buffer[10];
+ int fd;
+ int c;
+ if (f == NULL)
+ return 1;
+ fd = fileno (f);
+ if (fd < 0 || fread (buffer, 1, 5, f) != 5)
+ return 2;
+ /* For deterministic results, ensure f read a bigger buffer. */
+ if (lseek (fd, 0, SEEK_CUR) == 5)
+ 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;
+ if (lseek (fd, 0, SEEK_CUR) != 5)
+ 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
+ mingw. */
+ c = fgetc (f);
+ ungetc (c, f);
+ fflush (f);
+ if (fgetc (f) != c)
+ 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;
+ return 0;
;
return 0;
}
_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
- gt_cv_c_wint_t=yes
+if ac_fn_c_try_run "$LINENO"
+then :
+ gl_cv_func_fflush_stdin=yes
else
- gt_cv_c_wint_t=no
+ gl_cv_func_fflush_stdin=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+ rm conftest.txt
+
+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)' ;;
+ 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
+
+ fi
+
+
+
+
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether ungetc works on arbitrary bytes" >&5
+printf %s "checking whether ungetc works on arbitrary bytes... " >&6; }
+if test ${gl_cv_func_ungetc_works+y}
+then :
+ printf %s "(cached) " >&6
+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" ;;
+ esac
+
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#include <stdio.h>
+
+int
+main (void)
+{
+FILE *f;
+ if (!(f = fopen ("conftest.tmp", "w+"))) return 1;
+ if (fputs ("abc", f) < 0) 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");
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"
+then :
+ gl_cv_func_ungetc_works=yes
+else
+ gl_cv_func_ungetc_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_ungetc_works" >&5
+printf "%s\n" "$gl_cv_func_ungetc_works" >&6; }
+ case "$gl_cv_func_ungetc_works" in
+ *yes) ;;
+ *)
+
+printf "%s\n" "#define FUNC_UNGETC_BROKEN 1" >>confdefs.h
+
+ ;;
+ esac
+
+ac_fn_c_check_decl "$LINENO" "ftello" "ac_cv_have_decl_ftello" "$ac_includes_default"
+if test "x$ac_cv_have_decl_ftello" = xyes
+then :
+ ac_have_decl=1
+else
+ ac_have_decl=0
+fi
+
+printf "%s\n" "#define HAVE_DECL_FTELLO $ac_have_decl" >>confdefs.h
+
+
+
+
+
+
+
+
+
+
+ if test $ac_cv_have_decl_ftello = no; then
+ HAVE_DECL_FTELLO=0
+ fi
+
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ftello" >&5
+printf %s "checking for ftello... " >&6; }
+if test ${gl_cv_func_ftello+y}
+then :
+ printf %s "(cached) " >&6
+else
+
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <stdio.h>
+int
+main (void)
+{
+ftello (stdin);
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"
+then :
+ gl_cv_func_ftello=yes
+else
+ gl_cv_func_ftello=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_ftello" >&5
+printf "%s\n" "$gl_cv_func_ftello" >&6; }
+ if test $gl_cv_func_ftello = no; then
+ HAVE_FTELLO=0
+ else
+ if test $WINDOWS_64_BIT_OFF_T = 1; then
+ REPLACE_FTELLO=1
+ fi
+ if test $gl_cv_var_stdin_large_offset = no; then
+ REPLACE_FTELLO=1
+ fi
+ if test $REPLACE_FTELLO = 0; then
+
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether ftello works" >&5
+printf %s "checking whether ftello works... " >&6; }
+if test ${gl_cv_func_ftello_works+y}
+then :
+ printf %s "(cached) " >&6
+else
+
+ case "$host_os" in
+ # Guess no on Solaris.
+ solaris*) gl_cv_func_ftello_works="guessing no" ;;
+ # Guess yes otherwise.
+ *) gl_cv_func_ftello_works="guessing yes" ;;
+ esac
+ if test "$cross_compiling" = yes
+then :
+ :
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#define TESTFILE "conftest.tmp"
+int
+main (void)
+{
+ FILE *fp;
+
+ /* Create a file with some contents. */
+ fp = fopen (TESTFILE, "w");
+ if (fp == NULL)
+ return 70;
+ if (fwrite ("foogarsh", 1, 8, fp) < 8)
+ return 71;
+ if (fclose (fp))
+ return 72;
+
+ /* The file's contents is now "foogarsh". */
+
+ /* Try writing after reading to EOF. */
+ fp = fopen (TESTFILE, "r+");
+ if (fp == NULL)
+ return 73;
+ if (fseek (fp, -1, SEEK_END))
+ return 74;
+ if (!(getc (fp) == 'h'))
+ return 1;
+ if (!(getc (fp) == EOF))
+ return 2;
+ if (!(ftell (fp) == 8))
+ return 3;
+ if (!(ftell (fp) == 8))
+ return 4;
+ if (!(putc ('!', fp) == '!'))
+ return 5;
+ if (!(ftell (fp) == 9))
+ return 6;
+ if (!(fclose (fp) == 0))
+ return 7;
+ fp = fopen (TESTFILE, "r");
+ if (fp == NULL)
+ return 75;
+ {
+ char buf[10];
+ if (!(fread (buf, 1, 10, fp) == 9))
+ return 10;
+ if (!(memcmp (buf, "foogarsh!", 9) == 0))
+ return 11;
+ }
+ if (!(fclose (fp) == 0))
+ return 12;
+
+ /* The file's contents is now "foogarsh!". */
+
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"
+then :
+ gl_cv_func_ftello_works=yes
+else
+ gl_cv_func_ftello_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_ftello_works" >&5
+printf "%s\n" "$gl_cv_func_ftello_works" >&6; }
+ case "$gl_cv_func_ftello_works" in
+ *yes) ;;
+ *)
+ REPLACE_FTELLO=1
+
+printf "%s\n" "#define FTELLO_BROKEN_AFTER_SWITCHING_FROM_READ_TO_WRITE 1" >>confdefs.h
+
+ ;;
+ esac
+ fi
+ fi
+
+
+
+ { 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}
+then :
+ printf %s "(cached) " >&6
+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";;
+ esac
+
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+# include <stdlib.h>
+# if HAVE_UNISTD_H
+# include <unistd.h>
+# else /* on Windows with MSVC */
+# include <direct.h>
+# endif
+# ifndef getcwd
+ char *getcwd ();
+# endif
+
+int
+main (void)
+{
+
+#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
+/* mingw cwd does not start with '/', but getcwd does allocate.
+ However, mingw fails to honor non-zero size. */
+#else
+ if (chdir ("/") != 0)
+ return 1;
+ else
+ {
+ char *f = getcwd (NULL, 0);
+ if (! f)
+ return 2;
+ if (f[0] != '/')
+ return 3;
+ if (f[1] != '\0')
+ return 4;
+ free (f);
+ return 0;
+ }
+#endif
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"
+then :
+ gl_cv_func_getcwd_null=yes
+else
+ gl_cv_func_getcwd_null=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_getcwd_null" >&5
+printf "%s\n" "$gl_cv_func_getcwd_null" >&6; }
+
+
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for getcwd with POSIX signature" >&5
+printf %s "checking for getcwd with POSIX signature... " >&6; }
+if test ${gl_cv_func_getcwd_posix_signature+y}
+then :
+ printf %s "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <unistd.h>
+int
+main (void)
+{
+extern
+ #ifdef __cplusplus
+ "C"
+ #endif
+ char *getcwd (char *, size_t);
+
+ ;
+ return 0;
+}
+
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"
+then :
+ gl_cv_func_getcwd_posix_signature=yes
+else
+ gl_cv_func_getcwd_posix_signature=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_c_wint_t" >&5
-$as_echo "$gt_cv_c_wint_t" >&6; }
- if test $gt_cv_c_wint_t = yes; then
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getcwd_posix_signature" >&5
+printf "%s\n" "$gl_cv_func_getcwd_posix_signature" >&6; }
+
+
+ac_fn_c_check_decl "$LINENO" "getdtablesize" "ac_cv_have_decl_getdtablesize" "$ac_includes_default"
+if test "x$ac_cv_have_decl_getdtablesize" = xyes
+then :
+ ac_have_decl=1
+else
+ ac_have_decl=0
+fi
+
+printf "%s\n" "#define HAVE_DECL_GETDTABLESIZE $ac_have_decl" >>confdefs.h
+
+
+ GNULIB_IMAXABS=0;
+ GNULIB_IMAXDIV=0;
+ GNULIB_STRTOIMAX=0;
+ GNULIB_STRTOUMAX=0;
+ HAVE_DECL_IMAXABS=1;
+ HAVE_DECL_IMAXDIV=1;
+ HAVE_DECL_STRTOIMAX=1;
+ HAVE_DECL_STRTOUMAX=1;
+ REPLACE_STRTOIMAX=0;
+ REPLACE_STRTOUMAX=0;
+ INT32_MAX_LT_INTMAX_MAX=1;
+ INT64_MAX_EQ_LONG_MAX='defined _LP64';
+ PRI_MACROS_BROKEN=0;
+ PRIPTR_PREFIX=__PRIPTR_PREFIX;
+ UINT32_MAX_LT_UINTMAX_MAX=1;
+ UINT64_MAX_EQ_ULONG_MAX='defined _LP64';
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ if test $gl_cv_have_include_next = yes; then
+ gl_cv_next_inttypes_h='<'inttypes.h'>'
+ else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <inttypes.h>" >&5
+printf %s "checking absolute name of <inttypes.h>... " >&6; }
+if test ${gl_cv_next_inttypes_h+y}
+then :
+ printf %s "(cached) " >&6
+else
+
+ if test $ac_cv_header_inttypes_h = yes; then
+
+
+
+
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <inttypes.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 'inttypes.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_inttypes_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
+ sed -n "$gl_absolute_header_sed"`
+
+ gl_header=$gl_cv_absolute_inttypes_h
+ gl_cv_next_inttypes_h='"'$gl_header'"'
+ else
+ gl_cv_next_inttypes_h='<'inttypes.h'>'
+ fi
+
+
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_inttypes_h" >&5
+printf "%s\n" "$gl_cv_next_inttypes_h" >&6; }
+ fi
+ NEXT_INTTYPES_H=$gl_cv_next_inttypes_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='<'inttypes.h'>'
+ else
+ # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
+ gl_next_as_first_directive=$gl_cv_next_inttypes_h
+ fi
+ NEXT_AS_FIRST_DIRECTIVE_INTTYPES_H=$gl_next_as_first_directive
+
+
+
+
+
+
+
+
+ for gl_func in imaxabs imaxdiv strtoimax strtoumax; 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 <inttypes.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
-$as_echo "#define HAVE_WINT_T 1" >>confdefs.h
+
+ ac_fn_c_check_header_compile "$LINENO" "inttypes.h" "ac_cv_header_inttypes_h" "$ac_includes_default"
+if test "x$ac_cv_header_inttypes_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_INTTYPES_H 1" >>confdefs.h
+
+fi
+
+ if test $ac_cv_header_inttypes_h = yes; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the inttypes.h PRIxNN macros are broken" >&5
+printf %s "checking whether the inttypes.h PRIxNN macros are broken... " >&6; }
+if test ${gt_cv_inttypes_pri_broken+y}
+then :
+ printf %s "(cached) " >&6
+else
+
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#include <inttypes.h>
+#ifdef PRId32
+char *p = PRId32;
+#endif
+
+int
+main (void)
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"
+then :
+ gt_cv_inttypes_pri_broken=no
+else
+ gt_cv_inttypes_pri_broken=yes
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_inttypes_pri_broken" >&5
+printf "%s\n" "$gt_cv_inttypes_pri_broken" >&6; }
fi
+ if test "$gt_cv_inttypes_pri_broken" = yes; then
+printf "%s\n" "#define PRI_MACROS_BROKEN 1" >>confdefs.h
+ PRI_MACROS_BROKEN=1
+ else
+ PRI_MACROS_BROKEN=0
+ fi
- GNULIB_ISWBLANK=0;
- GNULIB_WCTYPE=0;
- GNULIB_ISWCTYPE=0;
- GNULIB_WCTRANS=0;
- GNULIB_TOWCTRANS=0;
- HAVE_ISWBLANK=1;
- HAVE_WCTYPE_T=1;
- HAVE_WCTRANS_T=1;
- REPLACE_ISWBLANK=0;
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for LC_MESSAGES" >&5
+printf %s "checking for LC_MESSAGES... " >&6; }
+if test ${gt_cv_val_LC_MESSAGES+y}
+then :
+ printf %s "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <locale.h>
+int
+main (void)
+{
+return LC_MESSAGES
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"
+then :
+ gt_cv_val_LC_MESSAGES=yes
+else
+ gt_cv_val_LC_MESSAGES=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_val_LC_MESSAGES" >&5
+printf "%s\n" "$gt_cv_val_LC_MESSAGES" >&6; }
+ if test $gt_cv_val_LC_MESSAGES = yes; then
+
+printf "%s\n" "#define HAVE_LC_MESSAGES 1" >>confdefs.h
+
+ fi
+
+
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for CFPreferencesCopyAppValue" >&5
+printf %s "checking for CFPreferencesCopyAppValue... " >&6; }
+if test ${gt_cv_func_CFPreferencesCopyAppValue+y}
+then :
+ printf %s "(cached) " >&6
+else
+ gt_save_LIBS="$LIBS"
+ LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <CoreFoundation/CFPreferences.h>
+int
+main (void)
+{
+CFPreferencesCopyAppValue(NULL, NULL)
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"
+then :
+ gt_cv_func_CFPreferencesCopyAppValue=yes
+else
+ gt_cv_func_CFPreferencesCopyAppValue=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+ LIBS="$gt_save_LIBS"
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_func_CFPreferencesCopyAppValue" >&5
+printf "%s\n" "$gt_cv_func_CFPreferencesCopyAppValue" >&6; }
+ if test $gt_cv_func_CFPreferencesCopyAppValue = yes; then
+
+printf "%s\n" "#define HAVE_CFPREFERENCESCOPYAPPVALUE 1" >>confdefs.h
+
+ fi
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for CFLocaleCopyCurrent" >&5
+printf %s "checking for CFLocaleCopyCurrent... " >&6; }
+if test ${gt_cv_func_CFLocaleCopyCurrent+y}
+then :
+ printf %s "(cached) " >&6
+else
+ gt_save_LIBS="$LIBS"
+ LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <CoreFoundation/CFLocale.h>
+int
+main (void)
+{
+CFLocaleCopyCurrent();
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"
+then :
+ gt_cv_func_CFLocaleCopyCurrent=yes
+else
+ gt_cv_func_CFLocaleCopyCurrent=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+ LIBS="$gt_save_LIBS"
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_func_CFLocaleCopyCurrent" >&5
+printf "%s\n" "$gt_cv_func_CFLocaleCopyCurrent" >&6; }
+ if test $gt_cv_func_CFLocaleCopyCurrent = yes; then
+
+printf "%s\n" "#define HAVE_CFLOCALECOPYCURRENT 1" >>confdefs.h
+
+ fi
+ INTL_MACOSX_LIBS=
+ if test $gt_cv_func_CFPreferencesCopyAppValue = yes || test $gt_cv_func_CFLocaleCopyCurrent = yes; then
+ INTL_MACOSX_LIBS="-Wl,-framework -Wl,CoreFoundation"
+ fi
+
+
+
+
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for promoted mode_t type" >&5
+printf %s "checking for promoted mode_t type... " >&6; }
+if test ${gl_cv_promoted_mode_t+y}
+then :
+ printf %s "(cached) " >&6
+else
+
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <sys/types.h>
+int
+main (void)
+{
+typedef int array[2 * (sizeof (mode_t) < sizeof (int)) - 1];
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"
+then :
+ gl_cv_promoted_mode_t='int'
+else
+ gl_cv_promoted_mode_t='mode_t'
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_promoted_mode_t" >&5
+printf "%s\n" "$gl_cv_promoted_mode_t" >&6; }
+
+printf "%s\n" "#define PROMOTED_MODE_T $gl_cv_promoted_mode_t" >>confdefs.h
+
+
+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 :
+ ac_have_decl=1
+else
+ ac_have_decl=0
+fi
+
+printf "%s\n" "#define HAVE_DECL_SETENV $ac_have_decl" >>confdefs.h
+
+
+
+
+
+ if test $ac_cv_have_decl_setenv = no; then
+ HAVE_DECL_SETENV=0
+ fi
+
+
+
+
+
+ ac_fn_c_check_header_compile "$LINENO" "search.h" "ac_cv_header_search_h" "$ac_includes_default"
+if test "x$ac_cv_header_search_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_SEARCH_H 1" >>confdefs.h
+
+fi
+
+ ac_fn_c_check_func "$LINENO" "tsearch" "ac_cv_func_tsearch"
+if test "x$ac_cv_func_tsearch" = xyes
+then :
+ printf "%s\n" "#define HAVE_TSEARCH 1" >>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 :
+ ac_have_decl=1
+else
+ ac_have_decl=0
+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 :
+ ac_have_decl=1
+else
+ ac_have_decl=0
+fi
+printf "%s\n" "#define HAVE_DECL_UNSETENV $ac_have_decl" >>confdefs.h
if false; then
@@ -12662,37 +16849,27 @@ fi
gl_source_base='lib'
- # Check whether --enable-acl was given.
-if test "${enable_acl+set}" = set; then :
- enableval=$enable_acl;
-else
- enable_acl=auto
-fi
LIB_ACL=
use_acl=0
- if test "x$enable_acl" != "xno"; then
- for ac_header in sys/acl.h
-do :
- ac_fn_c_check_header_mongrel "$LINENO" "sys/acl.h" "ac_cv_header_sys_acl_h" "$ac_includes_default"
-if test "x$ac_cv_header_sys_acl_h" = xyes; then :
- cat >>confdefs.h <<_ACEOF
-#define HAVE_SYS_ACL_H 1
-_ACEOF
+ if test "$enable_acl" != no; then
+ ac_fn_c_check_header_compile "$LINENO" "sys/acl.h" "ac_cv_header_sys_acl_h" "$ac_includes_default"
+if test "x$ac_cv_header_sys_acl_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_SYS_ACL_H 1" >>confdefs.h
fi
-done
-
if test $ac_cv_header_sys_acl_h = yes; then
ac_save_LIBS=$LIBS
if test $use_acl = 0; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing acl_get_file" >&5
-$as_echo_n "checking for library containing acl_get_file... " >&6; }
-if ${ac_cv_search_acl_get_file+:} false; then :
- $as_echo_n "(cached) " >&6
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing acl_get_file" >&5
+printf %s "checking for library containing acl_get_file... " >&6; }
+if test ${ac_cv_search_acl_get_file+y}
+then :
+ printf %s "(cached) " >&6
else
ac_func_search_save_LIBS=$LIBS
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -12706,30 +16883,34 @@ extern "C"
#endif
char acl_get_file ();
int
-main ()
+main (void)
{
return acl_get_file ();
;
return 0;
}
_ACEOF
-for ac_lib in '' acl pacl; do
+for ac_lib in '' acl pacl
+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 :
+ if ac_fn_c_try_link "$LINENO"
+then :
ac_cv_search_acl_get_file=$ac_res
fi
rm -f core conftest.err conftest.$ac_objext \
conftest$ac_exeext
- if ${ac_cv_search_acl_get_file+:} false; then :
+ if test ${ac_cv_search_acl_get_file+y}
+then :
break
fi
done
-if ${ac_cv_search_acl_get_file+:} false; then :
+if test ${ac_cv_search_acl_get_file+y}
+then :
else
ac_cv_search_acl_get_file=no
@@ -12737,10 +16918,11 @@ fi
rm conftest.$ac_ext
LIBS=$ac_func_search_save_LIBS
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_acl_get_file" >&5
-$as_echo "$ac_cv_search_acl_get_file" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_acl_get_file" >&5
+printf "%s\n" "$ac_cv_search_acl_get_file" >&6; }
ac_res=$ac_cv_search_acl_get_file
-if test "$ac_res" != no; then :
+if test "$ac_res" != no
+then :
test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
if test "$ac_cv_search_acl_get_file" != "none required"; then
LIB_ACL=$ac_cv_search_acl_get_file
@@ -12752,73 +16934,68 @@ if test "$ac_res" != no; then :
acl_copy_ext_native acl_create_entry_np \
acl_to_short_text acl_free_text
do :
- as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
+ as_ac_var=`printf "%s\n" "ac_cv_func_$ac_func" | $as_tr_sh`
ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
-if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
+if eval test \"x\$"$as_ac_var"\" = x"yes"
+then :
cat >>confdefs.h <<_ACEOF
-#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
+#define `printf "%s\n" "HAVE_$ac_func" | $as_tr_cpp` 1
_ACEOF
fi
-done
+done
# If the acl_get_file bug is detected, don't enable the ACL support.
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working acl_get_file" >&5
-$as_echo_n "checking for working acl_get_file... " >&6; }
-if ${gl_cv_func_working_acl_get_file+:} false; then :
- $as_echo_n "(cached) " >&6
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working acl_get_file" >&5
+printf %s "checking for working acl_get_file... " >&6; }
+if test ${gl_cv_func_working_acl_get_file+y}
+then :
+ printf %s "(cached) " >&6
else
- if test "$cross_compiling" = yes; then :
- gl_cv_func_working_acl_get_file=cross-compiling
-else
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ gl_cv_func_working_acl_get_file=no
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <sys/types.h>
#include <sys/acl.h>
#include <errno.h>
int
-main ()
+main (void)
{
-if (!acl_get_file (".", ACL_TYPE_ACCESS) && errno == ENOENT)
- return 1;
- return 0;
+acl_t acl = acl_get_file (".", ACL_TYPE_ACCESS);
+ return acl ? acl_free (acl) != 0 : errno == ENOENT;
;
return 0;
}
_ACEOF
-if ac_fn_c_try_run "$LINENO"; then :
- gl_cv_func_working_acl_get_file=yes
-else
- gl_cv_func_working_acl_get_file=no
-fi
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
- conftest.$ac_objext conftest.beam conftest.$ac_ext
+if ac_fn_c_try_link "$LINENO"
+then :
+ if test $cross_compiling = yes; then
+ gl_cv_func_working_acl_get_file="guessing yes"
+ elif ./conftest$ac_exeext; then
+ gl_cv_func_working_acl_get_file=yes
+ fi
fi
-
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_working_acl_get_file" >&5
-$as_echo "$gl_cv_func_working_acl_get_file" >&6; }
-
- if test $gl_cv_func_working_acl_get_file = yes; then :
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_working_acl_get_file" >&5
+printf "%s\n" "$gl_cv_func_working_acl_get_file" >&6; }
+ if test "$gl_cv_func_working_acl_get_file" != no
+then :
use_acl=1
fi
if test $use_acl = 1; then
- for ac_header in acl/libacl.h
-do :
- ac_fn_c_check_header_mongrel "$LINENO" "acl/libacl.h" "ac_cv_header_acl_libacl_h" "$ac_includes_default"
-if test "x$ac_cv_header_acl_libacl_h" = xyes; then :
- cat >>confdefs.h <<_ACEOF
-#define HAVE_ACL_LIBACL_H 1
-_ACEOF
+ ac_fn_c_check_header_compile "$LINENO" "acl/libacl.h" "ac_cv_header_acl_libacl_h" "$ac_includes_default"
+if test "x$ac_cv_header_acl_libacl_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_ACL_LIBACL_H 1" >>confdefs.h
fi
-done
-
@@ -12830,23 +17007,23 @@ done
for ac_func in acl_entries
do :
ac_fn_c_check_func "$LINENO" "acl_entries" "ac_cv_func_acl_entries"
-if test "x$ac_cv_func_acl_entries" = xyes; then :
- cat >>confdefs.h <<_ACEOF
-#define HAVE_ACL_ENTRIES 1
-_ACEOF
+if test "x$ac_cv_func_acl_entries" = xyes
+then :
+ printf "%s\n" "#define HAVE_ACL_ENTRIES 1" >>confdefs.h
else
gl_LIBOBJS="$gl_LIBOBJS $ac_func.$ac_objext"
fi
-done
+done
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ACL_FIRST_ENTRY" >&5
-$as_echo_n "checking for ACL_FIRST_ENTRY... " >&6; }
-if ${gl_cv_acl_ACL_FIRST_ENTRY+:} false; then :
- $as_echo_n "(cached) " >&6
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ACL_FIRST_ENTRY" >&5
+printf %s "checking for ACL_FIRST_ENTRY... " >&6; }
+if test ${gl_cv_acl_ACL_FIRST_ENTRY+y}
+then :
+ printf %s "(cached) " >&6
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -12854,31 +17031,33 @@ else
#include <sys/acl.h>
int type = ACL_FIRST_ENTRY;
int
-main ()
+main (void)
{
;
return 0;
}
_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_c_try_compile "$LINENO"
+then :
gl_cv_acl_ACL_FIRST_ENTRY=yes
else
gl_cv_acl_ACL_FIRST_ENTRY=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_acl_ACL_FIRST_ENTRY" >&5
-$as_echo "$gl_cv_acl_ACL_FIRST_ENTRY" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_acl_ACL_FIRST_ENTRY" >&5
+printf "%s\n" "$gl_cv_acl_ACL_FIRST_ENTRY" >&6; }
if test $gl_cv_acl_ACL_FIRST_ENTRY = yes; then
-$as_echo "#define HAVE_ACL_FIRST_ENTRY 1" >>confdefs.h
+printf "%s\n" "#define HAVE_ACL_FIRST_ENTRY 1" >>confdefs.h
fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ACL_TYPE_EXTENDED" >&5
-$as_echo_n "checking for ACL_TYPE_EXTENDED... " >&6; }
-if ${gl_cv_acl_ACL_TYPE_EXTENDED+:} false; then :
- $as_echo_n "(cached) " >&6
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ACL_TYPE_EXTENDED" >&5
+printf %s "checking for ACL_TYPE_EXTENDED... " >&6; }
+if test ${gl_cv_acl_ACL_TYPE_EXTENDED+y}
+then :
+ printf %s "(cached) " >&6
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -12886,25 +17065,26 @@ else
#include <sys/acl.h>
int type = ACL_TYPE_EXTENDED;
int
-main ()
+main (void)
{
;
return 0;
}
_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_c_try_compile "$LINENO"
+then :
gl_cv_acl_ACL_TYPE_EXTENDED=yes
else
gl_cv_acl_ACL_TYPE_EXTENDED=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_acl_ACL_TYPE_EXTENDED" >&5
-$as_echo "$gl_cv_acl_ACL_TYPE_EXTENDED" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_acl_ACL_TYPE_EXTENDED" >&5
+printf "%s\n" "$gl_cv_acl_ACL_TYPE_EXTENDED" >&6; }
if test $gl_cv_acl_ACL_TYPE_EXTENDED = yes; then
-$as_echo "#define HAVE_ACL_TYPE_EXTENDED 1" >>confdefs.h
+printf "%s\n" "#define HAVE_ACL_TYPE_EXTENDED 1" >>confdefs.h
fi
else
@@ -12916,22 +17096,19 @@ fi
fi
if test $use_acl = 0; then
- for ac_func in facl
-do :
- ac_fn_c_check_func "$LINENO" "facl" "ac_cv_func_facl"
-if test "x$ac_cv_func_facl" = xyes; then :
- cat >>confdefs.h <<_ACEOF
-#define HAVE_FACL 1
-_ACEOF
+ ac_fn_c_check_func "$LINENO" "facl" "ac_cv_func_facl"
+if test "x$ac_cv_func_facl" = xyes
+then :
+ printf "%s\n" "#define HAVE_FACL 1" >>confdefs.h
fi
-done
if test $ac_cv_func_facl = yes; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing acl_trivial" >&5
-$as_echo_n "checking for library containing acl_trivial... " >&6; }
-if ${ac_cv_search_acl_trivial+:} false; then :
- $as_echo_n "(cached) " >&6
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing acl_trivial" >&5
+printf %s "checking for library containing acl_trivial... " >&6; }
+if test ${ac_cv_search_acl_trivial+y}
+then :
+ printf %s "(cached) " >&6
else
ac_func_search_save_LIBS=$LIBS
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -12945,30 +17122,34 @@ extern "C"
#endif
char acl_trivial ();
int
-main ()
+main (void)
{
return acl_trivial ();
;
return 0;
}
_ACEOF
-for ac_lib in '' sec; do
+for ac_lib in '' sec
+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 :
+ if ac_fn_c_try_link "$LINENO"
+then :
ac_cv_search_acl_trivial=$ac_res
fi
rm -f core conftest.err conftest.$ac_objext \
conftest$ac_exeext
- if ${ac_cv_search_acl_trivial+:} false; then :
+ if test ${ac_cv_search_acl_trivial+y}
+then :
break
fi
done
-if ${ac_cv_search_acl_trivial+:} false; then :
+if test ${ac_cv_search_acl_trivial+y}
+then :
else
ac_cv_search_acl_trivial=no
@@ -12976,10 +17157,11 @@ fi
rm conftest.$ac_ext
LIBS=$ac_func_search_save_LIBS
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_acl_trivial" >&5
-$as_echo "$ac_cv_search_acl_trivial" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_acl_trivial" >&5
+printf "%s\n" "$ac_cv_search_acl_trivial" >&6; }
ac_res=$ac_cv_search_acl_trivial
-if test "$ac_res" != no; then :
+if test "$ac_res" != no
+then :
test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
if test "$ac_cv_search_acl_trivial" != "none required"; then
LIB_ACL=$ac_cv_search_acl_trivial
@@ -12987,62 +17169,45 @@ if test "$ac_res" != no; then :
fi
- for ac_func in acl_trivial
-do :
- ac_fn_c_check_func "$LINENO" "acl_trivial" "ac_cv_func_acl_trivial"
-if test "x$ac_cv_func_acl_trivial" = xyes; then :
- cat >>confdefs.h <<_ACEOF
-#define HAVE_ACL_TRIVIAL 1
-_ACEOF
+ ac_fn_c_check_func "$LINENO" "acl_trivial" "ac_cv_func_acl_trivial"
+if test "x$ac_cv_func_acl_trivial" = xyes
+then :
+ printf "%s\n" "#define HAVE_ACL_TRIVIAL 1" >>confdefs.h
fi
-done
use_acl=1
fi
fi
if test $use_acl = 0; then
- for ac_func in getacl
-do :
- ac_fn_c_check_func "$LINENO" "getacl" "ac_cv_func_getacl"
-if test "x$ac_cv_func_getacl" = xyes; then :
- cat >>confdefs.h <<_ACEOF
-#define HAVE_GETACL 1
-_ACEOF
+ ac_fn_c_check_func "$LINENO" "getacl" "ac_cv_func_getacl"
+if test "x$ac_cv_func_getacl" = xyes
+then :
+ printf "%s\n" "#define HAVE_GETACL 1" >>confdefs.h
fi
-done
if test $ac_cv_func_getacl = yes; then
use_acl=1
fi
- for ac_header in aclv.h
-do :
- ac_fn_c_check_header_compile "$LINENO" "aclv.h" "ac_cv_header_aclv_h" "#include <sys/types.h>
+ ac_fn_c_check_header_compile "$LINENO" "aclv.h" "ac_cv_header_aclv_h" "#include <sys/types.h>
"
-if test "x$ac_cv_header_aclv_h" = xyes; then :
- cat >>confdefs.h <<_ACEOF
-#define HAVE_ACLV_H 1
-_ACEOF
+if test "x$ac_cv_header_aclv_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_ACLV_H 1" >>confdefs.h
fi
-done
-
fi
if test $use_acl = 0; then
- for ac_func in aclx_get
-do :
- ac_fn_c_check_func "$LINENO" "aclx_get" "ac_cv_func_aclx_get"
-if test "x$ac_cv_func_aclx_get" = xyes; then :
- cat >>confdefs.h <<_ACEOF
-#define HAVE_ACLX_GET 1
-_ACEOF
+ ac_fn_c_check_func "$LINENO" "aclx_get" "ac_cv_func_aclx_get"
+if test "x$ac_cv_func_aclx_get" = xyes
+then :
+ printf "%s\n" "#define HAVE_ACLX_GET 1" >>confdefs.h
fi
-done
if test $ac_cv_func_aclx_get = yes; then
use_acl=1
@@ -13050,16 +17215,12 @@ done
fi
if test $use_acl = 0 || test "$ac_cv_func_aclx_get" = yes; then
- for ac_func in statacl
-do :
- ac_fn_c_check_func "$LINENO" "statacl" "ac_cv_func_statacl"
-if test "x$ac_cv_func_statacl" = xyes; then :
- cat >>confdefs.h <<_ACEOF
-#define HAVE_STATACL 1
-_ACEOF
+ ac_fn_c_check_func "$LINENO" "statacl" "ac_cv_func_statacl"
+if test "x$ac_cv_func_statacl" = xyes
+then :
+ printf "%s\n" "#define HAVE_STATACL 1" >>confdefs.h
fi
-done
if test $ac_cv_func_statacl = yes; then
use_acl=1
@@ -13067,16 +17228,12 @@ done
fi
if test $use_acl = 0; then
- for ac_func in aclsort
-do :
- ac_fn_c_check_func "$LINENO" "aclsort" "ac_cv_func_aclsort"
-if test "x$ac_cv_func_aclsort" = xyes; then :
- cat >>confdefs.h <<_ACEOF
-#define HAVE_ACLSORT 1
-_ACEOF
+ ac_fn_c_check_func "$LINENO" "aclsort" "ac_cv_func_aclsort"
+if test "x$ac_cv_func_aclsort" = xyes
+then :
+ printf "%s\n" "#define HAVE_ACLSORT 1" >>confdefs.h
fi
-done
if test $ac_cv_func_aclsort = yes; then
use_acl=1
@@ -13085,20 +17242,20 @@ done
LIBS=$ac_save_LIBS
fi
- if test "x$enable_acl$use_acl" = "xyes0"; then
+
+ if test "$enable_acl$use_acl" = yes0; then
as_fn_error $? "ACLs enabled but support not detected" "$LINENO" 5
- elif test "x$enable_acl$use_acl" = "xauto0"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libacl development library was not found or not usable." >&5
-$as_echo "$as_me: WARNING: libacl development library was not found or not usable." >&2;}
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: GNU sed will be built without ACL support." >&5
-$as_echo "$as_me: WARNING: GNU sed will be built without ACL support." >&2;}
+ elif test "$enable_acl$use_acl" = auto0; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: libacl development library was not found or not usable." >&5
+printf "%s\n" "$as_me: WARNING: libacl development library was not found or not usable." >&2;}
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: GNU sed will be built without ACL support." >&5
+printf "%s\n" "$as_me: WARNING: GNU sed will be built without ACL support." >&2;}
fi
fi
+ test $gl_need_lib_has_acl && LIB_HAS_ACL=$LIB_ACL
-cat >>confdefs.h <<_ACEOF
-#define USE_ACL $use_acl
-_ACEOF
+printf "%s\n" "#define USE_ACL $use_acl" >>confdefs.h
USE_ACL=$use_acl
@@ -13111,10 +17268,11 @@ _ACEOF
# Define an additional variable used in the Makefile substitution.
if test $ac_cv_working_alloca_h = yes; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for alloca as a compiler built-in" >&5
-$as_echo_n "checking for alloca as a compiler built-in... " >&6; }
-if ${gl_cv_rpl_alloca+:} false; then :
- $as_echo_n "(cached) " >&6
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for alloca as a compiler built-in" >&5
+printf %s "checking for alloca as a compiler built-in... " >&6; }
+if test ${gl_cv_rpl_alloca+y}
+then :
+ printf %s "(cached) " >&6
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -13126,20 +17284,21 @@ else
_ACEOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- $EGREP "Need own alloca" >/dev/null 2>&1; then :
+ $EGREP "Need own alloca" >/dev/null 2>&1
+then :
gl_cv_rpl_alloca=yes
else
gl_cv_rpl_alloca=no
fi
-rm -f conftest*
+rm -rf conftest*
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_rpl_alloca" >&5
-$as_echo "$gl_cv_rpl_alloca" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_rpl_alloca" >&5
+printf "%s\n" "$gl_cv_rpl_alloca" >&6; }
if test $gl_cv_rpl_alloca = yes; then
-$as_echo "#define HAVE_ALLOCA 1" >>confdefs.h
+printf "%s\n" "#define HAVE_ALLOCA 1" >>confdefs.h
ALLOCA_H=alloca.h
else
@@ -13159,6 +17318,30 @@ fi
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to enable assertions" >&5
+printf %s "checking whether to enable assertions... " >&6; }
+ # Check whether --enable-assert was given.
+if test ${enable_assert+y}
+then :
+ enableval=$enable_assert; if test "x$enableval" = xno
+then :
+
+printf "%s\n" "#define NDEBUG 1" >>confdefs.h
+
+elif test "x$enableval" != xyes
+then :
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: invalid argument supplied to --enable-assert" >&5
+printf "%s\n" "$as_me: WARNING: invalid argument supplied to --enable-assert" >&2;}
+ enable_assert=yes
+fi
+else
+ enable_assert=yes
+fi
+
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $enable_assert" >&5
+printf "%s\n" "$enable_assert" >&6; }
+
+
@@ -13171,13 +17354,15 @@ fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether btowc(0) is correct" >&5
-$as_echo_n "checking whether btowc(0) is correct... " >&6; }
-if ${gl_cv_func_btowc_nul+:} false; then :
- $as_echo_n "(cached) " >&6
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether btowc(0) is correct" >&5
+printf %s "checking whether btowc(0) is correct... " >&6; }
+if test ${gl_cv_func_btowc_nul+y}
+then :
+ printf %s "(cached) " >&6
else
- if test "$cross_compiling" = yes; then :
+ if test "$cross_compiling" = yes
+then :
case "$host_os" in
# Guess no on Cygwin.
@@ -13206,7 +17391,8 @@ int main ()
return 0;
}
_ACEOF
-if ac_fn_c_try_run "$LINENO"; then :
+if ac_fn_c_try_run "$LINENO"
+then :
gl_cv_func_btowc_nul=yes
else
gl_cv_func_btowc_nul=no
@@ -13217,13 +17403,14 @@ fi
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_btowc_nul" >&5
-$as_echo "$gl_cv_func_btowc_nul" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_btowc_nul" >&5
+printf "%s\n" "$gl_cv_func_btowc_nul" >&6; }
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether btowc(EOF) is correct" >&5
-$as_echo_n "checking whether btowc(EOF) is correct... " >&6; }
-if ${gl_cv_func_btowc_eof+:} false; then :
- $as_echo_n "(cached) " >&6
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether btowc(EOF) is correct" >&5
+printf %s "checking whether btowc(EOF) is correct... " >&6; }
+if test ${gl_cv_func_btowc_eof+y}
+then :
+ printf %s "(cached) " >&6
else
case "$host_os" in
@@ -13233,7 +17420,8 @@ else
*) gl_cv_func_btowc_eof="guessing yes" ;;
esac
if test $LOCALE_FR != none; then
- if test "$cross_compiling" = yes; then :
+ if test "$cross_compiling" = yes
+then :
:
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -13259,7 +17447,8 @@ int main ()
return 0;
}
_ACEOF
-if ac_fn_c_try_run "$LINENO"; then :
+if ac_fn_c_try_run "$LINENO"
+then :
gl_cv_func_btowc_eof=yes
else
gl_cv_func_btowc_eof=no
@@ -13271,8 +17460,8 @@ fi
fi
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_btowc_eof" >&5
-$as_echo "$gl_cv_func_btowc_eof" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_btowc_eof" >&5
+printf "%s\n" "$gl_cv_func_btowc_eof" >&6; }
case "$gl_cv_func_btowc_nul" in
*yes) ;;
@@ -13310,8 +17499,63 @@ $as_echo "$gl_cv_func_btowc_eof" >&6; }
-$as_echo "#define GNULIB_TEST_BTOWC 1" >>confdefs.h
+printf "%s\n" "#define GNULIB_TEST_BTOWC 1" >>confdefs.h
+
+
+
+
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for __builtin_expect" >&5
+printf %s "checking for __builtin_expect... " >&6; }
+if test ${gl_cv___builtin_expect+y}
+then :
+ printf %s "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+ int
+ main (int argc, char **argv)
+ {
+ argc = __builtin_expect (argc, 100);
+ return argv[argc != 100][0];
+ }
+_ACEOF
+if ac_fn_c_try_link "$LINENO"
+then :
+ gl_cv___builtin_expect=yes
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+ #include <builtins.h>
+ int
+ main (int argc, char **argv)
+ {
+ argc = __builtin_expect (argc, 100);
+ return argv[argc != 100][0];
+ }
+_ACEOF
+if ac_fn_c_try_link "$LINENO"
+then :
+ gl_cv___builtin_expect="in <builtins.h>"
+else
+ gl_cv___builtin_expect=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_exeext conftest.$ac_ext
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv___builtin_expect" >&5
+printf "%s\n" "$gl_cv___builtin_expect" >&6; }
+ if test "$gl_cv___builtin_expect" = yes; then
+ printf "%s\n" "#define HAVE___BUILTIN_EXPECT 1" >>confdefs.h
+
+ elif test "$gl_cv___builtin_expect" = "in <builtins.h>"; then
+ printf "%s\n" "#define HAVE___BUILTIN_EXPECT 2" >>confdefs.h
+ fi
@@ -13352,9 +17596,7 @@ $as_echo "#define GNULIB_TEST_BTOWC 1" >>confdefs.h
fi
-cat >>confdefs.h <<_ACEOF
-#define GNULIB_CANONICALIZE_LGPL 1
-_ACEOF
+printf "%s\n" "#define GNULIB_CANONICALIZE_LGPL 1" >>confdefs.h
@@ -13368,7 +17610,7 @@ _ACEOF
-$as_echo "#define GNULIB_TEST_CANONICALIZE_FILE_NAME 1" >>confdefs.h
+printf "%s\n" "#define GNULIB_TEST_CANONICALIZE_FILE_NAME 1" >>confdefs.h
@@ -13383,7 +17625,7 @@ $as_echo "#define GNULIB_TEST_CANONICALIZE_FILE_NAME 1" >>confdefs.h
-$as_echo "#define GNULIB_TEST_REALPATH 1" >>confdefs.h
+printf "%s\n" "#define GNULIB_TEST_REALPATH 1" >>confdefs.h
@@ -13398,10 +17640,21 @@ $as_echo "#define GNULIB_TEST_REALPATH 1" >>confdefs.h
-$as_echo "#define GNULIB_TEST_CHDIR 1" >>confdefs.h
+printf "%s\n" "#define GNULIB_TEST_CHDIR 1" >>confdefs.h
+
+ :
+
+
+
+printf "%s\n" "#define GNULIB_CLOSE_STREAM 1" >>confdefs.h
+
+
+
+ :
+
if test "x$datarootdir" = x; then
datarootdir='${datadir}'
@@ -13435,6 +17688,10 @@ $as_echo "#define GNULIB_TEST_CHDIR 1" >>confdefs.h
localedir='${datarootdir}/locale'
fi
+ if test "x$runstatedir" = x; then
+ runstatedir='${localstatedir}/run'
+
+ fi
pkglibexecdir='${libexecdir}/${PACKAGE}'
@@ -13445,10 +17702,131 @@ $as_echo "#define GNULIB_TEST_CHDIR 1" >>confdefs.h
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether // is distinct from /" >&5
-$as_echo_n "checking whether // is distinct from /... " >&6; }
-if ${gl_cv_double_slash_root+:} false; then :
- $as_echo_n "(cached) " >&6
+
+
+
+
+
+ if test $gl_cv_have_include_next = yes; then
+ gl_cv_next_ctype_h='<'ctype.h'>'
+ else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <ctype.h>" >&5
+printf %s "checking absolute name of <ctype.h>... " >&6; }
+if test ${gl_cv_next_ctype_h+y}
+then :
+ printf %s "(cached) " >&6
+else
+
+
+
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <ctype.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 'ctype.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_ctype_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
+ sed -n "$gl_absolute_header_sed"`
+
+ gl_header=$gl_cv_absolute_ctype_h
+ gl_cv_next_ctype_h='"'$gl_header'"'
+
+
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_ctype_h" >&5
+printf "%s\n" "$gl_cv_next_ctype_h" >&6; }
+ fi
+ NEXT_CTYPE_H=$gl_cv_next_ctype_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='<'ctype.h'>'
+ else
+ # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
+ gl_next_as_first_directive=$gl_cv_next_ctype_h
+ fi
+ NEXT_AS_FIRST_DIRECTIVE_CTYPE_H=$gl_next_as_first_directive
+
+
+
+
+
+
+ for gl_func in isblank; 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 <ctype.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
+
+
+
+
+
+
+
+
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether // is distinct from /" >&5
+printf %s "checking whether // is distinct from /... " >&6; }
+if test ${gl_cv_double_slash_root+y}
+then :
+ printf %s "(cached) " >&6
else
if test x"$cross_compiling" = xyes ; then
# When cross-compiling, there is no way to tell whether // is special
@@ -13474,33 +17852,35 @@ else
fi
fi
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_double_slash_root" >&5
-$as_echo "$gl_cv_double_slash_root" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_double_slash_root" >&5
+printf "%s\n" "$gl_cv_double_slash_root" >&6; }
if test "$gl_cv_double_slash_root" = yes; then
-$as_echo "#define DOUBLE_SLASH_IS_DISTINCT_ROOT 1" >>confdefs.h
+printf "%s\n" "#define DOUBLE_SLASH_IS_DISTINCT_ROOT 1" >>confdefs.h
fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for error_at_line" >&5
-$as_echo_n "checking for error_at_line... " >&6; }
-if ${ac_cv_lib_error_at_line+:} false; then :
- $as_echo_n "(cached) " >&6
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for error_at_line" >&5
+printf %s "checking for error_at_line... " >&6; }
+if test ${ac_cv_lib_error_at_line+y}
+then :
+ printf %s "(cached) " >&6
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <error.h>
int
-main ()
+main (void)
{
error_at_line (0, 0, "", 0, "an error occurred");
;
return 0;
}
_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
+if ac_fn_c_try_link "$LINENO"
+then :
ac_cv_lib_error_at_line=yes
else
ac_cv_lib_error_at_line=no
@@ -13508,8 +17888,8 @@ fi
rm -f core conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_error_at_line" >&5
-$as_echo "$ac_cv_lib_error_at_line" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_error_at_line" >&5
+printf "%s\n" "$ac_cv_lib_error_at_line" >&6; }
if test $ac_cv_lib_error_at_line = no; then
@@ -13550,47 +17930,52 @@ $as_echo "$ac_cv_lib_error_at_line" >&6; }
if test $gl_cv_have_include_next = yes; then
gl_cv_next_fcntl_h='<'fcntl.h'>'
else
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <fcntl.h>" >&5
-$as_echo_n "checking absolute name of <fcntl.h>... " >&6; }
-if ${gl_cv_next_fcntl_h+:} false; then :
- $as_echo_n "(cached) " >&6
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <fcntl.h>" >&5
+printf %s "checking absolute name of <fcntl.h>... " >&6; }
+if test ${gl_cv_next_fcntl_h+y}
+then :
+ printf %s "(cached) " >&6
else
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+
+
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <fcntl.h>
-
_ACEOF
- case "$host_os" in
- aix*) gl_absname_cpp="$ac_cpp -C" ;;
- *) gl_absname_cpp="$ac_cpp" ;;
- esac
+ 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'
+ case "$host_os" in
+ mingw*)
+ gl_dirsep_regex='[/\\]'
+ ;;
+ *)
+ gl_dirsep_regex='\/'
+ ;;
+ esac
+ gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
+ gl_header_literal_regex=`echo 'fcntl.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_fcntl_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
+ sed -n "$gl_absolute_header_sed"`
- gl_header_literal_regex=`echo 'fcntl.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_next_fcntl_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
- sed -n "$gl_absolute_header_sed"`'"'
+ gl_header=$gl_cv_absolute_fcntl_h
+ gl_cv_next_fcntl_h='"'$gl_header'"'
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_fcntl_h" >&5
-$as_echo "$gl_cv_next_fcntl_h" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_fcntl_h" >&5
+printf "%s\n" "$gl_cv_next_fcntl_h" >&6; }
fi
NEXT_FCNTL_H=$gl_cv_next_fcntl_h
@@ -13613,18 +17998,19 @@ $as_echo "$gl_cv_next_fcntl_h" >&6; }
for gl_func in fcntl openat; do
- as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
-$as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
-if eval \${$as_gl_Symbol+:} false; then :
- $as_echo_n "(cached) " >&6
+ 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 <fcntl.h>
int
-main ()
+main (void)
{
#undef $gl_func
(void) $gl_func;
@@ -13632,7 +18018,8 @@ main ()
return 0;
}
_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_c_try_compile "$LINENO"
+then :
eval "$as_gl_Symbol=yes"
else
eval "$as_gl_Symbol=no"
@@ -13640,11 +18027,12 @@ fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
eval ac_res=\$$as_gl_Symbol
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
-$as_echo "$ac_res" >&6; }
- if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
+ { 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 `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
+#define `printf "%s\n" "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
_ACEOF
eval ac_cv_have_decl_$gl_func=yes
@@ -13654,6 +18042,70 @@ fi
+ fp_headers='
+ #include <stdio.h>
+ #if HAVE_STDIO_EXT_H
+ # include <stdio_ext.h>
+ #endif
+ '
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for __fpending" >&5
+printf %s "checking for __fpending... " >&6; }
+if test ${gl_cv_func___fpending+y}
+then :
+ printf %s "(cached) " >&6
+else
+
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+$fp_headers
+int
+main (void)
+{
+return ! __fpending (stdin);
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"
+then :
+ gl_cv_func___fpending=yes
+else
+ gl_cv_func___fpending=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func___fpending" >&5
+printf "%s\n" "$gl_cv_func___fpending" >&6; }
+ if test $gl_cv_func___fpending = yes; then
+ ac_fn_c_check_decl "$LINENO" "__fpending" "ac_cv_have_decl___fpending" "$fp_headers
+"
+if test "x$ac_cv_have_decl___fpending" = xyes
+then :
+ ac_have_decl=1
+else
+ ac_have_decl=0
+fi
+
+printf "%s\n" "#define HAVE_DECL___FPENDING $ac_have_decl" >>confdefs.h
+
+ fi
+
+ if test $gl_cv_func___fpending = no; then
+
+
+
+
+
+
+
+
+ gl_LIBOBJS="$gl_LIBOBJS fpending.$ac_objext"
+
+ fi
+
+
if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then
@@ -13691,7 +18143,7 @@ fi
-$as_echo "#define GNULIB_TEST_FSTAT 1" >>confdefs.h
+printf "%s\n" "#define GNULIB_TEST_FSTAT 1" >>confdefs.h
@@ -13720,13 +18172,15 @@ $as_echo "#define GNULIB_TEST_FSTAT 1" >>confdefs.h
if test $ac_cv_func_getdelim = yes; then
HAVE_GETDELIM=1
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working getdelim function" >&5
-$as_echo_n "checking for working getdelim function... " >&6; }
-if ${gl_cv_func_working_getdelim+:} false; then :
- $as_echo_n "(cached) " >&6
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working getdelim function" >&5
+printf %s "checking for working getdelim function... " >&6; }
+if test ${gl_cv_func_working_getdelim+y}
+then :
+ printf %s "(cached) " >&6
else
echo fooNbarN | tr -d '\012' | tr N '\012' > conftest.data
- if test "$cross_compiling" = yes; then :
+ if test "$cross_compiling" = yes
+then :
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -13739,12 +18193,13 @@ else
_ACEOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- $EGREP "Lucky GNU user" >/dev/null 2>&1; then :
+ $EGREP "Lucky GNU user" >/dev/null 2>&1
+then :
gl_cv_func_working_getdelim="guessing yes"
else
gl_cv_func_working_getdelim="guessing no"
fi
-rm -f conftest*
+rm -rf conftest*
else
@@ -13775,12 +18230,15 @@ else
size_t siz = (size_t)(~0) / 4;
if (getdelim (&line, &siz, '\n', in) == -1)
return 3;
+ free (line);
}
+ fclose (in);
return 0;
}
_ACEOF
-if ac_fn_c_try_run "$LINENO"; then :
+if ac_fn_c_try_run "$LINENO"
+then :
gl_cv_func_working_getdelim=yes
else
gl_cv_func_working_getdelim=no
@@ -13790,8 +18248,8 @@ rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
fi
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_working_getdelim" >&5
-$as_echo "$gl_cv_func_working_getdelim" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_working_getdelim" >&5
+printf "%s\n" "$gl_cv_func_working_getdelim" >&6; }
case "$gl_cv_func_working_getdelim" in
*no)
REPLACE_GETDELIM=1
@@ -13817,28 +18275,28 @@ $as_echo "$gl_cv_func_working_getdelim" >&6; }
gl_LIBOBJS="$gl_LIBOBJS getdelim.$ac_objext"
- for ac_func in flockfile funlockfile
-do :
- as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
-ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
-if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
- cat >>confdefs.h <<_ACEOF
-#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
-_ACEOF
+ ac_fn_c_check_func "$LINENO" "flockfile" "ac_cv_func_flockfile"
+if test "x$ac_cv_func_flockfile" = xyes
+then :
+ printf "%s\n" "#define HAVE_FLOCKFILE 1" >>confdefs.h
+
+fi
+ac_fn_c_check_func "$LINENO" "funlockfile" "ac_cv_func_funlockfile"
+if test "x$ac_cv_func_funlockfile" = xyes
+then :
+ printf "%s\n" "#define HAVE_FUNLOCKFILE 1" >>confdefs.h
fi
-done
ac_fn_c_check_decl "$LINENO" "getc_unlocked" "ac_cv_have_decl_getc_unlocked" "$ac_includes_default"
-if test "x$ac_cv_have_decl_getc_unlocked" = xyes; then :
+if test "x$ac_cv_have_decl_getc_unlocked" = xyes
+then :
ac_have_decl=1
else
ac_have_decl=0
fi
-cat >>confdefs.h <<_ACEOF
-#define HAVE_DECL_GETC_UNLOCKED $ac_have_decl
-_ACEOF
+printf "%s\n" "#define HAVE_DECL_GETC_UNLOCKED $ac_have_decl" >>confdefs.h
fi
@@ -13853,7 +18311,7 @@ _ACEOF
-$as_echo "#define GNULIB_TEST_GETDELIM 1" >>confdefs.h
+printf "%s\n" "#define GNULIB_TEST_GETDELIM 1" >>confdefs.h
@@ -13891,11 +18349,6 @@ $as_echo "#define GNULIB_TEST_GETDELIM 1" >>confdefs.h
-$as_echo "#define GNULIB_TEST_GETOPT_GNU 1" >>confdefs.h
-
-
-
-
@@ -13908,7 +18361,7 @@ $as_echo "#define GNULIB_TEST_GETOPT_GNU 1" >>confdefs.h
GETOPT_H=getopt.h
-$as_echo "#define __GETOPT_PREFIX rpl_" >>confdefs.h
+printf "%s\n" "#define __GETOPT_PREFIX rpl_" >>confdefs.h
@@ -13944,6 +18397,99 @@ $as_echo "#define __GETOPT_PREFIX rpl_" >>confdefs.h
+ ac_found=0
+ ac_fn_c_check_decl "$LINENO" "program_invocation_name" "ac_cv_have_decl_program_invocation_name" "#include <errno.h>
+"
+if test "x$ac_cv_have_decl_program_invocation_name" = xyes
+then :
+ ac_have_decl=1
+else
+ ac_have_decl=0
+fi
+
+printf "%s\n" "#define HAVE_DECL_PROGRAM_INVOCATION_NAME $ac_have_decl" >>confdefs.h
+if test $ac_have_decl = 1
+then :
+ ac_found=1
+fi
+
+ ac_fn_c_check_decl "$LINENO" "program_invocation_short_name" "ac_cv_have_decl_program_invocation_short_name" "#include <errno.h>
+"
+if test "x$ac_cv_have_decl_program_invocation_short_name" = xyes
+then :
+ ac_have_decl=1
+else
+ ac_have_decl=0
+fi
+
+printf "%s\n" "#define HAVE_DECL_PROGRAM_INVOCATION_SHORT_NAME $ac_have_decl" >>confdefs.h
+if test $ac_have_decl = 1
+then :
+ ac_found=1
+fi
+
+ ac_fn_c_check_decl "$LINENO" "__argv" "ac_cv_have_decl___argv" "#include <stdlib.h>
+"
+if test "x$ac_cv_have_decl___argv" = xyes
+then :
+ ac_have_decl=1
+else
+ ac_have_decl=0
+fi
+
+printf "%s\n" "#define HAVE_DECL___ARGV $ac_have_decl" >>confdefs.h
+if test $ac_have_decl = 1
+then :
+ ac_found=1
+fi
+
+
+ # Incur the cost of this test only if none of the above worked.
+ if test $ac_found = 0; then
+ # On OpenBSD 5.1, using the global __progname variable appears to be
+ # the only way to implement getprogname.
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether __progname is defined in default libraries" >&5
+printf %s "checking whether __progname is defined in default libraries... " >&6; }
+if test ${gl_cv_var___progname+y}
+then :
+ printf %s "(cached) " >&6
+else
+
+ gl_cv_var___progname=
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+extern char *__progname;
+int
+main (void)
+{
+return *__progname;
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"
+then :
+ gl_cv_var___progname=yes
+
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+
+
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_var___progname" >&5
+printf "%s\n" "$gl_cv_var___progname" >&6; }
+ if test "$gl_cv_var___progname" = yes; then
+
+printf "%s\n" "#define HAVE_VAR___PROGNAME 1" >>confdefs.h
+
+ fi
+ fi
+
+
+
+
@@ -13956,12 +18502,14 @@ $as_echo "#define __GETOPT_PREFIX rpl_" >>confdefs.h
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gettimeofday clobbers localtime buffer" >&5
-$as_echo_n "checking whether gettimeofday clobbers localtime buffer... " >&6; }
-if ${gl_cv_func_gettimeofday_clobber+:} false; then :
- $as_echo_n "(cached) " >&6
+ { 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}
+then :
+ printf %s "(cached) " >&6
else
- if test "$cross_compiling" = yes; then :
+ if test "$cross_compiling" = yes
+then :
# When cross-compiling:
case "$host_os" in
# Guess all is fine on glibc systems.
@@ -13979,7 +18527,7 @@ else
#include <stdlib.h>
int
-main ()
+main (void)
{
time_t t = 0;
@@ -13995,7 +18543,8 @@ main ()
return 0;
}
_ACEOF
-if ac_fn_c_try_run "$LINENO"; then :
+if ac_fn_c_try_run "$LINENO"
+then :
gl_cv_func_gettimeofday_clobber=no
else
gl_cv_func_gettimeofday_clobber=yes
@@ -14005,30 +18554,27 @@ rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
fi
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_gettimeofday_clobber" >&5
-$as_echo "$gl_cv_func_gettimeofday_clobber" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_gettimeofday_clobber" >&5
+printf "%s\n" "$gl_cv_func_gettimeofday_clobber" >&6; }
case "$gl_cv_func_gettimeofday_clobber" in
*yes)
REPLACE_GETTIMEOFDAY=1
-
-$as_echo "#define gmtime rpl_gmtime" >>confdefs.h
+ REPLACE_GMTIME=1
+ REPLACE_LOCALTIME=1
-$as_echo "#define localtime rpl_localtime" >>confdefs.h
-
-
-
-$as_echo "#define GETTIMEOFDAY_CLOBBERS_LOCALTIME 1" >>confdefs.h
+printf "%s\n" "#define GETTIMEOFDAY_CLOBBERS_LOCALTIME 1" >>confdefs.h
;;
esac
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gettimeofday with POSIX signature" >&5
-$as_echo_n "checking for gettimeofday with POSIX signature... " >&6; }
-if ${gl_cv_func_gettimeofday_posix_signature+:} false; then :
- $as_echo_n "(cached) " >&6
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for gettimeofday with POSIX signature" >&5
+printf %s "checking for gettimeofday with POSIX signature... " >&6; }
+if test ${gl_cv_func_gettimeofday_posix_signature+y}
+then :
+ printf %s "(cached) " >&6
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -14037,7 +18583,7 @@ else
int gettimeofday (struct timeval *restrict, void *restrict);
int
-main ()
+main (void)
{
/* glibc uses struct timezone * rather than the POSIX void *
if _GNU_SOURCE is defined. However, since the only portable
@@ -14053,7 +18599,8 @@ main ()
return 0;
}
_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_c_try_compile "$LINENO"
+then :
gl_cv_func_gettimeofday_posix_signature=yes
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -14062,14 +18609,15 @@ else
int gettimeofday (struct timeval *restrict, struct timezone *restrict);
int
-main ()
+main (void)
{
;
return 0;
}
_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_c_try_compile "$LINENO"
+then :
gl_cv_func_gettimeofday_posix_signature=almost
else
gl_cv_func_gettimeofday_posix_signature=no
@@ -14078,8 +18626,8 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_gettimeofday_posix_signature" >&5
-$as_echo "$gl_cv_func_gettimeofday_posix_signature" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_gettimeofday_posix_signature" >&5
+printf "%s\n" "$gl_cv_func_gettimeofday_posix_signature" >&6; }
if test $gl_cv_func_gettimeofday_posix_signature = almost; then
gl_gettimeofday_timezone='struct timezone'
elif test $gl_cv_func_gettimeofday_posix_signature != yes; then
@@ -14091,9 +18639,7 @@ $as_echo "$gl_cv_func_gettimeofday_posix_signature" >&6; }
fi
-cat >>confdefs.h <<_ACEOF
-#define GETTIMEOFDAY_TIMEZONE $gl_gettimeofday_timezone
-_ACEOF
+printf "%s\n" "#define GETTIMEOFDAY_TIMEZONE $gl_gettimeofday_timezone" >>confdefs.h
if test $HAVE_GETTIMEOFDAY = 0 || test $REPLACE_GETTIMEOFDAY = 1; then
@@ -14108,28 +18654,19 @@ _ACEOF
gl_LIBOBJS="$gl_LIBOBJS gettimeofday.$ac_objext"
- for ac_header in sys/timeb.h
-do :
- ac_fn_c_check_header_mongrel "$LINENO" "sys/timeb.h" "ac_cv_header_sys_timeb_h" "$ac_includes_default"
-if test "x$ac_cv_header_sys_timeb_h" = xyes; then :
- cat >>confdefs.h <<_ACEOF
-#define HAVE_SYS_TIMEB_H 1
-_ACEOF
+ 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
-done
-
- for ac_func in _ftime
-do :
ac_fn_c_check_func "$LINENO" "_ftime" "ac_cv_func__ftime"
-if test "x$ac_cv_func__ftime" = xyes; then :
- cat >>confdefs.h <<_ACEOF
-#define HAVE__FTIME 1
-_ACEOF
+if test "x$ac_cv_func__ftime" = xyes
+then :
+ printf "%s\n" "#define HAVE__FTIME 1" >>confdefs.h
fi
-done
fi
@@ -14144,7 +18681,49 @@ done
-$as_echo "#define GNULIB_TEST_GETTIMEOFDAY 1" >>confdefs.h
+printf "%s\n" "#define GNULIB_TEST_GETTIMEOFDAY 1" >>confdefs.h
+
+
+
+ # Autoconf 2.61a.99 and earlier don't support linking a file only
+ # in VPATH builds. But since GNUmakefile is for maintainer use
+ # only, it does not matter if we skip the link with older autoconf.
+ # Automake 1.10.1 and earlier try to remove GNUmakefile in non-VPATH
+ # builds, so use a shell variable to bypass this.
+ GNUmakefile=GNUmakefile
+ ac_config_links="$ac_config_links $GNUmakefile:$GNUmakefile"
+
+
+ :
+
+
+
+
+
+
+ if test $ac_cv_func_isblank = no; then
+ HAVE_ISBLANK=0
+ fi
+
+ if test $HAVE_ISBLANK = 0; then
+
+
+
+
+
+
+
+
+ gl_LIBOBJS="$gl_LIBOBJS isblank.$ac_objext"
+
+ fi
+
+
+
+
+
+ GNULIB_ISBLANK=1
+
@@ -14165,53 +18744,58 @@ $as_echo "#define GNULIB_TEST_GETTIMEOFDAY 1" >>confdefs.h
if test $gl_cv_have_include_next = yes; then
gl_cv_next_langinfo_h='<'langinfo.h'>'
else
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <langinfo.h>" >&5
-$as_echo_n "checking absolute name of <langinfo.h>... " >&6; }
-if ${gl_cv_next_langinfo_h+:} false; then :
- $as_echo_n "(cached) " >&6
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <langinfo.h>" >&5
+printf %s "checking absolute name of <langinfo.h>... " >&6; }
+if test ${gl_cv_next_langinfo_h+y}
+then :
+ printf %s "(cached) " >&6
else
if test $ac_cv_header_langinfo_h = yes; then
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+
+
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <langinfo.h>
-
_ACEOF
- case "$host_os" in
- aix*) gl_absname_cpp="$ac_cpp -C" ;;
- *) gl_absname_cpp="$ac_cpp" ;;
- esac
+ 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 'langinfo.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_next_langinfo_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
- sed -n "$gl_absolute_header_sed"`'"'
+ case "$host_os" in
+ mingw*)
+ gl_dirsep_regex='[/\\]'
+ ;;
+ *)
+ gl_dirsep_regex='\/'
+ ;;
+ esac
+ gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
+ gl_header_literal_regex=`echo 'langinfo.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_langinfo_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
+ sed -n "$gl_absolute_header_sed"`
+
+ gl_header=$gl_cv_absolute_langinfo_h
+ gl_cv_next_langinfo_h='"'$gl_header'"'
else
gl_cv_next_langinfo_h='<'langinfo.h'>'
fi
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_langinfo_h" >&5
-$as_echo "$gl_cv_next_langinfo_h" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_langinfo_h" >&5
+printf "%s\n" "$gl_cv_next_langinfo_h" >&6; }
fi
NEXT_LANGINFO_H=$gl_cv_next_langinfo_h
@@ -14235,10 +18819,11 @@ $as_echo "$gl_cv_next_langinfo_h" >&6; }
if test $ac_cv_header_langinfo_h = yes; then
HAVE_LANGINFO_H=1
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether langinfo.h defines CODESET" >&5
-$as_echo_n "checking whether langinfo.h defines CODESET... " >&6; }
-if ${gl_cv_header_langinfo_codeset+:} false; then :
- $as_echo_n "(cached) " >&6
+ { 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 :
+ printf %s "(cached) " >&6
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -14246,14 +18831,15 @@ else
int a = CODESET;
int
-main ()
+main (void)
{
;
return 0;
}
_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_c_try_compile "$LINENO"
+then :
gl_cv_header_langinfo_codeset=yes
else
gl_cv_header_langinfo_codeset=no
@@ -14261,15 +18847,16 @@ fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_langinfo_codeset" >&5
-$as_echo "$gl_cv_header_langinfo_codeset" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_langinfo_codeset" >&5
+printf "%s\n" "$gl_cv_header_langinfo_codeset" >&6; }
if test $gl_cv_header_langinfo_codeset = yes; then
HAVE_LANGINFO_CODESET=1
fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether langinfo.h defines T_FMT_AMPM" >&5
-$as_echo_n "checking whether langinfo.h defines T_FMT_AMPM... " >&6; }
-if ${gl_cv_header_langinfo_t_fmt_ampm+:} false; then :
- $as_echo_n "(cached) " >&6
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether langinfo.h defines T_FMT_AMPM" >&5
+printf %s "checking whether langinfo.h defines T_FMT_AMPM... " >&6; }
+if test ${gl_cv_header_langinfo_t_fmt_ampm+y}
+then :
+ printf %s "(cached) " >&6
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -14277,14 +18864,15 @@ else
int a = T_FMT_AMPM;
int
-main ()
+main (void)
{
;
return 0;
}
_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_c_try_compile "$LINENO"
+then :
gl_cv_header_langinfo_t_fmt_ampm=yes
else
gl_cv_header_langinfo_t_fmt_ampm=no
@@ -14292,15 +18880,16 @@ fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_langinfo_t_fmt_ampm" >&5
-$as_echo "$gl_cv_header_langinfo_t_fmt_ampm" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_langinfo_t_fmt_ampm" >&5
+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
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether langinfo.h defines ERA" >&5
-$as_echo_n "checking whether langinfo.h defines ERA... " >&6; }
-if ${gl_cv_header_langinfo_era+:} false; then :
- $as_echo_n "(cached) " >&6
+ { 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}
+then :
+ printf %s "(cached) " >&6
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -14308,14 +18897,15 @@ else
int a = ERA;
int
-main ()
+main (void)
{
;
return 0;
}
_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_c_try_compile "$LINENO"
+then :
gl_cv_header_langinfo_era=yes
else
gl_cv_header_langinfo_era=no
@@ -14323,15 +18913,16 @@ fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_langinfo_era" >&5
-$as_echo "$gl_cv_header_langinfo_era" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_langinfo_era" >&5
+printf "%s\n" "$gl_cv_header_langinfo_era" >&6; }
if test $gl_cv_header_langinfo_era = yes; then
HAVE_LANGINFO_ERA=1
fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether langinfo.h defines YESEXPR" >&5
-$as_echo_n "checking whether langinfo.h defines YESEXPR... " >&6; }
-if ${gl_cv_header_langinfo_yesexpr+:} false; then :
- $as_echo_n "(cached) " >&6
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether langinfo.h defines YESEXPR" >&5
+printf %s "checking whether langinfo.h defines YESEXPR... " >&6; }
+if test ${gl_cv_header_langinfo_yesexpr+y}
+then :
+ printf %s "(cached) " >&6
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -14339,14 +18930,15 @@ else
int a = YESEXPR;
int
-main ()
+main (void)
{
;
return 0;
}
_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_c_try_compile "$LINENO"
+then :
gl_cv_header_langinfo_yesexpr=yes
else
gl_cv_header_langinfo_yesexpr=no
@@ -14354,8 +18946,8 @@ fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_langinfo_yesexpr" >&5
-$as_echo "$gl_cv_header_langinfo_yesexpr" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_langinfo_yesexpr" >&5
+printf "%s\n" "$gl_cv_header_langinfo_yesexpr" >&6; }
if test $gl_cv_header_langinfo_yesexpr = yes; then
HAVE_LANGINFO_YESEXPR=1
fi
@@ -14370,18 +18962,19 @@ $as_echo "$gl_cv_header_langinfo_yesexpr" >&6; }
for gl_func in nl_langinfo; do
- as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
-$as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
-if eval \${$as_gl_Symbol+:} false; then :
- $as_echo_n "(cached) " >&6
+ 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 <langinfo.h>
int
-main ()
+main (void)
{
#undef $gl_func
(void) $gl_func;
@@ -14389,7 +18982,8 @@ main ()
return 0;
}
_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_c_try_compile "$LINENO"
+then :
eval "$as_gl_Symbol=yes"
else
eval "$as_gl_Symbol=no"
@@ -14397,11 +18991,12 @@ fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
eval ac_res=\$$as_gl_Symbol
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
-$as_echo "$ac_res" >&6; }
- if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
+ { 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 `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
+#define `printf "%s\n" "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
_ACEOF
eval ac_cv_have_decl_$gl_func=yes
@@ -14418,6 +19013,7 @@ fi
+
LOCALCHARSET_TESTS_ENVIRONMENT="CHARSETALIASDIR=\"\$(abs_top_builddir)/$gl_source_base\""
@@ -14431,15 +19027,16 @@ fi
case "$host_os" in
solaris*)
-$as_echo "#define _LCONV_C99 1" >>confdefs.h
+printf "%s\n" "#define _LCONV_C99 1" >>confdefs.h
;;
esac
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether locale.h conforms to POSIX:2001" >&5
-$as_echo_n "checking whether locale.h conforms to POSIX:2001... " >&6; }
-if ${gl_cv_header_locale_h_posix2001+:} false; then :
- $as_echo_n "(cached) " >&6
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether locale.h conforms to POSIX:2001" >&5
+printf %s "checking whether locale.h conforms to POSIX:2001... " >&6; }
+if test ${gl_cv_header_locale_h_posix2001+y}
+then :
+ printf %s "(cached) " >&6
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -14447,44 +19044,47 @@ else
int x = LC_MESSAGES;
int y = sizeof (((struct lconv *) 0)->decimal_point);
int
-main ()
+main (void)
{
;
return 0;
}
_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_c_try_compile "$LINENO"
+then :
gl_cv_header_locale_h_posix2001=yes
else
gl_cv_header_locale_h_posix2001=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_locale_h_posix2001" >&5
-$as_echo "$gl_cv_header_locale_h_posix2001" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_locale_h_posix2001" >&5
+printf "%s\n" "$gl_cv_header_locale_h_posix2001" >&6; }
if test $ac_cv_header_xlocale_h = yes; then
HAVE_XLOCALE_H=1
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether locale.h defines locale_t" >&5
-$as_echo_n "checking whether locale.h defines locale_t... " >&6; }
-if ${gl_cv_header_locale_has_locale_t+:} false; then :
- $as_echo_n "(cached) " >&6
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether locale.h defines locale_t" >&5
+printf %s "checking whether locale.h defines locale_t... " >&6; }
+if test ${gl_cv_header_locale_has_locale_t+y}
+then :
+ printf %s "(cached) " >&6
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <locale.h>
locale_t x;
int
-main ()
+main (void)
{
;
return 0;
}
_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_c_try_compile "$LINENO"
+then :
gl_cv_header_locale_has_locale_t=yes
else
gl_cv_header_locale_has_locale_t=no
@@ -14492,8 +19092,8 @@ fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_locale_has_locale_t" >&5
-$as_echo "$gl_cv_header_locale_has_locale_t" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_locale_has_locale_t" >&5
+printf "%s\n" "$gl_cv_header_locale_has_locale_t" >&6; }
if test $gl_cv_header_locale_has_locale_t = yes; then
gl_cv_header_locale_h_needs_xlocale_h=no
else
@@ -14505,10 +19105,11 @@ $as_echo "$gl_cv_header_locale_has_locale_t" >&6; }
fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct lconv is properly defined" >&5
-$as_echo_n "checking whether struct lconv is properly defined... " >&6; }
-if ${gl_cv_sys_struct_lconv_ok+:} false; then :
- $as_echo_n "(cached) " >&6
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether struct lconv is properly defined" >&5
+printf %s "checking whether struct lconv is properly defined... " >&6; }
+if test ${gl_cv_sys_struct_lconv_ok+y}
+then :
+ printf %s "(cached) " >&6
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -14517,14 +19118,15 @@ else
int x = sizeof (l.decimal_point);
int y = sizeof (l.int_p_cs_precedes);
int
-main ()
+main (void)
{
;
return 0;
}
_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_c_try_compile "$LINENO"
+then :
gl_cv_sys_struct_lconv_ok=yes
else
gl_cv_sys_struct_lconv_ok=no
@@ -14532,8 +19134,8 @@ fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_lconv_ok" >&5
-$as_echo "$gl_cv_sys_struct_lconv_ok" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_lconv_ok" >&5
+printf "%s\n" "$gl_cv_sys_struct_lconv_ok" >&6; }
if test $gl_cv_sys_struct_lconv_ok = no; then
REPLACE_STRUCT_LCONV=1
fi
@@ -14549,47 +19151,52 @@ $as_echo "$gl_cv_sys_struct_lconv_ok" >&6; }
if test $gl_cv_have_include_next = yes; then
gl_cv_next_locale_h='<'locale.h'>'
else
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <locale.h>" >&5
-$as_echo_n "checking absolute name of <locale.h>... " >&6; }
-if ${gl_cv_next_locale_h+:} false; then :
- $as_echo_n "(cached) " >&6
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <locale.h>" >&5
+printf %s "checking absolute name of <locale.h>... " >&6; }
+if test ${gl_cv_next_locale_h+y}
+then :
+ printf %s "(cached) " >&6
else
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+
+
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <locale.h>
-
_ACEOF
- case "$host_os" in
- aix*) gl_absname_cpp="$ac_cpp -C" ;;
- *) gl_absname_cpp="$ac_cpp" ;;
- esac
+ 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'
+ case "$host_os" in
+ mingw*)
+ gl_dirsep_regex='[/\\]'
+ ;;
+ *)
+ gl_dirsep_regex='\/'
+ ;;
+ esac
+ gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
+ gl_header_literal_regex=`echo 'locale.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_locale_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
+ sed -n "$gl_absolute_header_sed"`
- gl_header_literal_regex=`echo 'locale.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_next_locale_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
- sed -n "$gl_absolute_header_sed"`'"'
+ gl_header=$gl_cv_absolute_locale_h
+ gl_cv_next_locale_h='"'$gl_header'"'
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_locale_h" >&5
-$as_echo "$gl_cv_next_locale_h" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_locale_h" >&5
+printf "%s\n" "$gl_cv_next_locale_h" >&6; }
fi
NEXT_LOCALE_H=$gl_cv_next_locale_h
@@ -14608,11 +19215,12 @@ $as_echo "$gl_cv_next_locale_h" >&6; }
for gl_func in setlocale duplocale; do
- as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
-$as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
-if eval \${$as_gl_Symbol+:} false; then :
- $as_echo_n "(cached) " >&6
+ 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. */
@@ -14623,7 +19231,7 @@ else
#endif
int
-main ()
+main (void)
{
#undef $gl_func
(void) $gl_func;
@@ -14631,7 +19239,8 @@ main ()
return 0;
}
_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_c_try_compile "$LINENO"
+then :
eval "$as_gl_Symbol=yes"
else
eval "$as_gl_Symbol=no"
@@ -14639,11 +19248,12 @@ fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
eval ac_res=\$$as_gl_Symbol
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
-$as_echo "$ac_res" >&6; }
- if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
+ { 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 `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
+#define `printf "%s\n" "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
_ACEOF
eval ac_cv_have_decl_$gl_func=yes
@@ -14673,11 +19283,10 @@ fi
ac_fn_c_check_member "$LINENO" "struct lconv" "decimal_point" "ac_cv_member_struct_lconv_decimal_point" "#include <locale.h>
"
-if test "x$ac_cv_member_struct_lconv_decimal_point" = xyes; then :
+if test "x$ac_cv_member_struct_lconv_decimal_point" = xyes
+then :
-cat >>confdefs.h <<_ACEOF
-#define HAVE_STRUCT_LCONV_DECIMAL_POINT 1
-_ACEOF
+printf "%s\n" "#define HAVE_STRUCT_LCONV_DECIMAL_POINT 1" >>confdefs.h
fi
@@ -14695,142 +19304,104 @@ fi
-$as_echo "#define GNULIB_TEST_LOCALECONV 1" >>confdefs.h
-
+printf "%s\n" "#define GNULIB_TEST_LOCALECONV 1" >>confdefs.h
- if test $ac_cv_func_lstat = yes; then
-
- case "$gl_cv_func_lstat_dereferences_slashed_symlink" in
- *no)
- REPLACE_LSTAT=1
- ;;
- esac
- else
- HAVE_LSTAT=0
- fi
-
- if test $REPLACE_LSTAT = 1; then
-
+ 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.
+ ac_fn_c_check_type "$LINENO" "pthread_rwlock_t" "ac_cv_type_pthread_rwlock_t" "#include <pthread.h>
+"
+if test "x$ac_cv_type_pthread_rwlock_t" = xyes
+then :
+printf "%s\n" "#define HAVE_PTHREAD_RWLOCK 1" >>confdefs.h
+fi
+ # glibc defines PTHREAD_MUTEX_RECURSIVE as enum, not as a macro.
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+ #include <pthread.h>
+int
+main (void)
+{
+#if __FreeBSD__ == 4
+error "No, in FreeBSD 4.0 recursive mutexes actually don't work."
+#elif (defined __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ \
+ && __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ < 1070)
+error "No, in Mac OS X < 10.7 recursive mutexes actually don't work."
+#else
+int x = (int)PTHREAD_MUTEX_RECURSIVE;
+return !x;
+#endif
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"
+then :
- gl_LIBOBJS="$gl_LIBOBJS lstat.$ac_objext"
+printf "%s\n" "#define HAVE_PTHREAD_MUTEX_RECURSIVE 1" >>confdefs.h
- :
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
+ :
-
-
- GNULIB_LSTAT=1
-
-
-
-
-
-$as_echo "#define GNULIB_TEST_LSTAT 1" >>confdefs.h
-
-
+printf "%s\n" "#define GNULIB_LOCK 1" >>confdefs.h
- for ac_header in stdlib.h
-do :
- ac_fn_c_check_header_mongrel "$LINENO" "stdlib.h" "ac_cv_header_stdlib_h" "$ac_includes_default"
-if test "x$ac_cv_header_stdlib_h" = xyes; then :
- cat >>confdefs.h <<_ACEOF
-#define HAVE_STDLIB_H 1
-_ACEOF
-fi
+ if test $ac_cv_func_lstat = yes; then
-done
+ case "$gl_cv_func_lstat_dereferences_slashed_symlink" in
+ *no)
+ REPLACE_LSTAT=1
+ ;;
+ esac
+ else
+ HAVE_LSTAT=0
+ fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU libc compatible malloc" >&5
-$as_echo_n "checking for GNU libc compatible malloc... " >&6; }
-if ${ac_cv_func_malloc_0_nonnull+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- if test "$cross_compiling" = yes; then :
- case "$host_os" in
- # Guess yes on platforms where we know the result.
- *-gnu* | freebsd* | netbsd* | openbsd* \
- | hpux* | solaris* | cygwin* | mingw*)
- ac_cv_func_malloc_0_nonnull=yes ;;
- # If we don't know, assume the worst.
- *) ac_cv_func_malloc_0_nonnull=no ;;
- esac
+ if test $REPLACE_LSTAT = 1; then
-else
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-#if defined STDC_HEADERS || defined HAVE_STDLIB_H
- # include <stdlib.h>
- #else
- char *malloc ();
- #endif
-int
-main ()
-{
-return ! malloc (0);
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_run "$LINENO"; then :
- ac_cv_func_malloc_0_nonnull=yes
-else
- ac_cv_func_malloc_0_nonnull=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
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_malloc_0_nonnull" >&5
-$as_echo "$ac_cv_func_malloc_0_nonnull" >&6; }
- if test $ac_cv_func_malloc_0_nonnull = yes; then :
-$as_echo "#define HAVE_MALLOC_GNU 1" >>confdefs.h
-else
- $as_echo "#define HAVE_MALLOC_GNU 0" >>confdefs.h
- REPLACE_MALLOC=1
+ gl_LIBOBJS="$gl_LIBOBJS lstat.$ac_objext"
-fi
+ :
+ fi
- if test $REPLACE_MALLOC = 1; then
+ GNULIB_LSTAT=1
- gl_LIBOBJS="$gl_LIBOBJS malloc.$ac_objext"
+printf "%s\n" "#define GNULIB_TEST_LSTAT 1" >>confdefs.h
- fi
-cat >>confdefs.h <<_ACEOF
-#define GNULIB_MALLOC_GNU 1
-_ACEOF
@@ -14838,7 +19409,7 @@ _ACEOF
if test $gl_cv_func_malloc_posix = yes; then
-$as_echo "#define HAVE_MALLOC_POSIX 1" >>confdefs.h
+printf "%s\n" "#define HAVE_MALLOC_POSIX 1" >>confdefs.h
else
REPLACE_MALLOC=1
@@ -14867,7 +19438,7 @@ $as_echo "#define HAVE_MALLOC_POSIX 1" >>confdefs.h
-$as_echo "#define GNULIB_TEST_MALLOC_POSIX 1" >>confdefs.h
+printf "%s\n" "#define GNULIB_TEST_MALLOC_POSIX 1" >>confdefs.h
@@ -14894,15 +19465,14 @@ $as_echo "#define GNULIB_TEST_MALLOC_POSIX 1" >>confdefs.h
#include <wchar.h>
"
-if test "x$ac_cv_have_decl_mbrlen" = xyes; then :
+if test "x$ac_cv_have_decl_mbrlen" = xyes
+then :
ac_have_decl=1
else
ac_have_decl=0
fi
-cat >>confdefs.h <<_ACEOF
-#define HAVE_DECL_MBRLEN $ac_have_decl
-_ACEOF
+printf "%s\n" "#define HAVE_DECL_MBRLEN $ac_have_decl" >>confdefs.h
if test $ac_cv_have_decl_mbrlen = yes; then
REPLACE_MBRLEN=1
@@ -14939,7 +19509,7 @@ _ACEOF
-$as_echo "#define GNULIB_TEST_MBRLEN 1" >>confdefs.h
+printf "%s\n" "#define GNULIB_TEST_MBRLEN 1" >>confdefs.h
@@ -14957,10 +19527,11 @@ $as_echo "#define GNULIB_TEST_MBRLEN 1" >>confdefs.h
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc handles incomplete characters" >&5
-$as_echo_n "checking whether mbrtowc handles incomplete characters... " >&6; }
-if ${gl_cv_func_mbrtowc_incomplete_state+:} false; then :
- $as_echo_n "(cached) " >&6
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc handles incomplete characters" >&5
+printf %s "checking whether mbrtowc handles incomplete characters... " >&6; }
+if test ${gl_cv_func_mbrtowc_incomplete_state+y}
+then :
+ printf %s "(cached) " >&6
else
case "$host_os" in
@@ -14970,7 +19541,8 @@ else
*) gl_cv_func_mbrtowc_incomplete_state="guessing yes" ;;
esac
if test $LOCALE_JA != none; then
- if test "$cross_compiling" = yes; then :
+ if test "$cross_compiling" = yes
+then :
:
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -14997,12 +19569,13 @@ int main ()
memset (&state, '\0', sizeof (mbstate_t));
if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
if (mbsinit (&state))
- return 1;
+ return 2;
}
return 0;
}
_ACEOF
-if ac_fn_c_try_run "$LINENO"; then :
+if ac_fn_c_try_run "$LINENO"
+then :
gl_cv_func_mbrtowc_incomplete_state=yes
else
gl_cv_func_mbrtowc_incomplete_state=no
@@ -15014,16 +19587,17 @@ fi
fi
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_incomplete_state" >&5
-$as_echo "$gl_cv_func_mbrtowc_incomplete_state" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_incomplete_state" >&5
+printf "%s\n" "$gl_cv_func_mbrtowc_incomplete_state" >&6; }
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc works as well as mbtowc" >&5
-$as_echo_n "checking whether mbrtowc works as well as mbtowc... " >&6; }
-if ${gl_cv_func_mbrtowc_sanitycheck+:} false; then :
- $as_echo_n "(cached) " >&6
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc works as well as mbtowc" >&5
+printf %s "checking whether mbrtowc works as well as mbtowc... " >&6; }
+if test ${gl_cv_func_mbrtowc_sanitycheck+y}
+then :
+ printf %s "(cached) " >&6
else
case "$host_os" in
@@ -15033,7 +19607,8 @@ else
*) gl_cv_func_mbrtowc_sanitycheck="guessing yes" ;;
esac
if test $LOCALE_ZH_CN != none; then
- if test "$cross_compiling" = yes; then :
+ if test "$cross_compiling" = yes
+then :
:
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -15064,12 +19639,13 @@ int main ()
memset (&state, '\0', sizeof (mbstate_t));
if (mbrtowc (&wc, input + 3, 6, &state) != 4
&& mbtowc (&wc, input + 3, 6) == 4)
- return 1;
+ return 2;
}
return 0;
}
_ACEOF
-if ac_fn_c_try_run "$LINENO"; then :
+if ac_fn_c_try_run "$LINENO"
+then :
gl_cv_func_mbrtowc_sanitycheck=yes
else
gl_cv_func_mbrtowc_sanitycheck=no
@@ -15081,8 +19657,8 @@ fi
fi
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_sanitycheck" >&5
-$as_echo "$gl_cv_func_mbrtowc_sanitycheck" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_sanitycheck" >&5
+printf "%s\n" "$gl_cv_func_mbrtowc_sanitycheck" >&6; }
REPLACE_MBSTATE_T=0
case "$gl_cv_func_mbrtowc_incomplete_state" in
@@ -15112,15 +19688,14 @@ $as_echo "$gl_cv_func_mbrtowc_sanitycheck" >&6; }
#include <wchar.h>
"
-if test "x$ac_cv_have_decl_mbrtowc" = xyes; then :
+if test "x$ac_cv_have_decl_mbrtowc" = xyes
+then :
ac_have_decl=1
else
ac_have_decl=0
fi
-cat >>confdefs.h <<_ACEOF
-#define HAVE_DECL_MBRTOWC $ac_have_decl
-_ACEOF
+printf "%s\n" "#define HAVE_DECL_MBRTOWC $ac_have_decl" >>confdefs.h
if test $ac_cv_have_decl_mbrtowc = yes; then
REPLACE_MBRTOWC=1
@@ -15132,10 +19707,11 @@ _ACEOF
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc handles a NULL pwc argument" >&5
-$as_echo_n "checking whether mbrtowc handles a NULL pwc argument... " >&6; }
-if ${gl_cv_func_mbrtowc_null_arg1+:} false; then :
- $as_echo_n "(cached) " >&6
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc handles a NULL pwc argument" >&5
+printf %s "checking whether mbrtowc handles a NULL pwc argument... " >&6; }
+if test ${gl_cv_func_mbrtowc_null_arg1+y}
+then :
+ printf %s "(cached) " >&6
else
case "$host_os" in
@@ -15145,7 +19721,8 @@ else
*) gl_cv_func_mbrtowc_null_arg1="guessing yes" ;;
esac
if test $LOCALE_FR_UTF8 != none; then
- if test "$cross_compiling" = yes; then :
+ if test "$cross_compiling" = yes
+then :
:
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -15191,7 +19768,8 @@ int main ()
return result;
}
_ACEOF
-if ac_fn_c_try_run "$LINENO"; then :
+if ac_fn_c_try_run "$LINENO"
+then :
gl_cv_func_mbrtowc_null_arg1=yes
else
gl_cv_func_mbrtowc_null_arg1=no
@@ -15203,16 +19781,17 @@ fi
fi
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_null_arg1" >&5
-$as_echo "$gl_cv_func_mbrtowc_null_arg1" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_null_arg1" >&5
+printf "%s\n" "$gl_cv_func_mbrtowc_null_arg1" >&6; }
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc handles a NULL string argument" >&5
-$as_echo_n "checking whether mbrtowc handles a NULL string argument... " >&6; }
-if ${gl_cv_func_mbrtowc_null_arg2+:} false; then :
- $as_echo_n "(cached) " >&6
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc handles a NULL string argument" >&5
+printf %s "checking whether mbrtowc handles a NULL string argument... " >&6; }
+if test ${gl_cv_func_mbrtowc_null_arg2+y}
+then :
+ printf %s "(cached) " >&6
else
case "$host_os" in
@@ -15222,7 +19801,8 @@ else
*) gl_cv_func_mbrtowc_null_arg2="guessing yes" ;;
esac
if test $LOCALE_FR_UTF8 != none; then
- if test "$cross_compiling" = yes; then :
+ if test "$cross_compiling" = yes
+then :
:
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -15251,12 +19831,13 @@ int main ()
mbrtowc (&wc, NULL, 5, &state);
/* Check that wc was not modified. */
if (wc != (wchar_t) 0xBADFACE)
- return 1;
+ return 2;
}
return 0;
}
_ACEOF
-if ac_fn_c_try_run "$LINENO"; then :
+if ac_fn_c_try_run "$LINENO"
+then :
gl_cv_func_mbrtowc_null_arg2=yes
else
gl_cv_func_mbrtowc_null_arg2=no
@@ -15268,18 +19849,19 @@ fi
fi
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_null_arg2" >&5
-$as_echo "$gl_cv_func_mbrtowc_null_arg2" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_null_arg2" >&5
+printf "%s\n" "$gl_cv_func_mbrtowc_null_arg2" >&6; }
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc has a correct return value" >&5
-$as_echo_n "checking whether mbrtowc has a correct return value... " >&6; }
-if ${gl_cv_func_mbrtowc_retval+:} false; then :
- $as_echo_n "(cached) " >&6
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc has a correct return value" >&5
+printf %s "checking whether mbrtowc has a correct return value... " >&6; }
+if test ${gl_cv_func_mbrtowc_retval+y}
+then :
+ printf %s "(cached) " >&6
else
case "$host_os" in
@@ -15290,7 +19872,8 @@ else
esac
if test $LOCALE_FR_UTF8 != none || test $LOCALE_JA != none \
|| { case "$host_os" in mingw*) true;; *) false;; esac; }; then
- if test "$cross_compiling" = yes; then :
+ if test "$cross_compiling" = yes
+then :
:
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -15391,7 +19974,8 @@ int main ()
return (found_some_locale ? result : 77);
}
_ACEOF
-if ac_fn_c_try_run "$LINENO"; then :
+if ac_fn_c_try_run "$LINENO"
+then :
gl_cv_func_mbrtowc_retval=yes
else
if test $? != 77; then
@@ -15406,16 +19990,17 @@ fi
fi
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_retval" >&5
-$as_echo "$gl_cv_func_mbrtowc_retval" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_retval" >&5
+printf "%s\n" "$gl_cv_func_mbrtowc_retval" >&6; }
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc returns 0 when parsing a NUL character" >&5
-$as_echo_n "checking whether mbrtowc returns 0 when parsing a NUL character... " >&6; }
-if ${gl_cv_func_mbrtowc_nul_retval+:} false; then :
- $as_echo_n "(cached) " >&6
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc returns 0 when parsing a NUL character" >&5
+printf %s "checking whether mbrtowc returns 0 when parsing a NUL character... " >&6; }
+if test ${gl_cv_func_mbrtowc_nul_retval+y}
+then :
+ printf %s "(cached) " >&6
else
case "$host_os" in
@@ -15425,7 +20010,8 @@ else
*) gl_cv_func_mbrtowc_nul_retval="guessing yes" ;;
esac
if test $LOCALE_ZH_CN != none; then
- if test "$cross_compiling" = yes; then :
+ if test "$cross_compiling" = yes
+then :
:
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -15451,12 +20037,13 @@ int main ()
memset (&state, '\0', sizeof (mbstate_t));
if (mbrtowc (&wc, "", 1, &state) != 0)
- return 1;
+ return 2;
}
return 0;
}
_ACEOF
-if ac_fn_c_try_run "$LINENO"; then :
+if ac_fn_c_try_run "$LINENO"
+then :
gl_cv_func_mbrtowc_nul_retval=yes
else
gl_cv_func_mbrtowc_nul_retval=no
@@ -15468,13 +20055,116 @@ fi
fi
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_nul_retval" >&5
-$as_echo "$gl_cv_func_mbrtowc_nul_retval" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_nul_retval" >&5
+printf "%s\n" "$gl_cv_func_mbrtowc_nul_retval" >&6; }
+
+
+
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc works on empty input" >&5
+printf %s "checking whether mbrtowc works on empty input... " >&6; }
+if test ${gl_cv_func_mbrtowc_empty_input+y}
+then :
+ printf %s "(cached) " >&6
+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" ;;
+ esac
+ if test "$cross_compiling" = yes
+then :
+ :
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+ #include <wchar.h>
+ static wchar_t wc;
+ static mbstate_t mbs;
+ int
+ main (void)
+ {
+ return mbrtowc (&wc, "", 0, &mbs) != (size_t) -2;
+ }
+_ACEOF
+if ac_fn_c_try_run "$LINENO"
+then :
+ gl_cv_func_mbrtowc_empty_input=yes
+else
+ gl_cv_func_mbrtowc_empty_input=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_mbrtowc_empty_input" >&5
+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 "checking whether the C locale is free of encoding errors... " >&6; }
+if test ${gl_cv_C_locale_sans_EILSEQ+y}
+then :
+ printf %s "(cached) " >&6
+else
+
+ gl_cv_C_locale_sans_EILSEQ="guessing no"
+
+ if test "$cross_compiling" = yes
+then :
+ :
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <limits.h>
+ #include <locale.h>
+ #include <wchar.h>
+
+int
+main (void)
+{
+
+ int i;
+ char *locale = setlocale (LC_ALL, "C");
+ if (! locale)
+ return 2;
+ for (i = CHAR_MIN; i <= CHAR_MAX; i++)
+ {
+ char c = i;
+ wchar_t wc;
+ mbstate_t mbs = { 0, };
+ size_t ss = mbrtowc (&wc, &c, 1, &mbs);
+ if (1 < ss)
+ return 3;
+ }
+ return 0;
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"
+then :
+ gl_cv_C_locale_sans_EILSEQ=yes
+else
+ gl_cv_C_locale_sans_EILSEQ=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_C_locale_sans_EILSEQ" >&5
+printf "%s\n" "$gl_cv_C_locale_sans_EILSEQ" >&6; }
case "$gl_cv_func_mbrtowc_null_arg1" in
*yes) ;;
*)
-$as_echo "#define MBRTOWC_NULL_ARG1_BUG 1" >>confdefs.h
+printf "%s\n" "#define MBRTOWC_NULL_ARG1_BUG 1" >>confdefs.h
REPLACE_MBRTOWC=1
;;
@@ -15482,7 +20172,7 @@ $as_echo "#define MBRTOWC_NULL_ARG1_BUG 1" >>confdefs.h
case "$gl_cv_func_mbrtowc_null_arg2" in
*yes) ;;
*)
-$as_echo "#define MBRTOWC_NULL_ARG2_BUG 1" >>confdefs.h
+printf "%s\n" "#define MBRTOWC_NULL_ARG2_BUG 1" >>confdefs.h
REPLACE_MBRTOWC=1
;;
@@ -15490,7 +20180,7 @@ $as_echo "#define MBRTOWC_NULL_ARG2_BUG 1" >>confdefs.h
case "$gl_cv_func_mbrtowc_retval" in
*yes) ;;
*)
-$as_echo "#define MBRTOWC_RETVAL_BUG 1" >>confdefs.h
+printf "%s\n" "#define MBRTOWC_RETVAL_BUG 1" >>confdefs.h
REPLACE_MBRTOWC=1
;;
@@ -15498,7 +20188,23 @@ $as_echo "#define MBRTOWC_RETVAL_BUG 1" >>confdefs.h
case "$gl_cv_func_mbrtowc_nul_retval" in
*yes) ;;
*)
-$as_echo "#define MBRTOWC_NUL_RETVAL_BUG 1" >>confdefs.h
+printf "%s\n" "#define MBRTOWC_NUL_RETVAL_BUG 1" >>confdefs.h
+
+ REPLACE_MBRTOWC=1
+ ;;
+ esac
+ case "$gl_cv_func_mbrtowc_empty_input" in
+ *yes) ;;
+ *)
+printf "%s\n" "#define MBRTOWC_EMPTY_INPUT_BUG 1" >>confdefs.h
+
+ REPLACE_MBRTOWC=1
+ ;;
+ esac
+ case $gl_cv_C_locale_sans_EILSEQ in
+ *yes) ;;
+ *)
+printf "%s\n" "#define C_LOCALE_MAYBE_EILSEQ 1" >>confdefs.h
REPLACE_MBRTOWC=1
;;
@@ -15532,7 +20238,7 @@ $as_echo "#define MBRTOWC_NUL_RETVAL_BUG 1" >>confdefs.h
-$as_echo "#define GNULIB_TEST_MBRTOWC 1" >>confdefs.h
+printf "%s\n" "#define GNULIB_TEST_MBRTOWC 1" >>confdefs.h
@@ -15551,10 +20257,11 @@ $as_echo "#define GNULIB_TEST_MBRTOWC 1" >>confdefs.h
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc handles incomplete characters" >&5
-$as_echo_n "checking whether mbrtowc handles incomplete characters... " >&6; }
-if ${gl_cv_func_mbrtowc_incomplete_state+:} false; then :
- $as_echo_n "(cached) " >&6
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc handles incomplete characters" >&5
+printf %s "checking whether mbrtowc handles incomplete characters... " >&6; }
+if test ${gl_cv_func_mbrtowc_incomplete_state+y}
+then :
+ printf %s "(cached) " >&6
else
case "$host_os" in
@@ -15564,7 +20271,8 @@ else
*) gl_cv_func_mbrtowc_incomplete_state="guessing yes" ;;
esac
if test $LOCALE_JA != none; then
- if test "$cross_compiling" = yes; then :
+ if test "$cross_compiling" = yes
+then :
:
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -15591,12 +20299,13 @@ int main ()
memset (&state, '\0', sizeof (mbstate_t));
if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
if (mbsinit (&state))
- return 1;
+ return 2;
}
return 0;
}
_ACEOF
-if ac_fn_c_try_run "$LINENO"; then :
+if ac_fn_c_try_run "$LINENO"
+then :
gl_cv_func_mbrtowc_incomplete_state=yes
else
gl_cv_func_mbrtowc_incomplete_state=no
@@ -15608,16 +20317,17 @@ fi
fi
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_incomplete_state" >&5
-$as_echo "$gl_cv_func_mbrtowc_incomplete_state" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_incomplete_state" >&5
+printf "%s\n" "$gl_cv_func_mbrtowc_incomplete_state" >&6; }
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc works as well as mbtowc" >&5
-$as_echo_n "checking whether mbrtowc works as well as mbtowc... " >&6; }
-if ${gl_cv_func_mbrtowc_sanitycheck+:} false; then :
- $as_echo_n "(cached) " >&6
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc works as well as mbtowc" >&5
+printf %s "checking whether mbrtowc works as well as mbtowc... " >&6; }
+if test ${gl_cv_func_mbrtowc_sanitycheck+y}
+then :
+ printf %s "(cached) " >&6
else
case "$host_os" in
@@ -15627,7 +20337,8 @@ else
*) gl_cv_func_mbrtowc_sanitycheck="guessing yes" ;;
esac
if test $LOCALE_ZH_CN != none; then
- if test "$cross_compiling" = yes; then :
+ if test "$cross_compiling" = yes
+then :
:
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -15658,12 +20369,13 @@ int main ()
memset (&state, '\0', sizeof (mbstate_t));
if (mbrtowc (&wc, input + 3, 6, &state) != 4
&& mbtowc (&wc, input + 3, 6) == 4)
- return 1;
+ return 2;
}
return 0;
}
_ACEOF
-if ac_fn_c_try_run "$LINENO"; then :
+if ac_fn_c_try_run "$LINENO"
+then :
gl_cv_func_mbrtowc_sanitycheck=yes
else
gl_cv_func_mbrtowc_sanitycheck=no
@@ -15675,8 +20387,8 @@ fi
fi
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_sanitycheck" >&5
-$as_echo "$gl_cv_func_mbrtowc_sanitycheck" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_sanitycheck" >&5
+printf "%s\n" "$gl_cv_func_mbrtowc_sanitycheck" >&6; }
REPLACE_MBSTATE_T=0
case "$gl_cv_func_mbrtowc_incomplete_state" in
@@ -15706,15 +20418,14 @@ $as_echo "$gl_cv_func_mbrtowc_sanitycheck" >&6; }
#include <wchar.h>
"
-if test "x$ac_cv_have_decl_mbsinit" = xyes; then :
+if test "x$ac_cv_have_decl_mbsinit" = xyes
+then :
ac_have_decl=1
else
ac_have_decl=0
fi
-cat >>confdefs.h <<_ACEOF
-#define HAVE_DECL_MBSINIT $ac_have_decl
-_ACEOF
+printf "%s\n" "#define HAVE_DECL_MBSINIT $ac_have_decl" >>confdefs.h
if test $ac_cv_have_decl_mbsinit = yes; then
REPLACE_MBSINIT=1
@@ -15755,7 +20466,7 @@ _ACEOF
-$as_echo "#define GNULIB_TEST_MBSINIT 1" >>confdefs.h
+printf "%s\n" "#define GNULIB_TEST_MBSINIT 1" >>confdefs.h
@@ -15792,7 +20503,7 @@ $as_echo "#define GNULIB_TEST_MBSINIT 1" >>confdefs.h
-$as_echo "#define GNULIB_TEST_MBTOWC 1" >>confdefs.h
+printf "%s\n" "#define GNULIB_TEST_MBTOWC 1" >>confdefs.h
@@ -15809,18 +20520,13 @@ $as_echo "#define GNULIB_TEST_MBTOWC 1" >>confdefs.h
gl_LIBOBJS="$gl_LIBOBJS memchr.$ac_objext"
- for ac_header in bp-sym.h
-do :
- ac_fn_c_check_header_mongrel "$LINENO" "bp-sym.h" "ac_cv_header_bp_sym_h" "$ac_includes_default"
-if test "x$ac_cv_header_bp_sym_h" = xyes; then :
- cat >>confdefs.h <<_ACEOF
-#define HAVE_BP_SYM_H 1
-_ACEOF
+ ac_fn_c_check_header_compile "$LINENO" "bp-sym.h" "ac_cv_header_bp_sym_h" "$ac_includes_default"
+if test "x$ac_cv_header_bp_sym_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_BP_SYM_H 1" >>confdefs.h
fi
-done
-
fi
@@ -15834,8 +20540,7 @@ done
-$as_echo "#define GNULIB_TEST_MEMCHR 1" >>confdefs.h
-
+printf "%s\n" "#define GNULIB_TEST_MEMCHR 1" >>confdefs.h
@@ -15844,59 +20549,61 @@ $as_echo "#define GNULIB_TEST_MEMCHR 1" >>confdefs.h
- if test $ac_cv_func_mkostemp != yes; then
- HAVE_MKOSTEMP=0
+ if test $ac_cv_have_decl_memrchr = no; then
+ HAVE_DECL_MEMRCHR=0
fi
- if test $HAVE_MKOSTEMP = 0; then
+ ac_fn_c_check_func "$LINENO" "memrchr" "ac_cv_func_memrchr"
+if test "x$ac_cv_func_memrchr" = xyes
+then :
+ printf "%s\n" "#define HAVE_MEMRCHR 1" >>confdefs.h
+fi
+ if test $ac_cv_func_memrchr = no; then
- gl_LIBOBJS="$gl_LIBOBJS mkostemp.$ac_objext"
+ gl_LIBOBJS="$gl_LIBOBJS memrchr.$ac_objext"
+
+ :
fi
-cat >>confdefs.h <<_ACEOF
-#define GNULIB_MKOSTEMP 1
-_ACEOF
+ GNULIB_MEMRCHR=1
- GNULIB_MKOSTEMP=1
+printf "%s\n" "#define GNULIB_TEST_MEMRCHR 1" >>confdefs.h
-$as_echo "#define GNULIB_TEST_MKOSTEMP 1" >>confdefs.h
- if test $ac_cv_func__set_invalid_parameter_handler = yes; then
- HAVE_MSVC_INVALID_PARAMETER_HANDLER=1
-$as_echo "#define HAVE_MSVC_INVALID_PARAMETER_HANDLER 1" >>confdefs.h
- else
- HAVE_MSVC_INVALID_PARAMETER_HANDLER=0
+
+ if test $ac_cv_func_mkostemp != yes; then
+ HAVE_MKOSTEMP=0
fi
+ if test $HAVE_MKOSTEMP = 0; then
- if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then
@@ -15904,12 +20611,44 @@ $as_echo "#define HAVE_MSVC_INVALID_PARAMETER_HANDLER 1" >>confdefs.h
+ gl_LIBOBJS="$gl_LIBOBJS mkostemp.$ac_objext"
+
- gl_LIBOBJS="$gl_LIBOBJS msvc-inval.$ac_objext"
fi
+printf "%s\n" "#define GNULIB_MKOSTEMP 1" >>confdefs.h
+
+
+
+
+
+
+
+ GNULIB_MKOSTEMP=1
+
+
+
+
+
+printf "%s\n" "#define GNULIB_TEST_MKOSTEMP 1" >>confdefs.h
+
+
+
+
+ if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then
+
+
+
+
+
+
+
+
+ gl_LIBOBJS="$gl_LIBOBJS msvc-inval.$ac_objext"
+
+ fi
if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then
@@ -15930,12 +20669,14 @@ $as_echo "#define HAVE_MSVC_INVALID_PARAMETER_HANDLER 1" >>confdefs.h
if test $ac_cv_func_nl_langinfo = yes; then
# On Irix 6.5, YESEXPR is defined, but nl_langinfo(YESEXPR) is broken.
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether YESEXPR works" >&5
-$as_echo_n "checking whether YESEXPR works... " >&6; }
-if ${gl_cv_func_nl_langinfo_yesexpr_works+:} false; then :
- $as_echo_n "(cached) " >&6
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether YESEXPR works" >&5
+printf %s "checking whether YESEXPR works... " >&6; }
+if test ${gl_cv_func_nl_langinfo_yesexpr_works+y}
+then :
+ printf %s "(cached) " >&6
else
- if test "$cross_compiling" = yes; then :
+ if test "$cross_compiling" = yes
+then :
case "$host_os" in
# Guess no on irix systems.
@@ -15950,7 +20691,7 @@ else
#include <langinfo.h>
int
-main ()
+main (void)
{
return !*nl_langinfo(YESEXPR);
@@ -15958,7 +20699,8 @@ return !*nl_langinfo(YESEXPR);
return 0;
}
_ACEOF
-if ac_fn_c_try_run "$LINENO"; then :
+if ac_fn_c_try_run "$LINENO"
+then :
gl_cv_func_nl_langinfo_yesexpr_works=yes
else
gl_cv_func_nl_langinfo_yesexpr_works=no
@@ -15969,16 +20711,14 @@ fi
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_nl_langinfo_yesexpr_works" >&5
-$as_echo "$gl_cv_func_nl_langinfo_yesexpr_works" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_nl_langinfo_yesexpr_works" >&5
+printf "%s\n" "$gl_cv_func_nl_langinfo_yesexpr_works" >&6; }
case $gl_cv_func_nl_langinfo_yesexpr_works in
*yes) FUNC_NL_LANGINFO_YESEXPR_WORKS=1 ;;
*) FUNC_NL_LANGINFO_YESEXPR_WORKS=0 ;;
esac
-cat >>confdefs.h <<_ACEOF
-#define FUNC_NL_LANGINFO_YESEXPR_WORKS $FUNC_NL_LANGINFO_YESEXPR_WORKS
-_ACEOF
+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
@@ -15986,7 +20726,7 @@ _ACEOF
else
REPLACE_NL_LANGINFO=1
-$as_echo "#define REPLACE_NL_LANGINFO 1" >>confdefs.h
+printf "%s\n" "#define REPLACE_NL_LANGINFO 1" >>confdefs.h
fi
else
@@ -16016,7 +20756,7 @@ $as_echo "#define REPLACE_NL_LANGINFO 1" >>confdefs.h
-$as_echo "#define GNULIB_TEST_NL_LANGINFO 1" >>confdefs.h
+printf "%s\n" "#define GNULIB_TEST_NL_LANGINFO 1" >>confdefs.h
@@ -16032,28 +20772,34 @@ $as_echo "#define GNULIB_TEST_NL_LANGINFO 1" >>confdefs.h
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for obstacks" >&5
-$as_echo_n "checking for obstacks... " >&6; }
-if ${ac_cv_func_obstack+:} false; then :
- $as_echo_n "(cached) " >&6
+
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for obstacks that work with any size object" >&5
+printf %s "checking for obstacks that work with any size object... " >&6; }
+if test ${ac_cv_func_obstack+y}
+then :
+ printf %s "(cached) " >&6
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
-$ac_includes_default
- #include "obstack.h"
+#include "obstack.h"
+ void *obstack_chunk_alloc (size_t n) { return 0; }
+ void obstack_chunk_free (void *p) { }
+ /* Check that an internal function returns size_t, not int. */
+ size_t _obstack_memory_used (struct obstack *);
+
int
-main ()
+main (void)
{
struct obstack mem;
- #define obstack_chunk_alloc malloc
- #define obstack_chunk_free free
- obstack_init (&mem);
- obstack_free (&mem, 0);
+ obstack_init (&mem);
+ obstack_free (&mem, 0);
+
;
return 0;
}
_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
+if ac_fn_c_try_link "$LINENO"
+then :
ac_cv_func_obstack=yes
else
ac_cv_func_obstack=no
@@ -16061,13 +20807,13 @@ fi
rm -f core conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_obstack" >&5
-$as_echo "$ac_cv_func_obstack" >&6; }
-if test $ac_cv_func_obstack = yes; then
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_obstack" >&5
+printf "%s\n" "$ac_cv_func_obstack" >&6; }
+ if test "$ac_cv_func_obstack" = yes; then
-$as_echo "#define HAVE_OBSTACK 1" >>confdefs.h
+printf "%s\n" "#define HAVE_OBSTACK 1" >>confdefs.h
-else
+ else
@@ -16078,10 +20824,32 @@ else
gl_LIBOBJS="$gl_LIBOBJS obstack.$ac_objext"
+ fi
+
+
+
+
+ ac_fn_c_check_decl "$LINENO" "program_invocation_name" "ac_cv_have_decl_program_invocation_name" "#include <errno.h>
+"
+if test "x$ac_cv_have_decl_program_invocation_name" = xyes
+then :
+ ac_have_decl=1
+else
+ ac_have_decl=0
fi
+printf "%s\n" "#define HAVE_DECL_PROGRAM_INVOCATION_NAME $ac_have_decl" >>confdefs.h
+ ac_fn_c_check_decl "$LINENO" "program_invocation_short_name" "ac_cv_have_decl_program_invocation_short_name" "#include <errno.h>
+"
+if test "x$ac_cv_have_decl_program_invocation_short_name" = xyes
+then :
+ ac_have_decl=1
+else
+ ac_have_decl=0
+fi
+printf "%s\n" "#define HAVE_DECL_PROGRAM_INVOCATION_SHORT_NAME $ac_have_decl" >>confdefs.h
:
@@ -16095,10 +20863,11 @@ fi
if test $ac_cv_func_readlink = no; then
HAVE_READLINK=0
else
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether readlink signature is correct" >&5
-$as_echo_n "checking whether readlink signature is correct... " >&6; }
-if ${gl_cv_decl_readlink_works+:} false; then :
- $as_echo_n "(cached) " >&6
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether readlink signature is correct" >&5
+printf %s "checking whether readlink signature is correct... " >&6; }
+if test ${gl_cv_decl_readlink_works+y}
+then :
+ printf %s "(cached) " >&6
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -16106,31 +20875,34 @@ else
/* Cause compilation failure if original declaration has wrong type. */
ssize_t readlink (const char *, char *, size_t);
int
-main ()
+main (void)
{
;
return 0;
}
_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_c_try_compile "$LINENO"
+then :
gl_cv_decl_readlink_works=yes
else
gl_cv_decl_readlink_works=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_decl_readlink_works" >&5
-$as_echo "$gl_cv_decl_readlink_works" >&6; }
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether readlink handles trailing slash correctly" >&5
-$as_echo_n "checking whether readlink handles trailing slash correctly... " >&6; }
-if ${gl_cv_func_readlink_works+:} false; then :
- $as_echo_n "(cached) " >&6
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_decl_readlink_works" >&5
+printf "%s\n" "$gl_cv_decl_readlink_works" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether readlink handles trailing slash correctly" >&5
+printf %s "checking whether readlink handles trailing slash correctly... " >&6; }
+if test ${gl_cv_func_readlink_works+y}
+then :
+ printf %s "(cached) " >&6
else
# We have readlink, so assume ln -s works.
ln -s conftest.no-such conftest.link
ln -s conftest.link conftest.lnk2
- if test "$cross_compiling" = yes; then :
+ if test "$cross_compiling" = yes
+then :
case "$host_os" in
# Guess yes on glibc systems.
*-gnu*) gl_cv_func_readlink_works="guessing yes" ;;
@@ -16144,7 +20916,7 @@ else
#include <unistd.h>
int
-main ()
+main (void)
{
char buf[20];
return readlink ("conftest.lnk2/", buf, sizeof buf) != -1;
@@ -16152,7 +20924,8 @@ char buf[20];
return 0;
}
_ACEOF
-if ac_fn_c_try_run "$LINENO"; then :
+if ac_fn_c_try_run "$LINENO"
+then :
gl_cv_func_readlink_works=yes
else
gl_cv_func_readlink_works=no
@@ -16163,8 +20936,8 @@ fi
rm -f conftest.link conftest.lnk2
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_readlink_works" >&5
-$as_echo "$gl_cv_func_readlink_works" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_readlink_works" >&5
+printf "%s\n" "$gl_cv_func_readlink_works" >&6; }
case "$gl_cv_func_readlink_works" in
*yes)
if test "$gl_cv_decl_readlink_works" != yes; then
@@ -16173,7 +20946,7 @@ $as_echo "$gl_cv_func_readlink_works" >&6; }
;;
*)
-$as_echo "#define READLINK_TRAILING_SLASH_BUG 1" >>confdefs.h
+printf "%s\n" "#define READLINK_TRAILING_SLASH_BUG 1" >>confdefs.h
REPLACE_READLINK=1
;;
@@ -16206,52 +20979,15 @@ $as_echo "#define READLINK_TRAILING_SLASH_BUG 1" >>confdefs.h
-$as_echo "#define GNULIB_TEST_READLINK 1" >>confdefs.h
-
-
-
-
-
-
- if test $gl_cv_func_malloc_posix = yes; then
-
-$as_echo "#define HAVE_REALLOC_POSIX 1" >>confdefs.h
-
- else
- REPLACE_REALLOC=1
- fi
-
- if test $REPLACE_REALLOC = 1; then
-
-
-
-
-
-
-
-
- gl_LIBOBJS="$gl_LIBOBJS realloc.$ac_objext"
-
- fi
-
-
-
-
-
- GNULIB_REALLOC_POSIX=1
-
-
-
-
-
-$as_echo "#define GNULIB_TEST_REALLOC_POSIX 1" >>confdefs.h
+printf "%s\n" "#define GNULIB_TEST_READLINK 1" >>confdefs.h
# Check whether --with-included-regex was given.
-if test "${with_included_regex+set}" = set; then :
+if test ${with_included_regex+y}
+then :
withval=$with_included_regex;
fi
@@ -16264,23 +21000,42 @@ fi
# following run test, then default to *not* using the included regex.c.
# If cross compiling, assume the test would fail and use the included
# regex.c.
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working re_compile_pattern" >&5
-$as_echo_n "checking for working re_compile_pattern... " >&6; }
-if ${gl_cv_func_re_compile_pattern_working+:} false; then :
- $as_echo_n "(cached) " >&6
+
+
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working re_compile_pattern" >&5
+printf %s "checking for working re_compile_pattern... " >&6; }
+if test ${gl_cv_func_re_compile_pattern_working+y}
+then :
+ printf %s "(cached) " >&6
else
- if test "$cross_compiling" = yes; then :
+ if test "$cross_compiling" = yes
+then :
gl_cv_func_re_compile_pattern_working=no
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
-$ac_includes_default
- #include <locale.h>
- #include <limits.h>
- #include <regex.h>
+#include <regex.h>
+
+ #include <locale.h>
+ #include <limits.h>
+ #include <string.h>
+
+ #if defined M_CHECK_ACTION || HAVE_DECL_ALARM
+ # include <signal.h>
+ # include <unistd.h>
+ #endif
+
+ #if HAVE_MALLOC_H
+ # include <malloc.h>
+ #endif
+
+ #ifdef M_CHECK_ACTION
+ /* Exit with distinguishable exit code. */
+ static void sigabrt_no_core (int sig) { raise (SIGTERM); }
+ #endif
int
-main ()
+main (void)
{
int result = 0;
static struct re_pattern_buffer regex;
@@ -16289,26 +21044,74 @@ int result = 0;
const char *s;
struct re_registers regs;
- /* http://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
- test here. */
+ /* Some builds of glibc go into an infinite loop on this
+ test. Use alarm to force death, and mallopt to avoid
+ malloc recursion in diagnosing the corrupted heap. */
+#if HAVE_DECL_ALARM
+ signal (SIGALRM, SIG_DFL);
+ alarm (2);
+#endif
+#ifdef M_CHECK_ACTION
+ signal (SIGABRT, sigabrt_no_core);
+ mallopt (M_CHECK_ACTION, 2);
+#endif
+
if (setlocale (LC_ALL, "en_US.UTF-8"))
{
- static char const pat[] = "insert into";
- static char const data[] =
- "\xFF\0\x12\xA2\xAA\xC4\xB1,K\x12\xC4\xB1*\xACK";
- re_set_syntax (RE_SYNTAX_GREP | RE_HAT_LISTS_NOT_NEWLINE
- | RE_ICASE);
- memset (&regex, 0, sizeof regex);
- s = re_compile_pattern (pat, sizeof pat - 1, &regex);
- if (s)
- result |= 1;
- else if (re_search (&regex, data, sizeof data - 1,
- 0, sizeof data - 1, &regs)
- != -1)
- result |= 1;
+ {
+ /* http://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
+ test here. */
+ static char const pat[] = "insert into";
+ static char const data[] =
+ "\xFF\0\x12\xA2\xAA\xC4\xB1,K\x12\xC4\xB1*\xACK";
+ re_set_syntax (RE_SYNTAX_GREP | RE_HAT_LISTS_NOT_NEWLINE
+ | RE_ICASE);
+ memset (&regex, 0, sizeof regex);
+ s = re_compile_pattern (pat, sizeof pat - 1, &regex);
+ if (s)
+ result |= 1;
+ else if (re_search (&regex, data, sizeof data - 1,
+ 0, sizeof data - 1, &regs)
+ != -1)
+ result |= 1;
+ regfree (&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>.
+ */
+ static char const pat[] = "[^x]x";
+ static char const data[] =
+ /* <U1000><U103B><U103D><U1014><U103A><U102F><U1015><U103A> */
+ "\xe1\x80\x80"
+ "\xe1\x80\xbb"
+ "\xe1\x80\xbd"
+ "\xe1\x80\x94"
+ "\xe1\x80\xba"
+ "\xe1\x80\xaf"
+ "\xe1\x80\x95"
+ "\xe1\x80\xba"
+ "x";
+ re_set_syntax (0);
+ memset (&regex, 0, sizeof regex);
+ s = re_compile_pattern (pat, sizeof pat - 1, &regex);
+ if (s)
+ result |= 1;
+ else
+ {
+ i = re_search (&regex, data, sizeof data - 1,
+ 0, sizeof data - 1, 0);
+ if (i != 0 && i != 21)
+ result |= 1;
+ }
+ regfree (&regex);
+ }
+
if (! setlocale (LC_ALL, "C"))
return 1;
}
@@ -16411,7 +21214,8 @@ int result = 0;
return 0;
}
_ACEOF
-if ac_fn_c_try_run "$LINENO"; then :
+if ac_fn_c_try_run "$LINENO"
+then :
gl_cv_func_re_compile_pattern_working=yes
else
gl_cv_func_re_compile_pattern_working=no
@@ -16421,8 +21225,8 @@ rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
fi
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_re_compile_pattern_working" >&5
-$as_echo "$gl_cv_func_re_compile_pattern_working" >&6; }
+{ 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;;
@@ -16434,55 +21238,55 @@ $as_echo "$gl_cv_func_re_compile_pattern_working" >&6; }
if test $ac_use_included_regex = yes; then
-$as_echo "#define _REGEX_INCLUDE_LIMITS_H 1" >>confdefs.h
+printf "%s\n" "#define _REGEX_INCLUDE_LIMITS_H 1" >>confdefs.h
-$as_echo "#define _REGEX_LARGE_OFFSETS 1" >>confdefs.h
+printf "%s\n" "#define _REGEX_LARGE_OFFSETS 1" >>confdefs.h
-$as_echo "#define re_syntax_options rpl_re_syntax_options" >>confdefs.h
+printf "%s\n" "#define re_syntax_options rpl_re_syntax_options" >>confdefs.h
-$as_echo "#define re_set_syntax rpl_re_set_syntax" >>confdefs.h
+printf "%s\n" "#define re_set_syntax rpl_re_set_syntax" >>confdefs.h
-$as_echo "#define re_compile_pattern rpl_re_compile_pattern" >>confdefs.h
+printf "%s\n" "#define re_compile_pattern rpl_re_compile_pattern" >>confdefs.h
-$as_echo "#define re_compile_fastmap rpl_re_compile_fastmap" >>confdefs.h
+printf "%s\n" "#define re_compile_fastmap rpl_re_compile_fastmap" >>confdefs.h
-$as_echo "#define re_search rpl_re_search" >>confdefs.h
+printf "%s\n" "#define re_search rpl_re_search" >>confdefs.h
-$as_echo "#define re_search_2 rpl_re_search_2" >>confdefs.h
+printf "%s\n" "#define re_search_2 rpl_re_search_2" >>confdefs.h
-$as_echo "#define re_match rpl_re_match" >>confdefs.h
+printf "%s\n" "#define re_match rpl_re_match" >>confdefs.h
-$as_echo "#define re_match_2 rpl_re_match_2" >>confdefs.h
+printf "%s\n" "#define re_match_2 rpl_re_match_2" >>confdefs.h
-$as_echo "#define re_set_registers rpl_re_set_registers" >>confdefs.h
+printf "%s\n" "#define re_set_registers rpl_re_set_registers" >>confdefs.h
-$as_echo "#define re_comp rpl_re_comp" >>confdefs.h
+printf "%s\n" "#define re_comp rpl_re_comp" >>confdefs.h
-$as_echo "#define re_exec rpl_re_exec" >>confdefs.h
+printf "%s\n" "#define re_exec rpl_re_exec" >>confdefs.h
-$as_echo "#define regcomp rpl_regcomp" >>confdefs.h
+printf "%s\n" "#define regcomp rpl_regcomp" >>confdefs.h
-$as_echo "#define regexec rpl_regexec" >>confdefs.h
+printf "%s\n" "#define regexec rpl_regexec" >>confdefs.h
-$as_echo "#define regerror rpl_regerror" >>confdefs.h
+printf "%s\n" "#define regerror rpl_regerror" >>confdefs.h
-$as_echo "#define regfree rpl_regfree" >>confdefs.h
+printf "%s\n" "#define regfree rpl_regfree" >>confdefs.h
fi
@@ -16502,30 +21306,26 @@ $as_echo "#define regfree rpl_regfree" >>confdefs.h
- for ac_header in libintl.h
-do :
- ac_fn_c_check_header_mongrel "$LINENO" "libintl.h" "ac_cv_header_libintl_h" "$ac_includes_default"
-if test "x$ac_cv_header_libintl_h" = xyes; then :
- cat >>confdefs.h <<_ACEOF
-#define HAVE_LIBINTL_H 1
-_ACEOF
-fi
-done
+ ac_fn_c_check_header_compile "$LINENO" "libintl.h" "ac_cv_header_libintl_h" "$ac_includes_default"
+if test "x$ac_cv_header_libintl_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_LIBINTL_H 1" >>confdefs.h
+
+fi
ac_fn_c_check_decl "$LINENO" "isblank" "ac_cv_have_decl_isblank" "#include <ctype.h>
"
-if test "x$ac_cv_have_decl_isblank" = xyes; then :
+if test "x$ac_cv_have_decl_isblank" = xyes
+then :
ac_have_decl=1
else
ac_have_decl=0
fi
-cat >>confdefs.h <<_ACEOF
-#define HAVE_DECL_ISBLANK $ac_have_decl
-_ACEOF
+printf "%s\n" "#define HAVE_DECL_ISBLANK $ac_have_decl" >>confdefs.h
fi
@@ -16534,10 +21334,11 @@ _ACEOF
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether rename honors trailing slash on destination" >&5
-$as_echo_n "checking whether rename honors trailing slash on destination... " >&6; }
-if ${gl_cv_func_rename_slash_dst_works+:} false; then :
- $as_echo_n "(cached) " >&6
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether rename honors trailing slash on destination" >&5
+printf %s "checking whether rename honors trailing slash on destination... " >&6; }
+if test ${gl_cv_func_rename_slash_dst_works+y}
+then :
+ printf %s "(cached) " >&6
else
rm -rf conftest.f conftest.f1 conftest.f2 conftest.d1 conftest.d2 conftest.lnk
touch conftest.f && touch conftest.f1 && mkdir conftest.d1 ||
@@ -16546,7 +21347,8 @@ else
if test $ac_cv_func_lstat = yes; then
ln -s conftest.f conftest.lnk
fi
- if test "$cross_compiling" = yes; then :
+ if test "$cross_compiling" = yes
+then :
case "$host_os" in
# Guess yes on glibc systems.
*-gnu*) gl_cv_func_rename_slash_dst_works="guessing yes" ;;
@@ -16562,7 +21364,7 @@ else
# include <stdlib.h>
int
-main ()
+main (void)
{
int result = 0;
if (rename ("conftest.f1", "conftest.f2/") == 0)
@@ -16579,7 +21381,8 @@ int result = 0;
return 0;
}
_ACEOF
-if ac_fn_c_try_run "$LINENO"; then :
+if ac_fn_c_try_run "$LINENO"
+then :
gl_cv_func_rename_slash_dst_works=yes
else
gl_cv_func_rename_slash_dst_works=no
@@ -16591,22 +21394,23 @@ fi
rm -rf conftest.f conftest.f1 conftest.f2 conftest.d1 conftest.d2 conftest.lnk
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_rename_slash_dst_works" >&5
-$as_echo "$gl_cv_func_rename_slash_dst_works" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_rename_slash_dst_works" >&5
+printf "%s\n" "$gl_cv_func_rename_slash_dst_works" >&6; }
case "$gl_cv_func_rename_slash_dst_works" in
*yes) ;;
*)
REPLACE_RENAME=1
-$as_echo "#define RENAME_TRAILING_SLASH_DEST_BUG 1" >>confdefs.h
+printf "%s\n" "#define RENAME_TRAILING_SLASH_DEST_BUG 1" >>confdefs.h
;;
esac
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether rename honors trailing slash on source" >&5
-$as_echo_n "checking whether rename honors trailing slash on source... " >&6; }
-if ${gl_cv_func_rename_slash_src_works+:} false; then :
- $as_echo_n "(cached) " >&6
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether rename honors trailing slash on source" >&5
+printf %s "checking whether rename honors trailing slash on source... " >&6; }
+if test ${gl_cv_func_rename_slash_src_works+y}
+then :
+ printf %s "(cached) " >&6
else
rm -rf conftest.f conftest.f1 conftest.d1 conftest.d2 conftest.d3 conftest.lnk
touch conftest.f && touch conftest.f1 && mkdir conftest.d1 ||
@@ -16615,7 +21419,8 @@ else
if test $ac_cv_func_lstat = yes; then
ln -s conftest.f conftest.lnk
fi
- if test "$cross_compiling" = yes; then :
+ if test "$cross_compiling" = yes
+then :
case "$host_os" in
# Guess yes on glibc systems.
*-gnu*) gl_cv_func_rename_slash_src_works="guessing yes" ;;
@@ -16631,7 +21436,7 @@ else
# include <stdlib.h>
int
-main ()
+main (void)
{
int result = 0;
if (rename ("conftest.f1/", "conftest.d3") == 0)
@@ -16648,7 +21453,8 @@ int result = 0;
return 0;
}
_ACEOF
-if ac_fn_c_try_run "$LINENO"; then :
+if ac_fn_c_try_run "$LINENO"
+then :
gl_cv_func_rename_slash_src_works=yes
else
gl_cv_func_rename_slash_src_works=no
@@ -16660,29 +21466,31 @@ fi
rm -rf conftest.f conftest.f1 conftest.d1 conftest.d2 conftest.d3 conftest.lnk
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_rename_slash_src_works" >&5
-$as_echo "$gl_cv_func_rename_slash_src_works" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_rename_slash_src_works" >&5
+printf "%s\n" "$gl_cv_func_rename_slash_src_works" >&6; }
case "$gl_cv_func_rename_slash_src_works" in
*yes) ;;
*)
REPLACE_RENAME=1
-$as_echo "#define RENAME_TRAILING_SLASH_SOURCE_BUG 1" >>confdefs.h
+printf "%s\n" "#define RENAME_TRAILING_SLASH_SOURCE_BUG 1" >>confdefs.h
;;
esac
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether rename manages hard links correctly" >&5
-$as_echo_n "checking whether rename manages hard links correctly... " >&6; }
-if ${gl_cv_func_rename_link_works+:} false; then :
- $as_echo_n "(cached) " >&6
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether rename manages hard links correctly" >&5
+printf %s "checking whether rename manages hard links correctly... " >&6; }
+if test ${gl_cv_func_rename_link_works+y}
+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 &&
set x `ls -i conftest.f conftest.f1` && test "" = ""; then
- if test "$cross_compiling" = yes; 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" ;;
@@ -16699,7 +21507,7 @@ else
# include <unistd.h>
int
-main ()
+main (void)
{
int result = 0;
if (rename ("conftest.f", "conftest.f1"))
@@ -16716,7 +21524,8 @@ int result = 0;
return 0;
}
_ACEOF
-if ac_fn_c_try_run "$LINENO"; then :
+if ac_fn_c_try_run "$LINENO"
+then :
gl_cv_func_rename_link_works=yes
else
gl_cv_func_rename_link_works=no
@@ -16734,27 +21543,29 @@ fi
fi
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_rename_link_works" >&5
-$as_echo "$gl_cv_func_rename_link_works" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_rename_link_works" >&5
+printf "%s\n" "$gl_cv_func_rename_link_works" >&6; }
case "$gl_cv_func_rename_link_works" in
*yes) ;;
*)
REPLACE_RENAME=1
-$as_echo "#define RENAME_HARD_LINK_BUG 1" >>confdefs.h
+printf "%s\n" "#define RENAME_HARD_LINK_BUG 1" >>confdefs.h
;;
esac
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether rename manages existing destinations correctly" >&5
-$as_echo_n "checking whether rename manages existing destinations correctly... " >&6; }
-if ${gl_cv_func_rename_dest_works+:} false; then :
- $as_echo_n "(cached) " >&6
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether rename manages existing destinations correctly" >&5
+printf %s "checking whether rename manages existing destinations correctly... " >&6; }
+if test ${gl_cv_func_rename_dest_works+y}
+then :
+ printf %s "(cached) " >&6
else
rm -rf conftest.f conftest.d1 conftest.d2
touch conftest.f && mkdir conftest.d1 conftest.d2 ||
as_fn_error $? "cannot create temporary files" "$LINENO" 5
- if test "$cross_compiling" = yes; then :
+ if test "$cross_compiling" = yes
+then :
case "$host_os" in
# Guess yes on glibc systems.
*-gnu*) gl_cv_func_rename_dest_works="guessing yes" ;;
@@ -16770,7 +21581,7 @@ else
# include <stdlib.h>
int
-main ()
+main (void)
{
int result = 0;
if (rename ("conftest.d1", "conftest.d2") != 0)
@@ -16783,7 +21594,8 @@ int result = 0;
return 0;
}
_ACEOF
-if ac_fn_c_try_run "$LINENO"; then :
+if ac_fn_c_try_run "$LINENO"
+then :
gl_cv_func_rename_dest_works=yes
else
gl_cv_func_rename_dest_works=no
@@ -16795,14 +21607,14 @@ fi
rm -rf conftest.f conftest.d1 conftest.d2
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_rename_dest_works" >&5
-$as_echo "$gl_cv_func_rename_dest_works" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_rename_dest_works" >&5
+printf "%s\n" "$gl_cv_func_rename_dest_works" >&6; }
case "$gl_cv_func_rename_dest_works" in
*yes) ;;
*)
REPLACE_RENAME=1
-$as_echo "#define RENAME_DEST_EXISTS_BUG 1" >>confdefs.h
+printf "%s\n" "#define RENAME_DEST_EXISTS_BUG 1" >>confdefs.h
;;
esac
@@ -16830,21 +21642,23 @@ $as_echo "#define RENAME_DEST_EXISTS_BUG 1" >>confdefs.h
-$as_echo "#define GNULIB_TEST_RENAME 1" >>confdefs.h
+printf "%s\n" "#define GNULIB_TEST_RENAME 1" >>confdefs.h
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether rmdir works" >&5
-$as_echo_n "checking whether rmdir works... " >&6; }
-if ${gl_cv_func_rmdir_works+:} false; then :
- $as_echo_n "(cached) " >&6
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether rmdir works" >&5
+printf %s "checking whether rmdir works... " >&6; }
+if test ${gl_cv_func_rmdir_works+y}
+then :
+ printf %s "(cached) " >&6
else
mkdir conftest.dir
touch conftest.file
- if test "$cross_compiling" = yes; then :
+ if test "$cross_compiling" = yes
+then :
case "$host_os" in
# Guess yes on glibc systems.
*-gnu*) gl_cv_func_rmdir_works="guessing yes" ;;
@@ -16864,7 +21678,7 @@ else
#endif
int
-main ()
+main (void)
{
int result = 0;
if (!rmdir ("conftest.file/"))
@@ -16879,7 +21693,8 @@ int result = 0;
return 0;
}
_ACEOF
-if ac_fn_c_try_run "$LINENO"; then :
+if ac_fn_c_try_run "$LINENO"
+then :
gl_cv_func_rmdir_works=yes
else
gl_cv_func_rmdir_works=no
@@ -16890,8 +21705,8 @@ fi
rm -rf conftest.dir conftest.file
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_rmdir_works" >&5
-$as_echo "$gl_cv_func_rmdir_works" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_rmdir_works" >&5
+printf "%s\n" "$gl_cv_func_rmdir_works" >&6; }
case "$gl_cv_func_rmdir_works" in
*yes) ;;
*)
@@ -16922,24 +21737,74 @@ $as_echo "$gl_cv_func_rmdir_works" >&6; }
-$as_echo "#define GNULIB_TEST_RMDIR 1" >>confdefs.h
+printf "%s\n" "#define GNULIB_TEST_RMDIR 1" >>confdefs.h
- if test "$with_selinux" != no; then
- for ac_header in selinux/selinux.h
-do :
- ac_fn_c_check_header_mongrel "$LINENO" "selinux/selinux.h" "ac_cv_header_selinux_selinux_h" "$ac_includes_default"
-if test "x$ac_cv_header_selinux_selinux_h" = xyes; then :
- cat >>confdefs.h <<_ACEOF
-#define HAVE_SELINUX_SELINUX_H 1
-_ACEOF
+
+
+
+ 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
-done
+ 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
+then :
+ printf "%s\n" "#define HAVE_SELINUX_SELINUX_H 1" >>confdefs.h
+
+fi
if test "$ac_cv_header_selinux_selinux_h" = yes; then
@@ -16957,53 +21822,58 @@ done
if test $gl_cv_have_include_next = yes; then
gl_cv_next_selinux_selinux_h='<'selinux/selinux.h'>'
else
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <selinux/selinux.h>" >&5
-$as_echo_n "checking absolute name of <selinux/selinux.h>... " >&6; }
-if ${gl_cv_next_selinux_selinux_h+:} false; then :
- $as_echo_n "(cached) " >&6
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <selinux/selinux.h>" >&5
+printf %s "checking absolute name of <selinux/selinux.h>... " >&6; }
+if test ${gl_cv_next_selinux_selinux_h+y}
+then :
+ printf %s "(cached) " >&6
else
if test $ac_cv_header_selinux_selinux_h = yes; then
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+
+
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <selinux/selinux.h>
-
_ACEOF
- case "$host_os" in
- aix*) gl_absname_cpp="$ac_cpp -C" ;;
- *) gl_absname_cpp="$ac_cpp" ;;
- esac
+ 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 'selinux/selinux.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_next_selinux_selinux_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
- sed -n "$gl_absolute_header_sed"`'"'
+ case "$host_os" in
+ mingw*)
+ gl_dirsep_regex='[/\\]'
+ ;;
+ *)
+ gl_dirsep_regex='\/'
+ ;;
+ esac
+ gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
+ gl_header_literal_regex=`echo 'selinux/selinux.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_selinux_selinux_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
+ sed -n "$gl_absolute_header_sed"`
+
+ gl_header=$gl_cv_absolute_selinux_selinux_h
+ gl_cv_next_selinux_selinux_h='"'$gl_header'"'
else
gl_cv_next_selinux_selinux_h='<'selinux/selinux.h'>'
fi
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_selinux_selinux_h" >&5
-$as_echo "$gl_cv_next_selinux_selinux_h" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_selinux_selinux_h" >&5
+printf "%s\n" "$gl_cv_next_selinux_selinux_h" >&6; }
fi
NEXT_SELINUX_SELINUX_H=$gl_cv_next_selinux_selinux_h
@@ -17020,13 +21890,13 @@ $as_echo "$gl_cv_next_selinux_selinux_h" >&6; }
-$as_echo "#define getfilecon rpl_getfilecon" >>confdefs.h
+printf "%s\n" "#define getfilecon rpl_getfilecon" >>confdefs.h
-$as_echo "#define lgetfilecon rpl_lgetfilecon" >>confdefs.h
+printf "%s\n" "#define lgetfilecon rpl_lgetfilecon" >>confdefs.h
-$as_echo "#define fgetfilecon rpl_fgetfilecon" >>confdefs.h
+printf "%s\n" "#define fgetfilecon rpl_fgetfilecon" >>confdefs.h
fi
@@ -17034,15 +21904,15 @@ $as_echo "#define fgetfilecon rpl_fgetfilecon" >>confdefs.h
no:*) # already warned
;;
*:no)
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libselinux was found but selinux/selinux.h is missing." >&5
-$as_echo "$as_me: WARNING: libselinux was found but selinux/selinux.h is missing." >&2;}
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: GNU sed will be compiled without SELinux support." >&5
-$as_echo "$as_me: WARNING: GNU sed will be compiled without SELinux support." >&2;}
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: libselinux was found but selinux/selinux.h is missing." >&5
+printf "%s\n" "$as_me: WARNING: libselinux was found but selinux/selinux.h is missing." >&2;}
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: GNU sed will be compiled without SELinux support." >&5
+printf "%s\n" "$as_me: WARNING: GNU sed will be compiled without SELinux support." >&2;}
esac
else
# Do as if <selinux/selinux.h> does not exist, even if
# AC_CHECK_HEADERS_ONCE has already determined that it exists.
- $as_echo "#define HAVE_SELINUX_SELINUX_H 0" >>confdefs.h
+ printf "%s\n" "#define HAVE_SELINUX_SELINUX_H 0" >>confdefs.h
fi
@@ -17051,18 +21921,16 @@ $as_echo "$as_me: WARNING: GNU sed will be compiled without SELinux support." >&
if test "$with_selinux" != no; then
for ac_header in selinux/context.h
do :
- ac_fn_c_check_header_mongrel "$LINENO" "selinux/context.h" "ac_cv_header_selinux_context_h" "$ac_includes_default"
-if test "x$ac_cv_header_selinux_context_h" = xyes; then :
- cat >>confdefs.h <<_ACEOF
-#define HAVE_SELINUX_CONTEXT_H 1
-_ACEOF
+ ac_fn_c_check_header_compile "$LINENO" "selinux/context.h" "ac_cv_header_selinux_context_h" "$ac_includes_default"
+if test "x$ac_cv_header_selinux_context_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_SELINUX_CONTEXT_H 1" >>confdefs.h
SELINUX_CONTEXT_H=
else
SELINUX_CONTEXT_H=selinux/context.h
fi
done
-
else
SELINUX_CONTEXT_H=selinux/context.h
fi
@@ -17089,16 +21957,17 @@ fi
fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ssize_t" >&5
-$as_echo_n "checking for ssize_t... " >&6; }
-if ${gt_cv_ssize_t+:} false; then :
- $as_echo_n "(cached) " >&6
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ssize_t" >&5
+printf %s "checking for ssize_t... " >&6; }
+if test ${gt_cv_ssize_t+y}
+then :
+ printf %s "(cached) " >&6
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <sys/types.h>
int
-main ()
+main (void)
{
int x = sizeof (ssize_t *) + sizeof (ssize_t);
return !x;
@@ -17106,30 +21975,33 @@ int x = sizeof (ssize_t *) + sizeof (ssize_t);
return 0;
}
_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_c_try_compile "$LINENO"
+then :
gt_cv_ssize_t=yes
else
gt_cv_ssize_t=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_ssize_t" >&5
-$as_echo "$gt_cv_ssize_t" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_ssize_t" >&5
+printf "%s\n" "$gt_cv_ssize_t" >&6; }
if test $gt_cv_ssize_t = no; then
-$as_echo "#define ssize_t int" >>confdefs.h
+printf "%s\n" "#define ssize_t int" >>confdefs.h
fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stat handles trailing slashes on directories" >&5
-$as_echo_n "checking whether stat handles trailing slashes on directories... " >&6; }
-if ${gl_cv_func_stat_dir_slash+:} false; then :
- $as_echo_n "(cached) " >&6
+ { 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 :
+ 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";;
@@ -17140,14 +22012,15 @@ else
#include <sys/stat.h>
int
-main ()
+main (void)
{
struct stat st; return stat (".", &st) != stat ("./", &st);
;
return 0;
}
_ACEOF
-if ac_fn_c_try_run "$LINENO"; then :
+if ac_fn_c_try_run "$LINENO"
+then :
gl_cv_func_stat_dir_slash=yes
else
gl_cv_func_stat_dir_slash=no
@@ -17157,19 +22030,21 @@ rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
fi
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_stat_dir_slash" >&5
-$as_echo "$gl_cv_func_stat_dir_slash" >&6; }
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stat handles trailing slashes on files" >&5
-$as_echo_n "checking whether stat handles trailing slashes on files... " >&6; }
-if ${gl_cv_func_stat_file_slash+:} false; then :
- $as_echo_n "(cached) " >&6
+{ 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
+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; then :
+ if test "$cross_compiling" = yes
+then :
case "$host_os" in
# Guess yes on glibc systems.
*-gnu*) gl_cv_func_stat_file_slash="guessing yes" ;;
@@ -17183,7 +22058,7 @@ else
#include <sys/stat.h>
int
-main ()
+main (void)
{
int result = 0;
struct stat st;
@@ -17199,7 +22074,8 @@ int result = 0;
return 0;
}
_ACEOF
-if ac_fn_c_try_run "$LINENO"; then :
+if ac_fn_c_try_run "$LINENO"
+then :
gl_cv_func_stat_file_slash=yes
else
gl_cv_func_stat_file_slash=no
@@ -17210,18 +22086,18 @@ fi
rm -f conftest.tmp conftest.lnk
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_stat_file_slash" >&5
-$as_echo "$gl_cv_func_stat_file_slash" >&6; }
+{ 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
-$as_echo "#define REPLACE_FUNC_STAT_DIR 1" >>confdefs.h
+printf "%s\n" "#define REPLACE_FUNC_STAT_DIR 1" >>confdefs.h
;;
esac
case $gl_cv_func_stat_file_slash in
*no) REPLACE_STAT=1
-$as_echo "#define REPLACE_FUNC_STAT_FILE 1" >>confdefs.h
+printf "%s\n" "#define REPLACE_FUNC_STAT_FILE 1" >>confdefs.h
;;
esac
@@ -17249,24 +22125,99 @@ $as_echo "#define REPLACE_FUNC_STAT_FILE 1" >>confdefs.h
-$as_echo "#define GNULIB_TEST_STAT 1" >>confdefs.h
+printf "%s\n" "#define GNULIB_TEST_STAT 1" >>confdefs.h
+
+
+
+
+ { 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}
+then :
+ printf %s "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <stdalign.h>
+ #include <stddef.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>. */
+ #ifdef __cplusplus
+ template <class t> struct alignof_helper { char a; t b; };
+ # define ao(type) offsetof (alignof_helper<type>, b)
+ #else
+ # define ao(type) offsetof (struct { char a; type b; }, b)
+ #endif
+ char test_double[ao (double) % _Alignof (double) == 0 ? 1 : -1];
+ char test_long[ao (long int) % _Alignof (long int) == 0 ? 1 : -1];
+ char test_alignof[alignof (double) == _Alignof (double) ? 1 : -1];
+
+ /* Test _Alignas only on platforms where gnulib can help. */
+ #if \
+ ((defined __cplusplus && 201103 <= __cplusplus) \
+ || (defined __APPLE__ && defined __MACH__ \
+ ? 4 < __GNUC__ + (1 <= __GNUC_MINOR__) \
+ : __GNUC__) \
+ || __HP_cc || __HP_aCC || __IBMC__ || __IBMCPP__ \
+ || __ICC || 0x5110 <= __SUNPRO_C \
+ || 1300 <= _MSC_VER)
+ struct alignas_test { char c; char alignas (8) alignas_8; };
+ char test_alignas[offsetof (struct alignas_test, alignas_8) == 8
+ ? 1 : -1];
+ #endif
+
+int
+main (void)
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"
+then :
+ gl_cv_header_working_stdalign_h=yes
+else
+ gl_cv_header_working_stdalign_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_header_working_stdalign_h" >&5
+printf "%s\n" "$gl_cv_header_working_stdalign_h" >&6; }
+
+ if test $gl_cv_header_working_stdalign_h = yes; then
+ STDALIGN_H=''
+ else
+ STDALIGN_H='stdalign.h'
+ fi
+
+ if test -n "$STDALIGN_H"; then
+ GL_GENERATE_STDALIGN_H_TRUE=
+ GL_GENERATE_STDALIGN_H_FALSE='#'
+else
+ GL_GENERATE_STDALIGN_H_TRUE='#'
+ GL_GENERATE_STDALIGN_H_FALSE=
+fi
STDARG_H=''
NEXT_STDARG_H='<stdarg.h>'
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for va_copy" >&5
-$as_echo_n "checking for va_copy... " >&6; }
- if ${gl_cv_func_va_copy+:} false; then :
- $as_echo_n "(cached) " >&6
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for va_copy" >&5
+printf %s "checking for va_copy... " >&6; }
+ if test ${gl_cv_func_va_copy+y}
+then :
+ printf %s "(cached) " >&6
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <stdarg.h>
int
-main ()
+main (void)
{
#ifndef va_copy
@@ -17277,7 +22228,8 @@ void (*func) (va_list, va_list) = va_copy;
return 0;
}
_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_c_try_compile "$LINENO"
+then :
gl_cv_func_va_copy=yes
else
gl_cv_func_va_copy=no
@@ -17285,8 +22237,8 @@ fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_va_copy" >&5
-$as_echo "$gl_cv_func_va_copy" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_va_copy" >&5
+printf "%s\n" "$gl_cv_func_va_copy" >&6; }
if test $gl_cv_func_va_copy = no; then
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -17296,12 +22248,13 @@ $as_echo "$gl_cv_func_va_copy" >&6; }
_ACEOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- $EGREP "vaccine" >/dev/null 2>&1; then :
+ $EGREP "vaccine" >/dev/null 2>&1
+then :
gl_aixcc=yes
else
gl_aixcc=no
fi
-rm -f conftest*
+rm -rf conftest*
if test $gl_aixcc = yes; then
STDARG_H=stdarg.h
@@ -17316,47 +22269,52 @@ rm -f conftest*
if test $gl_cv_have_include_next = yes; then
gl_cv_next_stdarg_h='<'stdarg.h'>'
else
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stdarg.h>" >&5
-$as_echo_n "checking absolute name of <stdarg.h>... " >&6; }
-if ${gl_cv_next_stdarg_h+:} false; then :
- $as_echo_n "(cached) " >&6
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <stdarg.h>" >&5
+printf %s "checking absolute name of <stdarg.h>... " >&6; }
+if test ${gl_cv_next_stdarg_h+y}
+then :
+ printf %s "(cached) " >&6
else
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+
+
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <stdarg.h>
-
_ACEOF
- case "$host_os" in
- aix*) gl_absname_cpp="$ac_cpp -C" ;;
- *) gl_absname_cpp="$ac_cpp" ;;
- esac
+ 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'
+ case "$host_os" in
+ mingw*)
+ gl_dirsep_regex='[/\\]'
+ ;;
+ *)
+ gl_dirsep_regex='\/'
+ ;;
+ esac
+ gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
+ gl_header_literal_regex=`echo 'stdarg.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_stdarg_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
+ sed -n "$gl_absolute_header_sed"`
- gl_header_literal_regex=`echo 'stdarg.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_next_stdarg_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
- sed -n "$gl_absolute_header_sed"`'"'
+ gl_header=$gl_cv_absolute_stdarg_h
+ gl_cv_next_stdarg_h='"'$gl_header'"'
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stdarg_h" >&5
-$as_echo "$gl_cv_next_stdarg_h" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stdarg_h" >&5
+printf "%s\n" "$gl_cv_next_stdarg_h" >&6; }
fi
NEXT_STDARG_H=$gl_cv_next_stdarg_h
@@ -17380,15 +22338,16 @@ $as_echo "$gl_cv_next_stdarg_h" >&6; }
saved_as_echo_n="$as_echo_n"
as_echo_n=':'
- if ${gl_cv_func___va_copy+:} false; then :
- $as_echo_n "(cached) " >&6
+ if test ${gl_cv_func___va_copy+y}
+then :
+ printf %s "(cached) " >&6
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <stdarg.h>
int
-main ()
+main (void)
{
#ifndef __va_copy
@@ -17399,7 +22358,8 @@ error, bail out
return 0;
}
_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_c_try_compile "$LINENO"
+then :
gl_cv_func___va_copy=yes
else
gl_cv_func___va_copy=no
@@ -17411,12 +22371,12 @@ fi
if test $gl_cv_func___va_copy = yes; then
-$as_echo "#define va_copy __va_copy" >>confdefs.h
+printf "%s\n" "#define va_copy __va_copy" >>confdefs.h
else
-$as_echo "#define va_copy gl_va_copy" >>confdefs.h
+printf "%s\n" "#define va_copy gl_va_copy" >>confdefs.h
fi
fi
@@ -17463,14 +22423,25 @@ fi
STDDEF_H=
+ ac_fn_c_check_type "$LINENO" "max_align_t" "ac_cv_type_max_align_t" "#include <stddef.h>
+
+"
+if test "x$ac_cv_type_max_align_t" = xyes
+then :
+
+else
+ HAVE_MAX_ALIGN_T=0; STDDEF_H=stddef.h
+fi
+
if test $gt_cv_c_wchar_t = no; then
HAVE_WCHAR_T=0
STDDEF_H=stddef.h
fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NULL can be used in arbitrary expressions" >&5
-$as_echo_n "checking whether NULL can be used in arbitrary expressions... " >&6; }
-if ${gl_cv_decl_null_works+:} false; then :
- $as_echo_n "(cached) " >&6
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether NULL can be used in arbitrary expressions" >&5
+printf %s "checking whether NULL can be used in arbitrary expressions... " >&6; }
+if test ${gl_cv_decl_null_works+y}
+then :
+ printf %s "(cached) " >&6
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -17478,22 +22449,23 @@ else
int test[2 * (sizeof NULL == sizeof (void *)) -1];
int
-main ()
+main (void)
{
;
return 0;
}
_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_c_try_compile "$LINENO"
+then :
gl_cv_decl_null_works=yes
else
gl_cv_decl_null_works=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_decl_null_works" >&5
-$as_echo "$gl_cv_decl_null_works" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_decl_null_works" >&5
+printf "%s\n" "$gl_cv_decl_null_works" >&6; }
if test $gl_cv_decl_null_works = no; then
REPLACE_NULL=1
STDDEF_H=stddef.h
@@ -17519,47 +22491,52 @@ fi
if test $gl_cv_have_include_next = yes; then
gl_cv_next_stddef_h='<'stddef.h'>'
else
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stddef.h>" >&5
-$as_echo_n "checking absolute name of <stddef.h>... " >&6; }
-if ${gl_cv_next_stddef_h+:} false; then :
- $as_echo_n "(cached) " >&6
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <stddef.h>" >&5
+printf %s "checking absolute name of <stddef.h>... " >&6; }
+if test ${gl_cv_next_stddef_h+y}
+then :
+ printf %s "(cached) " >&6
else
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+
+
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <stddef.h>
-
_ACEOF
- case "$host_os" in
- aix*) gl_absname_cpp="$ac_cpp -C" ;;
- *) gl_absname_cpp="$ac_cpp" ;;
- esac
+ 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'
+ case "$host_os" in
+ mingw*)
+ gl_dirsep_regex='[/\\]'
+ ;;
+ *)
+ gl_dirsep_regex='\/'
+ ;;
+ esac
+ gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
+ gl_header_literal_regex=`echo 'stddef.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_stddef_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
+ sed -n "$gl_absolute_header_sed"`
- gl_header_literal_regex=`echo 'stddef.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_next_stddef_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
- sed -n "$gl_absolute_header_sed"`'"'
+ gl_header=$gl_cv_absolute_stddef_h
+ gl_cv_next_stddef_h='"'$gl_header'"'
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stddef_h" >&5
-$as_echo "$gl_cv_next_stddef_h" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stddef_h" >&5
+printf "%s\n" "$gl_cv_next_stddef_h" >&6; }
fi
NEXT_STDDEF_H=$gl_cv_next_stddef_h
@@ -17580,6 +22557,9 @@ $as_echo "$gl_cv_next_stddef_h" >&6; }
+ printf "%s\n" "#define __USE_MINGW_ANSI_STDIO 1" >>confdefs.h
+
+
@@ -17591,47 +22571,52 @@ $as_echo "$gl_cv_next_stddef_h" >&6; }
if test $gl_cv_have_include_next = yes; then
gl_cv_next_stdio_h='<'stdio.h'>'
else
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stdio.h>" >&5
-$as_echo_n "checking absolute name of <stdio.h>... " >&6; }
-if ${gl_cv_next_stdio_h+:} false; then :
- $as_echo_n "(cached) " >&6
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <stdio.h>" >&5
+printf %s "checking absolute name of <stdio.h>... " >&6; }
+if test ${gl_cv_next_stdio_h+y}
+then :
+ printf %s "(cached) " >&6
else
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+
+
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <stdio.h>
-
_ACEOF
- case "$host_os" in
- aix*) gl_absname_cpp="$ac_cpp -C" ;;
- *) gl_absname_cpp="$ac_cpp" ;;
- esac
+ 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'
+ case "$host_os" in
+ mingw*)
+ gl_dirsep_regex='[/\\]'
+ ;;
+ *)
+ gl_dirsep_regex='\/'
+ ;;
+ esac
+ gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
+ gl_header_literal_regex=`echo 'stdio.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_stdio_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
+ sed -n "$gl_absolute_header_sed"`
- gl_header_literal_regex=`echo 'stdio.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_next_stdio_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
- sed -n "$gl_absolute_header_sed"`'"'
+ gl_header=$gl_cv_absolute_stdio_h
+ gl_cv_next_stdio_h='"'$gl_header'"'
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stdio_h" >&5
-$as_echo "$gl_cv_next_stdio_h" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stdio_h" >&5
+printf "%s\n" "$gl_cv_next_stdio_h" >&6; }
fi
NEXT_STDIO_H=$gl_cv_next_stdio_h
@@ -17648,20 +22633,60 @@ $as_echo "$gl_cv_next_stdio_h" >&6; }
- GNULIB_FSCANF=1
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking which flavor of printf attribute matches inttypes macros" >&5
+printf %s "checking which flavor of printf attribute matches inttypes macros... " >&6; }
+if test ${gl_cv_func_printf_attribute_flavor+y}
+then :
+ printf %s "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+ #define __STDC_FORMAT_MACROS 1
+ #include <stdio.h>
+ #include <inttypes.h>
+ /* For non-mingw systems, compilation will trivially succeed.
+ For mingw, compilation will succeed for older mingw (system
+ printf, "I64d") and fail for newer mingw (gnu printf, "lld"). */
+ #if ((defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__) && \
+ (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4))
+ extern char PRIdMAX_probe[sizeof PRIdMAX == sizeof "I64d" ? 1 : -1];
+ #endif
+
+int
+main (void)
+{
-cat >>confdefs.h <<_ACEOF
-#define GNULIB_FSCANF 1
+ ;
+ return 0;
+}
_ACEOF
+if ac_fn_c_try_compile "$LINENO"
+then :
+ gl_cv_func_printf_attribute_flavor=system
+else
+ gl_cv_func_printf_attribute_flavor=gnu
+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_printf_attribute_flavor" >&5
+printf "%s\n" "$gl_cv_func_printf_attribute_flavor" >&6; }
+ if test "$gl_cv_func_printf_attribute_flavor" = gnu; then
+
+printf "%s\n" "#define GNULIB_PRINTF_ATTRIBUTE_FLAVOR_GNU 1" >>confdefs.h
+
+ fi
+
+ GNULIB_FSCANF=1
+
+
+printf "%s\n" "#define GNULIB_FSCANF 1" >>confdefs.h
GNULIB_SCANF=1
-cat >>confdefs.h <<_ACEOF
-#define GNULIB_SCANF 1
-_ACEOF
+printf "%s\n" "#define GNULIB_SCANF 1" >>confdefs.h
GNULIB_FGETC=1
@@ -17686,18 +22711,19 @@ _ACEOF
for gl_func in dprintf fpurge fseeko ftello getdelim getline gets pclose popen renameat snprintf tmpfile vdprintf vsnprintf; do
- as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
-$as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
-if eval \${$as_gl_Symbol+:} false; then :
- $as_echo_n "(cached) " >&6
+ 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 <stdio.h>
int
-main ()
+main (void)
{
#undef $gl_func
(void) $gl_func;
@@ -17705,7 +22731,8 @@ main ()
return 0;
}
_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_c_try_compile "$LINENO"
+then :
eval "$as_gl_Symbol=yes"
else
eval "$as_gl_Symbol=no"
@@ -17713,11 +22740,12 @@ fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
eval ac_res=\$$as_gl_Symbol
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
-$as_echo "$ac_res" >&6; }
- if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
+ { 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 `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
+#define `printf "%s\n" "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
_ACEOF
eval ac_cv_have_decl_$gl_func=yes
@@ -17738,47 +22766,52 @@ fi
if test $gl_cv_have_include_next = yes; then
gl_cv_next_stdlib_h='<'stdlib.h'>'
else
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stdlib.h>" >&5
-$as_echo_n "checking absolute name of <stdlib.h>... " >&6; }
-if ${gl_cv_next_stdlib_h+:} false; then :
- $as_echo_n "(cached) " >&6
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <stdlib.h>" >&5
+printf %s "checking absolute name of <stdlib.h>... " >&6; }
+if test ${gl_cv_next_stdlib_h+y}
+then :
+ printf %s "(cached) " >&6
else
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+
+
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <stdlib.h>
-
_ACEOF
- case "$host_os" in
- aix*) gl_absname_cpp="$ac_cpp -C" ;;
- *) gl_absname_cpp="$ac_cpp" ;;
- esac
+ 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'
+ case "$host_os" in
+ mingw*)
+ gl_dirsep_regex='[/\\]'
+ ;;
+ *)
+ gl_dirsep_regex='\/'
+ ;;
+ esac
+ gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
+ gl_header_literal_regex=`echo 'stdlib.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_header_literal_regex=`echo 'stdlib.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_next_stdlib_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
- sed -n "$gl_absolute_header_sed"`'"'
+ gl_cv_absolute_stdlib_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
+ sed -n "$gl_absolute_header_sed"`
+
+ gl_header=$gl_cv_absolute_stdlib_h
+ gl_cv_next_stdlib_h='"'$gl_header'"'
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stdlib_h" >&5
-$as_echo "$gl_cv_next_stdlib_h" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stdlib_h" >&5
+printf "%s\n" "$gl_cv_next_stdlib_h" >&6; }
fi
NEXT_STDLIB_H=$gl_cv_next_stdlib_h
@@ -17796,12 +22829,13 @@ $as_echo "$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 random random_r realpath rpmatch setenv setstate setstate_r srandom srandom_r strtod strtoll strtoull unlockpt unsetenv; do
- as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
-$as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
-if eval \${$as_gl_Symbol+:} false; then :
- $as_echo_n "(cached) " >&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
+ 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. */
@@ -17814,7 +22848,7 @@ else
#endif
int
-main ()
+main (void)
{
#undef $gl_func
(void) $gl_func;
@@ -17822,7 +22856,8 @@ main ()
return 0;
}
_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_c_try_compile "$LINENO"
+then :
eval "$as_gl_Symbol=yes"
else
eval "$as_gl_Symbol=no"
@@ -17830,11 +22865,12 @@ fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
eval ac_res=\$$as_gl_Symbol
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
-$as_echo "$ac_res" >&6; }
- if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
+ { 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 `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
+#define `printf "%s\n" "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
_ACEOF
eval ac_cv_have_decl_$gl_func=yes
@@ -17848,12 +22884,14 @@ fi
if test "$ERRNO_H:$REPLACE_STRERROR_0" = :0; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working strerror function" >&5
-$as_echo_n "checking for working strerror function... " >&6; }
-if ${gl_cv_func_working_strerror+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- if test "$cross_compiling" = yes; then :
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working strerror function" >&5
+printf %s "checking for working strerror function... " >&6; }
+if test ${gl_cv_func_working_strerror+y}
+then :
+ printf %s "(cached) " >&6
+else
+ if test "$cross_compiling" = yes
+then :
case "$host_os" in
# Guess yes on glibc systems.
*-gnu*) gl_cv_func_working_strerror="guessing yes" ;;
@@ -17867,14 +22905,15 @@ else
#include <string.h>
int
-main ()
+main (void)
{
if (!*strerror (-2)) return 1;
;
return 0;
}
_ACEOF
-if ac_fn_c_try_run "$LINENO"; then :
+if ac_fn_c_try_run "$LINENO"
+then :
gl_cv_func_working_strerror=yes
else
gl_cv_func_working_strerror=no
@@ -17885,8 +22924,8 @@ fi
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_working_strerror" >&5
-$as_echo "$gl_cv_func_working_strerror" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_working_strerror" >&5
+printf "%s\n" "$gl_cv_func_working_strerror" >&6; }
case "$gl_cv_func_working_strerror" in
*yes) ;;
*)
@@ -17912,9 +22951,7 @@ $as_echo "$gl_cv_func_working_strerror" >&6; }
fi
-cat >>confdefs.h <<_ACEOF
-#define GNULIB_STRERROR 1
-_ACEOF
+printf "%s\n" "#define GNULIB_STRERROR 1" >>confdefs.h
@@ -17928,7 +22965,7 @@ _ACEOF
-$as_echo "#define GNULIB_TEST_STRERROR 1" >>confdefs.h
+printf "%s\n" "#define GNULIB_TEST_STRERROR 1" >>confdefs.h
@@ -17950,18 +22987,13 @@ $as_echo "#define GNULIB_TEST_STRERROR 1" >>confdefs.h
if test $ac_cv_header_sys_socket_h != yes; then
- for ac_header in winsock2.h
-do :
- ac_fn_c_check_header_mongrel "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default"
-if test "x$ac_cv_header_winsock2_h" = xyes; then :
- cat >>confdefs.h <<_ACEOF
-#define HAVE_WINSOCK2_H 1
-_ACEOF
+ 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
-done
-
fi
if test "$ac_cv_header_winsock2_h" = yes; then
HAVE_WINSOCK2_H=1
@@ -17980,16 +23012,12 @@ done
- for ac_func in strverscmp
-do :
ac_fn_c_check_func "$LINENO" "strverscmp" "ac_cv_func_strverscmp"
-if test "x$ac_cv_func_strverscmp" = xyes; then :
- cat >>confdefs.h <<_ACEOF
-#define HAVE_STRVERSCMP 1
-_ACEOF
+if test "x$ac_cv_func_strverscmp" = xyes
+then :
+ printf "%s\n" "#define HAVE_STRVERSCMP 1" >>confdefs.h
fi
-done
if test $ac_cv_func_strverscmp = no; then
HAVE_STRVERSCMP=0
@@ -18021,7 +23049,7 @@ done
-$as_echo "#define GNULIB_TEST_STRVERSCMP 1" >>confdefs.h
+printf "%s\n" "#define GNULIB_TEST_STRVERSCMP 1" >>confdefs.h
@@ -18042,53 +23070,58 @@ $as_echo "#define GNULIB_TEST_STRVERSCMP 1" >>confdefs.h
if test $gl_cv_have_include_next = yes; then
gl_cv_next_sys_stat_h='<'sys/stat.h'>'
else
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/stat.h>" >&5
-$as_echo_n "checking absolute name of <sys/stat.h>... " >&6; }
-if ${gl_cv_next_sys_stat_h+:} false; then :
- $as_echo_n "(cached) " >&6
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/stat.h>" >&5
+printf %s "checking absolute name of <sys/stat.h>... " >&6; }
+if test ${gl_cv_next_sys_stat_h+y}
+then :
+ printf %s "(cached) " >&6
else
if test $ac_cv_header_sys_stat_h = yes; then
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+
+
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <sys/stat.h>
-
_ACEOF
- case "$host_os" in
- aix*) gl_absname_cpp="$ac_cpp -C" ;;
- *) gl_absname_cpp="$ac_cpp" ;;
- esac
+ 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/stat.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_next_sys_stat_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
- sed -n "$gl_absolute_header_sed"`'"'
+ 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/stat.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_stat_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
+ sed -n "$gl_absolute_header_sed"`
+
+ gl_header=$gl_cv_absolute_sys_stat_h
+ gl_cv_next_sys_stat_h='"'$gl_header'"'
else
gl_cv_next_sys_stat_h='<'sys/stat.h'>'
fi
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_stat_h" >&5
-$as_echo "$gl_cv_next_sys_stat_h" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_stat_h" >&5
+printf "%s\n" "$gl_cv_next_sys_stat_h" >&6; }
fi
NEXT_SYS_STAT_H=$gl_cv_next_sys_stat_h
@@ -18113,36 +23146,38 @@ $as_echo "$gl_cv_next_sys_stat_h" >&6; }
if test $WINDOWS_64_BIT_ST_SIZE = 1; then
-$as_echo "#define _GL_WINDOWS_64_BIT_ST_SIZE 1" >>confdefs.h
+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>
"
-if test "x$ac_cv_type_nlink_t" = xyes; then :
+if test "x$ac_cv_type_nlink_t" = xyes
+then :
else
-$as_echo "#define nlink_t int" >>confdefs.h
+printf "%s\n" "#define nlink_t int" >>confdefs.h
fi
for gl_func in fchmodat fstat fstatat futimens lchmod lstat mkdirat mkfifo mkfifoat mknod mknodat stat utimensat; do
- as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
-$as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
-if eval \${$as_gl_Symbol+:} false; then :
- $as_echo_n "(cached) " >&6
+ 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/stat.h>
int
-main ()
+main (void)
{
#undef $gl_func
(void) $gl_func;
@@ -18150,7 +23185,8 @@ main ()
return 0;
}
_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_c_try_compile "$LINENO"
+then :
eval "$as_gl_Symbol=yes"
else
eval "$as_gl_Symbol=no"
@@ -18158,11 +23194,12 @@ fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
eval ac_res=\$$as_gl_Symbol
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
-$as_echo "$ac_res" >&6; }
- if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
+ { 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 `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
+#define `printf "%s\n" "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
_ACEOF
eval ac_cv_have_decl_$gl_func=yes
@@ -18179,84 +23216,13 @@ fi
+ :
- if test $gl_cv_have_include_next = yes; then
- gl_cv_next_sys_types_h='<'sys/types.h'>'
- else
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/types.h>" >&5
-$as_echo_n "checking absolute name of <sys/types.h>... " >&6; }
-if ${gl_cv_next_sys_types_h+:} false; then :
- $as_echo_n "(cached) " >&6
-else
-
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-#include <sys/types.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/types.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_next_sys_types_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
- sed -n "$gl_absolute_header_sed"`'"'
-
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_types_h" >&5
-$as_echo "$gl_cv_next_sys_types_h" >&6; }
- fi
- NEXT_SYS_TYPES_H=$gl_cv_next_sys_types_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/types.h'>'
- else
- # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
- gl_next_as_first_directive=$gl_cv_next_sys_types_h
- fi
- NEXT_AS_FIRST_DIRECTIVE_SYS_TYPES_H=$gl_next_as_first_directive
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- :
-
-
@@ -18275,53 +23241,58 @@ $as_echo "$gl_cv_next_sys_types_h" >&6; }
if test $gl_cv_have_include_next = yes; then
gl_cv_next_unistd_h='<'unistd.h'>'
else
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <unistd.h>" >&5
-$as_echo_n "checking absolute name of <unistd.h>... " >&6; }
-if ${gl_cv_next_unistd_h+:} false; then :
- $as_echo_n "(cached) " >&6
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <unistd.h>" >&5
+printf %s "checking absolute name of <unistd.h>... " >&6; }
+if test ${gl_cv_next_unistd_h+y}
+then :
+ printf %s "(cached) " >&6
else
if test $ac_cv_header_unistd_h = yes; then
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+
+
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <unistd.h>
-
_ACEOF
- case "$host_os" in
- aix*) gl_absname_cpp="$ac_cpp -C" ;;
- *) gl_absname_cpp="$ac_cpp" ;;
- esac
+ 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 'unistd.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_next_unistd_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
- sed -n "$gl_absolute_header_sed"`'"'
+ case "$host_os" in
+ mingw*)
+ gl_dirsep_regex='[/\\]'
+ ;;
+ *)
+ gl_dirsep_regex='\/'
+ ;;
+ esac
+ gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
+ gl_header_literal_regex=`echo 'unistd.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_unistd_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
+ sed -n "$gl_absolute_header_sed"`
+
+ gl_header=$gl_cv_absolute_unistd_h
+ gl_cv_next_unistd_h='"'$gl_header'"'
else
gl_cv_next_unistd_h='<'unistd.h'>'
fi
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_unistd_h" >&5
-$as_echo "$gl_cv_next_unistd_h" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_unistd_h" >&5
+printf "%s\n" "$gl_cv_next_unistd_h" >&6; }
fi
NEXT_UNISTD_H=$gl_cv_next_unistd_h
@@ -18350,11 +23321,12 @@ $as_echo "$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
- as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
-$as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
-if eval \${$as_gl_Symbol+:} false; then :
- $as_echo_n "(cached) " >&6
+ 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. */
@@ -18373,7 +23345,7 @@ else
#endif
int
-main ()
+main (void)
{
#undef $gl_func
(void) $gl_func;
@@ -18381,7 +23353,8 @@ main ()
return 0;
}
_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_c_try_compile "$LINENO"
+then :
eval "$as_gl_Symbol=yes"
else
eval "$as_gl_Symbol=no"
@@ -18389,11 +23362,12 @@ fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
eval ac_res=\$$as_gl_Symbol
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
-$as_echo "$ac_res" >&6; }
- if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
+ { 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 `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
+#define `printf "%s\n" "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
_ACEOF
eval ac_cv_have_decl_$gl_func=yes
@@ -18403,7 +23377,7 @@ fi
-$as_echo "#define USE_UNLOCKED_IO 1" >>confdefs.h
+printf "%s\n" "#define USE_UNLOCKED_IO 1" >>confdefs.h
@@ -18424,13 +23398,12 @@ $as_echo "#define USE_UNLOCKED_IO 1" >>confdefs.h
# Check whether --with-packager was given.
-if test "${with_packager+set}" = set; then :
+if test ${with_packager+y}
+then :
withval=$with_packager; case $withval in
yes|no) ;;
*)
-cat >>confdefs.h <<_ACEOF
-#define PACKAGE_PACKAGER "$withval"
-_ACEOF
+printf "%s\n" "#define PACKAGE_PACKAGER \"$withval\"" >>confdefs.h
;;
esac
@@ -18439,13 +23412,12 @@ fi
# Check whether --with-packager-version was given.
-if test "${with_packager_version+set}" = set; then :
+if test ${with_packager_version+y}
+then :
withval=$with_packager_version; case $withval in
yes|no) ;;
*)
-cat >>confdefs.h <<_ACEOF
-#define PACKAGE_PACKAGER_VERSION "$withval"
-_ACEOF
+printf "%s\n" "#define PACKAGE_PACKAGER_VERSION \"$withval\"" >>confdefs.h
;;
esac
@@ -18454,13 +23426,12 @@ fi
# Check whether --with-packager-bug-reports was given.
-if test "${with_packager_bug_reports+set}" = set; then :
+if test ${with_packager_bug_reports+y}
+then :
withval=$with_packager_bug_reports; case $withval in
yes|no) ;;
*)
-cat >>confdefs.h <<_ACEOF
-#define PACKAGE_PACKAGER_BUG_REPORTS "$withval"
-_ACEOF
+printf "%s\n" "#define PACKAGE_PACKAGER_BUG_REPORTS \"$withval\"" >>confdefs.h
;;
esac
@@ -18488,53 +23459,58 @@ fi
if test $gl_cv_have_include_next = yes; then
gl_cv_next_wchar_h='<'wchar.h'>'
else
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <wchar.h>" >&5
-$as_echo_n "checking absolute name of <wchar.h>... " >&6; }
-if ${gl_cv_next_wchar_h+:} false; then :
- $as_echo_n "(cached) " >&6
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <wchar.h>" >&5
+printf %s "checking absolute name of <wchar.h>... " >&6; }
+if test ${gl_cv_next_wchar_h+y}
+then :
+ printf %s "(cached) " >&6
else
if test $ac_cv_header_wchar_h = yes; then
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+
+
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <wchar.h>
-
_ACEOF
- case "$host_os" in
- aix*) gl_absname_cpp="$ac_cpp -C" ;;
- *) gl_absname_cpp="$ac_cpp" ;;
- esac
+ 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 'wchar.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_next_wchar_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
- sed -n "$gl_absolute_header_sed"`'"'
+ case "$host_os" in
+ mingw*)
+ gl_dirsep_regex='[/\\]'
+ ;;
+ *)
+ gl_dirsep_regex='\/'
+ ;;
+ esac
+ gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
+ gl_header_literal_regex=`echo 'wchar.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_wchar_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
+ sed -n "$gl_absolute_header_sed"`
+
+ gl_header=$gl_cv_absolute_wchar_h
+ gl_cv_next_wchar_h='"'$gl_header'"'
else
gl_cv_next_wchar_h='<'wchar.h'>'
fi
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_wchar_h" >&5
-$as_echo "$gl_cv_next_wchar_h" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_wchar_h" >&5
+printf "%s\n" "$gl_cv_next_wchar_h" >&6; }
fi
NEXT_WCHAR_H=$gl_cv_next_wchar_h
@@ -18569,11 +23545,12 @@ $as_echo "$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
- as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
-$as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
-if eval \${$as_gl_Symbol+:} false; then :
- $as_echo_n "(cached) " >&6
+ 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. */
@@ -18590,7 +23567,7 @@ else
#include <wchar.h>
int
-main ()
+main (void)
{
#undef $gl_func
(void) $gl_func;
@@ -18598,7 +23575,8 @@ main ()
return 0;
}
_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_c_try_compile "$LINENO"
+then :
eval "$as_gl_Symbol=yes"
else
eval "$as_gl_Symbol=no"
@@ -18606,11 +23584,12 @@ fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
eval ac_res=\$$as_gl_Symbol
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
-$as_echo "$ac_res" >&6; }
- if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
+ { 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 `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
+#define `printf "%s\n" "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
_ACEOF
eval ac_cv_have_decl_$gl_func=yes
@@ -18632,10 +23611,11 @@ fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc handles incomplete characters" >&5
-$as_echo_n "checking whether mbrtowc handles incomplete characters... " >&6; }
-if ${gl_cv_func_mbrtowc_incomplete_state+:} false; then :
- $as_echo_n "(cached) " >&6
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc handles incomplete characters" >&5
+printf %s "checking whether mbrtowc handles incomplete characters... " >&6; }
+if test ${gl_cv_func_mbrtowc_incomplete_state+y}
+then :
+ printf %s "(cached) " >&6
else
case "$host_os" in
@@ -18645,7 +23625,8 @@ else
*) gl_cv_func_mbrtowc_incomplete_state="guessing yes" ;;
esac
if test $LOCALE_JA != none; then
- if test "$cross_compiling" = yes; then :
+ if test "$cross_compiling" = yes
+then :
:
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -18672,12 +23653,13 @@ int main ()
memset (&state, '\0', sizeof (mbstate_t));
if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
if (mbsinit (&state))
- return 1;
+ return 2;
}
return 0;
}
_ACEOF
-if ac_fn_c_try_run "$LINENO"; then :
+if ac_fn_c_try_run "$LINENO"
+then :
gl_cv_func_mbrtowc_incomplete_state=yes
else
gl_cv_func_mbrtowc_incomplete_state=no
@@ -18689,16 +23671,17 @@ fi
fi
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_incomplete_state" >&5
-$as_echo "$gl_cv_func_mbrtowc_incomplete_state" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_incomplete_state" >&5
+printf "%s\n" "$gl_cv_func_mbrtowc_incomplete_state" >&6; }
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc works as well as mbtowc" >&5
-$as_echo_n "checking whether mbrtowc works as well as mbtowc... " >&6; }
-if ${gl_cv_func_mbrtowc_sanitycheck+:} false; then :
- $as_echo_n "(cached) " >&6
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc works as well as mbtowc" >&5
+printf %s "checking whether mbrtowc works as well as mbtowc... " >&6; }
+if test ${gl_cv_func_mbrtowc_sanitycheck+y}
+then :
+ printf %s "(cached) " >&6
else
case "$host_os" in
@@ -18708,7 +23691,8 @@ else
*) gl_cv_func_mbrtowc_sanitycheck="guessing yes" ;;
esac
if test $LOCALE_ZH_CN != none; then
- if test "$cross_compiling" = yes; then :
+ if test "$cross_compiling" = yes
+then :
:
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -18739,12 +23723,13 @@ int main ()
memset (&state, '\0', sizeof (mbstate_t));
if (mbrtowc (&wc, input + 3, 6, &state) != 4
&& mbtowc (&wc, input + 3, 6) == 4)
- return 1;
+ return 2;
}
return 0;
}
_ACEOF
-if ac_fn_c_try_run "$LINENO"; then :
+if ac_fn_c_try_run "$LINENO"
+then :
gl_cv_func_mbrtowc_sanitycheck=yes
else
gl_cv_func_mbrtowc_sanitycheck=no
@@ -18756,8 +23741,8 @@ fi
fi
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_sanitycheck" >&5
-$as_echo "$gl_cv_func_mbrtowc_sanitycheck" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_sanitycheck" >&5
+printf "%s\n" "$gl_cv_func_mbrtowc_sanitycheck" >&6; }
REPLACE_MBSTATE_T=0
case "$gl_cv_func_mbrtowc_incomplete_state" in
@@ -18787,15 +23772,14 @@ $as_echo "$gl_cv_func_mbrtowc_sanitycheck" >&6; }
#include <wchar.h>
"
-if test "x$ac_cv_have_decl_wcrtomb" = xyes; then :
+if test "x$ac_cv_have_decl_wcrtomb" = xyes
+then :
ac_have_decl=1
else
ac_have_decl=0
fi
-cat >>confdefs.h <<_ACEOF
-#define HAVE_DECL_WCRTOMB $ac_have_decl
-_ACEOF
+printf "%s\n" "#define HAVE_DECL_WCRTOMB $ac_have_decl" >>confdefs.h
if test $ac_cv_have_decl_wcrtomb = yes; then
REPLACE_WCRTOMB=1
@@ -18809,10 +23793,11 @@ _ACEOF
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wcrtomb return value is correct" >&5
-$as_echo_n "checking whether wcrtomb return value is correct... " >&6; }
-if ${gl_cv_func_wcrtomb_retval+:} false; then :
- $as_echo_n "(cached) " >&6
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether wcrtomb return value is correct" >&5
+printf %s "checking whether wcrtomb return value is correct... " >&6; }
+if test ${gl_cv_func_wcrtomb_retval+y}
+then :
+ printf %s "(cached) " >&6
else
case "$host_os" in
@@ -18822,7 +23807,8 @@ else
*) gl_cv_func_wcrtomb_retval="guessing yes" ;;
esac
if test $LOCALE_FR != none || test $LOCALE_FR_UTF8 != none || test $LOCALE_JA != none || test $LOCALE_ZH_CN != none; then
- if test "$cross_compiling" = yes; then :
+ if test "$cross_compiling" = yes
+then :
:
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -18864,7 +23850,8 @@ int main ()
return result;
}
_ACEOF
-if ac_fn_c_try_run "$LINENO"; then :
+if ac_fn_c_try_run "$LINENO"
+then :
gl_cv_func_wcrtomb_retval=yes
else
gl_cv_func_wcrtomb_retval=no
@@ -18876,8 +23863,8 @@ fi
fi
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_wcrtomb_retval" >&5
-$as_echo "$gl_cv_func_wcrtomb_retval" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_wcrtomb_retval" >&5
+printf "%s\n" "$gl_cv_func_wcrtomb_retval" >&6; }
case "$gl_cv_func_wcrtomb_retval" in
*yes) ;;
*) REPLACE_WCRTOMB=1 ;;
@@ -18911,7 +23898,7 @@ $as_echo "$gl_cv_func_wcrtomb_retval" >&6; }
-$as_echo "#define GNULIB_TEST_WCRTOMB 1" >>confdefs.h
+printf "%s\n" "#define GNULIB_TEST_WCRTOMB 1" >>confdefs.h
@@ -18927,10 +23914,11 @@ $as_echo "#define GNULIB_TEST_WCRTOMB 1" >>confdefs.h
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wctob works" >&5
-$as_echo_n "checking whether wctob works... " >&6; }
-if ${gl_cv_func_wctob_works+:} false; then :
- $as_echo_n "(cached) " >&6
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether wctob works" >&5
+printf %s "checking whether wctob works... " >&6; }
+if test ${gl_cv_func_wctob_works+y}
+then :
+ printf %s "(cached) " >&6
else
case "$host_os" in
@@ -18942,7 +23930,8 @@ else
esac
case "$host_os" in
cygwin*)
- if test "$cross_compiling" = yes; then :
+ if test "$cross_compiling" = yes
+then :
:
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -18972,7 +23961,8 @@ int main ()
return 0;
}
_ACEOF
-if ac_fn_c_try_run "$LINENO"; then :
+if ac_fn_c_try_run "$LINENO"
+then :
:
else
gl_cv_func_wctob_works=no
@@ -18984,7 +23974,8 @@ fi
;;
esac
if test "$gl_cv_func_wctob_works" != no && test $LOCALE_FR != none; then
- if test "$cross_compiling" = yes; then :
+ if test "$cross_compiling" = yes
+then :
:
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -19013,7 +24004,8 @@ int main ()
return 0;
}
_ACEOF
-if ac_fn_c_try_run "$LINENO"; then :
+if ac_fn_c_try_run "$LINENO"
+then :
gl_cv_func_wctob_works=yes
else
gl_cv_func_wctob_works=no
@@ -19025,8 +24017,8 @@ fi
fi
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_wctob_works" >&5
-$as_echo "$gl_cv_func_wctob_works" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_wctob_works" >&5
+printf "%s\n" "$gl_cv_func_wctob_works" >&6; }
case "$gl_cv_func_wctob_works" in
*yes) ;;
*) REPLACE_WCTOB=1 ;;
@@ -19044,15 +24036,14 @@ $as_echo "$gl_cv_func_wctob_works" >&6; }
#include <wchar.h>
"
-if test "x$ac_cv_have_decl_wctob" = xyes; then :
+if test "x$ac_cv_have_decl_wctob" = xyes
+then :
ac_have_decl=1
else
ac_have_decl=0
fi
-cat >>confdefs.h <<_ACEOF
-#define HAVE_DECL_WCTOB $ac_have_decl
-_ACEOF
+printf "%s\n" "#define HAVE_DECL_WCTOB $ac_have_decl" >>confdefs.h
if test $ac_cv_have_decl_wctob != yes; then
HAVE_DECL_WCTOB=0
@@ -19086,7 +24077,7 @@ _ACEOF
-$as_echo "#define GNULIB_TEST_WCTOB 1" >>confdefs.h
+printf "%s\n" "#define GNULIB_TEST_WCTOB 1" >>confdefs.h
@@ -19123,7 +24114,7 @@ $as_echo "#define GNULIB_TEST_WCTOB 1" >>confdefs.h
-$as_echo "#define GNULIB_TEST_WCTOMB 1" >>confdefs.h
+printf "%s\n" "#define GNULIB_TEST_WCTOMB 1" >>confdefs.h
@@ -19159,53 +24150,58 @@ $as_echo "#define GNULIB_TEST_WCTOMB 1" >>confdefs.h
if test $gl_cv_have_include_next = yes; then
gl_cv_next_wctype_h='<'wctype.h'>'
else
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <wctype.h>" >&5
-$as_echo_n "checking absolute name of <wctype.h>... " >&6; }
-if ${gl_cv_next_wctype_h+:} false; then :
- $as_echo_n "(cached) " >&6
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <wctype.h>" >&5
+printf %s "checking absolute name of <wctype.h>... " >&6; }
+if test ${gl_cv_next_wctype_h+y}
+then :
+ printf %s "(cached) " >&6
else
if test $ac_cv_header_wctype_h = yes; then
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+
+
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <wctype.h>
-
_ACEOF
- case "$host_os" in
- aix*) gl_absname_cpp="$ac_cpp -C" ;;
- *) gl_absname_cpp="$ac_cpp" ;;
- esac
+ 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 'wctype.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_next_wctype_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
- sed -n "$gl_absolute_header_sed"`'"'
+ case "$host_os" in
+ mingw*)
+ gl_dirsep_regex='[/\\]'
+ ;;
+ *)
+ gl_dirsep_regex='\/'
+ ;;
+ esac
+ gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
+ gl_header_literal_regex=`echo 'wctype.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_wctype_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
+ sed -n "$gl_absolute_header_sed"`
+
+ gl_header=$gl_cv_absolute_wctype_h
+ gl_cv_next_wctype_h='"'$gl_header'"'
else
gl_cv_next_wctype_h='<'wctype.h'>'
fi
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_wctype_h" >&5
-$as_echo "$gl_cv_next_wctype_h" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_wctype_h" >&5
+printf "%s\n" "$gl_cv_next_wctype_h" >&6; }
fi
NEXT_WCTYPE_H=$gl_cv_next_wctype_h
@@ -19223,13 +24219,15 @@ $as_echo "$gl_cv_next_wctype_h" >&6; }
if test $ac_cv_header_wctype_h = yes; then
if test $ac_cv_func_iswcntrl = yes; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether iswcntrl works" >&5
-$as_echo_n "checking whether iswcntrl works... " >&6; }
-if ${gl_cv_func_iswcntrl_works+:} false; then :
- $as_echo_n "(cached) " >&6
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether iswcntrl works" >&5
+printf %s "checking whether iswcntrl works... " >&6; }
+if test ${gl_cv_func_iswcntrl_works+y}
+then :
+ printf %s "(cached) " >&6
else
- if test "$cross_compiling" = yes; then :
+ if test "$cross_compiling" = yes
+then :
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <stdlib.h>
@@ -19237,14 +24235,15 @@ else
Linux libc5 i18n is broken.
#endif
int
-main ()
+main (void)
{
;
return 0;
}
_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_c_try_compile "$LINENO"
+then :
gl_cv_func_iswcntrl_works="guessing yes"
else
gl_cv_func_iswcntrl_works="guessing no"
@@ -19267,7 +24266,8 @@ else
int main () { return iswprint ('x') == 0; }
_ACEOF
-if ac_fn_c_try_run "$LINENO"; then :
+if ac_fn_c_try_run "$LINENO"
+then :
gl_cv_func_iswcntrl_works=yes
else
gl_cv_func_iswcntrl_works=no
@@ -19278,8 +24278,8 @@ fi
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_iswcntrl_works" >&5
-$as_echo "$gl_cv_func_iswcntrl_works" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_iswcntrl_works" >&5
+printf "%s\n" "$gl_cv_func_iswcntrl_works" >&6; }
fi
HAVE_WCTYPE_H=1
else
@@ -19300,16 +24300,12 @@ $as_echo "$gl_cv_func_iswcntrl_works" >&6; }
if test $REPLACE_ISWCNTRL = 1; then
REPLACE_TOWLOWER=1
else
- for ac_func in towlower
-do :
- ac_fn_c_check_func "$LINENO" "towlower" "ac_cv_func_towlower"
-if test "x$ac_cv_func_towlower" = xyes; then :
- cat >>confdefs.h <<_ACEOF
-#define HAVE_TOWLOWER 1
-_ACEOF
+ ac_fn_c_check_func "$LINENO" "towlower" "ac_cv_func_towlower"
+if test "x$ac_cv_func_towlower" = xyes
+then :
+ printf "%s\n" "#define HAVE_TOWLOWER 1" >>confdefs.h
fi
-done
if test $ac_cv_func_towlower = yes; then
REPLACE_TOWLOWER=0
@@ -19327,15 +24323,14 @@ done
#endif
"
-if test "x$ac_cv_have_decl_towlower" = xyes; then :
+if test "x$ac_cv_have_decl_towlower" = xyes
+then :
ac_have_decl=1
else
ac_have_decl=0
fi
-cat >>confdefs.h <<_ACEOF
-#define HAVE_DECL_TOWLOWER $ac_have_decl
-_ACEOF
+printf "%s\n" "#define HAVE_DECL_TOWLOWER $ac_have_decl" >>confdefs.h
if test $ac_cv_have_decl_towlower = yes; then
REPLACE_TOWLOWER=1
@@ -19350,10 +24345,11 @@ _ACEOF
:
fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wctype_t" >&5
-$as_echo_n "checking for wctype_t... " >&6; }
-if ${gl_cv_type_wctype_t+:} false; then :
- $as_echo_n "(cached) " >&6
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for wctype_t" >&5
+printf %s "checking for wctype_t... " >&6; }
+if test ${gl_cv_type_wctype_t+y}
+then :
+ printf %s "(cached) " >&6
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -19371,14 +24367,15 @@ else
wctype_t a;
int
-main ()
+main (void)
{
;
return 0;
}
_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_c_try_compile "$LINENO"
+then :
gl_cv_type_wctype_t=yes
else
gl_cv_type_wctype_t=no
@@ -19386,16 +24383,17 @@ fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_type_wctype_t" >&5
-$as_echo "$gl_cv_type_wctype_t" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_type_wctype_t" >&5
+printf "%s\n" "$gl_cv_type_wctype_t" >&6; }
if test $gl_cv_type_wctype_t = no; then
HAVE_WCTYPE_T=0
fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wctrans_t" >&5
-$as_echo_n "checking for wctrans_t... " >&6; }
-if ${gl_cv_type_wctrans_t+:} false; then :
- $as_echo_n "(cached) " >&6
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for wctrans_t" >&5
+printf %s "checking for wctrans_t... " >&6; }
+if test ${gl_cv_type_wctrans_t+y}
+then :
+ printf %s "(cached) " >&6
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -19411,14 +24409,15 @@ else
wctrans_t a;
int
-main ()
+main (void)
{
;
return 0;
}
_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_c_try_compile "$LINENO"
+then :
gl_cv_type_wctrans_t=yes
else
gl_cv_type_wctrans_t=no
@@ -19426,19 +24425,20 @@ fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_type_wctrans_t" >&5
-$as_echo "$gl_cv_type_wctrans_t" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_type_wctrans_t" >&5
+printf "%s\n" "$gl_cv_type_wctrans_t" >&6; }
if test $gl_cv_type_wctrans_t = no; then
HAVE_WCTRANS_T=0
fi
for gl_func in wctype iswctype wctrans towctrans ; do
- as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
-$as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
-if eval \${$as_gl_Symbol+:} false; then :
- $as_echo_n "(cached) " >&6
+ 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. */
@@ -19456,7 +24456,7 @@ else
#include <wctype.h>
int
-main ()
+main (void)
{
#undef $gl_func
(void) $gl_func;
@@ -19464,7 +24464,8 @@ main ()
return 0;
}
_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_c_try_compile "$LINENO"
+then :
eval "$as_gl_Symbol=yes"
else
eval "$as_gl_Symbol=no"
@@ -19472,11 +24473,12 @@ fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
eval ac_res=\$$as_gl_Symbol
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
-$as_echo "$ac_res" >&6; }
- if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
+ { 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 `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
+#define `printf "%s\n" "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
_ACEOF
eval ac_cv_have_decl_$gl_func=yes
@@ -19506,7 +24508,7 @@ fi
- gl_source_base='tests'
+ gl_source_base='gnulib-tests'
gltests_WITNESS=IN_`echo "${PACKAGE-$PACKAGE_TARNAME}" | LC_ALL=C tr abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ | LC_ALL=C sed -e 's/[^A-Z0-9_]/_/g'`_GNULIB_TESTS
gl_module_indicator_condition=$gltests_WITNESS
@@ -19514,6 +24516,5833 @@ 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}
+then :
+ printf %s "(cached) " >&6
+else
+
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#include <locale.h>
+#include <time.h>
+#if HAVE_LANGINFO_CODESET
+# include <langinfo.h>
+#endif
+#include <stdlib.h>
+#include <string.h>
+struct tm t;
+char buf[16];
+int main () {
+ /* Check whether the given locale name is recognized by the system. */
+#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
+ category of the locale to "C". */
+ if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
+ || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
+ return 1;
+#else
+ if (setlocale (LC_ALL, "") == NULL) return 1;
+#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.
+ On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
+ succeeds but then nl_langinfo(CODESET) is "646". In this situation,
+ 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
+ {
+ 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__
+ /* 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
+ /* 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. */
+ /* 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
+ return 0;
+}
+
+_ACEOF
+ if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; } && test -s conftest$ac_exeext; then
+ case "$host_os" in
+ # Handle native Windows specially, because there setlocale() interprets
+ # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
+ # "fr" or "fra" as "French" or "French_France.1252",
+ # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
+ # "ja" as "Japanese" or "Japanese_Japan.932",
+ # and similar.
+ mingw*)
+ # Test for the native Windows locale name.
+ if (LC_ALL=French_France.1252 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+ gt_cv_locale_fr=French_France.1252
+ else
+ # None found.
+ gt_cv_locale_fr=none
+ fi
+ ;;
+ *)
+ # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
+ # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
+ # configure script would override the LC_ALL setting. Likewise for
+ # LC_CTYPE, which is also set at the beginning of the configure script.
+ # Test for the usual locale name.
+ if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+ gt_cv_locale_fr=fr_FR
+ else
+ # Test for the locale name with explicit encoding suffix.
+ if (LC_ALL=fr_FR.ISO-8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+ gt_cv_locale_fr=fr_FR.ISO-8859-1
+ else
+ # Test for the AIX, OSF/1, FreeBSD, NetBSD, OpenBSD locale name.
+ if (LC_ALL=fr_FR.ISO8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+ gt_cv_locale_fr=fr_FR.ISO8859-1
+ else
+ # Test for the HP-UX locale name.
+ if (LC_ALL=fr_FR.iso88591 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+ gt_cv_locale_fr=fr_FR.iso88591
+ else
+ # Test for the Solaris 7 locale name.
+ if (LC_ALL=fr LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+ gt_cv_locale_fr=fr
+ else
+ # None found.
+ gt_cv_locale_fr=none
+ fi
+ fi
+ fi
+ fi
+ fi
+ ;;
+ esac
+ fi
+ rm -fr conftest*
+
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr" >&5
+printf "%s\n" "$gt_cv_locale_fr" >&6; }
+ LOCALE_FR=$gt_cv_locale_fr
+
+
+
+
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a french Unicode locale" >&5
+printf %s "checking for a french Unicode locale... " >&6; }
+if test ${gt_cv_locale_fr_utf8+y}
+then :
+ printf %s "(cached) " >&6
+else
+
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#include <locale.h>
+#include <time.h>
+#if HAVE_LANGINFO_CODESET
+# include <langinfo.h>
+#endif
+#include <stdlib.h>
+#include <string.h>
+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__)
+ /* Check whether the given locale name is recognized by the system. */
+# 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
+ category of the locale to "C". */
+ if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
+ || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
+ return 1;
+# else
+ if (setlocale (LC_ALL, "") == NULL) return 1;
+# 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.
+ On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
+ succeeds but then nl_langinfo(CODESET) is "646". In this situation,
+ some unit tests fail. */
+# if HAVE_LANGINFO_CODESET
+ {
+ const char *cs = nl_langinfo (CODESET);
+ if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0)
+ return 1;
+ }
+# 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
+ /* Check whether in the abbreviation of the second month, the second
+ character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is
+ two bytes long, with UTF-8 encoding. */
+ t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
+ if (strftime (buf, sizeof (buf), "%b", &t) < 4
+ || buf[1] != (char) 0xc3 || buf[2] != (char) 0xa9 || buf[3] != 'v')
+ return 1;
+#endif
+#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
+ return 0;
+}
+
+_ACEOF
+ if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; } && test -s conftest$ac_exeext; then
+ case "$host_os" in
+ # Handle native Windows specially, because there setlocale() interprets
+ # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
+ # "fr" or "fra" as "French" or "French_France.1252",
+ # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
+ # "ja" as "Japanese" or "Japanese_Japan.932",
+ # and similar.
+ mingw*)
+ # Test for the hypothetical native Windows locale name.
+ if (LC_ALL=French_France.65001 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+ gt_cv_locale_fr_utf8=French_France.65001
+ else
+ # None found.
+ gt_cv_locale_fr_utf8=none
+ fi
+ ;;
+ *)
+ # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
+ # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
+ # configure script would override the LC_ALL setting. Likewise for
+ # LC_CTYPE, which is also set at the beginning of the configure script.
+ # Test for the usual locale name.
+ if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+ gt_cv_locale_fr_utf8=fr_FR
+ else
+ # Test for the locale name with explicit encoding suffix.
+ if (LC_ALL=fr_FR.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+ gt_cv_locale_fr_utf8=fr_FR.UTF-8
+ else
+ # Test for the Solaris 7 locale name.
+ if (LC_ALL=fr.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+ gt_cv_locale_fr_utf8=fr.UTF-8
+ else
+ # None found.
+ gt_cv_locale_fr_utf8=none
+ fi
+ fi
+ fi
+ ;;
+ esac
+ fi
+ rm -fr conftest*
+
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr_utf8" >&5
+printf "%s\n" "$gt_cv_locale_fr_utf8" >&6; }
+ LOCALE_FR_UTF8=$gt_cv_locale_fr_utf8
+
+
+
+
+
+ { 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}
+then :
+ printf %s "(cached) " >&6
+else
+
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#include <locale.h>
+#include <time.h>
+#if HAVE_LANGINFO_CODESET
+# include <langinfo.h>
+#endif
+#include <stdlib.h>
+#include <string.h>
+struct tm t;
+char buf[16];
+int main () {
+ /* Check whether the given locale name is recognized by the system. */
+#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
+ category of the locale to "C". */
+ if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
+ || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
+ return 1;
+#else
+ if (setlocale (LC_ALL, "") == NULL) return 1;
+#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.
+ On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
+ succeeds but then nl_langinfo(CODESET) is "646". In this situation,
+ 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
+ {
+ 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__
+ /* 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
+ /* 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. */
+ /* 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
+ return 0;
+}
+
+_ACEOF
+ if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; } && test -s conftest$ac_exeext; then
+ case "$host_os" in
+ # Handle native Windows specially, because there setlocale() interprets
+ # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
+ # "fr" or "fra" as "French" or "French_France.1252",
+ # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
+ # "ja" as "Japanese" or "Japanese_Japan.932",
+ # and similar.
+ mingw*)
+ # Test for the native Windows locale name.
+ if (LC_ALL=French_France.1252 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+ gt_cv_locale_fr=French_France.1252
+ else
+ # None found.
+ gt_cv_locale_fr=none
+ fi
+ ;;
+ *)
+ # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
+ # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
+ # configure script would override the LC_ALL setting. Likewise for
+ # LC_CTYPE, which is also set at the beginning of the configure script.
+ # Test for the usual locale name.
+ if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+ gt_cv_locale_fr=fr_FR
+ else
+ # Test for the locale name with explicit encoding suffix.
+ if (LC_ALL=fr_FR.ISO-8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+ gt_cv_locale_fr=fr_FR.ISO-8859-1
+ else
+ # Test for the AIX, OSF/1, FreeBSD, NetBSD, OpenBSD locale name.
+ if (LC_ALL=fr_FR.ISO8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+ gt_cv_locale_fr=fr_FR.ISO8859-1
+ else
+ # Test for the HP-UX locale name.
+ if (LC_ALL=fr_FR.iso88591 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+ gt_cv_locale_fr=fr_FR.iso88591
+ else
+ # Test for the Solaris 7 locale name.
+ if (LC_ALL=fr LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+ gt_cv_locale_fr=fr
+ else
+ # None found.
+ gt_cv_locale_fr=none
+ fi
+ fi
+ fi
+ fi
+ fi
+ ;;
+ esac
+ fi
+ rm -fr conftest*
+
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr" >&5
+printf "%s\n" "$gt_cv_locale_fr" >&6; }
+ LOCALE_FR=$gt_cv_locale_fr
+
+
+
+
+
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a turkish Unicode locale" >&5
+printf %s "checking for a turkish Unicode locale... " >&6; }
+if test ${gt_cv_locale_tr_utf8+y}
+then :
+ printf %s "(cached) " >&6
+else
+
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#include <locale.h>
+#include <time.h>
+#if HAVE_LANGINFO_CODESET
+# include <langinfo.h>
+#endif
+#include <stdlib.h>
+#include <string.h>
+struct tm t;
+char buf[16];
+int main () {
+ /* On BeOS, 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. But BeOS does not
+ implement the Turkish upper-/lowercase mappings. Therefore, let this
+ program return 1 on BeOS. */
+ /* Check whether the given locale name is recognized by the system. */
+#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
+ category of the locale to "C". */
+ if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
+ || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
+ return 1;
+#else
+ if (setlocale (LC_ALL, "") == NULL) return 1;
+#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 tr_TR locale, nl_langinfo(CODESET)
+ is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
+ On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
+ succeeds but then nl_langinfo(CODESET) is "646". In this situation,
+ some unit tests fail. */
+#if HAVE_LANGINFO_CODESET
+ {
+ const char *cs = nl_langinfo (CODESET);
+ if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0)
+ return 1;
+ }
+#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
+ /* Check whether in the abbreviation of the eighth month, the second
+ character (should be U+011F: LATIN SMALL LETTER G WITH BREVE) is
+ two bytes long, with UTF-8 encoding. */
+ t.tm_year = 1992 - 1900; t.tm_mon = 8 - 1; t.tm_mday = 19;
+ if (strftime (buf, sizeof (buf), "%b", &t) < 4
+ || buf[1] != (char) 0xc4 || buf[2] != (char) 0x9f)
+ return 1;
+ /* Check whether the upper-/lowercase mappings are as expected for
+ Turkish. */
+ if (towupper ('i') != 0x0130 || towlower (0x0130) != 'i'
+ || towupper(0x0131) != 'I' || towlower ('I') != 0x0131)
+ return 1;
+ return 0;
+}
+
+_ACEOF
+ if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; } && test -s conftest$ac_exeext; then
+ case "$host_os" in
+ # Handle native Windows specially, because there setlocale() interprets
+ # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
+ # "fr" or "fra" as "French" or "French_France.1252",
+ # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
+ # "ja" as "Japanese" or "Japanese_Japan.932",
+ # and similar.
+ mingw*)
+ # Test for the hypothetical native Windows locale name.
+ if (LC_ALL=Turkish_Turkey.65001 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+ gt_cv_locale_tr_utf8=Turkish_Turkey.65001
+ else
+ # None found.
+ gt_cv_locale_tr_utf8=none
+ fi
+ ;;
+ *)
+ # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
+ # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
+ # configure script would override the LC_ALL setting. Likewise for
+ # LC_CTYPE, which is also set at the beginning of the configure script.
+ # Test for the usual locale name.
+ if (LC_ALL=tr_TR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+ gt_cv_locale_tr_utf8=tr_TR
+ else
+ # Test for the locale name with explicit encoding suffix.
+ if (LC_ALL=tr_TR.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+ gt_cv_locale_tr_utf8=tr_TR.UTF-8
+ else
+ # Test for the Solaris 7 locale name.
+ if (LC_ALL=tr.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+ gt_cv_locale_tr_utf8=tr.UTF-8
+ else
+ # None found.
+ gt_cv_locale_tr_utf8=none
+ fi
+ fi
+ fi
+ ;;
+ esac
+ else
+ gt_cv_locale_tr_utf8=none
+ fi
+ rm -fr conftest*
+
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_tr_utf8" >&5
+printf "%s\n" "$gt_cv_locale_tr_utf8" >&6; }
+ LOCALE_TR_UTF8=$gt_cv_locale_tr_utf8
+
+
+
+
+
+ if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then
+ REPLACE_CLOSE=1
+ 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
+
+
+ if test $UNISTD_H_HAVE_WINSOCK2_H = 1; then
+ REPLACE_CLOSE=1
+ fi
+
+
+
+ if test $REPLACE_CLOSE = 1; then
+
+
+
+
+
+
+
+
+ gltests_LIBOBJS="$gltests_LIBOBJS close.$ac_objext"
+
+ fi
+
+
+
+
+
+ if test "$GNULIB_CLOSE" != 1; then
+ if test "$GNULIB_CLOSE" = 0; then
+ GNULIB_CLOSE=$gl_module_indicator_condition
+ else
+ GNULIB_CLOSE="($GNULIB_CLOSE || $gl_module_indicator_condition)"
+ fi
+ fi
+
+
+
+
+
+printf "%s\n" "#define GNULIB_TEST_CLOSE 1" >>confdefs.h
+
+
+
+
+
+
+ ac_fn_c_check_func "$LINENO" "closedir" "ac_cv_func_closedir"
+if test "x$ac_cv_func_closedir" = xyes
+then :
+ printf "%s\n" "#define HAVE_CLOSEDIR 1" >>confdefs.h
+
+fi
+
+ if test $ac_cv_func_closedir = no; then
+ HAVE_CLOSEDIR=0
+ fi
+
+ case $host_os,$HAVE_CLOSEDIR in
+ os2*,1)
+ REPLACE_CLOSEDIR=1;;
+ esac
+
+ if test $HAVE_CLOSEDIR = 0 || test $REPLACE_CLOSEDIR = 1; then
+
+
+
+
+
+
+
+
+ gltests_LIBOBJS="$gltests_LIBOBJS closedir.$ac_objext"
+
+ fi
+
+
+
+
+
+ if test "$GNULIB_CLOSEDIR" != 1; then
+ if test "$GNULIB_CLOSEDIR" = 0; then
+ GNULIB_CLOSEDIR=$gl_module_indicator_condition
+ else
+ GNULIB_CLOSEDIR="($GNULIB_CLOSEDIR || $gl_module_indicator_condition)"
+ fi
+ fi
+
+
+
+
+
+printf "%s\n" "#define GNULIB_TEST_CLOSEDIR 1" >>confdefs.h
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ if test $gl_cv_have_include_next = yes; then
+ gl_cv_next_dirent_h='<'dirent.h'>'
+ else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <dirent.h>" >&5
+printf %s "checking absolute name of <dirent.h>... " >&6; }
+if test ${gl_cv_next_dirent_h+y}
+then :
+ printf %s "(cached) " >&6
+else
+
+ if test $ac_cv_header_dirent_h = yes; then
+
+
+
+
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <dirent.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 'dirent.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_dirent_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
+ sed -n "$gl_absolute_header_sed"`
+
+ gl_header=$gl_cv_absolute_dirent_h
+ gl_cv_next_dirent_h='"'$gl_header'"'
+ else
+ gl_cv_next_dirent_h='<'dirent.h'>'
+ fi
+
+
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_dirent_h" >&5
+printf "%s\n" "$gl_cv_next_dirent_h" >&6; }
+ fi
+ NEXT_DIRENT_H=$gl_cv_next_dirent_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='<'dirent.h'>'
+ else
+ # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
+ gl_next_as_first_directive=$gl_cv_next_dirent_h
+ fi
+ NEXT_AS_FIRST_DIRECTIVE_DIRENT_H=$gl_next_as_first_directive
+
+
+
+
+ if test $ac_cv_header_dirent_h = yes; then
+ HAVE_DIRENT_H=1
+ else
+ HAVE_DIRENT_H=0
+ fi
+
+
+
+ for gl_func in alphasort closedir dirfd fdopendir opendir readdir rewinddir scandir; 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 <dirent.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
+
+
+
+
+
+
+
+ ac_fn_c_check_func "$LINENO" "dirfd" "ac_cv_func_dirfd"
+if test "x$ac_cv_func_dirfd" = xyes
+then :
+ printf "%s\n" "#define HAVE_DIRFD 1" >>confdefs.h
+
+fi
+
+ ac_fn_c_check_decl "$LINENO" "dirfd" "ac_cv_have_decl_dirfd" "#include <sys/types.h>
+ #include <dirent.h>
+"
+if test "x$ac_cv_have_decl_dirfd" = xyes
+then :
+ ac_have_decl=1
+else
+ ac_have_decl=0
+fi
+
+printf "%s\n" "#define HAVE_DECL_DIRFD $ac_have_decl" >>confdefs.h
+
+ if test $ac_cv_have_decl_dirfd = no; then
+ HAVE_DECL_DIRFD=0
+ fi
+
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether dirfd is a macro" >&5
+printf %s "checking whether dirfd is a macro... " >&6; }
+if test ${gl_cv_func_dirfd_macro+y}
+then :
+ printf %s "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#include <sys/types.h>
+#include <dirent.h>
+#ifdef dirfd
+ dirent_header_defines_dirfd
+#endif
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ $EGREP "dirent_header_defines_dirfd" >/dev/null 2>&1
+then :
+ gl_cv_func_dirfd_macro=yes
+else
+ gl_cv_func_dirfd_macro=no
+fi
+rm -rf conftest*
+
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_dirfd_macro" >&5
+printf "%s\n" "$gl_cv_func_dirfd_macro" >&6; }
+
+ # Use the replacement if we have no function or macro with that name,
+ # or if OS/2 kLIBC whose dirfd() does not work.
+ # Replace only if the system declares dirfd already.
+ case $ac_cv_func_dirfd,$gl_cv_func_dirfd_macro,$host_os,$ac_cv_have_decl_dirfd in
+ no,no,*,yes | *,*,os2*,yes)
+ REPLACE_DIRFD=1
+
+printf "%s\n" "#define REPLACE_DIRFD 1" >>confdefs.h
+;;
+ esac
+
+ if test $ac_cv_func_dirfd = no && test $gl_cv_func_dirfd_macro = no \
+ || test $REPLACE_DIRFD = 1; then
+
+
+
+
+
+
+
+
+ gltests_LIBOBJS="$gltests_LIBOBJS dirfd.$ac_objext"
+
+
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to get the file descriptor associated with an open DIR*" >&5
+printf %s "checking how to get the file descriptor associated with an open DIR*... " >&6; }
+if test ${gl_cv_sys_dir_fd_member_name+y}
+then :
+ printf %s "(cached) " >&6
+else
+
+ dirfd_save_CFLAGS=$CFLAGS
+ for ac_expr in d_fd dd_fd; do
+
+ CFLAGS="$CFLAGS -DDIR_FD_MEMBER_NAME=$ac_expr"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+ #include <sys/types.h>
+ #include <dirent.h>
+int
+main (void)
+{
+DIR *dir_p = opendir("."); (void) dir_p->DIR_FD_MEMBER_NAME;
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"
+then :
+ dir_fd_found=yes
+
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ CFLAGS=$dirfd_save_CFLAGS
+ test "$dir_fd_found" = yes && break
+ done
+ test "$dir_fd_found" = yes || ac_expr=no_such_member
+
+ gl_cv_sys_dir_fd_member_name=$ac_expr
+
+
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_dir_fd_member_name" >&5
+printf "%s\n" "$gl_cv_sys_dir_fd_member_name" >&6; }
+ if test $gl_cv_sys_dir_fd_member_name != no_such_member; then
+
+printf "%s\n" "#define DIR_FD_MEMBER_NAME $gl_cv_sys_dir_fd_member_name" >>confdefs.h
+
+ fi
+
+
+ fi
+
+
+
+
+
+ if test "$GNULIB_DIRFD" != 1; then
+ if test "$GNULIB_DIRFD" = 0; then
+ GNULIB_DIRFD=$gl_module_indicator_condition
+ else
+ GNULIB_DIRFD="($GNULIB_DIRFD || $gl_module_indicator_condition)"
+ fi
+ fi
+
+
+
+
+
+printf "%s\n" "#define GNULIB_TEST_DIRFD 1" >>confdefs.h
+
+
+
+
+
+
+
+
+printf "%s\n" "#define HAVE_DUP2 1" >>confdefs.h
+
+
+ if test $HAVE_DUP2 = 1; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether dup2 works" >&5
+printf %s "checking whether dup2 works... " >&6; }
+if test ${gl_cv_func_dup2_works+y}
+then :
+ printf %s "(cached) " >&6
+else
+ if test "$cross_compiling" = yes
+then :
+ case "$host_os" in
+ mingw*) # on this platform, dup2 always returns 0 for success
+ gl_cv_func_dup2_works="guessing no" ;;
+ cygwin*) # on cygwin 1.5.x, dup2(1,1) returns 0
+ gl_cv_func_dup2_works="guessing no" ;;
+ aix* | freebsd*)
+ # on AIX 7.1 and FreeBSD 6.1, dup2 (1,toobig) gives EMFILE,
+ # not EBADF.
+ gl_cv_func_dup2_works="guessing no" ;;
+ haiku*) # on Haiku alpha 2, dup2(1, 1) resets FD_CLOEXEC.
+ gl_cv_func_dup2_works="guessing no" ;;
+ *-android*) # implemented using dup3(), which fails if oldfd == newfd
+ gl_cv_func_dup2_works="guessing no" ;;
+ os2*) # on OS/2 kLIBC, dup2() does not work on a directory fd.
+ gl_cv_func_dup2_works="guessing no" ;;
+ *) gl_cv_func_dup2_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;
+ #ifdef FD_CLOEXEC
+ if (fcntl (1, F_SETFD, FD_CLOEXEC) == -1)
+ result |= 1;
+ #endif
+ if (dup2 (1, 1) != 1)
+ result |= 2;
+ #ifdef FD_CLOEXEC
+ if (fcntl (1, F_GETFD) != FD_CLOEXEC)
+ result |= 4;
+ #endif
+ close (0);
+ if (dup2 (0, 0) != -1)
+ result |= 8;
+ /* Many gnulib modules require POSIX conformance of EBADF. */
+ if (dup2 (2, bad_fd) == -1 && errno != EBADF)
+ result |= 16;
+ /* Flush out some cygwin core dumps. */
+ if (dup2 (2, -1) != -1 || errno != EBADF)
+ result |= 32;
+ dup2 (2, 255);
+ dup2 (2, 256);
+ /* On OS/2 kLIBC, dup2() does not work on a directory fd. */
+ {
+ int fd = open (".", O_RDONLY);
+ if (fd == -1)
+ result |= 64;
+ else if (dup2 (fd, fd + 1) == -1)
+ result |= 128;
+
+ close (fd);
+ }
+ return result;
+ ;
+ return 0;
+}
+
+_ACEOF
+if ac_fn_c_try_run "$LINENO"
+then :
+ gl_cv_func_dup2_works=yes
+else
+ gl_cv_func_dup2_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_dup2_works" >&5
+printf "%s\n" "$gl_cv_func_dup2_works" >&6; }
+ case "$gl_cv_func_dup2_works" in
+ *yes) ;;
+ *)
+ REPLACE_DUP2=1
+ ac_fn_c_check_func "$LINENO" "setdtablesize" "ac_cv_func_setdtablesize"
+if test "x$ac_cv_func_setdtablesize" = xyes
+then :
+ printf "%s\n" "#define HAVE_SETDTABLESIZE 1" >>confdefs.h
+
+fi
+
+ ;;
+ esac
+ fi
+
+
+ if test $HAVE_DUP2 = 0 || test $REPLACE_DUP2 = 1; then
+
+
+
+
+
+
+
+
+ gltests_LIBOBJS="$gltests_LIBOBJS dup2.$ac_objext"
+
+
+ fi
+
+
+
+
+
+ if test "$GNULIB_DUP2" != 1; then
+ if test "$GNULIB_DUP2" = 0; then
+ GNULIB_DUP2=$gl_module_indicator_condition
+ else
+ GNULIB_DUP2="($GNULIB_DUP2 || $gl_module_indicator_condition)"
+ fi
+ fi
+
+
+
+
+
+printf "%s\n" "#define GNULIB_TEST_DUP2 1" >>confdefs.h
+
+
+
+
+
+
+
+
+
+ if test "$GNULIB_ENVIRON" != 1; then
+ if test "$GNULIB_ENVIRON" = 0; then
+ GNULIB_ENVIRON=$gl_module_indicator_condition
+ else
+ GNULIB_ENVIRON="($GNULIB_ENVIRON || $gl_module_indicator_condition)"
+ fi
+ fi
+
+
+
+
+
+printf "%s\n" "#define GNULIB_TEST_ENVIRON 1" >>confdefs.h
+
+
+
+
+
+
+ if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then
+ REPLACE_FDOPEN=1
+ else
+ { 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}
+then :
+ printf %s "(cached) " >&6
+else
+
+ if test "$cross_compiling" = yes
+then :
+ case "$host_os" in
+ mingw*) gl_cv_func_fdopen_works="guessing no" ;;
+ *) gl_cv_func_fdopen_works="guessing yes" ;;
+ esac
+
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#include <stdio.h>
+#include <errno.h>
+int
+main (void)
+{
+ FILE *fp;
+ errno = 0;
+ fp = fdopen (-1, "r");
+ if (fp == NULL && errno == 0)
+ return 1;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"
+then :
+ gl_cv_func_fdopen_works=yes
+else
+ gl_cv_func_fdopen_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_fdopen_works" >&5
+printf "%s\n" "$gl_cv_func_fdopen_works" >&6; }
+ case "$gl_cv_func_fdopen_works" in
+ *no) REPLACE_FDOPEN=1 ;;
+ esac
+ fi
+
+ if test $REPLACE_FDOPEN = 1; then
+
+
+
+
+
+
+
+
+ gltests_LIBOBJS="$gltests_LIBOBJS fdopen.$ac_objext"
+
+
+ fi
+
+
+
+
+
+ if test "$GNULIB_FDOPEN" != 1; then
+ if test "$GNULIB_FDOPEN" = 0; then
+ GNULIB_FDOPEN=$gl_module_indicator_condition
+ else
+ GNULIB_FDOPEN="($GNULIB_FDOPEN || $gl_module_indicator_condition)"
+ fi
+ fi
+
+
+
+
+
+printf "%s\n" "#define GNULIB_TEST_FDOPEN 1" >>confdefs.h
+
+
+
+
+
+
+
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether fflush works on input streams" >&5
+printf %s "checking whether fflush works on input streams... " >&6; }
+if test ${gl_cv_func_fflush_stdin+y}
+then :
+ printf %s "(cached) " >&6
+else
+ echo hello world > conftest.txt
+ if test "$cross_compiling" = yes
+then :
+ gl_cv_func_fflush_stdin=cross
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#include <stdio.h>
+#if HAVE_UNISTD_H
+# include <unistd.h>
+#else /* on Windows with MSVC */
+# include <io.h>
+#endif
+
+int
+main (void)
+{
+FILE *f = fopen ("conftest.txt", "r");
+ char buffer[10];
+ int fd;
+ int c;
+ if (f == NULL)
+ return 1;
+ fd = fileno (f);
+ if (fd < 0 || fread (buffer, 1, 5, f) != 5)
+ return 2;
+ /* For deterministic results, ensure f read a bigger buffer. */
+ if (lseek (fd, 0, SEEK_CUR) == 5)
+ 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;
+ if (lseek (fd, 0, SEEK_CUR) != 5)
+ 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
+ mingw. */
+ c = fgetc (f);
+ ungetc (c, f);
+ fflush (f);
+ if (fgetc (f) != c)
+ 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;
+ return 0;
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"
+then :
+ gl_cv_func_fflush_stdin=yes
+else
+ gl_cv_func_fflush_stdin=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+ rm conftest.txt
+
+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)' ;;
+ 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
+
+ if test $REPLACE_FFLUSH = 1; then
+
+
+
+
+
+
+
+
+ gltests_LIBOBJS="$gltests_LIBOBJS fflush.$ac_objext"
+
+ :
+ fi
+
+
+printf "%s\n" "#define GNULIB_FFLUSH $gl_module_indicator_condition" >>confdefs.h
+
+
+
+
+
+
+
+ if test "$GNULIB_FFLUSH" != 1; then
+ if test "$GNULIB_FFLUSH" = 0; then
+ GNULIB_FFLUSH=$gl_module_indicator_condition
+ else
+ GNULIB_FFLUSH="($GNULIB_FFLUSH || $gl_module_indicator_condition)"
+ fi
+ fi
+
+
+
+
+
+printf "%s\n" "#define GNULIB_TEST_FFLUSH 1" >>confdefs.h
+
+
+
+
+
+ if test "$enable_acl" != no; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for getxattr with XATTR_NAME_POSIX_ACL macros" >&5
+printf %s "checking for getxattr with XATTR_NAME_POSIX_ACL macros... " >&6; }
+if test ${gl_cv_getxattr_with_posix_acls+y}
+then :
+ printf %s "(cached) " >&6
+else
+ gl_cv_getxattr_with_posix_acls=no
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <sys/types.h>
+ #include <sys/xattr.h>
+ #include <linux/xattr.h>
+
+int
+main (void)
+{
+ssize_t a = getxattr (".", XATTR_NAME_POSIX_ACL_ACCESS, 0, 0);
+ ssize_t b = getxattr (".", XATTR_NAME_POSIX_ACL_DEFAULT, 0, 0);
+ return a < 0 || b < 0;
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"
+then :
+ gl_cv_getxattr_with_posix_acls=yes
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_getxattr_with_posix_acls" >&5
+printf "%s\n" "$gl_cv_getxattr_with_posix_acls" >&6; }
+ fi
+ if test "$gl_cv_getxattr_with_posix_acls" = yes; then
+ LIB_HAS_ACL=
+
+printf "%s\n" "#define GETXATTR_WITH_POSIX_ACLS 1" >>confdefs.h
+
+ else
+ gl_need_lib_has_acl=1
+ LIB_HAS_ACL=$LIB_ACL
+ fi
+
+
+
+
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for flexible array member" >&5
+printf %s "checking for flexible array member... " >&6; }
+if test ${ac_cv_c_flexmember+y}
+then :
+ printf %s "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <stdlib.h>
+ #include <stdio.h>
+ #include <stddef.h>
+ struct s { int n; double d[]; };
+int
+main (void)
+{
+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->d[0] = 0.0;
+ return p->d != (double *) NULL;
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"
+then :
+ ac_cv_c_flexmember=yes
+else
+ ac_cv_c_flexmember=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_c_flexmember" >&5
+printf "%s\n" "$ac_cv_c_flexmember" >&6; }
+ if test $ac_cv_c_flexmember = yes; then
+
+printf "%s\n" "#define FLEXIBLE_ARRAY_MEMBER /**/" >>confdefs.h
+
+ else
+ printf "%s\n" "#define FLEXIBLE_ARRAY_MEMBER 1" >>confdefs.h
+
+ fi
+
+
+
+
+
+ ac_fn_c_check_decl "$LINENO" "fpurge" "ac_cv_have_decl_fpurge" "#include <stdio.h>
+"
+if test "x$ac_cv_have_decl_fpurge" = xyes
+then :
+ ac_have_decl=1
+else
+ ac_have_decl=0
+fi
+
+printf "%s\n" "#define HAVE_DECL_FPURGE $ac_have_decl" >>confdefs.h
+
+ if test "x$ac_cv_func_fpurge" = xyes; then
+ HAVE_FPURGE=1
+ # Detect BSD bug. Only cygwin 1.7 is known to be immune.
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether fpurge works" >&5
+printf %s "checking whether fpurge works... " >&6; }
+if test ${gl_cv_func_fpurge_works+y}
+then :
+ printf %s "(cached) " >&6
+else
+ if test "$cross_compiling" = yes
+then :
+ gl_cv_func_fpurge_works='guessing no'
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <stdio.h>
+
+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;
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"
+then :
+ gl_cv_func_fpurge_works=yes
+else
+ gl_cv_func_fpurge_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_fpurge_works" >&5
+printf "%s\n" "$gl_cv_func_fpurge_works" >&6; }
+ if test "x$gl_cv_func_fpurge_works" != xyes; then
+ REPLACE_FPURGE=1
+ fi
+ else
+ HAVE_FPURGE=0
+ fi
+ if test "x$ac_cv_have_decl_fpurge" = xno; then
+ HAVE_DECL_FPURGE=0
+ fi
+
+ if test $HAVE_FPURGE = 0 || test $REPLACE_FPURGE = 1; then
+
+
+
+
+
+
+
+
+ gltests_LIBOBJS="$gltests_LIBOBJS fpurge.$ac_objext"
+
+ fi
+
+
+
+
+
+ if test "$GNULIB_FPURGE" != 1; then
+ if test "$GNULIB_FPURGE" = 0; then
+ GNULIB_FPURGE=$gl_module_indicator_condition
+ else
+ GNULIB_FPURGE="($GNULIB_FPURGE || $gl_module_indicator_condition)"
+ fi
+ fi
+
+
+
+
+
+printf "%s\n" "#define GNULIB_TEST_FPURGE 1" >>confdefs.h
+
+
+
+
+
+
+
+
+
+ if test $HAVE_FSEEKO = 0 || test $REPLACE_FSEEKO = 1; then
+ REPLACE_FSEEK=1
+ fi
+
+ if test $REPLACE_FSEEK = 1; then
+
+
+
+
+
+
+
+
+ gltests_LIBOBJS="$gltests_LIBOBJS fseek.$ac_objext"
+
+ fi
+
+
+
+
+
+ if test "$GNULIB_FSEEK" != 1; then
+ if test "$GNULIB_FSEEK" = 0; then
+ GNULIB_FSEEK=$gl_module_indicator_condition
+ else
+ GNULIB_FSEEK="($GNULIB_FSEEK || $gl_module_indicator_condition)"
+ fi
+ fi
+
+
+
+
+
+printf "%s\n" "#define GNULIB_TEST_FSEEK 1" >>confdefs.h
+
+
+
+
+
+
+
+
+
+
+
+
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for fseeko" >&5
+printf %s "checking for fseeko... " >&6; }
+if test ${gl_cv_func_fseeko+y}
+then :
+ printf %s "(cached) " >&6
+else
+
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <stdio.h>
+
+int
+main (void)
+{
+fseeko (stdin, 0, 0);
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"
+then :
+ gl_cv_func_fseeko=yes
+else
+ gl_cv_func_fseeko=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fseeko" >&5
+printf "%s\n" "$gl_cv_func_fseeko" >&6; }
+
+
+ if test $ac_cv_have_decl_fseeko = no; then
+ HAVE_DECL_FSEEKO=0
+ fi
+
+ if test $gl_cv_func_fseeko = no; then
+ HAVE_FSEEKO=0
+ else
+ if test $WINDOWS_64_BIT_OFF_T = 1; then
+ REPLACE_FSEEKO=1
+ fi
+ if test $gl_cv_var_stdin_large_offset = no; then
+ REPLACE_FSEEKO=1
+ fi
+
+
+
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether fflush works on input streams" >&5
+printf %s "checking whether fflush works on input streams... " >&6; }
+if test ${gl_cv_func_fflush_stdin+y}
+then :
+ printf %s "(cached) " >&6
+else
+ echo hello world > conftest.txt
+ if test "$cross_compiling" = yes
+then :
+ gl_cv_func_fflush_stdin=cross
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#include <stdio.h>
+#if HAVE_UNISTD_H
+# include <unistd.h>
+#else /* on Windows with MSVC */
+# include <io.h>
+#endif
+
+int
+main (void)
+{
+FILE *f = fopen ("conftest.txt", "r");
+ char buffer[10];
+ int fd;
+ int c;
+ if (f == NULL)
+ return 1;
+ fd = fileno (f);
+ if (fd < 0 || fread (buffer, 1, 5, f) != 5)
+ return 2;
+ /* For deterministic results, ensure f read a bigger buffer. */
+ if (lseek (fd, 0, SEEK_CUR) == 5)
+ 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;
+ if (lseek (fd, 0, SEEK_CUR) != 5)
+ 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
+ mingw. */
+ c = fgetc (f);
+ ungetc (c, f);
+ fflush (f);
+ if (fgetc (f) != c)
+ 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;
+ return 0;
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"
+then :
+ gl_cv_func_fflush_stdin=yes
+else
+ gl_cv_func_fflush_stdin=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+ rm conftest.txt
+
+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)' ;;
+ 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
+
+ fi
+
+ if test $HAVE_FSEEKO = 0 || test $REPLACE_FSEEKO = 1; then
+
+
+
+
+
+
+
+
+ gltests_LIBOBJS="$gltests_LIBOBJS fseeko.$ac_objext"
+
+
+ ac_fn_c_check_func "$LINENO" "_fseeki64" "ac_cv_func__fseeki64"
+if test "x$ac_cv_func__fseeki64" = xyes
+then :
+ printf "%s\n" "#define HAVE__FSEEKI64 1" >>confdefs.h
+
+fi
+
+
+ fi
+
+
+
+
+
+ if test "$GNULIB_FSEEKO" != 1; then
+ if test "$GNULIB_FSEEKO" = 0; then
+ GNULIB_FSEEKO=$gl_module_indicator_condition
+ else
+ GNULIB_FSEEKO="($GNULIB_FSEEKO || $gl_module_indicator_condition)"
+ fi
+ fi
+
+
+
+
+
+printf "%s\n" "#define GNULIB_TEST_FSEEKO 1" >>confdefs.h
+
+
+
+
+
+
+
+ if test $HAVE_FTELLO = 0 || test $REPLACE_FTELLO = 1; then
+ REPLACE_FTELL=1
+ fi
+
+ if test $REPLACE_FTELL = 1; then
+
+
+
+
+
+
+
+
+ gltests_LIBOBJS="$gltests_LIBOBJS ftell.$ac_objext"
+
+ fi
+
+
+
+
+
+ if test "$GNULIB_FTELL" != 1; then
+ if test "$GNULIB_FTELL" = 0; then
+ GNULIB_FTELL=$gl_module_indicator_condition
+ else
+ GNULIB_FTELL="($GNULIB_FTELL || $gl_module_indicator_condition)"
+ fi
+ fi
+
+
+
+
+
+printf "%s\n" "#define GNULIB_TEST_FTELL 1" >>confdefs.h
+
+
+
+
+
+
+
+
+
+
+
+
+
+ if test $ac_cv_have_decl_ftello = no; then
+ HAVE_DECL_FTELLO=0
+ fi
+
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ftello" >&5
+printf %s "checking for ftello... " >&6; }
+if test ${gl_cv_func_ftello+y}
+then :
+ printf %s "(cached) " >&6
+else
+
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <stdio.h>
+int
+main (void)
+{
+ftello (stdin);
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"
+then :
+ gl_cv_func_ftello=yes
+else
+ gl_cv_func_ftello=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_ftello" >&5
+printf "%s\n" "$gl_cv_func_ftello" >&6; }
+ if test $gl_cv_func_ftello = no; then
+ HAVE_FTELLO=0
+ else
+ if test $WINDOWS_64_BIT_OFF_T = 1; then
+ REPLACE_FTELLO=1
+ fi
+ if test $gl_cv_var_stdin_large_offset = no; then
+ REPLACE_FTELLO=1
+ fi
+ if test $REPLACE_FTELLO = 0; then
+
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether ftello works" >&5
+printf %s "checking whether ftello works... " >&6; }
+if test ${gl_cv_func_ftello_works+y}
+then :
+ printf %s "(cached) " >&6
+else
+
+ case "$host_os" in
+ # Guess no on Solaris.
+ solaris*) gl_cv_func_ftello_works="guessing no" ;;
+ # Guess yes otherwise.
+ *) gl_cv_func_ftello_works="guessing yes" ;;
+ esac
+ if test "$cross_compiling" = yes
+then :
+ :
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#define TESTFILE "conftest.tmp"
+int
+main (void)
+{
+ FILE *fp;
+
+ /* Create a file with some contents. */
+ fp = fopen (TESTFILE, "w");
+ if (fp == NULL)
+ return 70;
+ if (fwrite ("foogarsh", 1, 8, fp) < 8)
+ return 71;
+ if (fclose (fp))
+ return 72;
+
+ /* The file's contents is now "foogarsh". */
+
+ /* Try writing after reading to EOF. */
+ fp = fopen (TESTFILE, "r+");
+ if (fp == NULL)
+ return 73;
+ if (fseek (fp, -1, SEEK_END))
+ return 74;
+ if (!(getc (fp) == 'h'))
+ return 1;
+ if (!(getc (fp) == EOF))
+ return 2;
+ if (!(ftell (fp) == 8))
+ return 3;
+ if (!(ftell (fp) == 8))
+ return 4;
+ if (!(putc ('!', fp) == '!'))
+ return 5;
+ if (!(ftell (fp) == 9))
+ return 6;
+ if (!(fclose (fp) == 0))
+ return 7;
+ fp = fopen (TESTFILE, "r");
+ if (fp == NULL)
+ return 75;
+ {
+ char buf[10];
+ if (!(fread (buf, 1, 10, fp) == 9))
+ return 10;
+ if (!(memcmp (buf, "foogarsh!", 9) == 0))
+ return 11;
+ }
+ if (!(fclose (fp) == 0))
+ return 12;
+
+ /* The file's contents is now "foogarsh!". */
+
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"
+then :
+ gl_cv_func_ftello_works=yes
+else
+ gl_cv_func_ftello_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_ftello_works" >&5
+printf "%s\n" "$gl_cv_func_ftello_works" >&6; }
+ case "$gl_cv_func_ftello_works" in
+ *yes) ;;
+ *)
+ REPLACE_FTELLO=1
+
+printf "%s\n" "#define FTELLO_BROKEN_AFTER_SWITCHING_FROM_READ_TO_WRITE 1" >>confdefs.h
+
+ ;;
+ esac
+ fi
+ fi
+
+ if test $HAVE_FTELLO = 0 || test $REPLACE_FTELLO = 1; then
+
+
+
+
+
+
+
+
+ gltests_LIBOBJS="$gltests_LIBOBJS ftello.$ac_objext"
+
+
+ ac_fn_c_check_func "$LINENO" "_ftelli64" "ac_cv_func__ftelli64"
+if test "x$ac_cv_func__ftelli64" = xyes
+then :
+ printf "%s\n" "#define HAVE__FTELLI64 1" >>confdefs.h
+
+fi
+
+
+ fi
+
+
+
+
+
+ if test "$GNULIB_FTELLO" != 1; then
+ if test "$GNULIB_FTELLO" = 0; then
+ GNULIB_FTELLO=$gl_module_indicator_condition
+ else
+ GNULIB_FTELLO="($GNULIB_FTELLO || $gl_module_indicator_condition)"
+ fi
+ fi
+
+
+
+
+
+printf "%s\n" "#define GNULIB_TEST_FTELLO 1" >>confdefs.h
+
+
+
+
+
+
+
+
+
+ case $gl_cv_func_getcwd_null,$gl_cv_func_getcwd_posix_signature in
+ *yes,yes) ;;
+ *)
+ REPLACE_GETCWD=1
+ ;;
+ esac
+
+ if test $REPLACE_GETCWD = 1; then
+
+
+
+
+
+
+
+
+ gltests_LIBOBJS="$gltests_LIBOBJS getcwd-lgpl.$ac_objext"
+
+ fi
+
+
+
+
+
+ if test "$GNULIB_GETCWD" != 1; then
+ if test "$GNULIB_GETCWD" = 0; then
+ GNULIB_GETCWD=$gl_module_indicator_condition
+ else
+ GNULIB_GETCWD="($GNULIB_GETCWD || $gl_module_indicator_condition)"
+ fi
+ fi
+
+
+
+
+
+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
+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
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+ #include <unistd.h>
+int
+main (void)
+{
+int size = getdtablesize();
+ if (dup2 (0, getdtablesize()) != -1)
+ return 1;
+ if (size != getdtablesize())
+ return 2;
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"
+then :
+ gl_cv_func_getdtablesize_works=yes
+else
+ gl_cv_func_getdtablesize_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_getdtablesize_works" >&5
+printf "%s\n" "$gl_cv_func_getdtablesize_works" >&6; }
+ case "$gl_cv_func_getdtablesize_works" in
+ *yes) ;;
+ *) REPLACE_GETDTABLESIZE=1 ;;
+ esac
+ else
+ HAVE_GETDTABLESIZE=0
+ fi
+
+ if test $HAVE_GETDTABLESIZE = 0 || test $REPLACE_GETDTABLESIZE = 1; then
+
+
+
+
+
+
+
+
+ gltests_LIBOBJS="$gltests_LIBOBJS getdtablesize.$ac_objext"
+
+ :
+ fi
+
+
+
+
+
+ if test "$GNULIB_GETDTABLESIZE" != 1; then
+ if test "$GNULIB_GETDTABLESIZE" = 0; then
+ GNULIB_GETDTABLESIZE=$gl_module_indicator_condition
+ else
+ GNULIB_GETDTABLESIZE="($GNULIB_GETDTABLESIZE || $gl_module_indicator_condition)"
+ fi
+ fi
+
+
+
+
+
+printf "%s\n" "#define GNULIB_TEST_GETDTABLESIZE 1" >>confdefs.h
+
+
+
+
+
+
+ ac_fn_c_check_func "$LINENO" "getpagesize" "ac_cv_func_getpagesize"
+if test "x$ac_cv_func_getpagesize" = xyes
+then :
+ printf "%s\n" "#define HAVE_GETPAGESIZE 1" >>confdefs.h
+
+fi
+
+ if test $ac_cv_func_getpagesize = no; then
+ HAVE_GETPAGESIZE=0
+ ac_fn_c_check_header_compile "$LINENO" "OS.h" "ac_cv_header_OS_h" "$ac_includes_default"
+if test "x$ac_cv_header_OS_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_OS_H 1" >>confdefs.h
+
+fi
+
+ if test $ac_cv_header_OS_h = yes; then
+ HAVE_OS_H=1
+ fi
+ ac_fn_c_check_header_compile "$LINENO" "sys/param.h" "ac_cv_header_sys_param_h" "$ac_includes_default"
+if test "x$ac_cv_header_sys_param_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_SYS_PARAM_H 1" >>confdefs.h
+
+fi
+
+ if test $ac_cv_header_sys_param_h = yes; then
+ HAVE_SYS_PARAM_H=1
+ fi
+ fi
+ case "$host_os" in
+ mingw*)
+ REPLACE_GETPAGESIZE=1
+ ;;
+ esac
+ ac_fn_c_check_decl "$LINENO" "getpagesize" "ac_cv_have_decl_getpagesize" "$ac_includes_default"
+if test "x$ac_cv_have_decl_getpagesize" = xyes
+then :
+
+else
+ HAVE_DECL_GETPAGESIZE=0
+fi
+
+
+ if test $REPLACE_GETPAGESIZE = 1; then
+
+
+
+
+
+
+
+
+ gltests_LIBOBJS="$gltests_LIBOBJS getpagesize.$ac_objext"
+
+ fi
+
+
+
+
+
+ if test "$GNULIB_GETPAGESIZE" != 1; then
+ if test "$GNULIB_GETPAGESIZE" = 0; then
+ GNULIB_GETPAGESIZE=$gl_module_indicator_condition
+ else
+ GNULIB_GETPAGESIZE="($GNULIB_GETPAGESIZE || $gl_module_indicator_condition)"
+ fi
+ fi
+
+
+
+
+
+printf "%s\n" "#define GNULIB_TEST_GETPAGESIZE 1" >>confdefs.h
+
+
+
+
+
+
+
+
+ PRIPTR_PREFIX=
+ if test -n "$STDINT_H"; then
+ PRIPTR_PREFIX='"l"'
+ else
+ for glpfx in '' l ll I64; do
+ case $glpfx in
+ '') gltype1='int';;
+ l) gltype1='long int';;
+ ll) gltype1='long long int';;
+ I64) gltype1='__int64';;
+ esac
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <stdint.h>
+ extern intptr_t foo;
+ extern $gltype1 foo;
+int
+main (void)
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"
+then :
+ PRIPTR_PREFIX='"'$glpfx'"'
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ test -n "$PRIPTR_PREFIX" && break
+ done
+ fi
+
+
+
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether INT32_MAX < INTMAX_MAX" >&5
+printf %s "checking whether INT32_MAX < INTMAX_MAX... " >&6; }
+if test ${gl_cv_test_INT32_MAX_LT_INTMAX_MAX+y}
+then :
+ printf %s "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+/* Work also in C++ mode. */
+ #define __STDC_LIMIT_MACROS 1
+
+ /* Work if build is not clean. */
+ #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H
+
+ #include <limits.h>
+ #if HAVE_STDINT_H
+ #include <stdint.h>
+ #endif
+
+ #if defined INT32_MAX && defined INTMAX_MAX
+ #define CONDITION (INT32_MAX < INTMAX_MAX)
+ #elif HAVE_LONG_LONG_INT
+ #define CONDITION (sizeof (int) < sizeof (long long int))
+ #else
+ #define CONDITION 0
+ #endif
+ int test[CONDITION ? 1 : -1];
+int
+main (void)
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"
+then :
+ gl_cv_test_INT32_MAX_LT_INTMAX_MAX=yes
+else
+ gl_cv_test_INT32_MAX_LT_INTMAX_MAX=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_test_INT32_MAX_LT_INTMAX_MAX" >&5
+printf "%s\n" "$gl_cv_test_INT32_MAX_LT_INTMAX_MAX" >&6; }
+ if test $gl_cv_test_INT32_MAX_LT_INTMAX_MAX = yes; then
+ INT32_MAX_LT_INTMAX_MAX=1;
+ else
+ INT32_MAX_LT_INTMAX_MAX=0;
+ fi
+
+
+ if test $APPLE_UNIVERSAL_BUILD = 0; then
+
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether INT64_MAX == LONG_MAX" >&5
+printf %s "checking whether INT64_MAX == LONG_MAX... " >&6; }
+if test ${gl_cv_test_INT64_MAX_EQ_LONG_MAX+y}
+then :
+ printf %s "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+/* Work also in C++ mode. */
+ #define __STDC_LIMIT_MACROS 1
+
+ /* Work if build is not clean. */
+ #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H
+
+ #include <limits.h>
+ #if HAVE_STDINT_H
+ #include <stdint.h>
+ #endif
+
+ #if defined INT64_MAX
+ #define CONDITION (INT64_MAX == LONG_MAX)
+ #elif HAVE_LONG_LONG_INT
+ #define CONDITION (sizeof (long long int) == sizeof (long int))
+ #else
+ #define CONDITION 0
+ #endif
+ int test[CONDITION ? 1 : -1];
+int
+main (void)
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"
+then :
+ gl_cv_test_INT64_MAX_EQ_LONG_MAX=yes
+else
+ gl_cv_test_INT64_MAX_EQ_LONG_MAX=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_test_INT64_MAX_EQ_LONG_MAX" >&5
+printf "%s\n" "$gl_cv_test_INT64_MAX_EQ_LONG_MAX" >&6; }
+ if test $gl_cv_test_INT64_MAX_EQ_LONG_MAX = yes; then
+ INT64_MAX_EQ_LONG_MAX=1;
+ else
+ INT64_MAX_EQ_LONG_MAX=0;
+ fi
+
+
+ else
+ INT64_MAX_EQ_LONG_MAX=-1
+ fi
+
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether UINT32_MAX < UINTMAX_MAX" >&5
+printf %s "checking whether UINT32_MAX < UINTMAX_MAX... " >&6; }
+if test ${gl_cv_test_UINT32_MAX_LT_UINTMAX_MAX+y}
+then :
+ printf %s "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+/* Work also in C++ mode. */
+ #define __STDC_LIMIT_MACROS 1
+
+ /* Work if build is not clean. */
+ #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H
+
+ #include <limits.h>
+ #if HAVE_STDINT_H
+ #include <stdint.h>
+ #endif
+
+ #if defined UINT32_MAX && defined UINTMAX_MAX
+ #define CONDITION (UINT32_MAX < UINTMAX_MAX)
+ #elif HAVE_LONG_LONG_INT
+ #define CONDITION (sizeof (unsigned int) < sizeof (unsigned long long int))
+ #else
+ #define CONDITION 0
+ #endif
+ int test[CONDITION ? 1 : -1];
+int
+main (void)
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"
+then :
+ gl_cv_test_UINT32_MAX_LT_UINTMAX_MAX=yes
+else
+ gl_cv_test_UINT32_MAX_LT_UINTMAX_MAX=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_test_UINT32_MAX_LT_UINTMAX_MAX" >&5
+printf "%s\n" "$gl_cv_test_UINT32_MAX_LT_UINTMAX_MAX" >&6; }
+ if test $gl_cv_test_UINT32_MAX_LT_UINTMAX_MAX = yes; then
+ UINT32_MAX_LT_UINTMAX_MAX=1;
+ else
+ UINT32_MAX_LT_UINTMAX_MAX=0;
+ fi
+
+
+ if test $APPLE_UNIVERSAL_BUILD = 0; then
+
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether UINT64_MAX == ULONG_MAX" >&5
+printf %s "checking whether UINT64_MAX == ULONG_MAX... " >&6; }
+if test ${gl_cv_test_UINT64_MAX_EQ_ULONG_MAX+y}
+then :
+ printf %s "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+/* Work also in C++ mode. */
+ #define __STDC_LIMIT_MACROS 1
+
+ /* Work if build is not clean. */
+ #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H
+
+ #include <limits.h>
+ #if HAVE_STDINT_H
+ #include <stdint.h>
+ #endif
+
+ #if defined UINT64_MAX
+ #define CONDITION (UINT64_MAX == ULONG_MAX)
+ #elif HAVE_LONG_LONG_INT
+ #define CONDITION (sizeof (unsigned long long int) == sizeof (unsigned long int))
+ #else
+ #define CONDITION 0
+ #endif
+ int test[CONDITION ? 1 : -1];
+int
+main (void)
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"
+then :
+ gl_cv_test_UINT64_MAX_EQ_ULONG_MAX=yes
+else
+ gl_cv_test_UINT64_MAX_EQ_ULONG_MAX=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_test_UINT64_MAX_EQ_ULONG_MAX" >&5
+printf "%s\n" "$gl_cv_test_UINT64_MAX_EQ_ULONG_MAX" >&6; }
+ if test $gl_cv_test_UINT64_MAX_EQ_ULONG_MAX = yes; then
+ UINT64_MAX_EQ_ULONG_MAX=1;
+ else
+ UINT64_MAX_EQ_ULONG_MAX=0;
+ fi
+
+
+ else
+ UINT64_MAX_EQ_ULONG_MAX=-1
+ fi
+
+
+
+
+
+
+ if test $ac_cv_func_link = no; then
+ HAVE_LINK=0
+ else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether link obeys POSIX" >&5
+printf %s "checking whether link obeys POSIX... " >&6; }
+if test ${gl_cv_func_link_works+y}
+then :
+ printf %s "(cached) " >&6
+else
+ touch conftest.a
+ # Assume that if we have lstat, we can also check symlinks.
+ if test $ac_cv_func_lstat = yes; then
+ ln -s conftest.a conftest.lnk
+ fi
+ 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" ;;
+ esac
+
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <unistd.h>
+ #include <stdio.h>
+
+int
+main (void)
+{
+int result = 0;
+ if (!link ("conftest.a", "conftest.b/"))
+ result |= 1;
+#if HAVE_LSTAT
+ if (!link ("conftest.lnk/", "conftest.b"))
+ result |= 2;
+ if (rename ("conftest.a", "conftest.b"))
+ result |= 4;
+ if (!link ("conftest.b", "conftest.lnk"))
+ result |= 8;
+#endif
+ return result;
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"
+then :
+ gl_cv_func_link_works=yes
+else
+ gl_cv_func_link_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
+
+ rm -f conftest.a conftest.b conftest.lnk
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_link_works" >&5
+printf "%s\n" "$gl_cv_func_link_works" >&6; }
+ case "$gl_cv_func_link_works" in
+ *yes) ;;
+ *)
+ REPLACE_LINK=1
+ ;;
+ esac
+ fi
+
+ if test $HAVE_LINK = 0 || test $REPLACE_LINK = 1; then
+
+
+
+
+
+
+
+
+ gltests_LIBOBJS="$gltests_LIBOBJS link.$ac_objext"
+
+ fi
+
+
+
+
+
+ if test "$GNULIB_LINK" != 1; then
+ if test "$GNULIB_LINK" = 0; then
+ GNULIB_LINK=$gl_module_indicator_condition
+ else
+ GNULIB_LINK="($GNULIB_LINK || $gl_module_indicator_condition)"
+ fi
+ fi
+
+
+
+
+
+printf "%s\n" "#define GNULIB_TEST_LINK 1" >>confdefs.h
+
+
+
+
+
+
+
+ ac_fn_c_check_func "$LINENO" "setlocale" "ac_cv_func_setlocale"
+if test "x$ac_cv_func_setlocale" = xyes
+then :
+ printf "%s\n" "#define HAVE_SETLOCALE 1" >>confdefs.h
+
+fi
+ac_fn_c_check_func "$LINENO" "uselocale" "ac_cv_func_uselocale"
+if test "x$ac_cv_func_uselocale" = xyes
+then :
+ printf "%s\n" "#define HAVE_USELOCALE 1" >>confdefs.h
+
+fi
+
+ if test $ac_cv_func_uselocale = yes; then
+ ac_fn_c_check_func "$LINENO" "getlocalename_l" "ac_cv_func_getlocalename_l"
+if test "x$ac_cv_func_getlocalename_l" = xyes
+then :
+ printf "%s\n" "#define HAVE_GETLOCALENAME_L 1" >>confdefs.h
+
+fi
+
+ fi
+
+
+
+
+
+
+
+
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether lseek detects pipes" >&5
+printf %s "checking whether lseek detects pipes... " >&6; }
+if test ${gl_cv_func_lseek_pipe+y}
+then :
+ printf %s "(cached) " >&6
+else
+ case "$host_os" in
+ mingw*)
+ gl_cv_func_lseek_pipe=no
+ ;;
+ *)
+ if test $cross_compiling = no; then
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#include <sys/types.h> /* for off_t */
+#include <stdio.h> /* for SEEK_CUR */
+#if HAVE_UNISTD_H
+# include <unistd.h>
+#else /* on Windows with MSVC */
+# include <io.h>
+#endif
+
+int
+main (void)
+{
+
+ /* Exit with success only if stdin is seekable. */
+ return lseek (0, (off_t)0, SEEK_CUR) < 0;
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"
+then :
+ if test -s conftest$ac_exeext \
+ && ./conftest$ac_exeext < conftest.$ac_ext \
+ && test 1 = "`echo hi \
+ | { ./conftest$ac_exeext; echo $?; cat >/dev/null; }`"; then
+ gl_cv_func_lseek_pipe=yes
+ else
+ gl_cv_func_lseek_pipe=no
+ fi
+
+else
+ gl_cv_func_lseek_pipe=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+ else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#if defined __BEOS__
+/* BeOS mistakenly return 0 when trying to seek on pipes. */
+ Choke me.
+#endif
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"
+then :
+ gl_cv_func_lseek_pipe=yes
+else
+ gl_cv_func_lseek_pipe=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ fi
+ ;;
+ esac
+
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_lseek_pipe" >&5
+printf "%s\n" "$gl_cv_func_lseek_pipe" >&6; }
+ if test $gl_cv_func_lseek_pipe = no; then
+ REPLACE_LSEEK=1
+
+printf "%s\n" "#define LSEEK_PIPE_BROKEN 1" >>confdefs.h
+
+ fi
+
+
+ if test $WINDOWS_64_BIT_OFF_T = 1; then
+ REPLACE_LSEEK=1
+ fi
+
+ if test $REPLACE_LSEEK = 1; then
+
+
+
+
+
+
+
+
+ gltests_LIBOBJS="$gltests_LIBOBJS lseek.$ac_objext"
+
+ fi
+
+
+
+
+
+ if test "$GNULIB_LSEEK" != 1; then
+ if test "$GNULIB_LSEEK" = 0; then
+ GNULIB_LSEEK=$gl_module_indicator_condition
+ else
+ GNULIB_LSEEK="($GNULIB_LSEEK || $gl_module_indicator_condition)"
+ fi
+ fi
+
+
+
+
+
+printf "%s\n" "#define GNULIB_TEST_LSEEK 1" >>confdefs.h
+
+
+
+
+
+
+ { 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}
+then :
+ printf %s "(cached) " >&6
+else
+
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#include <locale.h>
+#include <time.h>
+#if HAVE_LANGINFO_CODESET
+# include <langinfo.h>
+#endif
+#include <stdlib.h>
+#include <string.h>
+struct tm t;
+char buf[16];
+int main () {
+ /* Check whether the given locale name is recognized by the system. */
+#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
+ category of the locale to "C". */
+ if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
+ || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
+ return 1;
+#else
+ if (setlocale (LC_ALL, "") == NULL) return 1;
+#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.
+ On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
+ succeeds but then nl_langinfo(CODESET) is "646". In this situation,
+ 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
+ {
+ 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__
+ /* 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
+ /* 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. */
+ /* 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
+ return 0;
+}
+
+_ACEOF
+ if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; } && test -s conftest$ac_exeext; then
+ case "$host_os" in
+ # Handle native Windows specially, because there setlocale() interprets
+ # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
+ # "fr" or "fra" as "French" or "French_France.1252",
+ # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
+ # "ja" as "Japanese" or "Japanese_Japan.932",
+ # and similar.
+ mingw*)
+ # Test for the native Windows locale name.
+ if (LC_ALL=French_France.1252 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+ gt_cv_locale_fr=French_France.1252
+ else
+ # None found.
+ gt_cv_locale_fr=none
+ fi
+ ;;
+ *)
+ # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
+ # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
+ # configure script would override the LC_ALL setting. Likewise for
+ # LC_CTYPE, which is also set at the beginning of the configure script.
+ # Test for the usual locale name.
+ if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+ gt_cv_locale_fr=fr_FR
+ else
+ # Test for the locale name with explicit encoding suffix.
+ if (LC_ALL=fr_FR.ISO-8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+ gt_cv_locale_fr=fr_FR.ISO-8859-1
+ else
+ # Test for the AIX, OSF/1, FreeBSD, NetBSD, OpenBSD locale name.
+ if (LC_ALL=fr_FR.ISO8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+ gt_cv_locale_fr=fr_FR.ISO8859-1
+ else
+ # Test for the HP-UX locale name.
+ if (LC_ALL=fr_FR.iso88591 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+ gt_cv_locale_fr=fr_FR.iso88591
+ else
+ # Test for the Solaris 7 locale name.
+ if (LC_ALL=fr LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+ gt_cv_locale_fr=fr
+ else
+ # None found.
+ gt_cv_locale_fr=none
+ fi
+ fi
+ fi
+ fi
+ fi
+ ;;
+ esac
+ fi
+ rm -fr conftest*
+
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr" >&5
+printf "%s\n" "$gt_cv_locale_fr" >&6; }
+ LOCALE_FR=$gt_cv_locale_fr
+
+
+
+
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a french Unicode locale" >&5
+printf %s "checking for a french Unicode locale... " >&6; }
+if test ${gt_cv_locale_fr_utf8+y}
+then :
+ printf %s "(cached) " >&6
+else
+
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#include <locale.h>
+#include <time.h>
+#if HAVE_LANGINFO_CODESET
+# include <langinfo.h>
+#endif
+#include <stdlib.h>
+#include <string.h>
+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__)
+ /* Check whether the given locale name is recognized by the system. */
+# 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
+ category of the locale to "C". */
+ if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
+ || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
+ return 1;
+# else
+ if (setlocale (LC_ALL, "") == NULL) return 1;
+# 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.
+ On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
+ succeeds but then nl_langinfo(CODESET) is "646". In this situation,
+ some unit tests fail. */
+# if HAVE_LANGINFO_CODESET
+ {
+ const char *cs = nl_langinfo (CODESET);
+ if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0)
+ return 1;
+ }
+# 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
+ /* Check whether in the abbreviation of the second month, the second
+ character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is
+ two bytes long, with UTF-8 encoding. */
+ t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
+ if (strftime (buf, sizeof (buf), "%b", &t) < 4
+ || buf[1] != (char) 0xc3 || buf[2] != (char) 0xa9 || buf[3] != 'v')
+ return 1;
+#endif
+#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
+ return 0;
+}
+
+_ACEOF
+ if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; } && test -s conftest$ac_exeext; then
+ case "$host_os" in
+ # Handle native Windows specially, because there setlocale() interprets
+ # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
+ # "fr" or "fra" as "French" or "French_France.1252",
+ # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
+ # "ja" as "Japanese" or "Japanese_Japan.932",
+ # and similar.
+ mingw*)
+ # Test for the hypothetical native Windows locale name.
+ if (LC_ALL=French_France.65001 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+ gt_cv_locale_fr_utf8=French_France.65001
+ else
+ # None found.
+ gt_cv_locale_fr_utf8=none
+ fi
+ ;;
+ *)
+ # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
+ # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
+ # configure script would override the LC_ALL setting. Likewise for
+ # LC_CTYPE, which is also set at the beginning of the configure script.
+ # Test for the usual locale name.
+ if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+ gt_cv_locale_fr_utf8=fr_FR
+ else
+ # Test for the locale name with explicit encoding suffix.
+ if (LC_ALL=fr_FR.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+ gt_cv_locale_fr_utf8=fr_FR.UTF-8
+ else
+ # Test for the Solaris 7 locale name.
+ if (LC_ALL=fr.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+ gt_cv_locale_fr_utf8=fr.UTF-8
+ else
+ # None found.
+ gt_cv_locale_fr_utf8=none
+ fi
+ fi
+ fi
+ ;;
+ esac
+ fi
+ rm -fr conftest*
+
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr_utf8" >&5
+printf "%s\n" "$gt_cv_locale_fr_utf8" >&6; }
+ LOCALE_FR_UTF8=$gt_cv_locale_fr_utf8
+
+
+
+
+
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a traditional japanese locale" >&5
+printf %s "checking for a traditional japanese locale... " >&6; }
+if test ${gt_cv_locale_ja+y}
+then :
+ printf %s "(cached) " >&6
+else
+
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#include <locale.h>
+#include <time.h>
+#if HAVE_LANGINFO_CODESET
+# include <langinfo.h>
+#endif
+#include <stdlib.h>
+#include <string.h>
+struct tm t;
+char buf[16];
+int main ()
+{
+ const char *p;
+ /* Check whether the given locale name is recognized by the system. */
+#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
+ category of the locale to "C". */
+ if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
+ || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
+ return 1;
+#else
+ if (setlocale (LC_ALL, "") == NULL) return 1;
+#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.
+ On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
+ succeeds but then nl_langinfo(CODESET) is "646". In this situation,
+ 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
+ {
+ 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__
+ /* 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
+ /* 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;
+ return 0;
+}
+
+_ACEOF
+ if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; } && test -s conftest$ac_exeext; then
+ case "$host_os" in
+ # Handle native Windows specially, because there setlocale() interprets
+ # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
+ # "fr" or "fra" as "French" or "French_France.1252",
+ # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
+ # "ja" as "Japanese" or "Japanese_Japan.932",
+ # and similar.
+ mingw*)
+ # Note that on native Windows, the Japanese locale is
+ # Japanese_Japan.932, and CP932 is very different from EUC-JP, so we
+ # cannot use it here.
+ gt_cv_locale_ja=none
+ ;;
+ *)
+ # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
+ # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
+ # configure script would override the LC_ALL setting. Likewise for
+ # LC_CTYPE, which is also set at the beginning of the configure script.
+ # Test for the AIX locale name.
+ if (LC_ALL=ja_JP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+ gt_cv_locale_ja=ja_JP
+ else
+ # Test for the locale name with explicit encoding suffix.
+ if (LC_ALL=ja_JP.EUC-JP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+ gt_cv_locale_ja=ja_JP.EUC-JP
+ else
+ # Test for the HP-UX, OSF/1, NetBSD locale name.
+ if (LC_ALL=ja_JP.eucJP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+ gt_cv_locale_ja=ja_JP.eucJP
+ else
+ # Test for the IRIX, FreeBSD locale name.
+ if (LC_ALL=ja_JP.EUC LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+ gt_cv_locale_ja=ja_JP.EUC
+ else
+ # Test for the Solaris 7 locale name.
+ if (LC_ALL=ja LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+ gt_cv_locale_ja=ja
+ else
+ # Special test for NetBSD 1.6.
+ if test -f /usr/share/locale/ja_JP.eucJP/LC_CTYPE; then
+ gt_cv_locale_ja=ja_JP.eucJP
+ else
+ # None found.
+ gt_cv_locale_ja=none
+ fi
+ fi
+ fi
+ fi
+ fi
+ fi
+ ;;
+ esac
+ fi
+ rm -fr conftest*
+
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_ja" >&5
+printf "%s\n" "$gt_cv_locale_ja" >&6; }
+ LOCALE_JA=$gt_cv_locale_ja
+
+
+
+
+
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a transitional chinese locale" >&5
+printf %s "checking for a transitional chinese locale... " >&6; }
+if test ${gt_cv_locale_zh_CN+y}
+then :
+ printf %s "(cached) " >&6
+else
+
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#include <locale.h>
+#include <stdlib.h>
+#include <time.h>
+#if HAVE_LANGINFO_CODESET
+# include <langinfo.h>
+#endif
+#include <stdlib.h>
+#include <string.h>
+struct tm t;
+char buf[16];
+int main ()
+{
+ const char *p;
+ /* Check whether the given locale name is recognized by the system. */
+#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
+ category of the locale to "C". */
+ if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
+ || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
+ return 1;
+#else
+ if (setlocale (LC_ALL, "") == NULL) return 1;
+#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.
+ On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
+ succeeds but then nl_langinfo(CODESET) is "646". In this situation,
+ 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
+ {
+ 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__
+ /* 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
+ /* 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;
+ /* 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;
+}
+
+_ACEOF
+ if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; } && test -s conftest$ac_exeext; then
+ case "$host_os" in
+ # Handle native Windows specially, because there setlocale() interprets
+ # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
+ # "fr" or "fra" as "French" or "French_France.1252",
+ # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
+ # "ja" as "Japanese" or "Japanese_Japan.932",
+ # and similar.
+ mingw*)
+ # Test for the hypothetical native Windows locale name.
+ if (LC_ALL=Chinese_China.54936 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+ gt_cv_locale_zh_CN=Chinese_China.54936
+ else
+ # None found.
+ gt_cv_locale_zh_CN=none
+ fi
+ ;;
+ solaris2.8)
+ # On Solaris 8, the locales zh_CN.GB18030, zh_CN.GBK, zh.GBK are
+ # broken. One witness is the test case in gl_MBRTOWC_SANITYCHECK.
+ # Another witness is that "LC_ALL=zh_CN.GB18030 bash -c true" dumps core.
+ gt_cv_locale_zh_CN=none
+ ;;
+ *)
+ # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
+ # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
+ # configure script would override the LC_ALL setting. Likewise for
+ # LC_CTYPE, which is also set at the beginning of the configure script.
+ # Test for the locale name without encoding suffix.
+ if (LC_ALL=zh_CN LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+ gt_cv_locale_zh_CN=zh_CN
+ else
+ # Test for the locale name with explicit encoding suffix.
+ if (LC_ALL=zh_CN.GB18030 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+ gt_cv_locale_zh_CN=zh_CN.GB18030
+ else
+ # None found.
+ gt_cv_locale_zh_CN=none
+ fi
+ fi
+ ;;
+ esac
+ else
+ # If there was a link error, due to mblen(), the system is so old that
+ # it certainly doesn't have a chinese locale.
+ gt_cv_locale_zh_CN=none
+ fi
+ rm -fr conftest*
+
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_zh_CN" >&5
+printf "%s\n" "$gt_cv_locale_zh_CN" >&6; }
+ LOCALE_ZH_CN=$gt_cv_locale_zh_CN
+
+
+
+
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a french Unicode locale" >&5
+printf %s "checking for a french Unicode locale... " >&6; }
+if test ${gt_cv_locale_fr_utf8+y}
+then :
+ printf %s "(cached) " >&6
+else
+
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#include <locale.h>
+#include <time.h>
+#if HAVE_LANGINFO_CODESET
+# include <langinfo.h>
+#endif
+#include <stdlib.h>
+#include <string.h>
+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__)
+ /* Check whether the given locale name is recognized by the system. */
+# 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
+ category of the locale to "C". */
+ if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
+ || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
+ return 1;
+# else
+ if (setlocale (LC_ALL, "") == NULL) return 1;
+# 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.
+ On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
+ succeeds but then nl_langinfo(CODESET) is "646". In this situation,
+ some unit tests fail. */
+# if HAVE_LANGINFO_CODESET
+ {
+ const char *cs = nl_langinfo (CODESET);
+ if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0)
+ return 1;
+ }
+# 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
+ /* Check whether in the abbreviation of the second month, the second
+ character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is
+ two bytes long, with UTF-8 encoding. */
+ t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
+ if (strftime (buf, sizeof (buf), "%b", &t) < 4
+ || buf[1] != (char) 0xc3 || buf[2] != (char) 0xa9 || buf[3] != 'v')
+ return 1;
+#endif
+#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
+ return 0;
+}
+
+_ACEOF
+ if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; } && test -s conftest$ac_exeext; then
+ case "$host_os" in
+ # Handle native Windows specially, because there setlocale() interprets
+ # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
+ # "fr" or "fra" as "French" or "French_France.1252",
+ # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
+ # "ja" as "Japanese" or "Japanese_Japan.932",
+ # and similar.
+ mingw*)
+ # Test for the hypothetical native Windows locale name.
+ if (LC_ALL=French_France.65001 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+ gt_cv_locale_fr_utf8=French_France.65001
+ else
+ # None found.
+ gt_cv_locale_fr_utf8=none
+ fi
+ ;;
+ *)
+ # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
+ # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
+ # configure script would override the LC_ALL setting. Likewise for
+ # LC_CTYPE, which is also set at the beginning of the configure script.
+ # Test for the usual locale name.
+ if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+ gt_cv_locale_fr_utf8=fr_FR
+ else
+ # Test for the locale name with explicit encoding suffix.
+ if (LC_ALL=fr_FR.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+ gt_cv_locale_fr_utf8=fr_FR.UTF-8
+ else
+ # Test for the Solaris 7 locale name.
+ if (LC_ALL=fr.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+ gt_cv_locale_fr_utf8=fr.UTF-8
+ else
+ # None found.
+ gt_cv_locale_fr_utf8=none
+ fi
+ fi
+ fi
+ ;;
+ esac
+ fi
+ rm -fr conftest*
+
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr_utf8" >&5
+printf "%s\n" "$gt_cv_locale_fr_utf8" >&6; }
+ LOCALE_FR_UTF8=$gt_cv_locale_fr_utf8
+
+
+
+
+
+ # 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.
+ ac_fn_c_check_func "$LINENO" "mmap" "ac_cv_func_mmap"
+if test "x$ac_cv_func_mmap" = xyes
+then :
+ gl_have_mmap=yes
+else
+ gl_have_mmap=no
+fi
+
+
+ # Try to allow MAP_ANONYMOUS.
+ gl_have_mmap_anonymous=no
+ if test $gl_have_mmap = yes; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for MAP_ANONYMOUS" >&5
+printf %s "checking for MAP_ANONYMOUS... " >&6; }
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#include <sys/mman.h>
+#ifdef MAP_ANONYMOUS
+ I cannot identify this map
+#endif
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ $EGREP "I cannot identify this map" >/dev/null 2>&1
+then :
+ gl_have_mmap_anonymous=yes
+fi
+rm -rf conftest*
+
+ if test $gl_have_mmap_anonymous != yes; then
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#include <sys/mman.h>
+#ifdef MAP_ANON
+ I cannot identify this map
+#endif
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ $EGREP "I cannot identify this map" >/dev/null 2>&1
+then :
+
+printf "%s\n" "#define MAP_ANONYMOUS MAP_ANON" >>confdefs.h
+
+ gl_have_mmap_anonymous=yes
+fi
+rm -rf conftest*
+
+ fi
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_have_mmap_anonymous" >&5
+printf "%s\n" "$gl_have_mmap_anonymous" >&6; }
+ if test $gl_have_mmap_anonymous = yes; then
+
+printf "%s\n" "#define HAVE_MAP_ANONYMOUS 1" >>confdefs.h
+
+ fi
+ fi
+
+
+
+
+
+
+ # 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.
+ ac_fn_c_check_func "$LINENO" "mmap" "ac_cv_func_mmap"
+if test "x$ac_cv_func_mmap" = xyes
+then :
+ gl_have_mmap=yes
+else
+ gl_have_mmap=no
+fi
+
+
+ # Try to allow MAP_ANONYMOUS.
+ gl_have_mmap_anonymous=no
+ if test $gl_have_mmap = yes; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for MAP_ANONYMOUS" >&5
+printf %s "checking for MAP_ANONYMOUS... " >&6; }
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#include <sys/mman.h>
+#ifdef MAP_ANONYMOUS
+ I cannot identify this map
+#endif
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ $EGREP "I cannot identify this map" >/dev/null 2>&1
+then :
+ gl_have_mmap_anonymous=yes
+fi
+rm -rf conftest*
+
+ if test $gl_have_mmap_anonymous != yes; then
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#include <sys/mman.h>
+#ifdef MAP_ANON
+ I cannot identify this map
+#endif
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ $EGREP "I cannot identify this map" >/dev/null 2>&1
+then :
+
+printf "%s\n" "#define MAP_ANONYMOUS MAP_ANON" >>confdefs.h
+
+ gl_have_mmap_anonymous=yes
+fi
+rm -rf conftest*
+
+ fi
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_have_mmap_anonymous" >&5
+printf "%s\n" "$gl_have_mmap_anonymous" >&6; }
+ if test $gl_have_mmap_anonymous = yes; then
+
+printf "%s\n" "#define HAVE_MAP_ANONYMOUS 1" >>confdefs.h
+
+ fi
+ 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}
+then :
+ printf %s "(cached) " >&6
+else
+
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#include <locale.h>
+#include <time.h>
+#if HAVE_LANGINFO_CODESET
+# include <langinfo.h>
+#endif
+#include <stdlib.h>
+#include <string.h>
+struct tm t;
+char buf[16];
+int main () {
+ /* Check whether the given locale name is recognized by the system. */
+#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
+ category of the locale to "C". */
+ if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
+ || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
+ return 1;
+#else
+ if (setlocale (LC_ALL, "") == NULL) return 1;
+#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.
+ On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
+ succeeds but then nl_langinfo(CODESET) is "646". In this situation,
+ 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
+ {
+ 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__
+ /* 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
+ /* 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. */
+ /* 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
+ return 0;
+}
+
+_ACEOF
+ if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; } && test -s conftest$ac_exeext; then
+ case "$host_os" in
+ # Handle native Windows specially, because there setlocale() interprets
+ # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
+ # "fr" or "fra" as "French" or "French_France.1252",
+ # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
+ # "ja" as "Japanese" or "Japanese_Japan.932",
+ # and similar.
+ mingw*)
+ # Test for the native Windows locale name.
+ if (LC_ALL=French_France.1252 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+ gt_cv_locale_fr=French_France.1252
+ else
+ # None found.
+ gt_cv_locale_fr=none
+ fi
+ ;;
+ *)
+ # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
+ # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
+ # configure script would override the LC_ALL setting. Likewise for
+ # LC_CTYPE, which is also set at the beginning of the configure script.
+ # Test for the usual locale name.
+ if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+ gt_cv_locale_fr=fr_FR
+ else
+ # Test for the locale name with explicit encoding suffix.
+ if (LC_ALL=fr_FR.ISO-8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+ gt_cv_locale_fr=fr_FR.ISO-8859-1
+ else
+ # Test for the AIX, OSF/1, FreeBSD, NetBSD, OpenBSD locale name.
+ if (LC_ALL=fr_FR.ISO8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+ gt_cv_locale_fr=fr_FR.ISO8859-1
+ else
+ # Test for the HP-UX locale name.
+ if (LC_ALL=fr_FR.iso88591 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+ gt_cv_locale_fr=fr_FR.iso88591
+ else
+ # Test for the Solaris 7 locale name.
+ if (LC_ALL=fr LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+ gt_cv_locale_fr=fr
+ else
+ # None found.
+ gt_cv_locale_fr=none
+ fi
+ fi
+ fi
+ fi
+ fi
+ ;;
+ esac
+ fi
+ rm -fr conftest*
+
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr" >&5
+printf "%s\n" "$gt_cv_locale_fr" >&6; }
+ LOCALE_FR=$gt_cv_locale_fr
+
+
+
+
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a french Unicode locale" >&5
+printf %s "checking for a french Unicode locale... " >&6; }
+if test ${gt_cv_locale_fr_utf8+y}
+then :
+ printf %s "(cached) " >&6
+else
+
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#include <locale.h>
+#include <time.h>
+#if HAVE_LANGINFO_CODESET
+# include <langinfo.h>
+#endif
+#include <stdlib.h>
+#include <string.h>
+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__)
+ /* Check whether the given locale name is recognized by the system. */
+# 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
+ category of the locale to "C". */
+ if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
+ || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
+ return 1;
+# else
+ if (setlocale (LC_ALL, "") == NULL) return 1;
+# 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.
+ On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
+ succeeds but then nl_langinfo(CODESET) is "646". In this situation,
+ some unit tests fail. */
+# if HAVE_LANGINFO_CODESET
+ {
+ const char *cs = nl_langinfo (CODESET);
+ if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0)
+ return 1;
+ }
+# 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
+ /* Check whether in the abbreviation of the second month, the second
+ character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is
+ two bytes long, with UTF-8 encoding. */
+ t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
+ if (strftime (buf, sizeof (buf), "%b", &t) < 4
+ || buf[1] != (char) 0xc3 || buf[2] != (char) 0xa9 || buf[3] != 'v')
+ return 1;
+#endif
+#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
+ return 0;
+}
+
+_ACEOF
+ if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; } && test -s conftest$ac_exeext; then
+ case "$host_os" in
+ # Handle native Windows specially, because there setlocale() interprets
+ # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
+ # "fr" or "fra" as "French" or "French_France.1252",
+ # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
+ # "ja" as "Japanese" or "Japanese_Japan.932",
+ # and similar.
+ mingw*)
+ # Test for the hypothetical native Windows locale name.
+ if (LC_ALL=French_France.65001 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+ gt_cv_locale_fr_utf8=French_France.65001
+ else
+ # None found.
+ gt_cv_locale_fr_utf8=none
+ fi
+ ;;
+ *)
+ # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
+ # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
+ # configure script would override the LC_ALL setting. Likewise for
+ # LC_CTYPE, which is also set at the beginning of the configure script.
+ # Test for the usual locale name.
+ if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+ gt_cv_locale_fr_utf8=fr_FR
+ else
+ # Test for the locale name with explicit encoding suffix.
+ if (LC_ALL=fr_FR.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+ gt_cv_locale_fr_utf8=fr_FR.UTF-8
+ else
+ # Test for the Solaris 7 locale name.
+ if (LC_ALL=fr.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+ gt_cv_locale_fr_utf8=fr.UTF-8
+ else
+ # None found.
+ gt_cv_locale_fr_utf8=none
+ fi
+ fi
+ fi
+ ;;
+ esac
+ fi
+ rm -fr conftest*
+
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr_utf8" >&5
+printf "%s\n" "$gt_cv_locale_fr_utf8" >&6; }
+ LOCALE_FR_UTF8=$gt_cv_locale_fr_utf8
+
+
+
+
+ case "$host_os" in
+ mingw* | pw*)
+ REPLACE_OPEN=1
+ ;;
+ *)
+
+ { 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}
+then :
+ printf %s "(cached) " >&6
+else
+ # Assume that if we have lstat, we can also check symlinks.
+ if test $ac_cv_func_lstat = yes; then
+ touch conftest.tmp
+ ln -s conftest.tmp conftest.lnk
+ fi
+ if test "$cross_compiling" = yes
+then :
+
+ case "$host_os" in
+ freebsd* | aix* | hpux* | solaris2.[0-9] | solaris2.[0-9].*)
+ gl_cv_func_open_slash="guessing no" ;;
+ *)
+ gl_cv_func_open_slash="guessing yes" ;;
+ esac
+
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#include <fcntl.h>
+#if HAVE_UNISTD_H
+# include <unistd.h>
+#endif
+int main ()
+{
+ int result = 0;
+#if HAVE_LSTAT
+ if (open ("conftest.lnk/", O_RDONLY) != -1)
+ result |= 1;
+#endif
+ if (open ("conftest.sl/", O_CREAT, 0600) >= 0)
+ result |= 2;
+ return result;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"
+then :
+ gl_cv_func_open_slash=yes
+else
+ gl_cv_func_open_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
+
+ rm -f conftest.sl conftest.tmp conftest.lnk
+
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_open_slash" >&5
+printf "%s\n" "$gl_cv_func_open_slash" >&6; }
+ case "$gl_cv_func_open_slash" in
+ *no)
+
+printf "%s\n" "#define OPEN_TRAILING_SLASH_BUG 1" >>confdefs.h
+
+ REPLACE_OPEN=1
+ ;;
+ esac
+ ;;
+ esac
+
+
+
+ if test $REPLACE_OPEN = 1; then
+
+
+
+
+
+
+
+
+ gltests_LIBOBJS="$gltests_LIBOBJS open.$ac_objext"
+
+
+
+ :
+
+ fi
+
+
+
+
+
+ if test "$GNULIB_OPEN" != 1; then
+ if test "$GNULIB_OPEN" = 0; then
+ GNULIB_OPEN=$gl_module_indicator_condition
+ else
+ GNULIB_OPEN="($GNULIB_OPEN || $gl_module_indicator_condition)"
+ fi
+ fi
+
+
+
+
+
+printf "%s\n" "#define GNULIB_TEST_OPEN 1" >>confdefs.h
+
+
+
+
+
+
+ ac_fn_c_check_func "$LINENO" "opendir" "ac_cv_func_opendir"
+if test "x$ac_cv_func_opendir" = xyes
+then :
+ printf "%s\n" "#define HAVE_OPENDIR 1" >>confdefs.h
+
+fi
+
+ if test $ac_cv_func_opendir = no; then
+ HAVE_OPENDIR=0
+ fi
+
+ case $host_os,$HAVE_OPENDIR in
+ os2*,1)
+ REPLACE_OPENDIR=1;;
+ esac
+
+ if test $HAVE_OPENDIR = 0 || test $REPLACE_OPENDIR = 1; then
+
+
+
+
+
+
+
+
+ gltests_LIBOBJS="$gltests_LIBOBJS opendir.$ac_objext"
+
+ fi
+
+
+
+
+
+ if test "$GNULIB_OPENDIR" != 1; then
+ if test "$GNULIB_OPENDIR" = 0; then
+ GNULIB_OPENDIR=$gl_module_indicator_condition
+ else
+ GNULIB_OPENDIR="($GNULIB_OPENDIR || $gl_module_indicator_condition)"
+ fi
+ fi
+
+
+
+
+
+printf "%s\n" "#define GNULIB_TEST_OPENDIR 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}
+then :
+ printf %s "(cached) " >&6
+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" ;;
+ esac
+
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+$ac_includes_default
+int
+main (void)
+{
+
+ /* Put it in env. */
+ if (putenv ("CONFTEST_putenv=val"))
+ return 1;
+
+ /* Try to remove it. */
+ if (putenv ("CONFTEST_putenv"))
+ return 2;
+
+ /* Make sure it was deleted. */
+ if (getenv ("CONFTEST_putenv") != 0)
+ return 3;
+
+ return 0;
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"
+then :
+ gl_cv_func_svid_putenv=yes
+else
+ gl_cv_func_svid_putenv=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_svid_putenv" >&5
+printf "%s\n" "$gl_cv_func_svid_putenv" >&6; }
+ case "$gl_cv_func_svid_putenv" in
+ *yes) ;;
+ *)
+ REPLACE_PUTENV=1
+ ;;
+ esac
+
+ if test $REPLACE_PUTENV = 1; then
+
+
+
+
+
+
+
+
+ gltests_LIBOBJS="$gltests_LIBOBJS putenv.$ac_objext"
+
+
+ ac_fn_c_check_decl "$LINENO" "_putenv" "ac_cv_have_decl__putenv" "$ac_includes_default"
+if test "x$ac_cv_have_decl__putenv" = xyes
+then :
+ ac_have_decl=1
+else
+ ac_have_decl=0
+fi
+
+printf "%s\n" "#define HAVE_DECL__PUTENV $ac_have_decl" >>confdefs.h
+
+
+ fi
+
+
+
+
+
+ if test "$GNULIB_PUTENV" != 1; then
+ if test "$GNULIB_PUTENV" = 0; then
+ GNULIB_PUTENV=$gl_module_indicator_condition
+ else
+ GNULIB_PUTENV="($GNULIB_PUTENV || $gl_module_indicator_condition)"
+ fi
+ fi
+
+
+
+
+
+printf "%s\n" "#define GNULIB_TEST_PUTENV 1" >>confdefs.h
+
+
+
+
+
+
+ # 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.
+ ac_fn_c_check_func "$LINENO" "mmap" "ac_cv_func_mmap"
+if test "x$ac_cv_func_mmap" = xyes
+then :
+ gl_have_mmap=yes
+else
+ gl_have_mmap=no
+fi
+
+
+ # Try to allow MAP_ANONYMOUS.
+ gl_have_mmap_anonymous=no
+ if test $gl_have_mmap = yes; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for MAP_ANONYMOUS" >&5
+printf %s "checking for MAP_ANONYMOUS... " >&6; }
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#include <sys/mman.h>
+#ifdef MAP_ANONYMOUS
+ I cannot identify this map
+#endif
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ $EGREP "I cannot identify this map" >/dev/null 2>&1
+then :
+ gl_have_mmap_anonymous=yes
+fi
+rm -rf conftest*
+
+ if test $gl_have_mmap_anonymous != yes; then
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#include <sys/mman.h>
+#ifdef MAP_ANON
+ I cannot identify this map
+#endif
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ $EGREP "I cannot identify this map" >/dev/null 2>&1
+then :
+
+printf "%s\n" "#define MAP_ANONYMOUS MAP_ANON" >>confdefs.h
+
+ gl_have_mmap_anonymous=yes
+fi
+rm -rf conftest*
+
+ fi
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_have_mmap_anonymous" >&5
+printf "%s\n" "$gl_have_mmap_anonymous" >&6; }
+ if test $gl_have_mmap_anonymous = yes; then
+
+printf "%s\n" "#define HAVE_MAP_ANONYMOUS 1" >>confdefs.h
+
+ fi
+ fi
+
+
+
+ :
+
+
+
+ ac_fn_c_check_func "$LINENO" "readdir" "ac_cv_func_readdir"
+if test "x$ac_cv_func_readdir" = xyes
+then :
+ printf "%s\n" "#define HAVE_READDIR 1" >>confdefs.h
+
+fi
+
+ if test $ac_cv_func_readdir = no; then
+ HAVE_READDIR=0
+ fi
+
+ if test $HAVE_READDIR = 0; then
+
+
+
+
+
+
+
+
+ gltests_LIBOBJS="$gltests_LIBOBJS readdir.$ac_objext"
+
+ fi
+
+
+
+
+
+ if test "$GNULIB_READDIR" != 1; then
+ if test "$GNULIB_READDIR" = 0; then
+ GNULIB_READDIR=$gl_module_indicator_condition
+ else
+ GNULIB_READDIR="($GNULIB_READDIR || $gl_module_indicator_condition)"
+ fi
+ fi
+
+
+
+
+
+printf "%s\n" "#define GNULIB_TEST_READDIR 1" >>confdefs.h
+
+
+
+
+
+
+ if test $gl_cv_func_malloc_posix = yes; then
+
+printf "%s\n" "#define HAVE_REALLOC_POSIX 1" >>confdefs.h
+
+ else
+ REPLACE_REALLOC=1
+ fi
+
+ if test $REPLACE_REALLOC = 1; then
+
+
+
+
+
+
+
+
+ gltests_LIBOBJS="$gltests_LIBOBJS realloc.$ac_objext"
+
+ fi
+
+
+
+
+
+ if test "$GNULIB_REALLOC_POSIX" != 1; then
+ if test "$GNULIB_REALLOC_POSIX" = 0; then
+ GNULIB_REALLOC_POSIX=$gl_module_indicator_condition
+ else
+ GNULIB_REALLOC_POSIX="($GNULIB_REALLOC_POSIX || $gl_module_indicator_condition)"
+ fi
+ fi
+
+
+
+
+
+printf "%s\n" "#define GNULIB_TEST_REALLOC_POSIX 1" >>confdefs.h
+
+
+
+
+
+ if test $ac_cv_func_setenv = no; then
+ HAVE_SETENV=0
+ else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether setenv validates arguments" >&5
+printf %s "checking whether setenv validates arguments... " >&6; }
+if test ${gl_cv_func_setenv_works+y}
+then :
+ printf %s "(cached) " >&6
+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" ;;
+ esac
+
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+ #include <stdlib.h>
+ #include <errno.h>
+ #include <string.h>
+
+int
+main (void)
+{
+
+ int result = 0;
+ {
+ if (setenv ("", "", 0) != -1)
+ result |= 1;
+ else if (errno != EINVAL)
+ result |= 2;
+ }
+ {
+ if (setenv ("a", "=", 1) != 0)
+ result |= 4;
+ else if (strcmp (getenv ("a"), "=") != 0)
+ result |= 8;
+ }
+ return result;
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"
+then :
+ gl_cv_func_setenv_works=yes
+else
+ gl_cv_func_setenv_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_setenv_works" >&5
+printf "%s\n" "$gl_cv_func_setenv_works" >&6; }
+ case "$gl_cv_func_setenv_works" in
+ *yes) ;;
+ *)
+ REPLACE_SETENV=1
+ ;;
+ esac
+ fi
+
+ if test $HAVE_SETENV = 0 || test $REPLACE_SETENV = 1; then
+
+
+
+
+
+
+
+
+ gltests_LIBOBJS="$gltests_LIBOBJS setenv.$ac_objext"
+
+ fi
+
+
+
+
+
+ if test "$GNULIB_SETENV" != 1; then
+ if test "$GNULIB_SETENV" = 0; then
+ GNULIB_SETENV=$gl_module_indicator_condition
+ else
+ GNULIB_SETENV="($GNULIB_SETENV || $gl_module_indicator_condition)"
+ fi
+ fi
+
+
+
+
+
+printf "%s\n" "#define GNULIB_TEST_SETENV 1" >>confdefs.h
+
+
+
+
+
+
+ case "$host_os" in
+ mingw*) REPLACE_SETLOCALE=1 ;;
+ cygwin*)
+ case `uname -r` in
+ 1.5.*) REPLACE_SETLOCALE=1 ;;
+ esac
+ ;;
+ esac
+
+ if test $REPLACE_SETLOCALE = 1; then
+
+
+
+
+
+
+
+
+ gltests_LIBOBJS="$gltests_LIBOBJS setlocale.$ac_objext"
+
+
+ :
+
+ fi
+
+
+
+
+
+ if test "$GNULIB_SETLOCALE" != 1; then
+ if test "$GNULIB_SETLOCALE" = 0; then
+ GNULIB_SETLOCALE=$gl_module_indicator_condition
+ else
+ GNULIB_SETLOCALE="($GNULIB_SETLOCALE || $gl_module_indicator_condition)"
+ fi
+ fi
+
+
+
+
+
+printf "%s\n" "#define GNULIB_TEST_SETLOCALE 1" >>confdefs.h
+
+
+
+
+
+
+ { 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}
+then :
+ printf %s "(cached) " >&6
+else
+
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#include <locale.h>
+#include <time.h>
+#if HAVE_LANGINFO_CODESET
+# include <langinfo.h>
+#endif
+#include <stdlib.h>
+#include <string.h>
+struct tm t;
+char buf[16];
+int main () {
+ /* Check whether the given locale name is recognized by the system. */
+#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
+ category of the locale to "C". */
+ if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
+ || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
+ return 1;
+#else
+ if (setlocale (LC_ALL, "") == NULL) return 1;
+#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.
+ On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
+ succeeds but then nl_langinfo(CODESET) is "646". In this situation,
+ 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
+ {
+ 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__
+ /* 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
+ /* 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. */
+ /* 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
+ return 0;
+}
+
+_ACEOF
+ if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; } && test -s conftest$ac_exeext; then
+ case "$host_os" in
+ # Handle native Windows specially, because there setlocale() interprets
+ # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
+ # "fr" or "fra" as "French" or "French_France.1252",
+ # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
+ # "ja" as "Japanese" or "Japanese_Japan.932",
+ # and similar.
+ mingw*)
+ # Test for the native Windows locale name.
+ if (LC_ALL=French_France.1252 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+ gt_cv_locale_fr=French_France.1252
+ else
+ # None found.
+ gt_cv_locale_fr=none
+ fi
+ ;;
+ *)
+ # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
+ # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
+ # configure script would override the LC_ALL setting. Likewise for
+ # LC_CTYPE, which is also set at the beginning of the configure script.
+ # Test for the usual locale name.
+ if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+ gt_cv_locale_fr=fr_FR
+ else
+ # Test for the locale name with explicit encoding suffix.
+ if (LC_ALL=fr_FR.ISO-8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+ gt_cv_locale_fr=fr_FR.ISO-8859-1
+ else
+ # Test for the AIX, OSF/1, FreeBSD, NetBSD, OpenBSD locale name.
+ if (LC_ALL=fr_FR.ISO8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+ gt_cv_locale_fr=fr_FR.ISO8859-1
+ else
+ # Test for the HP-UX locale name.
+ if (LC_ALL=fr_FR.iso88591 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+ gt_cv_locale_fr=fr_FR.iso88591
+ else
+ # Test for the Solaris 7 locale name.
+ if (LC_ALL=fr LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+ gt_cv_locale_fr=fr
+ else
+ # None found.
+ gt_cv_locale_fr=none
+ fi
+ fi
+ fi
+ fi
+ fi
+ ;;
+ esac
+ fi
+ rm -fr conftest*
+
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr" >&5
+printf "%s\n" "$gt_cv_locale_fr" >&6; }
+ LOCALE_FR=$gt_cv_locale_fr
+
+
+
+
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a french Unicode locale" >&5
+printf %s "checking for a french Unicode locale... " >&6; }
+if test ${gt_cv_locale_fr_utf8+y}
+then :
+ printf %s "(cached) " >&6
+else
+
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#include <locale.h>
+#include <time.h>
+#if HAVE_LANGINFO_CODESET
+# include <langinfo.h>
+#endif
+#include <stdlib.h>
+#include <string.h>
+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__)
+ /* Check whether the given locale name is recognized by the system. */
+# 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
+ category of the locale to "C". */
+ if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
+ || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
+ return 1;
+# else
+ if (setlocale (LC_ALL, "") == NULL) return 1;
+# 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.
+ On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
+ succeeds but then nl_langinfo(CODESET) is "646". In this situation,
+ some unit tests fail. */
+# if HAVE_LANGINFO_CODESET
+ {
+ const char *cs = nl_langinfo (CODESET);
+ if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0)
+ return 1;
+ }
+# 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
+ /* Check whether in the abbreviation of the second month, the second
+ character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is
+ two bytes long, with UTF-8 encoding. */
+ t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
+ if (strftime (buf, sizeof (buf), "%b", &t) < 4
+ || buf[1] != (char) 0xc3 || buf[2] != (char) 0xa9 || buf[3] != 'v')
+ return 1;
+#endif
+#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
+ return 0;
+}
+
+_ACEOF
+ if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; } && test -s conftest$ac_exeext; then
+ case "$host_os" in
+ # Handle native Windows specially, because there setlocale() interprets
+ # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
+ # "fr" or "fra" as "French" or "French_France.1252",
+ # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
+ # "ja" as "Japanese" or "Japanese_Japan.932",
+ # and similar.
+ mingw*)
+ # Test for the hypothetical native Windows locale name.
+ if (LC_ALL=French_France.65001 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+ gt_cv_locale_fr_utf8=French_France.65001
+ else
+ # None found.
+ gt_cv_locale_fr_utf8=none
+ fi
+ ;;
+ *)
+ # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
+ # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
+ # configure script would override the LC_ALL setting. Likewise for
+ # LC_CTYPE, which is also set at the beginning of the configure script.
+ # Test for the usual locale name.
+ if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+ gt_cv_locale_fr_utf8=fr_FR
+ else
+ # Test for the locale name with explicit encoding suffix.
+ if (LC_ALL=fr_FR.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+ gt_cv_locale_fr_utf8=fr_FR.UTF-8
+ else
+ # Test for the Solaris 7 locale name.
+ if (LC_ALL=fr.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+ gt_cv_locale_fr_utf8=fr.UTF-8
+ else
+ # None found.
+ gt_cv_locale_fr_utf8=none
+ fi
+ fi
+ fi
+ ;;
+ esac
+ fi
+ rm -fr conftest*
+
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr_utf8" >&5
+printf "%s\n" "$gt_cv_locale_fr_utf8" >&6; }
+ LOCALE_FR_UTF8=$gt_cv_locale_fr_utf8
+
+
+
+
+
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a traditional japanese locale" >&5
+printf %s "checking for a traditional japanese locale... " >&6; }
+if test ${gt_cv_locale_ja+y}
+then :
+ printf %s "(cached) " >&6
+else
+
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#include <locale.h>
+#include <time.h>
+#if HAVE_LANGINFO_CODESET
+# include <langinfo.h>
+#endif
+#include <stdlib.h>
+#include <string.h>
+struct tm t;
+char buf[16];
+int main ()
+{
+ const char *p;
+ /* Check whether the given locale name is recognized by the system. */
+#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
+ category of the locale to "C". */
+ if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
+ || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
+ return 1;
+#else
+ if (setlocale (LC_ALL, "") == NULL) return 1;
+#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.
+ On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
+ succeeds but then nl_langinfo(CODESET) is "646". In this situation,
+ 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
+ {
+ 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__
+ /* 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
+ /* 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;
+ return 0;
+}
+
+_ACEOF
+ if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; } && test -s conftest$ac_exeext; then
+ case "$host_os" in
+ # Handle native Windows specially, because there setlocale() interprets
+ # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
+ # "fr" or "fra" as "French" or "French_France.1252",
+ # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
+ # "ja" as "Japanese" or "Japanese_Japan.932",
+ # and similar.
+ mingw*)
+ # Note that on native Windows, the Japanese locale is
+ # Japanese_Japan.932, and CP932 is very different from EUC-JP, so we
+ # cannot use it here.
+ gt_cv_locale_ja=none
+ ;;
+ *)
+ # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
+ # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
+ # configure script would override the LC_ALL setting. Likewise for
+ # LC_CTYPE, which is also set at the beginning of the configure script.
+ # Test for the AIX locale name.
+ if (LC_ALL=ja_JP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+ gt_cv_locale_ja=ja_JP
+ else
+ # Test for the locale name with explicit encoding suffix.
+ if (LC_ALL=ja_JP.EUC-JP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+ gt_cv_locale_ja=ja_JP.EUC-JP
+ else
+ # Test for the HP-UX, OSF/1, NetBSD locale name.
+ if (LC_ALL=ja_JP.eucJP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+ gt_cv_locale_ja=ja_JP.eucJP
+ else
+ # Test for the IRIX, FreeBSD locale name.
+ if (LC_ALL=ja_JP.EUC LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+ gt_cv_locale_ja=ja_JP.EUC
+ else
+ # Test for the Solaris 7 locale name.
+ if (LC_ALL=ja LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+ gt_cv_locale_ja=ja
+ else
+ # Special test for NetBSD 1.6.
+ if test -f /usr/share/locale/ja_JP.eucJP/LC_CTYPE; then
+ gt_cv_locale_ja=ja_JP.eucJP
+ else
+ # None found.
+ gt_cv_locale_ja=none
+ fi
+ fi
+ fi
+ fi
+ fi
+ fi
+ ;;
+ esac
+ fi
+ rm -fr conftest*
+
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_ja" >&5
+printf "%s\n" "$gt_cv_locale_ja" >&6; }
+ LOCALE_JA=$gt_cv_locale_ja
+
+
+
+
+
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a transitional chinese locale" >&5
+printf %s "checking for a transitional chinese locale... " >&6; }
+if test ${gt_cv_locale_zh_CN+y}
+then :
+ printf %s "(cached) " >&6
+else
+
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#include <locale.h>
+#include <stdlib.h>
+#include <time.h>
+#if HAVE_LANGINFO_CODESET
+# include <langinfo.h>
+#endif
+#include <stdlib.h>
+#include <string.h>
+struct tm t;
+char buf[16];
+int main ()
+{
+ const char *p;
+ /* Check whether the given locale name is recognized by the system. */
+#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
+ category of the locale to "C". */
+ if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
+ || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
+ return 1;
+#else
+ if (setlocale (LC_ALL, "") == NULL) return 1;
+#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.
+ On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
+ succeeds but then nl_langinfo(CODESET) is "646". In this situation,
+ 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
+ {
+ 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__
+ /* 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
+ /* 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;
+ /* 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;
+}
+
+_ACEOF
+ if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; } && test -s conftest$ac_exeext; then
+ case "$host_os" in
+ # Handle native Windows specially, because there setlocale() interprets
+ # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
+ # "fr" or "fra" as "French" or "French_France.1252",
+ # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
+ # "ja" as "Japanese" or "Japanese_Japan.932",
+ # and similar.
+ mingw*)
+ # Test for the hypothetical native Windows locale name.
+ if (LC_ALL=Chinese_China.54936 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+ gt_cv_locale_zh_CN=Chinese_China.54936
+ else
+ # None found.
+ gt_cv_locale_zh_CN=none
+ fi
+ ;;
+ solaris2.8)
+ # On Solaris 8, the locales zh_CN.GB18030, zh_CN.GBK, zh.GBK are
+ # broken. One witness is the test case in gl_MBRTOWC_SANITYCHECK.
+ # Another witness is that "LC_ALL=zh_CN.GB18030 bash -c true" dumps core.
+ gt_cv_locale_zh_CN=none
+ ;;
+ *)
+ # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
+ # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
+ # configure script would override the LC_ALL setting. Likewise for
+ # LC_CTYPE, which is also set at the beginning of the configure script.
+ # Test for the locale name without encoding suffix.
+ if (LC_ALL=zh_CN LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+ gt_cv_locale_zh_CN=zh_CN
+ else
+ # Test for the locale name with explicit encoding suffix.
+ if (LC_ALL=zh_CN.GB18030 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+ gt_cv_locale_zh_CN=zh_CN.GB18030
+ else
+ # None found.
+ gt_cv_locale_zh_CN=none
+ fi
+ fi
+ ;;
+ esac
+ else
+ # If there was a link error, due to mblen(), the system is so old that
+ # it certainly doesn't have a chinese locale.
+ gt_cv_locale_zh_CN=none
+ fi
+ rm -fr conftest*
+
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_zh_CN" >&5
+printf "%s\n" "$gt_cv_locale_zh_CN" >&6; }
+ LOCALE_ZH_CN=$gt_cv_locale_zh_CN
+
+
+
+
+
+
+
+
+ if test $ac_cv_func_strdup = yes; then
+ if test $gl_cv_func_malloc_posix != yes; then
+ REPLACE_STRDUP=1
+ fi
+ fi
+
+ if test $ac_cv_have_decl_strdup = no; then
+ HAVE_DECL_STRDUP=0
+ fi
+
+ if test $ac_cv_func_strdup = no || test $REPLACE_STRDUP = 1; then
+
+
+
+
+
+
+
+
+ gltests_LIBOBJS="$gltests_LIBOBJS strdup.$ac_objext"
+
+ :
+ fi
+
+
+
+
+
+ if test "$GNULIB_STRDUP" != 1; then
+ if test "$GNULIB_STRDUP" = 0; then
+ GNULIB_STRDUP=$gl_module_indicator_condition
+ else
+ GNULIB_STRDUP="($GNULIB_STRDUP || $gl_module_indicator_condition)"
+ fi
+ fi
+
+
+
+
+
+printf "%s\n" "#define GNULIB_TEST_STRDUP 1" >>confdefs.h
+
+
+
+
+
+
+ if test $ac_cv_func_symlink = no; then
+ HAVE_SYMLINK=0
+ else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether symlink handles trailing slash correctly" >&5
+printf %s "checking whether symlink handles trailing slash correctly... " >&6; }
+if test ${gl_cv_func_symlink_works+y}
+then :
+ printf %s "(cached) " >&6
+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" ;;
+ esac
+
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <unistd.h>
+
+int
+main (void)
+{
+int result = 0;
+ if (!symlink ("a", "conftest.link/"))
+ result |= 1;
+ if (symlink ("conftest.f", "conftest.lnk2"))
+ result |= 2;
+ else if (!symlink ("a", "conftest.lnk2/"))
+ result |= 4;
+ return result;
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"
+then :
+ gl_cv_func_symlink_works=yes
+else
+ gl_cv_func_symlink_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
+
+ rm -f conftest.f conftest.link conftest.lnk2
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_symlink_works" >&5
+printf "%s\n" "$gl_cv_func_symlink_works" >&6; }
+ case "$gl_cv_func_symlink_works" in
+ *yes) ;;
+ *)
+ REPLACE_SYMLINK=1
+ ;;
+ esac
+ fi
+
+ if test $HAVE_SYMLINK = 0 || test $REPLACE_SYMLINK = 1; then
+
+
+
+
+
+
+
+
+ gltests_LIBOBJS="$gltests_LIBOBJS symlink.$ac_objext"
+
+ fi
+
+
+
+
+
+ if test "$GNULIB_SYMLINK" != 1; then
+ if test "$GNULIB_SYMLINK" = 0; then
+ GNULIB_SYMLINK=$gl_module_indicator_condition
+ else
+ GNULIB_SYMLINK="($GNULIB_SYMLINK || $gl_module_indicator_condition)"
+ fi
+ fi
+
+
+
+
+
+printf "%s\n" "#define GNULIB_TEST_SYMLINK 1" >>confdefs.h
+
+
+
+
+
+
+ if test $ac_cv_have_decl_unsetenv = no; then
+ HAVE_DECL_UNSETENV=0
+ fi
+ ac_fn_c_check_func "$LINENO" "unsetenv" "ac_cv_func_unsetenv"
+if test "x$ac_cv_func_unsetenv" = xyes
+then :
+ printf "%s\n" "#define HAVE_UNSETENV 1" >>confdefs.h
+
+fi
+
+ if test $ac_cv_func_unsetenv = no; then
+ HAVE_UNSETENV=0
+ else
+ HAVE_UNSETENV=1
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for unsetenv() return type" >&5
+printf %s "checking for unsetenv() return type... " >&6; }
+if test ${gt_cv_func_unsetenv_ret+y}
+then :
+ printf %s "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#undef _BSD
+#define _BSD 1 /* unhide unsetenv declaration in OSF/1 5.1 <stdlib.h> */
+#include <stdlib.h>
+extern
+#ifdef __cplusplus
+"C"
+#endif
+int unsetenv (const char *name);
+
+int
+main (void)
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"
+then :
+ gt_cv_func_unsetenv_ret='int'
+else
+ gt_cv_func_unsetenv_ret='void'
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_func_unsetenv_ret" >&5
+printf "%s\n" "$gt_cv_func_unsetenv_ret" >&6; }
+ if test $gt_cv_func_unsetenv_ret = 'void'; then
+
+printf "%s\n" "#define VOID_UNSETENV 1" >>confdefs.h
+
+ REPLACE_UNSETENV=1
+ fi
+
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether unsetenv obeys POSIX" >&5
+printf %s "checking whether unsetenv obeys POSIX... " >&6; }
+if test ${gl_cv_func_unsetenv_works+y}
+then :
+ printf %s "(cached) " >&6
+else
+ if test "$cross_compiling" = yes
+then :
+ case "$host_os" in
+ # Guess yes on glibc systems.
+ *-gnu*) gl_cv_func_unsetenv_works="guessing yes" ;;
+ # If we don't know, assume the worst.
+ *) gl_cv_func_unsetenv_works="guessing no" ;;
+ esac
+
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+ #include <stdlib.h>
+ #include <errno.h>
+ extern char **environ;
+
+int
+main (void)
+{
+
+ char entry1[] = "a=1";
+ char entry2[] = "b=2";
+ char *env[] = { entry1, entry2, NULL };
+ if (putenv ((char *) "a=1")) return 1;
+ if (putenv (entry2)) return 2;
+ entry2[0] = 'a';
+ unsetenv ("a");
+ if (getenv ("a")) return 3;
+ if (!unsetenv ("") || errno != EINVAL) return 4;
+ entry2[0] = 'b';
+ environ = env;
+ if (!getenv ("a")) return 5;
+ entry2[0] = 'a';
+ unsetenv ("a");
+ if (getenv ("a")) return 6;
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"
+then :
+ gl_cv_func_unsetenv_works=yes
+else
+ gl_cv_func_unsetenv_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_unsetenv_works" >&5
+printf "%s\n" "$gl_cv_func_unsetenv_works" >&6; }
+ case "$gl_cv_func_unsetenv_works" in
+ *yes) ;;
+ *)
+ REPLACE_UNSETENV=1
+ ;;
+ esac
+ fi
+
+ if test $HAVE_UNSETENV = 0 || test $REPLACE_UNSETENV = 1; then
+
+
+
+
+
+
+
+
+ gltests_LIBOBJS="$gltests_LIBOBJS unsetenv.$ac_objext"
+
+
+
+
+
+ fi
+
+
+
+
+
+ if test "$GNULIB_UNSETENV" != 1; then
+ if test "$GNULIB_UNSETENV" = 0; then
+ GNULIB_UNSETENV=$gl_module_indicator_condition
+ else
+ GNULIB_UNSETENV="($GNULIB_UNSETENV || $gl_module_indicator_condition)"
+ fi
+ fi
+
+
+
+
+
+printf "%s\n" "#define GNULIB_TEST_UNSETENV 1" >>confdefs.h
+
+
+
+ abs_aux_dir=`cd "$ac_aux_dir"; pwd`
+
+ abs_aux_dir=`cd "$ac_aux_dir"; pwd`
+
+
+
+
+ { 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}
+then :
+ printf %s "(cached) " >&6
+else
+
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#include <locale.h>
+#include <time.h>
+#if HAVE_LANGINFO_CODESET
+# include <langinfo.h>
+#endif
+#include <stdlib.h>
+#include <string.h>
+struct tm t;
+char buf[16];
+int main () {
+ /* Check whether the given locale name is recognized by the system. */
+#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
+ category of the locale to "C". */
+ if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
+ || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
+ return 1;
+#else
+ if (setlocale (LC_ALL, "") == NULL) return 1;
+#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.
+ On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
+ succeeds but then nl_langinfo(CODESET) is "646". In this situation,
+ 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
+ {
+ 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__
+ /* 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
+ /* 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. */
+ /* 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
+ return 0;
+}
+
+_ACEOF
+ if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; } && test -s conftest$ac_exeext; then
+ case "$host_os" in
+ # Handle native Windows specially, because there setlocale() interprets
+ # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
+ # "fr" or "fra" as "French" or "French_France.1252",
+ # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
+ # "ja" as "Japanese" or "Japanese_Japan.932",
+ # and similar.
+ mingw*)
+ # Test for the native Windows locale name.
+ if (LC_ALL=French_France.1252 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+ gt_cv_locale_fr=French_France.1252
+ else
+ # None found.
+ gt_cv_locale_fr=none
+ fi
+ ;;
+ *)
+ # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
+ # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
+ # configure script would override the LC_ALL setting. Likewise for
+ # LC_CTYPE, which is also set at the beginning of the configure script.
+ # Test for the usual locale name.
+ if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+ gt_cv_locale_fr=fr_FR
+ else
+ # Test for the locale name with explicit encoding suffix.
+ if (LC_ALL=fr_FR.ISO-8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+ gt_cv_locale_fr=fr_FR.ISO-8859-1
+ else
+ # Test for the AIX, OSF/1, FreeBSD, NetBSD, OpenBSD locale name.
+ if (LC_ALL=fr_FR.ISO8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+ gt_cv_locale_fr=fr_FR.ISO8859-1
+ else
+ # Test for the HP-UX locale name.
+ if (LC_ALL=fr_FR.iso88591 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+ gt_cv_locale_fr=fr_FR.iso88591
+ else
+ # Test for the Solaris 7 locale name.
+ if (LC_ALL=fr LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+ gt_cv_locale_fr=fr
+ else
+ # None found.
+ gt_cv_locale_fr=none
+ fi
+ fi
+ fi
+ fi
+ fi
+ ;;
+ esac
+ fi
+ rm -fr conftest*
+
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr" >&5
+printf "%s\n" "$gt_cv_locale_fr" >&6; }
+ LOCALE_FR=$gt_cv_locale_fr
+
+
+
+
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a french Unicode locale" >&5
+printf %s "checking for a french Unicode locale... " >&6; }
+if test ${gt_cv_locale_fr_utf8+y}
+then :
+ printf %s "(cached) " >&6
+else
+
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#include <locale.h>
+#include <time.h>
+#if HAVE_LANGINFO_CODESET
+# include <langinfo.h>
+#endif
+#include <stdlib.h>
+#include <string.h>
+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__)
+ /* Check whether the given locale name is recognized by the system. */
+# 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
+ category of the locale to "C". */
+ if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
+ || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
+ return 1;
+# else
+ if (setlocale (LC_ALL, "") == NULL) return 1;
+# 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.
+ On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
+ succeeds but then nl_langinfo(CODESET) is "646". In this situation,
+ some unit tests fail. */
+# if HAVE_LANGINFO_CODESET
+ {
+ const char *cs = nl_langinfo (CODESET);
+ if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0)
+ return 1;
+ }
+# 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
+ /* Check whether in the abbreviation of the second month, the second
+ character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is
+ two bytes long, with UTF-8 encoding. */
+ t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
+ if (strftime (buf, sizeof (buf), "%b", &t) < 4
+ || buf[1] != (char) 0xc3 || buf[2] != (char) 0xa9 || buf[3] != 'v')
+ return 1;
+#endif
+#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
+ return 0;
+}
+
+_ACEOF
+ if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; } && test -s conftest$ac_exeext; then
+ case "$host_os" in
+ # Handle native Windows specially, because there setlocale() interprets
+ # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
+ # "fr" or "fra" as "French" or "French_France.1252",
+ # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
+ # "ja" as "Japanese" or "Japanese_Japan.932",
+ # and similar.
+ mingw*)
+ # Test for the hypothetical native Windows locale name.
+ if (LC_ALL=French_France.65001 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+ gt_cv_locale_fr_utf8=French_France.65001
+ else
+ # None found.
+ gt_cv_locale_fr_utf8=none
+ fi
+ ;;
+ *)
+ # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
+ # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
+ # configure script would override the LC_ALL setting. Likewise for
+ # LC_CTYPE, which is also set at the beginning of the configure script.
+ # Test for the usual locale name.
+ if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+ gt_cv_locale_fr_utf8=fr_FR
+ else
+ # Test for the locale name with explicit encoding suffix.
+ if (LC_ALL=fr_FR.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+ gt_cv_locale_fr_utf8=fr_FR.UTF-8
+ else
+ # Test for the Solaris 7 locale name.
+ if (LC_ALL=fr.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+ gt_cv_locale_fr_utf8=fr.UTF-8
+ else
+ # None found.
+ gt_cv_locale_fr_utf8=none
+ fi
+ fi
+ fi
+ ;;
+ esac
+ fi
+ rm -fr conftest*
+
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr_utf8" >&5
+printf "%s\n" "$gt_cv_locale_fr_utf8" >&6; }
+ LOCALE_FR_UTF8=$gt_cv_locale_fr_utf8
+
+
+
+
+
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a traditional japanese locale" >&5
+printf %s "checking for a traditional japanese locale... " >&6; }
+if test ${gt_cv_locale_ja+y}
+then :
+ printf %s "(cached) " >&6
+else
+
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#include <locale.h>
+#include <time.h>
+#if HAVE_LANGINFO_CODESET
+# include <langinfo.h>
+#endif
+#include <stdlib.h>
+#include <string.h>
+struct tm t;
+char buf[16];
+int main ()
+{
+ const char *p;
+ /* Check whether the given locale name is recognized by the system. */
+#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
+ category of the locale to "C". */
+ if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
+ || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
+ return 1;
+#else
+ if (setlocale (LC_ALL, "") == NULL) return 1;
+#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.
+ On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
+ succeeds but then nl_langinfo(CODESET) is "646". In this situation,
+ 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
+ {
+ 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__
+ /* 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
+ /* 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;
+ return 0;
+}
+
+_ACEOF
+ if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; } && test -s conftest$ac_exeext; then
+ case "$host_os" in
+ # Handle native Windows specially, because there setlocale() interprets
+ # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
+ # "fr" or "fra" as "French" or "French_France.1252",
+ # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
+ # "ja" as "Japanese" or "Japanese_Japan.932",
+ # and similar.
+ mingw*)
+ # Note that on native Windows, the Japanese locale is
+ # Japanese_Japan.932, and CP932 is very different from EUC-JP, so we
+ # cannot use it here.
+ gt_cv_locale_ja=none
+ ;;
+ *)
+ # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
+ # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
+ # configure script would override the LC_ALL setting. Likewise for
+ # LC_CTYPE, which is also set at the beginning of the configure script.
+ # Test for the AIX locale name.
+ if (LC_ALL=ja_JP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+ gt_cv_locale_ja=ja_JP
+ else
+ # Test for the locale name with explicit encoding suffix.
+ if (LC_ALL=ja_JP.EUC-JP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+ gt_cv_locale_ja=ja_JP.EUC-JP
+ else
+ # Test for the HP-UX, OSF/1, NetBSD locale name.
+ if (LC_ALL=ja_JP.eucJP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+ gt_cv_locale_ja=ja_JP.eucJP
+ else
+ # Test for the IRIX, FreeBSD locale name.
+ if (LC_ALL=ja_JP.EUC LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+ gt_cv_locale_ja=ja_JP.EUC
+ else
+ # Test for the Solaris 7 locale name.
+ if (LC_ALL=ja LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+ gt_cv_locale_ja=ja
+ else
+ # Special test for NetBSD 1.6.
+ if test -f /usr/share/locale/ja_JP.eucJP/LC_CTYPE; then
+ gt_cv_locale_ja=ja_JP.eucJP
+ else
+ # None found.
+ gt_cv_locale_ja=none
+ fi
+ fi
+ fi
+ fi
+ fi
+ fi
+ ;;
+ esac
+ fi
+ rm -fr conftest*
+
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_ja" >&5
+printf "%s\n" "$gt_cv_locale_ja" >&6; }
+ LOCALE_JA=$gt_cv_locale_ja
+
+
+
+
+
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a transitional chinese locale" >&5
+printf %s "checking for a transitional chinese locale... " >&6; }
+if test ${gt_cv_locale_zh_CN+y}
+then :
+ printf %s "(cached) " >&6
+else
+
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#include <locale.h>
+#include <stdlib.h>
+#include <time.h>
+#if HAVE_LANGINFO_CODESET
+# include <langinfo.h>
+#endif
+#include <stdlib.h>
+#include <string.h>
+struct tm t;
+char buf[16];
+int main ()
+{
+ const char *p;
+ /* Check whether the given locale name is recognized by the system. */
+#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
+ category of the locale to "C". */
+ if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
+ || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
+ return 1;
+#else
+ if (setlocale (LC_ALL, "") == NULL) return 1;
+#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.
+ On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
+ succeeds but then nl_langinfo(CODESET) is "646". In this situation,
+ 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
+ {
+ 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__
+ /* 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
+ /* 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;
+ /* 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;
+}
+
+_ACEOF
+ if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; } && test -s conftest$ac_exeext; then
+ case "$host_os" in
+ # Handle native Windows specially, because there setlocale() interprets
+ # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
+ # "fr" or "fra" as "French" or "French_France.1252",
+ # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
+ # "ja" as "Japanese" or "Japanese_Japan.932",
+ # and similar.
+ mingw*)
+ # Test for the hypothetical native Windows locale name.
+ if (LC_ALL=Chinese_China.54936 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+ gt_cv_locale_zh_CN=Chinese_China.54936
+ else
+ # None found.
+ gt_cv_locale_zh_CN=none
+ fi
+ ;;
+ solaris2.8)
+ # On Solaris 8, the locales zh_CN.GB18030, zh_CN.GBK, zh.GBK are
+ # broken. One witness is the test case in gl_MBRTOWC_SANITYCHECK.
+ # Another witness is that "LC_ALL=zh_CN.GB18030 bash -c true" dumps core.
+ gt_cv_locale_zh_CN=none
+ ;;
+ *)
+ # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
+ # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
+ # configure script would override the LC_ALL setting. Likewise for
+ # LC_CTYPE, which is also set at the beginning of the configure script.
+ # Test for the locale name without encoding suffix.
+ if (LC_ALL=zh_CN LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+ gt_cv_locale_zh_CN=zh_CN
+ else
+ # Test for the locale name with explicit encoding suffix.
+ if (LC_ALL=zh_CN.GB18030 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+ gt_cv_locale_zh_CN=zh_CN.GB18030
+ else
+ # None found.
+ gt_cv_locale_zh_CN=none
+ fi
+ fi
+ ;;
+ esac
+ else
+ # If there was a link error, due to mblen(), the system is so old that
+ # it certainly doesn't have a chinese locale.
+ gt_cv_locale_zh_CN=none
+ fi
+ rm -fr conftest*
+
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_zh_CN" >&5
+printf "%s\n" "$gt_cv_locale_zh_CN" >&6; }
+ LOCALE_ZH_CN=$gt_cv_locale_zh_CN
+
+
+
+
+
+
+
@@ -19523,17 +30352,28 @@ fi
LIBSED_LTLIBDEPS="$gl_ltlibdeps"
+ LIBTESTS_LIBDEPS="$gltests_libdeps"
+
+
+
+
+# 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.
+# Otherwise, run RUN-IF-NOT-FOUND.
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether \"rt\" can be used with fopen" >&5
-$as_echo_n "checking whether \"rt\" can be used with fopen... " >&6; }
-if ${sed_cv_fopen_rt+:} false; then :
- $as_echo_n "(cached) " >&6
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether \"rt\" can be used with fopen" >&5
+printf %s "checking whether \"rt\" can be used with fopen... " >&6; }
+if test ${sed_cv_fopen_rt+y}
+then :
+ printf %s "(cached) " >&6
else
-if test "$cross_compiling" = yes; then :
+if test "$cross_compiling" = yes
+then :
case $host in
*cygwin* | *mingw*) sed_cv_fopen_rt=yes ;;
*) sed_cv_fopen_rt='assuming no' ;;
@@ -19555,7 +30395,8 @@ int main()
return fp ? 0 : 1;
}
_ACEOF
-if ac_fn_c_try_run "$LINENO"; then :
+if ac_fn_c_try_run "$LINENO"
+then :
sed_cv_fopen_rt=yes
else
sed_cv_fopen_rt=no
@@ -19565,21 +30406,23 @@ rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
fi
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $sed_cv_fopen_rt" >&5
-$as_echo "$sed_cv_fopen_rt" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $sed_cv_fopen_rt" >&5
+printf "%s\n" "$sed_cv_fopen_rt" >&6; }
if test "$sed_cv_fopen_rt" = yes; then
-$as_echo "#define HAVE_FOPEN_RT 1" >>confdefs.h
+printf "%s\n" "#define HAVE_FOPEN_RT 1" >>confdefs.h
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -lcP is needed" >&5
-$as_echo_n "checking whether -lcP is needed... " >&6; }
-if ${sed_cv_libcp_needed+:} false; then :
- $as_echo_n "(cached) " >&6
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether -lcP is needed" >&5
+printf %s "checking whether -lcP is needed... " >&6; }
+if test ${sed_cv_libcp_needed+y}
+then :
+ printf %s "(cached) " >&6
else
-if test "$cross_compiling" = yes; then :
+if test "$cross_compiling" = yes
+then :
sed_cv_libcp_needed="assuming no"
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -19600,7 +30443,8 @@ int main()
return result;
}
_ACEOF
-if ac_fn_c_try_run "$LINENO"; then :
+if ac_fn_c_try_run "$LINENO"
+then :
sed_cv_libcp_needed=no
else
sed_cv_libcp_needed=yes
@@ -19611,8 +30455,8 @@ fi
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $sed_cv_libcp_needed" >&5
-$as_echo "$sed_cv_libcp_needed" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $sed_cv_libcp_needed" >&5
+printf "%s\n" "$sed_cv_libcp_needed" >&6; }
if test "$sed_cv_libcp_needed" = yes; then
LIBS="-lcP $LIBS"
fi
@@ -19621,19 +30465,17 @@ fi
-
-
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
-$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
-if ${ac_cv_c_const+:} false; then :
- $as_echo_n "(cached) " >&6
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
+printf %s "checking for an ANSI C-conforming const... " >&6; }
+if test ${ac_cv_c_const+y}
+then :
+ printf %s "(cached) " >&6
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
int
-main ()
+main (void)
{
#ifndef __cplusplus
@@ -19646,7 +30488,7 @@ main ()
/* NEC SVR4.0.2 mips cc rejects this. */
struct point {int x, y;};
static struct point const zero = {0,0};
- /* AIX XL C 1.02.0.0 rejects this.
+ /* IBM XL C 1.02.0.0 rejects this.
It does not let you subtract one const X* pointer from another in
an arm of an if-expression whose if-part is not a constant
expression */
@@ -19674,7 +30516,7 @@ main ()
iptr p = 0;
++p;
}
- { /* AIX XL C 1.02.0.0 rejects this sort of thing, saying
+ { /* IBM XL C 1.02.0.0 rejects this sort of thing, saying
"k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
struct s { int j; const int *ap[3]; } bx;
struct s *b = &bx; b->j = 5;
@@ -19690,58 +30532,52 @@ main ()
return 0;
}
_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_c_try_compile "$LINENO"
+then :
ac_cv_c_const=yes
else
ac_cv_c_const=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
-$as_echo "$ac_cv_c_const" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
+printf "%s\n" "$ac_cv_c_const" >&6; }
if test $ac_cv_c_const = no; then
-$as_echo "#define const /**/" >>confdefs.h
+printf "%s\n" "#define const /**/" >>confdefs.h
fi
ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
-if test "x$ac_cv_type_size_t" = xyes; then :
+if test "x$ac_cv_type_size_t" = xyes
+then :
else
-cat >>confdefs.h <<_ACEOF
-#define size_t unsigned int
-_ACEOF
+printf "%s\n" "#define size_t unsigned int" >>confdefs.h
fi
-mkdir_p="$MKDIR_P"
-case $mkdir_p in
- [\\/$]* | ?:[\\/]*) ;;
- */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;;
-esac
-
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NLS is requested" >&5
-$as_echo_n "checking whether NLS is requested... " >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether NLS is requested" >&5
+printf %s "checking whether NLS is requested... " >&6; }
# Check whether --enable-nls was given.
-if test "${enable_nls+set}" = set; then :
+if test ${enable_nls+y}
+then :
enableval=$enable_nls; USE_NLS=$enableval
else
USE_NLS=yes
fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $USE_NLS" >&5
-$as_echo "$USE_NLS" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $USE_NLS" >&5
+printf "%s\n" "$USE_NLS" >&6; }
- GETTEXT_MACRO_VERSION=0.17
+ GETTEXT_MACRO_VERSION=0.19
@@ -19749,15 +30585,14 @@ $as_echo "$USE_NLS" >&6; }
# Prepare PATH_SEPARATOR.
# The user is always right.
if test "${PATH_SEPARATOR+set}" != set; then
- echo "#! /bin/sh" >conf$$.sh
- echo "exit 0" >>conf$$.sh
- chmod +x conf$$.sh
- if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
- PATH_SEPARATOR=';'
- else
- PATH_SEPARATOR=:
- fi
- rm -f conf$$.sh
+ # 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
# Find out how to test for executable files. Don't use a zero-byte file,
@@ -19776,10 +30611,11 @@ rm -f conf$$.file
# Extract the first word of "msgfmt", so it can be a program name with args.
set dummy msgfmt; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_path_MSGFMT+:} false; then :
- $as_echo_n "(cached) " >&6
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_path_MSGFMT+y}
+then :
+ printf %s "(cached) " >&6
else
case "$MSGFMT" in
[\\/]* | ?:[\\/]*)
@@ -19808,19 +30644,20 @@ esac
fi
MSGFMT="$ac_cv_path_MSGFMT"
if test "$MSGFMT" != ":"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSGFMT" >&5
-$as_echo "$MSGFMT" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $MSGFMT" >&5
+printf "%s\n" "$MSGFMT" >&6; }
else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
fi
# Extract the first word of "gmsgfmt", so it can be a program name with args.
set dummy gmsgfmt; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_path_GMSGFMT+:} false; then :
- $as_echo_n "(cached) " >&6
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_path_GMSGFMT+y}
+then :
+ printf %s "(cached) " >&6
else
case $GMSGFMT in
[\\/]* | ?:[\\/]*)
@@ -19831,11 +30668,15 @@ else
for as_dir in $PATH
do
IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
+ 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_path_GMSGFMT="$as_dir/$ac_word$ac_exec_ext"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
+ ac_cv_path_GMSGFMT="$as_dir$ac_word$ac_exec_ext"
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
break 2
fi
done
@@ -19848,11 +30689,11 @@ esac
fi
GMSGFMT=$ac_cv_path_GMSGFMT
if test -n "$GMSGFMT"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GMSGFMT" >&5
-$as_echo "$GMSGFMT" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $GMSGFMT" >&5
+printf "%s\n" "$GMSGFMT" >&6; }
else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
fi
@@ -19872,15 +30713,14 @@ fi
# Prepare PATH_SEPARATOR.
# The user is always right.
if test "${PATH_SEPARATOR+set}" != set; then
- echo "#! /bin/sh" >conf$$.sh
- echo "exit 0" >>conf$$.sh
- chmod +x conf$$.sh
- if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
- PATH_SEPARATOR=';'
- else
- PATH_SEPARATOR=:
- fi
- rm -f conf$$.sh
+ # 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
# Find out how to test for executable files. Don't use a zero-byte file,
@@ -19899,10 +30739,11 @@ rm -f conf$$.file
# Extract the first word of "xgettext", so it can be a program name with args.
set dummy xgettext; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_path_XGETTEXT+:} false; then :
- $as_echo_n "(cached) " >&6
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_path_XGETTEXT+y}
+then :
+ printf %s "(cached) " >&6
else
case "$XGETTEXT" in
[\\/]* | ?:[\\/]*)
@@ -19931,11 +30772,11 @@ esac
fi
XGETTEXT="$ac_cv_path_XGETTEXT"
if test "$XGETTEXT" != ":"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XGETTEXT" >&5
-$as_echo "$XGETTEXT" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $XGETTEXT" >&5
+printf "%s\n" "$XGETTEXT" >&6; }
else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
fi
rm -f messages.po
@@ -19950,15 +30791,14 @@ fi
# Prepare PATH_SEPARATOR.
# The user is always right.
if test "${PATH_SEPARATOR+set}" != set; then
- echo "#! /bin/sh" >conf$$.sh
- echo "exit 0" >>conf$$.sh
- chmod +x conf$$.sh
- if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
- PATH_SEPARATOR=';'
- else
- PATH_SEPARATOR=:
- fi
- rm -f conf$$.sh
+ # 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
# Find out how to test for executable files. Don't use a zero-byte file,
@@ -19977,10 +30817,11 @@ rm -f conf$$.file
# Extract the first word of "msgmerge", so it can be a program name with args.
set dummy msgmerge; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_path_MSGMERGE+:} false; then :
- $as_echo_n "(cached) " >&6
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_path_MSGMERGE+y}
+then :
+ printf %s "(cached) " >&6
else
case "$MSGMERGE" in
[\\/]* | ?:[\\/]*)
@@ -20008,11 +30849,11 @@ esac
fi
MSGMERGE="$ac_cv_path_MSGMERGE"
if test "$MSGMERGE" != ":"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSGMERGE" >&5
-$as_echo "$MSGMERGE" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $MSGMERGE" >&5
+printf "%s\n" "$MSGMERGE" >&6; }
else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
fi
@@ -20026,186 +30867,7 @@ fi
- if test "X$prefix" = "XNONE"; then
- acl_final_prefix="$ac_default_prefix"
- else
- acl_final_prefix="$prefix"
- fi
- if test "X$exec_prefix" = "XNONE"; then
- acl_final_exec_prefix='${prefix}'
- else
- acl_final_exec_prefix="$exec_prefix"
- fi
- acl_save_prefix="$prefix"
- prefix="$acl_final_prefix"
- eval acl_final_exec_prefix=\"$acl_final_exec_prefix\"
- prefix="$acl_save_prefix"
-
-
-# Check whether --with-gnu-ld was given.
-if test "${with_gnu_ld+set}" = set; then :
- withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes
-else
- with_gnu_ld=no
-fi
-
-# Prepare PATH_SEPARATOR.
-# The user is always right.
-if test "${PATH_SEPARATOR+set}" != set; then
- echo "#! /bin/sh" >conf$$.sh
- echo "exit 0" >>conf$$.sh
- chmod +x conf$$.sh
- if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
- PATH_SEPARATOR=';'
- else
- PATH_SEPARATOR=:
- fi
- rm -f conf$$.sh
-fi
-ac_prog=ld
-if test "$GCC" = yes; then
- # Check if gcc -print-prog-name=ld gives a path.
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by GCC" >&5
-$as_echo_n "checking for ld used by GCC... " >&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.
- [\\/]* | [A-Za-z]:[\\/]*)
- re_direlt='/[^/][^/]*/\.\./'
- # Canonicalize the path 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
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
-$as_echo_n "checking for GNU ld... " >&6; }
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5
-$as_echo_n "checking for non-GNU ld... " >&6; }
-fi
-if ${acl_cv_path_LD+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- if test -z "$LD"; then
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
- for ac_dir in $PATH; do
- 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 GNU ld's 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="$ac_save_ifs"
-else
- acl_cv_path_LD="$LD" # Let the user override the test with a path.
-fi
-fi
-
-LD="$acl_cv_path_LD"
-if test -n "$LD"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
-$as_echo "$LD" >&6; }
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5
-$as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; }
-if ${acl_cv_prog_gnu_ld+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- # I'd rather use --version here, but apparently some GNU ld's only accept -v.
-case `$LD -v 2>&1 </dev/null` in
-*GNU* | *'with BFD'*)
- acl_cv_prog_gnu_ld=yes ;;
-*)
- acl_cv_prog_gnu_ld=no ;;
-esac
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $acl_cv_prog_gnu_ld" >&5
-$as_echo "$acl_cv_prog_gnu_ld" >&6; }
-with_gnu_ld=$acl_cv_prog_gnu_ld
-
-
-
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shared library run path origin" >&5
-$as_echo_n "checking for shared library run path origin... " >&6; }
-if ${acl_cv_rpath+:} false; then :
- $as_echo_n "(cached) " >&6
-else
-
- CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \
- ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh
- . ./conftest.sh
- rm -f ./conftest.sh
- acl_cv_rpath=done
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $acl_cv_rpath" >&5
-$as_echo "$acl_cv_rpath" >&6; }
- wl="$acl_cv_wl"
- acl_libext="$acl_cv_libext"
- acl_shlibext="$acl_cv_shlibext"
- acl_libname_spec="$acl_cv_libname_spec"
- acl_library_names_spec="$acl_cv_library_names_spec"
- acl_hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec"
- acl_hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator"
- acl_hardcode_direct="$acl_cv_hardcode_direct"
- acl_hardcode_minus_L="$acl_cv_hardcode_minus_L"
- # Check whether --enable-rpath was given.
-if test "${enable_rpath+set}" = set; then :
- enableval=$enable_rpath; :
-else
- enable_rpath=yes
-fi
-
-
- acl_libdirstem=lib
- 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 ;;
- *) searchdir=`cd "$searchdir" && pwd`
- case "$searchdir" in
- */lib64 ) acl_libdirstem=lib64 ;;
- esac ;;
- esac
- fi
- done
- IFS="$acl_save_IFS"
- fi
@@ -20230,7 +30892,8 @@ fi
# Check whether --with-libiconv-prefix was given.
-if test "${with_libiconv_prefix+set}" = set; then :
+if test ${with_libiconv_prefix+y}
+then :
withval=$with_libiconv_prefix;
if test "X$withval" = "Xno"; then
use_additional=no
@@ -20251,6 +30914,10 @@ if test "${with_libiconv_prefix+set}" = set; then :
else
additional_includedir="$withval/include"
additional_libdir="$withval/$acl_libdirstem"
+ if test "$acl_libdirstem2" != "$acl_libdirstem" \
+ && ! test -d "$withval/$acl_libdirstem"; then
+ additional_libdir="$withval/$acl_libdirstem2"
+ fi
fi
fi
@@ -20260,6 +30927,7 @@ fi
LTLIBICONV=
INCICONV=
LIBICONV_PREFIX=
+ HAVE_LIBICONV=
rpathdirs=
ltrpathdirs=
names_already_handled=
@@ -20277,7 +30945,7 @@ fi
done
if test -z "$already_handled"; then
names_already_handled="$names_already_handled $name"
- uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
+ uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./+-|ABCDEFGHIJKLMNOPQRSTUVWXYZ____|'`
eval value=\"\$HAVE_LIB$uppername\"
if test -n "$value"; then
if test "$value" = yes; then
@@ -20402,7 +31070,9 @@ fi
if test "X$found_dir" != "X"; then
LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-L$found_dir -l$name"
if test "X$found_so" != "X"; then
- if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/$acl_libdirstem"; then
+ if test "$enable_rpath" = no \
+ || test "X$found_dir" = "X/usr/$acl_libdirstem" \
+ || test "X$found_dir" = "X/usr/$acl_libdirstem2"; then
LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
else
haveit=
@@ -20469,7 +31139,16 @@ fi
case "$found_dir" in
*/$acl_libdirstem | */$acl_libdirstem/)
basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem/"'*$,,'`
- LIBICONV_PREFIX="$basedir"
+ if test "$name" = 'iconv'; then
+ LIBICONV_PREFIX="$basedir"
+ fi
+ additional_includedir="$basedir/include"
+ ;;
+ */$acl_libdirstem2 | */$acl_libdirstem2/)
+ basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem2/"'*$,,'`
+ if test "$name" = 'iconv'; then
+ LIBICONV_PREFIX="$basedir"
+ fi
additional_includedir="$basedir/include"
;;
esac
@@ -20518,9 +31197,11 @@ fi
case "$dep" in
-L*)
additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
- if test "X$additional_libdir" != "X/usr/$acl_libdirstem"; then
+ if test "X$additional_libdir" != "X/usr/$acl_libdirstem" \
+ && test "X$additional_libdir" != "X/usr/$acl_libdirstem2"; then
haveit=
- if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem"; then
+ if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem" \
+ || test "X$additional_libdir" = "X/usr/local/$acl_libdirstem2"; then
if test -n "$GCC"; then
case $host_os in
linux* | gnu* | k*bsd*-gnu) haveit=yes;;
@@ -20670,10 +31351,17 @@ fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CFPreferencesCopyAppValue" >&5
-$as_echo_n "checking for CFPreferencesCopyAppValue... " >&6; }
-if ${gt_cv_func_CFPreferencesCopyAppValue+:} false; then :
- $as_echo_n "(cached) " >&6
+
+
+
+
+
+
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for CFPreferencesCopyAppValue" >&5
+printf %s "checking for CFPreferencesCopyAppValue... " >&6; }
+if test ${gt_cv_func_CFPreferencesCopyAppValue+y}
+then :
+ printf %s "(cached) " >&6
else
gt_save_LIBS="$LIBS"
LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation"
@@ -20681,14 +31369,15 @@ else
/* end confdefs.h. */
#include <CoreFoundation/CFPreferences.h>
int
-main ()
+main (void)
{
CFPreferencesCopyAppValue(NULL, NULL)
;
return 0;
}
_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
+if ac_fn_c_try_link "$LINENO"
+then :
gt_cv_func_CFPreferencesCopyAppValue=yes
else
gt_cv_func_CFPreferencesCopyAppValue=no
@@ -20697,17 +31386,18 @@ rm -f core conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
LIBS="$gt_save_LIBS"
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_func_CFPreferencesCopyAppValue" >&5
-$as_echo "$gt_cv_func_CFPreferencesCopyAppValue" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_func_CFPreferencesCopyAppValue" >&5
+printf "%s\n" "$gt_cv_func_CFPreferencesCopyAppValue" >&6; }
if test $gt_cv_func_CFPreferencesCopyAppValue = yes; then
-$as_echo "#define HAVE_CFPREFERENCESCOPYAPPVALUE 1" >>confdefs.h
+printf "%s\n" "#define HAVE_CFPREFERENCESCOPYAPPVALUE 1" >>confdefs.h
fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CFLocaleCopyCurrent" >&5
-$as_echo_n "checking for CFLocaleCopyCurrent... " >&6; }
-if ${gt_cv_func_CFLocaleCopyCurrent+:} false; then :
- $as_echo_n "(cached) " >&6
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for CFLocaleCopyCurrent" >&5
+printf %s "checking for CFLocaleCopyCurrent... " >&6; }
+if test ${gt_cv_func_CFLocaleCopyCurrent+y}
+then :
+ printf %s "(cached) " >&6
else
gt_save_LIBS="$LIBS"
LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation"
@@ -20715,14 +31405,15 @@ else
/* end confdefs.h. */
#include <CoreFoundation/CFLocale.h>
int
-main ()
+main (void)
{
CFLocaleCopyCurrent();
;
return 0;
}
_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
+if ac_fn_c_try_link "$LINENO"
+then :
gt_cv_func_CFLocaleCopyCurrent=yes
else
gt_cv_func_CFLocaleCopyCurrent=no
@@ -20731,11 +31422,11 @@ rm -f core conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
LIBS="$gt_save_LIBS"
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_func_CFLocaleCopyCurrent" >&5
-$as_echo "$gt_cv_func_CFLocaleCopyCurrent" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_func_CFLocaleCopyCurrent" >&5
+printf "%s\n" "$gt_cv_func_CFLocaleCopyCurrent" >&6; }
if test $gt_cv_func_CFLocaleCopyCurrent = yes; then
-$as_echo "#define HAVE_CFLOCALECOPYCURRENT 1" >>confdefs.h
+printf "%s\n" "#define HAVE_CFLOCALECOPYCURRENT 1" >>confdefs.h
fi
INTL_MACOSX_LIBS=
@@ -20780,27 +31471,33 @@ typedef int array [2 * (__GNU_GETTEXT_SUPPORTED_REVISION(0) >= 1) - 1];
gt_expression_test_code=
fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU gettext in libc" >&5
-$as_echo_n "checking for GNU gettext in libc... " >&6; }
-if eval \${$gt_func_gnugettext_libc+:} false; then :
- $as_echo_n "(cached) " >&6
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for GNU gettext in libc" >&5
+printf %s "checking for GNU gettext in libc... " >&6; }
+if eval test \${$gt_func_gnugettext_libc+y}
+then :
+ printf %s "(cached) " >&6
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
+
#include <libintl.h>
$gt_revision_test_code
extern int _nl_msg_cat_cntr;
extern int *_nl_domain_bindings;
+
int
-main ()
+main (void)
{
+
bindtextdomain ("", "");
return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_domain_bindings
+
;
return 0;
}
_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
+if ac_fn_c_try_link "$LINENO"
+then :
eval "$gt_func_gnugettext_libc=yes"
else
eval "$gt_func_gnugettext_libc=no"
@@ -20809,8 +31506,8 @@ rm -f core conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
fi
eval ac_res=\$$gt_func_gnugettext_libc
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
-$as_echo "$ac_res" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+printf "%s\n" "$ac_res" >&6; }
if { eval "gt_val=\$$gt_func_gnugettext_libc"; test "$gt_val" != "yes"; }; then
@@ -20843,29 +31540,33 @@ $as_echo "$ac_res" >&6; }
done
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for iconv" >&5
-$as_echo_n "checking for iconv... " >&6; }
-if ${am_cv_func_iconv+:} false; then :
- $as_echo_n "(cached) " >&6
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for iconv" >&5
+printf %s "checking for iconv... " >&6; }
+if test ${am_cv_func_iconv+y}
+then :
+ printf %s "(cached) " >&6
else
am_cv_func_iconv="no, consider installing GNU libiconv"
am_cv_lib_iconv=no
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
+
#include <stdlib.h>
#include <iconv.h>
+
int
-main ()
+main (void)
{
iconv_t cd = iconv_open("","");
- iconv(cd,NULL,NULL,NULL,NULL);
- iconv_close(cd);
+ iconv(cd,NULL,NULL,NULL,NULL);
+ iconv_close(cd);
;
return 0;
}
_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
+if ac_fn_c_try_link "$LINENO"
+then :
am_cv_func_iconv=yes
fi
rm -f core conftest.err conftest.$ac_objext \
@@ -20875,19 +31576,22 @@ rm -f core conftest.err conftest.$ac_objext \
LIBS="$LIBS $LIBICONV"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
+
#include <stdlib.h>
#include <iconv.h>
+
int
-main ()
+main (void)
{
iconv_t cd = iconv_open("","");
- iconv(cd,NULL,NULL,NULL,NULL);
- iconv_close(cd);
+ iconv(cd,NULL,NULL,NULL,NULL);
+ iconv_close(cd);
;
return 0;
}
_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
+if ac_fn_c_try_link "$LINENO"
+then :
am_cv_lib_iconv=yes
am_cv_func_iconv=yes
fi
@@ -20897,24 +31601,28 @@ rm -f core conftest.err conftest.$ac_objext \
fi
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_func_iconv" >&5
-$as_echo "$am_cv_func_iconv" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_func_iconv" >&5
+printf "%s\n" "$am_cv_func_iconv" >&6; }
if test "$am_cv_func_iconv" = yes; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working iconv" >&5
-$as_echo_n "checking for working iconv... " >&6; }
-if ${am_cv_func_iconv_works+:} false; then :
- $as_echo_n "(cached) " >&6
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working iconv" >&5
+printf %s "checking for working iconv... " >&6; }
+if test ${am_cv_func_iconv_works+y}
+then :
+ printf %s "(cached) " >&6
else
- am_save_LIBS="$LIBS"
+ am_save_LIBS="$LIBS"
if test $am_cv_lib_iconv = yes; then
LIBS="$LIBS $LIBICONV"
fi
- if test "$cross_compiling" = yes; then :
- case "$host_os" in
+ if test "$cross_compiling" = yes
+then :
+
+ case "$host_os" in
aix* | hpux*) am_cv_func_iconv_works="guessing no" ;;
*) am_cv_func_iconv_works="guessing yes" ;;
esac
+
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -20923,6 +31631,7 @@ else
#include <string.h>
int main ()
{
+ int result = 0;
/* Test against AIX 5.1 bug: Failures are not distinguishable from successful
returns. */
{
@@ -20939,7 +31648,47 @@ int main ()
(char **) &inptr, &inbytesleft,
&outptr, &outbytesleft);
if (res == 0)
- return 1;
+ result |= 1;
+ iconv_close (cd_utf8_to_88591);
+ }
+ }
+ /* Test against Solaris 10 bug: Failures are not distinguishable from
+ successful returns. */
+ {
+ iconv_t cd_ascii_to_88591 = iconv_open ("ISO8859-1", "646");
+ if (cd_ascii_to_88591 != (iconv_t)(-1))
+ {
+ static const char input[] = "\263";
+ char buf[10];
+ const char *inptr = input;
+ size_t inbytesleft = strlen (input);
+ char *outptr = buf;
+ size_t outbytesleft = sizeof (buf);
+ size_t res = iconv (cd_ascii_to_88591,
+ (char **) &inptr, &inbytesleft,
+ &outptr, &outbytesleft);
+ if (res == 0)
+ result |= 2;
+ iconv_close (cd_ascii_to_88591);
+ }
+ }
+ /* Test against AIX 6.1..7.1 bug: Buffer overrun. */
+ {
+ iconv_t cd_88591_to_utf8 = iconv_open ("UTF-8", "ISO-8859-1");
+ if (cd_88591_to_utf8 != (iconv_t)(-1))
+ {
+ static const char input[] = "\304";
+ static char buf[2] = { (char)0xDE, (char)0xAD };
+ const char *inptr = input;
+ size_t inbytesleft = 1;
+ char *outptr = buf;
+ size_t outbytesleft = 1;
+ size_t res = iconv (cd_88591_to_utf8,
+ (char **) &inptr, &inbytesleft,
+ &outptr, &outbytesleft);
+ if (res != (size_t)(-1) || outptr - buf > 1 || buf[1] != (char)0xAD)
+ result |= 4;
+ iconv_close (cd_88591_to_utf8);
}
}
#if 0 /* This bug could be worked around by the caller. */
@@ -20958,7 +31707,8 @@ int main ()
(char **) &inptr, &inbytesleft,
&outptr, &outbytesleft);
if ((int)res > 0)
- return 1;
+ result |= 8;
+ iconv_close (cd_88591_to_utf8);
}
}
#endif
@@ -20972,11 +31722,12 @@ int main ()
&& iconv_open ("UTF-8", "IBM-eucJP") == (iconv_t)(-1)
/* Try HP-UX names. */
&& iconv_open ("utf8", "eucJP") == (iconv_t)(-1))
- return 1;
- return 0;
+ result |= 16;
+ return result;
}
_ACEOF
-if ac_fn_c_try_run "$LINENO"; then :
+if ac_fn_c_try_run "$LINENO"
+then :
am_cv_func_iconv_works=yes
else
am_cv_func_iconv_works=no
@@ -20988,8 +31739,8 @@ fi
LIBS="$am_save_LIBS"
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_func_iconv_works" >&5
-$as_echo "$am_cv_func_iconv_works" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_func_iconv_works" >&5
+printf "%s\n" "$am_cv_func_iconv_works" >&6; }
case "$am_cv_func_iconv_works" in
*no) am_func_iconv=no am_cv_lib_iconv=no ;;
*) am_func_iconv=yes ;;
@@ -20999,14 +31750,14 @@ $as_echo "$am_cv_func_iconv_works" >&6; }
fi
if test "$am_func_iconv" = yes; then
-$as_echo "#define HAVE_ICONV 1" >>confdefs.h
+printf "%s\n" "#define HAVE_ICONV 1" >>confdefs.h
fi
if test "$am_cv_lib_iconv" = yes; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libiconv" >&5
-$as_echo_n "checking how to link with libiconv... " >&6; }
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBICONV" >&5
-$as_echo "$LIBICONV" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to link with libiconv" >&5
+printf %s "checking how to link with libiconv... " >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $LIBICONV" >&5
+printf "%s\n" "$LIBICONV" >&6; }
else
CPPFLAGS="$am_save_CPPFLAGS"
LIBICONV=
@@ -21020,6 +31771,9 @@ $as_echo "$LIBICONV" >&6; }
+
+
+
use_additional=yes
acl_save_prefix="$prefix"
@@ -21035,7 +31789,8 @@ $as_echo "$LIBICONV" >&6; }
# Check whether --with-libintl-prefix was given.
-if test "${with_libintl_prefix+set}" = set; then :
+if test ${with_libintl_prefix+y}
+then :
withval=$with_libintl_prefix;
if test "X$withval" = "Xno"; then
use_additional=no
@@ -21056,6 +31811,10 @@ if test "${with_libintl_prefix+set}" = set; then :
else
additional_includedir="$withval/include"
additional_libdir="$withval/$acl_libdirstem"
+ if test "$acl_libdirstem2" != "$acl_libdirstem" \
+ && ! test -d "$withval/$acl_libdirstem"; then
+ additional_libdir="$withval/$acl_libdirstem2"
+ fi
fi
fi
@@ -21065,6 +31824,7 @@ fi
LTLIBINTL=
INCINTL=
LIBINTL_PREFIX=
+ HAVE_LIBINTL=
rpathdirs=
ltrpathdirs=
names_already_handled=
@@ -21082,7 +31842,7 @@ fi
done
if test -z "$already_handled"; then
names_already_handled="$names_already_handled $name"
- uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
+ uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./+-|ABCDEFGHIJKLMNOPQRSTUVWXYZ____|'`
eval value=\"\$HAVE_LIB$uppername\"
if test -n "$value"; then
if test "$value" = yes; then
@@ -21207,7 +31967,9 @@ fi
if test "X$found_dir" != "X"; then
LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }-L$found_dir -l$name"
if test "X$found_so" != "X"; then
- if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/$acl_libdirstem"; then
+ if test "$enable_rpath" = no \
+ || test "X$found_dir" = "X/usr/$acl_libdirstem" \
+ || test "X$found_dir" = "X/usr/$acl_libdirstem2"; then
LIBINTL="${LIBINTL}${LIBINTL:+ }$found_so"
else
haveit=
@@ -21274,7 +32036,16 @@ fi
case "$found_dir" in
*/$acl_libdirstem | */$acl_libdirstem/)
basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem/"'*$,,'`
- LIBINTL_PREFIX="$basedir"
+ if test "$name" = 'intl'; then
+ LIBINTL_PREFIX="$basedir"
+ fi
+ additional_includedir="$basedir/include"
+ ;;
+ */$acl_libdirstem2 | */$acl_libdirstem2/)
+ basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem2/"'*$,,'`
+ if test "$name" = 'intl'; then
+ LIBINTL_PREFIX="$basedir"
+ fi
additional_includedir="$basedir/include"
;;
esac
@@ -21323,9 +32094,11 @@ fi
case "$dep" in
-L*)
additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
- if test "X$additional_libdir" != "X/usr/$acl_libdirstem"; then
+ if test "X$additional_libdir" != "X/usr/$acl_libdirstem" \
+ && test "X$additional_libdir" != "X/usr/$acl_libdirstem2"; then
haveit=
- if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem"; then
+ if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem" \
+ || test "X$additional_libdir" = "X/usr/local/$acl_libdirstem2"; then
if test -n "$GCC"; then
case $host_os in
linux* | gnu* | k*bsd*-gnu) haveit=yes;;
@@ -21451,10 +32224,16 @@ fi
done
fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU gettext in libintl" >&5
-$as_echo_n "checking for GNU gettext in libintl... " >&6; }
-if eval \${$gt_func_gnugettext_libintl+:} false; then :
- $as_echo_n "(cached) " >&6
+
+
+
+
+
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for GNU gettext in libintl" >&5
+printf %s "checking for GNU gettext in libintl... " >&6; }
+if eval test \${$gt_func_gnugettext_libintl+y}
+then :
+ printf %s "(cached) " >&6
else
gt_save_CPPFLAGS="$CPPFLAGS"
CPPFLAGS="$CPPFLAGS $INCINTL"
@@ -21462,6 +32241,7 @@ else
LIBS="$LIBS $LIBINTL"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
+
#include <libintl.h>
$gt_revision_test_code
extern int _nl_msg_cat_cntr;
@@ -21470,16 +32250,20 @@ extern
"C"
#endif
const char *_nl_expand_alias (const char *);
+
int
-main ()
+main (void)
{
+
bindtextdomain ("", "");
return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_expand_alias ("")
+
;
return 0;
}
_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
+if ac_fn_c_try_link "$LINENO"
+then :
eval "$gt_func_gnugettext_libintl=yes"
else
eval "$gt_func_gnugettext_libintl=no"
@@ -21490,6 +32274,7 @@ rm -f core conftest.err conftest.$ac_objext \
LIBS="$LIBS $LIBICONV"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
+
#include <libintl.h>
$gt_revision_test_code
extern int _nl_msg_cat_cntr;
@@ -21498,19 +32283,23 @@ extern
"C"
#endif
const char *_nl_expand_alias (const char *);
+
int
-main ()
+main (void)
{
+
bindtextdomain ("", "");
return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_expand_alias ("")
+
;
return 0;
}
_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
+if ac_fn_c_try_link "$LINENO"
+then :
LIBINTL="$LIBINTL $LIBICONV"
- LTLIBINTL="$LTLIBINTL $LTLIBICONV"
- eval "$gt_func_gnugettext_libintl=yes"
+ LTLIBINTL="$LTLIBINTL $LTLIBICONV"
+ eval "$gt_func_gnugettext_libintl=yes"
fi
rm -f core conftest.err conftest.$ac_objext \
@@ -21520,8 +32309,8 @@ rm -f core conftest.err conftest.$ac_objext \
LIBS="$gt_save_LIBS"
fi
eval ac_res=\$$gt_func_gnugettext_libintl
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
-$as_echo "$ac_res" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+printf "%s\n" "$ac_res" >&6; }
fi
if { eval "gt_val=\$$gt_func_gnugettext_libc"; test "$gt_val" = "yes"; } \
@@ -21548,20 +32337,20 @@ $as_echo "$ac_res" >&6; }
if test "$gt_use_preinstalled_gnugettext" = "yes" \
|| test "$nls_cv_use_gnu_gettext" = "yes"; then
-$as_echo "#define ENABLE_NLS 1" >>confdefs.h
+printf "%s\n" "#define ENABLE_NLS 1" >>confdefs.h
else
USE_NLS=no
fi
fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use NLS" >&5
-$as_echo_n "checking whether to use NLS... " >&6; }
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $USE_NLS" >&5
-$as_echo "$USE_NLS" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to use NLS" >&5
+printf %s "checking whether to use NLS... " >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $USE_NLS" >&5
+printf "%s\n" "$USE_NLS" >&6; }
if test "$USE_NLS" = "yes"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking where the gettext function comes from" >&5
-$as_echo_n "checking where the gettext function comes from... " >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking where the gettext function comes from" >&5
+printf %s "checking where the gettext function comes from... " >&6; }
if test "$gt_use_preinstalled_gnugettext" = "yes"; then
if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; }; then
gt_source="external libintl"
@@ -21571,18 +32360,18 @@ $as_echo_n "checking where the gettext function comes from... " >&6; }
else
gt_source="included intl directory"
fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_source" >&5
-$as_echo "$gt_source" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_source" >&5
+printf "%s\n" "$gt_source" >&6; }
fi
if test "$USE_NLS" = "yes"; then
if test "$gt_use_preinstalled_gnugettext" = "yes"; then
if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; }; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libintl" >&5
-$as_echo_n "checking how to link with libintl... " >&6; }
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBINTL" >&5
-$as_echo "$LIBINTL" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to link with libintl" >&5
+printf %s "checking how to link with libintl... " >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $LIBINTL" >&5
+printf "%s\n" "$LIBINTL" >&6; }
for element in $INCINTL; do
haveit=
@@ -21609,10 +32398,10 @@ $as_echo "$LIBINTL" >&6; }
fi
-$as_echo "#define HAVE_GETTEXT 1" >>confdefs.h
+printf "%s\n" "#define HAVE_GETTEXT 1" >>confdefs.h
-$as_echo "#define HAVE_DCGETTEXT 1" >>confdefs.h
+printf "%s\n" "#define HAVE_DCGETTEXT 1" >>confdefs.h
fi
@@ -21640,26 +32429,24 @@ $as_echo "#define HAVE_DCGETTEXT 1" >>confdefs.h
-
-
-
-
-
-
-
-
-
-
-
# Check whether we are able to follow symlinks
if test "$ac_cv_func_lstat:$ac_cv_func_readlink" = yes:yes; then
-$as_echo "#define ENABLE_FOLLOW_SYMLINKS /**/" >>confdefs.h
+printf "%s\n" "#define ENABLE_FOLLOW_SYMLINKS /**/" >>confdefs.h
fi
+ if test "$ac_cv_func_lstat:$ac_cv_func_readlink" = yes:yes; then
+ TEST_SYMLINKS_TRUE=
+ TEST_SYMLINKS_FALSE='#'
+else
+ TEST_SYMLINKS_TRUE='#'
+ TEST_SYMLINKS_FALSE=
+fi
+
# Check whether --enable-i18n was given.
-if test "${enable_i18n+set}" = set; then :
+if test ${enable_i18n+y}
+then :
enableval=$enable_i18n;
else
enable_i18n=yes
@@ -21670,7 +32457,8 @@ if test "x$enable_i18n" = xno; then
fi
# Check whether --enable-regex-tests was given.
-if test "${enable_regex_tests+set}" = set; then :
+if test ${enable_regex_tests+y}
+then :
enableval=$enable_regex_tests; if test "x$with_included_regex" = xno; then
enable_regex_tests=no
fi
@@ -21689,9 +32477,7 @@ fi
if test "x$enable_regex_tests" = xyes; then
-cat >>confdefs.h <<_ACEOF
-#define _REGEX_RE_COMP 1
-_ACEOF
+printf "%s\n" "#define _REGEX_RE_COMP 1" >>confdefs.h
fi
@@ -21702,11 +32488,12 @@ fi
# logic is portable (though testing it requires care) so it is enough to
# have a couple of platforms where these tests pass. Right now, only
# Windows and HP/UX do not support the tests.
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether UTF-8 case folding tests should pass" >&5
-$as_echo_n "checking whether UTF-8 case folding tests should pass... " >&6; }
-if test "$cross_compiling" = yes; then :
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: don't care (cross compiling)" >&5
-$as_echo "don't care (cross compiling)" >&6; }; XFAIL_TESTS=
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether UTF-8 case folding tests should pass" >&5
+printf %s "checking whether UTF-8 case folding tests should pass... " >&6; }
+if test "$cross_compiling" = yes
+then :
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: don't care (cross compiling)" >&5
+printf "%s\n" "don't care (cross compiling)" >&6; }; XFAIL_TESTS=
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -21773,12 +32560,14 @@ int main()
}
_ACEOF
-if ac_fn_c_try_run "$LINENO"; then :
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }; XFAIL_TESTS=
+if ac_fn_c_try_run "$LINENO"
+then :
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+printf "%s\n" "yes" >&6; }; XFAIL_TESTS=
else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }; XFAIL_TESTS='utf8-1 utf8-2 utf8-3 utf8-4'
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }; XFAIL_TESTS='testsuite/utf8-1 testsuite/utf8-2 \
+ testsuite/utf8-3 testsuite/utf8-4'
fi
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
conftest.$ac_objext conftest.beam conftest.$ac_ext
@@ -21792,9 +32581,770 @@ case $host in
esac
-ac_config_files="$ac_config_files testsuite/version.good:testsuite/version.gin"
+# Check whether --enable-gcc-warnings was given.
+if test ${enable_gcc_warnings+y}
+then :
+ enableval=$enable_gcc_warnings; case $enableval in
+ yes|no) ;;
+ *) as_fn_error $? "bad value $enableval for gcc-warnings option" "$LINENO" 5 ;;
+ esac
+ gl_gcc_warnings=$enableval
+else
+
+ # GCC provides fine-grained control over diagnostics which
+ # is used in gnulib for example to suppress warnings from
+ # certain sections of code. So if this is available and
+ # we're running from a git repo, then auto enable the warnings.
+ gl_gcc_warnings=no
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#if (4) < __GNUC__ || ((4) == __GNUC__ && (6) <= __GNUC_MINOR__)
+/* ok */
+#else
+# error "your version of gcc is older than 4.6"
+#endif
+
+int
+main (void)
+{
+
+ ;
+ return 0;
+},
+
+_ACEOF
+if ac_fn_c_try_cpp "$LINENO"
+then :
+ test -d "$srcdir"/.git \
+ && ! test -f "$srcdir"/.tarball-version \
+ && gl_gcc_warnings=yes
+fi
+rm -f conftest.err conftest.i conftest.$ac_ext
+
+
+
+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
+printf %s "checking whether C compiler handles -Werror -Wunknown-warning-option... " >&6; }
+if test ${gl_cv_warn_c__Werror__Wunknown_warning_option+y}
+then :
+ printf %s "(cached) " >&6
+else
+
+ gl_save_compiler_FLAGS="$CFLAGS"
+ as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -Werror -Wunknown-warning-option"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main (void)
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"
+then :
+ gl_cv_warn_c__Werror__Wunknown_warning_option=yes
+else
+ gl_cv_warn_c__Werror__Wunknown_warning_option=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+ CFLAGS="$gl_save_compiler_FLAGS"
+
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Werror__Wunknown_warning_option" >&5
+printf "%s\n" "$gl_cv_warn_c__Werror__Wunknown_warning_option" >&6; }
+if test "x$gl_cv_warn_c__Werror__Wunknown_warning_option" = xyes
+then :
+ gl_unknown_warnings_are_errors='-Wunknown-warning-option -Werror'
+else
+ gl_unknown_warnings_are_errors=
+fi
+
+
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Werror" >&5
+printf %s "checking whether C compiler handles -Werror... " >&6; }
+if test ${gl_cv_warn_c__Werror+y}
+then :
+ printf %s "(cached) " >&6
+else
+
+ gl_save_compiler_FLAGS="$CFLAGS"
+ as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -Werror"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main (void)
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"
+then :
+ gl_cv_warn_c__Werror=yes
+else
+ gl_cv_warn_c__Werror=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+ CFLAGS="$gl_save_compiler_FLAGS"
+
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Werror" >&5
+printf "%s\n" "$gl_cv_warn_c__Werror" >&6; }
+if test "x$gl_cv_warn_c__Werror" = xyes
+then :
+ as_fn_append WERROR_CFLAGS " -Werror"
+fi
+
+
+
+
+ nw=
+ # This, $nw, is the list of warnings we disable.
+ nw="$nw -Wdeclaration-after-statement" # too useful to forbid
+ nw="$nw -Wsystem-headers" # Don't let system headers trigger warnings
+ nw="$nw -Wsign-conversion" # Too many warnings for now
+ nw="$nw -Wformat-nonliteral" # who.c and pinky.c strftime uses
+ nw="$nw -Wvla" # warnings in gettext.h
+ nw="$nw -Wswitch-default" # Too many warnings for now
+
+
+
+ if test -n "$GCC"; then
+
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether -Wno-missing-field-initializers is supported" >&5
+printf %s "checking whether -Wno-missing-field-initializers is supported... " >&6; }
+ if test ${gl_cv_cc_nomfi_supported+y}
+then :
+ printf %s "(cached) " >&6
+else
+
+ gl_save_CFLAGS="$CFLAGS"
+ CFLAGS="$CFLAGS -W -Werror -Wno-missing-field-initializers"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main (void)
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"
+then :
+ gl_cv_cc_nomfi_supported=yes
+else
+ gl_cv_cc_nomfi_supported=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ CFLAGS="$gl_save_CFLAGS"
+fi
+
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_nomfi_supported" >&5
+printf "%s\n" "$gl_cv_cc_nomfi_supported" >&6; }
+
+ if test "$gl_cv_cc_nomfi_supported" = yes; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether -Wno-missing-field-initializers is needed" >&5
+printf %s "checking whether -Wno-missing-field-initializers is needed... " >&6; }
+ if test ${gl_cv_cc_nomfi_needed+y}
+then :
+ printf %s "(cached) " >&6
+else
+
+ gl_save_CFLAGS="$CFLAGS"
+ CFLAGS="$CFLAGS -W -Werror"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+int f (void)
+ {
+ typedef struct { int a; int b; } s_t;
+ s_t s1 = { 0, };
+ return s1.b;
+ }
+
+int
+main (void)
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"
+then :
+ gl_cv_cc_nomfi_needed=no
+else
+ gl_cv_cc_nomfi_needed=yes
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ CFLAGS="$gl_save_CFLAGS"
+
+fi
+
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_nomfi_needed" >&5
+printf "%s\n" "$gl_cv_cc_nomfi_needed" >&6; }
+ fi
+
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether -Wuninitialized is supported" >&5
+printf %s "checking whether -Wuninitialized is supported... " >&6; }
+ if test ${gl_cv_cc_uninitialized_supported+y}
+then :
+ printf %s "(cached) " >&6
+else
+
+ gl_save_CFLAGS="$CFLAGS"
+ CFLAGS="$CFLAGS -Werror -Wuninitialized"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main (void)
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"
+then :
+ gl_cv_cc_uninitialized_supported=yes
+else
+ gl_cv_cc_uninitialized_supported=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ CFLAGS="$gl_save_CFLAGS"
+fi
+
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_uninitialized_supported" >&5
+printf "%s\n" "$gl_cv_cc_uninitialized_supported" >&6; }
+
+ fi
+
+ # List all gcc warning categories.
+ # To compare this list to your installed GCC's, run this Bash command:
+ #
+ # comm -3 \
+ # <(sed -n 's/^ *\(-[^ ]*\) .*/\1/p' manywarnings.m4 | sort) \
+ # <(gcc --help=warnings | sed -n 's/^ \(-[^ ]*\) .*/\1/p' | sort |
+ # grep -v -x -f <(
+ # awk '/^[^#]/ {print ws}' ../build-aux/gcc-warning.spec))
+
+ gl_manywarn_set=
+ for gl_manywarn_item in \
+ -fno-common \
+ -W \
+ -Wabi \
+ -Waddress \
+ -Waggressive-loop-optimizations \
+ -Wall \
+ -Wattributes \
+ -Wbad-function-cast \
+ -Wbool-compare \
+ -Wbuiltin-macro-redefined \
+ -Wcast-align \
+ -Wchar-subscripts \
+ -Wchkp \
+ -Wclobbered \
+ -Wcomment \
+ -Wcomments \
+ -Wcoverage-mismatch \
+ -Wcpp \
+ -Wdate-time \
+ -Wdeprecated \
+ -Wdeprecated-declarations \
+ -Wdesignated-init \
+ -Wdisabled-optimization \
+ -Wdiscarded-array-qualifiers \
+ -Wdiscarded-qualifiers \
+ -Wdiv-by-zero \
+ -Wdouble-promotion \
+ -Wduplicated-cond \
+ -Wempty-body \
+ -Wendif-labels \
+ -Wenum-compare \
+ -Wextra \
+ -Wformat-contains-nul \
+ -Wformat-extra-args \
+ -Wformat-nonliteral \
+ -Wformat-security \
+ -Wformat-signedness \
+ -Wformat-y2k \
+ -Wformat-zero-length \
+ -Wframe-address \
+ -Wfree-nonheap-object \
+ -Whsa \
+ -Wignored-attributes \
+ -Wignored-qualifiers \
+ -Wimplicit \
+ -Wimplicit-function-declaration \
+ -Wimplicit-int \
+ -Wincompatible-pointer-types \
+ -Winit-self \
+ -Winline \
+ -Wint-conversion \
+ -Wint-to-pointer-cast \
+ -Winvalid-memory-model \
+ -Winvalid-pch \
+ -Wjump-misses-init \
+ -Wlogical-not-parentheses \
+ -Wlogical-op \
+ -Wmain \
+ -Wmaybe-uninitialized \
+ -Wmemset-transposed-args \
+ -Wmisleading-indentation \
+ -Wmissing-braces \
+ -Wmissing-declarations \
+ -Wmissing-field-initializers \
+ -Wmissing-include-dirs \
+ -Wmissing-parameter-type \
+ -Wmissing-prototypes \
+ -Wmultichar \
+ -Wnarrowing \
+ -Wnested-externs \
+ -Wnonnull \
+ -Wnonnull-compare \
+ -Wnull-dereference \
+ -Wodr \
+ -Wold-style-declaration \
+ -Wold-style-definition \
+ -Wopenmp-simd \
+ -Woverflow \
+ -Woverlength-strings \
+ -Woverride-init \
+ -Wpacked \
+ -Wpacked-bitfield-compat \
+ -Wparentheses \
+ -Wpointer-arith \
+ -Wpointer-sign \
+ -Wpointer-to-int-cast \
+ -Wpragmas \
+ -Wreturn-local-addr \
+ -Wreturn-type \
+ -Wscalar-storage-order \
+ -Wsequence-point \
+ -Wshadow \
+ -Wshift-count-negative \
+ -Wshift-count-overflow \
+ -Wshift-negative-value \
+ -Wsizeof-array-argument \
+ -Wsizeof-pointer-memaccess \
+ -Wstack-protector \
+ -Wstrict-aliasing \
+ -Wstrict-overflow \
+ -Wstrict-prototypes \
+ -Wsuggest-attribute=const \
+ -Wsuggest-attribute=format \
+ -Wsuggest-attribute=noreturn \
+ -Wsuggest-attribute=pure \
+ -Wsuggest-final-methods \
+ -Wsuggest-final-types \
+ -Wswitch \
+ -Wswitch-bool \
+ -Wswitch-default \
+ -Wsync-nand \
+ -Wsystem-headers \
+ -Wtautological-compare \
+ -Wtrampolines \
+ -Wtrigraphs \
+ -Wtype-limits \
+ -Wuninitialized \
+ -Wunknown-pragmas \
+ -Wunsafe-loop-optimizations \
+ -Wunused \
+ -Wunused-but-set-parameter \
+ -Wunused-but-set-variable \
+ -Wunused-function \
+ -Wunused-label \
+ -Wunused-local-typedefs \
+ -Wunused-macros \
+ -Wunused-parameter \
+ -Wunused-result \
+ -Wunused-value \
+ -Wunused-variable \
+ -Wvarargs \
+ -Wvariadic-macros \
+ -Wvector-operation-performance \
+ -Wvla \
+ -Wvolatile-register-var \
+ -Wwrite-strings \
+ \
+ ; do
+ gl_manywarn_set="$gl_manywarn_set $gl_manywarn_item"
+ done
+
+ # 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.
+ gl_manywarn_set="$gl_manywarn_set -Warray-bounds=2"
+ gl_manywarn_set="$gl_manywarn_set -Wnormalized=nfc"
+ gl_manywarn_set="$gl_manywarn_set -Wshift-overflow=2"
+ gl_manywarn_set="$gl_manywarn_set -Wunused-const-variable=2"
+
+ # These are needed for older GCC versions.
+ if test -n "$GCC"; then
+ case `($CC --version) 2>/dev/null` in
+ 'gcc (GCC) '[0-3].* | \
+ 'gcc (GCC) '4.[0-7].*)
+ gl_manywarn_set="$gl_manywarn_set -fdiagnostics-show-option"
+ gl_manywarn_set="$gl_manywarn_set -funit-at-a-time"
+ ;;
+ esac
+ fi
+
+ # Disable specific options as needed.
+ if test "$gl_cv_cc_nomfi_needed" = yes; then
+ gl_manywarn_set="$gl_manywarn_set -Wno-missing-field-initializers"
+ fi
+
+ if test "$gl_cv_cc_uninitialized_supported" = no; then
+ gl_manywarn_set="$gl_manywarn_set -Wno-uninitialized"
+ fi
+
+ ws=$gl_manywarn_set
+
+
+ gl_warn_set=
+ set x $ws; shift
+ for gl_warn_item
+ do
+ case " $nw " in
+ *" $gl_warn_item "*)
+ ;;
+ *)
+ gl_warn_set="$gl_warn_set $gl_warn_item"
+ ;;
+ esac
+ done
+ ws=$gl_warn_set
+
+ 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
+ -Wno-*) gl_positive=-W`expr "X$gl_positive" : 'X-Wno-\(.*\)'` ;;
+esac
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles $w" >&5
+printf %s "checking whether C compiler handles $w... " >&6; }
+if eval test \${$as_gl_Warn+y}
+then :
+ printf %s "(cached) " >&6
+else
+
+ gl_save_compiler_FLAGS="$CFLAGS"
+ as_fn_append CFLAGS " $gl_unknown_warnings_are_errors $gl_positive"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main (void)
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"
+then :
+ eval "$as_gl_Warn=yes"
+else
+ eval "$as_gl_Warn=no"
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+ CFLAGS="$gl_save_compiler_FLAGS"
+
+fi
+eval ac_res=\$$as_gl_Warn
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+printf "%s\n" "$ac_res" >&6; }
+if eval test \"x\$"$as_gl_Warn"\" = x"yes"
+then :
+ as_fn_append WARN_CFLAGS " $w"
+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}
+then :
+ printf %s "(cached) " >&6
+else
+
+ gl_save_compiler_FLAGS="$CFLAGS"
+ as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -Wsign-compare"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main (void)
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"
+then :
+ gl_cv_warn_c__Wno_sign_compare=yes
+else
+ gl_cv_warn_c__Wno_sign_compare=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+ CFLAGS="$gl_save_compiler_FLAGS"
+
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Wno_sign_compare" >&5
+printf "%s\n" "$gl_cv_warn_c__Wno_sign_compare" >&6; }
+if test "x$gl_cv_warn_c__Wno_sign_compare" = xyes
+then :
+ as_fn_append WARN_CFLAGS " -Wno-sign-compare"
+fi
+
+ # Too many warnings for now
+
+ # clang is unduly picky about some things.
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the compiler is clang" >&5
+printf %s "checking whether the compiler is clang... " >&6; }
+if test ${utils_cv_clang+y}
+then :
+ printf %s "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+ #ifndef __clang__
+ #error "not clang"
+ #endif
+
+int
+main (void)
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"
+then :
+ utils_cv_clang=yes
+else
+ utils_cv_clang=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $utils_cv_clang" >&5
+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}
+then :
+ printf %s "(cached) " >&6
+else
+
+ gl_save_compiler_FLAGS="$CFLAGS"
+ as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -Wformat-extra-args"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main (void)
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"
+then :
+ gl_cv_warn_c__Wno_format_extra_args=yes
+else
+ gl_cv_warn_c__Wno_format_extra_args=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+ CFLAGS="$gl_save_compiler_FLAGS"
+
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Wno_format_extra_args" >&5
+printf "%s\n" "$gl_cv_warn_c__Wno_format_extra_args" >&6; }
+if test "x$gl_cv_warn_c__Wno_format_extra_args" = xyes
+then :
+ as_fn_append WARN_CFLAGS " -Wno-format-extra-args"
+fi
+
+
-ac_config_files="$ac_config_files Makefile doc/Makefile lib/Makefile sed/Makefile testsuite/Makefile po/Makefile.in"
+{ 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}
+then :
+ printf %s "(cached) " >&6
+else
+
+ gl_save_compiler_FLAGS="$CFLAGS"
+ as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -Wtautological-constant-out-of-range-compare"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main (void)
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"
+then :
+ gl_cv_warn_c__Wno_tautological_constant_out_of_range_compare=yes
+else
+ gl_cv_warn_c__Wno_tautological_constant_out_of_range_compare=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+ CFLAGS="$gl_save_compiler_FLAGS"
+
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Wno_tautological_constant_out_of_range_compare" >&5
+printf "%s\n" "$gl_cv_warn_c__Wno_tautological_constant_out_of_range_compare" >&6; }
+if test "x$gl_cv_warn_c__Wno_tautological_constant_out_of_range_compare" = xyes
+then :
+ as_fn_append WARN_CFLAGS " -Wno-tautological-constant-out-of-range-compare"
+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}
+then :
+ printf %s "(cached) " >&6
+else
+
+ gl_save_compiler_FLAGS="$CFLAGS"
+ as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -fdiagnostics-show-option"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main (void)
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"
+then :
+ gl_cv_warn_c__fdiagnostics_show_option=yes
+else
+ gl_cv_warn_c__fdiagnostics_show_option=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+ CFLAGS="$gl_save_compiler_FLAGS"
+
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__fdiagnostics_show_option" >&5
+printf "%s\n" "$gl_cv_warn_c__fdiagnostics_show_option" >&6; }
+if test "x$gl_cv_warn_c__fdiagnostics_show_option" = xyes
+then :
+ as_fn_append WARN_CFLAGS " -fdiagnostics-show-option"
+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}
+then :
+ printf %s "(cached) " >&6
+else
+
+ gl_save_compiler_FLAGS="$CFLAGS"
+ as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -funit-at-a-time"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main (void)
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"
+then :
+ gl_cv_warn_c__funit_at_a_time=yes
+else
+ gl_cv_warn_c__funit_at_a_time=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+ CFLAGS="$gl_save_compiler_FLAGS"
+
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__funit_at_a_time" >&5
+printf "%s\n" "$gl_cv_warn_c__funit_at_a_time" >&6; }
+if test "x$gl_cv_warn_c__funit_at_a_time" = xyes
+then :
+ as_fn_append WARN_CFLAGS " -funit-at-a-time"
+fi
+
+
+
+
+
+
+printf "%s\n" "#define lint 1" >>confdefs.h
+
+
+
+printf "%s\n" "#define GNULIB_PORTCHECK 1" >>confdefs.h
+
+
+ # For gnulib-tests, the set is slightly smaller still.
+ nw=
+
+ gl_warn_set=
+ set x $WARN_CFLAGS; shift
+ for gl_warn_item
+ do
+ case " $nw " in
+ *" $gl_warn_item "*)
+ ;;
+ *)
+ gl_warn_set="$gl_warn_set $gl_warn_item"
+ ;;
+ esac
+ done
+ GNULIB_TEST_WARN_CFLAGS=$gl_warn_set
+
+
+fi
+
+ac_config_files="$ac_config_files Makefile po/Makefile.in gnulib-tests/Makefile"
cat >confcache <<\_ACEOF
# This file is a shell script that caches the results of configure
@@ -21823,8 +33373,8 @@ _ACEOF
case $ac_val in #(
*${as_nl}*)
case $ac_var in #(
- *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
-$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
+ *_cv_*) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
+printf "%s\n" "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
esac
case $ac_var in #(
_ | IFS | as_nl) ;; #(
@@ -21854,15 +33404,15 @@ $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
/^ac_cv_env_/b end
t clear
:clear
- s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
+ s/^\([^=]*\)=\(.*[{}].*\)$/test ${\1+y} || &/
t end
s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
:end' >>confcache
if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
if test -w "$cache_file"; then
if test "x$cache_file" != "x/dev/null"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
-$as_echo "$as_me: updating cache $cache_file" >&6;}
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
+printf "%s\n" "$as_me: updating cache $cache_file" >&6;}
if test ! -f "$cache_file" || test -h "$cache_file"; then
cat confcache >"$cache_file"
else
@@ -21876,8 +33426,8 @@ $as_echo "$as_me: updating cache $cache_file" >&6;}
fi
fi
else
- { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
-$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
+printf "%s\n" "$as_me: not updating unwritable cache $cache_file" >&6;}
fi
fi
rm -f confcache
@@ -21890,11 +33440,10 @@ DEFS=-DHAVE_CONFIG_H
ac_libobjs=
ac_ltlibobjs=
-U=
for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
# 1. Remove the extension, and $U if already installed.
ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
- ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
+ ac_i=`printf "%s\n" "$ac_i" | sed "$ac_script"`
# 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
# will be set to the directory where LIBOBJS objects are built.
as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
@@ -21905,14 +33454,14 @@ LIBOBJS=$ac_libobjs
LTLIBOBJS=$ac_ltlibobjs
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking that generated files are newer than configure" >&5
-$as_echo_n "checking that generated files are newer than configure... " >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking that generated files are newer than configure" >&5
+printf %s "checking that generated files are newer than configure... " >&6; }
if test -n "$am_sleep_pid"; then
# Hide warnings about reused PIDs.
wait $am_sleep_pid 2>/dev/null
fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
-$as_echo "done" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: done" >&5
+printf "%s\n" "done" >&6; }
if test -n "$EXEEXT"; then
am__EXEEXT_TRUE=
am__EXEEXT_FALSE='#'
@@ -21941,14 +33490,49 @@ if test -z "${GL_GENERATE_ERRNO_H_TRUE}" && test -z "${GL_GENERATE_ERRNO_H_FALSE
as_fn_error $? "conditional \"GL_GENERATE_ERRNO_H\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
fi
+if test -z "${GL_GENERATE_LIMITS_H_TRUE}" && test -z "${GL_GENERATE_LIMITS_H_FALSE}"; then
+ as_fn_error $? "conditional \"GL_GENERATE_LIMITS_H\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
if test -z "${GL_GENERATE_STDDEF_H_TRUE}" && test -z "${GL_GENERATE_STDDEF_H_FALSE}"; then
as_fn_error $? "conditional \"GL_GENERATE_STDDEF_H\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
fi
+CONFIG_INCLUDE=config.h
+
+
+
+
+ # Tell AC_LIBSOURCES where to find source files like alloca.c.
+
+
+ # This hack originated in bison. It is required when using non-recursive
+ # automake rules to build from gnulib-provided lib/ sources. Hence, LIB_DIR
+ # is usually simply "lib". Those rules use the list of names like "fchdir.o"
+ # and "strstr.o" in gl_LIBOBJS. With non-recursive make, we must prefix each
+ # such file name with the "lib/" prefix. See also build-aux/prefix-gnulib-mk.
+ gl_LIBOBJS=`echo "$gl_LIBOBJS" | sed -e 's, , lib/,g'`
+
+ # Listing the names of the variables to prefix is error-prone.
+ # Rather, adjust each AC_SUBST'd variable whose name ends in '_H'
+ # and whose value ends in '.h'.
+ for ac_var in $ac_subst_vars
+ do
+ eval "ac_val=\$$ac_var"
+ case $ac_var:$ac_val in
+ *_H:*.h) eval "$ac_var=lib/\$$ac_var";;
+ esac
+ done
+
+
if test -z "${GL_GENERATE_SELINUX_CONTEXT_H_TRUE}" && test -z "${GL_GENERATE_SELINUX_CONTEXT_H_FALSE}"; then
as_fn_error $? "conditional \"GL_GENERATE_SELINUX_CONTEXT_H\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
fi
+if test -z "${GL_GENERATE_STDALIGN_H_TRUE}" && test -z "${GL_GENERATE_STDALIGN_H_FALSE}"; then
+ as_fn_error $? "conditional \"GL_GENERATE_STDALIGN_H\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
if test -z "${GL_GENERATE_STDARG_H_TRUE}" && test -z "${GL_GENERATE_STDARG_H_FALSE}"; then
as_fn_error $? "conditional \"GL_GENERATE_STDARG_H\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
@@ -21961,6 +33545,10 @@ if test -z "${GL_GENERATE_STDDEF_H_TRUE}" && test -z "${GL_GENERATE_STDDEF_H_FAL
as_fn_error $? "conditional \"GL_GENERATE_STDDEF_H\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
fi
+if test -z "${GL_GENERATE_LIMITS_H_TRUE}" && test -z "${GL_GENERATE_LIMITS_H_FALSE}"; then
+ as_fn_error $? "conditional \"GL_GENERATE_LIMITS_H\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
if test -z "${GL_GENERATE_STDINT_H_TRUE}" && test -z "${GL_GENERATE_STDINT_H_FALSE}"; then
as_fn_error $? "conditional \"GL_GENERATE_STDINT_H\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
@@ -21997,6 +33585,10 @@ 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.
+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.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
@@ -22006,8 +33598,8 @@ fi
ac_write_fail=0
ac_clean_files_save=$ac_clean_files
ac_clean_files="$ac_clean_files $CONFIG_STATUS"
-{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
-$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
+printf "%s\n" "$as_me: creating $CONFIG_STATUS" >&6;}
as_write_fail=0
cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
#! $SHELL
@@ -22030,7 +33622,8 @@ cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
# Be more Bourne compatible
DUALCASE=1; export DUALCASE # for MKS sh
-if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
+if test ${ZSH_VERSION+y} && (emulate sh) >/dev/null 2>&1
+then :
emulate sh
NULLCMD=:
# Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
@@ -22047,46 +33640,8 @@ esac
fi
-as_nl='
-'
-export as_nl
-# Printing a long string crashes Solaris 7 /usr/bin/printf.
-as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
-as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
-as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
-# Prefer a ksh shell builtin over an external printf program on Solaris,
-# but without wasting forks for bash or zsh.
-if test -z "$BASH_VERSION$ZSH_VERSION" \
- && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
- as_echo='print -r --'
- as_echo_n='print -rn --'
-elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
- as_echo='printf %s\n'
- as_echo_n='printf %s'
-else
- if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
- as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
- as_echo_n='/usr/ucb/echo -n'
- else
- as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
- as_echo_n_body='eval
- arg=$1;
- case $arg in #(
- *"$as_nl"*)
- expr "X$arg" : "X\\(.*\\)$as_nl";
- arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
- esac;
- expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
- '
- export as_echo_n_body
- as_echo_n='sh -c $as_echo_n_body as_echo'
- fi
- export as_echo_body
- as_echo='sh -c $as_echo_body as_echo'
-fi
-
# The user is always right.
-if test "${PATH_SEPARATOR+set}" != set; then
+if ${PATH_SEPARATOR+false} :; then
PATH_SEPARATOR=:
(PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
(PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
@@ -22100,6 +33655,9 @@ fi
# there to prevent editors from complaining about space-tab.
# (If _AS_PATH_WALK were called with IFS unset, it would disable word
# splitting by setting IFS to empty value.)
+as_nl='
+'
+export as_nl
IFS=" "" $as_nl"
# Find who we are. Look in the path if we contain no directory separator.
@@ -22110,8 +33668,12 @@ case $0 in #((
for as_dir in $PATH
do
IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
+ test -r "$as_dir$0" && as_myself=$as_dir$0 && break
done
IFS=$as_save_IFS
@@ -22123,7 +33685,7 @@ if test "x$as_myself" = x; then
as_myself=$0
fi
if test ! -f "$as_myself"; then
- $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
+ printf "%s\n" "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
exit 1
fi
@@ -22132,7 +33694,7 @@ fi
# suppresses any "Segmentation fault" message there. '((' could
# trigger a bug in pdksh 5.2.14.
for as_var in BASH_ENV ENV MAIL MAILPATH
-do eval test x\${$as_var+set} = xset \
+do eval test \${$as_var+y} \
&& ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
done
PS1='$ '
@@ -22159,9 +33721,9 @@ as_fn_error ()
as_status=$1; test $as_status -eq 0 && as_status=1
if test "$4"; then
as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
- $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
fi
- $as_echo "$as_me: error: $2" >&2
+ printf "%s\n" "$as_me: error: $2" >&2
as_fn_exit $as_status
} # as_fn_error
@@ -22198,7 +33760,8 @@ as_unset=as_fn_unset
# advantage of any shell optimizations that allow amortized linear growth over
# repeated appends, instead of the typical quadratic growth present in naive
# implementations.
-if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
+if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null
+then :
eval 'as_fn_append ()
{
eval $1+=\$2
@@ -22215,7 +33778,8 @@ fi # as_fn_append
# Perform arithmetic evaluation on the ARGs, and store the result in the
# global $as_val. Take advantage of shells that can avoid forks. The arguments
# must be portable across $(()) and expr.
-if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
+if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null
+then :
eval 'as_fn_arith ()
{
as_val=$(( $* ))
@@ -22251,7 +33815,7 @@ as_me=`$as_basename -- "$0" ||
$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
X"$0" : 'X\(//\)$' \| \
X"$0" : 'X\(/\)' \| . 2>/dev/null ||
-$as_echo X/"$0" |
+printf "%s\n" X/"$0" |
sed '/^.*\/\([^/][^/]*\)\/*$/{
s//\1/
q
@@ -22327,7 +33891,7 @@ as_fn_mkdir_p ()
as_dirs=
while :; do
case $as_dir in #(
- *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
+ *\'*) as_qdir=`printf "%s\n" "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
*) as_qdir=$as_dir;;
esac
as_dirs="'$as_qdir' $as_dirs"
@@ -22336,7 +33900,7 @@ $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
X"$as_dir" : 'X\(//\)[^/]' \| \
X"$as_dir" : 'X\(//\)$' \| \
X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
-$as_echo X"$as_dir" |
+printf "%s\n" X"$as_dir" |
sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
s//\1/
q
@@ -22398,8 +33962,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.2.2, which was
-generated by GNU Autoconf 2.69. Invocation command line was
+This file was extended by GNU sed $as_me 4.3, which was
+generated by GNU Autoconf 2.69.183-96821. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
CONFIG_HEADERS = $CONFIG_HEADERS
@@ -22425,6 +33989,7 @@ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
# Files that config.status was made for.
config_files="$ac_config_files"
config_headers="$ac_config_headers"
+config_links="$ac_config_links"
config_commands="$ac_config_commands"
_ACEOF
@@ -22455,6 +34020,9 @@ $config_files
Configuration headers:
$config_headers
+Configuration links:
+$config_links
+
Configuration commands:
$config_commands
@@ -22464,13 +34032,13 @@ General help using GNU software: <http://www.gnu.org/gethelp/>."
_ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
-ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
+ac_cs_config="`printf "%s\n" "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
ac_cs_version="\\
-GNU sed config.status 4.2.2
-configured by $0, generated by GNU Autoconf 2.69,
+GNU sed config.status 4.3
+configured by $0, generated by GNU Autoconf 2.69.183-96821,
with options \\"\$ac_cs_config\\"
-Copyright (C) 2012 Free Software Foundation, Inc.
+Copyright (C) 2016 Free Software Foundation, Inc.
This config.status script is free software; the Free Software Foundation
gives unlimited permission to copy, distribute and modify it."
@@ -22510,15 +34078,15 @@ do
-recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
ac_cs_recheck=: ;;
--version | --versio | --versi | --vers | --ver | --ve | --v | -V )
- $as_echo "$ac_cs_version"; exit ;;
+ printf "%s\n" "$ac_cs_version"; exit ;;
--config | --confi | --conf | --con | --co | --c )
- $as_echo "$ac_cs_config"; exit ;;
+ printf "%s\n" "$ac_cs_config"; exit ;;
--debug | --debu | --deb | --de | --d | -d )
debug=: ;;
--file | --fil | --fi | --f )
$ac_shift
case $ac_optarg in
- *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
+ *\'*) ac_optarg=`printf "%s\n" "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
'') as_fn_error $? "missing file argument" ;;
esac
as_fn_append CONFIG_FILES " '$ac_optarg'"
@@ -22526,7 +34094,7 @@ do
--header | --heade | --head | --hea )
$ac_shift
case $ac_optarg in
- *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
+ *\'*) ac_optarg=`printf "%s\n" "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
esac
as_fn_append CONFIG_HEADERS " '$ac_optarg'"
ac_need_defaults=false;;
@@ -22535,7 +34103,7 @@ do
as_fn_error $? "ambiguous option: \`$1'
Try \`$0 --help' for more information.";;
--help | --hel | -h )
- $as_echo "$ac_cs_usage"; exit ;;
+ printf "%s\n" "$ac_cs_usage"; exit ;;
-q | -quiet | --quiet | --quie | --qui | --qu | --q \
| -silent | --silent | --silen | --sile | --sil | --si | --s)
ac_cs_silent=: ;;
@@ -22563,7 +34131,7 @@ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
if \$ac_cs_recheck; then
set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
shift
- \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
+ \printf "%s\n" "running CONFIG_SHELL=$SHELL \$*" >&6
CONFIG_SHELL='$SHELL'
export CONFIG_SHELL
exec "\$@"
@@ -22577,7 +34145,7 @@ exec 5>>config.log
sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
## Running $as_me. ##
_ASBOX
- $as_echo "$ac_log"
+ printf "%s\n" "$ac_log"
} >&5
_ACEOF
@@ -22585,7 +34153,8 @@ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
#
# INIT-COMMANDS
#
-AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"
+AMDEP_TRUE="$AMDEP_TRUE" MAKE="${MAKE-make}"
+GNUmakefile=$GNUmakefile
# Capture the value of obsolete ALL_LINGUAS because we need it to compute
# POFILES, UPDATEPOFILES, DUMMYPOFILES, GMOFILES, CATALOGS. But hide it
# from automake < 1.5.
@@ -22604,14 +34173,11 @@ do
case $ac_config_target in
"config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h:config_h.in" ;;
"depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;;
+ "$GNUmakefile") CONFIG_LINKS="$CONFIG_LINKS $GNUmakefile:$GNUmakefile" ;;
"po-directories") CONFIG_COMMANDS="$CONFIG_COMMANDS po-directories" ;;
- "testsuite/version.good") CONFIG_FILES="$CONFIG_FILES testsuite/version.good:testsuite/version.gin" ;;
"Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
- "doc/Makefile") CONFIG_FILES="$CONFIG_FILES doc/Makefile" ;;
- "lib/Makefile") CONFIG_FILES="$CONFIG_FILES lib/Makefile" ;;
- "sed/Makefile") CONFIG_FILES="$CONFIG_FILES sed/Makefile" ;;
- "testsuite/Makefile") CONFIG_FILES="$CONFIG_FILES testsuite/Makefile" ;;
"po/Makefile.in") CONFIG_FILES="$CONFIG_FILES po/Makefile.in" ;;
+ "gnulib-tests/Makefile") CONFIG_FILES="$CONFIG_FILES gnulib-tests/Makefile" ;;
*) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
esac
@@ -22623,9 +34189,10 @@ done
# We use the long form for the default assignment because of an extremely
# bizarre bug on SunOS 4.1.3.
if $ac_need_defaults; then
- test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
- test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
- test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
+ test ${CONFIG_FILES+y} || CONFIG_FILES=$config_files
+ test ${CONFIG_HEADERS+y} || CONFIG_HEADERS=$config_headers
+ test ${CONFIG_LINKS+y} || CONFIG_LINKS=$config_links
+ test ${CONFIG_COMMANDS+y} || CONFIG_COMMANDS=$config_commands
fi
# Have a temporary directory for convenience. Make it in the build tree
@@ -22922,7 +34489,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
fi # test -n "$CONFIG_HEADERS"
-eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :C $CONFIG_COMMANDS"
+eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :L $CONFIG_LINKS :C $CONFIG_COMMANDS"
shift
for ac_tag
do
@@ -22961,7 +34528,7 @@ do
esac ||
as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
esac
- case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
+ case $ac_f in *\'*) ac_f=`printf "%s\n" "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
as_fn_append ac_file_inputs " '$ac_f'"
done
@@ -22969,17 +34536,17 @@ do
# use $as_me), people would be surprised to read:
# /* config.h. Generated by config.status. */
configure_input='Generated from '`
- $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
+ printf "%s\n" "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
`' by configure.'
if test x"$ac_file" != x-; then
configure_input="$ac_file. $configure_input"
- { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
-$as_echo "$as_me: creating $ac_file" >&6;}
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
+printf "%s\n" "$as_me: creating $ac_file" >&6;}
fi
# Neutralize special characters interpreted by sed in replacement strings.
case $configure_input in #(
*\&* | *\|* | *\\* )
- ac_sed_conf_input=`$as_echo "$configure_input" |
+ ac_sed_conf_input=`printf "%s\n" "$configure_input" |
sed 's/[\\\\&|]/\\\\&/g'`;; #(
*) ac_sed_conf_input=$configure_input;;
esac
@@ -22996,7 +34563,7 @@ $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
X"$ac_file" : 'X\(//\)[^/]' \| \
X"$ac_file" : 'X\(//\)$' \| \
X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
-$as_echo X"$ac_file" |
+printf "%s\n" X"$ac_file" |
sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
s//\1/
q
@@ -23020,9 +34587,9 @@ $as_echo X"$ac_file" |
case "$ac_dir" in
.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
*)
- ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
+ ac_dir_suffix=/`printf "%s\n" "$ac_dir" | sed 's|^\.[\\/]||'`
# A ".." for each directory in $ac_dir_suffix.
- ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
+ ac_top_builddir_sub=`printf "%s\n" "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
case $ac_top_builddir_sub in
"") ac_top_builddir_sub=. ac_top_build_prefix= ;;
*) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
@@ -23084,8 +34651,8 @@ ac_sed_dataroot='
case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
*datarootdir*) ac_datarootdir_seen=yes;;
*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
-$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
+printf "%s\n" "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
_ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_datarootdir_hack='
@@ -23129,9 +34696,9 @@ test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
{ ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
{ ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
"$ac_tmp/out"`; test -z "$ac_out"; } &&
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
which seems to be undefined. Please make sure it is defined" >&5
-$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
+printf "%s\n" "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
which seems to be undefined. Please make sure it is defined" >&2;}
rm -f "$ac_tmp/stdin"
@@ -23147,20 +34714,20 @@ which seems to be undefined. Please make sure it is defined" >&2;}
#
if test x"$ac_file" != x-; then
{
- $as_echo "/* $configure_input */" \
+ printf "%s\n" "/* $configure_input */" \
&& eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
} >"$ac_tmp/config.h" \
|| as_fn_error $? "could not create $ac_file" "$LINENO" 5
if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
-$as_echo "$as_me: $ac_file is unchanged" >&6;}
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
+printf "%s\n" "$as_me: $ac_file is unchanged" >&6;}
else
rm -f "$ac_file"
mv "$ac_tmp/config.h" "$ac_file" \
|| as_fn_error $? "could not create $ac_file" "$LINENO" 5
fi
else
- $as_echo "/* $configure_input */" \
+ printf "%s\n" "/* $configure_input */" \
&& eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
|| as_fn_error $? "could not create -" "$LINENO" 5
fi
@@ -23180,7 +34747,7 @@ $as_expr X"$_am_arg" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
X"$_am_arg" : 'X\(//\)[^/]' \| \
X"$_am_arg" : 'X\(//\)$' \| \
X"$_am_arg" : 'X\(/\)' \| . 2>/dev/null ||
-$as_echo X"$_am_arg" |
+printf "%s\n" X"$_am_arg" |
sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
s//\1/
q
@@ -23199,41 +34766,78 @@ $as_echo X"$_am_arg" |
}
s/.*/./; q'`/stamp-h$_am_stamp_count
;;
+ :L)
+ #
+ # CONFIG_LINK
+ #
- :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
-$as_echo "$as_me: executing $ac_file commands" >&6;}
+ if test "$ac_source" = "$ac_file" && test "$srcdir" = '.'; then
+ :
+ else
+ # Prefer the file from the source tree if names are identical.
+ if test "$ac_source" = "$ac_file" || test ! -r "$ac_source"; then
+ ac_source=$srcdir/$ac_source
+ fi
+
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: linking $ac_source to $ac_file" >&5
+printf "%s\n" "$as_me: linking $ac_source to $ac_file" >&6;}
+
+ if test ! -r "$ac_source"; then
+ as_fn_error $? "$ac_source: file not found" "$LINENO" 5
+ fi
+ rm -f "$ac_file"
+
+ # Try a relative symlink, then a hard link, then a copy.
+ case $ac_source in
+ [\\/$]* | ?:[\\/]* ) ac_rel_source=$ac_source ;;
+ *) ac_rel_source=$ac_top_build_prefix$ac_source ;;
+ esac
+ ln -s "$ac_rel_source" "$ac_file" 2>/dev/null ||
+ ln "$ac_source" "$ac_file" 2>/dev/null ||
+ cp -p "$ac_source" "$ac_file" ||
+ as_fn_error $? "cannot link or copy $ac_source to $ac_file" "$LINENO" 5
+ fi
+ ;;
+ :C) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
+printf "%s\n" "$as_me: executing $ac_file commands" >&6;}
;;
esac
case $ac_file$ac_mode in
"depfiles":C) test x"$AMDEP_TRUE" != x"" || {
- # Autoconf 2.62 quotes --file arguments for eval, but not when files
+ # Older Autoconf quotes --file arguments for eval, but not when files
# are listed without --file. Let's play safe and only enable the eval
# if we detect the quoting.
- case $CONFIG_FILES in
- *\'*) eval set x "$CONFIG_FILES" ;;
- *) set x $CONFIG_FILES ;;
- esac
+ # TODO: see whether this extra hack can be removed once we start
+ # requiring Autoconf 2.70 or later.
+ case $CONFIG_FILES in #(
+ *\'*) :
+ eval set x "$CONFIG_FILES" ;; #(
+ *) :
+ set x $CONFIG_FILES ;; #(
+ *) :
+ ;;
+esac
shift
- for mf
+ # Used to flag and report bootstrapping failures.
+ am_rc=0
+ for am_mf
do
# Strip MF so we end up with the name of the file.
- mf=`echo "$mf" | sed -e 's/:.*$//'`
- # Check whether this is an Automake generated Makefile or not.
- # We used to match only the files named 'Makefile.in', but
- # some people rename them; so instead we look at the file content.
- # Grep'ing the first line is not enough: some people post-process
- # each Makefile.in and add a new line on top of each file to say so.
- # Grep'ing the whole file is not good either: AIX grep has a line
+ am_mf=`printf "%s\n" "$am_mf" | sed -e 's/:.*$//'`
+ # Check whether this is an Automake generated Makefile which includes
+ # dependency-tracking related rules and includes.
+ # Grep'ing the whole file directly is not great: AIX grep has a line
# limit of 2048, but all sed's we know have understand at least 4000.
- if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
- dirpart=`$as_dirname -- "$mf" ||
-$as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
- X"$mf" : 'X\(//\)[^/]' \| \
- X"$mf" : 'X\(//\)$' \| \
- X"$mf" : 'X\(/\)' \| . 2>/dev/null ||
-$as_echo X"$mf" |
+ sed -n 's,^am--depfiles:.*,X,p' "$am_mf" | grep X >/dev/null 2>&1 \
+ || continue
+ am_dirpart=`$as_dirname -- "$am_mf" ||
+$as_expr X"$am_mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$am_mf" : 'X\(//\)[^/]' \| \
+ X"$am_mf" : 'X\(//\)$' \| \
+ X"$am_mf" : 'X\(/\)' \| . 2>/dev/null ||
+printf "%s\n" X"$am_mf" |
sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
s//\1/
q
@@ -23251,53 +34855,48 @@ $as_echo X"$mf" |
q
}
s/.*/./; q'`
- else
- continue
- fi
- # Extract the definition of DEPDIR, am__include, and am__quote
- # from the Makefile without running 'make'.
- DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
- test -z "$DEPDIR" && continue
- am__include=`sed -n 's/^am__include = //p' < "$mf"`
- test -z "am__include" && continue
- am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
- # Find all dependency output files, they are included files with
- # $(DEPDIR) in their names. We invoke sed twice because it is the
- # simplest approach to changing $(DEPDIR) to its actual value in the
- # expansion.
- for file in `sed -n "
- s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
- sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g'`; do
- # Make sure the directory exists.
- test -f "$dirpart/$file" && continue
- fdir=`$as_dirname -- "$file" ||
-$as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
- X"$file" : 'X\(//\)[^/]' \| \
- X"$file" : 'X\(//\)$' \| \
- X"$file" : 'X\(/\)' \| . 2>/dev/null ||
-$as_echo X"$file" |
- sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
- s//\1/
- q
- }
- /^X\(\/\/\)[^/].*/{
+ am_filepart=`$as_basename -- "$am_mf" ||
+$as_expr X/"$am_mf" : '.*/\([^/][^/]*\)/*$' \| \
+ X"$am_mf" : 'X\(//\)$' \| \
+ X"$am_mf" : 'X\(/\)' \| . 2>/dev/null ||
+printf "%s\n" X/"$am_mf" |
+ sed '/^.*\/\([^/][^/]*\)\/*$/{
s//\1/
q
}
- /^X\(\/\/\)$/{
+ /^X\/\(\/\/\)$/{
s//\1/
q
}
- /^X\(\/\).*/{
+ /^X\/\(\/\).*/{
s//\1/
q
}
s/.*/./; q'`
- as_dir=$dirpart/$fdir; as_fn_mkdir_p
- # echo "creating $dirpart/$file"
- echo '# dummy' > "$dirpart/$file"
- done
+ { echo "$as_me:$LINENO: cd "$am_dirpart" \
+ && sed -e '/# am--include-marker/d' "$am_filepart" \
+ | $MAKE -f - am--depfiles" >&5
+ (cd "$am_dirpart" \
+ && sed -e '/# am--include-marker/d' "$am_filepart" \
+ | $MAKE -f - am--depfiles) >&5 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } || am_rc=$?
done
+ if test $am_rc -ne 0; then
+ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "Something went wrong bootstrapping makefile fragments
+ for automatic dependency tracking. Try re-running configure with the
+ '--disable-dependency-tracking' option to at least be able to build
+ the package (albeit without support for automatic dependency tracking).
+See \`config.log' for more details" "$LINENO" 5; }
+ fi
+ { am_dirpart=; unset am_dirpart;}
+ { am_filepart=; unset am_filepart;}
+ { am_mf=; unset am_mf;}
+ { am_rc=; unset am_rc;}
+ rm -f conftest-deps.mk
}
;;
"po-directories":C)
@@ -23310,7 +34909,7 @@ $as_echo X"$file" |
case "$ac_file" in */Makefile.in)
# Adjust a relative srcdir.
ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'`
- ac_dir_suffix="/`echo "$ac_dir"|sed 's%^\./%%'`"
+ ac_dir_suffix=/`echo "$ac_dir"|sed 's%^\./%%'`
ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'`
# In autoconf-2.13 it is called $ac_given_srcdir.
# In autoconf-2.50 it is called $srcdir.
@@ -23326,7 +34925,8 @@ $as_echo X"$file" |
if test -f "$ac_given_srcdir/$ac_dir/POTFILES.in"; then
rm -f "$ac_dir/POTFILES"
test -n "$as_me" && echo "$as_me: creating $ac_dir/POTFILES" || echo "creating $ac_dir/POTFILES"
- cat "$ac_given_srcdir/$ac_dir/POTFILES.in" | sed -e "/^#/d" -e "/^[ ]*\$/d" -e "s,.*, $top_srcdir/& \\\\," | sed -e "\$s/\(.*\) \\\\/\1/" > "$ac_dir/POTFILES"
+ gt_tab=`printf '\t'`
+ cat "$ac_given_srcdir/$ac_dir/POTFILES.in" | sed -e "/^#/d" -e "/^[ ${gt_tab}]*\$/d" -e "s,.*, $top_srcdir/& \\\\," | sed -e "\$s/\(.*\) \\\\/\1/" > "$ac_dir/POTFILES"
POMAKEFILEDEPS="POTFILES.in"
# ALL_LINGUAS, POFILES, UPDATEPOFILES, DUMMYPOFILES, GMOFILES depend
# on $ac_dir but don't depend on user-specified configuration
@@ -23337,12 +34937,12 @@ $as_echo X"$file" |
test -n "$as_me" && echo "$as_me: setting ALL_LINGUAS in configure.in is obsolete" || echo "setting ALL_LINGUAS in configure.in is obsolete"
fi
ALL_LINGUAS_=`sed -e "/^#/d" -e "s/#.*//" "$ac_given_srcdir/$ac_dir/LINGUAS"`
- # Hide the ALL_LINGUAS assigment from automake < 1.5.
+ # Hide the ALL_LINGUAS assignment from automake < 1.5.
eval 'ALL_LINGUAS''=$ALL_LINGUAS_'
POMAKEFILEDEPS="$POMAKEFILEDEPS LINGUAS"
else
# The set of available languages was given in configure.in.
- # Hide the ALL_LINGUAS assigment from automake < 1.5.
+ # Hide the ALL_LINGUAS assignment from automake < 1.5.
eval 'ALL_LINGUAS''=$OBSOLETE_ALL_LINGUAS'
fi
# Compute POFILES
@@ -23447,7 +35047,7 @@ if test "$no_create" != yes; then
$ac_cs_success || as_fn_exit 1
fi
if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
-$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
+printf "%s\n" "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
fi
diff --git a/configure.ac b/configure.ac
index 9d33ec9..1b121d9 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1,23 +1,55 @@
+# Copyright (C) 1993-2016 Free Software Foundation, Inc.
+
+# This 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/>.
+
dnl Process this file with -*- autoconf -*- to produce a configure script.
-AC_INIT([GNU sed], 4.2.2, bug-sed@gnu.org, sed)
+AC_INIT([GNU sed],
+ m4_esyscmd([build-aux/git-version-gen .tarball-version]),
+ [bug-sed@gnu.org])
AC_CONFIG_AUX_DIR(build-aux)
AC_CONFIG_SRCDIR([sed/sed.c])
AM_CONFIG_HEADER(config.h:config_h.in)
-AC_PREREQ(2.60)
-AM_INIT_AUTOMAKE
-
-SED_FEATURE_VERSION=4.2.2
-AC_DEFINE_UNQUOTED(SED_FEATURE_VERSION, "$SED_FEATURE_VERSION",
- [Define to the version of GNU sed whose features are supported by this sed.])
-AC_SUBST(SED_FEATURE_VERSION)
+AC_PREREQ(2.62)
+AM_INIT_AUTOMAKE([1.11.1 no-dist-gzip dist-xz color-tests parallel-tests
+ subdir-objects])
+AM_SILENT_RULES([yes]) # make --enable-silent-rules the default.
+AC_CONFIG_MACRO_DIR([m4])
-COPYRIGHT_YEAR=2012
-AC_SUBST(COPYRIGHT_YEAR)
-
-AC_PROG_CC
+AC_PROG_CC_STDC
+AM_PROG_CC_C_O
gl_EARLY
gl_INIT
gl_DISABLE_THREADS
+
+# 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.
+# Otherwise, run RUN-IF-NOT-FOUND.
+AC_DEFUN([gl_GCC_VERSION_IFELSE],
+ [AC_PREPROC_IFELSE(
+ [AC_LANG_PROGRAM(
+ [[
+#if ($1) < __GNUC__ || (($1) == __GNUC__ && ($2) <= __GNUC_MINOR__)
+/* ok */
+#else
+# error "your version of gcc is older than $1.$2"
+#endif
+ ]]),
+ ], [$3], [$4])
+ ]
+)
+
AC_CACHE_CHECK([whether "rt" can be used with fopen], [sed_cv_fopen_rt], [
AC_TRY_RUN([
#include <stdio.h>
@@ -66,20 +98,23 @@ if test "$sed_cv_libcp_needed" = yes; then
fi
AC_CHECK_HEADERS_ONCE(locale.h errno.h wchar.h wctype.h mcheck.h,
- [], [], [AC_INCLUDES_DEFAULT])
+ [], [], [AC_INCLUDES_DEFAULT])
AC_C_CONST
AC_TYPE_SIZE_T
-AM_GNU_GETTEXT_VERSION(0.17)
+AM_GNU_GETTEXT_VERSION([0.19.2])
AM_GNU_GETTEXT([external])
AC_CHECK_FUNCS_ONCE(isatty isascii memcpy strchr strtoul lstat readlink
- popen pathconf fchown fchmod setlocale)
+ popen pathconf fchown fchmod setlocale)
# Check whether we are able to follow symlinks
if test "$ac_cv_func_lstat:$ac_cv_func_readlink" = yes:yes; then
- AC_DEFINE(ENABLE_FOLLOW_SYMLINKS, ,[Follow symlinks when processing in place])
+ AC_DEFINE([ENABLE_FOLLOW_SYMLINKS], ,
+ [Follow symlinks when processing in place])
fi
+AM_CONDITIONAL([TEST_SYMLINKS],
+ [test "$ac_cv_func_lstat:$ac_cv_func_readlink" = yes:yes])
AC_ARG_ENABLE(i18n,
[ --disable-i18n disable internationalization (default=enabled)], ,
@@ -88,7 +123,7 @@ if test "x$enable_i18n" = xno; then
ac_cv_func_wcscoll=no
fi
-AC_ARG_ENABLE(regex-tests,
+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
@@ -97,7 +132,7 @@ 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,
+ AC_DEFINE_UNQUOTED([_REGEX_RE_COMP], 1,
[Include BSD functions in regex, used by the testsuite])
fi
@@ -171,7 +206,8 @@ int main()
exit (!test ());
}
], [AC_MSG_RESULT([yes]); XFAIL_TESTS=],
- [AC_MSG_RESULT([no]); XFAIL_TESTS='utf8-1 utf8-2 utf8-3 utf8-4'],
+ [AC_MSG_RESULT([no]); XFAIL_TESTS='testsuite/utf8-1 testsuite/utf8-2 \
+ testsuite/utf8-3 testsuite/utf8-4'],
[AC_MSG_RESULT([don't care (cross compiling)]); XFAIL_TESTS=])
# Under MinGW, the bsd.sh test fails because of the EOF character (^Z).
@@ -181,8 +217,86 @@ case $host in
esac
AC_SUBST([XFAIL_TESTS])
-AC_CONFIG_FILES([testsuite/version.good:testsuite/version.gin])
-AC_CONFIG_FILES([Makefile doc/Makefile \
-lib/Makefile sed/Makefile testsuite/Makefile \
-po/Makefile.in])
+AC_ARG_ENABLE([gcc-warnings],
+ [AS_HELP_STRING([--enable-gcc-warnings],
+ [turn on many GCC warnings (for developers; best with GNU make)])],
+ [case $enableval in
+ yes|no) ;;
+ *) AC_MSG_ERROR([bad value $enableval for gcc-warnings option]) ;;
+ esac
+ gl_gcc_warnings=$enableval],
+ [
+ # GCC provides fine-grained control over diagnostics which
+ # is used in gnulib for example to suppress warnings from
+ # certain sections of code. So if this is available and
+ # we're running from a git repo, then auto enable the warnings.
+ gl_gcc_warnings=no
+ gl_GCC_VERSION_IFELSE([4], [6],
+ [test -d "$srcdir"/.git \
+ && ! test -f "$srcdir"/.tarball-version \
+ && gl_gcc_warnings=yes])]
+)
+
+if test "$gl_gcc_warnings" = yes; then
+ gl_WARN_ADD([-Werror], [WERROR_CFLAGS])
+ AC_SUBST([WERROR_CFLAGS])
+
+ nw=
+ # This, $nw, is the list of warnings we disable.
+ nw="$nw -Wdeclaration-after-statement" # too useful to forbid
+ nw="$nw -Wsystem-headers" # Don't let system headers trigger warnings
+ nw="$nw -Wsign-conversion" # Too many warnings for now
+ nw="$nw -Wformat-nonliteral" # who.c and pinky.c strftime uses
+ nw="$nw -Wvla" # warnings in gettext.h
+ nw="$nw -Wswitch-default" # Too many warnings for now
+
+ gl_MANYWARN_ALL_GCC([ws])
+ gl_MANYWARN_COMPLEMENT([ws], [$ws], [$nw])
+ for w in $ws; do
+ gl_WARN_ADD([$w])
+ done
+ gl_WARN_ADD([-Wno-sign-compare]) # Too many warnings for now
+
+ # clang is unduly picky about some things.
+ AC_CACHE_CHECK([whether the compiler is clang], [utils_cv_clang],
+ [AC_COMPILE_IFELSE(
+ [AC_LANG_PROGRAM([[
+ #ifndef __clang__
+ #error "not clang"
+ #endif
+ ]])],
+ [utils_cv_clang=yes],
+ [utils_cv_clang=no])])
+ if test $utils_cv_clang = yes; then
+ gl_WARN_ADD([-Wno-format-extra-args])
+ gl_WARN_ADD([-Wno-tautological-constant-out-of-range-compare])
+ fi
+
+ gl_WARN_ADD([-fdiagnostics-show-option])
+ gl_WARN_ADD([-funit-at-a-time])
+
+ AC_SUBST([WARN_CFLAGS])
+
+ AC_DEFINE([lint], [1], [Define to 1 if the compiler is checking for lint.])
+ AH_VERBATIM([FORTIFY_SOURCE],
+ [/* Enable compile-time and run-time bounds-checking, and some warnings,
+ without upsetting glibc 2.15+. */
+ #if !defined _FORTIFY_SOURCE && defined __OPTIMIZE__ && __OPTIMIZE__
+ # define _FORTIFY_SOURCE 2
+ #endif
+ ])
+ AC_DEFINE([GNULIB_PORTCHECK], [1], [enable some gnulib portability checks])
+
+ # For gnulib-tests, the set is slightly smaller still.
+ nw=
+ gl_MANYWARN_COMPLEMENT([GNULIB_TEST_WARN_CFLAGS],
+ [$WARN_CFLAGS], [$nw])
+ AC_SUBST([GNULIB_TEST_WARN_CFLAGS])
+fi
+
+AC_CONFIG_FILES([
+ Makefile
+ po/Makefile.in
+ gnulib-tests/Makefile
+])
AC_OUTPUT
diff --git a/doc/Makefile.am b/doc/Makefile.am
deleted file mode 100644
index af6975c..0000000
--- a/doc/Makefile.am
+++ /dev/null
@@ -1,33 +0,0 @@
-## Process this file with automake to produce Makefile.in
-info_TEXINFOS = sed.texi
-sed_TEXINFOS = config.texi version.texi
-dist_man_MANS = sed.1
-dist_noinst_DATA = sed.x sed-in.texi s-texi
-dist_noinst_SCRIPTS = groupify.sed
-TEXI2DVI = $(top_srcdir)/build-aux/texi2dvi --expand
-HELP2MAN = $(top_srcdir)/build-aux/help2man
-SED = $(top_builddir)/sed/sed
-
-AM_MAKEINFOHTMLFLAGS = --no-split
-
-# To produce better quality output, in the example sed
-# scripts we group comments with lines following them;
-# since mantaining the "@group...@end group" manually
-# is a burden, we do this automatically
-$(srcdir)/sed.texi: $(srcdir)/s-texi
-$(srcdir)/s-texi: sed-in.texi $(srcdir)/groupify.sed
- sed -nf $(srcdir)/groupify.sed \
- < $(srcdir)/sed-in.texi > $(srcdir)/sed-tmp.texi
- if cmp $(srcdir)/sed.texi $(srcdir)/sed-tmp.texi; then \
- rm -f $(srcdir)/sed-tmp.texi; \
- else \
- mv -f $(srcdir)/sed-tmp.texi $(srcdir)/sed.texi; \
- fi
- echo stamp > $(srcdir)/s-texi
-
-sed.1: $(top_srcdir)/sed/sed.c $(top_srcdir)/configure.ac $(srcdir)/sed.x
- $(HELP2MAN) --name "stream editor for filtering and transforming text" \
- -p sed --include $(srcdir)/sed.x -o $(srcdir)/sed.1 $(SED)
-
-dist-hook:
- touch $(distdir)/sed.1
diff --git a/doc/Makefile.in b/doc/Makefile.in
deleted file mode 100644
index 84e07d1..0000000
--- a/doc/Makefile.in
+++ /dev/null
@@ -1,1497 +0,0 @@
-# Makefile.in generated by automake 1.12.2 from Makefile.am.
-# @configure_input@
-
-# Copyright (C) 1994-2012 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.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
-# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
-# PARTICULAR PURPOSE.
-
-@SET_MAKE@
-
-
-VPATH = @srcdir@
-am__make_dryrun = \
- { \
- am__dry=no; \
- case $$MAKEFLAGS in \
- *\\[\ \ ]*) \
- echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \
- | grep '^AM OK$$' >/dev/null || am__dry=yes;; \
- *) \
- for am__flg in $$MAKEFLAGS; do \
- case $$am__flg in \
- *=*|--*) ;; \
- *n*) am__dry=yes; break;; \
- esac; \
- done;; \
- esac; \
- test $$am__dry = yes; \
- }
-pkgdatadir = $(datadir)/@PACKAGE@
-pkgincludedir = $(includedir)/@PACKAGE@
-pkglibdir = $(libdir)/@PACKAGE@
-am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
-install_sh_DATA = $(install_sh) -c -m 644
-install_sh_PROGRAM = $(install_sh) -c
-install_sh_SCRIPT = $(install_sh) -c
-INSTALL_HEADER = $(INSTALL_DATA)
-transform = $(program_transform_name)
-NORMAL_INSTALL = :
-PRE_INSTALL = :
-POST_INSTALL = :
-NORMAL_UNINSTALL = :
-PRE_UNINSTALL = :
-POST_UNINSTALL = :
-build_triplet = @build@
-host_triplet = @host@
-subdir = doc
-DIST_COMMON = $(dist_man_MANS) $(dist_noinst_DATA) \
- $(dist_noinst_SCRIPTS) $(sed_TEXINFOS) $(srcdir)/Makefile.am \
- $(srcdir)/Makefile.in $(srcdir)/stamp-vti \
- $(srcdir)/version.texi $(top_srcdir)/build-aux/mdate-sh \
- $(top_srcdir)/build-aux/texinfo.tex
-ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
-am__aclocal_m4_deps = $(top_srcdir)/m4/00gnulib.m4 \
- $(top_srcdir)/m4/acl.m4 $(top_srcdir)/m4/alloca.m4 \
- $(top_srcdir)/m4/btowc.m4 $(top_srcdir)/m4/canonicalize.m4 \
- $(top_srcdir)/m4/codeset.m4 $(top_srcdir)/m4/configmake.m4 \
- $(top_srcdir)/m4/dirname.m4 \
- $(top_srcdir)/m4/double-slash-root.m4 \
- $(top_srcdir)/m4/eealloc.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/fstat.m4 \
- $(top_srcdir)/m4/fwriting.m4 $(top_srcdir)/m4/getdelim.m4 \
- $(top_srcdir)/m4/getopt.m4 $(top_srcdir)/m4/gettext.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/iconv.m4 \
- $(top_srcdir)/m4/include_next.m4 \
- $(top_srcdir)/m4/intlmacosx.m4 $(top_srcdir)/m4/langinfo_h.m4 \
- $(top_srcdir)/m4/largefile.m4 $(top_srcdir)/m4/lib-ld.m4 \
- $(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \
- $(top_srcdir)/m4/localcharset.m4 $(top_srcdir)/m4/locale-fr.m4 \
- $(top_srcdir)/m4/locale-ja.m4 $(top_srcdir)/m4/locale-zh.m4 \
- $(top_srcdir)/m4/locale_h.m4 $(top_srcdir)/m4/localeconv.m4 \
- $(top_srcdir)/m4/longlong.m4 $(top_srcdir)/m4/lstat.m4 \
- $(top_srcdir)/m4/malloc.m4 $(top_srcdir)/m4/malloca.m4 \
- $(top_srcdir)/m4/mbrlen.m4 $(top_srcdir)/m4/mbrtowc.m4 \
- $(top_srcdir)/m4/mbsinit.m4 $(top_srcdir)/m4/mbstate_t.m4 \
- $(top_srcdir)/m4/mbtowc.m4 $(top_srcdir)/m4/memchr.m4 \
- $(top_srcdir)/m4/mkostemp.m4 $(top_srcdir)/m4/mmap-anon.m4 \
- $(top_srcdir)/m4/msvc-inval.m4 \
- $(top_srcdir)/m4/msvc-nothrow.m4 $(top_srcdir)/m4/multiarch.m4 \
- $(top_srcdir)/m4/nl_langinfo.m4 $(top_srcdir)/m4/nls.m4 \
- $(top_srcdir)/m4/nocrash.m4 $(top_srcdir)/m4/off_t.m4 \
- $(top_srcdir)/m4/pathmax.m4 $(top_srcdir)/m4/po.m4 \
- $(top_srcdir)/m4/progtest.m4 $(top_srcdir)/m4/quote.m4 \
- $(top_srcdir)/m4/quotearg.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/selinux-context-h.m4 \
- $(top_srcdir)/m4/selinux-selinux-h.m4 \
- $(top_srcdir)/m4/ssize_t.m4 $(top_srcdir)/m4/stat.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/strerror.m4 $(top_srcdir)/m4/string_h.m4 \
- $(top_srcdir)/m4/strverscmp.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/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/wchar_h.m4 \
- $(top_srcdir)/m4/wchar_t.m4 $(top_srcdir)/m4/wcrtomb.m4 \
- $(top_srcdir)/m4/wctob.m4 $(top_srcdir)/m4/wctomb.m4 \
- $(top_srcdir)/m4/wctype_h.m4 $(top_srcdir)/m4/wint_t.m4 \
- $(top_srcdir)/m4/xalloc.m4 $(top_srcdir)/configure.ac
-am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
- $(ACLOCAL_M4)
-mkinstalldirs = $(install_sh) -d
-CONFIG_HEADER = $(top_builddir)/config.h
-CONFIG_CLEAN_FILES =
-CONFIG_CLEAN_VPATH_FILES =
-SCRIPTS = $(dist_noinst_SCRIPTS)
-SOURCES =
-DIST_SOURCES =
-INFO_DEPS = $(srcdir)/sed.info
-TEXINFO_TEX = $(top_srcdir)/build-aux/texinfo.tex
-am__TEXINFO_TEX_DIR = $(top_srcdir)/build-aux
-DVIS = sed.dvi
-PDFS = sed.pdf
-PSS = sed.ps
-HTMLS = sed.html
-TEXINFOS = sed.texi
-TEXI2PDF = $(TEXI2DVI) --pdf --batch
-MAKEINFOHTML = $(MAKEINFO) --html
-DVIPS = dvips
-am__can_run_installinfo = \
- case $$AM_UPDATE_INFO_DIR in \
- n|no|NO) false;; \
- *) (install-info --version) >/dev/null 2>&1;; \
- esac
-am__installdirs = "$(DESTDIR)$(infodir)" "$(DESTDIR)$(man1dir)"
-am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
-am__vpath_adj = case $$p in \
- $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
- *) f=$$p;; \
- esac;
-am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
-am__install_max = 40
-am__nobase_strip_setup = \
- srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
-am__nobase_strip = \
- for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
-am__nobase_list = $(am__nobase_strip_setup); \
- for p in $$list; do echo "$$p $$p"; done | \
- sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
- $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
- if (++n[$$2] == $(am__install_max)) \
- { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
- END { for (dir in files) print dir, files[dir] }'
-am__base_list = \
- sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
- sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
-am__uninstall_files_from_dir = { \
- test -z "$$files" \
- || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \
- || { echo " ( cd '$$dir' && rm -f" $$files ")"; \
- $(am__cd) "$$dir" && rm -f $$files; }; \
- }
-man1dir = $(mandir)/man1
-NROFF = nroff
-MANS = $(dist_man_MANS)
-DATA = $(dist_noinst_DATA)
-DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
-pkglibexecdir = @pkglibexecdir@
-ACLOCAL = @ACLOCAL@
-ALLOCA = @ALLOCA@
-ALLOCA_H = @ALLOCA_H@
-AMTAR = @AMTAR@
-APPLE_UNIVERSAL_BUILD = @APPLE_UNIVERSAL_BUILD@
-AR = @AR@
-ARFLAGS = @ARFLAGS@
-AUTOCONF = @AUTOCONF@
-AUTOHEADER = @AUTOHEADER@
-AUTOMAKE = @AUTOMAKE@
-AWK = @AWK@
-BITSIZEOF_PTRDIFF_T = @BITSIZEOF_PTRDIFF_T@
-BITSIZEOF_SIG_ATOMIC_T = @BITSIZEOF_SIG_ATOMIC_T@
-BITSIZEOF_SIZE_T = @BITSIZEOF_SIZE_T@
-BITSIZEOF_WCHAR_T = @BITSIZEOF_WCHAR_T@
-BITSIZEOF_WINT_T = @BITSIZEOF_WINT_T@
-CC = @CC@
-CCDEPMODE = @CCDEPMODE@
-CFLAGS = @CFLAGS@
-COPYRIGHT_YEAR = @COPYRIGHT_YEAR@
-CPP = @CPP@
-CPPFLAGS = @CPPFLAGS@
-CYGPATH_W = @CYGPATH_W@
-DEFS = @DEFS@
-DEPDIR = @DEPDIR@
-ECHO_C = @ECHO_C@
-ECHO_N = @ECHO_N@
-ECHO_T = @ECHO_T@
-EGREP = @EGREP@
-EMULTIHOP_HIDDEN = @EMULTIHOP_HIDDEN@
-EMULTIHOP_VALUE = @EMULTIHOP_VALUE@
-ENOLINK_HIDDEN = @ENOLINK_HIDDEN@
-ENOLINK_VALUE = @ENOLINK_VALUE@
-EOVERFLOW_HIDDEN = @EOVERFLOW_HIDDEN@
-EOVERFLOW_VALUE = @EOVERFLOW_VALUE@
-ERRNO_H = @ERRNO_H@
-EXEEXT = @EXEEXT@
-GETOPT_H = @GETOPT_H@
-GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@
-GLIBC21 = @GLIBC21@
-GMSGFMT = @GMSGFMT@
-GMSGFMT_015 = @GMSGFMT_015@
-GNULIB_ATOLL = @GNULIB_ATOLL@
-GNULIB_BTOWC = @GNULIB_BTOWC@
-GNULIB_CALLOC_POSIX = @GNULIB_CALLOC_POSIX@
-GNULIB_CANONICALIZE_FILE_NAME = @GNULIB_CANONICALIZE_FILE_NAME@
-GNULIB_CHDIR = @GNULIB_CHDIR@
-GNULIB_CHOWN = @GNULIB_CHOWN@
-GNULIB_CLOSE = @GNULIB_CLOSE@
-GNULIB_DPRINTF = @GNULIB_DPRINTF@
-GNULIB_DUP = @GNULIB_DUP@
-GNULIB_DUP2 = @GNULIB_DUP2@
-GNULIB_DUP3 = @GNULIB_DUP3@
-GNULIB_DUPLOCALE = @GNULIB_DUPLOCALE@
-GNULIB_ENVIRON = @GNULIB_ENVIRON@
-GNULIB_EUIDACCESS = @GNULIB_EUIDACCESS@
-GNULIB_FACCESSAT = @GNULIB_FACCESSAT@
-GNULIB_FCHDIR = @GNULIB_FCHDIR@
-GNULIB_FCHMODAT = @GNULIB_FCHMODAT@
-GNULIB_FCHOWNAT = @GNULIB_FCHOWNAT@
-GNULIB_FCLOSE = @GNULIB_FCLOSE@
-GNULIB_FCNTL = @GNULIB_FCNTL@
-GNULIB_FDATASYNC = @GNULIB_FDATASYNC@
-GNULIB_FDOPEN = @GNULIB_FDOPEN@
-GNULIB_FFLUSH = @GNULIB_FFLUSH@
-GNULIB_FFSL = @GNULIB_FFSL@
-GNULIB_FFSLL = @GNULIB_FFSLL@
-GNULIB_FGETC = @GNULIB_FGETC@
-GNULIB_FGETS = @GNULIB_FGETS@
-GNULIB_FOPEN = @GNULIB_FOPEN@
-GNULIB_FPRINTF = @GNULIB_FPRINTF@
-GNULIB_FPRINTF_POSIX = @GNULIB_FPRINTF_POSIX@
-GNULIB_FPURGE = @GNULIB_FPURGE@
-GNULIB_FPUTC = @GNULIB_FPUTC@
-GNULIB_FPUTS = @GNULIB_FPUTS@
-GNULIB_FREAD = @GNULIB_FREAD@
-GNULIB_FREOPEN = @GNULIB_FREOPEN@
-GNULIB_FSCANF = @GNULIB_FSCANF@
-GNULIB_FSEEK = @GNULIB_FSEEK@
-GNULIB_FSEEKO = @GNULIB_FSEEKO@
-GNULIB_FSTAT = @GNULIB_FSTAT@
-GNULIB_FSTATAT = @GNULIB_FSTATAT@
-GNULIB_FSYNC = @GNULIB_FSYNC@
-GNULIB_FTELL = @GNULIB_FTELL@
-GNULIB_FTELLO = @GNULIB_FTELLO@
-GNULIB_FTRUNCATE = @GNULIB_FTRUNCATE@
-GNULIB_FUTIMENS = @GNULIB_FUTIMENS@
-GNULIB_FWRITE = @GNULIB_FWRITE@
-GNULIB_GETC = @GNULIB_GETC@
-GNULIB_GETCHAR = @GNULIB_GETCHAR@
-GNULIB_GETCWD = @GNULIB_GETCWD@
-GNULIB_GETDELIM = @GNULIB_GETDELIM@
-GNULIB_GETDOMAINNAME = @GNULIB_GETDOMAINNAME@
-GNULIB_GETDTABLESIZE = @GNULIB_GETDTABLESIZE@
-GNULIB_GETGROUPS = @GNULIB_GETGROUPS@
-GNULIB_GETHOSTNAME = @GNULIB_GETHOSTNAME@
-GNULIB_GETLINE = @GNULIB_GETLINE@
-GNULIB_GETLOADAVG = @GNULIB_GETLOADAVG@
-GNULIB_GETLOGIN = @GNULIB_GETLOGIN@
-GNULIB_GETLOGIN_R = @GNULIB_GETLOGIN_R@
-GNULIB_GETPAGESIZE = @GNULIB_GETPAGESIZE@
-GNULIB_GETSUBOPT = @GNULIB_GETSUBOPT@
-GNULIB_GETTIMEOFDAY = @GNULIB_GETTIMEOFDAY@
-GNULIB_GETUSERSHELL = @GNULIB_GETUSERSHELL@
-GNULIB_GL_UNISTD_H_GETOPT = @GNULIB_GL_UNISTD_H_GETOPT@
-GNULIB_GRANTPT = @GNULIB_GRANTPT@
-GNULIB_GROUP_MEMBER = @GNULIB_GROUP_MEMBER@
-GNULIB_ISATTY = @GNULIB_ISATTY@
-GNULIB_ISWBLANK = @GNULIB_ISWBLANK@
-GNULIB_ISWCTYPE = @GNULIB_ISWCTYPE@
-GNULIB_LCHMOD = @GNULIB_LCHMOD@
-GNULIB_LCHOWN = @GNULIB_LCHOWN@
-GNULIB_LINK = @GNULIB_LINK@
-GNULIB_LINKAT = @GNULIB_LINKAT@
-GNULIB_LOCALECONV = @GNULIB_LOCALECONV@
-GNULIB_LSEEK = @GNULIB_LSEEK@
-GNULIB_LSTAT = @GNULIB_LSTAT@
-GNULIB_MALLOC_POSIX = @GNULIB_MALLOC_POSIX@
-GNULIB_MBRLEN = @GNULIB_MBRLEN@
-GNULIB_MBRTOWC = @GNULIB_MBRTOWC@
-GNULIB_MBSCASECMP = @GNULIB_MBSCASECMP@
-GNULIB_MBSCASESTR = @GNULIB_MBSCASESTR@
-GNULIB_MBSCHR = @GNULIB_MBSCHR@
-GNULIB_MBSCSPN = @GNULIB_MBSCSPN@
-GNULIB_MBSINIT = @GNULIB_MBSINIT@
-GNULIB_MBSLEN = @GNULIB_MBSLEN@
-GNULIB_MBSNCASECMP = @GNULIB_MBSNCASECMP@
-GNULIB_MBSNLEN = @GNULIB_MBSNLEN@
-GNULIB_MBSNRTOWCS = @GNULIB_MBSNRTOWCS@
-GNULIB_MBSPBRK = @GNULIB_MBSPBRK@
-GNULIB_MBSPCASECMP = @GNULIB_MBSPCASECMP@
-GNULIB_MBSRCHR = @GNULIB_MBSRCHR@
-GNULIB_MBSRTOWCS = @GNULIB_MBSRTOWCS@
-GNULIB_MBSSEP = @GNULIB_MBSSEP@
-GNULIB_MBSSPN = @GNULIB_MBSSPN@
-GNULIB_MBSSTR = @GNULIB_MBSSTR@
-GNULIB_MBSTOK_R = @GNULIB_MBSTOK_R@
-GNULIB_MBTOWC = @GNULIB_MBTOWC@
-GNULIB_MEMCHR = @GNULIB_MEMCHR@
-GNULIB_MEMMEM = @GNULIB_MEMMEM@
-GNULIB_MEMPCPY = @GNULIB_MEMPCPY@
-GNULIB_MEMRCHR = @GNULIB_MEMRCHR@
-GNULIB_MKDIRAT = @GNULIB_MKDIRAT@
-GNULIB_MKDTEMP = @GNULIB_MKDTEMP@
-GNULIB_MKFIFO = @GNULIB_MKFIFO@
-GNULIB_MKFIFOAT = @GNULIB_MKFIFOAT@
-GNULIB_MKNOD = @GNULIB_MKNOD@
-GNULIB_MKNODAT = @GNULIB_MKNODAT@
-GNULIB_MKOSTEMP = @GNULIB_MKOSTEMP@
-GNULIB_MKOSTEMPS = @GNULIB_MKOSTEMPS@
-GNULIB_MKSTEMP = @GNULIB_MKSTEMP@
-GNULIB_MKSTEMPS = @GNULIB_MKSTEMPS@
-GNULIB_MKTIME = @GNULIB_MKTIME@
-GNULIB_NANOSLEEP = @GNULIB_NANOSLEEP@
-GNULIB_NL_LANGINFO = @GNULIB_NL_LANGINFO@
-GNULIB_NONBLOCKING = @GNULIB_NONBLOCKING@
-GNULIB_OBSTACK_PRINTF = @GNULIB_OBSTACK_PRINTF@
-GNULIB_OBSTACK_PRINTF_POSIX = @GNULIB_OBSTACK_PRINTF_POSIX@
-GNULIB_OPEN = @GNULIB_OPEN@
-GNULIB_OPENAT = @GNULIB_OPENAT@
-GNULIB_PCLOSE = @GNULIB_PCLOSE@
-GNULIB_PERROR = @GNULIB_PERROR@
-GNULIB_PIPE = @GNULIB_PIPE@
-GNULIB_PIPE2 = @GNULIB_PIPE2@
-GNULIB_POPEN = @GNULIB_POPEN@
-GNULIB_POSIX_OPENPT = @GNULIB_POSIX_OPENPT@
-GNULIB_PREAD = @GNULIB_PREAD@
-GNULIB_PRINTF = @GNULIB_PRINTF@
-GNULIB_PRINTF_POSIX = @GNULIB_PRINTF_POSIX@
-GNULIB_PTSNAME = @GNULIB_PTSNAME@
-GNULIB_PTSNAME_R = @GNULIB_PTSNAME_R@
-GNULIB_PUTC = @GNULIB_PUTC@
-GNULIB_PUTCHAR = @GNULIB_PUTCHAR@
-GNULIB_PUTENV = @GNULIB_PUTENV@
-GNULIB_PUTS = @GNULIB_PUTS@
-GNULIB_PWRITE = @GNULIB_PWRITE@
-GNULIB_RANDOM = @GNULIB_RANDOM@
-GNULIB_RANDOM_R = @GNULIB_RANDOM_R@
-GNULIB_RAWMEMCHR = @GNULIB_RAWMEMCHR@
-GNULIB_READ = @GNULIB_READ@
-GNULIB_READLINK = @GNULIB_READLINK@
-GNULIB_READLINKAT = @GNULIB_READLINKAT@
-GNULIB_REALLOC_POSIX = @GNULIB_REALLOC_POSIX@
-GNULIB_REALPATH = @GNULIB_REALPATH@
-GNULIB_REMOVE = @GNULIB_REMOVE@
-GNULIB_RENAME = @GNULIB_RENAME@
-GNULIB_RENAMEAT = @GNULIB_RENAMEAT@
-GNULIB_RMDIR = @GNULIB_RMDIR@
-GNULIB_RPMATCH = @GNULIB_RPMATCH@
-GNULIB_SCANF = @GNULIB_SCANF@
-GNULIB_SETENV = @GNULIB_SETENV@
-GNULIB_SETHOSTNAME = @GNULIB_SETHOSTNAME@
-GNULIB_SETLOCALE = @GNULIB_SETLOCALE@
-GNULIB_SLEEP = @GNULIB_SLEEP@
-GNULIB_SNPRINTF = @GNULIB_SNPRINTF@
-GNULIB_SPRINTF_POSIX = @GNULIB_SPRINTF_POSIX@
-GNULIB_STAT = @GNULIB_STAT@
-GNULIB_STDIO_H_NONBLOCKING = @GNULIB_STDIO_H_NONBLOCKING@
-GNULIB_STDIO_H_SIGPIPE = @GNULIB_STDIO_H_SIGPIPE@
-GNULIB_STPCPY = @GNULIB_STPCPY@
-GNULIB_STPNCPY = @GNULIB_STPNCPY@
-GNULIB_STRCASESTR = @GNULIB_STRCASESTR@
-GNULIB_STRCHRNUL = @GNULIB_STRCHRNUL@
-GNULIB_STRDUP = @GNULIB_STRDUP@
-GNULIB_STRERROR = @GNULIB_STRERROR@
-GNULIB_STRERROR_R = @GNULIB_STRERROR_R@
-GNULIB_STRNCAT = @GNULIB_STRNCAT@
-GNULIB_STRNDUP = @GNULIB_STRNDUP@
-GNULIB_STRNLEN = @GNULIB_STRNLEN@
-GNULIB_STRPBRK = @GNULIB_STRPBRK@
-GNULIB_STRPTIME = @GNULIB_STRPTIME@
-GNULIB_STRSEP = @GNULIB_STRSEP@
-GNULIB_STRSIGNAL = @GNULIB_STRSIGNAL@
-GNULIB_STRSTR = @GNULIB_STRSTR@
-GNULIB_STRTOD = @GNULIB_STRTOD@
-GNULIB_STRTOK_R = @GNULIB_STRTOK_R@
-GNULIB_STRTOLL = @GNULIB_STRTOLL@
-GNULIB_STRTOULL = @GNULIB_STRTOULL@
-GNULIB_STRVERSCMP = @GNULIB_STRVERSCMP@
-GNULIB_SYMLINK = @GNULIB_SYMLINK@
-GNULIB_SYMLINKAT = @GNULIB_SYMLINKAT@
-GNULIB_SYSTEM_POSIX = @GNULIB_SYSTEM_POSIX@
-GNULIB_TIMEGM = @GNULIB_TIMEGM@
-GNULIB_TIME_R = @GNULIB_TIME_R@
-GNULIB_TMPFILE = @GNULIB_TMPFILE@
-GNULIB_TOWCTRANS = @GNULIB_TOWCTRANS@
-GNULIB_TTYNAME_R = @GNULIB_TTYNAME_R@
-GNULIB_UNISTD_H_NONBLOCKING = @GNULIB_UNISTD_H_NONBLOCKING@
-GNULIB_UNISTD_H_SIGPIPE = @GNULIB_UNISTD_H_SIGPIPE@
-GNULIB_UNLINK = @GNULIB_UNLINK@
-GNULIB_UNLINKAT = @GNULIB_UNLINKAT@
-GNULIB_UNLOCKPT = @GNULIB_UNLOCKPT@
-GNULIB_UNSETENV = @GNULIB_UNSETENV@
-GNULIB_USLEEP = @GNULIB_USLEEP@
-GNULIB_UTIMENSAT = @GNULIB_UTIMENSAT@
-GNULIB_VASPRINTF = @GNULIB_VASPRINTF@
-GNULIB_VDPRINTF = @GNULIB_VDPRINTF@
-GNULIB_VFPRINTF = @GNULIB_VFPRINTF@
-GNULIB_VFPRINTF_POSIX = @GNULIB_VFPRINTF_POSIX@
-GNULIB_VFSCANF = @GNULIB_VFSCANF@
-GNULIB_VPRINTF = @GNULIB_VPRINTF@
-GNULIB_VPRINTF_POSIX = @GNULIB_VPRINTF_POSIX@
-GNULIB_VSCANF = @GNULIB_VSCANF@
-GNULIB_VSNPRINTF = @GNULIB_VSNPRINTF@
-GNULIB_VSPRINTF_POSIX = @GNULIB_VSPRINTF_POSIX@
-GNULIB_WCPCPY = @GNULIB_WCPCPY@
-GNULIB_WCPNCPY = @GNULIB_WCPNCPY@
-GNULIB_WCRTOMB = @GNULIB_WCRTOMB@
-GNULIB_WCSCASECMP = @GNULIB_WCSCASECMP@
-GNULIB_WCSCAT = @GNULIB_WCSCAT@
-GNULIB_WCSCHR = @GNULIB_WCSCHR@
-GNULIB_WCSCMP = @GNULIB_WCSCMP@
-GNULIB_WCSCOLL = @GNULIB_WCSCOLL@
-GNULIB_WCSCPY = @GNULIB_WCSCPY@
-GNULIB_WCSCSPN = @GNULIB_WCSCSPN@
-GNULIB_WCSDUP = @GNULIB_WCSDUP@
-GNULIB_WCSLEN = @GNULIB_WCSLEN@
-GNULIB_WCSNCASECMP = @GNULIB_WCSNCASECMP@
-GNULIB_WCSNCAT = @GNULIB_WCSNCAT@
-GNULIB_WCSNCMP = @GNULIB_WCSNCMP@
-GNULIB_WCSNCPY = @GNULIB_WCSNCPY@
-GNULIB_WCSNLEN = @GNULIB_WCSNLEN@
-GNULIB_WCSNRTOMBS = @GNULIB_WCSNRTOMBS@
-GNULIB_WCSPBRK = @GNULIB_WCSPBRK@
-GNULIB_WCSRCHR = @GNULIB_WCSRCHR@
-GNULIB_WCSRTOMBS = @GNULIB_WCSRTOMBS@
-GNULIB_WCSSPN = @GNULIB_WCSSPN@
-GNULIB_WCSSTR = @GNULIB_WCSSTR@
-GNULIB_WCSTOK = @GNULIB_WCSTOK@
-GNULIB_WCSWIDTH = @GNULIB_WCSWIDTH@
-GNULIB_WCSXFRM = @GNULIB_WCSXFRM@
-GNULIB_WCTOB = @GNULIB_WCTOB@
-GNULIB_WCTOMB = @GNULIB_WCTOMB@
-GNULIB_WCTRANS = @GNULIB_WCTRANS@
-GNULIB_WCTYPE = @GNULIB_WCTYPE@
-GNULIB_WCWIDTH = @GNULIB_WCWIDTH@
-GNULIB_WMEMCHR = @GNULIB_WMEMCHR@
-GNULIB_WMEMCMP = @GNULIB_WMEMCMP@
-GNULIB_WMEMCPY = @GNULIB_WMEMCPY@
-GNULIB_WMEMMOVE = @GNULIB_WMEMMOVE@
-GNULIB_WMEMSET = @GNULIB_WMEMSET@
-GNULIB_WRITE = @GNULIB_WRITE@
-GNULIB__EXIT = @GNULIB__EXIT@
-GREP = @GREP@
-HAVE_ATOLL = @HAVE_ATOLL@
-HAVE_BTOWC = @HAVE_BTOWC@
-HAVE_CANONICALIZE_FILE_NAME = @HAVE_CANONICALIZE_FILE_NAME@
-HAVE_CHOWN = @HAVE_CHOWN@
-HAVE_DECL_ENVIRON = @HAVE_DECL_ENVIRON@
-HAVE_DECL_FCHDIR = @HAVE_DECL_FCHDIR@
-HAVE_DECL_FDATASYNC = @HAVE_DECL_FDATASYNC@
-HAVE_DECL_FPURGE = @HAVE_DECL_FPURGE@
-HAVE_DECL_FSEEKO = @HAVE_DECL_FSEEKO@
-HAVE_DECL_FTELLO = @HAVE_DECL_FTELLO@
-HAVE_DECL_GETDELIM = @HAVE_DECL_GETDELIM@
-HAVE_DECL_GETDOMAINNAME = @HAVE_DECL_GETDOMAINNAME@
-HAVE_DECL_GETLINE = @HAVE_DECL_GETLINE@
-HAVE_DECL_GETLOADAVG = @HAVE_DECL_GETLOADAVG@
-HAVE_DECL_GETLOGIN_R = @HAVE_DECL_GETLOGIN_R@
-HAVE_DECL_GETPAGESIZE = @HAVE_DECL_GETPAGESIZE@
-HAVE_DECL_GETUSERSHELL = @HAVE_DECL_GETUSERSHELL@
-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_SNPRINTF = @HAVE_DECL_SNPRINTF@
-HAVE_DECL_STRDUP = @HAVE_DECL_STRDUP@
-HAVE_DECL_STRERROR_R = @HAVE_DECL_STRERROR_R@
-HAVE_DECL_STRNDUP = @HAVE_DECL_STRNDUP@
-HAVE_DECL_STRNLEN = @HAVE_DECL_STRNLEN@
-HAVE_DECL_STRSIGNAL = @HAVE_DECL_STRSIGNAL@
-HAVE_DECL_STRTOK_R = @HAVE_DECL_STRTOK_R@
-HAVE_DECL_TTYNAME_R = @HAVE_DECL_TTYNAME_R@
-HAVE_DECL_UNSETENV = @HAVE_DECL_UNSETENV@
-HAVE_DECL_VSNPRINTF = @HAVE_DECL_VSNPRINTF@
-HAVE_DECL_WCTOB = @HAVE_DECL_WCTOB@
-HAVE_DECL_WCWIDTH = @HAVE_DECL_WCWIDTH@
-HAVE_DPRINTF = @HAVE_DPRINTF@
-HAVE_DUP2 = @HAVE_DUP2@
-HAVE_DUP3 = @HAVE_DUP3@
-HAVE_DUPLOCALE = @HAVE_DUPLOCALE@
-HAVE_EUIDACCESS = @HAVE_EUIDACCESS@
-HAVE_FACCESSAT = @HAVE_FACCESSAT@
-HAVE_FCHDIR = @HAVE_FCHDIR@
-HAVE_FCHMODAT = @HAVE_FCHMODAT@
-HAVE_FCHOWNAT = @HAVE_FCHOWNAT@
-HAVE_FCNTL = @HAVE_FCNTL@
-HAVE_FDATASYNC = @HAVE_FDATASYNC@
-HAVE_FEATURES_H = @HAVE_FEATURES_H@
-HAVE_FFSL = @HAVE_FFSL@
-HAVE_FFSLL = @HAVE_FFSLL@
-HAVE_FSEEKO = @HAVE_FSEEKO@
-HAVE_FSTATAT = @HAVE_FSTATAT@
-HAVE_FSYNC = @HAVE_FSYNC@
-HAVE_FTELLO = @HAVE_FTELLO@
-HAVE_FTRUNCATE = @HAVE_FTRUNCATE@
-HAVE_FUTIMENS = @HAVE_FUTIMENS@
-HAVE_GETDTABLESIZE = @HAVE_GETDTABLESIZE@
-HAVE_GETGROUPS = @HAVE_GETGROUPS@
-HAVE_GETHOSTNAME = @HAVE_GETHOSTNAME@
-HAVE_GETLOGIN = @HAVE_GETLOGIN@
-HAVE_GETOPT_H = @HAVE_GETOPT_H@
-HAVE_GETPAGESIZE = @HAVE_GETPAGESIZE@
-HAVE_GETSUBOPT = @HAVE_GETSUBOPT@
-HAVE_GETTIMEOFDAY = @HAVE_GETTIMEOFDAY@
-HAVE_GRANTPT = @HAVE_GRANTPT@
-HAVE_GROUP_MEMBER = @HAVE_GROUP_MEMBER@
-HAVE_INTTYPES_H = @HAVE_INTTYPES_H@
-HAVE_ISWBLANK = @HAVE_ISWBLANK@
-HAVE_ISWCNTRL = @HAVE_ISWCNTRL@
-HAVE_LANGINFO_CODESET = @HAVE_LANGINFO_CODESET@
-HAVE_LANGINFO_ERA = @HAVE_LANGINFO_ERA@
-HAVE_LANGINFO_H = @HAVE_LANGINFO_H@
-HAVE_LANGINFO_T_FMT_AMPM = @HAVE_LANGINFO_T_FMT_AMPM@
-HAVE_LANGINFO_YESEXPR = @HAVE_LANGINFO_YESEXPR@
-HAVE_LCHMOD = @HAVE_LCHMOD@
-HAVE_LCHOWN = @HAVE_LCHOWN@
-HAVE_LINK = @HAVE_LINK@
-HAVE_LINKAT = @HAVE_LINKAT@
-HAVE_LONG_LONG_INT = @HAVE_LONG_LONG_INT@
-HAVE_LSTAT = @HAVE_LSTAT@
-HAVE_MBRLEN = @HAVE_MBRLEN@
-HAVE_MBRTOWC = @HAVE_MBRTOWC@
-HAVE_MBSINIT = @HAVE_MBSINIT@
-HAVE_MBSLEN = @HAVE_MBSLEN@
-HAVE_MBSNRTOWCS = @HAVE_MBSNRTOWCS@
-HAVE_MBSRTOWCS = @HAVE_MBSRTOWCS@
-HAVE_MEMCHR = @HAVE_MEMCHR@
-HAVE_MEMPCPY = @HAVE_MEMPCPY@
-HAVE_MKDIRAT = @HAVE_MKDIRAT@
-HAVE_MKDTEMP = @HAVE_MKDTEMP@
-HAVE_MKFIFO = @HAVE_MKFIFO@
-HAVE_MKFIFOAT = @HAVE_MKFIFOAT@
-HAVE_MKNOD = @HAVE_MKNOD@
-HAVE_MKNODAT = @HAVE_MKNODAT@
-HAVE_MKOSTEMP = @HAVE_MKOSTEMP@
-HAVE_MKOSTEMPS = @HAVE_MKOSTEMPS@
-HAVE_MKSTEMP = @HAVE_MKSTEMP@
-HAVE_MKSTEMPS = @HAVE_MKSTEMPS@
-HAVE_MSVC_INVALID_PARAMETER_HANDLER = @HAVE_MSVC_INVALID_PARAMETER_HANDLER@
-HAVE_NANOSLEEP = @HAVE_NANOSLEEP@
-HAVE_NL_LANGINFO = @HAVE_NL_LANGINFO@
-HAVE_OPENAT = @HAVE_OPENAT@
-HAVE_OS_H = @HAVE_OS_H@
-HAVE_PCLOSE = @HAVE_PCLOSE@
-HAVE_PIPE = @HAVE_PIPE@
-HAVE_PIPE2 = @HAVE_PIPE2@
-HAVE_POPEN = @HAVE_POPEN@
-HAVE_POSIX_OPENPT = @HAVE_POSIX_OPENPT@
-HAVE_PREAD = @HAVE_PREAD@
-HAVE_PTSNAME = @HAVE_PTSNAME@
-HAVE_PTSNAME_R = @HAVE_PTSNAME_R@
-HAVE_PWRITE = @HAVE_PWRITE@
-HAVE_RANDOM = @HAVE_RANDOM@
-HAVE_RANDOM_H = @HAVE_RANDOM_H@
-HAVE_RANDOM_R = @HAVE_RANDOM_R@
-HAVE_RAWMEMCHR = @HAVE_RAWMEMCHR@
-HAVE_READLINK = @HAVE_READLINK@
-HAVE_READLINKAT = @HAVE_READLINKAT@
-HAVE_REALPATH = @HAVE_REALPATH@
-HAVE_RENAMEAT = @HAVE_RENAMEAT@
-HAVE_RPMATCH = @HAVE_RPMATCH@
-HAVE_SETENV = @HAVE_SETENV@
-HAVE_SETHOSTNAME = @HAVE_SETHOSTNAME@
-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_SLEEP = @HAVE_SLEEP@
-HAVE_STDINT_H = @HAVE_STDINT_H@
-HAVE_STPCPY = @HAVE_STPCPY@
-HAVE_STPNCPY = @HAVE_STPNCPY@
-HAVE_STRCASESTR = @HAVE_STRCASESTR@
-HAVE_STRCHRNUL = @HAVE_STRCHRNUL@
-HAVE_STRPBRK = @HAVE_STRPBRK@
-HAVE_STRPTIME = @HAVE_STRPTIME@
-HAVE_STRSEP = @HAVE_STRSEP@
-HAVE_STRTOD = @HAVE_STRTOD@
-HAVE_STRTOLL = @HAVE_STRTOLL@
-HAVE_STRTOULL = @HAVE_STRTOULL@
-HAVE_STRUCT_RANDOM_DATA = @HAVE_STRUCT_RANDOM_DATA@
-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_INTTYPES_H = @HAVE_SYS_INTTYPES_H@
-HAVE_SYS_LOADAVG_H = @HAVE_SYS_LOADAVG_H@
-HAVE_SYS_PARAM_H = @HAVE_SYS_PARAM_H@
-HAVE_SYS_TIME_H = @HAVE_SYS_TIME_H@
-HAVE_SYS_TYPES_H = @HAVE_SYS_TYPES_H@
-HAVE_TIMEGM = @HAVE_TIMEGM@
-HAVE_UNISTD_H = @HAVE_UNISTD_H@
-HAVE_UNLINKAT = @HAVE_UNLINKAT@
-HAVE_UNLOCKPT = @HAVE_UNLOCKPT@
-HAVE_UNSIGNED_LONG_LONG_INT = @HAVE_UNSIGNED_LONG_LONG_INT@
-HAVE_USLEEP = @HAVE_USLEEP@
-HAVE_UTIMENSAT = @HAVE_UTIMENSAT@
-HAVE_VASPRINTF = @HAVE_VASPRINTF@
-HAVE_VDPRINTF = @HAVE_VDPRINTF@
-HAVE_WCHAR_H = @HAVE_WCHAR_H@
-HAVE_WCHAR_T = @HAVE_WCHAR_T@
-HAVE_WCPCPY = @HAVE_WCPCPY@
-HAVE_WCPNCPY = @HAVE_WCPNCPY@
-HAVE_WCRTOMB = @HAVE_WCRTOMB@
-HAVE_WCSCASECMP = @HAVE_WCSCASECMP@
-HAVE_WCSCAT = @HAVE_WCSCAT@
-HAVE_WCSCHR = @HAVE_WCSCHR@
-HAVE_WCSCMP = @HAVE_WCSCMP@
-HAVE_WCSCOLL = @HAVE_WCSCOLL@
-HAVE_WCSCPY = @HAVE_WCSCPY@
-HAVE_WCSCSPN = @HAVE_WCSCSPN@
-HAVE_WCSDUP = @HAVE_WCSDUP@
-HAVE_WCSLEN = @HAVE_WCSLEN@
-HAVE_WCSNCASECMP = @HAVE_WCSNCASECMP@
-HAVE_WCSNCAT = @HAVE_WCSNCAT@
-HAVE_WCSNCMP = @HAVE_WCSNCMP@
-HAVE_WCSNCPY = @HAVE_WCSNCPY@
-HAVE_WCSNLEN = @HAVE_WCSNLEN@
-HAVE_WCSNRTOMBS = @HAVE_WCSNRTOMBS@
-HAVE_WCSPBRK = @HAVE_WCSPBRK@
-HAVE_WCSRCHR = @HAVE_WCSRCHR@
-HAVE_WCSRTOMBS = @HAVE_WCSRTOMBS@
-HAVE_WCSSPN = @HAVE_WCSSPN@
-HAVE_WCSSTR = @HAVE_WCSSTR@
-HAVE_WCSTOK = @HAVE_WCSTOK@
-HAVE_WCSWIDTH = @HAVE_WCSWIDTH@
-HAVE_WCSXFRM = @HAVE_WCSXFRM@
-HAVE_WCTRANS_T = @HAVE_WCTRANS_T@
-HAVE_WCTYPE_H = @HAVE_WCTYPE_H@
-HAVE_WCTYPE_T = @HAVE_WCTYPE_T@
-HAVE_WINSOCK2_H = @HAVE_WINSOCK2_H@
-HAVE_WINT_T = @HAVE_WINT_T@
-HAVE_WMEMCHR = @HAVE_WMEMCHR@
-HAVE_WMEMCMP = @HAVE_WMEMCMP@
-HAVE_WMEMCPY = @HAVE_WMEMCPY@
-HAVE_WMEMMOVE = @HAVE_WMEMMOVE@
-HAVE_WMEMSET = @HAVE_WMEMSET@
-HAVE_XLOCALE_H = @HAVE_XLOCALE_H@
-HAVE__BOOL = @HAVE__BOOL@
-HAVE__EXIT = @HAVE__EXIT@
-INCLUDE_NEXT = @INCLUDE_NEXT@
-INCLUDE_NEXT_AS_FIRST_DIRECTIVE = @INCLUDE_NEXT_AS_FIRST_DIRECTIVE@
-INSTALL = @INSTALL@
-INSTALL_DATA = @INSTALL_DATA@
-INSTALL_PROGRAM = @INSTALL_PROGRAM@
-INSTALL_SCRIPT = @INSTALL_SCRIPT@
-INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
-INTLLIBS = @INTLLIBS@
-INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@
-LDFLAGS = @LDFLAGS@
-LIBICONV = @LIBICONV@
-LIBINTL = @LIBINTL@
-LIBOBJS = @LIBOBJS@
-LIBS = @LIBS@
-LIBSED_LIBDEPS = @LIBSED_LIBDEPS@
-LIBSED_LTLIBDEPS = @LIBSED_LTLIBDEPS@
-LIB_ACL = @LIB_ACL@
-LIB_SELINUX = @LIB_SELINUX@
-LOCALCHARSET_TESTS_ENVIRONMENT = @LOCALCHARSET_TESTS_ENVIRONMENT@
-LOCALE_FR = @LOCALE_FR@
-LOCALE_FR_UTF8 = @LOCALE_FR_UTF8@
-LOCALE_JA = @LOCALE_JA@
-LOCALE_ZH_CN = @LOCALE_ZH_CN@
-LTLIBICONV = @LTLIBICONV@
-LTLIBINTL = @LTLIBINTL@
-LTLIBOBJS = @LTLIBOBJS@
-MAKEINFO = @MAKEINFO@
-MKDIR_P = @MKDIR_P@
-MSGFMT = @MSGFMT@
-MSGFMT_015 = @MSGFMT_015@
-MSGMERGE = @MSGMERGE@
-NEXT_AS_FIRST_DIRECTIVE_ERRNO_H = @NEXT_AS_FIRST_DIRECTIVE_ERRNO_H@
-NEXT_AS_FIRST_DIRECTIVE_FCNTL_H = @NEXT_AS_FIRST_DIRECTIVE_FCNTL_H@
-NEXT_AS_FIRST_DIRECTIVE_GETOPT_H = @NEXT_AS_FIRST_DIRECTIVE_GETOPT_H@
-NEXT_AS_FIRST_DIRECTIVE_LANGINFO_H = @NEXT_AS_FIRST_DIRECTIVE_LANGINFO_H@
-NEXT_AS_FIRST_DIRECTIVE_LOCALE_H = @NEXT_AS_FIRST_DIRECTIVE_LOCALE_H@
-NEXT_AS_FIRST_DIRECTIVE_SELINUX_SELINUX_H = @NEXT_AS_FIRST_DIRECTIVE_SELINUX_SELINUX_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_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_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@
-NEXT_AS_FIRST_DIRECTIVE_WCTYPE_H = @NEXT_AS_FIRST_DIRECTIVE_WCTYPE_H@
-NEXT_ERRNO_H = @NEXT_ERRNO_H@
-NEXT_FCNTL_H = @NEXT_FCNTL_H@
-NEXT_GETOPT_H = @NEXT_GETOPT_H@
-NEXT_LANGINFO_H = @NEXT_LANGINFO_H@
-NEXT_LOCALE_H = @NEXT_LOCALE_H@
-NEXT_SELINUX_SELINUX_H = @NEXT_SELINUX_SELINUX_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_STAT_H = @NEXT_SYS_STAT_H@
-NEXT_SYS_TIME_H = @NEXT_SYS_TIME_H@
-NEXT_SYS_TYPES_H = @NEXT_SYS_TYPES_H@
-NEXT_TIME_H = @NEXT_TIME_H@
-NEXT_UNISTD_H = @NEXT_UNISTD_H@
-NEXT_WCHAR_H = @NEXT_WCHAR_H@
-NEXT_WCTYPE_H = @NEXT_WCTYPE_H@
-OBJEXT = @OBJEXT@
-PACKAGE = @PACKAGE@
-PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
-PACKAGE_NAME = @PACKAGE_NAME@
-PACKAGE_STRING = @PACKAGE_STRING@
-PACKAGE_TARNAME = @PACKAGE_TARNAME@
-PACKAGE_URL = @PACKAGE_URL@
-PACKAGE_VERSION = @PACKAGE_VERSION@
-PATH_SEPARATOR = @PATH_SEPARATOR@
-POSUB = @POSUB@
-PRAGMA_COLUMNS = @PRAGMA_COLUMNS@
-PRAGMA_SYSTEM_HEADER = @PRAGMA_SYSTEM_HEADER@
-PTHREAD_H_DEFINES_STRUCT_TIMESPEC = @PTHREAD_H_DEFINES_STRUCT_TIMESPEC@
-PTRDIFF_T_SUFFIX = @PTRDIFF_T_SUFFIX@
-RANLIB = @RANLIB@
-REPLACE_BTOWC = @REPLACE_BTOWC@
-REPLACE_CALLOC = @REPLACE_CALLOC@
-REPLACE_CANONICALIZE_FILE_NAME = @REPLACE_CANONICALIZE_FILE_NAME@
-REPLACE_CHOWN = @REPLACE_CHOWN@
-REPLACE_CLOSE = @REPLACE_CLOSE@
-REPLACE_DPRINTF = @REPLACE_DPRINTF@
-REPLACE_DUP = @REPLACE_DUP@
-REPLACE_DUP2 = @REPLACE_DUP2@
-REPLACE_DUPLOCALE = @REPLACE_DUPLOCALE@
-REPLACE_FCHOWNAT = @REPLACE_FCHOWNAT@
-REPLACE_FCLOSE = @REPLACE_FCLOSE@
-REPLACE_FCNTL = @REPLACE_FCNTL@
-REPLACE_FDOPEN = @REPLACE_FDOPEN@
-REPLACE_FFLUSH = @REPLACE_FFLUSH@
-REPLACE_FOPEN = @REPLACE_FOPEN@
-REPLACE_FPRINTF = @REPLACE_FPRINTF@
-REPLACE_FPURGE = @REPLACE_FPURGE@
-REPLACE_FREOPEN = @REPLACE_FREOPEN@
-REPLACE_FSEEK = @REPLACE_FSEEK@
-REPLACE_FSEEKO = @REPLACE_FSEEKO@
-REPLACE_FSTAT = @REPLACE_FSTAT@
-REPLACE_FSTATAT = @REPLACE_FSTATAT@
-REPLACE_FTELL = @REPLACE_FTELL@
-REPLACE_FTELLO = @REPLACE_FTELLO@
-REPLACE_FTRUNCATE = @REPLACE_FTRUNCATE@
-REPLACE_FUTIMENS = @REPLACE_FUTIMENS@
-REPLACE_GETCWD = @REPLACE_GETCWD@
-REPLACE_GETDELIM = @REPLACE_GETDELIM@
-REPLACE_GETDOMAINNAME = @REPLACE_GETDOMAINNAME@
-REPLACE_GETGROUPS = @REPLACE_GETGROUPS@
-REPLACE_GETLINE = @REPLACE_GETLINE@
-REPLACE_GETLOGIN_R = @REPLACE_GETLOGIN_R@
-REPLACE_GETPAGESIZE = @REPLACE_GETPAGESIZE@
-REPLACE_GETTIMEOFDAY = @REPLACE_GETTIMEOFDAY@
-REPLACE_ISATTY = @REPLACE_ISATTY@
-REPLACE_ISWBLANK = @REPLACE_ISWBLANK@
-REPLACE_ISWCNTRL = @REPLACE_ISWCNTRL@
-REPLACE_LCHOWN = @REPLACE_LCHOWN@
-REPLACE_LINK = @REPLACE_LINK@
-REPLACE_LINKAT = @REPLACE_LINKAT@
-REPLACE_LOCALECONV = @REPLACE_LOCALECONV@
-REPLACE_LOCALTIME_R = @REPLACE_LOCALTIME_R@
-REPLACE_LSEEK = @REPLACE_LSEEK@
-REPLACE_LSTAT = @REPLACE_LSTAT@
-REPLACE_MALLOC = @REPLACE_MALLOC@
-REPLACE_MBRLEN = @REPLACE_MBRLEN@
-REPLACE_MBRTOWC = @REPLACE_MBRTOWC@
-REPLACE_MBSINIT = @REPLACE_MBSINIT@
-REPLACE_MBSNRTOWCS = @REPLACE_MBSNRTOWCS@
-REPLACE_MBSRTOWCS = @REPLACE_MBSRTOWCS@
-REPLACE_MBSTATE_T = @REPLACE_MBSTATE_T@
-REPLACE_MBTOWC = @REPLACE_MBTOWC@
-REPLACE_MEMCHR = @REPLACE_MEMCHR@
-REPLACE_MEMMEM = @REPLACE_MEMMEM@
-REPLACE_MKDIR = @REPLACE_MKDIR@
-REPLACE_MKFIFO = @REPLACE_MKFIFO@
-REPLACE_MKNOD = @REPLACE_MKNOD@
-REPLACE_MKSTEMP = @REPLACE_MKSTEMP@
-REPLACE_MKTIME = @REPLACE_MKTIME@
-REPLACE_NANOSLEEP = @REPLACE_NANOSLEEP@
-REPLACE_NL_LANGINFO = @REPLACE_NL_LANGINFO@
-REPLACE_NULL = @REPLACE_NULL@
-REPLACE_OBSTACK_PRINTF = @REPLACE_OBSTACK_PRINTF@
-REPLACE_OPEN = @REPLACE_OPEN@
-REPLACE_OPENAT = @REPLACE_OPENAT@
-REPLACE_PERROR = @REPLACE_PERROR@
-REPLACE_POPEN = @REPLACE_POPEN@
-REPLACE_PREAD = @REPLACE_PREAD@
-REPLACE_PRINTF = @REPLACE_PRINTF@
-REPLACE_PTSNAME = @REPLACE_PTSNAME@
-REPLACE_PTSNAME_R = @REPLACE_PTSNAME_R@
-REPLACE_PUTENV = @REPLACE_PUTENV@
-REPLACE_PWRITE = @REPLACE_PWRITE@
-REPLACE_RANDOM_R = @REPLACE_RANDOM_R@
-REPLACE_READ = @REPLACE_READ@
-REPLACE_READLINK = @REPLACE_READLINK@
-REPLACE_REALLOC = @REPLACE_REALLOC@
-REPLACE_REALPATH = @REPLACE_REALPATH@
-REPLACE_REMOVE = @REPLACE_REMOVE@
-REPLACE_RENAME = @REPLACE_RENAME@
-REPLACE_RENAMEAT = @REPLACE_RENAMEAT@
-REPLACE_RMDIR = @REPLACE_RMDIR@
-REPLACE_SETENV = @REPLACE_SETENV@
-REPLACE_SETLOCALE = @REPLACE_SETLOCALE@
-REPLACE_SLEEP = @REPLACE_SLEEP@
-REPLACE_SNPRINTF = @REPLACE_SNPRINTF@
-REPLACE_SPRINTF = @REPLACE_SPRINTF@
-REPLACE_STAT = @REPLACE_STAT@
-REPLACE_STDIO_READ_FUNCS = @REPLACE_STDIO_READ_FUNCS@
-REPLACE_STDIO_WRITE_FUNCS = @REPLACE_STDIO_WRITE_FUNCS@
-REPLACE_STPNCPY = @REPLACE_STPNCPY@
-REPLACE_STRCASESTR = @REPLACE_STRCASESTR@
-REPLACE_STRCHRNUL = @REPLACE_STRCHRNUL@
-REPLACE_STRDUP = @REPLACE_STRDUP@
-REPLACE_STRERROR = @REPLACE_STRERROR@
-REPLACE_STRERROR_R = @REPLACE_STRERROR_R@
-REPLACE_STRNCAT = @REPLACE_STRNCAT@
-REPLACE_STRNDUP = @REPLACE_STRNDUP@
-REPLACE_STRNLEN = @REPLACE_STRNLEN@
-REPLACE_STRSIGNAL = @REPLACE_STRSIGNAL@
-REPLACE_STRSTR = @REPLACE_STRSTR@
-REPLACE_STRTOD = @REPLACE_STRTOD@
-REPLACE_STRTOK_R = @REPLACE_STRTOK_R@
-REPLACE_STRUCT_LCONV = @REPLACE_STRUCT_LCONV@
-REPLACE_STRUCT_TIMEVAL = @REPLACE_STRUCT_TIMEVAL@
-REPLACE_SYMLINK = @REPLACE_SYMLINK@
-REPLACE_TIMEGM = @REPLACE_TIMEGM@
-REPLACE_TMPFILE = @REPLACE_TMPFILE@
-REPLACE_TOWLOWER = @REPLACE_TOWLOWER@
-REPLACE_TTYNAME_R = @REPLACE_TTYNAME_R@
-REPLACE_UNLINK = @REPLACE_UNLINK@
-REPLACE_UNLINKAT = @REPLACE_UNLINKAT@
-REPLACE_UNSETENV = @REPLACE_UNSETENV@
-REPLACE_USLEEP = @REPLACE_USLEEP@
-REPLACE_UTIMENSAT = @REPLACE_UTIMENSAT@
-REPLACE_VASPRINTF = @REPLACE_VASPRINTF@
-REPLACE_VDPRINTF = @REPLACE_VDPRINTF@
-REPLACE_VFPRINTF = @REPLACE_VFPRINTF@
-REPLACE_VPRINTF = @REPLACE_VPRINTF@
-REPLACE_VSNPRINTF = @REPLACE_VSNPRINTF@
-REPLACE_VSPRINTF = @REPLACE_VSPRINTF@
-REPLACE_WCRTOMB = @REPLACE_WCRTOMB@
-REPLACE_WCSNRTOMBS = @REPLACE_WCSNRTOMBS@
-REPLACE_WCSRTOMBS = @REPLACE_WCSRTOMBS@
-REPLACE_WCSWIDTH = @REPLACE_WCSWIDTH@
-REPLACE_WCTOB = @REPLACE_WCTOB@
-REPLACE_WCTOMB = @REPLACE_WCTOMB@
-REPLACE_WCWIDTH = @REPLACE_WCWIDTH@
-REPLACE_WRITE = @REPLACE_WRITE@
-SED_FEATURE_VERSION = @SED_FEATURE_VERSION@
-SELINUX_CONTEXT_H = @SELINUX_CONTEXT_H@
-SET_MAKE = @SET_MAKE@
-SHELL = @SHELL@
-SIG_ATOMIC_T_SUFFIX = @SIG_ATOMIC_T_SUFFIX@
-SIZE_T_SUFFIX = @SIZE_T_SUFFIX@
-STDARG_H = @STDARG_H@
-STDBOOL_H = @STDBOOL_H@
-STDDEF_H = @STDDEF_H@
-STDINT_H = @STDINT_H@
-STRIP = @STRIP@
-SYS_TIME_H_DEFINES_STRUCT_TIMESPEC = @SYS_TIME_H_DEFINES_STRUCT_TIMESPEC@
-TIME_H_DEFINES_STRUCT_TIMESPEC = @TIME_H_DEFINES_STRUCT_TIMESPEC@
-UNDEFINE_STRTOK_R = @UNDEFINE_STRTOK_R@
-UNISTD_H_HAVE_WINSOCK2_H = @UNISTD_H_HAVE_WINSOCK2_H@
-UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS = @UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS@
-USE_ACL = @USE_ACL@
-USE_NLS = @USE_NLS@
-VERSION = @VERSION@
-WCHAR_T_SUFFIX = @WCHAR_T_SUFFIX@
-WINDOWS_64_BIT_OFF_T = @WINDOWS_64_BIT_OFF_T@
-WINDOWS_64_BIT_ST_SIZE = @WINDOWS_64_BIT_ST_SIZE@
-WINT_T_SUFFIX = @WINT_T_SUFFIX@
-XFAIL_TESTS = @XFAIL_TESTS@
-XGETTEXT = @XGETTEXT@
-XGETTEXT_015 = @XGETTEXT_015@
-XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@
-abs_builddir = @abs_builddir@
-abs_srcdir = @abs_srcdir@
-abs_top_builddir = @abs_top_builddir@
-abs_top_srcdir = @abs_top_srcdir@
-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@
-bindir = @bindir@
-build = @build@
-build_alias = @build_alias@
-build_cpu = @build_cpu@
-build_os = @build_os@
-build_vendor = @build_vendor@
-builddir = @builddir@
-datadir = @datadir@
-datarootdir = @datarootdir@
-docdir = @docdir@
-dvidir = @dvidir@
-exec_prefix = @exec_prefix@
-gl_LIBOBJS = @gl_LIBOBJS@
-gl_LTLIBOBJS = @gl_LTLIBOBJS@
-gltests_LIBOBJS = @gltests_LIBOBJS@
-gltests_LTLIBOBJS = @gltests_LTLIBOBJS@
-gltests_WITNESS = @gltests_WITNESS@
-host = @host@
-host_alias = @host_alias@
-host_cpu = @host_cpu@
-host_os = @host_os@
-host_vendor = @host_vendor@
-htmldir = @htmldir@
-includedir = @includedir@
-infodir = @infodir@
-install_sh = @install_sh@
-libdir = @libdir@
-libexecdir = @libexecdir@
-lispdir = @lispdir@
-localedir = @localedir@
-localstatedir = @localstatedir@
-mandir = @mandir@
-mkdir_p = @mkdir_p@
-oldincludedir = @oldincludedir@
-pdfdir = @pdfdir@
-prefix = @prefix@
-program_transform_name = @program_transform_name@
-psdir = @psdir@
-sbindir = @sbindir@
-sharedstatedir = @sharedstatedir@
-srcdir = @srcdir@
-sysconfdir = @sysconfdir@
-target_alias = @target_alias@
-top_build_prefix = @top_build_prefix@
-top_builddir = @top_builddir@
-top_srcdir = @top_srcdir@
-info_TEXINFOS = sed.texi
-sed_TEXINFOS = config.texi version.texi
-dist_man_MANS = sed.1
-dist_noinst_DATA = sed.x sed-in.texi s-texi
-dist_noinst_SCRIPTS = groupify.sed
-TEXI2DVI = $(top_srcdir)/build-aux/texi2dvi --expand
-HELP2MAN = $(top_srcdir)/build-aux/help2man
-SED = $(top_builddir)/sed/sed
-AM_MAKEINFOHTMLFLAGS = --no-split
-all: all-am
-
-.SUFFIXES:
-.SUFFIXES: .dvi .html .info .pdf .ps .texi
-$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
- @for dep in $?; do \
- case '$(am__configure_deps)' in \
- *$$dep*) \
- ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
- && { if test -f $@; then exit 0; else break; fi; }; \
- exit 1;; \
- esac; \
- done; \
- echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnits doc/Makefile'; \
- $(am__cd) $(top_srcdir) && \
- $(AUTOMAKE) --gnits doc/Makefile
-.PRECIOUS: Makefile
-Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
- @case '$?' in \
- *config.status*) \
- cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
- *) \
- echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
- cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
- esac;
-
-$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
- cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
-
-$(top_srcdir)/configure: $(am__configure_deps)
- cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
-$(ACLOCAL_M4): $(am__aclocal_m4_deps)
- cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
-$(am__aclocal_m4_deps):
-
-.texi.info:
- 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 $(srcdir) \
- -o $@ $<; \
- then \
- rc=0; \
- $(am__cd) $(srcdir); \
- else \
- rc=$$?; \
- $(am__cd) $(srcdir) && \
- $$restore $$backupdir/* `echo "./$@" | sed 's|[^/]*$$||'`; \
- fi; \
- rm -rf $$backupdir; exit $$rc
-
-.texi.dvi:
- TEXINPUTS="$(am__TEXINFO_TEX_DIR)$(PATH_SEPARATOR)$$TEXINPUTS" \
- MAKEINFO='$(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) -I $(srcdir)' \
- $(TEXI2DVI) --clean $<
-
-.texi.pdf:
- TEXINPUTS="$(am__TEXINFO_TEX_DIR)$(PATH_SEPARATOR)$$TEXINPUTS" \
- MAKEINFO='$(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) -I $(srcdir)' \
- $(TEXI2PDF) --clean $<
-
-.texi.html:
- rm -rf $(@:.html=.htp)
- if $(MAKEINFOHTML) $(AM_MAKEINFOHTMLFLAGS) $(MAKEINFOFLAGS) -I $(srcdir) \
- -o $(@:.html=.htp) $<; \
- then \
- rm -rf $@; \
- if test ! -d $(@:.html=.htp) && test -d $(@:.html=); then \
- mv $(@:.html=) $@; else mv $(@:.html=.htp) $@; fi; \
- else \
- if test ! -d $(@:.html=.htp) && test -d $(@:.html=); then \
- rm -rf $(@:.html=); else rm -Rf $(@:.html=.htp) $@; fi; \
- exit 1; \
- fi
-$(srcdir)/sed.info: sed.texi $(srcdir)/version.texi $(sed_TEXINFOS)
-sed.dvi: sed.texi $(srcdir)/version.texi $(sed_TEXINFOS)
-sed.pdf: sed.texi $(srcdir)/version.texi $(sed_TEXINFOS)
-sed.html: sed.texi $(srcdir)/version.texi $(sed_TEXINFOS)
-$(srcdir)/version.texi: $(srcdir)/stamp-vti
-$(srcdir)/stamp-vti: sed.texi $(top_srcdir)/configure
- @(dir=.; test -f ./sed.texi || dir=$(srcdir); \
- set `$(SHELL) $(top_srcdir)/build-aux/mdate-sh $$dir/sed.texi`; \
- echo "@set UPDATED $$1 $$2 $$3"; \
- echo "@set UPDATED-MONTH $$2 $$3"; \
- echo "@set EDITION $(VERSION)"; \
- echo "@set VERSION $(VERSION)") > vti.tmp
- @cmp -s vti.tmp $(srcdir)/version.texi \
- || (echo "Updating $(srcdir)/version.texi"; \
- cp vti.tmp $(srcdir)/version.texi)
- -@rm -f vti.tmp
- @cp $(srcdir)/version.texi $@
-
-mostlyclean-vti:
- -rm -f vti.tmp
-
-maintainer-clean-vti:
- -rm -f $(srcdir)/stamp-vti $(srcdir)/version.texi
-.dvi.ps:
- TEXINPUTS="$(am__TEXINFO_TEX_DIR)$(PATH_SEPARATOR)$$TEXINPUTS" \
- $(DVIPS) -o $@ $<
-
-uninstall-dvi-am:
- @$(NORMAL_UNINSTALL)
- @list='$(DVIS)'; test -n "$(dvidir)" || list=; \
- for p in $$list; do \
- $(am__strip_dir) \
- echo " rm -f '$(DESTDIR)$(dvidir)/$$f'"; \
- rm -f "$(DESTDIR)$(dvidir)/$$f"; \
- done
-
-uninstall-html-am:
- @$(NORMAL_UNINSTALL)
- @list='$(HTMLS)'; test -n "$(htmldir)" || list=; \
- for p in $$list; do \
- $(am__strip_dir) \
- echo " rm -rf '$(DESTDIR)$(htmldir)/$$f'"; \
- rm -rf "$(DESTDIR)$(htmldir)/$$f"; \
- done
-
-uninstall-info-am:
- @$(PRE_UNINSTALL)
- @if test -d '$(DESTDIR)$(infodir)' && $(am__can_run_installinfo); then \
- list='$(INFO_DEPS)'; \
- for file in $$list; do \
- relfile=`echo "$$file" | sed 's|^.*/||'`; \
- echo " install-info --info-dir='$(DESTDIR)$(infodir)' --remove '$(DESTDIR)$(infodir)/$$relfile'"; \
- if install-info --info-dir="$(DESTDIR)$(infodir)" --remove "$(DESTDIR)$(infodir)/$$relfile"; \
- then :; else test ! -f "$(DESTDIR)$(infodir)/$$relfile" || exit 1; fi; \
- done; \
- else :; fi
- @$(NORMAL_UNINSTALL)
- @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 $$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
-
-uninstall-pdf-am:
- @$(NORMAL_UNINSTALL)
- @list='$(PDFS)'; test -n "$(pdfdir)" || list=; \
- for p in $$list; do \
- $(am__strip_dir) \
- echo " rm -f '$(DESTDIR)$(pdfdir)/$$f'"; \
- rm -f "$(DESTDIR)$(pdfdir)/$$f"; \
- done
-
-uninstall-ps-am:
- @$(NORMAL_UNINSTALL)
- @list='$(PSS)'; test -n "$(psdir)" || list=; \
- for p in $$list; do \
- $(am__strip_dir) \
- echo " rm -f '$(DESTDIR)$(psdir)/$$f'"; \
- rm -f "$(DESTDIR)$(psdir)/$$f"; \
- done
-
-dist-info: $(INFO_DEPS)
- @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
- list='$(INFO_DEPS)'; \
- for base in $$list; do \
- case $$base in \
- $(srcdir)/*) base=`echo "$$base" | sed "s|^$$srcdirstrip/||"`;; \
- esac; \
- 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:
- -rm -rf sed.aux sed.cp sed.cps sed.fn sed.fns sed.ky sed.log sed.op sed.pg \
- sed.tmp sed.toc sed.tp sed.vr sed.vrs
-
-clean-aminfo:
- -test -z "sed.dvi sed.pdf sed.ps sed.html" \
- || rm -rf sed.dvi sed.pdf sed.ps sed.html
-
-maintainer-clean-aminfo:
- @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=''; \
- list2='$(dist_man_MANS)'; \
- test -n "$(man1dir)" \
- && test -n "`echo $$list1$$list2`" \
- || exit 0; \
- echo " $(MKDIR_P) '$(DESTDIR)$(man1dir)'"; \
- $(MKDIR_P) "$(DESTDIR)$(man1dir)" || exit 1; \
- { for i in $$list1; do echo "$$i"; done; \
- if test -n "$$list2"; then \
- for i in $$list2; do echo "$$i"; done \
- | sed -n '/\.1[a-z]*$$/p'; \
- fi; \
- } | while read p; do \
- if test -f $$p; then d=; else d="$(srcdir)/"; fi; \
- echo "$$d$$p"; echo "$$p"; \
- done | \
- sed -e 'n;s,.*/,,;p;h;s,.*\.,,;s,^[^1][0-9a-z]*$$,1,;x' \
- -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,' | \
- sed 'N;N;s,\n, ,g' | { \
- list=; while read file base inst; do \
- if test "$$base" = "$$inst"; then list="$$list $$file"; else \
- echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man1dir)/$$inst'"; \
- $(INSTALL_DATA) "$$file" "$(DESTDIR)$(man1dir)/$$inst" || exit $$?; \
- fi; \
- done; \
- for i in $$list; do echo "$$i"; done | $(am__base_list) | \
- while read files; do \
- test -z "$$files" || { \
- echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(man1dir)'"; \
- $(INSTALL_DATA) $$files "$(DESTDIR)$(man1dir)" || exit $$?; }; \
- done; }
-
-uninstall-man1:
- @$(NORMAL_UNINSTALL)
- @list=''; test -n "$(man1dir)" || exit 0; \
- files=`{ for i in $$list; do echo "$$i"; done; \
- l2='$(dist_man_MANS)'; for i in $$l2; do echo "$$i"; done | \
- sed -n '/\.1[a-z]*$$/p'; \
- } | sed -e 's,.*/,,;h;s,.*\.,,;s,^[^1][0-9a-z]*$$,1,;x' \
- -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,'`; \
- dir='$(DESTDIR)$(man1dir)'; $(am__uninstall_files_from_dir)
-tags: TAGS
-TAGS:
-
-ctags: CTAGS
-CTAGS:
-
-cscope cscopelist:
-
-
-distdir: $(DISTFILES)
- @list='$(MANS)'; if test -n "$$list"; then \
- list=`for p in $$list; do \
- if test -f $$p; then d=; else d="$(srcdir)/"; fi; \
- if test -f "$$d$$p"; then echo "$$d$$p"; else :; fi; done`; \
- if test -n "$$list" && \
- grep 'ab help2man is required to generate this page' $$list >/dev/null; then \
- echo "error: found man pages containing the 'missing help2man' replacement text:" >&2; \
- grep -l 'ab help2man is required to generate this page' $$list | sed 's/^/ /' >&2; \
- echo " to fix them, install help2man, remove and regenerate the man pages;" >&2; \
- echo " typically 'make maintainer-clean' will remove them" >&2; \
- exit 1; \
- else :; fi; \
- else :; fi
- @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
- topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
- list='$(DISTFILES)'; \
- dist_files=`for file in $$list; do echo $$file; done | \
- sed -e "s|^$$srcdirstrip/||;t" \
- -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
- case $$dist_files in \
- */*) $(MKDIR_P) `echo "$$dist_files" | \
- sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
- sort -u` ;; \
- esac; \
- for file in $$dist_files; do \
- if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
- if test -d $$d/$$file; then \
- dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
- if test -d "$(distdir)/$$file"; then \
- find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
- fi; \
- if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
- cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
- find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
- fi; \
- cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
- else \
- test -f "$(distdir)/$$file" \
- || cp -p $$d/$$file "$(distdir)/$$file" \
- || exit 1; \
- fi; \
- done
- $(MAKE) $(AM_MAKEFLAGS) \
- top_distdir="$(top_distdir)" distdir="$(distdir)" \
- dist-info dist-hook
-check-am: all-am
-check: check-am
-all-am: Makefile $(INFO_DEPS) $(SCRIPTS) $(MANS) $(DATA)
-installdirs:
- for dir in "$(DESTDIR)$(infodir)" "$(DESTDIR)$(man1dir)"; do \
- test -z "$$dir" || $(MKDIR_P) "$$dir"; \
- done
-install: install-am
-install-exec: install-exec-am
-install-data: install-data-am
-uninstall: uninstall-am
-
-install-am: all-am
- @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
-
-installcheck: installcheck-am
-install-strip:
- if test -z '$(STRIP)'; then \
- $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
- install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
- install; \
- else \
- $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
- install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
- "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
- fi
-mostlyclean-generic:
-
-clean-generic:
-
-distclean-generic:
- -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
- -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
-
-maintainer-clean-generic:
- @echo "This command is intended for maintainers to use"
- @echo "it deletes files that may require special tools to rebuild."
-clean: clean-am
-
-clean-am: clean-aminfo clean-generic mostlyclean-am
-
-distclean: distclean-am
- -rm -f Makefile
-distclean-am: clean-am distclean-generic
-
-dvi: dvi-am
-
-dvi-am: $(DVIS)
-
-html: html-am
-
-html-am: $(HTMLS)
-
-info: info-am
-
-info-am: $(INFO_DEPS)
-
-install-data-am: install-info-am install-man
-
-install-dvi: install-dvi-am
-
-install-dvi-am: $(DVIS)
- @$(NORMAL_INSTALL)
- @list='$(DVIS)'; test -n "$(dvidir)" || list=; \
- if test -n "$$list"; then \
- echo " $(MKDIR_P) '$(DESTDIR)$(dvidir)'"; \
- $(MKDIR_P) "$(DESTDIR)$(dvidir)" || exit 1; \
- fi; \
- for p in $$list; do \
- if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
- echo "$$d$$p"; \
- done | $(am__base_list) | \
- while read files; do \
- echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(dvidir)'"; \
- $(INSTALL_DATA) $$files "$(DESTDIR)$(dvidir)" || exit $$?; \
- done
-install-exec-am:
-
-install-html: install-html-am
-
-install-html-am: $(HTMLS)
- @$(NORMAL_INSTALL)
- @list='$(HTMLS)'; list2=; test -n "$(htmldir)" || list=; \
- if test -n "$$list"; then \
- echo " $(MKDIR_P) '$(DESTDIR)$(htmldir)'"; \
- $(MKDIR_P) "$(DESTDIR)$(htmldir)" || exit 1; \
- fi; \
- for p in $$list; do \
- if test -f "$$p" || test -d "$$p"; then d=; else d="$(srcdir)/"; fi; \
- $(am__strip_dir) \
- d2=$$d$$p; \
- if test -d "$$d2"; then \
- echo " $(MKDIR_P) '$(DESTDIR)$(htmldir)/$$f'"; \
- $(MKDIR_P) "$(DESTDIR)$(htmldir)/$$f" || exit 1; \
- echo " $(INSTALL_DATA) '$$d2'/* '$(DESTDIR)$(htmldir)/$$f'"; \
- $(INSTALL_DATA) "$$d2"/* "$(DESTDIR)$(htmldir)/$$f" || exit $$?; \
- else \
- list2="$$list2 $$d2"; \
- fi; \
- done; \
- test -z "$$list2" || { echo "$$list2" | $(am__base_list) | \
- while read files; do \
- echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(htmldir)'"; \
- $(INSTALL_DATA) $$files "$(DESTDIR)$(htmldir)" || exit $$?; \
- done; }
-install-info: install-info-am
-
-install-info-am: $(INFO_DEPS)
- @$(NORMAL_INSTALL)
- @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
- list='$(INFO_DEPS)'; test -n "$(infodir)" || list=; \
- if test -n "$$list"; then \
- echo " $(MKDIR_P) '$(DESTDIR)$(infodir)'"; \
- $(MKDIR_P) "$(DESTDIR)$(infodir)" || exit 1; \
- fi; \
- for file in $$list; do \
- case $$file in \
- $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
- esac; \
- 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)'"; \
- $(INSTALL_DATA) $$files "$(DESTDIR)$(infodir)" || exit $$?; done
- @$(POST_INSTALL)
- @if $(am__can_run_installinfo); then \
- list='$(INFO_DEPS)'; test -n "$(infodir)" || list=; \
- for file in $$list; do \
- relfile=`echo "$$file" | sed 's|^.*/||'`; \
- echo " install-info --info-dir='$(DESTDIR)$(infodir)' '$(DESTDIR)$(infodir)/$$relfile'";\
- install-info --info-dir="$(DESTDIR)$(infodir)" "$(DESTDIR)$(infodir)/$$relfile" || :;\
- done; \
- else : ; fi
-install-man: install-man1
-
-install-pdf: install-pdf-am
-
-install-pdf-am: $(PDFS)
- @$(NORMAL_INSTALL)
- @list='$(PDFS)'; test -n "$(pdfdir)" || list=; \
- if test -n "$$list"; then \
- echo " $(MKDIR_P) '$(DESTDIR)$(pdfdir)'"; \
- $(MKDIR_P) "$(DESTDIR)$(pdfdir)" || exit 1; \
- fi; \
- for p in $$list; do \
- if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
- echo "$$d$$p"; \
- done | $(am__base_list) | \
- while read files; do \
- echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(pdfdir)'"; \
- $(INSTALL_DATA) $$files "$(DESTDIR)$(pdfdir)" || exit $$?; done
-install-ps: install-ps-am
-
-install-ps-am: $(PSS)
- @$(NORMAL_INSTALL)
- @list='$(PSS)'; test -n "$(psdir)" || list=; \
- if test -n "$$list"; then \
- echo " $(MKDIR_P) '$(DESTDIR)$(psdir)'"; \
- $(MKDIR_P) "$(DESTDIR)$(psdir)" || exit 1; \
- fi; \
- for p in $$list; do \
- if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
- echo "$$d$$p"; \
- done | $(am__base_list) | \
- while read files; do \
- echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(psdir)'"; \
- $(INSTALL_DATA) $$files "$(DESTDIR)$(psdir)" || exit $$?; done
-installcheck-am:
-
-maintainer-clean: maintainer-clean-am
- -rm -f Makefile
-maintainer-clean-am: distclean-am maintainer-clean-aminfo \
- maintainer-clean-generic maintainer-clean-vti
-
-mostlyclean: mostlyclean-am
-
-mostlyclean-am: mostlyclean-aminfo mostlyclean-generic mostlyclean-vti
-
-pdf: pdf-am
-
-pdf-am: $(PDFS)
-
-ps: ps-am
-
-ps-am: $(PSS)
-
-uninstall-am: uninstall-dvi-am uninstall-html-am uninstall-info-am \
- uninstall-man uninstall-pdf-am uninstall-ps-am
-
-uninstall-man: uninstall-man1
-
-.MAKE: install-am install-strip
-
-.PHONY: all all-am check check-am clean clean-aminfo clean-generic \
- dist-hook dist-info distclean distclean-generic distdir dvi \
- dvi-am html html-am info info-am install install-am \
- install-data install-data-am install-dvi install-dvi-am \
- install-exec install-exec-am 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 installdirs \
- maintainer-clean maintainer-clean-aminfo \
- maintainer-clean-generic maintainer-clean-vti mostlyclean \
- mostlyclean-aminfo mostlyclean-generic mostlyclean-vti pdf \
- pdf-am ps ps-am uninstall uninstall-am uninstall-dvi-am \
- uninstall-html-am uninstall-info-am uninstall-man \
- uninstall-man1 uninstall-pdf-am uninstall-ps-am
-
-
-# To produce better quality output, in the example sed
-# scripts we group comments with lines following them;
-# since mantaining the "@group...@end group" manually
-# is a burden, we do this automatically
-$(srcdir)/sed.texi: $(srcdir)/s-texi
-$(srcdir)/s-texi: sed-in.texi $(srcdir)/groupify.sed
- sed -nf $(srcdir)/groupify.sed \
- < $(srcdir)/sed-in.texi > $(srcdir)/sed-tmp.texi
- if cmp $(srcdir)/sed.texi $(srcdir)/sed-tmp.texi; then \
- rm -f $(srcdir)/sed-tmp.texi; \
- else \
- mv -f $(srcdir)/sed-tmp.texi $(srcdir)/sed.texi; \
- fi
- echo stamp > $(srcdir)/s-texi
-
-sed.1: $(top_srcdir)/sed/sed.c $(top_srcdir)/configure.ac $(srcdir)/sed.x
- $(HELP2MAN) --name "stream editor for filtering and transforming text" \
- -p sed --include $(srcdir)/sed.x -o $(srcdir)/sed.1 $(SED)
-
-dist-hook:
- touch $(distdir)/sed.1
-
-# 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/doc/config.texi b/doc/config.texi
index aa5e35a..42c0b76 100644
--- a/doc/config.texi
+++ b/doc/config.texi
@@ -7,3 +7,29 @@
@clear PERL
@set SSEDEXT @acronym{GNU} extensions
@set SSED @acronym{GNU} @command{sed}
+
+@c Ugly hack to enable using new texinfo commands '@codequotebacktick'
+@c and '@codequoteundirected' or define empty fallbacks if they are
+@c not available.
+
+@ifclear txicommandconditionals
+@c If we got here, this is a REALLY old texinfo (pre 5.0),
+@c and '@ifcommandnotdefined' is not defined.
+@c Assume these commands are not defined as well.
+@macro codequotebacktick
+@end macro
+@macro codequoteundirected
+@end macro
+@end ifclear
+
+@ifset txicommandconditionals
+@c if we got here, this texinfo supports checking for defined
+@c commands. If these commands aren't available - define empty
+@c fallbacks.
+@ifcommandnotdefined codequotebacktick
+@macro codequotebacktick
+@end macro
+@macro codequoteundirected
+@end macro
+@end ifcommandnotdefined
+@end ifset
diff --git a/doc/fdl.texi b/doc/fdl.texi
new file mode 100644
index 0000000..9c3bbe5
--- /dev/null
+++ b/doc/fdl.texi
@@ -0,0 +1,505 @@
+@c The GNU Free Documentation License.
+@center Version 1.3, 3 November 2008
+
+@c This file is intended to be included within another document,
+@c hence no sectioning command or @node.
+
+@display
+Copyright @copyright{} 2000, 2001, 2002, 2007, 2008 Free Software Foundation, Inc.
+@uref{http://fsf.org/}
+
+Everyone is permitted to copy and distribute verbatim copies
+of this license document, but changing it is not allowed.
+@end display
+
+@enumerate 0
+@item
+PREAMBLE
+
+The purpose of this License is to make a manual, textbook, or other
+functional and useful document @dfn{free} in the sense of freedom: to
+assure everyone the effective freedom to copy and redistribute it,
+with or without modifying it, either commercially or noncommercially.
+Secondarily, this License preserves for the author and publisher a way
+to get credit for their work, while not being considered responsible
+for modifications made by others.
+
+This License is a kind of ``copyleft'', which means that derivative
+works of the document must themselves be free in the same sense. It
+complements the GNU General Public License, which is a copyleft
+license designed for free software.
+
+We have designed this License in order to use it for manuals for free
+software, because free software needs free documentation: a free
+program should come with manuals providing the same freedoms that the
+software does. But this License is not limited to software manuals;
+it can be used for any textual work, regardless of subject matter or
+whether it is published as a printed book. We recommend this License
+principally for works whose purpose is instruction or reference.
+
+@item
+APPLICABILITY AND DEFINITIONS
+
+This License applies to any manual or other work, in any medium, that
+contains a notice placed by the copyright holder saying it can be
+distributed under the terms of this License. Such a notice grants a
+world-wide, royalty-free license, unlimited in duration, to use that
+work under the conditions stated herein. The ``Document'', below,
+refers to any such manual or work. Any member of the public is a
+licensee, and is addressed as ``you''. You accept the license if you
+copy, modify or distribute the work in a way requiring permission
+under copyright law.
+
+A ``Modified Version'' of the Document means any work containing the
+Document or a portion of it, either copied verbatim, or with
+modifications and/or translated into another language.
+
+A ``Secondary Section'' is a named appendix or a front-matter section
+of the Document that deals exclusively with the relationship of the
+publishers or authors of the Document to the Document's overall
+subject (or to related matters) and contains nothing that could fall
+directly within that overall subject. (Thus, if the Document is in
+part a textbook of mathematics, a Secondary Section may not explain
+any mathematics.) The relationship could be a matter of historical
+connection with the subject or with related matters, or of legal,
+commercial, philosophical, ethical or political position regarding
+them.
+
+The ``Invariant Sections'' are certain Secondary Sections whose titles
+are designated, as being those of Invariant Sections, in the notice
+that says that the Document is released under this License. If a
+section does not fit the above definition of Secondary then it is not
+allowed to be designated as Invariant. The Document may contain zero
+Invariant Sections. If the Document does not identify any Invariant
+Sections then there are none.
+
+The ``Cover Texts'' are certain short passages of text that are listed,
+as Front-Cover Texts or Back-Cover Texts, in the notice that says that
+the Document is released under this License. A Front-Cover Text may
+be at most 5 words, and a Back-Cover Text may be at most 25 words.
+
+A ``Transparent'' copy of the Document means a machine-readable copy,
+represented in a format whose specification is available to the
+general public, that is suitable for revising the document
+straightforwardly with generic text editors or (for images composed of
+pixels) generic paint programs or (for drawings) some widely available
+drawing editor, and that is suitable for input to text formatters or
+for automatic translation to a variety of formats suitable for input
+to text formatters. A copy made in an otherwise Transparent file
+format whose markup, or absence of markup, has been arranged to thwart
+or discourage subsequent modification by readers is not Transparent.
+An image format is not Transparent if used for any substantial amount
+of text. A copy that is not ``Transparent'' is called ``Opaque''.
+
+Examples of suitable formats for Transparent copies include plain
+ASCII without markup, Texinfo input format, La@TeX{} input
+format, SGML or XML using a publicly available
+DTD, and standard-conforming simple HTML,
+PostScript or PDF designed for human modification. Examples
+of transparent image formats include PNG, XCF and
+JPG@. Opaque formats include proprietary formats that can be
+read and edited only by proprietary word processors, SGML or
+XML for which the DTD and/or processing tools are
+not generally available, and the machine-generated HTML,
+PostScript or PDF produced by some word processors for
+output purposes only.
+
+The ``Title Page'' means, for a printed book, the title page itself,
+plus such following pages as are needed to hold, legibly, the material
+this License requires to appear in the title page. For works in
+formats which do not have any title page as such, ``Title Page'' means
+the text near the most prominent appearance of the work's title,
+preceding the beginning of the body of the text.
+
+The ``publisher'' means any person or entity that distributes copies
+of the Document to the public.
+
+A section ``Entitled XYZ'' means a named subunit of the Document whose
+title either is precisely XYZ or contains XYZ in parentheses following
+text that translates XYZ in another language. (Here XYZ stands for a
+specific section name mentioned below, such as ``Acknowledgements'',
+``Dedications'', ``Endorsements'', or ``History''.) To ``Preserve the Title''
+of such a section when you modify the Document means that it remains a
+section ``Entitled XYZ'' according to this definition.
+
+The Document may include Warranty Disclaimers next to the notice which
+states that this License applies to the Document. These Warranty
+Disclaimers are considered to be included by reference in this
+License, but only as regards disclaiming warranties: any other
+implication that these Warranty Disclaimers may have is void and has
+no effect on the meaning of this License.
+
+@item
+VERBATIM COPYING
+
+You may copy and distribute the Document in any medium, either
+commercially or noncommercially, provided that this License, the
+copyright notices, and the license notice saying this License applies
+to the Document are reproduced in all copies, and that you add no other
+conditions whatsoever to those of this License. You may not use
+technical measures to obstruct or control the reading or further
+copying of the copies you make or distribute. However, you may accept
+compensation in exchange for copies. If you distribute a large enough
+number of copies you must also follow the conditions in section 3.
+
+You may also lend copies, under the same conditions stated above, and
+you may publicly display copies.
+
+@item
+COPYING IN QUANTITY
+
+If you publish printed copies (or copies in media that commonly have
+printed covers) of the Document, numbering more than 100, and the
+Document's license notice requires Cover Texts, you must enclose the
+copies in covers that carry, clearly and legibly, all these Cover
+Texts: Front-Cover Texts on the front cover, and Back-Cover Texts on
+the back cover. Both covers must also clearly and legibly identify
+you as the publisher of these copies. The front cover must present
+the full title with all words of the title equally prominent and
+visible. You may add other material on the covers in addition.
+Copying with changes limited to the covers, as long as they preserve
+the title of the Document and satisfy these conditions, can be treated
+as verbatim copying in other respects.
+
+If the required texts for either cover are too voluminous to fit
+legibly, you should put the first ones listed (as many as fit
+reasonably) on the actual cover, and continue the rest onto adjacent
+pages.
+
+If you publish or distribute Opaque copies of the Document numbering
+more than 100, you must either include a machine-readable Transparent
+copy along with each Opaque copy, or state in or with each Opaque copy
+a computer-network location from which the general network-using
+public has access to download using public-standard network protocols
+a complete Transparent copy of the Document, free of added material.
+If you use the latter option, you must take reasonably prudent steps,
+when you begin distribution of Opaque copies in quantity, to ensure
+that this Transparent copy will remain thus accessible at the stated
+location until at least one year after the last time you distribute an
+Opaque copy (directly or through your agents or retailers) of that
+edition to the public.
+
+It is requested, but not required, that you contact the authors of the
+Document well before redistributing any large number of copies, to give
+them a chance to provide you with an updated version of the Document.
+
+@item
+MODIFICATIONS
+
+You may copy and distribute a Modified Version of the Document under
+the conditions of sections 2 and 3 above, provided that you release
+the Modified Version under precisely this License, with the Modified
+Version filling the role of the Document, thus licensing distribution
+and modification of the Modified Version to whoever possesses a copy
+of it. In addition, you must do these things in the Modified Version:
+
+@enumerate A
+@item
+Use in the Title Page (and on the covers, if any) a title distinct
+from that of the Document, and from those of previous versions
+(which should, if there were any, be listed in the History section
+of the Document). You may use the same title as a previous version
+if the original publisher of that version gives permission.
+
+@item
+List on the Title Page, as authors, one or more persons or entities
+responsible for authorship of the modifications in the Modified
+Version, together with at least five of the principal authors of the
+Document (all of its principal authors, if it has fewer than five),
+unless they release you from this requirement.
+
+@item
+State on the Title page the name of the publisher of the
+Modified Version, as the publisher.
+
+@item
+Preserve all the copyright notices of the Document.
+
+@item
+Add an appropriate copyright notice for your modifications
+adjacent to the other copyright notices.
+
+@item
+Include, immediately after the copyright notices, a license notice
+giving the public permission to use the Modified Version under the
+terms of this License, in the form shown in the Addendum below.
+
+@item
+Preserve in that license notice the full lists of Invariant Sections
+and required Cover Texts given in the Document's license notice.
+
+@item
+Include an unaltered copy of this License.
+
+@item
+Preserve the section Entitled ``History'', Preserve its Title, and add
+to it an item stating at least the title, year, new authors, and
+publisher of the Modified Version as given on the Title Page. If
+there is no section Entitled ``History'' in the Document, create one
+stating the title, year, authors, and publisher of the Document as
+given on its Title Page, then add an item describing the Modified
+Version as stated in the previous sentence.
+
+@item
+Preserve the network location, if any, given in the Document for
+public access to a Transparent copy of the Document, and likewise
+the network locations given in the Document for previous versions
+it was based on. These may be placed in the ``History'' section.
+You may omit a network location for a work that was published at
+least four years before the Document itself, or if the original
+publisher of the version it refers to gives permission.
+
+@item
+For any section Entitled ``Acknowledgements'' or ``Dedications'', Preserve
+the Title of the section, and preserve in the section all the
+substance and tone of each of the contributor acknowledgements and/or
+dedications given therein.
+
+@item
+Preserve all the Invariant Sections of the Document,
+unaltered in their text and in their titles. Section numbers
+or the equivalent are not considered part of the section titles.
+
+@item
+Delete any section Entitled ``Endorsements''. Such a section
+may not be included in the Modified Version.
+
+@item
+Do not retitle any existing section to be Entitled ``Endorsements'' or
+to conflict in title with any Invariant Section.
+
+@item
+Preserve any Warranty Disclaimers.
+@end enumerate
+
+If the Modified Version includes new front-matter sections or
+appendices that qualify as Secondary Sections and contain no material
+copied from the Document, you may at your option designate some or all
+of these sections as invariant. To do this, add their titles to the
+list of Invariant Sections in the Modified Version's license notice.
+These titles must be distinct from any other section titles.
+
+You may add a section Entitled ``Endorsements'', provided it contains
+nothing but endorsements of your Modified Version by various
+parties---for example, statements of peer review or that the text has
+been approved by an organization as the authoritative definition of a
+standard.
+
+You may add a passage of up to five words as a Front-Cover Text, and a
+passage of up to 25 words as a Back-Cover Text, to the end of the list
+of Cover Texts in the Modified Version. Only one passage of
+Front-Cover Text and one of Back-Cover Text may be added by (or
+through arrangements made by) any one entity. If the Document already
+includes a cover text for the same cover, previously added by you or
+by arrangement made by the same entity you are acting on behalf of,
+you may not add another; but you may replace the old one, on explicit
+permission from the previous publisher that added the old one.
+
+The author(s) and publisher(s) of the Document do not by this License
+give permission to use their names for publicity for or to assert or
+imply endorsement of any Modified Version.
+
+@item
+COMBINING DOCUMENTS
+
+You may combine the Document with other documents released under this
+License, under the terms defined in section 4 above for modified
+versions, provided that you include in the combination all of the
+Invariant Sections of all of the original documents, unmodified, and
+list them all as Invariant Sections of your combined work in its
+license notice, and that you preserve all their Warranty Disclaimers.
+
+The combined work need only contain one copy of this License, and
+multiple identical Invariant Sections may be replaced with a single
+copy. If there are multiple Invariant Sections with the same name but
+different contents, make the title of each such section unique by
+adding at the end of it, in parentheses, the name of the original
+author or publisher of that section if known, or else a unique number.
+Make the same adjustment to the section titles in the list of
+Invariant Sections in the license notice of the combined work.
+
+In the combination, you must combine any sections Entitled ``History''
+in the various original documents, forming one section Entitled
+``History''; likewise combine any sections Entitled ``Acknowledgements'',
+and any sections Entitled ``Dedications''. You must delete all
+sections Entitled ``Endorsements.''
+
+@item
+COLLECTIONS OF DOCUMENTS
+
+You may make a collection consisting of the Document and other documents
+released under this License, and replace the individual copies of this
+License in the various documents with a single copy that is included in
+the collection, provided that you follow the rules of this License for
+verbatim copying of each of the documents in all other respects.
+
+You may extract a single document from such a collection, and distribute
+it individually under this License, provided you insert a copy of this
+License into the extracted document, and follow this License in all
+other respects regarding verbatim copying of that document.
+
+@item
+AGGREGATION WITH INDEPENDENT WORKS
+
+A compilation of the Document or its derivatives with other separate
+and independent documents or works, in or on a volume of a storage or
+distribution medium, is called an ``aggregate'' if the copyright
+resulting from the compilation is not used to limit the legal rights
+of the compilation's users beyond what the individual works permit.
+When the Document is included in an aggregate, this License does not
+apply to the other works in the aggregate which are not themselves
+derivative works of the Document.
+
+If the Cover Text requirement of section 3 is applicable to these
+copies of the Document, then if the Document is less than one half of
+the entire aggregate, the Document's Cover Texts may be placed on
+covers that bracket the Document within the aggregate, or the
+electronic equivalent of covers if the Document is in electronic form.
+Otherwise they must appear on printed covers that bracket the whole
+aggregate.
+
+@item
+TRANSLATION
+
+Translation is considered a kind of modification, so you may
+distribute translations of the Document under the terms of section 4.
+Replacing Invariant Sections with translations requires special
+permission from their copyright holders, but you may include
+translations of some or all Invariant Sections in addition to the
+original versions of these Invariant Sections. You may include a
+translation of this License, and all the license notices in the
+Document, and any Warranty Disclaimers, provided that you also include
+the original English version of this License and the original versions
+of those notices and disclaimers. In case of a disagreement between
+the translation and the original version of this License or a notice
+or disclaimer, the original version will prevail.
+
+If a section in the Document is Entitled ``Acknowledgements'',
+``Dedications'', or ``History'', the requirement (section 4) to Preserve
+its Title (section 1) will typically require changing the actual
+title.
+
+@item
+TERMINATION
+
+You may not copy, modify, sublicense, or distribute the Document
+except as expressly provided under this License. Any attempt
+otherwise to copy, modify, sublicense, or distribute it is void, and
+will automatically terminate your rights under this License.
+
+However, if you cease all violation of this License, then your license
+from a particular copyright holder is reinstated (a) provisionally,
+unless and until the copyright holder explicitly and finally
+terminates your license, and (b) permanently, if the copyright holder
+fails to notify you of the violation by some reasonable means prior to
+60 days after the cessation.
+
+Moreover, your license from a particular copyright holder is
+reinstated permanently if the copyright holder notifies you of the
+violation by some reasonable means, this is the first time you have
+received notice of violation of this License (for any work) from that
+copyright holder, and you cure the violation prior to 30 days after
+your receipt of the notice.
+
+Termination of your rights under this section does not terminate the
+licenses of parties who have received copies or rights from you under
+this License. If your rights have been terminated and not permanently
+reinstated, receipt of a copy of some or all of the same material does
+not give you any rights to use it.
+
+@item
+FUTURE REVISIONS OF THIS LICENSE
+
+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/}.
+
+Each version of the License is given a distinguishing version number.
+If the Document specifies that a particular numbered version of this
+License ``or any later version'' applies to it, you have the option of
+following the terms and conditions either of that specified version or
+of any later version that has been published (not as a draft) by the
+Free Software Foundation. If the Document does not specify a version
+number of this License, you may choose any version ever published (not
+as a draft) by the Free Software Foundation. If the Document
+specifies that a proxy can decide which future versions of this
+License can be used, that proxy's public statement of acceptance of a
+version permanently authorizes you to choose that version for the
+Document.
+
+@item
+RELICENSING
+
+``Massive Multiauthor Collaboration Site'' (or ``MMC Site'') means any
+World Wide Web server that publishes copyrightable works and also
+provides prominent facilities for anybody to edit those works. A
+public wiki that anybody can edit is an example of such a server. A
+``Massive Multiauthor Collaboration'' (or ``MMC'') contained in the
+site means any set of copyrightable works thus published on the MMC
+site.
+
+``CC-BY-SA'' means the Creative Commons Attribution-Share Alike 3.0
+license published by Creative Commons Corporation, a not-for-profit
+corporation with a principal place of business in San Francisco,
+California, as well as future copyleft versions of that license
+published by that same organization.
+
+``Incorporate'' means to publish or republish a Document, in whole or
+in part, as part of another Document.
+
+An MMC is ``eligible for relicensing'' if it is licensed under this
+License, and if all works that were first published under this License
+somewhere other than this MMC, and subsequently incorporated in whole
+or in part into the MMC, (1) had no cover texts or invariant sections,
+and (2) were thus incorporated prior to November 1, 2008.
+
+The operator of an MMC Site may republish an MMC contained in the site
+under CC-BY-SA on the same site at any time before August 1, 2009,
+provided the MMC is eligible for relicensing.
+
+@end enumerate
+
+@page
+@heading ADDENDUM: How to use this License for your documents
+
+To use this License in a document you have written, include a copy of
+the License in the document and put the following copyright and
+license notices just after the title page:
+
+@smallexample
+@group
+ Copyright (C) @var{year} @var{your name}.
+ Permission is granted to copy, distribute and/or modify this document
+ under the terms of the GNU Free Documentation License, Version 1.3
+ or any later version published by the Free Software Foundation;
+ with no Invariant Sections, no Front-Cover Texts, and no Back-Cover
+ Texts. A copy of the license is included in the section entitled ``GNU
+ Free Documentation License''.
+@end group
+@end smallexample
+
+If you have Invariant Sections, Front-Cover Texts and Back-Cover Texts,
+replace the ``with@dots{}Texts.''@: line with this:
+
+@smallexample
+@group
+ with the Invariant Sections being @var{list their titles}, with
+ the Front-Cover Texts being @var{list}, and with the Back-Cover Texts
+ being @var{list}.
+@end group
+@end smallexample
+
+If you have Invariant Sections without Cover Texts, or some other
+combination of the three, merge those two alternatives to suit the
+situation.
+
+If your document contains nontrivial examples of program code, we
+recommend releasing these examples in parallel under your choice of
+free software license, such as the GNU General Public License,
+to permit their use in free software.
+
+@c Local Variables:
+@c ispell-local-pdict: "ispell-dict"
+@c End:
diff --git a/doc/groupify.sed b/doc/groupify.sed
deleted file mode 100755
index 2430710..0000000
--- a/doc/groupify.sed
+++ /dev/null
@@ -1,59 +0,0 @@
-#! /bin/sed -nf
-# Script to add @group...@end group tags to sed.texi.in
-# so that comments are not separated from the instructions
-# that they refer to.
-
-# Step 1: search for the conventional "@c start----" comment
-1a\
-@c Do not edit this file!! It is automatically generated from sed-in.texi.
-p
-/^@c start-*$/! b
-
-# Step 2: loop until we find a @ command
-:a
-n
-p
-/^@/! ba
-
-# Step 3: process everything until a "@end" command
-
-# Step 3.1: Print the blank lines before the group. If we reach the "@end",
-# we go back to step 1.
-:b
-n
-/^@end/ {
- p
- b
-}
-/^[ ]*$/ {
- p
- bb
-}
-
-# Step 3.2: Add to hold space every line until an empty one or "@end"
-h
-:c
-n
-/^@end example/! {
- /^[ ]*$/! {
- H
- bc
- }
-}
-
-# Step 3.3: Working in hold space, add @group...@end group if there are
-# at least two lines. Then print the lines we processed and
-# switch back to pattern space.
-x
-/\n/ {
- s/.*/@group\
-&\
-@end group/
-}
-p
-
-# Step 3.4: Switch back to pattern space, print the first blank line
-# and possibly go back to step 3.1
-x
-p
-/^@end/ !bb
diff --git a/doc/local.mk b/doc/local.mk
new file mode 100644
index 0000000..21d9344
--- /dev/null
+++ b/doc/local.mk
@@ -0,0 +1,33 @@
+# Copyright (C) 2016 Free Software Foundation, Inc.
+
+# This 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/>.
+
+info_TEXINFOS = doc/sed.texi
+doc_sed_TEXINFOS = doc/config.texi doc/version.texi doc/fdl.texi
+dist_man_MANS = doc/sed.1
+dist_noinst_DATA = doc/sed.x
+HELP2MAN = $(top_srcdir)/build-aux/help2man
+SEDBIN = sed/sed
+
+AM_MAKEINFOHTMLFLAGS = --no-split
+
+doc/sed.1: sed/sed$(EXEEXT) .version $(srcdir)/doc/sed.x
+ $(AM_V_GEN)$(MKDIR_P) doc
+ $(AM_V_at)rm -rf $@ $@-t
+ $(AM_V_at)$(HELP2MAN) \
+ --name 'stream editor for filtering and transforming text' \
+ -p sed --include $(srcdir)/doc/sed.x \
+ -o $@-t $(SEDBIN) \
+ && chmod a-w $@-t \
+ && mv $@-t $@
diff --git a/doc/s-texi b/doc/s-texi
deleted file mode 100644
index 859afb1..0000000
--- a/doc/s-texi
+++ /dev/null
@@ -1 +0,0 @@
-stamp
diff --git a/doc/sed-in.texi b/doc/sed-in.texi
deleted file mode 100644
index bf5158c..0000000
--- a/doc/sed-in.texi
+++ /dev/null
@@ -1,4187 +0,0 @@
-\input texinfo @c -*-texinfo-*-
-@c
-@c -- Stuff that needs adding: ----------------------------------------------
-@c (nothing!)
-@c --------------------------------------------------------------------------
-@c Check for consistency: regexps in @code, text that they match in @samp.
-@c
-@c Tips:
-@c @command for command
-@c @samp for command fragments: @samp{cat -s}
-@c @code for sed commands and flags
-@c Use ``quote'' not `quote' or "quote".
-@c
-@c %**start of header
-@setfilename sed.info
-@settitle sed, a stream editor
-@c %**end of header
-
-@c @smallbook
-
-@include version.texi
-
-@c Combine indices.
-@syncodeindex ky cp
-@syncodeindex pg cp
-@syncodeindex tp cp
-
-@defcodeindex op
-@syncodeindex op fn
-
-@include config.texi
-
-@copying
-This file documents version @value{VERSION} of
-@value{SSED}, a stream editor.
-
-Copyright @copyright{} 1998, 1999, 2001, 2002, 2003, 2004 Free
-Software Foundation, Inc.
-
-This document is released under the terms of the @acronym{GNU} Free
-Documentation License as published by the Free Software Foundation;
-either version 1.1, or (at your option) any later version.
-
-You should have received a copy of the @acronym{GNU} Free Documentation
-License along with @value{SSED}; see the file @file{COPYING.DOC}.
-If not, write to the Free Software Foundation, 59 Temple Place - Suite
-330, Boston, MA 02110-1301, USA.
-
-There are no Cover Texts and no Invariant Sections; this text, along
-with its equivalent in the printed manual, constitutes the Title Page.
-@end copying
-
-@setchapternewpage off
-
-@titlepage
-@title @command{sed}, a stream editor
-@subtitle version @value{VERSION}, @value{UPDATED}
-@author by Ken Pizzini, Paolo Bonzini
-
-@page
-@vskip 0pt plus 1filll
-Copyright @copyright{} 1998, 1999 Free Software Foundation, Inc.
-
-@insertcopying
-
-Published by the Free Software Foundation, @*
-51 Franklin Street, Fifth Floor @*
-Boston, MA 02110-1301, USA
-@end titlepage
-
-
-@node Top
-@top
-
-@ifnottex
-@insertcopying
-@end ifnottex
-
-@menu
-* Introduction:: Introduction
-* Invoking sed:: Invocation
-* sed Programs:: @command{sed} programs
-* Examples:: Some sample scripts
-* Limitations:: Limitations and (non-)limitations of @value{SSED}
-* Other Resources:: Other resources for learning about @command{sed}
-* Reporting Bugs:: Reporting bugs
-
-* Extended regexps:: @command{egrep}-style regular expressions
-@ifset PERL
-* Perl regexps:: Perl-style regular expressions
-@end ifset
-
-* Concept Index:: A menu with all the topics in this manual.
-* Command and Option Index:: A menu with all @command{sed} commands and
- command-line options.
-
-@detailmenu
---- The detailed node listing ---
-
-sed Programs:
-* Execution Cycle:: How @command{sed} works
-* Addresses:: Selecting lines with @command{sed}
-* Regular Expressions:: Overview of regular expression syntax
-* Common Commands:: Often used commands
-* The "s" Command:: @command{sed}'s Swiss Army Knife
-* Other Commands:: Less frequently used commands
-* Programming Commands:: Commands for @command{sed} gurus
-* Extended Commands:: Commands specific of @value{SSED}
-* Escapes:: Specifying special characters
-
-Examples:
-* Centering lines::
-* Increment a number::
-* Rename files to lower case::
-* Print bash environment::
-* Reverse chars of lines::
-* tac:: Reverse lines of files
-* cat -n:: Numbering lines
-* cat -b:: Numbering non-blank lines
-* wc -c:: Counting chars
-* wc -w:: Counting words
-* wc -l:: Counting lines
-* head:: Printing the first lines
-* tail:: Printing the last lines
-* uniq:: Make duplicate lines unique
-* uniq -d:: Print duplicated lines of input
-* uniq -u:: Remove all duplicated lines
-* cat -s:: Squeezing blank lines
-
-@ifset PERL
-Perl regexps:: Perl-style regular expressions
-* Backslash:: Introduces special sequences
-* Circumflex/dollar sign/period:: Behave specially with regard to new lines
-* Square brackets:: Are a bit different in strange cases
-* Options setting:: Toggle modifiers in the middle of a regexp
-* Non-capturing subpatterns:: Are not counted when backreferencing
-* Repetition:: Allows for non-greedy matching
-* Backreferences:: Allows for more than 10 back references
-* Assertions:: Allows for complex look ahead matches
-* Non-backtracking subpatterns:: Often gives more performance
-* Conditional subpatterns:: Allows if/then/else branches
-* Recursive patterns:: For example to match parentheses
-* Comments:: Because things can get complex...
-@end ifset
-
-@end detailmenu
-@end menu
-
-
-@node Introduction
-@chapter Introduction
-
-@cindex Stream editor
-@command{sed} is a stream editor.
-A stream editor is used to perform basic text
-transformations on an input stream
-(a file or input from a pipeline).
-While in some ways similar to an editor which
-permits scripted edits (such as @command{ed}),
-@command{sed} works by making only one pass over the
-input(s), and is consequently more efficient.
-But it is @command{sed}'s ability to filter text in a pipeline
-which particularly distinguishes it from other types of
-editors.
-
-
-@node Invoking sed
-@chapter Invocation
-
-Normally @command{sed} is invoked like this:
-
-@example
-sed SCRIPT INPUTFILE...
-@end example
-
-The full format for invoking @command{sed} is:
-
-@example
-sed OPTIONS... [SCRIPT] [INPUTFILE...]
-@end example
-
-If you do not specify @var{INPUTFILE}, or if @var{INPUTFILE} is @file{-},
-@command{sed} filters the contents of the standard input. The @var{script}
-is actually the first non-option parameter, which @command{sed} specially
-considers a script and not an input file if (and only if) none of the
-other @var{options} specifies a script to be executed, that is if neither
-of the @option{-e} and @option{-f} options is specified.
-
-@command{sed} may be invoked with the following command-line options:
-
-@table @code
-@item --version
-@opindex --version
-@cindex Version, printing
-Print out the version of @command{sed} that is being run and a copyright notice,
-then exit.
-
-@item --help
-@opindex --help
-@cindex Usage summary, printing
-Print a usage message briefly summarizing these command-line options
-and the bug-reporting address,
-then exit.
-
-@item -n
-@itemx --quiet
-@itemx --silent
-@opindex -n
-@opindex --quiet
-@opindex --silent
-@cindex Disabling autoprint, from command line
-By default, @command{sed} prints out the pattern space
-at the end of each cycle through the script (@pxref{Execution Cycle, ,
-How @code{sed} works}).
-These options disable this automatic printing,
-and @command{sed} only produces output when explicitly told to
-via the @code{p} command.
-
-@item -e @var{script}
-@itemx --expression=@var{script}
-@opindex -e
-@opindex --expression
-@cindex Script, from command line
-Add the commands in @var{script} to the set of commands to be
-run while processing the input.
-
-@item -f @var{script-file}
-@itemx --file=@var{script-file}
-@opindex -f
-@opindex --file
-@cindex Script, from a file
-Add the commands contained in the file @var{script-file}
-to the set of commands to be run while processing the input.
-
-@item -i[@var{SUFFIX}]
-@itemx --in-place[=@var{SUFFIX}]
-@opindex -i
-@opindex --in-place
-@cindex In-place editing, activating
-@cindex @value{SSEDEXT}, in-place editing
-This option specifies that files are to be edited in-place.
-@value{SSED} does this by creating a temporary file and
-sending output to this file rather than to the standard
-output.@footnote{This applies to commands such as @code{=},
-@code{a}, @code{c}, @code{i}, @code{l}, @code{p}. You can
-still write to the standard output by using the @code{w}
-@cindex @value{SSEDEXT}, @file{/dev/stdout} file
-or @code{W} commands together with the @file{/dev/stdout}
-special file}.
-
-This option implies @option{-s}.
-
-When the end of the file is reached, the temporary file is
-renamed to the output file's original name. The extension,
-if supplied, is used to modify the name of the old file
-before renaming the temporary file, thereby making a backup
-copy@footnote{Note that @value{SSED} creates the backup
-file whether or not any output is actually changed.}).
-
-@cindex In-place editing, Perl-style backup file names
-This rule is followed: if the extension doesn't contain a @code{*},
-then it is appended to the end of the current filename as a
-suffix; if the extension does contain one or more @code{*}
-characters, then @emph{each} asterisk is replaced with the
-current filename. This allows you to add a prefix to the
-backup file, instead of (or in addition to) a suffix, or
-even to place backup copies of the original files into another
-directory (provided the directory already exists).
-
-If no extension is supplied, the original file is
-overwritten without making a backup.
-
-@item -l @var{N}
-@itemx --line-length=@var{N}
-@opindex -l
-@opindex --line-length
-@cindex Line length, setting
-Specify the default line-wrap length for the @code{l} command.
-A length of 0 (zero) means to never wrap long lines. If
-not specified, it is taken to be 70.
-
-@item --posix
-@opindex --posix
-@cindex @value{SSEDEXT}, disabling
-@value{SSED} includes several extensions to @acronym{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
-of them (such as the behavior of the @command{N} command
-described in @pxref{Reporting Bugs}) actually violate the
-standard. If you want to disable only the latter kind of
-extension, you can set the @code{POSIXLY_CORRECT} variable
-to a non-empty value.
-
-@item -b
-@itemx --binary
-@opindex -b
-@opindex --binary
-This option is available on every platform, but is only effective where the
-operating system makes a distinction between text files and binary files.
-When such a distinction is made---as is the case for MS-DOS, Windows,
-Cygwin---text files are composed of lines separated by a carriage return
-@emph{and} a line feed character, and @command{sed} does not see the
-ending CR. When this option is specified, @command{sed} will open
-input files in binary mode, thus not requesting this special processing
-and considering lines to end at a line feed.
-
-@item --follow-symlinks
-@opindex --follow-symlinks
-This option is available only on platforms that support
-symbolic links and has an effect only if option @option{-i}
-is specified. In this case, if the file that is specified
-on the command line is a symbolic link, @command{sed} will
-follow the link and edit the ultimate destination of the
-link. The default behavior is to break the symbolic link,
-so that the link destination will not be modified.
-
-@item -r
-@itemx --regexp-extended
-@opindex -r
-@opindex --regexp-extended
-@cindex Extended regular expressions, choosing
-@cindex @acronym{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 less backslashes, but are a @acronym{GNU} extension
-and hence scripts that use them are not portable.
-@xref{Extended regexps, , Extended regular expressions}.
-
-@ifset PERL
-@item -R
-@itemx --regexp-perl
-@opindex -R
-@opindex --regexp-perl
-@cindex Perl-style regular expressions, choosing
-@cindex @value{SSEDEXT}, Perl-style regular expressions
-Use Perl-style regular expressions rather than basic
-regular expressions. Perl-style regexps are extremely
-powerful but are a @value{SSED} extension and hence scripts that
-use it are not portable. @xref{Perl regexps, ,
-Perl-style regular expressions}.
-@end ifset
-
-@item -s
-@itemx --separate
-@opindex -s
-@opindex --separate
-@cindex Working on separate files
-By default, @command{sed} will consider the files specified on the
-command line as a single continuous long stream. This @value{SSED}
-extension allows the user to consider them as separate files:
-range addresses (such as @samp{/abc/,/def/}) are not allowed
-to span several files, line numbers are relative to the start
-of each file, @code{$} refers to the last line of each file,
-and files invoked from the @code{R} commands are rewound at the
-start of each file.
-
-@item -u
-@itemx --unbuffered
-@opindex -u
-@opindex --unbuffered
-@cindex Unbuffered I/O, choosing
-Buffer both input and output as minimally as practical.
-(This is particularly useful if the input is coming from
-the likes of @samp{tail -f}, and you wish to see the transformed
-output as soon as possible.)
-
-@item -z
-@itemx --null-data
-@itemx --zero-terminated
-@opindex -z
-@opindex --null-data
-@opindex --zero-terminated
-Treat the input as a set of lines, each terminated by a zero byte
-(the ASCII @samp{NUL} character) instead of a newline. This option can
-be used with commands like @samp{sort -z} and @samp{find -print0}
-to process arbitrary file names.
-@end table
-
-If no @option{-e}, @option{-f}, @option{--expression}, or @option{--file}
-options are given on the command-line,
-then the first non-option argument on the command line is
-taken to be the @var{script} to be executed.
-
-@cindex Files to be processed as input
-If any command-line parameters remain after processing the above,
-these parameters are interpreted as the names of input files to
-be processed.
-@cindex Standard input, processing as input
-A file name of @samp{-} refers to the standard input stream.
-The standard input will be processed if no file names are specified.
-
-
-@node sed Programs
-@chapter @command{sed} Programs
-
-@cindex @command{sed} program structure
-@cindex Script structure
-A @command{sed} program consists of one or more @command{sed} commands,
-passed in by one or more of the
-@option{-e}, @option{-f}, @option{--expression}, and @option{--file}
-options, or the first non-option argument if zero of these
-options are used.
-This document will refer to ``the'' @command{sed} script;
-this is understood to mean the in-order catenation
-of all of the @var{script}s and @var{script-file}s passed in.
-
-Commands within a @var{script} or @var{script-file} can be
-separated by semicolons (@code{;}) or newlines (ASCII 10).
-Some commands, due to their syntax, cannot be followed by semicolons
-working as command separators and thus should be terminated
-with newlines or be placed at the end of a @var{script} or @var{script-file}.
-Commands can also be preceded with optional non-significant
-whitespace characters.
-
-Each @code{sed} command consists of an optional address or
-address range, followed by a one-character command name
-and any additional command-specific code.
-
-@menu
-* Execution Cycle:: How @command{sed} works
-* Addresses:: Selecting lines with @command{sed}
-* Regular Expressions:: Overview of regular expression syntax
-* Common Commands:: Often used commands
-* The "s" Command:: @command{sed}'s Swiss Army Knife
-* Other Commands:: Less frequently used commands
-* Programming Commands:: Commands for @command{sed} gurus
-* Extended Commands:: Commands specific of @value{SSED}
-* Escapes:: Specifying special characters
-@end menu
-
-
-@node Execution Cycle
-@section How @command{sed} Works
-
-@cindex Buffer spaces, pattern and hold
-@cindex Spaces, pattern and hold
-@cindex Pattern space, definition
-@cindex Hold space, definition
-@command{sed} maintains two data buffers: the active @emph{pattern} space,
-and the auxiliary @emph{hold} space. Both are initially empty.
-
-@command{sed} operates by performing the following cycle on each
-line of input: first, @command{sed} reads one line from the input
-stream, removes any trailing newline, and places it in the pattern space.
-Then commands are executed; each command can have an address associated
-to it: addresses are a kind of condition code, and a command is only
-executed if the condition is verified before the command is to be
-executed.
-
-When the end of the script is reached, unless the @option{-n} option
-is in use, the contents of pattern space are printed out to the output
-stream, adding back the trailing newline if it was removed.@footnote{Actually,
-if @command{sed} prints a line without the terminating newline, it will
-nevertheless print the missing newline as soon as more text is sent to
-the same output stream, which gives the ``least expected surprise''
-even though it does not make commands like @samp{sed -n p} exactly
-identical to @command{cat}.} Then the next cycle starts for the next
-input line.
-
-Unless special commands (like @samp{D}) are used, the pattern space is
-deleted between two cycles. The hold space, on the other hand, keeps
-its data between cycles (see commands @samp{h}, @samp{H}, @samp{x},
-@samp{g}, @samp{G} to move data between both buffers).
-
-
-@node Addresses
-@section Selecting lines with @command{sed}
-@cindex Addresses, in @command{sed} scripts
-@cindex Line selection
-@cindex Selecting lines to process
-
-Addresses in a @command{sed} script can be in any of the following forms:
-@table @code
-@item @var{number}
-@cindex Address, numeric
-@cindex Line, selecting by number
-Specifying a line number will match only that line in the input.
-(Note that @command{sed} counts lines continuously across all input files
-unless @option{-i} or @option{-s} options 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
-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
-@var{first} + (@var{n} * @var{step}).
-Thus, to select the odd-numbered lines,
-one would use @code{1~2};
-to pick every third line starting with the second, @samp{2~3} would be used;
-to pick every fifth line starting with the tenth, use @samp{10~5};
-and @samp{50~0} is just an obscure way of saying @code{50}.
-
-@item $
-@cindex Address, last line
-@cindex Last line, selecting
-@cindex Line, selecting last
-This address matches the last line of the last file of input, or
-the last line of each file when the @option{-i} or @option{-s} options
-are specified.
-
-@item /@var{regexp}/
-@cindex Address, as a regular expression
-@cindex Line, selecting by regular expression match
-This will select any line which matches the regular expression @var{regexp}.
-If @var{regexp} itself includes any @code{/} characters,
-each must be escaped by a backslash (@code{\}).
-
-@cindex empty regular expression
-@cindex @value{SSEDEXT}, modifiers and the empty regular expression
-The empty regular expression @samp{//} repeats the last regular
-expression match (the same holds if the empty regular expression is
-passed to the @code{s} command). Note that modifiers to regular expressions
-are evaluated when the regular expression is compiled, thus it is invalid to
-specify them together with the empty regular expression.
-
-@item \%@var{regexp}%
-(The @code{%} may be replaced by any other single character.)
-
-@cindex Slash character, in regular expressions
-This also matches the regular expression @var{regexp},
-but allows one to use a different delimiter than @code{/}.
-This is particularly useful if the @var{regexp} itself contains
-a lot of slashes, since it avoids the tedious escaping of every @code{/}.
-If @var{regexp} itself includes any delimiter characters,
-each must be escaped by a backslash (@code{\}).
-
-@item /@var{regexp}/I
-@itemx \%@var{regexp}%I
-@cindex @acronym{GNU} extensions, @code{I} modifier
-@ifset PERL
-@cindex Perl-style regular expressions, case-insensitive
-@end ifset
-The @code{I} modifier to regular-expression matching is a @acronym{GNU}
-extension which causes the @var{regexp} to be matched in
-a case-insensitive manner.
-
-@item /@var{regexp}/M
-@itemx \%@var{regexp}%M
-@cindex @value{SSEDEXT}, @code{M} modifier
-@ifset PERL
-@cindex Perl-style regular expressions, multiline
-@end ifset
-The @code{M} modifier to regular-expression matching is a @value{SSED}
-extension which directs @value{SSED} to match the regular expression
-in @cite{multi-line} mode. The modifier causes @code{^} and @code{$} to
-match respectively (in addition to the normal behavior) the empty string
-after a newline, and the empty string before a newline. There are
-special character sequences
-@ifset PERL
-(@code{\A} and @code{\Z} in Perl mode, @code{\`} and @code{\'}
-in basic or extended regular expression modes)
-@end ifset
-@ifclear PERL
-(@code{\`} and @code{\'})
-@end ifclear
-which always match the beginning or the end of the buffer.
-In addition,
-@ifset PERL
-just like in Perl mode without the @code{S} modifier,
-@end ifset
-the period character does not match a new-line character in
-multi-line mode.
-
-@ifset PERL
-@item /@var{regexp}/S
-@itemx \%@var{regexp}%S
-@cindex @value{SSEDEXT}, @code{S} modifier
-@cindex Perl-style regular expressions, single line
-The @code{S} modifier to regular-expression matching is only valid
-in Perl mode and specifies that the dot character (@code{.}) will
-match the newline character too. @code{S} stands for @cite{single-line}.
-@end ifset
-
-@ifset PERL
-@item /@var{regexp}/X
-@itemx \%@var{regexp}%X
-@cindex @value{SSEDEXT}, @code{X} modifier
-@cindex Perl-style regular expressions, extended
-The @code{X} modifier to regular-expression matching is also
-valid in Perl mode only. If it is used, whitespace in the
-pattern (other than in a character class) and
-characters between a @kbd{#} outside a character class and the
-next newline character are ignored. An escaping backslash
-can be used to include a whitespace or @kbd{#} character as part
-of the pattern.
-@end ifset
-@end table
-
-If no addresses are given, then all lines are matched;
-if one address is given, then only lines matching that
-address are matched.
-
-@cindex Range of lines
-@cindex Several lines, selecting
-An address range can be specified by specifying two addresses
-separated by a comma (@code{,}). An address range matches lines
-starting from where the first address matches, and continues
-until the second address matches (inclusively).
-
-If the second address is a @var{regexp}, then checking for the
-ending match will start with the line @emph{following} the
-line which matched the first address: a range will always
-span at least two lines (except of course if the input stream
-ends).
-
-If the second address is a @var{number} less than (or equal to)
-the line matching the first address, then only the one line is
-matched.
-
-@cindex Special addressing forms
-@cindex Range with start address of zero
-@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
-@value{SSED} also supports some special two-address forms; all these
-are @acronym{GNU} extensions:
-@table @code
-@item 0,/@var{regexp}/
-A line number of @code{0} can be used in an address specification like
-@code{0,/@var{regexp}/} so that @command{sed} will try to match
-@var{regexp} in the first input line too. In other words,
-@code{0,/@var{regexp}/} is similar to @code{1,/@var{regexp}/},
-except that if @var{addr2} matches the very first line of input the
-@code{0,/@var{regexp}/} form will consider it to end the range, whereas
-the @code{1,/@var{regexp}/} form will match the beginning of its range and
-hence make the range span up to the @emph{second} occurrence of the
-regular expression.
-
-Note that this is the only place where the @code{0} address makes
-sense; there is no 0-th line and commands which are given the @code{0}
-address in any other way will give an error.
-
-@item @var{addr1},+@var{N}
-Matches @var{addr1} and the @var{N} lines following @var{addr1}.
-
-@item @var{addr1},~@var{N}
-Matches @var{addr1} and the lines following @var{addr1}
-until the next line whose input line number is a multiple of @var{N}.
-@end table
-
-@cindex Excluding lines
-@cindex Selecting non-matching lines
-Appending the @code{!} character to the end of an address
-specification negates the sense of the match.
-That is, if the @code{!} character follows an address range,
-then only lines which do @emph{not} match the address range
-will be selected.
-This also works for singleton addresses,
-and, perhaps perversely, for the null address.
-
-
-@node Regular Expressions
-@section Overview of Regular Expression Syntax
-
-To know how to use @command{sed}, people should understand regular
-expressions (@dfn{regexp} for short). A regular expression
-is a pattern that is matched against a
-subject string from left to right. Most characters are
-@dfn{ordinary}: they stand for
-themselves in a pattern, and match the corresponding characters
-in the subject. As a trivial example, the pattern
-
-@example
-The quick brown fox
-@end example
-
-@noindent
-matches a portion of a subject string that is identical to
-itself. The power of regular expressions comes from the
-ability to include alternatives and repetitions in the pattern.
-These are encoded in the pattern by the use of @dfn{special characters},
-which do not stand for themselves but instead
-are interpreted in some special way. Here is a brief description
-of regular expression syntax as used in @command{sed}.
-
-@table @code
-@item @var{char}
-A single ordinary character matches itself.
-
-@item *
-@cindex @acronym{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
-postfixed regular expression can also be followed by @code{*}; for
-example, @code{a**} is equivalent to @code{a*}. @acronym{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
-scripts should instead use @code{\*} in these contexts.
-
-@item \+
-@cindex @acronym{GNU} extensions, to basic regular expressions
-As @code{*}, but matches one or more. It is a @acronym{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.
-
-@item \@{@var{i}\@}
-As @code{*}, but matches exactly @var{i} sequences (@var{i} is a
-decimal integer; for portability, keep it between 0 and 255
-inclusive).
-
-@item \@{@var{i},@var{j}\@}
-Matches between @var{i} and @var{j}, inclusive, sequences.
-
-@item \@{@var{i},\@}
-Matches more than or equal to @var{i} sequences.
-
-@item \(@var{regexp}\)
-Groups the inner @var{regexp} as a whole, this is used to:
-
-@itemize @bullet
-@item
-@cindex @acronym{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}
-implementations do not support it and hence it is not universally
-portable.
-
-@item
-Use back references (see below).
-@end itemize
-
-@item .
-Matches any character, including newline.
-
-@item ^
-Matches the null string at beginning of the pattern space, i.e. what
-appears after the circumflex must appear at the beginning of the
-pattern space.
-
-In most scripts, pattern space is initialized to the content of each
-line (@pxref{Execution Cycle, , How @code{sed} works}). So, it is a
-useful simplification to think of @code{^#include} as matching only
-lines where @samp{#include} is the first thing on line---if there are
-spaces before, for example, the match fails. This simplification is
-valid as long as the original content of pattern space is not modified,
-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
-treat @code{^} as an ordinary character in that context.
-
-@item $
-It is the same as @code{^}, but refers to end of pattern space.
-@code{$} also acts as a special character only at the end
-of the regular expression or subexpression (that is, before @code{\)}
-or @code{\|}), and its use at the end of a subexpression is not
-portable.
-
-
-@item [@var{list}]
-@itemx [^@var{list}]
-Matches any single character in @var{list}: for example,
-@code{[aeiou]} matches all vowels. A list may include
-sequences like @code{@var{char1}-@var{char2}}, which
-matches any character between (inclusive) @var{char1}
-and @var{char2}.
-
-A leading @code{^} reverses the meaning of @var{list}, so that
-it matches any single character @emph{not} in @var{list}. To include
-@code{]} in the list, make it the first character (after
-the @code{^} if needed), to include @code{-} in the list,
-make it the first or last; to include @code{^} put
-it after the first character.
-
-@cindex @code{POSIXLY_CORRECT} behavior, bracket expressions
-The characters @code{$}, @code{*}, @code{.}, @code{[}, and @code{\}
-are normally not special within @var{list}. For example, @code{[\*]}
-matches either @samp{\} or @samp{*}, because the @code{\} is not
-special here. However, strings like @code{[.ch.]}, @code{[=a=]}, and
-@code{[:space:]} are special within @var{list} and represent collating
-symbols, equivalence classes, and character classes, respectively, and
-@code{[} is therefore special within @var{list} when it is followed by
-@code{.}, @code{=}, or @code{:}. Also, when not in
-@env{POSIXLY_CORRECT} mode, special escapes like @code{\n} and
-@code{\t} are recognized within @var{list}. @xref{Escapes}.
-
-@item @var{regexp1}\|@var{regexp2}
-@cindex @acronym{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.
-
-@item @var{regexp1}@var{regexp2}
-Matches the concatenation of @var{regexp1} and @var{regexp2}.
-Concatenation binds more tightly than @code{\|}, @code{^}, and
-@code{$}, but less tightly than the other regular expression
-operators.
-
-@item \@var{digit}
-Matches the @var{digit}-th @code{\(@dots{}\)} parenthesized
-subexpression in the regular expression. This is called a @dfn{back
-reference}. Subexpressions are implicity numbered by counting
-occurrences of @code{\(} left-to-right.
-
-@item \n
-Matches the newline character.
-
-@item \@var{char}
-Matches @var{char}, where @var{char} is one of @code{$},
-@code{*}, @code{.}, @code{[}, @code{\}, or @code{^}.
-Note that the only C-like
-backslash sequences that you can portably assume to be
-interpreted are @code{\n} and @code{\\}; in particular
-@code{\t} is not portable, and matches a @samp{t} under most
-implementations of @command{sed}, rather than a tab character.
-
-@end table
-
-@cindex Greedy regular expression matching
-Note that the regular expression matcher is greedy, i.e., matches
-are attempted from left to right and, if two or more matches are
-possible starting at the same character, it selects the longest.
-
-@noindent
-Examples:
-@table @samp
-@item abcdef
-Matches @samp{abcdef}.
-
-@item a*b
-Matches zero or more @samp{a}s followed by a single
-@samp{b}. For example, @samp{b} or @samp{aaaaab}.
-
-@item a\?b
-Matches @samp{b} or @samp{ab}.
-
-@item a\+b\+
-Matches one or more @samp{a}s followed by one or more
-@samp{b}s: @samp{ab} is the shortest possible match, but
-other examples are @samp{aaaab} or @samp{abbbbb} or
-@samp{aaaaaabbbbbbb}.
-
-@item .*
-@itemx .\+
-These two both match all the characters in a string;
-however, the first matches every string (including the empty
-string), while the second matches only strings containing
-at least one character.
-
-@item ^main.*(.*)
-This matches a string starting with @samp{main},
-followed by an opening and closing
-parenthesis. The @samp{n}, @samp{(} and @samp{)} need not
-be adjacent.
-
-@item ^#
-This matches a string beginning with @samp{#}.
-
-@item \\$
-This matches a string ending with a single backslash. The
-regexp contains two backslashes for escaping.
-
-@item \$
-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.
-
-@item [^ @kbd{tab}]\+
-(Here @kbd{tab} stands for a single tab character.)
-This matches a string of one or more
-characters, none of which is a space or a tab.
-Usually this means a word.
-
-@item ^\(.*\)\n\1$
-This matches a string consisting of two equal substrings separated by
-a newline.
-
-@item .\@{9\@}A$
-This matches nine characters followed by an @samp{A}.
-
-@item ^.\@{15\@}A
-This matches the start of a string that contains 16 characters,
-the last of which is an @samp{A}.
-
-@end table
-
-
-
-@node Common Commands
-@section Often-Used Commands
-
-If you use @command{sed} at all, you will quite likely want to know
-these commands.
-
-@table @code
-@item #
-[No addresses allowed.]
-
-@findex # (comments)
-@cindex Comments, in scripts
-The @code{#} character begins a comment;
-the comment continues until the next newline.
-
-@cindex Portability, comments
-If you are concerned about portability, be aware that
-some implementations of @command{sed} (which are not @sc{posix}
-conformant) may only support a single one-line comment,
-and then only when the very first character of the script is a @code{#}.
-
-@findex -n, forcing from within a script
-@cindex Caveat --- #n on first line
-Warning: if the first two characters of the @command{sed} script
-are @code{#n}, then the @option{-n} (no-autoprint) option is forced.
-If you want to put a comment in the first line of your script
-and that comment begins with the letter @samp{n}
-and you do not want this behavior,
-then be sure to either use a capital @samp{N},
-or place at least one space before the @samp{n}.
-
-@item q [@var{exit-code}]
-This command only accepts a single address.
-
-@findex q (quit) command
-@cindex @value{SSEDEXT}, returning an exit code
-@cindex Quitting
-Exit @command{sed} without processing any more commands or input.
-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.
-
-@item d
-@findex d (delete) command
-@cindex Text, deleting
-Delete the pattern space;
-immediately start next cycle.
-
-@item p
-@findex p (print) command
-@cindex Text, printing
-Print out the pattern space (to the standard output).
-This command is usually only used in conjunction with the @option{-n}
-command-line option.
-
-@item n
-@findex n (next-line) command
-@cindex Next input line, replace pattern space with
-@cindex Read next input line
-If auto-print is not disabled, print the pattern space,
-then, regardless, replace the pattern space with the next line of input.
-If there is no more input then @command{sed} exits without processing
-any more commands.
-
-@item @{ @var{commands} @}
-@findex @{@} command grouping
-@cindex Grouping commands
-@cindex Command groups
-A group of commands may be enclosed between
-@code{@{} and @code{@}} characters.
-This is particularly useful when you want a group of commands
-to be triggered by a single address (or address-range) match.
-
-@end table
-
-@node The "s" Command
-@section The @code{s} Command
-
-The syntax of the @code{s} (as in substitute) command is
-@samp{s/@var{regexp}/@var{replacement}/@var{flags}}. The @code{/}
-characters may be uniformly replaced by any other single
-character within any given @code{s} command. The @code{/}
-character (or whatever other character is used in its stead)
-can appear in the @var{regexp} or @var{replacement}
-only if it is preceded by a @code{\} character.
-
-The @code{s} command is probably the most important in @command{sed}
-and has a lot of different options. Its basic concept is simple:
-the @code{s} command attempts to match the pattern
-space against the supplied @var{regexp}; if the match is
-successful, then that portion of the pattern
-space which was matched is replaced with @var{replacement}.
-
-@cindex Backreferences, in regular expressions
-@cindex Parenthesized substrings
-The @var{replacement} can contain @code{\@var{n}} (@var{n} being
-a number from 1 to 9, inclusive) references, which refer to
-the portion of the match which is contained between the @var{n}th
-@code{\(} and its matching @code{\)}.
-Also, the @var{replacement} can contain unescaped @code{&}
-characters which reference the whole matched portion
-of the pattern space.
-@cindex @value{SSEDEXT}, case modifiers in @code{s} commands
-Finally, as a @value{SSED} extension, you can include a
-special sequence made of a backslash and one of the letters
-@code{L}, @code{l}, @code{U}, @code{u}, or @code{E}.
-The meaning is as follows:
-
-@table @code
-@item \L
-Turn the replacement
-to lowercase until a @code{\U} or @code{\E} is found,
-
-@item \l
-Turn the
-next character to lowercase,
-
-@item \U
-Turn the replacement to uppercase
-until a @code{\L} or @code{\E} is found,
-
-@item \u
-Turn the next character
-to uppercase,
-
-@item \E
-Stop case conversion started by @code{\L} or @code{\U}.
-@end table
-
-When the @code{g} flag is being used, case conversion does not
-propagate from one occurrence of the regular expression to
-another. For example, when the following command is executed
-with @samp{a-b-} in pattern space:
-@example
-s/\(b\?\)-/x\u\1/g
-@end example
-
-@noindent
-the output is @samp{axxB}. When replacing the first @samp{-},
-the @samp{\u} sequence only affects the empty replacement of
-@samp{\1}. It does not affect the @code{x} character that is
-added to pattern space when replacing @code{b-} with @code{xB}.
-
-On the other hand, @code{\l} and @code{\u} do affect the remainder
-of the replacement text if they are followed by an empty substitution.
-With @samp{a-b-} in pattern space, the following command:
-@example
-s/\(b\?\)-/\u\1x/g
-@end example
-
-@noindent
-will replace @samp{-} with @samp{X} (uppercase) and @samp{b-} with
-@samp{Bx}. If this behavior is undesirable, you can prevent it by
-adding a @samp{\E} sequence---after @samp{\1} in this case.
-
-To include a literal @code{\}, @code{&}, or newline in the final
-replacement, be sure to precede the desired @code{\}, @code{&},
-or newline in the @var{replacement} with a @code{\}.
-
-@findex s command, option flags
-@cindex Substitution of text, options
-The @code{s} command can be followed by zero or more of the
-following @var{flags}:
-
-@table @code
-@item g
-@cindex Global substitution
-@cindex Replacing all text matching regexp in a line
-Apply the replacement to @emph{all} matches to the @var{regexp},
-not just the first.
-
-@item @var{number}
-@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 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
-when you mix the @code{g} and @var{number} modifiers,
-and currently there is no widely agreed upon meaning
-across @command{sed} implementations.
-For @value{SSED}, the interaction is defined to be:
-ignore matches before the @var{number}th,
-and then match and replace all matches from
-the @var{number}th on.
-
-@item p
-@cindex Text, printing after substitution
-If the substitution was made, then print the new pattern space.
-
-Note: when both the @code{p} and @code{e} options are specified,
-the relative ordering of the two produces very different results.
-In general, @code{ep} (evaluate then print) is what you want,
-but operating the other way round can be useful for debugging.
-For this reason, the current version of @value{SSED} interprets
-specially the presence of @code{p} options both before and after
-@code{e}, printing the pattern space before and after evaluation,
-while in general flags for the @code{s} command show their
-effect just once. This behavior, although documented, might
-change in future versions.
-
-@item w @var{file-name}
-@cindex Text, writing to a file after substitution
-@cindex @value{SSEDEXT}, @file{/dev/stdout} file
-@cindex @value{SSEDEXT}, @file{/dev/stderr} file
-If the substitution was made, then write out the result to the named file.
-As a @value{SSED} extension, two special values of @var{file-name} are
-supported: @file{/dev/stderr}, which writes the result to the standard
-error, and @file{/dev/stdout}, which writes to the standard
-output.@footnote{This is equivalent to @code{p} unless the @option{-i}
-option is being used.}
-
-@item e
-@cindex Evaluate Bourne-shell commands, after substitution
-@cindex Subprocesses
-@cindex @value{SSEDEXT}, evaluating Bourne-shell commands
-@cindex @value{SSEDEXT}, subprocesses
-This command allows one to pipe input from a shell command
-into pattern space. If a substitution was made, the command
-that is found in pattern space is executed and pattern space
-is replaced with its output. A trailing newline is suppressed;
-results are undefined if the command to be executed contains
-a @sc{nul} character. This is a @value{SSED} extension.
-
-@item I
-@itemx i
-@cindex @acronym{GNU} extensions, @code{I} modifier
-@cindex Case-insensitive matching
-@ifset PERL
-@cindex Perl-style regular expressions, case-insensitive
-@end ifset
-The @code{I} modifier to regular-expression matching is a @acronym{GNU}
-extension which makes @command{sed} match @var{regexp} in a
-case-insensitive manner.
-
-@item M
-@itemx m
-@cindex @value{SSEDEXT}, @code{M} modifier
-@ifset PERL
-@cindex Perl-style regular expressions, multiline
-@end ifset
-The @code{M} modifier to regular-expression matching is a @value{SSED}
-extension which directs @value{SSED} to match the regular expression
-in @cite{multi-line} mode. The modifier causes @code{^} and @code{$} to
-match respectively (in addition to the normal behavior) the empty string
-after a newline, and the empty string before a newline. There are
-special character sequences
-@ifset PERL
-(@code{\A} and @code{\Z} in Perl mode, @code{\`} and @code{\'}
-in basic or extended regular expression modes)
-@end ifset
-@ifclear PERL
-(@code{\`} and @code{\'})
-@end ifclear
-which always match the beginning or the end of the buffer.
-In addition,
-@ifset PERL
-just like in Perl mode without the @code{S} modifier,
-@end ifset
-the period character does not match a new-line character in
-multi-line mode.
-
-@ifset PERL
-@item S
-@itemx s
-@cindex @value{SSEDEXT}, @code{S} modifier
-@cindex Perl-style regular expressions, single line
-The @code{S} modifier to regular-expression matching is only valid
-in Perl mode and specifies that the dot character (@code{.}) will
-match the newline character too. @code{S} stands for @cite{single-line}.
-@end ifset
-
-@ifset PERL
-@item X
-@itemx x
-@cindex @value{SSEDEXT}, @code{X} modifier
-@cindex Perl-style regular expressions, extended
-The @code{X} modifier to regular-expression matching is also
-valid in Perl mode only. If it is used, whitespace in the
-pattern (other than in a character class) and
-characters between a @kbd{#} outside a character class and the
-next newline character are ignored. An escaping backslash
-can be used to include a whitespace or @kbd{#} character as part
-of the pattern.
-@end ifset
-@end table
-
-
-@node Other Commands
-@section Less Frequently-Used Commands
-
-Though perhaps less frequently used than those in the previous
-section, some very small yet useful @command{sed} scripts can be built with
-these commands.
-
-@table @code
-@item y/@var{source-chars}/@var{dest-chars}/
-(The @code{/} characters may be uniformly replaced by
-any other single character within any given @code{y} command.)
-
-@findex y (transliterate) command
-@cindex Transliteration
-Transliterate any characters in the pattern space which match
-any of the @var{source-chars} with the corresponding character
-in @var{dest-chars}.
-
-Instances of the @code{/} (or whatever other character is used in its stead),
-@code{\}, or newlines can appear in the @var{source-chars} or @var{dest-chars}
-lists, provide that each instance is escaped by a @code{\}.
-The @var{source-chars} and @var{dest-chars} lists @emph{must}
-contain the same number of characters (after de-escaping).
-
-@item a\
-@itemx @var{text}
-@cindex @value{SSEDEXT}, two addresses supported by most commands
-As a @acronym{GNU} extension, this command accepts two addresses.
-
-@findex a (append text lines) command
-@cindex Appending text after a line
-@cindex Text, appending
-Queue the lines of text which follow this command
-(each but the last ending with a @code{\},
-which are removed from the output)
-to be output at the end of the current cycle,
-or when the next input line is read.
-
-Escape sequences in @var{text} are processed, so you should
-use @code{\\} in @var{text} to print a single backslash.
-
-As a @acronym{GNU} extension, if between the @code{a} and the newline there is
-other than a whitespace-@code{\} sequence, then the text of this line,
-starting at the first non-whitespace character after the @code{a},
-is taken as the first line of the @var{text} block.
-(This enables a simplification in scripting a one-line add.)
-This extension also works with the @code{i} and @code{c} commands.
-
-@item i\
-@itemx @var{text}
-@cindex @value{SSEDEXT}, two addresses supported by most commands
-As a @acronym{GNU} extension, this command accepts two addresses.
-
-@findex i (insert text lines) command
-@cindex Inserting text before a line
-@cindex Text, insertion
-Immediately output the lines of text which follow this command
-(each but the last ending with a @code{\},
-which are removed from the output).
-
-@item c\
-@itemx @var{text}
-@findex c (change to text lines) command
-@cindex Replacing selected lines with other text
-Delete the lines matching the address or address-range,
-and output the lines of text which follow this command
-(each but the last ending with a @code{\},
-which are removed from the output)
-in place of the last line
-(or in place of each line, if no addresses were specified).
-A new cycle is started after this command is done,
-since the pattern space will have been deleted.
-
-@item =
-@cindex @value{SSEDEXT}, two addresses supported by most commands
-As a @acronym{GNU} extension, this command accepts two addresses.
-
-@findex = (print line number) command
-@cindex Printing line number
-@cindex Line number, printing
-Print out the current input line number (with a trailing newline).
-
-@item l @var{n}
-@findex l (list unambiguously) command
-@cindex List pattern space
-@cindex Printing text unambiguously
-@cindex Line length, setting
-@cindex @value{SSEDEXT}, setting line length
-Print the pattern space in an unambiguous form:
-non-printable characters (and the @code{\} character)
-are printed in C-style escaped form; long lines are split,
-with a trailing @code{\} character to indicate the split;
-the end of each line is marked with a @code{$}.
-
-@var{n} specifies the desired line-wrap length;
-a length of 0 (zero) means to never wrap long lines. If omitted,
-the default as specified on the command line is used. The @var{n}
-parameter is a @value{SSED} extension.
-
-@item r @var{filename}
-@cindex @value{SSEDEXT}, two addresses supported by most commands
-As a @acronym{GNU} extension, this command accepts two addresses.
-
-@findex r (read file) command
-@cindex Read text from a file
-@cindex @value{SSEDEXT}, @file{/dev/stdin} file
-Queue the contents of @var{filename} to be read and
-inserted into the output stream at the end of the current cycle,
-or when the next input line is read.
-Note that if @var{filename} cannot be read, it is treated as
-if it were an empty file, without any error indication.
-
-As a @value{SSED} extension, the special value @file{/dev/stdin}
-is supported for the file name, which reads the contents of the
-standard input.
-
-@item w @var{filename}
-@findex w (write file) command
-@cindex Write to a file
-@cindex @value{SSEDEXT}, @file{/dev/stdout} file
-@cindex @value{SSEDEXT}, @file{/dev/stderr} file
-Write the pattern space to @var{filename}.
-As a @value{SSED} extension, two special values of @var{file-name} are
-supported: @file{/dev/stderr}, which writes the result to the standard
-error, and @file{/dev/stdout}, which writes to the standard
-output.@footnote{This is equivalent to @code{p} unless the @option{-i}
-option is being used.}
-
-The file will be created (or truncated) before the first input line is
-read; all @code{w} commands (including instances of the @code{w} flag
-on successful @code{s} commands) which refer to the same @var{filename}
-are output without closing and reopening the file.
-
-@item D
-@findex D (delete first line) command
-@cindex Delete first line from pattern space
-If pattern space contains no newline, start a normal new cycle as if
-the @code{d} command was issued. Otherwise, delete text in the pattern
-space up to the first newline, and restart cycle with the resultant
-pattern space, without reading a new line of input.
-
-@item N
-@findex N (append Next line) command
-@cindex Next input line, append to pattern space
-@cindex Append next input line to pattern space
-Add a newline to the pattern space,
-then append the next line of input to the pattern space.
-If there is no more input then @command{sed} exits without processing
-any more commands.
-
-@item P
-@findex P (print first line) command
-@cindex Print first line from pattern space
-Print out the portion of the pattern space up to the first newline.
-
-@item h
-@findex h (hold) command
-@cindex Copy pattern space into hold space
-@cindex Replace hold space with copy of pattern space
-@cindex Hold space, copying pattern space into
-Replace the contents of the hold space with the contents of the pattern space.
-
-@item H
-@findex H (append Hold) command
-@cindex Append pattern space to hold space
-@cindex Hold space, appending from pattern space
-Append a newline to the contents of the hold space,
-and then append the contents of the pattern space to that of the hold space.
-
-@item g
-@findex g (get) command
-@cindex Copy hold space into pattern space
-@cindex Replace pattern space with copy of hold space
-@cindex Hold space, copy into pattern space
-Replace the contents of the pattern space with the contents of the hold space.
-
-@item G
-@findex G (appending Get) command
-@cindex Append hold space to pattern space
-@cindex Hold space, appending to pattern space
-Append a newline to the contents of the pattern space,
-and then append the contents of the hold space to that of the pattern space.
-
-@item x
-@findex x (eXchange) command
-@cindex Exchange hold space with pattern space
-@cindex Hold space, exchange with pattern space
-Exchange the contents of the hold and pattern spaces.
-
-@end table
-
-
-@node Programming Commands
-@section Commands for @command{sed} gurus
-
-In most cases, use of these commands indicates that you are
-probably better off programming in something like @command{awk}
-or Perl. But occasionally one is committed to sticking
-with @command{sed}, and these commands can enable one to write
-quite convoluted scripts.
-
-@cindex Flow of control in scripts
-@table @code
-@item : @var{label}
-[No addresses allowed.]
-
-@findex : (label) command
-@cindex Labels, in scripts
-Specify the location of @var{label} for branch commands.
-In all other respects, a no-op.
-
-@item b @var{label}
-@findex b (branch) command
-@cindex Branch to a label, unconditionally
-@cindex Goto, in scripts
-Unconditionally branch to @var{label}.
-The @var{label} may be omitted, in which case the next cycle is started.
-
-@item t @var{label}
-@findex t (test and branch if successful) command
-@cindex Branch to a label, if @code{s///} succeeded
-@cindex Conditional branch
-Branch to @var{label} only if there has been a successful @code{s}ubstitution
-since the last input line was read or conditional branch was taken.
-The @var{label} may be omitted, in which case the next cycle is started.
-
-@end table
-
-@node Extended Commands
-@section Commands Specific to @value{SSED}
-
-These commands are specific to @value{SSED}, so you
-must use them with care and only when you are sure that
-hindering portability is not evil. They allow you to check
-for @value{SSED} extensions or to do tasks that are required
-quite often, yet are unsupported by standard @command{sed}s.
-
-@table @code
-@item e [@var{command}]
-@findex e (evaluate) command
-@cindex Evaluate Bourne-shell commands
-@cindex Subprocesses
-@cindex @value{SSEDEXT}, evaluating Bourne-shell commands
-@cindex @value{SSEDEXT}, subprocesses
-This command allows one to pipe input from a shell command
-into pattern space. Without parameters, the @code{e} command
-executes the command that is found in pattern space and
-replaces the pattern space with the output; a trailing newline
-is suppressed.
-
-If a parameter is specified, instead, the @code{e} command
-interprets it as a command and sends its output to the output stream.
-The command can run across multiple lines, all but the last ending with
-a back-slash.
-
-In both cases, the results are undefined if the command to be
-executed contains a @sc{nul} character.
-
-Note that, unlike the @code{r} command, the output of the command will
-be printed immediately; the @code{r} command instead delays the output
-to the end of the current cycle.
-
-@item F
-@findex F (File name) command
-@cindex Printing file name
-@cindex File name, printing
-Print out the file name of the current input file (with a trailing
-newline).
-
-@item L @var{n}
-@findex L (fLow paragraphs) command
-@cindex Reformat pattern space
-@cindex Reformatting paragraphs
-@cindex @value{SSEDEXT}, reformatting paragraphs
-@cindex @value{SSEDEXT}, @code{L} command
-This @value{SSED} extension fills and joins lines in pattern space
-to produce output lines of (at most) @var{n} characters, like
-@code{fmt} does; if @var{n} is omitted, the default as specified
-on the command line is used. This command is considered a failed
-experiment and unless there is enough request (which seems unlikely)
-will be removed in future versions.
-
-@ignore
-Blank lines, spaces between words, and indentation are
-preserved in the output; successive input lines with different
-indentation are not joined; tabs are expanded to 8 columns.
-
-If the pattern space contains multiple lines, they are joined, but
-since the pattern space usually contains a single line, the behavior
-of a simple @code{L;d} script is the same as @samp{fmt -s} (i.e.,
-it does not join short lines to form longer ones).
-
-@var{n} specifies the desired line-wrap length; if omitted,
-the default as specified on the command line is used.
-@end ignore
-
-@item Q [@var{exit-code}]
-This command only accepts a single address.
-
-@findex Q (silent Quit) command
-@cindex @value{SSEDEXT}, quitting silently
-@cindex @value{SSEDEXT}, returning an exit code
-@cindex Quitting
-This command is the same as @code{q}, but will not print the
-contents of pattern space. Like @code{q}, it provides the
-ability to return an exit code to the caller.
-
-This command can be useful because the only alternative ways
-to accomplish this apparently trivial function are to use
-the @option{-n} option (which can unnecessarily complicate
-your script) or resorting to the following snippet, which
-wastes time by reading the whole file without any visible effect:
-
-@example
-:eat
-$d @i{@r{Quit silently on the last line}}
-N @i{@r{Read another line, silently}}
-g @i{@r{Overwrite pattern space each time to save memory}}
-b eat
-@end example
-
-@item R @var{filename}
-@findex R (read line) command
-@cindex Read text from a file
-@cindex @value{SSEDEXT}, reading a file a line at a time
-@cindex @value{SSEDEXT}, @code{R} command
-@cindex @value{SSEDEXT}, @file{/dev/stdin} file
-Queue a line of @var{filename} to be read and
-inserted into the output stream at the end of the current cycle,
-or when the next input line is read.
-Note that if @var{filename} cannot be read, or if its end is
-reached, no line is appended, without any error indication.
-
-As with the @code{r} command, the special value @file{/dev/stdin}
-is supported for the file name, which reads a line from the
-standard input.
-
-@item T @var{label}
-@findex T (test and branch if failed) command
-@cindex @value{SSEDEXT}, branch if @code{s///} failed
-@cindex Branch to a label, if @code{s///} failed
-@cindex Conditional branch
-Branch to @var{label} only if there have been no successful
-@code{s}ubstitutions since the last input line was read or
-conditional branch was taken. The @var{label} may be omitted,
-in which case the next cycle is started.
-
-@item v @var{version}
-@findex v (version) command
-@cindex @value{SSEDEXT}, checking for their presence
-@cindex Requiring @value{SSED}
-This command does nothing, but makes @command{sed} fail if
-@value{SSED} extensions are not supported, simply because other
-versions of @command{sed} do not implement it. In addition, you
-can specify the version of @command{sed} that your script
-requires, such as @code{4.0.5}. The default is @code{4.0}
-because that is the first version that implemented this command.
-
-This command enables all @value{SSEDEXT} even if
-@env{POSIXLY_CORRECT} is set in the environment.
-
-@item W @var{filename}
-@findex W (write first line) command
-@cindex Write first line to a file
-@cindex @value{SSEDEXT}, writing first line to a file
-Write to the given filename the portion of the pattern space up to
-the first newline. Everything said under the @code{w} command about
-file handling holds here too.
-
-@item z
-@findex z (Zap) command
-@cindex @value{SSEDEXT}, emptying pattern space
-@cindex Emptying pattern space
-This command empties the content of pattern space. It is
-usually the same as @samp{s/.*//}, but is more efficient
-and works in the presence of invalid multibyte sequences
-in the input stream. @sc{posix} mandates that such sequences
-are @emph{not} matched by @samp{.}, so that there is no portable
-way to clear @command{sed}'s buffers in the middle of the
-script in most multibyte locales (including UTF-8 locales).
-@end table
-
-@node Escapes
-@section @acronym{GNU} Extensions for Escapes in Regular Expressions
-
-@cindex @acronym{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
-example, @samp{\*} matches a single asterisk rather than zero
-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}
-extensions, with the exception of @code{\n}. In basic regular
-expression mode, setting @code{POSIXLY_CORRECT} disables them inside
-bracket expressions.}---that
-is, escapes that are applied to a character or sequence of characters
-that ordinarily are taken literally, and that @command{sed} replaces
-with a special character. This provides a way
-of encoding non-printable characters in patterns in a visible manner.
-There is no restriction on the appearance of non-printing characters
-in a @command{sed} script but when a script is being prepared in the
-shell or by text editing, it is usually easier to use one of
-the following escape sequences than the binary character it
-represents:
-
-The list of these escapes is:
-
-@table @code
-@item \a
-Produces or matches a @sc{bel} character, that is an ``alert'' (@sc{ascii} 7).
-
-@item \f
-Produces or matches a form feed (@sc{ascii} 12).
-
-@item \n
-Produces or matches a newline (@sc{ascii} 10).
-
-@item \r
-Produces or matches a carriage return (@sc{ascii} 13).
-
-@item \t
-Produces or matches a horizontal tab (@sc{ascii} 9).
-
-@item \v
-Produces or matches a so called ``vertical tab'' (@sc{ascii} 11).
-
-@item \c@var{x}
-Produces or matches @kbd{@sc{Control}-@var{x}}, where @var{x} is
-any character. The precise effect of @samp{\c@var{x}} is as follows:
-if @var{x} is a lower case letter, it is converted to upper case.
-Then bit 6 of the character (hex 40) is inverted. Thus @samp{\cz} becomes
-hex 1A, but @samp{\c@{} becomes hex 3B, while @samp{\c;} becomes hex 7B.
-
-@item \d@var{xxx}
-Produces or matches a character whose decimal @sc{ascii} value is @var{xxx}.
-
-@item \o@var{xxx}
-@ifset PERL
-@item \@var{xxx}
-@end ifset
-Produces or matches a character whose octal @sc{ascii} value is @var{xxx}.
-@ifset PERL
-The syntax without the @code{o} is active in Perl mode, while the one
-with the @code{o} is active in the normal or extended @sc{posix} regular
-expression modes.
-@end ifset
-
-@item \x@var{xx}
-Produces or matches a character whose hexadecimal @sc{ascii} value is @var{xx}.
-@end table
-
-@samp{\b} (backspace) was omitted because of the conflict with
-the existing ``word boundary'' meaning.
-
-Other escapes match a particular character class and are valid only in
-regular expressions:
-
-@table @code
-@item \w
-Matches any ``word'' character. A ``word'' character is any
-letter or digit or the underscore character.
-
-@item \W
-Matches any ``non-word'' character.
-
-@item \b
-Matches a word boundary; that is it matches if the character
-to the left is a ``word'' character and the character to the
-right is a ``non-word'' character, or vice-versa.
-
-@item \B
-Matches everywhere but on a word boundary; that is it matches
-if the character to the left and the character to the right
-are either both ``word'' characters or both ``non-word''
-characters.
-
-@item \`
-Matches only at the start of pattern space. This is different
-from @code{^} in multi-line mode.
-
-@item \'
-Matches only at the end of pattern space. This is different
-from @code{$} in multi-line mode.
-
-@ifset PERL
-@item \G
-Match only at the start of pattern space or, when doing a global
-substitution using the @code{s///g} command and option, at
-the end-of-match position of the prior match. For example,
-@samp{s/\Ga/Z/g} will change an initial run of @code{a}s to
-a run of @code{Z}s
-@end ifset
-@end table
-
-@node Examples
-@chapter Some Sample Scripts
-
-Here are some @command{sed} scripts to guide you in the art of mastering
-@command{sed}.
-
-@menu
-Some exotic examples:
-* Centering lines::
-* Increment a number::
-* Rename files to lower case::
-* Print bash environment::
-* Reverse chars of lines::
-
-Emulating standard utilities:
-* tac:: Reverse lines of files
-* cat -n:: Numbering lines
-* cat -b:: Numbering non-blank lines
-* wc -c:: Counting chars
-* wc -w:: Counting words
-* wc -l:: Counting lines
-* head:: Printing the first lines
-* tail:: Printing the last lines
-* uniq:: Make duplicate lines unique
-* uniq -d:: Print duplicated lines of input
-* uniq -u:: Remove all duplicated lines
-* cat -s:: Squeezing blank lines
-@end menu
-
-@node Centering lines
-@section Centering Lines
-
-This script centers all lines of a file on a 80 columns width.
-To change that width, the number in @code{\@{@dots{}\@}} must be
-replaced, and the number of added spaces also must be changed.
-
-Note how the buffer commands are used to separate parts in
-the regular expressions to be matched---this is a common
-technique.
-
-@c start-------------------------------------------
-@example
-#!/usr/bin/sed -f
-
-# Put 80 spaces in the buffer
-1 @{
- x
- s/^$/ /
- s/^.*$/&&&&&&&&/
- x
-@}
-
-# del leading and trailing spaces
-y/@kbd{tab}/ /
-s/^ *//
-s/ *$//
-
-# add a newline and 80 spaces to end of line
-G
-
-# keep first 81 chars (80 + a newline)
-s/^\(.\@{81\@}\).*$/\1/
-
-# \2 matches half of the spaces, which are moved to the beginning
-s/^\(.*\)\n\(.*\)\2/\2\1/
-@end example
-@c end---------------------------------------------
-
-@node Increment a number
-@section Increment a Number
-
-This script is one of a few that demonstrate how to do arithmetic
-in @command{sed}. This is indeed possible,@footnote{@command{sed} guru Greg
-Ubben wrote an implementation of the @command{dc} @sc{rpn} calculator!
-It is distributed together with sed.} but must be done manually.
-
-To increment one number you just add 1 to last digit, replacing
-it by the following digit. There is one exception: when the digit
-is a nine the previous digits must be also incremented until you
-don't have a nine.
-
-This solution by Bruno Haible is very clever and smart because
-it uses a single buffer; if you don't have this limitation, the
-algorithm used in @ref{cat -n, Numbering lines}, is faster.
-It works by replacing trailing nines with an underscore, then
-using multiple @code{s} commands to increment the last digit,
-and then again substituting underscores with zeros.
-
-@c start-------------------------------------------
-@example
-#!/usr/bin/sed -f
-
-/[^0-9]/ d
-
-# replace all trailing 9s by _ (any other character except digits, could
-# be used)
-:d
-s/9\(_*\)$/_\1/
-td
-
-# incr last digit only. The first line adds a most-significant
-# digit of 1 if we have to add a digit.
-
-s/^\(_*\)$/1\1/; tn
-s/8\(_*\)$/9\1/; tn
-s/7\(_*\)$/8\1/; tn
-s/6\(_*\)$/7\1/; tn
-s/5\(_*\)$/6\1/; tn
-s/4\(_*\)$/5\1/; tn
-s/3\(_*\)$/4\1/; tn
-s/2\(_*\)$/3\1/; tn
-s/1\(_*\)$/2\1/; tn
-s/0\(_*\)$/1\1/; tn
-
-:n
-y/_/0/
-@end example
-@c end---------------------------------------------
-
-@node Rename files to lower case
-@section Rename Files to Lower Case
-
-This is a pretty strange use of @command{sed}. We transform text, and
-transform it to be shell commands, then just feed them to shell.
-Don't worry, even worse hacks are done when using @command{sed}; I have
-seen a script converting the output of @command{date} into a @command{bc}
-program!
-
-The main body of this is the @command{sed} script, which remaps the name
-from lower to upper (or vice-versa) and even checks out
-if the remapped name is the same as the original name.
-Note how the script is parameterized using shell
-variables and proper quoting.
-
-@c start-------------------------------------------
-@example
-#! /bin/sh
-# rename files to lower/upper case...
-#
-# usage:
-# move-to-lower *
-# move-to-upper *
-# or
-# move-to-lower -R .
-# move-to-upper -R .
-#
-
-help()
-@{
- cat << eof
-Usage: $0 [-n] [-r] [-h] files...
-
--n do nothing, only see what would be done
--R recursive (use find)
--h this message
-files files to remap to lower case
-
-Examples:
- $0 -n * (see if everything is ok, then...)
- $0 *
-
- $0 -R .
-
-eof
-@}
-
-apply_cmd='sh'
-finder='echo "$@@" | tr " " "\n"'
-files_only=
-
-while :
-do
- case "$1" in
- -n) apply_cmd='cat' ;;
- -R) finder='find "$@@" -type f';;
- -h) help ; exit 1 ;;
- *) break ;;
- esac
- shift
-done
-
-if [ -z "$1" ]; then
- echo Usage: $0 [-h] [-n] [-r] files...
- exit 1
-fi
-
-LOWER='abcdefghijklmnopqrstuvwxyz'
-UPPER='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
-
-case `basename $0` in
- *upper*) TO=$UPPER; FROM=$LOWER ;;
- *) FROM=$UPPER; TO=$LOWER ;;
-esac
-
-eval $finder | sed -n '
-
-# remove all trailing slashes
-s/\/*$//
-
-# add ./ if there is no path, only a filename
-/\//! s/^/.\//
-
-# save path+filename
-h
-
-# remove path
-s/.*\///
-
-# do conversion only on filename
-y/'$FROM'/'$TO'/
-
-# now line contains original path+file, while
-# hold space contains the new filename
-x
-
-# add converted file name to line, which now contains
-# path/file-name\nconverted-file-name
-G
-
-# check if converted file name is equal to original file name,
-# if it is, do not print anything
-/^.*\/\(.*\)\n\1/b
-
-# escape special characters for the shell
-s/["$`\\]/\\&/g
-
-# now, transform path/fromfile\n, into
-# mv path/fromfile path/tofile and print it
-s/^\(.*\/\)\(.*\)\n\(.*\)$/mv "\1\2" "\1\3"/p
-
-' | $apply_cmd
-@end example
-@c end---------------------------------------------
-
-@node Print bash environment
-@section Print @command{bash} Environment
-
-This script strips the definition of the shell functions
-from the output of the @command{set} Bourne-shell command.
-
-@c start-------------------------------------------
-@example
-#!/bin/sh
-
-set | sed -n '
-:x
-
-@ifinfo
-# if no occurrence of "=()" print and load next line
-@end ifinfo
-@ifnotinfo
-# if no occurrence of @samp{=()} print and load next line
-@end ifnotinfo
-/=()/! @{ p; b; @}
-/ () $/! @{ p; b; @}
-
-# possible start of functions section
-# save the line in case this is a var like FOO="() "
-h
-
-# if the next line has a brace, we quit because
-# nothing comes after functions
-n
-/^@{/ q
-
-# print the old line
-x; p
-
-# work on the new line now
-x; bx
-'
-@end example
-@c end---------------------------------------------
-
-@node Reverse chars of lines
-@section Reverse Characters of Lines
-
-This script can be used to reverse the position of characters
-in lines. The technique moves two characters at a time, hence
-it is faster than more intuitive implementations.
-
-Note the @code{tx} command before the definition of the label.
-This is often needed to reset the flag that is tested by
-the @code{t} command.
-
-Imaginative readers will find uses for this script. An example
-is reversing the output of @command{banner}.@footnote{This requires
-another script to pad the output of banner; for example
-
-@example
-#! /bin/sh
-
-banner -w $1 $2 $3 $4 |
- sed -e :a -e '/^.\@{0,'$1'\@}$/ @{ s/$/ /; ba; @}' |
- ~/sedscripts/reverseline.sed
-@end example
-}
-
-@c start-------------------------------------------
-@example
-#!/usr/bin/sed -f
-
-/../! b
-
-# Reverse a line. Begin embedding the line between two newlines
-s/^.*$/\
-&\
-/
-
-# Move first character at the end. The regexp matches until
-# there are zero or one characters between the markers
-tx
-:x
-s/\(\n.\)\(.*\)\(.\n\)/\3\2\1/
-tx
-
-# Remove the newline markers
-s/\n//g
-@end example
-@c end---------------------------------------------
-
-@node tac
-@section Reverse Lines of Files
-
-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}
-@ifset PERL
-and @value{SSED}
-@end ifset
-this script might easily overflow internal buffers.
-
-@c start-------------------------------------------
-@example
-#!/usr/bin/sed -nf
-
-# reverse all lines of input, i.e. first line became last, ...
-
-# from the second line, the buffer (which contains all previous lines)
-# is *appended* to current line, so, the order will be reversed
-1! G
-
-# on the last line we're done -- print everything
-$ p
-
-# store everything on the buffer again
-h
-@end example
-@c end---------------------------------------------
-
-@node cat -n
-@section Numbering Lines
-
-This script replaces @samp{cat -n}; in fact it formats its output
-exactly like @acronym{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
-Bourne-shell script could be used for the same purpose and would
-be much faster:
-
-@c start-------------------------------------------
-@example
-#! /bin/sh
-sed -e "=" $@@ | sed -e '
- s/^/ /
- N
- s/^ *\(......\)\n/\1 /
-'
-@end example
-@c end---------------------------------------------
-
-It uses @command{sed} to print the line number, then groups lines two
-by two using @code{N}. Of course, this script does not teach as much as
-the one presented below.
-
-The algorithm used for incrementing uses both buffers, so the line
-is printed as soon as possible and then discarded. The number
-is split so that changing digits go in a buffer and unchanged ones go
-in the other; the changed digits are modified in a single step
-(using a @code{y} command). The line number for the next line
-is then composed and stored in the hold space, to be used in the
-next iteration.
-
-@c start-------------------------------------------
-@example
-#!/usr/bin/sed -nf
-
-# Prime the pump on the first line
-x
-/^$/ s/^.*$/1/
-
-# Add the correct line number before the pattern
-G
-h
-
-# Format it and print it
-s/^/ /
-s/^ *\(......\)\n/\1 /p
-
-# Get the line number from hold space; add a zero
-# if we're going to add a digit on the next line
-g
-s/\n.*$//
-/^9*$/ s/^/0/
-
-# separate changing/unchanged digits with an x
-s/.9*$/x&/
-
-# keep changing digits in hold space
-h
-s/^.*x//
-y/0123456789/1234567890/
-x
-
-# keep unchanged digits in pattern space
-s/x.*$//
-
-# compose the new number, remove the newline implicitly added by G
-G
-s/\n//
-h
-@end example
-@c end---------------------------------------------
-
-@node cat -b
-@section Numbering Non-blank Lines
-
-Emulating @samp{cat -b} is almost the same as @samp{cat -n}---we only
-have to select which lines are to be numbered and which are not.
-
-The part that is common to this script and the previous one is
-not commented to show how important it is to comment @command{sed}
-scripts properly...
-
-@c start-------------------------------------------
-@example
-#!/usr/bin/sed -nf
-
-/^$/ @{
- p
- b
-@}
-
-# Same as cat -n from now
-x
-/^$/ s/^.*$/1/
-G
-h
-s/^/ /
-s/^ *\(......\)\n/\1 /p
-x
-s/\n.*$//
-/^9*$/ s/^/0/
-s/.9*$/x&/
-h
-s/^.*x//
-y/0123456789/1234567890/
-x
-s/x.*$//
-G
-s/\n//
-h
-@end example
-@c end---------------------------------------------
-
-@node wc -c
-@section Counting Characters
-
-This script shows another way to do arithmetic with @command{sed}.
-In this case we have to add possibly large numbers, so implementing
-this by successive increments would not be feasible (and possibly
-even more complicated to contrive than this script).
-
-The approach is to map numbers to letters, kind of an abacus
-implemented with @command{sed}. @samp{a}s are units, @samp{b}s are
-tens and so on: we simply add the number of characters
-on the current line as units, and then propagate the carry
-to tens, hundreds, and so on.
-
-As usual, running totals are kept in hold space.
-
-On the last line, we convert the abacus form back to decimal.
-For the sake of variety, this is done with a loop rather than
-with some 80 @code{s} commands@footnote{Some implementations
-have a limit of 199 commands per script}: first we
-convert units, removing @samp{a}s from the number; then we
-rotate letters so that tens become @samp{a}s, and so on
-until no more letters remain.
-
-@c start-------------------------------------------
-@example
-#!/usr/bin/sed -nf
-
-# Add n+1 a's to hold space (+1 is for the newline)
-s/./a/g
-H
-x
-s/\n/a/
-
-# Do the carry. The t's and b's are not necessary,
-# but they do speed up the thing
-t a
-: a; s/aaaaaaaaaa/b/g; t b; b done
-: b; s/bbbbbbbbbb/c/g; t c; b done
-: c; s/cccccccccc/d/g; t d; b done
-: d; s/dddddddddd/e/g; t e; b done
-: e; s/eeeeeeeeee/f/g; t f; b done
-: f; s/ffffffffff/g/g; t g; b done
-: g; s/gggggggggg/h/g; t h; b done
-: h; s/hhhhhhhhhh//g
-
-: done
-$! @{
- h
- b
-@}
-
-# On the last line, convert back to decimal
-
-: loop
-/a/! s/[b-h]*/&0/
-s/aaaaaaaaa/9/
-s/aaaaaaaa/8/
-s/aaaaaaa/7/
-s/aaaaaa/6/
-s/aaaaa/5/
-s/aaaa/4/
-s/aaa/3/
-s/aa/2/
-s/a/1/
-
-: next
-y/bcdefgh/abcdefg/
-/[a-h]/ b loop
-p
-@end example
-@c end---------------------------------------------
-
-@node wc -w
-@section Counting Words
-
-This script is almost the same as the previous one, once each
-of the words on the line is converted to a single @samp{a}
-(in the previous script each letter was changed to an @samp{a}).
-
-It is interesting that real @command{wc} programs have optimized
-loops for @samp{wc -c}, so they are much slower at counting
-words rather than characters. This script's bottleneck,
-instead, is arithmetic, and hence the word-counting one
-is faster (it has to manage smaller numbers).
-
-Again, the common parts are not commented to show the importance
-of commenting @command{sed} scripts.
-
-@c start-------------------------------------------
-@example
-#!/usr/bin/sed -nf
-
-# Convert words to a's
-s/[ @kbd{tab}][ @kbd{tab}]*/ /g
-s/^/ /
-s/ [^ ][^ ]*/a /g
-s/ //g
-
-# Append them to hold space
-H
-x
-s/\n//
-
-# From here on it is the same as in wc -c.
-/aaaaaaaaaa/! bx; s/aaaaaaaaaa/b/g
-/bbbbbbbbbb/! bx; s/bbbbbbbbbb/c/g
-/cccccccccc/! bx; s/cccccccccc/d/g
-/dddddddddd/! bx; s/dddddddddd/e/g
-/eeeeeeeeee/! bx; s/eeeeeeeeee/f/g
-/ffffffffff/! bx; s/ffffffffff/g/g
-/gggggggggg/! bx; s/gggggggggg/h/g
-s/hhhhhhhhhh//g
-:x
-$! @{ h; b; @}
-:y
-/a/! s/[b-h]*/&0/
-s/aaaaaaaaa/9/
-s/aaaaaaaa/8/
-s/aaaaaaa/7/
-s/aaaaaa/6/
-s/aaaaa/5/
-s/aaaa/4/
-s/aaa/3/
-s/aa/2/
-s/a/1/
-y/bcdefgh/abcdefg/
-/[a-h]/ by
-p
-@end example
-@c end---------------------------------------------
-
-@node wc -l
-@section Counting Lines
-
-No strange things are done now, because @command{sed} gives us
-@samp{wc -l} functionality for free!!! Look:
-
-@c start-------------------------------------------
-@example
-#!/usr/bin/sed -nf
-$=
-@end example
-@c end---------------------------------------------
-
-@node head
-@section Printing the First Lines
-
-This script is probably the simplest useful @command{sed} script.
-It displays the first 10 lines of input; the number of displayed
-lines is right before the @code{q} command.
-
-@c start-------------------------------------------
-@example
-#!/usr/bin/sed -f
-10q
-@end example
-@c end---------------------------------------------
-
-@node tail
-@section Printing the Last Lines
-
-Printing the last @var{n} lines rather than the first is more complex
-but indeed possible. @var{n} is encoded in the second line, before
-the bang character.
-
-This script is similar to the @command{tac} script in that it keeps the
-final output in the hold space and prints it at the end:
-
-@c start-------------------------------------------
-@example
-#!/usr/bin/sed -nf
-
-1! @{; H; g; @}
-1,10 !s/[^\n]*\n//
-$p
-h
-@end example
-@c end---------------------------------------------
-
-Mainly, the scripts keeps a window of 10 lines and slides it
-by adding a line and deleting the oldest (the substitution command
-on the second line works like a @code{D} command but does not
-restart the loop).
-
-The ``sliding window'' technique is a very powerful way to write
-efficient and complex @command{sed} scripts, because commands like
-@code{P} would require a lot of work if implemented manually.
-
-To introduce the technique, which is fully demonstrated in the
-rest of this chapter and is based on the @code{N}, @code{P}
-and @code{D} commands, here is an implementation of @command{tail}
-using a simple ``sliding window.''
-
-This looks complicated but in fact the working is the same as
-the last script: after we have kicked in the appropriate number
-of lines, however, we stop using the hold space to keep inter-line
-state, and instead use @code{N} and @code{D} to slide pattern
-space by one line:
-
-@c start-------------------------------------------
-@example
-#!/usr/bin/sed -f
-
-1h
-2,10 @{; H; g; @}
-$q
-1,9d
-N
-D
-@end example
-@c end---------------------------------------------
-
-Note how the first, second and fourth line are inactive after
-the first ten lines of input. After that, all the script does
-is: exiting on the last line of input, appending the next input
-line to pattern space, and removing the first line.
-
-@node uniq
-@section Make Duplicate Lines Unique
-
-This is an example of the art of using the @code{N}, @code{P}
-and @code{D} commands, probably the most difficult to master.
-
-@c start-------------------------------------------
-@example
-#!/usr/bin/sed -f
-h
-
-:b
-# On the last line, print and exit
-$b
-N
-/^\(.*\)\n\1$/ @{
- # The two lines are identical. Undo the effect of
- # the n command.
- g
- bb
-@}
-
-# If the @code{N} command had added the last line, print and exit
-$b
-
-# The lines are different; print the first and go
-# back working on the second.
-P
-D
-@end example
-@c end---------------------------------------------
-
-As you can see, we mantain a 2-line window using @code{P} and @code{D}.
-This technique is often used in advanced @command{sed} scripts.
-
-@node uniq -d
-@section Print Duplicated Lines of Input
-
-This script prints only duplicated lines, like @samp{uniq -d}.
-
-@c start-------------------------------------------
-@example
-#!/usr/bin/sed -nf
-
-$b
-N
-/^\(.*\)\n\1$/ @{
- # Print the first of the duplicated lines
- s/.*\n//
- p
-
- # Loop until we get a different line
- :b
- $b
- N
- /^\(.*\)\n\1$/ @{
- s/.*\n//
- bb
- @}
-@}
-
-# The last line cannot be followed by duplicates
-$b
-
-# Found a different one. Leave it alone in the pattern space
-# and go back to the top, hunting its duplicates
-D
-@end example
-@c end---------------------------------------------
-
-@node uniq -u
-@section Remove All Duplicated Lines
-
-This script prints only unique lines, like @samp{uniq -u}.
-
-@c start-------------------------------------------
-@example
-#!/usr/bin/sed -f
-
-# Search for a duplicate line --- until that, print what you find.
-$b
-N
-/^\(.*\)\n\1$/ ! @{
- P
- D
-@}
-
-:c
-# Got two equal lines in pattern space. At the
-# end of the file we simply exit
-$d
-
-# Else, we keep reading lines with @code{N} until we
-# find a different one
-s/.*\n//
-N
-/^\(.*\)\n\1$/ @{
- bc
-@}
-
-# Remove the last instance of the duplicate line
-# and go back to the top
-D
-@end example
-@c end---------------------------------------------
-
-@node cat -s
-@section Squeezing Blank Lines
-
-As a final example, here are three scripts, of increasing complexity
-and speed, that implement the same function as @samp{cat -s}, that is
-squeezing blank lines.
-
-The first leaves a blank line at the beginning and end if there are
-some already.
-
-@c start-------------------------------------------
-@example
-#!/usr/bin/sed -f
-
-# on empty lines, join with next
-# Note there is a star in the regexp
-:x
-/^\n*$/ @{
-N
-bx
-@}
-
-# now, squeeze all '\n', this can be also done by:
-# s/^\(\n\)*/\1/
-s/\n*/\
-/
-@end example
-@c end---------------------------------------------
-
-This one is a bit more complex and removes all empty lines
-at the beginning. It does leave a single blank line at end
-if one was there.
-
-@c start-------------------------------------------
-@example
-#!/usr/bin/sed -f
-
-# delete all leading empty lines
-1,/^./@{
-/./!d
-@}
-
-# on an empty line we remove it and all the following
-# empty lines, but one
-:x
-/./!@{
-N
-s/^\n$//
-tx
-@}
-@end example
-@c end---------------------------------------------
-
-This removes leading and trailing blank lines. It is also the
-fastest. Note that loops are completely done with @code{n} and
-@code{b}, without relying on @command{sed} to restart the
-the script automatically at the end of a line.
-
-@c start-------------------------------------------
-@example
-#!/usr/bin/sed -nf
-
-# delete all (leading) blanks
-/./!d
-
-# get here: so there is a non empty
-:x
-# print it
-p
-# get next
-n
-# got chars? print it again, etc...
-/./bx
-
-# no, don't have chars: got an empty line
-:z
-# get next, if last line we finish here so no trailing
-# empty lines are written
-n
-# also empty? then ignore it, and get next... this will
-# remove ALL empty lines
-/./!bz
-
-# all empty lines were deleted/ignored, but we have a non empty. As
-# what we want to do is to squeeze, insert a blank line artificially
-i\
-
-bx
-@end example
-@c end---------------------------------------------
-
-@node Limitations
-@chapter @value{SSED}'s Limitations and Non-limitations
-
-@cindex @acronym{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
-limit line lengths (for the pattern and hold spaces)
-to be no more than 4000 bytes.
-The @sc{posix} standard specifies that conforming @command{sed}
-implementations shall support at least 8192 byte line lengths.
-@value{SSED} has no built-in limit on line length;
-as long as it can @code{malloc()} more (virtual) memory,
-you can feed or construct lines as long as you like.
-
-However, recursion is used to handle subpatterns and indefinite
-repetition. This means that the available stack space may limit
-the size of the buffer that can be processed by certain patterns.
-
-@ifset PERL
-There are some size limitations in the regular expression
-matcher but it is hoped that they will never in practice
-be relevant. The maximum length of a compiled pattern
-is 65539 (sic) bytes. All values in repeating quantifiers
-must be less than 65536. The maximum nesting depth of
-all parenthesized subpatterns, including capturing and
-non-capturing subpatterns@footnote{The
-distinction is meaningful when referring to Perl-style
-regular expressions.}, assertions, and other types of
-subpattern, is 200.
-
-Also, @value{SSED} recognizes the @sc{posix} syntax
-@code{[.@var{ch}.]} and @code{[=@var{ch}=]}
-where @var{ch} is a ``collating element'', but these
-are not supported, and an error is given if they are
-encountered.
-
-Here are a few distinctions between the real Perl-style
-regular expressions and those that @option{-R} recognizes.
-
-@enumerate
-@item
-Lookahead assertions do not allow repeat quantifiers after them
-Perl permits them, but they do not mean what you
-might think. For example, @samp{(?!a)@{3@}} does not assert that the
-next three characters are not @samp{a}. It just asserts three times that the
-next character is not @samp{a} --- a waste of time and nothing else.
-
-@item
-Capturing subpatterns that occur inside negative lookahead
-head assertions are counted, but their entries are counted
-as empty in the second half of an @code{s} command.
-Perl sets its numerical variables from any such patterns
-that are matched before the assertion fails to match
-something (thereby succeeding), but only if the negative
-lookahead assertion contains just one branch.
-
-@item
-The following Perl escape sequences are not supported:
-@samp{\l}, @samp{\u}, @samp{\L}, @samp{\U}, @samp{\E},
-@samp{\Q}. In fact these are implemented by Perl's general
-string-handling and are not part of its pattern matching engine.
-
-@item
-The Perl @samp{\G} assertion is not supported as it is not
-relevant to single pattern matches.
-
-@item
-Fairly obviously, @value{SSED} does not support the @samp{(?@{code@})}
-and @samp{(?p@{code@})} constructions. However, there is some experimental
-support for recursive patterns using the non-Perl item @samp{(?R)}.
-
-@item
-There are at the time of writing some oddities in Perl
-5.005_02 concerned with the settings of captured strings
-when part of a pattern is repeated. For example, matching
-@samp{aba} against the pattern @samp{/^(a(b)?)+$/} sets
-@samp{$2}@footnote{@samp{$2} would be @samp{\2} in @value{SSED}.}
-to the value @samp{b}, but matching @samp{aabbaa}
-against @samp{/^(aa(bb)?)+$/} leaves @samp{$2}
-unset. However, if the pattern is changed to
-@samp{/^(aa(b(b))?)+$/} then @samp{$2} (and @samp{$3}) are set.
-In Perl 5.004 @samp{$2} is set in both cases, and that is also
-true of @value{SSED}.
-
-@item
-Another as yet unresolved discrepancy is that in Perl
-5.005_02 the pattern @samp{/^(a)?(?(1)a|b)+$/} matches
-the string @samp{a}, whereas in @value{SSED} it does not.
-However, in both Perl and @value{SSED} @samp{/^(a)?a/} matched
-against @samp{a} leaves $1 unset.
-@end enumerate
-@end ifset
-
-@node Other Resources
-@chapter Other Resources for Learning About @command{sed}
-
-@cindex Additional reading about @command{sed}
-In addition to several books that have been written about @command{sed}
-(either specifically or as chapters in books which discuss
-shell programming), one can find out more about @command{sed}
-(including suggestions of a few books) from the FAQ
-for the @code{sed-users} mailing list, available from:
-@display
-@uref{http://sed.sourceforge.net/sedfaq.html}
-@end display
-
-Also of interest are
-@uref{http://www.student.northpark.edu/pemente/sed/index.htm}
-and @uref{http://sed.sf.net/grabbag},
-which include @command{sed} tutorials and other @command{sed}-related goodies.
-
-The @code{sed-users} mailing list itself maintained by Sven Guckes.
-To subscribe, visit @uref{http://groups.yahoo.com} and search
-for the @code{sed-users} mailing list.
-
-@node Reporting Bugs
-@chapter Reporting Bugs
-
-@cindex Bugs, reporting
-Email bug reports to @email{bug-sed@@gnu.org}.
-Also, please include the output of @samp{sed --version} in the body
-of your report if at all possible.
-
-Please do not send a bug report like this:
-
-@example
-@i{@i{@r{while building frobme-1.3.4}}}
-$ configure
-@error{} sed: file sedscr line 1: Unknown option to 's'
-@end example
-
-If @value{SSED} doesn't configure your favorite package, take a
-few extra minutes to identify the specific problem and make a stand-alone
-test case. Unlike other programs such as C compilers, making such test
-cases for @command{sed} is quite simple.
-
-A stand-alone test case includes all the data necessary to perform the
-test, and the specific invocation of @command{sed} that causes the problem.
-The smaller a stand-alone test case is, the better. A test case should
-not involve something as far removed from @command{sed} as ``try to configure
-frobme-1.3.4''. Yes, that is in principle enough information to look
-for the bug, but that is not a very practical prospect.
-
-Here are a few commonly reported bugs that are not bugs.
-
-@table @asis
-@item @code{N} command on the last line
-@cindex Portability, @code{N} command on the last line
-@cindex Non-bugs, @code{N} command on the last line
-
-Most versions of @command{sed} exit without printing anything when
-the @command{N} command is issued on the last line of a file.
-@value{SSED} prints pattern space before exiting unless of course
-the @command{-n} command switch has been specified. This choice is
-by design.
-
-For example, the behavior of
-@example
-sed N foo bar
-@end example
-@noindent
-would depend on whether foo has an even or an odd number of
-lines@footnote{which is the actual ``bug'' that prompted the
-change in behavior}. Or, when writing a script to read the
-next few lines following a pattern match, traditional
-implementations of @code{sed} would force you to write
-something like
-@example
-/foo/@{ $!N; $!N; $!N; $!N; $!N; $!N; $!N; $!N; $!N @}
-@end example
-@noindent
-instead of just
-@example
-/foo/@{ N;N;N;N;N;N;N;N;N; @}
-@end example
-
-@cindex @code{POSIXLY_CORRECT} behavior, @code{N} command
-In any case, the simplest workaround is to use @code{$d;N} in
-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 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
-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
-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}.
-
-This syntax may cause problems when running scripts written for other
-@command{sed}s. Some @command{sed} programs have been written with the
-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
-@ifset PERL
-@value{SSED} or
-@end ifset
-@acronym{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
-@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
-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},
-@code{\t}, @code{\v}, @code{\x}). These can cause similar problems
-with scripts written for other @command{sed}s.
-
-@item @option{-i} clobbers read-only files
-@cindex In-place editing
-@cindex @value{SSEDEXT}, in-place editing
-@cindex Non-bugs, in-place editing
-
-In short, @samp{sed -i} will let you delete the contents of
-a read-only file, and in general the @option{-i} option
-(@pxref{Invoking sed, , Invocation}) lets you clobber
-protected files. This is not a bug, but rather a consequence
-of how the Unix filesystem works.
-
-The permissions on a file say what can happen to the data
-in that file, while the permissions on a directory say what can
-happen to the list of files in that directory. @samp{sed -i}
-will not ever open for writing a file that is already on disk.
-Rather, it will work on a temporary file that is finally renamed
-to the original name: if you rename or delete files, you're actually
-modifying the contents of the directory, so the operation depends on
-the permissions of the directory, not of the file. For this same
-reason, @command{sed} does not let you use @option{-i} on a writeable file
-in a read-only directory, and will break hard or symbolic links when
-@option{-i} is used on such a file.
-
-@item @code{0a} does not work (gives an error)
-@cindex @code{0} address
-@cindex @acronym{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
-addresses like @code{0,/@var{RE}/} as active when the script starts: if
-you write @code{1,/abc/d} and the first line includes the word @samp{abc},
-then that match would be ignored because address ranges must span at least
-two lines (barring the end of the file); but what you probably wanted is
-to delete every line up to the first one including @samp{abc}, and this
-is obtained with @code{0,/abc/d}.
-
-@ifclear PERL
-@item @code{[a-z]} is case insensitive
-@cindex Non-bugs, localization-related
-
-You are encountering problems with locales. POSIX mandates that @code{[a-z]}
-uses the current locale's collation order -- in C parlance, that means using
-@code{strcoll(3)} instead of @code{strcmp(3)}. Some locales have a
-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,
-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
-locales, or @samp{ij} in Dutch locales.
-
-To work around these problems, which may cause bugs in shell scripts, set
-the @env{LC_COLLATE} and @env{LC_CTYPE} environment variables to @samp{C}.
-
-@item @code{s/.*//} does not clear pattern space
-@cindex Non-bugs, localization-related
-@cindex @value{SSEDEXT}, emptying pattern space
-@cindex Emptying pattern space
-
-This happens if your input stream includes invalid multibyte
-sequences. @sc{posix} mandates that such sequences
-are @emph{not} matched by @samp{.}, so that @samp{s/.*//} will not clear
-pattern space as you would expect. In fact, there is no way to clear
-sed's buffers in the middle of the script in most multibyte locales
-(including UTF-8 locales). For this reason, @value{SSED} provides a `z'
-command (for `zap') as an extension.
-
-To work around these problems, which may cause bugs in shell scripts, set
-the @env{LC_COLLATE} and @env{LC_CTYPE} environment variables to @samp{C}.
-@end ifclear
-@end table
-
-
-@node Extended regexps
-@appendix Extended regular expressions
-@cindex Extended regular expressions, syntax
-
-The only difference between basic and extended regular expressions is in
-the behavior of a few characters: @samp{?}, @samp{+}, parentheses,
-braces (@samp{@{@}}), and @samp{|}. While basic regular expressions
-require these to be escaped if you want them to behave as special
-characters, when using extended regular expressions you must escape
-them if you want them @emph{to match a literal character}. @samp{|}
-is special here because @samp{\|} is a GNU extension -- standard
-basic regular expressions do not provide its functionality.
-
-@noindent
-Examples:
-@table @code
-@item abc?
-becomes @samp{abc\?} when using extended regular expressions. It matches
-the literal string @samp{abc?}.
-
-@item c\+
-becomes @samp{c+} when using extended regular expressions. It matches
-one or more @samp{c}s.
-
-@item a\@{3,\@}
-becomes @samp{a@{3,@}} when using extended regular expressions. It matches
-three or more @samp{a}s.
-
-@item \(abc\)\@{2,3\@}
-becomes @samp{(abc)@{2,3@}} when using extended regular expressions. It
-matches either @samp{abcabc} or @samp{abcabcabc}.
-
-@item \(abc*\)\1
-becomes @samp{(abc*)\1} when using extended regular expressions.
-Backreferences must still be escaped when using extended regular
-expressions.
-@end table
-
-@ifset PERL
-@node Perl regexps
-@appendix Perl-style regular expressions
-@cindex Perl-style regular expressions, syntax
-
-@emph{This part is taken from the @file{pcre.txt} file distributed together
-with the free @sc{pcre} regular expression matcher; it was written by Philip Hazel.}
-
-Perl introduced several extensions to regular expressions, some
-of them incompatible with the syntax of regular expressions
-accepted by Emacs and other @acronym{GNU} tools (whose matcher was
-based on the Emacs matcher). @value{SSED} implements
-both kinds of extensions.
-
-@iftex
-Summarizing, we have:
-
-@itemize @bullet
-@item
-A backslash can introduce several special sequences
-
-@item
-The circumflex, dollar sign, and period characters behave specially
-with regard to new lines
-
-@item
-Strange uses of square brackets are parsed differently
-
-@item
-You can toggle modifiers in the middle of a regular expression
-
-@item
-You can specify that a subpattern does not count when numbering backreferences
-
-@item
-@cindex Greedy regular expression matching
-You can specify greedy or non-greedy matching
-
-@item
-You can have more than ten back references
-
-@item
-You can do complex look aheads and look behinds (in the spirit of
-@code{\b}, but with subpatterns).
-
-@item
-You can often improve performance by avoiding that @command{sed} wastes
-time with backtracking
-
-@item
-You can have if/then/else branches
-
-@item
-You can do recursive matches, for example to look for unbalanced parentheses
-
-@item
-You can have comments and non-significant whitespace, because things can
-get complex...
-@end itemize
-
-Most of these extensions are introduced by the special @code{(?}
-sequence, which gives special meanings to parenthesized groups.
-@end iftex
-@menu
-Other extensions can be roughly subdivided in two categories
-On one hand Perl introduces several more escaped sequences
-(that is, sequences introduced by a backslash). On the other
-hand, it specifies that if a question mark follows an open
-parentheses it should give a special meaning to the parenthesized
-group.
-
-* Backslash:: Introduces special sequences
-* Circumflex/dollar sign/period:: Behave specially with regard to new lines
-* Square brackets:: Are a bit different in strange cases
-* Options setting:: Toggle modifiers in the middle of a regexp
-* Non-capturing subpatterns:: Are not counted when backreferencing
-* Repetition:: Allows for non-greedy matching
-* Backreferences:: Allows for more than 10 back references
-* Assertions:: Allows for complex look ahead matches
-* Non-backtracking subpatterns:: Often gives more performance
-* Conditional subpatterns:: Allows if/then/else branches
-* Recursive patterns:: For example to match parentheses
-* Comments:: Because things can get complex...
-@end menu
-
-@node Backslash
-@appendixsec Backslash
-@cindex Perl-style regular expressions, escaped sequences
-
-There are a few difference in the handling of backslashed
-sequences in Perl mode.
-
-First of all, there are no @code{\o} and @code{\d} sequences.
-@sc{ascii} values for characters can be specified in octal
-with a @code{\@var{xxx}} sequence, where @var{xxx} is a
-sequence of up to three octal digits. If the first digit
-is a zero, the treatment of the sequence is straightforward;
-just note that if the character that follows the escaped digit
-is itself an octal digit, you have to supply three octal digits
-for @var{xxx}. For example @code{\07} is a @sc{bel} character
-rather than a @sc{nul} and a literal @code{7} (this sequence is
-instead represented by @code{\0007}).
-
-@cindex Perl-style regular expressions, backreferences
-The handling of a backslash followed by a digit other than 0
-is complicated. Outside a character class, @command{sed} reads it
-and any following digits as a decimal number. If the number
-is less than 10, or if there have been at least that many
-previous capturing left parentheses in the expression, the
-entire sequence is taken as a back reference. A description
-of how this works is given later, following the discussion
-of parenthesized subpatterns.
-
-Inside a character class, or if the decimal number is
-greater than 9 and there have not been that many capturing
-subpatterns, @command{sed} re-reads up to three octal digits following
-the backslash, and generates a single byte from the
-least significant 8 bits of the value. Any subsequent digits
-stand for themselves. For example:
-
-@example
-\040 @i{@r{is another way of writing a space}}
-\40 @i{@r{is the same, provided there are fewer than 40}}
- @i{@r{previous capturing subpatterns}}
-\7 @i{@r{is always a back reference}}
-\011 @i{@r{is always a tab}}
-\11 @i{@r{might be a back reference, or another way of writing a tab}}
-\0113 @i{@r{is a tab followed by the character @samp{3}}}
-\113 @i{@r{is the character with octal code 113 (since there}}
- @i{@r{can be no more than 99 back references)}}
-\377 @i{@r{is a byte consisting entirely of 1 bits (@sc{ascii} 255)}}
-\81 @i{@r{is either a back reference, or a binary zero}}
- @i{@r{followed by the two characters @samp{81}}}
-@end example
-
-Note that octal values of 100 or greater must not be introduced
-by a leading zero, because no more than three octal
-digits are ever read. Note that this applies only to the LHS
-pattern; it is not possible yet to specify more than 9 backreferences
-on the RHS of the `s' command.
-
-All the sequences that define a single byte value can be
-used both inside and outside character classes. In addition,
-inside a character class, the sequence @code{\b} is interpreted
-as the backspace character (hex 08). Outside a character
-class it has a different meaning (see below).
-
-In addition, there are four additional escapes specifying
-generic character classes (like @code{\w} and @code{\W} do):
-
-@cindex Perl-style regular expressions, character classes
-@table @samp
-@item \d
-Matches any decimal digit
-
-@item \D
-Matches any character that is not a decimal digit
-@end table
-
-In Perl mode, these character type sequences can appear both inside and
-outside character classes. Instead, in @sc{posix} mode these sequences
-(as well as @code{\w} and @code{\W}) are treated as two literal characters
-(a backslash and a letter) inside square brackets.
-
-Escaped sequences specifying assertions are also different in
-Perl mode. An assertion specifies a condition that has to be met
-at a particular point in a match, without consuming any
-characters from the subject string. The use of subpatterns
-for more complicated assertions is described below. The
-backslashed assertions are
-
-@cindex Perl-style regular expressions, assertions
-@table @samp
-@item \b
-Asserts that the point is at a word boundary.
-A word boundary is a position in the subject string where
-the current character and the previous character do not both
-match @code{\w} or @code{\W} (i.e. one matches @code{\w} and
-the other matches @code{\W}), or the start or end of the string
-if the first or last character matches @code{\w}, respectively.
-
-@item \B
-Asserts that the point is not at a word boundary.
-
-@item \A
-Asserts the matcher is at the start of pattern space (independent
-of multiline mode).
-
-@item \Z
-Asserts the matcher is at the end of pattern space,
-or at a newline before the end of pattern space (independent of
-multiline mode)
-
-@item \z
-Asserts the matcher is at the end of pattern space (independent
-of multiline mode)
-@end table
-
-These assertions may not appear in character classes (but
-note that @code{\b} has a different meaning, namely the
-backspace character, inside a character class).
-Note that Perl mode does not support directly assertions
-for the beginning and the end of word; the @acronym{GNU} extensions
-@code{\<} and @code{\>} achieve this purpose in @sc{posix} mode
-instead.
-
-The @code{\A}, @code{\Z}, and @code{\z} assertions differ
-from the traditional circumflex and dollar sign (described below)
-in that they only ever match at the very start and end of the
-subject string, whatever options are set; in particular @code{\A}
-and @code{\z} are the same as the @acronym{GNU} extensions
-@code{\`} and @code{\'} that are active in @sc{posix} mode.
-
-@node Circumflex/dollar sign/period
-@appendixsec Circumflex, dollar sign, period
-@cindex Perl-style regular expressions, newlines
-
-Outside a character class, in the default matching mode, the
-circumflex character is an assertion which is true only if
-the current matching point is at the start of the subject
-string. Inside a character class, the circumflex has an entirely
-different meaning (see below).
-
-The circumflex need not be the first character of the pattern if
-a number of alternatives are involved, but it should be the
-first thing in each alternative in which it appears if the
-pattern is ever to match that branch. If all possible alternatives,
-start with a circumflex, that is, if the pattern is
-constrained to match only at the start of the subject, it is
-said to be an @dfn{anchored} pattern. (There are also other constructs
-structs that can cause a pattern to be anchored.)
-
-A dollar sign is an assertion which is true only if the
-current matching point is at the end of the subject string,
-or immediately before a newline character that is the last
-character in the string (by default). A dollar sign need not be the
-last character of the pattern if a number of alternatives
-are involved, but it should be the last item in any branch
-in which it appears. A dollar sign has no special meaning in a
-character class.
-
-@cindex Perl-style regular expressions, multiline
-The meanings of the circumflex and dollar sign characters are
-changed if the @code{M} modifier option is used. When this is
-the case, they match immediately after and immediately
-before an internal @code{\n} character, respectively, in addition
-to matching at the start and end of the subject string. For
-example, the pattern @code{/^abc$/} matches the subject string
-@samp{def\nabc} in multiline mode, but not otherwise. Consequently,
-patterns that are anchored in single line mode
-because all branches start with @code{^} are not anchored in
-multiline mode.
-
-@cindex Perl-style regular expressions, multiline
-Note that the sequences @code{\A}, @code{\Z}, and @code{\z}
-can be used to match the start and end of the subject in both
-modes, and if all branches of a pattern start with @code{\A}
-is it always anchored, whether the @code{M} modifier is set or not.
-
-@cindex Perl-style regular expressions, single line
-Outside a character class, a dot in the pattern matches any
-one character in the subject, including a non-printing character,
-but not (by default) newline. If the @code{S} modifier is used,
-dots match newlines as well. Actually, the handling of
-dot is entirely independent of the handling of circumflex
-and dollar sign, the only relationship being that they both
-involve newline characters. Dot has no special meaning in a
-character class.
-
-@node Square brackets
-@appendixsec Square brackets
-@cindex Perl-style regular expressions, character classes
-
-An opening square bracket introduces a character class, terminated
-by a closing square bracket. A closing square bracket on its own
-is not special. If a closing square bracket is required as a
-member of the class, it should be the first data character in
-the class (after an initial circumflex, if present) or escaped with a backslash.
-
-A character class matches a single character in the subject;
-the character must be in the set of characters defined by
-the class, unless the first character in the class is a circumflex,
-in which case the subject character must not be in
-the set defined by the class. If a circumflex is actually
-required as a member of the class, ensure it is not the
-first character, or escape it with a backslash.
-
-For example, the character class [aeiou] matches any lower
-case vowel, while [^aeiou] matches any character that is not
-a lower case vowel. Note that a circumflex is just a convenient
-venient notation for specifying the characters which are in
-the class by enumerating those that are not. It is not an
-assertion: it still consumes a character from the subject
-string, and fails if the current pointer is at the end of
-the string.
-
-@cindex Perl-style regular expressions, case-insensitive
-When caseless matching is set, any letters in a class
-represent both their upper case and lower case versions, so
-for example, a caseless @code{[aeiou]} matches uppercase
-and lowercase @samp{A}s, and a caseless @code{[^aeiou]}
-does not match @samp{A}, whereas a case-sensitive version would.
-
-@cindex Perl-style regular expressions, single line
-@cindex Perl-style regular expressions, multiline
-The newline character is never treated in any special way in
-character classes, whatever the setting of the @code{S} and
-@code{M} options (modifiers) is. A class such as @code{[^a]} will
-always match a newline.
-
-The minus (hyphen) character can be used to specify a range
-of characters in a character class. For example, @code{[d-m]}
-matches any letter between d and m, inclusive. If a minus
-character is required in a class, it must be escaped with a
-backslash or appear in a position where it cannot be interpreted
-as indicating a range, typically as the first or last
-character in the class.
-
-It is not possible to have the literal character @code{]} as the
-end character of a range. A pattern such as @code{[W-]46]} is
-interpreted as a class of two characters (@code{W} and @code{-})
-followed by a literal string @code{46]}, so it would match
-@samp{W46]} or @samp{-46]}. However, if the @code{]} is escaped
-with a backslash it is interpreted as the end of range, so
-@code{[W-\]46]} is interpreted as a single class containing a
-range followed by two separate characters. The octal or
-hexadecimal representation of @code{]} can also be used to end a range.
-
-Ranges operate in @sc{ascii} collating sequence. They can also be
-used for characters specified numerically, for example
-@code{[\000-\037]}. If a range that includes letters is used when
-caseless matching is set, it matches the letters in either
-case. For example, a caseless @code{[W-c]} is equivalent to
-@code{[][\^_`wxyzabc]}, matched caselessly, and if character
-tables for the French locale are in use, @code{[\xc8-\xcb]}
-matches accented E characters in both cases.
-
-Unlike in @sc{posix} mode, the character types @code{\d},
-@code{\D}, @code{\s}, @code{\S}, @code{\w}, and @code{\W}
-may also appear in a character class, and add the characters
-that they match to the class. For example, @code{[\dABCDEF]} matches any
-hexadecimal digit. A circumflex can conveniently be used
-with the upper case character types to specify a more restricted
-set of characters than the matching lower case type.
-For example, the class @code{[^\W_]} matches any letter or digit,
-but not underscore.
-
-All non-alphameric characters other than @code{\}, @code{-},
-@code{^} (at the start) and the terminating @code{]}
-are non-special in character classes, but it does no harm
-if they are escaped.
-
-Perl 5.6 supports the @sc{posix} notation for character classes, which
-uses names enclosed by @code{[:} and @code{:]} within the enclosing
-square brackets, and @value{SSED} supports this notation as well.
-For example,
-
-@example
-[01[:alpha:]%]
-@end example
-
-@noindent
-matches @samp{0}, @samp{1}, any alphabetic character, or @samp{%}.
-The supported class names are
-
-@table @code
-@item alnum
-Matches letters and digits
-
-@item alpha
-Matches letters
-
-@item ascii
-Matches character codes 0 - 127
-
-@item cntrl
-Matches control characters
-
-@item digit
-Matches decimal digits (same as \d)
-
-@item graph
-Matches printing characters, excluding space
-
-@item lower
-Matches lower case letters
-
-@item print
-Matches printing characters, including space
-
-@item punct
-Matches printing characters, excluding letters and digits
-
-@item space
-Matches white space (same as \s)
-
-@item upper
-Matches upper case letters
-
-@item word
-Matches ``word'' characters (same as \w)
-
-@item xdigit
-Matches hexadecimal digits
-@end table
-
-The names @code{ascii} and @code{word} are extensions valid only in
-Perl mode. Another Perl extension is negation, which is
-indicated by a circumflex character after the colon. For example,
-
-@example
-[12[:^digit:]]
-@end example
-
-@noindent
-matches @samp{1}, @samp{2}, or any non-digit.
-
-@node Options setting
-@appendixsec Options setting
-@cindex Perl-style regular expressions, toggling options
-@cindex Perl-style regular expressions, case-insensitive
-@cindex Perl-style regular expressions, multiline
-@cindex Perl-style regular expressions, single line
-@cindex Perl-style regular expressions, extended
-
-The settings of the @code{I}, @code{M}, @code{S}, @code{X}
-modifiers can be changed from within the pattern by
-a sequence of Perl option letters enclosed between @code{(?}
-and @code{)}. The option letters must be lowercase.
-
-For example, @code{(?im)} sets caseless, multiline matching. It is
-also possible to unset these options by preceding the letter
-with a hyphen; you can also have combined settings and unsettings:
-@code{(?im-sx)} sets caseless and multiline matching,
-while unsets single line matching (for dots) and extended
-whitespace interpretation. If a letter appears both before
-and after the hyphen, the option is unset.
-
-The scope of these option changes depends on where in the
-pattern the setting occurs. For settings that are outside
-any subpattern (defined below), the effect is the same as if
-the options were set or unset at the start of matching. The
-following patterns all behave in exactly the same way:
-
-@example
-(?i)abc
-a(?i)bc
-ab(?i)c
-abc(?i)
-@end example
-
-which in turn is the same as specifying the pattern abc with
-the @code{I} modifier. In other words, ``top level'' settings
-apply to the whole pattern (unless there are other
-changes inside subpatterns). If there is more than one setting
-of the same option at top level, the rightmost setting
-is used.
-
-If an option change occurs inside a subpattern, the effect
-is different. This is a change of behaviour in Perl 5.005.
-An option change inside a subpattern affects only that part
-of the subpattern @emph{that follows} it, so
-
-@example
-(a(?i)b)c
-@end example
-
-@noindent
-matches abc and aBc and no other strings (assuming
-case-sensitive matching is used). By this means, options can
-be made to have different settings in different parts of the
-pattern. Any changes made in one alternative do carry on
-into subsequent branches within the same subpattern. For
-example,
-
-@example
-(a(?i)b|c)
-@end example
-
-@noindent
-matches @samp{ab}, @samp{aB}, @samp{c}, and @samp{C},
-even though when matching @samp{C} the first branch is
-abandoned before the option setting.
-This is because the effects of option settings happen at
-compile time. There would be some very weird behaviour otherwise.
-
-@ignore
-There are two PCRE-specific options PCRE_UNGREEDY and PCRE_EXTRA
-that can be changed in the same way as the Perl-compatible options by
-using the characters U and X respectively. The (?X) flag
-setting is special in that it must always occur earlier in
-the pattern than any of the additional features it turns on,
-even when it is at top level. It is best put at the start.
-@end ignore
-
-
-@node Non-capturing subpatterns
-@appendixsec Non-capturing subpatterns
-@cindex Perl-style regular expressions, non-capturing subpatterns
-
-Marking part of a pattern as a subpattern does two things.
-On one hand, it localizes a set of alternatives; on the other
-hand, it sets up the subpattern as a capturing subpattern (as
-defined above). The subpattern can be backreferenced and
-referenced in the right side of @code{s} commands.
-
-For example, if the string @samp{the red king} is matched against
-the pattern
-
-@example
-the ((red|white) (king|queen))
-@end example
-
-@noindent
-the captured substrings are @samp{red king}, @samp{red},
-and @samp{king}, and are numbered 1, 2, and 3.
-
-The fact that plain parentheses fulfil two functions is not
-always helpful. There are often times when a grouping
-subpattern is required without a capturing requirement. If an
-opening parenthesis is followed by @code{?:}, the subpattern does
-not do any capturing, and is not counted when computing the
-number of any subsequent capturing subpatterns. For example,
-if the string @samp{the white queen} is matched against the pattern
-
-@example
-the ((?:red|white) (king|queen))
-@end example
-
-@noindent
-the captured substrings are @samp{white queen} and @samp{queen},
-and are numbered 1 and 2. The maximum number of captured
-substrings is 99, while the maximum number of all subpatterns,
-both capturing and non-capturing, is 200.
-
-As a convenient shorthand, if any option settings are
-equired at the start of a non-capturing subpattern, the
-option letters may appear between the @code{?} and the
-@code{:}. Thus the two patterns
-
-@example
-(?i:saturday|sunday)
-(?:(?i)saturday|sunday)
-@end example
-
-@noindent
-match exactly the same set of strings. Because alternative
-branches are tried from left to right, and options are not
-reset until the end of the subpattern is reached, an option
-setting in one branch does affect subsequent branches, so
-the above patterns match @samp{SUNDAY} as well as @samp{Saturday}.
-
-
-@node Repetition
-@appendixsec Repetition
-@cindex Perl-style regular expressions, repetitions
-
-Repetition is specified by quantifiers, which can follow any
-of the following items:
-
-@itemize @bullet
-@item
-a single character, possibly escaped
-
-@item
-the @code{.} special character
-
-@item
-a character class
-
-@item
-a back reference (see next section)
-
-@item
-a parenthesized subpattern (unless it is an assertion; @pxref{Assertions})
-@end itemize
-
-The general repetition quantifier specifies a minimum and
-maximum number of permitted matches, by giving the two
-numbers in curly brackets (braces), separated by a comma.
-The numbers must be less than 65536, and the first must be
-less than or equal to the second. For example:
-
-@example
-z@{2,4@}
-@end example
-
-@noindent
-matches @samp{zz}, @samp{zzz}, or @samp{zzzz}. A closing brace on its own
-is not a special character. If the second number is omitted,
-but the comma is present, there is no upper limit; if the
-second number and the comma are both omitted, the quantifier
-specifies an exact number of required matches. Thus
-
-@example
-[aeiou]@{3,@}
-@end example
-
-@noindent
-matches at least 3 successive vowels, but may match many
-more, while
-
-@example
-\d@{8@}
-@end example
-
-@noindent
-matches exactly 8 digits. An opening curly bracket that
-appears in a position where a quantifier is not allowed, or
-one that does not match the syntax of a quantifier, is taken
-as a literal character. For example, @{,6@} is not a quantifier,
-but a literal string of four characters.@footnote{It
-raises an error if @option{-R} is not used.}
-
-The quantifier @samp{@{0@}} is permitted, causing the expression to
-behave as if the previous item and the quantifier were not
-present.
-
-For convenience (and historical compatibility) the three
-most common quantifiers have single-character abbreviations:
-
-@table @code
-@item *
-is equivalent to @{0,@}
-
-@item +
-is equivalent to @{1,@}
-
-@item ?
-is equivalent to @{0,1@}
-@end table
-
-It is possible to construct infinite loops by following a
-subpattern that can match no characters with a quantifier
-that has no upper limit, for example:
-
-@example
-(a?)*
-@end example
-
-Earlier versions of Perl used to give an error at
-compile time for such patterns. However, because there are
-cases where this can be useful, such patterns are now
-accepted, but if any repetition of the subpattern does in
-fact match no characters, the loop is forcibly broken.
-
-@cindex Greedy regular expression matching
-@cindex Perl-style regular expressions, stingy repetitions
-By default, the quantifiers are @dfn{greedy} like in @sc{posix}
-mode, that is, they match as much as possible (up to the maximum
-number of permitted times), without causing the rest of the
-pattern to fail. The classic example of where this gives problems
-is in trying to match comments in C programs. These appear between
-the sequences @code{/*} and @code{*/} and within the sequence, individual
-@code{*} and @code{/} characters may appear. An attempt to match C
-comments by applying the pattern
-
-@example
-/\*.*\*/
-@end example
-
-@noindent
-to the string
-
-@example
-/* first command */ not comment /* second comment */
-@end example
-
-@noindent
-
-fails, because it matches the entire string owing to the
-greediness of the @code{.*} item.
-
-However, if a quantifier is followed by a question mark, it
-ceases to be greedy, and instead matches the minimum number
-of times possible, so the pattern @code{/\*.*?\*/}
-does the right thing with the C comments. The meaning of the
-various quantifiers is not otherwise changed, just the preferred
-number of matches. Do not confuse this use of question
-mark with its use as a quantifier in its own right.
-Because it has two uses, it can sometimes appear doubled, as in
-
-@example
-\d??\d
-@end example
-
-which matches one digit by preference, but can match two if
-that is the only way the rest of the pattern matches.
-
-Note that greediness does not matter when specifying addresses,
-but can be nevertheless used to improve performance.
-
-@ignore
-If the PCRE_UNGREEDY option is set (an option which is not
-available in Perl), the quantifiers are not greedy by
-default, but individual ones can be made greedy by following
-them with a question mark. In other words, it inverts the
-default behaviour.
-@end ignore
-
-When a parenthesized subpattern is quantified with a minimum
-repeat count that is greater than 1 or with a limited maximum,
-more store is required for the compiled pattern, in
-proportion to the size of the minimum or maximum.
-
-@cindex Perl-style regular expressions, single line
-If a pattern starts with @code{.*} or @code{.@{0,@}} and the
-@code{S} modifier is used, the pattern is implicitly anchored,
-because whatever follows will be tried against every character
-position in the subject string, so there is no point in
-retrying the overall match at any position after the first.
-PCRE treats such a pattern as though it were preceded by \A.
-
-When a capturing subpattern is repeated, the value captured
-is the substring that matched the final iteration. For example,
-after
-
-@example
-(tweedle[dume]@{3@}\s*)+
-@end example
-
-@noindent
-has matched @samp{tweedledum tweedledee} the value of the
-captured substring is @samp{tweedledee}. However, if there are
-nested capturing subpatterns, the corresponding captured
-values may have been set in previous iterations. For example,
-after
-
-@example
-/(a|(b))+/
-@end example
-
-matches @samp{aba}, the value of the second captured substring is
-@samp{b}.
-
-@node Backreferences
-@appendixsec Backreferences
-@cindex Perl-style regular expressions, backreferences
-
-Outside a character class, a backslash followed by a digit
-greater than 0 (and possibly further digits) is a back
-reference to a capturing subpattern earlier (i.e. to its
-left) in the pattern, provided there have been that many
-previous capturing left parentheses.
-
-However, if the decimal number following the backslash is
-less than 10, it is always taken as a back reference, and
-causes an error only if there are not that many capturing
-left parentheses in the entire pattern. In other words, the
-parentheses that are referenced need not be to the left of
-the reference for numbers less than 10. @ref{Backslash}
-for further details of the handling of digits following a backslash.
-
-A back reference matches whatever actually matched the capturing
-subpattern in the current subject string, rather than
-anything matching the subpattern itself. So the pattern
-
-@example
-(sens|respons)e and \1ibility
-@end example
-
-@noindent
-matches @samp{sense and sensibility} and @samp{response and responsibility},
-but not @samp{sense and responsibility}. If caseful
-matching is in force at the time of the back reference, the
-case of letters is relevant. For example,
-
-@example
-((?i)blah)\s+\1
-@end example
-
-@noindent
-matches @samp{blah blah} and @samp{Blah Blah}, but not
-@samp{BLAH blah}, even though the original capturing
-subpattern is matched caselessly.
-
-There may be more than one back reference to the same subpattern.
-Also, if a subpattern has not actually been used in a
-particular match, any back references to it always fail. For
-example, the pattern
-
-@example
-(a|(bc))\2
-@end example
-
-@noindent
-always fails if it starts to match @samp{a} rather than
-@samp{bc}. Because there may be up to 99 back references, all
-digits following the backslash are taken as part of a potential
-back reference number; this is different from what happens
-in @sc{posix} mode. If the pattern continues with a digit
-character, some delimiter must be used to terminate the back
-reference. If the @code{X} modifier option is set, this can be
-whitespace. Otherwise an empty comment can be used, or the
-following character can be expressed in hexadecimal or octal.
-Note that this applies only to the LHS pattern; it is
-not possible yet to specify more than 9 backreferences on the
-RHS of the `s' command.
-
-A back reference that occurs inside the parentheses to which
-it refers fails when the subpattern is first used, so, for
-example, @code{(a\1)} never matches. However, such references
-can be useful inside repeated subpatterns. For example, the
-pattern
-
-@example
-(a|b\1)+
-@end example
-
-@noindent
-matches any number of @samp{a}s and also @samp{aba}, @samp{ababbaa},
-etc. At each iteration of the subpattern, the back reference matches
-the character string corresponding to the previous iteration. In
-order for this to work, the pattern must be such that the first
-iteration does not need to match the back reference. This can be
-done using alternation, as in the example above, or by a
-quantifier with a minimum of zero.
-
-@node Assertions
-@appendixsec Assertions
-@cindex Perl-style regular expressions, assertions
-@cindex Perl-style regular expressions, asserting subpatterns
-
-An assertion is a test on the characters following or
-preceding the current matching point that does not actually
-consume any characters. The simple assertions coded as @code{\b},
-@code{\B}, @code{\A}, @code{\Z}, @code{\z}, @code{^} and @code{$}
-are described above. More complicated assertions are coded as
-subpatterns. There are two kinds: those that look ahead of the
-current position in the subject string, and those that look behind it.
-
-@cindex Perl-style regular expressions, lookahead subpatterns
-An assertion subpattern is matched in the normal way, except
-that it does not cause the current matching position to be
-changed. Lookahead assertions start with @code{(?=} for positive
-assertions and @code{(?!} for negative assertions. For example,
-
-@example
-\w+(?=;)
-@end example
-
-@noindent
-matches a word followed by a semicolon, but does not include
-the semicolon in the match, and
-
-@example
-foo(?!bar)
-@end example
-
-@noindent
-matches any occurrence of @samp{foo} that is not followed by
-@samp{bar}.
-
-Note that the apparently similar pattern
-
-@example
-(?!foo)bar
-@end example
-
-@noindent
-@cindex Perl-style regular expressions, lookbehind subpatterns
-finds any occurrence of @samp{bar} even if it is preceded by
-@samp{foo}, because the assertion @code{(?!foo)} is always true
-when the next three characters are @samp{bar}. A lookbehind
-assertion is needed to achieve this effect.
-Lookbehind assertions start with @code{(?<=} for positive
-assertions and @code{(?<!} for negative assertions. So,
-
-@example
-(?<!foo)bar
-@end example
-
-achieves the required effect of finding an occurrence of
-@samp{bar} that is not preceded by @samp{foo}. The contents of a
-lookbehind assertion are restricted
-such that all the strings it matches must have a fixed
-length. However, if there are several alternatives, they do
-not all have to have the same fixed length. This is an extension
-compared with Perl 5.005, which requires all branches to match
-the same length of string. Thus
-
-@example
-(?<=dogs|cats|)
-@end example
-
-@noindent
-is permitted, but the apparently equivalent regular expression
-
-@example
-(?<!dogs?|cats?)
-@end example
-
-@noindent
-causes an error at compile time. Branches that match different
-length strings are permitted only at the top level of
-a lookbehind assertion: an assertion such as
-
-@example
-(?<=ab(c|de))
-@end example
-
-@noindent
-is not permitted, because its single top-level branch can
-match two different lengths, but it is acceptable if rewritten
-to use two top-level branches:
-
-@example
-(?<=abc|abde)
-@end example
-
-All this is required because lookbehind assertions simply
-move the current position back by the alternative's fixed
-width and then try to match. If there are
-insufficient characters before the current position, the
-match is deemed to fail. Lookbehinds, in conjunction with
-non-backtracking subpatterns can be particularly useful for
-matching at the ends of strings; an example is given at the end
-of the section on non-backtracking subpatterns.
-
-Several assertions (of any sort) may occur in succession.
-For example,
-
-@example
-(?<=\d@{3@})(?<!999)foo
-@end example
-
-@noindent
-matches @samp{foo} preceded by three digits that are not @samp{999}.
-Notice that each of the assertions is applied independently
-at the same point in the subject string. First there is a
-check that the previous three characters are all digits, and
-then there is a check that the same three characters are not
-@samp{999}. This pattern does not match @samp{foo} preceded by six
-characters, the first of which are digits and the last three
-of which are not @samp{999}. For example, it doesn't match
-@samp{123abcfoo}. A pattern to do that is
-
-@example
-(?<=\d@{3@}...)(?<!999)foo
-@end example
-
-@noindent
-This time the first assertion looks at the preceding six
-characters, checking that the first three are digits, and
-then the second assertion checks that the preceding three
-characters are not @samp{999}. Actually, assertions can be
-nested in any combination, so one can write this as
-
-@example
-(?<=\d@{3@}(?!999)...)foo
-@end example
-
-or
-
-@example
-(?<=\d@{3@}...(?<!999))foo
-@end example
-
-@noindent
-both of which might be considered more readable.
-
-Assertion subpatterns are not capturing subpatterns, and may
-not be repeated, because it makes no sense to assert the
-same thing several times. If any kind of assertion contains
-capturing subpatterns within it, these are counted for the
-purposes of numbering the capturing subpatterns in the whole
-pattern. However, substring capturing is carried out only
-for positive assertions, because it does not make sense for
-negative assertions.
-
-Assertions count towards the maximum of 200 parenthesized
-subpatterns.
-
-@node Non-backtracking subpatterns
-@appendixsec Non-backtracking subpatterns
-@cindex Perl-style regular expressions, non-backtracking subpatterns
-
-With both maximizing and minimizing repetition, failure of
-what follows normally causes the repeated item to be evaluated
-again to see if a different number of repeats allows the
-rest of the pattern to match. Sometimes it is useful to
-prevent this, either to change the nature of the match, or
-to cause it fail earlier than it otherwise might, when the
-author of the pattern knows there is no point in carrying
-on.
-
-Consider, for example, the pattern @code{\d+foo} when applied to
-the subject line
-
-@example
-123456bar
-@end example
-
-After matching all 6 digits and then failing to match @samp{foo},
-the normal action of the matcher is to try again with only 5
-digits matching the @code{\d+} item, and then with 4, and so on,
-before ultimately failing. Non-backtracking subpatterns
-provide the means for specifying that once a portion of the
-pattern has matched, it is not to be re-evaluated in this way,
-so the matcher would give up immediately on failing to match
-@samp{foo} the first time. The notation is another kind of special
-parenthesis, starting with @code{(?>} as in this example:
-
-@example
-(?>\d+)bar
-@end example
-
-This kind of parenthesis ``locks up'' the part of the pattern
-it contains once it has matched, and a failure further into
-the pattern is prevented from backtracking into it.
-Backtracking past it to previous items, however, works as
-normal.
-
-Non-backtracking subpatterns are not capturing subpatterns. Simple
-cases such as the above example can be thought of as a maximizing
-repeat that must swallow everything it can. So,
-while both @code{\d+} and @code{\d+?} are prepared to adjust the number of
-digits they match in order to make the rest of the pattern
-match, @code{(?>\d+)} can only match an entire sequence of digits.
-
-This construction can of course contain arbitrarily complicated
-subpatterns, and it can be nested.
-
-@cindex Perl-style regular expressions, lookbehind subpatterns
-Non-backtracking subpatterns can be used in conjunction with look-behind
-assertions to specify efficient matching at the end
-of the subject string. Consider a simple pattern such as
-
-@example
-abcd$
-@end example
-
-@noindent
-when applied to a long string which does not match. Because
-matching proceeds from left to right, @command{sed} will look for
-each @samp{a} in the subject and then see if what follows matches
-the rest of the pattern. If the pattern is specified as
-
-@example
-^.*abcd$
-@end example
-
-@noindent
-the initial @code{.*} matches the entire string at first, but when
-this fails (because there is no following @samp{a}), it backtracks
-to match all but the last character, then all but the
-last two characters, and so on. Once again the search for
-@samp{a} covers the entire string, from right to left, so we are
-no better off. However, if the pattern is written as
-
-@example
-^(?>.*)(?<=abcd)
-@end example
-
-there can be no backtracking for the .* item; it can match
-only the entire string. The subsequent lookbehind assertion
-does a single test on the last four characters. If it fails,
-the match fails immediately. For long strings, this approach
-makes a significant difference to the processing time.
-
-When a pattern contains an unlimited repeat inside a subpattern
-that can itself be repeated an unlimited number of
-times, the use of a once-only subpattern is the only way to
-avoid some failing matches taking a very long time
-indeed.@footnote{Actually, the matcher embedded in @value{SSED}
-tries to do something for this in the simplest cases,
-like @code{([^b]*b)*}. These cases are actually quite
-common: they happen for example in a regular expression
-like @code{\/\*([^*]*\*)*\/} which matches C comments.}
-
-The pattern
-
-@example
-(\D+|<\d+>)*[!?]
-@end example
-
-([^0-9<]+<(\d+>)?)*[!?]
-
-@noindent
-matches an unlimited number of substrings that either consist
-of non-digits, or digits enclosed in angular brackets, followed by
-an exclamation or question mark. When it matches, it runs quickly.
-However, if it is applied to
-
-@example
-aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
-@end example
-
-@noindent
-it takes a long time before reporting failure. This is
-because the string can be divided between the two repeats in
-a large number of ways, and all have to be tried.@footnote{The
-example used @code{[!?]} rather than a single character at the end,
-because both @value{SSED} and Perl have an optimization that allows
-for fast failure when a single character is used. They
-remember the last single character that is required for a
-match, and fail early if it is not present in the string.}
-
-If the pattern is changed to
-
-@example
-((?>\D+)|<\d+>)*[!?]
-@end example
-
-sequences of non-digits cannot be broken, and failure happens
-quickly.
-
-@node Conditional subpatterns
-@appendixsec Conditional subpatterns
-@cindex Perl-style regular expressions, conditional subpatterns
-
-It is possible to cause the matching process to obey a subpattern
-conditionally or to choose between two alternative
-subpatterns, depending on the result of an assertion, or
-whether a previous capturing subpattern matched or not. The
-two possible forms of conditional subpattern are
-
-@example
-(?(@var{condition})@var{yes-pattern})
-(?(@var{condition})@var{yes-pattern}|@var{no-pattern})
-@end example
-
-If the condition is satisfied, the yes-pattern is used; otherwise
-the no-pattern (if present) is used. If there are more than two
-alternatives in the subpattern, a compile-time error occurs.
-
-There are two kinds of condition. If the text between the
-parentheses consists of a sequence of digits, the condition
-is satisfied if the capturing subpattern of that number has
-previously matched. The number must be greater than zero.
-Consider the following pattern, which contains non-significant
-white space to make it more readable (assume the @code{X} modifier)
-and to divide it into three parts for ease of discussion:
-
-@example
-( \( )? [^()]+ (?(1) \) )
-@end example
-
-The first part matches an optional opening parenthesis, and
-if that character is present, sets it as the first captured
-substring. The second part matches one or more characters
-that are not parentheses. The third part is a conditional
-subpattern that tests whether the first set of parentheses
-matched or not. If they did, that is, if subject started
-with an opening parenthesis, the condition is true, and so
-the yes-pattern is executed and a closing parenthesis is
-required. Otherwise, since no-pattern is not present, the
-subpattern matches nothing. In other words, this pattern
-matches a sequence of non-parentheses, optionally enclosed
-in parentheses.
-
-@cindex Perl-style regular expressions, lookahead subpatterns
-If the condition is not a sequence of digits, it must be an
-assertion. This may be a positive or negative lookahead or
-lookbehind assertion. Consider this pattern, again containing
-non-significant white space, and with the two alternatives
-on the second line:
-
-@example
-(?(?=...[a-z])
- \d\d-[a-z]@{3@}-\d\d |
- \d\d-\d\d-\d\d )
-@end example
-
-The condition is a positive lookahead assertion that matches
-a letter that is three characters away from the current point.
-If a letter is found, the subject is matched against the first
-alternative @samp{@var{dd}-@var{aaa}-@var{dd}} (where @var{aaa} are
-letters and @var{dd} are digits); otherwise it is matched against
-the second alternative, @samp{@var{dd}-@var{dd}-@var{dd}}.
-
-
-@node Recursive patterns
-@appendixsec Recursive patterns
-@cindex Perl-style regular expressions, recursive patterns
-@cindex Perl-style regular expressions, recursion
-
-Consider the problem of matching a string in parentheses,
-allowing for unlimited nested parentheses. Without the use
-of recursion, the best that can be done is to use a pattern
-that matches up to some fixed depth of nesting. It is not
-possible to handle an arbitrary nesting depth. Perl 5.6 has
-provided an experimental facility that allows regular
-expressions to recurse (amongst other things). It does this
-by interpolating Perl code in the expression at run time,
-and the code can refer to the expression itself. A Perl pattern
-tern to solve the parentheses problem can be created like
-this:
-
-@example
-$re = qr@{\( (?: (?>[^()]+) | (?p@{$re@}) )* \)@}x;
-@end example
-
-The @code{(?p@{...@})} item interpolates Perl code at run time,
-and in this case refers recursively to the pattern in which it
-appears. Obviously, @command{sed} cannot support the interpolation of
-Perl code. Instead, the special item @code{(?R)} is provided for
-the specific case of recursion. This pattern solves the
-parentheses problem (assume the @code{X} modifier option is used
-so that white space is ignored):
-
-@example
-\( ( (?>[^()]+) | (?R) )* \)
-@end example
-
-First it matches an opening parenthesis. Then it matches any
-number of substrings which can either be a sequence of
-non-parentheses, or a recursive match of the pattern itself
-(i.e. a correctly parenthesized substring). Finally there is
-a closing parenthesis.
-
-This particular example pattern contains nested unlimited
-repeats, and so the use of a non-backtracking subpattern for
-matching strings of non-parentheses is important when applying
-the pattern to strings that do not match. For example, when
-it is applied to
-
-@example
-(aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa()
-@end example
-
-it yields a ``no match'' response quickly. However, if a
-standard backtracking subpattern is not used, the match runs
-for a very long time indeed because there are so many different
-ways the @code{+} and @code{*} repeats can carve up the subject,
-and all have to be tested before failure can be reported.
-
-The values set for any capturing subpatterns are those from
-the outermost level of the recursion at which the subpattern
-value is set. If the pattern above is matched against
-
-@example
-(ab(cd)ef)
-@end example
-
-@noindent
-the value for the capturing parentheses is @samp{ef}, which is
-the last value taken on at the top level.
-
-@node Comments
-@appendixsec Comments
-@cindex Perl-style regular expressions, comments
-
-The sequence (?# marks the start of a comment which continues
-ues up to the next closing parenthesis. Nested parentheses
-are not permitted. The characters that make up a comment
-play no part in the pattern matching at all.
-
-@cindex Perl-style regular expressions, extended
-If the @code{X} modifier option is used, an unescaped @code{#} character
-outside a character class introduces a comment that continues
-up to the next newline character in the pattern.
-@end ifset
-
-
-@page
-@node Concept Index
-@unnumbered Concept Index
-
-This is a general index of all issues discussed in this manual, with the
-exception of the @command{sed} commands and command-line options.
-
-@printindex cp
-
-@page
-@node Command and Option Index
-@unnumbered Command and Option Index
-
-This is an alphabetical list of all @command{sed} commands and command-line
-options.
-
-@printindex fn
-
-@contents
-@bye
-
-@c XXX FIXME: the term "cycle" is never defined...
diff --git a/doc/sed.1 b/doc/sed.1
index 440287a..3d71e44 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" "December 2012" "sed 4.2.2" "User Commands"
+.TH SED "1" "December 2016" "sed 4.3" "User Commands"
.SH NAME
sed \- stream editor for filtering and transforming text
.SH SYNOPSIS
@@ -48,14 +48,19 @@ specify the desired line-wrap length for the `l' command
.IP
disable all GNU extensions.
.HP
-\fB\-r\fR, \fB\-\-regexp\-extended\fR
+\fB\-E\fR, \fB\-r\fR, \fB\-\-regexp\-extended\fR
.IP
-use extended regular expressions in the script.
+use extended regular expressions in the script
+(for portability use POSIX \fB\-E\fR).
.HP
\fB\-s\fR, \fB\-\-separate\fR
.IP
-consider files as separate rather than as a single continuous
-long stream.
+consider files as separate rather than as a single,
+continuous long stream.
+.HP
+\fB\-\-sandbox\fR
+.IP
+operate in sandbox mode.
.HP
\fB\-u\fR, \fB\-\-unbuffered\fR
.IP
@@ -80,7 +85,6 @@ specified, then the standard input is read.
GNU sed home page: <http://www.gnu.org/software/sed/>.
General help using GNU software: <http://www.gnu.org/gethelp/>.
E-mail bug reports to: <bug-sed@gnu.org>.
-Be sure to include the word ``sed'' somewhere in the ``Subject:'' field.
.SH "COMMAND SYNOPSIS"
This is just a brief synopsis of \*(sd commands to serve as
a reminder to those who already know \*(sd;
@@ -367,6 +371,9 @@ and similarly for
.BR \ea ,
.BR \et ,
and other sequences.
+The \fI-E\fP option switches to using extended regular expressions instead;
+the -E option has been supported for years by GNU sed, and is now
+included in POSIX.
.SH BUGS
.PP
E-mail bug reports to
@@ -379,9 +386,8 @@ and Paolo Bonzini.
GNU sed home page: <http://www.gnu.org/software/sed/>.
General help using GNU software: <http://www.gnu.org/gethelp/>.
E-mail bug reports to: <bug-sed@gnu.org>.
-Be sure to include the word ``sed'' somewhere in the ``Subject:'' field.
.SH COPYRIGHT
-Copyright \(co 2012 Free Software Foundation, Inc.
+Copyright \(co 2016 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>.
.br
This is free software: you are free to change and redistribute it.
diff --git a/doc/sed.info b/doc/sed.info
index 38235da..6caa43c 100644
--- a/doc/sed.info
+++ b/doc/sed.info
@@ -1,1059 +1,1176 @@
-This is ../../doc/sed.info, produced by makeinfo version 4.13 from
-../../doc//config.texi.
+This is sed.info-t, produced by makeinfo version 6.3 from sed.texi.
+This file documents version 4.3 of GNU 'sed', a stream editor.
+
+ Copyright (C) 1998-2016 Free Software Foundation, Inc.
+
+ Permission is granted to copy, distribute and/or modify this
+ document under the terms of the GNU Free Documentation License,
+ Version 1.3 or any later version published by the Free Software
+ Foundation; with no Invariant Sections, no Front-Cover Texts, and
+ no Back-Cover Texts. A copy of the license is included in the
+ section entitled "GNU Free Documentation License".
INFO-DIR-SECTION Text creation and manipulation
START-INFO-DIR-ENTRY
* sed: (sed). Stream EDitor.
END-INFO-DIR-ENTRY
- This file documents version 4.2.2 of GNU `sed', a stream editor.
-
- Copyright (C) 1998, 1999, 2001, 2002, 2003, 2004 Free Software
-Foundation, Inc.
-
- This document is released under the terms of the GNU Free
-Documentation License as published by the Free Software Foundation;
-either version 1.1, or (at your option) any later version.
-
- You should have received a copy of the GNU Free Documentation
-License along with GNU `sed'; see the file `COPYING.DOC'. If not,
-write to the Free Software Foundation, 59 Temple Place - Suite 330,
-Boston, MA 02110-1301, USA.
-
- There are no Cover Texts and no Invariant Sections; this text, along
-with its equivalent in the printed manual, constitutes the Title Page.
-

-File: sed.info, Node: Top, Next: Introduction, Up: (dir)
-
-sed, a stream editor
-********************
-
-This file documents version 4.2.2 of GNU `sed', a stream editor.
+File: sed.info-t, Node: Top, Next: Introduction, Up: (dir)
- Copyright (C) 1998, 1999, 2001, 2002, 2003, 2004 Free Software
-Foundation, Inc.
+GNU 'sed'
+*********
- This document is released under the terms of the GNU Free
-Documentation License as published by the Free Software Foundation;
-either version 1.1, or (at your option) any later version.
+This file documents version 4.3 of GNU 'sed', a stream editor.
- You should have received a copy of the GNU Free Documentation
-License along with GNU `sed'; see the file `COPYING.DOC'. If not,
-write to the Free Software Foundation, 59 Temple Place - Suite 330,
-Boston, MA 02110-1301, USA.
+ Copyright (C) 1998-2016 Free Software Foundation, Inc.
- There are no Cover Texts and no Invariant Sections; this text, along
-with its equivalent in the printed manual, constitutes the Title Page.
+ Permission is granted to copy, distribute and/or modify this
+ document under the terms of the GNU Free Documentation License,
+ Version 1.3 or any later version published by the Free Software
+ Foundation; with no Invariant Sections, no Front-Cover Texts, and
+ no Back-Cover Texts. A copy of the license is included in the
+ section entitled "GNU Free Documentation License".
* Menu:
* Introduction:: Introduction
* Invoking sed:: Invocation
-* sed Programs:: `sed' programs
+* sed scripts:: 'sed' scripts
+* sed addresses:: Addresses: selecting lines
+* sed regular expressions:: Regular expressions: selecting text
+* advanced sed:: Advanced 'sed': cycles and buffers
* Examples:: Some sample scripts
-* Limitations:: Limitations and (non-)limitations of GNU `sed'
-* Other Resources:: Other resources for learning about `sed'
+* Limitations:: Limitations and (non-)limitations of GNU 'sed'
+* Other Resources:: Other resources for learning about 'sed'
* Reporting Bugs:: Reporting bugs
-
-* Extended regexps:: `egrep'-style regular expressions
-
+* GNU Free Documentation License:: Copying and sharing this manual
* Concept Index:: A menu with all the topics in this manual.
-* Command and Option Index:: A menu with all `sed' commands and
+* Command and Option Index:: A menu with all 'sed' commands and
command-line options.
---- The detailed node listing ---
-
-sed Programs:
-* Execution Cycle:: How `sed' works
-* Addresses:: Selecting lines with `sed'
-* Regular Expressions:: Overview of regular expression syntax
-* Common Commands:: Often used commands
-* The "s" Command:: `sed''s Swiss Army Knife
-* Other Commands:: Less frequently used commands
-* Programming Commands:: Commands for `sed' gurus
-* Extended Commands:: Commands specific of GNU `sed'
-* Escapes:: Specifying special characters
-
-Examples:
-* Centering lines::
-* Increment a number::
-* Rename files to lower case::
-* Print bash environment::
-* Reverse chars of lines::
-* tac:: Reverse lines of files
-* cat -n:: Numbering lines
-* cat -b:: Numbering non-blank lines
-* wc -c:: Counting chars
-* wc -w:: Counting words
-* wc -l:: Counting lines
-* head:: Printing the first lines
-* tail:: Printing the last lines
-* uniq:: Make duplicate lines unique
-* uniq -d:: Print duplicated lines of input
-* uniq -u:: Remove all duplicated lines
-* cat -s:: Squeezing blank lines
-

-File: sed.info, Node: Introduction, Next: Invoking sed, Prev: Top, Up: Top
+File: sed.info-t, Node: Introduction, Next: Invoking sed, Prev: Top, Up: Top
1 Introduction
**************
-`sed' is a stream editor. A stream editor is used to perform basic text
+'sed' is a stream editor. A stream editor is used to perform basic text
transformations on an input stream (a file or input from a pipeline).
While in some ways similar to an editor which permits scripted edits
-(such as `ed'), `sed' works by making only one pass over the input(s),
-and is consequently more efficient. But it is `sed''s ability to
-filter text in a pipeline which particularly distinguishes it from
-other types of editors.
+(such as 'ed'), 'sed' works by making only one pass over the input(s),
+and is consequently more efficient. But it is 'sed''s ability to filter
+text in a pipeline which particularly distinguishes it from other types
+of editors.

-File: sed.info, Node: Invoking sed, Next: sed Programs, Prev: Introduction, Up: Top
+File: sed.info-t, Node: Invoking sed, Next: sed scripts, Prev: Introduction, Up: Top
-2 Invocation
-************
+2 Running sed
+*************
-Normally `sed' is invoked like this:
+This chapter covers how to run 'sed'. Details of 'sed' scripts and
+individual 'sed' commands are discussed in the next chapter.
+
+* Menu:
+
+* Overview::
+* Command-Line Options::
+* Exit status::
+
+
+File: sed.info-t, Node: Overview, Next: Command-Line Options, Up: Invoking sed
+
+2.1 Overview
+============
+
+Normally 'sed' is invoked like this:
sed SCRIPT INPUTFILE...
- The full format for invoking `sed' is:
+ For example, to replace all occurrences of 'hello' to 'world' in the
+file 'input.txt':
- sed OPTIONS... [SCRIPT] [INPUTFILE...]
+ sed 's/hello/world/' input.txt > output.txt
+
+ If you do not specify INPUTFILE, or if INPUTFILE is '-', 'sed'
+filters the contents of the standard input. The following commands are
+equivalent:
+
+ sed 's/hello/world/' input.txt > output.txt
+ sed 's/hello/world/' < input.txt > output.txt
+ cat input.txt | sed 's/hello/world/' - > output.txt
- If you do not specify INPUTFILE, or if INPUTFILE is `-', `sed'
-filters the contents of the standard input. The SCRIPT is actually the
-first non-option parameter, which `sed' specially considers a script
-and not an input file if (and only if) none of the other OPTIONS
-specifies a script to be executed, that is if neither of the `-e' and
-`-f' options is specified.
+ 'sed' writes output to standard output. Use '-i' to edit files
+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' may be invoked with the following command-line options:
+ sed -i 's/hello/world' file.txt
-`--version'
- Print out the version of `sed' that is being run and a copyright
+ By default 'sed' prints all processed input (except input that has
+been modified/deleted by commands such as 'd'). Use '-n' to suppress
+output, and the 'p' command to print specific lines. The following
+command prints only line 45 of the input file:
+
+ sed -n '45p' file.txt
+
+ 'sed' treats multiple input files as one long stream. The following
+example prints the first line of the first file ('one.txt') and the last
+line of the last file ('three.txt'). Use '-s' to reverse this behavior.
+
+ sed -n '1p ; $p' one.txt two.txt three.txt
+
+ Without '-e' or '-f' options, 'sed' uses the first non-option
+parameter as the SCRIPT, and the following non-option parameters as
+input files. If '-e' or '-f' options are used to specify a SCRIPT, all
+non-option parameters are taken as input files. Options '-e' and '-f'
+can be combined, and can appear multiple times (in which case the final
+effective SCRIPT will be concatenation of all the individual SCRIPTs).
+
+ The following examples are equivalent:
+
+ sed 's/hello/world/' input.txt > output.txt
+
+ sed -e 's/hello/world/' input.txt > output.txt
+ sed --expression='s/hello/world/' input.txt > output.txt
+
+ echo 's/hello/world/' > myscript.sed
+ sed -f myscript.sed input.txt > output.txt
+ sed --file=myscript.sed input.txt > output.txt
+
+
+File: sed.info-t, Node: Command-Line Options, Next: Exit status, Prev: Overview, Up: Invoking sed
+
+2.2 Command-Line Options
+========================
+
+The full format for invoking 'sed' is:
+
+ sed OPTIONS... [SCRIPT] [INPUTFILE...]
+
+ 'sed' may be invoked with the following command-line options:
+
+'--version'
+ Print out the version of 'sed' that is being run and a copyright
notice, then exit.
-`--help'
+'--help'
Print a usage message briefly summarizing these command-line
options and the bug-reporting address, then exit.
-`-n'
-`--quiet'
-`--silent'
- By default, `sed' prints out the pattern space at the end of each
- cycle through the script (*note How `sed' works: Execution Cycle.).
- These options disable this automatic printing, and `sed' only
- produces output when explicitly told to via the `p' command.
+'-n'
+'--quiet'
+'--silent'
+ By default, 'sed' prints out the pattern space at the end of each
+ cycle through the script (*note How 'sed' works: Execution Cycle.).
+ These options disable this automatic printing, and 'sed' only
+ produces output when explicitly told to via the 'p' command.
-`-e SCRIPT'
-`--expression=SCRIPT'
+'-e SCRIPT'
+'--expression=SCRIPT'
Add the commands in SCRIPT to the set of commands to be run while
processing the input.
-`-f SCRIPT-FILE'
-`--file=SCRIPT-FILE'
+'-f SCRIPT-FILE'
+'--file=SCRIPT-FILE'
Add the commands contained in the file SCRIPT-FILE to the set of
commands to be run while processing the input.
-`-i[SUFFIX]'
-`--in-place[=SUFFIX]'
+'-i[SUFFIX]'
+'--in-place[=SUFFIX]'
This option specifies that files are to be edited in-place. GNU
- `sed' does this by creating a temporary file and sending output to
+ 'sed' does this by creating a temporary file and sending output to
this file rather than to the standard output.(1).
- This option implies `-s'.
+ This option implies '-s'.
When the end of the file is reached, the temporary file is renamed
- to the output file's original name. The extension, if supplied,
- is used to modify the name of the old file before renaming the
+ to the output file's original name. The extension, if supplied, is
+ used to modify the name of the old file before renaming the
temporary file, thereby making a backup copy(2)).
- This rule is followed: if the extension doesn't contain a `*',
- then it is appended to the end of the current filename as a
- suffix; if the extension does contain one or more `*' characters,
- then _each_ asterisk is replaced with the current filename. This
- allows you to add a prefix to the backup file, instead of (or in
- addition to) a suffix, or even to place backup copies of the
- original files into another directory (provided the directory
- already exists).
+ This rule is followed: if the extension doesn't contain a '*', then
+ it is appended to the end of the current filename as a suffix; if
+ the extension does contain one or more '*' characters, then _each_
+ asterisk is replaced with the current filename. This allows you to
+ add a prefix to the backup file, instead of (or in addition to) a
+ suffix, or even to place backup copies of the original files into
+ another directory (provided the directory already exists).
If no extension is supplied, the original file is overwritten
without making a backup.
-`-l N'
-`--line-length=N'
- Specify the default line-wrap length for the `l' command. A
- length of 0 (zero) means to never wrap long lines. If not
- specified, it is taken to be 70.
+'-l N'
+'--line-length=N'
+ Specify the default line-wrap length for the 'l' command. A length
+ of 0 (zero) means to never wrap long lines. If not specified, it
+ is taken to be 70.
-`--posix'
- GNU `sed' includes several extensions to POSIX sed. In order to
+'--posix'
+ GNU 'sed' 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. Most of the extensions accept `sed' programs that are
- outside the syntax mandated by POSIX, but some of them (such as
- the behavior of the `N' command described in *note Reporting
- Bugs::) actually violate the standard. If you want to disable
- only the latter kind of extension, you can set the
- `POSIXLY_CORRECT' variable to a non-empty value.
-
-`-b'
-`--binary'
+ commands. Most of the extensions accept 'sed' programs that are
+ outside the syntax mandated by POSIX, but some of them (such as the
+ behavior of the 'N' command described in *note Reporting Bugs::)
+ actually violate the standard. If you want to disable only the
+ latter kind of extension, you can set the 'POSIXLY_CORRECT'
+ variable to a non-empty value.
+
+'-b'
+'--binary'
This option is available on every platform, but is only effective
where the operating system makes a distinction between text files
and binary files. When such a distinction is made--as is the case
for MS-DOS, Windows, Cygwin--text files are composed of lines
separated by a carriage return _and_ a line feed character, and
- `sed' does not see the ending CR. When this option is specified,
- `sed' will open input files in binary mode, thus not requesting
+ 'sed' does not see the ending CR. When this option is specified,
+ 'sed' will open input files in binary mode, thus not requesting
this special processing and considering lines to end at a line
feed.
-`--follow-symlinks'
+'--follow-symlinks'
This option is available only on platforms that support symbolic
- links and has an effect only if option `-i' is specified. In this
+ links and has an effect only if option '-i' is specified. In this
case, if the file that is specified on the command line is a
- symbolic link, `sed' will follow the link and edit the ultimate
+ symbolic link, 'sed' will follow the link and edit the ultimate
destination of the link. The default behavior is to break the
symbolic link, so that the link destination will not be modified.
-`-r'
-`--regexp-extended'
+'-E'
+'-r'
+'--regexp-extended'
Use extended regular expressions rather than basic regular
- expressions. Extended regexps are those that `egrep' accepts;
- they can be clearer because they usually have less backslashes,
- but are a GNU extension and hence scripts that use them are not
- portable. *Note Extended regular expressions: Extended regexps.
-
-`-s'
-`--separate'
- By default, `sed' will consider the files specified on the command
- line as a single continuous long stream. This GNU `sed' extension
- allows the user to consider them as separate files: range
- addresses (such as `/abc/,/def/') are not allowed to span several
- files, line numbers are relative to the start of each file, `$'
- refers to the last line of each file, and files invoked from the
- `R' commands are rewound at the start of each file.
-
-`-u'
-`--unbuffered'
+ expressions. Extended regexps are those that 'egrep' accepts; they
+ can be clearer because they usually have fewer backslashes.
+ Historically this was a GNU extension, but the '-E' extension has
+ since been added to the POSIX standard
+ (http://austingroupbugs.net/view.php?id=528), so use '-E' for
+ portability. GNU sed has accepted '-E' as an undocumented option
+ for years, and *BSD seds have accepted '-E' for years as well, but
+ scripts that use '-E' might not port to other older systems. *Note
+ Extended regular expressions: ERE syntax.
+
+'-s'
+'--separate'
+ By default, 'sed' will consider the files specified on the command
+ line as a single continuous long stream. This GNU 'sed' extension
+ allows the user to consider them as separate files: range addresses
+ (such as '/abc/,/def/') are not allowed to span several files, line
+ numbers are relative to the start of each file, '$' refers to the
+ last line of each file, and files invoked from the 'R' commands are
+ rewound at the start of each file.
+
+'--sandbox'
+ In sandbox mode, 'e/w/r' commands are rejected - programs
+ containing them will be aborted without being run. Sandbox mode
+ ensures 'sed' operates only on the input files designated on the
+ command line, and cannot run external programs.
+
+'-u'
+'--unbuffered'
Buffer both input and output as minimally as practical. (This is
- particularly useful if the input is coming from the likes of `tail
+ particularly useful if the input is coming from the likes of 'tail
-f', and you wish to see the transformed output as soon as
possible.)
-`-z'
-`--null-data'
-`--zero-terminated'
+'-z'
+'--null-data'
+'--zero-terminated'
Treat the input as a set of lines, each terminated by a zero byte
- (the ASCII `NUL' character) instead of a newline. This option can
- be used with commands like `sort -z' and `find -print0' to process
+ (the ASCII 'NUL' character) instead of a newline. This option can
+ be used with commands like 'sort -z' and 'find -print0' to process
arbitrary file names.
- If no `-e', `-f', `--expression', or `--file' options are given on
-the command-line, then the first non-option argument on the command
-line is taken to be the SCRIPT to be executed.
+ If no '-e', '-f', '--expression', or '--file' options are given on
+the command-line, then the first non-option argument on the command line
+is taken to be the SCRIPT to be executed.
If any command-line parameters remain after processing the above,
these parameters are interpreted as the names of input files to be
-processed. A file name of `-' refers to the standard input stream.
-The standard input will be processed if no file names are specified.
+processed. A file name of '-' refers to the standard input stream. The
+standard input will be processed if no file names are specified.
---------- Footnotes ----------
- (1) This applies to commands such as `=', `a', `c', `i', `l', `p'.
-You can still write to the standard output by using the `w' or `W'
-commands together with the `/dev/stdout' special file
+ (1) This applies to commands such as '=', 'a', 'c', 'i', 'l', 'p'.
+You can still write to the standard output by using the 'w' or 'W'
+commands together with the '/dev/stdout' special file
- (2) Note that GNU `sed' creates the backup file whether or not any
+ (2) Note that GNU 'sed' creates the backup file whether or not any
output is actually changed.

-File: sed.info, Node: sed Programs, Next: Examples, Prev: Invoking sed, Up: Top
+File: sed.info-t, Node: Exit status, Prev: Command-Line Options, Up: Invoking sed
-3 `sed' Programs
-****************
+2.3 Exit status
+===============
-A `sed' program consists of one or more `sed' commands, passed in by
-one or more of the `-e', `-f', `--expression', and `--file' options, or
-the first non-option argument if zero of these options are used. This
-document will refer to "the" `sed' script; this is understood to mean
-the in-order catenation of all of the SCRIPTs and SCRIPT-FILEs passed
-in.
+An exit status of zero indicates success, and a nonzero value indicates
+failure. GNU 'sed' returns the following exit status error values:
- Commands within a SCRIPT or SCRIPT-FILE can be separated by
-semicolons (`;') or newlines (ASCII 10). Some commands, due to their
-syntax, cannot be followed by semicolons working as command separators
-and thus should be terminated with newlines or be placed at the end of
-a SCRIPT or SCRIPT-FILE. Commands can also be preceded with optional
-non-significant whitespace characters.
-
- Each `sed' command consists of an optional address or address range,
-followed by a one-character command name and any additional
-command-specific code.
+0
+ Successful completion.
-* Menu:
-
-* Execution Cycle:: How `sed' works
-* Addresses:: Selecting lines with `sed'
-* Regular Expressions:: Overview of regular expression syntax
-* Common Commands:: Often used commands
-* The "s" Command:: `sed''s Swiss Army Knife
-* Other Commands:: Less frequently used commands
-* Programming Commands:: Commands for `sed' gurus
-* Extended Commands:: Commands specific of GNU `sed'
-* Escapes:: Specifying special characters
+1
+ Invalid command, invalid syntax, invalid regular expression or a
+ GNU 'sed' extension command used with '--posix'.
-
-File: sed.info, Node: Execution Cycle, Next: Addresses, Up: sed Programs
+2
+ One or more of the input file specified on the command line could
+ not be opened (e.g. if a file is not found, or read permission is
+ denied). Processing continued with other files.
-3.1 How `sed' Works
-===================
+4
+ An I/O error, or a serious processing error during runtime, GNU
+ 'sed' aborted immediately.
-`sed' maintains two data buffers: the active _pattern_ space, and the
-auxiliary _hold_ space. Both are initially empty.
+ Additionally, the commands 'q' and 'Q' can be used to terminate 'sed'
+with a custom exit code value (this is a GNU 'sed' extension):
- `sed' operates by performing the following cycle on each line of
-input: first, `sed' reads one line from the input stream, removes any
-trailing newline, and places it in the pattern space. Then commands
-are executed; each command can have an address associated to it:
-addresses are a kind of condition code, and a command is only executed
-if the condition is verified before the command is to be executed.
+ $ echo | sed 'Q42' ; echo $?
+ 42
- When the end of the script is reached, unless the `-n' option is in
-use, the contents of pattern space are printed out to the output
-stream, adding back the trailing newline if it was removed.(1) Then the
-next cycle starts for the next input line.
+
+File: sed.info-t, Node: sed scripts, Next: sed addresses, Prev: Invoking sed, Up: Top
- Unless special commands (like `D') are used, the pattern space is
-deleted between two cycles. The hold space, on the other hand, keeps
-its data between cycles (see commands `h', `H', `x', `g', `G' to move
-data between both buffers).
+3 'sed' scripts
+***************
- ---------- Footnotes ----------
+* Menu:
- (1) Actually, if `sed' prints a line without the terminating
-newline, it will nevertheless print the missing newline as soon as more
-text is sent to the same output stream, which gives the "least expected
-surprise" even though it does not make commands like `sed -n p' exactly
-identical to `cat'.
+* sed script overview:: 'sed' script overview
+* sed commands list:: 'sed' commands summary
+* The "s" Command:: 'sed''s Swiss Army Knife
+* Common Commands:: Often used commands
+* Other Commands:: Less frequently used commands
+* Programming Commands:: Commands for 'sed' gurus
+* Extended Commands:: Commands specific of GNU 'sed'

-File: sed.info, Node: Addresses, Next: Regular Expressions, Prev: Execution Cycle, Up: sed Programs
+File: sed.info-t, Node: sed script overview, Next: sed commands list, Up: sed scripts
-3.2 Selecting lines with `sed'
-==============================
+3.1 'sed' script overview
+=========================
-Addresses in a `sed' script can be in any of the following forms:
-`NUMBER'
- Specifying a line number will match only that line in the input.
- (Note that `sed' counts lines continuously across all input files
- unless `-i' or `-s' options are specified.)
+A 'sed' program consists of one or more 'sed' commands, passed in by one
+or more of the '-e', '-f', '--expression', and '--file' options, or the
+first non-option argument if zero of these options are used. This
+document will refer to "the" 'sed' script; this is understood to mean
+the in-order concatenation of all of the SCRIPTs and SCRIPT-FILEs passed
+in. *Note Overview::.
-`FIRST~STEP'
- This GNU extension matches every STEPth line starting with line
- FIRST. In particular, lines will be selected when there exists a
- non-negative N such that the current line-number equals FIRST + (N
- * STEP). Thus, to select the odd-numbered lines, one would use
- `1~2'; to pick every third line starting with the second, `2~3'
- would be used; to pick every fifth line starting with the tenth,
- use `10~5'; and `50~0' is just an obscure way of saying `50'.
+ 'sed' commands follow this syntax:
-`$'
- This address matches the last line of the last file of input, or
- the last line of each file when the `-i' or `-s' options are
- specified.
+ [addr]X[options]
-`/REGEXP/'
- This will select any line which matches the regular expression
- REGEXP. If REGEXP itself includes any `/' characters, each must
- be escaped by a backslash (`\').
+ X is a single-letter 'sed' command. '[addr]' is an optional line
+address. If '[addr]' is specified, the command X will be executed only
+on the matched lines. '[addr]' can be a single line number, a regular
+expression, or a range of lines (*note sed addresses::). Additional
+'[options]' are used for some 'sed' commands.
- The empty regular expression `//' repeats the last regular
- expression match (the same holds if the empty regular expression is
- passed to the `s' command). Note that modifiers to regular
- expressions are evaluated when the regular expression is compiled,
- thus it is invalid to specify them together with the empty regular
- expression.
+ The following example deletes lines 30 to 35 in the input. '30,35'
+is an address range. 'd' is the delete command:
-`\%REGEXP%'
- (The `%' may be replaced by any other single character.)
+ sed '30,35d' input.txt > output.txt
- This also matches the regular expression REGEXP, but allows one to
- use a different delimiter than `/'. This is particularly useful
- if the REGEXP itself contains a lot of slashes, since it avoids
- the tedious escaping of every `/'. If REGEXP itself includes any
- delimiter characters, each must be escaped by a backslash (`\').
-
-`/REGEXP/I'
-`\%REGEXP%I'
- The `I' modifier to regular-expression matching is a GNU extension
- which causes the REGEXP to be matched in a case-insensitive manner.
+ The following example prints all input until a line starting with the
+word 'foo' is found. If such line is found, 'sed' will terminate with
+exit status 42. If such line was not found (and no other error
+occurred), 'sed' will exit with status 0. '/^foo/' is a
+regular-expression address. 'q' is the quit command. '42' is the
+command option.
-`/REGEXP/M'
-`\%REGEXP%M'
- The `M' modifier to regular-expression matching is a GNU `sed'
- extension which directs GNU `sed' to match the regular expression
- in `multi-line' mode. The modifier causes `^' and `$' to match
- respectively (in addition to the normal behavior) the empty string
- after a newline, and the empty string before a newline. There are
- special character sequences (`\`' and `\'') which always match the
- beginning or the end of the buffer. In addition, the period
- character does not match a new-line character in multi-line mode.
+ sed '/^foo/q42' input.txt > output.txt
+ Commands within a SCRIPT or SCRIPT-FILE can be separated by
+semicolons (';') or newlines (ASCII 10). Multiple scripts can be
+specified with '-e' or '-f' options.
- If no addresses are given, then all lines are matched; if one
-address is given, then only lines matching that address are matched.
+ The following examples are all equivalent. They perform two 'sed'
+operations: deleting any lines matching the regular expression '/^foo/',
+and replacing all occurrences of the string 'hello' with 'world':
- An address range can be specified by specifying two addresses
-separated by a comma (`,'). An address range matches lines starting
-from where the first address matches, and continues until the second
-address matches (inclusively).
+ sed '/^foo/d ; s/hello/world/' input.txt > output.txt
- If the second address is a REGEXP, then checking for the ending
-match will start with the line _following_ the line which matched the
-first address: a range will always span at least two lines (except of
-course if the input stream ends).
+ sed -e '/^foo/d' -e 's/hello/world/' input.txt > output.txt
- If the second address is a NUMBER less than (or equal to) the line
-matching the first address, then only the one line is matched.
-
- GNU `sed' also supports some special two-address forms; all these
-are GNU extensions:
-`0,/REGEXP/'
- A line number of `0' can be used in an address specification like
- `0,/REGEXP/' so that `sed' will try to match REGEXP in the first
- input line too. In other words, `0,/REGEXP/' is similar to
- `1,/REGEXP/', except that if ADDR2 matches the very first line of
- input the `0,/REGEXP/' form will consider it to end the range,
- whereas the `1,/REGEXP/' form will match the beginning of its
- range and hence make the range span up to the _second_ occurrence
- of the regular expression.
-
- Note that this is the only place where the `0' address makes
- sense; there is no 0-th line and commands which are given the `0'
- address in any other way will give an error.
-
-`ADDR1,+N'
- Matches ADDR1 and the N lines following ADDR1.
+ echo '/^foo/d' > script.sed
+ echo 's/hello/world/' >> script.sed
+ sed -f script.sed input.txt > output.txt
-`ADDR1,~N'
- Matches ADDR1 and the lines following ADDR1 until the next line
- whose input line number is a multiple of N.
+ echo 's/hello/world/' > script2.sed
+ sed -e '/^foo/d' -f script2.sed input.txt > output.txt
- Appending the `!' character to the end of an address specification
-negates the sense of the match. That is, if the `!' character follows
-an address range, then only lines which do _not_ match the address range
-will be selected. This also works for singleton addresses, and,
-perhaps perversely, for the null address.
+ Commands 'a', 'c', 'i', due to their syntax, cannot be followed by
+semicolons working as command separators and thus should be terminated
+with newlines or be placed at the end of a SCRIPT or SCRIPT-FILE.
+Commands can also be preceded with optional non-significant whitespace
+characters.

-File: sed.info, Node: Regular Expressions, Next: Common Commands, Prev: Addresses, Up: sed Programs
+File: sed.info-t, Node: sed commands list, Next: The "s" Command, Prev: sed script overview, Up: sed scripts
-3.3 Overview of Regular Expression Syntax
-=========================================
+3.2 'sed' commands summary
+==========================
-To know how to use `sed', people should understand regular expressions
-("regexp" for short). A regular expression is a pattern that is
-matched against a subject string from left to right. Most characters
-are "ordinary": they stand for themselves in a pattern, and match the
-corresponding characters in the subject. As a trivial example, the
-pattern
+The following commands are supported in GNU 'sed'. Some are standard
+POSIX commands, while other are GNU extensions. Details and examples
+for each command are in the following sections. (Mnemonics) are shown
+in parentheses.
- The quick brown fox
+'a\'
+'TEXT'
+ Append TEXT after a line.
-matches a portion of a subject string that is identical to itself. The
-power of regular expressions comes from the ability to include
-alternatives and repetitions in the pattern. These are encoded in the
-pattern by the use of "special characters", which do not stand for
-themselves but instead are interpreted in some special way. Here is a
-brief description of regular expression syntax as used in `sed'.
+'a TEXT'
+ Append TEXT after a line (alternative syntax).
-`CHAR'
- A single ordinary character matches itself.
+'b LABEL'
+ Branch unconditionally to LABEL. The LABEL may be omitted, in
+ which case the next cycle is started.
-`*'
- 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 `\', a `.', a grouped regexp (see
- below), or a bracket expression. As a GNU extension, a postfixed
- regular expression can also be followed by `*'; for example, `a**'
- is equivalent to `a*'. POSIX 1003.1-2001 says that `*' stands for
- itself when it appears at the start of a regular expression or
- subexpression, but many nonGNU implementations do not support this
- and portable scripts should instead use `\*' in these contexts.
+'c\'
+'TEXT'
+ Replace (change) lines with TEXT.
-`\+'
- As `*', but matches one or more. It is a GNU extension.
+'c TEXT'
+ Replace (change) lines with TEXT (alternative syntax).
-`\?'
- As `*', but only matches zero or one. It is a GNU extension.
+'d'
+ Delete the pattern space; immediately start next cycle.
-`\{I\}'
- As `*', but matches exactly I sequences (I is a decimal integer;
- for portability, keep it between 0 and 255 inclusive).
+'D'
+ If pattern space contains newlines, delete text in the pattern
+ space up to the first newline, and restart cycle with the resultant
+ pattern space, without reading a new line of input.
-`\{I,J\}'
- Matches between I and J, inclusive, sequences.
+ If pattern space contains no newline, start a normal new cycle as
+ if the 'd' command was issued.
-`\{I,\}'
- Matches more than or equal to I sequences.
+'e'
+ Executes the command that is found in pattern space and replaces
+ the pattern space with the output; a trailing newline is
+ suppressed.
-`\(REGEXP\)'
- Groups the inner REGEXP as a whole, this is used to:
+'e COMMAND'
+ Executes COMMAND and sends its output to the output stream. The
+ command can run across multiple lines, all but the last ending with
+ a back-slash.
- * Apply postfix operators, like `\(abcd\)*': this will search
- for zero or more whole sequences of `abcd', while `abcd*'
- would search for `abc' followed by zero or more occurrences
- of `d'. Note that support for `\(abcd\)*' is required by
- POSIX 1003.1-2001, but many non-GNU implementations do not
- support it and hence it is not universally portable.
+'F'
+ (filename) Print the file name of the current input file (with a
+ trailing newline).
- * Use back references (see below).
+'g'
+ Replace the contents of the pattern space with the contents of the
+ hold space.
-`.'
- Matches any character, including newline.
+'G'
+ Append a newline to the contents of the pattern space, and then
+ append the contents of the hold space to that of the pattern space.
-`^'
- Matches the null string at beginning of the pattern space, i.e.
- what appears after the circumflex must appear at the beginning of
+'h'
+ (hold) Replace the contents of the hold space with the contents of
the pattern space.
- In most scripts, pattern space is initialized to the content of
- each line (*note How `sed' works: Execution Cycle.). So, it is a
- useful simplification to think of `^#include' as matching only
- lines where `#include' is the first thing on line--if there are
- spaces before, for example, the match fails. This simplification
- is valid as long as the original content of pattern space is not
- modified, for example with an `s' command.
-
- `^' acts as a special character only at the beginning of the
- regular expression or subexpression (that is, after `\(' or `\|').
- Portable scripts should avoid `^' at the beginning of a
- subexpression, though, as POSIX allows implementations that treat
- `^' as an ordinary character in that context.
-
-`$'
- It is the same as `^', but refers to end of pattern space. `$'
- also acts as a special character only at the end of the regular
- expression or subexpression (that is, before `\)' or `\|'), and
- its use at the end of a subexpression is not portable.
-
-`[LIST]'
-`[^LIST]'
- Matches any single character in LIST: for example, `[aeiou]'
- matches all vowels. A list may include sequences like
- `CHAR1-CHAR2', which matches any character between (inclusive)
- CHAR1 and CHAR2.
-
- A leading `^' reverses the meaning of LIST, so that it matches any
- single character _not_ in LIST. To include `]' in the list, make
- it the first character (after the `^' if needed), to include `-'
- in the list, make it the first or last; to include `^' put it
- after the first character.
-
- The characters `$', `*', `.', `[', and `\' are normally not
- special within LIST. For example, `[\*]' matches either `\' or
- `*', because the `\' is not special here. However, strings like
- `[.ch.]', `[=a=]', and `[:space:]' are special within LIST and
- represent collating symbols, equivalence classes, and character
- classes, respectively, and `[' is therefore special within LIST
- when it is followed by `.', `=', or `:'. Also, when not in
- `POSIXLY_CORRECT' mode, special escapes like `\n' and `\t' are
- recognized within LIST. *Note Escapes::.
-
-`REGEXP1\|REGEXP2'
- Matches either REGEXP1 or 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 GNU extension.
-
-`REGEXP1REGEXP2'
- Matches the concatenation of REGEXP1 and REGEXP2. Concatenation
- binds more tightly than `\|', `^', and `$', but less tightly than
- the other regular expression operators.
-
-`\DIGIT'
- Matches the DIGIT-th `\(...\)' parenthesized subexpression in the
- regular expression. This is called a "back reference".
- Subexpressions are implicity numbered by counting occurrences of
- `\(' left-to-right.
-
-`\n'
- Matches the newline character.
-
-`\CHAR'
- Matches CHAR, where CHAR is one of `$', `*', `.', `[', `\', or `^'.
- Note that the only C-like backslash sequences that you can
- portably assume to be interpreted are `\n' and `\\'; in particular
- `\t' is not portable, and matches a `t' under most implementations
- of `sed', rather than a tab character.
-
-
- Note that the regular expression matcher is greedy, i.e., matches
-are attempted from left to right and, if two or more matches are
-possible starting at the same character, it selects the longest.
-
-Examples:
-`abcdef'
- Matches `abcdef'.
-
-`a*b'
- Matches zero or more `a's followed by a single `b'. For example,
- `b' or `aaaaab'.
+'H'
+ Append a newline to the contents of the hold space, and then append
+ the contents of the pattern space to that of the hold space.
-`a\?b'
- Matches `b' or `ab'.
+'i\'
+'TEXT'
+ insert TEXT before a line.
-`a\+b\+'
- Matches one or more `a's followed by one or more `b's: `ab' is the
- shortest possible match, but other examples are `aaaab' or
- `abbbbb' or `aaaaaabbbbbbb'.
+'i TEXT'
+ insert TEXT before a line (alternative syntax).
-`.*'
-`.\+'
- These two both match all the characters in a string; however, the
- first matches every string (including the empty string), while the
- second matches only strings containing at least one character.
-
-`^main.*(.*)'
- This matches a string starting with `main', followed by an opening
- and closing parenthesis. The `n', `(' and `)' need not be
- adjacent.
-
-`^#'
- This matches a string beginning with `#'.
+'l'
+ Print the pattern space in an unambiguous form.
-`\\$'
- This matches a string ending with a single backslash. The regexp
- contains two backslashes for escaping.
-
-`\$'
- Instead, this matches a string consisting of a single dollar sign,
- because it is escaped.
+'n'
+ (next) If auto-print is not disabled, print the pattern space,
+ then, regardless, replace the pattern space with the next line of
+ input. If there is no more input then 'sed' exits without
+ processing any more commands.
-`[a-zA-Z0-9]'
- In the C locale, this matches any ASCII letters or digits.
-
-`[^ tab]\+'
- (Here `tab' stands for a single tab character.) This matches a
- string of one or more characters, none of which is a space or a
- tab. Usually this means a word.
+'N'
+ Add a newline to the pattern space, then append the next line of
+ input to the pattern space. If there is no more input then 'sed'
+ exits without processing any more commands.
-`^\(.*\)\n\1$'
- This matches a string consisting of two equal substrings separated
- by a newline.
+'p'
+ Print the pattern space.
-`.\{9\}A$'
- This matches nine characters followed by an `A'.
+'P'
+ Print the pattern space, up to the first <newline>.
-`^.\{15\}A'
- This matches the start of a string that contains 16 characters,
- the last of which is an `A'.
+'q[EXIT-CODE]'
+ (quit) Exit 'sed' without processing any more commands or input.
+'Q[EXIT-CODE]'
+ (quit) 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 code to the caller.
-
-File: sed.info, Node: Common Commands, Next: The "s" Command, Prev: Regular Expressions, Up: sed Programs
+'r filename'
+ Reads text file a file. Example:
-3.4 Often-Used Commands
-=======================
-
-If you use `sed' at all, you will quite likely want to know these
-commands.
+'R filename'
+ Queue a line of FILENAME to be read and inserted into the output
+ stream at the end of the current cycle, or when the next input line
+ is read.
+
+'s/REGEXP/REPLACEMENT/[FLAGS]'
+ (substitute) Match the regular-expression against the content of
+ the pattern space. If found, replace matched string with
+ REPLACEMENT.
+
+'t LABEL'
+ (test) Branch to LABEL only if there has been a successful
+ 's'ubstitution since the last input line was read or conditional
+ branch was taken. The LABEL may be omitted, in which case the next
+ cycle is started.
-`#'
- [No addresses allowed.]
+'T LABEL'
+ (test) Branch to LABEL only if there have been no successful
+ 's'ubstitutions since the last input line was read or conditional
+ branch was taken. The LABEL may be omitted, in which case the next
+ cycle is started.
- The `#' character begins a comment; the comment continues until
- the next newline.
+'v [VERSION]'
+ (version) This command does nothing, but makes 'sed' fail if GNU
+ 'sed' extensions are not supported, or if the requested version is
+ not available.
- If you are concerned about portability, be aware that some
- implementations of `sed' (which are not POSIX conformant) may only
- support a single one-line comment, and then only when the very
- first character of the script is a `#'.
+'w filename'
+ Write the pattern space to FILENAME.
- Warning: if the first two characters of the `sed' script are `#n',
- then the `-n' (no-autoprint) option is forced. If you want to put
- a comment in the first line of your script and that comment begins
- with the letter `n' and you do not want this behavior, then be
- sure to either use a capital `N', or place at least one space
- before the `n'.
+'W filename'
+ Write to the given filename the portion of the pattern space up to
+ the first newline
-`q [EXIT-CODE]'
- This command only accepts a single address.
+'x'
+ Exchange the contents of the hold and pattern spaces.
- Exit `sed' without processing any more commands or input. 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.
+'y/src/dst/'
+ Transliterate any characters in the pattern space which match any
+ of the SOURCE-CHARS with the corresponding character in DEST-CHARS.
-`d'
- Delete the pattern space; immediately start next cycle.
+'z'
+ (zap) This command empties the content of pattern space.
-`p'
- Print out the pattern space (to the standard output). This
- command is usually only used in conjunction with the `-n'
- command-line option.
+'#'
+ A comment, until the next newline.
-`n'
- If auto-print is not disabled, print the pattern space, then,
- regardless, replace the pattern space with the next line of input.
- If there is no more input then `sed' exits without processing any
- more commands.
+'{ CMD ; CMD ... }'
+ Group several commands together.
-`{ COMMANDS }'
- A group of commands may be enclosed between `{' and `}' characters.
- This is particularly useful when you want a group of commands to
- be triggered by a single address (or address-range) match.
+'='
+ Print the current input line number (with a trailing newline).
+': LABEL'
+ Specify the location of LABEL for branch commands ('b', 't', 'T').

-File: sed.info, Node: The "s" Command, Next: Other Commands, Prev: Common Commands, Up: sed Programs
+File: sed.info-t, Node: The "s" Command, Next: Common Commands, Prev: sed commands list, Up: sed scripts
-3.5 The `s' Command
+3.3 The 's' Command
===================
-The syntax of the `s' (as in substitute) command is
-`s/REGEXP/REPLACEMENT/FLAGS'. The `/' characters may be uniformly
-replaced by any other single character within any given `s' command.
-The `/' character (or whatever other character is used in its stead)
-can appear in the REGEXP or REPLACEMENT only if it is preceded by a `\'
-character.
+The 's' command (as in substitute) is probably the most important in
+'sed' and has a lot of different options. The syntax of the 's' command
+is 's/REGEXP/REPLACEMENT/FLAGS'.
- The `s' command is probably the most important in `sed' and has a
-lot of different options. Its basic concept is simple: the `s' command
-attempts to match the pattern space against the supplied REGEXP; if the
+ Its basic concept is simple: the 's' command attempts to match the
+pattern space against the supplied regular expression REGEXP; if the
match is successful, then that portion of the pattern space which was
matched is replaced with REPLACEMENT.
- The REPLACEMENT can contain `\N' (N being a number from 1 to 9,
+ For details about REGEXP syntax *note Regular Expression Addresses:
+Regexp Addresses.
+
+ The REPLACEMENT can contain '\N' (N being a number from 1 to 9,
inclusive) references, which refer to the portion of the match which is
-contained between the Nth `\(' and its matching `\)'. Also, the
-REPLACEMENT can contain unescaped `&' characters which reference the
-whole matched portion of the pattern space. Finally, as a GNU `sed'
-extension, you can include a special sequence made of a backslash and
-one of the letters `L', `l', `U', `u', or `E'. The meaning is as
-follows:
+contained between the Nth '\(' and its matching '\)'. Also, the
+REPLACEMENT can contain unescaped '&' characters which reference the
+whole matched portion of the pattern space.
-`\L'
- Turn the replacement to lowercase until a `\U' or `\E' is found,
+ The '/' characters may be uniformly replaced by any other single
+character within any given 's' command. The '/' character (or whatever
+other character is used in its stead) can appear in the REGEXP or
+REPLACEMENT only if it is preceded by a '\' character.
-`\l'
+ Finally, as a GNU 'sed' extension, you can include a special sequence
+made of a backslash and one of the letters 'L', 'l', 'U', 'u', or 'E'.
+The meaning is as follows:
+
+'\L'
+ Turn the replacement to lowercase until a '\U' or '\E' is found,
+
+'\l'
Turn the next character to lowercase,
-`\U'
- Turn the replacement to uppercase until a `\L' or `\E' is found,
+'\U'
+ Turn the replacement to uppercase until a '\L' or '\E' is found,
-`\u'
+'\u'
Turn the next character to uppercase,
-`\E'
- Stop case conversion started by `\L' or `\U'.
+'\E'
+ Stop case conversion started by '\L' or '\U'.
- When the `g' flag is being used, case conversion does not propagate
+ When the 'g' flag is being used, case conversion does not propagate
from one occurrence of the regular expression to another. For example,
-when the following command is executed with `a-b-' in pattern space:
+when the following command is executed with 'a-b-' in pattern space:
s/\(b\?\)-/x\u\1/g
-the output is `axxB'. When replacing the first `-', the `\u' sequence
-only affects the empty replacement of `\1'. It does not affect the `x'
-character that is added to pattern space when replacing `b-' with `xB'.
+the output is 'axxB'. When replacing the first '-', the '\u' sequence
+only affects the empty replacement of '\1'. It does not affect the 'x'
+character that is added to pattern space when replacing 'b-' with 'xB'.
- On the other hand, `\l' and `\u' do affect the remainder of the
+ On the other hand, '\l' and '\u' do affect the remainder of the
replacement text if they are followed by an empty substitution. With
-`a-b-' in pattern space, the following command:
+'a-b-' in pattern space, the following command:
s/\(b\?\)-/\u\1x/g
-will replace `-' with `X' (uppercase) and `b-' with `Bx'. If this
-behavior is undesirable, you can prevent it by adding a `\E'
-sequence--after `\1' in this case.
+will replace '-' with 'X' (uppercase) and 'b-' with 'Bx'. If this
+behavior is undesirable, you can prevent it by adding a '\E'
+sequence--after '\1' in this case.
- To include a literal `\', `&', or newline in the final replacement,
-be sure to precede the desired `\', `&', or newline in the REPLACEMENT
-with a `\'.
+ To include a literal '\', '&', or newline in the final replacement,
+be sure to precede the desired '\', '&', or newline in the REPLACEMENT
+with a '\'.
- The `s' command can be followed by zero or more of the following
+ The 's' command can be followed by zero or more of the following
FLAGS:
-`g'
+'g'
Apply the replacement to _all_ matches to the REGEXP, not just the
first.
-`NUMBER'
+'NUMBER'
Only replace the NUMBERth match of the REGEXP.
- Note: the POSIX standard does not specify what should happen when
- you mix the `g' and NUMBER modifiers, and currently there is no
- widely agreed upon meaning across `sed' implementations. For GNU
- `sed', the interaction is defined to be: ignore matches before the
- NUMBERth, and then match and replace all matches from the NUMBERth
- on.
+ interaction in 's' command Note: the POSIX standard does not
+ specify what should happen when you mix the 'g' and NUMBER
+ modifiers, and currently there is no widely agreed upon meaning
+ across 'sed' implementations. For GNU 'sed', the interaction is
+ defined to be: ignore matches before the NUMBERth, and then match
+ and replace all matches from the NUMBERth on.
-`p'
+'p'
If the substitution was made, then print the new pattern space.
- Note: when both the `p' and `e' options are specified, the
- relative ordering of the two produces very different results. In
- general, `ep' (evaluate then print) is what you want, but
- operating the other way round can be useful for debugging. For
- this reason, the current version of GNU `sed' interprets specially
- the presence of `p' options both before and after `e', printing
- the pattern space before and after evaluation, while in general
- flags for the `s' command show their effect just once. This
- behavior, although documented, might change in future versions.
-
-`w FILE-NAME'
+ Note: when both the 'p' and 'e' options are specified, the relative
+ ordering of the two produces very different results. In general,
+ 'ep' (evaluate then print) is what you want, but operating the
+ other way round can be useful for debugging. For this reason, the
+ current version of GNU 'sed' interprets specially the presence of
+ 'p' options both before and after 'e', printing the pattern space
+ before and after evaluation, while in general flags for the 's'
+ command show their effect just once. This behavior, although
+ documented, might change in future versions.
+
+'w FILE-NAME'
If the substitution was made, then write out the result to the
- named file. As a GNU `sed' extension, two special values of
- FILE-NAME are supported: `/dev/stderr', which writes the result to
- the standard error, and `/dev/stdout', which writes to the standard
+ named file. As a GNU 'sed' extension, two special values of
+ FILE-NAME are supported: '/dev/stderr', which writes the result to
+ the standard error, and '/dev/stdout', which writes to the standard
output.(1)
-`e'
+'e'
This command allows one to pipe input from a shell command into
pattern space. If a substitution was made, the command that is
found in pattern space is executed and pattern space is replaced
with its output. A trailing newline is suppressed; results are
undefined if the command to be executed contains a NUL character.
- This is a GNU `sed' extension.
-
-`I'
-`i'
- The `I' modifier to regular-expression matching is a GNU extension
- which makes `sed' match REGEXP in a case-insensitive manner.
-
-`M'
-`m'
- The `M' modifier to regular-expression matching is a GNU `sed'
- extension which directs GNU `sed' to match the regular expression
- in `multi-line' mode. The modifier causes `^' and `$' to match
+ This is a GNU 'sed' extension.
+
+'I'
+'i'
+ The 'I' modifier to regular-expression matching is a GNU extension
+ which makes 'sed' match REGEXP in a case-insensitive manner.
+
+'M'
+'m'
+ The 'M' modifier to regular-expression matching is a GNU 'sed'
+ extension which directs GNU 'sed' to match the regular expression
+ in 'multi-line' mode. The modifier causes '^' and '$' to match
respectively (in addition to the normal behavior) the empty string
after a newline, and the empty string before a newline. There are
- special character sequences (`\`' and `\'') which always match the
+ special character sequences ('\`' and '\'') which always match the
beginning or the end of the buffer. In addition, the period
character does not match a new-line character in multi-line mode.
-
---------- Footnotes ----------
- (1) This is equivalent to `p' unless the `-i' option is being used.
+ (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
+
+3.4 Often-Used Commands
+=======================
+
+If you use 'sed' at all, you will quite likely want to know these
+commands.
+
+'#'
+ [No addresses allowed.]
+
+ The '#' character begins a comment; the comment continues until the
+ next newline.
+
+ If you are concerned about portability, be aware that some
+ implementations of 'sed' (which are not POSIX conforming) may only
+ support a single one-line comment, and then only when the very
+ first character of the script is a '#'.
+
+ Warning: if the first two characters of the 'sed' script are '#n',
+ then the '-n' (no-autoprint) option is forced. If you want to put
+ a comment in the first line of your script and that comment begins
+ with the letter 'n' and you do not want this behavior, then be sure
+ to either use a capital 'N', or place at least one space before the
+ 'n'.
+
+'q [EXIT-CODE]'
+ Exit 'sed' without processing any more commands or input.
+
+ Example: stop after printing the second line:
+ $ seq 3 | sed 2q
+ 1
+ 2
+
+ This command only accepts a single 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.
+
+ See also the GNU 'sed' extension 'Q' command which quits silently
+ without printing the current pattern space.
+
+'d'
+ Delete the pattern space; immediately start next cycle.
+
+ Example: delete the second input line:
+ $ seq 3 | sed 2d
+ 1
+ 3
+
+'p'
+ Print out the pattern space (to the standard output). This command
+ is usually only used in conjunction with the '-n' command-line
+ option.
+
+ Example: print only the second input line:
+ $ seq 3 | sed -n 2p
+ 2
+
+'n'
+ If auto-print is not disabled, print the pattern space, then,
+ regardless, replace the pattern space with the next line of input.
+ If there is no more input then 'sed' exits without processing any
+ more commands.
+
+ This command is useful to skip lines (e.g. process every Nth
+ line).
+
+ Example: perform substitution on every 3rd line (i.e. two 'n'
+ commands skip two lines):
+ $ seq 6 | sed 'n;n;s/./x/'
+ 1
+ 2
+ x
+ 4
+ 5
+ x
+
+ GNU 'sed' provides an extension address syntax of FIRST~STEP to
+ achieve the same result:
+
+ $ seq 6 | sed '0~3s/./x/'
+ 1
+ 2
+ x
+ 4
+ 5
+ x
+
+'{ COMMANDS }'
+ A group of commands may be enclosed between '{' and '}' characters.
+ This is particularly useful when you want a group of commands to be
+ triggered by a single address (or address-range) match.
+
+ Example: perform substitution then print the second input line:
+ $ seq 3 | sed -n '2{s/2/X/ ; p}'
+ X

-File: sed.info, Node: Other Commands, Next: Programming Commands, Prev: The "s" Command, Up: sed Programs
+File: sed.info-t, Node: Other Commands, Next: Programming Commands, Prev: Common Commands, Up: sed scripts
-3.6 Less Frequently-Used Commands
+3.5 Less Frequently-Used Commands
=================================
Though perhaps less frequently used than those in the previous section,
-some very small yet useful `sed' scripts can be built with these
+some very small yet useful 'sed' scripts can be built with these
commands.
-`y/SOURCE-CHARS/DEST-CHARS/'
- (The `/' characters may be uniformly replaced by any other single
- character within any given `y' command.)
-
+'y/SOURCE-CHARS/DEST-CHARS/'
Transliterate any characters in the pattern space which match any
of the SOURCE-CHARS with the corresponding character in DEST-CHARS.
- Instances of the `/' (or whatever other character is used in its
- stead), `\', or newlines can appear in the SOURCE-CHARS or
- DEST-CHARS lists, provide that each instance is escaped by a `\'.
+ Example: transliterate 'a-j' into '0-9':
+ $ echo hello world | sed 'y/abcdefghij/0123456789/'
+ 74llo worl3
+
+ (The '/' characters may be uniformly replaced by any other single
+ character within any given 'y' command.)
+
+ Instances of the '/' (or whatever other character is used in its
+ stead), '\', or newlines can appear in the SOURCE-CHARS or
+ DEST-CHARS lists, provide that each instance is escaped by a '\'.
The SOURCE-CHARS and DEST-CHARS lists _must_ contain the same
number of characters (after de-escaping).
-`a\'
-`TEXT'
- As a GNU extension, this command accepts two addresses.
+ See the 'tr' command from GNU coreutils for similar functionality.
- Queue the lines of text which follow this command (each but the
- last ending with a `\', which are removed from the output) to be
- output at the end of the current cycle, or when the next input
- line is read.
+'a TEXT'
+ Appending TEXT after a line. This is a GNU extension to the
+ standard 'a' command - see below for details.
- Escape sequences in TEXT are processed, so you should use `\\' in
- TEXT to print a single backslash.
+ Example: Add the word 'hello' after the second line:
+ $ seq 3 | sed '2a hello'
+ 1
+ 2
+ hello
+ 3
- As a GNU extension, if between the `a' and the newline there is
- other than a whitespace-`\' sequence, then the text of this line,
- starting at the first non-whitespace character after the `a', is
- taken as the first line of the TEXT block. (This enables a
- simplification in scripting a one-line add.) This extension also
- works with the `i' and `c' commands.
+ Leading whitespaces after the 'a' command are ignored. The text to
+ add is read until the end of the line.
+
+'a\'
+'TEXT'
+ Appending TEXT after a line.
+
+ Example: Add 'hello' after the second line (-| indicates printed
+ output lines):
+ $ seq 3 | sed '2a\
+ hello'
+ -|1
+ -|2
+ -|hello
+ -|3
+
+ The 'a' command queues the lines of text which follow this command
+ (each but the last ending with a '\', which are removed from the
+ output) to be output at the end of the current cycle, or when the
+ next input line is read.
-`i\'
-`TEXT'
As a GNU extension, this command accepts two addresses.
- Immediately output the lines of text which follow this command
- (each but the last ending with a `\', which are removed from the
- output).
+ Escape sequences in TEXT are processed, so you should use '\\' in
+ TEXT to print a single backslash.
-`c\'
-`TEXT'
- Delete the lines matching the address or address-range, and output
- the lines of text which follow this command (each but the last
- ending with a `\', which are removed from the output) in place of
- the last line (or in place of each line, if no addresses were
- specified). A new cycle is started after this command is done,
- since the pattern space will have been deleted.
+ The commands resume after the last line without a backslash ('\') -
+ 'world' in the following example:
+ $ seq 3 | sed '2a\
+ hello\
+ world
+ 3s/./X/'
+ -|1
+ -|2
+ -|hello
+ -|world
+ -|X
+
+ As a GNU extension, the 'a' command and TEXT can be separated into
+ two '-e' parameters, enabling easier scripting:
+ $ seq 3 | sed -e '2a\' -e hello
+ 1
+ 2
+ hello
+ 3
+
+ $ sed -e '2a\' -e "$VAR"
+
+'i TEXT'
+ insert TEXT before a line. This is a GNU extension to the standard
+ 'i' command - see below for details.
+
+ Example: Insert the word 'hello' before the second line:
+ $ seq 3 | sed '2i hello'
+ 1
+ hello
+ 2
+ 3
+
+ Leading whitespaces after the 'i' command are ignored. The text to
+ add is read until the end of the line.
+
+'i\'
+'TEXT'
+ Immediately output the lines of text which follow this command.
+
+ Example: Insert 'hello' before the second line (-| indicates
+ printed output lines):
+ $ seq 3 | sed '2i\
+ hello'
+ -|1
+ -|hello
+ -|2
+ -|3
-`='
As a GNU extension, this command accepts two addresses.
+ Escape sequences in TEXT are processed, so you should use '\\' in
+ TEXT to print a single backslash.
+
+ The commands resume after the last line without a backslash ('\') -
+ 'world' in the following example:
+ $ seq 3 | sed '2i\
+ hello\
+ world
+ s/./X/'
+ -|X
+ -|hello
+ -|world
+ -|X
+ -|X
+
+ As a GNU extension, the 'i' command and TEXT can be separated into
+ two '-e' parameters, enabling easier scripting:
+ $ seq 3 | sed -e '2i\' -e hello
+ 1
+ hello
+ 2
+ 3
+
+ $ sed -e '2i\' -e "$VAR"
+
+'c TEXT'
+ Replaces the line(s) with TEXT. This is a GNU extension to the
+ standard 'c' command - see below for details.
+
+ Example: Replace the 2nd to 9th lines with the word 'hello':
+ $ seq 10 | sed '2,9c hello'
+ 1
+ hello
+ 10
+
+ Leading whitespaces after the 'c' command are ignored. The text to
+ add is read until the end of the line.
+
+'c\'
+'TEXT'
+ Delete the lines matching the address or address-range, and output
+ the lines of text which follow this command.
+
+ Example: Replace 2nd to 4th lines with the words 'hello' and
+ 'world' (-| indicates printed output lines):
+ $ seq 5 | sed '2,4c\
+ hello\
+ world'
+ -|1
+ -|hello
+ -|world
+ -|5
+
+ If no addresses are given, each line is replaced.
+
+ A new cycle is started after this command is done, since the
+ pattern space will have been deleted. In the following example,
+ the 'c' starts a new cycle and the substitution command is not
+ performed on the replaced text:
+
+ $ seq 3 | sed '2c\
+ hello
+ s/./X/'
+ -|X
+ -|hello
+ -|X
+
+ As a GNU extension, the 'c' command and TEXT can be separated into
+ two '-e' parameters, enabling easier scripting:
+ $ seq 3 | sed -e '2c\' -e hello
+ 1
+ hello
+ 3
+
+ $ sed -e '2c\' -e "$VAR"
+
+'='
Print out the current input line number (with a trailing newline).
-`l N'
+ $ printf '%s\n' aaa bbb ccc | sed =
+ 1
+ aaa
+ 2
+ bbb
+ 3
+ ccc
+
+ As a GNU extension, this command accepts two addresses.
+
+'l N'
Print the pattern space in an unambiguous form: non-printable
- characters (and the `\' character) are printed in C-style escaped
- form; long lines are split, with a trailing `\' character to
- indicate the split; the end of each line is marked with a `$'.
+ characters (and the '\' character) are printed in C-style escaped
+ form; long lines are split, with a trailing '\' character to
+ indicate the split; the end of each line is marked with a '$'.
N specifies the desired line-wrap length; a length of 0 (zero)
means to never wrap long lines. If omitted, the default as
specified on the command line is used. The N parameter is a GNU
- `sed' extension.
+ 'sed' extension.
-`r FILENAME'
- As a GNU extension, this command accepts two addresses.
+'r FILENAME'
+
+ Reads text file a file. Example:
+
+ $ seq 3 | sed '2r/etc/hostname'
+ 1
+ 2
+ fencepost.gnu.org
+ 3
Queue the contents of FILENAME to be read and inserted into the
output stream at the end of the current cycle, or when the next
input line is read. Note that if FILENAME cannot be read, it is
treated as if it were an empty file, without any error indication.
- As a GNU `sed' extension, the special value `/dev/stdin' is
+ As a GNU 'sed' extension, the special value '/dev/stdin' is
supported for the file name, which reads the contents of the
standard input.
-`w FILENAME'
- Write the pattern space to FILENAME. As a GNU `sed' extension,
- two special values of FILE-NAME are supported: `/dev/stderr',
- which writes the result to the standard error, and `/dev/stdout',
- which writes to the standard output.(1)
+ As a GNU extension, this command accepts two addresses. The file
+ will then be reread and inserted on each of the addressed lines.
- The file will be created (or truncated) before the first input
- line is read; all `w' commands (including instances of the `w' flag
- on successful `s' commands) which refer to the same FILENAME are
+'w FILENAME'
+ Write the pattern space to FILENAME. As a GNU 'sed' extension, two
+ special values of FILE-NAME are supported: '/dev/stderr', which
+ writes the result to the standard error, and '/dev/stdout', which
+ writes to the standard output.(1)
+
+ The file will be created (or truncated) before the first input line
+ is read; all 'w' commands (including instances of the 'w' flag on
+ successful 's' commands) which refer to the same FILENAME are
output without closing and reopening the file.
-`D'
+'D'
If pattern space contains no newline, start a normal new cycle as
- if the `d' command was issued. Otherwise, delete text in the
+ if the 'd' command was issued. Otherwise, delete text in the
pattern space up to the first newline, and restart cycle with the
resultant pattern space, without reading a new line of input.
-`N'
+'N'
Add a newline to the pattern space, then append the next line of
- input to the pattern space. If there is no more input then `sed'
+ input to the pattern space. If there is no more input then 'sed'
exits without processing any more commands.
-`P'
+ When '-z' is used, a zero byte (the ascii 'NUL' character) is added
+ between the lines (instead of a new line).
+
+ By default 'sed' does not terminate if there is no 'next' input
+ line. This is a GNU extension which can be disabled with
+ '--posix'. *Note N command on the last line: N_command_last_line.
+
+'P'
Print out the portion of the pattern space up to the first newline.
-`h'
+'h'
Replace the contents of the hold space with the contents of the
pattern space.
-`H'
- Append a newline to the contents of the hold space, and then
- append the contents of the pattern space to that of the hold space.
+'H'
+ Append a newline to the contents of the hold space, and then append
+ the contents of the pattern space to that of the hold space.
-`g'
+'g'
Replace the contents of the pattern space with the contents of the
hold space.
-`G'
+'G'
Append a newline to the contents of the pattern space, and then
append the contents of the hold space to that of the pattern space.
-`x'
+'x'
Exchange the contents of the hold and pattern spaces.
-
---------- Footnotes ----------
- (1) This is equivalent to `p' unless the `-i' option is being used.
+ (1) This is equivalent to 'p' unless the '-i' option is being used.

-File: sed.info, Node: Programming Commands, Next: Extended Commands, Prev: Other Commands, Up: sed Programs
+File: sed.info-t, Node: Programming Commands, Next: Extended Commands, Prev: Other Commands, Up: sed scripts
-3.7 Commands for `sed' gurus
+3.6 Commands for 'sed' gurus
============================
In most cases, use of these commands indicates that you are probably
-better off programming in something like `awk' or Perl. But
-occasionally one is committed to sticking with `sed', and these
-commands can enable one to write quite convoluted scripts.
+better off programming in something like 'awk' or Perl. But
+occasionally one is committed to sticking with 'sed', and these commands
+can enable one to write quite convoluted scripts.
-`: LABEL'
+': LABEL'
[No addresses allowed.]
Specify the location of LABEL for branch commands. In all other
respects, a no-op.
-`b LABEL'
+'b LABEL'
Unconditionally branch to LABEL. The LABEL may be omitted, in
which case the next cycle is started.
-`t LABEL'
- Branch to LABEL only if there has been a successful `s'ubstitution
+'t LABEL'
+ Branch to LABEL only if there has been a successful 's'ubstitution
since the last input line was read or conditional branch was taken.
The LABEL may be omitted, in which case the next cycle is started.
-

-File: sed.info, Node: Extended Commands, Next: Escapes, Prev: Programming Commands, Up: sed Programs
+File: sed.info-t, Node: Extended Commands, Prev: Programming Commands, Up: sed scripts
-3.8 Commands Specific to GNU `sed'
+3.7 Commands Specific to GNU 'sed'
==================================
-These commands are specific to GNU `sed', so you must use them with
-care and only when you are sure that hindering portability is not evil.
-They allow you to check for GNU `sed' extensions or to do tasks that
-are required quite often, yet are unsupported by standard `sed's.
+These commands are specific to GNU 'sed', so you must use them with care
+and only when you are sure that hindering portability is not evil. They
+allow you to check for GNU 'sed' extensions or to do tasks that are
+required quite often, yet are unsupported by standard 'sed's.
-`e [COMMAND]'
+'e [COMMAND]'
This command allows one to pipe input from a shell command into
- pattern space. Without parameters, the `e' command executes the
+ pattern space. Without parameters, the 'e' command executes the
command that is found in pattern space and replaces the pattern
space with the output; a trailing newline is suppressed.
- If a parameter is specified, instead, the `e' command interprets
- it as a command and sends its output to the output stream. The
+ If a parameter is specified, instead, the 'e' command interprets it
+ as a command and sends its output to the output stream. The
command can run across multiple lines, all but the last ending with
a back-slash.
In both cases, the results are undefined if the command to be
executed contains a NUL character.
- Note that, unlike the `r' command, the output of the command will
- be printed immediately; the `r' command instead delays the output
+ Note that, unlike the 'r' command, the output of the command will
+ be printed immediately; the 'r' command instead delays the output
to the end of the current cycle.
-`F'
+'F'
Print out the file name of the current input file (with a trailing
newline).
-`L N'
- This GNU `sed' extension fills and joins lines in pattern space to
- produce output lines of (at most) N characters, like `fmt' does;
- if N is omitted, the default as specified on the command line is
- used. This command is considered a failed experiment and unless
- there is enough request (which seems unlikely) will be removed in
- future versions.
-
-`Q [EXIT-CODE]'
+'Q [EXIT-CODE]'
This command only accepts a single 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 code to the caller.
+ 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
+ code to the caller.
This command can be useful because the only alternative ways to
- accomplish this apparently trivial function are to use the `-n'
+ accomplish this apparently trivial function are to use the '-n'
option (which can unnecessarily complicate your script) or
resorting to the following snippet, which wastes time by reading
the whole file without any visible effect:
@@ -1064,159 +1181,1204 @@ are required quite often, yet are unsupported by standard `sed's.
g Overwrite pattern space each time to save memory
b eat
-`R FILENAME'
+'R FILENAME'
Queue a line of FILENAME to be read and inserted into the output
- stream at the end of the current cycle, or when the next input
- line is read. Note that if FILENAME cannot be read, or if its end
- is reached, no line is appended, without any error indication.
+ stream at the end of the current cycle, or when the next input line
+ is read. Note that if FILENAME cannot be read, or if its end is
+ reached, no line is appended, without any error indication.
- As with the `r' command, the special value `/dev/stdin' is
+ As with the 'r' command, the special value '/dev/stdin' is
supported for the file name, which reads a line from the standard
input.
-`T LABEL'
+'T LABEL'
Branch to LABEL only if there have been no successful
- `s'ubstitutions since the last input line was read or conditional
- branch was taken. The LABEL may be omitted, in which case the next
+ 's'ubstitutions since the last input line was read or conditional
+ branch was taken. The LABEL may be omitted, in which case the next
cycle is started.
-`v VERSION'
- This command does nothing, but makes `sed' fail if GNU `sed'
+'v VERSION'
+ This command does nothing, but makes 'sed' fail if GNU 'sed'
extensions are not supported, simply because other versions of
- `sed' do not implement it. In addition, you can specify the
- version of `sed' that your script requires, such as `4.0.5'. The
- default is `4.0' because that is the first version that
- implemented this command.
+ 'sed' do not implement it. In addition, you can specify the
+ version of 'sed' that your script requires, such as '4.0.5'. The
+ default is '4.0' because that is the first version that implemented
+ this command.
- This command enables all GNU extensions even if `POSIXLY_CORRECT'
+ This command enables all GNU extensions even if 'POSIXLY_CORRECT'
is set in the environment.
-`W FILENAME'
+'W FILENAME'
Write to the given filename the portion of the pattern space up to
- the first newline. Everything said under the `w' command about
+ the first newline. Everything said under the 'w' command about
file handling holds here too.
-`z'
+'z'
This command empties the content of pattern space. It is usually
- the same as `s/.*//', but is more efficient and works in the
- presence of invalid multibyte sequences in the input stream.
- POSIX mandates that such sequences are _not_ matched by `.', so
- that there is no portable way to clear `sed''s buffers in the
- middle of the script in most multibyte locales (including UTF-8
- locales).
+ the same as 's/.*//', but is more efficient and works in the
+ presence of invalid multibyte sequences in the input stream. POSIX
+ mandates that such sequences are _not_ matched by '.', so that
+ there is no portable way to clear 'sed''s buffers in the middle of
+ the script in most multibyte locales (including UTF-8 locales).
+
+
+File: sed.info-t, Node: sed addresses, Next: sed regular expressions, Prev: sed scripts, Up: Top
+
+4 Addresses: selecting lines
+****************************
+
+* Menu:
+
+* Addresses overview:: Addresses overview
+* Numeric Addresses:: selecting lines by numbers
+* Regexp Addresses:: selecting lines by text matching
+* Range Addresses:: selecting a range of lines
+
+
+File: sed.info-t, Node: Addresses overview, Next: Numeric Addresses, Up: sed addresses
+
+4.1 Addresses overview
+======================
+
+Addresses determine on which line(s) the 'sed' command will be executed.
+The following command replaces the word 'hello' with 'world' only on
+line 144:
+
+ sed '144s/hello/world/' input.txt > output.txt
+
+ If no addresses are given, the command is performed on all lines.
+The following command replaces the word 'hello' with 'world' on all
+lines in the input file:
+
+ sed 's/hello/world/' input.txt > output.txt
+
+ Addresses can contain regular expressions to match lines based on
+content instead of line numbers. The following command replaces the
+word 'hello' with 'world' only in lines containing the word 'apple':
+
+ sed '/apple/s/hello/world/' input.txt > output.txt
+
+ An address range is specified with two addresses separated by a comma
+(','). Addresses can be numeric, regular expressions, or a mix of both.
+The following command replaces the word 'hello' with 'world' only in
+lines 4 to 17 (inclusive):
+
+ sed '4,17s/hello/world/' input.txt > output.txt
+
+ Appending the '!' character to the end of an address specification
+(before the command letter) negates the sense of the match. That is, if
+the '!' character follows an address or an address range, then only
+lines which do _not_ match the addresses will be selected. The
+following command replaces the word 'hello' with 'world' only in lines
+_not_ containing the word 'apple':
+
+ sed '/apple/!s/hello/world/' input.txt > output.txt
+
+ The following command replaces the word 'hello' with 'world' only in
+lines 1 to 3 and 18 till the last line of the input file (i.e.
+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
+
+4.2 Selecting lines by numbers
+==============================
+
+Addresses in a 'sed' script can be in any of the following forms:
+'NUMBER'
+ Specifying a line number will match only that line in the input.
+ (Note that 'sed' counts lines continuously across all input files
+ unless '-i' or '-s' options are specified.)
+
+'$'
+ This address matches the last line of the last file of input, or
+ the last line of each file when the '-i' or '-s' options are
+ specified.
+
+'FIRST~STEP'
+ This GNU extension matches every STEPth line starting with line
+ FIRST. In particular, lines will be selected when there exists a
+ non-negative N such that the current line-number equals FIRST + (N
+ * STEP). Thus, one would use '1~2' to select the odd-numbered
+ lines and '0~2' for even-numbered lines; to pick every third line
+ starting with the second, '2~3' would be used; to pick every fifth
+ line starting with the tenth, use '10~5'; and '50~0' is just an
+ obscure way of saying '50'.
+
+ The following commands demonstrate the step address usage:
+
+ $ seq 10 | sed -n '0~4p'
+ 4
+ 8
+
+ $ seq 10 | sed -n '1~3p'
+ 1
+ 4
+ 7
+ 10
+
+
+File: sed.info-t, Node: Regexp Addresses, Next: Range Addresses, Prev: Numeric Addresses, Up: sed addresses
+
+4.3 selecting lines by text matching
+====================================
+
+GNU 'sed' supports the following regular expression addresses. The
+default regular expression is *note Basic Regular Expression (BRE): BRE
+syntax. If '-E' or '-r' options are used, The regular expression should
+be in *note Extended Regular Expression (ERE): ERE syntax. syntax.
+*Note BRE vs ERE::.
+
+'/REGEXP/'
+ This will select any line which matches the regular expression
+ REGEXP. If REGEXP itself includes any '/' characters, each must be
+ escaped by a backslash ('\').
+
+ The following command prints lines in '/etc/passwd' which end with
+ 'bash'(1):
+
+ sed -n '/bash$/p' /etc/passwd
+
+ The empty regular expression '//' repeats the last regular
+ expression match (the same holds if the empty regular expression is
+ passed to the 's' command). Note that modifiers to regular
+ expressions are evaluated when the regular expression is compiled,
+ thus it is invalid to specify them together with the empty regular
+ expression.
+
+'\%REGEXP%'
+ (The '%' may be replaced by any other single character.)
+
+ This also matches the regular expression REGEXP, but allows one to
+ use a different delimiter than '/'. This is particularly useful if
+ the REGEXP itself contains a lot of slashes, since it avoids the
+ tedious escaping of every '/'. If REGEXP itself includes any
+ delimiter characters, each must be escaped by a backslash ('\').
+
+ The following two commands are equivalent. They print lines which
+ start with '/home/alice/documents/':
+
+ sed -n '/^\/home\/alice\/documents\//p'
+ sed -n '\%^/home/alice/documents/%p'
+ sed -n '\;^/home/alice/documents/;p'
+
+'/REGEXP/I'
+'\%REGEXP%I'
+ The 'I' modifier to regular-expression matching is a GNU extension
+ which causes the REGEXP to be matched in a case-insensitive manner.
+
+ 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').
+
+ Observe the difference between the following examples.
+
+ In this example, '/b/I' is the address: regular expression with 'I'
+ modifier. 'd' is the delete command:
+
+ $ printf "%s\n" a b c | sed '/b/Id'
+ a
+ c
+
+ Here, '/b/' is the address: a regular expression. 'i' is the
+ insert command. 'd' is the value to insert. A line with 'd' is
+ then inserted above the matched line:
+
+ $ printf "%s\n" a b c | sed '/b/id'
+ a
+ d
+ b
+ c
+
+'/REGEXP/M'
+'\%REGEXP%M'
+ The 'M' modifier to regular-expression matching is a GNU 'sed'
+ extension which directs GNU 'sed' to match the regular expression
+ in 'multi-line' mode. The modifier causes '^' and '$' to match
+ respectively (in addition to the normal behavior) the empty string
+ after a newline, and the empty string before a newline. There are
+ special character sequences ('\`' and '\'') which always match the
+ beginning or the end of the buffer. In addition, the period
+ character does not match a new-line character in multi-line mode.
+
+ ---------- Footnotes ----------
+
+ (1) There are of course many other ways to do the same, e.g.
+ grep 'bash$' /etc/passwd
+ awk -F: '$7 == "/bin/bash"' /etc/passwd

-File: sed.info, Node: Escapes, Prev: Extended Commands, Up: sed Programs
+File: sed.info-t, Node: Range Addresses, Prev: Regexp Addresses, Up: sed addresses
+
+4.4 Range Addresses
+===================
+
+An address range can be specified by specifying two addresses separated
+by a comma (','). An address range matches lines starting from where
+the first address matches, and continues until the second address
+matches (inclusively):
+
+ $ seq 10 | sed -n '4,6p'
+ 4
+ 5
+ 6
+
+ If the second address is a REGEXP, then checking for the ending match
+will start with the line _following_ the line which matched the first
+address: a range will always span at least two lines (except of course
+if the input stream ends).
+
+ $ seq 10 | sed -n '4,/[0-9]/p'
+ 4
+ 5
-3.9 GNU Extensions for Escapes in Regular Expressions
+ If the second address is a NUMBER less than (or equal to) the line
+matching the first address, then only the one line is matched:
+
+ $ seq 10 | sed -n '4,1p'
+ 4
+
+ GNU 'sed' also supports some special two-address forms; all these are
+GNU extensions:
+'0,/REGEXP/'
+ A line number of '0' can be used in an address specification like
+ '0,/REGEXP/' so that 'sed' will try to match REGEXP in the first
+ input line too. In other words, '0,/REGEXP/' is similar to
+ '1,/REGEXP/', except that if ADDR2 matches the very first line of
+ input the '0,/REGEXP/' form will consider it to end the range,
+ whereas the '1,/REGEXP/' form will match the beginning of its range
+ and hence make the range span up to the _second_ occurrence of the
+ regular expression.
+
+ Note that this is the only place where the '0' address makes sense;
+ there is no 0-th line and commands which are given the '0' address
+ in any other way will give an error.
+
+ The following examples demonstrate the difference between starting
+ with address 1 and 0:
+
+ $ seq 10 | sed -n '1,/[0-9]/p'
+ 1
+ 2
+
+ $ seq 10 | sed -n '0,/[0-9]/p'
+ 1
+
+'ADDR1,+N'
+ Matches ADDR1 and the N lines following ADDR1.
+
+ $ seq 10 | sed -n '6,+2p'
+ 6
+ 7
+ 8
+
+ ADDR1 can be a line number or a regular expression.
+
+'ADDR1,~N'
+ Matches ADDR1 and the lines following ADDR1 until the next line
+ whose input line number is a multiple of N. The following command
+ prints starting at line 6, until the next line which is a multiple
+ of 4 (i.e. line 8):
+
+ $ seq 10 | sed -n '6,~4p'
+ 6
+ 7
+ 8
+
+ 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
+
+5 Regular Expressions: selecting text
+*************************************
+
+* Menu:
+
+* Regular Expressions Overview:: Overview of Regular expression in 'sed'
+* BRE vs ERE:: Basic (BRE) and extended (ERE) regular expression
+ syntax
+* BRE syntax:: Overview of basic regular expression syntax
+* ERE syntax:: Overview of extended regular expression syntax
+* Character Classes and Bracket Expressions::
+* regexp extensions:: Additional regular expression commands
+* Back-references and Subexpressions:: Back-references and Subexpressions
+* Escapes:: Specifying special characters
+* Locale Considerations::
+
+
+File: sed.info-t, Node: Regular Expressions Overview, Next: BRE vs ERE, Up: sed regular expressions
+
+5.1 Overview of regular expression in 'sed'
+===========================================
+
+To know how to use 'sed', people should understand regular expressions
+("regexp" for short). A regular expression is a pattern that is matched
+against a subject string from left to right. Most characters are
+"ordinary": they stand for themselves in a pattern, and match the
+corresponding characters. Regular expressions in 'sed' are specified
+between two slashes.
+
+ The following command prints lines containing the word 'hello':
+
+ sed -n '/hello/p'
+
+ The above example is equivalent to this 'grep' command:
+
+ grep 'hello'
+
+ The power of regular expressions comes from the ability to include
+alternatives and repetitions in the pattern. These are encoded in the
+pattern by the use of "special characters", which do not stand for
+themselves but instead are interpreted in some special way.
+
+ The character '^' (caret) in a regular expression matches the
+beginning of the line. The character '.' (dot) matches any single
+character. The following 'sed' command matches and prints lines which
+start with the letter 'b', followed by any single character, followed by
+the letter 'd':
+
+ $ printf "%s\n" abode bad bed bit bid byte body | sed -n '/^b.d/p'
+ bad
+ bed
+ bid
+ body
+
+ The following sections explain the meaning and usage of special
+characters in regular expressions.
+
+
+File: sed.info-t, Node: BRE vs ERE, Next: BRE syntax, Prev: Regular Expressions Overview, Up: sed regular expressions
+
+5.2 Basic (BRE) and extended (ERE) regular expression
=====================================================
-Until this chapter, we have only encountered escapes of the form `\^',
-which tell `sed' not to interpret the circumflex as a special
-character, but rather to take it literally. For example, `\*' matches
-a single asterisk rather than zero or more backslashes.
+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').
+
+ In GNU 'sed' the only difference between basic and extended regular
+expressions is in the behavior of a few special characters: '?', '+',
+parentheses, braces ('{}'), and '|'.
+
+ With basic (BRE) syntax, these characters do not have special meaning
+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
+special
+meta-character)
+
+
+File: sed.info-t, Node: BRE syntax, Next: ERE syntax, Prev: BRE vs ERE, Up: sed regular expressions
+
+5.3 Overview of basic regular expression syntax
+===============================================
+
+Here is a brief description of regular expression syntax as used in
+'sed'.
+
+'CHAR'
+ A single ordinary character matches itself.
+
+'*'
+ 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 '\', a '.', a grouped regexp (see
+ below), or a bracket expression. As a GNU extension, a postfixed
+ regular expression can also be followed by '*'; for example, 'a**'
+ is equivalent to 'a*'. POSIX 1003.1-2001 says that '*' stands for
+ itself when it appears at the start of a regular expression or
+ subexpression, but many nonGNU implementations do not support this
+ and portable scripts should instead use '\*' in these contexts.
+'.'
+ Matches any character, including newline.
+
+'^'
+ Matches the null string at beginning of the pattern space, i.e.
+ what appears after the circumflex must appear at the beginning of
+ the pattern space.
+
+ In most scripts, pattern space is initialized to the content of
+ each line (*note How 'sed' works: Execution Cycle.). So, it is a
+ useful simplification to think of '^#include' as matching only
+ lines where '#include' is the first thing on line--if there are
+ spaces before, for example, the match fails. This simplification
+ is valid as long as the original content of pattern space is not
+ modified, for example with an 's' command.
+
+ '^' acts as a special character only at the beginning of the
+ regular expression or subexpression (that is, after '\(' or '\|').
+ Portable scripts should avoid '^' at the beginning of a
+ subexpression, though, as POSIX allows implementations that treat
+ '^' as an ordinary character in that context.
+
+'$'
+ It is the same as '^', but refers to end of pattern space. '$'
+ also acts as a special character only at the end of the regular
+ expression or subexpression (that is, before '\)' or '\|'), and its
+ use at the end of a subexpression is not portable.
+
+'[LIST]'
+'[^LIST]'
+ Matches any single character in LIST: for example, '[aeiou]'
+ matches all vowels. A list may include sequences like
+ 'CHAR1-CHAR2', which matches any character between (inclusive)
+ CHAR1 and CHAR2. *Note Character Classes and Bracket
+ Expressions::.
+
+'\+'
+ As '*', but matches one or more. It is a GNU extension.
+
+'\?'
+ As '*', but only matches zero or one. It is a GNU extension.
+
+'\{I\}'
+ As '*', but matches exactly I sequences (I is a decimal integer;
+ for portability, keep it between 0 and 255 inclusive).
+
+'\{I,J\}'
+ Matches between I and J, inclusive, sequences.
+
+'\{I,\}'
+ Matches more than or equal to I sequences.
+
+'\(REGEXP\)'
+ Groups the inner REGEXP as a whole, this is used to:
+
+ * Apply postfix operators, like '\(abcd\)*': this will search
+ for zero or more whole sequences of 'abcd', while 'abcd*'
+ would search for 'abc' followed by zero or more occurrences of
+ 'd'. Note that support for '\(abcd\)*' is required by POSIX
+ 1003.1-2001, but many non-GNU implementations do not support
+ it and hence it is not universally portable.
+
+ * Use back references (see below).
+
+'REGEXP1\|REGEXP2'
+ Matches either REGEXP1 or 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 GNU extension.
+
+'REGEXP1REGEXP2'
+ Matches the concatenation of REGEXP1 and REGEXP2. Concatenation
+ binds more tightly than '\|', '^', and '$', but less tightly than
+ the other regular expression operators.
+
+'\DIGIT'
+ Matches the DIGIT-th '\(...\)' parenthesized subexpression in the
+ regular expression. This is called a "back reference".
+ Subexpressions are implicitly numbered by counting occurrences of
+ '\(' left-to-right.
+
+'\n'
+ Matches the newline character.
+
+'\CHAR'
+ Matches CHAR, where CHAR is one of '$', '*', '.', '[', '\', or '^'.
+ Note that the only C-like backslash sequences that you can portably
+ assume to be interpreted are '\n' and '\\'; in particular '\t' is
+ not portable, and matches a 't' under most implementations of
+ 'sed', rather than a tab character.
+
+ Note that the regular expression matcher is greedy, i.e., matches are
+attempted from left to right and, if two or more matches are possible
+starting at the same character, it selects the longest.
+
+Examples:
+'abcdef'
+ Matches 'abcdef'.
+
+'a*b'
+ Matches zero or more 'a's followed by a single 'b'. For example,
+ 'b' or 'aaaaab'.
+
+'a\?b'
+ Matches 'b' or 'ab'.
+
+'a\+b\+'
+ Matches one or more 'a's followed by one or more 'b's: 'ab' is the
+ shortest possible match, but other examples are 'aaaab' or 'abbbbb'
+ or 'aaaaaabbbbbbb'.
+
+'.*'
+'.\+'
+ These two both match all the characters in a string; however, the
+ first matches every string (including the empty string), while the
+ second matches only strings containing at least one character.
+
+'^main.*(.*)'
+ This matches a string starting with 'main', followed by an opening
+ and closing parenthesis. The 'n', '(' and ')' need not be
+ adjacent.
+
+'^#'
+ This matches a string beginning with '#'.
+
+'\\$'
+ This matches a string ending with a single backslash. The regexp
+ contains two backslashes for escaping.
+
+'\$'
+ Instead, this matches a string consisting of a single dollar sign,
+ because it is escaped.
+
+'[a-zA-Z0-9]'
+ In the C locale, this matches any ASCII letters or digits.
+
+'[^ 'tab']\+'
+ (Here 'tab' stands for a single tab character.) This matches a
+ string of one or more characters, none of which is a space or a
+ tab. Usually this means a word.
+
+'^\(.*\)\n\1$'
+ This matches a string consisting of two equal substrings separated
+ by a newline.
+
+'.\{9\}A$'
+ This matches nine characters followed by an 'A' at the end of a
+ line.
+
+'^.\{15\}A'
+ This matches the start of a string that contains 16 characters, the
+ 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
+
+5.4 Overview of extended regular expression syntax
+==================================================
+
+The only difference between basic and extended regular expressions is in
+the behavior of a few characters: '?', '+', parentheses, braces ('{}'),
+and '|'. While basic regular expressions require these to be escaped if
+you want them to behave as special characters, when using extended
+regular expressions you must escape them if you want them _to match a
+literal character_. '|' is special here because '\|' is a GNU extension
+- standard basic regular expressions do not provide its functionality.
+
+Examples:
+'abc?'
+ becomes 'abc\?' when using extended regular expressions. It
+ matches the literal string 'abc?'.
+
+'c\+'
+ becomes 'c+' when using extended regular expressions. It matches
+ one or more 'c's.
+
+'a\{3,\}'
+ becomes 'a{3,}' when using extended regular expressions. It
+ matches three or more 'a's.
+
+'\(abc\)\{2,3\}'
+ becomes '(abc){2,3}' when using extended regular expressions. It
+ matches either 'abcabc' or 'abcabcabc'.
+
+'\(abc*\)\1'
+ becomes '(abc*)\1' when using extended regular expressions.
+ Backreferences must still be escaped when using extended regular
+ expressions.
+
+'a\|b'
+ becomes 'a|b' when using extended regular expressions. It matches
+ 'a' or 'b'.
+
+
+File: sed.info-t, Node: Character Classes and Bracket Expressions, Next: regexp extensions, Prev: ERE syntax, Up: sed regular expressions
+
+5.5 Character Classes and Bracket Expressions
+=============================================
+
+A "bracket expression" is a list of characters enclosed by '[' and ']'.
+It matches any single character in that list; if the first character of
+the list is the caret '^', then it matches any character *not* in the
+list. For example, the following command replaces the words 'gray' or
+'grey' with 'blue':
+
+ sed 's/gr[ae]y/blue/'
+
+ Bracket expressions can be used in both *note basic: BRE syntax. and
+*note extended: ERE syntax. regular expressions (that is, with or
+without the '-E'/'-r' options).
+
+ Within a bracket expression, a "range expression" consists of two
+characters separated by a hyphen. It matches any single character that
+sorts between the two characters, inclusive. In the default C locale,
+the sorting sequence is the native character order; for example, '[a-d]'
+is equivalent to '[abcd]'.
+
+ Finally, certain named classes of characters are predefined within
+bracket expressions, as follows.
+
+ These named classes must be used _inside_ brackets themselves.
+Correct usage:
+ $ echo 1 | sed 's/[[:digit:]]/X/'
+ X
+
+ Incorrect usage is rejected by newer 'sed' versions. Older versions
+accepted it but treated it as a single bracket expression (which is
+equivalent to '[dgit:]', that is, only the characters D/G/I/T/:):
+ # current GNU sed versions - incorrect usage rejected
+ $ echo 1 | sed 's/[:digit:]/X/'
+ sed: character class syntax is [[:space:]], not [:space:]
+
+ # older GNU sed versions
+ $ echo 1 | sed 's/[:digit:]/X/'
+ 1
+
+'[:alnum:]'
+ Alphanumeric characters: '[:alpha:]' and '[:digit:]'; in the 'C'
+ locale and ASCII character encoding, this is the same as
+ '[0-9A-Za-z]'.
+
+'[:alpha:]'
+ Alphabetic characters: '[:lower:]' and '[:upper:]'; in the 'C'
+ locale and ASCII character encoding, this is the same as
+ '[A-Za-z]'.
+
+'[:blank:]'
+ Blank characters: space and tab.
+
+'[:cntrl:]'
+ Control characters. In ASCII, these characters have octal codes
+ 000 through 037, and 177 (DEL). In other character sets, these are
+ the equivalent characters, if any.
+
+'[:digit:]'
+ Digits: '0 1 2 3 4 5 6 7 8 9'.
+
+'[:graph:]'
+ Graphical characters: '[:alnum:]' and '[:punct:]'.
+
+'[:lower:]'
+ Lower-case letters; in the 'C' locale and ASCII character encoding,
+ this is 'a b c d e f g h i j k l m n o p q r s t u v w x y z'.
+
+'[:print:]'
+ Printable characters: '[:alnum:]', '[:punct:]', and space.
+
+'[:punct:]'
+ Punctuation characters; in the 'C' locale and ASCII character
+ encoding, this is '! " # $ % & ' ( ) * + , - . / : ; < = > ? @ [ \
+ ] ^ _ ` { | } ~'.
+
+'[:space:]'
+ Space characters: in the 'C' locale, this is tab, newline, vertical
+ tab, form feed, carriage return, and space.
+
+'[:upper:]'
+ Upper-case letters: in the 'C' locale and ASCII character encoding,
+ this is 'A B C D E F G H I J K L M N O P Q R S T U V W X Y Z'.
+
+'[:xdigit:]'
+ Hexadecimal digits: '0 1 2 3 4 5 6 7 8 9 A B C D E F a b c d e f'.
+
+ Note that the brackets in these class names are part of the symbolic
+names, and must be included in addition to the brackets delimiting the
+bracket expression.
+
+ Most meta-characters lose their special meaning inside bracket
+expressions:
+
+']'
+ ends the bracket expression if it's not the first list item. So,
+ if you want to make the ']' character a list item, you must put it
+ first.
+
+'-'
+ represents the range if it's not first or last in a list or the
+ ending point of a range.
+
+'^'
+ represents the characters not in the list. If you want to make the
+ '^' character a list item, place it anywhere but first.
+
+ TODO: incorporate this paragraph (copied verbatim from BRE section).
+
+ The characters '$', '*', '.', '[', and '\' are normally not special
+within LIST. For example, '[\*]' matches either '\' or '*', because the
+'\' is not special here. However, strings like '[.ch.]', '[=a=]', and
+'[:space:]' are special within LIST and represent collating symbols,
+equivalence classes, and character classes, respectively, and '[' is
+therefore special within LIST when it is followed by '.', '=', or ':'.
+Also, when not in 'POSIXLY_CORRECT' mode, special escapes like '\n' and
+'\t' are recognized within LIST. *Note Escapes::.
+
+'[.'
+ represents the open collating symbol.
+
+'.]'
+ represents the close collating symbol.
+
+'[='
+ represents the open equivalence class.
+
+'=]'
+ represents the close equivalence class.
+
+'[:'
+ represents the open character class symbol, and should be followed
+ by a valid character class name.
+
+':]'
+ 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
+
+5.6 regular expression extensions
+=================================
+
+The following sequences have special meaning inside regular expressions
+(used in *note addresses: Regexp Addresses. and the 's' command).
+
+ These can be used in both *note basic: BRE syntax. and *note
+extended: ERE syntax. regular expressions (that is, with or without the
+'-E'/'-r' options).
+
+'\w'
+ Matches any "word" character. A "word" character is any letter or
+ digit or the underscore character.
+
+ $ echo "abc %-= def." | sed 's/\w/X/g'
+ XXX %-= XXX.
+
+'\W'
+ Matches any "non-word" character.
+
+ $ echo "abc %-= def." | sed 's/\W/X/g'
+ abcXXXXXdefX
+
+'\b'
+ Matches a word boundary; that is it matches if the character to the
+ left is a "word" character and the character to the right is a
+ "non-word" character, or vice-versa.
+
+ $ echo "abc %-= def." | sed 's/\b/X/g'
+ XabcX %-= XdefX.
+
+'\B'
+ Matches everywhere but on a word boundary; that is it matches if
+ 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'
+ aXbXc X%X-X=X dXeXf.X
+
+'\s'
+ Matches whitespace characters (spaces and tabs). Newlines embedded
+ in the pattern/hold spaces will also match:
+
+ $ echo "abc %-= def." | sed 's/\s/X/g'
+ abcX%-=Xdef.
+
+'\S'
+ Matches non-whitespace characters.
+
+ $ echo "abc %-= def." | sed 's/\w/X/g'
+ XXX XXX XXXX
+
+'\<'
+ Matches the beginning of a word.
+
+ $ echo "abc %-= def." | sed 's/\</X/g'
+ Xabc %-= Xdef.
+
+'\>'
+ Matches the end of a word.
+
+ $ echo "abc %-= def." | sed 's/\>/X/g'
+ abcX %-= defX.
+
+'\`'
+ Matches only at the start of pattern space. This is different from
+ '^' in multi-line mode.
+
+ Compare the following two examples:
+
+ $ printf "a\nb\nc\n" | sed 'N;N;s/^/X/gm'
+ Xa
+ Xb
+ Xc
+
+ $ printf "a\nb\nc\n" | sed 'N;N;s/\`/X/gm'
+ Xa
+ b
+ c
+
+'\''
+ Matches only at the end of pattern space. This is different from
+ '$' in multi-line mode.
+
+
+File: sed.info-t, Node: Back-references and Subexpressions, Next: Escapes, Prev: regexp extensions, Up: sed regular expressions
+
+5.7 Back-references and Subexpressions
+======================================
+
+"back-references" are regular expression commands which refer to a
+previous part of the matched regular expression. Back-references are
+specified with backslash and a single digit (e.g. '\1'). The part of
+the regular expression they refer to is called a "subexpression", and is
+designated with parentheses.
+
+ Back-references and subexpressions are used in two cases: in the
+regular expression search pattern, and in the REPLACEMENT part of the
+'s' command (*note Regular Expression Addresses: Regexp Addresses. and
+*note The "s" Command::).
+
+ In a regular expression pattern, back-references are used to match
+the same content as a previously matched subexpression. In the
+following example, the subexpression is '.' - any single character
+(being surrounded by parentheses makes it a subexpression). The
+back-reference '\1' asks to match the same content (same character) as
+the sub-expression.
+
+ The command below matches words starting with any character, followed
+by the letter 'o', followed by the same character as the first.
+
+ $ sed -E -n '/^(.)o\1$/p' /usr/share/dict/words
+ bob
+ mom
+ non
+ pop
+ sos
+ tot
+ wow
+
+ Multiple subexpressions are automatically numbered from
+left-to-right. This command searches for 6-letter palindromes (the
+first three letters are 3 subexpressions, followed by 3 back-references
+in reverse order):
+
+ $ sed -E -n '/^(.)(.)(.)\3\2\1$/p' /usr/share/dict/words
+ redder
+
+ In the 's' command, back-references can be used in the REPLACEMENT
+part to refer back to subexpressions in the REGEXP part.
+
+ The following example uses two subexpressions in the regular
+expression to match two space-separated words. The back-references in
+the REPLACEMENT part prints the words in a different order:
+
+ $ echo "James Bond" | sed -E 's/(.*) (.*)/The name is \2, \1 \2./'
+ The name is Bond, James Bond.
+
+ When used with alternation, if the group does not participate in the
+match then the back-reference makes the whole match fail. For example,
+'a(.)|b\1' will not match 'ba'. When multiple regular expressions are
+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
+
+5.8 Escape Sequences - specifying special characters
+====================================================
+
+Until this chapter, we have only encountered escapes of the form '\^',
+which tell 'sed' not to interpret the circumflex as a special character,
+but rather to take it literally. For example, '\*' matches a single
+asterisk rather than zero or more backslashes.
This chapter introduces another kind of escape(1)--that is, escapes
that are applied to a character or sequence of characters that
-ordinarily are taken literally, and that `sed' replaces with a special
+ordinarily are taken literally, and that 'sed' replaces with a special
character. This provides a way of encoding non-printable characters in
-patterns in a visible manner. There is no restriction on the
-appearance of non-printing characters in a `sed' script but when a
-script is being prepared in the shell or by text editing, it is usually
-easier to use one of the following escape sequences than the binary
-character it represents:
+patterns in a visible manner. There is no restriction on the appearance
+of non-printing characters in a 'sed' script but when a script is being
+prepared in the shell or by text editing, it is usually easier to use
+one of the following escape sequences than the binary character it
+represents:
The list of these escapes is:
-`\a'
+'\a'
Produces or matches a BEL character, that is an "alert" (ASCII 7).
-`\f'
+'\f'
Produces or matches a form feed (ASCII 12).
-`\n'
+'\n'
Produces or matches a newline (ASCII 10).
-`\r'
+'\r'
Produces or matches a carriage return (ASCII 13).
-`\t'
+'\t'
Produces or matches a horizontal tab (ASCII 9).
-`\v'
+'\v'
Produces or matches a so called "vertical tab" (ASCII 11).
-`\cX'
- Produces or matches `CONTROL-X', where X is any character. The
- precise effect of `\cX' is as follows: if X is a lower case
- letter, it is converted to upper case. Then bit 6 of the
- character (hex 40) is inverted. Thus `\cz' becomes hex 1A, but
- `\c{' becomes hex 3B, while `\c;' becomes hex 7B.
+'\cX'
+ Produces or matches 'CONTROL-X', where X is any character. The
+ precise effect of '\cX' is as follows: if X is a lower case letter,
+ it is converted to upper case. Then bit 6 of the character (hex
+ 40) is inverted. Thus '\cz' becomes hex 1A, but '\c{' becomes hex
+ 3B, while '\c;' becomes hex 7B.
-`\dXXX'
+'\dXXX'
Produces or matches a character whose decimal ASCII value is XXX.
-`\oXXX'
+'\oXXX'
Produces or matches a character whose octal ASCII value is XXX.
-`\xXX'
+'\xXX'
Produces or matches a character whose hexadecimal ASCII value is
XX.
- `\b' (backspace) was omitted because of the conflict with the
+ '\b' (backspace) was omitted because of the conflict with the
existing "word boundary" meaning.
- Other escapes match a particular character class and are valid only
-in regular expressions:
+ ---------- Footnotes ----------
-`\w'
- Matches any "word" character. A "word" character is any letter or
- digit or the underscore character.
+ (1) All the escapes introduced here are GNU extensions, with the
+exception of '\n'. In basic regular expression mode, setting
+'POSIXLY_CORRECT' disables them inside bracket expressions.
-`\W'
- Matches any "non-word" character.
+
+File: sed.info-t, Node: Locale Considerations, Prev: Escapes, Up: sed regular expressions
-`\b'
- Matches a word boundary; that is it matches if the character to
- the left is a "word" character and the character to the right is a
- "non-word" character, or vice-versa.
+5.9 Locale Considerations
+=========================
-`\B'
- Matches everywhere but on a word boundary; that is it matches if
- the character to the left and the character to the right are
- either both "word" characters or both "non-word" characters.
+TODO: fix following paragraphs (copied verbatim from 'bracket
+expression' section).
-`\`'
- Matches only at the start of pattern space. This is different
- from `^' in multi-line mode.
+ TODO: mention locale support is heavily dependent on the OS/libc, not
+on sed.
-`\''
- Matches only at the end of pattern space. This is different from
- `$' in multi-line mode.
+ The current locale affects the characters matched by 'sed''s regular
+expressions.
+
+ 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
+expressions, you can use the 'C' locale by setting the 'LC_ALL'
+environment variable to the value 'C'.
+
+ # TODO: is there any real-world system/locale where 'A'
+ # is replaced by '-' ?
+ $ echo A | sed 's/[a-z]/-/'
+ A
+
+ Their interpretation depends on the 'LC_CTYPE' locale; for example,
+'[[:alnum:]]' means the character class of numbers and letters in the
+current locale.
+
+ TODO: show example of collation
+
+ # 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
+
+
+File: sed.info-t, Node: advanced sed, Next: Examples, Prev: sed regular expressions, Up: Top
+
+6 Advanced 'sed': cycles and buffers
+************************************
+
+* Menu:
+
+* Execution Cycle:: How 'sed' works
+* Hold and Pattern Buffers::
+* Multiline techniques:: Using D,G,H,N,P to process multiple lines
+* Branching and flow control::
+
+
+File: sed.info-t, Node: Execution Cycle, Next: Hold and Pattern Buffers, Up: advanced sed
+
+6.1 How 'sed' Works
+===================
+
+'sed' maintains two data buffers: the active _pattern_ space, and the
+auxiliary _hold_ space. Both are initially empty.
+
+ 'sed' operates by performing the following cycle on each line of
+input: first, 'sed' reads one line from the input stream, removes any
+trailing newline, and places it in the pattern space. Then commands are
+executed; each command can have an address associated to it: addresses
+are a kind of condition code, and a command is only executed if the
+condition is verified before the command is to be executed.
+ When the end of the script is reached, unless the '-n' option is in
+use, the contents of pattern space are printed out to the output stream,
+adding back the trailing newline if it was removed.(1) Then the next
+cycle starts for the next input line.
+
+ Unless special commands (like 'D') are used, the pattern space is
+deleted between two cycles. The hold space, on the other hand, keeps
+its data between cycles (see commands 'h', 'H', 'x', 'g', 'G' to move
+data between both buffers).
---------- Footnotes ----------
- (1) All the escapes introduced here are GNU extensions, with the
-exception of `\n'. In basic regular expression mode, setting
-`POSIXLY_CORRECT' disables them inside bracket expressions.
+ (1) Actually, if 'sed' prints a line without the terminating newline,
+it will nevertheless print the missing newline as soon as more text is
+sent to the same output stream, which gives the "least expected
+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
+
+6.2 Hold and Pattern Buffers
+============================
+
+TODO
+
+
+File: sed.info-t, 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
+====================================================================
+
+Multiple lines can be processed as one buffer using the
+'D','G','H','N','P'. They are similar to their lowercase counterparts
+('d','g', 'h','n','p'), except that these commands append or subtract
+data while respecting embedded newlines - allowing adding and removing
+lines from the pattern and hold spaces.
+
+ They operate as follows:
+'D'
+ _deletes_ line from the pattern space until the first newline, and
+ restarts the cycle.
+
+'G'
+ _appends_ line from the hold space to the pattern space, with a
+ newline before it.
+
+'H'
+ _appends_ line from the pattern space to the hold space, with a
+ newline before it.
+
+'N'
+ _appends_ line from the input file to the pattern space.
+
+'P'
+ _prints_ line from the pattern space until the first newline.
+
+ The following example illustrates the operation of 'N' and 'D'
+commands:
+
+ $ seq 6 | sed -n 'N;l;D'
+ 1\n2$
+ 2\n3$
+ 3\n4$
+ 4\n5$
+ 5\n6$
+
+ 1. 'sed' starts by reading the first line into the pattern space (i.e.
+ '1').
+ 2. At the beginning of every cycle, the 'N' command appends a newline
+ and the next line to the pattern space (i.e. '1', '\n', '2' in the
+ first cycle).
+ 3. The 'l' command prints the content of the pattern space
+ unambigiously.
+ 4. The 'D' command then removes the content of pattern space up to the
+ first newline (leaving '2' at the end of the first cycle).
+ 5. At the next cycle the 'N' command appends a newline and the next
+ input line to the pattern space (e.g. '2', '\n', '3').
+
+ A common technique to process blocks of text such as paragraphs
+(instead of line-by-line) is using the following construct:
+
+ sed '/./{H;$!d} ; x ; s/REGEXP/REPLACEMENT/'
+
+ 1. The first expression, '/./{H;$!d}' operates on all non-empty lines,
+ and adds the current line (in the pattern space) to the hold space.
+ On all lines except the last, the pattern space is deleted and the
+ cycle is restarted.
+
+ 2. The other expressions 'x' and 's' are executed only on empty lines
+ (i.e. paragraph separators). The 'x' command fetches the
+ accumulated lines from the hold space back to the pattern space.
+ The 's///' command then operates on all the text in the paragraph
+ (including the embedded newlines).
+
+ The following example demonstrates this technique:
+ $ cat input.txt
+ a a a aa aaa
+ aaaa aaaa aa
+ aaaa aaa aaa
+
+ bbbb bbb bbb
+ bb bb bbb bb
+ bbbbbbbb bbb
+
+ ccc ccc cccc
+ cccc ccccc c
+ cc cc cc cc
+
+ $ sed '/./{H;$!d} ; x ; s/^/\nSTART-->/ ; s/$/\n<--END/' input.txt
+
+ START-->
+ a a a aa aaa
+ aaaa aaaa aa
+ aaaa aaa aaa
+ <--END
+
+ START-->
+ bbbb bbb bbb
+ bb bb bbb bb
+ bbbbbbbb bbb
+ <--END
+
+ START-->
+ ccc ccc cccc
+ cccc ccccc c
+ cc cc cc cc
+ <--END
+
+ For more annotated examples, *note Text search across multiple
+lines:: and *note Line length adjustment::.

-File: sed.info, Node: Examples, Next: Limitations, Prev: sed Programs, Up: Top
+File: sed.info-t, Node: Branching and flow control, Prev: Multiline techniques, Up: advanced sed
-4 Some Sample Scripts
+6.4 Branching and Flow Control
+==============================
+
+TODO
+
+
+File: sed.info-t, Node: Examples, Next: Limitations, Prev: advanced sed, Up: Top
+
+7 Some Sample Scripts
*********************
-Here are some `sed' scripts to guide you in the art of mastering `sed'.
+Here are some 'sed' scripts to guide you in the art of mastering 'sed'.
* Menu:
+
+Useful one-liners:
+* Joining lines::
+
Some exotic examples:
* Centering lines::
* Increment a number::
* Rename files to lower case::
* Print bash environment::
* Reverse chars of lines::
+* Text search across multiple lines::
+* Line length adjustment::
Emulating standard utilities:
* tac:: Reverse lines of files
@@ -1233,13 +2395,51 @@ Emulating standard utilities:
* cat -s:: Squeezing blank lines

-File: sed.info, Node: Centering lines, Next: Increment a number, Up: Examples
+File: sed.info-t, Node: Joining lines, Next: Centering lines, Up: Examples
+
+7.1 Joining lines
+=================
+
+Join specific lines (e.g. if lines 2 and 3 need to be joined):
+
+ $ cat lines.txt
+ hello
+ hel
+ lo
+ hello
+
+ $ sed '2{N;s/\n//;}' lines.txt
+ hello
+ hello
+ hello
-4.1 Centering Lines
+ Join lines ending with backslashes:
+
+ $ cat 1.txt
+ this \
+ is \
+ a \
+ long \
+ line
+ and another \
+ line
+
+ $ sed -e ':x /\\$/ { N; s/\\\n//g ; bx }' 1.txt
+ this is a long line
+ and another line
+
+
+ #TODO: The above requires gnu sed.
+ # non-gnu seds need newlines after ':' and 'b'
+
+
+File: sed.info-t, Node: Centering lines, Next: Increment a number, Prev: Joining lines, Up: Examples
+
+7.2 Centering Lines
===================
This script centers all lines of a file on a 80 columns width. To
-change that width, the number in `\{...\}' must be replaced, and the
+change that width, the number in '\{...\}' must be replaced, and the
number of added spaces also must be changed.
Note how the buffer commands are used to separate parts in the
@@ -1255,7 +2455,7 @@ regular expressions to be matched--this is a common technique.
x
}
- # del leading and trailing spaces
+ # delete leading and trailing spaces
y/tab/ /
s/^ *//
s/ *$//
@@ -1270,25 +2470,25 @@ regular expressions to be matched--this is a common technique.
s/^\(.*\)\n\(.*\)\2/\2\1/

-File: sed.info, Node: Increment a number, Next: Rename files to lower case, Prev: Centering lines, Up: Examples
+File: sed.info-t, Node: Increment a number, Next: Rename files to lower case, Prev: Centering lines, Up: Examples
-4.2 Increment a Number
+7.3 Increment a Number
======================
This script is one of a few that demonstrate how to do arithmetic in
-`sed'. This is indeed possible,(1) but must be done manually.
+'sed'. This is indeed possible,(1) but must be done manually.
- To increment one number you just add 1 to last digit, replacing it
-by the following digit. There is one exception: when the digit is a
-nine the previous digits must be also incremented until you don't have
-a nine.
+ To increment one number you just add 1 to last digit, replacing it by
+the following digit. There is one exception: when the digit is a nine
+the previous digits must be also incremented until you don't have a
+nine.
This solution by Bruno Haible is very clever and smart because it
uses a single buffer; if you don't have this limitation, the algorithm
-used in *note Numbering lines: cat -n, is faster. It works by
-replacing trailing nines with an underscore, then using multiple `s'
-commands to increment the last digit, and then again substituting
-underscores with zeros.
+used in *note Numbering lines: cat -n, is faster. It works by replacing
+trailing nines with an underscore, then using multiple 's' commands to
+increment the last digit, and then again substituting underscores with
+zeros.
#!/usr/bin/sed -f
@@ -1319,24 +2519,24 @@ underscores with zeros.
---------- Footnotes ----------
- (1) `sed' guru Greg Ubben wrote an implementation of the `dc' RPN
+ (1) 'sed' guru Greg Ubben wrote an implementation of the 'dc' RPN
calculator! It is distributed together with sed.

-File: sed.info, Node: Rename files to lower case, Next: Print bash environment, Prev: Increment a number, Up: Examples
+File: sed.info-t, Node: Rename files to lower case, Next: Print bash environment, Prev: Increment a number, Up: Examples
-4.3 Rename Files to Lower Case
+7.4 Rename Files to Lower Case
==============================
-This is a pretty strange use of `sed'. We transform text, and
-transform it to be shell commands, then just feed them to shell. Don't
-worry, even worse hacks are done when using `sed'; I have seen a script
-converting the output of `date' into a `bc' program!
+This is a pretty strange use of 'sed'. We transform text, and transform
+it to be shell commands, then just feed them to shell. Don't worry,
+even worse hacks are done when using 'sed'; I have seen a script
+converting the output of 'date' into a 'bc' program!
- The main body of this is the `sed' script, which remaps the name
-from lower to upper (or vice-versa) and even checks out if the remapped
-name is the same as the original name. Note how the script is
-parameterized using shell variables and proper quoting.
+ The main body of this is the 'sed' script, which remaps the name from
+lower to upper (or vice-versa) and even checks out if the remapped name
+is the same as the original name. Note how the script is parameterized
+using shell variables and proper quoting.
#! /bin/sh
# rename files to lower/upper case...
@@ -1435,13 +2635,13 @@ parameterized using shell variables and proper quoting.
' | $apply_cmd

-File: sed.info, Node: Print bash environment, Next: Reverse chars of lines, Prev: Rename files to lower case, Up: Examples
+File: sed.info-t, Node: Print bash environment, Next: Reverse chars of lines, Prev: Rename files to lower case, Up: Examples
-4.4 Print `bash' Environment
+7.5 Print 'bash' Environment
============================
-This script strips the definition of the shell functions from the
-output of the `set' Bourne-shell command.
+This script strips the definition of the shell functions from the output
+of the 'set' Bourne-shell command.
#!/bin/sh
@@ -1469,20 +2669,20 @@ output of the `set' Bourne-shell command.
'

-File: sed.info, Node: Reverse chars of lines, Next: tac, Prev: Print bash environment, Up: Examples
+File: sed.info-t, Node: Reverse chars of lines, Next: Text search across multiple lines, Prev: Print bash environment, Up: Examples
-4.5 Reverse Characters of Lines
+7.6 Reverse Characters of Lines
===============================
This script can be used to reverse the position of characters in lines.
The technique moves two characters at a time, hence it is faster than
more intuitive implementations.
- Note the `tx' command before the definition of the label. This is
-often needed to reset the flag that is tested by the `t' command.
+ Note the 'tx' command before the definition of the label. This is
+often needed to reset the flag that is tested by the 't' command.
Imaginative readers will find uses for this script. An example is
-reversing the output of `banner'.(1)
+reversing the output of 'banner'.(1)
#!/usr/bin/sed -f
@@ -1515,16 +2715,167 @@ example
~/sedscripts/reverseline.sed

-File: sed.info, Node: tac, Next: cat -n, Prev: Reverse chars of lines, Up: Examples
+File: sed.info-t, Node: Text search across multiple lines, Next: Line length adjustment, Prev: Reverse chars of lines, Up: Examples
+
+7.7 Text search across multiple lines
+=====================================
+
+This section uses 'N' and 'D' commands to search for consecutive words
+spanning multiple lines. *Note Multiline techniques::.
+
+ These examples deal with finding doubled occurrences of words in a
+document.
+
+ Finding doubled words in a single line is easy using GNU 'grep' and
+similarly with GNU 'sed':
+
+ $ cat two-cities-dup1.txt
+ It was the best of times,
+ it was the worst of times,
+ it was the the age of wisdom,
+ it was the age of foolishness,
+
+ $ grep -E '\b(\w+)\s+\1\b' two-cities-dup1.txt
+ it was the the age of wisdom,
+
+ $ grep -n -E '\b(\w+)\s+\1\b' two-cities-dup1.txt
+ 3:it was the the age of wisdom,
+
+ $ sed -En '/\b(\w+)\s+\1\b/p' two-cities-dup1.txt
+ it was the the age of wisdom,
+
+ $ sed -En '/\b(\w+)\s+\1\b/{=;p}' two-cities-dup1.txt
+ 3
+ it was the the age of wisdom,
+
+ * The regular expression '\b\w+\s+' searches for word-boundary
+ ('\b'), followed by one-or-more word-characters ('\w+'), followed
+ by whitespace ('\s+'). *Note regexp extensions::.
+
+ * Adding parentheses around the '(\w+)' expression creates a
+ subexpression. The regular expression pattern '(PATTERN)\s+\1'
+ defines a subexpression (in the parentheses) followed by a
+ back-reference, separated by whitespace. A successful match means
+ the PATTERN was repeated twice in succession. *Note
+ Back-references and Subexpressions::.
+
+ * The word-boundery expression ('\b') at both ends ensures partial
+ words are not matched (e.g. 'the then' is not a desired match).
+
+ * The '-E' option enables extended regular expression syntax,
+ alleviating the need to add backslashes before the parenthesis.
+ *Note ERE syntax::.
+
+ When the doubled word span two lines the above regular expression
+will not find them as 'grep' and 'sed' operate line-by-line.
+
+ By using 'N' and 'D' commands, 'sed' can apply regular expressions on
+multiple lines (that is, multiple lines are stored in the pattern space,
+and the regular expression works on it):
+
+ $ cat two-cities-dup2.txt
+ It was the best of times, it was the
+ worst of times, it was the
+ the age of wisdom,
+ it was the age of foolishness,
+
+ $ sed -En '{N; /\b(\w+)\s+\1\b/{=;p} ; D}' two-cities-dup2.txt
+ 3
+ worst of times, it was the
+ the age of wisdom,
+
+ * The 'N' command appends the next line to the pattern space (thus
+ ensuring it contains two consecutive lines in every cycle).
+
+ * The regular expression uses '\s+' for word separator which matches
+ both spaces and newlines.
+
+ * The regular expression matches, the entire pattern space is printed
+ with 'p'. No lines are printed by default due to the '-n' option.
+
+ * The 'D' removes the first line from the pattern space (up until the
+ first newline), readying it for the next cycle.
+
+ See the GNU 'coreutils' manual for an alternative solution using 'tr
+-s' and 'uniq' at
+<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
-4.6 Reverse Lines of Files
+7.8 Line length adjustment
+==========================
+
+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
+lines of text of the following input file:
+
+ $ cat 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,
+
+ 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 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,
+
+ Both examples use similar construct:
+
+ * 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).
+
+ * The first 's/\n/ /g' command replaces all newlines with spaces,
+ discarding the line structure of the input file.
+
+ * 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).
+
+ * 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.
+
+ * 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.
+
+
+File: sed.info-t, Node: tac, Next: cat -n, Prev: Line length adjustment, Up: Examples
+
+7.9 Reverse Lines of Files
==========================
This one begins a series of totally useless (yet interesting) scripts
-emulating various Unix commands. This, in particular, is a `tac'
+emulating various Unix commands. This, in particular, is a 'tac'
workalike.
- Note that on implementations other than GNU `sed' this script might
+ Note that on implementations other than GNU 'sed' this script might
easily overflow internal buffers.
#!/usr/bin/sed -nf
@@ -1542,18 +2893,18 @@ easily overflow internal buffers.
h

-File: sed.info, Node: cat -n, Next: cat -b, Prev: tac, Up: Examples
+File: sed.info-t, Node: cat -n, Next: cat -b, Prev: tac, Up: Examples
-4.7 Numbering Lines
-===================
+7.10 Numbering Lines
+====================
-This script replaces `cat -n'; in fact it formats its output exactly
-like GNU `cat' does.
+This script replaces 'cat -n'; in fact it formats its output exactly
+like GNU 'cat' does.
- Of course this is completely useless and for two reasons: first,
+ Of course this is completely useless and for two reasons: first,
because somebody else did it in C, second, because the following
-Bourne-shell script could be used for the same purpose and would be
-much faster:
+Bourne-shell script could be used for the same purpose and would be much
+faster:
#! /bin/sh
sed -e "=" $@ | sed -e '
@@ -1562,16 +2913,16 @@ much faster:
s/^ *\(......\)\n/\1 /
'
- It uses `sed' to print the line number, then groups lines two by two
-using `N'. Of course, this script does not teach as much as the one
+ It uses 'sed' to print the line number, then groups lines two by two
+using 'N'. Of course, this script does not teach as much as the one
presented below.
- The algorithm used for incrementing uses both buffers, so the line
-is printed as soon as possible and then discarded. The number is split
-so that changing digits go in a buffer and unchanged ones go in the
-other; the changed digits are modified in a single step (using a `y'
-command). The line number for the next line is then composed and
-stored in the hold space, to be used in the next iteration.
+ The algorithm used for incrementing uses both buffers, so the line is
+printed as soon as possible and then discarded. The number is split so
+that changing digits go in a buffer and unchanged ones go in the other;
+the changed digits are modified in a single step (using a 'y' command).
+The line number for the next line is then composed and stored in the
+hold space, to be used in the next iteration.
#!/usr/bin/sed -nf
@@ -1611,16 +2962,16 @@ stored in the hold space, to be used in the next iteration.
h

-File: sed.info, Node: cat -b, Next: wc -c, Prev: cat -n, Up: Examples
+File: sed.info-t, Node: cat -b, Next: wc -c, Prev: cat -n, Up: Examples
-4.8 Numbering Non-blank Lines
-=============================
+7.11 Numbering Non-blank Lines
+==============================
-Emulating `cat -b' is almost the same as `cat -n'--we only have to
+Emulating 'cat -b' is almost the same as 'cat -n'--we only have to
select which lines are to be numbered and which are not.
The part that is common to this script and the previous one is not
-commented to show how important it is to comment `sed' scripts
+commented to show how important it is to comment 'sed' scripts
properly...
#!/usr/bin/sed -nf
@@ -1651,18 +3002,18 @@ properly...
h

-File: sed.info, Node: wc -c, Next: wc -w, Prev: cat -b, Up: Examples
+File: sed.info-t, Node: wc -c, Next: wc -w, Prev: cat -b, Up: Examples
-4.9 Counting Characters
-=======================
+7.12 Counting Characters
+========================
-This script shows another way to do arithmetic with `sed'. In this
-case we have to add possibly large numbers, so implementing this by
+This script shows another way to do arithmetic with 'sed'. In this case
+we have to add possibly large numbers, so implementing this by
successive increments would not be feasible (and possibly even more
complicated to contrive than this script).
The approach is to map numbers to letters, kind of an abacus
-implemented with `sed'. `a's are units, `b's are tens and so on: we
+implemented with 'sed'. 'a's are units, 'b's are tens and so on: we
simply add the number of characters on the current line as units, and
then propagate the carry to tens, hundreds, and so on.
@@ -1670,9 +3021,9 @@ then propagate the carry to tens, hundreds, and so on.
On the last line, we convert the abacus form back to decimal. For
the sake of variety, this is done with a loop rather than with some 80
-`s' commands(1): first we convert units, removing `a's from the number;
-then we rotate letters so that tens become `a's, and so on until no
-more letters remain.
+'s' commands(1): first we convert units, removing 'a's from the number;
+then we rotate letters so that tens become 'a's, and so on until no more
+letters remain.
#!/usr/bin/sed -nf
@@ -1724,23 +3075,22 @@ more letters remain.
(1) Some implementations have a limit of 199 commands per script

-File: sed.info, Node: wc -w, Next: wc -l, Prev: wc -c, Up: Examples
+File: sed.info-t, Node: wc -w, Next: wc -l, Prev: wc -c, Up: Examples
-4.10 Counting Words
+7.13 Counting Words
===================
This script is almost the same as the previous one, once each of the
-words on the line is converted to a single `a' (in the previous script
-each letter was changed to an `a').
+words on the line is converted to a single 'a' (in the previous script
+each letter was changed to an 'a').
- It is interesting that real `wc' programs have optimized loops for
-`wc -c', so they are much slower at counting words rather than
-characters. This script's bottleneck, instead, is arithmetic, and
-hence the word-counting one is faster (it has to manage smaller
-numbers).
+ It is interesting that real 'wc' programs have optimized loops for
+'wc -c', so they are much slower at counting words rather than
+characters. This script's bottleneck, instead, is arithmetic, and hence
+the word-counting one is faster (it has to manage smaller numbers).
Again, the common parts are not commented to show the importance of
-commenting `sed' scripts.
+commenting 'sed' scripts.
#!/usr/bin/sed -nf
@@ -1782,42 +3132,42 @@ commenting `sed' scripts.
p

-File: sed.info, Node: wc -l, Next: head, Prev: wc -w, Up: Examples
+File: sed.info-t, Node: wc -l, Next: head, Prev: wc -w, Up: Examples
-4.11 Counting Lines
+7.14 Counting Lines
===================
-No strange things are done now, because `sed' gives us `wc -l'
-functionality for free!!! Look:
+No strange things are done now, because 'sed' gives us 'wc -l'
+functionality for free!!! Look:
#!/usr/bin/sed -nf
$=

-File: sed.info, Node: head, Next: tail, Prev: wc -l, Up: Examples
+File: sed.info-t, Node: head, Next: tail, Prev: wc -l, Up: Examples
-4.12 Printing the First Lines
+7.15 Printing the First Lines
=============================
-This script is probably the simplest useful `sed' script. It displays
+This script is probably the simplest useful 'sed' script. It displays
the first 10 lines of input; the number of displayed lines is right
-before the `q' command.
+before the 'q' command.
#!/usr/bin/sed -f
10q

-File: sed.info, Node: tail, Next: uniq, Prev: head, Up: Examples
+File: sed.info-t, Node: tail, Next: uniq, Prev: head, Up: Examples
-4.13 Printing the Last Lines
+7.16 Printing the Last Lines
============================
Printing the last N lines rather than the first is more complex but
indeed possible. N is encoded in the second line, before the bang
character.
- This script is similar to the `tac' script in that it keeps the
-final output in the hold space and prints it at the end:
+ This script is similar to the 'tac' script in that it keeps the final
+output in the hold space and prints it at the end:
#!/usr/bin/sed -nf
@@ -1828,20 +3178,20 @@ final output in the hold space and prints it at the end:
Mainly, the scripts keeps a window of 10 lines and slides it by
adding a line and deleting the oldest (the substitution command on the
-second line works like a `D' command but does not restart the loop).
+second line works like a 'D' command but does not restart the loop).
The "sliding window" technique is a very powerful way to write
-efficient and complex `sed' scripts, because commands like `P' would
+efficient and complex 'sed' scripts, because commands like 'P' would
require a lot of work if implemented manually.
To introduce the technique, which is fully demonstrated in the rest
-of this chapter and is based on the `N', `P' and `D' commands, here is
-an implementation of `tail' using a simple "sliding window."
+of this chapter and is based on the 'N', 'P' and 'D' commands, here is
+an implementation of 'tail' using a simple "sliding window."
This looks complicated but in fact the working is the same as the
last script: after we have kicked in the appropriate number of lines,
however, we stop using the hold space to keep inter-line state, and
-instead use `N' and `D' to slide pattern space by one line:
+instead use 'N' and 'D' to slide pattern space by one line:
#!/usr/bin/sed -f
@@ -1858,12 +3208,12 @@ on the last line of input, appending the next input line to pattern
space, and removing the first line.

-File: sed.info, Node: uniq, Next: uniq -d, Prev: tail, Up: Examples
+File: sed.info-t, Node: uniq, Next: uniq -d, Prev: tail, Up: Examples
-4.14 Make Duplicate Lines Unique
+7.17 Make Duplicate Lines Unique
================================
-This is an example of the art of using the `N', `P' and `D' commands,
+This is an example of the art of using the 'N', 'P' and 'D' commands,
probably the most difficult to master.
#!/usr/bin/sed -f
@@ -1880,7 +3230,7 @@ probably the most difficult to master.
bb
}
- # If the `N' command had added the last line, print and exit
+ # If the N command had added the last line, print and exit
$b
# The lines are different; print the first and go
@@ -1888,16 +3238,16 @@ probably the most difficult to master.
P
D
- As you can see, we mantain a 2-line window using `P' and `D'. This
-technique is often used in advanced `sed' scripts.
+ As you can see, we maintain a 2-line window using 'P' and 'D'. This
+technique is often used in advanced 'sed' scripts.

-File: sed.info, Node: uniq -d, Next: uniq -u, Prev: uniq, Up: Examples
+File: sed.info-t, Node: uniq -d, Next: uniq -u, Prev: uniq, Up: Examples
-4.15 Print Duplicated Lines of Input
+7.18 Print Duplicated Lines of Input
====================================
-This script prints only duplicated lines, like `uniq -d'.
+This script prints only duplicated lines, like 'uniq -d'.
#!/usr/bin/sed -nf
@@ -1926,12 +3276,12 @@ This script prints only duplicated lines, like `uniq -d'.
D

-File: sed.info, Node: uniq -u, Next: cat -s, Prev: uniq -d, Up: Examples
+File: sed.info-t, Node: uniq -u, Next: cat -s, Prev: uniq -d, Up: Examples
-4.16 Remove All Duplicated Lines
+7.19 Remove All Duplicated Lines
================================
-This script prints only unique lines, like `uniq -u'.
+This script prints only unique lines, like 'uniq -u'.
#!/usr/bin/sed -f
@@ -1948,7 +3298,7 @@ This script prints only unique lines, like `uniq -u'.
# end of the file we simply exit
$d
- # Else, we keep reading lines with `N' until we
+ # Else, we keep reading lines with N until we
# find a different one
s/.*\n//
N
@@ -1961,14 +3311,14 @@ This script prints only unique lines, like `uniq -u'.
D

-File: sed.info, Node: cat -s, Prev: uniq -u, Up: Examples
+File: sed.info-t, Node: cat -s, Prev: uniq -u, Up: Examples
-4.17 Squeezing Blank Lines
+7.20 Squeezing Blank Lines
==========================
-As a final example, here are three scripts, of increasing complexity
-and speed, that implement the same function as `cat -s', that is
-squeezing blank lines.
+As a final example, here are three scripts, of increasing complexity and
+speed, that implement the same function as 'cat -s', that is squeezing
+blank lines.
The first leaves a blank line at the beginning and end if there are
some already.
@@ -2008,9 +3358,9 @@ beginning. It does leave a single blank line at end if one was there.
}
This removes leading and trailing blank lines. It is also the
-fastest. Note that loops are completely done with `n' and `b', without
-relying on `sed' to restart the the script automatically at the end of
-a line.
+fastest. Note that loops are completely done with 'n' and 'b', without
+relying on 'sed' to restart the script automatically at the end of a
+line.
#!/usr/bin/sed -nf
@@ -2042,17 +3392,17 @@ a line.
bx

-File: sed.info, Node: Limitations, Next: Other Resources, Prev: Examples, Up: Top
+File: sed.info-t, Node: Limitations, Next: Other Resources, Prev: Examples, Up: Top
-5 GNU `sed''s Limitations and Non-limitations
+8 GNU 'sed''s Limitations and Non-limitations
*********************************************
-For those who want to write portable `sed' scripts, be aware that some
+For those who want to write portable 'sed' scripts, be aware that some
implementations have been known to limit line lengths (for the pattern
and hold spaces) to be no more than 4000 bytes. The POSIX standard
-specifies that conforming `sed' implementations shall support at least
-8192 byte line lengths. GNU `sed' has no built-in limit on line length;
-as long as it can `malloc()' more (virtual) memory, you can feed or
+specifies that conforming 'sed' implementations shall support at least
+8192 byte line lengths. GNU 'sed' has no built-in limit on line length;
+as long as it can 'malloc()' more (virtual) memory, you can feed or
construct lines as long as you like.
However, recursion is used to handle subpatterns and indefinite
@@ -2060,553 +3410,1221 @@ 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, Node: Other Resources, Next: Reporting Bugs, Prev: Limitations, Up: Top
+File: sed.info-t, Node: Other Resources, Next: Reporting Bugs, Prev: Limitations, Up: Top
-6 Other Resources for Learning About `sed'
+9 Other Resources for Learning About 'sed'
******************************************
-In addition to several books that have been written about `sed' (either
+In addition to several books that have been written about 'sed' (either
specifically or as chapters in books which discuss shell programming),
-one can find out more about `sed' (including suggestions of a few
-books) from the FAQ for the `sed-users' mailing list, available from:
- `http://sed.sourceforge.net/sedfaq.html'
+one can find out more about 'sed' (including suggestions of a few books)
+from the FAQ for the 'sed-users' mailing list, available from:
+ <http://sed.sourceforge.net/sedfaq.html>
Also of interest are
-`http://www.student.northpark.edu/pemente/sed/index.htm' and
-`http://sed.sf.net/grabbag', which include `sed' tutorials and other
-`sed'-related goodies.
+<http://www.student.northpark.edu/pemente/sed/index.htm> and
+<http://sed.sf.net/grabbag>, which include 'sed' tutorials and other
+'sed'-related goodies.
- The `sed-users' mailing list itself maintained by Sven Guckes. To
-subscribe, visit `http://groups.yahoo.com' and search for the
-`sed-users' mailing list.
+ The 'sed-users' mailing list itself maintained by Sven Guckes. To
+subscribe, visit <http://groups.yahoo.com> and search for the
+'sed-users' mailing list.

-File: sed.info, Node: Reporting Bugs, Next: Extended regexps, Prev: Other Resources, Up: Top
+File: sed.info-t, Node: Reporting Bugs, Next: GNU Free Documentation License, Prev: Other Resources, Up: Top
-7 Reporting Bugs
-****************
+10 Reporting Bugs
+*****************
-Email bug reports to <bug-sed@gnu.org>. Also, please include the
-output of `sed --version' in the body of your report if at all possible.
+Email bug reports to <bug-sed@gnu.org>. Also, please include the output
+of 'sed --version' in the body of your report if at all possible.
Please do not send a bug report like this:
while building frobme-1.3.4
$ configure
- error--> sed: file sedscr line 1: Unknown option to 's'
+ error-> sed: file sedscr line 1: Unknown option to 's'
- If GNU `sed' doesn't configure your favorite package, take a few
+ If GNU 'sed' doesn't configure your favorite package, take a few
extra minutes to identify the specific problem and make a stand-alone
test case. Unlike other programs such as C compilers, making such test
-cases for `sed' is quite simple.
+cases for 'sed' is quite simple.
A stand-alone test case includes all the data necessary to perform
-the test, and the specific invocation of `sed' that causes the problem.
+the test, and the specific invocation of 'sed' that causes the problem.
The smaller a stand-alone test case is, the better. A test case should
-not involve something as far removed from `sed' as "try to configure
-frobme-1.3.4". Yes, that is in principle enough information to look
-for the bug, but that is not a very practical prospect.
+not involve something as far removed from 'sed' as "try to configure
+frobme-1.3.4". Yes, that is in principle enough information to look for
+the bug, but that is not a very practical prospect.
Here are a few commonly reported bugs that are not bugs.
-`N' command on the last line
- Most versions of `sed' exit without printing anything when the `N'
- command is issued on the last line of a file. GNU `sed' prints
- pattern space before exiting unless of course the `-n' command
+'N' command on the last line
+
+ Most versions of 'sed' exit without printing anything when the 'N'
+ command is issued on the last line of a file. GNU 'sed' prints
+ pattern space before exiting unless of course the '-n' command
switch has been specified. This choice is by design.
+ Default behavior (gnu extension, non-POSIX conforming):
+ $ seq 3 | sed N
+ 1
+ 2
+ 3
+ To force POSIX-conforming behavior:
+ $ seq 3 | sed --posix N
+ 1
+ 2
+
For example, the behavior of
sed N foo bar
would depend on whether foo has an even or an odd number of
lines(1). Or, when writing a script to read the next few lines
- following a pattern match, traditional implementations of `sed'
+ following a pattern match, traditional implementations of 'sed'
would force you to write something like
/foo/{ $!N; $!N; $!N; $!N; $!N; $!N; $!N; $!N; $!N }
instead of just
/foo/{ N;N;N;N;N;N;N;N;N; }
- In any case, the simplest workaround is to use `$d;N' in scripts
+ In any case, the simplest workaround is to use '$d;N' in scripts
that rely on the traditional behavior, or to set the
- `POSIXLY_CORRECT' variable to a non-empty value.
+ 'POSIXLY_CORRECT' variable to a non-empty value.
Regex syntax clashes (problems with backslashes)
- `sed' uses the POSIX basic regular expression syntax. According to
+ 'sed' uses the POSIX basic regular expression syntax. According to
the standard, the meaning of some escape sequences is undefined in
- this syntax; notable in the case of `sed' are `\|', `\+', `\?',
- `\`', `\'', `\<', `\>', `\b', `\B', `\w', and `\W'.
+ this syntax; notable in the case of 'sed' are '\|', '\+', '\?',
+ '\`', '\'', '\<', '\>', '\b', '\B', '\w', and '\W'.
As in all GNU programs that use POSIX basic regular expressions,
- `sed' interprets these escape sequences as special characters.
- So, `x\+' matches one or more occurrences of `x'. `abc\|def'
- matches either `abc' or `def'.
+ 'sed' interprets these escape sequences as special characters. So,
+ 'x\+' matches one or more occurrences of 'x'. 'abc\|def' matches
+ either 'abc' or 'def'.
This syntax may cause problems when running scripts written for
- other `sed's. Some `sed' programs have been written with the
- assumption that `\|' and `\+' match the literal characters `|' and
- `+'. Such scripts must be modified by removing the spurious
+ other 'sed's. Some 'sed' programs have been written with the
+ assumption that '\|' and '\+' match the literal characters '|' and
+ '+'. Such scripts must be modified by removing the spurious
backslashes if they are to be used with modern implementations of
- `sed', like GNU `sed'.
+ 'sed', like GNU 'sed'.
On the other hand, some scripts use s|abc\|def||g to remove
- occurrences of _either_ `abc' or `def'. While this worked until
- `sed' 4.0.x, newer versions interpret this as removing the string
- `abc|def'. This is again undefined behavior according to POSIX,
- and this interpretation is arguably more robust: older `sed's, for
- example, required that the regex matcher parsed `\/' as `/' 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.
-
- In addition, this version of `sed' supports several escape
+ occurrences of _either_ 'abc' or 'def'. While this worked until
+ 'sed' 4.0.x, newer versions interpret this as removing the string
+ 'abc|def'. This is again undefined behavior according to POSIX,
+ and this interpretation is arguably more robust: older 'sed's, for
+ example, required that the regex matcher parsed '\/' as '/' 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.
+
+ In addition, this version of 'sed' supports several escape
characters (some of which are multi-character) to insert
- non-printable characters in scripts (`\a', `\c', `\d', `\o', `\r',
- `\t', `\v', `\x'). These can cause similar problems with scripts
- written for other `sed's.
+ non-printable characters in scripts ('\a', '\c', '\d', '\o', '\r',
+ '\t', '\v', '\x'). These can cause similar problems with scripts
+ written for other 'sed's.
-`-i' clobbers read-only files
- In short, `sed -i' will let you delete the contents of a read-only
- file, and in general the `-i' option (*note Invocation: Invoking
+'-i' clobbers read-only files
+
+ In short, 'sed -i' will let you delete the contents of a read-only
+ file, and in general the '-i' option (*note Invocation: Invoking
sed.) lets you clobber protected files. This is not a bug, but
- rather a consequence of how the Unix filesystem works.
+ rather a consequence of how the Unix file system works.
The permissions on a file say what can happen to the data in that
file, while the permissions on a directory say what can happen to
- the list of files in that directory. `sed -i' will not ever open
- for writing a file that is already on disk. Rather, it will work
+ the list of files in that directory. 'sed -i' will not ever open
+ for writing a file that is already on disk. Rather, it will work
on a temporary file that is finally renamed to the original name:
if you rename or delete files, you're actually modifying the
contents of the directory, so the operation depends on the
permissions of the directory, not of the file. For this same
- reason, `sed' does not let you use `-i' on a writeable file in a
+ reason, 'sed' does not let you use '-i' on a writable file in a
read-only directory, and will break hard or symbolic links when
- `-i' is used on such a file.
+ '-i' is used on such a file.
+
+'0a' does not work (gives an error)
-`0a' does not work (gives an error)
There is no line 0. 0 is a special address that is only used to
- treat addresses like `0,/RE/' as active when the script starts: if
- you write `1,/abc/d' and the first line includes the word `abc',
+ treat addresses like '0,/RE/' as active when the script starts: if
+ you write '1,/abc/d' and the first line includes the word 'abc',
then that match would be ignored because address ranges must span
at least two lines (barring the end of the file); but what you
probably wanted is to delete every line up to the first one
- including `abc', and this is obtained with `0,/abc/d'.
+ including 'abc', and this is obtained with '0,/abc/d'.
+
+'[a-z]' is case insensitive
-`[a-z]' is case insensitive
You are encountering problems with locales. POSIX mandates that
- `[a-z]' uses the current locale's collation order - in C parlance,
- that means using `strcoll(3)' instead of `strcmp(3)'. Some
- locales have a case-insensitive collation order, others don't.
+ '[a-z]' uses the current locale's collation order - in C parlance,
+ that means using 'strcoll(3)' instead of 'strcmp(3)'. Some locales
+ have a case-insensitive collation order, others don't.
- Another problem is that `[a-z]' tries to use collation symbols.
+ Another problem is that '[a-z]' tries to use collation symbols.
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 `^[a-z]$' matches the string `aa', because this is a
- single collating symbol that comes after `a' and before `b'; `ll'
- behaves similarly in Spanish locales, or `ij' in Dutch locales.
+ expression '^[a-z]$' matches the string 'aa', because this is a
+ single collating symbol that comes after 'a' and before 'b'; 'll'
+ behaves similarly in Spanish locales, or 'ij' in Dutch locales.
To work around these problems, which may cause bugs in shell
- scripts, set the `LC_COLLATE' and `LC_CTYPE' environment variables
- to `C'.
+ scripts, set the 'LC_COLLATE' and 'LC_CTYPE' environment variables
+ to 'C'.
+
+'s/.*//' does not clear pattern space
-`s/.*//' does not clear pattern space
This happens if your input stream includes invalid multibyte
- sequences. POSIX mandates that such sequences are _not_ matched
- by `.', so that `s/.*//' will not clear pattern space as you would
+ sequences. POSIX mandates that such sequences are _not_ matched by
+ '.', so that 's/.*//' will not clear pattern space as you would
expect. In fact, there is no way to clear sed's buffers in the
middle of the script in most multibyte locales (including UTF-8
- locales). For this reason, GNU `sed' provides a `z' command (for
- `zap') as an extension.
+ locales). For this reason, GNU 'sed' provides a 'z' command (for
+ 'zap') as an extension.
To work around these problems, which may cause bugs in shell
- scripts, set the `LC_COLLATE' and `LC_CTYPE' environment variables
- to `C'.
+ scripts, set the 'LC_COLLATE' and 'LC_CTYPE' environment variables
+ to 'C'.
---------- Footnotes ----------
(1) which is the actual "bug" that prompted the change in behavior

-File: sed.info, Node: Extended regexps, Next: Concept Index, Prev: Reporting Bugs, Up: Top
-
-Appendix A Extended regular expressions
-***************************************
-
-The only difference between basic and extended regular expressions is in
-the behavior of a few characters: `?', `+', parentheses, braces (`{}'),
-and `|'. While basic regular expressions require these to be escaped
-if you want them to behave as special characters, when using extended
-regular expressions you must escape them if you want them _to match a
-literal character_. `|' is special here because `\|' is a GNU
-extension - standard basic regular expressions do not provide its
-functionality.
-
-Examples:
-`abc?'
- becomes `abc\?' when using extended regular expressions. It
- matches the literal string `abc?'.
-
-`c\+'
- becomes `c+' when using extended regular expressions. It matches
- one or more `c's.
-
-`a\{3,\}'
- becomes `a{3,}' when using extended regular expressions. It
- matches three or more `a's.
-
-`\(abc\)\{2,3\}'
- becomes `(abc){2,3}' when using extended regular expressions. It
- matches either `abcabc' or `abcabcabc'.
-
-`\(abc*\)\1'
- becomes `(abc*)\1' when using extended regular expressions.
- Backreferences must still be escaped when using extended regular
- expressions.
+File: sed.info-t, Node: GNU Free Documentation License, Next: Concept Index, Prev: Reporting Bugs, Up: Top
+
+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/>
+
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+ 0. PREAMBLE
+
+ The purpose of this License is to make a manual, textbook, or other
+ functional and useful document "free" in the sense of freedom: to
+ assure everyone the effective freedom to copy and redistribute it,
+ with or without modifying it, either commercially or
+ noncommercially. Secondarily, this License preserves for the
+ author and publisher a way to get credit for their work, while not
+ being considered responsible for modifications made by others.
+
+ This License is a kind of "copyleft", which means that derivative
+ works of the document must themselves be free in the same sense.
+ It complements the GNU General Public License, which is a copyleft
+ license designed for free software.
+
+ We have designed this License in order to use it for manuals for
+ free software, because free software needs free documentation: a
+ free program should come with manuals providing the same freedoms
+ that the software does. But this License is not limited to
+ software manuals; it can be used for any textual work, regardless
+ of subject matter or whether it is published as a printed book. We
+ recommend this License principally for works whose purpose is
+ instruction or reference.
+
+ 1. APPLICABILITY AND DEFINITIONS
+
+ This License applies to any manual or other work, in any medium,
+ that contains a notice placed by the copyright holder saying it can
+ be distributed under the terms of this License. Such a notice
+ grants a world-wide, royalty-free license, unlimited in duration,
+ to use that work under the conditions stated herein. The
+ "Document", below, refers to any such manual or work. Any member
+ of the public is a licensee, and is addressed as "you". You accept
+ the license if you copy, modify or distribute the work in a way
+ requiring permission under copyright law.
+
+ A "Modified Version" of the Document means any work containing the
+ Document or a portion of it, either copied verbatim, or with
+ modifications and/or translated into another language.
+
+ A "Secondary Section" is a named appendix or a front-matter section
+ of the Document that deals exclusively with the relationship of the
+ publishers or authors of the Document to the Document's overall
+ subject (or to related matters) and contains nothing that could
+ fall directly within that overall subject. (Thus, if the Document
+ is in part a textbook of mathematics, a Secondary Section may not
+ explain any mathematics.) The relationship could be a matter of
+ historical connection with the subject or with related matters, or
+ of legal, commercial, philosophical, ethical or political position
+ regarding them.
+
+ The "Invariant Sections" are certain Secondary Sections whose
+ titles are designated, as being those of Invariant Sections, in the
+ notice that says that the Document is released under this License.
+ If a section does not fit the above definition of Secondary then it
+ is not allowed to be designated as Invariant. The Document may
+ contain zero Invariant Sections. If the Document does not identify
+ any Invariant Sections then there are none.
+
+ The "Cover Texts" are certain short passages of text that are
+ listed, as Front-Cover Texts or Back-Cover Texts, in the notice
+ that says that the Document is released under this License. A
+ Front-Cover Text may be at most 5 words, and a Back-Cover Text may
+ be at most 25 words.
+
+ A "Transparent" copy of the Document means a machine-readable copy,
+ represented in a format whose specification is available to the
+ general public, that is suitable for revising the document
+ straightforwardly with generic text editors or (for images composed
+ of pixels) generic paint programs or (for drawings) some widely
+ available drawing editor, and that is suitable for input to text
+ formatters or for automatic translation to a variety of formats
+ suitable for input to text formatters. A copy made in an otherwise
+ Transparent file format whose markup, or absence of markup, has
+ been arranged to thwart or discourage subsequent modification by
+ readers is not Transparent. An image format is not Transparent if
+ used for any substantial amount of text. A copy that is not
+ "Transparent" is called "Opaque".
+
+ Examples of suitable formats for Transparent copies include plain
+ ASCII without markup, Texinfo input format, LaTeX input format,
+ SGML or XML using a publicly available DTD, and standard-conforming
+ simple HTML, PostScript or PDF designed for human modification.
+ Examples of transparent image formats include PNG, XCF and JPG.
+ Opaque formats include proprietary formats that can be read and
+ edited only by proprietary word processors, SGML or XML for which
+ the DTD and/or processing tools are not generally available, and
+ the machine-generated HTML, PostScript or PDF produced by some word
+ processors for output purposes only.
+
+ The "Title Page" means, for a printed book, the title page itself,
+ plus such following pages as are needed to hold, legibly, the
+ material this License requires to appear in the title page. For
+ works in formats which do not have any title page as such, "Title
+ Page" means the text near the most prominent appearance of the
+ work's title, preceding the beginning of the body of the text.
+
+ The "publisher" means any person or entity that distributes copies
+ of the Document to the public.
+
+ A section "Entitled XYZ" means a named subunit of the Document
+ whose title either is precisely XYZ or contains XYZ in parentheses
+ following text that translates XYZ in another language. (Here XYZ
+ stands for a specific section name mentioned below, such as
+ "Acknowledgements", "Dedications", "Endorsements", or "History".)
+ To "Preserve the Title" of such a section when you modify the
+ Document means that it remains a section "Entitled XYZ" according
+ to this definition.
+
+ The Document may include Warranty Disclaimers next to the notice
+ which states that this License applies to the Document. These
+ Warranty Disclaimers are considered to be included by reference in
+ this License, but only as regards disclaiming warranties: any other
+ implication that these Warranty Disclaimers may have is void and
+ has no effect on the meaning of this License.
+
+ 2. VERBATIM COPYING
+
+ You may copy and distribute the Document in any medium, either
+ commercially or noncommercially, provided that this License, the
+ copyright notices, and the license notice saying this License
+ applies to the Document are reproduced in all copies, and that you
+ add no other conditions whatsoever to those of this License. You
+ may not use technical measures to obstruct or control the reading
+ or further copying of the copies you make or distribute. However,
+ you may accept compensation in exchange for copies. If you
+ distribute a large enough number of copies you must also follow the
+ conditions in section 3.
+
+ You may also lend copies, under the same conditions stated above,
+ and you may publicly display copies.
+
+ 3. COPYING IN QUANTITY
+
+ If you publish printed copies (or copies in media that commonly
+ have printed covers) of the Document, numbering more than 100, and
+ the Document's license notice requires Cover Texts, you must
+ enclose the copies in covers that carry, clearly and legibly, all
+ these Cover Texts: Front-Cover Texts on the front cover, and
+ Back-Cover Texts on the back cover. Both covers must also clearly
+ and legibly identify you as the publisher of these copies. The
+ front cover must present the full title with all words of the title
+ equally prominent and visible. You may add other material on the
+ covers in addition. Copying with changes limited to the covers, as
+ long as they preserve the title of the Document and satisfy these
+ conditions, can be treated as verbatim copying in other respects.
+
+ If the required texts for either cover are too voluminous to fit
+ legibly, you should put the first ones listed (as many as fit
+ reasonably) on the actual cover, and continue the rest onto
+ adjacent pages.
+
+ If you publish or distribute Opaque copies of the Document
+ numbering more than 100, you must either include a machine-readable
+ Transparent copy along with each Opaque copy, or state in or with
+ each Opaque copy a computer-network location from which the general
+ network-using public has access to download using public-standard
+ network protocols a complete Transparent copy of the Document, free
+ of added material. If you use the latter option, you must take
+ reasonably prudent steps, when you begin distribution of Opaque
+ copies in quantity, to ensure that this Transparent copy will
+ remain thus accessible at the stated location until at least one
+ year after the last time you distribute an Opaque copy (directly or
+ through your agents or retailers) of that edition to the public.
+
+ It is requested, but not required, that you contact the authors of
+ the Document well before redistributing any large number of copies,
+ to give them a chance to provide you with an updated version of the
+ Document.
+
+ 4. MODIFICATIONS
+
+ You may copy and distribute a Modified Version of the Document
+ under the conditions of sections 2 and 3 above, provided that you
+ release the Modified Version under precisely this License, with the
+ Modified Version filling the role of the Document, thus licensing
+ distribution and modification of the Modified Version to whoever
+ possesses a copy of it. In addition, you must do these things in
+ the Modified Version:
+
+ A. Use in the Title Page (and on the covers, if any) a title
+ distinct from that of the Document, and from those of previous
+ versions (which should, if there were any, be listed in the
+ History section of the Document). You may use the same title
+ as a previous version if the original publisher of that
+ version gives permission.
+
+ B. List on the Title Page, as authors, one or more persons or
+ entities responsible for authorship of the modifications in
+ the Modified Version, together with at least five of the
+ principal authors of the Document (all of its principal
+ authors, if it has fewer than five), unless they release you
+ from this requirement.
+
+ C. State on the Title page the name of the publisher of the
+ Modified Version, as the publisher.
+
+ D. Preserve all the copyright notices of the Document.
+
+ E. Add an appropriate copyright notice for your modifications
+ adjacent to the other copyright notices.
+
+ F. Include, immediately after the copyright notices, a license
+ notice giving the public permission to use the Modified
+ Version under the terms of this License, in the form shown in
+ the Addendum below.
+
+ G. Preserve in that license notice the full lists of Invariant
+ Sections and required Cover Texts given in the Document's
+ license notice.
+
+ H. Include an unaltered copy of this License.
+
+ I. Preserve the section Entitled "History", Preserve its Title,
+ and add to it an item stating at least the title, year, new
+ authors, and publisher of the Modified Version as given on the
+ Title Page. If there is no section Entitled "History" in the
+ Document, create one stating the title, year, authors, and
+ publisher of the Document as given on its Title Page, then add
+ an item describing the Modified Version as stated in the
+ previous sentence.
+
+ J. Preserve the network location, if any, given in the Document
+ for public access to a Transparent copy of the Document, and
+ likewise the network locations given in the Document for
+ previous versions it was based on. These may be placed in the
+ "History" section. You may omit a network location for a work
+ that was published at least four years before the Document
+ itself, or if the original publisher of the version it refers
+ to gives permission.
+
+ K. For any section Entitled "Acknowledgements" or "Dedications",
+ Preserve the Title of the section, and preserve in the section
+ all the substance and tone of each of the contributor
+ acknowledgements and/or dedications given therein.
+
+ L. Preserve all the Invariant Sections of the Document, unaltered
+ in their text and in their titles. Section numbers or the
+ equivalent are not considered part of the section titles.
+
+ M. Delete any section Entitled "Endorsements". Such a section
+ may not be included in the Modified Version.
+
+ N. Do not retitle any existing section to be Entitled
+ "Endorsements" or to conflict in title with any Invariant
+ Section.
+
+ O. Preserve any Warranty Disclaimers.
+
+ If the Modified Version includes new front-matter sections or
+ appendices that qualify as Secondary Sections and contain no
+ material copied from the Document, you may at your option designate
+ some or all of these sections as invariant. To do this, add their
+ titles to the list of Invariant Sections in the Modified Version's
+ license notice. These titles must be distinct from any other
+ section titles.
+
+ You may add a section Entitled "Endorsements", provided it contains
+ nothing but endorsements of your Modified Version by various
+ parties--for example, statements of peer review or that the text
+ has been approved by an organization as the authoritative
+ definition of a standard.
+
+ You may add a passage of up to five words as a Front-Cover Text,
+ and a passage of up to 25 words as a Back-Cover Text, to the end of
+ the list of Cover Texts in the Modified Version. Only one passage
+ of Front-Cover Text and one of Back-Cover Text may be added by (or
+ through arrangements made by) any one entity. If the Document
+ already includes a cover text for the same cover, previously added
+ by you or by arrangement made by the same entity you are acting on
+ behalf of, you may not add another; but you may replace the old
+ one, on explicit permission from the previous publisher that added
+ the old one.
+
+ The author(s) and publisher(s) of the Document do not by this
+ License give permission to use their names for publicity for or to
+ assert or imply endorsement of any Modified Version.
+
+ 5. COMBINING DOCUMENTS
+
+ You may combine the Document with other documents released under
+ this License, under the terms defined in section 4 above for
+ modified versions, provided that you include in the combination all
+ of the Invariant Sections of all of the original documents,
+ unmodified, and list them all as Invariant Sections of your
+ combined work in its license notice, and that you preserve all
+ their Warranty Disclaimers.
+
+ The combined work need only contain one copy of this License, and
+ multiple identical Invariant Sections may be replaced with a single
+ copy. If there are multiple Invariant Sections with the same name
+ but different contents, make the title of each such section unique
+ by adding at the end of it, in parentheses, the name of the
+ original author or publisher of that section if known, or else a
+ unique number. Make the same adjustment to the section titles in
+ the list of Invariant Sections in the license notice of the
+ combined work.
+
+ In the combination, you must combine any sections Entitled
+ "History" in the various original documents, forming one section
+ Entitled "History"; likewise combine any sections Entitled
+ "Acknowledgements", and any sections Entitled "Dedications". You
+ must delete all sections Entitled "Endorsements."
+
+ 6. COLLECTIONS OF DOCUMENTS
+
+ You may make a collection consisting of the Document and other
+ documents released under this License, and replace the individual
+ copies of this License in the various documents with a single copy
+ that is included in the collection, provided that you follow the
+ rules of this License for verbatim copying of each of the documents
+ in all other respects.
+
+ You may extract a single document from such a collection, and
+ distribute it individually under this License, provided you insert
+ a copy of this License into the extracted document, and follow this
+ License in all other respects regarding verbatim copying of that
+ document.
+
+ 7. AGGREGATION WITH INDEPENDENT WORKS
+
+ A compilation of the Document or its derivatives with other
+ separate and independent documents or works, in or on a volume of a
+ storage or distribution medium, is called an "aggregate" if the
+ copyright resulting from the compilation is not used to limit the
+ legal rights of the compilation's users beyond what the individual
+ works permit. When the Document is included in an aggregate, this
+ License does not apply to the other works in the aggregate which
+ are not themselves derivative works of the Document.
+
+ If the Cover Text requirement of section 3 is applicable to these
+ copies of the Document, then if the Document is less than one half
+ of the entire aggregate, the Document's Cover Texts may be placed
+ on covers that bracket the Document within the aggregate, or the
+ electronic equivalent of covers if the Document is in electronic
+ form. Otherwise they must appear on printed covers that bracket
+ the whole aggregate.
+
+ 8. TRANSLATION
+
+ Translation is considered a kind of modification, so you may
+ distribute translations of the Document under the terms of section
+ 4. Replacing Invariant Sections with translations requires special
+ permission from their copyright holders, but you may include
+ translations of some or all Invariant Sections in addition to the
+ original versions of these Invariant Sections. You may include a
+ translation of this License, and all the license notices in the
+ Document, and any Warranty Disclaimers, provided that you also
+ include the original English version of this License and the
+ original versions of those notices and disclaimers. In case of a
+ disagreement between the translation and the original version of
+ this License or a notice or disclaimer, the original version will
+ prevail.
+
+ If a section in the Document is Entitled "Acknowledgements",
+ "Dedications", or "History", the requirement (section 4) to
+ Preserve its Title (section 1) will typically require changing the
+ actual title.
+
+ 9. TERMINATION
+
+ You may not copy, modify, sublicense, or distribute the Document
+ except as expressly provided under this License. Any attempt
+ otherwise to copy, modify, sublicense, or distribute it is void,
+ and will automatically terminate your rights under this License.
+
+ However, if you cease all violation of this License, then your
+ license from a particular copyright holder is reinstated (a)
+ provisionally, unless and until the copyright holder explicitly and
+ finally terminates your license, and (b) permanently, if the
+ copyright holder fails to notify you of the violation by some
+ reasonable means prior to 60 days after the cessation.
+
+ Moreover, your license from a particular copyright holder is
+ reinstated permanently if the copyright holder notifies you of the
+ violation by some reasonable means, this is the first time you have
+ received notice of violation of this License (for any work) from
+ that copyright holder, and you cure the violation prior to 30 days
+ after your receipt of the notice.
+
+ Termination of your rights under this section does not terminate
+ the licenses of parties who have received copies or rights from you
+ under this License. If your rights have been terminated and not
+ permanently reinstated, receipt of a copy of some or all of the
+ same material does not give you any rights to use it.
+
+ 10. FUTURE REVISIONS OF THIS LICENSE
+
+ 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
+ <http://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 License "or any later version" applies to it, you
+ have the option of following the terms and conditions either of
+ that specified version or of any later version that has been
+ published (not as a draft) by the Free Software Foundation. If the
+ Document does not specify a version number of this License, you may
+ choose any version ever published (not as a draft) by the Free
+ Software Foundation. If the Document specifies that a proxy can
+ decide which future versions of this License can be used, that
+ proxy's public statement of acceptance of a version permanently
+ authorizes you to choose that version for the Document.
+
+ 11. RELICENSING
+
+ "Massive Multiauthor Collaboration Site" (or "MMC Site") means any
+ World Wide Web server that publishes copyrightable works and also
+ provides prominent facilities for anybody to edit those works. A
+ public wiki that anybody can edit is an example of such a server.
+ A "Massive Multiauthor Collaboration" (or "MMC") contained in the
+ site means any set of copyrightable works thus published on the MMC
+ site.
+
+ "CC-BY-SA" means the Creative Commons Attribution-Share Alike 3.0
+ license published by Creative Commons Corporation, a not-for-profit
+ corporation with a principal place of business in San Francisco,
+ California, as well as future copyleft versions of that license
+ published by that same organization.
+
+ "Incorporate" means to publish or republish a Document, in whole or
+ in part, as part of another Document.
+
+ An MMC is "eligible for relicensing" if it is licensed under this
+ License, and if all works that were first published under this
+ License somewhere other than this MMC, and subsequently
+ incorporated in whole or in part into the MMC, (1) had no cover
+ texts or invariant sections, and (2) were thus incorporated prior
+ to November 1, 2008.
+
+ The operator of an MMC Site may republish an MMC contained in the
+ site under CC-BY-SA on the same site at any time before August 1,
+ 2009, provided the MMC is eligible for relicensing.
+
+ADDENDUM: How to use this License for your documents
+====================================================
+
+To use this License in a document you have written, include a copy of
+the License in the document and put the following copyright and license
+notices just after the title page:
+
+ Copyright (C) YEAR YOUR NAME.
+ Permission is granted to copy, distribute and/or modify this document
+ under the terms of the GNU Free Documentation License, Version 1.3
+ or any later version published by the Free Software Foundation;
+ with no Invariant Sections, no Front-Cover Texts, and no Back-Cover
+ Texts. A copy of the license is included in the section entitled ``GNU
+ Free Documentation License''.
+
+ If you have Invariant Sections, Front-Cover Texts and Back-Cover
+Texts, replace the "with...Texts." line with this:
+
+ with the Invariant Sections being LIST THEIR TITLES, with
+ the Front-Cover Texts being LIST, and with the Back-Cover Texts
+ being LIST.
+
+ If you have Invariant Sections without Cover Texts, or some other
+combination of the three, merge those two alternatives to suit the
+situation.
+
+ If your document contains nontrivial examples of program code, we
+recommend releasing these examples in parallel under your choice of free
+software license, such as the GNU General Public License, to permit
+their use in free software.

-File: sed.info, Node: Concept Index, Next: Command and Option Index, Prev: Extended regexps, Up: Top
+File: sed.info-t, Node: Concept Index, Next: Command and Option Index, Prev: GNU Free Documentation License, Up: Top
Concept Index
*************
This is a general index of all issues discussed in this manual, with the
-exception of the `sed' commands and command-line options.
+exception of the 'sed' commands and command-line options.
* Menu:
-* 0 address: Reporting Bugs. (line 102)
+* -e, example: Overview. (line 43)
+* -e, example <1>: sed script overview. (line 37)
+* -expression, example: Overview. (line 43)
+* -f, example: Overview. (line 43)
+* -f, example <1>: sed script overview. (line 37)
+* -file, example: Overview. (line 43)
+* -i, example: Overview. (line 23)
+* -n, example: Overview. (line 30)
+* -s, example: Overview. (line 37)
+* 0 address: Reporting Bugs. (line 114)
+* ;, command separator: sed script overview. (line 37)
+* a, and semicolons: sed script overview. (line 56)
* Additional reading about sed: Other Resources. (line 6)
-* ADDR1,+N: Addresses. (line 80)
-* ADDR1,~N: Addresses. (line 80)
-* Address, as a regular expression: Addresses. (line 27)
-* Address, last line: Addresses. (line 22)
-* Address, numeric: Addresses. (line 8)
-* Addresses, in sed scripts: Addresses. (line 6)
-* Append hold space to pattern space: Other Commands. (line 125)
-* Append next input line to pattern space: Other Commands. (line 105)
-* Append pattern space to hold space: Other Commands. (line 117)
-* Appending text after a line: Other Commands. (line 27)
-* Backreferences, in regular expressions: The "s" Command. (line 19)
-* Branch to a label, if s/// failed: Extended Commands. (line 71)
+* ADDR1,+N: Range Addresses. (line 31)
+* ADDR1,~N: Range Addresses. (line 31)
+* address range, example: sed script overview. (line 23)
+* Address, as a regular expression: Regexp Addresses. (line 13)
+* Address, last line: Numeric Addresses. (line 13)
+* Address, numeric: Numeric Addresses. (line 8)
+* addresses, excluding: Addresses overview. (line 31)
+* Addresses, in sed scripts: Numeric Addresses. (line 6)
+* addresses, negating: Addresses overview. (line 31)
+* addresses, numeric: Addresses overview. (line 6)
+* addresses, range: Addresses overview. (line 24)
+* addresses, regular expression: Addresses overview. (line 18)
+* addresses, syntax: sed script overview. (line 13)
+* alphabetic characters: Character Classes and Bracket Expressions.
+ (line 49)
+* alphanumeric characters: Character Classes and Bracket Expressions.
+ (line 44)
+* Append hold space to pattern space: Other Commands. (line 284)
+* Append next input line to pattern space: Other Commands. (line 257)
+* Append pattern space to hold space: Other Commands. (line 276)
+* Appending text after a line: Other Commands. (line 45)
+* back-reference: Back-references and Subexpressions.
+ (line 6)
+* Backreferences, in regular expressions: The "s" Command. (line 18)
+* blank characters: Character Classes and Bracket Expressions.
+ (line 54)
+* bracket expression: Character Classes and Bracket Expressions.
+ (line 6)
+* Branch to a label, if s/// failed: Extended Commands. (line 63)
* Branch to a label, if s/// succeeded: Programming Commands.
(line 22)
* Branch to a label, unconditionally: Programming Commands.
(line 18)
* Buffer spaces, pattern and hold: Execution Cycle. (line 6)
* Bugs, reporting: Reporting Bugs. (line 6)
-* Case-insensitive matching: The "s" Command. (line 112)
+* c, and semicolons: sed script overview. (line 56)
+* case insensitive, regular expression: Regexp Addresses. (line 47)
+* Case-insensitive matching: The "s" Command. (line 117)
* Caveat -- #n on first line: Common Commands. (line 20)
-* Command groups: Common Commands. (line 50)
+* character class: Character Classes and Bracket Expressions.
+ (line 6)
+* character classes: Character Classes and Bracket Expressions.
+ (line 43)
+* classes of characters: Character Classes and Bracket Expressions.
+ (line 43)
+* Command groups: Common Commands. (line 91)
* Comments, in scripts: Common Commands. (line 12)
-* Conditional branch <1>: Extended Commands. (line 71)
* Conditional branch: Programming Commands.
(line 22)
-* Copy hold space into pattern space: Other Commands. (line 121)
-* Copy pattern space into hold space: Other Commands. (line 113)
-* Delete first line from pattern space: Other Commands. (line 99)
-* Disabling autoprint, from command line: Invoking sed. (line 34)
-* empty regular expression: Addresses. (line 31)
-* Emptying pattern space <1>: Reporting Bugs. (line 129)
-* Emptying pattern space: Extended Commands. (line 93)
+* Conditional branch <1>: Extended Commands. (line 63)
+* control characters: Character Classes and Bracket Expressions.
+ (line 57)
+* Copy hold space into pattern space: Other Commands. (line 280)
+* Copy pattern space into hold space: Other Commands. (line 272)
+* d, example: sed script overview. (line 23)
+* Delete first line from pattern space: Other Commands. (line 251)
+* digit characters: Character Classes and Bracket Expressions.
+ (line 62)
+* Disabling autoprint, from command line: Command-Line Options.
+ (line 23)
+* empty regular expression: Regexp Addresses. (line 22)
+* Emptying pattern space: Extended Commands. (line 85)
+* Emptying pattern space <1>: Reporting Bugs. (line 143)
* Evaluate Bourne-shell commands: Extended Commands. (line 12)
* Evaluate Bourne-shell commands, after substitution: The "s" Command.
- (line 103)
-* Exchange hold space with pattern space: Other Commands. (line 129)
-* Excluding lines: Addresses. (line 103)
-* Extended regular expressions, choosing: Invoking sed. (line 113)
-* Extended regular expressions, syntax: Extended regexps. (line 6)
+ (line 108)
+* example, address range: sed script overview. (line 23)
+* example, regular expression: sed script overview. (line 28)
+* Exchange hold space with pattern space: Other Commands. (line 288)
+* Excluding lines: Addresses overview. (line 31)
+* exit status: Exit status. (line 6)
+* exit status, example: Exit status. (line 25)
+* Extended regular expressions, choosing: Command-Line Options.
+ (line 102)
+* Extended regular expressions, syntax: ERE syntax. (line 6)
* File name, printing: Extended Commands. (line 30)
-* Files to be processed as input: Invoking sed. (line 148)
+* Files to be processed as input: Command-Line Options.
+ (line 148)
* Flow of control in scripts: Programming Commands.
(line 11)
-* Global substitution: The "s" Command. (line 69)
-* GNU extensions, /dev/stderr file <1>: Other Commands. (line 88)
-* GNU extensions, /dev/stderr file: The "s" Command. (line 96)
-* GNU extensions, /dev/stdin file <1>: Extended Commands. (line 61)
-* GNU extensions, /dev/stdin file: Other Commands. (line 78)
-* GNU extensions, /dev/stdout file <1>: Other Commands. (line 88)
-* GNU extensions, /dev/stdout file <2>: The "s" Command. (line 96)
-* GNU extensions, /dev/stdout file: Invoking sed. (line 156)
-* GNU extensions, 0 address <1>: Reporting Bugs. (line 102)
-* GNU extensions, 0 address: Addresses. (line 80)
-* GNU extensions, 0,ADDR2 addressing: Addresses. (line 80)
-* GNU extensions, ADDR1,+N addressing: Addresses. (line 80)
-* GNU extensions, ADDR1,~N addressing: Addresses. (line 80)
-* GNU extensions, branch if s/// failed: Extended Commands. (line 71)
+* Global substitution: The "s" Command. (line 74)
+* GNU extensions, /dev/stderr file: The "s" Command. (line 101)
+* GNU extensions, /dev/stderr file <1>: Other Commands. (line 240)
+* 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)
+* 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)
+* GNU extensions, 0 address <1>: Reporting Bugs. (line 114)
+* GNU extensions, 0,ADDR2 addressing: Range Addresses. (line 31)
+* GNU extensions, ADDR1,+N addressing: Range Addresses. (line 31)
+* GNU extensions, ADDR1,~N addressing: Range Addresses. (line 31)
+* GNU extensions, branch if s/// failed: Extended Commands. (line 63)
* GNU extensions, case modifiers in s commands: The "s" Command.
- (line 23)
+ (line 29)
* GNU extensions, checking for their presence: Extended Commands.
- (line 77)
-* GNU extensions, disabling: Invoking sed. (line 81)
-* GNU extensions, emptying pattern space <1>: Reporting Bugs. (line 129)
-* GNU extensions, emptying pattern space: Extended Commands. (line 93)
+ (line 69)
+* GNU extensions, disabling: Command-Line Options.
+ (line 69)
+* 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.
+ (line 108)
* GNU extensions, evaluating Bourne-shell commands <1>: Extended Commands.
(line 12)
-* GNU extensions, evaluating Bourne-shell commands: The "s" Command.
- (line 103)
-* GNU extensions, extended regular expressions: Invoking sed. (line 113)
-* GNU extensions, g and NUMBER modifier interaction in s command: The "s" Command.
- (line 75)
-* GNU extensions, I modifier <1>: The "s" Command. (line 112)
-* GNU extensions, I modifier: Addresses. (line 49)
-* GNU extensions, in-place editing <1>: Reporting Bugs. (line 84)
-* GNU extensions, in-place editing: Invoking sed. (line 51)
-* GNU extensions, L command: Extended Commands. (line 34)
-* GNU extensions, M modifier <1>: The "s" Command. (line 117)
-* GNU extensions, M modifier: Addresses. (line 54)
-* GNU extensions, modifiers and the empty regular expression: Addresses.
- (line 31)
-* GNU extensions, N~M addresses: Addresses. (line 13)
-* GNU extensions, quitting silently: Extended Commands. (line 44)
-* GNU extensions, R command: Extended Commands. (line 61)
+* GNU extensions, extended regular expressions: Command-Line Options.
+ (line 102)
+* 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)
+* GNU extensions, in-place editing: Command-Line Options.
+ (line 40)
+* GNU extensions, in-place editing <1>: Reporting Bugs. (line 95)
+* GNU extensions, M modifier: The "s" Command. (line 122)
+* GNU extensions, M modifier <1>: Regexp Addresses. (line 75)
+* GNU extensions, modifiers and the empty regular expression: Regexp Addresses.
+ (line 22)
+* GNU extensions, N~M addresses: Numeric Addresses. (line 18)
+* GNU extensions, quitting silently: Extended Commands. (line 36)
+* GNU extensions, R command: Extended Commands. (line 53)
* GNU extensions, reading a file a line at a time: Extended Commands.
- (line 61)
-* GNU extensions, reformatting paragraphs: Extended Commands. (line 34)
+ (line 53)
+* GNU extensions, returning an exit code: Common Commands. (line 28)
* GNU extensions, returning an exit code <1>: Extended Commands.
- (line 44)
-* GNU extensions, returning an exit code: Common Commands. (line 30)
-* GNU extensions, setting line length: Other Commands. (line 65)
-* GNU extensions, special escapes <1>: Reporting Bugs. (line 77)
+ (line 36)
+* GNU extensions, setting line length: Other Commands. (line 207)
* GNU extensions, special escapes: Escapes. (line 6)
-* GNU extensions, special two-address forms: Addresses. (line 80)
+* GNU extensions, special escapes <1>: Reporting Bugs. (line 88)
+* GNU extensions, special two-address forms: Range Addresses. (line 31)
+* GNU extensions, subprocesses: The "s" Command. (line 108)
* GNU extensions, subprocesses <1>: Extended Commands. (line 12)
-* GNU extensions, subprocesses: The "s" Command. (line 103)
-* GNU extensions, to basic regular expressions <1>: Reporting Bugs.
- (line 50)
-* GNU extensions, to basic regular expressions: Regular Expressions.
- (line 26)
+* GNU extensions, to basic regular expressions: BRE syntax. (line 13)
+* GNU extensions, to basic regular expressions <1>: BRE syntax.
+ (line 59)
+* GNU extensions, to basic regular expressions <2>: BRE syntax.
+ (line 62)
+* GNU extensions, to basic regular expressions <3>: BRE syntax.
+ (line 77)
+* GNU extensions, to basic regular expressions <4>: BRE syntax.
+ (line 87)
+* GNU extensions, to basic regular expressions <5>: Reporting Bugs.
+ (line 61)
* GNU extensions, two addresses supported by most commands: Other Commands.
- (line 25)
+ (line 61)
+* GNU extensions, two addresses supported by most commands <1>: Other Commands.
+ (line 115)
+* GNU extensions, two addresses supported by most commands <2>: Other Commands.
+ (line 204)
+* GNU extensions, two addresses supported by most commands <3>: Other Commands.
+ (line 236)
* GNU extensions, unlimited line length: Limitations. (line 6)
* GNU extensions, writing first line to a file: Extended Commands.
- (line 88)
+ (line 80)
* Goto, in scripts: Programming Commands.
(line 18)
-* Greedy regular expression matching: Regular Expressions. (line 143)
-* Grouping commands: Common Commands. (line 50)
-* Hold space, appending from pattern space: Other Commands. (line 117)
-* Hold space, appending to pattern space: Other Commands. (line 125)
-* Hold space, copy into pattern space: Other Commands. (line 121)
-* Hold space, copying pattern space into: Other Commands. (line 113)
+* graphic characters: Character Classes and Bracket Expressions.
+ (line 65)
+* Greedy regular expression matching: BRE syntax. (line 113)
+* Grouping commands: Common Commands. (line 91)
+* hexadecimal digits: Character Classes and Bracket Expressions.
+ (line 88)
+* Hold space, appending from pattern space: Other Commands. (line 276)
+* Hold space, appending to pattern space: Other Commands. (line 284)
+* Hold space, copy into pattern space: Other Commands. (line 280)
+* Hold space, copying pattern space into: Other Commands. (line 272)
* Hold space, definition: Execution Cycle. (line 6)
-* Hold space, exchange with pattern space: Other Commands. (line 129)
-* In-place editing: Reporting Bugs. (line 84)
-* In-place editing, activating: Invoking sed. (line 51)
-* In-place editing, Perl-style backup file names: Invoking sed.
- (line 62)
-* Inserting text before a line: Other Commands. (line 46)
+* Hold space, exchange with pattern space: Other Commands. (line 288)
+* i, and semicolons: sed script overview. (line 56)
+* In-place editing: Reporting Bugs. (line 95)
+* In-place editing, activating: Command-Line Options.
+ (line 40)
+* In-place editing, Perl-style backup file names: Command-Line Options.
+ (line 51)
+* Inserting text before a line: Other Commands. (line 104)
* Labels, in scripts: Programming Commands.
(line 14)
-* Last line, selecting: Addresses. (line 22)
-* Line length, setting <1>: Other Commands. (line 65)
-* Line length, setting: Invoking sed. (line 76)
-* Line number, printing: Other Commands. (line 62)
-* Line selection: Addresses. (line 6)
-* Line, selecting by number: Addresses. (line 8)
-* Line, selecting by regular expression match: Addresses. (line 27)
-* Line, selecting last: Addresses. (line 22)
-* List pattern space: Other Commands. (line 65)
+* Last line, selecting: Numeric Addresses. (line 13)
+* Line length, setting: Command-Line Options.
+ (line 64)
+* Line length, setting <1>: Other Commands. (line 207)
+* Line number, printing: Other Commands. (line 194)
+* Line selection: Numeric Addresses. (line 6)
+* Line, selecting by number: Numeric Addresses. (line 8)
+* Line, selecting by regular expression match: Regexp Addresses.
+ (line 13)
+* Line, selecting last: Numeric Addresses. (line 13)
+* List pattern space: Other Commands. (line 207)
+* lower-case letters: Character Classes and Bracket Expressions.
+ (line 68)
* Mixing g and NUMBER modifiers in the s command: The "s" Command.
- (line 75)
-* Next input line, append to pattern space: Other Commands. (line 105)
+ (line 80)
+* multiple files: Overview. (line 37)
+* multiple sed commands: sed script overview. (line 37)
+* named character classes: Character Classes and Bracket Expressions.
+ (line 43)
+* newline, command separator: sed script overview. (line 37)
+* Next input line, append to pattern space: Other Commands. (line 257)
* Next input line, replace pattern space with: Common Commands.
- (line 44)
-* Non-bugs, 0 address: Reporting Bugs. (line 102)
-* Non-bugs, in-place editing: Reporting Bugs. (line 84)
-* Non-bugs, localization-related: Reporting Bugs. (line 111)
+ (line 61)
+* Non-bugs, 0 address: Reporting Bugs. (line 114)
+* Non-bugs, in-place editing: Reporting Bugs. (line 95)
+* Non-bugs, localization-related: Reporting Bugs. (line 124)
+* Non-bugs, localization-related <1>: Reporting Bugs. (line 143)
* Non-bugs, N command on the last line: Reporting Bugs. (line 30)
-* Non-bugs, regex syntax clashes: Reporting Bugs. (line 50)
-* Parenthesized substrings: The "s" Command. (line 19)
+* Non-bugs, regex syntax clashes: Reporting Bugs. (line 61)
+* numeric addresses: Addresses overview. (line 6)
+* numeric characters: Character Classes and Bracket Expressions.
+ (line 62)
+* output: Overview. (line 23)
+* output, suppressing: Overview. (line 30)
+* p, example: Overview. (line 30)
+* paragraphs, processing: Multiline techniques.
+ (line 53)
+* parameters, script: Overview. (line 43)
+* Parenthesized substrings: The "s" Command. (line 18)
* Pattern space, definition: Execution Cycle. (line 6)
* Portability, comments: Common Commands. (line 15)
* Portability, line length limitations: Limitations. (line 6)
* Portability, N command on the last line: Reporting Bugs. (line 30)
-* POSIXLY_CORRECT behavior, bracket expressions: Regular Expressions.
- (line 105)
-* POSIXLY_CORRECT behavior, enabling: Invoking sed. (line 84)
+* POSIXLY_CORRECT behavior, bracket expressions: Character Classes and Bracket Expressions.
+ (line 112)
+* POSIXLY_CORRECT behavior, enabling: Command-Line Options.
+ (line 72)
* POSIXLY_CORRECT behavior, escapes: Escapes. (line 11)
-* POSIXLY_CORRECT behavior, N command: Reporting Bugs. (line 45)
-* Print first line from pattern space: Other Commands. (line 110)
+* POSIXLY_CORRECT behavior, N command: Reporting Bugs. (line 56)
+* Print first line from pattern space: Other Commands. (line 269)
+* printable characters: Character Classes and Bracket Expressions.
+ (line 72)
* Printing file name: Extended Commands. (line 30)
-* Printing line number: Other Commands. (line 62)
-* Printing text unambiguously: Other Commands. (line 65)
-* Quitting <1>: Extended Commands. (line 44)
-* Quitting: Common Commands. (line 30)
-* Range of lines: Addresses. (line 67)
-* Range with start address of zero: Addresses. (line 80)
-* Read next input line: Common Commands. (line 44)
-* Read text from a file <1>: Extended Commands. (line 61)
-* Read text from a file: Other Commands. (line 78)
-* Reformat pattern space: Extended Commands. (line 34)
-* Reformatting paragraphs: Extended Commands. (line 34)
+* Printing line number: Other Commands. (line 194)
+* Printing text unambiguously: Other Commands. (line 207)
+* processing paragraphs: Multiline techniques.
+ (line 53)
+* punctuation characters: Character Classes and Bracket Expressions.
+ (line 75)
+* Q, example: Exit status. (line 25)
+* q, example: sed script overview. (line 28)
+* Quitting: Common Commands. (line 28)
+* Quitting <1>: Extended Commands. (line 36)
+* range addresses: Addresses overview. (line 24)
+* range expression: Character Classes and Bracket Expressions.
+ (line 18)
+* Range of lines: Range Addresses. (line 6)
+* Range with start address of zero: Range Addresses. (line 31)
+* 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)
+* 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.
- (line 113)
+ (line 272)
* Replace pattern space with copy of hold space: Other Commands.
- (line 121)
+ (line 280)
* Replacing all text matching regexp in a line: The "s" Command.
- (line 69)
+ (line 74)
* Replacing only Nth match of regexp in a line: The "s" Command.
- (line 73)
-* Replacing selected lines with other text: Other Commands. (line 52)
-* Requiring GNU sed: Extended Commands. (line 77)
-* Script structure: sed Programs. (line 6)
-* Script, from a file: Invoking sed. (line 46)
-* Script, from command line: Invoking sed. (line 41)
-* sed program structure: sed Programs. (line 6)
-* Selecting lines to process: Addresses. (line 6)
-* Selecting non-matching lines: Addresses. (line 103)
-* Several lines, selecting: Addresses. (line 67)
-* Slash character, in regular expressions: Addresses. (line 41)
+ (line 78)
+* Replacing selected lines with other text: Other Commands. (line 157)
+* Requiring GNU sed: Extended Commands. (line 69)
+* Sandbox mode: Command-Line Options.
+ (line 124)
+* script parameter: Overview. (line 43)
+* Script structure: sed script overview. (line 6)
+* Script, from a file: Command-Line Options.
+ (line 35)
+* Script, from command line: Command-Line Options.
+ (line 30)
+* sed commands syntax: sed script overview. (line 13)
+* sed commands, multiple: sed script overview. (line 37)
+* sed script structure: sed script overview. (line 6)
+* Selecting lines to process: Numeric Addresses. (line 6)
+* Selecting non-matching lines: Addresses overview. (line 31)
+* semicolons, command separator: sed script overview. (line 37)
+* Several lines, selecting: Range Addresses. (line 6)
+* Slash character, in regular expressions: Regexp Addresses. (line 32)
+* space characters: Character Classes and Bracket Expressions.
+ (line 80)
* Spaces, pattern and hold: Execution Cycle. (line 6)
-* Special addressing forms: Addresses. (line 80)
-* Standard input, processing as input: Invoking sed. (line 150)
+* Special addressing forms: Range Addresses. (line 31)
+* standard input: Overview. (line 15)
+* Standard input, processing as input: Command-Line Options.
+ (line 150)
+* standard output: Overview. (line 23)
+* stdin: Overview. (line 15)
+* stdout: Overview. (line 23)
* Stream editor: Introduction. (line 6)
+* subexpression: Back-references and Subexpressions.
+ (line 6)
+* Subprocesses: The "s" Command. (line 108)
* Subprocesses <1>: Extended Commands. (line 12)
-* Subprocesses: The "s" Command. (line 103)
-* Substitution of text, options: The "s" Command. (line 65)
-* Text, appending: Other Commands. (line 27)
-* Text, deleting: Common Commands. (line 36)
-* Text, insertion: Other Commands. (line 46)
-* Text, printing: Common Commands. (line 39)
-* Text, printing after substitution: The "s" Command. (line 83)
+* Substitution of text, options: The "s" Command. (line 70)
+* suppressing output: Overview. (line 30)
+* syntax, addresses: sed script overview. (line 13)
+* syntax, sed commands: sed script overview. (line 13)
+* Text, appending: Other Commands. (line 45)
+* Text, deleting: Common Commands. (line 44)
+* Text, insertion: Other Commands. (line 104)
+* Text, printing: Common Commands. (line 52)
+* Text, printing after substitution: The "s" Command. (line 88)
* Text, writing to a file after substitution: The "s" Command.
- (line 96)
-* Transliteration: Other Commands. (line 14)
-* Unbuffered I/O, choosing: Invoking sed. (line 131)
-* Usage summary, printing: Invoking sed. (line 28)
-* Version, printing: Invoking sed. (line 24)
-* Working on separate files: Invoking sed. (line 121)
-* Write first line to a file: Extended Commands. (line 88)
-* Write to a file: Other Commands. (line 88)
-* Zero, as range start address: Addresses. (line 80)
+ (line 101)
+* Transliteration: Other Commands. (line 11)
+* Unbuffered I/O, choosing: Command-Line Options.
+ (line 131)
+* upper-case letters: Character Classes and Bracket Expressions.
+ (line 84)
+* Usage summary, printing: Command-Line Options.
+ (line 17)
+* Version, printing: Command-Line Options.
+ (line 13)
+* whitespace characters: Character Classes and Bracket Expressions.
+ (line 80)
+* Working on separate files: Command-Line Options.
+ (line 115)
+* 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.
+ (line 88)
+* Zero, as range start address: Range Addresses. (line 31)

-File: sed.info, Node: Command and Option Index, Prev: Concept Index, Up: Top
+File: sed.info-t, Node: Command and Option Index, Prev: Concept Index, Up: Top
Command and Option Index
************************
-This is an alphabetical list of all `sed' commands and command-line
+This is an alphabetical list of all 'sed' commands and command-line
options.
* Menu:
* # (comments): Common Commands. (line 12)
-* --binary: Invoking sed. (line 93)
-* --expression: Invoking sed. (line 41)
-* --file: Invoking sed. (line 46)
-* --follow-symlinks: Invoking sed. (line 104)
-* --help: Invoking sed. (line 28)
-* --in-place: Invoking sed. (line 51)
-* --line-length: Invoking sed. (line 76)
-* --null-data: Invoking sed. (line 139)
-* --posix: Invoking sed. (line 81)
-* --quiet: Invoking sed. (line 34)
-* --regexp-extended: Invoking sed. (line 113)
-* --separate: Invoking sed. (line 121)
-* --silent: Invoking sed. (line 34)
-* --unbuffered: Invoking sed. (line 131)
-* --version: Invoking sed. (line 24)
-* --zero-terminated: Invoking sed. (line 139)
-* -b: Invoking sed. (line 93)
-* -e: Invoking sed. (line 41)
-* -f: Invoking sed. (line 46)
-* -i: Invoking sed. (line 51)
-* -l: Invoking sed. (line 76)
-* -n: Invoking sed. (line 34)
+* --binary: Command-Line Options.
+ (line 81)
+* --expression: Command-Line Options.
+ (line 30)
+* --file: Command-Line Options.
+ (line 35)
+* --follow-symlinks: Command-Line Options.
+ (line 92)
+* --help: Command-Line Options.
+ (line 17)
+* --in-place: Command-Line Options.
+ (line 40)
+* --line-length: Command-Line Options.
+ (line 64)
+* --null-data: Command-Line Options.
+ (line 139)
+* --posix: Command-Line Options.
+ (line 69)
+* --quiet: Command-Line Options.
+ (line 23)
+* --regexp-extended: Command-Line Options.
+ (line 102)
+* --sandbox: Command-Line Options.
+ (line 124)
+* --separate: Command-Line Options.
+ (line 115)
+* --silent: Command-Line Options.
+ (line 23)
+* --unbuffered: Command-Line Options.
+ (line 131)
+* --version: Command-Line Options.
+ (line 13)
+* --zero-terminated: Command-Line Options.
+ (line 139)
+* -b: Command-Line Options.
+ (line 81)
+* -e: Command-Line Options.
+ (line 30)
+* -E: Command-Line Options.
+ (line 102)
+* -f: Command-Line Options.
+ (line 35)
+* -i: Command-Line Options.
+ (line 40)
+* -l: Command-Line Options.
+ (line 64)
+* -n: Command-Line Options.
+ (line 23)
* -n, forcing from within a script: Common Commands. (line 20)
-* -r: Invoking sed. (line 113)
-* -s: Invoking sed. (line 121)
-* -u: Invoking sed. (line 131)
-* -z: Invoking sed. (line 139)
+* -r: Command-Line Options.
+ (line 102)
+* -s: Command-Line Options.
+ (line 115)
+* -u: Command-Line Options.
+ (line 131)
+* -z: Command-Line Options.
+ (line 139)
* : (label) command: Programming Commands.
(line 14)
-* = (print line number) command: Other Commands. (line 62)
-* a (append text lines) command: Other Commands. (line 27)
+* = (print line number) command: Other Commands. (line 194)
+* {} command grouping: Common Commands. (line 91)
+* a (append text lines) command: Other Commands. (line 45)
+* alnum character class: Character Classes and Bracket Expressions.
+ (line 44)
+* alpha character class: Character Classes and Bracket Expressions.
+ (line 49)
* b (branch) command: Programming Commands.
(line 18)
-* c (change to text lines) command: Other Commands. (line 52)
-* D (delete first line) command: Other Commands. (line 99)
-* d (delete) command: Common Commands. (line 36)
+* blank character class: Character Classes and Bracket Expressions.
+ (line 54)
+* c (change to text lines) command: Other Commands. (line 157)
+* cntrl character class: Character Classes and Bracket Expressions.
+ (line 57)
+* D (delete first line) command: Other Commands. (line 251)
+* d (delete) command: Common Commands. (line 44)
+* digit character class: Character Classes and Bracket Expressions.
+ (line 62)
* e (evaluate) command: Extended Commands. (line 12)
* F (File name) command: Extended Commands. (line 30)
-* G (appending Get) command: Other Commands. (line 125)
-* g (get) command: Other Commands. (line 121)
-* H (append Hold) command: Other Commands. (line 117)
-* h (hold) command: Other Commands. (line 113)
-* i (insert text lines) command: Other Commands. (line 46)
-* L (fLow paragraphs) command: Extended Commands. (line 34)
-* l (list unambiguously) command: Other Commands. (line 65)
-* N (append Next line) command: Other Commands. (line 105)
-* n (next-line) command: Common Commands. (line 44)
-* P (print first line) command: Other Commands. (line 110)
-* p (print) command: Common Commands. (line 39)
-* q (quit) command: Common Commands. (line 30)
-* Q (silent Quit) command: Extended Commands. (line 44)
-* r (read file) command: Other Commands. (line 78)
-* R (read line) command: Extended Commands. (line 61)
-* s command, option flags: The "s" Command. (line 65)
-* T (test and branch if failed) command: Extended Commands. (line 71)
+* G (appending Get) command: Other Commands. (line 284)
+* g (get) command: Other Commands. (line 280)
+* graph character class: Character Classes and Bracket Expressions.
+ (line 65)
+* H (append Hold) command: Other Commands. (line 276)
+* h (hold) command: Other Commands. (line 272)
+* i (insert text lines) command: Other Commands. (line 104)
+* l (list unambiguously) command: Other Commands. (line 207)
+* lower character class: Character Classes and Bracket Expressions.
+ (line 68)
+* N (append Next line) command: Other Commands. (line 257)
+* n (next-line) command: Common Commands. (line 61)
+* P (print first line) command: Other Commands. (line 269)
+* p (print) command: Common Commands. (line 52)
+* print character class: Character Classes and Bracket Expressions.
+ (line 72)
+* punct character class: Character Classes and Bracket Expressions.
+ (line 75)
+* q (quit) command: Common Commands. (line 28)
+* Q (silent Quit) command: Extended Commands. (line 36)
+* r (read file) command: Other Commands. (line 219)
+* R (read line) command: Extended Commands. (line 53)
+* s command, option flags: The "s" Command. (line 70)
+* space character class: Character Classes and Bracket Expressions.
+ (line 80)
+* T (test and branch if failed) command: Extended Commands. (line 63)
* t (test and branch if successful) command: Programming Commands.
(line 22)
-* v (version) command: Extended Commands. (line 77)
-* w (write file) command: Other Commands. (line 88)
-* W (write first line) command: Extended Commands. (line 88)
-* x (eXchange) command: Other Commands. (line 129)
-* y (transliterate) command: Other Commands. (line 14)
-* z (Zap) command: Extended Commands. (line 93)
-* {} command grouping: Common Commands. (line 50)
+* upper character class: Character Classes and Bracket Expressions.
+ (line 84)
+* v (version) command: Extended Commands. (line 69)
+* w (write file) command: Other Commands. (line 240)
+* W (write first line) command: Extended Commands. (line 80)
+* x (eXchange) command: Other Commands. (line 288)
+* xdigit character class: Character Classes and Bracket Expressions.
+ (line 88)
+* y (transliterate) command: Other Commands. (line 11)
+* z (Zap) command: Extended Commands. (line 85)

Tag Table:
-Node: Top944
-Node: Introduction3867
-Node: Invoking sed4421
-Ref: Invoking sed-Footnote-110793
-Ref: Invoking sed-Footnote-210985
-Node: sed Programs11084
-Node: Execution Cycle12617
-Ref: Execution Cycle-Footnote-113794
-Node: Addresses14095
-Node: Regular Expressions18996
-Node: Common Commands26905
-Node: The "s" Command28908
-Ref: The "s" Command-Footnote-134229
-Node: Other Commands34301
-Ref: Other Commands-Footnote-139501
-Node: Programming Commands39573
-Node: Extended Commands40487
-Node: Escapes44752
-Ref: Escapes-Footnote-147763
-Node: Examples47954
-Node: Centering lines49050
-Node: Increment a number49942
-Ref: Increment a number-Footnote-151419
-Node: Rename files to lower case51539
-Node: Print bash environment54312
-Node: Reverse chars of lines55067
-Ref: Reverse chars of lines-Footnote-156068
-Node: tac56285
-Node: cat -n57052
-Node: cat -b58874
-Node: wc -c59621
-Ref: wc -c-Footnote-161529
-Node: wc -w61598
-Node: wc -l63062
-Node: head63306
-Node: tail63637
-Node: uniq65318
-Node: uniq -d66106
-Node: uniq -u66817
-Node: cat -s67528
-Node: Limitations69379
-Node: Other Resources70220
-Node: Reporting Bugs71065
-Ref: Reporting Bugs-Footnote-178131
-Node: Extended regexps78202
-Node: Concept Index79517
-Node: Command and Option Index94612
+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 overview13561
+Node: sed commands list16049
+Node: The "s" Command20854
+Ref: The "s" Command-Footnote-126320
+Node: Common Commands26392
+Node: Other Commands29424
+Ref: Other Commands-Footnote-138450
+Node: Programming Commands38522
+Node: Extended Commands39436
+Node: sed addresses43302
+Node: Addresses overview43733
+Node: Numeric Addresses45511
+Node: Regexp Addresses46864
+Ref: Regexp Addresses-Footnote-150251
+Node: Range Addresses50391
+Node: sed regular expressions52873
+Node: Regular Expressions Overview53675
+Node: BRE vs ERE55184
+Node: BRE syntax56778
+Node: ERE syntax63165
+Node: Character Classes and Bracket Expressions64639
+Node: regexp extensions69479
+Node: Back-references and Subexpressions71869
+Node: Escapes74275
+Ref: Escapes-Footnote-176473
+Node: Locale Considerations76664
+Node: advanced sed77935
+Node: Execution Cycle78296
+Ref: Execution Cycle-Footnote-179493
+Node: Hold and Pattern Buffers79794
+Node: Multiline techniques79984
+Node: Branching and flow control83200
+Node: Examples83372
+Node: Joining lines84574
+Node: Centering lines85229
+Node: Increment a number86148
+Ref: Increment a number-Footnote-187627
+Node: Rename files to lower case87747
+Node: Print bash environment90522
+Node: Reverse chars of lines91279
+Ref: Reverse chars of lines-Footnote-192312
+Node: Text search across multiple lines92529
+Node: Line length adjustment95756
+Node: tac98182
+Node: cat -n98951
+Node: cat -b100775
+Node: wc -c101526
+Ref: wc -c-Footnote-1103438
+Node: wc -w103507
+Node: wc -l104973
+Node: head105220
+Node: tail105553
+Node: uniq107236
+Node: uniq -d108025
+Node: uniq -u108738
+Node: cat -s109449
+Node: Limitations111298
+Node: Other Resources112141
+Node: Reporting Bugs112988
+Ref: N_command_last_line114153
+Ref: Reporting Bugs-Footnote-1120298
+Node: GNU Free Documentation License120369
+Node: Concept Index145524
+Node: Command and Option Index170108

End Tag Table
diff --git a/doc/sed.texi b/doc/sed.texi
index 6efc48c..121e405 100644
--- a/doc/sed.texi
+++ b/doc/sed.texi
@@ -1,11 +1,10 @@
\input texinfo @c -*-texinfo-*-
-@c Do not edit this file!! It is automatically generated from sed-in.texi.
@c
@c -- Stuff that needs adding: ----------------------------------------------
@c (nothing!)
@c --------------------------------------------------------------------------
@c Check for consistency: regexps in @code, text that they match in @samp.
-@c
+@c
@c Tips:
@c @command for command
@c @samp for command fragments: @samp{cat -s}
@@ -35,116 +34,54 @@
This file documents version @value{VERSION} of
@value{SSED}, a stream editor.
-Copyright @copyright{} 1998, 1999, 2001, 2002, 2003, 2004 Free
-Software Foundation, Inc.
-
-This document is released under the terms of the @acronym{GNU} Free
-Documentation License as published by the Free Software Foundation;
-either version 1.1, or (at your option) any later version.
-
-You should have received a copy of the @acronym{GNU} Free Documentation
-License along with @value{SSED}; see the file @file{COPYING.DOC}.
-If not, write to the Free Software Foundation, 59 Temple Place - Suite
-330, Boston, MA 02110-1301, USA.
+Copyright @copyright{} 1998-2016 Free Software Foundation, Inc.
-There are no Cover Texts and no Invariant Sections; this text, along
-with its equivalent in the printed manual, constitutes the Title Page.
+@quotation
+Permission is granted to copy, distribute and/or modify this document
+under the terms of the GNU Free Documentation License, Version 1.3
+or any later version published by the Free Software Foundation;
+with no Invariant Sections, no Front-Cover Texts, and no
+Back-Cover Texts. A copy of the license is included in the
+section entitled ``GNU Free Documentation License''.
+@end quotation
@end copying
@setchapternewpage off
@titlepage
-@title @command{sed}, a stream editor
+@title @value{SSED}, a stream editor
@subtitle version @value{VERSION}, @value{UPDATED}
@author by Ken Pizzini, Paolo Bonzini
@page
@vskip 0pt plus 1filll
-Copyright @copyright{} 1998, 1999 Free Software Foundation, Inc.
-
@insertcopying
-
-Published by the Free Software Foundation, @*
-51 Franklin Street, Fifth Floor @*
-Boston, MA 02110-1301, USA
@end titlepage
+@contents
+@ifnottex
@node Top
-@top
+@top @value{SSED}
-@ifnottex
@insertcopying
@end ifnottex
@menu
* Introduction:: Introduction
* Invoking sed:: Invocation
-* sed Programs:: @command{sed} programs
+* sed scripts:: @command{sed} scripts
+* sed addresses:: Addresses: selecting lines
+* sed regular expressions:: Regular expressions: selecting text
+* advanced sed:: Advanced @command{sed}: cycles and buffers
* Examples:: Some sample scripts
* Limitations:: Limitations and (non-)limitations of @value{SSED}
* Other Resources:: Other resources for learning about @command{sed}
* Reporting Bugs:: Reporting bugs
-
-* Extended regexps:: @command{egrep}-style regular expressions
-@ifset PERL
-* Perl regexps:: Perl-style regular expressions
-@end ifset
-
+* GNU Free Documentation License:: Copying and sharing this manual
* Concept Index:: A menu with all the topics in this manual.
* Command and Option Index:: A menu with all @command{sed} commands and
command-line options.
-
-@detailmenu
---- The detailed node listing ---
-
-sed Programs:
-* Execution Cycle:: How @command{sed} works
-* Addresses:: Selecting lines with @command{sed}
-* Regular Expressions:: Overview of regular expression syntax
-* Common Commands:: Often used commands
-* The "s" Command:: @command{sed}'s Swiss Army Knife
-* Other Commands:: Less frequently used commands
-* Programming Commands:: Commands for @command{sed} gurus
-* Extended Commands:: Commands specific of @value{SSED}
-* Escapes:: Specifying special characters
-
-Examples:
-* Centering lines::
-* Increment a number::
-* Rename files to lower case::
-* Print bash environment::
-* Reverse chars of lines::
-* tac:: Reverse lines of files
-* cat -n:: Numbering lines
-* cat -b:: Numbering non-blank lines
-* wc -c:: Counting chars
-* wc -w:: Counting words
-* wc -l:: Counting lines
-* head:: Printing the first lines
-* tail:: Printing the last lines
-* uniq:: Make duplicate lines unique
-* uniq -d:: Print duplicated lines of input
-* uniq -u:: Remove all duplicated lines
-* cat -s:: Squeezing blank lines
-
-@ifset PERL
-Perl regexps:: Perl-style regular expressions
-* Backslash:: Introduces special sequences
-* Circumflex/dollar sign/period:: Behave specially with regard to new lines
-* Square brackets:: Are a bit different in strange cases
-* Options setting:: Toggle modifiers in the middle of a regexp
-* Non-capturing subpatterns:: Are not counted when backreferencing
-* Repetition:: Allows for non-greedy matching
-* Backreferences:: Allows for more than 10 back references
-* Assertions:: Allows for complex look ahead matches
-* Non-backtracking subpatterns:: Often gives more performance
-* Conditional subpatterns:: Allows if/then/else branches
-* Recursive patterns:: For example to match parentheses
-* Comments:: Because things can get complex...
-@end ifset
-
-@end detailmenu
@end menu
@@ -166,26 +103,125 @@ editors.
@node Invoking sed
-@chapter Invocation
+@chapter Running sed
+
+This chapter covers how to run @command{sed}. Details of @command{sed}
+scripts and individual @command{sed} commands are discussed in the
+next chapter.
+@menu
+* Overview::
+* Command-Line Options::
+* Exit status::
+@end menu
+
+
+@node Overview
+@section Overview
Normally @command{sed} is invoked like this:
@example
sed SCRIPT INPUTFILE...
@end example
-The full format for invoking @command{sed} is:
+For example, to replace all occurrences of @samp{hello} to @samp{world}
+in the file @file{input.txt}:
@example
-sed OPTIONS... [SCRIPT] [INPUTFILE...]
+sed 's/hello/world/' input.txt > output.txt
@end example
+@cindex stdin
+@cindex standard input
If you do not specify @var{INPUTFILE}, or if @var{INPUTFILE} is @file{-},
-@command{sed} filters the contents of the standard input. The @var{script}
-is actually the first non-option parameter, which @command{sed} specially
-considers a script and not an input file if (and only if) none of the
-other @var{options} specifies a script to be executed, that is if neither
-of the @option{-e} and @option{-f} options is specified.
+@command{sed} filters the contents of the standard input. The following
+commands are equivalent:
+
+@example
+sed 's/hello/world/' input.txt > output.txt
+sed 's/hello/world/' < input.txt > output.txt
+cat input.txt | sed 's/hello/world/' - > output.txt
+@end example
+
+@cindex stdout
+@cindex output
+@cindex standard output
+@cindex -i, example
+@command{sed} writes output to standard output. Use @option{-i} to edit
+files in-place instead of printing to standard output.
+See also the @code{W} and @code{s///w} commands for writing output to
+other files. The following command modifies @file{file.txt} and
+does not produce any output:
+
+@example
+sed -i 's/hello/world' file.txt
+@end example
+
+@cindex -n, example
+@cindex p, example
+@cindex suppressing output
+@cindex output, suppressing
+By default @command{sed} prints all processed input (except input
+that has been modified/deleted by commands such as @command{d}).
+Use @option{-n} to suppress output, and the @code{p} command
+to print specific lines. The following command prints only line 45
+of the input file:
+
+@example
+sed -n '45p' file.txt
+@end example
+
+
+
+@cindex multiple files
+@cindex -s, example
+@command{sed} treats multiple input files as one long stream.
+The following example prints the first line of the first file
+(@file{one.txt}) and the last line of the last file (@file{three.txt}).
+Use @option{-s} to reverse this behavior.
+
+@example
+sed -n '1p ; $p' one.txt two.txt three.txt
+@end example
+
+
+@cindex -e, example
+@cindex --expression, example
+@cindex -f, example
+@cindex --file, example
+@cindex script parameter
+@cindex parameters, script
+Without @option{-e} or @option{-f} options, @command{sed} uses
+the first non-option parameter as the @var{script}, and the following
+non-option parameters as input files.
+If @option{-e} or @option{-f} options are used to specify a @var{script},
+all non-option parameters are taken as input files.
+Options @option{-e} and @option{-f} can be combined, and can appear
+multiple times (in which case the final effective @var{script} will be
+concatenation of all the individual @var{script}s).
+
+The following examples are equivalent:
+
+@example
+sed 's/hello/world/' input.txt > output.txt
+
+sed -e 's/hello/world/' input.txt > output.txt
+sed --expression='s/hello/world/' input.txt > output.txt
+
+echo 's/hello/world/' > myscript.sed
+sed -f myscript.sed input.txt > output.txt
+sed --file=myscript.sed input.txt > output.txt
+@end example
+
+
+@node Command-Line Options
+@section Command-Line Options
+
+The full format for invoking @command{sed} is:
+
+@example
+sed OPTIONS... [SCRIPT] [INPUTFILE...]
+@end example
@command{sed} may be invoked with the following command-line options:
@@ -291,7 +327,7 @@ including additional commands.
Most of the extensions accept @command{sed} programs that
are outside the syntax mandated by @acronym{POSIX}, but some
of them (such as the behavior of the @command{N} command
-described in @pxref{Reporting Bugs}) actually violate the
+described in @ref{Reporting Bugs}) actually violate the
standard. If you want to disable only the latter kind of
extension, you can set the @code{POSIXLY_CORRECT} variable
to a non-empty value.
@@ -319,8 +355,10 @@ follow the link and edit the ultimate destination of the
link. The default behavior is to break the symbolic link,
so that the link destination will not be modified.
-@item -r
+@item -E
+@itemx -r
@itemx --regexp-extended
+@opindex -E
@opindex -r
@opindex --regexp-extended
@cindex Extended regular expressions, choosing
@@ -328,23 +366,17 @@ so that the link destination will not be modified.
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 less backslashes, but are a @acronym{GNU} extension
-and hence scripts that use them are not portable.
-@xref{Extended regexps, , Extended regular expressions}.
-
-@ifset PERL
-@item -R
-@itemx --regexp-perl
-@opindex -R
-@opindex --regexp-perl
-@cindex Perl-style regular expressions, choosing
-@cindex @value{SSEDEXT}, Perl-style regular expressions
-Use Perl-style regular expressions rather than basic
-regular expressions. Perl-style regexps are extremely
-powerful but are a @value{SSED} extension and hence scripts that
-use it are not portable. @xref{Perl regexps, ,
-Perl-style regular expressions}.
-@end ifset
+usually have fewer backslashes.
+Historically this was a @acronym{GNU} extension,
+but the @option{-E}
+extension has since been added to the POSIX standard
+(http://austingroupbugs.net/view.php?id=528),
+so use @option{-E} for portability.
+GNU sed has accepted @option{-E} as an undocumented option for years,
+and *BSD seds have accepted @option{-E} for years as well,
+but scripts that use @option{-E} might not port to other older systems.
+@xref{ERE syntax, , Extended regular expressions}.
+
@item -s
@itemx --separate
@@ -360,6 +392,15 @@ of each file, @code{$} refers to the last line of each file,
and files invoked from the @code{R} commands are rewound at the
start of each file.
+@item --sandbox
+@opindex --sandbox
+@cindex Sandbox mode
+In sandbox mode, @code{e/w/r} commands are rejected - programs containing
+them will be aborted without being run. Sandbox mode ensures @command{sed}
+operates only on the input files designated on the command line, and
+cannot run external programs.
+
+
@item -u
@itemx --unbuffered
@opindex -u
@@ -395,606 +436,351 @@ be processed.
A file name of @samp{-} refers to the standard input stream.
The standard input will be processed if no file names are specified.
+@node Exit status
+@section Exit status
+@cindex exit status
+An exit status of zero indicates success, and a nonzero value
+indicates failure. @value{SSED} returns the following exit status
+error values:
-@node sed Programs
-@chapter @command{sed} Programs
+@table @asis
+@item 0
+Successful completion.
-@cindex @command{sed} program structure
-@cindex Script structure
-A @command{sed} program consists of one or more @command{sed} commands,
-passed in by one or more of the
-@option{-e}, @option{-f}, @option{--expression}, and @option{--file}
-options, or the first non-option argument if zero of these
-options are used.
-This document will refer to ``the'' @command{sed} script;
-this is understood to mean the in-order catenation
-of all of the @var{script}s and @var{script-file}s passed in.
+@item 1
+Invalid command, invalid syntax, invalid regular expression or a
+@value{SSED} extension command used with @option{--posix}.
-Commands within a @var{script} or @var{script-file} can be
-separated by semicolons (@code{;}) or newlines (ASCII 10).
-Some commands, due to their syntax, cannot be followed by semicolons
-working as command separators and thus should be terminated
-with newlines or be placed at the end of a @var{script} or @var{script-file}.
-Commands can also be preceded with optional non-significant
-whitespace characters.
+@item 2
+One or more of the input file specified on the command line could not be
+opened (e.g. if a file is not found, or read permission is denied).
+Processing continued with other files.
+
+@item 4
+An I/O error, or a serious processing error during runtime,
+@value{SSED} aborted immediately.
+@end table
+
+@cindex Q, example
+@cindex exit status, example
+Additionally, the commands @code{q} and @code{Q} can be used to terminate
+@command{sed} with a custom exit code value (this is a @value{SSED} extension):
+
+@example
+$ echo | sed 'Q42' ; echo $?
+42
+@end example
+
+
+@node sed scripts
+@chapter @command{sed} scripts
-Each @code{sed} command consists of an optional address or
-address range, followed by a one-character command name
-and any additional command-specific code.
@menu
-* Execution Cycle:: How @command{sed} works
-* Addresses:: Selecting lines with @command{sed}
-* Regular Expressions:: Overview of regular expression syntax
-* Common Commands:: Often used commands
+* sed script overview:: @command{sed} script overview
+* sed commands list:: @command{sed} commands summary
* The "s" Command:: @command{sed}'s Swiss Army Knife
+* Common Commands:: Often used commands
* Other Commands:: Less frequently used commands
* Programming Commands:: Commands for @command{sed} gurus
* Extended Commands:: Commands specific of @value{SSED}
-* Escapes:: Specifying special characters
@end menu
+@node sed script overview
+@section @command{sed} script overview
-@node Execution Cycle
-@section How @command{sed} Works
-
-@cindex Buffer spaces, pattern and hold
-@cindex Spaces, pattern and hold
-@cindex Pattern space, definition
-@cindex Hold space, definition
-@command{sed} maintains two data buffers: the active @emph{pattern} space,
-and the auxiliary @emph{hold} space. Both are initially empty.
-
-@command{sed} operates by performing the following cycle on each
-line of input: first, @command{sed} reads one line from the input
-stream, removes any trailing newline, and places it in the pattern space.
-Then commands are executed; each command can have an address associated
-to it: addresses are a kind of condition code, and a command is only
-executed if the condition is verified before the command is to be
-executed.
-
-When the end of the script is reached, unless the @option{-n} option
-is in use, the contents of pattern space are printed out to the output
-stream, adding back the trailing newline if it was removed.@footnote{Actually,
-if @command{sed} prints a line without the terminating newline, it will
-nevertheless print the missing newline as soon as more text is sent to
-the same output stream, which gives the ``least expected surprise''
-even though it does not make commands like @samp{sed -n p} exactly
-identical to @command{cat}.} Then the next cycle starts for the next
-input line.
-
-Unless special commands (like @samp{D}) are used, the pattern space is
-deleted between two cycles. The hold space, on the other hand, keeps
-its data between cycles (see commands @samp{h}, @samp{H}, @samp{x},
-@samp{g}, @samp{G} to move data between both buffers).
-
-
-@node Addresses
-@section Selecting lines with @command{sed}
-@cindex Addresses, in @command{sed} scripts
-@cindex Line selection
-@cindex Selecting lines to process
-
-Addresses in a @command{sed} script can be in any of the following forms:
-@table @code
-@item @var{number}
-@cindex Address, numeric
-@cindex Line, selecting by number
-Specifying a line number will match only that line in the input.
-(Note that @command{sed} counts lines continuously across all input files
-unless @option{-i} or @option{-s} options 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
-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
-@var{first} + (@var{n} * @var{step}).
-Thus, to select the odd-numbered lines,
-one would use @code{1~2};
-to pick every third line starting with the second, @samp{2~3} would be used;
-to pick every fifth line starting with the tenth, use @samp{10~5};
-and @samp{50~0} is just an obscure way of saying @code{50}.
-
-@item $
-@cindex Address, last line
-@cindex Last line, selecting
-@cindex Line, selecting last
-This address matches the last line of the last file of input, or
-the last line of each file when the @option{-i} or @option{-s} options
-are specified.
-
-@item /@var{regexp}/
-@cindex Address, as a regular expression
-@cindex Line, selecting by regular expression match
-This will select any line which matches the regular expression @var{regexp}.
-If @var{regexp} itself includes any @code{/} characters,
-each must be escaped by a backslash (@code{\}).
-
-@cindex empty regular expression
-@cindex @value{SSEDEXT}, modifiers and the empty regular expression
-The empty regular expression @samp{//} repeats the last regular
-expression match (the same holds if the empty regular expression is
-passed to the @code{s} command). Note that modifiers to regular expressions
-are evaluated when the regular expression is compiled, thus it is invalid to
-specify them together with the empty regular expression.
-
-@item \%@var{regexp}%
-(The @code{%} may be replaced by any other single character.)
-
-@cindex Slash character, in regular expressions
-This also matches the regular expression @var{regexp},
-but allows one to use a different delimiter than @code{/}.
-This is particularly useful if the @var{regexp} itself contains
-a lot of slashes, since it avoids the tedious escaping of every @code{/}.
-If @var{regexp} itself includes any delimiter characters,
-each must be escaped by a backslash (@code{\}).
-
-@item /@var{regexp}/I
-@itemx \%@var{regexp}%I
-@cindex @acronym{GNU} extensions, @code{I} modifier
-@ifset PERL
-@cindex Perl-style regular expressions, case-insensitive
-@end ifset
-The @code{I} modifier to regular-expression matching is a @acronym{GNU}
-extension which causes the @var{regexp} to be matched in
-a case-insensitive manner.
-
-@item /@var{regexp}/M
-@itemx \%@var{regexp}%M
-@cindex @value{SSEDEXT}, @code{M} modifier
-@ifset PERL
-@cindex Perl-style regular expressions, multiline
-@end ifset
-The @code{M} modifier to regular-expression matching is a @value{SSED}
-extension which directs @value{SSED} to match the regular expression
-in @cite{multi-line} mode. The modifier causes @code{^} and @code{$} to
-match respectively (in addition to the normal behavior) the empty string
-after a newline, and the empty string before a newline. There are
-special character sequences
-@ifset PERL
-(@code{\A} and @code{\Z} in Perl mode, @code{\`} and @code{\'}
-in basic or extended regular expression modes)
-@end ifset
-@ifclear PERL
-(@code{\`} and @code{\'})
-@end ifclear
-which always match the beginning or the end of the buffer.
-In addition,
-@ifset PERL
-just like in Perl mode without the @code{S} modifier,
-@end ifset
-the period character does not match a new-line character in
-multi-line mode.
-
-@ifset PERL
-@item /@var{regexp}/S
-@itemx \%@var{regexp}%S
-@cindex @value{SSEDEXT}, @code{S} modifier
-@cindex Perl-style regular expressions, single line
-The @code{S} modifier to regular-expression matching is only valid
-in Perl mode and specifies that the dot character (@code{.}) will
-match the newline character too. @code{S} stands for @cite{single-line}.
-@end ifset
-
-@ifset PERL
-@item /@var{regexp}/X
-@itemx \%@var{regexp}%X
-@cindex @value{SSEDEXT}, @code{X} modifier
-@cindex Perl-style regular expressions, extended
-The @code{X} modifier to regular-expression matching is also
-valid in Perl mode only. If it is used, whitespace in the
-pattern (other than in a character class) and
-characters between a @kbd{#} outside a character class and the
-next newline character are ignored. An escaping backslash
-can be used to include a whitespace or @kbd{#} character as part
-of the pattern.
-@end ifset
-@end table
-
-If no addresses are given, then all lines are matched;
-if one address is given, then only lines matching that
-address are matched.
-
-@cindex Range of lines
-@cindex Several lines, selecting
-An address range can be specified by specifying two addresses
-separated by a comma (@code{,}). An address range matches lines
-starting from where the first address matches, and continues
-until the second address matches (inclusively).
-
-If the second address is a @var{regexp}, then checking for the
-ending match will start with the line @emph{following} the
-line which matched the first address: a range will always
-span at least two lines (except of course if the input stream
-ends).
-
-If the second address is a @var{number} less than (or equal to)
-the line matching the first address, then only the one line is
-matched.
+@cindex @command{sed} script structure
+@cindex Script structure
-@cindex Special addressing forms
-@cindex Range with start address of zero
-@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
-@value{SSED} also supports some special two-address forms; all these
-are @acronym{GNU} extensions:
-@table @code
-@item 0,/@var{regexp}/
-A line number of @code{0} can be used in an address specification like
-@code{0,/@var{regexp}/} so that @command{sed} will try to match
-@var{regexp} in the first input line too. In other words,
-@code{0,/@var{regexp}/} is similar to @code{1,/@var{regexp}/},
-except that if @var{addr2} matches the very first line of input the
-@code{0,/@var{regexp}/} form will consider it to end the range, whereas
-the @code{1,/@var{regexp}/} form will match the beginning of its range and
-hence make the range span up to the @emph{second} occurrence of the
-regular expression.
+A @command{sed} program consists of one or more @command{sed} commands,
+passed in by one or more of the
+@option{-e}, @option{-f}, @option{--expression}, and @option{--file}
+options, or the first non-option argument if zero of these
+options are used.
+This document will refer to ``the'' @command{sed} script;
+this is understood to mean the in-order concatenation
+of all of the @var{script}s and @var{script-file}s passed in.
+@xref{Overview}.
-Note that this is the only place where the @code{0} address makes
-sense; there is no 0-th line and commands which are given the @code{0}
-address in any other way will give an error.
-@item @var{addr1},+@var{N}
-Matches @var{addr1} and the @var{N} lines following @var{addr1}.
+@cindex @command{sed} commands syntax
+@cindex syntax, @command{sed} commands
+@cindex addresses, syntax
+@cindex syntax, addresses
+@command{sed} commands follow this syntax:
-@item @var{addr1},~@var{N}
-Matches @var{addr1} and the lines following @var{addr1}
-until the next line whose input line number is a multiple of @var{N}.
-@end table
+@example
+[addr]@var{X}[options]
+@end example
-@cindex Excluding lines
-@cindex Selecting non-matching lines
-Appending the @code{!} character to the end of an address
-specification negates the sense of the match.
-That is, if the @code{!} character follows an address range,
-then only lines which do @emph{not} match the address range
-will be selected.
-This also works for singleton addresses,
-and, perhaps perversely, for the null address.
+@var{X} is a single-letter @command{sed} command.
+@c TODO: add @pxref{commands} when there is a command-list section.
+@code{[addr]} is an optional line address. If @code{[addr]} is specified,
+the command @var{X} will be executed only on the matched lines.
+@code{[addr]} can be a single line number, a regular expression,
+or a range of lines (@pxref{sed addresses}).
+Additional @code{[options]} are used for some @command{sed} commands.
+@cindex @command{d}, example
+@cindex address range, example
+@cindex example, address range
+The following example deletes lines 30 to 35 in the input.
+@code{30,35} is an address range. @command{d} is the delete command:
-@node Regular Expressions
-@section Overview of Regular Expression Syntax
+@example
+sed '30,35d' input.txt > output.txt
+@end example
-To know how to use @command{sed}, people should understand regular
-expressions (@dfn{regexp} for short). A regular expression
-is a pattern that is matched against a
-subject string from left to right. Most characters are
-@dfn{ordinary}: they stand for
-themselves in a pattern, and match the corresponding characters
-in the subject. As a trivial example, the pattern
+@cindex @command{q}, example
+@cindex regular expression, example
+@cindex example, regular expression
+The following example prints all input until a line
+starting with the word @samp{foo} is found. If such line is found,
+@command{sed} will terminate with exit status 42.
+If such line was not found (and no other error occurred), @command{sed}
+will exit with status 0.
+@code{/^foo/} is a regular-expression address.
+@command{q} is the quit command. @code{42} is the command option.
@example
-The quick brown fox
+sed '/^foo/q42' input.txt > output.txt
@end example
-@noindent
-matches a portion of a subject string that is identical to
-itself. The power of regular expressions comes from the
-ability to include alternatives and repetitions in the pattern.
-These are encoded in the pattern by the use of @dfn{special characters},
-which do not stand for themselves but instead
-are interpreted in some special way. Here is a brief description
-of regular expression syntax as used in @command{sed}.
-@table @code
-@item @var{char}
-A single ordinary character matches itself.
+@cindex multiple @command{sed} commands
+@cindex @command{sed} commands, multiple
+@cindex newline, command separator
+@cindex semicolons, command separator
+@cindex ;, command separator
+@cindex -e, example
+@cindex -f, example
+Commands within a @var{script} or @var{script-file} can be
+separated by semicolons (@code{;}) or newlines (ASCII 10).
+Multiple scripts can be specified with @option{-e} or @option{-f}
+options.
-@item *
-@cindex @acronym{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
-postfixed regular expression can also be followed by @code{*}; for
-example, @code{a**} is equivalent to @code{a*}. @acronym{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
-scripts should instead use @code{\*} in these contexts.
+The following examples are all equivalent. They perform two @command{sed}
+operations: deleting any lines matching the regular expression @code{/^foo/},
+and replacing all occurrences of the string @samp{hello} with @samp{world}:
-@item \+
-@cindex @acronym{GNU} extensions, to basic regular expressions
-As @code{*}, but matches one or more. It is a @acronym{GNU} extension.
+@example
+sed '/^foo/d ; s/hello/world/' input.txt > output.txt
-@item \?
-@cindex @acronym{GNU} extensions, to basic regular expressions
-As @code{*}, but only matches zero or one. It is a @acronym{GNU} extension.
+sed -e '/^foo/d' -e 's/hello/world/' input.txt > output.txt
-@item \@{@var{i}\@}
-As @code{*}, but matches exactly @var{i} sequences (@var{i} is a
-decimal integer; for portability, keep it between 0 and 255
-inclusive).
+echo '/^foo/d' > script.sed
+echo 's/hello/world/' >> script.sed
+sed -f script.sed input.txt > output.txt
-@item \@{@var{i},@var{j}\@}
-Matches between @var{i} and @var{j}, inclusive, sequences.
+echo 's/hello/world/' > script2.sed
+sed -e '/^foo/d' -f script2.sed input.txt > output.txt
+@end example
-@item \@{@var{i},\@}
-Matches more than or equal to @var{i} sequences.
-@item \(@var{regexp}\)
-Groups the inner @var{regexp} as a whole, this is used to:
+@cindex @command{a}, and semicolons
+@cindex @command{c}, and semicolons
+@cindex @command{i}, and semicolons
+Commands @command{a}, @command{c}, @command{i}, due to their syntax,
+cannot be followed by semicolons working as command separators and
+thus should be terminated
+with newlines or be placed at the end of a @var{script} or @var{script-file}.
+Commands can also be preceded with optional non-significant
+whitespace characters.
-@itemize @bullet
-@item
-@cindex @acronym{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}
-implementations do not support it and hence it is not universally
-portable.
-@item
-Use back references (see below).
-@end itemize
-@item .
-Matches any character, including newline.
+@node sed commands list
+@section @command{sed} commands summary
-@item ^
-Matches the null string at beginning of the pattern space, i.e. what
-appears after the circumflex must appear at the beginning of the
-pattern space.
+The following commands are supported in @value{SSED}.
+Some are standard POSIX commands, while other are @value{SSEDEXT}.
+Details and examples for each command are in the following sections.
+(Mnemonics) are shown in parentheses.
-In most scripts, pattern space is initialized to the content of each
-line (@pxref{Execution Cycle, , How @code{sed} works}). So, it is a
-useful simplification to think of @code{^#include} as matching only
-lines where @samp{#include} is the first thing on line---if there are
-spaces before, for example, the match fails. This simplification is
-valid as long as the original content of pattern space is not modified,
-for example with an @code{s} command.
+@table @code
-@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
-treat @code{^} as an ordinary character in that context.
+@item a\
+@itemx @var{text}
+Append @var{text} after a line.
-@item $
-It is the same as @code{^}, but refers to end of pattern space.
-@code{$} also acts as a special character only at the end
-of the regular expression or subexpression (that is, before @code{\)}
-or @code{\|}), and its use at the end of a subexpression is not
-portable.
+@item a @var{text}
+Append @var{text} after a line (alternative syntax).
+@item b @var{label}
+Branch unconditionally to @var{label}.
+The @var{label} may be omitted, in which case the next cycle is started.
-@item [@var{list}]
-@itemx [^@var{list}]
-Matches any single character in @var{list}: for example,
-@code{[aeiou]} matches all vowels. A list may include
-sequences like @code{@var{char1}-@var{char2}}, which
-matches any character between (inclusive) @var{char1}
-and @var{char2}.
+@item c\
+@itemx @var{text}
+Replace (change) lines with @var{text}.
-A leading @code{^} reverses the meaning of @var{list}, so that
-it matches any single character @emph{not} in @var{list}. To include
-@code{]} in the list, make it the first character (after
-the @code{^} if needed), to include @code{-} in the list,
-make it the first or last; to include @code{^} put
-it after the first character.
+@item c @var{text}
+Replace (change) lines with @var{text} (alternative syntax).
-@cindex @code{POSIXLY_CORRECT} behavior, bracket expressions
-The characters @code{$}, @code{*}, @code{.}, @code{[}, and @code{\}
-are normally not special within @var{list}. For example, @code{[\*]}
-matches either @samp{\} or @samp{*}, because the @code{\} is not
-special here. However, strings like @code{[.ch.]}, @code{[=a=]}, and
-@code{[:space:]} are special within @var{list} and represent collating
-symbols, equivalence classes, and character classes, respectively, and
-@code{[} is therefore special within @var{list} when it is followed by
-@code{.}, @code{=}, or @code{:}. Also, when not in
-@env{POSIXLY_CORRECT} mode, special escapes like @code{\n} and
-@code{\t} are recognized within @var{list}. @xref{Escapes}.
+@item d
+Delete the pattern space;
+immediately start next cycle.
-@item @var{regexp1}\|@var{regexp2}
-@cindex @acronym{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.
+@item D
+If pattern space contains newlines, delete text in the pattern
+space up to the first newline, and restart cycle with the resultant
+pattern space, without reading a new line of input.
-@item @var{regexp1}@var{regexp2}
-Matches the concatenation of @var{regexp1} and @var{regexp2}.
-Concatenation binds more tightly than @code{\|}, @code{^}, and
-@code{$}, but less tightly than the other regular expression
-operators.
+If pattern space contains no newline, start a normal new cycle as if
+the @code{d} command was issued.
+@c TODO: add a section about D+N and D+n commands
-@item \@var{digit}
-Matches the @var{digit}-th @code{\(@dots{}\)} parenthesized
-subexpression in the regular expression. This is called a @dfn{back
-reference}. Subexpressions are implicity numbered by counting
-occurrences of @code{\(} left-to-right.
+@item e
+Executes the command that is found in pattern space and
+replaces the pattern space with the output; a trailing newline
+is suppressed.
-@item \n
-Matches the newline character.
+@item e @var{command}
+Executes @var{command} and sends its output to the output stream.
+The command can run across multiple lines, all but the last ending with
+a back-slash.
-@item \@var{char}
-Matches @var{char}, where @var{char} is one of @code{$},
-@code{*}, @code{.}, @code{[}, @code{\}, or @code{^}.
-Note that the only C-like
-backslash sequences that you can portably assume to be
-interpreted are @code{\n} and @code{\\}; in particular
-@code{\t} is not portable, and matches a @samp{t} under most
-implementations of @command{sed}, rather than a tab character.
+@item F
+(filename) Print the file name of the current input file (with a trailing
+newline).
-@end table
+@item g
+Replace the contents of the pattern space with the contents of the hold space.
-@cindex Greedy regular expression matching
-Note that the regular expression matcher is greedy, i.e., matches
-are attempted from left to right and, if two or more matches are
-possible starting at the same character, it selects the longest.
+@item G
+Append a newline to the contents of the pattern space,
+and then append the contents of the hold space to that of the pattern space.
-@noindent
-Examples:
-@table @samp
-@item abcdef
-Matches @samp{abcdef}.
+@item h
+(hold) Replace the contents of the hold space with the contents of the
+pattern space.
-@item a*b
-Matches zero or more @samp{a}s followed by a single
-@samp{b}. For example, @samp{b} or @samp{aaaaab}.
+@item H
+Append a newline to the contents of the hold space,
+and then append the contents of the pattern space to that of the hold space.
-@item a\?b
-Matches @samp{b} or @samp{ab}.
+@item i\
+@itemx @var{text}
+insert @var{text} before a line.
-@item a\+b\+
-Matches one or more @samp{a}s followed by one or more
-@samp{b}s: @samp{ab} is the shortest possible match, but
-other examples are @samp{aaaab} or @samp{abbbbb} or
-@samp{aaaaaabbbbbbb}.
+@item i @var{text}
+insert @var{text} before a line (alternative syntax).
-@item .*
-@itemx .\+
-These two both match all the characters in a string;
-however, the first matches every string (including the empty
-string), while the second matches only strings containing
-at least one character.
+@item l
+Print the pattern space in an unambiguous form.
-@item ^main.*(.*)
-This matches a string starting with @samp{main},
-followed by an opening and closing
-parenthesis. The @samp{n}, @samp{(} and @samp{)} need not
-be adjacent.
+@item n
+(next) If auto-print is not disabled, print the pattern space,
+then, regardless, replace the pattern space with the next line of input.
+If there is no more input then @command{sed} exits without processing
+any more commands.
-@item ^#
-This matches a string beginning with @samp{#}.
+@item N
+Add a newline to the pattern space,
+then append the next line of input to the pattern space.
+If there is no more input then @command{sed} exits without processing
+any more commands.
-@item \\$
-This matches a string ending with a single backslash. The
-regexp contains two backslashes for escaping.
+@item p
+Print the pattern space.
+@c useful with @option{-n}
-@item \$
-Instead, this matches a string consisting of a single dollar sign,
-because it is escaped.
+@item P
+Print the pattern space, up to the first <newline>.
-@item [a-zA-Z0-9]
-In the C locale, this matches any @acronym{ASCII} letters or digits.
+@item q@var{[exit-code]}
+(quit) Exit @command{sed} without processing any more commands or input.
-@item [^ @kbd{tab}]\+
-(Here @kbd{tab} stands for a single tab character.)
-This matches a string of one or more
-characters, none of which is a space or a tab.
-Usually this means a word.
+@item Q@var{[exit-code]}
+(quit) This command is the same as @code{q}, but will not print the
+contents of pattern space. Like @code{q}, it provides the
+ability to return an exit code to the caller.
+@c useful to quit on a conditional without printing
-@item ^\(.*\)\n\1$
-This matches a string consisting of two equal substrings separated by
-a newline.
+@item r filename
+Reads text file a file. Example:
-@item .\@{9\@}A$
-This matches nine characters followed by an @samp{A}.
+@item R filename
+Queue a line of @var{filename} to be read and
+inserted into the output stream at the end of the current cycle,
+or when the next input line is read.
+@c useful to interleave files
-@item ^.\@{15\@}A
-This matches the start of a string that contains 16 characters,
-the last of which is an @samp{A}.
+@item s@var{/regexp/replacement/[flags]}
+(substitute) Match the regular-expression against the content of the
+pattern space. If found, replace matched string with
+@var{replacement}.
-@end table
+@item t @var{label}
+(test) Branch to @var{label} only if there has been a successful
+@code{s}ubstitution since the last input line was read or conditional
+branch was taken. The @var{label} may be omitted, in which case the
+next cycle is started.
+@item T @var{label}
+(test) Branch to @var{label} only if there have been no successful
+@code{s}ubstitutions since the last input line was read or
+conditional branch was taken. The @var{label} may be omitted,
+in which case the next cycle is started.
+@item v @var{[version]}
+(version) This command does nothing, but makes @command{sed} fail if
+@value{SSED} extensions are not supported, or if the requested version
+is not available.
-@node Common Commands
-@section Often-Used Commands
+@item w filename
+Write the pattern space to @var{filename}.
-If you use @command{sed} at all, you will quite likely want to know
-these commands.
+@item W filename
+Write to the given filename the portion of the pattern space up to
+the first newline
-@table @code
-@item #
-[No addresses allowed.]
+@item x
+Exchange the contents of the hold and pattern spaces.
-@findex # (comments)
-@cindex Comments, in scripts
-The @code{#} character begins a comment;
-the comment continues until the next newline.
-@cindex Portability, comments
-If you are concerned about portability, be aware that
-some implementations of @command{sed} (which are not @sc{posix}
-conformant) may only support a single one-line comment,
-and then only when the very first character of the script is a @code{#}.
+@item y/src/dst/
+Transliterate any characters in the pattern space which match
+any of the @var{source-chars} with the corresponding character
+in @var{dest-chars}.
-@findex -n, forcing from within a script
-@cindex Caveat --- #n on first line
-Warning: if the first two characters of the @command{sed} script
-are @code{#n}, then the @option{-n} (no-autoprint) option is forced.
-If you want to put a comment in the first line of your script
-and that comment begins with the letter @samp{n}
-and you do not want this behavior,
-then be sure to either use a capital @samp{N},
-or place at least one space before the @samp{n}.
-@item q [@var{exit-code}]
-This command only accepts a single address.
+@item z
+(zap) This command empties the content of pattern space.
-@findex q (quit) command
-@cindex @value{SSEDEXT}, returning an exit code
-@cindex Quitting
-Exit @command{sed} without processing any more commands or input.
-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.
+@item #
+A comment, until the next newline.
-@item d
-@findex d (delete) command
-@cindex Text, deleting
-Delete the pattern space;
-immediately start next cycle.
-@item p
-@findex p (print) command
-@cindex Text, printing
-Print out the pattern space (to the standard output).
-This command is usually only used in conjunction with the @option{-n}
-command-line option.
+@item @{ @var{cmd ; cmd ...} @}
+Group several commands together.
+@c useful for multiple commands on same address
-@item n
-@findex n (next-line) command
-@cindex Next input line, replace pattern space with
-@cindex Read next input line
-If auto-print is not disabled, print the pattern space,
-then, regardless, replace the pattern space with the next line of input.
-If there is no more input then @command{sed} exits without processing
-any more commands.
+@item =
+Print the current input line number (with a trailing newline).
-@item @{ @var{commands} @}
-@findex @{@} command grouping
-@cindex Grouping commands
-@cindex Command groups
-A group of commands may be enclosed between
-@code{@{} and @code{@}} characters.
-This is particularly useful when you want a group of commands
-to be triggered by a single address (or address-range) match.
+@item : @var{label}
+Specify the location of @var{label} for branch commands (@code{b},
+@code{t}, @code{T}).
@end table
+
@node The "s" Command
@section The @code{s} Command
-The syntax of the @code{s} (as in substitute) command is
-@samp{s/@var{regexp}/@var{replacement}/@var{flags}}. The @code{/}
-characters may be uniformly replaced by any other single
-character within any given @code{s} command. The @code{/}
-character (or whatever other character is used in its stead)
-can appear in the @var{regexp} or @var{replacement}
-only if it is preceded by a @code{\} character.
+The @code{s} command (as in substitute) is probably the most important
+in @command{sed} and has a lot of different options. The syntax of
+the @code{s} command is
+@samp{s/@var{regexp}/@var{replacement}/@var{flags}}.
+
+Its basic concept is simple: the @code{s} command attempts to match
+the pattern space against the supplied regular expression @var{regexp};
+if the match is successful, then that portion of the
+pattern space which was matched is replaced with @var{replacement}.
-The @code{s} command is probably the most important in @command{sed}
-and has a lot of different options. Its basic concept is simple:
-the @code{s} command attempts to match the pattern
-space against the supplied @var{regexp}; if the match is
-successful, then that portion of the pattern
-space which was matched is replaced with @var{replacement}.
+For details about @var{regexp} syntax @pxref{Regexp Addresses,,Regular
+Expression Addresses}.
@cindex Backreferences, in regular expressions
@cindex Parenthesized substrings
@@ -1005,6 +791,18 @@ the portion of the match which is contained between the @var{n}th
Also, the @var{replacement} can contain unescaped @code{&}
characters which reference the whole matched portion
of the pattern space.
+
+@c TODO: xref to backreference section mention @var{\'}.
+
+The @code{/}
+characters may be uniformly replaced by any other single
+character within any given @code{s} command. The @code{/}
+character (or whatever other character is used in its stead)
+can appear in the @var{regexp} or @var{replacement}
+only if it is preceded by a @code{\} character.
+
+
+
@cindex @value{SSEDEXT}, case modifiers in @code{s} commands
Finally, as a @value{SSED} extension, you can include a
special sequence made of a backslash and one of the letters
@@ -1078,7 +876,8 @@ 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 interaction in @code{s} command
+@cindex @acronym{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
when you mix the @code{g} and @var{number} modifiers,
@@ -1131,9 +930,6 @@ a @sc{nul} character. This is a @value{SSED} extension.
@itemx i
@cindex @acronym{GNU} extensions, @code{I} modifier
@cindex Case-insensitive matching
-@ifset PERL
-@cindex Perl-style regular expressions, case-insensitive
-@end ifset
The @code{I} modifier to regular-expression matching is a @acronym{GNU}
extension which makes @command{sed} match @var{regexp} in a
case-insensitive manner.
@@ -1141,53 +937,162 @@ case-insensitive manner.
@item M
@itemx m
@cindex @value{SSEDEXT}, @code{M} modifier
-@ifset PERL
-@cindex Perl-style regular expressions, multiline
-@end ifset
The @code{M} modifier to regular-expression matching is a @value{SSED}
extension which directs @value{SSED} to match the regular expression
in @cite{multi-line} mode. The modifier causes @code{^} and @code{$} to
match respectively (in addition to the normal behavior) the empty string
after a newline, and the empty string before a newline. There are
special character sequences
-@ifset PERL
-(@code{\A} and @code{\Z} in Perl mode, @code{\`} and @code{\'}
-in basic or extended regular expression modes)
-@end ifset
@ifclear PERL
(@code{\`} and @code{\'})
@end ifclear
which always match the beginning or the end of the buffer.
In addition,
-@ifset PERL
-just like in Perl mode without the @code{S} modifier,
-@end ifset
the period character does not match a new-line character in
multi-line mode.
-@ifset PERL
-@item S
-@itemx s
-@cindex @value{SSEDEXT}, @code{S} modifier
-@cindex Perl-style regular expressions, single line
-The @code{S} modifier to regular-expression matching is only valid
-in Perl mode and specifies that the dot character (@code{.}) will
-match the newline character too. @code{S} stands for @cite{single-line}.
-@end ifset
-
-@ifset PERL
-@item X
-@itemx x
-@cindex @value{SSEDEXT}, @code{X} modifier
-@cindex Perl-style regular expressions, extended
-The @code{X} modifier to regular-expression matching is also
-valid in Perl mode only. If it is used, whitespace in the
-pattern (other than in a character class) and
-characters between a @kbd{#} outside a character class and the
-next newline character are ignored. An escaping backslash
-can be used to include a whitespace or @kbd{#} character as part
-of the pattern.
-@end ifset
+
+@end table
+
+@node Common Commands
+@section Often-Used Commands
+
+If you use @command{sed} at all, you will quite likely want to know
+these commands.
+
+@table @code
+@item #
+[No addresses allowed.]
+
+@findex # (comments)
+@cindex Comments, in scripts
+The @code{#} character begins a comment;
+the comment continues until the next newline.
+
+@cindex Portability, comments
+If you are concerned about portability, be aware that
+some implementations of @command{sed} (which are not @sc{posix}
+conforming) may only support a single one-line comment,
+and then only when the very first character of the script is a @code{#}.
+
+@findex -n, forcing from within a script
+@cindex Caveat --- #n on first line
+Warning: if the first two characters of the @command{sed} script
+are @code{#n}, then the @option{-n} (no-autoprint) option is forced.
+If you want to put a comment in the first line of your script
+and that comment begins with the letter @samp{n}
+and you do not want this behavior,
+then be sure to either use a capital @samp{N},
+or place at least one space before the @samp{n}.
+
+@item q [@var{exit-code}]
+@findex q (quit) command
+@cindex @value{SSEDEXT}, returning an exit code
+@cindex Quitting
+Exit @command{sed} without processing any more commands or input.
+
+Example: stop after printing the second line:
+@example
+$ seq 3 | sed 2q
+1
+2
+@end example
+
+This command only accepts a single 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.
+
+See also the @value{SSED} extension @code{Q} command which quits silently
+without printing the current pattern space.
+
+@item d
+@findex d (delete) command
+@cindex Text, deleting
+Delete the pattern space;
+immediately start next cycle.
+
+Example: delete the second input line:
+@example
+$ seq 3 | sed 2d
+1
+3
+@end example
+
+@item p
+@findex p (print) command
+@cindex Text, printing
+Print out the pattern space (to the standard output).
+This command is usually only used in conjunction with the @option{-n}
+command-line option.
+
+Example: print only the second input line:
+@example
+$ seq 3 | sed -n 2p
+2
+@end example
+
+@item n
+@findex n (next-line) command
+@cindex Next input line, replace pattern space with
+@cindex Read next input line
+If auto-print is not disabled, print the pattern space,
+then, regardless, replace the pattern space with the next line of input.
+If there is no more input then @command{sed} exits without processing
+any more commands.
+
+This command is useful to skip lines (e.g. process every Nth line).
+
+Example: perform substitution on every 3rd line (i.e. two @code{n} commands
+skip two lines):
+@codequoteundirected on
+@codequotebacktick on
+@example
+$ seq 6 | sed 'n;n;s/./x/'
+1
+2
+x
+4
+5
+x
+@end example
+
+@value{SSED} provides an extension address syntax of @var{first}~@var{step}
+to achieve the same result:
+
+@example
+$ seq 6 | sed '0~3s/./x/'
+1
+2
+x
+4
+5
+x
+@end example
+
+@codequotebacktick off
+@codequoteundirected off
+
+
+@item @{ @var{commands} @}
+@findex @{@} command grouping
+@cindex Grouping commands
+@cindex Command groups
+A group of commands may be enclosed between
+@code{@{} and @code{@}} characters.
+This is particularly useful when you want a group of commands
+to be triggered by a single address (or address-range) match.
+
+Example: perform substitution then print the second input line:
+@codequoteundirected on
+@codequotebacktick on
+@example
+$ seq 3 | sed -n '2@{s/2/X/ ; p@}'
+X
+@end example
+@codequoteundirected off
+@codequotebacktick off
+
@end table
@@ -1200,79 +1105,309 @@ these commands.
@table @code
@item y/@var{source-chars}/@var{dest-chars}/
-(The @code{/} characters may be uniformly replaced by
-any other single character within any given @code{y} command.)
-
@findex y (transliterate) command
@cindex Transliteration
Transliterate any characters in the pattern space which match
any of the @var{source-chars} with the corresponding character
in @var{dest-chars}.
+Example: transliterate @samp{a-j} into @samp{0-9}:
+@codequoteundirected on
+@codequotebacktick on
+@example
+$ echo hello world | sed 'y/abcdefghij/0123456789/'
+74llo worl3
+@end example
+@codequoteundirected off
+@codequotebacktick off
+
+(The @code{/} characters may be uniformly replaced by
+any other single character within any given @code{y} command.)
+
Instances of the @code{/} (or whatever other character is used in its stead),
@code{\}, or newlines can appear in the @var{source-chars} or @var{dest-chars}
lists, provide that each instance is escaped by a @code{\}.
The @var{source-chars} and @var{dest-chars} lists @emph{must}
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
+to the standard @code{a} command - see below for details.
+
+Example: Add the word @samp{hello} after the second line:
+@codequoteundirected on
+@codequotebacktick on
+@example
+$ seq 3 | sed '2a hello'
+1
+2
+hello
+3
+@end example
+@codequoteundirected off
+@codequotebacktick off
+
+Leading whitespaces after the @code{a} command are ignored.
+The text to add is read until the end of the line.
+
+
@item a\
@itemx @var{text}
-@cindex @value{SSEDEXT}, two addresses supported by most commands
-As a @acronym{GNU} extension, this command accepts two addresses.
-
@findex a (append text lines) command
@cindex Appending text after a line
@cindex Text, appending
-Queue the lines of text which follow this command
+Appending @var{text} after a line.
+
+Example: Add @samp{hello} after the second line
+(@print{} indicates printed output lines):
+@codequoteundirected on
+@codequotebacktick on
+@example
+$ seq 3 | sed '2a\
+hello'
+@print{}1
+@print{}2
+@print{}hello
+@print{}3
+@end example
+@codequoteundirected off
+@codequotebacktick off
+
+The @code{a} command queues the lines of text which follow this command
(each but the last ending with a @code{\},
which are removed from the output)
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.
+
Escape sequences in @var{text} are processed, so you should
use @code{\\} in @var{text} to print a single backslash.
-As a @acronym{GNU} extension, if between the @code{a} and the newline there is
-other than a whitespace-@code{\} sequence, then the text of this line,
-starting at the first non-whitespace character after the @code{a},
-is taken as the first line of the @var{text} block.
-(This enables a simplification in scripting a one-line add.)
-This extension also works with the @code{i} and @code{c} commands.
+The commands resume after the last line without a backslash (@code{\}) -
+@samp{world} in the following example:
+@codequoteundirected on
+@codequotebacktick on
+@example
+$ seq 3 | sed '2a\
+hello\
+world
+3s/./X/'
+@print{}1
+@print{}2
+@print{}hello
+@print{}world
+@print{}X
+@end example
+@codequoteundirected off
+@codequotebacktick off
+
+As a @acronym{GNU} extension, the @code{a} command and @var{text} can be
+separated into two @code{-e} parameters, enabling easier scripting:
+@codequoteundirected on
+@codequotebacktick on
+@example
+$ seq 3 | sed -e '2a\' -e hello
+1
+2
+hello
+3
+
+$ sed -e '2a\' -e "$VAR"
+@end example
+@codequoteundirected off
+@codequotebacktick off
+
+@item i @var{text}
+insert @var{text} before a line. This is a @acronym{GNU} extension
+to the standard @code{i} command - see below for details.
+
+Example: Insert the word @samp{hello} before the second line:
+@codequoteundirected on
+@codequotebacktick on
+@example
+$ seq 3 | sed '2i hello'
+1
+hello
+2
+3
+@end example
+@codequoteundirected off
+@codequotebacktick off
+
+Leading whitespaces after the @code{i} command are ignored.
+The text to add is read until the end of the line.
@item i\
@itemx @var{text}
-@cindex @value{SSEDEXT}, two addresses supported by most commands
-As a @acronym{GNU} extension, this command accepts two addresses.
-
@findex i (insert text lines) command
@cindex Inserting text before a line
@cindex Text, insertion
-Immediately output the lines of text which follow this command
-(each but the last ending with a @code{\},
-which are removed from the output).
+Immediately output the lines of text which follow this command.
+
+Example: Insert @samp{hello} before the second line
+(@print{} indicates printed output lines):
+@codequoteundirected on
+@codequotebacktick on
+@example
+$ seq 3 | sed '2i\
+hello'
+@print{}1
+@print{}hello
+@print{}2
+@print{}3
+@end example
+@codequoteundirected off
+@codequotebacktick off
+
+@cindex @value{SSEDEXT}, two addresses supported by most commands
+As a @acronym{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.
+
+The commands resume after the last line without a backslash (@code{\}) -
+@samp{world} in the following example:
+@codequoteundirected on
+@codequotebacktick on
+@example
+$ seq 3 | sed '2i\
+hello\
+world
+s/./X/'
+@print{}X
+@print{}hello
+@print{}world
+@print{}X
+@print{}X
+@end example
+@codequoteundirected off
+@codequotebacktick off
+
+As a @acronym{GNU} extension, the @code{i} command and @var{text} can be
+separated into two @code{-e} parameters, enabling easier scripting:
+@codequoteundirected on
+@codequotebacktick on
+@example
+$ seq 3 | sed -e '2i\' -e hello
+1
+hello
+2
+3
+
+$ sed -e '2i\' -e "$VAR"
+@end example
+@codequoteundirected off
+@codequotebacktick off
+
+@item c @var{text}
+Replaces the line(s) with @var{text}. This is a @acronym{GNU} extension
+to the standard @code{c} command - see below for details.
+
+Example: Replace the 2nd to 9th lines with the word @samp{hello}:
+@codequoteundirected on
+@codequotebacktick on
+@example
+$ seq 10 | sed '2,9c hello'
+1
+hello
+10
+@end example
+@codequoteundirected off
+@codequotebacktick off
+
+Leading whitespaces after the @code{c} command are ignored.
+The text to add is read until the end of the line.
@item c\
@itemx @var{text}
@findex c (change to text lines) command
@cindex Replacing selected lines with other text
Delete the lines matching the address or address-range,
-and output the lines of text which follow this command
-(each but the last ending with a @code{\},
-which are removed from the output)
-in place of the last line
-(or in place of each line, if no addresses were specified).
+and output the lines of text which follow this command.
+
+Example: Replace 2nd to 4th lines with the words @samp{hello} and
+@samp{world} (@print{} indicates printed output lines):
+@codequoteundirected on
+@codequotebacktick on
+@example
+$ seq 5 | sed '2,4c\
+hello\
+world'
+@print{}1
+@print{}hello
+@print{}world
+@print{}5
+@end example
+@codequoteundirected off
+@codequotebacktick off
+
+If no addresses are given, each line is replaced.
+
A new cycle is started after this command is done,
since the pattern space will have been deleted.
+In the following example, the @code{c} starts a
+new cycle and the substitution command is not performed
+on the replaced text:
+
+@codequoteundirected on
+@codequotebacktick on
+@example
+$ seq 3 | sed '2c\
+hello
+s/./X/'
+@print{}X
+@print{}hello
+@print{}X
+@end example
+@codequoteundirected off
+@codequotebacktick off
+
+As a @acronym{GNU} extension, the @code{c} command and @var{text} can be
+separated into two @code{-e} parameters, enabling easier scripting:
+@codequoteundirected on
+@codequotebacktick on
+@example
+$ seq 3 | sed -e '2c\' -e hello
+1
+hello
+3
+
+$ sed -e '2c\' -e "$VAR"
+@end example
+@codequoteundirected off
+@codequotebacktick off
-@item =
-@cindex @value{SSEDEXT}, two addresses supported by most commands
-As a @acronym{GNU} extension, this command accepts two addresses.
+@item =
@findex = (print line number) command
@cindex Printing line number
@cindex Line number, printing
Print out the current input line number (with a trailing newline).
+@codequoteundirected on
+@codequotebacktick on
+@example
+$ printf '%s\n' aaa bbb ccc | sed =
+1
+aaa
+2
+bbb
+3
+ccc
+@end example
+@codequoteundirected off
+@codequotebacktick off
+
+@cindex @value{SSEDEXT}, two addresses supported by most commands
+As a @acronym{GNU} extension, this command accepts two addresses.
+
+
+
+
@item l @var{n}
@findex l (list unambiguously) command
@cindex List pattern space
@@ -1291,11 +1426,23 @@ the default as specified on the command line is used. The @var{n}
parameter is a @value{SSED} extension.
@item r @var{filename}
-@cindex @value{SSEDEXT}, two addresses supported by most commands
-As a @acronym{GNU} extension, this command accepts two addresses.
@findex r (read file) command
@cindex Read text from a file
+Reads text file a file. Example:
+
+@codequoteundirected on
+@codequotebacktick on
+@example
+$ seq 3 | sed '2r/etc/hostname'
+1
+2
+fencepost.gnu.org
+3
+@end example
+@codequoteundirected off
+@codequotebacktick off
+
@cindex @value{SSEDEXT}, @file{/dev/stdin} file
Queue the contents of @var{filename} to be read and
inserted into the output stream at the end of the current cycle,
@@ -1307,6 +1454,10 @@ As a @value{SSED} extension, the special value @file{/dev/stdin}
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
+file will then be reread and inserted on each of the addressed lines.
+
@item w @var{filename}
@findex w (write file) command
@cindex Write to a file
@@ -1341,6 +1492,14 @@ then append the next line of input to the pattern space.
If there is no more input then @command{sed} exits without processing
any more commands.
+When @option{-z} is used, a zero byte (the ascii @samp{NUL} character) is
+added between the lines (instead of a new line).
+
+By default @command{sed} does not terminate if there is no 'next' input line.
+This is a GNU extension which can be disabled with @option{--posix}.
+@xref{N_command_last_line,,N command on the last line}.
+
+
@item P
@findex P (print first line) command
@cindex Print first line from pattern space
@@ -1460,33 +1619,6 @@ to the end of the current cycle.
Print out the file name of the current input file (with a trailing
newline).
-@item L @var{n}
-@findex L (fLow paragraphs) command
-@cindex Reformat pattern space
-@cindex Reformatting paragraphs
-@cindex @value{SSEDEXT}, reformatting paragraphs
-@cindex @value{SSEDEXT}, @code{L} command
-This @value{SSED} extension fills and joins lines in pattern space
-to produce output lines of (at most) @var{n} characters, like
-@code{fmt} does; if @var{n} is omitted, the default as specified
-on the command line is used. This command is considered a failed
-experiment and unless there is enough request (which seems unlikely)
-will be removed in future versions.
-
-@ignore
-Blank lines, spaces between words, and indentation are
-preserved in the output; successive input lines with different
-indentation are not joined; tabs are expanded to 8 columns.
-
-If the pattern space contains multiple lines, they are joined, but
-since the pattern space usually contains a single line, the behavior
-of a simple @code{L;d} script is the same as @samp{fmt -s} (i.e.,
-it does not join short lines to form longer ones).
-
-@var{n} specifies the desired line-wrap length; if omitted,
-the default as specified on the command line is used.
-@end ignore
-
@item Q [@var{exit-code}]
This command only accepts a single address.
@@ -1573,8 +1705,1171 @@ way to clear @command{sed}'s buffers in the middle of the
script in most multibyte locales (including UTF-8 locales).
@end table
+
+
+
+
+@node sed addresses
+@chapter Addresses: selecting lines
+
+@menu
+* Addresses overview:: Addresses overview
+* Numeric Addresses:: selecting lines by numbers
+* Regexp Addresses:: selecting lines by text matching
+* Range Addresses:: selecting a range of lines
+@end menu
+
+@node Addresses overview
+@section Addresses overview
+
+@cindex addresses, numeric
+@cindex numeric addresses
+Addresses determine on which line(s) the @command{sed} command will be
+executed. The following command replaces the word @samp{hello}
+with @samp{world} only on line 144:
+
+@codequoteundirected on
+@codequotebacktick on
+@example
+sed '144s/hello/world/' input.txt > output.txt
+@end example
+@codequoteundirected off
+@codequotebacktick off
+
+
+
+If no addresses are given, the command is performed on all lines.
+The following command replaces the word @samp{hello} with @samp{world}
+on all lines in the input file:
+
+@codequoteundirected on
+@codequotebacktick on
+@example
+sed 's/hello/world/' input.txt > output.txt
+@end example
+@codequoteundirected off
+@codequotebacktick off
+
+
+
+@cindex addresses, regular expression
+@cindex regular expression addresses
+Addresses can contain regular expressions to match lines based
+on content instead of line numbers. The following command replaces
+the word @samp{hello} with @samp{world} only in lines
+containing the word @samp{apple}:
+
+@codequoteundirected on
+@codequotebacktick on
+@example
+sed '/apple/s/hello/world/' input.txt > output.txt
+@end example
+@codequoteundirected off
+@codequotebacktick off
+
+
+
+@cindex addresses, range
+@cindex range addresses
+An address range is specified with two addresses separated by a comma
+(@code{,}). Addresses can be numeric, regular expressions, or a mix of
+both.
+The following command replaces the word @samp{hello} with @samp{world}
+only in lines 4 to 17 (inclusive):
+
+@codequoteundirected on
+@codequotebacktick on
+@example
+sed '4,17s/hello/world/' input.txt > output.txt
+@end example
+@codequoteundirected off
+@codequotebacktick off
+
+
+
+@cindex Excluding lines
+@cindex Selecting non-matching lines
+@cindex addresses, negating
+@cindex addresses, excluding
+Appending the @code{!} character to the end of an address
+specification (before the command letter) negates the sense of the
+match. That is, if the @code{!} character follows an address or an
+address range, then only lines which do @emph{not} match the addresses
+will be selected. The following command replaces the word @samp{hello}
+with @samp{world} only in lines @emph{not} containing the word
+@samp{apple}:
+
+@example
+sed '/apple/!s/hello/world/' input.txt > output.txt
+@end example
+
+The following command replaces the word @samp{hello} with
+@samp{world} only in lines 1 to 3 and 18 till the last line of the input file
+(i.e. excluding lines 4 to 17):
+
+@example
+sed '4,17!s/hello/world/' input.txt > output.txt
+@end example
+
+
+
+
+
+@node Numeric Addresses
+@section Selecting lines by numbers
+@cindex Addresses, in @command{sed} scripts
+@cindex Line selection
+@cindex Selecting lines to process
+
+Addresses in a @command{sed} script can be in any of the following forms:
+@table @code
+@item @var{number}
+@cindex Address, numeric
+@cindex Line, selecting by number
+Specifying a line number will match only that line in the input.
+(Note that @command{sed} counts lines continuously across all input files
+unless @option{-i} or @option{-s} options are specified.)
+
+@item $
+@cindex Address, last line
+@cindex Last line, selecting
+@cindex Line, selecting last
+This address matches the last line of the last file of input, or
+the last line of each file when the @option{-i} or @option{-s} options
+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
+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
+@var{first} + (@var{n} * @var{step}).
+Thus, one would use @code{1~2} to select the odd-numbered lines and
+@code{0~2} for even-numbered lines;
+to pick every third line starting with the second, @samp{2~3} would be used;
+to pick every fifth line starting with the tenth, use @samp{10~5};
+and @samp{50~0} is just an obscure way of saying @code{50}.
+
+The following commands demonstrate the step address usage:
+
+@example
+$ seq 10 | sed -n '0~4p'
+4
+8
+
+$ seq 10 | sed -n '1~3p'
+1
+4
+7
+10
+@end example
+
+
+@end table
+
+
+
+@node Regexp Addresses
+@section selecting lines by text matching
+
+@value{SSED} supports the following regular expression addresses.
+The default regular expression is
+@ref{BRE syntax, , Basic Regular Expression (BRE)}.
+If @option{-E} or @option{-r} options are used, The regular expression should be
+in @ref{ERE syntax, , Extended Regular Expression (ERE)} syntax.
+@xref{BRE vs ERE}.
+
+@table @code
+@item /@var{regexp}/
+@cindex Address, as a regular expression
+@cindex Line, selecting by regular expression match
+This will select any line which matches the regular expression @var{regexp}.
+If @var{regexp} itself includes any @code{/} characters,
+each must be escaped by a backslash (@code{\}).
+
+The following command prints lines in @file{/etc/passwd}
+which end with @samp{bash}@footnote{
+There are of course many other ways to do the same,
+e.g.
+@example
+grep 'bash$' /etc/passwd
+awk -F: '$7 == "/bin/bash"' /etc/passwd
+@end example
+}:
+
+@example
+sed -n '/bash$/p' /etc/passwd
+@end example
+
+@cindex empty regular expression
+@cindex @value{SSEDEXT}, modifiers and the empty regular expression
+The empty regular expression @samp{//} repeats the last regular
+expression match (the same holds if the empty regular expression is
+passed to the @code{s} command). Note that modifiers to regular expressions
+are evaluated when the regular expression is compiled, thus it is invalid to
+specify them together with the empty regular expression.
+
+@item \%@var{regexp}%
+(The @code{%} may be replaced by any other single character.)
+
+@cindex Slash character, in regular expressions
+This also matches the regular expression @var{regexp},
+but allows one to use a different delimiter than @code{/}.
+This is particularly useful if the @var{regexp} itself contains
+a lot of slashes, since it avoids the tedious escaping of every @code{/}.
+If @var{regexp} itself includes any delimiter characters,
+each must be escaped by a backslash (@code{\}).
+
+The following two commands are equivalent. They print lines
+which start with @samp{/home/alice/documents/}:
+
+@example
+sed -n '/^\/home\/alice\/documents\//p'
+sed -n '\%^/home/alice/documents/%p'
+sed -n '\;^/home/alice/documents/;p'
+@end example
+
+
+@item /@var{regexp}/I
+@itemx \%@var{regexp}%I
+@cindex @acronym{GNU} extensions, @code{I} modifier
+@cindex case insensitive, regular expression
+The @code{I} modifier to regular-expression matching is a @acronym{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}).
+
+Observe the difference between the following examples.
+
+In this example, @code{/b/I} is the address: regular expression with @code{I}
+modifier. @code{d} is the delete command:
+
+@example
+$ printf "%s\n" a b c | sed '/b/Id'
+a
+c
+@end example
+
+Here, @code{/b/} is the address: a regular expression.
+@code{i} is the insert command.
+@code{d} is the value to insert.
+A line with @samp{d} is then inserted above the matched line:
+
+@example
+$ printf "%s\n" a b c | sed '/b/id'
+a
+d
+b
+c
+@end example
+
+@item /@var{regexp}/M
+@itemx \%@var{regexp}%M
+@cindex @value{SSEDEXT}, @code{M} modifier
+The @code{M} modifier to regular-expression matching is a @value{SSED}
+extension which directs @value{SSED} to match the regular expression
+in @cite{multi-line} mode. The modifier causes @code{^} and @code{$} to
+match respectively (in addition to the normal behavior) the empty string
+after a newline, and the empty string before a newline. There are
+special character sequences
+@ifclear PERL
+(@code{\`} and @code{\'})
+@end ifclear
+which always match the beginning or the end of the buffer.
+In addition,
+the period character does not match a new-line character in
+multi-line mode.
+@end table
+
+@node Range Addresses
+@section Range Addresses
+
+@cindex Range of lines
+@cindex Several lines, selecting
+An address range can be specified by specifying two addresses
+separated by a comma (@code{,}). An address range matches lines
+starting from where the first address matches, and continues
+until the second address matches (inclusively):
+
+@example
+$ seq 10 | sed -n '4,6p'
+4
+5
+6
+@end example
+
+If the second address is a @var{regexp}, then checking for the
+ending match will start with the line @emph{following} the
+line which matched the first address: a range will always
+span at least two lines (except of course if the input stream
+ends).
+
+@example
+$ seq 10 | sed -n '4,/[0-9]/p'
+4
+5
+@end example
+
+If the second address is a @var{number} less than (or equal to)
+the line matching the first address, then only the one line is
+matched:
+
+@example
+$ seq 10 | sed -n '4,1p'
+4
+@end example
+
+@cindex Special addressing forms
+@cindex Range with start address of zero
+@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
+@value{SSED} also supports some special two-address forms; all these
+are @acronym{GNU} extensions:
+@table @code
+@item 0,/@var{regexp}/
+A line number of @code{0} can be used in an address specification like
+@code{0,/@var{regexp}/} so that @command{sed} will try to match
+@var{regexp} in the first input line too. In other words,
+@code{0,/@var{regexp}/} is similar to @code{1,/@var{regexp}/},
+except that if @var{addr2} matches the very first line of input the
+@code{0,/@var{regexp}/} form will consider it to end the range, whereas
+the @code{1,/@var{regexp}/} form will match the beginning of its range and
+hence make the range span up to the @emph{second} occurrence of the
+regular expression.
+
+Note that this is the only place where the @code{0} address makes
+sense; there is no 0-th line and commands which are given the @code{0}
+address in any other way will give an error.
+
+The following examples demonstrate the difference between starting
+with address 1 and 0:
+
+@example
+$ seq 10 | sed -n '1,/[0-9]/p'
+1
+2
+
+$ seq 10 | sed -n '0,/[0-9]/p'
+1
+@end example
+
+
+@item @var{addr1},+@var{N}
+Matches @var{addr1} and the @var{N} lines following @var{addr1}.
+
+@example
+$ seq 10 | sed -n '6,+2p'
+6
+7
+8
+@end example
+
+@var{addr1} can be a line number or a regular expression.
+
+@item @var{addr1},~@var{N}
+Matches @var{addr1} and the lines following @var{addr1}
+until the next line whose input line number is a multiple of @var{N}.
+The following command prints starting at line 6, until the next line which
+is a multiple of 4 (i.e. line 8):
+
+@example
+$ seq 10 | sed -n '6,~4p'
+6
+7
+8
+@end example
+
+@var{addr1} can be a line number or a regular expression.
+
+@end table
+
+
+
+
+@node sed regular expressions
+@chapter Regular Expressions: selecting text
+
+@menu
+* Regular Expressions Overview:: Overview of Regular expression in @command{sed}
+* BRE vs ERE:: Basic (BRE) and extended (ERE) regular expression
+ syntax
+* BRE syntax:: Overview of basic regular expression syntax
+* ERE syntax:: Overview of extended regular expression syntax
+* Character Classes and Bracket Expressions::
+* regexp extensions:: Additional regular expression commands
+* Back-references and Subexpressions:: Back-references and Subexpressions
+* Escapes:: Specifying special characters
+* Locale Considerations::
+@end menu
+
+@node Regular Expressions Overview
+@section Overview of regular expression in @command{sed}
+
+@c NOTE: Keep examples in the 'overview' section
+@c neutral in regards to BRE/ERE - to ease understanding.
+
+
+To know how to use @command{sed}, people should understand regular
+expressions (@dfn{regexp} for short). A regular expression
+is a pattern that is matched against a
+subject string from left to right. Most characters are
+@dfn{ordinary}: they stand for
+themselves in a pattern, and match the corresponding characters.
+Regular expressions in @command{sed} are specified between two
+slashes.
+
+The following command prints lines containing the word
+@samp{hello}:
+
+@example
+sed -n '/hello/p'
+@end example
+
+The above example is equivalent to this @command{grep} command:
+
+@example
+grep 'hello'
+@end example
+
+The power of regular expressions comes from the ability to include
+alternatives and repetitions in the pattern. These are encoded in the
+pattern by the use of @dfn{special characters}, which do not stand for
+themselves but instead are interpreted in some special way.
+
+The character @code{^} (caret) in a regular expression matches the
+beginning of the line. The character @code{.} (dot) matches any single
+character. The following @command{sed} command matches and prints
+lines which start with the letter @samp{b}, followed by any single character,
+followed by the letter @samp{d}:
+
+@example
+$ printf "%s\n" abode bad bed bit bid byte body | sed -n '/^b.d/p'
+bad
+bed
+bid
+body
+@end example
+
+The following sections explain the meaning and usage of special
+characters in regular expressions.
+
+@node BRE vs ERE
+@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}).
+
+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{|}.
+
+With basic (BRE) syntax, these characters do not have special meaning
+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
+
+@headitem Desired pattern
+@tab Basic (BRE) Syntax
+@tab Extended (ERE) Syntax
+
+@item literal @samp{+} (plus sign)
+
+@tab
+@example
+$ echo "a+b=c" | sed -n '/a+b/p'
+a+b=c
+@end example
+
+@tab
+@example
+$ echo "a+b=c" | sed -E -n '/a\+b/p'
+a+b=c
+@end example
+
+
+@item One or more @samp{a} characters followed by @samp{b}
+(plus sign as special meta-character)
+
+@tab
+@example
+$ echo "aab" | sed -n '/a\+b/p'
+aab
+@end example
+
+@tab
+@example
+$ echo "aab" | sed -E -n '/a+b/p'
+aab
+@end example
+
+@end multitable
+
+
+
+
+@node BRE syntax
+@section Overview of basic regular expression syntax
+
+Here is a brief description
+of regular expression syntax as used in @command{sed}.
+
+@table @code
+@item @var{char}
+A single ordinary character matches itself.
+
+@item *
+@cindex @acronym{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
+postfixed regular expression can also be followed by @code{*}; for
+example, @code{a**} is equivalent to @code{a*}. @acronym{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
+scripts should instead use @code{\*} in these contexts.
+@item .
+Matches any character, including newline.
+
+@item ^
+Matches the null string at beginning of the pattern space, i.e. what
+appears after the circumflex must appear at the beginning of the
+pattern space.
+
+In most scripts, pattern space is initialized to the content of each
+line (@pxref{Execution Cycle, , How @code{sed} works}). So, it is a
+useful simplification to think of @code{^#include} as matching only
+lines where @samp{#include} is the first thing on line---if there are
+spaces before, for example, the match fails. This simplification is
+valid as long as the original content of pattern space is not modified,
+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
+treat @code{^} as an ordinary character in that context.
+
+@item $
+It is the same as @code{^}, but refers to end of pattern space.
+@code{$} also acts as a special character only at the end
+of the regular expression or subexpression (that is, before @code{\)}
+or @code{\|}), and its use at the end of a subexpression is not
+portable.
+
+
+@item [@var{list}]
+@itemx [^@var{list}]
+Matches any single character in @var{list}: for example,
+@code{[aeiou]} matches all vowels. A list may include
+sequences like @code{@var{char1}-@var{char2}}, which
+matches any character between (inclusive) @var{char1}
+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.
+
+@item \?
+@cindex @acronym{GNU} extensions, to basic regular expressions
+As @code{*}, but only matches zero or one. It is a @acronym{GNU} extension.
+
+@item \@{@var{i}\@}
+As @code{*}, but matches exactly @var{i} sequences (@var{i} is a
+decimal integer; for portability, keep it between 0 and 255
+inclusive).
+
+@item \@{@var{i},@var{j}\@}
+Matches between @var{i} and @var{j}, inclusive, sequences.
+
+@item \@{@var{i},\@}
+Matches more than or equal to @var{i} sequences.
+
+@item \(@var{regexp}\)
+Groups the inner @var{regexp} as a whole, this is used to:
+
+@itemize @bullet
+@item
+@cindex @acronym{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}
+implementations do not support it and hence it is not universally
+portable.
+
+@item
+Use back references (see below).
+@end itemize
+
+
+@item @var{regexp1}\|@var{regexp2}
+@cindex @acronym{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.
+
+@item @var{regexp1}@var{regexp2}
+Matches the concatenation of @var{regexp1} and @var{regexp2}.
+Concatenation binds more tightly than @code{\|}, @code{^}, and
+@code{$}, but less tightly than the other regular expression
+operators.
+
+@item \@var{digit}
+Matches the @var{digit}-th @code{\(@dots{}\)} parenthesized
+subexpression in the regular expression. This is called a @dfn{back
+reference}. Subexpressions are implicitly numbered by counting
+occurrences of @code{\(} left-to-right.
+
+@item \n
+Matches the newline character.
+
+@item \@var{char}
+Matches @var{char}, where @var{char} is one of @code{$},
+@code{*}, @code{.}, @code{[}, @code{\}, or @code{^}.
+Note that the only C-like
+backslash sequences that you can portably assume to be
+interpreted are @code{\n} and @code{\\}; in particular
+@code{\t} is not portable, and matches a @samp{t} under most
+implementations of @command{sed}, rather than a tab character.
+
+@end table
+
+@cindex Greedy regular expression matching
+Note that the regular expression matcher is greedy, i.e., matches
+are attempted from left to right and, if two or more matches are
+possible starting at the same character, it selects the longest.
+
+@noindent
+Examples:
+@table @samp
+@item abcdef
+Matches @samp{abcdef}.
+
+@item a*b
+Matches zero or more @samp{a}s followed by a single
+@samp{b}. For example, @samp{b} or @samp{aaaaab}.
+
+@item a\?b
+Matches @samp{b} or @samp{ab}.
+
+@item a\+b\+
+Matches one or more @samp{a}s followed by one or more
+@samp{b}s: @samp{ab} is the shortest possible match, but
+other examples are @samp{aaaab} or @samp{abbbbb} or
+@samp{aaaaaabbbbbbb}.
+
+@item .*
+@itemx .\+
+These two both match all the characters in a string;
+however, the first matches every string (including the empty
+string), while the second matches only strings containing
+at least one character.
+
+@item ^main.*(.*)
+This matches a string starting with @samp{main},
+followed by an opening and closing
+parenthesis. The @samp{n}, @samp{(} and @samp{)} need not
+be adjacent.
+
+@item ^#
+This matches a string beginning with @samp{#}.
+
+@item \\$
+This matches a string ending with a single backslash. The
+regexp contains two backslashes for escaping.
+
+@item \$
+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.
+
+@item [^ @kbd{tab}]\+
+(Here @kbd{tab} stands for a single tab character.)
+This matches a string of one or more
+characters, none of which is a space or a tab.
+Usually this means a word.
+
+@item ^\(.*\)\n\1$
+This matches a string consisting of two equal substrings separated by
+a newline.
+
+@item .\@{9\@}A$
+This matches nine characters followed by an @samp{A} at the end of a line.
+
+@item ^.\@{15\@}A
+This matches the start of a string that contains 16 characters,
+the last of which is an @samp{A}.
+
+@end table
+
+
+@node ERE syntax
+@section Overview of extended regular expression syntax
+@cindex Extended regular expressions, syntax
+
+The only difference between basic and extended regular expressions is in
+the behavior of a few characters: @samp{?}, @samp{+}, parentheses,
+braces (@samp{@{@}}), and @samp{|}. While basic regular expressions
+require these to be escaped if you want them to behave as special
+characters, when using extended regular expressions you must escape
+them if you want them @emph{to match a literal character}. @samp{|}
+is special here because @samp{\|} is a GNU extension -- standard
+basic regular expressions do not provide its functionality.
+
+@noindent
+Examples:
+@table @code
+@item abc?
+becomes @samp{abc\?} when using extended regular expressions. It matches
+the literal string @samp{abc?}.
+
+@item c\+
+becomes @samp{c+} when using extended regular expressions. It matches
+one or more @samp{c}s.
+
+@item a\@{3,\@}
+becomes @samp{a@{3,@}} when using extended regular expressions. It matches
+three or more @samp{a}s.
+
+@item \(abc\)\@{2,3\@}
+becomes @samp{(abc)@{2,3@}} when using extended regular expressions. It
+matches either @samp{abcabc} or @samp{abcabcabc}.
+
+@item \(abc*\)\1
+becomes @samp{(abc*)\1} when using extended regular expressions.
+Backreferences must still be escaped when using extended regular
+expressions.
+
+@item a\|b
+becomes @samp{a|b} when using extended regular expressions. It matches
+@samp{a} or @samp{b}.
+@end table
+
+@node Character Classes and Bracket Expressions
+@section Character Classes and Bracket Expressions
+
+@c The 'character class' section is shamelessly copied from grep's manual.
+
+@cindex bracket expression
+@cindex character class
+A @dfn{bracket expression} is a list of characters enclosed by @samp{[} and
+@samp{]}.
+It matches any single character in that list;
+if the first character of the list is the caret @samp{^},
+then it matches any character @strong{not} in the list.
+For example, the following command replaces the words
+@samp{gray} or @samp{grey} with @samp{blue}:
+
+@example
+sed 's/gr[ae]y/blue/'
+@end example
+
+@c TODO: fix 'ref' to look good in both HTML and PDF
+Bracket expressions can be used in both
+@ref{BRE syntax,,basic} and @ref{ERE syntax,,extended}
+regular expressions (that is, with or without the @option{-E}/@option{-r}
+options).
+
+@cindex range expression
+Within a bracket expression, a @dfn{range expression} consists of two
+characters separated by a hyphen.
+It matches any single character that
+sorts between the two characters, inclusive.
+In the default C locale, the sorting sequence is the native character
+order; for example, @samp{[a-d]} is equivalent to @samp{[abcd]}.
+
+
+Finally, certain named classes of characters are predefined within
+bracket expressions, as follows.
+
+These named classes must be used @emph{inside} brackets
+themselves. Correct usage:
+@example
+$ echo 1 | sed 's/[[:digit:]]/X/'
+X
+@end example
+
+Incorrect usage is rejected by newer @command{sed} versions.
+Older versions accepted it but treated it as a single bracket expression
+(which is equivalent to @samp{[dgit:]},
+that is, only the characters @var{d/g/i/t/:}):
+@example
+# current GNU sed versions - incorrect usage rejected
+$ echo 1 | sed 's/[:digit:]/X/'
+sed: character class syntax is [[:space:]], not [:space:]
+
+# older GNU sed versions
+$ echo 1 | sed 's/[:digit:]/X/'
+1
+@end example
+
+
+@cindex classes of characters
+@cindex character classes
+@cindex named character classes
+@table @samp
+
+@item [:alnum:]
+@opindex alnum @r{character class}
+@cindex alphanumeric characters
+Alphanumeric characters:
+@samp{[:alpha:]} and @samp{[:digit:]}; in the @samp{C} locale and ASCII
+character encoding, this is the same as @samp{[0-9A-Za-z]}.
+
+@item [:alpha:]
+@opindex alpha @r{character class}
+@cindex alphabetic characters
+Alphabetic characters:
+@samp{[:lower:]} and @samp{[:upper:]}; in the @samp{C} locale and ASCII
+character encoding, this is the same as @samp{[A-Za-z]}.
+
+@item [:blank:]
+@opindex blank @r{character class}
+@cindex blank characters
+Blank characters:
+space and tab.
+
+@item [:cntrl:]
+@opindex cntrl @r{character class}
+@cindex control characters
+Control characters.
+In ASCII, these characters have octal codes 000
+through 037, and 177 (DEL).
+In other character sets, these are
+the equivalent characters, if any.
+
+@item [:digit:]
+@opindex digit @r{character class}
+@cindex digit characters
+@cindex numeric characters
+Digits: @code{0 1 2 3 4 5 6 7 8 9}.
+
+@item [:graph:]
+@opindex graph @r{character class}
+@cindex graphic characters
+Graphical characters:
+@samp{[:alnum:]} and @samp{[:punct:]}.
+
+@item [:lower:]
+@opindex lower @r{character class}
+@cindex lower-case letters
+Lower-case letters; in the @samp{C} locale and ASCII character
+encoding, this is
+@code{a b c d e f g h i j k l m n o p q r s t u v w x y z}.
+
+@item [:print:]
+@opindex print @r{character class}
+@cindex printable characters
+Printable characters:
+@samp{[:alnum:]}, @samp{[:punct:]}, and space.
+
+@item [:punct:]
+@opindex punct @r{character class}
+@cindex punctuation characters
+Punctuation characters; in the @samp{C} locale and ASCII character
+encoding, this is
+@code{!@: " # $ % & ' ( ) * + , - .@: / : ; < = > ?@: @@ [ \ ] ^ _ ` @{ | @} ~}.
+
+@item [:space:]
+@opindex space @r{character class}
+@cindex space characters
+@cindex whitespace characters
+Space characters: in the @samp{C} locale, this is
+tab, newline, vertical tab, form feed, carriage return, and space.
+
+
+@item [:upper:]
+@opindex upper @r{character class}
+@cindex upper-case letters
+Upper-case letters: in the @samp{C} locale and ASCII character
+encoding, this is
+@code{A B C D E F G H I J K L M N O P Q R S T U V W X Y Z}.
+
+@item [:xdigit:]
+@opindex xdigit @r{character class}
+@cindex xdigit class
+@cindex hexadecimal digits
+Hexadecimal digits:
+@code{0 1 2 3 4 5 6 7 8 9 A B C D E F a b c d e f}.
+
+@end table
+Note that the brackets in these class names are
+part of the symbolic names, and must be included in addition to
+the brackets delimiting the bracket expression.
+
+Most meta-characters lose their special meaning inside bracket expressions:
+
+@table @samp
+@item ]
+ends the bracket expression if it's not the first list item.
+So, if you want to make the @samp{]} character a list item,
+you must put it first.
+
+@item -
+represents the range if it's not first or last in a list or the ending point
+of a range.
+
+@item ^
+represents the characters not in the list.
+If you want to make the @samp{^}
+character a list item, place it anywhere but first.
+@end table
+
+TODO: incorporate this paragraph (copied verbatim from BRE section).
+
+@cindex @code{POSIXLY_CORRECT} behavior, bracket expressions
+The characters @code{$}, @code{*}, @code{.}, @code{[}, and @code{\}
+are normally not special within @var{list}. For example, @code{[\*]}
+matches either @samp{\} or @samp{*}, because the @code{\} is not
+special here. However, strings like @code{[.ch.]}, @code{[=a=]}, and
+@code{[:space:]} are special within @var{list} and represent collating
+symbols, equivalence classes, and character classes, respectively, and
+@code{[} is therefore special within @var{list} when it is followed by
+@code{.}, @code{=}, or @code{:}. Also, when not in
+@env{POSIXLY_CORRECT} mode, special escapes like @code{\n} and
+@code{\t} are recognized within @var{list}. @xref{Escapes}.
+@c ********
+
+
+@c TODO: improve explanation about collation classes and equivalence classes
+@c perhaps dedicate a section to Locales ??
+
+@table @samp
+@item [.
+represents the open collating symbol.
+
+@item .]
+represents the close collating symbol.
+
+@item [=
+represents the open equivalence class.
+
+@item =]
+represents the close equivalence class.
+
+@item [:
+represents the open character class symbol, and should be followed by a
+valid character class name.
+
+@item :]
+represents the close character class symbol.
+@end table
+
+
+@node regexp extensions
+@section regular expression extensions
+
+The following sequences have special meaning inside regular expressions
+(used in @ref{Regexp Addresses,,addresses} and the @code{s} command).
+
+These can be used in both
+@ref{BRE syntax,,basic} and @ref{ERE syntax,,extended}
+regular expressions (that is, with or without the @option{-E}/@option{-r}
+options).
+
+@table @code
+@item \w
+Matches any ``word'' character. A ``word'' character is any
+letter or digit or the underscore character.
+
+@example
+$ echo "abc %-= def." | sed 's/\w/X/g'
+XXX %-= XXX.
+@end example
+
+
+@item \W
+Matches any ``non-word'' character.
+
+@example
+$ echo "abc %-= def." | sed 's/\W/X/g'
+abcXXXXXdefX
+@end example
+
+
+@item \b
+Matches a word boundary; that is it matches if the character
+to the left is a ``word'' character and the character to the
+right is a ``non-word'' character, or vice-versa.
+
+@example
+$ echo "abc %-= def." | sed 's/\b/X/g'
+XabcX %-= XdefX.
+@end example
+
+
+@item \B
+Matches everywhere but on a word boundary; that is it matches
+if the character to the left and the character to the right
+are either both ``word'' characters or both ``non-word''
+characters.
+
+@example
+$ echo "abc %-= def." | sed 's/\w/X/g'
+aXbXc X%X-X=X dXeXf.X
+@end example
+
+
+@item \s
+Matches whitespace characters (spaces and tabs).
+Newlines embedded in the pattern/hold spaces will also match:
+
+@example
+$ echo "abc %-= def." | sed 's/\s/X/g'
+abcX%-=Xdef.
+@end example
+
+
+@item \S
+Matches non-whitespace characters.
+
+@example
+$ echo "abc %-= def." | sed 's/\w/X/g'
+XXX XXX XXXX
+@end example
+
+
+@item \<
+Matches the beginning of a word.
+
+@example
+$ echo "abc %-= def." | sed 's/\</X/g'
+Xabc %-= Xdef.
+@end example
+
+
+@item \>
+Matches the end of a word.
+
+@example
+$ echo "abc %-= def." | sed 's/\>/X/g'
+abcX %-= defX.
+@end example
+
+
+@item \`
+Matches only at the start of pattern space. This is different
+from @code{^} in multi-line mode.
+
+Compare the following two examples:
+
+@example
+$ printf "a\nb\nc\n" | sed 'N;N;s/^/X/gm'
+Xa
+Xb
+Xc
+
+$ printf "a\nb\nc\n" | sed 'N;N;s/\`/X/gm'
+Xa
+b
+c
+@end example
+
+@item \'
+Matches only at the end of pattern space. This is different
+from @code{$} in multi-line mode.
+
+
+
+@end table
+
+
+@node Back-references and Subexpressions
+@section Back-references and Subexpressions
+@cindex subexpression
+@cindex back-reference
+
+@dfn{back-references} are regular expression commands which refer to a
+previous part of the matched regular expression. Back-references are
+specified with backslash and a single digit (e.g. @samp{\1}). The
+part of the regular expression they refer to is called a
+@dfn{subexpression}, and is designated with parentheses.
+
+Back-references and subexpressions are used in two cases: in the
+regular expression search pattern, and in the @var{replacement} part
+of the @command{s} command (@pxref{Regexp Addresses,,Regular
+Expression Addresses} and @ref{The "s" Command}).
+
+In a regular expression pattern, back-references are used to match
+the same content as a previously matched subexpression. In the
+following example, the subexpression is @samp{.} - any single
+character (being surrounded by parentheses makes it a
+subexpression). The back-reference @samp{\1} asks to match the same
+content (same character) as the sub-expression.
+
+The command below matches words starting with any character,
+followed by the letter @samp{o}, followed by the same character as the
+first.
+
+@example
+$ sed -E -n '/^(.)o\1$/p' /usr/share/dict/words
+bob
+mom
+non
+pop
+sos
+tot
+wow
+@end example
+
+Multiple subexpressions are automatically numbered from
+left-to-right. This command searches for 6-letter
+palindromes (the first three letters are 3 subexpressions,
+followed by 3 back-references in reverse order):
+
+@example
+$ sed -E -n '/^(.)(.)(.)\3\2\1$/p' /usr/share/dict/words
+redder
+@end example
+
+In the @command{s} command, back-references can be
+used in the @var{replacement} part to refer back to subexpressions in
+the @var{regexp} part.
+
+The following example uses two subexpressions in the regular
+expression to match two space-separated words. The back-references in
+the @var{replacement} part prints the words in a different order:
+
+@example
+$ echo "James Bond" | sed -E 's/(.*) (.*)/The name is \2, \1 \2./'
+The name is Bond, James Bond.
+@end example
+
+
+When used with alternation, if the group does not participate in the
+match then the back-reference makes the whole match fail. For
+example, @samp{a(.)|b\1} will not match @samp{ba}. When multiple
+regular expressions are given with @option{-e} or from a file
+(@samp{-f @var{file}}), back-references are local to each expression.
+
+
@node Escapes
-@section @acronym{GNU} Extensions for Escapes in Regular Expressions
+@section Escape Sequences - specifying special characters
@cindex @acronym{GNU} extensions, special escapes
Until this chapter, we have only encountered escapes of the form
@@ -1631,15 +2926,7 @@ hex 1A, but @samp{\c@{} becomes hex 3B, while @samp{\c;} becomes hex 7B.
Produces or matches a character whose decimal @sc{ascii} value is @var{xxx}.
@item \o@var{xxx}
-@ifset PERL
-@item \@var{xxx}
-@end ifset
Produces or matches a character whose octal @sc{ascii} value is @var{xxx}.
-@ifset PERL
-The syntax without the @code{o} is active in Perl mode, while the one
-with the @code{o} is active in the normal or extended @sc{posix} regular
-expression modes.
-@end ifset
@item \x@var{xx}
Produces or matches a character whose hexadecimal @sc{ascii} value is @var{xx}.
@@ -1648,46 +2935,246 @@ 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.
-Other escapes match a particular character class and are valid only in
-regular expressions:
-@table @code
-@item \w
-Matches any ``word'' character. A ``word'' character is any
-letter or digit or the underscore character.
+@node Locale Considerations
+@section Locale Considerations
-@item \W
-Matches any ``non-word'' character.
+TODO: fix following paragraphs (copied verbatim from 'bracket
+expression' section).
-@item \b
-Matches a word boundary; that is it matches if the character
-to the left is a ``word'' character and the character to the
-right is a ``non-word'' character, or vice-versa.
+TODO: mention locale support is heavily dependent on the OS/libc, not on sed.
-@item \B
-Matches everywhere but on a word boundary; that is it matches
-if the character to the left and the character to the right
-are either both ``word'' characters or both ``non-word''
-characters.
+The current locale affects the characters matched by @command{sed}'s
+regular expressions.
-@item \`
-Matches only at the start of pattern space. This is different
-from @code{^} in multi-line mode.
-@item \'
-Matches only at the end of pattern space. This is different
-from @code{$} in multi-line mode.
+In other locales, the sorting sequence is not specified, and
+@samp{[a-d]} might be equivalent to @samp{[abcd]} or to
+@samp{[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 expressions, you can use the @samp{C} locale by setting the
+@env{LC_ALL} environment variable to the value @samp{C}.
+
+@example
+# TODO: is there any real-world system/locale where 'A'
+# is replaced by '-' ?
+$ echo A | sed 's/[a-z]/-/'
+A
+@end example
+
+Their interpretation depends on the @env{LC_CTYPE} locale;
+for example, @samp{[[:alnum:]]} means the character class of numbers and letters
+in the current locale.
+
+TODO: show example of collation
+
+@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
+
+
+@node advanced sed
+@chapter Advanced @command{sed}: cycles and buffers
+
+@menu
+* Execution Cycle:: How @command{sed} works
+* Hold and Pattern Buffers::
+* Multiline techniques:: Using D,G,H,N,P to process multiple lines
+* Branching and flow control::
+@end menu
+
+@node Execution Cycle
+@section How @command{sed} Works
+
+@cindex Buffer spaces, pattern and hold
+@cindex Spaces, pattern and hold
+@cindex Pattern space, definition
+@cindex Hold space, definition
+@command{sed} maintains two data buffers: the active @emph{pattern} space,
+and the auxiliary @emph{hold} space. Both are initially empty.
+
+@command{sed} operates by performing the following cycle on each
+line of input: first, @command{sed} reads one line from the input
+stream, removes any trailing newline, and places it in the pattern space.
+Then commands are executed; each command can have an address associated
+to it: addresses are a kind of condition code, and a command is only
+executed if the condition is verified before the command is to be
+executed.
+
+When the end of the script is reached, unless the @option{-n} option
+is in use, the contents of pattern space are printed out to the output
+stream, adding back the trailing newline if it was removed.@footnote{Actually,
+if @command{sed} prints a line without the terminating newline, it will
+nevertheless print the missing newline as soon as more text is sent to
+the same output stream, which gives the ``least expected surprise''
+even though it does not make commands like @samp{sed -n p} exactly
+identical to @command{cat}.} Then the next cycle starts for the next
+input line.
+
+Unless special commands (like @samp{D}) are used, the pattern space is
+deleted between two cycles. The hold space, on the other hand, keeps
+its data between cycles (see commands @samp{h}, @samp{H}, @samp{x},
+@samp{g}, @samp{G} to move data between both buffers).
+
+@node Hold and Pattern Buffers
+@section Hold and Pattern Buffers
+
+TODO
+
+@node Multiline techniques
+@section Multiline techniques - using D,G,H,N,P to process multiple lines
+
+Multiple lines can be processed as one buffer using the
+@code{D},@code{G},@code{H},@code{N},@code{P}. They are similar to
+their lowercase counterparts (@code{d},@code{g},
+@code{h},@code{n},@code{p}), except that these commands append or
+subtract data while respecting embedded newlines - allowing adding and
+removing lines from the pattern and hold spaces.
+
+They operate as follows:
+@table @code
+@item D
+@emph{deletes} line from the pattern space until the first newline,
+and restarts the cycle.
+
+@item G
+@emph{appends} line from the hold space to the pattern space, with a
+newline before it.
+
+@item H
+@emph{appends} line from the pattern space to the hold space, with a
+newline before it.
+
+@item N
+@emph{appends} line from the input file to the pattern space.
+
+@item P
+@emph{prints} line from the pattern space until the first newline.
-@ifset PERL
-@item \G
-Match only at the start of pattern space or, when doing a global
-substitution using the @code{s///g} command and option, at
-the end-of-match position of the prior match. For example,
-@samp{s/\Ga/Z/g} will change an initial run of @code{a}s to
-a run of @code{Z}s
-@end ifset
@end table
+
+The following example illustrates the operation of @code{N} and
+@code{D} commands:
+
+@codequoteundirected on
+@codequotebacktick on
+@example
+@group
+$ seq 6 | sed -n 'N;l;D'
+1\n2$
+2\n3$
+3\n4$
+4\n5$
+5\n6$
+@end group
+@end example
+@codequoteundirected off
+@codequotebacktick off
+
+@enumerate
+@item
+@command{sed} starts by reading the first line into the pattern space
+(i.e. @samp{1}).
+@item
+At the beginning of every cycle, the @code{N}
+command appends a newline and the next line to the pattern space
+(i.e. @samp{1}, @samp{\n}, @samp{2} in the first cycle).
+@item
+The @code{l} command prints the content of the pattern space
+unambigiously.
+@item
+The @code{D} command then removes the content of pattern
+space up to the first newline (leaving @samp{2} at the end of
+the first cycle).
+@item
+At the next cycle the @code{N} command appends a
+newline and the next input line to the pattern space
+(e.g. @samp{2}, @samp{\n}, @samp{3}).
+@end enumerate
+
+
+@cindex processing paragraphs
+@cindex paragraphs, processing
+A common technique to process blocks of text such as paragraphs
+(instead of line-by-line) is using the following construct:
+
+@codequoteundirected on
+@codequotebacktick on
+@example
+sed '/./@{H;$!d@} ; x ; s/REGEXP/REPLACEMENT/'
+@end example
+@codequoteundirected off
+@codequotebacktick off
+
+@enumerate
+@item
+The first expression, @code{/./@{H;$!d@}} operates on all non-empty lines,
+and adds the current line (in the pattern space) to the hold space.
+On all lines except the last, the pattern space is deleted and the cycle is
+restarted.
+
+@item
+The other expressions @code{x} and @code{s} are executed only on empty
+lines (i.e. paragraph separators). The @code{x} command fetches the
+accumulated lines from the hold space back to the pattern space. The
+@code{s///} command then operates on all the text in the paragraph
+(including the embedded newlines).
+@end enumerate
+
+The following example demonstrates this technique:
+@codequoteundirected on
+@codequotebacktick on
+@example
+@group
+$ cat input.txt
+a a a aa aaa
+aaaa aaaa aa
+aaaa aaa aaa
+
+bbbb bbb bbb
+bb bb bbb bb
+bbbbbbbb bbb
+
+ccc ccc cccc
+cccc ccccc c
+cc cc cc cc
+
+$ sed '/./@{H;$!d@} ; x ; s/^/\nSTART-->/ ; s/$/\n<--END/' input.txt
+
+START-->
+a a a aa aaa
+aaaa aaaa aa
+aaaa aaa aaa
+<--END
+
+START-->
+bbbb bbb bbb
+bb bb bbb bb
+bbbbbbbb bbb
+<--END
+
+START-->
+ccc ccc cccc
+cccc ccccc c
+cc cc cc cc
+<--END
+@end group
+@end example
+@codequoteundirected off
+@codequotebacktick off
+
+For more annotated examples, @pxref{Text search across multiple lines}
+and @ref{Line length adjustment}.
+
+@node Branching and flow control
+@section Branching and Flow Control
+
+TODO
+
@node Examples
@chapter Some Sample Scripts
@@ -1695,12 +3182,18 @@ Here are some @command{sed} scripts to guide you in the art of mastering
@command{sed}.
@menu
+
+Useful one-liners:
+* Joining lines::
+
Some exotic examples:
* Centering lines::
* Increment a number::
* Rename files to lower case::
* Print bash environment::
* Reverse chars of lines::
+* Text search across multiple lines::
+* Line length adjustment::
Emulating standard utilities:
* tac:: Reverse lines of files
@@ -1717,6 +3210,53 @@ Emulating standard utilities:
* cat -s:: Squeezing blank lines
@end menu
+@node Joining lines
+@section Joining lines
+
+Join specific lines (e.g. if lines 2 and 3 need to be joined):
+
+@codequoteundirected on
+@codequotebacktick on
+@example
+$ cat lines.txt
+hello
+hel
+lo
+hello
+
+$ sed '2@{N;s/\n//;@}' lines.txt
+hello
+hello
+hello
+@end example
+@codequoteundirected off
+@codequotebacktick off
+
+Join lines ending with backslashes:
+
+@codequoteundirected on
+@codequotebacktick on
+@example
+$ cat 1.txt
+this \
+is \
+a \
+long \
+line
+and another \
+line
+
+$ sed -e ':x /\\$/ @{ N; s/\\\n//g ; bx @}' 1.txt
+this is a long line
+and another line
+
+
+#TODO: The above requires gnu sed.
+# non-gnu seds need newlines after ':' and 'b'
+@end example
+@codequoteundirected off
+@codequotebacktick off
+
@node Centering lines
@section Centering Lines
@@ -1743,7 +3283,7 @@ technique.
@end group
@group
-# del leading and trailing spaces
+# delete leading and trailing spaces
y/@kbd{tab}/ /
s/^ *//
s/ *$//
@@ -1835,7 +3375,7 @@ seen a script converting the output of @command{date} into a @command{bc}
program!
The main body of this is the @command{sed} script, which remaps the name
-from lower to upper (or vice-versa) and even checks out
+from lower to upper (or vice-versa) and even checks out
if the remapped name is the same as the original name.
Note how the script is parameterized using shell
variables and proper quoting.
@@ -1844,11 +3384,11 @@ variables and proper quoting.
@example
@group
#! /bin/sh
-# rename files to lower/upper case...
+# rename files to lower/upper case...
#
-# usage:
-# move-to-lower *
-# move-to-upper *
+# usage:
+# move-to-lower *
+# move-to-upper *
# or
# move-to-lower -R .
# move-to-upper -R .
@@ -1891,7 +3431,7 @@ files_only=
@group
while :
do
- case "$1" in
+ case "$1" in
-n) apply_cmd='cat' ;;
-R) finder='find "$@@" -type f';;
-h) help ; exit 1 ;;
@@ -2085,6 +3625,212 @@ s/\n//g
@end example
@c end---------------------------------------------
+
+@node Text search across multiple lines
+@section Text search across multiple lines
+
+This section uses @code{N} and @code{D} commands to search for
+consecutive words spanning multiple lines. @xref{Multiline techniques}.
+
+These examples deal with finding doubled occurrences of words in a document.
+
+Finding doubled words in a single line is easy using GNU @command{grep}
+and similarly with @value{SSED}:
+
+@c NOTE: in all examples, 'the@ the' is used to prevent
+@c 'make syntax-check' from complaining about double words.
+@codequoteundirected on
+@codequotebacktick on
+@example
+@group
+$ cat two-cities-dup1.txt
+It was the best of times,
+it was the worst of times,
+it was the@ the age of wisdom,
+it was the age of foolishness,
+
+$ grep -E '\b(\w+)\s+\1\b' two-cities-dup1.txt
+it was the@ the age of wisdom,
+
+$ grep -n -E '\b(\w+)\s+\1\b' two-cities-dup1.txt
+3:it was the@ the age of wisdom,
+
+$ sed -En '/\b(\w+)\s+\1\b/p' two-cities-dup1.txt
+it was the@ the age of wisdom,
+
+$ sed -En '/\b(\w+)\s+\1\b/@{=;p@}' two-cities-dup1.txt
+3
+it was the@ the age of wisdom,
+@end group
+@end example
+@codequoteundirected off
+@codequotebacktick off
+
+@itemize @bullet
+@item
+The regular expression @samp{\b\w+\s+} searches for word-boundary (@samp{\b}),
+followed by one-or-more word-characters (@samp{\w+}), followed by whitespace
+(@samp{\s+}). @xref{regexp extensions}.
+
+@item
+Adding parentheses around the @samp{(\w+)} expression creates a subexpression.
+The regular expression pattern @samp{(PATTERN)\s+\1} defines a subexpression
+(in the parentheses) followed by a back-reference, separated by whitespace.
+A successful match means the @var{PATTERN} was repeated twice in succession.
+@xref{Back-references and Subexpressions}.
+
+@item
+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
+
+@item
+The @option{-E} option enables extended regular expression syntax, alleviating
+the need to add backslashes before the parenthesis. @xref{ERE syntax}.
+
+@end itemize
+
+When the doubled word span two lines the above regular expression
+will not find them as @command{grep} and @command{sed} operate line-by-line.
+
+By using @command{N} and @command{D} commands, @command{sed} can apply
+regular expressions on multiple lines (that is, multiple lines are stored
+in the pattern space, and the regular expression works on it):
+
+@c NOTE: use 'the@*the' instead of a real new line to prevent
+@c 'make syntax-check' to complain about doubled-words.
+@codequoteundirected on
+@codequotebacktick on
+@example
+$ cat two-cities-dup2.txt
+It was the best of times, it was the
+worst of times, it was the@*the age of wisdom,
+it was the age of foolishness,
+
+$ sed -En '@{N; /\b(\w+)\s+\1\b/@{=;p@} ; D@}' two-cities-dup2.txt
+3
+worst of times, it was the@*the age of wisdom,
+@end example
+@codequoteundirected off
+@codequotebacktick off
+
+@itemize @bullet
+@item
+The @command{N} command appends the next line to the pattern space
+(thus ensuring it contains two consecutive lines in every cycle).
+
+@item
+The regular expression uses @samp{\s+} for word separator which matches
+both spaces and newlines.
+
+@item
+The regular expression matches, the entire pattern space is printed
+with @command{p}. No lines are printed by default due to the @option{-n} option.
+
+@item
+The @command{D} removes the first line from the pattern space (up until the
+first newline), readying it for the next cycle.
+@end itemize
+
+See the GNU @command{coreutils} manual for an alternative solution using
+@command{tr -s} and @command{uniq} at
+@c NOTE: cheating and keeping the URL line shorter than 80 characters
+@c by using 'gnu.org' and '/s/'.
+@url{https://gnu.org/s/coreutils/manual/html_node/Squeezing-and-deleting.html}.
+
+@node Line length adjustment
+@section Line length adjustment
+
+This section uses @code{N} and @code{D} commands to search for
+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
+lines of text of the following input file:
+
+@example
+@group
+$ cat 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,
+@end group
+@end example
+
+The following command will wrap 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,
+@end group
+@end example
+@codequoteundirected off
+@codequotebacktick off
+
+The following command will split lines by comma character:
+@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,
+@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
+
+
+
@node tac
@section Reverse Lines of Files
@@ -2093,9 +3839,6 @@ scripts emulating various Unix commands. This, in particular,
is a @command{tac} workalike.
Note that on implementations other than @acronym{GNU} @command{sed}
-@ifset PERL
-and @value{SSED}
-@end ifset
this script might easily overflow internal buffers.
@c start-------------------------------------------
@@ -2542,7 +4285,7 @@ D
@end example
@c end---------------------------------------------
-As you can see, we mantain a 2-line window using @code{P} and @code{D}.
+As you can see, we maintain a 2-line window using @code{P} and @code{D}.
This technique is often used in advanced @command{sed} scripts.
@node uniq -d
@@ -2696,7 +4439,7 @@ tx
This removes leading and trailing blank lines. It is also the
fastest. Note that loops are completely done with @code{n} and
@code{b}, without relying on @command{sed} to restart the
-the script automatically at the end of a line.
+script automatically at the end of a line.
@c start-------------------------------------------
@example
@@ -2714,7 +4457,7 @@ the script automatically at the end of a line.
p
# get next
n
-# got chars? print it again, etc...
+# got chars? print it again, etc...
/./bx
@end group
@@ -2758,80 +4501,6 @@ However, recursion is used to handle subpatterns and indefinite
repetition. This means that the available stack space may limit
the size of the buffer that can be processed by certain patterns.
-@ifset PERL
-There are some size limitations in the regular expression
-matcher but it is hoped that they will never in practice
-be relevant. The maximum length of a compiled pattern
-is 65539 (sic) bytes. All values in repeating quantifiers
-must be less than 65536. The maximum nesting depth of
-all parenthesized subpatterns, including capturing and
-non-capturing subpatterns@footnote{The
-distinction is meaningful when referring to Perl-style
-regular expressions.}, assertions, and other types of
-subpattern, is 200.
-
-Also, @value{SSED} recognizes the @sc{posix} syntax
-@code{[.@var{ch}.]} and @code{[=@var{ch}=]}
-where @var{ch} is a ``collating element'', but these
-are not supported, and an error is given if they are
-encountered.
-
-Here are a few distinctions between the real Perl-style
-regular expressions and those that @option{-R} recognizes.
-
-@enumerate
-@item
-Lookahead assertions do not allow repeat quantifiers after them
-Perl permits them, but they do not mean what you
-might think. For example, @samp{(?!a)@{3@}} does not assert that the
-next three characters are not @samp{a}. It just asserts three times that the
-next character is not @samp{a} --- a waste of time and nothing else.
-
-@item
-Capturing subpatterns that occur inside negative lookahead
-head assertions are counted, but their entries are counted
-as empty in the second half of an @code{s} command.
-Perl sets its numerical variables from any such patterns
-that are matched before the assertion fails to match
-something (thereby succeeding), but only if the negative
-lookahead assertion contains just one branch.
-
-@item
-The following Perl escape sequences are not supported:
-@samp{\l}, @samp{\u}, @samp{\L}, @samp{\U}, @samp{\E},
-@samp{\Q}. In fact these are implemented by Perl's general
-string-handling and are not part of its pattern matching engine.
-
-@item
-The Perl @samp{\G} assertion is not supported as it is not
-relevant to single pattern matches.
-
-@item
-Fairly obviously, @value{SSED} does not support the @samp{(?@{code@})}
-and @samp{(?p@{code@})} constructions. However, there is some experimental
-support for recursive patterns using the non-Perl item @samp{(?R)}.
-
-@item
-There are at the time of writing some oddities in Perl
-5.005_02 concerned with the settings of captured strings
-when part of a pattern is repeated. For example, matching
-@samp{aba} against the pattern @samp{/^(a(b)?)+$/} sets
-@samp{$2}@footnote{@samp{$2} would be @samp{\2} in @value{SSED}.}
-to the value @samp{b}, but matching @samp{aabbaa}
-against @samp{/^(aa(bb)?)+$/} leaves @samp{$2}
-unset. However, if the pattern is changed to
-@samp{/^(aa(b(b))?)+$/} then @samp{$2} (and @samp{$3}) are set.
-In Perl 5.004 @samp{$2} is set in both cases, and that is also
-true of @value{SSED}.
-
-@item
-Another as yet unresolved discrepancy is that in Perl
-5.005_02 the pattern @samp{/^(a)?(?(1)a|b)+$/} matches
-the string @samp{a}, whereas in @value{SSED} it does not.
-However, in both Perl and @value{SSED} @samp{/^(a)?a/} matched
-against @samp{a} leaves $1 unset.
-@end enumerate
-@end ifset
@node Other Resources
@chapter Other Resources for Learning About @command{sed}
@@ -2867,7 +4536,7 @@ Please do not send a bug report like this:
@example
@i{@i{@r{while building frobme-1.3.4}}}
-$ configure
+$ configure
@error{} sed: file sedscr line 1: Unknown option to 's'
@end example
@@ -2886,6 +4555,7 @@ for the bug, but that is not a very practical prospect.
Here are a few commonly reported bugs that are not bugs.
@table @asis
+@anchor{N_command_last_line}
@item @code{N} command on the last line
@cindex Portability, @code{N} command on the last line
@cindex Non-bugs, @code{N} command on the last line
@@ -2896,6 +4566,21 @@ the @command{N} command is issued on the last line of a file.
the @command{-n} command switch has been specified. This choice is
by design.
+Default behavior (gnu extension, non-POSIX conforming):
+@example
+$ seq 3 | sed N
+1
+2
+3
+@end example
+@noindent
+To force POSIX-conforming behavior:
+@example
+$ seq 3 | sed --posix N
+1
+2
+@end example
+
For example, the behavior of
@example
sed N foo bar
@@ -2941,9 +4626,6 @@ 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
-@ifset PERL
-@value{SSED} or
-@end ifset
@acronym{GNU} @command{sed}.
On the other hand, some scripts use s|abc\|def||g to remove occurrences
@@ -2972,7 +4654,7 @@ In short, @samp{sed -i} will let you delete the contents of
a read-only file, and in general the @option{-i} option
(@pxref{Invoking sed, , Invocation}) lets you clobber
protected files. This is not a bug, but rather a consequence
-of how the Unix filesystem works.
+of how the Unix file system works.
The permissions on a file say what can happen to the data
in that file, while the permissions on a directory say what can
@@ -2982,7 +4664,7 @@ Rather, it will work on a temporary file that is finally renamed
to the original name: if you rename or delete files, you're actually
modifying the contents of the directory, so the operation depends on
the permissions of the directory, not of the file. For this same
-reason, @command{sed} does not let you use @option{-i} on a writeable file
+reason, @command{sed} does not let you use @option{-i} on a writable file
in a read-only directory, and will break hard or symbolic links when
@option{-i} is used on such a file.
@@ -3039,1297 +4721,13 @@ the @env{LC_COLLATE} and @env{LC_CTYPE} environment variables to @samp{C}.
@end table
-@node Extended regexps
-@appendix Extended regular expressions
-@cindex Extended regular expressions, syntax
-
-The only difference between basic and extended regular expressions is in
-the behavior of a few characters: @samp{?}, @samp{+}, parentheses,
-braces (@samp{@{@}}), and @samp{|}. While basic regular expressions
-require these to be escaped if you want them to behave as special
-characters, when using extended regular expressions you must escape
-them if you want them @emph{to match a literal character}. @samp{|}
-is special here because @samp{\|} is a GNU extension -- standard
-basic regular expressions do not provide its functionality.
-
-@noindent
-Examples:
-@table @code
-@item abc?
-becomes @samp{abc\?} when using extended regular expressions. It matches
-the literal string @samp{abc?}.
-
-@item c\+
-becomes @samp{c+} when using extended regular expressions. It matches
-one or more @samp{c}s.
-
-@item a\@{3,\@}
-becomes @samp{a@{3,@}} when using extended regular expressions. It matches
-three or more @samp{a}s.
-
-@item \(abc\)\@{2,3\@}
-becomes @samp{(abc)@{2,3@}} when using extended regular expressions. It
-matches either @samp{abcabc} or @samp{abcabcabc}.
-
-@item \(abc*\)\1
-becomes @samp{(abc*)\1} when using extended regular expressions.
-Backreferences must still be escaped when using extended regular
-expressions.
-@end table
-
-@ifset PERL
-@node Perl regexps
-@appendix Perl-style regular expressions
-@cindex Perl-style regular expressions, syntax
-
-@emph{This part is taken from the @file{pcre.txt} file distributed together
-with the free @sc{pcre} regular expression matcher; it was written by Philip Hazel.}
-
-Perl introduced several extensions to regular expressions, some
-of them incompatible with the syntax of regular expressions
-accepted by Emacs and other @acronym{GNU} tools (whose matcher was
-based on the Emacs matcher). @value{SSED} implements
-both kinds of extensions.
-
-@iftex
-Summarizing, we have:
-
-@itemize @bullet
-@item
-A backslash can introduce several special sequences
-
-@item
-The circumflex, dollar sign, and period characters behave specially
-with regard to new lines
-
-@item
-Strange uses of square brackets are parsed differently
-
-@item
-You can toggle modifiers in the middle of a regular expression
-
-@item
-You can specify that a subpattern does not count when numbering backreferences
-
-@item
-@cindex Greedy regular expression matching
-You can specify greedy or non-greedy matching
-
-@item
-You can have more than ten back references
-
-@item
-You can do complex look aheads and look behinds (in the spirit of
-@code{\b}, but with subpatterns).
-
-@item
-You can often improve performance by avoiding that @command{sed} wastes
-time with backtracking
-
-@item
-You can have if/then/else branches
-
-@item
-You can do recursive matches, for example to look for unbalanced parentheses
-
-@item
-You can have comments and non-significant whitespace, because things can
-get complex...
-@end itemize
-
-Most of these extensions are introduced by the special @code{(?}
-sequence, which gives special meanings to parenthesized groups.
-@end iftex
-@menu
-Other extensions can be roughly subdivided in two categories
-On one hand Perl introduces several more escaped sequences
-(that is, sequences introduced by a backslash). On the other
-hand, it specifies that if a question mark follows an open
-parentheses it should give a special meaning to the parenthesized
-group.
-
-* Backslash:: Introduces special sequences
-* Circumflex/dollar sign/period:: Behave specially with regard to new lines
-* Square brackets:: Are a bit different in strange cases
-* Options setting:: Toggle modifiers in the middle of a regexp
-* Non-capturing subpatterns:: Are not counted when backreferencing
-* Repetition:: Allows for non-greedy matching
-* Backreferences:: Allows for more than 10 back references
-* Assertions:: Allows for complex look ahead matches
-* Non-backtracking subpatterns:: Often gives more performance
-* Conditional subpatterns:: Allows if/then/else branches
-* Recursive patterns:: For example to match parentheses
-* Comments:: Because things can get complex...
-@end menu
-
-@node Backslash
-@appendixsec Backslash
-@cindex Perl-style regular expressions, escaped sequences
-
-There are a few difference in the handling of backslashed
-sequences in Perl mode.
-
-First of all, there are no @code{\o} and @code{\d} sequences.
-@sc{ascii} values for characters can be specified in octal
-with a @code{\@var{xxx}} sequence, where @var{xxx} is a
-sequence of up to three octal digits. If the first digit
-is a zero, the treatment of the sequence is straightforward;
-just note that if the character that follows the escaped digit
-is itself an octal digit, you have to supply three octal digits
-for @var{xxx}. For example @code{\07} is a @sc{bel} character
-rather than a @sc{nul} and a literal @code{7} (this sequence is
-instead represented by @code{\0007}).
-
-@cindex Perl-style regular expressions, backreferences
-The handling of a backslash followed by a digit other than 0
-is complicated. Outside a character class, @command{sed} reads it
-and any following digits as a decimal number. If the number
-is less than 10, or if there have been at least that many
-previous capturing left parentheses in the expression, the
-entire sequence is taken as a back reference. A description
-of how this works is given later, following the discussion
-of parenthesized subpatterns.
-
-Inside a character class, or if the decimal number is
-greater than 9 and there have not been that many capturing
-subpatterns, @command{sed} re-reads up to three octal digits following
-the backslash, and generates a single byte from the
-least significant 8 bits of the value. Any subsequent digits
-stand for themselves. For example:
-
-@example
-\040 @i{@r{is another way of writing a space}}
-\40 @i{@r{is the same, provided there are fewer than 40}}
- @i{@r{previous capturing subpatterns}}
-\7 @i{@r{is always a back reference}}
-\011 @i{@r{is always a tab}}
-\11 @i{@r{might be a back reference, or another way of writing a tab}}
-\0113 @i{@r{is a tab followed by the character @samp{3}}}
-\113 @i{@r{is the character with octal code 113 (since there}}
- @i{@r{can be no more than 99 back references)}}
-\377 @i{@r{is a byte consisting entirely of 1 bits (@sc{ascii} 255)}}
-\81 @i{@r{is either a back reference, or a binary zero}}
- @i{@r{followed by the two characters @samp{81}}}
-@end example
-
-Note that octal values of 100 or greater must not be introduced
-by a leading zero, because no more than three octal
-digits are ever read. Note that this applies only to the LHS
-pattern; it is not possible yet to specify more than 9 backreferences
-on the RHS of the `s' command.
-
-All the sequences that define a single byte value can be
-used both inside and outside character classes. In addition,
-inside a character class, the sequence @code{\b} is interpreted
-as the backspace character (hex 08). Outside a character
-class it has a different meaning (see below).
-
-In addition, there are four additional escapes specifying
-generic character classes (like @code{\w} and @code{\W} do):
-
-@cindex Perl-style regular expressions, character classes
-@table @samp
-@item \d
-Matches any decimal digit
-
-@item \D
-Matches any character that is not a decimal digit
-@end table
-
-In Perl mode, these character type sequences can appear both inside and
-outside character classes. Instead, in @sc{posix} mode these sequences
-(as well as @code{\w} and @code{\W}) are treated as two literal characters
-(a backslash and a letter) inside square brackets.
-
-Escaped sequences specifying assertions are also different in
-Perl mode. An assertion specifies a condition that has to be met
-at a particular point in a match, without consuming any
-characters from the subject string. The use of subpatterns
-for more complicated assertions is described below. The
-backslashed assertions are
-
-@cindex Perl-style regular expressions, assertions
-@table @samp
-@item \b
-Asserts that the point is at a word boundary.
-A word boundary is a position in the subject string where
-the current character and the previous character do not both
-match @code{\w} or @code{\W} (i.e. one matches @code{\w} and
-the other matches @code{\W}), or the start or end of the string
-if the first or last character matches @code{\w}, respectively.
-
-@item \B
-Asserts that the point is not at a word boundary.
-
-@item \A
-Asserts the matcher is at the start of pattern space (independent
-of multiline mode).
-
-@item \Z
-Asserts the matcher is at the end of pattern space,
-or at a newline before the end of pattern space (independent of
-multiline mode)
-
-@item \z
-Asserts the matcher is at the end of pattern space (independent
-of multiline mode)
-@end table
-
-These assertions may not appear in character classes (but
-note that @code{\b} has a different meaning, namely the
-backspace character, inside a character class).
-Note that Perl mode does not support directly assertions
-for the beginning and the end of word; the @acronym{GNU} extensions
-@code{\<} and @code{\>} achieve this purpose in @sc{posix} mode
-instead.
-
-The @code{\A}, @code{\Z}, and @code{\z} assertions differ
-from the traditional circumflex and dollar sign (described below)
-in that they only ever match at the very start and end of the
-subject string, whatever options are set; in particular @code{\A}
-and @code{\z} are the same as the @acronym{GNU} extensions
-@code{\`} and @code{\'} that are active in @sc{posix} mode.
-
-@node Circumflex/dollar sign/period
-@appendixsec Circumflex, dollar sign, period
-@cindex Perl-style regular expressions, newlines
-
-Outside a character class, in the default matching mode, the
-circumflex character is an assertion which is true only if
-the current matching point is at the start of the subject
-string. Inside a character class, the circumflex has an entirely
-different meaning (see below).
-
-The circumflex need not be the first character of the pattern if
-a number of alternatives are involved, but it should be the
-first thing in each alternative in which it appears if the
-pattern is ever to match that branch. If all possible alternatives,
-start with a circumflex, that is, if the pattern is
-constrained to match only at the start of the subject, it is
-said to be an @dfn{anchored} pattern. (There are also other constructs
-structs that can cause a pattern to be anchored.)
-
-A dollar sign is an assertion which is true only if the
-current matching point is at the end of the subject string,
-or immediately before a newline character that is the last
-character in the string (by default). A dollar sign need not be the
-last character of the pattern if a number of alternatives
-are involved, but it should be the last item in any branch
-in which it appears. A dollar sign has no special meaning in a
-character class.
-
-@cindex Perl-style regular expressions, multiline
-The meanings of the circumflex and dollar sign characters are
-changed if the @code{M} modifier option is used. When this is
-the case, they match immediately after and immediately
-before an internal @code{\n} character, respectively, in addition
-to matching at the start and end of the subject string. For
-example, the pattern @code{/^abc$/} matches the subject string
-@samp{def\nabc} in multiline mode, but not otherwise. Consequently,
-patterns that are anchored in single line mode
-because all branches start with @code{^} are not anchored in
-multiline mode.
-
-@cindex Perl-style regular expressions, multiline
-Note that the sequences @code{\A}, @code{\Z}, and @code{\z}
-can be used to match the start and end of the subject in both
-modes, and if all branches of a pattern start with @code{\A}
-is it always anchored, whether the @code{M} modifier is set or not.
-
-@cindex Perl-style regular expressions, single line
-Outside a character class, a dot in the pattern matches any
-one character in the subject, including a non-printing character,
-but not (by default) newline. If the @code{S} modifier is used,
-dots match newlines as well. Actually, the handling of
-dot is entirely independent of the handling of circumflex
-and dollar sign, the only relationship being that they both
-involve newline characters. Dot has no special meaning in a
-character class.
-
-@node Square brackets
-@appendixsec Square brackets
-@cindex Perl-style regular expressions, character classes
-
-An opening square bracket introduces a character class, terminated
-by a closing square bracket. A closing square bracket on its own
-is not special. If a closing square bracket is required as a
-member of the class, it should be the first data character in
-the class (after an initial circumflex, if present) or escaped with a backslash.
-
-A character class matches a single character in the subject;
-the character must be in the set of characters defined by
-the class, unless the first character in the class is a circumflex,
-in which case the subject character must not be in
-the set defined by the class. If a circumflex is actually
-required as a member of the class, ensure it is not the
-first character, or escape it with a backslash.
-
-For example, the character class [aeiou] matches any lower
-case vowel, while [^aeiou] matches any character that is not
-a lower case vowel. Note that a circumflex is just a convenient
-venient notation for specifying the characters which are in
-the class by enumerating those that are not. It is not an
-assertion: it still consumes a character from the subject
-string, and fails if the current pointer is at the end of
-the string.
-
-@cindex Perl-style regular expressions, case-insensitive
-When caseless matching is set, any letters in a class
-represent both their upper case and lower case versions, so
-for example, a caseless @code{[aeiou]} matches uppercase
-and lowercase @samp{A}s, and a caseless @code{[^aeiou]}
-does not match @samp{A}, whereas a case-sensitive version would.
-
-@cindex Perl-style regular expressions, single line
-@cindex Perl-style regular expressions, multiline
-The newline character is never treated in any special way in
-character classes, whatever the setting of the @code{S} and
-@code{M} options (modifiers) is. A class such as @code{[^a]} will
-always match a newline.
-
-The minus (hyphen) character can be used to specify a range
-of characters in a character class. For example, @code{[d-m]}
-matches any letter between d and m, inclusive. If a minus
-character is required in a class, it must be escaped with a
-backslash or appear in a position where it cannot be interpreted
-as indicating a range, typically as the first or last
-character in the class.
-
-It is not possible to have the literal character @code{]} as the
-end character of a range. A pattern such as @code{[W-]46]} is
-interpreted as a class of two characters (@code{W} and @code{-})
-followed by a literal string @code{46]}, so it would match
-@samp{W46]} or @samp{-46]}. However, if the @code{]} is escaped
-with a backslash it is interpreted as the end of range, so
-@code{[W-\]46]} is interpreted as a single class containing a
-range followed by two separate characters. The octal or
-hexadecimal representation of @code{]} can also be used to end a range.
-
-Ranges operate in @sc{ascii} collating sequence. They can also be
-used for characters specified numerically, for example
-@code{[\000-\037]}. If a range that includes letters is used when
-caseless matching is set, it matches the letters in either
-case. For example, a caseless @code{[W-c]} is equivalent to
-@code{[][\^_`wxyzabc]}, matched caselessly, and if character
-tables for the French locale are in use, @code{[\xc8-\xcb]}
-matches accented E characters in both cases.
-
-Unlike in @sc{posix} mode, the character types @code{\d},
-@code{\D}, @code{\s}, @code{\S}, @code{\w}, and @code{\W}
-may also appear in a character class, and add the characters
-that they match to the class. For example, @code{[\dABCDEF]} matches any
-hexadecimal digit. A circumflex can conveniently be used
-with the upper case character types to specify a more restricted
-set of characters than the matching lower case type.
-For example, the class @code{[^\W_]} matches any letter or digit,
-but not underscore.
-
-All non-alphameric characters other than @code{\}, @code{-},
-@code{^} (at the start) and the terminating @code{]}
-are non-special in character classes, but it does no harm
-if they are escaped.
-
-Perl 5.6 supports the @sc{posix} notation for character classes, which
-uses names enclosed by @code{[:} and @code{:]} within the enclosing
-square brackets, and @value{SSED} supports this notation as well.
-For example,
-
-@example
-[01[:alpha:]%]
-@end example
-
-@noindent
-matches @samp{0}, @samp{1}, any alphabetic character, or @samp{%}.
-The supported class names are
-
-@table @code
-@item alnum
-Matches letters and digits
-
-@item alpha
-Matches letters
-
-@item ascii
-Matches character codes 0 - 127
-
-@item cntrl
-Matches control characters
-
-@item digit
-Matches decimal digits (same as \d)
-
-@item graph
-Matches printing characters, excluding space
-
-@item lower
-Matches lower case letters
-
-@item print
-Matches printing characters, including space
-
-@item punct
-Matches printing characters, excluding letters and digits
-
-@item space
-Matches white space (same as \s)
-
-@item upper
-Matches upper case letters
-
-@item word
-Matches ``word'' characters (same as \w)
-
-@item xdigit
-Matches hexadecimal digits
-@end table
-
-The names @code{ascii} and @code{word} are extensions valid only in
-Perl mode. Another Perl extension is negation, which is
-indicated by a circumflex character after the colon. For example,
-
-@example
-[12[:^digit:]]
-@end example
-
-@noindent
-matches @samp{1}, @samp{2}, or any non-digit.
-
-@node Options setting
-@appendixsec Options setting
-@cindex Perl-style regular expressions, toggling options
-@cindex Perl-style regular expressions, case-insensitive
-@cindex Perl-style regular expressions, multiline
-@cindex Perl-style regular expressions, single line
-@cindex Perl-style regular expressions, extended
-
-The settings of the @code{I}, @code{M}, @code{S}, @code{X}
-modifiers can be changed from within the pattern by
-a sequence of Perl option letters enclosed between @code{(?}
-and @code{)}. The option letters must be lowercase.
-
-For example, @code{(?im)} sets caseless, multiline matching. It is
-also possible to unset these options by preceding the letter
-with a hyphen; you can also have combined settings and unsettings:
-@code{(?im-sx)} sets caseless and multiline matching,
-while unsets single line matching (for dots) and extended
-whitespace interpretation. If a letter appears both before
-and after the hyphen, the option is unset.
-
-The scope of these option changes depends on where in the
-pattern the setting occurs. For settings that are outside
-any subpattern (defined below), the effect is the same as if
-the options were set or unset at the start of matching. The
-following patterns all behave in exactly the same way:
-
-@example
-(?i)abc
-a(?i)bc
-ab(?i)c
-abc(?i)
-@end example
-
-which in turn is the same as specifying the pattern abc with
-the @code{I} modifier. In other words, ``top level'' settings
-apply to the whole pattern (unless there are other
-changes inside subpatterns). If there is more than one setting
-of the same option at top level, the rightmost setting
-is used.
-
-If an option change occurs inside a subpattern, the effect
-is different. This is a change of behaviour in Perl 5.005.
-An option change inside a subpattern affects only that part
-of the subpattern @emph{that follows} it, so
-
-@example
-(a(?i)b)c
-@end example
-
-@noindent
-matches abc and aBc and no other strings (assuming
-case-sensitive matching is used). By this means, options can
-be made to have different settings in different parts of the
-pattern. Any changes made in one alternative do carry on
-into subsequent branches within the same subpattern. For
-example,
-
-@example
-(a(?i)b|c)
-@end example
-
-@noindent
-matches @samp{ab}, @samp{aB}, @samp{c}, and @samp{C},
-even though when matching @samp{C} the first branch is
-abandoned before the option setting.
-This is because the effects of option settings happen at
-compile time. There would be some very weird behaviour otherwise.
-
-@ignore
-There are two PCRE-specific options PCRE_UNGREEDY and PCRE_EXTRA
-that can be changed in the same way as the Perl-compatible options by
-using the characters U and X respectively. The (?X) flag
-setting is special in that it must always occur earlier in
-the pattern than any of the additional features it turns on,
-even when it is at top level. It is best put at the start.
-@end ignore
-
-
-@node Non-capturing subpatterns
-@appendixsec Non-capturing subpatterns
-@cindex Perl-style regular expressions, non-capturing subpatterns
-
-Marking part of a pattern as a subpattern does two things.
-On one hand, it localizes a set of alternatives; on the other
-hand, it sets up the subpattern as a capturing subpattern (as
-defined above). The subpattern can be backreferenced and
-referenced in the right side of @code{s} commands.
-
-For example, if the string @samp{the red king} is matched against
-the pattern
-
-@example
-the ((red|white) (king|queen))
-@end example
-
-@noindent
-the captured substrings are @samp{red king}, @samp{red},
-and @samp{king}, and are numbered 1, 2, and 3.
-
-The fact that plain parentheses fulfil two functions is not
-always helpful. There are often times when a grouping
-subpattern is required without a capturing requirement. If an
-opening parenthesis is followed by @code{?:}, the subpattern does
-not do any capturing, and is not counted when computing the
-number of any subsequent capturing subpatterns. For example,
-if the string @samp{the white queen} is matched against the pattern
-
-@example
-the ((?:red|white) (king|queen))
-@end example
-
-@noindent
-the captured substrings are @samp{white queen} and @samp{queen},
-and are numbered 1 and 2. The maximum number of captured
-substrings is 99, while the maximum number of all subpatterns,
-both capturing and non-capturing, is 200.
-
-As a convenient shorthand, if any option settings are
-equired at the start of a non-capturing subpattern, the
-option letters may appear between the @code{?} and the
-@code{:}. Thus the two patterns
-
-@example
-(?i:saturday|sunday)
-(?:(?i)saturday|sunday)
-@end example
-
-@noindent
-match exactly the same set of strings. Because alternative
-branches are tried from left to right, and options are not
-reset until the end of the subpattern is reached, an option
-setting in one branch does affect subsequent branches, so
-the above patterns match @samp{SUNDAY} as well as @samp{Saturday}.
-
-
-@node Repetition
-@appendixsec Repetition
-@cindex Perl-style regular expressions, repetitions
-
-Repetition is specified by quantifiers, which can follow any
-of the following items:
-
-@itemize @bullet
-@item
-a single character, possibly escaped
-
-@item
-the @code{.} special character
-
-@item
-a character class
-
-@item
-a back reference (see next section)
-
-@item
-a parenthesized subpattern (unless it is an assertion; @pxref{Assertions})
-@end itemize
-
-The general repetition quantifier specifies a minimum and
-maximum number of permitted matches, by giving the two
-numbers in curly brackets (braces), separated by a comma.
-The numbers must be less than 65536, and the first must be
-less than or equal to the second. For example:
-
-@example
-z@{2,4@}
-@end example
-
-@noindent
-matches @samp{zz}, @samp{zzz}, or @samp{zzzz}. A closing brace on its own
-is not a special character. If the second number is omitted,
-but the comma is present, there is no upper limit; if the
-second number and the comma are both omitted, the quantifier
-specifies an exact number of required matches. Thus
-
-@example
-[aeiou]@{3,@}
-@end example
-
-@noindent
-matches at least 3 successive vowels, but may match many
-more, while
-
-@example
-\d@{8@}
-@end example
-
-@noindent
-matches exactly 8 digits. An opening curly bracket that
-appears in a position where a quantifier is not allowed, or
-one that does not match the syntax of a quantifier, is taken
-as a literal character. For example, @{,6@} is not a quantifier,
-but a literal string of four characters.@footnote{It
-raises an error if @option{-R} is not used.}
-
-The quantifier @samp{@{0@}} is permitted, causing the expression to
-behave as if the previous item and the quantifier were not
-present.
-
-For convenience (and historical compatibility) the three
-most common quantifiers have single-character abbreviations:
-
-@table @code
-@item *
-is equivalent to @{0,@}
-
-@item +
-is equivalent to @{1,@}
-
-@item ?
-is equivalent to @{0,1@}
-@end table
-
-It is possible to construct infinite loops by following a
-subpattern that can match no characters with a quantifier
-that has no upper limit, for example:
-
-@example
-(a?)*
-@end example
-
-Earlier versions of Perl used to give an error at
-compile time for such patterns. However, because there are
-cases where this can be useful, such patterns are now
-accepted, but if any repetition of the subpattern does in
-fact match no characters, the loop is forcibly broken.
-@cindex Greedy regular expression matching
-@cindex Perl-style regular expressions, stingy repetitions
-By default, the quantifiers are @dfn{greedy} like in @sc{posix}
-mode, that is, they match as much as possible (up to the maximum
-number of permitted times), without causing the rest of the
-pattern to fail. The classic example of where this gives problems
-is in trying to match comments in C programs. These appear between
-the sequences @code{/*} and @code{*/} and within the sequence, individual
-@code{*} and @code{/} characters may appear. An attempt to match C
-comments by applying the pattern
-
-@example
-/\*.*\*/
-@end example
-
-@noindent
-to the string
-
-@example
-/* first command */ not comment /* second comment */
-@end example
-
-@noindent
-
-fails, because it matches the entire string owing to the
-greediness of the @code{.*} item.
-
-However, if a quantifier is followed by a question mark, it
-ceases to be greedy, and instead matches the minimum number
-of times possible, so the pattern @code{/\*.*?\*/}
-does the right thing with the C comments. The meaning of the
-various quantifiers is not otherwise changed, just the preferred
-number of matches. Do not confuse this use of question
-mark with its use as a quantifier in its own right.
-Because it has two uses, it can sometimes appear doubled, as in
-
-@example
-\d??\d
-@end example
-
-which matches one digit by preference, but can match two if
-that is the only way the rest of the pattern matches.
-
-Note that greediness does not matter when specifying addresses,
-but can be nevertheless used to improve performance.
-
-@ignore
-If the PCRE_UNGREEDY option is set (an option which is not
-available in Perl), the quantifiers are not greedy by
-default, but individual ones can be made greedy by following
-them with a question mark. In other words, it inverts the
-default behaviour.
-@end ignore
-
-When a parenthesized subpattern is quantified with a minimum
-repeat count that is greater than 1 or with a limited maximum,
-more store is required for the compiled pattern, in
-proportion to the size of the minimum or maximum.
-
-@cindex Perl-style regular expressions, single line
-If a pattern starts with @code{.*} or @code{.@{0,@}} and the
-@code{S} modifier is used, the pattern is implicitly anchored,
-because whatever follows will be tried against every character
-position in the subject string, so there is no point in
-retrying the overall match at any position after the first.
-PCRE treats such a pattern as though it were preceded by \A.
-
-When a capturing subpattern is repeated, the value captured
-is the substring that matched the final iteration. For example,
-after
-
-@example
-(tweedle[dume]@{3@}\s*)+
-@end example
-
-@noindent
-has matched @samp{tweedledum tweedledee} the value of the
-captured substring is @samp{tweedledee}. However, if there are
-nested capturing subpatterns, the corresponding captured
-values may have been set in previous iterations. For example,
-after
-
-@example
-/(a|(b))+/
-@end example
-
-matches @samp{aba}, the value of the second captured substring is
-@samp{b}.
-
-@node Backreferences
-@appendixsec Backreferences
-@cindex Perl-style regular expressions, backreferences
-
-Outside a character class, a backslash followed by a digit
-greater than 0 (and possibly further digits) is a back
-reference to a capturing subpattern earlier (i.e. to its
-left) in the pattern, provided there have been that many
-previous capturing left parentheses.
-
-However, if the decimal number following the backslash is
-less than 10, it is always taken as a back reference, and
-causes an error only if there are not that many capturing
-left parentheses in the entire pattern. In other words, the
-parentheses that are referenced need not be to the left of
-the reference for numbers less than 10. @ref{Backslash}
-for further details of the handling of digits following a backslash.
-
-A back reference matches whatever actually matched the capturing
-subpattern in the current subject string, rather than
-anything matching the subpattern itself. So the pattern
-
-@example
-(sens|respons)e and \1ibility
-@end example
-
-@noindent
-matches @samp{sense and sensibility} and @samp{response and responsibility},
-but not @samp{sense and responsibility}. If caseful
-matching is in force at the time of the back reference, the
-case of letters is relevant. For example,
-
-@example
-((?i)blah)\s+\1
-@end example
-
-@noindent
-matches @samp{blah blah} and @samp{Blah Blah}, but not
-@samp{BLAH blah}, even though the original capturing
-subpattern is matched caselessly.
-
-There may be more than one back reference to the same subpattern.
-Also, if a subpattern has not actually been used in a
-particular match, any back references to it always fail. For
-example, the pattern
-
-@example
-(a|(bc))\2
-@end example
-
-@noindent
-always fails if it starts to match @samp{a} rather than
-@samp{bc}. Because there may be up to 99 back references, all
-digits following the backslash are taken as part of a potential
-back reference number; this is different from what happens
-in @sc{posix} mode. If the pattern continues with a digit
-character, some delimiter must be used to terminate the back
-reference. If the @code{X} modifier option is set, this can be
-whitespace. Otherwise an empty comment can be used, or the
-following character can be expressed in hexadecimal or octal.
-Note that this applies only to the LHS pattern; it is
-not possible yet to specify more than 9 backreferences on the
-RHS of the `s' command.
-
-A back reference that occurs inside the parentheses to which
-it refers fails when the subpattern is first used, so, for
-example, @code{(a\1)} never matches. However, such references
-can be useful inside repeated subpatterns. For example, the
-pattern
-
-@example
-(a|b\1)+
-@end example
-
-@noindent
-matches any number of @samp{a}s and also @samp{aba}, @samp{ababbaa},
-etc. At each iteration of the subpattern, the back reference matches
-the character string corresponding to the previous iteration. In
-order for this to work, the pattern must be such that the first
-iteration does not need to match the back reference. This can be
-done using alternation, as in the example above, or by a
-quantifier with a minimum of zero.
-
-@node Assertions
-@appendixsec Assertions
-@cindex Perl-style regular expressions, assertions
-@cindex Perl-style regular expressions, asserting subpatterns
-
-An assertion is a test on the characters following or
-preceding the current matching point that does not actually
-consume any characters. The simple assertions coded as @code{\b},
-@code{\B}, @code{\A}, @code{\Z}, @code{\z}, @code{^} and @code{$}
-are described above. More complicated assertions are coded as
-subpatterns. There are two kinds: those that look ahead of the
-current position in the subject string, and those that look behind it.
-
-@cindex Perl-style regular expressions, lookahead subpatterns
-An assertion subpattern is matched in the normal way, except
-that it does not cause the current matching position to be
-changed. Lookahead assertions start with @code{(?=} for positive
-assertions and @code{(?!} for negative assertions. For example,
-
-@example
-\w+(?=;)
-@end example
-
-@noindent
-matches a word followed by a semicolon, but does not include
-the semicolon in the match, and
-@example
-foo(?!bar)
-@end example
-
-@noindent
-matches any occurrence of @samp{foo} that is not followed by
-@samp{bar}.
-
-Note that the apparently similar pattern
-
-@example
-(?!foo)bar
-@end example
-
-@noindent
-@cindex Perl-style regular expressions, lookbehind subpatterns
-finds any occurrence of @samp{bar} even if it is preceded by
-@samp{foo}, because the assertion @code{(?!foo)} is always true
-when the next three characters are @samp{bar}. A lookbehind
-assertion is needed to achieve this effect.
-Lookbehind assertions start with @code{(?<=} for positive
-assertions and @code{(?<!} for negative assertions. So,
-
-@example
-(?<!foo)bar
-@end example
-
-achieves the required effect of finding an occurrence of
-@samp{bar} that is not preceded by @samp{foo}. The contents of a
-lookbehind assertion are restricted
-such that all the strings it matches must have a fixed
-length. However, if there are several alternatives, they do
-not all have to have the same fixed length. This is an extension
-compared with Perl 5.005, which requires all branches to match
-the same length of string. Thus
-
-@example
-(?<=dogs|cats|)
-@end example
-
-@noindent
-is permitted, but the apparently equivalent regular expression
-
-@example
-(?<!dogs?|cats?)
-@end example
-
-@noindent
-causes an error at compile time. Branches that match different
-length strings are permitted only at the top level of
-a lookbehind assertion: an assertion such as
-
-@example
-(?<=ab(c|de))
-@end example
-
-@noindent
-is not permitted, because its single top-level branch can
-match two different lengths, but it is acceptable if rewritten
-to use two top-level branches:
-
-@example
-(?<=abc|abde)
-@end example
-
-All this is required because lookbehind assertions simply
-move the current position back by the alternative's fixed
-width and then try to match. If there are
-insufficient characters before the current position, the
-match is deemed to fail. Lookbehinds, in conjunction with
-non-backtracking subpatterns can be particularly useful for
-matching at the ends of strings; an example is given at the end
-of the section on non-backtracking subpatterns.
-
-Several assertions (of any sort) may occur in succession.
-For example,
-
-@example
-(?<=\d@{3@})(?<!999)foo
-@end example
-
-@noindent
-matches @samp{foo} preceded by three digits that are not @samp{999}.
-Notice that each of the assertions is applied independently
-at the same point in the subject string. First there is a
-check that the previous three characters are all digits, and
-then there is a check that the same three characters are not
-@samp{999}. This pattern does not match @samp{foo} preceded by six
-characters, the first of which are digits and the last three
-of which are not @samp{999}. For example, it doesn't match
-@samp{123abcfoo}. A pattern to do that is
-
-@example
-(?<=\d@{3@}...)(?<!999)foo
-@end example
-
-@noindent
-This time the first assertion looks at the preceding six
-characters, checking that the first three are digits, and
-then the second assertion checks that the preceding three
-characters are not @samp{999}. Actually, assertions can be
-nested in any combination, so one can write this as
-
-@example
-(?<=\d@{3@}(?!999)...)foo
-@end example
-
-or
-
-@example
-(?<=\d@{3@}...(?<!999))foo
-@end example
-
-@noindent
-both of which might be considered more readable.
-
-Assertion subpatterns are not capturing subpatterns, and may
-not be repeated, because it makes no sense to assert the
-same thing several times. If any kind of assertion contains
-capturing subpatterns within it, these are counted for the
-purposes of numbering the capturing subpatterns in the whole
-pattern. However, substring capturing is carried out only
-for positive assertions, because it does not make sense for
-negative assertions.
-
-Assertions count towards the maximum of 200 parenthesized
-subpatterns.
-
-@node Non-backtracking subpatterns
-@appendixsec Non-backtracking subpatterns
-@cindex Perl-style regular expressions, non-backtracking subpatterns
-
-With both maximizing and minimizing repetition, failure of
-what follows normally causes the repeated item to be evaluated
-again to see if a different number of repeats allows the
-rest of the pattern to match. Sometimes it is useful to
-prevent this, either to change the nature of the match, or
-to cause it fail earlier than it otherwise might, when the
-author of the pattern knows there is no point in carrying
-on.
-
-Consider, for example, the pattern @code{\d+foo} when applied to
-the subject line
-
-@example
-123456bar
-@end example
-
-After matching all 6 digits and then failing to match @samp{foo},
-the normal action of the matcher is to try again with only 5
-digits matching the @code{\d+} item, and then with 4, and so on,
-before ultimately failing. Non-backtracking subpatterns
-provide the means for specifying that once a portion of the
-pattern has matched, it is not to be re-evaluated in this way,
-so the matcher would give up immediately on failing to match
-@samp{foo} the first time. The notation is another kind of special
-parenthesis, starting with @code{(?>} as in this example:
-
-@example
-(?>\d+)bar
-@end example
-
-This kind of parenthesis ``locks up'' the part of the pattern
-it contains once it has matched, and a failure further into
-the pattern is prevented from backtracking into it.
-Backtracking past it to previous items, however, works as
-normal.
-
-Non-backtracking subpatterns are not capturing subpatterns. Simple
-cases such as the above example can be thought of as a maximizing
-repeat that must swallow everything it can. So,
-while both @code{\d+} and @code{\d+?} are prepared to adjust the number of
-digits they match in order to make the rest of the pattern
-match, @code{(?>\d+)} can only match an entire sequence of digits.
-
-This construction can of course contain arbitrarily complicated
-subpatterns, and it can be nested.
-
-@cindex Perl-style regular expressions, lookbehind subpatterns
-Non-backtracking subpatterns can be used in conjunction with look-behind
-assertions to specify efficient matching at the end
-of the subject string. Consider a simple pattern such as
-
-@example
-abcd$
-@end example
-
-@noindent
-when applied to a long string which does not match. Because
-matching proceeds from left to right, @command{sed} will look for
-each @samp{a} in the subject and then see if what follows matches
-the rest of the pattern. If the pattern is specified as
-
-@example
-^.*abcd$
-@end example
-
-@noindent
-the initial @code{.*} matches the entire string at first, but when
-this fails (because there is no following @samp{a}), it backtracks
-to match all but the last character, then all but the
-last two characters, and so on. Once again the search for
-@samp{a} covers the entire string, from right to left, so we are
-no better off. However, if the pattern is written as
-
-@example
-^(?>.*)(?<=abcd)
-@end example
-
-there can be no backtracking for the .* item; it can match
-only the entire string. The subsequent lookbehind assertion
-does a single test on the last four characters. If it fails,
-the match fails immediately. For long strings, this approach
-makes a significant difference to the processing time.
-
-When a pattern contains an unlimited repeat inside a subpattern
-that can itself be repeated an unlimited number of
-times, the use of a once-only subpattern is the only way to
-avoid some failing matches taking a very long time
-indeed.@footnote{Actually, the matcher embedded in @value{SSED}
-tries to do something for this in the simplest cases,
-like @code{([^b]*b)*}. These cases are actually quite
-common: they happen for example in a regular expression
-like @code{\/\*([^*]*\*)*\/} which matches C comments.}
-
-The pattern
-
-@example
-(\D+|<\d+>)*[!?]
-@end example
-
-([^0-9<]+<(\d+>)?)*[!?]
-
-@noindent
-matches an unlimited number of substrings that either consist
-of non-digits, or digits enclosed in angular brackets, followed by
-an exclamation or question mark. When it matches, it runs quickly.
-However, if it is applied to
-
-@example
-aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
-@end example
-
-@noindent
-it takes a long time before reporting failure. This is
-because the string can be divided between the two repeats in
-a large number of ways, and all have to be tried.@footnote{The
-example used @code{[!?]} rather than a single character at the end,
-because both @value{SSED} and Perl have an optimization that allows
-for fast failure when a single character is used. They
-remember the last single character that is required for a
-match, and fail early if it is not present in the string.}
-
-If the pattern is changed to
-
-@example
-((?>\D+)|<\d+>)*[!?]
-@end example
-
-sequences of non-digits cannot be broken, and failure happens
-quickly.
-
-@node Conditional subpatterns
-@appendixsec Conditional subpatterns
-@cindex Perl-style regular expressions, conditional subpatterns
-
-It is possible to cause the matching process to obey a subpattern
-conditionally or to choose between two alternative
-subpatterns, depending on the result of an assertion, or
-whether a previous capturing subpattern matched or not. The
-two possible forms of conditional subpattern are
-
-@example
-(?(@var{condition})@var{yes-pattern})
-(?(@var{condition})@var{yes-pattern}|@var{no-pattern})
-@end example
-
-If the condition is satisfied, the yes-pattern is used; otherwise
-the no-pattern (if present) is used. If there are more than two
-alternatives in the subpattern, a compile-time error occurs.
-
-There are two kinds of condition. If the text between the
-parentheses consists of a sequence of digits, the condition
-is satisfied if the capturing subpattern of that number has
-previously matched. The number must be greater than zero.
-Consider the following pattern, which contains non-significant
-white space to make it more readable (assume the @code{X} modifier)
-and to divide it into three parts for ease of discussion:
-
-@example
-( \( )? [^()]+ (?(1) \) )
-@end example
-
-The first part matches an optional opening parenthesis, and
-if that character is present, sets it as the first captured
-substring. The second part matches one or more characters
-that are not parentheses. The third part is a conditional
-subpattern that tests whether the first set of parentheses
-matched or not. If they did, that is, if subject started
-with an opening parenthesis, the condition is true, and so
-the yes-pattern is executed and a closing parenthesis is
-required. Otherwise, since no-pattern is not present, the
-subpattern matches nothing. In other words, this pattern
-matches a sequence of non-parentheses, optionally enclosed
-in parentheses.
-
-@cindex Perl-style regular expressions, lookahead subpatterns
-If the condition is not a sequence of digits, it must be an
-assertion. This may be a positive or negative lookahead or
-lookbehind assertion. Consider this pattern, again containing
-non-significant white space, and with the two alternatives
-on the second line:
-
-@example
-(?(?=...[a-z])
- \d\d-[a-z]@{3@}-\d\d |
- \d\d-\d\d-\d\d )
-@end example
-
-The condition is a positive lookahead assertion that matches
-a letter that is three characters away from the current point.
-If a letter is found, the subject is matched against the first
-alternative @samp{@var{dd}-@var{aaa}-@var{dd}} (where @var{aaa} are
-letters and @var{dd} are digits); otherwise it is matched against
-the second alternative, @samp{@var{dd}-@var{dd}-@var{dd}}.
-
-
-@node Recursive patterns
-@appendixsec Recursive patterns
-@cindex Perl-style regular expressions, recursive patterns
-@cindex Perl-style regular expressions, recursion
-
-Consider the problem of matching a string in parentheses,
-allowing for unlimited nested parentheses. Without the use
-of recursion, the best that can be done is to use a pattern
-that matches up to some fixed depth of nesting. It is not
-possible to handle an arbitrary nesting depth. Perl 5.6 has
-provided an experimental facility that allows regular
-expressions to recurse (amongst other things). It does this
-by interpolating Perl code in the expression at run time,
-and the code can refer to the expression itself. A Perl pattern
-tern to solve the parentheses problem can be created like
-this:
-
-@example
-$re = qr@{\( (?: (?>[^()]+) | (?p@{$re@}) )* \)@}x;
-@end example
-
-The @code{(?p@{...@})} item interpolates Perl code at run time,
-and in this case refers recursively to the pattern in which it
-appears. Obviously, @command{sed} cannot support the interpolation of
-Perl code. Instead, the special item @code{(?R)} is provided for
-the specific case of recursion. This pattern solves the
-parentheses problem (assume the @code{X} modifier option is used
-so that white space is ignored):
-
-@example
-\( ( (?>[^()]+) | (?R) )* \)
-@end example
-
-First it matches an opening parenthesis. Then it matches any
-number of substrings which can either be a sequence of
-non-parentheses, or a recursive match of the pattern itself
-(i.e. a correctly parenthesized substring). Finally there is
-a closing parenthesis.
-
-This particular example pattern contains nested unlimited
-repeats, and so the use of a non-backtracking subpattern for
-matching strings of non-parentheses is important when applying
-the pattern to strings that do not match. For example, when
-it is applied to
-
-@example
-(aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa()
-@end example
-
-it yields a ``no match'' response quickly. However, if a
-standard backtracking subpattern is not used, the match runs
-for a very long time indeed because there are so many different
-ways the @code{+} and @code{*} repeats can carve up the subject,
-and all have to be tested before failure can be reported.
-
-The values set for any capturing subpatterns are those from
-the outermost level of the recursion at which the subpattern
-value is set. If the pattern above is matched against
-
-@example
-(ab(cd)ef)
-@end example
+@page
+@node GNU Free Documentation License
+@appendix GNU Free Documentation License
-@noindent
-the value for the capturing parentheses is @samp{ef}, which is
-the last value taken on at the top level.
-
-@node Comments
-@appendixsec Comments
-@cindex Perl-style regular expressions, comments
-
-The sequence (?# marks the start of a comment which continues
-ues up to the next closing parenthesis. Nested parentheses
-are not permitted. The characters that make up a comment
-play no part in the pattern matching at all.
-
-@cindex Perl-style regular expressions, extended
-If the @code{X} modifier option is used, an unescaped @code{#} character
-outside a character class introduces a comment that continues
-up to the next newline character in the pattern.
-@end ifset
+@include fdl.texi
@page
diff --git a/doc/sed.x b/doc/sed.x
index 433d52f..401bd88 100644
--- a/doc/sed.x
+++ b/doc/sed.x
@@ -4,7 +4,7 @@ sed \- a Stream EDitor
.nf
sed [-V] [--version] [--help] [-n] [--quiet] [--silent]
[-l N] [--line-length=N] [-u] [--unbuffered]
- [-r] [--regexp-extended]
+ [-E] [-r] [--regexp-extended]
[-e script] [--expression=script]
[-f script-file] [--file=script-file]
[script-if-no-other-script]
@@ -312,6 +312,9 @@ and similarly for
.BR \ea ,
.BR \et ,
and other sequences.
+The \fI-E\fP option switches to using extended regular expressions instead;
+the -E option has been supported for years by GNU sed, and is now
+included in POSIX.
[SEE ALSO]
.BR awk (1),
diff --git a/doc/stamp-vti b/doc/stamp-vti
index 0a7839c..cc4d7e0 100644
--- a/doc/stamp-vti
+++ b/doc/stamp-vti
@@ -1,4 +1,4 @@
-@set UPDATED 22 December 2012
-@set UPDATED-MONTH December 2012
-@set EDITION 4.2.2
-@set VERSION 4.2.2
+@set UPDATED 30 December 2016
+@set UPDATED-MONTH December 2016
+@set EDITION 4.3
+@set VERSION 4.3
diff --git a/doc/version.texi b/doc/version.texi
index 0a7839c..cc4d7e0 100644
--- a/doc/version.texi
+++ b/doc/version.texi
@@ -1,4 +1,4 @@
-@set UPDATED 22 December 2012
-@set UPDATED-MONTH December 2012
-@set EDITION 4.2.2
-@set VERSION 4.2.2
+@set UPDATED 30 December 2016
+@set UPDATED-MONTH December 2016
+@set EDITION 4.3
+@set VERSION 4.3
diff --git a/gnulib-tests/Makefile.am b/gnulib-tests/Makefile.am
new file mode 100644
index 0000000..6635f70
--- /dev/null
+++ b/gnulib-tests/Makefile.am
@@ -0,0 +1 @@
+include gnulib.mk
diff --git a/gnulib-tests/Makefile.in b/gnulib-tests/Makefile.in
new file mode 100644
index 0000000..63cf482
--- /dev/null
+++ b/gnulib-tests/Makefile.in
@@ -0,0 +1,4674 @@
+# Makefile.in generated by automake 1.99a from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994-2015 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.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+@SET_MAKE@
+
+# Copyright (C) 2002-2016 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
+# 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 this file. If not, see <http://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
+# contains a configuration script generated by Autoconf, under
+# the same distribution terms as the rest of that program.
+#
+# Generated by gnulib-tool.
+
+
+
+VPATH = @srcdir@
+am__is_gnu_make = { \
+ if test -z '$(MAKELEVEL)'; then \
+ false; \
+ elif test -n '$(MAKE_HOST)'; then \
+ true; \
+ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
+ true; \
+ else \
+ false; \
+ fi; \
+}
+am__make_running_with_option = \
+ case $${target_option-} in \
+ ?) ;; \
+ *) echo "am__make_running_with_option: internal error: invalid" \
+ "target option '$${target_option-}' specified" >&2; \
+ exit 1;; \
+ esac; \
+ has_opt=no; \
+ sane_makeflags=$$MAKEFLAGS; \
+ if $(am__is_gnu_make); then \
+ sane_makeflags=$$MFLAGS; \
+ else \
+ case $$MAKEFLAGS in \
+ *\\[\ \ ]*) \
+ bs=\\; \
+ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
+ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \
+ esac; \
+ fi; \
+ skip_next=no; \
+ strip_trailopt () \
+ { \
+ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
+ }; \
+ for flg in $$sane_makeflags; do \
+ test $$skip_next = yes && { skip_next=no; continue; }; \
+ case $$flg in \
+ *=*|--*) continue;; \
+ -*I) strip_trailopt 'I'; skip_next=yes;; \
+ -*I?*) strip_trailopt 'I';; \
+ -*O) strip_trailopt 'O'; skip_next=yes;; \
+ -*O?*) strip_trailopt 'O';; \
+ -*l) strip_trailopt 'l'; skip_next=yes;; \
+ -*l?*) strip_trailopt 'l';; \
+ -[dEDm]) skip_next=yes;; \
+ -[JT]) skip_next=yes;; \
+ esac; \
+ case $$flg in \
+ *$$target_option*) has_opt=yes; break;; \
+ esac; \
+ done; \
+ test $$has_opt = yes
+am__make_dryrun = (target_option=n; $(am__make_running_with_option))
+am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
+pkgdatadir = $(datadir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+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 \
+ test-btowc2.sh test-c-ctype$(EXEEXT) test-c-strcase.sh \
+ test-canonicalize-lgpl$(EXEEXT) test-chdir$(EXEEXT) \
+ test-close$(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-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) \
+ test-fputc$(EXEEXT) test-fread$(EXEEXT) test-freading$(EXEEXT) \
+ test-fseek.sh test-fseek2.sh test-fseeko.sh test-fseeko2.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-intprops$(EXEEXT) test-inttypes$(EXEEXT) \
+ test-isblank$(EXEEXT) test-langinfo$(EXEEXT) \
+ test-limits-h$(EXEEXT) test-link$(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-string$(EXEEXT) test-strverscmp$(EXEEXT) \
+ test-symlink$(EXEEXT) test-sys_stat$(EXEEXT) \
+ test-sys_time$(EXEEXT) test-sys_types$(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 \
+ test-version-etc.sh test-wchar$(EXEEXT) test-wcrtomb.sh \
+ 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-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) \
+ 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-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) \
+ test-freading$(EXEEXT) test-fseek$(EXEEXT) \
+ test-fseeko$(EXEEXT) test-fseeko3$(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-intprops$(EXEEXT) test-inttypes$(EXEEXT) \
+ test-isblank$(EXEEXT) test-langinfo$(EXEEXT) \
+ test-limits-h$(EXEEXT) test-link$(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-setlocale1$(EXEEXT) test-setlocale2$(EXEEXT) \
+ 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-string$(EXEEXT) \
+ test-strverscmp$(EXEEXT) test-symlink$(EXEEXT) \
+ test-sys_stat$(EXEEXT) test-sys_time$(EXEEXT) \
+ test-sys_types$(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)
+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/btowc.m4 $(top_srcdir)/m4/builtin-expect.m4 \
+ $(top_srcdir)/m4/canonicalize.m4 \
+ $(top_srcdir)/m4/close-stream.m4 $(top_srcdir)/m4/close.m4 \
+ $(top_srcdir)/m4/closedir.m4 $(top_srcdir)/m4/closeout.m4 \
+ $(top_srcdir)/m4/codeset.m4 $(top_srcdir)/m4/configmake.m4 \
+ $(top_srcdir)/m4/ctype.m4 $(top_srcdir)/m4/dirent_h.m4 \
+ $(top_srcdir)/m4/dirfd.m4 $(top_srcdir)/m4/dirname.m4 \
+ $(top_srcdir)/m4/double-slash-root.m4 $(top_srcdir)/m4/dup2.m4 \
+ $(top_srcdir)/m4/eealloc.m4 $(top_srcdir)/m4/environ.m4 \
+ $(top_srcdir)/m4/errno_h.m4 $(top_srcdir)/m4/error.m4 \
+ $(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/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 \
+ $(top_srcdir)/m4/getprogname.m4 $(top_srcdir)/m4/gettext.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/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/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 \
+ $(top_srcdir)/m4/mbrlen.m4 $(top_srcdir)/m4/mbrtowc.m4 \
+ $(top_srcdir)/m4/mbsinit.m4 $(top_srcdir)/m4/mbstate_t.m4 \
+ $(top_srcdir)/m4/mbtowc.m4 $(top_srcdir)/m4/memchr.m4 \
+ $(top_srcdir)/m4/memrchr.m4 $(top_srcdir)/m4/minmax.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/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/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/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/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/string_h.m4 \
+ $(top_srcdir)/m4/strverscmp.m4 $(top_srcdir)/m4/symlink.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/version-etc.m4 \
+ $(top_srcdir)/m4/warn-on-use.m4 $(top_srcdir)/m4/warnings.m4 \
+ $(top_srcdir)/m4/wchar_h.m4 $(top_srcdir)/m4/wchar_t.m4 \
+ $(top_srcdir)/m4/wcrtomb.m4 $(top_srcdir)/m4/wctob.m4 \
+ $(top_srcdir)/m4/wctomb.m4 $(top_srcdir)/m4/wctype_h.m4 \
+ $(top_srcdir)/m4/wint_t.m4 $(top_srcdir)/m4/xalloc.m4 \
+ $(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+ $(ACLOCAL_M4)
+DIST_COMMON = $(srcdir)/Makefile.am $(noinst_HEADERS) \
+ $(am__DIST_COMMON)
+mkinstalldirs = $(install_sh) -d
+CONFIG_HEADER = $(top_builddir)/config.h
+CONFIG_CLEAN_FILES =
+CONFIG_CLEAN_VPATH_FILES =
+LIBRARIES = $(noinst_LIBRARIES)
+AM_V_AR = $(am__v_AR_@AM_V@)
+am__v_AR_ = $(am__v_AR_@AM_DEFAULT_V@)
+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)
+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_alignof_SOURCES = test-alignof.c
+test_alignof_OBJECTS = test-alignof.$(OBJEXT)
+test_alignof_LDADD = $(LDADD)
+test_alignof_DEPENDENCIES = libtests.a ../lib/libsed.a libtests.a \
+ $(am__DEPENDENCIES_1)
+test_alloca_opt_SOURCES = test-alloca-opt.c
+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_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_btowc_SOURCES = test-btowc.c
+test_btowc_OBJECTS = test-btowc.$(OBJEXT)
+test_btowc_LDADD = $(LDADD)
+test_btowc_DEPENDENCIES = libtests.a ../lib/libsed.a libtests.a \
+ $(am__DEPENDENCIES_1)
+test_c_ctype_SOURCES = test-c-ctype.c
+test_c_ctype_OBJECTS = test-c-ctype.$(OBJEXT)
+test_c_ctype_LDADD = $(LDADD)
+test_c_ctype_DEPENDENCIES = libtests.a ../lib/libsed.a libtests.a \
+ $(am__DEPENDENCIES_1)
+test_c_strcasecmp_SOURCES = test-c-strcasecmp.c
+test_c_strcasecmp_OBJECTS = test-c-strcasecmp.$(OBJEXT)
+test_c_strcasecmp_LDADD = $(LDADD)
+test_c_strcasecmp_DEPENDENCIES = libtests.a ../lib/libsed.a libtests.a \
+ $(am__DEPENDENCIES_1)
+test_c_strncasecmp_SOURCES = test-c-strncasecmp.c
+test_c_strncasecmp_OBJECTS = test-c-strncasecmp.$(OBJEXT)
+test_c_strncasecmp_LDADD = $(LDADD)
+test_c_strncasecmp_DEPENDENCIES = libtests.a ../lib/libsed.a \
+ libtests.a $(am__DEPENDENCIES_1)
+test_canonicalize_lgpl_SOURCES = test-canonicalize-lgpl.c
+test_canonicalize_lgpl_OBJECTS = test-canonicalize-lgpl.$(OBJEXT)
+test_canonicalize_lgpl_LDADD = $(LDADD)
+test_canonicalize_lgpl_DEPENDENCIES = libtests.a ../lib/libsed.a \
+ libtests.a $(am__DEPENDENCIES_1)
+test_chdir_SOURCES = test-chdir.c
+test_chdir_OBJECTS = test-chdir.$(OBJEXT)
+test_chdir_LDADD = $(LDADD)
+test_chdir_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_copy_acl_SOURCES = test-copy-acl.c
+test_copy_acl_OBJECTS = test-copy-acl.$(OBJEXT)
+test_copy_acl_DEPENDENCIES = $(am__DEPENDENCIES_2) \
+ $(am__DEPENDENCIES_1)
+test_ctype_SOURCES = test-ctype.c
+test_ctype_OBJECTS = test-ctype.$(OBJEXT)
+test_ctype_LDADD = $(LDADD)
+test_ctype_DEPENDENCIES = libtests.a ../lib/libsed.a libtests.a \
+ $(am__DEPENDENCIES_1)
+test_dirent_SOURCES = test-dirent.c
+test_dirent_OBJECTS = test-dirent.$(OBJEXT)
+test_dirent_LDADD = $(LDADD)
+test_dirent_DEPENDENCIES = libtests.a ../lib/libsed.a libtests.a \
+ $(am__DEPENDENCIES_1)
+test_dup2_SOURCES = test-dup2.c
+test_dup2_OBJECTS = test-dup2.$(OBJEXT)
+test_dup2_LDADD = $(LDADD)
+test_dup2_DEPENDENCIES = libtests.a ../lib/libsed.a libtests.a \
+ $(am__DEPENDENCIES_1)
+test_environ_SOURCES = test-environ.c
+test_environ_OBJECTS = test-environ.$(OBJEXT)
+test_environ_LDADD = $(LDADD)
+test_environ_DEPENDENCIES = libtests.a ../lib/libsed.a libtests.a \
+ $(am__DEPENDENCIES_1)
+test_errno_SOURCES = test-errno.c
+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_h_SOURCES = test-fcntl-h.c
+test_fcntl_h_OBJECTS = test-fcntl-h.$(OBJEXT)
+test_fcntl_h_LDADD = $(LDADD)
+test_fcntl_h_DEPENDENCIES = libtests.a ../lib/libsed.a libtests.a \
+ $(am__DEPENDENCIES_1)
+test_fdopen_SOURCES = test-fdopen.c
+test_fdopen_OBJECTS = test-fdopen.$(OBJEXT)
+test_fdopen_LDADD = $(LDADD)
+test_fdopen_DEPENDENCIES = libtests.a ../lib/libsed.a libtests.a \
+ $(am__DEPENDENCIES_1)
+test_fflush_SOURCES = test-fflush.c
+test_fflush_OBJECTS = test-fflush.$(OBJEXT)
+test_fflush_LDADD = $(LDADD)
+test_fflush_DEPENDENCIES = libtests.a ../lib/libsed.a libtests.a \
+ $(am__DEPENDENCIES_1)
+test_fflush2_SOURCES = test-fflush2.c
+test_fflush2_OBJECTS = test-fflush2.$(OBJEXT)
+test_fflush2_LDADD = $(LDADD)
+test_fflush2_DEPENDENCIES = libtests.a ../lib/libsed.a libtests.a \
+ $(am__DEPENDENCIES_1)
+test_fgetc_SOURCES = test-fgetc.c
+test_fgetc_OBJECTS = test-fgetc.$(OBJEXT)
+test_fgetc_LDADD = $(LDADD)
+test_fgetc_DEPENDENCIES = libtests.a ../lib/libsed.a libtests.a \
+ $(am__DEPENDENCIES_1)
+test_file_has_acl_SOURCES = test-file-has-acl.c
+test_file_has_acl_OBJECTS = test-file-has-acl.$(OBJEXT)
+test_file_has_acl_DEPENDENCIES = $(am__DEPENDENCIES_2) \
+ $(am__DEPENDENCIES_1)
+test_fpending_SOURCES = test-fpending.c
+test_fpending_OBJECTS = test-fpending.$(OBJEXT)
+test_fpending_LDADD = $(LDADD)
+test_fpending_DEPENDENCIES = libtests.a ../lib/libsed.a libtests.a \
+ $(am__DEPENDENCIES_1)
+test_fpurge_SOURCES = test-fpurge.c
+test_fpurge_OBJECTS = test-fpurge.$(OBJEXT)
+test_fpurge_LDADD = $(LDADD)
+test_fpurge_DEPENDENCIES = libtests.a ../lib/libsed.a libtests.a \
+ $(am__DEPENDENCIES_1)
+test_fputc_SOURCES = test-fputc.c
+test_fputc_OBJECTS = test-fputc.$(OBJEXT)
+test_fputc_LDADD = $(LDADD)
+test_fputc_DEPENDENCIES = libtests.a ../lib/libsed.a libtests.a \
+ $(am__DEPENDENCIES_1)
+test_fread_SOURCES = test-fread.c
+test_fread_OBJECTS = test-fread.$(OBJEXT)
+test_fread_LDADD = $(LDADD)
+test_fread_DEPENDENCIES = libtests.a ../lib/libsed.a libtests.a \
+ $(am__DEPENDENCIES_1)
+test_freading_SOURCES = test-freading.c
+test_freading_OBJECTS = test-freading.$(OBJEXT)
+test_freading_LDADD = $(LDADD)
+test_freading_DEPENDENCIES = libtests.a ../lib/libsed.a libtests.a \
+ $(am__DEPENDENCIES_1)
+test_fseek_SOURCES = test-fseek.c
+test_fseek_OBJECTS = test-fseek.$(OBJEXT)
+test_fseek_LDADD = $(LDADD)
+test_fseek_DEPENDENCIES = libtests.a ../lib/libsed.a libtests.a \
+ $(am__DEPENDENCIES_1)
+test_fseeko_SOURCES = test-fseeko.c
+test_fseeko_OBJECTS = test-fseeko.$(OBJEXT)
+test_fseeko_LDADD = $(LDADD)
+test_fseeko_DEPENDENCIES = libtests.a ../lib/libsed.a libtests.a \
+ $(am__DEPENDENCIES_1)
+test_fseeko3_SOURCES = test-fseeko3.c
+test_fseeko3_OBJECTS = test-fseeko3.$(OBJEXT)
+test_fseeko3_LDADD = $(LDADD)
+test_fseeko3_DEPENDENCIES = libtests.a ../lib/libsed.a libtests.a \
+ $(am__DEPENDENCIES_1)
+test_fseeko4_SOURCES = test-fseeko4.c
+test_fseeko4_OBJECTS = test-fseeko4.$(OBJEXT)
+test_fseeko4_LDADD = $(LDADD)
+test_fseeko4_DEPENDENCIES = libtests.a ../lib/libsed.a libtests.a \
+ $(am__DEPENDENCIES_1)
+test_fstat_SOURCES = test-fstat.c
+test_fstat_OBJECTS = test-fstat.$(OBJEXT)
+test_fstat_LDADD = $(LDADD)
+test_fstat_DEPENDENCIES = libtests.a ../lib/libsed.a libtests.a \
+ $(am__DEPENDENCIES_1)
+test_ftell_SOURCES = test-ftell.c
+test_ftell_OBJECTS = test-ftell.$(OBJEXT)
+test_ftell_LDADD = $(LDADD)
+test_ftell_DEPENDENCIES = libtests.a ../lib/libsed.a libtests.a \
+ $(am__DEPENDENCIES_1)
+test_ftell3_SOURCES = test-ftell3.c
+test_ftell3_OBJECTS = test-ftell3.$(OBJEXT)
+test_ftell3_LDADD = $(LDADD)
+test_ftell3_DEPENDENCIES = libtests.a ../lib/libsed.a libtests.a \
+ $(am__DEPENDENCIES_1)
+test_ftello_SOURCES = test-ftello.c
+test_ftello_OBJECTS = test-ftello.$(OBJEXT)
+test_ftello_LDADD = $(LDADD)
+test_ftello_DEPENDENCIES = libtests.a ../lib/libsed.a libtests.a \
+ $(am__DEPENDENCIES_1)
+test_ftello3_SOURCES = test-ftello3.c
+test_ftello3_OBJECTS = test-ftello3.$(OBJEXT)
+test_ftello3_LDADD = $(LDADD)
+test_ftello3_DEPENDENCIES = libtests.a ../lib/libsed.a libtests.a \
+ $(am__DEPENDENCIES_1)
+test_ftello4_SOURCES = test-ftello4.c
+test_ftello4_OBJECTS = test-ftello4.$(OBJEXT)
+test_ftello4_LDADD = $(LDADD)
+test_ftello4_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)
+test_fwrite_DEPENDENCIES = libtests.a ../lib/libsed.a libtests.a \
+ $(am__DEPENDENCIES_1)
+test_fwriting_SOURCES = test-fwriting.c
+test_fwriting_OBJECTS = test-fwriting.$(OBJEXT)
+test_fwriting_LDADD = $(LDADD)
+test_fwriting_DEPENDENCIES = libtests.a ../lib/libsed.a libtests.a \
+ $(am__DEPENDENCIES_1)
+test_getcwd_lgpl_SOURCES = test-getcwd-lgpl.c
+test_getcwd_lgpl_OBJECTS = test-getcwd-lgpl.$(OBJEXT)
+test_getcwd_lgpl_DEPENDENCIES = $(am__DEPENDENCIES_2) \
+ $(am__DEPENDENCIES_1)
+test_getdelim_SOURCES = test-getdelim.c
+test_getdelim_OBJECTS = test-getdelim.$(OBJEXT)
+test_getdelim_LDADD = $(LDADD)
+test_getdelim_DEPENDENCIES = libtests.a ../lib/libsed.a libtests.a \
+ $(am__DEPENDENCIES_1)
+test_getdtablesize_SOURCES = test-getdtablesize.c
+test_getdtablesize_OBJECTS = test-getdtablesize.$(OBJEXT)
+test_getdtablesize_LDADD = $(LDADD)
+test_getdtablesize_DEPENDENCIES = libtests.a ../lib/libsed.a \
+ libtests.a $(am__DEPENDENCIES_1)
+test_getopt_gnu_SOURCES = test-getopt-gnu.c
+test_getopt_gnu_OBJECTS = test-getopt-gnu.$(OBJEXT)
+test_getopt_gnu_DEPENDENCIES = $(am__DEPENDENCIES_2) \
+ $(am__DEPENDENCIES_1)
+test_getopt_posix_SOURCES = test-getopt-posix.c
+test_getopt_posix_OBJECTS = test-getopt-posix.$(OBJEXT)
+test_getopt_posix_DEPENDENCIES = $(am__DEPENDENCIES_2) \
+ $(am__DEPENDENCIES_1)
+test_getprogname_SOURCES = test-getprogname.c
+test_getprogname_OBJECTS = test-getprogname.$(OBJEXT)
+test_getprogname_DEPENDENCIES = $(am__DEPENDENCIES_2)
+test_gettimeofday_SOURCES = test-gettimeofday.c
+test_gettimeofday_OBJECTS = test-gettimeofday.$(OBJEXT)
+test_gettimeofday_LDADD = $(LDADD)
+test_gettimeofday_DEPENDENCIES = libtests.a ../lib/libsed.a libtests.a \
+ $(am__DEPENDENCIES_1)
+test_ignore_value_SOURCES = test-ignore-value.c
+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_intprops_SOURCES = test-intprops.c
+test_intprops_OBJECTS = test-intprops.$(OBJEXT)
+test_intprops_LDADD = $(LDADD)
+test_intprops_DEPENDENCIES = libtests.a ../lib/libsed.a libtests.a \
+ $(am__DEPENDENCIES_1)
+test_inttypes_SOURCES = test-inttypes.c
+test_inttypes_OBJECTS = test-inttypes.$(OBJEXT)
+test_inttypes_LDADD = $(LDADD)
+test_inttypes_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)
+test_isblank_DEPENDENCIES = libtests.a ../lib/libsed.a libtests.a \
+ $(am__DEPENDENCIES_1)
+test_langinfo_SOURCES = test-langinfo.c
+test_langinfo_OBJECTS = test-langinfo.$(OBJEXT)
+test_langinfo_LDADD = $(LDADD)
+test_langinfo_DEPENDENCIES = libtests.a ../lib/libsed.a libtests.a \
+ $(am__DEPENDENCIES_1)
+test_limits_h_SOURCES = test-limits-h.c
+test_limits_h_OBJECTS = test-limits-h.$(OBJEXT)
+test_limits_h_LDADD = $(LDADD)
+test_limits_h_DEPENDENCIES = libtests.a ../lib/libsed.a libtests.a \
+ $(am__DEPENDENCIES_1)
+test_link_SOURCES = test-link.c
+test_link_OBJECTS = test-link.$(OBJEXT)
+test_link_LDADD = $(LDADD)
+test_link_DEPENDENCIES = libtests.a ../lib/libsed.a libtests.a \
+ $(am__DEPENDENCIES_1)
+test_locale_SOURCES = test-locale.c
+test_locale_OBJECTS = test-locale.$(OBJEXT)
+test_locale_LDADD = $(LDADD)
+test_locale_DEPENDENCIES = libtests.a ../lib/libsed.a libtests.a \
+ $(am__DEPENDENCIES_1)
+test_localeconv_SOURCES = test-localeconv.c
+test_localeconv_OBJECTS = test-localeconv.$(OBJEXT)
+test_localeconv_LDADD = $(LDADD)
+test_localeconv_DEPENDENCIES = libtests.a ../lib/libsed.a libtests.a \
+ $(am__DEPENDENCIES_1)
+test_localename_SOURCES = test-localename.c
+test_localename_OBJECTS = test-localename.$(OBJEXT)
+test_localename_DEPENDENCIES = $(am__DEPENDENCIES_2) \
+ $(am__DEPENDENCIES_1)
+test_lseek_SOURCES = test-lseek.c
+test_lseek_OBJECTS = test-lseek.$(OBJEXT)
+test_lseek_LDADD = $(LDADD)
+test_lseek_DEPENDENCIES = libtests.a ../lib/libsed.a libtests.a \
+ $(am__DEPENDENCIES_1)
+test_lstat_SOURCES = test-lstat.c
+test_lstat_OBJECTS = test-lstat.$(OBJEXT)
+test_lstat_LDADD = $(LDADD)
+test_lstat_DEPENDENCIES = libtests.a ../lib/libsed.a libtests.a \
+ $(am__DEPENDENCIES_1)
+test_malloca_SOURCES = test-malloca.c
+test_malloca_OBJECTS = test-malloca.$(OBJEXT)
+test_malloca_LDADD = $(LDADD)
+test_malloca_DEPENDENCIES = libtests.a ../lib/libsed.a libtests.a \
+ $(am__DEPENDENCIES_1)
+test_mbrtowc_SOURCES = test-mbrtowc.c
+test_mbrtowc_OBJECTS = test-mbrtowc.$(OBJEXT)
+test_mbrtowc_LDADD = $(LDADD)
+test_mbrtowc_DEPENDENCIES = libtests.a ../lib/libsed.a libtests.a \
+ $(am__DEPENDENCIES_1)
+test_mbrtowc_w32_SOURCES = test-mbrtowc-w32.c
+test_mbrtowc_w32_OBJECTS = test-mbrtowc-w32.$(OBJEXT)
+test_mbrtowc_w32_LDADD = $(LDADD)
+test_mbrtowc_w32_DEPENDENCIES = libtests.a ../lib/libsed.a libtests.a \
+ $(am__DEPENDENCIES_1)
+test_mbsinit_SOURCES = test-mbsinit.c
+test_mbsinit_OBJECTS = test-mbsinit.$(OBJEXT)
+test_mbsinit_LDADD = $(LDADD)
+test_mbsinit_DEPENDENCIES = libtests.a ../lib/libsed.a libtests.a \
+ $(am__DEPENDENCIES_1)
+test_memchr_SOURCES = test-memchr.c
+test_memchr_OBJECTS = test-memchr.$(OBJEXT)
+test_memchr_LDADD = $(LDADD)
+test_memchr_DEPENDENCIES = libtests.a ../lib/libsed.a libtests.a \
+ $(am__DEPENDENCIES_1)
+test_memrchr_SOURCES = test-memrchr.c
+test_memrchr_OBJECTS = test-memrchr.$(OBJEXT)
+test_memrchr_LDADD = $(LDADD)
+test_memrchr_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)
+test_nl_langinfo_DEPENDENCIES = libtests.a ../lib/libsed.a libtests.a \
+ $(am__DEPENDENCIES_1)
+test_open_SOURCES = test-open.c
+test_open_OBJECTS = test-open.$(OBJEXT)
+test_open_LDADD = $(LDADD)
+test_open_DEPENDENCIES = libtests.a ../lib/libsed.a libtests.a \
+ $(am__DEPENDENCIES_1)
+test_pathmax_SOURCES = test-pathmax.c
+test_pathmax_OBJECTS = test-pathmax.$(OBJEXT)
+test_pathmax_LDADD = $(LDADD)
+test_pathmax_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_read_file_SOURCES = test-read-file.c
+test_read_file_OBJECTS = test-read-file.$(OBJEXT)
+test_read_file_LDADD = $(LDADD)
+test_read_file_DEPENDENCIES = libtests.a ../lib/libsed.a libtests.a \
+ $(am__DEPENDENCIES_1)
+test_readlink_SOURCES = test-readlink.c
+test_readlink_OBJECTS = test-readlink.$(OBJEXT)
+test_readlink_LDADD = $(LDADD)
+test_readlink_DEPENDENCIES = libtests.a ../lib/libsed.a libtests.a \
+ $(am__DEPENDENCIES_1)
+test_regex_SOURCES = test-regex.c
+test_regex_OBJECTS = test-regex.$(OBJEXT)
+test_regex_DEPENDENCIES = $(am__DEPENDENCIES_2) $(am__DEPENDENCIES_1)
+test_rename_SOURCES = test-rename.c
+test_rename_OBJECTS = test-rename.$(OBJEXT)
+test_rename_LDADD = $(LDADD)
+test_rename_DEPENDENCIES = libtests.a ../lib/libsed.a libtests.a \
+ $(am__DEPENDENCIES_1)
+test_rmdir_SOURCES = test-rmdir.c
+test_rmdir_OBJECTS = test-rmdir.$(OBJEXT)
+test_rmdir_LDADD = $(LDADD)
+test_rmdir_DEPENDENCIES = libtests.a ../lib/libsed.a libtests.a \
+ $(am__DEPENDENCIES_1)
+test_sameacls_SOURCES = test-sameacls.c
+test_sameacls_OBJECTS = test-sameacls.$(OBJEXT)
+test_sameacls_DEPENDENCIES = $(am__DEPENDENCIES_2) \
+ $(am__DEPENDENCIES_1)
+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) \
+ $(am__DEPENDENCIES_1)
+test_setenv_SOURCES = test-setenv.c
+test_setenv_OBJECTS = test-setenv.$(OBJEXT)
+test_setenv_LDADD = $(LDADD)
+test_setenv_DEPENDENCIES = libtests.a ../lib/libsed.a libtests.a \
+ $(am__DEPENDENCIES_1)
+test_setlocale1_SOURCES = test-setlocale1.c
+test_setlocale1_OBJECTS = test-setlocale1.$(OBJEXT)
+test_setlocale1_LDADD = $(LDADD)
+test_setlocale1_DEPENDENCIES = libtests.a ../lib/libsed.a libtests.a \
+ $(am__DEPENDENCIES_1)
+test_setlocale2_SOURCES = test-setlocale2.c
+test_setlocale2_OBJECTS = test-setlocale2.$(OBJEXT)
+test_setlocale2_LDADD = $(LDADD)
+test_setlocale2_DEPENDENCIES = libtests.a ../lib/libsed.a libtests.a \
+ $(am__DEPENDENCIES_1)
+test_stat_SOURCES = test-stat.c
+test_stat_OBJECTS = test-stat.$(OBJEXT)
+test_stat_DEPENDENCIES = $(am__DEPENDENCIES_2) $(am__DEPENDENCIES_1)
+test_stdalign_SOURCES = test-stdalign.c
+test_stdalign_OBJECTS = test-stdalign.$(OBJEXT)
+test_stdalign_LDADD = $(LDADD)
+test_stdalign_DEPENDENCIES = libtests.a ../lib/libsed.a libtests.a \
+ $(am__DEPENDENCIES_1)
+test_stdbool_SOURCES = test-stdbool.c
+test_stdbool_OBJECTS = test-stdbool.$(OBJEXT)
+test_stdbool_LDADD = $(LDADD)
+test_stdbool_DEPENDENCIES = libtests.a ../lib/libsed.a libtests.a \
+ $(am__DEPENDENCIES_1)
+test_stddef_SOURCES = test-stddef.c
+test_stddef_OBJECTS = test-stddef.$(OBJEXT)
+test_stddef_LDADD = $(LDADD)
+test_stddef_DEPENDENCIES = libtests.a ../lib/libsed.a libtests.a \
+ $(am__DEPENDENCIES_1)
+test_stdint_SOURCES = test-stdint.c
+test_stdint_OBJECTS = test-stdint.$(OBJEXT)
+test_stdint_LDADD = $(LDADD)
+test_stdint_DEPENDENCIES = libtests.a ../lib/libsed.a libtests.a \
+ $(am__DEPENDENCIES_1)
+test_stdio_SOURCES = test-stdio.c
+test_stdio_OBJECTS = test-stdio.$(OBJEXT)
+test_stdio_LDADD = $(LDADD)
+test_stdio_DEPENDENCIES = libtests.a ../lib/libsed.a libtests.a \
+ $(am__DEPENDENCIES_1)
+test_stdlib_SOURCES = test-stdlib.c
+test_stdlib_OBJECTS = test-stdlib.$(OBJEXT)
+test_stdlib_LDADD = $(LDADD)
+test_stdlib_DEPENDENCIES = libtests.a ../lib/libsed.a libtests.a \
+ $(am__DEPENDENCIES_1)
+test_strerror_SOURCES = test-strerror.c
+test_strerror_OBJECTS = test-strerror.$(OBJEXT)
+test_strerror_LDADD = $(LDADD)
+test_strerror_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)
+test_string_DEPENDENCIES = libtests.a ../lib/libsed.a libtests.a \
+ $(am__DEPENDENCIES_1)
+test_strverscmp_SOURCES = test-strverscmp.c
+test_strverscmp_OBJECTS = test-strverscmp.$(OBJEXT)
+test_strverscmp_LDADD = $(LDADD)
+test_strverscmp_DEPENDENCIES = libtests.a ../lib/libsed.a libtests.a \
+ $(am__DEPENDENCIES_1)
+test_symlink_SOURCES = test-symlink.c
+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_stat_SOURCES = test-sys_stat.c
+test_sys_stat_OBJECTS = test-sys_stat.$(OBJEXT)
+test_sys_stat_LDADD = $(LDADD)
+test_sys_stat_DEPENDENCIES = libtests.a ../lib/libsed.a libtests.a \
+ $(am__DEPENDENCIES_1)
+test_sys_time_SOURCES = test-sys_time.c
+test_sys_time_OBJECTS = test-sys_time.$(OBJEXT)
+test_sys_time_LDADD = $(LDADD)
+test_sys_time_DEPENDENCIES = libtests.a ../lib/libsed.a libtests.a \
+ $(am__DEPENDENCIES_1)
+test_sys_types_SOURCES = test-sys_types.c
+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_time_SOURCES = test-time.c
+test_time_OBJECTS = test-time.$(OBJEXT)
+test_time_LDADD = $(LDADD)
+test_time_DEPENDENCIES = libtests.a ../lib/libsed.a libtests.a \
+ $(am__DEPENDENCIES_1)
+test_unistd_SOURCES = test-unistd.c
+test_unistd_OBJECTS = test-unistd.$(OBJEXT)
+test_unistd_LDADD = $(LDADD)
+test_unistd_DEPENDENCIES = libtests.a ../lib/libsed.a libtests.a \
+ $(am__DEPENDENCIES_1)
+test_unsetenv_SOURCES = test-unsetenv.c
+test_unsetenv_OBJECTS = test-unsetenv.$(OBJEXT)
+test_unsetenv_LDADD = $(LDADD)
+test_unsetenv_DEPENDENCIES = libtests.a ../lib/libsed.a libtests.a \
+ $(am__DEPENDENCIES_1)
+test_verify_SOURCES = test-verify.c
+test_verify_OBJECTS = test-verify.$(OBJEXT)
+test_verify_LDADD = $(LDADD)
+test_verify_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)
+test_wchar_SOURCES = test-wchar.c
+test_wchar_OBJECTS = test-wchar.$(OBJEXT)
+test_wchar_LDADD = $(LDADD)
+test_wchar_DEPENDENCIES = libtests.a ../lib/libsed.a libtests.a \
+ $(am__DEPENDENCIES_1)
+test_wcrtomb_SOURCES = test-wcrtomb.c
+test_wcrtomb_OBJECTS = test-wcrtomb.$(OBJEXT)
+test_wcrtomb_LDADD = $(LDADD)
+test_wcrtomb_DEPENDENCIES = libtests.a ../lib/libsed.a libtests.a \
+ $(am__DEPENDENCIES_1)
+test_wcrtomb_w32_SOURCES = test-wcrtomb-w32.c
+test_wcrtomb_w32_OBJECTS = test-wcrtomb-w32.$(OBJEXT)
+test_wcrtomb_w32_LDADD = $(LDADD)
+test_wcrtomb_w32_DEPENDENCIES = libtests.a ../lib/libsed.a libtests.a \
+ $(am__DEPENDENCIES_1)
+test_wctype_h_SOURCES = test-wctype-h.c
+test_wctype_h_OBJECTS = test-wctype-h.$(OBJEXT)
+test_wctype_h_LDADD = $(LDADD)
+test_wctype_h_DEPENDENCIES = libtests.a ../lib/libsed.a libtests.a \
+ $(am__DEPENDENCIES_1)
+test_xalloc_die_SOURCES = test-xalloc-die.c
+test_xalloc_die_OBJECTS = test-xalloc-die.$(OBJEXT)
+test_xalloc_die_DEPENDENCIES = $(am__DEPENDENCIES_2)
+AM_V_P = $(am__v_P_@AM_V@)
+am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
+am__v_P_0 = false
+am__v_P_1 = :
+AM_V_GEN = $(am__v_GEN_@AM_V@)
+am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
+am__v_GEN_0 = @echo " GEN " $@;
+am__v_GEN_1 =
+AM_V_at = $(am__v_at_@AM_V@)
+am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
+am__v_at_0 = @
+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 \
+ ./$(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)/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)/setenv.Po ./$(DEPDIR)/setlocale.Po \
+ ./$(DEPDIR)/strdup.Po ./$(DEPDIR)/symlink.Po \
+ ./$(DEPDIR)/test-alignof.Po ./$(DEPDIR)/test-alloca-opt.Po \
+ ./$(DEPDIR)/test-binary-io.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-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-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-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-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-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-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
+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@)
+am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@)
+am__v_CC_0 = @echo " CC " $@;
+am__v_CC_1 =
+CCLD = $(CC)
+LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
+AM_V_CCLD = $(am__v_CCLD_@AM_V@)
+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 \
+ 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-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 \
+ 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-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 \
+ ctags-recursive dvi-recursive html-recursive info-recursive \
+ install-data-recursive install-dvi-recursive \
+ install-exec-recursive install-html-recursive \
+ install-info-recursive install-pdf-recursive \
+ install-ps-recursive install-recursive installcheck-recursive \
+ installdirs-recursive pdf-recursive ps-recursive \
+ tags-recursive uninstall-recursive
+am__can_run_installinfo = \
+ case $$AM_UPDATE_INFO_DIR in \
+ n|no|NO) false;; \
+ *) (install-info --version) >/dev/null 2>&1;; \
+ esac
+HEADERS = $(noinst_HEADERS)
+RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \
+ distclean-recursive maintainer-clean-recursive
+am__recursive_targets = \
+ $(RECURSIVE_TARGETS) \
+ $(RECURSIVE_CLEAN_TARGETS) \
+ $(am__extra_recursive_targets)
+AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \
+ check recheck distdir
+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
+# *not* preserved.
+am__uniquify_input = $(AWK) '\
+ BEGIN { nonempty = 0; } \
+ { items[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in items) print i; }; } \
+'
+# Make sure the list of sources is unique. This is necessary because,
+# e.g., the same source file might be shared among _SOURCES variables
+# for different programs/libraries.
+am__define_uniq_tagged_files = \
+ list='$(am__tagged_files)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | $(am__uniquify_input)`
+ETAGS = etags
+CTAGS = ctags
+am__tty_colors_dummy = \
+ mgn= red= grn= lgn= blu= brg= std=; \
+ am__color_tests=no
+am__tty_colors = { \
+ $(am__tty_colors_dummy); \
+ if test "X$(AM_COLOR_TESTS)" = Xno; then \
+ am__color_tests=no; \
+ elif test "X$(AM_COLOR_TESTS)" = Xalways; then \
+ am__color_tests=yes; \
+ elif test "X$$TERM" != Xdumb && { test -t 1; } 2>/dev/null; then \
+ am__color_tests=yes; \
+ fi; \
+ if test $$am__color_tests = yes; then \
+ red=''; \
+ grn=''; \
+ lgn=''; \
+ blu=''; \
+ mgn=''; \
+ brg=''; \
+ std=''; \
+ fi; \
+}
+am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
+am__vpath_adj = case $$p in \
+ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
+ *) f=$$p;; \
+ esac;
+am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
+am__install_max = 40
+am__nobase_strip_setup = \
+ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
+am__nobase_strip = \
+ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
+am__nobase_list = $(am__nobase_strip_setup); \
+ for p in $$list; do echo "$$p $$p"; done | \
+ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
+ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
+ if (++n[$$2] == $(am__install_max)) \
+ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
+ END { for (dir in files) print dir, files[dir] }'
+am__base_list = \
+ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
+ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
+am__uninstall_files_from_dir = { \
+ test -z "$$files" \
+ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \
+ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \
+ $(am__cd) "$$dir" && rm -f $$files; }; \
+ }
+am__recheck_rx = ^[ ]*:recheck:[ ]*
+am__global_test_result_rx = ^[ ]*:global-test-result:[ ]*
+am__copy_in_global_log_rx = ^[ ]*:copy-in-global-log:[ ]*
+# A command that, given a newline-separated list of test names on the
+# standard input, print the name of the tests that are to be re-run
+# upon "make recheck".
+am__list_recheck_tests = $(AWK) '{ \
+ recheck = 1; \
+ while ((rc = (getline line < ($$0 ".trs"))) != 0) \
+ { \
+ if (rc < 0) \
+ { \
+ if ((getline line2 < ($$0 ".log")) < 0) \
+ recheck = 0; \
+ break; \
+ } \
+ else if (line ~ /$(am__recheck_rx)[nN][Oo]/) \
+ { \
+ recheck = 0; \
+ break; \
+ } \
+ else if (line ~ /$(am__recheck_rx)[yY][eE][sS]/) \
+ { \
+ break; \
+ } \
+ }; \
+ if (recheck) \
+ print $$0; \
+ close ($$0 ".trs"); \
+ close ($$0 ".log"); \
+}'
+# A command that, given a newline-separated list of test names on the
+# standard input, create the global log from their .trs and .log files.
+am__create_global_log = $(AWK) ' \
+function fatal(msg) \
+{ \
+ print "fatal: making $@: " msg | "cat >&2"; \
+ exit 1; \
+} \
+function rst_section(header) \
+{ \
+ print header; \
+ len = length(header); \
+ for (i = 1; i <= len; i = i + 1) \
+ printf "="; \
+ printf "\n\n"; \
+} \
+{ \
+ copy_in_global_log = 1; \
+ global_test_result = "RUN"; \
+ while ((rc = (getline line < ($$0 ".trs"))) != 0) \
+ { \
+ if (rc < 0) \
+ fatal("failed to read from " $$0 ".trs"); \
+ if (line ~ /$(am__global_test_result_rx)/) \
+ { \
+ sub("$(am__global_test_result_rx)", "", line); \
+ sub("[ ]*$$", "", line); \
+ global_test_result = line; \
+ } \
+ else if (line ~ /$(am__copy_in_global_log_rx)[nN][oO]/) \
+ copy_in_global_log = 0; \
+ }; \
+ if (copy_in_global_log) \
+ { \
+ rst_section(global_test_result ": " $$0); \
+ while ((rc = (getline line < ($$0 ".log"))) != 0) \
+ { \
+ if (rc < 0) \
+ fatal("failed to read from " $$0 ".log"); \
+ print line; \
+ }; \
+ printf "\n"; \
+ }; \
+ close ($$0 ".trs"); \
+ close ($$0 ".log"); \
+}'
+# Restructured Text title.
+am__rst_title = { sed 's/.*/ & /;h;s/./=/g;p;x;s/ *$$//;p;g' && echo; }
+# Solaris 10 'make', and several other traditional 'make' implementations,
+# pass "-e" to $(SHELL), and POSIX 2008 even requires this. Work around it
+# by disabling -e (using the XSI extension "set +e") if it's set.
+am__sh_e_setup = case $$- in *e*) set +e;; esac
+# Default flags passed to test drivers.
+am__common_driver_flags = \
+ --color-tests "$$am__color_tests" \
+ --enable-hard-errors "$$am__enable_hard_errors" \
+ --expect-failure "$$am__expect_failure"
+# To be inserted before the command running the test. Creates the
+# directory for the log if needed. Stores in $dir the directory
+# containing $f, in $tst the test, in $log the log. Executes the
+# developer- defined test setup AM_TESTS_ENVIRONMENT (if any), and
+# passes TESTS_ENVIRONMENT. Set up options for the wrapper that
+# will run the test scripts (or their associated LOG_COMPILER, if
+# thy have one).
+am__check_pre = \
+$(am__sh_e_setup); \
+$(am__vpath_adj_setup) $(am__vpath_adj) \
+$(am__tty_colors); \
+srcdir=$(srcdir); export srcdir; \
+case "$@" in \
+ */*) am__odir=`echo "./$@" | sed 's|/[^/]*$$||'`;; \
+ *) am__odir=.;; \
+esac; \
+test "x$$am__odir" = x"." || test -d "$$am__odir" \
+ || $(MKDIR_P) "$$am__odir" || exit $$?; \
+if test -f "./$$f"; then dir=./; \
+elif test -f "$$f"; then dir=; \
+else dir="$(srcdir)/"; fi; \
+tst=$$dir$$f; log='$@'; \
+if test -n '$(DISABLE_HARD_ERRORS)'; then \
+ am__enable_hard_errors=no; \
+else \
+ am__enable_hard_errors=yes; \
+fi; \
+case " $(XFAIL_TESTS) " in \
+ *[\ \ ]$$f[\ \ ]* | *[\ \ ]$$dir$$f[\ \ ]*) \
+ am__expect_failure=yes;; \
+ *) \
+ am__expect_failure=no;; \
+esac; \
+$(AM_TESTS_ENVIRONMENT) $(TESTS_ENVIRONMENT)
+# A shell command to get the names of the tests scripts with any registered
+# extension removed (i.e., equivalently, the names of the test logs, with
+# the '.log' extension removed). The result is saved in the shell variable
+# '$bases'. This honors runtime overriding of TESTS and TEST_LOGS. Sadly,
+# we cannot use something simpler, involving e.g., "$(TEST_LOGS:.log=)",
+# since that might cause problem with VPATH rewrites for suffix-less tests.
+# See also 'test-harness-vpath-rewrite.sh' and 'test-trs-basic.sh'.
+am__set_TESTS_bases = \
+ bases='$(TEST_LOGS)'; \
+ bases=`for i in $$bases; do echo $$i; done | sed 's/\.log$$//'`; \
+ bases=`echo $$bases`
+RECHECK_LOGS = $(TEST_LOGS)
+TEST_SUITE_LOG = test-suite.log
+TEST_EXTENSIONS = @EXEEXT@ .test
+LOG_DRIVER = $(SHELL) $(top_srcdir)/build-aux/test-driver
+LOG_COMPILE = $(LOG_COMPILER) $(AM_LOG_FLAGS) $(LOG_FLAGS)
+am__set_b = \
+ case '$@' in \
+ */*) \
+ case '$*' in \
+ */*) b='$*';; \
+ *) b=`echo '$@' | sed 's/\.log$$//'`; \
+ esac;; \
+ *) \
+ b='$*';; \
+ esac
+am__test_logs1 = $(TESTS:=.log)
+am__test_logs2 = $(am__test_logs1:@EXEEXT@.log=.log)
+TEST_LOGS = $(am__test_logs2:.test.log=.log)
+TEST_LOG_DRIVER = $(SHELL) $(top_srcdir)/build-aux/test-driver
+TEST_LOG_COMPILE = $(TEST_LOG_COMPILER) $(AM_TEST_LOG_FLAGS) \
+ $(TEST_LOG_FLAGS)
+DIST_SUBDIRS = $(SUBDIRS)
+am__DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/gnulib.mk \
+ $(top_srcdir)/build-aux/depcomp \
+ $(top_srcdir)/build-aux/test-driver
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+am__relativize = \
+ dir0=`pwd`; \
+ sed_first='s,^\([^/]*\)/.*$$,\1,'; \
+ sed_rest='s,^[^/]*/*,,'; \
+ sed_last='s,^.*/\([^/]*\)$$,\1,'; \
+ sed_butlast='s,/*[^/]*$$,,'; \
+ while test -n "$$dir1"; do \
+ first=`echo "$$dir1" | sed -e "$$sed_first"`; \
+ if test "$$first" != "."; then \
+ if test "$$first" = ".."; then \
+ dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \
+ dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \
+ else \
+ first2=`echo "$$dir2" | sed -e "$$sed_first"`; \
+ if test "$$first2" = "$$first"; then \
+ dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \
+ else \
+ dir2="../$$dir2"; \
+ fi; \
+ dir0="$$dir0"/"$$first"; \
+ fi; \
+ fi; \
+ dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \
+ done; \
+ reldir="$$dir2"
+pkglibexecdir = @pkglibexecdir@
+ACLOCAL = @ACLOCAL@
+ALLOCA = @ALLOCA@
+ALLOCA_H = @ALLOCA_H@
+AMTAR = @AMTAR@
+AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
+APPLE_UNIVERSAL_BUILD = @APPLE_UNIVERSAL_BUILD@
+AR = @AR@
+ARFLAGS = @ARFLAGS@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+BITSIZEOF_PTRDIFF_T = @BITSIZEOF_PTRDIFF_T@
+BITSIZEOF_SIG_ATOMIC_T = @BITSIZEOF_SIG_ATOMIC_T@
+BITSIZEOF_SIZE_T = @BITSIZEOF_SIZE_T@
+BITSIZEOF_WCHAR_T = @BITSIZEOF_WCHAR_T@
+BITSIZEOF_WINT_T = @BITSIZEOF_WINT_T@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CONFIG_INCLUDE = @CONFIG_INCLUDE@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DEFS = @DEFS@ -DEXEEXT=\"@EXEEXT@\"
+DEPDIR = @DEPDIR@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+EMULTIHOP_HIDDEN = @EMULTIHOP_HIDDEN@
+EMULTIHOP_VALUE = @EMULTIHOP_VALUE@
+ENOLINK_HIDDEN = @ENOLINK_HIDDEN@
+ENOLINK_VALUE = @ENOLINK_VALUE@
+EOVERFLOW_HIDDEN = @EOVERFLOW_HIDDEN@
+EOVERFLOW_VALUE = @EOVERFLOW_VALUE@
+ERRNO_H = @ERRNO_H@
+EXEEXT = @EXEEXT@
+GETOPT_H = @GETOPT_H@
+GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@
+GLIBC21 = @GLIBC21@
+GMSGFMT = @GMSGFMT@
+GMSGFMT_015 = @GMSGFMT_015@
+GNULIB_ALPHASORT = @GNULIB_ALPHASORT@
+GNULIB_ATOLL = @GNULIB_ATOLL@
+GNULIB_BTOWC = @GNULIB_BTOWC@
+GNULIB_CALLOC_POSIX = @GNULIB_CALLOC_POSIX@
+GNULIB_CANONICALIZE_FILE_NAME = @GNULIB_CANONICALIZE_FILE_NAME@
+GNULIB_CHDIR = @GNULIB_CHDIR@
+GNULIB_CHOWN = @GNULIB_CHOWN@
+GNULIB_CLOSE = @GNULIB_CLOSE@
+GNULIB_CLOSEDIR = @GNULIB_CLOSEDIR@
+GNULIB_DIRFD = @GNULIB_DIRFD@
+GNULIB_DPRINTF = @GNULIB_DPRINTF@
+GNULIB_DUP = @GNULIB_DUP@
+GNULIB_DUP2 = @GNULIB_DUP2@
+GNULIB_DUP3 = @GNULIB_DUP3@
+GNULIB_DUPLOCALE = @GNULIB_DUPLOCALE@
+GNULIB_ENVIRON = @GNULIB_ENVIRON@
+GNULIB_EUIDACCESS = @GNULIB_EUIDACCESS@
+GNULIB_FACCESSAT = @GNULIB_FACCESSAT@
+GNULIB_FCHDIR = @GNULIB_FCHDIR@
+GNULIB_FCHMODAT = @GNULIB_FCHMODAT@
+GNULIB_FCHOWNAT = @GNULIB_FCHOWNAT@
+GNULIB_FCLOSE = @GNULIB_FCLOSE@
+GNULIB_FCNTL = @GNULIB_FCNTL@
+GNULIB_FDATASYNC = @GNULIB_FDATASYNC@
+GNULIB_FDOPEN = @GNULIB_FDOPEN@
+GNULIB_FDOPENDIR = @GNULIB_FDOPENDIR@
+GNULIB_FFLUSH = @GNULIB_FFLUSH@
+GNULIB_FFSL = @GNULIB_FFSL@
+GNULIB_FFSLL = @GNULIB_FFSLL@
+GNULIB_FGETC = @GNULIB_FGETC@
+GNULIB_FGETS = @GNULIB_FGETS@
+GNULIB_FOPEN = @GNULIB_FOPEN@
+GNULIB_FPRINTF = @GNULIB_FPRINTF@
+GNULIB_FPRINTF_POSIX = @GNULIB_FPRINTF_POSIX@
+GNULIB_FPURGE = @GNULIB_FPURGE@
+GNULIB_FPUTC = @GNULIB_FPUTC@
+GNULIB_FPUTS = @GNULIB_FPUTS@
+GNULIB_FREAD = @GNULIB_FREAD@
+GNULIB_FREOPEN = @GNULIB_FREOPEN@
+GNULIB_FSCANF = @GNULIB_FSCANF@
+GNULIB_FSEEK = @GNULIB_FSEEK@
+GNULIB_FSEEKO = @GNULIB_FSEEKO@
+GNULIB_FSTAT = @GNULIB_FSTAT@
+GNULIB_FSTATAT = @GNULIB_FSTATAT@
+GNULIB_FSYNC = @GNULIB_FSYNC@
+GNULIB_FTELL = @GNULIB_FTELL@
+GNULIB_FTELLO = @GNULIB_FTELLO@
+GNULIB_FTRUNCATE = @GNULIB_FTRUNCATE@
+GNULIB_FUTIMENS = @GNULIB_FUTIMENS@
+GNULIB_FWRITE = @GNULIB_FWRITE@
+GNULIB_GETC = @GNULIB_GETC@
+GNULIB_GETCHAR = @GNULIB_GETCHAR@
+GNULIB_GETCWD = @GNULIB_GETCWD@
+GNULIB_GETDELIM = @GNULIB_GETDELIM@
+GNULIB_GETDOMAINNAME = @GNULIB_GETDOMAINNAME@
+GNULIB_GETDTABLESIZE = @GNULIB_GETDTABLESIZE@
+GNULIB_GETGROUPS = @GNULIB_GETGROUPS@
+GNULIB_GETHOSTNAME = @GNULIB_GETHOSTNAME@
+GNULIB_GETLINE = @GNULIB_GETLINE@
+GNULIB_GETLOADAVG = @GNULIB_GETLOADAVG@
+GNULIB_GETLOGIN = @GNULIB_GETLOGIN@
+GNULIB_GETLOGIN_R = @GNULIB_GETLOGIN_R@
+GNULIB_GETPAGESIZE = @GNULIB_GETPAGESIZE@
+GNULIB_GETSUBOPT = @GNULIB_GETSUBOPT@
+GNULIB_GETTIMEOFDAY = @GNULIB_GETTIMEOFDAY@
+GNULIB_GETUSERSHELL = @GNULIB_GETUSERSHELL@
+GNULIB_GL_UNISTD_H_GETOPT = @GNULIB_GL_UNISTD_H_GETOPT@
+GNULIB_GRANTPT = @GNULIB_GRANTPT@
+GNULIB_GROUP_MEMBER = @GNULIB_GROUP_MEMBER@
+GNULIB_IMAXABS = @GNULIB_IMAXABS@
+GNULIB_IMAXDIV = @GNULIB_IMAXDIV@
+GNULIB_ISATTY = @GNULIB_ISATTY@
+GNULIB_ISBLANK = @GNULIB_ISBLANK@
+GNULIB_ISWBLANK = @GNULIB_ISWBLANK@
+GNULIB_ISWCTYPE = @GNULIB_ISWCTYPE@
+GNULIB_LCHMOD = @GNULIB_LCHMOD@
+GNULIB_LCHOWN = @GNULIB_LCHOWN@
+GNULIB_LINK = @GNULIB_LINK@
+GNULIB_LINKAT = @GNULIB_LINKAT@
+GNULIB_LOCALECONV = @GNULIB_LOCALECONV@
+GNULIB_LSEEK = @GNULIB_LSEEK@
+GNULIB_LSTAT = @GNULIB_LSTAT@
+GNULIB_MALLOC_POSIX = @GNULIB_MALLOC_POSIX@
+GNULIB_MBRLEN = @GNULIB_MBRLEN@
+GNULIB_MBRTOWC = @GNULIB_MBRTOWC@
+GNULIB_MBSCASECMP = @GNULIB_MBSCASECMP@
+GNULIB_MBSCASESTR = @GNULIB_MBSCASESTR@
+GNULIB_MBSCHR = @GNULIB_MBSCHR@
+GNULIB_MBSCSPN = @GNULIB_MBSCSPN@
+GNULIB_MBSINIT = @GNULIB_MBSINIT@
+GNULIB_MBSLEN = @GNULIB_MBSLEN@
+GNULIB_MBSNCASECMP = @GNULIB_MBSNCASECMP@
+GNULIB_MBSNLEN = @GNULIB_MBSNLEN@
+GNULIB_MBSNRTOWCS = @GNULIB_MBSNRTOWCS@
+GNULIB_MBSPBRK = @GNULIB_MBSPBRK@
+GNULIB_MBSPCASECMP = @GNULIB_MBSPCASECMP@
+GNULIB_MBSRCHR = @GNULIB_MBSRCHR@
+GNULIB_MBSRTOWCS = @GNULIB_MBSRTOWCS@
+GNULIB_MBSSEP = @GNULIB_MBSSEP@
+GNULIB_MBSSPN = @GNULIB_MBSSPN@
+GNULIB_MBSSTR = @GNULIB_MBSSTR@
+GNULIB_MBSTOK_R = @GNULIB_MBSTOK_R@
+GNULIB_MBTOWC = @GNULIB_MBTOWC@
+GNULIB_MEMCHR = @GNULIB_MEMCHR@
+GNULIB_MEMMEM = @GNULIB_MEMMEM@
+GNULIB_MEMPCPY = @GNULIB_MEMPCPY@
+GNULIB_MEMRCHR = @GNULIB_MEMRCHR@
+GNULIB_MKDIRAT = @GNULIB_MKDIRAT@
+GNULIB_MKDTEMP = @GNULIB_MKDTEMP@
+GNULIB_MKFIFO = @GNULIB_MKFIFO@
+GNULIB_MKFIFOAT = @GNULIB_MKFIFOAT@
+GNULIB_MKNOD = @GNULIB_MKNOD@
+GNULIB_MKNODAT = @GNULIB_MKNODAT@
+GNULIB_MKOSTEMP = @GNULIB_MKOSTEMP@
+GNULIB_MKOSTEMPS = @GNULIB_MKOSTEMPS@
+GNULIB_MKSTEMP = @GNULIB_MKSTEMP@
+GNULIB_MKSTEMPS = @GNULIB_MKSTEMPS@
+GNULIB_MKTIME = @GNULIB_MKTIME@
+GNULIB_NANOSLEEP = @GNULIB_NANOSLEEP@
+GNULIB_NL_LANGINFO = @GNULIB_NL_LANGINFO@
+GNULIB_NONBLOCKING = @GNULIB_NONBLOCKING@
+GNULIB_OBSTACK_PRINTF = @GNULIB_OBSTACK_PRINTF@
+GNULIB_OBSTACK_PRINTF_POSIX = @GNULIB_OBSTACK_PRINTF_POSIX@
+GNULIB_OPEN = @GNULIB_OPEN@
+GNULIB_OPENAT = @GNULIB_OPENAT@
+GNULIB_OPENDIR = @GNULIB_OPENDIR@
+GNULIB_OVERRIDES_WINT_T = @GNULIB_OVERRIDES_WINT_T@
+GNULIB_PCLOSE = @GNULIB_PCLOSE@
+GNULIB_PERROR = @GNULIB_PERROR@
+GNULIB_PIPE = @GNULIB_PIPE@
+GNULIB_PIPE2 = @GNULIB_PIPE2@
+GNULIB_POPEN = @GNULIB_POPEN@
+GNULIB_POSIX_OPENPT = @GNULIB_POSIX_OPENPT@
+GNULIB_PREAD = @GNULIB_PREAD@
+GNULIB_PRINTF = @GNULIB_PRINTF@
+GNULIB_PRINTF_POSIX = @GNULIB_PRINTF_POSIX@
+GNULIB_PTSNAME = @GNULIB_PTSNAME@
+GNULIB_PTSNAME_R = @GNULIB_PTSNAME_R@
+GNULIB_PUTC = @GNULIB_PUTC@
+GNULIB_PUTCHAR = @GNULIB_PUTCHAR@
+GNULIB_PUTENV = @GNULIB_PUTENV@
+GNULIB_PUTS = @GNULIB_PUTS@
+GNULIB_PWRITE = @GNULIB_PWRITE@
+GNULIB_QSORT_R = @GNULIB_QSORT_R@
+GNULIB_RANDOM = @GNULIB_RANDOM@
+GNULIB_RANDOM_R = @GNULIB_RANDOM_R@
+GNULIB_RAWMEMCHR = @GNULIB_RAWMEMCHR@
+GNULIB_READ = @GNULIB_READ@
+GNULIB_READDIR = @GNULIB_READDIR@
+GNULIB_READLINK = @GNULIB_READLINK@
+GNULIB_READLINKAT = @GNULIB_READLINKAT@
+GNULIB_REALLOC_POSIX = @GNULIB_REALLOC_POSIX@
+GNULIB_REALPATH = @GNULIB_REALPATH@
+GNULIB_REMOVE = @GNULIB_REMOVE@
+GNULIB_RENAME = @GNULIB_RENAME@
+GNULIB_RENAMEAT = @GNULIB_RENAMEAT@
+GNULIB_REWINDDIR = @GNULIB_REWINDDIR@
+GNULIB_RMDIR = @GNULIB_RMDIR@
+GNULIB_RPMATCH = @GNULIB_RPMATCH@
+GNULIB_SCANDIR = @GNULIB_SCANDIR@
+GNULIB_SCANF = @GNULIB_SCANF@
+GNULIB_SECURE_GETENV = @GNULIB_SECURE_GETENV@
+GNULIB_SETENV = @GNULIB_SETENV@
+GNULIB_SETHOSTNAME = @GNULIB_SETHOSTNAME@
+GNULIB_SETLOCALE = @GNULIB_SETLOCALE@
+GNULIB_SLEEP = @GNULIB_SLEEP@
+GNULIB_SNPRINTF = @GNULIB_SNPRINTF@
+GNULIB_SPRINTF_POSIX = @GNULIB_SPRINTF_POSIX@
+GNULIB_STAT = @GNULIB_STAT@
+GNULIB_STDIO_H_NONBLOCKING = @GNULIB_STDIO_H_NONBLOCKING@
+GNULIB_STDIO_H_SIGPIPE = @GNULIB_STDIO_H_SIGPIPE@
+GNULIB_STPCPY = @GNULIB_STPCPY@
+GNULIB_STPNCPY = @GNULIB_STPNCPY@
+GNULIB_STRCASESTR = @GNULIB_STRCASESTR@
+GNULIB_STRCHRNUL = @GNULIB_STRCHRNUL@
+GNULIB_STRDUP = @GNULIB_STRDUP@
+GNULIB_STRERROR = @GNULIB_STRERROR@
+GNULIB_STRERROR_R = @GNULIB_STRERROR_R@
+GNULIB_STRNCAT = @GNULIB_STRNCAT@
+GNULIB_STRNDUP = @GNULIB_STRNDUP@
+GNULIB_STRNLEN = @GNULIB_STRNLEN@
+GNULIB_STRPBRK = @GNULIB_STRPBRK@
+GNULIB_STRPTIME = @GNULIB_STRPTIME@
+GNULIB_STRSEP = @GNULIB_STRSEP@
+GNULIB_STRSIGNAL = @GNULIB_STRSIGNAL@
+GNULIB_STRSTR = @GNULIB_STRSTR@
+GNULIB_STRTOD = @GNULIB_STRTOD@
+GNULIB_STRTOIMAX = @GNULIB_STRTOIMAX@
+GNULIB_STRTOK_R = @GNULIB_STRTOK_R@
+GNULIB_STRTOLL = @GNULIB_STRTOLL@
+GNULIB_STRTOULL = @GNULIB_STRTOULL@
+GNULIB_STRTOUMAX = @GNULIB_STRTOUMAX@
+GNULIB_STRVERSCMP = @GNULIB_STRVERSCMP@
+GNULIB_SYMLINK = @GNULIB_SYMLINK@
+GNULIB_SYMLINKAT = @GNULIB_SYMLINKAT@
+GNULIB_SYSTEM_POSIX = @GNULIB_SYSTEM_POSIX@
+GNULIB_TEST_WARN_CFLAGS = @GNULIB_TEST_WARN_CFLAGS@
+GNULIB_TIMEGM = @GNULIB_TIMEGM@
+GNULIB_TIME_R = @GNULIB_TIME_R@
+GNULIB_TIME_RZ = @GNULIB_TIME_RZ@
+GNULIB_TMPFILE = @GNULIB_TMPFILE@
+GNULIB_TOWCTRANS = @GNULIB_TOWCTRANS@
+GNULIB_TTYNAME_R = @GNULIB_TTYNAME_R@
+GNULIB_UNISTD_H_NONBLOCKING = @GNULIB_UNISTD_H_NONBLOCKING@
+GNULIB_UNISTD_H_SIGPIPE = @GNULIB_UNISTD_H_SIGPIPE@
+GNULIB_UNLINK = @GNULIB_UNLINK@
+GNULIB_UNLINKAT = @GNULIB_UNLINKAT@
+GNULIB_UNLOCKPT = @GNULIB_UNLOCKPT@
+GNULIB_UNSETENV = @GNULIB_UNSETENV@
+GNULIB_USLEEP = @GNULIB_USLEEP@
+GNULIB_UTIMENSAT = @GNULIB_UTIMENSAT@
+GNULIB_VASPRINTF = @GNULIB_VASPRINTF@
+GNULIB_VDPRINTF = @GNULIB_VDPRINTF@
+GNULIB_VFPRINTF = @GNULIB_VFPRINTF@
+GNULIB_VFPRINTF_POSIX = @GNULIB_VFPRINTF_POSIX@
+GNULIB_VFSCANF = @GNULIB_VFSCANF@
+GNULIB_VPRINTF = @GNULIB_VPRINTF@
+GNULIB_VPRINTF_POSIX = @GNULIB_VPRINTF_POSIX@
+GNULIB_VSCANF = @GNULIB_VSCANF@
+GNULIB_VSNPRINTF = @GNULIB_VSNPRINTF@
+GNULIB_VSPRINTF_POSIX = @GNULIB_VSPRINTF_POSIX@
+GNULIB_WCPCPY = @GNULIB_WCPCPY@
+GNULIB_WCPNCPY = @GNULIB_WCPNCPY@
+GNULIB_WCRTOMB = @GNULIB_WCRTOMB@
+GNULIB_WCSCASECMP = @GNULIB_WCSCASECMP@
+GNULIB_WCSCAT = @GNULIB_WCSCAT@
+GNULIB_WCSCHR = @GNULIB_WCSCHR@
+GNULIB_WCSCMP = @GNULIB_WCSCMP@
+GNULIB_WCSCOLL = @GNULIB_WCSCOLL@
+GNULIB_WCSCPY = @GNULIB_WCSCPY@
+GNULIB_WCSCSPN = @GNULIB_WCSCSPN@
+GNULIB_WCSDUP = @GNULIB_WCSDUP@
+GNULIB_WCSLEN = @GNULIB_WCSLEN@
+GNULIB_WCSNCASECMP = @GNULIB_WCSNCASECMP@
+GNULIB_WCSNCAT = @GNULIB_WCSNCAT@
+GNULIB_WCSNCMP = @GNULIB_WCSNCMP@
+GNULIB_WCSNCPY = @GNULIB_WCSNCPY@
+GNULIB_WCSNLEN = @GNULIB_WCSNLEN@
+GNULIB_WCSNRTOMBS = @GNULIB_WCSNRTOMBS@
+GNULIB_WCSPBRK = @GNULIB_WCSPBRK@
+GNULIB_WCSRCHR = @GNULIB_WCSRCHR@
+GNULIB_WCSRTOMBS = @GNULIB_WCSRTOMBS@
+GNULIB_WCSSPN = @GNULIB_WCSSPN@
+GNULIB_WCSSTR = @GNULIB_WCSSTR@
+GNULIB_WCSTOK = @GNULIB_WCSTOK@
+GNULIB_WCSWIDTH = @GNULIB_WCSWIDTH@
+GNULIB_WCSXFRM = @GNULIB_WCSXFRM@
+GNULIB_WCTOB = @GNULIB_WCTOB@
+GNULIB_WCTOMB = @GNULIB_WCTOMB@
+GNULIB_WCTRANS = @GNULIB_WCTRANS@
+GNULIB_WCTYPE = @GNULIB_WCTYPE@
+GNULIB_WCWIDTH = @GNULIB_WCWIDTH@
+GNULIB_WMEMCHR = @GNULIB_WMEMCHR@
+GNULIB_WMEMCMP = @GNULIB_WMEMCMP@
+GNULIB_WMEMCPY = @GNULIB_WMEMCPY@
+GNULIB_WMEMMOVE = @GNULIB_WMEMMOVE@
+GNULIB_WMEMSET = @GNULIB_WMEMSET@
+GNULIB_WRITE = @GNULIB_WRITE@
+GNULIB__EXIT = @GNULIB__EXIT@
+GREP = @GREP@
+HAVE_ALPHASORT = @HAVE_ALPHASORT@
+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_DECL_DIRFD = @HAVE_DECL_DIRFD@
+HAVE_DECL_ENVIRON = @HAVE_DECL_ENVIRON@
+HAVE_DECL_FCHDIR = @HAVE_DECL_FCHDIR@
+HAVE_DECL_FDATASYNC = @HAVE_DECL_FDATASYNC@
+HAVE_DECL_FDOPENDIR = @HAVE_DECL_FDOPENDIR@
+HAVE_DECL_FPURGE = @HAVE_DECL_FPURGE@
+HAVE_DECL_FSEEKO = @HAVE_DECL_FSEEKO@
+HAVE_DECL_FTELLO = @HAVE_DECL_FTELLO@
+HAVE_DECL_GETDELIM = @HAVE_DECL_GETDELIM@
+HAVE_DECL_GETDOMAINNAME = @HAVE_DECL_GETDOMAINNAME@
+HAVE_DECL_GETLINE = @HAVE_DECL_GETLINE@
+HAVE_DECL_GETLOADAVG = @HAVE_DECL_GETLOADAVG@
+HAVE_DECL_GETLOGIN = @HAVE_DECL_GETLOGIN@
+HAVE_DECL_GETLOGIN_R = @HAVE_DECL_GETLOGIN_R@
+HAVE_DECL_GETPAGESIZE = @HAVE_DECL_GETPAGESIZE@
+HAVE_DECL_GETUSERSHELL = @HAVE_DECL_GETUSERSHELL@
+HAVE_DECL_IMAXABS = @HAVE_DECL_IMAXABS@
+HAVE_DECL_IMAXDIV = @HAVE_DECL_IMAXDIV@
+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_SNPRINTF = @HAVE_DECL_SNPRINTF@
+HAVE_DECL_STRDUP = @HAVE_DECL_STRDUP@
+HAVE_DECL_STRERROR_R = @HAVE_DECL_STRERROR_R@
+HAVE_DECL_STRNDUP = @HAVE_DECL_STRNDUP@
+HAVE_DECL_STRNLEN = @HAVE_DECL_STRNLEN@
+HAVE_DECL_STRSIGNAL = @HAVE_DECL_STRSIGNAL@
+HAVE_DECL_STRTOIMAX = @HAVE_DECL_STRTOIMAX@
+HAVE_DECL_STRTOK_R = @HAVE_DECL_STRTOK_R@
+HAVE_DECL_STRTOUMAX = @HAVE_DECL_STRTOUMAX@
+HAVE_DECL_TTYNAME_R = @HAVE_DECL_TTYNAME_R@
+HAVE_DECL_UNSETENV = @HAVE_DECL_UNSETENV@
+HAVE_DECL_VSNPRINTF = @HAVE_DECL_VSNPRINTF@
+HAVE_DECL_WCTOB = @HAVE_DECL_WCTOB@
+HAVE_DECL_WCWIDTH = @HAVE_DECL_WCWIDTH@
+HAVE_DIRENT_H = @HAVE_DIRENT_H@
+HAVE_DPRINTF = @HAVE_DPRINTF@
+HAVE_DUP2 = @HAVE_DUP2@
+HAVE_DUP3 = @HAVE_DUP3@
+HAVE_DUPLOCALE = @HAVE_DUPLOCALE@
+HAVE_EUIDACCESS = @HAVE_EUIDACCESS@
+HAVE_FACCESSAT = @HAVE_FACCESSAT@
+HAVE_FCHDIR = @HAVE_FCHDIR@
+HAVE_FCHMODAT = @HAVE_FCHMODAT@
+HAVE_FCHOWNAT = @HAVE_FCHOWNAT@
+HAVE_FCNTL = @HAVE_FCNTL@
+HAVE_FDATASYNC = @HAVE_FDATASYNC@
+HAVE_FDOPENDIR = @HAVE_FDOPENDIR@
+HAVE_FEATURES_H = @HAVE_FEATURES_H@
+HAVE_FFSL = @HAVE_FFSL@
+HAVE_FFSLL = @HAVE_FFSLL@
+HAVE_FSEEKO = @HAVE_FSEEKO@
+HAVE_FSTATAT = @HAVE_FSTATAT@
+HAVE_FSYNC = @HAVE_FSYNC@
+HAVE_FTELLO = @HAVE_FTELLO@
+HAVE_FTRUNCATE = @HAVE_FTRUNCATE@
+HAVE_FUTIMENS = @HAVE_FUTIMENS@
+HAVE_GETDTABLESIZE = @HAVE_GETDTABLESIZE@
+HAVE_GETGROUPS = @HAVE_GETGROUPS@
+HAVE_GETHOSTNAME = @HAVE_GETHOSTNAME@
+HAVE_GETLOGIN = @HAVE_GETLOGIN@
+HAVE_GETOPT_H = @HAVE_GETOPT_H@
+HAVE_GETPAGESIZE = @HAVE_GETPAGESIZE@
+HAVE_GETSUBOPT = @HAVE_GETSUBOPT@
+HAVE_GETTIMEOFDAY = @HAVE_GETTIMEOFDAY@
+HAVE_GRANTPT = @HAVE_GRANTPT@
+HAVE_GROUP_MEMBER = @HAVE_GROUP_MEMBER@
+HAVE_INTTYPES_H = @HAVE_INTTYPES_H@
+HAVE_ISBLANK = @HAVE_ISBLANK@
+HAVE_ISWBLANK = @HAVE_ISWBLANK@
+HAVE_ISWCNTRL = @HAVE_ISWCNTRL@
+HAVE_LANGINFO_CODESET = @HAVE_LANGINFO_CODESET@
+HAVE_LANGINFO_ERA = @HAVE_LANGINFO_ERA@
+HAVE_LANGINFO_H = @HAVE_LANGINFO_H@
+HAVE_LANGINFO_T_FMT_AMPM = @HAVE_LANGINFO_T_FMT_AMPM@
+HAVE_LANGINFO_YESEXPR = @HAVE_LANGINFO_YESEXPR@
+HAVE_LCHMOD = @HAVE_LCHMOD@
+HAVE_LCHOWN = @HAVE_LCHOWN@
+HAVE_LINK = @HAVE_LINK@
+HAVE_LINKAT = @HAVE_LINKAT@
+HAVE_LONG_LONG_INT = @HAVE_LONG_LONG_INT@
+HAVE_LSTAT = @HAVE_LSTAT@
+HAVE_MAX_ALIGN_T = @HAVE_MAX_ALIGN_T@
+HAVE_MBRLEN = @HAVE_MBRLEN@
+HAVE_MBRTOWC = @HAVE_MBRTOWC@
+HAVE_MBSINIT = @HAVE_MBSINIT@
+HAVE_MBSLEN = @HAVE_MBSLEN@
+HAVE_MBSNRTOWCS = @HAVE_MBSNRTOWCS@
+HAVE_MBSRTOWCS = @HAVE_MBSRTOWCS@
+HAVE_MEMCHR = @HAVE_MEMCHR@
+HAVE_MEMPCPY = @HAVE_MEMPCPY@
+HAVE_MKDIRAT = @HAVE_MKDIRAT@
+HAVE_MKDTEMP = @HAVE_MKDTEMP@
+HAVE_MKFIFO = @HAVE_MKFIFO@
+HAVE_MKFIFOAT = @HAVE_MKFIFOAT@
+HAVE_MKNOD = @HAVE_MKNOD@
+HAVE_MKNODAT = @HAVE_MKNODAT@
+HAVE_MKOSTEMP = @HAVE_MKOSTEMP@
+HAVE_MKOSTEMPS = @HAVE_MKOSTEMPS@
+HAVE_MKSTEMP = @HAVE_MKSTEMP@
+HAVE_MKSTEMPS = @HAVE_MKSTEMPS@
+HAVE_MSVC_INVALID_PARAMETER_HANDLER = @HAVE_MSVC_INVALID_PARAMETER_HANDLER@
+HAVE_NANOSLEEP = @HAVE_NANOSLEEP@
+HAVE_NL_LANGINFO = @HAVE_NL_LANGINFO@
+HAVE_OPENAT = @HAVE_OPENAT@
+HAVE_OPENDIR = @HAVE_OPENDIR@
+HAVE_OS_H = @HAVE_OS_H@
+HAVE_PCLOSE = @HAVE_PCLOSE@
+HAVE_PIPE = @HAVE_PIPE@
+HAVE_PIPE2 = @HAVE_PIPE2@
+HAVE_POPEN = @HAVE_POPEN@
+HAVE_POSIX_OPENPT = @HAVE_POSIX_OPENPT@
+HAVE_PREAD = @HAVE_PREAD@
+HAVE_PTSNAME = @HAVE_PTSNAME@
+HAVE_PTSNAME_R = @HAVE_PTSNAME_R@
+HAVE_PWRITE = @HAVE_PWRITE@
+HAVE_QSORT_R = @HAVE_QSORT_R@
+HAVE_RANDOM = @HAVE_RANDOM@
+HAVE_RANDOM_H = @HAVE_RANDOM_H@
+HAVE_RANDOM_R = @HAVE_RANDOM_R@
+HAVE_RAWMEMCHR = @HAVE_RAWMEMCHR@
+HAVE_READDIR = @HAVE_READDIR@
+HAVE_READLINK = @HAVE_READLINK@
+HAVE_READLINKAT = @HAVE_READLINKAT@
+HAVE_REALPATH = @HAVE_REALPATH@
+HAVE_RENAMEAT = @HAVE_RENAMEAT@
+HAVE_REWINDDIR = @HAVE_REWINDDIR@
+HAVE_RPMATCH = @HAVE_RPMATCH@
+HAVE_SCANDIR = @HAVE_SCANDIR@
+HAVE_SECURE_GETENV = @HAVE_SECURE_GETENV@
+HAVE_SETENV = @HAVE_SETENV@
+HAVE_SETHOSTNAME = @HAVE_SETHOSTNAME@
+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_SLEEP = @HAVE_SLEEP@
+HAVE_STDINT_H = @HAVE_STDINT_H@
+HAVE_STPCPY = @HAVE_STPCPY@
+HAVE_STPNCPY = @HAVE_STPNCPY@
+HAVE_STRCASESTR = @HAVE_STRCASESTR@
+HAVE_STRCHRNUL = @HAVE_STRCHRNUL@
+HAVE_STRPBRK = @HAVE_STRPBRK@
+HAVE_STRPTIME = @HAVE_STRPTIME@
+HAVE_STRSEP = @HAVE_STRSEP@
+HAVE_STRTOD = @HAVE_STRTOD@
+HAVE_STRTOLL = @HAVE_STRTOLL@
+HAVE_STRTOULL = @HAVE_STRTOULL@
+HAVE_STRUCT_RANDOM_DATA = @HAVE_STRUCT_RANDOM_DATA@
+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_INTTYPES_H = @HAVE_SYS_INTTYPES_H@
+HAVE_SYS_LOADAVG_H = @HAVE_SYS_LOADAVG_H@
+HAVE_SYS_PARAM_H = @HAVE_SYS_PARAM_H@
+HAVE_SYS_TIME_H = @HAVE_SYS_TIME_H@
+HAVE_SYS_TYPES_H = @HAVE_SYS_TYPES_H@
+HAVE_TIMEGM = @HAVE_TIMEGM@
+HAVE_TIMEZONE_T = @HAVE_TIMEZONE_T@
+HAVE_UNISTD_H = @HAVE_UNISTD_H@
+HAVE_UNLINKAT = @HAVE_UNLINKAT@
+HAVE_UNLOCKPT = @HAVE_UNLOCKPT@
+HAVE_UNSIGNED_LONG_LONG_INT = @HAVE_UNSIGNED_LONG_LONG_INT@
+HAVE_USLEEP = @HAVE_USLEEP@
+HAVE_UTIMENSAT = @HAVE_UTIMENSAT@
+HAVE_VASPRINTF = @HAVE_VASPRINTF@
+HAVE_VDPRINTF = @HAVE_VDPRINTF@
+HAVE_WCHAR_H = @HAVE_WCHAR_H@
+HAVE_WCHAR_T = @HAVE_WCHAR_T@
+HAVE_WCPCPY = @HAVE_WCPCPY@
+HAVE_WCPNCPY = @HAVE_WCPNCPY@
+HAVE_WCRTOMB = @HAVE_WCRTOMB@
+HAVE_WCSCASECMP = @HAVE_WCSCASECMP@
+HAVE_WCSCAT = @HAVE_WCSCAT@
+HAVE_WCSCHR = @HAVE_WCSCHR@
+HAVE_WCSCMP = @HAVE_WCSCMP@
+HAVE_WCSCOLL = @HAVE_WCSCOLL@
+HAVE_WCSCPY = @HAVE_WCSCPY@
+HAVE_WCSCSPN = @HAVE_WCSCSPN@
+HAVE_WCSDUP = @HAVE_WCSDUP@
+HAVE_WCSLEN = @HAVE_WCSLEN@
+HAVE_WCSNCASECMP = @HAVE_WCSNCASECMP@
+HAVE_WCSNCAT = @HAVE_WCSNCAT@
+HAVE_WCSNCMP = @HAVE_WCSNCMP@
+HAVE_WCSNCPY = @HAVE_WCSNCPY@
+HAVE_WCSNLEN = @HAVE_WCSNLEN@
+HAVE_WCSNRTOMBS = @HAVE_WCSNRTOMBS@
+HAVE_WCSPBRK = @HAVE_WCSPBRK@
+HAVE_WCSRCHR = @HAVE_WCSRCHR@
+HAVE_WCSRTOMBS = @HAVE_WCSRTOMBS@
+HAVE_WCSSPN = @HAVE_WCSSPN@
+HAVE_WCSSTR = @HAVE_WCSSTR@
+HAVE_WCSTOK = @HAVE_WCSTOK@
+HAVE_WCSWIDTH = @HAVE_WCSWIDTH@
+HAVE_WCSXFRM = @HAVE_WCSXFRM@
+HAVE_WCTRANS_T = @HAVE_WCTRANS_T@
+HAVE_WCTYPE_H = @HAVE_WCTYPE_H@
+HAVE_WCTYPE_T = @HAVE_WCTYPE_T@
+HAVE_WINSOCK2_H = @HAVE_WINSOCK2_H@
+HAVE_WINT_T = @HAVE_WINT_T@
+HAVE_WMEMCHR = @HAVE_WMEMCHR@
+HAVE_WMEMCMP = @HAVE_WMEMCMP@
+HAVE_WMEMCPY = @HAVE_WMEMCPY@
+HAVE_WMEMMOVE = @HAVE_WMEMMOVE@
+HAVE_WMEMSET = @HAVE_WMEMSET@
+HAVE_XLOCALE_H = @HAVE_XLOCALE_H@
+HAVE__BOOL = @HAVE__BOOL@
+HAVE__EXIT = @HAVE__EXIT@
+INCLUDE_NEXT = @INCLUDE_NEXT@
+INCLUDE_NEXT_AS_FIRST_DIRECTIVE = @INCLUDE_NEXT_AS_FIRST_DIRECTIVE@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+INT32_MAX_LT_INTMAX_MAX = @INT32_MAX_LT_INTMAX_MAX@
+INT64_MAX_EQ_LONG_MAX = @INT64_MAX_EQ_LONG_MAX@
+INTLLIBS = @INTLLIBS@
+INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@
+LDFLAGS = @LDFLAGS@
+LIBICONV = @LIBICONV@
+LIBINTL = @LIBINTL@
+LIBMULTITHREAD = @LIBMULTITHREAD@
+LIBOBJS = @LIBOBJS@
+LIBPTH = @LIBPTH@
+LIBPTH_PREFIX = @LIBPTH_PREFIX@
+LIBS = @LIBS@
+LIBSED_LIBDEPS = @LIBSED_LIBDEPS@
+LIBSED_LTLIBDEPS = @LIBSED_LTLIBDEPS@
+LIBTESTS_LIBDEPS = @LIBTESTS_LIBDEPS@
+LIBTHREAD = @LIBTHREAD@
+LIB_ACL = @LIB_ACL@
+LIB_HAS_ACL = @LIB_HAS_ACL@
+LIB_SELINUX = @LIB_SELINUX@
+LIMITS_H = @LIMITS_H@
+LOCALCHARSET_TESTS_ENVIRONMENT = @LOCALCHARSET_TESTS_ENVIRONMENT@
+LOCALE_FR = @LOCALE_FR@
+LOCALE_FR_UTF8 = @LOCALE_FR_UTF8@
+LOCALE_JA = @LOCALE_JA@
+LOCALE_TR_UTF8 = @LOCALE_TR_UTF8@
+LOCALE_ZH_CN = @LOCALE_ZH_CN@
+LTLIBICONV = @LTLIBICONV@
+LTLIBINTL = @LTLIBINTL@
+LTLIBMULTITHREAD = @LTLIBMULTITHREAD@
+LTLIBOBJS = @LTLIBOBJS@
+LTLIBPTH = @LTLIBPTH@
+LTLIBTHREAD = @LTLIBTHREAD@
+MAKEINFO = @MAKEINFO@
+MKDIR_P = @MKDIR_P@
+MSGFMT = @MSGFMT@
+MSGFMT_015 = @MSGFMT_015@
+MSGMERGE = @MSGMERGE@
+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@
+NEXT_AS_FIRST_DIRECTIVE_FCNTL_H = @NEXT_AS_FIRST_DIRECTIVE_FCNTL_H@
+NEXT_AS_FIRST_DIRECTIVE_GETOPT_H = @NEXT_AS_FIRST_DIRECTIVE_GETOPT_H@
+NEXT_AS_FIRST_DIRECTIVE_INTTYPES_H = @NEXT_AS_FIRST_DIRECTIVE_INTTYPES_H@
+NEXT_AS_FIRST_DIRECTIVE_LANGINFO_H = @NEXT_AS_FIRST_DIRECTIVE_LANGINFO_H@
+NEXT_AS_FIRST_DIRECTIVE_LIMITS_H = @NEXT_AS_FIRST_DIRECTIVE_LIMITS_H@
+NEXT_AS_FIRST_DIRECTIVE_LOCALE_H = @NEXT_AS_FIRST_DIRECTIVE_LOCALE_H@
+NEXT_AS_FIRST_DIRECTIVE_SELINUX_SELINUX_H = @NEXT_AS_FIRST_DIRECTIVE_SELINUX_SELINUX_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_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_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@
+NEXT_AS_FIRST_DIRECTIVE_WCTYPE_H = @NEXT_AS_FIRST_DIRECTIVE_WCTYPE_H@
+NEXT_CTYPE_H = @NEXT_CTYPE_H@
+NEXT_DIRENT_H = @NEXT_DIRENT_H@
+NEXT_ERRNO_H = @NEXT_ERRNO_H@
+NEXT_FCNTL_H = @NEXT_FCNTL_H@
+NEXT_GETOPT_H = @NEXT_GETOPT_H@
+NEXT_INTTYPES_H = @NEXT_INTTYPES_H@
+NEXT_LANGINFO_H = @NEXT_LANGINFO_H@
+NEXT_LIMITS_H = @NEXT_LIMITS_H@
+NEXT_LOCALE_H = @NEXT_LOCALE_H@
+NEXT_SELINUX_SELINUX_H = @NEXT_SELINUX_SELINUX_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_STAT_H = @NEXT_SYS_STAT_H@
+NEXT_SYS_TIME_H = @NEXT_SYS_TIME_H@
+NEXT_SYS_TYPES_H = @NEXT_SYS_TYPES_H@
+NEXT_TIME_H = @NEXT_TIME_H@
+NEXT_UNISTD_H = @NEXT_UNISTD_H@
+NEXT_WCHAR_H = @NEXT_WCHAR_H@
+NEXT_WCTYPE_H = @NEXT_WCTYPE_H@
+OBJEXT = @OBJEXT@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_URL = @PACKAGE_URL@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+POSUB = @POSUB@
+PRAGMA_COLUMNS = @PRAGMA_COLUMNS@
+PRAGMA_SYSTEM_HEADER = @PRAGMA_SYSTEM_HEADER@
+PRIPTR_PREFIX = @PRIPTR_PREFIX@
+PRI_MACROS_BROKEN = @PRI_MACROS_BROKEN@
+PTHREAD_H_DEFINES_STRUCT_TIMESPEC = @PTHREAD_H_DEFINES_STRUCT_TIMESPEC@
+PTRDIFF_T_SUFFIX = @PTRDIFF_T_SUFFIX@
+RANLIB = @RANLIB@
+REPLACE_BTOWC = @REPLACE_BTOWC@
+REPLACE_CALLOC = @REPLACE_CALLOC@
+REPLACE_CANONICALIZE_FILE_NAME = @REPLACE_CANONICALIZE_FILE_NAME@
+REPLACE_CHOWN = @REPLACE_CHOWN@
+REPLACE_CLOSE = @REPLACE_CLOSE@
+REPLACE_CLOSEDIR = @REPLACE_CLOSEDIR@
+REPLACE_DIRFD = @REPLACE_DIRFD@
+REPLACE_DPRINTF = @REPLACE_DPRINTF@
+REPLACE_DUP = @REPLACE_DUP@
+REPLACE_DUP2 = @REPLACE_DUP2@
+REPLACE_DUPLOCALE = @REPLACE_DUPLOCALE@
+REPLACE_FCHOWNAT = @REPLACE_FCHOWNAT@
+REPLACE_FCLOSE = @REPLACE_FCLOSE@
+REPLACE_FCNTL = @REPLACE_FCNTL@
+REPLACE_FDOPEN = @REPLACE_FDOPEN@
+REPLACE_FDOPENDIR = @REPLACE_FDOPENDIR@
+REPLACE_FFLUSH = @REPLACE_FFLUSH@
+REPLACE_FOPEN = @REPLACE_FOPEN@
+REPLACE_FPRINTF = @REPLACE_FPRINTF@
+REPLACE_FPURGE = @REPLACE_FPURGE@
+REPLACE_FREOPEN = @REPLACE_FREOPEN@
+REPLACE_FSEEK = @REPLACE_FSEEK@
+REPLACE_FSEEKO = @REPLACE_FSEEKO@
+REPLACE_FSTAT = @REPLACE_FSTAT@
+REPLACE_FSTATAT = @REPLACE_FSTATAT@
+REPLACE_FTELL = @REPLACE_FTELL@
+REPLACE_FTELLO = @REPLACE_FTELLO@
+REPLACE_FTRUNCATE = @REPLACE_FTRUNCATE@
+REPLACE_FUTIMENS = @REPLACE_FUTIMENS@
+REPLACE_GETCWD = @REPLACE_GETCWD@
+REPLACE_GETDELIM = @REPLACE_GETDELIM@
+REPLACE_GETDOMAINNAME = @REPLACE_GETDOMAINNAME@
+REPLACE_GETDTABLESIZE = @REPLACE_GETDTABLESIZE@
+REPLACE_GETGROUPS = @REPLACE_GETGROUPS@
+REPLACE_GETLINE = @REPLACE_GETLINE@
+REPLACE_GETLOGIN_R = @REPLACE_GETLOGIN_R@
+REPLACE_GETPAGESIZE = @REPLACE_GETPAGESIZE@
+REPLACE_GETTIMEOFDAY = @REPLACE_GETTIMEOFDAY@
+REPLACE_GMTIME = @REPLACE_GMTIME@
+REPLACE_ISATTY = @REPLACE_ISATTY@
+REPLACE_ISWBLANK = @REPLACE_ISWBLANK@
+REPLACE_ISWCNTRL = @REPLACE_ISWCNTRL@
+REPLACE_LCHOWN = @REPLACE_LCHOWN@
+REPLACE_LINK = @REPLACE_LINK@
+REPLACE_LINKAT = @REPLACE_LINKAT@
+REPLACE_LOCALECONV = @REPLACE_LOCALECONV@
+REPLACE_LOCALTIME = @REPLACE_LOCALTIME@
+REPLACE_LOCALTIME_R = @REPLACE_LOCALTIME_R@
+REPLACE_LSEEK = @REPLACE_LSEEK@
+REPLACE_LSTAT = @REPLACE_LSTAT@
+REPLACE_MALLOC = @REPLACE_MALLOC@
+REPLACE_MBRLEN = @REPLACE_MBRLEN@
+REPLACE_MBRTOWC = @REPLACE_MBRTOWC@
+REPLACE_MBSINIT = @REPLACE_MBSINIT@
+REPLACE_MBSNRTOWCS = @REPLACE_MBSNRTOWCS@
+REPLACE_MBSRTOWCS = @REPLACE_MBSRTOWCS@
+REPLACE_MBSTATE_T = @REPLACE_MBSTATE_T@
+REPLACE_MBTOWC = @REPLACE_MBTOWC@
+REPLACE_MEMCHR = @REPLACE_MEMCHR@
+REPLACE_MEMMEM = @REPLACE_MEMMEM@
+REPLACE_MKDIR = @REPLACE_MKDIR@
+REPLACE_MKFIFO = @REPLACE_MKFIFO@
+REPLACE_MKNOD = @REPLACE_MKNOD@
+REPLACE_MKSTEMP = @REPLACE_MKSTEMP@
+REPLACE_MKTIME = @REPLACE_MKTIME@
+REPLACE_NANOSLEEP = @REPLACE_NANOSLEEP@
+REPLACE_NL_LANGINFO = @REPLACE_NL_LANGINFO@
+REPLACE_NULL = @REPLACE_NULL@
+REPLACE_OBSTACK_PRINTF = @REPLACE_OBSTACK_PRINTF@
+REPLACE_OPEN = @REPLACE_OPEN@
+REPLACE_OPENAT = @REPLACE_OPENAT@
+REPLACE_OPENDIR = @REPLACE_OPENDIR@
+REPLACE_PERROR = @REPLACE_PERROR@
+REPLACE_POPEN = @REPLACE_POPEN@
+REPLACE_PREAD = @REPLACE_PREAD@
+REPLACE_PRINTF = @REPLACE_PRINTF@
+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_RANDOM_R = @REPLACE_RANDOM_R@
+REPLACE_READ = @REPLACE_READ@
+REPLACE_READLINK = @REPLACE_READLINK@
+REPLACE_READLINKAT = @REPLACE_READLINKAT@
+REPLACE_REALLOC = @REPLACE_REALLOC@
+REPLACE_REALPATH = @REPLACE_REALPATH@
+REPLACE_REMOVE = @REPLACE_REMOVE@
+REPLACE_RENAME = @REPLACE_RENAME@
+REPLACE_RENAMEAT = @REPLACE_RENAMEAT@
+REPLACE_RMDIR = @REPLACE_RMDIR@
+REPLACE_SETENV = @REPLACE_SETENV@
+REPLACE_SETLOCALE = @REPLACE_SETLOCALE@
+REPLACE_SLEEP = @REPLACE_SLEEP@
+REPLACE_SNPRINTF = @REPLACE_SNPRINTF@
+REPLACE_SPRINTF = @REPLACE_SPRINTF@
+REPLACE_STAT = @REPLACE_STAT@
+REPLACE_STDIO_READ_FUNCS = @REPLACE_STDIO_READ_FUNCS@
+REPLACE_STDIO_WRITE_FUNCS = @REPLACE_STDIO_WRITE_FUNCS@
+REPLACE_STPNCPY = @REPLACE_STPNCPY@
+REPLACE_STRCASESTR = @REPLACE_STRCASESTR@
+REPLACE_STRCHRNUL = @REPLACE_STRCHRNUL@
+REPLACE_STRDUP = @REPLACE_STRDUP@
+REPLACE_STRERROR = @REPLACE_STRERROR@
+REPLACE_STRERROR_R = @REPLACE_STRERROR_R@
+REPLACE_STRNCAT = @REPLACE_STRNCAT@
+REPLACE_STRNDUP = @REPLACE_STRNDUP@
+REPLACE_STRNLEN = @REPLACE_STRNLEN@
+REPLACE_STRSIGNAL = @REPLACE_STRSIGNAL@
+REPLACE_STRSTR = @REPLACE_STRSTR@
+REPLACE_STRTOD = @REPLACE_STRTOD@
+REPLACE_STRTOIMAX = @REPLACE_STRTOIMAX@
+REPLACE_STRTOK_R = @REPLACE_STRTOK_R@
+REPLACE_STRTOUMAX = @REPLACE_STRTOUMAX@
+REPLACE_STRUCT_LCONV = @REPLACE_STRUCT_LCONV@
+REPLACE_STRUCT_TIMEVAL = @REPLACE_STRUCT_TIMEVAL@
+REPLACE_SYMLINK = @REPLACE_SYMLINK@
+REPLACE_SYMLINKAT = @REPLACE_SYMLINKAT@
+REPLACE_TIMEGM = @REPLACE_TIMEGM@
+REPLACE_TMPFILE = @REPLACE_TMPFILE@
+REPLACE_TOWLOWER = @REPLACE_TOWLOWER@
+REPLACE_TTYNAME_R = @REPLACE_TTYNAME_R@
+REPLACE_UNLINK = @REPLACE_UNLINK@
+REPLACE_UNLINKAT = @REPLACE_UNLINKAT@
+REPLACE_UNSETENV = @REPLACE_UNSETENV@
+REPLACE_USLEEP = @REPLACE_USLEEP@
+REPLACE_UTIMENSAT = @REPLACE_UTIMENSAT@
+REPLACE_VASPRINTF = @REPLACE_VASPRINTF@
+REPLACE_VDPRINTF = @REPLACE_VDPRINTF@
+REPLACE_VFPRINTF = @REPLACE_VFPRINTF@
+REPLACE_VPRINTF = @REPLACE_VPRINTF@
+REPLACE_VSNPRINTF = @REPLACE_VSNPRINTF@
+REPLACE_VSPRINTF = @REPLACE_VSPRINTF@
+REPLACE_WCRTOMB = @REPLACE_WCRTOMB@
+REPLACE_WCSNRTOMBS = @REPLACE_WCSNRTOMBS@
+REPLACE_WCSRTOMBS = @REPLACE_WCSRTOMBS@
+REPLACE_WCSWIDTH = @REPLACE_WCSWIDTH@
+REPLACE_WCTOB = @REPLACE_WCTOB@
+REPLACE_WCTOMB = @REPLACE_WCTOMB@
+REPLACE_WCWIDTH = @REPLACE_WCWIDTH@
+REPLACE_WRITE = @REPLACE_WRITE@
+SED = @SED@
+SELINUX_CONTEXT_H = @SELINUX_CONTEXT_H@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+SIG_ATOMIC_T_SUFFIX = @SIG_ATOMIC_T_SUFFIX@
+SIZE_T_SUFFIX = @SIZE_T_SUFFIX@
+STDALIGN_H = @STDALIGN_H@
+STDARG_H = @STDARG_H@
+STDBOOL_H = @STDBOOL_H@
+STDDEF_H = @STDDEF_H@
+STDINT_H = @STDINT_H@
+STRIP = @STRIP@
+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@
+UINT64_MAX_EQ_ULONG_MAX = @UINT64_MAX_EQ_ULONG_MAX@
+UNDEFINE_STRTOK_R = @UNDEFINE_STRTOK_R@
+UNISTD_H_DEFINES_STRUCT_TIMESPEC = @UNISTD_H_DEFINES_STRUCT_TIMESPEC@
+UNISTD_H_HAVE_WINSOCK2_H = @UNISTD_H_HAVE_WINSOCK2_H@
+UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS = @UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS@
+USE_ACL = @USE_ACL@
+USE_NLS = @USE_NLS@
+VERSION = @VERSION@
+WARN_CFLAGS = @WARN_CFLAGS@
+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@
+WINT_T_SUFFIX = @WINT_T_SUFFIX@
+XGETTEXT = @XGETTEXT@
+XGETTEXT_015 = @XGETTEXT_015@
+XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@
+abs_aux_dir = @abs_aux_dir@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
+ac_ct_AR = @ac_ct_AR@
+ac_ct_CC = @ac_ct_CC@
+am__include = @am__include@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+builddir = @builddir@
+datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
+exec_prefix = @exec_prefix@
+gl_LIBOBJS = @gl_LIBOBJS@
+gl_LTLIBOBJS = @gl_LTLIBOBJS@
+gltests_LIBOBJS = @gltests_LIBOBJS@
+gltests_LTLIBOBJS = @gltests_LTLIBOBJS@
+gltests_WITNESS = @gltests_WITNESS@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+htmldir = @htmldir@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+lispdir = @lispdir@
+localedir = @localedir@
+localstatedir = @localstatedir@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+psdir = @psdir@
+runstatedir = @runstatedir@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
+sysconfdir = @sysconfdir@
+target_alias = @target_alias@
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+AUTOMAKE_OPTIONS = 1.9.6 foreign
+SUBDIRS = .
+TESTS_ENVIRONMENT = EXEEXT='@EXEEXT@' srcdir='$(srcdir)' \
+ USE_ACL=$(USE_ACL) LOCALE_FR='@LOCALE_FR@' \
+ LOCALE_FR_UTF8='@LOCALE_FR_UTF8@' LOCALE_FR='@LOCALE_FR@' \
+ LOCALE_TR_UTF8='@LOCALE_TR_UTF8@' USE_ACL=$(USE_ACL) \
+ LOCALE_FR='@LOCALE_FR@' LOCALE_FR_UTF8='@LOCALE_FR_UTF8@' \
+ LOCALE_JA='@LOCALE_JA@' LOCALE_ZH_CN='@LOCALE_ZH_CN@' \
+ LOCALE_FR_UTF8='@LOCALE_FR_UTF8@' LOCALE_FR='@LOCALE_FR@' \
+ LOCALE_FR_UTF8='@LOCALE_FR_UTF8@' LOCALE_FR='@LOCALE_FR@' \
+ LOCALE_FR_UTF8='@LOCALE_FR_UTF8@' LOCALE_JA='@LOCALE_JA@' \
+ LOCALE_ZH_CN='@LOCALE_ZH_CN@' abs_aux_dir='$(abs_aux_dir)' \
+ abs_aux_dir='$(abs_aux_dir)' MAKE='$(MAKE)' \
+ LOCALE_FR='@LOCALE_FR@' LOCALE_FR_UTF8='@LOCALE_FR_UTF8@' \
+ LOCALE_JA='@LOCALE_JA@' LOCALE_ZH_CN='@LOCALE_ZH_CN@'
+noinst_HEADERS =
+noinst_LIBRARIES =
+check_LIBRARIES = libtests.a
+EXTRA_DIST = 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 \
+ 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
+SUFFIXES =
+
+# This test expects compilation of test-verify.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 =
+CLEANFILES =
+DISTCLEANFILES =
+MAINTAINERCLEANFILES =
+AM_CPPFLAGS = \
+ -D@gltests_WITNESS@=1 \
+ -I. -I$(srcdir) \
+ -I.. -I$(srcdir)/.. \
+ -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_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
+AM_LIBTOOLFLAGS = --preserve-dup-deps
+test_set_mode_acl_LDADD = $(LDADD) $(LIB_ACL) @LIBINTL@
+test_copy_acl_LDADD = $(LDADD) $(LIB_ACL) @LIBINTL@
+test_sameacls_LDADD = $(LDADD) $(LIB_ACL) @LIBINTL@
+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_localename_LDADD = $(LDADD) @INTL_MACOSX_LIBS@ $(LIBTHREAD)
+test_quotearg_simple_LDADD = $(LDADD) @LIBINTL@
+test_regex_LDADD = $(LDADD) @LIBINTL@ $(LIBTHREAD) $(LIB_PTHREAD)
+
+# Because this Makefile snippet defines a variable used by other
+# gnulib Makefile snippets, it must be present in all Makefile.am 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
+test_stat_LDADD = $(LDADD) $(LIBINTL)
+test_version_etc_LDADD = $(LDADD) @LIBINTL@
+test_xalloc_die_LDADD = $(LDADD) @LIBINTL@
+all: $(BUILT_SOURCES)
+ $(MAKE) $(AM_MAKEFLAGS) all-recursive
+
+.SUFFIXES:
+.SUFFIXES: .c .log .o .obj .test .test$(EXEEXT) .trs
+$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(srcdir)/gnulib.mk $(am__configure_deps)
+ @for dep in $?; do \
+ case '$(am__configure_deps)' in \
+ *$$dep*) \
+ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
+ && { if test -f $@; then exit 0; else break; fi; }; \
+ exit 1;; \
+ esac; \
+ done; \
+ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign gnulib-tests/Makefile'; \
+ $(am__cd) $(top_srcdir) && \
+ $(AUTOMAKE) --foreign gnulib-tests/Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+ @case '$?' in \
+ *config.status*) \
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+ *) \
+ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \
+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \
+ esac;
+$(srcdir)/gnulib.mk $(am__empty):
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure: $(am__configure_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4): $(am__aclocal_m4_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(am__aclocal_m4_deps):
+
+clean-checkLIBRARIES:
+ -test -z "$(check_LIBRARIES)" || rm -f $(check_LIBRARIES)
+
+clean-noinstLIBRARIES:
+ -test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES)
+
+libtests.a: $(libtests_a_OBJECTS) $(libtests_a_DEPENDENCIES) $(EXTRA_libtests_a_DEPENDENCIES)
+ $(AM_V_at)-rm -f 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-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)
+
+test-alloca-opt$(EXEEXT): $(test_alloca_opt_OBJECTS) $(test_alloca_opt_DEPENDENCIES) $(EXTRA_test_alloca_opt_DEPENDENCIES)
+ @rm -f test-alloca-opt$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(test_alloca_opt_OBJECTS) $(test_alloca_opt_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-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)
+
+test-c-ctype$(EXEEXT): $(test_c_ctype_OBJECTS) $(test_c_ctype_DEPENDENCIES) $(EXTRA_test_c_ctype_DEPENDENCIES)
+ @rm -f test-c-ctype$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(test_c_ctype_OBJECTS) $(test_c_ctype_LDADD) $(LIBS)
+
+test-c-strcasecmp$(EXEEXT): $(test_c_strcasecmp_OBJECTS) $(test_c_strcasecmp_DEPENDENCIES) $(EXTRA_test_c_strcasecmp_DEPENDENCIES)
+ @rm -f test-c-strcasecmp$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(test_c_strcasecmp_OBJECTS) $(test_c_strcasecmp_LDADD) $(LIBS)
+
+test-c-strncasecmp$(EXEEXT): $(test_c_strncasecmp_OBJECTS) $(test_c_strncasecmp_DEPENDENCIES) $(EXTRA_test_c_strncasecmp_DEPENDENCIES)
+ @rm -f test-c-strncasecmp$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(test_c_strncasecmp_OBJECTS) $(test_c_strncasecmp_LDADD) $(LIBS)
+
+test-canonicalize-lgpl$(EXEEXT): $(test_canonicalize_lgpl_OBJECTS) $(test_canonicalize_lgpl_DEPENDENCIES) $(EXTRA_test_canonicalize_lgpl_DEPENDENCIES)
+ @rm -f test-canonicalize-lgpl$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(test_canonicalize_lgpl_OBJECTS) $(test_canonicalize_lgpl_LDADD) $(LIBS)
+
+test-chdir$(EXEEXT): $(test_chdir_OBJECTS) $(test_chdir_DEPENDENCIES) $(EXTRA_test_chdir_DEPENDENCIES)
+ @rm -f test-chdir$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(test_chdir_OBJECTS) $(test_chdir_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-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)
+
+test-ctype$(EXEEXT): $(test_ctype_OBJECTS) $(test_ctype_DEPENDENCIES) $(EXTRA_test_ctype_DEPENDENCIES)
+ @rm -f test-ctype$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(test_ctype_OBJECTS) $(test_ctype_LDADD) $(LIBS)
+
+test-dirent$(EXEEXT): $(test_dirent_OBJECTS) $(test_dirent_DEPENDENCIES) $(EXTRA_test_dirent_DEPENDENCIES)
+ @rm -f test-dirent$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(test_dirent_OBJECTS) $(test_dirent_LDADD) $(LIBS)
+
+test-dup2$(EXEEXT): $(test_dup2_OBJECTS) $(test_dup2_DEPENDENCIES) $(EXTRA_test_dup2_DEPENDENCIES)
+ @rm -f test-dup2$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(test_dup2_OBJECTS) $(test_dup2_LDADD) $(LIBS)
+
+test-environ$(EXEEXT): $(test_environ_OBJECTS) $(test_environ_DEPENDENCIES) $(EXTRA_test_environ_DEPENDENCIES)
+ @rm -f test-environ$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(test_environ_OBJECTS) $(test_environ_LDADD) $(LIBS)
+
+test-errno$(EXEEXT): $(test_errno_OBJECTS) $(test_errno_DEPENDENCIES) $(EXTRA_test_errno_DEPENDENCIES)
+ @rm -f test-errno$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(test_errno_OBJECTS) $(test_errno_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)
+
+test-fdopen$(EXEEXT): $(test_fdopen_OBJECTS) $(test_fdopen_DEPENDENCIES) $(EXTRA_test_fdopen_DEPENDENCIES)
+ @rm -f test-fdopen$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(test_fdopen_OBJECTS) $(test_fdopen_LDADD) $(LIBS)
+
+test-fflush$(EXEEXT): $(test_fflush_OBJECTS) $(test_fflush_DEPENDENCIES) $(EXTRA_test_fflush_DEPENDENCIES)
+ @rm -f test-fflush$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(test_fflush_OBJECTS) $(test_fflush_LDADD) $(LIBS)
+
+test-fflush2$(EXEEXT): $(test_fflush2_OBJECTS) $(test_fflush2_DEPENDENCIES) $(EXTRA_test_fflush2_DEPENDENCIES)
+ @rm -f test-fflush2$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(test_fflush2_OBJECTS) $(test_fflush2_LDADD) $(LIBS)
+
+test-fgetc$(EXEEXT): $(test_fgetc_OBJECTS) $(test_fgetc_DEPENDENCIES) $(EXTRA_test_fgetc_DEPENDENCIES)
+ @rm -f test-fgetc$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(test_fgetc_OBJECTS) $(test_fgetc_LDADD) $(LIBS)
+
+test-file-has-acl$(EXEEXT): $(test_file_has_acl_OBJECTS) $(test_file_has_acl_DEPENDENCIES) $(EXTRA_test_file_has_acl_DEPENDENCIES)
+ @rm -f test-file-has-acl$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(test_file_has_acl_OBJECTS) $(test_file_has_acl_LDADD) $(LIBS)
+
+test-fpending$(EXEEXT): $(test_fpending_OBJECTS) $(test_fpending_DEPENDENCIES) $(EXTRA_test_fpending_DEPENDENCIES)
+ @rm -f test-fpending$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(test_fpending_OBJECTS) $(test_fpending_LDADD) $(LIBS)
+
+test-fpurge$(EXEEXT): $(test_fpurge_OBJECTS) $(test_fpurge_DEPENDENCIES) $(EXTRA_test_fpurge_DEPENDENCIES)
+ @rm -f test-fpurge$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(test_fpurge_OBJECTS) $(test_fpurge_LDADD) $(LIBS)
+
+test-fputc$(EXEEXT): $(test_fputc_OBJECTS) $(test_fputc_DEPENDENCIES) $(EXTRA_test_fputc_DEPENDENCIES)
+ @rm -f test-fputc$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(test_fputc_OBJECTS) $(test_fputc_LDADD) $(LIBS)
+
+test-fread$(EXEEXT): $(test_fread_OBJECTS) $(test_fread_DEPENDENCIES) $(EXTRA_test_fread_DEPENDENCIES)
+ @rm -f test-fread$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(test_fread_OBJECTS) $(test_fread_LDADD) $(LIBS)
+
+test-freading$(EXEEXT): $(test_freading_OBJECTS) $(test_freading_DEPENDENCIES) $(EXTRA_test_freading_DEPENDENCIES)
+ @rm -f test-freading$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(test_freading_OBJECTS) $(test_freading_LDADD) $(LIBS)
+
+test-fseek$(EXEEXT): $(test_fseek_OBJECTS) $(test_fseek_DEPENDENCIES) $(EXTRA_test_fseek_DEPENDENCIES)
+ @rm -f test-fseek$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(test_fseek_OBJECTS) $(test_fseek_LDADD) $(LIBS)
+
+test-fseeko$(EXEEXT): $(test_fseeko_OBJECTS) $(test_fseeko_DEPENDENCIES) $(EXTRA_test_fseeko_DEPENDENCIES)
+ @rm -f test-fseeko$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(test_fseeko_OBJECTS) $(test_fseeko_LDADD) $(LIBS)
+
+test-fseeko3$(EXEEXT): $(test_fseeko3_OBJECTS) $(test_fseeko3_DEPENDENCIES) $(EXTRA_test_fseeko3_DEPENDENCIES)
+ @rm -f test-fseeko3$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(test_fseeko3_OBJECTS) $(test_fseeko3_LDADD) $(LIBS)
+
+test-fseeko4$(EXEEXT): $(test_fseeko4_OBJECTS) $(test_fseeko4_DEPENDENCIES) $(EXTRA_test_fseeko4_DEPENDENCIES)
+ @rm -f test-fseeko4$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(test_fseeko4_OBJECTS) $(test_fseeko4_LDADD) $(LIBS)
+
+test-fstat$(EXEEXT): $(test_fstat_OBJECTS) $(test_fstat_DEPENDENCIES) $(EXTRA_test_fstat_DEPENDENCIES)
+ @rm -f test-fstat$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(test_fstat_OBJECTS) $(test_fstat_LDADD) $(LIBS)
+
+test-ftell$(EXEEXT): $(test_ftell_OBJECTS) $(test_ftell_DEPENDENCIES) $(EXTRA_test_ftell_DEPENDENCIES)
+ @rm -f test-ftell$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(test_ftell_OBJECTS) $(test_ftell_LDADD) $(LIBS)
+
+test-ftell3$(EXEEXT): $(test_ftell3_OBJECTS) $(test_ftell3_DEPENDENCIES) $(EXTRA_test_ftell3_DEPENDENCIES)
+ @rm -f test-ftell3$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(test_ftell3_OBJECTS) $(test_ftell3_LDADD) $(LIBS)
+
+test-ftello$(EXEEXT): $(test_ftello_OBJECTS) $(test_ftello_DEPENDENCIES) $(EXTRA_test_ftello_DEPENDENCIES)
+ @rm -f test-ftello$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(test_ftello_OBJECTS) $(test_ftello_LDADD) $(LIBS)
+
+test-ftello3$(EXEEXT): $(test_ftello3_OBJECTS) $(test_ftello3_DEPENDENCIES) $(EXTRA_test_ftello3_DEPENDENCIES)
+ @rm -f test-ftello3$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(test_ftello3_OBJECTS) $(test_ftello3_LDADD) $(LIBS)
+
+test-ftello4$(EXEEXT): $(test_ftello4_OBJECTS) $(test_ftello4_DEPENDENCIES) $(EXTRA_test_ftello4_DEPENDENCIES)
+ @rm -f test-ftello4$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(test_ftello4_OBJECTS) $(test_ftello4_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)
+
+test-fwriting$(EXEEXT): $(test_fwriting_OBJECTS) $(test_fwriting_DEPENDENCIES) $(EXTRA_test_fwriting_DEPENDENCIES)
+ @rm -f test-fwriting$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(test_fwriting_OBJECTS) $(test_fwriting_LDADD) $(LIBS)
+
+test-getcwd-lgpl$(EXEEXT): $(test_getcwd_lgpl_OBJECTS) $(test_getcwd_lgpl_DEPENDENCIES) $(EXTRA_test_getcwd_lgpl_DEPENDENCIES)
+ @rm -f test-getcwd-lgpl$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(test_getcwd_lgpl_OBJECTS) $(test_getcwd_lgpl_LDADD) $(LIBS)
+
+test-getdelim$(EXEEXT): $(test_getdelim_OBJECTS) $(test_getdelim_DEPENDENCIES) $(EXTRA_test_getdelim_DEPENDENCIES)
+ @rm -f test-getdelim$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(test_getdelim_OBJECTS) $(test_getdelim_LDADD) $(LIBS)
+
+test-getdtablesize$(EXEEXT): $(test_getdtablesize_OBJECTS) $(test_getdtablesize_DEPENDENCIES) $(EXTRA_test_getdtablesize_DEPENDENCIES)
+ @rm -f test-getdtablesize$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(test_getdtablesize_OBJECTS) $(test_getdtablesize_LDADD) $(LIBS)
+
+test-getopt-gnu$(EXEEXT): $(test_getopt_gnu_OBJECTS) $(test_getopt_gnu_DEPENDENCIES) $(EXTRA_test_getopt_gnu_DEPENDENCIES)
+ @rm -f test-getopt-gnu$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(test_getopt_gnu_OBJECTS) $(test_getopt_gnu_LDADD) $(LIBS)
+
+test-getopt-posix$(EXEEXT): $(test_getopt_posix_OBJECTS) $(test_getopt_posix_DEPENDENCIES) $(EXTRA_test_getopt_posix_DEPENDENCIES)
+ @rm -f test-getopt-posix$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(test_getopt_posix_OBJECTS) $(test_getopt_posix_LDADD) $(LIBS)
+
+test-getprogname$(EXEEXT): $(test_getprogname_OBJECTS) $(test_getprogname_DEPENDENCIES) $(EXTRA_test_getprogname_DEPENDENCIES)
+ @rm -f test-getprogname$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(test_getprogname_OBJECTS) $(test_getprogname_LDADD) $(LIBS)
+
+test-gettimeofday$(EXEEXT): $(test_gettimeofday_OBJECTS) $(test_gettimeofday_DEPENDENCIES) $(EXTRA_test_gettimeofday_DEPENDENCIES)
+ @rm -f test-gettimeofday$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(test_gettimeofday_OBJECTS) $(test_gettimeofday_LDADD) $(LIBS)
+
+test-ignore-value$(EXEEXT): $(test_ignore_value_OBJECTS) $(test_ignore_value_DEPENDENCIES) $(EXTRA_test_ignore_value_DEPENDENCIES)
+ @rm -f test-ignore-value$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(test_ignore_value_OBJECTS) $(test_ignore_value_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)
+
+test-inttypes$(EXEEXT): $(test_inttypes_OBJECTS) $(test_inttypes_DEPENDENCIES) $(EXTRA_test_inttypes_DEPENDENCIES)
+ @rm -f test-inttypes$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(test_inttypes_OBJECTS) $(test_inttypes_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)
+
+test-langinfo$(EXEEXT): $(test_langinfo_OBJECTS) $(test_langinfo_DEPENDENCIES) $(EXTRA_test_langinfo_DEPENDENCIES)
+ @rm -f test-langinfo$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(test_langinfo_OBJECTS) $(test_langinfo_LDADD) $(LIBS)
+
+test-limits-h$(EXEEXT): $(test_limits_h_OBJECTS) $(test_limits_h_DEPENDENCIES) $(EXTRA_test_limits_h_DEPENDENCIES)
+ @rm -f test-limits-h$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(test_limits_h_OBJECTS) $(test_limits_h_LDADD) $(LIBS)
+
+test-link$(EXEEXT): $(test_link_OBJECTS) $(test_link_DEPENDENCIES) $(EXTRA_test_link_DEPENDENCIES)
+ @rm -f test-link$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(test_link_OBJECTS) $(test_link_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)
+
+test-localeconv$(EXEEXT): $(test_localeconv_OBJECTS) $(test_localeconv_DEPENDENCIES) $(EXTRA_test_localeconv_DEPENDENCIES)
+ @rm -f test-localeconv$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(test_localeconv_OBJECTS) $(test_localeconv_LDADD) $(LIBS)
+
+test-localename$(EXEEXT): $(test_localename_OBJECTS) $(test_localename_DEPENDENCIES) $(EXTRA_test_localename_DEPENDENCIES)
+ @rm -f test-localename$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(test_localename_OBJECTS) $(test_localename_LDADD) $(LIBS)
+
+test-lseek$(EXEEXT): $(test_lseek_OBJECTS) $(test_lseek_DEPENDENCIES) $(EXTRA_test_lseek_DEPENDENCIES)
+ @rm -f test-lseek$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(test_lseek_OBJECTS) $(test_lseek_LDADD) $(LIBS)
+
+test-lstat$(EXEEXT): $(test_lstat_OBJECTS) $(test_lstat_DEPENDENCIES) $(EXTRA_test_lstat_DEPENDENCIES)
+ @rm -f test-lstat$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(test_lstat_OBJECTS) $(test_lstat_LDADD) $(LIBS)
+
+test-malloca$(EXEEXT): $(test_malloca_OBJECTS) $(test_malloca_DEPENDENCIES) $(EXTRA_test_malloca_DEPENDENCIES)
+ @rm -f test-malloca$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(test_malloca_OBJECTS) $(test_malloca_LDADD) $(LIBS)
+
+test-mbrtowc$(EXEEXT): $(test_mbrtowc_OBJECTS) $(test_mbrtowc_DEPENDENCIES) $(EXTRA_test_mbrtowc_DEPENDENCIES)
+ @rm -f test-mbrtowc$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(test_mbrtowc_OBJECTS) $(test_mbrtowc_LDADD) $(LIBS)
+
+test-mbrtowc-w32$(EXEEXT): $(test_mbrtowc_w32_OBJECTS) $(test_mbrtowc_w32_DEPENDENCIES) $(EXTRA_test_mbrtowc_w32_DEPENDENCIES)
+ @rm -f test-mbrtowc-w32$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(test_mbrtowc_w32_OBJECTS) $(test_mbrtowc_w32_LDADD) $(LIBS)
+
+test-mbsinit$(EXEEXT): $(test_mbsinit_OBJECTS) $(test_mbsinit_DEPENDENCIES) $(EXTRA_test_mbsinit_DEPENDENCIES)
+ @rm -f test-mbsinit$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(test_mbsinit_OBJECTS) $(test_mbsinit_LDADD) $(LIBS)
+
+test-memchr$(EXEEXT): $(test_memchr_OBJECTS) $(test_memchr_DEPENDENCIES) $(EXTRA_test_memchr_DEPENDENCIES)
+ @rm -f test-memchr$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(test_memchr_OBJECTS) $(test_memchr_LDADD) $(LIBS)
+
+test-memrchr$(EXEEXT): $(test_memrchr_OBJECTS) $(test_memrchr_DEPENDENCIES) $(EXTRA_test_memrchr_DEPENDENCIES)
+ @rm -f test-memrchr$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(test_memrchr_OBJECTS) $(test_memrchr_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)
+
+test-open$(EXEEXT): $(test_open_OBJECTS) $(test_open_DEPENDENCIES) $(EXTRA_test_open_DEPENDENCIES)
+ @rm -f test-open$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(test_open_OBJECTS) $(test_open_LDADD) $(LIBS)
+
+test-pathmax$(EXEEXT): $(test_pathmax_OBJECTS) $(test_pathmax_DEPENDENCIES) $(EXTRA_test_pathmax_DEPENDENCIES)
+ @rm -f test-pathmax$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(test_pathmax_OBJECTS) $(test_pathmax_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-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)
+
+test-readlink$(EXEEXT): $(test_readlink_OBJECTS) $(test_readlink_DEPENDENCIES) $(EXTRA_test_readlink_DEPENDENCIES)
+ @rm -f test-readlink$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(test_readlink_OBJECTS) $(test_readlink_LDADD) $(LIBS)
+
+test-regex$(EXEEXT): $(test_regex_OBJECTS) $(test_regex_DEPENDENCIES) $(EXTRA_test_regex_DEPENDENCIES)
+ @rm -f test-regex$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(test_regex_OBJECTS) $(test_regex_LDADD) $(LIBS)
+
+test-rename$(EXEEXT): $(test_rename_OBJECTS) $(test_rename_DEPENDENCIES) $(EXTRA_test_rename_DEPENDENCIES)
+ @rm -f test-rename$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(test_rename_OBJECTS) $(test_rename_LDADD) $(LIBS)
+
+test-rmdir$(EXEEXT): $(test_rmdir_OBJECTS) $(test_rmdir_DEPENDENCIES) $(EXTRA_test_rmdir_DEPENDENCIES)
+ @rm -f test-rmdir$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(test_rmdir_OBJECTS) $(test_rmdir_LDADD) $(LIBS)
+
+test-sameacls$(EXEEXT): $(test_sameacls_OBJECTS) $(test_sameacls_DEPENDENCIES) $(EXTRA_test_sameacls_DEPENDENCIES)
+ @rm -f test-sameacls$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(test_sameacls_OBJECTS) $(test_sameacls_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)
+
+test-setenv$(EXEEXT): $(test_setenv_OBJECTS) $(test_setenv_DEPENDENCIES) $(EXTRA_test_setenv_DEPENDENCIES)
+ @rm -f test-setenv$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(test_setenv_OBJECTS) $(test_setenv_LDADD) $(LIBS)
+
+test-setlocale1$(EXEEXT): $(test_setlocale1_OBJECTS) $(test_setlocale1_DEPENDENCIES) $(EXTRA_test_setlocale1_DEPENDENCIES)
+ @rm -f test-setlocale1$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(test_setlocale1_OBJECTS) $(test_setlocale1_LDADD) $(LIBS)
+
+test-setlocale2$(EXEEXT): $(test_setlocale2_OBJECTS) $(test_setlocale2_DEPENDENCIES) $(EXTRA_test_setlocale2_DEPENDENCIES)
+ @rm -f test-setlocale2$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(test_setlocale2_OBJECTS) $(test_setlocale2_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-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)
+
+test-stdbool$(EXEEXT): $(test_stdbool_OBJECTS) $(test_stdbool_DEPENDENCIES) $(EXTRA_test_stdbool_DEPENDENCIES)
+ @rm -f test-stdbool$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(test_stdbool_OBJECTS) $(test_stdbool_LDADD) $(LIBS)
+
+test-stddef$(EXEEXT): $(test_stddef_OBJECTS) $(test_stddef_DEPENDENCIES) $(EXTRA_test_stddef_DEPENDENCIES)
+ @rm -f test-stddef$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(test_stddef_OBJECTS) $(test_stddef_LDADD) $(LIBS)
+
+test-stdint$(EXEEXT): $(test_stdint_OBJECTS) $(test_stdint_DEPENDENCIES) $(EXTRA_test_stdint_DEPENDENCIES)
+ @rm -f test-stdint$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(test_stdint_OBJECTS) $(test_stdint_LDADD) $(LIBS)
+
+test-stdio$(EXEEXT): $(test_stdio_OBJECTS) $(test_stdio_DEPENDENCIES) $(EXTRA_test_stdio_DEPENDENCIES)
+ @rm -f test-stdio$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(test_stdio_OBJECTS) $(test_stdio_LDADD) $(LIBS)
+
+test-stdlib$(EXEEXT): $(test_stdlib_OBJECTS) $(test_stdlib_DEPENDENCIES) $(EXTRA_test_stdlib_DEPENDENCIES)
+ @rm -f test-stdlib$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(test_stdlib_OBJECTS) $(test_stdlib_LDADD) $(LIBS)
+
+test-strerror$(EXEEXT): $(test_strerror_OBJECTS) $(test_strerror_DEPENDENCIES) $(EXTRA_test_strerror_DEPENDENCIES)
+ @rm -f test-strerror$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(test_strerror_OBJECTS) $(test_strerror_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)
+
+test-strverscmp$(EXEEXT): $(test_strverscmp_OBJECTS) $(test_strverscmp_DEPENDENCIES) $(EXTRA_test_strverscmp_DEPENDENCIES)
+ @rm -f test-strverscmp$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(test_strverscmp_OBJECTS) $(test_strverscmp_LDADD) $(LIBS)
+
+test-symlink$(EXEEXT): $(test_symlink_OBJECTS) $(test_symlink_DEPENDENCIES) $(EXTRA_test_symlink_DEPENDENCIES)
+ @rm -f test-symlink$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(test_symlink_OBJECTS) $(test_symlink_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)
+
+test-sys_time$(EXEEXT): $(test_sys_time_OBJECTS) $(test_sys_time_DEPENDENCIES) $(EXTRA_test_sys_time_DEPENDENCIES)
+ @rm -f test-sys_time$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(test_sys_time_OBJECTS) $(test_sys_time_LDADD) $(LIBS)
+
+test-sys_types$(EXEEXT): $(test_sys_types_OBJECTS) $(test_sys_types_DEPENDENCIES) $(EXTRA_test_sys_types_DEPENDENCIES)
+ @rm -f test-sys_types$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(test_sys_types_OBJECTS) $(test_sys_types_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)
+
+test-unistd$(EXEEXT): $(test_unistd_OBJECTS) $(test_unistd_DEPENDENCIES) $(EXTRA_test_unistd_DEPENDENCIES)
+ @rm -f test-unistd$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(test_unistd_OBJECTS) $(test_unistd_LDADD) $(LIBS)
+
+test-unsetenv$(EXEEXT): $(test_unsetenv_OBJECTS) $(test_unsetenv_DEPENDENCIES) $(EXTRA_test_unsetenv_DEPENDENCIES)
+ @rm -f test-unsetenv$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(test_unsetenv_OBJECTS) $(test_unsetenv_LDADD) $(LIBS)
+
+test-verify$(EXEEXT): $(test_verify_OBJECTS) $(test_verify_DEPENDENCIES) $(EXTRA_test_verify_DEPENDENCIES)
+ @rm -f test-verify$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(test_verify_OBJECTS) $(test_verify_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)
+
+test-wchar$(EXEEXT): $(test_wchar_OBJECTS) $(test_wchar_DEPENDENCIES) $(EXTRA_test_wchar_DEPENDENCIES)
+ @rm -f test-wchar$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(test_wchar_OBJECTS) $(test_wchar_LDADD) $(LIBS)
+
+test-wcrtomb$(EXEEXT): $(test_wcrtomb_OBJECTS) $(test_wcrtomb_DEPENDENCIES) $(EXTRA_test_wcrtomb_DEPENDENCIES)
+ @rm -f test-wcrtomb$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(test_wcrtomb_OBJECTS) $(test_wcrtomb_LDADD) $(LIBS)
+
+test-wcrtomb-w32$(EXEEXT): $(test_wcrtomb_w32_OBJECTS) $(test_wcrtomb_w32_DEPENDENCIES) $(EXTRA_test_wcrtomb_w32_DEPENDENCIES)
+ @rm -f test-wcrtomb-w32$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(test_wcrtomb_w32_OBJECTS) $(test_wcrtomb_w32_LDADD) $(LIBS)
+
+test-wctype-h$(EXEEXT): $(test_wctype_h_OBJECTS) $(test_wctype_h_DEPENDENCIES) $(EXTRA_test_wctype_h_DEPENDENCIES)
+ @rm -f test-wctype-h$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(test_wctype_h_OBJECTS) $(test_wctype_h_LDADD) $(LIBS)
+
+test-xalloc-die$(EXEEXT): $(test_xalloc_die_OBJECTS) $(test_xalloc_die_DEPENDENCIES) $(EXTRA_test_xalloc_die_DEPENDENCIES)
+ @rm -f test-xalloc-die$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(test_xalloc_die_OBJECTS) $(test_xalloc_die_LDADD) $(LIBS)
+
+mostlyclean-compile:
+ -rm -f *.$(OBJEXT)
+
+distclean-compile:
+ -rm -f *.tab.c
+
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/binary-io.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)/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)/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
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/file-has-acl.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fpurge.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/freading.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fseek.Po@am__quote@ # am--include-marker
+@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)/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)/link.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)/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)/putenv.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)/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)/strdup.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)/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-binary-io.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-close.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
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-dup2.Po@am__quote@ # am--include-marker
+@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-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
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-fgetc.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-file-has-acl.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-fpending.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-fpurge.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-fputc.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-fread.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-freading.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-fseek.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-fseeko.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-fseeko3.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-fseeko4.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-fstat.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-ftell.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-ftell3.Po@am__quote@ # am--include-marker
+@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-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
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-getdelim.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-getdtablesize.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-getopt-gnu.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-getopt-posix.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-getprogname.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-gettimeofday.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-ignore-value.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-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-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
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-lseek.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-lstat.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-malloca.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-mbrtowc-w32.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-mbrtowc.Po@am__quote@ # am--include-marker
+@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-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-quotearg-simple.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-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-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
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-stddef.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-stdint.Po@am__quote@ # am--include-marker
+@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-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_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-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.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
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-wcrtomb-w32.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-wcrtomb.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-wctype-h.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-xalloc-die.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/unsetenv.Po@am__quote@ # am--include-marker
+
+$(am__depfiles_remade):
+ @$(MKDIR_P) $(@D)
+ @echo '# dummy' >$@-t && $(am__mv) $@-t $@
+
+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
+@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 $@ $<
+
+.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
+@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) $<)
+
+# This directory's subdirectories are mostly independent; you can cd
+# into them and run 'make' without going through this Makefile.
+# To change the values of 'make' variables: instead of editing Makefiles,
+# (1) if the variable is set in 'config.status', edit 'config.status'
+# (which will cause the Makefiles to be regenerated when you run 'make');
+# (2) otherwise, pass the desired values on the 'make' command line.
+$(am__recursive_targets):
+ @fail=; \
+ if $(am__make_keepgoing); then \
+ failcom='fail=yes'; \
+ else \
+ failcom='exit 1'; \
+ fi; \
+ dot_seen=no; \
+ target=`echo $@ | sed s/-recursive//`; \
+ case "$@" in \
+ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
+ *) list='$(SUBDIRS)' ;; \
+ esac; \
+ for subdir in $$list; do \
+ echo "Making $$target in $$subdir"; \
+ if test "$$subdir" = "."; then \
+ dot_seen=yes; \
+ local_target="$$target-am"; \
+ else \
+ local_target="$$target"; \
+ fi; \
+ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
+ || eval $$failcom; \
+ done; \
+ if test "$$dot_seen" = "no"; then \
+ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
+ fi; test -z "$$fail"
+
+ID: $(am__tagged_files)
+ $(am__define_uniq_tagged_files); mkid -fID $$unique
+tags: tags-recursive
+TAGS: tags
+
+tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
+ set x; \
+ here=`pwd`; \
+ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \
+ include_option=--etags-include; \
+ empty_fix=.; \
+ else \
+ include_option=--include; \
+ empty_fix=; \
+ fi; \
+ list='$(SUBDIRS)'; for subdir in $$list; do \
+ if test "$$subdir" = .; then :; else \
+ test ! -f $$subdir/TAGS || \
+ set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \
+ fi; \
+ done; \
+ $(am__define_uniq_tagged_files); \
+ shift; \
+ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
+ test -n "$$unique" || unique=$$empty_fix; \
+ if test $$# -gt 0; then \
+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ "$$@" $$unique; \
+ else \
+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ $$unique; \
+ fi; \
+ fi
+ctags: ctags-recursive
+
+CTAGS: ctags
+ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
+ $(am__define_uniq_tagged_files); \
+ test -z "$(CTAGS_ARGS)$$unique" \
+ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+ $$unique
+
+GTAGS:
+ here=`$(am__cd) $(top_builddir) && pwd` \
+ && $(am__cd) $(top_srcdir) \
+ && gtags -i $(GTAGS_ARGS) "$$here"
+cscopelist: cscopelist-recursive
+
+cscopelist-am: $(am__tagged_files)
+ list='$(am__tagged_files)'; \
+ case "$(srcdir)" in \
+ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \
+ *) sdir=$(subdir)/$(srcdir) ;; \
+ esac; \
+ for i in $$list; do \
+ if test -f "$$i"; then \
+ echo "$(subdir)/$$i"; \
+ else \
+ echo "$$sdir/$$i"; \
+ fi; \
+ done >> $(top_builddir)/cscope.files
+
+distclean-tags:
+ -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+
+# Recover from deleted '.trs' file; this should ensure that
+# "rm -f foo.log; make foo.trs" re-run 'foo.test', and re-create
+# both 'foo.log' and 'foo.trs'. Break the recipe in two subshells
+# to avoid problems with "make -n".
+.log.trs:
+ rm -f $< $@
+ $(MAKE) $(AM_MAKEFLAGS) $<
+
+# Leading 'am--fnord' is there to ensure the list of targets does not
+# expand to empty, as could happen e.g. with make check TESTS=''.
+am--fnord $(TEST_LOGS) $(TEST_LOGS:.log=.trs): $(am__force_recheck)
+am--force-recheck:
+ @:
+
+$(TEST_SUITE_LOG): $(TEST_LOGS)
+ @$(am__set_TESTS_bases); \
+ am__f_ok () { test -f "$$1" && test -r "$$1"; }; \
+ redo_bases=`for i in $$bases; do \
+ am__f_ok $$i.trs && am__f_ok $$i.log || echo $$i; \
+ done`; \
+ if test -n "$$redo_bases"; then \
+ redo_logs=`for i in $$redo_bases; do echo $$i.log; done`; \
+ redo_results=`for i in $$redo_bases; do echo $$i.trs; done`; \
+ if $(am__make_dryrun); then :; else \
+ rm -f $$redo_logs && rm -f $$redo_results || exit 1; \
+ fi; \
+ fi; \
+ if test -n "$$am__remaking_logs"; then \
+ echo "fatal: making $(TEST_SUITE_LOG): possible infinite" \
+ "recursion detected" >&2; \
+ elif test -n "$$redo_logs"; then \
+ am__remaking_logs=yes $(MAKE) $(AM_MAKEFLAGS) $$redo_logs; \
+ fi; \
+ if $(am__make_dryrun); then :; else \
+ st=0; \
+ errmsg="fatal: making $(TEST_SUITE_LOG): failed to create"; \
+ for i in $$redo_bases; do \
+ test -f $$i.trs && test -r $$i.trs \
+ || { echo "$$errmsg $$i.trs" >&2; st=1; }; \
+ test -f $$i.log && test -r $$i.log \
+ || { echo "$$errmsg $$i.log" >&2; st=1; }; \
+ done; \
+ test $$st -eq 0 || exit 1; \
+ fi
+ @$(am__sh_e_setup); $(am__tty_colors); $(am__set_TESTS_bases); \
+ ws='[ ]'; \
+ results=`for b in $$bases; do echo $$b.trs; done`; \
+ test -n "$$results" || results=/dev/null; \
+ all=` grep "^$$ws*:test-result:" $$results | wc -l`; \
+ pass=` grep "^$$ws*:test-result:$$ws*PASS" $$results | wc -l`; \
+ fail=` grep "^$$ws*:test-result:$$ws*FAIL" $$results | wc -l`; \
+ skip=` grep "^$$ws*:test-result:$$ws*SKIP" $$results | wc -l`; \
+ xfail=`grep "^$$ws*:test-result:$$ws*XFAIL" $$results | wc -l`; \
+ xpass=`grep "^$$ws*:test-result:$$ws*XPASS" $$results | wc -l`; \
+ error=`grep "^$$ws*:test-result:$$ws*ERROR" $$results | wc -l`; \
+ if test `expr $$fail + $$xpass + $$error` -eq 0; then \
+ success=true; \
+ else \
+ success=false; \
+ fi; \
+ br='==================='; br=$$br$$br$$br$$br; \
+ result_count () \
+ { \
+ if test x"$$1" = x"--maybe-color"; then \
+ maybe_colorize=yes; \
+ elif test x"$$1" = x"--no-color"; then \
+ maybe_colorize=no; \
+ else \
+ echo "$@: invalid 'result_count' usage" >&2; exit 4; \
+ fi; \
+ shift; \
+ desc=$$1 count=$$2; \
+ if test $$maybe_colorize = yes && test $$count -gt 0; then \
+ color_start=$$3 color_end=$$std; \
+ else \
+ color_start= color_end=; \
+ fi; \
+ echo "$${color_start}# $$desc $$count$${color_end}"; \
+ }; \
+ create_testsuite_report () \
+ { \
+ result_count $$1 "TOTAL:" $$all "$$brg"; \
+ result_count $$1 "PASS: " $$pass "$$grn"; \
+ result_count $$1 "SKIP: " $$skip "$$blu"; \
+ result_count $$1 "XFAIL:" $$xfail "$$lgn"; \
+ result_count $$1 "FAIL: " $$fail "$$red"; \
+ result_count $$1 "XPASS:" $$xpass "$$red"; \
+ result_count $$1 "ERROR:" $$error "$$mgn"; \
+ }; \
+ { \
+ echo "$(PACKAGE_STRING): $(subdir)/$(TEST_SUITE_LOG)" | \
+ $(am__rst_title); \
+ create_testsuite_report --no-color; \
+ echo; \
+ echo ".. contents:: :depth: 2"; \
+ echo; \
+ for b in $$bases; do echo $$b; done \
+ | $(am__create_global_log); \
+ } >$(TEST_SUITE_LOG).tmp || exit 1; \
+ mv $(TEST_SUITE_LOG).tmp $(TEST_SUITE_LOG); \
+ if $$success; then \
+ col="$$grn"; \
+ else \
+ col="$$red"; \
+ test x"$$VERBOSE" = x || cat $(TEST_SUITE_LOG); \
+ fi; \
+ echo "$${col}$$br$${std}"; \
+ echo "$${col}Testsuite summary for $(PACKAGE_STRING)$${std}"; \
+ echo "$${col}$$br$${std}"; \
+ create_testsuite_report --maybe-color; \
+ echo "$$col$$br$$std"; \
+ if $$success; then :; else \
+ echo "$${col}See $(subdir)/$(TEST_SUITE_LOG)$${std}"; \
+ if test -n "$(PACKAGE_BUGREPORT)"; then \
+ echo "$${col}Please report to $(PACKAGE_BUGREPORT)$${std}"; \
+ fi; \
+ echo "$$col$$br$$std"; \
+ fi; \
+ $$success || exit 1
+
+check-TESTS:
+ @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)
+ @set +e; $(am__set_TESTS_bases); \
+ log_list=`for i in $$bases; do echo $$i.log; done`; \
+ trs_list=`for i in $$bases; do echo $$i.trs; done`; \
+ 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)
+ @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 \
+ | $(am__list_recheck_tests)` || exit 1; \
+ log_list=`for i in $$bases; do echo $$i.log; done`; \
+ log_list=`echo $$log_list`; \
+ $(MAKE) $(AM_MAKEFLAGS) $(TEST_SUITE_LOG) \
+ am__force_recheck=am--force-recheck \
+ TEST_LOGS="$$log_list"; \
+ exit $$?
+test-set-mode-acl.sh.log: test-set-mode-acl.sh
+ @p='test-set-mode-acl.sh'; \
+ b='test-set-mode-acl.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-set-mode-acl-1.sh.log: test-set-mode-acl-1.sh
+ @p='test-set-mode-acl-1.sh'; \
+ b='test-set-mode-acl-1.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-set-mode-acl-2.sh.log: test-set-mode-acl-2.sh
+ @p='test-set-mode-acl-2.sh'; \
+ b='test-set-mode-acl-2.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-copy-acl.sh.log: test-copy-acl.sh
+ @p='test-copy-acl.sh'; \
+ b='test-copy-acl.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-copy-acl-1.sh.log: test-copy-acl-1.sh
+ @p='test-copy-acl-1.sh'; \
+ b='test-copy-acl-1.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-copy-acl-2.sh.log: test-copy-acl-2.sh
+ @p='test-copy-acl-2.sh'; \
+ b='test-copy-acl-2.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-alignof.log: test-alignof$(EXEEXT)
+ @p='test-alignof$(EXEEXT)'; \
+ b='test-alignof'; \
+ $(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-alloca-opt.log: test-alloca-opt$(EXEEXT)
+ @p='test-alloca-opt$(EXEEXT)'; \
+ b='test-alloca-opt'; \
+ $(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'; \
+ $(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'; \
+ $(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-btowc2.sh.log: test-btowc2.sh
+ @p='test-btowc2.sh'; \
+ b='test-btowc2.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-c-ctype.log: test-c-ctype$(EXEEXT)
+ @p='test-c-ctype$(EXEEXT)'; \
+ b='test-c-ctype'; \
+ $(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-c-strcase.sh.log: test-c-strcase.sh
+ @p='test-c-strcase.sh'; \
+ b='test-c-strcase.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-canonicalize-lgpl.log: test-canonicalize-lgpl$(EXEEXT)
+ @p='test-canonicalize-lgpl$(EXEEXT)'; \
+ b='test-canonicalize-lgpl'; \
+ $(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-chdir.log: test-chdir$(EXEEXT)
+ @p='test-chdir$(EXEEXT)'; \
+ b='test-chdir'; \
+ $(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'; \
+ $(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'; \
+ $(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)
+dfa-invalid-char-class.sh.log: dfa-invalid-char-class.sh
+ @p='dfa-invalid-char-class.sh'; \
+ b='dfa-invalid-char-class.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)
+dfa-match.sh.log: dfa-match.sh
+ @p='dfa-match.sh'; \
+ b='dfa-match.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-dirent.log: test-dirent$(EXEEXT)
+ @p='test-dirent$(EXEEXT)'; \
+ b='test-dirent'; \
+ $(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-dup2.log: test-dup2$(EXEEXT)
+ @p='test-dup2$(EXEEXT)'; \
+ b='test-dup2'; \
+ $(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-environ.log: test-environ$(EXEEXT)
+ @p='test-environ$(EXEEXT)'; \
+ b='test-environ'; \
+ $(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-errno.log: test-errno$(EXEEXT)
+ @p='test-errno$(EXEEXT)'; \
+ b='test-errno'; \
+ $(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-fcntl-h.log: test-fcntl-h$(EXEEXT)
+ @p='test-fcntl-h$(EXEEXT)'; \
+ b='test-fcntl-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-fdopen.log: test-fdopen$(EXEEXT)
+ @p='test-fdopen$(EXEEXT)'; \
+ b='test-fdopen'; \
+ $(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-fflush.log: test-fflush$(EXEEXT)
+ @p='test-fflush$(EXEEXT)'; \
+ b='test-fflush'; \
+ $(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-fflush2.sh.log: test-fflush2.sh
+ @p='test-fflush2.sh'; \
+ b='test-fflush2.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-fgetc.log: test-fgetc$(EXEEXT)
+ @p='test-fgetc$(EXEEXT)'; \
+ b='test-fgetc'; \
+ $(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-file-has-acl.sh.log: test-file-has-acl.sh
+ @p='test-file-has-acl.sh'; \
+ b='test-file-has-acl.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-file-has-acl-1.sh.log: test-file-has-acl-1.sh
+ @p='test-file-has-acl-1.sh'; \
+ b='test-file-has-acl-1.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-file-has-acl-2.sh.log: test-file-has-acl-2.sh
+ @p='test-file-has-acl-2.sh'; \
+ b='test-file-has-acl-2.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-fpending.sh.log: test-fpending.sh
+ @p='test-fpending.sh'; \
+ b='test-fpending.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-fpurge.log: test-fpurge$(EXEEXT)
+ @p='test-fpurge$(EXEEXT)'; \
+ b='test-fpurge'; \
+ $(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-fputc.log: test-fputc$(EXEEXT)
+ @p='test-fputc$(EXEEXT)'; \
+ b='test-fputc'; \
+ $(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-fread.log: test-fread$(EXEEXT)
+ @p='test-fread$(EXEEXT)'; \
+ b='test-fread'; \
+ $(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-freading.log: test-freading$(EXEEXT)
+ @p='test-freading$(EXEEXT)'; \
+ b='test-freading'; \
+ $(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-fseek.sh.log: test-fseek.sh
+ @p='test-fseek.sh'; \
+ b='test-fseek.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-fseek2.sh.log: test-fseek2.sh
+ @p='test-fseek2.sh'; \
+ b='test-fseek2.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-fseeko.sh.log: test-fseeko.sh
+ @p='test-fseeko.sh'; \
+ b='test-fseeko.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-fseeko2.sh.log: test-fseeko2.sh
+ @p='test-fseeko2.sh'; \
+ b='test-fseeko2.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-fseeko3.sh.log: test-fseeko3.sh
+ @p='test-fseeko3.sh'; \
+ b='test-fseeko3.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-fseeko4.sh.log: test-fseeko4.sh
+ @p='test-fseeko4.sh'; \
+ b='test-fseeko4.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-fstat.log: test-fstat$(EXEEXT)
+ @p='test-fstat$(EXEEXT)'; \
+ b='test-fstat'; \
+ $(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-ftell.sh.log: test-ftell.sh
+ @p='test-ftell.sh'; \
+ b='test-ftell.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-ftell2.sh.log: test-ftell2.sh
+ @p='test-ftell2.sh'; \
+ b='test-ftell2.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-ftell3.log: test-ftell3$(EXEEXT)
+ @p='test-ftell3$(EXEEXT)'; \
+ b='test-ftell3'; \
+ $(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-ftello.sh.log: test-ftello.sh
+ @p='test-ftello.sh'; \
+ b='test-ftello.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-ftello2.sh.log: test-ftello2.sh
+ @p='test-ftello2.sh'; \
+ b='test-ftello2.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-ftello3.log: test-ftello3$(EXEEXT)
+ @p='test-ftello3$(EXEEXT)'; \
+ b='test-ftello3'; \
+ $(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-ftello4.sh.log: test-ftello4.sh
+ @p='test-ftello4.sh'; \
+ b='test-ftello4.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'; \
+ $(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-fwriting.log: test-fwriting$(EXEEXT)
+ @p='test-fwriting$(EXEEXT)'; \
+ b='test-fwriting'; \
+ $(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-getcwd-lgpl.log: test-getcwd-lgpl$(EXEEXT)
+ @p='test-getcwd-lgpl$(EXEEXT)'; \
+ b='test-getcwd-lgpl'; \
+ $(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-getdelim.log: test-getdelim$(EXEEXT)
+ @p='test-getdelim$(EXEEXT)'; \
+ b='test-getdelim'; \
+ $(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-getdtablesize.log: test-getdtablesize$(EXEEXT)
+ @p='test-getdtablesize$(EXEEXT)'; \
+ b='test-getdtablesize'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+test-getopt-gnu.log: test-getopt-gnu$(EXEEXT)
+ @p='test-getopt-gnu$(EXEEXT)'; \
+ b='test-getopt-gnu'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+test-getopt-posix.log: test-getopt-posix$(EXEEXT)
+ @p='test-getopt-posix$(EXEEXT)'; \
+ b='test-getopt-posix'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+test-getprogname.log: test-getprogname$(EXEEXT)
+ @p='test-getprogname$(EXEEXT)'; \
+ b='test-getprogname'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+test-gettimeofday.log: test-gettimeofday$(EXEEXT)
+ @p='test-gettimeofday$(EXEEXT)'; \
+ b='test-gettimeofday'; \
+ $(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-ignore-value.log: test-ignore-value$(EXEEXT)
+ @p='test-ignore-value$(EXEEXT)'; \
+ b='test-ignore-value'; \
+ $(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'; \
+ $(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-inttypes.log: test-inttypes$(EXEEXT)
+ @p='test-inttypes$(EXEEXT)'; \
+ b='test-inttypes'; \
+ $(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'; \
+ $(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-langinfo.log: test-langinfo$(EXEEXT)
+ @p='test-langinfo$(EXEEXT)'; \
+ b='test-langinfo'; \
+ $(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-limits-h.log: test-limits-h$(EXEEXT)
+ @p='test-limits-h$(EXEEXT)'; \
+ b='test-limits-h'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+test-link.log: test-link$(EXEEXT)
+ @p='test-link$(EXEEXT)'; \
+ b='test-link'; \
+ $(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'; \
+ $(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-localeconv.log: test-localeconv$(EXEEXT)
+ @p='test-localeconv$(EXEEXT)'; \
+ b='test-localeconv'; \
+ $(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-localename.log: test-localename$(EXEEXT)
+ @p='test-localename$(EXEEXT)'; \
+ b='test-localename'; \
+ $(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-lseek.sh.log: test-lseek.sh
+ @p='test-lseek.sh'; \
+ b='test-lseek.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-lstat.log: test-lstat$(EXEEXT)
+ @p='test-lstat$(EXEEXT)'; \
+ b='test-lstat'; \
+ $(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-malloca.log: test-malloca$(EXEEXT)
+ @p='test-malloca$(EXEEXT)'; \
+ b='test-malloca'; \
+ $(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-mbrtowc1.sh.log: test-mbrtowc1.sh
+ @p='test-mbrtowc1.sh'; \
+ b='test-mbrtowc1.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-mbrtowc2.sh.log: test-mbrtowc2.sh
+ @p='test-mbrtowc2.sh'; \
+ b='test-mbrtowc2.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-mbrtowc3.sh.log: test-mbrtowc3.sh
+ @p='test-mbrtowc3.sh'; \
+ b='test-mbrtowc3.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-mbrtowc4.sh.log: test-mbrtowc4.sh
+ @p='test-mbrtowc4.sh'; \
+ b='test-mbrtowc4.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-mbrtowc5.sh.log: test-mbrtowc5.sh
+ @p='test-mbrtowc5.sh'; \
+ b='test-mbrtowc5.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-mbrtowc-w32-1.sh.log: test-mbrtowc-w32-1.sh
+ @p='test-mbrtowc-w32-1.sh'; \
+ b='test-mbrtowc-w32-1.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-mbrtowc-w32-2.sh.log: test-mbrtowc-w32-2.sh
+ @p='test-mbrtowc-w32-2.sh'; \
+ b='test-mbrtowc-w32-2.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-mbrtowc-w32-3.sh.log: test-mbrtowc-w32-3.sh
+ @p='test-mbrtowc-w32-3.sh'; \
+ b='test-mbrtowc-w32-3.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-mbrtowc-w32-4.sh.log: test-mbrtowc-w32-4.sh
+ @p='test-mbrtowc-w32-4.sh'; \
+ b='test-mbrtowc-w32-4.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-mbrtowc-w32-5.sh.log: test-mbrtowc-w32-5.sh
+ @p='test-mbrtowc-w32-5.sh'; \
+ b='test-mbrtowc-w32-5.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-mbsinit.sh.log: test-mbsinit.sh
+ @p='test-mbsinit.sh'; \
+ b='test-mbsinit.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-memchr.log: test-memchr$(EXEEXT)
+ @p='test-memchr$(EXEEXT)'; \
+ b='test-memchr'; \
+ $(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-memrchr.log: test-memrchr$(EXEEXT)
+ @p='test-memrchr$(EXEEXT)'; \
+ b='test-memrchr'; \
+ $(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'; \
+ $(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-open.log: test-open$(EXEEXT)
+ @p='test-open$(EXEEXT)'; \
+ b='test-open'; \
+ $(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-pathmax.log: test-pathmax$(EXEEXT)
+ @p='test-pathmax$(EXEEXT)'; \
+ b='test-pathmax'; \
+ $(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'; \
+ $(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'; \
+ $(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-readlink.log: test-readlink$(EXEEXT)
+ @p='test-readlink$(EXEEXT)'; \
+ b='test-readlink'; \
+ $(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-regex.log: test-regex$(EXEEXT)
+ @p='test-regex$(EXEEXT)'; \
+ b='test-regex'; \
+ $(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-rename.log: test-rename$(EXEEXT)
+ @p='test-rename$(EXEEXT)'; \
+ b='test-rename'; \
+ $(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-rmdir.log: test-rmdir$(EXEEXT)
+ @p='test-rmdir$(EXEEXT)'; \
+ b='test-rmdir'; \
+ $(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'; \
+ $(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-setlocale1.sh.log: test-setlocale1.sh
+ @p='test-setlocale1.sh'; \
+ b='test-setlocale1.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-setlocale2.sh.log: test-setlocale2.sh
+ @p='test-setlocale2.sh'; \
+ b='test-setlocale2.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-stat.log: test-stat$(EXEEXT)
+ @p='test-stat$(EXEEXT)'; \
+ b='test-stat'; \
+ $(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'; \
+ $(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-stdbool.log: test-stdbool$(EXEEXT)
+ @p='test-stdbool$(EXEEXT)'; \
+ b='test-stdbool'; \
+ $(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-stddef.log: test-stddef$(EXEEXT)
+ @p='test-stddef$(EXEEXT)'; \
+ b='test-stddef'; \
+ $(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-stdint.log: test-stdint$(EXEEXT)
+ @p='test-stdint$(EXEEXT)'; \
+ b='test-stdint'; \
+ $(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-stdio.log: test-stdio$(EXEEXT)
+ @p='test-stdio$(EXEEXT)'; \
+ b='test-stdio'; \
+ $(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-stdlib.log: test-stdlib$(EXEEXT)
+ @p='test-stdlib$(EXEEXT)'; \
+ b='test-stdlib'; \
+ $(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-strerror.log: test-strerror$(EXEEXT)
+ @p='test-strerror$(EXEEXT)'; \
+ b='test-strerror'; \
+ $(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'; \
+ $(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-strverscmp.log: test-strverscmp$(EXEEXT)
+ @p='test-strverscmp$(EXEEXT)'; \
+ b='test-strverscmp'; \
+ $(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-symlink.log: test-symlink$(EXEEXT)
+ @p='test-symlink$(EXEEXT)'; \
+ b='test-symlink'; \
+ $(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'; \
+ $(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_time.log: test-sys_time$(EXEEXT)
+ @p='test-sys_time$(EXEEXT)'; \
+ b='test-sys_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-sys_types.log: test-sys_types$(EXEEXT)
+ @p='test-sys_types$(EXEEXT)'; \
+ b='test-sys_types'; \
+ $(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'; \
+ $(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-time.log: test-time$(EXEEXT)
+ @p='test-time$(EXEEXT)'; \
+ b='test-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-unistd.log: test-unistd$(EXEEXT)
+ @p='test-unistd$(EXEEXT)'; \
+ b='test-unistd'; \
+ $(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-unsetenv.log: test-unsetenv$(EXEEXT)
+ @p='test-unsetenv$(EXEEXT)'; \
+ b='test-unsetenv'; \
+ $(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-update-copyright.sh.log: test-update-copyright.sh
+ @p='test-update-copyright.sh'; \
+ b='test-update-copyright.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-vc-list-files-git.sh.log: test-vc-list-files-git.sh
+ @p='test-vc-list-files-git.sh'; \
+ b='test-vc-list-files-git.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-vc-list-files-cvs.sh.log: test-vc-list-files-cvs.sh
+ @p='test-vc-list-files-cvs.sh'; \
+ b='test-vc-list-files-cvs.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-verify.log: test-verify$(EXEEXT)
+ @p='test-verify$(EXEEXT)'; \
+ b='test-verify'; \
+ $(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-verify.sh.log: test-verify.sh
+ @p='test-verify.sh'; \
+ b='test-verify.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-version-etc.sh.log: test-version-etc.sh
+ @p='test-version-etc.sh'; \
+ b='test-version-etc.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-wchar.log: test-wchar$(EXEEXT)
+ @p='test-wchar$(EXEEXT)'; \
+ b='test-wchar'; \
+ $(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-wcrtomb.sh.log: test-wcrtomb.sh
+ @p='test-wcrtomb.sh'; \
+ b='test-wcrtomb.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-wcrtomb-w32-1.sh.log: test-wcrtomb-w32-1.sh
+ @p='test-wcrtomb-w32-1.sh'; \
+ b='test-wcrtomb-w32-1.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-wcrtomb-w32-2.sh.log: test-wcrtomb-w32-2.sh
+ @p='test-wcrtomb-w32-2.sh'; \
+ b='test-wcrtomb-w32-2.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-wcrtomb-w32-3.sh.log: test-wcrtomb-w32-3.sh
+ @p='test-wcrtomb-w32-3.sh'; \
+ b='test-wcrtomb-w32-3.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-wcrtomb-w32-4.sh.log: test-wcrtomb-w32-4.sh
+ @p='test-wcrtomb-w32-4.sh'; \
+ b='test-wcrtomb-w32-4.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-wcrtomb-w32-5.sh.log: test-wcrtomb-w32-5.sh
+ @p='test-wcrtomb-w32-5.sh'; \
+ b='test-wcrtomb-w32-5.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-wctype-h.log: test-wctype-h$(EXEEXT)
+ @p='test-wctype-h$(EXEEXT)'; \
+ b='test-wctype-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-xalloc-die.sh.log: test-xalloc-die.sh
+ @p='test-xalloc-die.sh'; \
+ b='test-xalloc-die.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.log:
+ @p='$<'; \
+ $(am__set_b); \
+ $(am__check_pre) $(TEST_LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_TEST_LOG_DRIVER_FLAGS) $(TEST_LOG_DRIVER_FLAGS) -- $(TEST_LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+@am__EXEEXT_TRUE@.test$(EXEEXT).log:
+@am__EXEEXT_TRUE@ @p='$<'; \
+@am__EXEEXT_TRUE@ $(am__set_b); \
+@am__EXEEXT_TRUE@ $(am__check_pre) $(TEST_LOG_DRIVER) --test-name "$$f" \
+@am__EXEEXT_TRUE@ --log-file $$b.log --trs-file $$b.trs \
+@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)
+ @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ list='$(DISTFILES)'; \
+ dist_files=`for file in $$list; do echo $$file; done | \
+ sed -e "s|^$$srcdirstrip/||;t" \
+ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+ case $$dist_files in \
+ */*) $(MKDIR_P) `echo "$$dist_files" | \
+ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+ sort -u` ;; \
+ esac; \
+ for file in $$dist_files; do \
+ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+ if test -d $$d/$$file; then \
+ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+ if test -d "$(distdir)/$$file"; then \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+ fi; \
+ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+ fi; \
+ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
+ else \
+ test -f "$(distdir)/$$file" \
+ || cp -p $$d/$$file "$(distdir)/$$file" \
+ || exit 1; \
+ fi; \
+ done
+ @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
+ if test "$$subdir" = .; then :; else \
+ $(am__make_dryrun) \
+ || test -d "$(distdir)/$$subdir" \
+ || $(MKDIR_P) "$(distdir)/$$subdir" \
+ || exit 1; \
+ dir1=$$subdir; dir2="$(distdir)/$$subdir"; \
+ $(am__relativize); \
+ new_distdir=$$reldir; \
+ dir1=$$subdir; dir2="$(top_distdir)"; \
+ $(am__relativize); \
+ new_top_distdir=$$reldir; \
+ echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \
+ echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \
+ ($(am__cd) $$subdir && \
+ $(MAKE) $(AM_MAKEFLAGS) \
+ top_distdir="$$new_top_distdir" \
+ distdir="$$new_distdir" \
+ am__remove_distdir=: \
+ am__skip_length_check=: \
+ am__skip_mode_fix=: \
+ distdir) \
+ || exit 1; \
+ fi; \
+ done
+check-am: all-am
+ $(MAKE) $(AM_MAKEFLAGS) $(check_LIBRARIES) $(check_PROGRAMS)
+ $(MAKE) $(AM_MAKEFLAGS) check-TESTS
+check: $(BUILT_SOURCES)
+ $(MAKE) $(AM_MAKEFLAGS) check-recursive
+all-am: Makefile $(LIBRARIES) $(PROGRAMS) $(HEADERS)
+installdirs: installdirs-recursive
+installdirs-am:
+install: $(BUILT_SOURCES)
+ $(MAKE) $(AM_MAKEFLAGS) install-recursive
+install-exec: install-exec-recursive
+install-data: install-data-recursive
+uninstall: uninstall-recursive
+
+install-am: all-am
+ @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-recursive
+install-strip:
+ if test -z '$(STRIP)'; then \
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ install; \
+ else \
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
+ fi
+mostlyclean-generic:
+ -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)
+ -test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG)
+
+clean-generic:
+ -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
+
+distclean-generic:
+ -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+ -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
+ -test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES)
+
+maintainer-clean-generic:
+ @echo "This command is intended for maintainers to use"
+ @echo "it deletes files that may require special tools to rebuild."
+ -test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES)
+ -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES)
+clean: clean-recursive
+
+clean-am: clean-checkLIBRARIES clean-checkPROGRAMS clean-generic \
+ clean-local clean-noinstLIBRARIES clean-noinstPROGRAMS \
+ mostlyclean-am
+
+distclean: distclean-recursive
+ -rm -f ./$(DEPDIR)/binary-io.Po
+ -rm -f ./$(DEPDIR)/close.Po
+ -rm -f ./$(DEPDIR)/closedir.Po
+ -rm -f ./$(DEPDIR)/dfa-match-aux.Po
+ -rm -f ./$(DEPDIR)/dirfd.Po
+ -rm -f ./$(DEPDIR)/dup2.Po
+ -rm -f ./$(DEPDIR)/fd-hook.Po
+ -rm -f ./$(DEPDIR)/fdopen.Po
+ -rm -f ./$(DEPDIR)/fflush.Po
+ -rm -f ./$(DEPDIR)/file-has-acl.Po
+ -rm -f ./$(DEPDIR)/fpurge.Po
+ -rm -f ./$(DEPDIR)/freading.Po
+ -rm -f ./$(DEPDIR)/fseek.Po
+ -rm -f ./$(DEPDIR)/fseeko.Po
+ -rm -f ./$(DEPDIR)/ftell.Po
+ -rm -f ./$(DEPDIR)/ftello.Po
+ -rm -f ./$(DEPDIR)/getcwd-lgpl.Po
+ -rm -f ./$(DEPDIR)/getdtablesize.Po
+ -rm -f ./$(DEPDIR)/getpagesize.Po
+ -rm -f ./$(DEPDIR)/link.Po
+ -rm -f ./$(DEPDIR)/localename.Po
+ -rm -f ./$(DEPDIR)/lseek.Po
+ -rm -f ./$(DEPDIR)/open.Po
+ -rm -f ./$(DEPDIR)/opendir.Po
+ -rm -f ./$(DEPDIR)/putenv.Po
+ -rm -f ./$(DEPDIR)/read-file.Po
+ -rm -f ./$(DEPDIR)/readdir.Po
+ -rm -f ./$(DEPDIR)/realloc.Po
+ -rm -f ./$(DEPDIR)/setenv.Po
+ -rm -f ./$(DEPDIR)/setlocale.Po
+ -rm -f ./$(DEPDIR)/strdup.Po
+ -rm -f ./$(DEPDIR)/symlink.Po
+ -rm -f ./$(DEPDIR)/test-alignof.Po
+ -rm -f ./$(DEPDIR)/test-alloca-opt.Po
+ -rm -f ./$(DEPDIR)/test-binary-io.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-close.Po
+ -rm -f ./$(DEPDIR)/test-copy-acl.Po
+ -rm -f ./$(DEPDIR)/test-ctype.Po
+ -rm -f ./$(DEPDIR)/test-dirent.Po
+ -rm -f ./$(DEPDIR)/test-dup2.Po
+ -rm -f ./$(DEPDIR)/test-environ.Po
+ -rm -f ./$(DEPDIR)/test-errno.Po
+ -rm -f ./$(DEPDIR)/test-fcntl-h.Po
+ -rm -f ./$(DEPDIR)/test-fdopen.Po
+ -rm -f ./$(DEPDIR)/test-fflush.Po
+ -rm -f ./$(DEPDIR)/test-fflush2.Po
+ -rm -f ./$(DEPDIR)/test-fgetc.Po
+ -rm -f ./$(DEPDIR)/test-file-has-acl.Po
+ -rm -f ./$(DEPDIR)/test-fpending.Po
+ -rm -f ./$(DEPDIR)/test-fpurge.Po
+ -rm -f ./$(DEPDIR)/test-fputc.Po
+ -rm -f ./$(DEPDIR)/test-fread.Po
+ -rm -f ./$(DEPDIR)/test-freading.Po
+ -rm -f ./$(DEPDIR)/test-fseek.Po
+ -rm -f ./$(DEPDIR)/test-fseeko.Po
+ -rm -f ./$(DEPDIR)/test-fseeko3.Po
+ -rm -f ./$(DEPDIR)/test-fseeko4.Po
+ -rm -f ./$(DEPDIR)/test-fstat.Po
+ -rm -f ./$(DEPDIR)/test-ftell.Po
+ -rm -f ./$(DEPDIR)/test-ftell3.Po
+ -rm -f ./$(DEPDIR)/test-ftello.Po
+ -rm -f ./$(DEPDIR)/test-ftello3.Po
+ -rm -f ./$(DEPDIR)/test-ftello4.Po
+ -rm -f ./$(DEPDIR)/test-fwrite.Po
+ -rm -f ./$(DEPDIR)/test-fwriting.Po
+ -rm -f ./$(DEPDIR)/test-getcwd-lgpl.Po
+ -rm -f ./$(DEPDIR)/test-getdelim.Po
+ -rm -f ./$(DEPDIR)/test-getdtablesize.Po
+ -rm -f ./$(DEPDIR)/test-getopt-gnu.Po
+ -rm -f ./$(DEPDIR)/test-getopt-posix.Po
+ -rm -f ./$(DEPDIR)/test-getprogname.Po
+ -rm -f ./$(DEPDIR)/test-gettimeofday.Po
+ -rm -f ./$(DEPDIR)/test-ignore-value.Po
+ -rm -f ./$(DEPDIR)/test-intprops.Po
+ -rm -f ./$(DEPDIR)/test-inttypes.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-locale.Po
+ -rm -f ./$(DEPDIR)/test-localeconv.Po
+ -rm -f ./$(DEPDIR)/test-localename.Po
+ -rm -f ./$(DEPDIR)/test-lseek.Po
+ -rm -f ./$(DEPDIR)/test-lstat.Po
+ -rm -f ./$(DEPDIR)/test-malloca.Po
+ -rm -f ./$(DEPDIR)/test-mbrtowc-w32.Po
+ -rm -f ./$(DEPDIR)/test-mbrtowc.Po
+ -rm -f ./$(DEPDIR)/test-mbsinit.Po
+ -rm -f ./$(DEPDIR)/test-memchr.Po
+ -rm -f ./$(DEPDIR)/test-memrchr.Po
+ -rm -f ./$(DEPDIR)/test-nl_langinfo.Po
+ -rm -f ./$(DEPDIR)/test-open.Po
+ -rm -f ./$(DEPDIR)/test-pathmax.Po
+ -rm -f ./$(DEPDIR)/test-quotearg-simple.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-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-stat.Po
+ -rm -f ./$(DEPDIR)/test-stdalign.Po
+ -rm -f ./$(DEPDIR)/test-stdbool.Po
+ -rm -f ./$(DEPDIR)/test-stddef.Po
+ -rm -f ./$(DEPDIR)/test-stdint.Po
+ -rm -f ./$(DEPDIR)/test-stdio.Po
+ -rm -f ./$(DEPDIR)/test-stdlib.Po
+ -rm -f ./$(DEPDIR)/test-strerror.Po
+ -rm -f ./$(DEPDIR)/test-string.Po
+ -rm -f ./$(DEPDIR)/test-strverscmp.Po
+ -rm -f ./$(DEPDIR)/test-symlink.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-time.Po
+ -rm -f ./$(DEPDIR)/test-unistd.Po
+ -rm -f ./$(DEPDIR)/test-unsetenv.Po
+ -rm -f ./$(DEPDIR)/test-verify.Po
+ -rm -f ./$(DEPDIR)/test-version-etc.Po
+ -rm -f ./$(DEPDIR)/test-wchar.Po
+ -rm -f ./$(DEPDIR)/test-wcrtomb-w32.Po
+ -rm -f ./$(DEPDIR)/test-wcrtomb.Po
+ -rm -f ./$(DEPDIR)/test-wctype-h.Po
+ -rm -f ./$(DEPDIR)/test-xalloc-die.Po
+ -rm -f ./$(DEPDIR)/unsetenv.Po
+ -rm -f Makefile
+distclean-am: clean-am distclean-compile distclean-generic \
+ distclean-tags
+
+dvi: dvi-recursive
+
+dvi-am:
+
+html: html-recursive
+
+html-am:
+
+info: info-recursive
+
+info-am:
+
+install-data-am:
+
+install-dvi: install-dvi-recursive
+
+install-dvi-am:
+
+install-exec-am:
+
+install-html: install-html-recursive
+
+install-html-am:
+
+install-info: install-info-recursive
+
+install-info-am:
+
+install-man:
+
+install-pdf: install-pdf-recursive
+
+install-pdf-am:
+
+install-ps: install-ps-recursive
+
+install-ps-am:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-recursive
+ -rm -f ./$(DEPDIR)/binary-io.Po
+ -rm -f ./$(DEPDIR)/close.Po
+ -rm -f ./$(DEPDIR)/closedir.Po
+ -rm -f ./$(DEPDIR)/dfa-match-aux.Po
+ -rm -f ./$(DEPDIR)/dirfd.Po
+ -rm -f ./$(DEPDIR)/dup2.Po
+ -rm -f ./$(DEPDIR)/fd-hook.Po
+ -rm -f ./$(DEPDIR)/fdopen.Po
+ -rm -f ./$(DEPDIR)/fflush.Po
+ -rm -f ./$(DEPDIR)/file-has-acl.Po
+ -rm -f ./$(DEPDIR)/fpurge.Po
+ -rm -f ./$(DEPDIR)/freading.Po
+ -rm -f ./$(DEPDIR)/fseek.Po
+ -rm -f ./$(DEPDIR)/fseeko.Po
+ -rm -f ./$(DEPDIR)/ftell.Po
+ -rm -f ./$(DEPDIR)/ftello.Po
+ -rm -f ./$(DEPDIR)/getcwd-lgpl.Po
+ -rm -f ./$(DEPDIR)/getdtablesize.Po
+ -rm -f ./$(DEPDIR)/getpagesize.Po
+ -rm -f ./$(DEPDIR)/link.Po
+ -rm -f ./$(DEPDIR)/localename.Po
+ -rm -f ./$(DEPDIR)/lseek.Po
+ -rm -f ./$(DEPDIR)/open.Po
+ -rm -f ./$(DEPDIR)/opendir.Po
+ -rm -f ./$(DEPDIR)/putenv.Po
+ -rm -f ./$(DEPDIR)/read-file.Po
+ -rm -f ./$(DEPDIR)/readdir.Po
+ -rm -f ./$(DEPDIR)/realloc.Po
+ -rm -f ./$(DEPDIR)/setenv.Po
+ -rm -f ./$(DEPDIR)/setlocale.Po
+ -rm -f ./$(DEPDIR)/strdup.Po
+ -rm -f ./$(DEPDIR)/symlink.Po
+ -rm -f ./$(DEPDIR)/test-alignof.Po
+ -rm -f ./$(DEPDIR)/test-alloca-opt.Po
+ -rm -f ./$(DEPDIR)/test-binary-io.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-close.Po
+ -rm -f ./$(DEPDIR)/test-copy-acl.Po
+ -rm -f ./$(DEPDIR)/test-ctype.Po
+ -rm -f ./$(DEPDIR)/test-dirent.Po
+ -rm -f ./$(DEPDIR)/test-dup2.Po
+ -rm -f ./$(DEPDIR)/test-environ.Po
+ -rm -f ./$(DEPDIR)/test-errno.Po
+ -rm -f ./$(DEPDIR)/test-fcntl-h.Po
+ -rm -f ./$(DEPDIR)/test-fdopen.Po
+ -rm -f ./$(DEPDIR)/test-fflush.Po
+ -rm -f ./$(DEPDIR)/test-fflush2.Po
+ -rm -f ./$(DEPDIR)/test-fgetc.Po
+ -rm -f ./$(DEPDIR)/test-file-has-acl.Po
+ -rm -f ./$(DEPDIR)/test-fpending.Po
+ -rm -f ./$(DEPDIR)/test-fpurge.Po
+ -rm -f ./$(DEPDIR)/test-fputc.Po
+ -rm -f ./$(DEPDIR)/test-fread.Po
+ -rm -f ./$(DEPDIR)/test-freading.Po
+ -rm -f ./$(DEPDIR)/test-fseek.Po
+ -rm -f ./$(DEPDIR)/test-fseeko.Po
+ -rm -f ./$(DEPDIR)/test-fseeko3.Po
+ -rm -f ./$(DEPDIR)/test-fseeko4.Po
+ -rm -f ./$(DEPDIR)/test-fstat.Po
+ -rm -f ./$(DEPDIR)/test-ftell.Po
+ -rm -f ./$(DEPDIR)/test-ftell3.Po
+ -rm -f ./$(DEPDIR)/test-ftello.Po
+ -rm -f ./$(DEPDIR)/test-ftello3.Po
+ -rm -f ./$(DEPDIR)/test-ftello4.Po
+ -rm -f ./$(DEPDIR)/test-fwrite.Po
+ -rm -f ./$(DEPDIR)/test-fwriting.Po
+ -rm -f ./$(DEPDIR)/test-getcwd-lgpl.Po
+ -rm -f ./$(DEPDIR)/test-getdelim.Po
+ -rm -f ./$(DEPDIR)/test-getdtablesize.Po
+ -rm -f ./$(DEPDIR)/test-getopt-gnu.Po
+ -rm -f ./$(DEPDIR)/test-getopt-posix.Po
+ -rm -f ./$(DEPDIR)/test-getprogname.Po
+ -rm -f ./$(DEPDIR)/test-gettimeofday.Po
+ -rm -f ./$(DEPDIR)/test-ignore-value.Po
+ -rm -f ./$(DEPDIR)/test-intprops.Po
+ -rm -f ./$(DEPDIR)/test-inttypes.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-locale.Po
+ -rm -f ./$(DEPDIR)/test-localeconv.Po
+ -rm -f ./$(DEPDIR)/test-localename.Po
+ -rm -f ./$(DEPDIR)/test-lseek.Po
+ -rm -f ./$(DEPDIR)/test-lstat.Po
+ -rm -f ./$(DEPDIR)/test-malloca.Po
+ -rm -f ./$(DEPDIR)/test-mbrtowc-w32.Po
+ -rm -f ./$(DEPDIR)/test-mbrtowc.Po
+ -rm -f ./$(DEPDIR)/test-mbsinit.Po
+ -rm -f ./$(DEPDIR)/test-memchr.Po
+ -rm -f ./$(DEPDIR)/test-memrchr.Po
+ -rm -f ./$(DEPDIR)/test-nl_langinfo.Po
+ -rm -f ./$(DEPDIR)/test-open.Po
+ -rm -f ./$(DEPDIR)/test-pathmax.Po
+ -rm -f ./$(DEPDIR)/test-quotearg-simple.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-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-stat.Po
+ -rm -f ./$(DEPDIR)/test-stdalign.Po
+ -rm -f ./$(DEPDIR)/test-stdbool.Po
+ -rm -f ./$(DEPDIR)/test-stddef.Po
+ -rm -f ./$(DEPDIR)/test-stdint.Po
+ -rm -f ./$(DEPDIR)/test-stdio.Po
+ -rm -f ./$(DEPDIR)/test-stdlib.Po
+ -rm -f ./$(DEPDIR)/test-strerror.Po
+ -rm -f ./$(DEPDIR)/test-string.Po
+ -rm -f ./$(DEPDIR)/test-strverscmp.Po
+ -rm -f ./$(DEPDIR)/test-symlink.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-time.Po
+ -rm -f ./$(DEPDIR)/test-unistd.Po
+ -rm -f ./$(DEPDIR)/test-unsetenv.Po
+ -rm -f ./$(DEPDIR)/test-verify.Po
+ -rm -f ./$(DEPDIR)/test-version-etc.Po
+ -rm -f ./$(DEPDIR)/test-wchar.Po
+ -rm -f ./$(DEPDIR)/test-wcrtomb-w32.Po
+ -rm -f ./$(DEPDIR)/test-wcrtomb.Po
+ -rm -f ./$(DEPDIR)/test-wctype-h.Po
+ -rm -f ./$(DEPDIR)/test-xalloc-die.Po
+ -rm -f ./$(DEPDIR)/unsetenv.Po
+ -rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-recursive
+
+mostlyclean-am: mostlyclean-compile mostlyclean-generic \
+ mostlyclean-local
+
+pdf: pdf-recursive
+
+pdf-am:
+
+ps: ps-recursive
+
+ps-am:
+
+uninstall-am:
+
+.MAKE: $(am__recursive_targets) all check check-am install install-am \
+ install-strip
+
+.PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am \
+ am--depfiles check check-TESTS check-am clean \
+ clean-checkLIBRARIES clean-checkPROGRAMS clean-generic \
+ clean-local clean-noinstLIBRARIES clean-noinstPROGRAMS \
+ cscopelist-am ctags ctags-am distclean distclean-compile \
+ distclean-generic distclean-tags distdir dvi dvi-am html \
+ html-am info info-am install install-am install-data \
+ install-data-am install-dvi install-dvi-am install-exec \
+ install-exec-am install-html install-html-am install-info \
+ install-info-am install-man install-pdf install-pdf-am \
+ install-ps install-ps-am install-strip installcheck \
+ installcheck-am installdirs installdirs-am maintainer-clean \
+ maintainer-clean-generic mostlyclean mostlyclean-compile \
+ mostlyclean-generic mostlyclean-local pdf pdf-am ps ps-am \
+ recheck tags tags-am uninstall uninstall-am
+
+.PRECIOUS: Makefile
+
+
+# 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)
+ $(AM_V_GEN)rm -f $@-t $@ && \
+ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
+ sed -e 's|@''GUARD_PREFIX''@|GL|g' \
+ -e 's|@''HAVE_DIRENT_H''@|$(HAVE_DIRENT_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_DIRENT_H''@|$(NEXT_DIRENT_H)|g' \
+ -e 's/@''GNULIB_OPENDIR''@/$(GNULIB_OPENDIR)/g' \
+ -e 's/@''GNULIB_READDIR''@/$(GNULIB_READDIR)/g' \
+ -e 's/@''GNULIB_REWINDDIR''@/$(GNULIB_REWINDDIR)/g' \
+ -e 's/@''GNULIB_CLOSEDIR''@/$(GNULIB_CLOSEDIR)/g' \
+ -e 's/@''GNULIB_DIRFD''@/$(GNULIB_DIRFD)/g' \
+ -e 's/@''GNULIB_FDOPENDIR''@/$(GNULIB_FDOPENDIR)/g' \
+ -e 's/@''GNULIB_SCANDIR''@/$(GNULIB_SCANDIR)/g' \
+ -e 's/@''GNULIB_ALPHASORT''@/$(GNULIB_ALPHASORT)/g' \
+ -e 's/@''HAVE_OPENDIR''@/$(HAVE_OPENDIR)/g' \
+ -e 's/@''HAVE_READDIR''@/$(HAVE_READDIR)/g' \
+ -e 's/@''HAVE_REWINDDIR''@/$(HAVE_REWINDDIR)/g' \
+ -e 's/@''HAVE_CLOSEDIR''@/$(HAVE_CLOSEDIR)/g' \
+ -e 's|@''HAVE_DECL_DIRFD''@|$(HAVE_DECL_DIRFD)|g' \
+ -e 's|@''HAVE_DECL_FDOPENDIR''@|$(HAVE_DECL_FDOPENDIR)|g' \
+ -e 's|@''HAVE_FDOPENDIR''@|$(HAVE_FDOPENDIR)|g' \
+ -e 's|@''HAVE_SCANDIR''@|$(HAVE_SCANDIR)|g' \
+ -e 's|@''HAVE_ALPHASORT''@|$(HAVE_ALPHASORT)|g' \
+ -e 's|@''REPLACE_OPENDIR''@|$(REPLACE_OPENDIR)|g' \
+ -e 's|@''REPLACE_CLOSEDIR''@|$(REPLACE_CLOSEDIR)|g' \
+ -e 's|@''REPLACE_DIRFD''@|$(REPLACE_DIRFD)|g' \
+ -e 's|@''REPLACE_FDOPENDIR''@|$(REPLACE_FDOPENDIR)|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)/dirent.in.h; \
+ } > $@-t && \
+ mv $@-t $@
+
+# We need the following in order to create <inttypes.h> when the system
+# doesn't have one that works with the given compiler.
+inttypes.h: inttypes.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(WARN_ON_USE_H) $(ARG_NONNULL_H)
+ $(AM_V_GEN)rm -f $@-t $@ && \
+ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
+ sed -e 's/@''HAVE_INTTYPES_H''@/$(HAVE_INTTYPES_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_INTTYPES_H''@|$(NEXT_INTTYPES_H)|g' \
+ -e 's/@''PRI_MACROS_BROKEN''@/$(PRI_MACROS_BROKEN)/g' \
+ -e 's/@''APPLE_UNIVERSAL_BUILD''@/$(APPLE_UNIVERSAL_BUILD)/g' \
+ -e 's/@''HAVE_LONG_LONG_INT''@/$(HAVE_LONG_LONG_INT)/g' \
+ -e 's/@''HAVE_UNSIGNED_LONG_LONG_INT''@/$(HAVE_UNSIGNED_LONG_LONG_INT)/g' \
+ -e 's/@''PRIPTR_PREFIX''@/$(PRIPTR_PREFIX)/g' \
+ -e 's/@''GNULIB_IMAXABS''@/$(GNULIB_IMAXABS)/g' \
+ -e 's/@''GNULIB_IMAXDIV''@/$(GNULIB_IMAXDIV)/g' \
+ -e 's/@''GNULIB_STRTOIMAX''@/$(GNULIB_STRTOIMAX)/g' \
+ -e 's/@''GNULIB_STRTOUMAX''@/$(GNULIB_STRTOUMAX)/g' \
+ -e 's/@''HAVE_DECL_IMAXABS''@/$(HAVE_DECL_IMAXABS)/g' \
+ -e 's/@''HAVE_DECL_IMAXDIV''@/$(HAVE_DECL_IMAXDIV)/g' \
+ -e 's/@''HAVE_DECL_STRTOIMAX''@/$(HAVE_DECL_STRTOIMAX)/g' \
+ -e 's/@''HAVE_DECL_STRTOUMAX''@/$(HAVE_DECL_STRTOUMAX)/g' \
+ -e 's/@''REPLACE_STRTOIMAX''@/$(REPLACE_STRTOIMAX)/g' \
+ -e 's/@''REPLACE_STRTOUMAX''@/$(REPLACE_STRTOUMAX)/g' \
+ -e 's/@''INT32_MAX_LT_INTMAX_MAX''@/$(INT32_MAX_LT_INTMAX_MAX)/g' \
+ -e 's/@''INT64_MAX_EQ_LONG_MAX''@/$(INT64_MAX_EQ_LONG_MAX)/g' \
+ -e 's/@''UINT32_MAX_LT_UINTMAX_MAX''@/$(UINT32_MAX_LT_UINTMAX_MAX)/g' \
+ -e 's/@''UINT64_MAX_EQ_ULONG_MAX''@/$(UINT64_MAX_EQ_ULONG_MAX)/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)/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
+ $(AM_V_GEN)rm -f $@-t $@ && \
+ sed -n -e '/GL_ARG_NONNULL/,$$p' \
+ < $(top_srcdir)/build-aux/snippet/arg-nonnull.h \
+ > $@-t && \
+ mv $@-t $@
+# The c++defs.h that gets inserted into generated .h files is the same as
+# build-aux/snippet/c++defs.h, except that it has the copyright header cut off.
+c++defs.h: $(top_srcdir)/build-aux/snippet/c++defs.h
+ $(AM_V_GEN)rm -f $@-t $@ && \
+ sed -n -e '/_GL_CXXDEFS/,$$p' \
+ < $(top_srcdir)/build-aux/snippet/c++defs.h \
+ > $@-t && \
+ mv $@-t $@
+# The unused-parameter.h that gets inserted into generated .h files is the same
+# as build-aux/snippet/unused-parameter.h, except that it has the copyright
+# header cut off.
+unused-parameter.h: $(top_srcdir)/build-aux/snippet/unused-parameter.h
+ $(AM_V_GEN)rm -f $@-t $@ && \
+ sed -n -e '/GL_UNUSED_PARAMETER/,$$p' \
+ < $(top_srcdir)/build-aux/snippet/unused-parameter.h \
+ > $@-t && \
+ mv $@-t $@
+# The warn-on-use.h that gets inserted into generated .h files is the same as
+# build-aux/snippet/warn-on-use.h, except that it has the copyright header cut
+# off.
+warn-on-use.h: $(top_srcdir)/build-aux/snippet/warn-on-use.h
+ $(AM_V_GEN)rm -f $@-t $@ && \
+ sed -n -e '/^.ifndef/,$$p' \
+ < $(top_srcdir)/build-aux/snippet/warn-on-use.h \
+ > $@-t && \
+ mv $@-t $@
+
+# Clean up after Solaris cc.
+clean-local:
+ rm -rf SunWS_cache
+
+mostlyclean-local: mostlyclean-generic
+ @for dir in '' $(MOSTLYCLEANDIRS); do \
+ if test -n "$$dir" && test -d $$dir; then \
+ echo "rmdir $$dir"; rmdir $$dir; \
+ fi; \
+ done; \
+ :
+
+# 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/gnulib-tests/binary-io.c b/gnulib-tests/binary-io.c
new file mode 100644
index 0000000..d828bcd
--- /dev/null
+++ b/gnulib-tests/binary-io.c
@@ -0,0 +1,4 @@
+#include <config.h>
+#define BINARY_IO_INLINE _GL_EXTERN_INLINE
+#include "binary-io.h"
+typedef int dummy;
diff --git a/gnulib-tests/binary-io.h b/gnulib-tests/binary-io.h
new file mode 100644
index 0000000..9f17c0d
--- /dev/null
+++ b/gnulib-tests/binary-io.h
@@ -0,0 +1,75 @@
+/* Binary mode I/O.
+ Copyright (C) 2001, 2003, 2005, 2008-2016 Free Software Foundation, Inc.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+#ifndef _BINARY_H
+#define _BINARY_H
+
+/* For systems that distinguish between text and binary I/O.
+ O_BINARY is guaranteed by the gnulib <fcntl.h>. */
+#include <fcntl.h>
+
+/* The MSVC7 <stdio.h> doesn't like to be included after '#define fileno ...',
+ so we include it here first. */
+#include <stdio.h>
+
+#ifndef _GL_INLINE_HEADER_BEGIN
+ #error "Please include config.h first."
+#endif
+_GL_INLINE_HEADER_BEGIN
+#ifndef BINARY_IO_INLINE
+# 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
+# else
+# define set_binary_mode _setmode
+# undef fileno
+# define fileno _fileno
+# endif
+#else
+ /* On reasonable systems, binary I/O is the only choice. */
+ /* 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)
+{
+ (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))
+#else
+# define SET_BINARY(fd) ((void) set_binary_mode (fd, O_BINARY))
+#endif
+
+_GL_INLINE_HEADER_END
+
+#endif /* _BINARY_H */
diff --git a/gnulib-tests/close.c b/gnulib-tests/close.c
new file mode 100644
index 0000000..46a7aa5
--- /dev/null
+++ b/gnulib-tests/close.c
@@ -0,0 +1,69 @@
+/* close replacement.
+ Copyright (C) 2008-2016 Free Software Foundation, Inc.
+
+ This 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>
+
+/* Specification. */
+#include <unistd.h>
+
+#include <errno.h>
+
+#include "fd-hook.h"
+#include "msvc-inval.h"
+
+#undef close
+
+#if HAVE_MSVC_INVALID_PARAMETER_HANDLER
+static int
+close_nothrow (int fd)
+{
+ int result;
+
+ TRY_MSVC_INVAL
+ {
+ result = close (fd);
+ }
+ CATCH_MSVC_INVAL
+ {
+ result = -1;
+ errno = EBADF;
+ }
+ DONE_MSVC_INVAL;
+
+ return result;
+}
+#else
+# define close_nothrow close
+#endif
+
+/* Override close() to call into other gnulib modules. */
+
+int
+rpl_close (int fd)
+{
+#if WINDOWS_SOCKETS
+ int retval = execute_all_close_hooks (close_nothrow, fd);
+#else
+ int retval = close_nothrow (fd);
+#endif
+
+#if REPLACE_FCHDIR
+ if (retval >= 0)
+ _gl_unregister_fd (fd);
+#endif
+
+ return retval;
+}
diff --git a/gnulib-tests/closedir.c b/gnulib-tests/closedir.c
new file mode 100644
index 0000000..30d1290
--- /dev/null
+++ b/gnulib-tests/closedir.c
@@ -0,0 +1,71 @@
+/* Stop reading the entries of a directory.
+ Copyright (C) 2006-2016 Free Software Foundation, Inc.
+
+ This 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>
+
+/* Specification. */
+#include <dirent.h>
+
+#if REPLACE_FCHDIR
+# include <unistd.h>
+#endif
+
+#if HAVE_CLOSEDIR
+
+/* Override closedir(), to keep track of the open file descriptors.
+ Needed because there is a function dirfd(). */
+
+#else
+
+# include <stdlib.h>
+
+# include "dirent-private.h"
+
+#endif
+
+int
+closedir (DIR *dirp)
+{
+# if REPLACE_FCHDIR || REPLACE_DIRFD
+ int fd = dirfd (dirp);
+# endif
+ int retval;
+
+#if HAVE_CLOSEDIR
+# undef closedir
+
+ retval = closedir (dirp);
+
+# ifdef __KLIBC__
+ if (!retval)
+ _gl_unregister_dirp_fd (fd);
+# endif
+#else
+
+ if (dirp->current != INVALID_HANDLE_VALUE)
+ FindClose (dirp->current);
+ free (dirp);
+
+ retval = 0;
+
+#endif
+
+#if REPLACE_FCHDIR
+ if (retval >= 0)
+ _gl_unregister_fd (fd);
+#endif
+ return retval;
+}
diff --git a/gnulib-tests/dfa-invalid-char-class.sh b/gnulib-tests/dfa-invalid-char-class.sh
new file mode 100755
index 0000000..2417361
--- /dev/null
+++ b/gnulib-tests/dfa-invalid-char-class.sh
@@ -0,0 +1,30 @@
+#!/bin/sh
+# This use of our DFA-testing helper would fail for grep-2.21.
+
+# Copyright 2014-2016 Free Software Foundation, Inc.
+
+# This 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/>.
+
+. "${srcdir=.}/init.sh"; path_prepend_ ../src
+
+# Add "." to PATH for the use of dfa-match-aux.
+path_prepend_ .
+
+fail=0
+
+echo 'dfaerror: invalid character class' > exp
+LC_ALL=C dfa-match-aux '[[:foo:]]' a > out 2>&1
+compare exp out || fail=1
+
+Exit $fail
diff --git a/gnulib-tests/dfa-match-aux.c b/gnulib-tests/dfa-match-aux.c
new file mode 100644
index 0000000..af80628
--- /dev/null
+++ b/gnulib-tests/dfa-match-aux.c
@@ -0,0 +1,73 @@
+/* Auxiliary program to test a DFA code path that cannot be triggered
+ by grep or gawk.
+ Copyright 2014-2016 Free Software Foundation, Inc.
+
+ This 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, 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 <regex.h>
+#include <dfa.h>
+#include <localeinfo.h>
+
+#include "getprogname.h"
+
+_Noreturn void
+dfaerror (char const *mesg)
+{
+ printf ("dfaerror: %s\n", mesg);
+ exit (EXIT_FAILURE);
+}
+
+_Noreturn void
+dfawarn (char const *mesg)
+{
+ printf ("dfawarn: %s\n", mesg);
+ exit (EXIT_FAILURE);
+}
+
+int
+main (int argc, char **argv)
+{
+ struct dfa *dfa;
+ char *beg, *end, *p;
+ int allow_nl;
+ struct localeinfo localeinfo;
+
+ if (argc < 3)
+ exit (EXIT_FAILURE);
+
+ setlocale (LC_ALL, "");
+ init_localeinfo (&localeinfo);
+
+ dfa = dfaalloc ();
+ dfasyntax (dfa, &localeinfo, RE_SYNTAX_GREP | RE_NO_EMPTY_RANGES, 0);
+ dfacomp (argv[1], strlen (argv[1]), dfa, 0);
+
+ beg = argv[2];
+ end = argv[2] + strlen (argv[2]);
+ allow_nl = argc > 3 && atoi (argv[3]);
+
+ p = dfaexec (dfa, beg, end, allow_nl, NULL, NULL);
+
+ if (p != NULL)
+ printf ("%zd\n", p - beg);
+
+ exit (EXIT_SUCCESS);
+}
diff --git a/gnulib-tests/dfa-match.sh b/gnulib-tests/dfa-match.sh
new file mode 100755
index 0000000..5da1985
--- /dev/null
+++ b/gnulib-tests/dfa-match.sh
@@ -0,0 +1,39 @@
+#!/bin/sh
+# This would fail with grep-2.21's dfa.c.
+
+# Copyright 2014-2016 Free Software Foundation, Inc.
+
+# This 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/>.
+
+. "${srcdir=.}/init.sh"; path_prepend_ ../src
+
+# Add "." to PATH for the use of dfa-match-aux.
+path_prepend_ .
+
+if (type timeout) >/dev/null 2>&1; then
+ timeout_10='timeout 10'
+else
+ timeout_10=
+fi
+
+fail=0
+
+dfa-match-aux a ba 0 > out || fail=1
+compare /dev/null out || fail=1
+
+in=$(printf "bb\nbb")
+$timeout_10 dfa-match-aux a "$in" 1 > out || fail=1
+compare /dev/null out || fail=1
+
+Exit $fail
diff --git a/gnulib-tests/dirent-private.h b/gnulib-tests/dirent-private.h
new file mode 100644
index 0000000..9b200f3
--- /dev/null
+++ b/gnulib-tests/dirent-private.h
@@ -0,0 +1,40 @@
+/* Private details of the DIR type.
+ Copyright (C) 2011-2016 Free Software Foundation, Inc.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+#ifndef _DIRENT_PRIVATE_H
+#define _DIRENT_PRIVATE_H 1
+
+#define WIN32_LEAN_AND_MEAN
+#include <windows.h>
+
+struct gl_directory
+{
+ /* Status, or error code to produce in next readdir() call.
+ -2 means the end of the directory is already reached,
+ -1 means the entry was already filled by FindFirstFile,
+ 0 means the entry needs to be filled using FindNextFile.
+ A positive value is an error code. */
+ int status;
+ /* Handle, reading the directory, at current position. */
+ HANDLE current;
+ /* Found directory entry. */
+ WIN32_FIND_DATA entry;
+ /* Argument to pass to FindFirstFile. It consists of the absolutized
+ directory name, followed by a directory separator and the wildcards. */
+ char dir_name_mask[1];
+};
+
+#endif /* _DIRENT_PRIVATE_H */
diff --git a/gnulib-tests/dirent.in.h b/gnulib-tests/dirent.in.h
new file mode 100644
index 0000000..65482d7
--- /dev/null
+++ b/gnulib-tests/dirent.in.h
@@ -0,0 +1,267 @@
+/* A GNU-like <dirent.h>.
+ Copyright (C) 2006-2016 Free Software Foundation, Inc.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+#ifndef _@GUARD_PREFIX@_DIRENT_H
+
+#if __GNUC__ >= 3
+@PRAGMA_SYSTEM_HEADER@
+#endif
+@PRAGMA_COLUMNS@
+
+/* The include_next requires a split double-inclusion guard. */
+#if @HAVE_DIRENT_H@
+# @INCLUDE_NEXT@ @NEXT_DIRENT_H@
+#endif
+
+#ifndef _@GUARD_PREFIX@_DIRENT_H
+#define _@GUARD_PREFIX@_DIRENT_H
+
+/* Get ino_t. Needed on some systems, including glibc 2.8. */
+#include <sys/types.h>
+
+#if !@HAVE_DIRENT_H@
+/* Define types DIR and 'struct dirent'. */
+# if !GNULIB_defined_struct_dirent
+struct dirent
+{
+ char d_type;
+ char d_name[1];
+};
+/* Possible values for 'd_type'. */
+# define DT_UNKNOWN 0
+# define DT_FIFO 1 /* FIFO */
+# define DT_CHR 2 /* character device */
+# define DT_DIR 4 /* directory */
+# define DT_BLK 6 /* block device */
+# define DT_REG 8 /* regular file */
+# define DT_LNK 10 /* symbolic link */
+# define DT_SOCK 12 /* socket */
+# define DT_WHT 14 /* whiteout */
+typedef struct gl_directory DIR;
+# define GNULIB_defined_struct_dirent 1
+# endif
+#endif
+
+/* The __attribute__ feature is available in gcc versions 2.5 and later.
+ The attribute __pure__ was added in gcc 2.96. */
+#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 96)
+# define _GL_ATTRIBUTE_PURE __attribute__ ((__pure__))
+#else
+# define _GL_ATTRIBUTE_PURE /* empty */
+#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. */
+
+
+/* Declare overridden functions. */
+
+#if @GNULIB_OPENDIR@
+# if @REPLACE_OPENDIR@
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# undef opendir
+# define opendir rpl_opendir
+# define GNULIB_defined_opendir 1
+# endif
+_GL_FUNCDECL_RPL (opendir, DIR *, (const char *dir_name) _GL_ARG_NONNULL ((1)));
+_GL_CXXALIAS_RPL (opendir, DIR *, (const char *dir_name));
+# else
+# if !@HAVE_OPENDIR@
+_GL_FUNCDECL_SYS (opendir, DIR *, (const char *dir_name) _GL_ARG_NONNULL ((1)));
+# endif
+_GL_CXXALIAS_SYS (opendir, DIR *, (const char *dir_name));
+# endif
+_GL_CXXALIASWARN (opendir);
+#elif defined GNULIB_POSIXCHECK
+# undef opendir
+# if HAVE_RAW_DECL_OPENDIR
+_GL_WARN_ON_USE (opendir, "opendir is not portable - "
+ "use gnulib module opendir for portability");
+# endif
+#endif
+
+#if @GNULIB_READDIR@
+# if !@HAVE_READDIR@
+_GL_FUNCDECL_SYS (readdir, struct dirent *, (DIR *dirp) _GL_ARG_NONNULL ((1)));
+# endif
+_GL_CXXALIAS_SYS (readdir, struct dirent *, (DIR *dirp));
+_GL_CXXALIASWARN (readdir);
+#elif defined GNULIB_POSIXCHECK
+# undef readdir
+# if HAVE_RAW_DECL_READDIR
+_GL_WARN_ON_USE (readdir, "readdir is not portable - "
+ "use gnulib module readdir for portability");
+# endif
+#endif
+
+#if @GNULIB_REWINDDIR@
+# if !@HAVE_REWINDDIR@
+_GL_FUNCDECL_SYS (rewinddir, void, (DIR *dirp) _GL_ARG_NONNULL ((1)));
+# endif
+_GL_CXXALIAS_SYS (rewinddir, void, (DIR *dirp));
+_GL_CXXALIASWARN (rewinddir);
+#elif defined GNULIB_POSIXCHECK
+# undef rewinddir
+# if HAVE_RAW_DECL_REWINDDIR
+_GL_WARN_ON_USE (rewinddir, "rewinddir is not portable - "
+ "use gnulib module rewinddir for portability");
+# endif
+#endif
+
+#if @GNULIB_CLOSEDIR@
+# if @REPLACE_CLOSEDIR@
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# undef closedir
+# define closedir rpl_closedir
+# define GNULIB_defined_closedir 1
+# endif
+_GL_FUNCDECL_RPL (closedir, int, (DIR *dirp) _GL_ARG_NONNULL ((1)));
+_GL_CXXALIAS_RPL (closedir, int, (DIR *dirp));
+# else
+# if !@HAVE_CLOSEDIR@
+_GL_FUNCDECL_SYS (closedir, int, (DIR *dirp) _GL_ARG_NONNULL ((1)));
+# endif
+_GL_CXXALIAS_SYS (closedir, int, (DIR *dirp));
+# endif
+_GL_CXXALIASWARN (closedir);
+#elif defined GNULIB_POSIXCHECK
+# undef closedir
+# if HAVE_RAW_DECL_CLOSEDIR
+_GL_WARN_ON_USE (closedir, "closedir is not portable - "
+ "use gnulib module closedir for portability");
+# endif
+#endif
+
+#if @GNULIB_DIRFD@
+/* Return the file descriptor associated with the given directory stream,
+ or -1 if none exists. */
+# if @REPLACE_DIRFD@
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# undef dirfd
+# define dirfd rpl_dirfd
+# endif
+_GL_FUNCDECL_RPL (dirfd, int, (DIR *) _GL_ARG_NONNULL ((1)));
+_GL_CXXALIAS_RPL (dirfd, int, (DIR *));
+
+# ifdef __KLIBC__
+/* Gnulib internal hooks needed to maintain the dirfd metadata. */
+_GL_EXTERN_C int _gl_register_dirp_fd (int fd, DIR *dirp)
+ _GL_ARG_NONNULL ((2));
+_GL_EXTERN_C void _gl_unregister_dirp_fd (int fd);
+# endif
+# else
+# if defined __cplusplus && defined GNULIB_NAMESPACE && defined dirfd
+ /* dirfd is defined as a macro and not as a function.
+ Turn it into a function and get rid of the macro. */
+static inline int (dirfd) (DIR *dp) { return dirfd (dp); }
+# undef dirfd
+# endif
+# if !(@HAVE_DECL_DIRFD@ || defined dirfd)
+_GL_FUNCDECL_SYS (dirfd, int, (DIR *) _GL_ARG_NONNULL ((1)));
+# endif
+_GL_CXXALIAS_SYS (dirfd, int, (DIR *));
+# endif
+_GL_CXXALIASWARN (dirfd);
+#elif defined GNULIB_POSIXCHECK
+# undef dirfd
+# if HAVE_RAW_DECL_DIRFD
+_GL_WARN_ON_USE (dirfd, "dirfd is unportable - "
+ "use gnulib module dirfd for portability");
+# endif
+#endif
+
+#if @GNULIB_FDOPENDIR@
+/* Open a directory stream visiting the given directory file
+ descriptor. Return NULL and set errno if fd is not visiting a
+ directory. On success, this function consumes fd (it will be
+ implicitly closed either by this function or by a subsequent
+ closedir). */
+# if @REPLACE_FDOPENDIR@
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# undef fdopendir
+# define fdopendir rpl_fdopendir
+# endif
+_GL_FUNCDECL_RPL (fdopendir, DIR *, (int fd));
+_GL_CXXALIAS_RPL (fdopendir, DIR *, (int fd));
+# else
+# if !@HAVE_FDOPENDIR@ || !@HAVE_DECL_FDOPENDIR@
+_GL_FUNCDECL_SYS (fdopendir, DIR *, (int fd));
+# endif
+_GL_CXXALIAS_SYS (fdopendir, DIR *, (int fd));
+# endif
+_GL_CXXALIASWARN (fdopendir);
+#elif defined GNULIB_POSIXCHECK
+# undef fdopendir
+# if HAVE_RAW_DECL_FDOPENDIR
+_GL_WARN_ON_USE (fdopendir, "fdopendir is unportable - "
+ "use gnulib module fdopendir for portability");
+# endif
+#endif
+
+#if @GNULIB_SCANDIR@
+/* Scan the directory DIR, calling FILTER on each directory entry.
+ Entries for which FILTER returns nonzero are individually malloc'd,
+ sorted using qsort with CMP, and collected in a malloc'd array in
+ *NAMELIST. Returns the number of entries selected, or -1 on error. */
+# if !@HAVE_SCANDIR@
+_GL_FUNCDECL_SYS (scandir, int,
+ (const char *dir, struct dirent ***namelist,
+ int (*filter) (const struct dirent *),
+ int (*cmp) (const struct dirent **, const struct dirent **))
+ _GL_ARG_NONNULL ((1, 2, 4)));
+# endif
+/* Need to cast, because on glibc systems, the fourth parameter is
+ int (*cmp) (const void *, const void *). */
+_GL_CXXALIAS_SYS_CAST (scandir, int,
+ (const char *dir, struct dirent ***namelist,
+ int (*filter) (const struct dirent *),
+ int (*cmp) (const struct dirent **, const struct dirent **)));
+_GL_CXXALIASWARN (scandir);
+#elif defined GNULIB_POSIXCHECK
+# undef scandir
+# if HAVE_RAW_DECL_SCANDIR
+_GL_WARN_ON_USE (scandir, "scandir is unportable - "
+ "use gnulib module scandir for portability");
+# endif
+#endif
+
+#if @GNULIB_ALPHASORT@
+/* Compare two 'struct dirent' entries alphabetically. */
+# if !@HAVE_ALPHASORT@
+_GL_FUNCDECL_SYS (alphasort, int,
+ (const struct dirent **, const struct dirent **)
+ _GL_ATTRIBUTE_PURE
+ _GL_ARG_NONNULL ((1, 2)));
+# endif
+/* Need to cast, because on glibc systems, the parameters are
+ (const void *, const void *). */
+_GL_CXXALIAS_SYS_CAST (alphasort, int,
+ (const struct dirent **, const struct dirent **));
+_GL_CXXALIASWARN (alphasort);
+#elif defined GNULIB_POSIXCHECK
+# undef alphasort
+# if HAVE_RAW_DECL_ALPHASORT
+_GL_WARN_ON_USE (alphasort, "alphasort is unportable - "
+ "use gnulib module alphasort for portability");
+# endif
+#endif
+
+
+#endif /* _@GUARD_PREFIX@_DIRENT_H */
+#endif /* _@GUARD_PREFIX@_DIRENT_H */
diff --git a/gnulib-tests/dirfd.c b/gnulib-tests/dirfd.c
new file mode 100644
index 0000000..a325848
--- /dev/null
+++ b/gnulib-tests/dirfd.c
@@ -0,0 +1,98 @@
+/* dirfd.c -- return the file descriptor associated with an open DIR*
+
+ Copyright (C) 2001, 2006, 2008-2016 Free Software Foundation, Inc.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+/* Written by Jim Meyering. */
+
+#include <config.h>
+
+#include <dirent.h>
+#include <errno.h>
+
+#ifdef __KLIBC__
+# include <stdlib.h>
+# include <io.h>
+
+static struct dirp_fd_list
+{
+ DIR *dirp;
+ int fd;
+ struct dirp_fd_list *next;
+} *dirp_fd_start = NULL;
+
+/* Register fd associated with dirp to dirp_fd_list. */
+int
+_gl_register_dirp_fd (int fd, DIR *dirp)
+{
+ struct dirp_fd_list *new_dirp_fd = malloc (sizeof *new_dirp_fd);
+ if (!new_dirp_fd)
+ return -1;
+
+ new_dirp_fd->dirp = dirp;
+ new_dirp_fd->fd = fd;
+ new_dirp_fd->next = dirp_fd_start;
+
+ dirp_fd_start = new_dirp_fd;
+
+ return 0;
+}
+
+/* Unregister fd from dirp_fd_list with closing it */
+void
+_gl_unregister_dirp_fd (int fd)
+{
+ struct dirp_fd_list *dirp_fd;
+ struct dirp_fd_list *dirp_fd_prev;
+
+ for (dirp_fd_prev = NULL, dirp_fd = dirp_fd_start; dirp_fd;
+ dirp_fd_prev = dirp_fd, dirp_fd = dirp_fd->next)
+ {
+ if (dirp_fd->fd == fd)
+ {
+ if (dirp_fd_prev)
+ dirp_fd_prev->next = dirp_fd->next;
+ else /* dirp_fd == dirp_fd_start */
+ dirp_fd_start = dirp_fd_start->next;
+
+ close (fd);
+ free (dirp_fd);
+ break;
+ }
+ }
+}
+#endif
+
+int
+dirfd (DIR *dir_p)
+{
+ int fd = DIR_TO_FD (dir_p);
+ if (fd == -1)
+#ifndef __KLIBC__
+ errno = ENOTSUP;
+#else
+ {
+ struct dirp_fd_list *dirp_fd;
+
+ for (dirp_fd = dirp_fd_start; dirp_fd; dirp_fd = dirp_fd->next)
+ if (dirp_fd->dirp == dir_p)
+ return dirp_fd->fd;
+
+ errno = EINVAL;
+ }
+#endif
+
+ return fd;
+}
diff --git a/gnulib-tests/dup2.c b/gnulib-tests/dup2.c
new file mode 100644
index 0000000..5d026f2
--- /dev/null
+++ b/gnulib-tests/dup2.c
@@ -0,0 +1,215 @@
+/* Duplicate an open file descriptor to a specified file descriptor.
+
+ Copyright (C) 1999, 2004-2007, 2009-2016 Free Software Foundation, Inc.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+/* written by Paul Eggert */
+
+#include <config.h>
+
+/* Specification. */
+#include <unistd.h>
+
+#include <errno.h>
+#include <fcntl.h>
+
+#if HAVE_DUP2
+
+# undef dup2
+
+# if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
+
+/* Get declarations of the native Windows API functions. */
+# define WIN32_LEAN_AND_MEAN
+# include <windows.h>
+
+# include "msvc-inval.h"
+
+/* Get _get_osfhandle. */
+# include "msvc-nothrow.h"
+
+static int
+ms_windows_dup2 (int fd, int desired_fd)
+{
+ int result;
+
+ /* If fd is closed, mingw hangs on dup2 (fd, fd). If fd is open,
+ dup2 (fd, fd) returns 0, but all further attempts to use fd in
+ future dup2 calls will hang. */
+ if (fd == desired_fd)
+ {
+ if ((HANDLE) _get_osfhandle (fd) == INVALID_HANDLE_VALUE)
+ {
+ errno = EBADF;
+ return -1;
+ }
+ return fd;
+ }
+
+ /* Wine 1.0.1 return 0 when desired_fd is negative but not -1:
+ http://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;
+
+ if (result == 0)
+ result = desired_fd;
+
+ return result;
+}
+
+# define dup2 ms_windows_dup2
+
+# elif defined __KLIBC__
+
+# include <InnoTekLIBC/backend.h>
+
+static int
+klibc_dup2dirfd (int fd, int desired_fd)
+{
+ int tempfd;
+ int dupfd;
+
+ tempfd = open ("NUL", O_RDONLY);
+ if (tempfd == -1)
+ return -1;
+
+ if (tempfd == desired_fd)
+ {
+ close (tempfd);
+
+ char path[_MAX_PATH];
+ if (__libc_Back_ioFHToPath (fd, path, sizeof (path)))
+ return -1;
+
+ return open(path, O_RDONLY);
+ }
+
+ dupfd = klibc_dup2dirfd (fd, desired_fd);
+
+ close (tempfd);
+
+ return dupfd;
+}
+
+static int
+klibc_dup2 (int fd, int desired_fd)
+{
+ int dupfd;
+ struct stat sbuf;
+
+ dupfd = dup2 (fd, desired_fd);
+ if (dupfd == -1 && errno == ENOTSUP \
+ && !fstat (fd, &sbuf) && S_ISDIR (sbuf.st_mode))
+ {
+ close (desired_fd);
+
+ return klibc_dup2dirfd (fd, desired_fd);
+ }
+
+ return dupfd;
+}
+
+# define dup2 klibc_dup2
+# endif
+
+int
+rpl_dup2 (int fd, int desired_fd)
+{
+ int result;
+
+# ifdef F_GETFL
+ /* On Linux kernels 2.6.26-2.6.29, dup2 (fd, fd) returns -EBADF.
+ On Cygwin 1.5.x, dup2 (1, 1) returns 0.
+ On Cygwin 1.7.17, dup2 (1, -1) dumps core.
+ On Cygwin 1.7.25, dup2 (1, 256) can dump core.
+ On Haiku, dup2 (fd, fd) mistakenly clears FD_CLOEXEC. */
+# if HAVE_SETDTABLESIZE
+ setdtablesize (desired_fd + 1);
+# endif
+ if (desired_fd < 0)
+ fd = desired_fd;
+ if (fd == desired_fd)
+ return fcntl (fd, F_GETFL) == -1 ? -1 : fd;
+# endif
+
+ result = dup2 (fd, desired_fd);
+
+ /* Correct an errno value on FreeBSD 6.1 and Cygwin 1.5.x. */
+ if (result == -1 && errno == EMFILE)
+ errno = EBADF;
+# if REPLACE_FCHDIR
+ if (fd != desired_fd && result != -1)
+ result = _gl_register_dup (fd, result);
+# endif
+ return result;
+}
+
+#else /* !HAVE_DUP2 */
+
+/* On older platforms, dup2 did not exist. */
+
+# ifndef F_DUPFD
+static int
+dupfd (int fd, int desired_fd)
+{
+ int duplicated_fd = dup (fd);
+ if (duplicated_fd < 0 || duplicated_fd == desired_fd)
+ return duplicated_fd;
+ else
+ {
+ int r = dupfd (fd, desired_fd);
+ int e = errno;
+ close (duplicated_fd);
+ errno = e;
+ return r;
+ }
+}
+# endif
+
+int
+dup2 (int fd, int desired_fd)
+{
+ int result = fcntl (fd, F_GETFL) < 0 ? -1 : fd;
+ if (result == -1 || fd == desired_fd)
+ return result;
+ close (desired_fd);
+# ifdef F_DUPFD
+ result = fcntl (fd, F_DUPFD, desired_fd);
+# if REPLACE_FCHDIR
+ if (0 <= result)
+ result = _gl_register_dup (fd, result);
+# endif
+# else
+ result = dupfd (fd, desired_fd);
+# endif
+ if (result == -1 && (errno == EMFILE || errno == EINVAL))
+ errno = EBADF;
+ return result;
+}
+#endif /* !HAVE_DUP2 */
diff --git a/gnulib-tests/fd-hook.c b/gnulib-tests/fd-hook.c
new file mode 100644
index 0000000..8676c6b
--- /dev/null
+++ b/gnulib-tests/fd-hook.c
@@ -0,0 +1,116 @@
+/* Hook for making making file descriptor functions close(), ioctl() extensible.
+ Copyright (C) 2009-2016 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
+ 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>
+
+/* Specification. */
+#include "fd-hook.h"
+
+#include <stdlib.h>
+
+/* Currently, this entire code is only needed for the handling of sockets
+ on native Windows platforms. */
+#if WINDOWS_SOCKETS
+
+/* The first and last link in the doubly linked list.
+ Initially the list is empty. */
+static struct fd_hook anchor = { &anchor, &anchor, NULL, NULL };
+
+int
+execute_close_hooks (const struct fd_hook *remaining_list, gl_close_fn primary,
+ int fd)
+{
+ if (remaining_list == &anchor)
+ /* End of list reached. */
+ return primary (fd);
+ else
+ return remaining_list->private_close_fn (remaining_list->private_next,
+ primary, fd);
+}
+
+int
+execute_all_close_hooks (gl_close_fn primary, int fd)
+{
+ return execute_close_hooks (anchor.private_next, primary, fd);
+}
+
+int
+execute_ioctl_hooks (const struct fd_hook *remaining_list, gl_ioctl_fn primary,
+ int fd, int request, void *arg)
+{
+ if (remaining_list == &anchor)
+ /* End of list reached. */
+ return primary (fd, request, arg);
+ else
+ return remaining_list->private_ioctl_fn (remaining_list->private_next,
+ primary, fd, request, arg);
+}
+
+int
+execute_all_ioctl_hooks (gl_ioctl_fn primary,
+ int fd, int request, void *arg)
+{
+ return execute_ioctl_hooks (anchor.private_next, primary, fd, request, arg);
+}
+
+void
+register_fd_hook (close_hook_fn close_hook, ioctl_hook_fn ioctl_hook, struct fd_hook *link)
+{
+ if (close_hook == NULL)
+ close_hook = execute_close_hooks;
+ if (ioctl_hook == NULL)
+ ioctl_hook = execute_ioctl_hooks;
+
+ if (link->private_next == NULL && link->private_prev == NULL)
+ {
+ /* Add the link to the doubly linked list. */
+ link->private_next = anchor.private_next;
+ link->private_prev = &anchor;
+ link->private_close_fn = close_hook;
+ link->private_ioctl_fn = ioctl_hook;
+ anchor.private_next->private_prev = link;
+ anchor.private_next = link;
+ }
+ else
+ {
+ /* The link is already in use. */
+ if (link->private_close_fn != close_hook
+ || link->private_ioctl_fn != ioctl_hook)
+ abort ();
+ }
+}
+
+void
+unregister_fd_hook (struct fd_hook *link)
+{
+ struct fd_hook *next = link->private_next;
+ struct fd_hook *prev = link->private_prev;
+
+ if (next != NULL && prev != NULL)
+ {
+ /* The link is in use. Remove it from the doubly linked list. */
+ prev->private_next = next;
+ next->private_prev = prev;
+ /* Clear the link, to mark it unused. */
+ link->private_next = NULL;
+ link->private_prev = NULL;
+ link->private_close_fn = NULL;
+ link->private_ioctl_fn = NULL;
+ }
+}
+
+#endif
diff --git a/gnulib-tests/fd-hook.h b/gnulib-tests/fd-hook.h
new file mode 100644
index 0000000..9568d07
--- /dev/null
+++ b/gnulib-tests/fd-hook.h
@@ -0,0 +1,119 @@
+/* Hook for making making file descriptor functions close(), ioctl() extensible.
+ Copyright (C) 2009-2016 Free Software Foundation, Inc.
+
+ This program is free software: you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published
+ by the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+
+#ifndef FD_HOOK_H
+#define FD_HOOK_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+
+/* Currently, this entire code is only needed for the handling of sockets
+ on native Windows platforms. */
+#if WINDOWS_SOCKETS
+
+
+/* Type of function that closes FD. */
+typedef int (*gl_close_fn) (int fd);
+
+/* Type of function that applies a control request to FD. */
+typedef int (*gl_ioctl_fn) (int fd, int request, void *arg);
+
+/* An element of the list of file descriptor hooks.
+ In CLOS (Common Lisp Object System) speak, it consists of an "around"
+ method for the close() function and an "around" method for the ioctl()
+ function.
+ The fields of this structure are considered private. */
+struct fd_hook
+{
+ /* Doubly linked list. */
+ struct fd_hook *private_next;
+ struct fd_hook *private_prev;
+ /* Function that treats the types of FD that it knows about and calls
+ execute_close_hooks (REMAINING_LIST, PRIMARY, FD) as a fallback. */
+ int (*private_close_fn) (const struct fd_hook *remaining_list,
+ gl_close_fn primary,
+ int fd);
+ /* Function that treats the types of FD that it knows about and calls
+ execute_ioctl_hooks (REMAINING_LIST, PRIMARY, FD, REQUEST, ARG) as a
+ fallback. */
+ int (*private_ioctl_fn) (const struct fd_hook *remaining_list,
+ gl_ioctl_fn primary,
+ int fd, int request, void *arg);
+};
+
+/* This type of function closes FD, applying special knowledge for the FD
+ types it knows about, and calls
+ execute_close_hooks (REMAINING_LIST, PRIMARY, FD)
+ for the other FD types.
+ In CLOS speak, REMAINING_LIST is the remaining list of "around" methods,
+ and PRIMARY is the "primary" method for close(). */
+typedef int (*close_hook_fn) (const struct fd_hook *remaining_list,
+ gl_close_fn primary,
+ int fd);
+
+/* Execute the close hooks in REMAINING_LIST, with PRIMARY as "primary" method.
+ Return 0 or -1, like close() would do. */
+extern int execute_close_hooks (const struct fd_hook *remaining_list,
+ gl_close_fn primary,
+ int fd);
+
+/* Execute all close hooks, with PRIMARY as "primary" method.
+ Return 0 or -1, like close() would do. */
+extern int execute_all_close_hooks (gl_close_fn primary, int fd);
+
+/* This type of function applies a control request to FD, applying special
+ knowledge for the FD types it knows about, and calls
+ execute_ioctl_hooks (REMAINING_LIST, PRIMARY, FD, REQUEST, ARG)
+ for the other FD types.
+ In CLOS speak, REMAINING_LIST is the remaining list of "around" methods,
+ and PRIMARY is the "primary" method for ioctl(). */
+typedef int (*ioctl_hook_fn) (const struct fd_hook *remaining_list,
+ gl_ioctl_fn primary,
+ int fd, int request, void *arg);
+
+/* Execute the ioctl hooks in REMAINING_LIST, with PRIMARY as "primary" method.
+ Return 0 or -1, like ioctl() would do. */
+extern int execute_ioctl_hooks (const struct fd_hook *remaining_list,
+ gl_ioctl_fn primary,
+ int fd, int request, void *arg);
+
+/* Execute all ioctl hooks, with PRIMARY as "primary" method.
+ Return 0 or -1, like ioctl() would do. */
+extern int execute_all_ioctl_hooks (gl_ioctl_fn primary,
+ int fd, int request, void *arg);
+
+/* Add a function pair to the list of file descriptor hooks.
+ CLOSE_HOOK and IOCTL_HOOK may be NULL, indicating no change.
+ The LINK variable points to a piece of memory which is guaranteed to be
+ accessible until the corresponding call to unregister_fd_hook. */
+extern void register_fd_hook (close_hook_fn close_hook, ioctl_hook_fn ioctl_hook,
+ struct fd_hook *link);
+
+/* Removes a hook from the list of file descriptor hooks. */
+extern void unregister_fd_hook (struct fd_hook *link);
+
+
+#endif
+
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* FD_HOOK_H */
diff --git a/gnulib-tests/fdopen.c b/gnulib-tests/fdopen.c
new file mode 100644
index 0000000..61fbfdf
--- /dev/null
+++ b/gnulib-tests/fdopen.c
@@ -0,0 +1,69 @@
+/* Open a stream with a given file descriptor.
+ Copyright (C) 2011-2016 Free Software Foundation, Inc.
+
+ This 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>
+
+/* Specification. */
+#include <stdio.h>
+
+#include <errno.h>
+
+#if HAVE_MSVC_INVALID_PARAMETER_HANDLER
+# include "msvc-inval.h"
+#endif
+
+#undef fdopen
+
+#if HAVE_MSVC_INVALID_PARAMETER_HANDLER
+static FILE *
+fdopen_nothrow (int fd, const char *mode)
+{
+ FILE *result;
+
+ TRY_MSVC_INVAL
+ {
+ result = fdopen (fd, mode);
+ }
+ CATCH_MSVC_INVAL
+ {
+ result = NULL;
+ }
+ DONE_MSVC_INVAL;
+
+ return result;
+}
+#else
+# define fdopen_nothrow fdopen
+#endif
+
+FILE *
+rpl_fdopen (int fd, const char *mode)
+{
+ int saved_errno = errno;
+ FILE *fp;
+
+ errno = 0;
+ fp = fdopen_nothrow (fd, mode);
+ if (fp == NULL)
+ {
+ if (errno == 0)
+ errno = EBADF;
+ }
+ else
+ errno = saved_errno;
+
+ return fp;
+}
diff --git a/gnulib-tests/fflush.c b/gnulib-tests/fflush.c
new file mode 100644
index 0000000..ef2a7f1
--- /dev/null
+++ b/gnulib-tests/fflush.c
@@ -0,0 +1,229 @@
+/* fflush.c -- allow flushing input streams
+ Copyright (C) 2007-2016 Free Software Foundation, Inc.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+/* Written by Eric Blake. */
+
+#include <config.h>
+
+/* Specification. */
+#include <stdio.h>
+
+#include <errno.h>
+#include <unistd.h>
+
+#include "freading.h"
+
+#include "stdio-impl.h"
+
+#include "unused-parameter.h"
+
+#undef fflush
+
+
+#if 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
+clear_ungetc_buffer_preserving_position (FILE *fp)
+{
+ if (fp->_flags & _IO_IN_BACKUP)
+ /* _IO_free_backup_area is a bit complicated. Simply call fseek. */
+ fseeko (fp, 0, SEEK_CUR);
+}
+
+#else
+
+/* Clear the stream's ungetc buffer. May modify the value of ftello (fp). */
+static void
+clear_ungetc_buffer (FILE *fp)
+{
+# if defined __sferror || defined __DragonFly__ || defined __ANDROID__
+ /* FreeBSD, NetBSD, OpenBSD, DragonFly, Mac OS X, Cygwin, Android */
+ if (HASUB (fp))
+ {
+ fp_->_p += fp_->_r;
+ fp_->_r = 0;
+ }
+# elif defined __EMX__ /* emx+gcc */
+ if (fp->_ungetc_count > 0)
+ {
+ fp->_ungetc_count = 0;
+ fp->_rcount = - fp->_rcount;
+ }
+# elif defined _IOERR /* Minix, AIX, HP-UX, IRIX, OSF/1, Solaris, OpenServer, mingw, MSVC, NonStop Kernel */
+ /* Nothing to do. */
+# else /* other implementations */
+ fseeko (fp, 0, SEEK_CUR);
+# endif
+}
+
+#endif
+
+#if ! (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, Android */
+
+static int
+disable_seek_optimization (FILE *fp)
+{
+ int saved_flags = fp_->_flags & (__SOPT | __SNPT);
+ fp_->_flags = (fp_->_flags & ~__SOPT) | __SNPT;
+ return saved_flags;
+}
+
+static void
+restore_seek_optimization (FILE *fp, int saved_flags)
+{
+ fp_->_flags = (fp_->_flags & ~(__SOPT | __SNPT)) | saved_flags;
+}
+
+# else
+
+static void
+update_fpos_cache (FILE *fp _GL_UNUSED_PARAMETER,
+ off_t pos _GL_UNUSED_PARAMETER)
+{
+# if defined __sferror || defined __DragonFly__ || defined __ANDROID__
+ /* FreeBSD, NetBSD, OpenBSD, DragonFly, Mac OS X, Cygwin, Android */
+# if defined __CYGWIN__
+ /* fp_->_offset is typed as an integer. */
+ fp_->_offset = pos;
+# else
+ /* fp_->_offset is an fpos_t. */
+ /* Use a union, since on NetBSD, the compilation flags determine
+ whether fpos_t is typedef'd to off_t or a struct containing a
+ single off_t member. */
+ union
+ {
+ fpos_t f;
+ off_t o;
+ } u;
+ u.o = pos;
+ fp_->_offset = u.f;
+# endif
+ fp_->_flags |= __SOFF;
+# endif
+}
+# endif
+#endif
+
+/* Flush all pending data on STREAM according to POSIX rules. Both
+ output and seekable input streams are supported. */
+int
+rpl_fflush (FILE *stream)
+{
+ /* When stream is NULL, POSIX and C99 only require flushing of "output
+ streams and update streams in which the most recent operation was not
+ input", and all implementations do this.
+
+ When stream is "an output stream or an update stream in which the most
+ recent operation was not input", POSIX and C99 requires that fflush
+ writes out any buffered data, and all implementations do this.
+
+ When stream is, however, an input stream or an update stream in
+ which the most recent operation was input, C99 specifies nothing,
+ and POSIX only specifies behavior if the stream is seekable.
+ mingw, in particular, drops the input buffer, leaving the file
+ descriptor positioned at the end of the input buffer. I.e. ftell
+ (stream) is lost. We don't want to call the implementation's
+ fflush in this case.
+
+ We test ! freading (stream) here, rather than fwriting (stream), because
+ what we need to know is whether the stream holds a "read buffer", and on
+ mingw this is indicated by _IOREAD, regardless of _IOWRT. */
+ if (stream == NULL || ! freading (stream))
+ return fflush (stream);
+
+#if defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */
+
+ clear_ungetc_buffer_preserving_position (stream);
+
+ return fflush (stream);
+
+#else
+ {
+ /* Notes about the file-position indicator:
+ 1) The file position indicator is incremented by fgetc() and decremented
+ by ungetc():
+ <http://www.opengroup.org/susv3/functions/fgetc.html>
+ "... the fgetc() function shall ... advance the associated file
+ position indicator for the stream ..."
+ <http://www.opengroup.org/susv3/functions/ungetc.html>
+ "The file-position indicator is decremented by each successful
+ call to ungetc()..."
+ 2) <http://www.opengroup.org/susv3/functions/ungetc.html> says:
+ "The value of the file-position indicator for the stream after
+ reading or discarding all pushed-back bytes shall be the same
+ as it was before the bytes were pushed back."
+ Here we are discarding all pushed-back bytes. But more specifically,
+ 3) <http://www.opengroup.org/austin/aardvark/latest/xshbug3.txt> says:
+ "[After fflush(),] the file offset of the underlying open file
+ description shall be set to the file position of the stream, and
+ any characters pushed back onto the stream by ungetc() ... shall
+ be discarded." */
+
+ /* POSIX does not specify fflush behavior for non-seekable input
+ streams. Some implementations purge unread data, some return
+ EBADF, some do nothing. */
+ off_t pos = ftello (stream);
+ if (pos == -1)
+ {
+ errno = EBADF;
+ return EOF;
+ }
+
+ /* Clear the ungetc buffer. */
+ clear_ungetc_buffer (stream);
+
+ /* To get here, we must be flushing a seekable input stream, so the
+ semantics of fpurge are now appropriate to clear the buffer. To
+ avoid losing data, the lseek is also necessary. */
+ {
+ int result = fpurge (stream);
+ if (result != 0)
+ return result;
+ }
+
+# if (defined __sferror || defined __DragonFly__ || defined __ANDROID__) && defined __SNPT
+ /* FreeBSD, NetBSD, OpenBSD, DragonFly, Mac OS X, Cygwin, Android */
+
+ {
+ /* Disable seek optimization for the next fseeko call. This tells the
+ following fseeko call to seek to the desired position directly, rather
+ than to seek to a block-aligned boundary. */
+ int saved_flags = disable_seek_optimization (stream);
+ int result = fseeko (stream, pos, SEEK_SET);
+
+ restore_seek_optimization (stream, saved_flags);
+ return result;
+ }
+
+# else
+
+ pos = lseek (fileno (stream), pos, SEEK_SET);
+ if (pos == -1)
+ return EOF;
+ /* After a successful lseek, update the file descriptor's position cache
+ in the stream. */
+ update_fpos_cache (stream, pos);
+
+ return 0;
+
+# endif
+ }
+#endif
+}
diff --git a/gnulib-tests/file-has-acl.c b/gnulib-tests/file-has-acl.c
new file mode 100644
index 0000000..97d14be
--- /dev/null
+++ b/gnulib-tests/file-has-acl.c
@@ -0,0 +1,503 @@
+/* Test whether a file has a nontrivial ACL. -*- coding: utf-8 -*-
+
+ Copyright (C) 2002-2003, 2005-2016 Free Software Foundation, Inc.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+ Written by Paul Eggert, Andreas Grünbacher, and Bruno Haible. */
+
+/* Without this pragma, gcc 4.7.0 20120126 may suggest that the
+ file_has_acl function might be candidate for attribute 'const' */
+#if (__GNUC__ == 4 && 6 <= __GNUC_MINOR__) || 4 < __GNUC__
+# pragma GCC diagnostic ignored "-Wsuggest-attribute=const"
+#endif
+
+#include <config.h>
+
+#include "acl.h"
+
+#include "acl-internal.h"
+
+#if GETXATTR_WITH_POSIX_ACLS
+# include <sys/xattr.h>
+# include <linux/xattr.h>
+#endif
+
+/* Return 1 if NAME has a nontrivial access control list,
+ 0 if ACLs are not supported, or if NAME has no or only a base ACL,
+ and -1 (setting errno) on error. Note callers can determine
+ if ACLs are not supported as errno is set in that case also.
+ SB must be set to the stat buffer of NAME,
+ obtained through stat() or lstat(). */
+
+int
+file_has_acl (char const *name, struct stat const *sb)
+{
+#if USE_ACL
+ if (! S_ISLNK (sb->st_mode))
+ {
+
+# if GETXATTR_WITH_POSIX_ACLS
+
+ ssize_t ret;
+
+ ret = getxattr (name, XATTR_NAME_POSIX_ACL_ACCESS, NULL, 0);
+ if (ret < 0 && errno == ENODATA)
+ ret = 0;
+ else if (ret > 0)
+ return 1;
+
+ if (ret == 0 && S_ISDIR (sb->st_mode))
+ {
+ ret = getxattr (name, XATTR_NAME_POSIX_ACL_DEFAULT, NULL, 0);
+ if (ret < 0 && errno == ENODATA)
+ ret = 0;
+ else if (ret > 0)
+ return 1;
+ }
+
+ if (ret < 0)
+ return - acl_errno_valid (errno);
+ return ret;
+
+# elif HAVE_ACL_GET_FILE
+
+ /* POSIX 1003.1e (draft 17 -- abandoned) specific version. */
+ /* Linux, FreeBSD, Mac OS X, IRIX, Tru64 */
+ int ret;
+
+ if (HAVE_ACL_EXTENDED_FILE) /* Linux */
+ {
+ /* On Linux, acl_extended_file is an optimized function: It only
+ makes two calls to getxattr(), one for ACL_TYPE_ACCESS, one for
+ ACL_TYPE_DEFAULT. */
+ ret = acl_extended_file (name);
+ }
+ else /* FreeBSD, Mac OS X, IRIX, Tru64 */
+ {
+# if HAVE_ACL_TYPE_EXTENDED /* Mac OS X */
+ /* On Mac OS X, acl_get_file (name, ACL_TYPE_ACCESS)
+ and acl_get_file (name, ACL_TYPE_DEFAULT)
+ always return NULL / EINVAL. There is no point in making
+ these two useless calls. The real ACL is retrieved through
+ acl_get_file (name, ACL_TYPE_EXTENDED). */
+ acl_t acl = acl_get_file (name, ACL_TYPE_EXTENDED);
+ if (acl)
+ {
+ ret = acl_extended_nontrivial (acl);
+ acl_free (acl);
+ }
+ else
+ ret = -1;
+# else /* FreeBSD, IRIX, Tru64 */
+ acl_t acl = acl_get_file (name, ACL_TYPE_ACCESS);
+ if (acl)
+ {
+ int saved_errno;
+
+ ret = acl_access_nontrivial (acl);
+ saved_errno = errno;
+ acl_free (acl);
+ errno = saved_errno;
+# if HAVE_ACL_FREE_TEXT /* Tru64 */
+ /* On OSF/1, acl_get_file (name, ACL_TYPE_DEFAULT) always
+ returns NULL with errno not set. There is no point in
+ making this call. */
+# else /* FreeBSD, IRIX */
+ /* On Linux, FreeBSD, IRIX, acl_get_file (name, ACL_TYPE_ACCESS)
+ and acl_get_file (name, ACL_TYPE_DEFAULT) on a directory
+ either both succeed or both fail; it depends on the
+ file system. Therefore there is no point in making the second
+ call if the first one already failed. */
+ if (ret == 0 && S_ISDIR (sb->st_mode))
+ {
+ acl = acl_get_file (name, ACL_TYPE_DEFAULT);
+ if (acl)
+ {
+ ret = (0 < acl_entries (acl));
+ acl_free (acl);
+ }
+ else
+ ret = -1;
+ }
+# endif
+ }
+ else
+ ret = -1;
+# endif
+ }
+ if (ret < 0)
+ return - acl_errno_valid (errno);
+ return ret;
+
+# elif HAVE_FACL && defined GETACL /* Solaris, Cygwin, not HP-UX */
+
+# if defined ACL_NO_TRIVIAL
+
+ /* Solaris 10 (newer version), which has additional API declared in
+ <sys/acl.h> (acl_t) and implemented in libsec (acl_set, acl_trivial,
+ acl_fromtext, ...). */
+ return acl_trivial (name);
+
+# else /* Solaris, Cygwin, general case */
+
+ /* Solaris 2.5 through Solaris 10, Cygwin, and contemporaneous versions
+ of Unixware. The acl() call returns the access and default ACL both
+ at once. */
+ {
+ /* Initially, try to read the entries into a stack-allocated buffer.
+ Use malloc if it does not fit. */
+ enum
+ {
+ alloc_init = 4000 / sizeof (aclent_t), /* >= 3 */
+ alloc_max = MIN (INT_MAX, SIZE_MAX / sizeof (aclent_t))
+ };
+ aclent_t buf[alloc_init];
+ size_t alloc = alloc_init;
+ aclent_t *entries = buf;
+ aclent_t *malloced = NULL;
+ int count;
+
+ for (;;)
+ {
+ count = acl (name, GETACL, alloc, entries);
+ if (count < 0 && errno == ENOSPC)
+ {
+ /* Increase the size of the buffer. */
+ free (malloced);
+ if (alloc > alloc_max / 2)
+ {
+ errno = ENOMEM;
+ return -1;
+ }
+ alloc = 2 * alloc; /* <= alloc_max */
+ entries = malloced =
+ (aclent_t *) malloc (alloc * sizeof (aclent_t));
+ if (entries == NULL)
+ {
+ errno = ENOMEM;
+ return -1;
+ }
+ continue;
+ }
+ break;
+ }
+ if (count < 0)
+ {
+ if (errno == ENOSYS || errno == ENOTSUP)
+ ;
+ else
+ {
+ int saved_errno = errno;
+ free (malloced);
+ errno = saved_errno;
+ return -1;
+ }
+ }
+ else if (count == 0)
+ ;
+ else
+ {
+ /* Don't use MIN_ACL_ENTRIES: It's set to 4 on Cygwin, but Cygwin
+ returns only 3 entries for files with no ACL. But this is safe:
+ If there are more than 4 entries, there cannot be only the
+ "user::", "group::", "other:", and "mask:" entries. */
+ if (count > 4)
+ {
+ free (malloced);
+ return 1;
+ }
+
+ if (acl_nontrivial (count, entries))
+ {
+ free (malloced);
+ return 1;
+ }
+ }
+ free (malloced);
+ }
+
+# ifdef ACE_GETACL
+ /* Solaris also has a different variant of ACLs, used in ZFS and NFSv4
+ file systems (whereas the other ones are used in UFS file systems). */
+ {
+ /* Initially, try to read the entries into a stack-allocated buffer.
+ Use malloc if it does not fit. */
+ enum
+ {
+ alloc_init = 4000 / sizeof (ace_t), /* >= 3 */
+ alloc_max = MIN (INT_MAX, SIZE_MAX / sizeof (ace_t))
+ };
+ ace_t buf[alloc_init];
+ size_t alloc = alloc_init;
+ ace_t *entries = buf;
+ ace_t *malloced = NULL;
+ int count;
+
+ for (;;)
+ {
+ count = acl (name, ACE_GETACL, alloc, entries);
+ if (count < 0 && errno == ENOSPC)
+ {
+ /* Increase the size of the buffer. */
+ free (malloced);
+ if (alloc > alloc_max / 2)
+ {
+ errno = ENOMEM;
+ return -1;
+ }
+ alloc = 2 * alloc; /* <= alloc_max */
+ entries = malloced = (ace_t *) malloc (alloc * sizeof (ace_t));
+ if (entries == NULL)
+ {
+ errno = ENOMEM;
+ return -1;
+ }
+ continue;
+ }
+ break;
+ }
+ if (count < 0)
+ {
+ if (errno == ENOSYS || errno == EINVAL)
+ ;
+ else
+ {
+ int saved_errno = errno;
+ free (malloced);
+ errno = saved_errno;
+ return -1;
+ }
+ }
+ else if (count == 0)
+ ;
+ else
+ {
+ /* In the old (original Solaris 10) convention:
+ If there are more than 3 entries, there cannot be only the
+ ACE_OWNER, ACE_GROUP, ACE_OTHER entries.
+ In the newer Solaris 10 and Solaris 11 convention:
+ If there are more than 6 entries, there cannot be only the
+ ACE_OWNER, ACE_GROUP, ACE_EVERYONE entries, each once with
+ NEW_ACE_ACCESS_ALLOWED_ACE_TYPE and once with
+ NEW_ACE_ACCESS_DENIED_ACE_TYPE. */
+ if (count > 6)
+ {
+ free (malloced);
+ return 1;
+ }
+
+ if (acl_ace_nontrivial (count, entries))
+ {
+ free (malloced);
+ return 1;
+ }
+ }
+ free (malloced);
+ }
+# endif
+
+ return 0;
+# endif
+
+# elif HAVE_GETACL /* HP-UX */
+
+ {
+ struct acl_entry entries[NACLENTRIES];
+ int count;
+
+ count = getacl (name, NACLENTRIES, entries);
+
+ if (count < 0)
+ {
+ /* ENOSYS is seen on newer HP-UX versions.
+ EOPNOTSUPP is typically seen on NFS mounts.
+ ENOTSUP was seen on Quantum StorNext file systems (cvfs). */
+ if (errno == ENOSYS || errno == EOPNOTSUPP || errno == ENOTSUP)
+ ;
+ else
+ return -1;
+ }
+ else if (count == 0)
+ return 0;
+ else /* count > 0 */
+ {
+ if (count > NACLENTRIES)
+ /* If NACLENTRIES cannot be trusted, use dynamic memory
+ allocation. */
+ abort ();
+
+ /* If there are more than 3 entries, there cannot be only the
+ (uid,%), (%,gid), (%,%) entries. */
+ if (count > 3)
+ return 1;
+
+ {
+ struct stat statbuf;
+
+ if (stat (name, &statbuf) < 0)
+ return -1;
+
+ return acl_nontrivial (count, entries);
+ }
+ }
+ }
+
+# if HAVE_ACLV_H /* HP-UX >= 11.11 */
+
+ {
+ struct acl entries[NACLVENTRIES];
+ int count;
+
+ count = acl ((char *) name, ACL_GET, NACLVENTRIES, entries);
+
+ if (count < 0)
+ {
+ /* EOPNOTSUPP is seen on NFS in HP-UX 11.11, 11.23.
+ EINVAL is seen on NFS in HP-UX 11.31. */
+ if (errno == ENOSYS || errno == EOPNOTSUPP || errno == EINVAL)
+ ;
+ else
+ return -1;
+ }
+ else if (count == 0)
+ return 0;
+ else /* count > 0 */
+ {
+ if (count > NACLVENTRIES)
+ /* If NACLVENTRIES cannot be trusted, use dynamic memory
+ allocation. */
+ abort ();
+
+ /* If there are more than 4 entries, there cannot be only the
+ four base ACL entries. */
+ if (count > 4)
+ return 1;
+
+ return aclv_nontrivial (count, entries);
+ }
+ }
+
+# endif
+
+# elif HAVE_ACLX_GET && defined ACL_AIX_WIP /* AIX */
+
+ acl_type_t type;
+ char aclbuf[1024];
+ void *acl = aclbuf;
+ size_t aclsize = sizeof (aclbuf);
+ mode_t mode;
+
+ for (;;)
+ {
+ /* The docs say that type being 0 is equivalent to ACL_ANY, but it
+ is not true, in AIX 5.3. */
+ type.u64 = ACL_ANY;
+ if (aclx_get (name, 0, &type, aclbuf, &aclsize, &mode) >= 0)
+ break;
+ if (errno == ENOSYS)
+ return 0;
+ if (errno != ENOSPC)
+ {
+ if (acl != aclbuf)
+ {
+ int saved_errno = errno;
+ free (acl);
+ errno = saved_errno;
+ }
+ return -1;
+ }
+ aclsize = 2 * aclsize;
+ if (acl != aclbuf)
+ free (acl);
+ acl = malloc (aclsize);
+ if (acl == NULL)
+ {
+ errno = ENOMEM;
+ return -1;
+ }
+ }
+
+ if (type.u64 == ACL_AIXC)
+ {
+ int result = acl_nontrivial ((struct acl *) acl);
+ if (acl != aclbuf)
+ free (acl);
+ return result;
+ }
+ else if (type.u64 == ACL_NFS4)
+ {
+ int result = acl_nfs4_nontrivial ((nfs4_acl_int_t *) acl);
+ if (acl != aclbuf)
+ free (acl);
+ return result;
+ }
+ else
+ {
+ /* A newer type of ACL has been introduced in the system.
+ We should better support it. */
+ if (acl != aclbuf)
+ free (acl);
+ errno = EINVAL;
+ return -1;
+ }
+
+# elif HAVE_STATACL /* older AIX */
+
+ union { struct acl a; char room[4096]; } u;
+
+ if (statacl ((char *) name, STX_NORMAL, &u.a, sizeof (u)) < 0)
+ return -1;
+
+ return acl_nontrivial (&u.a);
+
+# elif HAVE_ACLSORT /* NonStop Kernel */
+
+ {
+ struct acl entries[NACLENTRIES];
+ int count;
+
+ count = acl ((char *) name, ACL_GET, NACLENTRIES, entries);
+
+ if (count < 0)
+ {
+ if (errno == ENOSYS || errno == ENOTSUP)
+ ;
+ else
+ return -1;
+ }
+ else if (count == 0)
+ return 0;
+ else /* count > 0 */
+ {
+ if (count > NACLENTRIES)
+ /* If NACLENTRIES cannot be trusted, use dynamic memory
+ allocation. */
+ abort ();
+
+ /* If there are more than 4 entries, there cannot be only the
+ four base ACL entries. */
+ if (count > 4)
+ return 1;
+
+ return acl_nontrivial (count, entries);
+ }
+ }
+
+# endif
+ }
+#endif
+
+ return 0;
+}
diff --git a/gnulib-tests/filename.h b/gnulib-tests/filename.h
new file mode 100644
index 0000000..7d2c31a
--- /dev/null
+++ b/gnulib-tests/filename.h
@@ -0,0 +1,54 @@
+/* Basic filename support macros.
+ Copyright (C) 2001-2004, 2007-2016 Free Software Foundation, Inc.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+#ifndef _FILENAME_H
+#define _FILENAME_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+
+/* Pathname support.
+ ISSLASH(C) tests whether C is a directory separator character.
+ IS_ABSOLUTE_PATH(P) tests whether P is an absolute path. If it is not,
+ it may be concatenated to a directory pathname.
+ IS_PATH_WITH_DIR(P) tests whether P contains a directory specification.
+ */
+#if defined _WIN32 || defined __WIN32__ || defined __CYGWIN__ || defined __EMX__ || defined __DJGPP__
+ /* Native Windows, Cygwin, OS/2, DOS */
+# define ISSLASH(C) ((C) == '/' || (C) == '\\')
+# define HAS_DEVICE(P) \
+ ((((P)[0] >= 'A' && (P)[0] <= 'Z') || ((P)[0] >= 'a' && (P)[0] <= 'z')) \
+ && (P)[1] == ':')
+# define IS_ABSOLUTE_PATH(P) (ISSLASH ((P)[0]) || HAS_DEVICE (P))
+# define IS_PATH_WITH_DIR(P) \
+ (strchr (P, '/') != NULL || strchr (P, '\\') != NULL || HAS_DEVICE (P))
+# define FILE_SYSTEM_PREFIX_LEN(P) (HAS_DEVICE (P) ? 2 : 0)
+#else
+ /* Unix */
+# define ISSLASH(C) ((C) == '/')
+# define IS_ABSOLUTE_PATH(P) ISSLASH ((P)[0])
+# define IS_PATH_WITH_DIR(P) (strchr (P, '/') != NULL)
+# define FILE_SYSTEM_PREFIX_LEN(P) 0
+#endif
+
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* _FILENAME_H */
diff --git a/gnulib-tests/flexmember.h b/gnulib-tests/flexmember.h
new file mode 100644
index 0000000..62c556b
--- /dev/null
+++ b/gnulib-tests/flexmember.h
@@ -0,0 +1,42 @@
+/* Sizes of structs with flexible array members.
+
+ Copyright 2016 Free Software Foundation, Inc.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+ Written by Paul Eggert. */
+
+#include <stddef.h>
+
+/* Nonzero multiple of alignment of TYPE, suitable for FLEXSIZEOF below.
+ On older platforms without _Alignof, use a pessimistic bound that is
+ safe in practice even if FLEXIBLE_ARRAY_MEMBER is 1.
+ On newer platforms, use _Alignof to get a tighter bound. */
+
+#if !defined __STDC_VERSION__ || __STDC_VERSION__ < 201112
+# define FLEXALIGNOF(type) (sizeof (type) & ~ (sizeof (type) - 1))
+#else
+# define FLEXALIGNOF(type) _Alignof (type)
+#endif
+
+/* Upper bound on the size of a struct of type TYPE with a flexible
+ array member named MEMBER that is followed by N bytes of other data.
+ This is not simply sizeof (TYPE) + N, since it may require
+ alignment on unusually picky C11 platforms, and
+ FLEXIBLE_ARRAY_MEMBER may be 1 on pre-C11 platforms.
+ Yield a value less than N if and only if arithmetic overflow occurs. */
+
+#define FLEXSIZEOF(type, member, n) \
+ ((offsetof (type, member) + FLEXALIGNOF (type) - 1 + (n)) \
+ & ~ (FLEXALIGNOF (type) - 1))
diff --git a/gnulib-tests/fpurge.c b/gnulib-tests/fpurge.c
new file mode 100644
index 0000000..53ee68c
--- /dev/null
+++ b/gnulib-tests/fpurge.c
@@ -0,0 +1,147 @@
+/* Flushing buffers of a FILE stream.
+ Copyright (C) 2007-2016 Free Software Foundation, Inc.
+
+ This 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>
+
+/* Specification. */
+#include <stdio.h>
+
+#if HAVE___FPURGE /* glibc >= 2.2, Haiku, Solaris >= 7 */
+# include <stdio_ext.h>
+#endif
+#include <stdlib.h>
+
+#include "stdio-impl.h"
+
+int
+fpurge (FILE *fp)
+{
+#if HAVE___FPURGE /* glibc >= 2.2, Haiku, Solaris >= 7, musl libc */
+
+ __fpurge (fp);
+ /* The __fpurge function does not have a return value. */
+ return 0;
+
+#elif HAVE_FPURGE /* FreeBSD, NetBSD, OpenBSD, DragonFly, Mac OS X, Cygwin 1.7 */
+
+ /* Call the system's fpurge function. */
+# undef fpurge
+# if !HAVE_DECL_FPURGE
+ extern int fpurge (FILE *);
+# endif
+ int result = fpurge (fp);
+# if defined __sferror || defined __DragonFly__ || defined __ANDROID__
+ /* FreeBSD, NetBSD, OpenBSD, DragonFly, Mac OS X, Cygwin, Android */
+ if (result == 0)
+ /* Correct the invariants that fpurge broke.
+ <stdio.h> on BSD systems says:
+ "The following always hold: if _flags & __SRD, _w is 0."
+ If this invariant is not fulfilled and the stream is read-write but
+ currently reading, subsequent putc or fputc calls will write directly
+ into the buffer, although they shouldn't be allowed to. */
+ if ((fp_->_flags & __SRD) != 0)
+ fp_->_w = 0;
+# endif
+ return result;
+
+#else
+
+ /* 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 */
+ 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. */
+ if (fp->_IO_save_base != NULL)
+ {
+ free (fp->_IO_save_base);
+ fp->_IO_save_base = NULL;
+ }
+ return 0;
+# elif defined __sferror || defined __DragonFly__ || defined __ANDROID__
+ /* FreeBSD, NetBSD, OpenBSD, DragonFly, Mac OS X, Cygwin, Android */
+ fp_->_p = fp_->_bf._base;
+ fp_->_r = 0;
+ fp_->_w = ((fp_->_flags & (__SLBF | __SNBF | __SRD)) == 0 /* fully buffered and not currently reading? */
+ ? fp_->_bf._size
+ : 0);
+ /* Avoid memory leak when there is an active ungetc buffer. */
+ if (fp_ub._base != NULL)
+ {
+ if (fp_ub._base != fp_->_ubuf)
+ free (fp_ub._base);
+ fp_ub._base = NULL;
+ }
+ return 0;
+# elif defined __EMX__ /* emx+gcc */
+ fp->_ptr = fp->_buffer;
+ fp->_rcount = 0;
+ fp->_wcount = 0;
+ fp->_ungetc_count = 0;
+ return 0;
+# elif defined __minix /* Minix */
+ fp->_ptr = fp->_buf;
+ if (fp->_ptr != NULL)
+ fp->_count = 0;
+ return 0;
+# elif defined _IOERR /* AIX, HP-UX, IRIX, OSF/1, Solaris, OpenServer, mingw, MSVC, NonStop Kernel */
+ fp_->_ptr = fp_->_base;
+ if (fp_->_ptr != NULL)
+ fp_->_cnt = 0;
+ return 0;
+# elif defined __UCLIBC__ /* uClibc */
+# ifdef __STDIO_BUFFERS
+ if (fp->__modeflags & __FLAG_WRITING)
+ fp->__bufpos = fp->__bufstart;
+ else if (fp->__modeflags & (__FLAG_READONLY | __FLAG_READING))
+ fp->__bufpos = fp->__bufread;
+# endif
+ return 0;
+# elif defined __QNX__ /* QNX */
+ fp->_Rback = fp->_Back + sizeof (fp->_Back);
+ fp->_Rsave = NULL;
+ if (fp->_Mode & 0x2000 /* _MWRITE */)
+ /* fp->_Buf <= fp->_Next <= fp->_Wend */
+ fp->_Next = fp->_Buf;
+ else
+ /* fp->_Buf <= fp->_Next <= fp->_Rend */
+ fp->_Rend = fp->_Next;
+ return 0;
+# elif defined __MINT__ /* Atari FreeMiNT */
+ if (fp->__pushed_back)
+ {
+ fp->__bufp = fp->__pushback_bufp;
+ fp->__pushed_back = 0;
+ }
+ /* Preserve the current file position. */
+ if (fp->__target != -1)
+ fp->__target += fp->__bufp - fp->__buffer;
+ fp->__bufp = fp->__buffer;
+ /* Nothing in the buffer, next getc is nontrivial. */
+ fp->__get_limit = fp->__bufp;
+ /* Nothing in the buffer, next putc is nontrivial. */
+ fp->__put_limit = fp->__buffer;
+ return 0;
+# elif defined EPLAN9 /* Plan9 */
+ fp->rp = fp->wp = fp->lp = fp->buf;
+ return 0;
+# else
+# error "Please port gnulib fpurge.c to your platform! Look at the definitions of fflush, setvbuf and ungetc on your system, then report this to bug-gnulib."
+# endif
+
+#endif
+}
diff --git a/gnulib-tests/freading.c b/gnulib-tests/freading.c
new file mode 100644
index 0000000..05cb0b8
--- /dev/null
+++ b/gnulib-tests/freading.c
@@ -0,0 +1,75 @@
+/* Retrieve information about a FILE stream.
+ Copyright (C) 2007-2016 Free Software Foundation, Inc.
+
+ This 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>
+
+/* Specification. */
+#include "freading.h"
+
+#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> */
+#if !(HAVE___FREADING && (!defined __GLIBC__ || defined __UCLIBC__ || __GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 7)))
+
+bool
+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 */
+ return ((fp->_flags & _IO_NO_WRITES) != 0
+ || ((fp->_flags & (_IO_NO_READS | _IO_CURRENTLY_PUTTING)) == 0
+ && fp->_IO_read_base != NULL));
+# elif defined __sferror || defined __DragonFly__ || defined __ANDROID__
+ /* FreeBSD, NetBSD, OpenBSD, DragonFly, Mac OS X, Cygwin, Android */
+ return (fp_->_flags & __SRD) != 0;
+# elif defined __EMX__ /* emx+gcc */
+ 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 */
+# if defined __sun /* Solaris */
+ return (fp_->_flag & _IOREAD) != 0 && (fp_->_flag & _IOWRT) == 0;
+# else
+ return (fp_->_flag & _IOREAD) != 0;
+# endif
+# elif defined __UCLIBC__ /* uClibc */
+ return (fp->__modeflags & (__FLAG_READONLY | __FLAG_READING)) != 0;
+# elif defined __QNX__ /* QNX */
+ return ((fp->_Mode & 0x2 /* _MOPENW */) == 0
+ || (fp->_Mode & 0x1000 /* _MREAD */) != 0);
+# elif defined __MINT__ /* Atari FreeMiNT */
+ if (!fp->__mode.__write)
+ return 1;
+ if (!fp->__mode.__read)
+ return 0;
+# ifdef _IO_CURRENTLY_GETTING /* Flag added on 2009-02-28 */
+ return (fp->__flags & _IO_CURRENTLY_GETTING) != 0;
+# else
+ return (fp->__buffer < fp->__get_limit /*|| fp->__bufp == fp->__put_limit ??*/);
+# endif
+# elif defined EPLAN9 /* Plan9 */
+ if (fp->state == 0 /* CLOSED */ || fp->state == 4 /* WR */)
+ return 0;
+ return (fp->state == 3 /* RD */ && (fp->bufl == 0 || fp->rp < fp->wp));
+# else
+# error "Please port gnulib freading.c to your platform!"
+# endif
+}
+
+#endif
diff --git a/gnulib-tests/freading.h b/gnulib-tests/freading.h
new file mode 100644
index 0000000..949efd5
--- /dev/null
+++ b/gnulib-tests/freading.h
@@ -0,0 +1,53 @@
+/* Retrieve information about a FILE stream.
+ Copyright (C) 2007-2016 Free Software Foundation, Inc.
+
+ This 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 <stdbool.h>
+#include <stdio.h>
+
+/* Return true if the stream STREAM is opened read-only, or if the
+ last operation on the stream was a read operation. Return false if
+ the stream is opened write-only or append-only, or if it supports
+ writing and there is no current read operation (such as fgetc).
+
+ freading and fwriting will never both be true. If STREAM supports
+ both reads and writes, then:
+ - both freading and fwriting might be false when the stream is first
+ opened, after read encounters EOF, or after fflush,
+ - freading might be false or true and fwriting might be false
+ after repositioning (such as fseek, fsetpos, or rewind),
+ depending on the underlying implementation.
+
+ STREAM must not be wide-character oriented. */
+
+#if HAVE___FREADING && (!defined __GLIBC__ || defined __UCLIBC__ || __GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 7))
+/* Solaris >= 7, not glibc >= 2.2, but glibc >= 2.7, or musl libc */
+
+# include <stdio_ext.h>
+# define freading(stream) (__freading (stream) != 0)
+
+#else
+
+# ifdef __cplusplus
+extern "C" {
+# endif
+
+extern bool freading (FILE *stream) _GL_ATTRIBUTE_PURE;
+
+# ifdef __cplusplus
+}
+# endif
+
+#endif
diff --git a/gnulib-tests/fseek.c b/gnulib-tests/fseek.c
new file mode 100644
index 0000000..8524a42
--- /dev/null
+++ b/gnulib-tests/fseek.c
@@ -0,0 +1,30 @@
+/* An fseek() function that, together with fflush(), is POSIX compliant.
+ Copyright (C) 2007, 2009-2016 Free Software Foundation, Inc.
+
+ This 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>
+
+/* Specification. */
+#include <stdio.h>
+
+/* Get off_t. */
+#include <unistd.h>
+
+int
+fseek (FILE *fp, long offset, int whence)
+{
+ /* Use the replacement fseeko function with all its workarounds. */
+ return fseeko (fp, (off_t)offset, whence);
+}
diff --git a/gnulib-tests/fseeko.c b/gnulib-tests/fseeko.c
new file mode 100644
index 0000000..0c01c4f
--- /dev/null
+++ b/gnulib-tests/fseeko.c
@@ -0,0 +1,162 @@
+/* An fseeko() function that, together with fflush(), is POSIX compliant.
+ Copyright (C) 2007-2016 Free Software Foundation, Inc.
+
+ This 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 <http://www.gnu.org/licenses/>. */
+
+#include <config.h>
+
+/* Specification. */
+#include <stdio.h>
+
+/* Get off_t, lseek, _POSIX_VERSION. */
+#include <unistd.h>
+
+#include "stdio-impl.h"
+
+int
+fseeko (FILE *fp, off_t offset, int whence)
+#undef fseeko
+#if !HAVE_FSEEKO
+# undef fseek
+# define fseeko fseek
+#endif
+#if _GL_WINDOWS_64_BIT_OFF_T
+# undef fseeko
+# if HAVE__FSEEKI64 /* msvc, mingw64 */
+# define fseeko _fseeki64
+# else /* mingw */
+# define fseeko fseeko64
+# endif
+#endif
+{
+#if LSEEK_PIPE_BROKEN
+ /* mingw gives bogus answers rather than failure on non-seekable files. */
+ if (lseek (fileno (fp), 0, SEEK_CUR) == -1)
+ return EOF;
+#endif
+
+ /* These tests are based on fpurge.c. */
+#if 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)
+#elif defined __sferror || defined __DragonFly__ || defined __ANDROID__
+ /* FreeBSD, NetBSD, OpenBSD, DragonFly, Mac OS X, Cygwin, Android */
+# if defined __SL64 && defined __SCLE /* Cygwin */
+ if ((fp->_flags & __SL64) == 0)
+ {
+ /* Cygwin 1.5.0 through 1.5.24 failed to open stdin in 64-bit
+ mode; but has an fseeko that requires 64-bit mode. */
+ FILE *tmp = fopen ("/dev/null", "r");
+ if (!tmp)
+ return -1;
+ fp->_flags |= __SL64;
+ fp->_seek64 = tmp->_seek64;
+ fclose (tmp);
+ }
+# endif
+ if (fp_->_p == fp_->_bf._base
+ && fp_->_r == 0
+ && fp_->_w == ((fp_->_flags & (__SLBF | __SNBF | __SRD)) == 0 /* fully buffered and not currently reading? */
+ ? fp_->_bf._size
+ : 0)
+ && fp_ub._base == NULL)
+#elif defined __EMX__ /* emx+gcc */
+ if (fp->_ptr == fp->_buffer
+ && fp->_rcount == 0
+ && fp->_wcount == 0
+ && fp->_ungetc_count == 0)
+#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 */
+ if (fp_->_ptr == fp_->_base
+ && (fp_->_ptr == NULL || fp_->_cnt == 0))
+#elif defined __UCLIBC__ /* uClibc */
+ if (((fp->__modeflags & __FLAG_WRITING) == 0
+ || fp->__bufpos == fp->__bufstart)
+ && ((fp->__modeflags & (__FLAG_READONLY | __FLAG_READING)) == 0
+ || fp->__bufpos == fp->__bufread))
+#elif defined __QNX__ /* QNX */
+ if ((fp->_Mode & 0x2000 /* _MWRITE */ ? fp->_Next == fp->_Buf : fp->_Next == fp->_Rend)
+ && fp->_Rback == fp->_Back + sizeof (fp->_Back)
+ && fp->_Rsave == NULL)
+#elif defined __MINT__ /* Atari FreeMiNT */
+ if (fp->__bufp == fp->__buffer
+ && fp->__get_limit == fp->__bufp
+ && fp->__put_limit == fp->__bufp
+ && !fp->__pushed_back)
+#elif defined EPLAN9 /* Plan9 */
+ if (fp->rp == fp->buf
+ && fp->wp == fp->buf)
+#elif FUNC_FFLUSH_STDIN < 0 && 200809 <= _POSIX_VERSION
+ /* Cross-compiling to some other system advertising conformance to
+ POSIX.1-2008 or later. Assume fseeko and fflush work as advertised.
+ If this assumption is incorrect, please report the bug to
+ bug-gnulib. */
+ if (0)
+#else
+ #error "Please port gnulib fseeko.c to your platform! Look at the code in fseeko.c, then report this to bug-gnulib."
+#endif
+ {
+ /* We get here when an fflush() call immediately preceded this one (or
+ if ftell() has created buffers but no I/O has occurred on a
+ newly-opened stream). We know there are no buffers. */
+ off_t pos = lseek (fileno (fp), offset, whence);
+ if (pos == -1)
+ {
+#if defined __sferror || defined __DragonFly__ || defined __ANDROID__
+ /* FreeBSD, NetBSD, OpenBSD, DragonFly, Mac OS X, Cygwin, Android */
+ fp_->_flags &= ~__SOFF;
+#endif
+ return -1;
+ }
+
+#if 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__
+ /* FreeBSD, NetBSD, OpenBSD, DragonFly, Mac OS X, Cygwin, Android */
+# if defined __CYGWIN__ || (defined __NetBSD__ && __NetBSD_Version__ >= 600000000)
+ /* fp_->_offset is typed as an integer. */
+ fp_->_offset = pos;
+# else
+ /* fp_->_offset is an fpos_t. */
+ {
+ /* Use a union, since on NetBSD, the compilation flags
+ determine whether fpos_t is typedef'd to off_t or a struct
+ containing a single off_t member. */
+ union
+ {
+ fpos_t f;
+ off_t o;
+ } u;
+ u.o = pos;
+ fp_->_offset = u.f;
+ }
+# endif
+ fp_->_flags |= __SOFF;
+ 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 */
+ fp_->_flag &= ~_IOEOF;
+#elif defined __MINT__ /* Atari FreeMiNT */
+ fp->__offset = pos;
+ fp->__eof = 0;
+#endif
+ return 0;
+ }
+ return fseeko (fp, offset, whence);
+}
diff --git a/gnulib-tests/ftell.c b/gnulib-tests/ftell.c
new file mode 100644
index 0000000..75ed1b2
--- /dev/null
+++ b/gnulib-tests/ftell.c
@@ -0,0 +1,37 @@
+/* An ftell() function that works around platform bugs.
+ Copyright (C) 2007-2016 Free Software Foundation, Inc.
+
+ This 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>
+
+/* Specification. */
+#include <stdio.h>
+
+#include <errno.h>
+#include <limits.h>
+
+long
+ftell (FILE *fp)
+{
+ /* Use the replacement ftello function with all its workarounds. */
+ off_t offset = ftello (fp);
+ if (LONG_MIN <= offset && offset <= LONG_MAX)
+ return /* (long) */ offset;
+ else
+ {
+ errno = EOVERFLOW;
+ return -1;
+ }
+}
diff --git a/gnulib-tests/ftello.c b/gnulib-tests/ftello.c
new file mode 100644
index 0000000..4c18ed1
--- /dev/null
+++ b/gnulib-tests/ftello.c
@@ -0,0 +1,85 @@
+/* An ftello() function that works around platform bugs.
+ Copyright (C) 2007, 2009-2016 Free Software Foundation, Inc.
+
+ This 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>
+
+/* Specification. */
+#include <stdio.h>
+
+/* Get lseek. */
+#include <unistd.h>
+
+#include "stdio-impl.h"
+
+off_t
+ftello (FILE *fp)
+#undef ftello
+#if !HAVE_FTELLO
+# undef ftell
+# define ftello ftell
+#endif
+#if _GL_WINDOWS_64_BIT_OFF_T
+# undef ftello
+# if HAVE__FTELLI64 /* msvc, mingw64 */
+# define ftello _ftelli64
+# else /* mingw */
+# define ftello ftello64
+# endif
+#endif
+{
+#if LSEEK_PIPE_BROKEN
+ /* mingw gives bogus answers rather than failure on non-seekable files. */
+ if (lseek (fileno (fp), 0, SEEK_CUR) == -1)
+ return -1;
+#endif
+
+#if FTELLO_BROKEN_AFTER_SWITCHING_FROM_READ_TO_WRITE /* Solaris */
+ /* The Solaris stdio leaves the _IOREAD flag set after reading from a file
+ reaches EOF and the program then starts writing to the file. ftello
+ gets confused by this. */
+ if (fp_->_flag & _IOWRT)
+ {
+ off_t pos;
+
+ /* Call ftello nevertheless, for the side effects that it does on fp. */
+ ftello (fp);
+
+ /* Compute the file position ourselves. */
+ pos = lseek (fileno (fp), (off_t) 0, SEEK_CUR);
+ if (pos >= 0)
+ {
+ if ((fp_->_flag & _IONBF) == 0 && fp_->_base != NULL)
+ pos += fp_->_ptr - fp_->_base;
+ }
+ return pos;
+ }
+#endif
+
+#if defined __SL64 && defined __SCLE /* Cygwin */
+ if ((fp->_flags & __SL64) == 0)
+ {
+ /* Cygwin 1.5.0 through 1.5.24 failed to open stdin in 64-bit
+ mode; but has an ftello that requires 64-bit mode. */
+ FILE *tmp = fopen ("/dev/null", "r");
+ if (!tmp)
+ return -1;
+ fp->_flags |= __SL64;
+ fp->_seek64 = tmp->_seek64;
+ fclose (tmp);
+ }
+#endif
+ return ftello (fp);
+}
diff --git a/gnulib-tests/getcwd-lgpl.c b/gnulib-tests/getcwd-lgpl.c
new file mode 100644
index 0000000..c553f7b
--- /dev/null
+++ b/gnulib-tests/getcwd-lgpl.c
@@ -0,0 +1,126 @@
+/* Copyright (C) 2011-2016 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 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>
+
+/* Specification */
+#include <unistd.h>
+
+#include <errno.h>
+#include <stdlib.h>
+#include <string.h>
+
+#if GNULIB_GETCWD
+/* Favor GPL getcwd.c if both getcwd and getcwd-lgpl modules are in use. */
+typedef int dummy;
+#else
+
+/* Get the name of the current working directory, and put it in SIZE
+ bytes of BUF. Returns NULL if the directory couldn't be determined
+ (perhaps because the absolute name was longer than PATH_MAX, or
+ because of missing read/search permissions on parent directories)
+ or SIZE was too small. If successful, returns BUF. If BUF is
+ NULL, an array is allocated with 'malloc'; the array is SIZE bytes
+ long, unless SIZE == 0, in which case it is as big as
+ necessary. */
+
+# undef getcwd
+char *
+rpl_getcwd (char *buf, size_t size)
+{
+ char *ptr;
+ char *result;
+
+ /* Handle single size operations. */
+ if (buf)
+ {
+ if (!size)
+ {
+ errno = EINVAL;
+ return NULL;
+ }
+ return getcwd (buf, size);
+ }
+
+ if (size)
+ {
+ buf = malloc (size);
+ if (!buf)
+ {
+ errno = ENOMEM;
+ return NULL;
+ }
+ result = getcwd (buf, size);
+ if (!result)
+ {
+ int saved_errno = errno;
+ free (buf);
+ errno = saved_errno;
+ }
+ return result;
+ }
+
+ /* Flexible sizing requested. Avoid over-allocation for the common
+ case of a name that fits within a 4k page, minus some space for
+ local variables, to be sure we don't skip over a guard page. */
+ {
+ char tmp[4032];
+ size = sizeof tmp;
+ ptr = getcwd (tmp, size);
+ if (ptr)
+ {
+ result = strdup (ptr);
+ if (!result)
+ errno = ENOMEM;
+ return result;
+ }
+ if (errno != ERANGE)
+ return NULL;
+ }
+
+ /* My what a large directory name we have. */
+ do
+ {
+ size <<= 1;
+ ptr = realloc (buf, size);
+ if (ptr == NULL)
+ {
+ free (buf);
+ errno = ENOMEM;
+ return NULL;
+ }
+ buf = ptr;
+ result = getcwd (buf, size);
+ }
+ while (!result && errno == ERANGE);
+
+ if (!result)
+ {
+ int saved_errno = errno;
+ free (buf);
+ errno = saved_errno;
+ }
+ else
+ {
+ /* Trim to fit, if possible. */
+ result = realloc (buf, strlen (buf) + 1);
+ if (!result)
+ result = buf;
+ }
+ return result;
+}
+
+#endif
diff --git a/gnulib-tests/getdtablesize.c b/gnulib-tests/getdtablesize.c
new file mode 100644
index 0000000..d234055
--- /dev/null
+++ b/gnulib-tests/getdtablesize.c
@@ -0,0 +1,121 @@
+/* getdtablesize() function for platforms that don't have it.
+ Copyright (C) 2008-2016 Free Software Foundation, Inc.
+ Written by Bruno Haible <bruno@clisp.org>, 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 <http://www.gnu.org/licenses/>. */
+
+#include <config.h>
+
+/* Specification. */
+#include <unistd.h>
+
+#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
+
+# include <stdio.h>
+
+# include "msvc-inval.h"
+
+# if HAVE_MSVC_INVALID_PARAMETER_HANDLER
+static int
+_setmaxstdio_nothrow (int newmax)
+{
+ int result;
+
+ TRY_MSVC_INVAL
+ {
+ result = _setmaxstdio (newmax);
+ }
+ CATCH_MSVC_INVAL
+ {
+ result = -1;
+ }
+ DONE_MSVC_INVAL;
+
+ return result;
+}
+# define _setmaxstdio _setmaxstdio_nothrow
+# endif
+
+/* Cache for the previous getdtablesize () result. Safe to cache because
+ Windows also lacks setrlimit. */
+static int dtablesize;
+
+int
+getdtablesize (void)
+{
+ if (dtablesize == 0)
+ {
+ /* We are looking for the number N such that the valid file descriptors
+ are 0..N-1. It can be obtained through a loop as follows:
+ {
+ int fd;
+ for (fd = 3; fd < 65536; fd++)
+ if (dup2 (0, fd) == -1)
+ break;
+ return fd;
+ }
+ On Windows XP, the result is 2048.
+ The drawback of this loop is that it allocates memory for a libc
+ internal array that is never freed.
+
+ The number N can also be obtained as the upper bound for
+ _getmaxstdio (). _getmaxstdio () returns the maximum number of open
+ FILE objects. The sanity check in _setmaxstdio reveals the maximum
+ number of file descriptors. This too allocates memory, but it is
+ 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)
+ ;
+ _setmaxstdio (orig_max_stdio);
+ dtablesize = bound;
+ }
+ return dtablesize;
+}
+
+#else
+
+# include <limits.h>
+# include <sys/resource.h>
+
+# ifndef RLIM_SAVED_CUR
+# define RLIM_SAVED_CUR RLIM_INFINITY
+# endif
+# ifndef RLIM_SAVED_MAX
+# define RLIM_SAVED_MAX RLIM_INFINITY
+# endif
+
+# ifdef __CYGWIN__
+ /* Cygwin 1.7.25 auto-increases the RLIMIT_NOFILE soft limit until it
+ hits the compile-time constant hard limit of 3200. We might as
+ well just report the hard limit. */
+# define rlim_cur rlim_max
+# endif
+
+int
+getdtablesize (void)
+{
+ struct rlimit lim;
+
+ if (getrlimit (RLIMIT_NOFILE, &lim) == 0
+ && 0 <= lim.rlim_cur && lim.rlim_cur <= INT_MAX
+ && lim.rlim_cur != RLIM_INFINITY
+ && lim.rlim_cur != RLIM_SAVED_CUR
+ && lim.rlim_cur != RLIM_SAVED_MAX)
+ return lim.rlim_cur;
+
+ return INT_MAX;
+}
+
+#endif
diff --git a/gnulib-tests/getpagesize.c b/gnulib-tests/getpagesize.c
new file mode 100644
index 0000000..dc4a200
--- /dev/null
+++ b/gnulib-tests/getpagesize.c
@@ -0,0 +1,39 @@
+/* getpagesize emulation for systems where it cannot be done in a C macro.
+
+ Copyright (C) 2007, 2009-2016 Free Software Foundation, Inc.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+/* Written by Bruno Haible and Martin Lambers. */
+
+#include <config.h>
+
+/* Specification. */
+#include <unistd.h>
+
+/* This implementation is only for native Windows systems. */
+#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
+
+# define WIN32_LEAN_AND_MEAN
+# include <windows.h>
+
+int
+getpagesize (void)
+{
+ SYSTEM_INFO system_info;
+ GetSystemInfo (&system_info);
+ return system_info.dwPageSize;
+}
+
+#endif
diff --git a/gnulib-tests/gnulib.mk b/gnulib-tests/gnulib.mk
new file mode 100644
index 0000000..3a08a81
--- /dev/null
+++ b/gnulib-tests/gnulib.mk
@@ -0,0 +1,1390 @@
+## DO NOT EDIT! GENERATED AUTOMATICALLY!
+## Process this file with automake to produce Makefile.in.
+# Copyright (C) 2002-2016 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
+# 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 this file. If not, see <http://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
+# contains a configuration script generated by Autoconf, under
+# the same distribution terms as the rest of that program.
+#
+# Generated by gnulib-tool.
+
+AUTOMAKE_OPTIONS = 1.9.6 foreign
+
+SUBDIRS = .
+TESTS =
+XFAIL_TESTS =
+TESTS_ENVIRONMENT =
+noinst_PROGRAMS =
+check_PROGRAMS =
+noinst_HEADERS =
+noinst_LIBRARIES =
+check_LIBRARIES = libtests.a
+EXTRA_DIST =
+BUILT_SOURCES =
+SUFFIXES =
+MOSTLYCLEANFILES = core *.stackdump
+MOSTLYCLEANDIRS =
+CLEANFILES =
+DISTCLEANFILES =
+MAINTAINERCLEANFILES =
+
+AM_CPPFLAGS = \
+ -D@gltests_WITNESS@=1 \
+ -I. -I$(srcdir) \
+ -I.. -I$(srcdir)/.. \
+ -I../lib -I$(srcdir)/../lib
+
+LDADD = libtests.a ../lib/libsed.a libtests.a $(LIBTESTS_LIBDEPS)
+
+libtests_a_SOURCES =
+libtests_a_LIBADD = $(gltests_LIBOBJS)
+libtests_a_DEPENDENCIES = $(gltests_LIBOBJS)
+EXTRA_libtests_a_SOURCES =
+AM_LIBTOOLFLAGS = --preserve-dup-deps
+
+TESTS_ENVIRONMENT += EXEEXT='@EXEEXT@' srcdir='$(srcdir)'
+
+## begin gnulib module acl-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
+TESTS_ENVIRONMENT += USE_ACL=$(USE_ACL)
+check_PROGRAMS += test-set-mode-acl test-copy-acl test-sameacls
+test_set_mode_acl_LDADD = $(LDADD) $(LIB_ACL) @LIBINTL@
+test_copy_acl_LDADD = $(LDADD) $(LIB_ACL) @LIBINTL@
+test_sameacls_LDADD = $(LDADD) $(LIB_ACL) @LIBINTL@
+EXTRA_DIST += 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
+
+## end gnulib module acl-tests
+
+## begin gnulib module alignof-tests
+
+TESTS += test-alignof
+check_PROGRAMS += test-alignof
+
+EXTRA_DIST += test-alignof.c
+
+## end gnulib module alignof-tests
+
+## begin gnulib module alloca-opt-tests
+
+TESTS += test-alloca-opt
+check_PROGRAMS += test-alloca-opt
+
+EXTRA_DIST += test-alloca-opt.c
+
+## end gnulib module alloca-opt-tests
+
+## begin gnulib module binary-io
+
+libtests_a_SOURCES += binary-io.h binary-io.c
+
+## end gnulib module binary-io
+
+## begin gnulib module binary-io-tests
+
+TESTS += test-binary-io.sh
+check_PROGRAMS += test-binary-io
+
+EXTRA_DIST += test-binary-io.sh test-binary-io.c macros.h
+
+## end gnulib module binary-io-tests
+
+## begin gnulib module btowc-tests
+
+TESTS += test-btowc1.sh test-btowc2.sh
+TESTS_ENVIRONMENT += LOCALE_FR='@LOCALE_FR@' LOCALE_FR_UTF8='@LOCALE_FR_UTF8@'
+check_PROGRAMS += test-btowc
+
+EXTRA_DIST += test-btowc1.sh test-btowc2.sh test-btowc.c signature.h macros.h
+
+## end gnulib module btowc-tests
+
+## begin gnulib module c-ctype-tests
+
+TESTS += test-c-ctype
+check_PROGRAMS += test-c-ctype
+EXTRA_DIST += test-c-ctype.c macros.h
+
+## end gnulib module c-ctype-tests
+
+## begin gnulib module c-strcase-tests
+
+TESTS += test-c-strcase.sh
+TESTS_ENVIRONMENT += LOCALE_FR='@LOCALE_FR@' LOCALE_TR_UTF8='@LOCALE_TR_UTF8@'
+check_PROGRAMS += test-c-strcasecmp test-c-strncasecmp
+EXTRA_DIST += test-c-strcase.sh test-c-strcasecmp.c test-c-strncasecmp.c macros.h
+
+## end gnulib module c-strcase-tests
+
+## begin gnulib module canonicalize-lgpl-tests
+
+TESTS += test-canonicalize-lgpl
+check_PROGRAMS += test-canonicalize-lgpl
+EXTRA_DIST += test-canonicalize-lgpl.c signature.h macros.h
+
+## end gnulib module canonicalize-lgpl-tests
+
+## begin gnulib module chdir-tests
+
+TESTS += test-chdir
+check_PROGRAMS += test-chdir
+EXTRA_DIST += test-chdir.c signature.h macros.h
+
+## end gnulib module chdir-tests
+
+## begin gnulib module close
+
+
+EXTRA_DIST += close.c
+
+EXTRA_libtests_a_SOURCES += close.c
+
+## end gnulib module close
+
+## begin gnulib module close-tests
+
+TESTS += test-close
+check_PROGRAMS += test-close
+EXTRA_DIST += test-close.c signature.h macros.h
+
+## end gnulib module close-tests
+
+## begin gnulib module closedir
+
+
+EXTRA_DIST += closedir.c dirent-private.h
+
+EXTRA_libtests_a_SOURCES += closedir.c
+
+## end gnulib module closedir
+
+## begin gnulib module ctype-tests
+
+TESTS += test-ctype
+check_PROGRAMS += test-ctype
+EXTRA_DIST += test-ctype.c
+
+## end gnulib module ctype-tests
+
+## begin gnulib module dfa-tests
+
+TESTS += \
+ dfa-invalid-char-class.sh \
+ dfa-match.sh
+
+check_PROGRAMS += dfa-match-aux
+dfa_match_aux_LDADD = $(LDADD) @LIBINTL@
+EXTRA_DIST += dfa-match.sh dfa-match-aux.c dfa-invalid-char-class.sh
+
+## end gnulib module dfa-tests
+
+## begin gnulib module dirent
+
+BUILT_SOURCES += dirent.h
+
+# 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)
+ $(AM_V_GEN)rm -f $@-t $@ && \
+ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
+ sed -e 's|@''GUARD_PREFIX''@|GL|g' \
+ -e 's|@''HAVE_DIRENT_H''@|$(HAVE_DIRENT_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_DIRENT_H''@|$(NEXT_DIRENT_H)|g' \
+ -e 's/@''GNULIB_OPENDIR''@/$(GNULIB_OPENDIR)/g' \
+ -e 's/@''GNULIB_READDIR''@/$(GNULIB_READDIR)/g' \
+ -e 's/@''GNULIB_REWINDDIR''@/$(GNULIB_REWINDDIR)/g' \
+ -e 's/@''GNULIB_CLOSEDIR''@/$(GNULIB_CLOSEDIR)/g' \
+ -e 's/@''GNULIB_DIRFD''@/$(GNULIB_DIRFD)/g' \
+ -e 's/@''GNULIB_FDOPENDIR''@/$(GNULIB_FDOPENDIR)/g' \
+ -e 's/@''GNULIB_SCANDIR''@/$(GNULIB_SCANDIR)/g' \
+ -e 's/@''GNULIB_ALPHASORT''@/$(GNULIB_ALPHASORT)/g' \
+ -e 's/@''HAVE_OPENDIR''@/$(HAVE_OPENDIR)/g' \
+ -e 's/@''HAVE_READDIR''@/$(HAVE_READDIR)/g' \
+ -e 's/@''HAVE_REWINDDIR''@/$(HAVE_REWINDDIR)/g' \
+ -e 's/@''HAVE_CLOSEDIR''@/$(HAVE_CLOSEDIR)/g' \
+ -e 's|@''HAVE_DECL_DIRFD''@|$(HAVE_DECL_DIRFD)|g' \
+ -e 's|@''HAVE_DECL_FDOPENDIR''@|$(HAVE_DECL_FDOPENDIR)|g' \
+ -e 's|@''HAVE_FDOPENDIR''@|$(HAVE_FDOPENDIR)|g' \
+ -e 's|@''HAVE_SCANDIR''@|$(HAVE_SCANDIR)|g' \
+ -e 's|@''HAVE_ALPHASORT''@|$(HAVE_ALPHASORT)|g' \
+ -e 's|@''REPLACE_OPENDIR''@|$(REPLACE_OPENDIR)|g' \
+ -e 's|@''REPLACE_CLOSEDIR''@|$(REPLACE_CLOSEDIR)|g' \
+ -e 's|@''REPLACE_DIRFD''@|$(REPLACE_DIRFD)|g' \
+ -e 's|@''REPLACE_FDOPENDIR''@|$(REPLACE_FDOPENDIR)|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)/dirent.in.h; \
+ } > $@-t && \
+ mv $@-t $@
+MOSTLYCLEANFILES += dirent.h dirent.h-t
+
+EXTRA_DIST += dirent.in.h
+
+## end gnulib module dirent
+
+## begin gnulib module dirent-tests
+
+TESTS += test-dirent
+check_PROGRAMS += test-dirent
+EXTRA_DIST += test-dirent.c
+
+## end gnulib module dirent-tests
+
+## begin gnulib module dirfd
+
+
+EXTRA_DIST += dirfd.c
+
+EXTRA_libtests_a_SOURCES += dirfd.c
+
+## end gnulib module dirfd
+
+## begin gnulib module dup2
+
+
+EXTRA_DIST += dup2.c
+
+EXTRA_libtests_a_SOURCES += dup2.c
+
+## end gnulib module dup2
+
+## begin gnulib module dup2-tests
+
+TESTS += test-dup2
+check_PROGRAMS += test-dup2
+EXTRA_DIST += test-dup2.c signature.h macros.h
+
+## end gnulib module dup2-tests
+
+## begin gnulib module environ-tests
+
+TESTS += test-environ
+check_PROGRAMS += test-environ
+
+EXTRA_DIST += test-environ.c
+
+## end gnulib module environ-tests
+
+## begin gnulib module errno-tests
+
+TESTS += test-errno
+check_PROGRAMS += test-errno
+
+EXTRA_DIST += test-errno.c
+
+## end gnulib module errno-tests
+
+## begin gnulib module fcntl-h-tests
+
+TESTS += test-fcntl-h
+check_PROGRAMS += test-fcntl-h
+EXTRA_DIST += test-fcntl-h.c
+
+## end gnulib module fcntl-h-tests
+
+## begin gnulib module fd-hook
+
+libtests_a_SOURCES += fd-hook.c
+
+EXTRA_DIST += fd-hook.h
+
+## end gnulib module fd-hook
+
+## begin gnulib module fdopen
+
+
+EXTRA_DIST += fdopen.c
+
+EXTRA_libtests_a_SOURCES += fdopen.c
+
+## end gnulib module fdopen
+
+## begin gnulib module fdopen-tests
+
+TESTS += test-fdopen
+check_PROGRAMS += test-fdopen
+EXTRA_DIST += test-fdopen.c signature.h macros.h
+
+## end gnulib module fdopen-tests
+
+## begin gnulib module fflush
+
+
+EXTRA_DIST += fflush.c stdio-impl.h
+
+EXTRA_libtests_a_SOURCES += fflush.c
+
+## end gnulib module fflush
+
+## begin gnulib module fflush-tests
+
+TESTS += test-fflush test-fflush2.sh
+check_PROGRAMS += test-fflush test-fflush2
+MOSTLYCLEANFILES += test-fflush.txt
+EXTRA_DIST += test-fflush.c test-fflush2.sh test-fflush2.c signature.h macros.h
+
+## end gnulib module fflush-tests
+
+## begin gnulib module fgetc-tests
+
+TESTS += test-fgetc
+check_PROGRAMS += test-fgetc
+EXTRA_DIST += test-fgetc.c signature.h macros.h
+
+## end gnulib module fgetc-tests
+
+## begin gnulib module file-has-acl
+
+libtests_a_SOURCES += file-has-acl.c
+
+## end gnulib module file-has-acl
+
+## begin gnulib module file-has-acl-tests
+
+TESTS += \
+ test-file-has-acl.sh test-file-has-acl-1.sh test-file-has-acl-2.sh
+TESTS_ENVIRONMENT += USE_ACL=$(USE_ACL)
+check_PROGRAMS += test-file-has-acl
+test_file_has_acl_LDADD = $(LDADD) $(LIB_HAS_ACL)
+EXTRA_DIST += test-file-has-acl.sh test-file-has-acl-1.sh test-file-has-acl-2.sh test-file-has-acl.c macros.h
+
+## end gnulib module file-has-acl-tests
+
+## begin gnulib module filename
+
+
+EXTRA_DIST += filename.h
+
+## end gnulib module filename
+
+## begin gnulib module flexmember
+
+
+EXTRA_DIST += flexmember.h
+
+## end gnulib module flexmember
+
+## begin gnulib module fpending-tests
+
+TESTS += test-fpending.sh
+check_PROGRAMS += test-fpending
+MOSTLYCLEANFILES += test-fpending.t
+EXTRA_DIST += test-fpending.c test-fpending.sh macros.h
+
+## end gnulib module fpending-tests
+
+## begin gnulib module fpurge
+
+
+EXTRA_DIST += fpurge.c stdio-impl.h
+
+EXTRA_libtests_a_SOURCES += fpurge.c
+
+## end gnulib module fpurge
+
+## begin gnulib module fpurge-tests
+
+TESTS += test-fpurge
+check_PROGRAMS += test-fpurge
+MOSTLYCLEANFILES += t-fpurge.tmp
+EXTRA_DIST += test-fpurge.c macros.h
+
+## end gnulib module fpurge-tests
+
+## begin gnulib module fputc-tests
+
+TESTS += test-fputc
+check_PROGRAMS += test-fputc
+EXTRA_DIST += test-fputc.c signature.h macros.h
+
+## end gnulib module fputc-tests
+
+## begin gnulib module fread-tests
+
+TESTS += test-fread
+check_PROGRAMS += test-fread
+EXTRA_DIST += test-fread.c signature.h macros.h
+
+## end gnulib module fread-tests
+
+## begin gnulib module freading
+
+libtests_a_SOURCES += freading.c
+
+EXTRA_DIST += freading.h stdio-impl.h
+
+## end gnulib module freading
+
+## begin gnulib module freading-tests
+
+TESTS += test-freading
+check_PROGRAMS += test-freading
+MOSTLYCLEANFILES += t-freading.tmp
+EXTRA_DIST += test-freading.c macros.h
+
+## end gnulib module freading-tests
+
+## begin gnulib module fseek
+
+
+EXTRA_DIST += fseek.c
+
+EXTRA_libtests_a_SOURCES += fseek.c
+
+## end gnulib module fseek
+
+## begin gnulib module fseek-tests
+
+TESTS += test-fseek.sh test-fseek2.sh
+check_PROGRAMS += test-fseek
+EXTRA_DIST += test-fseek.c test-fseek.sh test-fseek2.sh signature.h macros.h
+
+## end gnulib module fseek-tests
+
+## begin gnulib module fseeko
+
+
+EXTRA_DIST += fseeko.c stdio-impl.h
+
+EXTRA_libtests_a_SOURCES += fseeko.c
+
+## end gnulib module fseeko
+
+## begin gnulib module fseeko-tests
+
+TESTS += test-fseeko.sh test-fseeko2.sh test-fseeko3.sh test-fseeko4.sh
+check_PROGRAMS += test-fseeko test-fseeko3 test-fseeko4
+EXTRA_DIST += 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
+
+## end gnulib module fseeko-tests
+
+## begin gnulib module fstat-tests
+
+TESTS += test-fstat
+check_PROGRAMS += test-fstat
+EXTRA_DIST += test-fstat.c signature.h macros.h
+
+## end gnulib module fstat-tests
+
+## begin gnulib module ftell
+
+
+EXTRA_DIST += ftell.c
+
+EXTRA_libtests_a_SOURCES += ftell.c
+
+## end gnulib module ftell
+
+## begin gnulib module ftell-tests
+
+TESTS += test-ftell.sh test-ftell2.sh test-ftell3
+check_PROGRAMS += test-ftell test-ftell3
+MOSTLYCLEANFILES += t-ftell3.tmp
+EXTRA_DIST += test-ftell.c test-ftell.sh test-ftell2.sh test-ftell3.c signature.h macros.h
+
+## end gnulib module ftell-tests
+
+## begin gnulib module ftello
+
+
+EXTRA_DIST += ftello.c stdio-impl.h
+
+EXTRA_libtests_a_SOURCES += ftello.c
+
+## end gnulib module ftello
+
+## begin gnulib module ftello-tests
+
+TESTS += test-ftello.sh test-ftello2.sh test-ftello3 test-ftello4.sh
+check_PROGRAMS += test-ftello test-ftello3 test-ftello4
+MOSTLYCLEANFILES += t-ftello3.tmp
+EXTRA_DIST += test-ftello.c test-ftello.sh test-ftello2.sh test-ftello3.c test-ftello4.c test-ftello4.sh signature.h macros.h
+
+## end gnulib module ftello-tests
+
+## begin gnulib module fwrite-tests
+
+TESTS += test-fwrite
+check_PROGRAMS += test-fwrite
+EXTRA_DIST += test-fwrite.c signature.h macros.h
+
+## end gnulib module fwrite-tests
+
+## begin gnulib module fwriting-tests
+
+TESTS += test-fwriting
+check_PROGRAMS += test-fwriting
+MOSTLYCLEANFILES += t-fwriting.tmp
+EXTRA_DIST += test-fwriting.c macros.h
+
+## end gnulib module fwriting-tests
+
+## begin gnulib module getcwd-lgpl
+
+
+EXTRA_DIST += getcwd-lgpl.c
+
+EXTRA_libtests_a_SOURCES += getcwd-lgpl.c
+
+## end gnulib module getcwd-lgpl
+
+## begin gnulib module getcwd-lgpl-tests
+
+TESTS += test-getcwd-lgpl
+check_PROGRAMS += test-getcwd-lgpl
+test_getcwd_lgpl_LDADD = $(LDADD) $(LIBINTL)
+EXTRA_DIST += test-getcwd-lgpl.c signature.h macros.h
+
+## end gnulib module getcwd-lgpl-tests
+
+## begin gnulib module getdelim-tests
+
+TESTS += test-getdelim
+check_PROGRAMS += test-getdelim
+MOSTLYCLEANFILES += test-getdelim.txt
+EXTRA_DIST += test-getdelim.c signature.h macros.h
+
+## end gnulib module getdelim-tests
+
+## begin gnulib module getdtablesize
+
+
+EXTRA_DIST += getdtablesize.c
+
+EXTRA_libtests_a_SOURCES += getdtablesize.c
+
+## end gnulib module getdtablesize
+
+## begin gnulib module getdtablesize-tests
+
+TESTS += test-getdtablesize
+check_PROGRAMS += test-getdtablesize
+EXTRA_DIST += test-getdtablesize.c signature.h macros.h
+
+## end gnulib module getdtablesize-tests
+
+## begin gnulib module getopt-gnu-tests
+
+TESTS += test-getopt-gnu
+check_PROGRAMS += test-getopt-gnu
+test_getopt_gnu_LDADD = $(LDADD) $(LIBINTL)
+EXTRA_DIST += macros.h signature.h test-getopt-gnu.c test-getopt-main.h test-getopt.h test-getopt_long.h
+
+## end gnulib module getopt-gnu-tests
+
+## begin gnulib module getopt-posix-tests
+
+TESTS += test-getopt-posix
+check_PROGRAMS += test-getopt-posix
+test_getopt_posix_LDADD = $(LDADD) $(LIBINTL)
+EXTRA_DIST += macros.h signature.h test-getopt-posix.c test-getopt-main.h test-getopt.h
+
+## end gnulib module getopt-posix-tests
+
+## begin gnulib module getpagesize
+
+
+EXTRA_DIST += getpagesize.c
+
+EXTRA_libtests_a_SOURCES += getpagesize.c
+
+## end gnulib module getpagesize
+
+## begin gnulib module getprogname-tests
+
+DEFS += -DEXEEXT=\"@EXEEXT@\"
+TESTS += test-getprogname
+check_PROGRAMS += test-getprogname
+test_getprogname_LDADD = $(LDADD)
+EXTRA_DIST += test-getprogname.c
+
+## end gnulib module getprogname-tests
+
+## begin gnulib module gettimeofday-tests
+
+TESTS += test-gettimeofday
+check_PROGRAMS += test-gettimeofday
+
+EXTRA_DIST += signature.h test-gettimeofday.c
+
+## end gnulib module gettimeofday-tests
+
+## begin gnulib module ignore-value-tests
+
+TESTS += test-ignore-value
+check_PROGRAMS += test-ignore-value
+EXTRA_DIST += test-ignore-value.c
+
+## end gnulib module ignore-value-tests
+
+## begin gnulib module intprops-tests
+
+TESTS += test-intprops
+check_PROGRAMS += test-intprops
+EXTRA_DIST += test-intprops.c macros.h
+
+## end gnulib module intprops-tests
+
+## begin gnulib module inttypes-incomplete
+
+BUILT_SOURCES += inttypes.h
+
+# We need the following in order to create <inttypes.h> when the system
+# doesn't have one that works with the given compiler.
+inttypes.h: inttypes.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(WARN_ON_USE_H) $(ARG_NONNULL_H)
+ $(AM_V_GEN)rm -f $@-t $@ && \
+ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
+ sed -e 's/@''HAVE_INTTYPES_H''@/$(HAVE_INTTYPES_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_INTTYPES_H''@|$(NEXT_INTTYPES_H)|g' \
+ -e 's/@''PRI_MACROS_BROKEN''@/$(PRI_MACROS_BROKEN)/g' \
+ -e 's/@''APPLE_UNIVERSAL_BUILD''@/$(APPLE_UNIVERSAL_BUILD)/g' \
+ -e 's/@''HAVE_LONG_LONG_INT''@/$(HAVE_LONG_LONG_INT)/g' \
+ -e 's/@''HAVE_UNSIGNED_LONG_LONG_INT''@/$(HAVE_UNSIGNED_LONG_LONG_INT)/g' \
+ -e 's/@''PRIPTR_PREFIX''@/$(PRIPTR_PREFIX)/g' \
+ -e 's/@''GNULIB_IMAXABS''@/$(GNULIB_IMAXABS)/g' \
+ -e 's/@''GNULIB_IMAXDIV''@/$(GNULIB_IMAXDIV)/g' \
+ -e 's/@''GNULIB_STRTOIMAX''@/$(GNULIB_STRTOIMAX)/g' \
+ -e 's/@''GNULIB_STRTOUMAX''@/$(GNULIB_STRTOUMAX)/g' \
+ -e 's/@''HAVE_DECL_IMAXABS''@/$(HAVE_DECL_IMAXABS)/g' \
+ -e 's/@''HAVE_DECL_IMAXDIV''@/$(HAVE_DECL_IMAXDIV)/g' \
+ -e 's/@''HAVE_DECL_STRTOIMAX''@/$(HAVE_DECL_STRTOIMAX)/g' \
+ -e 's/@''HAVE_DECL_STRTOUMAX''@/$(HAVE_DECL_STRTOUMAX)/g' \
+ -e 's/@''REPLACE_STRTOIMAX''@/$(REPLACE_STRTOIMAX)/g' \
+ -e 's/@''REPLACE_STRTOUMAX''@/$(REPLACE_STRTOUMAX)/g' \
+ -e 's/@''INT32_MAX_LT_INTMAX_MAX''@/$(INT32_MAX_LT_INTMAX_MAX)/g' \
+ -e 's/@''INT64_MAX_EQ_LONG_MAX''@/$(INT64_MAX_EQ_LONG_MAX)/g' \
+ -e 's/@''UINT32_MAX_LT_UINTMAX_MAX''@/$(UINT32_MAX_LT_UINTMAX_MAX)/g' \
+ -e 's/@''UINT64_MAX_EQ_ULONG_MAX''@/$(UINT64_MAX_EQ_ULONG_MAX)/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)/inttypes.in.h; \
+ } > $@-t && \
+ mv $@-t $@
+MOSTLYCLEANFILES += inttypes.h inttypes.h-t
+
+EXTRA_DIST += inttypes.in.h
+
+## end gnulib module inttypes-incomplete
+
+## begin gnulib module inttypes-tests
+
+TESTS += test-inttypes
+check_PROGRAMS += test-inttypes
+EXTRA_DIST += test-inttypes.c
+
+## end gnulib module inttypes-tests
+
+## begin gnulib module isblank-tests
+
+TESTS += test-isblank
+check_PROGRAMS += test-isblank
+EXTRA_DIST += test-isblank.c signature.h macros.h
+
+## end gnulib module isblank-tests
+
+## begin gnulib module langinfo-tests
+
+TESTS += test-langinfo
+check_PROGRAMS += test-langinfo
+EXTRA_DIST += test-langinfo.c
+
+## end gnulib module langinfo-tests
+
+## begin gnulib module limits-h-tests
+
+TESTS += test-limits-h
+check_PROGRAMS += test-limits-h
+EXTRA_DIST += test-limits-h.c
+
+## end gnulib module limits-h-tests
+
+## begin gnulib module link
+
+
+EXTRA_DIST += link.c
+
+EXTRA_libtests_a_SOURCES += link.c
+
+## end gnulib module link
+
+## begin gnulib module link-tests
+
+TESTS += test-link
+check_PROGRAMS += test-link
+EXTRA_DIST += test-link.h test-link.c signature.h macros.h
+
+## end gnulib module link-tests
+
+## begin gnulib module locale-tests
+
+TESTS += test-locale
+check_PROGRAMS += test-locale
+EXTRA_DIST += test-locale.c
+
+## end gnulib module locale-tests
+
+## begin gnulib module localeconv-tests
+
+TESTS += test-localeconv
+check_PROGRAMS += test-localeconv
+EXTRA_DIST += test-localeconv.c signature.h macros.h
+
+## end gnulib module localeconv-tests
+
+## begin gnulib module localename
+
+libtests_a_SOURCES += localename.c
+
+EXTRA_DIST += localename.h
+
+## end gnulib module localename
+
+## begin gnulib module localename-tests
+
+TESTS += test-localename
+check_PROGRAMS += test-localename
+test_localename_LDADD = $(LDADD) @INTL_MACOSX_LIBS@ $(LIBTHREAD)
+
+EXTRA_DIST += test-localename.c macros.h
+
+## end gnulib module localename-tests
+
+## begin gnulib module lseek
+
+
+EXTRA_DIST += lseek.c
+
+EXTRA_libtests_a_SOURCES += lseek.c
+
+## end gnulib module lseek
+
+## begin gnulib module lseek-tests
+
+TESTS += test-lseek.sh
+check_PROGRAMS += test-lseek
+EXTRA_DIST += test-lseek.c test-lseek.sh signature.h macros.h
+
+## end gnulib module lseek-tests
+
+## begin gnulib module lstat-tests
+
+TESTS += test-lstat
+check_PROGRAMS += test-lstat
+EXTRA_DIST += test-lstat.h test-lstat.c signature.h macros.h
+
+## end gnulib module lstat-tests
+
+## begin gnulib module malloca-tests
+
+TESTS += test-malloca
+check_PROGRAMS += test-malloca
+
+EXTRA_DIST += test-malloca.c
+
+## end gnulib module malloca-tests
+
+## begin gnulib module mbrtowc-tests
+
+TESTS += \
+ 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
+TESTS_ENVIRONMENT += \
+ LOCALE_FR='@LOCALE_FR@' \
+ LOCALE_FR_UTF8='@LOCALE_FR_UTF8@' \
+ LOCALE_JA='@LOCALE_JA@' \
+ LOCALE_ZH_CN='@LOCALE_ZH_CN@'
+check_PROGRAMS += test-mbrtowc test-mbrtowc-w32
+EXTRA_DIST += 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
+
+## end gnulib module mbrtowc-tests
+
+## begin gnulib module mbsinit-tests
+
+TESTS += test-mbsinit.sh
+TESTS_ENVIRONMENT += LOCALE_FR_UTF8='@LOCALE_FR_UTF8@'
+check_PROGRAMS += test-mbsinit
+
+EXTRA_DIST += test-mbsinit.sh test-mbsinit.c signature.h macros.h
+
+## end gnulib module mbsinit-tests
+
+## begin gnulib module memchr-tests
+
+TESTS += test-memchr
+check_PROGRAMS += test-memchr
+EXTRA_DIST += test-memchr.c zerosize-ptr.h signature.h macros.h
+
+## end gnulib module memchr-tests
+
+## begin gnulib module memrchr-tests
+
+TESTS += test-memrchr
+check_PROGRAMS += test-memrchr
+EXTRA_DIST += test-memrchr.c zerosize-ptr.h signature.h macros.h
+
+## end gnulib module memrchr-tests
+
+## begin gnulib module nl_langinfo-tests
+
+TESTS += test-nl_langinfo.sh
+TESTS_ENVIRONMENT += LOCALE_FR='@LOCALE_FR@' LOCALE_FR_UTF8='@LOCALE_FR_UTF8@'
+check_PROGRAMS += test-nl_langinfo
+EXTRA_DIST += test-nl_langinfo.sh test-nl_langinfo.c signature.h macros.h
+
+## end gnulib module nl_langinfo-tests
+
+## begin gnulib module open
+
+
+EXTRA_DIST += open.c
+
+EXTRA_libtests_a_SOURCES += open.c
+
+## end gnulib module open
+
+## begin gnulib module open-tests
+
+TESTS += test-open
+check_PROGRAMS += test-open
+EXTRA_DIST += test-open.h test-open.c signature.h macros.h
+
+## end gnulib module open-tests
+
+## begin gnulib module opendir
+
+
+EXTRA_DIST += dirent-private.h opendir.c
+
+EXTRA_libtests_a_SOURCES += opendir.c
+
+## end gnulib module opendir
+
+## begin gnulib module pathmax-tests
+
+TESTS += test-pathmax
+check_PROGRAMS += test-pathmax
+EXTRA_DIST += test-pathmax.c
+
+## end gnulib module pathmax-tests
+
+## begin gnulib module putenv
+
+
+EXTRA_DIST += putenv.c
+
+EXTRA_libtests_a_SOURCES += putenv.c
+
+## end gnulib module putenv
+
+## begin gnulib module quotearg-simple-tests
+
+TESTS += test-quotearg-simple
+check_PROGRAMS += test-quotearg-simple
+test_quotearg_simple_LDADD = $(LDADD) @LIBINTL@
+EXTRA_DIST += test-quotearg-simple.c test-quotearg.h macros.h zerosize-ptr.h
+
+## end gnulib module quotearg-simple-tests
+
+## begin gnulib module read-file
+
+libtests_a_SOURCES += read-file.c
+
+EXTRA_DIST += read-file.h
+
+## end gnulib module read-file
+
+## begin gnulib module read-file-tests
+
+TESTS += test-read-file
+check_PROGRAMS += test-read-file
+EXTRA_DIST += test-read-file.c
+
+## end gnulib module read-file-tests
+
+## begin gnulib module readdir
+
+
+EXTRA_DIST += dirent-private.h readdir.c
+
+EXTRA_libtests_a_SOURCES += readdir.c
+
+## end gnulib module readdir
+
+## begin gnulib module readlink-tests
+
+TESTS += test-readlink
+check_PROGRAMS += test-readlink
+EXTRA_DIST += test-readlink.h test-readlink.c signature.h macros.h
+
+## end gnulib module readlink-tests
+
+## begin gnulib module realloc-posix
+
+
+EXTRA_DIST += realloc.c
+
+EXTRA_libtests_a_SOURCES += realloc.c
+
+## end gnulib module realloc-posix
+
+## begin gnulib module regex-tests
+
+TESTS += test-regex
+check_PROGRAMS += test-regex
+test_regex_LDADD = $(LDADD) @LIBINTL@ $(LIBTHREAD) $(LIB_PTHREAD)
+EXTRA_DIST += test-regex.c macros.h
+
+## end gnulib module regex-tests
+
+## begin gnulib module rename-tests
+
+TESTS += test-rename
+check_PROGRAMS += test-rename
+EXTRA_DIST += test-rename.h test-rename.c signature.h macros.h
+
+## end gnulib module rename-tests
+
+## begin gnulib module rmdir-tests
+
+TESTS += test-rmdir
+check_PROGRAMS += test-rmdir
+EXTRA_DIST += test-rmdir.h test-rmdir.c signature.h macros.h
+
+## end gnulib module rmdir-tests
+
+## begin gnulib module setenv
+
+
+EXTRA_DIST += setenv.c
+
+EXTRA_libtests_a_SOURCES += setenv.c
+
+## end gnulib module setenv
+
+## begin gnulib module setenv-tests
+
+TESTS += test-setenv
+check_PROGRAMS += test-setenv
+EXTRA_DIST += test-setenv.c signature.h macros.h
+
+## end gnulib module setenv-tests
+
+## begin gnulib module setlocale
+
+
+EXTRA_DIST += setlocale.c
+
+EXTRA_libtests_a_SOURCES += setlocale.c
+
+## end gnulib module setlocale
+
+## begin gnulib module setlocale-tests
+
+TESTS += test-setlocale1.sh test-setlocale2.sh
+TESTS_ENVIRONMENT += \
+ LOCALE_FR='@LOCALE_FR@' \
+ LOCALE_FR_UTF8='@LOCALE_FR_UTF8@' \
+ LOCALE_JA='@LOCALE_JA@' \
+ LOCALE_ZH_CN='@LOCALE_ZH_CN@'
+check_PROGRAMS += test-setlocale1 test-setlocale2
+EXTRA_DIST += test-setlocale1.sh test-setlocale1.c test-setlocale2.sh test-setlocale2.c signature.h macros.h
+
+## end gnulib module setlocale-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
+# need it. This is ensured by the applicability 'all' defined above.
+
+_NORETURN_H=$(top_srcdir)/build-aux/snippet/_Noreturn.h
+
+EXTRA_DIST += $(top_srcdir)/build-aux/snippet/_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
+
+ARG_NONNULL_H=arg-nonnull.h
+
+EXTRA_DIST += $(top_srcdir)/build-aux/snippet/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
+
+CXXDEFS_H=c++defs.h
+
+EXTRA_DIST += $(top_srcdir)/build-aux/snippet/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
+
+UNUSED_PARAMETER_H=unused-parameter.h
+
+EXTRA_DIST += $(top_srcdir)/build-aux/snippet/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
+
+WARN_ON_USE_H=warn-on-use.h
+
+EXTRA_DIST += $(top_srcdir)/build-aux/snippet/warn-on-use.h
+
+## end gnulib module snippet/warn-on-use
+
+## begin gnulib module stat-tests
+
+TESTS += test-stat
+check_PROGRAMS += test-stat
+test_stat_LDADD = $(LDADD) $(LIBINTL)
+EXTRA_DIST += test-stat.h test-stat.c signature.h macros.h
+
+## end gnulib module stat-tests
+
+## begin gnulib module stdalign-tests
+
+TESTS += test-stdalign
+check_PROGRAMS += test-stdalign
+EXTRA_DIST += test-stdalign.c macros.h
+
+## end gnulib module stdalign-tests
+
+## begin gnulib module stdbool-tests
+
+TESTS += test-stdbool
+check_PROGRAMS += test-stdbool
+EXTRA_DIST += test-stdbool.c
+
+## end gnulib module stdbool-tests
+
+## begin gnulib module stddef-tests
+
+TESTS += test-stddef
+check_PROGRAMS += test-stddef
+EXTRA_DIST += test-stddef.c
+
+## end gnulib module stddef-tests
+
+## begin gnulib module stdint-tests
+
+TESTS += test-stdint
+check_PROGRAMS += test-stdint
+EXTRA_DIST += test-stdint.c
+
+## end gnulib module stdint-tests
+
+## begin gnulib module stdio-tests
+
+TESTS += test-stdio
+check_PROGRAMS += test-stdio
+EXTRA_DIST += test-stdio.c
+
+## end gnulib module stdio-tests
+
+## begin gnulib module stdlib-tests
+
+TESTS += test-stdlib
+check_PROGRAMS += test-stdlib
+EXTRA_DIST += test-stdlib.c test-sys_wait.h
+
+## end gnulib module stdlib-tests
+
+## begin gnulib module strdup-posix
+
+
+EXTRA_DIST += strdup.c
+
+EXTRA_libtests_a_SOURCES += strdup.c
+
+## end gnulib module strdup-posix
+
+## begin gnulib module strerror-tests
+
+TESTS += test-strerror
+check_PROGRAMS += test-strerror
+EXTRA_DIST += test-strerror.c signature.h macros.h
+
+## end gnulib module strerror-tests
+
+## begin gnulib module string-tests
+
+TESTS += test-string
+check_PROGRAMS += test-string
+EXTRA_DIST += test-string.c
+
+## end gnulib module string-tests
+
+## begin gnulib module strverscmp-tests
+
+TESTS += test-strverscmp
+check_PROGRAMS += test-strverscmp
+EXTRA_DIST += test-strverscmp.c signature.h macros.h
+
+## end gnulib module strverscmp-tests
+
+## begin gnulib module symlink
+
+
+EXTRA_DIST += symlink.c
+
+EXTRA_libtests_a_SOURCES += symlink.c
+
+## end gnulib module symlink
+
+## begin gnulib module symlink-tests
+
+TESTS += test-symlink
+check_PROGRAMS += test-symlink
+EXTRA_DIST += test-symlink.h test-symlink.c signature.h macros.h
+
+## end gnulib module symlink-tests
+
+## begin gnulib module sys_stat-tests
+
+TESTS += test-sys_stat
+check_PROGRAMS += test-sys_stat
+EXTRA_DIST += test-sys_stat.c
+
+## end gnulib module sys_stat-tests
+
+## begin gnulib module sys_time-tests
+
+TESTS += test-sys_time
+check_PROGRAMS += test-sys_time
+EXTRA_DIST += test-sys_time.c
+
+## end gnulib module sys_time-tests
+
+## begin gnulib module sys_types-tests
+
+TESTS += test-sys_types
+check_PROGRAMS += test-sys_types
+EXTRA_DIST += test-sys_types.c
+
+## end gnulib module sys_types-tests
+
+## begin gnulib module test-framework-sh-tests
+
+TESTS += test-init.sh
+EXTRA_DIST += init.sh
+EXTRA_DIST += test-init.sh
+
+## end gnulib module test-framework-sh-tests
+
+## begin gnulib module time-tests
+
+TESTS += test-time
+check_PROGRAMS += test-time
+EXTRA_DIST += test-time.c
+
+## end gnulib module time-tests
+
+## begin gnulib module unistd-tests
+
+TESTS += test-unistd
+check_PROGRAMS += test-unistd
+EXTRA_DIST += test-unistd.c
+
+## end gnulib module unistd-tests
+
+## begin gnulib module unsetenv
+
+
+EXTRA_DIST += unsetenv.c
+
+EXTRA_libtests_a_SOURCES += unsetenv.c
+
+## end gnulib module unsetenv
+
+## begin gnulib module unsetenv-tests
+
+TESTS += test-unsetenv
+check_PROGRAMS += test-unsetenv
+EXTRA_DIST += test-unsetenv.c signature.h macros.h
+
+## end gnulib module unsetenv-tests
+
+## begin gnulib module update-copyright-tests
+
+TESTS += test-update-copyright.sh
+TESTS_ENVIRONMENT += abs_aux_dir='$(abs_aux_dir)'
+EXTRA_DIST += test-update-copyright.sh
+
+## end gnulib module update-copyright-tests
+
+## begin gnulib module vc-list-files-tests
+
+TESTS += test-vc-list-files-git.sh
+TESTS += test-vc-list-files-cvs.sh
+TESTS_ENVIRONMENT += abs_aux_dir='$(abs_aux_dir)'
+EXTRA_DIST += test-vc-list-files-git.sh test-vc-list-files-cvs.sh
+
+## end gnulib module vc-list-files-tests
+
+## begin gnulib module verify-tests
+
+TESTS_ENVIRONMENT += MAKE='$(MAKE)'
+TESTS += test-verify test-verify.sh
+check_PROGRAMS += test-verify
+
+# This test expects compilation of test-verify.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
+
+## end gnulib module verify-tests
+
+## begin gnulib module version-etc-tests
+
+TESTS += test-version-etc.sh
+check_PROGRAMS += test-version-etc
+test_version_etc_LDADD = $(LDADD) @LIBINTL@
+EXTRA_DIST += test-version-etc.c test-version-etc.sh
+
+## end gnulib module version-etc-tests
+
+## begin gnulib module wchar-tests
+
+TESTS += test-wchar
+check_PROGRAMS += test-wchar
+EXTRA_DIST += test-wchar.c
+
+## end gnulib module wchar-tests
+
+## begin gnulib module wcrtomb-tests
+
+TESTS += \
+ test-wcrtomb.sh \
+ 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
+TESTS_ENVIRONMENT += \
+ LOCALE_FR='@LOCALE_FR@' \
+ LOCALE_FR_UTF8='@LOCALE_FR_UTF8@' \
+ LOCALE_JA='@LOCALE_JA@' \
+ LOCALE_ZH_CN='@LOCALE_ZH_CN@'
+check_PROGRAMS += test-wcrtomb test-wcrtomb-w32
+
+EXTRA_DIST += 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
+
+## end gnulib module wcrtomb-tests
+
+## begin gnulib module wctype-h-tests
+
+TESTS += test-wctype-h
+check_PROGRAMS += test-wctype-h
+EXTRA_DIST += test-wctype-h.c macros.h
+
+## end gnulib module wctype-h-tests
+
+## begin gnulib module xalloc-die-tests
+
+TESTS += test-xalloc-die.sh
+check_PROGRAMS += test-xalloc-die
+test_xalloc_die_LDADD = $(LDADD) @LIBINTL@
+EXTRA_DIST += test-xalloc-die.c test-xalloc-die.sh
+
+## end gnulib module xalloc-die-tests
+
+# Clean up after Solaris cc.
+clean-local:
+ rm -rf SunWS_cache
+
+mostlyclean-local: mostlyclean-generic
+ @for dir in '' $(MOSTLYCLEANDIRS); do \
+ if test -n "$$dir" && test -d $$dir; then \
+ echo "rmdir $$dir"; rmdir $$dir; \
+ fi; \
+ done; \
+ :
diff --git a/gnulib-tests/init.sh b/gnulib-tests/init.sh
new file mode 100644
index 0000000..d780110
--- /dev/null
+++ b/gnulib-tests/init.sh
@@ -0,0 +1,605 @@
+# source this file; set up for tests
+
+# Copyright (C) 2009-2016 Free Software Foundation, Inc.
+
+# This 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/>.
+
+# Using this file in a test
+# =========================
+#
+# The typical skeleton of a test looks like this:
+#
+# #!/bin/sh
+# . "${srcdir=.}/init.sh"; path_prepend_ .
+# Execute some commands.
+# Note that these commands are executed in a subdirectory, therefore you
+# need to prepend "../" to relative filenames in the build directory.
+# Note that the "path_prepend_ ." is useful only if the body of your
+# test invokes programs residing in the initial directory.
+# For example, if the programs you want to test are in src/, and this test
+# script is named tests/test-1, then you would use "path_prepend_ ../src",
+# or perhaps export PATH='$(abs_top_builddir)/src$(PATH_SEPARATOR)'"$$PATH"
+# to all tests via automake's TESTS_ENVIRONMENT.
+# Set the exit code 0 for success, 77 for skipped, or 1 or other for failure.
+# Use the skip_ and fail_ functions to print a diagnostic and then exit
+# with the corresponding exit code.
+# Exit $?
+
+# Executing a test that uses this file
+# ====================================
+#
+# Running a single test:
+# $ make check TESTS=test-foo.sh
+#
+# Running a single test, with verbose output:
+# $ make check TESTS=test-foo.sh VERBOSE=yes
+#
+# Running a single test, keeping the temporary directory:
+# $ make check TESTS=test-foo.sh KEEP=yes
+#
+# Running a single test, with single-stepping:
+# 1. Go into a sub-shell:
+# $ bash
+# 2. Set relevant environment variables from TESTS_ENVIRONMENT in the
+# Makefile:
+# $ export srcdir=../../tests # this is an example
+# 3. Execute the commands from the test, copy&pasting them one by one:
+# $ . "$srcdir/init.sh"; path_prepend_ .
+# ...
+# 4. Finally
+# $ exit
+
+ME_=`expr "./$0" : '.*/\(.*\)$'`
+
+# 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.
+# Turn off errexit here so that we don't trip the bug with OSF1/Tru64
+# sh inside this function.
+Exit () { set +e; (exit $1); exit $1; }
+
+# Print warnings (e.g., about skipped and failed tests) to this file number.
+# Override by defining to say, 9, in init.cfg, and putting say,
+# export ...ENVVAR_SETTINGS...; $(SHELL) 9>&2
+# in the definition of TESTS_ENVIRONMENT in your tests/Makefile.am file.
+# This is useful when using automake's parallel tests mode, to print
+# the reason for skip/failure to console, rather than to the .log files.
+: ${stderr_fileno_=2}
+
+# Note that correct expansion of "$*" depends on IFS starting with ' '.
+# Always write the full diagnostic to stderr.
+# When stderr_fileno_ is not 2, also emit the first line of the
+# diagnostic to that file descriptor.
+warn_ ()
+{
+ # If IFS does not start with ' ', set it and emit the warning in a subshell.
+ case $IFS in
+ ' '*) printf '%s\n' "$*" >&2
+ test $stderr_fileno_ = 2 \
+ || { printf '%s\n' "$*" | sed 1q >&$stderr_fileno_ ; } ;;
+ *) (IFS=' '; warn_ "$@");;
+ esac
+}
+fail_ () { warn_ "$ME_: failed test: $@"; Exit 1; }
+skip_ () { warn_ "$ME_: skipped test: $@"; Exit 77; }
+fatal_ () { warn_ "$ME_: hard error: $@"; Exit 99; }
+framework_failure_ () { warn_ "$ME_: set-up failure: $@"; Exit 99; }
+
+# This is used to simplify checking of the return value
+# which is useful when ensuring a command fails as desired.
+# I.e., just doing `command ... &&fail=1` will not catch
+# a segfault in command for example. With this helper you
+# instead check an explicit exit code like
+# returns_ 1 command ... || fail
+returns_ () {
+ # Disable tracing so it doesn't interfere with stderr of the wrapped command
+ { set +x; } 2>/dev/null
+
+ local exp_exit="$1"
+ shift
+ "$@"
+ test $? -eq $exp_exit && ret_=0 || ret_=1
+
+ if test "$VERBOSE" = yes && test "$gl_set_x_corrupts_stderr_" = false; then
+ set -x
+ fi
+ { return $ret_; } 2>/dev/null
+}
+
+# Sanitize this shell to POSIX mode, if possible.
+DUALCASE=1; export DUALCASE
+if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
+ emulate sh
+ NULLCMD=:
+ alias -g '${1+"$@"}'='"$@"'
+ setopt NO_GLOB_SUBST
+else
+ case `(set -o) 2>/dev/null` in
+ *posix*) set -o posix ;;
+ esac
+fi
+
+# We require $(...) support unconditionally.
+# We require non-surprising "local" semantics (this eliminates dash).
+# This takes the admittedly draconian step of eliminating dash, because the
+# assignment tab=$(printf '\t') works fine, yet preceding it with "local "
+# transforms it into an assignment that sets the variable to the empty string.
+# That is too counter-intuitive, and can lead to subtle run-time malfunction.
+# The example below is less subtle in that with dash, it evokes the run-time
+# exception "dash: 1: local: 1: bad variable name".
+# We require a few additional shell features only when $EXEEXT is nonempty,
+# in order to support automatic $EXEEXT emulation:
+# - hyphen-containing alias names
+# - we prefer to use ${var#...} substitution, rather than having
+# to work around lack of support for that feature.
+# The following code attempts to find a shell with support for these features.
+# If the current shell passes the test, we're done. Otherwise, test other
+# shells until we find one that passes. If one is found, re-exec it.
+# If no acceptable shell is found, skip the current test.
+#
+# The "...set -x; P=1 true 2>err..." test is to disqualify any shell that
+# emits "P=1" into err, as /bin/sh from SunOS 5.11 and OpenBSD 4.7 do.
+#
+# Use "9" to indicate success (rather than 0), in case some shell acts
+# like Solaris 10's /bin/sh but exits successfully instead of with status 2.
+
+# Eval this code in a subshell to determine a shell's suitability.
+# 10 - passes all tests; ok to use
+# 9 - ok, but enabling "set -x" corrupts app stderr; prefer higher score
+# ? - not ok
+gl_shell_test_script_='
+test $(echo y) = y || exit 1
+f_local_() { local v=1; }; f_local_ || exit 1
+f_dash_local_fail_() { local t=$(printf " 1"); }; f_dash_local_fail_
+score_=10
+if test "$VERBOSE" = yes; then
+ test -n "$( (exec 3>&1; set -x; P=1 true 2>&3) 2> /dev/null)" && score_=9
+fi
+test -z "$EXEEXT" && exit $score_
+shopt -s expand_aliases
+alias a-b="echo zoo"
+v=abx
+ test ${v%x} = ab \
+ && test ${v#a} = bx \
+ && test $(a-b) = zoo \
+ && exit $score_
+'
+
+if test "x$1" = "x--no-reexec"; then
+ shift
+else
+ # Assume a working shell. Export to subshells (setup_ needs this).
+ gl_set_x_corrupts_stderr_=false
+ export gl_set_x_corrupts_stderr_
+
+ # Record the first marginally acceptable shell.
+ marginal_=
+
+ # Search for a shell that meets our requirements.
+ for re_shell_ in __current__ "${CONFIG_SHELL:-no_shell}" \
+ /bin/sh bash dash zsh pdksh fail
+ do
+ test "$re_shell_" = no_shell && continue
+
+ # If we've made it all the way to the sentinel, "fail" without
+ # finding even a marginal shell, skip this test.
+ if test "$re_shell_" = fail; then
+ test -z "$marginal_" && skip_ failed to find an adequate shell
+ re_shell_=$marginal_
+ break
+ fi
+
+ # When testing the current shell, simply "eval" the test code.
+ # Otherwise, run it via $re_shell_ -c ...
+ if test "$re_shell_" = __current__; then
+ # 'eval'ing this code makes Solaris 10's /bin/sh exit with
+ # $? set to 2. It does not evaluate any of the code after the
+ # "unexpected" first '('. Thus, we must run it in a subshell.
+ ( eval "$gl_shell_test_script_" ) > /dev/null 2>&1
+ else
+ "$re_shell_" -c "$gl_shell_test_script_" 2>/dev/null
+ fi
+
+ st_=$?
+
+ # $re_shell_ works just fine. Use it.
+ if test $st_ = 10; then
+ gl_set_x_corrupts_stderr_=false
+ break
+ fi
+
+ # If this is our first marginally acceptable shell, remember it.
+ if test "$st_:$marginal_" = 9: ; then
+ marginal_="$re_shell_"
+ gl_set_x_corrupts_stderr_=true
+ fi
+ done
+
+ if test "$re_shell_" != __current__; then
+ # Found a usable shell. Preserve -v and -x.
+ case $- in
+ *v*x* | *x*v*) opts_=-vx ;;
+ *v*) opts_=-v ;;
+ *x*) opts_=-x ;;
+ *) opts_= ;;
+ esac
+ re_shell=$re_shell_
+ export re_shell
+ exec "$re_shell_" $opts_ "$0" --no-reexec "$@"
+ echo "$ME_: exec failed" 1>&2
+ exit 127
+ fi
+fi
+
+# If this is bash, turn off all aliases.
+test -n "$BASH_VERSION" && unalias -a
+
+# Note that when supporting $EXEEXT (transparently mapping from PROG_NAME to
+# PROG_NAME.exe), we want to support hyphen-containing names like test-acos.
+# 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
+
+# Enable glibc's malloc-perturbing option.
+# This is useful for exposing code that depends on the fact that
+# malloc-related functions often return memory that is mostly zeroed.
+# If you have the time and cycles, use valgrind to do an even better job.
+: ${MALLOC_PERTURB_=87}
+export MALLOC_PERTURB_
+
+# This is a stub function that is run upon trap (upon regular exit and
+# interrupt). Override it with a per-test function, e.g., to unmount
+# a partition, or to undo any other global state changes.
+cleanup_ () { :; }
+
+# Emit a header similar to that from diff -u; Print the simulated "diff"
+# command so that the order of arguments is clear. Don't bother with @@ lines.
+emit_diff_u_header_ ()
+{
+ printf '%s\n' "diff -u $*" \
+ "--- $1 1970-01-01" \
+ "+++ $2 1970-01-01"
+}
+
+# Arrange not to let diff or cmp operate on /dev/null,
+# since on some systems (at least OSF/1 5.1), that doesn't work.
+# When there are not two arguments, or no argument is /dev/null, return 2.
+# When one argument is /dev/null and the other is not empty,
+# cat the nonempty file to stderr and return 1.
+# Otherwise, return 0.
+compare_dev_null_ ()
+{
+ test $# = 2 || return 2
+
+ if test "x$1" = x/dev/null; then
+ test -s "$2" || return 0
+ emit_diff_u_header_ "$@"; sed 's/^/+/' "$2"
+ return 1
+ fi
+
+ if test "x$2" = x/dev/null; then
+ test -s "$1" || return 0
+ emit_diff_u_header_ "$@"; sed 's/^/-/' "$1"
+ return 1
+ fi
+
+ return 2
+}
+
+for diff_opt_ in -u -U3 -c '' no; do
+ test "$diff_opt_" != no &&
+ diff_out_=`exec 2>/dev/null; diff $diff_opt_ "$0" "$0" < /dev/null` &&
+ break
+done
+if test "$diff_opt_" != no; then
+ if test -z "$diff_out_"; then
+ compare_ () { diff $diff_opt_ "$@"; }
+ else
+ compare_ ()
+ {
+ # If no differences were found, AIX and HP-UX 'diff' produce output
+ # like "No differences encountered". Hide this output.
+ diff $diff_opt_ "$@" > diff.out
+ diff_status_=$?
+ test $diff_status_ -eq 0 || cat diff.out || diff_status_=2
+ rm -f diff.out || diff_status_=2
+ return $diff_status_
+ }
+ fi
+elif cmp -s /dev/null /dev/null 2>/dev/null; then
+ compare_ () { cmp -s "$@"; }
+else
+ compare_ () { cmp "$@"; }
+fi
+
+# Usage: compare EXPECTED ACTUAL
+#
+# Given compare_dev_null_'s preprocessing, defer to compare_ if 2 or more.
+# Otherwise, propagate $? to caller: any diffs have already been printed.
+compare ()
+{
+ # This looks like it can be factored to use a simple "case $?"
+ # after unchecked compare_dev_null_ invocation, but that would
+ # fail in a "set -e" environment.
+ if compare_dev_null_ "$@"; then
+ return 0
+ else
+ case $? in
+ 1) return 1;;
+ *) compare_ "$@";;
+ esac
+ fi
+}
+
+# An arbitrary prefix to help distinguish test directories.
+testdir_prefix_ () { printf gt; }
+
+# Run the user-overridable cleanup_ function, remove the temporary
+# directory and exit with the incoming value of $?.
+remove_tmp_ ()
+{
+ __st=$?
+ cleanup_
+ if test "$KEEP" = yes; then
+ echo "Not removing temporary directory $test_dir_"
+ else
+ # cd out of the directory we're about to remove
+ cd "$initial_cwd_" || cd / || cd /tmp
+ chmod -R u+rwx "$test_dir_"
+ # If removal fails and exit status was to be 0, then change it to 1.
+ rm -rf "$test_dir_" || { test $__st = 0 && __st=1; }
+ fi
+ exit $__st
+}
+
+# Given a directory name, DIR, if every entry in it that matches *.exe
+# contains only the specified bytes (see the case stmt below), then print
+# a space-separated list of those names and return 0. Otherwise, don't
+# print anything and return 1. Naming constraints apply also to DIR.
+find_exe_basenames_ ()
+{
+ feb_dir_=$1
+ feb_fail_=0
+ feb_result_=
+ feb_sp_=
+ for feb_file_ in $feb_dir_/*.exe; do
+ # If there was no *.exe file, or there existed a file named "*.exe" that
+ # was deleted between the above glob expansion and the existence test
+ # below, just skip it.
+ test "x$feb_file_" = "x$feb_dir_/*.exe" && test ! -f "$feb_file_" \
+ && continue
+ # Exempt [.exe, since we can't create a function by that name, yet
+ # we can't invoke [ by PATH search anyways due to shell builtins.
+ test "x$feb_file_" = "x$feb_dir_/[.exe" && continue
+ case $feb_file_ in
+ *[!-a-zA-Z/0-9_.+]*) feb_fail_=1; break;;
+ *) # Remove leading file name components as well as the .exe suffix.
+ feb_file_=${feb_file_##*/}
+ feb_file_=${feb_file_%.exe}
+ feb_result_="$feb_result_$feb_sp_$feb_file_";;
+ esac
+ feb_sp_=' '
+ done
+ test $feb_fail_ = 0 && printf %s "$feb_result_"
+ return $feb_fail_
+}
+
+# Consider the files in directory, $1.
+# For each file name of the form PROG.exe, create an alias named
+# PROG that simply invokes PROG.exe, then return 0. If any selected
+# file name or the directory name, $1, contains an unexpected character,
+# define no alias and return 1.
+create_exe_shims_ ()
+{
+ case $EXEEXT in
+ '') return 0 ;;
+ .exe) ;;
+ *) echo "$0: unexpected \$EXEEXT value: $EXEEXT" 1>&2; return 1 ;;
+ esac
+
+ base_names_=`find_exe_basenames_ $1` \
+ || { echo "$0 (exe_shim): skipping directory: $1" 1>&2; return 0; }
+
+ if test -n "$base_names_"; then
+ for base_ in $base_names_; do
+ alias "$base_"="$base_$EXEEXT"
+ done
+ fi
+
+ return 0
+}
+
+# Use this function to prepend to PATH an absolute name for each
+# specified, possibly-$initial_cwd_-relative, directory.
+path_prepend_ ()
+{
+ while test $# != 0; do
+ path_dir_=$1
+ case $path_dir_ in
+ '') fail_ "invalid path dir: '$1'";;
+ /*) 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_'";;
+ esac
+ PATH="$abs_path_dir_:$PATH"
+
+ # Create an alias, FOO, for each FOO.exe in this directory.
+ create_exe_shims_ "$abs_path_dir_" \
+ || fail_ "something failed (above): $abs_path_dir_"
+ shift
+ done
+ export PATH
+}
+
+setup_ ()
+{
+ if test "$VERBOSE" = yes; then
+ # Test whether set -x may cause the selected shell to corrupt an
+ # application's stderr. Many do, including zsh-4.3.10 and the /bin/sh
+ # from SunOS 5.11, OpenBSD 4.7 and Irix 5.x and 6.5.
+ # If enabling verbose output this way would cause trouble, simply
+ # issue a warning and refrain.
+ if $gl_set_x_corrupts_stderr_; then
+ warn_ "using SHELL=$SHELL with 'set -x' corrupts stderr"
+ else
+ set -x
+ fi
+ fi
+
+ initial_cwd_=$PWD
+
+ pfx_=`testdir_prefix_`
+ test_dir_=`mktempd_ "$initial_cwd_" "$pfx_-$ME_.XXXX"` \
+ || fail_ "failed to create temporary directory in $initial_cwd_"
+ cd "$test_dir_" || fail_ "failed to cd to temporary directory"
+
+ # As autoconf-generated configure scripts do, ensure that IFS
+ # is defined initially, so that saving and restoring $IFS works.
+ gl_init_sh_nl_='
+'
+ IFS=" "" $gl_init_sh_nl_"
+
+ # This trap statement, along with a trap on 0 below, ensure that the
+ # temporary directory, $test_dir_, is removed upon exit as well as
+ # upon receipt of any of the listed signals.
+ for sig_ in 1 2 3 13 15; do
+ eval "trap 'Exit $(expr $sig_ + 128)' $sig_"
+ done
+}
+
+# Create a temporary directory, much like mktemp -d does.
+# Written by Jim Meyering.
+#
+# Usage: mktempd_ /tmp phoey.XXXXXXXXXX
+#
+# First, try to use the mktemp program.
+# Failing that, we'll roll our own mktemp-like function:
+# - try to get random bytes from /dev/urandom
+# - failing that, generate output from a combination of quickly-varying
+# sources and gzip. Ignore non-varying gzip header, and extract
+# "random" bits from there.
+# - given those bits, map to file-name bytes using tr, and try to create
+# the desired directory.
+# - make only $MAX_TRIES_ attempts
+
+# Helper function. Print $N pseudo-random bytes from a-zA-Z0-9.
+rand_bytes_ ()
+{
+ n_=$1
+
+ # Maybe try openssl rand -base64 $n_prime_|tr '+/=\012' abcd first?
+ # But if they have openssl, they probably have mktemp, too.
+
+ chars_=abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789
+ dev_rand_=/dev/urandom
+ if test -r "$dev_rand_"; then
+ # Note: 256-length($chars_) == 194; 3 copies of $chars_ is 186 + 8 = 194.
+ dd ibs=$n_ count=1 if=$dev_rand_ 2>/dev/null \
+ | LC_ALL=C tr -c $chars_ 01234567$chars_$chars_$chars_
+ return
+ fi
+
+ n_plus_50_=`expr $n_ + 50`
+ cmds_='date; date +%N; free; who -a; w; ps auxww; ps ef; netstat -n'
+ data_=` (eval "$cmds_") 2>&1 | gzip `
+
+ # Ensure that $data_ has length at least 50+$n_
+ while :; do
+ len_=`echo "$data_"|wc -c`
+ test $n_plus_50_ -le $len_ && break;
+ data_=` (echo "$data_"; eval "$cmds_") 2>&1 | gzip `
+ done
+
+ echo "$data_" \
+ | dd bs=1 skip=50 count=$n_ 2>/dev/null \
+ | LC_ALL=C tr -c $chars_ 01234567$chars_$chars_$chars_
+}
+
+mktempd_ ()
+{
+ case $# in
+ 2);;
+ *) fail_ "Usage: mktempd_ DIR TEMPLATE";;
+ esac
+
+ destdir_=$1
+ template_=$2
+
+ MAX_TRIES_=4
+
+ # Disallow any trailing slash on specified destdir:
+ # it would subvert the post-mktemp "case"-based destdir test.
+ case $destdir_ in
+ / | //) destdir_slash_=$destdir;;
+ */) fail_ "invalid destination dir: remove trailing slash(es)";;
+ *) destdir_slash_=$destdir_/;;
+ esac
+
+ case $template_ in
+ *XXXX) ;;
+ *) fail_ \
+ "invalid template: $template_ (must have a suffix of at least 4 X's)";;
+ esac
+
+ # First, try to use mktemp.
+ d=`unset TMPDIR; { mktemp -d -t -p "$destdir_" "$template_"; } 2>/dev/null` &&
+
+ # The resulting name must be in the specified directory.
+ case $d in "$destdir_slash_"*) :;; *) false;; esac &&
+
+ # It must have created the directory.
+ test -d "$d" &&
+
+ # It must have 0700 permissions. Handle sticky "S" bits.
+ perms=`ls -dgo "$d" 2>/dev/null` &&
+ case $perms in drwx--[-S]---*) :;; *) false;; esac && {
+ echo "$d"
+ return
+ }
+
+ # If we reach this point, we'll have to create a directory manually.
+
+ # Get a copy of the template without its suffix of X's.
+ base_template_=`echo "$template_"|sed 's/XX*$//'`
+
+ # Calculate how many X's we've just removed.
+ template_length_=`echo "$template_" | wc -c`
+ nx_=`echo "$base_template_" | wc -c`
+ nx_=`expr $template_length_ - $nx_`
+
+ err_=
+ i_=1
+ while :; do
+ X_=`rand_bytes_ $nx_`
+ candidate_dir_="$destdir_slash_$base_template_$X_"
+ err_=`mkdir -m 0700 "$candidate_dir_" 2>&1` \
+ && { echo "$candidate_dir_"; return; }
+ test $MAX_TRIES_ -le $i_ && break;
+ i_=`expr $i_ + 1`
+ done
+ fail_ "$err_"
+}
+
+# If you want to override the testdir_prefix_ function,
+# or to add more utility functions, use this file.
+test -f "$srcdir/init.cfg" \
+ && . "$srcdir/init.cfg"
+
+setup_ "$@"
+# This trap is here, rather than in the setup_ function, because some
+# shells run the exit trap at shell function exit, rather than script exit.
+trap remove_tmp_ 0
diff --git a/gnulib-tests/inttypes.in.h b/gnulib-tests/inttypes.in.h
new file mode 100644
index 0000000..ed09db6
--- /dev/null
+++ b/gnulib-tests/inttypes.in.h
@@ -0,0 +1,1144 @@
+/* Copyright (C) 2006-2016 Free Software Foundation, Inc.
+ Written by Paul Eggert, Bruno Haible, Derek Price.
+ 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 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/>. */
+
+/*
+ * ISO C 99 <inttypes.h> for platforms that lack it.
+ * <http://www.opengroup.org/susv3xbd/inttypes.h.html>
+ */
+
+#if __GNUC__ >= 3
+@PRAGMA_SYSTEM_HEADER@
+#endif
+@PRAGMA_COLUMNS@
+
+/* Include the original <inttypes.h> if it exists, and if this file
+ has not been included yet or if this file includes gnulib stdint.h
+ which in turn includes this file.
+ The include_next requires a split double-inclusion guard. */
+#if ! defined INTTYPES_H || defined _GL_JUST_INCLUDE_SYSTEM_INTTYPES_H
+# if @HAVE_INTTYPES_H@
+
+ /* Some pre-C++11 <stdint.h> implementations need this. */
+# if defined __cplusplus && ! defined __STDC_FORMAT_MACROS
+# define __STDC_FORMAT_MACROS 1
+# endif
+
+# @INCLUDE_NEXT@ @NEXT_INTTYPES_H@
+# endif
+#endif
+
+#if ! defined INTTYPES_H && ! defined _GL_JUST_INCLUDE_SYSTEM_INTTYPES_H
+#define INTTYPES_H
+
+/* Include <stdint.h> or the gnulib replacement.
+ But avoid namespace pollution on glibc systems. */
+#ifndef __GLIBC__
+# include <stdint.h>
+#endif
+/* Get CHAR_BIT. */
+#include <limits.h>
+/* On mingw, __USE_MINGW_ANSI_STDIO only works if <stdio.h> is also included */
+#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
+# include <stdio.h>
+#endif
+
+#if !(INT_MIN == INT32_MIN && INT_MAX == INT32_MAX)
+# error "This file assumes that 'int' has exactly 32 bits. Please report your platform and compiler to <bug-gnulib@gnu.org>."
+#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. */
+
+/* 7.8.1 Macros for format specifiers */
+
+#if defined _TNS_R_TARGET
+ /* Tandem NonStop R series and compatible platforms released before
+ July 2005 support %Ld but not %lld. */
+# define _LONG_LONG_FORMAT_PREFIX "L"
+#else
+# define _LONG_LONG_FORMAT_PREFIX "ll"
+#endif
+
+#if !defined PRId8 || @PRI_MACROS_BROKEN@
+# undef PRId8
+# ifdef INT8_MAX
+# define PRId8 "d"
+# endif
+#endif
+#if !defined PRIi8 || @PRI_MACROS_BROKEN@
+# undef PRIi8
+# ifdef INT8_MAX
+# define PRIi8 "i"
+# endif
+#endif
+#if !defined PRIo8 || @PRI_MACROS_BROKEN@
+# undef PRIo8
+# ifdef UINT8_MAX
+# define PRIo8 "o"
+# endif
+#endif
+#if !defined PRIu8 || @PRI_MACROS_BROKEN@
+# undef PRIu8
+# ifdef UINT8_MAX
+# define PRIu8 "u"
+# endif
+#endif
+#if !defined PRIx8 || @PRI_MACROS_BROKEN@
+# undef PRIx8
+# ifdef UINT8_MAX
+# define PRIx8 "x"
+# endif
+#endif
+#if !defined PRIX8 || @PRI_MACROS_BROKEN@
+# undef PRIX8
+# ifdef UINT8_MAX
+# define PRIX8 "X"
+# endif
+#endif
+#if !defined PRId16 || @PRI_MACROS_BROKEN@
+# undef PRId16
+# ifdef INT16_MAX
+# define PRId16 "d"
+# endif
+#endif
+#if !defined PRIi16 || @PRI_MACROS_BROKEN@
+# undef PRIi16
+# ifdef INT16_MAX
+# define PRIi16 "i"
+# endif
+#endif
+#if !defined PRIo16 || @PRI_MACROS_BROKEN@
+# undef PRIo16
+# ifdef UINT16_MAX
+# define PRIo16 "o"
+# endif
+#endif
+#if !defined PRIu16 || @PRI_MACROS_BROKEN@
+# undef PRIu16
+# ifdef UINT16_MAX
+# define PRIu16 "u"
+# endif
+#endif
+#if !defined PRIx16 || @PRI_MACROS_BROKEN@
+# undef PRIx16
+# ifdef UINT16_MAX
+# define PRIx16 "x"
+# endif
+#endif
+#if !defined PRIX16 || @PRI_MACROS_BROKEN@
+# undef PRIX16
+# ifdef UINT16_MAX
+# define PRIX16 "X"
+# endif
+#endif
+#if !defined PRId32 || @PRI_MACROS_BROKEN@
+# undef PRId32
+# ifdef INT32_MAX
+# define PRId32 "d"
+# endif
+#endif
+#if !defined PRIi32 || @PRI_MACROS_BROKEN@
+# undef PRIi32
+# ifdef INT32_MAX
+# define PRIi32 "i"
+# endif
+#endif
+#if !defined PRIo32 || @PRI_MACROS_BROKEN@
+# undef PRIo32
+# ifdef UINT32_MAX
+# define PRIo32 "o"
+# endif
+#endif
+#if !defined PRIu32 || @PRI_MACROS_BROKEN@
+# undef PRIu32
+# ifdef UINT32_MAX
+# define PRIu32 "u"
+# endif
+#endif
+#if !defined PRIx32 || @PRI_MACROS_BROKEN@
+# undef PRIx32
+# ifdef UINT32_MAX
+# define PRIx32 "x"
+# endif
+#endif
+#if !defined PRIX32 || @PRI_MACROS_BROKEN@
+# undef PRIX32
+# ifdef UINT32_MAX
+# define PRIX32 "X"
+# endif
+#endif
+#ifdef INT64_MAX
+# if (@APPLE_UNIVERSAL_BUILD@ ? defined _LP64 : @INT64_MAX_EQ_LONG_MAX@)
+# define _PRI64_PREFIX "l"
+# elif defined _MSC_VER || defined __MINGW32__
+# define _PRI64_PREFIX "I64"
+# elif @HAVE_LONG_LONG_INT@ && LONG_MAX >> 30 == 1
+# define _PRI64_PREFIX _LONG_LONG_FORMAT_PREFIX
+# endif
+# if !defined PRId64 || @PRI_MACROS_BROKEN@
+# undef PRId64
+# define PRId64 _PRI64_PREFIX "d"
+# endif
+# if !defined PRIi64 || @PRI_MACROS_BROKEN@
+# undef PRIi64
+# define PRIi64 _PRI64_PREFIX "i"
+# endif
+#endif
+#ifdef UINT64_MAX
+# if (@APPLE_UNIVERSAL_BUILD@ ? defined _LP64 : @UINT64_MAX_EQ_ULONG_MAX@)
+# define _PRIu64_PREFIX "l"
+# elif defined _MSC_VER || defined __MINGW32__
+# define _PRIu64_PREFIX "I64"
+# elif @HAVE_UNSIGNED_LONG_LONG_INT@ && ULONG_MAX >> 31 == 1
+# define _PRIu64_PREFIX _LONG_LONG_FORMAT_PREFIX
+# endif
+# if !defined PRIo64 || @PRI_MACROS_BROKEN@
+# undef PRIo64
+# define PRIo64 _PRIu64_PREFIX "o"
+# endif
+# if !defined PRIu64 || @PRI_MACROS_BROKEN@
+# undef PRIu64
+# define PRIu64 _PRIu64_PREFIX "u"
+# endif
+# if !defined PRIx64 || @PRI_MACROS_BROKEN@
+# undef PRIx64
+# define PRIx64 _PRIu64_PREFIX "x"
+# endif
+# if !defined PRIX64 || @PRI_MACROS_BROKEN@
+# undef PRIX64
+# define PRIX64 _PRIu64_PREFIX "X"
+# endif
+#endif
+
+#if !defined PRIdLEAST8 || @PRI_MACROS_BROKEN@
+# undef PRIdLEAST8
+# define PRIdLEAST8 "d"
+#endif
+#if !defined PRIiLEAST8 || @PRI_MACROS_BROKEN@
+# undef PRIiLEAST8
+# define PRIiLEAST8 "i"
+#endif
+#if !defined PRIoLEAST8 || @PRI_MACROS_BROKEN@
+# undef PRIoLEAST8
+# define PRIoLEAST8 "o"
+#endif
+#if !defined PRIuLEAST8 || @PRI_MACROS_BROKEN@
+# undef PRIuLEAST8
+# define PRIuLEAST8 "u"
+#endif
+#if !defined PRIxLEAST8 || @PRI_MACROS_BROKEN@
+# undef PRIxLEAST8
+# define PRIxLEAST8 "x"
+#endif
+#if !defined PRIXLEAST8 || @PRI_MACROS_BROKEN@
+# undef PRIXLEAST8
+# define PRIXLEAST8 "X"
+#endif
+#if !defined PRIdLEAST16 || @PRI_MACROS_BROKEN@
+# undef PRIdLEAST16
+# define PRIdLEAST16 "d"
+#endif
+#if !defined PRIiLEAST16 || @PRI_MACROS_BROKEN@
+# undef PRIiLEAST16
+# define PRIiLEAST16 "i"
+#endif
+#if !defined PRIoLEAST16 || @PRI_MACROS_BROKEN@
+# undef PRIoLEAST16
+# define PRIoLEAST16 "o"
+#endif
+#if !defined PRIuLEAST16 || @PRI_MACROS_BROKEN@
+# undef PRIuLEAST16
+# define PRIuLEAST16 "u"
+#endif
+#if !defined PRIxLEAST16 || @PRI_MACROS_BROKEN@
+# undef PRIxLEAST16
+# define PRIxLEAST16 "x"
+#endif
+#if !defined PRIXLEAST16 || @PRI_MACROS_BROKEN@
+# undef PRIXLEAST16
+# define PRIXLEAST16 "X"
+#endif
+#if !defined PRIdLEAST32 || @PRI_MACROS_BROKEN@
+# undef PRIdLEAST32
+# define PRIdLEAST32 "d"
+#endif
+#if !defined PRIiLEAST32 || @PRI_MACROS_BROKEN@
+# undef PRIiLEAST32
+# define PRIiLEAST32 "i"
+#endif
+#if !defined PRIoLEAST32 || @PRI_MACROS_BROKEN@
+# undef PRIoLEAST32
+# define PRIoLEAST32 "o"
+#endif
+#if !defined PRIuLEAST32 || @PRI_MACROS_BROKEN@
+# undef PRIuLEAST32
+# define PRIuLEAST32 "u"
+#endif
+#if !defined PRIxLEAST32 || @PRI_MACROS_BROKEN@
+# undef PRIxLEAST32
+# define PRIxLEAST32 "x"
+#endif
+#if !defined PRIXLEAST32 || @PRI_MACROS_BROKEN@
+# undef PRIXLEAST32
+# define PRIXLEAST32 "X"
+#endif
+#ifdef INT64_MAX
+# if !defined PRIdLEAST64 || @PRI_MACROS_BROKEN@
+# undef PRIdLEAST64
+# define PRIdLEAST64 PRId64
+# endif
+# if !defined PRIiLEAST64 || @PRI_MACROS_BROKEN@
+# undef PRIiLEAST64
+# define PRIiLEAST64 PRIi64
+# endif
+#endif
+#ifdef UINT64_MAX
+# if !defined PRIoLEAST64 || @PRI_MACROS_BROKEN@
+# undef PRIoLEAST64
+# define PRIoLEAST64 PRIo64
+# endif
+# if !defined PRIuLEAST64 || @PRI_MACROS_BROKEN@
+# undef PRIuLEAST64
+# define PRIuLEAST64 PRIu64
+# endif
+# if !defined PRIxLEAST64 || @PRI_MACROS_BROKEN@
+# undef PRIxLEAST64
+# define PRIxLEAST64 PRIx64
+# endif
+# if !defined PRIXLEAST64 || @PRI_MACROS_BROKEN@
+# undef PRIXLEAST64
+# define PRIXLEAST64 PRIX64
+# endif
+#endif
+
+#if !defined PRIdFAST8 || @PRI_MACROS_BROKEN@
+# undef PRIdFAST8
+# if INT_FAST8_MAX > INT32_MAX
+# define PRIdFAST8 PRId64
+# else
+# define PRIdFAST8 "d"
+# endif
+#endif
+#if !defined PRIiFAST8 || @PRI_MACROS_BROKEN@
+# undef PRIiFAST8
+# if INT_FAST8_MAX > INT32_MAX
+# define PRIiFAST8 PRIi64
+# else
+# define PRIiFAST8 "i"
+# endif
+#endif
+#if !defined PRIoFAST8 || @PRI_MACROS_BROKEN@
+# undef PRIoFAST8
+# if UINT_FAST8_MAX > UINT32_MAX
+# define PRIoFAST8 PRIo64
+# else
+# define PRIoFAST8 "o"
+# endif
+#endif
+#if !defined PRIuFAST8 || @PRI_MACROS_BROKEN@
+# undef PRIuFAST8
+# if UINT_FAST8_MAX > UINT32_MAX
+# define PRIuFAST8 PRIu64
+# else
+# define PRIuFAST8 "u"
+# endif
+#endif
+#if !defined PRIxFAST8 || @PRI_MACROS_BROKEN@
+# undef PRIxFAST8
+# if UINT_FAST8_MAX > UINT32_MAX
+# define PRIxFAST8 PRIx64
+# else
+# define PRIxFAST8 "x"
+# endif
+#endif
+#if !defined PRIXFAST8 || @PRI_MACROS_BROKEN@
+# undef PRIXFAST8
+# if UINT_FAST8_MAX > UINT32_MAX
+# define PRIXFAST8 PRIX64
+# else
+# define PRIXFAST8 "X"
+# endif
+#endif
+#if !defined PRIdFAST16 || @PRI_MACROS_BROKEN@
+# undef PRIdFAST16
+# if INT_FAST16_MAX > INT32_MAX
+# define PRIdFAST16 PRId64
+# else
+# define PRIdFAST16 "d"
+# endif
+#endif
+#if !defined PRIiFAST16 || @PRI_MACROS_BROKEN@
+# undef PRIiFAST16
+# if INT_FAST16_MAX > INT32_MAX
+# define PRIiFAST16 PRIi64
+# else
+# define PRIiFAST16 "i"
+# endif
+#endif
+#if !defined PRIoFAST16 || @PRI_MACROS_BROKEN@
+# undef PRIoFAST16
+# if UINT_FAST16_MAX > UINT32_MAX
+# define PRIoFAST16 PRIo64
+# else
+# define PRIoFAST16 "o"
+# endif
+#endif
+#if !defined PRIuFAST16 || @PRI_MACROS_BROKEN@
+# undef PRIuFAST16
+# if UINT_FAST16_MAX > UINT32_MAX
+# define PRIuFAST16 PRIu64
+# else
+# define PRIuFAST16 "u"
+# endif
+#endif
+#if !defined PRIxFAST16 || @PRI_MACROS_BROKEN@
+# undef PRIxFAST16
+# if UINT_FAST16_MAX > UINT32_MAX
+# define PRIxFAST16 PRIx64
+# else
+# define PRIxFAST16 "x"
+# endif
+#endif
+#if !defined PRIXFAST16 || @PRI_MACROS_BROKEN@
+# undef PRIXFAST16
+# if UINT_FAST16_MAX > UINT32_MAX
+# define PRIXFAST16 PRIX64
+# else
+# define PRIXFAST16 "X"
+# endif
+#endif
+#if !defined PRIdFAST32 || @PRI_MACROS_BROKEN@
+# undef PRIdFAST32
+# if INT_FAST32_MAX > INT32_MAX
+# define PRIdFAST32 PRId64
+# else
+# define PRIdFAST32 "d"
+# endif
+#endif
+#if !defined PRIiFAST32 || @PRI_MACROS_BROKEN@
+# undef PRIiFAST32
+# if INT_FAST32_MAX > INT32_MAX
+# define PRIiFAST32 PRIi64
+# else
+# define PRIiFAST32 "i"
+# endif
+#endif
+#if !defined PRIoFAST32 || @PRI_MACROS_BROKEN@
+# undef PRIoFAST32
+# if UINT_FAST32_MAX > UINT32_MAX
+# define PRIoFAST32 PRIo64
+# else
+# define PRIoFAST32 "o"
+# endif
+#endif
+#if !defined PRIuFAST32 || @PRI_MACROS_BROKEN@
+# undef PRIuFAST32
+# if UINT_FAST32_MAX > UINT32_MAX
+# define PRIuFAST32 PRIu64
+# else
+# define PRIuFAST32 "u"
+# endif
+#endif
+#if !defined PRIxFAST32 || @PRI_MACROS_BROKEN@
+# undef PRIxFAST32
+# if UINT_FAST32_MAX > UINT32_MAX
+# define PRIxFAST32 PRIx64
+# else
+# define PRIxFAST32 "x"
+# endif
+#endif
+#if !defined PRIXFAST32 || @PRI_MACROS_BROKEN@
+# undef PRIXFAST32
+# if UINT_FAST32_MAX > UINT32_MAX
+# define PRIXFAST32 PRIX64
+# else
+# define PRIXFAST32 "X"
+# endif
+#endif
+#ifdef INT64_MAX
+# if !defined PRIdFAST64 || @PRI_MACROS_BROKEN@
+# undef PRIdFAST64
+# define PRIdFAST64 PRId64
+# endif
+# if !defined PRIiFAST64 || @PRI_MACROS_BROKEN@
+# undef PRIiFAST64
+# define PRIiFAST64 PRIi64
+# endif
+#endif
+#ifdef UINT64_MAX
+# if !defined PRIoFAST64 || @PRI_MACROS_BROKEN@
+# undef PRIoFAST64
+# define PRIoFAST64 PRIo64
+# endif
+# if !defined PRIuFAST64 || @PRI_MACROS_BROKEN@
+# undef PRIuFAST64
+# define PRIuFAST64 PRIu64
+# endif
+# if !defined PRIxFAST64 || @PRI_MACROS_BROKEN@
+# undef PRIxFAST64
+# define PRIxFAST64 PRIx64
+# endif
+# if !defined PRIXFAST64 || @PRI_MACROS_BROKEN@
+# undef PRIXFAST64
+# define PRIXFAST64 PRIX64
+# endif
+#endif
+
+#if !defined PRIdMAX || @PRI_MACROS_BROKEN@
+# undef PRIdMAX
+# if @INT32_MAX_LT_INTMAX_MAX@
+# define PRIdMAX PRId64
+# else
+# define PRIdMAX "ld"
+# endif
+#endif
+#if !defined PRIiMAX || @PRI_MACROS_BROKEN@
+# undef PRIiMAX
+# if @INT32_MAX_LT_INTMAX_MAX@
+# define PRIiMAX PRIi64
+# else
+# define PRIiMAX "li"
+# endif
+#endif
+#if !defined PRIoMAX || @PRI_MACROS_BROKEN@
+# undef PRIoMAX
+# if @UINT32_MAX_LT_UINTMAX_MAX@
+# define PRIoMAX PRIo64
+# else
+# define PRIoMAX "lo"
+# endif
+#endif
+#if !defined PRIuMAX || @PRI_MACROS_BROKEN@
+# undef PRIuMAX
+# if @UINT32_MAX_LT_UINTMAX_MAX@
+# define PRIuMAX PRIu64
+# else
+# define PRIuMAX "lu"
+# endif
+#endif
+#if !defined PRIxMAX || @PRI_MACROS_BROKEN@
+# undef PRIxMAX
+# if @UINT32_MAX_LT_UINTMAX_MAX@
+# define PRIxMAX PRIx64
+# else
+# define PRIxMAX "lx"
+# endif
+#endif
+#if !defined PRIXMAX || @PRI_MACROS_BROKEN@
+# undef PRIXMAX
+# if @UINT32_MAX_LT_UINTMAX_MAX@
+# define PRIXMAX PRIX64
+# else
+# define PRIXMAX "lX"
+# endif
+#endif
+
+#if !defined PRIdPTR || @PRI_MACROS_BROKEN@
+# undef PRIdPTR
+# ifdef INTPTR_MAX
+# define PRIdPTR @PRIPTR_PREFIX@ "d"
+# endif
+#endif
+#if !defined PRIiPTR || @PRI_MACROS_BROKEN@
+# undef PRIiPTR
+# ifdef INTPTR_MAX
+# define PRIiPTR @PRIPTR_PREFIX@ "i"
+# endif
+#endif
+#if !defined PRIoPTR || @PRI_MACROS_BROKEN@
+# undef PRIoPTR
+# ifdef UINTPTR_MAX
+# define PRIoPTR @PRIPTR_PREFIX@ "o"
+# endif
+#endif
+#if !defined PRIuPTR || @PRI_MACROS_BROKEN@
+# undef PRIuPTR
+# ifdef UINTPTR_MAX
+# define PRIuPTR @PRIPTR_PREFIX@ "u"
+# endif
+#endif
+#if !defined PRIxPTR || @PRI_MACROS_BROKEN@
+# undef PRIxPTR
+# ifdef UINTPTR_MAX
+# define PRIxPTR @PRIPTR_PREFIX@ "x"
+# endif
+#endif
+#if !defined PRIXPTR || @PRI_MACROS_BROKEN@
+# undef PRIXPTR
+# ifdef UINTPTR_MAX
+# define PRIXPTR @PRIPTR_PREFIX@ "X"
+# endif
+#endif
+
+#if !defined SCNd8 || @PRI_MACROS_BROKEN@
+# undef SCNd8
+# ifdef INT8_MAX
+# define SCNd8 "hhd"
+# endif
+#endif
+#if !defined SCNi8 || @PRI_MACROS_BROKEN@
+# undef SCNi8
+# ifdef INT8_MAX
+# define SCNi8 "hhi"
+# endif
+#endif
+#if !defined SCNo8 || @PRI_MACROS_BROKEN@
+# undef SCNo8
+# ifdef UINT8_MAX
+# define SCNo8 "hho"
+# endif
+#endif
+#if !defined SCNu8 || @PRI_MACROS_BROKEN@
+# undef SCNu8
+# ifdef UINT8_MAX
+# define SCNu8 "hhu"
+# endif
+#endif
+#if !defined SCNx8 || @PRI_MACROS_BROKEN@
+# undef SCNx8
+# ifdef UINT8_MAX
+# define SCNx8 "hhx"
+# endif
+#endif
+#if !defined SCNd16 || @PRI_MACROS_BROKEN@
+# undef SCNd16
+# ifdef INT16_MAX
+# define SCNd16 "hd"
+# endif
+#endif
+#if !defined SCNi16 || @PRI_MACROS_BROKEN@
+# undef SCNi16
+# ifdef INT16_MAX
+# define SCNi16 "hi"
+# endif
+#endif
+#if !defined SCNo16 || @PRI_MACROS_BROKEN@
+# undef SCNo16
+# ifdef UINT16_MAX
+# define SCNo16 "ho"
+# endif
+#endif
+#if !defined SCNu16 || @PRI_MACROS_BROKEN@
+# undef SCNu16
+# ifdef UINT16_MAX
+# define SCNu16 "hu"
+# endif
+#endif
+#if !defined SCNx16 || @PRI_MACROS_BROKEN@
+# undef SCNx16
+# ifdef UINT16_MAX
+# define SCNx16 "hx"
+# endif
+#endif
+#if !defined SCNd32 || @PRI_MACROS_BROKEN@
+# undef SCNd32
+# ifdef INT32_MAX
+# define SCNd32 "d"
+# endif
+#endif
+#if !defined SCNi32 || @PRI_MACROS_BROKEN@
+# undef SCNi32
+# ifdef INT32_MAX
+# define SCNi32 "i"
+# endif
+#endif
+#if !defined SCNo32 || @PRI_MACROS_BROKEN@
+# undef SCNo32
+# ifdef UINT32_MAX
+# define SCNo32 "o"
+# endif
+#endif
+#if !defined SCNu32 || @PRI_MACROS_BROKEN@
+# undef SCNu32
+# ifdef UINT32_MAX
+# define SCNu32 "u"
+# endif
+#endif
+#if !defined SCNx32 || @PRI_MACROS_BROKEN@
+# undef SCNx32
+# ifdef UINT32_MAX
+# define SCNx32 "x"
+# endif
+#endif
+#ifdef INT64_MAX
+# if (@APPLE_UNIVERSAL_BUILD@ ? defined _LP64 : @INT64_MAX_EQ_LONG_MAX@)
+# define _SCN64_PREFIX "l"
+# elif defined _MSC_VER || defined __MINGW32__
+# define _SCN64_PREFIX "I64"
+# elif @HAVE_LONG_LONG_INT@ && LONG_MAX >> 30 == 1
+# define _SCN64_PREFIX _LONG_LONG_FORMAT_PREFIX
+# endif
+# if !defined SCNd64 || @PRI_MACROS_BROKEN@
+# undef SCNd64
+# define SCNd64 _SCN64_PREFIX "d"
+# endif
+# if !defined SCNi64 || @PRI_MACROS_BROKEN@
+# undef SCNi64
+# define SCNi64 _SCN64_PREFIX "i"
+# endif
+#endif
+#ifdef UINT64_MAX
+# if (@APPLE_UNIVERSAL_BUILD@ ? defined _LP64 : @UINT64_MAX_EQ_ULONG_MAX@)
+# define _SCNu64_PREFIX "l"
+# elif defined _MSC_VER || defined __MINGW32__
+# define _SCNu64_PREFIX "I64"
+# elif @HAVE_UNSIGNED_LONG_LONG_INT@ && ULONG_MAX >> 31 == 1
+# define _SCNu64_PREFIX _LONG_LONG_FORMAT_PREFIX
+# endif
+# if !defined SCNo64 || @PRI_MACROS_BROKEN@
+# undef SCNo64
+# define SCNo64 _SCNu64_PREFIX "o"
+# endif
+# if !defined SCNu64 || @PRI_MACROS_BROKEN@
+# undef SCNu64
+# define SCNu64 _SCNu64_PREFIX "u"
+# endif
+# if !defined SCNx64 || @PRI_MACROS_BROKEN@
+# undef SCNx64
+# define SCNx64 _SCNu64_PREFIX "x"
+# endif
+#endif
+
+#if !defined SCNdLEAST8 || @PRI_MACROS_BROKEN@
+# undef SCNdLEAST8
+# define SCNdLEAST8 "hhd"
+#endif
+#if !defined SCNiLEAST8 || @PRI_MACROS_BROKEN@
+# undef SCNiLEAST8
+# define SCNiLEAST8 "hhi"
+#endif
+#if !defined SCNoLEAST8 || @PRI_MACROS_BROKEN@
+# undef SCNoLEAST8
+# define SCNoLEAST8 "hho"
+#endif
+#if !defined SCNuLEAST8 || @PRI_MACROS_BROKEN@
+# undef SCNuLEAST8
+# define SCNuLEAST8 "hhu"
+#endif
+#if !defined SCNxLEAST8 || @PRI_MACROS_BROKEN@
+# undef SCNxLEAST8
+# define SCNxLEAST8 "hhx"
+#endif
+#if !defined SCNdLEAST16 || @PRI_MACROS_BROKEN@
+# undef SCNdLEAST16
+# define SCNdLEAST16 "hd"
+#endif
+#if !defined SCNiLEAST16 || @PRI_MACROS_BROKEN@
+# undef SCNiLEAST16
+# define SCNiLEAST16 "hi"
+#endif
+#if !defined SCNoLEAST16 || @PRI_MACROS_BROKEN@
+# undef SCNoLEAST16
+# define SCNoLEAST16 "ho"
+#endif
+#if !defined SCNuLEAST16 || @PRI_MACROS_BROKEN@
+# undef SCNuLEAST16
+# define SCNuLEAST16 "hu"
+#endif
+#if !defined SCNxLEAST16 || @PRI_MACROS_BROKEN@
+# undef SCNxLEAST16
+# define SCNxLEAST16 "hx"
+#endif
+#if !defined SCNdLEAST32 || @PRI_MACROS_BROKEN@
+# undef SCNdLEAST32
+# define SCNdLEAST32 "d"
+#endif
+#if !defined SCNiLEAST32 || @PRI_MACROS_BROKEN@
+# undef SCNiLEAST32
+# define SCNiLEAST32 "i"
+#endif
+#if !defined SCNoLEAST32 || @PRI_MACROS_BROKEN@
+# undef SCNoLEAST32
+# define SCNoLEAST32 "o"
+#endif
+#if !defined SCNuLEAST32 || @PRI_MACROS_BROKEN@
+# undef SCNuLEAST32
+# define SCNuLEAST32 "u"
+#endif
+#if !defined SCNxLEAST32 || @PRI_MACROS_BROKEN@
+# undef SCNxLEAST32
+# define SCNxLEAST32 "x"
+#endif
+#ifdef INT64_MAX
+# if !defined SCNdLEAST64 || @PRI_MACROS_BROKEN@
+# undef SCNdLEAST64
+# define SCNdLEAST64 SCNd64
+# endif
+# if !defined SCNiLEAST64 || @PRI_MACROS_BROKEN@
+# undef SCNiLEAST64
+# define SCNiLEAST64 SCNi64
+# endif
+#endif
+#ifdef UINT64_MAX
+# if !defined SCNoLEAST64 || @PRI_MACROS_BROKEN@
+# undef SCNoLEAST64
+# define SCNoLEAST64 SCNo64
+# endif
+# if !defined SCNuLEAST64 || @PRI_MACROS_BROKEN@
+# undef SCNuLEAST64
+# define SCNuLEAST64 SCNu64
+# endif
+# if !defined SCNxLEAST64 || @PRI_MACROS_BROKEN@
+# undef SCNxLEAST64
+# define SCNxLEAST64 SCNx64
+# endif
+#endif
+
+#if !defined SCNdFAST8 || @PRI_MACROS_BROKEN@
+# undef SCNdFAST8
+# if INT_FAST8_MAX > INT32_MAX
+# define SCNdFAST8 SCNd64
+# elif INT_FAST8_MAX == 0x7fff
+# define SCNdFAST8 "hd"
+# elif INT_FAST8_MAX == 0x7f
+# define SCNdFAST8 "hhd"
+# else
+# define SCNdFAST8 "d"
+# endif
+#endif
+#if !defined SCNiFAST8 || @PRI_MACROS_BROKEN@
+# undef SCNiFAST8
+# if INT_FAST8_MAX > INT32_MAX
+# define SCNiFAST8 SCNi64
+# elif INT_FAST8_MAX == 0x7fff
+# define SCNiFAST8 "hi"
+# elif INT_FAST8_MAX == 0x7f
+# define SCNiFAST8 "hhi"
+# else
+# define SCNiFAST8 "i"
+# endif
+#endif
+#if !defined SCNoFAST8 || @PRI_MACROS_BROKEN@
+# undef SCNoFAST8
+# if UINT_FAST8_MAX > UINT32_MAX
+# define SCNoFAST8 SCNo64
+# elif UINT_FAST8_MAX == 0xffff
+# define SCNoFAST8 "ho"
+# elif UINT_FAST8_MAX == 0xff
+# define SCNoFAST8 "hho"
+# else
+# define SCNoFAST8 "o"
+# endif
+#endif
+#if !defined SCNuFAST8 || @PRI_MACROS_BROKEN@
+# undef SCNuFAST8
+# if UINT_FAST8_MAX > UINT32_MAX
+# define SCNuFAST8 SCNu64
+# elif UINT_FAST8_MAX == 0xffff
+# define SCNuFAST8 "hu"
+# elif UINT_FAST8_MAX == 0xff
+# define SCNuFAST8 "hhu"
+# else
+# define SCNuFAST8 "u"
+# endif
+#endif
+#if !defined SCNxFAST8 || @PRI_MACROS_BROKEN@
+# undef SCNxFAST8
+# if UINT_FAST8_MAX > UINT32_MAX
+# define SCNxFAST8 SCNx64
+# elif UINT_FAST8_MAX == 0xffff
+# define SCNxFAST8 "hx"
+# elif UINT_FAST8_MAX == 0xff
+# define SCNxFAST8 "hhx"
+# else
+# define SCNxFAST8 "x"
+# endif
+#endif
+#if !defined SCNdFAST16 || @PRI_MACROS_BROKEN@
+# undef SCNdFAST16
+# if INT_FAST16_MAX > INT32_MAX
+# define SCNdFAST16 SCNd64
+# elif INT_FAST16_MAX == 0x7fff
+# define SCNdFAST16 "hd"
+# else
+# define SCNdFAST16 "d"
+# endif
+#endif
+#if !defined SCNiFAST16 || @PRI_MACROS_BROKEN@
+# undef SCNiFAST16
+# if INT_FAST16_MAX > INT32_MAX
+# define SCNiFAST16 SCNi64
+# elif INT_FAST16_MAX == 0x7fff
+# define SCNiFAST16 "hi"
+# else
+# define SCNiFAST16 "i"
+# endif
+#endif
+#if !defined SCNoFAST16 || @PRI_MACROS_BROKEN@
+# undef SCNoFAST16
+# if UINT_FAST16_MAX > UINT32_MAX
+# define SCNoFAST16 SCNo64
+# elif UINT_FAST16_MAX == 0xffff
+# define SCNoFAST16 "ho"
+# else
+# define SCNoFAST16 "o"
+# endif
+#endif
+#if !defined SCNuFAST16 || @PRI_MACROS_BROKEN@
+# undef SCNuFAST16
+# if UINT_FAST16_MAX > UINT32_MAX
+# define SCNuFAST16 SCNu64
+# elif UINT_FAST16_MAX == 0xffff
+# define SCNuFAST16 "hu"
+# else
+# define SCNuFAST16 "u"
+# endif
+#endif
+#if !defined SCNxFAST16 || @PRI_MACROS_BROKEN@
+# undef SCNxFAST16
+# if UINT_FAST16_MAX > UINT32_MAX
+# define SCNxFAST16 SCNx64
+# elif UINT_FAST16_MAX == 0xffff
+# define SCNxFAST16 "hx"
+# else
+# define SCNxFAST16 "x"
+# endif
+#endif
+#if !defined SCNdFAST32 || @PRI_MACROS_BROKEN@
+# undef SCNdFAST32
+# if INT_FAST32_MAX > INT32_MAX
+# define SCNdFAST32 SCNd64
+# else
+# define SCNdFAST32 "d"
+# endif
+#endif
+#if !defined SCNiFAST32 || @PRI_MACROS_BROKEN@
+# undef SCNiFAST32
+# if INT_FAST32_MAX > INT32_MAX
+# define SCNiFAST32 SCNi64
+# else
+# define SCNiFAST32 "i"
+# endif
+#endif
+#if !defined SCNoFAST32 || @PRI_MACROS_BROKEN@
+# undef SCNoFAST32
+# if UINT_FAST32_MAX > UINT32_MAX
+# define SCNoFAST32 SCNo64
+# else
+# define SCNoFAST32 "o"
+# endif
+#endif
+#if !defined SCNuFAST32 || @PRI_MACROS_BROKEN@
+# undef SCNuFAST32
+# if UINT_FAST32_MAX > UINT32_MAX
+# define SCNuFAST32 SCNu64
+# else
+# define SCNuFAST32 "u"
+# endif
+#endif
+#if !defined SCNxFAST32 || @PRI_MACROS_BROKEN@
+# undef SCNxFAST32
+# if UINT_FAST32_MAX > UINT32_MAX
+# define SCNxFAST32 SCNx64
+# else
+# define SCNxFAST32 "x"
+# endif
+#endif
+#ifdef INT64_MAX
+# if !defined SCNdFAST64 || @PRI_MACROS_BROKEN@
+# undef SCNdFAST64
+# define SCNdFAST64 SCNd64
+# endif
+# if !defined SCNiFAST64 || @PRI_MACROS_BROKEN@
+# undef SCNiFAST64
+# define SCNiFAST64 SCNi64
+# endif
+#endif
+#ifdef UINT64_MAX
+# if !defined SCNoFAST64 || @PRI_MACROS_BROKEN@
+# undef SCNoFAST64
+# define SCNoFAST64 SCNo64
+# endif
+# if !defined SCNuFAST64 || @PRI_MACROS_BROKEN@
+# undef SCNuFAST64
+# define SCNuFAST64 SCNu64
+# endif
+# if !defined SCNxFAST64 || @PRI_MACROS_BROKEN@
+# undef SCNxFAST64
+# define SCNxFAST64 SCNx64
+# endif
+#endif
+
+#if !defined SCNdMAX || @PRI_MACROS_BROKEN@
+# undef SCNdMAX
+# if @INT32_MAX_LT_INTMAX_MAX@
+# define SCNdMAX SCNd64
+# else
+# define SCNdMAX "ld"
+# endif
+#endif
+#if !defined SCNiMAX || @PRI_MACROS_BROKEN@
+# undef SCNiMAX
+# if @INT32_MAX_LT_INTMAX_MAX@
+# define SCNiMAX SCNi64
+# else
+# define SCNiMAX "li"
+# endif
+#endif
+#if !defined SCNoMAX || @PRI_MACROS_BROKEN@
+# undef SCNoMAX
+# if @UINT32_MAX_LT_UINTMAX_MAX@
+# define SCNoMAX SCNo64
+# else
+# define SCNoMAX "lo"
+# endif
+#endif
+#if !defined SCNuMAX || @PRI_MACROS_BROKEN@
+# undef SCNuMAX
+# if @UINT32_MAX_LT_UINTMAX_MAX@
+# define SCNuMAX SCNu64
+# else
+# define SCNuMAX "lu"
+# endif
+#endif
+#if !defined SCNxMAX || @PRI_MACROS_BROKEN@
+# undef SCNxMAX
+# if @UINT32_MAX_LT_UINTMAX_MAX@
+# define SCNxMAX SCNx64
+# else
+# define SCNxMAX "lx"
+# endif
+#endif
+
+#if !defined SCNdPTR || @PRI_MACROS_BROKEN@
+# undef SCNdPTR
+# ifdef INTPTR_MAX
+# define SCNdPTR @PRIPTR_PREFIX@ "d"
+# endif
+#endif
+#if !defined SCNiPTR || @PRI_MACROS_BROKEN@
+# undef SCNiPTR
+# ifdef INTPTR_MAX
+# define SCNiPTR @PRIPTR_PREFIX@ "i"
+# endif
+#endif
+#if !defined SCNoPTR || @PRI_MACROS_BROKEN@
+# undef SCNoPTR
+# ifdef UINTPTR_MAX
+# define SCNoPTR @PRIPTR_PREFIX@ "o"
+# endif
+#endif
+#if !defined SCNuPTR || @PRI_MACROS_BROKEN@
+# undef SCNuPTR
+# ifdef UINTPTR_MAX
+# define SCNuPTR @PRIPTR_PREFIX@ "u"
+# endif
+#endif
+#if !defined SCNxPTR || @PRI_MACROS_BROKEN@
+# undef SCNxPTR
+# ifdef UINTPTR_MAX
+# define SCNxPTR @PRIPTR_PREFIX@ "x"
+# endif
+#endif
+
+/* 7.8.2 Functions for greatest-width integer types */
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#if @GNULIB_IMAXABS@
+# if !@HAVE_DECL_IMAXABS@
+extern intmax_t imaxabs (intmax_t);
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef imaxabs
+# if HAVE_RAW_DECL_IMAXABS
+_GL_WARN_ON_USE (imaxabs, "imaxabs is unportable - "
+ "use gnulib module imaxabs for portability");
+# endif
+#endif
+
+#if @GNULIB_IMAXDIV@
+# if !@HAVE_DECL_IMAXDIV@
+# if !GNULIB_defined_imaxdiv_t
+typedef struct { intmax_t quot; intmax_t rem; } imaxdiv_t;
+# define GNULIB_defined_imaxdiv_t 1
+# endif
+extern imaxdiv_t imaxdiv (intmax_t, intmax_t);
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef imaxdiv
+# if HAVE_RAW_DECL_IMAXDIV
+_GL_WARN_ON_USE (imaxdiv, "imaxdiv is unportable - "
+ "use gnulib module imaxdiv for portability");
+# endif
+#endif
+
+#if @GNULIB_STRTOIMAX@
+# if @REPLACE_STRTOIMAX@
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# undef strtoimax
+# define strtoimax rpl_strtoimax
+# endif
+_GL_FUNCDECL_RPL (strtoimax, intmax_t,
+ (const char *, char **, int) _GL_ARG_NONNULL ((1)));
+_GL_CXXALIAS_RPL (strtoimax, intmax_t, (const char *, char **, int));
+# else
+# if !@HAVE_DECL_STRTOIMAX@
+# undef strtoimax
+_GL_FUNCDECL_SYS (strtoimax, intmax_t,
+ (const char *, char **, int) _GL_ARG_NONNULL ((1)));
+# endif
+_GL_CXXALIAS_SYS (strtoimax, intmax_t, (const char *, char **, int));
+# endif
+_GL_CXXALIASWARN (strtoimax);
+#elif defined GNULIB_POSIXCHECK
+# undef strtoimax
+# if HAVE_RAW_DECL_STRTOIMAX
+_GL_WARN_ON_USE (strtoimax, "strtoimax is unportable - "
+ "use gnulib module strtoimax for portability");
+# endif
+#endif
+
+#if @GNULIB_STRTOUMAX@
+# if @REPLACE_STRTOUMAX@
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# undef strtoumax
+# define strtoumax rpl_strtoumax
+# endif
+_GL_FUNCDECL_RPL (strtoumax, uintmax_t,
+ (const char *, char **, int) _GL_ARG_NONNULL ((1)));
+_GL_CXXALIAS_RPL (strtoumax, uintmax_t, (const char *, char **, int));
+# else
+# if !@HAVE_DECL_STRTOUMAX@
+# undef strtoumax
+_GL_FUNCDECL_SYS (strtoumax, uintmax_t,
+ (const char *, char **, int) _GL_ARG_NONNULL ((1)));
+# endif
+_GL_CXXALIAS_SYS (strtoumax, uintmax_t, (const char *, char **, int));
+# endif
+_GL_CXXALIASWARN (strtoumax);
+#elif defined GNULIB_POSIXCHECK
+# undef strtoumax
+# if HAVE_RAW_DECL_STRTOUMAX
+_GL_WARN_ON_USE (strtoumax, "strtoumax is unportable - "
+ "use gnulib module strtoumax for portability");
+# endif
+#endif
+
+/* Don't bother defining or declaring wcstoimax and wcstoumax, since
+ wide-character functions like this are hardly ever useful. */
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* !defined INTTYPES_H && !defined _GL_JUST_INCLUDE_SYSTEM_INTTYPES_H */
diff --git a/gnulib-tests/link.c b/gnulib-tests/link.c
new file mode 100644
index 0000000..b8d7caa
--- /dev/null
+++ b/gnulib-tests/link.c
@@ -0,0 +1,211 @@
+/* Emulate link on platforms that lack it, namely native Windows platforms.
+
+ Copyright (C) 2009-2016 Free Software Foundation, Inc.
+
+ This 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 <http://www.gnu.org/licenses/>. */
+
+#include <config.h>
+
+#include <unistd.h>
+
+#include <errno.h>
+#include <stdlib.h>
+#include <string.h>
+#include <sys/stat.h>
+
+#if !HAVE_LINK
+# if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
+
+# define WIN32_LEAN_AND_MEAN
+# include <windows.h>
+
+/* CreateHardLink was introduced only in Windows 2000. */
+typedef BOOL (WINAPI * CreateHardLinkFuncType) (LPCTSTR lpFileName,
+ LPCTSTR lpExistingFileName,
+ LPSECURITY_ATTRIBUTES lpSecurityAttributes);
+static CreateHardLinkFuncType CreateHardLinkFunc = NULL;
+static BOOL initialized = FALSE;
+
+static void
+initialize (void)
+{
+ HMODULE kernel32 = GetModuleHandle ("kernel32.dll");
+ if (kernel32 != NULL)
+ {
+ CreateHardLinkFunc =
+ (CreateHardLinkFuncType) GetProcAddress (kernel32, "CreateHardLinkA");
+ }
+ initialized = TRUE;
+}
+
+int
+link (const char *file1, const char *file2)
+{
+ char *dir;
+ size_t len1 = strlen (file1);
+ size_t len2 = strlen (file2);
+ if (!initialized)
+ initialize ();
+ if (CreateHardLinkFunc == NULL)
+ {
+ /* System does not support hard links. */
+ errno = EPERM;
+ return -1;
+ }
+ /* Reject trailing slashes on non-directories; mingw does not
+ support hard-linking directories. */
+ if ((len1 && (file1[len1 - 1] == '/' || file1[len1 - 1] == '\\'))
+ || (len2 && (file2[len2 - 1] == '/' || file2[len2 - 1] == '\\')))
+ {
+ struct stat st;
+ if (stat (file1, &st) == 0 && S_ISDIR (st.st_mode))
+ errno = EPERM;
+ else
+ errno = ENOTDIR;
+ return -1;
+ }
+ /* CreateHardLink("b/.","a",NULL) creates file "b", so we must check
+ that dirname(file2) exists. */
+ dir = strdup (file2);
+ if (!dir)
+ return -1;
+ {
+ struct stat st;
+ char *p = strchr (dir, '\0');
+ while (dir < p && (*--p != '/' && *p != '\\'));
+ *p = '\0';
+ if (p != dir && stat (dir, &st) == -1)
+ {
+ int saved_errno = errno;
+ free (dir);
+ errno = saved_errno;
+ return -1;
+ }
+ free (dir);
+ }
+ /* Now create the link. */
+ if (CreateHardLinkFunc (file2, file1, NULL) == 0)
+ {
+ /* It is not documented which errors CreateHardLink() can produce.
+ * The following conversions are based on tests on a Windows XP SP2
+ * system. */
+ DWORD err = GetLastError ();
+ switch (err)
+ {
+ case ERROR_ACCESS_DENIED:
+ errno = EACCES;
+ break;
+
+ case ERROR_INVALID_FUNCTION: /* fs does not support hard links */
+ errno = EPERM;
+ break;
+
+ case ERROR_NOT_SAME_DEVICE:
+ errno = EXDEV;
+ break;
+
+ case ERROR_PATH_NOT_FOUND:
+ case ERROR_FILE_NOT_FOUND:
+ errno = ENOENT;
+ break;
+
+ case ERROR_INVALID_PARAMETER:
+ errno = ENAMETOOLONG;
+ break;
+
+ case ERROR_TOO_MANY_LINKS:
+ errno = EMLINK;
+ break;
+
+ case ERROR_ALREADY_EXISTS:
+ errno = EEXIST;
+ break;
+
+ default:
+ errno = EIO;
+ }
+ return -1;
+ }
+
+ return 0;
+}
+
+# else /* !Windows */
+
+# error "This platform lacks a link function, and Gnulib doesn't provide a replacement. This is a bug in Gnulib."
+
+# endif /* !Windows */
+#else /* HAVE_LINK */
+
+# undef link
+
+/* Create a hard link from FILE1 to FILE2, working around platform bugs. */
+int
+rpl_link (char const *file1, char const *file2)
+{
+ size_t len1;
+ size_t len2;
+ struct stat st;
+
+ /* Don't allow IRIX to dereference dangling file2 symlink. */
+ if (!lstat (file2, &st))
+ {
+ errno = EEXIST;
+ return -1;
+ }
+
+ /* Reject trailing slashes on non-directories. */
+ len1 = strlen (file1);
+ len2 = strlen (file2);
+ if ((len1 && file1[len1 - 1] == '/')
+ || (len2 && file2[len2 - 1] == '/'))
+ {
+ /* Let link() decide whether hard-linking directories is legal.
+ If stat() fails, then link() should fail for the same reason
+ (although on Solaris 9, link("file/","oops") mistakenly
+ succeeds); if stat() succeeds, require a directory. */
+ if (stat (file1, &st))
+ return -1;
+ if (!S_ISDIR (st.st_mode))
+ {
+ errno = ENOTDIR;
+ return -1;
+ }
+ }
+ else
+ {
+ /* Fix Cygwin 1.5.x bug where link("a","b/.") creates file "b". */
+ char *dir = strdup (file2);
+ char *p;
+ if (!dir)
+ return -1;
+ /* We already know file2 does not end in slash. Strip off the
+ basename, then check that the dirname exists. */
+ p = strrchr (dir, '/');
+ if (p)
+ {
+ *p = '\0';
+ if (stat (dir, &st) == -1)
+ {
+ int saved_errno = errno;
+ free (dir);
+ errno = saved_errno;
+ return -1;
+ }
+ }
+ free (dir);
+ }
+ return link (file1, file2);
+}
+#endif /* HAVE_LINK */
diff --git a/gnulib-tests/localename.c b/gnulib-tests/localename.c
new file mode 100644
index 0000000..849e2d9
--- /dev/null
+++ b/gnulib-tests/localename.c
@@ -0,0 +1,2971 @@
+/* Determine name of the currently selected locale.
+ Copyright (C) 1995-2016 Free Software Foundation, Inc.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+/* Written by Ulrich Drepper <drepper@gnu.org>, 1995. */
+/* Native Windows code written by Tor Lillqvist <tml@iki.fi>. */
+/* Mac OS X code written by Bruno Haible <bruno@clisp.org>. */
+
+#include <config.h>
+
+/* Specification. */
+#ifdef IN_LIBINTL
+# include "gettextP.h"
+#else
+# include "localename.h"
+#endif
+
+#include <limits.h>
+#include <stddef.h>
+#include <stdlib.h>
+#include <locale.h>
+#include <string.h>
+
+#include "flexmember.h"
+
+#if HAVE_USELOCALE
+/* Mac OS X 10.5 defines the locale_t type in <xlocale.h>. */
+# if defined __APPLE__ && defined __MACH__
+# include <xlocale.h>
+# endif
+# if __GLIBC__ >= 2 && !defined __UCLIBC__
+# include <langinfo.h>
+# endif
+# if !defined IN_LIBINTL
+# include "glthread/lock.h"
+# endif
+# if defined __sun && HAVE_GETLOCALENAME_L
+/* Solaris >= 12. */
+extern char * getlocalename_l(int, locale_t);
+# endif
+#endif
+
+#if HAVE_CFLOCALECOPYCURRENT || HAVE_CFPREFERENCESCOPYAPPVALUE
+# include <CoreFoundation/CFString.h>
+# if HAVE_CFLOCALECOPYCURRENT
+# include <CoreFoundation/CFLocale.h>
+# elif HAVE_CFPREFERENCESCOPYAPPVALUE
+# include <CoreFoundation/CFPreferences.h>
+# endif
+#endif
+
+#if defined _WIN32 || defined __WIN32__
+# define WINDOWS_NATIVE
+# if !defined IN_LIBINTL
+# include "glthread/lock.h"
+# endif
+#endif
+
+#if defined WINDOWS_NATIVE || defined __CYGWIN__ /* Native Windows or Cygwin */
+# define WIN32_LEAN_AND_MEAN
+# include <windows.h>
+# include <winnls.h>
+/* List of language codes, sorted by value:
+ 0x01 LANG_ARABIC
+ 0x02 LANG_BULGARIAN
+ 0x03 LANG_CATALAN
+ 0x04 LANG_CHINESE
+ 0x05 LANG_CZECH
+ 0x06 LANG_DANISH
+ 0x07 LANG_GERMAN
+ 0x08 LANG_GREEK
+ 0x09 LANG_ENGLISH
+ 0x0a LANG_SPANISH
+ 0x0b LANG_FINNISH
+ 0x0c LANG_FRENCH
+ 0x0d LANG_HEBREW
+ 0x0e LANG_HUNGARIAN
+ 0x0f LANG_ICELANDIC
+ 0x10 LANG_ITALIAN
+ 0x11 LANG_JAPANESE
+ 0x12 LANG_KOREAN
+ 0x13 LANG_DUTCH
+ 0x14 LANG_NORWEGIAN
+ 0x15 LANG_POLISH
+ 0x16 LANG_PORTUGUESE
+ 0x17 LANG_ROMANSH
+ 0x18 LANG_ROMANIAN
+ 0x19 LANG_RUSSIAN
+ 0x1a LANG_CROATIAN == LANG_SERBIAN
+ 0x1b LANG_SLOVAK
+ 0x1c LANG_ALBANIAN
+ 0x1d LANG_SWEDISH
+ 0x1e LANG_THAI
+ 0x1f LANG_TURKISH
+ 0x20 LANG_URDU
+ 0x21 LANG_INDONESIAN
+ 0x22 LANG_UKRAINIAN
+ 0x23 LANG_BELARUSIAN
+ 0x24 LANG_SLOVENIAN
+ 0x25 LANG_ESTONIAN
+ 0x26 LANG_LATVIAN
+ 0x27 LANG_LITHUANIAN
+ 0x28 LANG_TAJIK
+ 0x29 LANG_FARSI
+ 0x2a LANG_VIETNAMESE
+ 0x2b LANG_ARMENIAN
+ 0x2c LANG_AZERI
+ 0x2d LANG_BASQUE
+ 0x2e LANG_SORBIAN
+ 0x2f LANG_MACEDONIAN
+ 0x30 LANG_SUTU
+ 0x31 LANG_TSONGA
+ 0x32 LANG_TSWANA
+ 0x33 LANG_VENDA
+ 0x34 LANG_XHOSA
+ 0x35 LANG_ZULU
+ 0x36 LANG_AFRIKAANS
+ 0x37 LANG_GEORGIAN
+ 0x38 LANG_FAEROESE
+ 0x39 LANG_HINDI
+ 0x3a LANG_MALTESE
+ 0x3b LANG_SAMI
+ 0x3c LANG_GAELIC
+ 0x3d LANG_YIDDISH
+ 0x3e LANG_MALAY
+ 0x3f LANG_KAZAK
+ 0x40 LANG_KYRGYZ
+ 0x41 LANG_SWAHILI
+ 0x42 LANG_TURKMEN
+ 0x43 LANG_UZBEK
+ 0x44 LANG_TATAR
+ 0x45 LANG_BENGALI
+ 0x46 LANG_PUNJABI
+ 0x47 LANG_GUJARATI
+ 0x48 LANG_ORIYA
+ 0x49 LANG_TAMIL
+ 0x4a LANG_TELUGU
+ 0x4b LANG_KANNADA
+ 0x4c LANG_MALAYALAM
+ 0x4d LANG_ASSAMESE
+ 0x4e LANG_MARATHI
+ 0x4f LANG_SANSKRIT
+ 0x50 LANG_MONGOLIAN
+ 0x51 LANG_TIBETAN
+ 0x52 LANG_WELSH
+ 0x53 LANG_CAMBODIAN
+ 0x54 LANG_LAO
+ 0x55 LANG_BURMESE
+ 0x56 LANG_GALICIAN
+ 0x57 LANG_KONKANI
+ 0x58 LANG_MANIPURI
+ 0x59 LANG_SINDHI
+ 0x5a LANG_SYRIAC
+ 0x5b LANG_SINHALESE
+ 0x5c LANG_CHEROKEE
+ 0x5d LANG_INUKTITUT
+ 0x5e LANG_AMHARIC
+ 0x5f LANG_TAMAZIGHT
+ 0x60 LANG_KASHMIRI
+ 0x61 LANG_NEPALI
+ 0x62 LANG_FRISIAN
+ 0x63 LANG_PASHTO
+ 0x64 LANG_TAGALOG
+ 0x65 LANG_DIVEHI
+ 0x66 LANG_EDO
+ 0x67 LANG_FULFULDE
+ 0x68 LANG_HAUSA
+ 0x69 LANG_IBIBIO
+ 0x6a LANG_YORUBA
+ 0x6d LANG_BASHKIR
+ 0x6e LANG_LUXEMBOURGISH
+ 0x6f LANG_GREENLANDIC
+ 0x70 LANG_IGBO
+ 0x71 LANG_KANURI
+ 0x72 LANG_OROMO
+ 0x73 LANG_TIGRINYA
+ 0x74 LANG_GUARANI
+ 0x75 LANG_HAWAIIAN
+ 0x76 LANG_LATIN
+ 0x77 LANG_SOMALI
+ 0x78 LANG_YI
+ 0x79 LANG_PAPIAMENTU
+ 0x7a LANG_MAPUDUNGUN
+ 0x7c LANG_MOHAWK
+ 0x7e LANG_BRETON
+ 0x82 LANG_OCCITAN
+ 0x83 LANG_CORSICAN
+ 0x84 LANG_ALSATIAN
+ 0x85 LANG_YAKUT
+ 0x86 LANG_KICHE
+ 0x87 LANG_KINYARWANDA
+ 0x88 LANG_WOLOF
+ 0x8c LANG_DARI
+ 0x91 LANG_SCOTTISH_GAELIC
+*/
+/* Mingw headers don't have latest language and sublanguage codes. */
+# ifndef LANG_AFRIKAANS
+# define LANG_AFRIKAANS 0x36
+# endif
+# ifndef LANG_ALBANIAN
+# define LANG_ALBANIAN 0x1c
+# endif
+# ifndef LANG_ALSATIAN
+# define LANG_ALSATIAN 0x84
+# endif
+# ifndef LANG_AMHARIC
+# define LANG_AMHARIC 0x5e
+# endif
+# ifndef LANG_ARABIC
+# define LANG_ARABIC 0x01
+# endif
+# ifndef LANG_ARMENIAN
+# define LANG_ARMENIAN 0x2b
+# endif
+# ifndef LANG_ASSAMESE
+# define LANG_ASSAMESE 0x4d
+# endif
+# ifndef LANG_AZERI
+# define LANG_AZERI 0x2c
+# endif
+# ifndef LANG_BASHKIR
+# define LANG_BASHKIR 0x6d
+# endif
+# ifndef LANG_BASQUE
+# define LANG_BASQUE 0x2d
+# endif
+# ifndef LANG_BELARUSIAN
+# define LANG_BELARUSIAN 0x23
+# endif
+# ifndef LANG_BENGALI
+# define LANG_BENGALI 0x45
+# endif
+# ifndef LANG_BRETON
+# define LANG_BRETON 0x7e
+# endif
+# ifndef LANG_BURMESE
+# define LANG_BURMESE 0x55
+# endif
+# ifndef LANG_CAMBODIAN
+# define LANG_CAMBODIAN 0x53
+# endif
+# ifndef LANG_CATALAN
+# define LANG_CATALAN 0x03
+# endif
+# ifndef LANG_CHEROKEE
+# define LANG_CHEROKEE 0x5c
+# endif
+# ifndef LANG_CORSICAN
+# define LANG_CORSICAN 0x83
+# endif
+# ifndef LANG_DARI
+# define LANG_DARI 0x8c
+# endif
+# ifndef LANG_DIVEHI
+# define LANG_DIVEHI 0x65
+# endif
+# ifndef LANG_EDO
+# define LANG_EDO 0x66
+# endif
+# ifndef LANG_ESTONIAN
+# define LANG_ESTONIAN 0x25
+# endif
+# ifndef LANG_FAEROESE
+# define LANG_FAEROESE 0x38
+# endif
+# ifndef LANG_FARSI
+# define LANG_FARSI 0x29
+# endif
+# ifndef LANG_FRISIAN
+# define LANG_FRISIAN 0x62
+# endif
+# ifndef LANG_FULFULDE
+# define LANG_FULFULDE 0x67
+# endif
+# ifndef LANG_GAELIC
+# define LANG_GAELIC 0x3c
+# endif
+# ifndef LANG_GALICIAN
+# define LANG_GALICIAN 0x56
+# endif
+# ifndef LANG_GEORGIAN
+# define LANG_GEORGIAN 0x37
+# endif
+# ifndef LANG_GREENLANDIC
+# define LANG_GREENLANDIC 0x6f
+# endif
+# ifndef LANG_GUARANI
+# define LANG_GUARANI 0x74
+# endif
+# ifndef LANG_GUJARATI
+# define LANG_GUJARATI 0x47
+# endif
+# ifndef LANG_HAUSA
+# define LANG_HAUSA 0x68
+# endif
+# ifndef LANG_HAWAIIAN
+# define LANG_HAWAIIAN 0x75
+# endif
+# ifndef LANG_HEBREW
+# define LANG_HEBREW 0x0d
+# endif
+# ifndef LANG_HINDI
+# define LANG_HINDI 0x39
+# endif
+# ifndef LANG_IBIBIO
+# define LANG_IBIBIO 0x69
+# endif
+# ifndef LANG_IGBO
+# define LANG_IGBO 0x70
+# endif
+# ifndef LANG_INDONESIAN
+# define LANG_INDONESIAN 0x21
+# endif
+# ifndef LANG_INUKTITUT
+# define LANG_INUKTITUT 0x5d
+# endif
+# ifndef LANG_KANNADA
+# define LANG_KANNADA 0x4b
+# endif
+# ifndef LANG_KANURI
+# define LANG_KANURI 0x71
+# endif
+# ifndef LANG_KASHMIRI
+# define LANG_KASHMIRI 0x60
+# endif
+# ifndef LANG_KAZAK
+# define LANG_KAZAK 0x3f
+# endif
+# ifndef LANG_KICHE
+# define LANG_KICHE 0x86
+# endif
+# ifndef LANG_KINYARWANDA
+# define LANG_KINYARWANDA 0x87
+# endif
+# ifndef LANG_KONKANI
+# define LANG_KONKANI 0x57
+# endif
+# ifndef LANG_KYRGYZ
+# define LANG_KYRGYZ 0x40
+# endif
+# ifndef LANG_LAO
+# define LANG_LAO 0x54
+# endif
+# ifndef LANG_LATIN
+# define LANG_LATIN 0x76
+# endif
+# ifndef LANG_LATVIAN
+# define LANG_LATVIAN 0x26
+# endif
+# ifndef LANG_LITHUANIAN
+# define LANG_LITHUANIAN 0x27
+# endif
+# ifndef LANG_LUXEMBOURGISH
+# define LANG_LUXEMBOURGISH 0x6e
+# endif
+# ifndef LANG_MACEDONIAN
+# define LANG_MACEDONIAN 0x2f
+# endif
+# ifndef LANG_MALAY
+# define LANG_MALAY 0x3e
+# endif
+# ifndef LANG_MALAYALAM
+# define LANG_MALAYALAM 0x4c
+# endif
+# ifndef LANG_MALTESE
+# define LANG_MALTESE 0x3a
+# endif
+# ifndef LANG_MANIPURI
+# define LANG_MANIPURI 0x58
+# endif
+# ifndef LANG_MAORI
+# define LANG_MAORI 0x81
+# endif
+# ifndef LANG_MAPUDUNGUN
+# define LANG_MAPUDUNGUN 0x7a
+# endif
+# ifndef LANG_MARATHI
+# define LANG_MARATHI 0x4e
+# endif
+# ifndef LANG_MOHAWK
+# define LANG_MOHAWK 0x7c
+# endif
+# ifndef LANG_MONGOLIAN
+# define LANG_MONGOLIAN 0x50
+# endif
+# ifndef LANG_NEPALI
+# define LANG_NEPALI 0x61
+# endif
+# ifndef LANG_OCCITAN
+# define LANG_OCCITAN 0x82
+# endif
+# ifndef LANG_ORIYA
+# define LANG_ORIYA 0x48
+# endif
+# ifndef LANG_OROMO
+# define LANG_OROMO 0x72
+# endif
+# ifndef LANG_PAPIAMENTU
+# define LANG_PAPIAMENTU 0x79
+# endif
+# ifndef LANG_PASHTO
+# define LANG_PASHTO 0x63
+# endif
+# ifndef LANG_PUNJABI
+# define LANG_PUNJABI 0x46
+# endif
+# ifndef LANG_QUECHUA
+# define LANG_QUECHUA 0x6b
+# endif
+# ifndef LANG_ROMANSH
+# define LANG_ROMANSH 0x17
+# endif
+# ifndef LANG_SAMI
+# define LANG_SAMI 0x3b
+# endif
+# ifndef LANG_SANSKRIT
+# define LANG_SANSKRIT 0x4f
+# endif
+# ifndef LANG_SCOTTISH_GAELIC
+# define LANG_SCOTTISH_GAELIC 0x91
+# endif
+# ifndef LANG_SERBIAN
+# define LANG_SERBIAN 0x1a
+# endif
+# ifndef LANG_SINDHI
+# define LANG_SINDHI 0x59
+# endif
+# ifndef LANG_SINHALESE
+# define LANG_SINHALESE 0x5b
+# endif
+# ifndef LANG_SLOVAK
+# define LANG_SLOVAK 0x1b
+# endif
+# ifndef LANG_SOMALI
+# define LANG_SOMALI 0x77
+# endif
+# ifndef LANG_SORBIAN
+# define LANG_SORBIAN 0x2e
+# endif
+# ifndef LANG_SOTHO
+# define LANG_SOTHO 0x6c
+# endif
+# ifndef LANG_SUTU
+# define LANG_SUTU 0x30
+# endif
+# ifndef LANG_SWAHILI
+# define LANG_SWAHILI 0x41
+# endif
+# ifndef LANG_SYRIAC
+# define LANG_SYRIAC 0x5a
+# endif
+# ifndef LANG_TAGALOG
+# define LANG_TAGALOG 0x64
+# endif
+# ifndef LANG_TAJIK
+# define LANG_TAJIK 0x28
+# endif
+# ifndef LANG_TAMAZIGHT
+# define LANG_TAMAZIGHT 0x5f
+# endif
+# ifndef LANG_TAMIL
+# define LANG_TAMIL 0x49
+# endif
+# ifndef LANG_TATAR
+# define LANG_TATAR 0x44
+# endif
+# ifndef LANG_TELUGU
+# define LANG_TELUGU 0x4a
+# endif
+# ifndef LANG_THAI
+# define LANG_THAI 0x1e
+# endif
+# ifndef LANG_TIBETAN
+# define LANG_TIBETAN 0x51
+# endif
+# ifndef LANG_TIGRINYA
+# define LANG_TIGRINYA 0x73
+# endif
+# ifndef LANG_TSONGA
+# define LANG_TSONGA 0x31
+# endif
+# ifndef LANG_TSWANA
+# define LANG_TSWANA 0x32
+# endif
+# ifndef LANG_TURKMEN
+# define LANG_TURKMEN 0x42
+# endif
+# ifndef LANG_UIGHUR
+# define LANG_UIGHUR 0x80
+# endif
+# ifndef LANG_UKRAINIAN
+# define LANG_UKRAINIAN 0x22
+# endif
+# ifndef LANG_URDU
+# define LANG_URDU 0x20
+# endif
+# ifndef LANG_UZBEK
+# define LANG_UZBEK 0x43
+# endif
+# ifndef LANG_VENDA
+# define LANG_VENDA 0x33
+# endif
+# ifndef LANG_VIETNAMESE
+# define LANG_VIETNAMESE 0x2a
+# endif
+# ifndef LANG_WELSH
+# define LANG_WELSH 0x52
+# endif
+# ifndef LANG_WOLOF
+# define LANG_WOLOF 0x88
+# endif
+# ifndef LANG_XHOSA
+# define LANG_XHOSA 0x34
+# endif
+# ifndef LANG_YAKUT
+# define LANG_YAKUT 0x85
+# endif
+# ifndef LANG_YI
+# define LANG_YI 0x78
+# endif
+# ifndef LANG_YIDDISH
+# define LANG_YIDDISH 0x3d
+# endif
+# ifndef LANG_YORUBA
+# define LANG_YORUBA 0x6a
+# endif
+# ifndef LANG_ZULU
+# define LANG_ZULU 0x35
+# endif
+# ifndef SUBLANG_AFRIKAANS_SOUTH_AFRICA
+# define SUBLANG_AFRIKAANS_SOUTH_AFRICA 0x01
+# endif
+# ifndef SUBLANG_ALBANIAN_ALBANIA
+# define SUBLANG_ALBANIAN_ALBANIA 0x01
+# endif
+# ifndef SUBLANG_ALSATIAN_FRANCE
+# define SUBLANG_ALSATIAN_FRANCE 0x01
+# endif
+# ifndef SUBLANG_AMHARIC_ETHIOPIA
+# define SUBLANG_AMHARIC_ETHIOPIA 0x01
+# endif
+# ifndef SUBLANG_ARABIC_SAUDI_ARABIA
+# define SUBLANG_ARABIC_SAUDI_ARABIA 0x01
+# endif
+# ifndef SUBLANG_ARABIC_IRAQ
+# define SUBLANG_ARABIC_IRAQ 0x02
+# endif
+# ifndef SUBLANG_ARABIC_EGYPT
+# define SUBLANG_ARABIC_EGYPT 0x03
+# endif
+# ifndef SUBLANG_ARABIC_LIBYA
+# define SUBLANG_ARABIC_LIBYA 0x04
+# endif
+# ifndef SUBLANG_ARABIC_ALGERIA
+# define SUBLANG_ARABIC_ALGERIA 0x05
+# endif
+# ifndef SUBLANG_ARABIC_MOROCCO
+# define SUBLANG_ARABIC_MOROCCO 0x06
+# endif
+# ifndef SUBLANG_ARABIC_TUNISIA
+# define SUBLANG_ARABIC_TUNISIA 0x07
+# endif
+# ifndef SUBLANG_ARABIC_OMAN
+# define SUBLANG_ARABIC_OMAN 0x08
+# endif
+# ifndef SUBLANG_ARABIC_YEMEN
+# define SUBLANG_ARABIC_YEMEN 0x09
+# endif
+# ifndef SUBLANG_ARABIC_SYRIA
+# define SUBLANG_ARABIC_SYRIA 0x0a
+# endif
+# ifndef SUBLANG_ARABIC_JORDAN
+# define SUBLANG_ARABIC_JORDAN 0x0b
+# endif
+# ifndef SUBLANG_ARABIC_LEBANON
+# define SUBLANG_ARABIC_LEBANON 0x0c
+# endif
+# ifndef SUBLANG_ARABIC_KUWAIT
+# define SUBLANG_ARABIC_KUWAIT 0x0d
+# endif
+# ifndef SUBLANG_ARABIC_UAE
+# define SUBLANG_ARABIC_UAE 0x0e
+# endif
+# ifndef SUBLANG_ARABIC_BAHRAIN
+# define SUBLANG_ARABIC_BAHRAIN 0x0f
+# endif
+# ifndef SUBLANG_ARABIC_QATAR
+# define SUBLANG_ARABIC_QATAR 0x10
+# endif
+# ifndef SUBLANG_ARMENIAN_ARMENIA
+# define SUBLANG_ARMENIAN_ARMENIA 0x01
+# endif
+# ifndef SUBLANG_ASSAMESE_INDIA
+# define SUBLANG_ASSAMESE_INDIA 0x01
+# endif
+# ifndef SUBLANG_AZERI_LATIN
+# define SUBLANG_AZERI_LATIN 0x01
+# endif
+# ifndef SUBLANG_AZERI_CYRILLIC
+# define SUBLANG_AZERI_CYRILLIC 0x02
+# endif
+# ifndef SUBLANG_BASHKIR_RUSSIA
+# define SUBLANG_BASHKIR_RUSSIA 0x01
+# endif
+# ifndef SUBLANG_BASQUE_BASQUE
+# define SUBLANG_BASQUE_BASQUE 0x01
+# endif
+# ifndef SUBLANG_BELARUSIAN_BELARUS
+# define SUBLANG_BELARUSIAN_BELARUS 0x01
+# endif
+# ifndef SUBLANG_BENGALI_INDIA
+# define SUBLANG_BENGALI_INDIA 0x01
+# endif
+# ifndef SUBLANG_BENGALI_BANGLADESH
+# define SUBLANG_BENGALI_BANGLADESH 0x02
+# endif
+# ifndef SUBLANG_BOSNIAN_BOSNIA_HERZEGOVINA_LATIN
+# define SUBLANG_BOSNIAN_BOSNIA_HERZEGOVINA_LATIN 0x05
+# endif
+# ifndef SUBLANG_BOSNIAN_BOSNIA_HERZEGOVINA_CYRILLIC
+# define SUBLANG_BOSNIAN_BOSNIA_HERZEGOVINA_CYRILLIC 0x08
+# endif
+# ifndef SUBLANG_BRETON_FRANCE
+# define SUBLANG_BRETON_FRANCE 0x01
+# endif
+# ifndef SUBLANG_BULGARIAN_BULGARIA
+# define SUBLANG_BULGARIAN_BULGARIA 0x01
+# endif
+# ifndef SUBLANG_CAMBODIAN_CAMBODIA
+# define SUBLANG_CAMBODIAN_CAMBODIA 0x01
+# endif
+# ifndef SUBLANG_CATALAN_SPAIN
+# define SUBLANG_CATALAN_SPAIN 0x01
+# endif
+# ifndef SUBLANG_CORSICAN_FRANCE
+# define SUBLANG_CORSICAN_FRANCE 0x01
+# endif
+# ifndef SUBLANG_CROATIAN_CROATIA
+# define SUBLANG_CROATIAN_CROATIA 0x01
+# endif
+# ifndef SUBLANG_CROATIAN_BOSNIA_HERZEGOVINA_LATIN
+# define SUBLANG_CROATIAN_BOSNIA_HERZEGOVINA_LATIN 0x04
+# endif
+# ifndef SUBLANG_CHINESE_MACAU
+# define SUBLANG_CHINESE_MACAU 0x05
+# endif
+# ifndef SUBLANG_CZECH_CZECH_REPUBLIC
+# define SUBLANG_CZECH_CZECH_REPUBLIC 0x01
+# endif
+# ifndef SUBLANG_DANISH_DENMARK
+# define SUBLANG_DANISH_DENMARK 0x01
+# endif
+# ifndef SUBLANG_DARI_AFGHANISTAN
+# define SUBLANG_DARI_AFGHANISTAN 0x01
+# endif
+# ifndef SUBLANG_DIVEHI_MALDIVES
+# define SUBLANG_DIVEHI_MALDIVES 0x01
+# endif
+# ifndef SUBLANG_DUTCH_SURINAM
+# define SUBLANG_DUTCH_SURINAM 0x03
+# endif
+# ifndef SUBLANG_ENGLISH_SOUTH_AFRICA
+# define SUBLANG_ENGLISH_SOUTH_AFRICA 0x07
+# endif
+# ifndef SUBLANG_ENGLISH_JAMAICA
+# define SUBLANG_ENGLISH_JAMAICA 0x08
+# endif
+# ifndef SUBLANG_ENGLISH_CARIBBEAN
+# define SUBLANG_ENGLISH_CARIBBEAN 0x09
+# endif
+# ifndef SUBLANG_ENGLISH_BELIZE
+# define SUBLANG_ENGLISH_BELIZE 0x0a
+# endif
+# ifndef SUBLANG_ENGLISH_TRINIDAD
+# define SUBLANG_ENGLISH_TRINIDAD 0x0b
+# endif
+# ifndef SUBLANG_ENGLISH_ZIMBABWE
+# define SUBLANG_ENGLISH_ZIMBABWE 0x0c
+# endif
+# ifndef SUBLANG_ENGLISH_PHILIPPINES
+# define SUBLANG_ENGLISH_PHILIPPINES 0x0d
+# endif
+# ifndef SUBLANG_ENGLISH_INDONESIA
+# define SUBLANG_ENGLISH_INDONESIA 0x0e
+# endif
+# ifndef SUBLANG_ENGLISH_HONGKONG
+# define SUBLANG_ENGLISH_HONGKONG 0x0f
+# endif
+# ifndef SUBLANG_ENGLISH_INDIA
+# define SUBLANG_ENGLISH_INDIA 0x10
+# endif
+# ifndef SUBLANG_ENGLISH_MALAYSIA
+# define SUBLANG_ENGLISH_MALAYSIA 0x11
+# endif
+# ifndef SUBLANG_ENGLISH_SINGAPORE
+# define SUBLANG_ENGLISH_SINGAPORE 0x12
+# endif
+# ifndef SUBLANG_ESTONIAN_ESTONIA
+# define SUBLANG_ESTONIAN_ESTONIA 0x01
+# endif
+# ifndef SUBLANG_FAEROESE_FAROE_ISLANDS
+# define SUBLANG_FAEROESE_FAROE_ISLANDS 0x01
+# endif
+# ifndef SUBLANG_FARSI_IRAN
+# define SUBLANG_FARSI_IRAN 0x01
+# endif
+# ifndef SUBLANG_FINNISH_FINLAND
+# define SUBLANG_FINNISH_FINLAND 0x01
+# endif
+# ifndef SUBLANG_FRENCH_LUXEMBOURG
+# define SUBLANG_FRENCH_LUXEMBOURG 0x05
+# endif
+# ifndef SUBLANG_FRENCH_MONACO
+# define SUBLANG_FRENCH_MONACO 0x06
+# endif
+# ifndef SUBLANG_FRENCH_WESTINDIES
+# define SUBLANG_FRENCH_WESTINDIES 0x07
+# endif
+# ifndef SUBLANG_FRENCH_REUNION
+# define SUBLANG_FRENCH_REUNION 0x08
+# endif
+# ifndef SUBLANG_FRENCH_CONGO
+# define SUBLANG_FRENCH_CONGO 0x09
+# endif
+# ifndef SUBLANG_FRENCH_SENEGAL
+# define SUBLANG_FRENCH_SENEGAL 0x0a
+# endif
+# ifndef SUBLANG_FRENCH_CAMEROON
+# define SUBLANG_FRENCH_CAMEROON 0x0b
+# endif
+# ifndef SUBLANG_FRENCH_COTEDIVOIRE
+# define SUBLANG_FRENCH_COTEDIVOIRE 0x0c
+# endif
+# ifndef SUBLANG_FRENCH_MALI
+# define SUBLANG_FRENCH_MALI 0x0d
+# endif
+# ifndef SUBLANG_FRENCH_MOROCCO
+# define SUBLANG_FRENCH_MOROCCO 0x0e
+# endif
+# ifndef SUBLANG_FRENCH_HAITI
+# define SUBLANG_FRENCH_HAITI 0x0f
+# endif
+# ifndef SUBLANG_FRISIAN_NETHERLANDS
+# define SUBLANG_FRISIAN_NETHERLANDS 0x01
+# endif
+# ifndef SUBLANG_GALICIAN_SPAIN
+# define SUBLANG_GALICIAN_SPAIN 0x01
+# endif
+# ifndef SUBLANG_GEORGIAN_GEORGIA
+# define SUBLANG_GEORGIAN_GEORGIA 0x01
+# endif
+# ifndef SUBLANG_GERMAN_LUXEMBOURG
+# define SUBLANG_GERMAN_LUXEMBOURG 0x04
+# endif
+# ifndef SUBLANG_GERMAN_LIECHTENSTEIN
+# define SUBLANG_GERMAN_LIECHTENSTEIN 0x05
+# endif
+# ifndef SUBLANG_GREEK_GREECE
+# define SUBLANG_GREEK_GREECE 0x01
+# endif
+# ifndef SUBLANG_GREENLANDIC_GREENLAND
+# define SUBLANG_GREENLANDIC_GREENLAND 0x01
+# endif
+# ifndef SUBLANG_GUJARATI_INDIA
+# define SUBLANG_GUJARATI_INDIA 0x01
+# endif
+# ifndef SUBLANG_HAUSA_NIGERIA_LATIN
+# define SUBLANG_HAUSA_NIGERIA_LATIN 0x01
+# endif
+# ifndef SUBLANG_HEBREW_ISRAEL
+# define SUBLANG_HEBREW_ISRAEL 0x01
+# endif
+# ifndef SUBLANG_HINDI_INDIA
+# define SUBLANG_HINDI_INDIA 0x01
+# endif
+# ifndef SUBLANG_HUNGARIAN_HUNGARY
+# define SUBLANG_HUNGARIAN_HUNGARY 0x01
+# endif
+# ifndef SUBLANG_ICELANDIC_ICELAND
+# define SUBLANG_ICELANDIC_ICELAND 0x01
+# endif
+# ifndef SUBLANG_IGBO_NIGERIA
+# define SUBLANG_IGBO_NIGERIA 0x01
+# endif
+# ifndef SUBLANG_INDONESIAN_INDONESIA
+# define SUBLANG_INDONESIAN_INDONESIA 0x01
+# endif
+# ifndef SUBLANG_INUKTITUT_CANADA
+# define SUBLANG_INUKTITUT_CANADA 0x01
+# endif
+# undef SUBLANG_INUKTITUT_CANADA_LATIN
+# define SUBLANG_INUKTITUT_CANADA_LATIN 0x02
+# undef SUBLANG_IRISH_IRELAND
+# define SUBLANG_IRISH_IRELAND 0x02
+# ifndef SUBLANG_JAPANESE_JAPAN
+# define SUBLANG_JAPANESE_JAPAN 0x01
+# endif
+# ifndef SUBLANG_KANNADA_INDIA
+# define SUBLANG_KANNADA_INDIA 0x01
+# endif
+# ifndef SUBLANG_KASHMIRI_INDIA
+# define SUBLANG_KASHMIRI_INDIA 0x02
+# endif
+# ifndef SUBLANG_KAZAK_KAZAKHSTAN
+# define SUBLANG_KAZAK_KAZAKHSTAN 0x01
+# endif
+# ifndef SUBLANG_KICHE_GUATEMALA
+# define SUBLANG_KICHE_GUATEMALA 0x01
+# endif
+# ifndef SUBLANG_KINYARWANDA_RWANDA
+# define SUBLANG_KINYARWANDA_RWANDA 0x01
+# endif
+# ifndef SUBLANG_KONKANI_INDIA
+# define SUBLANG_KONKANI_INDIA 0x01
+# endif
+# ifndef SUBLANG_KYRGYZ_KYRGYZSTAN
+# define SUBLANG_KYRGYZ_KYRGYZSTAN 0x01
+# endif
+# ifndef SUBLANG_LAO_LAOS
+# define SUBLANG_LAO_LAOS 0x01
+# endif
+# ifndef SUBLANG_LATVIAN_LATVIA
+# define SUBLANG_LATVIAN_LATVIA 0x01
+# endif
+# ifndef SUBLANG_LITHUANIAN_LITHUANIA
+# define SUBLANG_LITHUANIAN_LITHUANIA 0x01
+# endif
+# undef SUBLANG_LOWER_SORBIAN_GERMANY
+# define SUBLANG_LOWER_SORBIAN_GERMANY 0x02
+# ifndef SUBLANG_LUXEMBOURGISH_LUXEMBOURG
+# define SUBLANG_LUXEMBOURGISH_LUXEMBOURG 0x01
+# endif
+# ifndef SUBLANG_MACEDONIAN_MACEDONIA
+# define SUBLANG_MACEDONIAN_MACEDONIA 0x01
+# endif
+# ifndef SUBLANG_MALAY_MALAYSIA
+# define SUBLANG_MALAY_MALAYSIA 0x01
+# endif
+# ifndef SUBLANG_MALAY_BRUNEI_DARUSSALAM
+# define SUBLANG_MALAY_BRUNEI_DARUSSALAM 0x02
+# endif
+# ifndef SUBLANG_MALAYALAM_INDIA
+# define SUBLANG_MALAYALAM_INDIA 0x01
+# endif
+# ifndef SUBLANG_MALTESE_MALTA
+# define SUBLANG_MALTESE_MALTA 0x01
+# endif
+# ifndef SUBLANG_MAORI_NEW_ZEALAND
+# define SUBLANG_MAORI_NEW_ZEALAND 0x01
+# endif
+# ifndef SUBLANG_MAPUDUNGUN_CHILE
+# define SUBLANG_MAPUDUNGUN_CHILE 0x01
+# endif
+# ifndef SUBLANG_MARATHI_INDIA
+# define SUBLANG_MARATHI_INDIA 0x01
+# endif
+# ifndef SUBLANG_MOHAWK_CANADA
+# define SUBLANG_MOHAWK_CANADA 0x01
+# endif
+# ifndef SUBLANG_MONGOLIAN_CYRILLIC_MONGOLIA
+# define SUBLANG_MONGOLIAN_CYRILLIC_MONGOLIA 0x01
+# endif
+# ifndef SUBLANG_MONGOLIAN_PRC
+# define SUBLANG_MONGOLIAN_PRC 0x02
+# endif
+# ifndef SUBLANG_NEPALI_NEPAL
+# define SUBLANG_NEPALI_NEPAL 0x01
+# endif
+# ifndef SUBLANG_NEPALI_INDIA
+# define SUBLANG_NEPALI_INDIA 0x02
+# endif
+# ifndef SUBLANG_OCCITAN_FRANCE
+# define SUBLANG_OCCITAN_FRANCE 0x01
+# endif
+# ifndef SUBLANG_ORIYA_INDIA
+# define SUBLANG_ORIYA_INDIA 0x01
+# endif
+# ifndef SUBLANG_PASHTO_AFGHANISTAN
+# define SUBLANG_PASHTO_AFGHANISTAN 0x01
+# endif
+# ifndef SUBLANG_POLISH_POLAND
+# define SUBLANG_POLISH_POLAND 0x01
+# endif
+# ifndef SUBLANG_PUNJABI_INDIA
+# define SUBLANG_PUNJABI_INDIA 0x01
+# endif
+# ifndef SUBLANG_PUNJABI_PAKISTAN
+# define SUBLANG_PUNJABI_PAKISTAN 0x02
+# endif
+# ifndef SUBLANG_QUECHUA_BOLIVIA
+# define SUBLANG_QUECHUA_BOLIVIA 0x01
+# endif
+# ifndef SUBLANG_QUECHUA_ECUADOR
+# define SUBLANG_QUECHUA_ECUADOR 0x02
+# endif
+# ifndef SUBLANG_QUECHUA_PERU
+# define SUBLANG_QUECHUA_PERU 0x03
+# endif
+# ifndef SUBLANG_ROMANIAN_ROMANIA
+# define SUBLANG_ROMANIAN_ROMANIA 0x01
+# endif
+# ifndef SUBLANG_ROMANIAN_MOLDOVA
+# define SUBLANG_ROMANIAN_MOLDOVA 0x02
+# endif
+# ifndef SUBLANG_ROMANSH_SWITZERLAND
+# define SUBLANG_ROMANSH_SWITZERLAND 0x01
+# endif
+# ifndef SUBLANG_RUSSIAN_RUSSIA
+# define SUBLANG_RUSSIAN_RUSSIA 0x01
+# endif
+# ifndef SUBLANG_RUSSIAN_MOLDAVIA
+# define SUBLANG_RUSSIAN_MOLDAVIA 0x02
+# endif
+# ifndef SUBLANG_SAMI_NORTHERN_NORWAY
+# define SUBLANG_SAMI_NORTHERN_NORWAY 0x01
+# endif
+# ifndef SUBLANG_SAMI_NORTHERN_SWEDEN
+# define SUBLANG_SAMI_NORTHERN_SWEDEN 0x02
+# endif
+# ifndef SUBLANG_SAMI_NORTHERN_FINLAND
+# define SUBLANG_SAMI_NORTHERN_FINLAND 0x03
+# endif
+# ifndef SUBLANG_SAMI_LULE_NORWAY
+# define SUBLANG_SAMI_LULE_NORWAY 0x04
+# endif
+# ifndef SUBLANG_SAMI_LULE_SWEDEN
+# define SUBLANG_SAMI_LULE_SWEDEN 0x05
+# endif
+# ifndef SUBLANG_SAMI_SOUTHERN_NORWAY
+# define SUBLANG_SAMI_SOUTHERN_NORWAY 0x06
+# endif
+# ifndef SUBLANG_SAMI_SOUTHERN_SWEDEN
+# define SUBLANG_SAMI_SOUTHERN_SWEDEN 0x07
+# endif
+# undef SUBLANG_SAMI_SKOLT_FINLAND
+# define SUBLANG_SAMI_SKOLT_FINLAND 0x08
+# undef SUBLANG_SAMI_INARI_FINLAND
+# define SUBLANG_SAMI_INARI_FINLAND 0x09
+# ifndef SUBLANG_SANSKRIT_INDIA
+# define SUBLANG_SANSKRIT_INDIA 0x01
+# endif
+# ifndef SUBLANG_SERBIAN_LATIN
+# define SUBLANG_SERBIAN_LATIN 0x02
+# endif
+# ifndef SUBLANG_SERBIAN_CYRILLIC
+# define SUBLANG_SERBIAN_CYRILLIC 0x03
+# endif
+# ifndef SUBLANG_SINDHI_INDIA
+# define SUBLANG_SINDHI_INDIA 0x01
+# endif
+# undef SUBLANG_SINDHI_PAKISTAN
+# define SUBLANG_SINDHI_PAKISTAN 0x02
+# ifndef SUBLANG_SINDHI_AFGHANISTAN
+# define SUBLANG_SINDHI_AFGHANISTAN 0x02
+# endif
+# ifndef SUBLANG_SINHALESE_SRI_LANKA
+# define SUBLANG_SINHALESE_SRI_LANKA 0x01
+# endif
+# ifndef SUBLANG_SLOVAK_SLOVAKIA
+# define SUBLANG_SLOVAK_SLOVAKIA 0x01
+# endif
+# ifndef SUBLANG_SLOVENIAN_SLOVENIA
+# define SUBLANG_SLOVENIAN_SLOVENIA 0x01
+# endif
+# ifndef SUBLANG_SOTHO_SOUTH_AFRICA
+# define SUBLANG_SOTHO_SOUTH_AFRICA 0x01
+# endif
+# ifndef SUBLANG_SPANISH_GUATEMALA
+# define SUBLANG_SPANISH_GUATEMALA 0x04
+# endif
+# ifndef SUBLANG_SPANISH_COSTA_RICA
+# define SUBLANG_SPANISH_COSTA_RICA 0x05
+# endif
+# ifndef SUBLANG_SPANISH_PANAMA
+# define SUBLANG_SPANISH_PANAMA 0x06
+# endif
+# ifndef SUBLANG_SPANISH_DOMINICAN_REPUBLIC
+# define SUBLANG_SPANISH_DOMINICAN_REPUBLIC 0x07
+# endif
+# ifndef SUBLANG_SPANISH_VENEZUELA
+# define SUBLANG_SPANISH_VENEZUELA 0x08
+# endif
+# ifndef SUBLANG_SPANISH_COLOMBIA
+# define SUBLANG_SPANISH_COLOMBIA 0x09
+# endif
+# ifndef SUBLANG_SPANISH_PERU
+# define SUBLANG_SPANISH_PERU 0x0a
+# endif
+# ifndef SUBLANG_SPANISH_ARGENTINA
+# define SUBLANG_SPANISH_ARGENTINA 0x0b
+# endif
+# ifndef SUBLANG_SPANISH_ECUADOR
+# define SUBLANG_SPANISH_ECUADOR 0x0c
+# endif
+# ifndef SUBLANG_SPANISH_CHILE
+# define SUBLANG_SPANISH_CHILE 0x0d
+# endif
+# ifndef SUBLANG_SPANISH_URUGUAY
+# define SUBLANG_SPANISH_URUGUAY 0x0e
+# endif
+# ifndef SUBLANG_SPANISH_PARAGUAY
+# define SUBLANG_SPANISH_PARAGUAY 0x0f
+# endif
+# ifndef SUBLANG_SPANISH_BOLIVIA
+# define SUBLANG_SPANISH_BOLIVIA 0x10
+# endif
+# ifndef SUBLANG_SPANISH_EL_SALVADOR
+# define SUBLANG_SPANISH_EL_SALVADOR 0x11
+# endif
+# ifndef SUBLANG_SPANISH_HONDURAS
+# define SUBLANG_SPANISH_HONDURAS 0x12
+# endif
+# ifndef SUBLANG_SPANISH_NICARAGUA
+# define SUBLANG_SPANISH_NICARAGUA 0x13
+# endif
+# ifndef SUBLANG_SPANISH_PUERTO_RICO
+# define SUBLANG_SPANISH_PUERTO_RICO 0x14
+# endif
+# ifndef SUBLANG_SPANISH_US
+# define SUBLANG_SPANISH_US 0x15
+# endif
+# ifndef SUBLANG_SWAHILI_KENYA
+# define SUBLANG_SWAHILI_KENYA 0x01
+# endif
+# ifndef SUBLANG_SWEDISH_SWEDEN
+# define SUBLANG_SWEDISH_SWEDEN 0x01
+# endif
+# ifndef SUBLANG_SWEDISH_FINLAND
+# define SUBLANG_SWEDISH_FINLAND 0x02
+# endif
+# ifndef SUBLANG_SYRIAC_SYRIA
+# define SUBLANG_SYRIAC_SYRIA 0x01
+# endif
+# ifndef SUBLANG_TAGALOG_PHILIPPINES
+# define SUBLANG_TAGALOG_PHILIPPINES 0x01
+# endif
+# ifndef SUBLANG_TAJIK_TAJIKISTAN
+# define SUBLANG_TAJIK_TAJIKISTAN 0x01
+# endif
+# ifndef SUBLANG_TAMAZIGHT_ARABIC
+# define SUBLANG_TAMAZIGHT_ARABIC 0x01
+# endif
+# ifndef SUBLANG_TAMAZIGHT_ALGERIA_LATIN
+# define SUBLANG_TAMAZIGHT_ALGERIA_LATIN 0x02
+# endif
+# ifndef SUBLANG_TAMIL_INDIA
+# define SUBLANG_TAMIL_INDIA 0x01
+# endif
+# ifndef SUBLANG_TATAR_RUSSIA
+# define SUBLANG_TATAR_RUSSIA 0x01
+# endif
+# ifndef SUBLANG_TELUGU_INDIA
+# define SUBLANG_TELUGU_INDIA 0x01
+# endif
+# ifndef SUBLANG_THAI_THAILAND
+# define SUBLANG_THAI_THAILAND 0x01
+# endif
+# ifndef SUBLANG_TIBETAN_PRC
+# define SUBLANG_TIBETAN_PRC 0x01
+# endif
+# undef SUBLANG_TIBETAN_BHUTAN
+# define SUBLANG_TIBETAN_BHUTAN 0x02
+# ifndef SUBLANG_TIGRINYA_ETHIOPIA
+# define SUBLANG_TIGRINYA_ETHIOPIA 0x01
+# endif
+# ifndef SUBLANG_TIGRINYA_ERITREA
+# define SUBLANG_TIGRINYA_ERITREA 0x02
+# endif
+# ifndef SUBLANG_TSWANA_SOUTH_AFRICA
+# define SUBLANG_TSWANA_SOUTH_AFRICA 0x01
+# endif
+# ifndef SUBLANG_TURKISH_TURKEY
+# define SUBLANG_TURKISH_TURKEY 0x01
+# endif
+# ifndef SUBLANG_TURKMEN_TURKMENISTAN
+# define SUBLANG_TURKMEN_TURKMENISTAN 0x01
+# endif
+# ifndef SUBLANG_UIGHUR_PRC
+# define SUBLANG_UIGHUR_PRC 0x01
+# endif
+# ifndef SUBLANG_UKRAINIAN_UKRAINE
+# define SUBLANG_UKRAINIAN_UKRAINE 0x01
+# endif
+# ifndef SUBLANG_UPPER_SORBIAN_GERMANY
+# define SUBLANG_UPPER_SORBIAN_GERMANY 0x01
+# endif
+# ifndef SUBLANG_URDU_PAKISTAN
+# define SUBLANG_URDU_PAKISTAN 0x01
+# endif
+# ifndef SUBLANG_URDU_INDIA
+# define SUBLANG_URDU_INDIA 0x02
+# endif
+# ifndef SUBLANG_UZBEK_LATIN
+# define SUBLANG_UZBEK_LATIN 0x01
+# endif
+# ifndef SUBLANG_UZBEK_CYRILLIC
+# define SUBLANG_UZBEK_CYRILLIC 0x02
+# endif
+# ifndef SUBLANG_VIETNAMESE_VIETNAM
+# define SUBLANG_VIETNAMESE_VIETNAM 0x01
+# endif
+# ifndef SUBLANG_WELSH_UNITED_KINGDOM
+# define SUBLANG_WELSH_UNITED_KINGDOM 0x01
+# endif
+# ifndef SUBLANG_WOLOF_SENEGAL
+# define SUBLANG_WOLOF_SENEGAL 0x01
+# endif
+# ifndef SUBLANG_XHOSA_SOUTH_AFRICA
+# define SUBLANG_XHOSA_SOUTH_AFRICA 0x01
+# endif
+# ifndef SUBLANG_YAKUT_RUSSIA
+# define SUBLANG_YAKUT_RUSSIA 0x01
+# endif
+# ifndef SUBLANG_YI_PRC
+# define SUBLANG_YI_PRC 0x01
+# endif
+# ifndef SUBLANG_YORUBA_NIGERIA
+# define SUBLANG_YORUBA_NIGERIA 0x01
+# endif
+# ifndef SUBLANG_ZULU_SOUTH_AFRICA
+# define SUBLANG_ZULU_SOUTH_AFRICA 0x01
+# endif
+/* GetLocaleInfoA operations. */
+# ifndef LOCALE_SNAME
+# define LOCALE_SNAME 0x5c
+# endif
+# ifndef LOCALE_NAME_MAX_LENGTH
+# define LOCALE_NAME_MAX_LENGTH 85
+# endif
+#endif
+
+
+#if HAVE_CFLOCALECOPYCURRENT || HAVE_CFPREFERENCESCOPYAPPVALUE
+/* Mac OS X 10.2 or newer */
+
+/* Canonicalize a Mac OS X locale name to a Unix locale name.
+ NAME is a sufficiently large buffer.
+ On input, it contains the Mac OS X locale name.
+ On output, it contains the Unix locale name. */
+# if !defined IN_LIBINTL
+static
+# endif
+void
+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 */
+
+ /* 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.
+ Therefore we do it ourselves, using a table based on the results of the
+ Mac OS X 10.3.8 function
+ CFLocaleCreateCanonicalLocaleIdentifierFromString(). */
+ typedef struct { const char legacy[21+1]; const char unixy[5+1]; }
+ legacy_entry;
+ static const legacy_entry legacy_table[] = {
+ { "Afrikaans", "af" },
+ { "Albanian", "sq" },
+ { "Amharic", "am" },
+ { "Arabic", "ar" },
+ { "Armenian", "hy" },
+ { "Assamese", "as" },
+ { "Aymara", "ay" },
+ { "Azerbaijani", "az" },
+ { "Basque", "eu" },
+ { "Belarusian", "be" },
+ { "Belorussian", "be" },
+ { "Bengali", "bn" },
+ { "Brazilian Portugese", "pt_BR" },
+ { "Brazilian Portuguese", "pt_BR" },
+ { "Breton", "br" },
+ { "Bulgarian", "bg" },
+ { "Burmese", "my" },
+ { "Byelorussian", "be" },
+ { "Catalan", "ca" },
+ { "Chewa", "ny" },
+ { "Chichewa", "ny" },
+ { "Chinese", "zh" },
+ { "Chinese, Simplified", "zh_CN" },
+ { "Chinese, Traditional", "zh_TW" },
+ { "Chinese, Tradtional", "zh_TW" },
+ { "Croatian", "hr" },
+ { "Czech", "cs" },
+ { "Danish", "da" },
+ { "Dutch", "nl" },
+ { "Dzongkha", "dz" },
+ { "English", "en" },
+ { "Esperanto", "eo" },
+ { "Estonian", "et" },
+ { "Faroese", "fo" },
+ { "Farsi", "fa" },
+ { "Finnish", "fi" },
+ { "Flemish", "nl_BE" },
+ { "French", "fr" },
+ { "Galician", "gl" },
+ { "Gallegan", "gl" },
+ { "Georgian", "ka" },
+ { "German", "de" },
+ { "Greek", "el" },
+ { "Greenlandic", "kl" },
+ { "Guarani", "gn" },
+ { "Gujarati", "gu" },
+ { "Hawaiian", "haw" }, /* Yes, "haw", not "cpe". */
+ { "Hebrew", "he" },
+ { "Hindi", "hi" },
+ { "Hungarian", "hu" },
+ { "Icelandic", "is" },
+ { "Indonesian", "id" },
+ { "Inuktitut", "iu" },
+ { "Irish", "ga" },
+ { "Italian", "it" },
+ { "Japanese", "ja" },
+ { "Javanese", "jv" },
+ { "Kalaallisut", "kl" },
+ { "Kannada", "kn" },
+ { "Kashmiri", "ks" },
+ { "Kazakh", "kk" },
+ { "Khmer", "km" },
+ { "Kinyarwanda", "rw" },
+ { "Kirghiz", "ky" },
+ { "Korean", "ko" },
+ { "Kurdish", "ku" },
+ { "Latin", "la" },
+ { "Latvian", "lv" },
+ { "Lithuanian", "lt" },
+ { "Macedonian", "mk" },
+ { "Malagasy", "mg" },
+ { "Malay", "ms" },
+ { "Malayalam", "ml" },
+ { "Maltese", "mt" },
+ { "Manx", "gv" },
+ { "Marathi", "mr" },
+ { "Moldavian", "mo" },
+ { "Mongolian", "mn" },
+ { "Nepali", "ne" },
+ { "Norwegian", "nb" }, /* Yes, "nb", not the obsolete "no". */
+ { "Nyanja", "ny" },
+ { "Nynorsk", "nn" },
+ { "Oriya", "or" },
+ { "Oromo", "om" },
+ { "Panjabi", "pa" },
+ { "Pashto", "ps" },
+ { "Persian", "fa" },
+ { "Polish", "pl" },
+ { "Portuguese", "pt" },
+ { "Portuguese, Brazilian", "pt_BR" },
+ { "Punjabi", "pa" },
+ { "Pushto", "ps" },
+ { "Quechua", "qu" },
+ { "Romanian", "ro" },
+ { "Ruanda", "rw" },
+ { "Rundi", "rn" },
+ { "Russian", "ru" },
+ { "Sami", "se_NO" }, /* Not just "se". */
+ { "Sanskrit", "sa" },
+ { "Scottish", "gd" },
+ { "Serbian", "sr" },
+ { "Simplified Chinese", "zh_CN" },
+ { "Sindhi", "sd" },
+ { "Sinhalese", "si" },
+ { "Slovak", "sk" },
+ { "Slovenian", "sl" },
+ { "Somali", "so" },
+ { "Spanish", "es" },
+ { "Sundanese", "su" },
+ { "Swahili", "sw" },
+ { "Swedish", "sv" },
+ { "Tagalog", "tl" },
+ { "Tajik", "tg" },
+ { "Tajiki", "tg" },
+ { "Tamil", "ta" },
+ { "Tatar", "tt" },
+ { "Telugu", "te" },
+ { "Thai", "th" },
+ { "Tibetan", "bo" },
+ { "Tigrinya", "ti" },
+ { "Tongan", "to" },
+ { "Traditional Chinese", "zh_TW" },
+ { "Turkish", "tr" },
+ { "Turkmen", "tk" },
+ { "Uighur", "ug" },
+ { "Ukrainian", "uk" },
+ { "Urdu", "ur" },
+ { "Uzbek", "uz" },
+ { "Vietnamese", "vi" },
+ { "Welsh", "cy" },
+ { "Yiddish", "yi" }
+ };
+
+ /* Convert new-style locale names with language tags (ISO 639 and ISO 15924)
+ to Unix (ISO 639 and ISO 3166) names. */
+ typedef struct { const char langtag[7+1]; const char unixy[12+1]; }
+ langtag_entry;
+ static const langtag_entry langtag_table[] = {
+ /* Mac OS X has "az-Arab", "az-Cyrl", "az-Latn".
+ The default script for az on Unix is Latin. */
+ { "az-Latn", "az" },
+ /* Mac OS X has "ga-dots". Does not yet exist on Unix. */
+ { "ga-dots", "ga" },
+ /* Mac OS X has "kk-Cyrl". Does not yet exist on Unix. */
+ /* Mac OS X has "mn-Cyrl", "mn-Mong".
+ The default script for mn on Unix is Cyrillic. */
+ { "mn-Cyrl", "mn" },
+ /* Mac OS X has "ms-Arab", "ms-Latn".
+ The default script for ms on Unix is Latin. */
+ { "ms-Latn", "ms" },
+ /* Mac OS X has "tg-Cyrl".
+ The default script for tg on Unix is Cyrillic. */
+ { "tg-Cyrl", "tg" },
+ /* Mac OS X has "tk-Cyrl". Does not yet exist on Unix. */
+ /* Mac OS X has "tt-Cyrl".
+ The default script for tt on Unix is Cyrillic. */
+ { "tt-Cyrl", "tt" },
+ /* Mac OS X has "zh-Hans", "zh-Hant".
+ Country codes are used to distinguish these on Unix. */
+ { "zh-Hans", "zh_CN" },
+ { "zh-Hant", "zh_TW" }
+ };
+
+ /* Convert script names (ISO 15924) to Unix conventions.
+ See http://www.unicode.org/iso15924/iso15924-codes.html */
+ typedef struct { const char script[4+1]; const char unixy[9+1]; }
+ script_entry;
+ static const script_entry script_table[] = {
+ { "Arab", "arabic" },
+ { "Cyrl", "cyrillic" },
+ { "Mong", "mongolian" }
+ };
+
+ /* Step 1: Convert using legacy_table. */
+ if (name[0] >= 'A' && name[0] <= 'Z')
+ {
+ unsigned int i1, i2;
+ i1 = 0;
+ i2 = sizeof (legacy_table) / sizeof (legacy_entry);
+ while (i2 - i1 > 1)
+ {
+ /* At this point we know that if name occurs in legacy_table,
+ its index must be >= i1 and < i2. */
+ unsigned int i = (i1 + i2) >> 1;
+ const legacy_entry *p = &legacy_table[i];
+ if (strcmp (name, p->legacy) < 0)
+ i2 = i;
+ else
+ i1 = i;
+ }
+ if (strcmp (name, legacy_table[i1].legacy) == 0)
+ {
+ strcpy (name, legacy_table[i1].unixy);
+ return;
+ }
+ }
+
+ /* Step 2: Convert using langtag_table and script_table. */
+ if (strlen (name) == 7 && name[2] == '-')
+ {
+ unsigned int i1, i2;
+ i1 = 0;
+ i2 = sizeof (langtag_table) / sizeof (langtag_entry);
+ while (i2 - i1 > 1)
+ {
+ /* At this point we know that if name occurs in langtag_table,
+ its index must be >= i1 and < i2. */
+ unsigned int i = (i1 + i2) >> 1;
+ const langtag_entry *p = &langtag_table[i];
+ if (strcmp (name, p->langtag) < 0)
+ i2 = i;
+ else
+ i1 = i;
+ }
+ if (strcmp (name, langtag_table[i1].langtag) == 0)
+ {
+ strcpy (name, langtag_table[i1].unixy);
+ return;
+ }
+
+ i1 = 0;
+ i2 = sizeof (script_table) / sizeof (script_entry);
+ while (i2 - i1 > 1)
+ {
+ /* At this point we know that if (name + 3) occurs in script_table,
+ its index must be >= i1 and < i2. */
+ unsigned int i = (i1 + i2) >> 1;
+ const script_entry *p = &script_table[i];
+ if (strcmp (name + 3, p->script) < 0)
+ i2 = i;
+ else
+ i1 = i;
+ }
+ if (strcmp (name + 3, script_table[i1].script) == 0)
+ {
+ name[2] = '@';
+ strcpy (name + 3, script_table[i1].unixy);
+ return;
+ }
+ }
+
+ /* Step 3: Convert new-style dash to Unix underscore. */
+ {
+ char *p;
+ for (p = name; *p != '\0'; p++)
+ if (*p == '-')
+ *p = '_';
+ }
+}
+
+#endif
+
+
+#if defined WINDOWS_NATIVE || defined __CYGWIN__ /* Native Windows or Cygwin */
+
+/* Canonicalize a Windows native locale name to a Unix locale name.
+ NAME is a sufficiently large buffer.
+ On input, it contains the Windows locale name.
+ On output, it contains the Unix locale name. */
+# if !defined IN_LIBINTL
+static
+# endif
+void
+gl_locale_name_canonicalize (char *name)
+{
+ /* FIXME: This is probably incomplete: it does not handle "zh-Hans" and
+ "zh-Hant". */
+ char *p;
+
+ for (p = name; *p != '\0'; p++)
+ if (*p == '-')
+ {
+ *p = '_';
+ p++;
+ for (; *p != '\0'; p++)
+ {
+ if (*p >= 'a' && *p <= 'z')
+ *p += 'A' - 'a';
+ if (*p == '-')
+ {
+ *p = '\0';
+ return;
+ }
+ }
+ return;
+ }
+}
+
+# if !defined IN_LIBINTL
+static
+# endif
+const char *
+gl_locale_name_from_win32_LANGID (LANGID langid)
+{
+ /* Activate the new code only when the GETTEXT_MUI environment variable is
+ set, for the time being, since the new code is not well tested. */
+ if (getenv ("GETTEXT_MUI") != NULL)
+ {
+ static char namebuf[256];
+
+ /* Query the system's notion of locale name.
+ On Windows95/98/ME, GetLocaleInfoA returns some incorrect results.
+ But we don't need to support systems that are so old. */
+ if (GetLocaleInfoA (MAKELCID (langid, SORT_DEFAULT), LOCALE_SNAME,
+ namebuf, sizeof (namebuf) - 1))
+ {
+ /* Convert it to a Unix locale name. */
+ gl_locale_name_canonicalize (namebuf);
+ return namebuf;
+ }
+ }
+ /* Internet Explorer has an LCID to RFC3066 name mapping stored in
+ HKEY_CLASSES_ROOT\Mime\Database\Rfc1766. But we better don't use that
+ since IE's i18n subsystem is known to be inconsistent with the native
+ Windows base (e.g. they have different character conversion facilities
+ that produce different results). */
+ /* Use our own table. */
+ {
+ int primary, sub;
+
+ /* Split into language and territory part. */
+ primary = PRIMARYLANGID (langid);
+ sub = SUBLANGID (langid);
+
+ /* Dispatch on language.
+ See also http://www.unicode.org/unicode/onlinedat/languages.html .
+ For details about languages, see http://www.ethnologue.com/ . */
+ switch (primary)
+ {
+ case LANG_AFRIKAANS:
+ switch (sub)
+ {
+ case SUBLANG_AFRIKAANS_SOUTH_AFRICA: return "af_ZA";
+ }
+ return "af";
+ case LANG_ALBANIAN:
+ switch (sub)
+ {
+ case SUBLANG_ALBANIAN_ALBANIA: return "sq_AL";
+ }
+ return "sq";
+ case LANG_ALSATIAN:
+ switch (sub)
+ {
+ case SUBLANG_ALSATIAN_FRANCE: return "gsw_FR";
+ }
+ return "gsw";
+ case LANG_AMHARIC:
+ switch (sub)
+ {
+ case SUBLANG_AMHARIC_ETHIOPIA: return "am_ET";
+ }
+ return "am";
+ case LANG_ARABIC:
+ switch (sub)
+ {
+ case SUBLANG_ARABIC_SAUDI_ARABIA: return "ar_SA";
+ case SUBLANG_ARABIC_IRAQ: return "ar_IQ";
+ case SUBLANG_ARABIC_EGYPT: return "ar_EG";
+ case SUBLANG_ARABIC_LIBYA: return "ar_LY";
+ case SUBLANG_ARABIC_ALGERIA: return "ar_DZ";
+ case SUBLANG_ARABIC_MOROCCO: return "ar_MA";
+ case SUBLANG_ARABIC_TUNISIA: return "ar_TN";
+ case SUBLANG_ARABIC_OMAN: return "ar_OM";
+ case SUBLANG_ARABIC_YEMEN: return "ar_YE";
+ case SUBLANG_ARABIC_SYRIA: return "ar_SY";
+ case SUBLANG_ARABIC_JORDAN: return "ar_JO";
+ case SUBLANG_ARABIC_LEBANON: return "ar_LB";
+ case SUBLANG_ARABIC_KUWAIT: return "ar_KW";
+ case SUBLANG_ARABIC_UAE: return "ar_AE";
+ case SUBLANG_ARABIC_BAHRAIN: return "ar_BH";
+ case SUBLANG_ARABIC_QATAR: return "ar_QA";
+ }
+ return "ar";
+ case LANG_ARMENIAN:
+ switch (sub)
+ {
+ case SUBLANG_ARMENIAN_ARMENIA: return "hy_AM";
+ }
+ return "hy";
+ case LANG_ASSAMESE:
+ switch (sub)
+ {
+ case SUBLANG_ASSAMESE_INDIA: return "as_IN";
+ }
+ return "as";
+ case LANG_AZERI:
+ switch (sub)
+ {
+ /* FIXME: Adjust this when Azerbaijani locales appear on Unix. */
+ case 0x1e: return "az@latin";
+ case SUBLANG_AZERI_LATIN: return "az_AZ@latin";
+ case 0x1d: return "az@cyrillic";
+ case SUBLANG_AZERI_CYRILLIC: return "az_AZ@cyrillic";
+ }
+ return "az";
+ case LANG_BASHKIR:
+ switch (sub)
+ {
+ case SUBLANG_BASHKIR_RUSSIA: return "ba_RU";
+ }
+ return "ba";
+ case LANG_BASQUE:
+ switch (sub)
+ {
+ case SUBLANG_BASQUE_BASQUE: return "eu_ES";
+ }
+ return "eu"; /* Ambiguous: could be "eu_ES" or "eu_FR". */
+ case LANG_BELARUSIAN:
+ switch (sub)
+ {
+ case SUBLANG_BELARUSIAN_BELARUS: return "be_BY";
+ }
+ return "be";
+ case LANG_BENGALI:
+ switch (sub)
+ {
+ case SUBLANG_BENGALI_INDIA: return "bn_IN";
+ case SUBLANG_BENGALI_BANGLADESH: return "bn_BD";
+ }
+ return "bn";
+ case LANG_BRETON:
+ switch (sub)
+ {
+ case SUBLANG_BRETON_FRANCE: return "br_FR";
+ }
+ return "br";
+ case LANG_BULGARIAN:
+ switch (sub)
+ {
+ case SUBLANG_BULGARIAN_BULGARIA: return "bg_BG";
+ }
+ return "bg";
+ case LANG_BURMESE:
+ switch (sub)
+ {
+ case SUBLANG_DEFAULT: return "my_MM";
+ }
+ return "my";
+ case LANG_CAMBODIAN:
+ switch (sub)
+ {
+ case SUBLANG_CAMBODIAN_CAMBODIA: return "km_KH";
+ }
+ return "km";
+ case LANG_CATALAN:
+ switch (sub)
+ {
+ case SUBLANG_CATALAN_SPAIN: return "ca_ES";
+ }
+ return "ca";
+ case LANG_CHEROKEE:
+ switch (sub)
+ {
+ case SUBLANG_DEFAULT: return "chr_US";
+ }
+ return "chr";
+ case LANG_CHINESE:
+ switch (sub)
+ {
+ case SUBLANG_CHINESE_TRADITIONAL: case 0x1f: return "zh_TW";
+ case SUBLANG_CHINESE_SIMPLIFIED: case 0x00: return "zh_CN";
+ case SUBLANG_CHINESE_HONGKONG: return "zh_HK"; /* traditional */
+ case SUBLANG_CHINESE_SINGAPORE: return "zh_SG"; /* simplified */
+ case SUBLANG_CHINESE_MACAU: return "zh_MO"; /* traditional */
+ }
+ return "zh";
+ case LANG_CORSICAN:
+ switch (sub)
+ {
+ case SUBLANG_CORSICAN_FRANCE: return "co_FR";
+ }
+ return "co";
+ case LANG_CROATIAN: /* LANG_CROATIAN == LANG_SERBIAN == LANG_BOSNIAN
+ * What used to be called Serbo-Croatian
+ * should really now be two separate
+ * languages because of political reasons.
+ * (Says tml, who knows nothing about Serbian
+ * or Croatian.)
+ * (I can feel those flames coming already.)
+ */
+ switch (sub)
+ {
+ /* Croatian */
+ case 0x00: return "hr";
+ case SUBLANG_CROATIAN_CROATIA: return "hr_HR";
+ case SUBLANG_CROATIAN_BOSNIA_HERZEGOVINA_LATIN: return "hr_BA";
+ /* Serbian */
+ case 0x1f: return "sr";
+ case 0x1c: return "sr"; /* latin */
+ case SUBLANG_SERBIAN_LATIN: return "sr_CS"; /* latin */
+ case 0x09: return "sr_RS"; /* latin */
+ case 0x0b: return "sr_ME"; /* latin */
+ case 0x06: return "sr_BA"; /* latin */
+ case 0x1b: return "sr@cyrillic";
+ case SUBLANG_SERBIAN_CYRILLIC: return "sr_CS@cyrillic";
+ case 0x0a: return "sr_RS@cyrillic";
+ case 0x0c: return "sr_ME@cyrillic";
+ case 0x07: return "sr_BA@cyrillic";
+ /* Bosnian */
+ case 0x1e: return "bs";
+ case 0x1a: return "bs"; /* latin */
+ case SUBLANG_BOSNIAN_BOSNIA_HERZEGOVINA_LATIN: return "bs_BA"; /* latin */
+ case 0x19: return "bs@cyrillic";
+ case SUBLANG_BOSNIAN_BOSNIA_HERZEGOVINA_CYRILLIC: return "bs_BA@cyrillic";
+ }
+ return "hr";
+ case LANG_CZECH:
+ switch (sub)
+ {
+ case SUBLANG_CZECH_CZECH_REPUBLIC: return "cs_CZ";
+ }
+ return "cs";
+ case LANG_DANISH:
+ switch (sub)
+ {
+ case SUBLANG_DANISH_DENMARK: return "da_DK";
+ }
+ return "da";
+ case LANG_DARI:
+ /* FIXME: Adjust this when such locales appear on Unix. */
+ switch (sub)
+ {
+ case SUBLANG_DARI_AFGHANISTAN: return "prs_AF";
+ }
+ return "prs";
+ case LANG_DIVEHI:
+ switch (sub)
+ {
+ case SUBLANG_DIVEHI_MALDIVES: return "dv_MV";
+ }
+ return "dv";
+ case LANG_DUTCH:
+ switch (sub)
+ {
+ case SUBLANG_DUTCH: return "nl_NL";
+ case SUBLANG_DUTCH_BELGIAN: /* FLEMISH, VLAAMS */ return "nl_BE";
+ case SUBLANG_DUTCH_SURINAM: return "nl_SR";
+ }
+ return "nl";
+ case LANG_EDO:
+ switch (sub)
+ {
+ case SUBLANG_DEFAULT: return "bin_NG";
+ }
+ return "bin";
+ case LANG_ENGLISH:
+ switch (sub)
+ {
+ /* SUBLANG_ENGLISH_US == SUBLANG_DEFAULT. Heh. I thought
+ * English was the language spoken in England.
+ * Oh well.
+ */
+ case SUBLANG_ENGLISH_US: return "en_US";
+ case SUBLANG_ENGLISH_UK: return "en_GB";
+ case SUBLANG_ENGLISH_AUS: return "en_AU";
+ case SUBLANG_ENGLISH_CAN: return "en_CA";
+ case SUBLANG_ENGLISH_NZ: return "en_NZ";
+ case SUBLANG_ENGLISH_EIRE: return "en_IE";
+ case SUBLANG_ENGLISH_SOUTH_AFRICA: return "en_ZA";
+ case SUBLANG_ENGLISH_JAMAICA: return "en_JM";
+ case SUBLANG_ENGLISH_CARIBBEAN: return "en_GD"; /* Grenada? */
+ case SUBLANG_ENGLISH_BELIZE: return "en_BZ";
+ case SUBLANG_ENGLISH_TRINIDAD: return "en_TT";
+ case SUBLANG_ENGLISH_ZIMBABWE: return "en_ZW";
+ case SUBLANG_ENGLISH_PHILIPPINES: return "en_PH";
+ case SUBLANG_ENGLISH_INDONESIA: return "en_ID";
+ case SUBLANG_ENGLISH_HONGKONG: return "en_HK";
+ case SUBLANG_ENGLISH_INDIA: return "en_IN";
+ case SUBLANG_ENGLISH_MALAYSIA: return "en_MY";
+ case SUBLANG_ENGLISH_SINGAPORE: return "en_SG";
+ }
+ return "en";
+ case LANG_ESTONIAN:
+ switch (sub)
+ {
+ case SUBLANG_ESTONIAN_ESTONIA: return "et_EE";
+ }
+ return "et";
+ case LANG_FAEROESE:
+ switch (sub)
+ {
+ case SUBLANG_FAEROESE_FAROE_ISLANDS: return "fo_FO";
+ }
+ return "fo";
+ case LANG_FARSI:
+ switch (sub)
+ {
+ case SUBLANG_FARSI_IRAN: return "fa_IR";
+ }
+ return "fa";
+ case LANG_FINNISH:
+ switch (sub)
+ {
+ case SUBLANG_FINNISH_FINLAND: return "fi_FI";
+ }
+ return "fi";
+ case LANG_FRENCH:
+ switch (sub)
+ {
+ case SUBLANG_FRENCH: return "fr_FR";
+ case SUBLANG_FRENCH_BELGIAN: /* WALLOON */ return "fr_BE";
+ case SUBLANG_FRENCH_CANADIAN: return "fr_CA";
+ case SUBLANG_FRENCH_SWISS: return "fr_CH";
+ case SUBLANG_FRENCH_LUXEMBOURG: return "fr_LU";
+ case SUBLANG_FRENCH_MONACO: return "fr_MC";
+ case SUBLANG_FRENCH_WESTINDIES: return "fr"; /* Caribbean? */
+ case SUBLANG_FRENCH_REUNION: return "fr_RE";
+ case SUBLANG_FRENCH_CONGO: return "fr_CG";
+ case SUBLANG_FRENCH_SENEGAL: return "fr_SN";
+ case SUBLANG_FRENCH_CAMEROON: return "fr_CM";
+ case SUBLANG_FRENCH_COTEDIVOIRE: return "fr_CI";
+ case SUBLANG_FRENCH_MALI: return "fr_ML";
+ case SUBLANG_FRENCH_MOROCCO: return "fr_MA";
+ case SUBLANG_FRENCH_HAITI: return "fr_HT";
+ }
+ return "fr";
+ case LANG_FRISIAN:
+ switch (sub)
+ {
+ case SUBLANG_FRISIAN_NETHERLANDS: return "fy_NL";
+ }
+ return "fy";
+ case LANG_FULFULDE:
+ /* Spoken in Nigeria, Guinea, Senegal, Mali, Niger, Cameroon, Benin. */
+ switch (sub)
+ {
+ case SUBLANG_DEFAULT: return "ff_NG";
+ }
+ return "ff";
+ case LANG_GAELIC:
+ switch (sub)
+ {
+ case 0x01: /* SCOTTISH */
+ /* old, superseded by LANG_SCOTTISH_GAELIC */
+ return "gd_GB";
+ case SUBLANG_IRISH_IRELAND: return "ga_IE";
+ }
+ return "ga";
+ case LANG_GALICIAN:
+ switch (sub)
+ {
+ case SUBLANG_GALICIAN_SPAIN: return "gl_ES";
+ }
+ return "gl";
+ case LANG_GEORGIAN:
+ switch (sub)
+ {
+ case SUBLANG_GEORGIAN_GEORGIA: return "ka_GE";
+ }
+ return "ka";
+ case LANG_GERMAN:
+ switch (sub)
+ {
+ case SUBLANG_GERMAN: return "de_DE";
+ case SUBLANG_GERMAN_SWISS: return "de_CH";
+ case SUBLANG_GERMAN_AUSTRIAN: return "de_AT";
+ case SUBLANG_GERMAN_LUXEMBOURG: return "de_LU";
+ case SUBLANG_GERMAN_LIECHTENSTEIN: return "de_LI";
+ }
+ return "de";
+ case LANG_GREEK:
+ switch (sub)
+ {
+ case SUBLANG_GREEK_GREECE: return "el_GR";
+ }
+ return "el";
+ case LANG_GREENLANDIC:
+ switch (sub)
+ {
+ case SUBLANG_GREENLANDIC_GREENLAND: return "kl_GL";
+ }
+ return "kl";
+ case LANG_GUARANI:
+ switch (sub)
+ {
+ case SUBLANG_DEFAULT: return "gn_PY";
+ }
+ return "gn";
+ case LANG_GUJARATI:
+ switch (sub)
+ {
+ case SUBLANG_GUJARATI_INDIA: return "gu_IN";
+ }
+ return "gu";
+ case LANG_HAUSA:
+ switch (sub)
+ {
+ case 0x1f: return "ha";
+ case SUBLANG_HAUSA_NIGERIA_LATIN: return "ha_NG";
+ }
+ return "ha";
+ case LANG_HAWAIIAN:
+ /* FIXME: Do they mean Hawaiian ("haw_US", 1000 speakers)
+ or Hawaii Creole English ("cpe_US", 600000 speakers)? */
+ switch (sub)
+ {
+ case SUBLANG_DEFAULT: return "cpe_US";
+ }
+ return "cpe";
+ case LANG_HEBREW:
+ switch (sub)
+ {
+ case SUBLANG_HEBREW_ISRAEL: return "he_IL";
+ }
+ return "he";
+ case LANG_HINDI:
+ switch (sub)
+ {
+ case SUBLANG_HINDI_INDIA: return "hi_IN";
+ }
+ return "hi";
+ case LANG_HUNGARIAN:
+ switch (sub)
+ {
+ case SUBLANG_HUNGARIAN_HUNGARY: return "hu_HU";
+ }
+ return "hu";
+ case LANG_IBIBIO:
+ switch (sub)
+ {
+ case SUBLANG_DEFAULT: return "nic_NG";
+ }
+ return "nic";
+ case LANG_ICELANDIC:
+ switch (sub)
+ {
+ case SUBLANG_ICELANDIC_ICELAND: return "is_IS";
+ }
+ return "is";
+ case LANG_IGBO:
+ switch (sub)
+ {
+ case SUBLANG_IGBO_NIGERIA: return "ig_NG";
+ }
+ return "ig";
+ case LANG_INDONESIAN:
+ switch (sub)
+ {
+ case SUBLANG_INDONESIAN_INDONESIA: return "id_ID";
+ }
+ return "id";
+ case LANG_INUKTITUT:
+ switch (sub)
+ {
+ case 0x1e: return "iu"; /* syllabic */
+ case SUBLANG_INUKTITUT_CANADA: return "iu_CA"; /* syllabic */
+ case 0x1f: return "iu@latin";
+ case SUBLANG_INUKTITUT_CANADA_LATIN: return "iu_CA@latin";
+ }
+ return "iu";
+ case LANG_ITALIAN:
+ switch (sub)
+ {
+ case SUBLANG_ITALIAN: return "it_IT";
+ case SUBLANG_ITALIAN_SWISS: return "it_CH";
+ }
+ return "it";
+ case LANG_JAPANESE:
+ switch (sub)
+ {
+ case SUBLANG_JAPANESE_JAPAN: return "ja_JP";
+ }
+ return "ja";
+ case LANG_KANNADA:
+ switch (sub)
+ {
+ case SUBLANG_KANNADA_INDIA: return "kn_IN";
+ }
+ return "kn";
+ case LANG_KANURI:
+ switch (sub)
+ {
+ case SUBLANG_DEFAULT: return "kr_NG";
+ }
+ return "kr";
+ case LANG_KASHMIRI:
+ switch (sub)
+ {
+ case SUBLANG_DEFAULT: return "ks_PK";
+ case SUBLANG_KASHMIRI_INDIA: return "ks_IN";
+ }
+ return "ks";
+ case LANG_KAZAK:
+ switch (sub)
+ {
+ case SUBLANG_KAZAK_KAZAKHSTAN: return "kk_KZ";
+ }
+ return "kk";
+ case LANG_KICHE:
+ /* FIXME: Adjust this when such locales appear on Unix. */
+ switch (sub)
+ {
+ case SUBLANG_KICHE_GUATEMALA: return "qut_GT";
+ }
+ return "qut";
+ case LANG_KINYARWANDA:
+ switch (sub)
+ {
+ case SUBLANG_KINYARWANDA_RWANDA: return "rw_RW";
+ }
+ return "rw";
+ case LANG_KONKANI:
+ /* FIXME: Adjust this when such locales appear on Unix. */
+ switch (sub)
+ {
+ case SUBLANG_KONKANI_INDIA: return "kok_IN";
+ }
+ return "kok";
+ case LANG_KOREAN:
+ switch (sub)
+ {
+ case SUBLANG_DEFAULT: return "ko_KR";
+ }
+ return "ko";
+ case LANG_KYRGYZ:
+ switch (sub)
+ {
+ case SUBLANG_KYRGYZ_KYRGYZSTAN: return "ky_KG";
+ }
+ return "ky";
+ case LANG_LAO:
+ switch (sub)
+ {
+ case SUBLANG_LAO_LAOS: return "lo_LA";
+ }
+ return "lo";
+ case LANG_LATIN:
+ switch (sub)
+ {
+ case SUBLANG_DEFAULT: return "la_VA";
+ }
+ return "la";
+ case LANG_LATVIAN:
+ switch (sub)
+ {
+ case SUBLANG_LATVIAN_LATVIA: return "lv_LV";
+ }
+ return "lv";
+ case LANG_LITHUANIAN:
+ switch (sub)
+ {
+ case SUBLANG_LITHUANIAN_LITHUANIA: return "lt_LT";
+ }
+ return "lt";
+ case LANG_LUXEMBOURGISH:
+ switch (sub)
+ {
+ case SUBLANG_LUXEMBOURGISH_LUXEMBOURG: return "lb_LU";
+ }
+ return "lb";
+ case LANG_MACEDONIAN:
+ switch (sub)
+ {
+ case SUBLANG_MACEDONIAN_MACEDONIA: return "mk_MK";
+ }
+ return "mk";
+ case LANG_MALAY:
+ switch (sub)
+ {
+ case SUBLANG_MALAY_MALAYSIA: return "ms_MY";
+ case SUBLANG_MALAY_BRUNEI_DARUSSALAM: return "ms_BN";
+ }
+ return "ms";
+ case LANG_MALAYALAM:
+ switch (sub)
+ {
+ case SUBLANG_MALAYALAM_INDIA: return "ml_IN";
+ }
+ return "ml";
+ case LANG_MALTESE:
+ switch (sub)
+ {
+ case SUBLANG_MALTESE_MALTA: return "mt_MT";
+ }
+ return "mt";
+ case LANG_MANIPURI:
+ /* FIXME: Adjust this when such locales appear on Unix. */
+ switch (sub)
+ {
+ case SUBLANG_DEFAULT: return "mni_IN";
+ }
+ return "mni";
+ case LANG_MAORI:
+ switch (sub)
+ {
+ case SUBLANG_MAORI_NEW_ZEALAND: return "mi_NZ";
+ }
+ return "mi";
+ case LANG_MAPUDUNGUN:
+ switch (sub)
+ {
+ case SUBLANG_MAPUDUNGUN_CHILE: return "arn_CL";
+ }
+ return "arn";
+ case LANG_MARATHI:
+ switch (sub)
+ {
+ case SUBLANG_MARATHI_INDIA: return "mr_IN";
+ }
+ return "mr";
+ case LANG_MOHAWK:
+ switch (sub)
+ {
+ case SUBLANG_MOHAWK_CANADA: return "moh_CA";
+ }
+ return "moh";
+ case LANG_MONGOLIAN:
+ switch (sub)
+ {
+ case SUBLANG_MONGOLIAN_CYRILLIC_MONGOLIA: case 0x1e: return "mn_MN";
+ case SUBLANG_MONGOLIAN_PRC: case 0x1f: return "mn_CN";
+ }
+ return "mn"; /* Ambiguous: could be "mn_CN" or "mn_MN". */
+ case LANG_NEPALI:
+ switch (sub)
+ {
+ case SUBLANG_NEPALI_NEPAL: return "ne_NP";
+ case SUBLANG_NEPALI_INDIA: return "ne_IN";
+ }
+ return "ne";
+ case LANG_NORWEGIAN:
+ switch (sub)
+ {
+ case 0x1f: return "nb";
+ case SUBLANG_NORWEGIAN_BOKMAL: return "nb_NO";
+ case 0x1e: return "nn";
+ case SUBLANG_NORWEGIAN_NYNORSK: return "nn_NO";
+ }
+ return "no";
+ case LANG_OCCITAN:
+ switch (sub)
+ {
+ case SUBLANG_OCCITAN_FRANCE: return "oc_FR";
+ }
+ return "oc";
+ case LANG_ORIYA:
+ switch (sub)
+ {
+ case SUBLANG_ORIYA_INDIA: return "or_IN";
+ }
+ return "or";
+ case LANG_OROMO:
+ switch (sub)
+ {
+ case SUBLANG_DEFAULT: return "om_ET";
+ }
+ return "om";
+ case LANG_PAPIAMENTU:
+ switch (sub)
+ {
+ case SUBLANG_DEFAULT: return "pap_AN";
+ }
+ return "pap";
+ case LANG_PASHTO:
+ switch (sub)
+ {
+ case SUBLANG_PASHTO_AFGHANISTAN: return "ps_AF";
+ }
+ return "ps"; /* Ambiguous: could be "ps_PK" or "ps_AF". */
+ case LANG_POLISH:
+ switch (sub)
+ {
+ case SUBLANG_POLISH_POLAND: return "pl_PL";
+ }
+ return "pl";
+ case LANG_PORTUGUESE:
+ switch (sub)
+ {
+ /* Hmm. SUBLANG_PORTUGUESE_BRAZILIAN == SUBLANG_DEFAULT.
+ Same phenomenon as SUBLANG_ENGLISH_US == SUBLANG_DEFAULT. */
+ case SUBLANG_PORTUGUESE_BRAZILIAN: return "pt_BR";
+ case SUBLANG_PORTUGUESE: return "pt_PT";
+ }
+ return "pt";
+ case LANG_PUNJABI:
+ switch (sub)
+ {
+ case SUBLANG_PUNJABI_INDIA: return "pa_IN"; /* Gurmukhi script */
+ case SUBLANG_PUNJABI_PAKISTAN: return "pa_PK"; /* Arabic script */
+ }
+ return "pa";
+ case LANG_QUECHUA:
+ /* Note: Microsoft uses the non-ISO language code "quz". */
+ switch (sub)
+ {
+ case SUBLANG_QUECHUA_BOLIVIA: return "qu_BO";
+ case SUBLANG_QUECHUA_ECUADOR: return "qu_EC";
+ case SUBLANG_QUECHUA_PERU: return "qu_PE";
+ }
+ return "qu";
+ case LANG_ROMANIAN:
+ switch (sub)
+ {
+ case SUBLANG_ROMANIAN_ROMANIA: return "ro_RO";
+ case SUBLANG_ROMANIAN_MOLDOVA: return "ro_MD";
+ }
+ return "ro";
+ case LANG_ROMANSH:
+ switch (sub)
+ {
+ case SUBLANG_ROMANSH_SWITZERLAND: return "rm_CH";
+ }
+ return "rm";
+ case LANG_RUSSIAN:
+ switch (sub)
+ {
+ case SUBLANG_RUSSIAN_RUSSIA: return "ru_RU";
+ case SUBLANG_RUSSIAN_MOLDAVIA: return "ru_MD";
+ }
+ return "ru"; /* Ambiguous: could be "ru_RU" or "ru_UA" or "ru_MD". */
+ case LANG_SAMI:
+ switch (sub)
+ {
+ /* Northern Sami */
+ case 0x00: return "se";
+ case SUBLANG_SAMI_NORTHERN_NORWAY: return "se_NO";
+ case SUBLANG_SAMI_NORTHERN_SWEDEN: return "se_SE";
+ case SUBLANG_SAMI_NORTHERN_FINLAND: return "se_FI";
+ /* Lule Sami */
+ case 0x1f: return "smj";
+ case SUBLANG_SAMI_LULE_NORWAY: return "smj_NO";
+ case SUBLANG_SAMI_LULE_SWEDEN: return "smj_SE";
+ /* Southern Sami */
+ case 0x1e: return "sma";
+ case SUBLANG_SAMI_SOUTHERN_NORWAY: return "sma_NO";
+ case SUBLANG_SAMI_SOUTHERN_SWEDEN: return "sma_SE";
+ /* Skolt Sami */
+ case 0x1d: return "sms";
+ case SUBLANG_SAMI_SKOLT_FINLAND: return "sms_FI";
+ /* Inari Sami */
+ case 0x1c: return "smn";
+ case SUBLANG_SAMI_INARI_FINLAND: return "smn_FI";
+ }
+ return "se"; /* or "smi"? */
+ case LANG_SANSKRIT:
+ switch (sub)
+ {
+ case SUBLANG_SANSKRIT_INDIA: return "sa_IN";
+ }
+ return "sa";
+ case LANG_SCOTTISH_GAELIC:
+ switch (sub)
+ {
+ case SUBLANG_DEFAULT: return "gd_GB";
+ }
+ return "gd";
+ case LANG_SINDHI:
+ switch (sub)
+ {
+ case SUBLANG_SINDHI_INDIA: return "sd_IN";
+ case SUBLANG_SINDHI_PAKISTAN: return "sd_PK";
+ /*case SUBLANG_SINDHI_AFGHANISTAN: return "sd_AF";*/
+ }
+ return "sd";
+ case LANG_SINHALESE:
+ switch (sub)
+ {
+ case SUBLANG_SINHALESE_SRI_LANKA: return "si_LK";
+ }
+ return "si";
+ case LANG_SLOVAK:
+ switch (sub)
+ {
+ case SUBLANG_SLOVAK_SLOVAKIA: return "sk_SK";
+ }
+ return "sk";
+ case LANG_SLOVENIAN:
+ switch (sub)
+ {
+ case SUBLANG_SLOVENIAN_SLOVENIA: return "sl_SI";
+ }
+ return "sl";
+ case LANG_SOMALI:
+ switch (sub)
+ {
+ case SUBLANG_DEFAULT: return "so_SO";
+ }
+ return "so";
+ case LANG_SORBIAN:
+ /* FIXME: Adjust this when such locales appear on Unix. */
+ switch (sub)
+ {
+ /* Upper Sorbian */
+ case 0x00: return "hsb";
+ case SUBLANG_UPPER_SORBIAN_GERMANY: return "hsb_DE";
+ /* Lower Sorbian */
+ case 0x1f: return "dsb";
+ case SUBLANG_LOWER_SORBIAN_GERMANY: return "dsb_DE";
+ }
+ 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>
+ it's the same as Northern Sotho. */
+ switch (sub)
+ {
+ case SUBLANG_SOTHO_SOUTH_AFRICA: return "nso_ZA";
+ }
+ return "nso";
+ case LANG_SPANISH:
+ switch (sub)
+ {
+ case SUBLANG_SPANISH: return "es_ES";
+ case SUBLANG_SPANISH_MEXICAN: return "es_MX";
+ case SUBLANG_SPANISH_MODERN:
+ return "es_ES@modern"; /* not seen on Unix */
+ case SUBLANG_SPANISH_GUATEMALA: return "es_GT";
+ case SUBLANG_SPANISH_COSTA_RICA: return "es_CR";
+ case SUBLANG_SPANISH_PANAMA: return "es_PA";
+ case SUBLANG_SPANISH_DOMINICAN_REPUBLIC: return "es_DO";
+ case SUBLANG_SPANISH_VENEZUELA: return "es_VE";
+ case SUBLANG_SPANISH_COLOMBIA: return "es_CO";
+ case SUBLANG_SPANISH_PERU: return "es_PE";
+ case SUBLANG_SPANISH_ARGENTINA: return "es_AR";
+ case SUBLANG_SPANISH_ECUADOR: return "es_EC";
+ case SUBLANG_SPANISH_CHILE: return "es_CL";
+ case SUBLANG_SPANISH_URUGUAY: return "es_UY";
+ case SUBLANG_SPANISH_PARAGUAY: return "es_PY";
+ case SUBLANG_SPANISH_BOLIVIA: return "es_BO";
+ case SUBLANG_SPANISH_EL_SALVADOR: return "es_SV";
+ case SUBLANG_SPANISH_HONDURAS: return "es_HN";
+ case SUBLANG_SPANISH_NICARAGUA: return "es_NI";
+ case SUBLANG_SPANISH_PUERTO_RICO: return "es_PR";
+ case SUBLANG_SPANISH_US: return "es_US";
+ }
+ return "es";
+ case LANG_SUTU:
+ switch (sub)
+ {
+ case SUBLANG_DEFAULT: return "bnt_TZ"; /* or "st_LS" or "nso_ZA"? */
+ }
+ return "bnt";
+ case LANG_SWAHILI:
+ switch (sub)
+ {
+ case SUBLANG_SWAHILI_KENYA: return "sw_KE";
+ }
+ return "sw";
+ case LANG_SWEDISH:
+ switch (sub)
+ {
+ case SUBLANG_SWEDISH_SWEDEN: return "sv_SE";
+ case SUBLANG_SWEDISH_FINLAND: return "sv_FI";
+ }
+ return "sv";
+ case LANG_SYRIAC:
+ switch (sub)
+ {
+ case SUBLANG_SYRIAC_SYRIA: return "syr_SY"; /* An extinct language. */
+ }
+ return "syr";
+ case LANG_TAGALOG:
+ switch (sub)
+ {
+ case SUBLANG_TAGALOG_PHILIPPINES: return "tl_PH"; /* or "fil_PH"? */
+ }
+ return "tl"; /* or "fil"? */
+ case LANG_TAJIK:
+ switch (sub)
+ {
+ case 0x1f: return "tg";
+ case SUBLANG_TAJIK_TAJIKISTAN: return "tg_TJ";
+ }
+ return "tg";
+ case LANG_TAMAZIGHT:
+ /* Note: Microsoft uses the non-ISO language code "tmz". */
+ switch (sub)
+ {
+ /* FIXME: Adjust this when Tamazight locales appear on Unix. */
+ case SUBLANG_TAMAZIGHT_ARABIC: return "ber_MA@arabic";
+ case 0x1f: return "ber@latin";
+ case SUBLANG_TAMAZIGHT_ALGERIA_LATIN: return "ber_DZ@latin";
+ }
+ return "ber";
+ case LANG_TAMIL:
+ switch (sub)
+ {
+ case SUBLANG_TAMIL_INDIA: return "ta_IN";
+ }
+ return "ta"; /* Ambiguous: could be "ta_IN" or "ta_LK" or "ta_SG". */
+ case LANG_TATAR:
+ switch (sub)
+ {
+ case SUBLANG_TATAR_RUSSIA: return "tt_RU";
+ }
+ return "tt";
+ case LANG_TELUGU:
+ switch (sub)
+ {
+ case SUBLANG_TELUGU_INDIA: return "te_IN";
+ }
+ return "te";
+ case LANG_THAI:
+ switch (sub)
+ {
+ case SUBLANG_THAI_THAILAND: return "th_TH";
+ }
+ return "th";
+ case LANG_TIBETAN:
+ switch (sub)
+ {
+ case SUBLANG_TIBETAN_PRC:
+ /* Most Tibetans would not like "bo_CN". But Tibet does not yet
+ have a country code of its own. */
+ return "bo";
+ case SUBLANG_TIBETAN_BHUTAN: return "bo_BT";
+ }
+ return "bo";
+ case LANG_TIGRINYA:
+ switch (sub)
+ {
+ case SUBLANG_TIGRINYA_ETHIOPIA: return "ti_ET";
+ case SUBLANG_TIGRINYA_ERITREA: return "ti_ER";
+ }
+ return "ti";
+ case LANG_TSONGA:
+ switch (sub)
+ {
+ case SUBLANG_DEFAULT: return "ts_ZA";
+ }
+ return "ts";
+ case LANG_TSWANA:
+ /* Spoken in South Africa, Botswana. */
+ switch (sub)
+ {
+ case SUBLANG_TSWANA_SOUTH_AFRICA: return "tn_ZA";
+ }
+ return "tn";
+ case LANG_TURKISH:
+ switch (sub)
+ {
+ case SUBLANG_TURKISH_TURKEY: return "tr_TR";
+ }
+ return "tr";
+ case LANG_TURKMEN:
+ switch (sub)
+ {
+ case SUBLANG_TURKMEN_TURKMENISTAN: return "tk_TM";
+ }
+ return "tk";
+ case LANG_UIGHUR:
+ switch (sub)
+ {
+ case SUBLANG_UIGHUR_PRC: return "ug_CN";
+ }
+ return "ug";
+ case LANG_UKRAINIAN:
+ switch (sub)
+ {
+ case SUBLANG_UKRAINIAN_UKRAINE: return "uk_UA";
+ }
+ return "uk";
+ case LANG_URDU:
+ switch (sub)
+ {
+ case SUBLANG_URDU_PAKISTAN: return "ur_PK";
+ case SUBLANG_URDU_INDIA: return "ur_IN";
+ }
+ return "ur";
+ case LANG_UZBEK:
+ switch (sub)
+ {
+ case 0x1f: return "uz";
+ case SUBLANG_UZBEK_LATIN: return "uz_UZ";
+ case 0x1e: return "uz@cyrillic";
+ case SUBLANG_UZBEK_CYRILLIC: return "uz_UZ@cyrillic";
+ }
+ return "uz";
+ case LANG_VENDA:
+ switch (sub)
+ {
+ case SUBLANG_DEFAULT: return "ve_ZA";
+ }
+ return "ve";
+ case LANG_VIETNAMESE:
+ switch (sub)
+ {
+ case SUBLANG_VIETNAMESE_VIETNAM: return "vi_VN";
+ }
+ return "vi";
+ case LANG_WELSH:
+ switch (sub)
+ {
+ case SUBLANG_WELSH_UNITED_KINGDOM: return "cy_GB";
+ }
+ return "cy";
+ case LANG_WOLOF:
+ switch (sub)
+ {
+ case SUBLANG_WOLOF_SENEGAL: return "wo_SN";
+ }
+ return "wo";
+ case LANG_XHOSA:
+ switch (sub)
+ {
+ case SUBLANG_XHOSA_SOUTH_AFRICA: return "xh_ZA";
+ }
+ return "xh";
+ case LANG_YAKUT:
+ switch (sub)
+ {
+ case SUBLANG_YAKUT_RUSSIA: return "sah_RU";
+ }
+ return "sah";
+ case LANG_YI:
+ switch (sub)
+ {
+ case SUBLANG_YI_PRC: return "ii_CN";
+ }
+ return "ii";
+ case LANG_YIDDISH:
+ switch (sub)
+ {
+ case SUBLANG_DEFAULT: return "yi_IL";
+ }
+ return "yi";
+ case LANG_YORUBA:
+ switch (sub)
+ {
+ case SUBLANG_YORUBA_NIGERIA: return "yo_NG";
+ }
+ return "yo";
+ case LANG_ZULU:
+ switch (sub)
+ {
+ case SUBLANG_ZULU_SOUTH_AFRICA: return "zu_ZA";
+ }
+ return "zu";
+ default: return "C";
+ }
+ }
+}
+
+# if !defined IN_LIBINTL
+static
+# endif
+const char *
+gl_locale_name_from_win32_LCID (LCID lcid)
+{
+ LANGID langid;
+
+ /* Strip off the sorting rules, keep only the language part. */
+ langid = LANGIDFROMLCID (lcid);
+
+ return gl_locale_name_from_win32_LANGID (langid);
+}
+
+# ifdef WINDOWS_NATIVE
+
+/* Two variables to interface between get_lcid and the EnumLocales
+ callback function below. */
+static LCID found_lcid;
+static char lname[LC_MAX * (LOCALE_NAME_MAX_LENGTH + 1) + 1];
+
+/* Callback function for EnumLocales. */
+static BOOL CALLBACK
+enum_locales_fn (LPTSTR locale_num_str)
+{
+ char *endp;
+ char locval[2 * LOCALE_NAME_MAX_LENGTH + 1 + 1];
+ LCID try_lcid = strtoul (locale_num_str, &endp, 16);
+
+ if (GetLocaleInfo (try_lcid, LOCALE_SENGLANGUAGE,
+ locval, LOCALE_NAME_MAX_LENGTH))
+ {
+ strcat (locval, "_");
+ if (GetLocaleInfo (try_lcid, LOCALE_SENGCOUNTRY,
+ locval + strlen (locval), LOCALE_NAME_MAX_LENGTH))
+ {
+ size_t locval_len = strlen (locval);
+
+ if (strncmp (locval, lname, locval_len) == 0
+ && (lname[locval_len] == '.'
+ || lname[locval_len] == '\0'))
+ {
+ found_lcid = try_lcid;
+ return FALSE;
+ }
+ }
+ }
+ return TRUE;
+}
+
+/* This lock protects the get_lcid against multiple simultaneous calls. */
+gl_lock_define_initialized(static, get_lcid_lock)
+
+/* Return the Locale ID (LCID) number given the locale's name, a
+ string, in LOCALE_NAME. This works by enumerating all the locales
+ supported by the system, until we find one whose name matches
+ LOCALE_NAME. */
+static LCID
+get_lcid (const char *locale_name)
+{
+ /* A simple cache. */
+ static LCID last_lcid;
+ static char last_locale[1000];
+
+ /* Lock while looking for an LCID, to protect access to static
+ variables: last_lcid, last_locale, found_lcid, and lname. */
+ gl_lock_lock (get_lcid_lock);
+ if (last_lcid > 0 && strcmp (locale_name, last_locale) == 0)
+ {
+ gl_lock_unlock (get_lcid_lock);
+ return last_lcid;
+ }
+ strncpy (lname, locale_name, sizeof (lname) - 1);
+ lname[sizeof (lname) - 1] = '\0';
+ found_lcid = 0;
+ EnumSystemLocales (enum_locales_fn, LCID_SUPPORTED);
+ if (found_lcid > 0)
+ {
+ last_lcid = found_lcid;
+ strcpy (last_locale, locale_name);
+ }
+ gl_lock_unlock (get_lcid_lock);
+ return found_lcid;
+}
+
+# endif
+#endif
+
+
+#if HAVE_USELOCALE /* glibc, Solaris >= 12 or Mac OS X */
+
+/* Simple hash set of strings. We don't want to drag in lots of hash table
+ code here. */
+
+# define SIZE_BITS (sizeof (size_t) * CHAR_BIT)
+
+/* A hash function for NUL-terminated char* strings using
+ the method described by Bruno Haible.
+ See http://www.haible.de/bruno/hashfunc.html. */
+static size_t _GL_ATTRIBUTE_PURE
+string_hash (const void *x)
+{
+ const char *s = (const char *) x;
+ size_t h = 0;
+
+ for (; *s; s++)
+ h = *s + ((h << 9) | (h >> (SIZE_BITS - 9)));
+
+ return h;
+}
+
+/* A hash table of fixed size. Multiple threads can access it read-only
+ simultaneously, but only one thread can insert into it at the same time. */
+
+/* A node in a hash bucket collision list. */
+struct hash_node
+ {
+ struct hash_node * volatile next;
+ char contents[FLEXIBLE_ARRAY_MEMBER];
+ };
+
+# define HASH_TABLE_SIZE 257
+static struct hash_node * volatile struniq_hash_table[HASH_TABLE_SIZE]
+ /* = { NULL, ..., NULL } */;
+
+/* This lock protects the struniq_hash_table against multiple simultaneous
+ insertions. */
+gl_lock_define_initialized(static, struniq_lock)
+
+/* Store a copy of the given string in a string pool with indefinite extent.
+ Return a pointer to this copy. */
+static const char *
+struniq (const char *string)
+{
+ size_t hashcode = string_hash (string);
+ size_t slot = hashcode % HASH_TABLE_SIZE;
+ size_t size;
+ struct hash_node *new_node;
+ struct hash_node *p;
+ for (p = struniq_hash_table[slot]; p != NULL; p = p->next)
+ if (strcmp (p->contents, string) == 0)
+ return p->contents;
+ size = strlen (string) + 1;
+ new_node =
+ (struct hash_node *)
+ malloc (FLEXSIZEOF (struct hash_node, contents, size));
+ if (new_node == NULL)
+ /* Out of memory. Return a statically allocated string. */
+ return "C";
+ memcpy (new_node->contents, string, size);
+ /* Lock while inserting new_node. */
+ gl_lock_lock (struniq_lock);
+ /* Check whether another thread already added the string while we were
+ waiting on the lock. */
+ for (p = struniq_hash_table[slot]; p != NULL; p = p->next)
+ if (strcmp (p->contents, string) == 0)
+ {
+ free (new_node);
+ new_node = p;
+ goto done;
+ }
+ /* Really insert new_node into the hash table. Fill new_node entirely first,
+ because other threads may be iterating over the linked list. */
+ new_node->next = struniq_hash_table[slot];
+ struniq_hash_table[slot] = new_node;
+ done:
+ /* Unlock after new_node is inserted. */
+ gl_lock_unlock (struniq_lock);
+ return new_node->contents;
+}
+
+#endif
+
+
+#if defined IN_LIBINTL || HAVE_USELOCALE
+
+/* Like gl_locale_name_thread, except that the result is not in storage of
+ indefinite extent. */
+# if !defined IN_LIBINTL
+static
+# endif
+const char *
+gl_locale_name_thread_unsafe (int category, const char *categoryname)
+{
+# if HAVE_USELOCALE
+ {
+ locale_t thread_locale = uselocale (NULL);
+ if (thread_locale != LC_GLOBAL_LOCALE)
+ {
+# 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>. */
+ const char *name =
+ nl_langinfo (_NL_ITEM ((category), _NL_ITEM_INDEX (-1)));
+ if (name[0] == '\0')
+ /* Fallback code for glibc < 2.4, which did not implement
+ nl_langinfo (_NL_LOCALE_NAME (category)). */
+ name = thread_locale->__names[category];
+ return name;
+# elif defined __FreeBSD__ || (defined __APPLE__ && defined __MACH__)
+ /* FreeBSD, Mac OS X */
+ int mask;
+
+ switch (category)
+ {
+ case LC_CTYPE:
+ mask = LC_CTYPE_MASK;
+ break;
+ case LC_NUMERIC:
+ mask = LC_NUMERIC_MASK;
+ break;
+ case LC_TIME:
+ mask = LC_TIME_MASK;
+ break;
+ case LC_COLLATE:
+ mask = LC_COLLATE_MASK;
+ break;
+ case LC_MONETARY:
+ mask = LC_MONETARY_MASK;
+ break;
+ case LC_MESSAGES:
+ mask = LC_MESSAGES_MASK;
+ break;
+ default: /* We shouldn't get here. */
+ return "";
+ }
+ return querylocale (mask, thread_locale);
+# elif defined __sun && HAVE_GETLOCALENAME_L
+ /* Solaris >= 12. */
+ return getlocalename_l (category, thread_locale);
+# elif defined __ANDROID__
+ return MB_CUR_MAX == 4 ? "C.UTF-8" : "C";
+# endif
+ }
+ }
+# endif
+ return NULL;
+}
+
+#endif
+
+const char *
+gl_locale_name_thread (int category, const char *categoryname)
+{
+#if HAVE_USELOCALE
+ const char *name = gl_locale_name_thread_unsafe (category, categoryname);
+ if (name != NULL)
+ return struniq (name);
+#elif defined WINDOWS_NATIVE
+ if (LC_MIN <= category && category <= LC_MAX)
+ {
+ char *locname = setlocale (category, NULL);
+ LCID lcid = 0;
+
+ /* If CATEGORY is LC_ALL, the result might be a semi-colon
+ separated list of locales. We need only one, so we take the
+ one corresponding to LC_CTYPE, as the most important for
+ character translations. */
+ if (strchr (locname, ';'))
+ locname = setlocale (LC_CTYPE, NULL);
+
+ /* Convert locale name to LCID. We don't want to use
+ LocaleNameToLCID because (a) it is only available since Vista,
+ and (b) it doesn't accept locale names returned by 'setlocale'. */
+ lcid = get_lcid (locname);
+
+ if (lcid > 0)
+ return gl_locale_name_from_win32_LCID (lcid);
+ }
+#endif
+ return NULL;
+}
+
+/* XPG3 defines the result of 'setlocale (category, NULL)' as:
+ "Directs 'setlocale()' to query 'category' and return the current
+ setting of 'local'."
+ However it does not specify the exact format. Neither do SUSV2 and
+ ISO C 99. So we can use this feature only on selected systems (e.g.
+ those using GNU C Library). */
+#if defined _LIBC || ((defined __GLIBC__ && __GLIBC__ >= 2) && !defined __UCLIBC__)
+# define HAVE_LOCALE_NULL
+#endif
+
+const char *
+gl_locale_name_posix (int category, const char *categoryname)
+{
+ /* Use the POSIX methods of looking to 'LC_ALL', 'LC_xxx', and 'LANG'.
+ On some systems this can be done by the 'setlocale' function itself. */
+#if defined HAVE_SETLOCALE && defined HAVE_LC_MESSAGES && defined HAVE_LOCALE_NULL
+ return setlocale (category, NULL);
+#else
+ /* On other systems we ignore what setlocale reports and instead look at the
+ environment variables directly. This is necessary
+ 1. on systems which have a facility for customizing the default locale
+ (Mac OS X, native Windows, Cygwin) and where the system's setlocale()
+ function ignores this default locale (Mac OS X, Cygwin), in two cases:
+ a. when the user missed to use the setlocale() override from libintl
+ (for example by not including <libintl.h>),
+ b. when setlocale supports only the "C" locale, such as on Cygwin
+ 1.5.x. In this case even the override from libintl cannot help.
+ 2. on all systems where setlocale supports only the "C" locale. */
+ /* Strictly speaking, it is a POSIX violation to look at the environment
+ variables regardless whether setlocale has been called or not. POSIX
+ says:
+ "For C-language programs, the POSIX locale shall be the
+ default locale when the setlocale() function is not called."
+ But we assume that all programs that use internationalized APIs call
+ setlocale (LC_ALL, ""). */
+ return gl_locale_name_environ (category, categoryname);
+#endif
+}
+
+const char *
+gl_locale_name_environ (int category, const char *categoryname)
+{
+ const char *retval;
+
+ /* Setting of LC_ALL overrides all other. */
+ retval = getenv ("LC_ALL");
+ if (retval != NULL && retval[0] != '\0')
+ return retval;
+ /* Next comes the name of the desired category. */
+ retval = getenv (categoryname);
+ if (retval != NULL && retval[0] != '\0')
+ return retval;
+ /* Last possibility is the LANG environment variable. */
+ retval = getenv ("LANG");
+ if (retval != NULL && retval[0] != '\0')
+ {
+#if HAVE_CFLOCALECOPYCURRENT || HAVE_CFPREFERENCESCOPYAPPVALUE
+ /* Mac OS X 10.2 or newer.
+ Ignore invalid LANG value set by the Terminal application. */
+ if (strcmp (retval, "UTF-8") != 0)
+#endif
+#if defined __CYGWIN__
+ /* Cygwin.
+ Ignore dummy LANG value set by ~/.profile. */
+ if (strcmp (retval, "C.UTF-8") != 0)
+#endif
+ return retval;
+ }
+
+ return NULL;
+}
+
+const char *
+gl_locale_name_default (void)
+{
+ /* POSIX:2001 says:
+ "All implementations shall define a locale as the default locale, to be
+ invoked when no environment variables are set, or set to the empty
+ string. This default locale can be the POSIX locale or any other
+ implementation-defined locale. Some implementations may provide
+ facilities for local installation administrators to set the default
+ locale, customizing it for each location. POSIX:2001 does not require
+ such a facility.
+
+ The systems with such a facility are Mac OS X and Windows: They provide a
+ GUI that allows the user to choose a locale.
+ - On Mac OS X, by default, none of LC_* or LANG are set. Starting with
+ Mac OS X 10.4 or 10.5, LANG is set for processes launched by the
+ 'Terminal' application (but sometimes to an incorrect value "UTF-8").
+ When no environment variable is set, setlocale (LC_ALL, "") uses the
+ "C" locale.
+ - On native Windows, by default, none of LC_* or LANG are set.
+ When no environment variable is set, setlocale (LC_ALL, "") uses the
+ locale chosen by the user.
+ - On Cygwin 1.5.x, by default, none of LC_* or LANG are set.
+ When no environment variable is set, setlocale (LC_ALL, "") uses the
+ "C" locale.
+ - On Cygwin 1.7, by default, LANG is set to "C.UTF-8" when the default
+ ~/.profile is executed.
+ When no environment variable is set, setlocale (LC_ALL, "") uses the
+ "C.UTF-8" locale, which operates in the same way as the "C" locale.
+ */
+
+#if !(HAVE_CFLOCALECOPYCURRENT || HAVE_CFPREFERENCESCOPYAPPVALUE || defined WINDOWS_NATIVE || defined __CYGWIN__)
+
+ /* The system does not have a way of setting the locale, other than the
+ POSIX specified environment variables. We use C as default locale. */
+ return "C";
+
+#else
+
+ /* Return an XPG style locale name language[_territory][@modifier].
+ Don't even bother determining the codeset; it's not useful in this
+ context, because message catalogs are not specific to a single
+ codeset. */
+
+# if HAVE_CFLOCALECOPYCURRENT || HAVE_CFPREFERENCESCOPYAPPVALUE
+ /* Mac OS X 10.2 or newer */
+ {
+ /* Cache the locale name, since CoreFoundation calls are expensive. */
+ static const char *cached_localename;
+
+ if (cached_localename == NULL)
+ {
+ char namebuf[256];
+# if HAVE_CFLOCALECOPYCURRENT /* Mac OS X 10.3 or newer */
+ CFLocaleRef locale = CFLocaleCopyCurrent ();
+ CFStringRef name = CFLocaleGetIdentifier (locale);
+
+ if (CFStringGetCString (name, namebuf, sizeof (namebuf),
+ kCFStringEncodingASCII))
+ {
+ gl_locale_name_canonicalize (namebuf);
+ cached_localename = strdup (namebuf);
+ }
+ CFRelease (locale);
+# elif HAVE_CFPREFERENCESCOPYAPPVALUE /* Mac OS X 10.2 or newer */
+ CFTypeRef value =
+ CFPreferencesCopyAppValue (CFSTR ("AppleLocale"),
+ kCFPreferencesCurrentApplication);
+ if (value != NULL
+ && CFGetTypeID (value) == CFStringGetTypeID ()
+ && CFStringGetCString ((CFStringRef)value,
+ namebuf, sizeof (namebuf),
+ kCFStringEncodingASCII))
+ {
+ gl_locale_name_canonicalize (namebuf);
+ cached_localename = strdup (namebuf);
+ }
+# endif
+ if (cached_localename == NULL)
+ cached_localename = "C";
+ }
+ return cached_localename;
+ }
+
+# endif
+
+# if defined WINDOWS_NATIVE || defined __CYGWIN__ /* Native Windows or Cygwin */
+ {
+ LCID lcid;
+
+ /* Use native Windows API locale ID. */
+ lcid = GetThreadLocale ();
+
+ return gl_locale_name_from_win32_LCID (lcid);
+ }
+# endif
+#endif
+}
+
+/* Determine the current locale's name, and canonicalize it into XPG syntax
+ language[_territory][.codeset][@modifier]
+ The codeset part in the result is not reliable; the locale_charset()
+ should be used for codeset information instead.
+ The result must not be freed; it is statically allocated. */
+
+const char *
+gl_locale_name (int category, const char *categoryname)
+{
+ const char *retval;
+
+ retval = gl_locale_name_thread (category, categoryname);
+ if (retval != NULL)
+ return retval;
+
+ retval = gl_locale_name_posix (category, categoryname);
+ if (retval != NULL)
+ return retval;
+
+ return gl_locale_name_default ();
+}
diff --git a/gnulib-tests/localename.h b/gnulib-tests/localename.h
new file mode 100644
index 0000000..17f0d85
--- /dev/null
+++ b/gnulib-tests/localename.h
@@ -0,0 +1,99 @@
+/* Determine name of the currently selected locale.
+ Copyright (C) 2007, 2009-2016 Free Software Foundation, Inc.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+#ifndef _GL_LOCALENAME_H
+#define _GL_LOCALENAME_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+
+/* Determine the current locale's name.
+ It considers both the POSIX notion of locale name (see functions
+ gl_locale_name_thread and gl_locale_name_posix) and the system notion
+ of locale name (see function gl_locale_name_default).
+ CATEGORY is a locale category abbreviation, as defined in <locale.h>,
+ but not LC_ALL. E.g. LC_MESSAGES.
+ CATEGORYNAME is the name of CATEGORY as a string, e.g. "LC_MESSAGES".
+ Return the locale category's name, canonicalized into XPG syntax
+ language[_territory][.codeset][@modifier]
+ The codeset part in the result is not reliable; the locale_charset()
+ should be used for codeset information instead.
+ The result must not be freed; it is statically allocated. */
+extern const char * gl_locale_name (int category, const char *categoryname);
+
+/* Determine the current per-thread locale's name, as specified by uselocale()
+ calls.
+ CATEGORY is a locale category abbreviation, as defined in <locale.h>,
+ but not LC_ALL. E.g. LC_MESSAGES.
+ CATEGORYNAME is the name of CATEGORY as a string, e.g. "LC_MESSAGES".
+ Return the locale category's name, canonicalized into XPG syntax
+ language[_territory][.codeset][@modifier]
+ or NULL if no locale has been specified for the current thread.
+ The codeset part in the result is not reliable; the locale_charset()
+ should be used for codeset information instead.
+ The result must not be freed; it is statically allocated. */
+extern const char * gl_locale_name_thread (int category, const char *categoryname);
+
+/* Determine the thread-independent current locale's name, as specified by
+ setlocale() calls or by environment variables.
+ CATEGORY is a locale category abbreviation, as defined in <locale.h>,
+ but not LC_ALL. E.g. LC_MESSAGES.
+ CATEGORYNAME is the name of CATEGORY as a string, e.g. "LC_MESSAGES".
+ Return the locale category's name, canonicalized into XPG syntax
+ language[_territory][.codeset][@modifier]
+ or NULL if no locale has been specified to setlocale() or by environment
+ variables.
+ The codeset part in the result is not reliable; the locale_charset()
+ should be used for codeset information instead.
+ The result must not be freed; it is statically allocated. */
+extern const char * gl_locale_name_posix (int category, const char *categoryname);
+
+/* Determine the default locale's name, as specified by environment
+ variables.
+ Return the locale category's name, or NULL if no locale has been specified
+ by environment variables.
+ The result must not be freed; it is statically allocated. */
+extern const char * gl_locale_name_environ (int category, const char *categoryname);
+
+/* Determine the default locale's name. This is the current locale's name,
+ if not specified by uselocale() calls, by setlocale() calls, or by
+ environment variables. This locale name is usually determined by systems
+ settings that the user can manipulate through a GUI.
+
+ Quoting POSIX:2001:
+ "All implementations shall define a locale as the default locale,
+ to be invoked when no environment variables are set, or set to the
+ empty string. This default locale can be the C locale or any other
+ implementation-defined locale. Some implementations may provide
+ facilities for local installation administrators to set the default
+ locale, customizing it for each location. IEEE Std 1003.1-2001 does
+ not require such a facility."
+
+ The result must not be freed; it is statically allocated. */
+extern const char * gl_locale_name_default (void)
+#if !(HAVE_CFLOCALECOPYCURRENT || HAVE_CFPREFERENCESCOPYAPPVALUE \
+ || defined _WIN32 || defined __WIN32__ || defined __CYGWIN__)
+ _GL_ATTRIBUTE_CONST
+#endif
+ ;
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* _GL_LOCALENAME_H */
diff --git a/gnulib-tests/lseek.c b/gnulib-tests/lseek.c
new file mode 100644
index 0000000..2a95a07
--- /dev/null
+++ b/gnulib-tests/lseek.c
@@ -0,0 +1,67 @@
+/* An lseek() function that detects pipes.
+ Copyright (C) 2007, 2009-2016 Free Software Foundation, Inc.
+
+ This 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 <http://www.gnu.org/licenses/>. */
+
+#include <config.h>
+
+/* Specification. */
+#include <unistd.h>
+
+#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
+/* Windows platforms. */
+/* Get GetFileType. */
+# include <windows.h>
+/* Get _get_osfhandle. */
+# include "msvc-nothrow.h"
+#else
+# include <sys/stat.h>
+#endif
+#include <errno.h>
+
+#undef lseek
+
+off_t
+rpl_lseek (int fd, off_t offset, int whence)
+{
+#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
+ /* mingw lseek mistakenly succeeds on pipes, sockets, and terminals. */
+ HANDLE h = (HANDLE) _get_osfhandle (fd);
+ if (h == INVALID_HANDLE_VALUE)
+ {
+ errno = EBADF;
+ return -1;
+ }
+ if (GetFileType (h) != FILE_TYPE_DISK)
+ {
+ errno = ESPIPE;
+ return -1;
+ }
+#else
+ /* BeOS lseek mistakenly succeeds on pipes... */
+ struct stat statbuf;
+ if (fstat (fd, &statbuf) < 0)
+ return -1;
+ if (!S_ISREG (statbuf.st_mode))
+ {
+ errno = ESPIPE;
+ return -1;
+ }
+#endif
+#if _GL_WINDOWS_64_BIT_OFF_T
+ return _lseeki64 (fd, offset, whence);
+#else
+ return lseek (fd, offset, whence);
+#endif
+}
diff --git a/gnulib-tests/macros.h b/gnulib-tests/macros.h
new file mode 100644
index 0000000..578bfe7
--- /dev/null
+++ b/gnulib-tests/macros.h
@@ -0,0 +1,73 @@
+/* Common macros used by gnulib tests.
+ Copyright (C) 2006-2016 Free Software Foundation, Inc.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+
+/* This file contains macros that are used by many gnulib tests.
+ Put here only frequently used macros, say, used by 10 tests or more. */
+
+#include <stdio.h>
+#include <stdlib.h>
+
+/* Define ASSERT_STREAM before including this file if ASSERT must
+ target a stream other than stderr. */
+#ifndef ASSERT_STREAM
+# define ASSERT_STREAM stderr
+#endif
+
+/* ASSERT (condition);
+ verifies that the specified condition is fulfilled. If not, a message
+ is printed to ASSERT_STREAM if defined (defaulting to stderr if
+ undefined) and the program is terminated with an error code.
+
+ This macro has the following properties:
+ - The programmer specifies the expected condition, not the failure
+ condition. This simplifies thinking.
+ - The condition is tested always, regardless of compilation flags.
+ (Unlike the macro from <assert.h>.)
+ - On Unix platforms, the tester can debug the test program with a
+ debugger (provided core dumps are enabled: "ulimit -c unlimited").
+ - For the sake of platforms where no debugger is available (such as
+ some mingw systems), an error message is printed on the error
+ stream that includes the source location of the ASSERT invocation.
+ */
+#define ASSERT(expr) \
+ do \
+ { \
+ if (!(expr)) \
+ { \
+ fprintf (ASSERT_STREAM, "%s:%d: assertion '%s' failed\n", \
+ __FILE__, __LINE__, #expr); \
+ fflush (ASSERT_STREAM); \
+ abort (); \
+ } \
+ } \
+ while (0)
+
+/* SIZEOF (array)
+ returns the number of elements of an array. It works for arrays that are
+ declared outside functions and for local variables of array type. It does
+ *not* work for function parameters of array type, because they are actually
+ parameters of pointer type. */
+#define SIZEOF(array) (sizeof (array) / sizeof (array[0]))
+
+/* STREQ (str1, str2)
+ Return true if two strings compare equal. */
+#define STREQ(a, b) (strcmp (a, b) == 0)
+
+/* Some numbers in the interval [0,1). */
+extern const float randomf[1000];
+extern const double randomd[1000];
+extern const long double randoml[1000];
diff --git a/gnulib-tests/open.c b/gnulib-tests/open.c
new file mode 100644
index 0000000..e9c3120
--- /dev/null
+++ b/gnulib-tests/open.c
@@ -0,0 +1,181 @@
+/* Open a descriptor to a file.
+ Copyright (C) 2007-2016 Free Software Foundation, Inc.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+/* Written by Bruno Haible <bruno@clisp.org>, 2007. */
+
+/* If the user's config.h happens to include <fcntl.h>, let it include only
+ the system's <fcntl.h> here, so that orig_open doesn't recurse to
+ rpl_open. */
+#define __need_system_fcntl_h
+#include <config.h>
+
+/* Get the original definition of open. It might be defined as a macro. */
+#include <fcntl.h>
+#include <sys/types.h>
+#undef __need_system_fcntl_h
+
+static int
+orig_open (const char *filename, int flags, mode_t mode)
+{
+ return open (filename, flags, mode);
+}
+
+/* Specification. */
+/* Write "fcntl.h" here, not <fcntl.h>, otherwise OSF/1 5.1 DTK cc eliminates
+ this include because of the preliminary #include <fcntl.h> above. */
+#include "fcntl.h"
+
+#include <errno.h>
+#include <stdarg.h>
+#include <string.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <unistd.h>
+
+#ifndef REPLACE_OPEN_DIRECTORY
+# define REPLACE_OPEN_DIRECTORY 0
+#endif
+
+int
+open (const char *filename, int flags, ...)
+{
+ mode_t mode;
+ int fd;
+
+ mode = 0;
+ if (flags & O_CREAT)
+ {
+ va_list arg;
+ va_start (arg, flags);
+
+ /* We have to use PROMOTED_MODE_T instead of mode_t, otherwise GCC 4
+ creates crashing code when 'mode_t' is smaller than 'int'. */
+ mode = va_arg (arg, PROMOTED_MODE_T);
+
+ va_end (arg);
+ }
+
+#if GNULIB_defined_O_NONBLOCK
+ /* The only known platform that lacks O_NONBLOCK is mingw, but it
+ also lacks named pipes and Unix sockets, which are the only two
+ file types that require non-blocking handling in open().
+ Therefore, it is safe to ignore O_NONBLOCK here. It is handy
+ that mingw also lacks openat(), so that is also covered here. */
+ flags &= ~O_NONBLOCK;
+#endif
+
+#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
+ if (strcmp (filename, "/dev/null") == 0)
+ filename = "NUL";
+#endif
+
+#if OPEN_TRAILING_SLASH_BUG
+ /* If the filename ends in a slash and one of O_CREAT, O_WRONLY, O_RDWR
+ is specified, then fail.
+ Rationale: POSIX <http://www.opengroup.org/susv3/basedefs/xbd_chap04.html>
+ says that
+ "A pathname that contains at least one non-slash character and that
+ ends with one or more trailing slashes shall be resolved as if a
+ single dot character ( '.' ) were appended to the pathname."
+ and
+ "The special filename dot shall refer to the directory specified by
+ its predecessor."
+ If the named file already exists as a directory, then
+ - if O_CREAT is specified, open() must fail because of the semantics
+ of O_CREAT,
+ - if O_WRONLY or O_RDWR is specified, open() must fail because POSIX
+ <http://www.opengroup.org/susv3/functions/open.html> says that it
+ fails with errno = EISDIR in this case.
+ If the named file does not exist or does not name a directory, then
+ - if O_CREAT is specified, open() must fail since open() cannot create
+ directories,
+ - if O_WRONLY or O_RDWR is specified, open() must fail because the
+ file does not contain a '.' directory. */
+ if (flags & (O_CREAT | O_WRONLY | O_RDWR))
+ {
+ size_t len = strlen (filename);
+ if (len > 0 && filename[len - 1] == '/')
+ {
+ errno = EISDIR;
+ return -1;
+ }
+ }
+#endif
+
+ fd = orig_open (filename, flags, mode);
+
+#if REPLACE_FCHDIR
+ /* Implementing fchdir and fdopendir requires the ability to open a
+ directory file descriptor. If open doesn't support that (as on
+ mingw), we use a dummy file that behaves the same as directories
+ on Linux (ie. always reports EOF on attempts to read()), and
+ override fstat() in fchdir.c to hide the fact that we have a
+ dummy. */
+ if (REPLACE_OPEN_DIRECTORY && fd < 0 && errno == EACCES
+ && ((flags & O_ACCMODE) == O_RDONLY
+ || (O_SEARCH != O_RDONLY && (flags & O_ACCMODE) == O_SEARCH)))
+ {
+ struct stat statbuf;
+ if (stat (filename, &statbuf) == 0 && S_ISDIR (statbuf.st_mode))
+ {
+ /* Maximum recursion depth of 1. */
+ fd = open ("/dev/null", flags, mode);
+ if (0 <= fd)
+ fd = _gl_register_fd (fd, filename);
+ }
+ else
+ errno = EACCES;
+ }
+#endif
+
+#if OPEN_TRAILING_SLASH_BUG
+ /* If the filename ends in a slash and fd does not refer to a directory,
+ then fail.
+ Rationale: POSIX <http://www.opengroup.org/susv3/basedefs/xbd_chap04.html>
+ says that
+ "A pathname that contains at least one non-slash character and that
+ ends with one or more trailing slashes shall be resolved as if a
+ single dot character ( '.' ) were appended to the pathname."
+ and
+ "The special filename dot shall refer to the directory specified by
+ its predecessor."
+ If the named file without the slash is not a directory, open() must fail
+ with ENOTDIR. */
+ if (fd >= 0)
+ {
+ /* We know len is positive, since open did not fail with ENOENT. */
+ size_t len = strlen (filename);
+ if (filename[len - 1] == '/')
+ {
+ struct stat statbuf;
+
+ if (fstat (fd, &statbuf) >= 0 && !S_ISDIR (statbuf.st_mode))
+ {
+ close (fd);
+ errno = ENOTDIR;
+ return -1;
+ }
+ }
+ }
+#endif
+
+#if REPLACE_FCHDIR
+ if (!REPLACE_OPEN_DIRECTORY && 0 <= fd)
+ fd = _gl_register_fd (fd, filename);
+#endif
+
+ return fd;
+}
diff --git a/gnulib-tests/opendir.c b/gnulib-tests/opendir.c
new file mode 100644
index 0000000..a135fd8
--- /dev/null
+++ b/gnulib-tests/opendir.c
@@ -0,0 +1,169 @@
+/* Start reading the entries of a directory.
+ Copyright (C) 2006-2016 Free Software Foundation, Inc.
+
+ This 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>
+
+/* Specification. */
+#include <dirent.h>
+
+#include <errno.h>
+#include <stddef.h>
+
+#if HAVE_OPENDIR
+
+/* Override opendir(), to keep track of the open file descriptors.
+ Needed because there is a function dirfd(). */
+
+#else
+
+# include <stdlib.h>
+
+# include "dirent-private.h"
+# include "filename.h"
+
+#endif
+
+#if REPLACE_FCHDIR
+# include <unistd.h>
+#endif
+
+#ifdef __KLIBC__
+# include <io.h>
+# include <fcntl.h>
+#endif
+
+DIR *
+opendir (const char *dir_name)
+{
+#if HAVE_OPENDIR
+# undef opendir
+ DIR *dirp;
+
+ dirp = opendir (dir_name);
+ if (dirp == NULL)
+ return NULL;
+
+# ifdef __KLIBC__
+ {
+ int fd = open (dir_name, O_RDONLY);
+ if (fd == -1 || _gl_register_dirp_fd (fd, dirp))
+ {
+ int saved_errno = errno;
+
+ close (fd);
+ closedir (dirp);
+
+ errno = saved_errno;
+
+ return NULL;
+ }
+ }
+# endif
+#else
+
+ char dir_name_mask[MAX_PATH + 1 + 1 + 1];
+ int status;
+ HANDLE current;
+ WIN32_FIND_DATA entry;
+ struct gl_directory *dirp;
+
+ if (dir_name[0] == '\0')
+ {
+ errno = ENOENT;
+ return NULL;
+ }
+
+ /* Make the dir_name absolute, so that we continue reading the same
+ directory if the current directory changed between this opendir()
+ call and a subsequent rewinddir() call. */
+ if (!GetFullPathName (dir_name, MAX_PATH, dir_name_mask, NULL))
+ {
+ errno = EINVAL;
+ return NULL;
+ }
+
+ /* Append the mask.
+ "*" and "*.*" appear to be equivalent. */
+ {
+ char *p;
+
+ p = dir_name_mask + strlen (dir_name_mask);
+ if (p > dir_name_mask && !ISSLASH (p[-1]))
+ *p++ = '\\';
+ *p++ = '*';
+ *p = '\0';
+ }
+
+ /* Start searching the directory. */
+ status = -1;
+ current = FindFirstFile (dir_name_mask, &entry);
+ if (current == INVALID_HANDLE_VALUE)
+ {
+ switch (GetLastError ())
+ {
+ case ERROR_FILE_NOT_FOUND:
+ status = -2;
+ break;
+ case ERROR_PATH_NOT_FOUND:
+ errno = ENOENT;
+ return NULL;
+ case ERROR_DIRECTORY:
+ errno = ENOTDIR;
+ return NULL;
+ case ERROR_ACCESS_DENIED:
+ errno = EACCES;
+ return NULL;
+ default:
+ errno = EIO;
+ return NULL;
+ }
+ }
+
+ /* Allocate the result. */
+ dirp =
+ (struct gl_directory *)
+ malloc (offsetof (struct gl_directory, dir_name_mask[0])
+ + strlen (dir_name_mask) + 1);
+ if (dirp == NULL)
+ {
+ if (current != INVALID_HANDLE_VALUE)
+ FindClose (current);
+ errno = ENOMEM;
+ return NULL;
+ }
+ dirp->status = status;
+ dirp->current = current;
+ if (status == -1)
+ memcpy (&dirp->entry, &entry, sizeof (WIN32_FIND_DATA));
+ strcpy (dirp->dir_name_mask, dir_name_mask);
+
+#endif
+
+#if REPLACE_FCHDIR
+ {
+ int fd = dirfd (dirp);
+ if (0 <= fd && _gl_register_fd (fd, dir_name) != fd)
+ {
+ int saved_errno = errno;
+ closedir (dirp);
+ errno = saved_errno;
+ return NULL;
+ }
+ }
+#endif
+
+ return dirp;
+}
diff --git a/gnulib-tests/putenv.c b/gnulib-tests/putenv.c
new file mode 100644
index 0000000..e67712d
--- /dev/null
+++ b/gnulib-tests/putenv.c
@@ -0,0 +1,194 @@
+/* Copyright (C) 1991, 1994, 1997-1998, 2000, 2003-2016 Free Software
+ Foundation, Inc.
+
+ NOTE: The canonical source of this file is maintained with the GNU C
+ Library. Bugs can be reported to bug-glibc@prep.ai.mit.edu.
+
+ This 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 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>
+
+/* Specification. */
+#include <stdlib.h>
+
+#include <stddef.h>
+
+/* Include errno.h *after* sys/types.h to work around header problems
+ on AIX 3.2.5. */
+#include <errno.h>
+#ifndef __set_errno
+# define __set_errno(ev) ((errno) = (ev))
+#endif
+
+#include <string.h>
+#include <unistd.h>
+
+#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
+# define WIN32_LEAN_AND_MEAN
+# include <windows.h>
+#endif
+
+#if _LIBC
+# if HAVE_GNU_LD
+# define environ __environ
+# else
+extern char **environ;
+# endif
+#endif
+
+#if _LIBC
+/* This lock protects against simultaneous modifications of 'environ'. */
+# include <bits/libc-lock.h>
+__libc_lock_define_initialized (static, envlock)
+# define LOCK __libc_lock_lock (envlock)
+# define UNLOCK __libc_lock_unlock (envlock)
+#else
+# define LOCK
+# define UNLOCK
+#endif
+
+static int
+_unsetenv (const char *name)
+{
+ size_t len;
+#if !HAVE_DECL__PUTENV
+ char **ep;
+#endif
+
+ if (name == NULL || *name == '\0' || strchr (name, '=') != NULL)
+ {
+ __set_errno (EINVAL);
+ return -1;
+ }
+
+ len = strlen (name);
+
+#if HAVE_DECL__PUTENV
+ {
+ int putenv_result, putenv_errno;
+ char *name_ = malloc (len + 2);
+ memcpy (name_, name, len);
+ name_[len] = '=';
+ name_[len + 1] = 0;
+ putenv_result = _putenv (name_);
+ putenv_errno = errno;
+ free (name_);
+ __set_errno (putenv_errno);
+ return putenv_result;
+ }
+#else
+
+ LOCK;
+
+ ep = environ;
+ while (*ep != NULL)
+ if (!strncmp (*ep, name, len) && (*ep)[len] == '=')
+ {
+ /* Found it. Remove this pointer by moving later ones back. */
+ char **dp = ep;
+
+ do
+ dp[0] = dp[1];
+ while (*dp++);
+ /* Continue the loop in case NAME appears again. */
+ }
+ else
+ ++ep;
+
+ UNLOCK;
+
+ return 0;
+#endif
+}
+
+
+/* Put STRING, which is of the form "NAME=VALUE", in the environment.
+ If STRING contains no '=', then remove STRING from the environment. */
+int
+putenv (char *string)
+{
+ const char *name_end = strchr (string, '=');
+ char **ep;
+
+ if (name_end == NULL)
+ {
+ /* Remove the variable from the environment. */
+ return _unsetenv (string);
+ }
+
+#if HAVE_DECL__PUTENV
+ /* Rely on _putenv to allocate the new environment. If other
+ parts of the application use _putenv, the !HAVE_DECL__PUTENV code
+ would fight over who owns the environ vector, causing a crash. */
+ if (name_end[1])
+ return _putenv (string);
+ else
+ {
+ /* _putenv ("NAME=") unsets NAME, so invoke _putenv ("NAME= ")
+ to allocate the environ vector and then replace the new
+ entry with "NAME=". */
+ int putenv_result, putenv_errno;
+ char *name_x = malloc (name_end - string + sizeof "= ");
+ if (!name_x)
+ return -1;
+ memcpy (name_x, string, name_end - string + 1);
+ name_x[name_end - string + 1] = ' ';
+ name_x[name_end - string + 2] = 0;
+ putenv_result = _putenv (name_x);
+ putenv_errno = errno;
+ for (ep = environ; *ep; ep++)
+ if (strcmp (*ep, name_x) == 0)
+ {
+ *ep = string;
+ break;
+ }
+# if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
+ if (putenv_result == 0)
+ {
+ /* _putenv propagated "NAME= " into the subprocess environment;
+ fix that by calling SetEnvironmentVariable directly. */
+ name_x[name_end - string] = 0;
+ putenv_result = SetEnvironmentVariable (name_x, "") ? 0 : -1;
+ putenv_errno = ENOMEM; /* ENOMEM is the only way to fail. */
+ }
+# endif
+ free (name_x);
+ __set_errno (putenv_errno);
+ return putenv_result;
+ }
+#else
+ for (ep = environ; *ep; ep++)
+ if (strncmp (*ep, string, name_end - string) == 0
+ && (*ep)[name_end - string] == '=')
+ break;
+
+ if (*ep)
+ *ep = string;
+ else
+ {
+ static char **last_environ = NULL;
+ size_t size = ep - environ;
+ char **new_environ = malloc ((size + 2) * sizeof *new_environ);
+ if (! new_environ)
+ return -1;
+ new_environ[0] = string;
+ memcpy (new_environ + 1, environ, (size + 1) * sizeof *new_environ);
+ free (last_environ);
+ last_environ = new_environ;
+ environ = new_environ;
+ }
+
+ return 0;
+#endif
+}
diff --git a/gnulib-tests/read-file.c b/gnulib-tests/read-file.c
new file mode 100644
index 0000000..f7b1199
--- /dev/null
+++ b/gnulib-tests/read-file.c
@@ -0,0 +1,188 @@
+/* read-file.c -- read file contents into a string
+ Copyright (C) 2006, 2009-2016 Free Software Foundation, Inc.
+ Written by Simon Josefsson and Bruno Haible.
+
+ This 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 <http://www.gnu.org/licenses/>. */
+
+#include <config.h>
+
+#include "read-file.h"
+
+/* Get fstat. */
+#include <sys/stat.h>
+
+/* Get ftello. */
+#include <stdio.h>
+
+/* Get SIZE_MAX. */
+#include <stdint.h>
+
+/* Get malloc, realloc, free. */
+#include <stdlib.h>
+
+/* Get errno. */
+#include <errno.h>
+
+/* Read a STREAM and return a newly allocated string with the content,
+ and set *LENGTH to the length of the string. The string is
+ zero-terminated, but the terminating zero byte is not counted in
+ *LENGTH. On errors, *LENGTH is undefined, errno preserves the
+ values set by system functions (if any), and NULL is returned. */
+char *
+fread_file (FILE *stream, size_t *length)
+{
+ char *buf = NULL;
+ size_t alloc = BUFSIZ;
+
+ /* For a regular file, allocate a buffer that has exactly the right
+ size. This avoids the need to do dynamic reallocations later. */
+ {
+ struct stat st;
+
+ if (fstat (fileno (stream), &st) >= 0 && S_ISREG (st.st_mode))
+ {
+ off_t pos = ftello (stream);
+
+ if (pos >= 0 && pos < st.st_size)
+ {
+ off_t alloc_off = st.st_size - pos;
+
+ /* '1' below, accounts for the trailing NUL. */
+ if (SIZE_MAX - 1 < alloc_off)
+ {
+ errno = ENOMEM;
+ return NULL;
+ }
+
+ alloc = alloc_off + 1;
+ }
+ }
+ }
+
+ if (!(buf = malloc (alloc)))
+ return NULL; /* errno is ENOMEM. */
+
+ {
+ size_t size = 0; /* number of bytes read so far */
+ int save_errno;
+
+ for (;;)
+ {
+ /* This reads 1 more than the size of a regular file
+ so that we get eof immediately. */
+ size_t requested = alloc - size;
+ size_t count = fread (buf + size, 1, requested, stream);
+ size += count;
+
+ if (count != requested)
+ {
+ save_errno = errno;
+ if (ferror (stream))
+ break;
+
+ /* Shrink the allocated memory if possible. */
+ if (size < alloc - 1)
+ {
+ char *smaller_buf = realloc (buf, size + 1);
+ if (smaller_buf != NULL)
+ buf = smaller_buf;
+ }
+
+ buf[size] = '\0';
+ *length = size;
+ return buf;
+ }
+
+ {
+ char *new_buf;
+
+ if (alloc == SIZE_MAX)
+ {
+ save_errno = ENOMEM;
+ break;
+ }
+
+ if (alloc < SIZE_MAX - alloc / 2)
+ alloc = alloc + alloc / 2;
+ else
+ alloc = SIZE_MAX;
+
+ if (!(new_buf = realloc (buf, alloc)))
+ {
+ save_errno = errno;
+ break;
+ }
+
+ buf = new_buf;
+ }
+ }
+
+ free (buf);
+ errno = save_errno;
+ return NULL;
+ }
+}
+
+static char *
+internal_read_file (const char *filename, size_t *length, const char *mode)
+{
+ FILE *stream = fopen (filename, mode);
+ char *out;
+ int save_errno;
+
+ if (!stream)
+ return NULL;
+
+ out = fread_file (stream, length);
+
+ save_errno = errno;
+
+ if (fclose (stream) != 0)
+ {
+ if (out)
+ {
+ save_errno = errno;
+ free (out);
+ }
+ errno = save_errno;
+ return NULL;
+ }
+
+ return out;
+}
+
+/* Open and read the contents of FILENAME, and return a newly
+ allocated string with the content, and set *LENGTH to the length of
+ the string. The string is zero-terminated, but the terminating
+ zero byte is not counted in *LENGTH. On errors, *LENGTH is
+ undefined, errno preserves the values set by system functions (if
+ any), and NULL is returned. */
+char *
+read_file (const char *filename, size_t *length)
+{
+ return internal_read_file (filename, length, "r");
+}
+
+/* Open (on non-POSIX systems, in binary mode) and read the contents
+ of FILENAME, and return a newly allocated string with the content,
+ and set LENGTH to the length of the string. The string is
+ zero-terminated, but the terminating zero byte is not counted in
+ the LENGTH variable. On errors, *LENGTH is undefined, errno
+ preserves the values set by system functions (if any), and NULL is
+ returned. */
+char *
+read_binary_file (const char *filename, size_t *length)
+{
+ return internal_read_file (filename, length, "rb");
+}
diff --git a/gnulib-tests/read-file.h b/gnulib-tests/read-file.h
new file mode 100644
index 0000000..6248065
--- /dev/null
+++ b/gnulib-tests/read-file.h
@@ -0,0 +1,33 @@
+/* read-file.h -- read file contents into a string
+ Copyright (C) 2006, 2009-2016 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 <http://www.gnu.org/licenses/>. */
+
+#ifndef READ_FILE_H
+#define READ_FILE_H
+
+/* Get size_t. */
+#include <stddef.h>
+
+/* Get FILE. */
+#include <stdio.h>
+
+extern char *fread_file (FILE * stream, size_t * length);
+
+extern char *read_file (const char *filename, size_t * length);
+
+extern char *read_binary_file (const char *filename, size_t * length);
+
+#endif /* READ_FILE_H */
diff --git a/gnulib-tests/readdir.c b/gnulib-tests/readdir.c
new file mode 100644
index 0000000..76b7e9d
--- /dev/null
+++ b/gnulib-tests/readdir.c
@@ -0,0 +1,98 @@
+/* Read the next entry of a directory.
+ Copyright (C) 2011-2016 Free Software Foundation, Inc.
+
+ This 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>
+
+/* Specification. */
+#include <dirent.h>
+
+#include <errno.h>
+#include <stddef.h>
+
+#include "dirent-private.h"
+
+struct dirent *
+readdir (DIR *dirp)
+{
+ char type;
+ struct dirent *result;
+
+ /* There is no need to add code to produce entries for "." and "..".
+ According to the POSIX:2008 section "4.12 Pathname Resolution"
+ <http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap04.html>
+ "." and ".." are syntactic entities.
+ POSIX also says:
+ "If entries for dot or dot-dot exist, one entry shall be returned
+ for dot and one entry shall be returned for dot-dot; otherwise,
+ they shall not be returned." */
+
+ switch (dirp->status)
+ {
+ case -2:
+ /* End of directory already reached. */
+ return NULL;
+ case -1:
+ break;
+ case 0:
+ if (!FindNextFile (dirp->current, &dirp->entry))
+ {
+ switch (GetLastError ())
+ {
+ case ERROR_NO_MORE_FILES:
+ dirp->status = -2;
+ return NULL;
+ default:
+ errno = EIO;
+ return NULL;
+ }
+ }
+ break;
+ default:
+ errno = dirp->status;
+ return NULL;
+ }
+
+ dirp->status = 0;
+
+ if (dirp->entry.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY)
+ type = DT_DIR;
+ else if (dirp->entry.dwFileAttributes & FILE_ATTRIBUTE_REPARSE_POINT)
+ type = DT_LNK;
+ else if ((dirp->entry.dwFileAttributes
+ & ~(FILE_ATTRIBUTE_READONLY
+ | FILE_ATTRIBUTE_HIDDEN
+ | FILE_ATTRIBUTE_SYSTEM
+ | FILE_ATTRIBUTE_ARCHIVE
+ | FILE_ATTRIBUTE_NORMAL
+ | FILE_ATTRIBUTE_TEMPORARY
+ | FILE_ATTRIBUTE_SPARSE_FILE
+ | FILE_ATTRIBUTE_COMPRESSED
+ | FILE_ATTRIBUTE_NOT_CONTENT_INDEXED
+ | FILE_ATTRIBUTE_ENCRYPTED)) == 0)
+ /* Devices like COM1, LPT1, NUL would also have the attributes 0x20 but
+ they cannot occur here. */
+ type = DT_REG;
+ else
+ type = DT_UNKNOWN;
+
+ /* Reuse the memory of dirp->entry for the result. */
+ result =
+ (struct dirent *)
+ ((char *) dirp->entry.cFileName - offsetof (struct dirent, d_name[0]));
+ result->d_type = type;
+
+ return result;
+}
diff --git a/lib/realloc.c b/gnulib-tests/realloc.c
index 99556cc..83cb44e 100644
--- a/lib/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-2012 Free Software
+ Copyright (C) 1997, 2003-2004, 2006-2007, 2009-2016 Free Software
Foundation, Inc.
This program is free software: you can redistribute it and/or modify
diff --git a/gnulib-tests/setenv.c b/gnulib-tests/setenv.c
new file mode 100644
index 0000000..85c32cb
--- /dev/null
+++ b/gnulib-tests/setenv.c
@@ -0,0 +1,390 @@
+/* Copyright (C) 1992, 1995-2003, 2005-2016 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,
+ 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/>. */
+
+#if !_LIBC
+/* Don't use __attribute__ __nonnull__ in this compilation unit. Otherwise gcc
+ optimizes away the name == NULL test below. */
+# define _GL_ARG_NONNULL(params)
+
+# define _GL_USE_STDLIB_ALLOC 1
+# include <config.h>
+#endif
+
+#include <alloca.h>
+
+/* Specification. */
+#include <stdlib.h>
+
+#include <errno.h>
+#ifndef __set_errno
+# define __set_errno(ev) ((errno) = (ev))
+#endif
+
+#include <string.h>
+#if _LIBC || HAVE_UNISTD_H
+# include <unistd.h>
+#endif
+
+#if !_LIBC
+# include "malloca.h"
+#endif
+
+#if _LIBC || !HAVE_SETENV
+
+#if !_LIBC
+# define __environ environ
+#endif
+
+#if _LIBC
+/* This lock protects against simultaneous modifications of 'environ'. */
+# include <bits/libc-lock.h>
+__libc_lock_define_initialized (static, envlock)
+# define LOCK __libc_lock_lock (envlock)
+# define UNLOCK __libc_lock_unlock (envlock)
+#else
+# define LOCK
+# define UNLOCK
+#endif
+
+/* In the GNU C library we must keep the namespace clean. */
+#ifdef _LIBC
+# define setenv __setenv
+# define clearenv __clearenv
+# define tfind __tfind
+# define tsearch __tsearch
+#endif
+
+/* In the GNU C library implementation we try to be more clever and
+ allow arbitrarily many changes of the environment given that the used
+ values are from a small set. Outside glibc this will eat up all
+ memory after a while. */
+#if defined _LIBC || (defined HAVE_SEARCH_H && defined HAVE_TSEARCH \
+ && defined __GNUC__)
+# define USE_TSEARCH 1
+# include <search.h>
+typedef int (*compar_fn_t) (const void *, const void *);
+
+/* This is a pointer to the root of the search tree with the known
+ values. */
+static void *known_values;
+
+# define KNOWN_VALUE(Str) \
+ ({ \
+ void *value = tfind (Str, &known_values, (compar_fn_t) strcmp); \
+ value != NULL ? *(char **) value : NULL; \
+ })
+# define STORE_VALUE(Str) \
+ tsearch (Str, &known_values, (compar_fn_t) strcmp)
+
+#else
+# undef USE_TSEARCH
+
+# define KNOWN_VALUE(Str) NULL
+# define STORE_VALUE(Str) do { } while (0)
+
+#endif
+
+
+/* If this variable is not a null pointer we allocated the current
+ environment. */
+static char **last_environ;
+
+
+/* This function is used by 'setenv' and 'putenv'. The difference between
+ the two functions is that for the former must create a new string which
+ is then placed in the environment, while the argument of 'putenv'
+ must be used directly. This is all complicated by the fact that we try
+ to reuse values once generated for a 'setenv' call since we can never
+ free the strings. */
+int
+__add_to_environ (const char *name, const char *value, const char *combined,
+ int replace)
+{
+ char **ep;
+ size_t size;
+ const size_t namelen = strlen (name);
+ const size_t vallen = value != NULL ? strlen (value) + 1 : 0;
+
+ LOCK;
+
+ /* We have to get the pointer now that we have the lock and not earlier
+ since another thread might have created a new environment. */
+ ep = __environ;
+
+ size = 0;
+ if (ep != NULL)
+ {
+ for (; *ep != NULL; ++ep)
+ if (!strncmp (*ep, name, namelen) && (*ep)[namelen] == '=')
+ break;
+ else
+ ++size;
+ }
+
+ if (ep == NULL || *ep == NULL)
+ {
+ char **new_environ;
+#ifdef USE_TSEARCH
+ char *new_value;
+#endif
+
+ /* We allocated this space; we can extend it. */
+ new_environ =
+ (char **) (last_environ == NULL
+ ? malloc ((size + 2) * sizeof (char *))
+ : realloc (last_environ, (size + 2) * sizeof (char *)));
+ if (new_environ == NULL)
+ {
+ /* It's easier to set errno to ENOMEM than to rely on the
+ 'malloc-posix' and 'realloc-posix' gnulib modules. */
+ __set_errno (ENOMEM);
+ UNLOCK;
+ return -1;
+ }
+
+ /* If the whole entry is given add it. */
+ if (combined != NULL)
+ /* We must not add the string to the search tree since it belongs
+ to the user. */
+ new_environ[size] = (char *) combined;
+ else
+ {
+ /* See whether the value is already known. */
+#ifdef USE_TSEARCH
+# ifdef _LIBC
+ new_value = (char *) alloca (namelen + 1 + vallen);
+ __mempcpy (__mempcpy (__mempcpy (new_value, name, namelen), "=", 1),
+ value, vallen);
+# else
+ new_value = (char *) malloca (namelen + 1 + vallen);
+ if (new_value == NULL)
+ {
+ __set_errno (ENOMEM);
+ UNLOCK;
+ return -1;
+ }
+ memcpy (new_value, name, namelen);
+ new_value[namelen] = '=';
+ memcpy (&new_value[namelen + 1], value, vallen);
+# endif
+
+ new_environ[size] = KNOWN_VALUE (new_value);
+ if (new_environ[size] == NULL)
+#endif
+ {
+ new_environ[size] = (char *) malloc (namelen + 1 + vallen);
+ if (new_environ[size] == NULL)
+ {
+#if defined USE_TSEARCH && !defined _LIBC
+ freea (new_value);
+#endif
+ __set_errno (ENOMEM);
+ UNLOCK;
+ return -1;
+ }
+
+#ifdef USE_TSEARCH
+ memcpy (new_environ[size], new_value, namelen + 1 + vallen);
+#else
+ memcpy (new_environ[size], name, namelen);
+ new_environ[size][namelen] = '=';
+ memcpy (&new_environ[size][namelen + 1], value, vallen);
+#endif
+ /* And save the value now. We cannot do this when we remove
+ the string since then we cannot decide whether it is a
+ user string or not. */
+ STORE_VALUE (new_environ[size]);
+ }
+#if defined USE_TSEARCH && !defined _LIBC
+ freea (new_value);
+#endif
+ }
+
+ if (__environ != last_environ)
+ memcpy ((char *) new_environ, (char *) __environ,
+ size * sizeof (char *));
+
+ new_environ[size + 1] = NULL;
+
+ last_environ = __environ = new_environ;
+ }
+ else if (replace)
+ {
+ char *np;
+
+ /* Use the user string if given. */
+ if (combined != NULL)
+ np = (char *) combined;
+ else
+ {
+#ifdef USE_TSEARCH
+ char *new_value;
+# ifdef _LIBC
+ new_value = alloca (namelen + 1 + vallen);
+ __mempcpy (__mempcpy (__mempcpy (new_value, name, namelen), "=", 1),
+ value, vallen);
+# else
+ new_value = malloca (namelen + 1 + vallen);
+ if (new_value == NULL)
+ {
+ __set_errno (ENOMEM);
+ UNLOCK;
+ return -1;
+ }
+ memcpy (new_value, name, namelen);
+ new_value[namelen] = '=';
+ memcpy (&new_value[namelen + 1], value, vallen);
+# endif
+
+ np = KNOWN_VALUE (new_value);
+ if (np == NULL)
+#endif
+ {
+ np = (char *) malloc (namelen + 1 + vallen);
+ if (np == NULL)
+ {
+#if defined USE_TSEARCH && !defined _LIBC
+ freea (new_value);
+#endif
+ __set_errno (ENOMEM);
+ UNLOCK;
+ return -1;
+ }
+
+#ifdef USE_TSEARCH
+ memcpy (np, new_value, namelen + 1 + vallen);
+#else
+ memcpy (np, name, namelen);
+ np[namelen] = '=';
+ memcpy (&np[namelen + 1], value, vallen);
+#endif
+ /* And remember the value. */
+ STORE_VALUE (np);
+ }
+#if defined USE_TSEARCH && !defined _LIBC
+ freea (new_value);
+#endif
+ }
+
+ *ep = np;
+ }
+
+ UNLOCK;
+
+ return 0;
+}
+
+int
+setenv (const char *name, const char *value, int replace)
+{
+ if (name == NULL || *name == '\0' || strchr (name, '=') != NULL)
+ {
+ __set_errno (EINVAL);
+ return -1;
+ }
+
+ return __add_to_environ (name, value, NULL, replace);
+}
+
+/* The 'clearenv' was planned to be added to POSIX.1 but probably
+ never made it. Nevertheless the POSIX.9 standard (POSIX bindings
+ for Fortran 77) requires this function. */
+int
+clearenv (void)
+{
+ LOCK;
+
+ if (__environ == last_environ && __environ != NULL)
+ {
+ /* We allocated this environment so we can free it. */
+ free (__environ);
+ last_environ = NULL;
+ }
+
+ /* Clear the environment pointer removes the whole environment. */
+ __environ = NULL;
+
+ UNLOCK;
+
+ return 0;
+}
+
+#ifdef _LIBC
+static void
+free_mem (void)
+{
+ /* Remove all traces. */
+ clearenv ();
+
+ /* Now remove the search tree. */
+ __tdestroy (known_values, free);
+ known_values = NULL;
+}
+text_set_element (__libc_subfreeres, free_mem);
+
+
+# undef setenv
+# undef clearenv
+weak_alias (__setenv, setenv)
+weak_alias (__clearenv, clearenv)
+#endif
+
+#endif /* _LIBC || !HAVE_SETENV */
+
+/* The rest of this file is called into use when replacing an existing
+ but buggy setenv. Known bugs include failure to diagnose invalid
+ name, and consuming a leading '=' from value. */
+#if HAVE_SETENV
+
+# undef setenv
+# if !HAVE_DECL_SETENV
+extern int setenv (const char *, const char *, int);
+# endif
+# define STREQ(a, b) (strcmp (a, b) == 0)
+
+int
+rpl_setenv (const char *name, const char *value, int replace)
+{
+ int result;
+ if (!name || !*name || strchr (name, '='))
+ {
+ errno = EINVAL;
+ return -1;
+ }
+ /* Call the real setenv even if replace is 0, in case implementation
+ has underlying data to update, such as when environ changes. */
+ result = setenv (name, value, replace);
+ if (result == 0 && replace && *value == '=')
+ {
+ char *tmp = getenv (name);
+ if (!STREQ (tmp, value))
+ {
+ int saved_errno;
+ size_t len = strlen (value);
+ tmp = malloca (len + 2);
+ /* Since leading '=' is eaten, double it up. */
+ *tmp = '=';
+ memcpy (tmp + 1, value, len + 1);
+ result = setenv (name, tmp, replace);
+ saved_errno = errno;
+ freea (tmp);
+ errno = saved_errno;
+ }
+ }
+ return result;
+}
+
+#endif /* HAVE_SETENV */
diff --git a/gnulib-tests/setlocale.c b/gnulib-tests/setlocale.c
new file mode 100644
index 0000000..7d366ed
--- /dev/null
+++ b/gnulib-tests/setlocale.c
@@ -0,0 +1,939 @@
+/* Set the current locale. -*- coding: utf-8 -*-
+ Copyright (C) 2009, 2011-2016 Free Software Foundation, Inc.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+/* Written by Bruno Haible <bruno@clisp.org>, 2009. */
+
+#include <config.h>
+
+/* Override setlocale() so that when the default locale is requested
+ (locale = ""), the environment variables LC_ALL, LC_*, and LANG are
+ considered.
+ Also include all the functionality from libintl's setlocale() override. */
+
+/* Please keep this file in sync with
+ gettext/gettext-runtime/intl/setlocale.c ! */
+
+/* Specification. */
+#include <locale.h>
+
+#include <stdlib.h>
+#include <string.h>
+
+#include "localename.h"
+
+#if 1
+
+# undef setlocale
+
+/* Return string representation of locale category CATEGORY. */
+static const char *
+category_to_name (int category)
+{
+ const char *retval;
+
+ switch (category)
+ {
+ case LC_COLLATE:
+ retval = "LC_COLLATE";
+ break;
+ case LC_CTYPE:
+ retval = "LC_CTYPE";
+ break;
+ case LC_MONETARY:
+ retval = "LC_MONETARY";
+ break;
+ case LC_NUMERIC:
+ retval = "LC_NUMERIC";
+ break;
+ case LC_TIME:
+ retval = "LC_TIME";
+ break;
+ case LC_MESSAGES:
+ retval = "LC_MESSAGES";
+ break;
+ default:
+ /* If you have a better idea for a default value let me know. */
+ retval = "LC_XXX";
+ }
+
+ return retval;
+}
+
+# if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
+
+/* The native Windows setlocale() function expects locale names of the form
+ "German" or "German_Germany" or "DEU", but not "de" or "de_DE". We need
+ to convert the names from the form with ISO 639 language code and ISO 3166
+ country code to the form with English names or with three-letter identifier.
+ The three-letter identifiers known by a Windows XP SP2 or SP3 are:
+ AFK Afrikaans_South Africa.1252
+ ARA Arabic_Saudi Arabia.1256
+ ARB Arabic_Lebanon.1256
+ ARE Arabic_Egypt.1256
+ ARG Arabic_Algeria.1256
+ ARH Arabic_Bahrain.1256
+ ARI Arabic_Iraq.1256
+ ARJ Arabic_Jordan.1256
+ ARK Arabic_Kuwait.1256
+ ARL Arabic_Libya.1256
+ ARM Arabic_Morocco.1256
+ ARO Arabic_Oman.1256
+ ARQ Arabic_Qatar.1256
+ ARS Arabic_Syria.1256
+ ART Arabic_Tunisia.1256
+ ARU Arabic_U.A.E..1256
+ ARY Arabic_Yemen.1256
+ AZE Azeri (Latin)_Azerbaijan.1254
+ BEL Belarusian_Belarus.1251
+ BGR Bulgarian_Bulgaria.1251
+ BSB Bosnian_Bosnia and Herzegovina.1250
+ BSC Bosnian (Cyrillic)_Bosnia and Herzegovina.1250 (wrong encoding!)
+ CAT Catalan_Spain.1252
+ CHH Chinese_Hong Kong S.A.R..950
+ CHI Chinese_Singapore.936
+ CHS Chinese_People's Republic of China.936
+ CHT Chinese_Taiwan.950
+ CSY Czech_Czech Republic.1250
+ CYM Welsh_United Kingdom.1252
+ DAN Danish_Denmark.1252
+ DEA German_Austria.1252
+ DEC German_Liechtenstein.1252
+ DEL German_Luxembourg.1252
+ DES German_Switzerland.1252
+ DEU German_Germany.1252
+ ELL Greek_Greece.1253
+ ENA English_Australia.1252
+ ENB English_Caribbean.1252
+ ENC English_Canada.1252
+ ENG English_United Kingdom.1252
+ ENI English_Ireland.1252
+ ENJ English_Jamaica.1252
+ ENL English_Belize.1252
+ ENP English_Republic of the Philippines.1252
+ ENS English_South Africa.1252
+ ENT English_Trinidad and Tobago.1252
+ ENU English_United States.1252
+ ENW English_Zimbabwe.1252
+ ENZ English_New Zealand.1252
+ ESA Spanish_Panama.1252
+ ESB Spanish_Bolivia.1252
+ ESC Spanish_Costa Rica.1252
+ ESD Spanish_Dominican Republic.1252
+ ESE Spanish_El Salvador.1252
+ ESF Spanish_Ecuador.1252
+ ESG Spanish_Guatemala.1252
+ ESH Spanish_Honduras.1252
+ ESI Spanish_Nicaragua.1252
+ ESL Spanish_Chile.1252
+ ESM Spanish_Mexico.1252
+ ESN Spanish_Spain.1252
+ ESO Spanish_Colombia.1252
+ ESP Spanish_Spain.1252
+ ESR Spanish_Peru.1252
+ ESS Spanish_Argentina.1252
+ ESU Spanish_Puerto Rico.1252
+ ESV Spanish_Venezuela.1252
+ ESY Spanish_Uruguay.1252
+ ESZ Spanish_Paraguay.1252
+ ETI Estonian_Estonia.1257
+ EUQ Basque_Spain.1252
+ FAR Farsi_Iran.1256
+ FIN Finnish_Finland.1252
+ FOS Faroese_Faroe Islands.1252
+ FPO Filipino_Philippines.1252
+ FRA French_France.1252
+ FRB French_Belgium.1252
+ FRC French_Canada.1252
+ FRL French_Luxembourg.1252
+ FRM French_Principality of Monaco.1252
+ FRS French_Switzerland.1252
+ FYN Frisian_Netherlands.1252
+ GLC Galician_Spain.1252
+ HEB Hebrew_Israel.1255
+ HRB Croatian_Bosnia and Herzegovina.1250
+ HRV Croatian_Croatia.1250
+ HUN Hungarian_Hungary.1250
+ IND Indonesian_Indonesia.1252
+ IRE Irish_Ireland.1252
+ ISL Icelandic_Iceland.1252
+ ITA Italian_Italy.1252
+ ITS Italian_Switzerland.1252
+ IUK Inuktitut (Latin)_Canada.1252
+ JPN Japanese_Japan.932
+ KKZ Kazakh_Kazakhstan.1251
+ KOR Korean_Korea.949
+ KYR Kyrgyz_Kyrgyzstan.1251
+ LBX Luxembourgish_Luxembourg.1252
+ LTH Lithuanian_Lithuania.1257
+ LVI Latvian_Latvia.1257
+ MKI FYRO Macedonian_Former Yugoslav Republic of Macedonia.1251
+ MON Mongolian_Mongolia.1251
+ MPD Mapudungun_Chile.1252
+ MSB Malay_Brunei Darussalam.1252
+ MSL Malay_Malaysia.1252
+ MWK Mohawk_Canada.1252
+ NLB Dutch_Belgium.1252
+ NLD Dutch_Netherlands.1252
+ NON Norwegian-Nynorsk_Norway.1252
+ NOR Norwegian (Bokmål)_Norway.1252
+ NSO Northern Sotho_South Africa.1252
+ PLK Polish_Poland.1250
+ PTB Portuguese_Brazil.1252
+ PTG Portuguese_Portugal.1252
+ QUB Quechua_Bolivia.1252
+ QUE Quechua_Ecuador.1252
+ QUP Quechua_Peru.1252
+ RMC Romansh_Switzerland.1252
+ ROM Romanian_Romania.1250
+ RUS Russian_Russia.1251
+ SKY Slovak_Slovakia.1250
+ SLV Slovenian_Slovenia.1250
+ SMA Sami (Southern)_Norway.1252
+ SMB Sami (Southern)_Sweden.1252
+ SME Sami (Northern)_Norway.1252
+ SMF Sami (Northern)_Sweden.1252
+ SMG Sami (Northern)_Finland.1252
+ SMJ Sami (Lule)_Norway.1252
+ SMK Sami (Lule)_Sweden.1252
+ SMN Sami (Inari)_Finland.1252
+ SMS Sami (Skolt)_Finland.1252
+ SQI Albanian_Albania.1250
+ SRB Serbian (Cyrillic)_Serbia and Montenegro.1251
+ SRL Serbian (Latin)_Serbia and Montenegro.1250
+ SRN Serbian (Cyrillic)_Bosnia and Herzegovina.1251
+ SRS Serbian (Latin)_Bosnia and Herzegovina.1250
+ SVE Swedish_Sweden.1252
+ SVF Swedish_Finland.1252
+ SWK Swahili_Kenya.1252
+ THA Thai_Thailand.874
+ TRK Turkish_Turkey.1254
+ TSN Tswana_South Africa.1252
+ TTT Tatar_Russia.1251
+ UKR Ukrainian_Ukraine.1251
+ URD Urdu_Islamic Republic of Pakistan.1256
+ USA English_United States.1252
+ UZB Uzbek (Latin)_Uzbekistan.1254
+ VIT Vietnamese_Viet Nam.1258
+ XHO Xhosa_South Africa.1252
+ ZHH Chinese_Hong Kong S.A.R..950
+ ZHI Chinese_Singapore.936
+ ZHM Chinese_Macau S.A.R..950
+ ZUL Zulu_South Africa.1252
+ */
+
+/* Table from ISO 639 language code, optionally with country or script suffix,
+ to English name.
+ Keep in sync with the gl_locale_name_from_win32_LANGID function in
+ localename.c! */
+struct table_entry
+{
+ const char *code;
+ const char *english;
+};
+static const struct table_entry language_table[] =
+ {
+ { "af", "Afrikaans" },
+ { "am", "Amharic" },
+ { "ar", "Arabic" },
+ { "arn", "Mapudungun" },
+ { "as", "Assamese" },
+ { "az@cyrillic", "Azeri (Cyrillic)" },
+ { "az@latin", "Azeri (Latin)" },
+ { "ba", "Bashkir" },
+ { "be", "Belarusian" },
+ { "ber", "Tamazight" },
+ { "ber@arabic", "Tamazight (Arabic)" },
+ { "ber@latin", "Tamazight (Latin)" },
+ { "bg", "Bulgarian" },
+ { "bin", "Edo" },
+ { "bn", "Bengali" },
+ { "bn_BD", "Bengali (Bangladesh)" },
+ { "bn_IN", "Bengali (India)" },
+ { "bnt", "Sutu" },
+ { "bo", "Tibetan" },
+ { "br", "Breton" },
+ { "bs", "BSB" }, /* "Bosnian (Latin)" */
+ { "bs@cyrillic", "BSC" }, /* Bosnian (Cyrillic) */
+ { "ca", "Catalan" },
+ { "chr", "Cherokee" },
+ { "co", "Corsican" },
+ { "cpe", "Hawaiian" },
+ { "cs", "Czech" },
+ { "cy", "Welsh" },
+ { "da", "Danish" },
+ { "de", "German" },
+ { "dsb", "Lower Sorbian" },
+ { "dv", "Divehi" },
+ { "el", "Greek" },
+ { "en", "English" },
+ { "es", "Spanish" },
+ { "et", "Estonian" },
+ { "eu", "Basque" },
+ { "fa", "Farsi" },
+ { "ff", "Fulfulde" },
+ { "fi", "Finnish" },
+ { "fo", "Faroese" }, /* "Faeroese" does not work */
+ { "fr", "French" },
+ { "fy", "Frisian" },
+ { "ga", "IRE" }, /* Gaelic (Ireland) */
+ { "gd", "Gaelic (Scotland)" },
+ { "gd", "Scottish Gaelic" },
+ { "gl", "Galician" },
+ { "gn", "Guarani" },
+ { "gsw", "Alsatian" },
+ { "gu", "Gujarati" },
+ { "ha", "Hausa" },
+ { "he", "Hebrew" },
+ { "hi", "Hindi" },
+ { "hr", "Croatian" },
+ { "hsb", "Upper Sorbian" },
+ { "hu", "Hungarian" },
+ { "hy", "Armenian" },
+ { "id", "Indonesian" },
+ { "ig", "Igbo" },
+ { "ii", "Yi" },
+ { "is", "Icelandic" },
+ { "it", "Italian" },
+ { "iu", "IUK" }, /* Inuktitut */
+ { "ja", "Japanese" },
+ { "ka", "Georgian" },
+ { "kk", "Kazakh" },
+ { "kl", "Greenlandic" },
+ { "km", "Cambodian" },
+ { "km", "Khmer" },
+ { "kn", "Kannada" },
+ { "ko", "Korean" },
+ { "kok", "Konkani" },
+ { "kr", "Kanuri" },
+ { "ks", "Kashmiri" },
+ { "ks_IN", "Kashmiri_India" },
+ { "ks_PK", "Kashmiri (Arabic)_Pakistan" },
+ { "ky", "Kyrgyz" },
+ { "la", "Latin" },
+ { "lb", "Luxembourgish" },
+ { "lo", "Lao" },
+ { "lt", "Lithuanian" },
+ { "lv", "Latvian" },
+ { "mi", "Maori" },
+ { "mk", "FYRO Macedonian" },
+ { "mk", "Macedonian" },
+ { "ml", "Malayalam" },
+ { "mn", "Mongolian" },
+ { "mni", "Manipuri" },
+ { "moh", "Mohawk" },
+ { "mr", "Marathi" },
+ { "ms", "Malay" },
+ { "mt", "Maltese" },
+ { "my", "Burmese" },
+ { "nb", "NOR" }, /* Norwegian Bokmål */
+ { "ne", "Nepali" },
+ { "nic", "Ibibio" },
+ { "nl", "Dutch" },
+ { "nn", "NON" }, /* Norwegian Nynorsk */
+ { "no", "Norwegian" },
+ { "nso", "Northern Sotho" },
+ { "nso", "Sepedi" },
+ { "oc", "Occitan" },
+ { "om", "Oromo" },
+ { "or", "Oriya" },
+ { "pa", "Punjabi" },
+ { "pap", "Papiamentu" },
+ { "pl", "Polish" },
+ { "prs", "Dari" },
+ { "ps", "Pashto" },
+ { "pt", "Portuguese" },
+ { "qu", "Quechua" },
+ { "qut", "K'iche'" },
+ { "rm", "Romansh" },
+ { "ro", "Romanian" },
+ { "ru", "Russian" },
+ { "rw", "Kinyarwanda" },
+ { "sa", "Sanskrit" },
+ { "sah", "Yakut" },
+ { "sd", "Sindhi" },
+ { "se", "Sami (Northern)" },
+ { "se", "Northern Sami" },
+ { "si", "Sinhalese" },
+ { "sk", "Slovak" },
+ { "sl", "Slovenian" },
+ { "sma", "Sami (Southern)" },
+ { "sma", "Southern Sami" },
+ { "smj", "Sami (Lule)" },
+ { "smj", "Lule Sami" },
+ { "smn", "Sami (Inari)" },
+ { "smn", "Inari Sami" },
+ { "sms", "Sami (Skolt)" },
+ { "sms", "Skolt Sami" },
+ { "so", "Somali" },
+ { "sq", "Albanian" },
+ { "sr", "Serbian (Latin)" },
+ { "sr@cyrillic", "SRB" }, /* Serbian (Cyrillic) */
+ { "sv", "Swedish" },
+ { "sw", "Swahili" },
+ { "syr", "Syriac" },
+ { "ta", "Tamil" },
+ { "te", "Telugu" },
+ { "tg", "Tajik" },
+ { "th", "Thai" },
+ { "ti", "Tigrinya" },
+ { "tk", "Turkmen" },
+ { "tl", "Filipino" },
+ { "tn", "Tswana" },
+ { "tr", "Turkish" },
+ { "ts", "Tsonga" },
+ { "tt", "Tatar" },
+ { "ug", "Uighur" },
+ { "uk", "Ukrainian" },
+ { "ur", "Urdu" },
+ { "uz", "Uzbek" },
+ { "uz", "Uzbek (Latin)" },
+ { "uz@cyrillic", "Uzbek (Cyrillic)" },
+ { "ve", "Venda" },
+ { "vi", "Vietnamese" },
+ { "wen", "Sorbian" },
+ { "wo", "Wolof" },
+ { "xh", "Xhosa" },
+ { "yi", "Yiddish" },
+ { "yo", "Yoruba" },
+ { "zh", "Chinese" },
+ { "zu", "Zulu" }
+ };
+
+/* Table from ISO 3166 country code to English name.
+ Keep in sync with the gl_locale_name_from_win32_LANGID function in
+ localename.c! */
+static const struct table_entry country_table[] =
+ {
+ { "AE", "U.A.E." },
+ { "AF", "Afghanistan" },
+ { "AL", "Albania" },
+ { "AM", "Armenia" },
+ { "AN", "Netherlands Antilles" },
+ { "AR", "Argentina" },
+ { "AT", "Austria" },
+ { "AU", "Australia" },
+ { "AZ", "Azerbaijan" },
+ { "BA", "Bosnia and Herzegovina" },
+ { "BD", "Bangladesh" },
+ { "BE", "Belgium" },
+ { "BG", "Bulgaria" },
+ { "BH", "Bahrain" },
+ { "BN", "Brunei Darussalam" },
+ { "BO", "Bolivia" },
+ { "BR", "Brazil" },
+ { "BT", "Bhutan" },
+ { "BY", "Belarus" },
+ { "BZ", "Belize" },
+ { "CA", "Canada" },
+ { "CG", "Congo" },
+ { "CH", "Switzerland" },
+ { "CI", "Cote d'Ivoire" },
+ { "CL", "Chile" },
+ { "CM", "Cameroon" },
+ { "CN", "People's Republic of China" },
+ { "CO", "Colombia" },
+ { "CR", "Costa Rica" },
+ { "CS", "Serbia and Montenegro" },
+ { "CZ", "Czech Republic" },
+ { "DE", "Germany" },
+ { "DK", "Denmark" },
+ { "DO", "Dominican Republic" },
+ { "DZ", "Algeria" },
+ { "EC", "Ecuador" },
+ { "EE", "Estonia" },
+ { "EG", "Egypt" },
+ { "ER", "Eritrea" },
+ { "ES", "Spain" },
+ { "ET", "Ethiopia" },
+ { "FI", "Finland" },
+ { "FO", "Faroe Islands" },
+ { "FR", "France" },
+ { "GB", "United Kingdom" },
+ { "GD", "Caribbean" },
+ { "GE", "Georgia" },
+ { "GL", "Greenland" },
+ { "GR", "Greece" },
+ { "GT", "Guatemala" },
+ { "HK", "Hong Kong" },
+ { "HK", "Hong Kong S.A.R." },
+ { "HN", "Honduras" },
+ { "HR", "Croatia" },
+ { "HT", "Haiti" },
+ { "HU", "Hungary" },
+ { "ID", "Indonesia" },
+ { "IE", "Ireland" },
+ { "IL", "Israel" },
+ { "IN", "India" },
+ { "IQ", "Iraq" },
+ { "IR", "Iran" },
+ { "IS", "Iceland" },
+ { "IT", "Italy" },
+ { "JM", "Jamaica" },
+ { "JO", "Jordan" },
+ { "JP", "Japan" },
+ { "KE", "Kenya" },
+ { "KG", "Kyrgyzstan" },
+ { "KH", "Cambodia" },
+ { "KR", "South Korea" },
+ { "KW", "Kuwait" },
+ { "KZ", "Kazakhstan" },
+ { "LA", "Laos" },
+ { "LB", "Lebanon" },
+ { "LI", "Liechtenstein" },
+ { "LK", "Sri Lanka" },
+ { "LT", "Lithuania" },
+ { "LU", "Luxembourg" },
+ { "LV", "Latvia" },
+ { "LY", "Libya" },
+ { "MA", "Morocco" },
+ { "MC", "Principality of Monaco" },
+ { "MD", "Moldava" },
+ { "MD", "Moldova" },
+ { "ME", "Montenegro" },
+ { "MK", "Former Yugoslav Republic of Macedonia" },
+ { "ML", "Mali" },
+ { "MM", "Myanmar" },
+ { "MN", "Mongolia" },
+ { "MO", "Macau S.A.R." },
+ { "MT", "Malta" },
+ { "MV", "Maldives" },
+ { "MX", "Mexico" },
+ { "MY", "Malaysia" },
+ { "NG", "Nigeria" },
+ { "NI", "Nicaragua" },
+ { "NL", "Netherlands" },
+ { "NO", "Norway" },
+ { "NP", "Nepal" },
+ { "NZ", "New Zealand" },
+ { "OM", "Oman" },
+ { "PA", "Panama" },
+ { "PE", "Peru" },
+ { "PH", "Philippines" },
+ { "PK", "Islamic Republic of Pakistan" },
+ { "PL", "Poland" },
+ { "PR", "Puerto Rico" },
+ { "PT", "Portugal" },
+ { "PY", "Paraguay" },
+ { "QA", "Qatar" },
+ { "RE", "Reunion" },
+ { "RO", "Romania" },
+ { "RS", "Serbia" },
+ { "RU", "Russia" },
+ { "RW", "Rwanda" },
+ { "SA", "Saudi Arabia" },
+ { "SE", "Sweden" },
+ { "SG", "Singapore" },
+ { "SI", "Slovenia" },
+ { "SK", "Slovak" },
+ { "SN", "Senegal" },
+ { "SO", "Somalia" },
+ { "SR", "Suriname" },
+ { "SV", "El Salvador" },
+ { "SY", "Syria" },
+ { "TH", "Thailand" },
+ { "TJ", "Tajikistan" },
+ { "TM", "Turkmenistan" },
+ { "TN", "Tunisia" },
+ { "TR", "Turkey" },
+ { "TT", "Trinidad and Tobago" },
+ { "TW", "Taiwan" },
+ { "TZ", "Tanzania" },
+ { "UA", "Ukraine" },
+ { "US", "United States" },
+ { "UY", "Uruguay" },
+ { "VA", "Vatican" },
+ { "VE", "Venezuela" },
+ { "VN", "Viet Nam" },
+ { "YE", "Yemen" },
+ { "ZA", "South Africa" },
+ { "ZW", "Zimbabwe" }
+ };
+
+/* Given a string STRING, find the set of indices i such that TABLE[i].code is
+ the given STRING. It is a range [lo,hi-1]. */
+typedef struct { size_t lo; size_t hi; } range_t;
+static void
+search (const struct table_entry *table, size_t table_size, const char *string,
+ range_t *result)
+{
+ /* The table is sorted. Perform a binary search. */
+ size_t hi = table_size;
+ size_t lo = 0;
+ while (lo < hi)
+ {
+ /* Invariant:
+ for i < lo, strcmp (table[i].code, string) < 0,
+ for i >= hi, strcmp (table[i].code, string) > 0. */
+ size_t mid = (hi + lo) >> 1; /* >= lo, < hi */
+ int cmp = strcmp (table[mid].code, string);
+ if (cmp < 0)
+ lo = mid + 1;
+ else if (cmp > 0)
+ hi = mid;
+ else
+ {
+ /* Found an i with
+ strcmp (language_table[i].code, string) == 0.
+ Find the entire interval of such i. */
+ {
+ size_t i;
+
+ for (i = mid; i > lo; )
+ {
+ i--;
+ if (strcmp (table[i].code, string) < 0)
+ {
+ lo = i + 1;
+ break;
+ }
+ }
+ }
+ {
+ size_t i;
+
+ for (i = mid; i < hi; i++)
+ {
+ if (strcmp (table[i].code, string) > 0)
+ {
+ hi = i;
+ break;
+ }
+ }
+ }
+ /* The set of i with
+ strcmp (language_table[i].code, string) == 0
+ is the interval [lo, hi-1]. */
+ break;
+ }
+ }
+ result->lo = lo;
+ result->hi = hi;
+}
+
+/* Like setlocale, but accept also locale names in the form ll or ll_CC,
+ where ll is an ISO 639 language code and CC is an ISO 3166 country code. */
+static char *
+setlocale_unixlike (int category, const char *locale)
+{
+ char *result;
+ char llCC_buf[64];
+ char ll_buf[64];
+ char CC_buf[64];
+
+ /* First, try setlocale with the original argument unchanged. */
+ result = setlocale (category, locale);
+ if (result != NULL)
+ return result;
+
+ /* Otherwise, assume the argument is in the form
+ language[_territory][.codeset][@modifier]
+ and try to map it using the tables. */
+ if (strlen (locale) < sizeof (llCC_buf))
+ {
+ /* Second try: Remove the codeset part. */
+ {
+ const char *p = locale;
+ char *q = llCC_buf;
+
+ /* Copy the part before the dot. */
+ for (; *p != '\0' && *p != '.'; p++, q++)
+ *q = *p;
+ if (*p == '.')
+ /* Skip the part up to the '@', if any. */
+ for (; *p != '\0' && *p != '@'; p++)
+ ;
+ /* Copy the part starting with '@', if any. */
+ for (; *p != '\0'; p++, q++)
+ *q = *p;
+ *q = '\0';
+ }
+ /* llCC_buf now contains
+ language[_territory][@modifier]
+ */
+ if (strcmp (llCC_buf, locale) != 0)
+ {
+ result = setlocale (category, llCC_buf);
+ if (result != NULL)
+ return result;
+ }
+ /* Look it up in language_table. */
+ {
+ range_t range;
+ size_t i;
+
+ search (language_table,
+ sizeof (language_table) / sizeof (language_table[0]),
+ llCC_buf,
+ &range);
+
+ for (i = range.lo; i < range.hi; i++)
+ {
+ /* Try the replacement in language_table[i]. */
+ result = setlocale (category, language_table[i].english);
+ if (result != NULL)
+ return result;
+ }
+ }
+ /* Split language[_territory][@modifier]
+ into ll_buf = language[@modifier]
+ and CC_buf = territory
+ */
+ {
+ const char *underscore = strchr (llCC_buf, '_');
+ if (underscore != NULL)
+ {
+ const char *territory_start = underscore + 1;
+ const char *territory_end = strchr (territory_start, '@');
+ if (territory_end == NULL)
+ territory_end = territory_start + strlen (territory_start);
+
+ memcpy (ll_buf, llCC_buf, underscore - llCC_buf);
+ strcpy (ll_buf + (underscore - llCC_buf), territory_end);
+
+ memcpy (CC_buf, territory_start, territory_end - territory_start);
+ CC_buf[territory_end - territory_start] = '\0';
+
+ {
+ /* Look up ll_buf in language_table
+ and CC_buf in country_table. */
+ range_t language_range;
+
+ search (language_table,
+ sizeof (language_table) / sizeof (language_table[0]),
+ ll_buf,
+ &language_range);
+ if (language_range.lo < language_range.hi)
+ {
+ range_t country_range;
+
+ search (country_table,
+ sizeof (country_table) / sizeof (country_table[0]),
+ CC_buf,
+ &country_range);
+ if (country_range.lo < country_range.hi)
+ {
+ size_t i;
+ size_t j;
+
+ for (i = language_range.lo; i < language_range.hi; i++)
+ for (j = country_range.lo; j < country_range.hi; j++)
+ {
+ /* Concatenate the replacements. */
+ const char *part1 = language_table[i].english;
+ size_t part1_len = strlen (part1);
+ const char *part2 = country_table[j].english;
+ size_t part2_len = strlen (part2) + 1;
+ char buf[64+64];
+
+ if (!(part1_len + 1 + part2_len <= sizeof (buf)))
+ abort ();
+ memcpy (buf, part1, part1_len);
+ buf[part1_len] = '_';
+ memcpy (buf + part1_len + 1, part2, part2_len);
+
+ /* Try the concatenated replacements. */
+ result = setlocale (category, buf);
+ if (result != NULL)
+ return result;
+ }
+ }
+
+ /* Try omitting the country entirely. This may set a locale
+ corresponding to the wrong country, but is better than
+ failing entirely. */
+ {
+ size_t i;
+
+ for (i = language_range.lo; i < language_range.hi; i++)
+ {
+ /* Try only the language replacement. */
+ result =
+ setlocale (category, language_table[i].english);
+ if (result != NULL)
+ return result;
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+
+ /* Failed. */
+ return NULL;
+}
+
+# else
+# define setlocale_unixlike setlocale
+# endif
+
+# if LC_MESSAGES == 1729
+
+/* The system does not store an LC_MESSAGES locale category. Do it here. */
+static char lc_messages_name[64] = "C";
+
+/* Like setlocale, but support also LC_MESSAGES. */
+static char *
+setlocale_single (int category, const char *locale)
+{
+ if (category == LC_MESSAGES)
+ {
+ if (locale != NULL)
+ {
+ lc_messages_name[sizeof (lc_messages_name) - 1] = '\0';
+ strncpy (lc_messages_name, locale, sizeof (lc_messages_name) - 1);
+ }
+ return lc_messages_name;
+ }
+ else
+ return setlocale_unixlike (category, locale);
+}
+
+# else
+# define setlocale_single setlocale_unixlike
+# endif
+
+char *
+rpl_setlocale (int category, const char *locale)
+{
+ if (locale != NULL && locale[0] == '\0')
+ {
+ /* A request to the set the current locale to the default locale. */
+ if (category == LC_ALL)
+ {
+ /* Set LC_CTYPE first. Then the other categories. */
+ static int const categories[] =
+ {
+ LC_NUMERIC,
+ LC_TIME,
+ LC_COLLATE,
+ LC_MONETARY,
+ LC_MESSAGES
+ };
+ char *saved_locale;
+ const char *base_name;
+ unsigned int i;
+
+ /* Back up the old locale, in case one of the steps fails. */
+ saved_locale = setlocale (LC_ALL, NULL);
+ if (saved_locale == NULL)
+ return NULL;
+ saved_locale = strdup (saved_locale);
+ if (saved_locale == NULL)
+ return NULL;
+
+ /* Set LC_CTYPE category. Set all other categories (except possibly
+ LC_MESSAGES) to the same value in the same call; this is likely to
+ save calls. */
+ base_name =
+ gl_locale_name_environ (LC_CTYPE, category_to_name (LC_CTYPE));
+ if (base_name == NULL)
+ base_name = gl_locale_name_default ();
+
+ if (setlocale_unixlike (LC_ALL, base_name) == NULL)
+ goto fail;
+# if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
+ /* On native Windows, setlocale(LC_ALL,...) may succeed but set the
+ LC_CTYPE category to an invalid value ("C") when it does not
+ support the specified encoding. Report a failure instead. */
+ if (strchr (base_name, '.') != NULL
+ && strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
+ goto fail;
+# endif
+
+ for (i = 0; i < sizeof (categories) / sizeof (categories[0]); i++)
+ {
+ int cat = categories[i];
+ const char *name;
+
+ name = gl_locale_name_environ (cat, category_to_name (cat));
+ if (name == NULL)
+ name = gl_locale_name_default ();
+
+ /* If name is the same as base_name, it has already been set
+ through the setlocale call before the loop. */
+ if (strcmp (name, base_name) != 0
+# if LC_MESSAGES == 1729
+ || cat == LC_MESSAGES
+# endif
+ )
+ if (setlocale_single (cat, name) == NULL)
+ goto fail;
+ }
+
+ /* All steps were successful. */
+ free (saved_locale);
+ return setlocale (LC_ALL, NULL);
+
+ fail:
+ if (saved_locale[0] != '\0') /* don't risk an endless recursion */
+ setlocale (LC_ALL, saved_locale);
+ free (saved_locale);
+ return NULL;
+ }
+ else
+ {
+ const char *name =
+ gl_locale_name_environ (category, category_to_name (category));
+ if (name == NULL)
+ name = gl_locale_name_default ();
+
+ return setlocale_single (category, name);
+ }
+ }
+ else
+ {
+# if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
+ if (category == LC_ALL && locale != NULL && strchr (locale, '.') != NULL)
+ {
+ char *saved_locale;
+
+ /* Back up the old locale. */
+ saved_locale = setlocale (LC_ALL, NULL);
+ if (saved_locale == NULL)
+ return NULL;
+ saved_locale = strdup (saved_locale);
+ if (saved_locale == NULL)
+ return NULL;
+
+ if (setlocale_unixlike (LC_ALL, locale) == NULL)
+ {
+ free (saved_locale);
+ return NULL;
+ }
+
+ /* On native Windows, setlocale(LC_ALL,...) may succeed but set the
+ LC_CTYPE category to an invalid value ("C") when it does not
+ support the specified encoding. Report a failure instead. */
+ if (strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
+ {
+ if (saved_locale[0] != '\0') /* don't risk an endless recursion */
+ setlocale (LC_ALL, saved_locale);
+ free (saved_locale);
+ return NULL;
+ }
+
+ /* It was really successful. */
+ free (saved_locale);
+ return setlocale (LC_ALL, NULL);
+ }
+ else
+# endif
+ return setlocale_single (category, locale);
+ }
+}
+
+#endif
diff --git a/gnulib-tests/signature.h b/gnulib-tests/signature.h
new file mode 100644
index 0000000..2df8067
--- /dev/null
+++ b/gnulib-tests/signature.h
@@ -0,0 +1,48 @@
+/* Macro for checking that a function declaration is compliant.
+ Copyright (C) 2009-2016 Free Software Foundation, Inc.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+#ifndef SIGNATURE_CHECK
+
+/* Check that the function FN takes the specified arguments ARGS with
+ a return type of RET. This header is designed to be included after
+ <config.h> and the one system header that is supposed to contain
+ the function being checked, but prior to any other system headers
+ that are necessary for the unit test. Therefore, this file does
+ not include any system headers, nor reference anything outside of
+ the macro arguments. For an example, if foo.h should provide:
+
+ extern int foo (char, float);
+
+ then the unit test named test-foo.c would start out with:
+
+ #include <config.h>
+ #include <foo.h>
+ #include "signature.h"
+ SIGNATURE_CHECK (foo, int, (char, float));
+ #include <other.h>
+ ...
+*/
+# define SIGNATURE_CHECK(fn, ret, args) \
+ SIGNATURE_CHECK1 (fn, ret, args, __LINE__)
+
+/* Necessary to allow multiple SIGNATURE_CHECK lines in a unit test.
+ Note that the checks must not occupy the same line. */
+# define SIGNATURE_CHECK1(fn, ret, args, id) \
+ SIGNATURE_CHECK2 (fn, ret, args, id) /* macroexpand line */
+# define SIGNATURE_CHECK2(fn, ret, args, id) \
+ static ret (* _GL_UNUSED signature_check ## id) args = fn
+
+#endif /* SIGNATURE_CHECK */
diff --git a/gnulib-tests/stdio-impl.h b/gnulib-tests/stdio-impl.h
new file mode 100644
index 0000000..766d693
--- /dev/null
+++ b/gnulib-tests/stdio-impl.h
@@ -0,0 +1,140 @@
+/* Implementation details of FILE streams.
+ Copyright (C) 2007-2008, 2010-2016 Free Software Foundation, Inc.
+
+ This 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/>. */
+
+/* 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. */
+
+
+/* BSD stdio derived implementations. */
+
+#if defined __NetBSD__ /* NetBSD */
+/* Get __NetBSD_Version__. */
+# include <sys/param.h>
+#endif
+
+#include <errno.h> /* For detecting Plan9. */
+
+#if defined __sferror || defined __DragonFly__ || defined __ANDROID__
+ /* FreeBSD, NetBSD, OpenBSD, DragonFly, Mac OS X, Cygwin, 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>. */
+# define fp_ ((struct { struct __FILE_public pub; \
+ struct { unsigned char *_base; int _size; } _bf; \
+ void *cookie; \
+ void *_close; \
+ void *_read; \
+ void *_seek; \
+ void *_write; \
+ struct { unsigned char *_base; int _size; } _ub; \
+ int _ur; \
+ unsigned char _ubuf[3]; \
+ unsigned char _nbuf[1]; \
+ struct { unsigned char *_base; int _size; } _lb; \
+ int _blksize; \
+ 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>. */
+# define _p pub._p
+# define _flags pub._flags
+# define _r pub._r
+# define _w pub._w
+# else
+# define fp_ fp
+# endif
+
+# if (defined __NetBSD__ && __NetBSD_Version__ >= 105270000) || defined __OpenBSD__ || defined __ANDROID__ /* NetBSD >= 1.5ZA, OpenBSD, 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> */
+ struct __sfileext
+ {
+ struct __sbuf _ub; /* ungetc buffer */
+ /* More fields, not relevant here. */
+ };
+# define fp_ub ((struct __sfileext *) fp->_ext._base)->_ub
+# else /* FreeBSD, NetBSD <= 1.5Z, DragonFly, Mac OS X, Cygwin, Android */
+# define fp_ub fp_->_ub
+# endif
+
+# define HASUB(fp) (fp_ub._base != NULL)
+
+#endif
+
+
+/* SystemV derived implementations. */
+
+#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>. */
+# define _IOERR 0x40
+# define _IOREAD 0x80
+# define _IOWRT 0x4
+# define _IORW 0x100
+# endif
+#endif
+
+#if defined _IOERR
+
+# if defined __sun && defined _LP64 /* Solaris/{SPARC,AMD64} 64-bit */
+# define fp_ ((struct { unsigned char *_ptr; \
+ unsigned char *_base; \
+ unsigned char *_end; \
+ long _cnt; \
+ int _file; \
+ unsigned int _flag; \
+ } *) fp)
+# else
+# define fp_ fp
+# endif
+
+# if defined _SCO_DS /* OpenServer */
+# define _cnt __cnt
+# define _ptr __ptr
+# define _base __base
+# define _flag __flag
+# endif
+
+#elif (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ /* newer Windows with MSVC */
+
+/* <stdio.h> does not define the innards of FILE any more. */
+# define WINDOWS_OPAQUE_FILE
+
+struct _gl_real_FILE
+{
+ /* Note: Compared to older Windows and to mingw, it has the fields
+ _base and _cnt swapped. */
+ unsigned char *_ptr;
+ unsigned char *_base;
+ int _cnt;
+ int _flag;
+ int _file;
+ int _charbuf;
+ int _bufsiz;
+};
+# 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>. */
+# define _IOREAD 0x1
+# define _IOWRT 0x2
+# define _IORW 0x4
+# define _IOEOF 0x8
+# define _IOERR 0x10
+
+#endif
diff --git a/gnulib-tests/strdup.c b/gnulib-tests/strdup.c
new file mode 100644
index 0000000..81eb226
--- /dev/null
+++ b/gnulib-tests/strdup.c
@@ -0,0 +1,54 @@
+/* Copyright (C) 1991, 1996-1998, 2002-2004, 2006-2007, 2009-2016 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, or (at your option)
+ any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License along
+ with this program; if not, see <http://www.gnu.org/licenses/>. */
+
+#ifndef _LIBC
+# include <config.h>
+#endif
+
+/* Get specification. */
+#include <string.h>
+
+#include <stdlib.h>
+
+#undef __strdup
+#ifdef _LIBC
+# undef strdup
+#endif
+
+#ifndef weak_alias
+# define __strdup strdup
+#endif
+
+/* Duplicate S, returning an identical malloc'd string. */
+char *
+__strdup (const char *s)
+{
+ size_t len = strlen (s) + 1;
+ void *new = malloc (len);
+
+ if (new == NULL)
+ return NULL;
+
+ return (char *) memcpy (new, s, len);
+}
+#ifdef libc_hidden_def
+libc_hidden_def (__strdup)
+#endif
+#ifdef weak_alias
+weak_alias (__strdup, strdup)
+#endif
diff --git a/gnulib-tests/symlink.c b/gnulib-tests/symlink.c
new file mode 100644
index 0000000..d8684b6
--- /dev/null
+++ b/gnulib-tests/symlink.c
@@ -0,0 +1,57 @@
+/* Stub for symlink().
+ Copyright (C) 2009-2016 Free Software Foundation, Inc.
+
+ This 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>
+
+/* Specification. */
+#include <unistd.h>
+
+#include <errno.h>
+#include <string.h>
+#include <sys/stat.h>
+
+
+#if HAVE_SYMLINK
+
+# undef symlink
+
+/* Create a symlink, but reject trailing slash. */
+int
+rpl_symlink (char const *contents, char const *name)
+{
+ size_t len = strlen (name);
+ if (len && name[len - 1] == '/')
+ {
+ struct stat st;
+ if (lstat (name, &st) == 0)
+ errno = EEXIST;
+ return -1;
+ }
+ return symlink (contents, name);
+}
+
+#else /* !HAVE_SYMLINK */
+
+/* The system does not support symlinks. */
+int
+symlink (char const *contents _GL_UNUSED,
+ char const *name _GL_UNUSED)
+{
+ errno = ENOSYS;
+ return -1;
+}
+
+#endif /* !HAVE_SYMLINK */
diff --git a/gnulib-tests/test-alignof.c b/gnulib-tests/test-alignof.c
new file mode 100644
index 0000000..2af76f5
--- /dev/null
+++ b/gnulib-tests/test-alignof.c
@@ -0,0 +1,59 @@
+/* Test of <alignof.h>.
+ Copyright (C) 2009-2016 Free Software Foundation, Inc.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+/* Written by Bruno Haible <bruno@clisp.org>, 2009. */
+
+#include <config.h>
+
+#include <alignof.h>
+
+#include <stddef.h>
+#include <stdint.h>
+
+#include "verify.h"
+
+typedef long double longdouble;
+typedef struct { char a[1]; } struct1;
+typedef struct { char a[2]; } struct2;
+typedef struct { char a[3]; } struct3;
+typedef struct { char a[4]; } struct4;
+
+#define CHECK(type) \
+ typedef struct { char slot1; type slot2; } type##_helper; \
+ verify (alignof_slot (type) == offsetof (type##_helper, slot2)); \
+ const int type##_slot_alignment = alignof_slot (type); \
+ const int type##_type_alignment = alignof_type (type);
+
+CHECK (char)
+CHECK (short)
+CHECK (int)
+CHECK (long)
+CHECK (float)
+CHECK (double)
+CHECK (longdouble)
+#ifdef INT64_MAX
+CHECK (int64_t)
+#endif
+CHECK (struct1)
+CHECK (struct2)
+CHECK (struct3)
+CHECK (struct4)
+
+int
+main ()
+{
+ return 0;
+}
diff --git a/gnulib-tests/test-alloca-opt.c b/gnulib-tests/test-alloca-opt.c
new file mode 100644
index 0000000..b9aaa4a
--- /dev/null
+++ b/gnulib-tests/test-alloca-opt.c
@@ -0,0 +1,62 @@
+/* Test of optional automatic memory allocation.
+ Copyright (C) 2005, 2007, 2009-2016 Free Software Foundation, Inc.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+/* Written by Bruno Haible <bruno@clisp.org>, 2007. */
+
+#include <config.h>
+
+#include <alloca.h>
+
+#if HAVE_ALLOCA
+
+static void
+do_allocation (int n)
+{
+ void *ptr = alloca (n);
+ (void) ptr;
+}
+
+void (*func) (int) = do_allocation;
+
+#endif
+
+int
+main ()
+{
+#if HAVE_ALLOCA
+ int i;
+
+ /* Repeat a lot of times, to make sure there's no memory leak. */
+ for (i = 0; i < 100000; i++)
+ {
+ /* Try various values.
+ n = 0 gave a crash on Alpha with gcc-2.5.8.
+ Some versions of Mac OS X have a stack size limit of 512 KB. */
+ func (34);
+ func (134);
+ func (399);
+ func (510823);
+ func (129321);
+ func (0);
+ func (4070);
+ func (4095);
+ func (1);
+ func (16582);
+ }
+#endif
+
+ return 0;
+}
diff --git a/gnulib-tests/test-binary-io.c b/gnulib-tests/test-binary-io.c
new file mode 100644
index 0000000..6801e96
--- /dev/null
+++ b/gnulib-tests/test-binary-io.c
@@ -0,0 +1,69 @@
+/* Test of binary mode I/O.
+ Copyright (C) 2005, 2007-2016 Free Software Foundation, Inc.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+/* Written by Bruno Haible <bruno@clisp.org>, 2005. */
+
+#include <config.h>
+
+#include "binary-io.h"
+
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <fcntl.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <unistd.h>
+
+#include "macros.h"
+
+int
+main (int argc, char *argv[])
+{
+ /* Test the O_BINARY macro. */
+ {
+ int fd =
+ open ("t-bin-out0.tmp", O_CREAT | O_TRUNC | O_RDWR | O_BINARY, 0600);
+ if (write (fd, "Hello\n", 6) < 0)
+ exit (1);
+ close (fd);
+ }
+ {
+ struct stat statbuf;
+ if (stat ("t-bin-out0.tmp", &statbuf) < 0)
+ exit (1);
+ ASSERT (statbuf.st_size == 6);
+ }
+
+ switch (argv[1][0])
+ {
+ case '1':
+ /* Test the set_binary_mode() function. */
+ set_binary_mode (1, O_BINARY);
+ fputs ("Hello\n", stdout);
+ break;
+
+ case '2':
+ /* Test the SET_BINARY macro. */
+ SET_BINARY (1);
+ fputs ("Hello\n", stdout);
+ break;
+
+ default:
+ break;
+ }
+
+ return 0;
+}
diff --git a/gnulib-tests/test-binary-io.sh b/gnulib-tests/test-binary-io.sh
new file mode 100755
index 0000000..c4dd6e9
--- /dev/null
+++ b/gnulib-tests/test-binary-io.sh
@@ -0,0 +1,14 @@
+#!/bin/sh
+
+tmpfiles=""
+trap 'rm -fr $tmpfiles' 1 2 3 15
+
+tmpfiles="$tmpfiles t-bin-out0.tmp t-bin-out1.tmp t-bin-out2.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
+
+exit 0
diff --git a/gnulib-tests/test-btowc.c b/gnulib-tests/test-btowc.c
new file mode 100644
index 0000000..9953ac4
--- /dev/null
+++ b/gnulib-tests/test-btowc.c
@@ -0,0 +1,63 @@
+/* Test of conversion of unibyte character to wide character.
+ Copyright (C) 2008-2016 Free Software Foundation, Inc.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+/* Written by Bruno Haible <bruno@clisp.org>, 2008. */
+
+#include <config.h>
+
+#include <wchar.h>
+
+#include "signature.h"
+SIGNATURE_CHECK (btowc, wint_t, (int));
+
+#include <locale.h>
+#include <stdio.h>
+
+#include "macros.h"
+
+int
+main (int argc, char *argv[])
+{
+ int c;
+
+ /* configure should already have checked that the locale is supported. */
+ if (setlocale (LC_ALL, "") == NULL)
+ return 1;
+
+ ASSERT (btowc (EOF) == WEOF);
+
+ if (argc > 1)
+ switch (argv[1][0])
+ {
+ case '1':
+ /* Locale encoding is ISO-8859-1 or ISO-8859-15. */
+ for (c = 0; c < 0x80; c++)
+ ASSERT (btowc (c) == c);
+ for (c = 0xA0; c < 0x100; c++)
+ ASSERT (btowc (c) != WEOF);
+ return 0;
+
+ case '2':
+ /* Locale encoding is UTF-8. */
+ for (c = 0; c < 0x80; c++)
+ ASSERT (btowc (c) == c);
+ for (c = 0x80; c < 0x100; c++)
+ ASSERT (btowc (c) == WEOF);
+ return 0;
+ }
+
+ return 1;
+}
diff --git a/gnulib-tests/test-btowc1.sh b/gnulib-tests/test-btowc1.sh
new file mode 100755
index 0000000..aaef48d
--- /dev/null
+++ b/gnulib-tests/test-btowc1.sh
@@ -0,0 +1,15 @@
+#!/bin/sh
+
+# Test in an ISO-8859-1 or ISO-8859-15 locale.
+: ${LOCALE_FR=fr_FR}
+if test $LOCALE_FR = none; then
+ if test -f /usr/bin/localedef; then
+ echo "Skipping test: no traditional french locale is installed"
+ else
+ echo "Skipping test: no traditional french locale is supported"
+ fi
+ exit 77
+fi
+
+LC_ALL=$LOCALE_FR \
+./test-btowc${EXEEXT} 1
diff --git a/gnulib-tests/test-btowc2.sh b/gnulib-tests/test-btowc2.sh
new file mode 100755
index 0000000..2e06038
--- /dev/null
+++ b/gnulib-tests/test-btowc2.sh
@@ -0,0 +1,15 @@
+#!/bin/sh
+
+# Test whether a specific UTF-8 locale is installed.
+: ${LOCALE_FR_UTF8=fr_FR.UTF-8}
+if test $LOCALE_FR_UTF8 = none; then
+ if test -f /usr/bin/localedef; then
+ echo "Skipping test: no french Unicode locale is installed"
+ else
+ echo "Skipping test: no french Unicode locale is supported"
+ fi
+ exit 77
+fi
+
+LC_ALL=$LOCALE_FR_UTF8 \
+./test-btowc${EXEEXT} 2
diff --git a/gnulib-tests/test-c-ctype.c b/gnulib-tests/test-c-ctype.c
new file mode 100644
index 0000000..184cdec
--- /dev/null
+++ b/gnulib-tests/test-c-ctype.c
@@ -0,0 +1,228 @@
+/* Test of character handling in C locale.
+ Copyright (C) 2005, 2007-2016 Free Software Foundation, Inc.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+/* Written by Bruno Haible <bruno@clisp.org>, 2005. */
+
+#include <config.h>
+
+#include "c-ctype.h"
+
+#include <ctype.h>
+#include <limits.h>
+#include <locale.h>
+
+#include "macros.h"
+
+static void
+test_agree_with_C_locale (void)
+{
+ int c;
+
+ for (c = 0; c <= UCHAR_MAX; c++)
+ {
+ ASSERT (c_isascii (c) == (isascii (c) != 0));
+ if (c_isascii (c))
+ {
+ ASSERT (c_isalnum (c) == (isalnum (c) != 0));
+ ASSERT (c_isalpha (c) == (isalpha (c) != 0));
+ ASSERT (c_isblank (c) == (isblank (c) != 0));
+ ASSERT (c_iscntrl (c) == (iscntrl (c) != 0));
+ ASSERT (c_isdigit (c) == (isdigit (c) != 0));
+ ASSERT (c_islower (c) == (islower (c) != 0));
+ ASSERT (c_isgraph (c) == (isgraph (c) != 0));
+ ASSERT (c_isprint (c) == (isprint (c) != 0));
+ ASSERT (c_ispunct (c) == (ispunct (c) != 0));
+ ASSERT (c_isspace (c) == (isspace (c) != 0));
+ ASSERT (c_isupper (c) == (isupper (c) != 0));
+ ASSERT (c_isxdigit (c) == (isxdigit (c) != 0));
+ ASSERT (c_tolower (c) == tolower (c));
+ ASSERT (c_toupper (c) == toupper (c));
+ }
+ }
+}
+
+static void
+test_all (void)
+{
+ int c;
+ int n_isascii = 0;
+
+ for (c = CHAR_MIN; c <= UCHAR_MAX; c++)
+ {
+ if (! (0 <= c && c <= CHAR_MAX))
+ {
+ ASSERT (! c_isascii (c));
+ ASSERT (! c_isalnum (c));
+ ASSERT (! c_isalpha (c));
+ ASSERT (! c_isblank (c));
+ ASSERT (! c_iscntrl (c));
+ ASSERT (! c_isdigit (c));
+ ASSERT (! c_islower (c));
+ ASSERT (! c_isgraph (c));
+ ASSERT (! c_isprint (c));
+ ASSERT (! c_ispunct (c));
+ ASSERT (! c_isspace (c));
+ ASSERT (! c_isupper (c));
+ ASSERT (! c_isxdigit (c));
+ ASSERT (c_tolower (c) == c);
+ ASSERT (c_toupper (c) == c);
+ }
+
+ n_isascii += c_isascii (c);
+
+#ifdef C_CTYPE_ASCII
+ ASSERT (c_isascii (c) == (0 <= c && c <= 0x7f));
+#endif
+
+ ASSERT (c_isascii (c) == (c_isprint (c) || c_iscntrl (c)));
+
+ ASSERT (c_isalnum (c) == (c_isalpha (c) || c_isdigit (c)));
+
+ ASSERT (c_isalpha (c) == (c_islower (c) || c_isupper (c)));
+
+ switch (c)
+ {
+ case '\t': case ' ':
+ ASSERT (c_isblank (c) == 1);
+ break;
+ default:
+ ASSERT (c_isblank (c) == 0);
+ break;
+ }
+
+#ifdef C_CTYPE_ASCII
+ ASSERT (c_iscntrl (c) == ((c >= 0 && c < 0x20) || c == 0x7f));
+#endif
+
+ switch (c)
+ {
+ case '\a': case '\b': case '\f': case '\n':
+ case '\r': case '\t': case '\v':
+ ASSERT (c_iscntrl (c));
+ break;
+ }
+
+ ASSERT (! (c_iscntrl (c) && c_isprint (c)));
+
+ switch (c)
+ {
+ case '0': case '1': case '2': case '3': case '4': case '5':
+ case '6': case '7': case '8': case '9':
+ ASSERT (c_isdigit (c) == 1);
+ break;
+ default:
+ ASSERT (c_isdigit (c) == 0);
+ break;
+ }
+
+ switch (c)
+ {
+ case 'a': case 'b': case 'c': case 'd': case 'e': case 'f':
+ case 'g': case 'h': case 'i': case 'j': case 'k': case 'l':
+ case 'm': case 'n': case 'o': case 'p': case 'q': case 'r':
+ case 's': case 't': case 'u': case 'v': case 'w': case 'x':
+ case 'y': case 'z':
+ ASSERT (c_islower (c) == 1);
+ ASSERT (c_toupper (c) == c - 'a' + 'A');
+ break;
+ default:
+ ASSERT (c_islower (c) == 0);
+ ASSERT (c_toupper (c) == c);
+ break;
+ }
+
+#ifdef C_CTYPE_ASCII
+ ASSERT (c_isgraph (c) == ((c >= 0x20 && c < 0x7f) && c != ' '));
+
+ ASSERT (c_isprint (c) == (c >= 0x20 && c < 0x7f));
+#endif
+
+ ASSERT (c_isgraph (c) == (c_isalnum (c) || c_ispunct (c)));
+
+ ASSERT (c_isprint (c) == (c_isgraph (c) || c == ' '));
+
+ switch (c)
+ {
+ case '!': case '"': case '#': case '$': case '%': case '&': case '\'':
+ case '(': case ')': case '*': case '+': case ',': case '-': case '.':
+ case '/': case ':': case ';': case '<': case '=': case '>': case '?':
+ case '@': case '[': case'\\': case ']': case '^': case '_': case '`':
+ case '{': case '|': case '}': case '~':
+ ASSERT (c_ispunct (c) == 1);
+ break;
+ default:
+ ASSERT (c_ispunct (c) == 0);
+ break;
+ }
+
+ switch (c)
+ {
+ case ' ': case '\t': case '\n': case '\v': case '\f': case '\r':
+ ASSERT (c_isspace (c) == 1);
+ break;
+ default:
+ ASSERT (c_isspace (c) == 0);
+ break;
+ }
+
+ switch (c)
+ {
+ case 'A': case 'B': case 'C': case 'D': case 'E': case 'F':
+ case 'G': case 'H': case 'I': case 'J': case 'K': case 'L':
+ case 'M': case 'N': case 'O': case 'P': case 'Q': case 'R':
+ case 'S': case 'T': case 'U': case 'V': case 'W': case 'X':
+ case 'Y': case 'Z':
+ ASSERT (c_isupper (c) == 1);
+ ASSERT (c_tolower (c) == c - 'A' + 'a');
+ break;
+ default:
+ ASSERT (c_isupper (c) == 0);
+ ASSERT (c_tolower (c) == c);
+ break;
+ }
+
+ switch (c)
+ {
+ case '0': case '1': case '2': case '3': case '4': case '5':
+ case '6': case '7': case '8': case '9':
+ case 'A': case 'B': case 'C': case 'D': case 'E': case 'F':
+ case 'a': case 'b': case 'c': case 'd': case 'e': case 'f':
+ ASSERT (c_isxdigit (c) == 1);
+ break;
+ default:
+ ASSERT (c_isxdigit (c) == 0);
+ break;
+ }
+ }
+
+ ASSERT (n_isascii == 128);
+}
+
+int
+main ()
+{
+ test_agree_with_C_locale ();
+
+ test_all ();
+
+ setlocale (LC_ALL, "de_DE");
+ test_all ();
+
+ setlocale (LC_ALL, "ja_JP.EUC-JP");
+ test_all ();
+
+ return 0;
+}
diff --git a/gnulib-tests/test-c-strcase.sh b/gnulib-tests/test-c-strcase.sh
new file mode 100755
index 0000000..5fcf906
--- /dev/null
+++ b/gnulib-tests/test-c-strcase.sh
@@ -0,0 +1,21 @@
+#!/bin/sh
+
+# Test in the C locale.
+./test-c-strcasecmp${EXEEXT} || exit 1
+./test-c-strncasecmp${EXEEXT} || exit 1
+
+# Test in an ISO-8859-1 or ISO-8859-15 locale.
+: ${LOCALE_FR=fr_FR}
+if test $LOCALE_FR != none; then
+ LC_ALL=$LOCALE_FR ./test-c-strcasecmp${EXEEXT} locale || exit 1
+ LC_ALL=$LOCALE_FR ./test-c-strncasecmp${EXEEXT} locale || exit 1
+fi
+
+# Test in a Turkish UTF-8 locale.
+: ${LOCALE_TR_UTF8=tr_TR.UTF-8}
+if test $LOCALE_TR_UTF8 != none; then
+ LC_ALL=$LOCALE_TR_UTF8 ./test-c-strcasecmp${EXEEXT} locale || exit 1
+ LC_ALL=$LOCALE_TR_UTF8 ./test-c-strncasecmp${EXEEXT} locale || exit 1
+fi
+
+exit 0
diff --git a/gnulib-tests/test-c-strcasecmp.c b/gnulib-tests/test-c-strcasecmp.c
new file mode 100644
index 0000000..42e538f
--- /dev/null
+++ b/gnulib-tests/test-c-strcasecmp.c
@@ -0,0 +1,68 @@
+/* Test of case-insensitive string comparison function.
+ Copyright (C) 2007-2016 Free Software Foundation, Inc.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+/* Written by Bruno Haible <bruno@clisp.org>, 2007. */
+
+#include <config.h>
+
+#include "c-strcase.h"
+#include "c-ctype.h"
+
+#include <locale.h>
+#include <string.h>
+
+#include "macros.h"
+
+int
+main (int argc, char *argv[])
+{
+ if (argc > 1)
+ {
+ /* configure should already have checked that the locale is supported. */
+ if (setlocale (LC_ALL, "") == NULL)
+ return 1;
+ }
+
+ ASSERT (c_strcasecmp ("paragraph", "Paragraph") == 0);
+
+ ASSERT (c_strcasecmp ("paragrapH", "parAgRaph") == 0);
+
+ ASSERT (c_strcasecmp ("paragraph", "paraLyzed") < 0);
+ ASSERT (c_strcasecmp ("paraLyzed", "paragraph") > 0);
+
+ ASSERT (c_strcasecmp ("para", "paragraph") < 0);
+ ASSERT (c_strcasecmp ("paragraph", "para") > 0);
+
+ /* The following tests shows how c_strcasecmp() is different from
+ strcasecmp(). */
+
+ ASSERT (c_strcasecmp ("\311mile", "\351mile") < 0);
+ ASSERT (c_strcasecmp ("\351mile", "\311mile") > 0);
+
+ /* The following tests shows how c_strcasecmp() is different from
+ mbscasecmp(). */
+
+ ASSERT (c_strcasecmp ("\303\266zg\303\274r", "\303\226ZG\303\234R") > 0); /* özgür */
+ ASSERT (c_strcasecmp ("\303\226ZG\303\234R", "\303\266zg\303\274r") < 0); /* özgür */
+
+#if C_CTYPE_ASCII
+ /* This test shows how strings of different size cannot compare equal. */
+ ASSERT (c_strcasecmp ("turkish", "TURK\304\260SH") < 0);
+ ASSERT (c_strcasecmp ("TURK\304\260SH", "turkish") > 0);
+#endif
+
+ return 0;
+}
diff --git a/gnulib-tests/test-c-strncasecmp.c b/gnulib-tests/test-c-strncasecmp.c
new file mode 100644
index 0000000..349f6b3
--- /dev/null
+++ b/gnulib-tests/test-c-strncasecmp.c
@@ -0,0 +1,82 @@
+/* Test of case-insensitive string comparison function.
+ Copyright (C) 2007-2016 Free Software Foundation, Inc.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+/* Written by Bruno Haible <bruno@clisp.org>, 2007. */
+
+#include <config.h>
+
+#include "c-strcase.h"
+#include "c-ctype.h"
+
+#include <locale.h>
+#include <string.h>
+
+#include "macros.h"
+
+int
+main (int argc, char *argv[])
+{
+ if (argc > 1)
+ {
+ /* configure should already have checked that the locale is supported. */
+ if (setlocale (LC_ALL, "") == NULL)
+ return 1;
+ }
+
+ ASSERT (c_strncasecmp ("paragraph", "Paragraph", 1000000) == 0);
+ ASSERT (c_strncasecmp ("paragraph", "Paragraph", 9) == 0);
+
+ ASSERT (c_strncasecmp ("paragrapH", "parAgRaph", 1000000) == 0);
+ ASSERT (c_strncasecmp ("paragrapH", "parAgRaph", 9) == 0);
+
+ ASSERT (c_strncasecmp ("paragraph", "paraLyzed", 10) < 0);
+ ASSERT (c_strncasecmp ("paragraph", "paraLyzed", 9) < 0);
+ ASSERT (c_strncasecmp ("paragraph", "paraLyzed", 5) < 0);
+ ASSERT (c_strncasecmp ("paragraph", "paraLyzed", 4) == 0);
+ ASSERT (c_strncasecmp ("paraLyzed", "paragraph", 10) > 0);
+ ASSERT (c_strncasecmp ("paraLyzed", "paragraph", 9) > 0);
+ ASSERT (c_strncasecmp ("paraLyzed", "paragraph", 5) > 0);
+ ASSERT (c_strncasecmp ("paraLyzed", "paragraph", 4) == 0);
+
+ ASSERT (c_strncasecmp ("para", "paragraph", 10) < 0);
+ ASSERT (c_strncasecmp ("para", "paragraph", 9) < 0);
+ ASSERT (c_strncasecmp ("para", "paragraph", 5) < 0);
+ ASSERT (c_strncasecmp ("para", "paragraph", 4) == 0);
+ ASSERT (c_strncasecmp ("paragraph", "para", 10) > 0);
+ ASSERT (c_strncasecmp ("paragraph", "para", 9) > 0);
+ ASSERT (c_strncasecmp ("paragraph", "para", 5) > 0);
+ ASSERT (c_strncasecmp ("paragraph", "para", 4) == 0);
+
+ /* The following tests shows how c_strncasecmp() is different from
+ strncasecmp(). */
+
+ ASSERT (c_strncasecmp ("\311mily", "\351mile", 4) < 0);
+ ASSERT (c_strncasecmp ("\351mile", "\311mily", 4) > 0);
+
+ /* The following tests shows how c_strncasecmp() is different from
+ mbsncasecmp(). */
+
+ ASSERT (c_strncasecmp ("\303\266zg\303\274r", "\303\226ZG\303\234R", 99) > 0); /* özgür */
+ ASSERT (c_strncasecmp ("\303\226ZG\303\234R", "\303\266zg\303\274r", 99) < 0); /* özgür */
+
+#if C_CTYPE_ASCII
+ /* This test shows how strings of different size cannot compare equal. */
+ ASSERT (c_strncasecmp ("turkish", "TURK\304\260SH", 7) < 0);
+ ASSERT (c_strncasecmp ("TURK\304\260SH", "turkish", 7) > 0);
+#endif
+
+ return 0;
+}
diff --git a/gnulib-tests/test-canonicalize-lgpl.c b/gnulib-tests/test-canonicalize-lgpl.c
new file mode 100644
index 0000000..d1c71e6
--- /dev/null
+++ b/gnulib-tests/test-canonicalize-lgpl.c
@@ -0,0 +1,226 @@
+/* Test of execution of program termination handlers.
+ Copyright (C) 2007-2016 Free Software Foundation, Inc.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+/* Written by Bruno Haible <bruno@clisp.org>, 2007. */
+
+#include <config.h>
+
+#include <stdlib.h>
+
+#include "signature.h"
+SIGNATURE_CHECK (realpath, char *, (const char *, char *));
+SIGNATURE_CHECK (canonicalize_file_name, char *, (const char *));
+
+#include <errno.h>
+#include <fcntl.h>
+#include <stdio.h>
+#include <string.h>
+#include <sys/stat.h>
+#include <unistd.h>
+
+#include "same-inode.h"
+#include "ignore-value.h"
+#include "macros.h"
+
+#define BASE "t-can-lgpl.tmp"
+
+static void *
+null_ptr (void)
+{
+ return NULL;
+}
+
+int
+main (void)
+{
+#if GNULIB_TEST_CANONICALIZE
+ /* No need to test canonicalize-lgpl module if canonicalize is also
+ in use. */
+ return 0;
+#endif
+
+ /* Setup some hierarchy to be used by this test. Start by removing
+ any leftovers from a previous partial run. */
+ {
+ int fd;
+ ignore_value (system ("rm -rf " BASE " ise"));
+ ASSERT (mkdir (BASE, 0700) == 0);
+ fd = creat (BASE "/tra", 0600);
+ ASSERT (0 <= fd);
+ ASSERT (close (fd) == 0);
+ }
+
+ /* Check for ., .., intermediate // handling, and for error cases. */
+ {
+ char *result = canonicalize_file_name (BASE "//./..//" BASE "/tra");
+ ASSERT (result != NULL);
+ ASSERT (strstr (result, "/" BASE "/tra")
+ == result + strlen (result) - strlen ("/" BASE "/tra"));
+ free (result);
+ errno = 0;
+ result = canonicalize_file_name ("");
+ ASSERT (result == NULL);
+ ASSERT (errno == ENOENT);
+ errno = 0;
+ result = canonicalize_file_name (null_ptr ());
+ ASSERT (result == NULL);
+ ASSERT (errno == EINVAL);
+ }
+
+ /* Check that a non-directory with trailing slash yields NULL. */
+ {
+ char *result;
+ errno = 0;
+ result = canonicalize_file_name (BASE "/tra/");
+ ASSERT (result == NULL);
+ ASSERT (errno == ENOTDIR);
+ }
+
+ /* Check that a missing directory yields NULL. */
+ {
+ char *result;
+ errno = 0;
+ result = canonicalize_file_name (BASE "/zzz/..");
+ ASSERT (result == NULL);
+ ASSERT (errno == ENOENT);
+ }
+
+ /* From here on out, tests involve symlinks. */
+ if (symlink (BASE "/ket", "ise") != 0)
+ {
+ ASSERT (remove (BASE "/tra") == 0);
+ ASSERT (rmdir (BASE) == 0);
+ fputs ("skipping test: symlinks not supported on this file system\n",
+ stderr);
+ return 77;
+ }
+ ASSERT (symlink ("bef", BASE "/plo") == 0);
+ ASSERT (symlink ("tra", BASE "/huk") == 0);
+ ASSERT (symlink ("lum", BASE "/bef") == 0);
+ ASSERT (symlink ("wum", BASE "/ouk") == 0);
+ ASSERT (symlink ("../ise", BASE "/ket") == 0);
+ ASSERT (mkdir (BASE "/lum", 0700) == 0);
+ ASSERT (symlink ("//.//../..", BASE "/droot") == 0);
+
+ /* Check that the symbolic link to a file can be resolved. */
+ {
+ char *result1 = canonicalize_file_name (BASE "/huk");
+ char *result2 = canonicalize_file_name (BASE "/tra");
+ ASSERT (result1 != NULL);
+ ASSERT (result2 != NULL);
+ ASSERT (strcmp (result1, result2) == 0);
+ ASSERT (strcmp (result1 + strlen (result1) - strlen ("/" BASE "/tra"),
+ "/" BASE "/tra") == 0);
+ free (result1);
+ free (result2);
+ }
+
+ /* Check that the symbolic link to a directory can be resolved. */
+ {
+ char *result1 = canonicalize_file_name (BASE "/plo");
+ char *result2 = canonicalize_file_name (BASE "/bef");
+ char *result3 = canonicalize_file_name (BASE "/lum");
+ ASSERT (result1 != NULL);
+ ASSERT (result2 != NULL);
+ ASSERT (result3 != NULL);
+ ASSERT (strcmp (result1, result2) == 0);
+ ASSERT (strcmp (result2, result3) == 0);
+ ASSERT (strcmp (result1 + strlen (result1) - strlen ("/" BASE "/lum"),
+ "/" BASE "/lum") == 0);
+ free (result1);
+ free (result2);
+ free (result3);
+ }
+
+ /* Check that a symbolic link to a nonexistent file yields NULL. */
+ {
+ char *result;
+ errno = 0;
+ result = canonicalize_file_name (BASE "/ouk");
+ ASSERT (result == NULL);
+ ASSERT (errno == ENOENT);
+ }
+
+ /* Check that a non-directory symlink with trailing slash yields NULL. */
+ {
+ char *result;
+ errno = 0;
+ result = canonicalize_file_name (BASE "/huk/");
+ ASSERT (result == NULL);
+ ASSERT (errno == ENOTDIR);
+ }
+
+ /* Check that a missing directory via symlink yields NULL. */
+ {
+ char *result;
+ errno = 0;
+ result = canonicalize_file_name (BASE "/ouk/..");
+ ASSERT (result == NULL);
+ ASSERT (errno == ENOENT);
+ }
+
+ /* Check that a loop of symbolic links is detected. */
+ {
+ char *result;
+ errno = 0;
+ result = canonicalize_file_name ("ise");
+ ASSERT (result == NULL);
+ ASSERT (errno == ELOOP);
+ }
+
+ /* Check that leading // is honored correctly. */
+ {
+ struct stat st1;
+ struct stat st2;
+ char *result1 = canonicalize_file_name ("//.");
+ char *result2 = canonicalize_file_name (BASE "/droot");
+ ASSERT (result1);
+ ASSERT (result2);
+ ASSERT (stat ("/", &st1) == 0);
+ ASSERT (stat ("//", &st2) == 0);
+ /* On IBM z/OS, "/" and "//" are distinct, yet they both have
+ st_dev == st_ino == 1. */
+#ifndef __MVS__
+ if (SAME_INODE (st1, st2))
+ {
+ ASSERT (strcmp (result1, "/") == 0);
+ ASSERT (strcmp (result2, "/") == 0);
+ }
+ else
+#endif
+ {
+ ASSERT (strcmp (result1, "//") == 0);
+ ASSERT (strcmp (result2, "//") == 0);
+ }
+ free (result1);
+ free (result2);
+ }
+
+
+ /* Cleanup. */
+ ASSERT (remove (BASE "/droot") == 0);
+ ASSERT (remove (BASE "/plo") == 0);
+ ASSERT (remove (BASE "/huk") == 0);
+ ASSERT (remove (BASE "/bef") == 0);
+ ASSERT (remove (BASE "/ouk") == 0);
+ ASSERT (remove (BASE "/ket") == 0);
+ ASSERT (remove (BASE "/lum") == 0);
+ ASSERT (remove (BASE "/tra") == 0);
+ ASSERT (remove (BASE) == 0);
+ ASSERT (remove ("ise") == 0);
+
+ return 0;
+}
diff --git a/gnulib-tests/test-chdir.c b/gnulib-tests/test-chdir.c
new file mode 100644
index 0000000..6eac5f4
--- /dev/null
+++ b/gnulib-tests/test-chdir.c
@@ -0,0 +1,33 @@
+/* Test changing to a directory.
+ Copyright (C) 2011-2016 Free Software Foundation, Inc.
+
+ This 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>
+
+/* Specification. */
+#include <unistd.h>
+
+#include "signature.h"
+SIGNATURE_CHECK (chdir, int, (const char *));
+
+#include "macros.h"
+
+int
+main (void)
+{
+ ASSERT (chdir ("/") == 0);
+
+ return 0;
+}
diff --git a/gnulib-tests/test-close.c b/gnulib-tests/test-close.c
new file mode 100644
index 0000000..a0428e0
--- /dev/null
+++ b/gnulib-tests/test-close.c
@@ -0,0 +1,45 @@
+/* Test closing a file or socket.
+ Copyright (C) 2011-2016 Free Software Foundation, Inc.
+
+ This 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 <unistd.h>
+
+#include "signature.h"
+SIGNATURE_CHECK (close, int, (int));
+
+#include <errno.h>
+
+#include "macros.h"
+
+int
+main (void)
+{
+ /* Test behaviour for invalid file descriptors. */
+ {
+ errno = 0;
+ ASSERT (close (-1) == -1);
+ ASSERT (errno == EBADF);
+ }
+ {
+ close (99);
+ errno = 0;
+ ASSERT (close (99) == -1);
+ ASSERT (errno == EBADF);
+ }
+
+ return 0;
+}
diff --git a/gnulib-tests/test-copy-acl-1.sh b/gnulib-tests/test-copy-acl-1.sh
new file mode 100755
index 0000000..2f9880e
--- /dev/null
+++ b/gnulib-tests/test-copy-acl-1.sh
@@ -0,0 +1,13 @@
+#!/bin/sh
+
+# Test copy-acl on the file system of /var/tmp, which usually is a local
+# file system.
+
+if test -d /var/tmp; then
+ TMPDIR=/var/tmp
+else
+ TMPDIR=/tmp
+fi
+export TMPDIR
+
+exec "${srcdir}/test-copy-acl.sh"
diff --git a/gnulib-tests/test-copy-acl-2.sh b/gnulib-tests/test-copy-acl-2.sh
new file mode 100755
index 0000000..984602d
--- /dev/null
+++ b/gnulib-tests/test-copy-acl-2.sh
@@ -0,0 +1,9 @@
+#!/bin/sh
+
+# Test copy-acl on the file system of the build directory, which may be
+# a local file system or NFS mounted.
+
+TMPDIR=`pwd`
+export TMPDIR
+
+exec "${srcdir}/test-copy-acl.sh"
diff --git a/gnulib-tests/test-copy-acl.c b/gnulib-tests/test-copy-acl.c
new file mode 100644
index 0000000..1dfd2e2
--- /dev/null
+++ b/gnulib-tests/test-copy-acl.c
@@ -0,0 +1,73 @@
+/* Test of copying of files.
+ Copyright (C) 2008-2016 Free Software Foundation, Inc.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+/* Written by Bruno Haible <bruno@clisp.org>, 2008. */
+
+#include <config.h>
+
+#include "acl.h"
+
+#include <fcntl.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <unistd.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+
+#include "macros.h"
+
+int
+main (int argc, char *argv[])
+{
+ const char *file1;
+ const char *file2;
+ int fd1;
+ struct stat statbuf;
+ int mode;
+ int fd2;
+
+ ASSERT (argc == 3);
+
+ file1 = argv[1];
+ file2 = argv[2];
+
+ fd1 = open (file1, O_RDONLY);
+ if (fd1 < 0 || fstat (fd1, &statbuf) < 0)
+ {
+ fprintf (stderr, "could not open file \"%s\"\n", file1);
+ exit (EXIT_FAILURE);
+ }
+ mode = statbuf.st_mode & 07777;
+
+ fd2 = open (file2, O_WRONLY, 0600);
+ if (fd2 < 0)
+ {
+ fprintf (stderr, "could not open file \"%s\"\n", file2);
+ exit (EXIT_FAILURE);
+ }
+
+#if USE_ACL
+ if (copy_acl (file1, fd1, file2, fd2, mode))
+ exit (EXIT_FAILURE);
+#else
+ chmod (file2, mode);
+#endif
+
+ close (fd2);
+ close (fd1);
+
+ return 0;
+}
diff --git a/gnulib-tests/test-copy-acl.sh b/gnulib-tests/test-copy-acl.sh
new file mode 100755
index 0000000..147bf56
--- /dev/null
+++ b/gnulib-tests/test-copy-acl.sh
@@ -0,0 +1,659 @@
+#!/bin/sh
+
+# Show all commands when run with environment variable VERBOSE=yes.
+test -z "$VERBOSE" || set -x
+
+test "$USE_ACL" = 0 &&
+ {
+ echo "Skipping test: insufficient ACL support"
+ exit 77
+ }
+
+# func_tmpdir
+# creates a temporary directory.
+# Sets variable
+# - tmp pathname of freshly created temporary directory
+func_tmpdir ()
+{
+ # Use the environment variable TMPDIR, falling back to /tmp. This allows
+ # users to specify a different temporary directory, for example, if their
+ # /tmp is filled up or too small.
+ : ${TMPDIR=/tmp}
+ {
+ # Use the mktemp program if available. If not available, hide the error
+ # message.
+ tmp=`(umask 077 && mktemp -d "$TMPDIR/glXXXXXX") 2>/dev/null` &&
+ test -n "$tmp" && test -d "$tmp"
+ } ||
+ {
+ # Use a simple mkdir command. It is guaranteed to fail if the directory
+ # already exists. $RANDOM is bash specific and expands to empty in shells
+ # other than bash, ksh and zsh. Its use does not increase security;
+ # rather, it minimizes the probability of failure in a very cluttered /tmp
+ # directory.
+ tmp=$TMPDIR/gl$$-$RANDOM
+ (umask 077 && mkdir "$tmp")
+ } ||
+ {
+ echo "$0: cannot create a temporary directory in $TMPDIR" >&2
+ exit 1
+ }
+}
+
+func_tmpdir
+builddir=`pwd`
+cd "$builddir" ||
+ {
+ echo "$0: cannot determine build directory (unreadable parent dir?)" >&2
+ exit 1
+ }
+# Switch to a temporary directory, to increase the likelihood that ACLs are
+# supported on the current file system. (/tmp is usually locally mounted,
+# whereas the build dir is sometimes NFS-mounted.)
+( cd "$tmp"
+
+ # Prepare tmpfile0.
+ rm -f tmpfile[0-9] tmpaclout[0-2]
+ echo "Simple contents" > tmpfile0
+ chmod 600 tmpfile0
+
+ # Classification of the platform according to the programs available for
+ # manipulating ACLs.
+ # Possible values are:
+ # linux, cygwin, freebsd, solaris, hpux, hpuxjfs, osf1, aix, macosx, irix, none.
+ # TODO: Support also native Windows platforms (mingw).
+ acl_flavor=none
+ if (getfacl tmpfile0 >/dev/null) 2>/dev/null; then
+ # Platforms with the getfacl and setfacl programs.
+ # Linux, FreeBSD, Solaris, Cygwin.
+ if (setfacl --help >/dev/null) 2>/dev/null; then
+ # Linux, Cygwin.
+ if (LC_ALL=C setfacl --help | grep ' --set-file' >/dev/null) 2>/dev/null; then
+ # Linux.
+ acl_flavor=linux
+ else
+ acl_flavor=cygwin
+ fi
+ else
+ # FreeBSD, Solaris.
+ if (LC_ALL=C setfacl 2>&1 | grep '\-x entries' >/dev/null) 2>/dev/null; then
+ # FreeBSD.
+ acl_flavor=freebsd
+ else
+ # Solaris.
+ acl_flavor=solaris
+ fi
+ fi
+ else
+ if (lsacl / >/dev/null) 2>/dev/null; then
+ # Platforms with the lsacl and chacl programs.
+ # HP-UX, sometimes also IRIX.
+ if (getacl tmpfile0 >/dev/null) 2>/dev/null; then
+ # HP-UX 11.11 or newer.
+ acl_flavor=hpuxjfs
+ else
+ # HP-UX 11.00.
+ acl_flavor=hpux
+ fi
+ else
+ if (getacl tmpfile0 >/dev/null) 2>/dev/null; then
+ # Tru64, NonStop Kernel.
+ if (getacl -m tmpfile0 >/dev/null) 2>/dev/null; then
+ # Tru64.
+ acl_flavor=osf1
+ else
+ # NonStop Kernel.
+ acl_flavor=nsk
+ fi
+ else
+ if (aclget tmpfile0 >/dev/null) 2>/dev/null; then
+ # AIX.
+ acl_flavor=aix
+ else
+ if (fsaclctl -v >/dev/null) 2>/dev/null; then
+ # Mac OS X.
+ acl_flavor=macosx
+ else
+ if test -f /sbin/chacl; then
+ # IRIX.
+ acl_flavor=irix
+ fi
+ fi
+ fi
+ fi
+ fi
+ fi
+
+ # Define a function to test for the same ACLs, from the point of view of
+ # the programs.
+ # func_test_same_acls file1 file2
+ case $acl_flavor in
+ linux | cygwin | freebsd | solaris)
+ func_test_same_acls ()
+ {
+ getfacl "$1" | sed -e "s/$1/FILENAME/g" > tmpaclout1
+ getfacl "$2" | sed -e "s/$2/FILENAME/g" > tmpaclout2
+ cmp tmpaclout1 tmpaclout2 > /dev/null
+ }
+ ;;
+ hpux)
+ func_test_same_acls ()
+ {
+ lsacl "$1" | sed -e "s/$1/FILENAME/g" > tmpaclout1
+ lsacl "$2" | sed -e "s/$2/FILENAME/g" > tmpaclout2
+ cmp tmpaclout1 tmpaclout2 > /dev/null
+ }
+ ;;
+ hpuxjfs)
+ func_test_same_acls ()
+ {
+ { lsacl "$1" | sed -e "s/$1/FILENAME/g" > tmpaclout1
+ lsacl "$2" | sed -e "s/$2/FILENAME/g" > tmpaclout2
+ cmp tmpaclout1 tmpaclout2 > /dev/null
+ } &&
+ { getacl "$1" | sed -e "s/$1/FILENAME/g" > tmpaclout1
+ getacl "$2" | sed -e "s/$2/FILENAME/g" > tmpaclout2
+ cmp tmpaclout1 tmpaclout2 > /dev/null
+ }
+ }
+ ;;
+ osf1 | nsk)
+ func_test_same_acls ()
+ {
+ getacl "$1" | sed -e "s/$1/FILENAME/g" > tmpaclout1
+ getacl "$2" | sed -e "s/$2/FILENAME/g" > tmpaclout2
+ cmp tmpaclout1 tmpaclout2 > /dev/null
+ }
+ ;;
+ aix)
+ func_test_same_acls ()
+ {
+ aclget "$1" > tmpaclout1
+ aclget "$2" > tmpaclout2
+ cmp tmpaclout1 tmpaclout2 > /dev/null
+ }
+ ;;
+ macosx)
+ func_test_same_acls ()
+ {
+ /bin/ls -le "$1" | sed -e "s/$1/FILENAME/g" > tmpaclout1
+ /bin/ls -le "$2" | sed -e "s/$2/FILENAME/g" > tmpaclout2
+ cmp tmpaclout1 tmpaclout2 > /dev/null
+ }
+ ;;
+ irix)
+ func_test_same_acls ()
+ {
+ /bin/ls -lD "$1" | sed -e "s/$1/FILENAME/g" > tmpaclout1
+ /bin/ls -lD "$2" | sed -e "s/$2/FILENAME/g" > tmpaclout2
+ cmp tmpaclout1 tmpaclout2 > /dev/null
+ }
+ ;;
+ none)
+ func_test_same_acls ()
+ {
+ :
+ }
+ ;;
+ esac
+
+ # func_test_copy file1 file2
+ # copies file1 to file2 and verifies the permissions and ACLs are the same
+ # on both.
+ func_test_copy ()
+ {
+ echo "Simple contents" > "$2"
+ chmod 600 "$2"
+ "$builddir"/test-copy-acl${EXEEXT} "$1" "$2" || exit 1
+ "$builddir"/test-sameacls${EXEEXT} "$1" "$2" || exit 1
+ func_test_same_acls "$1" "$2" || exit 1
+ }
+
+ func_test_copy tmpfile0 tmpfile1
+
+ if test $acl_flavor != none; then
+ # A POSIX compliant 'id' program.
+ if test -f /usr/xpg4/bin/id; then
+ ID=/usr/xpg4/bin/id
+ else
+ ID=id
+ fi
+ # Use a user and group id different from the current one, to avoid
+ # redundant/ambiguous ACLs.
+ myuid=`$ID -u`
+ mygid=`$ID -g`
+ auid=1
+ if test "$auid" = "$myuid"; then auid=2; fi
+ agid=1
+ if test "$agid" = "$mygid"; then agid=2; fi
+
+ case $acl_flavor in
+ linux | freebsd | solaris)
+
+ # Set an ACL for a user.
+ setfacl -m user:$auid:1 tmpfile0
+
+ func_test_copy tmpfile0 tmpfile2
+
+ # Set an ACL for a group.
+ setfacl -m group:$agid:4 tmpfile0
+
+ func_test_copy tmpfile0 tmpfile3
+
+ # Set an ACL for other.
+ case $acl_flavor in
+ freebsd) setfacl -m other::4 tmpfile0 ;;
+ solaris) chmod o+r tmpfile0 ;;
+ *) setfacl -m other:4 tmpfile0 ;;
+ esac
+
+ func_test_copy tmpfile0 tmpfile4
+
+ # Remove the ACL for the user.
+ case $acl_flavor in
+ linux) setfacl -x user:$auid tmpfile0 ;;
+ freebsd) setfacl -x user:$auid:1 tmpfile0 ;;
+ *) setfacl -d user:$auid:1 tmpfile0 ;;
+ esac
+
+ func_test_copy tmpfile0 tmpfile5
+
+ # Remove the ACL for other.
+ case $acl_flavor in
+ linux | solaris) ;; # impossible
+ freebsd) setfacl -x other::4 tmpfile0 ;;
+ *) setfacl -d other:4 tmpfile0 ;;
+ esac
+
+ func_test_copy tmpfile0 tmpfile6
+
+ # Remove the ACL for the group.
+ case $acl_flavor in
+ linux) setfacl -x group:$agid tmpfile0 ;;
+ freebsd) setfacl -x group:$agid:4 tmpfile0 ;;
+ *) setfacl -d group:$agid:4 tmpfile0 ;;
+ esac
+
+ func_test_copy tmpfile0 tmpfile7
+
+ # Delete all optional ACLs.
+ case $acl_flavor in
+ linux | freebsd)
+ setfacl -m user:$auid:1 tmpfile0
+ setfacl -b tmpfile0
+ ;;
+ *)
+ setfacl -s user::6,group::0,other:0 tmpfile0 ;;
+ esac
+
+ func_test_copy tmpfile0 tmpfile8
+
+ # Copy ACLs from a file that has no ACLs.
+ echo > tmpfile9
+ chmod a+x tmpfile9
+ case $acl_flavor in
+ linux) getfacl tmpfile9 | setfacl --set-file=- tmpfile0 ;;
+ freebsd) ;;
+ *) getfacl tmpfile9 | setfacl -f - tmpfile0 ;;
+ esac
+ rm -f tmpfile9
+
+ func_test_copy tmpfile0 tmpfile9
+
+ ;;
+
+ cygwin)
+
+ # Set an ACL for a group.
+ setfacl -m group:0:1 tmpfile0
+
+ func_test_copy tmpfile0 tmpfile2
+
+ # Set an ACL for other.
+ setfacl -m other:4 tmpfile0
+
+ func_test_copy tmpfile0 tmpfile4
+
+ # Remove the ACL for the group.
+ setfacl -d group:0 tmpfile0
+
+ func_test_copy tmpfile0 tmpfile5
+
+ # Remove the ACL for other.
+ setfacl -d other:4 tmpfile0
+
+ func_test_copy tmpfile0 tmpfile6
+
+ # Delete all optional ACLs.
+ setfacl -s user::6,group::0,other:0 tmpfile0
+
+ func_test_copy tmpfile0 tmpfile8
+
+ # Copy ACLs from a file that has no ACLs.
+ echo > tmpfile9
+ chmod a+x tmpfile9
+ getfacl tmpfile9 | setfacl -f - tmpfile0
+ rm -f tmpfile9
+
+ func_test_copy tmpfile0 tmpfile9
+
+ ;;
+
+ hpux)
+
+ # Set an ACL for a user.
+ orig=`lsacl tmpfile0 | sed -e 's/ tmpfile0$//'`
+ chacl -r "${orig}($auid.%,--x)" tmpfile0
+
+ func_test_copy tmpfile0 tmpfile2
+
+ # Set an ACL for a group.
+ orig=`lsacl tmpfile0 | sed -e 's/ tmpfile0$//'`
+ chacl -r "${orig}(%.$agid,r--)" tmpfile0
+
+ func_test_copy tmpfile0 tmpfile3
+
+ # Set an ACL for other.
+ orig=`lsacl tmpfile0 | sed -e 's/ tmpfile0$//'`
+ chacl -r "${orig}(%.%,r--)" tmpfile0
+
+ func_test_copy tmpfile0 tmpfile4
+
+ # Remove the ACL for the user.
+ chacl -d "($auid.%,--x)" tmpfile0
+
+ func_test_copy tmpfile0 tmpfile5
+
+ # Remove the ACL for the group.
+ chacl -d "(%.$agid,r--)" tmpfile0
+
+ func_test_copy tmpfile0 tmpfile6
+
+ # Delete all optional ACLs.
+ chacl -z tmpfile0
+
+ func_test_copy tmpfile0 tmpfile8
+
+ # Copy ACLs from a file that has no ACLs.
+ echo > tmpfile9
+ chmod a+x tmpfile9
+ orig=`lsacl tmpfile9 | sed -e 's/ tmpfile9$//'`
+ rm -f tmpfile9
+ chacl -r "${orig}" tmpfile0
+
+ func_test_copy tmpfile0 tmpfile9
+
+ ;;
+
+ hpuxjfs)
+
+ # Set an ACL for a user.
+ orig=`lsacl tmpfile0 | sed -e 's/ tmpfile0$//'`
+ chacl -r "${orig}($auid.%,--x)" tmpfile0 \
+ || setacl -m user:$auid:1 tmpfile0
+
+ func_test_copy tmpfile0 tmpfile2
+
+ # Set an ACL for a group.
+ orig=`lsacl tmpfile0 | sed -e 's/ tmpfile0$//'`
+ chacl -r "${orig}(%.$agid,r--)" tmpfile0 \
+ || setacl -m group:$agid:4 tmpfile0
+
+ func_test_copy tmpfile0 tmpfile3
+
+ # Set an ACL for other.
+ orig=`lsacl tmpfile0 | sed -e 's/ tmpfile0$//'`
+ chacl -r "${orig}(%.%,r--)" tmpfile0 \
+ || setacl -m other:4 tmpfile0
+
+ func_test_copy tmpfile0 tmpfile4
+
+ # Remove the ACL for the user.
+ chacl -d "($auid.%,--x)" tmpfile0 \
+ || setacl -d user:$auid tmpfile0
+
+ func_test_copy tmpfile0 tmpfile5
+
+ # Remove the ACL for the group.
+ chacl -d "(%.$agid,r--)" tmpfile0 \
+ || setacl -d group:$agid tmpfile0
+
+ func_test_copy tmpfile0 tmpfile6
+
+ # Delete all optional ACLs.
+ chacl -z tmpfile0 \
+ || { setacl -m user:$auid:1 tmpfile0
+ setacl -s user::6,group::0,class:7,other:0 tmpfile0
+ }
+
+ func_test_copy tmpfile0 tmpfile8
+
+ # Copy ACLs from a file that has no ACLs.
+ echo > tmpfile9
+ chmod a+x tmpfile9
+ orig=`lsacl tmpfile9 | sed -e 's/ tmpfile9$//'`
+ getacl tmpfile9 > tmpaclout0
+ rm -f tmpfile9
+ chacl -r "${orig}" tmpfile0 \
+ || setacl -f tmpaclout0 tmpfile0
+
+ func_test_copy tmpfile0 tmpfile9
+
+ ;;
+
+ osf1)
+
+ # Set an ACL for a user.
+ setacl -u user:$auid:1 tmpfile0
+
+ func_test_copy tmpfile0 tmpfile2
+
+ # Set an ACL for a group.
+ setacl -u group:$agid:4 tmpfile0
+
+ func_test_copy tmpfile0 tmpfile3
+
+ # Set an ACL for other.
+ setacl -u other::4 tmpfile0
+
+ func_test_copy tmpfile0 tmpfile4
+
+ # Remove the ACL for the user.
+ setacl -x user:$auid:1 tmpfile0
+
+ func_test_copy tmpfile0 tmpfile5
+
+ if false; then # would give an error "can't set ACL: Invalid argument"
+ # Remove the ACL for other.
+ setacl -x other::4 tmpfile0
+
+ func_test_copy tmpfile0 tmpfile6
+ fi
+
+ # Remove the ACL for the group.
+ setacl -x group:$agid:4 tmpfile0
+
+ func_test_copy tmpfile0 tmpfile7
+
+ # Delete all optional ACLs.
+ setacl -u user:$auid:1 tmpfile0
+ setacl -b tmpfile0
+
+ func_test_copy tmpfile0 tmpfile8
+
+ # Copy ACLs from a file that has no ACLs.
+ echo > tmpfile9
+ chmod a+x tmpfile9
+ getacl tmpfile9 > tmpaclout0
+ setacl -b -U tmpaclout0 tmpfile0
+ rm -f tmpfile9
+
+ func_test_copy tmpfile0 tmpfile9
+
+ ;;
+
+ nsk)
+
+ # Set an ACL for a user.
+ setacl -m user:$auid:1 tmpfile0
+
+ func_test_copy tmpfile0 tmpfile2
+
+ # Set an ACL for a group.
+ setacl -m group:$agid:4 tmpfile0
+
+ func_test_copy tmpfile0 tmpfile3
+
+ # Set an ACL for other.
+ setacl -m other:4 tmpfile0
+
+ func_test_copy tmpfile0 tmpfile4
+
+ # Remove the ACL for the user.
+ setacl -d user:$auid tmpfile0
+
+ func_test_copy tmpfile0 tmpfile5
+
+ # Remove the ACL for the group.
+ setacl -d group:$agid tmpfile0
+
+ func_test_copy tmpfile0 tmpfile6
+
+ # Delete all optional ACLs.
+ setacl -m user:$auid:1 tmpfile0
+ setacl -s user::6,group::0,class:7,other:0 tmpfile0
+
+ func_test_copy tmpfile0 tmpfile8
+
+ # Copy ACLs from a file that has no ACLs.
+ echo > tmpfile9
+ chmod a+x tmpfile9
+ getacl tmpfile9 > tmpaclout0
+ setacl -f tmpaclout0 tmpfile0
+ rm -f tmpfile9
+
+ func_test_copy tmpfile0 tmpfile9
+
+ ;;
+
+ aix)
+
+ # Set an ACL for a user.
+ { aclget tmpfile0 | sed -e 's/disabled$/enabled/'; echo " permit --x u:$auid"; } | aclput tmpfile0
+
+ func_test_copy tmpfile0 tmpfile2
+
+ # Set an ACL for a group.
+ { aclget tmpfile0 | sed -e 's/disabled$/enabled/'; echo " permit r-- g:$agid"; } | aclput tmpfile0
+
+ func_test_copy tmpfile0 tmpfile3
+
+ # Set an ACL for other.
+ chmod o+r tmpfile0
+
+ func_test_copy tmpfile0 tmpfile4
+
+ # Remove the ACL for the user.
+ aclget tmpfile0 | grep -v ' u:[^ ]*$' | aclput tmpfile0
+
+ func_test_copy tmpfile0 tmpfile5
+
+ # Remove the ACL for the group.
+ aclget tmpfile0 | grep -v ' g:[^ ]*$' | aclput tmpfile0
+
+ func_test_copy tmpfile0 tmpfile7
+
+ # Delete all optional ACLs.
+ aclget tmpfile0 | sed -e 's/enabled$/disabled/' | sed -e '/disabled$/q' | aclput tmpfile0
+
+ func_test_copy tmpfile0 tmpfile8
+
+ # Copy ACLs from a file that has no ACLs.
+ echo > tmpfile9
+ chmod a+x tmpfile9
+ aclget tmpfile9 | aclput tmpfile0
+ rm -f tmpfile9
+
+ func_test_copy tmpfile0 tmpfile9
+
+ ;;
+
+ macosx)
+
+ # Set an ACL for a user.
+ /bin/chmod +a "user:daemon allow execute" tmpfile0
+
+ func_test_copy tmpfile0 tmpfile2
+
+ # Set an ACL for a group.
+ /bin/chmod +a "group:daemon allow read" tmpfile0
+
+ func_test_copy tmpfile0 tmpfile3
+
+ # Set an ACL for other.
+ chmod o+r tmpfile0
+
+ func_test_copy tmpfile0 tmpfile4
+
+ # Remove the ACL for the user.
+ /bin/chmod -a "user:daemon allow execute" tmpfile0
+
+ func_test_copy tmpfile0 tmpfile5
+
+ # Remove the ACL for the group.
+ /bin/chmod -a "group:daemon allow read" tmpfile0
+
+ func_test_copy tmpfile0 tmpfile7
+
+ # Delete all optional ACLs.
+ /bin/chmod -N tmpfile0
+
+ func_test_copy tmpfile0 tmpfile8
+
+ # Copy ACLs from a file that has no ACLs.
+ echo > tmpfile9
+ chmod a+x tmpfile9
+ { /bin/ls -le tmpfile9 | sed -n -e 's/^ [0-9][0-9]*: //p'; echo; } | /bin/chmod -E tmpfile0
+ rm -f tmpfile9
+
+ func_test_copy tmpfile0 tmpfile9
+
+ ;;
+
+ irix)
+
+ # Set an ACL for a user.
+ /sbin/chacl user::rw-,group::---,other::---,user:$auid:--x tmpfile0
+
+ func_test_copy tmpfile0 tmpfile2
+
+ # Set an ACL for a group.
+ /sbin/chacl user::rw-,group::---,other::---,user:$auid:--x,group:$agid:r-- tmpfile0
+
+ func_test_copy tmpfile0 tmpfile3
+
+ # Set an ACL for other.
+ /sbin/chacl user::rw-,group::---,user:$auid:--x,group:$agid:r--,other::r-- tmpfile0
+
+ func_test_copy tmpfile0 tmpfile4
+
+ # Remove the ACL for the user.
+ /sbin/chacl user::rw-,group::---,group:$agid:r--,other::r-- tmpfile0
+
+ func_test_copy tmpfile0 tmpfile5
+
+ # Remove the ACL for the group.
+ /sbin/chacl user::rw-,group::---,other::r-- tmpfile0
+
+ func_test_copy tmpfile0 tmpfile7
+
+ ;;
+
+ esac
+ fi
+
+ rm -f tmpfile[0-9] tmpaclout[0-2]
+) || exit 1
+
+rm -rf "$tmp"
+exit 0
diff --git a/gnulib-tests/test-ctype.c b/gnulib-tests/test-ctype.c
new file mode 100644
index 0000000..570fbdb
--- /dev/null
+++ b/gnulib-tests/test-ctype.c
@@ -0,0 +1,27 @@
+/* Test of <ctype.h> substitute.
+ Copyright (C) 2009-2016 Free Software Foundation, Inc.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+/* Written by Eric Blake <ebb9@byu.net>, 2009. */
+
+#include <config.h>
+
+#include <ctype.h>
+
+int
+main (void)
+{
+ return 0;
+}
diff --git a/gnulib-tests/test-dirent.c b/gnulib-tests/test-dirent.c
new file mode 100644
index 0000000..50a0c95
--- /dev/null
+++ b/gnulib-tests/test-dirent.c
@@ -0,0 +1,32 @@
+/* Test of <dirent.h> substitute.
+ Copyright (C) 2009-2016 Free Software Foundation, Inc.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+/* Written by Eric Blake <ebb9@byu.net>, 2009. */
+
+#include <config.h>
+
+#include <dirent.h>
+
+/* Check for existence of required types. */
+static DIR *dir _GL_UNUSED;
+static struct dirent d;
+static ino_t i;
+
+int
+main (void)
+{
+ return d.d_name[0] + i;
+}
diff --git a/gnulib-tests/test-dup2.c b/gnulib-tests/test-dup2.c
new file mode 100644
index 0000000..5da6812
--- /dev/null
+++ b/gnulib-tests/test-dup2.c
@@ -0,0 +1,218 @@
+/* Test duplicating file descriptors.
+ Copyright (C) 2009-2016 Free Software Foundation, Inc.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+/* Written by Eric Blake <ebb9@byu.net>, 2009. */
+
+#include <config.h>
+
+#include <unistd.h>
+
+#include "signature.h"
+SIGNATURE_CHECK (dup2, int, (int, int));
+
+#include <errno.h>
+#include <fcntl.h>
+
+#if HAVE_SYS_RESOURCE_H
+# include <sys/resource.h>
+#endif
+
+#include "binary-io.h"
+
+#if GNULIB_TEST_CLOEXEC
+# include "cloexec.h"
+#endif
+
+#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. */
+# include "msvc-nothrow.h"
+#endif
+
+#include "macros.h"
+
+/* Return non-zero if FD is open. */
+static int
+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
+}
+
+#if GNULIB_TEST_CLOEXEC
+/* 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
+}
+#endif /* GNULIB_TEST_CLOEXEC */
+
+#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-dup2.tmp";
+ char buffer[1];
+ int bad_fd = getdtablesize ();
+ int fd = open (file, O_CREAT | O_TRUNC | O_RDWR, 0600);
+
+ /* Assume std descriptors were provided by invoker. */
+ ASSERT (STDERR_FILENO < fd);
+ ASSERT (is_open (fd));
+ /* Ignore any other fd's leaked into this process. */
+ close (fd + 1);
+ close (fd + 2);
+ ASSERT (!is_open (fd + 1));
+ ASSERT (!is_open (fd + 2));
+
+ /* Assigning to self must be a no-op. */
+ ASSERT (dup2 (fd, fd) == fd);
+ ASSERT (is_open (fd));
+
+ /* The source must be valid. */
+ errno = 0;
+ ASSERT (dup2 (-1, fd) == -1);
+ ASSERT (errno == EBADF);
+ close (99);
+ errno = 0;
+ ASSERT (dup2 (99, fd) == -1);
+ ASSERT (errno == EBADF);
+ errno = 0;
+ ASSERT (dup2 (AT_FDCWD, fd) == -1);
+ ASSERT (errno == EBADF);
+ ASSERT (is_open (fd));
+
+ /* If the source is not open, then the destination is unaffected. */
+ errno = 0;
+ ASSERT (dup2 (fd + 1, fd + 1) == -1);
+ ASSERT (errno == EBADF);
+ ASSERT (!is_open (fd + 1));
+ errno = 0;
+ ASSERT (dup2 (fd + 1, fd) == -1);
+ ASSERT (errno == EBADF);
+ ASSERT (is_open (fd));
+
+ /* The destination must be valid. */
+ errno = 0;
+ ASSERT (dup2 (fd, -2) == -1);
+ ASSERT (errno == EBADF);
+ if (bad_fd > 256)
+ {
+ ASSERT (dup2 (fd, 255) == 255);
+ ASSERT (dup2 (fd, 256) == 256);
+ ASSERT (close (255) == 0);
+ ASSERT (close (256) == 0);
+ }
+ ASSERT (dup2 (fd, bad_fd - 1) == bad_fd - 1);
+ ASSERT (close (bad_fd - 1) == 0);
+ errno = 0;
+ ASSERT (dup2 (fd, bad_fd) == -1);
+ ASSERT (errno == EBADF);
+
+ /* Using dup2 can skip fds. */
+ ASSERT (dup2 (fd, fd + 2) == fd + 2);
+ ASSERT (is_open (fd));
+ ASSERT (!is_open (fd + 1));
+ ASSERT (is_open (fd + 2));
+
+ /* Verify that dup2 closes the previous occupant of a fd. */
+ ASSERT (open ("/dev/null", O_WRONLY, 0600) == fd + 1);
+ ASSERT (dup2 (fd + 1, fd) == fd);
+ ASSERT (close (fd + 1) == 0);
+ ASSERT (write (fd, "1", 1) == 1);
+ ASSERT (dup2 (fd + 2, fd) == fd);
+ ASSERT (lseek (fd, 0, SEEK_END) == 0);
+ ASSERT (write (fd + 2, "2", 1) == 1);
+ ASSERT (lseek (fd, 0, SEEK_SET) == 0);
+ ASSERT (read (fd, buffer, 1) == 1);
+ ASSERT (*buffer == '2');
+
+#if GNULIB_TEST_CLOEXEC
+ /* Any new fd created by dup2 must not be cloexec. */
+ ASSERT (close (fd + 2) == 0);
+ ASSERT (dup_cloexec (fd) == fd + 1);
+ ASSERT (!is_inheritable (fd + 1));
+ ASSERT (dup2 (fd + 1, fd + 1) == fd + 1);
+ ASSERT (!is_inheritable (fd + 1));
+ ASSERT (dup2 (fd + 1, fd + 2) == fd + 2);
+ ASSERT (!is_inheritable (fd + 1));
+ ASSERT (is_inheritable (fd + 2));
+ errno = 0;
+ ASSERT (dup2 (fd + 1, -1) == -1);
+ ASSERT (errno == EBADF);
+ ASSERT (!is_inheritable (fd + 1));
+#endif
+
+ /* On systems that distinguish between text and binary mode, dup2
+ reuses the mode of the source. */
+ setmode (fd, O_BINARY);
+ ASSERT (is_mode (fd, O_BINARY));
+ ASSERT (dup2 (fd, fd + 1) == fd + 1);
+ ASSERT (is_mode (fd + 1, O_BINARY));
+ setmode (fd, O_TEXT);
+ ASSERT (is_mode (fd, O_TEXT));
+ ASSERT (dup2 (fd, fd + 1) == fd + 1);
+ ASSERT (is_mode (fd + 1, O_TEXT));
+
+ /* Clean up. */
+ ASSERT (close (fd + 2) == 0);
+ ASSERT (close (fd + 1) == 0);
+ ASSERT (close (fd) == 0);
+ ASSERT (unlink (file) == 0);
+
+ return 0;
+}
diff --git a/gnulib-tests/test-environ.c b/gnulib-tests/test-environ.c
new file mode 100644
index 0000000..0047246
--- /dev/null
+++ b/gnulib-tests/test-environ.c
@@ -0,0 +1,44 @@
+/* Test of environ variable.
+ Copyright (C) 2008-2016 Free Software Foundation, Inc.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+/* Written by Bruno Haible <bruno@clisp.org>, 2008. */
+
+#include <config.h>
+
+#include <unistd.h>
+
+#include <string.h>
+
+int
+main ()
+{
+ /* The environment variables that are set even in the weirdest situations
+ are HOME and PATH.
+ POSIX says that HOME is initialized by the system, and that PATH may be
+ unset. But in practice it's more frequent to see HOME unset and PATH
+ set. So we test the presence of PATH. */
+ char **remaining_variables = environ;
+ char *string;
+
+ for (; (string = *remaining_variables) != NULL; remaining_variables++)
+ {
+ if (strncmp (string, "PATH=", 5) == 0)
+ /* Found the PATH environment variable. */
+ return 0;
+ }
+ /* Failed to find the PATH environment variable. */
+ return 1;
+}
diff --git a/gnulib-tests/test-errno.c b/gnulib-tests/test-errno.c
new file mode 100644
index 0000000..1e0bb6d
--- /dev/null
+++ b/gnulib-tests/test-errno.c
@@ -0,0 +1,119 @@
+/* Test of <errno.h> substitute.
+ Copyright (C) 2008-2016 Free Software Foundation, Inc.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+/* Written by Bruno Haible <bruno@clisp.org>, 2008. */
+
+#include <config.h>
+
+#include <errno.h>
+
+/* Verify that the POSIX mandated errno values exist and can be used as
+ initializers outside of a function.
+ The variable names happen to match the Linux/x86 error numbers. */
+int e1 = EPERM;
+int e2 = ENOENT;
+int e3 = ESRCH;
+int e4 = EINTR;
+int e5 = EIO;
+int e6 = ENXIO;
+int e7 = E2BIG;
+int e8 = ENOEXEC;
+int e9 = EBADF;
+int e10 = ECHILD;
+int e11 = EAGAIN;
+int e11a = EWOULDBLOCK;
+int e12 = ENOMEM;
+int e13 = EACCES;
+int e14 = EFAULT;
+int e16 = EBUSY;
+int e17 = EEXIST;
+int e18 = EXDEV;
+int e19 = ENODEV;
+int e20 = ENOTDIR;
+int e21 = EISDIR;
+int e22 = EINVAL;
+int e23 = ENFILE;
+int e24 = EMFILE;
+int e25 = ENOTTY;
+int e26 = ETXTBSY;
+int e27 = EFBIG;
+int e28 = ENOSPC;
+int e29 = ESPIPE;
+int e30 = EROFS;
+int e31 = EMLINK;
+int e32 = EPIPE;
+int e33 = EDOM;
+int e34 = ERANGE;
+int e35 = EDEADLK;
+int e36 = ENAMETOOLONG;
+int e37 = ENOLCK;
+int e38 = ENOSYS;
+int e39 = ENOTEMPTY;
+int e40 = ELOOP;
+int e42 = ENOMSG;
+int e43 = EIDRM;
+int e67 = ENOLINK;
+int e71 = EPROTO;
+int e72 = EMULTIHOP;
+int e74 = EBADMSG;
+int e75 = EOVERFLOW;
+int e84 = EILSEQ;
+int e88 = ENOTSOCK;
+int e89 = EDESTADDRREQ;
+int e90 = EMSGSIZE;
+int e91 = EPROTOTYPE;
+int e92 = ENOPROTOOPT;
+int e93 = EPROTONOSUPPORT;
+int e95 = EOPNOTSUPP;
+int e95a = ENOTSUP;
+int e97 = EAFNOSUPPORT;
+int e98 = EADDRINUSE;
+int e99 = EADDRNOTAVAIL;
+int e100 = ENETDOWN;
+int e101 = ENETUNREACH;
+int e102 = ENETRESET;
+int e103 = ECONNABORTED;
+int e104 = ECONNRESET;
+int e105 = ENOBUFS;
+int e106 = EISCONN;
+int e107 = ENOTCONN;
+int e110 = ETIMEDOUT;
+int e111 = ECONNREFUSED;
+int e113 = EHOSTUNREACH;
+int e114 = EALREADY;
+int e115 = EINPROGRESS;
+int e116 = ESTALE;
+int e122 = EDQUOT;
+int e125 = ECANCELED;
+int e130 = EOWNERDEAD;
+int e131 = ENOTRECOVERABLE;
+
+/* Don't verify that these errno values are all different, except for possibly
+ EWOULDBLOCK == EAGAIN. Even Linux/x86 does not pass this check: it has
+ ENOTSUP == EOPNOTSUPP. */
+
+int
+main ()
+{
+ /* Verify that errno can be assigned. */
+ errno = EOVERFLOW;
+
+ /* snprintf() callers want to distinguish EINVAL and EOVERFLOW. */
+ if (errno == EINVAL)
+ return 1;
+
+ return 0;
+}
diff --git a/gnulib-tests/test-fcntl-h.c b/gnulib-tests/test-fcntl-h.c
new file mode 100644
index 0000000..aef1661
--- /dev/null
+++ b/gnulib-tests/test-fcntl-h.c
@@ -0,0 +1,130 @@
+/* Test of <fcntl.h> substitute.
+ Copyright (C) 2007, 2009-2016 Free Software Foundation, Inc.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+/* Written by Bruno Haible <bruno@clisp.org>, 2007. */
+
+#include <config.h>
+
+#include <fcntl.h>
+
+/* Check that the various O_* macros are defined. */
+int o = (O_DIRECT | O_DIRECTORY | O_DSYNC | O_IGNORE_CTTY | O_NDELAY | O_NOATIME
+ | O_NONBLOCK | O_NOCTTY | O_NOFOLLOW | O_NOLINK | O_NOLINKS | O_NOTRANS
+ | O_RSYNC | O_SYNC | O_TTY_INIT | O_BINARY | O_TEXT);
+
+/* Check that the various SEEK_* macros are defined. */
+int sk[] = { SEEK_CUR, SEEK_END, SEEK_SET };
+
+/* Check that the FD_* macros are defined. */
+int i = FD_CLOEXEC;
+
+/* Check that the types are all defined. */
+pid_t t1;
+off_t t2;
+mode_t t3;
+
+int
+main (void)
+{
+ /* Ensure no overlap in SEEK_*. */
+ switch (0)
+ {
+ case SEEK_CUR:
+ case SEEK_END:
+ case SEEK_SET:
+ ;
+ }
+
+ /* Ensure no dangerous overlap in non-zero gnulib-defined replacements. */
+ switch (O_RDONLY)
+ {
+ /* Access modes */
+ case O_RDONLY:
+ case O_WRONLY:
+ case O_RDWR:
+#if O_EXEC && O_EXEC != O_RDONLY
+ case O_EXEC:
+#endif
+#if O_SEARCH && O_EXEC != O_SEARCH && O_SEARCH != O_RDONLY
+ case O_SEARCH:
+#endif
+ i = ! (~O_ACCMODE & (O_RDONLY | O_WRONLY | O_RDWR | O_EXEC | O_SEARCH));
+ break;
+
+ /* Everyone should have these */
+ case O_CREAT:
+ case O_EXCL:
+ case O_TRUNC:
+ case O_APPEND:
+ break;
+
+ /* These might be 0 or O_RDONLY, only test non-zero versions. */
+#if O_CLOEXEC
+ case O_CLOEXEC:
+#endif
+#if O_DIRECT
+ case O_DIRECT:
+#endif
+#if O_DIRECTORY
+ case O_DIRECTORY:
+#endif
+#if O_DSYNC
+ case O_DSYNC:
+#endif
+#if O_IGNORE_CTTY
+ case O_IGNORE_CTTY:
+#endif
+#if O_NOATIME
+ case O_NOATIME:
+#endif
+#if O_NONBLOCK
+ case O_NONBLOCK:
+#endif
+#if O_NOCTTY
+ case O_NOCTTY:
+#endif
+#if O_NOFOLLOW
+ case O_NOFOLLOW:
+#endif
+#if O_NOLINK
+ case O_NOLINK:
+#endif
+#if O_NOLINKS
+ case O_NOLINKS:
+#endif
+#if O_NOTRANS
+ case O_NOTRANS:
+#endif
+#if O_RSYNC && O_RSYNC != O_DSYNC
+ case O_RSYNC:
+#endif
+#if O_SYNC && O_SYNC != O_DSYNC && O_SYNC != O_RSYNC
+ case O_SYNC:
+#endif
+#if O_TTY_INIT
+ case O_TTY_INIT:
+#endif
+#if O_BINARY
+ case O_BINARY:
+#endif
+#if O_TEXT
+ case O_TEXT:
+#endif
+ ;
+ }
+
+ return !i;
+}
diff --git a/gnulib-tests/test-fdopen.c b/gnulib-tests/test-fdopen.c
new file mode 100644
index 0000000..55b49a6
--- /dev/null
+++ b/gnulib-tests/test-fdopen.c
@@ -0,0 +1,49 @@
+/* Test opening a stream with a file descriptor.
+ Copyright (C) 2011-2016 Free Software Foundation, Inc.
+
+ This 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 <stdio.h>
+
+#include "signature.h"
+SIGNATURE_CHECK (fdopen, FILE *, (int, const char *));
+
+#include <errno.h>
+#include <unistd.h>
+
+#include "macros.h"
+
+int
+main (void)
+{
+ /* Test behavior on failure. POSIX makes it hard to check for
+ failure, since the behavior is not well-defined on invalid file
+ descriptors, so try fdopen 1000 times and if that's not enough to
+ fail due to EMFILE, so be it. */
+
+ int i;
+ for (i = 0; i < 1000; i++)
+ {
+ errno = 0;
+ if (! fdopen (STDOUT_FILENO, "w"))
+ {
+ ASSERT (errno != 0);
+ break;
+ }
+ }
+
+ return 0;
+}
diff --git a/gnulib-tests/test-fflush.c b/gnulib-tests/test-fflush.c
new file mode 100644
index 0000000..baf61bc
--- /dev/null
+++ b/gnulib-tests/test-fflush.c
@@ -0,0 +1,191 @@
+/* Test of POSIX compatible fflush() function.
+ Copyright (C) 2007, 2009-2016 Free Software Foundation, Inc.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+/* Written by Eric Blake, 2007. */
+
+#include <config.h>
+
+/* None of the files accessed by this test are large, so disable the
+ ftell link warning if we are not using the gnulib ftell module. */
+#define _GL_NO_LARGE_FILES
+#include <stdio.h>
+
+#include "signature.h"
+SIGNATURE_CHECK (fflush, int, (FILE *));
+
+#include <errno.h>
+#include <unistd.h>
+
+#include "macros.h"
+
+int
+main (void)
+{
+ FILE *f;
+ char buffer[10];
+ int fd;
+
+ /* Create test file. */
+ f = fopen ("test-fflush.txt", "w");
+ if (!f || fwrite ("1234567890ABCDEFG", 1, 17, f) != 17 || fclose (f) != 0)
+ {
+ fputs ("Failed to create sample file.\n", stderr);
+ unlink ("test-fflush.txt");
+ return 1;
+ }
+
+ /* Test fflush. */
+ f = fopen ("test-fflush.txt", "r");
+ ASSERT (f != NULL);
+ fd = fileno (f);
+ if (!f || 0 > fd || fread (buffer, 1, 5, f) != 5)
+ {
+ fputs ("Failed initial read of sample file.\n", stderr);
+ if (f)
+ fclose (f);
+ unlink ("test-fflush.txt");
+ return 1;
+ }
+ /* For deterministic results, ensure f read a bigger buffer.
+ This is not the case on BeOS, nor on uClibc. */
+#if !(defined __BEOS__ || defined __UCLIBC__)
+ if (lseek (fd, 0, SEEK_CUR) == 5)
+ {
+ fputs ("Sample file was not buffered after fread.\n", stderr);
+ fclose (f);
+ unlink ("test-fflush.txt");
+ return 1;
+ }
+#endif
+ /* POSIX requires fflush-fseek to set file offset of fd. */
+ if (fflush (f) != 0 || fseeko (f, 0, SEEK_CUR) != 0)
+ {
+ fputs ("Failed to flush-fseek sample file.\n", stderr);
+ fclose (f);
+ unlink ("test-fflush.txt");
+ return 1;
+ }
+ /* Check that offset is correct. */
+ if (lseek (fd, 0, SEEK_CUR) != 5)
+ {
+ fprintf (stderr, "File offset is wrong after fseek: %ld.\n",
+ (long) lseek (fd, 0, SEEK_CUR));
+ fclose (f);
+ unlink ("test-fflush.txt");
+ return 1;
+ }
+ if (ftell (f) != 5)
+ {
+ fprintf (stderr, "ftell result is wrong after fseek: %ld.\n",
+ (long) ftell (f));
+ fclose (f);
+ unlink ("test-fflush.txt");
+ return 1;
+ }
+ /* Check that file reading resumes at correct location. */
+ if (fgetc (f) != '6')
+ {
+ fputs ("Failed to read next byte after fseek.\n", stderr);
+ fclose (f);
+ unlink ("test-fflush.txt");
+ return 1;
+ }
+ /* For deterministic results, ensure f read a bigger buffer. */
+ if (lseek (fd, 0, SEEK_CUR) == 6)
+ {
+ fputs ("Sample file was not buffered after fgetc.\n", stderr);
+ fclose (f);
+ unlink ("test-fflush.txt");
+ return 1;
+ }
+ /* POSIX requires fflush-fseeko to set file offset of fd. */
+ if (fflush (f) != 0 || fseeko (f, 0, SEEK_CUR) != 0)
+ {
+ fputs ("Failed to flush-fseeko sample file.\n", stderr);
+ fclose (f);
+ unlink ("test-fflush.txt");
+ return 1;
+ }
+ /* Check that offset is correct. */
+ if (lseek (fd, 0, SEEK_CUR) != 6)
+ {
+ fprintf (stderr, "File offset is wrong after fseeko: %ld.\n",
+ (long) lseek (fd, 0, SEEK_CUR));
+ fclose (f);
+ unlink ("test-fflush.txt");
+ return 1;
+ }
+ if (ftell (f) != 6)
+ {
+ fprintf (stderr, "ftell result is wrong after fseeko: %ld.\n",
+ (long) ftell (f));
+ fclose (f);
+ unlink ("test-fflush.txt");
+ return 1;
+ }
+ /* Check that file reading resumes at correct location. */
+ if (fgetc (f) != '7')
+ {
+ fputs ("Failed to read next byte after fseeko.\n", stderr);
+ fclose (f);
+ unlink ("test-fflush.txt");
+ return 1;
+ }
+ fclose (f);
+
+ /* Test that fflush() sets errno if someone else closes the stream
+ fd behind the back of stdio. */
+ {
+ FILE *fp = fopen ("test-fflush.txt", "w");
+ ASSERT (fp != NULL);
+ fputc ('x', fp);
+ ASSERT (close (fileno (fp)) == 0);
+ errno = 0;
+ ASSERT (fflush (fp) == EOF);
+ ASSERT (errno == EBADF);
+ fclose (fp);
+ }
+
+ /* Test that fflush() sets errno if the stream was constructed with
+ an invalid file descriptor. */
+ {
+ FILE *fp = fdopen (-1, "w");
+ if (fp != NULL)
+ {
+ fputc ('x', fp);
+ errno = 0;
+ ASSERT (fflush (fp) == EOF);
+ ASSERT (errno == EBADF);
+ }
+ }
+ {
+ FILE *fp;
+ close (99);
+ fp = fdopen (99, "w");
+ if (fp != NULL)
+ {
+ fputc ('x', fp);
+ errno = 0;
+ ASSERT (fflush (fp) == EOF);
+ ASSERT (errno == EBADF);
+ }
+ }
+
+ /* Clean up. */
+ unlink ("test-fflush.txt");
+
+ return 0;
+}
diff --git a/gnulib-tests/test-fflush2.c b/gnulib-tests/test-fflush2.c
new file mode 100644
index 0000000..f1248f8
--- /dev/null
+++ b/gnulib-tests/test-fflush2.c
@@ -0,0 +1,108 @@
+/* Test of POSIX compatible fflush() function.
+ Copyright (C) 2008-2016 Free Software Foundation, Inc.
+
+ This 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 <stdio.h>
+
+#include "binary-io.h"
+#include "macros.h"
+
+int
+main (int argc, char **argv)
+{
+ int c;
+
+ /* Avoid the well-known bugs of fflush() on streams in O_TEXT mode
+ on native Windows platforms. */
+ SET_BINARY (0);
+
+ if (argc > 1)
+ switch (argv[1][0])
+ {
+ 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>,
+ according to the Austin Group's resolution on 2009-01-08. */
+
+ c = fgetc (stdin);
+ ASSERT (c == '#');
+
+ c = fgetc (stdin);
+ ASSERT (c == '!');
+
+ /* Here the file-position indicator must be 2. */
+
+ c = ungetc ('!', stdin);
+ ASSERT (c == '!');
+
+ fflush (stdin);
+
+ /* Here the file-position indicator must be 1. */
+
+ c = fgetc (stdin);
+ ASSERT (c == '!');
+
+ c = fgetc (stdin);
+ ASSERT (c == '/');
+
+ return 0;
+
+ 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>,
+ 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
+ <http://www.opengroup.org/susv3/functions/ungetc.html>:
+ "The value of the file-position indicator for the stream after
+ reading or discarding all pushed-back bytes shall be the same
+ as it was before the bytes were pushed back."
+ <http://www.opengroup.org/austin/aardvark/latest/xshbug3.txt>
+ "[After fflush(),] the file offset of the underlying open file
+ description shall be set to the file position of the stream, and
+ any characters pushed back onto the stream by ungetc() or
+ ungetwc() that have not subsequently been read from the stream
+ shall be discarded." */
+
+ c = fgetc (stdin);
+ ASSERT (c == '#');
+
+ c = fgetc (stdin);
+ ASSERT (c == '!');
+
+ /* Here the file-position indicator must be 2. */
+
+ c = ungetc ('@', stdin);
+ ASSERT (c == '@');
+
+ fflush (stdin);
+
+ /* Here the file-position indicator must be 1. */
+
+ c = fgetc (stdin);
+ ASSERT (c == '!');
+
+ c = fgetc (stdin);
+ ASSERT (c == '/');
+
+ return 0;
+ }
+
+ return 1;
+}
diff --git a/gnulib-tests/test-fflush2.sh b/gnulib-tests/test-fflush2.sh
new file mode 100755
index 0000000..ef77fa4
--- /dev/null
+++ b/gnulib-tests/test-fflush2.sh
@@ -0,0 +1,9 @@
+#!/bin/sh
+
+# Execute the test only with seekable input stream.
+# The behaviour of fflush() on a non-seekable input stream is undefined.
+./test-fflush2${EXEEXT} 1 < "$srcdir/test-fflush2.sh" || exit $?
+./test-fflush2${EXEEXT} 2 < "$srcdir/test-fflush2.sh" || exit $?
+#cat "$srcdir/test-fflush2.sh" | ./test-fflush2${EXEEXT} || exit $?
+
+exit 0
diff --git a/gnulib-tests/test-fgetc.c b/gnulib-tests/test-fgetc.c
new file mode 100644
index 0000000..c62e70c
--- /dev/null
+++ b/gnulib-tests/test-fgetc.c
@@ -0,0 +1,97 @@
+/* Test of fgetc() function.
+ Copyright (C) 2011-2016 Free Software Foundation, Inc.
+
+ This 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 <http://www.gnu.org/licenses/>. */
+
+#include <config.h>
+
+#include <stdio.h>
+
+#include "signature.h"
+SIGNATURE_CHECK (fgetc, int, (FILE *));
+
+#include <errno.h>
+#include <fcntl.h>
+#include <unistd.h>
+
+#include "msvc-inval.h"
+
+#include "macros.h"
+
+int
+main (int argc, char **argv)
+{
+ const char *filename = "test-fgetc.txt";
+
+ /* We don't have an fgetc() function that installs an invalid parameter
+ handler so far. So install that handler here, explicitly. */
+#if HAVE_MSVC_INVALID_PARAMETER_HANDLER \
+ && MSVC_INVALID_PARAMETER_HANDLING == DEFAULT_HANDLING
+ gl_msvc_inval_ensure_handler ();
+#endif
+
+ /* Prepare a file. */
+ {
+ const char text[] = "hello world";
+ int fd = open (filename, O_RDWR | O_CREAT | O_TRUNC, 0600);
+ ASSERT (fd >= 0);
+ ASSERT (write (fd, text, sizeof (text)) == sizeof (text));
+ ASSERT (close (fd) == 0);
+ }
+
+ /* Test that fgetc() sets errno if someone else closes the stream
+ fd behind the back of stdio. */
+ {
+ FILE *fp = fopen (filename, "r");
+ ASSERT (fp != NULL);
+ ASSERT (close (fileno (fp)) == 0);
+ errno = 0;
+ ASSERT (fgetc (fp) == EOF);
+ ASSERT (errno == EBADF);
+ ASSERT (ferror (fp));
+ fclose (fp);
+ }
+
+ /* Test that fgetc() sets errno if the stream was constructed with
+ an invalid file descriptor. */
+ {
+ FILE *fp = fdopen (-1, "r");
+ if (fp != NULL)
+ {
+ errno = 0;
+ ASSERT (fgetc (fp) == EOF);
+ ASSERT (errno == EBADF);
+ ASSERT (ferror (fp));
+ fclose (fp);
+ }
+ }
+ {
+ FILE *fp;
+ close (99);
+ fp = fdopen (99, "r");
+ if (fp != NULL)
+ {
+ errno = 0;
+ ASSERT (fgetc (fp) == EOF);
+ ASSERT (errno == EBADF);
+ ASSERT (ferror (fp));
+ fclose (fp);
+ }
+ }
+
+ /* Clean up. */
+ unlink (filename);
+
+ return 0;
+}
diff --git a/gnulib-tests/test-file-has-acl-1.sh b/gnulib-tests/test-file-has-acl-1.sh
new file mode 100755
index 0000000..e3ad9c0
--- /dev/null
+++ b/gnulib-tests/test-file-has-acl-1.sh
@@ -0,0 +1,13 @@
+#!/bin/sh
+
+# Test file-has-acl on the file system of /var/tmp, which usually is a local
+# file system.
+
+if test -d /var/tmp; then
+ TMPDIR=/var/tmp
+else
+ TMPDIR=/tmp
+fi
+export TMPDIR
+
+exec "${srcdir}/test-file-has-acl.sh"
diff --git a/gnulib-tests/test-file-has-acl-2.sh b/gnulib-tests/test-file-has-acl-2.sh
new file mode 100755
index 0000000..6b92b1d
--- /dev/null
+++ b/gnulib-tests/test-file-has-acl-2.sh
@@ -0,0 +1,9 @@
+#!/bin/sh
+
+# Test file-has-acl on the file system of the build directory, which may be
+# a local file system or NFS mounted.
+
+TMPDIR=`pwd`
+export TMPDIR
+
+exec "${srcdir}/test-file-has-acl.sh"
diff --git a/gnulib-tests/test-file-has-acl.c b/gnulib-tests/test-file-has-acl.c
new file mode 100644
index 0000000..8a446a6
--- /dev/null
+++ b/gnulib-tests/test-file-has-acl.c
@@ -0,0 +1,74 @@
+/* Test for presence of ACL.
+ Copyright (C) 2008-2016 Free Software Foundation, Inc.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+/* Written by Bruno Haible <bruno@clisp.org>, 2008. */
+
+#include <config.h>
+
+#include "acl.h"
+
+#include <signal.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <unistd.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+
+#include "macros.h"
+
+int
+main (int argc, char *argv[])
+{
+ const char *file;
+ struct stat statbuf;
+
+ ASSERT (argc == 2);
+
+ file = argv[1];
+
+ if (stat (file, &statbuf) < 0)
+ {
+ fprintf (stderr, "could not access file \"%s\"\n", file);
+ exit (EXIT_FAILURE);
+ }
+
+ /* Check against possible infinite loop in file_has_acl. */
+#if HAVE_DECL_ALARM
+ /* Declare failure if test takes too long, by using default abort
+ caused by SIGALRM. */
+ {
+ int alarm_value = 5;
+ signal (SIGALRM, SIG_DFL);
+ alarm (alarm_value);
+ }
+#endif
+
+#if USE_ACL
+ {
+ int ret = file_has_acl (file, &statbuf);
+ if (ret < 0)
+ {
+ fprintf (stderr, "could not access the ACL of file \"%s\"\n", file);
+ exit (EXIT_FAILURE);
+ }
+ printf ("%s\n", ret ? "yes" : "no");
+ }
+#else
+ printf ("no\n");
+#endif
+
+ return 0;
+}
diff --git a/gnulib-tests/test-file-has-acl.sh b/gnulib-tests/test-file-has-acl.sh
new file mode 100755
index 0000000..26610c1
--- /dev/null
+++ b/gnulib-tests/test-file-has-acl.sh
@@ -0,0 +1,384 @@
+#!/bin/sh
+
+# Show all commands when run with environment variable VERBOSE=yes.
+test -z "$VERBOSE" || set -x
+
+test "$USE_ACL" = 0 &&
+ {
+ echo "Skipping test: insufficient ACL support"
+ exit 77
+ }
+
+# func_tmpdir
+# creates a temporary directory.
+# Sets variable
+# - tmp pathname of freshly created temporary directory
+func_tmpdir ()
+{
+ # Use the environment variable TMPDIR, falling back to /tmp. This allows
+ # users to specify a different temporary directory, for example, if their
+ # /tmp is filled up or too small.
+ : ${TMPDIR=/tmp}
+ {
+ # Use the mktemp program if available. If not available, hide the error
+ # message.
+ tmp=`(umask 077 && mktemp -d "$TMPDIR/glXXXXXX") 2>/dev/null` &&
+ test -n "$tmp" && test -d "$tmp"
+ } ||
+ {
+ # Use a simple mkdir command. It is guaranteed to fail if the directory
+ # already exists. $RANDOM is bash specific and expands to empty in shells
+ # other than bash, ksh and zsh. Its use does not increase security;
+ # rather, it minimizes the probability of failure in a very cluttered /tmp
+ # directory.
+ tmp=$TMPDIR/gl$$-$RANDOM
+ (umask 077 && mkdir "$tmp")
+ } ||
+ {
+ echo "$0: cannot create a temporary directory in $TMPDIR" >&2
+ exit 1
+ }
+}
+
+func_tmpdir
+builddir=`pwd`
+cd "$builddir" ||
+ {
+ echo "$0: cannot determine build directory (unreadable parent dir?)" >&2
+ exit 1
+ }
+# Switch to a temporary directory, to increase the likelihood that ACLs are
+# supported on the current file system. (/tmp is usually locally mounted,
+# whereas the build dir is sometimes NFS-mounted.)
+( cd "$tmp"
+
+ # Prepare tmpfile0.
+ rm -f tmpfile[0-9] tmp.err
+ echo "Simple contents" > tmpfile0
+ chmod 600 tmpfile0
+
+ # Classification of the platform according to the programs available for
+ # manipulating ACLs.
+ # Possible values are:
+ # linux, cygwin, freebsd, solaris, hpux, hpuxjfs, osf1, aix, macosx, irix, none.
+ # TODO: Support also native Windows platforms (mingw).
+ acl_flavor=none
+ if (getfacl tmpfile0 >/dev/null) 2>/dev/null; then
+ # Platforms with the getfacl and setfacl programs.
+ # Linux, FreeBSD, Solaris, Cygwin.
+ if (setfacl --help >/dev/null) 2>/dev/null; then
+ # Linux, Cygwin.
+ if (LC_ALL=C setfacl --help | grep ' --set-file' >/dev/null) 2>/dev/null; then
+ # Linux.
+ acl_flavor=linux
+ else
+ acl_flavor=cygwin
+ fi
+ else
+ # FreeBSD, Solaris.
+ if (LC_ALL=C setfacl 2>&1 | grep '\-x entries' >/dev/null) 2>/dev/null; then
+ # FreeBSD.
+ acl_flavor=freebsd
+ else
+ # Solaris.
+ acl_flavor=solaris
+ fi
+ fi
+ else
+ if (lsacl / >/dev/null) 2>/dev/null; then
+ # Platforms with the lsacl and chacl programs.
+ # HP-UX, sometimes also IRIX.
+ if (getacl tmpfile0 >/dev/null) 2>/dev/null; then
+ # HP-UX 11.11 or newer.
+ acl_flavor=hpuxjfs
+ else
+ # HP-UX 11.00.
+ acl_flavor=hpux
+ fi
+ else
+ if (getacl tmpfile0 >/dev/null) 2>/dev/null; then
+ # Tru64, NonStop Kernel.
+ if (getacl -m tmpfile0 >/dev/null) 2>/dev/null; then
+ # Tru64.
+ acl_flavor=osf1
+ else
+ # NonStop Kernel.
+ acl_flavor=nsk
+ fi
+ else
+ if (aclget tmpfile0 >/dev/null) 2>/dev/null; then
+ # AIX.
+ acl_flavor=aix
+ else
+ if (fsaclctl -v >/dev/null) 2>/dev/null; then
+ # Mac OS X.
+ acl_flavor=macosx
+ else
+ if test -f /sbin/chacl; then
+ # IRIX.
+ acl_flavor=irix
+ fi
+ fi
+ fi
+ fi
+ fi
+ fi
+
+ # func_test_file_has_acl file expected
+ # tests the result of the file_has_acl function on file, and checks that it
+ # matches the expected value.
+ func_test_file_has_acl ()
+ {
+ res=`"$builddir"/test-file-has-acl${EXEEXT} "$1"`
+ test "$res" = "$2" || {
+ echo "file_has_acl(\"$1\") returned $res, expected $2" 1>&2
+ exit 1
+ }
+ }
+
+ # func_test_has_acl file expected
+ # tests the result of the file_has_acl function on file, and checks that it
+ # matches the expected value, also taking into account the system's 'ls'
+ # program.
+ case $acl_flavor in
+ freebsd | solaris | hpux | macosx)
+ case $acl_flavor in
+ freebsd | solaris | hpux) acl_ls_option="-ld" ;;
+ macosx) acl_ls_option="-lde" ;;
+ esac
+ func_test_has_acl ()
+ {
+ func_test_file_has_acl "$1" "$2"
+ case `/bin/ls $acl_ls_option "$1" | sed 1q` in
+ ??????????+*)
+ test "$2" = yes || {
+ echo "/bin/ls $acl_ls_option $1 shows an ACL, but expected $2" 1>&2
+ exit 1
+ }
+ ;;
+ ??????????" "*)
+ test "$2" = no || {
+ echo "/bin/ls $acl_ls_option $1 shows no ACL, but expected $2" 1>&2
+ exit 1
+ }
+ ;;
+ esac
+ }
+ ;;
+ irix)
+ func_test_has_acl ()
+ {
+ func_test_file_has_acl "$1" "$2"
+ case `/bin/ls -ldD "$1" | sed 1q` in
+ *" []")
+ test "$2" = no || {
+ echo "/bin/ls -ldD $1 shows no ACL, but expected $2" 1>&2
+ exit 1
+ }
+ ;;
+ *)
+ test "$2" = yes || {
+ echo "/bin/ls -ldD $1 shows an ACL, but expected $2" 1>&2
+ exit 1
+ }
+ ;;
+ esac
+ }
+ ;;
+ *)
+ func_test_has_acl ()
+ {
+ func_test_file_has_acl "$1" "$2"
+ }
+ ;;
+ esac
+
+ func_test_has_acl tmpfile0 no
+
+ mkdir tmpdir0
+ func_test_has_acl tmpdir0 no
+
+ if test $acl_flavor != none; then
+ # A POSIX compliant 'id' program.
+ if test -f /usr/xpg4/bin/id; then
+ ID=/usr/xpg4/bin/id
+ else
+ ID=id
+ fi
+ # Use a user and group id different from the current one, to avoid
+ # redundant/ambiguous ACLs.
+ myuid=`$ID -u`
+ mygid=`$ID -g`
+ auid=1
+ if test "$auid" = "$myuid"; then auid=2; fi
+ agid=1
+ if test "$agid" = "$mygid"; then agid=2; fi
+
+ case $acl_flavor in
+ linux | freebsd | solaris)
+
+ # Set an ACL for a user.
+ if setfacl -m user:$auid:1 tmpfile0; then
+
+ func_test_has_acl tmpfile0 yes
+
+ # Remove the ACL for the user.
+ case $acl_flavor in
+ linux) setfacl -x user:$auid tmpfile0 ;;
+ freebsd) setfacl -x user:$auid:1 tmpfile0 ;;
+ *) setfacl -d user:$auid:1 tmpfile0 ;;
+ esac
+
+ # On Linux and FreeBSD, the ACL for the mask is implicitly added.
+ # On Solaris, it is always there.
+ case $acl_flavor in
+ linux | freebsd) func_test_has_acl tmpfile0 yes ;;
+ *) func_test_has_acl tmpfile0 no ;;
+ esac
+
+ # Remove the ACL for the mask, if it was implicitly added.
+ case $acl_flavor in
+ linux | freebsd) setfacl -x mask: tmpfile0 ;;
+ *) setfacl -d mask: tmpfile0 ;;
+ esac
+
+ func_test_has_acl tmpfile0 no
+
+ fi
+ ;;
+
+ cygwin)
+
+ # Set an ACL for a group.
+ if setfacl -m group:0:1 tmpfile0; then
+
+ func_test_has_acl tmpfile0 yes
+
+ # Remove the ACL for the group.
+ setfacl -d group:0 tmpfile0
+
+ func_test_has_acl tmpfile0 no
+
+ fi
+ ;;
+
+ hpux | hpuxjfs)
+
+ # Set an ACL for a user.
+ orig=`lsacl tmpfile0 | sed -e 's/ tmpfile0$//'`
+ if chacl -r "${orig}($auid.%,--x)" tmpfile0; then
+
+ func_test_has_acl tmpfile0 yes
+
+ # Remove the ACL for the user.
+ chacl -d "($auid.%,--x)" tmpfile0
+
+ func_test_has_acl tmpfile0 no
+
+ else
+ if test $acl_flavor = hpuxjfs; then
+
+ # Set an ACL for a user.
+ setacl -m user:$auid:1 tmpfile0
+
+ func_test_has_acl tmpfile0 yes
+
+ # Remove the ACL for the user.
+ setacl -d user:$auid tmpfile0
+
+ func_test_has_acl tmpfile0 no
+
+ fi
+ fi
+ ;;
+
+ osf1)
+
+ # Set an ACL for a user.
+ setacl -u user:$auid:1 tmpfile0 2> tmp.err
+ cat tmp.err 1>&2
+ if grep 'Error:' tmp.err > /dev/null \
+ || grep 'Operation not supported' tmp.err > /dev/null; then
+ :
+ else
+
+ func_test_has_acl tmpfile0 yes
+
+ # Remove the ACL for the user.
+ setacl -x user:$auid:1 tmpfile0
+
+ func_test_has_acl tmpfile0 no
+
+ fi
+ ;;
+
+ nsk)
+
+ # Set an ACL for a user.
+ setacl -m user:$auid:1 tmpfile0
+
+ func_test_has_acl tmpfile0 yes
+
+ # Remove the ACL for the user.
+ setacl -d user:$auid tmpfile0
+
+ func_test_has_acl tmpfile0 no
+
+ ;;
+
+ aix)
+
+ # Set an ACL for a user.
+ { aclget tmpfile0 | sed -e 's/disabled$/enabled/'; echo " permit --x u:$auid"; } | aclput tmpfile0
+ if aclget tmpfile0 | grep enabled > /dev/null; then
+
+ func_test_has_acl tmpfile0 yes
+
+ # Remove the ACL for the user.
+ aclget tmpfile0 | grep -v ' u:[^ ]*$' | aclput tmpfile0
+
+ func_test_has_acl tmpfile0 no
+
+ fi
+ ;;
+
+ macosx)
+
+ # Set an ACL for a user.
+ /bin/chmod +a "user:daemon allow execute" tmpfile0
+
+ func_test_has_acl tmpfile0 yes
+
+ # Remove the ACL for the user.
+ /bin/chmod -a "user:daemon allow execute" tmpfile0
+
+ func_test_has_acl tmpfile0 no
+
+ ;;
+
+ irix)
+
+ # Set an ACL for a user.
+ /sbin/chacl user::rw-,group::---,other::---,user:$auid:--x tmpfile0 2> tmp.err
+ cat tmp.err 1>&2
+ if test -s tmp.err; then :; else
+
+ func_test_has_acl tmpfile0 yes
+
+ # Remove the ACL for the user.
+ /sbin/chacl user::rw-,group::---,other::--- tmpfile0
+
+ func_test_has_acl tmpfile0 no
+
+ fi
+ ;;
+
+ esac
+ fi
+
+ rm -f tmpfile[0-9] tmp.err
+ rm -rf tmpdir0
+) || exit 1
+
+rm -rf "$tmp"
+exit 0
diff --git a/gnulib-tests/test-fpending.c b/gnulib-tests/test-fpending.c
new file mode 100644
index 0000000..2d7749d
--- /dev/null
+++ b/gnulib-tests/test-fpending.c
@@ -0,0 +1,41 @@
+/* Ensure that __fpending works.
+
+ Copyright (C) 2004, 2007-2016 Free Software Foundation, Inc.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+ Written by Jim Meyering. */
+
+#include <config.h>
+
+#include "fpending.h"
+
+#include <stdio.h>
+#include <stdlib.h>
+
+#include "macros.h"
+
+int
+main (void)
+{
+ ASSERT (__fpending (stdout) == 0);
+
+ fputs ("foo", stdout);
+ ASSERT (__fpending (stdout) == 3);
+
+ fflush (stdout);
+ ASSERT (__fpending (stdout) == 0);
+
+ exit (0);
+}
diff --git a/gnulib-tests/test-fpending.sh b/gnulib-tests/test-fpending.sh
new file mode 100755
index 0000000..636af25
--- /dev/null
+++ b/gnulib-tests/test-fpending.sh
@@ -0,0 +1,12 @@
+#!/bin/sh
+
+tmpfile=
+trap 'rm -fr $tmpfile' 1 2 3 15
+
+tmpfile=test-fpending.t
+
+./test-fpending${EXEEXT} > $tmpfile || exit 1
+
+rm -fr $tmpfile
+
+exit 0
diff --git a/gnulib-tests/test-fpurge.c b/gnulib-tests/test-fpurge.c
new file mode 100644
index 0000000..32f3a98
--- /dev/null
+++ b/gnulib-tests/test-fpurge.c
@@ -0,0 +1,134 @@
+/* Test of fpurge() function.
+ Copyright (C) 2007-2016 Free Software Foundation, Inc.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+/* Written by Bruno Haible <bruno@clisp.org>, 2007. */
+
+#include <config.h>
+
+/* None of the files accessed by this test are large, so disable the
+ fseek link warning if we are not using the gnulib fseek module. */
+#define _GL_NO_LARGE_FILES
+#include <stdio.h>
+
+#include <string.h>
+
+#include "macros.h"
+
+#define TESTFILE "t-fpurge.tmp"
+
+int
+main (void)
+{
+ int check_filepos;
+
+ for (check_filepos = 0; check_filepos <= 1; check_filepos++)
+ {
+ FILE *fp;
+
+ /* Create a file with some contents. */
+ fp = fopen (TESTFILE, "w");
+ if (fp == NULL)
+ goto skip;
+ if (fwrite ("foobarsh", 1, 8, fp) < 8)
+ goto skip;
+ if (fclose (fp))
+ goto skip;
+
+ /* The file's contents is now "foobarsh". */
+
+ /* Open it in read-write mode. */
+ fp = fopen (TESTFILE, "r+");
+ if (fp == NULL)
+ goto skip;
+ if (fseek (fp, 3, SEEK_CUR))
+ goto skip;
+ if (fwrite ("g", 1, 1, fp) < 1)
+ goto skip;
+ if (fflush (fp))
+ goto skip;
+ if (fwrite ("bz", 1, 2, fp) < 2)
+ goto skip;
+ /* Discard pending write. */
+ ASSERT (fpurge (fp) == 0);
+ /* Verify that when discarding pending output, the file position is set
+ back to where it was before the write calls. */
+ if (check_filepos)
+ ASSERT (ftell (fp) == 4);
+ ASSERT (fclose (fp) == 0);
+
+ /* Open it in read-only mode. */
+ fp = fopen (TESTFILE, "r");
+ if (fp == NULL)
+ goto skip;
+ /* Verify that the pending writes before the fpurge were really
+ discarded. */
+ {
+ char buf[8];
+ if (fread (buf, 1, 7, fp) < 7)
+ goto skip;
+ ASSERT (memcmp (buf, "foogars", 7) == 0);
+ }
+ /* Discard the buffered 'h'. */
+ if (check_filepos)
+ ASSERT (ftell (fp) == 7);
+ ASSERT (fpurge (fp) == 0);
+ /* Verify that when discarding pending input, the file position is
+ advanced to match the end of the previously read input. */
+ if (check_filepos)
+ ASSERT (ftell (fp) == 8);
+ ASSERT (getc (fp) == EOF);
+ ASSERT (fclose (fp) == 0);
+
+ /* The file's contents is now "foogarsh". */
+
+ /* Ensure that purging a read does not corrupt subsequent writes. */
+ fp = fopen (TESTFILE, "r+");
+ if (fp == NULL)
+ goto skip;
+ if (fseek (fp, -1, SEEK_END))
+ goto skip;
+ ASSERT (getc (fp) == 'h');
+ ASSERT (getc (fp) == EOF);
+ if (check_filepos)
+ ASSERT (ftell (fp) == 8);
+ ASSERT (fpurge (fp) == 0);
+ if (check_filepos)
+ ASSERT (ftell (fp) == 8);
+ ASSERT (putc ('!', fp) == '!');
+ if (check_filepos)
+ ASSERT (ftell (fp) == 9);
+ ASSERT (fclose (fp) == 0);
+ fp = fopen (TESTFILE, "r");
+ if (fp == NULL)
+ goto skip;
+ {
+ char buf[10];
+ ASSERT (fread (buf, 1, 10, fp) == 9);
+ ASSERT (memcmp (buf, "foogarsh!", 9) == 0);
+ }
+ ASSERT (fclose (fp) == 0);
+
+ /* The file's contents is now "foogarsh!". */
+ }
+
+ remove (TESTFILE);
+ return 0;
+
+ skip:
+ fprintf (stderr, "Skipping test: prerequisite file operations failed.\n");
+ remove (TESTFILE);
+ return 77;
+}
diff --git a/gnulib-tests/test-fputc.c b/gnulib-tests/test-fputc.c
new file mode 100644
index 0000000..95a1cb6
--- /dev/null
+++ b/gnulib-tests/test-fputc.c
@@ -0,0 +1,91 @@
+/* Test of fputc() function.
+ Copyright (C) 2011-2016 Free Software Foundation, Inc.
+
+ This 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 <http://www.gnu.org/licenses/>. */
+
+#include <config.h>
+
+#include <stdio.h>
+
+#include "signature.h"
+SIGNATURE_CHECK (fputc, int, (int, FILE *));
+
+#include <errno.h>
+#include <fcntl.h>
+#include <unistd.h>
+
+#include "msvc-inval.h"
+
+#include "macros.h"
+
+int
+main (int argc, char **argv)
+{
+ const char *filename = "test-fputc.txt";
+
+ /* We don't have an fputc() function that installs an invalid parameter
+ handler so far. So install that handler here, explicitly. */
+#if HAVE_MSVC_INVALID_PARAMETER_HANDLER \
+ && MSVC_INVALID_PARAMETER_HANDLING == DEFAULT_HANDLING
+ gl_msvc_inval_ensure_handler ();
+#endif
+
+ /* Test that fputc() on an unbuffered stream sets errno if someone else
+ closes the stream fd behind the back of stdio. */
+ {
+ FILE *fp = fopen (filename, "w");
+ ASSERT (fp != NULL);
+ setvbuf (fp, NULL, _IONBF, 0);
+ ASSERT (close (fileno (fp)) == 0);
+ errno = 0;
+ ASSERT (fputc ('x', fp) == EOF);
+ ASSERT (errno == EBADF);
+ ASSERT (ferror (fp));
+ fclose (fp);
+ }
+
+ /* Test that fputc() on an unbuffered stream sets errno if the stream
+ was constructed with an invalid file descriptor. */
+ {
+ FILE *fp = fdopen (-1, "w");
+ if (fp != NULL)
+ {
+ setvbuf (fp, NULL, _IONBF, 0);
+ errno = 0;
+ ASSERT (fputc ('x', fp) == EOF);
+ ASSERT (errno == EBADF);
+ ASSERT (ferror (fp));
+ fclose (fp);
+ }
+ }
+ {
+ FILE *fp;
+ close (99);
+ fp = fdopen (99, "w");
+ if (fp != NULL)
+ {
+ setvbuf (fp, NULL, _IONBF, 0);
+ errno = 0;
+ ASSERT (fputc ('x', fp) == EOF);
+ ASSERT (errno == EBADF);
+ ASSERT (ferror (fp));
+ fclose (fp);
+ }
+ }
+
+ /* Clean up. */
+ unlink (filename);
+
+ return 0;
+}
diff --git a/gnulib-tests/test-fread.c b/gnulib-tests/test-fread.c
new file mode 100644
index 0000000..b9fc72a
--- /dev/null
+++ b/gnulib-tests/test-fread.c
@@ -0,0 +1,100 @@
+/* Test of fread() function.
+ Copyright (C) 2011-2016 Free Software Foundation, Inc.
+
+ This 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 <http://www.gnu.org/licenses/>. */
+
+#include <config.h>
+
+#include <stdio.h>
+
+#include "signature.h"
+SIGNATURE_CHECK (fread, size_t, (void *, size_t, size_t, FILE *));
+
+#include <errno.h>
+#include <fcntl.h>
+#include <unistd.h>
+
+#include "msvc-inval.h"
+
+#include "macros.h"
+
+int
+main (int argc, char **argv)
+{
+ const char *filename = "test-fread.txt";
+
+ /* We don't have an fread() function that installs an invalid parameter
+ handler so far. So install that handler here, explicitly. */
+#if HAVE_MSVC_INVALID_PARAMETER_HANDLER \
+ && MSVC_INVALID_PARAMETER_HANDLING == DEFAULT_HANDLING
+ gl_msvc_inval_ensure_handler ();
+#endif
+
+ /* Prepare a file. */
+ {
+ const char text[] = "hello world";
+ int fd = open (filename, O_RDWR | O_CREAT | O_TRUNC, 0600);
+ ASSERT (fd >= 0);
+ ASSERT (write (fd, text, sizeof (text)) == sizeof (text));
+ ASSERT (close (fd) == 0);
+ }
+
+ /* Test that fread() sets errno if someone else closes the stream
+ fd behind the back of stdio. */
+ {
+ FILE *fp = fopen (filename, "r");
+ char buf[5];
+ ASSERT (fp != NULL);
+ ASSERT (close (fileno (fp)) == 0);
+ errno = 0;
+ ASSERT (fread (buf, 1, sizeof (buf), fp) == 0);
+ ASSERT (errno == EBADF);
+ ASSERT (ferror (fp));
+ fclose (fp);
+ }
+
+ /* Test that fread() sets errno if the stream was constructed with
+ an invalid file descriptor. */
+ {
+ FILE *fp = fdopen (-1, "r");
+ if (fp != NULL)
+ {
+ char buf[1];
+ errno = 0;
+ ASSERT (fread (buf, 1, 1, fp) == 0);
+ ASSERT (errno == EBADF);
+ ASSERT (ferror (fp));
+ fclose (fp);
+ }
+ }
+ {
+ FILE *fp;
+ close (99);
+ fp = fdopen (99, "r");
+ if (fp != NULL)
+ {
+ char buf[1];
+ errno = 0;
+ ASSERT (fread (buf, 1, 1, fp) == 0);
+ ASSERT (errno == EBADF);
+ ASSERT (ferror (fp));
+ fclose (fp);
+ }
+ }
+
+ /* Clean up. */
+ unlink (filename);
+
+ return 0;
+}
diff --git a/gnulib-tests/test-freading.c b/gnulib-tests/test-freading.c
new file mode 100644
index 0000000..469cb78
--- /dev/null
+++ b/gnulib-tests/test-freading.c
@@ -0,0 +1,130 @@
+/* Test of freading() function.
+ Copyright (C) 2007-2016 Free Software Foundation, Inc.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+/* Written by Bruno Haible <bruno@clisp.org>, 2007. */
+
+#include <config.h>
+
+/* None of the files accessed by this test are large, so disable the
+ fseek link warning if we are not using the gnulib fseek module. */
+#define _GL_NO_LARGE_FILES
+#include "freading.h"
+
+#include <stdio.h>
+
+#include "macros.h"
+
+#define TESTFILE "t-freading.tmp"
+
+int
+main (void)
+{
+ FILE *fp;
+
+ /* Create a file with some contents. Write-only file is never reading. */
+ fp = fopen (TESTFILE, "w");
+ ASSERT (fp);
+ ASSERT (!freading (fp));
+ ASSERT (fwrite ("foobarsh", 1, 8, fp) == 8);
+ ASSERT (!freading (fp));
+ ASSERT (fclose (fp) == 0);
+
+ /* Open it in read-only mode. Read-only file is always reading. */
+ fp = fopen (TESTFILE, "r");
+ ASSERT (fp);
+ ASSERT (freading (fp));
+ ASSERT (fgetc (fp) == 'f');
+ ASSERT (freading (fp));
+ ASSERT (fseek (fp, 2, SEEK_CUR) == 0);
+ ASSERT (freading (fp));
+ ASSERT (fgetc (fp) == 'b');
+ ASSERT (freading (fp));
+ fflush (fp);
+ ASSERT (freading (fp));
+ ASSERT (fgetc (fp) == 'a');
+ ASSERT (freading (fp));
+ ASSERT (fseek (fp, 0, SEEK_END) == 0);
+ ASSERT (freading (fp));
+ ASSERT (fclose (fp) == 0);
+
+ /* Open it in read-write mode. POSIX requires a reposition (fseek,
+ fsetpos, rewind) or EOF when transitioning from read to write;
+ freading is only deterministic after input or output, but this
+ test case should be portable even on open, after reposition, and
+ at EOF. */
+ /* First a scenario with only fgetc, fseek, fputc. */
+ fp = fopen (TESTFILE, "r+");
+ ASSERT (fp);
+ ASSERT (!freading (fp));
+ ASSERT (fgetc (fp) == 'f');
+ ASSERT (freading (fp));
+ ASSERT (fseek (fp, 2, SEEK_CUR) == 0);
+ /* freading (fp) is undefined here, but fwriting (fp) is false. */
+ ASSERT (fgetc (fp) == 'b');
+ ASSERT (freading (fp));
+ /* This fseek call is necessary when switching from reading to writing.
+ See the description of fopen(), ISO C 99 7.19.5.3.(6). */
+ ASSERT (fseek (fp, 0, SEEK_CUR) == 0);
+ /* freading (fp) is undefined here, but fwriting (fp) is false. */
+ ASSERT (fputc ('x', fp) == 'x');
+ ASSERT (!freading (fp));
+ ASSERT (fseek (fp, 0, SEEK_END) == 0);
+ /* freading (fp) is undefined here, because on some implementations (e.g.
+ glibc) fseek causes a buffer to be read.
+ fwriting (fp) is undefined as well. */
+ ASSERT (fclose (fp) == 0);
+
+ /* Open it in read-write mode. POSIX requires a reposition (fseek,
+ fsetpos, rewind) or EOF when transitioning from read to write;
+ freading is only deterministic after input or output, but this
+ test case should be portable even on open, after reposition, and
+ at EOF. */
+ /* Here a scenario that includes fflush. */
+ fp = fopen (TESTFILE, "r+");
+ ASSERT (fp);
+ ASSERT (!freading (fp));
+ ASSERT (fgetc (fp) == 'f');
+ ASSERT (freading (fp));
+ ASSERT (fseek (fp, 2, SEEK_CUR) == 0);
+ /* freading (fp) is undefined here, but fwriting (fp) is false. */
+ ASSERT (fgetc (fp) == 'b');
+ ASSERT (freading (fp));
+ fflush (fp);
+ /* freading (fp) is undefined here, but fwriting (fp) is false. */
+ ASSERT (fgetc (fp) == 'x');
+ ASSERT (freading (fp));
+ /* This fseek call is necessary when switching from reading to writing.
+ See the description of fopen(), ISO C 99 7.19.5.3.(6). */
+ ASSERT (fseek (fp, 0, SEEK_CUR) == 0);
+ /* freading (fp) is undefined here, but fwriting (fp) is false. */
+ ASSERT (fputc ('z', fp) == 'z');
+ ASSERT (!freading (fp));
+ ASSERT (fseek (fp, 0, SEEK_END) == 0);
+ /* freading (fp) is undefined here, because on some implementations (e.g.
+ glibc) fseek causes a buffer to be read.
+ fwriting (fp) is undefined as well. */
+ ASSERT (fclose (fp) == 0);
+
+ /* Open it in append mode. Write-only file is never reading. */
+ fp = fopen (TESTFILE, "a");
+ ASSERT (fp);
+ ASSERT (!freading (fp));
+ ASSERT (fwrite ("bla", 1, 3, fp) == 3);
+ ASSERT (!freading (fp));
+ ASSERT (fclose (fp) == 0);
+ ASSERT (remove (TESTFILE) == 0);
+ return 0;
+}
diff --git a/gnulib-tests/test-fseek.c b/gnulib-tests/test-fseek.c
new file mode 100644
index 0000000..b5118fa
--- /dev/null
+++ b/gnulib-tests/test-fseek.c
@@ -0,0 +1,70 @@
+/* Test of fseek() function.
+ Copyright (C) 2007-2016 Free Software Foundation, Inc.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+/* Written by Bruno Haible <bruno@clisp.org>, 2007. */
+
+#include <config.h>
+
+/* None of the files accessed by this test are large, so disable the
+ fseek link warning if the user requested GNULIB_POSIXCHECK. */
+#define _GL_NO_LARGE_FILES
+#include <stdio.h>
+
+#include "signature.h"
+SIGNATURE_CHECK (fseek, int, (FILE *, long, int));
+
+#include "macros.h"
+
+#ifndef FUNC_UNGETC_BROKEN
+# define FUNC_UNGETC_BROKEN 0
+#endif
+
+int
+main (int argc, char **argv)
+{
+ /* Assume stdin is non-empty, seekable, and starts with '#!/bin/sh'
+ iff argc > 1. */
+ int expected = argc > 1 ? 0 : -1;
+ ASSERT (fseek (stdin, 0, SEEK_CUR) == expected);
+ if (argc > 1)
+ {
+ /* Test that fseek discards previously read ungetc data. */
+ int ch = fgetc (stdin);
+ ASSERT (ch == '#');
+ ASSERT (ungetc (ch, stdin) == ch);
+ ASSERT (fseek (stdin, 2, SEEK_SET) == 0);
+ ch = fgetc (stdin);
+ ASSERT (ch == '/');
+ if (2 < argc)
+ {
+ if (FUNC_UNGETC_BROKEN)
+ {
+ fputs ("Skipping test: ungetc cannot handle arbitrary bytes\n",
+ stderr);
+ return 77;
+ }
+ /* Test that fseek discards random ungetc data. */
+ ASSERT (ungetc (ch ^ 0xff, stdin) == (ch ^ 0xff));
+ }
+ ASSERT (fseek (stdin, 0, SEEK_END) == 0);
+ ASSERT (fgetc (stdin) == EOF);
+ /* Test that fseek resets end-of-file marker. */
+ ASSERT (feof (stdin));
+ ASSERT (fseek (stdin, 0, SEEK_END) == 0);
+ ASSERT (!feof (stdin));
+ }
+ return 0;
+}
diff --git a/gnulib-tests/test-fseek.sh b/gnulib-tests/test-fseek.sh
new file mode 100755
index 0000000..bad6c08
--- /dev/null
+++ b/gnulib-tests/test-fseek.sh
@@ -0,0 +1,5 @@
+#!/bin/sh
+
+./test-fseek${EXEEXT} 1 < "$srcdir/test-fseek.sh" || exit 1
+echo hi | ./test-fseek${EXEEXT} || exit 1
+exit 0
diff --git a/gnulib-tests/test-fseek2.sh b/gnulib-tests/test-fseek2.sh
new file mode 100755
index 0000000..a4c9cb7
--- /dev/null
+++ b/gnulib-tests/test-fseek2.sh
@@ -0,0 +1,3 @@
+#!/bin/sh
+
+exec ./test-fseek${EXEEXT} 1 2 < "$srcdir/test-fseek2.sh"
diff --git a/gnulib-tests/test-fseeko.c b/gnulib-tests/test-fseeko.c
new file mode 100644
index 0000000..dee2072
--- /dev/null
+++ b/gnulib-tests/test-fseeko.c
@@ -0,0 +1,74 @@
+/* Test of fseeko() function.
+ Copyright (C) 2007-2016 Free Software Foundation, Inc.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+/* Written by Bruno Haible <bruno@clisp.org>, 2007. */
+
+#include <config.h>
+
+/* None of the files accessed by this test are large, so disable the
+ fseek link warning if we are not using the gnulib fseek module. */
+#define _GL_NO_LARGE_FILES
+#include <stdio.h>
+
+#include "signature.h"
+SIGNATURE_CHECK (fseeko, int, (FILE *, off_t, int));
+
+
+#include "macros.h"
+
+#ifndef FUNC_UNGETC_BROKEN
+# define FUNC_UNGETC_BROKEN 0
+#endif
+
+int
+main (int argc, char **argv _GL_UNUSED)
+{
+ /* Assume stdin is non-empty, seekable, and starts with '#!/bin/sh'
+ iff argc > 1. */
+ int expected = argc > 1 ? 0 : -1;
+ /* Exit with success only if fseek/fseeko agree. */
+ int r1 = fseeko (stdin, 0, SEEK_CUR);
+ int r2 = fseek (stdin, 0, SEEK_CUR);
+ ASSERT (r1 == r2 && r1 == expected);
+ if (argc > 1)
+ {
+ /* Test that fseek discards previously read ungetc data. */
+ int ch = fgetc (stdin);
+ ASSERT (ch == '#');
+ ASSERT (ungetc (ch, stdin) == ch);
+ ASSERT (fseeko (stdin, 2, SEEK_SET) == 0);
+ ch = fgetc (stdin);
+ ASSERT (ch == '/');
+ if (2 < argc)
+ {
+ if (FUNC_UNGETC_BROKEN)
+ {
+ fputs ("Skipping test: ungetc cannot handle arbitrary bytes\n",
+ stderr);
+ return 77;
+ }
+ /* Test that fseek discards random ungetc data. */
+ ASSERT (ungetc (ch ^ 0xff, stdin) == (ch ^ 0xff));
+ }
+ ASSERT (fseeko (stdin, 0, SEEK_END) == 0);
+ ASSERT (fgetc (stdin) == EOF);
+ /* Test that fseek resets end-of-file marker. */
+ ASSERT (feof (stdin));
+ ASSERT (fseeko (stdin, 0, SEEK_END) == 0);
+ ASSERT (!feof (stdin));
+ }
+ return 0;
+}
diff --git a/gnulib-tests/test-fseeko.sh b/gnulib-tests/test-fseeko.sh
new file mode 100755
index 0000000..5c55827
--- /dev/null
+++ b/gnulib-tests/test-fseeko.sh
@@ -0,0 +1,5 @@
+#!/bin/sh
+
+./test-fseeko${EXEEXT} 1 < "$srcdir/test-fseeko.sh" || exit 1
+echo hi | ./test-fseeko${EXEEXT} || exit 1
+exit 0
diff --git a/gnulib-tests/test-fseeko2.sh b/gnulib-tests/test-fseeko2.sh
new file mode 100755
index 0000000..6e1130c
--- /dev/null
+++ b/gnulib-tests/test-fseeko2.sh
@@ -0,0 +1,3 @@
+#!/bin/sh
+
+exec ./test-fseeko${EXEEXT} 1 2 < "$srcdir/test-fseeko2.sh"
diff --git a/gnulib-tests/test-fseeko3.c b/gnulib-tests/test-fseeko3.c
new file mode 100644
index 0000000..c76d425
--- /dev/null
+++ b/gnulib-tests/test-fseeko3.c
@@ -0,0 +1,51 @@
+/* Test of fseeko() function.
+ Copyright (C) 2011-2016 Free Software Foundation, Inc.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+/* Written by Eric Blake <eblake@redhat.com>, 2011. */
+
+#include <config.h>
+
+#include <stdio.h>
+
+#include <stdlib.h>
+
+#include "macros.h"
+
+int
+main (int argc, char **argv)
+{
+ int do_initial_ftell = atoi (argv[1]);
+ const char *filename = argv[2];
+ FILE *fp = fopen (filename, "r");
+ ASSERT (fp != NULL);
+
+ if (do_initial_ftell)
+ {
+ off_t pos = ftell (fp);
+ ASSERT (pos == 0);
+ }
+
+ ASSERT (fseeko (fp, 0, SEEK_END) == 0);
+
+ {
+ off_t pos = ftell (fp);
+ ASSERT (pos > 0);
+ }
+
+ ASSERT (fclose (fp) == 0);
+
+ return 0;
+}
diff --git a/gnulib-tests/test-fseeko3.sh b/gnulib-tests/test-fseeko3.sh
new file mode 100755
index 0000000..c50b4a2
--- /dev/null
+++ b/gnulib-tests/test-fseeko3.sh
@@ -0,0 +1,7 @@
+#!/bin/sh
+
+./test-fseeko3${EXEEXT} 0 "$srcdir/test-fseeko3.sh" || exit 1
+
+./test-fseeko3${EXEEXT} 1 "$srcdir/test-fseeko3.sh" || exit 1
+
+exit 0
diff --git a/gnulib-tests/test-fseeko4.c b/gnulib-tests/test-fseeko4.c
new file mode 100644
index 0000000..d0b8b9f
--- /dev/null
+++ b/gnulib-tests/test-fseeko4.c
@@ -0,0 +1,73 @@
+/* Test of fseeko() function.
+ Copyright (C) 2011-2016 Free Software Foundation, Inc.
+
+ This 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 <stdio.h>
+
+#include <errno.h>
+#include <unistd.h>
+
+#include "macros.h"
+
+int
+main (int argc, char **argv)
+{
+ const char *filename = argv[1];
+
+ /* Test that fseeko() sets errno if someone else closes the stream
+ fd behind the back of stdio. */
+ {
+ FILE *fp = fopen (filename, "r");
+ ASSERT (fp != NULL);
+ setvbuf (fp, NULL, _IONBF, 0);
+ ASSERT (ftell (fp) == 0);
+ ASSERT (fseeko (fp, 0, SEEK_END) == 0);
+ ASSERT (ftell (fp) > 0);
+ ASSERT (close (fileno (fp)) == 0);
+ errno = 0;
+ ASSERT (fseeko (fp, 0, SEEK_SET) == -1);
+ ASSERT (errno == EBADF);
+ fclose (fp);
+ }
+
+ /* Test that fseeko() sets errno if the stream was constructed with
+ an invalid file descriptor. */
+ {
+ FILE *fp = fdopen (-1, "w");
+ if (fp != NULL)
+ {
+ errno = 0;
+ ASSERT (fseeko (fp, 0, SEEK_END) == -1);
+ ASSERT (errno == EBADF);
+ fclose (fp);
+ }
+ }
+ {
+ FILE *fp;
+ close (99);
+ fp = fdopen (99, "w");
+ if (fp != NULL)
+ {
+ errno = 0;
+ ASSERT (fseeko (fp, 0, SEEK_END) == -1);
+ ASSERT (errno == EBADF);
+ fclose (fp);
+ }
+ }
+
+ return 0;
+}
diff --git a/gnulib-tests/test-fseeko4.sh b/gnulib-tests/test-fseeko4.sh
new file mode 100755
index 0000000..e6464ae
--- /dev/null
+++ b/gnulib-tests/test-fseeko4.sh
@@ -0,0 +1,5 @@
+#!/bin/sh
+
+./test-fseeko4${EXEEXT} "$srcdir/test-fseeko4.sh" || exit 1
+
+exit 0
diff --git a/gnulib-tests/test-fstat.c b/gnulib-tests/test-fstat.c
new file mode 100644
index 0000000..c9ac749
--- /dev/null
+++ b/gnulib-tests/test-fstat.c
@@ -0,0 +1,50 @@
+/* Tests of fstat() function.
+ Copyright (C) 2011-2016 Free Software Foundation, Inc.
+
+ This 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 <sys/stat.h>
+
+#include "signature.h"
+SIGNATURE_CHECK (fstat, int, (int, struct stat *));
+
+#include <errno.h>
+#include <unistd.h>
+
+#include "macros.h"
+
+int
+main (int argc, char *argv[])
+{
+ /* Test behaviour for invalid file descriptors. */
+ {
+ struct stat statbuf;
+
+ errno = 0;
+ ASSERT (fstat (-1, &statbuf) == -1);
+ ASSERT (errno == EBADF);
+ }
+ {
+ struct stat statbuf;
+
+ close (99);
+ errno = 0;
+ ASSERT (fstat (99, &statbuf) == -1);
+ ASSERT (errno == EBADF);
+ }
+
+ return 0;
+}
diff --git a/gnulib-tests/test-ftell.c b/gnulib-tests/test-ftell.c
new file mode 100644
index 0000000..9b52344
--- /dev/null
+++ b/gnulib-tests/test-ftell.c
@@ -0,0 +1,107 @@
+/* Test of ftell() function.
+ Copyright (C) 2007-2016 Free Software Foundation, Inc.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+/* Written by Bruno Haible <bruno@clisp.org>, 2007. */
+
+#include <config.h>
+
+/* None of the files accessed by this test are large, so disable the
+ fseek link warning if we are not using the gnulib fseek module. */
+#define _GL_NO_LARGE_FILES
+#include <stdio.h>
+
+#include "signature.h"
+SIGNATURE_CHECK (ftell, long, (FILE *));
+
+#include "binary-io.h"
+#include "macros.h"
+
+#ifndef FUNC_UNGETC_BROKEN
+# define FUNC_UNGETC_BROKEN 0
+#endif
+
+int
+main (int argc, char **argv)
+{
+ int ch;
+ /* Assume stdin is seekable iff argc > 1. */
+ if (argc == 1)
+ {
+ ASSERT (ftell (stdin) == -1);
+ return 0;
+ }
+
+ /* mingw ftell is unreliable on text mode input. */
+ SET_BINARY (0);
+
+ /* Simple tests. */
+ ASSERT (ftell (stdin) == 0);
+
+ ch = fgetc (stdin);
+ ASSERT (ch == '#');
+ ASSERT (ftell (stdin) == 1);
+
+ /* Test ftell after ungetc of read input. */
+ ch = ungetc ('#', stdin);
+ ASSERT (ch == '#');
+ ASSERT (ftell (stdin) == 0);
+
+ ch = fgetc (stdin);
+ ASSERT (ch == '#');
+ ASSERT (ftell (stdin) == 1);
+
+ /* Test ftell after fseek. */
+ ASSERT (fseek (stdin, 2, SEEK_SET) == 0);
+ ASSERT (ftell (stdin) == 2);
+
+ /* Test ftell after random ungetc. */
+ ch = fgetc (stdin);
+ ASSERT (ch == '/');
+ ch = ungetc ('@', stdin);
+ ASSERT (ch == '@');
+ ASSERT (ftell (stdin) == 2);
+
+ ch = fgetc (stdin);
+ ASSERT (ch == '@');
+ ASSERT (ftell (stdin) == 3);
+
+ if (2 < argc)
+ {
+ if (FUNC_UNGETC_BROKEN)
+ {
+ fputs ("Skipping test: ungetc cannot handle arbitrary bytes\n",
+ stderr);
+ return 77;
+ }
+ /* Test ftell after ungetc without read. */
+ ASSERT (fseek (stdin, 0, SEEK_CUR) == 0);
+ ASSERT (ftell (stdin) == 3);
+
+ ch = ungetc ('~', stdin);
+ ASSERT (ch == '~');
+ ASSERT (ftell (stdin) == 2);
+ }
+
+#if !defined __MINT__ /* FreeMiNT has problems seeking past end of file */
+ /* Test ftell beyond end of file. */
+ ASSERT (fseek (stdin, 0, SEEK_END) == 0);
+ ch = ftell (stdin);
+ ASSERT (fseek (stdin, 10, SEEK_END) == 0);
+ ASSERT (ftell (stdin) == ch + 10);
+#endif
+
+ return 0;
+}
diff --git a/gnulib-tests/test-ftell.sh b/gnulib-tests/test-ftell.sh
new file mode 100755
index 0000000..bf55d2e
--- /dev/null
+++ b/gnulib-tests/test-ftell.sh
@@ -0,0 +1,5 @@
+#!/bin/sh
+
+./test-ftell${EXEEXT} 1 < "$srcdir/test-ftell.sh" || exit 1
+echo hi | ./test-ftell${EXEEXT} || exit 1
+exit 0
diff --git a/gnulib-tests/test-ftell2.sh b/gnulib-tests/test-ftell2.sh
new file mode 100755
index 0000000..3b645b8
--- /dev/null
+++ b/gnulib-tests/test-ftell2.sh
@@ -0,0 +1,3 @@
+#!/bin/sh
+
+exec ./test-ftell${EXEEXT} 1 2 < "$srcdir/test-ftell2.sh"
diff --git a/gnulib-tests/test-ftell3.c b/gnulib-tests/test-ftell3.c
new file mode 100644
index 0000000..695e5b2
--- /dev/null
+++ b/gnulib-tests/test-ftell3.c
@@ -0,0 +1,78 @@
+/* Test of ftell() function.
+ Copyright (C) 2007-2016 Free Software Foundation, Inc.
+
+ This 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>
+
+/* None of the files accessed by this test are large, so disable the
+ fseek link warning if we are not using the gnulib fseek module. */
+#define _GL_NO_LARGE_FILES
+#include <stdio.h>
+
+#include <string.h>
+
+#include "macros.h"
+
+#define TESTFILE "t-ftell3.tmp"
+
+int
+main (void)
+{
+ FILE *fp;
+
+ /* Create a file with some contents. */
+ fp = fopen (TESTFILE, "w");
+ if (fp == NULL)
+ goto skip;
+ if (fwrite ("foogarsh", 1, 8, fp) < 8)
+ goto skip;
+ if (fclose (fp))
+ goto skip;
+
+ /* The file's contents is now "foogarsh". */
+
+ /* Try writing after reading to EOF. */
+ fp = fopen (TESTFILE, "r+");
+ if (fp == NULL)
+ goto skip;
+ if (fseek (fp, -1, SEEK_END))
+ goto skip;
+ ASSERT (getc (fp) == 'h');
+ ASSERT (getc (fp) == EOF);
+ ASSERT (ftell (fp) == 8);
+ ASSERT (ftell (fp) == 8);
+ ASSERT (putc ('!', fp) == '!');
+ ASSERT (ftell (fp) == 9);
+ ASSERT (fclose (fp) == 0);
+ fp = fopen (TESTFILE, "r");
+ if (fp == NULL)
+ goto skip;
+ {
+ char buf[10];
+ ASSERT (fread (buf, 1, 10, fp) == 9);
+ ASSERT (memcmp (buf, "foogarsh!", 9) == 0);
+ }
+ ASSERT (fclose (fp) == 0);
+
+ /* The file's contents is now "foogarsh!". */
+
+ remove (TESTFILE);
+ return 0;
+
+ skip:
+ fprintf (stderr, "Skipping test: prerequisite file operations failed.\n");
+ remove (TESTFILE);
+ return 77;
+}
diff --git a/gnulib-tests/test-ftello.c b/gnulib-tests/test-ftello.c
new file mode 100644
index 0000000..369d476
--- /dev/null
+++ b/gnulib-tests/test-ftello.c
@@ -0,0 +1,118 @@
+/* Test of ftello() function.
+ Copyright (C) 2007-2016 Free Software Foundation, Inc.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+/* Written by Bruno Haible <bruno@clisp.org>, 2007. */
+
+#include <config.h>
+
+/* None of the files accessed by this test are large, so disable the
+ fseek link warning if we are not using the gnulib fseek module. */
+#define _GL_NO_LARGE_FILES
+#include <stdio.h>
+
+#include "signature.h"
+SIGNATURE_CHECK (ftello, off_t, (FILE *));
+
+#include "binary-io.h"
+#include "macros.h"
+
+#ifndef FUNC_UNGETC_BROKEN
+# define FUNC_UNGETC_BROKEN 0
+#endif
+
+int
+main (int argc, char **argv _GL_UNUSED)
+{
+ int ch;
+ /* Assume stdin is seekable iff argc > 1. */
+ if (argc == 1)
+ {
+ ASSERT (ftell (stdin) == -1);
+ ASSERT (ftello (stdin) == -1);
+ return 0;
+ }
+
+ /* mingw ftell is unreliable on text mode input. */
+ SET_BINARY (0);
+
+ /* Simple tests. For each test, make sure ftell and ftello agree. */
+ ASSERT (ftell (stdin) == 0);
+ ASSERT (ftello (stdin) == 0);
+
+ ch = fgetc (stdin);
+ ASSERT (ch == '#');
+ ASSERT (ftell (stdin) == 1);
+ ASSERT (ftello (stdin) == 1);
+
+ /* Test ftell after ungetc of read input. */
+ ch = ungetc ('#', stdin);
+ ASSERT (ch == '#');
+ ASSERT (ftell (stdin) == 0);
+ ASSERT (ftello (stdin) == 0);
+
+ ch = fgetc (stdin);
+ ASSERT (ch == '#');
+ ASSERT (ftell (stdin) == 1);
+ ASSERT (ftello (stdin) == 1);
+
+ /* Test ftell after fseek. */
+ ASSERT (fseek (stdin, 2, SEEK_SET) == 0);
+ ASSERT (ftell (stdin) == 2);
+ ASSERT (ftello (stdin) == 2);
+
+ /* Test ftell after random ungetc. */
+ ch = fgetc (stdin);
+ ASSERT (ch == '/');
+ ch = ungetc ('@', stdin);
+ ASSERT (ch == '@');
+ ASSERT (ftell (stdin) == 2);
+ ASSERT (ftello (stdin) == 2);
+
+ ch = fgetc (stdin);
+ ASSERT (ch == '@');
+ ASSERT (ftell (stdin) == 3);
+ ASSERT (ftello (stdin) == 3);
+
+ if (2 < argc)
+ {
+ if (FUNC_UNGETC_BROKEN)
+ {
+ fputs ("Skipping test: ungetc cannot handle arbitrary bytes\n",
+ stderr);
+ return 77;
+ }
+ /* Test ftell after ungetc without read. */
+ ASSERT (fseek (stdin, 0, SEEK_CUR) == 0);
+ ASSERT (ftell (stdin) == 3);
+ ASSERT (ftello (stdin) == 3);
+
+ ch = ungetc ('~', stdin);
+ ASSERT (ch == '~');
+ ASSERT (ftell (stdin) == 2);
+ ASSERT (ftello (stdin) == 2);
+ }
+
+#if !defined __MINT__ /* FreeMiNT has problems seeking past end of file */
+ /* Test ftell beyond end of file. */
+ ASSERT (fseek (stdin, 0, SEEK_END) == 0);
+ ch = ftello (stdin);
+ ASSERT (fseek (stdin, 10, SEEK_END) == 0);
+ ASSERT (ftell (stdin) == ch + 10);
+ ASSERT (ftello (stdin) == ch + 10);
+#endif
+
+ return 0;
+}
diff --git a/gnulib-tests/test-ftello.sh b/gnulib-tests/test-ftello.sh
new file mode 100755
index 0000000..33d2e83
--- /dev/null
+++ b/gnulib-tests/test-ftello.sh
@@ -0,0 +1,5 @@
+#!/bin/sh
+
+./test-ftello${EXEEXT} 1 < "$srcdir/test-ftello.sh" || exit 1
+echo hi | ./test-ftello${EXEEXT} || exit 1
+exit 0
diff --git a/gnulib-tests/test-ftello2.sh b/gnulib-tests/test-ftello2.sh
new file mode 100755
index 0000000..ba750b0
--- /dev/null
+++ b/gnulib-tests/test-ftello2.sh
@@ -0,0 +1,3 @@
+#!/bin/sh
+
+exec ./test-ftello${EXEEXT} 1 2 < "$srcdir/test-ftello2.sh"
diff --git a/gnulib-tests/test-ftello3.c b/gnulib-tests/test-ftello3.c
new file mode 100644
index 0000000..f75ce03
--- /dev/null
+++ b/gnulib-tests/test-ftello3.c
@@ -0,0 +1,78 @@
+/* Test of ftello() function.
+ Copyright (C) 2007-2016 Free Software Foundation, Inc.
+
+ This 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>
+
+/* None of the files accessed by this test are large, so disable the
+ fseek link warning if we are not using the gnulib fseek module. */
+#define _GL_NO_LARGE_FILES
+#include <stdio.h>
+
+#include <string.h>
+
+#include "macros.h"
+
+#define TESTFILE "t-ftello3.tmp"
+
+int
+main (void)
+{
+ FILE *fp;
+
+ /* Create a file with some contents. */
+ fp = fopen (TESTFILE, "w");
+ if (fp == NULL)
+ goto skip;
+ if (fwrite ("foogarsh", 1, 8, fp) < 8)
+ goto skip;
+ if (fclose (fp))
+ goto skip;
+
+ /* The file's contents is now "foogarsh". */
+
+ /* Try writing after reading to EOF. */
+ fp = fopen (TESTFILE, "r+");
+ if (fp == NULL)
+ goto skip;
+ if (fseek (fp, -1, SEEK_END))
+ goto skip;
+ ASSERT (getc (fp) == 'h');
+ ASSERT (getc (fp) == EOF);
+ ASSERT (ftello (fp) == 8);
+ ASSERT (ftello (fp) == 8);
+ ASSERT (putc ('!', fp) == '!');
+ ASSERT (ftello (fp) == 9);
+ ASSERT (fclose (fp) == 0);
+ fp = fopen (TESTFILE, "r");
+ if (fp == NULL)
+ goto skip;
+ {
+ char buf[10];
+ ASSERT (fread (buf, 1, 10, fp) == 9);
+ ASSERT (memcmp (buf, "foogarsh!", 9) == 0);
+ }
+ ASSERT (fclose (fp) == 0);
+
+ /* The file's contents is now "foogarsh!". */
+
+ remove (TESTFILE);
+ return 0;
+
+ skip:
+ fprintf (stderr, "Skipping test: prerequisite file operations failed.\n");
+ remove (TESTFILE);
+ return 77;
+}
diff --git a/gnulib-tests/test-ftello4.c b/gnulib-tests/test-ftello4.c
new file mode 100644
index 0000000..1f94ef6
--- /dev/null
+++ b/gnulib-tests/test-ftello4.c
@@ -0,0 +1,70 @@
+/* Test of ftello() function.
+ Copyright (C) 2011-2016 Free Software Foundation, Inc.
+
+ This 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 <stdio.h>
+
+#include <errno.h>
+#include <unistd.h>
+
+#include "macros.h"
+
+int
+main (int argc, char **argv)
+{
+ const char *filename = argv[1];
+
+ /* Test that ftello() sets errno if someone else closes the stream
+ fd behind the back of stdio. */
+ {
+ FILE *fp = fopen (filename, "r");
+ ASSERT (fp != NULL);
+ setvbuf (fp, NULL, _IONBF, 0);
+ ASSERT (close (fileno (fp)) == 0);
+ errno = 0;
+ ASSERT (ftello (fp) == (off_t)-1);
+ ASSERT (errno == EBADF);
+ fclose (fp);
+ }
+
+ /* Test that ftello() sets errno if the stream was constructed with
+ an invalid file descriptor. */
+ {
+ FILE *fp = fdopen (-1, "w");
+ if (fp != NULL)
+ {
+ errno = 0;
+ ASSERT (ftello (fp) == (off_t)-1);
+ ASSERT (errno == EBADF);
+ fclose (fp);
+ }
+ }
+ {
+ FILE *fp;
+ close (99);
+ fp = fdopen (99, "w");
+ if (fp != NULL)
+ {
+ errno = 0;
+ ASSERT (ftello (fp) == (off_t)-1);
+ ASSERT (errno == EBADF);
+ fclose (fp);
+ }
+ }
+
+ return 0;
+}
diff --git a/gnulib-tests/test-ftello4.sh b/gnulib-tests/test-ftello4.sh
new file mode 100755
index 0000000..e3702bb
--- /dev/null
+++ b/gnulib-tests/test-ftello4.sh
@@ -0,0 +1,5 @@
+#!/bin/sh
+
+./test-ftello4${EXEEXT} "$srcdir/test-ftello4.sh" || exit 1
+
+exit 0
diff --git a/gnulib-tests/test-fwrite.c b/gnulib-tests/test-fwrite.c
new file mode 100644
index 0000000..bc285f3
--- /dev/null
+++ b/gnulib-tests/test-fwrite.c
@@ -0,0 +1,94 @@
+/* Test of fwrite() function.
+ Copyright (C) 2011-2016 Free Software Foundation, Inc.
+
+ This 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 <http://www.gnu.org/licenses/>. */
+
+#include <config.h>
+
+#include <stdio.h>
+
+#include "signature.h"
+SIGNATURE_CHECK (fwrite, size_t, (const void *, size_t, size_t, FILE *));
+
+#include <errno.h>
+#include <fcntl.h>
+#include <unistd.h>
+
+#include "msvc-inval.h"
+
+#include "macros.h"
+
+int
+main (int argc, char **argv)
+{
+ const char *filename = "test-fwrite.txt";
+
+ /* We don't have an fwrite() function that installs an invalid parameter
+ handler so far. So install that handler here, explicitly. */
+#if HAVE_MSVC_INVALID_PARAMETER_HANDLER \
+ && MSVC_INVALID_PARAMETER_HANDLING == DEFAULT_HANDLING
+ gl_msvc_inval_ensure_handler ();
+#endif
+
+ /* Test that fwrite() on an unbuffered stream sets errno if someone else
+ closes the stream fd behind the back of stdio. */
+ {
+ FILE *fp = fopen (filename, "w");
+ char buf[5] = "world";
+ ASSERT (fp != NULL);
+ setvbuf (fp, NULL, _IONBF, 0);
+ ASSERT (close (fileno (fp)) == 0);
+ errno = 0;
+ ASSERT (fwrite (buf, 1, sizeof (buf), fp) == 0);
+ ASSERT (errno == EBADF);
+ ASSERT (ferror (fp));
+ fclose (fp);
+ }
+
+ /* Test that fwrite() on an unbuffered stream sets errno if the stream
+ was constructed with an invalid file descriptor. */
+ {
+ FILE *fp = fdopen (-1, "w");
+ if (fp != NULL)
+ {
+ char buf[5] = "world";
+ setvbuf (fp, NULL, _IONBF, 0);
+ errno = 0;
+ ASSERT (fwrite (buf, 1, sizeof (buf), fp) == 0);
+ ASSERT (errno == EBADF);
+ ASSERT (ferror (fp));
+ fclose (fp);
+ }
+ }
+ {
+ FILE *fp;
+ close (99);
+ fp = fdopen (99, "w");
+ if (fp != NULL)
+ {
+ char buf[5] = "world";
+ setvbuf (fp, NULL, _IONBF, 0);
+ errno = 0;
+ ASSERT (fwrite (buf, 1, sizeof (buf), fp) == 0);
+ ASSERT (errno == EBADF);
+ ASSERT (ferror (fp));
+ fclose (fp);
+ }
+ }
+
+ /* Clean up. */
+ unlink (filename);
+
+ return 0;
+}
diff --git a/gnulib-tests/test-fwriting.c b/gnulib-tests/test-fwriting.c
new file mode 100644
index 0000000..dd7883e
--- /dev/null
+++ b/gnulib-tests/test-fwriting.c
@@ -0,0 +1,164 @@
+/* Test of fwriting() function.
+ Copyright (C) 2007-2016 Free Software Foundation, Inc.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+/* Written by Bruno Haible <bruno@clisp.org>, 2007. */
+
+#include <config.h>
+
+/* None of the files accessed by this test are large, so disable the
+ fseek link warning if we are not using the gnulib fseek module. */
+#define _GL_NO_LARGE_FILES
+#include "fwriting.h"
+
+#include <stdio.h>
+
+#include "macros.h"
+
+#define TESTFILE "t-fwriting.tmp"
+
+int
+main ()
+{
+ FILE *fp;
+
+ /* Create a file with some contents. Write-only file is always writing. */
+ fp = fopen (TESTFILE, "w");
+ if (fp == NULL)
+ goto skip;
+ ASSERT (fwriting (fp));
+ if (fwrite ("foobarsh", 1, 8, fp) < 8)
+ goto skip;
+ ASSERT (fwriting (fp));
+ if (fclose (fp))
+ goto skip;
+
+ /* Open it in read-only mode. Read-only file is never writing. */
+ fp = fopen (TESTFILE, "r");
+ if (fp == NULL)
+ goto skip;
+ ASSERT (!fwriting (fp));
+ if (fgetc (fp) != 'f')
+ goto skip;
+ ASSERT (!fwriting (fp));
+ if (fseek (fp, 2, SEEK_CUR))
+ goto skip;
+ ASSERT (!fwriting (fp));
+ if (fgetc (fp) != 'b')
+ goto skip;
+ ASSERT (!fwriting (fp));
+ fflush (fp);
+ ASSERT (!fwriting (fp));
+ if (fgetc (fp) != 'a')
+ goto skip;
+ ASSERT (!fwriting (fp));
+ if (fseek (fp, 0, SEEK_END))
+ goto skip;
+ ASSERT (!fwriting (fp));
+ if (fclose (fp))
+ goto skip;
+
+ /* Open it in read-write mode. POSIX requires a reposition (fseek,
+ fsetpos, rewind) or fflush when transitioning from write to read,
+ fwriting is only deterministic after input or output, but this
+ test case should be portable even on open, after reposition, and
+ after fflush. */
+ /* First a scenario with only fgetc, fseek, fputc. */
+ fp = fopen (TESTFILE, "r+");
+ if (fp == NULL)
+ goto skip;
+ ASSERT (!fwriting (fp));
+ if (fgetc (fp) != 'f')
+ goto skip;
+ ASSERT (!fwriting (fp));
+ if (fseek (fp, 2, SEEK_CUR))
+ goto skip;
+ ASSERT (!fwriting (fp));
+ if (fgetc (fp) != 'b')
+ goto skip;
+ ASSERT (!fwriting (fp));
+ /* This fseek call is necessary when switching from reading to writing.
+ See the description of fopen(), ISO C 99 7.19.5.3.(6). */
+ if (fseek (fp, 0, SEEK_CUR) != 0)
+ goto skip;
+ ASSERT (!fwriting (fp));
+ if (fputc ('x', fp) != 'x')
+ goto skip;
+ ASSERT (fwriting (fp));
+ if (fseek (fp, 0, SEEK_END))
+ goto skip;
+ /* freading (fp) is undefined here, because on some implementations (e.g.
+ glibc) fseek causes a buffer to be read.
+ fwriting (fp) is undefined as well. */
+ if (fclose (fp))
+ goto skip;
+
+ /* Open it in read-write mode. POSIX requires a reposition (fseek,
+ fsetpos, rewind) or fflush when transitioning from write to read,
+ fwriting is only deterministic after input or output, but this
+ test case should be portable even on open, after reposition, and
+ after fflush. */
+ /* Here a scenario that includes fflush. */
+ fp = fopen (TESTFILE, "r+");
+ if (fp == NULL)
+ goto skip;
+ ASSERT (!fwriting (fp));
+ if (fgetc (fp) != 'f')
+ goto skip;
+ ASSERT (!fwriting (fp));
+ if (fseek (fp, 2, SEEK_CUR))
+ goto skip;
+ ASSERT (!fwriting (fp));
+ if (fgetc (fp) != 'b')
+ goto skip;
+ ASSERT (!fwriting (fp));
+ fflush (fp);
+ ASSERT (!fwriting (fp));
+ if (fgetc (fp) != 'x')
+ goto skip;
+ ASSERT (!fwriting (fp));
+ /* This fseek call is necessary when switching from reading to writing.
+ See the description of fopen(), ISO C 99 7.19.5.3.(6). */
+ if (fseek (fp, 0, SEEK_CUR) != 0)
+ goto skip;
+ ASSERT (!fwriting (fp));
+ if (fputc ('z', fp) != 'z')
+ goto skip;
+ ASSERT (fwriting (fp));
+ if (fseek (fp, 0, SEEK_END))
+ goto skip;
+ /* freading (fp) is undefined here, because on some implementations (e.g.
+ glibc) fseek causes a buffer to be read.
+ fwriting (fp) is undefined as well. */
+ if (fclose (fp))
+ goto skip;
+
+ /* Open it in append mode. */
+ fp = fopen (TESTFILE, "a");
+ if (fp == NULL)
+ goto skip;
+ ASSERT (fwriting (fp));
+ if (fwrite ("bla", 1, 3, fp) < 3)
+ goto skip;
+ ASSERT (fwriting (fp));
+ if (fclose (fp))
+ goto skip;
+
+ return 0;
+
+ skip:
+ fprintf (stderr, "Skipping test: file operations failed.\n");
+ return 77;
+}
diff --git a/gnulib-tests/test-getcwd-lgpl.c b/gnulib-tests/test-getcwd-lgpl.c
new file mode 100644
index 0000000..6bea7b7
--- /dev/null
+++ b/gnulib-tests/test-getcwd-lgpl.c
@@ -0,0 +1,102 @@
+/* Test of getcwd() function.
+ Copyright (C) 2009-2016 Free Software Foundation, Inc.
+
+ This 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 <unistd.h>
+
+#include "signature.h"
+SIGNATURE_CHECK (getcwd, char *, (char *, size_t));
+
+#include <errno.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+
+#include "macros.h"
+
+int
+main (int argc, char **argv)
+{
+ char *pwd1;
+ char *pwd2;
+ /* If the user provides an argument, attempt to chdir there first. */
+ if (1 < argc)
+ {
+ if (chdir (argv[1]) == 0)
+ printf ("changed to directory %s\n", argv[1]);
+ }
+
+ pwd1 = getcwd (NULL, 0);
+ ASSERT (pwd1 && *pwd1);
+ if (1 < argc)
+ printf ("cwd=%s\n", pwd1);
+
+ /* Make sure the result is usable. */
+ ASSERT (chdir (pwd1) == 0);
+ ASSERT (chdir (".//./.") == 0);
+
+ /* Make sure that result is normalized. */
+ pwd2 = getcwd (NULL, 0);
+ ASSERT (pwd2);
+ ASSERT (strcmp (pwd1, pwd2) == 0);
+ free (pwd2);
+ {
+ size_t len = strlen (pwd1);
+ ssize_t i = len - 10;
+ if (i < 1)
+ i = 1;
+ pwd2 = getcwd (NULL, len + 1);
+ ASSERT (pwd2);
+ free (pwd2);
+ pwd2 = malloc (len + 2);
+ for ( ; i <= len; i++)
+ {
+ char *tmp;
+ errno = 0;
+ ASSERT (getcwd (pwd2, i) == NULL);
+ ASSERT (errno == ERANGE);
+ /* Allow either glibc or BSD behavior, since POSIX allows both. */
+ errno = 0;
+ tmp = getcwd (NULL, i);
+ if (tmp)
+ {
+ ASSERT (strcmp (pwd1, tmp) == 0);
+ free (tmp);
+ }
+ else
+ {
+ ASSERT (errno == ERANGE);
+ }
+ }
+ ASSERT (getcwd (pwd2, len + 1) == pwd2);
+ pwd2[len] = '/';
+ pwd2[len + 1] = '\0';
+ }
+ ASSERT (strstr (pwd2, "/./") == NULL);
+ ASSERT (strstr (pwd2, "/../") == NULL);
+ ASSERT (strstr (pwd2 + 1 + (pwd2[1] == '/'), "//") == NULL);
+
+ /* Validate a POSIX requirement on size. */
+ errno = 0;
+ ASSERT (getcwd(pwd2, 0) == NULL);
+ ASSERT (errno == EINVAL);
+
+ free (pwd1);
+ free (pwd2);
+
+ return 0;
+}
diff --git a/gnulib-tests/test-getdelim.c b/gnulib-tests/test-getdelim.c
new file mode 100644
index 0000000..0770d5b
--- /dev/null
+++ b/gnulib-tests/test-getdelim.c
@@ -0,0 +1,94 @@
+/* Test of getdelim() function.
+ Copyright (C) 2007-2016 Free Software Foundation, Inc.
+
+ This 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 <http://www.gnu.org/licenses/>. */
+
+/* Written by Eric Blake <ebb9@byu.net>, 2007. */
+
+#include <config.h>
+
+#include <stdio.h>
+
+#include "signature.h"
+SIGNATURE_CHECK (getdelim, ssize_t, (char **, size_t *, int, FILE *));
+
+#include <stdlib.h>
+#include <string.h>
+
+#include "macros.h"
+
+int
+main (void)
+{
+ FILE *f;
+ char *line;
+ size_t len;
+ ssize_t result;
+
+ /* Create test file. */
+ f = fopen ("test-getdelim.txt", "wb");
+ if (!f || fwrite ("anAnbcnd\0f", 1, 10, f) != 10 || fclose (f) != 0)
+ {
+ fputs ("Failed to create sample file.\n", stderr);
+ remove ("test-getdelim.txt");
+ return 1;
+ }
+ f = fopen ("test-getdelim.txt", "rb");
+ if (!f)
+ {
+ fputs ("Failed to reopen sample file.\n", stderr);
+ remove ("test-getdelim.txt");
+ return 1;
+ }
+
+ /* Test initial allocation, which must include trailing NUL. */
+ line = NULL;
+ len = 0;
+ result = getdelim (&line, &len, 'n', f);
+ ASSERT (result == 2);
+ ASSERT (strcmp (line, "an") == 0);
+ ASSERT (2 < len);
+ free (line);
+
+ /* Test initial allocation again, with line = NULL and len != 0. */
+ line = NULL;
+ len = (size_t)(~0) / 4;
+ result = getdelim (&line, &len, 'n', f);
+ ASSERT (result == 2);
+ ASSERT (strcmp (line, "An") == 0);
+ ASSERT (2 < len);
+ free (line);
+
+ /* Test growth of buffer. */
+ line = malloc (1);
+ len = 1;
+ result = getdelim (&line, &len, 'n', f);
+ ASSERT (result == 3);
+ ASSERT (strcmp (line, "bcn") == 0);
+ ASSERT (3 < len);
+
+ /* Test embedded NULs and EOF behavior. */
+ result = getdelim (&line, &len, 'n', f);
+ ASSERT (result == 3);
+ ASSERT (memcmp (line, "d\0f", 4) == 0);
+ ASSERT (3 < len);
+
+ result = getdelim (&line, &len, 'n', f);
+ ASSERT (result == -1);
+
+ free (line);
+ fclose (f);
+ remove ("test-getdelim.txt");
+ return 0;
+}
diff --git a/gnulib-tests/test-getdtablesize.c b/gnulib-tests/test-getdtablesize.c
new file mode 100644
index 0000000..54efa04
--- /dev/null
+++ b/gnulib-tests/test-getdtablesize.c
@@ -0,0 +1,36 @@
+/* Test of getdtablesize() function.
+ Copyright (C) 2008-2016 Free Software Foundation, Inc.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+/* Written by Bruno Haible <bruno@clisp.org>, 2008. */
+
+#include <config.h>
+
+#include <unistd.h>
+
+#include "signature.h"
+SIGNATURE_CHECK (getdtablesize, int, (void));
+
+#include "macros.h"
+
+int
+main (int argc, char *argv[])
+{
+ ASSERT (getdtablesize () >= 3);
+ ASSERT (dup2 (0, getdtablesize() - 1) == getdtablesize () - 1);
+ ASSERT (dup2 (0, getdtablesize()) == -1);
+
+ return 0;
+}
diff --git a/gnulib-tests/test-getopt-gnu.c b/gnulib-tests/test-getopt-gnu.c
new file mode 100644
index 0000000..2d9a4bd
--- /dev/null
+++ b/gnulib-tests/test-getopt-gnu.c
@@ -0,0 +1,45 @@
+/* Test of command line argument processing.
+ Copyright (C) 2009-2016 Free Software Foundation, Inc.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+/* Written by Bruno Haible <bruno@clisp.org>, 2009. */
+
+#include <config.h>
+
+/* None of the files accessed by this test are large, so disable the
+ ftell link warning if we are not using the gnulib ftell module. */
+#define _GL_NO_LARGE_FILES
+
+/* POSIX and glibc provide the getopt() function in <unistd.h>, see
+ http://pubs.opengroup.org/onlinepubs/9699919799/functions/getopt.html
+ https://www.gnu.org/software/libc/manual/html_node/Using-Getopt.html
+ But gnulib provides the getopt() function in <getopt.h>, not in <unistd.h>.
+ This is what we are testing here. */
+#include <getopt.h>
+
+#ifndef __getopt_argv_const
+# define __getopt_argv_const const
+#endif
+#include "signature.h"
+SIGNATURE_CHECK (getopt_long, int, (int, char *__getopt_argv_const *,
+ char const *, struct option const *,
+ int *));
+SIGNATURE_CHECK (getopt_long_only, int, (int, char *__getopt_argv_const *,
+ char const *, struct option const *,
+ int *));
+
+#define TEST_GETOPT_GNU 1
+#define TEST_GETOPT_TMP_NAME "test-getopt-gnu.tmp"
+#include "test-getopt-main.h"
diff --git a/gnulib-tests/test-getopt-main.h b/gnulib-tests/test-getopt-main.h
new file mode 100644
index 0000000..aef74f5
--- /dev/null
+++ b/gnulib-tests/test-getopt-main.h
@@ -0,0 +1,76 @@
+/* Test of command line argument processing.
+ Copyright (C) 2009-2016 Free Software Foundation, Inc.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+/* Written by Bruno Haible <bruno@clisp.org>, 2009. */
+
+#include "signature.h"
+SIGNATURE_CHECK (getopt, int, (int, char * const[], char const *));
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <unistd.h>
+
+/* This test intentionally remaps stderr. So, we arrange to have fd 10
+ (outside the range of interesting fd's during the test) set up to
+ duplicate the original stderr. */
+
+#define BACKUP_STDERR_FILENO 10
+#define ASSERT_STREAM myerr
+#include "macros.h"
+
+static FILE *myerr;
+
+#include "test-getopt.h"
+#if TEST_GETOPT_GNU
+# include "test-getopt_long.h"
+#endif
+
+int
+main (void)
+{
+ /* This test validates that stderr is used correctly, so move the
+ original into fd 10. */
+ if (dup2 (STDERR_FILENO, BACKUP_STDERR_FILENO) != BACKUP_STDERR_FILENO
+ || (myerr = fdopen (BACKUP_STDERR_FILENO, "w")) == NULL)
+ return 2;
+
+ ASSERT (freopen (TEST_GETOPT_TMP_NAME, "w", stderr) == stderr);
+
+ /* These default values are required by POSIX. */
+ ASSERT (optind == 1);
+ ASSERT (opterr != 0);
+
+ setenv ("POSIXLY_CORRECT", "1", 1);
+ test_getopt ();
+
+#if TEST_GETOPT_GNU
+ test_getopt_long_posix ();
+#endif
+
+ unsetenv ("POSIXLY_CORRECT");
+ test_getopt ();
+
+#if TEST_GETOPT_GNU
+ test_getopt_long ();
+ test_getopt_long_only ();
+#endif
+
+ ASSERT (fclose (stderr) == 0);
+ ASSERT (remove (TEST_GETOPT_TMP_NAME) == 0);
+
+ return 0;
+}
diff --git a/gnulib-tests/test-getopt-posix.c b/gnulib-tests/test-getopt-posix.c
new file mode 100644
index 0000000..5532271
--- /dev/null
+++ b/gnulib-tests/test-getopt-posix.c
@@ -0,0 +1,34 @@
+/* Test of command line argument processing.
+ Copyright (C) 2009-2016 Free Software Foundation, Inc.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+/* Written by Bruno Haible <bruno@clisp.org>, 2009. */
+
+#include <config.h>
+
+/* None of the files accessed by this test are large, so disable the
+ ftell link warning if we are not using the gnulib ftell module. */
+#define _GL_NO_LARGE_FILES
+
+/* POSIX and glibc provide the getopt() function in <unistd.h>, see
+ http://pubs.opengroup.org/onlinepubs/9699919799/functions/getopt.html
+ https://www.gnu.org/software/libc/manual/html_node/Using-Getopt.html
+ But gnulib provides the getopt() function in <getopt.h>, not in <unistd.h>.
+ Nevertheless the getopt() function should also be found in <unistd.h>. */
+#include <unistd.h>
+
+#define TEST_GETOPT_GNU 0
+#define TEST_GETOPT_TMP_NAME "test-getopt-posix.tmp"
+#include "test-getopt-main.h"
diff --git a/gnulib-tests/test-getopt.h b/gnulib-tests/test-getopt.h
new file mode 100644
index 0000000..8e61eb2
--- /dev/null
+++ b/gnulib-tests/test-getopt.h
@@ -0,0 +1,1391 @@
+/* Test of command line argument processing.
+ Copyright (C) 2009-2016 Free Software Foundation, Inc.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+/* Written by Bruno Haible <bruno@clisp.org>, 2009. */
+
+#include <stdbool.h>
+
+/* The glibc/gnulib implementation of getopt supports setting optind =
+ 0, but not all other implementations do. This matters for getopt.
+ But for getopt_long, we require GNU compatibility. */
+#if defined __GETOPT_PREFIX || (__GLIBC__ >= 2 && !defined __UCLIBC__)
+# define OPTIND_MIN 0
+#elif HAVE_DECL_OPTRESET
+# define OPTIND_MIN (optreset = 1)
+#else
+# define OPTIND_MIN 1
+#endif
+
+static void
+getopt_loop (int argc, const char **argv,
+ const char *options,
+ int *a_seen, int *b_seen,
+ const char **p_value, const char **q_value,
+ int *non_options_count, const char **non_options,
+ int *unrecognized, bool *message_issued)
+{
+ int c;
+ int pos = ftell (stderr);
+
+ while ((c = getopt (argc, (char **) argv, options)) != -1)
+ {
+ switch (c)
+ {
+ case 'a':
+ (*a_seen)++;
+ break;
+ case 'b':
+ (*b_seen)++;
+ break;
+ case 'p':
+ *p_value = optarg;
+ break;
+ case 'q':
+ *q_value = optarg;
+ break;
+ case '\1':
+ /* Must only happen with option '-' at the beginning. */
+ ASSERT (options[0] == '-');
+ non_options[(*non_options_count)++] = optarg;
+ break;
+ case ':':
+ /* Must only happen with option ':' at the beginning. */
+ ASSERT (options[0] == ':'
+ || ((options[0] == '-' || options[0] == '+')
+ && options[1] == ':'));
+ /* fall through */
+ case '?':
+ *unrecognized = optopt;
+ break;
+ default:
+ *unrecognized = c;
+ break;
+ }
+ }
+
+ *message_issued = pos < ftell (stderr);
+}
+
+static void
+test_getopt (void)
+{
+ int start;
+ bool posixly = !!getenv ("POSIXLY_CORRECT");
+ /* See comment in getopt.c:
+ glibc gets a LSB-compliant getopt.
+ Standalone applications get a POSIX-compliant getopt. */
+#if defined __GETOPT_PREFIX || !(__GLIBC__ >= 2 || defined __MINGW32__)
+ /* Using getopt from gnulib or from a non-glibc system. */
+ posixly = true;
+#endif
+
+ /* Test processing of boolean options. */
+ for (start = OPTIND_MIN; start <= 1; start++)
+ {
+ int a_seen = 0;
+ int b_seen = 0;
+ const char *p_value = NULL;
+ const char *q_value = NULL;
+ int non_options_count = 0;
+ const char *non_options[10];
+ int unrecognized = 0;
+ bool output;
+ int argc = 0;
+ const char *argv[10];
+
+ argv[argc++] = "program";
+ argv[argc++] = "-a";
+ argv[argc++] = "foo";
+ argv[argc++] = "bar";
+ argv[argc] = NULL;
+ optind = start;
+ opterr = 1;
+ getopt_loop (argc, argv, "ab",
+ &a_seen, &b_seen, &p_value, &q_value,
+ &non_options_count, non_options, &unrecognized, &output);
+ ASSERT (a_seen == 1);
+ ASSERT (b_seen == 0);
+ ASSERT (p_value == NULL);
+ ASSERT (q_value == NULL);
+ ASSERT (non_options_count == 0);
+ ASSERT (unrecognized == 0);
+ ASSERT (optind == 2);
+ ASSERT (!output);
+ }
+ for (start = OPTIND_MIN; start <= 1; start++)
+ {
+ int a_seen = 0;
+ int b_seen = 0;
+ const char *p_value = NULL;
+ const char *q_value = NULL;
+ int non_options_count = 0;
+ const char *non_options[10];
+ int unrecognized = 0;
+ bool output;
+ int argc = 0;
+ const char *argv[10];
+
+ argv[argc++] = "program";
+ argv[argc++] = "-b";
+ argv[argc++] = "-a";
+ argv[argc++] = "foo";
+ argv[argc++] = "bar";
+ argv[argc] = NULL;
+ optind = start;
+ opterr = 1;
+ getopt_loop (argc, argv, "ab",
+ &a_seen, &b_seen, &p_value, &q_value,
+ &non_options_count, non_options, &unrecognized, &output);
+ ASSERT (a_seen == 1);
+ ASSERT (b_seen == 1);
+ ASSERT (p_value == NULL);
+ ASSERT (q_value == NULL);
+ ASSERT (non_options_count == 0);
+ ASSERT (unrecognized == 0);
+ ASSERT (optind == 3);
+ ASSERT (!output);
+ }
+ for (start = OPTIND_MIN; start <= 1; start++)
+ {
+ int a_seen = 0;
+ int b_seen = 0;
+ const char *p_value = NULL;
+ const char *q_value = NULL;
+ int non_options_count = 0;
+ const char *non_options[10];
+ int unrecognized = 0;
+ bool output;
+ int argc = 0;
+ const char *argv[10];
+
+ argv[argc++] = "program";
+ argv[argc++] = "-ba";
+ argv[argc++] = "foo";
+ argv[argc++] = "bar";
+ argv[argc] = NULL;
+ optind = start;
+ opterr = 1;
+ getopt_loop (argc, argv, "ab",
+ &a_seen, &b_seen, &p_value, &q_value,
+ &non_options_count, non_options, &unrecognized, &output);
+ ASSERT (a_seen == 1);
+ ASSERT (b_seen == 1);
+ ASSERT (p_value == NULL);
+ ASSERT (q_value == NULL);
+ ASSERT (non_options_count == 0);
+ ASSERT (unrecognized == 0);
+ ASSERT (optind == 2);
+ ASSERT (!output);
+ }
+ for (start = OPTIND_MIN; start <= 1; start++)
+ {
+ int a_seen = 0;
+ int b_seen = 0;
+ const char *p_value = NULL;
+ const char *q_value = NULL;
+ int non_options_count = 0;
+ const char *non_options[10];
+ int unrecognized = 0;
+ bool output;
+ int argc = 0;
+ const char *argv[10];
+
+ argv[argc++] = "program";
+ argv[argc++] = "-ab";
+ argv[argc++] = "-a";
+ argv[argc++] = "foo";
+ argv[argc++] = "bar";
+ argv[argc] = NULL;
+ optind = start;
+ opterr = 1;
+ getopt_loop (argc, argv, "ab",
+ &a_seen, &b_seen, &p_value, &q_value,
+ &non_options_count, non_options, &unrecognized, &output);
+ ASSERT (a_seen == 2);
+ ASSERT (b_seen == 1);
+ ASSERT (p_value == NULL);
+ ASSERT (q_value == NULL);
+ ASSERT (non_options_count == 0);
+ ASSERT (unrecognized == 0);
+ ASSERT (optind == 3);
+ ASSERT (!output);
+ }
+
+ /* Test processing of options with arguments. */
+ for (start = OPTIND_MIN; start <= 1; start++)
+ {
+ int a_seen = 0;
+ int b_seen = 0;
+ const char *p_value = NULL;
+ const char *q_value = NULL;
+ int non_options_count = 0;
+ const char *non_options[10];
+ int unrecognized = 0;
+ bool output;
+ int argc = 0;
+ const char *argv[10];
+
+ argv[argc++] = "program";
+ argv[argc++] = "-pfoo";
+ argv[argc++] = "bar";
+ argv[argc] = NULL;
+ optind = start;
+ opterr = 1;
+ getopt_loop (argc, argv, "p:q:",
+ &a_seen, &b_seen, &p_value, &q_value,
+ &non_options_count, non_options, &unrecognized, &output);
+ ASSERT (a_seen == 0);
+ ASSERT (b_seen == 0);
+ ASSERT (p_value != NULL && strcmp (p_value, "foo") == 0);
+ ASSERT (q_value == NULL);
+ ASSERT (non_options_count == 0);
+ ASSERT (unrecognized == 0);
+ ASSERT (optind == 2);
+ ASSERT (!output);
+ }
+ for (start = OPTIND_MIN; start <= 1; start++)
+ {
+ int a_seen = 0;
+ int b_seen = 0;
+ const char *p_value = NULL;
+ const char *q_value = NULL;
+ int non_options_count = 0;
+ const char *non_options[10];
+ int unrecognized = 0;
+ bool output;
+ int argc = 0;
+ const char *argv[10];
+
+ argv[argc++] = "program";
+ argv[argc++] = "-p";
+ argv[argc++] = "foo";
+ argv[argc++] = "bar";
+ argv[argc] = NULL;
+ optind = start;
+ opterr = 1;
+ getopt_loop (argc, argv, "p:q:",
+ &a_seen, &b_seen, &p_value, &q_value,
+ &non_options_count, non_options, &unrecognized, &output);
+ ASSERT (a_seen == 0);
+ ASSERT (b_seen == 0);
+ ASSERT (p_value != NULL && strcmp (p_value, "foo") == 0);
+ ASSERT (q_value == NULL);
+ ASSERT (non_options_count == 0);
+ ASSERT (unrecognized == 0);
+ ASSERT (optind == 3);
+ ASSERT (!output);
+ }
+ for (start = OPTIND_MIN; start <= 1; start++)
+ {
+ int a_seen = 0;
+ int b_seen = 0;
+ const char *p_value = NULL;
+ const char *q_value = NULL;
+ int non_options_count = 0;
+ const char *non_options[10];
+ int unrecognized = 0;
+ bool output;
+ int argc = 0;
+ const char *argv[10];
+
+ argv[argc++] = "program";
+ argv[argc++] = "-ab";
+ argv[argc++] = "-q";
+ argv[argc++] = "baz";
+ argv[argc++] = "-pfoo";
+ argv[argc++] = "bar";
+ argv[argc] = NULL;
+ optind = start;
+ opterr = 1;
+ getopt_loop (argc, argv, "abp:q:",
+ &a_seen, &b_seen, &p_value, &q_value,
+ &non_options_count, non_options, &unrecognized, &output);
+ ASSERT (a_seen == 1);
+ ASSERT (b_seen == 1);
+ ASSERT (p_value != NULL && strcmp (p_value, "foo") == 0);
+ ASSERT (q_value != NULL && strcmp (q_value, "baz") == 0);
+ ASSERT (non_options_count == 0);
+ ASSERT (unrecognized == 0);
+ ASSERT (optind == 5);
+ ASSERT (!output);
+ }
+
+#if GNULIB_TEST_GETOPT_GNU
+ /* Test processing of options with optional arguments. */
+ for (start = OPTIND_MIN; start <= 1; start++)
+ {
+ int a_seen = 0;
+ int b_seen = 0;
+ const char *p_value = NULL;
+ const char *q_value = NULL;
+ int non_options_count = 0;
+ const char *non_options[10];
+ int unrecognized = 0;
+ bool output;
+ int argc = 0;
+ const char *argv[10];
+
+ argv[argc++] = "program";
+ argv[argc++] = "-pfoo";
+ argv[argc++] = "bar";
+ argv[argc] = NULL;
+ optind = start;
+ opterr = 1;
+ getopt_loop (argc, argv, "p::q::",
+ &a_seen, &b_seen, &p_value, &q_value,
+ &non_options_count, non_options, &unrecognized, &output);
+ ASSERT (a_seen == 0);
+ ASSERT (b_seen == 0);
+ ASSERT (p_value != NULL && strcmp (p_value, "foo") == 0);
+ ASSERT (q_value == NULL);
+ ASSERT (non_options_count == 0);
+ ASSERT (unrecognized == 0);
+ ASSERT (optind == 2);
+ ASSERT (!output);
+ }
+ for (start = OPTIND_MIN; start <= 1; start++)
+ {
+ int a_seen = 0;
+ int b_seen = 0;
+ const char *p_value = NULL;
+ const char *q_value = NULL;
+ int non_options_count = 0;
+ const char *non_options[10];
+ int unrecognized = 0;
+ bool output;
+ int argc = 0;
+ const char *argv[10];
+
+ argv[argc++] = "program";
+ argv[argc++] = "-p";
+ argv[argc++] = "foo";
+ argv[argc++] = "bar";
+ argv[argc] = NULL;
+ optind = start;
+ opterr = 1;
+ getopt_loop (argc, argv, "p::q::",
+ &a_seen, &b_seen, &p_value, &q_value,
+ &non_options_count, non_options, &unrecognized, &output);
+ ASSERT (a_seen == 0);
+ ASSERT (b_seen == 0);
+ ASSERT (p_value == NULL);
+ ASSERT (q_value == NULL);
+ ASSERT (non_options_count == 0);
+ ASSERT (unrecognized == 0);
+ ASSERT (optind == 2);
+ ASSERT (!output);
+ }
+ for (start = OPTIND_MIN; start <= 1; start++)
+ {
+ int a_seen = 0;
+ int b_seen = 0;
+ const char *p_value = NULL;
+ const char *q_value = NULL;
+ int non_options_count = 0;
+ const char *non_options[10];
+ int unrecognized = 0;
+ bool output;
+ int argc = 0;
+ const char *argv[10];
+
+ argv[argc++] = "program";
+ argv[argc++] = "-p";
+ argv[argc++] = "-a";
+ argv[argc++] = "bar";
+ argv[argc] = NULL;
+ optind = start;
+ opterr = 1;
+ getopt_loop (argc, argv, "abp::q::",
+ &a_seen, &b_seen, &p_value, &q_value,
+ &non_options_count, non_options, &unrecognized, &output);
+ ASSERT (a_seen == 1);
+ ASSERT (b_seen == 0);
+ ASSERT (p_value == NULL);
+ ASSERT (q_value == NULL);
+ ASSERT (non_options_count == 0);
+ ASSERT (unrecognized == 0);
+ ASSERT (optind == 3);
+ ASSERT (!output);
+ }
+#endif /* GNULIB_TEST_GETOPT_GNU */
+
+ /* Check that invalid options are recognized; and that both opterr
+ and leading ':' can silence output. */
+ for (start = OPTIND_MIN; start <= 1; start++)
+ {
+ int a_seen = 0;
+ int b_seen = 0;
+ const char *p_value = NULL;
+ const char *q_value = NULL;
+ int non_options_count = 0;
+ const char *non_options[10];
+ int unrecognized = 0;
+ bool output;
+ int argc = 0;
+ const char *argv[10];
+
+ argv[argc++] = "program";
+ argv[argc++] = "-p";
+ argv[argc++] = "foo";
+ argv[argc++] = "-x";
+ argv[argc++] = "-a";
+ argv[argc++] = "bar";
+ argv[argc] = NULL;
+ optind = start;
+ opterr = 42;
+ getopt_loop (argc, argv, "abp:q:",
+ &a_seen, &b_seen, &p_value, &q_value,
+ &non_options_count, non_options, &unrecognized, &output);
+ ASSERT (a_seen == 1);
+ ASSERT (b_seen == 0);
+ ASSERT (p_value != NULL && strcmp (p_value, "foo") == 0);
+ ASSERT (q_value == NULL);
+ ASSERT (non_options_count == 0);
+ ASSERT (unrecognized == 'x');
+ ASSERT (optind == 5);
+ ASSERT (output);
+ }
+ for (start = OPTIND_MIN; start <= 1; start++)
+ {
+ int a_seen = 0;
+ int b_seen = 0;
+ const char *p_value = NULL;
+ const char *q_value = NULL;
+ int non_options_count = 0;
+ const char *non_options[10];
+ int unrecognized = 0;
+ bool output;
+ int argc = 0;
+ const char *argv[10];
+
+ argv[argc++] = "program";
+ argv[argc++] = "-p";
+ argv[argc++] = "foo";
+ argv[argc++] = "-x";
+ argv[argc++] = "-a";
+ argv[argc++] = "bar";
+ argv[argc] = NULL;
+ optind = start;
+ opterr = 0;
+ getopt_loop (argc, argv, "abp:q:",
+ &a_seen, &b_seen, &p_value, &q_value,
+ &non_options_count, non_options, &unrecognized, &output);
+ ASSERT (a_seen == 1);
+ ASSERT (b_seen == 0);
+ ASSERT (p_value != NULL && strcmp (p_value, "foo") == 0);
+ ASSERT (q_value == NULL);
+ ASSERT (non_options_count == 0);
+ ASSERT (unrecognized == 'x');
+ ASSERT (optind == 5);
+ ASSERT (!output);
+ }
+ for (start = OPTIND_MIN; start <= 1; start++)
+ {
+ int a_seen = 0;
+ int b_seen = 0;
+ const char *p_value = NULL;
+ const char *q_value = NULL;
+ int non_options_count = 0;
+ const char *non_options[10];
+ int unrecognized = 0;
+ bool output;
+ int argc = 0;
+ const char *argv[10];
+
+ argv[argc++] = "program";
+ argv[argc++] = "-p";
+ argv[argc++] = "foo";
+ argv[argc++] = "-x";
+ argv[argc++] = "-a";
+ argv[argc++] = "bar";
+ argv[argc] = NULL;
+ optind = start;
+ opterr = 1;
+ getopt_loop (argc, argv, ":abp:q:",
+ &a_seen, &b_seen, &p_value, &q_value,
+ &non_options_count, non_options, &unrecognized, &output);
+ ASSERT (a_seen == 1);
+ ASSERT (b_seen == 0);
+ ASSERT (p_value != NULL && strcmp (p_value, "foo") == 0);
+ ASSERT (q_value == NULL);
+ ASSERT (non_options_count == 0);
+ ASSERT (unrecognized == 'x');
+ ASSERT (optind == 5);
+ ASSERT (!output);
+ }
+ for (start = OPTIND_MIN; start <= 1; start++)
+ {
+ int a_seen = 0;
+ int b_seen = 0;
+ const char *p_value = NULL;
+ const char *q_value = NULL;
+ int non_options_count = 0;
+ const char *non_options[10];
+ int unrecognized = 0;
+ bool output;
+ int argc = 0;
+ const char *argv[10];
+
+ argv[argc++] = "program";
+ argv[argc++] = "-p";
+ argv[argc++] = "foo";
+ argv[argc++] = "-:";
+ argv[argc++] = "-a";
+ argv[argc++] = "bar";
+ argv[argc] = NULL;
+ optind = start;
+ opterr = 42;
+ getopt_loop (argc, argv, "abp:q:",
+ &a_seen, &b_seen, &p_value, &q_value,
+ &non_options_count, non_options, &unrecognized, &output);
+ ASSERT (a_seen == 1);
+ ASSERT (b_seen == 0);
+ ASSERT (p_value != NULL && strcmp (p_value, "foo") == 0);
+ ASSERT (q_value == NULL);
+ ASSERT (non_options_count == 0);
+ ASSERT (unrecognized == ':');
+ ASSERT (optind == 5);
+ ASSERT (output);
+ }
+ for (start = OPTIND_MIN; start <= 1; start++)
+ {
+ int a_seen = 0;
+ int b_seen = 0;
+ const char *p_value = NULL;
+ const char *q_value = NULL;
+ int non_options_count = 0;
+ const char *non_options[10];
+ int unrecognized = 0;
+ bool output;
+ int argc = 0;
+ const char *argv[10];
+
+ argv[argc++] = "program";
+ argv[argc++] = "-p";
+ argv[argc++] = "foo";
+ argv[argc++] = "-:";
+ argv[argc++] = "-a";
+ argv[argc++] = "bar";
+ argv[argc] = NULL;
+ optind = start;
+ opterr = 0;
+ getopt_loop (argc, argv, "abp:q:",
+ &a_seen, &b_seen, &p_value, &q_value,
+ &non_options_count, non_options, &unrecognized, &output);
+ ASSERT (a_seen == 1);
+ ASSERT (b_seen == 0);
+ ASSERT (p_value != NULL && strcmp (p_value, "foo") == 0);
+ ASSERT (q_value == NULL);
+ ASSERT (non_options_count == 0);
+ ASSERT (unrecognized == ':');
+ ASSERT (optind == 5);
+ ASSERT (!output);
+ }
+ for (start = OPTIND_MIN; start <= 1; start++)
+ {
+ int a_seen = 0;
+ int b_seen = 0;
+ const char *p_value = NULL;
+ const char *q_value = NULL;
+ int non_options_count = 0;
+ const char *non_options[10];
+ int unrecognized = 0;
+ bool output;
+ int argc = 0;
+ const char *argv[10];
+
+ argv[argc++] = "program";
+ argv[argc++] = "-p";
+ argv[argc++] = "foo";
+ argv[argc++] = "-:";
+ argv[argc++] = "-a";
+ argv[argc++] = "bar";
+ argv[argc] = NULL;
+ optind = start;
+ opterr = 1;
+ getopt_loop (argc, argv, ":abp:q:",
+ &a_seen, &b_seen, &p_value, &q_value,
+ &non_options_count, non_options, &unrecognized, &output);
+ ASSERT (a_seen == 1);
+ ASSERT (b_seen == 0);
+ ASSERT (p_value != NULL && strcmp (p_value, "foo") == 0);
+ ASSERT (q_value == NULL);
+ ASSERT (non_options_count == 0);
+ ASSERT (unrecognized == ':');
+ ASSERT (optind == 5);
+ ASSERT (!output);
+ }
+
+ /* Check for missing argument behavior. */
+ for (start = OPTIND_MIN; start <= 1; start++)
+ {
+ int a_seen = 0;
+ int b_seen = 0;
+ const char *p_value = NULL;
+ const char *q_value = NULL;
+ int non_options_count = 0;
+ const char *non_options[10];
+ int unrecognized = 0;
+ bool output;
+ int argc = 0;
+ const char *argv[10];
+
+ argv[argc++] = "program";
+ argv[argc++] = "-ap";
+ argv[argc] = NULL;
+ optind = start;
+ opterr = 1;
+ getopt_loop (argc, argv, "abp:q:",
+ &a_seen, &b_seen, &p_value, &q_value,
+ &non_options_count, non_options, &unrecognized, &output);
+ ASSERT (a_seen == 1);
+ ASSERT (b_seen == 0);
+ ASSERT (p_value == NULL);
+ ASSERT (q_value == NULL);
+ ASSERT (non_options_count == 0);
+ ASSERT (unrecognized == 'p');
+ ASSERT (optind == 2);
+ ASSERT (output);
+ }
+ for (start = OPTIND_MIN; start <= 1; start++)
+ {
+ int a_seen = 0;
+ int b_seen = 0;
+ const char *p_value = NULL;
+ const char *q_value = NULL;
+ int non_options_count = 0;
+ const char *non_options[10];
+ int unrecognized = 0;
+ bool output;
+ int argc = 0;
+ const char *argv[10];
+
+ argv[argc++] = "program";
+ argv[argc++] = "-ap";
+ argv[argc] = NULL;
+ optind = start;
+ opterr = 0;
+ getopt_loop (argc, argv, "abp:q:",
+ &a_seen, &b_seen, &p_value, &q_value,
+ &non_options_count, non_options, &unrecognized, &output);
+ ASSERT (a_seen == 1);
+ ASSERT (b_seen == 0);
+ ASSERT (p_value == NULL);
+ ASSERT (q_value == NULL);
+ ASSERT (non_options_count == 0);
+ ASSERT (unrecognized == 'p');
+ ASSERT (optind == 2);
+ ASSERT (!output);
+ }
+ for (start = OPTIND_MIN; start <= 1; start++)
+ {
+ int a_seen = 0;
+ int b_seen = 0;
+ const char *p_value = NULL;
+ const char *q_value = NULL;
+ int non_options_count = 0;
+ const char *non_options[10];
+ int unrecognized = 0;
+ bool output;
+ int argc = 0;
+ const char *argv[10];
+
+ argv[argc++] = "program";
+ argv[argc++] = "-ap";
+ argv[argc] = NULL;
+ optind = start;
+ opterr = 1;
+ getopt_loop (argc, argv, ":abp:q:",
+ &a_seen, &b_seen, &p_value, &q_value,
+ &non_options_count, non_options, &unrecognized, &output);
+ ASSERT (a_seen == 1);
+ ASSERT (b_seen == 0);
+ ASSERT (p_value == NULL);
+ ASSERT (q_value == NULL);
+ ASSERT (non_options_count == 0);
+ ASSERT (unrecognized == 'p');
+ ASSERT (optind == 2);
+ ASSERT (!output);
+ }
+
+ /* Check that by default, non-options arguments are moved to the end. */
+ for (start = OPTIND_MIN; start <= 1; start++)
+ {
+ int a_seen = 0;
+ int b_seen = 0;
+ const char *p_value = NULL;
+ const char *q_value = NULL;
+ int non_options_count = 0;
+ const char *non_options[10];
+ int unrecognized = 0;
+ bool output;
+ int argc = 0;
+ const char *argv[10];
+
+ argv[argc++] = "program";
+ argv[argc++] = "donald";
+ argv[argc++] = "-p";
+ argv[argc++] = "billy";
+ argv[argc++] = "duck";
+ argv[argc++] = "-a";
+ argv[argc++] = "bar";
+ argv[argc] = NULL;
+ optind = start;
+ opterr = 1;
+ getopt_loop (argc, argv, "abp:q:",
+ &a_seen, &b_seen, &p_value, &q_value,
+ &non_options_count, non_options, &unrecognized, &output);
+ if (posixly)
+ {
+ ASSERT (strcmp (argv[0], "program") == 0);
+ ASSERT (strcmp (argv[1], "donald") == 0);
+ ASSERT (strcmp (argv[2], "-p") == 0);
+ ASSERT (strcmp (argv[3], "billy") == 0);
+ ASSERT (strcmp (argv[4], "duck") == 0);
+ ASSERT (strcmp (argv[5], "-a") == 0);
+ ASSERT (strcmp (argv[6], "bar") == 0);
+ ASSERT (argv[7] == NULL);
+ ASSERT (a_seen == 0);
+ ASSERT (b_seen == 0);
+ ASSERT (p_value == NULL);
+ ASSERT (q_value == NULL);
+ ASSERT (non_options_count == 0);
+ ASSERT (unrecognized == 0);
+ ASSERT (optind == 1);
+ ASSERT (!output);
+ }
+ else
+ {
+ ASSERT (strcmp (argv[0], "program") == 0);
+ ASSERT (strcmp (argv[1], "-p") == 0);
+ ASSERT (strcmp (argv[2], "billy") == 0);
+ ASSERT (strcmp (argv[3], "-a") == 0);
+ ASSERT (strcmp (argv[4], "donald") == 0);
+ ASSERT (strcmp (argv[5], "duck") == 0);
+ ASSERT (strcmp (argv[6], "bar") == 0);
+ ASSERT (argv[7] == NULL);
+ ASSERT (a_seen == 1);
+ ASSERT (b_seen == 0);
+ ASSERT (p_value != NULL && strcmp (p_value, "billy") == 0);
+ ASSERT (q_value == NULL);
+ ASSERT (non_options_count == 0);
+ ASSERT (unrecognized == 0);
+ ASSERT (optind == 4);
+ ASSERT (!output);
+ }
+ }
+
+ /* Check that '--' ends the argument processing. */
+ for (start = OPTIND_MIN; start <= 1; start++)
+ {
+ int a_seen = 0;
+ int b_seen = 0;
+ const char *p_value = NULL;
+ const char *q_value = NULL;
+ int non_options_count = 0;
+ const char *non_options[10];
+ int unrecognized = 0;
+ bool output;
+ int argc = 0;
+ const char *argv[20];
+
+ argv[argc++] = "program";
+ argv[argc++] = "donald";
+ argv[argc++] = "-p";
+ argv[argc++] = "billy";
+ argv[argc++] = "duck";
+ argv[argc++] = "-a";
+ argv[argc++] = "--";
+ argv[argc++] = "-b";
+ argv[argc++] = "foo";
+ argv[argc++] = "-q";
+ argv[argc++] = "johnny";
+ argv[argc++] = "bar";
+ argv[argc] = NULL;
+ optind = start;
+ opterr = 1;
+ getopt_loop (argc, argv, "abp:q:",
+ &a_seen, &b_seen, &p_value, &q_value,
+ &non_options_count, non_options, &unrecognized, &output);
+ if (posixly)
+ {
+ ASSERT (strcmp (argv[0], "program") == 0);
+ ASSERT (strcmp (argv[1], "donald") == 0);
+ ASSERT (strcmp (argv[2], "-p") == 0);
+ ASSERT (strcmp (argv[3], "billy") == 0);
+ ASSERT (strcmp (argv[4], "duck") == 0);
+ ASSERT (strcmp (argv[5], "-a") == 0);
+ ASSERT (strcmp (argv[6], "--") == 0);
+ ASSERT (strcmp (argv[7], "-b") == 0);
+ ASSERT (strcmp (argv[8], "foo") == 0);
+ ASSERT (strcmp (argv[9], "-q") == 0);
+ ASSERT (strcmp (argv[10], "johnny") == 0);
+ ASSERT (strcmp (argv[11], "bar") == 0);
+ ASSERT (argv[12] == NULL);
+ ASSERT (a_seen == 0);
+ ASSERT (b_seen == 0);
+ ASSERT (p_value == NULL);
+ ASSERT (q_value == NULL);
+ ASSERT (non_options_count == 0);
+ ASSERT (unrecognized == 0);
+ ASSERT (optind == 1);
+ ASSERT (!output);
+ }
+ else
+ {
+ ASSERT (strcmp (argv[0], "program") == 0);
+ ASSERT (strcmp (argv[1], "-p") == 0);
+ ASSERT (strcmp (argv[2], "billy") == 0);
+ ASSERT (strcmp (argv[3], "-a") == 0);
+ ASSERT (strcmp (argv[4], "--") == 0);
+ ASSERT (strcmp (argv[5], "donald") == 0);
+ ASSERT (strcmp (argv[6], "duck") == 0);
+ ASSERT (strcmp (argv[7], "-b") == 0);
+ ASSERT (strcmp (argv[8], "foo") == 0);
+ ASSERT (strcmp (argv[9], "-q") == 0);
+ ASSERT (strcmp (argv[10], "johnny") == 0);
+ ASSERT (strcmp (argv[11], "bar") == 0);
+ ASSERT (argv[12] == NULL);
+ ASSERT (a_seen == 1);
+ ASSERT (b_seen == 0);
+ ASSERT (p_value != NULL && strcmp (p_value, "billy") == 0);
+ ASSERT (q_value == NULL);
+ ASSERT (non_options_count == 0);
+ ASSERT (unrecognized == 0);
+ ASSERT (optind == 5);
+ ASSERT (!output);
+ }
+ }
+
+#if GNULIB_TEST_GETOPT_GNU
+ /* Check that the '-' flag causes non-options to be returned in order. */
+ for (start = OPTIND_MIN; start <= 1; start++)
+ {
+ int a_seen = 0;
+ int b_seen = 0;
+ const char *p_value = NULL;
+ const char *q_value = NULL;
+ int non_options_count = 0;
+ const char *non_options[10];
+ int unrecognized = 0;
+ bool output;
+ int argc = 0;
+ const char *argv[10];
+
+ argv[argc++] = "program";
+ argv[argc++] = "donald";
+ argv[argc++] = "-p";
+ argv[argc++] = "billy";
+ argv[argc++] = "duck";
+ argv[argc++] = "-a";
+ argv[argc++] = "bar";
+ argv[argc] = NULL;
+ optind = start;
+ opterr = 1;
+ getopt_loop (argc, argv, "-abp:q:",
+ &a_seen, &b_seen, &p_value, &q_value,
+ &non_options_count, non_options, &unrecognized, &output);
+ ASSERT (strcmp (argv[0], "program") == 0);
+ ASSERT (strcmp (argv[1], "donald") == 0);
+ ASSERT (strcmp (argv[2], "-p") == 0);
+ ASSERT (strcmp (argv[3], "billy") == 0);
+ ASSERT (strcmp (argv[4], "duck") == 0);
+ ASSERT (strcmp (argv[5], "-a") == 0);
+ ASSERT (strcmp (argv[6], "bar") == 0);
+ ASSERT (argv[7] == NULL);
+ ASSERT (a_seen == 1);
+ ASSERT (b_seen == 0);
+ ASSERT (p_value != NULL && strcmp (p_value, "billy") == 0);
+ ASSERT (q_value == NULL);
+ ASSERT (non_options_count == 3);
+ ASSERT (strcmp (non_options[0], "donald") == 0);
+ ASSERT (strcmp (non_options[1], "duck") == 0);
+ ASSERT (strcmp (non_options[2], "bar") == 0);
+ ASSERT (unrecognized == 0);
+ ASSERT (optind == 7);
+ ASSERT (!output);
+ }
+
+ /* Check that '--' ends the argument processing. */
+ for (start = OPTIND_MIN; start <= 1; start++)
+ {
+ int a_seen = 0;
+ int b_seen = 0;
+ const char *p_value = NULL;
+ const char *q_value = NULL;
+ int non_options_count = 0;
+ const char *non_options[10];
+ int unrecognized = 0;
+ bool output;
+ int argc = 0;
+ const char *argv[20];
+
+ argv[argc++] = "program";
+ argv[argc++] = "donald";
+ argv[argc++] = "-p";
+ argv[argc++] = "billy";
+ argv[argc++] = "duck";
+ argv[argc++] = "-a";
+ argv[argc++] = "--";
+ argv[argc++] = "-b";
+ argv[argc++] = "foo";
+ argv[argc++] = "-q";
+ argv[argc++] = "johnny";
+ argv[argc++] = "bar";
+ argv[argc] = NULL;
+ optind = start;
+ opterr = 1;
+ getopt_loop (argc, argv, "-abp:q:",
+ &a_seen, &b_seen, &p_value, &q_value,
+ &non_options_count, non_options, &unrecognized, &output);
+ ASSERT (strcmp (argv[0], "program") == 0);
+ ASSERT (strcmp (argv[1], "donald") == 0);
+ ASSERT (strcmp (argv[2], "-p") == 0);
+ ASSERT (strcmp (argv[3], "billy") == 0);
+ ASSERT (strcmp (argv[4], "duck") == 0);
+ ASSERT (strcmp (argv[5], "-a") == 0);
+ ASSERT (strcmp (argv[6], "--") == 0);
+ ASSERT (strcmp (argv[7], "-b") == 0);
+ ASSERT (strcmp (argv[8], "foo") == 0);
+ ASSERT (strcmp (argv[9], "-q") == 0);
+ ASSERT (strcmp (argv[10], "johnny") == 0);
+ ASSERT (strcmp (argv[11], "bar") == 0);
+ ASSERT (argv[12] == NULL);
+ ASSERT (a_seen == 1);
+ ASSERT (b_seen == 0);
+ ASSERT (p_value != NULL && strcmp (p_value, "billy") == 0);
+ ASSERT (q_value == NULL);
+ ASSERT (!output);
+ if (non_options_count == 2)
+ {
+ /* glibc behaviour. */
+ ASSERT (non_options_count == 2);
+ ASSERT (strcmp (non_options[0], "donald") == 0);
+ ASSERT (strcmp (non_options[1], "duck") == 0);
+ ASSERT (unrecognized == 0);
+ ASSERT (optind == 7);
+ }
+ else
+ {
+ /* Another valid behaviour. */
+ ASSERT (non_options_count == 7);
+ ASSERT (strcmp (non_options[0], "donald") == 0);
+ ASSERT (strcmp (non_options[1], "duck") == 0);
+ ASSERT (strcmp (non_options[2], "-b") == 0);
+ ASSERT (strcmp (non_options[3], "foo") == 0);
+ ASSERT (strcmp (non_options[4], "-q") == 0);
+ ASSERT (strcmp (non_options[5], "johnny") == 0);
+ ASSERT (strcmp (non_options[6], "bar") == 0);
+ ASSERT (unrecognized == 0);
+ ASSERT (optind == 12);
+ }
+ }
+
+ /* Check that the '-' flag has to come first. */
+ for (start = OPTIND_MIN; start <= 1; start++)
+ {
+ int a_seen = 0;
+ int b_seen = 0;
+ const char *p_value = NULL;
+ const char *q_value = NULL;
+ int non_options_count = 0;
+ const char *non_options[10];
+ int unrecognized = 0;
+ bool output;
+ int argc = 0;
+ const char *argv[10];
+
+ argv[argc++] = "program";
+ argv[argc++] = "donald";
+ argv[argc++] = "-p";
+ argv[argc++] = "billy";
+ argv[argc++] = "duck";
+ argv[argc++] = "-a";
+ argv[argc++] = "bar";
+ argv[argc] = NULL;
+ optind = start;
+ opterr = 1;
+ getopt_loop (argc, argv, "abp:q:-",
+ &a_seen, &b_seen, &p_value, &q_value,
+ &non_options_count, non_options, &unrecognized, &output);
+ if (posixly)
+ {
+ ASSERT (strcmp (argv[0], "program") == 0);
+ ASSERT (strcmp (argv[1], "donald") == 0);
+ ASSERT (strcmp (argv[2], "-p") == 0);
+ ASSERT (strcmp (argv[3], "billy") == 0);
+ ASSERT (strcmp (argv[4], "duck") == 0);
+ ASSERT (strcmp (argv[5], "-a") == 0);
+ ASSERT (strcmp (argv[6], "bar") == 0);
+ ASSERT (argv[7] == NULL);
+ ASSERT (a_seen == 0);
+ ASSERT (b_seen == 0);
+ ASSERT (p_value == NULL);
+ ASSERT (q_value == NULL);
+ ASSERT (non_options_count == 0);
+ ASSERT (unrecognized == 0);
+ ASSERT (optind == 1);
+ ASSERT (!output);
+ }
+ else
+ {
+ ASSERT (strcmp (argv[0], "program") == 0);
+ ASSERT (strcmp (argv[1], "-p") == 0);
+ ASSERT (strcmp (argv[2], "billy") == 0);
+ ASSERT (strcmp (argv[3], "-a") == 0);
+ ASSERT (strcmp (argv[4], "donald") == 0);
+ ASSERT (strcmp (argv[5], "duck") == 0);
+ ASSERT (strcmp (argv[6], "bar") == 0);
+ ASSERT (argv[7] == NULL);
+ ASSERT (a_seen == 1);
+ ASSERT (b_seen == 0);
+ ASSERT (p_value != NULL && strcmp (p_value, "billy") == 0);
+ ASSERT (q_value == NULL);
+ ASSERT (non_options_count == 0);
+ ASSERT (unrecognized == 0);
+ ASSERT (optind == 4);
+ ASSERT (!output);
+ }
+ }
+
+ /* Check that the '+' flag causes the first non-option to terminate the
+ loop. */
+ for (start = OPTIND_MIN; start <= 1; start++)
+ {
+ int a_seen = 0;
+ int b_seen = 0;
+ const char *p_value = NULL;
+ const char *q_value = NULL;
+ int non_options_count = 0;
+ const char *non_options[10];
+ int unrecognized = 0;
+ bool output;
+ int argc = 0;
+ const char *argv[10];
+
+ argv[argc++] = "program";
+ argv[argc++] = "donald";
+ argv[argc++] = "-p";
+ argv[argc++] = "billy";
+ argv[argc++] = "duck";
+ argv[argc++] = "-a";
+ argv[argc++] = "bar";
+ argv[argc] = NULL;
+ optind = start;
+ opterr = 1;
+ getopt_loop (argc, argv, "+abp:q:",
+ &a_seen, &b_seen, &p_value, &q_value,
+ &non_options_count, non_options, &unrecognized, &output);
+ ASSERT (strcmp (argv[0], "program") == 0);
+ ASSERT (strcmp (argv[1], "donald") == 0);
+ ASSERT (strcmp (argv[2], "-p") == 0);
+ ASSERT (strcmp (argv[3], "billy") == 0);
+ ASSERT (strcmp (argv[4], "duck") == 0);
+ ASSERT (strcmp (argv[5], "-a") == 0);
+ ASSERT (strcmp (argv[6], "bar") == 0);
+ ASSERT (argv[7] == NULL);
+ ASSERT (a_seen == 0);
+ ASSERT (b_seen == 0);
+ ASSERT (p_value == NULL);
+ ASSERT (q_value == NULL);
+ ASSERT (non_options_count == 0);
+ ASSERT (unrecognized == 0);
+ ASSERT (optind == 1);
+ ASSERT (!output);
+ }
+ for (start = OPTIND_MIN; start <= 1; start++)
+ {
+ int a_seen = 0;
+ int b_seen = 0;
+ const char *p_value = NULL;
+ const char *q_value = NULL;
+ int non_options_count = 0;
+ const char *non_options[10];
+ int unrecognized = 0;
+ bool output;
+ int argc = 0;
+ const char *argv[10];
+
+ argv[argc++] = "program";
+ argv[argc++] = "-+";
+ argv[argc] = NULL;
+ optind = start;
+ getopt_loop (argc, argv, "+abp:q:",
+ &a_seen, &b_seen, &p_value, &q_value,
+ &non_options_count, non_options, &unrecognized, &output);
+ ASSERT (a_seen == 0);
+ ASSERT (b_seen == 0);
+ ASSERT (p_value == NULL);
+ ASSERT (q_value == NULL);
+ ASSERT (non_options_count == 0);
+ ASSERT (unrecognized == '+');
+ ASSERT (optind == 2);
+ ASSERT (output);
+ }
+
+ /* Check that '--' ends the argument processing. */
+ for (start = OPTIND_MIN; start <= 1; start++)
+ {
+ int a_seen = 0;
+ int b_seen = 0;
+ const char *p_value = NULL;
+ const char *q_value = NULL;
+ int non_options_count = 0;
+ const char *non_options[10];
+ int unrecognized = 0;
+ bool output;
+ int argc = 0;
+ const char *argv[20];
+
+ argv[argc++] = "program";
+ argv[argc++] = "donald";
+ argv[argc++] = "-p";
+ argv[argc++] = "billy";
+ argv[argc++] = "duck";
+ argv[argc++] = "-a";
+ argv[argc++] = "--";
+ argv[argc++] = "-b";
+ argv[argc++] = "foo";
+ argv[argc++] = "-q";
+ argv[argc++] = "johnny";
+ argv[argc++] = "bar";
+ argv[argc] = NULL;
+ optind = start;
+ opterr = 1;
+ getopt_loop (argc, argv, "+abp:q:",
+ &a_seen, &b_seen, &p_value, &q_value,
+ &non_options_count, non_options, &unrecognized, &output);
+ ASSERT (strcmp (argv[0], "program") == 0);
+ ASSERT (strcmp (argv[1], "donald") == 0);
+ ASSERT (strcmp (argv[2], "-p") == 0);
+ ASSERT (strcmp (argv[3], "billy") == 0);
+ ASSERT (strcmp (argv[4], "duck") == 0);
+ ASSERT (strcmp (argv[5], "-a") == 0);
+ ASSERT (strcmp (argv[6], "--") == 0);
+ ASSERT (strcmp (argv[7], "-b") == 0);
+ ASSERT (strcmp (argv[8], "foo") == 0);
+ ASSERT (strcmp (argv[9], "-q") == 0);
+ ASSERT (strcmp (argv[10], "johnny") == 0);
+ ASSERT (strcmp (argv[11], "bar") == 0);
+ ASSERT (argv[12] == NULL);
+ ASSERT (a_seen == 0);
+ ASSERT (b_seen == 0);
+ ASSERT (p_value == NULL);
+ ASSERT (q_value == NULL);
+ ASSERT (non_options_count == 0);
+ ASSERT (unrecognized == 0);
+ ASSERT (optind == 1);
+ ASSERT (!output);
+ }
+#endif /* GNULIB_TEST_GETOPT_GNU */
+
+ /* Check that the '+' flag has to come first. */
+ for (start = OPTIND_MIN; start <= 1; start++)
+ {
+ int a_seen = 0;
+ int b_seen = 0;
+ const char *p_value = NULL;
+ const char *q_value = NULL;
+ int non_options_count = 0;
+ const char *non_options[10];
+ int unrecognized = 0;
+ bool output;
+ int argc = 0;
+ const char *argv[10];
+
+ argv[argc++] = "program";
+ argv[argc++] = "donald";
+ argv[argc++] = "-p";
+ argv[argc++] = "billy";
+ argv[argc++] = "duck";
+ argv[argc++] = "-a";
+ argv[argc++] = "bar";
+ argv[argc] = NULL;
+ optind = start;
+ opterr = 1;
+ getopt_loop (argc, argv, "abp:q:+",
+ &a_seen, &b_seen, &p_value, &q_value,
+ &non_options_count, non_options, &unrecognized, &output);
+ if (posixly)
+ {
+ ASSERT (strcmp (argv[0], "program") == 0);
+ ASSERT (strcmp (argv[1], "donald") == 0);
+ ASSERT (strcmp (argv[2], "-p") == 0);
+ ASSERT (strcmp (argv[3], "billy") == 0);
+ ASSERT (strcmp (argv[4], "duck") == 0);
+ ASSERT (strcmp (argv[5], "-a") == 0);
+ ASSERT (strcmp (argv[6], "bar") == 0);
+ ASSERT (argv[7] == NULL);
+ ASSERT (a_seen == 0);
+ ASSERT (b_seen == 0);
+ ASSERT (p_value == NULL);
+ ASSERT (q_value == NULL);
+ ASSERT (non_options_count == 0);
+ ASSERT (unrecognized == 0);
+ ASSERT (optind == 1);
+ ASSERT (!output);
+ }
+ else
+ {
+ ASSERT (strcmp (argv[0], "program") == 0);
+ ASSERT (strcmp (argv[1], "-p") == 0);
+ ASSERT (strcmp (argv[2], "billy") == 0);
+ ASSERT (strcmp (argv[3], "-a") == 0);
+ ASSERT (strcmp (argv[4], "donald") == 0);
+ ASSERT (strcmp (argv[5], "duck") == 0);
+ ASSERT (strcmp (argv[6], "bar") == 0);
+ ASSERT (argv[7] == NULL);
+ ASSERT (a_seen == 1);
+ ASSERT (b_seen == 0);
+ ASSERT (p_value != NULL && strcmp (p_value, "billy") == 0);
+ ASSERT (q_value == NULL);
+ ASSERT (non_options_count == 0);
+ ASSERT (unrecognized == 0);
+ ASSERT (optind == 4);
+ ASSERT (!output);
+ }
+ }
+
+#if GNULIB_TEST_GETOPT_GNU
+ /* If GNU extensions are supported, require compliance with POSIX
+ interpretation on leading '+' behavior.
+ http://austingroupbugs.net/view.php?id=191 */
+ for (start = OPTIND_MIN; start <= 1; start++)
+ {
+ int a_seen = 0;
+ int b_seen = 0;
+ const char *p_value = NULL;
+ const char *q_value = NULL;
+ int non_options_count = 0;
+ const char *non_options[10];
+ int unrecognized = 0;
+ bool output;
+ int argc = 0;
+ const char *argv[10];
+
+ argv[argc++] = "program";
+ argv[argc++] = "donald";
+ argv[argc++] = "-p";
+ argv[argc++] = "billy";
+ argv[argc++] = "duck";
+ argv[argc++] = "-a";
+ argv[argc++] = "bar";
+ argv[argc] = NULL;
+ optind = start;
+ opterr = 1;
+ getopt_loop (argc, argv, "+:abp:q:",
+ &a_seen, &b_seen, &p_value, &q_value,
+ &non_options_count, non_options, &unrecognized, &output);
+ ASSERT (strcmp (argv[0], "program") == 0);
+ ASSERT (strcmp (argv[1], "donald") == 0);
+ ASSERT (strcmp (argv[2], "-p") == 0);
+ ASSERT (strcmp (argv[3], "billy") == 0);
+ ASSERT (strcmp (argv[4], "duck") == 0);
+ ASSERT (strcmp (argv[5], "-a") == 0);
+ ASSERT (strcmp (argv[6], "bar") == 0);
+ ASSERT (argv[7] == NULL);
+ ASSERT (a_seen == 0);
+ ASSERT (b_seen == 0);
+ ASSERT (p_value == NULL);
+ ASSERT (q_value == NULL);
+ ASSERT (non_options_count == 0);
+ ASSERT (unrecognized == 0);
+ ASSERT (optind == 1);
+ ASSERT (!output);
+ }
+ for (start = OPTIND_MIN; start <= 1; start++)
+ {
+ int a_seen = 0;
+ int b_seen = 0;
+ const char *p_value = NULL;
+ const char *q_value = NULL;
+ int non_options_count = 0;
+ const char *non_options[10];
+ int unrecognized = 0;
+ bool output;
+ int argc = 0;
+ const char *argv[10];
+
+ argv[argc++] = "program";
+ argv[argc++] = "-p";
+ argv[argc] = NULL;
+ optind = start;
+ getopt_loop (argc, argv, "+:abp:q:",
+ &a_seen, &b_seen, &p_value, &q_value,
+ &non_options_count, non_options, &unrecognized, &output);
+ ASSERT (a_seen == 0);
+ ASSERT (b_seen == 0);
+ ASSERT (p_value == NULL);
+ ASSERT (q_value == NULL);
+ ASSERT (non_options_count == 0);
+ ASSERT (unrecognized == 'p');
+ ASSERT (optind == 2);
+ ASSERT (!output);
+ }
+ for (start = OPTIND_MIN; start <= 1; start++)
+ {
+ int a_seen = 0;
+ int b_seen = 0;
+ const char *p_value = NULL;
+ const char *q_value = NULL;
+ int non_options_count = 0;
+ const char *non_options[10];
+ int unrecognized = 0;
+ bool output;
+ int argc = 0;
+ const char *argv[10];
+
+ argv[argc++] = "program";
+ argv[argc++] = "-b";
+ argv[argc++] = "-p";
+ argv[argc] = NULL;
+ optind = start;
+ getopt_loop (argc, argv, "+:abp:q:",
+ &a_seen, &b_seen, &p_value, &q_value,
+ &non_options_count, non_options, &unrecognized, &output);
+ ASSERT (a_seen == 0);
+ ASSERT (b_seen == 1);
+ ASSERT (p_value == NULL);
+ ASSERT (q_value == NULL);
+ ASSERT (non_options_count == 0);
+ ASSERT (unrecognized == 'p');
+ ASSERT (optind == 3);
+ ASSERT (!output);
+ }
+
+ /* Check that 'W' does not dump core:
+ http://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. */
+ for (start = OPTIND_MIN; start <= 1; start++)
+ {
+ int argc = 0;
+ const char *argv[10];
+ int pos = ftell (stderr);
+
+ argv[argc++] = "program";
+ argv[argc++] = "-W";
+ argv[argc++] = "dummy";
+ argv[argc] = NULL;
+ optind = start;
+ opterr = 1;
+ ASSERT (getopt (argc, (char **) argv, "W;") == 'W');
+ ASSERT (ftell (stderr) == pos);
+ ASSERT (optind == 2);
+ }
+#endif /* GNULIB_TEST_GETOPT_GNU */
+}
diff --git a/gnulib-tests/test-getopt_long.h b/gnulib-tests/test-getopt_long.h
new file mode 100644
index 0000000..0f83f47
--- /dev/null
+++ b/gnulib-tests/test-getopt_long.h
@@ -0,0 +1,2144 @@
+/* Test of command line argument processing.
+ Copyright (C) 2009-2016 Free Software Foundation, Inc.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+/* Written by Bruno Haible <bruno@clisp.org>, 2009. */
+
+static int a_seen;
+static int b_seen;
+static int q_seen;
+
+static const struct option long_options_required[] =
+ {
+ { "alpha", no_argument, NULL, 'a' },
+ { "beta", no_argument, &b_seen, 1 },
+ { "prune", required_argument, NULL, 'p' },
+ { "quetsche", required_argument, &q_seen, 1 },
+ { "xtremely-",no_argument, NULL, 1003 },
+ { "xtra", no_argument, NULL, 1001 },
+ { "xtreme", no_argument, NULL, 1002 },
+ { "xtremely", no_argument, NULL, 1003 },
+ { NULL, 0, NULL, 0 }
+ };
+
+static const struct option long_options_optional[] =
+ {
+ { "alpha", no_argument, NULL, 'a' },
+ { "beta", no_argument, &b_seen, 1 },
+ { "prune", optional_argument, NULL, 'p' },
+ { "quetsche", optional_argument, &q_seen, 1 },
+ { NULL, 0, NULL, 0 }
+ };
+
+static void
+getopt_long_loop (int argc, const char **argv,
+ const char *options, const struct option *long_options,
+ const char **p_value, const char **q_value,
+ int *non_options_count, const char **non_options,
+ int *unrecognized)
+{
+ int option_index = -1;
+ int c;
+
+ opterr = 0;
+ q_seen = 0;
+ while ((c = getopt_long (argc, (char **) argv, options, long_options,
+ &option_index))
+ != -1)
+ {
+ switch (c)
+ {
+ case 0:
+ /* An option with a non-NULL flag pointer was processed. */
+ if (q_seen)
+ *q_value = optarg;
+ break;
+ case 'a':
+ a_seen++;
+ break;
+ case 'b':
+ b_seen = 1;
+ break;
+ case 'p':
+ *p_value = optarg;
+ break;
+ case 'q':
+ *q_value = optarg;
+ break;
+ case '\1':
+ /* Must only happen with option '-' at the beginning. */
+ ASSERT (options[0] == '-');
+ non_options[(*non_options_count)++] = optarg;
+ break;
+ case ':':
+ /* Must only happen with option ':' at the beginning. */
+ ASSERT (options[0] == ':'
+ || ((options[0] == '-' || options[0] == '+')
+ && options[1] == ':'));
+ /* fall through */
+ case '?':
+ *unrecognized = optopt;
+ break;
+ default:
+ *unrecognized = c;
+ break;
+ }
+ }
+}
+
+/* Reduce casting, so we can use string literals elsewhere.
+ getopt_long takes an array of char*, but luckily does not modify
+ those elements, so we can pass const char*. */
+static int
+do_getopt_long (int argc, const char **argv, const char *shortopts,
+ const struct option *longopts, int *longind)
+{
+ return getopt_long (argc, (char **) argv, shortopts, longopts, longind);
+}
+
+static void
+test_getopt_long (void)
+{
+ int start;
+
+ /* Test disambiguation of options. */
+ {
+ int argc = 0;
+ const char *argv[10];
+ int option_index;
+ int c;
+
+ argv[argc++] = "program";
+ argv[argc++] = "--x";
+ argv[argc] = NULL;
+ optind = 1;
+ opterr = 0;
+ c = do_getopt_long (argc, argv, "ab", long_options_required, &option_index);
+ ASSERT (c == '?');
+ ASSERT (optopt == 0);
+ }
+ {
+ int argc = 0;
+ const char *argv[10];
+ int option_index;
+ int c;
+
+ argv[argc++] = "program";
+ argv[argc++] = "--xt";
+ argv[argc] = NULL;
+ optind = 1;
+ opterr = 0;
+ c = do_getopt_long (argc, argv, "ab", long_options_required, &option_index);
+ ASSERT (c == '?');
+ ASSERT (optopt == 0);
+ }
+ {
+ int argc = 0;
+ const char *argv[10];
+ int option_index;
+ int c;
+
+ argv[argc++] = "program";
+ argv[argc++] = "--xtr";
+ argv[argc] = NULL;
+ optind = 1;
+ opterr = 0;
+ c = do_getopt_long (argc, argv, "ab", long_options_required, &option_index);
+ ASSERT (c == '?');
+ ASSERT (optopt == 0);
+ }
+ {
+ int argc = 0;
+ const char *argv[10];
+ int option_index;
+ int c;
+
+ argv[argc++] = "program";
+ argv[argc++] = "--xtra";
+ argv[argc] = NULL;
+ optind = 1;
+ opterr = 0;
+ c = do_getopt_long (argc, argv, "ab", long_options_required, &option_index);
+ ASSERT (c == 1001);
+ }
+ {
+ int argc = 0;
+ const char *argv[10];
+ int option_index;
+ int c;
+
+ argv[argc++] = "program";
+ argv[argc++] = "--xtre";
+ argv[argc] = NULL;
+ optind = 1;
+ opterr = 0;
+ c = do_getopt_long (argc, argv, "ab", long_options_required, &option_index);
+ ASSERT (c == '?');
+ ASSERT (optopt == 0);
+ }
+ {
+ int argc = 0;
+ const char *argv[10];
+ int option_index;
+ int c;
+
+ argv[argc++] = "program";
+ argv[argc++] = "--xtrem";
+ argv[argc] = NULL;
+ optind = 1;
+ opterr = 0;
+ c = do_getopt_long (argc, argv, "ab", long_options_required, &option_index);
+ ASSERT (c == '?');
+ ASSERT (optopt == 0);
+ }
+ {
+ int argc = 0;
+ const char *argv[10];
+ int option_index;
+ int c;
+
+ argv[argc++] = "program";
+ argv[argc++] = "--xtreme";
+ argv[argc] = NULL;
+ optind = 1;
+ opterr = 0;
+ c = do_getopt_long (argc, argv, "ab", long_options_required, &option_index);
+ ASSERT (c == 1002);
+ }
+ {
+ int argc = 0;
+ const char *argv[10];
+ int option_index;
+ int c;
+
+ argv[argc++] = "program";
+ argv[argc++] = "--xtremel";
+ argv[argc] = NULL;
+ optind = 1;
+ opterr = 0;
+ c = do_getopt_long (argc, argv, "ab", long_options_required, &option_index);
+ ASSERT (c == 1003);
+ }
+ {
+ int argc = 0;
+ const char *argv[10];
+ int option_index;
+ int c;
+
+ argv[argc++] = "program";
+ argv[argc++] = "--xtremely";
+ argv[argc] = NULL;
+ optind = 1;
+ opterr = 0;
+ c = do_getopt_long (argc, argv, "ab", long_options_required, &option_index);
+ ASSERT (c == 1003);
+ }
+
+ /* Check that -W handles unknown options. */
+ {
+ int argc = 0;
+ const char *argv[10];
+ int option_index;
+ int c;
+
+ argv[argc++] = "program";
+ argv[argc++] = "-W";
+ argv[argc] = NULL;
+ optind = 1;
+ opterr = 0;
+ c = do_getopt_long (argc, argv, "W;", long_options_required, &option_index);
+ ASSERT (c == '?');
+ ASSERT (optopt == 'W');
+ }
+ {
+ int argc = 0;
+ const char *argv[10];
+ int option_index;
+ int c;
+
+ argv[argc++] = "program";
+ argv[argc++] = "-Wunknown";
+ argv[argc] = NULL;
+ optind = 1;
+ opterr = 0;
+ c = do_getopt_long (argc, argv, "W;", long_options_required, &option_index);
+ /* glibc and BSD behave differently here, but for now, we allow
+ both behaviors since W support is not frequently used. */
+ if (c == '?')
+ {
+ ASSERT (optopt == 0);
+ ASSERT (optarg == NULL);
+ }
+ else
+ {
+ ASSERT (c == 'W');
+ ASSERT (strcmp (optarg, "unknown") == 0);
+ }
+ }
+ {
+ int argc = 0;
+ const char *argv[10];
+ int option_index;
+ int c;
+
+ argv[argc++] = "program";
+ argv[argc++] = "-W";
+ argv[argc++] = "unknown";
+ argv[argc] = NULL;
+ optind = 1;
+ opterr = 0;
+ c = do_getopt_long (argc, argv, "W;", long_options_required, &option_index);
+ /* glibc and BSD behave differently here, but for now, we allow
+ both behaviors since W support is not frequently used. */
+ if (c == '?')
+ {
+ ASSERT (optopt == 0);
+ ASSERT (optarg == NULL);
+ }
+ else
+ {
+ ASSERT (c == 'W');
+ ASSERT (strcmp (optarg, "unknown") == 0);
+ }
+ }
+
+ /* Test that 'W' does not dump core:
+ http://sourceware.org/bugzilla/show_bug.cgi?id=12922 */
+ {
+ int argc = 0;
+ const char *argv[10];
+ int option_index;
+ int c;
+
+ argv[argc++] = "program";
+ argv[argc++] = "-W";
+ argv[argc++] = "dummy";
+ argv[argc] = NULL;
+ optind = 1;
+ opterr = 0;
+ c = do_getopt_long (argc, argv, "W;", NULL, &option_index);
+ ASSERT (c == 'W');
+ ASSERT (optind == 2);
+ }
+
+ /* Test processing of boolean short options. */
+ for (start = 0; start <= 1; start++)
+ {
+ const char *p_value = NULL;
+ const char *q_value = NULL;
+ int non_options_count = 0;
+ const char *non_options[10];
+ int unrecognized = 0;
+ int argc = 0;
+ const char *argv[10];
+ a_seen = 0;
+ b_seen = 0;
+
+ argv[argc++] = "program";
+ argv[argc++] = "-a";
+ argv[argc++] = "foo";
+ argv[argc++] = "bar";
+ argv[argc] = NULL;
+ optind = start;
+ getopt_long_loop (argc, argv, "ab", long_options_required,
+ &p_value, &q_value,
+ &non_options_count, non_options, &unrecognized);
+ ASSERT (a_seen == 1);
+ ASSERT (b_seen == 0);
+ ASSERT (p_value == NULL);
+ ASSERT (q_value == NULL);
+ ASSERT (non_options_count == 0);
+ ASSERT (unrecognized == 0);
+ ASSERT (optind == 2);
+ }
+ for (start = 0; start <= 1; start++)
+ {
+ const char *p_value = NULL;
+ const char *q_value = NULL;
+ int non_options_count = 0;
+ const char *non_options[10];
+ int unrecognized = 0;
+ int argc = 0;
+ const char *argv[10];
+ a_seen = 0;
+ b_seen = 0;
+
+ argv[argc++] = "program";
+ argv[argc++] = "-b";
+ argv[argc++] = "-a";
+ argv[argc++] = "foo";
+ argv[argc++] = "bar";
+ argv[argc] = NULL;
+ optind = start;
+ getopt_long_loop (argc, argv, "ab", long_options_required,
+ &p_value, &q_value,
+ &non_options_count, non_options, &unrecognized);
+ ASSERT (a_seen == 1);
+ ASSERT (b_seen == 1);
+ ASSERT (p_value == NULL);
+ ASSERT (q_value == NULL);
+ ASSERT (non_options_count == 0);
+ ASSERT (unrecognized == 0);
+ ASSERT (optind == 3);
+ }
+ for (start = 0; start <= 1; start++)
+ {
+ const char *p_value = NULL;
+ const char *q_value = NULL;
+ int non_options_count = 0;
+ const char *non_options[10];
+ int unrecognized = 0;
+ int argc = 0;
+ const char *argv[10];
+ a_seen = 0;
+ b_seen = 0;
+
+ argv[argc++] = "program";
+ argv[argc++] = "-ba";
+ argv[argc++] = "foo";
+ argv[argc++] = "bar";
+ argv[argc] = NULL;
+ optind = start;
+ getopt_long_loop (argc, argv, "ab", long_options_required,
+ &p_value, &q_value,
+ &non_options_count, non_options, &unrecognized);
+ ASSERT (a_seen == 1);
+ ASSERT (b_seen == 1);
+ ASSERT (p_value == NULL);
+ ASSERT (q_value == NULL);
+ ASSERT (non_options_count == 0);
+ ASSERT (unrecognized == 0);
+ ASSERT (optind == 2);
+ }
+ for (start = 0; start <= 1; start++)
+ {
+ const char *p_value = NULL;
+ const char *q_value = NULL;
+ int non_options_count = 0;
+ const char *non_options[10];
+ int unrecognized = 0;
+ int argc = 0;
+ const char *argv[10];
+ a_seen = 0;
+ b_seen = 0;
+
+ argv[argc++] = "program";
+ argv[argc++] = "-ab";
+ argv[argc++] = "-a";
+ argv[argc++] = "foo";
+ argv[argc++] = "bar";
+ argv[argc] = NULL;
+ optind = start;
+ getopt_long_loop (argc, argv, "ab", long_options_required,
+ &p_value, &q_value,
+ &non_options_count, non_options, &unrecognized);
+ ASSERT (a_seen == 2);
+ ASSERT (b_seen == 1);
+ ASSERT (p_value == NULL);
+ ASSERT (q_value == NULL);
+ ASSERT (non_options_count == 0);
+ ASSERT (unrecognized == 0);
+ ASSERT (optind == 3);
+ }
+
+ /* Test processing of boolean long options. */
+ for (start = 0; start <= 1; start++)
+ {
+ const char *p_value = NULL;
+ const char *q_value = NULL;
+ int non_options_count = 0;
+ const char *non_options[10];
+ int unrecognized = 0;
+ int argc = 0;
+ const char *argv[10];
+ a_seen = 0;
+ b_seen = 0;
+
+ argv[argc++] = "program";
+ argv[argc++] = "--alpha";
+ argv[argc++] = "foo";
+ argv[argc++] = "bar";
+ argv[argc] = NULL;
+ optind = start;
+ getopt_long_loop (argc, argv, "ab", long_options_required,
+ &p_value, &q_value,
+ &non_options_count, non_options, &unrecognized);
+ ASSERT (a_seen == 1);
+ ASSERT (b_seen == 0);
+ ASSERT (p_value == NULL);
+ ASSERT (q_value == NULL);
+ ASSERT (non_options_count == 0);
+ ASSERT (unrecognized == 0);
+ ASSERT (optind == 2);
+ }
+ for (start = 0; start <= 1; start++)
+ {
+ const char *p_value = NULL;
+ const char *q_value = NULL;
+ int non_options_count = 0;
+ const char *non_options[10];
+ int unrecognized = 0;
+ int argc = 0;
+ const char *argv[10];
+ a_seen = 0;
+ b_seen = 0;
+
+ argv[argc++] = "program";
+ argv[argc++] = "--beta";
+ argv[argc++] = "--alpha";
+ argv[argc++] = "foo";
+ argv[argc++] = "bar";
+ argv[argc] = NULL;
+ optind = start;
+ getopt_long_loop (argc, argv, "ab", long_options_required,
+ &p_value, &q_value,
+ &non_options_count, non_options, &unrecognized);
+ ASSERT (a_seen == 1);
+ ASSERT (b_seen == 1);
+ ASSERT (p_value == NULL);
+ ASSERT (q_value == NULL);
+ ASSERT (non_options_count == 0);
+ ASSERT (unrecognized == 0);
+ ASSERT (optind == 3);
+ }
+ for (start = 0; start <= 1; start++)
+ {
+ const char *p_value = NULL;
+ const char *q_value = NULL;
+ int non_options_count = 0;
+ const char *non_options[10];
+ int unrecognized = 0;
+ int argc = 0;
+ const char *argv[10];
+ a_seen = 0;
+ b_seen = 0;
+
+ argv[argc++] = "program";
+ argv[argc++] = "--alpha";
+ argv[argc++] = "--beta";
+ argv[argc++] = "--alpha";
+ argv[argc++] = "--beta";
+ argv[argc++] = "foo";
+ argv[argc++] = "bar";
+ argv[argc] = NULL;
+ optind = start;
+ getopt_long_loop (argc, argv, "ab", long_options_required,
+ &p_value, &q_value,
+ &non_options_count, non_options, &unrecognized);
+ ASSERT (a_seen == 2);
+ ASSERT (b_seen == 1);
+ ASSERT (p_value == NULL);
+ ASSERT (q_value == NULL);
+ ASSERT (non_options_count == 0);
+ ASSERT (unrecognized == 0);
+ ASSERT (optind == 5);
+ }
+
+ /* Test processing of boolean long options via -W. */
+ for (start = 0; start <= 1; start++)
+ {
+ const char *p_value = NULL;
+ const char *q_value = NULL;
+ int non_options_count = 0;
+ const char *non_options[10];
+ int unrecognized = 0;
+ int argc = 0;
+ const char *argv[10];
+ a_seen = 0;
+ b_seen = 0;
+
+ argv[argc++] = "program";
+ argv[argc++] = "-Walpha";
+ argv[argc++] = "foo";
+ argv[argc++] = "bar";
+ argv[argc] = NULL;
+ optind = start;
+ getopt_long_loop (argc, argv, "abW;", long_options_required,
+ &p_value, &q_value,
+ &non_options_count, non_options, &unrecognized);
+ ASSERT (a_seen == 1);
+ ASSERT (b_seen == 0);
+ ASSERT (p_value == NULL);
+ ASSERT (q_value == NULL);
+ ASSERT (non_options_count == 0);
+ ASSERT (unrecognized == 0);
+ ASSERT (optind == 2);
+ }
+ for (start = 0; start <= 1; start++)
+ {
+ const char *p_value = NULL;
+ const char *q_value = NULL;
+ int non_options_count = 0;
+ const char *non_options[10];
+ int unrecognized = 0;
+ int argc = 0;
+ const char *argv[10];
+ a_seen = 0;
+ b_seen = 0;
+
+ argv[argc++] = "program";
+ argv[argc++] = "-W";
+ argv[argc++] = "beta";
+ argv[argc++] = "-W";
+ argv[argc++] = "alpha";
+ argv[argc++] = "foo";
+ argv[argc++] = "bar";
+ argv[argc] = NULL;
+ optind = start;
+ getopt_long_loop (argc, argv, "aW;b", long_options_required,
+ &p_value, &q_value,
+ &non_options_count, non_options, &unrecognized);
+ ASSERT (a_seen == 1);
+ ASSERT (b_seen == 1);
+ ASSERT (p_value == NULL);
+ ASSERT (q_value == NULL);
+ ASSERT (non_options_count == 0);
+ ASSERT (unrecognized == 0);
+ ASSERT (optind == 5);
+ }
+ for (start = 0; start <= 1; start++)
+ {
+ const char *p_value = NULL;
+ const char *q_value = NULL;
+ int non_options_count = 0;
+ const char *non_options[10];
+ int unrecognized = 0;
+ int argc = 0;
+ const char *argv[10];
+ a_seen = 0;
+ b_seen = 0;
+
+ argv[argc++] = "program";
+ argv[argc++] = "-Walpha";
+ argv[argc++] = "-Wbeta";
+ argv[argc++] = "-Walpha";
+ argv[argc++] = "-Wbeta";
+ argv[argc++] = "foo";
+ argv[argc++] = "bar";
+ argv[argc] = NULL;
+ optind = start;
+ getopt_long_loop (argc, argv, "W;ab", long_options_required,
+ &p_value, &q_value,
+ &non_options_count, non_options, &unrecognized);
+ ASSERT (a_seen == 2);
+ ASSERT (b_seen == 1);
+ ASSERT (p_value == NULL);
+ ASSERT (q_value == NULL);
+ ASSERT (non_options_count == 0);
+ ASSERT (unrecognized == 0);
+ ASSERT (optind == 5);
+ }
+
+ /* Test processing of short options with arguments. */
+ for (start = 0; start <= 1; start++)
+ {
+ const char *p_value = NULL;
+ const char *q_value = NULL;
+ int non_options_count = 0;
+ const char *non_options[10];
+ int unrecognized = 0;
+ int argc = 0;
+ const char *argv[10];
+ a_seen = 0;
+ b_seen = 0;
+
+ argv[argc++] = "program";
+ argv[argc++] = "-pfoo";
+ argv[argc++] = "bar";
+ argv[argc] = NULL;
+ optind = start;
+ getopt_long_loop (argc, argv, "p:q:", long_options_required,
+ &p_value, &q_value,
+ &non_options_count, non_options, &unrecognized);
+ ASSERT (a_seen == 0);
+ ASSERT (b_seen == 0);
+ ASSERT (p_value != NULL && strcmp (p_value, "foo") == 0);
+ ASSERT (q_value == NULL);
+ ASSERT (non_options_count == 0);
+ ASSERT (unrecognized == 0);
+ ASSERT (optind == 2);
+ }
+ for (start = 0; start <= 1; start++)
+ {
+ const char *p_value = NULL;
+ const char *q_value = NULL;
+ int non_options_count = 0;
+ const char *non_options[10];
+ int unrecognized = 0;
+ int argc = 0;
+ const char *argv[10];
+ a_seen = 0;
+ b_seen = 0;
+
+ argv[argc++] = "program";
+ argv[argc++] = "-p";
+ argv[argc++] = "foo";
+ argv[argc++] = "bar";
+ argv[argc] = NULL;
+ optind = start;
+ getopt_long_loop (argc, argv, "p:q:", long_options_required,
+ &p_value, &q_value,
+ &non_options_count, non_options, &unrecognized);
+ ASSERT (a_seen == 0);
+ ASSERT (b_seen == 0);
+ ASSERT (p_value != NULL && strcmp (p_value, "foo") == 0);
+ ASSERT (q_value == NULL);
+ ASSERT (non_options_count == 0);
+ ASSERT (unrecognized == 0);
+ ASSERT (optind == 3);
+ }
+ for (start = 0; start <= 1; start++)
+ {
+ const char *p_value = NULL;
+ const char *q_value = NULL;
+ int non_options_count = 0;
+ const char *non_options[10];
+ int unrecognized = 0;
+ int argc = 0;
+ const char *argv[10];
+ a_seen = 0;
+ b_seen = 0;
+
+ argv[argc++] = "program";
+ argv[argc++] = "-ab";
+ argv[argc++] = "-q";
+ argv[argc++] = "baz";
+ argv[argc++] = "-pfoo";
+ argv[argc++] = "bar";
+ argv[argc] = NULL;
+ optind = start;
+ getopt_long_loop (argc, argv, "abp:q:", long_options_required,
+ &p_value, &q_value,
+ &non_options_count, non_options, &unrecognized);
+ ASSERT (a_seen == 1);
+ ASSERT (b_seen == 1);
+ ASSERT (p_value != NULL && strcmp (p_value, "foo") == 0);
+ ASSERT (q_value != NULL && strcmp (q_value, "baz") == 0);
+ ASSERT (non_options_count == 0);
+ ASSERT (unrecognized == 0);
+ ASSERT (optind == 5);
+ }
+
+ /* Test processing of long options with arguments. */
+ for (start = 0; start <= 1; start++)
+ {
+ const char *p_value = NULL;
+ const char *q_value = NULL;
+ int non_options_count = 0;
+ const char *non_options[10];
+ int unrecognized = 0;
+ int argc = 0;
+ const char *argv[10];
+ a_seen = 0;
+ b_seen = 0;
+
+ argv[argc++] = "program";
+ argv[argc++] = "--p=foo";
+ argv[argc++] = "bar";
+ argv[argc] = NULL;
+ optind = start;
+ getopt_long_loop (argc, argv, "p:q:", long_options_required,
+ &p_value, &q_value,
+ &non_options_count, non_options, &unrecognized);
+ ASSERT (a_seen == 0);
+ ASSERT (b_seen == 0);
+ ASSERT (p_value != NULL && strcmp (p_value, "foo") == 0);
+ ASSERT (q_value == NULL);
+ ASSERT (non_options_count == 0);
+ ASSERT (unrecognized == 0);
+ ASSERT (optind == 2);
+ }
+ for (start = 0; start <= 1; start++)
+ {
+ const char *p_value = NULL;
+ const char *q_value = NULL;
+ int non_options_count = 0;
+ const char *non_options[10];
+ int unrecognized = 0;
+ int argc = 0;
+ const char *argv[10];
+ a_seen = 0;
+ b_seen = 0;
+
+ argv[argc++] = "program";
+ argv[argc++] = "--p";
+ argv[argc++] = "foo";
+ argv[argc++] = "bar";
+ argv[argc] = NULL;
+ optind = start;
+ getopt_long_loop (argc, argv, "p:q:", long_options_required,
+ &p_value, &q_value,
+ &non_options_count, non_options, &unrecognized);
+ ASSERT (a_seen == 0);
+ ASSERT (b_seen == 0);
+ ASSERT (p_value != NULL && strcmp (p_value, "foo") == 0);
+ ASSERT (q_value == NULL);
+ ASSERT (non_options_count == 0);
+ ASSERT (unrecognized == 0);
+ ASSERT (optind == 3);
+ }
+ for (start = 0; start <= 1; start++)
+ {
+ const char *p_value = NULL;
+ const char *q_value = NULL;
+ int non_options_count = 0;
+ const char *non_options[10];
+ int unrecognized = 0;
+ int argc = 0;
+ const char *argv[10];
+ a_seen = 0;
+ b_seen = 0;
+
+ argv[argc++] = "program";
+ argv[argc++] = "-ab";
+ argv[argc++] = "--q";
+ argv[argc++] = "baz";
+ argv[argc++] = "--p=foo";
+ argv[argc++] = "bar";
+ argv[argc] = NULL;
+ optind = start;
+ getopt_long_loop (argc, argv, "abp:q:", long_options_required,
+ &p_value, &q_value,
+ &non_options_count, non_options, &unrecognized);
+ ASSERT (a_seen == 1);
+ ASSERT (b_seen == 1);
+ ASSERT (p_value != NULL && strcmp (p_value, "foo") == 0);
+ ASSERT (q_value != NULL && strcmp (q_value, "baz") == 0);
+ ASSERT (non_options_count == 0);
+ ASSERT (unrecognized == 0);
+ ASSERT (optind == 5);
+ }
+
+ /* Test processing of long options with arguments via -W. */
+ for (start = 0; start <= 1; start++)
+ {
+ const char *p_value = NULL;
+ const char *q_value = NULL;
+ int non_options_count = 0;
+ const char *non_options[10];
+ int unrecognized = 0;
+ int argc = 0;
+ const char *argv[10];
+ a_seen = 0;
+ b_seen = 0;
+
+ argv[argc++] = "program";
+ argv[argc++] = "-Wp=foo";
+ argv[argc++] = "bar";
+ argv[argc] = NULL;
+ optind = start;
+ getopt_long_loop (argc, argv, "p:q:W;", long_options_required,
+ &p_value, &q_value,
+ &non_options_count, non_options, &unrecognized);
+ ASSERT (a_seen == 0);
+ ASSERT (b_seen == 0);
+ ASSERT (p_value != NULL && strcmp (p_value, "foo") == 0);
+ ASSERT (q_value == NULL);
+ ASSERT (non_options_count == 0);
+ ASSERT (unrecognized == 0);
+ ASSERT (optind == 2);
+ }
+ for (start = 0; start <= 1; start++)
+ {
+ const char *p_value = NULL;
+ const char *q_value = NULL;
+ int non_options_count = 0;
+ const char *non_options[10];
+ int unrecognized = 0;
+ int argc = 0;
+ const char *argv[10];
+ a_seen = 0;
+ b_seen = 0;
+
+ argv[argc++] = "program";
+ argv[argc++] = "-W";
+ argv[argc++] = "p";
+ argv[argc++] = "foo";
+ argv[argc++] = "bar";
+ argv[argc] = NULL;
+ optind = start;
+ getopt_long_loop (argc, argv, "p:W;q:", long_options_required,
+ &p_value, &q_value,
+ &non_options_count, non_options, &unrecognized);
+ ASSERT (a_seen == 0);
+ ASSERT (b_seen == 0);
+ ASSERT (p_value != NULL && strcmp (p_value, "foo") == 0);
+ ASSERT (q_value == NULL);
+ ASSERT (non_options_count == 0);
+ ASSERT (unrecognized == 0);
+ ASSERT (optind == 4);
+ }
+ for (start = 0; start <= 1; start++)
+ {
+ const char *p_value = NULL;
+ const char *q_value = NULL;
+ int non_options_count = 0;
+ const char *non_options[10];
+ int unrecognized = 0;
+ int argc = 0;
+ const char *argv[10];
+ a_seen = 0;
+ b_seen = 0;
+
+ argv[argc++] = "program";
+ argv[argc++] = "-ab";
+ argv[argc++] = "-Wq";
+ argv[argc++] = "baz";
+ argv[argc++] = "-W";
+ argv[argc++] = "p=foo";
+ argv[argc++] = "bar";
+ argv[argc] = NULL;
+ optind = start;
+ getopt_long_loop (argc, argv, "W;abp:q:", long_options_required,
+ &p_value, &q_value,
+ &non_options_count, non_options, &unrecognized);
+ ASSERT (a_seen == 1);
+ ASSERT (b_seen == 1);
+ ASSERT (p_value != NULL && strcmp (p_value, "foo") == 0);
+ ASSERT (q_value != NULL && strcmp (q_value, "baz") == 0);
+ ASSERT (non_options_count == 0);
+ ASSERT (unrecognized == 0);
+ ASSERT (optind == 6);
+ }
+
+ /* Test processing of short options with optional arguments. */
+ for (start = 0; start <= 1; start++)
+ {
+ const char *p_value = NULL;
+ const char *q_value = NULL;
+ int non_options_count = 0;
+ const char *non_options[10];
+ int unrecognized = 0;
+ int argc = 0;
+ const char *argv[10];
+ a_seen = 0;
+ b_seen = 0;
+
+ argv[argc++] = "program";
+ argv[argc++] = "-pfoo";
+ argv[argc++] = "bar";
+ argv[argc] = NULL;
+ optind = start;
+ getopt_long_loop (argc, argv, "p::q::", long_options_optional,
+ &p_value, &q_value,
+ &non_options_count, non_options, &unrecognized);
+ ASSERT (a_seen == 0);
+ ASSERT (b_seen == 0);
+ ASSERT (p_value != NULL && strcmp (p_value, "foo") == 0);
+ ASSERT (q_value == NULL);
+ ASSERT (non_options_count == 0);
+ ASSERT (unrecognized == 0);
+ ASSERT (optind == 2);
+ }
+ for (start = 0; start <= 1; start++)
+ {
+ const char *p_value = NULL;
+ const char *q_value = NULL;
+ int non_options_count = 0;
+ const char *non_options[10];
+ int unrecognized = 0;
+ int argc = 0;
+ const char *argv[10];
+ a_seen = 0;
+ b_seen = 0;
+
+ argv[argc++] = "program";
+ argv[argc++] = "-p";
+ argv[argc++] = "foo";
+ argv[argc++] = "bar";
+ argv[argc] = NULL;
+ optind = start;
+ getopt_long_loop (argc, argv, "p::q::", long_options_optional,
+ &p_value, &q_value,
+ &non_options_count, non_options, &unrecognized);
+ ASSERT (a_seen == 0);
+ ASSERT (b_seen == 0);
+ ASSERT (p_value == NULL);
+ ASSERT (q_value == NULL);
+ ASSERT (non_options_count == 0);
+ ASSERT (unrecognized == 0);
+ ASSERT (optind == 2);
+ }
+ for (start = 0; start <= 1; start++)
+ {
+ const char *p_value = NULL;
+ const char *q_value = NULL;
+ int non_options_count = 0;
+ const char *non_options[10];
+ int unrecognized = 0;
+ int argc = 0;
+ const char *argv[10];
+ a_seen = 0;
+ b_seen = 0;
+
+ argv[argc++] = "program";
+ argv[argc++] = "-p";
+ argv[argc++] = "-a";
+ argv[argc++] = "bar";
+ argv[argc] = NULL;
+ optind = start;
+ getopt_long_loop (argc, argv, "abp::q::", long_options_optional,
+ &p_value, &q_value,
+ &non_options_count, non_options, &unrecognized);
+ ASSERT (a_seen == 1);
+ ASSERT (b_seen == 0);
+ ASSERT (p_value == NULL);
+ ASSERT (q_value == NULL);
+ ASSERT (non_options_count == 0);
+ ASSERT (unrecognized == 0);
+ ASSERT (optind == 3);
+ }
+
+ /* Test processing of long options with optional arguments. */
+ for (start = 0; start <= 1; start++)
+ {
+ const char *p_value = NULL;
+ const char *q_value = NULL;
+ int non_options_count = 0;
+ const char *non_options[10];
+ int unrecognized = 0;
+ int argc = 0;
+ const char *argv[10];
+ a_seen = 0;
+ b_seen = 0;
+
+ argv[argc++] = "program";
+ argv[argc++] = "--p=foo";
+ argv[argc++] = "bar";
+ argv[argc] = NULL;
+ optind = start;
+ getopt_long_loop (argc, argv, "p::q::", long_options_optional,
+ &p_value, &q_value,
+ &non_options_count, non_options, &unrecognized);
+ ASSERT (a_seen == 0);
+ ASSERT (b_seen == 0);
+ ASSERT (p_value != NULL && strcmp (p_value, "foo") == 0);
+ ASSERT (q_value == NULL);
+ ASSERT (non_options_count == 0);
+ ASSERT (unrecognized == 0);
+ ASSERT (optind == 2);
+ }
+ for (start = 0; start <= 1; start++)
+ {
+ const char *p_value = NULL;
+ const char *q_value = NULL;
+ int non_options_count = 0;
+ const char *non_options[10];
+ int unrecognized = 0;
+ int argc = 0;
+ const char *argv[10];
+ a_seen = 0;
+ b_seen = 0;
+
+ argv[argc++] = "program";
+ argv[argc++] = "--p";
+ argv[argc++] = "foo";
+ argv[argc++] = "bar";
+ argv[argc] = NULL;
+ optind = start;
+ getopt_long_loop (argc, argv, "p::q::", long_options_optional,
+ &p_value, &q_value,
+ &non_options_count, non_options, &unrecognized);
+ ASSERT (a_seen == 0);
+ ASSERT (b_seen == 0);
+ ASSERT (p_value == NULL);
+ ASSERT (q_value == NULL);
+ ASSERT (non_options_count == 0);
+ ASSERT (unrecognized == 0);
+ ASSERT (optind == 2);
+ }
+ for (start = 0; start <= 1; start++)
+ {
+ const char *p_value = NULL;
+ const char *q_value = NULL;
+ int non_options_count = 0;
+ const char *non_options[10];
+ int unrecognized = 0;
+ int argc = 0;
+ const char *argv[10];
+ a_seen = 0;
+ b_seen = 0;
+
+ argv[argc++] = "program";
+ argv[argc++] = "--p=";
+ argv[argc++] = "foo";
+ argv[argc++] = "bar";
+ argv[argc] = NULL;
+ optind = start;
+ getopt_long_loop (argc, argv, "p::q::", long_options_optional,
+ &p_value, &q_value,
+ &non_options_count, non_options, &unrecognized);
+ ASSERT (a_seen == 0);
+ ASSERT (b_seen == 0);
+ ASSERT (p_value != NULL && *p_value == '\0');
+ ASSERT (q_value == NULL);
+ ASSERT (non_options_count == 0);
+ ASSERT (unrecognized == 0);
+ ASSERT (optind == 2);
+ }
+ for (start = 0; start <= 1; start++)
+ {
+ const char *p_value = NULL;
+ const char *q_value = NULL;
+ int non_options_count = 0;
+ const char *non_options[10];
+ int unrecognized = 0;
+ int argc = 0;
+ const char *argv[10];
+ a_seen = 0;
+ b_seen = 0;
+
+ argv[argc++] = "program";
+ argv[argc++] = "--p";
+ argv[argc++] = "-a";
+ argv[argc++] = "bar";
+ argv[argc] = NULL;
+ optind = start;
+ getopt_long_loop (argc, argv, "abp::q::", long_options_optional,
+ &p_value, &q_value,
+ &non_options_count, non_options, &unrecognized);
+ ASSERT (a_seen == 1);
+ ASSERT (b_seen == 0);
+ ASSERT (p_value == NULL);
+ ASSERT (q_value == NULL);
+ ASSERT (non_options_count == 0);
+ ASSERT (unrecognized == 0);
+ ASSERT (optind == 3);
+ }
+
+ /* Test processing of long options with optional arguments via -W. */
+ for (start = 0; start <= 1; start++)
+ {
+ const char *p_value = NULL;
+ const char *q_value = NULL;
+ int non_options_count = 0;
+ const char *non_options[10];
+ int unrecognized = 0;
+ int argc = 0;
+ const char *argv[10];
+ a_seen = 0;
+ b_seen = 0;
+
+ argv[argc++] = "program";
+ argv[argc++] = "-Wp=foo";
+ argv[argc++] = "bar";
+ argv[argc] = NULL;
+ optind = start;
+ getopt_long_loop (argc, argv, "p::q::W;", long_options_optional,
+ &p_value, &q_value,
+ &non_options_count, non_options, &unrecognized);
+ ASSERT (a_seen == 0);
+ ASSERT (b_seen == 0);
+ ASSERT (p_value != NULL && strcmp (p_value, "foo") == 0);
+ ASSERT (q_value == NULL);
+ ASSERT (non_options_count == 0);
+ ASSERT (unrecognized == 0);
+ ASSERT (optind == 2);
+ }
+ for (start = 0; start <= 1; start++)
+ {
+ const char *p_value = NULL;
+ const char *q_value = NULL;
+ int non_options_count = 0;
+ const char *non_options[10];
+ int unrecognized = 0;
+ int argc = 0;
+ const char *argv[10];
+ a_seen = 0;
+ b_seen = 0;
+
+ argv[argc++] = "program";
+ argv[argc++] = "-Wp";
+ argv[argc++] = "foo";
+ argv[argc++] = "bar";
+ argv[argc] = NULL;
+ optind = start;
+ getopt_long_loop (argc, argv, "p::q::W;", long_options_optional,
+ &p_value, &q_value,
+ &non_options_count, non_options, &unrecognized);
+ ASSERT (a_seen == 0);
+ ASSERT (b_seen == 0);
+ ASSERT (p_value == NULL);
+ ASSERT (q_value == NULL);
+ ASSERT (non_options_count == 0);
+ ASSERT (unrecognized == 0);
+ ASSERT (optind == 2);
+ }
+ for (start = 0; start <= 1; start++)
+ {
+ const char *p_value = NULL;
+ const char *q_value = NULL;
+ int non_options_count = 0;
+ const char *non_options[10];
+ int unrecognized = 0;
+ int argc = 0;
+ const char *argv[10];
+ a_seen = 0;
+ b_seen = 0;
+
+ argv[argc++] = "program";
+ argv[argc++] = "-Wp=";
+ argv[argc++] = "foo";
+ argv[argc++] = "bar";
+ argv[argc] = NULL;
+ optind = start;
+ getopt_long_loop (argc, argv, "W;p::q::", long_options_optional,
+ &p_value, &q_value,
+ &non_options_count, non_options, &unrecognized);
+ ASSERT (a_seen == 0);
+ ASSERT (b_seen == 0);
+ ASSERT (p_value != NULL && *p_value == '\0');
+ ASSERT (q_value == NULL);
+ ASSERT (non_options_count == 0);
+ ASSERT (unrecognized == 0);
+ ASSERT (optind == 2);
+ }
+ for (start = 0; start <= 1; start++)
+ {
+ const char *p_value = NULL;
+ const char *q_value = NULL;
+ int non_options_count = 0;
+ const char *non_options[10];
+ int unrecognized = 0;
+ int argc = 0;
+ const char *argv[10];
+ a_seen = 0;
+ b_seen = 0;
+
+ argv[argc++] = "program";
+ argv[argc++] = "-W";
+ argv[argc++] = "p=";
+ argv[argc++] = "foo";
+ argv[argc++] = "bar";
+ argv[argc] = NULL;
+ optind = start;
+ getopt_long_loop (argc, argv, "W;p::q::", long_options_optional,
+ &p_value, &q_value,
+ &non_options_count, non_options, &unrecognized);
+ ASSERT (a_seen == 0);
+ ASSERT (b_seen == 0);
+ ASSERT (p_value != NULL && *p_value == '\0');
+ ASSERT (q_value == NULL);
+ ASSERT (non_options_count == 0);
+ ASSERT (unrecognized == 0);
+ ASSERT (optind == 3);
+ }
+ for (start = 0; start <= 1; start++)
+ {
+ const char *p_value = NULL;
+ const char *q_value = NULL;
+ int non_options_count = 0;
+ const char *non_options[10];
+ int unrecognized = 0;
+ int argc = 0;
+ const char *argv[10];
+ a_seen = 0;
+ b_seen = 0;
+
+ argv[argc++] = "program";
+ argv[argc++] = "-W";
+ argv[argc++] = "p";
+ argv[argc++] = "-a";
+ argv[argc++] = "bar";
+ argv[argc] = NULL;
+ optind = start;
+ getopt_long_loop (argc, argv, "W;abp::q::", long_options_optional,
+ &p_value, &q_value,
+ &non_options_count, non_options, &unrecognized);
+ ASSERT (a_seen == 1);
+ ASSERT (b_seen == 0);
+ /* ASSERT (p_value == NULL); */
+ ASSERT (q_value == NULL);
+ ASSERT (non_options_count == 0);
+ ASSERT (unrecognized == 0);
+ ASSERT (optind == 4);
+ }
+
+ /* Check that invalid options are recognized. */
+ for (start = 0; start <= 1; start++)
+ {
+ const char *p_value = NULL;
+ const char *q_value = NULL;
+ int non_options_count = 0;
+ const char *non_options[10];
+ int unrecognized = 0;
+ int argc = 0;
+ const char *argv[10];
+ a_seen = 0;
+ b_seen = 0;
+
+ argv[argc++] = "program";
+ argv[argc++] = "-p";
+ argv[argc++] = "foo";
+ argv[argc++] = "-x";
+ argv[argc++] = "-a";
+ argv[argc++] = "bar";
+ argv[argc] = NULL;
+ optind = start;
+ getopt_long_loop (argc, argv, "abp:q:", long_options_required,
+ &p_value, &q_value,
+ &non_options_count, non_options, &unrecognized);
+ ASSERT (a_seen == 1);
+ ASSERT (b_seen == 0);
+ ASSERT (p_value != NULL && strcmp (p_value, "foo") == 0);
+ ASSERT (q_value == NULL);
+ ASSERT (non_options_count == 0);
+ ASSERT (unrecognized == 'x');
+ ASSERT (optind == 5);
+ }
+ for (start = 0; start <= 1; start++)
+ {
+ const char *p_value = NULL;
+ const char *q_value = NULL;
+ int non_options_count = 0;
+ const char *non_options[10];
+ int unrecognized = 0;
+ int argc = 0;
+ const char *argv[10];
+ a_seen = 0;
+ b_seen = 0;
+
+ argv[argc++] = "program";
+ argv[argc++] = "-p";
+ argv[argc++] = "foo";
+ argv[argc++] = "-:";
+ argv[argc++] = "-a";
+ argv[argc++] = "bar";
+ argv[argc] = NULL;
+ optind = start;
+ getopt_long_loop (argc, argv, "abp:q:", long_options_required,
+ &p_value, &q_value,
+ &non_options_count, non_options, &unrecognized);
+ ASSERT (a_seen == 1);
+ ASSERT (b_seen == 0);
+ ASSERT (p_value != NULL && strcmp (p_value, "foo") == 0);
+ ASSERT (q_value == NULL);
+ ASSERT (non_options_count == 0);
+ ASSERT (unrecognized == ':');
+ ASSERT (optind == 5);
+ }
+
+ /* Check that unexpected arguments are recognized. */
+ for (start = 0; start <= 1; start++)
+ {
+ const char *p_value = NULL;
+ const char *q_value = NULL;
+ int non_options_count = 0;
+ const char *non_options[10];
+ int unrecognized = 0;
+ int argc = 0;
+ const char *argv[10];
+ a_seen = 0;
+ b_seen = 0;
+
+ argv[argc++] = "program";
+ argv[argc++] = "-p";
+ argv[argc++] = "foo";
+ argv[argc++] = "--a=";
+ argv[argc++] = "bar";
+ argv[argc] = NULL;
+ optind = start;
+ getopt_long_loop (argc, argv, "abp:q:", long_options_required,
+ &p_value, &q_value,
+ &non_options_count, non_options, &unrecognized);
+ ASSERT (a_seen == 0);
+ ASSERT (b_seen == 0);
+ ASSERT (p_value != NULL && strcmp (p_value, "foo") == 0);
+ ASSERT (q_value == NULL);
+ ASSERT (non_options_count == 0);
+ ASSERT (unrecognized == 'a');
+ ASSERT (optind == 4);
+ }
+ for (start = 0; start <= 1; start++)
+ {
+ const char *p_value = NULL;
+ const char *q_value = NULL;
+ int non_options_count = 0;
+ const char *non_options[10];
+ int unrecognized = 0;
+ int argc = 0;
+ const char *argv[10];
+ a_seen = 0;
+ b_seen = 0;
+
+ argv[argc++] = "program";
+ argv[argc++] = "-p";
+ argv[argc++] = "foo";
+ argv[argc++] = "--b=";
+ argv[argc++] = "bar";
+ argv[argc] = NULL;
+ optind = start;
+ getopt_long_loop (argc, argv, "abp:q:", long_options_required,
+ &p_value, &q_value,
+ &non_options_count, non_options, &unrecognized);
+ ASSERT (a_seen == 0);
+ ASSERT (b_seen == 0);
+ ASSERT (p_value != NULL && strcmp (p_value, "foo") == 0);
+ ASSERT (q_value == NULL);
+ ASSERT (non_options_count == 0);
+ /* When flag is non-zero, glibc sets optopt anyway, but BSD
+ leaves optopt unchanged. */
+ ASSERT (unrecognized == 1 || unrecognized == 0);
+ ASSERT (optind == 4);
+ }
+
+ /* Check that by default, non-options arguments are moved to the end. */
+ for (start = 0; start <= 1; start++)
+ {
+ const char *p_value = NULL;
+ const char *q_value = NULL;
+ int non_options_count = 0;
+ const char *non_options[10];
+ int unrecognized = 0;
+ int argc = 0;
+ const char *argv[10];
+ a_seen = 0;
+ b_seen = 0;
+
+ argv[argc++] = "program";
+ argv[argc++] = "donald";
+ argv[argc++] = "-p";
+ argv[argc++] = "billy";
+ argv[argc++] = "duck";
+ argv[argc++] = "-a";
+ argv[argc++] = "bar";
+ argv[argc] = NULL;
+ optind = start;
+ getopt_long_loop (argc, argv, "abp:q:", long_options_required,
+ &p_value, &q_value,
+ &non_options_count, non_options, &unrecognized);
+ ASSERT (strcmp (argv[0], "program") == 0);
+ ASSERT (strcmp (argv[1], "-p") == 0);
+ ASSERT (strcmp (argv[2], "billy") == 0);
+ ASSERT (strcmp (argv[3], "-a") == 0);
+ ASSERT (strcmp (argv[4], "donald") == 0);
+ ASSERT (strcmp (argv[5], "duck") == 0);
+ ASSERT (strcmp (argv[6], "bar") == 0);
+ ASSERT (argv[7] == NULL);
+ ASSERT (a_seen == 1);
+ ASSERT (b_seen == 0);
+ ASSERT (p_value != NULL && strcmp (p_value, "billy") == 0);
+ ASSERT (q_value == NULL);
+ ASSERT (non_options_count == 0);
+ ASSERT (unrecognized == 0);
+ ASSERT (optind == 4);
+ }
+
+ /* Check that '--' ends the argument processing. */
+ for (start = 0; start <= 1; start++)
+ {
+ const char *p_value = NULL;
+ const char *q_value = NULL;
+ int non_options_count = 0;
+ const char *non_options[10];
+ int unrecognized = 0;
+ int argc = 0;
+ const char *argv[20];
+ a_seen = 0;
+ b_seen = 0;
+
+ argv[argc++] = "program";
+ argv[argc++] = "donald";
+ argv[argc++] = "-p";
+ argv[argc++] = "billy";
+ argv[argc++] = "duck";
+ argv[argc++] = "-a";
+ argv[argc++] = "--";
+ argv[argc++] = "-b";
+ argv[argc++] = "foo";
+ argv[argc++] = "-q";
+ argv[argc++] = "johnny";
+ argv[argc++] = "bar";
+ argv[argc] = NULL;
+ optind = start;
+ getopt_long_loop (argc, argv, "abp:q:", long_options_required,
+ &p_value, &q_value,
+ &non_options_count, non_options, &unrecognized);
+ ASSERT (strcmp (argv[0], "program") == 0);
+ ASSERT (strcmp (argv[1], "-p") == 0);
+ ASSERT (strcmp (argv[2], "billy") == 0);
+ ASSERT (strcmp (argv[3], "-a") == 0);
+ ASSERT (strcmp (argv[4], "--") == 0);
+ ASSERT (strcmp (argv[5], "donald") == 0);
+ ASSERT (strcmp (argv[6], "duck") == 0);
+ ASSERT (strcmp (argv[7], "-b") == 0);
+ ASSERT (strcmp (argv[8], "foo") == 0);
+ ASSERT (strcmp (argv[9], "-q") == 0);
+ ASSERT (strcmp (argv[10], "johnny") == 0);
+ ASSERT (strcmp (argv[11], "bar") == 0);
+ ASSERT (argv[12] == NULL);
+ ASSERT (a_seen == 1);
+ ASSERT (b_seen == 0);
+ ASSERT (p_value != NULL && strcmp (p_value, "billy") == 0);
+ ASSERT (q_value == NULL);
+ ASSERT (non_options_count == 0);
+ ASSERT (unrecognized == 0);
+ ASSERT (optind == 5);
+ }
+
+ /* Check that the '-' flag causes non-options to be returned in order. */
+ for (start = 0; start <= 1; start++)
+ {
+ const char *p_value = NULL;
+ const char *q_value = NULL;
+ int non_options_count = 0;
+ const char *non_options[10];
+ int unrecognized = 0;
+ int argc = 0;
+ const char *argv[10];
+ a_seen = 0;
+ b_seen = 0;
+
+ argv[argc++] = "program";
+ argv[argc++] = "donald";
+ argv[argc++] = "-p";
+ argv[argc++] = "billy";
+ argv[argc++] = "duck";
+ argv[argc++] = "-a";
+ argv[argc++] = "bar";
+ argv[argc] = NULL;
+ optind = start;
+ getopt_long_loop (argc, argv, "-abp:q:", long_options_required,
+ &p_value, &q_value,
+ &non_options_count, non_options, &unrecognized);
+ ASSERT (strcmp (argv[0], "program") == 0);
+ ASSERT (strcmp (argv[1], "donald") == 0);
+ ASSERT (strcmp (argv[2], "-p") == 0);
+ ASSERT (strcmp (argv[3], "billy") == 0);
+ ASSERT (strcmp (argv[4], "duck") == 0);
+ ASSERT (strcmp (argv[5], "-a") == 0);
+ ASSERT (strcmp (argv[6], "bar") == 0);
+ ASSERT (argv[7] == NULL);
+ ASSERT (a_seen == 1);
+ ASSERT (b_seen == 0);
+ ASSERT (p_value != NULL && strcmp (p_value, "billy") == 0);
+ ASSERT (q_value == NULL);
+ ASSERT (non_options_count == 3);
+ ASSERT (strcmp (non_options[0], "donald") == 0);
+ ASSERT (strcmp (non_options[1], "duck") == 0);
+ ASSERT (strcmp (non_options[2], "bar") == 0);
+ ASSERT (unrecognized == 0);
+ ASSERT (optind == 7);
+ }
+
+ /* Check that '--' ends the argument processing. */
+ for (start = 0; start <= 1; start++)
+ {
+ const char *p_value = NULL;
+ const char *q_value = NULL;
+ int non_options_count = 0;
+ const char *non_options[10];
+ int unrecognized = 0;
+ int argc = 0;
+ const char *argv[20];
+ a_seen = 0;
+ b_seen = 0;
+
+ argv[argc++] = "program";
+ argv[argc++] = "donald";
+ argv[argc++] = "-p";
+ argv[argc++] = "billy";
+ argv[argc++] = "duck";
+ argv[argc++] = "-a";
+ argv[argc++] = "--";
+ argv[argc++] = "-b";
+ argv[argc++] = "foo";
+ argv[argc++] = "-q";
+ argv[argc++] = "johnny";
+ argv[argc++] = "bar";
+ argv[argc] = NULL;
+ optind = start;
+ getopt_long_loop (argc, argv, "-abp:q:", long_options_required,
+ &p_value, &q_value,
+ &non_options_count, non_options, &unrecognized);
+ ASSERT (strcmp (argv[0], "program") == 0);
+ ASSERT (strcmp (argv[1], "donald") == 0);
+ ASSERT (strcmp (argv[2], "-p") == 0);
+ ASSERT (strcmp (argv[3], "billy") == 0);
+ ASSERT (strcmp (argv[4], "duck") == 0);
+ ASSERT (strcmp (argv[5], "-a") == 0);
+ ASSERT (strcmp (argv[6], "--") == 0);
+ ASSERT (strcmp (argv[7], "-b") == 0);
+ ASSERT (strcmp (argv[8], "foo") == 0);
+ ASSERT (strcmp (argv[9], "-q") == 0);
+ ASSERT (strcmp (argv[10], "johnny") == 0);
+ ASSERT (strcmp (argv[11], "bar") == 0);
+ ASSERT (argv[12] == NULL);
+ ASSERT (a_seen == 1);
+ ASSERT (b_seen == 0);
+ ASSERT (p_value != NULL && strcmp (p_value, "billy") == 0);
+ ASSERT (q_value == NULL);
+ if (non_options_count == 2)
+ {
+ /* glibc behaviour. */
+ ASSERT (non_options_count == 2);
+ ASSERT (strcmp (non_options[0], "donald") == 0);
+ ASSERT (strcmp (non_options[1], "duck") == 0);
+ ASSERT (unrecognized == 0);
+ ASSERT (optind == 7);
+ }
+ else
+ {
+ /* Another valid behaviour. */
+ ASSERT (non_options_count == 7);
+ ASSERT (strcmp (non_options[0], "donald") == 0);
+ ASSERT (strcmp (non_options[1], "duck") == 0);
+ ASSERT (strcmp (non_options[2], "-b") == 0);
+ ASSERT (strcmp (non_options[3], "foo") == 0);
+ ASSERT (strcmp (non_options[4], "-q") == 0);
+ ASSERT (strcmp (non_options[5], "johnny") == 0);
+ ASSERT (strcmp (non_options[6], "bar") == 0);
+ ASSERT (unrecognized == 0);
+ ASSERT (optind == 12);
+ }
+ }
+
+ /* Check that the '-' flag has to come first. */
+ for (start = 0; start <= 1; start++)
+ {
+ const char *p_value = NULL;
+ const char *q_value = NULL;
+ int non_options_count = 0;
+ const char *non_options[10];
+ int unrecognized = 0;
+ int argc = 0;
+ const char *argv[10];
+ a_seen = 0;
+ b_seen = 0;
+
+ argv[argc++] = "program";
+ argv[argc++] = "donald";
+ argv[argc++] = "-p";
+ argv[argc++] = "billy";
+ argv[argc++] = "duck";
+ argv[argc++] = "-a";
+ argv[argc++] = "bar";
+ argv[argc] = NULL;
+ optind = start;
+ getopt_long_loop (argc, argv, "abp:q:-", long_options_required,
+ &p_value, &q_value,
+ &non_options_count, non_options, &unrecognized);
+ ASSERT (strcmp (argv[0], "program") == 0);
+ ASSERT (strcmp (argv[1], "-p") == 0);
+ ASSERT (strcmp (argv[2], "billy") == 0);
+ ASSERT (strcmp (argv[3], "-a") == 0);
+ ASSERT (strcmp (argv[4], "donald") == 0);
+ ASSERT (strcmp (argv[5], "duck") == 0);
+ ASSERT (strcmp (argv[6], "bar") == 0);
+ ASSERT (argv[7] == NULL);
+ ASSERT (a_seen == 1);
+ ASSERT (b_seen == 0);
+ ASSERT (p_value != NULL && strcmp (p_value, "billy") == 0);
+ ASSERT (q_value == NULL);
+ ASSERT (non_options_count == 0);
+ ASSERT (unrecognized == 0);
+ ASSERT (optind == 4);
+ }
+
+ /* Check that the '+' flag causes the first non-option to terminate the
+ loop. */
+ for (start = 0; start <= 1; start++)
+ {
+ const char *p_value = NULL;
+ const char *q_value = NULL;
+ int non_options_count = 0;
+ const char *non_options[10];
+ int unrecognized = 0;
+ int argc = 0;
+ const char *argv[10];
+ a_seen = 0;
+ b_seen = 0;
+
+ argv[argc++] = "program";
+ argv[argc++] = "donald";
+ argv[argc++] = "-p";
+ argv[argc++] = "billy";
+ argv[argc++] = "duck";
+ argv[argc++] = "-a";
+ argv[argc++] = "bar";
+ argv[argc] = NULL;
+ optind = start;
+ getopt_long_loop (argc, argv, "+abp:q:", long_options_required,
+ &p_value, &q_value,
+ &non_options_count, non_options, &unrecognized);
+ ASSERT (strcmp (argv[0], "program") == 0);
+ ASSERT (strcmp (argv[1], "donald") == 0);
+ ASSERT (strcmp (argv[2], "-p") == 0);
+ ASSERT (strcmp (argv[3], "billy") == 0);
+ ASSERT (strcmp (argv[4], "duck") == 0);
+ ASSERT (strcmp (argv[5], "-a") == 0);
+ ASSERT (strcmp (argv[6], "bar") == 0);
+ ASSERT (argv[7] == NULL);
+ ASSERT (a_seen == 0);
+ ASSERT (b_seen == 0);
+ ASSERT (p_value == NULL);
+ ASSERT (q_value == NULL);
+ ASSERT (non_options_count == 0);
+ ASSERT (unrecognized == 0);
+ ASSERT (optind == 1);
+ }
+ for (start = 0; start <= 1; start++)
+ {
+ const char *p_value = NULL;
+ const char *q_value = NULL;
+ int non_options_count = 0;
+ const char *non_options[10];
+ int unrecognized = 0;
+ int argc = 0;
+ const char *argv[10];
+ a_seen = 0;
+ b_seen = 0;
+
+ argv[argc++] = "program";
+ argv[argc++] = "-+";
+ argv[argc] = NULL;
+ optind = start;
+ getopt_long_loop (argc, argv, "+abp:q:", long_options_required,
+ &p_value, &q_value,
+ &non_options_count, non_options, &unrecognized);
+ ASSERT (a_seen == 0);
+ ASSERT (b_seen == 0);
+ ASSERT (p_value == NULL);
+ ASSERT (q_value == NULL);
+ ASSERT (non_options_count == 0);
+ ASSERT (unrecognized == '+');
+ ASSERT (optind == 2);
+ }
+
+ /* Check that '--' ends the argument processing. */
+ for (start = 0; start <= 1; start++)
+ {
+ const char *p_value = NULL;
+ const char *q_value = NULL;
+ int non_options_count = 0;
+ const char *non_options[10];
+ int unrecognized = 0;
+ int argc = 0;
+ const char *argv[20];
+ a_seen = 0;
+ b_seen = 0;
+
+ argv[argc++] = "program";
+ argv[argc++] = "donald";
+ argv[argc++] = "-p";
+ argv[argc++] = "billy";
+ argv[argc++] = "duck";
+ argv[argc++] = "-a";
+ argv[argc++] = "--";
+ argv[argc++] = "-b";
+ argv[argc++] = "foo";
+ argv[argc++] = "-q";
+ argv[argc++] = "johnny";
+ argv[argc++] = "bar";
+ argv[argc] = NULL;
+ optind = start;
+ getopt_long_loop (argc, argv, "+abp:q:", long_options_required,
+ &p_value, &q_value,
+ &non_options_count, non_options, &unrecognized);
+ ASSERT (strcmp (argv[0], "program") == 0);
+ ASSERT (strcmp (argv[1], "donald") == 0);
+ ASSERT (strcmp (argv[2], "-p") == 0);
+ ASSERT (strcmp (argv[3], "billy") == 0);
+ ASSERT (strcmp (argv[4], "duck") == 0);
+ ASSERT (strcmp (argv[5], "-a") == 0);
+ ASSERT (strcmp (argv[6], "--") == 0);
+ ASSERT (strcmp (argv[7], "-b") == 0);
+ ASSERT (strcmp (argv[8], "foo") == 0);
+ ASSERT (strcmp (argv[9], "-q") == 0);
+ ASSERT (strcmp (argv[10], "johnny") == 0);
+ ASSERT (strcmp (argv[11], "bar") == 0);
+ ASSERT (argv[12] == NULL);
+ ASSERT (a_seen == 0);
+ ASSERT (b_seen == 0);
+ ASSERT (p_value == NULL);
+ ASSERT (q_value == NULL);
+ ASSERT (non_options_count == 0);
+ ASSERT (unrecognized == 0);
+ ASSERT (optind == 1);
+ }
+
+ /* Check that the '+' flag has to come first. */
+ for (start = 0; start <= 1; start++)
+ {
+ const char *p_value = NULL;
+ const char *q_value = NULL;
+ int non_options_count = 0;
+ const char *non_options[10];
+ int unrecognized = 0;
+ int argc = 0;
+ const char *argv[10];
+ a_seen = 0;
+ b_seen = 0;
+
+ argv[argc++] = "program";
+ argv[argc++] = "donald";
+ argv[argc++] = "-p";
+ argv[argc++] = "billy";
+ argv[argc++] = "duck";
+ argv[argc++] = "-a";
+ argv[argc++] = "bar";
+ argv[argc] = NULL;
+ optind = start;
+ getopt_long_loop (argc, argv, "abp:q:+", long_options_required,
+ &p_value, &q_value,
+ &non_options_count, non_options, &unrecognized);
+ ASSERT (strcmp (argv[0], "program") == 0);
+ ASSERT (strcmp (argv[1], "-p") == 0);
+ ASSERT (strcmp (argv[2], "billy") == 0);
+ ASSERT (strcmp (argv[3], "-a") == 0);
+ ASSERT (strcmp (argv[4], "donald") == 0);
+ ASSERT (strcmp (argv[5], "duck") == 0);
+ ASSERT (strcmp (argv[6], "bar") == 0);
+ ASSERT (argv[7] == NULL);
+ ASSERT (a_seen == 1);
+ ASSERT (b_seen == 0);
+ ASSERT (p_value != NULL && strcmp (p_value, "billy") == 0);
+ ASSERT (q_value == NULL);
+ ASSERT (non_options_count == 0);
+ ASSERT (unrecognized == 0);
+ ASSERT (optind == 4);
+ }
+}
+
+/* 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 */
+static void
+test_getopt_long_posix (void)
+{
+ int start;
+
+ /* Check that POSIXLY_CORRECT stops parsing the same as leading '+'. */
+ for (start = 0; start <= 1; start++)
+ {
+ const char *p_value = NULL;
+ const char *q_value = NULL;
+ int non_options_count = 0;
+ const char *non_options[10];
+ int unrecognized = 0;
+ int argc = 0;
+ const char *argv[10];
+ a_seen = 0;
+ b_seen = 0;
+
+ argv[argc++] = "program";
+ argv[argc++] = "donald";
+ argv[argc++] = "-p";
+ argv[argc++] = "billy";
+ argv[argc++] = "duck";
+ argv[argc++] = "-a";
+ argv[argc++] = "bar";
+ argv[argc] = NULL;
+ optind = start;
+ getopt_long_loop (argc, argv, "abp:q:", long_options_required,
+ &p_value, &q_value,
+ &non_options_count, non_options, &unrecognized);
+ ASSERT (strcmp (argv[0], "program") == 0);
+ ASSERT (strcmp (argv[1], "donald") == 0);
+ ASSERT (strcmp (argv[2], "-p") == 0);
+ ASSERT (strcmp (argv[3], "billy") == 0);
+ ASSERT (strcmp (argv[4], "duck") == 0);
+ ASSERT (strcmp (argv[5], "-a") == 0);
+ ASSERT (strcmp (argv[6], "bar") == 0);
+ ASSERT (argv[7] == NULL);
+ ASSERT (a_seen == 0);
+ ASSERT (b_seen == 0);
+ ASSERT (p_value == NULL);
+ ASSERT (q_value == NULL);
+ ASSERT (non_options_count == 0);
+ ASSERT (unrecognized == 0);
+ ASSERT (optind == 1);
+ }
+
+ /* Check that POSIXLY_CORRECT doesn't change optional arguments. */
+ for (start = 0; start <= 1; start++)
+ {
+ const char *p_value = NULL;
+ const char *q_value = NULL;
+ int non_options_count = 0;
+ const char *non_options[10];
+ int unrecognized = 0;
+ int argc = 0;
+ const char *argv[10];
+ a_seen = 0;
+ b_seen = 0;
+
+ argv[argc++] = "program";
+ argv[argc++] = "-p";
+ argv[argc++] = "billy";
+ argv[argc] = NULL;
+ optind = start;
+ getopt_long_loop (argc, argv, "p::", long_options_required,
+ &p_value, &q_value,
+ &non_options_count, non_options, &unrecognized);
+ ASSERT (a_seen == 0);
+ ASSERT (b_seen == 0);
+ ASSERT (p_value == NULL);
+ ASSERT (q_value == NULL);
+ ASSERT (non_options_count == 0);
+ ASSERT (unrecognized == 0);
+ ASSERT (optind == 2);
+ }
+
+ /* Check that leading - still sees options after non-options. */
+ for (start = 0; start <= 1; start++)
+ {
+ const char *p_value = NULL;
+ const char *q_value = NULL;
+ int non_options_count = 0;
+ const char *non_options[10];
+ int unrecognized = 0;
+ int argc = 0;
+ const char *argv[10];
+ a_seen = 0;
+ b_seen = 0;
+
+ argv[argc++] = "program";
+ argv[argc++] = "-a";
+ argv[argc++] = "billy";
+ argv[argc++] = "-b";
+ argv[argc] = NULL;
+ optind = start;
+ getopt_long_loop (argc, argv, "-ab", long_options_required,
+ &p_value, &q_value,
+ &non_options_count, non_options, &unrecognized);
+ ASSERT (a_seen == 1);
+ ASSERT (b_seen == 1);
+ ASSERT (p_value == NULL);
+ ASSERT (q_value == NULL);
+ ASSERT (non_options_count == 1);
+ ASSERT (strcmp (non_options[0], "billy") == 0);
+ ASSERT (unrecognized == 0);
+ ASSERT (optind == 4);
+ }
+}
+
+/* Reduce casting, so we can use string literals elsewhere.
+ getopt_long_only takes an array of char*, but luckily does not
+ modify those elements, so we can pass const char*. */
+static int
+do_getopt_long_only (int argc, const char **argv, const char *shortopts,
+ const struct option *longopts, int *longind)
+{
+ return getopt_long_only (argc, (char **) argv, shortopts, longopts, longind);
+}
+
+static void
+test_getopt_long_only (void)
+{
+ /* Test disambiguation of options. */
+ {
+ int argc = 0;
+ const char *argv[10];
+ int option_index;
+ int c;
+
+ argv[argc++] = "program";
+ argv[argc++] = "-x";
+ argv[argc] = NULL;
+ optind = 1;
+ opterr = 0;
+ c = do_getopt_long_only (argc, argv, "ab", long_options_required,
+ &option_index);
+ ASSERT (c == '?');
+ ASSERT (optopt == 0);
+ }
+ {
+ int argc = 0;
+ const char *argv[10];
+ int option_index;
+ int c;
+
+ argv[argc++] = "program";
+ argv[argc++] = "-x";
+ argv[argc] = NULL;
+ optind = 1;
+ opterr = 0;
+ c = do_getopt_long_only (argc, argv, "abx", long_options_required,
+ &option_index);
+ ASSERT (c == 'x');
+ ASSERT (optopt == 0);
+ }
+ {
+ int argc = 0;
+ const char *argv[10];
+ int option_index;
+ int c;
+
+ argv[argc++] = "program";
+ argv[argc++] = "--x";
+ argv[argc] = NULL;
+ optind = 1;
+ opterr = 0;
+ c = do_getopt_long_only (argc, argv, "abx", long_options_required,
+ &option_index);
+ ASSERT (c == '?');
+ ASSERT (optopt == 0);
+ }
+ {
+ int argc = 0;
+ const char *argv[10];
+ int option_index;
+ int c;
+
+ argv[argc++] = "program";
+ argv[argc++] = "-b";
+ argv[argc] = NULL;
+ optind = 1;
+ opterr = 0;
+ b_seen = 0;
+ c = do_getopt_long_only (argc, argv, "abx", long_options_required,
+ &option_index);
+ ASSERT (c == 'b');
+ ASSERT (b_seen == 0);
+ }
+ {
+ int argc = 0;
+ const char *argv[10];
+ int option_index;
+ int c;
+
+ argv[argc++] = "program";
+ argv[argc++] = "--b";
+ argv[argc] = NULL;
+ optind = 1;
+ opterr = 0;
+ b_seen = 0;
+ c = do_getopt_long_only (argc, argv, "abx", long_options_required,
+ &option_index);
+ ASSERT (c == 0);
+ ASSERT (b_seen == 1);
+ }
+ {
+ int argc = 0;
+ const char *argv[10];
+ int option_index;
+ int c;
+
+ argv[argc++] = "program";
+ argv[argc++] = "-xt";
+ argv[argc] = NULL;
+ optind = 1;
+ opterr = 0;
+ c = do_getopt_long_only (argc, argv, "ab", long_options_required,
+ &option_index);
+ ASSERT (c == '?');
+ ASSERT (optopt == 0);
+ }
+ {
+ int argc = 0;
+ const char *argv[10];
+ int option_index;
+ int c;
+
+ argv[argc++] = "program";
+ argv[argc++] = "-xt";
+ argv[argc] = NULL;
+ optind = 1;
+ opterr = 0;
+ c = do_getopt_long_only (argc, argv, "abx", long_options_required,
+ &option_index);
+ ASSERT (c == '?');
+ ASSERT (optopt == 0);
+ }
+ {
+ int argc = 0;
+ const char *argv[10];
+ int option_index;
+ int c;
+
+ argv[argc++] = "program";
+ argv[argc++] = "-xtra";
+ argv[argc] = NULL;
+ optind = 1;
+ opterr = 0;
+ c = do_getopt_long_only (argc, argv, "ab", long_options_required,
+ &option_index);
+ ASSERT (c == 1001);
+ }
+ {
+ int argc = 0;
+ const char *argv[10];
+ int option_index;
+ int c;
+
+ argv[argc++] = "program";
+ argv[argc++] = "-xtreme";
+ argv[argc] = NULL;
+ optind = 1;
+ opterr = 0;
+ c = do_getopt_long_only (argc, argv, "abx:", long_options_required,
+ &option_index);
+ ASSERT (c == 1002);
+ }
+ {
+ int argc = 0;
+ const char *argv[10];
+ int option_index;
+ int c;
+
+ argv[argc++] = "program";
+ argv[argc++] = "-xtremel";
+ argv[argc] = NULL;
+ optind = 1;
+ opterr = 0;
+ c = do_getopt_long_only (argc, argv, "ab", long_options_required,
+ &option_index);
+ /* glibc getopt_long_only is intentionally different from
+ getopt_long when handling a prefix that is common to two
+ spellings, when both spellings have the same option directives.
+ BSD getopt_long_only treats both cases the same. */
+ ASSERT (c == 1003 || c == '?');
+ ASSERT (optind == 2);
+ }
+ {
+ int argc = 0;
+ const char *argv[10];
+ int option_index;
+ int c;
+
+ argv[argc++] = "program";
+ argv[argc++] = "-xtremel";
+ argv[argc] = NULL;
+ optind = 1;
+ opterr = 0;
+ c = do_getopt_long_only (argc, argv, "abx::", long_options_required,
+ &option_index);
+ /* glibc getopt_long_only is intentionally different from
+ getopt_long when handling a prefix that is common to two
+ spellings, when both spellings have the same option directives.
+ BSD getopt_long_only treats both cases the same. */
+ ASSERT (c == 1003 || c == '?');
+ ASSERT (optind == 2);
+ ASSERT (optarg == NULL);
+ }
+ {
+ int argc = 0;
+ const char *argv[10];
+ int option_index;
+ int c;
+
+ argv[argc++] = "program";
+ argv[argc++] = "-xtras";
+ argv[argc] = NULL;
+ optind = 1;
+ opterr = 0;
+ c = do_getopt_long_only (argc, argv, "abx::", long_options_required,
+ &option_index);
+ ASSERT (c == 'x');
+ ASSERT (strcmp (optarg, "tras") == 0);
+ }
+}
diff --git a/gnulib-tests/test-getprogname.c b/gnulib-tests/test-getprogname.c
new file mode 100644
index 0000000..7c2b872
--- /dev/null
+++ b/gnulib-tests/test-getprogname.c
@@ -0,0 +1,58 @@
+/* Test the gnulib getprogname module.
+ Copyright (C) 2016 Free Software Foundation, Inc.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+#include <config.h>
+
+#include "getprogname.h"
+#include <string.h>
+#include <assert.h>
+
+#ifdef __hpux
+# define STREQ(a, b) (strncmp (a, b, 14) == 0)
+#else
+# define STREQ(a, b) (strcmp (a, b) == 0)
+#endif
+
+int
+main (void)
+{
+ char const *p = getprogname ();
+
+ /* libtool creates a temporary executable whose name is sometimes prefixed
+ with "lt-" (depends on the platform). But the name of the temporary
+ executable is a detail that should not be visible to the end user and to
+ the test suite. Remove this "lt-" prefix here. */
+ if (strncmp (p, "lt-", 3) == 0)
+ p += 3;
+
+ /* Note: You can make this test fail
+ a) by running it on a case-insensitive file system (such as on Windows,
+ Cygwin, or on Mac OS X with a case-insensitive HFS+ file system),
+ with an invocation that contains upper case characters, e.g.
+ test-GETPROGNAME,
+ b) by hardlinking or symlinking it to a different name (e.g. test-foo)
+ and invoking it through that name.
+ That's not the intended use. The Makefile always invokes it as
+ 'test-getprogname${EXEEXT}'. */
+#if defined __CYGWIN__
+ /* The Cygwin getprogname() function strips the ".exe" suffix. */
+ assert (STREQ (p, "test-getprogname"));
+#else
+ assert (STREQ (p, "test-getprogname" EXEEXT));
+#endif
+
+ return 0;
+}
diff --git a/gnulib-tests/test-gettimeofday.c b/gnulib-tests/test-gettimeofday.c
new file mode 100644
index 0000000..7a44d71
--- /dev/null
+++ b/gnulib-tests/test-gettimeofday.c
@@ -0,0 +1,47 @@
+/*
+ * Copyright (C) 2005, 2007, 2009-2016 Free Software Foundation, Inc.
+ * Written by Jim Meyering.
+ *
+ * This 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 <sys/time.h>
+
+#include "signature.h"
+SIGNATURE_CHECK (gettimeofday, int,
+ (struct timeval *, GETTIMEOFDAY_TIMEZONE *));
+
+#include <time.h>
+
+#include <stdio.h>
+#include <string.h>
+
+int
+main (void)
+{
+ time_t t = 0;
+ struct tm *lt;
+ struct tm saved_lt;
+ struct timeval tv;
+ lt = localtime (&t);
+ saved_lt = *lt;
+ gettimeofday (&tv, NULL);
+ if (memcmp (lt, &saved_lt, sizeof (struct tm)) != 0)
+ {
+ fprintf (stderr, "gettimeofday still clobbers the localtime buffer!\n");
+ return 1;
+ }
+ return 0;
+}
diff --git a/gnulib-tests/test-ignore-value.c b/gnulib-tests/test-ignore-value.c
new file mode 100644
index 0000000..7c4b2de
--- /dev/null
+++ b/gnulib-tests/test-ignore-value.c
@@ -0,0 +1,84 @@
+/* Test the "ignore-value" module.
+
+ Copyright (C) 2011-2016 Free Software Foundation, Inc.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+/* Written by Eric Blake. */
+
+#include <config.h>
+
+#include "ignore-value.h"
+
+#include <stdio.h>
+
+#ifndef _GL_ATTRIBUTE_RETURN_CHECK
+# if __GNUC__ < 3 || (__GNUC__ == 3 && __GNUC_MINOR__ < 4)
+# define _GL_ATTRIBUTE_RETURN_CHECK
+# else
+# define _GL_ATTRIBUTE_RETURN_CHECK __attribute__((__warn_unused_result__))
+# endif
+#endif
+
+struct s { int i; };
+static char doChar (void) _GL_ATTRIBUTE_RETURN_CHECK;
+static int doInt (void) _GL_ATTRIBUTE_RETURN_CHECK;
+static off_t doOff (void) _GL_ATTRIBUTE_RETURN_CHECK;
+static void *doPtr (void) _GL_ATTRIBUTE_RETURN_CHECK;
+static struct s doStruct (void) _GL_ATTRIBUTE_RETURN_CHECK;
+
+static char
+doChar (void)
+{
+ return 0;
+}
+
+static int
+doInt (void)
+{
+ return 0;
+}
+
+static off_t
+doOff (void)
+{
+ return 0;
+}
+
+static void *
+doPtr (void)
+{
+ return NULL;
+}
+
+static struct s
+doStruct (void)
+{
+ static struct s s1;
+ return s1;
+}
+
+int
+main (void)
+{
+ /* If this test can compile with -Werror and the same warnings as
+ the rest of the project, then we are properly silencing warnings
+ about ignored return values. */
+ ignore_value (doChar ());
+ ignore_value (doInt ());
+ ignore_value (doOff ());
+ ignore_value (doPtr ());
+ ignore_value (doStruct ());
+ return 0;
+}
diff --git a/gnulib-tests/test-init.sh b/gnulib-tests/test-init.sh
new file mode 100755
index 0000000..a627859
--- /dev/null
+++ b/gnulib-tests/test-init.sh
@@ -0,0 +1,74 @@
+#!/bin/sh
+# Unit tests for init.sh
+# Copyright (C) 2011-2016 Free Software Foundation, Inc.
+# This file is part of the GNUlib 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,
+# 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/>. */
+
+: ${srcdir=.}
+. "$srcdir/init.sh"; path_prepend_ .
+
+fail=0
+
+test_compare()
+{
+ touch empty || fail=1
+ echo xyz > in || fail=1
+
+ compare /dev/null /dev/null >out 2>err || fail=1
+ test -s out && fail_ "out not empty: $(cat out)"
+ # "err" should be empty, too, but has "set -x" output when VERBOSE=yes
+ case $- in *x*) ;; *) test -s err && fail_ "err not empty: $(cat err)";; esac
+
+ compare /dev/null empty >out 2>err || fail=1
+ test -s out && fail_ "out not empty: $(cat out)"
+ case $- in *x*) ;; *) test -s err && fail_ "err not empty: $(cat err)";; esac
+
+ compare in in >out 2>err || fail=1
+ test -s out && fail_ "out not empty: $(cat out)"
+ case $- in *x*) ;; *) test -s err && fail_ "err not empty: $(cat err)";; esac
+
+ compare /dev/null in >out 2>err && fail=1
+ cat <<\EOF > exp
+diff -u /dev/null in
+--- /dev/null 1970-01-01
++++ in 1970-01-01
++xyz
+EOF
+ compare exp out || fail=1
+ case $- in *x*) ;; *) test -s err && fail_ "err not empty: $(cat err)";; esac
+
+ compare empty in >out 2>err && fail=1
+ # Compare against expected output only if compare is using diff -u.
+ if grep @ out >/dev/null; then
+ # Remove the TAB-date suffix on each --- and +++ line,
+ # for both the expected and the actual output files.
+ # Also remove the @@ line, since Solaris 5.10 and GNU diff formats differ:
+ # -@@ -0,0 +1 @@
+ # +@@ -1,0 +1,1 @@
+ # Also, remove space after leading '+', since AIX 7.1 diff outputs a space.
+ sed 's/ .*//;/^@@/d;s/^+ /+/' out > k && mv k out
+ cat <<\EOF > exp
+--- empty
++++ in
++xyz
+EOF
+ compare exp out || fail=1
+ fi
+ case $- in *x*) ;; *) test -s err && fail_ "err not empty: $(cat err)";; esac
+}
+
+test_compare
+
+Exit $fail
diff --git a/gnulib-tests/test-intprops.c b/gnulib-tests/test-intprops.c
new file mode 100644
index 0000000..0a8ddcd
--- /dev/null
+++ b/gnulib-tests/test-intprops.c
@@ -0,0 +1,370 @@
+/* Test intprops.h.
+ Copyright (C) 2011-2016 Free Software Foundation, Inc.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+/* Written by Paul Eggert. */
+
+/* Tell gcc not to warn about the long expressions that the overflow
+ macros expand to, or about the (X < 0) expressions. */
+#if 4 < __GNUC__ + (3 <= __GNUC_MINOR__)
+# pragma GCC diagnostic ignored "-Woverlength-strings"
+# pragma GCC diagnostic ignored "-Wtype-limits"
+
+/* Work around a bug in GCC 6.1 and earlier; see:
+ https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68971 */
+# pragma GCC diagnostic ignored "-Woverflow"
+
+#endif
+
+#include <config.h>
+
+#include "intprops.h"
+#include "verify.h"
+
+#include <stdbool.h>
+#include <inttypes.h>
+#include <limits.h>
+
+#include "macros.h"
+
+/* VERIFY (X) uses a static assertion for compilers that are known to work,
+ 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>. */
+#if __GNUC__ || __SUNPRO_C
+# define VERIFY(x) do { verify (x); } while (0)
+#else
+# define VERIFY(x) ASSERT (x)
+#endif
+
+#define DONTCARE __LINE__
+
+int
+main (void)
+{
+ /* Use VERIFY for tests that must be integer constant expressions,
+ ASSERT otherwise. */
+
+ /* TYPE_IS_INTEGER. */
+ ASSERT (TYPE_IS_INTEGER (bool));
+ ASSERT (TYPE_IS_INTEGER (char));
+ ASSERT (TYPE_IS_INTEGER (signed char));
+ ASSERT (TYPE_IS_INTEGER (unsigned char));
+ ASSERT (TYPE_IS_INTEGER (short int));
+ ASSERT (TYPE_IS_INTEGER (unsigned short int));
+ ASSERT (TYPE_IS_INTEGER (int));
+ ASSERT (TYPE_IS_INTEGER (unsigned int));
+ ASSERT (TYPE_IS_INTEGER (long int));
+ ASSERT (TYPE_IS_INTEGER (unsigned long int));
+ ASSERT (TYPE_IS_INTEGER (intmax_t));
+ ASSERT (TYPE_IS_INTEGER (uintmax_t));
+ ASSERT (! TYPE_IS_INTEGER (float));
+ ASSERT (! TYPE_IS_INTEGER (double));
+ ASSERT (! TYPE_IS_INTEGER (long double));
+
+ /* TYPE_SIGNED. */
+ /* VERIFY (! TYPE_SIGNED (bool)); // not guaranteed by gnulib substitute */
+ VERIFY (TYPE_SIGNED (signed char));
+ VERIFY (! TYPE_SIGNED (unsigned char));
+ VERIFY (TYPE_SIGNED (short int));
+ VERIFY (! TYPE_SIGNED (unsigned short int));
+ VERIFY (TYPE_SIGNED (int));
+ VERIFY (! TYPE_SIGNED (unsigned int));
+ VERIFY (TYPE_SIGNED (long int));
+ VERIFY (! TYPE_SIGNED (unsigned long int));
+ VERIFY (TYPE_SIGNED (intmax_t));
+ VERIFY (! TYPE_SIGNED (uintmax_t));
+ ASSERT (TYPE_SIGNED (float));
+ ASSERT (TYPE_SIGNED (double));
+ ASSERT (TYPE_SIGNED (long double));
+
+ /* Integer representation. Check that it is two's complement. */
+ VERIFY (INT_MIN + INT_MAX < 0);
+
+ /* TYPE_MINIMUM, TYPE_MAXIMUM. */
+ VERIFY (TYPE_MINIMUM (char) == CHAR_MIN);
+ VERIFY (TYPE_MAXIMUM (char) == CHAR_MAX);
+ VERIFY (TYPE_MINIMUM (unsigned char) == 0);
+ VERIFY (TYPE_MAXIMUM (unsigned char) == UCHAR_MAX);
+ 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 (unsigned short int) == 0);
+ VERIFY (TYPE_MAXIMUM (unsigned short int) == USHRT_MAX);
+ VERIFY (TYPE_MINIMUM (int) == INT_MIN);
+ VERIFY (TYPE_MAXIMUM (int) == INT_MAX);
+ VERIFY (TYPE_MINIMUM (unsigned int) == 0);
+ VERIFY (TYPE_MAXIMUM (unsigned int) == UINT_MAX);
+ VERIFY (TYPE_MINIMUM (long int) == LONG_MIN);
+ VERIFY (TYPE_MAXIMUM (long int) == LONG_MAX);
+ VERIFY (TYPE_MINIMUM (unsigned long int) == 0);
+ VERIFY (TYPE_MAXIMUM (unsigned long int) == ULONG_MAX);
+ 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);
+
+ /* INT_BITS_STRLEN_BOUND. */
+ VERIFY (INT_BITS_STRLEN_BOUND (1) == 1);
+ VERIFY (INT_BITS_STRLEN_BOUND (2620) == 789);
+
+ /* INT_STRLEN_BOUND, INT_BUFSIZE_BOUND. */
+ #ifdef INT32_MAX /* POSIX guarantees int32_t; this ports to non-POSIX. */
+ VERIFY (INT_STRLEN_BOUND (int32_t) == sizeof ("-2147483648") - 1);
+ VERIFY (INT_BUFSIZE_BOUND (int32_t) == sizeof ("-2147483648"));
+ #endif
+ #ifdef INT64_MAX
+ VERIFY (INT_STRLEN_BOUND (int64_t) == sizeof ("-9223372036854775808") - 1);
+ VERIFY (INT_BUFSIZE_BOUND (int64_t) == sizeof ("-9223372036854775808"));
+ #endif
+
+ /* All the INT_<op>_RANGE_OVERFLOW tests are equally valid as
+ INT_<op>_OVERFLOW tests, so define macros to do both. OP is the
+ operation, OPNAME its symbolic name, A and B its operands, T the
+ result type, V the overflow flag, and VRES the result if V and if
+ two's complement. CHECK_BINOP is for most binary operatinos,
+ CHECK_SBINOP for binary +, -, * when the result type is signed,
+ and CHECK_UNOP for unary operations. */
+ #define CHECK_BINOP(op, opname, a, b, t, v, vres) \
+ VERIFY (INT_##opname##_RANGE_OVERFLOW (a, b, TYPE_MINIMUM (t), \
+ TYPE_MAXIMUM (t)) \
+ == (v)); \
+ VERIFY (INT_##opname##_OVERFLOW (a, b) == (v))
+ #define CHECK_SBINOP(op, opname, a, b, t, v, vres) \
+ CHECK_BINOP(op, opname, a, b, t, v, vres); \
+ { \
+ t result; \
+ ASSERT (INT_##opname##_WRAPV (a, b, &result) == (v)); \
+ ASSERT (result == ((v) ? (vres) : ((a) op (b)))); \
+ }
+ #define CHECK_UNOP(op, opname, a, t, v) \
+ VERIFY (INT_##opname##_RANGE_OVERFLOW (a, TYPE_MINIMUM (t), \
+ TYPE_MAXIMUM (t)) \
+ == (v)); \
+ VERIFY (INT_##opname##_OVERFLOW (a) == (v))
+
+ /* INT_<op>_RANGE_OVERFLOW, INT_<op>_OVERFLOW. */
+ VERIFY (INT_ADD_RANGE_OVERFLOW (INT_MAX, 1, INT_MIN, INT_MAX));
+ VERIFY (INT_ADD_OVERFLOW (INT_MAX, 1));
+
+ CHECK_SBINOP (+, ADD, INT_MAX, 1, int, true, INT_MIN);
+ CHECK_SBINOP (+, ADD, INT_MAX, -1, int, false, INT_MAX - 1);
+ CHECK_SBINOP (+, ADD, INT_MIN, 1, int, false, INT_MIN + 1);
+ CHECK_SBINOP (+, ADD, INT_MIN, -1, int, true, INT_MAX);
+ CHECK_BINOP (+, ADD, UINT_MAX, 1u, unsigned int, true, 0u);
+ CHECK_BINOP (+, ADD, 0u, 1u, unsigned int, false, 1u);
+
+ CHECK_SBINOP (-, SUBTRACT, INT_MAX, 1, int, false, INT_MAX - 1);
+ CHECK_SBINOP (-, SUBTRACT, INT_MAX, -1, int, true, INT_MIN);
+ CHECK_SBINOP (-, SUBTRACT, INT_MIN, 1, int, true, INT_MAX);
+ CHECK_SBINOP (-, SUBTRACT, INT_MIN, -1, int, false, INT_MIN - -1);
+ CHECK_BINOP (-, SUBTRACT, UINT_MAX, 1u, unsigned int, false, UINT_MAX - 1u);
+ CHECK_BINOP (-, SUBTRACT, 0u, 1u, unsigned int, true, 0u - 1u);
+
+ CHECK_UNOP (-, NEGATE, INT_MIN, int, true);
+ CHECK_UNOP (-, NEGATE, 0, int, false);
+ CHECK_UNOP (-, NEGATE, INT_MAX, int, false);
+ CHECK_UNOP (-, NEGATE, 0u, unsigned int, false);
+ CHECK_UNOP (-, NEGATE, 1u, unsigned int, true);
+ CHECK_UNOP (-, NEGATE, UINT_MAX, unsigned int, true);
+
+ CHECK_SBINOP (*, MULTIPLY, INT_MAX, INT_MAX, int, true, 1);
+ CHECK_SBINOP (*, MULTIPLY, INT_MAX, INT_MIN, int, true, INT_MIN);
+ CHECK_SBINOP (*, MULTIPLY, INT_MIN, INT_MAX, int, true, INT_MIN);
+ CHECK_SBINOP (*, MULTIPLY, INT_MIN, INT_MIN, int, true, 0);
+ CHECK_SBINOP (*, MULTIPLY, -1, INT_MIN, int,
+ INT_NEGATE_OVERFLOW (INT_MIN), INT_MIN);
+ CHECK_SBINOP (*, MULTIPLY, LONG_MIN / INT_MAX, (long int) INT_MAX,
+ long int, false, LONG_MIN - LONG_MIN % INT_MAX);
+
+ CHECK_BINOP (/, DIVIDE, INT_MIN, -1, int,
+ INT_NEGATE_OVERFLOW (INT_MIN), INT_MIN);
+ CHECK_BINOP (/, DIVIDE, INT_MAX, 1, int, false, INT_MAX);
+ CHECK_BINOP (/, DIVIDE, (unsigned int) INT_MIN, -1u, unsigned int,
+ false, INT_MIN / -1u);
+
+ CHECK_BINOP (%, REMAINDER, INT_MIN, -1, int, INT_NEGATE_OVERFLOW (INT_MIN), 0);
+ CHECK_BINOP (%, REMAINDER, INT_MAX, 1, int, false, 0);
+ CHECK_BINOP (%, REMAINDER, (unsigned int) INT_MIN, -1u, unsigned int,
+ false, INT_MIN % -1u);
+
+ CHECK_BINOP (<<, LEFT_SHIFT, UINT_MAX, 1, unsigned int, true, UINT_MAX << 1);
+ CHECK_BINOP (<<, LEFT_SHIFT, UINT_MAX / 2 + 1, 1, unsigned int, true,
+ (UINT_MAX / 2 + 1) << 1);
+ CHECK_BINOP (<<, LEFT_SHIFT, UINT_MAX / 2, 1, unsigned int, false,
+ (UINT_MAX / 2) << 1);
+
+ /* INT_<op>_OVERFLOW and INT_<op>_WRAPV with mixed types. */
+ #define CHECK_SUM(a, b, t, v, vres) \
+ CHECK_SUM1(a, b, t, v, vres); \
+ CHECK_SUM1(b, a, t, v, vres)
+ #define CHECK_SSUM(a, b, t, v, vres) \
+ CHECK_SSUM1(a, b, t, v, vres); \
+ CHECK_SSUM1(b, a, t, v, vres)
+ #define CHECK_SUM1(a, b, t, v, vres) \
+ VERIFY (INT_ADD_OVERFLOW (a, b) == (v))
+ #define CHECK_SSUM1(a, b, t, v, vres) \
+ CHECK_SUM1(a, b, t, v, vres); \
+ { \
+ t result; \
+ ASSERT (INT_ADD_WRAPV (a, b, &result) == (v)); \
+ ASSERT (result == ((v) ? (vres) : ((a) + (b)))); \
+ }
+ CHECK_SSUM (-1, LONG_MIN, long int, true, LONG_MAX);
+ CHECK_SUM (-1, UINT_MAX, unsigned int, false, DONTCARE);
+ CHECK_SSUM (-1L, INT_MIN, long int, INT_MIN == LONG_MIN,
+ INT_MIN == LONG_MIN ? INT_MAX : DONTCARE);
+ CHECK_SUM (0u, -1, unsigned int, true, 0u + -1);
+ CHECK_SUM (0u, 0, unsigned int, false, DONTCARE);
+ CHECK_SUM (0u, 1, unsigned int, false, DONTCARE);
+ CHECK_SSUM (1, LONG_MAX, long int, true, LONG_MIN);
+ CHECK_SUM (1, UINT_MAX, unsigned int, true, 0u);
+ CHECK_SSUM (1L, INT_MAX, long int, INT_MAX == LONG_MAX,
+ INT_MAX == LONG_MAX ? INT_MIN : DONTCARE);
+ CHECK_SUM (1u, INT_MAX, unsigned int, INT_MAX == UINT_MAX, 1u + INT_MAX);
+ CHECK_SUM (1u, INT_MIN, unsigned int, true, 1u + INT_MIN);
+ {
+ long int result;
+ ASSERT (INT_ADD_WRAPV (1, INT_MAX, &result) == (INT_MAX == LONG_MAX));
+ ASSERT (INT_ADD_WRAPV (-1, INT_MIN, &result) == (INT_MIN == LONG_MIN));
+ }
+
+ #define CHECK_DIFFERENCE(a, b, t, v, vres) \
+ VERIFY (INT_SUBTRACT_OVERFLOW (a, b) == (v))
+ #define CHECK_SDIFFERENCE(a, b, t, v, vres) \
+ CHECK_DIFFERENCE(a, b, t, v, vres); \
+ { \
+ t result; \
+ ASSERT (INT_SUBTRACT_WRAPV (a, b, &result) == (v)); \
+ ASSERT (result == ((v) ? (vres) : ((a) - (b)))); \
+ }
+ CHECK_DIFFERENCE (INT_MAX, 1u, unsigned int, UINT_MAX < INT_MAX - 1,
+ INT_MAX - 1u);
+ CHECK_DIFFERENCE (UINT_MAX, 1, unsigned int, false, UINT_MAX - 1);
+ CHECK_DIFFERENCE (0u, -1, unsigned int, false, 0u - -1);
+ CHECK_DIFFERENCE (UINT_MAX, -1, unsigned int, true, UINT_MAX - -1);
+ CHECK_DIFFERENCE (INT_MIN, 1u, unsigned int, true, INT_MIN - 1u);
+ CHECK_DIFFERENCE (-1, 0u, unsigned int, true, -1 - 0u);
+ CHECK_SDIFFERENCE (-1, INT_MIN, int, false, -1 - INT_MIN);
+ CHECK_SDIFFERENCE (-1, INT_MAX, int, false, -1 - INT_MAX);
+ CHECK_SDIFFERENCE (0, INT_MIN, int, INT_MIN < -INT_MAX, INT_MIN);
+ CHECK_SDIFFERENCE (0, INT_MAX, int, false, 0 - INT_MAX);
+ {
+ long int result;
+ ASSERT (INT_SUBTRACT_WRAPV (INT_MAX, -1, &result) == (INT_MAX == LONG_MAX));
+ ASSERT (INT_SUBTRACT_WRAPV (INT_MIN, 1, &result) == (INT_MAX == LONG_MAX));
+ }
+
+ #define CHECK_PRODUCT(a, b, t, v, vres) \
+ CHECK_PRODUCT1(a, b, t, v, vres); \
+ CHECK_PRODUCT1(b, a, t, v, vres)
+ #define CHECK_SPRODUCT(a, b, t, v, vres) \
+ CHECK_SPRODUCT1(a, b, t, v, vres); \
+ CHECK_SPRODUCT1(b, a, t, v, vres)
+ #define CHECK_PRODUCT1(a, b, t, v, vres) \
+ VERIFY (INT_MULTIPLY_OVERFLOW (a, b) == (v))
+ #define CHECK_SPRODUCT1(a, b, t, v, vres) \
+ CHECK_PRODUCT1(a, b, t, v, vres); \
+ { \
+ t result; \
+ ASSERT (INT_MULTIPLY_WRAPV (a, b, &result) == (v)); \
+ ASSERT (result == ((v) ? (vres) : ((a) * (b)))); \
+ }
+ CHECK_PRODUCT (-1, 1u, unsigned int, true, -1 * 1u);
+ CHECK_SPRODUCT (-1, INT_MIN, int, INT_NEGATE_OVERFLOW (INT_MIN), INT_MIN);
+ CHECK_PRODUCT (-1, UINT_MAX, unsigned int, true, -1 * UINT_MAX);
+ CHECK_SPRODUCT (-32768, LONG_MAX / -32768 - 1, long int, true, LONG_MIN);
+ CHECK_SPRODUCT (-12345, LONG_MAX / -12345, long int, false, DONTCARE);
+ CHECK_SPRODUCT (0, -1, int, false, DONTCARE);
+ CHECK_SPRODUCT (0, 0, int, false, DONTCARE);
+ CHECK_PRODUCT (0, 0u, unsigned int, false, DONTCARE);
+ CHECK_SPRODUCT (0, 1, int, false, DONTCARE);
+ CHECK_SPRODUCT (0, INT_MAX, int, false, DONTCARE);
+ CHECK_SPRODUCT (0, INT_MIN, int, false, DONTCARE);
+ CHECK_PRODUCT (0, UINT_MAX, unsigned int, false, DONTCARE);
+ CHECK_PRODUCT (0u, -1, unsigned int, false, DONTCARE);
+ CHECK_PRODUCT (0u, 0, unsigned int, false, DONTCARE);
+ CHECK_PRODUCT (0u, 0u, unsigned int, false, DONTCARE);
+ CHECK_PRODUCT (0u, 1, unsigned int, false, DONTCARE);
+ CHECK_PRODUCT (0u, INT_MAX, unsigned int, false, DONTCARE);
+ CHECK_PRODUCT (0u, INT_MIN, unsigned int, false, DONTCARE);
+ CHECK_PRODUCT (0u, UINT_MAX, unsigned int, false, DONTCARE);
+ CHECK_SPRODUCT (1, INT_MAX, int, false, DONTCARE);
+ CHECK_SPRODUCT (1, INT_MIN, int, false, DONTCARE);
+ CHECK_PRODUCT (1, UINT_MAX, unsigned int, false, DONTCARE);
+ CHECK_PRODUCT (1u, INT_MIN, unsigned int, true, 1u * INT_MIN);
+ CHECK_PRODUCT (1u, INT_MAX, unsigned int, UINT_MAX < INT_MAX, 1u * INT_MAX);
+ CHECK_PRODUCT (INT_MAX, UINT_MAX, unsigned int, true, INT_MAX * UINT_MAX);
+ CHECK_PRODUCT (INT_MAX, ULONG_MAX, unsigned long int, true,
+ INT_MAX * ULONG_MAX);
+ CHECK_SPRODUCT (INT_MIN, LONG_MAX / INT_MIN - 1, long int, true, LONG_MIN);
+ CHECK_SPRODUCT (INT_MIN, LONG_MAX / INT_MIN, long int, false, DONTCARE);
+ CHECK_PRODUCT (INT_MIN, UINT_MAX, unsigned int, true, INT_MIN * UINT_MAX);
+ CHECK_PRODUCT (INT_MIN, ULONG_MAX, unsigned long int, true,
+ INT_MIN * ULONG_MAX);
+ {
+ long int result;
+ ASSERT (INT_MULTIPLY_WRAPV (INT_MAX, INT_MAX, &result)
+ == (LONG_MAX / INT_MAX < INT_MAX));
+ ASSERT (INT_MULTIPLY_WRAPV (INT_MAX, INT_MAX, &result)
+ || result == INT_MAX * (long int) INT_MAX);
+ ASSERT (INT_MULTIPLY_WRAPV (INT_MIN, INT_MIN, &result)
+ || result == INT_MIN * (long int) INT_MIN);
+ }
+
+# ifdef LLONG_MAX
+ {
+ long long int result;
+ ASSERT (INT_MULTIPLY_WRAPV (LONG_MAX, LONG_MAX, &result)
+ == (LLONG_MAX / LONG_MAX < LONG_MAX));
+ ASSERT (INT_MULTIPLY_WRAPV (LONG_MAX, LONG_MAX, &result)
+ || result == LONG_MAX * (long long int) LONG_MAX);
+ ASSERT (INT_MULTIPLY_WRAPV (LONG_MIN, LONG_MIN, &result)
+ || result == LONG_MIN * (long long int) LONG_MIN);
+ }
+# endif
+
+ #define CHECK_QUOTIENT(a, b, v) VERIFY (INT_DIVIDE_OVERFLOW (a, b) == (v))
+
+ CHECK_QUOTIENT (INT_MIN, -1L, INT_MIN == LONG_MIN);
+ CHECK_QUOTIENT (INT_MIN, UINT_MAX, false);
+ CHECK_QUOTIENT (INTMAX_MIN, UINTMAX_MAX, false);
+ CHECK_QUOTIENT (INTMAX_MIN, UINT_MAX, false);
+ CHECK_QUOTIENT (-11, 10u, true);
+ CHECK_QUOTIENT (-10, 10u, true);
+ CHECK_QUOTIENT (-9, 10u, false);
+ CHECK_QUOTIENT (11u, -10, true);
+ CHECK_QUOTIENT (10u, -10, true);
+ CHECK_QUOTIENT (9u, -10, false);
+
+ #define CHECK_REMAINDER(a, b, v) VERIFY (INT_REMAINDER_OVERFLOW (a, b) == (v))
+
+ CHECK_REMAINDER (INT_MIN, -1L, INT_MIN == LONG_MIN);
+ CHECK_REMAINDER (-1, UINT_MAX, true);
+ CHECK_REMAINDER ((intmax_t) -1, UINTMAX_MAX, true);
+ CHECK_REMAINDER (INTMAX_MIN, UINT_MAX,
+ (INTMAX_MAX < UINT_MAX
+ && - (unsigned int) INTMAX_MIN % UINT_MAX != 0));
+ CHECK_REMAINDER (INT_MIN, ULONG_MAX, INT_MIN % ULONG_MAX != 1);
+ CHECK_REMAINDER (1u, -1, false);
+ CHECK_REMAINDER (37*39u, -39, false);
+ CHECK_REMAINDER (37*39u + 1, -39, true);
+ CHECK_REMAINDER (37*39u - 1, -39, true);
+ CHECK_REMAINDER (LONG_MAX, -INT_MAX, false);
+
+ return 0;
+}
diff --git a/gnulib-tests/test-inttypes.c b/gnulib-tests/test-inttypes.c
new file mode 100644
index 0000000..9a3193c
--- /dev/null
+++ b/gnulib-tests/test-inttypes.c
@@ -0,0 +1,118 @@
+/* Test of <inttypes.h> substitute.
+ Copyright (C) 2006-2007, 2009-2016 Free Software Foundation, Inc.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+/* Written by Bruno Haible <bruno@clisp.org>, 2007. */
+
+#include <config.h>
+
+#include <inttypes.h>
+
+#include <stddef.h>
+
+/* Tests for macros supposed to be defined in inttypes.h. */
+
+const char *k = /* implicit string concatenation */
+#ifdef INT8_MAX
+ PRId8 PRIi8
+#endif
+#ifdef UINT8_MAX
+ PRIo8 PRIu8 PRIx8 PRIX8
+#endif
+#ifdef INT16_MAX
+ PRId16 PRIi16
+#endif
+#ifdef UINT16_MAX
+ PRIo16 PRIu16 PRIx16 PRIX16
+#endif
+#ifdef INT32_MAX
+ PRId32 PRIi32
+#endif
+#ifdef UINT32_MAX
+ PRIo32 PRIu32 PRIx32 PRIX32
+#endif
+#ifdef INT64_MAX
+ PRId64 PRIi64
+#endif
+#ifdef UINT64_MAX
+ PRIo64 PRIu64 PRIx64 PRIX64
+#endif
+ PRIdLEAST8 PRIiLEAST8 PRIoLEAST8 PRIuLEAST8 PRIxLEAST8 PRIXLEAST8
+ PRIdLEAST16 PRIiLEAST16 PRIoLEAST16 PRIuLEAST16 PRIxLEAST16 PRIXLEAST16
+ PRIdLEAST32 PRIiLEAST32 PRIoLEAST32 PRIuLEAST32 PRIxLEAST32 PRIXLEAST32
+ PRIdLEAST64 PRIiLEAST64
+ PRIoLEAST64 PRIuLEAST64 PRIxLEAST64 PRIXLEAST64
+ PRIdFAST8 PRIiFAST8 PRIoFAST8 PRIuFAST8 PRIxFAST8 PRIXFAST8
+ PRIdFAST16 PRIiFAST16 PRIoFAST16 PRIuFAST16 PRIxFAST16 PRIXFAST16
+ PRIdFAST32 PRIiFAST32 PRIoFAST32 PRIuFAST32 PRIxFAST32 PRIXFAST32
+ PRIdFAST64 PRIiFAST64
+ PRIoFAST64 PRIuFAST64 PRIxFAST64 PRIXFAST64
+ PRIdMAX PRIiMAX PRIoMAX PRIuMAX PRIxMAX PRIXMAX
+#ifdef INTPTR_MAX
+ PRIdPTR PRIiPTR
+#endif
+#ifdef UINTPTR_MAX
+ PRIoPTR PRIuPTR PRIxPTR PRIXPTR
+#endif
+ ;
+const char *l = /* implicit string concatenation */
+#ifdef INT8_MAX
+ SCNd8 SCNi8
+#endif
+#ifdef UINT8_MAX
+ SCNo8 SCNu8 SCNx8
+#endif
+#ifdef INT16_MAX
+ SCNd16 SCNi16
+#endif
+#ifdef UINT16_MAX
+ SCNo16 SCNu16 SCNx16
+#endif
+#ifdef INT32_MAX
+ SCNd32 SCNi32
+#endif
+#ifdef UINT32_MAX
+ SCNo32 SCNu32 SCNx32
+#endif
+#ifdef INT64_MAX
+ SCNd64 SCNi64
+#endif
+#ifdef UINT64_MAX
+ SCNo64 SCNu64 SCNx64
+#endif
+ SCNdLEAST8 SCNiLEAST8 SCNoLEAST8 SCNuLEAST8 SCNxLEAST8
+ SCNdLEAST16 SCNiLEAST16 SCNoLEAST16 SCNuLEAST16 SCNxLEAST16
+ SCNdLEAST32 SCNiLEAST32 SCNoLEAST32 SCNuLEAST32 SCNxLEAST32
+ SCNdLEAST64 SCNiLEAST64
+ SCNoLEAST64 SCNuLEAST64 SCNxLEAST64
+ SCNdFAST8 SCNiFAST8 SCNoFAST8 SCNuFAST8 SCNxFAST8
+ SCNdFAST16 SCNiFAST16 SCNoFAST16 SCNuFAST16 SCNxFAST16
+ SCNdFAST32 SCNiFAST32 SCNoFAST32 SCNuFAST32 SCNxFAST32
+ SCNdFAST64 SCNiFAST64
+ SCNoFAST64 SCNuFAST64 SCNxFAST64
+ SCNdMAX SCNiMAX SCNoMAX SCNuMAX SCNxMAX
+#ifdef INTPTR_MAX
+ SCNdPTR SCNiPTR
+#endif
+#ifdef UINTPTR_MAX
+ SCNoPTR SCNuPTR SCNxPTR
+#endif
+ ;
+
+int
+main (void)
+{
+ return 0;
+}
diff --git a/gnulib-tests/test-isblank.c b/gnulib-tests/test-isblank.c
new file mode 100644
index 0000000..2f6f676
--- /dev/null
+++ b/gnulib-tests/test-isblank.c
@@ -0,0 +1,50 @@
+/* Test of isblank() function.
+ Copyright (C) 2009-2016 Free Software Foundation, Inc.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+/* Written by Bruno Haible <bruno@clisp.org>, 2009. */
+
+#include <config.h>
+
+#include <ctype.h>
+
+#include "signature.h"
+SIGNATURE_CHECK (isblank, int, (int));
+
+#include <limits.h>
+#include <stdio.h>
+
+#include "macros.h"
+
+int
+main (int argc, char *argv[])
+{
+ unsigned int c;
+
+ /* Verify the property in the "C" locale.
+ POSIX specifies in
+ <http://www.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap07.html>
+ that
+ - in all locales, the blank characters include the <space> and <tab>
+ characters,
+ - in the "POSIX" locale (which is usually the same as the "C" locale),
+ the blank characters include only the ASCII <space> and <tab>
+ characters. */
+ for (c = 0; c <= UCHAR_MAX; c++)
+ ASSERT (!isblank (c) == !(c == ' ' || c == '\t'));
+ ASSERT (!isblank (EOF));
+
+ return 0;
+}
diff --git a/gnulib-tests/test-langinfo.c b/gnulib-tests/test-langinfo.c
new file mode 100644
index 0000000..30b0007
--- /dev/null
+++ b/gnulib-tests/test-langinfo.c
@@ -0,0 +1,92 @@
+/* Test of <langinfo.h> substitute.
+ Copyright (C) 2009-2016 Free Software Foundation, Inc.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+/* Written by Bruno Haible <bruno@clisp.org>, 2009. */
+
+#include <config.h>
+
+#include <langinfo.h>
+
+/* Check that all the nl_item values are defined. */
+int items[] =
+ {
+ /* nl_langinfo items of the LC_CTYPE category */
+ CODESET,
+ /* nl_langinfo items of the LC_NUMERIC category */
+ RADIXCHAR,
+ THOUSEP,
+ /* nl_langinfo items of the LC_TIME category */
+ D_T_FMT,
+ D_FMT,
+ T_FMT,
+ T_FMT_AMPM,
+ AM_STR,
+ PM_STR,
+ DAY_1,
+ DAY_2,
+ DAY_3,
+ DAY_4,
+ DAY_5,
+ DAY_6,
+ DAY_7,
+ ABDAY_1,
+ ABDAY_2,
+ ABDAY_3,
+ ABDAY_4,
+ ABDAY_5,
+ ABDAY_6,
+ ABDAY_7,
+ MON_1,
+ MON_2,
+ MON_3,
+ MON_4,
+ MON_5,
+ MON_6,
+ MON_7,
+ MON_8,
+ MON_9,
+ MON_10,
+ MON_11,
+ MON_12,
+ ABMON_1,
+ ABMON_2,
+ ABMON_3,
+ ABMON_4,
+ ABMON_5,
+ ABMON_6,
+ ABMON_7,
+ ABMON_8,
+ ABMON_9,
+ ABMON_10,
+ ABMON_11,
+ ABMON_12,
+ ERA,
+ ERA_D_FMT,
+ ERA_D_T_FMT,
+ ERA_T_FMT,
+ ALT_DIGITS,
+ /* nl_langinfo items of the LC_MONETARY category */
+ CRNCYSTR,
+ /* nl_langinfo items of the LC_MESSAGES category */
+ YESEXPR,
+ NOEXPR
+ };
+
+int
+main (void)
+{
+ return 0;
+}
diff --git a/gnulib-tests/test-limits-h.c b/gnulib-tests/test-limits-h.c
new file mode 100644
index 0000000..f5576bf
--- /dev/null
+++ b/gnulib-tests/test-limits-h.c
@@ -0,0 +1,50 @@
+/* Test of <limits.h> substitute.
+ Copyright 2016 Free Software Foundation, Inc.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+/* Written by Paul Eggert. */
+
+#include <config.h>
+
+#include <limits.h>
+
+#include "verify.h"
+
+#if 4 < __GNUC__ + (3 <= __GNUC_MINOR__)
+# pragma GCC diagnostic ignored "-Woverlength-strings"
+#endif
+
+/* Macros specified by ISO/IEC TS 18661-1:2014. */
+
+#define verify_width(width, min, max) \
+ verify ((max) >> ((width) - 1 - ((min) < 0)) == 1)
+
+verify_width (CHAR_WIDTH, CHAR_MIN, CHAR_MAX);
+verify_width (SCHAR_WIDTH, SCHAR_MIN, SCHAR_MAX);
+verify_width (UCHAR_WIDTH, 0, UCHAR_MAX);
+verify_width (SHRT_WIDTH, SHRT_MIN, SHRT_MAX);
+verify_width (USHRT_WIDTH, 0, USHRT_MAX);
+verify_width (INT_WIDTH, INT_MIN, INT_MAX);
+verify_width (UINT_WIDTH, 0, UINT_MAX);
+verify_width (LONG_WIDTH, LONG_MIN, LONG_MAX);
+verify_width (ULONG_WIDTH, 0, ULONG_MAX);
+verify_width (LLONG_WIDTH, LLONG_MIN, LLONG_MAX);
+verify_width (ULLONG_WIDTH, 0, ULLONG_MAX);
+
+int
+main (void)
+{
+ return 0;
+}
diff --git a/gnulib-tests/test-link.c b/gnulib-tests/test-link.c
new file mode 100644
index 0000000..bdd20aa
--- /dev/null
+++ b/gnulib-tests/test-link.c
@@ -0,0 +1,47 @@
+/* Test of link() function.
+ Copyright (C) 2009-2016 Free Software Foundation, Inc.
+
+ This 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 <unistd.h>
+
+#include "signature.h"
+SIGNATURE_CHECK (link, int, (char const *, char const *));
+
+#include <errno.h>
+#include <fcntl.h>
+#include <stdbool.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <sys/stat.h>
+#include <unistd.h>
+
+#include "ignore-value.h"
+#include "macros.h"
+
+#define BASE "test-link.t"
+
+#include "test-link.h"
+
+int
+main (void)
+{
+ /* Remove any garbage left from previous partial runs. */
+ ignore_value (system ("rm -rf " BASE "*"));
+
+ return test_link (link, true);
+}
diff --git a/gnulib-tests/test-link.h b/gnulib-tests/test-link.h
new file mode 100644
index 0000000..1ae8544
--- /dev/null
+++ b/gnulib-tests/test-link.h
@@ -0,0 +1,182 @@
+/* Test of link() function.
+ Copyright (C) 2009-2016 Free Software Foundation, Inc.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+/* This file is designed to test both link(a,b) and
+ linkat(AT_FDCWD,a,AT_FDCWD,b,0). FUNC is the function to test.
+ Assumes that BASE and ASSERT are already defined, and that
+ appropriate headers are already included. If PRINT, warn before
+ skipping tests with status 77. This test does not try to create
+ hard links to symlinks, but does test other aspects of symlink. */
+
+static int
+test_link (int (*func) (char const *, char const *), bool print)
+{
+ int fd;
+ int ret;
+
+ /* Create first file. */
+ fd = open (BASE "a", O_CREAT | O_EXCL | O_WRONLY, 0600);
+ ASSERT (0 <= fd);
+ ASSERT (write (fd, "hello", 5) == 5);
+ ASSERT (close (fd) == 0);
+
+ /* Not all file systems support link. Mingw doesn't have reliable
+ st_nlink on hard links, but our implementation does fail with
+ EPERM on poor file systems, and we can detect the inferior stat()
+ via st_ino. Cygwin 1.5.x copies rather than links files on those
+ file systems, but there, st_nlink and st_ino are reliable. */
+ ret = func (BASE "a", BASE "b");
+ if (!ret)
+ {
+ struct stat st;
+ ASSERT (stat (BASE "b", &st) == 0);
+ if (st.st_ino && st.st_nlink != 2)
+ {
+ ASSERT (unlink (BASE "b") == 0);
+ errno = EPERM;
+ ret = -1;
+ }
+ }
+ if (ret == -1)
+ {
+ /* If the device does not support hard links, errno is
+ EPERM on Linux, EOPNOTSUPP on FreeBSD. */
+ switch (errno)
+ {
+ case EPERM:
+ case EOPNOTSUPP:
+ if (print)
+ fputs ("skipping test: "
+ "hard links not supported on this file system\n",
+ stderr);
+ ASSERT (unlink (BASE "a") == 0);
+ return 77;
+ default:
+ perror ("link");
+ return 1;
+ }
+ }
+ ASSERT (ret == 0);
+
+ /* Now, for some behavior tests. Modify the contents of 'b', and
+ ensure that 'a' can see it, both while 'b' exists and after. */
+ fd = open (BASE "b", O_APPEND | O_WRONLY);
+ ASSERT (0 <= fd);
+ ASSERT (write (fd, "world", 5) == 5);
+ ASSERT (close (fd) == 0);
+ {
+ char buf[11] = { 0 };
+ fd = open (BASE "a", O_RDONLY);
+ ASSERT (0 <= fd);
+ ASSERT (read (fd, buf, 10) == 10);
+ ASSERT (strcmp (buf, "helloworld") == 0);
+ ASSERT (close (fd) == 0);
+ ASSERT (unlink (BASE "b") == 0);
+ fd = open (BASE "a", O_RDONLY);
+ ASSERT (0 <= fd);
+ ASSERT (read (fd, buf, 10) == 10);
+ ASSERT (strcmp (buf, "helloworld") == 0);
+ ASSERT (close (fd) == 0);
+ }
+
+ /* Test for various error conditions. */
+ ASSERT (mkdir (BASE "d", 0700) == 0);
+ errno = 0;
+ ASSERT (func (BASE "a", ".") == -1);
+ ASSERT (errno == EEXIST || errno == EINVAL);
+ errno = 0;
+ ASSERT (func (BASE "a", BASE "a") == -1);
+ ASSERT (errno == EEXIST);
+ ASSERT (func (BASE "a", BASE "b") == 0);
+ errno = 0;
+ ASSERT (func (BASE "a", BASE "b") == -1);
+ ASSERT (errno == EEXIST);
+ errno = 0;
+ ASSERT (func (BASE "a", BASE "d") == -1);
+ ASSERT (errno == EEXIST);
+ errno = 0;
+ ASSERT (func (BASE "c", BASE "e") == -1);
+ ASSERT (errno == ENOENT);
+ errno = 0;
+ ASSERT (func (BASE "a", BASE "c/.") == -1);
+ ASSERT (errno == ENOENT);
+ errno = 0;
+ ASSERT (func (BASE "a/", BASE "c") == -1);
+ ASSERT (errno == ENOTDIR || errno == EINVAL);
+ errno = 0;
+ ASSERT (func (BASE "a", BASE "c/") == -1);
+ ASSERT (errno == ENOTDIR || errno == ENOENT || errno == EINVAL);
+
+ /* Most platforms reject hard links to directories, and even on
+ those that do permit it, most users can't create them. We assume
+ that if this test is run as root and we managed to create a hard
+ link, then unlink better be able to clean it up. */
+ {
+ int result;
+ errno = 0;
+ result = func (BASE "d", BASE "c");
+ if (result == 0)
+ {
+ /* Probably root on Solaris. */
+ ASSERT (unlink (BASE "c") == 0);
+ }
+ else
+ {
+ /* Most everyone else. */
+ ASSERT (errno == EPERM || errno == EACCES || errno == EISDIR);
+ errno = 0;
+ ASSERT (func (BASE "d/.", BASE "c") == -1);
+ ASSERT (errno == EPERM || errno == EACCES || errno == EISDIR
+ || errno == EINVAL);
+ errno = 0;
+ ASSERT (func (BASE "d/.//", BASE "c") == -1);
+ ASSERT (errno == EPERM || errno == EACCES || errno == EISDIR
+ || errno == EINVAL);
+ }
+ }
+ ASSERT (unlink (BASE "a") == 0);
+ errno = 0;
+ ASSERT (unlink (BASE "c") == -1);
+ ASSERT (errno == ENOENT);
+ ASSERT (rmdir (BASE "d") == 0);
+
+ /* Test invalid use of symlink. */
+ if (symlink (BASE "a", BASE "link") != 0)
+ {
+ ASSERT (unlink (BASE "b") == 0);
+ if (print)
+ fputs ("skipping test: symlinks not supported on this file system\n",
+ stderr);
+ return 77;
+ }
+ errno = 0;
+ ASSERT (func (BASE "b", BASE "link/") == -1);
+ ASSERT (errno == ENOTDIR || errno == ENOENT || errno == EEXIST
+ || errno == EINVAL);
+ errno = 0;
+ ASSERT (func (BASE "b", BASE "link") == -1);
+ ASSERT (errno == EEXIST);
+ ASSERT (rename (BASE "b", BASE "a") == 0);
+ errno = 0;
+ ASSERT (func (BASE "link/", BASE "b") == -1);
+ ASSERT (errno == ENOTDIR || errno == EEXIST || errno == EINVAL);
+
+ /* Clean up. */
+ ASSERT (unlink (BASE "a") == 0);
+ ASSERT (unlink (BASE "link") == 0);
+
+ return 0;
+}
diff --git a/gnulib-tests/test-locale.c b/gnulib-tests/test-locale.c
new file mode 100644
index 0000000..c1811af
--- /dev/null
+++ b/gnulib-tests/test-locale.c
@@ -0,0 +1,80 @@
+/* Test of <locale.h> substitute.
+ Copyright (C) 2007, 2009-2016 Free Software Foundation, Inc.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+/* Written by Bruno Haible <bruno@clisp.org>, 2007. */
+
+#include <config.h>
+
+#include <locale.h>
+
+#include "verify.h"
+
+int a[] =
+ {
+ LC_ALL,
+ LC_COLLATE,
+ LC_CTYPE,
+ LC_MESSAGES,
+ LC_MONETARY,
+ LC_NUMERIC,
+ LC_TIME
+ };
+
+/* Check that the 'struct lconv' type is defined. */
+struct lconv l;
+int ls;
+
+/* Check that NULL can be passed through varargs as a pointer type,
+ per POSIX 2008. */
+verify (sizeof NULL == sizeof (void *));
+
+int
+main ()
+{
+#if HAVE_NEWLOCALE
+ /* Check that the locale_t type and the LC_GLOBAL_LOCALE macro are defined. */
+ locale_t b = LC_GLOBAL_LOCALE;
+ (void) b;
+#endif
+
+ /* Check that 'struct lconv' has the ISO C and POSIX specified members. */
+ ls += sizeof (*l.decimal_point);
+ ls += sizeof (*l.thousands_sep);
+ ls += sizeof (*l.grouping);
+ ls += sizeof (*l.mon_decimal_point);
+ ls += sizeof (*l.mon_thousands_sep);
+ ls += sizeof (*l.mon_grouping);
+ ls += sizeof (*l.positive_sign);
+ ls += sizeof (*l.negative_sign);
+ ls += sizeof (*l.currency_symbol);
+ ls += sizeof (l.frac_digits);
+ ls += sizeof (l.p_cs_precedes);
+ ls += sizeof (l.p_sign_posn);
+ ls += sizeof (l.p_sep_by_space);
+ ls += sizeof (l.n_cs_precedes);
+ ls += sizeof (l.n_sign_posn);
+ ls += sizeof (l.n_sep_by_space);
+ ls += sizeof (*l.int_curr_symbol);
+ ls += sizeof (l.int_frac_digits);
+ ls += sizeof (l.int_p_cs_precedes);
+ ls += sizeof (l.int_p_sign_posn);
+ ls += sizeof (l.int_p_sep_by_space);
+ ls += sizeof (l.int_n_cs_precedes);
+ ls += sizeof (l.int_n_sign_posn);
+ ls += sizeof (l.int_n_sep_by_space);
+
+ return 0;
+}
diff --git a/gnulib-tests/test-localeconv.c b/gnulib-tests/test-localeconv.c
new file mode 100644
index 0000000..9e83f2d
--- /dev/null
+++ b/gnulib-tests/test-localeconv.c
@@ -0,0 +1,72 @@
+/* Test of localeconv() function.
+ Copyright (C) 2012-2016 Free Software Foundation, Inc.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+/* Written by Bruno Haible <bruno@clisp.org>, 2012. */
+
+#include <config.h>
+
+#include <locale.h>
+
+#include "signature.h"
+SIGNATURE_CHECK (localeconv, struct lconv *, (void));
+
+#include <limits.h>
+#include <string.h>
+
+#include "macros.h"
+
+int
+main ()
+{
+ /* Test localeconv() result in the "C" locale. */
+ {
+ struct lconv *l = localeconv ();
+
+ ASSERT (STREQ (l->decimal_point, "."));
+ ASSERT (STREQ (l->thousands_sep, ""));
+#if !(defined __FreeBSD__ || defined __sun)
+ ASSERT (STREQ (l->grouping, ""));
+#endif
+
+ ASSERT (STREQ (l->mon_decimal_point, ""));
+ ASSERT (STREQ (l->mon_thousands_sep, ""));
+#if !(defined __FreeBSD__ || defined __sun)
+ ASSERT (STREQ (l->mon_grouping, ""));
+#endif
+ ASSERT (STREQ (l->positive_sign, ""));
+ ASSERT (STREQ (l->negative_sign, ""));
+
+ ASSERT (STREQ (l->currency_symbol, ""));
+ ASSERT (l->frac_digits == CHAR_MAX);
+ ASSERT (l->p_cs_precedes == CHAR_MAX);
+ ASSERT (l->p_sign_posn == CHAR_MAX);
+ ASSERT (l->p_sep_by_space == CHAR_MAX);
+ ASSERT (l->n_cs_precedes == CHAR_MAX);
+ ASSERT (l->n_sign_posn == CHAR_MAX);
+ ASSERT (l->n_sep_by_space == CHAR_MAX);
+
+ ASSERT (STREQ (l->int_curr_symbol, ""));
+ ASSERT (l->int_frac_digits == CHAR_MAX);
+ ASSERT (l->int_p_cs_precedes == CHAR_MAX);
+ ASSERT (l->int_p_sign_posn == CHAR_MAX);
+ ASSERT (l->int_p_sep_by_space == CHAR_MAX);
+ ASSERT (l->int_n_cs_precedes == CHAR_MAX);
+ ASSERT (l->int_n_sign_posn == CHAR_MAX);
+ ASSERT (l->int_n_sep_by_space == CHAR_MAX);
+ }
+
+ return 0;
+}
diff --git a/gnulib-tests/test-localename.c b/gnulib-tests/test-localename.c
new file mode 100644
index 0000000..be8fcaf
--- /dev/null
+++ b/gnulib-tests/test-localename.c
@@ -0,0 +1,769 @@
+/* Test of gl_locale_name function and its variants.
+ Copyright (C) 2007-2016 Free Software Foundation, Inc.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+/* Written by Bruno Haible <bruno@clisp.org>, 2007. */
+
+#include <config.h>
+
+#include "localename.h"
+
+#include <locale.h>
+#include <stdlib.h>
+#include <string.h>
+
+#include "macros.h"
+
+
+#if HAVE_NEWLOCALE
+
+static struct { int cat; int mask; const char *string; } const categories[] =
+ {
+ { LC_CTYPE, LC_CTYPE_MASK, "LC_CTYPE" },
+ { LC_NUMERIC, LC_NUMERIC_MASK, "LC_NUMERIC" },
+ { LC_TIME, LC_TIME_MASK, "LC_TIME" },
+ { LC_COLLATE, LC_COLLATE_MASK, "LC_COLLATE" },
+ { LC_MONETARY, LC_MONETARY_MASK, "LC_MONETARY" },
+ { LC_MESSAGES, LC_MESSAGES_MASK, "LC_MESSAGES" }
+# ifdef LC_PAPER
+ , { LC_PAPER, LC_PAPER_MASK, "LC_PAPER" }
+# endif
+# ifdef LC_NAME
+ , { LC_NAME, LC_NAME_MASK, "LC_NAME" }
+# endif
+# ifdef LC_ADDRESS
+ , { LC_ADDRESS, LC_ADDRESS_MASK, "LC_ADDRESS" }
+# endif
+# ifdef LC_TELEPHONE
+ , { LC_TELEPHONE, LC_TELEPHONE_MASK, "LC_TELEPHONE" }
+# endif
+# ifdef LC_MEASUREMENT
+ , { LC_MEASUREMENT, LC_MEASUREMENT_MASK, "LC_MEASUREMENT" }
+# endif
+# ifdef LC_IDENTIFICATION
+ , { LC_IDENTIFICATION, LC_IDENTIFICATION_MASK, "LC_IDENTIFICATION" }
+# endif
+ };
+
+#endif
+
+/* Test the gl_locale_name() function. */
+static void
+test_locale_name (void)
+{
+ const char *name;
+
+ /* Check that gl_locale_name returns non-NULL. */
+ ASSERT (gl_locale_name (LC_MESSAGES, "LC_MESSAGES") != NULL);
+
+ /* Get into a defined state, */
+ setlocale (LC_ALL, "en_US.UTF-8");
+#if HAVE_NEWLOCALE
+ uselocale (LC_GLOBAL_LOCALE);
+#endif
+
+ /* Check that when all environment variables are unset,
+ gl_locale_name returns the default locale. */
+ unsetenv ("LC_ALL");
+ unsetenv ("LC_CTYPE");
+ unsetenv ("LC_MESSAGES");
+ unsetenv ("LC_NUMERIC");
+ unsetenv ("LANG");
+ setlocale (LC_ALL, "");
+ ASSERT (strcmp (gl_locale_name (LC_MESSAGES, "LC_MESSAGES"),
+ gl_locale_name_default ()) == 0);
+ ASSERT (strcmp (gl_locale_name (LC_NUMERIC, "LC_NUMERIC"),
+ gl_locale_name_default ()) == 0);
+
+ /* Check that an empty environment variable is treated like an unset
+ environment variable. */
+
+ setenv ("LC_ALL", "", 1);
+ unsetenv ("LC_CTYPE");
+ unsetenv ("LC_MESSAGES");
+ unsetenv ("LANG");
+ setlocale (LC_ALL, "");
+ ASSERT (strcmp (gl_locale_name (LC_MESSAGES, "LC_MESSAGES"),
+ gl_locale_name_default ()) == 0);
+
+ unsetenv ("LC_ALL");
+ setenv ("LC_CTYPE", "", 1);
+ unsetenv ("LC_MESSAGES");
+ unsetenv ("LANG");
+ setlocale (LC_ALL, "");
+ ASSERT (strcmp (gl_locale_name (LC_MESSAGES, "LC_MESSAGES"),
+ gl_locale_name_default ()) == 0);
+
+ unsetenv ("LC_ALL");
+ unsetenv ("LC_CTYPE");
+ setenv ("LC_MESSAGES", "", 1);
+ unsetenv ("LANG");
+ setlocale (LC_ALL, "");
+ ASSERT (strcmp (gl_locale_name (LC_MESSAGES, "LC_MESSAGES"),
+ gl_locale_name_default ()) == 0);
+
+ unsetenv ("LC_ALL");
+ unsetenv ("LC_CTYPE");
+ unsetenv ("LC_MESSAGES");
+ setenv ("LANG", "", 1);
+ setlocale (LC_ALL, "");
+ ASSERT (strcmp (gl_locale_name (LC_MESSAGES, "LC_MESSAGES"),
+ gl_locale_name_default ()) == 0);
+
+ /* Check that LC_ALL overrides the others, and LANG is overridden by the
+ others. */
+
+ setenv ("LC_ALL", "C", 1);
+ unsetenv ("LC_CTYPE");
+ unsetenv ("LC_MESSAGES");
+ unsetenv ("LANG");
+ setlocale (LC_ALL, "");
+ ASSERT (strcmp (gl_locale_name (LC_MESSAGES, "LC_MESSAGES"), "C") == 0);
+
+ unsetenv ("LC_ALL");
+ setenv ("LC_CTYPE", "C", 1);
+ setenv ("LC_MESSAGES", "C", 1);
+ unsetenv ("LANG");
+ setlocale (LC_ALL, "");
+ ASSERT (strcmp (gl_locale_name (LC_MESSAGES, "LC_MESSAGES"), "C") == 0);
+
+ unsetenv ("LC_ALL");
+ unsetenv ("LC_CTYPE");
+ unsetenv ("LC_MESSAGES");
+ setenv ("LANG", "C", 1);
+ setlocale (LC_ALL, "");
+ ASSERT (strcmp (gl_locale_name (LC_MESSAGES, "LC_MESSAGES"), "C") == 0);
+
+ /* Check mixed situations. */
+
+ unsetenv ("LC_ALL");
+ unsetenv ("LC_CTYPE");
+ setenv ("LC_MESSAGES", "fr_FR.UTF-8", 1);
+ setenv ("LANG", "de_DE.UTF-8", 1);
+ if (setlocale (LC_ALL, "") != NULL)
+ {
+ name = gl_locale_name (LC_CTYPE, "LC_CTYPE");
+ ASSERT (strcmp (name, "de_DE.UTF-8") == 0);
+ name = gl_locale_name (LC_MESSAGES, "LC_MESSAGES");
+ ASSERT (strcmp (name, "fr_FR.UTF-8") == 0);
+ }
+
+ unsetenv ("LC_ALL");
+ unsetenv ("LC_CTYPE");
+ setenv ("LC_MESSAGES", "fr_FR.UTF-8", 1);
+ unsetenv ("LANG");
+ if (setlocale (LC_ALL, "") != NULL)
+ {
+ name = gl_locale_name (LC_CTYPE, "LC_CTYPE");
+ ASSERT (strcmp (name, gl_locale_name_default ()) == 0);
+ name = gl_locale_name (LC_MESSAGES, "LC_MESSAGES");
+ ASSERT (strcmp (name, "fr_FR.UTF-8") == 0);
+ }
+
+#if HAVE_NEWLOCALE
+ /* Check that gl_locale_name considers the thread locale. */
+ {
+ locale_t locale = newlocale (LC_ALL_MASK, "fr_FR.UTF-8", NULL);
+ if (locale != NULL)
+ {
+ uselocale (locale);
+ name = gl_locale_name (LC_CTYPE, "LC_CTYPE");
+ ASSERT (strcmp (name, "fr_FR.UTF-8") == 0);
+ name = gl_locale_name (LC_MESSAGES, "LC_MESSAGES");
+ ASSERT (strcmp (name, "fr_FR.UTF-8") == 0);
+ uselocale (LC_GLOBAL_LOCALE);
+ freelocale (locale);
+ }
+ }
+
+ /* Check that gl_locale_name distinguishes different categories of the
+ thread locale, and that the name is the right one for each. */
+ {
+ unsigned int i;
+
+ for (i = 0; i < SIZEOF (categories); i++)
+ {
+ int category_mask = categories[i].mask;
+ locale_t loc = newlocale (LC_ALL_MASK, "fr_FR.UTF-8", NULL);
+ if (loc != NULL)
+ {
+ locale_t locale = newlocale (category_mask, "de_DE.UTF-8", loc);
+ if (locale == NULL)
+ freelocale (loc);
+ else
+ {
+ unsigned int j;
+
+ uselocale (locale);
+ for (j = 0; j < SIZEOF (categories); j++)
+ {
+ const char *name_j =
+ gl_locale_name (categories[j].cat, categories[j].string);
+ if (j == i)
+ ASSERT (strcmp (name_j, "de_DE.UTF-8") == 0);
+ else
+ ASSERT (strcmp (name_j, "fr_FR.UTF-8") == 0);
+ }
+ uselocale (LC_GLOBAL_LOCALE);
+ freelocale (locale);
+ }
+ }
+ }
+ }
+#endif
+}
+
+/* Test the gl_locale_name_thread() function. */
+static void
+test_locale_name_thread (void)
+{
+ /* Get into a defined state, */
+ setlocale (LC_ALL, "en_US.UTF-8");
+
+#if HAVE_NEWLOCALE
+ /* Check that gl_locale_name_thread returns NULL when no thread locale is
+ set. */
+ uselocale (LC_GLOBAL_LOCALE);
+ ASSERT (gl_locale_name_thread (LC_CTYPE, "LC_CTYPE") == NULL);
+ ASSERT (gl_locale_name_thread (LC_MESSAGES, "LC_MESSAGES") == NULL);
+
+ /* Check that gl_locale_name_thread considers the thread locale. */
+ {
+ locale_t locale = newlocale (LC_ALL_MASK, "fr_FR.UTF-8", NULL);
+ if (locale != NULL)
+ {
+ const char *name;
+
+ uselocale (locale);
+ name = gl_locale_name_thread (LC_CTYPE, "LC_CTYPE");
+ ASSERT (strcmp (name, "fr_FR.UTF-8") == 0);
+ name = gl_locale_name_thread (LC_MESSAGES, "LC_MESSAGES");
+ ASSERT (strcmp (name, "fr_FR.UTF-8") == 0);
+ uselocale (LC_GLOBAL_LOCALE);
+ freelocale (locale);
+ }
+ }
+
+ /* Check that gl_locale_name_thread distinguishes different categories of the
+ thread locale, and that the name is the right one for each. */
+ {
+ unsigned int i;
+
+ for (i = 0; i < SIZEOF (categories); i++)
+ {
+ int category_mask = categories[i].mask;
+ locale_t loc = newlocale (LC_ALL_MASK, "fr_FR.UTF-8", NULL);
+ if (loc != NULL)
+ {
+ locale_t locale = newlocale (category_mask, "de_DE.UTF-8", loc);
+ if (locale == NULL)
+ freelocale (loc);
+ else
+ {
+ unsigned int j;
+
+ uselocale (locale);
+ for (j = 0; j < SIZEOF (categories); j++)
+ {
+ const char *name_j =
+ gl_locale_name_thread (categories[j].cat,
+ categories[j].string);
+ if (j == i)
+ ASSERT (strcmp (name_j, "de_DE.UTF-8") == 0);
+ else
+ ASSERT (strcmp (name_j, "fr_FR.UTF-8") == 0);
+ }
+ uselocale (LC_GLOBAL_LOCALE);
+ freelocale (locale);
+ }
+ }
+ }
+ }
+
+ /* Check that gl_locale_name_thread returns a string that is allocated with
+ indefinite extent. */
+ {
+ /* Try many locale names in turn, in order to defeat possible caches. */
+ static const char * const choices[] =
+ {
+ "C",
+ "POSIX",
+ "af_ZA",
+ "af_ZA.UTF-8",
+ "am_ET",
+ "am_ET.UTF-8",
+ "be_BY",
+ "be_BY.UTF-8",
+ "bg_BG",
+ "bg_BG.UTF-8",
+ "ca_ES",
+ "ca_ES.UTF-8",
+ "cs_CZ",
+ "cs_CZ.UTF-8",
+ "da_DK",
+ "da_DK.UTF-8",
+ "de_AT",
+ "de_AT.UTF-8",
+ "de_CH",
+ "de_CH.UTF-8",
+ "de_DE",
+ "de_DE.UTF-8",
+ "el_GR",
+ "el_GR.UTF-8",
+ "en_AU",
+ "en_AU.UTF-8",
+ "en_CA",
+ "en_CA.UTF-8",
+ "en_GB",
+ "en_GB.UTF-8",
+ "en_IE",
+ "en_IE.UTF-8",
+ "en_NZ",
+ "en_NZ.UTF-8",
+ "en_US",
+ "en_US.UTF-8",
+ "es_ES",
+ "es_ES.UTF-8",
+ "et_EE",
+ "et_EE.UTF-8",
+ "eu_ES",
+ "eu_ES.UTF-8",
+ "fi_FI",
+ "fi_FI.UTF-8",
+ "fr_BE",
+ "fr_BE.UTF-8",
+ "fr_CA",
+ "fr_CA.UTF-8",
+ "fr_CH",
+ "fr_CH.UTF-8",
+ "fr_FR",
+ "fr_FR.UTF-8",
+ "he_IL",
+ "he_IL.UTF-8",
+ "hr_HR",
+ "hr_HR.UTF-8",
+ "hu_HU",
+ "hu_HU.UTF-8",
+ "hy_AM",
+ "is_IS",
+ "is_IS.UTF-8",
+ "it_CH",
+ "it_CH.UTF-8",
+ "it_IT",
+ "it_IT.UTF-8",
+ "ja_JP.UTF-8",
+ "kk_KZ",
+ "kk_KZ.UTF-8",
+ "ko_KR.UTF-8",
+ "lt_LT",
+ "lt_LT.UTF-8",
+ "nl_BE",
+ "nl_BE.UTF-8",
+ "nl_NL",
+ "nl_NL.UTF-8",
+ "no_NO",
+ "no_NO.UTF-8",
+ "pl_PL",
+ "pl_PL.UTF-8",
+ "pt_BR",
+ "pt_BR.UTF-8",
+ "pt_PT",
+ "pt_PT.UTF-8",
+ "ro_RO",
+ "ro_RO.UTF-8",
+ "ru_RU",
+ "ru_RU.UTF-8",
+ "sk_SK",
+ "sk_SK.UTF-8",
+ "sl_SI",
+ "sl_SI.UTF-8",
+ "sv_SE",
+ "sv_SE.UTF-8",
+ "tr_TR",
+ "tr_TR.UTF-8",
+ "uk_UA",
+ "uk_UA.UTF-8",
+ "zh_CN",
+ "zh_CN.UTF-8",
+ "zh_HK",
+ "zh_HK.UTF-8",
+ "zh_TW",
+ "zh_TW.UTF-8"
+ };
+ /* Remember which locales are available. */
+ unsigned char /* bool */ available[SIZEOF (choices)];
+ /* Array of remembered results of gl_locale_name_thread. */
+ const char *unsaved_names[SIZEOF (choices)][SIZEOF (categories)];
+ /* Array of remembered results of gl_locale_name_thread, stored in safe
+ memory. */
+ char *saved_names[SIZEOF (choices)][SIZEOF (categories)];
+ unsigned int j;
+
+ for (j = 0; j < SIZEOF (choices); j++)
+ {
+ locale_t locale = newlocale (LC_ALL_MASK, choices[j], NULL);
+ available[j] = (locale != NULL);
+ if (locale != NULL)
+ {
+ unsigned int i;
+
+ uselocale (locale);
+ for (i = 0; i < SIZEOF (categories); i++)
+ {
+ unsaved_names[j][i] = gl_locale_name_thread (categories[i].cat, categories[i].string);
+ saved_names[j][i] = strdup (unsaved_names[j][i]);
+ }
+ uselocale (LC_GLOBAL_LOCALE);
+ freelocale (locale);
+ }
+ }
+ /* Verify the unsaved_names are still valid. */
+ for (j = 0; j < SIZEOF (choices); j++)
+ if (available[j])
+ {
+ unsigned int i;
+
+ for (i = 0; i < SIZEOF (categories); i++)
+ ASSERT (strcmp (unsaved_names[j][i], saved_names[j][i]) == 0);
+ }
+ /* Allocate many locales, without freeing them. This is an attempt at
+ overwriting as much of the previously allocated memory as possible. */
+ for (j = SIZEOF (choices); j > 0; )
+ {
+ j--;
+ if (available[j])
+ {
+ locale_t locale = newlocale (LC_ALL_MASK, choices[j], NULL);
+ unsigned int i;
+
+ ASSERT (locale != NULL);
+ uselocale (locale);
+ for (i = 0; i < SIZEOF (categories); i++)
+ {
+ const char *name = gl_locale_name_thread (categories[i].cat, categories[i].string);
+ ASSERT (strcmp (unsaved_names[j][i], name) == 0);
+ }
+ uselocale (LC_GLOBAL_LOCALE);
+ freelocale (locale);
+ }
+ }
+ /* Verify the unsaved_names are still valid. */
+ for (j = 0; j < SIZEOF (choices); j++)
+ if (available[j])
+ {
+ unsigned int i;
+
+ for (i = 0; i < SIZEOF (categories); i++)
+ {
+ ASSERT (strcmp (unsaved_names[j][i], saved_names[j][i]) == 0);
+ free (saved_names[j][i]);
+ }
+ }
+ }
+#else
+ /* Check that gl_locale_name_thread always returns NULL. */
+ ASSERT (gl_locale_name_thread (LC_CTYPE, "LC_CTYPE") == NULL);
+ ASSERT (gl_locale_name_thread (LC_MESSAGES, "LC_MESSAGES") == NULL);
+#endif
+}
+
+/* Test the gl_locale_name_posix() function. */
+static void
+test_locale_name_posix (void)
+{
+ const char *name;
+
+ /* Get into a defined state, */
+ setlocale (LC_ALL, "en_US.UTF-8");
+#if HAVE_NEWLOCALE
+ uselocale (LC_GLOBAL_LOCALE);
+#endif
+
+ /* Check that when all environment variables are unset,
+ gl_locale_name_posix returns either NULL or the default locale. */
+ unsetenv ("LC_ALL");
+ unsetenv ("LC_CTYPE");
+ unsetenv ("LC_MESSAGES");
+ unsetenv ("LC_NUMERIC");
+ unsetenv ("LANG");
+ setlocale (LC_ALL, "");
+ name = gl_locale_name_posix (LC_MESSAGES, "LC_MESSAGES");
+ ASSERT (name == NULL || strcmp (name, gl_locale_name_default ()) == 0);
+ name = gl_locale_name_posix (LC_NUMERIC, "LC_NUMERIC");
+ ASSERT (name == NULL || strcmp (name, gl_locale_name_default ()) == 0);
+
+ /* Check that an empty environment variable is treated like an unset
+ environment variable. */
+
+ setenv ("LC_ALL", "", 1);
+ unsetenv ("LC_CTYPE");
+ unsetenv ("LC_MESSAGES");
+ unsetenv ("LANG");
+ setlocale (LC_ALL, "");
+ name = gl_locale_name_posix (LC_MESSAGES, "LC_MESSAGES");
+ ASSERT (name == NULL || strcmp (name, gl_locale_name_default ()) == 0);
+
+ unsetenv ("LC_ALL");
+ setenv ("LC_CTYPE", "", 1);
+ unsetenv ("LC_MESSAGES");
+ unsetenv ("LANG");
+ setlocale (LC_ALL, "");
+ name = gl_locale_name_posix (LC_MESSAGES, "LC_MESSAGES");
+ ASSERT (name == NULL || strcmp (name, gl_locale_name_default ()) == 0);
+
+ unsetenv ("LC_ALL");
+ unsetenv ("LC_CTYPE");
+ setenv ("LC_MESSAGES", "", 1);
+ unsetenv ("LANG");
+ setlocale (LC_ALL, "");
+ name = gl_locale_name_posix (LC_MESSAGES, "LC_MESSAGES");
+ ASSERT (name == NULL || strcmp (name, gl_locale_name_default ()) == 0);
+
+ unsetenv ("LC_ALL");
+ unsetenv ("LC_CTYPE");
+ unsetenv ("LC_MESSAGES");
+ setenv ("LANG", "", 1);
+ setlocale (LC_ALL, "");
+ name = gl_locale_name_posix (LC_MESSAGES, "LC_MESSAGES");
+ ASSERT (name == NULL || strcmp (name, gl_locale_name_default ()) == 0);
+
+ /* Check that LC_ALL overrides the others, and LANG is overridden by the
+ others. */
+
+ setenv ("LC_ALL", "C", 1);
+ unsetenv ("LC_CTYPE");
+ unsetenv ("LC_MESSAGES");
+ unsetenv ("LANG");
+ setlocale (LC_ALL, "");
+ name = gl_locale_name_posix (LC_MESSAGES, "LC_MESSAGES");
+ ASSERT (strcmp (name, "C") == 0);
+
+ unsetenv ("LC_ALL");
+ setenv ("LC_CTYPE", "C", 1);
+ setenv ("LC_MESSAGES", "C", 1);
+ unsetenv ("LANG");
+ setlocale (LC_ALL, "");
+ name = gl_locale_name_posix (LC_MESSAGES, "LC_MESSAGES");
+ ASSERT (strcmp (name, "C") == 0);
+
+ unsetenv ("LC_ALL");
+ unsetenv ("LC_CTYPE");
+ unsetenv ("LC_MESSAGES");
+ setenv ("LANG", "C", 1);
+ setlocale (LC_ALL, "");
+ name = gl_locale_name_posix (LC_MESSAGES, "LC_MESSAGES");
+ ASSERT (strcmp (name, "C") == 0);
+
+ /* Check mixed situations. */
+
+ unsetenv ("LC_ALL");
+ unsetenv ("LC_CTYPE");
+ setenv ("LC_MESSAGES", "fr_FR.UTF-8", 1);
+ setenv ("LANG", "de_DE.UTF-8", 1);
+ if (setlocale (LC_ALL, "") != NULL)
+ {
+ name = gl_locale_name_posix (LC_CTYPE, "LC_CTYPE");
+ ASSERT (strcmp (name, "de_DE.UTF-8") == 0);
+ name = gl_locale_name_posix (LC_MESSAGES, "LC_MESSAGES");
+ ASSERT (strcmp (name, "fr_FR.UTF-8") == 0);
+ }
+
+ unsetenv ("LC_ALL");
+ unsetenv ("LC_CTYPE");
+ setenv ("LC_MESSAGES", "fr_FR.UTF-8", 1);
+ unsetenv ("LANG");
+ if (setlocale (LC_ALL, "") != NULL)
+ {
+ name = gl_locale_name_posix (LC_CTYPE, "LC_CTYPE");
+ ASSERT (name == NULL || strcmp (name, gl_locale_name_default ()) == 0);
+ name = gl_locale_name_posix (LC_MESSAGES, "LC_MESSAGES");
+ ASSERT (strcmp (name, "fr_FR.UTF-8") == 0);
+ }
+
+#if HAVE_NEWLOCALE
+ /* Check that gl_locale_name_posix ignores the thread locale. */
+ {
+ locale_t locale = newlocale (LC_ALL_MASK, "fr_FR.UTF-8", NULL);
+ if (locale != NULL)
+ {
+ unsetenv ("LC_ALL");
+ unsetenv ("LC_CTYPE");
+ unsetenv ("LC_MESSAGES");
+ setenv ("LANG", "C", 1);
+ setlocale (LC_ALL, "");
+ uselocale (locale);
+ name = gl_locale_name_posix (LC_MESSAGES, "LC_MESSAGES");
+ ASSERT (strcmp (name, "C") == 0);
+ uselocale (LC_GLOBAL_LOCALE);
+ freelocale (locale);
+ }
+ }
+#endif
+}
+
+/* Test the gl_locale_name_environ() function. */
+static void
+test_locale_name_environ (void)
+{
+ const char *name;
+
+ /* Get into a defined state, */
+ setlocale (LC_ALL, "en_US.UTF-8");
+#if HAVE_NEWLOCALE
+ uselocale (LC_GLOBAL_LOCALE);
+#endif
+
+ /* Check that when all environment variables are unset,
+ gl_locale_name_environ returns NULL. */
+ unsetenv ("LC_ALL");
+ unsetenv ("LC_CTYPE");
+ unsetenv ("LC_MESSAGES");
+ unsetenv ("LC_NUMERIC");
+ unsetenv ("LANG");
+ ASSERT (gl_locale_name_environ (LC_MESSAGES, "LC_MESSAGES") == NULL);
+ ASSERT (gl_locale_name_environ (LC_NUMERIC, "LC_NUMERIC") == NULL);
+
+ /* Check that an empty environment variable is treated like an unset
+ environment variable. */
+
+ setenv ("LC_ALL", "", 1);
+ unsetenv ("LC_CTYPE");
+ unsetenv ("LC_MESSAGES");
+ unsetenv ("LANG");
+ ASSERT (gl_locale_name_environ (LC_MESSAGES, "LC_MESSAGES") == NULL);
+
+ unsetenv ("LC_ALL");
+ setenv ("LC_CTYPE", "", 1);
+ unsetenv ("LC_MESSAGES");
+ unsetenv ("LANG");
+ ASSERT (gl_locale_name_environ (LC_MESSAGES, "LC_MESSAGES") == NULL);
+
+ unsetenv ("LC_ALL");
+ unsetenv ("LC_CTYPE");
+ setenv ("LC_MESSAGES", "", 1);
+ unsetenv ("LANG");
+ ASSERT (gl_locale_name_environ (LC_MESSAGES, "LC_MESSAGES") == NULL);
+
+ unsetenv ("LC_ALL");
+ unsetenv ("LC_CTYPE");
+ unsetenv ("LC_MESSAGES");
+ setenv ("LANG", "", 1);
+ ASSERT (gl_locale_name_environ (LC_MESSAGES, "LC_MESSAGES") == NULL);
+
+ /* Check that LC_ALL overrides the others, and LANG is overridden by the
+ others. */
+
+ setenv ("LC_ALL", "C", 1);
+ unsetenv ("LC_CTYPE");
+ unsetenv ("LC_MESSAGES");
+ unsetenv ("LANG");
+ name = gl_locale_name_environ (LC_MESSAGES, "LC_MESSAGES");
+ ASSERT (strcmp (name, "C") == 0);
+
+ unsetenv ("LC_ALL");
+ setenv ("LC_CTYPE", "C", 1);
+ setenv ("LC_MESSAGES", "C", 1);
+ unsetenv ("LANG");
+ name = gl_locale_name_environ (LC_MESSAGES, "LC_MESSAGES");
+ ASSERT (strcmp (name, "C") == 0);
+
+ unsetenv ("LC_ALL");
+ unsetenv ("LC_CTYPE");
+ unsetenv ("LC_MESSAGES");
+ setenv ("LANG", "C", 1);
+ name = gl_locale_name_environ (LC_MESSAGES, "LC_MESSAGES");
+ ASSERT (strcmp (name, "C") == 0);
+
+ /* Check mixed situations. */
+
+ unsetenv ("LC_ALL");
+ unsetenv ("LC_CTYPE");
+ setenv ("LC_MESSAGES", "fr_FR.UTF-8", 1);
+ setenv ("LANG", "de_DE.UTF-8", 1);
+ name = gl_locale_name_environ (LC_CTYPE, "LC_CTYPE");
+ ASSERT (strcmp (name, "de_DE.UTF-8") == 0);
+ name = gl_locale_name_environ (LC_MESSAGES, "LC_MESSAGES");
+ ASSERT (strcmp (name, "fr_FR.UTF-8") == 0);
+
+ unsetenv ("LC_ALL");
+ unsetenv ("LC_CTYPE");
+ setenv ("LC_MESSAGES", "fr_FR.UTF-8", 1);
+ unsetenv ("LANG");
+ name = gl_locale_name_environ (LC_CTYPE, "LC_CTYPE");
+ ASSERT (name == NULL);
+ name = gl_locale_name_environ (LC_MESSAGES, "LC_MESSAGES");
+ ASSERT (strcmp (name, "fr_FR.UTF-8") == 0);
+
+#if HAVE_NEWLOCALE
+ /* Check that gl_locale_name_environ ignores the thread locale. */
+ {
+ locale_t locale = newlocale (LC_ALL_MASK, "fr_FR.UTF-8", NULL);
+ if (locale != NULL)
+ {
+ unsetenv ("LC_ALL");
+ unsetenv ("LC_CTYPE");
+ unsetenv ("LC_MESSAGES");
+ setenv ("LANG", "C", 1);
+ setlocale (LC_ALL, "");
+ uselocale (locale);
+ name = gl_locale_name_environ (LC_MESSAGES, "LC_MESSAGES");
+ ASSERT (strcmp (name, "C") == 0);
+ uselocale (LC_GLOBAL_LOCALE);
+ freelocale (locale);
+ }
+ }
+#endif
+}
+
+/* Test the gl_locale_name_default() function. */
+static void
+test_locale_name_default (void)
+{
+ const char *name = gl_locale_name_default ();
+
+ ASSERT (name != NULL);
+
+ /* Only Mac OS X and Windows have a facility for the user to set the default
+ locale. */
+#if !((defined __APPLE__ && defined __MACH__) || (defined _WIN32 || defined __WIN32__ || defined __CYGWIN__))
+ ASSERT (strcmp (name, "C") == 0);
+#endif
+
+#if HAVE_NEWLOCALE
+ /* Check that gl_locale_name_default ignores the thread locale. */
+ {
+ locale_t locale = newlocale (LC_ALL_MASK, "fr_FR.UTF-8", NULL);
+ if (locale != NULL)
+ {
+ uselocale (locale);
+ ASSERT (strcmp (gl_locale_name_default (), name) == 0);
+ uselocale (LC_GLOBAL_LOCALE);
+ freelocale (locale);
+ }
+ }
+#endif
+}
+
+int
+main ()
+{
+ test_locale_name ();
+ test_locale_name_thread ();
+ test_locale_name_posix ();
+ test_locale_name_environ ();
+ test_locale_name_default ();
+
+ return 0;
+}
diff --git a/gnulib-tests/test-lseek.c b/gnulib-tests/test-lseek.c
new file mode 100644
index 0000000..f748435
--- /dev/null
+++ b/gnulib-tests/test-lseek.c
@@ -0,0 +1,109 @@
+/* Test of lseek() function.
+ Copyright (C) 2007-2016 Free Software Foundation, Inc.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+/* Written by Eric Blake, 2007. */
+
+#include <config.h>
+
+#include <unistd.h>
+
+#include "signature.h"
+SIGNATURE_CHECK (lseek, off_t, (int, off_t, int));
+
+#include <errno.h>
+
+#include "macros.h"
+
+/* ARGC must be 2; *ARGV[1] is '0' if stdin and stdout are files, '1'
+ if they are pipes, and '2' if they are closed. Check for proper
+ semantics of lseek. */
+int
+main (int argc, char **argv)
+{
+ if (argc != 2)
+ return 2;
+ switch (*argv[1])
+ {
+ case '0': /* regular files */
+ ASSERT (lseek (0, (off_t)2, SEEK_SET) == 2);
+ ASSERT (lseek (0, (off_t)-4, SEEK_CUR) == -1);
+ ASSERT (errno == EINVAL);
+ errno = 0;
+#if ! defined __BEOS__
+ /* POSIX says that the last lseek call, when failing, does not change
+ the current offset. But BeOS sets it to 0. */
+ ASSERT (lseek (0, (off_t)0, SEEK_CUR) == 2);
+#endif
+#if 0 /* leads to SIGSYS on IRIX 6.5 */
+ ASSERT (lseek (0, (off_t)0, (SEEK_SET | SEEK_CUR | SEEK_END) + 1) == -1);
+ ASSERT (errno == EINVAL);
+#endif
+ ASSERT (lseek (1, (off_t)2, SEEK_SET) == 2);
+ errno = 0;
+ ASSERT (lseek (1, (off_t)-4, SEEK_CUR) == -1);
+ ASSERT (errno == EINVAL);
+ errno = 0;
+#if ! defined __BEOS__
+ /* POSIX says that the last lseek call, when failing, does not change
+ the current offset. But BeOS sets it to 0. */
+ ASSERT (lseek (1, (off_t)0, SEEK_CUR) == 2);
+#endif
+#if 0 /* leads to SIGSYS on IRIX 6.5 */
+ ASSERT (lseek (1, (off_t)0, (SEEK_SET | SEEK_CUR | SEEK_END) + 1) == -1);
+ ASSERT (errno == EINVAL);
+#endif
+ break;
+
+ case '1': /* pipes */
+ errno = 0;
+ ASSERT (lseek (0, (off_t)0, SEEK_CUR) == -1);
+ ASSERT (errno == ESPIPE);
+ errno = 0;
+ ASSERT (lseek (1, (off_t)0, SEEK_CUR) == -1);
+ ASSERT (errno == ESPIPE);
+ break;
+
+ case '2': /* closed */
+ /* Explicitly close file descriptors 0 and 1. The <&- and >&- in the
+ invoking shell are not enough on HP-UX. */
+ close (0);
+ close (1);
+
+ errno = 0;
+ ASSERT (lseek (0, (off_t)0, SEEK_CUR) == -1);
+ ASSERT (errno == EBADF);
+
+ errno = 0;
+ ASSERT (lseek (1, (off_t)0, SEEK_CUR) == -1);
+ ASSERT (errno == EBADF);
+
+ /* Test behaviour for invalid file descriptors. */
+ errno = 0;
+ ASSERT (lseek (-1, (off_t)0, SEEK_CUR) == -1);
+ ASSERT (errno == EBADF);
+
+ close (99);
+ errno = 0;
+ ASSERT (lseek (99, (off_t)0, SEEK_CUR) == -1);
+ ASSERT (errno == EBADF);
+
+ break;
+
+ default:
+ return 1;
+ }
+ return 0;
+}
diff --git a/gnulib-tests/test-lseek.sh b/gnulib-tests/test-lseek.sh
new file mode 100755
index 0000000..47237b5
--- /dev/null
+++ b/gnulib-tests/test-lseek.sh
@@ -0,0 +1,18 @@
+#!/bin/sh
+
+tmpfiles=
+trap 'rm -fr $tmpfiles' 1 2 3 15
+
+tmpfiles=t-lseek.tmp
+# seekable files
+./test-lseek${EXEEXT} 0 < "$srcdir/test-lseek.sh" > t-lseek.tmp || exit 1
+
+# pipes
+echo hi | { ./test-lseek${EXEEXT} 1; echo $? > t-lseek.tmp; cat > /dev/null; } | cat
+test "`cat t-lseek.tmp`" = "0" || exit 1
+
+# closed descriptors
+./test-lseek${EXEEXT} 2 <&- >&- || exit 1
+
+rm -rf $tmpfiles
+exit 0
diff --git a/gnulib-tests/test-lstat.c b/gnulib-tests/test-lstat.c
new file mode 100644
index 0000000..86ff465
--- /dev/null
+++ b/gnulib-tests/test-lstat.c
@@ -0,0 +1,60 @@
+/* Test of lstat() function.
+ Copyright (C) 2008-2016 Free Software Foundation, Inc.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+/* Written by Simon Josefsson, 2008; and Eric Blake, 2009. */
+
+#include <config.h>
+
+#include <sys/stat.h>
+
+/* Caution: lstat may be a function-like macro. Although this
+ signature check must pass, it may be the signature of the real (and
+ broken) lstat rather than rpl_lstat. Most code should not use the
+ address of lstat. */
+#include "signature.h"
+SIGNATURE_CHECK (lstat, int, (char const *, struct stat *));
+
+#include <fcntl.h>
+#include <errno.h>
+#include <stdbool.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <unistd.h>
+
+#include "same-inode.h"
+#include "ignore-value.h"
+#include "macros.h"
+
+#define BASE "test-lstat.t"
+
+#include "test-lstat.h"
+
+/* Wrapper around lstat, which works even if lstat is a function-like
+ macro, where test_lstat_func(lstat) would do the wrong thing. */
+static int
+do_lstat (char const *name, struct stat *st)
+{
+ return lstat (name, st);
+}
+
+int
+main (void)
+{
+ /* Remove any leftovers from a previous partial run. */
+ ignore_value (system ("rm -rf " BASE "*"));
+
+ return test_lstat_func (do_lstat, true);
+}
diff --git a/gnulib-tests/test-lstat.h b/gnulib-tests/test-lstat.h
new file mode 100644
index 0000000..4eb9036
--- /dev/null
+++ b/gnulib-tests/test-lstat.h
@@ -0,0 +1,116 @@
+/* Test of lstat() function.
+ Copyright (C) 2008-2016 Free Software Foundation, Inc.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+/* Written by Simon Josefsson, 2008; and Eric Blake, 2009. */
+
+/* This file is designed to test both lstat(n,buf) and
+ fstatat(AT_FDCWD,n,buf,AT_SYMLINK_NOFOLLOW). FUNC is the function
+ to test. Assumes that BASE and ASSERT are already defined, and
+ that appropriate headers are already included. If PRINT, warn
+ before skipping symlink tests with status 77. */
+
+static int
+test_lstat_func (int (*func) (char const *, struct stat *), bool print)
+{
+ struct stat st1;
+ struct stat st2;
+
+ /* Test for common directories. */
+ ASSERT (func (".", &st1) == 0);
+ ASSERT (func ("./", &st2) == 0);
+ ASSERT (SAME_INODE (st1, st2));
+ ASSERT (S_ISDIR (st1.st_mode));
+ ASSERT (S_ISDIR (st2.st_mode));
+ ASSERT (func ("/", &st1) == 0);
+ ASSERT (func ("///", &st2) == 0);
+ ASSERT (SAME_INODE (st1, st2));
+ ASSERT (S_ISDIR (st1.st_mode));
+ ASSERT (S_ISDIR (st2.st_mode));
+ ASSERT (func ("..", &st1) == 0);
+ ASSERT (S_ISDIR (st1.st_mode));
+
+ /* Test for error conditions. */
+ errno = 0;
+ ASSERT (func ("", &st1) == -1);
+ ASSERT (errno == ENOENT);
+ errno = 0;
+ ASSERT (func ("nosuch", &st1) == -1);
+ ASSERT (errno == ENOENT);
+ errno = 0;
+ ASSERT (func ("nosuch/", &st1) == -1);
+ ASSERT (errno == ENOENT);
+
+ ASSERT (close (creat (BASE "file", 0600)) == 0);
+ ASSERT (func (BASE "file", &st1) == 0);
+ ASSERT (S_ISREG (st1.st_mode));
+ errno = 0;
+ ASSERT (func (BASE "file/", &st1) == -1);
+ ASSERT (errno == ENOTDIR);
+
+ /* Now for some symlink tests, where supported. We set up:
+ link1 -> directory
+ link2 -> file
+ link3 -> dangling
+ link4 -> loop
+ then test behavior both with and without trailing slash.
+ */
+ if (symlink (".", BASE "link1") != 0)
+ {
+ ASSERT (unlink (BASE "file") == 0);
+ if (print)
+ fputs ("skipping test: symlinks not supported on this file system\n",
+ stderr);
+ return 77;
+ }
+ ASSERT (symlink (BASE "file", BASE "link2") == 0);
+ ASSERT (symlink (BASE "nosuch", BASE "link3") == 0);
+ ASSERT (symlink (BASE "link4", BASE "link4") == 0);
+
+ ASSERT (func (BASE "link1", &st1) == 0);
+ ASSERT (S_ISLNK (st1.st_mode));
+ ASSERT (func (BASE "link1/", &st1) == 0);
+ ASSERT (stat (BASE "link1", &st2) == 0);
+ ASSERT (S_ISDIR (st1.st_mode));
+ ASSERT (S_ISDIR (st2.st_mode));
+ ASSERT (SAME_INODE (st1, st2));
+
+ ASSERT (func (BASE "link2", &st1) == 0);
+ ASSERT (S_ISLNK (st1.st_mode));
+ errno = 0;
+ ASSERT (func (BASE "link2/", &st1) == -1);
+ ASSERT (errno == ENOTDIR);
+
+ ASSERT (func (BASE "link3", &st1) == 0);
+ ASSERT (S_ISLNK (st1.st_mode));
+ errno = 0;
+ ASSERT (func (BASE "link3/", &st1) == -1);
+ ASSERT (errno == ENOENT);
+
+ ASSERT (func (BASE "link4", &st1) == 0);
+ ASSERT (S_ISLNK (st1.st_mode));
+ errno = 0;
+ ASSERT (func (BASE "link4/", &st1) == -1);
+ ASSERT (errno == ELOOP);
+
+ /* Cleanup. */
+ ASSERT (unlink (BASE "file") == 0);
+ ASSERT (unlink (BASE "link1") == 0);
+ ASSERT (unlink (BASE "link2") == 0);
+ ASSERT (unlink (BASE "link3") == 0);
+ ASSERT (unlink (BASE "link4") == 0);
+
+ return 0;
+}
diff --git a/gnulib-tests/test-malloca.c b/gnulib-tests/test-malloca.c
new file mode 100644
index 0000000..e9ab83d
--- /dev/null
+++ b/gnulib-tests/test-malloca.c
@@ -0,0 +1,62 @@
+/* Test of safe automatic memory allocation.
+ Copyright (C) 2005, 2007, 2009-2016 Free Software Foundation, Inc.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+/* Written by Bruno Haible <bruno@clisp.org>, 2005. */
+
+#include <config.h>
+
+#include "malloca.h"
+
+#include <stdlib.h>
+
+static void
+do_allocation (int n)
+{
+ void *ptr = malloca (n);
+ freea (ptr);
+ safe_alloca (n);
+}
+
+void (*func) (int) = do_allocation;
+
+int
+main ()
+{
+ int i;
+
+ /* This slows down malloc a lot. */
+ unsetenv ("MALLOC_PERTURB_");
+
+ /* Repeat a lot of times, to make sure there's no memory leak. */
+ for (i = 0; i < 50000; i++)
+ {
+ /* Try various values.
+ n = 0 gave a crash on Alpha with gcc-2.5.8.
+ Some versions of Mac OS X have a stack size limit of 512 KB. */
+ func (34);
+ func (134);
+ func (399);
+ func (510823);
+ func (129321);
+ func (0);
+ func (4070);
+ func (4095);
+ func (1);
+ func (16582);
+ }
+
+ return 0;
+}
diff --git a/gnulib-tests/test-mbrtowc-w32-1.sh b/gnulib-tests/test-mbrtowc-w32-1.sh
new file mode 100755
index 0000000..3f12e44
--- /dev/null
+++ b/gnulib-tests/test-mbrtowc-w32-1.sh
@@ -0,0 +1,4 @@
+#!/bin/sh
+
+# Test a CP1252 locale.
+./test-mbrtowc-w32${EXEEXT} French_France 1252
diff --git a/gnulib-tests/test-mbrtowc-w32-2.sh b/gnulib-tests/test-mbrtowc-w32-2.sh
new file mode 100755
index 0000000..9e1a765
--- /dev/null
+++ b/gnulib-tests/test-mbrtowc-w32-2.sh
@@ -0,0 +1,4 @@
+#!/bin/sh
+
+# Test a CP1256 locale.
+./test-mbrtowc-w32${EXEEXT} "Arabic_Saudi Arabia" 1256
diff --git a/gnulib-tests/test-mbrtowc-w32-3.sh b/gnulib-tests/test-mbrtowc-w32-3.sh
new file mode 100755
index 0000000..782c2d0
--- /dev/null
+++ b/gnulib-tests/test-mbrtowc-w32-3.sh
@@ -0,0 +1,4 @@
+#!/bin/sh
+
+# Test a CP932 locale.
+./test-mbrtowc-w32${EXEEXT} Japanese_Japan 932
diff --git a/gnulib-tests/test-mbrtowc-w32-4.sh b/gnulib-tests/test-mbrtowc-w32-4.sh
new file mode 100755
index 0000000..0630f30
--- /dev/null
+++ b/gnulib-tests/test-mbrtowc-w32-4.sh
@@ -0,0 +1,4 @@
+#!/bin/sh
+
+# Test a CP950 locale.
+./test-mbrtowc-w32${EXEEXT} Chinese_Taiwan 950
diff --git a/gnulib-tests/test-mbrtowc-w32-5.sh b/gnulib-tests/test-mbrtowc-w32-5.sh
new file mode 100755
index 0000000..7d7faa9
--- /dev/null
+++ b/gnulib-tests/test-mbrtowc-w32-5.sh
@@ -0,0 +1,4 @@
+#!/bin/sh
+
+# Test a CP936 locale.
+./test-mbrtowc-w32${EXEEXT} Chinese_China 936
diff --git a/gnulib-tests/test-mbrtowc-w32.c b/gnulib-tests/test-mbrtowc-w32.c
new file mode 100644
index 0000000..f637330
--- /dev/null
+++ b/gnulib-tests/test-mbrtowc-w32.c
@@ -0,0 +1,735 @@
+/* Test of conversion of multibyte character to wide character.
+ Copyright (C) 2008-2016 Free Software Foundation, Inc.
+
+ This 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 <wchar.h>
+
+#include <errno.h>
+#include <locale.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+
+#include "macros.h"
+
+#if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
+
+static int
+test_one_locale (const char *name, int codepage)
+{
+ mbstate_t state;
+ wchar_t wc;
+ size_t ret;
+
+# if 1
+ /* Portable code to set the locale. */
+ {
+ char name_with_codepage[1024];
+
+ sprintf (name_with_codepage, "%s.%d", name, codepage);
+
+ /* Set the locale. */
+ if (setlocale (LC_ALL, name_with_codepage) == NULL)
+ return 77;
+ }
+# else
+ /* Hacky way to set a locale.codepage combination that setlocale() refuses
+ to set. */
+ {
+ /* Codepage of the current locale, set with setlocale().
+ Not necessarily the same as GetACP(). */
+ extern __declspec(dllimport) unsigned int __lc_codepage;
+
+ /* Set the locale. */
+ if (setlocale (LC_ALL, name) == NULL)
+ return 77;
+
+ /* Clobber the codepage and MB_CUR_MAX, both set by setlocale(). */
+ __lc_codepage = codepage;
+ switch (codepage)
+ {
+ case 1252:
+ case 1256:
+ MB_CUR_MAX = 1;
+ break;
+ case 932:
+ case 950:
+ case 936:
+ MB_CUR_MAX = 2;
+ break;
+ case 54936:
+ case 65001:
+ MB_CUR_MAX = 4;
+ break;
+ }
+
+ /* Test whether the codepage is really available. */
+ memset (&state, '\0', sizeof (mbstate_t));
+ if (mbrtowc (&wc, " ", 1, &state) == (size_t)(-1))
+ return 77;
+ }
+# endif
+
+ /* Test zero-length input. */
+ {
+ memset (&state, '\0', sizeof (mbstate_t));
+ wc = (wchar_t) 0xBADFACE;
+ ret = mbrtowc (&wc, "x", 0, &state);
+ /* gnulib's implementation returns (size_t)(-2).
+ The AIX 5.1 implementation returns (size_t)(-1).
+ glibc's implementation returns 0. */
+ ASSERT (ret == (size_t)(-2) || ret == (size_t)(-1) || ret == 0);
+ ASSERT (mbsinit (&state));
+ }
+
+ /* Test NUL byte input. */
+ {
+ memset (&state, '\0', sizeof (mbstate_t));
+ wc = (wchar_t) 0xBADFACE;
+ ret = mbrtowc (&wc, "", 1, &state);
+ ASSERT (ret == 0);
+ ASSERT (wc == 0);
+ ASSERT (mbsinit (&state));
+ ret = mbrtowc (NULL, "", 1, &state);
+ ASSERT (ret == 0);
+ ASSERT (mbsinit (&state));
+ }
+
+ /* Test single-byte input. */
+ {
+ int c;
+ char buf[1];
+
+ memset (&state, '\0', sizeof (mbstate_t));
+ for (c = 0; c < 0x100; c++)
+ switch (c)
+ {
+ case '\t': case '\v': case '\f':
+ case ' ': case '!': case '"': case '#': case '%':
+ case '&': case '\'': case '(': case ')': case '*':
+ case '+': case ',': case '-': case '.': case '/':
+ case '0': case '1': case '2': case '3': case '4':
+ case '5': case '6': case '7': case '8': case '9':
+ case ':': case ';': case '<': case '=': case '>':
+ case '?':
+ case 'A': case 'B': case 'C': case 'D': case 'E':
+ case 'F': case 'G': case 'H': case 'I': case 'J':
+ case 'K': case 'L': case 'M': case 'N': case 'O':
+ case 'P': case 'Q': case 'R': case 'S': case 'T':
+ case 'U': case 'V': case 'W': case 'X': case 'Y':
+ case 'Z':
+ case '[': case '\\': case ']': case '^': case '_':
+ case 'a': case 'b': case 'c': case 'd': case 'e':
+ case 'f': case 'g': case 'h': case 'i': case 'j':
+ case 'k': case 'l': case 'm': case 'n': case 'o':
+ case 'p': case 'q': case 'r': case 's': case 't':
+ case 'u': case 'v': case 'w': case 'x': case 'y':
+ case 'z': case '{': case '|': case '}': case '~':
+ /* c is in the ISO C "basic character set". */
+ buf[0] = c;
+ wc = (wchar_t) 0xBADFACE;
+ ret = mbrtowc (&wc, buf, 1, &state);
+ ASSERT (ret == 1);
+ ASSERT (wc == c);
+ ASSERT (mbsinit (&state));
+ ret = mbrtowc (NULL, buf, 1, &state);
+ ASSERT (ret == 1);
+ ASSERT (mbsinit (&state));
+ break;
+ }
+ }
+
+ /* Test special calling convention, passing a NULL pointer. */
+ {
+ memset (&state, '\0', sizeof (mbstate_t));
+ wc = (wchar_t) 0xBADFACE;
+ ret = mbrtowc (&wc, NULL, 5, &state);
+ ASSERT (ret == 0);
+ ASSERT (wc == (wchar_t) 0xBADFACE);
+ ASSERT (mbsinit (&state));
+ }
+
+ switch (codepage)
+ {
+ case 1252:
+ /* Locale encoding is CP1252, an extension of ISO-8859-1. */
+ {
+ char input[] = "B\374\337er"; /* "Büßer" */
+ memset (&state, '\0', sizeof (mbstate_t));
+
+ wc = (wchar_t) 0xBADFACE;
+ ret = mbrtowc (&wc, input, 1, &state);
+ ASSERT (ret == 1);
+ ASSERT (wc == 'B');
+ ASSERT (mbsinit (&state));
+ input[0] = '\0';
+
+ wc = (wchar_t) 0xBADFACE;
+ ret = mbrtowc (&wc, input + 1, 1, &state);
+ ASSERT (ret == 1);
+ ASSERT (wctob (wc) == (unsigned char) '\374');
+ ASSERT (wc == 0x00FC);
+ ASSERT (mbsinit (&state));
+ input[1] = '\0';
+
+ /* Test support of NULL first argument. */
+ ret = mbrtowc (NULL, input + 2, 3, &state);
+ ASSERT (ret == 1);
+ ASSERT (mbsinit (&state));
+
+ wc = (wchar_t) 0xBADFACE;
+ ret = mbrtowc (&wc, input + 2, 3, &state);
+ ASSERT (ret == 1);
+ ASSERT (wctob (wc) == (unsigned char) '\337');
+ ASSERT (wc == 0x00DF);
+ ASSERT (mbsinit (&state));
+ input[2] = '\0';
+
+ wc = (wchar_t) 0xBADFACE;
+ ret = mbrtowc (&wc, input + 3, 2, &state);
+ ASSERT (ret == 1);
+ ASSERT (wc == 'e');
+ ASSERT (mbsinit (&state));
+ input[3] = '\0';
+
+ wc = (wchar_t) 0xBADFACE;
+ ret = mbrtowc (&wc, input + 4, 1, &state);
+ ASSERT (ret == 1);
+ ASSERT (wc == 'r');
+ ASSERT (mbsinit (&state));
+ }
+ return 0;
+
+ case 1256:
+ /* Locale encoding is CP1256, not the same as ISO-8859-6. */
+ {
+ char input[] = "x\302\341\346y"; /* "xآلوy" */
+ memset (&state, '\0', sizeof (mbstate_t));
+
+ wc = (wchar_t) 0xBADFACE;
+ ret = mbrtowc (&wc, input, 1, &state);
+ ASSERT (ret == 1);
+ ASSERT (wc == 'x');
+ ASSERT (mbsinit (&state));
+ input[0] = '\0';
+
+ wc = (wchar_t) 0xBADFACE;
+ ret = mbrtowc (&wc, input + 1, 1, &state);
+ ASSERT (ret == 1);
+ ASSERT (wctob (wc) == (unsigned char) '\302');
+ ASSERT (wc == 0x0622);
+ ASSERT (mbsinit (&state));
+ input[1] = '\0';
+
+ /* Test support of NULL first argument. */
+ ret = mbrtowc (NULL, input + 2, 3, &state);
+ ASSERT (ret == 1);
+ ASSERT (mbsinit (&state));
+
+ wc = (wchar_t) 0xBADFACE;
+ ret = mbrtowc (&wc, input + 2, 3, &state);
+ ASSERT (ret == 1);
+ ASSERT (wctob (wc) == (unsigned char) '\341');
+ ASSERT (wc == 0x0644);
+ ASSERT (mbsinit (&state));
+ input[2] = '\0';
+
+ wc = (wchar_t) 0xBADFACE;
+ ret = mbrtowc (&wc, input + 3, 2, &state);
+ ASSERT (ret == 1);
+ ASSERT (wctob (wc) == (unsigned char) '\346');
+ ASSERT (wc == 0x0648);
+ ASSERT (mbsinit (&state));
+ input[3] = '\0';
+
+ wc = (wchar_t) 0xBADFACE;
+ ret = mbrtowc (&wc, input + 4, 1, &state);
+ ASSERT (ret == 1);
+ ASSERT (wc == 'y');
+ ASSERT (mbsinit (&state));
+ }
+ return 0;
+
+ case 932:
+ /* Locale encoding is CP932, similar to Shift_JIS. */
+ {
+ char input[] = "<\223\372\226\173\214\352>"; /* "<日本語>" */
+ memset (&state, '\0', sizeof (mbstate_t));
+
+ wc = (wchar_t) 0xBADFACE;
+ ret = mbrtowc (&wc, input, 1, &state);
+ ASSERT (ret == 1);
+ ASSERT (wc == '<');
+ ASSERT (mbsinit (&state));
+ input[0] = '\0';
+
+ wc = (wchar_t) 0xBADFACE;
+ ret = mbrtowc (&wc, input + 1, 2, &state);
+ ASSERT (ret == 2);
+ ASSERT (wctob (wc) == EOF);
+ ASSERT (wc == 0x65E5);
+ ASSERT (mbsinit (&state));
+ input[1] = '\0';
+ input[2] = '\0';
+
+ wc = (wchar_t) 0xBADFACE;
+ ret = mbrtowc (&wc, input + 3, 1, &state);
+ ASSERT (ret == (size_t)(-2));
+ ASSERT (wc == (wchar_t) 0xBADFACE);
+ ASSERT (!mbsinit (&state));
+ input[3] = '\0';
+
+ wc = (wchar_t) 0xBADFACE;
+ ret = mbrtowc (&wc, input + 4, 4, &state);
+ ASSERT (ret == 1);
+ ASSERT (wctob (wc) == EOF);
+ ASSERT (wc == 0x672C);
+ ASSERT (mbsinit (&state));
+ input[4] = '\0';
+
+ /* Test support of NULL first argument. */
+ ret = mbrtowc (NULL, input + 5, 3, &state);
+ ASSERT (ret == 2);
+ ASSERT (mbsinit (&state));
+
+ wc = (wchar_t) 0xBADFACE;
+ ret = mbrtowc (&wc, input + 5, 3, &state);
+ ASSERT (ret == 2);
+ ASSERT (wctob (wc) == EOF);
+ ASSERT (wc == 0x8A9E);
+ ASSERT (mbsinit (&state));
+ input[5] = '\0';
+ input[6] = '\0';
+
+ wc = (wchar_t) 0xBADFACE;
+ ret = mbrtowc (&wc, input + 7, 1, &state);
+ ASSERT (ret == 1);
+ ASSERT (wc == '>');
+ ASSERT (mbsinit (&state));
+
+ /* Test some invalid input. */
+ 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);
+
+ 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);
+ }
+ return 0;
+
+ case 950:
+ /* Locale encoding is CP950, similar to Big5. */
+ {
+ char input[] = "<\244\351\245\273\273\171>"; /* "<日本語>" */
+ memset (&state, '\0', sizeof (mbstate_t));
+
+ wc = (wchar_t) 0xBADFACE;
+ ret = mbrtowc (&wc, input, 1, &state);
+ ASSERT (ret == 1);
+ ASSERT (wc == '<');
+ ASSERT (mbsinit (&state));
+ input[0] = '\0';
+
+ wc = (wchar_t) 0xBADFACE;
+ ret = mbrtowc (&wc, input + 1, 2, &state);
+ ASSERT (ret == 2);
+ ASSERT (wctob (wc) == EOF);
+ ASSERT (wc == 0x65E5);
+ ASSERT (mbsinit (&state));
+ input[1] = '\0';
+ input[2] = '\0';
+
+ wc = (wchar_t) 0xBADFACE;
+ ret = mbrtowc (&wc, input + 3, 1, &state);
+ ASSERT (ret == (size_t)(-2));
+ ASSERT (wc == (wchar_t) 0xBADFACE);
+ ASSERT (!mbsinit (&state));
+ input[3] = '\0';
+
+ wc = (wchar_t) 0xBADFACE;
+ ret = mbrtowc (&wc, input + 4, 4, &state);
+ ASSERT (ret == 1);
+ ASSERT (wctob (wc) == EOF);
+ ASSERT (wc == 0x672C);
+ ASSERT (mbsinit (&state));
+ input[4] = '\0';
+
+ /* Test support of NULL first argument. */
+ ret = mbrtowc (NULL, input + 5, 3, &state);
+ ASSERT (ret == 2);
+ ASSERT (mbsinit (&state));
+
+ wc = (wchar_t) 0xBADFACE;
+ ret = mbrtowc (&wc, input + 5, 3, &state);
+ ASSERT (ret == 2);
+ ASSERT (wctob (wc) == EOF);
+ ASSERT (wc == 0x8A9E);
+ ASSERT (mbsinit (&state));
+ input[5] = '\0';
+ input[6] = '\0';
+
+ wc = (wchar_t) 0xBADFACE;
+ ret = mbrtowc (&wc, input + 7, 1, &state);
+ ASSERT (ret == 1);
+ ASSERT (wc == '>');
+ ASSERT (mbsinit (&state));
+
+ /* Test some invalid input. */
+ 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);
+
+ 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);
+ }
+ return 0;
+
+ case 936:
+ /* Locale encoding is CP936 = GBK, an extension of GB2312. */
+ {
+ char input[] = "<\310\325\261\276\325\132>"; /* "<日本語>" */
+ memset (&state, '\0', sizeof (mbstate_t));
+
+ wc = (wchar_t) 0xBADFACE;
+ ret = mbrtowc (&wc, input, 1, &state);
+ ASSERT (ret == 1);
+ ASSERT (wc == '<');
+ ASSERT (mbsinit (&state));
+ input[0] = '\0';
+
+ wc = (wchar_t) 0xBADFACE;
+ ret = mbrtowc (&wc, input + 1, 2, &state);
+ ASSERT (ret == 2);
+ ASSERT (wctob (wc) == EOF);
+ ASSERT (wc == 0x65E5);
+ ASSERT (mbsinit (&state));
+ input[1] = '\0';
+ input[2] = '\0';
+
+ wc = (wchar_t) 0xBADFACE;
+ ret = mbrtowc (&wc, input + 3, 1, &state);
+ ASSERT (ret == (size_t)(-2));
+ ASSERT (wc == (wchar_t) 0xBADFACE);
+ ASSERT (!mbsinit (&state));
+ input[3] = '\0';
+
+ wc = (wchar_t) 0xBADFACE;
+ ret = mbrtowc (&wc, input + 4, 4, &state);
+ ASSERT (ret == 1);
+ ASSERT (wctob (wc) == EOF);
+ ASSERT (wc == 0x672C);
+ ASSERT (mbsinit (&state));
+ input[4] = '\0';
+
+ /* Test support of NULL first argument. */
+ ret = mbrtowc (NULL, input + 5, 3, &state);
+ ASSERT (ret == 2);
+ ASSERT (mbsinit (&state));
+
+ wc = (wchar_t) 0xBADFACE;
+ ret = mbrtowc (&wc, input + 5, 3, &state);
+ ASSERT (ret == 2);
+ ASSERT (wctob (wc) == EOF);
+ ASSERT (wc == 0x8A9E);
+ ASSERT (mbsinit (&state));
+ input[5] = '\0';
+ input[6] = '\0';
+
+ wc = (wchar_t) 0xBADFACE;
+ ret = mbrtowc (&wc, input + 7, 1, &state);
+ ASSERT (ret == 1);
+ ASSERT (wc == '>');
+ ASSERT (mbsinit (&state));
+
+ /* Test some invalid input. */
+ 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);
+
+ 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);
+ }
+ return 0;
+
+ case 54936:
+ /* Locale encoding is CP54936 = GB18030. */
+ {
+ char input[] = "B\250\271\201\060\211\070er"; /* "Büßer" */
+ memset (&state, '\0', sizeof (mbstate_t));
+
+ wc = (wchar_t) 0xBADFACE;
+ ret = mbrtowc (&wc, input, 1, &state);
+ ASSERT (ret == 1);
+ ASSERT (wc == 'B');
+ ASSERT (mbsinit (&state));
+ input[0] = '\0';
+
+ wc = (wchar_t) 0xBADFACE;
+ ret = mbrtowc (&wc, input + 1, 1, &state);
+ ASSERT (ret == (size_t)(-2));
+ ASSERT (wc == (wchar_t) 0xBADFACE);
+ ASSERT (!mbsinit (&state));
+ input[1] = '\0';
+
+ wc = (wchar_t) 0xBADFACE;
+ ret = mbrtowc (&wc, input + 2, 7, &state);
+ ASSERT (ret == 1);
+ ASSERT (wctob (wc) == EOF);
+ ASSERT (wc == 0x00FC);
+ ASSERT (mbsinit (&state));
+ input[2] = '\0';
+
+ /* Test support of NULL first argument. */
+ ret = mbrtowc (NULL, input + 3, 6, &state);
+ ASSERT (ret == 4);
+ ASSERT (mbsinit (&state));
+
+ wc = (wchar_t) 0xBADFACE;
+ ret = mbrtowc (&wc, input + 3, 6, &state);
+ ASSERT (ret == 4);
+ ASSERT (wctob (wc) == EOF);
+ ASSERT (wc == 0x00DF);
+ ASSERT (mbsinit (&state));
+ input[3] = '\0';
+ input[4] = '\0';
+ input[5] = '\0';
+ input[6] = '\0';
+
+ wc = (wchar_t) 0xBADFACE;
+ ret = mbrtowc (&wc, input + 7, 2, &state);
+ ASSERT (ret == 1);
+ ASSERT (wc == 'e');
+ ASSERT (mbsinit (&state));
+ input[5] = '\0';
+
+ wc = (wchar_t) 0xBADFACE;
+ ret = mbrtowc (&wc, input + 8, 1, &state);
+ ASSERT (ret == 1);
+ ASSERT (wc == 'r');
+ ASSERT (mbsinit (&state));
+
+ /* Test some invalid input. */
+ 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);
+
+ 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);
+
+ memset (&state, '\0', sizeof (mbstate_t));
+ wc = (wchar_t) 0xBADFACE;
+ ret = mbrtowc (&wc, "\201\045", 2, &state); /* 0x81 0x25 */
+ ASSERT (ret == (size_t)-1);
+ ASSERT (errno == EILSEQ);
+
+ memset (&state, '\0', sizeof (mbstate_t));
+ wc = (wchar_t) 0xBADFACE;
+ ret = mbrtowc (&wc, "\201\060\377", 3, &state); /* 0x81 0x30 0xFF */
+ ASSERT (ret == (size_t)-1);
+ ASSERT (errno == EILSEQ);
+
+ memset (&state, '\0', sizeof (mbstate_t));
+ wc = (wchar_t) 0xBADFACE;
+ ret = mbrtowc (&wc, "\201\060\377\064", 4, &state); /* 0x81 0x30 0xFF 0x34 */
+ ASSERT (ret == (size_t)-1);
+ ASSERT (errno == EILSEQ);
+
+ memset (&state, '\0', sizeof (mbstate_t));
+ wc = (wchar_t) 0xBADFACE;
+ ret = mbrtowc (&wc, "\201\060\211\072", 4, &state); /* 0x81 0x30 0x89 0x3A */
+ ASSERT (ret == (size_t)-1);
+ ASSERT (errno == EILSEQ);
+ }
+ return 0;
+
+ case 65001:
+ /* Locale encoding is CP65001 = UTF-8. */
+ {
+ char input[] = "B\303\274\303\237er"; /* "Büßer" */
+ memset (&state, '\0', sizeof (mbstate_t));
+
+ wc = (wchar_t) 0xBADFACE;
+ ret = mbrtowc (&wc, input, 1, &state);
+ ASSERT (ret == 1);
+ ASSERT (wc == 'B');
+ ASSERT (mbsinit (&state));
+ input[0] = '\0';
+
+ wc = (wchar_t) 0xBADFACE;
+ ret = mbrtowc (&wc, input + 1, 1, &state);
+ ASSERT (ret == (size_t)(-2));
+ ASSERT (wc == (wchar_t) 0xBADFACE);
+ ASSERT (!mbsinit (&state));
+ input[1] = '\0';
+
+ wc = (wchar_t) 0xBADFACE;
+ ret = mbrtowc (&wc, input + 2, 5, &state);
+ ASSERT (ret == 1);
+ ASSERT (wctob (wc) == EOF);
+ ASSERT (wc == 0x00FC);
+ ASSERT (mbsinit (&state));
+ input[2] = '\0';
+
+ /* Test support of NULL first argument. */
+ ret = mbrtowc (NULL, input + 3, 4, &state);
+ ASSERT (ret == 2);
+ ASSERT (mbsinit (&state));
+
+ wc = (wchar_t) 0xBADFACE;
+ ret = mbrtowc (&wc, input + 3, 4, &state);
+ ASSERT (ret == 2);
+ ASSERT (wctob (wc) == EOF);
+ ASSERT (wc == 0x00DF);
+ ASSERT (mbsinit (&state));
+ input[3] = '\0';
+ input[4] = '\0';
+
+ wc = (wchar_t) 0xBADFACE;
+ ret = mbrtowc (&wc, input + 5, 2, &state);
+ ASSERT (ret == 1);
+ ASSERT (wc == 'e');
+ ASSERT (mbsinit (&state));
+ input[5] = '\0';
+
+ wc = (wchar_t) 0xBADFACE;
+ ret = mbrtowc (&wc, input + 6, 1, &state);
+ ASSERT (ret == 1);
+ ASSERT (wc == 'r');
+ ASSERT (mbsinit (&state));
+
+ /* Test some invalid input. */
+ 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);
+
+ memset (&state, '\0', sizeof (mbstate_t));
+ wc = (wchar_t) 0xBADFACE;
+ ret = mbrtowc (&wc, "\303\300", 2, &state); /* 0xC3 0xC0 */
+ ASSERT (ret == (size_t)-1);
+ ASSERT (errno == EILSEQ);
+
+ memset (&state, '\0', sizeof (mbstate_t));
+ wc = (wchar_t) 0xBADFACE;
+ ret = mbrtowc (&wc, "\343\300", 2, &state); /* 0xE3 0xC0 */
+ ASSERT (ret == (size_t)-1);
+ ASSERT (errno == EILSEQ);
+
+ memset (&state, '\0', sizeof (mbstate_t));
+ wc = (wchar_t) 0xBADFACE;
+ ret = mbrtowc (&wc, "\343\300\200", 3, &state); /* 0xE3 0xC0 0x80 */
+ ASSERT (ret == (size_t)-1);
+ ASSERT (errno == EILSEQ);
+
+ memset (&state, '\0', sizeof (mbstate_t));
+ wc = (wchar_t) 0xBADFACE;
+ ret = mbrtowc (&wc, "\343\200\300", 3, &state); /* 0xE3 0x80 0xC0 */
+ ASSERT (ret == (size_t)-1);
+ ASSERT (errno == EILSEQ);
+
+ memset (&state, '\0', sizeof (mbstate_t));
+ wc = (wchar_t) 0xBADFACE;
+ ret = mbrtowc (&wc, "\363\300", 2, &state); /* 0xF3 0xC0 */
+ ASSERT (ret == (size_t)-1);
+ ASSERT (errno == EILSEQ);
+
+ memset (&state, '\0', sizeof (mbstate_t));
+ wc = (wchar_t) 0xBADFACE;
+ ret = mbrtowc (&wc, "\363\300\200\200", 4, &state); /* 0xF3 0xC0 0x80 0x80 */
+ ASSERT (ret == (size_t)-1);
+ ASSERT (errno == EILSEQ);
+
+ memset (&state, '\0', sizeof (mbstate_t));
+ wc = (wchar_t) 0xBADFACE;
+ ret = mbrtowc (&wc, "\363\200\300", 3, &state); /* 0xF3 0x80 0xC0 */
+ ASSERT (ret == (size_t)-1);
+ ASSERT (errno == EILSEQ);
+
+ memset (&state, '\0', sizeof (mbstate_t));
+ wc = (wchar_t) 0xBADFACE;
+ ret = mbrtowc (&wc, "\363\200\300\200", 4, &state); /* 0xF3 0x80 0xC0 0x80 */
+ ASSERT (ret == (size_t)-1);
+ ASSERT (errno == EILSEQ);
+
+ memset (&state, '\0', sizeof (mbstate_t));
+ wc = (wchar_t) 0xBADFACE;
+ ret = mbrtowc (&wc, "\363\200\200\300", 4, &state); /* 0xF3 0x80 0x80 0xC0 */
+ ASSERT (ret == (size_t)-1);
+ ASSERT (errno == EILSEQ);
+ }
+ return 0;
+
+ default:
+ return 1;
+ }
+}
+
+int
+main (int argc, char *argv[])
+{
+ int codepage = atoi (argv[argc - 1]);
+ int result;
+ int i;
+
+ result = 77;
+ for (i = 1; i < argc - 1; i++)
+ {
+ int ret = test_one_locale (argv[i], codepage);
+
+ if (ret != 77)
+ result = ret;
+ }
+
+ if (result == 77)
+ {
+ fprintf (stderr, "Skipping test: found no locale with codepage %d\n",
+ codepage);
+ }
+ return result;
+}
+
+#else
+
+int
+main (int argc, char *argv[])
+{
+ fputs ("Skipping test: not a native Windows system\n", stderr);
+ return 77;
+}
+
+#endif
diff --git a/gnulib-tests/test-mbrtowc.c b/gnulib-tests/test-mbrtowc.c
new file mode 100644
index 0000000..f7fed6a
--- /dev/null
+++ b/gnulib-tests/test-mbrtowc.c
@@ -0,0 +1,349 @@
+/* Test of conversion of multibyte character to wide character.
+ Copyright (C) 2008-2016 Free Software Foundation, Inc.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+/* Written by Bruno Haible <bruno@clisp.org>, 2008. */
+
+#include <config.h>
+
+#include <wchar.h>
+
+#include "signature.h"
+SIGNATURE_CHECK (mbrtowc, size_t, (wchar_t *, char const *, size_t,
+ mbstate_t *));
+
+#include <locale.h>
+#include <stdio.h>
+#include <string.h>
+
+#include "macros.h"
+
+int
+main (int argc, char *argv[])
+{
+ mbstate_t state;
+ wchar_t wc;
+ size_t ret;
+
+ /* configure should already have checked that the locale is supported. */
+ if (setlocale (LC_ALL, "") == NULL)
+ return 1;
+
+ /* Test zero-length input. */
+ {
+ memset (&state, '\0', sizeof (mbstate_t));
+ wc = (wchar_t) 0xBADFACE;
+ ret = mbrtowc (&wc, "x", 0, &state);
+ ASSERT (ret == (size_t)(-2));
+ ASSERT (mbsinit (&state));
+ }
+
+ /* Test NUL byte input. */
+ {
+ memset (&state, '\0', sizeof (mbstate_t));
+ wc = (wchar_t) 0xBADFACE;
+ ret = mbrtowc (&wc, "", 1, &state);
+ ASSERT (ret == 0);
+ ASSERT (wc == 0);
+ ASSERT (mbsinit (&state));
+ ret = mbrtowc (NULL, "", 1, &state);
+ ASSERT (ret == 0);
+ ASSERT (mbsinit (&state));
+ }
+
+ /* Test single-byte input. */
+ {
+ int c;
+ char buf[1];
+
+ memset (&state, '\0', sizeof (mbstate_t));
+ for (c = 0; c < 0x100; c++)
+ switch (c)
+ {
+ default:
+ if (! (c && 1 < argc && argv[1][0] == '5'))
+ break;
+ /* Fall through. */
+ case '\t': case '\v': case '\f':
+ case ' ': case '!': case '"': case '#': case '%':
+ case '&': case '\'': case '(': case ')': case '*':
+ case '+': case ',': case '-': case '.': case '/':
+ case '0': case '1': case '2': case '3': case '4':
+ case '5': case '6': case '7': case '8': case '9':
+ case ':': case ';': case '<': case '=': case '>':
+ case '?':
+ case 'A': case 'B': case 'C': case 'D': case 'E':
+ case 'F': case 'G': case 'H': case 'I': case 'J':
+ case 'K': case 'L': case 'M': case 'N': case 'O':
+ case 'P': case 'Q': case 'R': case 'S': case 'T':
+ case 'U': case 'V': case 'W': case 'X': case 'Y':
+ case 'Z':
+ case '[': case '\\': case ']': case '^': case '_':
+ case 'a': case 'b': case 'c': case 'd': case 'e':
+ case 'f': case 'g': case 'h': case 'i': case 'j':
+ case 'k': case 'l': case 'm': case 'n': case 'o':
+ case 'p': case 'q': case 'r': case 's': case 't':
+ case 'u': case 'v': case 'w': case 'x': case 'y':
+ case 'z': case '{': case '|': case '}': case '~':
+ /* c is in the ISO C "basic character set", or argv[1] starts
+ with '5' so we are testing all nonnull bytes. */
+ buf[0] = c;
+ wc = (wchar_t) 0xBADFACE;
+ ret = mbrtowc (&wc, buf, 1, &state);
+ ASSERT (ret == 1);
+ ASSERT (wc == c);
+ ASSERT (mbsinit (&state));
+ ret = mbrtowc (NULL, buf, 1, &state);
+ ASSERT (ret == 1);
+ ASSERT (mbsinit (&state));
+ break;
+ }
+ }
+
+ /* Test special calling convention, passing a NULL pointer. */
+ {
+ memset (&state, '\0', sizeof (mbstate_t));
+ wc = (wchar_t) 0xBADFACE;
+ ret = mbrtowc (&wc, NULL, 5, &state);
+ ASSERT (ret == 0);
+ ASSERT (wc == (wchar_t) 0xBADFACE);
+ ASSERT (mbsinit (&state));
+ }
+
+ if (argc > 1)
+ switch (argv[1][0])
+ {
+ case '1':
+ /* Locale encoding is ISO-8859-1 or ISO-8859-15. */
+ {
+ char input[] = "B\374\337er"; /* "Büßer" */
+ memset (&state, '\0', sizeof (mbstate_t));
+
+ wc = (wchar_t) 0xBADFACE;
+ ret = mbrtowc (&wc, input, 1, &state);
+ ASSERT (ret == 1);
+ ASSERT (wc == 'B');
+ ASSERT (mbsinit (&state));
+ input[0] = '\0';
+
+ wc = (wchar_t) 0xBADFACE;
+ ret = mbrtowc (&wc, input + 1, 1, &state);
+ ASSERT (ret == 1);
+ ASSERT (wctob (wc) == (unsigned char) '\374');
+ ASSERT (mbsinit (&state));
+ input[1] = '\0';
+
+ /* Test support of NULL first argument. */
+ ret = mbrtowc (NULL, input + 2, 3, &state);
+ ASSERT (ret == 1);
+ ASSERT (mbsinit (&state));
+
+ wc = (wchar_t) 0xBADFACE;
+ ret = mbrtowc (&wc, input + 2, 3, &state);
+ ASSERT (ret == 1);
+ ASSERT (wctob (wc) == (unsigned char) '\337');
+ ASSERT (mbsinit (&state));
+ input[2] = '\0';
+
+ wc = (wchar_t) 0xBADFACE;
+ ret = mbrtowc (&wc, input + 3, 2, &state);
+ ASSERT (ret == 1);
+ ASSERT (wc == 'e');
+ ASSERT (mbsinit (&state));
+ input[3] = '\0';
+
+ wc = (wchar_t) 0xBADFACE;
+ ret = mbrtowc (&wc, input + 4, 1, &state);
+ ASSERT (ret == 1);
+ ASSERT (wc == 'r');
+ ASSERT (mbsinit (&state));
+ }
+ return 0;
+
+ case '2':
+ /* Locale encoding is UTF-8. */
+ {
+ char input[] = "B\303\274\303\237er"; /* "Büßer" */
+ memset (&state, '\0', sizeof (mbstate_t));
+
+ wc = (wchar_t) 0xBADFACE;
+ ret = mbrtowc (&wc, input, 1, &state);
+ ASSERT (ret == 1);
+ ASSERT (wc == 'B');
+ ASSERT (mbsinit (&state));
+ input[0] = '\0';
+
+ wc = (wchar_t) 0xBADFACE;
+ ret = mbrtowc (&wc, input + 1, 1, &state);
+ ASSERT (ret == (size_t)(-2));
+ ASSERT (wc == (wchar_t) 0xBADFACE);
+ ASSERT (!mbsinit (&state));
+ input[1] = '\0';
+
+ wc = (wchar_t) 0xBADFACE;
+ ret = mbrtowc (&wc, input + 2, 5, &state);
+ ASSERT (ret == 1);
+ ASSERT (wctob (wc) == EOF);
+ ASSERT (mbsinit (&state));
+ input[2] = '\0';
+
+ /* Test support of NULL first argument. */
+ ret = mbrtowc (NULL, input + 3, 4, &state);
+ ASSERT (ret == 2);
+ ASSERT (mbsinit (&state));
+
+ wc = (wchar_t) 0xBADFACE;
+ ret = mbrtowc (&wc, input + 3, 4, &state);
+ ASSERT (ret == 2);
+ ASSERT (wctob (wc) == EOF);
+ ASSERT (mbsinit (&state));
+ input[3] = '\0';
+ input[4] = '\0';
+
+ wc = (wchar_t) 0xBADFACE;
+ ret = mbrtowc (&wc, input + 5, 2, &state);
+ ASSERT (ret == 1);
+ ASSERT (wc == 'e');
+ ASSERT (mbsinit (&state));
+ input[5] = '\0';
+
+ wc = (wchar_t) 0xBADFACE;
+ ret = mbrtowc (&wc, input + 6, 1, &state);
+ ASSERT (ret == 1);
+ ASSERT (wc == 'r');
+ ASSERT (mbsinit (&state));
+ }
+ return 0;
+
+ case '3':
+ /* Locale encoding is EUC-JP. */
+ {
+ char input[] = "<\306\374\313\334\270\354>"; /* "<日本語>" */
+ memset (&state, '\0', sizeof (mbstate_t));
+
+ wc = (wchar_t) 0xBADFACE;
+ ret = mbrtowc (&wc, input, 1, &state);
+ ASSERT (ret == 1);
+ ASSERT (wc == '<');
+ ASSERT (mbsinit (&state));
+ input[0] = '\0';
+
+ wc = (wchar_t) 0xBADFACE;
+ ret = mbrtowc (&wc, input + 1, 2, &state);
+ ASSERT (ret == 2);
+ ASSERT (wctob (wc) == EOF);
+ ASSERT (mbsinit (&state));
+ input[1] = '\0';
+ input[2] = '\0';
+
+ wc = (wchar_t) 0xBADFACE;
+ ret = mbrtowc (&wc, input + 3, 1, &state);
+ ASSERT (ret == (size_t)(-2));
+ ASSERT (wc == (wchar_t) 0xBADFACE);
+ ASSERT (!mbsinit (&state));
+ input[3] = '\0';
+
+ wc = (wchar_t) 0xBADFACE;
+ ret = mbrtowc (&wc, input + 4, 4, &state);
+ ASSERT (ret == 1);
+ ASSERT (wctob (wc) == EOF);
+ ASSERT (mbsinit (&state));
+ input[4] = '\0';
+
+ /* Test support of NULL first argument. */
+ ret = mbrtowc (NULL, input + 5, 3, &state);
+ ASSERT (ret == 2);
+ ASSERT (mbsinit (&state));
+
+ wc = (wchar_t) 0xBADFACE;
+ ret = mbrtowc (&wc, input + 5, 3, &state);
+ ASSERT (ret == 2);
+ ASSERT (wctob (wc) == EOF);
+ ASSERT (mbsinit (&state));
+ input[5] = '\0';
+ input[6] = '\0';
+
+ wc = (wchar_t) 0xBADFACE;
+ ret = mbrtowc (&wc, input + 7, 1, &state);
+ ASSERT (ret == 1);
+ ASSERT (wc == '>');
+ ASSERT (mbsinit (&state));
+ }
+ return 0;
+
+ case '4':
+ /* Locale encoding is GB18030. */
+ {
+ char input[] = "B\250\271\201\060\211\070er"; /* "Büßer" */
+ memset (&state, '\0', sizeof (mbstate_t));
+
+ wc = (wchar_t) 0xBADFACE;
+ ret = mbrtowc (&wc, input, 1, &state);
+ ASSERT (ret == 1);
+ ASSERT (wc == 'B');
+ ASSERT (mbsinit (&state));
+ input[0] = '\0';
+
+ wc = (wchar_t) 0xBADFACE;
+ ret = mbrtowc (&wc, input + 1, 1, &state);
+ ASSERT (ret == (size_t)(-2));
+ ASSERT (wc == (wchar_t) 0xBADFACE);
+ ASSERT (!mbsinit (&state));
+ input[1] = '\0';
+
+ wc = (wchar_t) 0xBADFACE;
+ ret = mbrtowc (&wc, input + 2, 7, &state);
+ ASSERT (ret == 1);
+ ASSERT (wctob (wc) == EOF);
+ ASSERT (mbsinit (&state));
+ input[2] = '\0';
+
+ /* Test support of NULL first argument. */
+ ret = mbrtowc (NULL, input + 3, 6, &state);
+ ASSERT (ret == 4);
+ ASSERT (mbsinit (&state));
+
+ wc = (wchar_t) 0xBADFACE;
+ ret = mbrtowc (&wc, input + 3, 6, &state);
+ ASSERT (ret == 4);
+ ASSERT (wctob (wc) == EOF);
+ ASSERT (mbsinit (&state));
+ input[3] = '\0';
+ input[4] = '\0';
+ input[5] = '\0';
+ input[6] = '\0';
+
+ wc = (wchar_t) 0xBADFACE;
+ ret = mbrtowc (&wc, input + 7, 2, &state);
+ ASSERT (ret == 1);
+ ASSERT (wc == 'e');
+ ASSERT (mbsinit (&state));
+ input[5] = '\0';
+
+ wc = (wchar_t) 0xBADFACE;
+ ret = mbrtowc (&wc, input + 8, 1, &state);
+ ASSERT (ret == 1);
+ ASSERT (wc == 'r');
+ ASSERT (mbsinit (&state));
+ }
+ return 0;
+
+ case '5':
+ /* C locale; tested above. */
+ return 0;
+ }
+
+ return 1;
+}
diff --git a/gnulib-tests/test-mbrtowc1.sh b/gnulib-tests/test-mbrtowc1.sh
new file mode 100755
index 0000000..3becba3
--- /dev/null
+++ b/gnulib-tests/test-mbrtowc1.sh
@@ -0,0 +1,15 @@
+#!/bin/sh
+
+# Test in an ISO-8859-1 or ISO-8859-15 locale.
+: ${LOCALE_FR=fr_FR}
+if test $LOCALE_FR = none; then
+ if test -f /usr/bin/localedef; then
+ echo "Skipping test: no traditional french locale is installed"
+ else
+ echo "Skipping test: no traditional french locale is supported"
+ fi
+ exit 77
+fi
+
+LC_ALL=$LOCALE_FR \
+./test-mbrtowc${EXEEXT} 1
diff --git a/gnulib-tests/test-mbrtowc2.sh b/gnulib-tests/test-mbrtowc2.sh
new file mode 100755
index 0000000..0405aba
--- /dev/null
+++ b/gnulib-tests/test-mbrtowc2.sh
@@ -0,0 +1,15 @@
+#!/bin/sh
+
+# Test whether a specific UTF-8 locale is installed.
+: ${LOCALE_FR_UTF8=fr_FR.UTF-8}
+if test $LOCALE_FR_UTF8 = none; then
+ if test -f /usr/bin/localedef; then
+ echo "Skipping test: no french Unicode locale is installed"
+ else
+ echo "Skipping test: no french Unicode locale is supported"
+ fi
+ exit 77
+fi
+
+LC_ALL=$LOCALE_FR_UTF8 \
+./test-mbrtowc${EXEEXT} 2
diff --git a/gnulib-tests/test-mbrtowc3.sh b/gnulib-tests/test-mbrtowc3.sh
new file mode 100755
index 0000000..63a89a2
--- /dev/null
+++ b/gnulib-tests/test-mbrtowc3.sh
@@ -0,0 +1,15 @@
+#!/bin/sh
+
+# Test whether a specific EUC-JP locale is installed.
+: ${LOCALE_JA=ja_JP}
+if test $LOCALE_JA = none; then
+ if test -f /usr/bin/localedef; then
+ echo "Skipping test: no traditional japanese locale is installed"
+ else
+ echo "Skipping test: no traditional japanese locale is supported"
+ fi
+ exit 77
+fi
+
+LC_ALL=$LOCALE_JA \
+./test-mbrtowc${EXEEXT} 3
diff --git a/gnulib-tests/test-mbrtowc4.sh b/gnulib-tests/test-mbrtowc4.sh
new file mode 100755
index 0000000..b299a2c
--- /dev/null
+++ b/gnulib-tests/test-mbrtowc4.sh
@@ -0,0 +1,15 @@
+#!/bin/sh
+
+# Test whether a specific GB18030 locale is installed.
+: ${LOCALE_ZH_CN=zh_CN.GB18030}
+if test $LOCALE_ZH_CN = none; then
+ if test -f /usr/bin/localedef; then
+ echo "Skipping test: no transitional chinese locale is installed"
+ else
+ echo "Skipping test: no transitional chinese locale is supported"
+ fi
+ exit 77
+fi
+
+LC_ALL=$LOCALE_ZH_CN \
+./test-mbrtowc${EXEEXT} 4
diff --git a/gnulib-tests/test-mbrtowc5.sh b/gnulib-tests/test-mbrtowc5.sh
new file mode 100755
index 0000000..c10b228
--- /dev/null
+++ b/gnulib-tests/test-mbrtowc5.sh
@@ -0,0 +1,6 @@
+#!/bin/sh
+# Test whether the POSIX locale has encoding errors.
+LC_ALL=C \
+./test-mbrtowc${EXEEXT} 5 || exit
+LC_ALL=POSIX \
+./test-mbrtowc${EXEEXT} 5
diff --git a/gnulib-tests/test-mbsinit.c b/gnulib-tests/test-mbsinit.c
new file mode 100644
index 0000000..8cd1c4d
--- /dev/null
+++ b/gnulib-tests/test-mbsinit.c
@@ -0,0 +1,55 @@
+/* Test of test for initial conversion state.
+ Copyright (C) 2008-2016 Free Software Foundation, Inc.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+/* Written by Bruno Haible <bruno@clisp.org>, 2008. */
+
+#include <config.h>
+
+#include <wchar.h>
+
+#include "signature.h"
+SIGNATURE_CHECK (mbsinit, int, (const mbstate_t *));
+
+#include <locale.h>
+
+#include "macros.h"
+
+int
+main (int argc, char *argv[])
+{
+ static mbstate_t state;
+
+ ASSERT (mbsinit (NULL));
+
+ ASSERT (mbsinit (&state));
+
+ if (argc > 1)
+ {
+ static const char input[1] = "\303";
+ wchar_t wc;
+ size_t ret;
+
+ /* configure should already have checked that the locale is supported. */
+ if (setlocale (LC_ALL, "") == NULL)
+ return 1;
+
+ ret = mbrtowc (&wc, input, 1, &state);
+ ASSERT (ret == (size_t)(-2));
+ ASSERT (!mbsinit (&state));
+ }
+
+ return 0;
+}
diff --git a/gnulib-tests/test-mbsinit.sh b/gnulib-tests/test-mbsinit.sh
new file mode 100755
index 0000000..bbda48d
--- /dev/null
+++ b/gnulib-tests/test-mbsinit.sh
@@ -0,0 +1,15 @@
+#!/bin/sh
+
+# Test whether a specific UTF-8 locale is installed.
+: ${LOCALE_FR_UTF8=fr_FR.UTF-8}
+if test $LOCALE_FR_UTF8 = none; then
+ if test -f /usr/bin/localedef; then
+ echo "Skipping test: no french Unicode locale is installed"
+ else
+ echo "Skipping test: no french Unicode locale is supported"
+ fi
+ exit 77
+fi
+
+LC_ALL=$LOCALE_FR_UTF8 \
+./test-mbsinit${EXEEXT}
diff --git a/gnulib-tests/test-memchr.c b/gnulib-tests/test-memchr.c
new file mode 100644
index 0000000..1526ed2
--- /dev/null
+++ b/gnulib-tests/test-memchr.c
@@ -0,0 +1,132 @@
+/*
+ * Copyright (C) 2008-2016 Free Software Foundation, Inc.
+ * Written by Eric Blake and Bruno Haible
+ *
+ * This 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 <string.h>
+
+#include "signature.h"
+SIGNATURE_CHECK (memchr, void *, (void const *, int, size_t));
+
+#include <stdlib.h>
+
+#include "zerosize-ptr.h"
+#include "macros.h"
+
+/* Calculating void * + int is not portable, so this wrapper converts
+ to char * to make the tests easier to write. */
+#define MEMCHR (char *) memchr
+
+int
+main (void)
+{
+ size_t n = 0x100000;
+ char *input = malloc (n);
+ ASSERT (input);
+
+ input[0] = 'a';
+ input[1] = 'b';
+ memset (input + 2, 'c', 1024);
+ memset (input + 1026, 'd', n - 1028);
+ input[n - 2] = 'e';
+ input[n - 1] = 'a';
+
+ /* Basic behavior tests. */
+ ASSERT (MEMCHR (input, 'a', n) == input);
+
+ ASSERT (MEMCHR (input, 'a', 0) == NULL);
+ ASSERT (MEMCHR (zerosize_ptr (), 'a', 0) == NULL);
+
+ ASSERT (MEMCHR (input, 'b', n) == input + 1);
+ ASSERT (MEMCHR (input, 'c', n) == input + 2);
+ ASSERT (MEMCHR (input, 'd', n) == input + 1026);
+
+ ASSERT (MEMCHR (input + 1, 'a', n - 1) == input + n - 1);
+ ASSERT (MEMCHR (input + 1, 'e', n - 1) == input + n - 2);
+ ASSERT (MEMCHR (input + 1, 0x789abc00 | 'e', n - 1) == input + n - 2);
+
+ ASSERT (MEMCHR (input, 'f', n) == NULL);
+ ASSERT (MEMCHR (input, '\0', n) == NULL);
+
+ /* Check that a very long haystack is handled quickly if the byte is
+ found near the beginning. */
+ {
+ size_t repeat = 10000;
+ for (; repeat > 0; repeat--)
+ {
+ ASSERT (MEMCHR (input, 'c', n) == input + 2);
+ }
+ }
+
+ /* Alignment tests. */
+ {
+ int i, j;
+ for (i = 0; i < 32; i++)
+ {
+ for (j = 0; j < 256; j++)
+ input[i + j] = j;
+ for (j = 0; j < 256; j++)
+ {
+ ASSERT (MEMCHR (input + i, j, 256) == input + i + j);
+ }
+ }
+ }
+
+ /* Check that memchr() does not read past the first occurrence of the
+ byte being searched. See the Austin Group's clarification
+ <http://www.opengroup.org/austin/docs/austin_454.txt>.
+ Test both '\0' and something else, since some implementations
+ special-case searching for NUL.
+ */
+ {
+ char *page_boundary = (char *) zerosize_ptr ();
+ /* Too small, and we miss cache line boundary tests; too large,
+ and the test takes cubically longer to complete. */
+ int limit = 257;
+
+ if (page_boundary != NULL)
+ {
+ for (n = 1; n <= limit; n++)
+ {
+ char *mem = page_boundary - n;
+ memset (mem, 'X', n);
+ ASSERT (MEMCHR (mem, 'U', n) == NULL);
+ ASSERT (MEMCHR (mem, 0, n) == NULL);
+
+ {
+ size_t i;
+ size_t k;
+
+ for (i = 0; i < n; i++)
+ {
+ mem[i] = 'U';
+ for (k = i + 1; k < n + limit; k++)
+ ASSERT (MEMCHR (mem, 'U', k) == mem + i);
+ mem[i] = 0;
+ for (k = i + 1; k < n + limit; k++)
+ ASSERT (MEMCHR (mem, 0, k) == mem + i);
+ mem[i] = 'X';
+ }
+ }
+ }
+ }
+ }
+
+ free (input);
+
+ return 0;
+}
diff --git a/gnulib-tests/test-memrchr.c b/gnulib-tests/test-memrchr.c
new file mode 100644
index 0000000..3002062
--- /dev/null
+++ b/gnulib-tests/test-memrchr.c
@@ -0,0 +1,91 @@
+/*
+ * Copyright (C) 2008-2016 Free Software Foundation, Inc.
+ * Written by Eric Blake and Bruno Haible
+ *
+ * This 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 <string.h>
+
+#include "signature.h"
+SIGNATURE_CHECK (memrchr, void *, (void const *, int, size_t));
+
+#include <stdlib.h>
+
+#include "zerosize-ptr.h"
+#include "macros.h"
+
+/* Calculating void * + int is not portable, so this wrapper converts
+ to char * to make the tests easier to write. */
+#define MEMRCHR (char *) memrchr
+
+int
+main (void)
+{
+ size_t n = 0x100000;
+ char *input = malloc (n);
+ ASSERT (input);
+
+ input[n - 1] = 'a';
+ input[n - 2] = 'b';
+ memset (input + n - 1026, 'c', 1024);
+ memset (input + 2, 'd', n - 1028);
+ input[1] = 'e';
+ input[0] = 'a';
+
+ /* Basic behavior tests. */
+ ASSERT (MEMRCHR (input, 'a', n) == input + n - 1);
+
+ ASSERT (MEMRCHR (input, 'a', 0) == NULL);
+ ASSERT (MEMRCHR (zerosize_ptr (), 'a', 0) == NULL);
+
+ ASSERT (MEMRCHR (input, 'b', n) == input + n - 2);
+ ASSERT (MEMRCHR (input, 'c', n) == input + n - 3);
+ ASSERT (MEMRCHR (input, 'd', n) == input + n - 1027);
+
+ ASSERT (MEMRCHR (input, 'a', n - 1) == input);
+ ASSERT (MEMRCHR (input, 'e', n - 1) == input + 1);
+
+ ASSERT (MEMRCHR (input, 'f', n) == NULL);
+ ASSERT (MEMRCHR (input, '\0', n) == NULL);
+
+ /* Check that a very long haystack is handled quickly if the byte is
+ found near the end. */
+ {
+ size_t repeat = 10000;
+ for (; repeat > 0; repeat--)
+ {
+ ASSERT (MEMRCHR (input, 'c', n) == input + n - 3);
+ }
+ }
+
+ /* Alignment tests. */
+ {
+ int i, j;
+ for (i = 0; i < 32; i++)
+ {
+ for (j = 0; j < 256; j++)
+ input[i + j] = j;
+ for (j = 0; j < 256; j++)
+ {
+ ASSERT (MEMRCHR (input + i, j, 256) == input + i + j);
+ }
+ }
+ }
+
+ free (input);
+
+ return 0;
+}
diff --git a/gnulib-tests/test-nl_langinfo.c b/gnulib-tests/test-nl_langinfo.c
new file mode 100644
index 0000000..3a8fa8f
--- /dev/null
+++ b/gnulib-tests/test-nl_langinfo.c
@@ -0,0 +1,126 @@
+/* Test of nl_langinfo replacement.
+ Copyright (C) 2009-2016 Free Software Foundation, Inc.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+/* Written by Bruno Haible <bruno@clisp.org>, 2009. */
+
+#include <config.h>
+
+#include <langinfo.h>
+
+#include "signature.h"
+SIGNATURE_CHECK (nl_langinfo, char *, (nl_item));
+
+#include <locale.h>
+#include <stdlib.h>
+#include <string.h>
+
+#include "c-strcase.h"
+#include "macros.h"
+
+/* For GCC >= 4.3, silence the warnings
+ "comparison of unsigned expression >= 0 is always true"
+ in this file. */
+#if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3)
+# pragma GCC diagnostic ignored "-Wtype-limits"
+#endif
+
+int
+main (int argc, char *argv[])
+{
+ int pass = atoi (argv[1]);
+ /* pass locale
+ 0 C
+ 1 traditional French locale
+ 2 French UTF-8 locale
+ */
+
+ setlocale (LC_ALL, "");
+
+ /* nl_langinfo items of the LC_CTYPE category */
+ ASSERT (strlen (nl_langinfo (CODESET)) > 0);
+ if (pass == 2)
+ {
+ const char *codeset = nl_langinfo (CODESET);
+ ASSERT (c_strcasecmp (codeset, "UTF-8") == 0 || c_strcasecmp (codeset, "UTF8") == 0);
+ }
+ /* nl_langinfo items of the LC_NUMERIC category */
+ ASSERT (strlen (nl_langinfo (RADIXCHAR)) > 0);
+ ASSERT (strlen (nl_langinfo (THOUSEP)) >= 0);
+ /* nl_langinfo items of the LC_TIME category */
+ ASSERT (strlen (nl_langinfo (D_T_FMT)) > 0);
+ ASSERT (strlen (nl_langinfo (D_FMT)) > 0);
+ ASSERT (strlen (nl_langinfo (T_FMT)) > 0);
+ ASSERT (strlen (nl_langinfo (T_FMT_AMPM)) >= (pass == 0 ? 1 : 0));
+ ASSERT (strlen (nl_langinfo (AM_STR)) >= (pass == 0 ? 1 : 0));
+ ASSERT (strlen (nl_langinfo (PM_STR)) >= (pass == 0 ? 1 : 0));
+ ASSERT (strlen (nl_langinfo (DAY_1)) > 0);
+ ASSERT (strlen (nl_langinfo (DAY_2)) > 0);
+ ASSERT (strlen (nl_langinfo (DAY_3)) > 0);
+ ASSERT (strlen (nl_langinfo (DAY_4)) > 0);
+ ASSERT (strlen (nl_langinfo (DAY_5)) > 0);
+ ASSERT (strlen (nl_langinfo (DAY_6)) > 0);
+ ASSERT (strlen (nl_langinfo (DAY_7)) > 0);
+ ASSERT (strlen (nl_langinfo (ABDAY_1)) > 0);
+ ASSERT (strlen (nl_langinfo (ABDAY_2)) > 0);
+ ASSERT (strlen (nl_langinfo (ABDAY_3)) > 0);
+ ASSERT (strlen (nl_langinfo (ABDAY_4)) > 0);
+ ASSERT (strlen (nl_langinfo (ABDAY_5)) > 0);
+ ASSERT (strlen (nl_langinfo (ABDAY_6)) > 0);
+ ASSERT (strlen (nl_langinfo (ABDAY_7)) > 0);
+ ASSERT (strlen (nl_langinfo (MON_1)) > 0);
+ ASSERT (strlen (nl_langinfo (MON_2)) > 0);
+ ASSERT (strlen (nl_langinfo (MON_3)) > 0);
+ ASSERT (strlen (nl_langinfo (MON_4)) > 0);
+ ASSERT (strlen (nl_langinfo (MON_5)) > 0);
+ ASSERT (strlen (nl_langinfo (MON_6)) > 0);
+ ASSERT (strlen (nl_langinfo (MON_7)) > 0);
+ ASSERT (strlen (nl_langinfo (MON_8)) > 0);
+ ASSERT (strlen (nl_langinfo (MON_9)) > 0);
+ 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 (ABMON_1)) > 0);
+ ASSERT (strlen (nl_langinfo (ABMON_2)) > 0);
+ ASSERT (strlen (nl_langinfo (ABMON_3)) > 0);
+ ASSERT (strlen (nl_langinfo (ABMON_4)) > 0);
+ ASSERT (strlen (nl_langinfo (ABMON_5)) > 0);
+ ASSERT (strlen (nl_langinfo (ABMON_6)) > 0);
+ ASSERT (strlen (nl_langinfo (ABMON_7)) > 0);
+ ASSERT (strlen (nl_langinfo (ABMON_8)) > 0);
+ ASSERT (strlen (nl_langinfo (ABMON_9)) > 0);
+ ASSERT (strlen (nl_langinfo (ABMON_10)) > 0);
+ ASSERT (strlen (nl_langinfo (ABMON_11)) > 0);
+ ASSERT (strlen (nl_langinfo (ABMON_12)) > 0);
+ ASSERT (strlen (nl_langinfo (ERA)) >= 0);
+ ASSERT (strlen (nl_langinfo (ERA_D_FMT)) >= 0);
+ ASSERT (strlen (nl_langinfo (ERA_D_T_FMT)) >= 0);
+ ASSERT (strlen (nl_langinfo (ERA_T_FMT)) >= 0);
+ ASSERT (nl_langinfo (ALT_DIGITS) != NULL);
+ /* nl_langinfo items of the LC_MONETARY category */
+ {
+ const char *currency = nl_langinfo (CRNCYSTR);
+ ASSERT (strlen (currency) >= 0);
+#if !defined __NetBSD__
+ if (pass > 0)
+ ASSERT (strlen (currency) >= 1);
+#endif
+ }
+ /* nl_langinfo items of the LC_MESSAGES category */
+ ASSERT (strlen (nl_langinfo (YESEXPR)) > 0);
+ ASSERT (strlen (nl_langinfo (NOEXPR)) > 0);
+
+ return 0;
+}
diff --git a/gnulib-tests/test-nl_langinfo.sh b/gnulib-tests/test-nl_langinfo.sh
new file mode 100755
index 0000000..3168f42
--- /dev/null
+++ b/gnulib-tests/test-nl_langinfo.sh
@@ -0,0 +1,17 @@
+#!/bin/sh
+
+LC_ALL=C ./test-nl_langinfo${EXEEXT} 0 || exit 1
+
+# Test whether a specific traditional locale is installed.
+: ${LOCALE_FR=fr_FR}
+if test $LOCALE_FR != none; then
+ LC_ALL=$LOCALE_FR ./test-nl_langinfo${EXEEXT} 1 || exit 1
+fi
+
+# Test whether a specific UTF-8 locale is installed.
+: ${LOCALE_FR_UTF8=fr_FR.UTF-8}
+if test $LOCALE_FR_UTF8 != none; then
+ LC_ALL=$LOCALE_FR_UTF8 ./test-nl_langinfo${EXEEXT} 2 || exit 1
+fi
+
+exit 0
diff --git a/gnulib-tests/test-open.c b/gnulib-tests/test-open.c
new file mode 100644
index 0000000..d9e2e27
--- /dev/null
+++ b/gnulib-tests/test-open.c
@@ -0,0 +1,41 @@
+/* Test of opening a file descriptor.
+ Copyright (C) 2007-2016 Free Software Foundation, Inc.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+/* Written by Bruno Haible <bruno@clisp.org>, 2007. */
+
+#include <config.h>
+
+#include <fcntl.h>
+
+#include "signature.h"
+SIGNATURE_CHECK (open, int, (char const *, int, ...));
+
+#include <errno.h>
+#include <stdbool.h>
+#include <stdio.h>
+#include <unistd.h>
+
+#include "macros.h"
+
+#define BASE "test-open.t"
+
+#include "test-open.h"
+
+int
+main (void)
+{
+ return test_open (open, true);
+}
diff --git a/gnulib-tests/test-open.h b/gnulib-tests/test-open.h
new file mode 100644
index 0000000..faaff0f
--- /dev/null
+++ b/gnulib-tests/test-open.h
@@ -0,0 +1,104 @@
+/* Test of opening a file descriptor.
+ Copyright (C) 2007-2016 Free Software Foundation, Inc.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+/* Written by Bruno Haible <bruno@clisp.org>, 2007. */
+
+/* Make test_open always inline if we're using Fortify, which defines
+ __always_inline to do that. Do nothing otherwise. This works
+ around a glibc bug whereby 'open' cannot be used as a function
+ pointer when _FORTIFY_SOURCE is positive. */
+
+#if __GLIBC__ && defined __always_inline
+# define ALWAYS_INLINE __always_inline
+#else
+# define ALWAYS_INLINE
+#endif
+
+/* This file is designed to test both open(n,buf[,mode]) and
+ openat(AT_FDCWD,n,buf[,mode]). FUNC is the function to test.
+ Assumes that BASE and ASSERT are already defined, and that
+ appropriate headers are already included. If PRINT, warn before
+ skipping symlink tests with status 77. */
+
+static ALWAYS_INLINE int
+test_open (int (*func) (char const *, int, ...), bool print)
+{
+ int fd;
+ /* Remove anything from prior partial run. */
+ unlink (BASE "file");
+
+ /* Cannot create directory. */
+ errno = 0;
+ ASSERT (func ("nonexist.ent/", O_CREAT | O_RDONLY, 0600) == -1);
+ ASSERT (errno == ENOTDIR || errno == EISDIR || errno == ENOENT
+ || errno == EINVAL);
+
+ /* Create a regular file. */
+ fd = func (BASE "file", O_CREAT | O_RDONLY, 0600);
+ ASSERT (0 <= fd);
+ ASSERT (close (fd) == 0);
+
+ /* Trailing slash handling. */
+ errno = 0;
+ ASSERT (func (BASE "file/", O_RDONLY) == -1);
+ ASSERT (errno == ENOTDIR || errno == EISDIR || errno == EINVAL);
+
+ /* Directories cannot be opened for writing. */
+ errno = 0;
+ ASSERT (func (".", O_WRONLY) == -1);
+ ASSERT (errno == EISDIR || errno == EACCES);
+
+ /* /dev/null must exist, and be writable. */
+ fd = func ("/dev/null", O_RDONLY);
+ ASSERT (0 <= fd);
+ {
+ char c;
+ ASSERT (read (fd, &c, 1) == 0);
+ }
+ ASSERT (close (fd) == 0);
+ fd = func ("/dev/null", O_WRONLY);
+ ASSERT (0 <= fd);
+ ASSERT (write (fd, "c", 1) == 1);
+ ASSERT (close (fd) == 0);
+
+ /* Although O_NONBLOCK on regular files can be ignored, it must not
+ cause a failure. */
+ fd = func (BASE "file", O_NONBLOCK | O_RDONLY);
+ ASSERT (0 <= fd);
+ ASSERT (close (fd) == 0);
+
+ /* Symlink handling, where supported. */
+ if (symlink (BASE "file", BASE "link") != 0)
+ {
+ ASSERT (unlink (BASE "file") == 0);
+ if (print)
+ fputs ("skipping test: symlinks not supported on this file system\n",
+ stderr);
+ return 77;
+ }
+ errno = 0;
+ ASSERT (func (BASE "link/", O_RDONLY) == -1);
+ ASSERT (errno == ENOTDIR);
+ fd = func (BASE "link", O_RDONLY);
+ ASSERT (0 <= fd);
+ ASSERT (close (fd) == 0);
+
+ /* Cleanup. */
+ ASSERT (unlink (BASE "file") == 0);
+ ASSERT (unlink (BASE "link") == 0);
+
+ return 0;
+}
diff --git a/gnulib-tests/test-pathmax.c b/gnulib-tests/test-pathmax.c
new file mode 100644
index 0000000..ac4a393
--- /dev/null
+++ b/gnulib-tests/test-pathmax.c
@@ -0,0 +1,32 @@
+/* Test of "pathmax.h".
+ Copyright (C) 2011-2016 Free Software Foundation, Inc.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+/* Written by Bruno Haible <bruno@clisp.org>, 2011. */
+
+#include <config.h>
+
+#include "pathmax.h"
+
+/* Check that PATH_MAX is a constant if it is defined. */
+#ifdef PATH_MAX
+int a = PATH_MAX;
+#endif
+
+int
+main (void)
+{
+ return 0;
+}
diff --git a/gnulib-tests/test-quotearg-simple.c b/gnulib-tests/test-quotearg-simple.c
new file mode 100644
index 0000000..99b69f4
--- /dev/null
+++ b/gnulib-tests/test-quotearg-simple.c
@@ -0,0 +1,366 @@
+/* Test of quotearg family of functions.
+ Copyright (C) 2008-2016 Free Software Foundation, Inc.
+
+ This 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 <http://www.gnu.org/licenses/>. */
+
+/* Written by Eric Blake <ebb9@byu.net>, 2008. */
+
+#include <config.h>
+
+#include "quotearg.h"
+
+#include <ctype.h>
+#include <stdbool.h>
+#include <stdint.h>
+#include <stdlib.h>
+#include <string.h>
+
+#include "localcharset.h"
+#include "macros.h"
+#include "zerosize-ptr.h"
+
+#include "test-quotearg.h"
+
+static struct result_groups results_g[] = {
+ /* literal_quoting_style */
+ { { "", "\0""1\0", 3, "simple", " \t\n'\"\033?""?/\\", "a:b", "a\\b",
+ "a' b", LQ RQ, LQ RQ },
+ { "", "1", 1, "simple", " \t\n'\"\033?""?/\\", "a:b", "a\\b",
+ "a' b", LQ RQ, LQ RQ },
+ { "", "1", 1, "simple", " \t\n'\"\033?""?/\\", "a:b", "a\\b",
+ "a' b", LQ RQ, LQ RQ } },
+
+ /* shell_quoting_style */
+ { { "''", "\0""1\0", 3, "simple", "' \t\n'\\''\"\033?""?/\\'", "a:b",
+ "'a\\b'", "\"a' b\"", LQ RQ, LQ RQ },
+ { "''", "1", 1, "simple", "' \t\n'\\''\"\033?""?/\\'", "a:b",
+ "'a\\b'", "\"a' b\"", LQ RQ, LQ RQ },
+ { "''", "1", 1, "simple", "' \t\n'\\''\"\033?""?/\\'", "'a:b'",
+ "'a\\b'", "\"a' b\"", LQ RQ, LQ RQ } },
+
+ /* shell_always_quoting_style */
+ { { "''", "'\0""1\0'", 5, "'simple'", "' \t\n'\\''\"\033?""?/\\'", "'a:b'",
+ "'a\\b'", "\"a' b\"", "'" LQ RQ "'", "'" LQ RQ "'" },
+ { "''", "'1'", 3, "'simple'", "' \t\n'\\''\"\033?""?/\\'", "'a:b'",
+ "'a\\b'", "\"a' b\"", "'" LQ RQ "'", "'" LQ RQ "'" },
+ { "''", "'1'", 3, "'simple'", "' \t\n'\\''\"\033?""?/\\'", "'a:b'",
+ "'a\\b'", "\"a' b\"", "'" LQ RQ "'", "'" LQ RQ "'" } },
+
+ /* shell_escape_quoting_style */
+ { { "''", "''$'\\0''1'$'\\0'", 15, "simple",
+ "' '$'\\t\\n'\\''\"'$'\\033''?""?/\\'", "a:b",
+ "'a\\b'", "\"a' b\"", "''$'" LQ_ENC RQ_ENC "'", LQ RQ },
+ { "''", "''$'\\0''1'$'\\0'", 15, "simple",
+ "' '$'\\t\\n'\\''\"'$'\\033''?""?/\\'", "a:b",
+ "'a\\b'", "\"a' b\"", "''$'" LQ_ENC RQ_ENC "'", LQ RQ },
+ { "''", "''$'\\0''1'$'\\0'", 15, "simple",
+ "' '$'\\t\\n'\\''\"'$'\\033''?""?/\\'", "'a:b'",
+ "'a\\b'", "\"a' b\"", "''$'" LQ_ENC RQ_ENC "'", LQ RQ } },
+
+ /* shell_escape_always_quoting_style */
+ { { "''", "''$'\\0''1'$'\\0'", 15, "'simple'",
+ "' '$'\\t\\n'\\''\"'$'\\033''?""?/\\'", "'a:b'",
+ "'a\\b'", "\"a' b\"", "''$'" LQ_ENC RQ_ENC "'", "'" LQ RQ "'" },
+ { "''", "''$'\\0''1'$'\\0'", 15, "'simple'",
+ "' '$'\\t\\n'\\''\"'$'\\033''?""?/\\'", "'a:b'",
+ "'a\\b'", "\"a' b\"", "''$'" LQ_ENC RQ_ENC "'", "'" LQ RQ "'" },
+ { "''", "''$'\\0''1'$'\\0'", 15, "'simple'",
+ "' '$'\\t\\n'\\''\"'$'\\033''?""?/\\'", "'a:b'",
+ "'a\\b'", "\"a' b\"", "''$'" LQ_ENC RQ_ENC "'", "'" LQ RQ "'" } },
+
+ /* c_quoting_style */
+ { { "\"\"", "\"\\0001\\0\"", 9, "\"simple\"",
+ "\" \\t\\n'\\\"\\033?""?/\\\\\"", "\"a:b\"", "\"a\\\\b\"",
+ "\"a' b\"", "\"" LQ_ENC RQ_ENC "\"", "\"" LQ RQ "\"" },
+ { "\"\"", "\"\\0001\\0\"", 9, "\"simple\"",
+ "\" \\t\\n'\\\"\\033?""?/\\\\\"", "\"a:b\"", "\"a\\\\b\"",
+ "\"a' b\"", "\"" LQ_ENC RQ_ENC "\"", "\"" LQ RQ "\"" },
+ { "\"\"", "\"\\0001\\0\"", 9, "\"simple\"",
+ "\" \\t\\n'\\\"\\033?""?/\\\\\"", "\"a\\:b\"", "\"a\\\\b\"",
+ "\"a' b\"", "\"" LQ_ENC RQ_ENC "\"", "\"" LQ RQ "\"" } },
+
+ /* c_maybe_quoting_style */
+ { { "", "\"\\0001\\0\"", 9, "simple", "\" \\t\\n'\\\"\\033?""?/\\\\\"",
+ "a:b", "a\\b", "a' b", "\"" LQ_ENC RQ_ENC "\"", LQ RQ },
+ { "", "\"\\0001\\0\"", 9, "simple", "\" \\t\\n'\\\"\\033?""?/\\\\\"",
+ "a:b", "a\\b", "a' b", "\"" LQ_ENC RQ_ENC "\"", LQ RQ },
+ { "", "\"\\0001\\0\"", 9, "simple", "\" \\t\\n'\\\"\\033?""?/\\\\\"",
+ "\"a:b\"", "a\\b", "a' b", "\"" LQ_ENC RQ_ENC "\"", LQ RQ } },
+
+ /* escape_quoting_style */
+ { { "", "\\0001\\0", 7, "simple", " \\t\\n'\"\\033?""?/\\\\", "a:b",
+ "a\\\\b", "a' b", LQ_ENC RQ_ENC, LQ RQ },
+ { "", "\\0001\\0", 7, "simple", " \\t\\n'\"\\033?""?/\\\\", "a:b",
+ "a\\\\b", "a' b", LQ_ENC RQ_ENC, LQ RQ },
+ { "", "\\0001\\0", 7, "simple", " \\t\\n'\"\\033?""?/\\\\", "a\\:b",
+ "a\\\\b", "a' b", LQ_ENC RQ_ENC, LQ RQ } },
+
+ /* locale_quoting_style */
+ { { "''", "'\\0001\\0'", 9, "'simple'", "' \\t\\n\\'\"\\033?""?/\\\\'",
+ "'a:b'", "'a\\\\b'", "'a\\' b'", "'" LQ_ENC RQ_ENC "'", "'" LQ RQ "'" },
+ { "''", "'\\0001\\0'", 9, "'simple'", "' \\t\\n\\'\"\\033?""?/\\\\'",
+ "'a:b'", "'a\\\\b'", "'a\\' b'", "'" LQ_ENC RQ_ENC "'", "'" LQ RQ "'" },
+ { "''", "'\\0001\\0'", 9, "'simple'", "' \\t\\n\\'\"\\033?""?/\\\\'",
+ "'a\\:b'", "'a\\\\b'", "'a\\' b'",
+ "'" LQ_ENC RQ_ENC "'", "'" LQ RQ "'" } },
+
+ /* clocale_quoting_style */
+ { { "\"\"", "\"\\0001\\0\"", 9, "\"simple\"",
+ "\" \\t\\n'\\\"\\033?""?/\\\\\"", "\"a:b\"", "\"a\\\\b\"",
+ "\"a' b\"", "\"" LQ_ENC RQ_ENC "\"", "\"" LQ RQ "\"" },
+ { "\"\"", "\"\\0001\\0\"", 9, "\"simple\"",
+ "\" \\t\\n'\\\"\\033?""?/\\\\\"", "\"a:b\"", "\"a\\\\b\"",
+ "\"a' b\"", "\"" LQ_ENC RQ_ENC "\"", "\"" LQ RQ "\"" },
+ { "\"\"", "\"\\0001\\0\"", 9, "\"simple\"",
+ "\" \\t\\n'\\\"\\033?""?/\\\\\"", "\"a\\:b\"", "\"a\\\\b\"",
+ "\"a' b\"", "\"" LQ_ENC RQ_ENC "\"", "\"" LQ RQ "\"" } }
+};
+
+static struct result_groups flag_results[] = {
+ /* literal_quoting_style and QA_ELIDE_NULL_BYTES */
+ { { "", "1", 1, "simple", " \t\n'\"\033?""?/\\", "a:b", "a\\b", "a' b",
+ LQ RQ, LQ RQ },
+ { "", "1", 1, "simple", " \t\n'\"\033?""?/\\", "a:b", "a\\b", "a' b",
+ LQ RQ, LQ RQ },
+ { "", "1", 1, "simple", " \t\n'\"\033?""?/\\", "a:b", "a\\b", "a' b",
+ LQ RQ, LQ RQ } },
+
+ /* c_quoting_style and QA_ELIDE_OUTER_QUOTES */
+ { { "", "\"\\0001\\0\"", 9, "simple", "\" \\t\\n'\\\"\\033?""?/\\\\\"",
+ "a:b", "a\\b", "a' b", "\"" LQ_ENC RQ_ENC "\"", LQ RQ },
+ { "", "\"\\0001\\0\"", 9, "simple", "\" \\t\\n'\\\"\\033?""?/\\\\\"",
+ "a:b", "a\\b", "a' b", "\"" LQ_ENC RQ_ENC "\"", LQ RQ },
+ { "", "\"\\0001\\0\"", 9, "simple", "\" \\t\\n'\\\"\\033?""?/\\\\\"",
+ "\"a:b\"", "a\\b", "a' b", "\"" LQ_ENC RQ_ENC "\"", LQ RQ } },
+
+ /* c_quoting_style and QA_SPLIT_TRIGRAPHS */
+ { { "\"\"", "\"\\0001\\0\"", 9, "\"simple\"",
+ "\" \\t\\n'\\\"\\033?\"\"?/\\\\\"", "\"a:b\"", "\"a\\\\b\"",
+ "\"a' b\"", "\"" LQ_ENC RQ_ENC "\"", "\"" LQ RQ "\"" },
+ { "\"\"", "\"\\0001\\0\"", 9, "\"simple\"",
+ "\" \\t\\n'\\\"\\033?\"\"?/\\\\\"", "\"a:b\"", "\"a\\\\b\"",
+ "\"a' b\"", "\"" LQ_ENC RQ_ENC "\"", "\"" LQ RQ "\"" },
+ { "\"\"", "\"\\0001\\0\"", 9, "\"simple\"",
+ "\" \\t\\n'\\\"\\033?\"\"?/\\\\\"", "\"a\\:b\"", "\"a\\\\b\"",
+ "\"a' b\"", "\"" LQ_ENC RQ_ENC "\"", "\"" LQ RQ "\"" } }
+};
+
+static char const *custom_quotes[][2] = {
+ { "", "" },
+ { "'", "'" },
+ { "(", ")" },
+ { ":", " " },
+ { " ", ":" },
+ { "# ", "\n" },
+ { "\"'", "'\"" }
+};
+
+static struct result_groups custom_results[] = {
+ /* left_quote = right_quote = "" */
+ { { "", "\\0001\\0", 7, "simple",
+ " \\t\\n'\"\\033?""?/\\\\", "a:b", "a\\\\b",
+ "a' b", LQ_ENC RQ_ENC, LQ RQ },
+ { "", "\\0001\\0", 7, "simple",
+ " \\t\\n'\"\\033?""?/\\\\", "a:b", "a\\\\b",
+ "a' b", LQ_ENC RQ_ENC, LQ RQ },
+ { "", "\\0001\\0", 7, "simple",
+ " \\t\\n'\"\\033?""?/\\\\", "a\\:b", "a\\\\b",
+ "a' b", LQ_ENC RQ_ENC, LQ RQ } },
+
+ /* left_quote = right_quote = "'" */
+ { { "''", "'\\0001\\0'", 9, "'simple'",
+ "' \\t\\n\\'\"\\033?""?/\\\\'", "'a:b'", "'a\\\\b'",
+ "'a\\' b'", "'" LQ_ENC RQ_ENC "'", "'" LQ RQ "'" },
+ { "''", "'\\0001\\0'", 9, "'simple'",
+ "' \\t\\n\\'\"\\033?""?/\\\\'", "'a:b'", "'a\\\\b'",
+ "'a\\' b'", "'" LQ_ENC RQ_ENC "'", "'" LQ RQ "'" },
+ { "''", "'\\0001\\0'", 9, "'simple'",
+ "' \\t\\n\\'\"\\033?""?/\\\\'", "'a\\:b'", "'a\\\\b'",
+ "'a\\' b'", "'" LQ_ENC RQ_ENC "'", "'" LQ RQ "'" } },
+
+ /* left_quote = "(" and right_quote = ")" */
+ { { "()", "(\\0001\\0)", 9, "(simple)",
+ "( \\t\\n'\"\\033?""?/\\\\)", "(a:b)", "(a\\\\b)",
+ "(a' b)", "(" LQ_ENC RQ_ENC ")", "(" LQ RQ ")" },
+ { "()", "(\\0001\\0)", 9, "(simple)",
+ "( \\t\\n'\"\\033?""?/\\\\)", "(a:b)", "(a\\\\b)",
+ "(a' b)", "(" LQ_ENC RQ_ENC ")", "(" LQ RQ ")" },
+ { "()", "(\\0001\\0)", 9, "(simple)",
+ "( \\t\\n'\"\\033?""?/\\\\)", "(a\\:b)", "(a\\\\b)",
+ "(a' b)", "(" LQ_ENC RQ_ENC ")", "(" LQ RQ ")" } },
+
+ /* left_quote = ":" and right_quote = " " */
+ { { ": ", ":\\0001\\0 ", 9, ":simple ",
+ ":\\ \\t\\n'\"\\033?""?/\\\\ ", ":a:b ", ":a\\\\b ",
+ ":a'\\ b ", ":" LQ_ENC RQ_ENC " ", ":" LQ RQ " " },
+ { ": ", ":\\0001\\0 ", 9, ":simple ",
+ ":\\ \\t\\n'\"\\033?""?/\\\\ ", ":a:b ", ":a\\\\b ",
+ ":a'\\ b ", ":" LQ_ENC RQ_ENC " ", ":" LQ RQ " " },
+ { ": ", ":\\0001\\0 ", 9, ":simple ",
+ ":\\ \\t\\n'\"\\033?""?/\\\\ ", ":a\\:b ", ":a\\\\b ",
+ ":a'\\ b ", ":" LQ_ENC RQ_ENC " ", ":" LQ RQ " " } },
+
+ /* left_quote = " " and right_quote = ":" */
+ { { " :", " \\0001\\0:", 9, " simple:",
+ " \\t\\n'\"\\033?""?/\\\\:", " a\\:b:", " a\\\\b:",
+ " a' b:", " " LQ_ENC RQ_ENC ":", " " LQ RQ ":" },
+ { " :", " \\0001\\0:", 9, " simple:",
+ " \\t\\n'\"\\033?""?/\\\\:", " a\\:b:", " a\\\\b:",
+ " a' b:", " " LQ_ENC RQ_ENC ":", " " LQ RQ ":" },
+ { " :", " \\0001\\0:", 9, " simple:",
+ " \\t\\n'\"\\033?""?/\\\\:", " a\\:b:", " a\\\\b:",
+ " a' b:", " " LQ_ENC RQ_ENC ":", " " LQ RQ ":" } },
+
+ /* left_quote = "# " and right_quote = "\n" */
+ { { "# \n", "# \\0001\\0\n", 10, "# simple\n",
+ "# \\t\\n'\"\\033?""?/\\\\\n", "# a:b\n", "# a\\\\b\n",
+ "# a' b\n", "# " LQ_ENC RQ_ENC "\n", "# " LQ RQ "\n" },
+ { "# \n", "# \\0001\\0\n", 10, "# simple\n",
+ "# \\t\\n'\"\\033?""?/\\\\\n", "# a:b\n", "# a\\\\b\n",
+ "# a' b\n", "# " LQ_ENC RQ_ENC "\n", "# " LQ RQ "\n" },
+ { "# \n", "# \\0001\\0\n", 10, "# simple\n",
+ "# \\t\\n'\"\\033?""?/\\\\\n", "# a\\:b\n", "# a\\\\b\n",
+ "# a' b\n", "# " LQ_ENC RQ_ENC "\n", "# " LQ RQ "\n" } },
+
+ /* left_quote = "\"'" and right_quote = "'\"" */
+ { { "\"''\"", "\"'\\0001\\0'\"", 11, "\"'simple'\"",
+ "\"' \\t\\n\\'\"\\033?""?/\\\\'\"", "\"'a:b'\"", "\"'a\\\\b'\"",
+ "\"'a' b'\"", "\"'" LQ_ENC RQ_ENC "'\"", "\"'" LQ RQ "'\"" },
+ { "\"''\"", "\"'\\0001\\0'\"", 11, "\"'simple'\"",
+ "\"' \\t\\n\\'\"\\033?""?/\\\\'\"", "\"'a:b'\"", "\"'a\\\\b'\"",
+ "\"'a' b'\"", "\"'" LQ_ENC RQ_ENC "'\"", "\"'" LQ RQ "'\"" },
+ { "\"''\"", "\"'\\0001\\0'\"", 11, "\"'simple'\"",
+ "\"' \\t\\n\\'\"\\033?""?/\\\\'\"", "\"'a\\:b'\"", "\"'a\\\\b'\"",
+ "\"'a' b'\"", "\"'" LQ_ENC RQ_ENC "'\"", "\"'" LQ RQ "'\"" } }
+};
+
+static char *
+use_quote_double_quotes (const char *str, size_t *len)
+{
+ char *p = *len == SIZE_MAX ? quotearg_char (str, '"')
+ : quotearg_char_mem (str, *len, '"');
+ *len = strlen (p);
+ return p;
+}
+
+int
+main (int argc _GL_UNUSED, char *argv[])
+{
+ int i;
+ bool ascii_only = MB_CUR_MAX == 1 && !isprint ((unsigned char) LQ[0]);
+
+ /* This part of the program is hard-wired to the C locale since it
+ does not call setlocale. However, according to POSIX, the use of
+ 8-bit bytes in a character context in the C locale gives
+ unspecified results (that is, the C locale charset is allowed to
+ be unibyte with 8-bit bytes rejected [ASCII], unibyte with 8-bit
+ bytes being characters [often ISO-8859-1], or multibyte [often
+ UTF-8]). We assume that the latter two cases will be
+ indistinguishable in this test - that is, the LQ and RQ sequences
+ will pass through unchanged in either type of charset. So when
+ testing for quoting of str7, use the ascii_only flag to decide
+ what to expect for the 8-bit data being quoted. */
+ ASSERT (!isprint ('\033'));
+ for (i = literal_quoting_style; i <= clocale_quoting_style; i++)
+ {
+ set_quoting_style (NULL, (enum quoting_style) i);
+ if (!(i == locale_quoting_style || i == clocale_quoting_style)
+ || (strcmp (locale_charset (), "ASCII") == 0
+ || strcmp (locale_charset (), "ANSI_X3.4-1968") == 0))
+ {
+ compare_strings (use_quotearg_buffer, &results_g[i].group1,
+ ascii_only);
+ compare_strings (use_quotearg, &results_g[i].group2,
+ ascii_only);
+ if (i == c_quoting_style)
+ compare_strings (use_quote_double_quotes, &results_g[i].group2,
+ ascii_only);
+ compare_strings (use_quotearg_colon, &results_g[i].group3,
+ ascii_only);
+ }
+ }
+
+ set_quoting_style (NULL, literal_quoting_style);
+ ASSERT (set_quoting_flags (NULL, QA_ELIDE_NULL_BYTES) == 0);
+ compare_strings (use_quotearg_buffer, &flag_results[0].group1, ascii_only);
+ compare_strings (use_quotearg, &flag_results[0].group2, ascii_only);
+ compare_strings (use_quotearg_colon, &flag_results[0].group3, ascii_only);
+
+ set_quoting_style (NULL, c_quoting_style);
+ ASSERT (set_quoting_flags (NULL, QA_ELIDE_OUTER_QUOTES)
+ == QA_ELIDE_NULL_BYTES);
+ compare_strings (use_quotearg_buffer, &flag_results[1].group1, ascii_only);
+ compare_strings (use_quotearg, &flag_results[1].group2, ascii_only);
+ compare_strings (use_quote_double_quotes, &flag_results[1].group2,
+ ascii_only);
+ compare_strings (use_quotearg_colon, &flag_results[1].group3, ascii_only);
+
+ ASSERT (set_quoting_flags (NULL, QA_SPLIT_TRIGRAPHS)
+ == QA_ELIDE_OUTER_QUOTES);
+ compare_strings (use_quotearg_buffer, &flag_results[2].group1, ascii_only);
+ compare_strings (use_quotearg, &flag_results[2].group2, ascii_only);
+ compare_strings (use_quote_double_quotes, &flag_results[2].group2,
+ ascii_only);
+ compare_strings (use_quotearg_colon, &flag_results[2].group3, ascii_only);
+
+ ASSERT (set_quoting_flags (NULL, 0) == QA_SPLIT_TRIGRAPHS);
+
+ for (i = 0; i < sizeof custom_quotes / sizeof *custom_quotes; ++i)
+ {
+ set_custom_quoting (NULL,
+ custom_quotes[i][0], custom_quotes[i][1]);
+ compare_strings (use_quotearg_buffer, &custom_results[i].group1,
+ ascii_only);
+ compare_strings (use_quotearg, &custom_results[i].group2, ascii_only);
+ compare_strings (use_quotearg_colon, &custom_results[i].group3,
+ ascii_only);
+ }
+
+ {
+ /* Trigger the bug whereby quotearg_buffer would read beyond the NUL
+ that defines the end of the string being quoted. Use an input
+ string whose NUL is the last byte before an unreadable page. */
+ char *z = zerosize_ptr ();
+
+ if (z)
+ {
+ size_t q_len = 1024;
+ char *q = malloc (q_len + 1);
+ char buf[10];
+ memset (q, 'Q', q_len);
+ q[q_len] = 0;
+
+ /* Z points to the boundary between a readable/writable page
+ and one that is neither readable nor writable. Position
+ our string so its NUL is at the end of the writable one. */
+ char const *str = "____";
+ size_t s_len = strlen (str);
+ z -= s_len + 1;
+ memcpy (z, str, s_len + 1);
+
+ set_custom_quoting (NULL, q, q);
+ /* Whether this actually triggers a SEGV depends on the
+ implementation of memcmp: whether it compares only byte-at-
+ a-time, and from left to right (no SEGV) or some other way. */
+ size_t n = quotearg_buffer (buf, sizeof buf, z, SIZE_MAX, NULL);
+ ASSERT (n == s_len + 2 * q_len);
+ ASSERT (memcmp (buf, q, sizeof buf) == 0);
+ free (q);
+ }
+ }
+
+ quotearg_free ();
+
+ return 0;
+}
diff --git a/gnulib-tests/test-quotearg.h b/gnulib-tests/test-quotearg.h
new file mode 100644
index 0000000..6e8510e
--- /dev/null
+++ b/gnulib-tests/test-quotearg.h
@@ -0,0 +1,128 @@
+/* Test of quotearg family of functions.
+ Copyright (C) 2008-2016 Free Software Foundation, Inc.
+
+ This 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 <http://www.gnu.org/licenses/>. */
+
+/* Written by Eric Blake <ebb9@byu.net>, 2008. */
+
+struct result_strings {
+ char const *str1; /* Translation of "". */
+ char const *str2; /* Translation of "\0""1\0". */
+ size_t len2; /* Length of str2. */
+ char const *str3; /* Translation of "simple". */
+ char const *str4; /* Translation of " \t\n'\"\033?""?/\\". */
+ char const *str5; /* Translation of "a:b". */
+ char const *str6; /* Translation of "a\\b". */
+ char const *str7; /* Translation of "a' b". */
+ char const *str8a; /* Translation of LQ RQ, in ASCII charset. */
+ char const *str8b; /* Translation of LQ RQ, in Latin1 or UTF-8 charset. */
+};
+
+struct result_groups {
+ struct result_strings group1; /* Via quotearg_buffer. */
+ struct result_strings group2; /* Via quotearg{,_mem}. */
+ struct result_strings group3; /* Via quotearg_colon{,_mem}. */
+};
+
+/* These quotes are borrowed from a pt_PT.utf8 translation. */
+# define LQ "\302\253"
+# define RQ "\302\273"
+# define LQ_ENC "\\302\\253"
+# define RQ_ENC "\\302\\273"
+# define RQ_ESC "\\\302\273"
+
+static struct result_strings inputs = {
+ "", "\0001\0", 3, "simple", " \t\n'\"\033?""?/\\", "a:b", "a\\b",
+ "a' b", LQ RQ, NULL
+};
+
+static void
+compare (char const *a, size_t la, char const *b, size_t lb)
+{
+ ASSERT (la == lb);
+ ASSERT (memcmp (a, b, la) == 0);
+ ASSERT (b[lb] == '\0');
+}
+
+static void
+compare_strings (char *(func) (char const *, size_t *),
+ struct result_strings *results, bool ascii_only)
+{
+ size_t len;
+ char *p;
+
+ len = 0;
+ p = func (inputs.str1, &len);
+ compare (results->str1, strlen (results->str1), p, len);
+
+ len = inputs.len2;
+ p = func (inputs.str2, &len);
+ compare (results->str2, results->len2, p, len);
+
+ len = SIZE_MAX;
+ p = func (inputs.str3, &len);
+ compare (results->str3, strlen (results->str3), p, len);
+
+ len = strlen (inputs.str4);
+ p = func (inputs.str4, &len);
+ compare (results->str4, strlen (results->str4), p, len);
+
+ len = SIZE_MAX;
+ p = func (inputs.str5, &len);
+ compare (results->str5, strlen (results->str5), p, len);
+
+ len = strlen (inputs.str6);
+ p = func (inputs.str6, &len);
+ compare (results->str6, strlen (results->str6), p, len);
+
+ len = strlen (inputs.str7);
+ p = func (inputs.str7, &len);
+ compare (results->str7, strlen (results->str7), p, len);
+
+ len = strlen (inputs.str8a);
+ p = func (inputs.str8a, &len);
+ if (ascii_only)
+ compare (results->str8a, strlen (results->str8a), p, len);
+ else
+ compare (results->str8b, strlen (results->str8b), p, len);
+}
+
+static char *
+use_quotearg_buffer (const char *str, size_t *len)
+{
+ static char buf[100];
+ size_t size;
+ memset (buf, 0xa5, 100);
+ size = quotearg_buffer (buf, 100, str, *len, NULL);
+ *len = size;
+ ASSERT ((unsigned char) buf[size + 1] == 0xa5);
+ return buf;
+}
+
+static char *
+use_quotearg (const char *str, size_t *len)
+{
+ char *p = *len == SIZE_MAX ? quotearg (str) : quotearg_mem (str, *len);
+ *len = strlen (p);
+ return p;
+}
+
+static char *
+use_quotearg_colon (const char *str, size_t *len)
+{
+ char *p = (*len == SIZE_MAX ? quotearg_colon (str)
+ : quotearg_colon_mem (str, *len));
+ *len = strlen (p);
+ return p;
+}
diff --git a/gnulib-tests/test-read-file.c b/gnulib-tests/test-read-file.c
new file mode 100644
index 0000000..ab13f14
--- /dev/null
+++ b/gnulib-tests/test-read-file.c
@@ -0,0 +1,111 @@
+/*
+ * Copyright (C) 2006-2007, 2010-2016 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 <http://www.gnu.org/licenses/>. */
+
+#include <config.h>
+
+#include "read-file.h"
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <sys/stat.h>
+
+#define FILE1 "/etc/resolv.conf"
+#define FILE2 "/dev/null"
+
+int
+main (void)
+{
+ struct stat statbuf;
+ int err = 0;
+
+ /* We can perform the test only if the file exists and is readable.
+ Test whether it exists, then assume it is world-readable. */
+ if (stat (FILE1, &statbuf) >= 0)
+ {
+ size_t len;
+ char *out = read_file (FILE1, &len);
+
+ if (!out)
+ {
+ perror ("Could not read file");
+ err = 1;
+ }
+ else
+ {
+ if (out[len] != '\0')
+ {
+ perror ("BAD: out[len] not zero");
+ err = 1;
+ }
+
+ if (S_ISREG (statbuf.st_mode))
+ {
+ /* FILE1 is a regular file or a symlink to a regular file. */
+ if (len != statbuf.st_size)
+ {
+ fprintf (stderr, "Read %lu from %s...\n",
+ (unsigned long) len, FILE1);
+ err = 1;
+ }
+ }
+ else
+ {
+ /* Assume FILE1 is not empty. */
+ if (len == 0)
+ {
+ fprintf (stderr, "Read nothing from %s\n", FILE1);
+ err = 1;
+ }
+ }
+ free (out);
+ }
+ }
+
+ /* We can perform the test only if the file exists and is readable.
+ Test whether it exists, then assume it is world-readable. */
+ if (stat (FILE2, &statbuf) >= 0)
+ {
+ size_t len;
+ char *out = read_file (FILE2, &len);
+
+ if (!out)
+ {
+ perror ("Could not read file");
+ err = 1;
+ }
+ else
+ {
+ if (out[len] != '\0')
+ {
+ perror ("BAD: out[len] not zero");
+ err = 1;
+ }
+
+ /* /dev/null should always be empty. Ignore statbuf.st_size, since it
+ is not a regular file. */
+ if (len != 0)
+ {
+ fprintf (stderr, "Read %lu from %s...\n",
+ (unsigned long) len, FILE2);
+ err = 1;
+ }
+ free (out);
+ }
+ }
+
+ return err;
+}
diff --git a/gnulib-tests/test-readlink.c b/gnulib-tests/test-readlink.c
new file mode 100644
index 0000000..fdff6e1
--- /dev/null
+++ b/gnulib-tests/test-readlink.c
@@ -0,0 +1,48 @@
+/* Tests of readlink.
+ Copyright (C) 2009-2016 Free Software Foundation, Inc.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+/* Written by Eric Blake <ebb9@byu.net>, 2009. */
+
+#include <config.h>
+
+#include <unistd.h>
+
+#include "signature.h"
+SIGNATURE_CHECK (readlink, ssize_t, (char const *, char *, size_t));
+
+#include <fcntl.h>
+#include <errno.h>
+#include <stdbool.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <sys/stat.h>
+
+#include "ignore-value.h"
+#include "macros.h"
+
+#define BASE "test-readlink.t"
+
+#include "test-readlink.h"
+
+int
+main (void)
+{
+ /* Remove any leftovers from a previous partial run. */
+ ignore_value (system ("rm -rf " BASE "*"));
+
+ return test_readlink (readlink, true);
+}
diff --git a/gnulib-tests/test-readlink.h b/gnulib-tests/test-readlink.h
new file mode 100644
index 0000000..cba98f6
--- /dev/null
+++ b/gnulib-tests/test-readlink.h
@@ -0,0 +1,119 @@
+/* Tests of readlink.
+ Copyright (C) 2009-2016 Free Software Foundation, Inc.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+/* Written by Eric Blake <ebb9@byu.net>, 2009. */
+
+/* This file is designed to test both readlink(a,b,c) and
+ readlinkat(AT_FDCWD,a,b,c). FUNC is the function to test. Assumes
+ that BASE and ASSERT are already defined, and that appropriate
+ headers are already included. If PRINT, warn before skipping
+ symlink tests with status 77. */
+
+static int
+test_readlink (ssize_t (*func) (char const *, char *, size_t), bool print)
+{
+ char buf[80];
+
+ /* Sanity checks of failures. Mingw lacks symlink, but readlink can
+ still distinguish between various errors. */
+ memset (buf, 0xff, sizeof buf);
+ errno = 0;
+ ASSERT (func ("no_such", buf, sizeof buf) == -1);
+ ASSERT (errno == ENOENT);
+ errno = 0;
+ ASSERT (func ("no_such/", buf, sizeof buf) == -1);
+ ASSERT (errno == ENOENT);
+ errno = 0;
+ ASSERT (func ("", buf, sizeof buf) == -1);
+ ASSERT (errno == ENOENT || errno == EINVAL);
+ errno = 0;
+ ASSERT (func (".", buf, sizeof buf) == -1);
+ ASSERT (errno == EINVAL);
+ errno = 0;
+ ASSERT (func ("./", buf, sizeof buf) == -1);
+ ASSERT (errno == EINVAL);
+ ASSERT (close (creat (BASE "file", 0600)) == 0);
+ errno = 0;
+ ASSERT (func (BASE "file", buf, sizeof buf) == -1);
+ ASSERT (errno == EINVAL);
+ errno = 0;
+ ASSERT (func (BASE "file/", buf, sizeof buf) == -1);
+ ASSERT (errno == ENOTDIR || errno == EINVAL); /* AIX yields EINVAL */
+
+ /* Now test actual symlinks. */
+ if (symlink (BASE "dir", BASE "link"))
+ {
+ ASSERT (unlink (BASE "file") == 0);
+ if (print)
+ fputs ("skipping test: symlinks not supported on this file system\n",
+ stderr);
+ return 77;
+ }
+ ASSERT (mkdir (BASE "dir", 0700) == 0);
+ errno = 0;
+ ASSERT (func (BASE "link/", buf, sizeof buf) == -1);
+ ASSERT (errno == EINVAL);
+ ASSERT (symlink (BASE "link", BASE "link2") == 0);
+ errno = 0;
+ ASSERT (func (BASE "link2/", buf, sizeof buf) == -1);
+ ASSERT (errno == EINVAL);
+ ASSERT (unlink (BASE "link2") == 0);
+ ASSERT (symlink (BASE "file", BASE "link2") == 0);
+ errno = 0;
+ ASSERT (func (BASE "link2/", buf, sizeof buf) == -1);
+ ASSERT (errno == ENOTDIR || errno == EINVAL); /* AIX yields EINVAL */
+ ASSERT (unlink (BASE "file") == 0);
+ ASSERT (unlink (BASE "link2") == 0);
+ {
+ /* Up till now, no readlink has been successful, so buf should be
+ unchanged. */
+ int i;
+ for (i = 0; i < sizeof buf; i++)
+ ASSERT (buf[i] == (char) 0xff);
+ }
+ {
+ size_t len = strlen (BASE "dir");
+ /* When passing too small of a buffer, expect the truncated
+ length, or an ERANGE failure. However, a size of 0 is not
+ portable enough to test. */
+ ssize_t result;
+ errno = 0;
+ result = readlink (BASE "link", buf, 1);
+ if (result == -1)
+ {
+ ASSERT (errno == ERANGE);
+ ASSERT (buf[0] == (char) 0xff);
+ }
+ else
+ {
+ ASSERT (result == 1);
+ ASSERT (buf[0] == BASE[0]);
+ }
+ ASSERT (buf[1] == (char) 0xff);
+ ASSERT (func (BASE "link", buf, len) == len);
+ ASSERT (strncmp (buf, BASE "dir", len) == 0);
+ ASSERT (buf[len] == (char) 0xff);
+ ASSERT (func (BASE "link", buf, sizeof buf) == len);
+ ASSERT (strncmp (buf, BASE "dir", len) == 0);
+ /* POSIX says rest of buf is unspecified; but in practice, it is
+ either left alone, or NUL-terminated. */
+ ASSERT (buf[len] == '\0' || buf[len] == (char) 0xff);
+ }
+ ASSERT (rmdir (BASE "dir") == 0);
+ ASSERT (unlink (BASE "link") == 0);
+
+ return 0;
+}
diff --git a/gnulib-tests/test-regex.c b/gnulib-tests/test-regex.c
new file mode 100644
index 0000000..c0d9824
--- /dev/null
+++ b/gnulib-tests/test-regex.c
@@ -0,0 +1,253 @@
+/* Test regular expressions
+ Copyright 1996-2001, 2003-2016 Free Software Foundation, Inc.
+
+ This 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 "regex.h"
+
+#include <locale.h>
+#include <limits.h>
+#include <stdlib.h>
+#include <string.h>
+#if HAVE_DECL_ALARM
+# include <unistd.h>
+# include <signal.h>
+#endif
+
+#include "localcharset.h"
+
+int
+main (void)
+{
+ int result = 0;
+ static struct re_pattern_buffer regex;
+ unsigned char folded_chars[UCHAR_MAX + 1];
+ int i;
+ const char *s;
+ struct re_registers regs;
+
+#if HAVE_DECL_ALARM
+ /* Some builds of glibc go into an infinite loop on this test. */
+ int alarm_value = 2;
+ signal (SIGALRM, SIG_DFL);
+ alarm (alarm_value);
+#endif
+ if (setlocale (LC_ALL, "en_US.UTF-8"))
+ {
+ {
+ /* http://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
+ test here. */
+ static char const pat[] = "insert into";
+ static char const data[] =
+ "\xFF\0\x12\xA2\xAA\xC4\xB1,K\x12\xC4\xB1*\xACK";
+ re_set_syntax (RE_SYNTAX_GREP | RE_HAT_LISTS_NOT_NEWLINE
+ | RE_ICASE);
+ memset (&regex, 0, sizeof regex);
+ s = re_compile_pattern (pat, sizeof pat - 1, &regex);
+ if (s)
+ result |= 1;
+ else
+ {
+ memset (&regs, 0, sizeof regs);
+ if (re_search (&regex, data, sizeof data - 1,
+ 0, sizeof data - 1, &regs)
+ != -1)
+ result |= 1;
+ regfree (&regex);
+ free (regs.start);
+ free (regs.end);
+ }
+ }
+
+ /* Check whether it's really a UTF-8 locale.
+ On mingw, the setlocale call succeeds but returns
+ "English_United States.1252", with locale_charset() returning
+ "CP1252". */
+ if (strcmp (locale_charset (), "UTF-8") == 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>.
+ */
+ static char const pat[] = "[^x]x";
+ static char const data[] =
+ /* <U1000><U103B><U103D><U1014><U103A><U102F><U1015><U103A> */
+ "\xe1\x80\x80"
+ "\xe1\x80\xbb"
+ "\xe1\x80\xbd"
+ "\xe1\x80\x94"
+ "\xe1\x80\xba"
+ "\xe1\x80\xaf"
+ "\xe1\x80\x95"
+ "\xe1\x80\xba"
+ "x";
+ re_set_syntax (0);
+ memset (&regex, 0, sizeof regex);
+ s = re_compile_pattern (pat, sizeof pat - 1, &regex);
+ if (s)
+ result |= 1;
+ else
+ {
+ memset (&regs, 0, sizeof regs);
+ i = re_search (&regex, data, sizeof data - 1,
+ 0, sizeof data - 1, 0);
+ if (i != 0 && i != 21)
+ result |= 1;
+ regfree (&regex);
+ free (regs.start);
+ free (regs.end);
+ }
+ }
+
+ if (! setlocale (LC_ALL, "C"))
+ return 1;
+ }
+
+ /* This test is from glibc bug 3957, reported by Andrew Mackey. */
+ re_set_syntax (RE_SYNTAX_EGREP | RE_HAT_LISTS_NOT_NEWLINE);
+ memset (&regex, 0, sizeof regex);
+ s = re_compile_pattern ("a[^x]b", 6, &regex);
+ if (s)
+ result |= 2;
+ /* This should fail, but succeeds for glibc-2.5. */
+ else
+ {
+ memset (&regs, 0, sizeof regs);
+ if (re_search (&regex, "a\nb", 3, 0, 3, &regs) != -1)
+ result |= 2;
+ regfree (&regex);
+ free (regs.start);
+ free (regs.end);
+ }
+
+ /* This regular expression is from Spencer ere test number 75
+ in grep-2.3. */
+ re_set_syntax (RE_SYNTAX_POSIX_EGREP);
+ memset (&regex, 0, sizeof regex);
+ for (i = 0; i <= UCHAR_MAX; i++)
+ folded_chars[i] = i;
+ regex.translate = folded_chars;
+ s = re_compile_pattern ("a[[:@:>@:]]b\n", 11, &regex);
+ /* This should fail with _Invalid character class name_ error. */
+ if (!s)
+ {
+ result |= 4;
+ regfree (&regex);
+ }
+
+ /* Ensure that [b-a] is diagnosed as invalid, when
+ using RE_NO_EMPTY_RANGES. */
+ re_set_syntax (RE_SYNTAX_POSIX_EGREP | RE_NO_EMPTY_RANGES);
+ memset (&regex, 0, sizeof regex);
+ s = re_compile_pattern ("a[b-a]", 6, &regex);
+ if (s == 0)
+ {
+ result |= 8;
+ regfree (&regex);
+ }
+
+ /* This should succeed, but does not for glibc-2.1.3. */
+ memset (&regex, 0, sizeof regex);
+ s = re_compile_pattern ("{1", 2, &regex);
+ if (s)
+ result |= 8;
+ else
+ regfree (&regex);
+
+ /* The following example is derived from a problem report
+ against gawk from Jorge Stolfi <stolfi@ic.unicamp.br>. */
+ memset (&regex, 0, sizeof regex);
+ s = re_compile_pattern ("[an\371]*n", 7, &regex);
+ if (s)
+ result |= 8;
+ /* This should match, but does not for glibc-2.2.1. */
+ else
+ {
+ memset (&regs, 0, sizeof regs);
+ if (re_match (&regex, "an", 2, 0, &regs) != 2)
+ result |= 8;
+ regfree (&regex);
+ free (regs.start);
+ free (regs.end);
+ }
+
+ memset (&regex, 0, sizeof regex);
+ s = re_compile_pattern ("x", 1, &regex);
+ if (s)
+ result |= 8;
+ /* glibc-2.2.93 does not work with a negative RANGE argument. */
+ else
+ {
+ memset (&regs, 0, sizeof regs);
+ if (re_search (&regex, "wxy", 3, 2, -2, &regs) != 1)
+ result |= 8;
+ regfree (&regex);
+ free (regs.start);
+ free (regs.end);
+ }
+
+ /* The version of regex.c in older versions of gnulib
+ ignored RE_ICASE. Detect that problem too. */
+ re_set_syntax (RE_SYNTAX_EMACS | RE_ICASE);
+ memset (&regex, 0, sizeof regex);
+ s = re_compile_pattern ("x", 1, &regex);
+ if (s)
+ result |= 16;
+ else
+ {
+ memset (&regs, 0, sizeof regs);
+ if (re_search (&regex, "WXY", 3, 0, 3, &regs) < 0)
+ result |= 16;
+ regfree (&regex);
+ free (regs.start);
+ free (regs.end);
+ }
+
+ /* Catch a bug reported by Vin Shelton in
+ http://lists.gnu.org/archive/html/bug-coreutils/2007-06/msg00089.html
+ */
+ re_set_syntax (RE_SYNTAX_POSIX_BASIC
+ & ~RE_CONTEXT_INVALID_DUP
+ & ~RE_NO_EMPTY_RANGES);
+ memset (&regex, 0, sizeof regex);
+ s = re_compile_pattern ("[[:alnum:]_-]\\\\+$", 16, &regex);
+ if (s)
+ result |= 32;
+ else
+ regfree (&regex);
+
+ /* REG_STARTEND was added to glibc on 2004-01-15.
+ Reject older versions. */
+ if (! REG_STARTEND)
+ result |= 64;
+
+#if 0
+ /* It would be nice to reject hosts whose regoff_t values are too
+ narrow (including glibc on hosts with 64-bit ptrdiff_t and
+ 32-bit int), but we should wait until glibc implements this
+ feature. Otherwise, support for equivalence classes and
+ multibyte collation symbols would always be broken except
+ when compiling --without-included-regex. */
+ if (sizeof (regoff_t) < sizeof (ptrdiff_t)
+ || sizeof (regoff_t) < sizeof (ssize_t))
+ result |= 64;
+#endif
+
+ return result;
+}
diff --git a/gnulib-tests/test-rename.c b/gnulib-tests/test-rename.c
new file mode 100644
index 0000000..18f45e7
--- /dev/null
+++ b/gnulib-tests/test-rename.c
@@ -0,0 +1,47 @@
+/* Test of rename() function.
+ Copyright (C) 2009-2016 Free Software Foundation, Inc.
+
+ This 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 <stdio.h>
+
+#include "signature.h"
+SIGNATURE_CHECK (rename, int, (char const *, char const *));
+
+#include <dirent.h>
+#include <errno.h>
+#include <fcntl.h>
+#include <stdbool.h>
+#include <stdlib.h>
+#include <string.h>
+#include <sys/stat.h>
+#include <unistd.h>
+
+#include "ignore-value.h"
+#include "macros.h"
+
+#define BASE "test-rename.t"
+
+#include "test-rename.h"
+
+int
+main (void)
+{
+ /* Remove any garbage left from previous partial runs. */
+ ignore_value (system ("rm -rf " BASE "*"));
+
+ return test_rename (rename, true);
+}
diff --git a/gnulib-tests/test-rename.h b/gnulib-tests/test-rename.h
new file mode 100644
index 0000000..71adeaf
--- /dev/null
+++ b/gnulib-tests/test-rename.h
@@ -0,0 +1,949 @@
+/* Test of rename() function.
+ Copyright (C) 2009-2016 Free Software Foundation, Inc.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+/* This file is designed to test both rename(a,b) and
+ renameat(AT_FDCWD,a,AT_FDCWD,b). FUNC is the function to test.
+ Assumes that BASE and ASSERT are already defined, and that
+ appropriate headers are already included. If PRINT, warn before
+ skipping symlink tests with status 77. */
+
+/* Tests whether a file, given by a file name without slashes, exists in
+ the current directory, by scanning the directory entries. */
+static bool
+dentry_exists (const char *filename)
+{
+ bool exists = false;
+ DIR *dir = opendir (".");
+
+ ASSERT (dir != NULL);
+ for (;;)
+ {
+ struct dirent *d = readdir (dir);
+ if (d == NULL)
+ break;
+ if (strcmp (d->d_name, filename) == 0)
+ {
+ exists = true;
+ break;
+ }
+ }
+ ASSERT (closedir (dir) == 0);
+ return exists;
+}
+
+/* Asserts that a specific file, given by a file name without slashes, does
+ not exist in the current directory. */
+static void
+assert_nonexistent (const char *filename)
+{
+ struct stat st;
+
+ /* The usual way to test the presence of a file is via stat() or lstat(). */
+ errno = 0;
+ if (stat (filename, &st) == -1)
+ ASSERT (errno == ENOENT);
+ else
+ {
+ /* But after renaming a directory over an empty directory on an NFS-
+ mounted file system, on Linux 2.6.18, for a period of 30 seconds the
+ old directory name is "present" according to stat() but "nonexistent"
+ according to dentry_exists(). */
+ ASSERT (!dentry_exists (filename));
+ /* Remove the old directory name, so that subsequent mkdir calls
+ succeed. */
+ (void) rmdir (filename);
+ }
+}
+
+static int
+test_rename (int (*func) (char const *, char const *), bool print)
+{
+ /* Setup. */
+ struct stat st;
+ int fd = creat (BASE "file", 0600);
+ ASSERT (0 <= fd);
+ ASSERT (write (fd, "hi", 2) == 2);
+ ASSERT (close (fd) == 0);
+ ASSERT (mkdir (BASE "dir", 0700) == 0);
+
+ /* Files present here:
+ {BASE}file
+ {BASE}dir/
+ */
+
+ /* Obvious errors. */
+
+ { /* Missing source. */
+ {
+ errno = 0;
+ ASSERT (func (BASE "missing", BASE "missing") == -1);
+ ASSERT (errno == ENOENT);
+ }
+ {
+ errno = 0;
+ ASSERT (func (BASE "missing/", BASE "missing") == -1);
+ ASSERT (errno == ENOENT);
+ }
+ {
+ errno = 0;
+ ASSERT (func (BASE "missing", BASE "missing/") == -1);
+ ASSERT (errno == ENOENT);
+ }
+ }
+ { /* Empty operand. */
+ {
+ errno = 0;
+ ASSERT (func ("", BASE "missing") == -1);
+ ASSERT (errno == ENOENT);
+ }
+ {
+ errno = 0;
+ ASSERT (func (BASE "file", "") == -1);
+ ASSERT (errno == ENOENT);
+ }
+ {
+ errno = 0;
+ ASSERT (func (BASE "", "") == -1);
+ ASSERT (errno == ENOENT);
+ }
+ }
+
+ /* Files. */
+
+ { /* Trailing slash. */
+ {
+ errno = 0;
+ ASSERT (func (BASE "file", BASE "file2/") == -1);
+ ASSERT (errno == ENOENT || errno == ENOTDIR);
+ }
+ {
+ errno = 0;
+ ASSERT (func (BASE "file/", BASE "file2") == -1);
+ ASSERT (errno == ENOTDIR);
+ }
+ {
+ errno = 0;
+ ASSERT (stat (BASE "file2", &st) == -1);
+ ASSERT (errno == ENOENT);
+ }
+ }
+ { /* Simple rename. */
+ ASSERT (func (BASE "file", BASE "file2") == 0);
+ errno = 0;
+ ASSERT (stat (BASE "file", &st) == -1);
+ ASSERT (errno == ENOENT);
+ memset (&st, 0, sizeof st);
+ ASSERT (stat (BASE "file2", &st) == 0);
+ ASSERT (st.st_size == 2);
+ }
+ /* Files present here:
+ {BASE}file2
+ {BASE}dir/
+ */
+ { /* Overwrite. */
+ ASSERT (close (creat (BASE "file", 0600)) == 0);
+ errno = 0;
+ ASSERT (func (BASE "file2", BASE "file/") == -1);
+ ASSERT (errno == ENOTDIR);
+ ASSERT (func (BASE "file2", BASE "file") == 0);
+ memset (&st, 0, sizeof st);
+ ASSERT (stat (BASE "file", &st) == 0);
+ ASSERT (st.st_size == 2);
+ errno = 0;
+ ASSERT (stat (BASE "file2", &st) == -1);
+ ASSERT (errno == ENOENT);
+ }
+ /* Files present here:
+ {BASE}file
+ {BASE}dir/
+ */
+
+ /* Directories. */
+
+ { /* Simple rename. */
+ {
+ ASSERT (func (BASE "dir", BASE "dir2/") == 0);
+ errno = 0;
+ ASSERT (stat (BASE "dir", &st) == -1);
+ ASSERT (errno == ENOENT);
+ ASSERT (stat (BASE "dir2", &st) == 0);
+ }
+ /* Files present here:
+ {BASE}file
+ {BASE}dir2/
+ */
+ {
+ ASSERT (func (BASE "dir2/", BASE "dir") == 0);
+ ASSERT (stat (BASE "dir", &st) == 0);
+ errno = 0;
+ ASSERT (stat (BASE "dir2", &st) == -1);
+ ASSERT (errno == ENOENT);
+ }
+ /* Files present here:
+ {BASE}file
+ {BASE}dir/
+ */
+ {
+ ASSERT (func (BASE "dir", BASE "dir2") == 0);
+ errno = 0;
+ ASSERT (stat (BASE "dir", &st) == -1);
+ ASSERT (errno == ENOENT);
+ ASSERT (stat (BASE "dir2", &st) == 0);
+ }
+ /* Files present here:
+ {BASE}file
+ {BASE}dir2/
+ */
+ { /* Empty onto empty. */
+ ASSERT (mkdir (BASE "dir", 0700) == 0);
+ /* Files present here:
+ {BASE}file
+ {BASE}dir/
+ {BASE}dir2/
+ */
+ ASSERT (func (BASE "dir2", BASE "dir") == 0);
+ /* Files present here:
+ {BASE}file
+ {BASE}dir/
+ */
+ ASSERT (mkdir (BASE "dir2", 0700) == 0);
+ /* Files present here:
+ {BASE}file
+ {BASE}dir/
+ {BASE}dir2/
+ */
+ ASSERT (func (BASE "dir2", BASE "dir/") == 0);
+ /* Files present here:
+ {BASE}file
+ {BASE}dir/
+ */
+ ASSERT (mkdir (BASE "dir2", 0700) == 0);
+ /* Files present here:
+ {BASE}file
+ {BASE}dir/
+ {BASE}dir2/
+ */
+ ASSERT (func (BASE "dir2/", BASE "dir") == 0);
+ /* Files present here:
+ {BASE}file
+ {BASE}dir/
+ */
+ ASSERT (mkdir (BASE "dir2", 0700) == 0);
+ }
+ /* Files present here:
+ {BASE}file
+ {BASE}dir/
+ {BASE}dir2/
+ */
+ { /* Empty onto full. */
+ ASSERT (close (creat (BASE "dir/file", 0600)) == 0);
+ /* Files present here:
+ {BASE}file
+ {BASE}dir/
+ {BASE}dir/file
+ {BASE}dir2/
+ */
+ {
+ errno = 0;
+ ASSERT (func (BASE "dir2", BASE "dir") == -1);
+ ASSERT (errno == EEXIST || errno == ENOTEMPTY);
+ }
+ {
+ errno = 0;
+ ASSERT (func (BASE "dir2/", BASE "dir") == -1);
+ ASSERT (errno == EEXIST || errno == ENOTEMPTY);
+ }
+ {
+ errno = 0;
+ ASSERT (func (BASE "dir2", BASE "dir/") == -1);
+ ASSERT (errno == EEXIST || errno == ENOTEMPTY);
+ }
+ }
+ { /* Full onto empty. */
+ ASSERT (func (BASE "dir", BASE "dir2") == 0);
+ assert_nonexistent (BASE "dir");
+ ASSERT (stat (BASE "dir2/file", &st) == 0);
+ /* Files present here:
+ {BASE}file
+ {BASE}dir2/
+ {BASE}dir2/file
+ */
+ ASSERT (mkdir (BASE "dir", 0700) == 0);
+ /* Files present here:
+ {BASE}file
+ {BASE}dir/
+ {BASE}dir2/
+ {BASE}dir2/file
+ */
+ {
+ ASSERT (func (BASE "dir2/", BASE "dir") == 0);
+ ASSERT (stat (BASE "dir/file", &st) == 0);
+ errno = 0;
+ ASSERT (stat (BASE "dir2", &st) == -1);
+ ASSERT (errno == ENOENT);
+ }
+ /* Files present here:
+ {BASE}file
+ {BASE}dir/
+ {BASE}dir/file
+ */
+ ASSERT (mkdir (BASE "dir2", 0700) == 0);
+ /* Files present here:
+ {BASE}file
+ {BASE}dir/
+ {BASE}dir/file
+ {BASE}dir2/
+ */
+ {
+ ASSERT (func (BASE "dir", BASE "dir2/") == 0);
+ assert_nonexistent (BASE "dir");
+ ASSERT (stat (BASE "dir2/file", &st) == 0);
+ }
+ /* Files present here:
+ {BASE}file
+ {BASE}dir2/
+ {BASE}dir2/file
+ */
+ ASSERT (unlink (BASE "dir2/file") == 0);
+ }
+ /* Files present here:
+ {BASE}file
+ {BASE}dir2/
+ */
+ { /* Reject trailing dot. */
+ {
+ errno = 0;
+ ASSERT (func (BASE "dir2", BASE "dir/.") == -1);
+ ASSERT (errno == EINVAL || errno == ENOENT);
+ }
+ ASSERT (mkdir (BASE "dir", 0700) == 0);
+ /* Files present here:
+ {BASE}file
+ {BASE}dir/
+ {BASE}dir2/
+ */
+ {
+ errno = 0;
+ ASSERT (func (BASE "dir2", BASE "dir/.") == -1);
+ ASSERT (errno == EINVAL || errno == EBUSY || errno == EISDIR
+ || errno == ENOTEMPTY || errno == EEXIST);
+ }
+ {
+ errno = 0;
+ ASSERT (func (BASE "dir2/.", BASE "dir") == -1);
+ ASSERT (errno == EINVAL || errno == EBUSY || errno == EEXIST);
+ }
+ ASSERT (rmdir (BASE "dir") == 0);
+ /* Files present here:
+ {BASE}file
+ {BASE}dir2/
+ */
+ {
+ errno = 0;
+ ASSERT (func (BASE "dir2", BASE "dir/.//") == -1);
+ ASSERT (errno == EINVAL || errno == ENOENT);
+ }
+ ASSERT (mkdir (BASE "dir", 0700) == 0);
+ /* Files present here:
+ {BASE}file
+ {BASE}dir/
+ {BASE}dir2/
+ */
+ {
+ errno = 0;
+ ASSERT (func (BASE "dir2", BASE "dir/.//") == -1);
+ ASSERT (errno == EINVAL || errno == EBUSY || errno == EISDIR
+ || errno == ENOTEMPTY || errno == EEXIST);
+ }
+ {
+ errno = 0;
+ ASSERT (func (BASE "dir2/.//", BASE "dir") == -1);
+ ASSERT (errno == EINVAL || errno == EBUSY || errno == EEXIST);
+ }
+ ASSERT (rmdir (BASE "dir2") == 0);
+ /* Files present here:
+ {BASE}file
+ {BASE}dir/
+ */
+ }
+ { /* Move into subdir. */
+ {
+ errno = 0;
+ ASSERT (func (BASE "dir", BASE "dir/sub") == -1);
+ ASSERT (errno == EINVAL || errno == EACCES);
+ }
+ {
+ errno = 0;
+ ASSERT (stat (BASE "dir/sub", &st) == -1);
+ ASSERT (errno == ENOENT);
+ }
+ ASSERT (mkdir (BASE "dir/sub", 0700) == 0);
+ /* Files present here:
+ {BASE}file
+ {BASE}dir/
+ {BASE}dir/sub/
+ */
+ {
+ errno = 0;
+ ASSERT (func (BASE "dir", BASE "dir/sub") == -1);
+ ASSERT (errno == EINVAL);
+ ASSERT (stat (BASE "dir/sub", &st) == 0);
+ }
+ ASSERT (rmdir (BASE "dir/sub") == 0);
+ }
+ }
+ /* Files present here:
+ {BASE}file
+ {BASE}dir/
+ */
+
+ /* Mixing file and directory. */
+
+ {
+ { /* File onto dir. */
+ {
+ errno = 0;
+ ASSERT (func (BASE "file", BASE "dir") == -1);
+ ASSERT (errno == EISDIR || errno == ENOTDIR);
+ }
+ {
+ errno = 0;
+ ASSERT (func (BASE "file", BASE "dir/") == -1);
+ ASSERT (errno == EISDIR || errno == ENOTDIR);
+ }
+ }
+ { /* Dir onto file. */
+ {
+ errno = 0;
+ ASSERT (func (BASE "dir", BASE "file") == -1);
+ ASSERT (errno == ENOTDIR);
+ }
+ {
+ errno = 0;
+ ASSERT (func (BASE "dir/", BASE "file") == -1);
+ ASSERT (errno == ENOTDIR);
+ }
+ }
+ }
+
+ /* Hard links. */
+
+ { /* File onto self. */
+ ASSERT (func (BASE "file", BASE "file") == 0);
+ memset (&st, 0, sizeof st);
+ ASSERT (stat (BASE "file", &st) == 0);
+ ASSERT (st.st_size == 2);
+ }
+ /* Files present here:
+ {BASE}file
+ {BASE}dir/
+ */
+ { /* Empty dir onto self. */
+ ASSERT (func (BASE "dir", BASE "dir") == 0);
+ ASSERT (stat (BASE "dir", &st) == 0);
+ }
+ /* Files present here:
+ {BASE}file
+ {BASE}dir/
+ */
+ ASSERT (close (creat (BASE "dir/file", 0600)) == 0);
+ /* Files present here:
+ {BASE}file
+ {BASE}dir/
+ {BASE}dir/file
+ */
+ { /* Full dir onto self. */
+ ASSERT (func (BASE "dir", BASE "dir") == 0);
+ }
+ ASSERT (unlink (BASE "dir/file") == 0);
+ /* Files present here:
+ {BASE}file
+ {BASE}dir/
+ */
+ {
+ /* Not all file systems support link. Mingw doesn't have
+ reliable st_nlink on hard links, but our implementation does
+ fail with EPERM on poor file systems, and we can detect the
+ inferior stat() via st_ino. Cygwin 1.5.x copies rather than
+ links files on those file systems, but there, st_nlink and
+ st_ino are reliable. */
+ int ret = link (BASE "file", BASE "file2");
+ if (!ret)
+ {
+ memset (&st, 0, sizeof st);
+ ASSERT (stat (BASE "file2", &st) == 0);
+ if (st.st_ino && st.st_nlink != 2)
+ {
+ ASSERT (unlink (BASE "file2") == 0);
+ errno = EPERM;
+ ret = -1;
+ }
+ }
+ if (ret == -1)
+ {
+ /* If the device does not support hard links, errno is
+ EPERM on Linux, EOPNOTSUPP on FreeBSD. */
+ switch (errno)
+ {
+ case EPERM:
+ case EOPNOTSUPP:
+ if (print)
+ fputs ("skipping test: "
+ "hard links not supported on this file system\n",
+ stderr);
+ ASSERT (unlink (BASE "file") == 0);
+ ASSERT (rmdir (BASE "dir") == 0);
+ return 77;
+ default:
+ perror ("link");
+ return 1;
+ }
+ }
+ ASSERT (ret == 0);
+ }
+ /* Files present here:
+ {BASE}file
+ {BASE}file2 (hard link to file)
+ {BASE}dir/
+ */
+ { /* File onto hard link. */
+ ASSERT (func (BASE "file", BASE "file2") == 0);
+ memset (&st, 0, sizeof st);
+ ASSERT (stat (BASE "file", &st) == 0);
+ ASSERT (st.st_size == 2);
+ memset (&st, 0, sizeof st);
+ ASSERT (stat (BASE "file2", &st) == 0);
+ ASSERT (st.st_size == 2);
+ }
+ /* Files present here:
+ {BASE}file
+ {BASE}file2
+ {BASE}dir/
+ */
+ ASSERT (unlink (BASE "file2") == 0);
+ /* Files present here:
+ {BASE}file
+ {BASE}dir/
+ */
+
+ /* Symlinks. */
+
+ if (symlink (BASE "file", BASE "link1"))
+ {
+ if (print)
+ fputs ("skipping test: symlinks not supported on this file system\n",
+ stderr);
+ ASSERT (unlink (BASE "file") == 0);
+ ASSERT (rmdir (BASE "dir") == 0);
+ return 77;
+ }
+ /* Files present here:
+ {BASE}file
+ {BASE}link1 -> {BASE}file
+ {BASE}dir/
+ */
+ { /* Simple rename. */
+ ASSERT (func (BASE "link1", BASE "link2") == 0);
+ ASSERT (stat (BASE "file", &st) == 0);
+ errno = 0;
+ ASSERT (lstat (BASE "link1", &st) == -1);
+ ASSERT (errno == ENOENT);
+ memset (&st, 0, sizeof st);
+ ASSERT (lstat (BASE "link2", &st) == 0);
+ ASSERT (S_ISLNK (st.st_mode));
+ }
+ /* Files present here:
+ {BASE}file
+ {BASE}link2 -> {BASE}file
+ {BASE}dir/
+ */
+ { /* Overwrite. */
+ ASSERT (symlink (BASE "nowhere", BASE "link1") == 0);
+ /* Files present here:
+ {BASE}file
+ {BASE}link1 -> {BASE}nowhere
+ {BASE}link2 -> {BASE}file
+ {BASE}dir/
+ */
+ {
+ ASSERT (func (BASE "link2", BASE "link1") == 0);
+ memset (&st, 0, sizeof st);
+ ASSERT (stat (BASE "link1", &st) == 0);
+ ASSERT (st.st_size == 2);
+ errno = 0;
+ ASSERT (lstat (BASE "link2", &st) == -1);
+ ASSERT (errno == ENOENT);
+ }
+ }
+ /* Files present here:
+ {BASE}file
+ {BASE}link1 -> {BASE}file
+ {BASE}dir/
+ */
+ { /* Symlink loop. */
+ ASSERT (symlink (BASE "link2", BASE "link2") == 0);
+ /* Files present here:
+ {BASE}file
+ {BASE}link1 -> {BASE}file
+ {BASE}link2 -> {BASE}link2
+ {BASE}dir/
+ */
+ {
+ ASSERT (func (BASE "link2", BASE "link2") == 0);
+ }
+ {
+ errno = 0;
+ ASSERT (func (BASE "link2/", BASE "link2") == -1);
+ ASSERT (errno == ELOOP || errno == ENOTDIR);
+ }
+ ASSERT (func (BASE "link2", BASE "link3") == 0);
+ /* Files present here:
+ {BASE}file
+ {BASE}link1 -> {BASE}file
+ {BASE}link3 -> {BASE}link2
+ {BASE}dir/
+ */
+ ASSERT (unlink (BASE "link3") == 0);
+ }
+ /* Files present here:
+ {BASE}file
+ {BASE}link1 -> {BASE}file
+ {BASE}dir/
+ */
+ { /* Dangling link. */
+ ASSERT (symlink (BASE "nowhere", BASE "link2") == 0);
+ /* Files present here:
+ {BASE}file
+ {BASE}link1 -> {BASE}file
+ {BASE}link2 -> {BASE}nowhere
+ {BASE}dir/
+ */
+ {
+ ASSERT (func (BASE "link2", BASE "link3") == 0);
+ errno = 0;
+ ASSERT (lstat (BASE "link2", &st) == -1);
+ ASSERT (errno == ENOENT);
+ memset (&st, 0, sizeof st);
+ ASSERT (lstat (BASE "link3", &st) == 0);
+ }
+ }
+ /* Files present here:
+ {BASE}file
+ {BASE}link1 -> {BASE}file
+ {BASE}link3 -> {BASE}nowhere
+ {BASE}dir/
+ */
+ { /* Trailing slash on dangling. */
+ {
+ errno = 0;
+ ASSERT (func (BASE "link3/", BASE "link2") == -1);
+ ASSERT (errno == ENOENT || errno == ENOTDIR);
+ }
+ {
+ errno = 0;
+ ASSERT (func (BASE "link3", BASE "link2/") == -1);
+ ASSERT (errno == ENOENT || errno == ENOTDIR);
+ }
+ {
+ errno = 0;
+ ASSERT (lstat (BASE "link2", &st) == -1);
+ ASSERT (errno == ENOENT);
+ }
+ memset (&st, 0, sizeof st);
+ ASSERT (lstat (BASE "link3", &st) == 0);
+ }
+ /* Files present here:
+ {BASE}file
+ {BASE}link1 -> {BASE}file
+ {BASE}link3 -> {BASE}nowhere
+ {BASE}dir/
+ */
+ { /* Trailing slash on link to file. */
+ {
+ errno = 0;
+ ASSERT (func (BASE "link1/", BASE "link2") == -1);
+ ASSERT (errno == ENOTDIR);
+ }
+ {
+ errno = 0;
+ ASSERT (func (BASE "link1", BASE "link3/") == -1);
+ ASSERT (errno == ENOENT || errno == ENOTDIR);
+ }
+ }
+ /* Files present here:
+ {BASE}file
+ {BASE}link1 -> {BASE}file
+ {BASE}link3 -> {BASE}nowhere
+ {BASE}dir/
+ */
+
+ /* Mixing symlink and file. */
+
+ { /* File onto link. */
+ ASSERT (close (creat (BASE "file2", 0600)) == 0);
+ /* Files present here:
+ {BASE}file
+ {BASE}file2
+ {BASE}link1 -> {BASE}file
+ {BASE}link3 -> {BASE}nowhere
+ {BASE}dir/
+ */
+ {
+ ASSERT (func (BASE "file2", BASE "link3") == 0);
+ errno = 0;
+ ASSERT (stat (BASE "file2", &st) == -1);
+ ASSERT (errno == ENOENT);
+ memset (&st, 0, sizeof st);
+ ASSERT (lstat (BASE "link3", &st) == 0);
+ ASSERT (S_ISREG (st.st_mode));
+ }
+ /* Files present here:
+ {BASE}file
+ {BASE}link1 -> {BASE}file
+ {BASE}link3
+ {BASE}dir/
+ */
+ ASSERT (unlink (BASE "link3") == 0);
+ }
+ /* Files present here:
+ {BASE}file
+ {BASE}link1 -> {BASE}file
+ {BASE}dir/
+ */
+ { /* Link onto file. */
+ ASSERT (symlink (BASE "nowhere", BASE "link2") == 0);
+ /* Files present here:
+ {BASE}file
+ {BASE}link1 -> {BASE}file
+ {BASE}link2 -> {BASE}nowhere
+ {BASE}dir/
+ */
+ ASSERT (close (creat (BASE "file2", 0600)) == 0);
+ /* Files present here:
+ {BASE}file
+ {BASE}file2
+ {BASE}link1 -> {BASE}file
+ {BASE}link2 -> {BASE}nowhere
+ {BASE}dir/
+ */
+ {
+ ASSERT (func (BASE "link2", BASE "file2") == 0);
+ errno = 0;
+ ASSERT (lstat (BASE "link2", &st) == -1);
+ ASSERT (errno == ENOENT);
+ memset (&st, 0, sizeof st);
+ ASSERT (lstat (BASE "file2", &st) == 0);
+ ASSERT (S_ISLNK (st.st_mode));
+ }
+ /* Files present here:
+ {BASE}file
+ {BASE}file2 -> {BASE}nowhere
+ {BASE}link1 -> {BASE}file
+ {BASE}dir/
+ */
+ ASSERT (unlink (BASE "file2") == 0);
+ }
+ /* Files present here:
+ {BASE}file
+ {BASE}link1 -> {BASE}file
+ {BASE}dir/
+ */
+ { /* Trailing slash. */
+ {
+ errno = 0;
+ ASSERT (func (BASE "file/", BASE "link1") == -1);
+ ASSERT (errno == ENOTDIR);
+ }
+ {
+ errno = 0;
+ ASSERT (func (BASE "file", BASE "link1/") == -1);
+ ASSERT (errno == ENOTDIR || errno == ENOENT);
+ }
+ {
+ errno = 0;
+ ASSERT (func (BASE "link1/", BASE "file") == -1);
+ ASSERT (errno == ENOTDIR);
+ }
+ {
+ errno = 0;
+ ASSERT (func (BASE "link1", BASE "file/") == -1);
+ ASSERT (errno == ENOTDIR || errno == ENOENT);
+ memset (&st, 0, sizeof st);
+ ASSERT (lstat (BASE "file", &st) == 0);
+ ASSERT (S_ISREG (st.st_mode));
+ memset (&st, 0, sizeof st);
+ ASSERT (lstat (BASE "link1", &st) == 0);
+ ASSERT (S_ISLNK (st.st_mode));
+ }
+ }
+ /* Files present here:
+ {BASE}file
+ {BASE}link1 -> {BASE}file
+ {BASE}dir/
+ */
+
+ /* Mixing symlink and directory. */
+
+ { /* Directory onto link. */
+ {
+ errno = 0;
+ ASSERT (func (BASE "dir", BASE "link1") == -1);
+ ASSERT (errno == ENOTDIR);
+ }
+ {
+ errno = 0;
+ ASSERT (func (BASE "dir/", BASE "link1") == -1);
+ ASSERT (errno == ENOTDIR);
+ }
+ {
+ errno = 0;
+ ASSERT (func (BASE "dir", BASE "link1/") == -1);
+ ASSERT (errno == ENOTDIR);
+ }
+ }
+ { /* Link onto directory. */
+ {
+ errno = 0;
+ ASSERT (func (BASE "link1", BASE "dir") == -1);
+ ASSERT (errno == EISDIR || errno == ENOTDIR);
+ }
+ {
+ errno = 0;
+ ASSERT (func (BASE "link1", BASE "dir/") == -1);
+ ASSERT (errno == EISDIR || errno == ENOTDIR);
+ }
+ {
+ errno = 0;
+ ASSERT (func (BASE "link1/", BASE "dir") == -1);
+ ASSERT (errno == ENOTDIR);
+ memset (&st, 0, sizeof st);
+ ASSERT (lstat (BASE "link1", &st) == 0);
+ ASSERT (S_ISLNK (st.st_mode));
+ memset (&st, 0, sizeof st);
+ ASSERT (lstat (BASE "dir", &st) == 0);
+ ASSERT (S_ISDIR (st.st_mode));
+ }
+ }
+ /* Files present here:
+ {BASE}file
+ {BASE}link1 -> {BASE}file
+ {BASE}dir/
+ */
+
+ /* POSIX requires rename("link-to-dir/","other") to rename "dir" and
+ leave "link-to-dir" dangling, but GNU rejects this. POSIX
+ requires rename("dir","dangling/") to create the directory so
+ that "dangling/" now resolves, but GNU rejects this. While we
+ prefer GNU behavior, we don't enforce it. However, we do test
+ that the system either follows POSIX in both cases, or follows
+ GNU. */
+ {
+ int result;
+ ASSERT (symlink (BASE "dir2", BASE "link2") == 0);
+ /* Files present here:
+ {BASE}file
+ {BASE}link1 -> {BASE}file
+ {BASE}link2 -> {BASE}dir2
+ {BASE}dir/
+ */
+ errno = 0;
+ result = func (BASE "dir", BASE "link2/");
+ if (result == 0)
+ {
+ /* POSIX. */
+ errno = 0;
+ ASSERT (lstat (BASE "dir", &st) == -1);
+ ASSERT (errno == ENOENT);
+ memset (&st, 0, sizeof st);
+ ASSERT (lstat (BASE "dir2", &st) == 0);
+ ASSERT (S_ISDIR (st.st_mode));
+ memset (&st, 0, sizeof st);
+ ASSERT (lstat (BASE "link2", &st) == 0);
+ ASSERT (S_ISLNK (st.st_mode));
+ /* Files present here:
+ {BASE}file
+ {BASE}link1 -> {BASE}file
+ {BASE}link2 -> {BASE}dir2
+ {BASE}dir2/
+ */
+ {
+ ASSERT (func (BASE "link2/", BASE "dir") == 0);
+ memset (&st, 0, sizeof st);
+ ASSERT (lstat (BASE "dir", &st) == 0);
+ ASSERT (S_ISDIR (st.st_mode));
+ errno = 0;
+ ASSERT (lstat (BASE "dir2", &st) == -1);
+ ASSERT (errno == ENOENT);
+ memset (&st, 0, sizeof st);
+ ASSERT (lstat (BASE "link2", &st) == 0);
+ ASSERT (S_ISLNK (st.st_mode));
+ }
+ }
+ else
+ {
+ /* GNU. */
+ ASSERT (result == -1);
+ ASSERT (errno == ENOTDIR);
+ memset (&st, 0, sizeof st);
+ ASSERT (lstat (BASE "dir", &st) == 0);
+ ASSERT (S_ISDIR (st.st_mode));
+ errno = 0;
+ ASSERT (lstat (BASE "dir2", &st) == -1);
+ ASSERT (errno == ENOENT);
+ memset (&st, 0, sizeof st);
+ ASSERT (lstat (BASE "link2", &st) == 0);
+ ASSERT (S_ISLNK (st.st_mode));
+ ASSERT (unlink (BASE "link2") == 0);
+ ASSERT (symlink (BASE "dir", BASE "link2") == 0);
+ /* Files present here:
+ {BASE}file
+ {BASE}link1 -> {BASE}file
+ {BASE}link2 -> {BASE}dir
+ {BASE}dir/
+ */
+ errno = 0; /* OpenBSD notices that link2/ and dir are the same. */
+ result = func (BASE "link2/", BASE "dir");
+ if (result) /* GNU/Linux rejects attempts to use link2/. */
+ {
+ ASSERT (result == -1);
+ ASSERT (errno == ENOTDIR || errno == EISDIR);
+ }
+ memset (&st, 0, sizeof st);
+ ASSERT (lstat (BASE "dir", &st) == 0);
+ ASSERT (S_ISDIR (st.st_mode));
+ errno = 0;
+ ASSERT (lstat (BASE "dir2", &st) == -1);
+ ASSERT (errno == ENOENT);
+ memset (&st, 0, sizeof st);
+ ASSERT (lstat (BASE "link2", &st) == 0);
+ ASSERT (S_ISLNK (st.st_mode));
+ }
+ }
+ /* Files present here:
+ {BASE}file
+ {BASE}link1 -> {BASE}file
+ {BASE}link2 -> {BASE}dir or {BASE}dir2
+ {BASE}dir/
+ */
+
+ /* Clean up. */
+ ASSERT (unlink (BASE "file") == 0);
+ ASSERT (rmdir (BASE "dir") == 0);
+ ASSERT (unlink (BASE "link1") == 0);
+ ASSERT (unlink (BASE "link2") == 0);
+
+ return 0;
+}
diff --git a/gnulib-tests/test-rmdir.c b/gnulib-tests/test-rmdir.c
new file mode 100644
index 0000000..192525c
--- /dev/null
+++ b/gnulib-tests/test-rmdir.c
@@ -0,0 +1,47 @@
+/* Tests of rmdir.
+ Copyright (C) 2009-2016 Free Software Foundation, Inc.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+/* Written by Eric Blake <ebb9@byu.net>, 2009. */
+
+#include <config.h>
+
+#include <unistd.h>
+
+#include "signature.h"
+SIGNATURE_CHECK (rmdir, int, (char const *));
+
+#include <fcntl.h>
+#include <errno.h>
+#include <stdbool.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <sys/stat.h>
+
+#include "ignore-value.h"
+#include "macros.h"
+
+#define BASE "test-rmdir.t"
+
+#include "test-rmdir.h"
+
+int
+main (void)
+{
+ /* Remove any leftovers from a previous partial run. */
+ ignore_value (system ("rm -rf " BASE "*"));
+
+ return test_rmdir_func (rmdir, true);
+}
diff --git a/gnulib-tests/test-rmdir.h b/gnulib-tests/test-rmdir.h
new file mode 100644
index 0000000..5cccd05
--- /dev/null
+++ b/gnulib-tests/test-rmdir.h
@@ -0,0 +1,102 @@
+/* Tests of rmdir.
+ Copyright (C) 2009-2016 Free Software Foundation, Inc.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+/* Written by Eric Blake <ebb9@byu.net>, 2009. */
+
+/* This file is designed to test both rmdir(n) and
+ unlinkat(AT_FDCWD,n,AT_REMOVEDIR). FUNC is the function to test.
+ Assumes that BASE and ASSERT are already defined, and that
+ appropriate headers are already included. If PRINT, then warn
+ before returning status 77 when symlinks are unsupported. */
+
+static int
+test_rmdir_func (int (*func) (char const *name), bool print)
+{
+ /* Setup. */
+ ASSERT (mkdir (BASE "dir", 0700) == 0);
+ ASSERT (close (creat (BASE "dir/file", 0600)) == 0);
+
+ /* Basic error conditions. */
+ errno = 0;
+ ASSERT (func ("") == -1);
+ ASSERT (errno == ENOENT);
+ errno = 0;
+ ASSERT (func (BASE "nosuch") == -1);
+ ASSERT (errno == ENOENT);
+ errno = 0;
+ ASSERT (func (BASE "nosuch/") == -1);
+ ASSERT (errno == ENOENT);
+ errno = 0;
+ ASSERT (func (".") == -1);
+ ASSERT (errno == EINVAL || errno == EBUSY);
+ /* Resulting errno after ".." or "/" is too varied to test; it is
+ reasonable to see any of EINVAL, EBUSY, EEXIST, ENOTEMPTY,
+ EACCES, EPERM. */
+ ASSERT (func ("..") == -1);
+ ASSERT (func ("/") == -1);
+ ASSERT (func ("///") == -1);
+ errno = 0;
+ ASSERT (func (BASE "dir/file/") == -1);
+ ASSERT (errno == ENOTDIR);
+
+ /* Non-empty directory. */
+ errno = 0;
+ ASSERT (func (BASE "dir") == -1);
+ ASSERT (errno == EEXIST || errno == ENOTEMPTY);
+
+ /* Non-directory. */
+ errno = 0;
+ ASSERT (func (BASE "dir/file") == -1);
+ ASSERT (errno == ENOTDIR);
+
+ /* Empty directory. */
+ ASSERT (unlink (BASE "dir/file") == 0);
+ errno = 0;
+ ASSERT (func (BASE "dir/.//") == -1);
+ ASSERT (errno == EINVAL || errno == EBUSY || errno == EEXIST
+ || errno == ENOTEMPTY);
+ ASSERT (func (BASE "dir") == 0);
+
+ /* Test symlink behavior. Specifying trailing slash should remove
+ referent directory (POSIX), or cause ENOTDIR failure (Linux), but
+ not touch symlink. We prefer the Linux behavior for its
+ intuitiveness (especially compared to rmdir("symlink-to-file/")),
+ but not enough to penalize POSIX systems with an rpl_rmdir. */
+ if (symlink (BASE "dir", BASE "link") != 0)
+ {
+ if (print)
+ fputs ("skipping test: symlinks not supported on this file system\n",
+ stderr);
+ return 77;
+ }
+ ASSERT (mkdir (BASE "dir", 0700) == 0);
+ errno = 0;
+ if (func (BASE "link/") == 0)
+ {
+ struct stat st;
+ errno = 0;
+ ASSERT (stat (BASE "link", &st) == -1);
+ ASSERT (errno == ENOENT);
+ }
+ else
+ {
+ ASSERT (errno == ENOTDIR);
+ ASSERT (func (BASE "dir") == 0);
+ }
+ ASSERT (unlink (BASE "link") == 0);
+
+ return 0;
+}
diff --git a/gnulib-tests/test-sameacls.c b/gnulib-tests/test-sameacls.c
new file mode 100644
index 0000000..aa34ae6
--- /dev/null
+++ b/gnulib-tests/test-sameacls.c
@@ -0,0 +1,695 @@
+/* Test whether two files have the same ACLs.
+ Copyright (C) 2008-2016 Free Software Foundation, Inc.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+/* Written by Bruno Haible <bruno@clisp.org>, 2008. */
+
+#include <config.h>
+
+#include <errno.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <sys/stat.h>
+
+#if HAVE_ACL_GET_FILE || HAVE_FACL || HAVE_GETACL || HAVE_ACLX_GET || HAVE_STATACL || HAVE_ACLSORT
+# include <sys/types.h>
+# include <sys/acl.h>
+#endif
+#if HAVE_ACLV_H
+# include <sys/types.h>
+# include <aclv.h>
+#endif
+
+#include "read-file.h"
+#include "xalloc.h"
+#include "macros.h"
+
+int
+main (int argc, char *argv[])
+{
+ const char *file1;
+ const char *file2;
+
+ ASSERT (argc == 3);
+
+ file1 = argv[1];
+ file2 = argv[2];
+
+ /* Compare the contents of the two files. */
+ {
+ size_t size1;
+ char *contents1;
+ size_t size2;
+ char *contents2;
+
+ contents1 = read_file (file1, &size1);
+ if (contents1 == NULL)
+ {
+ fprintf (stderr, "error reading file %s: errno = %d\n", file1, errno);
+ fflush (stderr);
+ abort ();
+ }
+ contents2 = read_file (file2, &size2);
+ if (contents2 == NULL)
+ {
+ fprintf (stderr, "error reading file %s: errno = %d\n", file2, errno);
+ fflush (stderr);
+ abort ();
+ }
+
+ if (size2 != size1)
+ {
+ fprintf (stderr, "files %s and %s have different sizes\n",
+ file1, file2);
+ fflush (stderr);
+ abort ();
+ }
+ if (memcmp (contents1, contents2, size1) != 0)
+ {
+ fprintf (stderr, "files %s and %s have different contents\n",
+ file1, file2);
+ fflush (stderr);
+ abort ();
+ }
+ }
+
+ /* Compare the access permissions of the two files, including ACLs. */
+ {
+ struct stat statbuf1;
+ struct stat statbuf2;
+
+ if (stat (file1, &statbuf1) < 0)
+ {
+ fprintf (stderr, "error accessing file %s: errno = %d\n", file1, errno);
+ fflush (stderr);
+ abort ();
+ }
+ if (stat (file2, &statbuf2) < 0)
+ {
+ fprintf (stderr, "error accessing file %s: errno = %d\n", file2, errno);
+ fflush (stderr);
+ abort ();
+ }
+ if (statbuf1.st_mode != statbuf2.st_mode)
+ {
+ fprintf (stderr, "files %s and %s have different access modes: %03o and %03o\n",
+ file1, file2,
+ (unsigned int) statbuf1.st_mode, (unsigned int) statbuf2.st_mode);
+ return 1;
+ }
+ }
+ {
+#if HAVE_ACL_GET_FILE /* Linux, FreeBSD, Mac OS X, IRIX, Tru64 */
+ static const int types[] =
+ {
+ ACL_TYPE_ACCESS
+# if HAVE_ACL_TYPE_EXTENDED /* Mac OS X */
+ , ACL_TYPE_EXTENDED
+# endif
+ };
+ int t;
+
+ for (t = 0; t < sizeof (types) / sizeof (types[0]); t++)
+ {
+ int type = types[t];
+ acl_t acl1;
+ char *text1;
+ int errno1;
+ acl_t acl2;
+ char *text2;
+ int errno2;
+
+ acl1 = acl_get_file (file1, type);
+ if (acl1 == (acl_t)NULL)
+ {
+ text1 = NULL;
+ errno1 = errno;
+ }
+ else
+ {
+ text1 = acl_to_text (acl1, NULL);
+ if (text1 == NULL)
+ errno1 = errno;
+ else
+ errno1 = 0;
+ }
+ acl2 = acl_get_file (file2, type);
+ if (acl2 == (acl_t)NULL)
+ {
+ text2 = NULL;
+ errno2 = errno;
+ }
+ else
+ {
+ text2 = acl_to_text (acl2, NULL);
+ if (text2 == NULL)
+ errno2 = errno;
+ else
+ errno2 = 0;
+ }
+
+ if (acl1 != (acl_t)NULL)
+ {
+ if (acl2 != (acl_t)NULL)
+ {
+ if (text1 != NULL)
+ {
+ if (text2 != NULL)
+ {
+ if (strcmp (text1, text2) != 0)
+ {
+ fprintf (stderr, "files %s and %s have different ACLs:\n%s\n%s\n",
+ file1, file2, text1, text2);
+ return 1;
+ }
+ }
+ else
+ {
+ fprintf (stderr, "file %s has a valid ACL, but file %s has an invalid ACL\n",
+ file1, file2);
+ return 1;
+ }
+ }
+ else
+ {
+ if (text2 != NULL)
+ {
+ fprintf (stderr, "file %s has an invalid ACL, but file %s has a valid ACL\n",
+ file1, file2);
+ return 1;
+ }
+ else
+ {
+ if (errno1 != errno2)
+ {
+ fprintf (stderr, "files %s and %s have differently invalid ACLs, errno = %d vs. %d\n",
+ file1, file2, errno1, errno2);
+ return 1;
+ }
+ }
+ }
+ }
+ else
+ {
+ fprintf (stderr, "file %s has an ACL, but file %s has no ACL\n",
+ file1, file2);
+ return 1;
+ }
+ }
+ else
+ {
+ if (acl2 != (acl_t)NULL)
+ {
+ fprintf (stderr, "file %s has no ACL, but file %s has an ACL\n",
+ file1, file2);
+ return 1;
+ }
+ }
+ }
+#elif HAVE_FACL && defined GETACL /* Solaris, Cygwin, not HP-UX */
+ int count1;
+ int count2;
+
+ count1 = acl (file1, GETACLCNT, 0, NULL);
+ if (count1 < 0 && errno == ENOSYS) /* Can happen on Solaris 10 with ZFS */
+ count1 = 0;
+ count2 = acl (file2, GETACLCNT, 0, NULL);
+ if (count2 < 0 && errno == ENOSYS) /* Can happen on Solaris 10 with ZFS */
+ count2 = 0;
+
+ if (count1 < 0)
+ {
+ fprintf (stderr, "error accessing the ACLs of file %s\n", file1);
+ fflush (stderr);
+ abort ();
+ }
+ if (count2 < 0)
+ {
+ fprintf (stderr, "error accessing the ACLs of file %s\n", file2);
+ fflush (stderr);
+ abort ();
+ }
+ if (count1 != count2)
+ {
+ fprintf (stderr, "files %s and %s have different number of ACLs: %d and %d\n",
+ file1, file2, count1, count2);
+ return 1;
+ }
+ else
+ {
+ aclent_t *entries1 = XNMALLOC (count1, aclent_t);
+ aclent_t *entries2 = XNMALLOC (count2, aclent_t);
+ int i;
+
+ if (count1 > 0 && acl (file1, GETACL, count1, entries1) < count1)
+ {
+ fprintf (stderr, "error retrieving the ACLs of file %s\n", file1);
+ fflush (stderr);
+ abort ();
+ }
+ if (count2 > 0 && acl (file2, GETACL, count2, entries2) < count1)
+ {
+ fprintf (stderr, "error retrieving the ACLs of file %s\n", file2);
+ fflush (stderr);
+ abort ();
+ }
+ for (i = 0; i < count1; i++)
+ {
+ if (entries1[i].a_type != entries2[i].a_type)
+ {
+ fprintf (stderr, "files %s and %s: different ACL entry #%d: different types %d and %d\n",
+ file1, file2, i, entries1[i].a_type, entries2[i].a_type);
+ return 1;
+ }
+ if (entries1[i].a_id != entries2[i].a_id)
+ {
+ fprintf (stderr, "files %s and %s: different ACL entry #%d: different ids %d and %d\n",
+ file1, file2, i, (int)entries1[i].a_id, (int)entries2[i].a_id);
+ return 1;
+ }
+ if (entries1[i].a_perm != entries2[i].a_perm)
+ {
+ fprintf (stderr, "files %s and %s: different ACL entry #%d: different permissions %03o and %03o\n",
+ file1, file2, i, (unsigned int) entries1[i].a_perm, (unsigned int) entries2[i].a_perm);
+ return 1;
+ }
+ }
+ }
+# ifdef ACE_GETACL
+ count1 = acl (file1, ACE_GETACLCNT, 0, NULL);
+ if (count1 < 0 && errno == EINVAL)
+ count1 = 0;
+ count2 = acl (file2, ACE_GETACLCNT, 0, NULL);
+ if (count2 < 0 && errno == EINVAL)
+ count2 = 0;
+ if (count1 < 0)
+ {
+ fprintf (stderr, "error accessing the ACE-ACLs of file %s\n", file1);
+ fflush (stderr);
+ abort ();
+ }
+ if (count2 < 0)
+ {
+ fprintf (stderr, "error accessing the ACE-ACLs of file %s\n", file2);
+ fflush (stderr);
+ abort ();
+ }
+ {
+ ace_t *entries1 = XNMALLOC (count1, ace_t);
+ ace_t *entries2 = XNMALLOC (count2, ace_t);
+ int ret;
+ int i;
+
+ ret = acl (file1, ACE_GETACL, count1, entries1);
+ if (ret < 0 && errno == EINVAL)
+ count1 = 0;
+ else if (ret < count1)
+ {
+ fprintf (stderr, "error retrieving the ACE-ACLs of file %s\n", file1);
+ fflush (stderr);
+ abort ();
+ }
+ ret = acl (file2, ACE_GETACL, count2, entries2);
+ if (ret < 0 && errno == EINVAL)
+ count2 = 0;
+ else if (ret < count2)
+ {
+ fprintf (stderr, "error retrieving the ACE-ACLs of file %s\n", file2);
+ fflush (stderr);
+ abort ();
+ }
+
+ if (count1 != count2)
+ {
+ fprintf (stderr, "files %s and %s have different number of ACE-ACLs: %d and %d\n",
+ file1, file2, count1, count2);
+ return 1;
+ }
+
+ for (i = 0; i < count1; i++)
+ {
+ if (entries1[i].a_type != entries2[i].a_type)
+ {
+ fprintf (stderr, "files %s and %s: different ACE-ACL entry #%d: different types %d and %d\n",
+ file1, file2, i, entries1[i].a_type, entries2[i].a_type);
+ return 1;
+ }
+ if (entries1[i].a_who != entries2[i].a_who)
+ {
+ fprintf (stderr, "files %s and %s: different ACE-ACL entry #%d: different ids %d and %d\n",
+ file1, file2, i, (int)entries1[i].a_who, (int)entries2[i].a_who);
+ return 1;
+ }
+ if (entries1[i].a_access_mask != entries2[i].a_access_mask)
+ {
+ fprintf (stderr, "files %s and %s: different ACE-ACL entry #%d: different access masks %03o and %03o\n",
+ file1, file2, i, (unsigned int) entries1[i].a_access_mask, (unsigned int) entries2[i].a_access_mask);
+ return 1;
+ }
+ if (entries1[i].a_flags != entries2[i].a_flags)
+ {
+ fprintf (stderr, "files %s and %s: different ACE-ACL entry #%d: different flags 0x%x and 0x%x\n",
+ file1, file2, i, (unsigned int) entries1[i].a_flags, (unsigned int) entries2[i].a_flags);
+ return 1;
+ }
+ }
+ }
+# endif
+#elif HAVE_GETACL /* HP-UX */
+ int count1;
+ int count2;
+
+ count1 = getacl (file1, 0, NULL);
+ if (count1 < 0
+ && (errno == ENOSYS || errno == EOPNOTSUPP || errno == ENOTSUP))
+ count1 = 0;
+ count2 = getacl (file2, 0, NULL);
+ if (count2 < 0
+ && (errno == ENOSYS || errno == EOPNOTSUPP || errno == ENOTSUP))
+ count2 = 0;
+
+ if (count1 < 0)
+ {
+ fprintf (stderr, "error accessing the ACLs of file %s\n", file1);
+ fflush (stderr);
+ abort ();
+ }
+ if (count2 < 0)
+ {
+ fprintf (stderr, "error accessing the ACLs of file %s\n", file2);
+ fflush (stderr);
+ abort ();
+ }
+ if (count1 != count2)
+ {
+ fprintf (stderr, "files %s and %s have different number of ACLs: %d and %d\n",
+ file1, file2, count1, count2);
+ return 1;
+ }
+ else if (count1 > 0)
+ {
+ struct acl_entry *entries1 = XNMALLOC (count1, struct acl_entry);
+ struct acl_entry *entries2 = XNMALLOC (count2, struct acl_entry);
+ int i;
+
+ if (getacl (file1, count1, entries1) < count1)
+ {
+ fprintf (stderr, "error retrieving the ACLs of file %s\n", file1);
+ fflush (stderr);
+ abort ();
+ }
+ if (getacl (file2, count2, entries2) < count1)
+ {
+ fprintf (stderr, "error retrieving the ACLs of file %s\n", file2);
+ fflush (stderr);
+ abort ();
+ }
+ for (i = 0; i < count1; i++)
+ {
+ if (entries1[i].uid != entries2[i].uid)
+ {
+ fprintf (stderr, "files %s and %s: different ACL entry #%d: different uids %d and %d\n",
+ file1, file2, i, (int)entries1[i].uid, (int)entries2[i].uid);
+ return 1;
+ }
+ if (entries1[i].gid != entries2[i].gid)
+ {
+ fprintf (stderr, "files %s and %s: different ACL entry #%d: different gids %d and %d\n",
+ file1, file2, i, (int)entries1[i].gid, (int)entries2[i].gid);
+ return 1;
+ }
+ if (entries1[i].mode != entries2[i].mode)
+ {
+ fprintf (stderr, "files %s and %s: different ACL entry #%d: different permissions %03o and %03o\n",
+ file1, file2, i, (unsigned int) entries1[i].mode, (unsigned int) entries2[i].mode);
+ return 1;
+ }
+ }
+ }
+
+# if HAVE_ACLV_H /* HP-UX >= 11.11 */
+ {
+ struct acl dummy_entries[NACLVENTRIES];
+
+ count1 = acl ((char *) file1, ACL_CNT, NACLVENTRIES, dummy_entries);
+ if (count1 < 0
+ && (errno == ENOSYS || errno == EOPNOTSUPP || errno == EINVAL))
+ count1 = 0;
+ count2 = acl ((char *) file2, ACL_CNT, NACLVENTRIES, dummy_entries);
+ if (count2 < 0
+ && (errno == ENOSYS || errno == EOPNOTSUPP || errno == EINVAL))
+ count2 = 0;
+ }
+
+ if (count1 < 0)
+ {
+ fprintf (stderr, "error accessing the ACLs of file %s\n", file1);
+ fflush (stderr);
+ abort ();
+ }
+ if (count2 < 0)
+ {
+ fprintf (stderr, "error accessing the ACLs of file %s\n", file2);
+ fflush (stderr);
+ abort ();
+ }
+ if (count1 != count2)
+ {
+ fprintf (stderr, "files %s and %s have different number of ACLs: %d and %d\n",
+ file1, file2, count1, count2);
+ return 1;
+ }
+ else if (count1 > 0)
+ {
+ struct acl *entries1 = XNMALLOC (count1, struct acl);
+ struct acl *entries2 = XNMALLOC (count2, struct acl);
+ int i;
+
+ if (acl ((char *) file1, ACL_GET, count1, entries1) < count1)
+ {
+ fprintf (stderr, "error retrieving the ACLs of file %s\n", file1);
+ fflush (stderr);
+ abort ();
+ }
+ if (acl ((char *) file2, ACL_GET, count2, entries2) < count1)
+ {
+ fprintf (stderr, "error retrieving the ACLs of file %s\n", file2);
+ fflush (stderr);
+ abort ();
+ }
+ for (i = 0; i < count1; i++)
+ {
+ if (entries1[i].a_type != entries2[i].a_type)
+ {
+ fprintf (stderr, "files %s and %s: different ACL entry #%d: different types %d and %d\n",
+ file1, file2, i, entries1[i].a_type, entries2[i].a_type);
+ return 1;
+ }
+ if (entries1[i].a_id != entries2[i].a_id)
+ {
+ fprintf (stderr, "files %s and %s: different ACL entry #%d: different ids %d and %d\n",
+ file1, file2, i, (int)entries1[i].a_id, (int)entries2[i].a_id);
+ return 1;
+ }
+ if (entries1[i].a_perm != entries2[i].a_perm)
+ {
+ fprintf (stderr, "files %s and %s: different ACL entry #%d: different permissions %03o and %03o\n",
+ file1, file2, i, (unsigned int) entries1[i].a_perm, (unsigned int) entries2[i].a_perm);
+ return 1;
+ }
+ }
+ }
+# endif
+#elif HAVE_ACLX_GET /* AIX */
+ acl_type_t type1;
+ char acl1[1000];
+ size_t aclsize1 = sizeof (acl1);
+ mode_t mode1;
+ char text1[1000];
+ size_t textsize1 = sizeof (text1);
+ acl_type_t type2;
+ char acl2[1000];
+ size_t aclsize2 = sizeof (acl2);
+ mode_t mode2;
+ char text2[1000];
+ size_t textsize2 = sizeof (text2);
+
+ /* The docs say that type1 being 0 is equivalent to ACL_ANY, but it is not
+ true, in AIX 5.3. */
+ type1.u64 = ACL_ANY;
+ if (aclx_get (file1, 0, &type1, acl1, &aclsize1, &mode1) < 0)
+ {
+ if (errno == ENOSYS)
+ text1[0] = '\0';
+ else
+ {
+ fprintf (stderr, "error accessing the ACLs of file %s\n", file1);
+ fflush (stderr);
+ abort ();
+ }
+ }
+ else
+ if (aclx_printStr (text1, &textsize1, acl1, aclsize1, type1, file1, 0) < 0)
+ {
+ fprintf (stderr, "cannot convert the ACLs of file %s to text\n", file1);
+ fflush (stderr);
+ abort ();
+ }
+
+ /* The docs say that type2 being 0 is equivalent to ACL_ANY, but it is not
+ true, in AIX 5.3. */
+ type2.u64 = ACL_ANY;
+ if (aclx_get (file2, 0, &type2, acl2, &aclsize2, &mode2) < 0)
+ {
+ if (errno == ENOSYS)
+ text2[0] = '\0';
+ else
+ {
+ fprintf (stderr, "error accessing the ACLs of file %s\n", file2);
+ fflush (stderr);
+ abort ();
+ }
+ }
+ else
+ if (aclx_printStr (text2, &textsize2, acl2, aclsize2, type2, file2, 0) < 0)
+ {
+ fprintf (stderr, "cannot convert the ACLs of file %s to text\n", file2);
+ fflush (stderr);
+ abort ();
+ }
+
+ if (strcmp (text1, text2) != 0)
+ {
+ fprintf (stderr, "files %s and %s have different ACLs:\n%s\n%s\n",
+ file1, file2, text1, text2);
+ return 1;
+ }
+#elif HAVE_STATACL /* older AIX */
+ union { struct acl a; char room[4096]; } acl1;
+ union { struct acl a; char room[4096]; } acl2;
+ unsigned int i;
+
+ if (statacl (file1, STX_NORMAL, &acl1.a, sizeof (acl1)) < 0)
+ {
+ fprintf (stderr, "error accessing the ACLs of file %s\n", file1);
+ fflush (stderr);
+ abort ();
+ }
+ if (statacl (file2, STX_NORMAL, &acl2.a, sizeof (acl2)) < 0)
+ {
+ fprintf (stderr, "error accessing the ACLs of file %s\n", file2);
+ fflush (stderr);
+ abort ();
+ }
+
+ if (acl1.a.acl_len != acl2.a.acl_len)
+ {
+ fprintf (stderr, "files %s and %s have different ACL lengths: %u and %u\n",
+ file1, file2, acl1.a.acl_len, acl2.a.acl_len);
+ return 1;
+ }
+ if (acl1.a.acl_mode != acl2.a.acl_mode)
+ {
+ fprintf (stderr, "files %s and %s have different ACL modes: %03o and %03o\n",
+ file1, file2, acl1.a.acl_mode, acl2.a.acl_mode);
+ return 1;
+ }
+ if (acl1.a.u_access != acl2.a.u_access
+ || acl1.a.g_access != acl2.a.g_access
+ || acl1.a.o_access != acl2.a.o_access)
+ {
+ fprintf (stderr, "files %s and %s have different ACL access masks: %03o %03o %03o and %03o %03o %03o\n",
+ file1, file2,
+ acl1.a.u_access, acl1.a.g_access, acl1.a.o_access,
+ acl2.a.u_access, acl2.a.g_access, acl2.a.o_access);
+ return 1;
+ }
+ if (memcmp (acl1.a.acl_ext, acl2.a.acl_ext, acl1.a.acl_len) != 0)
+ {
+ fprintf (stderr, "files %s and %s have different ACL entries\n",
+ file1, file2);
+ return 1;
+ }
+#elif HAVE_ACLSORT /* NonStop Kernel */
+ int count1;
+ int count2;
+
+ count1 = acl ((char *) file1, ACL_CNT, NACLENTRIES, NULL);
+ count2 = acl ((char *) file2, ACL_CNT, NACLENTRIES, NULL);
+
+ if (count1 < 0)
+ {
+ fprintf (stderr, "error accessing the ACLs of file %s\n", file1);
+ fflush (stderr);
+ abort ();
+ }
+ if (count2 < 0)
+ {
+ fprintf (stderr, "error accessing the ACLs of file %s\n", file2);
+ fflush (stderr);
+ abort ();
+ }
+ if (count1 != count2)
+ {
+ fprintf (stderr, "files %s and %s have different number of ACLs: %d and %d\n",
+ file1, file2, count1, count2);
+ return 1;
+ }
+ else if (count1 > 0)
+ {
+ struct acl *entries1 = XNMALLOC (count1, struct acl);
+ struct acl *entries2 = XNMALLOC (count2, struct acl);
+ int i;
+
+ if (acl ((char *) file1, ACL_GET, count1, entries1) < count1)
+ {
+ fprintf (stderr, "error retrieving the ACLs of file %s\n", file1);
+ fflush (stderr);
+ abort ();
+ }
+ if (acl ((char *) file2, ACL_GET, count2, entries2) < count1)
+ {
+ fprintf (stderr, "error retrieving the ACLs of file %s\n", file2);
+ fflush (stderr);
+ abort ();
+ }
+ for (i = 0; i < count1; i++)
+ {
+ if (entries1[i].a_type != entries2[i].a_type)
+ {
+ fprintf (stderr, "files %s and %s: different ACL entry #%d: different types %d and %d\n",
+ file1, file2, i, entries1[i].a_type, entries2[i].a_type);
+ return 1;
+ }
+ if (entries1[i].a_id != entries2[i].a_id)
+ {
+ fprintf (stderr, "files %s and %s: different ACL entry #%d: different ids %d and %d\n",
+ file1, file2, i, (int)entries1[i].a_id, (int)entries2[i].a_id);
+ return 1;
+ }
+ if (entries1[i].a_perm != entries2[i].a_perm)
+ {
+ fprintf (stderr, "files %s and %s: different ACL entry #%d: different permissions %03o and %03o\n",
+ file1, file2, i, (unsigned int) entries1[i].a_perm, (unsigned int) entries2[i].a_perm);
+ return 1;
+ }
+ }
+ }
+#endif
+ }
+
+ return 0;
+}
diff --git a/gnulib-tests/test-set-mode-acl-1.sh b/gnulib-tests/test-set-mode-acl-1.sh
new file mode 100755
index 0000000..68c247c
--- /dev/null
+++ b/gnulib-tests/test-set-mode-acl-1.sh
@@ -0,0 +1,13 @@
+#!/bin/sh
+
+# Test set-mode-acl on the file system of /var/tmp, which usually is a local
+# file system.
+
+if test -d /var/tmp; then
+ TMPDIR=/var/tmp
+else
+ TMPDIR=/tmp
+fi
+export TMPDIR
+
+exec "${srcdir}/test-set-mode-acl.sh"
diff --git a/gnulib-tests/test-set-mode-acl-2.sh b/gnulib-tests/test-set-mode-acl-2.sh
new file mode 100755
index 0000000..d1377df
--- /dev/null
+++ b/gnulib-tests/test-set-mode-acl-2.sh
@@ -0,0 +1,9 @@
+#!/bin/sh
+
+# Test set-mode-acl on the file system of the build directory, which may be
+# a local file system or NFS mounted.
+
+TMPDIR=`pwd`
+export TMPDIR
+
+exec "${srcdir}/test-set-mode-acl.sh"
diff --git a/gnulib-tests/test-set-mode-acl.c b/gnulib-tests/test-set-mode-acl.c
new file mode 100644
index 0000000..d50dbff
--- /dev/null
+++ b/gnulib-tests/test-set-mode-acl.c
@@ -0,0 +1,41 @@
+/* Test of setting an ACL equivalent to a mode.
+ Copyright (C) 2008-2016 Free Software Foundation, Inc.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+/* Written by Bruno Haible <bruno@clisp.org>, 2008. */
+
+#include <config.h>
+
+#include "acl.h"
+
+#include <stdlib.h>
+
+#include "macros.h"
+
+int
+main (int argc, char *argv[])
+{
+ const char *file;
+ int mode;
+
+ ASSERT (argc == 3);
+
+ file = argv[1];
+ mode = strtol (argv[2], NULL, 8);
+
+ set_acl (file, -1, mode);
+
+ return 0;
+}
diff --git a/gnulib-tests/test-set-mode-acl.sh b/gnulib-tests/test-set-mode-acl.sh
new file mode 100755
index 0000000..f0b1641
--- /dev/null
+++ b/gnulib-tests/test-set-mode-acl.sh
@@ -0,0 +1,229 @@
+#!/bin/sh
+
+# Show all commands when run with environment variable VERBOSE=yes.
+test -z "$VERBOSE" || set -x
+
+test "$USE_ACL" = 0 &&
+ {
+ echo "Skipping test: insufficient ACL support"
+ exit 77
+ }
+
+# func_tmpdir
+# creates a temporary directory.
+# Sets variable
+# - tmp pathname of freshly created temporary directory
+func_tmpdir ()
+{
+ # Use the environment variable TMPDIR, falling back to /tmp. This allows
+ # users to specify a different temporary directory, for example, if their
+ # /tmp is filled up or too small.
+ : ${TMPDIR=/tmp}
+ {
+ # Use the mktemp program if available. If not available, hide the error
+ # message.
+ tmp=`(umask 077 && mktemp -d "$TMPDIR/glXXXXXX") 2>/dev/null` &&
+ test -n "$tmp" && test -d "$tmp"
+ } ||
+ {
+ # Use a simple mkdir command. It is guaranteed to fail if the directory
+ # already exists. $RANDOM is bash specific and expands to empty in shells
+ # other than bash, ksh and zsh. Its use does not increase security;
+ # rather, it minimizes the probability of failure in a very cluttered /tmp
+ # directory.
+ tmp=$TMPDIR/gl$$-$RANDOM
+ (umask 077 && mkdir "$tmp")
+ } ||
+ {
+ echo "$0: cannot create a temporary directory in $TMPDIR" >&2
+ exit 1
+ }
+}
+
+func_tmpdir
+builddir=`pwd`
+cd "$builddir" ||
+ {
+ echo "$0: cannot determine build directory (unreadable parent dir?)" >&2
+ exit 1
+ }
+# Switch to a temporary directory, to increase the likelihood that ACLs are
+# supported on the current file system. (/tmp is usually locally mounted,
+# whereas the build dir is sometimes NFS-mounted.)
+( cd "$tmp"
+
+ # Prepare tmpfile0.
+ rm -f tmpfile[0-9]
+ echo "Simple contents" > tmpfile0
+ chmod 600 tmpfile0
+
+ # Classification of the platform according to the programs available for
+ # manipulating ACLs.
+ # Possible values are:
+ # linux, cygwin, freebsd, solaris, hpux, hpuxjfs, osf1, aix, macosx, irix, none.
+ # TODO: Support also native Windows platforms (mingw).
+ acl_flavor=none
+ if (getfacl tmpfile0 >/dev/null) 2>/dev/null; then
+ # Platforms with the getfacl and setfacl programs.
+ # Linux, FreeBSD, Solaris, Cygwin.
+ if (setfacl --help >/dev/null) 2>/dev/null; then
+ # Linux, Cygwin.
+ if (LC_ALL=C setfacl --help | grep ' --set-file' >/dev/null) 2>/dev/null; then
+ # Linux.
+ acl_flavor=linux
+ else
+ acl_flavor=cygwin
+ fi
+ else
+ # FreeBSD, Solaris.
+ if (LC_ALL=C setfacl 2>&1 | grep '\-x entries' >/dev/null) 2>/dev/null; then
+ # FreeBSD.
+ acl_flavor=freebsd
+ else
+ # Solaris.
+ acl_flavor=solaris
+ fi
+ fi
+ else
+ if (lsacl / >/dev/null) 2>/dev/null; then
+ # Platforms with the lsacl and chacl programs.
+ # HP-UX, sometimes also IRIX.
+ if (getacl tmpfile0 >/dev/null) 2>/dev/null; then
+ # HP-UX 11.11 or newer.
+ acl_flavor=hpuxjfs
+ else
+ # HP-UX 11.00.
+ acl_flavor=hpux
+ fi
+ else
+ if (getacl tmpfile0 >/dev/null) 2>/dev/null; then
+ # Tru64, NonStop Kernel.
+ if (getacl -m tmpfile0 >/dev/null) 2>/dev/null; then
+ # Tru64.
+ acl_flavor=osf1
+ else
+ # NonStop Kernel.
+ acl_flavor=nsk
+ fi
+ else
+ if (aclget tmpfile0 >/dev/null) 2>/dev/null; then
+ # AIX.
+ acl_flavor=aix
+ else
+ if (fsaclctl -v >/dev/null) 2>/dev/null; then
+ # Mac OS X.
+ acl_flavor=macosx
+ else
+ if test -f /sbin/chacl; then
+ # IRIX.
+ acl_flavor=irix
+ fi
+ fi
+ fi
+ fi
+ fi
+ fi
+
+ if test $acl_flavor != none; then
+ # A POSIX compliant 'id' program.
+ if test -f /usr/xpg4/bin/id; then
+ ID=/usr/xpg4/bin/id
+ else
+ ID=id
+ fi
+ # Use a user and group id different from the current one, to avoid
+ # redundant/ambiguous ACLs.
+ myuid=`$ID -u`
+ mygid=`$ID -g`
+ auid=1
+ if test "$auid" = "$myuid"; then auid=2; fi
+ agid=1
+ if test "$agid" = "$mygid"; then agid=2; fi
+ fi
+
+ for mode in 700 400 200 100 644 650 605 011 4700 2070; do
+ rm -f tmpfile0 tmpfile1 tmpfile2
+
+ # Prepare a file with no ACL.
+ echo "Anything" > tmpfile0
+ # If a mode is not supported (e.g. 2070 on FreeBSD), we skip testing it.
+ if chmod $mode tmpfile0 2>/dev/null; then
+ modestring0=`ls -l tmpfile0 | dd ibs=1 count=10 2>/dev/null`
+
+ # Prepare a file with no ACL.
+ echo "Some contents" > tmpfile1
+ chmod 600 tmpfile1
+
+ # Try to set the ACL to only the given mode.
+ "$builddir"/test-set-mode-acl${EXEEXT} tmpfile1 $mode
+ # Verify that tmpfile1 has no ACL and has the desired mode.
+ modestring=`ls -l tmpfile1 | dd ibs=1 count=10 2>/dev/null`
+ if test "x$modestring" != "x$modestring0"; then
+ echo "mode = $mode: tmpfile1 has wrong mode: $modestring" 1>&2
+ exit 1
+ fi
+ if test `"$builddir"/test-file-has-acl${EXEEXT} tmpfile1` != no; then
+ echo "mode = $mode: tmpfile1 got an ACL" 1>&2
+ exit 1
+ fi
+
+ if test $acl_flavor != none; then
+
+ # Prepare a file with an ACL.
+ echo "Special contents" > tmpfile2
+ chmod 600 tmpfile2
+ # Set an ACL for a user (or group).
+ case $acl_flavor in
+ linux | freebsd | solaris)
+ setfacl -m user:$auid:1 tmpfile0
+ ;;
+ cygwin)
+ setfacl -m group:0:1 tmpfile0
+ ;;
+ hpux)
+ orig=`lsacl tmpfile0 | sed -e 's/ tmpfile0$//'`
+ chacl -r "${orig}($auid.%,--x)" tmpfile0
+ ;;
+ hpuxjfs)
+ orig=`lsacl tmpfile0 | sed -e 's/ tmpfile0$//'`
+ chacl -r "${orig}($auid.%,--x)" tmpfile0 \
+ || setacl -m user:$auid:1 tmpfile0
+ ;;
+ osf1)
+ setacl -u user:$auid:1 tmpfile0
+ ;;
+ nsk)
+ setacl -m user:$auid:1 tmpfile0
+ ;;
+ aix)
+ { aclget tmpfile0 | sed -e 's/disabled$/enabled/'; echo " permit --x u:$auid"; } | aclput tmpfile0
+ ;;
+ macosx)
+ /bin/chmod +a "user:daemon allow execute" tmpfile0
+ ;;
+ irix)
+ /sbin/chacl user::rw-,group::---,other::---,user:$auid:--x tmpfile0
+ ;;
+ esac
+
+ # Try to set the ACL to only the given mode.
+ "$builddir"/test-set-mode-acl${EXEEXT} tmpfile2 $mode
+ # Verify that tmpfile2 has no ACL and has the desired mode.
+ modestring=`ls -l tmpfile2 | dd ibs=1 count=10 2>/dev/null`
+ if test "x$modestring" != "x$modestring0"; then
+ echo "mode = $mode: tmpfile2 has wrong mode: $modestring" 1>&2
+ exit 1
+ fi
+ if test `"$builddir"/test-file-has-acl${EXEEXT} tmpfile2` != no; then
+ echo "mode = $mode: tmpfile2 still has an ACL" 1>&2
+ exit 1
+ fi
+ fi
+ fi
+ done
+
+ rm -f tmpfile[0-9]
+) || exit 1
+
+rm -rf "$tmp"
+exit 0
diff --git a/gnulib-tests/test-setenv.c b/gnulib-tests/test-setenv.c
new file mode 100644
index 0000000..519dc27
--- /dev/null
+++ b/gnulib-tests/test-setenv.c
@@ -0,0 +1,56 @@
+/* Tests of setenv.
+ Copyright (C) 2009-2016 Free Software Foundation, Inc.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+/* Written by Eric Blake <ebb9@byu.net>, 2009. */
+
+#include <config.h>
+
+#include <stdlib.h>
+
+#include "signature.h"
+SIGNATURE_CHECK (setenv, int, (char const *, char const *, int));
+
+#include <errno.h>
+#include <string.h>
+#include <unistd.h>
+
+#include "macros.h"
+
+int
+main (void)
+{
+ /* Test overwriting. */
+ ASSERT (setenv ("a", "==", -1) == 0);
+ ASSERT (setenv ("a", "2", 0) == 0);
+ ASSERT (strcmp (getenv ("a"), "==") == 0);
+
+ /* Required to fail with EINVAL. */
+ errno = 0;
+ ASSERT (setenv ("", "", 1) == -1);
+ ASSERT (errno == EINVAL);
+ errno = 0;
+ ASSERT (setenv ("a=b", "", 0) == -1);
+ ASSERT (errno == EINVAL);
+#if 0
+ /* glibc and gnulib's implementation guarantee this, but POSIX no
+ longer requires it: http://austingroupbugs.net/view.php?id=185 */
+ errno = 0;
+ ASSERT (setenv (NULL, "", 0) == -1);
+ ASSERT (errno == EINVAL);
+#endif
+
+ return 0;
+}
diff --git a/gnulib-tests/test-setlocale1.c b/gnulib-tests/test-setlocale1.c
new file mode 100644
index 0000000..143c0d8
--- /dev/null
+++ b/gnulib-tests/test-setlocale1.c
@@ -0,0 +1,61 @@
+/* Test of setting the current locale.
+ Copyright (C) 2011-2016 Free Software Foundation, Inc.
+
+ This 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 <locale.h>
+
+#include "signature.h"
+SIGNATURE_CHECK (setlocale, char *, (int, const char *));
+
+#include <stdlib.h>
+#include <string.h>
+
+#include "macros.h"
+
+int
+main (int argc, char *argv[])
+{
+ char *name1;
+ char *name2;
+
+ /* Try to set the locale by implicitly looking at the LC_ALL environment
+ variable.
+ configure should already have checked that the locale is supported. */
+ if (setlocale (LC_ALL, "") == NULL)
+ return 1;
+
+ name1 = strdup (setlocale (LC_ALL, NULL));
+
+ /* Reset the locale. */
+ if (setlocale (LC_ALL, "C") == NULL)
+ return 1;
+
+ /* Try to set the locale by explicitly looking at the LC_ALL environment
+ variable.
+ configure should already have checked that the locale is supported. */
+ if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL)
+ return 1;
+
+ name2 = strdup (setlocale (LC_ALL, NULL));
+
+ /* Test that the two results are the same. */
+ ASSERT (strcmp (name1, name2) == 0);
+ free (name1);
+ free (name2);
+
+ return 0;
+}
diff --git a/gnulib-tests/test-setlocale1.sh b/gnulib-tests/test-setlocale1.sh
new file mode 100755
index 0000000..59a0532
--- /dev/null
+++ b/gnulib-tests/test-setlocale1.sh
@@ -0,0 +1,34 @@
+#!/bin/sh
+
+: ${LOCALE_FR=fr_FR}
+: ${LOCALE_FR_UTF8=fr_FR.UTF-8}
+: ${LOCALE_JA=ja_JP}
+: ${LOCALE_ZH_CN=zh_CN.GB18030}
+
+if test $LOCALE_FR = none && test $LOCALE_FR_UTF8 = none \
+ && test $LOCALE_JA = none && test $LOCALE_ZH_CN = none; then
+ if test -f /usr/bin/localedef; then
+ echo "Skipping test: no locale for testing is installed"
+ else
+ echo "Skipping test: no locale for testing is supported"
+ fi
+ exit 77
+fi
+
+if test $LOCALE_FR != none; then
+ LC_ALL=$LOCALE_FR ./test-setlocale1${EXEEXT} || exit 1
+fi
+
+if test $LOCALE_FR_UTF8 != none; then
+ LC_ALL=$LOCALE_FR_UTF8 ./test-setlocale1${EXEEXT} || exit 1
+fi
+
+if test $LOCALE_JA != none; then
+ LC_ALL=$LOCALE_JA ./test-setlocale1${EXEEXT} || exit 1
+fi
+
+if test $LOCALE_ZH_CN != none; then
+ LC_ALL=$LOCALE_ZH_CN ./test-setlocale1${EXEEXT} || exit 1
+fi
+
+exit 0
diff --git a/gnulib-tests/test-setlocale2.c b/gnulib-tests/test-setlocale2.c
new file mode 100644
index 0000000..52e65d8
--- /dev/null
+++ b/gnulib-tests/test-setlocale2.c
@@ -0,0 +1,55 @@
+/* Test of setting the current locale.
+ Copyright (C) 2011-2016 Free Software Foundation, Inc.
+
+ This 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 <locale.h>
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+
+int
+main ()
+{
+ /* Try to set the locale by implicitly looking at the LC_ALL environment
+ variable. */
+ if (setlocale (LC_ALL, "") != NULL)
+ /* It was successful. Check whether LC_CTYPE is non-trivial. */
+ if (strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
+ {
+ fprintf (stderr, "setlocale did not fail for implicit %s\n",
+ getenv ("LC_ALL"));
+ return 1;
+ }
+
+ /* Reset the locale. */
+ if (setlocale (LC_ALL, "C") == NULL)
+ return 1;
+
+ /* Try to set the locale by explicitly looking at the LC_ALL environment
+ variable. */
+ if (setlocale (LC_ALL, getenv ("LC_ALL")) != NULL)
+ /* It was successful. Check whether LC_CTYPE is non-trivial. */
+ if (strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
+ {
+ fprintf (stderr, "setlocale did not fail for explicit %s\n",
+ getenv ("LC_ALL"));
+ return 1;
+ }
+
+ return 0;
+}
diff --git a/gnulib-tests/test-setlocale2.sh b/gnulib-tests/test-setlocale2.sh
new file mode 100755
index 0000000..904e147
--- /dev/null
+++ b/gnulib-tests/test-setlocale2.sh
@@ -0,0 +1,17 @@
+#!/bin/sh
+
+# Test locale names with likely unsupported encoding in Unix syntax.
+for name in ar_SA.ISO-8859-1 fr_FR.CP1251 zh_TW.GB18030 zh_CN.BIG5; do
+ env LC_ALL=$name ./test-setlocale2${EXEEXT} 1 || exit 1
+done
+
+# Test locale names with likely unsupported encoding in native Windows syntax.
+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.
+ env LC_ALL="$name" ./test-setlocale2${EXEEXT} 1 || exit 1
+done
+
+exit 0
diff --git a/gnulib-tests/test-stat.c b/gnulib-tests/test-stat.c
new file mode 100644
index 0000000..4510e59
--- /dev/null
+++ b/gnulib-tests/test-stat.c
@@ -0,0 +1,56 @@
+/* Tests of stat.
+ Copyright (C) 2009-2016 Free Software Foundation, Inc.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+/* Written by Eric Blake <ebb9@byu.net>, 2009. */
+
+#include <config.h>
+
+#include <sys/stat.h>
+
+/* Caution: stat may be a function-like macro. Although this
+ signature check must pass, it may be the signature of the real (and
+ broken) stat rather than rpl_stat. Most code should not use the
+ address of stat. */
+#include "signature.h"
+SIGNATURE_CHECK (stat, int, (char const *, struct stat *));
+
+#include <fcntl.h>
+#include <errno.h>
+#include <stdbool.h>
+#include <stdlib.h>
+#include <stdio.h>
+#include <unistd.h>
+
+#include "same-inode.h"
+#include "macros.h"
+
+#define BASE "test-stat.t"
+
+#include "test-stat.h"
+
+/* Wrapper around stat, which works even if stat is a function-like
+ macro, where test_stat_func(stat) would do the wrong thing. */
+static int
+do_stat (char const *name, struct stat *st)
+{
+ return stat (name, st);
+}
+
+int
+main (void)
+{
+ return test_stat_func (do_stat, true);
+}
diff --git a/gnulib-tests/test-stat.h b/gnulib-tests/test-stat.h
new file mode 100644
index 0000000..4cf6c6d
--- /dev/null
+++ b/gnulib-tests/test-stat.h
@@ -0,0 +1,101 @@
+/* Tests of stat.
+ Copyright (C) 2009-2016 Free Software Foundation, Inc.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+/* Written by Eric Blake <ebb9@byu.net>, 2009. */
+
+/* This file is designed to test both stat(n,buf) and
+ fstatat(AT_FDCWD,n,buf,0). FUNC is the function to test. Assumes
+ that BASE and ASSERT are already defined, and that appropriate
+ headers are already included. If PRINT, warn before skipping
+ symlink tests with status 77. */
+
+static int
+test_stat_func (int (*func) (char const *, struct stat *), bool print)
+{
+ struct stat st1;
+ struct stat st2;
+ char *cwd = getcwd (NULL, 0);
+
+ ASSERT (cwd);
+ ASSERT (func (".", &st1) == 0);
+ ASSERT (func ("./", &st2) == 0);
+ ASSERT (SAME_INODE (st1, st2));
+ ASSERT (func (cwd, &st2) == 0);
+ ASSERT (SAME_INODE (st1, st2));
+ ASSERT (func ("/", &st1) == 0);
+ ASSERT (func ("///", &st2) == 0);
+ ASSERT (SAME_INODE (st1, st2));
+
+ errno = 0;
+ ASSERT (func ("", &st1) == -1);
+ ASSERT (errno == ENOENT);
+ errno = 0;
+ ASSERT (func ("nosuch", &st1) == -1);
+ ASSERT (errno == ENOENT);
+ errno = 0;
+ ASSERT (func ("nosuch/", &st1) == -1);
+ ASSERT (errno == ENOENT);
+
+ ASSERT (close (creat (BASE "file", 0600)) == 0);
+ ASSERT (func (BASE "file", &st1) == 0);
+ errno = 0;
+ ASSERT (func (BASE "file/", &st1) == -1);
+ ASSERT (errno == ENOTDIR);
+
+ /* Now for some symlink tests, where supported. We set up:
+ link1 -> directory
+ link2 -> file
+ link3 -> dangling
+ link4 -> loop
+ then test behavior with trailing slash.
+ */
+ if (symlink (".", BASE "link1") != 0)
+ {
+ ASSERT (unlink (BASE "file") == 0);
+ if (print)
+ fputs ("skipping test: symlinks not supported on this file system\n",
+ stderr);
+ return 77;
+ }
+ ASSERT (symlink (BASE "file", BASE "link2") == 0);
+ ASSERT (symlink (BASE "nosuch", BASE "link3") == 0);
+ ASSERT (symlink (BASE "link4", BASE "link4") == 0);
+
+ ASSERT (func (BASE "link1/", &st1) == 0);
+ ASSERT (S_ISDIR (st1.st_mode));
+
+ errno = 0;
+ ASSERT (func (BASE "link2/", &st1) == -1);
+ ASSERT (errno == ENOTDIR);
+
+ errno = 0;
+ ASSERT (func (BASE "link3/", &st1) == -1);
+ ASSERT (errno == ENOENT);
+
+ errno = 0;
+ ASSERT (func (BASE "link4/", &st1) == -1);
+ ASSERT (errno == ELOOP);
+
+ /* Cleanup. */
+ ASSERT (unlink (BASE "file") == 0);
+ ASSERT (unlink (BASE "link1") == 0);
+ ASSERT (unlink (BASE "link2") == 0);
+ ASSERT (unlink (BASE "link3") == 0);
+ ASSERT (unlink (BASE "link4") == 0);
+ free (cwd);
+
+ return 0;
+}
diff --git a/gnulib-tests/test-stdalign.c b/gnulib-tests/test-stdalign.c
new file mode 100644
index 0000000..0f240c5
--- /dev/null
+++ b/gnulib-tests/test-stdalign.c
@@ -0,0 +1,116 @@
+/* Test of <stdalign.h>.
+ Copyright 2009-2016 Free Software Foundation, Inc.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+/* Written by Paul Eggert, inspired by Bruno Haible's test-alignof.c. */
+
+#include <config.h>
+
+#include <stdalign.h>
+
+#include <stddef.h>
+#include <stdint.h>
+
+#include "verify.h"
+
+#include "macros.h"
+
+typedef long double longdouble;
+typedef struct { char a[1]; } struct1;
+typedef struct { char a[2]; } struct2;
+typedef struct { char a[3]; } struct3;
+typedef struct { char a[4]; } struct4;
+
+verify (__alignof_is_defined == 1);
+#ifndef alignof
+# error "alignof is not a macro"
+#endif
+
+#if __alignas_is_defined
+verify (__alignas_is_defined == 1);
+# ifndef alignas
+# error "alignas is not a macro"
+# endif
+/* mingw can go up only to 8. 8 is all that GNU Emacs needs, so let's
+ limit the test to 8 for now. */
+# define TEST_ALIGNMENT 8
+#else
+# define _Alignas(alignment)
+# define alignas(alignment)
+# define TEST_ALIGNMENT 1
+#endif
+
+#define CHECK_STATIC(type) \
+ typedef struct { char slot1; type slot2; } type##_helper; \
+ verify (alignof (type) == offsetof (type##_helper, slot2)); \
+ verify (_Alignof (type) == alignof (type)); \
+ const int type##_alignment = alignof (type); \
+ type alignas (TEST_ALIGNMENT) static_##type##_alignas; \
+ type _Alignas (TEST_ALIGNMENT) static_##type##_Alignas
+
+#define CHECK_ALIGNED(var) ASSERT ((uintptr_t) &(var) % TEST_ALIGNMENT == 0)
+
+CHECK_STATIC (char);
+CHECK_STATIC (short);
+CHECK_STATIC (int);
+CHECK_STATIC (long);
+#ifdef INT64_MAX
+CHECK_STATIC (int64_t);
+#endif
+CHECK_STATIC (float);
+CHECK_STATIC (double);
+/* CHECK_STATIC (longdouble); */
+CHECK_STATIC (struct1);
+CHECK_STATIC (struct2);
+CHECK_STATIC (struct3);
+CHECK_STATIC (struct4);
+
+int
+main ()
+{
+#if defined __SUNPRO_C
+ /* Avoid a test failure due to Sun Studio Developer Bug Report #2125432. */
+ fputs ("Skipping test: known Sun C compiler bug\n", stderr);
+ return 77;
+#else
+ CHECK_ALIGNED (static_char_alignas);
+ CHECK_ALIGNED (static_char_Alignas);
+ CHECK_ALIGNED (static_short_alignas);
+ CHECK_ALIGNED (static_short_Alignas);
+ CHECK_ALIGNED (static_int_alignas);
+ CHECK_ALIGNED (static_int_Alignas);
+ CHECK_ALIGNED (static_long_alignas);
+ CHECK_ALIGNED (static_long_Alignas);
+# ifdef INT64_MAX
+ CHECK_ALIGNED (static_int64_t_alignas);
+ CHECK_ALIGNED (static_int64_t_Alignas);
+# endif
+ CHECK_ALIGNED (static_float_alignas);
+ CHECK_ALIGNED (static_float_Alignas);
+ CHECK_ALIGNED (static_double_alignas);
+ CHECK_ALIGNED (static_double_Alignas);
+ /* CHECK_ALIGNED (static_longdouble_alignas); */
+ /* CHECK_ALIGNED (static_longdouble_Alignas); */
+ CHECK_ALIGNED (static_struct1_alignas);
+ CHECK_ALIGNED (static_struct1_Alignas);
+ CHECK_ALIGNED (static_struct2_alignas);
+ CHECK_ALIGNED (static_struct2_Alignas);
+ CHECK_ALIGNED (static_struct3_alignas);
+ CHECK_ALIGNED (static_struct3_Alignas);
+ CHECK_ALIGNED (static_struct4_alignas);
+ CHECK_ALIGNED (static_struct4_Alignas);
+ return 0;
+#endif
+}
diff --git a/gnulib-tests/test-stdbool.c b/gnulib-tests/test-stdbool.c
new file mode 100644
index 0000000..45dc837
--- /dev/null
+++ b/gnulib-tests/test-stdbool.c
@@ -0,0 +1,118 @@
+/* Test of <stdbool.h> substitute.
+ Copyright (C) 2002-2007, 2009-2016 Free Software Foundation, Inc.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+/* Written by Bruno Haible <bruno@clisp.org>, 2007. */
+
+/* We want this test to succeed even when using gcc's -Werror; but to
+ do that requires a pragma that didn't exist before 4.3.0. */
+#ifndef __GNUC__
+# define ADDRESS_CHECK_OKAY
+#elif __GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ < 3)
+/* No way to silence -Waddress. */
+#else
+# pragma GCC diagnostic ignored "-Waddress"
+# define ADDRESS_CHECK_OKAY
+#endif
+
+#include <config.h>
+
+#include <stdbool.h>
+
+#ifndef bool
+ "error: bool is not defined"
+#endif
+#ifndef false
+ "error: false is not defined"
+#endif
+#if false
+ "error: false is not 0"
+#endif
+#ifndef true
+ "error: true is not defined"
+#endif
+#if true != 1
+ "error: true is not 1"
+#endif
+#ifndef __bool_true_false_are_defined
+ "error: __bool_true_false_are_defined is not defined"
+#endif
+
+/* Several tests cannot be guaranteed with gnulib's <stdbool.h>, at
+ least, not for all compilers and compiler options. */
+#if HAVE_STDBOOL_H || 3 <= __GNUC__
+struct s { _Bool s: 1; _Bool t; } s;
+#endif
+
+char a[true == 1 ? 1 : -1];
+char b[false == 0 ? 1 : -1];
+char c[__bool_true_false_are_defined == 1 ? 1 : -1];
+#if HAVE_STDBOOL_H || 3 <= __GNUC__ /* See above. */
+char d[(bool) 0.5 == true ? 1 : -1];
+# ifdef ADDRESS_CHECK_OKAY /* Avoid gcc warning. */
+/* C99 may plausibly be interpreted as not requiring support for a cast from
+ a variable's address to bool in a static initializer. So treat it like a
+ GCC extension. */
+# ifdef __GNUC__
+bool e = &s;
+# endif
+# endif
+char f[(_Bool) 0.0 == false ? 1 : -1];
+#endif
+char g[true];
+char h[sizeof (_Bool)];
+#if HAVE_STDBOOL_H || 3 <= __GNUC__ /* See above. */
+char i[sizeof s.t];
+#endif
+enum { j = false, k = true, l = false * true, m = true * 256 };
+_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
+ */
+_Bool q = true;
+_Bool *pq = &q;
+
+int
+main ()
+{
+ int error = 0;
+
+#if HAVE_STDBOOL_H || 3 <= __GNUC__ /* See above. */
+# ifdef ADDRESS_CHECK_OKAY /* Avoid gcc warning. */
+ /* A cast from a variable's address to bool is valid in expressions. */
+ {
+ bool e1 = &s;
+ if (!e1)
+ error = 1;
+ }
+# endif
+#endif
+
+ /* 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
+ This is a runtime test, since a corresponding compile-time
+ test would rely on initializer extensions. */
+ {
+ char digs[] = "0123456789";
+ if (&(digs + 5)[-2 + (bool) 1] != &digs[4])
+ error = 1;
+ }
+
+ return error;
+}
diff --git a/gnulib-tests/test-stddef.c b/gnulib-tests/test-stddef.c
new file mode 100644
index 0000000..bfb72a0
--- /dev/null
+++ b/gnulib-tests/test-stddef.c
@@ -0,0 +1,73 @@
+/* Test of <stddef.h> substitute.
+ Copyright (C) 2009-2016 Free Software Foundation, Inc.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+/* Written by Eric Blake <ebb9@byu.net>, 2009. */
+
+#include <config.h>
+
+#include <stddef.h>
+#include <stdalign.h>
+#include "verify.h"
+
+/* Check that appropriate types are defined. */
+wchar_t a = 'c';
+ptrdiff_t b = 1;
+size_t c = 2;
+max_align_t x;
+
+/* Check that NULL can be passed through varargs as a pointer type,
+ per POSIX 2008. */
+verify (sizeof NULL == sizeof (void *));
+
+/* Check that offsetof produces integer constants with correct type. */
+struct d
+{
+ char e;
+ char f;
+};
+/* Solaris 10 has a bug where offsetof is under-parenthesized, and
+ cannot be used as an arbitrary expression. However, since it is
+ 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);
+
+/* Check max_align_t's alignment. */
+verify (alignof (double) <= alignof (max_align_t));
+verify (alignof (int) <= alignof (max_align_t));
+verify (alignof (long double) <= alignof (max_align_t));
+verify (alignof (long int) <= alignof (max_align_t));
+verify (alignof (ptrdiff_t) <= alignof (max_align_t));
+verify (alignof (size_t) <= alignof (max_align_t));
+verify (alignof (wchar_t) <= alignof (max_align_t));
+verify (alignof (struct d) <= alignof (max_align_t));
+#if defined __GNUC__ || defined __IBM__ALIGNOF__
+verify (__alignof__ (double) <= __alignof__ (max_align_t));
+verify (__alignof__ (int) <= __alignof__ (max_align_t));
+verify (__alignof__ (long double) <= __alignof__ (max_align_t));
+verify (__alignof__ (long int) <= __alignof__ (max_align_t));
+verify (__alignof__ (ptrdiff_t) <= __alignof__ (max_align_t));
+verify (__alignof__ (size_t) <= __alignof__ (max_align_t));
+verify (__alignof__ (wchar_t) <= __alignof__ (max_align_t));
+verify (__alignof__ (struct d) <= __alignof__ (max_align_t));
+#endif
+
+int
+main (void)
+{
+ return 0;
+}
diff --git a/gnulib-tests/test-stdint.c b/gnulib-tests/test-stdint.c
new file mode 100644
index 0000000..6eb1d2e
--- /dev/null
+++ b/gnulib-tests/test-stdint.c
@@ -0,0 +1,426 @@
+/* Test of <stdint.h> substitute.
+ Copyright (C) 2006-2016 Free Software Foundation, Inc.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+/* Written by Bruno Haible <bruno@clisp.org>, 2006. */
+
+#include <config.h>
+
+/* Whether to enable pedantic checks. */
+#define DO_PEDANTIC 0
+
+#include <stdint.h>
+
+#include "verify.h"
+#include "intprops.h"
+
+#if __GNUC__ >= 2 && DO_PEDANTIC
+# define verify_same_types(expr1,expr2) \
+ extern void _verify_func(__LINE__) (__typeof__ (expr1) *); \
+ extern void _verify_func(__LINE__) (__typeof__ (expr2) *);
+# define _verify_func(line) _verify_func2(line)
+# define _verify_func2(line) verify_func_ ## line
+#else
+# define verify_same_types(expr1,expr2) extern void verify_func (int)
+#endif
+
+/* 7.18.1.1. Exact-width integer types */
+/* 7.18.2.1. Limits of exact-width integer types */
+
+int8_t a1[3] = { INT8_C (17), INT8_MIN, INT8_MAX };
+verify (TYPE_MINIMUM (int8_t) == INT8_MIN);
+verify (TYPE_MAXIMUM (int8_t) == INT8_MAX);
+verify_same_types (INT8_MIN, (int8_t) 0 + 0);
+verify_same_types (INT8_MAX, (int8_t) 0 + 0);
+
+int16_t a2[3] = { INT16_C (17), INT16_MIN, INT16_MAX };
+verify (TYPE_MINIMUM (int16_t) == INT16_MIN);
+verify (TYPE_MAXIMUM (int16_t) == INT16_MAX);
+verify_same_types (INT16_MIN, (int16_t) 0 + 0);
+verify_same_types (INT16_MAX, (int16_t) 0 + 0);
+
+int32_t a3[3] = { INT32_C (17), INT32_MIN, INT32_MAX };
+verify (TYPE_MINIMUM (int32_t) == INT32_MIN);
+verify (TYPE_MAXIMUM (int32_t) == INT32_MAX);
+verify_same_types (INT32_MIN, (int32_t) 0 + 0);
+verify_same_types (INT32_MAX, (int32_t) 0 + 0);
+
+#ifdef INT64_MAX
+int64_t a4[3] = { INT64_C (17), INT64_MIN, INT64_MAX };
+verify (TYPE_MINIMUM (int64_t) == INT64_MIN);
+verify (TYPE_MAXIMUM (int64_t) == INT64_MAX);
+verify_same_types (INT64_MIN, (int64_t) 0 + 0);
+verify_same_types (INT64_MAX, (int64_t) 0 + 0);
+#endif
+
+uint8_t b1[2] = { UINT8_C (17), UINT8_MAX };
+verify (TYPE_MAXIMUM (uint8_t) == UINT8_MAX);
+verify_same_types (UINT8_MAX, (uint8_t) 0 + 0);
+
+uint16_t b2[2] = { UINT16_C (17), UINT16_MAX };
+verify (TYPE_MAXIMUM (uint16_t) == UINT16_MAX);
+verify_same_types (UINT16_MAX, (uint16_t) 0 + 0);
+
+uint32_t b3[2] = { UINT32_C (17), UINT32_MAX };
+verify (TYPE_MAXIMUM (uint32_t) == UINT32_MAX);
+verify_same_types (UINT32_MAX, (uint32_t) 0 + 0);
+
+#ifdef UINT64_MAX
+uint64_t b4[2] = { UINT64_C (17), UINT64_MAX };
+verify (TYPE_MAXIMUM (uint64_t) == UINT64_MAX);
+verify_same_types (UINT64_MAX, (uint64_t) 0 + 0);
+#endif
+
+#if INT8_MIN && INT8_MAX && INT16_MIN && INT16_MAX && INT32_MIN && INT32_MAX
+/* ok */
+#else
+err or;
+#endif
+
+#if UINT8_MAX && UINT16_MAX && UINT32_MAX
+/* ok */
+#else
+err or;
+#endif
+
+/* 7.18.1.2. Minimum-width integer types */
+/* 7.18.2.2. Limits of minimum-width integer types */
+
+int_least8_t c1[3] = { 17, INT_LEAST8_MIN, INT_LEAST8_MAX };
+verify (TYPE_MINIMUM (int_least8_t) == INT_LEAST8_MIN);
+verify (TYPE_MAXIMUM (int_least8_t) == INT_LEAST8_MAX);
+verify_same_types (INT_LEAST8_MIN, (int_least8_t) 0 + 0);
+verify_same_types (INT_LEAST8_MAX, (int_least8_t) 0 + 0);
+
+int_least16_t c2[3] = { 17, INT_LEAST16_MIN, INT_LEAST16_MAX };
+verify (TYPE_MINIMUM (int_least16_t) == INT_LEAST16_MIN);
+verify (TYPE_MAXIMUM (int_least16_t) == INT_LEAST16_MAX);
+verify_same_types (INT_LEAST16_MIN, (int_least16_t) 0 + 0);
+verify_same_types (INT_LEAST16_MAX, (int_least16_t) 0 + 0);
+
+int_least32_t c3[3] = { 17, INT_LEAST32_MIN, INT_LEAST32_MAX };
+verify (TYPE_MINIMUM (int_least32_t) == INT_LEAST32_MIN);
+verify (TYPE_MAXIMUM (int_least32_t) == INT_LEAST32_MAX);
+verify_same_types (INT_LEAST32_MIN, (int_least32_t) 0 + 0);
+verify_same_types (INT_LEAST32_MAX, (int_least32_t) 0 + 0);
+
+#ifdef INT_LEAST64_MAX
+int_least64_t c4[3] = { 17, INT_LEAST64_MIN, INT_LEAST64_MAX };
+verify (TYPE_MINIMUM (int_least64_t) == INT_LEAST64_MIN);
+verify (TYPE_MAXIMUM (int_least64_t) == INT_LEAST64_MAX);
+verify_same_types (INT_LEAST64_MIN, (int_least64_t) 0 + 0);
+verify_same_types (INT_LEAST64_MAX, (int_least64_t) 0 + 0);
+#endif
+
+uint_least8_t d1[2] = { 17, UINT_LEAST8_MAX };
+verify (TYPE_MAXIMUM (uint_least8_t) == UINT_LEAST8_MAX);
+verify_same_types (UINT_LEAST8_MAX, (uint_least8_t) 0 + 0);
+
+uint_least16_t d2[2] = { 17, UINT_LEAST16_MAX };
+verify (TYPE_MAXIMUM (uint_least16_t) == UINT_LEAST16_MAX);
+verify_same_types (UINT_LEAST16_MAX, (uint_least16_t) 0 + 0);
+
+uint_least32_t d3[2] = { 17, UINT_LEAST32_MAX };
+verify (TYPE_MAXIMUM (uint_least32_t) == UINT_LEAST32_MAX);
+verify_same_types (UINT_LEAST32_MAX, (uint_least32_t) 0 + 0);
+
+#ifdef UINT_LEAST64_MAX
+uint_least64_t d4[2] = { 17, UINT_LEAST64_MAX };
+verify (TYPE_MAXIMUM (uint_least64_t) == UINT_LEAST64_MAX);
+verify_same_types (UINT_LEAST64_MAX, (uint_least64_t) 0 + 0);
+#endif
+
+#if INT_LEAST8_MIN && INT_LEAST8_MAX && INT_LEAST16_MIN && INT_LEAST16_MAX && INT_LEAST32_MIN && INT_LEAST32_MAX
+/* ok */
+#else
+err or;
+#endif
+
+#if UINT_LEAST8_MAX && UINT_LEAST16_MAX && UINT_LEAST32_MAX
+/* ok */
+#else
+err or;
+#endif
+
+/* 7.18.1.3. Fastest minimum-width integer types */
+/* 7.18.2.3. Limits of fastest minimum-width integer types */
+
+int_fast8_t e1[3] = { 17, INT_FAST8_MIN, INT_FAST8_MAX };
+verify (TYPE_MINIMUM (int_fast8_t) == INT_FAST8_MIN);
+verify (TYPE_MAXIMUM (int_fast8_t) == INT_FAST8_MAX);
+verify_same_types (INT_FAST8_MIN, (int_fast8_t) 0 + 0);
+verify_same_types (INT_FAST8_MAX, (int_fast8_t) 0 + 0);
+
+int_fast16_t e2[3] = { 17, INT_FAST16_MIN, INT_FAST16_MAX };
+verify (TYPE_MINIMUM (int_fast16_t) == INT_FAST16_MIN);
+verify (TYPE_MAXIMUM (int_fast16_t) == INT_FAST16_MAX);
+verify_same_types (INT_FAST16_MIN, (int_fast16_t) 0 + 0);
+verify_same_types (INT_FAST16_MAX, (int_fast16_t) 0 + 0);
+
+int_fast32_t e3[3] = { 17, INT_FAST32_MIN, INT_FAST32_MAX };
+verify (TYPE_MINIMUM (int_fast32_t) == INT_FAST32_MIN);
+verify (TYPE_MAXIMUM (int_fast32_t) == INT_FAST32_MAX);
+verify_same_types (INT_FAST32_MIN, (int_fast32_t) 0 + 0);
+verify_same_types (INT_FAST32_MAX, (int_fast32_t) 0 + 0);
+
+#ifdef INT_FAST64_MAX
+int_fast64_t e4[3] = { 17, INT_FAST64_MIN, INT_FAST64_MAX };
+verify (TYPE_MINIMUM (int_fast64_t) == INT_FAST64_MIN);
+verify (TYPE_MAXIMUM (int_fast64_t) == INT_FAST64_MAX);
+verify_same_types (INT_FAST64_MIN, (int_fast64_t) 0 + 0);
+verify_same_types (INT_FAST64_MAX, (int_fast64_t) 0 + 0);
+#endif
+
+uint_fast8_t f1[2] = { 17, UINT_FAST8_MAX };
+verify (TYPE_MAXIMUM (uint_fast8_t) == UINT_FAST8_MAX);
+verify_same_types (UINT_FAST8_MAX, (uint_fast8_t) 0 + 0);
+
+uint_fast16_t f2[2] = { 17, UINT_FAST16_MAX };
+verify (TYPE_MAXIMUM (uint_fast16_t) == UINT_FAST16_MAX);
+verify_same_types (UINT_FAST16_MAX, (uint_fast16_t) 0 + 0);
+
+uint_fast32_t f3[2] = { 17, UINT_FAST32_MAX };
+verify (TYPE_MAXIMUM (uint_fast32_t) == UINT_FAST32_MAX);
+verify_same_types (UINT_FAST32_MAX, (uint_fast32_t) 0 + 0);
+
+#ifdef UINT_FAST64_MAX
+uint_fast64_t f4[2] = { 17, UINT_FAST64_MAX };
+verify (TYPE_MAXIMUM (uint_fast64_t) == UINT_FAST64_MAX);
+verify_same_types (UINT_FAST64_MAX, (uint_fast64_t) 0 + 0);
+#endif
+
+#if INT_FAST8_MIN && INT_FAST8_MAX && INT_FAST16_MIN && INT_FAST16_MAX && INT_FAST32_MIN && INT_FAST32_MAX
+/* ok */
+#else
+err or;
+#endif
+
+#if UINT_FAST8_MAX && UINT_FAST16_MAX && UINT_FAST32_MAX
+/* ok */
+#else
+err or;
+#endif
+
+/* 7.18.1.4. Integer types capable of holding object pointers */
+/* 7.18.2.4. Limits of integer types capable of holding object pointers */
+
+intptr_t g[3] = { 17, INTPTR_MIN, INTPTR_MAX };
+verify (TYPE_MINIMUM (intptr_t) == INTPTR_MIN);
+verify (TYPE_MAXIMUM (intptr_t) == INTPTR_MAX);
+verify_same_types (INTPTR_MIN, (intptr_t) 0 + 0);
+verify_same_types (INTPTR_MAX, (intptr_t) 0 + 0);
+
+uintptr_t h[2] = { 17, UINTPTR_MAX };
+verify (TYPE_MAXIMUM (uintptr_t) == UINTPTR_MAX);
+verify_same_types (UINTPTR_MAX, (uintptr_t) 0 + 0);
+
+#if INTPTR_MIN && INTPTR_MAX && UINTPTR_MAX
+/* ok */
+#else
+err or;
+#endif
+
+/* 7.18.1.5. Greatest-width integer types */
+/* 7.18.2.5. Limits of greatest-width integer types */
+
+intmax_t i[3] = { INTMAX_C (17), INTMAX_MIN, INTMAX_MAX };
+verify (TYPE_MINIMUM (intmax_t) == INTMAX_MIN);
+verify (TYPE_MAXIMUM (intmax_t) == INTMAX_MAX);
+verify_same_types (INTMAX_MIN, (intmax_t) 0 + 0);
+verify_same_types (INTMAX_MAX, (intmax_t) 0 + 0);
+
+uintmax_t j[2] = { UINTMAX_C (17), UINTMAX_MAX };
+verify (TYPE_MAXIMUM (uintmax_t) == UINTMAX_MAX);
+verify_same_types (UINTMAX_MAX, (uintmax_t) 0 + 0);
+
+/* As of 2007, Sun C and HP-UX 10.20 cc don't support 'long long' constants in
+ the preprocessor. */
+#if !(defined __SUNPRO_C || (defined __hpux && !defined __GNUC__))
+#if INTMAX_MIN && INTMAX_MAX && UINTMAX_MAX
+/* ok */
+#else
+err or;
+#endif
+#endif
+
+/* 7.18.3. Limits of other integer types */
+
+#include <stddef.h>
+
+verify (TYPE_MINIMUM (ptrdiff_t) == PTRDIFF_MIN);
+verify (TYPE_MAXIMUM (ptrdiff_t) == PTRDIFF_MAX);
+verify_same_types (PTRDIFF_MIN, (ptrdiff_t) 0 + 0);
+verify_same_types (PTRDIFF_MAX, (ptrdiff_t) 0 + 0);
+
+#if PTRDIFF_MIN && PTRDIFF_MAX
+/* ok */
+#else
+err or;
+#endif
+
+#include <signal.h>
+
+verify (TYPE_MINIMUM (sig_atomic_t) == SIG_ATOMIC_MIN);
+verify (TYPE_MAXIMUM (sig_atomic_t) == SIG_ATOMIC_MAX);
+verify_same_types (SIG_ATOMIC_MIN, (sig_atomic_t) 0 + 0);
+verify_same_types (SIG_ATOMIC_MAX, (sig_atomic_t) 0 + 0);
+
+#if SIG_ATOMIC_MIN != 17 && SIG_ATOMIC_MAX
+/* ok */
+#else
+err or;
+#endif
+
+verify (TYPE_MAXIMUM (size_t) == SIZE_MAX);
+verify_same_types (SIZE_MAX, (size_t) 0 + 0);
+
+#if SIZE_MAX
+/* ok */
+#else
+err or;
+#endif
+
+#if HAVE_WCHAR_T
+verify (TYPE_MINIMUM (wchar_t) == WCHAR_MIN);
+verify (TYPE_MAXIMUM (wchar_t) == WCHAR_MAX);
+verify_same_types (WCHAR_MIN, (wchar_t) 0 + 0);
+verify_same_types (WCHAR_MAX, (wchar_t) 0 + 0);
+
+# if WCHAR_MIN != 17 && WCHAR_MAX
+/* ok */
+# else
+err or;
+# endif
+#endif
+
+#if HAVE_WINT_T
+# include <wchar.h>
+
+verify (TYPE_MINIMUM (wint_t) == WINT_MIN);
+verify (TYPE_MAXIMUM (wint_t) == WINT_MAX);
+verify_same_types (WINT_MIN, (wint_t) 0 + 0);
+verify_same_types (WINT_MAX, (wint_t) 0 + 0);
+
+# if WINT_MIN != 17 && WINT_MAX
+/* ok */
+# else
+err or;
+# endif
+#endif
+
+/* 7.18.4. Macros for integer constants */
+
+verify (INT8_C (17) == 17);
+verify_same_types (INT8_C (17), (int_least8_t)0 + 0);
+verify (UINT8_C (17) == 17);
+verify_same_types (UINT8_C (17), (uint_least8_t)0 + 0);
+
+verify (INT16_C (17) == 17);
+verify_same_types (INT16_C (17), (int_least16_t)0 + 0);
+verify (UINT16_C (17) == 17);
+verify_same_types (UINT16_C (17), (uint_least16_t)0 + 0);
+
+verify (INT32_C (17) == 17);
+verify_same_types (INT32_C (17), (int_least32_t)0 + 0);
+verify (UINT32_C (17) == 17);
+verify_same_types (UINT32_C (17), (uint_least32_t)0 + 0);
+
+#ifdef INT64_C
+verify (INT64_C (17) == 17);
+verify_same_types (INT64_C (17), (int_least64_t)0 + 0);
+#endif
+#ifdef UINT64_C
+verify (UINT64_C (17) == 17);
+verify_same_types (UINT64_C (17), (uint_least64_t)0 + 0);
+#endif
+
+verify (INTMAX_C (17) == 17);
+verify_same_types (INTMAX_C (17), (intmax_t)0 + 0);
+verify (UINTMAX_C (17) == 17);
+verify_same_types (UINTMAX_C (17), (uintmax_t)0 + 0);
+
+/* Use _GL_VERIFY (with a fixed-length diagnostic string) rather than verify,
+ because the latter would require forming each stringified expression, and
+ many of these would be so long as to trigger a warning/error like this:
+
+ test-stdint.c:407:1: error: string length '6980' is greater than the \
+ length '4095' ISO C99 compilers are required to support \
+ [-Werror=overlength-strings]
+ */
+#define verify_width(width, min, max) \
+ _GL_VERIFY ((max) >> ((width) - 1 - ((min) < 0)) == 1, \
+ "verify_width check")
+
+/* Macros specified by ISO/IEC TS 18661-1:2014. */
+
+#ifdef INT8_MAX
+verify_width (INT8_WIDTH, INT8_MIN, INT8_MAX);
+#endif
+#ifdef UINT8_MAX
+verify_width (UINT8_WIDTH, 0, UINT8_MAX);
+#endif
+#ifdef INT16_MAX
+verify_width (INT16_WIDTH, INT16_MIN, INT16_MAX);
+#endif
+#ifdef UINT16_MAX
+verify_width (UINT16_WIDTH, 0, UINT16_MAX);
+#endif
+#ifdef INT32_MAX
+verify_width (INT32_WIDTH, INT32_MIN, INT32_MAX);
+#endif
+#ifdef UINT32_MAX
+verify_width (UINT32_WIDTH, 0, UINT32_MAX);
+#endif
+#ifdef INT64_MAX
+verify_width (INT64_WIDTH, INT64_MIN, INT64_MAX);
+#endif
+#ifdef UINT64_MAX
+verify_width (UINT64_WIDTH, 0, UINT64_MAX);
+#endif
+verify_width (INT_LEAST8_WIDTH, INT_LEAST8_MIN, INT_LEAST8_MAX);
+verify_width (UINT_LEAST8_WIDTH, 0, UINT_LEAST8_MAX);
+verify_width (INT_LEAST16_WIDTH, INT_LEAST16_MIN, INT_LEAST16_MAX);
+verify_width (UINT_LEAST16_WIDTH, 0, UINT_LEAST16_MAX);
+verify_width (INT_LEAST32_WIDTH, INT_LEAST32_MIN, INT_LEAST32_MAX);
+verify_width (UINT_LEAST32_WIDTH, 0, UINT_LEAST32_MAX);
+verify_width (INT_LEAST64_WIDTH, INT_LEAST64_MIN, INT_LEAST64_MAX);
+verify_width (UINT_LEAST64_WIDTH, 0, UINT_LEAST64_MAX);
+verify_width (INT_FAST8_WIDTH, INT_FAST8_MIN, INT_FAST8_MAX);
+verify_width (UINT_FAST8_WIDTH, 0, UINT_FAST8_MAX);
+verify_width (INT_FAST16_WIDTH, INT_FAST16_MIN, INT_FAST16_MAX);
+verify_width (UINT_FAST16_WIDTH, 0, UINT_FAST16_MAX);
+verify_width (INT_FAST32_WIDTH, INT_FAST32_MIN, INT_FAST32_MAX);
+verify_width (UINT_FAST32_WIDTH, 0, UINT_FAST32_MAX);
+verify_width (INT_FAST64_WIDTH, INT_FAST64_MIN, INT_FAST64_MAX);
+verify_width (UINT_FAST64_WIDTH, 0, UINT_FAST64_MAX);
+verify_width (INTPTR_WIDTH, INTPTR_MIN, INTPTR_MAX);
+verify_width (UINTPTR_WIDTH, 0, UINTPTR_MAX);
+verify_width (INTMAX_WIDTH, INTMAX_MIN, INTMAX_MAX);
+verify_width (UINTMAX_WIDTH, 0, UINTMAX_MAX);
+verify_width (PTRDIFF_WIDTH, PTRDIFF_MIN, PTRDIFF_MAX);
+verify_width (SIZE_WIDTH, 0, SIZE_MAX);
+verify_width (WCHAR_WIDTH, WCHAR_MIN, WCHAR_MAX);
+#ifdef WINT_MAX
+verify_width (WINT_WIDTH, WINT_MIN, WINT_MAX);
+#endif
+#ifdef SIG_ATOMIC_MAX
+verify_width (SIG_ATOMIC_WIDTH, SIG_ATOMIC_MIN, SIG_ATOMIC_MAX);
+#endif
+
+int
+main (void)
+{
+ return 0;
+}
diff --git a/gnulib-tests/test-stdio.c b/gnulib-tests/test-stdio.c
new file mode 100644
index 0000000..6cde888
--- /dev/null
+++ b/gnulib-tests/test-stdio.c
@@ -0,0 +1,43 @@
+/* Test of <stdio.h> substitute.
+ Copyright (C) 2007, 2009-2016 Free Software Foundation, Inc.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+/* Written by Bruno Haible <bruno@clisp.org>, 2007. */
+
+#include <config.h>
+
+#include <stdio.h>
+
+#include "verify.h"
+
+/* Check that the various SEEK_* macros are defined. */
+int sk[] = { SEEK_CUR, SEEK_END, SEEK_SET };
+
+/* Check that NULL can be passed through varargs as a pointer type,
+ per POSIX 2008. */
+verify (sizeof NULL == sizeof (void *));
+
+/* Check that the types are all defined. */
+fpos_t t1;
+off_t t2;
+size_t t3;
+ssize_t t4;
+va_list t5;
+
+int
+main (void)
+{
+ return 0;
+}
diff --git a/gnulib-tests/test-stdlib.c b/gnulib-tests/test-stdlib.c
new file mode 100644
index 0000000..a1fc0d8
--- /dev/null
+++ b/gnulib-tests/test-stdlib.c
@@ -0,0 +1,54 @@
+/* Test of <stdlib.h> substitute.
+ Copyright (C) 2007, 2009-2016 Free Software Foundation, Inc.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+/* Written by Bruno Haible <bruno@clisp.org>, 2007. */
+
+#include <config.h>
+
+#include <stdlib.h>
+
+#include "verify.h"
+
+/* Check that EXIT_SUCCESS is 0, per POSIX. */
+static int exitcode = EXIT_SUCCESS;
+#if EXIT_SUCCESS
+"oops"
+#endif
+
+/* Check for GNU value (not guaranteed by POSIX, but is guaranteed by
+ gnulib). */
+#if EXIT_FAILURE != 1
+"oops"
+#endif
+
+/* Check that NULL can be passed through varargs as a pointer type,
+ per POSIX 2008. */
+verify (sizeof NULL == sizeof (void *));
+
+#if GNULIB_TEST_SYSTEM_POSIX
+# include "test-sys_wait.h"
+#else
+# define test_sys_wait_macros() 0
+#endif
+
+int
+main (void)
+{
+ if (test_sys_wait_macros ())
+ return 1;
+
+ return exitcode;
+}
diff --git a/gnulib-tests/test-strerror.c b/gnulib-tests/test-strerror.c
new file mode 100644
index 0000000..80ffe1c
--- /dev/null
+++ b/gnulib-tests/test-strerror.c
@@ -0,0 +1,75 @@
+/* Test of strerror() function.
+ Copyright (C) 2007-2016 Free Software Foundation, Inc.
+
+ This 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 <http://www.gnu.org/licenses/>. */
+
+/* Written by Eric Blake <ebb9@byu.net>, 2007. */
+
+#include <config.h>
+
+#include <string.h>
+
+#include "signature.h"
+SIGNATURE_CHECK (strerror, char *, (int));
+
+#include <errno.h>
+
+#include "macros.h"
+
+int
+main (void)
+{
+ char *str;
+
+ errno = 0;
+ str = strerror (EACCES);
+ ASSERT (str);
+ ASSERT (*str);
+ ASSERT (errno == 0);
+
+ errno = 0;
+ str = strerror (ETIMEDOUT);
+ ASSERT (str);
+ ASSERT (*str);
+ ASSERT (errno == 0);
+
+ errno = 0;
+ str = strerror (EOVERFLOW);
+ ASSERT (str);
+ ASSERT (*str);
+ ASSERT (errno == 0);
+
+ /* 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;
+ str = strerror (0);
+ ASSERT (str);
+ ASSERT (*str);
+ ASSERT (errno == 0);
+ ASSERT (strstr (str, "nknown") == NULL);
+ ASSERT (strstr (str, "ndefined") == NULL);
+
+ /* POSIX requires strerror to produce a non-NULL result for all
+ inputs; as an extension, we also guarantee a non-empty result.
+ Reporting EINVAL is optional. */
+ errno = 0;
+ str = strerror (-3);
+ ASSERT (str);
+ ASSERT (*str);
+ ASSERT (errno == 0 || errno == EINVAL);
+
+ return 0;
+}
diff --git a/gnulib-tests/test-string.c b/gnulib-tests/test-string.c
new file mode 100644
index 0000000..f4c60f7
--- /dev/null
+++ b/gnulib-tests/test-string.c
@@ -0,0 +1,33 @@
+/* Test of <string.h> substitute.
+ Copyright (C) 2007, 2009-2016 Free Software Foundation, Inc.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+/* Written by Bruno Haible <bruno@clisp.org>, 2007. */
+
+#include <config.h>
+
+#include <string.h>
+
+#include "verify.h"
+
+/* Check that NULL can be passed through varargs as a pointer type,
+ per POSIX 2008. */
+verify (sizeof NULL == sizeof (void *));
+
+int
+main (void)
+{
+ return 0;
+}
diff --git a/gnulib-tests/test-strverscmp.c b/gnulib-tests/test-strverscmp.c
new file mode 100644
index 0000000..0cafe08
--- /dev/null
+++ b/gnulib-tests/test-strverscmp.c
@@ -0,0 +1,59 @@
+/* Test of strverscmp() function.
+ Copyright (C) 2008-2016 Free Software Foundation, Inc.
+
+ This 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 <http://www.gnu.org/licenses/>. */
+
+/* Written by Eric Blake <ebb9@byu.net>, 2008. */
+
+#include <config.h>
+
+#include <string.h>
+
+#include "signature.h"
+SIGNATURE_CHECK (strverscmp, int, (const char *, const char *));
+
+#include "macros.h"
+
+int
+main (void)
+{
+ ASSERT (strverscmp ("", "") == 0);
+ ASSERT (strverscmp ("a", "a") == 0);
+ ASSERT (strverscmp ("a", "b") < 0);
+ ASSERT (strverscmp ("b", "a") > 0);
+ ASSERT (strverscmp ("000", "00") < 0);
+ ASSERT (strverscmp ("00", "000") > 0);
+ ASSERT (strverscmp ("a0", "a") > 0);
+ ASSERT (strverscmp ("00", "01") < 0);
+ ASSERT (strverscmp ("01", "010") < 0);
+ ASSERT (strverscmp ("010", "09") < 0);
+ ASSERT (strverscmp ("09", "0") < 0);
+ ASSERT (strverscmp ("9", "10") < 0);
+ ASSERT (strverscmp ("0a", "0") > 0);
+
+ /* From glibc bug 9913. */
+ {
+ static char const a[] = "B0075022800016.gbp.corp.com";
+ static char const b[] = "B007502280067.gbp.corp.com";
+ static char const c[] = "B007502357019.GBP.CORP.COM";
+ ASSERT (strverscmp (a, b) < 0);
+ ASSERT (strverscmp (b, c) < 0);
+ ASSERT (strverscmp (a, c) < 0);
+ ASSERT (strverscmp (b, a) > 0);
+ ASSERT (strverscmp (c, b) > 0);
+ ASSERT (strverscmp (c, a) > 0);
+ }
+
+ return 0;
+}
diff --git a/gnulib-tests/test-symlink.c b/gnulib-tests/test-symlink.c
new file mode 100644
index 0000000..ad13b93
--- /dev/null
+++ b/gnulib-tests/test-symlink.c
@@ -0,0 +1,47 @@
+/* Tests of symlink.
+ Copyright (C) 2009-2016 Free Software Foundation, Inc.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+/* Written by Eric Blake <ebb9@byu.net>, 2009. */
+
+#include <config.h>
+
+#include <unistd.h>
+
+#include "signature.h"
+SIGNATURE_CHECK (symlink, int, (char const *, char const *));
+
+#include <fcntl.h>
+#include <errno.h>
+#include <stdbool.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <sys/stat.h>
+
+#include "ignore-value.h"
+#include "macros.h"
+
+#define BASE "test-symlink.t"
+
+#include "test-symlink.h"
+
+int
+main (void)
+{
+ /* Remove any leftovers from a previous partial run. */
+ ignore_value (system ("rm -rf " BASE "*"));
+
+ return test_symlink (symlink, true);
+}
diff --git a/gnulib-tests/test-symlink.h b/gnulib-tests/test-symlink.h
new file mode 100644
index 0000000..fc064e8
--- /dev/null
+++ b/gnulib-tests/test-symlink.h
@@ -0,0 +1,95 @@
+/* Tests of symlink.
+ Copyright (C) 2009-2016 Free Software Foundation, Inc.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+/* Written by Eric Blake <ebb9@byu.net>, 2009. */
+
+/* This file is designed to test both symlink(a,b) and
+ symlinkat(a,AT_FDCWD,b). FUNC is the function to test. Assumes
+ that BASE and ASSERT are already defined, and that appropriate
+ headers are already included. If PRINT, warn before skipping
+ symlink tests with status 77. */
+
+static int
+test_symlink (int (*func) (char const *, char const *), bool print)
+{
+ if (func ("nowhere", BASE "link1"))
+ {
+ if (print)
+ fputs ("skipping test: symlinks not supported on this file system\n",
+ stderr);
+ return 77;
+ }
+
+ /* Some systems allow the creation of 0-length symlinks as a synonym
+ for "."; but most reject it. */
+ {
+ int status;
+ errno = 0;
+ status = func ("", BASE "link2");
+ if (status == -1)
+ ASSERT (errno == ENOENT || errno == EINVAL);
+ else
+ {
+ ASSERT (status == 0);
+ ASSERT (unlink (BASE "link2") == 0);
+ }
+ }
+
+ /* Sanity checks of failures. */
+ errno = 0;
+ ASSERT (func ("nowhere", "") == -1);
+ ASSERT (errno == ENOENT);
+ errno = 0;
+ ASSERT (func ("nowhere", ".") == -1);
+ ASSERT (errno == EEXIST || errno == EINVAL);
+ errno = 0;
+ ASSERT (func ("somewhere", BASE "link1") == -1);
+ ASSERT (errno == EEXIST);
+ errno = 0;
+ ASSERT (func ("nowhere", BASE "link2/") == -1);
+ ASSERT (errno == ENOTDIR || errno == ENOENT);
+ ASSERT (mkdir (BASE "dir", 0700) == 0);
+ errno = 0;
+ ASSERT (func ("nowhere", BASE "dir") == -1);
+ ASSERT (errno == EEXIST);
+ errno = 0;
+ ASSERT (func ("nowhere", BASE "dir/") == -1);
+ ASSERT (errno == EEXIST || errno == EINVAL);
+ ASSERT (close (creat (BASE "file", 0600)) == 0);
+ errno = 0;
+ ASSERT (func ("nowhere", BASE "file") == -1);
+ ASSERT (errno == EEXIST);
+ errno = 0;
+ ASSERT (func ("nowhere", BASE "file/") == -1);
+ ASSERT (errno == EEXIST || errno == ENOTDIR || errno == ENOENT);
+
+ /* Trailing slash must always be rejected. */
+ ASSERT (unlink (BASE "link1") == 0);
+ ASSERT (func (BASE "link2", BASE "link1") == 0);
+ errno = 0;
+ ASSERT (func (BASE "nowhere", BASE "link1/") == -1);
+ ASSERT (errno == EEXIST || errno == ENOTDIR || errno == ENOENT);
+ errno = 0;
+ ASSERT (unlink (BASE "link2") == -1);
+ ASSERT (errno == ENOENT);
+
+ /* Cleanup. */
+ ASSERT (rmdir (BASE "dir") == 0);
+ ASSERT (unlink (BASE "file") == 0);
+ ASSERT (unlink (BASE "link1") == 0);
+
+ return 0;
+}
diff --git a/gnulib-tests/test-sys_stat.c b/gnulib-tests/test-sys_stat.c
new file mode 100644
index 0000000..8a3af94
--- /dev/null
+++ b/gnulib-tests/test-sys_stat.c
@@ -0,0 +1,340 @@
+/* Test of <sys/stat.h> substitute.
+ Copyright (C) 2007-2016 Free Software Foundation, Inc.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+/* Written by Bruno Haible <bruno@clisp.org>, 2007. */
+
+#include <config.h>
+
+#include <sys/stat.h>
+
+#include "verify.h"
+
+/* Check the existence of some macros. */
+int a[] =
+ {
+ S_IFMT,
+#ifdef S_IFBLK /* missing on MSVC */
+ S_IFBLK,
+#endif
+ S_IFCHR, S_IFDIR, S_IFIFO, S_IFREG,
+#ifdef S_IFLNK /* missing on native Windows and DJGPP */
+ S_IFLNK,
+#endif
+#ifdef S_IFSOCK /* missing on native Windows and DJGPP */
+ S_IFSOCK,
+#endif
+ S_IRWXU, S_IRUSR, S_IWUSR, S_IXUSR,
+ S_IRWXG, S_IRGRP, S_IWGRP, S_IXGRP,
+ S_IRWXO, S_IROTH, S_IWOTH, S_IXOTH,
+ S_ISUID, S_ISGID, S_ISVTX,
+ S_ISBLK (S_IFREG),
+ S_ISCHR (S_IFREG),
+ S_ISDIR (S_IFREG),
+ S_ISFIFO (S_IFREG),
+ S_ISREG (S_IFREG),
+ S_ISLNK (S_IFREG),
+ S_ISSOCK (S_IFREG),
+ S_ISDOOR (S_IFREG),
+ S_ISMPB (S_IFREG),
+ S_ISMPX (S_IFREG),
+ S_ISNAM (S_IFREG),
+ S_ISNWK (S_IFREG),
+ S_ISPORT (S_IFREG),
+ S_ISCTG (S_IFREG),
+ S_ISOFD (S_IFREG),
+ S_ISOFL (S_IFREG),
+ S_ISWHT (S_IFREG)
+ };
+
+/* Sanity checks. */
+
+verify (S_IRWXU == (S_IRUSR | S_IWUSR | S_IXUSR));
+verify (S_IRWXG == (S_IRGRP | S_IWGRP | S_IXGRP));
+verify (S_IRWXO == (S_IROTH | S_IWOTH | S_IXOTH));
+
+#ifdef S_IFBLK
+verify (S_ISBLK (S_IFBLK));
+#endif
+verify (!S_ISBLK (S_IFCHR));
+verify (!S_ISBLK (S_IFDIR));
+verify (!S_ISBLK (S_IFIFO));
+verify (!S_ISBLK (S_IFREG));
+#ifdef S_IFLNK
+verify (!S_ISBLK (S_IFLNK));
+#endif
+#ifdef S_IFSOCK
+verify (!S_ISBLK (S_IFSOCK));
+#endif
+
+#ifdef S_IFBLK
+verify (!S_ISCHR (S_IFBLK));
+#endif
+verify (S_ISCHR (S_IFCHR));
+verify (!S_ISCHR (S_IFDIR));
+verify (!S_ISCHR (S_IFIFO));
+verify (!S_ISCHR (S_IFREG));
+#ifdef S_IFLNK
+verify (!S_ISCHR (S_IFLNK));
+#endif
+#ifdef S_IFSOCK
+verify (!S_ISCHR (S_IFSOCK));
+#endif
+
+#ifdef S_IFBLK
+verify (!S_ISDIR (S_IFBLK));
+#endif
+verify (!S_ISDIR (S_IFCHR));
+verify (S_ISDIR (S_IFDIR));
+verify (!S_ISDIR (S_IFIFO));
+verify (!S_ISDIR (S_IFREG));
+#ifdef S_IFLNK
+verify (!S_ISDIR (S_IFLNK));
+#endif
+#ifdef S_IFSOCK
+verify (!S_ISDIR (S_IFSOCK));
+#endif
+
+#ifdef S_IFBLK
+verify (!S_ISFIFO (S_IFBLK));
+#endif
+verify (!S_ISFIFO (S_IFCHR));
+verify (!S_ISFIFO (S_IFDIR));
+verify (S_ISFIFO (S_IFIFO));
+verify (!S_ISFIFO (S_IFREG));
+#ifdef S_IFLNK
+verify (!S_ISFIFO (S_IFLNK));
+#endif
+#ifdef S_IFSOCK
+verify (!S_ISFIFO (S_IFSOCK));
+#endif
+
+#ifdef S_IFBLK
+verify (!S_ISREG (S_IFBLK));
+#endif
+verify (!S_ISREG (S_IFCHR));
+verify (!S_ISREG (S_IFDIR));
+verify (!S_ISREG (S_IFIFO));
+verify (S_ISREG (S_IFREG));
+#ifdef S_IFLNK
+verify (!S_ISREG (S_IFLNK));
+#endif
+#ifdef S_IFSOCK
+verify (!S_ISREG (S_IFSOCK));
+#endif
+
+#ifdef S_IFBLK
+verify (!S_ISLNK (S_IFBLK));
+#endif
+verify (!S_ISLNK (S_IFCHR));
+verify (!S_ISLNK (S_IFDIR));
+verify (!S_ISLNK (S_IFIFO));
+verify (!S_ISLNK (S_IFREG));
+#ifdef S_IFLNK
+verify (S_ISLNK (S_IFLNK));
+#endif
+#ifdef S_IFSOCK
+verify (!S_ISLNK (S_IFSOCK));
+#endif
+
+#ifdef S_IFBLK
+verify (!S_ISSOCK (S_IFBLK));
+#endif
+verify (!S_ISSOCK (S_IFCHR));
+verify (!S_ISSOCK (S_IFDIR));
+verify (!S_ISSOCK (S_IFIFO));
+verify (!S_ISSOCK (S_IFREG));
+#ifdef S_IFLNK
+verify (!S_ISSOCK (S_IFLNK));
+#endif
+#ifdef S_IFSOCK
+verify (S_ISSOCK (S_IFSOCK));
+#endif
+
+#ifdef S_IFBLK
+verify (!S_ISDOOR (S_IFBLK));
+#endif
+verify (!S_ISDOOR (S_IFCHR));
+verify (!S_ISDOOR (S_IFDIR));
+verify (!S_ISDOOR (S_IFIFO));
+verify (!S_ISDOOR (S_IFREG));
+#ifdef S_IFLNK
+verify (!S_ISDOOR (S_IFLNK));
+#endif
+#ifdef S_IFSOCK
+verify (!S_ISDOOR (S_IFSOCK));
+#endif
+
+#ifdef S_IFBLK
+verify (!S_ISMPB (S_IFBLK));
+#endif
+verify (!S_ISMPB (S_IFCHR));
+verify (!S_ISMPB (S_IFDIR));
+verify (!S_ISMPB (S_IFIFO));
+verify (!S_ISMPB (S_IFREG));
+#ifdef S_IFLNK
+verify (!S_ISMPB (S_IFLNK));
+#endif
+#ifdef S_IFSOCK
+verify (!S_ISMPB (S_IFSOCK));
+#endif
+
+#ifdef S_IFBLK
+verify (!S_ISMPX (S_IFBLK));
+#endif
+verify (!S_ISMPX (S_IFCHR));
+verify (!S_ISMPX (S_IFDIR));
+verify (!S_ISMPX (S_IFIFO));
+verify (!S_ISMPX (S_IFREG));
+#ifdef S_IFLNK
+verify (!S_ISMPX (S_IFLNK));
+#endif
+#ifdef S_IFSOCK
+verify (!S_ISMPX (S_IFSOCK));
+#endif
+
+#ifdef S_IFBLK
+verify (!S_ISNAM (S_IFBLK));
+#endif
+verify (!S_ISNAM (S_IFCHR));
+verify (!S_ISNAM (S_IFDIR));
+verify (!S_ISNAM (S_IFIFO));
+verify (!S_ISNAM (S_IFREG));
+#ifdef S_IFLNK
+verify (!S_ISNAM (S_IFLNK));
+#endif
+#ifdef S_IFSOCK
+verify (!S_ISNAM (S_IFSOCK));
+#endif
+
+#ifdef S_IFBLK
+verify (!S_ISNWK (S_IFBLK));
+#endif
+verify (!S_ISNWK (S_IFCHR));
+verify (!S_ISNWK (S_IFDIR));
+verify (!S_ISNWK (S_IFIFO));
+verify (!S_ISNWK (S_IFREG));
+#ifdef S_IFLNK
+verify (!S_ISNWK (S_IFLNK));
+#endif
+#ifdef S_IFSOCK
+verify (!S_ISNWK (S_IFSOCK));
+#endif
+
+#ifdef S_IFBLK
+verify (!S_ISPORT (S_IFBLK));
+#endif
+verify (!S_ISPORT (S_IFCHR));
+verify (!S_ISPORT (S_IFDIR));
+verify (!S_ISPORT (S_IFIFO));
+verify (!S_ISPORT (S_IFREG));
+#ifdef S_IFLNK
+verify (!S_ISPORT (S_IFLNK));
+#endif
+#ifdef S_IFSOCK
+verify (!S_ISPORT (S_IFSOCK));
+#endif
+
+#ifdef S_IFBLK
+verify (!S_ISCTG (S_IFBLK));
+#endif
+verify (!S_ISCTG (S_IFCHR));
+verify (!S_ISCTG (S_IFDIR));
+verify (!S_ISCTG (S_IFIFO));
+verify (!S_ISCTG (S_IFREG));
+#ifdef S_IFLNK
+verify (!S_ISCTG (S_IFLNK));
+#endif
+#ifdef S_IFSOCK
+verify (!S_ISCTG (S_IFSOCK));
+#endif
+
+#ifdef S_IFBLK
+verify (!S_ISOFD (S_IFBLK));
+#endif
+verify (!S_ISOFD (S_IFCHR));
+verify (!S_ISOFD (S_IFDIR));
+verify (!S_ISOFD (S_IFIFO));
+verify (!S_ISOFD (S_IFREG));
+#ifdef S_IFLNK
+verify (!S_ISOFD (S_IFLNK));
+#endif
+#ifdef S_IFSOCK
+verify (!S_ISOFD (S_IFSOCK));
+#endif
+
+#ifdef S_IFBLK
+verify (!S_ISOFL (S_IFBLK));
+#endif
+verify (!S_ISOFL (S_IFCHR));
+verify (!S_ISOFL (S_IFDIR));
+verify (!S_ISOFL (S_IFIFO));
+verify (!S_ISOFL (S_IFREG));
+#ifdef S_IFLNK
+verify (!S_ISOFL (S_IFLNK));
+#endif
+#ifdef S_IFSOCK
+verify (!S_ISOFL (S_IFSOCK));
+#endif
+
+#ifdef S_IFBLK
+verify (!S_ISWHT (S_IFBLK));
+#endif
+verify (!S_ISWHT (S_IFCHR));
+verify (!S_ISWHT (S_IFDIR));
+verify (!S_ISWHT (S_IFIFO));
+verify (!S_ISWHT (S_IFREG));
+#ifdef S_IFLNK
+verify (!S_ISWHT (S_IFLNK));
+#endif
+#ifdef S_IFSOCK
+verify (!S_ISWHT (S_IFSOCK));
+#endif
+
+/* POSIX 2008 requires traditional encoding of permission constants. */
+verify (S_IRWXU == 00700);
+verify (S_IRUSR == 00400);
+verify (S_IWUSR == 00200);
+verify (S_IXUSR == 00100);
+verify (S_IRWXG == 00070);
+verify (S_IRGRP == 00040);
+verify (S_IWGRP == 00020);
+verify (S_IXGRP == 00010);
+verify (S_IRWXO == 00007);
+verify (S_IROTH == 00004);
+verify (S_IWOTH == 00002);
+verify (S_IXOTH == 00001);
+verify (S_ISUID == 04000);
+verify (S_ISGID == 02000);
+verify (S_ISVTX == 01000);
+
+#if ((0 <= UTIME_NOW && UTIME_NOW < 1000000000) \
+ || (0 <= UTIME_OMIT && UTIME_OMIT < 1000000000) \
+ || UTIME_NOW == UTIME_OMIT)
+invalid UTIME macros
+#endif
+
+/* Check the existence of some types. */
+nlink_t t1;
+off_t t2;
+mode_t t3;
+
+struct timespec st;
+
+int
+main (void)
+{
+ return 0;
+}
diff --git a/gnulib-tests/test-sys_time.c b/gnulib-tests/test-sys_time.c
new file mode 100644
index 0000000..44535b9
--- /dev/null
+++ b/gnulib-tests/test-sys_time.c
@@ -0,0 +1,34 @@
+/* Test of <sys/time.h> substitute.
+ Copyright (C) 2007, 2009-2016 Free Software Foundation, Inc.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+/* Written by Bruno Haible <bruno@clisp.org>, 2007. */
+
+#include <config.h>
+
+#include <sys/time.h>
+
+/* 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];
+
+int
+main (void)
+{
+ return 0;
+}
diff --git a/gnulib-tests/test-sys_types.c b/gnulib-tests/test-sys_types.c
new file mode 100644
index 0000000..7f8fb6d
--- /dev/null
+++ b/gnulib-tests/test-sys_types.c
@@ -0,0 +1,34 @@
+/* Test of <sys/types.h> substitute.
+ Copyright (C) 2011-2016 Free Software Foundation, Inc.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+/* Written by Bruno Haible <bruno@clisp.org>, 2011. */
+
+#include <config.h>
+
+#include <sys/types.h>
+
+/* Check that the types are all defined. */
+pid_t t1;
+size_t t2;
+ssize_t t3;
+off_t t4;
+mode_t t5;
+
+int
+main (void)
+{
+ return 0;
+}
diff --git a/gnulib-tests/test-sys_wait.h b/gnulib-tests/test-sys_wait.h
new file mode 100644
index 0000000..7389be4
--- /dev/null
+++ b/gnulib-tests/test-sys_wait.h
@@ -0,0 +1,53 @@
+/* Test of macros shared between <sys/wait.h> and <stdlib.h>.
+ Copyright (C) 2010-2016 Free Software Foundation, Inc.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+/* Written by Eric Blake <ebb9@byu.net>, 2010. */
+
+static int
+test_sys_wait_macros (void)
+{
+ /* Check subset of <sys/wait.h> macros that must be visible here.
+ Note that some of these macros are only portable when operating
+ on an lvalue. */
+ int i;
+ for (i = 0; i < 0x8000; i = (i ? i << 1 : 1))
+ {
+ /* POSIX requires that for all valid process statuses, that
+ exactly one of these three macros is true. But not all
+ possible 16-bit values map to valid process status.
+ Traditionally, 8 of the bits are for WIFEXITED, 7 of the bits
+ to tell between WIFSIGNALED and WIFSTOPPED, and either 0x80
+ or 0x8000 to flag that core was also dumped. Since we don't
+ know which byte is WIFEXITED, we skip the both possible bits
+ that can signal core dump. */
+ if (i == 0x80)
+ continue;
+ if (!!WIFSIGNALED (i) + !!WIFEXITED (i) + !!WIFSTOPPED (i) != 1)
+ return 1;
+ }
+ i = WEXITSTATUS (i) + WSTOPSIG (i) + WTERMSIG (i);
+
+ switch (i)
+ {
+#if 0
+ /* Gnulib doesn't guarantee these, yet. */
+ case WNOHANG:
+ case WUNTRACED:
+#endif
+ break;
+ }
+ return 0;
+}
diff --git a/gnulib-tests/test-time.c b/gnulib-tests/test-time.c
new file mode 100644
index 0000000..dec2b13
--- /dev/null
+++ b/gnulib-tests/test-time.c
@@ -0,0 +1,41 @@
+/* Test of <time.h> substitute.
+ Copyright (C) 2007, 2009-2016 Free Software Foundation, Inc.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+/* Written by Bruno Haible <bruno@clisp.org>, 2007. */
+
+#include <config.h>
+
+#include <time.h>
+
+#include "verify.h"
+
+/* Check that the types are all defined. */
+struct timespec t1;
+#if 0
+/* POSIX:2008 does not require pid_t in <time.h> unconditionally, and indeed
+ it's missing on Mac OS X 10.5, FreeBSD 6.4, OpenBSD 4.9, mingw. */
+pid_t t2;
+#endif
+
+/* Check that NULL can be passed through varargs as a pointer type,
+ per POSIX 2008. */
+verify (sizeof NULL == sizeof (void *));
+
+int
+main (void)
+{
+ return 0;
+}
diff --git a/gnulib-tests/test-unistd.c b/gnulib-tests/test-unistd.c
new file mode 100644
index 0000000..463ef57
--- /dev/null
+++ b/gnulib-tests/test-unistd.c
@@ -0,0 +1,56 @@
+/* Test of <unistd.h> substitute.
+ Copyright (C) 2007, 2009-2016 Free Software Foundation, Inc.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+/* Written by Bruno Haible <bruno@clisp.org>, 2007. */
+
+#include <config.h>
+
+#include <unistd.h>
+
+#include "verify.h"
+
+/* Check that NULL can be passed through varargs as a pointer type,
+ per POSIX 2008. */
+verify (sizeof NULL == sizeof (void *));
+
+/* Check that the various SEEK_* macros are defined. */
+int sk[] = { SEEK_CUR, SEEK_END, SEEK_SET };
+
+/* Check that the various *_FILENO macros are defined. */
+#if ! (defined STDIN_FILENO \
+ && (STDIN_FILENO + STDOUT_FILENO + STDERR_FILENO == 3))
+missing or broken *_FILENO macros
+#endif
+
+/* Check that the types are all defined. */
+size_t t1;
+ssize_t t2;
+#ifdef TODO /* Not implemented in gnulib yet */
+uid_t t3;
+gid_t t4;
+#endif
+off_t t5;
+pid_t t6;
+#ifdef TODO
+useconds_t t7;
+intptr_t t8;
+#endif
+
+int
+main (void)
+{
+ return 0;
+}
diff --git a/gnulib-tests/test-unsetenv.c b/gnulib-tests/test-unsetenv.c
new file mode 100644
index 0000000..fe4548d
--- /dev/null
+++ b/gnulib-tests/test-unsetenv.c
@@ -0,0 +1,61 @@
+/* Tests of unsetenv.
+ Copyright (C) 2009-2016 Free Software Foundation, Inc.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+/* Written by Eric Blake <ebb9@byu.net>, 2009. */
+
+#include <config.h>
+
+#include <stdlib.h>
+
+#include "signature.h"
+SIGNATURE_CHECK (unsetenv, int, (char const *));
+
+#include <errno.h>
+#include <string.h>
+#include <unistd.h>
+
+#include "macros.h"
+
+int
+main (void)
+{
+ char entry[] = "b=2";
+
+ /* Test removal when multiple entries present. */
+ ASSERT (putenv ((char *) "a=1") == 0);
+ ASSERT (putenv (entry) == 0);
+ entry[0] = 'a'; /* Unspecified what getenv("a") would be at this point. */
+ ASSERT (unsetenv ("a") == 0); /* Both entries will be removed. */
+ ASSERT (getenv ("a") == NULL);
+ ASSERT (unsetenv ("a") == 0);
+
+ /* Required to fail with EINVAL. */
+ errno = 0;
+ ASSERT (unsetenv ("") == -1);
+ ASSERT (errno == EINVAL);
+ errno = 0;
+ ASSERT (unsetenv ("a=b") == -1);
+ ASSERT (errno == EINVAL);
+#if 0
+ /* glibc and gnulib's implementation guarantee this, but POSIX no
+ longer requires it: http://austingroupbugs.net/view.php?id=185 */
+ errno = 0;
+ ASSERT (unsetenv (NULL) == -1);
+ ASSERT (errno == EINVAL);
+#endif
+
+ return 0;
+}
diff --git a/gnulib-tests/test-update-copyright.sh b/gnulib-tests/test-update-copyright.sh
new file mode 100755
index 0000000..cd4886a
--- /dev/null
+++ b/gnulib-tests/test-update-copyright.sh
@@ -0,0 +1,547 @@
+#!/bin/sh
+# Test suite for update-copyright.
+# Copyright (C) 2009-2016 Free Software Foundation, Inc.
+# This file is part of the GNUlib 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,
+# 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/>.
+
+diffout=`diff -u /dev/null /dev/null 2>&1`
+if test x"$diffout" = x"" && test $? -eq 0; then
+ compare() { diff -u "$@"; }
+else
+ compare() { cmp "$@"; }
+fi
+
+# Ensure the update-copyright program gets found.
+PATH=$abs_aux_dir:$PATH
+export PATH
+
+TMP_BASE=update-copyright.test
+trap 'rm -f $TMP_BASE*' 0 1 2 3 15
+
+## --------------------------------- ##
+## Skip if user does not have perl. ##
+## --------------------------------- ##
+
+TMP=$TMP_BASE
+s=$TMP-script
+cat <<\EOF > $s
+eval '(exit $?0)' && eval 'exec perl -wS -0777 -pi "$0" "$@"'
+ & eval 'exec perl -wS -0777 -pi "$0" $argv:q'
+ if 0;
+s/a/b/
+EOF
+chmod a+x $s
+echo a > $TMP-in
+./$s $TMP-in 2>/dev/null && test b = "`cat $TMP-in 2>/dev/null`" ||
+ {
+ printf '%s\n' "$0: skipping this test;" \
+ 'your system has insufficient support for Perl' 1>&2
+ exit 77
+ }
+
+# Skip this test if Perl is too old. FIXME: 5.8.0 is just a guess.
+# We have a report that 5.6.1 is inadequate and that 5.8.0 works.
+perl -e 'require 5.8.0' || {
+ echo '$0: skipping this test; Perl version is too old' 1>&2
+ exit 77
+}
+
+# Do not let a different envvar setting perturb results.
+UPDATE_COPYRIGHT_MAX_LINE_LENGTH=72
+export UPDATE_COPYRIGHT_MAX_LINE_LENGTH
+
+## ----------------------------- ##
+## Examples from documentation. ##
+## ----------------------------- ##
+
+TMP=$TMP_BASE-ex
+cat > $TMP.1 <<EOF
+Copyright @copyright{} 1990-2005, 2007-2009 Free Software
+Foundation, Inc.
+EOF
+cat > $TMP.2 <<EOF
+# Copyright (C) 1990-2005, 2007-2009 Free Software
+# Foundation, Inc.
+EOF
+cat > $TMP.3 <<EOF
+/*
+ * Copyright &copy; 90,2005,2007-2009
+ * Free Software Foundation, Inc.
+ */
+EOF
+cat > $TMP.4 <<EOF
+## Copyright (C) 1990-2005, 2007-2009 Free Software
+# Foundation, Inc.
+EOF
+cat > $TMP.5 <<EOF
+Copyright (C) 1990-2005, 2007-2009 Acme, Inc.
+EOF
+cat > $TMP.6 <<EOF
+## Copyright (C) 1990-2005, 2007-2009 Free Software
+# Foundation, Inc.
+
+Copyright (C) 1990-2005, 2007-2009 Free Software Foundation,
+Inc.
+EOF
+cat > $TMP.7 <<EOF
+Copyright (C) 1990-2005, 2007-2009 Acme, Inc.
+
+# Copyright (C) 1990-2005, 2007-2009 Free Software
+# Foundation, Inc.
+EOF
+
+UPDATE_COPYRIGHT_YEAR=2009 \
+ update-copyright $TMP.? 1> $TMP-stdout 2> $TMP-stderr
+compare /dev/null $TMP-stdout || exit 1
+compare - $TMP-stderr <<EOF || exit 1
+$TMP.4: warning: copyright statement not found
+$TMP.5: warning: copyright statement not found
+EOF
+compare - $TMP.1 <<EOF || exit 1
+Copyright @copyright{} 1990-2005, 2007-2009 Free Software
+Foundation, Inc.
+EOF
+compare - $TMP.2 <<EOF || exit 1
+# Copyright (C) 1990-2005, 2007-2009 Free Software
+# Foundation, Inc.
+EOF
+compare - $TMP.3 <<EOF || exit 1
+/*
+ * Copyright &copy; 90,2005,2007-2009
+ * Free Software Foundation, Inc.
+ */
+EOF
+compare - $TMP.4 <<EOF || exit 1
+## Copyright (C) 1990-2005, 2007-2009 Free Software
+# Foundation, Inc.
+EOF
+compare - $TMP.5 <<EOF || exit 1
+Copyright (C) 1990-2005, 2007-2009 Acme, Inc.
+EOF
+compare - $TMP.6 <<EOF || exit 1
+## Copyright (C) 1990-2005, 2007-2009 Free Software
+# Foundation, Inc.
+
+Copyright (C) 1990-2005, 2007-2009 Free Software Foundation,
+Inc.
+EOF
+compare - $TMP.7 <<EOF || exit 1
+Copyright (C) 1990-2005, 2007-2009 Acme, Inc.
+
+# Copyright (C) 1990-2005, 2007-2009 Free Software
+# Foundation, Inc.
+EOF
+
+UPDATE_COPYRIGHT_YEAR=2010 UPDATE_COPYRIGHT_USE_INTERVALS=1 \
+ update-copyright $TMP.? 1> $TMP-stdout 2> $TMP-stderr
+compare /dev/null $TMP-stdout || exit 1
+compare - $TMP-stderr <<EOF || exit 1
+$TMP.4: warning: copyright statement not found
+$TMP.5: warning: copyright statement not found
+EOF
+compare - $TMP.1 <<EOF || exit 1
+Copyright @copyright{} 1990-2005, 2007-2010 Free Software Foundation,
+Inc.
+EOF
+compare - $TMP.2 <<EOF || exit 1
+# Copyright (C) 1990-2005, 2007-2010 Free Software Foundation, Inc.
+EOF
+compare - $TMP.3 <<EOF || exit 1
+/*
+ * Copyright &copy; 1990, 2005, 2007-2010 Free Software Foundation, Inc.
+ */
+EOF
+compare - $TMP.4 <<EOF || exit 1
+## Copyright (C) 1990-2005, 2007-2009 Free Software
+# Foundation, Inc.
+EOF
+compare - $TMP.5 <<EOF || exit 1
+Copyright (C) 1990-2005, 2007-2009 Acme, Inc.
+EOF
+compare - $TMP.6 <<EOF || exit 1
+## Copyright (C) 1990-2005, 2007-2009 Free Software
+# Foundation, Inc.
+
+Copyright (C) 1990-2005, 2007-2010 Free Software Foundation, Inc.
+EOF
+compare - $TMP.7 <<EOF || exit 1
+Copyright (C) 1990-2005, 2007-2009 Acme, Inc.
+
+# Copyright (C) 1990-2005, 2007-2010 Free Software Foundation, Inc.
+EOF
+
+UPDATE_COPYRIGHT_YEAR=2010 UPDATE_COPYRIGHT_FORCE=1 \
+ update-copyright $TMP.? 1> $TMP-stdout 2> $TMP-stderr
+compare /dev/null $TMP-stdout || exit 1
+compare - $TMP-stderr <<EOF || exit 1
+$TMP.4: warning: copyright statement not found
+$TMP.5: warning: copyright statement not found
+EOF
+compare - $TMP.1 <<EOF || exit 1
+Copyright @copyright{} 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997,
+1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2007, 2008, 2009, 2010
+Free Software Foundation, Inc.
+EOF
+compare - $TMP.2 <<EOF || exit 1
+# Copyright (C) 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998,
+# 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2007, 2008, 2009, 2010 Free
+# Software Foundation, Inc.
+EOF
+compare - $TMP.3 <<EOF || exit 1
+/*
+ * Copyright &copy; 1990, 2005, 2007, 2008, 2009, 2010 Free Software
+ * Foundation, Inc.
+ */
+EOF
+compare - $TMP.4 <<EOF || exit 1
+## Copyright (C) 1990-2005, 2007-2009 Free Software
+# Foundation, Inc.
+EOF
+compare - $TMP.5 <<EOF || exit 1
+Copyright (C) 1990-2005, 2007-2009 Acme, Inc.
+EOF
+compare - $TMP.6 <<EOF || exit 1
+## Copyright (C) 1990-2005, 2007-2009 Free Software
+# Foundation, Inc.
+
+Copyright (C) 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998,
+1999, 2000, 2001, 2002, 2003, 2004, 2005, 2007, 2008, 2009, 2010 Free
+Software Foundation, Inc.
+EOF
+compare - $TMP.7 <<EOF || exit 1
+Copyright (C) 1990-2005, 2007-2009 Acme, Inc.
+
+# Copyright (C) 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998,
+# 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2007, 2008, 2009, 2010 Free
+# Software Foundation, Inc.
+EOF
+
+rm $TMP*
+
+## -------------- ##
+## Current year. ##
+## -------------- ##
+
+TMP=$TMP_BASE-current-year
+YEAR=`date +%Y`
+cat > $TMP <<EOF
+'\" Copyright (C) 2006
+'\" Free Software Foundation,
+'\" Inc.
+EOF
+update-copyright $TMP 1> $TMP-stdout 2> $TMP-stderr
+compare /dev/null $TMP-stdout || exit 1
+compare /dev/null $TMP-stderr || exit 1
+compare - $TMP <<EOF || exit 1
+'\" Copyright (C) 2006, $YEAR Free Software Foundation, Inc.
+EOF
+UPDATE_COPYRIGHT_USE_INTERVALS=1 \
+ update-copyright $TMP 1> $TMP-stdout 2> $TMP-stderr
+compare /dev/null $TMP-stdout || exit 1
+compare /dev/null $TMP-stderr || exit 1
+compare - $TMP <<EOF || exit 1
+'\" Copyright (C) 2006, $YEAR Free Software Foundation, Inc.
+EOF
+rm $TMP*
+
+## ------------------ ##
+## Surrounding text. ##
+## ------------------ ##
+
+TMP=$TMP_BASE-surrounding-text
+cat > $TMP <<EOF
+ Undisturbed text.
+dnl Undisturbed text.
+dnl Copyright (C) 89
+dnl Free Software Foundation, Inc.
+dnl Undisturbed text.
+EOF
+UPDATE_COPYRIGHT_YEAR=2010 \
+ update-copyright $TMP 1> $TMP-stdout 2> $TMP-stderr
+compare /dev/null $TMP-stdout || exit 1
+compare /dev/null $TMP-stderr || exit 1
+compare - $TMP <<EOF || exit 1
+ Undisturbed text.
+dnl Undisturbed text.
+dnl Copyright (C) 1989, 2010 Free Software Foundation, Inc.
+dnl Undisturbed text.
+EOF
+rm $TMP*
+
+## --------------- ##
+## Widest prefix. ##
+## --------------- ##
+
+TMP=$TMP_BASE-widest-prefix
+cat > $TMP <<EOF
+#### Copyright (C) 1976, 1977, 1978, 1979, 1980, 1981, 1982, 1983, 1984, 1985,
+#### 1986, 1987, 1988, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007,
+#### 2008 Free Software Foundation, Inc.
+EOF
+UPDATE_COPYRIGHT_YEAR=2010 \
+ update-copyright $TMP 1> $TMP-stdout 2> $TMP-stderr
+compare /dev/null $TMP-stdout || exit 1
+compare /dev/null $TMP-stderr || exit 1
+compare - $TMP <<EOF || exit 1
+#### Copyright (C) 1976, 1977, 1978, 1979, 1980, 1981, 1982, 1983, 1984,
+#### 1985, 1986, 1987, 1988, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
+#### 2006, 2007, 2008, 2010 Free Software Foundation, Inc.
+EOF
+UPDATE_COPYRIGHT_YEAR=2011 UPDATE_COPYRIGHT_USE_INTERVALS=1 \
+ update-copyright $TMP 1> $TMP-stdout 2> $TMP-stderr
+compare /dev/null $TMP-stdout || exit 1
+compare /dev/null $TMP-stderr || exit 1
+compare - $TMP <<EOF || exit 1
+#### Copyright (C) 1976-1988, 1999-2008, 2010-2011 Free Software
+#### Foundation, Inc.
+EOF
+rm $TMP*
+
+## ------------------- ##
+## Prefix too large. ##
+## ------------------- ##
+
+TMP=$TMP_BASE-prefix-too-large
+cat > $TMP <<EOF
+#### Copyright (C) 1976, 1977, 1978, 1979, 1980, 1981, 1982, 1983, 1984, 1985,
+#### 1986, 1987, 1988, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007,
+#### 2008 Free Software Foundation, Inc.
+EOF
+UPDATE_COPYRIGHT_YEAR=2010 \
+ update-copyright $TMP 1> $TMP-stdout 2> $TMP-stderr
+compare /dev/null $TMP-stdout || exit 1
+compare - $TMP-stderr <<EOF || exit 1
+$TMP: warning: copyright statement not found
+EOF
+compare - $TMP <<EOF || exit 1
+#### Copyright (C) 1976, 1977, 1978, 1979, 1980, 1981, 1982, 1983, 1984, 1985,
+#### 1986, 1987, 1988, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007,
+#### 2008 Free Software Foundation, Inc.
+EOF
+rm $TMP*
+
+## ------------- ##
+## Blank lines. ##
+## ------------- ##
+
+TMP=$TMP_BASE-blank-lines
+cat > $TMP <<EOF
+#Copyright (C) 1976, 1977, 1978, 1979, 1980, 1981, 1982, 1983, 1984, 1985,
+#
+#1986, 1987, 1988, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007,
+#2008 Free Software Foundation, Inc.
+
+Copyright (C) 1976, 1977, 1978, 1979, 1980, 1981, 1982, 1983, 1984, 1985,
+
+1986, 1987, 1988, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007,
+2008 Free Software Foundation, Inc.
+EOF
+UPDATE_COPYRIGHT_YEAR=2010 \
+ update-copyright $TMP 1> $TMP-stdout 2> $TMP-stderr
+compare /dev/null $TMP-stdout || exit 1
+compare - $TMP-stderr <<EOF || exit 1
+$TMP: warning: copyright statement not found
+EOF
+compare - $TMP <<EOF || exit 1
+#Copyright (C) 1976, 1977, 1978, 1979, 1980, 1981, 1982, 1983, 1984, 1985,
+#
+#1986, 1987, 1988, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007,
+#2008 Free Software Foundation, Inc.
+
+Copyright (C) 1976, 1977, 1978, 1979, 1980, 1981, 1982, 1983, 1984, 1985,
+
+1986, 1987, 1988, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007,
+2008 Free Software Foundation, Inc.
+EOF
+rm $TMP*
+
+## -------------- ##
+## Leading tabs. ##
+## -------------- ##
+
+TMP=$TMP_BASE-leading-tabs
+cat > $TMP <<EOF
+ Copyright (C) 87, 88, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 98,
+ 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free
+ Software Foundation, Inc.
+EOF
+UPDATE_COPYRIGHT_YEAR=2010 \
+ update-copyright $TMP 1> $TMP-stdout 2> $TMP-stderr
+compare /dev/null $TMP-stdout || exit 1
+compare /dev/null $TMP-stderr || exit 1
+compare - $TMP <<EOF || exit 1
+ Copyright (C) 1987, 1988, 1991, 1992, 1993, 1994, 1995, 1996,
+ 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
+ 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
+EOF
+UPDATE_COPYRIGHT_YEAR=2011 UPDATE_COPYRIGHT_USE_INTERVALS=1 \
+ update-copyright $TMP 1> $TMP-stdout 2> $TMP-stderr
+compare /dev/null $TMP-stdout || exit 1
+compare /dev/null $TMP-stderr || exit 1
+compare - $TMP <<EOF || exit 1
+ Copyright (C) 1987-1988, 1991-2011 Free Software Foundation,
+ Inc.
+EOF
+rm $TMP*
+
+## -------------------- ##
+## Unusual whitespace. ##
+## -------------------- ##
+
+TMP=$TMP_BASE-unusual-ws
+cat > $TMP <<EOF
+ # Copyright (C) 87-88, 1991, 1992, 1993, 1994, 1995, 1996, 1997,
+ # 98, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008,
+ # 2009 Free Software Foundation, Inc.
+EOF
+UPDATE_COPYRIGHT_YEAR=2010 \
+ update-copyright $TMP 1> $TMP-stdout 2> $TMP-stderr
+compare /dev/null $TMP-stdout || exit 1
+compare /dev/null $TMP-stderr || exit 1
+compare - $TMP <<EOF || exit 1
+ # Copyright (C) 1987, 1988, 1991, 1992, 1993, 1994,
+ # 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003,
+ # 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software
+ # Foundation, Inc.
+EOF
+UPDATE_COPYRIGHT_YEAR=2011 UPDATE_COPYRIGHT_USE_INTERVALS=1 \
+ update-copyright $TMP 1> $TMP-stdout 2> $TMP-stderr
+compare /dev/null $TMP-stdout || exit 1
+compare /dev/null $TMP-stderr || exit 1
+compare - $TMP <<EOF || exit 1
+ # Copyright (C) 1987-1988, 1991-2011 Free Software
+ # Foundation, Inc.
+EOF
+UPDATE_COPYRIGHT_YEAR=2011 UPDATE_COPYRIGHT_USE_INTERVALS=2 \
+ UPDATE_COPYRIGHT_FORCE=1 update-copyright $TMP 1> $TMP-stdout 2> $TMP-stderr
+compare /dev/null $TMP-stdout || exit 1
+compare /dev/null $TMP-stderr || exit 1
+compare - $TMP <<EOF || exit 1
+ # Copyright (C) 1987-2011 Free Software Foundation, Inc.
+EOF
+rm $TMP*
+
+## --------- ##
+## DOS EOL. ##
+## --------- ##
+
+TMP=$TMP_BASE-dos-eol
+tr @ '\015' > $TMP <<\EOF
+Rem Copyright (C) 87, 88, 1991, 1992, 1993, 1994, 1995, 1996, 1997,@
+Rem 98, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008,@
+Rem 2009 Free Software Foundation, Inc.@
+EOF
+UPDATE_COPYRIGHT_YEAR=2010 \
+ update-copyright $TMP 1> $TMP-stdout 2> $TMP-stderr
+compare /dev/null $TMP-stdout || exit 1
+compare /dev/null $TMP-stderr || exit 1
+tr @ '\015' > $TMP-exp <<\EOF
+Rem Copyright (C) 1987, 1988, 1991, 1992, 1993, 1994, 1995, 1996, 1997,@
+Rem 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008,@
+Rem 2009, 2010 Free Software Foundation, Inc.@
+EOF
+compare $TMP-exp $TMP || exit 1
+rm $TMP*
+
+## --------------- ##
+## Omitted "(C)". ##
+## --------------- ##
+
+TMP=$TMP_BASE-omitted-circle-c
+cat > $TMP <<EOF
+ Copyright 87, 88, 1991, 1992, 1993, 1994, 1995, 1996, 1997,
+ 98, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008,
+ 2009 Free Software Foundation, Inc.
+EOF
+UPDATE_COPYRIGHT_YEAR=2010 \
+ update-copyright $TMP 1> $TMP-stdout 2> $TMP-stderr
+compare /dev/null $TMP-stdout || exit 1
+compare /dev/null $TMP-stderr || exit 1
+compare - $TMP <<EOF || exit 1
+ Copyright 1987, 1988, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998,
+ 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010
+ Free Software Foundation, Inc.
+EOF
+rm $TMP*
+
+## ------------------ ##
+## C-style comments. ##
+## ------------------ ##
+
+TMP=$TMP_BASE-c-style-comments
+cat > $TMP.star <<EOF
+/* Copyright 87, 88, 1991, 1992, 1993, 1994, 1995, 1996, 1997,
+ * 98, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008,
+ * 2009 Free Software Foundation, Inc. */
+EOF
+cat > $TMP.space <<EOF
+ /*Copyright 87, 88, 1991, 1992, 1993, 1994, 1995, 1996, 1997,
+ 98, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008,
+ 2009 Free Software Foundation, Inc. */
+EOF
+cat > $TMP.single-line <<EOF
+/* Copyright 87, 1991, 1992 Free Software Foundation, Inc. */
+EOF
+cat > $TMP.single-line-wrapped <<EOF
+ /* Copyright 1988, 1991, 1992, 1993 Free Software Foundation, Inc. */
+EOF
+cat > $TMP.extra-text-star <<EOF
+ /* Copyright 1987, 1988, 1991, 1992 Free Software Foundation, Inc. End
+ * More comments. */
+EOF
+cat > $TMP.extra-text-space <<EOF
+ /* Copyright 1987, 1988, 1991, 1992 Free Software Foundation, Inc. ***
+ * End of comments. */
+EOF
+cat > $TMP.two-digit-final-is-substr-of-first <<EOF
+ /* Copyright 1991, 99 Free Software Foundation, Inc. */
+EOF
+UPDATE_COPYRIGHT_YEAR=2010 \
+ update-copyright $TMP.* 1> $TMP-stdout 2> $TMP-stderr
+compare /dev/null $TMP-stdout || exit 1
+compare /dev/null $TMP-stderr || exit 1
+compare - $TMP.star <<EOF || exit 1
+/* Copyright 1987, 1988, 1991, 1992, 1993, 1994, 1995, 1996, 1997,
+ * 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008,
+ * 2009, 2010 Free Software Foundation, Inc. */
+EOF
+compare - $TMP.space <<EOF || exit 1
+ /*Copyright 1987, 1988, 1991, 1992, 1993, 1994, 1995, 1996, 1997,
+ 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008,
+ 2009, 2010 Free Software Foundation, Inc. */
+EOF
+compare - $TMP.single-line <<EOF || exit 1
+/* Copyright 1987, 1991, 1992, 2010 Free Software Foundation, Inc. */
+EOF
+compare - $TMP.single-line-wrapped <<EOF || exit 1
+ /* Copyright 1988, 1991, 1992, 1993, 2010 Free Software Foundation,
+ * Inc. */
+EOF
+compare - $TMP.extra-text-star <<EOF || exit 1
+ /* Copyright 1987, 1988, 1991, 1992, 2010 Free Software Foundation,
+ * Inc. End
+ * More comments. */
+EOF
+compare - $TMP.extra-text-space <<EOF || exit 1
+ /* Copyright 1987, 1988, 1991, 1992, 2010 Free Software Foundation,
+ Inc. ***
+ * End of comments. */
+EOF
+compare - $TMP.two-digit-final-is-substr-of-first <<EOF || exit 1
+ /* Copyright 1991, 1999, 2010 Free Software Foundation, Inc. */
+EOF
+rm $TMP*
+
+exit 0
diff --git a/gnulib-tests/test-vc-list-files-cvs.sh b/gnulib-tests/test-vc-list-files-cvs.sh
new file mode 100755
index 0000000..6262944
--- /dev/null
+++ b/gnulib-tests/test-vc-list-files-cvs.sh
@@ -0,0 +1,53 @@
+#!/bin/sh
+# Unit tests for vc-list-files
+# Copyright (C) 2008-2016 Free Software Foundation, Inc.
+# This file is part of the GNUlib 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,
+# 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/>. */
+
+: ${srcdir=.}
+. "$srcdir/init.sh"; path_prepend_ "$abs_aux_dir" .
+
+tmpdir=vc-cvs
+repo=`pwd`/$tmpdir/repo
+
+fail=0
+for i in with-cvsu without; do
+ # On the first iteration, test using cvsu, if it's in your path.
+ # On the second iteration, ensure that cvsu fails, so we'll
+ # exercise the awk-using code.
+ if test $i = without; then
+ printf '%s\n' '#!/bin/sh' 'exit 1' > cvsu
+ chmod a+x cvsu
+ PATH=`pwd`:$PATH
+ export PATH
+ fi
+ ok=0
+ mkdir $tmpdir && cd $tmpdir &&
+ # without cvs, skip the test
+ { ( cvs -Q -d "$repo" init ) > /dev/null 2>&1 \
+ || skip_ "cvs not found in PATH"; } &&
+ mkdir w && cd w &&
+ mkdir d &&
+ touch d/a b c &&
+ cvs -Q -d "$repo" import -m imp m M M0 &&
+ cvs -Q -d "$repo" co m && cd m &&
+ printf '%s\n' b c d/a > expected &&
+ vc-list-files | sort > actual &&
+ compare expected actual &&
+ ok=1
+ test $ok = 0 && fail=1
+done
+
+Exit $fail
diff --git a/gnulib-tests/test-vc-list-files-git.sh b/gnulib-tests/test-vc-list-files-git.sh
new file mode 100755
index 0000000..4358115
--- /dev/null
+++ b/gnulib-tests/test-vc-list-files-git.sh
@@ -0,0 +1,42 @@
+#!/bin/sh
+# Unit tests for vc-list-files
+# Copyright (C) 2008-2016 Free Software Foundation, Inc.
+# This file is part of the GNUlib 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,
+# 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/>. */
+
+: ${srcdir=.}
+. "$srcdir/init.sh"; path_prepend_ "$abs_aux_dir" .
+
+tmpdir=vc-git-$$
+GIT_DIR= GIT_WORK_TREE=; unset GIT_DIR GIT_WORK_TREE
+
+fail=1
+mkdir $tmpdir && cd $tmpdir &&
+ # without git, skip the test
+ # The double use of 'exit' is needed for the reference to $? inside the trap.
+ { ( git init -q ) > /dev/null 2>&1 \
+ || skip_ "git not found in PATH"; } &&
+ mkdir d &&
+ touch d/a b c &&
+ git config user.email "you@example.com" &&
+ git config user.name "Your Name" &&
+ git add . > /dev/null &&
+ git commit -q -a -m log &&
+ printf '%s\n' b c d/a > expected &&
+ vc-list-files > actual &&
+ compare expected actual &&
+ fail=0
+
+Exit $fail
diff --git a/gnulib-tests/test-verify.c b/gnulib-tests/test-verify.c
new file mode 100644
index 0000000..d7ca053
--- /dev/null
+++ b/gnulib-tests/test-verify.c
@@ -0,0 +1,69 @@
+/* Test the "verify" module.
+
+ Copyright (C) 2005, 2009-2016 Free Software Foundation, Inc.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+/* Written by Bruno Haible. */
+
+#include <config.h>
+
+#include "verify.h"
+
+#ifndef EXP_FAIL
+# define EXP_FAIL 0
+#endif
+
+int x;
+enum { a, b, c };
+
+#if EXP_FAIL == 1
+verify (x >= 0); /* should give ERROR: non-constant expression */
+#endif
+verify (c == 2); /* should be ok */
+#if EXP_FAIL == 2
+verify (1 + 1 == 3); /* should give ERROR */
+#endif
+verify (1 == 1); verify (1 == 1); /* should be ok */
+
+enum
+{
+ item = verify_true (1 == 1) * 0 + 17 /* should be ok */
+};
+
+static int
+function (int n)
+{
+#if EXP_FAIL == 3
+ verify (n >= 0); /* should give ERROR: non-constant expression */
+#endif
+ verify (c == 2); /* should be ok */
+#if EXP_FAIL == 4
+ verify (1 + 1 == 3); /* should give ERROR */
+#endif
+ verify (1 == 1); verify (1 == 1); /* should be ok */
+
+ if (n)
+ return ((void) verify_expr (1 == 1, 1), verify_expr (1 == 1, 8)); /* should be ok */
+#if EXP_FAIL == 5
+ return verify_expr (1 == 2, 5); /* should give ERROR */
+#endif
+ return 0;
+}
+
+int
+main (void)
+{
+ return !(function (0) == 0 && function (1) == 8);
+}
diff --git a/gnulib-tests/test-verify.sh b/gnulib-tests/test-verify.sh
new file mode 100755
index 0000000..3e76761
--- /dev/null
+++ b/gnulib-tests/test-verify.sh
@@ -0,0 +1,24 @@
+#!/bin/sh
+. "${srcdir=.}/init.sh"
+
+# We are not interested in triggering bugs in the compilers and tools
+# (such as gcc 4.3.1 on openSUSE 11.0).
+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) \
+ || skip_ "cannot compile error-free"
+
+# Now, prove that we encounter all expected compilation failures:
+: >out
+: >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 \
+ && { warn_ "compiler didn't detect verification failure $i"; fail=1; }
+done
+
+Exit $fail
diff --git a/gnulib-tests/test-version-etc.c b/gnulib-tests/test-version-etc.c
new file mode 100644
index 0000000..66404a3
--- /dev/null
+++ b/gnulib-tests/test-version-etc.c
@@ -0,0 +1,31 @@
+/* Test suite for version-etc.
+ Copyright (C) 2009-2016 Free Software Foundation, Inc.
+ This file is part of the GNUlib 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,
+ 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 "version-etc.h"
+
+
+#define AUTHORS "Sergey Poznyakoff", "Eric Blake"
+
+int
+main (int argc _GL_UNUSED, char **argv)
+{
+ version_etc (stdout, "test-version-etc", "dummy", "0", AUTHORS,
+ (const char *) NULL);
+ return 0;
+}
diff --git a/gnulib-tests/test-version-etc.sh b/gnulib-tests/test-version-etc.sh
new file mode 100755
index 0000000..1706aef
--- /dev/null
+++ b/gnulib-tests/test-version-etc.sh
@@ -0,0 +1,43 @@
+#! /bin/sh
+# Test suite for version-etc.
+# Copyright (C) 2009-2016 Free Software Foundation, Inc.
+# This file is part of the GNUlib 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,
+# 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/>.
+
+TMP=ve-expected.tmp
+LC_ALL=C
+export LC_ALL
+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>.
+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 |
+ 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
+
+rm $TMP
+
+exit $ERR
diff --git a/gnulib-tests/test-wchar.c b/gnulib-tests/test-wchar.c
new file mode 100644
index 0000000..e118048
--- /dev/null
+++ b/gnulib-tests/test-wchar.c
@@ -0,0 +1,37 @@
+/* Test of <wchar.h> substitute.
+ Copyright (C) 2007-2016 Free Software Foundation, Inc.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+/* Written by Bruno Haible <bruno@clisp.org>, 2007. */
+
+#include <config.h>
+
+#include <wchar.h>
+
+#include "verify.h"
+
+/* Check that the types wchar_t and wint_t are defined. */
+wchar_t a = 'c';
+wint_t b = 'x';
+
+/* Check that NULL can be passed through varargs as a pointer type,
+ per POSIX 2008. */
+verify (sizeof NULL == sizeof (void *));
+
+int
+main (void)
+{
+ return 0;
+}
diff --git a/gnulib-tests/test-wcrtomb-w32-1.sh b/gnulib-tests/test-wcrtomb-w32-1.sh
new file mode 100755
index 0000000..50c82f5
--- /dev/null
+++ b/gnulib-tests/test-wcrtomb-w32-1.sh
@@ -0,0 +1,4 @@
+#!/bin/sh
+
+# Test a CP1252 locale.
+./test-wcrtomb-w32${EXEEXT} French_France 1252
diff --git a/gnulib-tests/test-wcrtomb-w32-2.sh b/gnulib-tests/test-wcrtomb-w32-2.sh
new file mode 100755
index 0000000..783c70c
--- /dev/null
+++ b/gnulib-tests/test-wcrtomb-w32-2.sh
@@ -0,0 +1,4 @@
+#!/bin/sh
+
+# Test a CP1256 locale.
+./test-wcrtomb-w32${EXEEXT} "Arabic_Saudi Arabia" 1256
diff --git a/gnulib-tests/test-wcrtomb-w32-3.sh b/gnulib-tests/test-wcrtomb-w32-3.sh
new file mode 100755
index 0000000..619ea64
--- /dev/null
+++ b/gnulib-tests/test-wcrtomb-w32-3.sh
@@ -0,0 +1,4 @@
+#!/bin/sh
+
+# Test a CP932 locale.
+./test-wcrtomb-w32${EXEEXT} Japanese_Japan 932
diff --git a/gnulib-tests/test-wcrtomb-w32-4.sh b/gnulib-tests/test-wcrtomb-w32-4.sh
new file mode 100755
index 0000000..67b6803
--- /dev/null
+++ b/gnulib-tests/test-wcrtomb-w32-4.sh
@@ -0,0 +1,4 @@
+#!/bin/sh
+
+# Test a CP950 locale.
+./test-wcrtomb-w32${EXEEXT} Chinese_Taiwan 950
diff --git a/gnulib-tests/test-wcrtomb-w32-5.sh b/gnulib-tests/test-wcrtomb-w32-5.sh
new file mode 100755
index 0000000..9841fa9
--- /dev/null
+++ b/gnulib-tests/test-wcrtomb-w32-5.sh
@@ -0,0 +1,4 @@
+#!/bin/sh
+
+# Test a CP936 locale.
+./test-wcrtomb-w32${EXEEXT} Chinese_China 936
diff --git a/gnulib-tests/test-wcrtomb-w32.c b/gnulib-tests/test-wcrtomb-w32.c
new file mode 100644
index 0000000..0570c73
--- /dev/null
+++ b/gnulib-tests/test-wcrtomb-w32.c
@@ -0,0 +1,332 @@
+/* Test of conversion of wide character to multibyte character.
+ Copyright (C) 2008-2016 Free Software Foundation, Inc.
+
+ This 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 <wchar.h>
+
+#include <locale.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+
+#include "macros.h"
+
+#if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
+
+static int
+test_one_locale (const char *name, int codepage)
+{
+ char buf[64];
+ size_t ret;
+
+# if 1
+ /* Portable code to set the locale. */
+ {
+ char name_with_codepage[1024];
+
+ sprintf (name_with_codepage, "%s.%d", name, codepage);
+
+ /* Set the locale. */
+ if (setlocale (LC_ALL, name_with_codepage) == NULL)
+ return 77;
+ }
+# else
+ /* Hacky way to set a locale.codepage combination that setlocale() refuses
+ to set. */
+ {
+ /* Codepage of the current locale, set with setlocale().
+ Not necessarily the same as GetACP(). */
+ extern __declspec(dllimport) unsigned int __lc_codepage;
+
+ /* Set the locale. */
+ if (setlocale (LC_ALL, name) == NULL)
+ return 77;
+
+ /* Clobber the codepage and MB_CUR_MAX, both set by setlocale(). */
+ __lc_codepage = codepage;
+ switch (codepage)
+ {
+ case 1252:
+ case 1256:
+ MB_CUR_MAX = 1;
+ break;
+ case 932:
+ case 950:
+ case 936:
+ MB_CUR_MAX = 2;
+ break;
+ case 54936:
+ case 65001:
+ MB_CUR_MAX = 4;
+ break;
+ }
+
+ /* Test whether the codepage is really available. */
+ {
+ mbstate_t state;
+ wchar_t wc;
+
+ memset (&state, '\0', sizeof (mbstate_t));
+ if (mbrtowc (&wc, " ", 1, &state) == (size_t)(-1))
+ return 77;
+ }
+ }
+# endif
+
+ /* Test NUL character. */
+ {
+ buf[0] = 'x';
+ ret = wcrtomb (buf, 0, NULL);
+ ASSERT (ret == 1);
+ ASSERT (buf[0] == '\0');
+ }
+
+ /* Test single bytes. */
+ {
+ int c;
+
+ for (c = 0; c < 0x100; c++)
+ switch (c)
+ {
+ case '\t': case '\v': case '\f':
+ case ' ': case '!': case '"': case '#': case '%':
+ case '&': case '\'': case '(': case ')': case '*':
+ case '+': case ',': case '-': case '.': case '/':
+ case '0': case '1': case '2': case '3': case '4':
+ case '5': case '6': case '7': case '8': case '9':
+ case ':': case ';': case '<': case '=': case '>':
+ case '?':
+ case 'A': case 'B': case 'C': case 'D': case 'E':
+ case 'F': case 'G': case 'H': case 'I': case 'J':
+ case 'K': case 'L': case 'M': case 'N': case 'O':
+ case 'P': case 'Q': case 'R': case 'S': case 'T':
+ case 'U': case 'V': case 'W': case 'X': case 'Y':
+ case 'Z':
+ case '[': case '\\': case ']': case '^': case '_':
+ case 'a': case 'b': case 'c': case 'd': case 'e':
+ case 'f': case 'g': case 'h': case 'i': case 'j':
+ case 'k': case 'l': case 'm': case 'n': case 'o':
+ case 'p': case 'q': case 'r': case 's': case 't':
+ case 'u': case 'v': case 'w': case 'x': case 'y':
+ case 'z': case '{': case '|': case '}': case '~':
+ /* c is in the ISO C "basic character set". */
+ ret = wcrtomb (buf, btowc (c), NULL);
+ ASSERT (ret == 1);
+ ASSERT (buf[0] == (char) c);
+ break;
+ }
+ }
+
+ /* Test special calling convention, passing a NULL pointer. */
+ {
+ ret = wcrtomb (NULL, '\0', NULL);
+ ASSERT (ret == 1);
+ ret = wcrtomb (NULL, btowc ('x'), NULL);
+ ASSERT (ret == 1);
+ }
+
+ switch (codepage)
+ {
+ case 1252:
+ /* Locale encoding is CP1252, an extension of ISO-8859-1. */
+ {
+ /* Convert "B\374\337er": "Büßer" */
+ memset (buf, 'x', 8);
+ ret = wcrtomb (buf, 0x00FC, NULL);
+ ASSERT (ret == 1);
+ ASSERT (memcmp (buf, "\374", 1) == 0);
+ ASSERT (buf[1] == 'x');
+
+ memset (buf, 'x', 8);
+ ret = wcrtomb (buf, 0x00DF, NULL);
+ ASSERT (ret == 1);
+ ASSERT (memcmp (buf, "\337", 1) == 0);
+ ASSERT (buf[1] == 'x');
+ }
+ return 0;
+
+ case 1256:
+ /* Locale encoding is CP1256, not the same as ISO-8859-6. */
+ {
+ /* Convert "x\302\341\346y": "xآلوy" */
+ memset (buf, 'x', 8);
+ ret = wcrtomb (buf, 0x0622, NULL);
+ ASSERT (ret == 1);
+ ASSERT (memcmp (buf, "\302", 1) == 0);
+ ASSERT (buf[1] == 'x');
+
+ memset (buf, 'x', 8);
+ ret = wcrtomb (buf, 0x0644, NULL);
+ ASSERT (ret == 1);
+ ASSERT (memcmp (buf, "\341", 1) == 0);
+ ASSERT (buf[1] == 'x');
+
+ memset (buf, 'x', 8);
+ ret = wcrtomb (buf, 0x0648, NULL);
+ ASSERT (ret == 1);
+ ASSERT (memcmp (buf, "\346", 1) == 0);
+ ASSERT (buf[1] == 'x');
+ }
+ return 0;
+
+ case 932:
+ /* Locale encoding is CP932, similar to Shift_JIS. */
+ {
+ /* Convert "<\223\372\226\173\214\352>": "<日本語>" */
+ memset (buf, 'x', 8);
+ ret = wcrtomb (buf, 0x65E5, NULL);
+ ASSERT (ret == 2);
+ ASSERT (memcmp (buf, "\223\372", 2) == 0);
+ ASSERT (buf[2] == 'x');
+
+ memset (buf, 'x', 8);
+ ret = wcrtomb (buf, 0x672C, NULL);
+ ASSERT (ret == 2);
+ ASSERT (memcmp (buf, "\226\173", 2) == 0);
+ ASSERT (buf[2] == 'x');
+
+ memset (buf, 'x', 8);
+ ret = wcrtomb (buf, 0x8A9E, NULL);
+ ASSERT (ret == 2);
+ ASSERT (memcmp (buf, "\214\352", 2) == 0);
+ ASSERT (buf[2] == 'x');
+ }
+ return 0;
+
+ case 950:
+ /* Locale encoding is CP950, similar to Big5. */
+ {
+ /* Convert "<\244\351\245\273\273\171>": "<日本語>" */
+ memset (buf, 'x', 8);
+ ret = wcrtomb (buf, 0x65E5, NULL);
+ ASSERT (ret == 2);
+ ASSERT (memcmp (buf, "\244\351", 2) == 0);
+ ASSERT (buf[2] == 'x');
+
+ memset (buf, 'x', 8);
+ ret = wcrtomb (buf, 0x672C, NULL);
+ ASSERT (ret == 2);
+ ASSERT (memcmp (buf, "\245\273", 2) == 0);
+ ASSERT (buf[2] == 'x');
+
+ memset (buf, 'x', 8);
+ ret = wcrtomb (buf, 0x8A9E, NULL);
+ ASSERT (ret == 2);
+ ASSERT (memcmp (buf, "\273\171", 2) == 0);
+ ASSERT (buf[2] == 'x');
+ }
+ return 0;
+
+ case 936:
+ /* Locale encoding is CP936 = GBK, an extension of GB2312. */
+ {
+ /* Convert "<\310\325\261\276\325\132>": "<日本語>" */
+ memset (buf, 'x', 8);
+ ret = wcrtomb (buf, 0x65E5, NULL);
+ ASSERT (ret == 2);
+ ASSERT (memcmp (buf, "\310\325", 2) == 0);
+ ASSERT (buf[2] == 'x');
+
+ memset (buf, 'x', 8);
+ ret = wcrtomb (buf, 0x672C, NULL);
+ ASSERT (ret == 2);
+ ASSERT (memcmp (buf, "\261\276", 2) == 0);
+ ASSERT (buf[2] == 'x');
+
+ memset (buf, 'x', 8);
+ ret = wcrtomb (buf, 0x8A9E, NULL);
+ ASSERT (ret == 2);
+ ASSERT (memcmp (buf, "\325\132", 2) == 0);
+ ASSERT (buf[2] == 'x');
+ }
+ return 0;
+
+ case 54936:
+ /* Locale encoding is CP54936 = GB18030. */
+ {
+ /* Convert "B\250\271\201\060\211\070er": "Büßer" */
+ memset (buf, 'x', 8);
+ ret = wcrtomb (buf, 0x00FC, NULL);
+ ASSERT (ret == 2);
+ ASSERT (memcmp (buf, "\250\271", 2) == 0);
+ ASSERT (buf[2] == 'x');
+
+ memset (buf, 'x', 8);
+ ret = wcrtomb (buf, 0x00DF, NULL);
+ ASSERT (ret == 4);
+ ASSERT (memcmp (buf, "\201\060\211\070", 4) == 0);
+ ASSERT (buf[4] == 'x');
+ }
+ return 0;
+
+ case 65001:
+ /* Locale encoding is CP65001 = UTF-8. */
+ {
+ /* Convert "B\303\274\303\237er": "Büßer" */
+ memset (buf, 'x', 8);
+ ret = wcrtomb (buf, 0x00FC, NULL);
+ ASSERT (ret == 2);
+ ASSERT (memcmp (buf, "\303\274", 2) == 0);
+ ASSERT (buf[2] == 'x');
+
+ memset (buf, 'x', 8);
+ ret = wcrtomb (buf, 0x00DF, NULL);
+ ASSERT (ret == 2);
+ ASSERT (memcmp (buf, "\303\237", 2) == 0);
+ ASSERT (buf[2] == 'x');
+ }
+ return 0;
+
+ default:
+ return 1;
+ }
+}
+
+int
+main (int argc, char *argv[])
+{
+ int codepage = atoi (argv[argc - 1]);
+ int result;
+ int i;
+
+ result = 77;
+ for (i = 1; i < argc - 1; i++)
+ {
+ int ret = test_one_locale (argv[i], codepage);
+
+ if (ret != 77)
+ result = ret;
+ }
+
+ if (result == 77)
+ {
+ fprintf (stderr, "Skipping test: found no locale with codepage %d\n",
+ codepage);
+ }
+ return result;
+}
+
+#else
+
+int
+main (int argc, char *argv[])
+{
+ fputs ("Skipping test: not a native Windows system\n", stderr);
+ return 77;
+}
+
+#endif
diff --git a/gnulib-tests/test-wcrtomb.c b/gnulib-tests/test-wcrtomb.c
new file mode 100644
index 0000000..e1d2bb4
--- /dev/null
+++ b/gnulib-tests/test-wcrtomb.c
@@ -0,0 +1,162 @@
+/* Test of conversion of wide character to multibyte character.
+ Copyright (C) 2008-2016 Free Software Foundation, Inc.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+/* Written by Bruno Haible <bruno@clisp.org>, 2008. */
+
+#include <config.h>
+
+#include <wchar.h>
+
+#include "signature.h"
+SIGNATURE_CHECK (wcrtomb, size_t, (char *, wchar_t, mbstate_t *));
+
+#include <locale.h>
+#include <stdlib.h>
+#include <string.h>
+
+#include "macros.h"
+
+/* Check the multibyte character s[0..n-1]. */
+static void
+check_character (const char *s, size_t n)
+{
+ wchar_t wc;
+ char buf[64];
+ int iret;
+ size_t ret;
+
+ wc = (wchar_t) 0xBADFACE;
+ iret = mbtowc (&wc, s, n);
+ ASSERT (iret == n);
+
+ ret = wcrtomb (buf, wc, NULL);
+ ASSERT (ret == n);
+ ASSERT (memcmp (buf, s, n) == 0);
+
+ /* Test special calling convention, passing a NULL pointer. */
+ ret = wcrtomb (NULL, wc, NULL);
+ ASSERT (ret == 1);
+}
+
+int
+main (int argc, char *argv[])
+{
+ char buf[64];
+ size_t ret;
+
+ /* configure should already have checked that the locale is supported. */
+ if (setlocale (LC_ALL, "") == NULL)
+ return 1;
+
+ /* Test NUL character. */
+ {
+ buf[0] = 'x';
+ ret = wcrtomb (buf, 0, NULL);
+ ASSERT (ret == 1);
+ ASSERT (buf[0] == '\0');
+ }
+
+ /* Test single bytes. */
+ {
+ int c;
+
+ for (c = 0; c < 0x100; c++)
+ switch (c)
+ {
+ case '\t': case '\v': case '\f':
+ case ' ': case '!': case '"': case '#': case '%':
+ case '&': case '\'': case '(': case ')': case '*':
+ case '+': case ',': case '-': case '.': case '/':
+ case '0': case '1': case '2': case '3': case '4':
+ case '5': case '6': case '7': case '8': case '9':
+ case ':': case ';': case '<': case '=': case '>':
+ case '?':
+ case 'A': case 'B': case 'C': case 'D': case 'E':
+ case 'F': case 'G': case 'H': case 'I': case 'J':
+ case 'K': case 'L': case 'M': case 'N': case 'O':
+ case 'P': case 'Q': case 'R': case 'S': case 'T':
+ case 'U': case 'V': case 'W': case 'X': case 'Y':
+ case 'Z':
+ case '[': case '\\': case ']': case '^': case '_':
+ case 'a': case 'b': case 'c': case 'd': case 'e':
+ case 'f': case 'g': case 'h': case 'i': case 'j':
+ case 'k': case 'l': case 'm': case 'n': case 'o':
+ case 'p': case 'q': case 'r': case 's': case 't':
+ case 'u': case 'v': case 'w': case 'x': case 'y':
+ case 'z': case '{': case '|': case '}': case '~':
+ /* c is in the ISO C "basic character set". */
+ ret = wcrtomb (buf, btowc (c), NULL);
+ ASSERT (ret == 1);
+ ASSERT (buf[0] == (char) c);
+ break;
+ }
+ }
+
+ /* Test special calling convention, passing a NULL pointer. */
+ {
+ ret = wcrtomb (NULL, '\0', NULL);
+ ASSERT (ret == 1);
+ ret = wcrtomb (NULL, btowc ('x'), NULL);
+ ASSERT (ret == 1);
+ }
+
+ if (argc > 1)
+ switch (argv[1][0])
+ {
+ case '1':
+ /* Locale encoding is ISO-8859-1 or ISO-8859-15. */
+ {
+ const char input[] = "B\374\337er"; /* "Büßer" */
+
+ check_character (input + 1, 1);
+ check_character (input + 2, 1);
+ }
+ return 0;
+
+ case '2':
+ /* Locale encoding is UTF-8. */
+ {
+ const char input[] = "B\303\274\303\237er"; /* "Büßer" */
+
+ check_character (input + 1, 2);
+ check_character (input + 3, 2);
+ }
+ return 0;
+
+ case '3':
+ /* Locale encoding is EUC-JP. */
+ {
+ const char input[] = "<\306\374\313\334\270\354>"; /* "<日本語>" */
+
+ check_character (input + 1, 2);
+ check_character (input + 3, 2);
+ check_character (input + 5, 2);
+ }
+ return 0;
+
+ case '4':
+ /* Locale encoding is GB18030. */
+ {
+ const char input[] = "B\250\271\201\060\211\070er"; /* "Büßer" */
+
+ check_character (input + 1, 2);
+ check_character (input + 3, 4);
+ }
+ return 0;
+ }
+
+ return 1;
+}
diff --git a/gnulib-tests/test-wcrtomb.sh b/gnulib-tests/test-wcrtomb.sh
new file mode 100755
index 0000000..3eda8f3
--- /dev/null
+++ b/gnulib-tests/test-wcrtomb.sh
@@ -0,0 +1,35 @@
+#!/bin/sh
+
+# Test in an ISO-8859-1 or ISO-8859-15 locale.
+: ${LOCALE_FR=fr_FR}
+if test $LOCALE_FR != none; then
+ LC_ALL=$LOCALE_FR \
+ ./test-wcrtomb${EXEEXT} 1 \
+ || exit 1
+fi
+
+# Test whether a specific UTF-8 locale is installed.
+: ${LOCALE_FR_UTF8=fr_FR.UTF-8}
+if test $LOCALE_FR_UTF8 != none; then
+ LC_ALL=$LOCALE_FR_UTF8 \
+ ./test-wcrtomb${EXEEXT} 2 \
+ || exit 1
+fi
+
+# Test whether a specific EUC-JP locale is installed.
+: ${LOCALE_JA=ja_JP}
+if test $LOCALE_JA != none; then
+ LC_ALL=$LOCALE_JA \
+ ./test-wcrtomb${EXEEXT} 3 \
+ || exit 1
+fi
+
+# Test whether a specific GB18030 locale is installed.
+: ${LOCALE_ZH_CN=zh_CN.GB18030}
+if test $LOCALE_ZH_CN != none; then
+ LC_ALL=$LOCALE_ZH_CN \
+ ./test-wcrtomb${EXEEXT} 4 \
+ || exit 1
+fi
+
+exit 0
diff --git a/gnulib-tests/test-wctype-h.c b/gnulib-tests/test-wctype-h.c
new file mode 100644
index 0000000..b401091
--- /dev/null
+++ b/gnulib-tests/test-wctype-h.c
@@ -0,0 +1,74 @@
+/* Test of <wctype.h> substitute.
+ Copyright (C) 2007-2016 Free Software Foundation, Inc.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+/* Written by Bruno Haible <bruno@clisp.org>, 2007. */
+
+#include <config.h>
+
+#include <wctype.h>
+
+#include "macros.h"
+
+/* Check that the type wint_t is defined. */
+wint_t a = 'x';
+/* Check that WEOF is defined. */
+wint_t e = WEOF;
+
+/* Check that the type wctype_t is defined. */
+wctype_t p;
+
+/* Check that the type wctrans_t is defined. */
+wctrans_t q;
+
+int
+main (void)
+{
+ /* Check that the isw* functions exist as functions or as macros. */
+ (void) iswalnum (0);
+ (void) iswalpha (0);
+ (void) iswcntrl (0);
+ (void) iswdigit (0);
+ (void) iswgraph (0);
+ (void) iswlower (0);
+ (void) iswprint (0);
+ (void) iswpunct (0);
+ (void) iswspace (0);
+ (void) iswupper (0);
+ (void) iswxdigit (0);
+
+ /* Check that the isw* functions map WEOF to 0. */
+ ASSERT (!iswalnum (e));
+ ASSERT (!iswalpha (e));
+ ASSERT (!iswcntrl (e));
+ ASSERT (!iswdigit (e));
+ ASSERT (!iswgraph (e));
+ ASSERT (!iswlower (e));
+ ASSERT (!iswprint (e));
+ ASSERT (!iswpunct (e));
+ ASSERT (!iswspace (e));
+ ASSERT (!iswupper (e));
+ ASSERT (!iswxdigit (e));
+
+ /* Check that the tow* functions exist as functions or as macros. */
+ (void) towlower (0);
+ (void) towupper (0);
+
+ /* Check that the tow* functions map WEOF to WEOF. */
+ ASSERT (towlower (e) == e);
+ ASSERT (towupper (e) == e);
+
+ return 0;
+}
diff --git a/gnulib-tests/test-xalloc-die.c b/gnulib-tests/test-xalloc-die.c
new file mode 100644
index 0000000..f681ca5
--- /dev/null
+++ b/gnulib-tests/test-xalloc-die.c
@@ -0,0 +1,28 @@
+/* Test of xalloc_die() function.
+ Copyright (C) 2009-2016 Free Software Foundation, Inc.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+/* Written by Simon Josefsson <simon@josefsson.org>, 2009. */
+
+#include <config.h>
+
+#include "xalloc.h"
+
+int
+main (int argc _GL_UNUSED, char **argv)
+{
+ xalloc_die ();
+ return 0;
+}
diff --git a/gnulib-tests/test-xalloc-die.sh b/gnulib-tests/test-xalloc-die.sh
new file mode 100755
index 0000000..fba601f
--- /dev/null
+++ b/gnulib-tests/test-xalloc-die.sh
@@ -0,0 +1,36 @@
+#!/bin/sh
+# Test suite for xalloc_die.
+# Copyright (C) 2009-2016 Free Software Foundation, Inc.
+# This file is part of the GNUlib 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,
+# 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/>.
+
+. "${srcdir=.}/init.sh"; path_prepend_ .
+
+test-xalloc-die${EXEEXT} > out 2> err
+case $? in
+ 1) ;;
+ *) Exit 1;;
+esac
+
+tr -d '\015' < err \
+ | sed 's,.*test-xalloc-die[.ex]*:,test-xalloc-die:,' > err2 || Exit 1
+
+compare - err2 <<\EOF || Exit 1
+test-xalloc-die: memory exhausted
+EOF
+
+test -s out && Exit 1
+
+Exit $fail
diff --git a/gnulib-tests/unsetenv.c b/gnulib-tests/unsetenv.c
new file mode 100644
index 0000000..8368744
--- /dev/null
+++ b/gnulib-tests/unsetenv.c
@@ -0,0 +1,127 @@
+/* Copyright (C) 1992, 1995-2002, 2005-2016 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,
+ 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/>. */
+
+/* Don't use __attribute__ __nonnull__ in this compilation unit. Otherwise gcc
+ optimizes away the name == NULL test below. */
+#define _GL_ARG_NONNULL(params)
+
+#include <config.h>
+
+/* Specification. */
+#include <stdlib.h>
+
+#include <errno.h>
+#if !_LIBC
+# define __set_errno(ev) ((errno) = (ev))
+#endif
+
+#include <string.h>
+#include <unistd.h>
+
+#if !_LIBC
+# define __environ environ
+#endif
+
+#if _LIBC
+/* This lock protects against simultaneous modifications of 'environ'. */
+# include <bits/libc-lock.h>
+__libc_lock_define_initialized (static, envlock)
+# define LOCK __libc_lock_lock (envlock)
+# define UNLOCK __libc_lock_unlock (envlock)
+#else
+# define LOCK
+# define UNLOCK
+#endif
+
+/* In the GNU C library we must keep the namespace clean. */
+#ifdef _LIBC
+# define unsetenv __unsetenv
+#endif
+
+#if _LIBC || !HAVE_UNSETENV
+
+int
+unsetenv (const char *name)
+{
+ size_t len;
+ char **ep;
+
+ if (name == NULL || *name == '\0' || strchr (name, '=') != NULL)
+ {
+ __set_errno (EINVAL);
+ return -1;
+ }
+
+ len = strlen (name);
+
+ LOCK;
+
+ ep = __environ;
+ while (*ep != NULL)
+ if (!strncmp (*ep, name, len) && (*ep)[len] == '=')
+ {
+ /* Found it. Remove this pointer by moving later ones back. */
+ char **dp = ep;
+
+ do
+ dp[0] = dp[1];
+ while (*dp++);
+ /* Continue the loop in case NAME appears again. */
+ }
+ else
+ ++ep;
+
+ UNLOCK;
+
+ return 0;
+}
+
+#ifdef _LIBC
+# undef unsetenv
+weak_alias (__unsetenv, unsetenv)
+#endif
+
+#else /* HAVE_UNSETENV */
+
+# undef unsetenv
+# if !HAVE_DECL_UNSETENV
+# if VOID_UNSETENV
+extern void unsetenv (const char *);
+# else
+extern int unsetenv (const char *);
+# endif
+# endif
+
+/* Call the underlying unsetenv, in case there is hidden bookkeeping
+ that needs updating beyond just modifying environ. */
+int
+rpl_unsetenv (const char *name)
+{
+ int result = 0;
+ if (!name || !*name || strchr (name, '='))
+ {
+ errno = EINVAL;
+ return -1;
+ }
+ while (getenv (name))
+# if !VOID_UNSETENV
+ result =
+# endif
+ unsetenv (name);
+ return result;
+}
+
+#endif /* HAVE_UNSETENV */
diff --git a/gnulib-tests/zerosize-ptr.h b/gnulib-tests/zerosize-ptr.h
new file mode 100644
index 0000000..e6ff672
--- /dev/null
+++ b/gnulib-tests/zerosize-ptr.h
@@ -0,0 +1,68 @@
+/* Return a pointer to a zero-size object in memory.
+ Copyright (C) 2009-2016 Free Software Foundation, Inc.
+
+ This 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/>. */
+
+/* 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
+ be dereferenced, if possible. */
+
+#include <stdlib.h>
+
+/* Test whether mmap() and mprotect() are available.
+ We don't use HAVE_MMAP, because AC_FUNC_MMAP would not define it on HP-UX.
+ HAVE_MPROTECT is not enough, because mingw does not have mmap() but has an
+ mprotect() function in libgcc.a. */
+#if HAVE_SYS_MMAN_H && HAVE_MPROTECT
+# include <fcntl.h>
+# include <unistd.h>
+# include <sys/types.h>
+# include <sys/mman.h>
+/* Define MAP_FILE when it isn't otherwise. */
+# ifndef MAP_FILE
+# define MAP_FILE 0
+# endif
+#endif
+
+/* Return a pointer to a zero-size object in memory (that is, actually, a
+ pointer to a page boundary where the previous page is readable and writable
+ and the next page is neither readable not writable), if possible.
+ Return NULL otherwise. */
+
+static void *
+zerosize_ptr (void)
+{
+/* Use mmap and mprotect when they exist. Don't test HAVE_MMAP, because it is
+ not defined on HP-UX 11 (since it does not support MAP_FIXED). */
+#if HAVE_SYS_MMAN_H && HAVE_MPROTECT
+# if HAVE_MAP_ANONYMOUS
+ const int flags = MAP_ANONYMOUS | MAP_PRIVATE;
+ const int fd = -1;
+# else /* !HAVE_MAP_ANONYMOUS */
+ const int flags = MAP_FILE | MAP_PRIVATE;
+ int fd = open ("/dev/zero", O_RDONLY, 0666);
+ if (fd >= 0)
+# endif
+ {
+ int pagesize = getpagesize ();
+ char *two_pages =
+ (char *) mmap (NULL, 2 * pagesize, PROT_READ | PROT_WRITE,
+ flags, fd, 0);
+ if (two_pages != (char *)(-1)
+ && mprotect (two_pages + pagesize, pagesize, PROT_NONE) == 0)
+ return two_pages + pagesize;
+ }
+#endif
+ return NULL;
+}
diff --git a/init.cfg b/init.cfg
new file mode 100644
index 0000000..55aeed6
--- /dev/null
+++ b/init.cfg
@@ -0,0 +1,105 @@
+# This file is sourced by init.sh, *before* its initialization.
+
+# Copyright (C) 2010-2016 Free Software Foundation, Inc.
+
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# This goes hand in hand with the "exec 9>&2;" in tests/Makefile.am's
+# TESTS_ENVIRONMENT definition.
+stderr_fileno_=9
+
+# Skip the current test if valgrind doesn't work,
+# which could happen if not installed,
+# or hasn't support for the built architecture,
+# or hasn't appropriate error suppressions installed etc.
+require_valgrind_()
+{
+ valgrind --error-exitcode=1 true 2>/dev/null ||
+ skip_ "requires a working valgrind"
+}
+
+# Call this with a list of programs under test immediately after
+# sourcing init.sh.
+print_ver_()
+{
+ if test "$VERBOSE" = yes; then
+ local i
+ for i in $*; do
+ env $i --version
+ done
+ fi
+}
+
+# Some tests would fail without this particular locale.
+# If the locale is not available, just skip the test.
+require_en_utf8_locale_()
+{
+ path_prepend_ ./testsuite
+ case $(get-mb-cur-max en_US.UTF-8) in
+ [3456]) ;;
+ *) skip_ 'en_US.UTF-8 locale not found' ;;
+ esac
+}
+
+require_el_iso88597_locale_()
+{
+ path_prepend_ ./testsuite
+ case $(get-mb-cur-max el_GR.iso88597) in
+ 1) ;;
+ *) skip_ 'el_GR.iso88597 locale not found' ;;
+ esac
+}
+
+# Some tests would fail without this particular locale.
+# If the locale is not available, just skip the test.
+# The exact spelling differs between operating systems
+# (ja_JP.shiftjis on Ubuntu, ja_JP.sjis on Debian, ja_JP.SJIS on Mac OS X).
+# If a sjift-jis locale is found the function sets shell variable
+# 'LOCALE_JA_SJIS' to the locale name.
+require_ja_shiftjis_locale_()
+{
+ path_prepend_ ./testsuite
+ LOCALE_JA_SJIS=
+ for l in shiftjis sjis SJIS ; do
+ n=$(get-mb-cur-max ja_JP.$l) || continue
+ test 2 -eq "$n" || continue
+ LOCALE_JA_SJIS="ja_JP.$l"
+ break
+ done
+ test -z "$LOCALE_JA_SJIS" && skip_ 'ja_JP shift-jis locale not found'
+}
+
+# Ensure the implementation of mbrtowc can detect invalid
+# multibyte shiftjis sequences. Otherwise, skip the test, to avoid
+# false-alarms.
+# "$1" should be the name of the SHIFT-JIS locale
+# (as set by 'require_ja_shiftjis_locale_' above)
+require_valid_ja_shiftjis_locale_()
+{
+ path_prepend_ ./testsuite
+ local n=$(printf '\203:' | LC_ALL="$1" test-mbrtowc)
+ test "x$n" = "x-2,-1" || skip_ "locale '$1' is buggy"
+}
+
+# Ensure the implementation of mbrtowc can detect invalid
+# multibyte eucJP sequences. Otherwise, skip the test, to avoid
+# false-alarms.
+# "$1" should be the name of the ja_JP.eucJP locale
+# (as set in $LOCALE_JA by m4/locale-ja.m4)
+require_valid_ja_eucjp_locale_()
+{
+ path_prepend_ .
+ local n=$(printf '\262C' | LC_ALL="$1" test-mbrtowc)
+ test "x$n" = "x-2,-1" || skip_ "locale '$1' is buggy"
+}
diff --git a/lib/Makefile.am b/lib/Makefile.am
deleted file mode 100644
index 73c1b33..0000000
--- a/lib/Makefile.am
+++ /dev/null
@@ -1,8 +0,0 @@
-## Process this file with automake to produce Makefile.in
-
-include gnulib.mk
-
-SUFFIXES += .a .o .c .y .l .h .sh .elc .el
-
-AM_CPPFLAGS += -I$(top_srcdir)/lib -I$(top_srcdir) -I$(top_builddir)/lib
-
diff --git a/lib/Makefile.in b/lib/Makefile.in
deleted file mode 100644
index 00c857f..0000000
--- a/lib/Makefile.in
+++ /dev/null
@@ -1,2636 +0,0 @@
-# Makefile.in generated by automake 1.12.2 from Makefile.am.
-# @configure_input@
-
-# Copyright (C) 1994-2012 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.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
-# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
-# PARTICULAR PURPOSE.
-
-@SET_MAKE@
-
-# Copyright (C) 2002-2012 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
-# 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 this file. If not, see <http://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
-# contains a configuration script generated by Autoconf, under
-# the same distribution terms as the rest of that program.
-#
-# Generated by gnulib-tool.
-# Reproduce by: gnulib-tool --import --dir=. --local-dir=gl --lib=libsed --source-base=lib --m4-base=m4 --doc-base=doc --tests-base=tests --aux-dir=build-aux --no-conditional-dependencies --no-libtool --macro-prefix=gl acl alloca btowc c-ctype extensions fwriting getdelim getopt gettext-h localcharset mbrlen mbrtowc mbsinit memchr mkostemp obstack pathmax regex rename selinux-h ssize_t stat-macros stdbool strerror strverscmp unlocked-io verify version-etc-fsf wcrtomb wctob
-
-
-
-VPATH = @srcdir@
-am__make_dryrun = \
- { \
- am__dry=no; \
- case $$MAKEFLAGS in \
- *\\[\ \ ]*) \
- echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \
- | grep '^AM OK$$' >/dev/null || am__dry=yes;; \
- *) \
- for am__flg in $$MAKEFLAGS; do \
- case $$am__flg in \
- *=*|--*) ;; \
- *n*) am__dry=yes; break;; \
- esac; \
- done;; \
- esac; \
- test $$am__dry = yes; \
- }
-pkgdatadir = $(datadir)/@PACKAGE@
-pkgincludedir = $(includedir)/@PACKAGE@
-pkglibdir = $(libdir)/@PACKAGE@
-am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
-install_sh_DATA = $(install_sh) -c -m 644
-install_sh_PROGRAM = $(install_sh) -c
-install_sh_SCRIPT = $(install_sh) -c
-INSTALL_HEADER = $(INSTALL_DATA)
-transform = $(program_transform_name)
-NORMAL_INSTALL = :
-PRE_INSTALL = :
-POST_INSTALL = :
-NORMAL_UNINSTALL = :
-PRE_UNINSTALL = :
-POST_UNINSTALL = :
-build_triplet = @build@
-host_triplet = @host@
-DIST_COMMON = $(noinst_HEADERS) $(srcdir)/Makefile.am \
- $(srcdir)/Makefile.in $(srcdir)/gnulib.mk \
- $(top_srcdir)/build-aux/depcomp alloca.c
-subdir = lib
-ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
-am__aclocal_m4_deps = $(top_srcdir)/m4/00gnulib.m4 \
- $(top_srcdir)/m4/acl.m4 $(top_srcdir)/m4/alloca.m4 \
- $(top_srcdir)/m4/btowc.m4 $(top_srcdir)/m4/canonicalize.m4 \
- $(top_srcdir)/m4/codeset.m4 $(top_srcdir)/m4/configmake.m4 \
- $(top_srcdir)/m4/dirname.m4 \
- $(top_srcdir)/m4/double-slash-root.m4 \
- $(top_srcdir)/m4/eealloc.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/fstat.m4 \
- $(top_srcdir)/m4/fwriting.m4 $(top_srcdir)/m4/getdelim.m4 \
- $(top_srcdir)/m4/getopt.m4 $(top_srcdir)/m4/gettext.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/iconv.m4 \
- $(top_srcdir)/m4/include_next.m4 \
- $(top_srcdir)/m4/intlmacosx.m4 $(top_srcdir)/m4/langinfo_h.m4 \
- $(top_srcdir)/m4/largefile.m4 $(top_srcdir)/m4/lib-ld.m4 \
- $(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \
- $(top_srcdir)/m4/localcharset.m4 $(top_srcdir)/m4/locale-fr.m4 \
- $(top_srcdir)/m4/locale-ja.m4 $(top_srcdir)/m4/locale-zh.m4 \
- $(top_srcdir)/m4/locale_h.m4 $(top_srcdir)/m4/localeconv.m4 \
- $(top_srcdir)/m4/longlong.m4 $(top_srcdir)/m4/lstat.m4 \
- $(top_srcdir)/m4/malloc.m4 $(top_srcdir)/m4/malloca.m4 \
- $(top_srcdir)/m4/mbrlen.m4 $(top_srcdir)/m4/mbrtowc.m4 \
- $(top_srcdir)/m4/mbsinit.m4 $(top_srcdir)/m4/mbstate_t.m4 \
- $(top_srcdir)/m4/mbtowc.m4 $(top_srcdir)/m4/memchr.m4 \
- $(top_srcdir)/m4/mkostemp.m4 $(top_srcdir)/m4/mmap-anon.m4 \
- $(top_srcdir)/m4/msvc-inval.m4 \
- $(top_srcdir)/m4/msvc-nothrow.m4 $(top_srcdir)/m4/multiarch.m4 \
- $(top_srcdir)/m4/nl_langinfo.m4 $(top_srcdir)/m4/nls.m4 \
- $(top_srcdir)/m4/nocrash.m4 $(top_srcdir)/m4/off_t.m4 \
- $(top_srcdir)/m4/pathmax.m4 $(top_srcdir)/m4/po.m4 \
- $(top_srcdir)/m4/progtest.m4 $(top_srcdir)/m4/quote.m4 \
- $(top_srcdir)/m4/quotearg.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/selinux-context-h.m4 \
- $(top_srcdir)/m4/selinux-selinux-h.m4 \
- $(top_srcdir)/m4/ssize_t.m4 $(top_srcdir)/m4/stat.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/strerror.m4 $(top_srcdir)/m4/string_h.m4 \
- $(top_srcdir)/m4/strverscmp.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/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/wchar_h.m4 \
- $(top_srcdir)/m4/wchar_t.m4 $(top_srcdir)/m4/wcrtomb.m4 \
- $(top_srcdir)/m4/wctob.m4 $(top_srcdir)/m4/wctomb.m4 \
- $(top_srcdir)/m4/wctype_h.m4 $(top_srcdir)/m4/wint_t.m4 \
- $(top_srcdir)/m4/xalloc.m4 $(top_srcdir)/configure.ac
-am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
- $(ACLOCAL_M4)
-mkinstalldirs = $(install_sh) -d
-CONFIG_HEADER = $(top_builddir)/config.h
-CONFIG_CLEAN_FILES =
-CONFIG_CLEAN_VPATH_FILES =
-LIBRARIES = $(noinst_LIBRARIES)
-libsed_a_AR = $(AR) $(ARFLAGS)
-am__DEPENDENCIES_1 =
-am_libsed_a_OBJECTS = set-mode-acl.$(OBJEXT) copy-acl.$(OBJEXT) \
- file-has-acl.$(OBJEXT) c-ctype.$(OBJEXT) \
- c-strcasecmp.$(OBJEXT) c-strncasecmp.$(OBJEXT) \
- dirname-lgpl.$(OBJEXT) basename-lgpl.$(OBJEXT) \
- stripslash.$(OBJEXT) exitfail.$(OBJEXT) localcharset.$(OBJEXT) \
- malloca.$(OBJEXT) quotearg.$(OBJEXT) se-context.$(OBJEXT) \
- se-selinux.$(OBJEXT) stdio.$(OBJEXT) tempname.$(OBJEXT) \
- unistd.$(OBJEXT) version-etc.$(OBJEXT) \
- version-etc-fsf.$(OBJEXT) wctype-h.$(OBJEXT) xmalloc.$(OBJEXT) \
- xalloc-die.$(OBJEXT)
-libsed_a_OBJECTS = $(am_libsed_a_OBJECTS)
-LTLIBRARIES = $(noinst_LTLIBRARIES)
-DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)
-depcomp = $(SHELL) $(top_srcdir)/build-aux/depcomp
-am__depfiles_maybe = depfiles
-am__mv = mv -f
-COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
- $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
-CCLD = $(CC)
-LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
-SOURCES = $(libsed_a_SOURCES) $(EXTRA_libsed_a_SOURCES)
-DIST_SOURCES = $(libsed_a_SOURCES) $(EXTRA_libsed_a_SOURCES)
-RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \
- html-recursive info-recursive install-data-recursive \
- install-dvi-recursive install-exec-recursive \
- install-html-recursive install-info-recursive \
- install-pdf-recursive install-ps-recursive install-recursive \
- installcheck-recursive installdirs-recursive pdf-recursive \
- ps-recursive uninstall-recursive
-am__can_run_installinfo = \
- case $$AM_UPDATE_INFO_DIR in \
- n|no|NO) false;; \
- *) (install-info --version) >/dev/null 2>&1;; \
- esac
-HEADERS = $(noinst_HEADERS)
-RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \
- distclean-recursive maintainer-clean-recursive
-AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \
- $(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \
- distdir
-ETAGS = etags
-CTAGS = ctags
-DIST_SUBDIRS = $(SUBDIRS)
-DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
-am__relativize = \
- dir0=`pwd`; \
- sed_first='s,^\([^/]*\)/.*$$,\1,'; \
- sed_rest='s,^[^/]*/*,,'; \
- sed_last='s,^.*/\([^/]*\)$$,\1,'; \
- sed_butlast='s,/*[^/]*$$,,'; \
- while test -n "$$dir1"; do \
- first=`echo "$$dir1" | sed -e "$$sed_first"`; \
- if test "$$first" != "."; then \
- if test "$$first" = ".."; then \
- dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \
- dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \
- else \
- first2=`echo "$$dir2" | sed -e "$$sed_first"`; \
- if test "$$first2" = "$$first"; then \
- dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \
- else \
- dir2="../$$dir2"; \
- fi; \
- dir0="$$dir0"/"$$first"; \
- fi; \
- fi; \
- dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \
- done; \
- reldir="$$dir2"
-pkglibexecdir = @pkglibexecdir@
-ACLOCAL = @ACLOCAL@
-ALLOCA = @ALLOCA@
-ALLOCA_H = @ALLOCA_H@
-AMTAR = @AMTAR@
-APPLE_UNIVERSAL_BUILD = @APPLE_UNIVERSAL_BUILD@
-AR = @AR@
-ARFLAGS = @ARFLAGS@
-AUTOCONF = @AUTOCONF@
-AUTOHEADER = @AUTOHEADER@
-AUTOMAKE = @AUTOMAKE@
-AWK = @AWK@
-BITSIZEOF_PTRDIFF_T = @BITSIZEOF_PTRDIFF_T@
-BITSIZEOF_SIG_ATOMIC_T = @BITSIZEOF_SIG_ATOMIC_T@
-BITSIZEOF_SIZE_T = @BITSIZEOF_SIZE_T@
-BITSIZEOF_WCHAR_T = @BITSIZEOF_WCHAR_T@
-BITSIZEOF_WINT_T = @BITSIZEOF_WINT_T@
-CC = @CC@
-CCDEPMODE = @CCDEPMODE@
-CFLAGS = @CFLAGS@
-COPYRIGHT_YEAR = @COPYRIGHT_YEAR@
-CPP = @CPP@
-CPPFLAGS = @CPPFLAGS@
-CYGPATH_W = @CYGPATH_W@
-DEFS = @DEFS@
-DEPDIR = @DEPDIR@
-ECHO_C = @ECHO_C@
-ECHO_N = @ECHO_N@
-ECHO_T = @ECHO_T@
-EGREP = @EGREP@
-EMULTIHOP_HIDDEN = @EMULTIHOP_HIDDEN@
-EMULTIHOP_VALUE = @EMULTIHOP_VALUE@
-ENOLINK_HIDDEN = @ENOLINK_HIDDEN@
-ENOLINK_VALUE = @ENOLINK_VALUE@
-EOVERFLOW_HIDDEN = @EOVERFLOW_HIDDEN@
-EOVERFLOW_VALUE = @EOVERFLOW_VALUE@
-ERRNO_H = @ERRNO_H@
-EXEEXT = @EXEEXT@
-GETOPT_H = @GETOPT_H@
-GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@
-GLIBC21 = @GLIBC21@
-GMSGFMT = @GMSGFMT@
-GMSGFMT_015 = @GMSGFMT_015@
-GNULIB_ATOLL = @GNULIB_ATOLL@
-GNULIB_BTOWC = @GNULIB_BTOWC@
-GNULIB_CALLOC_POSIX = @GNULIB_CALLOC_POSIX@
-GNULIB_CANONICALIZE_FILE_NAME = @GNULIB_CANONICALIZE_FILE_NAME@
-GNULIB_CHDIR = @GNULIB_CHDIR@
-GNULIB_CHOWN = @GNULIB_CHOWN@
-GNULIB_CLOSE = @GNULIB_CLOSE@
-GNULIB_DPRINTF = @GNULIB_DPRINTF@
-GNULIB_DUP = @GNULIB_DUP@
-GNULIB_DUP2 = @GNULIB_DUP2@
-GNULIB_DUP3 = @GNULIB_DUP3@
-GNULIB_DUPLOCALE = @GNULIB_DUPLOCALE@
-GNULIB_ENVIRON = @GNULIB_ENVIRON@
-GNULIB_EUIDACCESS = @GNULIB_EUIDACCESS@
-GNULIB_FACCESSAT = @GNULIB_FACCESSAT@
-GNULIB_FCHDIR = @GNULIB_FCHDIR@
-GNULIB_FCHMODAT = @GNULIB_FCHMODAT@
-GNULIB_FCHOWNAT = @GNULIB_FCHOWNAT@
-GNULIB_FCLOSE = @GNULIB_FCLOSE@
-GNULIB_FCNTL = @GNULIB_FCNTL@
-GNULIB_FDATASYNC = @GNULIB_FDATASYNC@
-GNULIB_FDOPEN = @GNULIB_FDOPEN@
-GNULIB_FFLUSH = @GNULIB_FFLUSH@
-GNULIB_FFSL = @GNULIB_FFSL@
-GNULIB_FFSLL = @GNULIB_FFSLL@
-GNULIB_FGETC = @GNULIB_FGETC@
-GNULIB_FGETS = @GNULIB_FGETS@
-GNULIB_FOPEN = @GNULIB_FOPEN@
-GNULIB_FPRINTF = @GNULIB_FPRINTF@
-GNULIB_FPRINTF_POSIX = @GNULIB_FPRINTF_POSIX@
-GNULIB_FPURGE = @GNULIB_FPURGE@
-GNULIB_FPUTC = @GNULIB_FPUTC@
-GNULIB_FPUTS = @GNULIB_FPUTS@
-GNULIB_FREAD = @GNULIB_FREAD@
-GNULIB_FREOPEN = @GNULIB_FREOPEN@
-GNULIB_FSCANF = @GNULIB_FSCANF@
-GNULIB_FSEEK = @GNULIB_FSEEK@
-GNULIB_FSEEKO = @GNULIB_FSEEKO@
-GNULIB_FSTAT = @GNULIB_FSTAT@
-GNULIB_FSTATAT = @GNULIB_FSTATAT@
-GNULIB_FSYNC = @GNULIB_FSYNC@
-GNULIB_FTELL = @GNULIB_FTELL@
-GNULIB_FTELLO = @GNULIB_FTELLO@
-GNULIB_FTRUNCATE = @GNULIB_FTRUNCATE@
-GNULIB_FUTIMENS = @GNULIB_FUTIMENS@
-GNULIB_FWRITE = @GNULIB_FWRITE@
-GNULIB_GETC = @GNULIB_GETC@
-GNULIB_GETCHAR = @GNULIB_GETCHAR@
-GNULIB_GETCWD = @GNULIB_GETCWD@
-GNULIB_GETDELIM = @GNULIB_GETDELIM@
-GNULIB_GETDOMAINNAME = @GNULIB_GETDOMAINNAME@
-GNULIB_GETDTABLESIZE = @GNULIB_GETDTABLESIZE@
-GNULIB_GETGROUPS = @GNULIB_GETGROUPS@
-GNULIB_GETHOSTNAME = @GNULIB_GETHOSTNAME@
-GNULIB_GETLINE = @GNULIB_GETLINE@
-GNULIB_GETLOADAVG = @GNULIB_GETLOADAVG@
-GNULIB_GETLOGIN = @GNULIB_GETLOGIN@
-GNULIB_GETLOGIN_R = @GNULIB_GETLOGIN_R@
-GNULIB_GETPAGESIZE = @GNULIB_GETPAGESIZE@
-GNULIB_GETSUBOPT = @GNULIB_GETSUBOPT@
-GNULIB_GETTIMEOFDAY = @GNULIB_GETTIMEOFDAY@
-GNULIB_GETUSERSHELL = @GNULIB_GETUSERSHELL@
-GNULIB_GL_UNISTD_H_GETOPT = @GNULIB_GL_UNISTD_H_GETOPT@
-GNULIB_GRANTPT = @GNULIB_GRANTPT@
-GNULIB_GROUP_MEMBER = @GNULIB_GROUP_MEMBER@
-GNULIB_ISATTY = @GNULIB_ISATTY@
-GNULIB_ISWBLANK = @GNULIB_ISWBLANK@
-GNULIB_ISWCTYPE = @GNULIB_ISWCTYPE@
-GNULIB_LCHMOD = @GNULIB_LCHMOD@
-GNULIB_LCHOWN = @GNULIB_LCHOWN@
-GNULIB_LINK = @GNULIB_LINK@
-GNULIB_LINKAT = @GNULIB_LINKAT@
-GNULIB_LOCALECONV = @GNULIB_LOCALECONV@
-GNULIB_LSEEK = @GNULIB_LSEEK@
-GNULIB_LSTAT = @GNULIB_LSTAT@
-GNULIB_MALLOC_POSIX = @GNULIB_MALLOC_POSIX@
-GNULIB_MBRLEN = @GNULIB_MBRLEN@
-GNULIB_MBRTOWC = @GNULIB_MBRTOWC@
-GNULIB_MBSCASECMP = @GNULIB_MBSCASECMP@
-GNULIB_MBSCASESTR = @GNULIB_MBSCASESTR@
-GNULIB_MBSCHR = @GNULIB_MBSCHR@
-GNULIB_MBSCSPN = @GNULIB_MBSCSPN@
-GNULIB_MBSINIT = @GNULIB_MBSINIT@
-GNULIB_MBSLEN = @GNULIB_MBSLEN@
-GNULIB_MBSNCASECMP = @GNULIB_MBSNCASECMP@
-GNULIB_MBSNLEN = @GNULIB_MBSNLEN@
-GNULIB_MBSNRTOWCS = @GNULIB_MBSNRTOWCS@
-GNULIB_MBSPBRK = @GNULIB_MBSPBRK@
-GNULIB_MBSPCASECMP = @GNULIB_MBSPCASECMP@
-GNULIB_MBSRCHR = @GNULIB_MBSRCHR@
-GNULIB_MBSRTOWCS = @GNULIB_MBSRTOWCS@
-GNULIB_MBSSEP = @GNULIB_MBSSEP@
-GNULIB_MBSSPN = @GNULIB_MBSSPN@
-GNULIB_MBSSTR = @GNULIB_MBSSTR@
-GNULIB_MBSTOK_R = @GNULIB_MBSTOK_R@
-GNULIB_MBTOWC = @GNULIB_MBTOWC@
-GNULIB_MEMCHR = @GNULIB_MEMCHR@
-GNULIB_MEMMEM = @GNULIB_MEMMEM@
-GNULIB_MEMPCPY = @GNULIB_MEMPCPY@
-GNULIB_MEMRCHR = @GNULIB_MEMRCHR@
-GNULIB_MKDIRAT = @GNULIB_MKDIRAT@
-GNULIB_MKDTEMP = @GNULIB_MKDTEMP@
-GNULIB_MKFIFO = @GNULIB_MKFIFO@
-GNULIB_MKFIFOAT = @GNULIB_MKFIFOAT@
-GNULIB_MKNOD = @GNULIB_MKNOD@
-GNULIB_MKNODAT = @GNULIB_MKNODAT@
-GNULIB_MKOSTEMP = @GNULIB_MKOSTEMP@
-GNULIB_MKOSTEMPS = @GNULIB_MKOSTEMPS@
-GNULIB_MKSTEMP = @GNULIB_MKSTEMP@
-GNULIB_MKSTEMPS = @GNULIB_MKSTEMPS@
-GNULIB_MKTIME = @GNULIB_MKTIME@
-GNULIB_NANOSLEEP = @GNULIB_NANOSLEEP@
-GNULIB_NL_LANGINFO = @GNULIB_NL_LANGINFO@
-GNULIB_NONBLOCKING = @GNULIB_NONBLOCKING@
-GNULIB_OBSTACK_PRINTF = @GNULIB_OBSTACK_PRINTF@
-GNULIB_OBSTACK_PRINTF_POSIX = @GNULIB_OBSTACK_PRINTF_POSIX@
-GNULIB_OPEN = @GNULIB_OPEN@
-GNULIB_OPENAT = @GNULIB_OPENAT@
-GNULIB_PCLOSE = @GNULIB_PCLOSE@
-GNULIB_PERROR = @GNULIB_PERROR@
-GNULIB_PIPE = @GNULIB_PIPE@
-GNULIB_PIPE2 = @GNULIB_PIPE2@
-GNULIB_POPEN = @GNULIB_POPEN@
-GNULIB_POSIX_OPENPT = @GNULIB_POSIX_OPENPT@
-GNULIB_PREAD = @GNULIB_PREAD@
-GNULIB_PRINTF = @GNULIB_PRINTF@
-GNULIB_PRINTF_POSIX = @GNULIB_PRINTF_POSIX@
-GNULIB_PTSNAME = @GNULIB_PTSNAME@
-GNULIB_PTSNAME_R = @GNULIB_PTSNAME_R@
-GNULIB_PUTC = @GNULIB_PUTC@
-GNULIB_PUTCHAR = @GNULIB_PUTCHAR@
-GNULIB_PUTENV = @GNULIB_PUTENV@
-GNULIB_PUTS = @GNULIB_PUTS@
-GNULIB_PWRITE = @GNULIB_PWRITE@
-GNULIB_RANDOM = @GNULIB_RANDOM@
-GNULIB_RANDOM_R = @GNULIB_RANDOM_R@
-GNULIB_RAWMEMCHR = @GNULIB_RAWMEMCHR@
-GNULIB_READ = @GNULIB_READ@
-GNULIB_READLINK = @GNULIB_READLINK@
-GNULIB_READLINKAT = @GNULIB_READLINKAT@
-GNULIB_REALLOC_POSIX = @GNULIB_REALLOC_POSIX@
-GNULIB_REALPATH = @GNULIB_REALPATH@
-GNULIB_REMOVE = @GNULIB_REMOVE@
-GNULIB_RENAME = @GNULIB_RENAME@
-GNULIB_RENAMEAT = @GNULIB_RENAMEAT@
-GNULIB_RMDIR = @GNULIB_RMDIR@
-GNULIB_RPMATCH = @GNULIB_RPMATCH@
-GNULIB_SCANF = @GNULIB_SCANF@
-GNULIB_SETENV = @GNULIB_SETENV@
-GNULIB_SETHOSTNAME = @GNULIB_SETHOSTNAME@
-GNULIB_SETLOCALE = @GNULIB_SETLOCALE@
-GNULIB_SLEEP = @GNULIB_SLEEP@
-GNULIB_SNPRINTF = @GNULIB_SNPRINTF@
-GNULIB_SPRINTF_POSIX = @GNULIB_SPRINTF_POSIX@
-GNULIB_STAT = @GNULIB_STAT@
-GNULIB_STDIO_H_NONBLOCKING = @GNULIB_STDIO_H_NONBLOCKING@
-GNULIB_STDIO_H_SIGPIPE = @GNULIB_STDIO_H_SIGPIPE@
-GNULIB_STPCPY = @GNULIB_STPCPY@
-GNULIB_STPNCPY = @GNULIB_STPNCPY@
-GNULIB_STRCASESTR = @GNULIB_STRCASESTR@
-GNULIB_STRCHRNUL = @GNULIB_STRCHRNUL@
-GNULIB_STRDUP = @GNULIB_STRDUP@
-GNULIB_STRERROR = @GNULIB_STRERROR@
-GNULIB_STRERROR_R = @GNULIB_STRERROR_R@
-GNULIB_STRNCAT = @GNULIB_STRNCAT@
-GNULIB_STRNDUP = @GNULIB_STRNDUP@
-GNULIB_STRNLEN = @GNULIB_STRNLEN@
-GNULIB_STRPBRK = @GNULIB_STRPBRK@
-GNULIB_STRPTIME = @GNULIB_STRPTIME@
-GNULIB_STRSEP = @GNULIB_STRSEP@
-GNULIB_STRSIGNAL = @GNULIB_STRSIGNAL@
-GNULIB_STRSTR = @GNULIB_STRSTR@
-GNULIB_STRTOD = @GNULIB_STRTOD@
-GNULIB_STRTOK_R = @GNULIB_STRTOK_R@
-GNULIB_STRTOLL = @GNULIB_STRTOLL@
-GNULIB_STRTOULL = @GNULIB_STRTOULL@
-GNULIB_STRVERSCMP = @GNULIB_STRVERSCMP@
-GNULIB_SYMLINK = @GNULIB_SYMLINK@
-GNULIB_SYMLINKAT = @GNULIB_SYMLINKAT@
-GNULIB_SYSTEM_POSIX = @GNULIB_SYSTEM_POSIX@
-GNULIB_TIMEGM = @GNULIB_TIMEGM@
-GNULIB_TIME_R = @GNULIB_TIME_R@
-GNULIB_TMPFILE = @GNULIB_TMPFILE@
-GNULIB_TOWCTRANS = @GNULIB_TOWCTRANS@
-GNULIB_TTYNAME_R = @GNULIB_TTYNAME_R@
-GNULIB_UNISTD_H_NONBLOCKING = @GNULIB_UNISTD_H_NONBLOCKING@
-GNULIB_UNISTD_H_SIGPIPE = @GNULIB_UNISTD_H_SIGPIPE@
-GNULIB_UNLINK = @GNULIB_UNLINK@
-GNULIB_UNLINKAT = @GNULIB_UNLINKAT@
-GNULIB_UNLOCKPT = @GNULIB_UNLOCKPT@
-GNULIB_UNSETENV = @GNULIB_UNSETENV@
-GNULIB_USLEEP = @GNULIB_USLEEP@
-GNULIB_UTIMENSAT = @GNULIB_UTIMENSAT@
-GNULIB_VASPRINTF = @GNULIB_VASPRINTF@
-GNULIB_VDPRINTF = @GNULIB_VDPRINTF@
-GNULIB_VFPRINTF = @GNULIB_VFPRINTF@
-GNULIB_VFPRINTF_POSIX = @GNULIB_VFPRINTF_POSIX@
-GNULIB_VFSCANF = @GNULIB_VFSCANF@
-GNULIB_VPRINTF = @GNULIB_VPRINTF@
-GNULIB_VPRINTF_POSIX = @GNULIB_VPRINTF_POSIX@
-GNULIB_VSCANF = @GNULIB_VSCANF@
-GNULIB_VSNPRINTF = @GNULIB_VSNPRINTF@
-GNULIB_VSPRINTF_POSIX = @GNULIB_VSPRINTF_POSIX@
-GNULIB_WCPCPY = @GNULIB_WCPCPY@
-GNULIB_WCPNCPY = @GNULIB_WCPNCPY@
-GNULIB_WCRTOMB = @GNULIB_WCRTOMB@
-GNULIB_WCSCASECMP = @GNULIB_WCSCASECMP@
-GNULIB_WCSCAT = @GNULIB_WCSCAT@
-GNULIB_WCSCHR = @GNULIB_WCSCHR@
-GNULIB_WCSCMP = @GNULIB_WCSCMP@
-GNULIB_WCSCOLL = @GNULIB_WCSCOLL@
-GNULIB_WCSCPY = @GNULIB_WCSCPY@
-GNULIB_WCSCSPN = @GNULIB_WCSCSPN@
-GNULIB_WCSDUP = @GNULIB_WCSDUP@
-GNULIB_WCSLEN = @GNULIB_WCSLEN@
-GNULIB_WCSNCASECMP = @GNULIB_WCSNCASECMP@
-GNULIB_WCSNCAT = @GNULIB_WCSNCAT@
-GNULIB_WCSNCMP = @GNULIB_WCSNCMP@
-GNULIB_WCSNCPY = @GNULIB_WCSNCPY@
-GNULIB_WCSNLEN = @GNULIB_WCSNLEN@
-GNULIB_WCSNRTOMBS = @GNULIB_WCSNRTOMBS@
-GNULIB_WCSPBRK = @GNULIB_WCSPBRK@
-GNULIB_WCSRCHR = @GNULIB_WCSRCHR@
-GNULIB_WCSRTOMBS = @GNULIB_WCSRTOMBS@
-GNULIB_WCSSPN = @GNULIB_WCSSPN@
-GNULIB_WCSSTR = @GNULIB_WCSSTR@
-GNULIB_WCSTOK = @GNULIB_WCSTOK@
-GNULIB_WCSWIDTH = @GNULIB_WCSWIDTH@
-GNULIB_WCSXFRM = @GNULIB_WCSXFRM@
-GNULIB_WCTOB = @GNULIB_WCTOB@
-GNULIB_WCTOMB = @GNULIB_WCTOMB@
-GNULIB_WCTRANS = @GNULIB_WCTRANS@
-GNULIB_WCTYPE = @GNULIB_WCTYPE@
-GNULIB_WCWIDTH = @GNULIB_WCWIDTH@
-GNULIB_WMEMCHR = @GNULIB_WMEMCHR@
-GNULIB_WMEMCMP = @GNULIB_WMEMCMP@
-GNULIB_WMEMCPY = @GNULIB_WMEMCPY@
-GNULIB_WMEMMOVE = @GNULIB_WMEMMOVE@
-GNULIB_WMEMSET = @GNULIB_WMEMSET@
-GNULIB_WRITE = @GNULIB_WRITE@
-GNULIB__EXIT = @GNULIB__EXIT@
-GREP = @GREP@
-HAVE_ATOLL = @HAVE_ATOLL@
-HAVE_BTOWC = @HAVE_BTOWC@
-HAVE_CANONICALIZE_FILE_NAME = @HAVE_CANONICALIZE_FILE_NAME@
-HAVE_CHOWN = @HAVE_CHOWN@
-HAVE_DECL_ENVIRON = @HAVE_DECL_ENVIRON@
-HAVE_DECL_FCHDIR = @HAVE_DECL_FCHDIR@
-HAVE_DECL_FDATASYNC = @HAVE_DECL_FDATASYNC@
-HAVE_DECL_FPURGE = @HAVE_DECL_FPURGE@
-HAVE_DECL_FSEEKO = @HAVE_DECL_FSEEKO@
-HAVE_DECL_FTELLO = @HAVE_DECL_FTELLO@
-HAVE_DECL_GETDELIM = @HAVE_DECL_GETDELIM@
-HAVE_DECL_GETDOMAINNAME = @HAVE_DECL_GETDOMAINNAME@
-HAVE_DECL_GETLINE = @HAVE_DECL_GETLINE@
-HAVE_DECL_GETLOADAVG = @HAVE_DECL_GETLOADAVG@
-HAVE_DECL_GETLOGIN_R = @HAVE_DECL_GETLOGIN_R@
-HAVE_DECL_GETPAGESIZE = @HAVE_DECL_GETPAGESIZE@
-HAVE_DECL_GETUSERSHELL = @HAVE_DECL_GETUSERSHELL@
-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_SNPRINTF = @HAVE_DECL_SNPRINTF@
-HAVE_DECL_STRDUP = @HAVE_DECL_STRDUP@
-HAVE_DECL_STRERROR_R = @HAVE_DECL_STRERROR_R@
-HAVE_DECL_STRNDUP = @HAVE_DECL_STRNDUP@
-HAVE_DECL_STRNLEN = @HAVE_DECL_STRNLEN@
-HAVE_DECL_STRSIGNAL = @HAVE_DECL_STRSIGNAL@
-HAVE_DECL_STRTOK_R = @HAVE_DECL_STRTOK_R@
-HAVE_DECL_TTYNAME_R = @HAVE_DECL_TTYNAME_R@
-HAVE_DECL_UNSETENV = @HAVE_DECL_UNSETENV@
-HAVE_DECL_VSNPRINTF = @HAVE_DECL_VSNPRINTF@
-HAVE_DECL_WCTOB = @HAVE_DECL_WCTOB@
-HAVE_DECL_WCWIDTH = @HAVE_DECL_WCWIDTH@
-HAVE_DPRINTF = @HAVE_DPRINTF@
-HAVE_DUP2 = @HAVE_DUP2@
-HAVE_DUP3 = @HAVE_DUP3@
-HAVE_DUPLOCALE = @HAVE_DUPLOCALE@
-HAVE_EUIDACCESS = @HAVE_EUIDACCESS@
-HAVE_FACCESSAT = @HAVE_FACCESSAT@
-HAVE_FCHDIR = @HAVE_FCHDIR@
-HAVE_FCHMODAT = @HAVE_FCHMODAT@
-HAVE_FCHOWNAT = @HAVE_FCHOWNAT@
-HAVE_FCNTL = @HAVE_FCNTL@
-HAVE_FDATASYNC = @HAVE_FDATASYNC@
-HAVE_FEATURES_H = @HAVE_FEATURES_H@
-HAVE_FFSL = @HAVE_FFSL@
-HAVE_FFSLL = @HAVE_FFSLL@
-HAVE_FSEEKO = @HAVE_FSEEKO@
-HAVE_FSTATAT = @HAVE_FSTATAT@
-HAVE_FSYNC = @HAVE_FSYNC@
-HAVE_FTELLO = @HAVE_FTELLO@
-HAVE_FTRUNCATE = @HAVE_FTRUNCATE@
-HAVE_FUTIMENS = @HAVE_FUTIMENS@
-HAVE_GETDTABLESIZE = @HAVE_GETDTABLESIZE@
-HAVE_GETGROUPS = @HAVE_GETGROUPS@
-HAVE_GETHOSTNAME = @HAVE_GETHOSTNAME@
-HAVE_GETLOGIN = @HAVE_GETLOGIN@
-HAVE_GETOPT_H = @HAVE_GETOPT_H@
-HAVE_GETPAGESIZE = @HAVE_GETPAGESIZE@
-HAVE_GETSUBOPT = @HAVE_GETSUBOPT@
-HAVE_GETTIMEOFDAY = @HAVE_GETTIMEOFDAY@
-HAVE_GRANTPT = @HAVE_GRANTPT@
-HAVE_GROUP_MEMBER = @HAVE_GROUP_MEMBER@
-HAVE_INTTYPES_H = @HAVE_INTTYPES_H@
-HAVE_ISWBLANK = @HAVE_ISWBLANK@
-HAVE_ISWCNTRL = @HAVE_ISWCNTRL@
-HAVE_LANGINFO_CODESET = @HAVE_LANGINFO_CODESET@
-HAVE_LANGINFO_ERA = @HAVE_LANGINFO_ERA@
-HAVE_LANGINFO_H = @HAVE_LANGINFO_H@
-HAVE_LANGINFO_T_FMT_AMPM = @HAVE_LANGINFO_T_FMT_AMPM@
-HAVE_LANGINFO_YESEXPR = @HAVE_LANGINFO_YESEXPR@
-HAVE_LCHMOD = @HAVE_LCHMOD@
-HAVE_LCHOWN = @HAVE_LCHOWN@
-HAVE_LINK = @HAVE_LINK@
-HAVE_LINKAT = @HAVE_LINKAT@
-HAVE_LONG_LONG_INT = @HAVE_LONG_LONG_INT@
-HAVE_LSTAT = @HAVE_LSTAT@
-HAVE_MBRLEN = @HAVE_MBRLEN@
-HAVE_MBRTOWC = @HAVE_MBRTOWC@
-HAVE_MBSINIT = @HAVE_MBSINIT@
-HAVE_MBSLEN = @HAVE_MBSLEN@
-HAVE_MBSNRTOWCS = @HAVE_MBSNRTOWCS@
-HAVE_MBSRTOWCS = @HAVE_MBSRTOWCS@
-HAVE_MEMCHR = @HAVE_MEMCHR@
-HAVE_MEMPCPY = @HAVE_MEMPCPY@
-HAVE_MKDIRAT = @HAVE_MKDIRAT@
-HAVE_MKDTEMP = @HAVE_MKDTEMP@
-HAVE_MKFIFO = @HAVE_MKFIFO@
-HAVE_MKFIFOAT = @HAVE_MKFIFOAT@
-HAVE_MKNOD = @HAVE_MKNOD@
-HAVE_MKNODAT = @HAVE_MKNODAT@
-HAVE_MKOSTEMP = @HAVE_MKOSTEMP@
-HAVE_MKOSTEMPS = @HAVE_MKOSTEMPS@
-HAVE_MKSTEMP = @HAVE_MKSTEMP@
-HAVE_MKSTEMPS = @HAVE_MKSTEMPS@
-HAVE_MSVC_INVALID_PARAMETER_HANDLER = @HAVE_MSVC_INVALID_PARAMETER_HANDLER@
-HAVE_NANOSLEEP = @HAVE_NANOSLEEP@
-HAVE_NL_LANGINFO = @HAVE_NL_LANGINFO@
-HAVE_OPENAT = @HAVE_OPENAT@
-HAVE_OS_H = @HAVE_OS_H@
-HAVE_PCLOSE = @HAVE_PCLOSE@
-HAVE_PIPE = @HAVE_PIPE@
-HAVE_PIPE2 = @HAVE_PIPE2@
-HAVE_POPEN = @HAVE_POPEN@
-HAVE_POSIX_OPENPT = @HAVE_POSIX_OPENPT@
-HAVE_PREAD = @HAVE_PREAD@
-HAVE_PTSNAME = @HAVE_PTSNAME@
-HAVE_PTSNAME_R = @HAVE_PTSNAME_R@
-HAVE_PWRITE = @HAVE_PWRITE@
-HAVE_RANDOM = @HAVE_RANDOM@
-HAVE_RANDOM_H = @HAVE_RANDOM_H@
-HAVE_RANDOM_R = @HAVE_RANDOM_R@
-HAVE_RAWMEMCHR = @HAVE_RAWMEMCHR@
-HAVE_READLINK = @HAVE_READLINK@
-HAVE_READLINKAT = @HAVE_READLINKAT@
-HAVE_REALPATH = @HAVE_REALPATH@
-HAVE_RENAMEAT = @HAVE_RENAMEAT@
-HAVE_RPMATCH = @HAVE_RPMATCH@
-HAVE_SETENV = @HAVE_SETENV@
-HAVE_SETHOSTNAME = @HAVE_SETHOSTNAME@
-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_SLEEP = @HAVE_SLEEP@
-HAVE_STDINT_H = @HAVE_STDINT_H@
-HAVE_STPCPY = @HAVE_STPCPY@
-HAVE_STPNCPY = @HAVE_STPNCPY@
-HAVE_STRCASESTR = @HAVE_STRCASESTR@
-HAVE_STRCHRNUL = @HAVE_STRCHRNUL@
-HAVE_STRPBRK = @HAVE_STRPBRK@
-HAVE_STRPTIME = @HAVE_STRPTIME@
-HAVE_STRSEP = @HAVE_STRSEP@
-HAVE_STRTOD = @HAVE_STRTOD@
-HAVE_STRTOLL = @HAVE_STRTOLL@
-HAVE_STRTOULL = @HAVE_STRTOULL@
-HAVE_STRUCT_RANDOM_DATA = @HAVE_STRUCT_RANDOM_DATA@
-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_INTTYPES_H = @HAVE_SYS_INTTYPES_H@
-HAVE_SYS_LOADAVG_H = @HAVE_SYS_LOADAVG_H@
-HAVE_SYS_PARAM_H = @HAVE_SYS_PARAM_H@
-HAVE_SYS_TIME_H = @HAVE_SYS_TIME_H@
-HAVE_SYS_TYPES_H = @HAVE_SYS_TYPES_H@
-HAVE_TIMEGM = @HAVE_TIMEGM@
-HAVE_UNISTD_H = @HAVE_UNISTD_H@
-HAVE_UNLINKAT = @HAVE_UNLINKAT@
-HAVE_UNLOCKPT = @HAVE_UNLOCKPT@
-HAVE_UNSIGNED_LONG_LONG_INT = @HAVE_UNSIGNED_LONG_LONG_INT@
-HAVE_USLEEP = @HAVE_USLEEP@
-HAVE_UTIMENSAT = @HAVE_UTIMENSAT@
-HAVE_VASPRINTF = @HAVE_VASPRINTF@
-HAVE_VDPRINTF = @HAVE_VDPRINTF@
-HAVE_WCHAR_H = @HAVE_WCHAR_H@
-HAVE_WCHAR_T = @HAVE_WCHAR_T@
-HAVE_WCPCPY = @HAVE_WCPCPY@
-HAVE_WCPNCPY = @HAVE_WCPNCPY@
-HAVE_WCRTOMB = @HAVE_WCRTOMB@
-HAVE_WCSCASECMP = @HAVE_WCSCASECMP@
-HAVE_WCSCAT = @HAVE_WCSCAT@
-HAVE_WCSCHR = @HAVE_WCSCHR@
-HAVE_WCSCMP = @HAVE_WCSCMP@
-HAVE_WCSCOLL = @HAVE_WCSCOLL@
-HAVE_WCSCPY = @HAVE_WCSCPY@
-HAVE_WCSCSPN = @HAVE_WCSCSPN@
-HAVE_WCSDUP = @HAVE_WCSDUP@
-HAVE_WCSLEN = @HAVE_WCSLEN@
-HAVE_WCSNCASECMP = @HAVE_WCSNCASECMP@
-HAVE_WCSNCAT = @HAVE_WCSNCAT@
-HAVE_WCSNCMP = @HAVE_WCSNCMP@
-HAVE_WCSNCPY = @HAVE_WCSNCPY@
-HAVE_WCSNLEN = @HAVE_WCSNLEN@
-HAVE_WCSNRTOMBS = @HAVE_WCSNRTOMBS@
-HAVE_WCSPBRK = @HAVE_WCSPBRK@
-HAVE_WCSRCHR = @HAVE_WCSRCHR@
-HAVE_WCSRTOMBS = @HAVE_WCSRTOMBS@
-HAVE_WCSSPN = @HAVE_WCSSPN@
-HAVE_WCSSTR = @HAVE_WCSSTR@
-HAVE_WCSTOK = @HAVE_WCSTOK@
-HAVE_WCSWIDTH = @HAVE_WCSWIDTH@
-HAVE_WCSXFRM = @HAVE_WCSXFRM@
-HAVE_WCTRANS_T = @HAVE_WCTRANS_T@
-HAVE_WCTYPE_H = @HAVE_WCTYPE_H@
-HAVE_WCTYPE_T = @HAVE_WCTYPE_T@
-HAVE_WINSOCK2_H = @HAVE_WINSOCK2_H@
-HAVE_WINT_T = @HAVE_WINT_T@
-HAVE_WMEMCHR = @HAVE_WMEMCHR@
-HAVE_WMEMCMP = @HAVE_WMEMCMP@
-HAVE_WMEMCPY = @HAVE_WMEMCPY@
-HAVE_WMEMMOVE = @HAVE_WMEMMOVE@
-HAVE_WMEMSET = @HAVE_WMEMSET@
-HAVE_XLOCALE_H = @HAVE_XLOCALE_H@
-HAVE__BOOL = @HAVE__BOOL@
-HAVE__EXIT = @HAVE__EXIT@
-INCLUDE_NEXT = @INCLUDE_NEXT@
-INCLUDE_NEXT_AS_FIRST_DIRECTIVE = @INCLUDE_NEXT_AS_FIRST_DIRECTIVE@
-INSTALL = @INSTALL@
-INSTALL_DATA = @INSTALL_DATA@
-INSTALL_PROGRAM = @INSTALL_PROGRAM@
-INSTALL_SCRIPT = @INSTALL_SCRIPT@
-INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
-INTLLIBS = @INTLLIBS@
-INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@
-LDFLAGS = @LDFLAGS@
-LIBICONV = @LIBICONV@
-LIBINTL = @LIBINTL@
-LIBOBJS = @LIBOBJS@
-LIBS = @LIBS@
-LIBSED_LIBDEPS = @LIBSED_LIBDEPS@
-LIBSED_LTLIBDEPS = @LIBSED_LTLIBDEPS@
-LIB_ACL = @LIB_ACL@
-LIB_SELINUX = @LIB_SELINUX@
-LOCALCHARSET_TESTS_ENVIRONMENT = @LOCALCHARSET_TESTS_ENVIRONMENT@
-LOCALE_FR = @LOCALE_FR@
-LOCALE_FR_UTF8 = @LOCALE_FR_UTF8@
-LOCALE_JA = @LOCALE_JA@
-LOCALE_ZH_CN = @LOCALE_ZH_CN@
-LTLIBICONV = @LTLIBICONV@
-LTLIBINTL = @LTLIBINTL@
-LTLIBOBJS = @LTLIBOBJS@
-MAKEINFO = @MAKEINFO@
-MKDIR_P = @MKDIR_P@
-MSGFMT = @MSGFMT@
-MSGFMT_015 = @MSGFMT_015@
-MSGMERGE = @MSGMERGE@
-NEXT_AS_FIRST_DIRECTIVE_ERRNO_H = @NEXT_AS_FIRST_DIRECTIVE_ERRNO_H@
-NEXT_AS_FIRST_DIRECTIVE_FCNTL_H = @NEXT_AS_FIRST_DIRECTIVE_FCNTL_H@
-NEXT_AS_FIRST_DIRECTIVE_GETOPT_H = @NEXT_AS_FIRST_DIRECTIVE_GETOPT_H@
-NEXT_AS_FIRST_DIRECTIVE_LANGINFO_H = @NEXT_AS_FIRST_DIRECTIVE_LANGINFO_H@
-NEXT_AS_FIRST_DIRECTIVE_LOCALE_H = @NEXT_AS_FIRST_DIRECTIVE_LOCALE_H@
-NEXT_AS_FIRST_DIRECTIVE_SELINUX_SELINUX_H = @NEXT_AS_FIRST_DIRECTIVE_SELINUX_SELINUX_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_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_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@
-NEXT_AS_FIRST_DIRECTIVE_WCTYPE_H = @NEXT_AS_FIRST_DIRECTIVE_WCTYPE_H@
-NEXT_ERRNO_H = @NEXT_ERRNO_H@
-NEXT_FCNTL_H = @NEXT_FCNTL_H@
-NEXT_GETOPT_H = @NEXT_GETOPT_H@
-NEXT_LANGINFO_H = @NEXT_LANGINFO_H@
-NEXT_LOCALE_H = @NEXT_LOCALE_H@
-NEXT_SELINUX_SELINUX_H = @NEXT_SELINUX_SELINUX_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_STAT_H = @NEXT_SYS_STAT_H@
-NEXT_SYS_TIME_H = @NEXT_SYS_TIME_H@
-NEXT_SYS_TYPES_H = @NEXT_SYS_TYPES_H@
-NEXT_TIME_H = @NEXT_TIME_H@
-NEXT_UNISTD_H = @NEXT_UNISTD_H@
-NEXT_WCHAR_H = @NEXT_WCHAR_H@
-NEXT_WCTYPE_H = @NEXT_WCTYPE_H@
-OBJEXT = @OBJEXT@
-PACKAGE = @PACKAGE@
-PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
-PACKAGE_NAME = @PACKAGE_NAME@
-PACKAGE_STRING = @PACKAGE_STRING@
-PACKAGE_TARNAME = @PACKAGE_TARNAME@
-PACKAGE_URL = @PACKAGE_URL@
-PACKAGE_VERSION = @PACKAGE_VERSION@
-PATH_SEPARATOR = @PATH_SEPARATOR@
-POSUB = @POSUB@
-PRAGMA_COLUMNS = @PRAGMA_COLUMNS@
-PRAGMA_SYSTEM_HEADER = @PRAGMA_SYSTEM_HEADER@
-PTHREAD_H_DEFINES_STRUCT_TIMESPEC = @PTHREAD_H_DEFINES_STRUCT_TIMESPEC@
-PTRDIFF_T_SUFFIX = @PTRDIFF_T_SUFFIX@
-RANLIB = @RANLIB@
-REPLACE_BTOWC = @REPLACE_BTOWC@
-REPLACE_CALLOC = @REPLACE_CALLOC@
-REPLACE_CANONICALIZE_FILE_NAME = @REPLACE_CANONICALIZE_FILE_NAME@
-REPLACE_CHOWN = @REPLACE_CHOWN@
-REPLACE_CLOSE = @REPLACE_CLOSE@
-REPLACE_DPRINTF = @REPLACE_DPRINTF@
-REPLACE_DUP = @REPLACE_DUP@
-REPLACE_DUP2 = @REPLACE_DUP2@
-REPLACE_DUPLOCALE = @REPLACE_DUPLOCALE@
-REPLACE_FCHOWNAT = @REPLACE_FCHOWNAT@
-REPLACE_FCLOSE = @REPLACE_FCLOSE@
-REPLACE_FCNTL = @REPLACE_FCNTL@
-REPLACE_FDOPEN = @REPLACE_FDOPEN@
-REPLACE_FFLUSH = @REPLACE_FFLUSH@
-REPLACE_FOPEN = @REPLACE_FOPEN@
-REPLACE_FPRINTF = @REPLACE_FPRINTF@
-REPLACE_FPURGE = @REPLACE_FPURGE@
-REPLACE_FREOPEN = @REPLACE_FREOPEN@
-REPLACE_FSEEK = @REPLACE_FSEEK@
-REPLACE_FSEEKO = @REPLACE_FSEEKO@
-REPLACE_FSTAT = @REPLACE_FSTAT@
-REPLACE_FSTATAT = @REPLACE_FSTATAT@
-REPLACE_FTELL = @REPLACE_FTELL@
-REPLACE_FTELLO = @REPLACE_FTELLO@
-REPLACE_FTRUNCATE = @REPLACE_FTRUNCATE@
-REPLACE_FUTIMENS = @REPLACE_FUTIMENS@
-REPLACE_GETCWD = @REPLACE_GETCWD@
-REPLACE_GETDELIM = @REPLACE_GETDELIM@
-REPLACE_GETDOMAINNAME = @REPLACE_GETDOMAINNAME@
-REPLACE_GETGROUPS = @REPLACE_GETGROUPS@
-REPLACE_GETLINE = @REPLACE_GETLINE@
-REPLACE_GETLOGIN_R = @REPLACE_GETLOGIN_R@
-REPLACE_GETPAGESIZE = @REPLACE_GETPAGESIZE@
-REPLACE_GETTIMEOFDAY = @REPLACE_GETTIMEOFDAY@
-REPLACE_ISATTY = @REPLACE_ISATTY@
-REPLACE_ISWBLANK = @REPLACE_ISWBLANK@
-REPLACE_ISWCNTRL = @REPLACE_ISWCNTRL@
-REPLACE_LCHOWN = @REPLACE_LCHOWN@
-REPLACE_LINK = @REPLACE_LINK@
-REPLACE_LINKAT = @REPLACE_LINKAT@
-REPLACE_LOCALECONV = @REPLACE_LOCALECONV@
-REPLACE_LOCALTIME_R = @REPLACE_LOCALTIME_R@
-REPLACE_LSEEK = @REPLACE_LSEEK@
-REPLACE_LSTAT = @REPLACE_LSTAT@
-REPLACE_MALLOC = @REPLACE_MALLOC@
-REPLACE_MBRLEN = @REPLACE_MBRLEN@
-REPLACE_MBRTOWC = @REPLACE_MBRTOWC@
-REPLACE_MBSINIT = @REPLACE_MBSINIT@
-REPLACE_MBSNRTOWCS = @REPLACE_MBSNRTOWCS@
-REPLACE_MBSRTOWCS = @REPLACE_MBSRTOWCS@
-REPLACE_MBSTATE_T = @REPLACE_MBSTATE_T@
-REPLACE_MBTOWC = @REPLACE_MBTOWC@
-REPLACE_MEMCHR = @REPLACE_MEMCHR@
-REPLACE_MEMMEM = @REPLACE_MEMMEM@
-REPLACE_MKDIR = @REPLACE_MKDIR@
-REPLACE_MKFIFO = @REPLACE_MKFIFO@
-REPLACE_MKNOD = @REPLACE_MKNOD@
-REPLACE_MKSTEMP = @REPLACE_MKSTEMP@
-REPLACE_MKTIME = @REPLACE_MKTIME@
-REPLACE_NANOSLEEP = @REPLACE_NANOSLEEP@
-REPLACE_NL_LANGINFO = @REPLACE_NL_LANGINFO@
-REPLACE_NULL = @REPLACE_NULL@
-REPLACE_OBSTACK_PRINTF = @REPLACE_OBSTACK_PRINTF@
-REPLACE_OPEN = @REPLACE_OPEN@
-REPLACE_OPENAT = @REPLACE_OPENAT@
-REPLACE_PERROR = @REPLACE_PERROR@
-REPLACE_POPEN = @REPLACE_POPEN@
-REPLACE_PREAD = @REPLACE_PREAD@
-REPLACE_PRINTF = @REPLACE_PRINTF@
-REPLACE_PTSNAME = @REPLACE_PTSNAME@
-REPLACE_PTSNAME_R = @REPLACE_PTSNAME_R@
-REPLACE_PUTENV = @REPLACE_PUTENV@
-REPLACE_PWRITE = @REPLACE_PWRITE@
-REPLACE_RANDOM_R = @REPLACE_RANDOM_R@
-REPLACE_READ = @REPLACE_READ@
-REPLACE_READLINK = @REPLACE_READLINK@
-REPLACE_REALLOC = @REPLACE_REALLOC@
-REPLACE_REALPATH = @REPLACE_REALPATH@
-REPLACE_REMOVE = @REPLACE_REMOVE@
-REPLACE_RENAME = @REPLACE_RENAME@
-REPLACE_RENAMEAT = @REPLACE_RENAMEAT@
-REPLACE_RMDIR = @REPLACE_RMDIR@
-REPLACE_SETENV = @REPLACE_SETENV@
-REPLACE_SETLOCALE = @REPLACE_SETLOCALE@
-REPLACE_SLEEP = @REPLACE_SLEEP@
-REPLACE_SNPRINTF = @REPLACE_SNPRINTF@
-REPLACE_SPRINTF = @REPLACE_SPRINTF@
-REPLACE_STAT = @REPLACE_STAT@
-REPLACE_STDIO_READ_FUNCS = @REPLACE_STDIO_READ_FUNCS@
-REPLACE_STDIO_WRITE_FUNCS = @REPLACE_STDIO_WRITE_FUNCS@
-REPLACE_STPNCPY = @REPLACE_STPNCPY@
-REPLACE_STRCASESTR = @REPLACE_STRCASESTR@
-REPLACE_STRCHRNUL = @REPLACE_STRCHRNUL@
-REPLACE_STRDUP = @REPLACE_STRDUP@
-REPLACE_STRERROR = @REPLACE_STRERROR@
-REPLACE_STRERROR_R = @REPLACE_STRERROR_R@
-REPLACE_STRNCAT = @REPLACE_STRNCAT@
-REPLACE_STRNDUP = @REPLACE_STRNDUP@
-REPLACE_STRNLEN = @REPLACE_STRNLEN@
-REPLACE_STRSIGNAL = @REPLACE_STRSIGNAL@
-REPLACE_STRSTR = @REPLACE_STRSTR@
-REPLACE_STRTOD = @REPLACE_STRTOD@
-REPLACE_STRTOK_R = @REPLACE_STRTOK_R@
-REPLACE_STRUCT_LCONV = @REPLACE_STRUCT_LCONV@
-REPLACE_STRUCT_TIMEVAL = @REPLACE_STRUCT_TIMEVAL@
-REPLACE_SYMLINK = @REPLACE_SYMLINK@
-REPLACE_TIMEGM = @REPLACE_TIMEGM@
-REPLACE_TMPFILE = @REPLACE_TMPFILE@
-REPLACE_TOWLOWER = @REPLACE_TOWLOWER@
-REPLACE_TTYNAME_R = @REPLACE_TTYNAME_R@
-REPLACE_UNLINK = @REPLACE_UNLINK@
-REPLACE_UNLINKAT = @REPLACE_UNLINKAT@
-REPLACE_UNSETENV = @REPLACE_UNSETENV@
-REPLACE_USLEEP = @REPLACE_USLEEP@
-REPLACE_UTIMENSAT = @REPLACE_UTIMENSAT@
-REPLACE_VASPRINTF = @REPLACE_VASPRINTF@
-REPLACE_VDPRINTF = @REPLACE_VDPRINTF@
-REPLACE_VFPRINTF = @REPLACE_VFPRINTF@
-REPLACE_VPRINTF = @REPLACE_VPRINTF@
-REPLACE_VSNPRINTF = @REPLACE_VSNPRINTF@
-REPLACE_VSPRINTF = @REPLACE_VSPRINTF@
-REPLACE_WCRTOMB = @REPLACE_WCRTOMB@
-REPLACE_WCSNRTOMBS = @REPLACE_WCSNRTOMBS@
-REPLACE_WCSRTOMBS = @REPLACE_WCSRTOMBS@
-REPLACE_WCSWIDTH = @REPLACE_WCSWIDTH@
-REPLACE_WCTOB = @REPLACE_WCTOB@
-REPLACE_WCTOMB = @REPLACE_WCTOMB@
-REPLACE_WCWIDTH = @REPLACE_WCWIDTH@
-REPLACE_WRITE = @REPLACE_WRITE@
-SED_FEATURE_VERSION = @SED_FEATURE_VERSION@
-SELINUX_CONTEXT_H = @SELINUX_CONTEXT_H@
-SET_MAKE = @SET_MAKE@
-SHELL = @SHELL@
-SIG_ATOMIC_T_SUFFIX = @SIG_ATOMIC_T_SUFFIX@
-SIZE_T_SUFFIX = @SIZE_T_SUFFIX@
-STDARG_H = @STDARG_H@
-STDBOOL_H = @STDBOOL_H@
-STDDEF_H = @STDDEF_H@
-STDINT_H = @STDINT_H@
-STRIP = @STRIP@
-SYS_TIME_H_DEFINES_STRUCT_TIMESPEC = @SYS_TIME_H_DEFINES_STRUCT_TIMESPEC@
-TIME_H_DEFINES_STRUCT_TIMESPEC = @TIME_H_DEFINES_STRUCT_TIMESPEC@
-UNDEFINE_STRTOK_R = @UNDEFINE_STRTOK_R@
-UNISTD_H_HAVE_WINSOCK2_H = @UNISTD_H_HAVE_WINSOCK2_H@
-UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS = @UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS@
-USE_ACL = @USE_ACL@
-USE_NLS = @USE_NLS@
-VERSION = @VERSION@
-WCHAR_T_SUFFIX = @WCHAR_T_SUFFIX@
-WINDOWS_64_BIT_OFF_T = @WINDOWS_64_BIT_OFF_T@
-WINDOWS_64_BIT_ST_SIZE = @WINDOWS_64_BIT_ST_SIZE@
-WINT_T_SUFFIX = @WINT_T_SUFFIX@
-XFAIL_TESTS = @XFAIL_TESTS@
-XGETTEXT = @XGETTEXT@
-XGETTEXT_015 = @XGETTEXT_015@
-XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@
-abs_builddir = @abs_builddir@
-abs_srcdir = @abs_srcdir@
-abs_top_builddir = @abs_top_builddir@
-abs_top_srcdir = @abs_top_srcdir@
-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@
-bindir = @bindir@
-build = @build@
-build_alias = @build_alias@
-build_cpu = @build_cpu@
-build_os = @build_os@
-build_vendor = @build_vendor@
-builddir = @builddir@
-datadir = @datadir@
-datarootdir = @datarootdir@
-docdir = @docdir@
-dvidir = @dvidir@
-exec_prefix = @exec_prefix@
-gl_LIBOBJS = @gl_LIBOBJS@
-gl_LTLIBOBJS = @gl_LTLIBOBJS@
-gltests_LIBOBJS = @gltests_LIBOBJS@
-gltests_LTLIBOBJS = @gltests_LTLIBOBJS@
-gltests_WITNESS = @gltests_WITNESS@
-host = @host@
-host_alias = @host_alias@
-host_cpu = @host_cpu@
-host_os = @host_os@
-host_vendor = @host_vendor@
-htmldir = @htmldir@
-includedir = @includedir@
-infodir = @infodir@
-install_sh = @install_sh@
-libdir = @libdir@
-libexecdir = @libexecdir@
-lispdir = @lispdir@
-localedir = @localedir@
-localstatedir = @localstatedir@
-mandir = @mandir@
-mkdir_p = @mkdir_p@
-oldincludedir = @oldincludedir@
-pdfdir = @pdfdir@
-prefix = @prefix@
-program_transform_name = @program_transform_name@
-psdir = @psdir@
-sbindir = @sbindir@
-sharedstatedir = @sharedstatedir@
-srcdir = @srcdir@
-sysconfdir = @sysconfdir@
-target_alias = @target_alias@
-top_build_prefix = @top_build_prefix@
-top_builddir = @top_builddir@
-top_srcdir = @top_srcdir@
-AUTOMAKE_OPTIONS = 1.5 gnits
-SUBDIRS =
-noinst_HEADERS =
-noinst_LIBRARIES = libsed.a
-noinst_LTLIBRARIES =
-EXTRA_DIST = acl-internal.h acl.h acl_entries.c alloca.c alloca.in.h \
- btowc.c c-strcaseeq.h canonicalize-lgpl.c dirname.h dosname.h \
- errno.in.h error.c error.h exitfail.h fcntl.in.h fstat.c \
- fwriting.c fwriting.h stdio-impl.h getdelim.c getopt.c \
- getopt.in.h getopt1.c getopt_int.h gettimeofday.c intprops.h \
- langinfo.in.h config.charset ref-add.sin ref-del.sin \
- locale.in.h localeconv.c lstat.c malloc.c malloc.c malloca.h \
- malloca.valgrind mbrlen.c mbrtowc.c mbsinit.c mbtowc-impl.h \
- mbtowc.c memchr.c memchr.valgrind mkostemp.c msvc-inval.c \
- msvc-inval.h msvc-nothrow.c msvc-nothrow.h nl_langinfo.c \
- obstack.c obstack.h pathmax.h quote.h quote.h quotearg.h \
- readlink.c realloc.c regcomp.c regex.c regex.h \
- regex_internal.c regex_internal.h regexec.c rename.c rmdir.c \
- same-inode.h 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 stat.c \
- stat-macros.h stdarg.in.h stdbool.in.h stddef.in.h stdint.in.h \
- stdio.in.h stdlib.in.h streq.h strerror.c strerror-override.c \
- strerror-override.h string.in.h strverscmp.c sys_stat.in.h \
- sys_time.in.h sys_types.in.h tempname.h time.in.h unistd.in.h \
- unlocked-io.h verify.h wchar.in.h wcrtomb.c wctob.c \
- wctomb-impl.h wctomb.c wctype.in.h xalloc.h xalloc-oversized.h
-
-# The BUILT_SOURCES created by this Makefile snippet are not used via #include
-# statements but through direct file reference. Therefore this snippet must be
-# present in all Makefile.am that need it. This is ensured by the applicability
-# 'all' defined above.
-
-# The BUILT_SOURCES created by this Makefile snippet are not used via #include
-# statements but through direct file reference. Therefore this snippet must be
-# present in all Makefile.am that need it. This is ensured by the applicability
-# 'all' defined above.
-
-# The BUILT_SOURCES created by this Makefile snippet are not used via #include
-# statements but through direct file reference. Therefore this snippet must be
-# present in all Makefile.am that need it. This is ensured by the applicability
-# 'all' defined above.
-BUILT_SOURCES = $(ALLOCA_H) configmake.h $(ERRNO_H) fcntl.h \
- $(GETOPT_H) langinfo.h locale.h selinux/selinux.h \
- $(SELINUX_CONTEXT_H) arg-nonnull.h c++defs.h \
- unused-parameter.h warn-on-use.h $(STDARG_H) $(STDBOOL_H) \
- $(STDDEF_H) $(STDINT_H) stdio.h stdlib.h string.h sys/stat.h \
- sys/time.h sys/types.h time.h unistd.h wchar.h wctype.h
-SUFFIXES = .sed .sin .a .o .c .y .l .h .sh .elc .el
-MOSTLYCLEANFILES = core *.stackdump alloca.h alloca.h-t errno.h \
- errno.h-t fcntl.h fcntl.h-t getopt.h getopt.h-t langinfo.h \
- langinfo.h-t locale.h locale.h-t selinux/selinux.h \
- selinux/selinux.h-t selinux/context.h selinux/context.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 stdarg.h stdarg.h-t stdbool.h stdbool.h-t \
- stddef.h stddef.h-t stdint.h stdint.h-t stdio.h stdio.h-t \
- stdlib.h stdlib.h-t string.h string.h-t sys/stat.h \
- sys/stat.h-t sys/time.h sys/time.h-t sys/types.h sys/types.h-t \
- time.h time.h-t unistd.h unistd.h-t wchar.h wchar.h-t wctype.h \
- wctype.h-t
-MOSTLYCLEANDIRS = selinux sys
-CLEANFILES = configmake.h configmake.h-t charset.alias ref-add.sed \
- ref-del.sed
-DISTCLEANFILES =
-MAINTAINERCLEANFILES =
-AM_CPPFLAGS = -I$(top_srcdir)/lib -I$(top_srcdir) \
- -I$(top_builddir)/lib
-AM_CFLAGS =
-libsed_a_SOURCES = set-mode-acl.c copy-acl.c file-has-acl.c c-ctype.h \
- c-ctype.c c-strcase.h c-strcasecmp.c c-strncasecmp.c \
- dirname-lgpl.c basename-lgpl.c stripslash.c exitfail.c \
- gettext.h localcharset.h localcharset.c malloca.c quotearg.c \
- se-context.in.h se-selinux.in.h se-context.c se-selinux.c \
- stdio.c tempname.c unistd.c version-etc.h version-etc.c \
- version-etc-fsf.c wctype-h.c xmalloc.c xalloc-die.c
-libsed_a_LIBADD = $(gl_LIBOBJS) @ALLOCA@
-libsed_a_DEPENDENCIES = $(gl_LIBOBJS) @ALLOCA@
-EXTRA_libsed_a_SOURCES = acl_entries.c alloca.c btowc.c \
- canonicalize-lgpl.c error.c fstat.c fwriting.c getdelim.c \
- getopt.c getopt1.c gettimeofday.c localeconv.c lstat.c \
- malloc.c malloc.c mbrlen.c mbrtowc.c mbsinit.c mbtowc.c \
- memchr.c mkostemp.c msvc-inval.c msvc-nothrow.c nl_langinfo.c \
- obstack.c readlink.c realloc.c regcomp.c regex.c \
- regex_internal.c regexec.c rename.c rmdir.c getfilecon.c \
- stat.c strerror.c strerror-override.c strverscmp.c wcrtomb.c \
- wctob.c wctomb.c
-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
-# 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
-all: $(BUILT_SOURCES)
- $(MAKE) $(AM_MAKEFLAGS) all-recursive
-
-.SUFFIXES:
-.SUFFIXES: .sed .sin .a .o .c .y .l .h .sh .elc .el .obj
-$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(srcdir)/gnulib.mk $(am__configure_deps)
- @for dep in $?; do \
- case '$(am__configure_deps)' in \
- *$$dep*) \
- ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
- && { if test -f $@; then exit 0; else break; fi; }; \
- exit 1;; \
- esac; \
- done; \
- echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnits lib/Makefile'; \
- $(am__cd) $(top_srcdir) && \
- $(AUTOMAKE) --gnits lib/Makefile
-.PRECIOUS: Makefile
-Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
- @case '$?' in \
- *config.status*) \
- cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
- *) \
- echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
- cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
- esac;
-$(srcdir)/gnulib.mk:
-
-$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
- cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
-
-$(top_srcdir)/configure: $(am__configure_deps)
- cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
-$(ACLOCAL_M4): $(am__aclocal_m4_deps)
- cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
-$(am__aclocal_m4_deps):
-
-clean-noinstLIBRARIES:
- -test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES)
-libsed.a: $(libsed_a_OBJECTS) $(libsed_a_DEPENDENCIES) $(EXTRA_libsed_a_DEPENDENCIES)
- -rm -f libsed.a
- $(libsed_a_AR) libsed.a $(libsed_a_OBJECTS) $(libsed_a_LIBADD)
- $(RANLIB) libsed.a
-
-clean-noinstLTLIBRARIES:
- -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES)
- @list='$(noinst_LTLIBRARIES)'; \
- locs=`for p in $$list; do echo $$p; done | \
- sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \
- sort -u`; \
- test -z "$$locs" || { \
- echo rm -f $${locs}; \
- rm -f $${locs}; \
- }
-
-mostlyclean-compile:
- -rm -f *.$(OBJEXT)
-
-distclean-compile:
- -rm -f *.tab.c
-
-@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/alloca.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/acl_entries.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/alloca.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/basename-lgpl.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/btowc.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/c-ctype.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/c-strcasecmp.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/c-strncasecmp.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/canonicalize-lgpl.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/copy-acl.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dirname-lgpl.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/error.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/exitfail.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/file-has-acl.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fstat.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fwriting.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getdelim.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getfilecon.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getopt.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getopt1.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gettimeofday.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/localcharset.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/localeconv.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lstat.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/malloc.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/malloca.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mbrlen.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mbrtowc.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mbsinit.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mbtowc.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/memchr.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mkostemp.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/msvc-inval.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/msvc-nothrow.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nl_langinfo.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/obstack.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/quotearg.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/readlink.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/realloc.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/regcomp.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/regex.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/regex_internal.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/regexec.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rename.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rmdir.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/se-context.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/se-selinux.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/set-mode-acl.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/stat.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/stdio.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strerror-override.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strerror.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/stripslash.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strverscmp.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tempname.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/unistd.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/version-etc-fsf.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/version-etc.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/wcrtomb.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/wctob.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/wctomb.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/wctype-h.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xalloc-die.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xmalloc.Po@am__quote@
-
-.c.o:
-@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
-@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(COMPILE) -c $<
-
-.c.obj:
-@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
-@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'`
-
-# This directory's subdirectories are mostly independent; you can cd
-# into them and run 'make' without going through this Makefile.
-# To change the values of 'make' variables: instead of editing Makefiles,
-# (1) if the variable is set in 'config.status', edit 'config.status'
-# (which will cause the Makefiles to be regenerated when you run 'make');
-# (2) otherwise, pass the desired values on the 'make' command line.
-$(RECURSIVE_TARGETS) $(RECURSIVE_CLEAN_TARGETS):
- @fail= failcom='exit 1'; \
- for f in x $$MAKEFLAGS; do \
- case $$f in \
- *=* | --[!k]*);; \
- *k*) failcom='fail=yes';; \
- esac; \
- done; \
- dot_seen=no; \
- target=`echo $@ | sed s/-recursive//`; \
- case "$@" in \
- distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
- *) list='$(SUBDIRS)' ;; \
- esac; \
- for subdir in $$list; do \
- echo "Making $$target in $$subdir"; \
- if test "$$subdir" = "."; then \
- dot_seen=yes; \
- local_target="$$target-am"; \
- else \
- local_target="$$target"; \
- fi; \
- ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
- || eval $$failcom; \
- done; \
- if test "$$dot_seen" = "no"; then \
- $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
- fi; test -z "$$fail"
-tags-recursive:
- list='$(SUBDIRS)'; for subdir in $$list; do \
- test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \
- done
-ctags-recursive:
- list='$(SUBDIRS)'; for subdir in $$list; do \
- test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \
- done
-cscopelist-recursive:
- list='$(SUBDIRS)'; for subdir in $$list; do \
- test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) cscopelist); \
- done
-
-ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
- list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
- unique=`for i in $$list; do \
- if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
- done | \
- $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
- END { if (nonempty) { for (i in files) print i; }; }'`; \
- mkid -fID $$unique
-tags: TAGS
-
-TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
- $(TAGS_FILES) $(LISP)
- set x; \
- here=`pwd`; \
- if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \
- include_option=--etags-include; \
- empty_fix=.; \
- else \
- include_option=--include; \
- empty_fix=; \
- fi; \
- list='$(SUBDIRS)'; for subdir in $$list; do \
- if test "$$subdir" = .; then :; else \
- test ! -f $$subdir/TAGS || \
- set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \
- fi; \
- done; \
- list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
- unique=`for i in $$list; do \
- if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
- done | \
- $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
- END { if (nonempty) { for (i in files) print i; }; }'`; \
- shift; \
- if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
- test -n "$$unique" || unique=$$empty_fix; \
- if test $$# -gt 0; then \
- $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
- "$$@" $$unique; \
- else \
- $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
- $$unique; \
- fi; \
- fi
-ctags: CTAGS
-CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
- $(TAGS_FILES) $(LISP)
- list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
- unique=`for i in $$list; do \
- if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
- done | \
- $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
- END { if (nonempty) { for (i in files) print i; }; }'`; \
- test -z "$(CTAGS_ARGS)$$unique" \
- || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
- $$unique
-
-GTAGS:
- here=`$(am__cd) $(top_builddir) && pwd` \
- && $(am__cd) $(top_srcdir) \
- && gtags -i $(GTAGS_ARGS) "$$here"
-
-cscopelist: cscopelist-recursive $(HEADERS) $(SOURCES) $(LISP)
- list='$(SOURCES) $(HEADERS) $(LISP)'; \
- case "$(srcdir)" in \
- [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \
- *) sdir=$(subdir)/$(srcdir) ;; \
- esac; \
- for i in $$list; do \
- if test -f "$$i"; then \
- echo "$(subdir)/$$i"; \
- else \
- echo "$$sdir/$$i"; \
- fi; \
- done >> $(top_builddir)/cscope.files
-
-distclean-tags:
- -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
-
-distdir: $(DISTFILES)
- @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
- topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
- list='$(DISTFILES)'; \
- dist_files=`for file in $$list; do echo $$file; done | \
- sed -e "s|^$$srcdirstrip/||;t" \
- -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
- case $$dist_files in \
- */*) $(MKDIR_P) `echo "$$dist_files" | \
- sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
- sort -u` ;; \
- esac; \
- for file in $$dist_files; do \
- if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
- if test -d $$d/$$file; then \
- dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
- if test -d "$(distdir)/$$file"; then \
- find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
- fi; \
- if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
- cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
- find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
- fi; \
- cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
- else \
- test -f "$(distdir)/$$file" \
- || cp -p $$d/$$file "$(distdir)/$$file" \
- || exit 1; \
- fi; \
- done
- @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
- if test "$$subdir" = .; then :; else \
- $(am__make_dryrun) \
- || test -d "$(distdir)/$$subdir" \
- || $(MKDIR_P) "$(distdir)/$$subdir" \
- || exit 1; \
- dir1=$$subdir; dir2="$(distdir)/$$subdir"; \
- $(am__relativize); \
- new_distdir=$$reldir; \
- dir1=$$subdir; dir2="$(top_distdir)"; \
- $(am__relativize); \
- new_top_distdir=$$reldir; \
- echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \
- echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \
- ($(am__cd) $$subdir && \
- $(MAKE) $(AM_MAKEFLAGS) \
- top_distdir="$$new_top_distdir" \
- distdir="$$new_distdir" \
- am__remove_distdir=: \
- am__skip_length_check=: \
- am__skip_mode_fix=: \
- distdir) \
- || exit 1; \
- fi; \
- done
-check-am: all-am
-check: $(BUILT_SOURCES)
- $(MAKE) $(AM_MAKEFLAGS) check-recursive
-all-am: Makefile $(LIBRARIES) $(LTLIBRARIES) $(HEADERS) all-local
-installdirs: installdirs-recursive
-installdirs-am:
-install: $(BUILT_SOURCES)
- $(MAKE) $(AM_MAKEFLAGS) install-recursive
-install-exec: install-exec-recursive
-install-data: install-data-recursive
-uninstall: uninstall-recursive
-
-install-am: all-am
- @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
-
-installcheck: installcheck-recursive
-install-strip:
- if test -z '$(STRIP)'; then \
- $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
- install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
- install; \
- else \
- $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
- install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
- "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
- fi
-mostlyclean-generic:
- -test -z "$(MOSTLYCLEANFILES)" || rm -f $(MOSTLYCLEANFILES)
-
-clean-generic:
- -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
-
-distclean-generic:
- -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
- -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
- -test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES)
-
-maintainer-clean-generic:
- @echo "This command is intended for maintainers to use"
- @echo "it deletes files that may require special tools to rebuild."
- -test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES)
- -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES)
-clean: clean-recursive
-
-clean-am: clean-generic clean-noinstLIBRARIES clean-noinstLTLIBRARIES \
- mostlyclean-am
-
-distclean: distclean-recursive
- -rm -rf $(DEPDIR) ./$(DEPDIR)
- -rm -f Makefile
-distclean-am: clean-am distclean-compile distclean-generic \
- distclean-tags
-
-dvi: dvi-recursive
-
-dvi-am:
-
-html: html-recursive
-
-html-am:
-
-info: info-recursive
-
-info-am:
-
-install-data-am:
-
-install-dvi: install-dvi-recursive
-
-install-dvi-am:
-
-install-exec-am: install-exec-local
-
-install-html: install-html-recursive
-
-install-html-am:
-
-install-info: install-info-recursive
-
-install-info-am:
-
-install-man:
-
-install-pdf: install-pdf-recursive
-
-install-pdf-am:
-
-install-ps: install-ps-recursive
-
-install-ps-am:
-
-installcheck-am:
-
-maintainer-clean: maintainer-clean-recursive
- -rm -rf $(DEPDIR) ./$(DEPDIR)
- -rm -f Makefile
-maintainer-clean-am: distclean-am maintainer-clean-generic
-
-mostlyclean: mostlyclean-recursive
-
-mostlyclean-am: mostlyclean-compile mostlyclean-generic \
- mostlyclean-local
-
-pdf: pdf-recursive
-
-pdf-am:
-
-ps: ps-recursive
-
-ps-am:
-
-uninstall-am: uninstall-local
-
-.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) all check \
- cscopelist-recursive ctags-recursive install install-am \
- install-strip tags-recursive
-
-.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \
- all all-am all-local check check-am clean clean-generic \
- clean-noinstLIBRARIES clean-noinstLTLIBRARIES cscopelist \
- cscopelist-recursive ctags ctags-recursive distclean \
- distclean-compile distclean-generic distclean-tags distdir dvi \
- dvi-am html html-am info info-am install install-am \
- 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-pdf install-pdf-am install-ps install-ps-am \
- install-strip installcheck installcheck-am installdirs \
- installdirs-am maintainer-clean maintainer-clean-generic \
- mostlyclean mostlyclean-compile mostlyclean-generic \
- mostlyclean-local pdf pdf-am ps ps-am tags tags-recursive \
- uninstall uninstall-am uninstall-local
-
-
-# We need the following in order to create <alloca.h> when the system
-# doesn't have one that works with the given compiler.
-@GL_GENERATE_ALLOCA_H_TRUE@alloca.h: alloca.in.h $(top_builddir)/config.status
-@GL_GENERATE_ALLOCA_H_TRUE@ $(AM_V_GEN)rm -f $@-t $@ && \
-@GL_GENERATE_ALLOCA_H_TRUE@ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
-@GL_GENERATE_ALLOCA_H_TRUE@ cat $(srcdir)/alloca.in.h; \
-@GL_GENERATE_ALLOCA_H_TRUE@ } > $@-t && \
-@GL_GENERATE_ALLOCA_H_TRUE@ mv -f $@-t $@
-@GL_GENERATE_ALLOCA_H_FALSE@alloca.h: $(top_builddir)/config.status
-@GL_GENERATE_ALLOCA_H_FALSE@ rm -f $@
-
-# Listed in the same order as the GNU makefile conventions, and
-# provided by autoconf 2.59c+.
-# The Automake-defined pkg* macros are appended, in the order
-# listed in the Automake 1.10a+ documentation.
-configmake.h: Makefile
- $(AM_V_GEN)rm -f $@-t && \
- { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
- echo '#define PREFIX "$(prefix)"'; \
- echo '#define EXEC_PREFIX "$(exec_prefix)"'; \
- echo '#define BINDIR "$(bindir)"'; \
- echo '#define SBINDIR "$(sbindir)"'; \
- echo '#define LIBEXECDIR "$(libexecdir)"'; \
- echo '#define DATAROOTDIR "$(datarootdir)"'; \
- echo '#define DATADIR "$(datadir)"'; \
- echo '#define SYSCONFDIR "$(sysconfdir)"'; \
- echo '#define SHAREDSTATEDIR "$(sharedstatedir)"'; \
- echo '#define LOCALSTATEDIR "$(localstatedir)"'; \
- echo '#define INCLUDEDIR "$(includedir)"'; \
- echo '#define OLDINCLUDEDIR "$(oldincludedir)"'; \
- echo '#define DOCDIR "$(docdir)"'; \
- echo '#define INFODIR "$(infodir)"'; \
- echo '#define HTMLDIR "$(htmldir)"'; \
- echo '#define DVIDIR "$(dvidir)"'; \
- echo '#define PDFDIR "$(pdfdir)"'; \
- echo '#define PSDIR "$(psdir)"'; \
- echo '#define LIBDIR "$(libdir)"'; \
- echo '#define LISPDIR "$(lispdir)"'; \
- echo '#define LOCALEDIR "$(localedir)"'; \
- echo '#define MANDIR "$(mandir)"'; \
- echo '#define MANEXT "$(manext)"'; \
- echo '#define PKGDATADIR "$(pkgdatadir)"'; \
- echo '#define PKGINCLUDEDIR "$(pkgincludedir)"'; \
- echo '#define PKGLIBDIR "$(pkglibdir)"'; \
- echo '#define PKGLIBEXECDIR "$(pkglibexecdir)"'; \
- } | sed '/""/d' > $@-t && \
- mv -f $@-t $@
-
-# We need the following in order to create <errno.h> when the system
-# doesn't have one that is POSIX compliant.
-@GL_GENERATE_ERRNO_H_TRUE@errno.h: errno.in.h $(top_builddir)/config.status
-@GL_GENERATE_ERRNO_H_TRUE@ $(AM_V_GEN)rm -f $@-t $@ && \
-@GL_GENERATE_ERRNO_H_TRUE@ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \
-@GL_GENERATE_ERRNO_H_TRUE@ sed -e 's|@''GUARD_PREFIX''@|GL|g' \
-@GL_GENERATE_ERRNO_H_TRUE@ -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
-@GL_GENERATE_ERRNO_H_TRUE@ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
-@GL_GENERATE_ERRNO_H_TRUE@ -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \
-@GL_GENERATE_ERRNO_H_TRUE@ -e 's|@''NEXT_ERRNO_H''@|$(NEXT_ERRNO_H)|g' \
-@GL_GENERATE_ERRNO_H_TRUE@ -e 's|@''EMULTIHOP_HIDDEN''@|$(EMULTIHOP_HIDDEN)|g' \
-@GL_GENERATE_ERRNO_H_TRUE@ -e 's|@''EMULTIHOP_VALUE''@|$(EMULTIHOP_VALUE)|g' \
-@GL_GENERATE_ERRNO_H_TRUE@ -e 's|@''ENOLINK_HIDDEN''@|$(ENOLINK_HIDDEN)|g' \
-@GL_GENERATE_ERRNO_H_TRUE@ -e 's|@''ENOLINK_VALUE''@|$(ENOLINK_VALUE)|g' \
-@GL_GENERATE_ERRNO_H_TRUE@ -e 's|@''EOVERFLOW_HIDDEN''@|$(EOVERFLOW_HIDDEN)|g' \
-@GL_GENERATE_ERRNO_H_TRUE@ -e 's|@''EOVERFLOW_VALUE''@|$(EOVERFLOW_VALUE)|g' \
-@GL_GENERATE_ERRNO_H_TRUE@ < $(srcdir)/errno.in.h; \
-@GL_GENERATE_ERRNO_H_TRUE@ } > $@-t && \
-@GL_GENERATE_ERRNO_H_TRUE@ mv $@-t $@
-@GL_GENERATE_ERRNO_H_FALSE@errno.h: $(top_builddir)/config.status
-@GL_GENERATE_ERRNO_H_FALSE@ rm -f $@
-
-# We need the following in order to create <fcntl.h> when the system
-# doesn't have one that works with the given compiler.
-fcntl.h: fcntl.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_FCNTL_H''@|$(NEXT_FCNTL_H)|g' \
- -e 's/@''GNULIB_FCNTL''@/$(GNULIB_FCNTL)/g' \
- -e 's/@''GNULIB_NONBLOCKING''@/$(GNULIB_NONBLOCKING)/g' \
- -e 's/@''GNULIB_OPEN''@/$(GNULIB_OPEN)/g' \
- -e 's/@''GNULIB_OPENAT''@/$(GNULIB_OPENAT)/g' \
- -e 's|@''HAVE_FCNTL''@|$(HAVE_FCNTL)|g' \
- -e 's|@''HAVE_OPENAT''@|$(HAVE_OPENAT)|g' \
- -e 's|@''REPLACE_FCNTL''@|$(REPLACE_FCNTL)|g' \
- -e 's|@''REPLACE_OPEN''@|$(REPLACE_OPEN)|g' \
- -e 's|@''REPLACE_OPENAT''@|$(REPLACE_OPENAT)|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)/fcntl.in.h; \
- } > $@-t && \
- mv $@-t $@
-
-# We need the following in order to create <getopt.h> when the system
-# doesn't have one that works with the given compiler.
-getopt.h: getopt.in.h $(top_builddir)/config.status $(ARG_NONNULL_H)
- $(AM_V_GEN)rm -f $@-t $@ && \
- { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
- sed -e 's|@''GUARD_PREFIX''@|GL|g' \
- -e 's|@''HAVE_GETOPT_H''@|$(HAVE_GETOPT_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_GETOPT_H''@|$(NEXT_GETOPT_H)|g' \
- -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \
- < $(srcdir)/getopt.in.h; \
- } > $@-t && \
- mv -f $@-t $@
-
-# We need the following in order to create an empty placeholder for
-# <langinfo.h> when the system doesn't have one.
-langinfo.h: langinfo.in.h $(top_builddir)/config.status $(CXXDEFS_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|@''HAVE_LANGINFO_H''@|$(HAVE_LANGINFO_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_LANGINFO_H''@|$(NEXT_LANGINFO_H)|g' \
- -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_ERA''@|$(HAVE_LANGINFO_ERA)|g' \
- -e 's|@''HAVE_LANGINFO_YESEXPR''@|$(HAVE_LANGINFO_YESEXPR)|g' \
- -e 's|@''HAVE_NL_LANGINFO''@|$(HAVE_NL_LANGINFO)|g' \
- -e 's|@''REPLACE_NL_LANGINFO''@|$(REPLACE_NL_LANGINFO)|g' \
- -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \
- -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \
- < $(srcdir)/langinfo.in.h; \
- } > $@-t && \
- mv $@-t $@
-
-# We need the following in order to install a simple file in $(libdir)
-# which is shared with other installed packages. We use a list of referencing
-# packages so that "make uninstall" will remove the file if and only if it
-# is not used by another installed package.
-# On systems with glibc-2.1 or newer, the file is redundant, therefore we
-# avoid installing it.
-
-all-local: charset.alias ref-add.sed ref-del.sed
-install-exec-local: install-exec-localcharset
-install-exec-localcharset: all-local
- if test $(GLIBC21) = no; then \
- case '$(host_os)' in \
- darwin[56]*) \
- need_charset_alias=true ;; \
- darwin* | cygwin* | mingw* | pw32* | cegcc*) \
- need_charset_alias=false ;; \
- *) \
- need_charset_alias=true ;; \
- esac ; \
- else \
- need_charset_alias=false ; \
- fi ; \
- if $$need_charset_alias; then \
- $(mkinstalldirs) $(DESTDIR)$(libdir) ; \
- fi ; \
- if test -f $(charset_alias); then \
- sed -f ref-add.sed $(charset_alias) > $(charset_tmp) ; \
- $(INSTALL_DATA) $(charset_tmp) $(charset_alias) ; \
- rm -f $(charset_tmp) ; \
- else \
- if $$need_charset_alias; then \
- sed -f ref-add.sed charset.alias > $(charset_tmp) ; \
- $(INSTALL_DATA) $(charset_tmp) $(charset_alias) ; \
- rm -f $(charset_tmp) ; \
- fi ; \
- fi
-
-uninstall-local: uninstall-localcharset
-uninstall-localcharset: all-local
- if test -f $(charset_alias); then \
- sed -f ref-del.sed $(charset_alias) > $(charset_tmp); \
- if grep '^# Packages using this file: $$' $(charset_tmp) \
- > /dev/null; then \
- rm -f $(charset_alias); \
- else \
- $(INSTALL_DATA) $(charset_tmp) $(charset_alias); \
- fi; \
- rm -f $(charset_tmp); \
- fi
-
-charset.alias: config.charset
- $(AM_V_GEN)rm -f t-$@ $@ && \
- $(SHELL) $(srcdir)/config.charset '$(host)' > t-$@ && \
- mv t-$@ $@
-.sin.sed:
- $(AM_V_GEN)rm -f t-$@ $@ && \
- sed -e '/^#/d' -e 's/@''PACKAGE''@/$(PACKAGE)/g' $< > t-$@ && \
- mv t-$@ $@
-
-# We need the following in order to create <locale.h> when the system
-# doesn't have one that provides all definitions.
-locale.h: locale.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_LOCALE_H''@|$(NEXT_LOCALE_H)|g' \
- -e 's/@''GNULIB_LOCALECONV''@/$(GNULIB_LOCALECONV)/g' \
- -e 's/@''GNULIB_SETLOCALE''@/$(GNULIB_SETLOCALE)/g' \
- -e 's/@''GNULIB_DUPLOCALE''@/$(GNULIB_DUPLOCALE)/g' \
- -e 's|@''HAVE_DUPLOCALE''@|$(HAVE_DUPLOCALE)|g' \
- -e 's|@''HAVE_XLOCALE_H''@|$(HAVE_XLOCALE_H)|g' \
- -e 's|@''REPLACE_LOCALECONV''@|$(REPLACE_LOCALECONV)|g' \
- -e 's|@''REPLACE_SETLOCALE''@|$(REPLACE_SETLOCALE)|g' \
- -e 's|@''REPLACE_DUPLOCALE''@|$(REPLACE_DUPLOCALE)|g' \
- -e 's|@''REPLACE_STRUCT_LCONV''@|$(REPLACE_STRUCT_LCONV)|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)/locale.in.h; \
- } > $@-t && \
- mv $@-t $@
-selinux/selinux.h: se-selinux.in.h $(top_builddir)/config.status $(UNUSED_PARAMETER_H)
- $(AM_V_at)$(MKDIR_P) selinux
- $(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_SELINUX_SELINUX_H''@|$(NEXT_SELINUX_SELINUX_H)|g' \
- -e '/definition of _GL_UNUSED_PARAMETER/r $(UNUSED_PARAMETER_H)' \
- < $(srcdir)/se-selinux.in.h; \
- } > $@-t && \
- chmod a-x $@-t && \
- mv $@-t $@
-@GL_GENERATE_SELINUX_CONTEXT_H_TRUE@selinux/context.h: se-context.in.h $(top_builddir)/config.status $(UNUSED_PARAMETER_H)
-@GL_GENERATE_SELINUX_CONTEXT_H_TRUE@ $(AM_V_at)$(MKDIR_P) selinux
-@GL_GENERATE_SELINUX_CONTEXT_H_TRUE@ $(AM_V_GEN)rm -f $@-t $@ && \
-@GL_GENERATE_SELINUX_CONTEXT_H_TRUE@ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \
-@GL_GENERATE_SELINUX_CONTEXT_H_TRUE@ sed -e '/definition of _GL_UNUSED_PARAMETER/r $(UNUSED_PARAMETER_H)' \
-@GL_GENERATE_SELINUX_CONTEXT_H_TRUE@ < $(srcdir)/se-context.in.h; \
-@GL_GENERATE_SELINUX_CONTEXT_H_TRUE@ } > $@-t && \
-@GL_GENERATE_SELINUX_CONTEXT_H_TRUE@ chmod a-x $@-t && \
-@GL_GENERATE_SELINUX_CONTEXT_H_TRUE@ mv $@-t $@
-@GL_GENERATE_SELINUX_CONTEXT_H_FALSE@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.
-arg-nonnull.h: $(top_srcdir)/build-aux/snippet/arg-nonnull.h
- $(AM_V_GEN)rm -f $@-t $@ && \
- sed -n -e '/GL_ARG_NONNULL/,$$p' \
- < $(top_srcdir)/build-aux/snippet/arg-nonnull.h \
- > $@-t && \
- mv $@-t $@
-# The c++defs.h that gets inserted into generated .h files is the same as
-# build-aux/snippet/c++defs.h, except that it has the copyright header cut off.
-c++defs.h: $(top_srcdir)/build-aux/snippet/c++defs.h
- $(AM_V_GEN)rm -f $@-t $@ && \
- sed -n -e '/_GL_CXXDEFS/,$$p' \
- < $(top_srcdir)/build-aux/snippet/c++defs.h \
- > $@-t && \
- mv $@-t $@
-# The unused-parameter.h that gets inserted into generated .h files is the same
-# as build-aux/snippet/unused-parameter.h, except that it has the copyright
-# header cut off.
-unused-parameter.h: $(top_srcdir)/build-aux/snippet/unused-parameter.h
- $(AM_V_GEN)rm -f $@-t $@ && \
- sed -n -e '/GL_UNUSED_PARAMETER/,$$p' \
- < $(top_srcdir)/build-aux/snippet/unused-parameter.h \
- > $@-t && \
- mv $@-t $@
-# The warn-on-use.h that gets inserted into generated .h files is the same as
-# build-aux/snippet/warn-on-use.h, except that it has the copyright header cut
-# off.
-warn-on-use.h: $(top_srcdir)/build-aux/snippet/warn-on-use.h
- $(AM_V_GEN)rm -f $@-t $@ && \
- sed -n -e '/^.ifndef/,$$p' \
- < $(top_srcdir)/build-aux/snippet/warn-on-use.h \
- > $@-t && \
- mv $@-t $@
-
-# We need the following in order to create <stdarg.h> when the system
-# doesn't have one that works with the given compiler.
-@GL_GENERATE_STDARG_H_TRUE@stdarg.h: stdarg.in.h $(top_builddir)/config.status
-@GL_GENERATE_STDARG_H_TRUE@ $(AM_V_GEN)rm -f $@-t $@ && \
-@GL_GENERATE_STDARG_H_TRUE@ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \
-@GL_GENERATE_STDARG_H_TRUE@ sed -e 's|@''GUARD_PREFIX''@|GL|g' \
-@GL_GENERATE_STDARG_H_TRUE@ -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
-@GL_GENERATE_STDARG_H_TRUE@ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
-@GL_GENERATE_STDARG_H_TRUE@ -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \
-@GL_GENERATE_STDARG_H_TRUE@ -e 's|@''NEXT_STDARG_H''@|$(NEXT_STDARG_H)|g' \
-@GL_GENERATE_STDARG_H_TRUE@ < $(srcdir)/stdarg.in.h; \
-@GL_GENERATE_STDARG_H_TRUE@ } > $@-t && \
-@GL_GENERATE_STDARG_H_TRUE@ mv $@-t $@
-@GL_GENERATE_STDARG_H_FALSE@stdarg.h: $(top_builddir)/config.status
-@GL_GENERATE_STDARG_H_FALSE@ rm -f $@
-
-# We need the following in order to create <stdbool.h> when the system
-# doesn't have one that works.
-@GL_GENERATE_STDBOOL_H_TRUE@stdbool.h: stdbool.in.h $(top_builddir)/config.status
-@GL_GENERATE_STDBOOL_H_TRUE@ $(AM_V_GEN)rm -f $@-t $@ && \
-@GL_GENERATE_STDBOOL_H_TRUE@ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
-@GL_GENERATE_STDBOOL_H_TRUE@ sed -e 's/@''HAVE__BOOL''@/$(HAVE__BOOL)/g' < $(srcdir)/stdbool.in.h; \
-@GL_GENERATE_STDBOOL_H_TRUE@ } > $@-t && \
-@GL_GENERATE_STDBOOL_H_TRUE@ mv $@-t $@
-@GL_GENERATE_STDBOOL_H_FALSE@stdbool.h: $(top_builddir)/config.status
-@GL_GENERATE_STDBOOL_H_FALSE@ rm -f $@
-
-# We need the following in order to create <stddef.h> when the system
-# doesn't have one that works with the given compiler.
-@GL_GENERATE_STDDEF_H_TRUE@stddef.h: stddef.in.h $(top_builddir)/config.status
-@GL_GENERATE_STDDEF_H_TRUE@ $(AM_V_GEN)rm -f $@-t $@ && \
-@GL_GENERATE_STDDEF_H_TRUE@ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \
-@GL_GENERATE_STDDEF_H_TRUE@ sed -e 's|@''GUARD_PREFIX''@|GL|g' \
-@GL_GENERATE_STDDEF_H_TRUE@ -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
-@GL_GENERATE_STDDEF_H_TRUE@ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
-@GL_GENERATE_STDDEF_H_TRUE@ -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \
-@GL_GENERATE_STDDEF_H_TRUE@ -e 's|@''NEXT_STDDEF_H''@|$(NEXT_STDDEF_H)|g' \
-@GL_GENERATE_STDDEF_H_TRUE@ -e 's|@''HAVE_WCHAR_T''@|$(HAVE_WCHAR_T)|g' \
-@GL_GENERATE_STDDEF_H_TRUE@ -e 's|@''REPLACE_NULL''@|$(REPLACE_NULL)|g' \
-@GL_GENERATE_STDDEF_H_TRUE@ < $(srcdir)/stddef.in.h; \
-@GL_GENERATE_STDDEF_H_TRUE@ } > $@-t && \
-@GL_GENERATE_STDDEF_H_TRUE@ mv $@-t $@
-@GL_GENERATE_STDDEF_H_FALSE@stddef.h: $(top_builddir)/config.status
-@GL_GENERATE_STDDEF_H_FALSE@ rm -f $@
-
-# We need the following in order to create <stdint.h> when the system
-# doesn't have one that works with the given compiler.
-@GL_GENERATE_STDINT_H_TRUE@stdint.h: stdint.in.h $(top_builddir)/config.status
-@GL_GENERATE_STDINT_H_TRUE@ $(AM_V_GEN)rm -f $@-t $@ && \
-@GL_GENERATE_STDINT_H_TRUE@ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
-@GL_GENERATE_STDINT_H_TRUE@ sed -e 's|@''GUARD_PREFIX''@|GL|g' \
-@GL_GENERATE_STDINT_H_TRUE@ -e 's/@''HAVE_STDINT_H''@/$(HAVE_STDINT_H)/g' \
-@GL_GENERATE_STDINT_H_TRUE@ -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
-@GL_GENERATE_STDINT_H_TRUE@ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
-@GL_GENERATE_STDINT_H_TRUE@ -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \
-@GL_GENERATE_STDINT_H_TRUE@ -e 's|@''NEXT_STDINT_H''@|$(NEXT_STDINT_H)|g' \
-@GL_GENERATE_STDINT_H_TRUE@ -e 's/@''HAVE_SYS_TYPES_H''@/$(HAVE_SYS_TYPES_H)/g' \
-@GL_GENERATE_STDINT_H_TRUE@ -e 's/@''HAVE_INTTYPES_H''@/$(HAVE_INTTYPES_H)/g' \
-@GL_GENERATE_STDINT_H_TRUE@ -e 's/@''HAVE_SYS_INTTYPES_H''@/$(HAVE_SYS_INTTYPES_H)/g' \
-@GL_GENERATE_STDINT_H_TRUE@ -e 's/@''HAVE_SYS_BITYPES_H''@/$(HAVE_SYS_BITYPES_H)/g' \
-@GL_GENERATE_STDINT_H_TRUE@ -e 's/@''HAVE_WCHAR_H''@/$(HAVE_WCHAR_H)/g' \
-@GL_GENERATE_STDINT_H_TRUE@ -e 's/@''HAVE_LONG_LONG_INT''@/$(HAVE_LONG_LONG_INT)/g' \
-@GL_GENERATE_STDINT_H_TRUE@ -e 's/@''HAVE_UNSIGNED_LONG_LONG_INT''@/$(HAVE_UNSIGNED_LONG_LONG_INT)/g' \
-@GL_GENERATE_STDINT_H_TRUE@ -e 's/@''APPLE_UNIVERSAL_BUILD''@/$(APPLE_UNIVERSAL_BUILD)/g' \
-@GL_GENERATE_STDINT_H_TRUE@ -e 's/@''BITSIZEOF_PTRDIFF_T''@/$(BITSIZEOF_PTRDIFF_T)/g' \
-@GL_GENERATE_STDINT_H_TRUE@ -e 's/@''PTRDIFF_T_SUFFIX''@/$(PTRDIFF_T_SUFFIX)/g' \
-@GL_GENERATE_STDINT_H_TRUE@ -e 's/@''BITSIZEOF_SIG_ATOMIC_T''@/$(BITSIZEOF_SIG_ATOMIC_T)/g' \
-@GL_GENERATE_STDINT_H_TRUE@ -e 's/@''HAVE_SIGNED_SIG_ATOMIC_T''@/$(HAVE_SIGNED_SIG_ATOMIC_T)/g' \
-@GL_GENERATE_STDINT_H_TRUE@ -e 's/@''SIG_ATOMIC_T_SUFFIX''@/$(SIG_ATOMIC_T_SUFFIX)/g' \
-@GL_GENERATE_STDINT_H_TRUE@ -e 's/@''BITSIZEOF_SIZE_T''@/$(BITSIZEOF_SIZE_T)/g' \
-@GL_GENERATE_STDINT_H_TRUE@ -e 's/@''SIZE_T_SUFFIX''@/$(SIZE_T_SUFFIX)/g' \
-@GL_GENERATE_STDINT_H_TRUE@ -e 's/@''BITSIZEOF_WCHAR_T''@/$(BITSIZEOF_WCHAR_T)/g' \
-@GL_GENERATE_STDINT_H_TRUE@ -e 's/@''HAVE_SIGNED_WCHAR_T''@/$(HAVE_SIGNED_WCHAR_T)/g' \
-@GL_GENERATE_STDINT_H_TRUE@ -e 's/@''WCHAR_T_SUFFIX''@/$(WCHAR_T_SUFFIX)/g' \
-@GL_GENERATE_STDINT_H_TRUE@ -e 's/@''BITSIZEOF_WINT_T''@/$(BITSIZEOF_WINT_T)/g' \
-@GL_GENERATE_STDINT_H_TRUE@ -e 's/@''HAVE_SIGNED_WINT_T''@/$(HAVE_SIGNED_WINT_T)/g' \
-@GL_GENERATE_STDINT_H_TRUE@ -e 's/@''WINT_T_SUFFIX''@/$(WINT_T_SUFFIX)/g' \
-@GL_GENERATE_STDINT_H_TRUE@ < $(srcdir)/stdint.in.h; \
-@GL_GENERATE_STDINT_H_TRUE@ } > $@-t && \
-@GL_GENERATE_STDINT_H_TRUE@ mv $@-t $@
-@GL_GENERATE_STDINT_H_FALSE@stdint.h: $(top_builddir)/config.status
-@GL_GENERATE_STDINT_H_FALSE@ rm -f $@
-
-# We need the following in order to create <stdio.h> when the system
-# doesn't have one that works with the given compiler.
-stdio.h: stdio.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_STDIO_H''@|$(NEXT_STDIO_H)|g' \
- -e 's/@''GNULIB_DPRINTF''@/$(GNULIB_DPRINTF)/g' \
- -e 's/@''GNULIB_FCLOSE''@/$(GNULIB_FCLOSE)/g' \
- -e 's/@''GNULIB_FDOPEN''@/$(GNULIB_FDOPEN)/g' \
- -e 's/@''GNULIB_FFLUSH''@/$(GNULIB_FFLUSH)/g' \
- -e 's/@''GNULIB_FGETC''@/$(GNULIB_FGETC)/g' \
- -e 's/@''GNULIB_FGETS''@/$(GNULIB_FGETS)/g' \
- -e 's/@''GNULIB_FOPEN''@/$(GNULIB_FOPEN)/g' \
- -e 's/@''GNULIB_FPRINTF''@/$(GNULIB_FPRINTF)/g' \
- -e 's/@''GNULIB_FPRINTF_POSIX''@/$(GNULIB_FPRINTF_POSIX)/g' \
- -e 's/@''GNULIB_FPURGE''@/$(GNULIB_FPURGE)/g' \
- -e 's/@''GNULIB_FPUTC''@/$(GNULIB_FPUTC)/g' \
- -e 's/@''GNULIB_FPUTS''@/$(GNULIB_FPUTS)/g' \
- -e 's/@''GNULIB_FREAD''@/$(GNULIB_FREAD)/g' \
- -e 's/@''GNULIB_FREOPEN''@/$(GNULIB_FREOPEN)/g' \
- -e 's/@''GNULIB_FSCANF''@/$(GNULIB_FSCANF)/g' \
- -e 's/@''GNULIB_FSEEK''@/$(GNULIB_FSEEK)/g' \
- -e 's/@''GNULIB_FSEEKO''@/$(GNULIB_FSEEKO)/g' \
- -e 's/@''GNULIB_FTELL''@/$(GNULIB_FTELL)/g' \
- -e 's/@''GNULIB_FTELLO''@/$(GNULIB_FTELLO)/g' \
- -e 's/@''GNULIB_FWRITE''@/$(GNULIB_FWRITE)/g' \
- -e 's/@''GNULIB_GETC''@/$(GNULIB_GETC)/g' \
- -e 's/@''GNULIB_GETCHAR''@/$(GNULIB_GETCHAR)/g' \
- -e 's/@''GNULIB_GETDELIM''@/$(GNULIB_GETDELIM)/g' \
- -e 's/@''GNULIB_GETLINE''@/$(GNULIB_GETLINE)/g' \
- -e 's/@''GNULIB_OBSTACK_PRINTF''@/$(GNULIB_OBSTACK_PRINTF)/g' \
- -e 's/@''GNULIB_OBSTACK_PRINTF_POSIX''@/$(GNULIB_OBSTACK_PRINTF_POSIX)/g' \
- -e 's/@''GNULIB_PCLOSE''@/$(GNULIB_PCLOSE)/g' \
- -e 's/@''GNULIB_PERROR''@/$(GNULIB_PERROR)/g' \
- -e 's/@''GNULIB_POPEN''@/$(GNULIB_POPEN)/g' \
- -e 's/@''GNULIB_PRINTF''@/$(GNULIB_PRINTF)/g' \
- -e 's/@''GNULIB_PRINTF_POSIX''@/$(GNULIB_PRINTF_POSIX)/g' \
- -e 's/@''GNULIB_PUTC''@/$(GNULIB_PUTC)/g' \
- -e 's/@''GNULIB_PUTCHAR''@/$(GNULIB_PUTCHAR)/g' \
- -e 's/@''GNULIB_PUTS''@/$(GNULIB_PUTS)/g' \
- -e 's/@''GNULIB_REMOVE''@/$(GNULIB_REMOVE)/g' \
- -e 's/@''GNULIB_RENAME''@/$(GNULIB_RENAME)/g' \
- -e 's/@''GNULIB_RENAMEAT''@/$(GNULIB_RENAMEAT)/g' \
- -e 's/@''GNULIB_SCANF''@/$(GNULIB_SCANF)/g' \
- -e 's/@''GNULIB_SNPRINTF''@/$(GNULIB_SNPRINTF)/g' \
- -e 's/@''GNULIB_SPRINTF_POSIX''@/$(GNULIB_SPRINTF_POSIX)/g' \
- -e 's/@''GNULIB_STDIO_H_NONBLOCKING''@/$(GNULIB_STDIO_H_NONBLOCKING)/g' \
- -e 's/@''GNULIB_STDIO_H_SIGPIPE''@/$(GNULIB_STDIO_H_SIGPIPE)/g' \
- -e 's/@''GNULIB_TMPFILE''@/$(GNULIB_TMPFILE)/g' \
- -e 's/@''GNULIB_VASPRINTF''@/$(GNULIB_VASPRINTF)/g' \
- -e 's/@''GNULIB_VDPRINTF''@/$(GNULIB_VDPRINTF)/g' \
- -e 's/@''GNULIB_VFPRINTF''@/$(GNULIB_VFPRINTF)/g' \
- -e 's/@''GNULIB_VFPRINTF_POSIX''@/$(GNULIB_VFPRINTF_POSIX)/g' \
- -e 's/@''GNULIB_VFSCANF''@/$(GNULIB_VFSCANF)/g' \
- -e 's/@''GNULIB_VSCANF''@/$(GNULIB_VSCANF)/g' \
- -e 's/@''GNULIB_VPRINTF''@/$(GNULIB_VPRINTF)/g' \
- -e 's/@''GNULIB_VPRINTF_POSIX''@/$(GNULIB_VPRINTF_POSIX)/g' \
- -e 's/@''GNULIB_VSNPRINTF''@/$(GNULIB_VSNPRINTF)/g' \
- -e 's/@''GNULIB_VSPRINTF_POSIX''@/$(GNULIB_VSPRINTF_POSIX)/g' \
- < $(srcdir)/stdio.in.h | \
- sed -e 's|@''HAVE_DECL_FPURGE''@|$(HAVE_DECL_FPURGE)|g' \
- -e 's|@''HAVE_DECL_FSEEKO''@|$(HAVE_DECL_FSEEKO)|g' \
- -e 's|@''HAVE_DECL_FTELLO''@|$(HAVE_DECL_FTELLO)|g' \
- -e 's|@''HAVE_DECL_GETDELIM''@|$(HAVE_DECL_GETDELIM)|g' \
- -e 's|@''HAVE_DECL_GETLINE''@|$(HAVE_DECL_GETLINE)|g' \
- -e 's|@''HAVE_DECL_OBSTACK_PRINTF''@|$(HAVE_DECL_OBSTACK_PRINTF)|g' \
- -e 's|@''HAVE_DECL_SNPRINTF''@|$(HAVE_DECL_SNPRINTF)|g' \
- -e 's|@''HAVE_DECL_VSNPRINTF''@|$(HAVE_DECL_VSNPRINTF)|g' \
- -e 's|@''HAVE_DPRINTF''@|$(HAVE_DPRINTF)|g' \
- -e 's|@''HAVE_FSEEKO''@|$(HAVE_FSEEKO)|g' \
- -e 's|@''HAVE_FTELLO''@|$(HAVE_FTELLO)|g' \
- -e 's|@''HAVE_PCLOSE''@|$(HAVE_PCLOSE)|g' \
- -e 's|@''HAVE_POPEN''@|$(HAVE_POPEN)|g' \
- -e 's|@''HAVE_RENAMEAT''@|$(HAVE_RENAMEAT)|g' \
- -e 's|@''HAVE_VASPRINTF''@|$(HAVE_VASPRINTF)|g' \
- -e 's|@''HAVE_VDPRINTF''@|$(HAVE_VDPRINTF)|g' \
- -e 's|@''REPLACE_DPRINTF''@|$(REPLACE_DPRINTF)|g' \
- -e 's|@''REPLACE_FCLOSE''@|$(REPLACE_FCLOSE)|g' \
- -e 's|@''REPLACE_FDOPEN''@|$(REPLACE_FDOPEN)|g' \
- -e 's|@''REPLACE_FFLUSH''@|$(REPLACE_FFLUSH)|g' \
- -e 's|@''REPLACE_FOPEN''@|$(REPLACE_FOPEN)|g' \
- -e 's|@''REPLACE_FPRINTF''@|$(REPLACE_FPRINTF)|g' \
- -e 's|@''REPLACE_FPURGE''@|$(REPLACE_FPURGE)|g' \
- -e 's|@''REPLACE_FREOPEN''@|$(REPLACE_FREOPEN)|g' \
- -e 's|@''REPLACE_FSEEK''@|$(REPLACE_FSEEK)|g' \
- -e 's|@''REPLACE_FSEEKO''@|$(REPLACE_FSEEKO)|g' \
- -e 's|@''REPLACE_FTELL''@|$(REPLACE_FTELL)|g' \
- -e 's|@''REPLACE_FTELLO''@|$(REPLACE_FTELLO)|g' \
- -e 's|@''REPLACE_GETDELIM''@|$(REPLACE_GETDELIM)|g' \
- -e 's|@''REPLACE_GETLINE''@|$(REPLACE_GETLINE)|g' \
- -e 's|@''REPLACE_OBSTACK_PRINTF''@|$(REPLACE_OBSTACK_PRINTF)|g' \
- -e 's|@''REPLACE_PERROR''@|$(REPLACE_PERROR)|g' \
- -e 's|@''REPLACE_POPEN''@|$(REPLACE_POPEN)|g' \
- -e 's|@''REPLACE_PRINTF''@|$(REPLACE_PRINTF)|g' \
- -e 's|@''REPLACE_REMOVE''@|$(REPLACE_REMOVE)|g' \
- -e 's|@''REPLACE_RENAME''@|$(REPLACE_RENAME)|g' \
- -e 's|@''REPLACE_RENAMEAT''@|$(REPLACE_RENAMEAT)|g' \
- -e 's|@''REPLACE_SNPRINTF''@|$(REPLACE_SNPRINTF)|g' \
- -e 's|@''REPLACE_SPRINTF''@|$(REPLACE_SPRINTF)|g' \
- -e 's|@''REPLACE_STDIO_READ_FUNCS''@|$(REPLACE_STDIO_READ_FUNCS)|g' \
- -e 's|@''REPLACE_STDIO_WRITE_FUNCS''@|$(REPLACE_STDIO_WRITE_FUNCS)|g' \
- -e 's|@''REPLACE_TMPFILE''@|$(REPLACE_TMPFILE)|g' \
- -e 's|@''REPLACE_VASPRINTF''@|$(REPLACE_VASPRINTF)|g' \
- -e 's|@''REPLACE_VDPRINTF''@|$(REPLACE_VDPRINTF)|g' \
- -e 's|@''REPLACE_VFPRINTF''@|$(REPLACE_VFPRINTF)|g' \
- -e 's|@''REPLACE_VPRINTF''@|$(REPLACE_VPRINTF)|g' \
- -e 's|@''REPLACE_VSNPRINTF''@|$(REPLACE_VSNPRINTF)|g' \
- -e 's|@''REPLACE_VSPRINTF''@|$(REPLACE_VSPRINTF)|g' \
- -e 's|@''ASM_SYMBOL_PREFIX''@|$(ASM_SYMBOL_PREFIX)|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)'; \
- } > $@-t && \
- mv $@-t $@
-
-# We need the following in order to create <stdlib.h> when the system
-# doesn't have one that works with the given compiler.
-stdlib.h: stdlib.in.h $(top_builddir)/config.status $(CXXDEFS_H) \
- $(_NORETURN_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_STDLIB_H''@|$(NEXT_STDLIB_H)|g' \
- -e 's/@''GNULIB__EXIT''@/$(GNULIB__EXIT)/g' \
- -e 's/@''GNULIB_ATOLL''@/$(GNULIB_ATOLL)/g' \
- -e 's/@''GNULIB_CALLOC_POSIX''@/$(GNULIB_CALLOC_POSIX)/g' \
- -e 's/@''GNULIB_CANONICALIZE_FILE_NAME''@/$(GNULIB_CANONICALIZE_FILE_NAME)/g' \
- -e 's/@''GNULIB_GETLOADAVG''@/$(GNULIB_GETLOADAVG)/g' \
- -e 's/@''GNULIB_GETSUBOPT''@/$(GNULIB_GETSUBOPT)/g' \
- -e 's/@''GNULIB_GRANTPT''@/$(GNULIB_GRANTPT)/g' \
- -e 's/@''GNULIB_MALLOC_POSIX''@/$(GNULIB_MALLOC_POSIX)/g' \
- -e 's/@''GNULIB_MBTOWC''@/$(GNULIB_MBTOWC)/g' \
- -e 's/@''GNULIB_MKDTEMP''@/$(GNULIB_MKDTEMP)/g' \
- -e 's/@''GNULIB_MKOSTEMP''@/$(GNULIB_MKOSTEMP)/g' \
- -e 's/@''GNULIB_MKOSTEMPS''@/$(GNULIB_MKOSTEMPS)/g' \
- -e 's/@''GNULIB_MKSTEMP''@/$(GNULIB_MKSTEMP)/g' \
- -e 's/@''GNULIB_MKSTEMPS''@/$(GNULIB_MKSTEMPS)/g' \
- -e 's/@''GNULIB_POSIX_OPENPT''@/$(GNULIB_POSIX_OPENPT)/g' \
- -e 's/@''GNULIB_PTSNAME''@/$(GNULIB_PTSNAME)/g' \
- -e 's/@''GNULIB_PTSNAME_R''@/$(GNULIB_PTSNAME_R)/g' \
- -e 's/@''GNULIB_PUTENV''@/$(GNULIB_PUTENV)/g' \
- -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_REALPATH''@/$(GNULIB_REALPATH)/g' \
- -e 's/@''GNULIB_RPMATCH''@/$(GNULIB_RPMATCH)/g' \
- -e 's/@''GNULIB_SETENV''@/$(GNULIB_SETENV)/g' \
- -e 's/@''GNULIB_STRTOD''@/$(GNULIB_STRTOD)/g' \
- -e 's/@''GNULIB_STRTOLL''@/$(GNULIB_STRTOLL)/g' \
- -e 's/@''GNULIB_STRTOULL''@/$(GNULIB_STRTOULL)/g' \
- -e 's/@''GNULIB_SYSTEM_POSIX''@/$(GNULIB_SYSTEM_POSIX)/g' \
- -e 's/@''GNULIB_UNLOCKPT''@/$(GNULIB_UNLOCKPT)/g' \
- -e 's/@''GNULIB_UNSETENV''@/$(GNULIB_UNSETENV)/g' \
- -e 's/@''GNULIB_WCTOMB''@/$(GNULIB_WCTOMB)/g' \
- < $(srcdir)/stdlib.in.h | \
- sed -e 's|@''HAVE__EXIT''@|$(HAVE__EXIT)|g' \
- -e 's|@''HAVE_ATOLL''@|$(HAVE_ATOLL)|g' \
- -e 's|@''HAVE_CANONICALIZE_FILE_NAME''@|$(HAVE_CANONICALIZE_FILE_NAME)|g' \
- -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_MKDTEMP''@|$(HAVE_MKDTEMP)|g' \
- -e 's|@''HAVE_MKOSTEMP''@|$(HAVE_MKOSTEMP)|g' \
- -e 's|@''HAVE_MKOSTEMPS''@|$(HAVE_MKOSTEMPS)|g' \
- -e 's|@''HAVE_MKSTEMP''@|$(HAVE_MKSTEMP)|g' \
- -e 's|@''HAVE_MKSTEMPS''@|$(HAVE_MKSTEMPS)|g' \
- -e 's|@''HAVE_POSIX_OPENPT''@|$(HAVE_POSIX_OPENPT)|g' \
- -e 's|@''HAVE_PTSNAME''@|$(HAVE_PTSNAME)|g' \
- -e 's|@''HAVE_PTSNAME_R''@|$(HAVE_PTSNAME_R)|g' \
- -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_REALPATH''@|$(HAVE_REALPATH)|g' \
- -e 's|@''HAVE_RPMATCH''@|$(HAVE_RPMATCH)|g' \
- -e 's|@''HAVE_DECL_SETENV''@|$(HAVE_DECL_SETENV)|g' \
- -e 's|@''HAVE_STRTOD''@|$(HAVE_STRTOD)|g' \
- -e 's|@''HAVE_STRTOLL''@|$(HAVE_STRTOLL)|g' \
- -e 's|@''HAVE_STRTOULL''@|$(HAVE_STRTOULL)|g' \
- -e 's|@''HAVE_STRUCT_RANDOM_DATA''@|$(HAVE_STRUCT_RANDOM_DATA)|g' \
- -e 's|@''HAVE_SYS_LOADAVG_H''@|$(HAVE_SYS_LOADAVG_H)|g' \
- -e 's|@''HAVE_UNLOCKPT''@|$(HAVE_UNLOCKPT)|g' \
- -e 's|@''HAVE_DECL_UNSETENV''@|$(HAVE_DECL_UNSETENV)|g' \
- -e 's|@''REPLACE_CALLOC''@|$(REPLACE_CALLOC)|g' \
- -e 's|@''REPLACE_CANONICALIZE_FILE_NAME''@|$(REPLACE_CANONICALIZE_FILE_NAME)|g' \
- -e 's|@''REPLACE_MALLOC''@|$(REPLACE_MALLOC)|g' \
- -e 's|@''REPLACE_MBTOWC''@|$(REPLACE_MBTOWC)|g' \
- -e 's|@''REPLACE_MKSTEMP''@|$(REPLACE_MKSTEMP)|g' \
- -e 's|@''REPLACE_PTSNAME''@|$(REPLACE_PTSNAME)|g' \
- -e 's|@''REPLACE_PTSNAME_R''@|$(REPLACE_PTSNAME_R)|g' \
- -e 's|@''REPLACE_PUTENV''@|$(REPLACE_PUTENV)|g' \
- -e 's|@''REPLACE_RANDOM_R''@|$(REPLACE_RANDOM_R)|g' \
- -e 's|@''REPLACE_REALLOC''@|$(REPLACE_REALLOC)|g' \
- -e 's|@''REPLACE_REALPATH''@|$(REPLACE_REALPATH)|g' \
- -e 's|@''REPLACE_SETENV''@|$(REPLACE_SETENV)|g' \
- -e 's|@''REPLACE_STRTOD''@|$(REPLACE_STRTOD)|g' \
- -e 's|@''REPLACE_UNSETENV''@|$(REPLACE_UNSETENV)|g' \
- -e 's|@''REPLACE_WCTOMB''@|$(REPLACE_WCTOMB)|g' \
- -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \
- -e '/definition of _Noreturn/r $(_NORETURN_H)' \
- -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \
- -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)'; \
- } > $@-t && \
- mv $@-t $@
-
-# We need the following in order to create <string.h> when the system
-# doesn't have one that works with the given compiler.
-string.h: string.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_STRING_H''@|$(NEXT_STRING_H)|g' \
- -e 's/@''GNULIB_FFSL''@/$(GNULIB_FFSL)/g' \
- -e 's/@''GNULIB_FFSLL''@/$(GNULIB_FFSLL)/g' \
- -e 's/@''GNULIB_MBSLEN''@/$(GNULIB_MBSLEN)/g' \
- -e 's/@''GNULIB_MBSNLEN''@/$(GNULIB_MBSNLEN)/g' \
- -e 's/@''GNULIB_MBSCHR''@/$(GNULIB_MBSCHR)/g' \
- -e 's/@''GNULIB_MBSRCHR''@/$(GNULIB_MBSRCHR)/g' \
- -e 's/@''GNULIB_MBSSTR''@/$(GNULIB_MBSSTR)/g' \
- -e 's/@''GNULIB_MBSCASECMP''@/$(GNULIB_MBSCASECMP)/g' \
- -e 's/@''GNULIB_MBSNCASECMP''@/$(GNULIB_MBSNCASECMP)/g' \
- -e 's/@''GNULIB_MBSPCASECMP''@/$(GNULIB_MBSPCASECMP)/g' \
- -e 's/@''GNULIB_MBSCASESTR''@/$(GNULIB_MBSCASESTR)/g' \
- -e 's/@''GNULIB_MBSCSPN''@/$(GNULIB_MBSCSPN)/g' \
- -e 's/@''GNULIB_MBSPBRK''@/$(GNULIB_MBSPBRK)/g' \
- -e 's/@''GNULIB_MBSSPN''@/$(GNULIB_MBSSPN)/g' \
- -e 's/@''GNULIB_MBSSEP''@/$(GNULIB_MBSSEP)/g' \
- -e 's/@''GNULIB_MBSTOK_R''@/$(GNULIB_MBSTOK_R)/g' \
- -e 's/@''GNULIB_MEMCHR''@/$(GNULIB_MEMCHR)/g' \
- -e 's/@''GNULIB_MEMMEM''@/$(GNULIB_MEMMEM)/g' \
- -e 's/@''GNULIB_MEMPCPY''@/$(GNULIB_MEMPCPY)/g' \
- -e 's/@''GNULIB_MEMRCHR''@/$(GNULIB_MEMRCHR)/g' \
- -e 's/@''GNULIB_RAWMEMCHR''@/$(GNULIB_RAWMEMCHR)/g' \
- -e 's/@''GNULIB_STPCPY''@/$(GNULIB_STPCPY)/g' \
- -e 's/@''GNULIB_STPNCPY''@/$(GNULIB_STPNCPY)/g' \
- -e 's/@''GNULIB_STRCHRNUL''@/$(GNULIB_STRCHRNUL)/g' \
- -e 's/@''GNULIB_STRDUP''@/$(GNULIB_STRDUP)/g' \
- -e 's/@''GNULIB_STRNCAT''@/$(GNULIB_STRNCAT)/g' \
- -e 's/@''GNULIB_STRNDUP''@/$(GNULIB_STRNDUP)/g' \
- -e 's/@''GNULIB_STRNLEN''@/$(GNULIB_STRNLEN)/g' \
- -e 's/@''GNULIB_STRPBRK''@/$(GNULIB_STRPBRK)/g' \
- -e 's/@''GNULIB_STRSEP''@/$(GNULIB_STRSEP)/g' \
- -e 's/@''GNULIB_STRSTR''@/$(GNULIB_STRSTR)/g' \
- -e 's/@''GNULIB_STRCASESTR''@/$(GNULIB_STRCASESTR)/g' \
- -e 's/@''GNULIB_STRTOK_R''@/$(GNULIB_STRTOK_R)/g' \
- -e 's/@''GNULIB_STRERROR''@/$(GNULIB_STRERROR)/g' \
- -e 's/@''GNULIB_STRERROR_R''@/$(GNULIB_STRERROR_R)/g' \
- -e 's/@''GNULIB_STRSIGNAL''@/$(GNULIB_STRSIGNAL)/g' \
- -e 's/@''GNULIB_STRVERSCMP''@/$(GNULIB_STRVERSCMP)/g' \
- < $(srcdir)/string.in.h | \
- sed -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' \
- -e 's|@''HAVE_DECL_MEMMEM''@|$(HAVE_DECL_MEMMEM)|g' \
- -e 's|@''HAVE_MEMPCPY''@|$(HAVE_MEMPCPY)|g' \
- -e 's|@''HAVE_DECL_MEMRCHR''@|$(HAVE_DECL_MEMRCHR)|g' \
- -e 's|@''HAVE_RAWMEMCHR''@|$(HAVE_RAWMEMCHR)|g' \
- -e 's|@''HAVE_STPCPY''@|$(HAVE_STPCPY)|g' \
- -e 's|@''HAVE_STPNCPY''@|$(HAVE_STPNCPY)|g' \
- -e 's|@''HAVE_STRCHRNUL''@|$(HAVE_STRCHRNUL)|g' \
- -e 's|@''HAVE_DECL_STRDUP''@|$(HAVE_DECL_STRDUP)|g' \
- -e 's|@''HAVE_DECL_STRNDUP''@|$(HAVE_DECL_STRNDUP)|g' \
- -e 's|@''HAVE_DECL_STRNLEN''@|$(HAVE_DECL_STRNLEN)|g' \
- -e 's|@''HAVE_STRPBRK''@|$(HAVE_STRPBRK)|g' \
- -e 's|@''HAVE_STRSEP''@|$(HAVE_STRSEP)|g' \
- -e 's|@''HAVE_STRCASESTR''@|$(HAVE_STRCASESTR)|g' \
- -e 's|@''HAVE_DECL_STRTOK_R''@|$(HAVE_DECL_STRTOK_R)|g' \
- -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_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_STRTOK_R''@|$(REPLACE_STRTOK_R)|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)' \
- -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)'; \
- < $(srcdir)/string.in.h; \
- } > $@-t && \
- mv $@-t $@
-
-# We need the following in order to create <sys/stat.h> when the system
-# has one that is incomplete.
-sys/stat.h: sys_stat.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_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_STAT_H''@|$(NEXT_SYS_STAT_H)|g' \
- -e 's|@''WINDOWS_64_BIT_ST_SIZE''@|$(WINDOWS_64_BIT_ST_SIZE)|g' \
- -e 's/@''GNULIB_FCHMODAT''@/$(GNULIB_FCHMODAT)/g' \
- -e 's/@''GNULIB_FSTAT''@/$(GNULIB_FSTAT)/g' \
- -e 's/@''GNULIB_FSTATAT''@/$(GNULIB_FSTATAT)/g' \
- -e 's/@''GNULIB_FUTIMENS''@/$(GNULIB_FUTIMENS)/g' \
- -e 's/@''GNULIB_LCHMOD''@/$(GNULIB_LCHMOD)/g' \
- -e 's/@''GNULIB_LSTAT''@/$(GNULIB_LSTAT)/g' \
- -e 's/@''GNULIB_MKDIRAT''@/$(GNULIB_MKDIRAT)/g' \
- -e 's/@''GNULIB_MKFIFO''@/$(GNULIB_MKFIFO)/g' \
- -e 's/@''GNULIB_MKFIFOAT''@/$(GNULIB_MKFIFOAT)/g' \
- -e 's/@''GNULIB_MKNOD''@/$(GNULIB_MKNOD)/g' \
- -e 's/@''GNULIB_MKNODAT''@/$(GNULIB_MKNODAT)/g' \
- -e 's/@''GNULIB_STAT''@/$(GNULIB_STAT)/g' \
- -e 's/@''GNULIB_UTIMENSAT''@/$(GNULIB_UTIMENSAT)/g' \
- -e 's|@''HAVE_FCHMODAT''@|$(HAVE_FCHMODAT)|g' \
- -e 's|@''HAVE_FSTATAT''@|$(HAVE_FSTATAT)|g' \
- -e 's|@''HAVE_FUTIMENS''@|$(HAVE_FUTIMENS)|g' \
- -e 's|@''HAVE_LCHMOD''@|$(HAVE_LCHMOD)|g' \
- -e 's|@''HAVE_LSTAT''@|$(HAVE_LSTAT)|g' \
- -e 's|@''HAVE_MKDIRAT''@|$(HAVE_MKDIRAT)|g' \
- -e 's|@''HAVE_MKFIFO''@|$(HAVE_MKFIFO)|g' \
- -e 's|@''HAVE_MKFIFOAT''@|$(HAVE_MKFIFOAT)|g' \
- -e 's|@''HAVE_MKNOD''@|$(HAVE_MKNOD)|g' \
- -e 's|@''HAVE_MKNODAT''@|$(HAVE_MKNODAT)|g' \
- -e 's|@''HAVE_UTIMENSAT''@|$(HAVE_UTIMENSAT)|g' \
- -e 's|@''REPLACE_FSTAT''@|$(REPLACE_FSTAT)|g' \
- -e 's|@''REPLACE_FSTATAT''@|$(REPLACE_FSTATAT)|g' \
- -e 's|@''REPLACE_FUTIMENS''@|$(REPLACE_FUTIMENS)|g' \
- -e 's|@''REPLACE_LSTAT''@|$(REPLACE_LSTAT)|g' \
- -e 's|@''REPLACE_MKDIR''@|$(REPLACE_MKDIR)|g' \
- -e 's|@''REPLACE_MKFIFO''@|$(REPLACE_MKFIFO)|g' \
- -e 's|@''REPLACE_MKNOD''@|$(REPLACE_MKNOD)|g' \
- -e 's|@''REPLACE_STAT''@|$(REPLACE_STAT)|g' \
- -e 's|@''REPLACE_UTIMENSAT''@|$(REPLACE_UTIMENSAT)|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_stat.in.h; \
- } > $@-t && \
- mv $@-t $@
-
-# We need the following in order to create <sys/time.h> when the system
-# doesn't have one that works with the given compiler.
-sys/time.h: sys_time.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_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_TIME_H''@/$(HAVE_SYS_TIME_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_TIME_H''@|$(NEXT_SYS_TIME_H)|g' \
- -e 's/@''GNULIB_GETTIMEOFDAY''@/$(GNULIB_GETTIMEOFDAY)/g' \
- -e 's|@''HAVE_WINSOCK2_H''@|$(HAVE_WINSOCK2_H)|g' \
- -e 's/@''HAVE_GETTIMEOFDAY''@/$(HAVE_GETTIMEOFDAY)/g' \
- -e 's/@''HAVE_STRUCT_TIMEVAL''@/$(HAVE_STRUCT_TIMEVAL)/g' \
- -e 's/@''REPLACE_GETTIMEOFDAY''@/$(REPLACE_GETTIMEOFDAY)/g' \
- -e 's/@''REPLACE_STRUCT_TIMEVAL''@/$(REPLACE_STRUCT_TIMEVAL)/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_time.in.h; \
- } > $@-t && \
- mv $@-t $@
-
-# We need the following in order to create <sys/types.h> when the system
-# doesn't have one that works with the given compiler.
-sys/types.h: sys_types.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_TYPES_H''@|$(NEXT_SYS_TYPES_H)|g' \
- -e 's|@''WINDOWS_64_BIT_OFF_T''@|$(WINDOWS_64_BIT_OFF_T)|g' \
- < $(srcdir)/sys_types.in.h; \
- } > $@-t && \
- mv $@-t $@
-
-# We need the following in order to create <time.h> when the system
-# doesn't have one that works with the given compiler.
-time.h: time.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_TIME_H''@|$(NEXT_TIME_H)|g' \
- -e 's/@''GNULIB_MKTIME''@/$(GNULIB_MKTIME)/g' \
- -e 's/@''GNULIB_NANOSLEEP''@/$(GNULIB_NANOSLEEP)/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|@''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|@''REPLACE_LOCALTIME_R''@|$(REPLACE_LOCALTIME_R)|g' \
- -e 's|@''REPLACE_MKTIME''@|$(REPLACE_MKTIME)|g' \
- -e 's|@''REPLACE_NANOSLEEP''@|$(REPLACE_NANOSLEEP)|g' \
- -e 's|@''REPLACE_TIMEGM''@|$(REPLACE_TIMEGM)|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' \
- -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)/time.in.h; \
- } > $@-t && \
- mv $@-t $@
-
-# We need the following in order to create an empty placeholder for
-# <unistd.h> when the system doesn't have one.
-unistd.h: unistd.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|@''HAVE_UNISTD_H''@|$(HAVE_UNISTD_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_UNISTD_H''@|$(NEXT_UNISTD_H)|g' \
- -e 's|@''WINDOWS_64_BIT_OFF_T''@|$(WINDOWS_64_BIT_OFF_T)|g' \
- -e 's/@''GNULIB_CHDIR''@/$(GNULIB_CHDIR)/g' \
- -e 's/@''GNULIB_CHOWN''@/$(GNULIB_CHOWN)/g' \
- -e 's/@''GNULIB_CLOSE''@/$(GNULIB_CLOSE)/g' \
- -e 's/@''GNULIB_DUP''@/$(GNULIB_DUP)/g' \
- -e 's/@''GNULIB_DUP2''@/$(GNULIB_DUP2)/g' \
- -e 's/@''GNULIB_DUP3''@/$(GNULIB_DUP3)/g' \
- -e 's/@''GNULIB_ENVIRON''@/$(GNULIB_ENVIRON)/g' \
- -e 's/@''GNULIB_EUIDACCESS''@/$(GNULIB_EUIDACCESS)/g' \
- -e 's/@''GNULIB_FACCESSAT''@/$(GNULIB_FACCESSAT)/g' \
- -e 's/@''GNULIB_FCHDIR''@/$(GNULIB_FCHDIR)/g' \
- -e 's/@''GNULIB_FCHOWNAT''@/$(GNULIB_FCHOWNAT)/g' \
- -e 's/@''GNULIB_FDATASYNC''@/$(GNULIB_FDATASYNC)/g' \
- -e 's/@''GNULIB_FSYNC''@/$(GNULIB_FSYNC)/g' \
- -e 's/@''GNULIB_FTRUNCATE''@/$(GNULIB_FTRUNCATE)/g' \
- -e 's/@''GNULIB_GETCWD''@/$(GNULIB_GETCWD)/g' \
- -e 's/@''GNULIB_GETDOMAINNAME''@/$(GNULIB_GETDOMAINNAME)/g' \
- -e 's/@''GNULIB_GETDTABLESIZE''@/$(GNULIB_GETDTABLESIZE)/g' \
- -e 's/@''GNULIB_GETGROUPS''@/$(GNULIB_GETGROUPS)/g' \
- -e 's/@''GNULIB_GETHOSTNAME''@/$(GNULIB_GETHOSTNAME)/g' \
- -e 's/@''GNULIB_GETLOGIN''@/$(GNULIB_GETLOGIN)/g' \
- -e 's/@''GNULIB_GETLOGIN_R''@/$(GNULIB_GETLOGIN_R)/g' \
- -e 's/@''GNULIB_GETPAGESIZE''@/$(GNULIB_GETPAGESIZE)/g' \
- -e 's/@''GNULIB_GETUSERSHELL''@/$(GNULIB_GETUSERSHELL)/g' \
- -e 's/@''GNULIB_GROUP_MEMBER''@/$(GNULIB_GROUP_MEMBER)/g' \
- -e 's/@''GNULIB_ISATTY''@/$(GNULIB_ISATTY)/g' \
- -e 's/@''GNULIB_LCHOWN''@/$(GNULIB_LCHOWN)/g' \
- -e 's/@''GNULIB_LINK''@/$(GNULIB_LINK)/g' \
- -e 's/@''GNULIB_LINKAT''@/$(GNULIB_LINKAT)/g' \
- -e 's/@''GNULIB_LSEEK''@/$(GNULIB_LSEEK)/g' \
- -e 's/@''GNULIB_PIPE''@/$(GNULIB_PIPE)/g' \
- -e 's/@''GNULIB_PIPE2''@/$(GNULIB_PIPE2)/g' \
- -e 's/@''GNULIB_PREAD''@/$(GNULIB_PREAD)/g' \
- -e 's/@''GNULIB_PWRITE''@/$(GNULIB_PWRITE)/g' \
- -e 's/@''GNULIB_READ''@/$(GNULIB_READ)/g' \
- -e 's/@''GNULIB_READLINK''@/$(GNULIB_READLINK)/g' \
- -e 's/@''GNULIB_READLINKAT''@/$(GNULIB_READLINKAT)/g' \
- -e 's/@''GNULIB_RMDIR''@/$(GNULIB_RMDIR)/g' \
- -e 's/@''GNULIB_SETHOSTNAME''@/$(GNULIB_SETHOSTNAME)/g' \
- -e 's/@''GNULIB_SLEEP''@/$(GNULIB_SLEEP)/g' \
- -e 's/@''GNULIB_SYMLINK''@/$(GNULIB_SYMLINK)/g' \
- -e 's/@''GNULIB_SYMLINKAT''@/$(GNULIB_SYMLINKAT)/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' \
- -e 's/@''GNULIB_UNISTD_H_SIGPIPE''@/$(GNULIB_UNISTD_H_SIGPIPE)/g' \
- -e 's/@''GNULIB_UNLINK''@/$(GNULIB_UNLINK)/g' \
- -e 's/@''GNULIB_UNLINKAT''@/$(GNULIB_UNLINKAT)/g' \
- -e 's/@''GNULIB_USLEEP''@/$(GNULIB_USLEEP)/g' \
- -e 's/@''GNULIB_WRITE''@/$(GNULIB_WRITE)/g' \
- < $(srcdir)/unistd.in.h | \
- sed -e 's|@''HAVE_CHOWN''@|$(HAVE_CHOWN)|g' \
- -e 's|@''HAVE_DUP2''@|$(HAVE_DUP2)|g' \
- -e 's|@''HAVE_DUP3''@|$(HAVE_DUP3)|g' \
- -e 's|@''HAVE_EUIDACCESS''@|$(HAVE_EUIDACCESS)|g' \
- -e 's|@''HAVE_FACCESSAT''@|$(HAVE_FACCESSAT)|g' \
- -e 's|@''HAVE_FCHDIR''@|$(HAVE_FCHDIR)|g' \
- -e 's|@''HAVE_FCHOWNAT''@|$(HAVE_FCHOWNAT)|g' \
- -e 's|@''HAVE_FDATASYNC''@|$(HAVE_FDATASYNC)|g' \
- -e 's|@''HAVE_FSYNC''@|$(HAVE_FSYNC)|g' \
- -e 's|@''HAVE_FTRUNCATE''@|$(HAVE_FTRUNCATE)|g' \
- -e 's|@''HAVE_GETDTABLESIZE''@|$(HAVE_GETDTABLESIZE)|g' \
- -e 's|@''HAVE_GETGROUPS''@|$(HAVE_GETGROUPS)|g' \
- -e 's|@''HAVE_GETHOSTNAME''@|$(HAVE_GETHOSTNAME)|g' \
- -e 's|@''HAVE_GETLOGIN''@|$(HAVE_GETLOGIN)|g' \
- -e 's|@''HAVE_GETPAGESIZE''@|$(HAVE_GETPAGESIZE)|g' \
- -e 's|@''HAVE_GROUP_MEMBER''@|$(HAVE_GROUP_MEMBER)|g' \
- -e 's|@''HAVE_LCHOWN''@|$(HAVE_LCHOWN)|g' \
- -e 's|@''HAVE_LINK''@|$(HAVE_LINK)|g' \
- -e 's|@''HAVE_LINKAT''@|$(HAVE_LINKAT)|g' \
- -e 's|@''HAVE_PIPE''@|$(HAVE_PIPE)|g' \
- -e 's|@''HAVE_PIPE2''@|$(HAVE_PIPE2)|g' \
- -e 's|@''HAVE_PREAD''@|$(HAVE_PREAD)|g' \
- -e 's|@''HAVE_PWRITE''@|$(HAVE_PWRITE)|g' \
- -e 's|@''HAVE_READLINK''@|$(HAVE_READLINK)|g' \
- -e 's|@''HAVE_READLINKAT''@|$(HAVE_READLINKAT)|g' \
- -e 's|@''HAVE_SETHOSTNAME''@|$(HAVE_SETHOSTNAME)|g' \
- -e 's|@''HAVE_SLEEP''@|$(HAVE_SLEEP)|g' \
- -e 's|@''HAVE_SYMLINK''@|$(HAVE_SYMLINK)|g' \
- -e 's|@''HAVE_SYMLINKAT''@|$(HAVE_SYMLINKAT)|g' \
- -e 's|@''HAVE_UNLINKAT''@|$(HAVE_UNLINKAT)|g' \
- -e 's|@''HAVE_USLEEP''@|$(HAVE_USLEEP)|g' \
- -e 's|@''HAVE_DECL_ENVIRON''@|$(HAVE_DECL_ENVIRON)|g' \
- -e 's|@''HAVE_DECL_FCHDIR''@|$(HAVE_DECL_FCHDIR)|g' \
- -e 's|@''HAVE_DECL_FDATASYNC''@|$(HAVE_DECL_FDATASYNC)|g' \
- -e 's|@''HAVE_DECL_GETDOMAINNAME''@|$(HAVE_DECL_GETDOMAINNAME)|g' \
- -e 's|@''HAVE_DECL_GETLOGIN_R''@|$(HAVE_DECL_GETLOGIN_R)|g' \
- -e 's|@''HAVE_DECL_GETPAGESIZE''@|$(HAVE_DECL_GETPAGESIZE)|g' \
- -e 's|@''HAVE_DECL_GETUSERSHELL''@|$(HAVE_DECL_GETUSERSHELL)|g' \
- -e 's|@''HAVE_DECL_SETHOSTNAME''@|$(HAVE_DECL_SETHOSTNAME)|g' \
- -e 's|@''HAVE_DECL_TTYNAME_R''@|$(HAVE_DECL_TTYNAME_R)|g' \
- -e 's|@''HAVE_OS_H''@|$(HAVE_OS_H)|g' \
- -e 's|@''HAVE_SYS_PARAM_H''@|$(HAVE_SYS_PARAM_H)|g' \
- | \
- sed -e 's|@''REPLACE_CHOWN''@|$(REPLACE_CHOWN)|g' \
- -e 's|@''REPLACE_CLOSE''@|$(REPLACE_CLOSE)|g' \
- -e 's|@''REPLACE_DUP''@|$(REPLACE_DUP)|g' \
- -e 's|@''REPLACE_DUP2''@|$(REPLACE_DUP2)|g' \
- -e 's|@''REPLACE_FCHOWNAT''@|$(REPLACE_FCHOWNAT)|g' \
- -e 's|@''REPLACE_FTRUNCATE''@|$(REPLACE_FTRUNCATE)|g' \
- -e 's|@''REPLACE_GETCWD''@|$(REPLACE_GETCWD)|g' \
- -e 's|@''REPLACE_GETDOMAINNAME''@|$(REPLACE_GETDOMAINNAME)|g' \
- -e 's|@''REPLACE_GETLOGIN_R''@|$(REPLACE_GETLOGIN_R)|g' \
- -e 's|@''REPLACE_GETGROUPS''@|$(REPLACE_GETGROUPS)|g' \
- -e 's|@''REPLACE_GETPAGESIZE''@|$(REPLACE_GETPAGESIZE)|g' \
- -e 's|@''REPLACE_ISATTY''@|$(REPLACE_ISATTY)|g' \
- -e 's|@''REPLACE_LCHOWN''@|$(REPLACE_LCHOWN)|g' \
- -e 's|@''REPLACE_LINK''@|$(REPLACE_LINK)|g' \
- -e 's|@''REPLACE_LINKAT''@|$(REPLACE_LINKAT)|g' \
- -e 's|@''REPLACE_LSEEK''@|$(REPLACE_LSEEK)|g' \
- -e 's|@''REPLACE_PREAD''@|$(REPLACE_PREAD)|g' \
- -e 's|@''REPLACE_PWRITE''@|$(REPLACE_PWRITE)|g' \
- -e 's|@''REPLACE_READ''@|$(REPLACE_READ)|g' \
- -e 's|@''REPLACE_READLINK''@|$(REPLACE_READLINK)|g' \
- -e 's|@''REPLACE_RMDIR''@|$(REPLACE_RMDIR)|g' \
- -e 's|@''REPLACE_SLEEP''@|$(REPLACE_SLEEP)|g' \
- -e 's|@''REPLACE_SYMLINK''@|$(REPLACE_SYMLINK)|g' \
- -e 's|@''REPLACE_TTYNAME_R''@|$(REPLACE_TTYNAME_R)|g' \
- -e 's|@''REPLACE_UNLINK''@|$(REPLACE_UNLINK)|g' \
- -e 's|@''REPLACE_UNLINKAT''@|$(REPLACE_UNLINKAT)|g' \
- -e 's|@''REPLACE_USLEEP''@|$(REPLACE_USLEEP)|g' \
- -e 's|@''REPLACE_WRITE''@|$(REPLACE_WRITE)|g' \
- -e 's|@''UNISTD_H_HAVE_WINSOCK2_H''@|$(UNISTD_H_HAVE_WINSOCK2_H)|g' \
- -e 's|@''UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS''@|$(UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS)|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)'; \
- } > $@-t && \
- mv $@-t $@
-
-# We need the following in order to create <wchar.h> when the system
-# version does not work standalone.
-wchar.h: wchar.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|@''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/@''GNULIB_BTOWC''@/$(GNULIB_BTOWC)/g' \
- -e 's/@''GNULIB_WCTOB''@/$(GNULIB_WCTOB)/g' \
- -e 's/@''GNULIB_MBSINIT''@/$(GNULIB_MBSINIT)/g' \
- -e 's/@''GNULIB_MBRTOWC''@/$(GNULIB_MBRTOWC)/g' \
- -e 's/@''GNULIB_MBRLEN''@/$(GNULIB_MBRLEN)/g' \
- -e 's/@''GNULIB_MBSRTOWCS''@/$(GNULIB_MBSRTOWCS)/g' \
- -e 's/@''GNULIB_MBSNRTOWCS''@/$(GNULIB_MBSNRTOWCS)/g' \
- -e 's/@''GNULIB_WCRTOMB''@/$(GNULIB_WCRTOMB)/g' \
- -e 's/@''GNULIB_WCSRTOMBS''@/$(GNULIB_WCSRTOMBS)/g' \
- -e 's/@''GNULIB_WCSNRTOMBS''@/$(GNULIB_WCSNRTOMBS)/g' \
- -e 's/@''GNULIB_WCWIDTH''@/$(GNULIB_WCWIDTH)/g' \
- -e 's/@''GNULIB_WMEMCHR''@/$(GNULIB_WMEMCHR)/g' \
- -e 's/@''GNULIB_WMEMCMP''@/$(GNULIB_WMEMCMP)/g' \
- -e 's/@''GNULIB_WMEMCPY''@/$(GNULIB_WMEMCPY)/g' \
- -e 's/@''GNULIB_WMEMMOVE''@/$(GNULIB_WMEMMOVE)/g' \
- -e 's/@''GNULIB_WMEMSET''@/$(GNULIB_WMEMSET)/g' \
- -e 's/@''GNULIB_WCSLEN''@/$(GNULIB_WCSLEN)/g' \
- -e 's/@''GNULIB_WCSNLEN''@/$(GNULIB_WCSNLEN)/g' \
- -e 's/@''GNULIB_WCSCPY''@/$(GNULIB_WCSCPY)/g' \
- -e 's/@''GNULIB_WCPCPY''@/$(GNULIB_WCPCPY)/g' \
- -e 's/@''GNULIB_WCSNCPY''@/$(GNULIB_WCSNCPY)/g' \
- -e 's/@''GNULIB_WCPNCPY''@/$(GNULIB_WCPNCPY)/g' \
- -e 's/@''GNULIB_WCSCAT''@/$(GNULIB_WCSCAT)/g' \
- -e 's/@''GNULIB_WCSNCAT''@/$(GNULIB_WCSNCAT)/g' \
- -e 's/@''GNULIB_WCSCMP''@/$(GNULIB_WCSCMP)/g' \
- -e 's/@''GNULIB_WCSNCMP''@/$(GNULIB_WCSNCMP)/g' \
- -e 's/@''GNULIB_WCSCASECMP''@/$(GNULIB_WCSCASECMP)/g' \
- -e 's/@''GNULIB_WCSNCASECMP''@/$(GNULIB_WCSNCASECMP)/g' \
- -e 's/@''GNULIB_WCSCOLL''@/$(GNULIB_WCSCOLL)/g' \
- -e 's/@''GNULIB_WCSXFRM''@/$(GNULIB_WCSXFRM)/g' \
- -e 's/@''GNULIB_WCSDUP''@/$(GNULIB_WCSDUP)/g' \
- -e 's/@''GNULIB_WCSCHR''@/$(GNULIB_WCSCHR)/g' \
- -e 's/@''GNULIB_WCSRCHR''@/$(GNULIB_WCSRCHR)/g' \
- -e 's/@''GNULIB_WCSCSPN''@/$(GNULIB_WCSCSPN)/g' \
- -e 's/@''GNULIB_WCSSPN''@/$(GNULIB_WCSSPN)/g' \
- -e 's/@''GNULIB_WCSPBRK''@/$(GNULIB_WCSPBRK)/g' \
- -e 's/@''GNULIB_WCSSTR''@/$(GNULIB_WCSSTR)/g' \
- -e 's/@''GNULIB_WCSTOK''@/$(GNULIB_WCSTOK)/g' \
- -e 's/@''GNULIB_WCSWIDTH''@/$(GNULIB_WCSWIDTH)/g' \
- < $(srcdir)/wchar.in.h | \
- sed -e 's|@''HAVE_WINT_T''@|$(HAVE_WINT_T)|g' \
- -e 's|@''HAVE_BTOWC''@|$(HAVE_BTOWC)|g' \
- -e 's|@''HAVE_MBSINIT''@|$(HAVE_MBSINIT)|g' \
- -e 's|@''HAVE_MBRTOWC''@|$(HAVE_MBRTOWC)|g' \
- -e 's|@''HAVE_MBRLEN''@|$(HAVE_MBRLEN)|g' \
- -e 's|@''HAVE_MBSRTOWCS''@|$(HAVE_MBSRTOWCS)|g' \
- -e 's|@''HAVE_MBSNRTOWCS''@|$(HAVE_MBSNRTOWCS)|g' \
- -e 's|@''HAVE_WCRTOMB''@|$(HAVE_WCRTOMB)|g' \
- -e 's|@''HAVE_WCSRTOMBS''@|$(HAVE_WCSRTOMBS)|g' \
- -e 's|@''HAVE_WCSNRTOMBS''@|$(HAVE_WCSNRTOMBS)|g' \
- -e 's|@''HAVE_WMEMCHR''@|$(HAVE_WMEMCHR)|g' \
- -e 's|@''HAVE_WMEMCMP''@|$(HAVE_WMEMCMP)|g' \
- -e 's|@''HAVE_WMEMCPY''@|$(HAVE_WMEMCPY)|g' \
- -e 's|@''HAVE_WMEMMOVE''@|$(HAVE_WMEMMOVE)|g' \
- -e 's|@''HAVE_WMEMSET''@|$(HAVE_WMEMSET)|g' \
- -e 's|@''HAVE_WCSLEN''@|$(HAVE_WCSLEN)|g' \
- -e 's|@''HAVE_WCSNLEN''@|$(HAVE_WCSNLEN)|g' \
- -e 's|@''HAVE_WCSCPY''@|$(HAVE_WCSCPY)|g' \
- -e 's|@''HAVE_WCPCPY''@|$(HAVE_WCPCPY)|g' \
- -e 's|@''HAVE_WCSNCPY''@|$(HAVE_WCSNCPY)|g' \
- -e 's|@''HAVE_WCPNCPY''@|$(HAVE_WCPNCPY)|g' \
- -e 's|@''HAVE_WCSCAT''@|$(HAVE_WCSCAT)|g' \
- -e 's|@''HAVE_WCSNCAT''@|$(HAVE_WCSNCAT)|g' \
- -e 's|@''HAVE_WCSCMP''@|$(HAVE_WCSCMP)|g' \
- -e 's|@''HAVE_WCSNCMP''@|$(HAVE_WCSNCMP)|g' \
- -e 's|@''HAVE_WCSCASECMP''@|$(HAVE_WCSCASECMP)|g' \
- -e 's|@''HAVE_WCSNCASECMP''@|$(HAVE_WCSNCASECMP)|g' \
- -e 's|@''HAVE_WCSCOLL''@|$(HAVE_WCSCOLL)|g' \
- -e 's|@''HAVE_WCSXFRM''@|$(HAVE_WCSXFRM)|g' \
- -e 's|@''HAVE_WCSDUP''@|$(HAVE_WCSDUP)|g' \
- -e 's|@''HAVE_WCSCHR''@|$(HAVE_WCSCHR)|g' \
- -e 's|@''HAVE_WCSRCHR''@|$(HAVE_WCSRCHR)|g' \
- -e 's|@''HAVE_WCSCSPN''@|$(HAVE_WCSCSPN)|g' \
- -e 's|@''HAVE_WCSSPN''@|$(HAVE_WCSSPN)|g' \
- -e 's|@''HAVE_WCSPBRK''@|$(HAVE_WCSPBRK)|g' \
- -e 's|@''HAVE_WCSSTR''@|$(HAVE_WCSSTR)|g' \
- -e 's|@''HAVE_WCSTOK''@|$(HAVE_WCSTOK)|g' \
- -e 's|@''HAVE_WCSWIDTH''@|$(HAVE_WCSWIDTH)|g' \
- -e 's|@''HAVE_DECL_WCTOB''@|$(HAVE_DECL_WCTOB)|g' \
- -e 's|@''HAVE_DECL_WCWIDTH''@|$(HAVE_DECL_WCWIDTH)|g' \
- | \
- sed -e 's|@''REPLACE_MBSTATE_T''@|$(REPLACE_MBSTATE_T)|g' \
- -e 's|@''REPLACE_BTOWC''@|$(REPLACE_BTOWC)|g' \
- -e 's|@''REPLACE_WCTOB''@|$(REPLACE_WCTOB)|g' \
- -e 's|@''REPLACE_MBSINIT''@|$(REPLACE_MBSINIT)|g' \
- -e 's|@''REPLACE_MBRTOWC''@|$(REPLACE_MBRTOWC)|g' \
- -e 's|@''REPLACE_MBRLEN''@|$(REPLACE_MBRLEN)|g' \
- -e 's|@''REPLACE_MBSRTOWCS''@|$(REPLACE_MBSRTOWCS)|g' \
- -e 's|@''REPLACE_MBSNRTOWCS''@|$(REPLACE_MBSNRTOWCS)|g' \
- -e 's|@''REPLACE_WCRTOMB''@|$(REPLACE_WCRTOMB)|g' \
- -e 's|@''REPLACE_WCSRTOMBS''@|$(REPLACE_WCSRTOMBS)|g' \
- -e 's|@''REPLACE_WCSNRTOMBS''@|$(REPLACE_WCSNRTOMBS)|g' \
- -e 's|@''REPLACE_WCWIDTH''@|$(REPLACE_WCWIDTH)|g' \
- -e 's|@''REPLACE_WCSWIDTH''@|$(REPLACE_WCSWIDTH)|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)'; \
- } > $@-t && \
- mv $@-t $@
-
-# We need the following in order to create <wctype.h> when the system
-# doesn't have one that works with the given compiler.
-wctype.h: wctype.in.h $(top_builddir)/config.status $(CXXDEFS_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/@''HAVE_WCTYPE_H''@/$(HAVE_WCTYPE_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_WCTYPE_H''@|$(NEXT_WCTYPE_H)|g' \
- -e 's/@''GNULIB_ISWBLANK''@/$(GNULIB_ISWBLANK)/g' \
- -e 's/@''GNULIB_WCTYPE''@/$(GNULIB_WCTYPE)/g' \
- -e 's/@''GNULIB_ISWCTYPE''@/$(GNULIB_ISWCTYPE)/g' \
- -e 's/@''GNULIB_WCTRANS''@/$(GNULIB_WCTRANS)/g' \
- -e 's/@''GNULIB_TOWCTRANS''@/$(GNULIB_TOWCTRANS)/g' \
- -e 's/@''HAVE_ISWBLANK''@/$(HAVE_ISWBLANK)/g' \
- -e 's/@''HAVE_ISWCNTRL''@/$(HAVE_ISWCNTRL)/g' \
- -e 's/@''HAVE_WCTYPE_T''@/$(HAVE_WCTYPE_T)/g' \
- -e 's/@''HAVE_WCTRANS_T''@/$(HAVE_WCTRANS_T)/g' \
- -e 's/@''HAVE_WINT_T''@/$(HAVE_WINT_T)/g' \
- -e 's/@''REPLACE_ISWBLANK''@/$(REPLACE_ISWBLANK)/g' \
- -e 's/@''REPLACE_ISWCNTRL''@/$(REPLACE_ISWCNTRL)/g' \
- -e 's/@''REPLACE_TOWLOWER''@/$(REPLACE_TOWLOWER)/g' \
- -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \
- -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \
- < $(srcdir)/wctype.in.h; \
- } > $@-t && \
- mv $@-t $@
-
-mostlyclean-local: mostlyclean-generic
- @for dir in '' $(MOSTLYCLEANDIRS); do \
- if test -n "$$dir" && test -d $$dir; then \
- echo "rmdir $$dir"; rmdir $$dir; \
- fi; \
- done; \
- :
-
-# 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/lib/acl-errno-valid.c b/lib/acl-errno-valid.c
new file mode 100644
index 0000000..086f75f
--- /dev/null
+++ b/lib/acl-errno-valid.c
@@ -0,0 +1,52 @@
+/* Test whether ACLs are well supported on this system.
+
+ Copyright 2013-2016 Free Software Foundation, Inc.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+ Written by Paul Eggert. */
+
+#include <config.h>
+
+#include <acl.h>
+
+#include <errno.h>
+
+/* Return true if errno value ERRNUM indicates that ACLs are well
+ supported on this system. ERRNUM should be an errno value obtained
+ after an ACL-related system call fails. */
+bool
+acl_errno_valid (int errnum)
+{
+ /* Recognize some common errors such as from an NFS mount that does
+ not support ACLs, even when local drives do. */
+ switch (errnum)
+ {
+ case EBUSY: return false;
+ case EINVAL: return false;
+#if defined __APPLE__ && defined __MACH__
+ case ENOENT: return false;
+#endif
+ case ENOSYS: return false;
+
+#if defined ENOTSUP && ENOTSUP != EOPNOTSUPP
+# if ENOTSUP != ENOSYS /* Needed for the MS-Windows port of GNU Emacs. */
+ case ENOTSUP: return false;
+# endif
+#endif
+
+ case EOPNOTSUPP: return false;
+ default: return true;
+ }
+}
diff --git a/lib/file-has-acl.c b/lib/acl-internal.c
index 16380e3..4de60c3 100644
--- a/lib/file-has-acl.c
+++ b/lib/acl-internal.c
@@ -1,6 +1,6 @@
-/* Test whether a file has a nontrivial access control list.
+/* Test whether a file has a nontrivial ACL. -*- coding: utf-8 -*-
- Copyright (C) 2002-2003, 2005-2012 Free Software Foundation, Inc.
+ Copyright (C) 2002-2003, 2005-2016 Free Software Foundation, Inc.
This 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,19 +17,12 @@
Written by Paul Eggert, Andreas Grünbacher, and Bruno Haible. */
-/* Without this pragma, gcc 4.7.0 20120126 may suggest that the
- file_has_acl function might be candidate for attribute 'const' */
-#if (__GNUC__ == 4 && 6 <= __GNUC_MINOR__) || 4 < __GNUC__
-# pragma GCC diagnostic ignored "-Wsuggest-attribute=const"
-#endif
-
#include <config.h>
#include "acl.h"
#include "acl-internal.h"
-
#if USE_ACL && HAVE_ACL_GET_FILE
# if HAVE_ACL_TYPE_EXTENDED /* Mac OS X */
@@ -75,8 +68,7 @@ acl_access_nontrivial (acl_t acl)
}
return got_one;
-# else /* IRIX, Tru64 */
-# if HAVE_ACL_TO_SHORT_TEXT /* IRIX */
+# elif HAVE_ACL_TO_SHORT_TEXT /* IRIX */
/* Don't use acl_get_entry: it is undocumented. */
int count = acl->acl_cnt;
@@ -93,8 +85,7 @@ acl_access_nontrivial (acl_t acl)
}
return 0;
-# endif
-# if HAVE_ACL_FREE_TEXT /* Tru64 */
+# elif HAVE_ACL_FREE_TEXT /* Tru64 */
/* Don't use acl_get_entry: it takes only one argument and does not work. */
int count = acl->acl_num;
@@ -117,12 +108,21 @@ acl_access_nontrivial (acl_t acl)
}
return 0;
-# endif
+# else
+
+ errno = ENOSYS;
+ return -1;
# endif
}
-# endif
+int
+acl_default_nontrivial (acl_t acl)
+{
+ /* acl is non-trivial if it is non-empty. */
+ return (acl_entries (acl) > 0);
+}
+# endif
#elif USE_ACL && HAVE_FACL && defined GETACL /* Solaris, Cygwin, not HP-UX */
@@ -343,18 +343,19 @@ acl_ace_nontrivial (int count, ace_t *entries)
/* Return 1 if the given ACL is non-trivial.
Return 0 if it is trivial, i.e. equivalent to a simple stat() mode. */
int
-acl_nontrivial (int count, struct acl_entry *entries, struct stat *sb)
+acl_nontrivial (int count, struct acl_entry *entries)
{
int i;
+ if (count > 3)
+ return 1;
+
for (i = 0; i < count; i++)
{
struct acl_entry *ace = &entries[i];
- if (!((ace->uid == sb->st_uid && ace->gid == ACL_NSGROUP)
- || (ace->uid == ACL_NSUSER && ace->gid == sb->st_gid)
- || (ace->uid == ACL_NSUSER && ace->gid == ACL_NSGROUP)))
- return 1;
+ if (ace->uid != ACL_NSUSER && ace->gid != ACL_NSGROUP)
+ return 1;
}
return 0;
}
@@ -474,445 +475,33 @@ acl_nontrivial (int count, struct acl *entries)
#endif
-
-/* Return 1 if NAME has a nontrivial access control list, 0 if NAME
- only has no or a base access control list, and -1 (setting errno)
- on error. SB must be set to the stat buffer of NAME, obtained
- through stat() or lstat(). */
-
-int
-file_has_acl (char const *name, struct stat const *sb)
+void
+free_permission_context (struct permission_context *ctx)
{
#if USE_ACL
- if (! S_ISLNK (sb->st_mode))
- {
-# if HAVE_ACL_GET_FILE
-
- /* POSIX 1003.1e (draft 17 -- abandoned) specific version. */
- /* Linux, FreeBSD, Mac OS X, IRIX, Tru64 */
- int ret;
-
- if (HAVE_ACL_EXTENDED_FILE) /* Linux */
- {
- /* On Linux, acl_extended_file is an optimized function: It only
- makes two calls to getxattr(), one for ACL_TYPE_ACCESS, one for
- ACL_TYPE_DEFAULT. */
- ret = acl_extended_file (name);
- }
- else /* FreeBSD, Mac OS X, IRIX, Tru64 */
- {
-# if HAVE_ACL_TYPE_EXTENDED /* Mac OS X */
- /* On Mac OS X, acl_get_file (name, ACL_TYPE_ACCESS)
- and acl_get_file (name, ACL_TYPE_DEFAULT)
- always return NULL / EINVAL. There is no point in making
- these two useless calls. The real ACL is retrieved through
- acl_get_file (name, ACL_TYPE_EXTENDED). */
- acl_t acl = acl_get_file (name, ACL_TYPE_EXTENDED);
- if (acl)
- {
- ret = acl_extended_nontrivial (acl);
- acl_free (acl);
- }
- else
- ret = -1;
-# else /* FreeBSD, IRIX, Tru64 */
- acl_t acl = acl_get_file (name, ACL_TYPE_ACCESS);
- if (acl)
- {
- int saved_errno;
-
- ret = acl_access_nontrivial (acl);
- saved_errno = errno;
- acl_free (acl);
- errno = saved_errno;
-# if HAVE_ACL_FREE_TEXT /* Tru64 */
- /* On OSF/1, acl_get_file (name, ACL_TYPE_DEFAULT) always
- returns NULL with errno not set. There is no point in
- making this call. */
-# else /* FreeBSD, IRIX */
- /* On Linux, FreeBSD, IRIX, acl_get_file (name, ACL_TYPE_ACCESS)
- and acl_get_file (name, ACL_TYPE_DEFAULT) on a directory
- either both succeed or both fail; it depends on the
- file system. Therefore there is no point in making the second
- call if the first one already failed. */
- if (ret == 0 && S_ISDIR (sb->st_mode))
- {
- acl = acl_get_file (name, ACL_TYPE_DEFAULT);
- if (acl)
- {
- ret = (0 < acl_entries (acl));
- acl_free (acl);
- }
- else
- ret = -1;
- }
-# endif
- }
- else
- ret = -1;
+# if HAVE_ACL_GET_FILE /* Linux, FreeBSD, Mac OS X, IRIX, Tru64 */
+ if (ctx->acl)
+ acl_free (ctx->acl);
+# if !HAVE_ACL_TYPE_EXTENDED
+ if (ctx->default_acl)
+ acl_free (ctx->default_acl);
# endif
- }
- if (ret < 0)
- return ACL_NOT_WELL_SUPPORTED (errno) ? 0 : -1;
- return ret;
-
-# elif HAVE_FACL && defined GETACL /* Solaris, Cygwin, not HP-UX */
-
-# if defined ACL_NO_TRIVIAL
-
- /* Solaris 10 (newer version), which has additional API declared in
- <sys/acl.h> (acl_t) and implemented in libsec (acl_set, acl_trivial,
- acl_fromtext, ...). */
- return acl_trivial (name);
-
-# else /* Solaris, Cygwin, general case */
-
- /* Solaris 2.5 through Solaris 10, Cygwin, and contemporaneous versions
- of Unixware. The acl() call returns the access and default ACL both
- at once. */
- {
- /* Initially, try to read the entries into a stack-allocated buffer.
- Use malloc if it does not fit. */
- enum
- {
- alloc_init = 4000 / sizeof (aclent_t), /* >= 3 */
- alloc_max = MIN (INT_MAX, SIZE_MAX / sizeof (aclent_t))
- };
- aclent_t buf[alloc_init];
- size_t alloc = alloc_init;
- aclent_t *entries = buf;
- aclent_t *malloced = NULL;
- int count;
-
- for (;;)
- {
- count = acl (name, GETACL, alloc, entries);
- if (count < 0 && errno == ENOSPC)
- {
- /* Increase the size of the buffer. */
- free (malloced);
- if (alloc > alloc_max / 2)
- {
- errno = ENOMEM;
- return -1;
- }
- alloc = 2 * alloc; /* <= alloc_max */
- entries = malloced =
- (aclent_t *) malloc (alloc * sizeof (aclent_t));
- if (entries == NULL)
- {
- errno = ENOMEM;
- return -1;
- }
- continue;
- }
- break;
- }
- if (count < 0)
- {
- if (errno == ENOSYS || errno == ENOTSUP)
- ;
- else
- {
- int saved_errno = errno;
- free (malloced);
- errno = saved_errno;
- return -1;
- }
- }
- else if (count == 0)
- ;
- else
- {
- /* Don't use MIN_ACL_ENTRIES: It's set to 4 on Cygwin, but Cygwin
- returns only 3 entries for files with no ACL. But this is safe:
- If there are more than 4 entries, there cannot be only the
- "user::", "group::", "other:", and "mask:" entries. */
- if (count > 4)
- {
- free (malloced);
- return 1;
- }
-
- if (acl_nontrivial (count, entries))
- {
- free (malloced);
- return 1;
- }
- }
- free (malloced);
- }
-# ifdef ACE_GETACL
- /* Solaris also has a different variant of ACLs, used in ZFS and NFSv4
- file systems (whereas the other ones are used in UFS file systems). */
- {
- /* Initially, try to read the entries into a stack-allocated buffer.
- Use malloc if it does not fit. */
- enum
- {
- alloc_init = 4000 / sizeof (ace_t), /* >= 3 */
- alloc_max = MIN (INT_MAX, SIZE_MAX / sizeof (ace_t))
- };
- ace_t buf[alloc_init];
- size_t alloc = alloc_init;
- ace_t *entries = buf;
- ace_t *malloced = NULL;
- int count;
-
- for (;;)
- {
- count = acl (name, ACE_GETACL, alloc, entries);
- if (count < 0 && errno == ENOSPC)
- {
- /* Increase the size of the buffer. */
- free (malloced);
- if (alloc > alloc_max / 2)
- {
- errno = ENOMEM;
- return -1;
- }
- alloc = 2 * alloc; /* <= alloc_max */
- entries = malloced = (ace_t *) malloc (alloc * sizeof (ace_t));
- if (entries == NULL)
- {
- errno = ENOMEM;
- return -1;
- }
- continue;
- }
- break;
- }
- if (count < 0)
- {
- if (errno == ENOSYS || errno == EINVAL)
- ;
- else
- {
- int saved_errno = errno;
- free (malloced);
- errno = saved_errno;
- return -1;
- }
- }
- else if (count == 0)
- ;
- else
- {
- /* In the old (original Solaris 10) convention:
- If there are more than 3 entries, there cannot be only the
- ACE_OWNER, ACE_GROUP, ACE_OTHER entries.
- In the newer Solaris 10 and Solaris 11 convention:
- If there are more than 6 entries, there cannot be only the
- ACE_OWNER, ACE_GROUP, ACE_EVERYONE entries, each once with
- NEW_ACE_ACCESS_ALLOWED_ACE_TYPE and once with
- NEW_ACE_ACCESS_DENIED_ACE_TYPE. */
- if (count > 6)
- {
- free (malloced);
- return 1;
- }
-
- if (acl_ace_nontrivial (count, entries))
- {
- free (malloced);
- return 1;
- }
- }
- free (malloced);
- }
-# endif
-
- return 0;
+# elif defined GETACL /* Solaris, Cygwin */
+ free (ctx->entries);
+# ifdef ACE_GETACL
+ free (ctx->ace_entries);
# endif
# elif HAVE_GETACL /* HP-UX */
- {
- struct acl_entry entries[NACLENTRIES];
- int count;
-
- count = getacl (name, NACLENTRIES, entries);
-
- if (count < 0)
- {
- /* ENOSYS is seen on newer HP-UX versions.
- EOPNOTSUPP is typically seen on NFS mounts.
- ENOTSUP was seen on Quantum StorNext file systems (cvfs). */
- if (errno == ENOSYS || errno == EOPNOTSUPP || errno == ENOTSUP)
- ;
- else
- return -1;
- }
- else if (count == 0)
- return 0;
- else /* count > 0 */
- {
- if (count > NACLENTRIES)
- /* If NACLENTRIES cannot be trusted, use dynamic memory
- allocation. */
- abort ();
-
- /* If there are more than 3 entries, there cannot be only the
- (uid,%), (%,gid), (%,%) entries. */
- if (count > 3)
- return 1;
-
- {
- struct stat statbuf;
-
- if (stat (name, &statbuf) < 0)
- return -1;
-
- return acl_nontrivial (count, entries, &statbuf);
- }
- }
- }
-
-# if HAVE_ACLV_H /* HP-UX >= 11.11 */
-
- {
- struct acl entries[NACLVENTRIES];
- int count;
-
- count = acl ((char *) name, ACL_GET, NACLVENTRIES, entries);
-
- if (count < 0)
- {
- /* EOPNOTSUPP is seen on NFS in HP-UX 11.11, 11.23.
- EINVAL is seen on NFS in HP-UX 11.31. */
- if (errno == ENOSYS || errno == EOPNOTSUPP || errno == EINVAL)
- ;
- else
- return -1;
- }
- else if (count == 0)
- return 0;
- else /* count > 0 */
- {
- if (count > NACLVENTRIES)
- /* If NACLVENTRIES cannot be trusted, use dynamic memory
- allocation. */
- abort ();
-
- /* If there are more than 4 entries, there cannot be only the
- four base ACL entries. */
- if (count > 4)
- return 1;
-
- return aclv_nontrivial (count, entries);
- }
- }
-
+# if HAVE_ACLV_H
# endif
-# elif HAVE_ACLX_GET && defined ACL_AIX_WIP /* AIX */
-
- acl_type_t type;
- char aclbuf[1024];
- void *acl = aclbuf;
- size_t aclsize = sizeof (aclbuf);
- mode_t mode;
-
- for (;;)
- {
- /* The docs say that type being 0 is equivalent to ACL_ANY, but it
- is not true, in AIX 5.3. */
- type.u64 = ACL_ANY;
- if (aclx_get (name, 0, &type, aclbuf, &aclsize, &mode) >= 0)
- break;
- if (errno == ENOSYS)
- return 0;
- if (errno != ENOSPC)
- {
- if (acl != aclbuf)
- {
- int saved_errno = errno;
- free (acl);
- errno = saved_errno;
- }
- return -1;
- }
- aclsize = 2 * aclsize;
- if (acl != aclbuf)
- free (acl);
- acl = malloc (aclsize);
- if (acl == NULL)
- {
- errno = ENOMEM;
- return -1;
- }
- }
-
- if (type.u64 == ACL_AIXC)
- {
- int result = acl_nontrivial ((struct acl *) acl);
- if (acl != aclbuf)
- free (acl);
- return result;
- }
- else if (type.u64 == ACL_NFS4)
- {
- int result = acl_nfs4_nontrivial ((nfs4_acl_int_t *) acl);
- if (acl != aclbuf)
- free (acl);
- return result;
- }
- else
- {
- /* A newer type of ACL has been introduced in the system.
- We should better support it. */
- if (acl != aclbuf)
- free (acl);
- errno = EINVAL;
- return -1;
- }
-
# elif HAVE_STATACL /* older AIX */
- union { struct acl a; char room[4096]; } u;
-
- if (statacl (name, STX_NORMAL, &u.a, sizeof (u)) < 0)
- return -1;
-
- return acl_nontrivial (&u.a);
-
# elif HAVE_ACLSORT /* NonStop Kernel */
- {
- struct acl entries[NACLENTRIES];
- int count;
-
- count = acl ((char *) name, ACL_GET, NACLENTRIES, entries);
-
- if (count < 0)
- {
- if (errno == ENOSYS || errno == ENOTSUP)
- ;
- else
- return -1;
- }
- else if (count == 0)
- return 0;
- else /* count > 0 */
- {
- if (count > NACLENTRIES)
- /* If NACLENTRIES cannot be trusted, use dynamic memory
- allocation. */
- abort ();
-
- /* If there are more than 4 entries, there cannot be only the
- four base ACL entries. */
- if (count > 4)
- return 1;
-
- return acl_nontrivial (count, entries);
- }
- }
-
# endif
- }
#endif
-
- return 0;
}
diff --git a/lib/acl-internal.h b/lib/acl-internal.h
index a6974d9..636273e 100644
--- a/lib/acl-internal.h
+++ b/lib/acl-internal.h
@@ -1,6 +1,6 @@
-/* Internal implementation of access control lists.
+/* Internal implementation of access control lists. -*- coding: utf-8 -*-
- Copyright (C) 2002-2003, 2005-2012 Free Software Foundation, Inc.
+ Copyright (C) 2002-2003, 2005-2016 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -44,16 +44,7 @@ extern int acl (char *, int, int, struct acl *);
extern int aclsort (int, int, struct acl *);
#endif
-#include "error.h"
-#include "quote.h"
-
#include <errno.h>
-#ifndef ENOSYS
-# define ENOSYS (-1)
-#endif
-#ifndef ENOTSUP
-# define ENOTSUP (-1)
-#endif
#include <limits.h>
#ifndef MIN
@@ -69,19 +60,9 @@ extern int aclsort (int, int, struct acl *);
# define fchmod(fd, mode) (-1)
#endif
-/* Recognize some common errors such as from an NFS mount that does
- not support ACLs, even when local drives do. */
-#if defined __APPLE__ && defined __MACH__ /* Mac OS X */
-# define ACL_NOT_WELL_SUPPORTED(Err) \
- ((Err) == ENOTSUP || (Err) == ENOSYS || (Err) == EINVAL || (Err) == EBUSY || (Err) == ENOENT)
-#elif defined EOPNOTSUPP /* Tru64 NFS */
-# define ACL_NOT_WELL_SUPPORTED(Err) \
- ((Err) == ENOTSUP || (Err) == ENOSYS || (Err) == EINVAL || (Err) == EBUSY || (Err) == EOPNOTSUPP)
-#else
-# define ACL_NOT_WELL_SUPPORTED(Err) \
- ((Err) == ENOTSUP || (Err) == ENOSYS || (Err) == EINVAL || (Err) == EBUSY)
+#ifndef _GL_INLINE_HEADER_BEGIN
+ #error "Please include config.h first."
#endif
-
_GL_INLINE_HEADER_BEGIN
#ifndef ACL_INTERNAL_INLINE
# define ACL_INTERNAL_INLINE _GL_INLINE
@@ -146,18 +127,13 @@ rpl_acl_set_fd (int fd, acl_t acl)
# define acl_extended_file(name) (-1)
# endif
-/* Linux-specific */
-# ifndef HAVE_ACL_FROM_MODE
-# define HAVE_ACL_FROM_MODE false
-# define acl_from_mode(mode) (NULL)
+# if ! defined HAVE_ACL_FROM_MODE && ! defined HAVE_ACL_FROM_TEXT
+# define acl_from_mode (NULL)
# endif
-/* Set to 1 if a file's mode is implicit by the ACL.
- Set to 0 if a file's mode is stored independently from the ACL. */
+/* Set to 0 if a file's mode is stored independently from the ACL. */
# if (HAVE_ACL_COPY_EXT_NATIVE && HAVE_ACL_CREATE_ENTRY_NP) || defined __sgi /* Mac OS X, IRIX */
# define MODE_INSIDE_ACL 0
-# else
-# define MODE_INSIDE_ACL 1
# endif
/* Return the number of entries in ACL.
@@ -179,28 +155,31 @@ extern int acl_extended_nontrivial (acl_t);
Return 0 if it is trivial, i.e. equivalent to a simple stat() mode.
Return -1 and set errno upon failure to determine it. */
extern int acl_access_nontrivial (acl_t);
+
+/* ACL is an ACL, from a file, stored as type ACL_TYPE_DEFAULT.
+ Return 1 if the given ACL is non-trivial.
+ Return 0 if it is trivial, i.e. equivalent to a simple stat() mode.
+ Return -1 and set errno upon failure to determine it. */
+extern int acl_default_nontrivial (acl_t);
# endif
# elif HAVE_FACL && defined GETACL /* Solaris, Cygwin, not HP-UX */
-/* Set to 1 if a file's mode is implicit by the ACL.
- Set to 0 if a file's mode is stored independently from the ACL. */
+/* Set to 0 if a file's mode is stored independently from the ACL. */
# if defined __CYGWIN__ /* Cygwin */
# define MODE_INSIDE_ACL 0
-# else /* Solaris */
-# define MODE_INSIDE_ACL 1
# endif
/* Return 1 if the given ACL is non-trivial.
Return 0 if it is trivial, i.e. equivalent to a simple stat() mode. */
-extern int acl_nontrivial (int count, aclent_t *entries);
+extern int acl_nontrivial (int count, aclent_t *entries) _GL_ATTRIBUTE_PURE;
# ifdef ACE_GETACL /* Solaris 10 */
/* Test an ACL retrieved with ACE_GETACL.
Return 1 if the given ACL, consisting of COUNT entries, is non-trivial.
Return 0 if it is trivial, i.e. equivalent to a simple stat() mode. */
-extern int acl_ace_nontrivial (int count, ace_t *entries);
+extern int acl_ace_nontrivial (int count, ace_t *entries) _GL_ATTRIBUTE_PURE;
/* Definitions for when the built executable is executed on Solaris 10
(newer version) or Solaris 11. */
@@ -239,7 +218,7 @@ extern int acl_ace_nontrivial (int count, ace_t *entries);
/* Return 1 if the given ACL is non-trivial.
Return 0 if it is trivial, i.e. equivalent to a simple stat() mode. */
-extern int acl_nontrivial (int count, struct acl_entry *entries, struct stat *sb);
+extern int acl_nontrivial (int count, struct acl_entry *entries);
# if HAVE_ACLV_H /* HP-UX >= 11.11 */
@@ -267,6 +246,57 @@ extern int acl_nontrivial (int count, struct acl *entries);
# endif
+/* Set to 1 if a file's mode is implicit by the ACL. */
+# ifndef MODE_INSIDE_ACL
+# define MODE_INSIDE_ACL 1
+# endif
+
+#endif
+
+struct permission_context {
+ mode_t mode;
+#if USE_ACL
+# if HAVE_ACL_GET_FILE /* Linux, FreeBSD, Mac OS X, IRIX, Tru64 */
+ acl_t acl;
+# if !HAVE_ACL_TYPE_EXTENDED
+ acl_t default_acl;
+# endif
+ bool acls_not_supported;
+
+# elif defined GETACL /* Solaris, Cygwin */
+ int count;
+ aclent_t *entries;
+# ifdef ACE_GETACL
+ int ace_count;
+ ace_t *ace_entries;
+# endif
+
+# elif HAVE_GETACL /* HP-UX */
+ struct acl_entry entries[NACLENTRIES];
+ int count;
+# if HAVE_ACLV_H
+ struct acl aclv_entries[NACLVENTRIES];
+ int aclv_count;
+# endif
+
+# elif HAVE_STATACL /* older AIX */
+ union { struct acl a; char room[4096]; } u;
+ bool have_u;
+
+# elif HAVE_ACLSORT /* NonStop Kernel */
+ struct acl entries[NACLENTRIES];
+ int count;
+
+# endif
+#endif
+};
+
+int get_permissions (const char *, int, mode_t, struct permission_context *);
+int set_permissions (struct permission_context *, const char *, int);
+void free_permission_context (struct permission_context *)
+#if ! (defined USE_ACL && (HAVE_ACL_GET_FILE || defined GETACL))
+ _GL_ATTRIBUTE_CONST
#endif
+ ;
_GL_INLINE_HEADER_END
diff --git a/lib/acl.h b/lib/acl.h
index dc36b0d..491b1ba 100644
--- a/lib/acl.h
+++ b/lib/acl.h
@@ -1,6 +1,6 @@
/* acl.c - access control lists
- Copyright (C) 2002, 2008-2012 Free Software Foundation, Inc.
+ Copyright (C) 2002, 2008-2016 Free Software Foundation, Inc.
This 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,12 +17,19 @@
Written by Paul Eggert. */
+#ifndef _GL_ACL_H
+#define _GL_ACL_H 1
+
+#include <stdbool.h>
#include <sys/types.h>
#include <sys/stat.h>
+bool acl_errno_valid (int) _GL_ATTRIBUTE_CONST;
int file_has_acl (char const *, struct stat const *);
int qset_acl (char const *, int, mode_t);
int set_acl (char const *, int, mode_t);
int qcopy_acl (char const *, int, char const *, int, mode_t);
int copy_acl (char const *, int, char const *, int, mode_t);
int chmod_or_fchmod (char const *, int, mode_t);
+
+#endif
diff --git a/lib/acl_entries.c b/lib/acl_entries.c
index 9ba7598..9fc9cf5 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-2012 Free Software Foundation, Inc.
+ Copyright (C) 2002-2003, 2005-2016 Free Software Foundation, Inc.
This 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/alignof.h b/lib/alignof.h
new file mode 100644
index 0000000..9b51af0
--- /dev/null
+++ b/lib/alignof.h
@@ -0,0 +1,50 @@
+/* Determine alignment of types.
+ Copyright (C) 2003-2004, 2006, 2009-2016 Free Software Foundation, Inc.
+
+ This 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 <http://www.gnu.org/licenses/>. */
+
+#ifndef _ALIGNOF_H
+#define _ALIGNOF_H
+
+#include <stddef.h>
+
+/* alignof_slot (TYPE)
+ Determine the alignment of a structure slot (field) of a given type,
+ at compile time. Note that the result depends on the ABI.
+ This is the same as alignof (TYPE) and _Alignof (TYPE), defined in
+ <stdalign.h> if __alignof_is_defined is 1.
+ Note: The result cannot be used as a value for an 'enum' constant,
+ due to bugs in HP-UX 10.20 cc and AIX 3.2.5 xlc. */
+#if defined __cplusplus
+ template <class type> struct alignof_helper { char __slot1; type __slot2; };
+# define alignof_slot(type) offsetof (alignof_helper<type>, __slot2)
+#else
+# define alignof_slot(type) offsetof (struct { char __slot1; type __slot2; }, __slot2)
+#endif
+
+/* alignof_type (TYPE)
+ Determine the good alignment of an object of the given type at compile time.
+ Note that this is not necessarily the same as alignof_slot(type).
+ For example, with GNU C on x86 platforms: alignof_type(double) = 8, but
+ - when -malign-double is not specified: alignof_slot(double) = 4,
+ - when -malign-double is specified: alignof_slot(double) = 8.
+ Note: The result cannot be used as a value for an 'enum' constant,
+ due to bugs in HP-UX 10.20 cc and AIX 3.2.5 xlc. */
+#if defined __GNUC__ || defined __IBM__ALIGNOF__
+# define alignof_type __alignof__
+#else
+# define alignof_type alignof_slot
+#endif
+
+#endif /* _ALIGNOF_H */
diff --git a/lib/alloca.in.h b/lib/alloca.in.h
index cdcaef1..6a25ecd 100644
--- a/lib/alloca.in.h
+++ b/lib/alloca.in.h
@@ -1,8 +1,6 @@
-/* -*- buffer-read-only: t -*- vi: set ro: */
-/* DO NOT EDIT! GENERATED AUTOMATICALLY! */
/* Memory allocation on the stack.
- Copyright (C) 1995, 1999, 2001-2004, 2006-2012 Free Software Foundation,
+ Copyright (C) 1995, 1999, 2001-2004, 2006-2016 Free Software Foundation,
Inc.
This program is free software; you can redistribute it and/or modify it
@@ -53,6 +51,8 @@ extern "C"
void *_alloca (unsigned short);
# pragma intrinsic (_alloca)
# define alloca _alloca
+# elif defined __MVS__
+# include <stdlib.h>
# else
# include <stddef.h>
# ifdef __cplusplus
diff --git a/lib/basename-lgpl.c b/lib/basename-lgpl.c
index 43ef8c2..1182109 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-2012 Free Software
+ Copyright (C) 1990, 1998-2001, 2003-2006, 2009-2016 Free Software
Foundation, Inc.
This program is free software: you can redistribute it and/or modify
diff --git a/lib/btowc.c b/lib/btowc.c
index cec9eca..e7badf9 100644
--- a/lib/btowc.c
+++ b/lib/btowc.c
@@ -1,5 +1,5 @@
/* Convert unibyte character to wide character.
- Copyright (C) 2008, 2010-2012 Free Software Foundation, Inc.
+ Copyright (C) 2008, 2010-2016 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2008.
This program is free software: you can redistribute it and/or modify
diff --git a/lib/c-ctype.c b/lib/c-ctype.c
index 98ff762..5d9d4d8 100644
--- a/lib/c-ctype.c
+++ b/lib/c-ctype.c
@@ -1,397 +1,3 @@
-/* -*- buffer-read-only: t -*- vi: set ro: */
-/* DO NOT EDIT! GENERATED AUTOMATICALLY! */
-/* Character handling in C locale.
-
- Copyright 2000-2003, 2006, 2009-2012 Free Software Foundation, Inc.
-
-This 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>
-
-/* Specification. */
-#define NO_C_CTYPE_MACROS
+#define C_CTYPE_INLINE _GL_EXTERN_INLINE
#include "c-ctype.h"
-
-/* The function isascii is not locale dependent. Its use in EBCDIC is
- questionable. */
-bool
-c_isascii (int c)
-{
- return (c >= 0x00 && c <= 0x7f);
-}
-
-bool
-c_isalnum (int c)
-{
-#if C_CTYPE_CONSECUTIVE_DIGITS \
- && C_CTYPE_CONSECUTIVE_UPPERCASE && C_CTYPE_CONSECUTIVE_LOWERCASE
-#if C_CTYPE_ASCII
- return ((c >= '0' && c <= '9')
- || ((c & ~0x20) >= 'A' && (c & ~0x20) <= 'Z'));
-#else
- return ((c >= '0' && c <= '9')
- || (c >= 'A' && c <= 'Z')
- || (c >= 'a' && c <= 'z'));
-#endif
-#else
- switch (c)
- {
- case '0': case '1': case '2': case '3': case '4': case '5':
- case '6': case '7': case '8': case '9':
- case 'A': case 'B': case 'C': case 'D': case 'E': case 'F':
- case 'G': case 'H': case 'I': case 'J': case 'K': case 'L':
- case 'M': case 'N': case 'O': case 'P': case 'Q': case 'R':
- case 'S': case 'T': case 'U': case 'V': case 'W': case 'X':
- case 'Y': case 'Z':
- case 'a': case 'b': case 'c': case 'd': case 'e': case 'f':
- case 'g': case 'h': case 'i': case 'j': case 'k': case 'l':
- case 'm': case 'n': case 'o': case 'p': case 'q': case 'r':
- case 's': case 't': case 'u': case 'v': case 'w': case 'x':
- case 'y': case 'z':
- return 1;
- default:
- return 0;
- }
-#endif
-}
-
-bool
-c_isalpha (int c)
-{
-#if C_CTYPE_CONSECUTIVE_UPPERCASE && C_CTYPE_CONSECUTIVE_LOWERCASE
-#if C_CTYPE_ASCII
- return ((c & ~0x20) >= 'A' && (c & ~0x20) <= 'Z');
-#else
- return ((c >= 'A' && c <= 'Z') || (c >= 'a' && c <= 'z'));
-#endif
-#else
- switch (c)
- {
- case 'A': case 'B': case 'C': case 'D': case 'E': case 'F':
- case 'G': case 'H': case 'I': case 'J': case 'K': case 'L':
- case 'M': case 'N': case 'O': case 'P': case 'Q': case 'R':
- case 'S': case 'T': case 'U': case 'V': case 'W': case 'X':
- case 'Y': case 'Z':
- case 'a': case 'b': case 'c': case 'd': case 'e': case 'f':
- case 'g': case 'h': case 'i': case 'j': case 'k': case 'l':
- case 'm': case 'n': case 'o': case 'p': case 'q': case 'r':
- case 's': case 't': case 'u': case 'v': case 'w': case 'x':
- case 'y': case 'z':
- return 1;
- default:
- return 0;
- }
-#endif
-}
-
-bool
-c_isblank (int c)
-{
- return (c == ' ' || c == '\t');
-}
-
-bool
-c_iscntrl (int c)
-{
-#if C_CTYPE_ASCII
- return ((c & ~0x1f) == 0 || c == 0x7f);
-#else
- switch (c)
- {
- case ' ': case '!': case '"': case '#': case '$': case '%':
- case '&': case '\'': case '(': case ')': case '*': case '+':
- case ',': case '-': case '.': case '/':
- case '0': case '1': case '2': case '3': case '4': case '5':
- case '6': case '7': case '8': case '9':
- case ':': case ';': case '<': case '=': case '>': case '?':
- case '@':
- case 'A': case 'B': case 'C': case 'D': case 'E': case 'F':
- case 'G': case 'H': case 'I': case 'J': case 'K': case 'L':
- case 'M': case 'N': case 'O': case 'P': case 'Q': case 'R':
- case 'S': case 'T': case 'U': case 'V': case 'W': case 'X':
- case 'Y': case 'Z':
- case '[': case '\\': case ']': case '^': case '_': case '`':
- case 'a': case 'b': case 'c': case 'd': case 'e': case 'f':
- case 'g': case 'h': case 'i': case 'j': case 'k': case 'l':
- case 'm': case 'n': case 'o': case 'p': case 'q': case 'r':
- case 's': case 't': case 'u': case 'v': case 'w': case 'x':
- case 'y': case 'z':
- case '{': case '|': case '}': case '~':
- return 0;
- default:
- return 1;
- }
-#endif
-}
-
-bool
-c_isdigit (int c)
-{
-#if C_CTYPE_CONSECUTIVE_DIGITS
- return (c >= '0' && c <= '9');
-#else
- switch (c)
- {
- case '0': case '1': case '2': case '3': case '4': case '5':
- case '6': case '7': case '8': case '9':
- return 1;
- default:
- return 0;
- }
-#endif
-}
-
-bool
-c_islower (int c)
-{
-#if C_CTYPE_CONSECUTIVE_LOWERCASE
- return (c >= 'a' && c <= 'z');
-#else
- switch (c)
- {
- case 'a': case 'b': case 'c': case 'd': case 'e': case 'f':
- case 'g': case 'h': case 'i': case 'j': case 'k': case 'l':
- case 'm': case 'n': case 'o': case 'p': case 'q': case 'r':
- case 's': case 't': case 'u': case 'v': case 'w': case 'x':
- case 'y': case 'z':
- return 1;
- default:
- return 0;
- }
-#endif
-}
-
-bool
-c_isgraph (int c)
-{
-#if C_CTYPE_ASCII
- return (c >= '!' && c <= '~');
-#else
- switch (c)
- {
- case '!': case '"': case '#': case '$': case '%': case '&':
- case '\'': case '(': case ')': case '*': case '+': case ',':
- case '-': case '.': case '/':
- case '0': case '1': case '2': case '3': case '4': case '5':
- case '6': case '7': case '8': case '9':
- case ':': case ';': case '<': case '=': case '>': case '?':
- case '@':
- case 'A': case 'B': case 'C': case 'D': case 'E': case 'F':
- case 'G': case 'H': case 'I': case 'J': case 'K': case 'L':
- case 'M': case 'N': case 'O': case 'P': case 'Q': case 'R':
- case 'S': case 'T': case 'U': case 'V': case 'W': case 'X':
- case 'Y': case 'Z':
- case '[': case '\\': case ']': case '^': case '_': case '`':
- case 'a': case 'b': case 'c': case 'd': case 'e': case 'f':
- case 'g': case 'h': case 'i': case 'j': case 'k': case 'l':
- case 'm': case 'n': case 'o': case 'p': case 'q': case 'r':
- case 's': case 't': case 'u': case 'v': case 'w': case 'x':
- case 'y': case 'z':
- case '{': case '|': case '}': case '~':
- return 1;
- default:
- return 0;
- }
-#endif
-}
-
-bool
-c_isprint (int c)
-{
-#if C_CTYPE_ASCII
- return (c >= ' ' && c <= '~');
-#else
- switch (c)
- {
- case ' ': case '!': case '"': case '#': case '$': case '%':
- case '&': case '\'': case '(': case ')': case '*': case '+':
- case ',': case '-': case '.': case '/':
- case '0': case '1': case '2': case '3': case '4': case '5':
- case '6': case '7': case '8': case '9':
- case ':': case ';': case '<': case '=': case '>': case '?':
- case '@':
- case 'A': case 'B': case 'C': case 'D': case 'E': case 'F':
- case 'G': case 'H': case 'I': case 'J': case 'K': case 'L':
- case 'M': case 'N': case 'O': case 'P': case 'Q': case 'R':
- case 'S': case 'T': case 'U': case 'V': case 'W': case 'X':
- case 'Y': case 'Z':
- case '[': case '\\': case ']': case '^': case '_': case '`':
- case 'a': case 'b': case 'c': case 'd': case 'e': case 'f':
- case 'g': case 'h': case 'i': case 'j': case 'k': case 'l':
- case 'm': case 'n': case 'o': case 'p': case 'q': case 'r':
- case 's': case 't': case 'u': case 'v': case 'w': case 'x':
- case 'y': case 'z':
- case '{': case '|': case '}': case '~':
- return 1;
- default:
- return 0;
- }
-#endif
-}
-
-bool
-c_ispunct (int c)
-{
-#if C_CTYPE_ASCII
- return ((c >= '!' && c <= '~')
- && !((c >= '0' && c <= '9')
- || ((c & ~0x20) >= 'A' && (c & ~0x20) <= 'Z')));
-#else
- switch (c)
- {
- case '!': case '"': case '#': case '$': case '%': case '&':
- case '\'': case '(': case ')': case '*': case '+': case ',':
- case '-': case '.': case '/':
- case ':': case ';': case '<': case '=': case '>': case '?':
- case '@':
- case '[': case '\\': case ']': case '^': case '_': case '`':
- case '{': case '|': case '}': case '~':
- return 1;
- default:
- return 0;
- }
-#endif
-}
-
-bool
-c_isspace (int c)
-{
- return (c == ' ' || c == '\t'
- || c == '\n' || c == '\v' || c == '\f' || c == '\r');
-}
-
-bool
-c_isupper (int c)
-{
-#if C_CTYPE_CONSECUTIVE_UPPERCASE
- return (c >= 'A' && c <= 'Z');
-#else
- switch (c)
- {
- case 'A': case 'B': case 'C': case 'D': case 'E': case 'F':
- case 'G': case 'H': case 'I': case 'J': case 'K': case 'L':
- case 'M': case 'N': case 'O': case 'P': case 'Q': case 'R':
- case 'S': case 'T': case 'U': case 'V': case 'W': case 'X':
- case 'Y': case 'Z':
- return 1;
- default:
- return 0;
- }
-#endif
-}
-
-bool
-c_isxdigit (int c)
-{
-#if C_CTYPE_CONSECUTIVE_DIGITS \
- && C_CTYPE_CONSECUTIVE_UPPERCASE && C_CTYPE_CONSECUTIVE_LOWERCASE
-#if C_CTYPE_ASCII
- return ((c >= '0' && c <= '9')
- || ((c & ~0x20) >= 'A' && (c & ~0x20) <= 'F'));
-#else
- return ((c >= '0' && c <= '9')
- || (c >= 'A' && c <= 'F')
- || (c >= 'a' && c <= 'f'));
-#endif
-#else
- switch (c)
- {
- case '0': case '1': case '2': case '3': case '4': case '5':
- case '6': case '7': case '8': case '9':
- case 'A': case 'B': case 'C': case 'D': case 'E': case 'F':
- case 'a': case 'b': case 'c': case 'd': case 'e': case 'f':
- return 1;
- default:
- return 0;
- }
-#endif
-}
-
-int
-c_tolower (int c)
-{
-#if C_CTYPE_CONSECUTIVE_UPPERCASE && C_CTYPE_CONSECUTIVE_LOWERCASE
- return (c >= 'A' && c <= 'Z' ? c - 'A' + 'a' : c);
-#else
- switch (c)
- {
- case 'A': return 'a';
- case 'B': return 'b';
- case 'C': return 'c';
- case 'D': return 'd';
- case 'E': return 'e';
- case 'F': return 'f';
- case 'G': return 'g';
- case 'H': return 'h';
- case 'I': return 'i';
- case 'J': return 'j';
- case 'K': return 'k';
- case 'L': return 'l';
- case 'M': return 'm';
- case 'N': return 'n';
- case 'O': return 'o';
- case 'P': return 'p';
- case 'Q': return 'q';
- case 'R': return 'r';
- case 'S': return 's';
- case 'T': return 't';
- case 'U': return 'u';
- case 'V': return 'v';
- case 'W': return 'w';
- case 'X': return 'x';
- case 'Y': return 'y';
- case 'Z': return 'z';
- default: return c;
- }
-#endif
-}
-
-int
-c_toupper (int c)
-{
-#if C_CTYPE_CONSECUTIVE_UPPERCASE && C_CTYPE_CONSECUTIVE_LOWERCASE
- return (c >= 'a' && c <= 'z' ? c - 'a' + 'A' : c);
-#else
- switch (c)
- {
- case 'a': return 'A';
- case 'b': return 'B';
- case 'c': return 'C';
- case 'd': return 'D';
- case 'e': return 'E';
- case 'f': return 'F';
- case 'g': return 'G';
- case 'h': return 'H';
- case 'i': return 'I';
- case 'j': return 'J';
- case 'k': return 'K';
- case 'l': return 'L';
- case 'm': return 'M';
- case 'n': return 'N';
- case 'o': return 'O';
- case 'p': return 'P';
- case 'q': return 'Q';
- case 'r': return 'R';
- case 's': return 'S';
- case 't': return 'T';
- case 'u': return 'U';
- case 'v': return 'V';
- case 'w': return 'W';
- case 'x': return 'X';
- case 'y': return 'Y';
- case 'z': return 'Z';
- default: return c;
- }
-#endif
-}
diff --git a/lib/c-ctype.h b/lib/c-ctype.h
index 3148a0d..717ae78 100644
--- a/lib/c-ctype.h
+++ b/lib/c-ctype.h
@@ -1,5 +1,3 @@
-/* -*- buffer-read-only: t -*- vi: set ro: */
-/* DO NOT EDIT! GENERATED AUTOMATICALLY! */
/* Character handling in C locale.
These functions work like the corresponding functions in <ctype.h>,
@@ -7,7 +5,7 @@
<ctype.h> functions' behaviour depends on the current locale set via
setlocale.
- Copyright (C) 2000-2003, 2006, 2008-2012 Free Software Foundation, Inc.
+ Copyright (C) 2000-2003, 2006, 2008-2016 Free Software Foundation, Inc.
This 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,6 +25,13 @@ along with this program; if not, see <http://www.gnu.org/licenses/>. */
#include <stdbool.h>
+#ifndef _GL_INLINE_HEADER_BEGIN
+ #error "Please include config.h first."
+#endif
+_GL_INLINE_HEADER_BEGIN
+#ifndef C_CTYPE_INLINE
+# define C_CTYPE_INLINE _GL_INLINE
+#endif
#ifdef __cplusplus
extern "C" {
@@ -41,38 +46,6 @@ extern "C" {
characters. */
-/* Check whether the ASCII optimizations apply. */
-
-/* ANSI C89 (and ISO C99 5.2.1.3 too) already guarantees that
- '0', '1', ..., '9' have consecutive integer values. */
-#define C_CTYPE_CONSECUTIVE_DIGITS 1
-
-#if ('A' <= 'Z') \
- && ('A' + 1 == 'B') && ('B' + 1 == 'C') && ('C' + 1 == 'D') \
- && ('D' + 1 == 'E') && ('E' + 1 == 'F') && ('F' + 1 == 'G') \
- && ('G' + 1 == 'H') && ('H' + 1 == 'I') && ('I' + 1 == 'J') \
- && ('J' + 1 == 'K') && ('K' + 1 == 'L') && ('L' + 1 == 'M') \
- && ('M' + 1 == 'N') && ('N' + 1 == 'O') && ('O' + 1 == 'P') \
- && ('P' + 1 == 'Q') && ('Q' + 1 == 'R') && ('R' + 1 == 'S') \
- && ('S' + 1 == 'T') && ('T' + 1 == 'U') && ('U' + 1 == 'V') \
- && ('V' + 1 == 'W') && ('W' + 1 == 'X') && ('X' + 1 == 'Y') \
- && ('Y' + 1 == 'Z')
-#define C_CTYPE_CONSECUTIVE_UPPERCASE 1
-#endif
-
-#if ('a' <= 'z') \
- && ('a' + 1 == 'b') && ('b' + 1 == 'c') && ('c' + 1 == 'd') \
- && ('d' + 1 == 'e') && ('e' + 1 == 'f') && ('f' + 1 == 'g') \
- && ('g' + 1 == 'h') && ('h' + 1 == 'i') && ('i' + 1 == 'j') \
- && ('j' + 1 == 'k') && ('k' + 1 == 'l') && ('l' + 1 == 'm') \
- && ('m' + 1 == 'n') && ('n' + 1 == 'o') && ('o' + 1 == 'p') \
- && ('p' + 1 == 'q') && ('q' + 1 == 'r') && ('r' + 1 == 's') \
- && ('s' + 1 == 't') && ('t' + 1 == 'u') && ('u' + 1 == 'v') \
- && ('v' + 1 == 'w') && ('w' + 1 == 'x') && ('x' + 1 == 'y') \
- && ('y' + 1 == 'z')
-#define C_CTYPE_CONSECUTIVE_LOWERCASE 1
-#endif
-
#if (' ' == 32) && ('!' == 33) && ('"' == 34) && ('#' == 35) \
&& ('%' == 37) && ('&' == 38) && ('\'' == 39) && ('(' == 40) \
&& (')' == 41) && ('*' == 42) && ('+' == 43) && (',' == 44) \
@@ -98,11 +71,84 @@ extern "C" {
&& ('{' == 123) && ('|' == 124) && ('}' == 125) && ('~' == 126)
/* The character set is ASCII or one of its variants or extensions, not EBCDIC.
Testing the value of '\n' and '\r' is not relevant. */
-#define C_CTYPE_ASCII 1
+# define C_CTYPE_ASCII 1
+#elif ! (' ' == '\x40' && '0' == '\xf0' \
+ && 'A' == '\xc1' && 'J' == '\xd1' && 'S' == '\xe2' \
+ && 'a' == '\x81' && 'j' == '\x91' && 's' == '\xa2')
+# error "Only ASCII and EBCDIC are supported"
#endif
+#if 'A' < 0
+# error "EBCDIC and char is signed -- not supported"
+#endif
+
+/* Cases for control characters. */
+
+#define _C_CTYPE_CNTRL \
+ case '\a': case '\b': case '\f': case '\n': \
+ case '\r': case '\t': case '\v': \
+ _C_CTYPE_OTHER_CNTRL
+
+/* ASCII control characters other than those with \-letter escapes. */
+
+#if C_CTYPE_ASCII
+# define _C_CTYPE_OTHER_CNTRL \
+ case '\x00': case '\x01': case '\x02': case '\x03': \
+ case '\x04': case '\x05': case '\x06': case '\x0e': \
+ case '\x0f': case '\x10': case '\x11': case '\x12': \
+ case '\x13': case '\x14': case '\x15': case '\x16': \
+ case '\x17': case '\x18': case '\x19': case '\x1a': \
+ case '\x1b': case '\x1c': case '\x1d': case '\x1e': \
+ case '\x1f': case '\x7f'
+#else
+ /* Use EBCDIC code page 1047's assignments for ASCII control chars;
+ assume all EBCDIC code pages agree about these assignments. */
+# define _C_CTYPE_OTHER_CNTRL \
+ case '\x00': case '\x01': case '\x02': case '\x03': \
+ case '\x07': case '\x0e': case '\x0f': case '\x10': \
+ case '\x11': case '\x12': case '\x13': case '\x18': \
+ case '\x19': case '\x1c': case '\x1d': case '\x1e': \
+ case '\x1f': case '\x26': case '\x27': case '\x2d': \
+ case '\x2e': case '\x32': case '\x37': case '\x3c': \
+ case '\x3d': case '\x3f'
+#endif
-/* Function declarations. */
+/* Cases for lowercase hex letters, and lowercase letters, all offset by N. */
+
+#define _C_CTYPE_LOWER_A_THRU_F_N(n) \
+ case 'a' + (n): case 'b' + (n): case 'c' + (n): case 'd' + (n): \
+ case 'e' + (n): case 'f' + (n)
+#define _C_CTYPE_LOWER_N(n) \
+ _C_CTYPE_LOWER_A_THRU_F_N(n): \
+ case 'g' + (n): case 'h' + (n): case 'i' + (n): case 'j' + (n): \
+ case 'k' + (n): case 'l' + (n): case 'm' + (n): case 'n' + (n): \
+ case 'o' + (n): case 'p' + (n): case 'q' + (n): case 'r' + (n): \
+ case 's' + (n): case 't' + (n): case 'u' + (n): case 'v' + (n): \
+ case 'w' + (n): case 'x' + (n): case 'y' + (n): case 'z' + (n)
+
+/* Cases for hex letters, digits, lower, punct, and upper. */
+
+#define _C_CTYPE_A_THRU_F \
+ _C_CTYPE_LOWER_A_THRU_F_N (0): \
+ _C_CTYPE_LOWER_A_THRU_F_N ('A' - 'a')
+#define _C_CTYPE_DIGIT \
+ case '0': case '1': case '2': case '3': \
+ case '4': case '5': case '6': case '7': \
+ case '8': case '9'
+#define _C_CTYPE_LOWER _C_CTYPE_LOWER_N (0)
+#define _C_CTYPE_PUNCT \
+ case '!': case '"': case '#': case '$': \
+ case '%': case '&': case '\'': case '(': \
+ case ')': case '*': case '+': case ',': \
+ case '-': case '.': case '/': case ':': \
+ case ';': case '<': case '=': case '>': \
+ case '?': case '@': case '[': case '\\': \
+ case ']': case '^': case '_': case '`': \
+ case '{': case '|': case '}': case '~'
+#define _C_CTYPE_UPPER _C_CTYPE_LOWER_N ('A' - 'a')
+
+
+/* Function definitions. */
/* Unlike the functions in <ctype.h>, which require an argument in the range
of the 'unsigned char' type, the functions here operate on values that are
@@ -119,178 +165,202 @@ extern "C" {
if (c_isalpha (*s)) ...
*/
-extern bool c_isascii (int c) _GL_ATTRIBUTE_CONST; /* not locale dependent */
-
-extern bool c_isalnum (int c) _GL_ATTRIBUTE_CONST;
-extern bool c_isalpha (int c) _GL_ATTRIBUTE_CONST;
-extern bool c_isblank (int c) _GL_ATTRIBUTE_CONST;
-extern bool c_iscntrl (int c) _GL_ATTRIBUTE_CONST;
-extern bool c_isdigit (int c) _GL_ATTRIBUTE_CONST;
-extern bool c_islower (int c) _GL_ATTRIBUTE_CONST;
-extern bool c_isgraph (int c) _GL_ATTRIBUTE_CONST;
-extern bool c_isprint (int c) _GL_ATTRIBUTE_CONST;
-extern bool c_ispunct (int c) _GL_ATTRIBUTE_CONST;
-extern bool c_isspace (int c) _GL_ATTRIBUTE_CONST;
-extern bool c_isupper (int c) _GL_ATTRIBUTE_CONST;
-extern bool c_isxdigit (int c) _GL_ATTRIBUTE_CONST;
-
-extern int c_tolower (int c) _GL_ATTRIBUTE_CONST;
-extern int c_toupper (int c) _GL_ATTRIBUTE_CONST;
-
-
-#if defined __GNUC__ && defined __OPTIMIZE__ && !defined __OPTIMIZE_SIZE__ && !defined NO_C_CTYPE_MACROS
-
-/* ASCII optimizations. */
-
-#undef c_isascii
-#define c_isascii(c) \
- ({ int __c = (c); \
- (__c >= 0x00 && __c <= 0x7f); \
- })
+C_CTYPE_INLINE bool
+c_isalnum (int c)
+{
+ switch (c)
+ {
+ _C_CTYPE_DIGIT:
+ _C_CTYPE_LOWER:
+ _C_CTYPE_UPPER:
+ return true;
+ default:
+ return false;
+ }
+}
-#if C_CTYPE_CONSECUTIVE_DIGITS \
- && C_CTYPE_CONSECUTIVE_UPPERCASE && C_CTYPE_CONSECUTIVE_LOWERCASE
-#if C_CTYPE_ASCII
-#undef c_isalnum
-#define c_isalnum(c) \
- ({ int __c = (c); \
- ((__c >= '0' && __c <= '9') \
- || ((__c & ~0x20) >= 'A' && (__c & ~0x20) <= 'Z')); \
- })
-#else
-#undef c_isalnum
-#define c_isalnum(c) \
- ({ int __c = (c); \
- ((__c >= '0' && __c <= '9') \
- || (__c >= 'A' && __c <= 'Z') \
- || (__c >= 'a' && __c <= 'z')); \
- })
-#endif
-#endif
+C_CTYPE_INLINE bool
+c_isalpha (int c)
+{
+ switch (c)
+ {
+ _C_CTYPE_LOWER:
+ _C_CTYPE_UPPER:
+ return true;
+ default:
+ return false;
+ }
+}
-#if C_CTYPE_CONSECUTIVE_UPPERCASE && C_CTYPE_CONSECUTIVE_LOWERCASE
-#if C_CTYPE_ASCII
-#undef c_isalpha
-#define c_isalpha(c) \
- ({ int __c = (c); \
- ((__c & ~0x20) >= 'A' && (__c & ~0x20) <= 'Z'); \
- })
-#else
-#undef c_isalpha
-#define c_isalpha(c) \
- ({ int __c = (c); \
- ((__c >= 'A' && __c <= 'Z') || (__c >= 'a' && __c <= 'z')); \
- })
-#endif
-#endif
+/* The function isascii is not locale dependent.
+ Its use in EBCDIC is questionable. */
+C_CTYPE_INLINE bool
+c_isascii (int c)
+{
+ switch (c)
+ {
+ case ' ':
+ _C_CTYPE_CNTRL:
+ _C_CTYPE_DIGIT:
+ _C_CTYPE_LOWER:
+ _C_CTYPE_PUNCT:
+ _C_CTYPE_UPPER:
+ return true;
+ default:
+ return false;
+ }
+}
-#undef c_isblank
-#define c_isblank(c) \
- ({ int __c = (c); \
- (__c == ' ' || __c == '\t'); \
- })
+C_CTYPE_INLINE bool
+c_isblank (int c)
+{
+ return c == ' ' || c == '\t';
+}
-#if C_CTYPE_ASCII
-#undef c_iscntrl
-#define c_iscntrl(c) \
- ({ int __c = (c); \
- ((__c & ~0x1f) == 0 || __c == 0x7f); \
- })
-#endif
+C_CTYPE_INLINE bool
+c_iscntrl (int c)
+{
+ switch (c)
+ {
+ _C_CTYPE_CNTRL:
+ return true;
+ default:
+ return false;
+ }
+}
-#if C_CTYPE_CONSECUTIVE_DIGITS
-#undef c_isdigit
-#define c_isdigit(c) \
- ({ int __c = (c); \
- (__c >= '0' && __c <= '9'); \
- })
-#endif
+C_CTYPE_INLINE bool
+c_isdigit (int c)
+{
+ switch (c)
+ {
+ _C_CTYPE_DIGIT:
+ return true;
+ default:
+ return false;
+ }
+}
-#if C_CTYPE_CONSECUTIVE_LOWERCASE
-#undef c_islower
-#define c_islower(c) \
- ({ int __c = (c); \
- (__c >= 'a' && __c <= 'z'); \
- })
-#endif
+C_CTYPE_INLINE bool
+c_isgraph (int c)
+{
+ switch (c)
+ {
+ _C_CTYPE_DIGIT:
+ _C_CTYPE_LOWER:
+ _C_CTYPE_PUNCT:
+ _C_CTYPE_UPPER:
+ return true;
+ default:
+ return false;
+ }
+}
-#if C_CTYPE_ASCII
-#undef c_isgraph
-#define c_isgraph(c) \
- ({ int __c = (c); \
- (__c >= '!' && __c <= '~'); \
- })
-#endif
+C_CTYPE_INLINE bool
+c_islower (int c)
+{
+ switch (c)
+ {
+ _C_CTYPE_LOWER:
+ return true;
+ default:
+ return false;
+ }
+}
-#if C_CTYPE_ASCII
-#undef c_isprint
-#define c_isprint(c) \
- ({ int __c = (c); \
- (__c >= ' ' && __c <= '~'); \
- })
-#endif
+C_CTYPE_INLINE bool
+c_isprint (int c)
+{
+ switch (c)
+ {
+ case ' ':
+ _C_CTYPE_DIGIT:
+ _C_CTYPE_LOWER:
+ _C_CTYPE_PUNCT:
+ _C_CTYPE_UPPER:
+ return true;
+ default:
+ return false;
+ }
+}
-#if C_CTYPE_ASCII
-#undef c_ispunct
-#define c_ispunct(c) \
- ({ int _c = (c); \
- (c_isgraph (_c) && ! c_isalnum (_c)); \
- })
-#endif
+C_CTYPE_INLINE bool
+c_ispunct (int c)
+{
+ switch (c)
+ {
+ _C_CTYPE_PUNCT:
+ return true;
+ default:
+ return false;
+ }
+}
-#undef c_isspace
-#define c_isspace(c) \
- ({ int __c = (c); \
- (__c == ' ' || __c == '\t' \
- || __c == '\n' || __c == '\v' || __c == '\f' || __c == '\r'); \
- })
-
-#if C_CTYPE_CONSECUTIVE_UPPERCASE
-#undef c_isupper
-#define c_isupper(c) \
- ({ int __c = (c); \
- (__c >= 'A' && __c <= 'Z'); \
- })
-#endif
+C_CTYPE_INLINE bool
+c_isspace (int c)
+{
+ switch (c)
+ {
+ case ' ': case '\t': case '\n': case '\v': case '\f': case '\r':
+ return true;
+ default:
+ return false;
+ }
+}
-#if C_CTYPE_CONSECUTIVE_DIGITS \
- && C_CTYPE_CONSECUTIVE_UPPERCASE && C_CTYPE_CONSECUTIVE_LOWERCASE
-#if C_CTYPE_ASCII
-#undef c_isxdigit
-#define c_isxdigit(c) \
- ({ int __c = (c); \
- ((__c >= '0' && __c <= '9') \
- || ((__c & ~0x20) >= 'A' && (__c & ~0x20) <= 'F')); \
- })
-#else
-#undef c_isxdigit
-#define c_isxdigit(c) \
- ({ int __c = (c); \
- ((__c >= '0' && __c <= '9') \
- || (__c >= 'A' && __c <= 'F') \
- || (__c >= 'a' && __c <= 'f')); \
- })
-#endif
-#endif
+C_CTYPE_INLINE bool
+c_isupper (int c)
+{
+ switch (c)
+ {
+ _C_CTYPE_UPPER:
+ return true;
+ default:
+ return false;
+ }
+}
-#if C_CTYPE_CONSECUTIVE_UPPERCASE && C_CTYPE_CONSECUTIVE_LOWERCASE
-#undef c_tolower
-#define c_tolower(c) \
- ({ int __c = (c); \
- (__c >= 'A' && __c <= 'Z' ? __c - 'A' + 'a' : __c); \
- })
-#undef c_toupper
-#define c_toupper(c) \
- ({ int __c = (c); \
- (__c >= 'a' && __c <= 'z' ? __c - 'a' + 'A' : __c); \
- })
-#endif
+C_CTYPE_INLINE bool
+c_isxdigit (int c)
+{
+ switch (c)
+ {
+ _C_CTYPE_DIGIT:
+ _C_CTYPE_A_THRU_F:
+ return true;
+ default:
+ return false;
+ }
+}
-#endif /* optimizing for speed */
+C_CTYPE_INLINE int
+c_tolower (int c)
+{
+ switch (c)
+ {
+ _C_CTYPE_UPPER:
+ return c - 'A' + 'a';
+ default:
+ return c;
+ }
+}
+C_CTYPE_INLINE int
+c_toupper (int c)
+{
+ switch (c)
+ {
+ _C_CTYPE_LOWER:
+ return c - 'a' + 'A';
+ default:
+ return c;
+ }
+}
#ifdef __cplusplus
}
#endif
+_GL_INLINE_HEADER_END
+
#endif /* C_CTYPE_H */
diff --git a/lib/c-strcase.h b/lib/c-strcase.h
index 46a558d..7e570f5 100644
--- a/lib/c-strcase.h
+++ b/lib/c-strcase.h
@@ -1,7 +1,5 @@
-/* -*- buffer-read-only: t -*- vi: set ro: */
-/* DO NOT EDIT! GENERATED AUTOMATICALLY! */
/* Case-insensitive string comparison functions in C locale.
- Copyright (C) 1995-1996, 2001, 2003, 2005, 2009-2012 Free Software
+ Copyright (C) 1995-1996, 2001, 2003, 2005, 2009-2016 Free Software
Foundation, Inc.
This program is free software; you can redistribute it and/or modify
diff --git a/lib/c-strcasecmp.c b/lib/c-strcasecmp.c
index 779910c..bd113b7 100644
--- a/lib/c-strcasecmp.c
+++ b/lib/c-strcasecmp.c
@@ -1,7 +1,5 @@
-/* -*- buffer-read-only: t -*- vi: set ro: */
-/* DO NOT EDIT! GENERATED AUTOMATICALLY! */
/* c-strcasecmp.c -- case insensitive string comparator in C locale
- Copyright (C) 1998-1999, 2005-2006, 2009-2012 Free Software Foundation, Inc.
+ Copyright (C) 1998-1999, 2005-2006, 2009-2016 Free Software Foundation, Inc.
This 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/c-strcaseeq.h b/lib/c-strcaseeq.h
index 17e6f04..ed57251 100644
--- a/lib/c-strcaseeq.h
+++ b/lib/c-strcaseeq.h
@@ -1,7 +1,5 @@
-/* -*- buffer-read-only: t -*- vi: set ro: */
-/* DO NOT EDIT! GENERATED AUTOMATICALLY! */
/* Optimized case-insensitive string comparison in C locale.
- Copyright (C) 2001-2002, 2007, 2009-2012 Free Software Foundation, Inc.
+ Copyright (C) 2001-2002, 2007, 2009-2016 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify it
under the terms of the GNU General Public License as published
@@ -35,9 +33,6 @@
# if C_CTYPE_ASCII
# define CASEEQ(other,upper) \
(c_isupper (upper) ? ((other) & ~0x20) == (upper) : (other) == (upper))
-# elif C_CTYPE_CONSECUTIVE_UPPERCASE && C_CTYPE_CONSECUTIVE_LOWERCASE
-# define CASEEQ(other,upper) \
- (c_isupper (upper) ? (other) == (upper) || (other) == (upper) - 'A' + 'a' : (other) == (upper))
# else
# define CASEEQ(other,upper) \
(c_toupper (other) == (upper))
diff --git a/lib/c-strncasecmp.c b/lib/c-strncasecmp.c
index aa8cd40..c316929 100644
--- a/lib/c-strncasecmp.c
+++ b/lib/c-strncasecmp.c
@@ -1,7 +1,5 @@
-/* -*- buffer-read-only: t -*- vi: set ro: */
-/* DO NOT EDIT! GENERATED AUTOMATICALLY! */
/* c-strncasecmp.c -- case insensitive string comparator in C locale
- Copyright (C) 1998-1999, 2005-2006, 2009-2012 Free Software Foundation, Inc.
+ Copyright (C) 1998-1999, 2005-2006, 2009-2016 Free Software Foundation, Inc.
This 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/canonicalize-lgpl.c b/lib/canonicalize-lgpl.c
index 6d26fa6..4b1f6cb 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-2012 Free Software Foundation, Inc.
+ Copyright (C) 1996-2016 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
@@ -16,16 +16,16 @@
along with this program. If not, see <http://www.gnu.org/licenses/>. */
#ifndef _LIBC
+/* Don't use __attribute__ __nonnull__ in this compilation unit. Otherwise gcc
+ optimizes away the name == NULL test below. */
+# define _GL_ARG_NONNULL(params)
+
# define _GL_USE_STDLIB_ALLOC 1
# include <config.h>
#endif
#if !HAVE_CANONICALIZE_FILE_NAME || !FUNC_REALPATH_WORKS || defined _LIBC
-/* Don't use __attribute__ __nonnull__ in this compilation unit. Otherwise gcc
- optimizes away the name == NULL test below. */
-#define _GL_ARG_NONNULL(params)
-
/* Specification. */
#include <stdlib.h>
@@ -83,7 +83,23 @@
# define DOUBLE_SLASH_IS_DISTINCT_ROOT 0
#endif
+/* Define this independently so that stdint.h is not a prerequisite. */
+#ifndef SIZE_MAX
+# define SIZE_MAX ((size_t) -1)
+#endif
+
#if !FUNC_REALPATH_WORKS || defined _LIBC
+
+static void
+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 */
+ errno = ENOMEM;
+#endif
+}
+
/* Return the canonical absolute name of file NAME. A canonical name
does not contain any ".", ".." components nor any repeated path
separators ('/') or symlinks. All path components must exist. If
@@ -135,9 +151,7 @@ __realpath (const char *name, char *resolved)
rpath = malloc (path_max);
if (rpath == NULL)
{
- /* It's easier to set errno to ENOMEM than to rely on the
- 'malloc-posix' gnulib module. */
- errno = ENOMEM;
+ alloc_failed ();
return NULL;
}
}
@@ -185,7 +199,6 @@ __realpath (const char *name, char *resolved)
#else
struct stat st;
#endif
- int n;
/* Skip sequence of multiple path-separators. */
while (ISSLASH (*start))
@@ -238,9 +251,7 @@ __realpath (const char *name, char *resolved)
new_rpath = (char *) realloc (rpath, new_size);
if (new_rpath == NULL)
{
- /* It's easier to set errno to ENOMEM than to rely on the
- 'realloc-posix' gnulib module. */
- errno = ENOMEM;
+ alloc_failed ();
goto error;
}
rpath = new_rpath;
@@ -268,6 +279,7 @@ __realpath (const char *name, char *resolved)
{
char *buf;
size_t len;
+ ssize_t n;
if (++num_links > MAXSYMLINKS)
{
@@ -278,7 +290,7 @@ __realpath (const char *name, char *resolved)
buf = malloca (path_max);
if (!buf)
{
- errno = ENOMEM;
+ __set_errno (ENOMEM);
goto error;
}
@@ -287,7 +299,7 @@ __realpath (const char *name, char *resolved)
{
int saved_errno = errno;
freea (buf);
- errno = saved_errno;
+ __set_errno (saved_errno);
goto error;
}
buf[n] = '\0';
@@ -298,13 +310,14 @@ __realpath (const char *name, char *resolved)
if (!extra_buf)
{
freea (buf);
- errno = ENOMEM;
+ __set_errno (ENOMEM);
goto error;
}
}
len = strlen (end);
- if ((long int) (n + len) >= path_max)
+ /* Check that n + len + 1 doesn't overflow and is <= path_max. */
+ if (n >= SIZE_MAX - len || n + len >= path_max)
{
freea (buf);
__set_errno (ENAMETOOLONG);
@@ -370,7 +383,7 @@ error:
freea (extra_buf);
if (resolved == NULL)
free (rpath);
- errno = saved_errno;
+ __set_errno (saved_errno);
}
return NULL;
}
diff --git a/lib/close-stream.c b/lib/close-stream.c
new file mode 100644
index 0000000..0c4beae
--- /dev/null
+++ b/lib/close-stream.c
@@ -0,0 +1,78 @@
+/* Close a stream, with nicer error checking than fclose's.
+
+ Copyright (C) 1998-2002, 2004, 2006-2016 Free Software Foundation, Inc.
+
+ This 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 "close-stream.h"
+
+#include <errno.h>
+#include <stdbool.h>
+
+#include "fpending.h"
+
+#if USE_UNLOCKED_IO
+# include "unlocked-io.h"
+#endif
+
+/* Close STREAM. Return 0 if successful, EOF (setting errno)
+ otherwise. A failure might set errno to 0 if the error number
+ cannot be determined.
+
+ A failure with errno set to EPIPE may or may not indicate an error
+ situation worth signaling to the user. See the documentation of the
+ close_stdout_set_ignore_EPIPE function for details.
+
+ If a program writes *anything* to STREAM, that program should close
+ STREAM and make sure that it succeeds before exiting. Otherwise,
+ suppose that you go to the extreme of checking the return status
+ of every function that does an explicit write to STREAM. The last
+ printf can succeed in writing to the internal stream buffer, and yet
+ the fclose(STREAM) could still fail (due e.g., to a disk full error)
+ when it tries to write out that buffered data. Thus, you would be
+ left with an incomplete output file and the offending program would
+ exit successfully. Even calling fflush is not always sufficient,
+ since some file systems (NFS and CODA) buffer written/flushed data
+ until an actual close call.
+
+ Besides, it's wasteful to check the return value from every call
+ that writes to STREAM -- just let the internal stream state record
+ the failure. That's what the ferror test is checking below. */
+
+int
+close_stream (FILE *stream)
+{
+ const bool some_pending = (__fpending (stream) != 0);
+ const bool prev_fail = (ferror (stream) != 0);
+ const bool fclose_fail = (fclose (stream) != 0);
+
+ /* Return an error indication if there was a previous failure or if
+ fclose failed, with one exception: ignore an fclose failure if
+ there was no previous error, no data remains to be flushed, and
+ fclose failed with EBADF. That can happen when a program like cp
+ is invoked like this 'cp a b >&-' (i.e., with standard output
+ closed) and doesn't generate any output (hence no previous error
+ and nothing to be flushed). */
+
+ if (prev_fail || (fclose_fail && (some_pending || errno != EBADF)))
+ {
+ if (! fclose_fail)
+ errno = 0;
+ return EOF;
+ }
+
+ return 0;
+}
diff --git a/lib/close-stream.h b/lib/close-stream.h
new file mode 100644
index 0000000..be3d419
--- /dev/null
+++ b/lib/close-stream.h
@@ -0,0 +1,2 @@
+#include <stdio.h>
+int close_stream (FILE *stream);
diff --git a/lib/closeout.c b/lib/closeout.c
new file mode 100644
index 0000000..311faf4
--- /dev/null
+++ b/lib/closeout.c
@@ -0,0 +1,124 @@
+/* Close standard output and standard error, exiting with a diagnostic on error.
+
+ Copyright (C) 1998-2002, 2004, 2006, 2008-2016 Free Software Foundation,
+ Inc.
+
+ This 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 "closeout.h"
+
+#include <errno.h>
+#include <stdbool.h>
+#include <stdio.h>
+#include <unistd.h>
+
+#include "gettext.h"
+#define _(msgid) gettext (msgid)
+
+#include "close-stream.h"
+#include "error.h"
+#include "exitfail.h"
+#include "quotearg.h"
+
+static const char *file_name;
+
+/* Set the file name to be reported in the event an error is detected
+ by close_stdout. */
+void
+close_stdout_set_file_name (const char *file)
+{
+ file_name = file;
+}
+
+static bool ignore_EPIPE /* = false */;
+
+/* Specify the reaction to an EPIPE error during the closing of stdout:
+ - If ignore = true, it shall be ignored.
+ - If ignore = false, it shall evoke a diagnostic, along with a nonzero
+ exit status.
+ The default is ignore = false.
+
+ This setting matters only if the SIGPIPE signal is ignored (i.e. its
+ handler set to SIG_IGN) or blocked. Only particular programs need to
+ temporarily ignore SIGPIPE. If SIGPIPE is ignored or blocked because
+ it was ignored or blocked in the parent process when it created the
+ child process, it usually is a bug in the parent process: It is bad
+ practice to have SIGPIPE ignored or blocked while creating a child
+ process.
+
+ EPIPE occurs when writing to a pipe or socket that has no readers now,
+ when SIGPIPE is ignored or blocked.
+
+ The ignore = false setting is suitable for a scenario where it is normally
+ guaranteed that the pipe writer terminates before the pipe reader. In
+ this case, an EPIPE is an indication of a premature termination of the
+ pipe reader and should lead to a diagnostic and a nonzero exit status.
+
+ The ignore = true setting is suitable for a scenario where you don't know
+ ahead of time whether the pipe writer or the pipe reader will terminate
+ first. In this case, an EPIPE is an indication that the pipe writer can
+ stop doing useless write() calls; this is what close_stdout does anyway.
+ EPIPE is part of the normal pipe/socket shutdown protocol in this case,
+ and should not lead to a diagnostic message. */
+
+void
+close_stdout_set_ignore_EPIPE (bool ignore)
+{
+ ignore_EPIPE = ignore;
+}
+
+/* Close standard output. On error, issue a diagnostic and _exit
+ with status 'exit_failure'.
+
+ Also close standard error. On error, _exit with status 'exit_failure'.
+
+ Since close_stdout is commonly registered via 'atexit', POSIX
+ and the C standard both say that it should not call 'exit',
+ because the behavior is undefined if 'exit' is called more than
+ once. So it calls '_exit' instead of 'exit'. If close_stdout
+ is registered via atexit before other functions are registered,
+ the other functions can act before this _exit is invoked.
+
+ Applications that use close_stdout should flush any streams
+ other than stdout and stderr before exiting, since the call to
+ _exit will bypass other buffer flushing. Applications should
+ be flushing and closing other streams anyway, to check for I/O
+ errors. Also, applications should not use tmpfile, since _exit
+ can bypass the removal of these files.
+
+ It's important to detect such failures and exit nonzero because many
+ tools (most notably 'make' and other build-management systems) depend
+ on being able to detect failure in other tools via their exit status. */
+
+void
+close_stdout (void)
+{
+ if (close_stream (stdout) != 0
+ && !(ignore_EPIPE && errno == EPIPE))
+ {
+ char const *write_error = _("write error");
+ if (file_name)
+ error (0, errno, "%s: %s", quotearg_colon (file_name),
+ write_error);
+ else
+ error (0, errno, "%s", write_error);
+
+ _exit (exit_failure);
+ }
+
+ if (close_stream (stderr) != 0)
+ _exit (exit_failure);
+}
diff --git a/lib/closeout.h b/lib/closeout.h
new file mode 100644
index 0000000..bde9bf0
--- /dev/null
+++ b/lib/closeout.h
@@ -0,0 +1,36 @@
+/* Close standard output and standard error.
+
+ Copyright (C) 1998, 2000, 2003-2004, 2006, 2008-2016 Free Software
+ Foundation, Inc.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+#ifndef CLOSEOUT_H
+# define CLOSEOUT_H 1
+
+# include <stdbool.h>
+
+# ifdef __cplusplus
+extern "C" {
+# endif
+
+void close_stdout_set_file_name (const char *file);
+void close_stdout_set_ignore_EPIPE (bool ignore);
+void close_stdout (void);
+
+# ifdef __cplusplus
+}
+# endif
+
+#endif
diff --git a/lib/config.charset b/lib/config.charset
index 0a3b343..947d916 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-2012 Free Software Foundation, Inc.
+# Copyright (C) 2000-2004, 2006-2016 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -348,12 +348,10 @@ case "$os" in
#echo "sun_eu_greek ?" # what is this?
echo "UTF-8 UTF-8"
;;
- freebsd* | os2*)
+ freebsd*)
# FreeBSD 4.2 doesn't have nl_langinfo(CODESET); therefore
# localcharset.c falls back to using the full locale name
# from the environment variables.
- # Likewise for OS/2. OS/2 has XFree86 just like FreeBSD. Just
- # reuse FreeBSD's locale data for OS/2.
echo "C ASCII"
echo "US-ASCII ASCII"
for l in la_LN lt_LN; do
diff --git a/lib/copy-acl.c b/lib/copy-acl.c
index 5cc75e1..4b6b443 100644
--- a/lib/copy-acl.c
+++ b/lib/copy-acl.c
@@ -1,6 +1,6 @@
-/* copy-acl.c - copy access control list from one file to another file
+/* Copy access control list from one file to file. -*- coding: utf-8 -*-
- Copyright (C) 2002-2003, 2005-2012 Free Software Foundation, Inc.
+ Copyright (C) 2002-2003, 2005-2016 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -21,8 +21,10 @@
#include "acl.h"
-#include "acl-internal.h"
+#include <errno.h>
+#include "quote.h"
+#include "error.h"
#include "gettext.h"
#define _(msgid) gettext (msgid)
@@ -34,565 +36,6 @@
If access control lists are not available, fchmod the target file to
MODE. Also sets the non-permission bits of the destination file
(S_ISUID, S_ISGID, S_ISVTX) to those from MODE if any are set.
- Return 0 if successful.
- Return -2 and set errno for an error relating to the source file.
- Return -1 and set errno for an error relating to the destination file. */
-
-int
-qcopy_acl (const char *src_name, int source_desc, const char *dst_name,
- int dest_desc, mode_t mode)
-{
-#if USE_ACL && HAVE_ACL_GET_FILE
- /* POSIX 1003.1e (draft 17 -- abandoned) specific version. */
- /* Linux, FreeBSD, Mac OS X, IRIX, Tru64 */
-# if !HAVE_ACL_TYPE_EXTENDED
- /* Linux, FreeBSD, IRIX, Tru64 */
-
- acl_t acl;
- int ret;
-
- if (HAVE_ACL_GET_FD && source_desc != -1)
- acl = acl_get_fd (source_desc);
- else
- acl = acl_get_file (src_name, ACL_TYPE_ACCESS);
- if (acl == NULL)
- {
- if (ACL_NOT_WELL_SUPPORTED (errno))
- return qset_acl (dst_name, dest_desc, mode);
- else
- return -2;
- }
-
- if (HAVE_ACL_SET_FD && dest_desc != -1)
- ret = acl_set_fd (dest_desc, acl);
- else
- ret = acl_set_file (dst_name, ACL_TYPE_ACCESS, acl);
- if (ret != 0)
- {
- int saved_errno = errno;
-
- if (ACL_NOT_WELL_SUPPORTED (errno) && !acl_access_nontrivial (acl))
- {
- acl_free (acl);
- return chmod_or_fchmod (dst_name, dest_desc, mode);
- }
- else
- {
- acl_free (acl);
- chmod_or_fchmod (dst_name, dest_desc, mode);
- errno = saved_errno;
- return -1;
- }
- }
- else
- acl_free (acl);
-
- if (!MODE_INSIDE_ACL || (mode & (S_ISUID | S_ISGID | S_ISVTX)))
- {
- /* We did not call chmod so far, and either the mode and the ACL are
- separate or special bits are to be set which don't fit into ACLs. */
-
- if (chmod_or_fchmod (dst_name, dest_desc, mode) != 0)
- return -1;
- }
-
- if (S_ISDIR (mode))
- {
- acl = acl_get_file (src_name, ACL_TYPE_DEFAULT);
- if (acl == NULL)
- return -2;
-
- if (acl_set_file (dst_name, ACL_TYPE_DEFAULT, acl))
- {
- int saved_errno = errno;
-
- acl_free (acl);
- errno = saved_errno;
- return -1;
- }
- else
- acl_free (acl);
- }
- return 0;
-
-# else /* HAVE_ACL_TYPE_EXTENDED */
- /* Mac OS X */
-
- /* On Mac OS X, acl_get_file (name, ACL_TYPE_ACCESS)
- and acl_get_file (name, ACL_TYPE_DEFAULT)
- always return NULL / EINVAL. You have to use
- acl_get_file (name, ACL_TYPE_EXTENDED)
- or acl_get_fd (open (name, ...))
- to retrieve an ACL.
- On the other hand,
- acl_set_file (name, ACL_TYPE_ACCESS, acl)
- and acl_set_file (name, ACL_TYPE_DEFAULT, acl)
- have the same effect as
- acl_set_file (name, ACL_TYPE_EXTENDED, acl):
- Each of these calls sets the file's ACL. */
-
- acl_t acl;
- int ret;
-
- if (HAVE_ACL_GET_FD && source_desc != -1)
- acl = acl_get_fd (source_desc);
- else
- acl = acl_get_file (src_name, ACL_TYPE_EXTENDED);
- if (acl == NULL)
- {
- if (ACL_NOT_WELL_SUPPORTED (errno))
- return qset_acl (dst_name, dest_desc, mode);
- else
- return -2;
- }
-
- if (HAVE_ACL_SET_FD && dest_desc != -1)
- ret = acl_set_fd (dest_desc, acl);
- else
- ret = acl_set_file (dst_name, ACL_TYPE_EXTENDED, acl);
- if (ret != 0)
- {
- int saved_errno = errno;
-
- if (ACL_NOT_WELL_SUPPORTED (errno) && !acl_extended_nontrivial (acl))
- {
- acl_free (acl);
- return chmod_or_fchmod (dst_name, dest_desc, mode);
- }
- else
- {
- acl_free (acl);
- chmod_or_fchmod (dst_name, dest_desc, mode);
- errno = saved_errno;
- return -1;
- }
- }
- else
- acl_free (acl);
-
- /* Since !MODE_INSIDE_ACL, we have to call chmod explicitly. */
- return chmod_or_fchmod (dst_name, dest_desc, mode);
-
-# endif
-
-#elif USE_ACL && defined GETACL /* Solaris, Cygwin, not HP-UX */
-
- /* Solaris 2.5 through Solaris 10, Cygwin, and contemporaneous versions
- of Unixware. The acl() call returns the access and default ACL both
- at once. */
-# ifdef ACE_GETACL
- int ace_count;
- ace_t *ace_entries;
-# endif
- int count;
- aclent_t *entries;
- int did_chmod;
- int saved_errno;
- int ret;
-
-# ifdef ACE_GETACL
- /* Solaris also has a different variant of ACLs, used in ZFS and NFSv4
- file systems (whereas the other ones are used in UFS file systems).
- There is an API
- pathconf (name, _PC_ACL_ENABLED)
- fpathconf (desc, _PC_ACL_ENABLED)
- that allows to determine which of the two kinds of ACLs is supported
- for the given file. But some file systems may implement this call
- incorrectly, so better not use it.
- When fetching the source ACL, we simply fetch both ACL types.
- When setting the destination ACL, we try either ACL types, assuming
- that the kernel will translate the ACL from one form to the other.
- (See in <http://docs.sun.com/app/docs/doc/819-2241/6n4huc7ia?l=en&a=view>
- the description of ENOTSUP.) */
- for (;;)
- {
- ace_count = (source_desc != -1
- ? facl (source_desc, ACE_GETACLCNT, 0, NULL)
- : acl (src_name, ACE_GETACLCNT, 0, NULL));
-
- if (ace_count < 0)
- {
- if (errno == ENOSYS || errno == EINVAL)
- {
- ace_count = 0;
- ace_entries = NULL;
- break;
- }
- else
- return -2;
- }
-
- if (ace_count == 0)
- {
- ace_entries = NULL;
- break;
- }
-
- ace_entries = (ace_t *) malloc (ace_count * sizeof (ace_t));
- if (ace_entries == NULL)
- {
- errno = ENOMEM;
- return -2;
- }
-
- ret = (source_desc != -1
- ? facl (source_desc, ACE_GETACL, ace_count, ace_entries)
- : acl (src_name, ACE_GETACL, ace_count, ace_entries));
- if (ret < 0)
- {
- free (ace_entries);
- if (errno == ENOSYS || errno == EINVAL)
- {
- ace_count = 0;
- ace_entries = NULL;
- break;
- }
- else
- return -2;
- }
- if (ret == ace_count)
- break;
- /* Huh? The number of ACL entries changed since the last call.
- Repeat. */
- }
-# endif
-
- for (;;)
- {
- count = (source_desc != -1
- ? facl (source_desc, GETACLCNT, 0, NULL)
- : acl (src_name, GETACLCNT, 0, NULL));
-
- if (count < 0)
- {
- if (errno == ENOSYS || errno == ENOTSUP || errno == EOPNOTSUPP)
- {
- count = 0;
- entries = NULL;
- break;
- }
- else
- return -2;
- }
-
- if (count == 0)
- {
- entries = NULL;
- break;
- }
-
- entries = (aclent_t *) malloc (count * sizeof (aclent_t));
- if (entries == NULL)
- {
- errno = ENOMEM;
- return -2;
- }
-
- if ((source_desc != -1
- ? facl (source_desc, GETACL, count, entries)
- : acl (src_name, GETACL, count, entries))
- == count)
- break;
- /* Huh? The number of ACL entries changed since the last call.
- Repeat. */
- }
-
- /* Is there an ACL of either kind? */
-# ifdef ACE_GETACL
- if (ace_count == 0)
-# endif
- if (count == 0)
- return qset_acl (dst_name, dest_desc, mode);
-
- did_chmod = 0; /* set to 1 once the mode bits in 0777 have been set */
- saved_errno = 0; /* the first non-ignorable error code */
-
- if (!MODE_INSIDE_ACL)
- {
- /* On Cygwin, it is necessary to call chmod before acl, because
- chmod can change the contents of the ACL (in ways that don't
- change the allowed accesses, but still visible). */
- if (chmod_or_fchmod (dst_name, dest_desc, mode) != 0)
- saved_errno = errno;
- did_chmod = 1;
- }
-
- /* If both ace_entries and entries are available, try SETACL before
- ACE_SETACL, because SETACL cannot fail with ENOTSUP whereas ACE_SETACL
- can. */
-
- if (count > 0)
- {
- ret = (dest_desc != -1
- ? facl (dest_desc, SETACL, count, entries)
- : acl (dst_name, SETACL, count, entries));
- if (ret < 0 && saved_errno == 0)
- {
- saved_errno = errno;
- if ((errno == ENOSYS || errno == EOPNOTSUPP || errno == EINVAL)
- && !acl_nontrivial (count, entries))
- saved_errno = 0;
- }
- else
- did_chmod = 1;
- }
- free (entries);
-
-# ifdef ACE_GETACL
- if (ace_count > 0)
- {
- ret = (dest_desc != -1
- ? facl (dest_desc, ACE_SETACL, ace_count, ace_entries)
- : acl (dst_name, ACE_SETACL, ace_count, ace_entries));
- if (ret < 0 && saved_errno == 0)
- {
- saved_errno = errno;
- if ((errno == ENOSYS || errno == EINVAL || errno == ENOTSUP)
- && !acl_ace_nontrivial (ace_count, ace_entries))
- saved_errno = 0;
- }
- }
- free (ace_entries);
-# endif
-
- if (MODE_INSIDE_ACL
- && did_chmod <= ((mode & (S_ISUID | S_ISGID | S_ISVTX)) ? 1 : 0))
- {
- /* We did not call chmod so far, and either the mode and the ACL are
- separate or special bits are to be set which don't fit into ACLs. */
-
- if (chmod_or_fchmod (dst_name, dest_desc, mode) != 0)
- {
- if (saved_errno == 0)
- saved_errno = errno;
- }
- }
-
- if (saved_errno)
- {
- errno = saved_errno;
- return -1;
- }
- return 0;
-
-#elif USE_ACL && HAVE_GETACL /* HP-UX */
-
- struct acl_entry entries[NACLENTRIES];
- int count;
-# if HAVE_ACLV_H
- struct acl aclv_entries[NACLVENTRIES];
- int aclv_count;
-# endif
- int did_chmod;
- int saved_errno;
- int ret;
-
- count = (source_desc != -1
- ? fgetacl (source_desc, NACLENTRIES, entries)
- : getacl (src_name, NACLENTRIES, entries));
-
- if (count < 0)
- {
- if (errno == ENOSYS || errno == EOPNOTSUPP || errno == ENOTSUP)
- count = 0;
- else
- return -2;
- }
- else if (count > 0)
- {
- if (count > NACLENTRIES)
- /* If NACLENTRIES cannot be trusted, use dynamic memory allocation. */
- abort ();
- }
-
-# if HAVE_ACLV_H
- aclv_count = acl ((char *) src_name, ACL_GET, NACLVENTRIES, aclv_entries);
-
- if (aclv_count < 0)
- {
- if (errno == ENOSYS || errno == EOPNOTSUPP || errno == EINVAL)
- count = 0;
- else
- return -2;
- }
- else if (aclv_count > 0)
- {
- if (aclv_count > NACLVENTRIES)
- /* If NACLVENTRIES cannot be trusted, use dynamic memory allocation. */
- abort ();
- }
-# endif
-
- if (count == 0)
-# if HAVE_ACLV_H
- if (aclv_count == 0)
-# endif
- return qset_acl (dst_name, dest_desc, mode);
-
- did_chmod = 0; /* set to 1 once the mode bits in 0777 have been set */
- saved_errno = 0; /* the first non-ignorable error code */
-
- if (count > 0)
- {
- ret = (dest_desc != -1
- ? fsetacl (dest_desc, count, entries)
- : setacl (dst_name, count, entries));
- if (ret < 0 && saved_errno == 0)
- {
- saved_errno = errno;
- if (errno == ENOSYS || errno == EOPNOTSUPP || errno == ENOTSUP)
- {
- struct stat source_statbuf;
-
- if ((source_desc != -1
- ? fstat (source_desc, &source_statbuf)
- : stat (src_name, &source_statbuf)) == 0)
- {
- if (!acl_nontrivial (count, entries, &source_statbuf))
- saved_errno = 0;
- }
- else
- saved_errno = errno;
- }
- }
- else
- did_chmod = 1;
- }
-
-# if HAVE_ACLV_H
- if (aclv_count > 0)
- {
- ret = acl ((char *) dst_name, ACL_SET, aclv_count, aclv_entries);
- if (ret < 0 && saved_errno == 0)
- {
- saved_errno = errno;
- if (errno == ENOSYS || errno == EOPNOTSUPP || errno == EINVAL)
- {
- if (!aclv_nontrivial (aclv_count, aclv_entries))
- saved_errno = 0;
- }
- }
- else
- did_chmod = 1;
- }
-# endif
-
- if (did_chmod <= ((mode & (S_ISUID | S_ISGID | S_ISVTX)) ? 1 : 0))
- {
- /* We did not call chmod so far, and special bits are to be set which
- don't fit into ACLs. */
-
- if (chmod_or_fchmod (dst_name, dest_desc, mode) != 0)
- {
- if (saved_errno == 0)
- saved_errno = errno;
- }
- }
-
- if (saved_errno)
- {
- errno = saved_errno;
- return -1;
- }
- return 0;
-
-#elif USE_ACL && HAVE_ACLX_GET && 0 /* AIX */
-
- /* TODO */
-
-#elif USE_ACL && HAVE_STATACL /* older AIX */
-
- union { struct acl a; char room[4096]; } u;
- int ret;
-
- if ((source_desc != -1
- ? fstatacl (source_desc, STX_NORMAL, &u.a, sizeof (u))
- : statacl (src_name, STX_NORMAL, &u.a, sizeof (u)))
- < 0)
- return -2;
-
- ret = (dest_desc != -1
- ? fchacl (dest_desc, &u.a, u.a.acl_len)
- : chacl (dst_name, &u.a, u.a.acl_len));
- if (ret < 0)
- {
- int saved_errno = errno;
-
- chmod_or_fchmod (dst_name, dest_desc, mode);
- errno = saved_errno;
- return -1;
- }
-
- /* No need to call chmod_or_fchmod at this point, since the mode bits
- S_ISUID, S_ISGID, S_ISVTX are also stored in the ACL. */
-
- return 0;
-
-#elif USE_ACL && HAVE_ACLSORT /* NonStop Kernel */
-
- struct acl entries[NACLENTRIES];
- int count;
- int ret;
-
- count = acl ((char *) src_name, ACL_GET, NACLENTRIES, entries);
-
- if (count < 0)
- {
- if (0)
- count = 0;
- else
- return -2;
- }
- else if (count > 0)
- {
- if (count > NACLENTRIES)
- /* If NACLENTRIES cannot be trusted, use dynamic memory allocation. */
- abort ();
- }
-
- if (count == 0)
- return qset_acl (dst_name, dest_desc, mode);
-
- ret = acl ((char *) dst_name, ACL_SET, count, entries);
- if (ret < 0)
- {
- int saved_errno = errno;
-
- if (0)
- {
- if (!acl_nontrivial (count, entries))
- return chmod_or_fchmod (dst_name, dest_desc, mode);
- }
-
- chmod_or_fchmod (dst_name, dest_desc, mode);
- errno = saved_errno;
- return -1;
- }
-
- if (mode & (S_ISUID | S_ISGID | S_ISVTX))
- {
- /* We did not call chmod so far, and either the mode and the ACL are
- separate or special bits are to be set which don't fit into ACLs. */
-
- return chmod_or_fchmod (dst_name, dest_desc, mode);
- }
- return 0;
-
-#else
-
- return qset_acl (dst_name, dest_desc, mode);
-
-#endif
-}
-
-
-/* Copy access control lists from one file to another. If SOURCE_DESC is
- a valid file descriptor, use file descriptor operations, else use
- filename based operations on SRC_NAME. Likewise for DEST_DESC and
- DST_NAME.
- If access control lists are not available, fchmod the target file to
- MODE. Also sets the non-permission bits of the destination file
- (S_ISUID, S_ISGID, S_ISVTX) to those from MODE if any are set.
Return 0 if successful, otherwise output a diagnostic and return a
negative error code. */
diff --git a/lib/ctype.in.h b/lib/ctype.in.h
new file mode 100644
index 0000000..217812d
--- /dev/null
+++ b/lib/ctype.in.h
@@ -0,0 +1,57 @@
+/* A substitute for ISO C99 <ctype.h>, for platforms on which it is incomplete.
+
+ Copyright (C) 2009-2016 Free Software Foundation, Inc.
+
+ This 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 <http://www.gnu.org/licenses/>. */
+
+/* Written by Bruno Haible. */
+
+/*
+ * ISO C 99 <ctype.h> for platforms on which it is incomplete.
+ * <http://www.opengroup.org/onlinepubs/9699919799/basedefs/ctype.h.html>
+ */
+
+#ifndef _@GUARD_PREFIX@_CTYPE_H
+
+#if __GNUC__ >= 3
+@PRAGMA_SYSTEM_HEADER@
+#endif
+@PRAGMA_COLUMNS@
+
+/* Include the original <ctype.h>. */
+/* The include_next requires a split double-inclusion guard. */
+#@INCLUDE_NEXT@ @NEXT_CTYPE_H@
+
+#ifndef _@GUARD_PREFIX@_CTYPE_H
+#define _@GUARD_PREFIX@_CTYPE_H
+
+/* The definitions of _GL_FUNCDECL_RPL etc. are copied here. */
+
+/* The definition of _GL_WARN_ON_USE is copied here. */
+
+/* Return non-zero if c is a blank, i.e. a space or tab character. */
+#if @GNULIB_ISBLANK@
+# if !@HAVE_ISBLANK@
+_GL_EXTERN_C int isblank (int c);
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef isblank
+# if HAVE_RAW_DECL_ISBLANK
+_GL_WARN_ON_USE (isblank, "isblank is unportable - "
+ "use gnulib module isblank for portability");
+# endif
+#endif
+
+#endif /* _@GUARD_PREFIX@_CTYPE_H */
+#endif /* _@GUARD_PREFIX@_CTYPE_H */
diff --git a/lib/dfa.c b/lib/dfa.c
new file mode 100644
index 0000000..3e1f35d
--- /dev/null
+++ b/lib/dfa.c
@@ -0,0 +1,4113 @@
+/* dfa.c - deterministic extended regexp routines for GNU
+ Copyright (C) 1988, 1998, 2000, 2002, 2004-2005, 2007-2016 Free Software
+ Foundation, Inc.
+
+ This 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, write to the Free Software
+ Foundation, Inc.,
+ 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA */
+
+/* Written June, 1988 by Mike Haertel
+ Modified July, 1988 by Arthur David Olson to assist BMG speedups */
+
+#include <config.h>
+
+#include "dfa.h"
+
+#include <assert.h>
+#include <ctype.h>
+#include <stdint.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <limits.h>
+#include <string.h>
+#include <locale.h>
+
+#define STREQ(a, b) (strcmp (a, b) == 0)
+
+/* ISASCIIDIGIT differs from isdigit, as follows:
+ - Its arg may be any int or unsigned int; it need not be an unsigned char.
+ - It's guaranteed to evaluate its argument exactly once.
+ - It's typically faster.
+ Posix 1003.2-1992 section 2.5.2.1 page 50 lines 1556-1558 says that
+ only '0' through '9' are digits. Prefer ISASCIIDIGIT to isdigit unless
+ it's important to use the locale's definition of "digit" even when the
+ host does not conform to Posix. */
+#define ISASCIIDIGIT(c) ((unsigned) (c) - '0' <= 9)
+
+#include "gettext.h"
+#define _(str) gettext (str)
+
+#include <wchar.h>
+
+#include "intprops.h"
+#include "xalloc.h"
+#include "localeinfo.h"
+
+#ifndef MIN
+# define MIN(a,b) ((a) < (b) ? (a) : (b))
+#endif
+
+/* HPUX defines these as macros in sys/param.h. */
+#ifdef setbit
+# undef setbit
+#endif
+#ifdef clrbit
+# undef clrbit
+#endif
+
+/* First integer value that is greater than any character code. */
+enum { NOTCHAR = 1 << CHAR_BIT };
+
+/* This represents part of a character class. It must be unsigned and
+ at least CHARCLASS_WORD_BITS wide. Any excess bits are zero. */
+typedef unsigned long int charclass_word;
+
+/* CHARCLASS_WORD_BITS is the number of bits used in a charclass word.
+ CHARCLASS_PAIR (LO, HI) is part of a charclass initializer, and
+ represents 64 bits' worth of a charclass, where LO and HI are the
+ low and high-order 32 bits of the 64-bit quantity. */
+#if ULONG_MAX >> 31 >> 31 < 3
+enum { CHARCLASS_WORD_BITS = 32 };
+# define CHARCLASS_PAIR(lo, hi) lo, hi
+#else
+enum { CHARCLASS_WORD_BITS = 64 };
+# define CHARCLASS_PAIR(lo, hi) (((charclass_word) (hi) << 32) + (lo))
+#endif
+
+/* An initializer for a charclass whose 32-bit words are A through H. */
+#define CHARCLASS_INIT(a, b, c, d, e, f, g, h) \
+ { \
+ CHARCLASS_PAIR (a, b), CHARCLASS_PAIR (c, d), \
+ CHARCLASS_PAIR (e, f), CHARCLASS_PAIR (g, h) \
+ }
+
+/* The maximum useful value of a charclass_word; all used bits are 1. */
+static charclass_word const CHARCLASS_WORD_MASK
+ = ((charclass_word) 1 << (CHARCLASS_WORD_BITS - 1) << 1) - 1;
+
+/* Number of words required to hold a bit for every character. */
+enum
+{
+ CHARCLASS_WORDS = (NOTCHAR + CHARCLASS_WORD_BITS - 1) / CHARCLASS_WORD_BITS
+};
+
+/* Sets of unsigned characters are stored as bit vectors in arrays of ints. */
+typedef charclass_word charclass[CHARCLASS_WORDS];
+
+/* Convert a possibly-signed character to an unsigned character. This is
+ a bit safer than casting to unsigned char, since it catches some type
+ errors that the cast doesn't. */
+static unsigned char
+to_uchar (char ch)
+{
+ return ch;
+}
+
+/* Contexts tell us whether a character is a newline or a word constituent.
+ Word-constituent characters are those that satisfy iswalnum, plus '_'.
+ Each character has a single CTX_* value; bitmasks of CTX_* values denote
+ a particular character class.
+
+ A state also stores a context value, which is a bitmask of CTX_* values.
+ A state's context represents a set of characters that the state's
+ predecessors must match. For example, a state whose context does not
+ include CTX_LETTER will never have transitions where the previous
+ character is a word constituent. A state whose context is CTX_ANY
+ might have transitions from any character. */
+
+#define CTX_NONE 1
+#define CTX_LETTER 2
+#define CTX_NEWLINE 4
+#define CTX_ANY 7
+
+/* Sometimes characters can only be matched depending on the surrounding
+ context. Such context decisions depend on what the previous character
+ was, and the value of the current (lookahead) character. Context
+ dependent constraints are encoded as 12-bit integers. Each bit that
+ is set indicates that the constraint succeeds in the corresponding
+ context.
+
+ bit 8-11 - valid contexts when next character is CTX_NEWLINE
+ bit 4-7 - valid contexts when next character is CTX_LETTER
+ bit 0-3 - valid contexts when next character is CTX_NONE
+
+ The macro SUCCEEDS_IN_CONTEXT determines whether a given constraint
+ succeeds in a particular context. Prev is a bitmask of possible
+ context values for the previous character, curr is the (single-bit)
+ context value for the lookahead character. */
+#define NEWLINE_CONSTRAINT(constraint) (((constraint) >> 8) & 0xf)
+#define LETTER_CONSTRAINT(constraint) (((constraint) >> 4) & 0xf)
+#define OTHER_CONSTRAINT(constraint) ((constraint) & 0xf)
+
+#define SUCCEEDS_IN_CONTEXT(constraint, prev, curr) \
+ ((((curr) & CTX_NONE ? OTHER_CONSTRAINT (constraint) : 0) \
+ | ((curr) & CTX_LETTER ? LETTER_CONSTRAINT (constraint) : 0) \
+ | ((curr) & CTX_NEWLINE ? NEWLINE_CONSTRAINT (constraint) : 0)) \
+ & (prev))
+
+/* The following macros describe what a constraint depends on. */
+#define PREV_NEWLINE_CONSTRAINT(constraint) (((constraint) >> 2) & 0x111)
+#define PREV_LETTER_CONSTRAINT(constraint) (((constraint) >> 1) & 0x111)
+#define PREV_OTHER_CONSTRAINT(constraint) ((constraint) & 0x111)
+
+#define PREV_NEWLINE_DEPENDENT(constraint) \
+ (PREV_NEWLINE_CONSTRAINT (constraint) != PREV_OTHER_CONSTRAINT (constraint))
+#define PREV_LETTER_DEPENDENT(constraint) \
+ (PREV_LETTER_CONSTRAINT (constraint) != PREV_OTHER_CONSTRAINT (constraint))
+
+/* Tokens that match the empty string subject to some constraint actually
+ work by applying that constraint to determine what may follow them,
+ taking into account what has gone before. The following values are
+ the constraints corresponding to the special tokens previously defined. */
+#define NO_CONSTRAINT 0x777
+#define BEGLINE_CONSTRAINT 0x444
+#define ENDLINE_CONSTRAINT 0x700
+#define BEGWORD_CONSTRAINT 0x050
+#define ENDWORD_CONSTRAINT 0x202
+#define LIMWORD_CONSTRAINT 0x252
+#define NOTLIMWORD_CONSTRAINT 0x525
+
+/* The regexp is parsed into an array of tokens in postfix form. Some tokens
+ are operators and others are terminal symbols. Most (but not all) of these
+ codes are returned by the lexical analyzer. */
+
+typedef ptrdiff_t token;
+#define TOKEN_MAX PTRDIFF_MAX
+
+/* States are indexed by state_num values. These are normally
+ nonnegative but -1 is used as a special value. */
+typedef ptrdiff_t state_num;
+
+/* Predefined token values. */
+enum
+{
+ END = -1, /* END is a terminal symbol that matches the
+ end of input; any value of END or less in
+ the parse tree is such a symbol. Accepting
+ states of the DFA are those that would have
+ a transition on END. */
+
+ /* Ordinary character values are terminal symbols that match themselves. */
+
+ EMPTY = NOTCHAR, /* EMPTY is a terminal symbol that matches
+ the empty string. */
+
+ BACKREF, /* BACKREF is generated by \<digit>
+ or by any other construct that
+ is not completely handled. If the scanner
+ detects a transition on backref, it returns
+ a kind of "semi-success" indicating that
+ the match will have to be verified with
+ a backtracking matcher. */
+
+ BEGLINE, /* BEGLINE is a terminal symbol that matches
+ the empty string at the beginning of a
+ line. */
+
+ ENDLINE, /* ENDLINE is a terminal symbol that matches
+ the empty string at the end of a line. */
+
+ BEGWORD, /* BEGWORD is a terminal symbol that matches
+ the empty string at the beginning of a
+ word. */
+
+ ENDWORD, /* ENDWORD is a terminal symbol that matches
+ the empty string at the end of a word. */
+
+ LIMWORD, /* LIMWORD is a terminal symbol that matches
+ the empty string at the beginning or the
+ end of a word. */
+
+ NOTLIMWORD, /* NOTLIMWORD is a terminal symbol that
+ matches the empty string not at
+ the beginning or end of a word. */
+
+ QMARK, /* QMARK is an operator of one argument that
+ matches zero or one occurrences of its
+ argument. */
+
+ STAR, /* STAR is an operator of one argument that
+ matches the Kleene closure (zero or more
+ occurrences) of its argument. */
+
+ PLUS, /* PLUS is an operator of one argument that
+ matches the positive closure (one or more
+ occurrences) of its argument. */
+
+ REPMN, /* REPMN is a lexical token corresponding
+ to the {m,n} construct. REPMN never
+ appears in the compiled token vector. */
+
+ CAT, /* CAT is an operator of two arguments that
+ matches the concatenation of its
+ arguments. CAT is never returned by the
+ lexical analyzer. */
+
+ OR, /* OR is an operator of two arguments that
+ matches either of its arguments. */
+
+ LPAREN, /* LPAREN never appears in the parse tree,
+ it is only a lexeme. */
+
+ RPAREN, /* RPAREN never appears in the parse tree. */
+
+ ANYCHAR, /* ANYCHAR is a terminal symbol that matches
+ a valid multibyte (or single byte) character.
+ It is used only if MB_CUR_MAX > 1. */
+
+ MBCSET, /* MBCSET is similar to CSET, but for
+ multibyte characters. */
+
+ WCHAR, /* Only returned by lex. wctok contains
+ the wide character representation. */
+
+ CSET /* CSET and (and any value greater) is a
+ terminal symbol that matches any of a
+ class of characters. */
+};
+
+
+/* States of the recognizer correspond to sets of positions in the parse
+ tree, together with the constraints under which they may be matched.
+ So a position is encoded as an index into the parse tree together with
+ a constraint. */
+typedef struct
+{
+ size_t index; /* Index into the parse array. */
+ unsigned int constraint; /* Constraint for matching this position. */
+} position;
+
+/* Sets of positions are stored as arrays. */
+typedef struct
+{
+ position *elems; /* Elements of this position set. */
+ ptrdiff_t nelem; /* Number of elements in this set. */
+ ptrdiff_t alloc; /* Number of elements allocated in ELEMS. */
+} position_set;
+
+/* Sets of leaves are also stored as arrays. */
+typedef struct
+{
+ size_t *elems; /* Elements of this position set. */
+ size_t nelem; /* Number of elements in this set. */
+} leaf_set;
+
+/* A state of the dfa consists of a set of positions, some flags,
+ and the token value of the lowest-numbered position of the state that
+ contains an END token. */
+typedef struct
+{
+ size_t hash; /* Hash of the positions of this state. */
+ position_set elems; /* Positions this state could match. */
+ unsigned char context; /* Context from previous state. */
+ unsigned short constraint; /* Constraint for this state to accept. */
+ token first_end; /* Token value of the first END in elems. */
+ position_set mbps; /* Positions which can match multibyte
+ characters or the follows, e.g., period.
+ Used only if MB_CUR_MAX > 1. */
+ state_num mb_trindex; /* Index of this state in MB_TRANS, or
+ negative if the state does not have
+ ANYCHAR. */
+} dfa_state;
+
+/* Maximum for any transition table count. This should be at least 3,
+ for the initial state setup. */
+enum { MAX_TRCOUNT = 1024 };
+
+/* A bracket operator.
+ e.g., [a-c], [[:alpha:]], etc. */
+struct mb_char_classes
+{
+ ptrdiff_t cset;
+ bool invert;
+ wchar_t *chars; /* Normal characters. */
+ ptrdiff_t nchars;
+};
+
+struct regex_syntax
+{
+ /* Syntax bits controlling the behavior of the lexical analyzer. */
+ reg_syntax_t syntax_bits;
+ bool syntax_bits_set;
+
+ /* Flag for case-folding letters into sets. */
+ bool case_fold;
+
+ /* True if ^ and $ match only the start and end of data, and do not match
+ end-of-line within data. */
+ bool anchor;
+
+ /* End-of-line byte in data. */
+ unsigned char eolbyte;
+
+ /* Cache of char-context values. */
+ int sbit[NOTCHAR];
+
+ /* If never_trail[B], the byte B cannot be a non-initial byte in a
+ multibyte character. */
+ bool never_trail[NOTCHAR];
+
+ /* Set of characters considered letters. */
+ charclass letters;
+
+ /* Set of characters that are newline. */
+ charclass newline;
+};
+
+/* Lexical analyzer. All the dross that deals with the obnoxious
+ GNU Regex syntax bits is located here. The poor, suffering
+ reader is referred to the GNU Regex documentation for the
+ meaning of the @#%!@#%^!@ syntax bits. */
+struct lexer_state
+{
+ char const *ptr; /* Pointer to next input character. */
+ size_t left; /* Number of characters remaining. */
+ token lasttok; /* Previous token returned; initially END. */
+ size_t parens; /* Count of outstanding left parens. */
+ int minrep, maxrep; /* Repeat counts for {m,n}. */
+
+ /* Wide character representation of the current multibyte character,
+ or WEOF if there was an encoding error. Used only if
+ MB_CUR_MAX > 1. */
+ wint_t wctok;
+
+ /* Length of the multibyte representation of wctok. */
+ int cur_mb_len;
+
+ /* We're separated from beginning or (, | only by zero-width characters. */
+ bool laststart;
+};
+
+/* Recursive descent parser for regular expressions. */
+
+struct parser_state
+{
+ token tok; /* Lookahead token. */
+ size_t depth; /* Current depth of a hypothetical stack
+ holding deferred productions. This is
+ used to determine the depth that will be
+ required of the real stack later on in
+ dfaanalyze. */
+};
+
+/* A compiled regular expression. */
+struct dfa
+{
+ /* Syntax configuration */
+ struct regex_syntax syntax;
+
+ /* Fields filled by the scanner. */
+ charclass *charclasses; /* Array of character sets for CSET tokens. */
+ ptrdiff_t cindex; /* Index for adding new charclasses. */
+ ptrdiff_t calloc; /* Number of charclasses allocated. */
+ size_t canychar; /* Index of anychar class, or (size_t) -1. */
+
+ /* Scanner state */
+ struct lexer_state lex;
+
+ /* Parser state */
+ struct parser_state parse;
+
+ /* Fields filled by the parser. */
+ token *tokens; /* Postfix parse array. */
+ size_t tindex; /* Index for adding new tokens. */
+ size_t talloc; /* Number of tokens currently allocated. */
+ size_t depth; /* Depth required of an evaluation stack
+ used for depth-first traversal of the
+ parse tree. */
+ size_t nleaves; /* Number of leaves on the parse tree. */
+ size_t nregexps; /* Count of parallel regexps being built
+ with dfaparse. */
+ bool fast; /* The DFA is fast. */
+ token utf8_anychar_classes[5]; /* To lower ANYCHAR in UTF-8 locales. */
+ mbstate_t mbs; /* Multibyte conversion state. */
+
+ /* The following are valid only if MB_CUR_MAX > 1. */
+
+ /* The value of multibyte_prop[i] is defined by following rule.
+ if tokens[i] < NOTCHAR
+ bit 0 : tokens[i] is the first byte of a character, including
+ single-byte characters.
+ bit 1 : tokens[i] is the last byte of a character, including
+ single-byte characters.
+
+ if tokens[i] = MBCSET
+ ("the index of mbcsets corresponding to this operator" << 2) + 3
+
+ e.g.
+ tokens
+ = 'single_byte_a', 'multi_byte_A', single_byte_b'
+ = 'sb_a', 'mb_A(1st byte)', 'mb_A(2nd byte)', 'mb_A(3rd byte)', 'sb_b'
+ multibyte_prop
+ = 3 , 1 , 0 , 2 , 3
+ */
+ int *multibyte_prop;
+
+ /* Array of the bracket expression in the DFA. */
+ struct mb_char_classes *mbcsets;
+ ptrdiff_t nmbcsets;
+ ptrdiff_t mbcsets_alloc;
+
+ /* Fields filled by the superset. */
+ struct dfa *superset; /* Hint of the dfa. */
+
+ /* Fields filled by the state builder. */
+ dfa_state *states; /* States of the dfa. */
+ state_num sindex; /* Index for adding new states. */
+ ptrdiff_t salloc; /* Number of states currently allocated. */
+
+ /* Fields filled by the parse tree->NFA conversion. */
+ position_set *follows; /* Array of follow sets, indexed by position
+ index. The follow of a position is the set
+ of positions containing characters that
+ could conceivably follow a character
+ matching the given position in a string
+ matching the regexp. Allocated to the
+ maximum possible position index. */
+ bool searchflag; /* We are supposed to build a searching
+ as opposed to an exact matcher. A searching
+ matcher finds the first and shortest string
+ matching a regexp anywhere in the buffer,
+ whereas an exact matcher finds the longest
+ string matching, but anchored to the
+ beginning of the buffer. */
+
+ /* Fields filled by dfaexec. */
+ state_num tralloc; /* Number of transition tables that have
+ slots so far, not counting trans[-1] and
+ trans[-2]. */
+ int trcount; /* Number of transition tables that have
+ been built, other than for initial
+ states. */
+ int min_trcount; /* Number of initial states. Equivalently,
+ the minimum state number for which trcount
+ counts transitions. */
+ state_num **trans; /* Transition tables for states that can
+ never accept. If the transitions for a
+ state have not yet been computed, or the
+ state could possibly accept, its entry in
+ this table is NULL. This points to two
+ past the start of the allocated array,
+ and trans[-1] and trans[-2] are always
+ NULL. */
+ state_num **fails; /* Transition tables after failing to accept
+ on a state that potentially could do so.
+ If trans[i] is non-null, fails[i] must
+ be null. */
+ int *success; /* Table of acceptance conditions used in
+ dfaexec and computed in build_state. */
+ state_num *newlines; /* Transitions on newlines. The entry for a
+ newline in any transition table is always
+ -1 so we can count lines without wasting
+ too many cycles. The transition for a
+ newline is stored separately and handled
+ as a special case. Newline is also used
+ as a sentinel at the end of the buffer. */
+ state_num initstate_notbol; /* Initial state for CTX_LETTER and CTX_NONE
+ context in multibyte locales, in which we
+ do not distinguish between their contexts,
+ as not supported word. */
+ position_set mb_follows; /* Follow set added by ANYCHAR on demand. */
+ state_num **mb_trans; /* Transition tables for states with
+ ANYCHAR. */
+ state_num mb_trcount; /* Number of transition tables for states with
+ ANYCHAR that have actually been built. */
+
+ /* Information derived from the locale. This is at the end so that
+ a quick memset need not clear it specially. */
+
+ /* dfaexec implementation. */
+ char *(*dfaexec) (struct dfa *, char const *, char *,
+ 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. */
+ bool simple_locale;
+
+ /* Other cached information derived from the locale. */
+ struct localeinfo localeinfo;
+};
+
+/* Some macros for user access to dfa internals. */
+
+/* S could possibly be an accepting state of R. */
+#define ACCEPTING(s, r) ((r).states[s].constraint)
+
+/* STATE accepts in the specified context. */
+#define ACCEPTS_IN_CONTEXT(prev, curr, state, dfa) \
+ SUCCEEDS_IN_CONTEXT ((dfa).states[state].constraint, prev, curr)
+
+static void regexp (struct dfa *dfa);
+
+/* Store into *PWC the result of converting the leading bytes of the
+ multibyte buffer S of length N bytes, using D->localeinfo.sbctowc
+ and updating the conversion state in *D. On conversion error,
+ convert just a single byte, to WEOF. Return the number of bytes
+ converted.
+
+ This differs from mbrtowc (PWC, S, N, &D->mbs) as follows:
+
+ * PWC points to wint_t, not to wchar_t.
+ * The last arg is a dfa *D instead of merely a multibyte conversion
+ state D->mbs.
+ * N must be at least 1.
+ * S[N - 1] must be a sentinel byte.
+ * Shift encodings are not supported.
+ * The return value is always in the range 1..N.
+ * D->mbs is always valid afterwards.
+ * *PWC is always set to something. */
+static size_t
+mbs_to_wchar (wint_t *pwc, char const *s, size_t n, struct dfa *d)
+{
+ unsigned char uc = s[0];
+ wint_t wc = d->localeinfo.sbctowc[uc];
+
+ if (wc == WEOF)
+ {
+ wchar_t wch;
+ size_t nbytes = mbrtowc (&wch, s, n, &d->mbs);
+ if (0 < nbytes && nbytes < (size_t) -2)
+ {
+ *pwc = wch;
+ return nbytes;
+ }
+ memset (&d->mbs, 0, sizeof d->mbs);
+ }
+
+ *pwc = wc;
+ return 1;
+}
+
+#ifdef DEBUG
+
+static void
+prtok (token t)
+{
+ char const *s;
+
+ if (t < 0)
+ fprintf (stderr, "END");
+ else if (t < NOTCHAR)
+ {
+ unsigned int ch = t;
+ fprintf (stderr, "0x%02x", ch);
+ }
+ else
+ {
+ switch (t)
+ {
+ case EMPTY:
+ s = "EMPTY";
+ break;
+ case BACKREF:
+ s = "BACKREF";
+ break;
+ case BEGLINE:
+ s = "BEGLINE";
+ break;
+ case ENDLINE:
+ s = "ENDLINE";
+ break;
+ case BEGWORD:
+ s = "BEGWORD";
+ break;
+ case ENDWORD:
+ s = "ENDWORD";
+ break;
+ case LIMWORD:
+ s = "LIMWORD";
+ break;
+ case NOTLIMWORD:
+ s = "NOTLIMWORD";
+ break;
+ case QMARK:
+ s = "QMARK";
+ break;
+ case STAR:
+ s = "STAR";
+ break;
+ case PLUS:
+ s = "PLUS";
+ break;
+ case CAT:
+ s = "CAT";
+ break;
+ case OR:
+ s = "OR";
+ break;
+ case LPAREN:
+ s = "LPAREN";
+ break;
+ case RPAREN:
+ s = "RPAREN";
+ break;
+ case ANYCHAR:
+ s = "ANYCHAR";
+ break;
+ case MBCSET:
+ s = "MBCSET";
+ break;
+ default:
+ s = "CSET";
+ break;
+ }
+ fprintf (stderr, "%s", s);
+ }
+}
+#endif /* DEBUG */
+
+/* Stuff pertaining to charclasses. */
+
+static bool
+tstbit (unsigned int b, charclass const c)
+{
+ return c[b / CHARCLASS_WORD_BITS] >> b % CHARCLASS_WORD_BITS & 1;
+}
+
+static void
+setbit (unsigned int b, charclass c)
+{
+ c[b / CHARCLASS_WORD_BITS] |= (charclass_word) 1 << b % CHARCLASS_WORD_BITS;
+}
+
+static void
+clrbit (unsigned int b, charclass c)
+{
+ c[b / CHARCLASS_WORD_BITS] &= ~((charclass_word) 1
+ << b % CHARCLASS_WORD_BITS);
+}
+
+static void
+copyset (charclass const src, charclass dst)
+{
+ memcpy (dst, src, sizeof (charclass));
+}
+
+static void
+zeroset (charclass s)
+{
+ memset (s, 0, sizeof (charclass));
+}
+
+static void
+fillset (charclass s)
+{
+ int i;
+ for (i = 0; i < CHARCLASS_WORDS; i++)
+ s[i] = CHARCLASS_WORD_MASK;
+}
+
+static void
+notset (charclass s)
+{
+ int i;
+ for (i = 0; i < CHARCLASS_WORDS; ++i)
+ s[i] = CHARCLASS_WORD_MASK & ~s[i];
+}
+
+static bool
+equal (charclass const s1, charclass const s2)
+{
+ charclass_word w = 0;
+ int i;
+ for (i = 0; i < CHARCLASS_WORDS; i++)
+ w |= s1[i] ^ s2[i];
+ return w == 0;
+}
+
+static bool
+emptyset (charclass const s)
+{
+ charclass_word w = 0;
+ int i;
+ for (i = 0; i < CHARCLASS_WORDS; i++)
+ w |= s[i];
+ return w == 0;
+}
+
+/* Grow PA, which points to an array of *NITEMS items, and return the
+ location of the reallocated array, updating *NITEMS to reflect its
+ new size. The new array will contain at least NITEMS_INCR_MIN more
+ items, but will not contain more than NITEMS_MAX items total.
+ ITEM_SIZE is the size of each item, in bytes.
+
+ ITEM_SIZE and NITEMS_INCR_MIN must be positive. *NITEMS must be
+ nonnegative. If NITEMS_MAX is -1, it is treated as if it were
+ infinity.
+
+ If PA is null, then allocate a new array instead of reallocating
+ the old one.
+
+ Thus, to grow an array A without saving its old contents, do
+ { free (A); A = xpalloc (NULL, &AITEMS, ...); }. */
+
+static void *
+xpalloc (void *pa, ptrdiff_t *nitems, ptrdiff_t nitems_incr_min,
+ ptrdiff_t nitems_max, ptrdiff_t item_size)
+{
+ ptrdiff_t n0 = *nitems;
+
+ /* The approximate size to use for initial small allocation
+ requests. This is the largest "small" request for the GNU C
+ library malloc. */
+ enum { DEFAULT_MXFAST = 64 * sizeof (size_t) / 4 };
+
+ /* If the array is tiny, grow it to about (but no greater than)
+ DEFAULT_MXFAST bytes. Otherwise, grow it by about 50%.
+ Adjust the growth according to three constraints: NITEMS_INCR_MIN,
+ NITEMS_MAX, and what the C language can represent safely. */
+
+ ptrdiff_t n, nbytes;
+ if (INT_ADD_WRAPV (n0, n0 >> 1, &n))
+ n = PTRDIFF_MAX;
+ if (0 <= nitems_max && nitems_max < n)
+ n = nitems_max;
+
+ ptrdiff_t adjusted_nbytes
+ = ((INT_MULTIPLY_WRAPV (n, item_size, &nbytes) || SIZE_MAX < nbytes)
+ ? MIN (PTRDIFF_MAX, SIZE_MAX)
+ : nbytes < DEFAULT_MXFAST ? DEFAULT_MXFAST : 0);
+ if (adjusted_nbytes)
+ {
+ n = adjusted_nbytes / item_size;
+ nbytes = adjusted_nbytes - adjusted_nbytes % item_size;
+ }
+
+ if (! pa)
+ *nitems = 0;
+ if (n - n0 < nitems_incr_min
+ && (INT_ADD_WRAPV (n0, nitems_incr_min, &n)
+ || (0 <= nitems_max && nitems_max < n)
+ || INT_MULTIPLY_WRAPV (n, item_size, &nbytes)))
+ xalloc_die ();
+ pa = xrealloc (pa, nbytes);
+ *nitems = n;
+ return pa;
+}
+
+/* Ensure that the array addressed by PA holds at least I + 1 items.
+ Either return PA, or reallocate the array and return its new address.
+ Although PA may be null, the returned value is never null.
+
+ The array holds *NITEMS items, where 0 <= I <= *NITEMS; *NITEMS
+ is updated on reallocation. If PA is null, *NITEMS must be zero.
+ Do not allocate more than NITEMS_MAX items total; -1 means no limit.
+ ITEM_SIZE is the size of one item; it must be positive.
+ Avoid O(N**2) behavior on arrays growing linearly. */
+static void *
+maybe_realloc (void *pa, ptrdiff_t i, ptrdiff_t *nitems,
+ ptrdiff_t nitems_max, ptrdiff_t item_size)
+{
+ if (i < *nitems)
+ return pa;
+ return xpalloc (pa, nitems, 1, nitems_max, item_size);
+}
+
+/* In DFA D, find the index of charclass S, or allocate a new one. */
+static ptrdiff_t
+charclass_index (struct dfa *d, charclass const s)
+{
+ ptrdiff_t i;
+
+ for (i = 0; i < d->cindex; ++i)
+ if (equal (s, d->charclasses[i]))
+ return i;
+ d->charclasses = maybe_realloc (d->charclasses, d->cindex, &d->calloc,
+ TOKEN_MAX - CSET, sizeof *d->charclasses);
+ ++d->cindex;
+ copyset (s, d->charclasses[i]);
+ return i;
+}
+
+static bool
+unibyte_word_constituent (struct dfa const *dfa, unsigned char c)
+{
+ return dfa->localeinfo.sbctowc[c] != WEOF && (isalnum (c) || (c) == '_');
+}
+
+static int
+char_context (struct dfa const *dfa, unsigned char c)
+{
+ if (c == dfa->syntax.eolbyte && !dfa->syntax.anchor)
+ return CTX_NEWLINE;
+ if (unibyte_word_constituent (dfa, c))
+ return CTX_LETTER;
+ return CTX_NONE;
+}
+
+/* Set a bit in the charclass for the given wchar_t. Do nothing if WC
+ is represented by a multi-byte sequence. Even for MB_CUR_MAX == 1,
+ this may happen when folding case in weird Turkish locales where
+ dotless i/dotted I are not included in the chosen character set.
+ Return whether a bit was set in the charclass. */
+static bool
+setbit_wc (wint_t wc, charclass c)
+{
+ int b = wctob (wc);
+ if (b == EOF)
+ return false;
+
+ setbit (b, c);
+ return true;
+}
+
+/* Set a bit for B and its case variants in the charclass C.
+ MB_CUR_MAX must be 1. */
+static void
+setbit_case_fold_c (int b, charclass c)
+{
+ int ub = toupper (b);
+ int i;
+ for (i = 0; i < NOTCHAR; i++)
+ if (toupper (i) == ub)
+ setbit (i, c);
+}
+
+/* Return true if the locale compatible with the C locale. */
+
+static bool
+using_simple_locale (bool multibyte)
+{
+ /* The native character set is known to be compatible with
+ the C locale. The following test isn't perfect, but it's good
+ enough in practice, as only ASCII and EBCDIC are in common use
+ and this test correctly accepts ASCII and rejects EBCDIC. */
+ enum { native_c_charset =
+ ('\b' == 8 && '\t' == 9 && '\n' == 10 && '\v' == 11 && '\f' == 12
+ && '\r' == 13 && ' ' == 32 && '!' == 33 && '"' == 34 && '#' == 35
+ && '%' == 37 && '&' == 38 && '\'' == 39 && '(' == 40 && ')' == 41
+ && '*' == 42 && '+' == 43 && ',' == 44 && '-' == 45 && '.' == 46
+ && '/' == 47 && '0' == 48 && '9' == 57 && ':' == 58 && ';' == 59
+ && '<' == 60 && '=' == 61 && '>' == 62 && '?' == 63 && 'A' == 65
+ && 'Z' == 90 && '[' == 91 && '\\' == 92 && ']' == 93 && '^' == 94
+ && '_' == 95 && 'a' == 97 && 'z' == 122 && '{' == 123 && '|' == 124
+ && '}' == 125 && '~' == 126)
+ };
+
+ if (!native_c_charset || multibyte)
+ return false;
+ else
+ {
+ /* Treat C and POSIX locales as being compatible. Also, treat
+ errors as compatible, as these are invariably from stubs. */
+ char const *loc = setlocale (LC_ALL, NULL);
+ return !loc || STREQ (loc, "C") || STREQ (loc, "POSIX");
+ }
+}
+
+/* Fetch the next lexical input character. Set C (of type int) to the
+ next input byte, except set C to EOF if the input is a multibyte
+ character of length greater than 1. Set WC (of type wint_t) to the
+ value of the input if it is a valid multibyte character (possibly
+ of length 1); otherwise set WC to WEOF. If there is no more input,
+ report EOFERR if EOFERR is not null, and return lasttok = END
+ otherwise. */
+# define FETCH_WC(dfa, c, wc, eoferr) \
+ do { \
+ if (! (dfa)->lex.left) \
+ { \
+ if ((eoferr) != 0) \
+ dfaerror (eoferr); \
+ else \
+ return (dfa)->lex.lasttok = END; \
+ } \
+ else \
+ { \
+ wint_t _wc; \
+ size_t nbytes = mbs_to_wchar (&_wc, (dfa)->lex.ptr, \
+ (dfa)->lex.left, dfa); \
+ (dfa)->lex.cur_mb_len = nbytes; \
+ (wc) = _wc; \
+ (c) = nbytes == 1 ? to_uchar ((dfa)->lex.ptr[0]) : EOF; \
+ (dfa)->lex.ptr += nbytes; \
+ (dfa)->lex.left -= nbytes; \
+ } \
+ } while (false)
+
+typedef int predicate (int);
+
+/* The following list maps the names of the Posix named character classes
+ to predicate functions that determine whether a given character is in
+ the class. The leading [ has already been eaten by the lexical
+ analyzer. */
+struct dfa_ctype
+{
+ const char *name;
+ predicate *func;
+ bool single_byte_only;
+};
+
+static const struct dfa_ctype prednames[] = {
+ {"alpha", isalpha, false},
+ {"upper", isupper, false},
+ {"lower", islower, false},
+ {"digit", isdigit, true},
+ {"xdigit", isxdigit, false},
+ {"space", isspace, false},
+ {"punct", ispunct, false},
+ {"alnum", isalnum, false},
+ {"print", isprint, false},
+ {"graph", isgraph, false},
+ {"cntrl", iscntrl, false},
+ {"blank", isblank, false},
+ {NULL, NULL, false}
+};
+
+static const struct dfa_ctype *_GL_ATTRIBUTE_PURE
+find_pred (const char *str)
+{
+ unsigned int i;
+ for (i = 0; prednames[i].name; ++i)
+ if (STREQ (str, prednames[i].name))
+ return &prednames[i];
+ return NULL;
+}
+
+/* Multibyte character handling sub-routine for lex.
+ Parse a bracket expression and build a struct mb_char_classes. */
+static token
+parse_bracket_exp (struct dfa *dfa)
+{
+ bool invert;
+ int c, c1, c2;
+ charclass ccl;
+
+ /* This is a bracket expression that dfaexec is known to
+ process correctly. */
+ bool known_bracket_exp = true;
+
+ /* Used to warn about [:space:].
+ Bit 0 = first character is a colon.
+ Bit 1 = last character is a colon.
+ Bit 2 = includes any other character but a colon.
+ Bit 3 = includes ranges, char/equiv classes or collation elements. */
+ int colon_warning_state;
+
+ wint_t wc;
+ wint_t wc2;
+ wint_t wc1 = 0;
+
+ /* Work area to build a mb_char_classes. */
+ struct mb_char_classes *work_mbc;
+ ptrdiff_t chars_al;
+
+ chars_al = 0;
+ if (dfa->localeinfo.multibyte)
+ {
+ dfa->mbcsets = maybe_realloc (dfa->mbcsets, dfa->nmbcsets,
+ &dfa->mbcsets_alloc, -1,
+ sizeof *dfa->mbcsets);
+
+ /* dfa->multibyte_prop[] hold the index of dfa->mbcsets.
+ We will update dfa->multibyte_prop[] in addtok, because we can't
+ decide the index in dfa->tokens[]. */
+
+ /* Initialize work area. */
+ work_mbc = &dfa->mbcsets[dfa->nmbcsets++];
+ memset (work_mbc, 0, sizeof *work_mbc);
+ }
+ else
+ work_mbc = NULL;
+
+ memset (ccl, 0, sizeof ccl);
+ FETCH_WC (dfa, c, wc, _("unbalanced ["));
+ if (c == '^')
+ {
+ FETCH_WC (dfa, c, wc, _("unbalanced ["));
+ invert = true;
+ known_bracket_exp = dfa->simple_locale;
+ }
+ else
+ invert = false;
+
+ colon_warning_state = (c == ':');
+ do
+ {
+ c1 = NOTCHAR; /* Mark c1 as not initialized. */
+ colon_warning_state &= ~2;
+
+ /* Note that if we're looking at some other [:...:] construct,
+ we just treat it as a bunch of ordinary characters. We can do
+ this because we assume regex has checked for syntax errors before
+ dfa is ever called. */
+ if (c == '[')
+ {
+ FETCH_WC (dfa, c1, wc1, _("unbalanced ["));
+
+ if ((c1 == ':' && (dfa->syntax.syntax_bits & RE_CHAR_CLASSES))
+ || c1 == '.' || c1 == '=')
+ {
+ enum { MAX_BRACKET_STRING_LEN = 32 };
+ char str[MAX_BRACKET_STRING_LEN + 1];
+ size_t len = 0;
+ for (;;)
+ {
+ FETCH_WC (dfa, c, wc, _("unbalanced ["));
+ if (dfa->lex.left == 0
+ || (c == c1 && dfa->lex.ptr[0] == ']'))
+ break;
+ if (len < MAX_BRACKET_STRING_LEN)
+ str[len++] = c;
+ else
+ /* This is in any case an invalid class name. */
+ str[0] = '\0';
+ }
+ str[len] = '\0';
+
+ /* Fetch bracket. */
+ FETCH_WC (dfa, c, wc, _("unbalanced ["));
+ if (c1 == ':')
+ /* Build character class. POSIX allows character
+ classes to match multicharacter collating elements,
+ but the regex code does not support that, so do not
+ worry about that possibility. */
+ {
+ char const *class
+ = (dfa->syntax.case_fold && (STREQ (str, "upper")
+ || STREQ (str, "lower"))
+ ? "alpha" : str);
+ const struct dfa_ctype *pred = find_pred (class);
+ if (!pred)
+ dfaerror (_("invalid character class"));
+
+ if (dfa->localeinfo.multibyte && !pred->single_byte_only)
+ known_bracket_exp = false;
+ else
+ for (c2 = 0; c2 < NOTCHAR; ++c2)
+ if (pred->func (c2))
+ setbit (c2, ccl);
+ }
+ else
+ known_bracket_exp = false;
+
+ colon_warning_state |= 8;
+
+ /* Fetch new lookahead character. */
+ FETCH_WC (dfa, c1, wc1, _("unbalanced ["));
+ continue;
+ }
+
+ /* We treat '[' as a normal character here. c/c1/wc/wc1
+ are already set up. */
+ }
+
+ if (c == '\\' && (dfa->syntax.syntax_bits & RE_BACKSLASH_ESCAPE_IN_LISTS))
+ FETCH_WC (dfa, c, wc, _("unbalanced ["));
+
+ if (c1 == NOTCHAR)
+ FETCH_WC (dfa, c1, wc1, _("unbalanced ["));
+
+ if (c1 == '-')
+ /* build range characters. */
+ {
+ FETCH_WC (dfa, c2, wc2, _("unbalanced ["));
+
+ /* A bracket expression like [a-[.aa.]] matches an unknown set.
+ Treat it like [-a[.aa.]] while parsing it, and
+ remember that the set is unknown. */
+ if (c2 == '[' && dfa->lex.ptr[0] == '.')
+ {
+ known_bracket_exp = false;
+ c2 = ']';
+ }
+
+ if (c2 == ']')
+ {
+ /* In the case [x-], the - is an ordinary hyphen,
+ which is left in c1, the lookahead character. */
+ dfa->lex.ptr -= dfa->lex.cur_mb_len;
+ dfa->lex.left += dfa->lex.cur_mb_len;
+ }
+ else
+ {
+ if (c2 == '\\' && (dfa->syntax.syntax_bits
+ & RE_BACKSLASH_ESCAPE_IN_LISTS))
+ FETCH_WC (dfa, c2, wc2, _("unbalanced ["));
+
+ colon_warning_state |= 8;
+ FETCH_WC (dfa, c1, wc1, _("unbalanced ["));
+
+ /* 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)
+ {
+ 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);
+ }
+ }
+ }
+ else
+ known_bracket_exp = false;
+
+ continue;
+ }
+ }
+ }
+
+ colon_warning_state |= (c == ':') ? 2 : 4;
+
+ if (!dfa->localeinfo.multibyte)
+ {
+ if (dfa->syntax.case_fold)
+ setbit_case_fold_c (c, ccl);
+ else
+ setbit (c, ccl);
+ continue;
+ }
+
+ if (wc == WEOF)
+ known_bracket_exp = false;
+ else
+ {
+ wchar_t folded[CASE_FOLDED_BUFSIZE + 1];
+ unsigned int i;
+ unsigned int n = (dfa->syntax.case_fold
+ ? case_folded_counterparts (wc, folded + 1) + 1
+ : 1);
+ folded[0] = wc;
+ for (i = 0; i < n; i++)
+ if (!setbit_wc (folded[i], ccl))
+ {
+ work_mbc->chars
+ = maybe_realloc (work_mbc->chars, work_mbc->nchars,
+ &chars_al, -1, sizeof *work_mbc->chars);
+ work_mbc->chars[work_mbc->nchars++] = folded[i];
+ }
+ }
+ }
+ while ((wc = wc1, (c = c1) != ']'));
+
+ if (colon_warning_state == 7)
+ dfawarn (_("character class syntax is [[:space:]], not [:space:]"));
+
+ if (! known_bracket_exp)
+ return BACKREF;
+
+ if (dfa->localeinfo.multibyte)
+ {
+ work_mbc->invert = invert;
+ work_mbc->cset = emptyset (ccl) ? -1 : charclass_index (dfa, ccl);
+ return MBCSET;
+ }
+
+ if (invert)
+ {
+ assert (!dfa->localeinfo.multibyte);
+ notset (ccl);
+ if (dfa->syntax.syntax_bits & RE_HAT_LISTS_NOT_NEWLINE)
+ clrbit ('\n', ccl);
+ }
+
+ return CSET + charclass_index (dfa, ccl);
+}
+
+struct lexptr
+{
+ char const *ptr;
+ size_t left;
+};
+
+static void
+push_lex_state (struct dfa *dfa, struct lexptr *ls, char const *s)
+{
+ ls->ptr = dfa->lex.ptr;
+ ls->left = dfa->lex.left;
+ dfa->lex.ptr = s;
+ dfa->lex.left = strlen (s);
+}
+
+static void
+pop_lex_state (struct dfa *dfa, struct lexptr const *ls)
+{
+ dfa->lex.ptr = ls->ptr;
+ dfa->lex.left = ls->left;
+}
+
+static token
+lex (struct dfa *dfa)
+{
+ int c, c2;
+ bool backslash = false;
+ charclass ccl;
+ int i;
+
+ /* Basic plan: We fetch a character. If it's a backslash,
+ we set the backslash flag and go through the loop again.
+ On the plus side, this avoids having a duplicate of the
+ main switch inside the backslash case. On the minus side,
+ it means that just about every case begins with
+ "if (backslash) ...". */
+ for (i = 0; i < 2; ++i)
+ {
+ FETCH_WC (dfa, c, dfa->lex.wctok, NULL);
+
+ switch (c)
+ {
+ case '\\':
+ if (backslash)
+ goto normal_char;
+ if (dfa->lex.left == 0)
+ dfaerror (_("unfinished \\ escape"));
+ backslash = true;
+ break;
+
+ case '^':
+ if (backslash)
+ goto normal_char;
+ if (dfa->syntax.syntax_bits & RE_CONTEXT_INDEP_ANCHORS
+ || dfa->lex.lasttok == END || dfa->lex.lasttok == LPAREN
+ || dfa->lex.lasttok == OR)
+ return dfa->lex.lasttok = BEGLINE;
+ goto normal_char;
+
+ case '$':
+ if (backslash)
+ goto normal_char;
+ if (dfa->syntax.syntax_bits & RE_CONTEXT_INDEP_ANCHORS
+ || dfa->lex.left == 0
+ || ((dfa->lex.left
+ > !(dfa->syntax.syntax_bits & RE_NO_BK_PARENS))
+ && (dfa->lex.ptr[!(dfa->syntax.syntax_bits & RE_NO_BK_PARENS)
+ & (dfa->lex.ptr[0] == '\\')]
+ == ')'))
+ || ((dfa->lex.left
+ > !(dfa->syntax.syntax_bits & RE_NO_BK_VBAR))
+ && (dfa->lex.ptr[!(dfa->syntax.syntax_bits & RE_NO_BK_VBAR)
+ & (dfa->lex.ptr[0] == '\\')]
+ == '|'))
+ || ((dfa->syntax.syntax_bits & RE_NEWLINE_ALT)
+ && dfa->lex.left > 0 && dfa->lex.ptr[0] == '\n'))
+ return dfa->lex.lasttok = ENDLINE;
+ goto normal_char;
+
+ case '1':
+ case '2':
+ case '3':
+ case '4':
+ case '5':
+ case '6':
+ case '7':
+ case '8':
+ case '9':
+ if (backslash && !(dfa->syntax.syntax_bits & RE_NO_BK_REFS))
+ {
+ dfa->lex.laststart = false;
+ return dfa->lex.lasttok = BACKREF;
+ }
+ goto normal_char;
+
+ case '`':
+ if (backslash && !(dfa->syntax.syntax_bits & RE_NO_GNU_OPS))
+ {
+ /* FIXME: should be beginning of string */
+ return dfa->lex.lasttok = BEGLINE;
+ }
+ goto normal_char;
+
+ case '\'':
+ if (backslash && !(dfa->syntax.syntax_bits & RE_NO_GNU_OPS))
+ {
+ /* FIXME: should be end of string */
+ return dfa->lex.lasttok = ENDLINE;
+ }
+ goto normal_char;
+
+ case '<':
+ if (backslash && !(dfa->syntax.syntax_bits & RE_NO_GNU_OPS))
+ return dfa->lex.lasttok = BEGWORD;
+ goto normal_char;
+
+ case '>':
+ if (backslash && !(dfa->syntax.syntax_bits & RE_NO_GNU_OPS))
+ return dfa->lex.lasttok = ENDWORD;
+ goto normal_char;
+
+ case 'b':
+ if (backslash && !(dfa->syntax.syntax_bits & RE_NO_GNU_OPS))
+ return dfa->lex.lasttok = LIMWORD;
+ goto normal_char;
+
+ case 'B':
+ if (backslash && !(dfa->syntax.syntax_bits & RE_NO_GNU_OPS))
+ return dfa->lex.lasttok = NOTLIMWORD;
+ goto normal_char;
+
+ case '?':
+ if (dfa->syntax.syntax_bits & RE_LIMITED_OPS)
+ goto normal_char;
+ if (backslash != ((dfa->syntax.syntax_bits & RE_BK_PLUS_QM) != 0))
+ goto normal_char;
+ if (!(dfa->syntax.syntax_bits & RE_CONTEXT_INDEP_OPS)
+ && dfa->lex.laststart)
+ goto normal_char;
+ return dfa->lex.lasttok = QMARK;
+
+ case '*':
+ if (backslash)
+ goto normal_char;
+ if (!(dfa->syntax.syntax_bits & RE_CONTEXT_INDEP_OPS)
+ && dfa->lex.laststart)
+ goto normal_char;
+ return dfa->lex.lasttok = STAR;
+
+ case '+':
+ if (dfa->syntax.syntax_bits & RE_LIMITED_OPS)
+ goto normal_char;
+ if (backslash != ((dfa->syntax.syntax_bits & RE_BK_PLUS_QM) != 0))
+ goto normal_char;
+ if (!(dfa->syntax.syntax_bits & RE_CONTEXT_INDEP_OPS)
+ && dfa->lex.laststart)
+ goto normal_char;
+ return dfa->lex.lasttok = PLUS;
+
+ case '{':
+ if (!(dfa->syntax.syntax_bits & RE_INTERVALS))
+ goto normal_char;
+ if (backslash != ((dfa->syntax.syntax_bits & RE_NO_BK_BRACES) == 0))
+ goto normal_char;
+ if (!(dfa->syntax.syntax_bits & RE_CONTEXT_INDEP_OPS)
+ && dfa->lex.laststart)
+ goto normal_char;
+
+ /* Cases:
+ {M} - exact count
+ {M,} - minimum count, maximum is infinity
+ {,N} - 0 through N
+ {,} - 0 to infinity (same as '*')
+ {M,N} - M through N */
+ {
+ char const *p = dfa->lex.ptr;
+ char const *lim = p + dfa->lex.left;
+ dfa->lex.minrep = dfa->lex.maxrep = -1;
+ for (; p != lim && ISASCIIDIGIT (*p); p++)
+ dfa->lex.minrep = (dfa->lex.minrep < 0
+ ? *p - '0'
+ : MIN (RE_DUP_MAX + 1,
+ dfa->lex.minrep * 10 + *p - '0'));
+ if (p != lim)
+ {
+ if (*p != ',')
+ dfa->lex.maxrep = dfa->lex.minrep;
+ else
+ {
+ if (dfa->lex.minrep < 0)
+ dfa->lex.minrep = 0;
+ while (++p != lim && ISASCIIDIGIT (*p))
+ dfa->lex.maxrep
+ = (dfa->lex.maxrep < 0
+ ? *p - '0'
+ : MIN (RE_DUP_MAX + 1,
+ dfa->lex.maxrep * 10 + *p - '0'));
+ }
+ }
+ if (! ((! backslash || (p != lim && *p++ == '\\'))
+ && p != lim && *p++ == '}'
+ && 0 <= dfa->lex.minrep
+ && (dfa->lex.maxrep < 0
+ || dfa->lex.minrep <= dfa->lex.maxrep)))
+ {
+ if (dfa->syntax.syntax_bits & RE_INVALID_INTERVAL_ORD)
+ goto normal_char;
+ dfaerror (_("invalid content of \\{\\}"));
+ }
+ if (RE_DUP_MAX < dfa->lex.maxrep)
+ dfaerror (_("regular expression too big"));
+ dfa->lex.ptr = p;
+ dfa->lex.left = lim - p;
+ }
+ dfa->lex.laststart = false;
+ return dfa->lex.lasttok = REPMN;
+
+ case '|':
+ if (dfa->syntax.syntax_bits & RE_LIMITED_OPS)
+ goto normal_char;
+ if (backslash != ((dfa->syntax.syntax_bits & RE_NO_BK_VBAR) == 0))
+ goto normal_char;
+ dfa->lex.laststart = true;
+ return dfa->lex.lasttok = OR;
+
+ case '\n':
+ if (dfa->syntax.syntax_bits & RE_LIMITED_OPS
+ || backslash || !(dfa->syntax.syntax_bits & RE_NEWLINE_ALT))
+ goto normal_char;
+ dfa->lex.laststart = true;
+ return dfa->lex.lasttok = OR;
+
+ case '(':
+ if (backslash != ((dfa->syntax.syntax_bits & RE_NO_BK_PARENS) == 0))
+ goto normal_char;
+ dfa->lex.parens++;
+ dfa->lex.laststart = true;
+ return dfa->lex.lasttok = LPAREN;
+
+ case ')':
+ if (backslash != ((dfa->syntax.syntax_bits & RE_NO_BK_PARENS) == 0))
+ goto normal_char;
+ if (dfa->lex.parens == 0
+ && dfa->syntax.syntax_bits & RE_UNMATCHED_RIGHT_PAREN_ORD)
+ goto normal_char;
+ dfa->lex.parens--;
+ dfa->lex.laststart = false;
+ return dfa->lex.lasttok = RPAREN;
+
+ case '.':
+ if (backslash)
+ goto normal_char;
+ if (dfa->canychar == (size_t) -1)
+ {
+ fillset (ccl);
+ if (!(dfa->syntax.syntax_bits & RE_DOT_NEWLINE))
+ clrbit ('\n', ccl);
+ if (dfa->syntax.syntax_bits & RE_DOT_NOT_NULL)
+ clrbit ('\0', ccl);
+ if (dfa->localeinfo.multibyte)
+ for (c2 = 0; c2 < NOTCHAR; c2++)
+ if (dfa->localeinfo.sbctowc[c2] == WEOF)
+ clrbit (c2, ccl);
+ dfa->canychar = charclass_index (dfa, ccl);
+ }
+ dfa->lex.laststart = false;
+ return dfa->lex.lasttok = (dfa->localeinfo.multibyte
+ ? ANYCHAR
+ : CSET + dfa->canychar);
+
+ case 's':
+ case 'S':
+ if (!backslash || (dfa->syntax.syntax_bits & RE_NO_GNU_OPS))
+ goto normal_char;
+ if (!dfa->localeinfo.multibyte)
+ {
+ zeroset (ccl);
+ for (c2 = 0; c2 < NOTCHAR; ++c2)
+ if (isspace (c2))
+ setbit (c2, ccl);
+ if (c == 'S')
+ notset (ccl);
+ dfa->lex.laststart = false;
+ return dfa->lex.lasttok = CSET + charclass_index (dfa, ccl);
+ }
+
+ /* FIXME: see if optimizing this, as is done with ANYCHAR and
+ add_utf8_anychar, makes sense. */
+
+ /* \s and \S are documented to be equivalent to [[:space:]] and
+ [^[:space:]] respectively, so tell the lexer to process those
+ strings, each minus its "already processed" '['. */
+ {
+ struct lexptr ls;
+ push_lex_state (dfa, &ls, &"^[:space:]]"[c == 's']);
+ dfa->lex.lasttok = parse_bracket_exp (dfa);
+ pop_lex_state (dfa, &ls);
+ }
+
+ dfa->lex.laststart = false;
+ return dfa->lex.lasttok;
+
+ case 'w':
+ case 'W':
+ if (!backslash || (dfa->syntax.syntax_bits & RE_NO_GNU_OPS))
+ goto normal_char;
+
+ if (!dfa->localeinfo.multibyte)
+ {
+ zeroset (ccl);
+ for (c2 = 0; c2 < NOTCHAR; ++c2)
+ if (dfa->syntax.sbit[c2] == CTX_LETTER)
+ setbit (c2, ccl);
+ if (c == 'W')
+ notset (ccl);
+ dfa->lex.laststart = false;
+ return dfa->lex.lasttok = CSET + charclass_index (dfa, ccl);
+ }
+
+ /* FIXME: see if optimizing this, as is done with ANYCHAR and
+ add_utf8_anychar, makes sense. */
+
+ /* \w and \W are documented to be equivalent to [_[:alnum:]] and
+ [^_[:alnum:]] respectively, so tell the lexer to process those
+ strings, each minus its "already processed" '['. */
+ {
+ struct lexptr ls;
+ push_lex_state (dfa, &ls, &"^_[:alnum:]]"[c == 'w']);
+ dfa->lex.lasttok = parse_bracket_exp (dfa);
+ pop_lex_state (dfa, &ls);
+ }
+
+ dfa->lex.laststart = false;
+ return dfa->lex.lasttok;
+
+ case '[':
+ if (backslash)
+ goto normal_char;
+ dfa->lex.laststart = false;
+ return dfa->lex.lasttok = parse_bracket_exp (dfa);
+
+ default:
+ normal_char:
+ dfa->lex.laststart = false;
+ /* For multibyte character sets, folding is done in atom. Always
+ return WCHAR. */
+ if (dfa->localeinfo.multibyte)
+ return dfa->lex.lasttok = WCHAR;
+
+ if (dfa->syntax.case_fold && isalpha (c))
+ {
+ zeroset (ccl);
+ setbit_case_fold_c (c, ccl);
+ return dfa->lex.lasttok = CSET + charclass_index (dfa, ccl);
+ }
+
+ return dfa->lex.lasttok = c;
+ }
+ }
+
+ /* The above loop should consume at most a backslash
+ and some other character. */
+ abort ();
+ return END; /* keeps pedantic compilers happy. */
+}
+
+static void
+addtok_mb (struct dfa *dfa, token t, int mbprop)
+{
+ if (dfa->talloc == dfa->tindex)
+ {
+ dfa->tokens = x2nrealloc (dfa->tokens, &dfa->talloc,
+ sizeof *dfa->tokens);
+ if (dfa->localeinfo.multibyte)
+ dfa->multibyte_prop = xnrealloc (dfa->multibyte_prop, dfa->talloc,
+ sizeof *dfa->multibyte_prop);
+ }
+ if (dfa->localeinfo.multibyte)
+ dfa->multibyte_prop[dfa->tindex] = mbprop;
+ dfa->tokens[dfa->tindex++] = t;
+
+ switch (t)
+ {
+ case QMARK:
+ case STAR:
+ case PLUS:
+ break;
+
+ case CAT:
+ case OR:
+ dfa->parse.depth--;
+ break;
+
+ case BACKREF:
+ dfa->fast = false;
+ /* fallthrough */
+ default:
+ dfa->nleaves++;
+ /* fallthrough */
+ case EMPTY:
+ dfa->parse.depth++;
+ break;
+ }
+ if (dfa->parse.depth > dfa->depth)
+ dfa->depth = dfa->parse.depth;
+}
+
+static void addtok_wc (struct dfa *dfa, wint_t wc);
+
+/* Add the given token to the parse tree, maintaining the depth count and
+ updating the maximum depth if necessary. */
+static void
+addtok (struct dfa *dfa, token t)
+{
+ if (dfa->localeinfo.multibyte && t == MBCSET)
+ {
+ bool need_or = false;
+ struct mb_char_classes *work_mbc = &dfa->mbcsets[dfa->nmbcsets - 1];
+ ptrdiff_t i;
+
+ /* Extract wide characters into alternations for better performance.
+ This does not require UTF-8. */
+ for (i = 0; i < work_mbc->nchars; i++)
+ {
+ addtok_wc (dfa, work_mbc->chars[i]);
+ if (need_or)
+ addtok (dfa, OR);
+ need_or = true;
+ }
+ work_mbc->nchars = 0;
+
+ /* Characters have been handled above, so it is possible
+ that the mbcset is empty now. Do nothing in that case. */
+ if (work_mbc->cset != -1)
+ {
+ addtok (dfa, CSET + work_mbc->cset);
+ if (need_or)
+ addtok (dfa, OR);
+ }
+ }
+ else
+ {
+ addtok_mb (dfa, t, 3);
+ }
+}
+
+/* We treat a multibyte character as a single atom, so that DFA
+ can treat a multibyte character as a single expression.
+
+ e.g., we construct the following tree from "<mb1><mb2>".
+ <mb1(1st-byte)><mb1(2nd-byte)><CAT><mb1(3rd-byte)><CAT>
+ <mb2(1st-byte)><mb2(2nd-byte)><CAT><mb2(3rd-byte)><CAT><CAT> */
+static void
+addtok_wc (struct dfa *dfa, wint_t wc)
+{
+ unsigned char buf[MB_LEN_MAX];
+ mbstate_t s = { 0 };
+ int i;
+ size_t stored_bytes = wcrtomb ((char *) buf, wc, &s);
+
+ if (stored_bytes != (size_t) -1)
+ dfa->lex.cur_mb_len = stored_bytes;
+ else
+ {
+ /* This is merely stop-gap. buf[0] is undefined, yet skipping
+ the addtok_mb call altogether can corrupt the heap. */
+ dfa->lex.cur_mb_len = 1;
+ buf[0] = 0;
+ }
+
+ addtok_mb (dfa, buf[0], dfa->lex.cur_mb_len == 1 ? 3 : 1);
+ for (i = 1; i < dfa->lex.cur_mb_len; i++)
+ {
+ addtok_mb (dfa, buf[i], i == dfa->lex.cur_mb_len - 1 ? 2 : 0);
+ addtok (dfa, CAT);
+ }
+}
+
+static void
+add_utf8_anychar (struct dfa *dfa)
+{
+ static charclass const utf8_classes[5] = {
+ /* 80-bf: non-leading bytes. */
+ CHARCLASS_INIT (0, 0, 0, 0, 0xffffffff, 0xffffffff, 0, 0),
+
+ /* 00-7f: 1-byte sequence. */
+ CHARCLASS_INIT (0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0, 0, 0, 0),
+
+ /* c2-df: 2-byte sequence. */
+ CHARCLASS_INIT (0, 0, 0, 0, 0, 0, 0xfffffffc, 0),
+
+ /* e0-ef: 3-byte sequence. */
+ CHARCLASS_INIT (0, 0, 0, 0, 0, 0, 0, 0xffff),
+
+ /* f0-f7: 4-byte sequence. */
+ CHARCLASS_INIT (0, 0, 0, 0, 0, 0, 0, 0xff0000)
+ };
+ const unsigned int n = sizeof (utf8_classes) / sizeof (utf8_classes[0]);
+ unsigned int i;
+
+ /* Define the five character classes that are needed below. */
+ if (dfa->utf8_anychar_classes[0] == 0)
+ for (i = 0; i < n; i++)
+ {
+ charclass c;
+ copyset (utf8_classes[i], c);
+ if (i == 1)
+ {
+ if (!(dfa->syntax.syntax_bits & RE_DOT_NEWLINE))
+ clrbit ('\n', c);
+ if (dfa->syntax.syntax_bits & RE_DOT_NOT_NULL)
+ clrbit ('\0', c);
+ }
+ dfa->utf8_anychar_classes[i] = CSET + charclass_index (dfa, c);
+ }
+
+ /* A valid UTF-8 character is
+
+ ([0x00-0x7f]
+ |[0xc2-0xdf][0x80-0xbf]
+ |[0xe0-0xef[0x80-0xbf][0x80-0xbf]
+ |[0xf0-f7][0x80-0xbf][0x80-0xbf][0x80-0xbf])
+
+ which I'll write more concisely "B|CA|DAA|EAAA". Factor the [0x00-0x7f]
+ and you get "B|(C|(D|EA)A)A". And since the token buffer is in reverse
+ Polish notation, you get "B C D E A CAT OR A CAT OR A CAT OR". */
+ for (i = 1; i < n; i++)
+ addtok (dfa, dfa->utf8_anychar_classes[i]);
+ while (--i > 1)
+ {
+ addtok (dfa, dfa->utf8_anychar_classes[0]);
+ addtok (dfa, CAT);
+ addtok (dfa, OR);
+ }
+}
+
+/* The grammar understood by the parser is as follows.
+
+ regexp:
+ regexp OR branch
+ branch
+
+ branch:
+ branch closure
+ closure
+
+ closure:
+ closure QMARK
+ closure STAR
+ closure PLUS
+ closure REPMN
+ atom
+
+ atom:
+ <normal character>
+ <multibyte character>
+ ANYCHAR
+ MBCSET
+ CSET
+ BACKREF
+ BEGLINE
+ ENDLINE
+ BEGWORD
+ ENDWORD
+ LIMWORD
+ NOTLIMWORD
+ LPAREN regexp RPAREN
+ <empty>
+
+ The parser builds a parse tree in postfix form in an array of tokens. */
+
+static void
+atom (struct dfa *dfa)
+{
+ if (dfa->parse.tok == WCHAR)
+ {
+ if (dfa->lex.wctok == WEOF)
+ addtok (dfa, BACKREF);
+ else
+ {
+ addtok_wc (dfa, dfa->lex.wctok);
+
+ if (dfa->syntax.case_fold)
+ {
+ wchar_t folded[CASE_FOLDED_BUFSIZE];
+ unsigned int i, n = case_folded_counterparts (dfa->lex.wctok,
+ folded);
+ for (i = 0; i < n; i++)
+ {
+ addtok_wc (dfa, folded[i]);
+ addtok (dfa, OR);
+ }
+ }
+ }
+
+ dfa->parse.tok = lex (dfa);
+ }
+ else if (dfa->parse.tok == ANYCHAR && dfa->localeinfo.using_utf8)
+ {
+ /* For UTF-8 expand the period to a series of CSETs that define a valid
+ UTF-8 character. This avoids using the slow multibyte path. I'm
+ pretty sure it would be both profitable and correct to do it for
+ any encoding; however, the optimization must be done manually as
+ it is done above in add_utf8_anychar. So, let's start with
+ UTF-8: it is the most used, and the structure of the encoding
+ makes the correctness more obvious. */
+ add_utf8_anychar (dfa);
+ dfa->parse.tok = lex (dfa);
+ }
+ else if ((0 <= dfa->parse.tok && dfa->parse.tok < NOTCHAR)
+ || dfa->parse.tok >= CSET || dfa->parse.tok == BACKREF
+ || dfa->parse.tok == BEGLINE || dfa->parse.tok == ENDLINE
+ || dfa->parse.tok == BEGWORD || dfa->parse.tok == ANYCHAR
+ || dfa->parse.tok == MBCSET || dfa->parse.tok == ENDWORD
+ || dfa->parse.tok == LIMWORD || dfa->parse.tok == NOTLIMWORD)
+ {
+ addtok (dfa, dfa->parse.tok);
+ dfa->parse.tok = lex (dfa);
+ }
+ else if (dfa->parse.tok == LPAREN)
+ {
+ dfa->parse.tok = lex (dfa);
+ regexp (dfa);
+ if (dfa->parse.tok != RPAREN)
+ dfaerror (_("unbalanced ("));
+ dfa->parse.tok = lex (dfa);
+ }
+ else
+ addtok (dfa, EMPTY);
+}
+
+/* Return the number of tokens in the given subexpression. */
+static size_t _GL_ATTRIBUTE_PURE
+nsubtoks (struct dfa const *dfa, size_t tindex)
+{
+ size_t ntoks1;
+
+ switch (dfa->tokens[tindex - 1])
+ {
+ default:
+ return 1;
+ case QMARK:
+ case STAR:
+ case PLUS:
+ return 1 + nsubtoks (dfa, tindex - 1);
+ case CAT:
+ case OR:
+ ntoks1 = nsubtoks (dfa, tindex - 1);
+ return 1 + ntoks1 + nsubtoks (dfa, tindex - 1 - ntoks1);
+ }
+}
+
+/* Copy the given subexpression to the top of the tree. */
+static void
+copytoks (struct dfa *dfa, size_t tindex, size_t ntokens)
+{
+ size_t i;
+
+ if (dfa->localeinfo.multibyte)
+ for (i = 0; i < ntokens; ++i)
+ addtok_mb (dfa, dfa->tokens[tindex + i], dfa->multibyte_prop[tindex + i]);
+ else
+ for (i = 0; i < ntokens; ++i)
+ addtok_mb (dfa, dfa->tokens[tindex + i], 3);
+}
+
+static void
+closure (struct dfa *dfa)
+{
+ int i;
+ size_t tindex, ntokens;
+
+ atom (dfa);
+ while (dfa->parse.tok == QMARK || dfa->parse.tok == STAR
+ || dfa->parse.tok == PLUS || dfa->parse.tok == REPMN)
+ if (dfa->parse.tok == REPMN && (dfa->lex.minrep || dfa->lex.maxrep))
+ {
+ ntokens = nsubtoks (dfa, dfa->tindex);
+ tindex = dfa->tindex - ntokens;
+ if (dfa->lex.maxrep < 0)
+ addtok (dfa, PLUS);
+ if (dfa->lex.minrep == 0)
+ addtok (dfa, QMARK);
+ for (i = 1; i < dfa->lex.minrep; i++)
+ {
+ copytoks (dfa, tindex, ntokens);
+ addtok (dfa, CAT);
+ }
+ for (; i < dfa->lex.maxrep; i++)
+ {
+ copytoks (dfa, tindex, ntokens);
+ addtok (dfa, QMARK);
+ addtok (dfa, CAT);
+ }
+ dfa->parse.tok = lex (dfa);
+ }
+ else if (dfa->parse.tok == REPMN)
+ {
+ dfa->tindex -= nsubtoks (dfa, dfa->tindex);
+ dfa->parse.tok = lex (dfa);
+ closure (dfa);
+ }
+ else
+ {
+ addtok (dfa, dfa->parse.tok);
+ dfa->parse.tok = lex (dfa);
+ }
+}
+
+static void
+branch (struct dfa* dfa)
+{
+ closure (dfa);
+ while (dfa->parse.tok != RPAREN && dfa->parse.tok != OR
+ && dfa->parse.tok >= 0)
+ {
+ closure (dfa);
+ addtok (dfa, CAT);
+ }
+}
+
+static void
+regexp (struct dfa *dfa)
+{
+ branch (dfa);
+ while (dfa->parse.tok == OR)
+ {
+ dfa->parse.tok = lex (dfa);
+ branch (dfa);
+ addtok (dfa, OR);
+ }
+}
+
+/* Main entry point for the parser. S is a string to be parsed, len is the
+ length of the string, so s can include NUL characters. D is a pointer to
+ the struct dfa to parse into. */
+static void
+dfaparse (char const *s, size_t len, struct dfa *d)
+{
+ d->lex.ptr = s;
+ d->lex.left = len;
+ d->lex.lasttok = END;
+ d->lex.laststart = true;
+ d->lex.parens = 0;
+ if (d->localeinfo.multibyte)
+ {
+ d->lex.cur_mb_len = 0;
+ memset (&d->mbs, 0, sizeof d->mbs);
+ }
+
+ if (!d->syntax.syntax_bits_set)
+ dfaerror (_("no syntax specified"));
+
+ d->parse.tok = lex (d);
+ d->parse.depth = d->depth;
+
+ regexp (d);
+
+ if (d->parse.tok != END)
+ dfaerror (_("unbalanced )"));
+
+ addtok (d, END - d->nregexps);
+ addtok (d, CAT);
+
+ if (d->nregexps)
+ addtok (d, OR);
+
+ ++d->nregexps;
+}
+
+/* Some primitives for operating on sets of positions. */
+
+/* Copy one set to another. */
+static void
+copy (position_set const *src, position_set *dst)
+{
+ if (dst->alloc < src->nelem)
+ {
+ free (dst->elems);
+ dst->elems = xpalloc (NULL, &dst->alloc, src->nelem - dst->alloc, -1,
+ sizeof *dst->elems);
+ }
+ memcpy (dst->elems, src->elems, src->nelem * sizeof *dst->elems);
+ dst->nelem = src->nelem;
+}
+
+static void
+alloc_position_set (position_set *s, size_t size)
+{
+ s->elems = xnmalloc (size, sizeof *s->elems);
+ if (PTRDIFF_MAX < SIZE_MAX / sizeof *s->elems && PTRDIFF_MAX < size)
+ xalloc_die ();
+ s->alloc = size;
+ s->nelem = 0;
+}
+
+/* Insert position P in set S. S is maintained in sorted order on
+ decreasing index. If there is already an entry in S with P.index
+ then merge (logically-OR) P's constraints into the one in S.
+ S->elems must point to an array large enough to hold the resulting set. */
+static void
+insert (position p, position_set *s)
+{
+ ptrdiff_t count = s->nelem;
+ ptrdiff_t lo = 0, hi = count;
+ ptrdiff_t i;
+ while (lo < hi)
+ {
+ ptrdiff_t mid = (lo + hi) >> 1;
+ if (s->elems[mid].index > p.index)
+ lo = mid + 1;
+ else if (s->elems[mid].index == p.index)
+ {
+ s->elems[mid].constraint |= p.constraint;
+ return;
+ }
+ else
+ hi = mid;
+ }
+
+ s->elems = maybe_realloc (s->elems, count, &s->alloc, -1, sizeof *s->elems);
+ for (i = count; i > lo; i--)
+ s->elems[i] = s->elems[i - 1];
+ s->elems[lo] = p;
+ ++s->nelem;
+}
+
+/* Merge S1 and S2 (with the additional constraint C2) into M. The
+ result is as if the positions of S1, and of S2 with the additional
+ constraint C2, were inserted into an initially empty set. */
+static void
+merge_constrained (position_set const *s1, position_set const *s2,
+ unsigned int c2, position_set *m)
+{
+ ptrdiff_t i = 0, j = 0;
+
+ if (m->alloc - s1->nelem < s2->nelem)
+ {
+ free (m->elems);
+ m->alloc = s1->nelem;
+ m->elems = xpalloc (NULL, &m->alloc, s2->nelem, -1, sizeof *m->elems);
+ }
+ m->nelem = 0;
+ while (i < s1->nelem || j < s2->nelem)
+ if (! (j < s2->nelem)
+ || (i < s1->nelem && s1->elems[i].index >= s2->elems[j].index))
+ {
+ unsigned int c = ((i < s1->nelem && j < s2->nelem
+ && s1->elems[i].index == s2->elems[j].index)
+ ? s2->elems[j++].constraint & c2
+ : 0);
+ m->elems[m->nelem].index = s1->elems[i].index;
+ m->elems[m->nelem++].constraint = s1->elems[i++].constraint | c;
+ }
+ else
+ {
+ if (s2->elems[j].constraint & c2)
+ {
+ m->elems[m->nelem].index = s2->elems[j].index;
+ m->elems[m->nelem++].constraint = s2->elems[j].constraint & c2;
+ }
+ j++;
+ }
+}
+
+/* Merge two sets of positions into a third. The result is exactly as if
+ the positions of both sets were inserted into an initially empty set. */
+static void
+merge (position_set const *s1, position_set const *s2, position_set *m)
+{
+ return merge_constrained (s1, s2, -1, m);
+}
+
+/* Delete a position from a set. Return the nonzero constraint of the
+ deleted position, or zero if there was no such position. */
+static unsigned int
+delete (size_t del, position_set *s)
+{
+ size_t count = s->nelem;
+ size_t lo = 0, hi = count;
+ while (lo < hi)
+ {
+ size_t mid = (lo + hi) >> 1;
+ if (s->elems[mid].index > del)
+ lo = mid + 1;
+ else if (s->elems[mid].index == del)
+ {
+ unsigned int c = s->elems[mid].constraint;
+ size_t i;
+ for (i = mid; i + 1 < count; i++)
+ s->elems[i] = s->elems[i + 1];
+ s->nelem = i;
+ return c;
+ }
+ else
+ hi = mid;
+ }
+ return 0;
+}
+
+/* Replace a position with the followed set. */
+static void
+replace (position_set *dst, size_t del, position_set *add,
+ unsigned int constraint, position_set *tmp)
+{
+ unsigned int c = delete (del, dst) & constraint;
+
+ if (c)
+ {
+ copy (dst, tmp);
+ merge_constrained (tmp, add, c, dst);
+ }
+}
+
+/* Find the index of the state corresponding to the given position set with
+ the given preceding context, or create a new state if there is no such
+ state. Context tells whether we got here on a newline or letter. */
+static state_num
+state_index (struct dfa *d, position_set const *s, int context)
+{
+ size_t hash = 0;
+ int constraint = 0;
+ state_num i, j;
+ token first_end = 0;
+
+ for (i = 0; i < s->nelem; ++i)
+ hash ^= s->elems[i].index + s->elems[i].constraint;
+
+ /* Try to find a state that exactly matches the proposed one. */
+ for (i = 0; i < d->sindex; ++i)
+ {
+ if (hash != d->states[i].hash || s->nelem != d->states[i].elems.nelem
+ || context != d->states[i].context)
+ continue;
+ for (j = 0; j < s->nelem; ++j)
+ if (s->elems[j].constraint != d->states[i].elems.elems[j].constraint
+ || s->elems[j].index != d->states[i].elems.elems[j].index)
+ break;
+ if (j == s->nelem)
+ return i;
+ }
+
+#ifdef DEBUG
+ fprintf (stderr, "new state %zd\n nextpos:", i);
+ for (j = 0; j < s->nelem; ++j)
+ {
+ fprintf (stderr, " %zu:", s->elems[j].index);
+ prtok (d->tokens[s->elems[j].index]);
+ }
+ fprintf (stderr, "\n context:");
+ if (context ^ CTX_ANY)
+ {
+ if (context & CTX_NONE)
+ fprintf (stderr, " CTX_NONE");
+ if (context & CTX_LETTER)
+ fprintf (stderr, " CTX_LETTER");
+ if (context & CTX_NEWLINE)
+ fprintf (stderr, " CTX_NEWLINE");
+ }
+ else
+ fprintf (stderr, " CTX_ANY");
+ fprintf (stderr, "\n");
+#endif
+
+ for (j = 0; j < s->nelem; ++j)
+ {
+ int c = s->elems[j].constraint;
+ if (d->tokens[s->elems[j].index] < 0)
+ {
+ if (SUCCEEDS_IN_CONTEXT (c, context, CTX_ANY))
+ constraint |= c;
+ if (!first_end)
+ first_end = d->tokens[s->elems[j].index];
+ }
+ else if (d->tokens[s->elems[j].index] == BACKREF)
+ constraint = NO_CONSTRAINT;
+ }
+
+
+ /* Create a new state. */
+ d->states = maybe_realloc (d->states, d->sindex, &d->salloc, -1,
+ sizeof *d->states);
+ d->states[i].hash = hash;
+ alloc_position_set (&d->states[i].elems, s->nelem);
+ copy (s, &d->states[i].elems);
+ d->states[i].context = context;
+ d->states[i].constraint = constraint;
+ d->states[i].first_end = first_end;
+ d->states[i].mbps.nelem = 0;
+ d->states[i].mbps.elems = NULL;
+ d->states[i].mb_trindex = -1;
+
+ ++d->sindex;
+
+ return i;
+}
+
+/* Find the epsilon closure of a set of positions. If any position of the set
+ contains a symbol that matches the empty string in some context, replace
+ that position with the elements of its follow labeled with an appropriate
+ constraint. Repeat exhaustively until no funny positions are left.
+ S->elems must be large enough to hold the result. */
+static void
+epsclosure (position_set *initial, struct dfa const *d)
+{
+ position_set tmp;
+ alloc_position_set (&tmp, d->nleaves);
+ for (size_t i = 0; i < d->tindex; ++i)
+ if (d->follows[i].nelem > 0 && d->tokens[i] >= NOTCHAR
+ && d->tokens[i] != BACKREF && d->tokens[i] != ANYCHAR
+ && d->tokens[i] != MBCSET && d->tokens[i] < CSET)
+ {
+ unsigned int constraint;
+ switch (d->tokens[i])
+ {
+ case BEGLINE:
+ constraint = BEGLINE_CONSTRAINT;
+ break;
+ case ENDLINE:
+ constraint = ENDLINE_CONSTRAINT;
+ break;
+ case BEGWORD:
+ constraint = BEGWORD_CONSTRAINT;
+ break;
+ case ENDWORD:
+ constraint = ENDWORD_CONSTRAINT;
+ break;
+ case LIMWORD:
+ constraint = LIMWORD_CONSTRAINT;
+ break;
+ case NOTLIMWORD:
+ constraint = NOTLIMWORD_CONSTRAINT;
+ break;
+ default:
+ constraint = NO_CONSTRAINT;
+ break;
+ }
+
+ delete (i, &d->follows[i]);
+
+ for (size_t j = 0; j < d->tindex; j++)
+ if (i != j && d->follows[j].nelem > 0)
+ replace (&d->follows[j], i, &d->follows[i], constraint, &tmp);
+
+ replace (initial, i, &d->follows[i], constraint, &tmp);
+ }
+}
+
+/* Returns the set of contexts for which there is at least one
+ character included in C. */
+
+static int
+charclass_context (struct dfa const *dfa, charclass c)
+{
+ int context = 0;
+ unsigned int j;
+
+ for (j = 0; j < CHARCLASS_WORDS; ++j)
+ {
+ if (c[j] & dfa->syntax.newline[j])
+ context |= CTX_NEWLINE;
+ if (c[j] & dfa->syntax.letters[j])
+ context |= CTX_LETTER;
+ if (c[j] & ~(dfa->syntax.letters[j] | dfa->syntax.newline[j]))
+ context |= CTX_NONE;
+ }
+
+ return context;
+}
+
+/* Returns the contexts on which the position set S depends. Each context
+ in the set of returned contexts (let's call it SC) may have a different
+ follow set than other contexts in SC, and also different from the
+ follow set of the complement set (sc ^ CTX_ANY). However, all contexts
+ in the complement set will have the same follow set. */
+
+static int _GL_ATTRIBUTE_PURE
+state_separate_contexts (position_set const *s)
+{
+ int separate_contexts = 0;
+ size_t j;
+
+ for (j = 0; j < s->nelem; ++j)
+ {
+ if (PREV_NEWLINE_DEPENDENT (s->elems[j].constraint))
+ separate_contexts |= CTX_NEWLINE;
+ if (PREV_LETTER_DEPENDENT (s->elems[j].constraint))
+ separate_contexts |= CTX_LETTER;
+ }
+
+ return separate_contexts;
+}
+
+
+/* Perform bottom-up analysis on the parse tree, computing various functions.
+ Note that at this point, we're pretending constructs like \< are real
+ characters rather than constraints on what can follow them.
+
+ Nullable: A node is nullable if it is at the root of a regexp that can
+ match the empty string.
+ * EMPTY leaves are nullable.
+ * No other leaf is nullable.
+ * A QMARK or STAR node is nullable.
+ * A PLUS node is nullable if its argument is nullable.
+ * A CAT node is nullable if both its arguments are nullable.
+ * An OR node is nullable if either argument is nullable.
+
+ Firstpos: The firstpos of a node is the set of positions (nonempty leaves)
+ that could correspond to the first character of a string matching the
+ regexp rooted at the given node.
+ * EMPTY leaves have empty firstpos.
+ * The firstpos of a nonempty leaf is that leaf itself.
+ * The firstpos of a QMARK, STAR, or PLUS node is the firstpos of its
+ argument.
+ * The firstpos of a CAT node is the firstpos of the left argument, union
+ the firstpos of the right if the left argument is nullable.
+ * The firstpos of an OR node is the union of firstpos of each argument.
+
+ Lastpos: The lastpos of a node is the set of positions that could
+ correspond to the last character of a string matching the regexp at
+ the given node.
+ * EMPTY leaves have empty lastpos.
+ * The lastpos of a nonempty leaf is that leaf itself.
+ * The lastpos of a QMARK, STAR, or PLUS node is the lastpos of its
+ argument.
+ * The lastpos of a CAT node is the lastpos of its right argument, union
+ the lastpos of the left if the right argument is nullable.
+ * The lastpos of an OR node is the union of the lastpos of each argument.
+
+ Follow: The follow of a position is the set of positions that could
+ correspond to the character following a character matching the node in
+ a string matching the regexp. At this point we consider special symbols
+ that match the empty string in some context to be just normal characters.
+ Later, if we find that a special symbol is in a follow set, we will
+ replace it with the elements of its follow, labeled with an appropriate
+ constraint.
+ * Every node in the firstpos of the argument of a STAR or PLUS node is in
+ the follow of every node in the lastpos.
+ * Every node in the firstpos of the second argument of a CAT node is in
+ the follow of every node in the lastpos of the first argument.
+
+ Because of the postfix representation of the parse tree, the depth-first
+ analysis is conveniently done by a linear scan with the aid of a stack.
+ Sets are stored as arrays of the elements, obeying a stack-like allocation
+ scheme; the number of elements in each set deeper in the stack can be
+ used to determine the address of a particular set's array. */
+static void
+dfaanalyze (struct dfa *d, bool searchflag)
+{
+ /* Array allocated to hold position sets. */
+ position *posalloc = xnmalloc (d->nleaves, 2 * sizeof *posalloc);
+ /* Firstpos and lastpos elements. */
+ position *firstpos = posalloc + d->nleaves;
+ position *lastpos = firstpos + d->nleaves;
+
+ /* Stack for element counts and nullable flags. */
+ struct
+ {
+ /* Whether the entry is nullable. */
+ bool nullable;
+
+ /* Counts of firstpos and lastpos sets. */
+ size_t nfirstpos;
+ size_t nlastpos;
+ } *stkalloc = xnmalloc (d->depth, sizeof *stkalloc), *stk = stkalloc;
+
+ position_set tmp; /* Temporary set for merging sets. */
+ position_set merged; /* Result of merging sets. */
+ int separate_contexts; /* Context wanted by some position. */
+ size_t i, j;
+ position *pos;
+
+#ifdef DEBUG
+ fprintf (stderr, "dfaanalyze:\n");
+ for (i = 0; i < d->tindex; ++i)
+ {
+ fprintf (stderr, " %zu:", i);
+ prtok (d->tokens[i]);
+ }
+ putc ('\n', stderr);
+#endif
+
+ d->searchflag = searchflag;
+ alloc_position_set (&merged, d->nleaves);
+ d->follows = xcalloc (d->tindex, sizeof *d->follows);
+
+ for (i = 0; i < d->tindex; ++i)
+ {
+ switch (d->tokens[i])
+ {
+ case EMPTY:
+ /* The empty set is nullable. */
+ stk->nullable = true;
+
+ /* The firstpos and lastpos of the empty leaf are both empty. */
+ stk->nfirstpos = stk->nlastpos = 0;
+ stk++;
+ break;
+
+ case STAR:
+ case PLUS:
+ /* Every element in the firstpos of the argument is in the follow
+ of every element in the lastpos. */
+ tmp.nelem = stk[-1].nfirstpos;
+ tmp.elems = firstpos;
+ pos = lastpos;
+ for (j = 0; j < stk[-1].nlastpos; ++j)
+ {
+ merge (&tmp, &d->follows[pos[j].index], &merged);
+ copy (&merged, &d->follows[pos[j].index]);
+ }
+ /* fallthrough */
+
+ case QMARK:
+ /* A QMARK or STAR node is automatically nullable. */
+ if (d->tokens[i] != PLUS)
+ stk[-1].nullable = true;
+ break;
+
+ case CAT:
+ /* Every element in the firstpos of the second argument is in the
+ follow of every element in the lastpos of the first argument. */
+ tmp.nelem = stk[-1].nfirstpos;
+ tmp.elems = firstpos;
+ pos = lastpos + stk[-1].nlastpos;
+ for (j = 0; j < stk[-2].nlastpos; ++j)
+ {
+ merge (&tmp, &d->follows[pos[j].index], &merged);
+ copy (&merged, &d->follows[pos[j].index]);
+ }
+
+ /* The firstpos of a CAT node is the firstpos of the first argument,
+ union that of the second argument if the first is nullable. */
+ if (stk[-2].nullable)
+ stk[-2].nfirstpos += stk[-1].nfirstpos;
+ else
+ firstpos += stk[-1].nfirstpos;
+
+ /* The lastpos of a CAT node is the lastpos of the second argument,
+ union that of the first argument if the second is nullable. */
+ if (stk[-1].nullable)
+ stk[-2].nlastpos += stk[-1].nlastpos;
+ else
+ {
+ pos = lastpos + stk[-2].nlastpos;
+ for (j = stk[-1].nlastpos; j-- > 0;)
+ pos[j] = lastpos[j];
+ lastpos += stk[-2].nlastpos;
+ stk[-2].nlastpos = stk[-1].nlastpos;
+ }
+
+ /* A CAT node is nullable if both arguments are nullable. */
+ stk[-2].nullable &= stk[-1].nullable;
+ stk--;
+ break;
+
+ case OR:
+ /* The firstpos is the union of the firstpos of each argument. */
+ stk[-2].nfirstpos += stk[-1].nfirstpos;
+
+ /* The lastpos is the union of the lastpos of each argument. */
+ stk[-2].nlastpos += stk[-1].nlastpos;
+
+ /* An OR node is nullable if either argument is nullable. */
+ stk[-2].nullable |= stk[-1].nullable;
+ stk--;
+ break;
+
+ default:
+ /* Anything else is a nonempty position. (Note that special
+ constructs like \< are treated as nonempty strings here;
+ an "epsilon closure" effectively makes them nullable later.
+ Backreferences have to get a real position so we can detect
+ transitions on them later. But they are nullable. */
+ stk->nullable = d->tokens[i] == BACKREF;
+
+ /* This position is in its own firstpos and lastpos. */
+ stk->nfirstpos = stk->nlastpos = 1;
+ stk++;
+
+ --firstpos, --lastpos;
+ firstpos->index = lastpos->index = i;
+ firstpos->constraint = lastpos->constraint = NO_CONSTRAINT;
+
+ /* Allocate the follow set for this position. */
+ alloc_position_set (&d->follows[i], 1);
+ break;
+ }
+#ifdef DEBUG
+ /* ... balance the above nonsyntactic #ifdef goo... */
+ fprintf (stderr, "node %zu:", i);
+ prtok (d->tokens[i]);
+ putc ('\n', stderr);
+ fprintf (stderr,
+ stk[-1].nullable ? " nullable: yes\n" : " nullable: no\n");
+ fprintf (stderr, " firstpos:");
+ for (j = stk[-1].nfirstpos; j-- > 0;)
+ {
+ fprintf (stderr, " %zu:", firstpos[j].index);
+ prtok (d->tokens[firstpos[j].index]);
+ }
+ fprintf (stderr, "\n lastpos:");
+ for (j = stk[-1].nlastpos; j-- > 0;)
+ {
+ fprintf (stderr, " %zu:", lastpos[j].index);
+ prtok (d->tokens[lastpos[j].index]);
+ }
+ putc ('\n', stderr);
+#endif
+ }
+
+#ifdef DEBUG
+ for (i = 0; i < d->tindex; ++i)
+ if (d->tokens[i] < NOTCHAR || d->tokens[i] == BACKREF
+ || d->tokens[i] == ANYCHAR || d->tokens[i] == MBCSET
+ || d->tokens[i] >= CSET)
+ {
+ fprintf (stderr, "follows(%zu:", i);
+ prtok (d->tokens[i]);
+ fprintf (stderr, "):");
+ for (j = d->follows[i].nelem; j-- > 0;)
+ {
+ fprintf (stderr, " %zu:", d->follows[i].elems[j].index);
+ prtok (d->tokens[d->follows[i].elems[j].index]);
+ }
+ putc ('\n', stderr);
+ }
+#endif
+
+ /* Get the epsilon closure of the firstpos of the regexp. The result will
+ be the set of positions of state 0. */
+ merged.nelem = 0;
+ for (i = 0; i < stk[-1].nfirstpos; ++i)
+ insert (firstpos[i], &merged);
+
+ /* For each follow set that is the follow set of a real position, replace
+ it with its epsilon closure. */
+ epsclosure (&merged, d);
+
+ /* Build the initial state. */
+ separate_contexts = state_separate_contexts (&merged);
+ if (separate_contexts & CTX_NEWLINE)
+ state_index (d, &merged, CTX_NEWLINE);
+ d->initstate_notbol = d->min_trcount
+ = state_index (d, &merged, separate_contexts ^ CTX_ANY);
+ if (separate_contexts & CTX_LETTER)
+ d->min_trcount = state_index (d, &merged, CTX_LETTER);
+ d->min_trcount++;
+ d->trcount = 0;
+
+ free (posalloc);
+ free (stkalloc);
+ free (merged.elems);
+}
+
+
+/* Return the transition out of state s of d for the input character uc,
+ updating the slots in trans accordingly.
+
+ Do not worry about all possible input characters; calculate just the group
+ of positions that match uc. Label it with the set of characters that
+ every position in the group matches (taking into account, if necessary,
+ preceding context information of s). Then find the union
+ of these positions' follows, i.e., the set of positions of the
+ new state. For each character in the group's label, set the transition
+ on this character to be to a state corresponding to the set's positions,
+ and its associated backward context information, if necessary.
+
+ When building a searching matcher, include the positions of state
+ 0 in every state.
+
+ The group is constructed by building an equivalence-class
+ partition of the positions of s.
+
+ For each position, find the set of characters C that it matches. Eliminate
+ any characters from C that fail on grounds of backward context.
+
+ Check whether the group's label L has nonempty
+ intersection with C. If L - C is nonempty, create a new group labeled
+ L - C and having the same positions as the current group, and set L to
+ the intersection of L and C. Insert the position in the group, set
+ C = C - L, and resume scanning.
+
+ If after comparing with every group there are characters remaining in C,
+ create a new group labeled with the characters of C and insert this
+ position in that group. */
+static state_num
+dfastate (state_num s, struct dfa *d, unsigned char uc, state_num trans[])
+{
+ leaf_set group; /* Positions that match the input char. */
+ charclass label; /* The group's label. */
+ position_set follows; /* Union of the follows of the group. */
+ position_set tmp; /* Temporary space for merging sets. */
+ state_num state; /* New state. */
+ state_num state_newline; /* New state on a newline transition. */
+ state_num state_letter; /* New state on a letter transition. */
+ size_t i, j, k;
+
+#ifdef DEBUG
+ fprintf (stderr, "build state %td\n", s);
+#endif
+
+ group.elems = xnmalloc (d->nleaves, sizeof *group.elems);
+ group.nelem = 0;
+
+ fillset (label);
+
+ for (i = 0; i < d->states[s].elems.nelem; ++i)
+ {
+ charclass matches; /* Set of matching characters. */
+ position pos = d->states[s].elems.elems[i];
+ bool matched = false;
+ if (d->tokens[pos.index] >= 0 && d->tokens[pos.index] < NOTCHAR)
+ {
+ zeroset (matches);
+ setbit (d->tokens[pos.index], matches);
+ if (d->tokens[pos.index] == uc)
+ matched = true;
+ }
+ else if (d->tokens[pos.index] >= CSET)
+ {
+ copyset (d->charclasses[d->tokens[pos.index] - CSET], matches);
+ if (tstbit (uc, d->charclasses[d->tokens[pos.index] - CSET]))
+ matched = true;
+ }
+ else if (d->tokens[pos.index] == ANYCHAR)
+ {
+ copyset (d->charclasses[d->canychar], matches);
+ if (tstbit (uc, d->charclasses[d->canychar]))
+ matched = true;
+
+ /* ANYCHAR must match with a single character, so we must put
+ it to D->states[s].mbps which contains the positions which
+ can match with a single character not a byte. If all
+ positions which has ANYCHAR does not depend on context of
+ next character, we put the follows instead of it to
+ D->states[s].mbps to optimize. */
+ if (SUCCEEDS_IN_CONTEXT (pos.constraint, d->states[s].context,
+ CTX_NONE))
+ {
+ if (d->states[s].mbps.nelem == 0)
+ alloc_position_set (&d->states[s].mbps,
+ d->follows[pos.index].nelem);
+ for (j = 0; j < d->follows[pos.index].nelem; j++)
+ insert (d->follows[pos.index].elems[j], &d->states[s].mbps);
+ }
+ }
+ else
+ continue;
+
+ /* Some characters may need to be eliminated from matches because
+ they fail in the current context. */
+ if (pos.constraint != NO_CONSTRAINT)
+ {
+ if (!SUCCEEDS_IN_CONTEXT (pos.constraint,
+ d->states[s].context, CTX_NEWLINE))
+ for (j = 0; j < CHARCLASS_WORDS; ++j)
+ matches[j] &= ~d->syntax.newline[j];
+ if (!SUCCEEDS_IN_CONTEXT (pos.constraint,
+ d->states[s].context, CTX_LETTER))
+ for (j = 0; j < CHARCLASS_WORDS; ++j)
+ matches[j] &= ~d->syntax.letters[j];
+ if (!SUCCEEDS_IN_CONTEXT (pos.constraint,
+ d->states[s].context, CTX_NONE))
+ for (j = 0; j < CHARCLASS_WORDS; ++j)
+ matches[j] &= d->syntax.letters[j] | d->syntax.newline[j];
+
+ /* If there are no characters left, there's no point in going on. */
+ for (j = 0; j < CHARCLASS_WORDS && !matches[j]; ++j)
+ continue;
+ if (j == CHARCLASS_WORDS)
+ continue;
+
+ /* If we have reset the bit that made us declare "matched", reset
+ that indicator, too. This is required to avoid an infinite loop
+ with this command: echo cx | LC_ALL=C grep -E 'c\b[x ]' */
+ if (!tstbit (uc, matches))
+ matched = false;
+ }
+
+#ifdef DEBUG
+ fprintf (stderr, " nextpos %zu:", pos.index);
+ prtok (d->tokens[pos.index]);
+ fprintf (stderr, " of");
+ for (j = 0; j < NOTCHAR; j++)
+ if (tstbit (j, matches))
+ fprintf (stderr, " 0x%02zx", j);
+ fprintf (stderr, "\n");
+#endif
+
+ if (matched)
+ {
+ for (k = 0; k < CHARCLASS_WORDS; ++k)
+ label[k] &= matches[k];
+ group.elems[group.nelem++] = pos.index;
+ }
+ else
+ {
+ for (k = 0; k < CHARCLASS_WORDS; ++k)
+ label[k] &= ~matches[k];
+ }
+ }
+
+ alloc_position_set (&follows, d->nleaves);
+ alloc_position_set (&tmp, d->nleaves);
+
+ if (group.nelem > 0)
+ {
+ int possible_contexts; /* Contexts that the group can match. */
+ int separate_contexts; /* Context that new state wants to know. */
+
+ follows.nelem = 0;
+
+ /* Find the union of the follows of the positions of the group.
+ This is a hideously inefficient loop. Fix it someday. */
+ for (j = 0; j < group.nelem; ++j)
+ for (k = 0; k < d->follows[group.elems[j]].nelem; ++k)
+ insert (d->follows[group.elems[j]].elems[k], &follows);
+
+ /* If we are building a searching matcher, throw in the positions
+ of state 0 as well, if possible. */
+ if (d->searchflag)
+ {
+ /* If a token in follows.elems is not 1st byte of a multibyte
+ character, or the states of follows must accept the bytes
+ which are not 1st byte of the multibyte character.
+ Then, if a state of follows encounters a byte, it must not be
+ a 1st byte of a multibyte character nor a single byte character.
+ In this case, do not add state[0].follows to next state, because
+ state[0] must accept 1st-byte.
+
+ For example, suppose <sb a> is a certain single byte character,
+ <mb A> is a certain multibyte character, and the codepoint of
+ <sb a> equals the 2nd byte of the codepoint of <mb A>. When
+ state[0] accepts <sb a>, state[i] transits to state[i+1] by
+ accepting the 1st byte of <mb A>, and state[i+1] accepts the
+ 2nd byte of <mb A>, if state[i+1] encounters the codepoint of
+ <sb a>, it must not be <sb a> but the 2nd byte of <mb A>, so do
+ not add state[0]. */
+
+ bool mergeit = !d->localeinfo.multibyte;
+ if (!mergeit)
+ for (mergeit = true, j = 0; mergeit && j < follows.nelem; j++)
+ mergeit &= d->multibyte_prop[follows.elems[j].index];
+ if (mergeit)
+ {
+ merge (&d->states[0].elems, &follows, &tmp);
+ copy (&tmp, &follows);
+ }
+ }
+
+ /* Find out if the new state will want any context information. */
+ possible_contexts = charclass_context (d, label);
+ separate_contexts = state_separate_contexts (&follows);
+
+ /* Find the state(s) corresponding to the union of the follows. */
+ if (possible_contexts & ~separate_contexts)
+ state = state_index (d, &follows, separate_contexts ^ CTX_ANY);
+ else
+ state = -1;
+ if (separate_contexts & possible_contexts & CTX_NEWLINE)
+ state_newline = state_index (d, &follows, CTX_NEWLINE);
+ else
+ state_newline = state;
+ if (separate_contexts & possible_contexts & CTX_LETTER)
+ state_letter = state_index (d, &follows, CTX_LETTER);
+ else
+ state_letter = state;
+ }
+
+ /* If we are a searching matcher, the default transition is to a state
+ containing the positions of state 0, otherwise the default transition
+ is to fail miserably. */
+ else if (d->searchflag)
+ {
+ state_newline = 0;
+ state_letter = d->min_trcount - 1;
+ state = d->initstate_notbol;
+ }
+ else
+ {
+ state_newline = -1;
+ state_letter = -1;
+ state = -1;
+ }
+
+ /* Set the transitions for each character in the label. */
+ for (i = 0; i < NOTCHAR; i++)
+ if (tstbit (i, label))
+ switch (d->syntax.sbit[i])
+ {
+ case CTX_NEWLINE:
+ trans[i] = state_newline;
+ break;
+ case CTX_LETTER:
+ trans[i] = state_letter;
+ break;
+ default:
+ trans[i] = state;
+ break;
+ }
+
+#ifdef DEBUG
+ fprintf (stderr, "trans table %td", s);
+ for (i = 0; i < NOTCHAR; ++i)
+ {
+ if (!(i & 0xf))
+ fprintf (stderr, "\n");
+ fprintf (stderr, " %2td", trans[i]);
+ }
+ fprintf (stderr, "\n");
+#endif
+
+ free (group.elems);
+ free (follows.elems);
+ free (tmp.elems);
+
+ /* Keep the newline transition in a special place so we can use it as
+ a sentinel. */
+ if (tstbit (d->syntax.eolbyte, label))
+ {
+ d->newlines[s] = trans[d->syntax.eolbyte];
+ trans[d->syntax.eolbyte] = -1;
+ }
+
+ return trans[uc];
+}
+
+/* Make sure D's state arrays are large enough to hold NEW_STATE. */
+static void
+realloc_trans_if_necessary (struct dfa *d, state_num new_state)
+{
+ state_num oldalloc = d->tralloc;
+ if (oldalloc <= new_state)
+ {
+ state_num **realtrans = d->trans ? d->trans - 2 : NULL;
+ ptrdiff_t newalloc, newalloc1;
+ newalloc1 = realtrans ? d->tralloc + 2 : 0;
+ realtrans = xpalloc (realtrans, &newalloc1, new_state - oldalloc + 1,
+ -1, sizeof *realtrans);
+ realtrans[0] = realtrans[1] = NULL;
+ d->trans = realtrans + 2;
+ d->tralloc = newalloc = newalloc1 - 2;
+ d->fails = xnrealloc (d->fails, newalloc, sizeof *d->fails);
+ d->success = xnrealloc (d->success, newalloc, sizeof *d->success);
+ d->newlines = xnrealloc (d->newlines, newalloc, sizeof *d->newlines);
+ if (d->localeinfo.multibyte)
+ {
+ realtrans = d->mb_trans ? d->mb_trans - 2 : NULL;
+ realtrans = xnrealloc (realtrans, newalloc1, sizeof *realtrans);
+ if (oldalloc == 0)
+ realtrans[0] = realtrans[1] = NULL;
+ d->mb_trans = realtrans + 2;
+ }
+ for (; oldalloc < newalloc; oldalloc++)
+ {
+ d->trans[oldalloc] = NULL;
+ d->fails[oldalloc] = NULL;
+ if (d->localeinfo.multibyte)
+ d->mb_trans[oldalloc] = NULL;
+ }
+ }
+}
+
+/* Calculate the transition table for a new state derived from state s
+ for a compiled dfa d after input character uc, and return the new
+ state number. */
+
+static state_num
+build_state (state_num s, struct dfa *d, unsigned char uc)
+{
+ /* A pointer to the new transition table, and the table itself. */
+ state_num **ptrans = (ACCEPTING (s, *d) ? d->fails : d->trans) + s;
+ state_num *trans = *ptrans;
+
+ if (!trans)
+ {
+ /* MAX_TRCOUNT is an arbitrary upper limit on the number of
+ transition tables that can exist at once, other than for
+ initial states. Often-used transition tables are quickly
+ rebuilt, whereas rarely-used ones are cleared away. */
+ if (MAX_TRCOUNT <= d->trcount)
+ {
+ for (state_num i = d->min_trcount; i < d->tralloc; i++)
+ {
+ free (d->trans[i]);
+ free (d->fails[i]);
+ d->trans[i] = d->fails[i] = NULL;
+ }
+ d->trcount = 0;
+ }
+
+ d->trcount++;
+ *ptrans = trans = xmalloc (NOTCHAR * sizeof *trans);
+
+ /* Fill transition table with a default value which means that the
+ transited state has not been calculated yet. */
+ for (int i = 0; i < NOTCHAR; i++)
+ trans[i] = -2;
+ }
+
+ /* Set up the success bits for this state. */
+ d->success[s] = 0;
+ if (ACCEPTS_IN_CONTEXT (d->states[s].context, CTX_NEWLINE, s, *d))
+ d->success[s] |= CTX_NEWLINE;
+ if (ACCEPTS_IN_CONTEXT (d->states[s].context, CTX_LETTER, s, *d))
+ d->success[s] |= CTX_LETTER;
+ if (ACCEPTS_IN_CONTEXT (d->states[s].context, CTX_NONE, s, *d))
+ d->success[s] |= CTX_NONE;
+
+ s = dfastate (s, d, uc, trans);
+
+ /* Now go through the new transition table, and make sure that the trans
+ and fail arrays are allocated large enough to hold a pointer for the
+ largest state mentioned in the table. */
+ state_num maxstate = -1;
+ for (int i = 0; i < NOTCHAR; i++)
+ if (maxstate < trans[i])
+ maxstate = trans[i];
+ realloc_trans_if_necessary (d, maxstate);
+
+ return s;
+}
+
+/* Multibyte character handling sub-routines for dfaexec. */
+
+/* Consume a single byte and transit state from 's' to '*next_state'.
+ This function is almost same as the state transition routin in dfaexec.
+ But state transition is done just once, otherwise matching succeed or
+ reach the end of the buffer. */
+static state_num
+transit_state_singlebyte (struct dfa *d, state_num s, unsigned char const **pp)
+{
+ state_num *t;
+
+ if (d->trans[s])
+ t = d->trans[s];
+ else if (d->fails[s])
+ t = d->fails[s];
+ else
+ {
+ build_state (s, d, **pp);
+ if (d->trans[s])
+ t = d->trans[s];
+ else
+ {
+ t = d->fails[s];
+ assert (t);
+ }
+ }
+
+ if (t[**pp] == -2)
+ build_state (s, d, **pp);
+
+ return t[*(*pp)++];
+}
+
+/* Transit state from s, then return new state and update the pointer of
+ the buffer. This function is for a period operator which can match a
+ multi-byte character. */
+static state_num
+transit_state (struct dfa *d, state_num s, unsigned char const **pp,
+ unsigned char const *end)
+{
+ state_num s1, s2;
+ wint_t wc;
+ int separate_contexts;
+ size_t i;
+
+ int mbclen = mbs_to_wchar (&wc, (char const *) *pp, end - *pp, d);
+
+ /* This state has some operators which can match a multibyte character. */
+ d->mb_follows.nelem = 0;
+
+ /* Calculate the state which can be reached from the state 's' by
+ consuming 'mbclen' single bytes from the buffer. */
+ s1 = s;
+ for (i = 0; i < mbclen && (i == 0 || d->min_trcount <= s); i++)
+ s = transit_state_singlebyte (d, s, pp);
+ *pp += mbclen - i;
+
+ if (wc == WEOF)
+ {
+ /* It is an invalid character, so ANYCHAR is not accepted. */
+ return s;
+ }
+
+ /* If all positions which have ANYCHAR do not depend on the context
+ of the next character, calculate the next state with
+ pre-calculated follows and cache the result. */
+ if (d->states[s1].mb_trindex < 0)
+ {
+ if (MAX_TRCOUNT <= d->mb_trcount)
+ {
+ state_num s3;
+ for (s3 = -1; s3 < d->tralloc; s3++)
+ {
+ free (d->mb_trans[s3]);
+ d->mb_trans[s3] = NULL;
+ }
+
+ for (i = 0; i < d->sindex; i++)
+ d->states[i].mb_trindex = -1;
+ d->mb_trcount = 0;
+ }
+ d->states[s1].mb_trindex = d->mb_trcount++;
+ }
+
+ if (! d->mb_trans[s])
+ {
+ enum { TRANSPTR_SIZE = sizeof *d->mb_trans[s] };
+ enum { TRANSALLOC_SIZE = MAX_TRCOUNT * TRANSPTR_SIZE };
+ d->mb_trans[s] = xmalloc (TRANSALLOC_SIZE);
+ for (i = 0; i < MAX_TRCOUNT; i++)
+ d->mb_trans[s][i] = -1;
+ }
+ else if (d->mb_trans[s][d->states[s1].mb_trindex] >= 0)
+ return d->mb_trans[s][d->states[s1].mb_trindex];
+
+ if (s == -1)
+ copy (&d->states[s1].mbps, &d->mb_follows);
+ else
+ merge (&d->states[s1].mbps, &d->states[s].elems, &d->mb_follows);
+
+ separate_contexts = state_separate_contexts (&d->mb_follows);
+ s2 = state_index (d, &d->mb_follows, separate_contexts ^ CTX_ANY);
+ realloc_trans_if_necessary (d, s2);
+
+ d->mb_trans[s][d->states[s1].mb_trindex] = s2;
+
+ return s2;
+}
+
+/* The initial state may encounter a byte which is not a single byte character
+ nor the first byte of a multibyte character. But it is incorrect for the
+ initial state to accept such a byte. For example, in Shift JIS the regular
+ expression "\\" accepts the codepoint 0x5c, but should not accept the second
+ byte of the codepoint 0x815c. Then the initial state must skip the bytes
+ that are not a single byte character nor the first byte of a multibyte
+ character.
+
+ Given DFA state d, use mbs_to_wchar to advance MBP until it reaches
+ or exceeds P, and return the advanced MBP. If WCP is non-NULL and
+ the result is greater than P, set *WCP to the final wide character
+ processed, or to WEOF if no wide character is processed. Otherwise,
+ if WCP is non-NULL, *WCP may or may not be updated.
+
+ Both P and MBP must be no larger than END. */
+static unsigned char const *
+skip_remains_mb (struct dfa *d, unsigned char const *p,
+ unsigned char const *mbp, char const *end)
+{
+ wint_t wc;
+ if (d->syntax.never_trail[*p])
+ return p;
+ while (mbp < p)
+ mbp += mbs_to_wchar (&wc, (char const *) mbp,
+ end - (char const *) mbp, d);
+ return mbp;
+}
+
+/* Search through a buffer looking for a match to the struct dfa *D.
+ Find the first occurrence of a string matching the regexp in the
+ buffer, and the shortest possible version thereof. Return a pointer to
+ the first character after the match, or NULL if none is found. BEGIN
+ points to the beginning of the buffer, and END points to the first byte
+ after its end. Note however that we store a sentinel byte (usually
+ newline) in *END, so the actual buffer must be one byte longer.
+ When ALLOW_NL, newlines may appear in the matching string.
+ If COUNT is non-NULL, increment *COUNT once for each newline processed.
+ If MULTIBYTE, the input consists of multibyte characters and/or
+ encoding-error bytes. Otherwise, it consists of single-byte characters.
+ Here is the list of features that make this DFA matcher punt:
+ - [M-N] range in non-simple locale: regex is up to 25% faster on [a-z]
+ - [^...] in non-simple locale
+ - [[=foo=]] or [[.foo.]]
+ - [[:alpha:]] etc. in multibyte locale (except [[:digit:]] works OK)
+ - back-reference: (.)\1
+ - word-delimiter in multibyte locale: \<, \>, \b, \B
+ See using_simple_locale for the definition of "simple locale". */
+
+static inline char *
+dfaexec_main (struct dfa *d, char const *begin, char *end, bool allow_nl,
+ size_t *count, bool multibyte)
+{
+ state_num s, s1; /* Current state. */
+ unsigned char const *p, *mbp; /* Current input character. */
+ state_num **trans, *t; /* Copy of d->trans so it can be optimized
+ into a register. */
+ unsigned char eol = d->syntax.eolbyte; /* Likewise for eolbyte. */
+ unsigned char saved_end;
+ size_t nlcount = 0;
+
+ if (MAX_TRCOUNT <= d->sindex)
+ {
+ for (s = d->min_trcount; s < d->sindex; s++)
+ {
+ free (d->states[s].elems.elems);
+ free (d->states[s].mbps.elems);
+ }
+ d->sindex = d->min_trcount;
+
+ if (d->trans)
+ {
+ for (s = 0; s < d->tralloc; s++)
+ {
+ free (d->trans[s]);
+ free (d->fails[s]);
+ d->trans[s] = d->fails[s] = NULL;
+ }
+ d->trcount = 0;
+ }
+
+ if (d->localeinfo.multibyte && d->mb_trans)
+ {
+ for (s = -1; s < d->tralloc; s++)
+ {
+ free (d->mb_trans[s]);
+ d->mb_trans[s] = NULL;
+ }
+ for (s = 0; s < d->min_trcount; s++)
+ d->states[s].mb_trindex = -1;
+ d->mb_trcount = 0;
+ }
+ }
+
+ if (!d->tralloc)
+ realloc_trans_if_necessary (d, 0);
+
+ s = s1 = 0;
+ p = mbp = (unsigned char const *) begin;
+ trans = d->trans;
+ saved_end = *(unsigned char *) end;
+ *end = eol;
+
+ if (multibyte)
+ {
+ memset (&d->mbs, 0, sizeof d->mbs);
+ if (d->mb_follows.alloc == 0)
+ alloc_position_set (&d->mb_follows, d->nleaves);
+ }
+
+ for (;;)
+ {
+ while ((t = trans[s]) != NULL)
+ {
+ if (s < d->min_trcount)
+ {
+ if (!multibyte || d->states[s].mbps.nelem == 0)
+ {
+ while (t[*p] == s)
+ p++;
+ }
+ if (multibyte)
+ p = mbp = skip_remains_mb (d, p, mbp, end);
+ }
+
+ if (multibyte)
+ {
+ s1 = s;
+
+ if (d->states[s].mbps.nelem == 0
+ || d->localeinfo.sbctowc[*p] != WEOF || (char *) p >= end)
+ {
+ /* If an input character does not match ANYCHAR, do it
+ like a single-byte character. */
+ s = t[*p++];
+ }
+ else
+ {
+ s = transit_state (d, s, &p, (unsigned char *) end);
+ mbp = p;
+ trans = d->trans;
+ }
+ }
+ else
+ {
+ s1 = t[*p++];
+ t = trans[s1];
+ if (! t)
+ {
+ state_num tmp = s;
+ s = s1;
+ s1 = tmp; /* swap */
+ break;
+ }
+ if (s < d->min_trcount)
+ {
+ while (t[*p] == s1)
+ p++;
+ }
+ s = t[*p++];
+ }
+ }
+
+ if (s < 0)
+ {
+ if (s == -2)
+ {
+ s = build_state (s1, d, p[-1]);
+ trans = d->trans;
+ }
+ else if ((char *) p <= end && p[-1] == eol && 0 <= d->newlines[s1])
+ {
+ /* The previous character was a newline. Count it, and skip
+ checking of multibyte character boundary until here. */
+ nlcount++;
+ mbp = p;
+
+ s = (allow_nl ? d->newlines[s1]
+ : d->syntax.sbit[eol] == CTX_NEWLINE ? 0
+ : d->syntax.sbit[eol] == CTX_LETTER ? d->min_trcount - 1
+ : d->initstate_notbol);
+ }
+ else
+ {
+ p = NULL;
+ goto done;
+ }
+ }
+ else if (d->fails[s])
+ {
+ if ((d->success[s] & d->syntax.sbit[*p])
+ || ((char *) p == end
+ && ACCEPTS_IN_CONTEXT (d->states[s].context, CTX_NEWLINE, s,
+ *d)))
+ goto done;
+
+ if (multibyte && s < d->min_trcount)
+ p = mbp = skip_remains_mb (d, p, mbp, end);
+
+ s1 = s;
+ if (!multibyte || d->states[s].mbps.nelem == 0
+ || d->localeinfo.sbctowc[*p] != WEOF || (char *) p >= end)
+ {
+ /* If a input character does not match ANYCHAR, do it
+ like a single-byte character. */
+ s = d->fails[s][*p++];
+ }
+ else
+ {
+ s = transit_state (d, s, &p, (unsigned char *) end);
+ mbp = p;
+ trans = d->trans;
+ }
+ }
+ else
+ {
+ build_state (s, d, p[0]);
+ trans = d->trans;
+ }
+ }
+
+ done:
+ if (count)
+ *count += nlcount;
+ *end = saved_end;
+ return (char *) p;
+}
+
+/* Specialized versions of dfaexec for multibyte and single-byte cases.
+ This is for performance, as dfaexec_main is an inline function. */
+
+static char *
+dfaexec_mb (struct dfa *d, char const *begin, char *end,
+ bool allow_nl, size_t *count, bool *backref)
+{
+ return dfaexec_main (d, begin, end, allow_nl, count, true);
+}
+
+static char *
+dfaexec_sb (struct dfa *d, char const *begin, char *end,
+ bool allow_nl, size_t *count, bool *backref)
+{
+ return dfaexec_main (d, begin, end, allow_nl, count, false);
+}
+
+/* Always set *BACKREF and return BEGIN. Use this wrapper for
+ any regexp that uses a construct not supported by this code. */
+static char *
+dfaexec_noop (struct dfa *d, char const *begin, char *end,
+ bool allow_nl, size_t *count, bool *backref)
+{
+ *backref = true;
+ return (char *) begin;
+}
+
+/* Like dfaexec_main (D, BEGIN, END, ALLOW_NL, COUNT, D->localeinfo.multibyte),
+ but faster and set *BACKREF if the DFA code does not support this
+ regexp usage. */
+
+char *
+dfaexec (struct dfa *d, char const *begin, char *end,
+ bool allow_nl, size_t *count, bool *backref)
+{
+ return d->dfaexec (d, begin, end, allow_nl, count, backref);
+}
+
+struct dfa *
+dfasuperset (struct dfa const *d)
+{
+ return d->superset;
+}
+
+bool
+dfaisfast (struct dfa const *d)
+{
+ return d->fast;
+}
+
+static void
+free_mbdata (struct dfa *d)
+{
+ ptrdiff_t i;
+
+ free (d->multibyte_prop);
+
+ for (i = 0; i < d->nmbcsets; ++i)
+ free (d->mbcsets[i].chars);
+
+ free (d->mbcsets);
+ free (d->mb_follows.elems);
+
+ if (d->mb_trans)
+ {
+ state_num s;
+ for (s = -1; s < d->tralloc; s++)
+ free (d->mb_trans[s]);
+ free (d->mb_trans - 2);
+ }
+}
+
+/* Return true if every construct in D is supported by this DFA matcher. */
+static bool _GL_ATTRIBUTE_PURE
+dfa_supported (struct dfa const *d)
+{
+ size_t i;
+ for (i = 0; i < d->tindex; i++)
+ {
+ switch (d->tokens[i])
+ {
+ case BEGWORD:
+ case ENDWORD:
+ case LIMWORD:
+ case NOTLIMWORD:
+ if (!d->localeinfo.multibyte)
+ continue;
+ /* fallthrough */
+
+ case BACKREF:
+ case MBCSET:
+ return false;
+ }
+ }
+ return true;
+}
+
+static void
+dfaoptimize (struct dfa *d)
+{
+ size_t i;
+ bool have_backref = false;
+
+ if (!d->localeinfo.using_utf8)
+ return;
+
+ for (i = 0; i < d->tindex; ++i)
+ {
+ switch (d->tokens[i])
+ {
+ case ANYCHAR:
+ /* Lowered. */
+ abort ();
+ case BACKREF:
+ have_backref = true;
+ break;
+ case MBCSET:
+ /* Requires multi-byte algorithm. */
+ return;
+ default:
+ break;
+ }
+ }
+
+ if (!have_backref && d->superset)
+ {
+ /* The superset DFA is not likely to be much faster, so remove it. */
+ dfafree (d->superset);
+ free (d->superset);
+ d->superset = NULL;
+ }
+
+ free_mbdata (d);
+ d->localeinfo.multibyte = false;
+ d->dfaexec = dfaexec_sb;
+ d->fast = true;
+}
+
+static void
+dfassbuild (struct dfa *d)
+{
+ size_t i, j;
+ bool have_achar = false;
+ bool have_nchar = false;
+ struct dfa *sup = dfaalloc ();
+
+ *sup = *d;
+ sup->localeinfo.multibyte = false;
+ sup->dfaexec = dfaexec_sb;
+ sup->multibyte_prop = NULL;
+ sup->mbcsets = NULL;
+ sup->superset = NULL;
+ sup->states = NULL;
+ sup->sindex = 0;
+ sup->follows = NULL;
+ sup->tralloc = 0;
+ sup->trans = NULL;
+ sup->fails = NULL;
+ sup->success = NULL;
+ sup->newlines = NULL;
+
+ sup->charclasses = xnmalloc (sup->calloc, sizeof *sup->charclasses);
+ if (d->cindex)
+ {
+ memcpy (sup->charclasses, d->charclasses,
+ d->cindex * sizeof *sup->charclasses);
+ }
+
+ sup->tokens = xnmalloc (d->tindex, 2 * sizeof *sup->tokens);
+ sup->talloc = d->tindex * 2;
+
+ for (i = j = 0; i < d->tindex; i++)
+ {
+ switch (d->tokens[i])
+ {
+ case ANYCHAR:
+ case MBCSET:
+ case BACKREF:
+ {
+ charclass ccl;
+ fillset (ccl);
+ sup->tokens[j++] = CSET + charclass_index (sup, ccl);
+ sup->tokens[j++] = STAR;
+ if (d->tokens[i + 1] == QMARK || d->tokens[i + 1] == STAR
+ || d->tokens[i + 1] == PLUS)
+ i++;
+ have_achar = true;
+ }
+ break;
+ case BEGWORD:
+ case ENDWORD:
+ case LIMWORD:
+ case NOTLIMWORD:
+ if (d->localeinfo.multibyte)
+ {
+ /* These constraints aren't supported in a multibyte locale.
+ Ignore them in the superset DFA. */
+ sup->tokens[j++] = EMPTY;
+ break;
+ }
+ /* fallthrough */
+ default:
+ sup->tokens[j++] = d->tokens[i];
+ if ((0 <= d->tokens[i] && d->tokens[i] < NOTCHAR)
+ || d->tokens[i] >= CSET)
+ have_nchar = true;
+ break;
+ }
+ }
+ sup->tindex = j;
+
+ if (have_nchar && (have_achar || d->localeinfo.multibyte))
+ d->superset = sup;
+ else
+ {
+ dfafree (sup);
+ free (sup);
+ }
+}
+
+/* Parse and analyze a single string of the given length. */
+void
+dfacomp (char const *s, size_t len, struct dfa *d, bool searchflag)
+{
+ dfaparse (s, len, d);
+ dfassbuild (d);
+
+ if (dfa_supported (d))
+ {
+ dfaoptimize (d);
+ dfaanalyze (d, searchflag);
+ }
+ else
+ {
+ d->dfaexec = dfaexec_noop;
+ }
+
+ if (d->superset)
+ {
+ d->fast = true;
+ dfaanalyze (d->superset, searchflag);
+ }
+}
+
+/* Free the storage held by the components of a dfa. */
+void
+dfafree (struct dfa *d)
+{
+ size_t i;
+
+ free (d->charclasses);
+ free (d->tokens);
+
+ if (d->localeinfo.multibyte)
+ free_mbdata (d);
+
+ for (i = 0; i < d->sindex; ++i)
+ {
+ free (d->states[i].elems.elems);
+ free (d->states[i].mbps.elems);
+ }
+ free (d->states);
+
+ if (d->follows)
+ {
+ for (i = 0; i < d->tindex; ++i)
+ free (d->follows[i].elems);
+ free (d->follows);
+ }
+
+ if (d->trans)
+ {
+ for (i = 0; i < d->tralloc; ++i)
+ {
+ free (d->trans[i]);
+ free (d->fails[i]);
+ }
+
+ free (d->trans - 2);
+ free (d->fails);
+ free (d->newlines);
+ free (d->success);
+ }
+
+ if (d->superset)
+ dfafree (d->superset);
+}
+
+/* Having found the postfix representation of the regular expression,
+ try to find a long sequence of characters that must appear in any line
+ containing the r.e.
+ Finding a "longest" sequence is beyond the scope here;
+ we take an easy way out and hope for the best.
+ (Take "(ab|a)b"--please.)
+
+ We do a bottom-up calculation of sequences of characters that must appear
+ in matches of r.e.'s represented by trees rooted at the nodes of the postfix
+ representation:
+ sequences that must appear at the left of the match ("left")
+ sequences that must appear at the right of the match ("right")
+ lists of sequences that must appear somewhere in the match ("in")
+ sequences that must constitute the match ("is")
+
+ When we get to the root of the tree, we use one of the longest of its
+ calculated "in" sequences as our answer.
+
+ The sequences calculated for the various types of node (in pseudo ANSI c)
+ are shown below. "p" is the operand of unary operators (and the left-hand
+ operand of binary operators); "q" is the right-hand operand of binary
+ operators.
+
+ "ZERO" means "a zero-length sequence" below.
+
+ Type left right is in
+ ---- ---- ----- -- --
+ char c # c # c # c # c
+
+ ANYCHAR ZERO ZERO ZERO ZERO
+
+ MBCSET ZERO ZERO ZERO ZERO
+
+ CSET ZERO ZERO ZERO ZERO
+
+ STAR ZERO ZERO ZERO ZERO
+
+ QMARK ZERO ZERO ZERO ZERO
+
+ PLUS p->left p->right ZERO p->in
+
+ CAT (p->is==ZERO)? (q->is==ZERO)? (p->is!=ZERO && p->in plus
+ p->left : q->right : q->is!=ZERO) ? q->in plus
+ p->is##q->left p->right##q->is p->is##q->is : p->right##q->left
+ ZERO
+
+ OR longest common longest common (do p->is and substrings common
+ leading trailing to q->is have same p->in and
+ (sub)sequence (sub)sequence q->in length and content) ?
+ of p->left of p->right
+ and q->left and q->right p->is : NULL
+
+ If there's anything else we recognize in the tree, all four sequences get set
+ to zero-length sequences. If there's something we don't recognize in the
+ tree, we just return a zero-length sequence.
+
+ Break ties in favor of infrequent letters (choosing 'zzz' in preference to
+ 'aaa')?
+
+ And ... is it here or someplace that we might ponder "optimizations" such as
+ egrep 'psi|epsilon' -> egrep 'psi'
+ egrep 'pepsi|epsilon' -> egrep 'epsi'
+ (Yes, we now find "epsi" as a "string
+ that must occur", but we might also
+ simplify the *entire* r.e. being sought)
+ grep '[c]' -> grep 'c'
+ grep '(ab|a)b' -> grep 'ab'
+ grep 'ab*' -> grep 'a'
+ grep 'a*b' -> grep 'b'
+
+ There are several issues:
+
+ Is optimization easy (enough)?
+
+ Does optimization actually accomplish anything,
+ or is the automaton you get from "psi|epsilon" (for example)
+ the same as the one you get from "psi" (for example)?
+
+ Are optimizable r.e.'s likely to be used in real-life situations
+ (something like 'ab*' is probably unlikely; something like is
+ 'psi|epsilon' is likelier)? */
+
+static char *
+icatalloc (char *old, char const *new)
+{
+ char *result;
+ size_t oldsize;
+ size_t newsize = strlen (new);
+ if (newsize == 0)
+ return old;
+ oldsize = strlen (old);
+ result = xrealloc (old, oldsize + newsize + 1);
+ memcpy (result + oldsize, new, newsize + 1);
+ return result;
+}
+
+static void
+freelist (char **cpp)
+{
+ while (*cpp)
+ free (*cpp++);
+}
+
+static char **
+enlist (char **cpp, char *new, size_t len)
+{
+ size_t i, j;
+ new = memcpy (xmalloc (len + 1), new, len);
+ new[len] = '\0';
+ /* Is there already something in the list that's new (or longer)? */
+ for (i = 0; cpp[i] != NULL; ++i)
+ if (strstr (cpp[i], new) != NULL)
+ {
+ free (new);
+ return cpp;
+ }
+ /* Eliminate any obsoleted strings. */
+ j = 0;
+ while (cpp[j] != NULL)
+ if (strstr (new, cpp[j]) == NULL)
+ ++j;
+ else
+ {
+ free (cpp[j]);
+ if (--i == j)
+ break;
+ cpp[j] = cpp[i];
+ cpp[i] = NULL;
+ }
+ /* Add the new string. */
+ cpp = xnrealloc (cpp, i + 2, sizeof *cpp);
+ cpp[i] = new;
+ cpp[i + 1] = NULL;
+ return cpp;
+}
+
+/* Given pointers to two strings, return a pointer to an allocated
+ list of their distinct common substrings. */
+static char **
+comsubs (char *left, char const *right)
+{
+ char **cpp = xzalloc (sizeof *cpp);
+ char *lcp;
+
+ for (lcp = left; *lcp != '\0'; ++lcp)
+ {
+ size_t len = 0;
+ char *rcp = strchr (right, *lcp);
+ while (rcp != NULL)
+ {
+ size_t i;
+ for (i = 1; lcp[i] != '\0' && lcp[i] == rcp[i]; ++i)
+ continue;
+ if (i > len)
+ len = i;
+ rcp = strchr (rcp + 1, *lcp);
+ }
+ if (len != 0)
+ cpp = enlist (cpp, lcp, len);
+ }
+ return cpp;
+}
+
+static char **
+addlists (char **old, char **new)
+{
+ for (; *new; new++)
+ old = enlist (old, *new, strlen (*new));
+ return old;
+}
+
+/* Given two lists of substrings, return a new list giving substrings
+ common to both. */
+static char **
+inboth (char **left, char **right)
+{
+ char **both = xzalloc (sizeof *both);
+ size_t lnum, rnum;
+
+ for (lnum = 0; left[lnum] != NULL; ++lnum)
+ {
+ for (rnum = 0; right[rnum] != NULL; ++rnum)
+ {
+ char **temp = comsubs (left[lnum], right[rnum]);
+ both = addlists (both, temp);
+ freelist (temp);
+ free (temp);
+ }
+ }
+ return both;
+}
+
+typedef struct must must;
+
+struct must
+{
+ char **in;
+ char *left;
+ char *right;
+ char *is;
+ bool begline;
+ bool endline;
+ must *prev;
+};
+
+static must *
+allocmust (must *mp, size_t size)
+{
+ must *new_mp = xmalloc (sizeof *new_mp);
+ new_mp->in = xzalloc (sizeof *new_mp->in);
+ new_mp->left = xzalloc (size);
+ new_mp->right = xzalloc (size);
+ new_mp->is = xzalloc (size);
+ new_mp->begline = false;
+ new_mp->endline = false;
+ new_mp->prev = mp;
+ return new_mp;
+}
+
+static void
+resetmust (must *mp)
+{
+ freelist (mp->in);
+ mp->in[0] = NULL;
+ mp->left[0] = mp->right[0] = mp->is[0] = '\0';
+ mp->begline = false;
+ mp->endline = false;
+}
+
+static void
+freemust (must *mp)
+{
+ freelist (mp->in);
+ free (mp->in);
+ free (mp->left);
+ free (mp->right);
+ free (mp->is);
+ free (mp);
+}
+
+struct dfamust *
+dfamust (struct dfa const *d)
+{
+ must *mp = NULL;
+ char const *result = "";
+ size_t i, ri;
+ bool exact = false;
+ bool begline = false;
+ bool endline = false;
+ size_t rj;
+ bool need_begline = false;
+ bool need_endline = false;
+ bool case_fold_unibyte = d->syntax.case_fold && MB_CUR_MAX == 1;
+ struct dfamust *dm;
+
+ for (ri = 0; ri < d->tindex; ++ri)
+ {
+ token t = d->tokens[ri];
+ switch (t)
+ {
+ case BEGLINE:
+ mp = allocmust (mp, 2);
+ mp->begline = true;
+ need_begline = true;
+ break;
+ case ENDLINE:
+ mp = allocmust (mp, 2);
+ mp->endline = true;
+ need_endline = true;
+ break;
+ case LPAREN:
+ case RPAREN:
+ assert (!"neither LPAREN nor RPAREN may appear here");
+
+ case EMPTY:
+ case BEGWORD:
+ case ENDWORD:
+ case LIMWORD:
+ case NOTLIMWORD:
+ case BACKREF:
+ case ANYCHAR:
+ case MBCSET:
+ mp = allocmust (mp, 2);
+ break;
+
+ case STAR:
+ case QMARK:
+ resetmust (mp);
+ break;
+
+ case OR:
+ {
+ char **new;
+ must *rmp = mp;
+ must *lmp = mp = mp->prev;
+ size_t j, ln, rn, n;
+
+ /* Guaranteed to be. Unlikely, but ... */
+ if (STREQ (lmp->is, rmp->is))
+ {
+ lmp->begline &= rmp->begline;
+ lmp->endline &= rmp->endline;
+ }
+ else
+ {
+ lmp->is[0] = '\0';
+ lmp->begline = false;
+ lmp->endline = false;
+ }
+ /* Left side--easy */
+ i = 0;
+ while (lmp->left[i] != '\0' && lmp->left[i] == rmp->left[i])
+ ++i;
+ lmp->left[i] = '\0';
+ /* Right side */
+ ln = strlen (lmp->right);
+ rn = strlen (rmp->right);
+ n = ln;
+ if (n > rn)
+ n = rn;
+ for (i = 0; i < n; ++i)
+ if (lmp->right[ln - i - 1] != rmp->right[rn - i - 1])
+ break;
+ for (j = 0; j < i; ++j)
+ lmp->right[j] = lmp->right[(ln - i) + j];
+ lmp->right[j] = '\0';
+ new = inboth (lmp->in, rmp->in);
+ freelist (lmp->in);
+ free (lmp->in);
+ lmp->in = new;
+ freemust (rmp);
+ }
+ break;
+
+ case PLUS:
+ mp->is[0] = '\0';
+ break;
+
+ case END:
+ assert (!mp->prev);
+ for (i = 0; mp->in[i] != NULL; ++i)
+ if (strlen (mp->in[i]) > strlen (result))
+ result = mp->in[i];
+ if (STREQ (result, mp->is))
+ {
+ if ((!need_begline || mp->begline) && (!need_endline
+ || mp->endline))
+ exact = true;
+ begline = mp->begline;
+ endline = mp->endline;
+ }
+ goto done;
+
+ case CAT:
+ {
+ must *rmp = mp;
+ must *lmp = mp = mp->prev;
+
+ /* In. Everything in left, plus everything in
+ right, plus concatenation of
+ left's right and right's left. */
+ lmp->in = addlists (lmp->in, rmp->in);
+ if (lmp->right[0] != '\0' && rmp->left[0] != '\0')
+ {
+ size_t lrlen = strlen (lmp->right);
+ size_t rllen = strlen (rmp->left);
+ char *tp = xmalloc (lrlen + rllen);
+ memcpy (tp, lmp->right, lrlen);
+ memcpy (tp + lrlen, rmp->left, rllen);
+ lmp->in = enlist (lmp->in, tp, lrlen + rllen);
+ free (tp);
+ }
+ /* Left-hand */
+ if (lmp->is[0] != '\0')
+ lmp->left = icatalloc (lmp->left, rmp->left);
+ /* Right-hand */
+ if (rmp->is[0] == '\0')
+ lmp->right[0] = '\0';
+ lmp->right = icatalloc (lmp->right, rmp->right);
+ /* Guaranteed to be */
+ if ((lmp->is[0] != '\0' || lmp->begline)
+ && (rmp->is[0] != '\0' || rmp->endline))
+ {
+ lmp->is = icatalloc (lmp->is, rmp->is);
+ lmp->endline = rmp->endline;
+ }
+ else
+ {
+ lmp->is[0] = '\0';
+ lmp->begline = false;
+ lmp->endline = false;
+ }
+ freemust (rmp);
+ }
+ break;
+
+ case '\0':
+ /* Not on *my* shift. */
+ goto done;
+
+ default:
+ if (CSET <= t)
+ {
+ /* If T is a singleton, or if case-folding in a unibyte
+ locale and T's members all case-fold to the same char,
+ convert T to one of its members. Otherwise, do
+ nothing further with T. */
+ charclass *ccl = &d->charclasses[t - CSET];
+ int j;
+ for (j = 0; j < NOTCHAR; j++)
+ if (tstbit (j, *ccl))
+ break;
+ if (! (j < NOTCHAR))
+ {
+ mp = allocmust (mp, 2);
+ break;
+ }
+ t = j;
+ while (++j < NOTCHAR)
+ if (tstbit (j, *ccl)
+ && ! (case_fold_unibyte
+ && toupper (j) == toupper (t)))
+ break;
+ if (j < NOTCHAR)
+ {
+ mp = allocmust (mp, 2);
+ break;
+ }
+ }
+
+ rj = ri + 2;
+ if (d->tokens[ri + 1] == CAT)
+ {
+ for (; rj < d->tindex - 1; rj += 2)
+ {
+ if ((rj != ri && (d->tokens[rj] <= 0
+ || NOTCHAR <= d->tokens[rj]))
+ || d->tokens[rj + 1] != CAT)
+ break;
+ }
+ }
+ mp = allocmust (mp, ((rj - ri) >> 1) + 1);
+ mp->is[0] = mp->left[0] = mp->right[0]
+ = case_fold_unibyte ? toupper (t) : t;
+
+ for (i = 1; ri + 2 < rj; i++)
+ {
+ ri += 2;
+ t = d->tokens[ri];
+ mp->is[i] = mp->left[i] = mp->right[i]
+ = case_fold_unibyte ? toupper (t) : t;
+ }
+ mp->is[i] = mp->left[i] = mp->right[i] = '\0';
+ mp->in = enlist (mp->in, mp->is, i);
+ break;
+ }
+ }
+ done:;
+
+ dm = NULL;
+ if (*result)
+ {
+ dm = xmalloc (sizeof *dm);
+ dm->exact = exact;
+ dm->begline = begline;
+ dm->endline = endline;
+ dm->must = xstrdup (result);
+ }
+
+ while (mp)
+ {
+ must *prev = mp->prev;
+ freemust (mp);
+ mp = prev;
+ }
+
+ return dm;
+}
+
+void
+dfamustfree (struct dfamust *dm)
+{
+ free (dm->must);
+ free (dm);
+}
+
+struct dfa *
+dfaalloc (void)
+{
+ return xmalloc (sizeof (struct dfa));
+}
+
+/* Initialize DFA. */
+void
+dfasyntax (struct dfa *dfa, struct localeinfo const *linfo,
+ reg_syntax_t bits, int dfaopts)
+{
+ int i;
+ memset (dfa, 0, offsetof (struct dfa, dfaexec));
+ dfa->dfaexec = linfo->multibyte ? dfaexec_mb : dfaexec_sb;
+ dfa->simple_locale = using_simple_locale (linfo->multibyte);
+ dfa->localeinfo = *linfo;
+
+ dfa->fast = !dfa->localeinfo.multibyte;
+
+ dfa->canychar = -1;
+ dfa->lex.cur_mb_len = 1;
+ dfa->syntax.syntax_bits_set = true;
+ dfa->syntax.case_fold = (bits & RE_ICASE) != 0;
+ dfa->syntax.anchor = (dfaopts & DFA_ANCHOR) != 0;
+ dfa->syntax.eolbyte = dfaopts & DFA_EOL_NUL ? '\0' : '\n';
+ dfa->syntax.syntax_bits = bits;
+
+ for (i = CHAR_MIN; i <= CHAR_MAX; ++i)
+ {
+ unsigned char uc = i;
+
+ dfa->syntax.sbit[uc] = char_context (dfa, uc);
+ switch (dfa->syntax.sbit[uc])
+ {
+ case CTX_LETTER:
+ setbit (uc, dfa->syntax.letters);
+ break;
+ case CTX_NEWLINE:
+ setbit (uc, dfa->syntax.newline);
+ break;
+ }
+
+ /* POSIX requires that the five bytes in "\n\r./" (including the
+ terminating NUL) cannot occur inside a multibyte character. */
+ dfa->syntax.never_trail[uc] = (dfa->localeinfo.using_utf8
+ ? (uc & 0xc0) != 0x80
+ : strchr ("\n\r./", uc) != NULL);
+ }
+}
+
+/* vim:set shiftwidth=2: */
diff --git a/lib/dfa.h b/lib/dfa.h
new file mode 100644
index 0000000..500ee76
--- /dev/null
+++ b/lib/dfa.h
@@ -0,0 +1,123 @@
+/* dfa.h - declarations for GNU deterministic regexp compiler
+ Copyright (C) 1988, 1998, 2007, 2009-2016 Free Software Foundation, Inc.
+
+ This 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, write to the Free Software
+ Foundation, Inc.,
+ 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA */
+
+/* Written June, 1988 by Mike Haertel */
+
+#include <regex.h>
+#include <stdbool.h>
+#include <stddef.h>
+
+#if 3 <= __GNUC__
+# define _GL_ATTRIBUTE_MALLOC __attribute__ ((__malloc__))
+#else
+# define _GL_ATTRIBUTE_MALLOC
+#endif
+
+struct localeinfo; /* See localeinfo.h. */
+
+/* Element of a list of strings, at least one of which is known to
+ appear in any R.E. matching the DFA. */
+struct dfamust
+{
+ bool exact;
+ bool begline;
+ bool endline;
+ char *must;
+};
+
+/* The dfa structure. It is completely opaque. */
+struct dfa;
+
+/* Entry points. */
+
+/* Allocate a struct dfa. The struct dfa is completely opaque.
+ The returned pointer should be passed directly to free() after
+ calling dfafree() on it. */
+extern struct dfa *dfaalloc (void) _GL_ATTRIBUTE_MALLOC;
+
+/* DFA options that can be ORed together, for dfasyntax's 4th arg. */
+enum
+ {
+ /* ^ and $ match only the start and end of data, and do not match
+ end-of-line within data. This is always false for grep, but
+ possibly true for other apps. */
+ DFA_ANCHOR = 1 << 0,
+
+ /* '\0' in data is end-of-line, instead of the traditional '\n'. */
+ DFA_EOL_NUL = 1 << 1
+ };
+
+/* Initialize or reinitialize a DFA. This must be called before
+ any of the routines below. The arguments are:
+ 1. The DFA to operate on.
+ 2. Information about the current locale.
+ 3. Syntax bits described in regex.h.
+ 4. Additional DFA options described above. */
+extern void dfasyntax (struct dfa *, struct localeinfo const *,
+ reg_syntax_t, int);
+
+/* Build and return the struct dfamust from the given struct dfa. */
+extern struct dfamust *dfamust (struct dfa const *);
+
+/* Free the storage held by the components of a struct dfamust. */
+extern void dfamustfree (struct dfamust *);
+
+/* Compile the given string of the given length into the given struct dfa.
+ Final argument is a flag specifying whether to build a searching or an
+ exact matcher. */
+extern void dfacomp (char const *, size_t, struct dfa *, bool);
+
+/* Search through a buffer looking for a match to the given struct dfa.
+ Find the first occurrence of a string matching the regexp in the
+ buffer, and the shortest possible version thereof. Return a pointer to
+ the first character after the match, or NULL if none is found. BEGIN
+ points to the beginning of the buffer, and END points to the first byte
+ after its end. Note however that we store a sentinel byte (usually
+ newline) in *END, so the actual buffer must be one byte longer.
+ When ALLOW_NL is true, newlines may appear in the matching string.
+ If COUNT is non-NULL, increment *COUNT once for each newline processed.
+ Finally, if BACKREF is non-NULL set *BACKREF to indicate whether we
+ encountered a back-reference. The caller can use this to decide
+ whether to fall back on a backtracking matcher. */
+extern char *dfaexec (struct dfa *d, char const *begin, char *end,
+ bool allow_nl, size_t *count, bool *backref);
+
+/* Return a superset for D. The superset matches everything that D
+ matches, along with some other strings (though the latter should be
+ rare, for efficiency reasons). Return a null pointer if no useful
+ superset is available. */
+extern struct dfa *dfasuperset (struct dfa const *d) _GL_ATTRIBUTE_PURE;
+
+/* The DFA is likely to be fast. */
+extern bool dfaisfast (struct dfa const *) _GL_ATTRIBUTE_PURE;
+
+/* Free the storage held by the components of a struct dfa. */
+extern void dfafree (struct dfa *);
+
+/* Error handling. */
+
+/* dfawarn() is called by the regexp routines whenever a regex is compiled
+ that likely doesn't do what the user wanted. It takes a single
+ argument, a NUL-terminated string describing the situation. The user
+ must supply a dfawarn. */
+extern void dfawarn (const char *);
+
+/* dfaerror() is called by the regexp routines whenever an error occurs. It
+ takes a single argument, a NUL-terminated string describing the error.
+ The user must supply a dfaerror. */
+extern _Noreturn void dfaerror (const char *);
diff --git a/lib/dirname-lgpl.c b/lib/dirname-lgpl.c
index 2895cbc..a7aabf9 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-2012 Free Software
+ Copyright (C) 1990, 1998, 2000-2001, 2003-2006, 2009-2016 Free Software
Foundation, Inc.
This program is free software: you can redistribute it and/or modify
diff --git a/lib/dirname.h b/lib/dirname.h
index 51a685c..875b31b 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-2012 Free Software Foundation,
+ Copyright (C) 1998, 2001, 2003-2006, 2009-2016 Free Software Foundation,
Inc.
This program is free software: you can redistribute it and/or modify
@@ -31,6 +31,10 @@
# define DOUBLE_SLASH_IS_DISTINCT_ROOT 0
# endif
+#ifdef __cplusplus
+extern "C" {
+#endif
+
# if GNULIB_DIRNAME
char *base_name (char const *file);
char *dir_name (char const *file);
@@ -43,4 +47,8 @@ char *last_component (char const *file) _GL_ATTRIBUTE_PURE;
bool strip_trailing_slashes (char *file);
+#ifdef __cplusplus
+} /* extern "C" */
+#endif
+
#endif /* not DIRNAME_H_ */
diff --git a/lib/dosname.h b/lib/dosname.h
index 0468ce4..83a953f 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-2012 Free Software Foundation, Inc.
+ Copyright (C) 2000-2001, 2004-2006, 2009-2016 Free Software Foundation, Inc.
This 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/errno.in.h b/lib/errno.in.h
index daf7b44..b8397ee 100644
--- a/lib/errno.in.h
+++ b/lib/errno.in.h
@@ -1,8 +1,6 @@
-/* -*- buffer-read-only: t -*- vi: set ro: */
-/* DO NOT EDIT! GENERATED AUTOMATICALLY! */
/* A POSIX-like <errno.h>.
- Copyright (C) 2008-2012 Free Software Foundation, Inc.
+ Copyright (C) 2008-2016 Free Software Foundation, Inc.
This 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/error.c b/lib/error.c
index 7d2bc71..b3b1286 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-2012 Free Software Foundation, Inc.
+ Copyright (C) 1990-1998, 2000-2007, 2009-2016 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
@@ -39,6 +39,11 @@
# include <stdint.h>
# include <wchar.h>
# define mbsrtowcs __mbsrtowcs
+# define USE_UNLOCKED_IO 0
+# define _GL_ATTRIBUTE_FORMAT_PRINTF(a, b)
+# define _GL_ARG_NONNULL(a)
+#else
+# include "getprogname.h"
#endif
#if USE_UNLOCKED_IO
@@ -72,14 +77,14 @@ extern void __error (int status, int errnum, const char *message, ...)
extern void __error_at_line (int status, int errnum, const char *file_name,
unsigned int line_number, const char *message,
...)
- __attribute__ ((__format__ (__printf__, 5, 6)));;
+ __attribute__ ((__format__ (__printf__, 5, 6)));
# define error __error
# define error_at_line __error_at_line
# include <libio/iolibio.h>
-# define fflush(s) INTUSE(_IO_fflush) (s)
+# define fflush(s) _IO_fflush (s)
# undef putc
-# define putc(c, fp) INTUSE(_IO_putc) (c, fp)
+# define putc(c, fp) _IO_putc (c, fp)
# include <bits/libc-lock.h>
@@ -110,9 +115,7 @@ int strerror_r ();
# endif
# endif
-/* The calling program should define program_name and set it to the
- name of the executing program. */
-extern char *program_name;
+#define program_name getprogname ()
# if HAVE_STRERROR_R || defined strerror_r
# define __strerror_r strerror_r
@@ -171,7 +174,7 @@ print_errno_message (int errnum)
#if defined HAVE_STRERROR_R || _LIBC
char errbuf[1024];
-# if STRERROR_R_CHAR_P || _LIBC
+# if _LIBC || STRERROR_R_CHAR_P
s = __strerror_r (errnum, errbuf, sizeof errbuf);
# else
if (__strerror_r (errnum, errbuf, sizeof errbuf) == 0)
@@ -195,13 +198,12 @@ print_errno_message (int errnum)
#endif
}
-static void
+static void _GL_ATTRIBUTE_FORMAT_PRINTF (3, 0) _GL_ARG_NONNULL ((3))
error_tail (int status, int errnum, const char *message, va_list args)
{
#if _LIBC
if (_IO_fwide (stderr, 0) > 0)
{
-# define ALLOCA_LIMIT 2000
size_t len = strlen (message) + 1;
wchar_t *wmessage = NULL;
mbstate_t st;
@@ -237,7 +239,7 @@ error_tail (int status, int errnum, const char *message, va_list args)
if (res != len)
break;
- if (__builtin_expect (len >= SIZE_MAX / 2, 0))
+ if (__builtin_expect (len >= SIZE_MAX / sizeof (wchar_t) / 2, 0))
{
/* This really should not happen if everything is fine. */
res = (size_t) -1;
@@ -342,7 +344,10 @@ error_at_line (int status, int errnum, const char *file_name,
if (old_line_number == line_number
&& (file_name == old_file_name
- || strcmp (old_file_name, file_name) == 0))
+ || (old_file_name != NULL
+ && file_name != NULL
+ && strcmp (old_file_name, file_name) == 0)))
+
/* Simply return and print nothing. */
return;
@@ -374,10 +379,10 @@ error_at_line (int status, int errnum, const char *file_name,
}
#if _LIBC
- __fxprintf (NULL, file_name != NULL ? "%s:%d: " : " ",
+ __fxprintf (NULL, file_name != NULL ? "%s:%u: " : " ",
file_name, line_number);
#else
- fprintf (stderr, file_name != NULL ? "%s:%d: " : " ",
+ fprintf (stderr, file_name != NULL ? "%s:%u: " : " ",
file_name, line_number);
#endif
diff --git a/lib/error.h b/lib/error.h
index 9c2cb8b..6a69db0 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-2012 Free Software Foundation,
+ Copyright (C) 1995-1997, 2003, 2006, 2008-2016 Free Software Foundation,
Inc.
This file is part of the GNU C Library.
@@ -31,6 +31,16 @@
# define _GL_ATTRIBUTE_FORMAT(spec) /* empty */
#endif
+/* On mingw, the flavor of printf depends on whether the extensions module
+ * is in use; the check for <stdio.h> determines the witness macro. */
+#ifndef _GL_ATTRIBUTE_SPEC_PRINTF
+# if GNULIB_PRINTF_ATTRIBUTE_FLAVOR_GNU
+# define _GL_ATTRIBUTE_SPEC_PRINTF __gnu_printf__
+# else
+# define _GL_ATTRIBUTE_SPEC_PRINTF __printf__
+# endif
+#endif
+
#ifdef __cplusplus
extern "C" {
#endif
@@ -40,11 +50,11 @@ extern "C" {
If STATUS is nonzero, terminate the program with 'exit (STATUS)'. */
extern void error (int __status, int __errnum, const char *__format, ...)
- _GL_ATTRIBUTE_FORMAT ((__printf__, 3, 4));
+ _GL_ATTRIBUTE_FORMAT ((_GL_ATTRIBUTE_SPEC_PRINTF, 3, 4));
extern void error_at_line (int __status, int __errnum, const char *__fname,
unsigned int __lineno, const char *__format, ...)
- _GL_ATTRIBUTE_FORMAT ((__printf__, 5, 6));
+ _GL_ATTRIBUTE_FORMAT ((_GL_ATTRIBUTE_SPEC_PRINTF, 5, 6));
/* If NULL, error will flush stdout, then print on stderr the program
name, a colon and a space. Otherwise, error will call this
diff --git a/lib/exitfail.c b/lib/exitfail.c
index fdd674c..8033c22 100644
--- a/lib/exitfail.c
+++ b/lib/exitfail.c
@@ -1,6 +1,6 @@
/* Failure exit status
- Copyright (C) 2002-2003, 2005-2007, 2009-2012 Free Software Foundation, Inc.
+ Copyright (C) 2002-2003, 2005-2007, 2009-2016 Free Software Foundation, Inc.
This 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/exitfail.h b/lib/exitfail.h
index 074f212..62311bd 100644
--- a/lib/exitfail.h
+++ b/lib/exitfail.h
@@ -1,6 +1,6 @@
/* Failure exit status
- Copyright (C) 2002, 2009-2012 Free Software Foundation, Inc.
+ Copyright (C) 2002, 2009-2016 Free Software Foundation, Inc.
This 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/fcntl.in.h b/lib/fcntl.in.h
index 604c31b..b943973 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-2012 Free Software Foundation, Inc.
+ Copyright (C) 2006-2016 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -34,7 +34,7 @@
extern "C" { ... } block, which leads to errors in C++ mode with the
overridden <sys/stat.h> from gnulib. These errors are known to be gone
with g++ version >= 4.3. */
-#if !(defined __GLIBC__ || defined __UCLIBC__) || (defined __cplusplus && defined GNULIB_NAMESPACE && !(__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3)))
+#if !(defined __GLIBC__ || defined __UCLIBC__) || (defined __cplusplus && defined GNULIB_NAMESPACE && (defined __ICC || !(__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3))))
# include <sys/stat.h>
#endif
#@INCLUDE_NEXT@ @NEXT_FCNTL_H@
@@ -53,7 +53,7 @@
extern "C" { ... } block, which leads to errors in C++ mode with the
overridden <sys/stat.h> from gnulib. These errors are known to be gone
with g++ version >= 4.3. */
-#if !(defined __GLIBC__ || defined __UCLIBC__) || (defined __cplusplus && defined GNULIB_NAMESPACE && !(__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3)))
+#if !(defined __GLIBC__ || defined __UCLIBC__) || (defined __cplusplus && defined GNULIB_NAMESPACE && (defined __ICC || !(__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3))))
# include <sys/stat.h>
#endif
/* The include_next requires a split double-inclusion guard. */
@@ -186,6 +186,22 @@ _GL_WARN_ON_USE (openat, "openat is not portable - "
/* Fix up the O_* macros. */
+/* AIX 7.1 with XL C 12.1 defines O_CLOEXEC, O_NOFOLLOW, and O_TTY_INIT
+ to values outside 'int' range, so omit these misdefinitions.
+ But avoid namespace pollution on non-AIX systems. */
+#ifdef _AIX
+# include <limits.h>
+# if defined O_CLOEXEC && ! (INT_MIN <= O_CLOEXEC && O_CLOEXEC <= INT_MAX)
+# undef O_CLOEXEC
+# endif
+# if defined O_NOFOLLOW && ! (INT_MIN <= O_NOFOLLOW && O_NOFOLLOW <= INT_MAX)
+# undef O_NOFOLLOW
+# endif
+# if defined O_TTY_INIT && ! (INT_MIN <= O_TTY_INIT && O_TTY_INIT <= INT_MAX)
+# undef O_TTY_INIT
+# endif
+#endif
+
#if !defined O_DIRECT && defined O_DIRECTIO
/* Tru64 spells it 'O_DIRECTIO'. */
# define O_DIRECT O_DIRECTIO
diff --git a/lib/fpending.c b/lib/fpending.c
new file mode 100644
index 0000000..ce93604
--- /dev/null
+++ b/lib/fpending.c
@@ -0,0 +1,60 @@
+/* fpending.c -- return the number of pending output bytes on a stream
+ Copyright (C) 2000, 2004, 2006-2007, 2009-2016 Free Software Foundation,
+ Inc.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+/* Written by Jim Meyering. */
+
+#include <config.h>
+
+/* Specification. */
+#include "fpending.h"
+
+#include "stdio-impl.h"
+
+/* Return the number of pending (aka buffered, unflushed)
+ bytes on the stream, FP, that is open for writing. */
+size_t
+__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 */
+ return fp->_IO_write_ptr - fp->_IO_write_base;
+#elif defined __sferror || defined __DragonFly__ || defined __ANDROID__
+ /* FreeBSD, NetBSD, OpenBSD, DragonFly, Mac OS X, Cygwin, Android */
+ return fp->_p - fp->_bf._base;
+#elif defined __EMX__ /* emx+gcc */
+ 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 */
+ return (fp_->_ptr ? fp_->_ptr - fp_->_base : 0);
+#elif defined __UCLIBC__ /* uClibc */
+ return (fp->__modeflags & __FLAG_WRITING ? fp->__bufpos - fp->__bufstart : 0);
+#elif defined __QNX__ /* QNX */
+ return (fp->_Mode & 0x2000 /*_MWRITE*/ ? fp->_Next - fp->_Buf : 0);
+#elif defined __MINT__ /* Atari FreeMiNT */
+ 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;
+#endif
+}
diff --git a/lib/fpending.h b/lib/fpending.h
new file mode 100644
index 0000000..61008aa
--- /dev/null
+++ b/lib/fpending.h
@@ -0,0 +1,29 @@
+/* Declare __fpending.
+
+ Copyright (C) 2000, 2003, 2005-2006, 2009-2016 Free Software Foundation,
+ Inc.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+ Written by Jim Meyering. */
+
+#include <stddef.h>
+#include <stdio.h>
+#if HAVE_STDIO_EXT_H
+# include <stdio_ext.h>
+#endif
+
+#if !HAVE_DECL___FPENDING
+size_t __fpending (FILE *) _GL_ATTRIBUTE_PURE;
+#endif
diff --git a/lib/fstat.c b/lib/fstat.c
index 0418cc6..435c429 100644
--- a/lib/fstat.c
+++ b/lib/fstat.c
@@ -1,5 +1,5 @@
/* fstat() replacement.
- Copyright (C) 2011-2012 Free Software Foundation, Inc.
+ Copyright (C) 2011-2016 Free Software Foundation, Inc.
This 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/fwriting.c b/lib/fwriting.c
index d4d2703..be9f3c3 100644
--- a/lib/fwriting.c
+++ b/lib/fwriting.c
@@ -1,5 +1,5 @@
/* Retrieve information about a FILE stream.
- Copyright (C) 2007-2012 Free Software Foundation, Inc.
+ Copyright (C) 2007-2016 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -29,14 +29,15 @@ fwriting (FILE *fp)
fast macros. */
#if 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__ /* FreeBSD, NetBSD, OpenBSD, DragonFly, Mac OS X, Cygwin */
+#elif defined __sferror || defined __DragonFly__ || defined __ANDROID__
+ /* FreeBSD, NetBSD, OpenBSD, DragonFly, Mac OS X, Cygwin, Android */
return (fp_->_flags & __SWR) != 0;
#elif defined __EMX__ /* emx+gcc */
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, NonStop Kernel */
- return (fp->_flag & _IOWRT) != 0;
+#elif defined _IOERR /* AIX, HP-UX, IRIX, OSF/1, Solaris, OpenServer, mingw, MSVC, NonStop Kernel */
+ return (fp_->_flag & _IOWRT) != 0;
#elif defined __UCLIBC__ /* uClibc */
return (fp->__modeflags & __FLAG_WRITING) != 0;
#elif defined __QNX__ /* QNX */
diff --git a/lib/fwriting.h b/lib/fwriting.h
index 13415b9..f4c7ed7 100644
--- a/lib/fwriting.h
+++ b/lib/fwriting.h
@@ -1,5 +1,5 @@
/* Retrieve information about a FILE stream.
- Copyright (C) 2007, 2009-2012 Free Software Foundation, Inc.
+ Copyright (C) 2007, 2009-2016 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -44,7 +44,7 @@
extern "C" {
# endif
-extern bool fwriting (FILE *stream);
+extern bool fwriting (FILE *stream) _GL_ATTRIBUTE_PURE;
# ifdef __cplusplus
}
diff --git a/lib/get-permissions.c b/lib/get-permissions.c
new file mode 100644
index 0000000..bf40dad
--- /dev/null
+++ b/lib/get-permissions.c
@@ -0,0 +1,291 @@
+/* Get permissions of a file. -*- coding: utf-8 -*-
+
+ Copyright (C) 2002-2003, 2005-2016 Free Software Foundation, Inc.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+ Written by Paul Eggert, Andreas Grünbacher, and Bruno Haible. */
+
+#include <config.h>
+
+#include <string.h>
+#include "acl.h"
+
+#include "acl-internal.h"
+
+/* Read the permissions of a file into CTX. If DESC is a valid file descriptor,
+ use file descriptor operations, else use filename based operations on NAME.
+ MODE is the file mode obtained from a previous stat call.
+ Return 0 if successful. Return -1 and set errno upon failure. */
+
+int
+get_permissions (const char *name, int desc, mode_t mode,
+ struct permission_context *ctx)
+{
+ memset (ctx, 0, sizeof *ctx);
+ ctx->mode = mode;
+
+#if USE_ACL && HAVE_ACL_GET_FILE
+ /* POSIX 1003.1e (draft 17 -- abandoned) specific version. */
+ /* Linux, FreeBSD, Mac OS X, IRIX, Tru64 */
+# if !HAVE_ACL_TYPE_EXTENDED
+ /* Linux, FreeBSD, IRIX, Tru64 */
+
+ if (HAVE_ACL_GET_FD && desc != -1)
+ ctx->acl = acl_get_fd (desc);
+ else
+ ctx->acl = acl_get_file (name, ACL_TYPE_ACCESS);
+ if (ctx->acl == NULL)
+ return acl_errno_valid (errno) ? -1 : 0;
+
+ /* With POSIX ACLs, a file cannot have "no" acl; a file without
+ extended permissions has a "minimal" acl which is equivalent to the
+ file mode. */
+
+ if (S_ISDIR (mode))
+ {
+ ctx->default_acl = acl_get_file (name, ACL_TYPE_DEFAULT);
+ if (ctx->default_acl == NULL)
+ return -1;
+ }
+
+# if HAVE_ACL_TYPE_NFS4 /* FreeBSD */
+
+ /* TODO (see set_permissions). */
+
+# endif
+
+# else /* HAVE_ACL_TYPE_EXTENDED */
+ /* Mac OS X */
+
+ /* On Mac OS X, acl_get_file (name, ACL_TYPE_ACCESS)
+ and acl_get_file (name, ACL_TYPE_DEFAULT)
+ always return NULL / EINVAL. You have to use
+ acl_get_file (name, ACL_TYPE_EXTENDED)
+ or acl_get_fd (open (name, ...))
+ to retrieve an ACL.
+ On the other hand,
+ acl_set_file (name, ACL_TYPE_ACCESS, acl)
+ and acl_set_file (name, ACL_TYPE_DEFAULT, acl)
+ have the same effect as
+ acl_set_file (name, ACL_TYPE_EXTENDED, acl):
+ Each of these calls sets the file's ACL. */
+
+ if (HAVE_ACL_GET_FD && desc != -1)
+ ctx->acl = acl_get_fd (desc);
+ else
+ ctx->acl = acl_get_file (name, ACL_TYPE_EXTENDED);
+ if (ctx->acl == NULL)
+ return acl_errno_valid (errno) ? -1 : 0;
+
+# endif
+
+#elif USE_ACL && defined GETACL /* Solaris, Cygwin, not HP-UX */
+
+ /* Solaris 2.5 through Solaris 10, Cygwin, and contemporaneous versions
+ of Unixware. The acl() call returns the access and default ACL both
+ at once. */
+# ifdef ACE_GETACL
+ /* Solaris also has a different variant of ACLs, used in ZFS and NFSv4
+ file systems (whereas the other ones are used in UFS file systems).
+ There is an API
+ pathconf (name, _PC_ACL_ENABLED)
+ fpathconf (desc, _PC_ACL_ENABLED)
+ that allows us to determine which of the two kinds of ACLs is supported
+ for the given file. But some file systems may implement this call
+ incorrectly, so better not use it.
+ When fetching the source ACL, we simply fetch both ACL types.
+ When setting the destination ACL, we try either ACL types, assuming
+ that the kernel will translate the ACL from one form to the other.
+ (See in <http://docs.sun.com/app/docs/doc/819-2241/6n4huc7ia?l=en&a=view>
+ the description of ENOTSUP.) */
+ for (;;)
+ {
+ int ret;
+
+ if (desc != -1)
+ ret = facl (desc, ACE_GETACLCNT, 0, NULL);
+ else
+ ret = acl (name, ACE_GETACLCNT, 0, NULL);
+ if (ret < 0)
+ {
+ if (errno == ENOSYS || errno == EINVAL)
+ ret = 0;
+ else
+ return -1;
+ }
+ ctx->ace_count = ret;
+
+ if (ctx->ace_count == 0)
+ break;
+
+ ctx->ace_entries = (ace_t *) malloc (ctx->ace_count * sizeof (ace_t));
+ if (ctx->ace_entries == NULL)
+ {
+ errno = ENOMEM;
+ return -1;
+ }
+
+ if (desc != -1)
+ ret = facl (desc, ACE_GETACL, ctx->ace_count, ctx->ace_entries);
+ else
+ ret = acl (name, ACE_GETACL, ctx->ace_count, ctx->ace_entries);
+ if (ret < 0)
+ {
+ if (errno == ENOSYS || errno == EINVAL)
+ {
+ free (ctx->ace_entries);
+ ctx->ace_entries = NULL;
+ ctx->ace_count = 0;
+ break;
+ }
+ else
+ return -1;
+ }
+ if (ret <= ctx->ace_count)
+ {
+ ctx->ace_count = ret;
+ break;
+ }
+ /* Huh? The number of ACL entries has increased since the last call.
+ Repeat. */
+ free (ctx->ace_entries);
+ ctx->ace_entries = NULL;
+ }
+# endif
+
+ for (;;)
+ {
+ int ret;
+
+ if (desc != -1)
+ ret = facl (desc, GETACLCNT, 0, NULL);
+ else
+ ret = acl (name, GETACLCNT, 0, NULL);
+ if (ret < 0)
+ {
+ if (errno == ENOSYS || errno == ENOTSUP || errno == EOPNOTSUPP)
+ ret = 0;
+ else
+ return -1;
+ }
+ ctx->count = ret;
+
+ if (ctx->count == 0)
+ break;
+
+ ctx->entries = (aclent_t *) malloc (ctx->count * sizeof (aclent_t));
+ if (ctx->entries == NULL)
+ {
+ errno = ENOMEM;
+ return -1;
+ }
+
+ if (desc != -1)
+ ret = facl (desc, GETACL, ctx->count, ctx->entries);
+ else
+ ret = acl (name, GETACL, ctx->count, ctx->entries);
+ if (ret < 0)
+ {
+ if (errno == ENOSYS || errno == ENOTSUP || errno == EOPNOTSUPP)
+ {
+ free (ctx->entries);
+ ctx->entries = NULL;
+ ctx->count = 0;
+ break;
+ }
+ else
+ return -1;
+ }
+ if (ret <= ctx->count)
+ {
+ ctx->count = ret;
+ break;
+ }
+ /* Huh? The number of ACL entries has increased since the last call.
+ Repeat. */
+ free (ctx->entries);
+ ctx->entries = NULL;
+ }
+
+#elif USE_ACL && HAVE_GETACL /* HP-UX */
+
+ {
+ int ret;
+
+ if (desc != -1)
+ ret = fgetacl (desc, NACLENTRIES, ctx->entries);
+ else
+ ret = getacl (name, NACLENTRIES, ctx->entries);
+ if (ret < 0)
+ {
+ if (errno == ENOSYS || errno == EOPNOTSUPP || errno == ENOTSUP)
+ ret = 0;
+ else
+ return -1;
+ }
+ else if (ret > NACLENTRIES)
+ /* If NACLENTRIES cannot be trusted, use dynamic memory allocation. */
+ abort ();
+ ctx->count = ret;
+
+# if HAVE_ACLV_H
+ ret = acl ((char *) name, ACL_GET, NACLVENTRIES, ctx->aclv_entries);
+ if (ret < 0)
+ {
+ if (errno == ENOSYS || errno == EOPNOTSUPP || errno == EINVAL)
+ ret = 0;
+ else
+ return -2;
+ }
+ else if (ret > NACLVENTRIES)
+ /* If NACLVENTRIES cannot be trusted, use dynamic memory allocation. */
+ abort ();
+ ctx->aclv_count = ret;
+# endif
+ }
+
+#elif USE_ACL && HAVE_ACLX_GET && ACL_AIX_WIP /* AIX */
+
+ /* TODO (see set_permissions). */
+
+#elif USE_ACL && HAVE_STATACL /* older AIX */
+
+ {
+ int ret;
+ if (desc != -1)
+ ret = fstatacl (desc, STX_NORMAL, &ctx->u.a, sizeof ctx->u);
+ else
+ ret = statacl ((char *) name, STX_NORMAL, &ctx->u.a, sizeof ctx->u);
+ if (ret == 0)
+ ctx->have_u = true;
+ }
+
+#elif USE_ACL && HAVE_ACLSORT /* NonStop Kernel */
+
+ {
+ int ret = acl ((char *) name, ACL_GET, NACLENTRIES, ctx->entries);
+ if (ret < 0)
+ return -1;
+ else if (ret > NACLENTRIES)
+ /* If NACLENTRIES cannot be trusted, use dynamic memory allocation. */
+ abort ();
+ ctx->count = ret;
+ }
+
+#endif
+
+ return 0;
+
+}
diff --git a/lib/getdelim.c b/lib/getdelim.c
index 6c2dd3d..175d5c7 100644
--- a/lib/getdelim.c
+++ b/lib/getdelim.c
@@ -1,7 +1,5 @@
-/* -*- buffer-read-only: t -*- vi: set ro: */
-/* DO NOT EDIT! GENERATED AUTOMATICALLY! */
/* getdelim.c --- Implementation of replacement getdelim function.
- Copyright (C) 1994, 1996-1998, 2001, 2003, 2005-2012 Free Software
+ Copyright (C) 1994, 1996-1998, 2001, 2003, 2005-2016 Free Software
Foundation, Inc.
This program is free software; you can redistribute it and/or
@@ -19,12 +17,12 @@
/* Ported from glibc by Simon Josefsson. */
-#include <config.h>
-
/* Don't use __attribute__ __nonnull__ in this compilation unit. Otherwise gcc
optimizes away the lineptr == NULL || n == NULL || fp == NULL tests below. */
#define _GL_ARG_NONNULL(params)
+#include <config.h>
+
#include <stdio.h>
#include <limits.h>
@@ -49,6 +47,16 @@
# define getc_maybe_unlocked(fp) getc_unlocked(fp)
#endif
+static void
+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 */
+ errno = ENOMEM;
+#endif
+}
+
/* Read up to (and including) a DELIMITER from FP into *LINEPTR (and
NUL-terminate it). *LINEPTR is a pointer returned from malloc (or
NULL), pointing to *N characters of space. It is realloc'ed as
@@ -76,6 +84,7 @@ getdelim (char **lineptr, size_t *n, int delimiter, FILE *fp)
new_lineptr = (char *) realloc (*lineptr, *n);
if (new_lineptr == NULL)
{
+ alloc_failed ();
result = -1;
goto unlock_return;
}
@@ -113,6 +122,7 @@ getdelim (char **lineptr, size_t *n, int delimiter, FILE *fp)
new_lineptr = (char *) realloc (*lineptr, needed);
if (new_lineptr == NULL)
{
+ alloc_failed ();
result = -1;
goto unlock_return;
}
diff --git a/lib/getfilecon.c b/lib/getfilecon.c
index f9c3f58..a124071 100644
--- a/lib/getfilecon.c
+++ b/lib/getfilecon.c
@@ -1,5 +1,5 @@
/* wrap getfilecon, lgetfilecon, and fgetfilecon
- Copyright (C) 2009-2012 Free Software Foundation, Inc.
+ Copyright (C) 2009-2016 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -57,6 +57,7 @@ map_to_failure (int ret, security_context_t *con)
if (ret == 10 && strcmp (*con, "unlabeled") == 0)
{
freecon (*con);
+ *con = NULL;
errno = ENODATA;
return -1;
}
diff --git a/lib/getopt.c b/lib/getopt.c
index 4342a34..8ccb901 100644
--- a/lib/getopt.c
+++ b/lib/getopt.c
@@ -2,7 +2,7 @@
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-2012 Free Software
+ Copyright (C) 1987-1996, 1998-2004, 2006, 2008-2016 Free Software
Foundation, Inc.
This file is part of the GNU C Library.
@@ -487,7 +487,20 @@ _getopt_internal_r (int argc, char **argv, const char *optstring,
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;
@@ -514,22 +527,37 @@ _getopt_internal_r (int argc, char **argv, const char *optstring,
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));
- newp->p = p;
- newp->next = ambig_list;
- ambig_list = 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_list != NULL && !exact)
+ if ((ambig || ambig_list) && !exact)
{
- if (print_errors)
+ if (print_errors && ambig_list)
{
struct option_list first;
first.p = pfound;
@@ -585,18 +613,20 @@ _getopt_internal_r (int argc, char **argv, const char *optstring,
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 '?';
}
- while (ambig_list != NULL)
- {
- struct option_list *pn = ambig_list->next;
- free (ambig_list);
- ambig_list = pn;
- }
+ free_option_list (ambig_list);
if (pfound != NULL)
{
diff --git a/lib/getopt.in.h b/lib/getopt.in.h
index 06b6dfc..64469b7 100644
--- a/lib/getopt.in.h
+++ b/lib/getopt.in.h
@@ -1,5 +1,5 @@
/* Declarations for getopt.
- Copyright (C) 1989-1994, 1996-1999, 2001, 2003-2007, 2009-2012 Free Software
+ Copyright (C) 1989-1994, 1996-1999, 2001, 2003-2007, 2009-2016 Free Software
Foundation, Inc.
This file is part of the GNU C Library.
@@ -47,13 +47,20 @@
identifiers so that they do not collide with the system functions
and variables. Renaming avoids problems with some compilers and
linkers. */
-#if defined __GETOPT_PREFIX && !defined __need_getopt
-# if !@HAVE_GETOPT_H@
-# include <stdlib.h>
-# include <stdio.h>
-# include <unistd.h>
+#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 __need_getopt
+# undef __GETOPT_CONCAT
+# undef __GETOPT_XCONCAT
+# undef __GETOPT_ID
# undef getopt
# undef getopt_long
# undef getopt_long_only
@@ -62,6 +69,7 @@
# 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)
diff --git a/lib/getopt1.c b/lib/getopt1.c
index fb2a8f5..63db74f 100644
--- a/lib/getopt1.c
+++ b/lib/getopt1.c
@@ -1,5 +1,5 @@
/* getopt_long and getopt_long_only entry points for GNU getopt.
- Copyright (C) 1987-1994, 1996-1998, 2004, 2006, 2009-2012 Free Software
+ Copyright (C) 1987-1994, 1996-1998, 2004, 2006, 2009-2016 Free Software
Foundation, Inc.
This file is part of the GNU C Library.
diff --git a/lib/getopt_int.h b/lib/getopt_int.h
index 2da020c..be4c22e 100644
--- a/lib/getopt_int.h
+++ b/lib/getopt_int.h
@@ -1,5 +1,5 @@
/* Internal declarations for getopt.
- Copyright (C) 1989-1994, 1996-1999, 2001, 2003-2004, 2009-2012 Free Software
+ Copyright (C) 1989-1994, 1996-1999, 2001, 2003-2004, 2009-2016 Free Software
Foundation, Inc.
This file is part of the GNU C Library.
diff --git a/lib/getprogname.c b/lib/getprogname.c
new file mode 100644
index 0000000..a7246e9
--- /dev/null
+++ b/lib/getprogname.c
@@ -0,0 +1,151 @@
+/* Program name management.
+ Copyright (C) 2016 Free Software Foundation, Inc.
+
+ This 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>
+
+/* Specification. */
+#include "getprogname.h"
+
+#include <errno.h> /* get program_invocation_name declaration */
+#include <stdlib.h> /* get __argv declaration */
+
+#ifdef _AIX
+# include <unistd.h>
+# include <procinfo.h>
+# include <string.h>
+#endif
+
+#ifdef __MVS__
+# ifndef _OPEN_SYS
+# define _OPEN_SYS
+# endif
+# include <string.h>
+# include <sys/ps.h>
+#endif
+
+#ifdef __hpux
+# include <unistd.h>
+# include <sys/param.h>
+# include <sys/pstat.h>
+# include <string.h>
+#endif
+
+#include "dirname.h"
+
+#ifndef HAVE_GETPROGNAME /* not Mac OS X, FreeBSD, NetBSD, OpenBSD >= 5.4, Cygwin */
+char const *
+getprogname (void)
+{
+# if HAVE_DECL_PROGRAM_INVOCATION_SHORT_NAME /* glibc, BeOS */
+ /* https://www.gnu.org/software/libc/manual/html_node/Error-Messages.html */
+ return program_invocation_short_name;
+# elif HAVE_DECL_PROGRAM_INVOCATION_NAME /* glibc, BeOS */
+ /* 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 */
+ const char *p = getexecname ();
+ if (!p)
+ p = "?";
+ return last_component (p);
+# elif HAVE_DECL___ARGV /* mingw, MSVC */
+ /* https://msdn.microsoft.com/en-us/library/dn727674.aspx */
+ const char *p = __argv && __argv[0] ? __argv[0] : "?";
+ return last_component (p);
+# elif HAVE_VAR___PROGNAME /* OpenBSD, QNX */
+ /* http://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,
+ its mere declaration makes program_invocation_short_name
+ malfunction (have zero length) with Fedora 25's glibc. */
+ extern char *__progname;
+ const char *p = __progname;
+ 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
+ */
+ static char *p;
+ static int first = 1;
+ if (first)
+ {
+ first = 0;
+ pid_t pid = getpid ();
+ struct procentry64 procs;
+ p = (0 < getprocs64 (&procs, sizeof procs, NULL, 0, &pid, 1)
+ ? strdup (procs.pi_comm)
+ : NULL);
+ if (!p)
+ p = "?";
+ }
+ return p;
+# elif defined __hpux
+ static char *p;
+ static int first = 1;
+ if (first)
+ {
+ first = 0;
+ pid_t pid = getpid ();
+ struct pst_status status;
+ p = (0 < pstat_getproc (&status, sizeof status, 0, pid)
+ ? strdup (status.pst_ucomm)
+ : NULL);
+ if (!p)
+ p = "?";
+ }
+ return p;
+# elif __MVS__ /* z/OS */
+ /* https://www.ibm.com/support/knowledgecenter/SSLTBW_2.1.0/com.ibm.zos.v2r1.bpxbd00/rtwgetp.htm */
+ static char *p = "?";
+ static int first = 1;
+ if (first)
+ {
+ pid_t pid = getpid ();
+ int token;
+ W_PSPROC buf;
+ first = 0;
+ memset (&buf, 0, sizeof(buf));
+ buf.ps_cmdptr = (char *) malloc (buf.ps_cmdlen = PS_CMDBLEN_LONG);
+ buf.ps_conttyptr = (char *) malloc (buf.ps_conttylen = PS_CONTTYBLEN);
+ buf.ps_pathptr = (char *) malloc (buf.ps_pathlen = PS_PATHBLEN);
+ if (buf.ps_cmdptr && buf.ps_conttyptr && buf.ps_pathptr)
+ {
+ for (token = 0; token >= 0;
+ token = w_getpsent (token, &buf, sizeof(buf)))
+ {
+ if (token > 0 && buf.ps_pid == pid)
+ {
+ char *s = strdup (last_component (buf.ps_pathptr));
+ if (s)
+ p = s;
+ break;
+ }
+ }
+ }
+ free (buf.ps_cmdptr);
+ free (buf.ps_conttyptr);
+ free (buf.ps_pathptr);
+ }
+ return p;
+# else
+# error "getprogname module not ported to this OS"
+# endif
+}
+
+#endif
diff --git a/lib/getprogname.h b/lib/getprogname.h
new file mode 100644
index 0000000..e8f9e97
--- /dev/null
+++ b/lib/getprogname.h
@@ -0,0 +1,40 @@
+/* Program name management.
+ Copyright (C) 2016 Free Software Foundation, Inc.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+#ifndef _GL_GETPROGNAME_H
+#define _GL_GETPROGNAME_H
+
+#include <stdlib.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/* Return the base name of the executing program.
+ On native Windows this will usually end in ".exe" or ".EXE". */
+#ifndef HAVE_GETPROGNAME
+extern char const *getprogname (void)
+# ifdef HAVE_DECL_PROGRAM_INVOCATION_NAME
+ _GL_ATTRIBUTE_PURE
+# endif
+ ;
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
diff --git a/lib/gettext.h b/lib/gettext.h
index 5235fe8..9a232cc 100644
--- a/lib/gettext.h
+++ b/lib/gettext.h
@@ -1,7 +1,5 @@
-/* -*- buffer-read-only: t -*- vi: set ro: */
-/* DO NOT EDIT! GENERATED AUTOMATICALLY! */
/* Convenience header for conditional use of GNU <libintl.h>.
- Copyright (C) 1995-1998, 2000-2002, 2004-2006, 2009-2012 Free Software
+ Copyright (C) 1995-1998, 2000-2002, 2004-2006, 2009-2016 Free Software
Foundation, Inc.
This program is free software; you can redistribute it and/or modify
@@ -227,15 +225,17 @@ dcpgettext_expr (const char *domain,
if (msg_ctxt_id != NULL)
#endif
{
+ int found_translation;
memcpy (msg_ctxt_id, msgctxt, msgctxt_len - 1);
msg_ctxt_id[msgctxt_len - 1] = '\004';
memcpy (msg_ctxt_id + msgctxt_len, msgid, msgid_len);
translation = dcgettext (domain, msg_ctxt_id, category);
+ found_translation = (translation != msg_ctxt_id);
#if !_LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS
if (msg_ctxt_id != buf)
free (msg_ctxt_id);
#endif
- if (translation != msg_ctxt_id)
+ if (found_translation)
return translation;
}
return msgid;
@@ -273,15 +273,17 @@ dcnpgettext_expr (const char *domain,
if (msg_ctxt_id != NULL)
#endif
{
+ int found_translation;
memcpy (msg_ctxt_id, msgctxt, msgctxt_len - 1);
msg_ctxt_id[msgctxt_len - 1] = '\004';
memcpy (msg_ctxt_id + msgctxt_len, msgid, msgid_len);
translation = dcngettext (domain, msg_ctxt_id, msgid_plural, n, category);
+ found_translation = !(translation == msg_ctxt_id || translation == msgid_plural);
#if !_LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS
if (msg_ctxt_id != buf)
free (msg_ctxt_id);
#endif
- if (!(translation == msg_ctxt_id || translation == msgid_plural))
+ if (found_translation)
return translation;
}
return (n == 1 ? msgid : msgid_plural);
diff --git a/lib/gettimeofday.c b/lib/gettimeofday.c
index ba328ae..224ca6a 100644
--- a/lib/gettimeofday.c
+++ b/lib/gettimeofday.c
@@ -1,8 +1,6 @@
-/* -*- buffer-read-only: t -*- vi: set ro: */
-/* DO NOT EDIT! GENERATED AUTOMATICALLY! */
/* Provide gettimeofday for systems that don't have it or for which it's broken.
- Copyright (C) 2001-2003, 2005-2007, 2009-2012 Free Software Foundation, Inc.
+ Copyright (C) 2001-2003, 2005-2007, 2009-2016 Free Software Foundation, Inc.
This 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/glthread/lock.c b/lib/glthread/lock.c
new file mode 100644
index 0000000..935043b
--- /dev/null
+++ b/lib/glthread/lock.c
@@ -0,0 +1,1057 @@
+/* Locking in multithreaded situations.
+ Copyright (C) 2005-2016 Free Software Foundation, Inc.
+
+ This 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 <http://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,
+ gthr-win32.h. */
+
+#include <config.h>
+
+#include "glthread/lock.h"
+
+/* ========================================================================= */
+
+#if USE_POSIX_THREADS
+
+/* -------------------------- gl_lock_t datatype -------------------------- */
+
+/* ------------------------- gl_rwlock_t datatype ------------------------- */
+
+# if HAVE_PTHREAD_RWLOCK
+
+# if !defined PTHREAD_RWLOCK_INITIALIZER
+
+int
+glthread_rwlock_init_multithreaded (gl_rwlock_t *lock)
+{
+ int err;
+
+ err = pthread_rwlock_init (&lock->rwlock, NULL);
+ if (err != 0)
+ return err;
+ lock->initialized = 1;
+ return 0;
+}
+
+int
+glthread_rwlock_rdlock_multithreaded (gl_rwlock_t *lock)
+{
+ if (!lock->initialized)
+ {
+ int err;
+
+ err = pthread_mutex_lock (&lock->guard);
+ if (err != 0)
+ return err;
+ if (!lock->initialized)
+ {
+ err = glthread_rwlock_init_multithreaded (lock);
+ if (err != 0)
+ {
+ pthread_mutex_unlock (&lock->guard);
+ return err;
+ }
+ }
+ err = pthread_mutex_unlock (&lock->guard);
+ if (err != 0)
+ return err;
+ }
+ return pthread_rwlock_rdlock (&lock->rwlock);
+}
+
+int
+glthread_rwlock_wrlock_multithreaded (gl_rwlock_t *lock)
+{
+ if (!lock->initialized)
+ {
+ int err;
+
+ err = pthread_mutex_lock (&lock->guard);
+ if (err != 0)
+ return err;
+ if (!lock->initialized)
+ {
+ err = glthread_rwlock_init_multithreaded (lock);
+ if (err != 0)
+ {
+ pthread_mutex_unlock (&lock->guard);
+ return err;
+ }
+ }
+ err = pthread_mutex_unlock (&lock->guard);
+ if (err != 0)
+ return err;
+ }
+ return pthread_rwlock_wrlock (&lock->rwlock);
+}
+
+int
+glthread_rwlock_unlock_multithreaded (gl_rwlock_t *lock)
+{
+ if (!lock->initialized)
+ return EINVAL;
+ return pthread_rwlock_unlock (&lock->rwlock);
+}
+
+int
+glthread_rwlock_destroy_multithreaded (gl_rwlock_t *lock)
+{
+ int err;
+
+ if (!lock->initialized)
+ return EINVAL;
+ err = pthread_rwlock_destroy (&lock->rwlock);
+ if (err != 0)
+ return err;
+ lock->initialized = 0;
+ return 0;
+}
+
+# endif
+
+# else
+
+int
+glthread_rwlock_init_multithreaded (gl_rwlock_t *lock)
+{
+ int err;
+
+ err = pthread_mutex_init (&lock->lock, NULL);
+ if (err != 0)
+ return err;
+ err = pthread_cond_init (&lock->waiting_readers, NULL);
+ if (err != 0)
+ return err;
+ err = pthread_cond_init (&lock->waiting_writers, NULL);
+ if (err != 0)
+ return err;
+ lock->waiting_writers_count = 0;
+ lock->runcount = 0;
+ return 0;
+}
+
+int
+glthread_rwlock_rdlock_multithreaded (gl_rwlock_t *lock)
+{
+ int err;
+
+ err = pthread_mutex_lock (&lock->lock);
+ if (err != 0)
+ return err;
+ /* Test whether only readers are currently running, and whether the runcount
+ field will not overflow. */
+ /* POSIX says: "It is implementation-defined whether the calling thread
+ acquires the lock when a writer does not hold the lock and there are
+ writers blocked on the lock." Let's say, no: give the writers a higher
+ priority. */
+ while (!(lock->runcount + 1 > 0 && lock->waiting_writers_count == 0))
+ {
+ /* This thread has to wait for a while. Enqueue it among the
+ waiting_readers. */
+ err = pthread_cond_wait (&lock->waiting_readers, &lock->lock);
+ if (err != 0)
+ {
+ pthread_mutex_unlock (&lock->lock);
+ return err;
+ }
+ }
+ lock->runcount++;
+ return pthread_mutex_unlock (&lock->lock);
+}
+
+int
+glthread_rwlock_wrlock_multithreaded (gl_rwlock_t *lock)
+{
+ int err;
+
+ err = pthread_mutex_lock (&lock->lock);
+ if (err != 0)
+ return err;
+ /* Test whether no readers or writers are currently running. */
+ while (!(lock->runcount == 0))
+ {
+ /* This thread has to wait for a while. Enqueue it among the
+ waiting_writers. */
+ lock->waiting_writers_count++;
+ err = pthread_cond_wait (&lock->waiting_writers, &lock->lock);
+ if (err != 0)
+ {
+ lock->waiting_writers_count--;
+ pthread_mutex_unlock (&lock->lock);
+ return err;
+ }
+ lock->waiting_writers_count--;
+ }
+ lock->runcount--; /* runcount becomes -1 */
+ return pthread_mutex_unlock (&lock->lock);
+}
+
+int
+glthread_rwlock_unlock_multithreaded (gl_rwlock_t *lock)
+{
+ int err;
+
+ err = pthread_mutex_lock (&lock->lock);
+ if (err != 0)
+ return err;
+ if (lock->runcount < 0)
+ {
+ /* Drop a writer lock. */
+ if (!(lock->runcount == -1))
+ {
+ pthread_mutex_unlock (&lock->lock);
+ return EINVAL;
+ }
+ lock->runcount = 0;
+ }
+ else
+ {
+ /* Drop a reader lock. */
+ if (!(lock->runcount > 0))
+ {
+ pthread_mutex_unlock (&lock->lock);
+ return EINVAL;
+ }
+ lock->runcount--;
+ }
+ if (lock->runcount == 0)
+ {
+ /* POSIX recommends that "write locks shall take precedence over read
+ locks", to avoid "writer starvation". */
+ if (lock->waiting_writers_count > 0)
+ {
+ /* Wake up one of the waiting writers. */
+ err = pthread_cond_signal (&lock->waiting_writers);
+ if (err != 0)
+ {
+ pthread_mutex_unlock (&lock->lock);
+ return err;
+ }
+ }
+ else
+ {
+ /* Wake up all waiting readers. */
+ err = pthread_cond_broadcast (&lock->waiting_readers);
+ if (err != 0)
+ {
+ pthread_mutex_unlock (&lock->lock);
+ return err;
+ }
+ }
+ }
+ return pthread_mutex_unlock (&lock->lock);
+}
+
+int
+glthread_rwlock_destroy_multithreaded (gl_rwlock_t *lock)
+{
+ int err;
+
+ err = pthread_mutex_destroy (&lock->lock);
+ if (err != 0)
+ return err;
+ err = pthread_cond_destroy (&lock->waiting_readers);
+ if (err != 0)
+ return err;
+ err = pthread_cond_destroy (&lock->waiting_writers);
+ if (err != 0)
+ return err;
+ return 0;
+}
+
+# endif
+
+/* --------------------- gl_recursive_lock_t datatype --------------------- */
+
+# if HAVE_PTHREAD_MUTEX_RECURSIVE
+
+# if defined PTHREAD_RECURSIVE_MUTEX_INITIALIZER || defined PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP
+
+int
+glthread_recursive_lock_init_multithreaded (gl_recursive_lock_t *lock)
+{
+ pthread_mutexattr_t attributes;
+ int err;
+
+ err = pthread_mutexattr_init (&attributes);
+ if (err != 0)
+ return err;
+ err = pthread_mutexattr_settype (&attributes, PTHREAD_MUTEX_RECURSIVE);
+ if (err != 0)
+ {
+ pthread_mutexattr_destroy (&attributes);
+ return err;
+ }
+ err = pthread_mutex_init (lock, &attributes);
+ if (err != 0)
+ {
+ pthread_mutexattr_destroy (&attributes);
+ return err;
+ }
+ err = pthread_mutexattr_destroy (&attributes);
+ if (err != 0)
+ return err;
+ return 0;
+}
+
+# else
+
+int
+glthread_recursive_lock_init_multithreaded (gl_recursive_lock_t *lock)
+{
+ pthread_mutexattr_t attributes;
+ int err;
+
+ err = pthread_mutexattr_init (&attributes);
+ if (err != 0)
+ return err;
+ err = pthread_mutexattr_settype (&attributes, PTHREAD_MUTEX_RECURSIVE);
+ if (err != 0)
+ {
+ pthread_mutexattr_destroy (&attributes);
+ return err;
+ }
+ err = pthread_mutex_init (&lock->recmutex, &attributes);
+ if (err != 0)
+ {
+ pthread_mutexattr_destroy (&attributes);
+ return err;
+ }
+ err = pthread_mutexattr_destroy (&attributes);
+ if (err != 0)
+ return err;
+ lock->initialized = 1;
+ return 0;
+}
+
+int
+glthread_recursive_lock_lock_multithreaded (gl_recursive_lock_t *lock)
+{
+ if (!lock->initialized)
+ {
+ int err;
+
+ err = pthread_mutex_lock (&lock->guard);
+ if (err != 0)
+ return err;
+ if (!lock->initialized)
+ {
+ err = glthread_recursive_lock_init_multithreaded (lock);
+ if (err != 0)
+ {
+ pthread_mutex_unlock (&lock->guard);
+ return err;
+ }
+ }
+ err = pthread_mutex_unlock (&lock->guard);
+ if (err != 0)
+ return err;
+ }
+ return pthread_mutex_lock (&lock->recmutex);
+}
+
+int
+glthread_recursive_lock_unlock_multithreaded (gl_recursive_lock_t *lock)
+{
+ if (!lock->initialized)
+ return EINVAL;
+ return pthread_mutex_unlock (&lock->recmutex);
+}
+
+int
+glthread_recursive_lock_destroy_multithreaded (gl_recursive_lock_t *lock)
+{
+ int err;
+
+ if (!lock->initialized)
+ return EINVAL;
+ err = pthread_mutex_destroy (&lock->recmutex);
+ if (err != 0)
+ return err;
+ lock->initialized = 0;
+ return 0;
+}
+
+# endif
+
+# else
+
+int
+glthread_recursive_lock_init_multithreaded (gl_recursive_lock_t *lock)
+{
+ int err;
+
+ err = pthread_mutex_init (&lock->mutex, NULL);
+ if (err != 0)
+ return err;
+ lock->owner = (pthread_t) 0;
+ lock->depth = 0;
+ return 0;
+}
+
+int
+glthread_recursive_lock_lock_multithreaded (gl_recursive_lock_t *lock)
+{
+ pthread_t self = pthread_self ();
+ if (lock->owner != self)
+ {
+ int err;
+
+ err = pthread_mutex_lock (&lock->mutex);
+ if (err != 0)
+ return err;
+ lock->owner = self;
+ }
+ if (++(lock->depth) == 0) /* wraparound? */
+ {
+ lock->depth--;
+ return EAGAIN;
+ }
+ return 0;
+}
+
+int
+glthread_recursive_lock_unlock_multithreaded (gl_recursive_lock_t *lock)
+{
+ if (lock->owner != pthread_self ())
+ return EPERM;
+ if (lock->depth == 0)
+ return EINVAL;
+ if (--(lock->depth) == 0)
+ {
+ lock->owner = (pthread_t) 0;
+ return pthread_mutex_unlock (&lock->mutex);
+ }
+ else
+ return 0;
+}
+
+int
+glthread_recursive_lock_destroy_multithreaded (gl_recursive_lock_t *lock)
+{
+ if (lock->owner != (pthread_t) 0)
+ return EBUSY;
+ return pthread_mutex_destroy (&lock->mutex);
+}
+
+# endif
+
+/* -------------------------- gl_once_t datatype -------------------------- */
+
+static const pthread_once_t fresh_once = PTHREAD_ONCE_INIT;
+
+int
+glthread_once_singlethreaded (pthread_once_t *once_control)
+{
+ /* We don't know whether pthread_once_t is an integer type, a floating-point
+ type, a pointer type, or a structure type. */
+ char *firstbyte = (char *)once_control;
+ if (*firstbyte == *(const char *)&fresh_once)
+ {
+ /* First time use of once_control. Invert the first byte. */
+ *firstbyte = ~ *(const char *)&fresh_once;
+ return 1;
+ }
+ else
+ return 0;
+}
+
+#endif
+
+/* ========================================================================= */
+
+#if USE_PTH_THREADS
+
+/* Use the GNU Pth threads library. */
+
+/* -------------------------- gl_lock_t datatype -------------------------- */
+
+/* ------------------------- gl_rwlock_t datatype ------------------------- */
+
+/* --------------------- gl_recursive_lock_t datatype --------------------- */
+
+/* -------------------------- gl_once_t datatype -------------------------- */
+
+static void
+glthread_once_call (void *arg)
+{
+ void (**gl_once_temp_addr) (void) = (void (**) (void)) arg;
+ void (*initfunction) (void) = *gl_once_temp_addr;
+ initfunction ();
+}
+
+int
+glthread_once_multithreaded (pth_once_t *once_control, void (*initfunction) (void))
+{
+ void (*temp) (void) = initfunction;
+ return (!pth_once (once_control, glthread_once_call, &temp) ? errno : 0);
+}
+
+int
+glthread_once_singlethreaded (pth_once_t *once_control)
+{
+ /* We know that pth_once_t is an integer type. */
+ if (*once_control == PTH_ONCE_INIT)
+ {
+ /* First time use of once_control. Invert the marker. */
+ *once_control = ~ PTH_ONCE_INIT;
+ return 1;
+ }
+ else
+ return 0;
+}
+
+#endif
+
+/* ========================================================================= */
+
+#if USE_SOLARIS_THREADS
+
+/* Use the old Solaris threads library. */
+
+/* -------------------------- gl_lock_t datatype -------------------------- */
+
+/* ------------------------- gl_rwlock_t datatype ------------------------- */
+
+/* --------------------- gl_recursive_lock_t datatype --------------------- */
+
+int
+glthread_recursive_lock_init_multithreaded (gl_recursive_lock_t *lock)
+{
+ int err;
+
+ err = mutex_init (&lock->mutex, USYNC_THREAD, NULL);
+ if (err != 0)
+ return err;
+ lock->owner = (thread_t) 0;
+ lock->depth = 0;
+ return 0;
+}
+
+int
+glthread_recursive_lock_lock_multithreaded (gl_recursive_lock_t *lock)
+{
+ thread_t self = thr_self ();
+ if (lock->owner != self)
+ {
+ int err;
+
+ err = mutex_lock (&lock->mutex);
+ if (err != 0)
+ return err;
+ lock->owner = self;
+ }
+ if (++(lock->depth) == 0) /* wraparound? */
+ {
+ lock->depth--;
+ return EAGAIN;
+ }
+ return 0;
+}
+
+int
+glthread_recursive_lock_unlock_multithreaded (gl_recursive_lock_t *lock)
+{
+ if (lock->owner != thr_self ())
+ return EPERM;
+ if (lock->depth == 0)
+ return EINVAL;
+ if (--(lock->depth) == 0)
+ {
+ lock->owner = (thread_t) 0;
+ return mutex_unlock (&lock->mutex);
+ }
+ else
+ return 0;
+}
+
+int
+glthread_recursive_lock_destroy_multithreaded (gl_recursive_lock_t *lock)
+{
+ if (lock->owner != (thread_t) 0)
+ return EBUSY;
+ return mutex_destroy (&lock->mutex);
+}
+
+/* -------------------------- gl_once_t datatype -------------------------- */
+
+int
+glthread_once_multithreaded (gl_once_t *once_control, void (*initfunction) (void))
+{
+ if (!once_control->inited)
+ {
+ int err;
+
+ /* Use the mutex to guarantee that if another thread is already calling
+ the initfunction, this thread waits until it's finished. */
+ err = mutex_lock (&once_control->mutex);
+ if (err != 0)
+ return err;
+ if (!once_control->inited)
+ {
+ once_control->inited = 1;
+ initfunction ();
+ }
+ return mutex_unlock (&once_control->mutex);
+ }
+ else
+ return 0;
+}
+
+int
+glthread_once_singlethreaded (gl_once_t *once_control)
+{
+ /* We know that gl_once_t contains an integer type. */
+ if (!once_control->inited)
+ {
+ /* First time use of once_control. Invert the marker. */
+ once_control->inited = ~ 0;
+ return 1;
+ }
+ else
+ return 0;
+}
+
+#endif
+
+/* ========================================================================= */
+
+#if USE_WINDOWS_THREADS
+
+/* -------------------------- gl_lock_t datatype -------------------------- */
+
+void
+glthread_lock_init_func (gl_lock_t *lock)
+{
+ InitializeCriticalSection (&lock->lock);
+ lock->guard.done = 1;
+}
+
+int
+glthread_lock_lock_func (gl_lock_t *lock)
+{
+ if (!lock->guard.done)
+ {
+ if (InterlockedIncrement (&lock->guard.started) == 0)
+ /* This thread is the first one to need this lock. Initialize it. */
+ glthread_lock_init (lock);
+ else
+ /* Yield the CPU while waiting for another thread to finish
+ initializing this lock. */
+ while (!lock->guard.done)
+ Sleep (0);
+ }
+ EnterCriticalSection (&lock->lock);
+ return 0;
+}
+
+int
+glthread_lock_unlock_func (gl_lock_t *lock)
+{
+ if (!lock->guard.done)
+ return EINVAL;
+ LeaveCriticalSection (&lock->lock);
+ return 0;
+}
+
+int
+glthread_lock_destroy_func (gl_lock_t *lock)
+{
+ if (!lock->guard.done)
+ return EINVAL;
+ DeleteCriticalSection (&lock->lock);
+ lock->guard.done = 0;
+ return 0;
+}
+
+/* ------------------------- gl_rwlock_t datatype ------------------------- */
+
+/* In this file, the waitqueues are implemented as circular arrays. */
+#define gl_waitqueue_t gl_carray_waitqueue_t
+
+static void
+gl_waitqueue_init (gl_waitqueue_t *wq)
+{
+ wq->array = NULL;
+ wq->count = 0;
+ wq->alloc = 0;
+ wq->offset = 0;
+}
+
+/* Enqueues the current thread, represented by an event, in a wait queue.
+ Returns INVALID_HANDLE_VALUE if an allocation failure occurs. */
+static HANDLE
+gl_waitqueue_add (gl_waitqueue_t *wq)
+{
+ HANDLE event;
+ unsigned int index;
+
+ if (wq->count == wq->alloc)
+ {
+ unsigned int new_alloc = 2 * wq->alloc + 1;
+ HANDLE *new_array =
+ (HANDLE *) realloc (wq->array, new_alloc * sizeof (HANDLE));
+ if (new_array == NULL)
+ /* No more memory. */
+ return INVALID_HANDLE_VALUE;
+ /* Now is a good opportunity to rotate the array so that its contents
+ starts at offset 0. */
+ if (wq->offset > 0)
+ {
+ unsigned int old_count = wq->count;
+ unsigned int old_alloc = wq->alloc;
+ unsigned int old_offset = wq->offset;
+ unsigned int i;
+ if (old_offset + old_count > old_alloc)
+ {
+ unsigned int limit = old_offset + old_count - old_alloc;
+ for (i = 0; i < limit; i++)
+ new_array[old_alloc + i] = new_array[i];
+ }
+ for (i = 0; i < old_count; i++)
+ new_array[i] = new_array[old_offset + i];
+ wq->offset = 0;
+ }
+ wq->array = new_array;
+ wq->alloc = new_alloc;
+ }
+ /* Whether the created event is a manual-reset one or an auto-reset one,
+ does not matter, since we will wait on it only once. */
+ event = CreateEvent (NULL, TRUE, FALSE, NULL);
+ if (event == INVALID_HANDLE_VALUE)
+ /* No way to allocate an event. */
+ return INVALID_HANDLE_VALUE;
+ index = wq->offset + wq->count;
+ if (index >= wq->alloc)
+ index -= wq->alloc;
+ wq->array[index] = event;
+ wq->count++;
+ return event;
+}
+
+/* Notifies the first thread from a wait queue and dequeues it. */
+static void
+gl_waitqueue_notify_first (gl_waitqueue_t *wq)
+{
+ SetEvent (wq->array[wq->offset + 0]);
+ wq->offset++;
+ wq->count--;
+ if (wq->count == 0 || wq->offset == wq->alloc)
+ wq->offset = 0;
+}
+
+/* Notifies all threads from a wait queue and dequeues them all. */
+static void
+gl_waitqueue_notify_all (gl_waitqueue_t *wq)
+{
+ unsigned int i;
+
+ for (i = 0; i < wq->count; i++)
+ {
+ unsigned int index = wq->offset + i;
+ if (index >= wq->alloc)
+ index -= wq->alloc;
+ SetEvent (wq->array[index]);
+ }
+ wq->count = 0;
+ wq->offset = 0;
+}
+
+void
+glthread_rwlock_init_func (gl_rwlock_t *lock)
+{
+ InitializeCriticalSection (&lock->lock);
+ gl_waitqueue_init (&lock->waiting_readers);
+ gl_waitqueue_init (&lock->waiting_writers);
+ lock->runcount = 0;
+ lock->guard.done = 1;
+}
+
+int
+glthread_rwlock_rdlock_func (gl_rwlock_t *lock)
+{
+ if (!lock->guard.done)
+ {
+ if (InterlockedIncrement (&lock->guard.started) == 0)
+ /* This thread is the first one to need this lock. Initialize it. */
+ glthread_rwlock_init (lock);
+ else
+ /* Yield the CPU while waiting for another thread to finish
+ initializing this lock. */
+ while (!lock->guard.done)
+ Sleep (0);
+ }
+ EnterCriticalSection (&lock->lock);
+ /* Test whether only readers are currently running, and whether the runcount
+ field will not overflow. */
+ if (!(lock->runcount + 1 > 0))
+ {
+ /* This thread has to wait for a while. Enqueue it among the
+ waiting_readers. */
+ HANDLE event = gl_waitqueue_add (&lock->waiting_readers);
+ if (event != INVALID_HANDLE_VALUE)
+ {
+ DWORD result;
+ LeaveCriticalSection (&lock->lock);
+ /* Wait until another thread signals this event. */
+ result = WaitForSingleObject (event, INFINITE);
+ if (result == WAIT_FAILED || result == WAIT_TIMEOUT)
+ abort ();
+ CloseHandle (event);
+ /* The thread which signalled the event already did the bookkeeping:
+ removed us from the waiting_readers, incremented lock->runcount. */
+ if (!(lock->runcount > 0))
+ abort ();
+ return 0;
+ }
+ else
+ {
+ /* Allocation failure. Weird. */
+ do
+ {
+ LeaveCriticalSection (&lock->lock);
+ Sleep (1);
+ EnterCriticalSection (&lock->lock);
+ }
+ while (!(lock->runcount + 1 > 0));
+ }
+ }
+ lock->runcount++;
+ LeaveCriticalSection (&lock->lock);
+ return 0;
+}
+
+int
+glthread_rwlock_wrlock_func (gl_rwlock_t *lock)
+{
+ if (!lock->guard.done)
+ {
+ if (InterlockedIncrement (&lock->guard.started) == 0)
+ /* This thread is the first one to need this lock. Initialize it. */
+ glthread_rwlock_init (lock);
+ else
+ /* Yield the CPU while waiting for another thread to finish
+ initializing this lock. */
+ while (!lock->guard.done)
+ Sleep (0);
+ }
+ EnterCriticalSection (&lock->lock);
+ /* Test whether no readers or writers are currently running. */
+ if (!(lock->runcount == 0))
+ {
+ /* This thread has to wait for a while. Enqueue it among the
+ waiting_writers. */
+ HANDLE event = gl_waitqueue_add (&lock->waiting_writers);
+ if (event != INVALID_HANDLE_VALUE)
+ {
+ DWORD result;
+ LeaveCriticalSection (&lock->lock);
+ /* Wait until another thread signals this event. */
+ result = WaitForSingleObject (event, INFINITE);
+ if (result == WAIT_FAILED || result == WAIT_TIMEOUT)
+ abort ();
+ CloseHandle (event);
+ /* The thread which signalled the event already did the bookkeeping:
+ removed us from the waiting_writers, set lock->runcount = -1. */
+ if (!(lock->runcount == -1))
+ abort ();
+ return 0;
+ }
+ else
+ {
+ /* Allocation failure. Weird. */
+ do
+ {
+ LeaveCriticalSection (&lock->lock);
+ Sleep (1);
+ EnterCriticalSection (&lock->lock);
+ }
+ while (!(lock->runcount == 0));
+ }
+ }
+ lock->runcount--; /* runcount becomes -1 */
+ LeaveCriticalSection (&lock->lock);
+ return 0;
+}
+
+int
+glthread_rwlock_unlock_func (gl_rwlock_t *lock)
+{
+ if (!lock->guard.done)
+ return EINVAL;
+ EnterCriticalSection (&lock->lock);
+ if (lock->runcount < 0)
+ {
+ /* Drop a writer lock. */
+ if (!(lock->runcount == -1))
+ abort ();
+ lock->runcount = 0;
+ }
+ else
+ {
+ /* Drop a reader lock. */
+ if (!(lock->runcount > 0))
+ {
+ LeaveCriticalSection (&lock->lock);
+ return EPERM;
+ }
+ lock->runcount--;
+ }
+ if (lock->runcount == 0)
+ {
+ /* POSIX recommends that "write locks shall take precedence over read
+ locks", to avoid "writer starvation". */
+ if (lock->waiting_writers.count > 0)
+ {
+ /* Wake up one of the waiting writers. */
+ lock->runcount--;
+ gl_waitqueue_notify_first (&lock->waiting_writers);
+ }
+ else
+ {
+ /* Wake up all waiting readers. */
+ lock->runcount += lock->waiting_readers.count;
+ gl_waitqueue_notify_all (&lock->waiting_readers);
+ }
+ }
+ LeaveCriticalSection (&lock->lock);
+ return 0;
+}
+
+int
+glthread_rwlock_destroy_func (gl_rwlock_t *lock)
+{
+ if (!lock->guard.done)
+ return EINVAL;
+ if (lock->runcount != 0)
+ return EBUSY;
+ DeleteCriticalSection (&lock->lock);
+ if (lock->waiting_readers.array != NULL)
+ free (lock->waiting_readers.array);
+ if (lock->waiting_writers.array != NULL)
+ free (lock->waiting_writers.array);
+ lock->guard.done = 0;
+ return 0;
+}
+
+/* --------------------- gl_recursive_lock_t datatype --------------------- */
+
+void
+glthread_recursive_lock_init_func (gl_recursive_lock_t *lock)
+{
+ lock->owner = 0;
+ lock->depth = 0;
+ InitializeCriticalSection (&lock->lock);
+ lock->guard.done = 1;
+}
+
+int
+glthread_recursive_lock_lock_func (gl_recursive_lock_t *lock)
+{
+ if (!lock->guard.done)
+ {
+ if (InterlockedIncrement (&lock->guard.started) == 0)
+ /* This thread is the first one to need this lock. Initialize it. */
+ glthread_recursive_lock_init (lock);
+ else
+ /* Yield the CPU while waiting for another thread to finish
+ initializing this lock. */
+ while (!lock->guard.done)
+ Sleep (0);
+ }
+ {
+ DWORD self = GetCurrentThreadId ();
+ if (lock->owner != self)
+ {
+ EnterCriticalSection (&lock->lock);
+ lock->owner = self;
+ }
+ if (++(lock->depth) == 0) /* wraparound? */
+ {
+ lock->depth--;
+ return EAGAIN;
+ }
+ }
+ return 0;
+}
+
+int
+glthread_recursive_lock_unlock_func (gl_recursive_lock_t *lock)
+{
+ if (lock->owner != GetCurrentThreadId ())
+ return EPERM;
+ if (lock->depth == 0)
+ return EINVAL;
+ if (--(lock->depth) == 0)
+ {
+ lock->owner = 0;
+ LeaveCriticalSection (&lock->lock);
+ }
+ return 0;
+}
+
+int
+glthread_recursive_lock_destroy_func (gl_recursive_lock_t *lock)
+{
+ if (lock->owner != 0)
+ return EBUSY;
+ DeleteCriticalSection (&lock->lock);
+ lock->guard.done = 0;
+ return 0;
+}
+
+/* -------------------------- gl_once_t datatype -------------------------- */
+
+void
+glthread_once_func (gl_once_t *once_control, void (*initfunction) (void))
+{
+ if (once_control->inited <= 0)
+ {
+ if (InterlockedIncrement (&once_control->started) == 0)
+ {
+ /* This thread is the first one to come to this once_control. */
+ InitializeCriticalSection (&once_control->lock);
+ EnterCriticalSection (&once_control->lock);
+ once_control->inited = 0;
+ initfunction ();
+ once_control->inited = 1;
+ LeaveCriticalSection (&once_control->lock);
+ }
+ else
+ {
+ /* Undo last operation. */
+ InterlockedDecrement (&once_control->started);
+ /* Some other thread has already started the initialization.
+ Yield the CPU while waiting for the other thread to finish
+ initializing and taking the lock. */
+ while (once_control->inited < 0)
+ Sleep (0);
+ if (once_control->inited <= 0)
+ {
+ /* Take the lock. This blocks until the other thread has
+ finished calling the initfunction. */
+ EnterCriticalSection (&once_control->lock);
+ LeaveCriticalSection (&once_control->lock);
+ if (!(once_control->inited > 0))
+ abort ();
+ }
+ }
+ }
+}
+
+#endif
+
+/* ========================================================================= */
diff --git a/lib/glthread/lock.h b/lib/glthread/lock.h
new file mode 100644
index 0000000..e64506b
--- /dev/null
+++ b/lib/glthread/lock.h
@@ -0,0 +1,927 @@
+/* Locking in multithreaded situations.
+ Copyright (C) 2005-2016 Free Software Foundation, Inc.
+
+ This 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 <http://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,
+ gthr-win32.h. */
+
+/* This file contains locking primitives for use with a given thread library.
+ It does not contain primitives for creating threads or for other
+ synchronization primitives.
+
+ Normal (non-recursive) locks:
+ Type: gl_lock_t
+ Declaration: gl_lock_define(extern, name)
+ Initializer: gl_lock_define_initialized(, name)
+ Initialization: gl_lock_init (name);
+ Taking the lock: gl_lock_lock (name);
+ Releasing the lock: gl_lock_unlock (name);
+ De-initialization: gl_lock_destroy (name);
+ Equivalent functions with control of error handling:
+ Initialization: err = glthread_lock_init (&name);
+ Taking the lock: err = glthread_lock_lock (&name);
+ Releasing the lock: err = glthread_lock_unlock (&name);
+ De-initialization: err = glthread_lock_destroy (&name);
+
+ Read-Write (non-recursive) locks:
+ Type: gl_rwlock_t
+ Declaration: gl_rwlock_define(extern, name)
+ Initializer: gl_rwlock_define_initialized(, name)
+ Initialization: gl_rwlock_init (name);
+ Taking the lock: gl_rwlock_rdlock (name);
+ gl_rwlock_wrlock (name);
+ Releasing the lock: gl_rwlock_unlock (name);
+ De-initialization: gl_rwlock_destroy (name);
+ Equivalent functions with control of error handling:
+ Initialization: err = glthread_rwlock_init (&name);
+ Taking the lock: err = glthread_rwlock_rdlock (&name);
+ err = glthread_rwlock_wrlock (&name);
+ Releasing the lock: err = glthread_rwlock_unlock (&name);
+ De-initialization: err = glthread_rwlock_destroy (&name);
+
+ Recursive locks:
+ Type: gl_recursive_lock_t
+ Declaration: gl_recursive_lock_define(extern, name)
+ Initializer: gl_recursive_lock_define_initialized(, name)
+ Initialization: gl_recursive_lock_init (name);
+ Taking the lock: gl_recursive_lock_lock (name);
+ Releasing the lock: gl_recursive_lock_unlock (name);
+ De-initialization: gl_recursive_lock_destroy (name);
+ Equivalent functions with control of error handling:
+ Initialization: err = glthread_recursive_lock_init (&name);
+ Taking the lock: err = glthread_recursive_lock_lock (&name);
+ Releasing the lock: err = glthread_recursive_lock_unlock (&name);
+ De-initialization: err = glthread_recursive_lock_destroy (&name);
+
+ Once-only execution:
+ Type: gl_once_t
+ Initializer: gl_once_define(extern, name)
+ Execution: gl_once (name, initfunction);
+ Equivalent functions with control of error handling:
+ Execution: err = glthread_once (&name, initfunction);
+*/
+
+
+#ifndef _LOCK_H
+#define _LOCK_H
+
+#include <errno.h>
+#include <stdlib.h>
+
+/* ========================================================================= */
+
+#if USE_POSIX_THREADS
+
+/* Use the POSIX threads library. */
+
+# include <pthread.h>
+
+# ifdef __cplusplus
+extern "C" {
+# endif
+
+# if PTHREAD_IN_USE_DETECTION_HARD
+
+/* The pthread_in_use() detection needs to be done at runtime. */
+# define pthread_in_use() \
+ glthread_in_use ()
+extern int glthread_in_use (void);
+
+# endif
+
+# if USE_POSIX_THREADS_WEAK
+
+/* Use weak references to the POSIX threads library. */
+
+/* Weak references avoid dragging in external libraries if the other parts
+ of the program don't use them. Here we use them, because we don't want
+ every program that uses libintl to depend on libpthread. This assumes
+ that libpthread would not be loaded after libintl; i.e. if libintl is
+ loaded first, by an executable that does not depend on libpthread, and
+ then a module is dynamically loaded that depends on libpthread, libintl
+ will not be multithread-safe. */
+
+/* The way to test at runtime whether libpthread is present is to test
+ whether a function pointer's value, such as &pthread_mutex_init, is
+ non-NULL. However, some versions of GCC have a bug through which, in
+ PIC mode, &foo != NULL always evaluates to true if there is a direct
+ call to foo(...) in the same function. To avoid this, we test the
+ address of a function in libpthread that we don't use. */
+
+# pragma weak pthread_mutex_init
+# pragma weak pthread_mutex_lock
+# pragma weak pthread_mutex_unlock
+# pragma weak pthread_mutex_destroy
+# pragma weak pthread_rwlock_init
+# pragma weak pthread_rwlock_rdlock
+# pragma weak pthread_rwlock_wrlock
+# pragma weak pthread_rwlock_unlock
+# pragma weak pthread_rwlock_destroy
+# pragma weak pthread_once
+# pragma weak pthread_cond_init
+# pragma weak pthread_cond_wait
+# pragma weak pthread_cond_signal
+# pragma weak pthread_cond_broadcast
+# pragma weak pthread_cond_destroy
+# pragma weak pthread_mutexattr_init
+# pragma weak pthread_mutexattr_settype
+# pragma weak pthread_mutexattr_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)
+# endif
+
+# else
+
+# if !PTHREAD_IN_USE_DETECTION_HARD
+# define pthread_in_use() 1
+# endif
+
+# endif
+
+/* -------------------------- gl_lock_t datatype -------------------------- */
+
+typedef pthread_mutex_t gl_lock_t;
+# define gl_lock_define(STORAGECLASS, NAME) \
+ STORAGECLASS pthread_mutex_t NAME;
+# define gl_lock_define_initialized(STORAGECLASS, NAME) \
+ STORAGECLASS pthread_mutex_t NAME = gl_lock_initializer;
+# define gl_lock_initializer \
+ PTHREAD_MUTEX_INITIALIZER
+# define glthread_lock_init(LOCK) \
+ (pthread_in_use () ? pthread_mutex_init (LOCK, NULL) : 0)
+# define glthread_lock_lock(LOCK) \
+ (pthread_in_use () ? pthread_mutex_lock (LOCK) : 0)
+# define glthread_lock_unlock(LOCK) \
+ (pthread_in_use () ? pthread_mutex_unlock (LOCK) : 0)
+# define glthread_lock_destroy(LOCK) \
+ (pthread_in_use () ? pthread_mutex_destroy (LOCK) : 0)
+
+/* ------------------------- gl_rwlock_t datatype ------------------------- */
+
+# if HAVE_PTHREAD_RWLOCK
+
+# ifdef PTHREAD_RWLOCK_INITIALIZER
+
+typedef pthread_rwlock_t gl_rwlock_t;
+# define gl_rwlock_define(STORAGECLASS, NAME) \
+ STORAGECLASS pthread_rwlock_t NAME;
+# define gl_rwlock_define_initialized(STORAGECLASS, NAME) \
+ STORAGECLASS pthread_rwlock_t NAME = gl_rwlock_initializer;
+# define gl_rwlock_initializer \
+ PTHREAD_RWLOCK_INITIALIZER
+# define glthread_rwlock_init(LOCK) \
+ (pthread_in_use () ? pthread_rwlock_init (LOCK, NULL) : 0)
+# define glthread_rwlock_rdlock(LOCK) \
+ (pthread_in_use () ? pthread_rwlock_rdlock (LOCK) : 0)
+# define glthread_rwlock_wrlock(LOCK) \
+ (pthread_in_use () ? pthread_rwlock_wrlock (LOCK) : 0)
+# define glthread_rwlock_unlock(LOCK) \
+ (pthread_in_use () ? pthread_rwlock_unlock (LOCK) : 0)
+# define glthread_rwlock_destroy(LOCK) \
+ (pthread_in_use () ? pthread_rwlock_destroy (LOCK) : 0)
+
+# else
+
+typedef struct
+ {
+ int initialized;
+ pthread_mutex_t guard; /* protects the initialization */
+ pthread_rwlock_t rwlock; /* read-write lock */
+ }
+ gl_rwlock_t;
+# define gl_rwlock_define(STORAGECLASS, NAME) \
+ STORAGECLASS gl_rwlock_t NAME;
+# define gl_rwlock_define_initialized(STORAGECLASS, NAME) \
+ STORAGECLASS gl_rwlock_t NAME = gl_rwlock_initializer;
+# define gl_rwlock_initializer \
+ { 0, PTHREAD_MUTEX_INITIALIZER }
+# define glthread_rwlock_init(LOCK) \
+ (pthread_in_use () ? glthread_rwlock_init_multithreaded (LOCK) : 0)
+# define glthread_rwlock_rdlock(LOCK) \
+ (pthread_in_use () ? glthread_rwlock_rdlock_multithreaded (LOCK) : 0)
+# define glthread_rwlock_wrlock(LOCK) \
+ (pthread_in_use () ? glthread_rwlock_wrlock_multithreaded (LOCK) : 0)
+# define glthread_rwlock_unlock(LOCK) \
+ (pthread_in_use () ? glthread_rwlock_unlock_multithreaded (LOCK) : 0)
+# define glthread_rwlock_destroy(LOCK) \
+ (pthread_in_use () ? glthread_rwlock_destroy_multithreaded (LOCK) : 0)
+extern int glthread_rwlock_init_multithreaded (gl_rwlock_t *lock);
+extern int glthread_rwlock_rdlock_multithreaded (gl_rwlock_t *lock);
+extern int glthread_rwlock_wrlock_multithreaded (gl_rwlock_t *lock);
+extern int glthread_rwlock_unlock_multithreaded (gl_rwlock_t *lock);
+extern int glthread_rwlock_destroy_multithreaded (gl_rwlock_t *lock);
+
+# endif
+
+# else
+
+typedef struct
+ {
+ pthread_mutex_t lock; /* protects the remaining fields */
+ pthread_cond_t waiting_readers; /* waiting readers */
+ pthread_cond_t waiting_writers; /* waiting writers */
+ unsigned int waiting_writers_count; /* number of waiting writers */
+ int runcount; /* number of readers running, or -1 when a writer runs */
+ }
+ gl_rwlock_t;
+# define gl_rwlock_define(STORAGECLASS, NAME) \
+ STORAGECLASS gl_rwlock_t NAME;
+# define gl_rwlock_define_initialized(STORAGECLASS, NAME) \
+ STORAGECLASS gl_rwlock_t NAME = gl_rwlock_initializer;
+# define gl_rwlock_initializer \
+ { PTHREAD_MUTEX_INITIALIZER, PTHREAD_COND_INITIALIZER, PTHREAD_COND_INITIALIZER, 0, 0 }
+# define glthread_rwlock_init(LOCK) \
+ (pthread_in_use () ? glthread_rwlock_init_multithreaded (LOCK) : 0)
+# define glthread_rwlock_rdlock(LOCK) \
+ (pthread_in_use () ? glthread_rwlock_rdlock_multithreaded (LOCK) : 0)
+# define glthread_rwlock_wrlock(LOCK) \
+ (pthread_in_use () ? glthread_rwlock_wrlock_multithreaded (LOCK) : 0)
+# define glthread_rwlock_unlock(LOCK) \
+ (pthread_in_use () ? glthread_rwlock_unlock_multithreaded (LOCK) : 0)
+# define glthread_rwlock_destroy(LOCK) \
+ (pthread_in_use () ? glthread_rwlock_destroy_multithreaded (LOCK) : 0)
+extern int glthread_rwlock_init_multithreaded (gl_rwlock_t *lock);
+extern int glthread_rwlock_rdlock_multithreaded (gl_rwlock_t *lock);
+extern int glthread_rwlock_wrlock_multithreaded (gl_rwlock_t *lock);
+extern int glthread_rwlock_unlock_multithreaded (gl_rwlock_t *lock);
+extern int glthread_rwlock_destroy_multithreaded (gl_rwlock_t *lock);
+
+# endif
+
+/* --------------------- gl_recursive_lock_t datatype --------------------- */
+
+# if HAVE_PTHREAD_MUTEX_RECURSIVE
+
+# if defined PTHREAD_RECURSIVE_MUTEX_INITIALIZER || defined PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP
+
+typedef pthread_mutex_t gl_recursive_lock_t;
+# define gl_recursive_lock_define(STORAGECLASS, NAME) \
+ STORAGECLASS pthread_mutex_t NAME;
+# define gl_recursive_lock_define_initialized(STORAGECLASS, NAME) \
+ STORAGECLASS pthread_mutex_t NAME = gl_recursive_lock_initializer;
+# ifdef PTHREAD_RECURSIVE_MUTEX_INITIALIZER
+# define gl_recursive_lock_initializer \
+ PTHREAD_RECURSIVE_MUTEX_INITIALIZER
+# else
+# define gl_recursive_lock_initializer \
+ PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP
+# endif
+# define glthread_recursive_lock_init(LOCK) \
+ (pthread_in_use () ? glthread_recursive_lock_init_multithreaded (LOCK) : 0)
+# define glthread_recursive_lock_lock(LOCK) \
+ (pthread_in_use () ? pthread_mutex_lock (LOCK) : 0)
+# define glthread_recursive_lock_unlock(LOCK) \
+ (pthread_in_use () ? pthread_mutex_unlock (LOCK) : 0)
+# define glthread_recursive_lock_destroy(LOCK) \
+ (pthread_in_use () ? pthread_mutex_destroy (LOCK) : 0)
+extern int glthread_recursive_lock_init_multithreaded (gl_recursive_lock_t *lock);
+
+# else
+
+typedef struct
+ {
+ pthread_mutex_t recmutex; /* recursive mutex */
+ pthread_mutex_t guard; /* protects the initialization */
+ int initialized;
+ }
+ gl_recursive_lock_t;
+# define gl_recursive_lock_define(STORAGECLASS, NAME) \
+ STORAGECLASS gl_recursive_lock_t NAME;
+# define gl_recursive_lock_define_initialized(STORAGECLASS, NAME) \
+ STORAGECLASS gl_recursive_lock_t NAME = gl_recursive_lock_initializer;
+# define gl_recursive_lock_initializer \
+ { PTHREAD_MUTEX_INITIALIZER, PTHREAD_MUTEX_INITIALIZER, 0 }
+# define glthread_recursive_lock_init(LOCK) \
+ (pthread_in_use () ? glthread_recursive_lock_init_multithreaded (LOCK) : 0)
+# define glthread_recursive_lock_lock(LOCK) \
+ (pthread_in_use () ? glthread_recursive_lock_lock_multithreaded (LOCK) : 0)
+# define glthread_recursive_lock_unlock(LOCK) \
+ (pthread_in_use () ? glthread_recursive_lock_unlock_multithreaded (LOCK) : 0)
+# define glthread_recursive_lock_destroy(LOCK) \
+ (pthread_in_use () ? glthread_recursive_lock_destroy_multithreaded (LOCK) : 0)
+extern int glthread_recursive_lock_init_multithreaded (gl_recursive_lock_t *lock);
+extern int glthread_recursive_lock_lock_multithreaded (gl_recursive_lock_t *lock);
+extern int glthread_recursive_lock_unlock_multithreaded (gl_recursive_lock_t *lock);
+extern int glthread_recursive_lock_destroy_multithreaded (gl_recursive_lock_t *lock);
+
+# endif
+
+# else
+
+/* Old versions of POSIX threads on Solaris did not have recursive locks.
+ We have to implement them ourselves. */
+
+typedef struct
+ {
+ pthread_mutex_t mutex;
+ pthread_t owner;
+ unsigned long depth;
+ }
+ gl_recursive_lock_t;
+# define gl_recursive_lock_define(STORAGECLASS, NAME) \
+ STORAGECLASS gl_recursive_lock_t NAME;
+# define gl_recursive_lock_define_initialized(STORAGECLASS, NAME) \
+ STORAGECLASS gl_recursive_lock_t NAME = gl_recursive_lock_initializer;
+# define gl_recursive_lock_initializer \
+ { PTHREAD_MUTEX_INITIALIZER, (pthread_t) 0, 0 }
+# define glthread_recursive_lock_init(LOCK) \
+ (pthread_in_use () ? glthread_recursive_lock_init_multithreaded (LOCK) : 0)
+# define glthread_recursive_lock_lock(LOCK) \
+ (pthread_in_use () ? glthread_recursive_lock_lock_multithreaded (LOCK) : 0)
+# define glthread_recursive_lock_unlock(LOCK) \
+ (pthread_in_use () ? glthread_recursive_lock_unlock_multithreaded (LOCK) : 0)
+# define glthread_recursive_lock_destroy(LOCK) \
+ (pthread_in_use () ? glthread_recursive_lock_destroy_multithreaded (LOCK) : 0)
+extern int glthread_recursive_lock_init_multithreaded (gl_recursive_lock_t *lock);
+extern int glthread_recursive_lock_lock_multithreaded (gl_recursive_lock_t *lock);
+extern int glthread_recursive_lock_unlock_multithreaded (gl_recursive_lock_t *lock);
+extern int glthread_recursive_lock_destroy_multithreaded (gl_recursive_lock_t *lock);
+
+# endif
+
+/* -------------------------- gl_once_t datatype -------------------------- */
+
+typedef pthread_once_t gl_once_t;
+# define gl_once_define(STORAGECLASS, NAME) \
+ STORAGECLASS pthread_once_t NAME = PTHREAD_ONCE_INIT;
+# define glthread_once(ONCE_CONTROL, INITFUNCTION) \
+ (pthread_in_use () \
+ ? pthread_once (ONCE_CONTROL, INITFUNCTION) \
+ : (glthread_once_singlethreaded (ONCE_CONTROL) ? (INITFUNCTION (), 0) : 0))
+extern int glthread_once_singlethreaded (pthread_once_t *once_control);
+
+# ifdef __cplusplus
+}
+# endif
+
+#endif
+
+/* ========================================================================= */
+
+#if USE_PTH_THREADS
+
+/* Use the GNU Pth threads library. */
+
+# include <pth.h>
+
+# ifdef __cplusplus
+extern "C" {
+# endif
+
+# if USE_PTH_THREADS_WEAK
+
+/* Use weak references to the GNU Pth threads library. */
+
+# pragma weak pth_mutex_init
+# pragma weak pth_mutex_acquire
+# pragma weak pth_mutex_release
+# pragma weak pth_rwlock_init
+# pragma weak pth_rwlock_acquire
+# pragma weak pth_rwlock_release
+# pragma weak pth_once
+
+# pragma weak pth_cancel
+# define pth_in_use() (pth_cancel != NULL)
+
+# else
+
+# define pth_in_use() 1
+
+# endif
+
+/* -------------------------- gl_lock_t datatype -------------------------- */
+
+typedef pth_mutex_t gl_lock_t;
+# define gl_lock_define(STORAGECLASS, NAME) \
+ STORAGECLASS pth_mutex_t NAME;
+# define gl_lock_define_initialized(STORAGECLASS, NAME) \
+ STORAGECLASS pth_mutex_t NAME = gl_lock_initializer;
+# define gl_lock_initializer \
+ PTH_MUTEX_INIT
+# define glthread_lock_init(LOCK) \
+ (pth_in_use () && !pth_mutex_init (LOCK) ? errno : 0)
+# define glthread_lock_lock(LOCK) \
+ (pth_in_use () && !pth_mutex_acquire (LOCK, 0, NULL) ? errno : 0)
+# define glthread_lock_unlock(LOCK) \
+ (pth_in_use () && !pth_mutex_release (LOCK) ? errno : 0)
+# define glthread_lock_destroy(LOCK) \
+ ((void)(LOCK), 0)
+
+/* ------------------------- gl_rwlock_t datatype ------------------------- */
+
+typedef pth_rwlock_t gl_rwlock_t;
+# define gl_rwlock_define(STORAGECLASS, NAME) \
+ STORAGECLASS pth_rwlock_t NAME;
+# define gl_rwlock_define_initialized(STORAGECLASS, NAME) \
+ STORAGECLASS pth_rwlock_t NAME = gl_rwlock_initializer;
+# define gl_rwlock_initializer \
+ PTH_RWLOCK_INIT
+# define glthread_rwlock_init(LOCK) \
+ (pth_in_use () && !pth_rwlock_init (LOCK) ? errno : 0)
+# define glthread_rwlock_rdlock(LOCK) \
+ (pth_in_use () && !pth_rwlock_acquire (LOCK, PTH_RWLOCK_RD, 0, NULL) ? errno : 0)
+# define glthread_rwlock_wrlock(LOCK) \
+ (pth_in_use () && !pth_rwlock_acquire (LOCK, PTH_RWLOCK_RW, 0, NULL) ? errno : 0)
+# define glthread_rwlock_unlock(LOCK) \
+ (pth_in_use () && !pth_rwlock_release (LOCK) ? errno : 0)
+# define glthread_rwlock_destroy(LOCK) \
+ ((void)(LOCK), 0)
+
+/* --------------------- gl_recursive_lock_t datatype --------------------- */
+
+/* In Pth, mutexes are recursive by default. */
+typedef pth_mutex_t gl_recursive_lock_t;
+# define gl_recursive_lock_define(STORAGECLASS, NAME) \
+ STORAGECLASS pth_mutex_t NAME;
+# define gl_recursive_lock_define_initialized(STORAGECLASS, NAME) \
+ STORAGECLASS pth_mutex_t NAME = gl_recursive_lock_initializer;
+# define gl_recursive_lock_initializer \
+ PTH_MUTEX_INIT
+# define glthread_recursive_lock_init(LOCK) \
+ (pth_in_use () && !pth_mutex_init (LOCK) ? errno : 0)
+# define glthread_recursive_lock_lock(LOCK) \
+ (pth_in_use () && !pth_mutex_acquire (LOCK, 0, NULL) ? errno : 0)
+# define glthread_recursive_lock_unlock(LOCK) \
+ (pth_in_use () && !pth_mutex_release (LOCK) ? errno : 0)
+# define glthread_recursive_lock_destroy(LOCK) \
+ ((void)(LOCK), 0)
+
+/* -------------------------- gl_once_t datatype -------------------------- */
+
+typedef pth_once_t gl_once_t;
+# define gl_once_define(STORAGECLASS, NAME) \
+ STORAGECLASS pth_once_t NAME = PTH_ONCE_INIT;
+# define glthread_once(ONCE_CONTROL, INITFUNCTION) \
+ (pth_in_use () \
+ ? glthread_once_multithreaded (ONCE_CONTROL, INITFUNCTION) \
+ : (glthread_once_singlethreaded (ONCE_CONTROL) ? (INITFUNCTION (), 0) : 0))
+extern int glthread_once_multithreaded (pth_once_t *once_control, void (*initfunction) (void));
+extern int glthread_once_singlethreaded (pth_once_t *once_control);
+
+# ifdef __cplusplus
+}
+# endif
+
+#endif
+
+/* ========================================================================= */
+
+#if USE_SOLARIS_THREADS
+
+/* Use the old Solaris threads library. */
+
+# include <thread.h>
+# include <synch.h>
+
+# ifdef __cplusplus
+extern "C" {
+# endif
+
+# if USE_SOLARIS_THREADS_WEAK
+
+/* Use weak references to the old Solaris threads library. */
+
+# pragma weak mutex_init
+# pragma weak mutex_lock
+# pragma weak mutex_unlock
+# pragma weak mutex_destroy
+# pragma weak rwlock_init
+# pragma weak rw_rdlock
+# pragma weak rw_wrlock
+# pragma weak rw_unlock
+# pragma weak rwlock_destroy
+# pragma weak thr_self
+
+# pragma weak thr_suspend
+# define thread_in_use() (thr_suspend != NULL)
+
+# else
+
+# define thread_in_use() 1
+
+# endif
+
+/* -------------------------- gl_lock_t datatype -------------------------- */
+
+typedef mutex_t gl_lock_t;
+# define gl_lock_define(STORAGECLASS, NAME) \
+ STORAGECLASS mutex_t NAME;
+# define gl_lock_define_initialized(STORAGECLASS, NAME) \
+ STORAGECLASS mutex_t NAME = gl_lock_initializer;
+# define gl_lock_initializer \
+ DEFAULTMUTEX
+# define glthread_lock_init(LOCK) \
+ (thread_in_use () ? mutex_init (LOCK, USYNC_THREAD, NULL) : 0)
+# define glthread_lock_lock(LOCK) \
+ (thread_in_use () ? mutex_lock (LOCK) : 0)
+# define glthread_lock_unlock(LOCK) \
+ (thread_in_use () ? mutex_unlock (LOCK) : 0)
+# define glthread_lock_destroy(LOCK) \
+ (thread_in_use () ? mutex_destroy (LOCK) : 0)
+
+/* ------------------------- gl_rwlock_t datatype ------------------------- */
+
+typedef rwlock_t gl_rwlock_t;
+# define gl_rwlock_define(STORAGECLASS, NAME) \
+ STORAGECLASS rwlock_t NAME;
+# define gl_rwlock_define_initialized(STORAGECLASS, NAME) \
+ STORAGECLASS rwlock_t NAME = gl_rwlock_initializer;
+# define gl_rwlock_initializer \
+ DEFAULTRWLOCK
+# define glthread_rwlock_init(LOCK) \
+ (thread_in_use () ? rwlock_init (LOCK, USYNC_THREAD, NULL) : 0)
+# define glthread_rwlock_rdlock(LOCK) \
+ (thread_in_use () ? rw_rdlock (LOCK) : 0)
+# define glthread_rwlock_wrlock(LOCK) \
+ (thread_in_use () ? rw_wrlock (LOCK) : 0)
+# define glthread_rwlock_unlock(LOCK) \
+ (thread_in_use () ? rw_unlock (LOCK) : 0)
+# define glthread_rwlock_destroy(LOCK) \
+ (thread_in_use () ? rwlock_destroy (LOCK) : 0)
+
+/* --------------------- gl_recursive_lock_t datatype --------------------- */
+
+/* Old Solaris threads did not have recursive locks.
+ We have to implement them ourselves. */
+
+typedef struct
+ {
+ mutex_t mutex;
+ thread_t owner;
+ unsigned long depth;
+ }
+ gl_recursive_lock_t;
+# define gl_recursive_lock_define(STORAGECLASS, NAME) \
+ STORAGECLASS gl_recursive_lock_t NAME;
+# define gl_recursive_lock_define_initialized(STORAGECLASS, NAME) \
+ STORAGECLASS gl_recursive_lock_t NAME = gl_recursive_lock_initializer;
+# define gl_recursive_lock_initializer \
+ { DEFAULTMUTEX, (thread_t) 0, 0 }
+# define glthread_recursive_lock_init(LOCK) \
+ (thread_in_use () ? glthread_recursive_lock_init_multithreaded (LOCK) : 0)
+# define glthread_recursive_lock_lock(LOCK) \
+ (thread_in_use () ? glthread_recursive_lock_lock_multithreaded (LOCK) : 0)
+# define glthread_recursive_lock_unlock(LOCK) \
+ (thread_in_use () ? glthread_recursive_lock_unlock_multithreaded (LOCK) : 0)
+# define glthread_recursive_lock_destroy(LOCK) \
+ (thread_in_use () ? glthread_recursive_lock_destroy_multithreaded (LOCK) : 0)
+extern int glthread_recursive_lock_init_multithreaded (gl_recursive_lock_t *lock);
+extern int glthread_recursive_lock_lock_multithreaded (gl_recursive_lock_t *lock);
+extern int glthread_recursive_lock_unlock_multithreaded (gl_recursive_lock_t *lock);
+extern int glthread_recursive_lock_destroy_multithreaded (gl_recursive_lock_t *lock);
+
+/* -------------------------- gl_once_t datatype -------------------------- */
+
+typedef struct
+ {
+ volatile int inited;
+ mutex_t mutex;
+ }
+ gl_once_t;
+# define gl_once_define(STORAGECLASS, NAME) \
+ STORAGECLASS gl_once_t NAME = { 0, DEFAULTMUTEX };
+# define glthread_once(ONCE_CONTROL, INITFUNCTION) \
+ (thread_in_use () \
+ ? glthread_once_multithreaded (ONCE_CONTROL, INITFUNCTION) \
+ : (glthread_once_singlethreaded (ONCE_CONTROL) ? (INITFUNCTION (), 0) : 0))
+extern int glthread_once_multithreaded (gl_once_t *once_control, void (*initfunction) (void));
+extern int glthread_once_singlethreaded (gl_once_t *once_control);
+
+# ifdef __cplusplus
+}
+# endif
+
+#endif
+
+/* ========================================================================= */
+
+#if USE_WINDOWS_THREADS
+
+# define WIN32_LEAN_AND_MEAN /* avoid including junk */
+# include <windows.h>
+
+# ifdef __cplusplus
+extern "C" {
+# endif
+
+/* We can use CRITICAL_SECTION directly, rather than the native Windows Event,
+ Mutex, Semaphore types, because
+ - we need only to synchronize inside a single process (address space),
+ not inter-process locking,
+ - we don't need to support trylock operations. (TryEnterCriticalSection
+ does not work on Windows 95/98/ME. Packages that need trylock usually
+ define their own mutex type.) */
+
+/* There is no way to statically initialize a CRITICAL_SECTION. It needs
+ to be done lazily, once only. For this we need spinlocks. */
+
+typedef struct { volatile int done; volatile long started; } gl_spinlock_t;
+
+/* -------------------------- gl_lock_t datatype -------------------------- */
+
+typedef struct
+ {
+ gl_spinlock_t guard; /* protects the initialization */
+ CRITICAL_SECTION lock;
+ }
+ gl_lock_t;
+# define gl_lock_define(STORAGECLASS, NAME) \
+ STORAGECLASS gl_lock_t NAME;
+# define gl_lock_define_initialized(STORAGECLASS, NAME) \
+ STORAGECLASS gl_lock_t NAME = gl_lock_initializer;
+# define gl_lock_initializer \
+ { { 0, -1 } }
+# define glthread_lock_init(LOCK) \
+ (glthread_lock_init_func (LOCK), 0)
+# define glthread_lock_lock(LOCK) \
+ glthread_lock_lock_func (LOCK)
+# define glthread_lock_unlock(LOCK) \
+ glthread_lock_unlock_func (LOCK)
+# define glthread_lock_destroy(LOCK) \
+ glthread_lock_destroy_func (LOCK)
+extern void glthread_lock_init_func (gl_lock_t *lock);
+extern int glthread_lock_lock_func (gl_lock_t *lock);
+extern int glthread_lock_unlock_func (gl_lock_t *lock);
+extern int glthread_lock_destroy_func (gl_lock_t *lock);
+
+/* ------------------------- gl_rwlock_t datatype ------------------------- */
+
+/* It is impossible to implement read-write locks using plain locks, without
+ introducing an extra thread dedicated to managing read-write locks.
+ Therefore here we need to use the low-level Event type. */
+
+typedef struct
+ {
+ HANDLE *array; /* array of waiting threads, each represented by an event */
+ unsigned int count; /* number of waiting threads */
+ unsigned int alloc; /* length of allocated array */
+ unsigned int offset; /* index of first waiting thread in array */
+ }
+ gl_carray_waitqueue_t;
+typedef struct
+ {
+ gl_spinlock_t guard; /* protects the initialization */
+ CRITICAL_SECTION lock; /* protects the remaining fields */
+ gl_carray_waitqueue_t waiting_readers; /* waiting readers */
+ gl_carray_waitqueue_t waiting_writers; /* waiting writers */
+ int runcount; /* number of readers running, or -1 when a writer runs */
+ }
+ gl_rwlock_t;
+# define gl_rwlock_define(STORAGECLASS, NAME) \
+ STORAGECLASS gl_rwlock_t NAME;
+# define gl_rwlock_define_initialized(STORAGECLASS, NAME) \
+ STORAGECLASS gl_rwlock_t NAME = gl_rwlock_initializer;
+# define gl_rwlock_initializer \
+ { { 0, -1 } }
+# define glthread_rwlock_init(LOCK) \
+ (glthread_rwlock_init_func (LOCK), 0)
+# define glthread_rwlock_rdlock(LOCK) \
+ glthread_rwlock_rdlock_func (LOCK)
+# define glthread_rwlock_wrlock(LOCK) \
+ glthread_rwlock_wrlock_func (LOCK)
+# define glthread_rwlock_unlock(LOCK) \
+ glthread_rwlock_unlock_func (LOCK)
+# define glthread_rwlock_destroy(LOCK) \
+ glthread_rwlock_destroy_func (LOCK)
+extern void glthread_rwlock_init_func (gl_rwlock_t *lock);
+extern int glthread_rwlock_rdlock_func (gl_rwlock_t *lock);
+extern int glthread_rwlock_wrlock_func (gl_rwlock_t *lock);
+extern int glthread_rwlock_unlock_func (gl_rwlock_t *lock);
+extern int glthread_rwlock_destroy_func (gl_rwlock_t *lock);
+
+/* --------------------- gl_recursive_lock_t datatype --------------------- */
+
+/* The native Windows documentation says that CRITICAL_SECTION already
+ implements a recursive lock. But we need not rely on it: It's easy to
+ implement a recursive lock without this assumption. */
+
+typedef struct
+ {
+ gl_spinlock_t guard; /* protects the initialization */
+ DWORD owner;
+ unsigned long depth;
+ CRITICAL_SECTION lock;
+ }
+ gl_recursive_lock_t;
+# define gl_recursive_lock_define(STORAGECLASS, NAME) \
+ STORAGECLASS gl_recursive_lock_t NAME;
+# define gl_recursive_lock_define_initialized(STORAGECLASS, NAME) \
+ STORAGECLASS gl_recursive_lock_t NAME = gl_recursive_lock_initializer;
+# define gl_recursive_lock_initializer \
+ { { 0, -1 }, 0, 0 }
+# define glthread_recursive_lock_init(LOCK) \
+ (glthread_recursive_lock_init_func (LOCK), 0)
+# define glthread_recursive_lock_lock(LOCK) \
+ glthread_recursive_lock_lock_func (LOCK)
+# define glthread_recursive_lock_unlock(LOCK) \
+ glthread_recursive_lock_unlock_func (LOCK)
+# define glthread_recursive_lock_destroy(LOCK) \
+ glthread_recursive_lock_destroy_func (LOCK)
+extern void glthread_recursive_lock_init_func (gl_recursive_lock_t *lock);
+extern int glthread_recursive_lock_lock_func (gl_recursive_lock_t *lock);
+extern int glthread_recursive_lock_unlock_func (gl_recursive_lock_t *lock);
+extern int glthread_recursive_lock_destroy_func (gl_recursive_lock_t *lock);
+
+/* -------------------------- gl_once_t datatype -------------------------- */
+
+typedef struct
+ {
+ volatile int inited;
+ volatile long started;
+ CRITICAL_SECTION lock;
+ }
+ gl_once_t;
+# define gl_once_define(STORAGECLASS, NAME) \
+ STORAGECLASS gl_once_t NAME = { -1, -1 };
+# define glthread_once(ONCE_CONTROL, INITFUNCTION) \
+ (glthread_once_func (ONCE_CONTROL, INITFUNCTION), 0)
+extern void glthread_once_func (gl_once_t *once_control, void (*initfunction) (void));
+
+# ifdef __cplusplus
+}
+# endif
+
+#endif
+
+/* ========================================================================= */
+
+#if !(USE_POSIX_THREADS || USE_PTH_THREADS || USE_SOLARIS_THREADS || USE_WINDOWS_THREADS)
+
+/* Provide dummy implementation if threads are not supported. */
+
+/* -------------------------- gl_lock_t datatype -------------------------- */
+
+typedef int gl_lock_t;
+# define gl_lock_define(STORAGECLASS, NAME)
+# define gl_lock_define_initialized(STORAGECLASS, NAME)
+# define glthread_lock_init(NAME) 0
+# define glthread_lock_lock(NAME) 0
+# define glthread_lock_unlock(NAME) 0
+# define glthread_lock_destroy(NAME) 0
+
+/* ------------------------- gl_rwlock_t datatype ------------------------- */
+
+typedef int gl_rwlock_t;
+# define gl_rwlock_define(STORAGECLASS, NAME)
+# define gl_rwlock_define_initialized(STORAGECLASS, NAME)
+# define glthread_rwlock_init(NAME) 0
+# define glthread_rwlock_rdlock(NAME) 0
+# define glthread_rwlock_wrlock(NAME) 0
+# define glthread_rwlock_unlock(NAME) 0
+# define glthread_rwlock_destroy(NAME) 0
+
+/* --------------------- gl_recursive_lock_t datatype --------------------- */
+
+typedef int gl_recursive_lock_t;
+# define gl_recursive_lock_define(STORAGECLASS, NAME)
+# define gl_recursive_lock_define_initialized(STORAGECLASS, NAME)
+# define glthread_recursive_lock_init(NAME) 0
+# define glthread_recursive_lock_lock(NAME) 0
+# define glthread_recursive_lock_unlock(NAME) 0
+# define glthread_recursive_lock_destroy(NAME) 0
+
+/* -------------------------- gl_once_t datatype -------------------------- */
+
+typedef int gl_once_t;
+# define gl_once_define(STORAGECLASS, NAME) \
+ STORAGECLASS gl_once_t NAME = 0;
+# define glthread_once(ONCE_CONTROL, INITFUNCTION) \
+ (*(ONCE_CONTROL) == 0 ? (*(ONCE_CONTROL) = ~ 0, INITFUNCTION (), 0) : 0)
+
+#endif
+
+/* ========================================================================= */
+
+/* Macros with built-in error handling. */
+
+/* -------------------------- gl_lock_t datatype -------------------------- */
+
+#define gl_lock_init(NAME) \
+ do \
+ { \
+ if (glthread_lock_init (&NAME)) \
+ abort (); \
+ } \
+ while (0)
+#define gl_lock_lock(NAME) \
+ do \
+ { \
+ if (glthread_lock_lock (&NAME)) \
+ abort (); \
+ } \
+ while (0)
+#define gl_lock_unlock(NAME) \
+ do \
+ { \
+ if (glthread_lock_unlock (&NAME)) \
+ abort (); \
+ } \
+ while (0)
+#define gl_lock_destroy(NAME) \
+ do \
+ { \
+ if (glthread_lock_destroy (&NAME)) \
+ abort (); \
+ } \
+ while (0)
+
+/* ------------------------- gl_rwlock_t datatype ------------------------- */
+
+#define gl_rwlock_init(NAME) \
+ do \
+ { \
+ if (glthread_rwlock_init (&NAME)) \
+ abort (); \
+ } \
+ while (0)
+#define gl_rwlock_rdlock(NAME) \
+ do \
+ { \
+ if (glthread_rwlock_rdlock (&NAME)) \
+ abort (); \
+ } \
+ while (0)
+#define gl_rwlock_wrlock(NAME) \
+ do \
+ { \
+ if (glthread_rwlock_wrlock (&NAME)) \
+ abort (); \
+ } \
+ while (0)
+#define gl_rwlock_unlock(NAME) \
+ do \
+ { \
+ if (glthread_rwlock_unlock (&NAME)) \
+ abort (); \
+ } \
+ while (0)
+#define gl_rwlock_destroy(NAME) \
+ do \
+ { \
+ if (glthread_rwlock_destroy (&NAME)) \
+ abort (); \
+ } \
+ while (0)
+
+/* --------------------- gl_recursive_lock_t datatype --------------------- */
+
+#define gl_recursive_lock_init(NAME) \
+ do \
+ { \
+ if (glthread_recursive_lock_init (&NAME)) \
+ abort (); \
+ } \
+ while (0)
+#define gl_recursive_lock_lock(NAME) \
+ do \
+ { \
+ if (glthread_recursive_lock_lock (&NAME)) \
+ abort (); \
+ } \
+ while (0)
+#define gl_recursive_lock_unlock(NAME) \
+ do \
+ { \
+ if (glthread_recursive_lock_unlock (&NAME)) \
+ abort (); \
+ } \
+ while (0)
+#define gl_recursive_lock_destroy(NAME) \
+ do \
+ { \
+ if (glthread_recursive_lock_destroy (&NAME)) \
+ abort (); \
+ } \
+ while (0)
+
+/* -------------------------- gl_once_t datatype -------------------------- */
+
+#define gl_once(NAME, INITFUNCTION) \
+ do \
+ { \
+ if (glthread_once (&NAME, INITFUNCTION)) \
+ abort (); \
+ } \
+ while (0)
+
+/* ========================================================================= */
+
+#endif /* _LOCK_H */
diff --git a/lib/glthread/threadlib.c b/lib/glthread/threadlib.c
new file mode 100644
index 0000000..be63713
--- /dev/null
+++ b/lib/glthread/threadlib.c
@@ -0,0 +1,73 @@
+/* Multithreading primitives.
+ Copyright (C) 2005-2016 Free Software Foundation, Inc.
+
+ This 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 <http://www.gnu.org/licenses/>. */
+
+/* Written by Bruno Haible <bruno@clisp.org>, 2005. */
+
+#include <config.h>
+
+/* ========================================================================= */
+
+#if USE_POSIX_THREADS
+
+/* Use the POSIX threads library. */
+
+# include <pthread.h>
+# include <stdlib.h>
+
+# if PTHREAD_IN_USE_DETECTION_HARD
+
+/* The function to be executed by a dummy thread. */
+static void *
+dummy_thread_func (void *arg)
+{
+ return arg;
+}
+
+int
+glthread_in_use (void)
+{
+ static int tested;
+ static int result; /* 1: linked with -lpthread, 0: only with libc */
+
+ if (!tested)
+ {
+ pthread_t thread;
+
+ if (pthread_create (&thread, NULL, dummy_thread_func, NULL) != 0)
+ /* Thread creation failed. */
+ result = 0;
+ else
+ {
+ /* Thread creation works. */
+ void *retval;
+ if (pthread_join (thread, &retval) != 0)
+ abort ();
+ result = 1;
+ }
+ tested = 1;
+ }
+ return result;
+}
+
+# endif
+
+#endif
+
+/* ========================================================================= */
+
+/* This declaration is solely to ensure that after preprocessing
+ this file is never empty. */
+typedef int dummy;
diff --git a/lib/gnulib.mk b/lib/gnulib.mk
index a5c0a79..5f69cd4 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-2012 Free Software Foundation, Inc.
+# Copyright (C) 2002-2016 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
@@ -21,51 +21,58 @@
# the same distribution terms as the rest of that program.
#
# Generated by gnulib-tool.
-# Reproduce by: gnulib-tool --import --dir=. --local-dir=gl --lib=libsed --source-base=lib --m4-base=m4 --doc-base=doc --tests-base=tests --aux-dir=build-aux --no-conditional-dependencies --no-libtool --macro-prefix=gl acl alloca btowc c-ctype extensions fwriting getdelim getopt gettext-h localcharset mbrlen mbrtowc mbsinit memchr mkostemp obstack pathmax regex rename selinux-h ssize_t stat-macros stdbool strerror strverscmp unlocked-io verify version-etc-fsf wcrtomb wctob
+# 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
-AUTOMAKE_OPTIONS = 1.5 gnits
-SUBDIRS =
-noinst_HEADERS =
-noinst_LIBRARIES =
-noinst_LTLIBRARIES =
-EXTRA_DIST =
-BUILT_SOURCES =
-SUFFIXES =
-MOSTLYCLEANFILES = core *.stackdump
-MOSTLYCLEANDIRS =
-CLEANFILES =
-DISTCLEANFILES =
-MAINTAINERCLEANFILES =
+MOSTLYCLEANFILES += lib/core lib/*.stackdump
-AM_CPPFLAGS =
-AM_CFLAGS =
+noinst_LIBRARIES += lib/libsed.a
-noinst_LIBRARIES += libsed.a
+lib_libsed_a_SOURCES =
+lib_libsed_a_LIBADD = $(gl_LIBOBJS)
+lib_libsed_a_DEPENDENCIES = $(gl_LIBOBJS)
+EXTRA_lib_libsed_a_SOURCES =
-libsed_a_SOURCES =
-libsed_a_LIBADD = $(gl_LIBOBJS)
-libsed_a_DEPENDENCIES = $(gl_LIBOBJS)
-EXTRA_libsed_a_SOURCES =
+## begin gnulib module absolute-header
-## begin gnulib module acl
+# Use this preprocessor expression to decide whether #include_next works.
+# Do not rely on a 'configure'-time test for this, since the expression
+# might appear in an installed header, which is used by some other compiler.
+HAVE_INCLUDE_NEXT = lib/(__GNUC__ lib/|| lib/60000000 lib/<= lib/__DECC_VER)
-libsed_a_SOURCES += set-mode-acl.c copy-acl.c file-has-acl.c
+## end gnulib module absolute-header
-EXTRA_DIST += acl-internal.h acl.h acl_entries.c
+## begin gnulib module acl
-EXTRA_libsed_a_SOURCES += acl_entries.c
+lib_libsed_a_SOURCES += lib/copy-acl.c lib/set-acl.c
## end gnulib module acl
+## begin gnulib module acl-permissions
+
+lib_libsed_a_SOURCES += lib/acl-errno-valid.c lib/acl-internal.c lib/get-permissions.c lib/set-permissions.c
+
+EXTRA_DIST += lib/acl-internal.h lib/acl.h lib/acl_entries.c
+
+EXTRA_lib_libsed_a_SOURCES += lib/acl_entries.c
+
+## end gnulib module acl-permissions
+
+## begin gnulib module alignof
+
+
+EXTRA_DIST += lib/alignof.h
+
+## end gnulib module alignof
+
## begin gnulib module alloca
-libsed_a_LIBADD += @ALLOCA@
-libsed_a_DEPENDENCIES += @ALLOCA@
-EXTRA_DIST += alloca.c
+lib_libsed_a_LIBADD += @ALLOCA@
+lib_libsed_a_DEPENDENCIES += @ALLOCA@
+EXTRA_DIST += lib/alloca.c
-EXTRA_libsed_a_SOURCES += alloca.c
+EXTRA_lib_libsed_a_SOURCES += lib/alloca.c
## end gnulib module alloca
@@ -76,66 +83,89 @@ BUILT_SOURCES += $(ALLOCA_H)
# We need the following in order to create <alloca.h> when the system
# doesn't have one that works with the given compiler.
if GL_GENERATE_ALLOCA_H
-alloca.h: alloca.in.h $(top_builddir)/config.status
+lib/alloca.h: lib/alloca.in.h $(top_builddir)/config.status
$(AM_V_GEN)rm -f $@-t $@ && \
{ echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
- cat $(srcdir)/alloca.in.h; \
+ cat $(top_srcdir)/lib/alloca.in.h; \
} > $@-t && \
mv -f $@-t $@
else
-alloca.h: $(top_builddir)/config.status
+lib/alloca.h: $(top_builddir)/config.status
rm -f $@
endif
-MOSTLYCLEANFILES += alloca.h alloca.h-t
+MOSTLYCLEANFILES += lib/alloca.h lib/alloca.h-t
-EXTRA_DIST += alloca.in.h
+EXTRA_DIST += lib/alloca.in.h
## end gnulib module alloca-opt
+## begin gnulib module announce-gen
+
+
+EXTRA_DIST += $(top_srcdir)/build-aux/announce-gen
+
+## end gnulib module announce-gen
+
## begin gnulib module btowc
-EXTRA_DIST += btowc.c
+EXTRA_DIST += lib/btowc.c
-EXTRA_libsed_a_SOURCES += btowc.c
+EXTRA_lib_libsed_a_SOURCES += lib/btowc.c
## end gnulib module btowc
## begin gnulib module c-ctype
-libsed_a_SOURCES += c-ctype.h c-ctype.c
+lib_libsed_a_SOURCES += lib/c-ctype.h lib/c-ctype.c
## end gnulib module c-ctype
## begin gnulib module c-strcase
-libsed_a_SOURCES += c-strcase.h c-strcasecmp.c c-strncasecmp.c
+lib_libsed_a_SOURCES += lib/c-strcase.h lib/c-strcasecmp.c lib/c-strncasecmp.c
## end gnulib module c-strcase
## begin gnulib module c-strcaseeq
-EXTRA_DIST += c-strcaseeq.h
+EXTRA_DIST += lib/c-strcaseeq.h
## end gnulib module c-strcaseeq
## begin gnulib module canonicalize-lgpl
-EXTRA_DIST += canonicalize-lgpl.c
+EXTRA_DIST += lib/canonicalize-lgpl.c
-EXTRA_libsed_a_SOURCES += canonicalize-lgpl.c
+EXTRA_lib_libsed_a_SOURCES += lib/canonicalize-lgpl.c
## end gnulib module canonicalize-lgpl
+## begin gnulib module close-stream
+
+lib_libsed_a_SOURCES += lib/close-stream.c
+
+EXTRA_DIST += lib/close-stream.h
+
+## end gnulib module close-stream
+
+## begin gnulib module closeout
+
+lib_libsed_a_SOURCES += lib/closeout.c
+
+EXTRA_DIST += lib/closeout.h
+
+## end gnulib module closeout
+
## begin gnulib module configmake
# Listed in the same order as the GNU makefile conventions, and
-# provided by autoconf 2.59c+.
+# provided by autoconf 2.59c+ or 2.70.
# The Automake-defined pkg* macros are appended, in the order
# listed in the Automake 1.10a+ documentation.
-configmake.h: Makefile
+lib/configmake.h: Makefile
$(AM_V_GEN)rm -f $@-t && \
{ echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
echo '#define PREFIX "$(prefix)"'; \
@@ -148,6 +178,7 @@ configmake.h: Makefile
echo '#define SYSCONFDIR "$(sysconfdir)"'; \
echo '#define SHAREDSTATEDIR "$(sharedstatedir)"'; \
echo '#define LOCALSTATEDIR "$(localstatedir)"'; \
+ echo '#define RUNSTATEDIR "$(runstatedir)"'; \
echo '#define INCLUDEDIR "$(includedir)"'; \
echo '#define OLDINCLUDEDIR "$(oldincludedir)"'; \
echo '#define DOCDIR "$(docdir)"'; \
@@ -168,23 +199,65 @@ configmake.h: Makefile
} | sed '/""/d' > $@-t && \
mv -f $@-t $@
-BUILT_SOURCES += configmake.h
-CLEANFILES += configmake.h configmake.h-t
+BUILT_SOURCES += lib/configmake.h
+CLEANFILES += lib/configmake.h lib/configmake.h-t
## end gnulib module configmake
+## begin gnulib module ctype
+
+BUILT_SOURCES += lib/ctype.h
+
+# We need the following in order to create <ctype.h> when the system
+# doesn't have one that works with the given compiler.
+lib/ctype.h: lib/ctype.in.h $(top_builddir)/config.status $(CXXDEFS_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_CTYPE_H''@|$(NEXT_CTYPE_H)|g' \
+ -e 's/@''GNULIB_ISBLANK''@/$(GNULIB_ISBLANK)/g' \
+ -e 's/@''HAVE_ISBLANK''@/$(HAVE_ISBLANK)/g' \
+ -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \
+ -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \
+ < $(top_srcdir)/lib/ctype.in.h; \
+ } > $@-t && \
+ mv $@-t $@
+MOSTLYCLEANFILES += lib/ctype.h lib/ctype.h-t
+
+EXTRA_DIST += lib/ctype.in.h
+
+## end gnulib module ctype
+
+## begin gnulib module dfa
+
+lib_libsed_a_SOURCES += lib/dfa.c lib/localeinfo.c
+
+EXTRA_DIST += lib/dfa.h lib/localeinfo.h
+
+## end gnulib module dfa
+
## begin gnulib module dirname-lgpl
-libsed_a_SOURCES += dirname-lgpl.c basename-lgpl.c stripslash.c
+lib_libsed_a_SOURCES += lib/dirname-lgpl.c lib/basename-lgpl.c lib/stripslash.c
-EXTRA_DIST += dirname.h
+EXTRA_DIST += lib/dirname.h
## end gnulib module dirname-lgpl
+## begin gnulib module do-release-commit-and-tag
+
+
+EXTRA_DIST += $(top_srcdir)/build-aux/do-release-commit-and-tag
+
+## end gnulib module do-release-commit-and-tag
+
## begin gnulib module dosname
-EXTRA_DIST += dosname.h
+EXTRA_DIST += lib/dosname.h
## end gnulib module dosname
@@ -195,7 +268,7 @@ BUILT_SOURCES += $(ERRNO_H)
# We need the following in order to create <errno.h> when the system
# doesn't have one that is POSIX compliant.
if GL_GENERATE_ERRNO_H
-errno.h: errno.in.h $(top_builddir)/config.status
+lib/errno.h: lib/errno.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' \
@@ -209,43 +282,43 @@ errno.h: errno.in.h $(top_builddir)/config.status
-e 's|@''ENOLINK_VALUE''@|$(ENOLINK_VALUE)|g' \
-e 's|@''EOVERFLOW_HIDDEN''@|$(EOVERFLOW_HIDDEN)|g' \
-e 's|@''EOVERFLOW_VALUE''@|$(EOVERFLOW_VALUE)|g' \
- < $(srcdir)/errno.in.h; \
+ < $(top_srcdir)/lib/errno.in.h; \
} > $@-t && \
mv $@-t $@
else
-errno.h: $(top_builddir)/config.status
+lib/errno.h: $(top_builddir)/config.status
rm -f $@
endif
-MOSTLYCLEANFILES += errno.h errno.h-t
+MOSTLYCLEANFILES += lib/errno.h lib/errno.h-t
-EXTRA_DIST += errno.in.h
+EXTRA_DIST += lib/errno.in.h
## end gnulib module errno
## begin gnulib module error
-EXTRA_DIST += error.c error.h
+EXTRA_DIST += lib/error.c lib/error.h
-EXTRA_libsed_a_SOURCES += error.c
+EXTRA_lib_libsed_a_SOURCES += lib/error.c
## end gnulib module error
## begin gnulib module exitfail
-libsed_a_SOURCES += exitfail.c
+lib_libsed_a_SOURCES += lib/exitfail.c
-EXTRA_DIST += exitfail.h
+EXTRA_DIST += lib/exitfail.h
## end gnulib module exitfail
## begin gnulib module fcntl-h
-BUILT_SOURCES += fcntl.h
+BUILT_SOURCES += lib/fcntl.h
# We need the following in order to create <fcntl.h> when the system
# doesn't have one that works with the given compiler.
-fcntl.h: fcntl.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H)
+lib/fcntl.h: lib/fcntl.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' \
@@ -265,39 +338,55 @@ fcntl.h: fcntl.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H)
-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)/fcntl.in.h; \
+ < $(top_srcdir)/lib/fcntl.in.h; \
} > $@-t && \
mv $@-t $@
-MOSTLYCLEANFILES += fcntl.h fcntl.h-t
+MOSTLYCLEANFILES += lib/fcntl.h lib/fcntl.h-t
-EXTRA_DIST += fcntl.in.h
+EXTRA_DIST += lib/fcntl.in.h
## end gnulib module fcntl-h
+## begin gnulib module fpending
+
+
+EXTRA_DIST += lib/fpending.c lib/fpending.h lib/stdio-impl.h
+
+EXTRA_lib_libsed_a_SOURCES += lib/fpending.c
+
+## end gnulib module fpending
+
## begin gnulib module fstat
-EXTRA_DIST += fstat.c
+EXTRA_DIST += lib/fstat.c
-EXTRA_libsed_a_SOURCES += fstat.c
+EXTRA_lib_libsed_a_SOURCES += lib/fstat.c
## end gnulib module fstat
## begin gnulib module fwriting
-EXTRA_DIST += fwriting.c fwriting.h stdio-impl.h
+EXTRA_DIST += lib/fwriting.c lib/fwriting.h lib/stdio-impl.h
-EXTRA_libsed_a_SOURCES += fwriting.c
+EXTRA_lib_libsed_a_SOURCES += lib/fwriting.c
## end gnulib module fwriting
+## begin gnulib module gendocs
+
+
+EXTRA_DIST += $(top_srcdir)/build-aux/gendocs.sh
+
+## end gnulib module gendocs
+
## begin gnulib module getdelim
-EXTRA_DIST += getdelim.c
+EXTRA_DIST += lib/getdelim.c
-EXTRA_libsed_a_SOURCES += getdelim.c
+EXTRA_lib_libsed_a_SOURCES += lib/getdelim.c
## end gnulib module getdelim
@@ -307,7 +396,7 @@ BUILT_SOURCES += $(GETOPT_H)
# We need the following in order to create <getopt.h> when the system
# doesn't have one that works with the given compiler.
-getopt.h: getopt.in.h $(top_builddir)/config.status $(ARG_NONNULL_H)
+lib/getopt.h: lib/getopt.in.h $(top_builddir)/config.status $(ARG_NONNULL_H)
$(AM_V_GEN)rm -f $@-t $@ && \
{ echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
sed -e 's|@''GUARD_PREFIX''@|GL|g' \
@@ -317,46 +406,121 @@ getopt.h: getopt.in.h $(top_builddir)/config.status $(ARG_NONNULL_H)
-e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \
-e 's|@''NEXT_GETOPT_H''@|$(NEXT_GETOPT_H)|g' \
-e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \
- < $(srcdir)/getopt.in.h; \
+ < $(top_srcdir)/lib/getopt.in.h; \
} > $@-t && \
mv -f $@-t $@
-MOSTLYCLEANFILES += getopt.h getopt.h-t
+MOSTLYCLEANFILES += lib/getopt.h lib/getopt.h-t
-EXTRA_DIST += getopt.c getopt.in.h getopt1.c getopt_int.h
+EXTRA_DIST += lib/getopt.c lib/getopt.in.h lib/getopt1.c lib/getopt_int.h
-EXTRA_libsed_a_SOURCES += getopt.c getopt1.c
+EXTRA_lib_libsed_a_SOURCES += lib/getopt.c lib/getopt1.c
## end gnulib module getopt-posix
+## begin gnulib module getprogname
+
+lib_libsed_a_SOURCES += lib/getprogname.h lib/getprogname.c
+
+## end gnulib module getprogname
+
## begin gnulib module gettext-h
-libsed_a_SOURCES += gettext.h
+lib_libsed_a_SOURCES += lib/gettext.h
## end gnulib module gettext-h
## begin gnulib module gettimeofday
-EXTRA_DIST += gettimeofday.c
+EXTRA_DIST += lib/gettimeofday.c
-EXTRA_libsed_a_SOURCES += gettimeofday.c
+EXTRA_lib_libsed_a_SOURCES += lib/gettimeofday.c
## end gnulib module gettimeofday
+## begin gnulib module git-version-gen
+
+
+EXTRA_DIST += $(top_srcdir)/build-aux/git-version-gen
+
+## end gnulib module git-version-gen
+
+## begin gnulib module gitlog-to-changelog
+
+
+EXTRA_DIST += $(top_srcdir)/build-aux/gitlog-to-changelog
+
+## end gnulib module gitlog-to-changelog
+
+## begin gnulib module gnu-web-doc-update
+
+
+EXTRA_DIST += $(top_srcdir)/build-aux/gnu-web-doc-update
+
+## end gnulib module gnu-web-doc-update
+
+## begin gnulib module 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
+
+
+EXTRA_DIST += $(top_srcdir)/build-aux/gnupload
+
+## end gnulib module gnupload
+
+## begin gnulib module hard-locale
+
+lib_libsed_a_SOURCES += lib/hard-locale.c
+
+EXTRA_DIST += lib/hard-locale.h
+
+## end gnulib module hard-locale
+
+## begin gnulib module havelib
+
+
+EXTRA_DIST += $(top_srcdir)/build-aux/config.rpath
+
+## end gnulib module havelib
+
+## begin gnulib module ignore-value
+
+
+EXTRA_DIST += lib/ignore-value.h
+
+## end gnulib module ignore-value
+
## begin gnulib module intprops
-EXTRA_DIST += intprops.h
+EXTRA_DIST += lib/intprops.h
## end gnulib module intprops
+## begin gnulib module isblank
+
+
+EXTRA_DIST += lib/isblank.c
+
+EXTRA_lib_libsed_a_SOURCES += lib/isblank.c
+
+## end gnulib module isblank
+
## begin gnulib module langinfo
-BUILT_SOURCES += langinfo.h
+BUILT_SOURCES += lib/langinfo.h
# We need the following in order to create an empty placeholder for
# <langinfo.h> when the system doesn't have one.
-langinfo.h: langinfo.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(WARN_ON_USE_H)
+lib/langinfo.h: lib/langinfo.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(WARN_ON_USE_H)
$(AM_V_GEN)rm -f $@-t $@ && \
{ echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
sed -e 's|@''GUARD_PREFIX''@|GL|g' \
@@ -374,18 +538,46 @@ langinfo.h: langinfo.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(WARN_ON_U
-e 's|@''REPLACE_NL_LANGINFO''@|$(REPLACE_NL_LANGINFO)|g' \
-e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \
-e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \
- < $(srcdir)/langinfo.in.h; \
+ < $(top_srcdir)/lib/langinfo.in.h; \
} > $@-t && \
mv $@-t $@
-MOSTLYCLEANFILES += langinfo.h langinfo.h-t
+MOSTLYCLEANFILES += lib/langinfo.h lib/langinfo.h-t
-EXTRA_DIST += langinfo.in.h
+EXTRA_DIST += lib/langinfo.in.h
## end gnulib module langinfo
+## begin gnulib module limits-h
+
+BUILT_SOURCES += $(LIMITS_H)
+
+# We need the following in order to create <limits.h> when the system
+# doesn't have one that is compatible with GNU.
+if GL_GENERATE_LIMITS_H
+lib/limits.h: lib/limits.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' \
+ -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_LIMITS_H''@|$(NEXT_LIMITS_H)|g' \
+ < $(top_srcdir)/lib/limits.in.h; \
+ } > $@-t && \
+ mv $@-t $@
+else
+lib/limits.h: $(top_builddir)/config.status
+ rm -f $@
+endif
+MOSTLYCLEANFILES += lib/limits.h lib/limits.h-t
+
+EXTRA_DIST += lib/limits.in.h
+
+## end gnulib module limits-h
+
## begin gnulib module localcharset
-libsed_a_SOURCES += localcharset.h localcharset.c
+lib_libsed_a_SOURCES += lib/localcharset.h lib/localcharset.c
# We need the following in order to install a simple file in $(libdir)
# which is shared with other installed packages. We use a list of referencing
@@ -394,7 +586,7 @@ libsed_a_SOURCES += localcharset.h localcharset.c
# On systems with glibc-2.1 or newer, the file is redundant, therefore we
# avoid installing it.
-all-local: charset.alias ref-add.sed ref-del.sed
+all-local: lib/charset.alias lib/ref-add.sed lib/ref-del.sed
charset_alias = $(DESTDIR)$(libdir)/charset.alias
charset_tmp = $(DESTDIR)$(libdir)/charset.tmp
@@ -416,12 +608,12 @@ install-exec-localcharset: all-local
$(mkinstalldirs) $(DESTDIR)$(libdir) ; \
fi ; \
if test -f $(charset_alias); then \
- sed -f ref-add.sed $(charset_alias) > $(charset_tmp) ; \
+ sed -f lib/ref-add.sed $(charset_alias) > $(charset_tmp) ; \
$(INSTALL_DATA) $(charset_tmp) $(charset_alias) ; \
rm -f $(charset_tmp) ; \
else \
if $$need_charset_alias; then \
- sed -f ref-add.sed charset.alias > $(charset_tmp) ; \
+ sed -f lib/ref-add.sed lib/charset.alias > $(charset_tmp) ; \
$(INSTALL_DATA) $(charset_tmp) $(charset_alias) ; \
rm -f $(charset_tmp) ; \
fi ; \
@@ -430,7 +622,7 @@ install-exec-localcharset: all-local
uninstall-local: uninstall-localcharset
uninstall-localcharset: all-local
if test -f $(charset_alias); then \
- sed -f ref-del.sed $(charset_alias) > $(charset_tmp); \
+ sed -f lib/ref-del.sed $(charset_alias) > $(charset_tmp); \
if grep '^# Packages using this file: $$' $(charset_tmp) \
> /dev/null; then \
rm -f $(charset_alias); \
@@ -440,30 +632,30 @@ uninstall-localcharset: all-local
rm -f $(charset_tmp); \
fi
-charset.alias: config.charset
- $(AM_V_GEN)rm -f t-$@ $@ && \
- $(SHELL) $(srcdir)/config.charset '$(host)' > t-$@ && \
- mv t-$@ $@
+lib/charset.alias: lib/config.charset
+ $(AM_V_GEN)rm -f $@-t $@ && \
+ $(SHELL) $(top_srcdir)/lib/config.charset '$(host)' > $@-t && \
+ mv $@-t $@
-SUFFIXES += .sed .sin
+# SUFFIXES += .sed .sin
.sin.sed:
- $(AM_V_GEN)rm -f t-$@ $@ && \
- sed -e '/^#/d' -e 's/@''PACKAGE''@/$(PACKAGE)/g' $< > t-$@ && \
- mv t-$@ $@
+ $(AM_V_GEN)rm -f $@-t $@ && \
+ sed -e '/^#/d' -e 's/@''PACKAGE''@/$(PACKAGE)/g' $< > $@-t && \
+ mv $@-t $@
-CLEANFILES += charset.alias ref-add.sed ref-del.sed
+CLEANFILES += lib/charset.alias lib/ref-add.sed lib/ref-del.sed
-EXTRA_DIST += config.charset ref-add.sin ref-del.sin
+EXTRA_DIST += lib/config.charset lib/ref-add.sin lib/ref-del.sin
## end gnulib module localcharset
## begin gnulib module locale
-BUILT_SOURCES += locale.h
+BUILT_SOURCES += lib/locale.h
# We need the following in order to create <locale.h> when the system
# doesn't have one that provides all definitions.
-locale.h: locale.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H)
+lib/locale.h: lib/locale.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' \
@@ -483,230 +675,280 @@ locale.h: locale.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H
-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)/locale.in.h; \
+ < $(top_srcdir)/lib/locale.in.h; \
} > $@-t && \
mv $@-t $@
-MOSTLYCLEANFILES += locale.h locale.h-t
+MOSTLYCLEANFILES += lib/locale.h lib/locale.h-t
-EXTRA_DIST += locale.in.h
+EXTRA_DIST += lib/locale.in.h
## end gnulib module locale
## begin gnulib module localeconv
-EXTRA_DIST += localeconv.c
+EXTRA_DIST += lib/localeconv.c
-EXTRA_libsed_a_SOURCES += localeconv.c
+EXTRA_lib_libsed_a_SOURCES += lib/localeconv.c
## end gnulib module localeconv
-## begin gnulib module lstat
+## begin gnulib module lock
+lib_libsed_a_SOURCES += lib/glthread/lock.h lib/glthread/lock.c
-EXTRA_DIST += lstat.c
+## end gnulib module lock
-EXTRA_libsed_a_SOURCES += lstat.c
+## begin gnulib module lstat
-## end gnulib module lstat
-## begin gnulib module malloc-gnu
+EXTRA_DIST += lib/lstat.c
+
+EXTRA_lib_libsed_a_SOURCES += lib/lstat.c
+## end gnulib module lstat
-EXTRA_DIST += malloc.c
+## begin gnulib module maintainer-makefile
-EXTRA_libsed_a_SOURCES += malloc.c
+EXTRA_DIST += $(top_srcdir)/maint.mk
-## end gnulib module malloc-gnu
+## end gnulib module maintainer-makefile
## begin gnulib module malloc-posix
-EXTRA_DIST += malloc.c
+EXTRA_DIST += lib/malloc.c
-EXTRA_libsed_a_SOURCES += malloc.c
+EXTRA_lib_libsed_a_SOURCES += lib/malloc.c
## end gnulib module malloc-posix
## begin gnulib module malloca
-libsed_a_SOURCES += malloca.c
+lib_libsed_a_SOURCES += lib/malloca.c
-EXTRA_DIST += malloca.h malloca.valgrind
+EXTRA_DIST += lib/malloca.h lib/malloca.valgrind
## end gnulib module malloca
## begin gnulib module mbrlen
-EXTRA_DIST += mbrlen.c
+EXTRA_DIST += lib/mbrlen.c
-EXTRA_libsed_a_SOURCES += mbrlen.c
+EXTRA_lib_libsed_a_SOURCES += lib/mbrlen.c
## end gnulib module mbrlen
## begin gnulib module mbrtowc
-EXTRA_DIST += mbrtowc.c
+EXTRA_DIST += lib/mbrtowc.c
-EXTRA_libsed_a_SOURCES += mbrtowc.c
+EXTRA_lib_libsed_a_SOURCES += lib/mbrtowc.c
## end gnulib module mbrtowc
## begin gnulib module mbsinit
-EXTRA_DIST += mbsinit.c
+EXTRA_DIST += lib/mbsinit.c
-EXTRA_libsed_a_SOURCES += mbsinit.c
+EXTRA_lib_libsed_a_SOURCES += lib/mbsinit.c
## end gnulib module mbsinit
## begin gnulib module mbtowc
-EXTRA_DIST += mbtowc-impl.h mbtowc.c
+EXTRA_DIST += lib/mbtowc-impl.h lib/mbtowc.c
-EXTRA_libsed_a_SOURCES += mbtowc.c
+EXTRA_lib_libsed_a_SOURCES += lib/mbtowc.c
## end gnulib module mbtowc
## begin gnulib module memchr
-EXTRA_DIST += memchr.c memchr.valgrind
+EXTRA_DIST += lib/memchr.c lib/memchr.valgrind
-EXTRA_libsed_a_SOURCES += memchr.c
+EXTRA_lib_libsed_a_SOURCES += lib/memchr.c
## end gnulib module memchr
+## begin gnulib module memrchr
+
+
+EXTRA_DIST += lib/memrchr.c
+
+EXTRA_lib_libsed_a_SOURCES += lib/memrchr.c
+
+## end gnulib module memrchr
+
+## begin gnulib module minmax
+
+lib_libsed_a_SOURCES += lib/minmax.h
+
+## end gnulib module minmax
+
## begin gnulib module mkostemp
-EXTRA_DIST += mkostemp.c
+EXTRA_DIST += lib/mkostemp.c
-EXTRA_libsed_a_SOURCES += mkostemp.c
+EXTRA_lib_libsed_a_SOURCES += lib/mkostemp.c
## end gnulib module mkostemp
## begin gnulib module msvc-inval
-EXTRA_DIST += msvc-inval.c msvc-inval.h
+EXTRA_DIST += lib/msvc-inval.c lib/msvc-inval.h
-EXTRA_libsed_a_SOURCES += msvc-inval.c
+EXTRA_lib_libsed_a_SOURCES += lib/msvc-inval.c
## end gnulib module msvc-inval
## begin gnulib module msvc-nothrow
-EXTRA_DIST += msvc-nothrow.c msvc-nothrow.h
+EXTRA_DIST += lib/msvc-nothrow.c lib/msvc-nothrow.h
-EXTRA_libsed_a_SOURCES += msvc-nothrow.c
+EXTRA_lib_libsed_a_SOURCES += lib/msvc-nothrow.c
## end gnulib module msvc-nothrow
## begin gnulib module nl_langinfo
-EXTRA_DIST += nl_langinfo.c
+EXTRA_DIST += lib/nl_langinfo.c
-EXTRA_libsed_a_SOURCES += nl_langinfo.c
+EXTRA_lib_libsed_a_SOURCES += lib/nl_langinfo.c
## end gnulib module nl_langinfo
+## begin gnulib module non-recursive-gnulib-prefix-hack
+
+
+EXTRA_DIST += $(top_srcdir)/build-aux/prefix-gnulib-mk
+
+## end gnulib module non-recursive-gnulib-prefix-hack
+
## begin gnulib module obstack
-EXTRA_DIST += obstack.c obstack.h
+EXTRA_DIST += lib/obstack.c lib/obstack.h
-EXTRA_libsed_a_SOURCES += obstack.c
+EXTRA_lib_libsed_a_SOURCES += lib/obstack.c
## end gnulib module obstack
## begin gnulib module pathmax
-EXTRA_DIST += pathmax.h
+EXTRA_DIST += lib/pathmax.h
## end gnulib module pathmax
+## begin gnulib module progname
+
+lib_libsed_a_SOURCES += lib/progname.h lib/progname.c
+
+## end gnulib module progname
+
+## begin gnulib module qcopy-acl
+
+lib_libsed_a_SOURCES += lib/qcopy-acl.c
+
+## end gnulib module qcopy-acl
+
+## begin gnulib module qset-acl
+
+lib_libsed_a_SOURCES += lib/qset-acl.c
+
+## end gnulib module qset-acl
+
## begin gnulib module quote
-EXTRA_DIST += quote.h
+EXTRA_DIST += lib/quote.h
## end gnulib module quote
## begin gnulib module quotearg
-libsed_a_SOURCES += quotearg.c
+lib_libsed_a_SOURCES += lib/quotearg.c
-EXTRA_DIST += quote.h quotearg.h
+EXTRA_DIST += lib/quote.h lib/quotearg.h
## end gnulib module quotearg
## begin gnulib module readlink
-EXTRA_DIST += readlink.c
+EXTRA_DIST += lib/readlink.c
-EXTRA_libsed_a_SOURCES += readlink.c
+EXTRA_lib_libsed_a_SOURCES += lib/readlink.c
## end gnulib module readlink
-## begin gnulib module realloc-posix
-
+## begin gnulib module readme-release
-EXTRA_DIST += realloc.c
-EXTRA_libsed_a_SOURCES += realloc.c
+EXTRA_DIST += $(top_srcdir)/README-release
-## end gnulib module realloc-posix
+## end gnulib module readme-release
## begin gnulib module regex
-EXTRA_DIST += regcomp.c regex.c regex.h regex_internal.c regex_internal.h regexec.c
+EXTRA_DIST += lib/regcomp.c lib/regex.c lib/regex.h lib/regex_internal.c lib/regex_internal.h lib/regexec.c
-EXTRA_libsed_a_SOURCES += regcomp.c regex.c regex_internal.c regexec.c
+EXTRA_lib_libsed_a_SOURCES += lib/regcomp.c lib/regex.c lib/regex_internal.c lib/regexec.c
## end gnulib module regex
## begin gnulib module rename
-EXTRA_DIST += rename.c
+EXTRA_DIST += lib/rename.c
-EXTRA_libsed_a_SOURCES += rename.c
+EXTRA_lib_libsed_a_SOURCES += lib/rename.c
## end gnulib module rename
## begin gnulib module rmdir
-EXTRA_DIST += rmdir.c
+EXTRA_DIST += lib/rmdir.c
-EXTRA_libsed_a_SOURCES += rmdir.c
+EXTRA_lib_libsed_a_SOURCES += lib/rmdir.c
## end gnulib module rmdir
## begin gnulib module same-inode
-EXTRA_DIST += same-inode.h
+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
-libsed_a_SOURCES += se-context.in.h se-selinux.in.h se-context.c se-selinux.c
+lib_libsed_a_SOURCES += lib/se-context.in.h lib/se-selinux.in.h lib/se-context.c lib/se-selinux.c
-BUILT_SOURCES += selinux/selinux.h
-selinux/selinux.h: se-selinux.in.h $(top_builddir)/config.status $(UNUSED_PARAMETER_H)
- $(AM_V_at)$(MKDIR_P) selinux
+BUILT_SOURCES += lib/selinux/selinux.h
+lib/selinux/selinux.h: lib/se-selinux.in.h $(top_builddir)/config.status $(UNUSED_PARAMETER_H)
+ $(AM_V_at)$(MKDIR_P) lib/selinux
$(AM_V_GEN)rm -f $@-t $@ && \
{ echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \
sed -e 's|@''GUARD_PREFIX''@|GL|g' \
@@ -715,33 +957,33 @@ selinux/selinux.h: se-selinux.in.h $(top_builddir)/config.status $(UNUSED_PARAME
-e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \
-e 's|@''NEXT_SELINUX_SELINUX_H''@|$(NEXT_SELINUX_SELINUX_H)|g' \
-e '/definition of _GL_UNUSED_PARAMETER/r $(UNUSED_PARAMETER_H)' \
- < $(srcdir)/se-selinux.in.h; \
+ < $(top_srcdir)/lib/se-selinux.in.h; \
} > $@-t && \
chmod a-x $@-t && \
mv $@-t $@
-MOSTLYCLEANFILES += selinux/selinux.h selinux/selinux.h-t
+MOSTLYCLEANFILES += lib/selinux/selinux.h lib/selinux/selinux.h-t
BUILT_SOURCES += $(SELINUX_CONTEXT_H)
if GL_GENERATE_SELINUX_CONTEXT_H
-selinux/context.h: se-context.in.h $(top_builddir)/config.status $(UNUSED_PARAMETER_H)
- $(AM_V_at)$(MKDIR_P) selinux
+lib/selinux/context.h: lib/se-context.in.h $(top_builddir)/config.status $(UNUSED_PARAMETER_H)
+ $(AM_V_at)$(MKDIR_P) lib/selinux
$(AM_V_GEN)rm -f $@-t $@ && \
{ echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \
sed -e '/definition of _GL_UNUSED_PARAMETER/r $(UNUSED_PARAMETER_H)' \
- < $(srcdir)/se-context.in.h; \
+ < $(top_srcdir)/lib/se-context.in.h; \
} > $@-t && \
chmod a-x $@-t && \
mv $@-t $@
else
-selinux/context.h: $(top_builddir)/config.status
+lib/selinux/context.h: $(top_builddir)/config.status
rm -f $@
endif
-MOSTLYCLEANFILES += selinux/context.h selinux/context.h-t
-MOSTLYCLEANDIRS += selinux
+MOSTLYCLEANFILES += lib/selinux/context.h lib/selinux/context.h-t
+MOSTLYCLEANDIRS += lib/selinux
-EXTRA_DIST += getfilecon.c
+EXTRA_DIST += lib/getfilecon.c
-EXTRA_libsed_a_SOURCES += getfilecon.c
+EXTRA_lib_libsed_a_SOURCES += lib/getfilecon.c
## end gnulib module selinux-h
@@ -764,19 +1006,19 @@ EXTRA_DIST += $(top_srcdir)/build-aux/snippet/_Noreturn.h
# present in all Makefile.am that need it. This is ensured by the applicability
# 'all' defined above.
-BUILT_SOURCES += arg-nonnull.h
+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.
-arg-nonnull.h: $(top_srcdir)/build-aux/snippet/arg-nonnull.h
+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 += arg-nonnull.h arg-nonnull.h-t
+MOSTLYCLEANFILES += lib/arg-nonnull.h lib/arg-nonnull.h-t
-ARG_NONNULL_H=arg-nonnull.h
+ARG_NONNULL_H=lib/arg-nonnull.h
EXTRA_DIST += $(top_srcdir)/build-aux/snippet/arg-nonnull.h
@@ -789,18 +1031,18 @@ EXTRA_DIST += $(top_srcdir)/build-aux/snippet/arg-nonnull.h
# present in all Makefile.am that need it. This is ensured by the applicability
# 'all' defined above.
-BUILT_SOURCES += c++defs.h
+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.
-c++defs.h: $(top_srcdir)/build-aux/snippet/c++defs.h
+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 += c++defs.h c++defs.h-t
+MOSTLYCLEANFILES += lib/c++defs.h lib/c++defs.h-t
-CXXDEFS_H=c++defs.h
+CXXDEFS_H=lib/c++defs.h
EXTRA_DIST += $(top_srcdir)/build-aux/snippet/c++defs.h
@@ -813,19 +1055,19 @@ EXTRA_DIST += $(top_srcdir)/build-aux/snippet/c++defs.h
# present in all Makefile.am that need it. This is ensured by the applicability
# 'all' defined above.
-BUILT_SOURCES += unused-parameter.h
+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.
-unused-parameter.h: $(top_srcdir)/build-aux/snippet/unused-parameter.h
+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 += unused-parameter.h unused-parameter.h-t
+MOSTLYCLEANFILES += lib/unused-parameter.h lib/unused-parameter.h-t
-UNUSED_PARAMETER_H=unused-parameter.h
+UNUSED_PARAMETER_H=lib/unused-parameter.h
EXTRA_DIST += $(top_srcdir)/build-aux/snippet/unused-parameter.h
@@ -833,19 +1075,19 @@ EXTRA_DIST += $(top_srcdir)/build-aux/snippet/unused-parameter.h
## begin gnulib module snippet/warn-on-use
-BUILT_SOURCES += warn-on-use.h
+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.
-warn-on-use.h: $(top_srcdir)/build-aux/snippet/warn-on-use.h
+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 += warn-on-use.h warn-on-use.h-t
+MOSTLYCLEANFILES += lib/warn-on-use.h lib/warn-on-use.h-t
-WARN_ON_USE_H=warn-on-use.h
+WARN_ON_USE_H=lib/warn-on-use.h
EXTRA_DIST += $(top_srcdir)/build-aux/snippet/warn-on-use.h
@@ -854,19 +1096,42 @@ EXTRA_DIST += $(top_srcdir)/build-aux/snippet/warn-on-use.h
## begin gnulib module stat
-EXTRA_DIST += stat.c
+EXTRA_DIST += lib/stat.c
-EXTRA_libsed_a_SOURCES += stat.c
+EXTRA_lib_libsed_a_SOURCES += lib/stat.c
## end gnulib module stat
## begin gnulib module stat-macros
-EXTRA_DIST += stat-macros.h
+EXTRA_DIST += lib/stat-macros.h
## end gnulib module stat-macros
+## begin gnulib module stdalign
+
+BUILT_SOURCES += $(STDALIGN_H)
+
+# We need the following in order to create <stdalign.h> when the system
+# doesn't have one that works.
+if GL_GENERATE_STDALIGN_H
+lib/stdalign.h: lib/stdalign.in.h $(top_builddir)/config.status
+ $(AM_V_GEN)rm -f $@-t $@ && \
+ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
+ cat $(top_srcdir)/lib/stdalign.in.h; \
+ } > $@-t && \
+ mv $@-t $@
+else
+lib/stdalign.h: $(top_builddir)/config.status
+ rm -f $@
+endif
+MOSTLYCLEANFILES += lib/stdalign.h lib/stdalign.h-t
+
+EXTRA_DIST += lib/stdalign.in.h
+
+## end gnulib module stdalign
+
## begin gnulib module stdarg
BUILT_SOURCES += $(STDARG_H)
@@ -874,7 +1139,7 @@ BUILT_SOURCES += $(STDARG_H)
# We need the following in order to create <stdarg.h> when the system
# doesn't have one that works with the given compiler.
if GL_GENERATE_STDARG_H
-stdarg.h: stdarg.in.h $(top_builddir)/config.status
+lib/stdarg.h: lib/stdarg.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' \
@@ -882,16 +1147,16 @@ stdarg.h: stdarg.in.h $(top_builddir)/config.status
-e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
-e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \
-e 's|@''NEXT_STDARG_H''@|$(NEXT_STDARG_H)|g' \
- < $(srcdir)/stdarg.in.h; \
+ < $(top_srcdir)/lib/stdarg.in.h; \
} > $@-t && \
mv $@-t $@
else
-stdarg.h: $(top_builddir)/config.status
+lib/stdarg.h: $(top_builddir)/config.status
rm -f $@
endif
-MOSTLYCLEANFILES += stdarg.h stdarg.h-t
+MOSTLYCLEANFILES += lib/stdarg.h lib/stdarg.h-t
-EXTRA_DIST += stdarg.in.h
+EXTRA_DIST += lib/stdarg.in.h
## end gnulib module stdarg
@@ -902,19 +1167,19 @@ BUILT_SOURCES += $(STDBOOL_H)
# We need the following in order to create <stdbool.h> when the system
# doesn't have one that works.
if GL_GENERATE_STDBOOL_H
-stdbool.h: stdbool.in.h $(top_builddir)/config.status
+lib/stdbool.h: lib/stdbool.in.h $(top_builddir)/config.status
$(AM_V_GEN)rm -f $@-t $@ && \
{ echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
- sed -e 's/@''HAVE__BOOL''@/$(HAVE__BOOL)/g' < $(srcdir)/stdbool.in.h; \
+ sed -e 's/@''HAVE__BOOL''@/$(HAVE__BOOL)/g' < $(top_srcdir)/lib/stdbool.in.h; \
} > $@-t && \
mv $@-t $@
else
-stdbool.h: $(top_builddir)/config.status
+lib/stdbool.h: $(top_builddir)/config.status
rm -f $@
endif
-MOSTLYCLEANFILES += stdbool.h stdbool.h-t
+MOSTLYCLEANFILES += lib/stdbool.h lib/stdbool.h-t
-EXTRA_DIST += stdbool.in.h
+EXTRA_DIST += lib/stdbool.in.h
## end gnulib module stdbool
@@ -925,7 +1190,7 @@ BUILT_SOURCES += $(STDDEF_H)
# We need the following in order to create <stddef.h> when the system
# doesn't have one that works with the given compiler.
if GL_GENERATE_STDDEF_H
-stddef.h: stddef.in.h $(top_builddir)/config.status
+lib/stddef.h: lib/stddef.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' \
@@ -933,18 +1198,19 @@ stddef.h: stddef.in.h $(top_builddir)/config.status
-e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
-e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \
-e 's|@''NEXT_STDDEF_H''@|$(NEXT_STDDEF_H)|g' \
+ -e 's|@''HAVE_MAX_ALIGN_T''@|$(HAVE_MAX_ALIGN_T)|g' \
-e 's|@''HAVE_WCHAR_T''@|$(HAVE_WCHAR_T)|g' \
-e 's|@''REPLACE_NULL''@|$(REPLACE_NULL)|g' \
- < $(srcdir)/stddef.in.h; \
+ < $(top_srcdir)/lib/stddef.in.h; \
} > $@-t && \
mv $@-t $@
else
-stddef.h: $(top_builddir)/config.status
+lib/stddef.h: $(top_builddir)/config.status
rm -f $@
endif
-MOSTLYCLEANFILES += stddef.h stddef.h-t
+MOSTLYCLEANFILES += lib/stddef.h lib/stddef.h-t
-EXTRA_DIST += stddef.in.h
+EXTRA_DIST += lib/stddef.in.h
## end gnulib module stddef
@@ -955,7 +1221,7 @@ BUILT_SOURCES += $(STDINT_H)
# We need the following in order to create <stdint.h> when the system
# doesn't have one that works with the given compiler.
if GL_GENERATE_STDINT_H
-stdint.h: stdint.in.h $(top_builddir)/config.status
+lib/stdint.h: lib/stdint.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' \
@@ -964,6 +1230,7 @@ stdint.h: stdint.in.h $(top_builddir)/config.status
-e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
-e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \
-e 's|@''NEXT_STDINT_H''@|$(NEXT_STDINT_H)|g' \
+ -e 's/@''HAVE_C99_STDINT_H''@/$(HAVE_C99_STDINT_H)/g' \
-e 's/@''HAVE_SYS_TYPES_H''@/$(HAVE_SYS_TYPES_H)/g' \
-e 's/@''HAVE_INTTYPES_H''@/$(HAVE_INTTYPES_H)/g' \
-e 's/@''HAVE_SYS_INTTYPES_H''@/$(HAVE_SYS_INTTYPES_H)/g' \
@@ -985,27 +1252,27 @@ stdint.h: stdint.in.h $(top_builddir)/config.status
-e 's/@''BITSIZEOF_WINT_T''@/$(BITSIZEOF_WINT_T)/g' \
-e 's/@''HAVE_SIGNED_WINT_T''@/$(HAVE_SIGNED_WINT_T)/g' \
-e 's/@''WINT_T_SUFFIX''@/$(WINT_T_SUFFIX)/g' \
- < $(srcdir)/stdint.in.h; \
+ -e 's/@''GNULIB_OVERRIDES_WINT_T''@/$(GNULIB_OVERRIDES_WINT_T)/g' \
+ < $(top_srcdir)/lib/stdint.in.h; \
} > $@-t && \
mv $@-t $@
else
-stdint.h: $(top_builddir)/config.status
+lib/stdint.h: $(top_builddir)/config.status
rm -f $@
endif
-MOSTLYCLEANFILES += stdint.h stdint.h-t
+MOSTLYCLEANFILES += lib/stdint.h lib/stdint.h-t
-EXTRA_DIST += stdint.in.h
+EXTRA_DIST += lib/stdint.in.h
## end gnulib module stdint
## begin gnulib module stdio
-BUILT_SOURCES += stdio.h
-libsed_a_SOURCES += stdio.c
+BUILT_SOURCES += lib/stdio.h
# We need the following in order to create <stdio.h> when the system
# doesn't have one that works with the given compiler.
-stdio.h: stdio.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H)
+lib/stdio.h: lib/stdio.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' \
@@ -1066,7 +1333,7 @@ stdio.h: stdio.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H)
-e 's/@''GNULIB_VPRINTF_POSIX''@/$(GNULIB_VPRINTF_POSIX)/g' \
-e 's/@''GNULIB_VSNPRINTF''@/$(GNULIB_VSNPRINTF)/g' \
-e 's/@''GNULIB_VSPRINTF_POSIX''@/$(GNULIB_VSPRINTF_POSIX)/g' \
- < $(srcdir)/stdio.in.h | \
+ < $(top_srcdir)/lib/stdio.in.h | \
sed -e 's|@''HAVE_DECL_FPURGE''@|$(HAVE_DECL_FPURGE)|g' \
-e 's|@''HAVE_DECL_FSEEKO''@|$(HAVE_DECL_FSEEKO)|g' \
-e 's|@''HAVE_DECL_FTELLO''@|$(HAVE_DECL_FTELLO)|g' \
@@ -1121,19 +1388,19 @@ stdio.h: stdio.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H)
-e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)'; \
} > $@-t && \
mv $@-t $@
-MOSTLYCLEANFILES += stdio.h stdio.h-t
+MOSTLYCLEANFILES += lib/stdio.h lib/stdio.h-t
-EXTRA_DIST += stdio.in.h
+EXTRA_DIST += lib/stdio.in.h
## end gnulib module stdio
## begin gnulib module stdlib
-BUILT_SOURCES += stdlib.h
+BUILT_SOURCES += lib/stdlib.h
# We need the following in order to create <stdlib.h> when the system
# doesn't have one that works with the given compiler.
-stdlib.h: stdlib.in.h $(top_builddir)/config.status $(CXXDEFS_H) \
+lib/stdlib.h: lib/stdlib.in.h $(top_builddir)/config.status $(CXXDEFS_H) \
$(_NORETURN_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H)
$(AM_V_GEN)rm -f $@-t $@ && \
{ echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \
@@ -1160,11 +1427,13 @@ stdlib.h: stdlib.in.h $(top_builddir)/config.status $(CXXDEFS_H) \
-e 's/@''GNULIB_PTSNAME''@/$(GNULIB_PTSNAME)/g' \
-e 's/@''GNULIB_PTSNAME_R''@/$(GNULIB_PTSNAME_R)/g' \
-e 's/@''GNULIB_PUTENV''@/$(GNULIB_PUTENV)/g' \
+ -e 's/@''GNULIB_QSORT_R''@/$(GNULIB_QSORT_R)/g' \
-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_REALPATH''@/$(GNULIB_REALPATH)/g' \
-e 's/@''GNULIB_RPMATCH''@/$(GNULIB_RPMATCH)/g' \
+ -e 's/@''GNULIB_SECURE_GETENV''@/$(GNULIB_SECURE_GETENV)/g' \
-e 's/@''GNULIB_SETENV''@/$(GNULIB_SETENV)/g' \
-e 's/@''GNULIB_STRTOD''@/$(GNULIB_STRTOD)/g' \
-e 's/@''GNULIB_STRTOLL''@/$(GNULIB_STRTOLL)/g' \
@@ -1173,7 +1442,7 @@ stdlib.h: stdlib.in.h $(top_builddir)/config.status $(CXXDEFS_H) \
-e 's/@''GNULIB_UNLOCKPT''@/$(GNULIB_UNLOCKPT)/g' \
-e 's/@''GNULIB_UNSETENV''@/$(GNULIB_UNSETENV)/g' \
-e 's/@''GNULIB_WCTOMB''@/$(GNULIB_WCTOMB)/g' \
- < $(srcdir)/stdlib.in.h | \
+ < $(top_srcdir)/lib/stdlib.in.h | \
sed -e 's|@''HAVE__EXIT''@|$(HAVE__EXIT)|g' \
-e 's|@''HAVE_ATOLL''@|$(HAVE_ATOLL)|g' \
-e 's|@''HAVE_CANONICALIZE_FILE_NAME''@|$(HAVE_CANONICALIZE_FILE_NAME)|g' \
@@ -1188,11 +1457,13 @@ stdlib.h: stdlib.in.h $(top_builddir)/config.status $(CXXDEFS_H) \
-e 's|@''HAVE_POSIX_OPENPT''@|$(HAVE_POSIX_OPENPT)|g' \
-e 's|@''HAVE_PTSNAME''@|$(HAVE_PTSNAME)|g' \
-e 's|@''HAVE_PTSNAME_R''@|$(HAVE_PTSNAME_R)|g' \
+ -e 's|@''HAVE_QSORT_R''@|$(HAVE_QSORT_R)|g' \
-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_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_STRTOD''@|$(HAVE_STRTOD)|g' \
-e 's|@''HAVE_STRTOLL''@|$(HAVE_STRTOLL)|g' \
@@ -1209,6 +1480,7 @@ stdlib.h: stdlib.in.h $(top_builddir)/config.status $(CXXDEFS_H) \
-e 's|@''REPLACE_PTSNAME''@|$(REPLACE_PTSNAME)|g' \
-e 's|@''REPLACE_PTSNAME_R''@|$(REPLACE_PTSNAME_R)|g' \
-e 's|@''REPLACE_PUTENV''@|$(REPLACE_PUTENV)|g' \
+ -e 's|@''REPLACE_QSORT_R''@|$(REPLACE_QSORT_R)|g' \
-e 's|@''REPLACE_RANDOM_R''@|$(REPLACE_RANDOM_R)|g' \
-e 's|@''REPLACE_REALLOC''@|$(REPLACE_REALLOC)|g' \
-e 's|@''REPLACE_REALPATH''@|$(REPLACE_REALPATH)|g' \
@@ -1222,44 +1494,44 @@ stdlib.h: stdlib.in.h $(top_builddir)/config.status $(CXXDEFS_H) \
-e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)'; \
} > $@-t && \
mv $@-t $@
-MOSTLYCLEANFILES += stdlib.h stdlib.h-t
+MOSTLYCLEANFILES += lib/stdlib.h lib/stdlib.h-t
-EXTRA_DIST += stdlib.in.h
+EXTRA_DIST += lib/stdlib.in.h
## end gnulib module stdlib
## begin gnulib module streq
-EXTRA_DIST += streq.h
+EXTRA_DIST += lib/streq.h
## end gnulib module streq
## begin gnulib module strerror
-EXTRA_DIST += strerror.c
+EXTRA_DIST += lib/strerror.c
-EXTRA_libsed_a_SOURCES += strerror.c
+EXTRA_lib_libsed_a_SOURCES += lib/strerror.c
## end gnulib module strerror
## begin gnulib module strerror-override
-EXTRA_DIST += strerror-override.c strerror-override.h
+EXTRA_DIST += lib/strerror-override.c lib/strerror-override.h
-EXTRA_libsed_a_SOURCES += strerror-override.c
+EXTRA_lib_libsed_a_SOURCES += lib/strerror-override.c
## end gnulib module strerror-override
## begin gnulib module string
-BUILT_SOURCES += string.h
+BUILT_SOURCES += lib/string.h
# We need the following in order to create <string.h> when the system
# doesn't have one that works with the given compiler.
-string.h: string.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H)
+lib/string.h: lib/string.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' \
@@ -1304,7 +1576,7 @@ string.h: string.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H
-e 's/@''GNULIB_STRERROR_R''@/$(GNULIB_STRERROR_R)/g' \
-e 's/@''GNULIB_STRSIGNAL''@/$(GNULIB_STRSIGNAL)/g' \
-e 's/@''GNULIB_STRVERSCMP''@/$(GNULIB_STRVERSCMP)/g' \
- < $(srcdir)/string.in.h | \
+ < $(top_srcdir)/lib/string.in.h | \
sed -e 's|@''HAVE_FFSL''@|$(HAVE_FFSL)|g' \
-e 's|@''HAVE_FFSLL''@|$(HAVE_FFSLL)|g' \
-e 's|@''HAVE_MBSLEN''@|$(HAVE_MBSLEN)|g' \
@@ -1344,32 +1616,32 @@ string.h: string.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H
-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)/string.in.h; \
+ < $(top_srcdir)/lib/string.in.h; \
} > $@-t && \
mv $@-t $@
-MOSTLYCLEANFILES += string.h string.h-t
+MOSTLYCLEANFILES += lib/string.h lib/string.h-t
-EXTRA_DIST += string.in.h
+EXTRA_DIST += lib/string.in.h
## end gnulib module string
## begin gnulib module strverscmp
-EXTRA_DIST += strverscmp.c
+EXTRA_DIST += lib/strverscmp.c
-EXTRA_libsed_a_SOURCES += strverscmp.c
+EXTRA_lib_libsed_a_SOURCES += lib/strverscmp.c
## end gnulib module strverscmp
## begin gnulib module sys_stat
-BUILT_SOURCES += sys/stat.h
+BUILT_SOURCES += lib/sys/stat.h
# We need the following in order to create <sys/stat.h> when the system
# has one that is incomplete.
-sys/stat.h: sys_stat.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H)
- $(AM_V_at)$(MKDIR_P) sys
+lib/sys/stat.h: lib/sys_stat.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H)
+ $(AM_V_at)$(MKDIR_P) lib/sys
$(AM_V_GEN)rm -f $@-t $@ && \
{ echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
sed -e 's|@''GUARD_PREFIX''@|GL|g' \
@@ -1414,24 +1686,24 @@ sys/stat.h: sys_stat.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNU
-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_stat.in.h; \
+ < $(top_srcdir)/lib/sys_stat.in.h; \
} > $@-t && \
mv $@-t $@
-MOSTLYCLEANFILES += sys/stat.h sys/stat.h-t
-MOSTLYCLEANDIRS += sys
+MOSTLYCLEANFILES += lib/sys/stat.h lib/sys/stat.h-t
+MOSTLYCLEANDIRS += lib/sys
-EXTRA_DIST += sys_stat.in.h
+EXTRA_DIST += lib/sys_stat.in.h
## end gnulib module sys_stat
## begin gnulib module sys_time
-BUILT_SOURCES += sys/time.h
+BUILT_SOURCES += lib/sys/time.h
# We need the following in order to create <sys/time.h> when the system
# doesn't have one that works with the given compiler.
-sys/time.h: sys_time.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H)
- $(AM_V_at)$(MKDIR_P) sys
+lib/sys/time.h: lib/sys_time.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H)
+ $(AM_V_at)$(MKDIR_P) lib/sys
$(AM_V_GEN)rm -f $@-t $@ && \
{ echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
sed -e 's|@''GUARD_PREFIX''@|GL|g' \
@@ -1449,23 +1721,23 @@ sys/time.h: sys_time.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNU
-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_time.in.h; \
+ < $(top_srcdir)/lib/sys_time.in.h; \
} > $@-t && \
mv $@-t $@
-MOSTLYCLEANFILES += sys/time.h sys/time.h-t
+MOSTLYCLEANFILES += lib/sys/time.h lib/sys/time.h-t
-EXTRA_DIST += sys_time.in.h
+EXTRA_DIST += lib/sys_time.in.h
## end gnulib module sys_time
## begin gnulib module sys_types
-BUILT_SOURCES += sys/types.h
+BUILT_SOURCES += lib/sys/types.h
# We need the following in order to create <sys/types.h> when the system
# doesn't have one that works with the given compiler.
-sys/types.h: sys_types.in.h $(top_builddir)/config.status
- $(AM_V_at)$(MKDIR_P) sys
+lib/sys/types.h: lib/sys_types.in.h $(top_builddir)/config.status
+ $(AM_V_at)$(MKDIR_P) lib/sys
$(AM_V_GEN)rm -f $@-t $@ && \
{ echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
sed -e 's|@''GUARD_PREFIX''@|GL|g' \
@@ -1474,30 +1746,38 @@ sys/types.h: 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' \
- < $(srcdir)/sys_types.in.h; \
+ < $(top_srcdir)/lib/sys_types.in.h; \
} > $@-t && \
mv $@-t $@
-MOSTLYCLEANFILES += sys/types.h sys/types.h-t
+MOSTLYCLEANFILES += lib/sys/types.h lib/sys/types.h-t
-EXTRA_DIST += sys_types.in.h
+EXTRA_DIST += lib/sys_types.in.h
## end gnulib module sys_types
## begin gnulib module tempname
-libsed_a_SOURCES += tempname.c
+lib_libsed_a_SOURCES += lib/tempname.c
-EXTRA_DIST += tempname.h
+EXTRA_DIST += lib/tempname.h
## end gnulib module tempname
+## begin gnulib module threadlib
+
+lib_libsed_a_SOURCES += lib/glthread/threadlib.c
+
+EXTRA_DIST += $(top_srcdir)/build-aux/config.rpath
+
+## end gnulib module threadlib
+
## begin gnulib module time
-BUILT_SOURCES += time.h
+BUILT_SOURCES += lib/time.h
# We need the following in order to create <time.h> when the system
# doesn't have one that works with the given compiler.
-time.h: time.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H)
+lib/time.h: lib/time.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' \
@@ -1505,15 +1785,20 @@ time.h: time.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H) $(
-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_MKTIME''@/$(GNULIB_MKTIME)/g' \
-e 's/@''GNULIB_NANOSLEEP''@/$(GNULIB_NANOSLEEP)/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|@''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|@''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' \
@@ -1521,26 +1806,27 @@ time.h: time.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H) $(
-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' \
+ -e 's|@''UNISTD_H_DEFINES_STRUCT_TIMESPEC''@|$(UNISTD_H_DEFINES_STRUCT_TIMESPEC)|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)/time.in.h; \
+ < $(top_srcdir)/lib/time.in.h; \
} > $@-t && \
mv $@-t $@
-MOSTLYCLEANFILES += time.h time.h-t
+MOSTLYCLEANFILES += lib/time.h lib/time.h-t
-EXTRA_DIST += time.in.h
+EXTRA_DIST += lib/time.in.h
## end gnulib module time
## begin gnulib module unistd
-BUILT_SOURCES += unistd.h
-libsed_a_SOURCES += unistd.c
+BUILT_SOURCES += lib/unistd.h
+lib_libsed_a_SOURCES += lib/unistd.c
# We need the following in order to create an empty placeholder for
# <unistd.h> when the system doesn't have one.
-unistd.h: unistd.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H)
+lib/unistd.h: lib/unistd.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' \
@@ -1599,7 +1885,7 @@ unistd.h: unistd.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H
-e 's/@''GNULIB_UNLINKAT''@/$(GNULIB_UNLINKAT)/g' \
-e 's/@''GNULIB_USLEEP''@/$(GNULIB_USLEEP)/g' \
-e 's/@''GNULIB_WRITE''@/$(GNULIB_WRITE)/g' \
- < $(srcdir)/unistd.in.h | \
+ < $(top_srcdir)/lib/unistd.in.h | \
sed -e 's|@''HAVE_CHOWN''@|$(HAVE_CHOWN)|g' \
-e 's|@''HAVE_DUP2''@|$(HAVE_DUP2)|g' \
-e 's|@''HAVE_DUP3''@|$(HAVE_DUP3)|g' \
@@ -1613,7 +1899,6 @@ unistd.h: unistd.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H
-e 's|@''HAVE_GETDTABLESIZE''@|$(HAVE_GETDTABLESIZE)|g' \
-e 's|@''HAVE_GETGROUPS''@|$(HAVE_GETGROUPS)|g' \
-e 's|@''HAVE_GETHOSTNAME''@|$(HAVE_GETHOSTNAME)|g' \
- -e 's|@''HAVE_GETLOGIN''@|$(HAVE_GETLOGIN)|g' \
-e 's|@''HAVE_GETPAGESIZE''@|$(HAVE_GETPAGESIZE)|g' \
-e 's|@''HAVE_GROUP_MEMBER''@|$(HAVE_GROUP_MEMBER)|g' \
-e 's|@''HAVE_LCHOWN''@|$(HAVE_LCHOWN)|g' \
@@ -1635,6 +1920,7 @@ unistd.h: unistd.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H
-e 's|@''HAVE_DECL_FCHDIR''@|$(HAVE_DECL_FCHDIR)|g' \
-e 's|@''HAVE_DECL_FDATASYNC''@|$(HAVE_DECL_FDATASYNC)|g' \
-e 's|@''HAVE_DECL_GETDOMAINNAME''@|$(HAVE_DECL_GETDOMAINNAME)|g' \
+ -e 's|@''HAVE_DECL_GETLOGIN''@|$(HAVE_DECL_GETLOGIN)|g' \
-e 's|@''HAVE_DECL_GETLOGIN_R''@|$(HAVE_DECL_GETLOGIN_R)|g' \
-e 's|@''HAVE_DECL_GETPAGESIZE''@|$(HAVE_DECL_GETPAGESIZE)|g' \
-e 's|@''HAVE_DECL_GETUSERSHELL''@|$(HAVE_DECL_GETUSERSHELL)|g' \
@@ -1651,6 +1937,7 @@ unistd.h: unistd.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H
-e 's|@''REPLACE_FTRUNCATE''@|$(REPLACE_FTRUNCATE)|g' \
-e 's|@''REPLACE_GETCWD''@|$(REPLACE_GETCWD)|g' \
-e 's|@''REPLACE_GETDOMAINNAME''@|$(REPLACE_GETDOMAINNAME)|g' \
+ -e 's|@''REPLACE_GETDTABLESIZE''@|$(REPLACE_GETDTABLESIZE)|g' \
-e 's|@''REPLACE_GETLOGIN_R''@|$(REPLACE_GETLOGIN_R)|g' \
-e 's|@''REPLACE_GETGROUPS''@|$(REPLACE_GETGROUPS)|g' \
-e 's|@''REPLACE_GETPAGESIZE''@|$(REPLACE_GETPAGESIZE)|g' \
@@ -1663,9 +1950,11 @@ unistd.h: unistd.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H
-e 's|@''REPLACE_PWRITE''@|$(REPLACE_PWRITE)|g' \
-e 's|@''REPLACE_READ''@|$(REPLACE_READ)|g' \
-e 's|@''REPLACE_READLINK''@|$(REPLACE_READLINK)|g' \
+ -e 's|@''REPLACE_READLINKAT''@|$(REPLACE_READLINKAT)|g' \
-e 's|@''REPLACE_RMDIR''@|$(REPLACE_RMDIR)|g' \
-e 's|@''REPLACE_SLEEP''@|$(REPLACE_SLEEP)|g' \
-e 's|@''REPLACE_SYMLINK''@|$(REPLACE_SYMLINK)|g' \
+ -e 's|@''REPLACE_SYMLINKAT''@|$(REPLACE_SYMLINKAT)|g' \
-e 's|@''REPLACE_TTYNAME_R''@|$(REPLACE_TTYNAME_R)|g' \
-e 's|@''REPLACE_UNLINK''@|$(REPLACE_UNLINK)|g' \
-e 's|@''REPLACE_UNLINKAT''@|$(REPLACE_UNLINKAT)|g' \
@@ -1678,45 +1967,66 @@ unistd.h: unistd.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H
-e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)'; \
} > $@-t && \
mv $@-t $@
-MOSTLYCLEANFILES += unistd.h unistd.h-t
+MOSTLYCLEANFILES += lib/unistd.h lib/unistd.h-t
-EXTRA_DIST += unistd.in.h
+EXTRA_DIST += lib/unistd.in.h
## end gnulib module unistd
## begin gnulib module unlocked-io
-EXTRA_DIST += unlocked-io.h
+EXTRA_DIST += lib/unlocked-io.h
## end gnulib module unlocked-io
+## begin gnulib module update-copyright
+
+
+EXTRA_DIST += $(top_srcdir)/build-aux/update-copyright
+
+## end gnulib module update-copyright
+
+## begin gnulib module useless-if-before-free
+
+
+EXTRA_DIST += $(top_srcdir)/build-aux/useless-if-before-free
+
+## end gnulib module useless-if-before-free
+
+## begin gnulib module vc-list-files
+
+
+EXTRA_DIST += $(top_srcdir)/build-aux/vc-list-files
+
+## end gnulib module vc-list-files
+
## begin gnulib module verify
-EXTRA_DIST += verify.h
+EXTRA_DIST += lib/verify.h
## end gnulib module verify
## begin gnulib module version-etc
-libsed_a_SOURCES += version-etc.h version-etc.c
+lib_libsed_a_SOURCES += lib/version-etc.h lib/version-etc.c
## end gnulib module version-etc
## begin gnulib module version-etc-fsf
-libsed_a_SOURCES += version-etc-fsf.c
+lib_libsed_a_SOURCES += lib/version-etc-fsf.c
## end gnulib module version-etc-fsf
## begin gnulib module wchar
-BUILT_SOURCES += wchar.h
+BUILT_SOURCES += lib/wchar.h
# We need the following in order to create <wchar.h> when the system
# version does not work standalone.
-wchar.h: wchar.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H)
+lib/wchar.h: lib/wchar.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' \
@@ -1726,6 +2036,7 @@ wchar.h: wchar.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H)
-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/@''GNULIB_OVERRIDES_WINT_T''@/$(GNULIB_OVERRIDES_WINT_T)/g' \
-e 's/@''GNULIB_BTOWC''@/$(GNULIB_BTOWC)/g' \
-e 's/@''GNULIB_WCTOB''@/$(GNULIB_WCTOB)/g' \
-e 's/@''GNULIB_MBSINIT''@/$(GNULIB_MBSINIT)/g' \
@@ -1765,7 +2076,7 @@ wchar.h: wchar.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H)
-e 's/@''GNULIB_WCSSTR''@/$(GNULIB_WCSSTR)/g' \
-e 's/@''GNULIB_WCSTOK''@/$(GNULIB_WCSTOK)/g' \
-e 's/@''GNULIB_WCSWIDTH''@/$(GNULIB_WCSWIDTH)/g' \
- < $(srcdir)/wchar.in.h | \
+ < $(top_srcdir)/lib/wchar.in.h | \
sed -e 's|@''HAVE_WINT_T''@|$(HAVE_WINT_T)|g' \
-e 's|@''HAVE_BTOWC''@|$(HAVE_BTOWC)|g' \
-e 's|@''HAVE_MBSINIT''@|$(HAVE_MBSINIT)|g' \
@@ -1825,47 +2136,47 @@ wchar.h: wchar.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H)
-e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)'; \
} > $@-t && \
mv $@-t $@
-MOSTLYCLEANFILES += wchar.h wchar.h-t
+MOSTLYCLEANFILES += lib/wchar.h lib/wchar.h-t
-EXTRA_DIST += wchar.in.h
+EXTRA_DIST += lib/wchar.in.h
## end gnulib module wchar
## begin gnulib module wcrtomb
-EXTRA_DIST += wcrtomb.c
+EXTRA_DIST += lib/wcrtomb.c
-EXTRA_libsed_a_SOURCES += wcrtomb.c
+EXTRA_lib_libsed_a_SOURCES += lib/wcrtomb.c
## end gnulib module wcrtomb
## begin gnulib module wctob
-EXTRA_DIST += wctob.c
+EXTRA_DIST += lib/wctob.c
-EXTRA_libsed_a_SOURCES += wctob.c
+EXTRA_lib_libsed_a_SOURCES += lib/wctob.c
## end gnulib module wctob
## begin gnulib module wctomb
-EXTRA_DIST += wctomb-impl.h wctomb.c
+EXTRA_DIST += lib/wctomb-impl.h lib/wctomb.c
-EXTRA_libsed_a_SOURCES += wctomb.c
+EXTRA_lib_libsed_a_SOURCES += lib/wctomb.c
## end gnulib module wctomb
## begin gnulib module wctype-h
-BUILT_SOURCES += wctype.h
-libsed_a_SOURCES += wctype-h.c
+BUILT_SOURCES += lib/wctype.h
+lib_libsed_a_SOURCES += lib/wctype-h.c
# We need the following in order to create <wctype.h> when the system
# doesn't have one that works with the given compiler.
-wctype.h: wctype.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(WARN_ON_USE_H)
+lib/wctype.h: lib/wctype.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(WARN_ON_USE_H)
$(AM_V_GEN)rm -f $@-t $@ && \
{ echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
sed -e 's|@''GUARD_PREFIX''@|GL|g' \
@@ -1874,6 +2185,7 @@ wctype.h: wctype.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(WARN_ON_USE_H
-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/@''GNULIB_OVERRIDES_WINT_T''@/$(GNULIB_OVERRIDES_WINT_T)/g' \
-e 's/@''GNULIB_ISWBLANK''@/$(GNULIB_ISWBLANK)/g' \
-e 's/@''GNULIB_WCTYPE''@/$(GNULIB_WCTYPE)/g' \
-e 's/@''GNULIB_ISWCTYPE''@/$(GNULIB_ISWCTYPE)/g' \
@@ -1889,33 +2201,33 @@ wctype.h: wctype.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(WARN_ON_USE_H
-e 's/@''REPLACE_TOWLOWER''@/$(REPLACE_TOWLOWER)/g' \
-e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \
-e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \
- < $(srcdir)/wctype.in.h; \
+ < $(top_srcdir)/lib/wctype.in.h; \
} > $@-t && \
mv $@-t $@
-MOSTLYCLEANFILES += wctype.h wctype.h-t
+MOSTLYCLEANFILES += lib/wctype.h lib/wctype.h-t
-EXTRA_DIST += wctype.in.h
+EXTRA_DIST += lib/wctype.in.h
## end gnulib module wctype-h
## begin gnulib module xalloc
-libsed_a_SOURCES += xmalloc.c
+lib_libsed_a_SOURCES += lib/xmalloc.c
-EXTRA_DIST += xalloc.h
+EXTRA_DIST += lib/xalloc.h
## end gnulib module xalloc
## begin gnulib module xalloc-die
-libsed_a_SOURCES += xalloc-die.c
+lib_libsed_a_SOURCES += lib/xalloc-die.c
## end gnulib module xalloc-die
## begin gnulib module xalloc-oversized
-EXTRA_DIST += xalloc-oversized.h
+EXTRA_DIST += lib/xalloc-oversized.h
## end gnulib module xalloc-oversized
diff --git a/lib/hard-locale.c b/lib/hard-locale.c
new file mode 100644
index 0000000..c7d9da5
--- /dev/null
+++ b/lib/hard-locale.c
@@ -0,0 +1,72 @@
+/* hard-locale.c -- Determine whether a locale is hard.
+
+ Copyright (C) 1997-1999, 2002-2004, 2006-2007, 2009-2016 Free Software
+ Foundation, Inc.
+
+ This 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 "hard-locale.h"
+
+#include <locale.h>
+#include <stdlib.h>
+#include <string.h>
+
+#ifdef __GLIBC__
+# define GLIBC_VERSION __GLIBC__
+#elif defined __UCLIBC__
+# define GLIBC_VERSION 2
+#else
+# define GLIBC_VERSION 0
+#endif
+
+/* Return true if the current CATEGORY locale is hard, i.e. if you
+ can't get away with assuming traditional C or POSIX behavior. */
+bool
+hard_locale (int category)
+{
+ bool hard = true;
+ char const *p = setlocale (category, NULL);
+
+ if (p)
+ {
+ if (2 <= GLIBC_VERSION)
+ {
+ if (strcmp (p, "C") == 0 || strcmp (p, "POSIX") == 0)
+ hard = false;
+ }
+ else
+ {
+ char *locale = strdup (p);
+ if (locale)
+ {
+ /* Temporarily set the locale to the "C" and "POSIX" locales
+ to find their names, so that we can determine whether one
+ or the other is the caller's locale. */
+ if (((p = setlocale (category, "C"))
+ && strcmp (p, locale) == 0)
+ || ((p = setlocale (category, "POSIX"))
+ && strcmp (p, locale) == 0))
+ hard = false;
+
+ /* Restore the caller's locale. */
+ setlocale (category, locale);
+ free (locale);
+ }
+ }
+ }
+
+ return hard;
+}
diff --git a/lib/hard-locale.h b/lib/hard-locale.h
new file mode 100644
index 0000000..7644afa
--- /dev/null
+++ b/lib/hard-locale.h
@@ -0,0 +1,25 @@
+/* Determine whether a locale is hard.
+
+ Copyright (C) 1999, 2003-2004, 2009-2016 Free Software Foundation, Inc.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+#ifndef HARD_LOCALE_H_
+# define HARD_LOCALE_H_ 1
+
+# include <stdbool.h>
+
+bool hard_locale (int);
+
+#endif /* HARD_LOCALE_H_ */
diff --git a/lib/ignore-value.h b/lib/ignore-value.h
new file mode 100644
index 0000000..6713d96
--- /dev/null
+++ b/lib/ignore-value.h
@@ -0,0 +1,50 @@
+/* ignore a function return without a compiler warning. -*- coding: utf-8 -*-
+
+ Copyright (C) 2008-2016 Free Software Foundation, Inc.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+/* Written by Jim Meyering, Eric Blake and Pádraig Brady. */
+
+/* Use "ignore_value" to avoid a warning when using a function declared with
+ gcc's warn_unused_result attribute, but for which you really do want to
+ ignore the result. Traditionally, people have used a "(void)" cast to
+ indicate that a function's return value is deliberately unused. However,
+ if the function is declared with __attribute__((warn_unused_result)),
+ gcc issues a warning even with the cast.
+
+ Caution: most of the time, you really should heed gcc's warning, and
+ check the return value. However, in those exceptional cases in which
+ you're sure you know what you're doing, use this function.
+
+ For the record, here's one of the ignorable warnings:
+ "copy.c:233: warning: ignoring return value of 'fchown',
+ declared with attribute warn_unused_result". */
+
+#ifndef _GL_IGNORE_VALUE_H
+#define _GL_IGNORE_VALUE_H
+
+/* Normally casting an expression to void discards its value, but GCC
+ versions 3.4 and newer have __attribute__ ((__warn_unused_result__))
+ which may cause unwanted diagnostics in that case. Use __typeof__
+ and __extension__ to work around the problem, if the workaround is
+ known to be needed. */
+#if 3 < __GNUC__ + (4 <= __GNUC_MINOR__)
+# define ignore_value(x) \
+ (__extension__ ({ __typeof__ (x) __x = (x); (void) __x; }))
+#else
+# define ignore_value(x) ((void) (x))
+#endif
+
+#endif
diff --git a/lib/intprops.h b/lib/intprops.h
index 2485c78..8add5de 100644
--- a/lib/intprops.h
+++ b/lib/intprops.h
@@ -1,10 +1,10 @@
/* intprops.h -- properties of integer types
- Copyright (C) 2001-2005, 2009-2012 Free Software Foundation, Inc.
+ Copyright (C) 2001-2016 Free Software Foundation, Inc.
- This 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
+ This 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,
@@ -21,9 +21,13 @@
#define _GL_INTPROPS_H
#include <limits.h>
+#include <verify.h>
-/* Return an integer value, converted to the same type as the integer
- expression E after integer type promotion. V is the unconverted value. */
+#ifndef __has_builtin
+# define __has_builtin(x) 0
+#endif
+
+/* 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
@@ -37,59 +41,73 @@
an integer. */
#define TYPE_IS_INTEGER(t) ((t) 1.5 == 1)
-/* True if negative values of the signed integer type T use two's
- complement, ones' complement, or signed magnitude representation,
- respectively. Much GNU code assumes two's complement, but some
- people like to be portable to all possible C hosts. */
-#define TYPE_TWOS_COMPLEMENT(t) ((t) ~ (t) 0 == (t) -1)
-#define TYPE_ONES_COMPLEMENT(t) ((t) ~ (t) 0 == 0)
-#define TYPE_SIGNED_MAGNITUDE(t) ((t) ~ (t) 0 < (t) -1)
-
-/* True if the signed integer expression E uses two's complement. */
-#define _GL_INT_TWOS_COMPLEMENT(e) (~ _GL_INT_CONVERT (e, 0) == -1)
-
-/* True if the arithmetic type T is signed. */
+/* True if the real type T is signed. */
#define TYPE_SIGNED(t) (! ((t) 0 < (t) -1))
-/* Return 1 if the integer expression E, after integer promotion, has
- a signed type. */
-#define _GL_INT_SIGNED(e) (_GL_INT_NEGATE_CONVERT (e, 1) < 0)
+/* Return 1 if the real expression E, after promotion, has a
+ signed or floating type. */
+#define EXPR_SIGNED(e) (_GL_INT_NEGATE_CONVERT (e, 1) < 0)
-/* Minimum and maximum values for integer types and expressions. These
- macros have undefined behavior if T is signed and has padding bits.
- If this is a problem for you, please let us know how to fix it for
- your host. */
+/* Minimum and maximum values for integer types and expressions. */
+
+/* The width in bits of the integer type or expression T.
+ Padding bits are not supported; this is checked at compile-time below. */
+#define TYPE_WIDTH(t) (sizeof (t) * CHAR_BIT)
/* The maximum and minimum values for the integer type T. */
-#define TYPE_MINIMUM(t) \
- ((t) (! TYPE_SIGNED (t) \
- ? (t) 0 \
- : TYPE_SIGNED_MAGNITUDE (t) \
- ? ~ (t) 0 \
- : ~ TYPE_MAXIMUM (t)))
+#define TYPE_MINIMUM(t) ((t) ~ TYPE_MAXIMUM (t))
#define TYPE_MAXIMUM(t) \
((t) (! TYPE_SIGNED (t) \
? (t) -1 \
- : ((((t) 1 << (sizeof (t) * CHAR_BIT - 2)) - 1) * 2 + 1)))
+ : ((((t) 1 << (TYPE_WIDTH (t) - 2)) - 1) * 2 + 1)))
/* The maximum and minimum values for the type of the expression E,
after integer promotion. E should not have side effects. */
#define _GL_INT_MINIMUM(e) \
- (_GL_INT_SIGNED (e) \
- ? - _GL_INT_TWOS_COMPLEMENT (e) - _GL_SIGNED_INT_MAXIMUM (e) \
+ (EXPR_SIGNED (e) \
+ ? ~ _GL_SIGNED_INT_MAXIMUM (e) \
: _GL_INT_CONVERT (e, 0))
#define _GL_INT_MAXIMUM(e) \
- (_GL_INT_SIGNED (e) \
+ (EXPR_SIGNED (e) \
? _GL_SIGNED_INT_MAXIMUM (e) \
: _GL_INT_NEGATE_CONVERT (e, 1))
#define _GL_SIGNED_INT_MAXIMUM(e) \
- (((_GL_INT_CONVERT (e, 1) << (sizeof ((e) + 0) * CHAR_BIT - 2)) - 1) * 2 + 1)
+ (((_GL_INT_CONVERT (e, 1) << (TYPE_WIDTH ((e) + 0) - 2)) - 1) * 2 + 1)
+
+/* Work around OpenVMS incompatibility with C99. */
+#if !defined LLONG_MAX && defined __INT64_MAX
+# define LLONG_MAX __INT64_MAX
+# define LLONG_MIN __INT64_MIN
+#endif
+/* 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
-/* Return 1 if the __typeof__ keyword works. This could be done by
+/* Does the __typeof__ keyword work? This could be done by
'configure', but for now it's easier to do it by hand. */
-#if 2 <= __GNUC__ || 0x5110 <= __SUNPRO_C
+#if (2 <= __GNUC__ \
+ || (1210 <= __IBMC__ && defined __IBM__TYPEOF__) \
+ || (0x5110 <= __SUNPRO_C && !__STDC__))
# define _GL_HAVE___TYPEOF__ 1
#else
# define _GL_HAVE___TYPEOF__ 0
@@ -117,8 +135,7 @@
signed, this macro may overestimate the true bound by one byte when
applied to unsigned types of size 2, 4, 16, ... bytes. */
#define INT_STRLEN_BOUND(t) \
- (INT_BITS_STRLEN_BOUND (sizeof (t) * CHAR_BIT \
- - _GL_SIGNED_TYPE_OR_EXPR (t)) \
+ (INT_BITS_STRLEN_BOUND (TYPE_WIDTH (t) - _GL_SIGNED_TYPE_OR_EXPR (t)) \
+ _GL_SIGNED_TYPE_OR_EXPR (t))
/* Bound on buffer size needed to represent an integer type or expression T,
@@ -223,24 +240,40 @@
? (a) < (min) >> (b) \
: (max) >> (b) < (a))
+/* True if __builtin_add_overflow (A, B, P) works when P is non-null. */
+#define _GL_HAS_BUILTIN_OVERFLOW \
+ (5 <= __GNUC__ || __has_builtin (__builtin_add_overflow))
+
+/* True if __builtin_add_overflow_p (A, B, C) works. */
+#define _GL_HAS_BUILTIN_OVERFLOW_P \
+ (7 <= __GNUC__ || __has_builtin (__builtin_add_overflow_p))
/* The _GL*_OVERFLOW macros have the same restrictions as the
*_RANGE_OVERFLOW macros, except that they do not assume that operands
(e.g., A and B) have the same type as MIN and MAX. Instead, they assume
that the result (e.g., A + B) has that type. */
-#define _GL_ADD_OVERFLOW(a, b, min, max) \
- ((min) < 0 ? INT_ADD_RANGE_OVERFLOW (a, b, min, max) \
- : (a) < 0 ? (b) <= (a) + (b) \
- : (b) < 0 ? (a) <= (a) + (b) \
- : (a) + (b) < (b))
-#define _GL_SUBTRACT_OVERFLOW(a, b, min, max) \
- ((min) < 0 ? INT_SUBTRACT_RANGE_OVERFLOW (a, b, min, max) \
- : (a) < 0 ? 1 \
- : (b) < 0 ? (a) - (b) <= (a) \
- : (a) < (b))
-#define _GL_MULTIPLY_OVERFLOW(a, b, min, max) \
- (((min) == 0 && (((a) < 0 && 0 < (b)) || ((b) < 0 && 0 < (a)))) \
- || INT_MULTIPLY_RANGE_OVERFLOW (a, b, min, max))
+#if _GL_HAS_BUILTIN_OVERFLOW_P
+# define _GL_ADD_OVERFLOW(a, b, min, max) \
+ __builtin_add_overflow_p (a, b, (__typeof__ ((a) + (b))) 0)
+# define _GL_SUBTRACT_OVERFLOW(a, b, min, max) \
+ __builtin_sub_overflow_p (a, b, (__typeof__ ((a) - (b))) 0)
+# define _GL_MULTIPLY_OVERFLOW(a, b, min, max) \
+ __builtin_mul_overflow_p (a, b, (__typeof__ ((a) * (b))) 0)
+#else
+# define _GL_ADD_OVERFLOW(a, b, min, max) \
+ ((min) < 0 ? INT_ADD_RANGE_OVERFLOW (a, b, min, max) \
+ : (a) < 0 ? (b) <= (a) + (b) \
+ : (b) < 0 ? (a) <= (a) + (b) \
+ : (a) + (b) < (b))
+# define _GL_SUBTRACT_OVERFLOW(a, b, min, max) \
+ ((min) < 0 ? INT_SUBTRACT_RANGE_OVERFLOW (a, b, min, max) \
+ : (a) < 0 ? 1 \
+ : (b) < 0 ? (a) - (b) <= (a) \
+ : (a) < (b))
+# define _GL_MULTIPLY_OVERFLOW(a, b, min, max) \
+ (((min) == 0 && (((a) < 0 && 0 < (b)) || ((b) < 0 && 0 < (a)))) \
+ || INT_MULTIPLY_RANGE_OVERFLOW (a, b, min, max))
+#endif
#define _GL_DIVIDE_OVERFLOW(a, b, min, max) \
((min) < 0 ? (b) == _GL_INT_NEGATE_CONVERT (min, 1) && (a) < - (max) \
: (a) < 0 ? (b) <= (a) + (b) - 1 \
@@ -262,22 +295,29 @@
: (a) % - (b)) \
== 0)
-
-/* Integer overflow checks.
+/* Check for integer overflow, and report low order bits of answer.
The INT_<op>_OVERFLOW macros return 1 if the corresponding C operators
might not yield numerically correct answers due to arithmetic overflow.
- They work correctly on all known practical hosts, and do not rely
+ The INT_<op>_WRAPV macros also store the low-order bits of the answer.
+ These macros work correctly on all known practical hosts, and do not rely
on undefined behavior due to signed arithmetic overflow.
- Example usage:
+ Example usage, assuming A and B are long int:
- long int i = ...;
- long int j = ...;
- if (INT_MULTIPLY_OVERFLOW (i, j))
- printf ("multiply would overflow");
+ if (INT_MULTIPLY_OVERFLOW (a, b))
+ printf ("result would overflow\n");
else
- printf ("product is %ld", i * j);
+ printf ("result is %ld (no overflow)\n", a * b);
+
+ Example usage with WRAPV flavor:
+
+ long int result;
+ bool overflow = INT_MULTIPLY_WRAPV (a, b, &result);
+ printf ("result is %ld (%s)\n", result,
+ overflow ? "after overflow" : "no overflow");
+
+ Restrictions on these macros:
These macros do not check for all possible numerical problems or
undefined or unspecified behavior: they do not check for division
@@ -286,6 +326,9 @@
These macros may evaluate their arguments zero or multiple times, so the
arguments should not have side effects.
+ The WRAPV macros are not constant expressions. They support only
+ +, binary -, and *. The result type must be signed.
+
These macros are tuned for their last argument being a constant.
Return 1 if the integer expressions A * B, A - B, -A, A * B, A / B,
@@ -295,8 +338,12 @@
_GL_BINARY_OP_OVERFLOW (a, b, _GL_ADD_OVERFLOW)
#define INT_SUBTRACT_OVERFLOW(a, b) \
_GL_BINARY_OP_OVERFLOW (a, b, _GL_SUBTRACT_OVERFLOW)
-#define INT_NEGATE_OVERFLOW(a) \
- INT_NEGATE_RANGE_OVERFLOW (a, _GL_INT_MINIMUM (a), _GL_INT_MAXIMUM (a))
+#if _GL_HAS_BUILTIN_OVERFLOW_P
+# define INT_NEGATE_OVERFLOW(a) INT_SUBTRACT_OVERFLOW (0, a)
+#else
+# define INT_NEGATE_OVERFLOW(a) \
+ INT_NEGATE_RANGE_OVERFLOW (a, _GL_INT_MINIMUM (a), _GL_INT_MAXIMUM (a))
+#endif
#define INT_MULTIPLY_OVERFLOW(a, b) \
_GL_BINARY_OP_OVERFLOW (a, b, _GL_MULTIPLY_OVERFLOW)
#define INT_DIVIDE_OVERFLOW(a, b) \
@@ -316,4 +363,102 @@
_GL_INT_MINIMUM (0 * (b) + (a)), \
_GL_INT_MAXIMUM (0 * (b) + (a)))
+/* Store the low-order bits of A + B, A - B, A * B, respectively, into *R.
+ Return 1 if the result overflows. See above for restrictions. */
+#define INT_ADD_WRAPV(a, b, r) \
+ _GL_INT_OP_WRAPV (a, b, r, +, __builtin_add_overflow, INT_ADD_OVERFLOW)
+#define INT_SUBTRACT_WRAPV(a, b, r) \
+ _GL_INT_OP_WRAPV (a, b, r, -, __builtin_sub_overflow, INT_SUBTRACT_OVERFLOW)
+#define INT_MULTIPLY_WRAPV(a, b, r) \
+ _GL_INT_OP_WRAPV (a, b, r, *, __builtin_mul_overflow, INT_MULTIPLY_OVERFLOW)
+
+/* Nonzero if this compiler has GCC bug 68193 or Clang bug 25390. See:
+ https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68193
+ https://llvm.org/bugs/show_bug.cgi?id=25390
+ For now, assume all versions of GCC-like compilers generate bogus
+ warnings for _Generic. This matters only for older compilers that
+ lack __builtin_add_overflow. */
+#if __GNUC__
+# define _GL__GENERIC_BOGUS 1
+#else
+# define _GL__GENERIC_BOGUS 0
+#endif
+
+/* Store the low-order bits of A <op> B into *R, where OP specifies
+ the operation. BUILTIN is the builtin operation, and OVERFLOW the
+ overflow predicate. Return 1 if the result overflows. See above
+ for restrictions. */
+#if _GL_HAS_BUILTIN_OVERFLOW
+# define _GL_INT_OP_WRAPV(a, b, r, op, builtin, overflow) builtin (a, b, r)
+#elif 201112 <= __STDC_VERSION__ && !_GL__GENERIC_BOGUS
+# define _GL_INT_OP_WRAPV(a, b, r, op, builtin, overflow) \
+ (_Generic \
+ (*(r), \
+ signed char: \
+ _GL_INT_OP_CALC (a, b, r, op, overflow, unsigned char, \
+ signed char, SCHAR_MIN, SCHAR_MAX), \
+ short int: \
+ _GL_INT_OP_CALC (a, b, r, op, overflow, unsigned short int, \
+ short int, SHRT_MIN, SHRT_MAX), \
+ int: \
+ _GL_INT_OP_CALC (a, b, r, op, overflow, unsigned int, \
+ int, INT_MIN, INT_MAX), \
+ long int: \
+ _GL_INT_OP_CALC (a, b, r, op, overflow, unsigned long int, \
+ long int, LONG_MIN, LONG_MAX), \
+ long long int: \
+ _GL_INT_OP_CALC (a, b, r, op, overflow, unsigned long long int, \
+ long long int, LLONG_MIN, LLONG_MAX)))
+#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, \
+ signed char, SCHAR_MIN, SCHAR_MAX) \
+ : sizeof *(r) == sizeof (short int) \
+ ? _GL_INT_OP_CALC (a, b, r, op, overflow, unsigned short int, \
+ short int, SHRT_MIN, SHRT_MAX) \
+ : sizeof *(r) == sizeof (int) \
+ ? _GL_INT_OP_CALC (a, b, r, op, overflow, unsigned int, \
+ int, INT_MIN, INT_MAX) \
+ : _GL_INT_OP_WRAPV_LONGISH(a, b, r, op, overflow))
+# ifdef LLONG_MAX
+# define _GL_INT_OP_WRAPV_LONGISH(a, b, r, op, overflow) \
+ (sizeof *(r) == sizeof (long int) \
+ ? _GL_INT_OP_CALC (a, b, r, op, overflow, unsigned long int, \
+ long int, LONG_MIN, LONG_MAX) \
+ : _GL_INT_OP_CALC (a, b, r, op, overflow, unsigned long long int, \
+ long long int, LLONG_MIN, LLONG_MAX))
+# else
+# define _GL_INT_OP_WRAPV_LONGISH(a, b, r, op, overflow) \
+ _GL_INT_OP_CALC (a, b, r, op, overflow, unsigned long int, \
+ long int, LONG_MIN, LONG_MAX)
+# endif
+#endif
+
+/* 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. */
+#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) \
+ : _GL_INT_OP_CALC1 (a, b, r, op, overflow, ut, t, tmin, tmax))
+#define _GL_INT_OP_CALC1(a, b, r, op, overflow, ut, t, tmin, tmax) \
+ ((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)))
+
#endif /* _GL_INTPROPS_H */
diff --git a/lib/isblank.c b/lib/isblank.c
new file mode 100644
index 0000000..6cc7379
--- /dev/null
+++ b/lib/isblank.c
@@ -0,0 +1,33 @@
+/* Test whether a character is a blank.
+
+ Copyright (C) 2009-2016 Free Software Foundation, Inc.
+
+ This 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>
+
+/* Specification. */
+#include <ctype.h>
+
+int
+isblank (int c)
+{
+ /* On all known platforms, in all predefined locales, isblank(c) is likely
+ equivalent with (c == ' ' || c == '\t'). Look at the glibc definition
+ (in glibc/localedata/locales/i18n): The "blank" characters are '\t', ' ',
+ U+1680, U+180E, U+2000..U+2006, U+2008..U+200A, U+205F, U+3000, and none
+ except the first two is present in a common 8-bit encoding. Therefore
+ the substitute for other platforms is not more complicated than this. */
+ return (c == ' ' || c == '\t');
+}
diff --git a/lib/langinfo.in.h b/lib/langinfo.in.h
index d555b75..e11617c 100644
--- a/lib/langinfo.in.h
+++ b/lib/langinfo.in.h
@@ -1,7 +1,5 @@
-/* -*- buffer-read-only: t -*- vi: set ro: */
-/* DO NOT EDIT! GENERATED AUTOMATICALLY! */
/* Substitute for and wrapper around <langinfo.h>.
- Copyright (C) 2009-2012 Free Software Foundation, Inc.
+ Copyright (C) 2009-2016 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -51,7 +49,10 @@ typedef int nl_item;
# define CODESET 10000
/* nl_langinfo items of the LC_NUMERIC category */
# define RADIXCHAR 10001
+# define DECIMAL_POINT RADIXCHAR
# define THOUSEP 10002
+# define THOUSANDS_SEP THOUSEP
+# define GROUPING 10114
/* nl_langinfo items of the LC_TIME category */
# define D_T_FMT 10003
# define D_FMT 10004
@@ -104,6 +105,21 @@ typedef int nl_item;
# define ALT_DIGITS 10051
/* nl_langinfo items of the LC_MONETARY category */
# define CRNCYSTR 10052
+# define CURRENCY_SYMBOL CRNCYSTR
+# define INT_CURR_SYMBOL 10100
+# define MON_DECIMAL_POINT 10101
+# define MON_THOUSANDS_SEP 10102
+# define MON_GROUPING 10103
+# define POSITIVE_SIGN 10104
+# define NEGATIVE_SIGN 10105
+# define FRAC_DIGITS 10106
+# define INT_FRAC_DIGITS 10107
+# define P_CS_PRECEDES 10108
+# define N_CS_PRECEDES 10109
+# define P_SEP_BY_SPACE 10110
+# define N_SEP_BY_SPACE 10111
+# define P_SIGN_POSN 10112
+# define N_SIGN_POSN 10113
/* nl_langinfo items of the LC_MESSAGES category */
# define YESEXPR 10053
# define NOEXPR 10054
diff --git a/lib/limits.in.h b/lib/limits.in.h
new file mode 100644
index 0000000..a1eae02
--- /dev/null
+++ b/lib/limits.in.h
@@ -0,0 +1,63 @@
+/* A GNU-like <limits.h>.
+
+ Copyright 2016 Free Software Foundation, Inc.
+
+ This 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 <http://www.gnu.org/licenses/>. */
+
+#ifndef _@GUARD_PREFIX@_LIMITS_H
+
+#if __GNUC__ >= 3
+@PRAGMA_SYSTEM_HEADER@
+#endif
+@PRAGMA_COLUMNS@
+
+/* The include_next requires a split double-inclusion guard. */
+#@INCLUDE_NEXT@ @NEXT_LIMITS_H@
+
+#ifndef _@GUARD_PREFIX@_LIMITS_H
+#define _@GUARD_PREFIX@_LIMITS_H
+
+/* 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
+ implementation exploits the fact that MAX is 1 less than a power of
+ 2, and merely counts the number of 1 bits in MAX; "COBn" means
+ "count the number of 1 bits in the low-order n bits"). */
+#define _GL_INTEGER_WIDTH(min, max) (((min) < 0) + _GL_COB128 (max))
+#define _GL_COB128(n) (_GL_COB64 ((n) >> 31 >> 31 >> 2) + _GL_COB64 (n))
+#define _GL_COB64(n) (_GL_COB32 ((n) >> 31 >> 1) + _GL_COB32 (n))
+#define _GL_COB32(n) (_GL_COB16 ((n) >> 16) + _GL_COB16 (n))
+#define _GL_COB16(n) (_GL_COB8 ((n) >> 8) + _GL_COB8 (n))
+#define _GL_COB8(n) (_GL_COB4 ((n) >> 4) + _GL_COB4 (n))
+#define _GL_COB4(n) (!!((n) & 8) + !!((n) & 4) + !!((n) & 2) + !!((n) & 1))
+
+/* Macros specified by ISO/IEC TS 18661-1:2014. */
+
+#if (! defined ULLONG_WIDTH \
+ && (defined _GNU_SOURCE || defined __STDC_WANT_IEC_60559_BFP_EXT__))
+# define CHAR_WIDTH _GL_INTEGER_WIDTH (CHAR_MIN, CHAR_MAX)
+# define SCHAR_WIDTH _GL_INTEGER_WIDTH (SCHAR_MIN, SCHAR_MAX)
+# define UCHAR_WIDTH _GL_INTEGER_WIDTH (0, UCHAR_MAX)
+# define SHRT_WIDTH _GL_INTEGER_WIDTH (SHRT_MIN, SHRT_MAX)
+# define USHRT_WIDTH _GL_INTEGER_WIDTH (0, USHRT_MAX)
+# define INT_WIDTH _GL_INTEGER_WIDTH (INT_MIN, INT_MAX)
+# define UINT_WIDTH _GL_INTEGER_WIDTH (0, UINT_MAX)
+# define LONG_WIDTH _GL_INTEGER_WIDTH (LONG_MIN, LONG_MAX)
+# define ULONG_WIDTH _GL_INTEGER_WIDTH (0, ULONG_MAX)
+# define LLONG_WIDTH _GL_INTEGER_WIDTH (LLONG_MIN, LLONG_MAX)
+# define ULLONG_WIDTH _GL_INTEGER_WIDTH (0, ULLONG_MAX)
+#endif /* !ULLONG_WIDTH && (_GNU_SOURCE || __STDC_WANT_IEC_60559_BFP_EXT__) */
+
+#endif /* _@GUARD_PREFIX@_LIMITS_H */
+#endif /* _@GUARD_PREFIX@_LIMITS_H */
diff --git a/lib/local.mk b/lib/local.mk
new file mode 100644
index 0000000..0d3562f
--- /dev/null
+++ b/lib/local.mk
@@ -0,0 +1,17 @@
+# Copyright 1997-2016 Free Software Foundation, Inc.
+#
+# This 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 <http://www.gnu.org/licenses/>.
+#
+
+include lib/gnulib.mk
diff --git a/lib/localcharset.c b/lib/localcharset.c
index 7401479..fa5fcbc 100644
--- a/lib/localcharset.c
+++ b/lib/localcharset.c
@@ -1,8 +1,6 @@
-/* -*- buffer-read-only: t -*- vi: set ro: */
-/* DO NOT EDIT! GENERATED AUTOMATICALLY! */
/* Determine a canonical name for the current locale's character encoding.
- Copyright (C) 2000-2006, 2008-2012 Free Software Foundation, Inc.
+ Copyright (C) 2000-2006, 2008-2016 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -36,6 +34,7 @@
#if defined _WIN32 || defined __WIN32__
# define WINDOWS_NATIVE
+# include <locale.h>
#endif
#if defined __EMX__
@@ -67,6 +66,11 @@
# include <os2.h>
#endif
+/* For MB_CUR_MAX_L */
+#if defined DARWIN7
+# include <xlocale.h>
+#endif
+
#if ENABLE_RELOCATABLE
# include "relocatable.h"
#else
@@ -124,7 +128,7 @@ get_charset_aliases (void)
cp = charset_aliases;
if (cp == NULL)
{
-#if !(defined DARWIN7 || defined VMS || defined WINDOWS_NATIVE || defined __CYGWIN__)
+#if !(defined DARWIN7 || defined VMS || defined WINDOWS_NATIVE || defined __CYGWIN__ || defined OS2)
const char *dir;
const char *base = "charset.alias";
char *file_name;
@@ -338,6 +342,36 @@ get_charset_aliases (void)
"CP54936" "\0" "GB18030" "\0"
"CP65001" "\0" "UTF-8" "\0";
# endif
+# if defined OS2
+ /* To avoid the troubles of installing a separate file in the same
+ directory as the DLL and of retrieving the DLL's directory at
+ runtime, simply inline the aliases here. */
+
+ /* The list of encodings is taken from "List of OS/2 Codepages"
+ 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>. */
+ cp = "CP813" "\0" "ISO-8859-7" "\0"
+ "CP878" "\0" "KOI8-R" "\0"
+ "CP819" "\0" "ISO-8859-1" "\0"
+ "CP912" "\0" "ISO-8859-2" "\0"
+ "CP913" "\0" "ISO-8859-3" "\0"
+ "CP914" "\0" "ISO-8859-4" "\0"
+ "CP915" "\0" "ISO-8859-5" "\0"
+ "CP916" "\0" "ISO-8859-8" "\0"
+ "CP920" "\0" "ISO-8859-9" "\0"
+ "CP921" "\0" "ISO-8859-13" "\0"
+ "CP923" "\0" "ISO-8859-15" "\0"
+ "CP954" "\0" "EUC-JP" "\0"
+ "CP964" "\0" "EUC-TW" "\0"
+ "CP970" "\0" "EUC-KR" "\0"
+ "CP1089" "\0" "ISO-8859-6" "\0"
+ "CP1208" "\0" "UTF-8" "\0"
+ "CP1381" "\0" "GB2312" "\0"
+ "CP1386" "\0" "GBK" "\0"
+ "CP3372" "\0" "EUC-JP" "\0";
+# endif
#endif
charset_aliases = cp;
@@ -458,14 +492,34 @@ locale_charset (void)
static char buf[2 + 10 + 1];
- /* The Windows API has a function returning the locale's codepage as a
- number: GetACP().
- When the output goes to a console window, it needs to be provided in
- GetOEMCP() encoding if the console is using a raster font, or in
- GetConsoleOutputCP() encoding if it is using a TrueType font.
- But in GUI programs and for output sent to files and pipes, GetACP()
- encoding is the best bet. */
- sprintf (buf, "CP%u", GetACP ());
+ /* The Windows API has a function returning the locale's codepage as
+ a number, but the value doesn't change according to what the
+ 'setlocale' call specified. So we use it as a last resort, in
+ case the string returned by 'setlocale' doesn't specify the
+ codepage. */
+ char *current_locale = setlocale (LC_ALL, NULL);
+ char *pdot;
+
+ /* If they set different locales for different categories,
+ 'setlocale' will return a semi-colon separated list of locale
+ values. To make sure we use the correct one, we choose LC_CTYPE. */
+ if (strchr (current_locale, ';'))
+ current_locale = setlocale (LC_CTYPE, NULL);
+
+ pdot = strrchr (current_locale, '.');
+ if (pdot && 2 + strlen (pdot + 1) + 1 <= sizeof (buf))
+ sprintf (buf, "CP%s", pdot + 1);
+ else
+ {
+ /* The Windows API has a function returning the locale's codepage as a
+ number: GetACP().
+ When the output goes to a console window, it needs to be provided in
+ GetOEMCP() encoding if the console is using a raster font, or in
+ GetConsoleOutputCP() encoding if it is using a TrueType font.
+ But in GUI programs and for output sent to files and pipes, GetACP()
+ encoding is the best bet. */
+ sprintf (buf, "CP%u", GetACP ());
+ }
codeset = buf;
#elif defined OS2
@@ -475,6 +529,8 @@ locale_charset (void)
ULONG cp[3];
ULONG cplen;
+ codeset = NULL;
+
/* Allow user to override the codeset, as set in the operating system,
with standard language environment variables. */
locale = getenv ("LC_ALL");
@@ -506,10 +562,12 @@ locale_charset (void)
}
}
- /* Resolve through the charset.alias file. */
- codeset = locale;
+ /* For the POSIX locale, don't use the system's codepage. */
+ if (strcmp (locale, "C") == 0 || strcmp (locale, "POSIX") == 0)
+ codeset = "";
}
- else
+
+ if (codeset == NULL)
{
/* OS/2 has a function returning the locale's codepage as a number. */
if (DosQueryCp (sizeof (cp), cp, &cplen))
@@ -547,7 +605,7 @@ locale_charset (void)
#ifdef DARWIN7
/* Mac OS X sets MB_CUR_MAX to 1 when LC_ALL=C, and "UTF-8"
(the default codeset) does not work when MB_CUR_MAX is 1. */
- if (strcmp (codeset, "UTF-8") == 0 && MB_CUR_MAX <= 1)
+ if (strcmp (codeset, "UTF-8") == 0 && MB_CUR_MAX_L (uselocale (NULL)) <= 1)
codeset = "ASCII";
#endif
diff --git a/lib/localcharset.h b/lib/localcharset.h
index 883f010..915182e 100644
--- a/lib/localcharset.h
+++ b/lib/localcharset.h
@@ -1,7 +1,5 @@
-/* -*- buffer-read-only: t -*- vi: set ro: */
-/* DO NOT EDIT! GENERATED AUTOMATICALLY! */
/* Determine a canonical name for the current locale's character encoding.
- Copyright (C) 2000-2003, 2009-2012 Free Software Foundation, Inc.
+ Copyright (C) 2000-2003, 2009-2016 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
diff --git a/lib/locale.in.h b/lib/locale.in.h
index 4d3c543..4083507 100644
--- a/lib/locale.in.h
+++ b/lib/locale.in.h
@@ -1,5 +1,5 @@
/* A POSIX <locale.h>.
- Copyright (C) 2007-2012 Free Software Foundation, Inc.
+ Copyright (C) 2007-2016 Free Software Foundation, Inc.
This 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,16 +14,30 @@
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. */
-#ifndef _@GUARD_PREFIX@_LOCALE_H
-
#if __GNUC__ >= 3
@PRAGMA_SYSTEM_HEADER@
#endif
@PRAGMA_COLUMNS@
+#ifdef _GL_ALREADY_INCLUDING_LOCALE_H
+
+/* Special invocation conventions to handle Solaris header files
+ (through Solaris 10) when combined with gettext's libintl.h. */
+
+#@INCLUDE_NEXT@ @NEXT_LOCALE_H@
+
+#else
+/* Normal invocation convention. */
+
+#ifndef _@GUARD_PREFIX@_LOCALE_H
+
+#define _GL_ALREADY_INCLUDING_LOCALE_H
+
/* The include_next requires a split double-inclusion guard. */
#@INCLUDE_NEXT@ @NEXT_LOCALE_H@
+#undef _GL_ALREADY_INCLUDING_LOCALE_H
+
#ifndef _@GUARD_PREFIX@_LOCALE_H
#define _@GUARD_PREFIX@_LOCALE_H
@@ -198,4 +212,5 @@ _GL_WARN_ON_USE (duplocale, "duplocale is buggy on some glibc systems - "
#endif
#endif /* _@GUARD_PREFIX@_LOCALE_H */
+#endif /* ! _GL_ALREADY_INCLUDING_LOCALE_H */
#endif /* _@GUARD_PREFIX@_LOCALE_H */
diff --git a/lib/localeconv.c b/lib/localeconv.c
index 2c91b37..8a1d6d7 100644
--- a/lib/localeconv.c
+++ b/lib/localeconv.c
@@ -1,5 +1,5 @@
/* Query locale dependent information for formatting numbers.
- Copyright (C) 2012 Free Software Foundation, Inc.
+ Copyright (C) 2012-2016 Free Software Foundation, Inc.
This 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.c b/lib/localeinfo.c
new file mode 100644
index 0000000..ca96afc
--- /dev/null
+++ b/lib/localeinfo.c
@@ -0,0 +1,113 @@
+/* locale information
+
+ Copyright 2016 Free Software Foundation, Inc.
+
+ This 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, write to the Free Software
+ Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
+ 02110-1301, USA. */
+
+/* Written by Paul Eggert. */
+
+#include <config.h>
+
+#include <localeinfo.h>
+
+#include <verify.h>
+
+#include <limits.h>
+#include <locale.h>
+#include <stdlib.h>
+#include <string.h>
+#include <wctype.h>
+
+/* The sbclen implementation relies on this. */
+verify (MB_LEN_MAX <= SCHAR_MAX);
+
+/* Return true if the locale uses UTF-8. */
+
+static bool
+is_using_utf8 (void)
+{
+ wchar_t wc;
+ mbstate_t mbs = {0};
+ return mbrtowc (&wc, "\xc4\x80", 2, &mbs) == 2 && wc == 0x100;
+}
+
+/* Initialize *LOCALEINFO from the current locale. */
+
+void
+init_localeinfo (struct localeinfo *localeinfo)
+{
+ int i;
+
+ localeinfo->multibyte = MB_CUR_MAX > 1;
+ localeinfo->using_utf8 = is_using_utf8 ();
+
+ for (i = CHAR_MIN; i <= CHAR_MAX; i++)
+ {
+ char c = i;
+ unsigned char uc = i;
+ mbstate_t s = {0};
+ wchar_t wc;
+ size_t len = mbrtowc (&wc, &c, 1, &s);
+ localeinfo->sbclen[uc] = len <= 1 ? 1 : - (int) - len;
+ localeinfo->sbctowc[uc] = len <= 1 ? wc : WEOF;
+ }
+}
+
+/* The set of wchar_t values C such that there's a useful locale
+ somewhere where C != towupper (C) && C != towlower (towupper (C)).
+ For example, 0x00B5 (U+00B5 MICRO SIGN) is in this table, because
+ towupper (0x00B5) == 0x039C (U+039C GREEK CAPITAL LETTER MU), and
+ towlower (0x039C) == 0x03BC (U+03BC GREEK SMALL LETTER MU). */
+static short const lonesome_lower[] =
+ {
+ 0x00B5, 0x0131, 0x017F, 0x01C5, 0x01C8, 0x01CB, 0x01F2, 0x0345,
+ 0x03C2, 0x03D0, 0x03D1, 0x03D5, 0x03D6, 0x03F0, 0x03F1,
+
+ /* U+03F2 GREEK LUNATE SIGMA SYMBOL lacks a specific uppercase
+ counterpart in locales predating Unicode 4.0.0 (April 2003). */
+ 0x03F2,
+
+ 0x03F5, 0x1E9B, 0x1FBE,
+ };
+
+/* Verify that the worst case fits. This is 1 for towupper, 1 for
+ towlower, and 1 for each entry in LONESOME_LOWER. */
+verify (1 + 1 + sizeof lonesome_lower / sizeof *lonesome_lower
+ <= CASE_FOLDED_BUFSIZE);
+
+/* Find the characters equal to C after case-folding, other than C
+ itself, and store them into FOLDED. Return the number of characters
+ stored. */
+
+int
+case_folded_counterparts (wchar_t c, wchar_t folded[CASE_FOLDED_BUFSIZE])
+{
+ int i;
+ int n = 0;
+ wint_t uc = towupper (c);
+ wint_t lc = towlower (uc);
+ if (uc != c)
+ folded[n++] = uc;
+ if (lc != uc && lc != c && towupper (lc) == uc)
+ folded[n++] = lc;
+ for (i = 0; i < sizeof lonesome_lower / sizeof *lonesome_lower; i++)
+ {
+ wint_t li = lonesome_lower[i];
+ if (li != lc && li != uc && li != c && towupper (li) == uc)
+ folded[n++] = li;
+ }
+ return n;
+}
diff --git a/lib/localeinfo.h b/lib/localeinfo.h
new file mode 100644
index 0000000..cf2f9a6
--- /dev/null
+++ b/lib/localeinfo.h
@@ -0,0 +1,54 @@
+/* locale information
+
+ Copyright 2016 Free Software Foundation, Inc.
+
+ This 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, write to the Free Software
+ Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
+ 02110-1301, USA. */
+
+/* Written by Paul Eggert. */
+
+#include <limits.h>
+#include <stdbool.h>
+#include <wchar.h>
+
+struct localeinfo
+{
+ /* MB_CUR_MAX > 1. */
+ bool multibyte;
+
+ /* The locale uses UTF-8. */
+ bool using_utf8;
+
+ /* An array indexed by byte values B that contains 1 if B is a
+ single-byte character, -1 if B is an encoding error, and -2 if B
+ is the leading byte of a multibyte character that contains more
+ than one byte. */
+ signed char sbclen[UCHAR_MAX + 1];
+
+ /* An array indexed by byte values B that contains the corresponding
+ wide character (if any) for B if sbclen[B] == 1. WEOF means the
+ byte is not a valid single-byte character, i.e., sbclen[B] == -1
+ or -2. */
+ wint_t sbctowc[UCHAR_MAX + 1];
+};
+
+extern void init_localeinfo (struct localeinfo *);
+
+/* Maximum number of characters that can be the case-folded
+ counterparts of a single character, not counting the character
+ itself. This is a generous upper bound. */
+enum { CASE_FOLDED_BUFSIZE = 32 };
+
+extern int case_folded_counterparts (wchar_t, wchar_t[CASE_FOLDED_BUFSIZE]);
diff --git a/lib/lstat.c b/lib/lstat.c
index 97fe6bb..03b0634 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-2012 Free Software Foundation, Inc.
+ Copyright (C) 1997-2006, 2008-2016 Free Software Foundation, Inc.
This 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/malloc.c b/lib/malloc.c
index 5d05f9f..e9b01d2 100644
--- a/lib/malloc.c
+++ b/lib/malloc.c
@@ -1,8 +1,6 @@
-/* -*- buffer-read-only: t -*- vi: set ro: */
-/* DO NOT EDIT! GENERATED AUTOMATICALLY! */
/* malloc() function that is glibc compatible.
- Copyright (C) 1997-1998, 2006-2007, 2009-2012 Free Software Foundation, Inc.
+ Copyright (C) 1997-1998, 2006-2007, 2009-2016 Free Software Foundation, Inc.
This 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/malloca.c b/lib/malloca.c
index e6071f5..a613277 100644
--- a/lib/malloca.c
+++ b/lib/malloca.c
@@ -1,7 +1,5 @@
-/* -*- buffer-read-only: t -*- vi: set ro: */
-/* DO NOT EDIT! GENERATED AUTOMATICALLY! */
/* Safe automatic memory allocation.
- Copyright (C) 2003, 2006-2007, 2009-2012 Free Software Foundation, Inc.
+ Copyright (C) 2003, 2006-2007, 2009-2016 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2003.
This program is free software; you can redistribute it and/or modify
@@ -51,12 +49,18 @@
#define MAGIC_SIZE sizeof (int)
/* This is how the header info would look like without any alignment
considerations. */
-struct preliminary_header { void *next; char room[MAGIC_SIZE]; };
+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)
-struct header { void *next; char room[HEADER_SIZE - sizeof (struct preliminary_header) + MAGIC_SIZE]; };
-verify (HEADER_SIZE == sizeof (struct header));
+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
@@ -76,20 +80,21 @@ mmalloca (size_t n)
if (nplus >= n)
{
- char *p = (char *) malloc (nplus);
+ void *p = malloc (nplus);
if (p != NULL)
{
size_t slot;
+ union header *h = p;
- p += HEADER_SIZE;
+ p = h + 1;
/* Put a magic number into the indicator word. */
- ((int *) p)[-1] = MAGIC_NUMBER;
+ h->magic.word = MAGIC_NUMBER;
/* Enter p into the hash table. */
slot = (uintptr_t) p % HASH_TABLE_SIZE;
- ((struct header *) (p - HEADER_SIZE))->next = mmalloca_results[slot];
+ h->next = mmalloca_results[slot];
mmalloca_results[slot] = p;
return p;
@@ -125,15 +130,17 @@ freea (void *p)
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. */
- char *p_begin = (char *) p - HEADER_SIZE;
- *chain = ((struct header *) p_begin)->next;
+ union header *p_begin = h - 1;
+ *chain = p_begin->next;
free (p_begin);
return;
}
- chain = &((struct header *) ((char *) *chain - HEADER_SIZE))->next;
+ h = *chain;
+ chain = &h[-1].next;
}
}
/* At this point, we know it was not a mmalloca() result. */
diff --git a/lib/malloca.h b/lib/malloca.h
index aeea648..7996d1b 100644
--- a/lib/malloca.h
+++ b/lib/malloca.h
@@ -1,7 +1,5 @@
-/* -*- buffer-read-only: t -*- vi: set ro: */
-/* DO NOT EDIT! GENERATED AUTOMATICALLY! */
/* Safe automatic memory allocation.
- Copyright (C) 2003-2007, 2009-2012 Free Software Foundation, Inc.
+ Copyright (C) 2003-2007, 2009-2016 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2003.
This program is free software; you can redistribute it and/or modify
@@ -23,6 +21,9 @@
#include <alloca.h>
#include <stddef.h>
#include <stdlib.h>
+#include <stdint.h>
+
+#include "xalloc-oversized.h"
#ifdef __cplusplus
@@ -75,15 +76,7 @@ extern void freea (void *p);
It allocates an array of N objects, each with S bytes of memory,
on the stack. S must be positive and N must be nonnegative.
The array must be freed using freea() before the function returns. */
-#if 1
-/* Cf. the definition of xalloc_oversized. */
-# define nmalloca(n, s) \
- ((n) > (size_t) (sizeof (ptrdiff_t) <= sizeof (size_t) ? -1 : -2) / (s) \
- ? NULL \
- : malloca ((n) * (s)))
-#else
-extern void * nmalloca (size_t n, size_t s);
-#endif
+#define nmalloca(n, s) (xalloc_oversized (n, s) ? NULL : malloca ((n) * (s)))
#ifdef __cplusplus
@@ -94,7 +87,7 @@ extern void * nmalloca (size_t n, size_t s);
/* ------------------- Auxiliary, non-public definitions ------------------- */
/* Determine the alignment of a type at compile time. */
-#if defined __GNUC__
+#if defined __GNUC__ || defined __IBM__ALIGNOF__
# define sa_alignof __alignof__
#elif defined __cplusplus
template <class type> struct sa_alignof_helper { char __slot1; type __slot2; };
diff --git a/lib/mbrlen.c b/lib/mbrlen.c
index f52e760..3ceb156 100644
--- a/lib/mbrlen.c
+++ b/lib/mbrlen.c
@@ -1,5 +1,5 @@
/* Recognize multibyte character.
- Copyright (C) 1999-2000, 2008-2012 Free Software Foundation, Inc.
+ Copyright (C) 1999-2000, 2008-2016 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2008.
This program is free software: you can redistribute it and/or modify
diff --git a/lib/mbrtowc.c b/lib/mbrtowc.c
index e3f354b..cdd874b 100644
--- a/lib/mbrtowc.c
+++ b/lib/mbrtowc.c
@@ -1,5 +1,5 @@
/* Convert multibyte character to wide character.
- Copyright (C) 1999-2002, 2005-2012 Free Software Foundation, Inc.
+ Copyright (C) 1999-2002, 2005-2016 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2008.
This program is free software: you can redistribute it and/or modify
@@ -20,6 +20,11 @@
/* Specification. */
#include <wchar.h>
+#if C_LOCALE_MAYBE_EILSEQ
+# include "hard-locale.h"
+# include <locale.h>
+#endif
+
#if GNULIB_defined_mbstate_t
/* Implement mbrtowc() on top of mbtowc(). */
@@ -328,7 +333,10 @@ mbrtowc (wchar_t *pwc, const char *s, size_t n, mbstate_t *ps)
size_t
rpl_mbrtowc (wchar_t *pwc, const char *s, size_t n, mbstate_t *ps)
{
-# if MBRTOWC_NULL_ARG2_BUG || MBRTOWC_RETVAL_BUG
+ size_t ret;
+ wchar_t wc;
+
+# if MBRTOWC_NULL_ARG2_BUG || MBRTOWC_RETVAL_BUG || MBRTOWC_EMPTY_INPUT_BUG
if (s == NULL)
{
pwc = NULL;
@@ -337,6 +345,14 @@ rpl_mbrtowc (wchar_t *pwc, const char *s, size_t n, mbstate_t *ps)
}
# endif
+# if MBRTOWC_EMPTY_INPUT_BUG
+ if (n == 0)
+ return (size_t) -2;
+# endif
+
+ if (! pwc)
+ pwc = &wc;
+
# if MBRTOWC_RETVAL_BUG
{
static mbstate_t internal_state;
@@ -352,8 +368,7 @@ rpl_mbrtowc (wchar_t *pwc, const char *s, size_t n, mbstate_t *ps)
size_t count = 0;
for (; n > 0; s++, n--)
{
- wchar_t wc;
- size_t ret = mbrtowc (&wc, s, 1, ps);
+ ret = mbrtowc (&wc, s, 1, ps);
if (ret == (size_t)(-1))
return (size_t)(-1);
@@ -361,8 +376,7 @@ rpl_mbrtowc (wchar_t *pwc, const char *s, size_t n, mbstate_t *ps)
if (ret != (size_t)(-2))
{
/* The multibyte character has been completed. */
- if (pwc != NULL)
- *pwc = wc;
+ *pwc = wc;
return (wc == 0 ? 0 : count);
}
}
@@ -371,32 +385,23 @@ rpl_mbrtowc (wchar_t *pwc, const char *s, size_t n, mbstate_t *ps)
}
# endif
-# if MBRTOWC_NUL_RETVAL_BUG
- {
- wchar_t wc;
- size_t ret = mbrtowc (&wc, s, n, ps);
-
- if (ret != (size_t)(-1) && ret != (size_t)(-2))
- {
- if (pwc != NULL)
- *pwc = wc;
- if (wc == 0)
- ret = 0;
- }
- return ret;
- }
-# else
- {
-# if MBRTOWC_NULL_ARG1_BUG
- wchar_t dummy;
+ ret = mbrtowc (pwc, s, n, ps);
- if (pwc == NULL)
- pwc = &dummy;
-# endif
+# if MBRTOWC_NUL_RETVAL_BUG
+ if (ret < (size_t) -2 && !*pwc)
+ return 0;
+# endif
- return mbrtowc (pwc, s, n, ps);
- }
+# if C_LOCALE_MAYBE_EILSEQ
+ if ((size_t) -2 <= ret && n != 0 && ! hard_locale (LC_CTYPE))
+ {
+ unsigned char uc = *s;
+ *pwc = uc;
+ return 1;
+ }
# endif
+
+ return ret;
}
#endif
diff --git a/lib/mbsinit.c b/lib/mbsinit.c
index 638142e..372b523 100644
--- a/lib/mbsinit.c
+++ b/lib/mbsinit.c
@@ -1,5 +1,5 @@
/* Test for initial conversion state.
- Copyright (C) 2008-2012 Free Software Foundation, Inc.
+ Copyright (C) 2008-2016 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2008.
This program is free software: you can redistribute it and/or modify
diff --git a/lib/mbtowc-impl.h b/lib/mbtowc-impl.h
index bb75ed2..4be2994 100644
--- a/lib/mbtowc-impl.h
+++ b/lib/mbtowc-impl.h
@@ -1,5 +1,5 @@
/* Convert multibyte character to wide character.
- Copyright (C) 2011-2012 Free Software Foundation, Inc.
+ Copyright (C) 2011-2016 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2011.
This program is free software: you can redistribute it and/or modify
diff --git a/lib/mbtowc.c b/lib/mbtowc.c
index 97eab4e..fb2b651 100644
--- a/lib/mbtowc.c
+++ b/lib/mbtowc.c
@@ -1,5 +1,5 @@
/* Convert multibyte character to wide character.
- Copyright (C) 2011-2012 Free Software Foundation, Inc.
+ Copyright (C) 2011-2016 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2011.
This program is free software: you can redistribute it and/or modify
diff --git a/lib/memchr.c b/lib/memchr.c
index b8fb0ef..b565542 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-2012
+/* Copyright (C) 1991, 1993, 1996-1997, 1999-2000, 2003-2004, 2006, 2008-2016
Free Software Foundation, Inc.
Based on strlen implementation by Torbjorn Granlund (tege@sics.se),
diff --git a/lib/memrchr.c b/lib/memrchr.c
new file mode 100644
index 0000000..e6212e5
--- /dev/null
+++ b/lib/memrchr.c
@@ -0,0 +1,161 @@
+/* memrchr -- find the last occurrence of a byte in a memory block
+
+ Copyright (C) 1991, 1993, 1996-1997, 1999-2000, 2003-2016 Free Software
+ Foundation, Inc.
+
+ Based on strlen implementation by Torbjorn Granlund (tege@sics.se),
+ with help from Dan Sahlin (dan@sics.se) and
+ commentary by Jim Blandy (jimb@ai.mit.edu);
+ adaptation to memchr suggested by Dick Karpinski (dick@cca.ucsf.edu),
+ and implemented by Roland McGrath (roland@ai.mit.edu).
+
+ This 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/>. */
+
+#if defined _LIBC
+# include <memcopy.h>
+#else
+# include <config.h>
+# define reg_char char
+#endif
+
+#include <string.h>
+#include <limits.h>
+
+#undef __memrchr
+#ifdef _LIBC
+# undef memrchr
+#endif
+
+#ifndef weak_alias
+# define __memrchr memrchr
+#endif
+
+/* Search no more than N bytes of S for C. */
+void *
+__memrchr (void const *s, int c_in, size_t n)
+{
+ /* On 32-bit hardware, choosing longword to be a 32-bit unsigned
+ long instead of a 64-bit uintmax_t tends to give better
+ performance. On 64-bit hardware, unsigned long is generally 64
+ bits already. Change this typedef to experiment with
+ performance. */
+ typedef unsigned long int longword;
+
+ const unsigned char *char_ptr;
+ const longword *longword_ptr;
+ longword repeated_one;
+ longword repeated_c;
+ unsigned reg_char c;
+
+ c = (unsigned char) c_in;
+
+ /* Handle the last few bytes by reading one byte at a time.
+ Do this until CHAR_PTR is aligned on a longword boundary. */
+ for (char_ptr = (const unsigned char *) s + n;
+ n > 0 && (size_t) char_ptr % sizeof (longword) != 0;
+ --n)
+ if (*--char_ptr == c)
+ return (void *) char_ptr;
+
+ longword_ptr = (const longword *) char_ptr;
+
+ /* All these elucidatory comments refer to 4-byte longwords,
+ but the theory applies equally well to any size longwords. */
+
+ /* Compute auxiliary longword values:
+ repeated_one is a value which has a 1 in every byte.
+ repeated_c has c in every byte. */
+ repeated_one = 0x01010101;
+ repeated_c = c | (c << 8);
+ repeated_c |= repeated_c << 16;
+ if (0xffffffffU < (longword) -1)
+ {
+ repeated_one |= repeated_one << 31 << 1;
+ repeated_c |= repeated_c << 31 << 1;
+ if (8 < sizeof (longword))
+ {
+ size_t i;
+
+ for (i = 64; i < sizeof (longword) * 8; i *= 2)
+ {
+ repeated_one |= repeated_one << i;
+ repeated_c |= repeated_c << i;
+ }
+ }
+ }
+
+ /* Instead of the traditional loop which tests each byte, we will test a
+ longword at a time. The tricky part is testing if *any of the four*
+ bytes in the longword in question are equal to c. We first use an xor
+ with repeated_c. This reduces the task to testing whether *any of the
+ four* bytes in longword1 is zero.
+
+ We compute tmp =
+ ((longword1 - repeated_one) & ~longword1) & (repeated_one << 7).
+ That is, we perform the following operations:
+ 1. Subtract repeated_one.
+ 2. & ~longword1.
+ 3. & a mask consisting of 0x80 in every byte.
+ Consider what happens in each byte:
+ - If a byte of longword1 is zero, step 1 and 2 transform it into 0xff,
+ and step 3 transforms it into 0x80. A carry can also be propagated
+ to more significant bytes.
+ - If a byte of longword1 is nonzero, let its lowest 1 bit be at
+ position k (0 <= k <= 7); so the lowest k bits are 0. After step 1,
+ the byte ends in a single bit of value 0 and k bits of value 1.
+ After step 2, the result is just k bits of value 1: 2^k - 1. After
+ step 3, the result is 0. And no carry is produced.
+ So, if longword1 has only non-zero bytes, tmp is zero.
+ Whereas if longword1 has a zero byte, call j the position of the least
+ significant zero byte. Then the result has a zero at positions 0, ...,
+ j-1 and a 0x80 at position j. We cannot predict the result at the more
+ significant bytes (positions j+1..3), but it does not matter since we
+ already have a non-zero bit at position 8*j+7.
+
+ So, the test whether any byte in longword1 is zero is equivalent to
+ testing whether tmp is nonzero. */
+
+ while (n >= sizeof (longword))
+ {
+ longword longword1 = *--longword_ptr ^ repeated_c;
+
+ if ((((longword1 - repeated_one) & ~longword1)
+ & (repeated_one << 7)) != 0)
+ {
+ longword_ptr++;
+ break;
+ }
+ n -= sizeof (longword);
+ }
+
+ char_ptr = (const unsigned char *) longword_ptr;
+
+ /* At this point, we know that either n < sizeof (longword), or one of the
+ sizeof (longword) bytes starting at char_ptr is == c. On little-endian
+ machines, we could determine the first such byte without any further
+ memory accesses, just by looking at the tmp result from the last loop
+ iteration. But this does not work on big-endian machines. Choose code
+ that works in both cases. */
+
+ while (n-- > 0)
+ {
+ if (*--char_ptr == c)
+ return (void *) char_ptr;
+ }
+
+ return NULL;
+}
+#ifdef weak_alias
+weak_alias (__memrchr, memrchr)
+#endif
diff --git a/lib/minmax.h b/lib/minmax.h
new file mode 100644
index 0000000..be6b321
--- /dev/null
+++ b/lib/minmax.h
@@ -0,0 +1,60 @@
+/* MIN, MAX macros.
+ Copyright (C) 1995, 1998, 2001, 2003, 2005, 2009-2016 Free Software
+ Foundation, Inc.
+
+ This 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 <http://www.gnu.org/licenses/>. */
+
+#ifndef _MINMAX_H
+#define _MINMAX_H
+
+/* Note: MIN, MAX are also defined in <sys/param.h> on some systems
+ (glibc, IRIX, HP-UX, OSF/1). Therefore you might get warnings about
+ MIN, MAX macro redefinitions on some systems; the workaround is to
+ #include this file as the last one among the #include list. */
+
+/* Before we define the following symbols we get the <limits.h> file
+ since otherwise we get redefinitions on some systems if <limits.h> is
+ included after this file. Likewise for <sys/param.h>.
+ If more than one of these system headers define MIN and MAX, pick just
+ one of the headers (because the definitions most likely are the same). */
+#if HAVE_MINMAX_IN_LIMITS_H
+# include <limits.h>
+#elif HAVE_MINMAX_IN_SYS_PARAM_H
+# include <sys/param.h>
+#endif
+
+/* Note: MIN and MAX should be used with two arguments of the
+ same type. They might not return the minimum and maximum of their two
+ arguments, if the arguments have different types or have unusual
+ floating-point values. For example, on a typical host with 32-bit 'int',
+ 64-bit 'long long', and 64-bit IEEE 754 'double' types:
+
+ MAX (-1, 2147483648) returns 4294967295.
+ MAX (9007199254740992.0, 9007199254740993) returns 9007199254740992.0.
+ MAX (NaN, 0.0) returns 0.0.
+ MAX (+0.0, -0.0) returns -0.0.
+
+ and in each case the answer is in some sense bogus. */
+
+/* MAX(a,b) returns the maximum of A and B. */
+#ifndef MAX
+# define MAX(a,b) ((a) > (b) ? (a) : (b))
+#endif
+
+/* MIN(a,b) returns the minimum of A and B. */
+#ifndef MIN
+# define MIN(a,b) ((a) < (b) ? (a) : (b))
+#endif
+
+#endif /* _MINMAX_H */
diff --git a/lib/mkostemp.c b/lib/mkostemp.c
index b769087..31c3e48 100644
--- a/lib/mkostemp.c
+++ b/lib/mkostemp.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1998-1999, 2001, 2005-2007, 2009-2012 Free Software
+/* Copyright (C) 1998-1999, 2001, 2005-2007, 2009-2016 Free Software
Foundation, Inc.
This file is derived from the one in the GNU C Library.
diff --git a/lib/msvc-inval.c b/lib/msvc-inval.c
index fb59d3a..baaf39e 100644
--- a/lib/msvc-inval.c
+++ b/lib/msvc-inval.c
@@ -1,7 +1,5 @@
-/* -*- buffer-read-only: t -*- vi: set ro: */
-/* DO NOT EDIT! GENERATED AUTOMATICALLY! */
/* Invalid parameter handler for MSVC runtime libraries.
- Copyright (C) 2011-2012 Free Software Foundation, Inc.
+ Copyright (C) 2011-2016 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -30,7 +28,7 @@
# if MSVC_INVALID_PARAMETER_HANDLING == DEFAULT_HANDLING
-static void cdecl
+static void __cdecl
gl_msvc_invalid_parameter_handler (const wchar_t *expression,
const wchar_t *function,
const wchar_t *file,
@@ -47,7 +45,7 @@ gl_msvc_invalid_parameter_handler (const wchar_t *expression,
# if defined _MSC_VER
-static void cdecl
+static void __cdecl
gl_msvc_invalid_parameter_handler (const wchar_t *expression,
const wchar_t *function,
const wchar_t *file,
@@ -96,7 +94,7 @@ gl_msvc_inval_current (void)
}
}
-static void cdecl
+static void __cdecl
gl_msvc_invalid_parameter_handler (const wchar_t *expression,
const wchar_t *function,
const wchar_t *file,
diff --git a/lib/msvc-inval.h b/lib/msvc-inval.h
index 524ea50..027c949 100644
--- a/lib/msvc-inval.h
+++ b/lib/msvc-inval.h
@@ -1,7 +1,5 @@
-/* -*- buffer-read-only: t -*- vi: set ro: */
-/* DO NOT EDIT! GENERATED AUTOMATICALLY! */
/* Invalid parameter handler for MSVC runtime libraries.
- Copyright (C) 2011-2012 Free Software Foundation, Inc.
+ Copyright (C) 2011-2016 Free Software Foundation, Inc.
This 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/msvc-nothrow.c b/lib/msvc-nothrow.c
index e7538f8..ba75bbf 100644
--- a/lib/msvc-nothrow.c
+++ b/lib/msvc-nothrow.c
@@ -1,8 +1,6 @@
-/* -*- buffer-read-only: t -*- vi: set ro: */
-/* DO NOT EDIT! GENERATED AUTOMATICALLY! */
/* Wrappers that don't throw invalid parameter notifications
with MSVC runtime libraries.
- Copyright (C) 2011-2012 Free Software Foundation, Inc.
+ Copyright (C) 2011-2016 Free Software Foundation, Inc.
This 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/msvc-nothrow.h b/lib/msvc-nothrow.h
index 241b093..3493b84 100644
--- a/lib/msvc-nothrow.h
+++ b/lib/msvc-nothrow.h
@@ -1,8 +1,6 @@
-/* -*- buffer-read-only: t -*- vi: set ro: */
-/* DO NOT EDIT! GENERATED AUTOMATICALLY! */
/* Wrappers that don't throw invalid parameter notifications
with MSVC runtime libraries.
- Copyright (C) 2011-2012 Free Software Foundation, Inc.
+ Copyright (C) 2011-2016 Free Software Foundation, Inc.
This 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/nl_langinfo.c b/lib/nl_langinfo.c
index c73c769..11da646 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-2012 Free Software Foundation, Inc.
+ Copyright (C) 2007-2016 Free Software Foundation, Inc.
This 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,13 +20,71 @@
/* Specification. */
#include <langinfo.h>
+#include <locale.h>
+#include <string.h>
+#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
+# define WIN32_LEAN_AND_MEAN /* avoid including junk */
+# include <windows.h>
+# include <stdio.h>
+#endif
+
+/* Return the codeset of the current locale, if this is easily deducible.
+ Otherwise, return "". */
+static char *
+ctype_codeset (void)
+{
+ static char buf[2 + 10 + 1];
+ char const *locale = setlocale (LC_CTYPE, NULL);
+ char *codeset = buf;
+ size_t codesetlen;
+ codeset[0] = '\0';
+
+ if (locale && locale[0])
+ {
+ /* If the locale name contains an encoding after the dot, return it. */
+ char *dot = strchr (locale, '.');
+
+ if (dot)
+ {
+ /* Look for the possible @... trailer and remove it, if any. */
+ char *codeset_start = dot + 1;
+ char const *modifier = strchr (codeset_start, '@');
+
+ if (! modifier)
+ codeset = codeset_start;
+ else
+ {
+ codesetlen = modifier - codeset_start;
+ if (codesetlen < sizeof buf)
+ {
+ codeset = memcpy (buf, codeset_start, codesetlen);
+ codeset[codesetlen] = '\0';
+ }
+ }
+ }
+ }
+
+#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
+ this doesn't change according to what the 'setlocale' call specified).
+ Either way, prepend "CP" to make it a valid codeset name. */
+ codesetlen = strlen (codeset);
+ if (0 < codesetlen && codesetlen < sizeof buf - 2)
+ memmove (buf + 2, codeset, codesetlen + 1);
+ else
+ sprintf (buf + 2, "%u", GetACP ());
+ codeset = memcpy (buf, "CP", 2);
+#endif
+ return codeset;
+}
+
+
#if REPLACE_NL_LANGINFO
/* Override nl_langinfo with support for added nl_item values. */
-# include <locale.h>
-# include <string.h>
-
# undef nl_langinfo
char *
@@ -36,47 +94,18 @@ rpl_nl_langinfo (nl_item item)
{
# if GNULIB_defined_CODESET
case CODESET:
- {
- const char *locale;
- static char buf[2 + 10 + 1];
-
- locale = setlocale (LC_CTYPE, NULL);
- if (locale != NULL && locale[0] != '\0')
- {
- /* If the locale name contains an encoding after the dot, return
- it. */
- const char *dot = strchr (locale, '.');
-
- if (dot != NULL)
- {
- const char *modifier;
-
- dot++;
- /* Look for the possible @... trailer and remove it, if any. */
- modifier = strchr (dot, '@');
- if (modifier == NULL)
- return dot;
- if (modifier - dot < sizeof (buf))
- {
- memcpy (buf, dot, modifier - dot);
- buf [modifier - dot] = '\0';
- return buf;
- }
- }
- }
- return "";
- }
+ return ctype_codeset ();
# endif
# if GNULIB_defined_T_FMT_AMPM
case T_FMT_AMPM:
- return "%I:%M:%S %p";
+ return (char *) "%I:%M:%S %p";
# endif
# if GNULIB_defined_ERA
case ERA:
/* The format is not standardized. In glibc it is a sequence of strings
of the form "direction:offset:start_date:end_date:era_name:era_format"
with an empty string at the end. */
- return "";
+ return (char *) "";
case ERA_D_FMT:
/* The %Ex conversion in strftime behaves like %x if the locale does not
have an alternative time format. */
@@ -95,13 +124,13 @@ rpl_nl_langinfo (nl_item item)
case ALT_DIGITS:
/* The format is not standardized. In glibc it is a sequence of 10
strings, appended in memory. */
- return "\0\0\0\0\0\0\0\0\0\0";
+ return (char *) "\0\0\0\0\0\0\0\0\0\0";
# endif
# if GNULIB_defined_YESEXPR || !FUNC_NL_LANGINFO_YESEXPR_WORKS
case YESEXPR:
- return "^[yY]";
+ return (char *) "^[yY]";
case NOEXPR:
- return "^[nN]";
+ return (char *) "^[nN]";
# endif
default:
break;
@@ -111,160 +140,181 @@ rpl_nl_langinfo (nl_item item)
#else
-/* Provide nl_langinfo from scratch. */
-
-# if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
+/* Provide nl_langinfo from scratch, either for native MS-Windows, or
+ for old Unix platforms without locales, such as Linux libc5 or
+ BeOS. */
-/* Native Windows platforms. */
-
-# define WIN32_LEAN_AND_MEAN /* avoid including junk */
-# include <windows.h>
-
-# include <stdio.h>
-
-# else
-
-/* An old Unix platform without locales, such as Linux libc5 or BeOS. */
-
-# endif
-
-# include <locale.h>
+# include <time.h>
char *
nl_langinfo (nl_item item)
{
+ static char nlbuf[100];
+ struct tm tmm = { 0 };
+
switch (item)
{
/* nl_langinfo items of the LC_CTYPE category */
case CODESET:
-# if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
{
- static char buf[2 + 10 + 1];
-
- /* The Windows API has a function returning the locale's codepage as
- a number. */
- sprintf (buf, "CP%u", GetACP ());
- return buf;
+ char *codeset = ctype_codeset ();
+ if (*codeset)
+ return codeset;
}
-# elif defined __BEOS__
- return "UTF-8";
+# ifdef __BEOS__
+ return (char *) "UTF-8";
# else
- return "ISO-8859-1";
+ return (char *) "ISO-8859-1";
# endif
/* nl_langinfo items of the LC_NUMERIC category */
case RADIXCHAR:
return localeconv () ->decimal_point;
case THOUSEP:
return localeconv () ->thousands_sep;
+ case GROUPING:
+ return localeconv () ->grouping;
/* nl_langinfo items of the LC_TIME category.
TODO: Really use the locale. */
case D_T_FMT:
case ERA_D_T_FMT:
- return "%a %b %e %H:%M:%S %Y";
+ return (char *) "%a %b %e %H:%M:%S %Y";
case D_FMT:
case ERA_D_FMT:
- return "%m/%d/%y";
+ return (char *) "%m/%d/%y";
case T_FMT:
case ERA_T_FMT:
- return "%H:%M:%S";
+ return (char *) "%H:%M:%S";
case T_FMT_AMPM:
- return "%I:%M:%S %p";
+ return (char *) "%I:%M:%S %p";
case AM_STR:
- return "AM";
+ if (!strftime (nlbuf, sizeof nlbuf, "%p", &tmm))
+ return (char *) "AM";
+ return nlbuf;
case PM_STR:
- return "PM";
+ tmm.tm_hour = 12;
+ if (!strftime (nlbuf, sizeof nlbuf, "%p", &tmm))
+ return (char *) "PM";
+ return nlbuf;
case DAY_1:
- return "Sunday";
case DAY_2:
- return "Monday";
case DAY_3:
- return "Tuesday";
case DAY_4:
- return "Wednesday";
case DAY_5:
- return "Thursday";
case DAY_6:
- return "Friday";
case DAY_7:
- return "Saturday";
+ {
+ static char const days[][sizeof "Wednesday"] = {
+ "Sunday", "Monday", "Tuesday", "Wednesday", "Thursday",
+ "Friday", "Saturday"
+ };
+ tmm.tm_wday = item - DAY_1;
+ if (!strftime (nlbuf, sizeof nlbuf, "%A", &tmm))
+ return (char *) days[item - DAY_1];
+ return nlbuf;
+ }
case ABDAY_1:
- return "Sun";
case ABDAY_2:
- return "Mon";
case ABDAY_3:
- return "Tue";
case ABDAY_4:
- return "Wed";
case ABDAY_5:
- return "Thu";
case ABDAY_6:
- return "Fri";
case ABDAY_7:
- return "Sat";
+ {
+ static char const abdays[][sizeof "Sun"] = {
+ "Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"
+ };
+ tmm.tm_wday = item - ABDAY_1;
+ if (!strftime (nlbuf, sizeof nlbuf, "%a", &tmm))
+ return (char *) abdays[item - ABDAY_1];
+ return nlbuf;
+ }
case MON_1:
- return "January";
case MON_2:
- return "February";
case MON_3:
- return "March";
case MON_4:
- return "April";
case MON_5:
- return "May";
case MON_6:
- return "June";
case MON_7:
- return "July";
case MON_8:
- return "August";
case MON_9:
- return "September";
case MON_10:
- return "October";
case MON_11:
- return "November";
case MON_12:
- return "December";
+ {
+ static char const months[][sizeof "September"] = {
+ "January", "February", "March", "April", "May", "June", "July",
+ "September", "October", "November", "December"
+ };
+ tmm.tm_mon = item - MON_1;
+ if (!strftime (nlbuf, sizeof nlbuf, "%B", &tmm))
+ return (char *) months[item - MON_1];
+ return nlbuf;
+ }
case ABMON_1:
- return "Jan";
case ABMON_2:
- return "Feb";
case ABMON_3:
- return "Mar";
case ABMON_4:
- return "Apr";
case ABMON_5:
- return "May";
case ABMON_6:
- return "Jun";
case ABMON_7:
- return "Jul";
case ABMON_8:
- return "Aug";
case ABMON_9:
- return "Sep";
case ABMON_10:
- return "Oct";
case ABMON_11:
- return "Nov";
case ABMON_12:
- return "Dec";
+ {
+ static char const abmonths[][sizeof "Jan"] = {
+ "Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul",
+ "Sep", "Oct", "Nov", "Dec"
+ };
+ tmm.tm_mon = item - ABMON_1;
+ if (!strftime (nlbuf, sizeof nlbuf, "%b", &tmm))
+ return (char *) abmonths[item - ABMON_1];
+ return nlbuf;
+ }
case ERA:
- return "";
+ return (char *) "";
case ALT_DIGITS:
- return "\0\0\0\0\0\0\0\0\0\0";
- /* nl_langinfo items of the LC_MONETARY category
- TODO: Really use the locale. */
+ return (char *) "\0\0\0\0\0\0\0\0\0\0";
+ /* nl_langinfo items of the LC_MONETARY category. */
case CRNCYSTR:
- return "-";
+ return localeconv () ->currency_symbol;
+ case INT_CURR_SYMBOL:
+ return localeconv () ->int_curr_symbol;
+ case MON_DECIMAL_POINT:
+ return localeconv () ->mon_decimal_point;
+ case MON_THOUSANDS_SEP:
+ return localeconv () ->mon_thousands_sep;
+ case MON_GROUPING:
+ return localeconv () ->mon_grouping;
+ case POSITIVE_SIGN:
+ return localeconv () ->positive_sign;
+ case NEGATIVE_SIGN:
+ return localeconv () ->negative_sign;
+ case FRAC_DIGITS:
+ return & localeconv () ->frac_digits;
+ case INT_FRAC_DIGITS:
+ return & localeconv () ->int_frac_digits;
+ case P_CS_PRECEDES:
+ return & localeconv () ->p_cs_precedes;
+ case N_CS_PRECEDES:
+ return & localeconv () ->n_cs_precedes;
+ case P_SEP_BY_SPACE:
+ return & localeconv () ->p_sep_by_space;
+ case N_SEP_BY_SPACE:
+ return & localeconv () ->n_sep_by_space;
+ case P_SIGN_POSN:
+ return & localeconv () ->p_sign_posn;
+ case N_SIGN_POSN:
+ return & localeconv () ->n_sign_posn;
/* nl_langinfo items of the LC_MESSAGES category
TODO: Really use the locale. */
case YESEXPR:
- return "^[yY]";
+ return (char *) "^[yY]";
case NOEXPR:
- return "^[nN]";
+ return (char *) "^[nN]";
default:
- return "";
+ return (char *) "";
}
}
diff --git a/lib/obstack.c b/lib/obstack.c
index fc50f1e..6e7b52c 100644
--- a/lib/obstack.c
+++ b/lib/obstack.c
@@ -1,32 +1,32 @@
/* obstack.c - subroutines used implicitly by object stack macros
+ Copyright (C) 1988-2016 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
- Copyright (C) 1988-1994, 1996-2006, 2009-2012 Free Software Foundation, Inc.
+ 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 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 the GNU C Library; if not, see
+ <http://www.gnu.org/licenses/>. */
- You should have received a copy of the GNU General Public License
- along with this program. If not, see <http://www.gnu.org/licenses/>. */
#ifdef _LIBC
# include <obstack.h>
-# include <shlib-compat.h>
#else
# include <config.h>
# include "obstack.h"
#endif
-/* NOTE BEFORE MODIFYING THIS FILE: This version number must be
- incremented whenever callers compiled using an old obstack.h can no
- longer properly call the functions in this obstack.c. */
-#define OBSTACK_INTERFACE_VERSION 1
+/* NOTE BEFORE MODIFYING THIS FILE: _OBSTACK_INTERFACE_VERSION in
+ obstack.h must be incremented whenever callers compiled using an old
+ obstack.h can no longer properly call the functions in this file. */
/* Comment out all this code if we are using the GNU C Library, and are not
actually compiling the library itself, and the installed library
@@ -36,114 +36,80 @@
(especially if it is a shared library). Rather than having every GNU
program understand 'configure --with-gnu-libc' and omit the object
files, it is simpler to just do this in the source for each such file. */
-
-#include <stdio.h> /* Random thing to get __GNU_LIBRARY__. */
#if !defined _LIBC && defined __GNU_LIBRARY__ && __GNU_LIBRARY__ > 1
# include <gnu-versions.h>
-# if _GNU_OBSTACK_INTERFACE_VERSION == OBSTACK_INTERFACE_VERSION
-# define ELIDE_CODE
+# if (_GNU_OBSTACK_INTERFACE_VERSION == _OBSTACK_INTERFACE_VERSION \
+ || (_GNU_OBSTACK_INTERFACE_VERSION == 1 \
+ && _OBSTACK_INTERFACE_VERSION == 2 \
+ && defined SIZEOF_INT && defined SIZEOF_SIZE_T \
+ && SIZEOF_INT == SIZEOF_SIZE_T))
+# define _OBSTACK_ELIDE_CODE
# endif
#endif
-#include <stddef.h>
-
-#ifndef ELIDE_CODE
-
+#ifndef _OBSTACK_ELIDE_CODE
+/* If GCC, or if an oddball (testing?) host that #defines __alignof__,
+ use the already-supplied __alignof__. Otherwise, this must be Gnulib
+ (as glibc assumes GCC); defer to Gnulib's alignof_type. */
+# if !defined __GNUC__ && !defined __alignof__
+# include <alignof.h>
+# define __alignof__(type) alignof_type (type)
+# endif
+# include <stdlib.h>
# include <stdint.h>
-/* Determine default alignment. */
-union fooround
-{
- uintmax_t i;
- long double d;
- void *p;
-};
-struct fooalign
-{
- char c;
- union fooround u;
-};
-/* If malloc were really smart, it would round addresses to DEFAULT_ALIGNMENT.
- But in fact it might be less smart and round addresses to as much as
- DEFAULT_ROUNDING. So we prepare for it to do that. */
-enum
- {
- DEFAULT_ALIGNMENT = offsetof (struct fooalign, u),
- DEFAULT_ROUNDING = sizeof (union fooround)
- };
-
-/* When we copy a long block of data, this is the unit to do it with.
- On some machines, copying successive ints does not work;
- in such a case, redefine COPYING_UNIT to 'long' (if that works)
- or 'char' as a last resort. */
-# ifndef COPYING_UNIT
-# define COPYING_UNIT int
+# ifndef MAX
+# define MAX(a,b) ((a) > (b) ? (a) : (b))
# endif
+/* Determine default alignment. */
-/* The functions allocating more room by calling 'obstack_chunk_alloc'
- jump to the handler pointed to by 'obstack_alloc_failed_handler'.
- This can be set to a user defined function which should either
- abort gracefully or use longjump - but shouldn't return. This
- variable by default points to the internal function
- 'print_and_abort'. */
-static _Noreturn void print_and_abort (void);
-void (*obstack_alloc_failed_handler) (void) = print_and_abort;
+/* If malloc were really smart, it would round addresses to DEFAULT_ALIGNMENT.
+ But in fact it might be less smart and round addresses to as much as
+ DEFAULT_ROUNDING. So we prepare for it to do that.
+
+ DEFAULT_ALIGNMENT cannot be an enum constant; see gnulib's alignof.h. */
+#define DEFAULT_ALIGNMENT MAX (__alignof__ (long double), \
+ MAX (__alignof__ (uintmax_t), \
+ __alignof__ (void *)))
+#define DEFAULT_ROUNDING MAX (sizeof (long double), \
+ MAX (sizeof (uintmax_t), \
+ sizeof (void *)))
+
+/* Call functions with either the traditional malloc/free calling
+ interface, or the mmalloc/mfree interface (that adds an extra first
+ argument), based on the value of use_extra_arg. */
+
+static void *
+call_chunkfun (struct obstack *h, size_t size)
+{
+ if (h->use_extra_arg)
+ return h->chunkfun.extra (h->extra_arg, size);
+ else
+ return h->chunkfun.plain (size);
+}
-/* Exit value used when 'print_and_abort' is used. */
-# include <stdlib.h>
-# ifdef _LIBC
-int obstack_exit_failure = EXIT_FAILURE;
-# else
-# include "exitfail.h"
-# define obstack_exit_failure exit_failure
-# endif
+static void
+call_freefun (struct obstack *h, void *old_chunk)
+{
+ if (h->use_extra_arg)
+ h->freefun.extra (h->extra_arg, old_chunk);
+ else
+ h->freefun.plain (old_chunk);
+}
-# ifdef _LIBC
-# if SHLIB_COMPAT (libc, GLIBC_2_0, GLIBC_2_3_4)
-/* A looong time ago (before 1994, anyway; we're not sure) this global variable
- was used by non-GNU-C macros to avoid multiple evaluation. The GNU C
- library still exports it because somebody might use it. */
-struct obstack *_obstack_compat;
-compat_symbol (libc, _obstack_compat, _obstack, GLIBC_2_0);
-# endif
-# endif
-/* Define a macro that either calls functions with the traditional malloc/free
- calling interface, or calls functions with the mmalloc/mfree interface
- (that adds an extra first argument), based on the state of use_extra_arg.
- For free, do not use ?:, since some compilers, like the MIPS compilers,
- do not allow (expr) ? void : void. */
-
-# define CALL_CHUNKFUN(h, size) \
- (((h) -> use_extra_arg) \
- ? (*(h)->chunkfun) ((h)->extra_arg, (size)) \
- : (*(struct _obstack_chunk *(*) (long)) (h)->chunkfun) ((size)))
-
-# define CALL_FREEFUN(h, old_chunk) \
- do { \
- if ((h) -> use_extra_arg) \
- (*(h)->freefun) ((h)->extra_arg, (old_chunk)); \
- else \
- (*(void (*) (void *)) (h)->freefun) ((old_chunk)); \
- } while (0)
-
-
/* Initialize an obstack H for use. Specify chunk size SIZE (0 means default).
Objects start on multiples of ALIGNMENT (0 means use default).
- CHUNKFUN is the function to use to allocate chunks,
- and FREEFUN the function to free them.
Return nonzero if successful, calls obstack_alloc_failed_handler if
allocation fails. */
-int
-_obstack_begin (struct obstack *h,
- int size, int alignment,
- void *(*chunkfun) (long),
- void (*freefun) (void *))
+static int
+_obstack_begin_worker (struct obstack *h,
+ _OBSTACK_SIZE_T size, _OBSTACK_SIZE_T alignment)
{
- register struct _obstack_chunk *chunk; /* points to new chunk */
+ struct _obstack_chunk *chunk; /* points to new chunk */
if (alignment == 0)
alignment = DEFAULT_ALIGNMENT;
@@ -164,19 +130,15 @@ _obstack_begin (struct obstack *h,
size = 4096 - extra;
}
- h->chunkfun = (struct _obstack_chunk * (*)(void *, long)) chunkfun;
- h->freefun = (void (*) (void *, struct _obstack_chunk *)) freefun;
h->chunk_size = size;
h->alignment_mask = alignment - 1;
- h->use_extra_arg = 0;
- chunk = h->chunk = CALL_CHUNKFUN (h, h -> chunk_size);
+ chunk = h->chunk = call_chunkfun (h, h->chunk_size);
if (!chunk)
(*obstack_alloc_failed_handler) ();
h->next_free = h->object_base = __PTR_ALIGN ((char *) chunk, chunk->contents,
alignment - 1);
- h->chunk_limit = chunk->limit
- = (char *) chunk + h->chunk_size;
+ h->chunk_limit = chunk->limit = (char *) chunk + h->chunk_size;
chunk->prev = 0;
/* The initial chunk now contains no empty object. */
h->maybe_empty_object = 0;
@@ -185,51 +147,29 @@ _obstack_begin (struct obstack *h,
}
int
-_obstack_begin_1 (struct obstack *h, int size, int alignment,
- void *(*chunkfun) (void *, long),
+_obstack_begin (struct obstack *h,
+ _OBSTACK_SIZE_T size, _OBSTACK_SIZE_T alignment,
+ void *(*chunkfun) (size_t),
+ void (*freefun) (void *))
+{
+ h->chunkfun.plain = chunkfun;
+ h->freefun.plain = freefun;
+ h->use_extra_arg = 0;
+ return _obstack_begin_worker (h, size, alignment);
+}
+
+int
+_obstack_begin_1 (struct obstack *h,
+ _OBSTACK_SIZE_T size, _OBSTACK_SIZE_T alignment,
+ void *(*chunkfun) (void *, size_t),
void (*freefun) (void *, void *),
void *arg)
{
- register struct _obstack_chunk *chunk; /* points to new chunk */
-
- if (alignment == 0)
- alignment = DEFAULT_ALIGNMENT;
- if (size == 0)
- /* Default size is what GNU malloc can fit in a 4096-byte block. */
- {
- /* 12 is sizeof (mhead) and 4 is EXTRA from GNU malloc.
- Use the values for range checking, because if range checking is off,
- the extra bytes won't be missed terribly, but if range checking is on
- and we used a larger request, a whole extra 4096 bytes would be
- allocated.
-
- These number are irrelevant to the new GNU malloc. I suspect it is
- less sensitive to the size of the request. */
- int extra = ((((12 + DEFAULT_ROUNDING - 1) & ~(DEFAULT_ROUNDING - 1))
- + 4 + DEFAULT_ROUNDING - 1)
- & ~(DEFAULT_ROUNDING - 1));
- size = 4096 - extra;
- }
-
- h->chunkfun = (struct _obstack_chunk * (*)(void *,long)) chunkfun;
- h->freefun = (void (*) (void *, struct _obstack_chunk *)) freefun;
- h->chunk_size = size;
- h->alignment_mask = alignment - 1;
+ h->chunkfun.extra = chunkfun;
+ h->freefun.extra = freefun;
h->extra_arg = arg;
h->use_extra_arg = 1;
-
- chunk = h->chunk = CALL_CHUNKFUN (h, h -> chunk_size);
- if (!chunk)
- (*obstack_alloc_failed_handler) ();
- h->next_free = h->object_base = __PTR_ALIGN ((char *) chunk, chunk->contents,
- alignment - 1);
- h->chunk_limit = chunk->limit
- = (char *) chunk + h->chunk_size;
- chunk->prev = 0;
- /* The initial chunk now contains no empty object. */
- h->maybe_empty_object = 0;
- h->alloc_failed = 0;
- return 1;
+ return _obstack_begin_worker (h, size, alignment);
}
/* Allocate a new current chunk for the obstack *H
@@ -239,25 +179,27 @@ _obstack_begin_1 (struct obstack *h, int size, int alignment,
to the beginning of the new one. */
void
-_obstack_newchunk (struct obstack *h, int length)
+_obstack_newchunk (struct obstack *h, _OBSTACK_SIZE_T length)
{
- register struct _obstack_chunk *old_chunk = h->chunk;
- register struct _obstack_chunk *new_chunk;
- register long new_size;
- register long obj_size = h->next_free - h->object_base;
- register long i;
- long already;
+ struct _obstack_chunk *old_chunk = h->chunk;
+ struct _obstack_chunk *new_chunk = 0;
+ size_t obj_size = h->next_free - h->object_base;
char *object_base;
/* Compute size for new chunk. */
- new_size = (obj_size + length) + (obj_size >> 3) + h->alignment_mask + 100;
+ size_t sum1 = obj_size + length;
+ size_t sum2 = sum1 + h->alignment_mask;
+ size_t new_size = sum2 + (obj_size >> 3) + 100;
+ if (new_size < sum2)
+ new_size = sum2;
if (new_size < h->chunk_size)
new_size = h->chunk_size;
/* Allocate and initialize the new chunk. */
- new_chunk = CALL_CHUNKFUN (h, new_size);
+ if (obj_size <= sum1 && sum1 <= sum2)
+ new_chunk = call_chunkfun (h, new_size);
if (!new_chunk)
- (*obstack_alloc_failed_handler) ();
+ (*obstack_alloc_failed_handler)();
h->chunk = new_chunk;
new_chunk->prev = old_chunk;
new_chunk->limit = h->chunk_limit = (char *) new_chunk + new_size;
@@ -266,36 +208,19 @@ _obstack_newchunk (struct obstack *h, int length)
object_base =
__PTR_ALIGN ((char *) new_chunk, new_chunk->contents, h->alignment_mask);
- /* Move the existing object to the new chunk.
- Word at a time is fast and is safe if the object
- is sufficiently aligned. */
- if (h->alignment_mask + 1 >= DEFAULT_ALIGNMENT)
- {
- for (i = obj_size / sizeof (COPYING_UNIT) - 1;
- i >= 0; i--)
- ((COPYING_UNIT *)object_base)[i]
- = ((COPYING_UNIT *)h->object_base)[i];
- /* We used to copy the odd few remaining bytes as one extra COPYING_UNIT,
- but that can cross a page boundary on a machine
- which does not do strict alignment for COPYING_UNITS. */
- already = obj_size / sizeof (COPYING_UNIT) * sizeof (COPYING_UNIT);
- }
- else
- already = 0;
- /* Copy remaining bytes one by one. */
- for (i = already; i < obj_size; i++)
- object_base[i] = h->object_base[i];
+ /* Move the existing object to the new chunk. */
+ memcpy (object_base, h->object_base, obj_size);
/* If the object just copied was the only data in OLD_CHUNK,
free that chunk and remove it from the chain.
But not if that chunk might contain an empty object. */
- if (! h->maybe_empty_object
+ if (!h->maybe_empty_object
&& (h->object_base
== __PTR_ALIGN ((char *) old_chunk, old_chunk->contents,
h->alignment_mask)))
{
new_chunk->prev = old_chunk->prev;
- CALL_FREEFUN (h, old_chunk);
+ call_freefun (h, old_chunk);
}
h->object_base = object_base;
@@ -303,9 +228,6 @@ _obstack_newchunk (struct obstack *h, int length)
/* The new chunk certainly contains no empty object yet. */
h->maybe_empty_object = 0;
}
-# ifdef _LIBC
-libc_hidden_def (_obstack_newchunk)
-# endif
/* Return nonzero if object OBJ has been allocated from obstack H.
This is here for debugging.
@@ -313,13 +235,13 @@ libc_hidden_def (_obstack_newchunk)
/* Suppress -Wmissing-prototypes warning. We don't want to declare this in
obstack.h because it is just for debugging. */
-int _obstack_allocated_p (struct obstack *h, void *obj);
+int _obstack_allocated_p (struct obstack *h, void *obj) __attribute_pure__;
int
_obstack_allocated_p (struct obstack *h, void *obj)
{
- register struct _obstack_chunk *lp; /* below addr of any objects in this chunk */
- register struct _obstack_chunk *plp; /* point to previous chunk if any */
+ struct _obstack_chunk *lp; /* below addr of any objects in this chunk */
+ struct _obstack_chunk *plp; /* point to previous chunk if any */
lp = (h)->chunk;
/* We use >= rather than > since the object cannot be exactly at
@@ -332,17 +254,15 @@ _obstack_allocated_p (struct obstack *h, void *obj)
}
return lp != 0;
}
-
+
/* Free objects in obstack H, including OBJ and everything allocate
more recently than OBJ. If OBJ is zero, free everything in H. */
-# undef obstack_free
-
void
-__obstack_free (struct obstack *h, void *obj)
+_obstack_free (struct obstack *h, void *obj)
{
- register struct _obstack_chunk *lp; /* below addr of any objects in this chunk */
- register struct _obstack_chunk *plp; /* point to previous chunk if any */
+ struct _obstack_chunk *lp; /* below addr of any objects in this chunk */
+ struct _obstack_chunk *plp; /* point to previous chunk if any */
lp = h->chunk;
/* We use >= because there cannot be an object at the beginning of a chunk.
@@ -351,7 +271,7 @@ __obstack_free (struct obstack *h, void *obj)
while (lp != 0 && ((void *) lp >= obj || (void *) (lp)->limit < obj))
{
plp = lp->prev;
- CALL_FREEFUN (h, lp);
+ call_freefun (h, lp);
lp = plp;
/* If we switch chunks, we can't tell whether the new current
chunk contains an empty object, so assume that it may. */
@@ -368,17 +288,11 @@ __obstack_free (struct obstack *h, void *obj)
abort ();
}
-# ifdef _LIBC
-/* Older versions of libc used a function _obstack_free intended to be
- called by non-GCC compilers. */
-strong_alias (obstack_free, _obstack_free)
-# endif
-
-int
+_OBSTACK_SIZE_T
_obstack_memory_used (struct obstack *h)
{
- register struct _obstack_chunk* lp;
- register int nbytes = 0;
+ struct _obstack_chunk *lp;
+ _OBSTACK_SIZE_T nbytes = 0;
for (lp = h->chunk; lp != 0; lp = lp->prev)
{
@@ -386,20 +300,31 @@ _obstack_memory_used (struct obstack *h)
}
return nbytes;
}
-
+
+# ifndef _OBSTACK_NO_ERROR_HANDLER
/* Define the error handler. */
-# ifdef _LIBC
-# include <libintl.h>
-# else
-# include "gettext.h"
-# endif
-# ifndef _
-# define _(msgid) gettext (msgid)
-# endif
+# include <stdio.h>
-# ifdef _LIBC
-# include <libio/iolibio.h>
-# endif
+/* Exit value used when 'print_and_abort' is used. */
+# ifdef _LIBC
+int obstack_exit_failure = EXIT_FAILURE;
+# else
+# include "exitfail.h"
+# define obstack_exit_failure exit_failure
+# endif
+
+# ifdef _LIBC
+# include <libintl.h>
+# else
+# include "gettext.h"
+# endif
+# ifndef _
+# define _(msgid) gettext (msgid)
+# endif
+
+# ifdef _LIBC
+# include <libio/iolibio.h>
+# endif
static _Noreturn void
print_and_abort (void)
@@ -409,12 +334,21 @@ print_and_abort (void)
happen because the "memory exhausted" message appears in other places
like this and the translation should be reused instead of creating
a very similar string which requires a separate translation. */
-# ifdef _LIBC
+# ifdef _LIBC
(void) __fxprintf (NULL, "%s\n", _("memory exhausted"));
-# else
+# else
fprintf (stderr, "%s\n", _("memory exhausted"));
-# endif
+# endif
exit (obstack_exit_failure);
}
-#endif /* !ELIDE_CODE */
+/* The functions allocating more room by calling 'obstack_chunk_alloc'
+ jump to the handler pointed to by 'obstack_alloc_failed_handler'.
+ This can be set to a user defined function which should either
+ abort gracefully or use longjump - but shouldn't return. This
+ variable by default points to the internal function
+ 'print_and_abort'. */
+__attribute_noreturn__ void (*obstack_alloc_failed_handler) (void)
+ = print_and_abort;
+# endif /* !_OBSTACK_NO_ERROR_HANDLER */
+#endif /* !_OBSTACK_ELIDE_CODE */
diff --git a/lib/obstack.h b/lib/obstack.h
index 6a44b44..e558133 100644
--- a/lib/obstack.h
+++ b/lib/obstack.h
@@ -1,90 +1,90 @@
/* obstack.h - object stack macros
- Copyright (C) 1988-1994, 1996-1999, 2003-2006, 2009-2012 Free Software
- Foundation, Inc.
+ Copyright (C) 1988-2016 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.
+ 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
+ <http://www.gnu.org/licenses/>. */
/* Summary:
-All the apparent functions defined here are macros. The idea
-is that you would use these pre-tested macros to solve a
-very specific set of problems, and they would run fast.
-Caution: no side-effects in arguments please!! They may be
-evaluated MANY times!!
-
-These macros operate a stack of objects. Each object starts life
-small, and may grow to maturity. (Consider building a word syllable
-by syllable.) An object can move while it is growing. Once it has
-been "finished" it never changes address again. So the "top of the
-stack" is typically an immature growing object, while the rest of the
-stack is of mature, fixed size and fixed address objects.
-
-These routines grab large chunks of memory, using a function you
-supply, called 'obstack_chunk_alloc'. On occasion, they free chunks,
-by calling 'obstack_chunk_free'. You must define them and declare
-them before using any obstack macros.
-
-Each independent stack is represented by a 'struct obstack'.
-Each of the obstack macros expects a pointer to such a structure
-as the first argument.
-
-One motivation for this package is the problem of growing char strings
-in symbol tables. Unless you are "fascist pig with a read-only mind"
---Gosper's immortal quote from HAKMEM item 154, out of context--you
-would not like to put any arbitrary upper limit on the length of your
-symbols.
-
-In practice this often means you will build many short symbols and a
-few long symbols. At the time you are reading a symbol you don't know
-how long it is. One traditional method is to read a symbol into a
-buffer, realloc()ating the buffer every time you try to read a symbol
-that is longer than the buffer. This is beaut, but you still will
-want to copy the symbol from the buffer to a more permanent
-symbol-table entry say about half the time.
-
-With obstacks, you can work differently. Use one obstack for all symbol
-names. As you read a symbol, grow the name in the obstack gradually.
-When the name is complete, finalize it. Then, if the symbol exists already,
-free the newly read name.
-
-The way we do this is to take a large chunk, allocating memory from
-low addresses. When you want to build a symbol in the chunk you just
-add chars above the current "high water mark" in the chunk. When you
-have finished adding chars, because you got to the end of the symbol,
-you know how long the chars are, and you can create a new object.
-Mostly the chars will not burst over the highest address of the chunk,
-because you would typically expect a chunk to be (say) 100 times as
-long as an average object.
-
-In case that isn't clear, when we have enough chars to make up
-the object, THEY ARE ALREADY CONTIGUOUS IN THE CHUNK (guaranteed)
-so we just point to it where it lies. No moving of chars is
-needed and this is the second win: potentially long strings need
-never be explicitly shuffled. Once an object is formed, it does not
-change its address during its lifetime.
-
-When the chars burst over a chunk boundary, we allocate a larger
-chunk, and then copy the partly formed object from the end of the old
-chunk to the beginning of the new larger chunk. We then carry on
-accreting characters to the end of the object as we normally would.
-
-A special macro is provided to add a single char at a time to a
-growing object. This allows the use of register variables, which
-break the ordinary 'growth' macro.
-
-Summary:
+ All the apparent functions defined here are macros. The idea
+ is that you would use these pre-tested macros to solve a
+ very specific set of problems, and they would run fast.
+ Caution: no side-effects in arguments please!! They may be
+ evaluated MANY times!!
+
+ These macros operate a stack of objects. Each object starts life
+ small, and may grow to maturity. (Consider building a word syllable
+ by syllable.) An object can move while it is growing. Once it has
+ been "finished" it never changes address again. So the "top of the
+ stack" is typically an immature growing object, while the rest of the
+ stack is of mature, fixed size and fixed address objects.
+
+ These routines grab large chunks of memory, using a function you
+ supply, called 'obstack_chunk_alloc'. On occasion, they free chunks,
+ by calling 'obstack_chunk_free'. You must define them and declare
+ them before using any obstack macros.
+
+ Each independent stack is represented by a 'struct obstack'.
+ Each of the obstack macros expects a pointer to such a structure
+ as the first argument.
+
+ One motivation for this package is the problem of growing char strings
+ in symbol tables. Unless you are "fascist pig with a read-only mind"
+ --Gosper's immortal quote from HAKMEM item 154, out of context--you
+ would not like to put any arbitrary upper limit on the length of your
+ symbols.
+
+ In practice this often means you will build many short symbols and a
+ few long symbols. At the time you are reading a symbol you don't know
+ how long it is. One traditional method is to read a symbol into a
+ buffer, realloc()ating the buffer every time you try to read a symbol
+ that is longer than the buffer. This is beaut, but you still will
+ want to copy the symbol from the buffer to a more permanent
+ symbol-table entry say about half the time.
+
+ With obstacks, you can work differently. Use one obstack for all symbol
+ names. As you read a symbol, grow the name in the obstack gradually.
+ When the name is complete, finalize it. Then, if the symbol exists already,
+ free the newly read name.
+
+ The way we do this is to take a large chunk, allocating memory from
+ low addresses. When you want to build a symbol in the chunk you just
+ add chars above the current "high water mark" in the chunk. When you
+ have finished adding chars, because you got to the end of the symbol,
+ you know how long the chars are, and you can create a new object.
+ Mostly the chars will not burst over the highest address of the chunk,
+ because you would typically expect a chunk to be (say) 100 times as
+ long as an average object.
+
+ In case that isn't clear, when we have enough chars to make up
+ the object, THEY ARE ALREADY CONTIGUOUS IN THE CHUNK (guaranteed)
+ so we just point to it where it lies. No moving of chars is
+ needed and this is the second win: potentially long strings need
+ never be explicitly shuffled. Once an object is formed, it does not
+ change its address during its lifetime.
+
+ When the chars burst over a chunk boundary, we allocate a larger
+ chunk, and then copy the partly formed object from the end of the old
+ chunk to the beginning of the new larger chunk. We then carry on
+ accreting characters to the end of the object as we normally would.
+
+ A special macro is provided to add a single char at a time to a
+ growing object. This allows the use of register variables, which
+ break the ordinary 'growth' macro.
+
+ Summary:
We allocate large chunks.
We carve out one object at a time from the current chunk.
Once carved, an object never moves.
@@ -96,24 +96,38 @@ Summary:
Because of the way we do it, you can "unwind" an obstack
back to a previous state. (You may remove objects much
as you would with a stack.)
-*/
+ */
/* Don't do the contents of this file more than once. */
#ifndef _OBSTACK_H
#define _OBSTACK_H 1
-
-/* We need the type of a pointer subtraction. If __PTRDIFF_TYPE__ is
- defined, as with GNU C, use that; that way we don't pollute the
- namespace with <stddef.h>'s symbols. Otherwise, include <stddef.h>
- and use ptrdiff_t. */
-
-#ifdef __PTRDIFF_TYPE__
-# define PTR_INT_TYPE __PTRDIFF_TYPE__
+
+#ifndef _OBSTACK_INTERFACE_VERSION
+# define _OBSTACK_INTERFACE_VERSION 2
+#endif
+
+#include <stddef.h> /* For size_t and ptrdiff_t. */
+#include <string.h> /* For __GNU_LIBRARY__, and memcpy. */
+
+#if __STDC_VERSION__ < 199901L
+# define __FLEXIBLE_ARRAY_MEMBER 1
#else
-# include <stddef.h>
-# define PTR_INT_TYPE ptrdiff_t
+# define __FLEXIBLE_ARRAY_MEMBER
+#endif
+
+#if _OBSTACK_INTERFACE_VERSION == 1
+/* For binary compatibility with obstack version 1, which used "int"
+ and "long" for these two types. */
+# define _OBSTACK_SIZE_T unsigned int
+# define _CHUNK_SIZE_T unsigned long
+# define _OBSTACK_CAST(type, expr) ((type) (expr))
+#else
+/* Version 2 with sane types, especially for 64-bit hosts. */
+# define _OBSTACK_SIZE_T size_t
+# define _CHUNK_SIZE_T size_t
+# define _OBSTACK_CAST(type, expr) (expr)
#endif
/* If B is the base of an object addressed by P, return the result of
@@ -122,18 +136,29 @@ Summary:
#define __BPTR_ALIGN(B, P, A) ((B) + (((P) - (B) + (A)) & ~(A)))
-/* Similar to _BPTR_ALIGN (B, P, A), except optimize the common case
+/* Similar to __BPTR_ALIGN (B, P, A), except optimize the common case
where pointers can be converted to integers, aligned as integers,
- and converted back again. If PTR_INT_TYPE is narrower than a
+ and converted back again. If ptrdiff_t is narrower than a
pointer (e.g., the AS/400), play it safe and compute the alignment
relative to B. Otherwise, use the faster strategy of computing the
alignment relative to 0. */
-#define __PTR_ALIGN(B, P, A) \
- __BPTR_ALIGN (sizeof (PTR_INT_TYPE) < sizeof (void *) ? (B) : (char *) 0, \
+#define __PTR_ALIGN(B, P, A) \
+ __BPTR_ALIGN (sizeof (ptrdiff_t) < sizeof (void *) ? (B) : (char *) 0, \
P, A)
-#include <string.h>
+#ifndef __attribute_pure__
+# define __attribute_pure__ _GL_ATTRIBUTE_PURE
+#endif
+
+/* Not the same as _Noreturn, since it also works with function pointers. */
+#ifndef __attribute_noreturn__
+# if 2 < __GNUC__ + (8 <= __GNUC_MINOR__) || 0x5110 <= __SUNPRO_C
+# define __attribute_noreturn__ __attribute__ ((__noreturn__))
+# else
+# define __attribute_noreturn__
+# endif
+#endif
#ifdef __cplusplus
extern "C" {
@@ -141,67 +166,72 @@ extern "C" {
struct _obstack_chunk /* Lives at front of each chunk. */
{
- char *limit; /* 1 past end of this chunk */
+ char *limit; /* 1 past end of this chunk */
struct _obstack_chunk *prev; /* address of prior chunk or NULL */
- char contents[4]; /* objects begin here */
+ char contents[__FLEXIBLE_ARRAY_MEMBER]; /* objects begin here */
};
struct obstack /* control current object in current chunk */
{
- long chunk_size; /* preferred size to allocate chunks in */
+ _CHUNK_SIZE_T chunk_size; /* preferred size to allocate chunks in */
struct _obstack_chunk *chunk; /* address of current struct obstack_chunk */
- char *object_base; /* address of object we are building */
- char *next_free; /* where to add next char to current object */
- char *chunk_limit; /* address of char after current chunk */
+ char *object_base; /* address of object we are building */
+ char *next_free; /* where to add next char to current object */
+ char *chunk_limit; /* address of char after current chunk */
union
{
- PTR_INT_TYPE tempint;
- void *tempptr;
+ _OBSTACK_SIZE_T i;
+ void *p;
} temp; /* Temporary for some macros. */
- int alignment_mask; /* Mask of alignment for each object. */
- /* These prototypes vary based on 'use_extra_arg', and we use
- casts to the prototypeless function type in all assignments,
- but having prototypes here quiets -Wstrict-prototypes. */
- struct _obstack_chunk *(*chunkfun) (void *, long);
- void (*freefun) (void *, struct _obstack_chunk *);
+ _OBSTACK_SIZE_T alignment_mask; /* Mask of alignment for each object. */
+
+ /* These prototypes vary based on 'use_extra_arg'. */
+ union
+ {
+ void *(*plain) (size_t);
+ void *(*extra) (void *, size_t);
+ } chunkfun;
+ union
+ {
+ void (*plain) (void *);
+ void (*extra) (void *, void *);
+ } freefun;
+
void *extra_arg; /* first arg for chunk alloc/dealloc funcs */
- unsigned use_extra_arg:1; /* chunk alloc/dealloc funcs take extra arg */
- unsigned maybe_empty_object:1;/* There is a possibility that the current
- chunk contains a zero-length object. This
- prevents freeing the chunk if we allocate
- a bigger chunk to replace it. */
- unsigned alloc_failed:1; /* No longer used, as we now call the failed
- handler on error, but retained for binary
- compatibility. */
+ unsigned use_extra_arg : 1; /* chunk alloc/dealloc funcs take extra arg */
+ unsigned maybe_empty_object : 1; /* There is a possibility that the current
+ chunk contains a zero-length object. This
+ prevents freeing the chunk if we allocate
+ a bigger chunk to replace it. */
+ unsigned alloc_failed : 1; /* No longer used, as we now call the failed
+ handler on error, but retained for binary
+ compatibility. */
};
/* Declare the external functions we use; they are in obstack.c. */
-extern void _obstack_newchunk (struct obstack *, int);
-extern int _obstack_begin (struct obstack *, int, int,
- void *(*) (long), void (*) (void *));
-extern int _obstack_begin_1 (struct obstack *, int, int,
- void *(*) (void *, long),
+extern void _obstack_newchunk (struct obstack *, _OBSTACK_SIZE_T);
+extern void _obstack_free (struct obstack *, void *);
+extern int _obstack_begin (struct obstack *,
+ _OBSTACK_SIZE_T, _OBSTACK_SIZE_T,
+ void *(*) (size_t), void (*) (void *));
+extern int _obstack_begin_1 (struct obstack *,
+ _OBSTACK_SIZE_T, _OBSTACK_SIZE_T,
+ void *(*) (void *, size_t),
void (*) (void *, void *), void *);
-extern int _obstack_memory_used (struct obstack *);
+extern _OBSTACK_SIZE_T _obstack_memory_used (struct obstack *)
+ __attribute_pure__;
-/* The default name of the function for freeing a chunk is 'obstack_free',
- but gnulib users can override this by defining '__obstack_free'. */
-#ifndef __obstack_free
-# define __obstack_free obstack_free
-#endif
-extern void __obstack_free (struct obstack *obstack, void *block);
-
/* Error handler called when 'obstack_chunk_alloc' failed to allocate
more memory. This can be set to a user defined function which
should either abort gracefully or use longjump - but shouldn't
return. The default action is to print a message and abort. */
-extern void (*obstack_alloc_failed_handler) (void);
+extern __attribute_noreturn__ void (*obstack_alloc_failed_handler) (void);
/* Exit value used when 'print_and_abort' is used. */
extern int obstack_exit_failure;
-
+
/* Pointer to beginning of object being allocated or to be allocated next.
Note that this might not be the final address of the object
because a new chunk might be needed to hold the final size. */
@@ -214,50 +244,47 @@ extern int obstack_exit_failure;
/* Pointer to next byte not yet allocated in current chunk. */
-#define obstack_next_free(h) ((h)->next_free)
+#define obstack_next_free(h) ((void *) (h)->next_free)
/* Mask specifying low bits that should be clear in address of an object. */
#define obstack_alignment_mask(h) ((h)->alignment_mask)
/* To prevent prototype warnings provide complete argument list. */
-#define obstack_init(h) \
- _obstack_begin ((h), 0, 0, \
- (void *(*) (long)) obstack_chunk_alloc, \
- (void (*) (void *)) obstack_chunk_free)
+#define obstack_init(h) \
+ _obstack_begin ((h), 0, 0, \
+ _OBSTACK_CAST (void *(*) (size_t), obstack_chunk_alloc), \
+ _OBSTACK_CAST (void (*) (void *), obstack_chunk_free))
-#define obstack_begin(h, size) \
- _obstack_begin ((h), (size), 0, \
- (void *(*) (long)) obstack_chunk_alloc, \
- (void (*) (void *)) obstack_chunk_free)
+#define obstack_begin(h, size) \
+ _obstack_begin ((h), (size), 0, \
+ _OBSTACK_CAST (void *(*) (size_t), obstack_chunk_alloc), \
+ _OBSTACK_CAST (void (*) (void *), obstack_chunk_free))
-#define obstack_specify_allocation(h, size, alignment, chunkfun, freefun) \
- _obstack_begin ((h), (size), (alignment), \
- (void *(*) (long)) (chunkfun), \
- (void (*) (void *)) (freefun))
+#define obstack_specify_allocation(h, size, alignment, chunkfun, freefun) \
+ _obstack_begin ((h), (size), (alignment), \
+ _OBSTACK_CAST (void *(*) (size_t), chunkfun), \
+ _OBSTACK_CAST (void (*) (void *), freefun))
#define obstack_specify_allocation_with_arg(h, size, alignment, chunkfun, freefun, arg) \
- _obstack_begin_1 ((h), (size), (alignment), \
- (void *(*) (void *, long)) (chunkfun), \
- (void (*) (void *, void *)) (freefun), (arg))
+ _obstack_begin_1 ((h), (size), (alignment), \
+ _OBSTACK_CAST (void *(*) (void *, size_t), chunkfun), \
+ _OBSTACK_CAST (void (*) (void *, void *), freefun), arg)
-#define obstack_chunkfun(h, newchunkfun) \
- ((h) -> chunkfun = (struct _obstack_chunk *(*)(void *, long)) (newchunkfun))
+#define obstack_chunkfun(h, newchunkfun) \
+ ((void) ((h)->chunkfun.extra = (void *(*) (void *, size_t)) (newchunkfun)))
-#define obstack_freefun(h, newfreefun) \
- ((h) -> freefun = (void (*)(void *, struct _obstack_chunk *)) (newfreefun))
+#define obstack_freefun(h, newfreefun) \
+ ((void) ((h)->freefun.extra = (void *(*) (void *, void *)) (newfreefun)))
-#define obstack_1grow_fast(h,achar) (*((h)->next_free)++ = (achar))
+#define obstack_1grow_fast(h, achar) ((void) (*((h)->next_free)++ = (achar)))
-#define obstack_blank_fast(h,n) ((h)->next_free += (n))
+#define obstack_blank_fast(h, n) ((void) ((h)->next_free += (n)))
#define obstack_memory_used(h) _obstack_memory_used (h)
-
+
#if defined __GNUC__
-/* NextStep 2.0 cc is really gcc 1.93 but it defines __GNUC__ = 2 and
- does not implement __extension__. But that compiler doesn't define
- __GNUC_MINOR__. */
-# if __GNUC__ < 2 || (__NeXT__ && !__GNUC_MINOR__)
+# if !defined __GNUC_MINOR__ || __GNUC__ * 1000 + __GNUC_MINOR__ < 2008
# define __extension__
# endif
@@ -266,158 +293,161 @@ extern int obstack_exit_failure;
without using a global variable.
Also, we can avoid using the 'temp' slot, to make faster code. */
-# define obstack_object_size(OBSTACK) \
- __extension__ \
- ({ struct obstack const *__o = (OBSTACK); \
- (unsigned) (__o->next_free - __o->object_base); })
-
-# define obstack_room(OBSTACK) \
- __extension__ \
- ({ struct obstack const *__o = (OBSTACK); \
- (unsigned) (__o->chunk_limit - __o->next_free); })
-
-# define obstack_make_room(OBSTACK,length) \
-__extension__ \
-({ struct obstack *__o = (OBSTACK); \
- int __len = (length); \
- if (__o->chunk_limit - __o->next_free < __len) \
- _obstack_newchunk (__o, __len); \
- (void) 0; })
-
-# define obstack_empty_p(OBSTACK) \
- __extension__ \
- ({ struct obstack const *__o = (OBSTACK); \
- (__o->chunk->prev == 0 \
- && __o->next_free == __PTR_ALIGN ((char *) __o->chunk, \
- __o->chunk->contents, \
- __o->alignment_mask)); })
-
-# define obstack_grow(OBSTACK,where,length) \
-__extension__ \
-({ struct obstack *__o = (OBSTACK); \
- int __len = (length); \
- if (__o->next_free + __len > __o->chunk_limit) \
- _obstack_newchunk (__o, __len); \
- memcpy (__o->next_free, where, __len); \
- __o->next_free += __len; \
- (void) 0; })
-
-# define obstack_grow0(OBSTACK,where,length) \
-__extension__ \
-({ struct obstack *__o = (OBSTACK); \
- int __len = (length); \
- if (__o->next_free + __len + 1 > __o->chunk_limit) \
- _obstack_newchunk (__o, __len + 1); \
- memcpy (__o->next_free, where, __len); \
- __o->next_free += __len; \
- *(__o->next_free)++ = 0; \
- (void) 0; })
-
-# define obstack_1grow(OBSTACK,datum) \
-__extension__ \
-({ struct obstack *__o = (OBSTACK); \
- if (__o->next_free + 1 > __o->chunk_limit) \
- _obstack_newchunk (__o, 1); \
- obstack_1grow_fast (__o, datum); \
- (void) 0; })
+# define obstack_object_size(OBSTACK) \
+ __extension__ \
+ ({ struct obstack const *__o = (OBSTACK); \
+ (_OBSTACK_SIZE_T) (__o->next_free - __o->object_base); })
+
+/* The local variable is named __o1 to avoid a shadowed variable
+ warning when invoked from other obstack macros. */
+# define obstack_room(OBSTACK) \
+ __extension__ \
+ ({ struct obstack const *__o1 = (OBSTACK); \
+ (_OBSTACK_SIZE_T) (__o1->chunk_limit - __o1->next_free); })
+
+# define obstack_make_room(OBSTACK, length) \
+ __extension__ \
+ ({ struct obstack *__o = (OBSTACK); \
+ _OBSTACK_SIZE_T __len = (length); \
+ if (obstack_room (__o) < __len) \
+ _obstack_newchunk (__o, __len); \
+ (void) 0; })
+
+# define obstack_empty_p(OBSTACK) \
+ __extension__ \
+ ({ struct obstack const *__o = (OBSTACK); \
+ (__o->chunk->prev == 0 \
+ && __o->next_free == __PTR_ALIGN ((char *) __o->chunk, \
+ __o->chunk->contents, \
+ __o->alignment_mask)); })
+
+# define obstack_grow(OBSTACK, where, length) \
+ __extension__ \
+ ({ struct obstack *__o = (OBSTACK); \
+ _OBSTACK_SIZE_T __len = (length); \
+ if (obstack_room (__o) < __len) \
+ _obstack_newchunk (__o, __len); \
+ memcpy (__o->next_free, where, __len); \
+ __o->next_free += __len; \
+ (void) 0; })
+
+# define obstack_grow0(OBSTACK, where, length) \
+ __extension__ \
+ ({ struct obstack *__o = (OBSTACK); \
+ _OBSTACK_SIZE_T __len = (length); \
+ if (obstack_room (__o) < __len + 1) \
+ _obstack_newchunk (__o, __len + 1); \
+ memcpy (__o->next_free, where, __len); \
+ __o->next_free += __len; \
+ *(__o->next_free)++ = 0; \
+ (void) 0; })
+
+# define obstack_1grow(OBSTACK, datum) \
+ __extension__ \
+ ({ struct obstack *__o = (OBSTACK); \
+ if (obstack_room (__o) < 1) \
+ _obstack_newchunk (__o, 1); \
+ obstack_1grow_fast (__o, datum); })
/* These assume that the obstack alignment is good enough for pointers
or ints, and that the data added so far to the current object
shares that much alignment. */
-# define obstack_ptr_grow(OBSTACK,datum) \
-__extension__ \
-({ struct obstack *__o = (OBSTACK); \
- if (__o->next_free + sizeof (void *) > __o->chunk_limit) \
- _obstack_newchunk (__o, sizeof (void *)); \
- obstack_ptr_grow_fast (__o, datum); }) \
-
-# define obstack_int_grow(OBSTACK,datum) \
-__extension__ \
-({ struct obstack *__o = (OBSTACK); \
- if (__o->next_free + sizeof (int) > __o->chunk_limit) \
- _obstack_newchunk (__o, sizeof (int)); \
- obstack_int_grow_fast (__o, datum); })
-
-# define obstack_ptr_grow_fast(OBSTACK,aptr) \
-__extension__ \
-({ struct obstack *__o1 = (OBSTACK); \
- *(const void **) __o1->next_free = (aptr); \
- __o1->next_free += sizeof (const void *); \
- (void) 0; })
-
-# define obstack_int_grow_fast(OBSTACK,aint) \
-__extension__ \
-({ struct obstack *__o1 = (OBSTACK); \
- *(int *) __o1->next_free = (aint); \
- __o1->next_free += sizeof (int); \
- (void) 0; })
-
-# define obstack_blank(OBSTACK,length) \
-__extension__ \
-({ struct obstack *__o = (OBSTACK); \
- int __len = (length); \
- if (__o->chunk_limit - __o->next_free < __len) \
- _obstack_newchunk (__o, __len); \
- obstack_blank_fast (__o, __len); \
- (void) 0; })
-
-# define obstack_alloc(OBSTACK,length) \
-__extension__ \
-({ struct obstack *__h = (OBSTACK); \
- obstack_blank (__h, (length)); \
- obstack_finish (__h); })
-
-# define obstack_copy(OBSTACK,where,length) \
-__extension__ \
-({ struct obstack *__h = (OBSTACK); \
- obstack_grow (__h, (where), (length)); \
- obstack_finish (__h); })
-
-# define obstack_copy0(OBSTACK,where,length) \
-__extension__ \
-({ struct obstack *__h = (OBSTACK); \
- obstack_grow0 (__h, (where), (length)); \
- obstack_finish (__h); })
-
-/* The local variable is named __o1 to avoid a name conflict
- when obstack_blank is called. */
-# define obstack_finish(OBSTACK) \
-__extension__ \
-({ struct obstack *__o1 = (OBSTACK); \
- void *__value = (void *) __o1->object_base; \
- if (__o1->next_free == __value) \
- __o1->maybe_empty_object = 1; \
- __o1->next_free \
- = __PTR_ALIGN (__o1->object_base, __o1->next_free, \
- __o1->alignment_mask); \
- if (__o1->next_free - (char *)__o1->chunk \
- > __o1->chunk_limit - (char *)__o1->chunk) \
- __o1->next_free = __o1->chunk_limit; \
- __o1->object_base = __o1->next_free; \
- __value; })
-
-# define obstack_free(OBSTACK, OBJ) \
-__extension__ \
-({ struct obstack *__o = (OBSTACK); \
- void *__obj = (OBJ); \
- if (__obj > (void *)__o->chunk && __obj < (void *)__o->chunk_limit) \
- __o->next_free = __o->object_base = (char *)__obj; \
- else (__obstack_free) (__o, __obj); })
-
+# define obstack_ptr_grow(OBSTACK, datum) \
+ __extension__ \
+ ({ struct obstack *__o = (OBSTACK); \
+ if (obstack_room (__o) < sizeof (void *)) \
+ _obstack_newchunk (__o, sizeof (void *)); \
+ obstack_ptr_grow_fast (__o, datum); })
+
+# define obstack_int_grow(OBSTACK, datum) \
+ __extension__ \
+ ({ struct obstack *__o = (OBSTACK); \
+ if (obstack_room (__o) < sizeof (int)) \
+ _obstack_newchunk (__o, sizeof (int)); \
+ obstack_int_grow_fast (__o, datum); })
+
+# define obstack_ptr_grow_fast(OBSTACK, aptr) \
+ __extension__ \
+ ({ struct obstack *__o1 = (OBSTACK); \
+ void *__p1 = __o1->next_free; \
+ *(const void **) __p1 = (aptr); \
+ __o1->next_free += sizeof (const void *); \
+ (void) 0; })
+
+# define obstack_int_grow_fast(OBSTACK, aint) \
+ __extension__ \
+ ({ struct obstack *__o1 = (OBSTACK); \
+ void *__p1 = __o1->next_free; \
+ *(int *) __p1 = (aint); \
+ __o1->next_free += sizeof (int); \
+ (void) 0; })
+
+# define obstack_blank(OBSTACK, length) \
+ __extension__ \
+ ({ struct obstack *__o = (OBSTACK); \
+ _OBSTACK_SIZE_T __len = (length); \
+ if (obstack_room (__o) < __len) \
+ _obstack_newchunk (__o, __len); \
+ obstack_blank_fast (__o, __len); })
+
+# define obstack_alloc(OBSTACK, length) \
+ __extension__ \
+ ({ struct obstack *__h = (OBSTACK); \
+ obstack_blank (__h, (length)); \
+ obstack_finish (__h); })
+
+# define obstack_copy(OBSTACK, where, length) \
+ __extension__ \
+ ({ struct obstack *__h = (OBSTACK); \
+ obstack_grow (__h, (where), (length)); \
+ obstack_finish (__h); })
+
+# define obstack_copy0(OBSTACK, where, length) \
+ __extension__ \
+ ({ struct obstack *__h = (OBSTACK); \
+ obstack_grow0 (__h, (where), (length)); \
+ obstack_finish (__h); })
+
+/* The local variable is named __o1 to avoid a shadowed variable
+ warning when invoked from other obstack macros, typically obstack_free. */
+# define obstack_finish(OBSTACK) \
+ __extension__ \
+ ({ struct obstack *__o1 = (OBSTACK); \
+ void *__value = (void *) __o1->object_base; \
+ if (__o1->next_free == __value) \
+ __o1->maybe_empty_object = 1; \
+ __o1->next_free \
+ = __PTR_ALIGN (__o1->object_base, __o1->next_free, \
+ __o1->alignment_mask); \
+ if ((size_t) (__o1->next_free - (char *) __o1->chunk) \
+ > (size_t) (__o1->chunk_limit - (char *) __o1->chunk)) \
+ __o1->next_free = __o1->chunk_limit; \
+ __o1->object_base = __o1->next_free; \
+ __value; })
+
+# define obstack_free(OBSTACK, OBJ) \
+ __extension__ \
+ ({ struct obstack *__o = (OBSTACK); \
+ void *__obj = (void *) (OBJ); \
+ if (__obj > (void *) __o->chunk && __obj < (void *) __o->chunk_limit) \
+ __o->next_free = __o->object_base = (char *) __obj; \
+ else \
+ _obstack_free (__o, __obj); })
+
#else /* not __GNUC__ */
-# define obstack_object_size(h) \
- (unsigned) ((h)->next_free - (h)->object_base)
+# define obstack_object_size(h) \
+ ((_OBSTACK_SIZE_T) ((h)->next_free - (h)->object_base))
-# define obstack_room(h) \
- (unsigned) ((h)->chunk_limit - (h)->next_free)
+# define obstack_room(h) \
+ ((_OBSTACK_SIZE_T) ((h)->chunk_limit - (h)->next_free))
-# define obstack_empty_p(h) \
- ((h)->chunk->prev == 0 \
- && (h)->next_free == __PTR_ALIGN ((char *) (h)->chunk, \
- (h)->chunk->contents, \
- (h)->alignment_mask))
+# define obstack_empty_p(h) \
+ ((h)->chunk->prev == 0 \
+ && (h)->next_free == __PTR_ALIGN ((char *) (h)->chunk, \
+ (h)->chunk->contents, \
+ (h)->alignment_mask))
/* Note that the call to _obstack_newchunk is enclosed in (..., 0)
so that we can avoid having void expressions
@@ -425,83 +455,87 @@ __extension__ \
Casting the third operand to void was tried before,
but some compilers won't accept it. */
-# define obstack_make_room(h,length) \
-( (h)->temp.tempint = (length), \
- (((h)->next_free + (h)->temp.tempint > (h)->chunk_limit) \
- ? (_obstack_newchunk ((h), (h)->temp.tempint), 0) : 0))
-
-# define obstack_grow(h,where,length) \
-( (h)->temp.tempint = (length), \
- (((h)->next_free + (h)->temp.tempint > (h)->chunk_limit) \
- ? (_obstack_newchunk ((h), (h)->temp.tempint), 0) : 0), \
- memcpy ((h)->next_free, where, (h)->temp.tempint), \
- (h)->next_free += (h)->temp.tempint)
-
-# define obstack_grow0(h,where,length) \
-( (h)->temp.tempint = (length), \
- (((h)->next_free + (h)->temp.tempint + 1 > (h)->chunk_limit) \
- ? (_obstack_newchunk ((h), (h)->temp.tempint + 1), 0) : 0), \
- memcpy ((h)->next_free, where, (h)->temp.tempint), \
- (h)->next_free += (h)->temp.tempint, \
- *((h)->next_free)++ = 0)
-
-# define obstack_1grow(h,datum) \
-( (((h)->next_free + 1 > (h)->chunk_limit) \
- ? (_obstack_newchunk ((h), 1), 0) : 0), \
- obstack_1grow_fast (h, datum))
-
-# define obstack_ptr_grow(h,datum) \
-( (((h)->next_free + sizeof (char *) > (h)->chunk_limit) \
- ? (_obstack_newchunk ((h), sizeof (char *)), 0) : 0), \
- obstack_ptr_grow_fast (h, datum))
-
-# define obstack_int_grow(h,datum) \
-( (((h)->next_free + sizeof (int) > (h)->chunk_limit) \
- ? (_obstack_newchunk ((h), sizeof (int)), 0) : 0), \
- obstack_int_grow_fast (h, datum))
-
-# define obstack_ptr_grow_fast(h,aptr) \
- (((const void **) ((h)->next_free += sizeof (void *)))[-1] = (aptr))
-
-# define obstack_int_grow_fast(h,aint) \
- (((int *) ((h)->next_free += sizeof (int)))[-1] = (aint))
-
-# define obstack_blank(h,length) \
-( (h)->temp.tempint = (length), \
- (((h)->chunk_limit - (h)->next_free < (h)->temp.tempint) \
- ? (_obstack_newchunk ((h), (h)->temp.tempint), 0) : 0), \
- obstack_blank_fast (h, (h)->temp.tempint))
-
-# define obstack_alloc(h,length) \
- (obstack_blank ((h), (length)), obstack_finish ((h)))
-
-# define obstack_copy(h,where,length) \
- (obstack_grow ((h), (where), (length)), obstack_finish ((h)))
-
-# define obstack_copy0(h,where,length) \
- (obstack_grow0 ((h), (where), (length)), obstack_finish ((h)))
-
-# define obstack_finish(h) \
-( ((h)->next_free == (h)->object_base \
- ? (((h)->maybe_empty_object = 1), 0) \
- : 0), \
- (h)->temp.tempptr = (h)->object_base, \
- (h)->next_free \
- = __PTR_ALIGN ((h)->object_base, (h)->next_free, \
- (h)->alignment_mask), \
- (((h)->next_free - (char *) (h)->chunk \
- > (h)->chunk_limit - (char *) (h)->chunk) \
- ? ((h)->next_free = (h)->chunk_limit) : 0), \
- (h)->object_base = (h)->next_free, \
- (h)->temp.tempptr)
-
-# define obstack_free(h,obj) \
-( (h)->temp.tempint = (char *) (obj) - (char *) (h)->chunk, \
- ((((h)->temp.tempint > 0 \
- && (h)->temp.tempint < (h)->chunk_limit - (char *) (h)->chunk)) \
- ? (int) ((h)->next_free = (h)->object_base \
- = (h)->temp.tempint + (char *) (h)->chunk) \
- : (((__obstack_free) ((h), (h)->temp.tempint + (char *) (h)->chunk), 0), 0)))
+# define obstack_make_room(h, length) \
+ ((h)->temp.i = (length), \
+ ((obstack_room (h) < (h)->temp.i) \
+ ? (_obstack_newchunk (h, (h)->temp.i), 0) : 0), \
+ (void) 0)
+
+# define obstack_grow(h, where, length) \
+ ((h)->temp.i = (length), \
+ ((obstack_room (h) < (h)->temp.i) \
+ ? (_obstack_newchunk ((h), (h)->temp.i), 0) : 0), \
+ memcpy ((h)->next_free, where, (h)->temp.i), \
+ (h)->next_free += (h)->temp.i, \
+ (void) 0)
+
+# define obstack_grow0(h, where, length) \
+ ((h)->temp.i = (length), \
+ ((obstack_room (h) < (h)->temp.i + 1) \
+ ? (_obstack_newchunk ((h), (h)->temp.i + 1), 0) : 0), \
+ memcpy ((h)->next_free, where, (h)->temp.i), \
+ (h)->next_free += (h)->temp.i, \
+ *((h)->next_free)++ = 0, \
+ (void) 0)
+
+# define obstack_1grow(h, datum) \
+ (((obstack_room (h) < 1) \
+ ? (_obstack_newchunk ((h), 1), 0) : 0), \
+ obstack_1grow_fast (h, datum))
+
+# define obstack_ptr_grow(h, datum) \
+ (((obstack_room (h) < sizeof (char *)) \
+ ? (_obstack_newchunk ((h), sizeof (char *)), 0) : 0), \
+ obstack_ptr_grow_fast (h, datum))
+
+# define obstack_int_grow(h, datum) \
+ (((obstack_room (h) < sizeof (int)) \
+ ? (_obstack_newchunk ((h), sizeof (int)), 0) : 0), \
+ obstack_int_grow_fast (h, datum))
+
+# define obstack_ptr_grow_fast(h, aptr) \
+ (((const void **) ((h)->next_free += sizeof (void *)))[-1] = (aptr), \
+ (void) 0)
+
+# define obstack_int_grow_fast(h, aint) \
+ (((int *) ((h)->next_free += sizeof (int)))[-1] = (aint), \
+ (void) 0)
+
+# define obstack_blank(h, length) \
+ ((h)->temp.i = (length), \
+ ((obstack_room (h) < (h)->temp.i) \
+ ? (_obstack_newchunk ((h), (h)->temp.i), 0) : 0), \
+ obstack_blank_fast (h, (h)->temp.i))
+
+# define obstack_alloc(h, length) \
+ (obstack_blank ((h), (length)), obstack_finish ((h)))
+
+# define obstack_copy(h, where, length) \
+ (obstack_grow ((h), (where), (length)), obstack_finish ((h)))
+
+# define obstack_copy0(h, where, length) \
+ (obstack_grow0 ((h), (where), (length)), obstack_finish ((h)))
+
+# define obstack_finish(h) \
+ (((h)->next_free == (h)->object_base \
+ ? (((h)->maybe_empty_object = 1), 0) \
+ : 0), \
+ (h)->temp.p = (h)->object_base, \
+ (h)->next_free \
+ = __PTR_ALIGN ((h)->object_base, (h)->next_free, \
+ (h)->alignment_mask), \
+ (((size_t) ((h)->next_free - (char *) (h)->chunk) \
+ > (size_t) ((h)->chunk_limit - (char *) (h)->chunk)) \
+ ? ((h)->next_free = (h)->chunk_limit) : 0), \
+ (h)->object_base = (h)->next_free, \
+ (h)->temp.p)
+
+# define obstack_free(h, obj) \
+ ((h)->temp.p = (void *) (obj), \
+ (((h)->temp.p > (void *) (h)->chunk \
+ && (h)->temp.p < (void *) (h)->chunk_limit) \
+ ? (void) ((h)->next_free = (h)->object_base = (char *) (h)->temp.p) \
+ : _obstack_free ((h), (h)->temp.p)))
#endif /* not __GNUC__ */
@@ -509,4 +543,4 @@ __extension__ \
} /* C++ */
#endif
-#endif /* obstack.h */
+#endif /* _OBSTACK_H */
diff --git a/lib/pathmax.h b/lib/pathmax.h
index bd0bc00..aee22f8 100644
--- a/lib/pathmax.h
+++ b/lib/pathmax.h
@@ -1,7 +1,5 @@
-/* -*- buffer-read-only: t -*- vi: set ro: */
-/* DO NOT EDIT! GENERATED AUTOMATICALLY! */
/* Define PATH_MAX somehow. Requires sys/types.h.
- Copyright (C) 1992, 1999, 2001, 2003, 2005, 2009-2012 Free Software
+ Copyright (C) 1992, 1999, 2001, 2003, 2005, 2009-2016 Free Software
Foundation, Inc.
This program is free software; you can redistribute it and/or modify
diff --git a/lib/progname.c b/lib/progname.c
new file mode 100644
index 0000000..debb760
--- /dev/null
+++ b/lib/progname.c
@@ -0,0 +1,92 @@
+/* Program name management.
+ Copyright (C) 2001-2003, 2005-2016 Free Software Foundation, Inc.
+ Written by Bruno Haible <bruno@clisp.org>, 2001.
+
+ This 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>
+
+/* Specification. */
+#undef ENABLE_RELOCATABLE /* avoid defining set_program_name as a macro */
+#include "progname.h"
+
+#include <errno.h> /* get program_invocation_name declaration */
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+
+
+/* String containing name the program is called with.
+ To be initialized by main(). */
+const char *program_name = NULL;
+
+/* Set program_name, based on argv[0].
+ argv0 must be a string allocated with indefinite extent, and must not be
+ modified after this call. */
+void
+set_program_name (const char *argv0)
+{
+ /* libtool creates a temporary executable whose name is sometimes prefixed
+ with "lt-" (depends on the platform). It also makes argv[0] absolute.
+ But the name of the temporary executable is a detail that should not be
+ visible to the end user and to the test suite.
+ Remove this "<dirname>/.libs/" or "<dirname>/.libs/lt-" prefix here. */
+ const char *slash;
+ const char *base;
+
+ /* Sanity check. POSIX requires the invoking process to pass a non-NULL
+ argv[0]. */
+ if (argv0 == NULL)
+ {
+ /* It's a bug in the invoking program. Help diagnosing it. */
+ fputs ("A NULL argv[0] was passed through an exec system call.\n",
+ stderr);
+ abort ();
+ }
+
+ slash = strrchr (argv0, '/');
+ base = (slash != NULL ? slash + 1 : argv0);
+ if (base - argv0 >= 7 && strncmp (base - 7, "/.libs/", 7) == 0)
+ {
+ argv0 = base;
+ if (strncmp (base, "lt-", 3) == 0)
+ {
+ argv0 = base + 3;
+ /* On glibc systems, remove the "lt-" prefix from the variable
+ program_invocation_short_name. */
+#if HAVE_DECL_PROGRAM_INVOCATION_SHORT_NAME
+ program_invocation_short_name = (char *) argv0;
+#endif
+ }
+ }
+
+ /* But don't strip off a leading <dirname>/ in general, because when the user
+ runs
+ /some/hidden/place/bin/cp foo foo
+ he should get the error message
+ /some/hidden/place/bin/cp: `foo' and `foo' are the same file
+ not
+ cp: `foo' and `foo' are the same file
+ */
+
+ program_name = argv0;
+
+ /* On glibc systems, the error() function comes from libc and uses the
+ variable program_invocation_name, not program_name. So set this variable
+ as well. */
+#if HAVE_DECL_PROGRAM_INVOCATION_NAME
+ program_invocation_name = (char *) argv0;
+#endif
+}
diff --git a/lib/progname.h b/lib/progname.h
new file mode 100644
index 0000000..0a57407
--- /dev/null
+++ b/lib/progname.h
@@ -0,0 +1,62 @@
+/* Program name management.
+ Copyright (C) 2001-2004, 2006, 2009-2016 Free Software Foundation, Inc.
+ Written by Bruno Haible <bruno@clisp.org>, 2001.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+#ifndef _PROGNAME_H
+#define _PROGNAME_H
+
+/* Programs using this file should do the following in main():
+ set_program_name (argv[0]);
+ */
+
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+
+/* String containing name the program is called with. */
+extern const char *program_name;
+
+/* Set program_name, based on argv[0].
+ argv0 must be a string allocated with indefinite extent, and must not be
+ modified after this call. */
+extern void set_program_name (const char *argv0);
+
+#if ENABLE_RELOCATABLE
+
+/* Set program_name, based on argv[0], and original installation prefix and
+ directory, for relocatability. */
+extern void set_program_name_and_installdir (const char *argv0,
+ const char *orig_installprefix,
+ const char *orig_installdir);
+#undef set_program_name
+#define set_program_name(ARG0) \
+ set_program_name_and_installdir (ARG0, INSTALLPREFIX, INSTALLDIR)
+
+/* Return the full pathname of the current executable, based on the earlier
+ call to set_program_name_and_installdir. Return NULL if unknown. */
+extern char *get_full_program_name (void);
+
+#endif
+
+
+#ifdef __cplusplus
+}
+#endif
+
+
+#endif /* _PROGNAME_H */
diff --git a/lib/qcopy-acl.c b/lib/qcopy-acl.c
new file mode 100644
index 0000000..c7bdfbb
--- /dev/null
+++ b/lib/qcopy-acl.c
@@ -0,0 +1,51 @@
+/* Copy access control list from one file to another. -*- coding: utf-8 -*-
+
+ Copyright (C) 2002-2003, 2005-2016 Free Software Foundation, Inc.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+ Written by Paul Eggert, Andreas Grünbacher, and Bruno Haible. */
+
+#include <config.h>
+
+#include "acl.h"
+
+#include "acl-internal.h"
+
+
+/* Copy access control lists from one file to another. If SOURCE_DESC is
+ a valid file descriptor, use file descriptor operations, else use
+ filename based operations on SRC_NAME. Likewise for DEST_DESC and
+ DST_NAME.
+ If access control lists are not available, fchmod the target file to
+ MODE. Also sets the non-permission bits of the destination file
+ (S_ISUID, S_ISGID, S_ISVTX) to those from MODE if any are set.
+ Return 0 if successful.
+ Return -2 and set errno for an error relating to the source file.
+ Return -1 and set errno for an error relating to the destination file. */
+
+int
+qcopy_acl (const char *src_name, int source_desc, const char *dst_name,
+ int dest_desc, mode_t mode)
+{
+ struct permission_context ctx;
+ int ret;
+
+ ret = get_permissions (src_name, source_desc, mode, &ctx);
+ if (ret != 0)
+ return -2;
+ ret = set_permissions (&ctx, dst_name, dest_desc);
+ free_permission_context (&ctx);
+ return ret;
+}
diff --git a/lib/qset-acl.c b/lib/qset-acl.c
new file mode 100644
index 0000000..77227dc
--- /dev/null
+++ b/lib/qset-acl.c
@@ -0,0 +1,49 @@
+/* qset-acl.c - set access control list equivalent to a mode
+
+ Copyright (C) 2002-2003, 2005-2016 Free Software Foundation, Inc.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+ Written by Paul Eggert and Andreas Gruenbacher, and Bruno Haible. */
+
+#include <config.h>
+
+#define ACL_INTERNAL_INLINE _GL_EXTERN_INLINE
+
+#include <string.h>
+#include "acl.h"
+
+#include "acl-internal.h"
+
+
+/* Set the access control lists of a file. If DESC is a valid file
+ descriptor, use file descriptor operations where available, else use
+ filename based operations on NAME. If access control lists are not
+ available, fchmod the target file to MODE. Also sets the
+ non-permission bits of the destination file (S_ISUID, S_ISGID, S_ISVTX)
+ to those from MODE if any are set.
+ Return 0 if successful. Return -1 and set errno upon failure. */
+
+int
+qset_acl (char const *name, int desc, mode_t mode)
+{
+ struct permission_context ctx;
+ int ret;
+
+ memset (&ctx, 0, sizeof ctx);
+ ctx.mode = mode;
+ ret = set_permissions (&ctx, name, desc);
+ free_permission_context (&ctx);
+ return ret;
+}
diff --git a/lib/quote.h b/lib/quote.h
index e3b332d..b53d0ea 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-2012 Free Software Foundation, Inc.
+ Copyright (C) 1998-2001, 2003, 2009-2016 Free Software Foundation, Inc.
This 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/quotearg.c b/lib/quotearg.c
index 7fb866d..07658b2 100644
--- a/lib/quotearg.c
+++ b/lib/quotearg.c
@@ -1,6 +1,6 @@
/* quotearg.c - quote arguments for output
- Copyright (C) 1998-2002, 2004-2012 Free Software Foundation, Inc.
+ Copyright (C) 1998-2002, 2004-2016 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -29,6 +29,7 @@
#include "quotearg.h"
#include "quote.h"
+#include "minmax.h"
#include "xalloc.h"
#include "c-strcaseeq.h"
#include "localcharset.h"
@@ -37,6 +38,7 @@
#include <errno.h>
#include <limits.h>
#include <stdbool.h>
+#include <stdint.h>
#include <stdlib.h>
#include <string.h>
#include <wchar.h>
@@ -77,6 +79,8 @@ char const *const quoting_style_args[] =
"literal",
"shell",
"shell-always",
+ "shell-escape",
+ "shell-escape-always",
"c",
"c-maybe",
"escape",
@@ -91,6 +95,8 @@ enum quoting_style const quoting_style_vals[] =
literal_quoting_style,
shell_quoting_style,
shell_always_quoting_style,
+ shell_escape_quoting_style,
+ shell_escape_always_quoting_style,
c_quoting_style,
c_maybe_quoting_style,
escape_quoting_style,
@@ -116,7 +122,7 @@ clone_quoting_options (struct quoting_options *o)
/* Get the value of O's quoting style. If O is null, use the default. */
enum quoting_style
-get_quoting_style (struct quoting_options *o)
+get_quoting_style (struct quoting_options const *o)
{
return (o ? o : &default_quoting_options)->style;
}
@@ -178,7 +184,7 @@ set_custom_quoting (struct quoting_options *o,
static struct quoting_options /* NOT PURE!! */
quoting_options_from_style (enum quoting_style style)
{
- struct quoting_options o = { 0, 0, { 0 }, NULL, NULL };
+ struct quoting_options o = { literal_quoting_style, 0, { 0 }, NULL, NULL };
if (style == custom_quoting_style)
abort ();
o.style = style;
@@ -248,11 +254,15 @@ quotearg_buffer_restyled (char *buffer, size_t buffersize,
{
size_t i;
size_t len = 0;
+ size_t orig_buffersize = 0;
char const *quote_string = 0;
size_t quote_string_len = 0;
bool backslash_escapes = false;
bool unibyte_locale = MB_CUR_MAX == 1;
bool elide_outer_quotes = (flags & QA_ELIDE_OUTER_QUOTES) != 0;
+ bool pending_shell_escape_end = false;
+ bool encountered_single_quote = false;
+ bool all_c_and_shell_quote_compat = true;
#define STORE(c) \
do \
@@ -263,6 +273,38 @@ quotearg_buffer_restyled (char *buffer, size_t buffersize,
} \
while (0)
+#define START_ESC() \
+ do \
+ { \
+ if (elide_outer_quotes) \
+ goto force_outer_quoting_style; \
+ escaping = true; \
+ if (quoting_style == shell_always_quoting_style \
+ && ! pending_shell_escape_end) \
+ { \
+ STORE ('\''); \
+ STORE ('$'); \
+ STORE ('\''); \
+ pending_shell_escape_end = true; \
+ } \
+ STORE ('\\'); \
+ } \
+ while (0)
+
+#define END_ESC() \
+ do \
+ { \
+ if (pending_shell_escape_end && ! escaping) \
+ { \
+ STORE ('\''); \
+ STORE ('\''); \
+ pending_shell_escape_end = false; \
+ } \
+ } \
+ while (0)
+
+ process_input:
+
switch (quoting_style)
{
case c_maybe_quoting_style:
@@ -321,11 +363,18 @@ quotearg_buffer_restyled (char *buffer, size_t buffersize,
}
break;
+ case shell_escape_quoting_style:
+ backslash_escapes = true;
+ /* Fall through. */
case shell_quoting_style:
- quoting_style = shell_always_quoting_style;
elide_outer_quotes = true;
/* Fall through. */
+ case shell_escape_always_quoting_style:
+ if (!elide_outer_quotes)
+ backslash_escapes = true;
+ /* Fall through. */
case shell_always_quoting_style:
+ quoting_style = shell_always_quoting_style;
if (!elide_outer_quotes)
STORE ('\'');
quote_string = "'";
@@ -345,10 +394,18 @@ quotearg_buffer_restyled (char *buffer, size_t buffersize,
unsigned char c;
unsigned char esc;
bool is_right_quote = false;
+ bool escaping = false;
+ bool c_and_shell_quote_compat = false;
if (backslash_escapes
+ && quoting_style != shell_always_quoting_style
&& quote_string_len
- && i + quote_string_len <= argsize
+ && (i + quote_string_len
+ <= (argsize == SIZE_MAX && 1 < quote_string_len
+ /* Use strlen only if we must: when argsize is SIZE_MAX,
+ and when the quote string is more than 1 byte long.
+ If we do call strlen, save the result. */
+ ? (argsize = strlen (arg)) : argsize))
&& memcmp (arg + i, quote_string, quote_string_len) == 0)
{
if (elide_outer_quotes)
@@ -362,15 +419,15 @@ quotearg_buffer_restyled (char *buffer, size_t buffersize,
case '\0':
if (backslash_escapes)
{
- if (elide_outer_quotes)
- goto force_outer_quoting_style;
- STORE ('\\');
+ START_ESC ();
/* If quote_string were to begin with digits, we'd need to
test for the end of the arg as well. However, it's
hard to imagine any locale that would use digits in
quotes, and set_custom_quoting is documented not to
- accept them. */
- if (i + 1 < argsize && '0' <= arg[i + 1] && arg[i + 1] <= '9')
+ accept them. Use only a single \0 with shell-escape
+ as currently digits are not printed within $'...' */
+ if (quoting_style != shell_always_quoting_style
+ && i + 1 < argsize && '0' <= arg[i + 1] && arg[i + 1] <= '9')
{
STORE ('0');
STORE ('0');
@@ -431,6 +488,14 @@ quotearg_buffer_restyled (char *buffer, size_t buffersize,
case '\t': esc = 't'; goto c_and_shell_escape;
case '\v': esc = 'v'; goto c_escape;
case '\\': esc = c;
+ /* Never need to escape '\' in shell case. */
+ if (quoting_style == shell_always_quoting_style)
+ {
+ if (elide_outer_quotes)
+ goto force_outer_quoting_style;
+ goto store_c;
+ }
+
/* No need to escape the escape if we are trying to elide
outer quotes and nothing else is problematic. */
if (backslash_escapes && elide_outer_quotes && quote_string_len)
@@ -458,6 +523,8 @@ quotearg_buffer_restyled (char *buffer, size_t buffersize,
break;
/* Fall through. */
case ' ':
+ c_and_shell_quote_compat = true;
+ /* Fall through. */
case '!': /* special in bash */
case '"': case '$': case '&':
case '(': case ')': case '*': case ';':
@@ -476,13 +543,26 @@ quotearg_buffer_restyled (char *buffer, size_t buffersize,
break;
case '\'':
+ encountered_single_quote = true;
+ c_and_shell_quote_compat = true;
if (quoting_style == shell_always_quoting_style)
{
if (elide_outer_quotes)
goto force_outer_quoting_style;
+
+ if (buffersize && ! orig_buffersize)
+ {
+ /* Just scan string to see if supports a more concise
+ representation, rather than writing a longer string
+ but returning the length of the more concise form. */
+ orig_buffersize = buffersize;
+ buffersize = 0;
+ }
+
STORE ('\'');
STORE ('\\');
STORE ('\'');
+ pending_shell_escape_end = false;
}
break;
@@ -508,6 +588,7 @@ quotearg_buffer_restyled (char *buffer, size_t buffersize,
them. Also, a digit or a special letter would cause
trouble if it appeared in quote_these_too, but that's also
documented as not accepting them. */
+ c_and_shell_quote_compat = true;
break;
default:
@@ -586,6 +667,8 @@ quotearg_buffer_restyled (char *buffer, size_t buffersize,
while (! mbsinit (&mbstate));
}
+ c_and_shell_quote_compat = printable;
+
if (1 < m || (backslash_escapes && ! printable))
{
/* Output a multibyte sequence, or an escaped
@@ -596,9 +679,7 @@ quotearg_buffer_restyled (char *buffer, size_t buffersize,
{
if (backslash_escapes && ! printable)
{
- if (elide_outer_quotes)
- goto force_outer_quoting_style;
- STORE ('\\');
+ START_ESC ();
STORE ('0' + (c >> 6));
STORE ('0' + ((c >> 3) & 7));
c = '0' + (c & 7);
@@ -610,6 +691,7 @@ quotearg_buffer_restyled (char *buffer, size_t buffersize,
}
if (ilim <= i + 1)
break;
+ END_ESC ();
STORE (c);
c = arg[++i];
}
@@ -619,25 +701,49 @@ quotearg_buffer_restyled (char *buffer, size_t buffersize,
}
}
- if (! ((backslash_escapes || elide_outer_quotes)
+ if (! (((backslash_escapes && quoting_style != shell_always_quoting_style)
+ || elide_outer_quotes)
&& quote_these_too
- && quote_these_too[c / INT_BITS] & (1 << (c % INT_BITS)))
+ && quote_these_too[c / INT_BITS] >> (c % INT_BITS) & 1)
&& !is_right_quote)
goto store_c;
store_escape:
- if (elide_outer_quotes)
- goto force_outer_quoting_style;
- STORE ('\\');
+ START_ESC ();
store_c:
+ END_ESC ();
STORE (c);
+
+ if (! c_and_shell_quote_compat)
+ all_c_and_shell_quote_compat = false;
}
if (len == 0 && quoting_style == shell_always_quoting_style
&& elide_outer_quotes)
goto force_outer_quoting_style;
+ /* Single shell quotes (') are commonly enough used as an apostrophe,
+ that we attempt to minimize the quoting in this case. Note itʼs
+ better to use the apostrophe modifier "\u02BC" if possible, as that
+ renders better and works with the word match regex \W+ etc. */
+ if (quoting_style == shell_always_quoting_style && ! elide_outer_quotes
+ && encountered_single_quote)
+ {
+ if (all_c_and_shell_quote_compat)
+ return quotearg_buffer_restyled (buffer, orig_buffersize, arg, argsize,
+ c_quoting_style,
+ flags, quote_these_too,
+ left_quote, right_quote);
+ else if (! buffersize && orig_buffersize)
+ {
+ /* Disable read-only scan, and reprocess to write quoted string. */
+ buffersize = orig_buffersize;
+ len = 0;
+ goto process_input;
+ }
+ }
+
if (quote_string && !elide_outer_quotes)
for (; *quote_string; quote_string++)
STORE (*quote_string);
@@ -649,6 +755,8 @@ quotearg_buffer_restyled (char *buffer, size_t buffersize,
force_outer_quoting_style:
/* Don't reuse quote_these_too, since the addition of outer quotes
sufficiently quotes the specified characters. */
+ if (quoting_style == shell_always_quoting_style && backslash_escapes)
+ quoting_style = shell_escape_always_quoting_style;
return quotearg_buffer_restyled (buffer, buffersize, arg, argsize,
quoting_style,
flags & ~QA_ELIDE_OUTER_QUOTES, NULL,
@@ -724,7 +832,7 @@ struct slotvec
/* Preallocate a slot 0 buffer, so that the caller can always quote
one small component of a "memory exhausted" message in slot 0. */
static char slot0[256];
-static unsigned int nslots = 1;
+static int nslots = 1;
static struct slotvec slotvec0 = {sizeof slot0, slot0};
static struct slotvec *slotvec = &slotvec0;
@@ -732,7 +840,7 @@ void
quotearg_free (void)
{
struct slotvec *sv = slotvec;
- unsigned int i;
+ int i;
for (i = 1; i < nslots; i++)
free (sv[i].val);
if (sv[0].val != slot0)
@@ -763,30 +871,23 @@ quotearg_n_options (int n, char const *arg, size_t argsize,
{
int e = errno;
- unsigned int n0 = n;
struct slotvec *sv = slotvec;
if (n < 0)
abort ();
- if (nslots <= n0)
+ if (nslots <= n)
{
- /* FIXME: technically, the type of n1 should be 'unsigned int',
- but that evokes an unsuppressible warning from gcc-4.0.1 and
- older. If gcc ever provides an option to suppress that warning,
- revert to the original type, so that the test in xalloc_oversized
- is once again performed only at compile time. */
- size_t n1 = n0 + 1;
bool preallocated = (sv == &slotvec0);
- if (xalloc_oversized (n1, sizeof *sv))
+ if (MIN (INT_MAX, MIN (PTRDIFF_MAX, SIZE_MAX) / sizeof *sv) <= n)
xalloc_die ();
- slotvec = sv = xrealloc (preallocated ? NULL : sv, n1 * sizeof *sv);
+ slotvec = sv = xrealloc (preallocated ? NULL : sv, (n + 1) * sizeof *sv);
if (preallocated)
*sv = slotvec0;
- memset (sv + nslots, 0, (n1 - nslots) * sizeof *sv);
- nslots = n1;
+ memset (sv + nslots, 0, (n + 1 - nslots) * sizeof *sv);
+ nslots = n + 1;
}
{
@@ -896,6 +997,15 @@ quotearg_colon_mem (char const *arg, size_t argsize)
}
char *
+quotearg_n_style_colon (int n, enum quoting_style s, char const *arg)
+{
+ struct quoting_options options;
+ options = quoting_options_from_style (s);
+ set_char_quoting (&options, ':', 1);
+ return quotearg_n_options (n, arg, SIZE_MAX, &options);
+}
+
+char *
quotearg_n_custom (int n, char const *left_quote,
char const *right_quote, char const *arg)
{
diff --git a/lib/quotearg.h b/lib/quotearg.h
index e6b08ab..bc29052 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-2012 Free Software Foundation,
+ Copyright (C) 1998-2002, 2004, 2006, 2008-2016 Free Software Foundation,
Inc.
This program is free software: you can redistribute it and/or modify
@@ -73,6 +73,37 @@ enum quoting_style
*/
shell_always_quoting_style,
+ /* Quote names for the shell if they contain shell metacharacters
+ or other problematic characters (ls --quoting-style=shell-escape).
+ Non printable characters are quoted using the $'...' syntax,
+ which originated in ksh93 and is widely supported by most shells,
+ and proposed for inclusion in POSIX.
+
+ quotearg_buffer:
+ "simple", "''$'\\0'' '$'\\t\\n'\\''\"'$'\\033''??/\\'", "a:b"
+ quotearg:
+ "simple", "''$'\\0'' '$'\\t\\n'\\''\"'$'\\033''??/\\'", "a:b"
+ quotearg_colon:
+ "simple", "''$'\\0'' '$'\\t\\n'\\''\"'$'\\033''??/\\'", "'a:b'"
+ */
+ shell_escape_quoting_style,
+
+ /* Quote names for the shell even if they would normally not
+ require quoting (ls --quoting-style=shell-escape).
+ Non printable characters are quoted using the $'...' syntax,
+ which originated in ksh93 and is widely supported by most shells,
+ and proposed for inclusion in POSIX. Behaves like
+ shell_escape_quoting_style if QA_ELIDE_OUTER_QUOTES is in effect.
+
+ quotearg_buffer:
+ "simple", "''$'\\0'' '$'\\t\\n'\\''\"'$'\\033''??/\'", "a:b"
+ quotearg:
+ "simple", "''$'\\0'' '$'\\t\\n'\\''\"'$'\\033''??/\'", "a:b"
+ quotearg_colon:
+ "simple", "''$'\\0'' '$'\\t\\n'\\''\"'$'\\033''??/\'", "'a:b'"
+ */
+ shell_escape_always_quoting_style,
+
/* Quote names as for a C language string (ls --quoting-style=c).
Behaves like c_maybe_quoting_style if QA_ELIDE_OUTER_QUOTES is
in effect. Split into consecutive strings if
@@ -247,7 +278,7 @@ struct quoting_options;
struct quoting_options *clone_quoting_options (struct quoting_options *o);
/* Get the value of O's quoting style. If O is null, use the default. */
-enum quoting_style get_quoting_style (struct quoting_options *o);
+enum quoting_style get_quoting_style (struct quoting_options const *o);
/* In O (or in the default if O is null),
set the value of the quoting style to S. */
@@ -362,6 +393,9 @@ char *quotearg_colon (char const *arg);
/* Like quotearg_colon (ARG), except it can quote null bytes. */
char *quotearg_colon_mem (char const *arg, size_t argsize);
+/* Like quotearg_n_style, except with ':' quoting enabled. */
+char *quotearg_n_style_colon (int n, enum quoting_style s, char const *arg);
+
/* Like quotearg_n_style (N, S, ARG) but with S as custom_quoting_style
with left quote as LEFT_QUOTE and right quote as RIGHT_QUOTE. See
set_custom_quoting for a description of acceptable LEFT_QUOTE and
diff --git a/lib/readlink.c b/lib/readlink.c
index baac132..e6c3925 100644
--- a/lib/readlink.c
+++ b/lib/readlink.c
@@ -1,5 +1,5 @@
/* Stub for readlink().
- Copyright (C) 2003-2007, 2009-2012 Free Software Foundation, Inc.
+ Copyright (C) 2003-2007, 2009-2016 Free Software Foundation, Inc.
This 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/ref-add.sin b/lib/ref-add.sin
index 4ec043f..42d3ab0 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-2012 Free Software Foundation, Inc.
+# Copyright (C) 2000, 2009-2016 Free Software Foundation, Inc.
#
# This 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/ref-del.sin b/lib/ref-del.sin
index eb03881..c77b33b 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-2012 Free Software Foundation, Inc.
+# Copyright (C) 2000, 2009-2016 Free Software Foundation, Inc.
#
# This 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/regcomp.c b/lib/regcomp.c
index 160631d..aaa66b9 100644
--- a/lib/regcomp.c
+++ b/lib/regcomp.c
@@ -1,22 +1,25 @@
-/* -*- buffer-read-only: t -*- vi: set ro: */
-/* DO NOT EDIT! GENERATED AUTOMATICALLY! */
/* Extended regular expression matching and search library.
- Copyright (C) 2002-2012 Free Software Foundation, Inc.
+ Copyright (C) 2002-2016 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Isamu Hasegawa <isamu@yamato.ibm.com>.
- This 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.
+ 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
+ <http://www.gnu.org/licenses/>. */
+
+#ifdef _LIBC
+# include <locale/weight.h>
+#endif
static reg_errcode_t re_compile_internal (regex_t *preg, const char * pattern,
size_t length, reg_syntax_t syntax);
@@ -95,20 +98,20 @@ static reg_errcode_t build_charclass (RE_TRANSLATE_TYPE trans,
bitset_t sbcset,
re_charset_t *mbcset,
Idx *char_class_alloc,
- const unsigned char *class_name,
+ const char *class_name,
reg_syntax_t syntax);
#else /* not RE_ENABLE_I18N */
static reg_errcode_t build_equiv_class (bitset_t sbcset,
const unsigned char *name);
static reg_errcode_t build_charclass (RE_TRANSLATE_TYPE trans,
bitset_t sbcset,
- const unsigned char *class_name,
+ const char *class_name,
reg_syntax_t syntax);
#endif /* not RE_ENABLE_I18N */
static bin_tree_t *build_charclass_op (re_dfa_t *dfa,
RE_TRANSLATE_TYPE trans,
- const unsigned char *class_name,
- const unsigned char *extra,
+ const char *class_name,
+ const char *extra,
bool non_match, reg_errcode_t *err);
static bin_tree_t *create_tree (re_dfa_t *dfa,
bin_tree_t *left, bin_tree_t *right,
@@ -150,9 +153,9 @@ static const char __re_error_msgid[] =
gettext_noop ("Invalid back reference") /* REG_ESUBREG */
"\0"
#define REG_EBRACK_IDX (REG_ESUBREG_IDX + sizeof "Invalid back reference")
- gettext_noop ("Unmatched [ or [^") /* REG_EBRACK */
+ gettext_noop ("Unmatched [, [^, [:, [., or [=") /* REG_EBRACK */
"\0"
-#define REG_EPAREN_IDX (REG_EBRACK_IDX + sizeof "Unmatched [ or [^")
+#define REG_EPAREN_IDX (REG_EBRACK_IDX + sizeof "Unmatched [, [^, [:, [., or [=")
gettext_noop ("Unmatched ( or \\(") /* REG_EPAREN */
"\0"
#define REG_EBRACE_IDX (REG_EPAREN_IDX + sizeof "Unmatched ( or \\(")
@@ -210,17 +213,9 @@ static const size_t __re_error_msgid_idx[] =
Assumes the 'allocated' (and perhaps 'buffer') and 'translate' fields
are set in BUFP on entry. */
-#ifdef _LIBC
-const char *
-re_compile_pattern (pattern, length, bufp)
- const char *pattern;
- size_t length;
- struct re_pattern_buffer *bufp;
-#else /* size_t might promote */
const char *
re_compile_pattern (const char *pattern, size_t length,
struct re_pattern_buffer *bufp)
-#endif
{
reg_errcode_t ret;
@@ -258,8 +253,7 @@ reg_syntax_t re_syntax_options;
defined in regex.h. We return the old syntax. */
reg_syntax_t
-re_set_syntax (syntax)
- reg_syntax_t syntax;
+re_set_syntax (reg_syntax_t syntax)
{
reg_syntax_t ret = re_syntax_options;
@@ -271,8 +265,7 @@ weak_alias (__re_set_syntax, re_set_syntax)
#endif
int
-re_compile_fastmap (bufp)
- struct re_pattern_buffer *bufp;
+re_compile_fastmap (struct re_pattern_buffer *bufp)
{
re_dfa_t *dfa = bufp->buffer;
char *fastmap = bufp->fastmap;
@@ -293,7 +286,7 @@ weak_alias (__re_compile_fastmap, re_compile_fastmap)
#endif
static inline void
-__attribute ((always_inline))
+__attribute__ ((always_inline))
re_set_fastmap (char *fastmap, bool icase, int ch)
{
fastmap[ch] = 1;
@@ -336,7 +329,7 @@ re_compile_fastmap_iter (regex_t *bufp, const re_dfastate_t *init_state,
memset (&state, '\0', sizeof (state));
if (__mbrtowc (&wc, (const char *) buf, p - buf,
&state) == p - buf
- && (__wcrtomb ((char *) buf, towlower (wc), &state)
+ && (__wcrtomb ((char *) buf, __towlower (wc), &state)
!= (size_t) -1))
re_set_fastmap (fastmap, false, buf[0]);
}
@@ -412,7 +405,7 @@ re_compile_fastmap_iter (regex_t *bufp, const re_dfastate_t *init_state,
re_set_fastmap (fastmap, icase, *(unsigned char *) buf);
if ((bufp->syntax & RE_ICASE) && dfa->mb_cur_max > 1)
{
- if (__wcrtomb (buf, towlower (cset->mbchars[i]), &state)
+ if (__wcrtomb (buf, __towlower (cset->mbchars[i]), &state)
!= (size_t) -1)
re_set_fastmap (fastmap, false, *(unsigned char *) buf);
}
@@ -471,10 +464,7 @@ re_compile_fastmap_iter (regex_t *bufp, const re_dfastate_t *init_state,
the return codes and their meanings.) */
int
-regcomp (preg, pattern, cflags)
- regex_t *_Restrict_ preg;
- const char *_Restrict_ pattern;
- int cflags;
+regcomp (regex_t *_Restrict_ preg, const char *_Restrict_ pattern, int cflags)
{
reg_errcode_t ret;
reg_syntax_t syntax = ((cflags & REG_EXTENDED) ? RE_SYNTAX_POSIX_EXTENDED
@@ -532,18 +522,9 @@ weak_alias (__regcomp, regcomp)
/* Returns a message corresponding to an error code, ERRCODE, returned
from either regcomp or regexec. We don't use PREG here. */
-#ifdef _LIBC
-size_t
-regerror (errcode, preg, errbuf, errbuf_size)
- int errcode;
- const regex_t *_Restrict_ preg;
- char *_Restrict_ errbuf;
- size_t errbuf_size;
-#else /* size_t might promote */
size_t
-regerror (int errcode, const regex_t *_Restrict_ preg,
- char *_Restrict_ errbuf, size_t errbuf_size)
-#endif
+regerror (int errcode, const regex_t *_Restrict_ preg, char *_Restrict_ errbuf,
+ size_t errbuf_size)
{
const char *msg;
size_t msg_size;
@@ -587,7 +568,7 @@ weak_alias (__regerror, regerror)
static const bitset_t utf8_sb_map =
{
/* Set the first 128 bits. */
-# ifdef __GNUC__
+# if defined __GNUC__ && !defined __STRICT_ANSI__
[0 ... 0x80 / BITSET_WORD_BITS - 1] = BITSET_WORD_MAX
# else
# if 4 * BITSET_WORD_BITS < ASCII_CHARS
@@ -659,12 +640,14 @@ free_dfa_content (re_dfa_t *dfa)
/* Free dynamically allocated space used by PREG. */
void
-regfree (preg)
- regex_t *preg;
+regfree (regex_t *preg)
{
re_dfa_t *dfa = preg->buffer;
if (BE (dfa != NULL, 1))
- free_dfa_content (dfa);
+ {
+ lock_fini (dfa->lock);
+ free_dfa_content (dfa);
+ }
preg->buffer = NULL;
preg->allocated = 0;
@@ -693,8 +676,7 @@ char *
regcomp/regexec above without link errors. */
weak_function
# endif
-re_comp (s)
- const char *s;
+re_comp (const char *s)
{
reg_errcode_t ret;
char *fastmap;
@@ -785,6 +767,8 @@ re_compile_internal (regex_t *preg, const char * pattern, size_t length,
preg->used = sizeof (re_dfa_t);
err = init_dfa (dfa, length);
+ if (BE (err == REG_NOERROR && lock_init (dfa->lock) != 0, 0))
+ err = REG_ESPACE;
if (BE (err != REG_NOERROR, 0))
{
free_dfa_content (dfa);
@@ -798,8 +782,6 @@ re_compile_internal (regex_t *preg, const char * pattern, size_t length,
strncpy (dfa->re_str, pattern, length + 1);
#endif
- __libc_lock_init (dfa->lock);
-
err = re_string_construct (&regexp, pattern, length, preg->translate,
(syntax & RE_ICASE) != 0, dfa);
if (BE (err != REG_NOERROR, 0))
@@ -807,6 +789,7 @@ re_compile_internal (regex_t *preg, const char * pattern, size_t length,
re_compile_internal_free_return:
free_workarea_compile (preg);
re_string_destruct (&regexp);
+ lock_fini (dfa->lock);
free_dfa_content (dfa);
preg->buffer = NULL;
preg->allocated = 0;
@@ -839,6 +822,7 @@ re_compile_internal (regex_t *preg, const char * pattern, size_t length,
if (BE (err != REG_NOERROR, 0))
{
+ lock_fini (dfa->lock);
free_dfa_content (dfa);
preg->buffer = NULL;
preg->allocated = 0;
@@ -954,10 +938,10 @@ static void
internal_function
init_word_char (re_dfa_t *dfa)
{
- dfa->word_ops_used = 1;
int i = 0;
int j;
int ch = 0;
+ dfa->word_ops_used = 1;
if (BE (dfa->map_notascii == 0, 1))
{
bitset_word_t bits0 = 0x00000000;
@@ -1413,7 +1397,7 @@ calc_first (void *extra, bin_tree_t *node)
{
node->first = node;
node->node_idx = re_dfa_add_node (dfa, node->token);
- if (BE (node->node_idx == REG_MISSING, 0))
+ if (BE (node->node_idx == -1, 0))
return REG_ESPACE;
if (node->token.type == ANCHOR)
dfa->nodes[node->node_idx].constraint = node->token.opr.ctx_type;
@@ -1474,8 +1458,8 @@ link_nfa_nodes (void *extra, bin_tree_t *node)
right = node->right->first->node_idx;
else
right = node->next->node_idx;
- assert (REG_VALID_INDEX (left));
- assert (REG_VALID_INDEX (right));
+ assert (left > -1);
+ assert (right > -1);
err = re_node_set_init_2 (dfa->edests + idx, left, right);
}
break;
@@ -1525,7 +1509,7 @@ duplicate_node_closure (re_dfa_t *dfa, Idx top_org_node, Idx top_clone_node,
org_dest = dfa->nexts[org_node];
re_node_set_empty (dfa->edests + clone_node);
clone_dest = duplicate_node (dfa, org_dest, constraint);
- if (BE (clone_dest == REG_MISSING, 0))
+ if (BE (clone_dest == -1, 0))
return REG_ESPACE;
dfa->nexts[clone_node] = dfa->nexts[org_node];
ok = re_node_set_insert (dfa->edests + clone_node, clone_dest);
@@ -1558,7 +1542,7 @@ duplicate_node_closure (re_dfa_t *dfa, Idx top_org_node, Idx top_clone_node,
/* In case the node has another constraint, append it. */
constraint |= dfa->nodes[org_node].constraint;
clone_dest = duplicate_node (dfa, org_dest, constraint);
- if (BE (clone_dest == REG_MISSING, 0))
+ if (BE (clone_dest == -1, 0))
return REG_ESPACE;
ok = re_node_set_insert (dfa->edests + clone_node, clone_dest);
if (BE (! ok, 0))
@@ -1572,12 +1556,12 @@ duplicate_node_closure (re_dfa_t *dfa, Idx top_org_node, Idx top_clone_node,
re_node_set_empty (dfa->edests + clone_node);
/* Search for a duplicated node which satisfies the constraint. */
clone_dest = search_duplicated_node (dfa, org_dest, constraint);
- if (clone_dest == REG_MISSING)
+ if (clone_dest == -1)
{
/* There is no such duplicated node, create a new one. */
reg_errcode_t err;
clone_dest = duplicate_node (dfa, org_dest, constraint);
- if (BE (clone_dest == REG_MISSING, 0))
+ if (BE (clone_dest == -1, 0))
return REG_ESPACE;
ok = re_node_set_insert (dfa->edests + clone_node, clone_dest);
if (BE (! ok, 0))
@@ -1598,7 +1582,7 @@ duplicate_node_closure (re_dfa_t *dfa, Idx top_org_node, Idx top_clone_node,
org_dest = dfa->edests[org_node].elems[1];
clone_dest = duplicate_node (dfa, org_dest, constraint);
- if (BE (clone_dest == REG_MISSING, 0))
+ if (BE (clone_dest == -1, 0))
return REG_ESPACE;
ok = re_node_set_insert (dfa->edests + clone_node, clone_dest);
if (BE (! ok, 0))
@@ -1624,18 +1608,18 @@ search_duplicated_node (const re_dfa_t *dfa, Idx org_node,
&& constraint == dfa->nodes[idx].constraint)
return idx; /* Found. */
}
- return REG_MISSING; /* Not found. */
+ return -1; /* Not found. */
}
/* Duplicate the node whose index is ORG_IDX and set the constraint CONSTRAINT.
- Return the index of the new node, or REG_MISSING if insufficient storage is
+ Return the index of the new node, or -1 if insufficient storage is
available. */
static Idx
duplicate_node (re_dfa_t *dfa, Idx org_idx, unsigned int constraint)
{
Idx dup_idx = re_dfa_add_node (dfa, dfa->nodes[org_idx]);
- if (BE (dup_idx != REG_MISSING, 1))
+ if (BE (dup_idx != -1, 1))
{
dfa->nodes[dup_idx].constraint = constraint;
dfa->nodes[dup_idx].constraint |= dfa->nodes[org_idx].constraint;
@@ -1694,7 +1678,7 @@ calc_eclosure (re_dfa_t *dfa)
}
#ifdef DEBUG
- assert (dfa->eclosures[node_idx].nelem != REG_MISSING);
+ assert (dfa->eclosures[node_idx].nelem != -1);
#endif
/* If we have already calculated, skip it. */
@@ -1730,7 +1714,7 @@ calc_eclosure_iter (re_node_set *new_set, re_dfa_t *dfa, Idx node, bool root)
/* This indicates that we are calculating this node now.
We reference this value to avoid infinite loop. */
- dfa->eclosures[node].nelem = REG_MISSING;
+ dfa->eclosures[node].nelem = -1;
/* If the current node has constraints, duplicate all nodes
since they must inherit the constraints. */
@@ -1752,7 +1736,7 @@ calc_eclosure_iter (re_node_set *new_set, re_dfa_t *dfa, Idx node, bool root)
Idx edest = dfa->edests[node].elems[i];
/* If calculating the epsilon closure of 'edest' is in progress,
return intermediate result. */
- if (dfa->eclosures[edest].nelem == REG_MISSING)
+ if (dfa->eclosures[edest].nelem == -1)
{
incomplete = true;
continue;
@@ -2183,6 +2167,7 @@ parse_reg_exp (re_string_t *regexp, regex_t *preg, re_token_t *token,
{
re_dfa_t *dfa = preg->buffer;
bin_tree_t *tree, *branch = NULL;
+ bitset_word_t initial_bkref_map = dfa->completed_bkref_map;
tree = parse_branch (regexp, preg, token, syntax, nest, err);
if (BE (*err != REG_NOERROR && tree == NULL, 0))
return NULL;
@@ -2193,9 +2178,16 @@ parse_reg_exp (re_string_t *regexp, regex_t *preg, re_token_t *token,
if (token->type != OP_ALT && token->type != END_OF_RE
&& (nest == 0 || token->type != OP_CLOSE_SUBEXP))
{
+ bitset_word_t accumulated_bkref_map = dfa->completed_bkref_map;
+ dfa->completed_bkref_map = initial_bkref_map;
branch = parse_branch (regexp, preg, token, syntax, nest, err);
if (BE (*err != REG_NOERROR && branch == NULL, 0))
- return NULL;
+ {
+ if (tree != NULL)
+ postorder (tree, free_tree, NULL);
+ return NULL;
+ }
+ dfa->completed_bkref_map |= accumulated_bkref_map;
}
else
branch = NULL;
@@ -2423,8 +2415,8 @@ parse_expression (re_string_t *regexp, regex_t *preg, re_token_t *token,
case OP_WORD:
case OP_NOTWORD:
tree = build_charclass_op (dfa, regexp->trans,
- (const unsigned char *) "alnum",
- (const unsigned char *) "_",
+ "alnum",
+ "_",
token->type == OP_NOTWORD, err);
if (BE (*err != REG_NOERROR && tree == NULL, 0))
return NULL;
@@ -2432,8 +2424,8 @@ parse_expression (re_string_t *regexp, regex_t *preg, re_token_t *token,
case OP_SPACE:
case OP_NOTSPACE:
tree = build_charclass_op (dfa, regexp->trans,
- (const unsigned char *) "space",
- (const unsigned char *) "",
+ "space",
+ "",
token->type == OP_NOTSPACE, err);
if (BE (*err != REG_NOERROR && tree == NULL, 0))
return NULL;
@@ -2456,14 +2448,22 @@ parse_expression (re_string_t *regexp, regex_t *preg, re_token_t *token,
while (token->type == OP_DUP_ASTERISK || token->type == OP_DUP_PLUS
|| token->type == OP_DUP_QUESTION || token->type == OP_OPEN_DUP_NUM)
{
- tree = parse_dup_op (tree, regexp, dfa, token, syntax, err);
- if (BE (*err != REG_NOERROR && tree == NULL, 0))
- return NULL;
+ bin_tree_t *dup_tree = parse_dup_op (tree, regexp, dfa, token,
+ syntax, err);
+ if (BE (*err != REG_NOERROR && dup_tree == NULL, 0))
+ {
+ if (tree != NULL)
+ postorder (tree, free_tree, NULL);
+ return NULL;
+ }
+ tree = dup_tree;
/* In BRE consecutive duplications are not allowed. */
if ((syntax & RE_CONTEXT_INVALID_DUP)
&& (token->type == OP_DUP_ASTERISK
|| token->type == OP_OPEN_DUP_NUM))
{
+ if (tree != NULL)
+ postorder (tree, free_tree, NULL);
*err = REG_BADRPT;
return NULL;
}
@@ -2533,7 +2533,7 @@ parse_dup_op (bin_tree_t *elem, re_string_t *regexp, re_dfa_t *dfa,
{
end = 0;
start = fetch_number (regexp, token, syntax);
- if (start == REG_MISSING)
+ if (start == -1)
{
if (token->type == CHARACTER && token->opr.c == ',')
start = 0; /* We treat "{,m}" as "{0,m}". */
@@ -2543,14 +2543,14 @@ parse_dup_op (bin_tree_t *elem, re_string_t *regexp, re_dfa_t *dfa,
return NULL;
}
}
- if (BE (start != REG_ERROR, 1))
+ if (BE (start != -2, 1))
{
/* We treat "{n}" as "{n,n}". */
end = ((token->type == OP_CLOSE_DUP_NUM) ? start
: ((token->type == CHARACTER && token->opr.c == ',')
- ? fetch_number (regexp, token, syntax) : REG_ERROR));
+ ? fetch_number (regexp, token, syntax) : -2));
}
- if (BE (start == REG_ERROR || end == REG_ERROR, 0))
+ if (BE (start == -2 || end == -2, 0))
{
/* Invalid sequence. */
if (BE (!(syntax & RE_INVALID_INTERVAL_ORD), 0))
@@ -2572,7 +2572,7 @@ parse_dup_op (bin_tree_t *elem, re_string_t *regexp, re_dfa_t *dfa,
return elem;
}
- if (BE ((end != REG_MISSING && start > end)
+ if (BE ((end != -1 && start > end)
|| token->type != OP_CLOSE_DUP_NUM, 0))
{
/* First number greater than second. */
@@ -2580,7 +2580,7 @@ parse_dup_op (bin_tree_t *elem, re_string_t *regexp, re_dfa_t *dfa,
return NULL;
}
- if (BE (RE_DUP_MAX < (end == REG_MISSING ? start : end), 0))
+ if (BE (RE_DUP_MAX < (end == -1 ? start : end), 0))
{
*err = REG_ESIZE;
return NULL;
@@ -2589,7 +2589,7 @@ parse_dup_op (bin_tree_t *elem, re_string_t *regexp, re_dfa_t *dfa,
else
{
start = (token->type == OP_DUP_PLUS) ? 1 : 0;
- end = (token->type == OP_DUP_QUESTION) ? 1 : REG_MISSING;
+ end = (token->type == OP_DUP_QUESTION) ? 1 : -1;
}
fetch_token (token, regexp, syntax);
@@ -2619,6 +2619,8 @@ parse_dup_op (bin_tree_t *elem, re_string_t *regexp, re_dfa_t *dfa,
/* Duplicate ELEM before it is marked optional. */
elem = duplicate_tree (elem, dfa);
+ if (BE (elem == NULL, 0))
+ goto parse_dup_op_espace;
old_tree = tree;
}
else
@@ -2631,7 +2633,7 @@ parse_dup_op (bin_tree_t *elem, re_string_t *regexp, re_dfa_t *dfa,
}
tree = create_tree (dfa, elem, NULL,
- (end == REG_MISSING ? OP_DUP_ASTERISK : OP_ALT));
+ (end == -1 ? OP_DUP_ASTERISK : OP_ALT));
if (BE (tree == NULL, 0))
goto parse_dup_op_espace;
@@ -2639,10 +2641,10 @@ parse_dup_op (bin_tree_t *elem, re_string_t *regexp, re_dfa_t *dfa,
True if the arithmetic type T is signed. */
#define TYPE_SIGNED(t) (! ((t) 0 < (t) -1))
- /* This loop is actually executed only when end != REG_MISSING,
+ /* This loop is actually executed only when end != -1,
to rewrite <re>{0,n} as (<re>(<re>...<re>?)?)?... We have
already created the start+1-th copy. */
- if (TYPE_SIGNED (Idx) || end != REG_MISSING)
+ if (TYPE_SIGNED (Idx) || end != -1)
for (i = start + 2; i <= end; ++i)
{
elem = duplicate_tree (elem, dfa);
@@ -2670,6 +2672,19 @@ parse_dup_op (bin_tree_t *elem, re_string_t *regexp, re_dfa_t *dfa,
#define BRACKET_NAME_BUF_SIZE 32
#ifndef _LIBC
+
+# ifdef RE_ENABLE_I18N
+/* Convert the byte B to the corresponding wide character. In a
+ unibyte locale, treat B as itself if it is an encoding error.
+ In a multibyte locale, return WEOF if B is an encoding error. */
+static wint_t
+parse_byte (unsigned char b, re_charset_t *mbcset)
+{
+ wint_t wc = __btowc (b);
+ return wc == WEOF && !mbcset ? b : wc;
+}
+#endif
+
/* Local function for parse_bracket_exp only used in case of NOT _LIBC.
Build the range expression which starts from START_ELEM, and ends
at END_ELEM. The result are written to MBCSET and SBCSET.
@@ -2713,7 +2728,6 @@ build_range_exp (const reg_syntax_t syntax,
wchar_t wc;
wint_t start_wc;
wint_t end_wc;
- wchar_t cmp_buf[6] = {L'\0', L'\0', L'\0', L'\0', L'\0', L'\0'};
start_ch = ((start_elem->type == SB_CHAR) ? start_elem->opr.ch
: ((start_elem->type == COLL_SYM) ? start_elem->opr.name[0]
@@ -2722,16 +2736,12 @@ build_range_exp (const reg_syntax_t syntax,
: ((end_elem->type == COLL_SYM) ? end_elem->opr.name[0]
: 0));
start_wc = ((start_elem->type == SB_CHAR || start_elem->type == COLL_SYM)
- ? __btowc (start_ch) : start_elem->opr.wch);
+ ? parse_byte (start_ch, mbcset) : start_elem->opr.wch);
end_wc = ((end_elem->type == SB_CHAR || end_elem->type == COLL_SYM)
- ? __btowc (end_ch) : end_elem->opr.wch);
+ ? parse_byte (end_ch, mbcset) : end_elem->opr.wch);
if (start_wc == WEOF || end_wc == WEOF)
return REG_ECOLLATE;
- cmp_buf[0] = start_wc;
- cmp_buf[4] = end_wc;
-
- if (BE ((syntax & RE_NO_EMPTY_RANGES)
- && wcscoll (cmp_buf, cmp_buf + 4) > 0, 0))
+ else if (BE ((syntax & RE_NO_EMPTY_RANGES) && start_wc > end_wc, 0))
return REG_ERANGE;
/* Got valid collation sequence values, add them as a new entry.
@@ -2758,7 +2768,11 @@ build_range_exp (const reg_syntax_t syntax,
new_nranges);
if (BE (new_array_start == NULL || new_array_end == NULL, 0))
- return REG_ESPACE;
+ {
+ re_free (new_array_start);
+ re_free (new_array_end);
+ return REG_ESPACE;
+ }
mbcset->range_starts = new_array_start;
mbcset->range_ends = new_array_end;
@@ -2772,9 +2786,7 @@ build_range_exp (const reg_syntax_t syntax,
/* Build the table for single byte characters. */
for (wc = 0; wc < SBC_MAX; ++wc)
{
- cmp_buf[2] = wc;
- if (wcscoll (cmp_buf, cmp_buf + 2) <= 0
- && wcscoll (cmp_buf + 2, cmp_buf + 4) <= 0)
+ if (start_wc <= wc && wc <= end_wc)
bitset_set (sbcset, wc);
}
}
@@ -2843,40 +2855,29 @@ parse_bracket_exp (re_string_t *regexp, re_dfa_t *dfa, re_token_t *token,
/* Local function for parse_bracket_exp used in _LIBC environment.
Seek the collating symbol entry corresponding to NAME.
- Return the index of the symbol in the SYMB_TABLE. */
+ Return the index of the symbol in the SYMB_TABLE,
+ or -1 if not found. */
auto inline int32_t
- __attribute ((always_inline))
- seek_collating_symbol_entry (name, name_len)
- const unsigned char *name;
- size_t name_len;
+ __attribute__ ((always_inline))
+ seek_collating_symbol_entry (const unsigned char *name, size_t name_len)
{
- int32_t hash = elem_hash ((const char *) name, name_len);
- int32_t elem = hash % table_size;
- if (symb_table[2 * elem] != 0)
- {
- int32_t second = hash % (table_size - 2) + 1;
+ int32_t elem;
- do
- {
- /* First compare the hashing value. */
- if (symb_table[2 * elem] == hash
- /* Compare the length of the name. */
- && name_len == extra[symb_table[2 * elem + 1]]
- /* Compare the name. */
- && memcmp (name, &extra[symb_table[2 * elem + 1] + 1],
- name_len) == 0)
- {
- /* Yep, this is the entry. */
- break;
- }
-
- /* Next entry. */
- elem += second;
- }
- while (symb_table[2 * elem] != 0);
- }
- return elem;
+ for (elem = 0; elem < table_size; elem++)
+ if (symb_table[2 * elem] != 0)
+ {
+ int32_t idx = symb_table[2 * elem + 1];
+ /* Skip the name of collating element name. */
+ idx += 1 + extra[idx];
+ if (/* Compare the length of the name. */
+ name_len == extra[idx]
+ /* Compare the name. */
+ && memcmp (name, &extra[idx + 1], name_len) == 0)
+ /* Yep, this is the entry. */
+ return elem;
+ }
+ return -1;
}
/* Local function for parse_bracket_exp used in _LIBC environment.
@@ -2884,9 +2885,8 @@ parse_bracket_exp (re_string_t *regexp, re_dfa_t *dfa, re_token_t *token,
Return the value if succeeded, UINT_MAX otherwise. */
auto inline unsigned int
- __attribute ((always_inline))
- lookup_collation_sequence_value (br_elem)
- bracket_elem_t *br_elem;
+ __attribute__ ((always_inline))
+ lookup_collation_sequence_value (bracket_elem_t *br_elem)
{
if (br_elem->type == SB_CHAR)
{
@@ -2914,7 +2914,7 @@ parse_bracket_exp (re_string_t *regexp, re_dfa_t *dfa, re_token_t *token,
int32_t elem, idx;
elem = seek_collating_symbol_entry (br_elem->opr.name,
sym_name_len);
- if (symb_table[2 * elem] != 0)
+ if (elem != -1)
{
/* We found the entry. */
idx = symb_table[2 * elem + 1];
@@ -2932,7 +2932,7 @@ parse_bracket_exp (re_string_t *regexp, re_dfa_t *dfa, re_token_t *token,
/* Return the collation sequence value. */
return *(unsigned int *) (extra + idx);
}
- else if (symb_table[2 * elem] == 0 && sym_name_len == 1)
+ else if (sym_name_len == 1)
{
/* No valid character. Match it as a single byte
character. */
@@ -2953,12 +2953,9 @@ parse_bracket_exp (re_string_t *regexp, re_dfa_t *dfa, re_token_t *token,
update it. */
auto inline reg_errcode_t
- __attribute ((always_inline))
- build_range_exp (sbcset, mbcset, range_alloc, start_elem, end_elem)
- re_charset_t *mbcset;
- Idx *range_alloc;
- bitset_t sbcset;
- bracket_elem_t *start_elem, *end_elem;
+ __attribute__ ((always_inline))
+ build_range_exp (bitset_t sbcset, re_charset_t *mbcset, int *range_alloc,
+ bracket_elem_t *start_elem, bracket_elem_t *end_elem)
{
unsigned int ch;
uint32_t start_collseq;
@@ -2971,6 +2968,7 @@ parse_bracket_exp (re_string_t *regexp, re_dfa_t *dfa, re_token_t *token,
0))
return REG_ERANGE;
+ /* FIXME: Implement rational ranges here, too. */
start_collseq = lookup_collation_sequence_value (start_elem);
end_collseq = lookup_collation_sequence_value (end_elem);
/* Check start/end collation sequence values. */
@@ -3036,26 +3034,23 @@ parse_bracket_exp (re_string_t *regexp, re_dfa_t *dfa, re_token_t *token,
pointer argument since we may update it. */
auto inline reg_errcode_t
- __attribute ((always_inline))
- build_collating_symbol (sbcset, mbcset, coll_sym_alloc, name)
- re_charset_t *mbcset;
- Idx *coll_sym_alloc;
- bitset_t sbcset;
- const unsigned char *name;
+ __attribute__ ((always_inline))
+ build_collating_symbol (bitset_t sbcset, re_charset_t *mbcset,
+ Idx *coll_sym_alloc, const unsigned char *name)
{
int32_t elem, idx;
size_t name_len = strlen ((const char *) name);
if (nrules != 0)
{
elem = seek_collating_symbol_entry (name, name_len);
- if (symb_table[2 * elem] != 0)
+ if (elem != -1)
{
/* We found the entry. */
idx = symb_table[2 * elem + 1];
/* Skip the name of collating element name. */
idx += 1 + extra[idx];
}
- else if (symb_table[2 * elem] == 0 && name_len == 1)
+ else if (name_len == 1)
{
/* No valid character, treat it as a normal
character. */
@@ -3181,6 +3176,7 @@ parse_bracket_exp (re_string_t *regexp, re_dfa_t *dfa, re_token_t *token,
re_token_t token2;
start_elem.opr.name = start_name_buf;
+ start_elem.type = COLL_SYM;
ret = parse_bracket_element (&start_elem, regexp, token, token_len, dfa,
syntax, first_round);
if (BE (ret != REG_NOERROR, 0))
@@ -3224,6 +3220,7 @@ parse_bracket_exp (re_string_t *regexp, re_dfa_t *dfa, re_token_t *token,
if (is_range_exp == true)
{
end_elem.opr.name = end_name_buf;
+ end_elem.type = COLL_SYM;
ret = parse_bracket_element (&end_elem, regexp, &token2, token_len2,
dfa, syntax, true);
if (BE (ret != REG_NOERROR, 0))
@@ -3298,7 +3295,8 @@ parse_bracket_exp (re_string_t *regexp, re_dfa_t *dfa, re_token_t *token,
#ifdef RE_ENABLE_I18N
mbcset, &char_class_alloc,
#endif /* RE_ENABLE_I18N */
- start_elem.opr.name, syntax);
+ (const char *) start_elem.opr.name,
+ syntax);
if (BE (*err != REG_NOERROR, 0))
goto parse_bracket_exp_free_return;
break;
@@ -3497,8 +3495,6 @@ build_equiv_class (bitset_t sbcset, const unsigned char *name)
int32_t idx1, idx2;
unsigned int ch;
size_t len;
- /* This #include defines a local function! */
-# include <locale/weight.h>
/* Calculate the index for equivalence class. */
cp = name;
table = (const int32_t *) _NL_CURRENT (LC_COLLATE, _NL_COLLATE_TABLEMB);
@@ -3508,7 +3504,7 @@ build_equiv_class (bitset_t sbcset, const unsigned char *name)
_NL_COLLATE_EXTRAMB);
indirect = (const int32_t *) _NL_CURRENT (LC_COLLATE,
_NL_COLLATE_INDIRECTMB);
- idx1 = findidx (&cp, -1);
+ idx1 = findidx (table, indirect, extra, &cp, -1);
if (BE (idx1 == 0 || *cp != '\0', 0))
/* This isn't a valid character. */
return REG_ECOLLATE;
@@ -3519,7 +3515,7 @@ build_equiv_class (bitset_t sbcset, const unsigned char *name)
{
char_buf[0] = ch;
cp = char_buf;
- idx2 = findidx (&cp, 1);
+ idx2 = findidx (table, indirect, extra, &cp, 1);
/*
idx2 = table[ch];
*/
@@ -3578,14 +3574,14 @@ static reg_errcode_t
#ifdef RE_ENABLE_I18N
build_charclass (RE_TRANSLATE_TYPE trans, bitset_t sbcset,
re_charset_t *mbcset, Idx *char_class_alloc,
- const unsigned char *class_name, reg_syntax_t syntax)
+ const char *class_name, reg_syntax_t syntax)
#else /* not RE_ENABLE_I18N */
build_charclass (RE_TRANSLATE_TYPE trans, bitset_t sbcset,
- const unsigned char *class_name, reg_syntax_t syntax)
+ const char *class_name, reg_syntax_t syntax)
#endif /* not RE_ENABLE_I18N */
{
int i;
- const char *name = (const char *) class_name;
+ const char *name = class_name;
/* In case of REG_ICASE "upper" and "lower" match the both of
upper and lower cases. */
@@ -3659,8 +3655,8 @@ build_charclass (RE_TRANSLATE_TYPE trans, bitset_t sbcset,
static bin_tree_t *
build_charclass_op (re_dfa_t *dfa, RE_TRANSLATE_TYPE trans,
- const unsigned char *class_name,
- const unsigned char *extra, bool non_match,
+ const char *class_name,
+ const char *extra, bool non_match,
reg_errcode_t *err)
{
re_bitset_ptr_t sbcset;
@@ -3673,26 +3669,21 @@ build_charclass_op (re_dfa_t *dfa, RE_TRANSLATE_TYPE trans,
bin_tree_t *tree;
sbcset = (re_bitset_ptr_t) calloc (sizeof (bitset_t), 1);
-#ifdef RE_ENABLE_I18N
- mbcset = (re_charset_t *) calloc (sizeof (re_charset_t), 1);
-#endif /* RE_ENABLE_I18N */
-
-#ifdef RE_ENABLE_I18N
- if (BE (sbcset == NULL || mbcset == NULL, 0))
-#else /* not RE_ENABLE_I18N */
if (BE (sbcset == NULL, 0))
-#endif /* not RE_ENABLE_I18N */
{
*err = REG_ESPACE;
return NULL;
}
-
- if (non_match)
- {
#ifdef RE_ENABLE_I18N
- mbcset->non_match = 1;
-#endif /* not RE_ENABLE_I18N */
+ mbcset = (re_charset_t *) calloc (sizeof (re_charset_t), 1);
+ if (BE (mbcset == NULL, 0))
+ {
+ re_free (sbcset);
+ *err = REG_ESPACE;
+ return NULL;
}
+ mbcset->non_match = non_match;
+#endif /* RE_ENABLE_I18N */
/* We don't care the syntax in this case. */
ret = build_charclass (trans, sbcset,
@@ -3725,6 +3716,9 @@ build_charclass_op (re_dfa_t *dfa, RE_TRANSLATE_TYPE trans,
#endif
/* Build a tree for simple bracket. */
+#if defined GCC_LINT || defined lint
+ memset (&br_token, 0, sizeof br_token);
+#endif
br_token.type = SIMPLE_BRACKET;
br_token.opr.sbcset = sbcset;
tree = create_token_tree (dfa, NULL, NULL, &br_token);
@@ -3767,27 +3761,26 @@ build_charclass_op (re_dfa_t *dfa, RE_TRANSLATE_TYPE trans,
/* This is intended for the expressions like "a{1,3}".
Fetch a number from 'input', and return the number.
- Return REG_MISSING if the number field is empty like "{,1}".
+ Return -1 if the number field is empty like "{,1}".
Return RE_DUP_MAX + 1 if the number field is too large.
- Return REG_ERROR if an error occurred. */
+ Return -2 if an error occurred. */
static Idx
fetch_number (re_string_t *input, re_token_t *token, reg_syntax_t syntax)
{
- Idx num = REG_MISSING;
+ Idx num = -1;
unsigned char c;
while (1)
{
fetch_token (token, input, syntax);
c = token->opr.c;
if (BE (token->type == END_OF_RE, 0))
- return REG_ERROR;
+ return -2;
if (token->type == OP_CLOSE_DUP_NUM || c == ',')
break;
- num = ((token->type != CHARACTER || c < '0' || '9' < c
- || num == REG_ERROR)
- ? REG_ERROR
- : num == REG_MISSING
+ num = ((token->type != CHARACTER || c < '0' || '9' < c || num == -2)
+ ? -2
+ : num == -1
? c - '0'
: MIN (RE_DUP_MAX + 1, num * 10 + c - '0'));
}
@@ -3819,6 +3812,9 @@ create_tree (re_dfa_t *dfa, bin_tree_t *left, bin_tree_t *right,
re_token_type_t type)
{
re_token_t t;
+#if defined GCC_LINT || defined lint
+ memset (&t, 0, sizeof t);
+#endif
t.type = type;
return create_token_tree (dfa, left, right, &t);
}
@@ -3848,7 +3844,7 @@ create_token_tree (re_dfa_t *dfa, bin_tree_t *left, bin_tree_t *right,
tree->token.opt_subexp = 0;
tree->first = NULL;
tree->next = NULL;
- tree->node_idx = REG_MISSING;
+ tree->node_idx = -1;
if (left != NULL)
left->parent = tree;
diff --git a/lib/regex.c b/lib/regex.c
index ca4cc9d..432b465 100644
--- a/lib/regex.c
+++ b/lib/regex.c
@@ -1,22 +1,21 @@
-/* -*- buffer-read-only: t -*- vi: set ro: */
-/* DO NOT EDIT! GENERATED AUTOMATICALLY! */
/* Extended regular expression matching and search library.
- Copyright (C) 2002-2003, 2005-2006, 2009-2012 Free Software Foundation, Inc.
+ Copyright (C) 2002-2016 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Isamu Hasegawa <isamu@yamato.ibm.com>.
- This 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.
+ 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
+ <http://www.gnu.org/licenses/>. */
#ifndef _LIBC
# include <config.h>
@@ -25,6 +24,7 @@
# pragma GCC diagnostic ignored "-Wsuggest-attribute=pure"
# endif
# if (__GNUC__ == 4 && 3 <= __GNUC_MINOR__) || 4 < __GNUC__
+# pragma GCC diagnostic ignored "-Wold-style-definition"
# pragma GCC diagnostic ignored "-Wtype-limits"
# endif
#endif
diff --git a/lib/regex.h b/lib/regex.h
index c70c8d7..b7496f9 100644
--- a/lib/regex.h
+++ b/lib/regex.h
@@ -1,23 +1,22 @@
-/* -*- buffer-read-only: t -*- vi: set ro: */
-/* DO NOT EDIT! GENERATED AUTOMATICALLY! */
/* Definitions for data structures and routines for the regular
expression library.
- Copyright (C) 1985, 1989-1993, 1995-1998, 2000-2003, 2005-2012
- Free Software Foundation, Inc.
+ Copyright (C) 1985, 1989-1993, 1995-1998, 2000-2003, 2005-2016 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, 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
+ <http://www.gnu.org/licenses/>. */
#ifndef _REGEX_H
#define _REGEX_H 1
@@ -43,11 +42,6 @@ extern "C" {
supported within glibc itself, and glibc users should not define
_REGEX_LARGE_OFFSETS. */
-/* The type of nonnegative object indexes. Traditionally, GNU regex
- uses 'int' for these. Code that uses __re_idx_t should work
- regardless of whether the type is signed. */
-typedef size_t __re_idx_t;
-
/* The type of object sizes. */
typedef size_t __re_size_t;
@@ -59,7 +53,6 @@ typedef size_t __re_long_size_t;
/* The traditional GNU regex implementation mishandles strings longer
than INT_MAX. */
-typedef int __re_idx_t;
typedef unsigned int __re_size_t;
typedef unsigned long int __re_long_size_t;
@@ -245,19 +238,16 @@ extern reg_syntax_t re_syntax_options;
| RE_INVALID_INTERVAL_ORD)
# define RE_SYNTAX_GREP \
- (RE_BK_PLUS_QM | RE_CHAR_CLASSES \
- | RE_HAT_LISTS_NOT_NEWLINE | RE_INTERVALS \
- | RE_NEWLINE_ALT)
+ ((RE_SYNTAX_POSIX_BASIC | RE_NEWLINE_ALT) \
+ & ~(RE_CONTEXT_INVALID_DUP | RE_DOT_NOT_NULL))
# define RE_SYNTAX_EGREP \
- (RE_CHAR_CLASSES | RE_CONTEXT_INDEP_ANCHORS \
- | RE_CONTEXT_INDEP_OPS | RE_HAT_LISTS_NOT_NEWLINE \
- | RE_NEWLINE_ALT | RE_NO_BK_PARENS \
- | RE_NO_BK_VBAR)
+ ((RE_SYNTAX_POSIX_EXTENDED | RE_INVALID_INTERVAL_ORD | RE_NEWLINE_ALT) \
+ & ~(RE_CONTEXT_INVALID_OPS | RE_DOT_NOT_NULL))
+/* POSIX grep -E behavior is no longer incompatible with GNU. */
# define RE_SYNTAX_POSIX_EGREP \
- (RE_SYNTAX_EGREP | RE_INTERVALS | RE_NO_BK_BRACES \
- | RE_INVALID_INTERVAL_ORD)
+ RE_SYNTAX_EGREP
/* P1003.2/D11.2, section 4.20.7.1, lines 5078ff. */
# define RE_SYNTAX_ED RE_SYNTAX_POSIX_BASIC
@@ -492,7 +482,8 @@ typedef struct re_pattern_buffer regex_t;
#ifdef _REGEX_LARGE_OFFSETS
/* POSIX 1003.1-2008 requires that regoff_t be at least as wide as
ptrdiff_t and ssize_t. We don't know of any hosts where ptrdiff_t
- is wider than ssize_t, so ssize_t is safe. */
+ is wider than ssize_t, so ssize_t is safe. ptrdiff_t is not
+ visible here, so use ssize_t. */
typedef ssize_t regoff_t;
#else
/* The traditional GNU regex implementation mishandles strings longer
@@ -542,7 +533,7 @@ extern reg_syntax_t re_set_syntax (reg_syntax_t __syntax);
BUFFER. Return NULL if successful, and an error string if not.
To free the allocated storage, you must call 'regfree' on BUFFER.
- Note that the translate table must either have been initialised by
+ Note that the translate table must either have been initialized by
'regcomp', with a malloc'ed value, or set to NULL before calling
'regfree'. */
extern const char *re_compile_pattern (const char *__pattern, size_t __length,
@@ -561,34 +552,34 @@ extern int re_compile_fastmap (struct re_pattern_buffer *__buffer);
match, or -2 for an internal error. Also return register
information in REGS (if REGS and BUFFER->no_sub are nonzero). */
extern regoff_t re_search (struct re_pattern_buffer *__buffer,
- const char *__string, __re_idx_t __length,
- __re_idx_t __start, regoff_t __range,
+ const char *__String, regoff_t __length,
+ regoff_t __start, regoff_t __range,
struct re_registers *__regs);
/* Like 're_search', but search in the concatenation of STRING1 and
STRING2. Also, stop searching at index START + STOP. */
extern regoff_t re_search_2 (struct re_pattern_buffer *__buffer,
- const char *__string1, __re_idx_t __length1,
- const char *__string2, __re_idx_t __length2,
- __re_idx_t __start, regoff_t __range,
+ const char *__string1, regoff_t __length1,
+ const char *__string2, regoff_t __length2,
+ regoff_t __start, regoff_t __range,
struct re_registers *__regs,
- __re_idx_t __stop);
+ regoff_t __stop);
/* Like 're_search', but return how many characters in STRING the regexp
in BUFFER matched, starting at position START. */
extern regoff_t re_match (struct re_pattern_buffer *__buffer,
- const char *__string, __re_idx_t __length,
- __re_idx_t __start, struct re_registers *__regs);
+ const char *__String, regoff_t __length,
+ regoff_t __start, struct re_registers *__regs);
/* Relates to 're_match' as 're_search_2' relates to 're_search'. */
extern regoff_t re_match_2 (struct re_pattern_buffer *__buffer,
- const char *__string1, __re_idx_t __length1,
- const char *__string2, __re_idx_t __length2,
- __re_idx_t __start, struct re_registers *__regs,
- __re_idx_t __stop);
+ const char *__string1, regoff_t __length1,
+ const char *__string2, regoff_t __length2,
+ regoff_t __start, struct re_registers *__regs,
+ regoff_t __stop);
/* Set REGS to hold NUM_REGS registers, storing them in STARTS and
@@ -609,7 +600,7 @@ extern void re_set_registers (struct re_pattern_buffer *__buffer,
regoff_t *__starts, regoff_t *__ends);
#endif /* Use GNU */
-#if defined _REGEX_RE_COMP || (defined _LIBC && defined __USE_BSD)
+#if defined _REGEX_RE_COMP || (defined _LIBC && defined __USE_MISC)
# ifndef _CRAY
/* 4.2 bsd compatibility. */
extern char *re_comp (const char *);
@@ -651,7 +642,7 @@ extern int regcomp (regex_t *_Restrict_ __preg,
int __cflags);
extern int regexec (const regex_t *_Restrict_ __preg,
- const char *_Restrict_ __string, size_t __nmatch,
+ const char *_Restrict_ __String, size_t __nmatch,
regmatch_t __pmatch[_Restrict_arr_],
int __eflags);
diff --git a/lib/regex_internal.c b/lib/regex_internal.c
index d48c354..a3b10dd 100644
--- a/lib/regex_internal.c
+++ b/lib/regex_internal.c
@@ -1,22 +1,21 @@
-/* -*- buffer-read-only: t -*- vi: set ro: */
-/* DO NOT EDIT! GENERATED AUTOMATICALLY! */
/* Extended regular expression matching and search library.
- Copyright (C) 2002-2012 Free Software Foundation, Inc.
+ Copyright (C) 2002-2016 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Isamu Hasegawa <isamu@yamato.ibm.com>.
- This 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.
+ 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
+ <http://www.gnu.org/licenses/>. */
static void re_string_construct_common (const char *str, Idx len,
re_string_t *pstr,
@@ -312,13 +311,12 @@ build_wcs_upper_buffer (re_string_t *pstr)
+ byte_idx), remain_len, &pstr->cur_state);
if (BE (mbclen < (size_t) -2, 1))
{
- wchar_t wcu = wc;
- if (iswlower (wc))
+ wchar_t wcu = __towupper (wc);
+ if (wcu != wc)
{
size_t mbcdlen;
- wcu = towupper (wc);
- mbcdlen = wcrtomb (buf, wcu, &prev_st);
+ mbcdlen = __wcrtomb (buf, wcu, &prev_st);
if (BE (mbclen == mbcdlen, 1))
memcpy (pstr->mbs + byte_idx, buf, mbclen);
else
@@ -382,12 +380,11 @@ build_wcs_upper_buffer (re_string_t *pstr)
mbclen = __mbrtowc (&wc, p, remain_len, &pstr->cur_state);
if (BE (mbclen < (size_t) -2, 1))
{
- wchar_t wcu = wc;
- if (iswlower (wc))
+ wchar_t wcu = __towupper (wc);
+ if (wcu != wc)
{
size_t mbcdlen;
- wcu = towupper (wc);
mbcdlen = wcrtomb ((char *) buf, wcu, &prev_st);
if (BE (mbclen == mbcdlen, 1))
memcpy (pstr->mbs + byte_idx, buf, mbclen);
@@ -539,10 +536,7 @@ build_upper_buffer (re_string_t *pstr)
int ch = pstr->raw_mbs[pstr->raw_mbs_idx + char_idx];
if (BE (pstr->trans != NULL, 0))
ch = pstr->trans[ch];
- if (islower (ch))
- pstr->mbs[char_idx] = toupper (ch);
- else
- pstr->mbs[char_idx] = ch;
+ pstr->mbs[char_idx] = toupper (ch);
}
pstr->valid_len = char_idx;
pstr->valid_raw_len = char_idx;
@@ -683,7 +677,7 @@ re_string_reconstruct (re_string_t *pstr, Idx idx, int eflags)
pstr->valid_len - offset);
pstr->valid_len -= offset;
pstr->valid_raw_len -= offset;
-#if DEBUG
+#if defined DEBUG && DEBUG
assert (pstr->valid_len > 0);
#endif
}
@@ -835,7 +829,7 @@ re_string_reconstruct (re_string_t *pstr, Idx idx, int eflags)
}
static unsigned char
-internal_function __attribute ((pure))
+internal_function __attribute__ ((pure))
re_string_peek_byte_case (const re_string_t *pstr, Idx idx)
{
int ch;
@@ -928,7 +922,7 @@ internal_function
re_string_context_at (const re_string_t *input, Idx idx, int eflags)
{
int c;
- if (BE (! REG_VALID_INDEX (idx), 0))
+ if (BE (idx < 0, 0))
/* In this case, we use the value stored in input->tip_context,
since we can't know the character in input->mbs[-1] here. */
return input->tip_context;
@@ -942,12 +936,12 @@ re_string_context_at (const re_string_t *input, Idx idx, int eflags)
Idx wc_idx = idx;
while(input->wcs[wc_idx] == WEOF)
{
-#ifdef DEBUG
+#if defined DEBUG && DEBUG
/* It must not happen. */
- assert (REG_VALID_INDEX (wc_idx));
+ assert (wc_idx >= 0);
#endif
--wc_idx;
- if (! REG_VALID_INDEX (wc_idx))
+ if (wc_idx < 0)
return input->tip_context;
}
wc = input->wcs[wc_idx];
@@ -975,7 +969,7 @@ re_node_set_alloc (re_node_set *set, Idx size)
set->alloc = size;
set->nelem = 0;
set->elems = re_malloc (Idx, size);
- if (BE (set->elems == NULL, 0))
+ if (BE (set->elems == NULL, 0) && (MALLOC_0_IS_NONNULL || size != 0))
return REG_ESPACE;
return REG_NOERROR;
}
@@ -1083,25 +1077,25 @@ re_node_set_add_intersect (re_node_set *dest, const re_node_set *src1,
if (src1->elems[i1] == src2->elems[i2])
{
/* Try to find the item in DEST. Maybe we could binary search? */
- while (REG_VALID_INDEX (id) && dest->elems[id] > src1->elems[i1])
+ while (id >= 0 && dest->elems[id] > src1->elems[i1])
--id;
- if (! REG_VALID_INDEX (id) || dest->elems[id] != src1->elems[i1])
+ if (id < 0 || dest->elems[id] != src1->elems[i1])
dest->elems[--sbase] = src1->elems[i1];
- if (! REG_VALID_INDEX (--i1) || ! REG_VALID_INDEX (--i2))
+ if (--i1 < 0 || --i2 < 0)
break;
}
/* Lower the highest of the two items. */
else if (src1->elems[i1] < src2->elems[i2])
{
- if (! REG_VALID_INDEX (--i2))
+ if (--i2 < 0)
break;
}
else
{
- if (! REG_VALID_INDEX (--i1))
+ if (--i1 < 0)
break;
}
}
@@ -1114,7 +1108,7 @@ re_node_set_add_intersect (re_node_set *dest, const re_node_set *src1,
DEST elements are already in place; this is more or
less the same loop that is in re_node_set_merge. */
dest->nelem += delta;
- if (delta > 0 && REG_VALID_INDEX (id))
+ if (delta > 0 && id >= 0)
for (;;)
{
if (dest->elems[is] > dest->elems[id])
@@ -1128,7 +1122,7 @@ re_node_set_add_intersect (re_node_set *dest, const re_node_set *src1,
{
/* Slide from the bottom. */
dest->elems[id + delta] = dest->elems[id];
- if (! REG_VALID_INDEX (--id))
+ if (--id < 0)
break;
}
}
@@ -1222,8 +1216,7 @@ re_node_set_merge (re_node_set *dest, const re_node_set *src)
/* Copy into the top of DEST the items of SRC that are not
found in DEST. Maybe we could binary search in DEST? */
for (sbase = dest->nelem + 2 * src->nelem,
- is = src->nelem - 1, id = dest->nelem - 1;
- REG_VALID_INDEX (is) && REG_VALID_INDEX (id); )
+ is = src->nelem - 1, id = dest->nelem - 1; is >= 0 && id >= 0; )
{
if (dest->elems[id] == src->elems[is])
is--, id--;
@@ -1233,7 +1226,7 @@ re_node_set_merge (re_node_set *dest, const re_node_set *src)
--id;
}
- if (REG_VALID_INDEX (is))
+ if (is >= 0)
{
/* If DEST is exhausted, the remaining items of SRC must be unique. */
sbase -= is + 1;
@@ -1262,7 +1255,7 @@ re_node_set_merge (re_node_set *dest, const re_node_set *src)
{
/* Slide from the bottom. */
dest->elems[id + delta] = dest->elems[id];
- if (! REG_VALID_INDEX (--id))
+ if (--id < 0)
{
/* Copy remaining SRC elements. */
memcpy (dest->elems, dest->elems + sbase,
@@ -1355,13 +1348,13 @@ 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))
+internal_function __attribute__ ((pure))
re_node_set_compare (const re_node_set *set1, const re_node_set *set2)
{
Idx i;
if (set1 == NULL || set2 == NULL || set1->nelem != set2->nelem)
return false;
- for (i = set1->nelem ; REG_VALID_INDEX (--i) ; )
+ for (i = set1->nelem ; --i >= 0 ; )
if (set1->elems[i] != set2->elems[i])
return false;
return true;
@@ -1370,11 +1363,11 @@ 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))
+internal_function __attribute__ ((pure))
re_node_set_contains (const re_node_set *set, Idx elem)
{
__re_size_t idx, right, mid;
- if (! REG_VALID_NONZERO_INDEX (set->nelem))
+ if (set->nelem <= 0)
return 0;
/* Binary search the element. */
@@ -1404,7 +1397,7 @@ re_node_set_remove_at (re_node_set *set, Idx idx)
/* Add the token TOKEN to dfa->nodes, and return the index of the token.
- Or return REG_MISSING if an error occurred. */
+ Or return -1 if an error occurred. */
static Idx
internal_function
@@ -1422,11 +1415,11 @@ re_dfa_add_node (re_dfa_t *dfa, re_token_t token)
MAX (sizeof (re_node_set),
sizeof (Idx)));
if (BE (MIN (IDX_MAX, SIZE_MAX / max_object_size) < new_nodes_alloc, 0))
- return REG_MISSING;
+ return -1;
new_nodes = re_realloc (dfa->nodes, re_token_t, new_nodes_alloc);
if (BE (new_nodes == NULL, 0))
- return REG_MISSING;
+ return -1;
dfa->nodes = new_nodes;
new_nexts = re_realloc (dfa->nexts, Idx, new_nodes_alloc);
new_indices = re_realloc (dfa->org_indices, Idx, new_nodes_alloc);
@@ -1434,7 +1427,13 @@ re_dfa_add_node (re_dfa_t *dfa, re_token_t token)
new_eclosures = re_realloc (dfa->eclosures, re_node_set, new_nodes_alloc);
if (BE (new_nexts == NULL || new_indices == NULL
|| new_edests == NULL || new_eclosures == NULL, 0))
- return REG_MISSING;
+ {
+ re_free (new_nexts);
+ re_free (new_indices);
+ re_free (new_edests);
+ re_free (new_eclosures);
+ return -1;
+ }
dfa->nexts = new_nexts;
dfa->org_indices = new_indices;
dfa->edests = new_edests;
@@ -1444,13 +1443,11 @@ re_dfa_add_node (re_dfa_t *dfa, re_token_t token)
dfa->nodes[dfa->nodes_len] = token;
dfa->nodes[dfa->nodes_len].constraint = 0;
#ifdef RE_ENABLE_I18N
- {
- int type = token.type;
dfa->nodes[dfa->nodes_len].accept_mb =
- (type == OP_PERIOD && dfa->mb_cur_max > 1) || type == COMPLEX_BRACKET;
- }
+ ((token.type == OP_PERIOD && dfa->mb_cur_max > 1)
+ || token.type == COMPLEX_BRACKET);
#endif
- dfa->nexts[dfa->nodes_len] = REG_MISSING;
+ dfa->nexts[dfa->nodes_len] = -1;
re_node_set_init_empty (dfa->edests + dfa->nodes_len);
re_node_set_init_empty (dfa->eclosures + dfa->nodes_len);
return dfa->nodes_len++;
@@ -1485,7 +1482,7 @@ re_acquire_state (reg_errcode_t *err, const re_dfa_t *dfa,
re_dfastate_t *new_state;
struct re_state_table_entry *spot;
Idx i;
-#ifdef lint
+#if defined GCC_LINT || defined lint
/* Suppress bogus uninitialized-variable warnings. */
*err = REG_NOERROR;
#endif
@@ -1533,7 +1530,7 @@ re_acquire_state_context (reg_errcode_t *err, const re_dfa_t *dfa,
re_dfastate_t *new_state;
struct re_state_table_entry *spot;
Idx i;
-#ifdef lint
+#if defined GCC_LINT || defined lint
/* Suppress bogus uninitialized-variable warnings. */
*err = REG_NOERROR;
#endif
diff --git a/lib/regex_internal.h b/lib/regex_internal.h
index ce058b6..b61c638 100644
--- a/lib/regex_internal.h
+++ b/lib/regex_internal.h
@@ -1,22 +1,21 @@
-/* -*- buffer-read-only: t -*- vi: set ro: */
-/* DO NOT EDIT! GENERATED AUTOMATICALLY! */
/* Extended regular expression matching and search library.
- Copyright (C) 2002-2012 Free Software Foundation, Inc.
+ Copyright (C) 2002-2016 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Isamu Hasegawa <isamu@yamato.ibm.com>.
- This 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.
+ 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
+ <http://www.gnu.org/licenses/>. */
#ifndef _REGEX_INTERNAL_H
#define _REGEX_INTERNAL_H 1
@@ -28,21 +27,57 @@
#include <string.h>
#include <langinfo.h>
-#ifndef _LIBC
-# include "localcharset.h"
-#endif
#include <locale.h>
#include <wchar.h>
#include <wctype.h>
#include <stdbool.h>
#include <stdint.h>
-#if defined _LIBC
-# include <bits/libc-lock.h>
+
+#include "intprops.h"
+
+#ifdef _LIBC
+# include <libc-lock.h>
+# define lock_define(name) __libc_lock_define (, name)
+# define lock_init(lock) (__libc_lock_init (lock), 0)
+# define lock_fini(lock) 0
+# define lock_lock(lock) __libc_lock_lock (lock)
+# define lock_unlock(lock) __libc_lock_unlock (lock)
+#elif defined GNULIB_LOCK && !defined USE_UNLOCKED_IO
+# include "glthread/lock.h"
+ /* Use gl_lock_define if empty macro arguments are known to work.
+ Otherwise, fall back on less-portable substitutes. */
+# if ((defined __GNUC__ && !defined __STRICT_ANSI__) \
+ || (defined __STDC_VERSION__ && 199901L <= __STDC_VERSION__))
+# define lock_define(name) gl_lock_define (, name)
+# elif USE_POSIX_THREADS
+# define lock_define(name) pthread_mutex_t name;
+# elif USE_PTH_THREADS
+# define lock_define(name) pth_mutex_t name;
+# elif USE_SOLARIS_THREADS
+# define lock_define(name) mutex_t name;
+# elif USE_WINDOWS_THREADS
+# define lock_define(name) gl_lock_t name;
+# else
+# define lock_define(name)
+# endif
+# define lock_init(lock) glthread_lock_init (&(lock))
+# define lock_fini(lock) glthread_lock_destroy (&(lock))
+# define lock_lock(lock) glthread_lock_lock (&(lock))
+# define lock_unlock(lock) glthread_lock_unlock (&(lock))
+#elif defined GNULIB_PTHREAD && !defined USE_UNLOCKED_IO
+# include <pthread.h>
+# define lock_define(name) pthread_mutex_t name;
+# define lock_init(lock) pthread_mutex_init (&(lock), 0)
+# define lock_fini(lock) pthread_mutex_destroy (&(lock))
+# define lock_lock(lock) pthread_mutex_lock (&(lock))
+# define lock_unlock(lock) pthread_mutex_unlock (&(lock))
#else
-# define __libc_lock_define(CLASS,NAME)
-# define __libc_lock_init(NAME) do { } while (0)
-# define __libc_lock_lock(NAME) do { } while (0)
-# define __libc_lock_unlock(NAME) do { } while (0)
+# define lock_define(name)
+# define lock_init(lock) 0
+# define lock_fini(lock) ((void) 0)
+ /* The 'dfa' avoids an "unused variable 'dfa'" warning from GCC. */
+# define lock_lock(lock) ((void) dfa)
+# define lock_unlock(lock) ((void) 0)
#endif
/* In case that the system doesn't have isblank(). */
@@ -54,7 +89,6 @@
# ifndef _RE_DEFINE_LOCALE_FUNCTIONS
# define _RE_DEFINE_LOCALE_FUNCTIONS 1
# include <locale/localeinfo.h>
-# include <locale/elem-hash.h>
# include <locale/coll-lookup.h>
# endif
#endif
@@ -65,7 +99,7 @@
# ifdef _LIBC
# undef gettext
# define gettext(msgid) \
- INTUSE(__dcgettext) (_libc_intl_domainname, msgid, LC_MESSAGES)
+ __dcgettext (_libc_intl_domainname, msgid, LC_MESSAGES)
# endif
#else
# define gettext(msgid) (msgid)
@@ -77,15 +111,11 @@
# define gettext_noop(String) String
#endif
-#if (defined MB_CUR_MAX && HAVE_WCTYPE_H && HAVE_ISWCTYPE && HAVE_WCSCOLL) || _LIBC
+#if (defined MB_CUR_MAX && HAVE_WCTYPE_H && HAVE_ISWCTYPE) || _LIBC
# define RE_ENABLE_I18N
#endif
-#if __GNUC__ >= 3
-# define BE(expr, val) __builtin_expect (expr, val)
-#else
-# define BE(expr, val) (expr)
-#endif
+#define BE(expr, val) __builtin_expect (expr, val)
/* Number of ASCII characters. */
#define ASCII_CHARS 0x80
@@ -101,8 +131,13 @@
/* Rename to standard API for using out of glibc. */
#ifndef _LIBC
+# undef __wctype
+# undef __iswctype
# define __wctype wctype
+# define __iswalnum iswalnum
# define __iswctype iswctype
+# define __towlower towlower
+# define __towupper towupper
# define __btowc btowc
# define __mbrtowc mbrtowc
# define __wcrtomb wcrtomb
@@ -110,37 +145,26 @@
# define attribute_hidden
#endif /* not _LIBC */
-#if __GNUC__ >= 4 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 1)
-# define __attribute(arg) __attribute__ (arg)
-#else
-# define __attribute(arg)
+#if __GNUC__ < 3 + (__GNUC_MINOR__ < 1)
+# define __attribute__(arg)
#endif
-typedef __re_idx_t Idx;
-#ifdef _REGEX_LARGE_OFFSETS
-# define IDX_MAX (SIZE_MAX - 2)
-#else
-# define IDX_MAX INT_MAX
-#endif
-
-/* Special return value for failure to match. */
-#define REG_MISSING ((Idx) -1)
-
-/* Special return value for internal error. */
-#define REG_ERROR ((Idx) -2)
-
-/* Test whether N is a valid index, and is not one of the above. */
-#ifdef _REGEX_LARGE_OFFSETS
-# define REG_VALID_INDEX(n) ((Idx) (n) < REG_ERROR)
-#else
-# define REG_VALID_INDEX(n) (0 <= (n))
+#ifndef SSIZE_MAX
+# define SSIZE_MAX ((ssize_t) (SIZE_MAX / 2))
#endif
-/* Test whether N is a valid nonzero index. */
+/* The type of indexes into strings. This is signed, not size_t,
+ since the API requires indexes to fit in regoff_t anyway, and using
+ signed integers makes the code a bit smaller and presumably faster.
+ The traditional GNU regex implementation uses int for indexes.
+ The POSIX-compatible implementation uses a possibly-wider type.
+ The name 'Idx' is three letters to minimize the hassle of
+ reindenting a lot of regex code that formerly used 'int'. */
+typedef regoff_t Idx;
#ifdef _REGEX_LARGE_OFFSETS
-# define REG_VALID_NONZERO_INDEX(n) ((Idx) ((n) - 1) < (Idx) (REG_ERROR - 1))
+# define IDX_MAX SSIZE_MAX
#else
-# define REG_VALID_NONZERO_INDEX(n) (0 < (n))
+# define IDX_MAX INT_MAX
#endif
/* A hash value, suitable for computing hash tables. */
@@ -414,23 +438,23 @@ typedef struct re_dfa_t re_dfa_t;
#ifndef _LIBC
# define internal_function
+# define IS_IN(libc) false
#endif
-#ifndef NOT_IN_libc
static reg_errcode_t re_string_realloc_buffers (re_string_t *pstr,
Idx new_buf_len)
internal_function;
-# ifdef RE_ENABLE_I18N
+#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;
-# endif /* RE_ENABLE_I18N */
+#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 unsigned int re_string_context_at (const re_string_t *input, Idx idx,
int eflags)
- internal_function __attribute ((pure));
-#endif
+ internal_function __attribute__ ((pure));
+
#define re_string_peek_byte(pstr, offset) \
((pstr)->mbs[(pstr)->cur_idx + offset])
#define re_string_fetch_byte(pstr) \
@@ -448,7 +472,9 @@ static unsigned int re_string_context_at (const re_string_t *input, Idx idx,
#define re_string_skip_bytes(pstr,idx) ((pstr)->cur_idx += (idx))
#define re_string_set_index(pstr,idx) ((pstr)->cur_idx = (idx))
-#include <alloca.h>
+#if defined _LIBC || HAVE_ALLOCA
+# include <alloca.h>
+#endif
#ifndef _LIBC
# if HAVE_ALLOCA
@@ -465,6 +491,12 @@ static unsigned int re_string_context_at (const re_string_t *input, Idx idx,
# endif
#endif
+#ifdef _LIBC
+# define MALLOC_0_IS_NONNULL 1
+#elif !defined MALLOC_0_IS_NONNULL
+# define MALLOC_0_IS_NONNULL 0
+#endif
+
#ifndef MAX
# define MAX(a,b) ((a) < (b) ? (b) : (a))
#endif
@@ -515,7 +547,7 @@ typedef struct bin_tree_storage_t bin_tree_storage_t;
#define IS_WORD_CHAR(ch) (isalnum (ch) || (ch) == '_')
#define IS_NEWLINE(ch) ((ch) == NEWLINE_CHAR)
-#define IS_WIDE_WORD_CHAR(ch) (iswalnum (ch) || (ch) == L'_')
+#define IS_WIDE_WORD_CHAR(ch) (__iswalnum (ch) || (ch) == L'_')
#define IS_WIDE_NEWLINE(ch) ((ch) == WIDE_NEWLINE_CHAR)
#define NOT_SATISFY_PREV_CONSTRAINT(constraint,context) \
@@ -695,7 +727,7 @@ struct re_dfa_t
#ifdef DEBUG
char* re_str;
#endif
- __libc_lock_define (, lock)
+ lock_define (lock)
};
#define re_node_set_init_empty(set) memset (set, '\0', sizeof (re_node_set))
@@ -767,7 +799,7 @@ bitset_copy (bitset_t dest, const bitset_t src)
memcpy (dest, src, sizeof (bitset_t));
}
-static void
+static void __attribute__ ((unused))
bitset_not (bitset_t set)
{
int bitset_i;
@@ -779,7 +811,7 @@ bitset_not (bitset_t set)
& ~set[BITSET_WORDS - 1]);
}
-static void
+static void __attribute__ ((unused))
bitset_merge (bitset_t dest, const bitset_t src)
{
int bitset_i;
@@ -787,7 +819,7 @@ bitset_merge (bitset_t dest, const bitset_t src)
dest[bitset_i] |= src[bitset_i];
}
-static void
+static void __attribute__ ((unused))
bitset_mask (bitset_t dest, const bitset_t src)
{
int bitset_i;
@@ -798,7 +830,7 @@ bitset_mask (bitset_t dest, const bitset_t src)
#ifdef RE_ENABLE_I18N
/* Functions for re_string. */
static int
-internal_function __attribute ((pure))
+internal_function __attribute__ ((pure, unused))
re_string_char_size_at (const re_string_t *pstr, Idx idx)
{
int byte_idx;
@@ -811,7 +843,7 @@ re_string_char_size_at (const re_string_t *pstr, Idx idx)
}
static wint_t
-internal_function __attribute ((pure))
+internal_function __attribute__ ((pure, unused))
re_string_wchar_at (const re_string_t *pstr, Idx idx)
{
if (pstr->mb_cur_max == 1)
@@ -819,15 +851,17 @@ re_string_wchar_at (const re_string_t *pstr, Idx idx)
return (wint_t) pstr->wcs[idx];
}
-# ifndef NOT_IN_libc
+# ifdef _LIBC
+# include <locale/weight.h>
+# endif
+
static int
-internal_function __attribute ((pure))
+internal_function __attribute__ ((pure, unused))
re_string_elem_size_at (const re_string_t *pstr, Idx idx)
{
-# ifdef _LIBC
+# ifdef _LIBC
const unsigned char *p, *extra;
const int32_t *table, *indirect;
-# include <locale/weight.h>
uint_fast32_t nrules = _NL_CURRENT_WORD (LC_COLLATE, _NL_COLLATE_NRULES);
if (nrules != 0)
@@ -838,14 +872,13 @@ re_string_elem_size_at (const re_string_t *pstr, Idx idx)
indirect = (const int32_t *) _NL_CURRENT (LC_COLLATE,
_NL_COLLATE_INDIRECTMB);
p = pstr->mbs + idx;
- findidx (&p, pstr->len - idx);
+ findidx (table, indirect, extra, &p, pstr->len - idx);
return p - pstr->mbs - idx;
}
else
-# endif /* _LIBC */
+# endif /* _LIBC */
return 1;
}
-# endif
#endif /* RE_ENABLE_I18N */
#ifndef __GNUC_PREREQ
diff --git a/lib/regexec.c b/lib/regexec.c
index f28349a..895db82 100644
--- a/lib/regexec.c
+++ b/lib/regexec.c
@@ -1,22 +1,21 @@
-/* -*- buffer-read-only: t -*- vi: set ro: */
-/* DO NOT EDIT! GENERATED AUTOMATICALLY! */
/* Extended regular expression matching and search library.
- Copyright (C) 2002-2012 Free Software Foundation, Inc.
+ Copyright (C) 2002-2016 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Isamu Hasegawa <isamu@yamato.ibm.com>.
- This 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.
+ 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
+ <http://www.gnu.org/licenses/>. */
static reg_errcode_t match_ctx_init (re_match_context_t *cache, int eflags,
Idx n) internal_function;
@@ -200,7 +199,7 @@ static Idx group_nodes_into_DFAstates (const re_dfa_t *dfa,
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)
+static reg_errcode_t extend_buffers (re_match_context_t *mctx, int min_len)
internal_function;
/* Entry point for POSIX code. */
@@ -220,18 +219,12 @@ static reg_errcode_t extend_buffers (re_match_context_t *mctx)
We return 0 if we find a match and REG_NOMATCH if not. */
int
-regexec (preg, string, nmatch, pmatch, eflags)
- const regex_t *_Restrict_ preg;
- const char *_Restrict_ string;
- size_t nmatch;
- regmatch_t pmatch[_Restrict_arr_];
- int eflags;
+regexec (const regex_t *_Restrict_ preg, const char *_Restrict_ string,
+ size_t nmatch, regmatch_t pmatch[], int eflags)
{
reg_errcode_t err;
Idx start, length;
-#ifdef _LIBC
re_dfa_t *dfa = preg->buffer;
-#endif
if (eflags & ~(REG_NOTBOL | REG_NOTEOL | REG_STARTEND))
return REG_BADPAT;
@@ -247,14 +240,14 @@ regexec (preg, string, nmatch, pmatch, eflags)
length = strlen (string);
}
- __libc_lock_lock (dfa->lock);
+ lock_lock (dfa->lock);
if (preg->no_sub)
err = re_search_internal (preg, string, length, start, length,
length, 0, NULL, eflags);
else
err = re_search_internal (preg, string, length, start, length,
length, nmatch, pmatch, eflags);
- __libc_lock_unlock (dfa->lock);
+ lock_unlock (dfa->lock);
return err != REG_NOERROR;
}
@@ -308,11 +301,8 @@ compat_symbol (libc, __compat_regexec, regexec, GLIBC_2_0);
match was found and -2 indicates an internal error. */
regoff_t
-re_match (bufp, string, length, start, regs)
- struct re_pattern_buffer *bufp;
- const char *string;
- Idx length, start;
- struct re_registers *regs;
+re_match (struct re_pattern_buffer *bufp, const char *string, Idx length,
+ Idx start, struct re_registers *regs)
{
return re_search_stub (bufp, string, length, start, 0, length, regs, true);
}
@@ -321,12 +311,8 @@ weak_alias (__re_match, re_match)
#endif
regoff_t
-re_search (bufp, string, length, start, range, regs)
- struct re_pattern_buffer *bufp;
- const char *string;
- Idx length, start;
- regoff_t range;
- struct re_registers *regs;
+re_search (struct re_pattern_buffer *bufp, const char *string, Idx length,
+ Idx start, regoff_t range, struct re_registers *regs)
{
return re_search_stub (bufp, string, length, start, range, length, regs,
false);
@@ -336,11 +322,9 @@ weak_alias (__re_search, re_search)
#endif
regoff_t
-re_match_2 (bufp, string1, length1, string2, length2, start, regs, stop)
- struct re_pattern_buffer *bufp;
- const char *string1, *string2;
- Idx length1, length2, start, stop;
- struct re_registers *regs;
+re_match_2 (struct re_pattern_buffer *bufp, const char *string1, Idx length1,
+ const char *string2, Idx length2, Idx start,
+ struct re_registers *regs, Idx stop)
{
return re_search_2_stub (bufp, string1, length1, string2, length2,
start, 0, regs, stop, true);
@@ -350,12 +334,9 @@ weak_alias (__re_match_2, re_match_2)
#endif
regoff_t
-re_search_2 (bufp, string1, length1, string2, length2, start, range, regs, stop)
- struct re_pattern_buffer *bufp;
- const char *string1, *string2;
- Idx length1, length2, start, stop;
- regoff_t range;
- struct re_registers *regs;
+re_search_2 (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)
{
return re_search_2_stub (bufp, string1, length1, string2, length2,
start, range, regs, stop, false);
@@ -365,18 +346,20 @@ weak_alias (__re_search_2, re_search_2)
#endif
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,
+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,
Idx stop, bool ret_len)
{
const char *str;
regoff_t rval;
- Idx len = length1 + length2;
+ Idx len;
char *s = NULL;
- if (BE (length1 < 0 || length2 < 0 || stop < 0 || len < length1, 0))
+ if (BE ((length1 < 0 || length2 < 0 || stop < 0
+ || INT_ADD_WRAPV (length1, length2, &len)),
+ 0))
return -2;
/* Concatenate the strings. */
@@ -412,8 +395,8 @@ re_search_2_stub (struct re_pattern_buffer *bufp,
otherwise the position of the match is returned. */
static regoff_t
-re_search_stub (struct re_pattern_buffer *bufp,
- const char *string, Idx length,
+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)
{
@@ -422,9 +405,7 @@ re_search_stub (struct re_pattern_buffer *bufp,
Idx nregs;
regoff_t rval;
int eflags = 0;
-#ifdef _LIBC
re_dfa_t *dfa = bufp->buffer;
-#endif
Idx last_start = start + range;
/* Check for out-of-range. */
@@ -435,7 +416,7 @@ re_search_stub (struct re_pattern_buffer *bufp,
else if (BE (last_start < 0 || (range < 0 && start <= last_start), 0))
last_start = 0;
- __libc_lock_lock (dfa->lock);
+ lock_lock (dfa->lock);
eflags |= (bufp->not_bol) ? REG_NOTBOL : 0;
eflags |= (bufp->not_eol) ? REG_NOTEOL : 0;
@@ -499,11 +480,12 @@ re_search_stub (struct re_pattern_buffer *bufp,
}
re_free (pmatch);
out:
- __libc_lock_unlock (dfa->lock);
+ lock_unlock (dfa->lock);
return rval;
}
static unsigned
+internal_function
re_copy_regs (struct re_registers *regs, regmatch_t *pmatch, Idx nregs,
int regs_allocated)
{
@@ -582,11 +564,8 @@ re_copy_regs (struct re_registers *regs, regmatch_t *pmatch, Idx nregs,
freeing the old data. */
void
-re_set_registers (bufp, regs, num_regs, starts, ends)
- struct re_pattern_buffer *bufp;
- struct re_registers *regs;
- __re_size_t num_regs;
- regoff_t *starts, *ends;
+re_set_registers (struct re_pattern_buffer *bufp, struct re_registers *regs,
+ __re_size_t num_regs, regoff_t *starts, regoff_t *ends)
{
if (num_regs)
{
@@ -614,8 +593,7 @@ int
# ifdef _LIBC
weak_function
# endif
-re_exec (s)
- const char *s;
+re_exec (const char *s)
{
return 0 == regexec (&re_comp_buf, s, 0, NULL, 0);
}
@@ -633,12 +611,10 @@ re_exec (s)
(0 <= LAST_START && LAST_START <= LENGTH) */
static reg_errcode_t
-__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)
+__attribute_warn_unused_result__ internal_function
+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)
{
reg_errcode_t err;
const re_dfa_t *dfa = preg->buffer;
@@ -647,7 +623,7 @@ re_search_internal (const regex_t *preg,
bool fl_longest_match;
int match_kind;
Idx match_first;
- Idx match_last = REG_MISSING;
+ Idx match_last = -1;
Idx extra_nmatch;
bool sb;
int ch;
@@ -856,9 +832,9 @@ re_search_internal (const regex_t *preg,
mctx.state_log_top = mctx.nbkref_ents = mctx.max_mb_elem_len = 0;
match_last = check_matching (&mctx, fl_longest_match,
start <= last_start ? &match_first : NULL);
- if (match_last != REG_MISSING)
+ if (match_last != -1)
{
- if (BE (match_last == REG_ERROR, 0))
+ if (BE (match_last == -2, 0))
{
err = REG_ESPACE;
goto free_return;
@@ -880,7 +856,7 @@ re_search_internal (const regex_t *preg,
break;
if (BE (err != REG_NOMATCH, 0))
goto free_return;
- match_last = REG_MISSING;
+ match_last = -1;
}
else
break; /* We found a match. */
@@ -891,7 +867,7 @@ re_search_internal (const regex_t *preg,
}
#ifdef DEBUG
- assert (match_last != REG_MISSING);
+ assert (match_last != -1);
assert (err == REG_NOERROR);
#endif
@@ -969,7 +945,7 @@ re_search_internal (const regex_t *preg,
}
static reg_errcode_t
-__attribute_warn_unused_result__
+internal_function __attribute_warn_unused_result__
prune_impossible_nodes (re_match_context_t *mctx)
{
const re_dfa_t *const dfa = mctx->dfa;
@@ -1017,7 +993,7 @@ prune_impossible_nodes (re_match_context_t *mctx)
do
{
--match_last;
- if (! REG_VALID_INDEX (match_last))
+ if (match_last < 0)
{
ret = REG_NOMATCH;
goto free_return;
@@ -1065,7 +1041,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)) internal_function
acquire_init_state_context (reg_errcode_t *err, const re_match_context_t *mctx,
Idx idx)
{
@@ -1098,8 +1074,8 @@ acquire_init_state_context (reg_errcode_t *err, const re_match_context_t *mctx,
}
/* Check whether the regular expression match input string INPUT or not,
- and return the index where the matching end. Return REG_MISSING if
- there is no match, and return REG_ERROR in case of an error.
+ and return the index where the matching end. Return -1 if
+ there is no match, and return -2 in case of an error.
FL_LONGEST_MATCH means we want the POSIX longest matching.
If P_MATCH_FIRST is not NULL, and the match fails, it is set to the
next place where we may want to try matching.
@@ -1114,7 +1090,7 @@ check_matching (re_match_context_t *mctx, bool fl_longest_match,
const re_dfa_t *const dfa = mctx->dfa;
reg_errcode_t err;
Idx match = 0;
- Idx match_last = REG_MISSING;
+ Idx match_last = -1;
Idx cur_str_idx = re_string_cur_idx (&mctx->input);
re_dfastate_t *cur_state;
bool at_init_state = p_match_first != NULL;
@@ -1126,7 +1102,7 @@ check_matching (re_match_context_t *mctx, bool fl_longest_match,
if (BE (cur_state == NULL, 0))
{
assert (err == REG_ESPACE);
- return REG_ERROR;
+ return -2;
}
if (mctx->state_log != NULL)
@@ -1177,11 +1153,11 @@ check_matching (re_match_context_t *mctx, bool fl_longest_match,
|| (BE (next_char_idx >= mctx->input.valid_len, 0)
&& mctx->input.valid_len < mctx->input.len))
{
- err = extend_buffers (mctx);
+ err = extend_buffers (mctx, next_char_idx + 1);
if (BE (err != REG_NOERROR, 0))
{
assert (err == REG_ESPACE);
- return REG_ERROR;
+ return -2;
}
}
@@ -1195,7 +1171,7 @@ check_matching (re_match_context_t *mctx, bool fl_longest_match,
state using the state log, if available and if we have not
already found a valid (even if not the longest) match. */
if (BE (err != REG_NOERROR, 0))
- return REG_ERROR;
+ return -2;
if (mctx->state_log == NULL
|| (match && !fl_longest_match)
@@ -1278,7 +1254,7 @@ check_halt_state_context (const re_match_context_t *mctx,
/* Compute the next node to which "NFA" transit from NODE("NFA" is a NFA
corresponding to the DFA).
Return the destination node, and update EPS_VIA_NODES;
- return REG_MISSING in case of errors. */
+ return -1 in case of errors. */
static Idx
internal_function
@@ -1296,15 +1272,15 @@ proceed_next_node (const re_match_context_t *mctx, Idx nregs, regmatch_t *regs,
Idx dest_node;
ok = re_node_set_insert (eps_via_nodes, node);
if (BE (! ok, 0))
- return REG_ERROR;
- /* Pick up a valid destination, or return REG_MISSING if none
+ return -2;
+ /* Pick up a valid destination, or return -1 if none
is found. */
- for (dest_node = REG_MISSING, i = 0; i < edests->nelem; ++i)
+ for (dest_node = -1, i = 0; i < edests->nelem; ++i)
{
Idx candidate = edests->elems[i];
if (!re_node_set_contains (cur_nodes, candidate))
continue;
- if (dest_node == REG_MISSING)
+ if (dest_node == -1)
dest_node = candidate;
else
@@ -1318,7 +1294,7 @@ proceed_next_node (const re_match_context_t *mctx, Idx nregs, regmatch_t *regs,
else if (fs != NULL
&& push_fail_stack (fs, *pidx, candidate, nregs, regs,
eps_via_nodes))
- return REG_ERROR;
+ return -2;
/* We know we are going to exit. */
break;
@@ -1343,13 +1319,13 @@ proceed_next_node (const re_match_context_t *mctx, Idx nregs, regmatch_t *regs,
if (fs != NULL)
{
if (regs[subexp_idx].rm_so == -1 || regs[subexp_idx].rm_eo == -1)
- return REG_MISSING;
+ return -1;
else if (naccepted)
{
char *buf = (char *) re_string_get_buffer (&mctx->input);
if (memcmp (buf + regs[subexp_idx].rm_so, buf + *pidx,
naccepted) != 0)
- return REG_MISSING;
+ return -1;
}
}
@@ -1358,7 +1334,7 @@ proceed_next_node (const re_match_context_t *mctx, Idx nregs, regmatch_t *regs,
Idx dest_node;
ok = re_node_set_insert (eps_via_nodes, node);
if (BE (! ok, 0))
- return REG_ERROR;
+ return -2;
dest_node = dfa->edests[node].elems[0];
if (re_node_set_contains (&mctx->state_log[*pidx]->nodes,
dest_node))
@@ -1374,12 +1350,12 @@ proceed_next_node (const re_match_context_t *mctx, Idx nregs, regmatch_t *regs,
if (fs && (*pidx > mctx->match_last || mctx->state_log[*pidx] == NULL
|| !re_node_set_contains (&mctx->state_log[*pidx]->nodes,
dest_node)))
- return REG_MISSING;
+ return -1;
re_node_set_empty (eps_via_nodes);
return dest_node;
}
}
- return REG_MISSING;
+ return -1;
}
static reg_errcode_t
@@ -1415,7 +1391,7 @@ pop_fail_stack (struct re_fail_stack_t *fs, Idx *pidx, Idx nregs,
regmatch_t *regs, re_node_set *eps_via_nodes)
{
Idx num = --fs->num;
- assert (REG_VALID_INDEX (num));
+ assert (num >= 0);
*pidx = fs->stack[num].idx;
memcpy (regs, fs->stack[num].regs, sizeof (regmatch_t) * nregs);
re_node_set_free (eps_via_nodes);
@@ -1508,9 +1484,9 @@ set_regs (const regex_t *preg, const re_match_context_t *mctx, size_t nmatch,
cur_node = proceed_next_node (mctx, nmatch, pmatch, &idx, cur_node,
&eps_via_nodes, fs);
- if (BE (! REG_VALID_INDEX (cur_node), 0))
+ if (BE (cur_node < 0, 0))
{
- if (BE (cur_node == REG_ERROR, 0))
+ if (BE (cur_node == -2, 0))
{
re_node_set_free (&eps_via_nodes);
if (prev_idx_match_malloced)
@@ -1757,7 +1733,7 @@ clean_state_log_if_needed (re_match_context_t *mctx, Idx next_state_log_idx)
&& mctx->input.valid_len < mctx->input.len))
{
reg_errcode_t err;
- err = extend_buffers (mctx);
+ err = extend_buffers (mctx, next_state_log_idx + 1);
if (BE (err != REG_NOERROR, 0))
return err;
}
@@ -1894,10 +1870,10 @@ sub_epsilon_src_nodes (const re_dfa_t *dfa, Idx node, re_node_set *dest_nodes,
{
Idx edst1 = dfa->edests[cur_node].elems[0];
Idx edst2 = ((dfa->edests[cur_node].nelem > 1)
- ? dfa->edests[cur_node].elems[1] : REG_MISSING);
+ ? dfa->edests[cur_node].elems[1] : -1);
if ((!re_node_set_contains (inv_eclosure, edst1)
&& re_node_set_contains (dest_nodes, edst1))
- || (REG_VALID_NONZERO_INDEX (edst2)
+ || (edst2 > 0
&& !re_node_set_contains (inv_eclosure, edst2)
&& re_node_set_contains (dest_nodes, edst2)))
{
@@ -1977,7 +1953,7 @@ check_dst_limits_calc_pos_1 (const re_match_context_t *mctx, int boundaries,
switch (dfa->nodes[node].type)
{
case OP_BACK_REF:
- if (bkref_idx != REG_MISSING)
+ if (bkref_idx != -1)
{
struct re_backref_cache_entry *ent = mctx->bkref_ents + bkref_idx;
do
@@ -2093,8 +2069,8 @@ check_subexp_limits (const re_dfa_t *dfa, re_node_set *dest_nodes,
subexp_idx = dfa->nodes[ent->node].opr.idx;
if (ent->subexp_to == str_idx)
{
- Idx ops_node = REG_MISSING;
- Idx cls_node = REG_MISSING;
+ Idx ops_node = -1;
+ Idx cls_node = -1;
for (node_idx = 0; node_idx < dest_nodes->nelem; ++node_idx)
{
Idx node = dest_nodes->elems[node_idx];
@@ -2109,7 +2085,7 @@ check_subexp_limits (const re_dfa_t *dfa, re_node_set *dest_nodes,
/* Check the limitation of the open subexpression. */
/* Note that (ent->subexp_to = str_idx != ent->subexp_from). */
- if (REG_VALID_INDEX (ops_node))
+ if (ops_node >= 0)
{
err = sub_epsilon_src_nodes (dfa, ops_node, dest_nodes,
candidates);
@@ -2118,7 +2094,7 @@ check_subexp_limits (const re_dfa_t *dfa, re_node_set *dest_nodes,
}
/* Check the limitation of the close subexpression. */
- if (REG_VALID_INDEX (cls_node))
+ if (cls_node >= 0)
for (node_idx = 0; node_idx < dest_nodes->nelem; ++node_idx)
{
Idx node = dest_nodes->elems[node_idx];
@@ -2171,7 +2147,7 @@ sift_states_bkref (const re_match_context_t *mctx, re_sift_context_t *sctx,
re_sift_context_t local_sctx;
Idx first_idx = search_cur_bkref_entry (mctx, str_idx);
- if (first_idx == REG_MISSING)
+ if (first_idx == -1)
return REG_NOERROR;
local_sctx.sifted_states = NULL; /* Mark that it hasn't been initialized. */
@@ -2575,7 +2551,7 @@ transit_state_mb (re_match_context_t *mctx, re_dfastate_t *pstate)
if (BE (err != REG_NOERROR, 0))
return err;
#ifdef DEBUG
- assert (dfa->nexts[cur_node_idx] != REG_MISSING);
+ assert (dfa->nexts[cur_node_idx] != -1);
#endif
new_nodes = dfa->eclosures + dfa->nexts[cur_node_idx];
@@ -2641,7 +2617,7 @@ transit_state_bkref (re_match_context_t *mctx, const re_node_set *nodes)
/* And add the epsilon closures (which is 'new_dest_nodes') of
the backreference to appropriate state_log. */
#ifdef DEBUG
- assert (dfa->nexts[node_idx] != REG_MISSING);
+ assert (dfa->nexts[node_idx] != -1);
#endif
for (; bkc_idx < mctx->nbkref_ents; ++bkc_idx)
{
@@ -2725,7 +2701,7 @@ get_subexp (re_match_context_t *mctx, Idx bkref_node, Idx bkref_str_idx)
const char *buf = (const char *) re_string_get_buffer (&mctx->input);
/* Return if we have already checked BKREF_NODE at BKREF_STR_IDX. */
Idx cache_idx = search_cur_bkref_entry (mctx, bkref_str_idx);
- if (cache_idx != REG_MISSING)
+ if (cache_idx != -1)
{
const struct re_backref_cache_entry *entry
= mctx->bkref_ents + cache_idx;
@@ -2814,7 +2790,7 @@ get_subexp (re_match_context_t *mctx, Idx bkref_node, Idx bkref_str_idx)
if (bkref_str_off >= mctx->input.len)
break;
- err = extend_buffers (mctx);
+ err = extend_buffers (mctx, bkref_str_off + 1);
if (BE (err != REG_NOERROR, 0))
return err;
@@ -2830,7 +2806,7 @@ get_subexp (re_match_context_t *mctx, Idx bkref_node, Idx bkref_str_idx)
nodes = &mctx->state_log[sl_str]->nodes;
cls_node = find_subexp_node (dfa, nodes, subexp_num,
OP_CLOSE_SUBEXP);
- if (cls_node == REG_MISSING)
+ if (cls_node == -1)
continue; /* No. */
if (sub_top->path == NULL)
{
@@ -2909,7 +2885,7 @@ find_subexp_node (const re_dfa_t *dfa, const re_node_set *nodes,
&& node->opr.idx == subexp_idx)
return cls_node;
}
- return REG_MISSING;
+ return -1;
}
/* Check whether the node TOP_NODE at TOP_STR can arrive to the node
@@ -3185,7 +3161,7 @@ check_arrival_expand_ecl (const re_dfa_t *dfa, re_node_set *cur_nodes,
Idx cur_node = cur_nodes->elems[idx];
const re_node_set *eclosure = dfa->eclosures + cur_node;
outside_node = find_subexp_node (dfa, eclosure, ex_subexp, type);
- if (outside_node == REG_MISSING)
+ if (outside_node == -1)
{
/* There are no problematic nodes, just merge them. */
err = re_node_set_merge (&new_nodes, eclosure);
@@ -3271,7 +3247,7 @@ expand_bkref_cache (re_match_context_t *mctx, re_node_set *cur_nodes,
Idx cache_idx_start = search_cur_bkref_entry (mctx, cur_str);
struct re_backref_cache_entry *ent;
- if (cache_idx_start == REG_MISSING)
+ if (cache_idx_start == -1)
return REG_NOERROR;
restart:
@@ -3396,7 +3372,7 @@ build_trtable (const re_dfa_t *dfa, re_dfastate_t *state)
/* At first, group all nodes belonging to 'state' into several
destinations. */
ndests = group_nodes_into_DFAstates (dfa, state, dests_node, dests_ch);
- if (BE (! REG_VALID_NONZERO_INDEX (ndests), 0))
+ if (BE (ndests <= 0, 0))
{
if (dests_node_malloced)
free (dests_alloc);
@@ -3458,7 +3434,7 @@ out_free:
for (j = 0; j < dests_node[i].nelem; ++j)
{
next_node = dfa->nexts[dests_node[i].elems[j]];
- if (next_node != REG_MISSING)
+ if (next_node != -1)
{
err = re_node_set_merge (&follows, dfa->eclosures + next_node);
if (BE (err != REG_NOERROR, 0))
@@ -3769,7 +3745,7 @@ group_nodes_into_DFAstates (const re_dfa_t *dfa, const re_dfastate_t *state,
error_return:
for (j = 0; j < ndests; ++j)
re_node_set_free (dests_node + j);
- return REG_MISSING;
+ return -1;
}
#ifdef RE_ENABLE_I18N
@@ -3781,6 +3757,10 @@ group_nodes_into_DFAstates (const re_dfa_t *dfa, const re_dfastate_t *state,
one collating element like '.', '[a-z]', opposite to the other nodes
can only accept one byte. */
+# ifdef _LIBC
+# include <locale/weight.h>
+# endif
+
static int
internal_function
check_node_accept_bytes (const re_dfa_t *dfa, Idx node_idx,
@@ -3900,8 +3880,6 @@ check_node_accept_bytes (const re_dfa_t *dfa, Idx node_idx,
const int32_t *table, *indirect;
const unsigned char *weights, *extra;
const char *collseqwc;
- /* This #include defines a local function! */
-# include <locale/weight.h>
/* match with collating_symbol? */
if (cset->ncoll_syms)
@@ -3937,6 +3915,7 @@ check_node_accept_bytes (const re_dfa_t *dfa, Idx node_idx,
in_collseq = find_collation_sequence_value (pin, elem_len);
}
/* match with range expression? */
+ /* FIXME: Implement rational ranges here, too. */
for (i = 0; i < cset->nranges; ++i)
if (cset->range_starts[i] <= in_collseq
&& in_collseq <= cset->range_ends[i])
@@ -3957,7 +3936,7 @@ check_node_accept_bytes (const re_dfa_t *dfa, Idx node_idx,
_NL_CURRENT (LC_COLLATE, _NL_COLLATE_EXTRAMB);
indirect = (const int32_t *)
_NL_CURRENT (LC_COLLATE, _NL_COLLATE_INDIRECTMB);
- int32_t idx = findidx (&cp, elem_len);
+ int32_t idx = findidx (table, indirect, extra, &cp, elem_len);
if (idx > 0)
for (i = 0; i < cset->nequiv_classes; ++i)
{
@@ -3988,18 +3967,9 @@ check_node_accept_bytes (const re_dfa_t *dfa, Idx node_idx,
# endif /* _LIBC */
{
/* match with range expression? */
-#if __GNUC__ >= 2 && ! (__STDC_VERSION__ < 199901L && defined __STRICT_ANSI__)
- wchar_t cmp_buf[] = {L'\0', L'\0', wc, L'\0', L'\0', L'\0'};
-#else
- wchar_t cmp_buf[] = {L'\0', L'\0', L'\0', L'\0', L'\0', L'\0'};
- cmp_buf[2] = wc;
-#endif
for (i = 0; i < cset->nranges; ++i)
{
- cmp_buf[0] = cset->range_starts[i];
- cmp_buf[4] = cset->range_ends[i];
- if (wcscoll (cmp_buf, cmp_buf + 2) <= 0
- && wcscoll (cmp_buf + 2, cmp_buf + 4) <= 0)
+ if (cset->range_starts[i] <= wc && wc <= cset->range_ends[i])
{
match_len = char_len;
goto check_node_accept_bytes_match;
@@ -4137,7 +4107,7 @@ check_node_accept (const re_match_context_t *mctx, const re_token_t *node,
static reg_errcode_t
internal_function __attribute_warn_unused_result__
-extend_buffers (re_match_context_t *mctx)
+extend_buffers (re_match_context_t *mctx, int min_len)
{
reg_errcode_t ret;
re_string_t *pstr = &mctx->input;
@@ -4147,8 +4117,10 @@ extend_buffers (re_match_context_t *mctx)
<= pstr->bufs_len, 0))
return REG_ESPACE;
- /* Double the lengths of the buffers. */
- ret = re_string_realloc_buffers (pstr, MIN (pstr->len, pstr->bufs_len * 2));
+ /* Double the lengths of the buffers, but allocate at least MIN_LEN. */
+ ret = re_string_realloc_buffers (pstr,
+ MAX (min_len,
+ MIN (pstr->len, pstr->bufs_len * 2)));
if (BE (ret != REG_NOERROR, 0))
return ret;
@@ -4204,7 +4176,7 @@ internal_function __attribute_warn_unused_result__
match_ctx_init (re_match_context_t *mctx, int eflags, Idx n)
{
mctx->eflags = eflags;
- mctx->match_last = REG_MISSING;
+ mctx->match_last = -1;
if (n > 0)
{
/* Avoid overflow. */
@@ -4325,7 +4297,7 @@ match_ctx_add_entry (re_match_context_t *mctx, Idx node, Idx str_idx, Idx from,
return REG_NOERROR;
}
-/* Return the first entry with the same str_idx, or REG_MISSING if none is
+/* Return the first entry with the same str_idx, or -1 if none is
found. Note that MCTX->BKREF_ENTS is already sorted by MCTX->STR_IDX. */
static Idx
@@ -4345,7 +4317,7 @@ search_cur_bkref_entry (const re_match_context_t *mctx, Idx str_idx)
if (left < last && mctx->bkref_ents[left].str_idx == str_idx)
return left;
else
- return REG_MISSING;
+ return -1;
}
/* Register the node NODE, whose type is OP_OPEN_SUBEXP, and which matches
diff --git a/lib/rename.c b/lib/rename.c
index 4ebfc31..e1d169a 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-2012 Free Software Foundation, Inc.
+ Copyright (C) 2001-2003, 2005-2006, 2009-2016 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -285,7 +285,7 @@ rpl_rename (char const *src, char const *dst)
char *dst_temp = (char *) dst;
bool src_slash;
bool dst_slash;
- bool dst_exists;
+ bool dst_exists _GL_UNUSED;
int ret_val = -1;
int rename_errno = ENOTDIR;
struct stat src_st;
@@ -462,7 +462,9 @@ rpl_rename (char const *src, char const *dst)
ret_val = rename (src_temp, dst_temp);
rename_errno = errno;
- out:
+
+ out: _GL_UNUSED_LABEL;
+
if (src_temp != src)
free (src_temp);
if (dst_temp != dst)
diff --git a/lib/rmdir.c b/lib/rmdir.c
index 5017064..4949df2 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-2012 Free Software
+ Copyright (C) 1988, 1990, 1999, 2003-2006, 2009-2016 Free Software
Foundation, Inc.
This program is free software: you can redistribute it and/or modify
diff --git a/lib/same-inode.h b/lib/same-inode.h
index 8c3900d..c7a8fb5 100644
--- a/lib/same-inode.h
+++ b/lib/same-inode.h
@@ -1,6 +1,6 @@
-/* Determine whether two stat buffers refer to the same file.
+/* Determine whether two stat buffers are known to refer to the same file.
- Copyright (C) 2006, 2009-2012 Free Software Foundation, Inc.
+ Copyright (C) 2006, 2009-2016 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -24,6 +24,10 @@
&& (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
# else
# define SAME_INODE(a, b) \
((a).st_ino == (b).st_ino \
diff --git a/lib/se-context.in.h b/lib/se-context.in.h
index a692f5a..c3890a2 100644
--- a/lib/se-context.in.h
+++ b/lib/se-context.in.h
@@ -3,6 +3,9 @@
# include <errno.h>
+#ifndef _GL_INLINE_HEADER_BEGIN
+ #error "Please include config.h first."
+#endif
_GL_INLINE_HEADER_BEGIN
#ifndef SE_CONTEXT_INLINE
# define SE_CONTEXT_INLINE _GL_INLINE
@@ -29,6 +32,14 @@ SE_CONTEXT_INLINE int context_range_set (context_t sc _GL_UNUSED_PARAMETER,
SE_CONTEXT_INLINE int context_type_set (context_t sc _GL_UNUSED_PARAMETER,
char const *s _GL_UNUSED_PARAMETER)
{ errno = ENOTSUP; return -1; }
+SE_CONTEXT_INLINE char *context_type_get (context_t sc _GL_UNUSED_PARAMETER)
+ { errno = ENOTSUP; return (void *) 0; }
+SE_CONTEXT_INLINE char *context_range_get (context_t sc _GL_UNUSED_PARAMETER)
+ { errno = ENOTSUP; return (void *) 0; }
+SE_CONTEXT_INLINE char *context_role_get (context_t sc _GL_UNUSED_PARAMETER)
+ { errno = ENOTSUP; return (void *) 0; }
+SE_CONTEXT_INLINE char *context_user_get (context_t sc _GL_UNUSED_PARAMETER)
+ { errno = ENOTSUP; return (void *) 0; }
_GL_INLINE_HEADER_END
diff --git a/lib/se-selinux.in.h b/lib/se-selinux.in.h
index 78d7d14..dd56e27 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-2012 Free Software Foundation, Inc.
+ Copyright (C) 2008-2016 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -31,6 +31,9 @@
# include <sys/types.h>
# include <errno.h>
+#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
@@ -41,7 +44,7 @@ _GL_INLINE_HEADER_BEGIN
# if !GNULIB_defined_security_types
typedef unsigned short security_class_t;
-# define security_context_t char*
+typedef char *security_context_t;
# define is_selinux_enabled() 0
SE_SELINUX_INLINE int
@@ -100,6 +103,9 @@ security_compute_create (security_context_t scon _GL_UNUSED_PARAMETER,
security_class_t tclass _GL_UNUSED_PARAMETER,
security_context_t *newcon _GL_UNUSED_PARAMETER)
{ errno = ENOTSUP; return -1; }
+SE_SELINUX_INLINE security_class_t
+string_to_security_class (char const *name)
+ { errno = ENOTSUP; return 0; }
SE_SELINUX_INLINE int
matchpathcon_init_prefix (char const *path _GL_UNUSED_PARAMETER,
char const *prefix _GL_UNUSED_PARAMETER)
@@ -108,6 +114,9 @@ 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
# endif
diff --git a/lib/secure_getenv.c b/lib/secure_getenv.c
new file mode 100644
index 0000000..88a60dc
--- /dev/null
+++ b/lib/secure_getenv.c
@@ -0,0 +1,54 @@
+/* Look up an environment variable, returning NULL in insecure situations.
+
+ Copyright 2013-2016 Free Software Foundation, Inc.
+
+ This 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
new file mode 100644
index 0000000..fbb5c16
--- /dev/null
+++ b/lib/set-acl.c
@@ -0,0 +1,48 @@
+/* set-acl.c - set access control list equivalent to a mode
+
+ Copyright (C) 2002-2003, 2005-2016 Free Software Foundation, Inc.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+ Written by Paul Eggert and Andreas Gruenbacher, and Bruno Haible. */
+
+#include <config.h>
+
+#include "acl.h"
+
+#include <errno.h>
+
+#include "quote.h"
+#include "error.h"
+#include "gettext.h"
+#define _(msgid) gettext (msgid)
+
+
+/* Set the access control lists of a file. If DESC is a valid file
+ descriptor, use file descriptor operations where available, else use
+ filename based operations on NAME. If access control lists are not
+ available, fchmod the target file to MODE. Also sets the
+ non-permission bits of the destination file (S_ISUID, S_ISGID, S_ISVTX)
+ to those from MODE if any are set.
+ Return 0 if successful. On failure, output a diagnostic, set errno and
+ return -1. */
+
+int
+set_acl (char const *name, int desc, mode_t mode)
+{
+ int ret = qset_acl (name, desc, mode);
+ if (ret != 0)
+ error (0, errno, _("setting permissions for %s"), quote (name));
+ return ret;
+}
diff --git a/lib/set-mode-acl.c b/lib/set-permissions.c
index c7a8343..2c77356 100644
--- a/lib/set-mode-acl.c
+++ b/lib/set-permissions.c
@@ -1,6 +1,6 @@
-/* set-mode-acl.c - set access control list equivalent to a mode
+/* Set permissions of a file. -*- coding: utf-8 -*-
- Copyright (C) 2002-2003, 2005-2012 Free Software Foundation, Inc.
+ Copyright (C) 2002-2003, 2005-2016 Free Software Foundation, Inc.
This 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,194 +15,46 @@
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
- Written by Paul Eggert and Andreas Gruenbacher, and Bruno Haible. */
+ Written by Paul Eggert, Andreas Grünbacher, and Bruno Haible. */
#include <config.h>
-#define ACL_INTERNAL_INLINE _GL_EXTERN_INLINE
-
#include "acl.h"
#include "acl-internal.h"
-#include "gettext.h"
-#define _(msgid) gettext (msgid)
-
-
-/* If DESC is a valid file descriptor use fchmod to change the
- file's mode to MODE on systems that have fchown. On systems
- that don't have fchown and if DESC is invalid, use chown on
- NAME instead.
- Return 0 if successful. Return -1 and set errno upon failure. */
-
-int
-chmod_or_fchmod (const char *name, int desc, mode_t mode)
-{
- if (HAVE_FCHMOD && desc != -1)
- return fchmod (desc, mode);
- else
- return chmod (name, mode);
-}
-
-/* Set the access control lists of a file. If DESC is a valid file
- descriptor, use file descriptor operations where available, else use
- filename based operations on NAME. If access control lists are not
- available, fchmod the target file to MODE. Also sets the
- non-permission bits of the destination file (S_ISUID, S_ISGID, S_ISVTX)
- to those from MODE if any are set.
- Return 0 if successful. Return -1 and set errno upon failure. */
-
-int
-qset_acl (char const *name, int desc, mode_t mode)
-{
#if USE_ACL
-# if HAVE_ACL_GET_FILE
- /* POSIX 1003.1e draft 17 (abandoned) specific version. */
- /* Linux, FreeBSD, Mac OS X, IRIX, Tru64 */
-# if !HAVE_ACL_TYPE_EXTENDED
- /* Linux, FreeBSD, IRIX, Tru64 */
-
- /* We must also have acl_from_text and acl_delete_def_file.
- (acl_delete_def_file could be emulated with acl_init followed
- by acl_set_file, but acl_set_file with an empty acl is
- unspecified.) */
-
-# ifndef HAVE_ACL_FROM_TEXT
-# error Must have acl_from_text (see POSIX 1003.1e draft 17).
-# endif
-# ifndef HAVE_ACL_DELETE_DEF_FILE
-# error Must have acl_delete_def_file (see POSIX 1003.1e draft 17).
-# endif
-
- acl_t acl;
- int ret;
-
- if (HAVE_ACL_FROM_MODE) /* Linux */
- {
- acl = acl_from_mode (mode);
- if (!acl)
- return -1;
- }
- else /* FreeBSD, IRIX, Tru64 */
- {
- /* If we were to create the ACL using the functions acl_init(),
- acl_create_entry(), acl_set_tag_type(), acl_set_qualifier(),
- acl_get_permset(), acl_clear_perm[s](), acl_add_perm(), we
- would need to create a qualifier. I don't know how to do this.
- So create it using acl_from_text(). */
-
-# if HAVE_ACL_FREE_TEXT /* Tru64 */
- char acl_text[] = "u::---,g::---,o::---,";
-# else /* FreeBSD, IRIX */
- char acl_text[] = "u::---,g::---,o::---";
-# endif
-
- if (mode & S_IRUSR) acl_text[ 3] = 'r';
- if (mode & S_IWUSR) acl_text[ 4] = 'w';
- if (mode & S_IXUSR) acl_text[ 5] = 'x';
- if (mode & S_IRGRP) acl_text[10] = 'r';
- if (mode & S_IWGRP) acl_text[11] = 'w';
- if (mode & S_IXGRP) acl_text[12] = 'x';
- if (mode & S_IROTH) acl_text[17] = 'r';
- if (mode & S_IWOTH) acl_text[18] = 'w';
- if (mode & S_IXOTH) acl_text[19] = 'x';
-
- acl = acl_from_text (acl_text);
- if (!acl)
- return -1;
- }
- if (HAVE_ACL_SET_FD && desc != -1)
- ret = acl_set_fd (desc, acl);
- else
- ret = acl_set_file (name, ACL_TYPE_ACCESS, acl);
- if (ret != 0)
- {
- int saved_errno = errno;
- acl_free (acl);
-
- if (ACL_NOT_WELL_SUPPORTED (errno))
- return chmod_or_fchmod (name, desc, mode);
- else
- {
- errno = saved_errno;
- return -1;
- }
- }
- else
- acl_free (acl);
-
- if (S_ISDIR (mode) && acl_delete_def_file (name))
- return -1;
-
- if (!MODE_INSIDE_ACL || (mode & (S_ISUID | S_ISGID | S_ISVTX)))
- {
- /* We did not call chmod so far, and either the mode and the ACL are
- separate or special bits are to be set which don't fit into ACLs. */
- return chmod_or_fchmod (name, desc, mode);
- }
- return 0;
-
-# else /* HAVE_ACL_TYPE_EXTENDED */
- /* Mac OS X */
-
- /* On Mac OS X, acl_get_file (name, ACL_TYPE_ACCESS)
- and acl_get_file (name, ACL_TYPE_DEFAULT)
- always return NULL / EINVAL. You have to use
- acl_get_file (name, ACL_TYPE_EXTENDED)
- or acl_get_fd (open (name, ...))
- to retrieve an ACL.
- On the other hand,
- acl_set_file (name, ACL_TYPE_ACCESS, acl)
- and acl_set_file (name, ACL_TYPE_DEFAULT, acl)
- have the same effect as
- acl_set_file (name, ACL_TYPE_EXTENDED, acl):
- Each of these calls sets the file's ACL. */
-
- acl_t acl;
- int ret;
-
- /* Remove the ACL if the file has ACLs. */
- if (HAVE_ACL_GET_FD && desc != -1)
- acl = acl_get_fd (desc);
- else
- acl = acl_get_file (name, ACL_TYPE_EXTENDED);
- if (acl)
- {
- acl_free (acl);
-
- acl = acl_init (0);
- if (acl)
- {
- if (HAVE_ACL_SET_FD && desc != -1)
- ret = acl_set_fd (desc, acl);
- else
- ret = acl_set_file (name, ACL_TYPE_EXTENDED, acl);
- if (ret != 0)
- {
- int saved_errno = errno;
-
- acl_free (acl);
+# if ! defined HAVE_ACL_FROM_MODE && defined HAVE_ACL_FROM_TEXT /* FreeBSD, IRIX, Tru64 */
+# if HAVE_ACL_GET_FILE && !HAVE_ACL_TYPE_EXTENDED
- if (ACL_NOT_WELL_SUPPORTED (saved_errno))
- return chmod_or_fchmod (name, desc, mode);
- else
- {
- errno = saved_errno;
- return -1;
- }
- }
- acl_free (acl);
- }
- }
-
- /* Since !MODE_INSIDE_ACL, we have to call chmod explicitly. */
- return chmod_or_fchmod (name, desc, mode);
+static acl_t
+acl_from_mode (mode_t mode)
+{
+# if HAVE_ACL_FREE_TEXT /* Tru64 */
+ char acl_text[] = "u::---,g::---,o::---,";
+# else /* FreeBSD, IRIX */
+ char acl_text[] = "u::---,g::---,o::---";
# endif
-# elif HAVE_FACL && defined GETACL /* Solaris, Cygwin, not HP-UX */
-
- int done_setacl = 0;
+ if (mode & S_IRUSR) acl_text[ 3] = 'r';
+ if (mode & S_IWUSR) acl_text[ 4] = 'w';
+ if (mode & S_IXUSR) acl_text[ 5] = 'x';
+ if (mode & S_IRGRP) acl_text[10] = 'r';
+ if (mode & S_IWGRP) acl_text[11] = 'w';
+ if (mode & S_IXGRP) acl_text[12] = 'x';
+ if (mode & S_IROTH) acl_text[17] = 'r';
+ if (mode & S_IWOTH) acl_text[18] = 'w';
+ if (mode & S_IXOTH) acl_text[19] = 'x';
+
+ return acl_from_text (acl_text);
+}
+# endif
+# endif
+# if HAVE_FACL && defined GETACL /* Solaris, Cygwin, not HP-UX */
+static int
+set_acls_from_mode (const char *name, int desc, mode_t mode, bool *must_chmod)
+{
# ifdef ACE_GETACL
/* Solaris also has a different variant of ACLs, used in ZFS and NFSv4
file systems (whereas the other ones are used in UFS file systems). */
@@ -377,53 +229,54 @@ qset_acl (char const *name, int desc, mode_t mode)
if (ret < 0 && errno != EINVAL && errno != ENOTSUP)
{
if (errno == ENOSYS)
- return chmod_or_fchmod (name, desc, mode);
+ {
+ *must_chmod = true;
+ return 0;
+ }
return -1;
}
if (ret == 0)
- done_setacl = 1;
+ return 0;
}
# endif
- if (!done_setacl)
- {
- aclent_t entries[3];
- int ret;
-
- entries[0].a_type = USER_OBJ;
- entries[0].a_id = 0; /* irrelevant */
- entries[0].a_perm = (mode >> 6) & 7;
- entries[1].a_type = GROUP_OBJ;
- entries[1].a_id = 0; /* irrelevant */
- entries[1].a_perm = (mode >> 3) & 7;
- entries[2].a_type = OTHER_OBJ;
- entries[2].a_id = 0;
- entries[2].a_perm = mode & 7;
-
- if (desc != -1)
- ret = facl (desc, SETACL,
- sizeof (entries) / sizeof (aclent_t), entries);
- else
- ret = acl (name, SETACL,
- sizeof (entries) / sizeof (aclent_t), entries);
- if (ret < 0)
- {
- if (errno == ENOSYS || errno == EOPNOTSUPP)
- return chmod_or_fchmod (name, desc, mode);
- return -1;
- }
- }
+ {
+ aclent_t entries[3];
+ int ret;
+
+ entries[0].a_type = USER_OBJ;
+ entries[0].a_id = 0; /* irrelevant */
+ entries[0].a_perm = (mode >> 6) & 7;
+ entries[1].a_type = GROUP_OBJ;
+ entries[1].a_id = 0; /* irrelevant */
+ entries[1].a_perm = (mode >> 3) & 7;
+ entries[2].a_type = OTHER_OBJ;
+ entries[2].a_id = 0;
+ entries[2].a_perm = mode & 7;
- if (!MODE_INSIDE_ACL || (mode & (S_ISUID | S_ISGID | S_ISVTX)))
- {
- /* We did not call chmod so far, so the special bits have not yet
- been set. */
- return chmod_or_fchmod (name, desc, mode);
- }
- return 0;
+ if (desc != -1)
+ ret = facl (desc, SETACL,
+ sizeof (entries) / sizeof (aclent_t), entries);
+ else
+ ret = acl (name, SETACL,
+ sizeof (entries) / sizeof (aclent_t), entries);
+ if (ret < 0)
+ {
+ if (errno == ENOSYS || errno == EOPNOTSUPP)
+ {
+ *must_chmod = true;
+ return 0;
+ }
+ return -1;
+ }
+ return 0;
+ }
+}
# elif HAVE_GETACL /* HP-UX */
-
+static int
+context_acl_from_mode (struct permission_context *ctx, const char *name, int desc)
+{
struct stat statbuf;
int ret;
@@ -434,87 +287,60 @@ qset_acl (char const *name, int desc, mode_t mode)
if (ret < 0)
return -1;
- {
- struct acl_entry entries[3];
-
- entries[0].uid = statbuf.st_uid;
- entries[0].gid = ACL_NSGROUP;
- entries[0].mode = (mode >> 6) & 7;
- entries[1].uid = ACL_NSUSER;
- entries[1].gid = statbuf.st_gid;
- entries[1].mode = (mode >> 3) & 7;
- entries[2].uid = ACL_NSUSER;
- entries[2].gid = ACL_NSGROUP;
- entries[2].mode = mode & 7;
-
- if (desc != -1)
- ret = fsetacl (desc, sizeof (entries) / sizeof (struct acl_entry), entries);
- else
- ret = setacl (name, sizeof (entries) / sizeof (struct acl_entry), entries);
- }
- if (ret < 0)
- {
- if (!(errno == ENOSYS || errno == EOPNOTSUPP || errno == ENOTSUP))
- return -1;
+ ctx->entries[0].uid = statbuf.st_uid;
+ ctx->entries[0].gid = ACL_NSGROUP;
+ ctx->entries[0].mode = (ctx->mode >> 6) & 7;
+ ctx->entries[1].uid = ACL_NSUSER;
+ ctx->entries[1].gid = statbuf.st_gid;
+ ctx->entries[1].mode = (ctx->mode >> 3) & 7;
+ ctx->entries[2].uid = ACL_NSUSER;
+ ctx->entries[2].gid = ACL_NSGROUP;
+ ctx->entries[2].mode = ctx->mode & 7;
+ ctx->count = 3;
+ return 0;
+}
# if HAVE_ACLV_H /* HP-UX >= 11.11 */
- {
- struct acl entries[4];
-
- entries[0].a_type = USER_OBJ;
- entries[0].a_id = 0; /* irrelevant */
- entries[0].a_perm = (mode >> 6) & 7;
- entries[1].a_type = GROUP_OBJ;
- entries[1].a_id = 0; /* irrelevant */
- entries[1].a_perm = (mode >> 3) & 7;
- entries[2].a_type = CLASS_OBJ;
- entries[2].a_id = 0;
- entries[2].a_perm = (mode >> 3) & 7;
- entries[3].a_type = OTHER_OBJ;
- entries[3].a_id = 0;
- entries[3].a_perm = mode & 7;
-
- ret = aclsort (sizeof (entries) / sizeof (struct acl), 1, entries);
- if (ret > 0)
- abort ();
- if (ret < 0)
- {
- if (0)
- return chmod_or_fchmod (name, desc, mode);
- return -1;
- }
+static int
+context_aclv_from_mode (struct permission_context *ctx)
+{
+ int ret;
- ret = acl ((char *) name, ACL_SET,
- sizeof (entries) / sizeof (struct acl), entries);
- if (ret < 0)
- {
- if (errno == ENOSYS || errno == EOPNOTSUPP || errno == EINVAL)
- return chmod_or_fchmod (name, desc, mode);
- return -1;
- }
- }
-# else
- return chmod_or_fchmod (name, desc, mode);
+ ctx->aclv_entries[0].a_type = USER_OBJ;
+ ctx->aclv_entries[0].a_id = 0; /* irrelevant */
+ ctx->aclv_entries[0].a_perm = (ctx->mode >> 6) & 7;
+ ctx->aclv_entries[1].a_type = GROUP_OBJ;
+ ctx->aclv_entries[1].a_id = 0; /* irrelevant */
+ ctx->aclv_entries[1].a_perm = (ctx->mode >> 3) & 7;
+ ctx->aclv_entries[2].a_type = CLASS_OBJ;
+ ctx->aclv_entries[2].a_id = 0;
+ ctx->aclv_entries[2].a_perm = (ctx->mode >> 3) & 7;
+ ctx->aclv_entries[3].a_type = OTHER_OBJ;
+ ctx->aclv_entries[3].a_id = 0;
+ ctx->aclv_entries[3].a_perm = ctx->mode & 7;
+ ctx->aclv_count = 4;
+
+ ret = aclsort (ctx->aclv_count, 1, ctx->aclv_entries);
+ if (ret > 0)
+ abort ();
+ return ret;
+}
# endif
- }
-
- if (mode & (S_ISUID | S_ISGID | S_ISVTX))
- {
- /* We did not call chmod so far, so the special bits have not yet
- been set. */
- return chmod_or_fchmod (name, desc, mode);
- }
- return 0;
# elif HAVE_ACLX_GET && defined ACL_AIX_WIP /* AIX */
-
+static int
+set_acls_from_mode (const char *name, int desc, mode_t mode, bool *must_chmod)
+{
acl_type_list_t types;
size_t types_size = sizeof (types);
acl_type_t type;
if (aclx_gettypes (name, &types, &types_size) < 0
|| types.num_entries == 0)
- return chmod_or_fchmod (name, desc, mode);
+ {
+ *must_chmod = true;
+ return 0;
+ }
/* XXX Do we need to clear all types of ACLs for the given file, or is it
sufficient to clear the first one? */
@@ -611,89 +437,411 @@ qset_acl (char const *name, int desc, mode_t mode)
return ret;
}
- return chmod_or_fchmod (name, desc, mode);
+ *must_chmod = true;
+ return 0;
+}
# elif HAVE_STATACL /* older AIX */
+static int
+context_acl_from_mode (struct permission_context *ctx)
+{
+ ctx->u.a.acl_len = (char *) &ctx->u.a.acl_ext[0] - (char *) &ctx->u.a; /* no entries */
+ ctx->u.a.acl_mode = ctx->mode & ~(S_IXACL | 0777);
+ ctx->u.a.u_access = (ctx->mode >> 6) & 7;
+ ctx->u.a.g_access = (ctx->mode >> 3) & 7;
+ ctx->u.a.o_access = ctx->mode & 7;
+ ctx->have_u = true;
+ return 0;
+}
- union { struct acl a; char room[128]; } u;
+# elif HAVE_ACLSORT /* NonStop Kernel */
+static int
+context_acl_from_mode (struct permission_context *ctx)
+{
int ret;
- u.a.acl_len = (char *) &u.a.acl_ext[0] - (char *) &u.a; /* no entries */
- u.a.acl_mode = mode & ~(S_IXACL | 0777);
- u.a.u_access = (mode >> 6) & 7;
- u.a.g_access = (mode >> 3) & 7;
- u.a.o_access = mode & 7;
+ ctx->entries[0].a_type = USER_OBJ;
+ ctx->entries[0].a_id = 0; /* irrelevant */
+ ctx->entries[0].a_perm = (ctx->mode >> 6) & 7;
+ ctx->entries[1].a_type = GROUP_OBJ;
+ ctx->entries[1].a_id = 0; /* irrelevant */
+ ctx->entries[1].a_perm = (ctx->mode >> 3) & 7;
+ ctx->entries[2].a_type = CLASS_OBJ;
+ ctx->entries[2].a_id = 0;
+ ctx->entries[2].a_perm = (ctx->mode >> 3) & 7;
+ ctx->entries[3].a_type = OTHER_OBJ;
+ ctx->entries[3].a_id = 0;
+ ctx->entries[3].a_perm = ctx->mode & 7;
+ ctx->count = 4;
+
+ ret = aclsort (ctx->count, 1, entries);
+ if (ret > 0)
+ abort ();
+ return ret;
+}
+# endif
- if (desc != -1)
- ret = fchacl (desc, &u.a, u.a.acl_len);
+static int
+set_acls (struct permission_context *ctx, const char *name, int desc,
+ int from_mode, bool *must_chmod, bool *acls_set)
+{
+ int ret = 0;
+
+# if HAVE_ACL_GET_FILE
+ /* POSIX 1003.1e (draft 17 -- abandoned) specific version. */
+ /* Linux, FreeBSD, Mac OS X, IRIX, Tru64 */
+# if !HAVE_ACL_TYPE_EXTENDED
+ /* Linux, FreeBSD, IRIX, Tru64 */
+
+# ifndef HAVE_ACL_FROM_TEXT
+# error Must have acl_from_text (see POSIX 1003.1e draft 17).
+# endif
+# ifndef HAVE_ACL_DELETE_DEF_FILE
+# error Must have acl_delete_def_file (see POSIX 1003.1e draft 17).
+# endif
+
+ if (! ctx->acls_not_supported)
+ {
+ if (ret == 0 && from_mode)
+ {
+ if (ctx->acl)
+ acl_free (ctx->acl);
+ ctx->acl = acl_from_mode (ctx->mode);
+ if (ctx->acl == NULL)
+ ret = -1;
+ }
+
+ if (ret == 0 && ctx->acl)
+ {
+ if (HAVE_ACL_SET_FD && desc != -1)
+ ret = acl_set_fd (desc, ctx->acl);
+ else
+ ret = acl_set_file (name, ACL_TYPE_ACCESS, ctx->acl);
+ if (ret != 0)
+ {
+ if (! acl_errno_valid (errno))
+ {
+ ctx->acls_not_supported = true;
+ if (from_mode || acl_access_nontrivial (ctx->acl) == 0)
+ ret = 0;
+ }
+ }
+ else
+ {
+ *acls_set = true;
+ if (S_ISDIR(ctx->mode))
+ {
+ if (! from_mode && ctx->default_acl &&
+ acl_default_nontrivial (ctx->default_acl))
+ ret = acl_set_file (name, ACL_TYPE_DEFAULT,
+ ctx->default_acl);
+ else
+ ret = acl_delete_def_file (name);
+ }
+ }
+ }
+ }
+
+# if HAVE_ACL_TYPE_NFS4 /* FreeBSD */
+
+ /* File systems either support POSIX ACLs (for example, ufs) or NFS4 ACLs
+ (for example, zfs). */
+
+ /* TODO: Implement setting ACLs once get_permissions() reads them. */
+
+# endif
+
+# else /* HAVE_ACL_TYPE_EXTENDED */
+ /* Mac OS X */
+
+ /* On Mac OS X, acl_get_file (name, ACL_TYPE_ACCESS)
+ and acl_get_file (name, ACL_TYPE_DEFAULT)
+ always return NULL / EINVAL. You have to use
+ acl_get_file (name, ACL_TYPE_EXTENDED)
+ or acl_get_fd (open (name, ...))
+ to retrieve an ACL.
+ On the other hand,
+ acl_set_file (name, ACL_TYPE_ACCESS, acl)
+ and acl_set_file (name, ACL_TYPE_DEFAULT, acl)
+ have the same effect as
+ acl_set_file (name, ACL_TYPE_EXTENDED, acl):
+ Each of these calls sets the file's ACL. */
+
+ if (ctx->acl == NULL)
+ {
+ acl_t acl;
+
+ /* Remove ACLs if the file has ACLs. */
+ if (HAVE_ACL_GET_FD && desc != -1)
+ acl = acl_get_fd (desc);
+ else
+ acl = acl_get_file (name, ACL_TYPE_EXTENDED);
+ if (acl)
+ {
+ acl_free (acl);
+
+ acl = acl_init (0);
+ if (acl)
+ {
+ if (HAVE_ACL_SET_FD && desc != -1)
+ ret = acl_set_fd (desc, acl);
+ else
+ ret = acl_set_file (name, ACL_TYPE_EXTENDED, acl);
+ acl_free (acl);
+ }
+ else
+ ret = -1;
+ }
+ }
else
- ret = chacl (name, &u.a, u.a.acl_len);
+ {
+ if (HAVE_ACL_SET_FD && desc != -1)
+ ret = acl_set_fd (desc, ctx->acl);
+ else
+ ret = acl_set_file (name, ACL_TYPE_EXTENDED, ctx->acl);
+ if (ret != 0)
+ {
+ if (! acl_errno_valid (errno)
+ && ! acl_extended_nontrivial (ctx->acl))
+ ret = 0;
+ }
+ }
+ *acls_set = true;
- if (ret < 0 && errno == ENOSYS)
- return chmod_or_fchmod (name, desc, mode);
+# endif
- return ret;
+# elif defined GETACL /* Solaris, Cygwin, not HP-UX */
-# elif HAVE_ACLSORT /* NonStop Kernel */
+ /* Solaris 2.5 through Solaris 10, Cygwin, and contemporaneous versions
+ of Unixware. The acl() call returns the access and default ACL both
+ at once. */
- struct acl entries[4];
- int ret;
+ /* If both ace_entries and entries are available, try SETACL before
+ ACE_SETACL, because SETACL cannot fail with ENOTSUP whereas ACE_SETACL
+ can. */
- entries[0].a_type = USER_OBJ;
- entries[0].a_id = 0; /* irrelevant */
- entries[0].a_perm = (mode >> 6) & 7;
- entries[1].a_type = GROUP_OBJ;
- entries[1].a_id = 0; /* irrelevant */
- entries[1].a_perm = (mode >> 3) & 7;
- entries[2].a_type = CLASS_OBJ;
- entries[2].a_id = 0;
- entries[2].a_perm = (mode >> 3) & 7;
- entries[3].a_type = OTHER_OBJ;
- entries[3].a_id = 0;
- entries[3].a_perm = mode & 7;
-
- ret = aclsort (sizeof (entries) / sizeof (struct acl), 1, entries);
- if (ret > 0)
- abort ();
- if (ret < 0)
+ if (from_mode)
+ return set_acls_from_mode (name, desc, ctx->mode, must_chmod);
+
+ if (ret == 0 && ctx->count)
{
- if (0)
- return chmod_or_fchmod (name, desc, mode);
- return -1;
+ if (desc != -1)
+ ret = facl (desc, SETACL, ctx->count, ctx->entries);
+ else
+ ret = acl (name, SETACL, ctx->count, ctx->entries);
+ if (ret < 0)
+ {
+ if ((errno == ENOSYS || errno == EOPNOTSUPP || errno == EINVAL)
+ && acl_nontrivial (ctx->count, ctx->entries) == 0)
+ ret = 0;
+ }
+ else
+ *acls_set = true;
}
- ret = acl ((char *) name, ACL_SET,
- sizeof (entries) / sizeof (struct acl), entries);
- if (ret < 0)
+# ifdef ACE_GETACL
+ if (ret == 0 && ctx->ace_count)
{
- if (0)
- return chmod_or_fchmod (name, desc, mode);
- return -1;
+ if (desc != -1)
+ ret = facl (desc, ACE_SETACL, ctx->ace_count, ctx->ace_entries);
+ else
+ ret = acl (name, ACE_SETACL, ctx->ace_count, ctx->ace_entries);
+ if (ret < 0)
+ {
+ if ((errno == ENOSYS || errno == EINVAL || errno == ENOTSUP)
+ && acl_ace_nontrivial (ctx->ace_count, ctx->ace_entries) == 0)
+ ret = 0;
+ }
+ else
+ *acls_set = true;
}
+# endif
- if (mode & (S_ISUID | S_ISGID | S_ISVTX))
+# elif HAVE_GETACL /* HP-UX */
+
+ if (from_mode)
+ ret = context_acl_from_mode (ctx, name, desc);
+
+ if (ret == 0 && ctx->count > 0)
{
- /* We did not call chmod so far, so the special bits have not yet
- been set. */
- return chmod_or_fchmod (name, desc, mode);
+ if (desc != -1)
+ ret = fsetacl (desc, ctx->count, ctx->entries);
+ else
+ ret = setacl (name, ctx->count, ctx->entries);
+ if (ret < 0)
+ {
+ if ((errno == ENOSYS || errno == EOPNOTSUPP || errno == ENOTSUP)
+ && (from_mode || !acl_nontrivial (ctx->count, ctx->entries)))
+ ret = 0;
+ }
+ else
+ *acls_set = true;
}
- return 0;
-# else /* Unknown flavor of ACLs */
- return chmod_or_fchmod (name, desc, mode);
+# if HAVE_ACLV_H
+ if (from_mode)
+ ret = context_aclv_from_mode (ctx);
+
+ if (ret == 0 && ctx->aclv_count > 0)
+ {
+ ret = acl ((char *) name, ACL_SET, ctx->aclv_count, ctx->aclv_entries);
+ if (ret < 0)
+ {
+ if ((errno == ENOSYS || errno == EOPNOTSUPP || errno == EINVAL)
+ && (from_mode || !aclv_nontrivial (ctx->aclv_count, ctx->aclv_entries)))
+ ret = 0;
+ }
+ else
+ *acls_set = true;
+ }
+# endif
+
+# elif HAVE_ACLX_GET && ACL_AIX_WIP /* AIX */
+
+ /* TODO: Implement setting ACLs once get_permissions() reads them. */
+
+ if (from_mode)
+ ret = set_acls_from_mode (name, desc, mode, must_chmod);
+
+# elif HAVE_STATACL /* older AIX */
+
+ if (from_mode)
+ ret = context_acl_from_mode (ctx);
+
+ if (ret == 0 && ctx->have_u)
+ {
+ if (desc != -1)
+ ret = fchacl (desc, &ctx->u.a, ctx->u.a.acl_len);
+ else
+ ret = chacl ((char *) name, &ctx->u.a, ctx->u.a.acl_len);
+ if (ret < 0)
+ {
+ if (errno == ENOSYS && from_mode)
+ ret = 0;
+ }
+ else
+ *acls_set = true;
+ }
+
+# elif HAVE_ACLSORT /* NonStop Kernel */
+
+ if (from_mode)
+ ret = context_acl_from_mode (ctx);
+
+ if (ret == 0 && ctx->count)
+ {
+ ret = acl ((char *) name, ACL_SET, ctx->count, ctx->entries);
+ if (ret != 0)
+ {
+ if (!acl_nontrivial (ctx->count, ctx->entries))
+ ret = 0;
+ }
+ else
+ *acls_set = true;
+ }
+
+# else /* No ACLs */
+
+ /* Nothing to do. */
+
# endif
-#else /* !USE_ACL */
- return chmod_or_fchmod (name, desc, mode);
+
+ return ret;
+}
#endif
+
+/* If DESC is a valid file descriptor use fchmod to change the
+ file's mode to MODE on systems that have fchmod. On systems
+ that don't have fchmod and if DESC is invalid, use chmod on
+ NAME instead.
+ Return 0 if successful. Return -1 and set errno upon failure. */
+
+int
+chmod_or_fchmod (const char *name, int desc, mode_t mode)
+{
+ if (HAVE_FCHMOD && desc != -1)
+ return fchmod (desc, mode);
+ else
+ return chmod (name, mode);
}
-/* As with qset_acl, but also output a diagnostic on failure. */
+/* Set the permissions in CTX on a file. If DESC is a valid file descriptor,
+ use file descriptor operations, else use filename based operations on NAME.
+ If access control lists are not available, fchmod the target file to the
+ mode in CTX. Also sets the non-permission bits of the destination file
+ (S_ISUID, S_ISGID, S_ISVTX) to those from the mode in CTX if any are set.
+ Return 0 if successful. Return -1 and set errno upon failure. */
int
-set_acl (char const *name, int desc, mode_t mode)
+set_permissions (struct permission_context *ctx, const char *name, int desc)
{
- int ret = qset_acl (name, desc, mode);
- if (ret != 0)
- error (0, errno, _("setting permissions for %s"), quote (name));
+ bool acls_set _GL_UNUSED = false;
+ bool early_chmod;
+ bool must_chmod = false;
+ int ret = 0;
+
+#if USE_ACL
+# if HAVE_STATACL
+ /* older AIX */
+ /* There is no need to call chmod_or_fchmod, since the mode
+ bits S_ISUID, S_ISGID, S_ISVTX are also stored in the ACL. */
+
+ early_chmod = false;
+# else
+ /* All other platforms */
+ /* On Cygwin, it is necessary to call chmod before acl, because
+ chmod can change the contents of the ACL (in ways that don't
+ change the allowed accesses, but still visible). */
+
+ early_chmod = (! MODE_INSIDE_ACL || (ctx->mode & (S_ISUID | S_ISGID | S_ISVTX)));
+# endif
+#else
+ /* No ACLs */
+
+ early_chmod = true;
+#endif
+
+ if (early_chmod)
+ {
+ ret = chmod_or_fchmod (name, desc, ctx->mode);
+ if (ret != 0)
+ return -1;
+ }
+
+#if USE_ACL
+ ret = set_acls (ctx, name, desc, false, &must_chmod, &acls_set);
+ if (! acls_set)
+ {
+ int saved_errno = ret ? errno : 0;
+
+ /* If we can't set an acl which we expect to be able to set, try setting
+ the permissions to ctx->mode. Due to possible inherited permissions,
+ we cannot simply chmod. */
+
+ ret = set_acls (ctx, name, desc, true, &must_chmod, &acls_set);
+ if (! acls_set)
+ must_chmod = true;
+
+ if (saved_errno)
+ {
+ errno = saved_errno;
+ ret = -1;
+ }
+ }
+#endif
+
+ if (must_chmod && ! early_chmod)
+ {
+ int saved_errno = ret ? errno : 0;
+
+ ret = chmod_or_fchmod (name, desc, ctx->mode);
+
+ if (saved_errno)
+ {
+ errno = saved_errno;
+ ret = -1;
+ }
+ }
+
return ret;
}
diff --git a/lib/stat.c b/lib/stat.c
index c0bcb88..62e9e0b 100644
--- a/lib/stat.c
+++ b/lib/stat.c
@@ -1,5 +1,5 @@
/* Work around platform bugs in stat.
- Copyright (C) 2009-2012 Free Software Foundation, Inc.
+ Copyright (C) 2009-2016 Free Software Foundation, Inc.
This 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/stdalign.in.h b/lib/stdalign.in.h
new file mode 100644
index 0000000..12f8a15
--- /dev/null
+++ b/lib/stdalign.in.h
@@ -0,0 +1,121 @@
+/* A substitute for ISO C11 <stdalign.h>.
+
+ Copyright 2011-2016 Free Software Foundation, Inc.
+
+ This 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 <http://www.gnu.org/licenses/>. */
+
+/* Written by Paul Eggert and Bruno Haible. */
+
+#ifndef _GL_STDALIGN_H
+#define _GL_STDALIGN_H
+
+/* ISO C11 <stdalign.h> for platforms that lack it.
+
+ References:
+ ISO C11 (latest free draft
+ <http://www.open-std.org/jtc1/sc22/wg14/www/docs/n1570.pdf>)
+ sections 6.5.3.4, 6.7.5, 7.15.
+ C++11 (latest free draft
+ <http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2011/n3242.pdf>)
+ section 18.10. */
+
+/* alignof (TYPE), also known as _Alignof (TYPE), yields the alignment
+ requirement of a structure member (i.e., slot or field) that is of
+ type TYPE, as an integer constant expression.
+
+ This differs from GCC's __alignof__ operator, which can yield a
+ better-performing alignment for an object of that type. For
+ example, on x86 with GCC, __alignof__ (double) and __alignof__
+ (long long) are 8, whereas alignof (double) and alignof (long long)
+ are 4 unless the option '-malign-double' is used.
+
+ The result cannot be used as a value for an 'enum' constant, if you
+ want to be portable to HP-UX 10.20 cc and AIX 3.2.5 xlc.
+
+ Include <stddef.h> for offsetof. */
+#include <stddef.h>
+
+/* FreeBSD 9.1 <sys/cdefs.h>, included by <stddef.h> and lots of other
+ standard headers, defines conflicting implementations of _Alignas
+ and _Alignof that are no better than ours; override them. */
+#undef _Alignas
+#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>. */
+#if (!defined __STDC_VERSION__ || __STDC_VERSION__ < 201112 \
+ || (defined __GNUC__ && __GNUC__ < 4 + (__GNUC_MINOR__ < 9)))
+# ifdef __cplusplus
+# if 201103 <= __cplusplus
+# define _Alignof(type) alignof (type)
+# else
+ template <class __t> struct __alignof_helper { char __a; __t __b; };
+# define _Alignof(type) offsetof (__alignof_helper<type>, __b)
+# endif
+# else
+# define _Alignof(type) offsetof (struct { char __a; type __b; }, __b)
+# endif
+#endif
+#if ! (defined __cplusplus && 201103 <= __cplusplus)
+# define alignof _Alignof
+#endif
+#define __alignof_is_defined 1
+
+/* alignas (A), also known as _Alignas (A), aligns a variable or type
+ to the alignment A, where A is an integer constant expression. For
+ example:
+
+ int alignas (8) foo;
+ struct s { int a; int alignas (8) bar; };
+
+ aligns the address of FOO and the offset of BAR to be multiples of 8.
+
+ A should be a power of two that is at least the type's alignment
+ and at most the implementation's alignment limit. This limit is
+ 2**28 on typical GNUish hosts, and 2**13 on MSVC. To be portable
+ to MSVC through at least version 10.0, A should be an integer
+ constant, as MSVC does not support expressions such as 1 << 3.
+ To be portable to Sun C 5.11, do not align auto variables to
+ anything stricter than their default alignment.
+
+ The following C11 requirements are not supported here:
+
+ - If A is zero, alignas has no effect.
+ - alignas can be used multiple times; the strictest one wins.
+ - alignas (TYPE) is equivalent to alignas (alignof (TYPE)).
+
+ */
+
+#if !defined __STDC_VERSION__ || __STDC_VERSION__ < 201112
+# if defined __cplusplus && 201103 <= __cplusplus
+# define _Alignas(a) alignas (a)
+# elif ((defined __APPLE__ && defined __MACH__ \
+ ? 4 < __GNUC__ + (1 <= __GNUC_MINOR__) \
+ : __GNUC__) \
+ || 061200 <= __HP_cc || 061200 <= __HP_aCC \
+ || __ICC || 0x590 <= __SUNPRO_C || 0x0600 <= __xlC__)
+# define _Alignas(a) __attribute__ ((__aligned__ (a)))
+# elif 1300 <= _MSC_VER
+# define _Alignas(a) __declspec (align (a))
+# endif
+#endif
+#if ((defined _Alignas && ! (defined __cplusplus && 201103 <= __cplusplus)) \
+ || (defined __STDC_VERSION__ && 201112 <= __STDC_VERSION__))
+# define alignas _Alignas
+#endif
+#if defined alignas || (defined __cplusplus && 201103 <= __cplusplus)
+# define __alignas_is_defined 1
+#endif
+
+#endif /* _GL_STDALIGN_H */
diff --git a/lib/stdarg.in.h b/lib/stdarg.in.h
index 3659174..63371e2 100644
--- a/lib/stdarg.in.h
+++ b/lib/stdarg.in.h
@@ -1,7 +1,5 @@
-/* -*- buffer-read-only: t -*- vi: set ro: */
-/* DO NOT EDIT! GENERATED AUTOMATICALLY! */
/* Substitute for and wrapper around <stdarg.h>.
- Copyright (C) 2008-2012 Free Software Foundation, Inc.
+ Copyright (C) 2008-2016 Free Software Foundation, Inc.
This 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/stdbool.in.h b/lib/stdbool.in.h
index 361987d..7ecf203 100644
--- a/lib/stdbool.in.h
+++ b/lib/stdbool.in.h
@@ -1,6 +1,4 @@
-/* -*- buffer-read-only: t -*- vi: set ro: */
-/* DO NOT EDIT! GENERATED AUTOMATICALLY! */
-/* Copyright (C) 2001-2003, 2006-2012 Free Software Foundation, Inc.
+/* Copyright (C) 2001-2003, 2006-2016 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
diff --git a/lib/stddef.in.h b/lib/stddef.in.h
index 15024c4..f4c4a10 100644
--- a/lib/stddef.in.h
+++ b/lib/stddef.in.h
@@ -1,8 +1,6 @@
-/* -*- buffer-read-only: t -*- vi: set ro: */
-/* DO NOT EDIT! GENERATED AUTOMATICALLY! */
/* A substitute for POSIX 2008 <stddef.h>, for platforms that have issues.
- Copyright (C) 2009-2012 Free Software Foundation, Inc.
+ Copyright (C) 2009-2016 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -41,7 +39,6 @@
# if !(defined _@GUARD_PREFIX@_STDDEF_H && defined _GL_STDDEF_WINT_T)
# ifdef __need_wint_t
-# undef _@GUARD_PREFIX@_STDDEF_H
# define _GL_STDDEF_WINT_T
# endif
# @INCLUDE_NEXT@ @NEXT_STDDEF_H@
@@ -56,33 +53,58 @@
# @INCLUDE_NEXT@ @NEXT_STDDEF_H@
-# ifndef _@GUARD_PREFIX@_STDDEF_H
-# define _@GUARD_PREFIX@_STDDEF_H
-
/* On NetBSD 5.0, the definition of NULL lacks proper parentheses. */
-#if @REPLACE_NULL@
-# undef NULL
-# ifdef __cplusplus
+# if (@REPLACE_NULL@ \
+ && (!defined _@GUARD_PREFIX@_STDDEF_H || defined _GL_STDDEF_WINT_T))
+# undef NULL
+# ifdef __cplusplus
/* ISO C++ says that the macro NULL must expand to an integer constant
expression, hence '((void *) 0)' is not allowed in C++. */
-# if __GNUG__ >= 3
+# if __GNUG__ >= 3
/* GNU C++ has a __null macro that behaves like an integer ('int' or
'long') but has the same size as a pointer. Use that, to avoid
warnings. */
-# define NULL __null
-# else
-# define NULL 0L
+# define NULL __null
+# else
+# define NULL 0L
+# endif
+# else
+# define NULL ((void *) 0)
+# endif
# endif
-# else
-# define NULL ((void *) 0)
-# endif
-#endif
+
+# ifndef _@GUARD_PREFIX@_STDDEF_H
+# define _@GUARD_PREFIX@_STDDEF_H
/* Some platforms lack wchar_t. */
#if !@HAVE_WCHAR_T@
# define wchar_t int
#endif
+/* Some platforms lack max_align_t. The check for _GCC_MAX_ALIGN_T is
+ 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)
+/* 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
+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;
+#endif
+
# endif /* _@GUARD_PREFIX@_STDDEF_H */
# endif /* _@GUARD_PREFIX@_STDDEF_H */
#endif /* __need_XXX */
diff --git a/lib/stdint.in.h b/lib/stdint.in.h
index 688b183..566f8e8 100644
--- a/lib/stdint.in.h
+++ b/lib/stdint.in.h
@@ -1,6 +1,4 @@
-/* -*- buffer-read-only: t -*- vi: set ro: */
-/* DO NOT EDIT! GENERATED AUTOMATICALLY! */
-/* Copyright (C) 2001-2002, 2004-2012 Free Software Foundation, Inc.
+/* Copyright (C) 2001-2002, 2004-2016 Free Software Foundation, Inc.
Written by Paul Eggert, Bruno Haible, Sam Steingold, Peter Burwood.
This file is part of gnulib.
@@ -40,8 +38,7 @@
other system header files; just include the system's <stdint.h>.
Ideally we should test __BIONIC__ here, but it is only defined after
<sys/cdefs.h> has been included; hence test __ANDROID__ instead. */
-#if defined __ANDROID__ \
- && defined _SYS_TYPES_H_ && !defined _SSIZE_T_DEFINED_
+#if defined __ANDROID__ && defined _GL_INCLUDING_SYS_TYPES_H
# @INCLUDE_NEXT@ @NEXT_STDINT_H@
#else
@@ -82,54 +79,60 @@
#if ! defined _@GUARD_PREFIX@_STDINT_H && ! defined _GL_JUST_INCLUDE_SYSTEM_STDINT_H
#define _@GUARD_PREFIX@_STDINT_H
+/* Get SCHAR_MIN, SCHAR_MAX, UCHAR_MAX, INT_MIN, INT_MAX,
+ LONG_MIN, LONG_MAX, ULONG_MAX, _GL_INTEGER_WIDTH. */
+#include <limits.h>
+
+/* Override WINT_MIN and WINT_MAX if gnulib's <wchar.h> or <wctype.h> overrides
+ wint_t. */
+#if @GNULIB_OVERRIDES_WINT_T@
+# undef WINT_MIN
+# undef WINT_MAX
+# define WINT_MIN 0x0U
+# define WINT_MAX 0xffffffffU
+#endif
+
+#if ! @HAVE_C99_STDINT_H@
+
/* <sys/types.h> defines some of the stdint.h types as well, on glibc,
IRIX 6.5, and OpenBSD 3.8 (via <machine/types.h>).
AIX 5.2 <sys/types.h> isn't needed and causes troubles.
Mac OS X 10.4.6 <sys/types.h> includes <stdint.h> (which is us), but
relies on the system <stdint.h> definitions, so include
<sys/types.h> after @NEXT_STDINT_H@. */
-#if @HAVE_SYS_TYPES_H@ && ! defined _AIX
-# include <sys/types.h>
-#endif
-
-/* Get SCHAR_MIN, SCHAR_MAX, UCHAR_MAX, INT_MIN, INT_MAX,
- LONG_MIN, LONG_MAX, ULONG_MAX. */
-#include <limits.h>
+# if @HAVE_SYS_TYPES_H@ && ! defined _AIX
+# include <sys/types.h>
+# endif
-#if @HAVE_INTTYPES_H@
+# if @HAVE_INTTYPES_H@
/* In OpenBSD 3.8, <inttypes.h> includes <machine/types.h>, which defines
int{8,16,32,64}_t, uint{8,16,32,64}_t and __BIT_TYPES_DEFINED__.
<inttypes.h> also defines intptr_t and uintptr_t. */
-# include <inttypes.h>
-#elif @HAVE_SYS_INTTYPES_H@
+# include <inttypes.h>
+# elif @HAVE_SYS_INTTYPES_H@
/* Solaris 7 <sys/inttypes.h> has the types except the *_fast*_t types, and
the macros except for *_FAST*_*, INTPTR_MIN, PTRDIFF_MIN, PTRDIFF_MAX. */
-# include <sys/inttypes.h>
-#endif
+# include <sys/inttypes.h>
+# endif
-#if @HAVE_SYS_BITYPES_H@ && ! defined __BIT_TYPES_DEFINED__
+# if @HAVE_SYS_BITYPES_H@ && ! defined __BIT_TYPES_DEFINED__
/* Linux libc4 >= 4.6.7 and libc5 have a <sys/bitypes.h> that defines
int{8,16,32,64}_t and __BIT_TYPES_DEFINED__. In libc5 >= 5.2.2 it is
included by <sys/types.h>. */
-# include <sys/bitypes.h>
-#endif
+# include <sys/bitypes.h>
+# endif
-#undef _GL_JUST_INCLUDE_SYSTEM_INTTYPES_H
+# undef _GL_JUST_INCLUDE_SYSTEM_INTTYPES_H
/* Minimum and maximum values for an integer type under the usual assumption.
Return an unspecified value if BITS == 0, adding a check to pacify
picky compilers. */
-#define _STDINT_MIN(signed, bits, zero) \
- ((signed) ? (- ((zero) + 1) << ((bits) ? (bits) - 1 : 0)) : (zero))
+# define _STDINT_MIN(signed, bits, zero) \
+ ((signed) ? ~ _STDINT_MAX (signed, bits, zero) : (zero))
-#define _STDINT_MAX(signed, bits, zero) \
- ((signed) \
- ? ~ _STDINT_MIN (signed, bits, zero) \
- : /* The expression for the unsigned case. The subtraction of (signed) \
- is a nop in the unsigned case and avoids "signed integer overflow" \
- warnings in the signed case. */ \
- ((((zero) + 1) << ((bits) ? (bits) - 1 - (signed) : 0)) - 1) * 2 + 1)
+# define _STDINT_MAX(signed, bits, zero) \
+ (((((zero) + 1) << ((bits) ? (bits) - 1 - (signed) : 0)) - 1) * 2 + 1)
#if !GNULIB_defined_stdint_types
@@ -138,26 +141,26 @@
/* Here we assume a standard architecture where the hardware integer
types have 8, 16, 32, optionally 64 bits. */
-#undef int8_t
-#undef uint8_t
+# undef int8_t
+# undef uint8_t
typedef signed char gl_int8_t;
typedef unsigned char gl_uint8_t;
-#define int8_t gl_int8_t
-#define uint8_t gl_uint8_t
+# define int8_t gl_int8_t
+# define uint8_t gl_uint8_t
-#undef int16_t
-#undef uint16_t
+# undef int16_t
+# undef uint16_t
typedef short int gl_int16_t;
typedef unsigned short int gl_uint16_t;
-#define int16_t gl_int16_t
-#define uint16_t gl_uint16_t
+# define int16_t gl_int16_t
+# define uint16_t gl_uint16_t
-#undef int32_t
-#undef uint32_t
+# undef int32_t
+# undef uint32_t
typedef int gl_int32_t;
typedef unsigned int gl_uint32_t;
-#define int32_t gl_int32_t
-#define uint32_t gl_uint32_t
+# define int32_t gl_int32_t
+# define uint32_t gl_uint32_t
/* If the system defines INT64_MAX, assume int64_t works. That way,
if the underlying platform defines int64_t to be a 64-bit long long
@@ -165,54 +168,54 @@ typedef unsigned int gl_uint32_t;
int, which would mess up C++ name mangling. We must use #ifdef
rather than #if, to avoid an error with HP-UX 10.20 cc. */
-#ifdef INT64_MAX
-# define GL_INT64_T
-#else
+# ifdef INT64_MAX
+# define GL_INT64_T
+# else
/* Do not undefine int64_t if gnulib is not being used with 64-bit
types, since otherwise it breaks platforms like Tandem/NSK. */
-# if LONG_MAX >> 31 >> 31 == 1
-# undef int64_t
+# if LONG_MAX >> 31 >> 31 == 1
+# undef int64_t
typedef long int gl_int64_t;
-# define int64_t gl_int64_t
-# define GL_INT64_T
-# elif defined _MSC_VER
-# undef int64_t
+# define int64_t gl_int64_t
+# define GL_INT64_T
+# elif defined _MSC_VER
+# undef int64_t
typedef __int64 gl_int64_t;
-# define int64_t gl_int64_t
-# define GL_INT64_T
-# elif @HAVE_LONG_LONG_INT@
-# undef int64_t
+# define int64_t gl_int64_t
+# define GL_INT64_T
+# elif @HAVE_LONG_LONG_INT@
+# undef int64_t
typedef long long int gl_int64_t;
-# define int64_t gl_int64_t
-# define GL_INT64_T
+# define int64_t gl_int64_t
+# define GL_INT64_T
+# endif
# endif
-#endif
-#ifdef UINT64_MAX
-# define GL_UINT64_T
-#else
-# if ULONG_MAX >> 31 >> 31 >> 1 == 1
-# undef uint64_t
-typedef unsigned long int gl_uint64_t;
-# define uint64_t gl_uint64_t
+# ifdef UINT64_MAX
# define GL_UINT64_T
-# elif defined _MSC_VER
-# undef uint64_t
+# else
+# if ULONG_MAX >> 31 >> 31 >> 1 == 1
+# undef uint64_t
+typedef unsigned long int gl_uint64_t;
+# define uint64_t gl_uint64_t
+# define GL_UINT64_T
+# elif defined _MSC_VER
+# undef uint64_t
typedef unsigned __int64 gl_uint64_t;
-# define uint64_t gl_uint64_t
-# define GL_UINT64_T
-# elif @HAVE_UNSIGNED_LONG_LONG_INT@
-# undef uint64_t
+# define uint64_t gl_uint64_t
+# define GL_UINT64_T
+# elif @HAVE_UNSIGNED_LONG_LONG_INT@
+# undef uint64_t
typedef unsigned long long int gl_uint64_t;
-# define uint64_t gl_uint64_t
-# define GL_UINT64_T
+# define uint64_t gl_uint64_t
+# define GL_UINT64_T
+# endif
# endif
-#endif
/* Avoid collision with Solaris 2.5.1 <pthread.h> etc. */
-#define _UINT8_T
-#define _UINT32_T
-#define _UINT64_T
+# define _UINT8_T
+# define _UINT32_T
+# define _UINT64_T
/* 7.18.1.2. Minimum-width integer types */
@@ -221,26 +224,26 @@ typedef unsigned long long int gl_uint64_t;
types have 8, 16, 32, optionally 64 bits. Therefore the leastN_t types
are the same as the corresponding N_t types. */
-#undef int_least8_t
-#undef uint_least8_t
-#undef int_least16_t
-#undef uint_least16_t
-#undef int_least32_t
-#undef uint_least32_t
-#undef int_least64_t
-#undef uint_least64_t
-#define int_least8_t int8_t
-#define uint_least8_t uint8_t
-#define int_least16_t int16_t
-#define uint_least16_t uint16_t
-#define int_least32_t int32_t
-#define uint_least32_t uint32_t
-#ifdef GL_INT64_T
-# define int_least64_t int64_t
-#endif
-#ifdef GL_UINT64_T
-# define uint_least64_t uint64_t
-#endif
+# undef int_least8_t
+# undef uint_least8_t
+# undef int_least16_t
+# undef uint_least16_t
+# undef int_least32_t
+# undef uint_least32_t
+# undef int_least64_t
+# undef uint_least64_t
+# define int_least8_t int8_t
+# define uint_least8_t uint8_t
+# define int_least16_t int16_t
+# define uint_least16_t uint16_t
+# define int_least32_t int32_t
+# define uint_least32_t uint32_t
+# ifdef GL_INT64_T
+# define int_least64_t int64_t
+# endif
+# ifdef GL_UINT64_T
+# define uint_least64_t uint64_t
+# endif
/* 7.18.1.3. Fastest minimum-width integer types */
@@ -253,50 +256,55 @@ typedef unsigned long long int gl_uint64_t;
uses types consistent with glibc, as that lessens the chance of
incompatibility with older GNU hosts. */
-#undef int_fast8_t
-#undef uint_fast8_t
-#undef int_fast16_t
-#undef uint_fast16_t
-#undef int_fast32_t
-#undef uint_fast32_t
-#undef int_fast64_t
-#undef uint_fast64_t
+# undef int_fast8_t
+# undef uint_fast8_t
+# undef int_fast16_t
+# undef uint_fast16_t
+# undef int_fast32_t
+# undef uint_fast32_t
+# undef int_fast64_t
+# undef uint_fast64_t
typedef signed char gl_int_fast8_t;
typedef unsigned char gl_uint_fast8_t;
-#ifdef __sun
+# ifdef __sun
/* Define types compatible with SunOS 5.10, so that code compiled under
earlier SunOS versions works with code compiled under SunOS 5.10. */
typedef int gl_int_fast32_t;
typedef unsigned int gl_uint_fast32_t;
-#else
+# else
typedef long int gl_int_fast32_t;
typedef unsigned long int gl_uint_fast32_t;
-#endif
+# endif
typedef gl_int_fast32_t gl_int_fast16_t;
typedef gl_uint_fast32_t gl_uint_fast16_t;
-#define int_fast8_t gl_int_fast8_t
-#define uint_fast8_t gl_uint_fast8_t
-#define int_fast16_t gl_int_fast16_t
-#define uint_fast16_t gl_uint_fast16_t
-#define int_fast32_t gl_int_fast32_t
-#define uint_fast32_t gl_uint_fast32_t
-#ifdef GL_INT64_T
-# define int_fast64_t int64_t
-#endif
-#ifdef GL_UINT64_T
-# define uint_fast64_t uint64_t
-#endif
+# define int_fast8_t gl_int_fast8_t
+# define uint_fast8_t gl_uint_fast8_t
+# define int_fast16_t gl_int_fast16_t
+# define uint_fast16_t gl_uint_fast16_t
+# define int_fast32_t gl_int_fast32_t
+# define uint_fast32_t gl_uint_fast32_t
+# ifdef GL_INT64_T
+# define int_fast64_t int64_t
+# endif
+# ifdef GL_UINT64_T
+# define uint_fast64_t uint64_t
+# endif
/* 7.18.1.4. Integer types capable of holding object pointers */
-#undef intptr_t
-#undef uintptr_t
+/* kLIBC's stdint.h defines _INTPTR_T_DECLARED and needs its own
+ definitions of intptr_t and uintptr_t (which use int and unsigned)
+ to avoid clashes with declarations of system functions like sbrk. */
+# ifndef _INTPTR_T_DECLARED
+# undef intptr_t
+# undef uintptr_t
typedef long int gl_intptr_t;
typedef unsigned long int gl_uintptr_t;
-#define intptr_t gl_intptr_t
-#define uintptr_t gl_uintptr_t
+# define intptr_t gl_intptr_t
+# define uintptr_t gl_uintptr_t
+# endif
/* 7.18.1.5. Greatest-width integer types */
@@ -307,33 +315,33 @@ typedef unsigned long int gl_uintptr_t;
similarly for UINTMAX_MAX and uintmax_t. This avoids problems with
assuming one type where another is used by the system. */
-#ifndef INTMAX_MAX
-# undef INTMAX_C
-# undef intmax_t
-# if @HAVE_LONG_LONG_INT@ && LONG_MAX >> 30 == 1
+# ifndef INTMAX_MAX
+# undef INTMAX_C
+# undef intmax_t
+# if @HAVE_LONG_LONG_INT@ && LONG_MAX >> 30 == 1
typedef long long int gl_intmax_t;
-# define intmax_t gl_intmax_t
-# elif defined GL_INT64_T
-# define intmax_t int64_t
-# else
+# define intmax_t gl_intmax_t
+# elif defined GL_INT64_T
+# define intmax_t int64_t
+# else
typedef long int gl_intmax_t;
-# define intmax_t gl_intmax_t
+# define intmax_t gl_intmax_t
+# endif
# endif
-#endif
-#ifndef UINTMAX_MAX
-# undef UINTMAX_C
-# undef uintmax_t
-# if @HAVE_UNSIGNED_LONG_LONG_INT@ && ULONG_MAX >> 31 == 1
+# ifndef UINTMAX_MAX
+# undef UINTMAX_C
+# undef uintmax_t
+# if @HAVE_UNSIGNED_LONG_LONG_INT@ && ULONG_MAX >> 31 == 1
typedef unsigned long long int gl_uintmax_t;
-# define uintmax_t gl_uintmax_t
-# elif defined GL_UINT64_T
-# define uintmax_t uint64_t
-# else
+# define uintmax_t gl_uintmax_t
+# elif defined GL_UINT64_T
+# define uintmax_t uint64_t
+# else
typedef unsigned long int gl_uintmax_t;
-# define uintmax_t gl_uintmax_t
+# define uintmax_t gl_uintmax_t
+# endif
# endif
-#endif
/* Verify that intmax_t and uintmax_t have the same size. Too much code
breaks if this is not the case. If this check fails, the reason is likely
@@ -341,8 +349,8 @@ typedef unsigned long int gl_uintmax_t;
typedef int _verify_intmax_size[sizeof (intmax_t) == sizeof (uintmax_t)
? 1 : -1];
-#define GNULIB_defined_stdint_types 1
-#endif /* !GNULIB_defined_stdint_types */
+# define GNULIB_defined_stdint_types 1
+# endif /* !GNULIB_defined_stdint_types */
/* 7.18.2. Limits of specified-width integer types */
@@ -351,37 +359,37 @@ typedef int _verify_intmax_size[sizeof (intmax_t) == sizeof (uintmax_t)
/* Here we assume a standard architecture where the hardware integer
types have 8, 16, 32, optionally 64 bits. */
-#undef INT8_MIN
-#undef INT8_MAX
-#undef UINT8_MAX
-#define INT8_MIN (~ INT8_MAX)
-#define INT8_MAX 127
-#define UINT8_MAX 255
-
-#undef INT16_MIN
-#undef INT16_MAX
-#undef UINT16_MAX
-#define INT16_MIN (~ INT16_MAX)
-#define INT16_MAX 32767
-#define UINT16_MAX 65535
-
-#undef INT32_MIN
-#undef INT32_MAX
-#undef UINT32_MAX
-#define INT32_MIN (~ INT32_MAX)
-#define INT32_MAX 2147483647
-#define UINT32_MAX 4294967295U
-
-#if defined GL_INT64_T && ! defined INT64_MAX
+# undef INT8_MIN
+# undef INT8_MAX
+# undef UINT8_MAX
+# define INT8_MIN (~ INT8_MAX)
+# define INT8_MAX 127
+# define UINT8_MAX 255
+
+# undef INT16_MIN
+# undef INT16_MAX
+# undef UINT16_MAX
+# define INT16_MIN (~ INT16_MAX)
+# define INT16_MAX 32767
+# define UINT16_MAX 65535
+
+# undef INT32_MIN
+# undef INT32_MAX
+# undef UINT32_MAX
+# define INT32_MIN (~ INT32_MAX)
+# define INT32_MAX 2147483647
+# define UINT32_MAX 4294967295U
+
+# if defined GL_INT64_T && ! defined INT64_MAX
/* Prefer (- INTMAX_C (1) << 63) over (~ INT64_MAX) because SunPRO C 5.0
evaluates the latter incorrectly in preprocessor expressions. */
-# define INT64_MIN (- INTMAX_C (1) << 63)
-# define INT64_MAX INTMAX_C (9223372036854775807)
-#endif
+# define INT64_MIN (- INTMAX_C (1) << 63)
+# define INT64_MAX INTMAX_C (9223372036854775807)
+# endif
-#if defined GL_UINT64_T && ! defined UINT64_MAX
-# define UINT64_MAX UINTMAX_C (18446744073709551615)
-#endif
+# if defined GL_UINT64_T && ! defined UINT64_MAX
+# define UINT64_MAX UINTMAX_C (18446744073709551615)
+# endif
/* 7.18.2.2. Limits of minimum-width integer types */
@@ -389,38 +397,38 @@ typedef int _verify_intmax_size[sizeof (intmax_t) == sizeof (uintmax_t)
types have 8, 16, 32, optionally 64 bits. Therefore the leastN_t types
are the same as the corresponding N_t types. */
-#undef INT_LEAST8_MIN
-#undef INT_LEAST8_MAX
-#undef UINT_LEAST8_MAX
-#define INT_LEAST8_MIN INT8_MIN
-#define INT_LEAST8_MAX INT8_MAX
-#define UINT_LEAST8_MAX UINT8_MAX
-
-#undef INT_LEAST16_MIN
-#undef INT_LEAST16_MAX
-#undef UINT_LEAST16_MAX
-#define INT_LEAST16_MIN INT16_MIN
-#define INT_LEAST16_MAX INT16_MAX
-#define UINT_LEAST16_MAX UINT16_MAX
-
-#undef INT_LEAST32_MIN
-#undef INT_LEAST32_MAX
-#undef UINT_LEAST32_MAX
-#define INT_LEAST32_MIN INT32_MIN
-#define INT_LEAST32_MAX INT32_MAX
-#define UINT_LEAST32_MAX UINT32_MAX
-
-#undef INT_LEAST64_MIN
-#undef INT_LEAST64_MAX
-#ifdef GL_INT64_T
-# define INT_LEAST64_MIN INT64_MIN
-# define INT_LEAST64_MAX INT64_MAX
-#endif
+# undef INT_LEAST8_MIN
+# undef INT_LEAST8_MAX
+# undef UINT_LEAST8_MAX
+# define INT_LEAST8_MIN INT8_MIN
+# define INT_LEAST8_MAX INT8_MAX
+# define UINT_LEAST8_MAX UINT8_MAX
+
+# undef INT_LEAST16_MIN
+# undef INT_LEAST16_MAX
+# undef UINT_LEAST16_MAX
+# define INT_LEAST16_MIN INT16_MIN
+# define INT_LEAST16_MAX INT16_MAX
+# define UINT_LEAST16_MAX UINT16_MAX
+
+# undef INT_LEAST32_MIN
+# undef INT_LEAST32_MAX
+# undef UINT_LEAST32_MAX
+# define INT_LEAST32_MIN INT32_MIN
+# define INT_LEAST32_MAX INT32_MAX
+# define UINT_LEAST32_MAX UINT32_MAX
+
+# undef INT_LEAST64_MIN
+# undef INT_LEAST64_MAX
+# ifdef GL_INT64_T
+# define INT_LEAST64_MIN INT64_MIN
+# define INT_LEAST64_MAX INT64_MAX
+# endif
-#undef UINT_LEAST64_MAX
-#ifdef GL_UINT64_T
-# define UINT_LEAST64_MAX UINT64_MAX
-#endif
+# undef UINT_LEAST64_MAX
+# ifdef GL_UINT64_T
+# define UINT_LEAST64_MAX UINT64_MAX
+# endif
/* 7.18.2.3. Limits of fastest minimum-width integer types */
@@ -428,117 +436,117 @@ typedef int _verify_intmax_size[sizeof (intmax_t) == sizeof (uintmax_t)
types have 8, 16, 32, optionally 64 bits. Therefore the fastN_t types
are taken from the same list of types. */
-#undef INT_FAST8_MIN
-#undef INT_FAST8_MAX
-#undef UINT_FAST8_MAX
-#define INT_FAST8_MIN SCHAR_MIN
-#define INT_FAST8_MAX SCHAR_MAX
-#define UINT_FAST8_MAX UCHAR_MAX
-
-#undef INT_FAST16_MIN
-#undef INT_FAST16_MAX
-#undef UINT_FAST16_MAX
-#define INT_FAST16_MIN INT_FAST32_MIN
-#define INT_FAST16_MAX INT_FAST32_MAX
-#define UINT_FAST16_MAX UINT_FAST32_MAX
-
-#undef INT_FAST32_MIN
-#undef INT_FAST32_MAX
-#undef UINT_FAST32_MAX
-#ifdef __sun
-# define INT_FAST32_MIN INT_MIN
-# define INT_FAST32_MAX INT_MAX
-# define UINT_FAST32_MAX UINT_MAX
-#else
-# define INT_FAST32_MIN LONG_MIN
-# define INT_FAST32_MAX LONG_MAX
-# define UINT_FAST32_MAX ULONG_MAX
-#endif
+# undef INT_FAST8_MIN
+# undef INT_FAST8_MAX
+# undef UINT_FAST8_MAX
+# define INT_FAST8_MIN SCHAR_MIN
+# define INT_FAST8_MAX SCHAR_MAX
+# define UINT_FAST8_MAX UCHAR_MAX
+
+# undef INT_FAST16_MIN
+# undef INT_FAST16_MAX
+# undef UINT_FAST16_MAX
+# define INT_FAST16_MIN INT_FAST32_MIN
+# define INT_FAST16_MAX INT_FAST32_MAX
+# define UINT_FAST16_MAX UINT_FAST32_MAX
+
+# undef INT_FAST32_MIN
+# undef INT_FAST32_MAX
+# undef UINT_FAST32_MAX
+# ifdef __sun
+# define INT_FAST32_MIN INT_MIN
+# define INT_FAST32_MAX INT_MAX
+# define UINT_FAST32_MAX UINT_MAX
+# else
+# define INT_FAST32_MIN LONG_MIN
+# define INT_FAST32_MAX LONG_MAX
+# define UINT_FAST32_MAX ULONG_MAX
+# endif
-#undef INT_FAST64_MIN
-#undef INT_FAST64_MAX
-#ifdef GL_INT64_T
-# define INT_FAST64_MIN INT64_MIN
-# define INT_FAST64_MAX INT64_MAX
-#endif
+# undef INT_FAST64_MIN
+# undef INT_FAST64_MAX
+# ifdef GL_INT64_T
+# define INT_FAST64_MIN INT64_MIN
+# define INT_FAST64_MAX INT64_MAX
+# endif
-#undef UINT_FAST64_MAX
-#ifdef GL_UINT64_T
-# define UINT_FAST64_MAX UINT64_MAX
-#endif
+# undef UINT_FAST64_MAX
+# ifdef GL_UINT64_T
+# define UINT_FAST64_MAX UINT64_MAX
+# endif
/* 7.18.2.4. Limits of integer types capable of holding object pointers */
-#undef INTPTR_MIN
-#undef INTPTR_MAX
-#undef UINTPTR_MAX
-#define INTPTR_MIN LONG_MIN
-#define INTPTR_MAX LONG_MAX
-#define UINTPTR_MAX ULONG_MAX
+# undef INTPTR_MIN
+# undef INTPTR_MAX
+# undef UINTPTR_MAX
+# define INTPTR_MIN LONG_MIN
+# define INTPTR_MAX LONG_MAX
+# define UINTPTR_MAX ULONG_MAX
/* 7.18.2.5. Limits of greatest-width integer types */
-#ifndef INTMAX_MAX
-# undef INTMAX_MIN
-# ifdef INT64_MAX
-# define INTMAX_MIN INT64_MIN
-# define INTMAX_MAX INT64_MAX
-# else
-# define INTMAX_MIN INT32_MIN
-# define INTMAX_MAX INT32_MAX
+# ifndef INTMAX_MAX
+# undef INTMAX_MIN
+# ifdef INT64_MAX
+# define INTMAX_MIN INT64_MIN
+# define INTMAX_MAX INT64_MAX
+# else
+# define INTMAX_MIN INT32_MIN
+# define INTMAX_MAX INT32_MAX
+# endif
# endif
-#endif
-#ifndef UINTMAX_MAX
-# ifdef UINT64_MAX
-# define UINTMAX_MAX UINT64_MAX
-# else
-# define UINTMAX_MAX UINT32_MAX
+# ifndef UINTMAX_MAX
+# ifdef UINT64_MAX
+# define UINTMAX_MAX UINT64_MAX
+# else
+# define UINTMAX_MAX UINT32_MAX
+# endif
# endif
-#endif
/* 7.18.3. Limits of other integer types */
/* ptrdiff_t limits */
-#undef PTRDIFF_MIN
-#undef PTRDIFF_MAX
-#if @APPLE_UNIVERSAL_BUILD@
-# ifdef _LP64
-# define PTRDIFF_MIN _STDINT_MIN (1, 64, 0l)
-# define PTRDIFF_MAX _STDINT_MAX (1, 64, 0l)
+# undef PTRDIFF_MIN
+# undef PTRDIFF_MAX
+# if @APPLE_UNIVERSAL_BUILD@
+# ifdef _LP64
+# define PTRDIFF_MIN _STDINT_MIN (1, 64, 0l)
+# define PTRDIFF_MAX _STDINT_MAX (1, 64, 0l)
+# else
+# define PTRDIFF_MIN _STDINT_MIN (1, 32, 0)
+# define PTRDIFF_MAX _STDINT_MAX (1, 32, 0)
+# endif
# else
-# define PTRDIFF_MIN _STDINT_MIN (1, 32, 0)
-# define PTRDIFF_MAX _STDINT_MAX (1, 32, 0)
-# endif
-#else
-# define PTRDIFF_MIN \
+# define PTRDIFF_MIN \
_STDINT_MIN (1, @BITSIZEOF_PTRDIFF_T@, 0@PTRDIFF_T_SUFFIX@)
-# define PTRDIFF_MAX \
+# define PTRDIFF_MAX \
_STDINT_MAX (1, @BITSIZEOF_PTRDIFF_T@, 0@PTRDIFF_T_SUFFIX@)
-#endif
+# endif
/* sig_atomic_t limits */
-#undef SIG_ATOMIC_MIN
-#undef SIG_ATOMIC_MAX
-#define SIG_ATOMIC_MIN \
+# 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@)
-#define SIG_ATOMIC_MAX \
+# define SIG_ATOMIC_MAX \
_STDINT_MAX (@HAVE_SIGNED_SIG_ATOMIC_T@, @BITSIZEOF_SIG_ATOMIC_T@, \
0@SIG_ATOMIC_T_SUFFIX@)
/* size_t limit */
-#undef SIZE_MAX
-#if @APPLE_UNIVERSAL_BUILD@
-# ifdef _LP64
-# define SIZE_MAX _STDINT_MAX (0, 64, 0ul)
+# undef SIZE_MAX
+# if @APPLE_UNIVERSAL_BUILD@
+# ifdef _LP64
+# define SIZE_MAX _STDINT_MAX (0, 64, 0ul)
+# else
+# define SIZE_MAX _STDINT_MAX (0, 32, 0ul)
+# endif
# else
-# define SIZE_MAX _STDINT_MAX (0, 32, 0ul)
+# define SIZE_MAX _STDINT_MAX (0, @BITSIZEOF_SIZE_T@, 0@SIZE_T_SUFFIX@)
# endif
-#else
-# define SIZE_MAX _STDINT_MAX (0, @BITSIZEOF_SIZE_T@, 0@SIZE_T_SUFFIX@)
-#endif
/* wchar_t limits */
/* Get WCHAR_MIN, WCHAR_MAX.
@@ -546,29 +554,29 @@ typedef int _verify_intmax_size[sizeof (intmax_t) == sizeof (uintmax_t)
sequence of nested includes
<wchar.h> -> <stdio.h> -> <getopt.h> -> <stdlib.h>, and the latter includes
<stdint.h> and assumes its types are already defined. */
-#if @HAVE_WCHAR_H@ && ! (defined WCHAR_MIN && defined WCHAR_MAX)
+# if @HAVE_WCHAR_H@ && ! (defined WCHAR_MIN && defined WCHAR_MAX)
/* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
included before <wchar.h>. */
-# include <stddef.h>
-# include <stdio.h>
-# include <time.h>
-# define _GL_JUST_INCLUDE_SYSTEM_WCHAR_H
-# include <wchar.h>
-# undef _GL_JUST_INCLUDE_SYSTEM_WCHAR_H
-#endif
-#undef WCHAR_MIN
-#undef WCHAR_MAX
-#define WCHAR_MIN \
+# include <stddef.h>
+# include <stdio.h>
+# include <time.h>
+# define _GL_JUST_INCLUDE_SYSTEM_WCHAR_H
+# include <wchar.h>
+# undef _GL_JUST_INCLUDE_SYSTEM_WCHAR_H
+# endif
+# undef WCHAR_MIN
+# undef WCHAR_MAX
+# define WCHAR_MIN \
_STDINT_MIN (@HAVE_SIGNED_WCHAR_T@, @BITSIZEOF_WCHAR_T@, 0@WCHAR_T_SUFFIX@)
-#define WCHAR_MAX \
+# 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 \
+# undef WINT_MIN
+# undef WINT_MAX
+# define WINT_MIN \
_STDINT_MIN (@HAVE_SIGNED_WINT_T@, @BITSIZEOF_WINT_T@, 0@WINT_T_SUFFIX@)
-#define WINT_MAX \
+# define WINT_MAX \
_STDINT_MAX (@HAVE_SIGNED_WINT_T@, @BITSIZEOF_WINT_T@, 0@WINT_T_SUFFIX@)
/* 7.18.4. Macros for integer constants */
@@ -579,59 +587,120 @@ typedef int _verify_intmax_size[sizeof (intmax_t) == sizeof (uintmax_t)
/* Here we assume a standard architecture where the hardware integer
types have 8, 16, 32, optionally 64 bits, and int is 32 bits. */
-#undef INT8_C
-#undef UINT8_C
-#define INT8_C(x) x
-#define UINT8_C(x) x
-
-#undef INT16_C
-#undef UINT16_C
-#define INT16_C(x) x
-#define UINT16_C(x) x
-
-#undef INT32_C
-#undef UINT32_C
-#define INT32_C(x) x
-#define UINT32_C(x) x ## U
-
-#undef INT64_C
-#undef UINT64_C
-#if LONG_MAX >> 31 >> 31 == 1
-# define INT64_C(x) x##L
-#elif defined _MSC_VER
-# define INT64_C(x) x##i64
-#elif @HAVE_LONG_LONG_INT@
-# define INT64_C(x) x##LL
-#endif
-#if ULONG_MAX >> 31 >> 31 >> 1 == 1
-# define UINT64_C(x) x##UL
-#elif defined _MSC_VER
-# define UINT64_C(x) x##ui64
-#elif @HAVE_UNSIGNED_LONG_LONG_INT@
-# define UINT64_C(x) x##ULL
-#endif
+# undef INT8_C
+# undef UINT8_C
+# define INT8_C(x) x
+# define UINT8_C(x) x
+
+# undef INT16_C
+# undef UINT16_C
+# define INT16_C(x) x
+# define UINT16_C(x) x
+
+# undef INT32_C
+# undef UINT32_C
+# define INT32_C(x) x
+# define UINT32_C(x) x ## U
+
+# undef INT64_C
+# undef UINT64_C
+# if LONG_MAX >> 31 >> 31 == 1
+# define INT64_C(x) x##L
+# elif defined _MSC_VER
+# define INT64_C(x) x##i64
+# elif @HAVE_LONG_LONG_INT@
+# define INT64_C(x) x##LL
+# endif
+# if ULONG_MAX >> 31 >> 31 >> 1 == 1
+# define UINT64_C(x) x##UL
+# elif defined _MSC_VER
+# define UINT64_C(x) x##ui64
+# elif @HAVE_UNSIGNED_LONG_LONG_INT@
+# define UINT64_C(x) x##ULL
+# endif
/* 7.18.4.2. Macros for greatest-width integer constants */
-#ifndef INTMAX_C
-# if @HAVE_LONG_LONG_INT@ && LONG_MAX >> 30 == 1
-# define INTMAX_C(x) x##LL
-# elif defined GL_INT64_T
-# define INTMAX_C(x) INT64_C(x)
-# else
-# define INTMAX_C(x) x##L
+# ifndef INTMAX_C
+# if @HAVE_LONG_LONG_INT@ && LONG_MAX >> 30 == 1
+# define INTMAX_C(x) x##LL
+# elif defined GL_INT64_T
+# define INTMAX_C(x) INT64_C(x)
+# else
+# define INTMAX_C(x) x##L
+# endif
# endif
-#endif
-#ifndef UINTMAX_C
-# if @HAVE_UNSIGNED_LONG_LONG_INT@ && ULONG_MAX >> 31 == 1
-# define UINTMAX_C(x) x##ULL
-# elif defined GL_UINT64_T
-# define UINTMAX_C(x) UINT64_C(x)
-# else
-# define UINTMAX_C(x) x##UL
+# ifndef UINTMAX_C
+# if @HAVE_UNSIGNED_LONG_LONG_INT@ && ULONG_MAX >> 31 == 1
+# define UINTMAX_C(x) x##ULL
+# elif defined GL_UINT64_T
+# define UINTMAX_C(x) UINT64_C(x)
+# else
+# define UINTMAX_C(x) x##UL
+# endif
# endif
-#endif
+
+#endif /* !@HAVE_C99_STDINT_H@ */
+
+/* Macros specified by ISO/IEC TS 18661-1:2014. */
+
+#if (!defined UINTMAX_WIDTH \
+ && (defined _GNU_SOURCE || defined __STDC_WANT_IEC_60559_BFP_EXT__))
+# ifdef INT8_MAX
+# define INT8_WIDTH _GL_INTEGER_WIDTH (INT8_MIN, INT8_MAX)
+# endif
+# ifdef UINT8_MAX
+# define UINT8_WIDTH _GL_INTEGER_WIDTH (0, UINT8_MAX)
+# endif
+# ifdef INT16_MAX
+# define INT16_WIDTH _GL_INTEGER_WIDTH (INT16_MIN, INT16_MAX)
+# endif
+# ifdef UINT16_MAX
+# define UINT16_WIDTH _GL_INTEGER_WIDTH (0, UINT16_MAX)
+# endif
+# ifdef INT32_MAX
+# define INT32_WIDTH _GL_INTEGER_WIDTH (INT32_MIN, INT32_MAX)
+# endif
+# ifdef UINT32_MAX
+# define UINT32_WIDTH _GL_INTEGER_WIDTH (0, UINT32_MAX)
+# endif
+# ifdef INT64_MAX
+# define INT64_WIDTH _GL_INTEGER_WIDTH (INT64_MIN, INT64_MAX)
+# endif
+# ifdef UINT64_MAX
+# define UINT64_WIDTH _GL_INTEGER_WIDTH (0, UINT64_MAX)
+# endif
+# define INT_LEAST8_WIDTH _GL_INTEGER_WIDTH (INT_LEAST8_MIN, INT_LEAST8_MAX)
+# define UINT_LEAST8_WIDTH _GL_INTEGER_WIDTH (0, UINT_LEAST8_MAX)
+# define INT_LEAST16_WIDTH _GL_INTEGER_WIDTH (INT_LEAST16_MIN, INT_LEAST16_MAX)
+# define UINT_LEAST16_WIDTH _GL_INTEGER_WIDTH (0, UINT_LEAST16_MAX)
+# define INT_LEAST32_WIDTH _GL_INTEGER_WIDTH (INT_LEAST32_MIN, INT_LEAST32_MAX)
+# define UINT_LEAST32_WIDTH _GL_INTEGER_WIDTH (0, UINT_LEAST32_MAX)
+# define INT_LEAST64_WIDTH _GL_INTEGER_WIDTH (INT_LEAST64_MIN, INT_LEAST64_MAX)
+# define UINT_LEAST64_WIDTH _GL_INTEGER_WIDTH (0, UINT_LEAST64_MAX)
+# define INT_FAST8_WIDTH _GL_INTEGER_WIDTH (INT_FAST8_MIN, INT_FAST8_MAX)
+# define UINT_FAST8_WIDTH _GL_INTEGER_WIDTH (0, UINT_FAST8_MAX)
+# define INT_FAST16_WIDTH _GL_INTEGER_WIDTH (INT_FAST16_MIN, INT_FAST16_MAX)
+# define UINT_FAST16_WIDTH _GL_INTEGER_WIDTH (0, UINT_FAST16_MAX)
+# define INT_FAST32_WIDTH _GL_INTEGER_WIDTH (INT_FAST32_MIN, INT_FAST32_MAX)
+# define UINT_FAST32_WIDTH _GL_INTEGER_WIDTH (0, UINT_FAST32_MAX)
+# define INT_FAST64_WIDTH _GL_INTEGER_WIDTH (INT_FAST64_MIN, INT_FAST64_MAX)
+# define UINT_FAST64_WIDTH _GL_INTEGER_WIDTH (0, UINT_FAST64_MAX)
+# define INTPTR_WIDTH _GL_INTEGER_WIDTH (INTPTR_MIN, INTPTR_MAX)
+# define UINTPTR_WIDTH _GL_INTEGER_WIDTH (0, UINTPTR_MAX)
+# define INTMAX_WIDTH _GL_INTEGER_WIDTH (INTMAX_MIN, INTMAX_MAX)
+# define UINTMAX_WIDTH _GL_INTEGER_WIDTH (0, UINTMAX_MAX)
+# define PTRDIFF_WIDTH _GL_INTEGER_WIDTH (PTRDIFF_MIN, PTRDIFF_MAX)
+# define SIZE_WIDTH _GL_INTEGER_WIDTH (0, SIZE_MAX)
+# define WCHAR_WIDTH _GL_INTEGER_WIDTH (WCHAR_MIN, WCHAR_MAX)
+# ifdef WINT_MAX
+# define WINT_WIDTH _GL_INTEGER_WIDTH (WINT_MIN, WINT_MAX)
+# endif
+# ifdef SIG_ATOMIC_MAX
+# define SIG_ATOMIC_WIDTH _GL_INTEGER_WIDTH (SIG_ATOMIC_MIN, SIG_ATOMIC_MAX)
+# endif
+#endif /* !WINT_WIDTH && (_GNU_SOURCE || __STDC_WANT_IEC_60559_BFP_EXT__) */
#endif /* _@GUARD_PREFIX@_STDINT_H */
#endif /* !(defined __ANDROID__ && ...) */
diff --git a/lib/stdio-impl.h b/lib/stdio-impl.h
index 920b4d4..766d693 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-2012 Free Software Foundation, Inc.
+ Copyright (C) 2007-2008, 2010-2016 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -28,7 +28,8 @@
#include <errno.h> /* For detecting Plan9. */
-#if defined __sferror || defined __DragonFly__ /* FreeBSD, NetBSD, OpenBSD, DragonFly, Mac OS X, Cygwin */
+#if defined __sferror || defined __DragonFly__ || defined __ANDROID__
+ /* FreeBSD, NetBSD, OpenBSD, DragonFly, Mac OS X, Cygwin, 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>. */
@@ -57,7 +58,7 @@
# define fp_ fp
# endif
-# if (defined __NetBSD__ && __NetBSD_Version__ >= 105270000) || defined __OpenBSD__ /* NetBSD >= 1.5ZA, OpenBSD */
+# if (defined __NetBSD__ && __NetBSD_Version__ >= 105270000) || defined __OpenBSD__ || defined __ANDROID__ /* NetBSD >= 1.5ZA, OpenBSD, 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> */
struct __sfileext
@@ -66,7 +67,7 @@
/* More fields, not relevant here. */
};
# define fp_ub ((struct __sfileext *) fp->_ext._base)->_ub
-# else /* FreeBSD, NetBSD <= 1.5Z, DragonFly, Mac OS X, Cygwin */
+# else /* FreeBSD, NetBSD <= 1.5Z, DragonFly, Mac OS X, Cygwin, Android */
# define fp_ub fp_->_ub
# endif
@@ -109,4 +110,31 @@
# define _flag __flag
# endif
+#elif (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ /* newer Windows with MSVC */
+
+/* <stdio.h> does not define the innards of FILE any more. */
+# define WINDOWS_OPAQUE_FILE
+
+struct _gl_real_FILE
+{
+ /* Note: Compared to older Windows and to mingw, it has the fields
+ _base and _cnt swapped. */
+ unsigned char *_ptr;
+ unsigned char *_base;
+ int _cnt;
+ int _flag;
+ int _file;
+ int _charbuf;
+ int _bufsiz;
+};
+# 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>. */
+# define _IOREAD 0x1
+# define _IOWRT 0x2
+# define _IORW 0x4
+# define _IOEOF 0x8
+# define _IOERR 0x10
+
#endif
diff --git a/lib/stdio.c b/lib/stdio.c
deleted file mode 100644
index e6ed829..0000000
--- a/lib/stdio.c
+++ /dev/null
@@ -1,3 +0,0 @@
-#include <config.h>
-#define _GL_STDIO_INLINE _GL_EXTERN_INLINE
-#include "stdio.h"
diff --git a/lib/stdio.in.h b/lib/stdio.in.h
index d054394..5727452 100644
--- a/lib/stdio.in.h
+++ b/lib/stdio.in.h
@@ -1,8 +1,6 @@
-/* -*- buffer-read-only: t -*- vi: set ro: */
-/* DO NOT EDIT! GENERATED AUTOMATICALLY! */
/* A GNU-like <stdio.h>.
- Copyright (C) 2004, 2007-2012 Free Software Foundation, Inc.
+ Copyright (C) 2004, 2007-2016 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -48,11 +46,6 @@
#ifndef _@GUARD_PREFIX@_STDIO_H
#define _@GUARD_PREFIX@_STDIO_H
-_GL_INLINE_HEADER_BEGIN
-#ifndef _GL_STDIO_INLINE
-# define _GL_STDIO_INLINE _GL_INLINE
-#endif
-
/* Get va_list. Needed on many systems, including glibc 2.8. */
#include <stdarg.h>
@@ -91,8 +84,13 @@ _GL_INLINE_HEADER_BEGIN
except that it indicates to GCC that the supported format string directives
are the ones of the system printf(), rather than the ones standardized by
ISO C99 and POSIX. */
-#define _GL_ATTRIBUTE_FORMAT_PRINTF_SYSTEM(formatstring_parameter, first_argument) \
+#if GNULIB_PRINTF_ATTRIBUTE_FLAVOR_GNU
+# define _GL_ATTRIBUTE_FORMAT_PRINTF_SYSTEM(formatstring_parameter, first_argument) \
+ _GL_ATTRIBUTE_FORMAT_PRINTF (formatstring_parameter, first_argument)
+#else
+# define _GL_ATTRIBUTE_FORMAT_PRINTF_SYSTEM(formatstring_parameter, first_argument) \
_GL_ATTRIBUTE_FORMAT ((__printf__, formatstring_parameter, first_argument))
+#endif
/* _GL_ATTRIBUTE_FORMAT_SCANF
indicates to GCC that the function takes a format string and arguments,
@@ -120,6 +118,26 @@ _GL_INLINE_HEADER_BEGIN
# include <unistd.h>
#endif
+/* MSVC declares 'perror' in <stdlib.h>, not in <stdio.h>. We must include
+ it before we #define perror rpl_perror. */
+/* But in any case avoid namespace pollution on glibc systems. */
+#if (@GNULIB_PERROR@ || defined GNULIB_POSIXCHECK) \
+ && ((defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__) \
+ && ! defined __GLIBC__
+# include <stdlib.h>
+#endif
+
+/* MSVC declares 'remove' in <io.h>, not in <stdio.h>. We must include
+ it before we #define remove rpl_remove. */
+/* MSVC declares 'rename' in <io.h>, not in <stdio.h>. We must include
+ it before we #define rename rpl_rename. */
+/* But in any case avoid namespace pollution on glibc systems. */
+#if (@GNULIB_REMOVE@ || @GNULIB_RENAME@ || defined GNULIB_POSIXCHECK) \
+ && ((defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__) \
+ && ! defined __GLIBC__
+# include <io.h>
+#endif
+
/* The definitions of _GL_FUNCDECL_RPL etc. are copied here. */
@@ -131,6 +149,15 @@ _GL_INLINE_HEADER_BEGIN
#define _GL_STDIO_STRINGIZE(token) #token
#define _GL_STDIO_MACROEXPAND_AND_STRINGIZE(token) _GL_STDIO_STRINGIZE(token)
+/* 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>.
+ Perhaps Apple will fix this some day. */
+#if (defined _GL_EXTERN_INLINE_IN_USE && defined __APPLE__ \
+ && defined __GNUC__ && defined __STDC__)
+# undef putc_unlocked
+#endif
#if @GNULIB_DPRINTF@
# if @REPLACE_DPRINTF@
@@ -582,21 +609,27 @@ _GL_CXXALIAS_RPL (fwrite, size_t,
_GL_CXXALIAS_SYS (fwrite, size_t,
(const void *ptr, size_t s, size_t n, FILE *stream));
-/* Work around glibc bug 11959
+/* Work around bug 11959 when fortifying glibc 2.4 through 2.15
<http://sources.redhat.com/bugzilla/show_bug.cgi?id=11959>,
which sometimes causes an unwanted diagnostic for fwrite calls.
- This affects only function declaration attributes, so it's not
- needed for C++. */
-# if !defined __cplusplus && 0 < __USE_FORTIFY_LEVEL
-_GL_STDIO_INLINE size_t _GL_ARG_NONNULL ((1, 4))
-rpl_fwrite (const void *ptr, size_t s, size_t n, FILE *stream)
-{
- size_t r = fwrite (ptr, s, n, stream);
- (void) r;
- return r;
-}
+ This affects only function declaration attributes under certain
+ versions of gcc and clang, and is not needed for C++. */
+# if (0 < __USE_FORTIFY_LEVEL \
+ && __GLIBC__ == 2 && 4 <= __GLIBC_MINOR__ && __GLIBC_MINOR__ <= 15 \
+ && 3 < __GNUC__ + (4 <= __GNUC_MINOR__) \
+ && !defined __cplusplus)
# undef fwrite
+# undef fwrite_unlocked
+extern size_t __REDIRECT (rpl_fwrite,
+ (const void *__restrict, size_t, size_t,
+ FILE *__restrict),
+ fwrite);
+extern size_t __REDIRECT (rpl_fwrite_unlocked,
+ (const void *__restrict, size_t, size_t,
+ FILE *__restrict),
+ fwrite_unlocked);
# define fwrite rpl_fwrite
+# define fwrite_unlocked rpl_fwrite_unlocked
# endif
# endif
_GL_CXXALIASWARN (fwrite);
@@ -710,11 +743,10 @@ _GL_WARN_ON_USE (getline, "getline is unportable - "
so any use of gets warrants an unconditional warning; besides, C11
removed it. */
#undef gets
-#if HAVE_RAW_DECL_GETS
+#if HAVE_RAW_DECL_GETS && !defined __cplusplus
_GL_WARN_ON_USE (gets, "gets is a security hole - use fgets instead");
#endif
-
#if @GNULIB_OBSTACK_PRINTF@ || @GNULIB_OBSTACK_PRINTF_POSIX@
struct obstack;
/* Grow an obstack with formatted output. Return the number of
@@ -1340,8 +1372,6 @@ _GL_WARN_ON_USE (vsprintf, "vsprintf is not always POSIX compliant - "
"POSIX compliance");
#endif
-_GL_INLINE_HEADER_END
-
#endif /* _@GUARD_PREFIX@_STDIO_H */
#endif /* _@GUARD_PREFIX@_STDIO_H */
#endif
diff --git a/lib/stdlib.in.h b/lib/stdlib.in.h
index 6555840..db3253b 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-2012 Free Software Foundation, Inc.
+ Copyright (C) 1995, 2001-2004, 2006-2016 Free Software Foundation, Inc.
This 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,8 +20,9 @@
#endif
@PRAGMA_COLUMNS@
-#if defined __need_malloc_and_calloc
-/* Special invocation convention inside glibc header files. */
+#if defined __need_system_stdlib_h || defined __need_malloc_and_calloc
+/* Special invocation conventions inside some gnulib header files,
+ and inside some glibc header files, respectively. */
#@INCLUDE_NEXT@ @NEXT_STDLIB_H@
@@ -519,6 +520,44 @@ _GL_CXXALIAS_SYS (putenv, int, (char *string));
_GL_CXXALIASWARN (putenv);
#endif
+#if @GNULIB_QSORT_R@
+/* Sort an array of NMEMB elements, starting at address BASE, each element
+ occupying SIZE bytes, in ascending order according to the comparison
+ function COMPARE. */
+# if @REPLACE_QSORT_R@
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# undef qsort_r
+# define qsort_r rpl_qsort_r
+# endif
+_GL_FUNCDECL_RPL (qsort_r, void, (void *base, size_t nmemb, size_t size,
+ int (*compare) (void const *, void const *,
+ void *),
+ void *arg) _GL_ARG_NONNULL ((1, 4)));
+_GL_CXXALIAS_RPL (qsort_r, void, (void *base, size_t nmemb, size_t size,
+ int (*compare) (void const *, void const *,
+ void *),
+ void *arg));
+# else
+# if !@HAVE_QSORT_R@
+_GL_FUNCDECL_SYS (qsort_r, void, (void *base, size_t nmemb, size_t size,
+ int (*compare) (void const *, void const *,
+ void *),
+ void *arg) _GL_ARG_NONNULL ((1, 4)));
+# endif
+_GL_CXXALIAS_SYS (qsort_r, void, (void *base, size_t nmemb, size_t size,
+ int (*compare) (void const *, void const *,
+ void *),
+ void *arg));
+# endif
+_GL_CXXALIASWARN (qsort_r);
+#elif defined GNULIB_POSIXCHECK
+# undef qsort_r
+# if HAVE_RAW_DECL_QSORT_R
+_GL_WARN_ON_USE (qsort_r, "qsort_r is not portable - "
+ "use gnulib module qsort_r for portability");
+# endif
+#endif
+
#if @GNULIB_RANDOM_R@
# if !@HAVE_RANDOM_R@
@@ -766,6 +805,22 @@ _GL_WARN_ON_USE (rpmatch, "rpmatch is unportable - "
# endif
#endif
+#if @GNULIB_SECURE_GETENV@
+/* Look up NAME in the environment, returning 0 in insecure situations. */
+# if !@HAVE_SECURE_GETENV@
+_GL_FUNCDECL_SYS (secure_getenv, char *,
+ (char const *name) _GL_ARG_NONNULL ((1)));
+# endif
+_GL_CXXALIAS_SYS (secure_getenv, char *, (char const *name));
+_GL_CXXALIASWARN (secure_getenv);
+#elif defined GNULIB_POSIXCHECK
+# undef secure_getenv
+# if HAVE_RAW_DECL_SECURE_GETENV
+_GL_WARN_ON_USE (secure_getenv, "secure_getenv is unportable - "
+ "use gnulib module secure_getenv for portability");
+# endif
+#endif
+
#if @GNULIB_SETENV@
/* Set NAME to VALUE in the environment.
If REPLACE is nonzero, overwrite an existing value. */
diff --git a/lib/streq.h b/lib/streq.h
index 3e83fb6..234f075 100644
--- a/lib/streq.h
+++ b/lib/streq.h
@@ -1,7 +1,5 @@
-/* -*- buffer-read-only: t -*- vi: set ro: */
-/* DO NOT EDIT! GENERATED AUTOMATICALLY! */
/* Optimized string comparison.
- Copyright (C) 2001-2002, 2007, 2009-2012 Free Software Foundation, Inc.
+ Copyright (C) 2001-2002, 2007, 2009-2016 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify it
under the terms of the GNU General Public License as published
diff --git a/lib/strerror-override.c b/lib/strerror-override.c
index f7cac65..9bc9b18 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-2012 Free Software Foundation, Inc.
+ Copyright (C) 2010-2016 Free Software Foundation, Inc.
This 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/strerror-override.h b/lib/strerror-override.h
index 6468681..5264fd5 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-2012 Free Software Foundation, Inc.
+ Copyright (C) 2010-2016 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -48,7 +48,7 @@
|| GNULIB_defined_EOWNERDEAD \
|| GNULIB_defined_ENOTRECOVERABLE \
|| GNULIB_defined_EILSEQ
-extern const char *strerror_override (int errnum);
+extern const char *strerror_override (int errnum) _GL_ATTRIBUTE_CONST;
# else
# define strerror_override(ignored) NULL
# endif
diff --git a/lib/strerror.c b/lib/strerror.c
index 587bd21..8fff3bd 100644
--- a/lib/strerror.c
+++ b/lib/strerror.c
@@ -1,6 +1,6 @@
/* strerror.c --- POSIX compatible system error routine
- Copyright (C) 2007-2012 Free Software Foundation, Inc.
+ Copyright (C) 2007-2016 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -66,5 +66,6 @@ strerror (int n)
if (sizeof buf <= len)
abort ();
- return memcpy (buf, msg, len + 1);
+ memcpy (buf, msg, len + 1);
+ return buf;
}
diff --git a/lib/string.in.h b/lib/string.in.h
index 4b5247f..b3213c4 100644
--- a/lib/string.in.h
+++ b/lib/string.in.h
@@ -1,8 +1,6 @@
-/* -*- buffer-read-only: t -*- vi: set ro: */
-/* DO NOT EDIT! GENERATED AUTOMATICALLY! */
/* A GNU-like <string.h>.
- Copyright (C) 1995-1996, 2001-2012 Free Software Foundation, Inc.
+ Copyright (C) 1995-1996, 2001-2016 Free Software Foundation, Inc.
This 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,16 +15,32 @@
You should have received a copy of the GNU General Public License
along with this program; if not, see <http://www.gnu.org/licenses/>. */
-#ifndef _@GUARD_PREFIX@_STRING_H
-
#if __GNUC__ >= 3
@PRAGMA_SYSTEM_HEADER@
#endif
@PRAGMA_COLUMNS@
+#if defined _GL_ALREADY_INCLUDING_STRING_H
+/* Special invocation convention:
+ - On OS X/NetBSD we have a sequence of nested includes
+ <string.h> -> <strings.h> -> "string.h"
+ In this situation system _chk variants due to -D_FORTIFY_SOURCE
+ might be used after any replacements defined here. */
+
+#@INCLUDE_NEXT@ @NEXT_STRING_H@
+
+#else
+/* Normal invocation convention. */
+
+#ifndef _@GUARD_PREFIX@_STRING_H
+
+#define _GL_ALREADY_INCLUDING_STRING_H
+
/* The include_next requires a split double-inclusion guard. */
#@INCLUDE_NEXT@ @NEXT_STRING_H@
+#undef _GL_ALREADY_INCLUDING_STRING_H
+
#ifndef _@GUARD_PREFIX@_STRING_H
#define _@GUARD_PREFIX@_STRING_H
@@ -402,15 +416,15 @@ _GL_WARN_ON_USE (strncat, "strncat is unportable - "
# undef strndup
# define strndup rpl_strndup
# endif
-_GL_FUNCDECL_RPL (strndup, char *, (char const *__string, size_t __n)
+_GL_FUNCDECL_RPL (strndup, char *, (char const *__s, size_t __n)
_GL_ARG_NONNULL ((1)));
-_GL_CXXALIAS_RPL (strndup, char *, (char const *__string, size_t __n));
+_GL_CXXALIAS_RPL (strndup, char *, (char const *__s, size_t __n));
# else
# if ! @HAVE_DECL_STRNDUP@
-_GL_FUNCDECL_SYS (strndup, char *, (char const *__string, size_t __n)
+_GL_FUNCDECL_SYS (strndup, char *, (char const *__s, size_t __n)
_GL_ARG_NONNULL ((1)));
# endif
-_GL_CXXALIAS_SYS (strndup, char *, (char const *__string, size_t __n));
+_GL_CXXALIAS_SYS (strndup, char *, (char const *__s, size_t __n));
# endif
_GL_CXXALIASWARN (strndup);
#elif defined GNULIB_POSIXCHECK
@@ -430,17 +444,17 @@ _GL_WARN_ON_USE (strndup, "strndup is unportable - "
# undef strnlen
# define strnlen rpl_strnlen
# endif
-_GL_FUNCDECL_RPL (strnlen, size_t, (char const *__string, size_t __maxlen)
+_GL_FUNCDECL_RPL (strnlen, size_t, (char const *__s, size_t __maxlen)
_GL_ATTRIBUTE_PURE
_GL_ARG_NONNULL ((1)));
-_GL_CXXALIAS_RPL (strnlen, size_t, (char const *__string, size_t __maxlen));
+_GL_CXXALIAS_RPL (strnlen, size_t, (char const *__s, size_t __maxlen));
# else
# if ! @HAVE_DECL_STRNLEN@
-_GL_FUNCDECL_SYS (strnlen, size_t, (char const *__string, size_t __maxlen)
+_GL_FUNCDECL_SYS (strnlen, size_t, (char const *__s, size_t __maxlen)
_GL_ATTRIBUTE_PURE
_GL_ARG_NONNULL ((1)));
# endif
-_GL_CXXALIAS_SYS (strnlen, size_t, (char const *__string, size_t __maxlen));
+_GL_CXXALIAS_SYS (strnlen, size_t, (char const *__s, size_t __maxlen));
# endif
_GL_CXXALIASWARN (strnlen);
#elif defined GNULIB_POSIXCHECK
@@ -1029,3 +1043,4 @@ _GL_WARN_ON_USE (strverscmp, "strverscmp is unportable - "
#endif /* _@GUARD_PREFIX@_STRING_H */
#endif /* _@GUARD_PREFIX@_STRING_H */
+#endif
diff --git a/lib/stripslash.c b/lib/stripslash.c
index ef458c6..0453e36 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-2012 Free Software Foundation,
+ Copyright (C) 1990, 2001, 2003-2006, 2009-2016 Free Software Foundation,
Inc.
This program is free software: you can redistribute it and/or modify
diff --git a/lib/strverscmp.c b/lib/strverscmp.c
index 12adb63..22b8505 100644
--- a/lib/strverscmp.c
+++ b/lib/strverscmp.c
@@ -1,23 +1,21 @@
-/* -*- buffer-read-only: t -*- vi: set ro: */
-/* DO NOT EDIT! GENERATED AUTOMATICALLY! */
/* Compare strings while treating digits characters numerically.
- Copyright (C) 1997, 2000, 2002, 2004, 2006, 2009-2012 Free Software
- Foundation, Inc.
+ Copyright (C) 1997-2016 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Jean-François Bignolles <bignolle@ecoledoc.ibp.fr>, 1997.
- This 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.
+ 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
+ <http://www.gnu.org/licenses/>. */
#if !_LIBC
# include <config.h>
@@ -28,27 +26,14 @@
/* states: S_N: normal, S_I: comparing integral part, S_F: comparing
fractional parts, S_Z: idem but with leading Zeroes only */
-#define S_N 0x0
-#define S_I 0x4
-#define S_F 0x8
-#define S_Z 0xC
+#define S_N 0x0
+#define S_I 0x3
+#define S_F 0x6
+#define S_Z 0x9
/* result_type: CMP: return diff; LEN: compare using len_diff/diff */
-#define CMP 2
-#define LEN 3
-
-
-/* ISDIGIT differs from isdigit, as follows:
- - Its arg may be any int or unsigned int; it need not be an unsigned char
- or EOF.
- - It's typically faster.
- POSIX says that only '0' through '9' are digits. Prefer ISDIGIT to
- isdigit unless it's important to use the locale's definition
- of "digit" even when the host does not conform to POSIX. */
-#define ISDIGIT(c) ((unsigned int) (c) - '0' <= 9)
-
-#undef __strverscmp
-#undef strverscmp
+#define CMP 2
+#define LEN 3
#ifndef weak_alias
# define __strverscmp strverscmp
@@ -68,30 +53,25 @@ __strverscmp (const char *s1, const char *s2)
int state;
int diff;
- /* Symbol(s) 0 [1-9] others (padding)
- Transition (10) 0 (01) d (00) x (11) - */
- static const unsigned int next_state[] =
+ /* Symbol(s) 0 [1-9] others
+ Transition (10) 0 (01) d (00) x */
+ static const unsigned char next_state[] =
{
- /* state x d 0 - */
- /* S_N */ S_N, S_I, S_Z, S_N,
- /* S_I */ S_N, S_I, S_I, S_I,
- /* S_F */ S_N, S_F, S_F, S_F,
- /* S_Z */ S_N, S_F, S_Z, S_Z
+ /* state x d 0 */
+ /* S_N */ S_N, S_I, S_Z,
+ /* S_I */ S_N, S_I, S_I,
+ /* S_F */ S_N, S_F, S_F,
+ /* S_Z */ S_N, S_F, S_Z
};
- static const int result_type[] =
+ static const signed char result_type[] =
{
- /* state x/x x/d x/0 x/- d/x d/d d/0 d/-
- 0/x 0/d 0/0 0/- -/x -/d -/0 -/- */
-
- /* S_N */ CMP, CMP, CMP, CMP, CMP, LEN, CMP, CMP,
- CMP, CMP, CMP, CMP, CMP, CMP, CMP, CMP,
- /* S_I */ CMP, -1, -1, CMP, 1, LEN, LEN, CMP,
- 1, LEN, LEN, CMP, CMP, CMP, CMP, CMP,
- /* S_F */ CMP, CMP, CMP, CMP, CMP, LEN, CMP, CMP,
- CMP, CMP, CMP, CMP, CMP, CMP, CMP, CMP,
- /* S_Z */ CMP, 1, 1, CMP, -1, CMP, CMP, CMP,
- -1, CMP, CMP, CMP
+ /* state x/x x/d x/0 d/x d/d d/0 0/x 0/d 0/0 */
+
+ /* S_N */ CMP, CMP, CMP, CMP, LEN, CMP, CMP, CMP, CMP,
+ /* S_I */ CMP, -1, -1, +1, LEN, LEN, +1, LEN, LEN,
+ /* S_F */ CMP, CMP, CMP, CMP, CMP, CMP, CMP, CMP, CMP,
+ /* S_Z */ CMP, +1, +1, -1, CMP, CMP, -1, CMP, CMP
};
if (p1 == p2)
@@ -100,17 +80,20 @@ __strverscmp (const char *s1, const char *s2)
c1 = *p1++;
c2 = *p2++;
/* Hint: '0' is a digit too. */
- state = S_N | ((c1 == '0') + (ISDIGIT (c1) != 0));
+ state = S_N + ((c1 == '0') + (isdigit (c1) != 0));
- while ((diff = c1 - c2) == 0 && c1 != '\0')
+ while ((diff = c1 - c2) == 0)
{
+ if (c1 == '\0')
+ return diff;
+
state = next_state[state];
c1 = *p1++;
c2 = *p2++;
- state |= (c1 == '0') + (ISDIGIT (c1) != 0);
+ state += (c1 == '0') + (isdigit (c1) != 0);
}
- state = result_type[state << 2 | ((c2 == '0') + (ISDIGIT (c2) != 0))];
+ state = result_type[state * 3 + (((c2 == '0') + (isdigit (c2) != 0)))];
switch (state)
{
@@ -118,16 +101,17 @@ __strverscmp (const char *s1, const char *s2)
return diff;
case LEN:
- while (ISDIGIT (*p1++))
- if (!ISDIGIT (*p2++))
+ while (isdigit (*p1++))
+ if (!isdigit (*p2++))
return 1;
- return ISDIGIT (*p2) ? -1 : diff;
+ return isdigit (*p2) ? -1 : diff;
default:
return state;
}
}
#ifdef weak_alias
+libc_hidden_def (__strverscmp)
weak_alias (__strverscmp, strverscmp)
#endif
diff --git a/lib/sys_stat.in.h b/lib/sys_stat.in.h
index 4646d79..72d9537 100644
--- a/lib/sys_stat.in.h
+++ b/lib/sys_stat.in.h
@@ -1,7 +1,5 @@
-/* -*- buffer-read-only: t -*- vi: set ro: */
-/* DO NOT EDIT! GENERATED AUTOMATICALLY! */
/* Provide a more complete sys/stat header file.
- Copyright (C) 2005-2012 Free Software Foundation, Inc.
+ Copyright (C) 2005-2016 Free Software Foundation, Inc.
This 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/sys_time.in.h b/lib/sys_time.in.h
index 56c5447..d535a6a 100644
--- a/lib/sys_time.in.h
+++ b/lib/sys_time.in.h
@@ -1,8 +1,6 @@
-/* -*- buffer-read-only: t -*- vi: set ro: */
-/* DO NOT EDIT! GENERATED AUTOMATICALLY! */
/* Provide a more complete sys/time.h.
- Copyright (C) 2007-2012 Free Software Foundation, Inc.
+ Copyright (C) 2007-2016 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -19,37 +17,43 @@
/* Written by Paul Eggert. */
+#ifndef _@GUARD_PREFIX@_SYS_TIME_H
+
#if __GNUC__ >= 3
@PRAGMA_SYSTEM_HEADER@
#endif
@PRAGMA_COLUMNS@
-#if defined _@GUARD_PREFIX@_SYS_TIME_H
-
-/* Simply delegate to the system's header, without adding anything. */
-# if @HAVE_SYS_TIME_H@
-# @INCLUDE_NEXT@ @NEXT_SYS_TIME_H@
-# endif
-
+/* On Cygwin and on many BSDish systems, <sys/time.h> includes itself
+ recursively via <sys/select.h>.
+ Simply delegate to the system's header in this case; it is a no-op.
+ Without this extra ifdef, the C++ gettimeofday declaration below
+ would be a forward declaration in gnulib's nested <sys/time.h>. */
+#if defined _CYGWIN_SYS_TIME_H || defined _SYS_TIME_H || defined _SYS_TIME_H_
+# @INCLUDE_NEXT@ @NEXT_SYS_TIME_H@
#else
-# define _@GUARD_PREFIX@_SYS_TIME_H
+/* The include_next requires a split double-inclusion guard. */
+#if @HAVE_SYS_TIME_H@
+# @INCLUDE_NEXT@ @NEXT_SYS_TIME_H@
+#endif
+
+#ifndef _@GUARD_PREFIX@_SYS_TIME_H
+#define _@GUARD_PREFIX@_SYS_TIME_H
-# if @HAVE_SYS_TIME_H@
-# @INCLUDE_NEXT@ @NEXT_SYS_TIME_H@
-# else
-# include <time.h>
-# endif
+#if ! @HAVE_SYS_TIME_H@
+# include <time.h>
+#endif
/* On native Windows with MSVC, get the 'struct timeval' type.
Also, on native Windows with a 64-bit time_t, where we are overriding the
'struct timeval' type, get all declarations of system functions whose
signature contains 'struct timeval'. */
-# if (defined _MSC_VER || @REPLACE_STRUCT_TIMEVAL@) && @HAVE_WINSOCK2_H@ && !defined _GL_INCLUDING_WINSOCK2_H
-# define _GL_INCLUDING_WINSOCK2_H
-# include <winsock2.h>
-# undef _GL_INCLUDING_WINSOCK2_H
-# endif
+#if (defined _MSC_VER || @REPLACE_STRUCT_TIMEVAL@) && @HAVE_WINSOCK2_H@ && !defined _GL_INCLUDING_WINSOCK2_H
+# define _GL_INCLUDING_WINSOCK2_H
+# include <winsock2.h>
+# undef _GL_INCLUDING_WINSOCK2_H
+#endif
/* The definitions of _GL_FUNCDECL_RPL etc. are copied here. */
@@ -57,112 +61,119 @@
/* The definition of _GL_WARN_ON_USE is copied here. */
-# ifdef __cplusplus
+#ifdef __cplusplus
extern "C" {
-# endif
+#endif
-# if !@HAVE_STRUCT_TIMEVAL@ || @REPLACE_STRUCT_TIMEVAL@
+#if !@HAVE_STRUCT_TIMEVAL@ || @REPLACE_STRUCT_TIMEVAL@
-# if @REPLACE_STRUCT_TIMEVAL@
-# define timeval rpl_timeval
-# endif
+# if @REPLACE_STRUCT_TIMEVAL@
+# define timeval rpl_timeval
+# endif
-# if !GNULIB_defined_struct_timeval
+# if !GNULIB_defined_struct_timeval
struct timeval
{
time_t tv_sec;
long int tv_usec;
};
-# define GNULIB_defined_struct_timeval 1
-# endif
-
+# define GNULIB_defined_struct_timeval 1
# endif
-# ifdef __cplusplus
+#endif
+
+#ifdef __cplusplus
}
-# endif
+#endif
-# if @GNULIB_GETTIMEOFDAY@
-# if @REPLACE_GETTIMEOFDAY@
-# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
-# undef gettimeofday
-# define gettimeofday rpl_gettimeofday
-# endif
+#if @GNULIB_GETTIMEOFDAY@
+# if @REPLACE_GETTIMEOFDAY@
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# undef gettimeofday
+# define gettimeofday rpl_gettimeofday
+# endif
_GL_FUNCDECL_RPL (gettimeofday, int,
(struct timeval *restrict, void *restrict)
_GL_ARG_NONNULL ((1)));
_GL_CXXALIAS_RPL (gettimeofday, int,
(struct timeval *restrict, void *restrict));
-# else
-# if !@HAVE_GETTIMEOFDAY@
+# else
+# if !@HAVE_GETTIMEOFDAY@
_GL_FUNCDECL_SYS (gettimeofday, int,
(struct timeval *restrict, void *restrict)
_GL_ARG_NONNULL ((1)));
-# endif
+# endif
/* Need to cast, because on glibc systems, by default, the second argument is
struct timezone *. */
_GL_CXXALIAS_SYS_CAST (gettimeofday, int,
(struct timeval *restrict, void *restrict));
-# endif
+# endif
_GL_CXXALIASWARN (gettimeofday);
-# elif defined GNULIB_POSIXCHECK
-# undef gettimeofday
-# if HAVE_RAW_DECL_GETTIMEOFDAY
+# if defined __cplusplus && defined GNULIB_NAMESPACE
+namespace GNULIB_NAMESPACE {
+ typedef ::timeval
+#undef timeval
+ timeval;
+}
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef gettimeofday
+# if HAVE_RAW_DECL_GETTIMEOFDAY
_GL_WARN_ON_USE (gettimeofday, "gettimeofday is unportable - "
"use gnulib module gettimeofday for portability");
-# endif
# endif
+#endif
/* Hide some function declarations from <winsock2.h>. */
-# if defined _MSC_VER && @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
+#if defined _MSC_VER && @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
+# 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
+# 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,
@@ -191,17 +202,19 @@ _GL_WARN_ON_USE (gettimeofday, "gettimeofday is unportable - "
"setsockopt() used without including <sys/socket.h>");
_GL_WARN_ON_USE (shutdown,
"shutdown() used without including <sys/socket.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
+# 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
+#endif
#endif /* _@GUARD_PREFIX@_SYS_TIME_H */
+#endif /* _CYGWIN_SYS_TIME_H */
+#endif /* _@GUARD_PREFIX@_SYS_TIME_H */
diff --git a/lib/sys_types.in.h b/lib/sys_types.in.h
index 7d69151..8ab0545 100644
--- a/lib/sys_types.in.h
+++ b/lib/sys_types.in.h
@@ -1,8 +1,6 @@
-/* -*- buffer-read-only: t -*- vi: set ro: */
-/* DO NOT EDIT! GENERATED AUTOMATICALLY! */
/* Provide a more complete sys/types.h.
- Copyright (C) 2011-2012 Free Software Foundation, Inc.
+ Copyright (C) 2011-2016 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -25,7 +23,9 @@
#ifndef _@GUARD_PREFIX@_SYS_TYPES_H
/* The include_next requires a split double-inclusion guard. */
+# define _GL_INCLUDING_SYS_TYPES_H
#@INCLUDE_NEXT@ @NEXT_SYS_TYPES_H@
+# undef _GL_INCLUDING_SYS_TYPES_H
#ifndef _@GUARD_PREFIX@_SYS_TYPES_H
#define _@GUARD_PREFIX@_SYS_TYPES_H
diff --git a/lib/tempname.c b/lib/tempname.c
index 26a38ce..b1e9880 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-2012 Free Software Foundation, Inc.
+ Copyright (C) 1991-2003, 2005-2007, 2009-2016 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -62,16 +62,14 @@
# define struct_stat64 struct stat64
#else
# define struct_stat64 struct stat
+# define __try_tempname try_tempname
# define __gen_tempname gen_tempname
# define __getpid getpid
# define __gettimeofday gettimeofday
# define __mkdir mkdir
# define __open open
# define __lxstat64(version, file, buf) lstat (file, buf)
-#endif
-
-#if ! (HAVE___SECURE_GETENV || _LIBC)
-# define __secure_getenv getenv
+# define __secure_getenv secure_getenv
#endif
#ifdef _LIBC
@@ -179,21 +177,9 @@ __path_search (char *tmpl, size_t tmpl_len, const char *dir, const char *pfx,
static const char letters[] =
"abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789";
-/* Generate a temporary file name based on TMPL. TMPL must match the
- rules for mk[s]temp (i.e. end in "XXXXXX", possibly with a suffix).
- The name constructed does not exist at the time of the call to
- __gen_tempname. TMPL is overwritten with the result.
-
- KIND may be one of:
- __GT_NOCREATE: simply verify that the name does not exist
- at the time of the call.
- __GT_FILE: create the file using open(O_CREAT|O_EXCL)
- and return a read-write fd. The file is mode 0600.
- __GT_DIR: create a directory, which will be mode 0700.
-
- We use a clever algorithm to get hard-to-predict names. */
int
-__gen_tempname (char *tmpl, int suffixlen, int flags, int kind)
+__try_tempname (char *tmpl, int suffixlen, void *args,
+ int (*tryfunc) (char *, void *))
{
int len;
char *XXXXXX;
@@ -202,7 +188,6 @@ __gen_tempname (char *tmpl, int suffixlen, int flags, int kind)
unsigned int count;
int fd = -1;
int save_errno = errno;
- struct_stat64 st;
/* A lower bound on the number of temporary files to attempt to
generate. The maximum total number of temporary file names that
@@ -259,41 +244,7 @@ __gen_tempname (char *tmpl, int suffixlen, int flags, int kind)
v /= 62;
XXXXXX[5] = letters[v % 62];
- switch (kind)
- {
- case __GT_FILE:
- fd = __open (tmpl,
- (flags & ~O_ACCMODE)
- | O_RDWR | O_CREAT | O_EXCL, S_IRUSR | S_IWUSR);
- break;
-
- case __GT_DIR:
- fd = __mkdir (tmpl, S_IRUSR | S_IWUSR | S_IXUSR);
- break;
-
- case __GT_NOCREATE:
- /* This case is backward from the other three. __gen_tempname
- succeeds if __xstat fails because the name does not exist.
- Note the continue to bypass the common logic at the bottom
- of the loop. */
- if (__lxstat64 (_STAT_VER, tmpl, &st) < 0)
- {
- if (errno == ENOENT)
- {
- __set_errno (save_errno);
- return 0;
- }
- else
- /* Give up now. */
- return -1;
- }
- continue;
-
- default:
- assert (! "invalid KIND in __gen_tempname");
- abort ();
- }
-
+ fd = tryfunc (tmpl, args);
if (fd >= 0)
{
__set_errno (save_errno);
@@ -307,3 +258,67 @@ __gen_tempname (char *tmpl, int suffixlen, int flags, int kind)
__set_errno (EEXIST);
return -1;
}
+
+static int
+try_file (char *tmpl, void *flags)
+{
+ int *openflags = flags;
+ return __open (tmpl,
+ (*openflags & ~O_ACCMODE)
+ | O_RDWR | O_CREAT | O_EXCL, S_IRUSR | S_IWUSR);
+}
+
+static int
+try_dir (char *tmpl, void *flags _GL_UNUSED)
+{
+ return __mkdir (tmpl, S_IRUSR | S_IWUSR | S_IXUSR);
+}
+
+static int
+try_nocreate (char *tmpl, void *flags _GL_UNUSED)
+{
+ struct_stat64 st;
+
+ if (__lxstat64 (_STAT_VER, tmpl, &st) == 0)
+ __set_errno (EEXIST);
+ return errno == ENOENT ? 0 : -1;
+}
+
+/* Generate a temporary file name based on TMPL. TMPL must match the
+ rules for mk[s]temp (i.e. end in "XXXXXX", possibly with a suffix).
+ The name constructed does not exist at the time of the call to
+ __gen_tempname. TMPL is overwritten with the result.
+
+ KIND may be one of:
+ __GT_NOCREATE: simply verify that the name does not exist
+ at the time of the call.
+ __GT_FILE: create the file using open(O_CREAT|O_EXCL)
+ and return a read-write fd. The file is mode 0600.
+ __GT_DIR: create a directory, which will be mode 0700.
+
+ We use a clever algorithm to get hard-to-predict names. */
+int
+__gen_tempname (char *tmpl, int suffixlen, int flags, int kind)
+{
+ int (*tryfunc) (char *, void *);
+
+ switch (kind)
+ {
+ case __GT_FILE:
+ tryfunc = try_file;
+ break;
+
+ case __GT_DIR:
+ tryfunc = try_dir;
+ break;
+
+ case __GT_NOCREATE:
+ tryfunc = try_nocreate;
+ break;
+
+ default:
+ assert (! "invalid KIND in __gen_tempname");
+ abort ();
+ }
+ return __try_tempname (tmpl, suffixlen, &flags, tryfunc);
+}
diff --git a/lib/tempname.h b/lib/tempname.h
index 7972562..be01c51 100644
--- a/lib/tempname.h
+++ b/lib/tempname.h
@@ -1,6 +1,6 @@
/* Create a temporary file or directory.
- Copyright (C) 2006, 2009-2012 Free Software Foundation, Inc.
+ Copyright (C) 2006, 2009-2016 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -32,6 +32,10 @@
# define GT_NOCREATE 2
# endif
+#ifdef __cplusplus
+extern "C" {
+#endif
+
/* Generate a temporary file name based on TMPL. TMPL must match the
rules for mk[s]temp (i.e. end in "XXXXXX", possibly with a suffix).
The name constructed does not exist at the time of the call to
@@ -47,4 +51,15 @@
We use a clever algorithm to get hard-to-predict names. */
extern int gen_tempname (char *tmpl, int suffixlen, int flags, int kind);
+/* Similar to gen_tempname, but TRYFUNC is called for each temporary
+ name to try. If TRYFUNC returns a non-negative number, TRY_GEN_TEMPNAME
+ returns with this value. Otherwise, if errno is set to EEXIST, another
+ name is tried, or else TRY_GEN_TEMPNAME returns -1. */
+extern int try_tempname (char *tmpl, int suffixlen, void *args,
+ int (*tryfunc) (char *, void *));
+
+#ifdef __cplusplus
+}
+#endif
+
#endif /* GL_TEMPNAME_H */
diff --git a/lib/time.in.h b/lib/time.in.h
index 065fbee..865c114 100644
--- a/lib/time.in.h
+++ b/lib/time.in.h
@@ -1,8 +1,6 @@
-/* -*- buffer-read-only: t -*- vi: set ro: */
-/* DO NOT EDIT! GENERATED AUTOMATICALLY! */
/* A more-standard <time.h>.
- Copyright (C) 2007-2012 Free Software Foundation, Inc.
+ Copyright (C) 2007-2016 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -24,11 +22,13 @@
/* Don't get in the way of glibc when it includes time.h merely to
declare a few standard symbols, rather than to declare all the
- symbols. Also, Solaris 8 <time.h> eventually includes itself
+ symbols. (However, skip this for MinGW as it treats __need_time_t
+ incompatibly.) Also, Solaris 8 <time.h> eventually includes itself
recursively; if that is happening, just include the system <time.h>
without adding our own declarations. */
-#if (defined __need_time_t || defined __need_clock_t \
- || defined __need_timespec \
+#if (((defined __need_time_t || defined __need_clock_t \
+ || defined __need_timespec) \
+ && !defined __MINGW32__) \
|| defined _@GUARD_PREFIX@_TIME_H)
# @INCLUDE_NEXT@ @NEXT_TIME_H@
@@ -50,20 +50,15 @@
/* Some systems don't define struct timespec (e.g., AIX 4.1, Ultrix 4.3).
Or they define it with the wrong member names or define it in <sys/time.h>
- (e.g., FreeBSD circa 1997). Stock Mingw does not define it, but the
- pthreads-win32 library defines it in <pthread.h>. */
+ (e.g., FreeBSD circa 1997). Stock Mingw prior to 3.0 does not define it,
+ but the pthreads-win32 library defines it in <pthread.h>. */
# if ! @TIME_H_DEFINES_STRUCT_TIMESPEC@
# if @SYS_TIME_H_DEFINES_STRUCT_TIMESPEC@
# include <sys/time.h>
# elif @PTHREAD_H_DEFINES_STRUCT_TIMESPEC@
# include <pthread.h>
-/* The pthreads-win32 <pthread.h> also defines a couple of broken macros. */
-# undef asctime_r
-# undef ctime_r
-# undef gmtime_r
-# undef localtime_r
-# undef rand_r
-# undef strtok_r
+# elif @UNISTD_H_DEFINES_STRUCT_TIMESPEC@
+# include <unistd.h>
# else
# ifdef __cplusplus
@@ -189,6 +184,39 @@ _GL_CXXALIASWARN (gmtime_r);
# endif
# endif
+/* 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 @REPLACE_LOCALTIME@
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# undef localtime
+# define localtime rpl_localtime
+# endif
+_GL_FUNCDECL_RPL (localtime, struct tm *, (time_t const *__timer)
+ _GL_ARG_NONNULL ((1)));
+_GL_CXXALIAS_RPL (localtime, struct tm *, (time_t const *__timer));
+# else
+_GL_CXXALIAS_SYS (localtime, struct tm *, (time_t const *__timer));
+# endif
+_GL_CXXALIASWARN (localtime);
+# endif
+
+# if @GNULIB_GETTIMEOFDAY@
+# if @REPLACE_GMTIME@
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# undef gmtime
+# define gmtime rpl_gmtime
+# endif
+_GL_FUNCDECL_RPL (gmtime, struct tm *, (time_t const *__timer)
+ _GL_ARG_NONNULL ((1)));
+_GL_CXXALIAS_RPL (gmtime, struct tm *, (time_t const *__timer));
+# else
+_GL_CXXALIAS_SYS (gmtime, struct tm *, (time_t const *__timer));
+# endif
+_GL_CXXALIASWARN (gmtime);
+# endif
+
/* Parse BUF as a time stamp, assuming FORMAT specifies its layout, and store
the resulting broken-down time into TM. See
<http://www.opengroup.org/susv3xsh/strptime.html>. */
@@ -205,6 +233,25 @@ _GL_CXXALIAS_SYS (strptime, char *, (char const *restrict __buf,
_GL_CXXALIASWARN (strptime);
# 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));
+_GL_CXXALIAS_SYS (tzalloc, timezone_t, (char const *__name));
+_GL_FUNCDECL_SYS (tzfree, void, (timezone_t __tz));
+_GL_CXXALIAS_SYS (tzfree, void, (timezone_t __tz));
+_GL_FUNCDECL_SYS (localtime_rz, struct tm *,
+ (timezone_t __tz, time_t const *restrict __timer,
+ struct tm *restrict __result) _GL_ARG_NONNULL ((2, 3)));
+_GL_CXXALIAS_SYS (localtime_rz, struct tm *,
+ (timezone_t __tz, time_t const *restrict __timer,
+ struct tm *restrict __result));
+_GL_FUNCDECL_SYS (mktime_z, time_t,
+ (timezone_t __tz, struct tm *restrict __result)
+ _GL_ARG_NONNULL ((2)));
+_GL_CXXALIAS_SYS (mktime_z, time_t,
+ (timezone_t __tz, struct tm *restrict __result));
+# endif
+
/* Convert TM to a time_t value, assuming UTC. */
# if @GNULIB_TIMEGM@
# if @REPLACE_TIMEGM@
diff --git a/lib/unistd.c b/lib/unistd.c
index 6c6a8e2..72bad1c 100644
--- a/lib/unistd.c
+++ b/lib/unistd.c
@@ -1,3 +1,4 @@
#include <config.h>
#define _GL_UNISTD_INLINE _GL_EXTERN_INLINE
#include "unistd.h"
+typedef int dummy;
diff --git a/lib/unistd.in.h b/lib/unistd.in.h
index 4cb8e5f..3aa0b03 100644
--- a/lib/unistd.in.h
+++ b/lib/unistd.in.h
@@ -1,7 +1,5 @@
-/* -*- buffer-read-only: t -*- vi: set ro: */
-/* DO NOT EDIT! GENERATED AUTOMATICALLY! */
/* Substitute for and wrapper around <unistd.h>.
- Copyright (C) 2003-2012 Free Software Foundation, Inc.
+ Copyright (C) 2003-2016 Free Software Foundation, Inc.
This 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,32 +14,30 @@
You should have received a copy of the GNU General Public License
along with this program; if not, see <http://www.gnu.org/licenses/>. */
+#ifndef _@GUARD_PREFIX@_UNISTD_H
+
#if __GNUC__ >= 3
@PRAGMA_SYSTEM_HEADER@
#endif
@PRAGMA_COLUMNS@
+#ifdef _GL_INCLUDING_UNISTD_H
/* Special invocation convention:
- - On mingw, several headers, including <winsock2.h>, include <unistd.h>,
- but we need to ensure that both the system <unistd.h> and <winsock2.h>
- are completely included before we replace gethostname. */
-#if @GNULIB_GETHOSTNAME@ && @UNISTD_H_HAVE_WINSOCK2_H@ \
- && !defined _GL_WINSOCK2_H_WITNESS && defined _WINSOCK2_H
-/* <unistd.h> is being indirectly included for the first time from
- <winsock2.h>; avoid declaring any overrides. */
-# if @HAVE_UNISTD_H@
-# @INCLUDE_NEXT@ @NEXT_UNISTD_H@
-# else
-# error unexpected; report this to bug-gnulib@gnu.org
-# endif
-# define _GL_WINSOCK2_H_WITNESS
+ - On Mac OS X 10.3.9 we have a sequence of nested includes
+ <unistd.h> -> <signal.h> -> <pthread.h> -> <unistd.h>
+ In this situation, the functions are not yet declared, therefore we cannot
+ provide the C++ aliases. */
-/* Normal invocation. */
-#elif !defined _@GUARD_PREFIX@_UNISTD_H
+#@INCLUDE_NEXT@ @NEXT_UNISTD_H@
+
+#else
+/* Normal invocation convention. */
/* The include_next requires a split double-inclusion guard. */
#if @HAVE_UNISTD_H@
+# define _GL_INCLUDING_UNISTD_H
# @INCLUDE_NEXT@ @NEXT_UNISTD_H@
+# undef _GL_INCLUDING_UNISTD_H
#endif
/* Get all possible declarations of gethostname(). */
@@ -59,9 +55,13 @@
#include <stddef.h>
/* mingw doesn't define the SEEK_* or *_FILENO macros in <unistd.h>. */
+/* MSVC declares 'unlink' in <stdio.h>, not in <unistd.h>. We must include
+ it before we #define unlink rpl_unlink. */
/* Cygwin 1.7.1 declares symlinkat in <stdio.h>, not in <unistd.h>. */
/* But avoid namespace pollution on glibc systems. */
#if (!(defined SEEK_CUR && defined SEEK_END && defined SEEK_SET) \
+ || ((@GNULIB_UNLINK@ || defined GNULIB_POSIXCHECK) \
+ && ((defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__)) \
|| ((@GNULIB_SYMLINKAT@ || defined GNULIB_POSIXCHECK) \
&& defined __CYGWIN__)) \
&& ! defined __GLIBC__
@@ -79,9 +79,13 @@
/* mingw, MSVC, BeOS, Haiku declare environ in <stdlib.h>, not in
<unistd.h>. */
/* Solaris declares getcwd not only in <unistd.h> but also in <stdlib.h>. */
+/* OSF Tru64 Unix cannot see gnulib rpl_strtod when system <stdlib.h> is
+ included here. */
/* But avoid namespace pollution on glibc systems. */
-#ifndef __GLIBC__
+#if !defined __GLIBC__ && !defined __osf__
+# define __need_system_stdlib_h
# include <stdlib.h>
+# undef __need_system_stdlib_h
#endif
/* Native Windows platforms declare chdir, getcwd, rmdir in
@@ -126,9 +130,13 @@
/* 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>
#endif
+#ifndef _GL_INLINE_HEADER_BEGIN
+ #error "Please include config.h first."
+#endif
_GL_INLINE_HEADER_BEGIN
#ifndef _GL_UNISTD_INLINE
# define _GL_UNISTD_INLINE _GL_INLINE
@@ -397,6 +405,12 @@ _GL_WARN_ON_USE (dup3, "dup3 is unportable - "
/* Set of environment variables and values. An array of strings of the form
"VARIABLE=VALUE", terminated with a NULL. */
# if defined __APPLE__ && defined __MACH__
+# include <TargetConditionals.h>
+# if !TARGET_OS_IPHONE && !TARGET_IPHONE_SIMULATOR
+# define _GL_USE_CRT_EXTERNS
+# endif
+# endif
+# ifdef _GL_USE_CRT_EXTERNS
# include <crt_externs.h>
# define environ (*_NSGetEnviron ())
# else
@@ -664,10 +678,19 @@ _GL_WARN_ON_USE (getdomainname, "getdomainname is unportable - "
#if @GNULIB_GETDTABLESIZE@
/* Return the maximum number of file descriptors in the current process.
In POSIX, this is same as sysconf (_SC_OPEN_MAX). */
-# if !@HAVE_GETDTABLESIZE@
+# if @REPLACE_GETDTABLESIZE@
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# undef getdtablesize
+# define getdtablesize rpl_getdtablesize
+# endif
+_GL_FUNCDECL_RPL (getdtablesize, int, (void));
+_GL_CXXALIAS_RPL (getdtablesize, int, (void));
+# else
+# if !@HAVE_GETDTABLESIZE@
_GL_FUNCDECL_SYS (getdtablesize, int, (void));
-# endif
+# endif
_GL_CXXALIAS_SYS (getdtablesize, int, (void));
+# endif
_GL_CXXALIASWARN (getdtablesize);
#elif defined GNULIB_POSIXCHECK
# undef getdtablesize
@@ -757,7 +780,7 @@ _GL_WARN_ON_USE (gethostname, "gethostname is unportable - "
${LOGNAME-$USER} on Unix platforms,
$USERNAME on native Windows platforms.
*/
-# if !@HAVE_GETLOGIN@
+# if !@HAVE_DECL_GETLOGIN@
_GL_FUNCDECL_SYS (getlogin, char *, (void));
# endif
_GL_CXXALIAS_SYS (getlogin, char *, (void));
@@ -1274,13 +1297,24 @@ _GL_WARN_ON_USE (readlink, "readlink is unportable - "
#if @GNULIB_READLINKAT@
-# if !@HAVE_READLINKAT@
+# if @REPLACE_READLINKAT@
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# define readlinkat rpl_readlinkat
+# endif
+_GL_FUNCDECL_RPL (readlinkat, ssize_t,
+ (int fd, char const *file, char *buf, size_t len)
+ _GL_ARG_NONNULL ((2, 3)));
+_GL_CXXALIAS_RPL (readlinkat, ssize_t,
+ (int fd, char const *file, char *buf, size_t len));
+# else
+# if !@HAVE_READLINKAT@
_GL_FUNCDECL_SYS (readlinkat, ssize_t,
(int fd, char const *file, char *buf, size_t len)
_GL_ARG_NONNULL ((2, 3)));
-# endif
+# endif
_GL_CXXALIAS_SYS (readlinkat, ssize_t,
(int fd, char const *file, char *buf, size_t len));
+# endif
_GL_CXXALIASWARN (readlinkat);
#elif defined GNULIB_POSIXCHECK
# undef readlinkat
@@ -1394,13 +1428,25 @@ _GL_WARN_ON_USE (symlink, "symlink is not portable - "
#if @GNULIB_SYMLINKAT@
-# if !@HAVE_SYMLINKAT@
+# if @REPLACE_SYMLINKAT@
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# undef symlinkat
+# define symlinkat rpl_symlinkat
+# endif
+_GL_FUNCDECL_RPL (symlinkat, int,
+ (char const *contents, int fd, char const *file)
+ _GL_ARG_NONNULL ((1, 3)));
+_GL_CXXALIAS_RPL (symlinkat, int,
+ (char const *contents, int fd, char const *file));
+# else
+# if !@HAVE_SYMLINKAT@
_GL_FUNCDECL_SYS (symlinkat, int,
(char const *contents, int fd, char const *file)
_GL_ARG_NONNULL ((1, 3)));
-# endif
+# endif
_GL_CXXALIAS_SYS (symlinkat, int,
(char const *contents, int fd, char const *file));
+# endif
_GL_CXXALIASWARN (symlinkat);
#elif defined GNULIB_POSIXCHECK
# undef symlinkat
@@ -1540,4 +1586,5 @@ _GL_CXXALIASWARN (write);
_GL_INLINE_HEADER_END
#endif /* _@GUARD_PREFIX@_UNISTD_H */
+#endif /* _GL_INCLUDING_UNISTD_H */
#endif /* _@GUARD_PREFIX@_UNISTD_H */
diff --git a/lib/unlocked-io.h b/lib/unlocked-io.h
index 65bfbc4..c0ece50 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-2012 Free Software Foundation, Inc.
+ Copyright (C) 2001-2004, 2009-2016 Free Software Foundation, Inc.
This 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/verify.h b/lib/verify.h
index 0c320b1..5c8381d 100644
--- a/lib/verify.h
+++ b/lib/verify.h
@@ -1,6 +1,6 @@
/* Compile-time assert-like macros.
- Copyright (C) 2005-2006, 2009-2012 Free Software Foundation, Inc.
+ Copyright (C) 2005-2006, 2009-2016 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -18,7 +18,7 @@
/* Written by Paul Eggert, Bruno Haible, and Jim Meyering. */
#ifndef _GL_VERIFY_H
-# define _GL_VERIFY_H
+#define _GL_VERIFY_H
/* Define _GL_HAVE__STATIC_ASSERT to 1 if _Static_assert works as per C11.
@@ -31,14 +31,24 @@
Use this only with GCC. If we were willing to slow 'configure'
down we could also use it with other compilers, but since this
affects only the quality of diagnostics, why bother? */
-# if (4 < __GNUC__ || (__GNUC__ == 4 && 6 <= __GNUC_MINOR__)) && !defined __cplusplus
-# define _GL_HAVE__STATIC_ASSERT 1
-# endif
+#if (4 < __GNUC__ + (6 <= __GNUC_MINOR__) \
+ && (201112L <= __STDC_VERSION__ || !defined __STRICT_ANSI__) \
+ && !defined __cplusplus)
+# define _GL_HAVE__STATIC_ASSERT 1
+#endif
/* The condition (99 < __GNUC__) is temporary, until we know about the
first G++ release that supports static_assert. */
-# if (99 < __GNUC__) && defined __cplusplus
-# define _GL_HAVE_STATIC_ASSERT 1
-# endif
+#if (99 < __GNUC__) && defined __cplusplus
+# define _GL_HAVE_STATIC_ASSERT 1
+#endif
+
+/* FreeBSD 9.1 <sys/cdefs.h>, included by <stddef.h> and lots of other
+ system headers, defines a conflicting _Static_assert that is no
+ better than ours; override it. */
+#ifndef _GL_HAVE_STATIC_ASSERT
+# include <stddef.h>
+# undef _Static_assert
+#endif
/* Each of these macros verifies that its argument R is nonzero. To
be portable, R should be an integer constant expression. Unlike
@@ -141,50 +151,50 @@
Use a template type to work around the problem. */
/* Concatenate two preprocessor tokens. */
-# define _GL_CONCAT(x, y) _GL_CONCAT0 (x, y)
-# define _GL_CONCAT0(x, y) x##y
+#define _GL_CONCAT(x, y) _GL_CONCAT0 (x, y)
+#define _GL_CONCAT0(x, y) x##y
/* _GL_COUNTER is an integer, preferably one that changes each time we
use it. Use __COUNTER__ if it works, falling back on __LINE__
otherwise. __LINE__ isn't perfect, but it's better than a
constant. */
-# if defined __COUNTER__ && __COUNTER__ != __COUNTER__
-# define _GL_COUNTER __COUNTER__
-# else
-# define _GL_COUNTER __LINE__
-# endif
+#if defined __COUNTER__ && __COUNTER__ != __COUNTER__
+# define _GL_COUNTER __COUNTER__
+#else
+# define _GL_COUNTER __LINE__
+#endif
/* Generate a symbol with the given prefix, making it unique if
possible. */
-# define _GL_GENSYM(prefix) _GL_CONCAT (prefix, _GL_COUNTER)
+#define _GL_GENSYM(prefix) _GL_CONCAT (prefix, _GL_COUNTER)
/* Verify requirement R at compile-time, as an integer constant expression
that returns 1. If R is false, fail at compile-time, preferably
with a diagnostic that includes the string-literal DIAGNOSTIC. */
-# define _GL_VERIFY_TRUE(R, DIAGNOSTIC) \
- (!!sizeof (_GL_VERIFY_TYPE (R, DIAGNOSTIC)))
+#define _GL_VERIFY_TRUE(R, DIAGNOSTIC) \
+ (!!sizeof (_GL_VERIFY_TYPE (R, DIAGNOSTIC)))
-# ifdef __cplusplus
-# if !GNULIB_defined_struct__gl_verify_type
+#ifdef __cplusplus
+# if !GNULIB_defined_struct__gl_verify_type
template <int w>
struct _gl_verify_type {
unsigned int _gl_verify_error_if_negative: w;
};
-# define GNULIB_defined_struct__gl_verify_type 1
-# endif
-# define _GL_VERIFY_TYPE(R, DIAGNOSTIC) \
- _gl_verify_type<(R) ? 1 : -1>
-# elif defined _GL_HAVE__STATIC_ASSERT
-# define _GL_VERIFY_TYPE(R, DIAGNOSTIC) \
- struct { \
- _Static_assert (R, DIAGNOSTIC); \
- int _gl_dummy; \
- }
-# else
-# define _GL_VERIFY_TYPE(R, DIAGNOSTIC) \
- struct { unsigned int _gl_verify_error_if_negative: (R) ? 1 : -1; }
+# define GNULIB_defined_struct__gl_verify_type 1
# endif
+# define _GL_VERIFY_TYPE(R, DIAGNOSTIC) \
+ _gl_verify_type<(R) ? 1 : -1>
+#elif defined _GL_HAVE__STATIC_ASSERT
+# define _GL_VERIFY_TYPE(R, DIAGNOSTIC) \
+ struct { \
+ _Static_assert (R, DIAGNOSTIC); \
+ int _gl_dummy; \
+ }
+#else
+# define _GL_VERIFY_TYPE(R, DIAGNOSTIC) \
+ struct { unsigned int _gl_verify_error_if_negative: (R) ? 1 : -1; }
+#endif
/* Verify requirement R at compile-time, as a declaration without a
trailing ';'. If R is false, fail at compile-time, preferably
@@ -193,23 +203,23 @@ template <int w>
Unfortunately, unlike C11, this implementation must appear as an
ordinary declaration, and cannot appear inside struct { ... }. */
-# ifdef _GL_HAVE__STATIC_ASSERT
-# define _GL_VERIFY _Static_assert
-# else
-# define _GL_VERIFY(R, DIAGNOSTIC) \
- extern int (*_GL_GENSYM (_gl_verify_function) (void)) \
- [_GL_VERIFY_TRUE (R, DIAGNOSTIC)]
-# endif
+#ifdef _GL_HAVE__STATIC_ASSERT
+# define _GL_VERIFY _Static_assert
+#else
+# define _GL_VERIFY(R, DIAGNOSTIC) \
+ extern int (*_GL_GENSYM (_gl_verify_function) (void)) \
+ [_GL_VERIFY_TRUE (R, DIAGNOSTIC)]
+#endif
/* _GL_STATIC_ASSERT_H is defined if this code is copied into assert.h. */
-# ifdef _GL_STATIC_ASSERT_H
-# if !defined _GL_HAVE__STATIC_ASSERT && !defined _Static_assert
-# define _Static_assert(R, DIAGNOSTIC) _GL_VERIFY (R, DIAGNOSTIC)
-# endif
-# if !defined _GL_HAVE_STATIC_ASSERT && !defined static_assert
-# define static_assert _Static_assert /* C11 requires this #define. */
-# endif
+#ifdef _GL_STATIC_ASSERT_H
+# if !defined _GL_HAVE__STATIC_ASSERT && !defined _Static_assert
+# define _Static_assert(R, DIAGNOSTIC) _GL_VERIFY (R, DIAGNOSTIC)
# endif
+# if !defined _GL_HAVE_STATIC_ASSERT && !defined static_assert
+# define static_assert _Static_assert /* C11 requires this #define. */
+# endif
+#endif
/* @assert.h omit start@ */
@@ -227,18 +237,42 @@ template <int w>
verify_true is obsolescent; please use verify_expr instead. */
-# define verify_true(R) _GL_VERIFY_TRUE (R, "verify_true (" #R ")")
+#define verify_true(R) _GL_VERIFY_TRUE (R, "verify_true (" #R ")")
/* Verify requirement R at compile-time. Return the value of the
expression E. */
-# define verify_expr(R, E) \
- (_GL_VERIFY_TRUE (R, "verify_expr (" #R ", " #E ")") ? (E) : (E))
+#define verify_expr(R, E) \
+ (_GL_VERIFY_TRUE (R, "verify_expr (" #R ", " #E ")") ? (E) : (E))
/* Verify requirement R at compile-time, as a declaration without a
trailing ';'. */
-# define verify(R) _GL_VERIFY (R, "verify (" #R ")")
+#define verify(R) _GL_VERIFY (R, "verify (" #R ")")
+
+#ifndef __has_builtin
+# define __has_builtin(x) 0
+#endif
+
+/* Assume that R always holds. This lets the compiler optimize
+ accordingly. R should not have side-effects; it may or may not be
+ evaluated. Behavior is undefined if R is false. */
+
+#if (__has_builtin (__builtin_unreachable) \
+ || 4 < __GNUC__ + (5 <= __GNUC_MINOR__))
+# define assume(R) ((R) ? (void) 0 : __builtin_unreachable ())
+#elif 1200 <= _MSC_VER
+# define assume(R) __assume (R)
+#elif ((defined GCC_LINT || defined lint) \
+ && (__has_builtin (__builtin_trap) \
+ || 3 < __GNUC__ + (3 < __GNUC_MINOR__ + (4 <= __GNUC_PATCHLEVEL__))))
+ /* Doing it this way helps various packages when configured with
+ --enable-gcc-warnings, which compiles with -Dlint. It's nicer
+ when 'assume' silences warnings even with older GCCs. */
+# define assume(R) ((R) ? (void) 0 : __builtin_trap ())
+#else
+# define assume(R) ((void) (0 && (R)))
+#endif
/* @assert.h omit end@ */
diff --git a/lib/version-etc-fsf.c b/lib/version-etc-fsf.c
index c452f40..baaebb6 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-2012 Free Software Foundation, Inc.
+ Copyright (C) 1999-2006, 2009-2016 Free Software Foundation, Inc.
This 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/version-etc.c b/lib/version-etc.c
index ae1e44d..a9a0fdb 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-2012 Free Software Foundation, Inc.
+ Copyright (C) 1999-2016 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -38,7 +38,7 @@
# define PACKAGE PACKAGE_TARNAME
#endif
-enum { COPYRIGHT_YEAR = 2012 };
+enum { COPYRIGHT_YEAR = 2016 };
/* The three functions below display the --version information the
standard way.
diff --git a/lib/version-etc.h b/lib/version-etc.h
index 5548c02..1a5f603 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-2012 Free Software Foundation, Inc.
+ Copyright (C) 1999, 2003, 2005, 2009-2016 Free Software Foundation, Inc.
This 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/wchar.in.h b/lib/wchar.in.h
index 0aada5e..07dbdcb 100644
--- a/lib/wchar.in.h
+++ b/lib/wchar.in.h
@@ -1,8 +1,6 @@
-/* -*- buffer-read-only: t -*- vi: set ro: */
-/* DO NOT EDIT! GENERATED AUTOMATICALLY! */
/* A substitute for ISO C99 <wchar.h>, for platforms that have issues.
- Copyright (C) 2007-2012 Free Software Foundation, Inc.
+ Copyright (C) 2007-2016 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -32,15 +30,23 @@
#endif
@PRAGMA_COLUMNS@
-#if defined __need_mbstate_t || defined __need_wint_t || (defined __hpux && ((defined _INTTYPES_INCLUDED && !defined strtoimax) || defined _GL_JUST_INCLUDE_SYSTEM_WCHAR_H)) || defined _GL_ALREADY_INCLUDING_WCHAR_H
+#if (((defined __need_mbstate_t || defined __need_wint_t) \
+ && !defined __MINGW32__ && !defined __KLIBC__) \
+ || (defined __hpux \
+ && ((defined _INTTYPES_INCLUDED && !defined strtoimax) \
+ || defined _GL_JUST_INCLUDE_SYSTEM_WCHAR_H)) \
+ || (defined __MINGW32__ && defined __STRING_H_SOURCED__) \
+ || defined _GL_ALREADY_INCLUDING_WCHAR_H)
/* Special invocation convention:
- - Inside glibc and uClibc header files.
+ - Inside glibc and uClibc header files, but not MinGW.
- On HP-UX 11.00 we have a sequence of nested includes
<wchar.h> -> <stdlib.h> -> <stdint.h>, and the latter includes <wchar.h>,
once indirectly <stdint.h> -> <sys/types.h> -> <inttypes.h> -> <wchar.h>
and once directly. In both situations 'wint_t' is not yet defined,
therefore we cannot provide the function overrides; instead include only
the system's <wchar.h>.
+ - With MinGW 3.22, when <string.h> includes <wchar.h>, only some part of
+ <wchar.h> is actually processed, and that doesn't include 'mbstate_t'.
- On IRIX 6.5, similarly, we have an include <wchar.h> -> <wctype.h>, and
the latter includes <wchar.h>. But here, we have no way to detect whether
<wctype.h> is completely included or is still being included. */
@@ -107,10 +113,10 @@
# define WEOF -1
# endif
#else
-/* MSVC defines wint_t as 'unsigned short' in <crtdefs.h>.
+/* 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. */
-# if defined _MSC_VER
+# if @GNULIB_OVERRIDES_WINT_T@
# if !GNULIB_defined_wint_t
# include <crtdefs.h>
typedef unsigned int rpl_wint_t;
@@ -442,6 +448,11 @@ _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
diff --git a/lib/wcrtomb.c b/lib/wcrtomb.c
index 9e6494e..b931ee9 100644
--- a/lib/wcrtomb.c
+++ b/lib/wcrtomb.c
@@ -1,5 +1,5 @@
/* Convert wide character to multibyte character.
- Copyright (C) 2008-2012 Free Software Foundation, Inc.
+ Copyright (C) 2008-2016 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2008.
This program is free software: you can redistribute it and/or modify
diff --git a/lib/wctob.c b/lib/wctob.c
index 0885c1b..15e3ff3 100644
--- a/lib/wctob.c
+++ b/lib/wctob.c
@@ -1,5 +1,5 @@
/* Convert wide character to unibyte character.
- Copyright (C) 2008, 2010-2012 Free Software Foundation, Inc.
+ Copyright (C) 2008, 2010-2016 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2008.
This program is free software: you can redistribute it and/or modify
diff --git a/lib/wctomb-impl.h b/lib/wctomb-impl.h
index 68264cf..a6ed971 100644
--- a/lib/wctomb-impl.h
+++ b/lib/wctomb-impl.h
@@ -1,5 +1,5 @@
/* Convert wide character to multibyte character.
- Copyright (C) 2011-2012 Free Software Foundation, Inc.
+ Copyright (C) 2011-2016 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2011.
This program is free software: you can redistribute it and/or modify
diff --git a/lib/wctomb.c b/lib/wctomb.c
index 736a7c7..f1d14f5 100644
--- a/lib/wctomb.c
+++ b/lib/wctomb.c
@@ -1,5 +1,5 @@
/* Convert wide character to multibyte character.
- Copyright (C) 2011-2012 Free Software Foundation, Inc.
+ Copyright (C) 2011-2016 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2011.
This program is free software: you can redistribute it and/or modify
diff --git a/lib/wctype.in.h b/lib/wctype.in.h
index 983336e..be7c14c 100644
--- a/lib/wctype.in.h
+++ b/lib/wctype.in.h
@@ -1,8 +1,6 @@
-/* -*- buffer-read-only: t -*- vi: set ro: */
-/* DO NOT EDIT! GENERATED AUTOMATICALLY! */
/* A substitute for ISO C99 <wctype.h>, for platforms that lack it.
- Copyright (C) 2006-2012 Free Software Foundation, Inc.
+ Copyright (C) 2006-2016 Free Software Foundation, Inc.
This 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,13 +25,25 @@
* wctrans_t, and wctype_t are not yet implemented.
*/
-#ifndef _@GUARD_PREFIX@_WCTYPE_H
-
#if __GNUC__ >= 3
@PRAGMA_SYSTEM_HEADER@
#endif
@PRAGMA_COLUMNS@
+#if (defined __MINGW32__ && defined __CTYPE_H_SOURCED__)
+
+/* Special invocation convention:
+ - With MinGW 3.22, when <ctype.h> includes <wctype.h>, only some part of
+ <wctype.h> is being processed, which doesn't include the idempotency
+ guard. */
+
+#@INCLUDE_NEXT@ @NEXT_WCTYPE_H@
+
+#else
+/* Normal invocation convention. */
+
+#ifndef _@GUARD_PREFIX@_WCTYPE_H
+
#if @HAVE_WINT_T@
/* Solaris 2.5 has a bug: <wchar.h> must be included before <wctype.h>.
Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
@@ -46,6 +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__
+# include <ctype.h>
+#endif
+
/* Include the original <wctype.h> if it exists.
BeOS 5 has the functions but no <wctype.h>. */
/* The include_next requires a split double-inclusion guard. */
@@ -56,6 +73,9 @@
#ifndef _@GUARD_PREFIX@_WCTYPE_H
#define _@GUARD_PREFIX@_WCTYPE_H
+#ifndef _GL_INLINE_HEADER_BEGIN
+ #error "Please include config.h first."
+#endif
_GL_INLINE_HEADER_BEGIN
#ifndef _GL_WCTYPE_INLINE
# define _GL_WCTYPE_INLINE _GL_INLINE
@@ -85,10 +105,10 @@ _GL_INLINE_HEADER_BEGIN
# define WEOF -1
# endif
#else
-/* MSVC defines wint_t as 'unsigned short' in <crtdefs.h>.
+/* 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. */
-# if defined _MSC_VER
+# if @GNULIB_OVERRIDES_WINT_T@
# if !GNULIB_defined_wint_t
# include <crtdefs.h>
typedef unsigned int rpl_wint_t;
@@ -504,3 +524,4 @@ _GL_INLINE_HEADER_END
#endif /* _@GUARD_PREFIX@_WCTYPE_H */
#endif /* _@GUARD_PREFIX@_WCTYPE_H */
+#endif
diff --git a/lib/xalloc-die.c b/lib/xalloc-die.c
index e85d6df..4c7994b 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-2012 Free Software
+ Copyright (C) 1997-2000, 2002-2004, 2006, 2009-2016 Free Software
Foundation, Inc.
This program is free software: you can redistribute it and/or modify
diff --git a/lib/xalloc-oversized.h b/lib/xalloc-oversized.h
index ad777d8..503bb37 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-2012 Free Software Foundation, Inc.
+ Copyright (C) 1990-2000, 2003-2004, 2006-2016 Free Software Foundation, Inc.
This 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,23 +16,53 @@
along with this program. If not, see <http://www.gnu.org/licenses/>. */
#ifndef XALLOC_OVERSIZED_H_
-# define XALLOC_OVERSIZED_H_
+#define XALLOC_OVERSIZED_H_
-# include <stddef.h>
+#include <stddef.h>
+#include <stdint.h>
-/* Return 1 if an array of N objects, each of size S, cannot exist due
- to size arithmetic overflow. S must be positive and N must be
- nonnegative. This is a macro, not a function, so that it
- works correctly even when SIZE_MAX < N.
+/* Default for (non-Clang) compilers that lack __has_builtin. */
+#ifndef __has_builtin
+# define __has_builtin(x) 0
+#endif
+/* True if N * S would overflow in a size_t calculation,
+ or would generate a value larger than PTRDIFF_MAX.
+ This expands to a constant expression if N and S are both constants.
By gnulib convention, SIZE_MAX represents overflow in size
- calculations, so the conservative dividend to use here is
- SIZE_MAX - 1, since SIZE_MAX might represent an overflowed value.
- However, malloc (SIZE_MAX) fails on all known hosts where
- sizeof (ptrdiff_t) <= sizeof (size_t), so do not bother to test for
- exactly-SIZE_MAX allocations on such hosts; this avoids a test and
- branch when S is known to be 1. */
+ calculations, so the conservative size_t-based dividend to use here
+ is SIZE_MAX - 1. */
+#define __xalloc_oversized(n, s) \
+ ((size_t) (PTRDIFF_MAX < SIZE_MAX ? PTRDIFF_MAX : SIZE_MAX - 1) / (s) < (n))
+
+#if PTRDIFF_MAX < SIZE_MAX
+typedef ptrdiff_t __xalloc_count_type;
+#else
+typedef size_t __xalloc_count_type;
+#endif
+
+/* Return 1 if an array of N objects, each of size S, cannot exist
+ reliably due to size or ptrdiff_t arithmetic overflow. S must be
+ positive and N must be nonnegative. This is a macro, not a
+ function, so that it works correctly even when SIZE_MAX < N. */
+
+#if 7 <= __GNUC__ || __has_builtin (__builtin_add_overflow_p)
# define xalloc_oversized(n, s) \
- ((size_t) (sizeof (ptrdiff_t) <= sizeof (size_t) ? -1 : -2) / (s) < (n))
+ __builtin_mul_overflow_p (n, s, (__xalloc_count_type) 1)
+#elif ((5 <= __GNUC__ \
+ || (__has_builtin (__builtin_mul_overflow) \
+ && __has_builtin (__builtin_constant_p))) \
+ && !__STRICT_ANSI__)
+# define xalloc_oversized(n, s) \
+ (__builtin_constant_p (n) && __builtin_constant_p (s) \
+ ? __xalloc_oversized (n, s) \
+ : ({ __xalloc_count_type __xalloc_count; \
+ __builtin_mul_overflow (n, s, &__xalloc_count); }))
+
+/* Other compilers use integer division; this may be slower but is
+ more portable. */
+#else
+# define xalloc_oversized(n, s) __xalloc_oversized (n, s)
+#endif
#endif /* !XALLOC_OVERSIZED_H_ */
diff --git a/lib/xalloc.h b/lib/xalloc.h
index acf30a1..3aad4e3 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-2012 Free Software Foundation, Inc.
+ Copyright (C) 1990-2000, 2003-2004, 2006-2016 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -19,9 +19,13 @@
#define XALLOC_H_
#include <stddef.h>
+#include <stdint.h>
#include "xalloc-oversized.h"
+#ifndef _GL_INLINE_HEADER_BEGIN
+ #error "Please include config.h first."
+#endif
_GL_INLINE_HEADER_BEGIN
#ifndef XALLOC_INLINE
# define XALLOC_INLINE _GL_INLINE
@@ -38,7 +42,8 @@ extern "C" {
# define _GL_ATTRIBUTE_MALLOC
#endif
-#if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3)
+#if ! defined __clang__ && \
+ (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3))
# define _GL_ATTRIBUTE_ALLOC_SIZE(args) __attribute__ ((__alloc_size__ args))
#else
# define _GL_ATTRIBUTE_ALLOC_SIZE(args)
@@ -61,7 +66,7 @@ void *xrealloc (void *p, size_t s)
_GL_ATTRIBUTE_ALLOC_SIZE ((2));
void *x2realloc (void *p, size_t *pn);
void *xmemdup (void const *p, size_t s)
- _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_ALLOC_SIZE ((2));
+ _GL_ATTRIBUTE_ALLOC_SIZE ((2));
char *xstrdup (char const *str)
_GL_ATTRIBUTE_MALLOC;
@@ -119,10 +124,9 @@ xnrealloc (void *p, size_t n, size_t s)
/* If P is null, allocate a block of at least *PN such objects;
otherwise, reallocate P so that it contains more than *PN objects
- each of S bytes. *PN must be nonzero unless P is null, and S must
- be nonzero. Set *PN to the new number of objects, and return the
- pointer to the new block. *PN is never set to zero, and the
- returned pointer is never null.
+ each of S bytes. S must be nonzero. Set *PN to the new number of
+ objects, and return the pointer to the new block. *PN is never set
+ to zero, and the returned pointer is never null.
Repeated reallocations are guaranteed to make progress, either by
allocating an initial block with a nonzero size, or by allocating a
@@ -193,13 +197,14 @@ x2nrealloc (void *p, size_t *pn, size_t s)
}
else
{
- /* Set N = ceil (1.5 * N) so that progress is made if N == 1.
- Check for overflow, so that N * S stays in size_t range.
- The check is slightly conservative, but an exact check isn't
- worth the trouble. */
- if ((size_t) -1 / 3 * 2 / s <= n)
+ /* Set N = floor (1.5 * N) + 1 so that progress is made even if N == 0.
+ Check for overflow, so that N * S stays in both ptrdiff_t and
+ size_t range. The check may be slightly conservative, but an
+ exact check isn't worth the trouble. */
+ if ((PTRDIFF_MAX < SIZE_MAX ? PTRDIFF_MAX : SIZE_MAX) / 3 * 2 / s
+ <= n)
xalloc_die ();
- n += (n + 1) / 2;
+ n += n / 2 + 1;
}
*pn = n;
@@ -256,5 +261,6 @@ xmemdup (T const *p, size_t s)
#endif
+_GL_INLINE_HEADER_END
#endif /* !XALLOC_H_ */
diff --git a/lib/xmalloc.c b/lib/xmalloc.c
index 9755985..7d9c077 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-2012 Free Software Foundation, Inc.
+ Copyright (C) 1990-2000, 2002-2006, 2008-2016 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -93,11 +93,11 @@ void *
xcalloc (size_t n, size_t s)
{
void *p;
- /* Test for overflow, since some calloc implementations don't have
- proper overflow checks. But omit overflow and size-zero tests if
- HAVE_GNU_CALLOC, since GNU calloc catches overflow and never
- returns NULL if successful. */
- if ((! HAVE_GNU_CALLOC && xalloc_oversized (n, s))
+ /* Test for overflow, since objects with size greater than
+ PTRDIFF_MAX cause pointer subtraction to go awry. Omit size-zero
+ tests if HAVE_GNU_CALLOC, since GNU calloc never returns NULL if
+ successful. */
+ if (xalloc_oversized (n, s)
|| (! (p = calloc (n, s)) && (HAVE_GNU_CALLOC || n != 0)))
xalloc_die ();
return p;
diff --git a/m4/00gnulib.m4 b/m4/00gnulib.m4
index d978cb8..bb37e32 100644
--- a/m4/00gnulib.m4
+++ b/m4/00gnulib.m4
@@ -1,12 +1,28 @@
-# 00gnulib.m4 serial 2
-dnl Copyright (C) 2009-2012 Free Software Foundation, Inc.
+# 00gnulib.m4 serial 3
+dnl Copyright (C) 2009-2016 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 This file must be named something that sorts before all other
dnl gnulib-provided .m4 files. It is needed until such time as we can
-dnl assume Autoconf 2.64, with its improved AC_DEFUN_ONCE semantics.
+dnl assume Autoconf 2.64, with its improved AC_DEFUN_ONCE and
+dnl m4_divert semantics.
+
+# Until autoconf 2.63, handling of the diversion stack required m4_init
+# to be called first; but this does not happen with aclocal. Wrapping
+# the entire execution in another layer of the diversion stack fixes this.
+# Worse, prior to autoconf 2.62, m4_wrap depended on the underlying m4
+# for whether it was FIFO or LIFO; in order to properly balance with
+# m4_init, we need to undo our push just before anything wrapped within
+# the m4_init body. The way to ensure this is to wrap both sides of
+# m4_init with a one-shot macro that does the pop at the right time.
+m4_ifndef([_m4_divert_diversion],
+[m4_divert_push([KILL])
+m4_define([gl_divert_fixup], [m4_divert_pop()m4_define([$0])])
+m4_define([m4_init],
+ [gl_divert_fixup()]m4_defn([m4_init])[gl_divert_fixup()])])
+
# AC_DEFUN_ONCE([NAME], VALUE)
# ----------------------------
diff --git a/m4/absolute-header.m4 b/m4/absolute-header.m4
new file mode 100644
index 0000000..7ffc38d
--- /dev/null
+++ b/m4/absolute-header.m4
@@ -0,0 +1,102 @@
+# absolute-header.m4 serial 16
+dnl Copyright (C) 2006-2016 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 Derek Price.
+
+# gl_ABSOLUTE_HEADER(HEADER1 HEADER2 ...)
+# ---------------------------------------
+# Find the absolute name of a header file, testing first if the header exists.
+# If the header were sys/inttypes.h, this macro would define
+# ABSOLUTE_SYS_INTTYPES_H to the '""' quoted absolute name of sys/inttypes.h
+# in config.h
+# (e.g. '#define ABSOLUTE_SYS_INTTYPES_H "///usr/include/sys/inttypes.h"').
+# The three "///" are to pacify Sun C 5.8, which otherwise would say
+# "warning: #include of /usr/include/... may be non-portable".
+# Use '""', not '<>', so that the /// cannot be confused with a C99 comment.
+# Note: This macro assumes that the header file is not empty after
+# preprocessing, i.e. it does not only define preprocessor macros but also
+# provides some type/enum definitions or function/variable declarations.
+AC_DEFUN([gl_ABSOLUTE_HEADER],
+[AC_REQUIRE([AC_CANONICAL_HOST])
+AC_LANG_PREPROC_REQUIRE()dnl
+dnl FIXME: gl_absolute_header and ac_header_exists must be used unquoted
+dnl until we can assume autoconf 2.64 or newer.
+m4_foreach_w([gl_HEADER_NAME], [$1],
+ [AS_VAR_PUSHDEF([gl_absolute_header],
+ [gl_cv_absolute_]m4_defn([gl_HEADER_NAME]))dnl
+ AC_CACHE_CHECK([absolute name of <]m4_defn([gl_HEADER_NAME])[>],
+ m4_defn([gl_absolute_header]),
+ [AS_VAR_PUSHDEF([ac_header_exists],
+ [ac_cv_header_]m4_defn([gl_HEADER_NAME]))dnl
+ AC_CHECK_HEADERS_ONCE(m4_defn([gl_HEADER_NAME]))dnl
+ if test AS_VAR_GET(ac_header_exists) = yes; then
+ gl_ABSOLUTE_HEADER_ONE(m4_defn([gl_HEADER_NAME]))
+ fi
+ AS_VAR_POPDEF([ac_header_exists])dnl
+ ])dnl
+ AC_DEFINE_UNQUOTED(AS_TR_CPP([ABSOLUTE_]m4_defn([gl_HEADER_NAME])),
+ ["AS_VAR_GET(gl_absolute_header)"],
+ [Define this to an absolute name of <]m4_defn([gl_HEADER_NAME])[>.])
+ AS_VAR_POPDEF([gl_absolute_header])dnl
+])dnl
+])# gl_ABSOLUTE_HEADER
+
+# gl_ABSOLUTE_HEADER_ONE(HEADER)
+# ------------------------------
+# Like gl_ABSOLUTE_HEADER, except that:
+# - it assumes that the header exists,
+# - it uses the current CPPFLAGS,
+# - it does not cache the result,
+# - it is silent.
+AC_DEFUN([gl_ABSOLUTE_HEADER_ONE],
+[
+ AC_REQUIRE([AC_CANONICAL_HOST])
+ AC_LANG_CONFTEST([AC_LANG_SOURCE([[#include <]]m4_dquote([$1])[[>]])])
+ dnl AIX "xlc -E" and "cc -E" omit #line directives for header files
+ dnl that contain only a #include of other header files and no
+ dnl non-comment tokens of their own. This leads to a failure to
+ dnl detect the absolute name of <dirent.h>, <signal.h>, <poll.h>
+ dnl and others. The workaround is to force preservation of comments
+ dnl through option -C. This ensures all necessary #line directives
+ dnl are present. GCC supports option -C as well.
+ case "$host_os" in
+ aix*) gl_absname_cpp="$ac_cpp -C" ;;
+ *) gl_absname_cpp="$ac_cpp" ;;
+ esac
+changequote(,)
+ case "$host_os" in
+ mingw*)
+ dnl For the sake of native Windows compilers (excluding gcc),
+ dnl treat backslash as a directory separator, like /.
+ dnl Actually, these compilers use a double-backslash as
+ dnl directory separator, inside the
+ dnl # line "filename"
+ dnl directives.
+ gl_dirsep_regex='[/\\]'
+ ;;
+ *)
+ gl_dirsep_regex='\/'
+ ;;
+ esac
+ dnl A sed expression that turns a string into a basic regular
+ dnl expression, for use within "/.../".
+ gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
+ gl_header_literal_regex=`echo '$1' \
+ | 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
+ }'
+changequote([,])
+ dnl eval is necessary to expand gl_absname_cpp.
+ dnl Ultrix and Pyramid sh refuse to redirect output of eval,
+ dnl so use subshell.
+ AS_VAR_SET([gl_cv_absolute_]AS_TR_SH([[$1]]),
+[`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&AS_MESSAGE_LOG_FD |
+ sed -n "$gl_absolute_header_sed"`])
+])
diff --git a/m4/acl.m4 b/m4/acl.m4
index 2883621..ce0fe6b 100644
--- a/m4/acl.m4
+++ b/m4/acl.m4
@@ -1,29 +1,36 @@
# acl.m4 - check for access control list (ACL) primitives
-# serial 15
+# serial 22
-# Copyright (C) 2002, 2004-2012 Free Software Foundation, Inc.
+# Copyright (C) 2002, 2004-2016 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 and Jim Meyering.
-AC_DEFUN([gl_FUNC_ACL],
+AC_DEFUN([gl_FUNC_ACL_ARG],
[
+ gl_need_lib_has_acl=
AC_ARG_ENABLE([acl],
AS_HELP_STRING([--disable-acl], [do not support ACLs]),
, [enable_acl=auto])
+])
+
+AC_DEFUN([gl_FUNC_ACL],
+[
+ AC_REQUIRE([gl_FUNC_ACL_ARG])
+ AC_CHECK_FUNCS_ONCE([fchmod])
LIB_ACL=
use_acl=0
- if test "x$enable_acl" != "xno"; then
+ if test "$enable_acl" != no; then
dnl On all platforms, the ACL related API is declared in <sys/acl.h>.
AC_CHECK_HEADERS([sys/acl.h])
if test $ac_cv_header_sys_acl_h = yes; then
ac_save_LIBS=$LIBS
- dnl Test for POSIX-draft-like API (Linux, FreeBSD, Mac OS X, IRIX, Tru64).
- dnl -lacl is needed on Linux, -lpacl is needed on OSF/1.
+ dnl Test for POSIX-draft-like API (GNU/Linux, FreeBSD, Mac OS X,
+ dnl IRIX, Tru64). -lacl is needed on GNU/Linux, -lpacl on OSF/1.
if test $use_acl = 0; then
AC_SEARCH_LIBS([acl_get_file], [acl pacl],
[if test "$ac_cv_search_acl_get_file" != "none required"; then
@@ -39,7 +46,7 @@ AC_DEFUN([gl_FUNC_ACL],
# If the acl_get_file bug is detected, don't enable the ACL support.
gl_ACL_GET_FILE([use_acl=1], [])
if test $use_acl = 1; then
- dnl On Linux, additional API is declared in <acl/libacl.h>.
+ dnl On GNU/Linux, an additional API is declared in <acl/libacl.h>.
AC_CHECK_HEADERS([acl/libacl.h])
AC_REPLACE_FUNCS([acl_entries])
AC_CACHE_CHECK([for ACL_FIRST_ENTRY],
@@ -123,13 +130,15 @@ int type = ACL_TYPE_EXTENDED;]])],
LIBS=$ac_save_LIBS
fi
- if test "x$enable_acl$use_acl" = "xyes0"; then
+
+ if test "$enable_acl$use_acl" = yes0; then
AC_MSG_ERROR([ACLs enabled but support not detected])
- elif test "x$enable_acl$use_acl" = "xauto0"; then
+ elif test "$enable_acl$use_acl" = auto0; then
AC_MSG_WARN([libacl development library was not found or not usable.])
AC_MSG_WARN([AC_PACKAGE_NAME will be built without ACL support.])
fi
fi
+ test $gl_need_lib_has_acl && LIB_HAS_ACL=$LIB_ACL
AC_SUBST([LIB_ACL])
AC_DEFINE_UNQUOTED([USE_ACL], [$use_acl],
[Define to nonzero if you want access control list support.])
@@ -138,27 +147,64 @@ int type = ACL_TYPE_EXTENDED;]])],
])
# gl_ACL_GET_FILE(IF-WORKS, IF-NOT)
-# -------------------------------------
+# ---------------------------------
# If 'acl_get_file' works (does not have a particular bug),
# run IF-WORKS, otherwise, IF-NOT.
-# This tests for a Darwin 8.7.0 bug, whereby acl_get_file returns NULL,
-# but sets errno = ENOENT for an existing file or directory.
+# When building natively, test for a Darwin 8.7.0 bug, whereby acl_get_file
+# returns NULL, but sets errno = ENOENT for an existing file or directory.
+# When cross-compiling, assume that this old bug no longer applies.
AC_DEFUN([gl_ACL_GET_FILE],
[
AC_CACHE_CHECK([for working acl_get_file], [gl_cv_func_working_acl_get_file],
- [AC_RUN_IFELSE(
+ [gl_cv_func_working_acl_get_file=no
+ AC_LINK_IFELSE(
[AC_LANG_PROGRAM(
[[#include <sys/types.h>
#include <sys/acl.h>
#include <errno.h>
]],
- [[if (!acl_get_file (".", ACL_TYPE_ACCESS) && errno == ENOENT)
- return 1;
- return 0;
+ [[acl_t acl = acl_get_file (".", ACL_TYPE_ACCESS);
+ return acl ? acl_free (acl) != 0 : errno == ENOENT;
]])],
- [gl_cv_func_working_acl_get_file=yes],
- [gl_cv_func_working_acl_get_file=no],
- [gl_cv_func_working_acl_get_file=cross-compiling])])
+ [if test $cross_compiling = yes; then
+ gl_cv_func_working_acl_get_file="guessing yes"
+ elif ./conftest$ac_exeext; then
+ gl_cv_func_working_acl_get_file=yes
+ fi])])
+ AS_IF([test "$gl_cv_func_working_acl_get_file" != no], [$1], [$2])
+])
- AS_IF([test $gl_cv_func_working_acl_get_file = yes], [$1], [$2])
+# On GNU/Linux, testing if a file has an acl can be done with the getxattr
+# syscall which doesn't require linking against additional libraries.
+AC_DEFUN([gl_FILE_HAS_ACL],
+[
+ AC_REQUIRE([gl_FUNC_ACL_ARG])
+ if test "$enable_acl" != no; then
+ AC_CACHE_CHECK([for getxattr with XATTR_NAME_POSIX_ACL macros],
+ [gl_cv_getxattr_with_posix_acls],
+ [gl_cv_getxattr_with_posix_acls=no
+ AC_LINK_IFELSE(
+ [AC_LANG_PROGRAM(
+ [[#include <sys/types.h>
+ #include <sys/xattr.h>
+ #include <linux/xattr.h>
+ ]],
+ [[ssize_t a = getxattr (".", XATTR_NAME_POSIX_ACL_ACCESS, 0, 0);
+ ssize_t b = getxattr (".", XATTR_NAME_POSIX_ACL_DEFAULT, 0, 0);
+ return a < 0 || b < 0;
+ ]])],
+ [gl_cv_getxattr_with_posix_acls=yes])])
+ fi
+ if test "$gl_cv_getxattr_with_posix_acls" = yes; then
+ LIB_HAS_ACL=
+ AC_DEFINE([GETXATTR_WITH_POSIX_ACLS], 1,
+ [Define to 1 if getxattr works with XATTR_NAME_POSIX_ACL_ACCESS
+ and XATTR_NAME_POSIX_ACL_DEFAULT.])
+ else
+ dnl Set gl_need_lib_has_acl to a nonempty value, so that any
+ dnl later gl_FUNC_ACL call will set LIB_HAS_ACL=$LIB_ACL.
+ gl_need_lib_has_acl=1
+ LIB_HAS_ACL=$LIB_ACL
+ fi
+ AC_SUBST([LIB_HAS_ACL])
])
diff --git a/m4/alloca.m4 b/m4/alloca.m4
index 656924b..2382ff1 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-2012 Free Software Foundation,
+dnl Copyright (C) 2002-2004, 2006-2007, 2009-2016 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/assert.m4 b/m4/assert.m4
new file mode 100644
index 0000000..054b163
--- /dev/null
+++ b/m4/assert.m4
@@ -0,0 +1,24 @@
+#serial 7
+
+# Copyright (C) 1998-1999, 2001, 2004, 2008-2016 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 based on code from Eleftherios Gkioulekas
+dnl Autoconf 2.60 provides AC_HEADER_ASSERT for the same purpose, but
+dnl it has broken semantics for --enable-assert until 2.64.
+AC_DEFUN([gl_ASSERT],
+[
+ AC_MSG_CHECKING([whether to enable assertions])
+ AC_ARG_ENABLE([assert],
+ [AS_HELP_STRING([--disable-assert], [turn off assertions])],
+ [AS_IF([test "x$enableval" = xno],
+ [AC_DEFINE([NDEBUG], [1],
+ [Define to 1 if assertions should be disabled.])],
+ [test "x$enableval" != xyes],
+ [AC_MSG_WARN([invalid argument supplied to --enable-assert])
+ enable_assert=yes])],
+ [enable_assert=yes])
+ AC_MSG_RESULT([$enable_assert])
+])
diff --git a/m4/btowc.m4 b/m4/btowc.m4
index e565321..47e8fd8 100644
--- a/m4/btowc.m4
+++ b/m4/btowc.m4
@@ -1,5 +1,5 @@
# btowc.m4 serial 10
-dnl Copyright (C) 2008-2012 Free Software Foundation, Inc.
+dnl Copyright (C) 2008-2016 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/builtin-expect.m4 b/m4/builtin-expect.m4
new file mode 100644
index 0000000..e448066
--- /dev/null
+++ b/m4/builtin-expect.m4
@@ -0,0 +1,49 @@
+dnl Check for __builtin_expect.
+
+dnl Copyright 2016 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 Paul Eggert.
+
+AC_DEFUN([gl___BUILTIN_EXPECT],
+[
+ AC_CACHE_CHECK([for __builtin_expect],
+ [gl_cv___builtin_expect],
+ [AC_LINK_IFELSE(
+ [AC_LANG_SOURCE([[
+ int
+ main (int argc, char **argv)
+ {
+ argc = __builtin_expect (argc, 100);
+ return argv[argc != 100][0];
+ }]])],
+ [gl_cv___builtin_expect=yes],
+ [AC_LINK_IFELSE(
+ [AC_LANG_SOURCE([[
+ #include <builtins.h>
+ int
+ main (int argc, char **argv)
+ {
+ argc = __builtin_expect (argc, 100);
+ return argv[argc != 100][0];
+ }]])],
+ [gl_cv___builtin_expect="in <builtins.h>"],
+ [gl_cv___builtin_expect=no])])])
+ if test "$gl_cv___builtin_expect" = yes; then
+ AC_DEFINE([HAVE___BUILTIN_EXPECT], [1])
+ elif test "$gl_cv___builtin_expect" = "in <builtins.h>"; then
+ AC_DEFINE([HAVE___BUILTIN_EXPECT], [2])
+ fi
+ AH_VERBATIM([HAVE___BUILTIN_EXPECT],
+ [/* Define to 1 if the compiler supports __builtin_expect,
+ and to 2 if <builtins.h> does. */
+#undef HAVE___BUILTIN_EXPECT
+#ifndef HAVE___BUILTIN_EXPECT
+# define __builtin_expect(e, c) (e)
+#elif HAVE___BUILTIN_EXPECT == 2
+# include <builtins.h>
+#endif
+ ])
+])
diff --git a/m4/canonicalize.m4 b/m4/canonicalize.m4
index ea51ac4..cbbf3e2 100644
--- a/m4/canonicalize.m4
+++ b/m4/canonicalize.m4
@@ -1,6 +1,6 @@
-# canonicalize.m4 serial 26
+# canonicalize.m4 serial 28
-dnl Copyright (C) 2003-2007, 2009-2012 Free Software Foundation, Inc.
+dnl Copyright (C) 2003-2007, 2009-2016 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
@@ -83,22 +83,27 @@ AC_DEFUN([gl_FUNC_REALPATH_WORKS],
char *name = realpath ("conftest.a", NULL);
if (!(name && *name == '/'))
result |= 1;
+ free (name);
}
{
char *name = realpath ("conftest.b/../conftest.a", NULL);
if (name != NULL)
result |= 2;
+ free (name);
}
{
char *name = realpath ("conftest.a/", NULL);
if (name != NULL)
result |= 4;
+ free (name);
}
{
char *name1 = realpath (".", NULL);
char *name2 = realpath ("conftest.d//./..", NULL);
- if (strcmp (name1, name2) != 0)
+ if (! name1 || ! name2 || strcmp (name1, name2))
result |= 8;
+ free (name1);
+ free (name2);
}
return result;
]])
diff --git a/m4/close-stream.m4 b/m4/close-stream.m4
new file mode 100644
index 0000000..ddda027
--- /dev/null
+++ b/m4/close-stream.m4
@@ -0,0 +1,11 @@
+#serial 4
+dnl Copyright (C) 2006-2007, 2009-2016 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 Prerequisites of lib/close-stream.c.
+AC_DEFUN([gl_CLOSE_STREAM],
+[
+ :
+])
diff --git a/m4/close.m4 b/m4/close.m4
new file mode 100644
index 0000000..310f076
--- /dev/null
+++ b/m4/close.m4
@@ -0,0 +1,33 @@
+# close.m4 serial 8
+dnl Copyright (C) 2008-2016 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_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_PREREQ_SYS_H_WINSOCK2], [
+ gl_PREREQ_SYS_H_WINSOCK2
+ if test $UNISTD_H_HAVE_WINSOCK2_H = 1; 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 close() function. So enable the support for sockets.
+ REPLACE_CLOSE=1
+ fi
+ ])
+ dnl Replace close() for supporting the gnulib-defined fchdir() function,
+ dnl to keep fchdir's bookkeeping up-to-date.
+ m4_ifdef([gl_FUNC_FCHDIR], [
+ if test $REPLACE_CLOSE = 0; then
+ gl_TEST_FCHDIR
+ if test $HAVE_FCHDIR = 0; then
+ REPLACE_CLOSE=1
+ fi
+ fi
+ ])
+])
diff --git a/m4/closedir.m4 b/m4/closedir.m4
new file mode 100644
index 0000000..0c9fd82
--- /dev/null
+++ b/m4/closedir.m4
@@ -0,0 +1,30 @@
+# closedir.m4 serial 5
+dnl Copyright (C) 2011-2016 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_CLOSEDIR],
+[
+ AC_REQUIRE([gl_DIRENT_H_DEFAULTS])
+
+ AC_CHECK_FUNCS([closedir])
+ if test $ac_cv_func_closedir = no; then
+ HAVE_CLOSEDIR=0
+ fi
+ dnl Replace closedir() 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
+ if test $HAVE_CLOSEDIR = 1; then
+ REPLACE_CLOSEDIR=1
+ fi
+ fi
+ ])
+ dnl Replace closedir() for supporting the gnulib-defined dirfd() function.
+ case $host_os,$HAVE_CLOSEDIR in
+ os2*,1)
+ REPLACE_CLOSEDIR=1;;
+ esac
+])
diff --git a/m4/closeout.m4 b/m4/closeout.m4
new file mode 100644
index 0000000..6f4dd43
--- /dev/null
+++ b/m4/closeout.m4
@@ -0,0 +1,12 @@
+# closeout.m4 serial 6
+dnl Copyright (C) 2002-2003, 2005-2006, 2009-2016 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,
+dnl with or without modifications, as long as this notice is preserved.
+
+dnl Prerequisites of lib/closeout.c.
+AC_DEFUN([gl_CLOSEOUT],
+[
+ :
+])
diff --git a/m4/codeset.m4 b/m4/codeset.m4
index cf53d24..bc98201 100644
--- a/m4/codeset.m4
+++ b/m4/codeset.m4
@@ -1,5 +1,6 @@
# codeset.m4 serial 5 (gettext-0.18.2)
-dnl Copyright (C) 2000-2002, 2006, 2008-2012 Free Software Foundation, Inc.
+dnl Copyright (C) 2000-2002, 2006, 2008-2014, 2016 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,
dnl with or without modifications, as long as this notice is preserved.
diff --git a/m4/configmake.m4 b/m4/configmake.m4
index 8c82371..80b9254 100644
--- a/m4/configmake.m4
+++ b/m4/configmake.m4
@@ -1,5 +1,5 @@
-# configmake.m4 serial 1
-dnl Copyright (C) 2010-2012 Free Software Foundation, Inc.
+# configmake.m4 serial 2
+dnl Copyright (C) 2010-2016 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,8 +7,9 @@ dnl with or without modifications, as long as this notice is preserved.
# gl_CONFIGMAKE_PREP
# ------------------
# Guarantee all of the standard directory variables, even when used with
-# autoconf 2.59 (datarootdir wasn't supported until 2.59c) or automake
-# 1.9.6 (pkglibexecdir wasn't supported until 1.10b.).
+# autoconf 2.59 (datarootdir wasn't supported until 2.59c, and runstatedir
+# in 2.70) or automake 1.9.6 (pkglibexecdir wasn't supported until 1.10b,
+# and runstatedir in 1.14.1).
AC_DEFUN([gl_CONFIGMAKE_PREP],
[
dnl Technically, datadir should default to datarootdir. But if
@@ -43,6 +44,10 @@ AC_DEFUN([gl_CONFIGMAKE_PREP],
if test "x$localedir" = x; then
AC_SUBST([localedir], ['${datarootdir}/locale'])
fi
+ dnl Added in autoconf 2.70
+ if test "x$runstatedir" = x; then
+ AC_SUBST([runstatedir], ['${localstatedir}/run'])
+ fi
dnl Automake 1.9.6 only lacks pkglibexecdir; and since 1.11 merely
dnl provides it without AC_SUBST, this blind use of AC_SUBST is safe.
diff --git a/m4/ctype.m4 b/m4/ctype.m4
new file mode 100644
index 0000000..a2165aa
--- /dev/null
+++ b/m4/ctype.m4
@@ -0,0 +1,32 @@
+# ctype_h.m4 serial 6
+dnl Copyright (C) 2009-2016 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_CTYPE_H],
+[
+ AC_REQUIRE([gl_CTYPE_H_DEFAULTS])
+
+ dnl <ctype.h> is always overridden, because of GNULIB_POSIXCHECK.
+ gl_NEXT_HEADERS([ctype.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 <ctype.h>
+ ]], [isblank])
+])
+
+AC_DEFUN([gl_CTYPE_MODULE_INDICATOR],
+[
+ dnl Use AC_REQUIRE here, so that the default settings are expanded once only.
+ AC_REQUIRE([gl_CTYPE_H_DEFAULTS])
+ gl_MODULE_INDICATOR_SET_VARIABLE([$1])
+])
+
+AC_DEFUN([gl_CTYPE_H_DEFAULTS],
+[
+ GNULIB_ISBLANK=0; AC_SUBST([GNULIB_ISBLANK])
+ dnl Assume proper GNU behavior unless another module says otherwise.
+ HAVE_ISBLANK=1; AC_SUBST([HAVE_ISBLANK])
+])
diff --git a/m4/dirent_h.m4 b/m4/dirent_h.m4
new file mode 100644
index 0000000..68836a4
--- /dev/null
+++ b/m4/dirent_h.m4
@@ -0,0 +1,64 @@
+# dirent_h.m4 serial 16
+dnl Copyright (C) 2008-2016 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_DIRENT_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_DIRENT_H_DEFAULTS])
+
+ dnl <dirent.h> is always overridden, because of GNULIB_POSIXCHECK.
+ gl_CHECK_NEXT_HEADERS([dirent.h])
+ if test $ac_cv_header_dirent_h = yes; then
+ HAVE_DIRENT_H=1
+ else
+ HAVE_DIRENT_H=0
+ fi
+ AC_SUBST([HAVE_DIRENT_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 <dirent.h>
+ ]], [alphasort closedir dirfd fdopendir opendir readdir rewinddir scandir])
+])
+
+AC_DEFUN([gl_DIRENT_MODULE_INDICATOR],
+[
+ dnl Use AC_REQUIRE here, so that the default settings are expanded once only.
+ AC_REQUIRE([gl_DIRENT_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_DIRENT_H_DEFAULTS],
+[
+ AC_REQUIRE([gl_UNISTD_H_DEFAULTS]) dnl for REPLACE_FCHDIR
+ GNULIB_OPENDIR=0; AC_SUBST([GNULIB_OPENDIR])
+ GNULIB_READDIR=0; AC_SUBST([GNULIB_READDIR])
+ GNULIB_REWINDDIR=0; AC_SUBST([GNULIB_REWINDDIR])
+ GNULIB_CLOSEDIR=0; AC_SUBST([GNULIB_CLOSEDIR])
+ GNULIB_DIRFD=0; AC_SUBST([GNULIB_DIRFD])
+ GNULIB_FDOPENDIR=0; AC_SUBST([GNULIB_FDOPENDIR])
+ GNULIB_SCANDIR=0; AC_SUBST([GNULIB_SCANDIR])
+ GNULIB_ALPHASORT=0; AC_SUBST([GNULIB_ALPHASORT])
+ dnl Assume proper GNU behavior unless another module says otherwise.
+ HAVE_OPENDIR=1; AC_SUBST([HAVE_OPENDIR])
+ HAVE_READDIR=1; AC_SUBST([HAVE_READDIR])
+ HAVE_REWINDDIR=1; AC_SUBST([HAVE_REWINDDIR])
+ HAVE_CLOSEDIR=1; AC_SUBST([HAVE_CLOSEDIR])
+ HAVE_DECL_DIRFD=1; AC_SUBST([HAVE_DECL_DIRFD])
+ HAVE_DECL_FDOPENDIR=1;AC_SUBST([HAVE_DECL_FDOPENDIR])
+ HAVE_FDOPENDIR=1; AC_SUBST([HAVE_FDOPENDIR])
+ HAVE_SCANDIR=1; AC_SUBST([HAVE_SCANDIR])
+ HAVE_ALPHASORT=1; AC_SUBST([HAVE_ALPHASORT])
+ REPLACE_OPENDIR=0; AC_SUBST([REPLACE_OPENDIR])
+ REPLACE_CLOSEDIR=0; AC_SUBST([REPLACE_CLOSEDIR])
+ REPLACE_DIRFD=0; AC_SUBST([REPLACE_DIRFD])
+ REPLACE_FDOPENDIR=0; AC_SUBST([REPLACE_FDOPENDIR])
+])
diff --git a/m4/dirfd.m4 b/m4/dirfd.m4
new file mode 100644
index 0000000..1d7cb08
--- /dev/null
+++ b/m4/dirfd.m4
@@ -0,0 +1,85 @@
+# serial 24 -*- Autoconf -*-
+
+dnl Find out how to get the file descriptor associated with an open DIR*.
+
+# Copyright (C) 2001-2006, 2008-2016 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 Jim Meyering
+
+AC_DEFUN([gl_FUNC_DIRFD],
+[
+ AC_REQUIRE([gl_DIRENT_H_DEFAULTS])
+
+ dnl Persuade glibc <dirent.h> to declare dirfd().
+ AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS])
+
+ AC_CHECK_FUNCS([dirfd])
+ AC_CHECK_DECLS([dirfd], , ,
+ [[#include <sys/types.h>
+ #include <dirent.h>]])
+ if test $ac_cv_have_decl_dirfd = no; then
+ HAVE_DECL_DIRFD=0
+ fi
+
+ AC_CACHE_CHECK([whether dirfd is a 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)])
+
+ # Use the replacement if we have no function or macro with that name,
+ # or if OS/2 kLIBC whose dirfd() does not work.
+ # Replace only if the system declares dirfd already.
+ case $ac_cv_func_dirfd,$gl_cv_func_dirfd_macro,$host_os,$ac_cv_have_decl_dirfd in
+ no,no,*,yes | *,*,os2*,yes)
+ REPLACE_DIRFD=1
+ AC_DEFINE([REPLACE_DIRFD], [1],
+ [Define to 1 if gnulib's dirfd() replacement is used.]);;
+ esac
+])
+
+dnl Prerequisites of lib/dirfd.c.
+AC_DEFUN([gl_PREREQ_DIRFD],
+[
+ AC_CACHE_CHECK([how to get the file descriptor associated with an open DIR*],
+ [gl_cv_sys_dir_fd_member_name],
+ [
+ dirfd_save_CFLAGS=$CFLAGS
+ for ac_expr in d_fd dd_fd; do
+
+ CFLAGS="$CFLAGS -DDIR_FD_MEMBER_NAME=$ac_expr"
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
+ #include <sys/types.h>
+ #include <dirent.h>]],
+ [[DIR *dir_p = opendir("."); (void) dir_p->DIR_FD_MEMBER_NAME;]])],
+ [dir_fd_found=yes]
+ )
+ CFLAGS=$dirfd_save_CFLAGS
+ test "$dir_fd_found" = yes && break
+ done
+ test "$dir_fd_found" = yes || ac_expr=no_such_member
+
+ gl_cv_sys_dir_fd_member_name=$ac_expr
+ ]
+ )
+ if test $gl_cv_sys_dir_fd_member_name != no_such_member; then
+ AC_DEFINE_UNQUOTED([DIR_FD_MEMBER_NAME],
+ [$gl_cv_sys_dir_fd_member_name],
+ [the name of the file descriptor member of DIR])
+ fi
+ AH_VERBATIM([DIR_TO_FD],
+ [#ifdef DIR_FD_MEMBER_NAME
+# define DIR_TO_FD(Dir_p) ((Dir_p)->DIR_FD_MEMBER_NAME)
+#else
+# define DIR_TO_FD(Dir_p) -1
+#endif
+])
+])
diff --git a/m4/dirname.m4 b/m4/dirname.m4
index 65639ec..6f8bec3 100644
--- a/m4/dirname.m4
+++ b/m4/dirname.m4
@@ -1,5 +1,5 @@
#serial 10 -*- autoconf -*-
-dnl Copyright (C) 2002-2006, 2009-2012 Free Software Foundation, Inc.
+dnl Copyright (C) 2002-2006, 2009-2016 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 1e03751..dfd3921 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-2012 Free Software Foundation, Inc.
+dnl Copyright (C) 2006, 2008-2016 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
new file mode 100644
index 0000000..5b68312
--- /dev/null
+++ b/m4/dup2.m4
@@ -0,0 +1,117 @@
+#serial 25
+dnl Copyright (C) 2002, 2005, 2007, 2009-2016 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_DUP2],
+[
+ AC_REQUIRE([gl_UNISTD_H_DEFAULTS])
+ AC_REQUIRE([AC_CANONICAL_HOST])
+ m4_ifdef([gl_FUNC_DUP2_OBSOLETE], [
+ AC_CHECK_FUNCS_ONCE([dup2])
+ if test $ac_cv_func_dup2 = no; then
+ HAVE_DUP2=0
+ fi
+ ], [
+ AC_DEFINE([HAVE_DUP2], [1], [Define to 1 if you have the 'dup2' function.])
+ ])
+ if test $HAVE_DUP2 = 1; then
+ AC_CACHE_CHECK([whether dup2 works], [gl_cv_func_dup2_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;
+ #ifdef FD_CLOEXEC
+ if (fcntl (1, F_SETFD, FD_CLOEXEC) == -1)
+ result |= 1;
+ #endif
+ if (dup2 (1, 1) != 1)
+ result |= 2;
+ #ifdef FD_CLOEXEC
+ if (fcntl (1, F_GETFD) != FD_CLOEXEC)
+ result |= 4;
+ #endif
+ close (0);
+ if (dup2 (0, 0) != -1)
+ result |= 8;
+ /* Many gnulib modules require POSIX conformance of EBADF. */
+ if (dup2 (2, bad_fd) == -1 && errno != EBADF)
+ result |= 16;
+ /* Flush out some cygwin core dumps. */
+ if (dup2 (2, -1) != -1 || errno != EBADF)
+ result |= 32;
+ dup2 (2, 255);
+ dup2 (2, 256);
+ /* On OS/2 kLIBC, dup2() does not work on a directory fd. */
+ {
+ int fd = open (".", O_RDONLY);
+ if (fd == -1)
+ result |= 64;
+ else if (dup2 (fd, fd + 1) == -1)
+ result |= 128;
+
+ close (fd);
+ }
+ return result;]])
+ ],
+ [gl_cv_func_dup2_works=yes], [gl_cv_func_dup2_works=no],
+ [case "$host_os" in
+ mingw*) # on this platform, dup2 always returns 0 for success
+ gl_cv_func_dup2_works="guessing no" ;;
+ cygwin*) # on cygwin 1.5.x, dup2(1,1) returns 0
+ gl_cv_func_dup2_works="guessing no" ;;
+ aix* | freebsd*)
+ # on AIX 7.1 and FreeBSD 6.1, dup2 (1,toobig) gives EMFILE,
+ # not EBADF.
+ gl_cv_func_dup2_works="guessing no" ;;
+ haiku*) # on Haiku alpha 2, dup2(1, 1) resets FD_CLOEXEC.
+ gl_cv_func_dup2_works="guessing no" ;;
+ *-android*) # implemented using dup3(), which fails if oldfd == newfd
+ gl_cv_func_dup2_works="guessing no" ;;
+ os2*) # on OS/2 kLIBC, dup2() does not work on a directory fd.
+ gl_cv_func_dup2_works="guessing no" ;;
+ *) gl_cv_func_dup2_works="guessing yes" ;;
+ esac])
+ ])
+ case "$gl_cv_func_dup2_works" in
+ *yes) ;;
+ *)
+ REPLACE_DUP2=1
+ AC_CHECK_FUNCS([setdtablesize])
+ ;;
+ esac
+ fi
+ dnl Replace dup2() 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
+ if test $HAVE_DUP2 = 1; then
+ REPLACE_DUP2=1
+ fi
+ fi
+ ])
+])
+
+# Prerequisites of lib/dup2.c.
+AC_DEFUN([gl_PREREQ_DUP2], [])
diff --git a/m4/eealloc.m4 b/m4/eealloc.m4
index 9e5df45..63d74de 100644
--- a/m4/eealloc.m4
+++ b/m4/eealloc.m4
@@ -1,5 +1,5 @@
# eealloc.m4 serial 3
-dnl Copyright (C) 2003, 2009-2012 Free Software Foundation, Inc.
+dnl Copyright (C) 2003, 2009-2016 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
new file mode 100644
index 0000000..9a0ea7e
--- /dev/null
+++ b/m4/environ.m4
@@ -0,0 +1,47 @@
+# environ.m4 serial 6
+dnl Copyright (C) 2001-2004, 2006-2016 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_ENVIRON],
+[
+ AC_REQUIRE([gl_UNISTD_H_DEFAULTS])
+ dnl Persuade glibc <unistd.h> to declare environ.
+ AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS])
+
+ AC_CHECK_HEADERS_ONCE([unistd.h])
+ gt_CHECK_VAR_DECL(
+ [#if HAVE_UNISTD_H
+ #include <unistd.h>
+ #endif
+ /* mingw, BeOS, Haiku declare environ in <stdlib.h>, not in <unistd.h>. */
+ #include <stdlib.h>
+ ],
+ [environ])
+ if test $gt_cv_var_environ_declaration != yes; then
+ HAVE_DECL_ENVIRON=0
+ fi
+])
+
+# Check if a variable is properly declared.
+# gt_CHECK_VAR_DECL(includes,variable)
+AC_DEFUN([gt_CHECK_VAR_DECL],
+[
+ define([gt_cv_var], [gt_cv_var_]$2[_declaration])
+ AC_MSG_CHECKING([if $2 is properly declared])
+ AC_CACHE_VAL([gt_cv_var], [
+ AC_COMPILE_IFELSE(
+ [AC_LANG_PROGRAM(
+ [[$1
+ extern struct { int foo; } $2;]],
+ [[$2.foo = 1;]])],
+ [gt_cv_var=no],
+ [gt_cv_var=yes])])
+ AC_MSG_RESULT([$gt_cv_var])
+ if test $gt_cv_var = yes; then
+ AC_DEFINE([HAVE_]m4_translit($2, [a-z], [A-Z])[_DECL], 1,
+ [Define if you have the declaration of $2.])
+ fi
+ undefine([gt_cv_var])
+])
diff --git a/m4/errno_h.m4 b/m4/errno_h.m4
index 4e33ba8..b111fce 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-2012 Free Software Foundation, Inc.
+dnl Copyright (C) 2004, 2006, 2008-2016 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 1190e32..f772bcf 100644
--- a/m4/error.m4
+++ b/m4/error.m4
@@ -1,6 +1,6 @@
#serial 14
-# Copyright (C) 1996-1998, 2001-2004, 2009-2012 Free Software Foundation, Inc.
+# Copyright (C) 1996-1998, 2001-2004, 2009-2016 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 6d17d8a..e114a6f 100644
--- a/m4/extensions.m4
+++ b/m4/extensions.m4
@@ -1,14 +1,14 @@
-# serial 12 -*- Autoconf -*-
+# serial 15 -*- Autoconf -*-
# Enable extensions on systems that normally disable them.
-# Copyright (C) 2003, 2006-2012 Free Software Foundation, Inc.
+# Copyright (C) 2003, 2006-2016 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.
-# This definition of AC_USE_SYSTEM_EXTENSIONS is stolen from CVS
+# This definition of AC_USE_SYSTEM_EXTENSIONS is stolen from git
# Autoconf. Perhaps we can remove this once we can assume Autoconf
-# 2.62 or later everywhere, but since CVS Autoconf mutates rapidly
+# 2.70 or later everywhere, but since Autoconf mutates rapidly
# enough in this area it's likely we'll need to redefine
# AC_USE_SYSTEM_EXTENSIONS for quite some time.
@@ -30,6 +30,7 @@
# ------------------------
# Enable extensions on systems that normally disable them,
# typically due to standards-conformance issues.
+#
# Remember that #undef in AH_VERBATIM gets replaced with #define by
# AC_DEFINE. The goal here is to define all known feature-enabling
# macros, then, if reports of conflicts are made, disable macros that
@@ -38,8 +39,6 @@ AC_DEFUN_ONCE([AC_USE_SYSTEM_EXTENSIONS],
[AC_BEFORE([$0], [AC_COMPILE_IFELSE])dnl
AC_BEFORE([$0], [AC_RUN_IFELSE])dnl
- AC_REQUIRE([AC_CANONICAL_HOST])
-
AC_CHECK_HEADER([minix/config.h], [MINIX=yes], [MINIX=])
if test "$MINIX" = yes; then
AC_DEFINE([_POSIX_SOURCE], [1],
@@ -50,24 +49,18 @@ AC_BEFORE([$0], [AC_RUN_IFELSE])dnl
except with this defined.])
AC_DEFINE([_MINIX], [1],
[Define to 1 if on MINIX.])
+ AC_DEFINE([_NETBSD_SOURCE], [1],
+ [Define to 1 to make NetBSD features available. MINIX 3 needs this.])
fi
- dnl HP-UX 11.11 defines mbstate_t only if _XOPEN_SOURCE is defined to 500,
- dnl regardless of whether the flags -Ae or _D_HPUX_SOURCE=1 are already
- dnl provided.
- case "$host_os" in
- hpux*)
- AC_DEFINE([_XOPEN_SOURCE], [500],
- [Define to 500 only on HP-UX.])
- ;;
- esac
-
- AH_VERBATIM([__EXTENSIONS__],
+dnl Use a different key than __EXTENSIONS__, as that name broke existing
+dnl configure.ac when using autoheader 2.62.
+ AH_VERBATIM([USE_SYSTEM_EXTENSIONS],
[/* Enable extensions on AIX 3, Interix. */
#ifndef _ALL_SOURCE
# undef _ALL_SOURCE
#endif
-/* Enable general extensions on Mac OS X. */
+/* Enable general extensions on macOS. */
#ifndef _DARWIN_C_SOURCE
# undef _DARWIN_C_SOURCE
#endif
@@ -79,10 +72,44 @@ AC_BEFORE([$0], [AC_RUN_IFELSE])dnl
#ifndef _POSIX_PTHREAD_SEMANTICS
# undef _POSIX_PTHREAD_SEMANTICS
#endif
+/* Enable extensions specified by ISO/IEC TS 18661-5:2014. */
+#ifndef __STDC_WANT_IEC_60559_ATTRIBS_EXT__
+# undef __STDC_WANT_IEC_60559_ATTRIBS_EXT__
+#endif
+/* Enable extensions specified by ISO/IEC TS 18661-1:2014. */
+#ifndef __STDC_WANT_IEC_60559_BFP_EXT__
+# undef __STDC_WANT_IEC_60559_BFP_EXT__
+#endif
+/* Enable extensions specified by ISO/IEC TS 18661-2:2015. */
+#ifndef __STDC_WANT_IEC_60559_DFP_EXT__
+# undef __STDC_WANT_IEC_60559_DFP_EXT__
+#endif
+/* Enable extensions specified by ISO/IEC TS 18661-4:2015. */
+#ifndef __STDC_WANT_IEC_60559_FUNCS_EXT__
+# undef __STDC_WANT_IEC_60559_FUNCS_EXT__
+#endif
+/* Enable extensions specified by ISO/IEC TS 18661-3:2015. */
+#ifndef __STDC_WANT_IEC_60559_TYPES_EXT__
+# undef __STDC_WANT_IEC_60559_TYPES_EXT__
+#endif
+/* Enable extensions specified by ISO/IEC TR 24731-2:2010. */
+#ifndef __STDC_WANT_LIB_EXT2__
+# undef __STDC_WANT_LIB_EXT2__
+#endif
+/* Enable extensions specified by ISO/IEC 24747:2009. */
+#ifndef __STDC_WANT_MATH_SPEC_FUNCS__
+# undef __STDC_WANT_MATH_SPEC_FUNCS__
+#endif
/* Enable extensions on HP NonStop. */
#ifndef _TANDEM_SOURCE
# undef _TANDEM_SOURCE
#endif
+/* Enable X/Open extensions if necessary. HP-UX 11.11 defines
+ mbstate_t only if _XOPEN_SOURCE is defined to 500, regardless of
+ whether compiling with -Ae or -D_HPUX_SOURCE=1. */
+#ifndef _XOPEN_SOURCE
+# undef _XOPEN_SOURCE
+#endif
/* Enable general extensions on Solaris. */
#ifndef __EXTENSIONS__
# undef __EXTENSIONS__
@@ -102,7 +129,30 @@ AC_BEFORE([$0], [AC_RUN_IFELSE])dnl
AC_DEFINE([_DARWIN_C_SOURCE])
AC_DEFINE([_GNU_SOURCE])
AC_DEFINE([_POSIX_PTHREAD_SEMANTICS])
+ AC_DEFINE([__STDC_WANT_IEC_60559_ATTRIBS_EXT__])
+ AC_DEFINE([__STDC_WANT_IEC_60559_BFP_EXT__])
+ AC_DEFINE([__STDC_WANT_IEC_60559_DFP_EXT__])
+ AC_DEFINE([__STDC_WANT_IEC_60559_FUNCS_EXT__])
+ AC_DEFINE([__STDC_WANT_IEC_60559_TYPES_EXT__])
+ AC_DEFINE([__STDC_WANT_LIB_EXT2__])
+ AC_DEFINE([__STDC_WANT_MATH_SPEC_FUNCS__])
AC_DEFINE([_TANDEM_SOURCE])
+ AC_CACHE_CHECK([whether _XOPEN_SOURCE should be defined],
+ [ac_cv_should_define__xopen_source],
+ [ac_cv_should_define__xopen_source=no
+ AC_COMPILE_IFELSE(
+ [AC_LANG_PROGRAM([[
+ #include <wchar.h>
+ mbstate_t x;]])],
+ [],
+ [AC_COMPILE_IFELSE(
+ [AC_LANG_PROGRAM([[
+ #define _XOPEN_SOURCE 500
+ #include <wchar.h>
+ mbstate_t x;]])],
+ [ac_cv_should_define__xopen_source=yes])])])
+ test $ac_cv_should_define__xopen_source = yes &&
+ AC_DEFINE([_XOPEN_SOURCE], [500])
])# AC_USE_SYSTEM_EXTENSIONS
# gl_USE_SYSTEM_EXTENSIONS
diff --git a/m4/extern-inline.m4 b/m4/extern-inline.m4
index 0a9fc9a..1e578f3 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 Free Software Foundation, Inc.
+dnl Copyright 2012-2016 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,40 +8,80 @@ dnl with or without modifications, as long as this notice is preserved.
AC_DEFUN([gl_EXTERN_INLINE],
[
AH_VERBATIM([extern_inline],
-[/* _GL_INLINE is a portable alternative to ISO C99 plain 'inline'.
- _GL_EXTERN_INLINE is a portable alternative to 'extern inline'.
- _GL_INLINE_HEADER_BEGIN contains useful stuff to put
- in an include file, before uses of _GL_INLINE.
- It suppresses GCC's bogus "no previous prototype for 'FOO'" diagnostic,
- when FOO is an inline function in the header; see
- <http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54113>.
- _GL_INLINE_HEADER_END contains useful stuff to put
- in the same include file, after uses of _GL_INLINE.
-
- Suppress the use of extern inline on Apple's platforms,
- as Libc-825.25 (2012-09-19) is incompatible with it; see
- <http://lists.gnu.org/archive/html/bug-gnulib/2012-12/msg00023.html>.
- Perhaps Apple will fix this some day. */
+[/* 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>.
+
+ 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
+ (void) { } inline void g (void) { f (); }', c99 incorrectly complains
+ 'reference to static identifier "f" in extern inline function'.
+ This bug was observed with Sun C 5.12 SunOS_i386 2011/11/16.
+
+ Suppress extern inline (with or without __attribute__ ((__gnu_inline__)))
+ on configurations that mistakenly use 'static inline' to implement
+ functions or macros in standard C headers like <ctype.h>. For example,
+ if isdigit is mistakenly implemented via a static inline function,
+ a program containing an extern inline function that calls isdigit
+ may not work since the C standard prohibits extern inline functions
+ 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
+
+ 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
+
+ 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>.
+ Assume DragonFly and FreeBSD will be similar. */
+#if (((defined __APPLE__ && defined __MACH__) \
+ || defined __DragonFly__ || defined __FreeBSD__) \
+ && (defined __header_inline \
+ ? (defined __cplusplus && defined __GNUC_STDC_INLINE__ \
+ && ! defined __clang__) \
+ : ((! defined _DONT_USE_CTYPE_INLINE_ \
+ && (defined __GNUC__ || defined __cplusplus)) \
+ || (defined _FORTIFY_SOURCE && 0 < _FORTIFY_SOURCE \
+ && defined __GNUC__ && ! defined __cplusplus))))
+# define _GL_EXTERN_INLINE_STDHEADER_BUG
+#endif
#if ((__GNUC__ \
? defined __GNUC_STDC_INLINE__ && __GNUC_STDC_INLINE__ \
- : 199901L <= __STDC_VERSION__) \
- && !defined __APPLE__)
+ : (199901L <= __STDC_VERSION__ \
+ && !defined __HP_cc \
+ && !defined __PGI \
+ && !(defined __SUNPRO_C && __STDC__))) \
+ && !defined _GL_EXTERN_INLINE_STDHEADER_BUG)
# define _GL_INLINE inline
# define _GL_EXTERN_INLINE extern inline
-#elif 2 < __GNUC__ + (7 <= __GNUC_MINOR__) && !defined __APPLE__
-# if __GNUC_GNU_INLINE__
+# define _GL_EXTERN_INLINE_IN_USE
+#elif (2 < __GNUC__ + (7 <= __GNUC_MINOR__) && !defined __STRICT_ANSI__ \
+ && !defined _GL_EXTERN_INLINE_STDHEADER_BUG)
+# if defined __GNUC_GNU_INLINE__ && __GNUC_GNU_INLINE__
/* __gnu_inline__ suppresses a GCC 4.2 diagnostic. */
# define _GL_INLINE extern inline __attribute__ ((__gnu_inline__))
# else
# define _GL_INLINE extern inline
# endif
# define _GL_EXTERN_INLINE extern
+# define _GL_EXTERN_INLINE_IN_USE
#else
# define _GL_INLINE static _GL_UNUSED
# define _GL_EXTERN_INLINE static _GL_UNUSED
#endif
-#if 4 < __GNUC__ + (6 <= __GNUC_MINOR__)
+/* In GCC 4.6 (inclusive) to 5.1 (exclusive),
+ suppress bogus "no previous prototype for 'FOO'"
+ and "no previous declaration for 'FOO'" diagnostics,
+ when FOO is an inline function in the header; see
+ <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=54113> and
+ <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63877>. */
+#if __GNUC__ == 4 && 6 <= __GNUC_MINOR__
# if defined __GNUC_STDC_INLINE__ && __GNUC_STDC_INLINE__
# define _GL_INLINE_HEADER_CONST_PRAGMA
# else
diff --git a/m4/fcntl-o.m4 b/m4/fcntl-o.m4
index 740e78b..24fcf88 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-2012 Free Software Foundation, Inc.
+dnl Copyright (C) 2006, 2009-2016 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/fcntl_h.m4 b/m4/fcntl_h.m4
index cac28ae..ef0d78d 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-2012 Free Software Foundation, Inc.
+dnl Copyright (C) 2006-2007, 2009-2016 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
new file mode 100644
index 0000000..685a1bb
--- /dev/null
+++ b/m4/fdopen.m4
@@ -0,0 +1,47 @@
+# fdopen.m4 serial 3
+dnl Copyright (C) 2011-2016 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_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
+ 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],
+ [
+ AC_RUN_IFELSE(
+ [AC_LANG_SOURCE([[
+#include <stdio.h>
+#include <errno.h>
+int
+main (void)
+{
+ FILE *fp;
+ errno = 0;
+ fp = fdopen (-1, "r");
+ if (fp == NULL && errno == 0)
+ return 1;
+ return 0;
+}]])],
+ [gl_cv_func_fdopen_works=yes],
+ [gl_cv_func_fdopen_works=no],
+ [case "$host_os" in
+ mingw*) gl_cv_func_fdopen_works="guessing no" ;;
+ *) gl_cv_func_fdopen_works="guessing yes" ;;
+ esac
+ ])
+ ])
+ case "$gl_cv_func_fdopen_works" in
+ *no) REPLACE_FDOPEN=1 ;;
+ esac
+ fi
+])
+
+dnl Prerequisites of lib/fdopen.c.
+AC_DEFUN([gl_PREREQ_FDOPEN], [])
diff --git a/m4/fflush.m4 b/m4/fflush.m4
new file mode 100644
index 0000000..6bb6d5a
--- /dev/null
+++ b/m4/fflush.m4
@@ -0,0 +1,89 @@
+# fflush.m4 serial 15
+
+# Copyright (C) 2007-2016 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 Eric Blake
+
+dnl Find out how to obey POSIX semantics of fflush(stdin) discarding
+dnl unread input on seekable streams, rather than C99 undefined semantics.
+
+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
+])
+
+dnl Determine whether fflush works on input streams.
+dnl Sets gl_cv_func_fflush_stdin.
+
+AC_DEFUN([gl_FUNC_FFLUSH_STDIN],
+[
+ AC_CHECK_HEADERS_ONCE([unistd.h])
+ AC_CACHE_CHECK([whether fflush works on input streams],
+ [gl_cv_func_fflush_stdin],
+ [echo hello world > conftest.txt
+ AC_RUN_IFELSE([AC_LANG_PROGRAM(
+ [[
+#include <stdio.h>
+#if HAVE_UNISTD_H
+# include <unistd.h>
+#else /* on Windows with MSVC */
+# include <io.h>
+#endif
+ ]], [[FILE *f = fopen ("conftest.txt", "r");
+ char buffer[10];
+ int fd;
+ int c;
+ if (f == NULL)
+ return 1;
+ fd = fileno (f);
+ if (fd < 0 || fread (buffer, 1, 5, f) != 5)
+ return 2;
+ /* For deterministic results, ensure f read a bigger buffer. */
+ if (lseek (fd, 0, SEEK_CUR) == 5)
+ 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;
+ if (lseek (fd, 0, SEEK_CUR) != 5)
+ 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
+ mingw. */
+ c = fgetc (f);
+ ungetc (c, f);
+ fflush (f);
+ if (fgetc (f) != c)
+ 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;
+ return 0;
+ ]])], [gl_cv_func_fflush_stdin=yes], [gl_cv_func_fflush_stdin=no],
+ [gl_cv_func_fflush_stdin=cross])
+ 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)' ;;
+ 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,
+ 0 if fflush is known to not work, -1 if unknown.])
+])
+
+# Prerequisites of lib/fflush.c.
+AC_DEFUN([gl_PREREQ_FFLUSH], [:])
diff --git a/m4/flexmember.m4 b/m4/flexmember.m4
new file mode 100644
index 0000000..155ae9b
--- /dev/null
+++ b/m4/flexmember.m4
@@ -0,0 +1,43 @@
+# serial 4
+# Check for flexible array member support.
+
+# Copyright (C) 2006, 2009-2016 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.
+
+AC_DEFUN([AC_C_FLEXIBLE_ARRAY_MEMBER],
+[
+ AC_CACHE_CHECK([for flexible array member],
+ ac_cv_c_flexmember,
+ [AC_COMPILE_IFELSE(
+ [AC_LANG_PROGRAM(
+ [[#include <stdlib.h>
+ #include <stdio.h>
+ #include <stddef.h>
+ struct s { 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->d[0] = 0.0;
+ return p->d != (double *) NULL;]])],
+ [ac_cv_c_flexmember=yes],
+ [ac_cv_c_flexmember=no])])
+ if test $ac_cv_c_flexmember = yes; then
+ AC_DEFINE([FLEXIBLE_ARRAY_MEMBER], [],
+ [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 compilers.
+ When computing the size of such an object, don't use 'sizeof (struct s)'
+ as it overestimates the size. Use 'offsetof (struct s, d)' instead.
+ Don't use 'offsetof (struct s, d@<:@0@:>@)', as this doesn't work with
+ MSVC and with C++ compilers.])
+ else
+ AC_DEFINE([FLEXIBLE_ARRAY_MEMBER], [1])
+ fi
+])
diff --git a/m4/fpending.m4 b/m4/fpending.m4
new file mode 100644
index 0000000..f6776a8
--- /dev/null
+++ b/m4/fpending.m4
@@ -0,0 +1,36 @@
+# serial 22
+
+# Copyright (C) 2000-2001, 2004-2016 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 Jim Meyering
+dnl Using code from emacs, based on suggestions from Paul Eggert
+dnl and Ulrich Drepper.
+
+dnl Find out how to determine the number of pending output bytes on a stream.
+dnl glibc (2.1.93 and newer) and Solaris provide __fpending. On other systems,
+dnl we have to grub around in the (possibly opaque) FILE struct.
+
+AC_DEFUN([gl_FUNC_FPENDING],
+[
+ AC_CHECK_HEADERS_ONCE([stdio_ext.h])
+ fp_headers='
+ #include <stdio.h>
+ #if HAVE_STDIO_EXT_H
+ # include <stdio_ext.h>
+ #endif
+ '
+ AC_CACHE_CHECK([for __fpending], [gl_cv_func___fpending],
+ [
+ AC_LINK_IFELSE(
+ [AC_LANG_PROGRAM([$fp_headers],
+ [[return ! __fpending (stdin);]])],
+ [gl_cv_func___fpending=yes],
+ [gl_cv_func___fpending=no])
+ ])
+ if test $gl_cv_func___fpending = yes; then
+ AC_CHECK_DECLS([__fpending], [], [], [$fp_headers])
+ fi
+])
diff --git a/m4/fpurge.m4 b/m4/fpurge.m4
new file mode 100644
index 0000000..0dd19f3
--- /dev/null
+++ b/m4/fpurge.m4
@@ -0,0 +1,45 @@
+# fpurge.m4 serial 7
+dnl Copyright (C) 2007, 2009-2016 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_FPURGE],
+[
+ AC_REQUIRE([gl_STDIO_H_DEFAULTS])
+ AC_CHECK_FUNCS_ONCE([fpurge])
+ AC_CHECK_FUNCS_ONCE([__fpurge])
+ AC_CHECK_DECLS([fpurge], , , [[#include <stdio.h>]])
+ if test "x$ac_cv_func_fpurge" = xyes; then
+ 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;])],
+ [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
+ REPLACE_FPURGE=1
+ fi
+ else
+ HAVE_FPURGE=0
+ fi
+ if test "x$ac_cv_have_decl_fpurge" = xno; then
+ HAVE_DECL_FPURGE=0
+ fi
+])
diff --git a/m4/freading.m4 b/m4/freading.m4
new file mode 100644
index 0000000..52495b7
--- /dev/null
+++ b/m4/freading.m4
@@ -0,0 +1,10 @@
+# freading.m4 serial 1
+dnl Copyright (C) 2007, 2009-2016 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_FREADING],
+[
+ AC_CHECK_FUNCS_ONCE([__freading])
+])
diff --git a/m4/fseek.m4 b/m4/fseek.m4
new file mode 100644
index 0000000..5ec8d00
--- /dev/null
+++ b/m4/fseek.m4
@@ -0,0 +1,15 @@
+# fseek.m4 serial 4
+dnl Copyright (C) 2007, 2009-2016 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_FSEEK],
+[
+ AC_REQUIRE([gl_STDIO_H_DEFAULTS])
+ AC_REQUIRE([gl_FUNC_FSEEKO])
+ dnl When fseeko needs fixes, fseek needs them too.
+ if test $HAVE_FSEEKO = 0 || test $REPLACE_FSEEKO = 1; then
+ REPLACE_FSEEK=1
+ fi
+])
diff --git a/m4/fseeko.m4 b/m4/fseeko.m4
new file mode 100644
index 0000000..6c7f551
--- /dev/null
+++ b/m4/fseeko.m4
@@ -0,0 +1,73 @@
+# fseeko.m4 serial 17
+dnl Copyright (C) 2007-2016 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_FSEEKO],
+[
+ AC_REQUIRE([gl_STDIO_H_DEFAULTS])
+ AC_REQUIRE([gl_STDIN_LARGE_OFFSET])
+ AC_REQUIRE([gl_SYS_TYPES_H])
+ AC_REQUIRE([AC_PROG_CC])
+
+ dnl Persuade glibc <stdio.h> to declare fseeko().
+ AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS])
+
+ AC_CACHE_CHECK([for fseeko], [gl_cv_func_fseeko],
+ [
+ AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <stdio.h>
+]], [fseeko (stdin, 0, 0);])],
+ [gl_cv_func_fseeko=yes], [gl_cv_func_fseeko=no])
+ ])
+
+ AC_CHECK_DECLS_ONCE([fseeko])
+ if test $ac_cv_have_decl_fseeko = no; then
+ HAVE_DECL_FSEEKO=0
+ fi
+
+ if test $gl_cv_func_fseeko = no; then
+ HAVE_FSEEKO=0
+ else
+ if test $WINDOWS_64_BIT_OFF_T = 1; then
+ REPLACE_FSEEKO=1
+ fi
+ if test $gl_cv_var_stdin_large_offset = no; then
+ REPLACE_FSEEKO=1
+ fi
+ m4_ifdef([gl_FUNC_FFLUSH_STDIN], [
+ gl_FUNC_FFLUSH_STDIN
+ if test $gl_cv_func_fflush_stdin != yes; then
+ REPLACE_FSEEKO=1
+ fi
+ ])
+ fi
+])
+
+dnl Code shared by fseeko and ftello. Determine if large files are supported,
+dnl but stdin does not start as a large file by default.
+AC_DEFUN([gl_STDIN_LARGE_OFFSET],
+ [
+ AC_CACHE_CHECK([whether stdin defaults to large file offsets],
+ [gl_cv_var_stdin_large_offset],
+ [AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <stdio.h>]],
+[[#if defined __SL64 && defined __SCLE /* cygwin */
+ /* Cygwin 1.5.24 and earlier fail to put stdin in 64-bit mode, making
+ fseeko/ftello needlessly fail. This bug was fixed in 1.5.25, and
+ it is easier to do a version check than building a runtime test. */
+# include <cygwin/version.h>
+# if CYGWIN_VERSION_DLL_COMBINED < CYGWIN_VERSION_DLL_MAKE_COMBINED (1005, 25)
+ choke me
+# endif
+#endif]])],
+ [gl_cv_var_stdin_large_offset=yes],
+ [gl_cv_var_stdin_large_offset=no])])
+])
+
+# Prerequisites of lib/fseeko.c.
+AC_DEFUN([gl_PREREQ_FSEEKO],
+[
+ dnl Native Windows has the function _fseeki64. mingw hides it, but mingw64
+ dnl makes it usable again.
+ AC_CHECK_FUNCS([_fseeki64])
+])
diff --git a/m4/fstat.m4 b/m4/fstat.m4
index a73baa2..29f9b81 100644
--- a/m4/fstat.m4
+++ b/m4/fstat.m4
@@ -1,5 +1,5 @@
# fstat.m4 serial 4
-dnl Copyright (C) 2011-2012 Free Software Foundation, Inc.
+dnl Copyright (C) 2011-2016 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/ftell.m4 b/m4/ftell.m4
new file mode 100644
index 0000000..6701f0a
--- /dev/null
+++ b/m4/ftell.m4
@@ -0,0 +1,15 @@
+# ftell.m4 serial 3
+dnl Copyright (C) 2007, 2009-2016 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_FTELL],
+[
+ AC_REQUIRE([gl_STDIO_H_DEFAULTS])
+ AC_REQUIRE([gl_FUNC_FTELLO])
+ dnl When ftello needs fixes, ftell needs them too.
+ if test $HAVE_FTELLO = 0 || test $REPLACE_FTELLO = 1; then
+ REPLACE_FTELL=1
+ fi
+])
diff --git a/m4/ftello.m4 b/m4/ftello.m4
new file mode 100644
index 0000000..3f4808b
--- /dev/null
+++ b/m4/ftello.m4
@@ -0,0 +1,140 @@
+# ftello.m4 serial 11
+dnl Copyright (C) 2007-2016 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_FTELLO],
+[
+ AC_REQUIRE([gl_STDIO_H_DEFAULTS])
+ AC_REQUIRE([AC_PROG_CC])
+ AC_REQUIRE([gl_STDIN_LARGE_OFFSET])
+ AC_REQUIRE([gl_SYS_TYPES_H])
+
+ dnl Persuade glibc <stdio.h> to declare ftello().
+ AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS])
+
+ AC_CHECK_DECLS_ONCE([ftello])
+ if test $ac_cv_have_decl_ftello = no; then
+ HAVE_DECL_FTELLO=0
+ fi
+
+ AC_CACHE_CHECK([for ftello], [gl_cv_func_ftello],
+ [
+ AC_LINK_IFELSE(
+ [AC_LANG_PROGRAM(
+ [[#include <stdio.h>]],
+ [[ftello (stdin);]])],
+ [gl_cv_func_ftello=yes],
+ [gl_cv_func_ftello=no])
+ ])
+ if test $gl_cv_func_ftello = no; then
+ HAVE_FTELLO=0
+ else
+ if test $WINDOWS_64_BIT_OFF_T = 1; then
+ REPLACE_FTELLO=1
+ fi
+ if test $gl_cv_var_stdin_large_offset = no; then
+ REPLACE_FTELLO=1
+ fi
+ if test $REPLACE_FTELLO = 0; then
+ dnl Detect bug on Solaris.
+ dnl ftell and ftello produce incorrect results after putc that followed a
+ dnl getc call that reached EOF on Solaris. This is because the _IOREAD
+ dnl flag does not get cleared in this case, even though _IOWRT gets set,
+ dnl and ftell and ftello look whether the _IOREAD flag is set.
+ AC_REQUIRE([AC_CANONICAL_HOST])
+ AC_CACHE_CHECK([whether ftello works],
+ [gl_cv_func_ftello_works],
+ [
+ dnl Initial guess, used when cross-compiling or when /dev/tty cannot
+ dnl be opened.
+changequote(,)dnl
+ case "$host_os" in
+ # Guess no on Solaris.
+ solaris*) gl_cv_func_ftello_works="guessing no" ;;
+ # Guess yes otherwise.
+ *) gl_cv_func_ftello_works="guessing yes" ;;
+ esac
+changequote([,])dnl
+ AC_RUN_IFELSE(
+ [AC_LANG_SOURCE([[
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#define TESTFILE "conftest.tmp"
+int
+main (void)
+{
+ FILE *fp;
+
+ /* Create a file with some contents. */
+ fp = fopen (TESTFILE, "w");
+ if (fp == NULL)
+ return 70;
+ if (fwrite ("foogarsh", 1, 8, fp) < 8)
+ return 71;
+ if (fclose (fp))
+ return 72;
+
+ /* The file's contents is now "foogarsh". */
+
+ /* Try writing after reading to EOF. */
+ fp = fopen (TESTFILE, "r+");
+ if (fp == NULL)
+ return 73;
+ if (fseek (fp, -1, SEEK_END))
+ return 74;
+ if (!(getc (fp) == 'h'))
+ return 1;
+ if (!(getc (fp) == EOF))
+ return 2;
+ if (!(ftell (fp) == 8))
+ return 3;
+ if (!(ftell (fp) == 8))
+ return 4;
+ if (!(putc ('!', fp) == '!'))
+ return 5;
+ if (!(ftell (fp) == 9))
+ return 6;
+ if (!(fclose (fp) == 0))
+ return 7;
+ fp = fopen (TESTFILE, "r");
+ if (fp == NULL)
+ return 75;
+ {
+ char buf[10];
+ if (!(fread (buf, 1, 10, fp) == 9))
+ return 10;
+ if (!(memcmp (buf, "foogarsh!", 9) == 0))
+ return 11;
+ }
+ if (!(fclose (fp) == 0))
+ return 12;
+
+ /* The file's contents is now "foogarsh!". */
+
+ return 0;
+}]])],
+ [gl_cv_func_ftello_works=yes],
+ [gl_cv_func_ftello_works=no], [:])
+ ])
+ case "$gl_cv_func_ftello_works" in
+ *yes) ;;
+ *)
+ REPLACE_FTELLO=1
+ AC_DEFINE([FTELLO_BROKEN_AFTER_SWITCHING_FROM_READ_TO_WRITE], [1],
+ [Define to 1 if the system's ftello function has the Solaris bug.])
+ ;;
+ esac
+ fi
+ fi
+])
+
+# Prerequisites of lib/ftello.c.
+AC_DEFUN([gl_PREREQ_FTELLO],
+[
+ dnl Native Windows has the function _ftelli64. mingw hides it, but mingw64
+ dnl makes it usable again.
+ AC_CHECK_FUNCS([_ftelli64])
+])
diff --git a/m4/fwriting.m4 b/m4/fwriting.m4
index 0475eb3..b9912e2 100644
--- a/m4/fwriting.m4
+++ b/m4/fwriting.m4
@@ -1,5 +1,5 @@
# fwriting.m4 serial 2
-dnl Copyright (C) 2007, 2009-2012 Free Software Foundation, Inc.
+dnl Copyright (C) 2007, 2009-2016 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
new file mode 100644
index 0000000..566c3c1
--- /dev/null
+++ b/m4/getcwd.m4
@@ -0,0 +1,162 @@
+# getcwd.m4 - check for working getcwd that is compatible with glibc
+
+# Copyright (C) 2001, 2003-2007, 2009-2016 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
+
+AC_DEFUN([gl_FUNC_GETCWD_NULL],
+ [
+ AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
+ AC_CHECK_HEADERS_ONCE([unistd.h])
+ AC_CACHE_CHECK([whether getcwd (NULL, 0) allocates memory for result],
+ [gl_cv_func_getcwd_null],
+ [AC_RUN_IFELSE([AC_LANG_PROGRAM([[
+# include <stdlib.h>
+# if HAVE_UNISTD_H
+# include <unistd.h>
+# else /* on Windows with MSVC */
+# include <direct.h>
+# endif
+# ifndef getcwd
+ char *getcwd ();
+# endif
+]], [[
+#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
+/* mingw cwd does not start with '/', but getcwd does allocate.
+ However, mingw fails to honor non-zero size. */
+#else
+ if (chdir ("/") != 0)
+ return 1;
+ else
+ {
+ char *f = getcwd (NULL, 0);
+ if (! f)
+ return 2;
+ if (f[0] != '/')
+ return 3;
+ if (f[1] != '\0')
+ return 4;
+ free (f);
+ return 0;
+ }
+#endif
+ ]])],
+ [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";;
+ esac
+ ]])])
+])
+
+AC_DEFUN([gl_FUNC_GETCWD_SIGNATURE],
+[
+ AC_CACHE_CHECK([for getcwd with POSIX signature],
+ [gl_cv_func_getcwd_posix_signature],
+ [AC_COMPILE_IFELSE(
+ [AC_LANG_PROGRAM(
+ [[#include <unistd.h>]],
+ [[extern
+ #ifdef __cplusplus
+ "C"
+ #endif
+ char *getcwd (char *, size_t);
+ ]])
+ ],
+ [gl_cv_func_getcwd_posix_signature=yes],
+ [gl_cv_func_getcwd_posix_signature=no])
+ ])
+])
+
+dnl Guarantee that getcwd will malloc with a NULL first argument. Assumes
+dnl that either the system getcwd is robust, or that calling code is okay
+dnl with spurious failures when run from a directory with an absolute name
+dnl larger than 4k bytes.
+dnl
+dnl Assumes that getcwd exists; if you are worried about obsolete
+dnl platforms that lacked getcwd(), then you need to use the GPL module.
+AC_DEFUN([gl_FUNC_GETCWD_LGPL],
+[
+ AC_REQUIRE([gl_UNISTD_H_DEFAULTS])
+ AC_REQUIRE([gl_FUNC_GETCWD_NULL])
+ AC_REQUIRE([gl_FUNC_GETCWD_SIGNATURE])
+
+ case $gl_cv_func_getcwd_null,$gl_cv_func_getcwd_posix_signature in
+ *yes,yes) ;;
+ *)
+ dnl Minimal replacement lib/getcwd-lgpl.c.
+ REPLACE_GETCWD=1
+ ;;
+ esac
+])
+
+dnl Check for all known getcwd bugs; useful for a program likely to be
+dnl executed from an arbitrary location.
+AC_DEFUN([gl_FUNC_GETCWD],
+[
+ AC_REQUIRE([gl_UNISTD_H_DEFAULTS])
+ AC_REQUIRE([gl_FUNC_GETCWD_NULL])
+ AC_REQUIRE([gl_FUNC_GETCWD_SIGNATURE])
+ AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
+
+ gl_abort_bug=no
+ case "$host_os" in
+ mingw*)
+ gl_cv_func_getcwd_path_max=yes
+ ;;
+ *)
+ gl_FUNC_GETCWD_PATH_MAX
+ case "$gl_cv_func_getcwd_null" in
+ *yes)
+ gl_FUNC_GETCWD_ABORT_BUG([gl_abort_bug=yes])
+ ;;
+ esac
+ ;;
+ esac
+ dnl Define HAVE_MINIMALLY_WORKING_GETCWD and HAVE_PARTLY_WORKING_GETCWD
+ dnl if appropriate.
+ case "$gl_cv_func_getcwd_path_max" in
+ "no"|"no, it has the AIX bug") ;;
+ *)
+ AC_DEFINE([HAVE_MINIMALLY_WORKING_GETCWD], [1],
+ [Define to 1 if getcwd minimally works, that is, its result can be
+ trusted when it succeeds.])
+ ;;
+ esac
+ case "$gl_cv_func_getcwd_path_max" in
+ "no, but it is partly working")
+ AC_DEFINE([HAVE_PARTLY_WORKING_GETCWD], [1],
+ [Define to 1 if getcwd works, except it sometimes fails when it
+ shouldn't, setting errno to ERANGE, ENAMETOOLONG, or ENOENT.])
+ ;;
+ "yes, but with shorter paths")
+ AC_DEFINE([HAVE_GETCWD_SHORTER], [1],
+ [Define to 1 if getcwd works, but with shorter paths
+ than is generally tested with the replacement.])
+ ;;
+ esac
+
+ if { case "$gl_cv_func_getcwd_null" in *yes) false;; *) true;; esac; } \
+ || test $gl_cv_func_getcwd_posix_signature != yes \
+ || { case "$gl_cv_func_getcwd_path_max" in *yes*) false;; *) true;; esac; } \
+ || test $gl_abort_bug = yes; then
+ REPLACE_GETCWD=1
+ fi
+])
+
+# Prerequisites of lib/getcwd.c, when full replacement is in effect.
+AC_DEFUN([gl_PREREQ_GETCWD],
+[
+ AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS])
+ AC_REQUIRE([gl_CHECK_TYPE_STRUCT_DIRENT_D_INO])
+ :
+])
diff --git a/m4/getdelim.m4 b/m4/getdelim.m4
index a6f4872..a1a7dcc 100644
--- a/m4/getdelim.m4
+++ b/m4/getdelim.m4
@@ -1,6 +1,6 @@
-# getdelim.m4 serial 10
+# getdelim.m4 serial 11
-dnl Copyright (C) 2005-2007, 2009-2012 Free Software Foundation, Inc.
+dnl Copyright (C) 2005-2007, 2009-2016 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,
@@ -48,7 +48,9 @@ AC_DEFUN([gl_FUNC_GETDELIM],
size_t siz = (size_t)(~0) / 4;
if (getdelim (&line, &siz, '\n', in) == -1)
return 3;
+ free (line);
}
+ fclose (in);
return 0;
}
]])], [gl_cv_func_working_getdelim=yes] dnl The library version works.
diff --git a/m4/getdtablesize.m4 b/m4/getdtablesize.m4
new file mode 100644
index 0000000..1bf4db0
--- /dev/null
+++ b/m4/getdtablesize.m4
@@ -0,0 +1,46 @@
+# getdtablesize.m4 serial 6
+dnl Copyright (C) 2008-2016 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_GETDTABLESIZE],
+[
+ AC_REQUIRE([gl_UNISTD_H_DEFAULTS])
+ AC_REQUIRE([AC_CANONICAL_HOST])
+ AC_CHECK_FUNCS_ONCE([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])
+ ])
+ case "$gl_cv_func_getdtablesize_works" in
+ *yes) ;;
+ *) REPLACE_GETDTABLESIZE=1 ;;
+ esac
+ else
+ HAVE_GETDTABLESIZE=0
+ fi
+])
+
+# Prerequisites of lib/getdtablesize.c.
+AC_DEFUN([gl_PREREQ_GETDTABLESIZE], [:])
diff --git a/m4/getopt.m4 b/m4/getopt.m4
index f6902b5..ce6ec67 100644
--- a/m4/getopt.m4
+++ b/m4/getopt.m4
@@ -1,5 +1,5 @@
# getopt.m4 serial 44
-dnl Copyright (C) 2002-2006, 2008-2012 Free Software Foundation, Inc.
+dnl Copyright (C) 2002-2006, 2008-2016 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/getpagesize.m4 b/m4/getpagesize.m4
new file mode 100644
index 0000000..8902b7b
--- /dev/null
+++ b/m4/getpagesize.m4
@@ -0,0 +1,32 @@
+# getpagesize.m4 serial 9
+dnl Copyright (C) 2002, 2004-2005, 2007, 2009-2016 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,
+dnl with or without modifications, as long as this notice is preserved.
+
+AC_DEFUN([gl_FUNC_GETPAGESIZE],
+[
+ AC_REQUIRE([gl_UNISTD_H_DEFAULTS])
+ AC_REQUIRE([AC_CANONICAL_HOST])
+ AC_CHECK_FUNCS([getpagesize])
+ if test $ac_cv_func_getpagesize = no; then
+ HAVE_GETPAGESIZE=0
+ AC_CHECK_HEADERS([OS.h])
+ if test $ac_cv_header_OS_h = yes; then
+ HAVE_OS_H=1
+ fi
+ AC_CHECK_HEADERS([sys/param.h])
+ if test $ac_cv_header_sys_param_h = yes; then
+ HAVE_SYS_PARAM_H=1
+ fi
+ fi
+ case "$host_os" in
+ mingw*)
+ REPLACE_GETPAGESIZE=1
+ ;;
+ esac
+ dnl Also check whether it's declared.
+ dnl mingw has getpagesize() in libgcc.a but doesn't declare it.
+ AC_CHECK_DECL([getpagesize], , [HAVE_DECL_GETPAGESIZE=0])
+])
diff --git a/m4/getprogname.m4 b/m4/getprogname.m4
new file mode 100644
index 0000000..f027037
--- /dev/null
+++ b/m4/getprogname.m4
@@ -0,0 +1,43 @@
+# getprogname.m4 - check for getprogname or replacements for it
+
+# Copyright (C) 2016 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 4
+
+AC_DEFUN([gl_FUNC_GETPROGNAME],
+[
+ AC_CHECK_FUNCS_ONCE([getprogname getexecname])
+ AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS])
+ ac_found=0
+ AC_CHECK_DECLS([program_invocation_name], [ac_found=1], [],
+ [#include <errno.h>])
+ AC_CHECK_DECLS([program_invocation_short_name], [ac_found=1], [],
+ [#include <errno.h>])
+ AC_CHECK_DECLS([__argv], [ac_found=1], [], [#include <stdlib.h>])
+
+ # Incur the cost of this test only if none of the above worked.
+ if test $ac_found = 0; then
+ # On OpenBSD 5.1, using the global __progname variable appears to be
+ # the only way to implement getprogname.
+ AC_CACHE_CHECK([whether __progname is defined in default libraries],
+ [gl_cv_var___progname],
+ [
+ gl_cv_var___progname=
+ AC_LINK_IFELSE(
+ [AC_LANG_PROGRAM(
+ [[extern char *__progname;]],
+ [[return *__progname;]]
+ )],
+ [gl_cv_var___progname=yes]
+ )
+ ]
+ )
+ if test "$gl_cv_var___progname" = yes; then
+ AC_DEFINE([HAVE_VAR___PROGNAME], 1,
+ [Define if you have a global __progname variable])
+ fi
+ fi
+])
diff --git a/m4/gettext.m4 b/m4/gettext.m4
index b4511ce..be247bf 100644
--- a/m4/gettext.m4
+++ b/m4/gettext.m4
@@ -1,5 +1,5 @@
-# gettext.m4 serial 60 (gettext-0.17)
-dnl Copyright (C) 1995-2007 Free Software Foundation, Inc.
+# gettext.m4 serial 66 (gettext-0.18.2)
+dnl Copyright (C) 1995-2014 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.
@@ -15,7 +15,7 @@ dnl They are *not* in the public domain.
dnl Authors:
dnl Ulrich Drepper <drepper@cygnus.com>, 1995-2000.
-dnl Bruno Haible <haible@clisp.cons.org>, 2000-2006.
+dnl Bruno Haible <haible@clisp.cons.org>, 2000-2006, 2008-2010.
dnl Macro to add for using GNU gettext.
@@ -35,7 +35,7 @@ dnl will be ignored. If NEEDSYMBOL is specified and is
dnl 'need-formatstring-macros', then GNU gettext implementations that don't
dnl support the ISO C 99 <inttypes.h> formatstring macros will be ignored.
dnl INTLDIR is used to find the intl libraries. If empty,
-dnl the value `$(top_builddir)/intl/' is used.
+dnl the value '$(top_builddir)/intl/' is used.
dnl
dnl The result of the configuration is one of three cases:
dnl 1) GNU gettext, as included in the intl subdirectory, will be compiled
@@ -60,6 +60,8 @@ AC_DEFUN([AM_GNU_GETTEXT],
ifelse([$1], [], , [ifelse([$1], [external], , [ifelse([$1], [no-libtool], , [ifelse([$1], [use-libtool], ,
[errprint([ERROR: invalid first argument to AM_GNU_GETTEXT
])])])])])
+ ifelse(ifelse([$1], [], [old])[]ifelse([$1], [no-libtool], [old]), [old],
+ [AC_DIAGNOSE([obsolete], [Use of AM_GNU_GETTEXT without [external] argument is deprecated.])])
ifelse([$2], [], , [ifelse([$2], [need-ngettext], , [ifelse([$2], [need-formatstring-macros], ,
[errprint([ERROR: invalid second argument to AM_GNU_GETTEXT
])])])])
@@ -95,7 +97,7 @@ AC_DEFUN([AM_GNU_GETTEXT],
AC_REQUIRE([AM_ICONV_LINKFLAGS_BODY])
])
- dnl Sometimes, on MacOS X, libintl requires linking with CoreFoundation.
+ dnl Sometimes, on Mac OS X, libintl requires linking with CoreFoundation.
gt_INTL_MACOSX
dnl Set USE_NLS.
@@ -123,11 +125,11 @@ AC_DEFUN([AM_GNU_GETTEXT],
gt_use_preinstalled_gnugettext=no
ifelse(gt_included_intl, yes, [
AC_MSG_CHECKING([whether included gettext is requested])
- AC_ARG_WITH(included-gettext,
+ AC_ARG_WITH([included-gettext],
[ --with-included-gettext use the GNU gettext library included here],
nls_cv_force_use_gnu_gettext=$withval,
nls_cv_force_use_gnu_gettext=no)
- AC_MSG_RESULT($nls_cv_force_use_gnu_gettext)
+ AC_MSG_RESULT([$nls_cv_force_use_gnu_gettext])
nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext"
if test "$nls_cv_force_use_gnu_gettext" != "yes"; then
@@ -155,12 +157,18 @@ changequote([,])dnl
fi
AC_CACHE_CHECK([for GNU gettext in libc], [$gt_func_gnugettext_libc],
- [AC_TRY_LINK([#include <libintl.h>
+ [AC_LINK_IFELSE(
+ [AC_LANG_PROGRAM(
+ [[
+#include <libintl.h>
$gt_revision_test_code
extern int _nl_msg_cat_cntr;
-extern int *_nl_domain_bindings;],
- [bindtextdomain ("", "");
-return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_domain_bindings],
+extern int *_nl_domain_bindings;
+ ]],
+ [[
+bindtextdomain ("", "");
+return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_domain_bindings
+ ]])],
[eval "$gt_func_gnugettext_libc=yes"],
[eval "$gt_func_gnugettext_libc=no"])])
@@ -181,35 +189,47 @@ return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_domain_b
gt_save_LIBS="$LIBS"
LIBS="$LIBS $LIBINTL"
dnl Now see whether libintl exists and does not depend on libiconv.
- AC_TRY_LINK([#include <libintl.h>
+ AC_LINK_IFELSE(
+ [AC_LANG_PROGRAM(
+ [[
+#include <libintl.h>
$gt_revision_test_code
extern int _nl_msg_cat_cntr;
extern
#ifdef __cplusplus
"C"
#endif
-const char *_nl_expand_alias (const char *);],
- [bindtextdomain ("", "");
-return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_expand_alias ("")],
+const char *_nl_expand_alias (const char *);
+ ]],
+ [[
+bindtextdomain ("", "");
+return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_expand_alias ("")
+ ]])],
[eval "$gt_func_gnugettext_libintl=yes"],
[eval "$gt_func_gnugettext_libintl=no"])
dnl Now see whether libintl exists and depends on libiconv.
if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" != yes; } && test -n "$LIBICONV"; then
LIBS="$LIBS $LIBICONV"
- AC_TRY_LINK([#include <libintl.h>
+ AC_LINK_IFELSE(
+ [AC_LANG_PROGRAM(
+ [[
+#include <libintl.h>
$gt_revision_test_code
extern int _nl_msg_cat_cntr;
extern
#ifdef __cplusplus
"C"
#endif
-const char *_nl_expand_alias (const char *);],
- [bindtextdomain ("", "");
-return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_expand_alias ("")],
- [LIBINTL="$LIBINTL $LIBICONV"
- LTLIBINTL="$LTLIBINTL $LTLIBICONV"
- eval "$gt_func_gnugettext_libintl=yes"
- ])
+const char *_nl_expand_alias (const char *);
+ ]],
+ [[
+bindtextdomain ("", "");
+return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_expand_alias ("")
+ ]])],
+ [LIBINTL="$LIBINTL $LIBICONV"
+ LTLIBINTL="$LTLIBINTL $LTLIBICONV"
+ eval "$gt_func_gnugettext_libintl=yes"
+ ])
fi
CPPFLAGS="$gt_save_CPPFLAGS"
LIBS="$gt_save_LIBS"])
@@ -267,7 +287,7 @@ return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_expand_a
if test "$gt_use_preinstalled_gnugettext" = "yes" \
|| test "$nls_cv_use_gnu_gettext" = "yes"; then
- AC_DEFINE(ENABLE_NLS, 1,
+ AC_DEFINE([ENABLE_NLS], [1],
[Define to 1 if translation of program messages to the user's native language
is requested.])
else
@@ -301,9 +321,9 @@ return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_expand_a
fi
dnl For backward compatibility. Some packages may be using this.
- AC_DEFINE(HAVE_GETTEXT, 1,
+ AC_DEFINE([HAVE_GETTEXT], [1],
[Define if the GNU gettext() function is already present or preinstalled.])
- AC_DEFINE(HAVE_DCGETTEXT, 1,
+ AC_DEFINE([HAVE_DCGETTEXT], [1],
[Define if the GNU dcgettext() function is already present or preinstalled.])
fi
@@ -319,9 +339,9 @@ return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_expand_a
fi
dnl Make all variables we use known to autoconf.
- AC_SUBST(BUILD_INCLUDED_LIBINTL)
- AC_SUBST(USE_INCLUDED_LIBINTL)
- AC_SUBST(CATOBJEXT)
+ AC_SUBST([BUILD_INCLUDED_LIBINTL])
+ AC_SUBST([USE_INCLUDED_LIBINTL])
+ AC_SUBST([CATOBJEXT])
dnl For backward compatibility. Some configure.ins may be using this.
nls_cv_header_intl=
@@ -329,36 +349,36 @@ return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_expand_a
dnl For backward compatibility. Some Makefiles may be using this.
DATADIRNAME=share
- AC_SUBST(DATADIRNAME)
+ AC_SUBST([DATADIRNAME])
dnl For backward compatibility. Some Makefiles may be using this.
INSTOBJEXT=.mo
- AC_SUBST(INSTOBJEXT)
+ AC_SUBST([INSTOBJEXT])
dnl For backward compatibility. Some Makefiles may be using this.
GENCAT=gencat
- AC_SUBST(GENCAT)
+ AC_SUBST([GENCAT])
dnl For backward compatibility. Some Makefiles may be using this.
INTLOBJS=
if test "$USE_INCLUDED_LIBINTL" = yes; then
INTLOBJS="\$(GETTOBJS)"
fi
- AC_SUBST(INTLOBJS)
+ AC_SUBST([INTLOBJS])
dnl Enable libtool support if the surrounding package wishes it.
INTL_LIBTOOL_SUFFIX_PREFIX=gt_libtool_suffix_prefix
- AC_SUBST(INTL_LIBTOOL_SUFFIX_PREFIX)
+ AC_SUBST([INTL_LIBTOOL_SUFFIX_PREFIX])
])
dnl For backward compatibility. Some Makefiles may be using this.
INTLLIBS="$LIBINTL"
- AC_SUBST(INTLLIBS)
+ AC_SUBST([INTLLIBS])
dnl Make all documented variables known to autoconf.
- AC_SUBST(LIBINTL)
- AC_SUBST(LTLIBINTL)
- AC_SUBST(POSUB)
+ AC_SUBST([LIBINTL])
+ AC_SUBST([LTLIBINTL])
+ AC_SUBST([POSUB])
])
@@ -379,4 +399,3 @@ AC_DEFUN([AM_GNU_GETTEXT_NEED],
dnl Usage: AM_GNU_GETTEXT_VERSION([gettext-version])
AC_DEFUN([AM_GNU_GETTEXT_VERSION], [])
- AC_DEFUN([gl_LOCK_EARLY], [])
diff --git a/m4/gettimeofday.m4 b/m4/gettimeofday.m4
index eda9702..4ae5d63 100644
--- a/m4/gettimeofday.m4
+++ b/m4/gettimeofday.m4
@@ -1,6 +1,6 @@
-# serial 20
+# serial 21
-# Copyright (C) 2001-2003, 2005, 2007, 2009-2012 Free Software Foundation, Inc.
+# Copyright (C) 2001-2003, 2005, 2007, 2009-2016 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.
@@ -127,10 +127,8 @@ AC_DEFUN([gl_FUNC_GETTIMEOFDAY_CLOBBER],
])
AC_DEFUN([gl_GETTIMEOFDAY_REPLACE_LOCALTIME], [
- AC_DEFINE([gmtime], [rpl_gmtime],
- [Define to rpl_gmtime if the replacement function should be used.])
- AC_DEFINE([localtime], [rpl_localtime],
- [Define to rpl_localtime if the replacement function should be used.])
+ REPLACE_GMTIME=1
+ REPLACE_LOCALTIME=1
])
# Prerequisites of lib/gettimeofday.c.
diff --git a/m4/glibc21.m4 b/m4/glibc21.m4
index c938fb1..dafebf5 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-2012 Free Software Foundation,
+dnl Copyright (C) 2000-2002, 2004, 2008, 2010-2016 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 f3ba8d5..f8454c8 100644
--- a/m4/gnulib-common.m4
+++ b/m4/gnulib-common.m4
@@ -1,5 +1,5 @@
-# gnulib-common.m4 serial 33
-dnl Copyright (C) 2007-2012 Free Software Foundation, Inc.
+# gnulib-common.m4 serial 36
+dnl Copyright (C) 2007-2016 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.
@@ -49,6 +49,16 @@ AC_DEFUN([gl_COMMON_BODY], [
is a misnomer outside of parameter lists. */
#define _UNUSED_PARAMETER_ _GL_UNUSED
+/* gcc supports the "unused" attribute on possibly unused labels, and
+ g++ has since version 4.5. Note to support C++ as well as C,
+ _GL_UNUSED_LABEL should be used with a trailing ; */
+#if !defined __cplusplus || __GNUC__ > 4 \
+ || (__GNUC__ == 4 && __GNUC_MINOR__ >= 5)
+# define _GL_UNUSED_LABEL _GL_UNUSED
+#else
+# define _GL_UNUSED_LABEL
+#endif
+
/* The __pure__ attribute was added in gcc 2.96. */
#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 96)
# define _GL_ATTRIBUTE_PURE __attribute__ ((__pure__))
@@ -243,9 +253,10 @@ AC_DEFUN([gl_PROG_AR_RANLIB],
[
dnl Minix 3 comes with two toolchains: The Amsterdam Compiler Kit compiler
dnl as "cc", and GCC as "gcc". They have different object file formats and
- dnl library formats. In particular, the GNU binutils programs 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])
AC_CACHE_CHECK([for Minix Amsterdam compiler], [gl_cv_c_amsterdam_compiler],
[
AC_EGREP_CPP([Amsterdam],
@@ -257,25 +268,37 @@ Amsterdam
[gl_cv_c_amsterdam_compiler=yes],
[gl_cv_c_amsterdam_compiler=no])
])
- if test -z "$AR"; then
- if test $gl_cv_c_amsterdam_compiler = yes; then
+
+ dnl Don't compete with AM_PROG_AR's decision about AR/ARFLAGS if we are not
+ dnl building with __ACK__.
+ if test $gl_cv_c_amsterdam_compiler = yes; then
+ if test -z "$AR"; then
AR='cc -c.a'
- if test -z "$ARFLAGS"; then
- ARFLAGS='-o'
- fi
- else
- dnl Use the Automake-documented default values for AR and ARFLAGS,
- dnl but prefer ${host}-ar over ar (useful for cross-compiling).
- AC_CHECK_TOOL([AR], [ar], [ar])
- if test -z "$ARFLAGS"; then
- ARFLAGS='cru'
- fi
fi
- else
if test -z "$ARFLAGS"; then
- ARFLAGS='cru'
+ ARFLAGS='-o'
fi
+ else
+ dnl AM_PROG_AR was added in automake v1.11.2. AM_PROG_AR does not AC_SUBST
+ dnl ARFLAGS variable (it is filed into Makefile.in directly by automake
+ dnl script on-demand, if not specified by ./configure of course).
+ dnl Don't AC_REQUIRE the AM_PROG_AR otherwise the code for __ACK__ above
+ dnl will be ignored. Also, pay attention to call AM_PROG_AR in else block
+ dnl because AM_PROG_AR is written so it could re-set AR variable even for
+ 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], [:])
fi
+
+ dnl In case the code above has not helped with setting AR/ARFLAGS, use
+ dnl Automake-documented default values for AR and ARFLAGS, but prefer
+ dnl ${host}-ar over ar (useful for cross-compiling).
+ AC_CHECK_TOOL([AR], [ar], [ar])
+ if test -z "$ARFLAGS"; then
+ ARFLAGS='cr'
+ fi
+
AC_SUBST([AR])
AC_SUBST([ARFLAGS])
if test -z "$RANLIB"; then
@@ -309,26 +332,28 @@ m4_ifdef([AC_PROG_MKDIR_P], [
])
# AC_C_RESTRICT
-# This definition overrides the AC_C_RESTRICT macro from autoconf 2.60..2.61,
-# so that mixed use of GNU C and GNU C++ and mixed use of Sun C and Sun C++
-# works.
-# This definition can be removed once autoconf >= 2.62 can be assumed.
-# AC_AUTOCONF_VERSION was introduced in 2.62, so use that as the witness.
-m4_ifndef([AC_AUTOCONF_VERSION],[
+# This definition is copied from post-2.69 Autoconf and overrides the
+# AC_C_RESTRICT macro from autoconf 2.60..2.69. It can be removed
+# once autoconf >= 2.70 can be assumed. It's painful to check version
+# numbers, and in practice this macro is more up-to-date than Autoconf
+# is, so override Autoconf unconditionally.
AC_DEFUN([AC_C_RESTRICT],
[AC_CACHE_CHECK([for C/C++ restrict keyword], [ac_cv_c_restrict],
[ac_cv_c_restrict=no
# The order here caters to the fact that C++ does not require restrict.
for ac_kw in __restrict __restrict__ _Restrict restrict; do
- AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
- [[typedef int * int_ptr;
- int foo (int_ptr $ac_kw ip) {
- return ip[0];
- }]],
- [[int s[1];
- int * $ac_kw t = s;
- t[0] = 0;
- return foo(t)]])],
+ AC_COMPILE_IFELSE(
+ [AC_LANG_PROGRAM(
+ [[typedef int *int_ptr;
+ int foo (int_ptr $ac_kw ip) { return ip[0]; }
+ int bar (int [$ac_kw]); /* Catch GCC bug 14050. */
+ int bar (int ip[$ac_kw]) { return ip[0]; }
+ ]],
+ [[int s[1];
+ int *$ac_kw t = s;
+ t[0] = 0;
+ return foo (t) + bar (t);
+ ]])],
[ac_cv_c_restrict=$ac_kw])
test "$ac_cv_c_restrict" != no && break
done
@@ -338,21 +363,21 @@ AC_DEFUN([AC_C_RESTRICT],
nothing if this is not supported. Do not define if restrict is
supported directly. */
#undef restrict
-/* Work around a bug in Sun C++: it does not support _Restrict, even
- though the corresponding Sun C compiler does, which causes
- "#define restrict _Restrict" in the previous line. Perhaps some future
- version of Sun C++ will work with _Restrict; if so, it'll probably
- define __RESTRICT, just as Sun C does. */
+/* Work around a bug in Sun C++: it does not support _Restrict or
+ __restrict__, even though the corresponding Sun C compiler ends up with
+ "#define restrict _Restrict" or "#define restrict __restrict__" in the
+ previous line. Perhaps some future version of Sun C++ will work with
+ restrict; if so, hopefully it defines __RESTRICT like Sun C does. */
#if defined __SUNPRO_CC && !defined __RESTRICT
# define _Restrict
+# define __restrict__
#endif])
case $ac_cv_c_restrict in
restrict) ;;
no) AC_DEFINE([restrict], []) ;;
*) AC_DEFINE_UNQUOTED([restrict], [$ac_cv_c_restrict]) ;;
esac
-])
-])
+])# AC_C_RESTRICT
# gl_BIGENDIAN
# is like AC_C_BIGENDIAN, except that it can be AC_REQUIREd.
@@ -375,3 +400,63 @@ AC_DEFUN([gl_CACHE_VAL_SILENT],
AC_CACHE_VAL([$1], [$2])
as_echo_n="$saved_as_echo_n"
])
+
+# AS_VAR_COPY was added in autoconf 2.63b
+m4_define_default([AS_VAR_COPY],
+[AS_LITERAL_IF([$1[]$2], [$1=$$2], [eval $1=\$$2])])
+
+# AC_PROG_SED was added in autoconf 2.59b
+m4_ifndef([AC_PROG_SED],
+[AC_DEFUN([AC_PROG_SED],
+[AC_CACHE_CHECK([for a sed that does not truncate output], ac_cv_path_SED,
+ [dnl ac_script should not contain more than 99 commands (for HP-UX sed),
+ dnl but more than about 7000 bytes, to catch a limit in Solaris 8 /usr/ucb/sed.
+ ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
+ for ac_i in 1 2 3 4 5 6 7; do
+ ac_script="$ac_script$as_nl$ac_script"
+ done
+ echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
+ AS_UNSET([ac_script])
+ if test -z "$SED"; then
+ ac_path_SED_found=false
+ _AS_PATH_WALK([], [
+ for ac_prog in sed gsed; do
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
+ AS_EXECUTABLE_P(["$ac_path_SED"]) || continue
+ case `"$ac_path_SED" --version 2>&1` in
+ *GNU*) ac_cv_path_SED=$ac_path_SED ac_path_SED_found=:;;
+ *)
+ ac_count=0
+ _AS_ECHO_N([0123456789]) >conftest.in
+ while :
+ do
+ cat conftest.in conftest.in >conftest.tmp
+ mv conftest.tmp conftest.in
+ cp conftest.in conftest.nl
+ echo >> conftest.nl
+ "$ac_path_SED" -f conftest.sed <conftest.nl >conftest.out 2>/dev/null || break
+ diff conftest.out conftest.nl >/dev/null 2>&1 || break
+ ac_count=`expr $ac_count + 1`
+ if test $ac_count -gt ${ac_path_SED_max-0}; then
+ # Best so far, but keep looking for better
+ ac_cv_path_SED=$ac_path_SED
+ ac_path_SED_max=$ac_count
+ fi
+ test $ac_count -gt 10 && break
+ done
+ rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
+ esac
+ $ac_path_SED_found && break 3
+ done
+ done])
+ if test -z "$ac_cv_path_SED"; then
+ AC_ERROR([no acceptable sed could be found in \$PATH])
+ fi
+ 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 b876067..6d116b2 100644
--- a/m4/gnulib-comp.m4
+++ b/m4/gnulib-comp.m4
@@ -1,7 +1,5 @@
-# -*- buffer-read-only: t -*- vi: set ro:
# DO NOT EDIT! GENERATED AUTOMATICALLY!
-# DO NOT EDIT! GENERATED AUTOMATICALLY!
-# Copyright (C) 2002-2012 Free Software Foundation, Inc.
+# Copyright (C) 2002-2016 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
@@ -39,70 +37,214 @@ AC_DEFUN([gl_EARLY],
m4_pattern_allow([^gl_ES$])dnl a valid locale name
m4_pattern_allow([^gl_LIBOBJS$])dnl a variable
m4_pattern_allow([^gl_LTLIBOBJS$])dnl a variable
+
+ # Pre-early section.
+ AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS])
AC_REQUIRE([gl_PROG_AR_RANLIB])
+
+ AC_REQUIRE([AM_PROG_CC_C_O])
+ # Code from module absolute-header:
# Code from module acl:
+ # Code from module acl-permissions:
+ # Code from module acl-tests:
+ # Code from module alignof:
+ # Code from module alignof-tests:
# Code from module alloca:
# Code from module alloca-opt:
+ # Code from module alloca-opt-tests:
+ # Code from module announce-gen:
+ # Code from module assert:
+ # Code from module binary-io:
+ # Code from module binary-io-tests:
# Code from module btowc:
+ # Code from module btowc-tests:
+ # Code from module builtin-expect:
# Code from module c-ctype:
+ # Code from module c-ctype-tests:
# Code from module c-strcase:
+ # Code from module c-strcase-tests:
# Code from module c-strcaseeq:
# Code from module canonicalize-lgpl:
+ # Code from module canonicalize-lgpl-tests:
# Code from module chdir:
+ # Code from module chdir-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 ctype:
+ # Code from module ctype-tests:
+ # Code from module dfa:
+ # Code from module dfa-tests:
+ # Code from module dirent:
+ # Code from module dirent-tests:
+ # Code from module dirfd:
# Code from module dirname-lgpl:
+ # Code from module do-release-commit-and-tag:
# Code from module dosname:
# Code from module double-slash-root:
+ # Code from module dup2:
+ # Code from module dup2-tests:
+ # Code from module environ:
+ # Code from module environ-tests:
# Code from module errno:
+ # Code from module errno-tests:
# Code from module error:
# Code from module exitfail:
# Code from module extensions:
- AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS])
# Code from module extern-inline:
# Code from module fcntl-h:
+ # Code from module fcntl-h-tests:
+ # Code from module fd-hook:
+ # Code from module fdl:
+ # Code from module fdopen:
+ # Code from module fdopen-tests:
+ # Code from module fflush:
+ AC_REQUIRE([AC_FUNC_FSEEKO])
+ # Code from module fflush-tests:
+ # Code from module fgetc-tests:
+ # Code from module file-has-acl:
+ # Code from module file-has-acl-tests:
+ # Code from module filename:
+ # Code from module flexmember:
+ # Code from module fpending:
+ # Code from module fpending-tests:
+ # Code from module fpurge:
+ # Code from module fpurge-tests:
+ # Code from module fputc-tests:
+ # Code from module fread-tests:
+ # Code from module freading:
+ # Code from module freading-tests:
+ # Code from module fseek:
+ # Code from module fseek-tests:
+ # Code from module fseeko:
+ AC_REQUIRE([AC_FUNC_FSEEKO])
+ # Code from module fseeko-tests:
# Code from module fstat:
+ # Code from module fstat-tests:
+ # Code from module ftell:
+ # Code from module ftell-tests:
+ # Code from module ftello:
+ AC_REQUIRE([AC_FUNC_FSEEKO])
+ # Code from module ftello-tests:
+ # Code from module fwrite-tests:
# Code from module fwriting:
+ # Code from module fwriting-tests:
+ # Code from module gendocs:
+ # Code from module getcwd-lgpl:
+ # Code from module getcwd-lgpl-tests:
# Code from module getdelim:
+ # Code from module getdelim-tests:
+ # Code from module getdtablesize:
+ # Code from module getdtablesize-tests:
# Code from module getopt:
# Code from module getopt-gnu:
+ # Code from module getopt-gnu-tests:
# Code from module getopt-posix:
+ # Code from module getopt-posix-tests:
+ # Code from module getpagesize:
+ # Code from module getprogname:
+ # Code from module getprogname-tests:
# Code from module gettext-h:
# Code from module gettimeofday:
+ # Code from module gettimeofday-tests:
+ # Code from module git-version-gen:
+ # Code from module gitlog-to-changelog:
+ # Code from module gnu-web-doc-update:
+ # Code from module gnumakefile:
+ # Code from module gnupload:
+ # Code from module hard-locale:
+ # Code from module havelib:
+ # Code from module ignore-value:
+ # Code from module ignore-value-tests:
# Code from module include_next:
# 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 isblank:
+ # Code from module isblank-tests:
# Code from module langinfo:
+ # Code from module langinfo-tests:
# Code from module largefile:
AC_REQUIRE([AC_SYS_LARGEFILE])
+ # Code from module limits-h:
+ # Code from module limits-h-tests:
+ # Code from module link:
+ # Code from module link-tests:
# Code from module localcharset:
# Code from module locale:
+ # Code from module locale-tests:
# Code from module localeconv:
+ # Code from module localeconv-tests:
+ # Code from module localename:
+ # Code from module localename-tests:
+ # Code from module lock:
+ # Code from module lseek:
+ # Code from module lseek-tests:
# Code from module lstat:
- # Code from module malloc-gnu:
+ # Code from module lstat-tests:
+ # Code from module maintainer-makefile:
# Code from module malloc-posix:
# Code from module malloca:
+ # Code from module malloca-tests:
+ # Code from module manywarnings:
# Code from module mbrlen:
# Code from module mbrtowc:
+ # Code from module mbrtowc-tests:
# Code from module mbsinit:
+ # Code from module mbsinit-tests:
# Code from module mbtowc:
# Code from module memchr:
+ # Code from module memchr-tests:
+ # Code from module memrchr:
+ # Code from module memrchr-tests:
+ # Code from module minmax:
# Code from module mkostemp:
# Code from module msvc-inval:
# Code from module msvc-nothrow:
# Code from module multiarch:
# Code from module nl_langinfo:
+ # Code from module nl_langinfo-tests:
# Code from module nocrash:
+ # Code from module non-recursive-gnulib-prefix-hack:
# Code from module obstack:
+ # Code from module open:
+ # Code from module open-tests:
+ # Code from module opendir:
# Code from module pathmax:
+ # Code from module pathmax-tests:
+ # Code from module progname:
+ # Code from module putenv:
+ # Code from module qcopy-acl:
+ # Code from module qset-acl:
# Code from module quote:
# Code from module quotearg:
# Code from module quotearg-simple:
+ # Code from module quotearg-simple-tests:
+ # Code from module read-file:
+ # Code from module read-file-tests:
+ # Code from module readdir:
# Code from module readlink:
+ # Code from module readlink-tests:
+ # Code from module readme-release:
# Code from module realloc-posix:
# Code from module regex:
+ # Code from module regex-tests:
# Code from module rename:
+ # Code from module rename-tests:
# Code from module rmdir:
+ # Code from module rmdir-tests:
# Code from module same-inode:
+ # Code from module secure_getenv:
# 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 snippet/_Noreturn:
# Code from module snippet/arg-nonnull:
# Code from module snippet/c++defs:
@@ -111,6 +253,9 @@ AC_DEFUN([gl_EARLY],
# Code from module ssize_t:
# Code from module stat:
# Code from module stat-macros:
+ # Code from module stat-tests:
+ # Code from module stdalign:
+ # Code from module stdalign-tests:
# Code from module stdarg:
dnl Some compilers (e.g., AIX 5.3 cc) need to be in c99 mode
dnl for the builtin va_copy to work. With Autoconf 2.60 or later,
@@ -118,32 +263,66 @@ AC_DEFUN([gl_EARLY],
dnl shouldn't hurt, though installers are on their own to set c99 mode.
gl_PROG_CC_C99
# Code from module stdbool:
+ # Code from module stdbool-tests:
# Code from module stddef:
+ # Code from module stddef-tests:
# Code from module stdint:
+ # Code from module stdint-tests:
# Code from module stdio:
+ # Code from module stdio-tests:
# Code from module stdlib:
+ # Code from module stdlib-tests:
+ # Code from module strdup-posix:
# Code from module streq:
# Code from module strerror:
# Code from module strerror-override:
+ # Code from module strerror-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_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 tempname:
+ # Code from module test-framework-sh:
+ # Code from module test-framework-sh-tests:
+ # Code from module threadlib:
+ gl_THREADLIB_EARLY
# Code from module time:
+ # Code from module time-tests:
# Code from module unistd:
+ # Code from module unistd-tests:
# Code from module unlocked-io:
+ # Code from module unsetenv:
+ # Code from module unsetenv-tests:
+ # Code from module update-copyright:
+ # Code from module update-copyright-tests:
+ # Code from module useless-if-before-free:
+ # Code from module vc-list-files:
+ # Code from module vc-list-files-tests:
# Code from module verify:
+ # Code from module verify-tests:
# Code from module version-etc:
# Code from module version-etc-fsf:
+ # Code from module version-etc-tests:
+ # Code from module warnings:
# Code from module wchar:
+ # Code from module wchar-tests:
# Code from module wcrtomb:
+ # Code from module wcrtomb-tests:
# Code from module wctob:
# Code from module wctomb:
# Code from module wctype-h:
+ # Code from module wctype-h-tests:
# Code from module xalloc:
# Code from module xalloc-die:
+ # Code from module xalloc-die-tests:
# Code from module xalloc-oversized:
])
@@ -165,12 +344,14 @@ AC_DEFUN([gl_INIT],
gl_source_base='lib'
gl_FUNC_ACL
gl_FUNC_ALLOCA
+ gl_ASSERT
gl_FUNC_BTOWC
if test $HAVE_BTOWC = 0 || test $REPLACE_BTOWC = 1; then
AC_LIBOBJ([btowc])
gl_PREREQ_BTOWC
fi
gl_WCHAR_MODULE_INDICATOR([btowc])
+ gl___BUILTIN_EXPECT
gl_CANONICALIZE_LGPL
if test $HAVE_CANONICALIZE_FILE_NAME = 0 || test $REPLACE_CANONICALIZE_FILE_NAME = 1; then
AC_LIBOBJ([canonicalize-lgpl])
@@ -179,7 +360,11 @@ AC_DEFUN([gl_INIT],
gl_STDLIB_MODULE_INDICATOR([canonicalize_file_name])
gl_STDLIB_MODULE_INDICATOR([realpath])
gl_UNISTD_MODULE_INDICATOR([chdir])
+ gl_CLOSE_STREAM
+ gl_MODULE_INDICATOR([close-stream])
+ gl_CLOSEOUT
gl_CONFIGMAKE_PREP
+ gl_CTYPE_H
gl_DIRNAME_LGPL
gl_DOUBLE_SLASH_ROOT
gl_HEADER_ERRNO_H
@@ -193,6 +378,10 @@ AC_DEFUN([gl_INIT],
AM_][XGETTEXT_OPTION([--flag=error_at_line:5:c-format])])
AC_REQUIRE([gl_EXTERN_INLINE])
gl_FCNTL_H
+ gl_FUNC_FPENDING
+ if test $gl_cv_func___fpending = no; then
+ AC_LIBOBJ([fpending])
+ fi
gl_FUNC_FSTAT
if test $REPLACE_FSTAT = 1; then
AC_LIBOBJ([fstat])
@@ -218,7 +407,6 @@ AC_DEFUN([gl_INIT],
GNULIB_GL_UNISTD_H_GETOPT=1
fi
AC_SUBST([GNULIB_GL_UNISTD_H_GETOPT])
- gl_MODULE_INDICATOR_FOR_TESTS([getopt-gnu])
gl_FUNC_GETOPT_POSIX
if test $REPLACE_GETOPT = 1; then
AC_LIBOBJ([getopt])
@@ -228,6 +416,7 @@ AC_DEFUN([gl_INIT],
GNULIB_GL_UNISTD_H_GETOPT=1
fi
AC_SUBST([GNULIB_GL_UNISTD_H_GETOPT])
+ gl_FUNC_GETPROGNAME
AC_SUBST([LIBINTL])
AC_SUBST([LTLIBINTL])
gl_FUNC_GETTIMEOFDAY
@@ -236,8 +425,25 @@ AC_DEFUN([gl_INIT],
gl_PREREQ_GETTIMEOFDAY
fi
gl_SYS_TIME_MODULE_INDICATOR([gettimeofday])
+ # Autoconf 2.61a.99 and earlier don't support linking a file only
+ # in VPATH builds. But since GNUmakefile is for maintainer use
+ # only, it does not matter if we skip the link with older autoconf.
+ # Automake 1.10.1 and earlier try to remove GNUmakefile in non-VPATH
+ # builds, so use a shell variable to bypass this.
+ GNUmakefile=GNUmakefile
+ m4_if(m4_version_compare([2.61a.100],
+ m4_defn([m4_PACKAGE_VERSION])), [1], [],
+ [AC_CONFIG_LINKS([$GNUmakefile:$GNUmakefile], [],
+ [GNUmakefile=$GNUmakefile])])
+ gl_HARD_LOCALE
+ gl_FUNC_ISBLANK
+ if test $HAVE_ISBLANK = 0; then
+ AC_LIBOBJ([isblank])
+ fi
+ gl_CTYPE_MODULE_INDICATOR([isblank])
gl_LANGINFO_H
AC_REQUIRE([gl_LARGEFILE])
+ gl_LIMITS_H
gl_LOCALCHARSET
LOCALCHARSET_TESTS_ENVIRONMENT="CHARSETALIASDIR=\"\$(abs_top_builddir)/$gl_source_base\""
AC_SUBST([LOCALCHARSET_TESTS_ENVIRONMENT])
@@ -248,17 +454,17 @@ AC_DEFUN([gl_INIT],
gl_PREREQ_LOCALECONV
fi
gl_LOCALE_MODULE_INDICATOR([localeconv])
+ gl_LOCK
+ gl_MODULE_INDICATOR([lock])
gl_FUNC_LSTAT
if test $REPLACE_LSTAT = 1; then
AC_LIBOBJ([lstat])
gl_PREREQ_LSTAT
fi
gl_SYS_STAT_MODULE_INDICATOR([lstat])
- gl_FUNC_MALLOC_GNU
- if test $REPLACE_MALLOC = 1; then
- AC_LIBOBJ([malloc])
- fi
- gl_MODULE_INDICATOR([malloc-gnu])
+ AC_CONFIG_COMMANDS_PRE([m4_ifdef([AH_HEADER],
+ [AC_SUBST([CONFIG_INCLUDE], m4_defn([AH_HEADER]))])])
+ AC_REQUIRE([AC_PROG_SED])
gl_FUNC_MALLOC_POSIX
if test $REPLACE_MALLOC = 1; then
AC_LIBOBJ([malloc])
@@ -295,6 +501,13 @@ AC_DEFUN([gl_INIT],
gl_PREREQ_MEMCHR
fi
gl_STRING_MODULE_INDICATOR([memchr])
+ gl_FUNC_MEMRCHR
+ if test $ac_cv_func_memrchr = no; then
+ AC_LIBOBJ([memrchr])
+ gl_PREREQ_MEMRCHR
+ fi
+ gl_STRING_MODULE_INDICATOR([memrchr])
+ gl_MINMAX
gl_FUNC_MKOSTEMP
if test $HAVE_MKOSTEMP = 0; then
AC_LIBOBJ([mkostemp])
@@ -302,11 +515,11 @@ AC_DEFUN([gl_INIT],
fi
gl_MODULE_INDICATOR([mkostemp])
gl_STDLIB_MODULE_INDICATOR([mkostemp])
- gl_MSVC_INVAL
+ AC_REQUIRE([gl_MSVC_INVAL])
if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then
AC_LIBOBJ([msvc-inval])
fi
- gl_MSVC_NOTHROW
+ AC_REQUIRE([gl_MSVC_NOTHROW])
if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then
AC_LIBOBJ([msvc-nothrow])
fi
@@ -316,9 +529,19 @@ AC_DEFUN([gl_INIT],
AC_LIBOBJ([nl_langinfo])
fi
gl_LANGINFO_MODULE_INDICATOR([nl_langinfo])
+ dnl Run our hack near the end, just before config.status creation.
+ dnl It must happen late, i.e., after gl_LIBOBJS has been finalized.
+ AC_CONFIG_COMMANDS_PRE([
+ dnl Note we can't currently pass $gl_source_base instead of 'lib',
+ dnl because $gl_source_base is unset or the wrong value in the references
+ dnl generated in m4/non-recursive-gnulib-prefix-hack.m4
+ gl_NON_RECURSIVE_GNULIB_PREFIX_HACK([lib])
+ ])
AC_FUNC_OBSTACK
dnl Note: AC_FUNC_OBSTACK does AC_LIBSOURCES([obstack.h, obstack.c]).
gl_PATHMAX
+ AC_CHECK_DECLS([program_invocation_name], [], [], [#include <errno.h>])
+ AC_CHECK_DECLS([program_invocation_short_name], [], [], [#include <errno.h>])
gl_QUOTE
gl_QUOTEARG
gl_FUNC_READLINK
@@ -327,11 +550,6 @@ AC_DEFUN([gl_INIT],
gl_PREREQ_READLINK
fi
gl_UNISTD_MODULE_INDICATOR([readlink])
- gl_FUNC_REALLOC_POSIX
- if test $REPLACE_REALLOC = 1; then
- AC_LIBOBJ([realloc])
- fi
- gl_STDLIB_MODULE_INDICATOR([realloc-posix])
gl_REGEX
if test $ac_use_included_regex = yes; then
AC_LIBOBJ([regex])
@@ -347,6 +565,12 @@ 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
@@ -359,6 +583,7 @@ AC_DEFUN([gl_INIT],
gl_PREREQ_STAT
fi
gl_SYS_STAT_MODULE_INDICATOR([stat])
+ gl_STDALIGN_H
gl_STDARG_H
AM_STDBOOL_H
gl_STDDEF_H
@@ -391,6 +616,7 @@ AC_DEFUN([gl_INIT],
gl_SYS_TYPES_H
AC_PROG_MKDIR_P
gl_FUNC_GEN_TEMPNAME
+ gl_THREADLIB
gl_HEADER_TIME_H
gl_UNISTD_H
gl_FUNC_GLIBC_UNLOCKED_IO
@@ -455,13 +681,211 @@ AC_DEFUN([gl_INIT],
m4_pushdef([gltests_LIBSOURCES_LIST], [])
m4_pushdef([gltests_LIBSOURCES_DIR], [])
gl_COMMON
- gl_source_base='tests'
+ gl_source_base='gnulib-tests'
changequote(,)dnl
gltests_WITNESS=IN_`echo "${PACKAGE-$PACKAGE_TARNAME}" | LC_ALL=C tr abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ | LC_ALL=C sed -e 's/[^A-Z0-9_]/_/g'`_GNULIB_TESTS
changequote([, ])dnl
AC_SUBST([gltests_WITNESS])
gl_module_indicator_condition=$gltests_WITNESS
m4_pushdef([gl_MODULE_INDICATOR_CONDITION], [$gl_module_indicator_condition])
+ gt_LOCALE_FR
+ gt_LOCALE_FR_UTF8
+ gt_LOCALE_FR
+ gt_LOCALE_TR_UTF8
+ gl_FUNC_CLOSE
+ if test $REPLACE_CLOSE = 1; then
+ AC_LIBOBJ([close])
+ fi
+ gl_UNISTD_MODULE_INDICATOR([close])
+ gl_FUNC_CLOSEDIR
+ if test $HAVE_CLOSEDIR = 0 || test $REPLACE_CLOSEDIR = 1; then
+ AC_LIBOBJ([closedir])
+ fi
+ gl_DIRENT_MODULE_INDICATOR([closedir])
+ gl_DIRENT_H
+ gl_FUNC_DIRFD
+ if test $ac_cv_func_dirfd = no && test $gl_cv_func_dirfd_macro = no \
+ || test $REPLACE_DIRFD = 1; then
+ AC_LIBOBJ([dirfd])
+ gl_PREREQ_DIRFD
+ fi
+ gl_DIRENT_MODULE_INDICATOR([dirfd])
+ gl_FUNC_DUP2
+ if test $HAVE_DUP2 = 0 || test $REPLACE_DUP2 = 1; then
+ AC_LIBOBJ([dup2])
+ gl_PREREQ_DUP2
+ fi
+ gl_UNISTD_MODULE_INDICATOR([dup2])
+ gl_ENVIRON
+ gl_UNISTD_MODULE_INDICATOR([environ])
+ gl_FUNC_FDOPEN
+ if test $REPLACE_FDOPEN = 1; then
+ AC_LIBOBJ([fdopen])
+ gl_PREREQ_FDOPEN
+ fi
+ gl_STDIO_MODULE_INDICATOR([fdopen])
+ gl_FUNC_FFLUSH
+ if test $REPLACE_FFLUSH = 1; then
+ AC_LIBOBJ([fflush])
+ gl_PREREQ_FFLUSH
+ fi
+ gl_MODULE_INDICATOR([fflush])
+ gl_STDIO_MODULE_INDICATOR([fflush])
+ gl_FILE_HAS_ACL
+ AC_CHECK_DECLS_ONCE([alarm])
+ AC_C_FLEXIBLE_ARRAY_MEMBER
+ gl_FUNC_FPURGE
+ if test $HAVE_FPURGE = 0 || test $REPLACE_FPURGE = 1; then
+ AC_LIBOBJ([fpurge])
+ fi
+ gl_STDIO_MODULE_INDICATOR([fpurge])
+ gl_FUNC_FREADING
+ gl_FUNC_FSEEK
+ if test $REPLACE_FSEEK = 1; then
+ AC_LIBOBJ([fseek])
+ fi
+ gl_STDIO_MODULE_INDICATOR([fseek])
+ gl_FUNC_UNGETC_WORKS
+ gl_FUNC_FSEEKO
+ if test $HAVE_FSEEKO = 0 || test $REPLACE_FSEEKO = 1; then
+ AC_LIBOBJ([fseeko])
+ gl_PREREQ_FSEEKO
+ fi
+ gl_STDIO_MODULE_INDICATOR([fseeko])
+ gl_FUNC_UNGETC_WORKS
+ gl_FUNC_FTELL
+ if test $REPLACE_FTELL = 1; then
+ AC_LIBOBJ([ftell])
+ fi
+ gl_STDIO_MODULE_INDICATOR([ftell])
+ gl_FUNC_UNGETC_WORKS
+ gl_FUNC_FTELLO
+ if test $HAVE_FTELLO = 0 || test $REPLACE_FTELLO = 1; then
+ AC_LIBOBJ([ftello])
+ gl_PREREQ_FTELLO
+ fi
+ gl_STDIO_MODULE_INDICATOR([ftello])
+ gl_FUNC_UNGETC_WORKS
+ gl_FUNC_GETCWD_LGPL
+ if test $REPLACE_GETCWD = 1; then
+ AC_LIBOBJ([getcwd-lgpl])
+ fi
+ gl_UNISTD_MODULE_INDICATOR([getcwd])
+ gl_FUNC_GETDTABLESIZE
+ if test $HAVE_GETDTABLESIZE = 0 || test $REPLACE_GETDTABLESIZE = 1; then
+ AC_LIBOBJ([getdtablesize])
+ gl_PREREQ_GETDTABLESIZE
+ fi
+ gl_UNISTD_MODULE_INDICATOR([getdtablesize])
+ gl_FUNC_GETPAGESIZE
+ if test $REPLACE_GETPAGESIZE = 1; then
+ AC_LIBOBJ([getpagesize])
+ fi
+ gl_UNISTD_MODULE_INDICATOR([getpagesize])
+ gl_INTTYPES_H
+ gl_INTTYPES_INCOMPLETE
+ gl_FUNC_LINK
+ if test $HAVE_LINK = 0 || test $REPLACE_LINK = 1; then
+ AC_LIBOBJ([link])
+ fi
+ gl_UNISTD_MODULE_INDICATOR([link])
+ AC_CHECK_FUNCS_ONCE([newlocale])
+ gl_LOCALENAME
+ AC_CHECK_FUNCS_ONCE([newlocale])
+ gl_FUNC_LSEEK
+ if test $REPLACE_LSEEK = 1; then
+ AC_LIBOBJ([lseek])
+ fi
+ gl_UNISTD_MODULE_INDICATOR([lseek])
+ gt_LOCALE_FR
+ gt_LOCALE_FR_UTF8
+ gt_LOCALE_JA
+ gt_LOCALE_ZH_CN
+ gt_LOCALE_FR_UTF8
+ dnl Check for prerequisites for memory fence checks.
+ gl_FUNC_MMAP_ANON
+ AC_CHECK_HEADERS_ONCE([sys/mman.h])
+ AC_CHECK_FUNCS_ONCE([mprotect])
+ gl_FUNC_MMAP_ANON
+ AC_CHECK_HEADERS_ONCE([sys/mman.h])
+ AC_CHECK_FUNCS_ONCE([mprotect])
+ gt_LOCALE_FR
+ gt_LOCALE_FR_UTF8
+ gl_FUNC_OPEN
+ if test $REPLACE_OPEN = 1; then
+ AC_LIBOBJ([open])
+ gl_PREREQ_OPEN
+ fi
+ gl_FCNTL_MODULE_INDICATOR([open])
+ gl_FUNC_OPENDIR
+ if test $HAVE_OPENDIR = 0 || test $REPLACE_OPENDIR = 1; then
+ AC_LIBOBJ([opendir])
+ fi
+ gl_DIRENT_MODULE_INDICATOR([opendir])
+ gl_FUNC_PUTENV
+ if test $REPLACE_PUTENV = 1; then
+ AC_LIBOBJ([putenv])
+ gl_PREREQ_PUTENV
+ fi
+ gl_STDLIB_MODULE_INDICATOR([putenv])
+ dnl Check for prerequisites for memory fence checks.
+ dnl FIXME: zerosize-ptr.h requires these: make a module for it
+ gl_FUNC_MMAP_ANON
+ AC_CHECK_HEADERS_ONCE([sys/mman.h])
+ AC_CHECK_FUNCS_ONCE([mprotect])
+ gl_PREREQ_READ_FILE
+ gl_FUNC_READDIR
+ if test $HAVE_READDIR = 0; then
+ AC_LIBOBJ([readdir])
+ fi
+ gl_DIRENT_MODULE_INDICATOR([readdir])
+ gl_FUNC_REALLOC_POSIX
+ if test $REPLACE_REALLOC = 1; then
+ AC_LIBOBJ([realloc])
+ fi
+ gl_STDLIB_MODULE_INDICATOR([realloc-posix])
+ gl_FUNC_SETENV
+ if test $HAVE_SETENV = 0 || test $REPLACE_SETENV = 1; then
+ AC_LIBOBJ([setenv])
+ fi
+ gl_STDLIB_MODULE_INDICATOR([setenv])
+ gl_FUNC_SETLOCALE
+ if test $REPLACE_SETLOCALE = 1; then
+ AC_LIBOBJ([setlocale])
+ gl_PREREQ_SETLOCALE
+ fi
+ gl_LOCALE_MODULE_INDICATOR([setlocale])
+ gt_LOCALE_FR
+ gt_LOCALE_FR_UTF8
+ gt_LOCALE_JA
+ gt_LOCALE_ZH_CN
+ AC_REQUIRE([gt_TYPE_WCHAR_T])
+ AC_REQUIRE([gt_TYPE_WINT_T])
+ gl_FUNC_STRDUP_POSIX
+ if test $ac_cv_func_strdup = no || test $REPLACE_STRDUP = 1; then
+ AC_LIBOBJ([strdup])
+ gl_PREREQ_STRDUP
+ fi
+ gl_STRING_MODULE_INDICATOR([strdup])
+ gl_FUNC_SYMLINK
+ if test $HAVE_SYMLINK = 0 || test $REPLACE_SYMLINK = 1; then
+ AC_LIBOBJ([symlink])
+ fi
+ gl_UNISTD_MODULE_INDICATOR([symlink])
+ gl_FUNC_UNSETENV
+ if test $HAVE_UNSETENV = 0 || test $REPLACE_UNSETENV = 1; then
+ AC_LIBOBJ([unsetenv])
+ gl_PREREQ_UNSETENV
+ fi
+ gl_STDLIB_MODULE_INDICATOR([unsetenv])
+ abs_aux_dir=`cd "$ac_aux_dir"; pwd`
+ AC_SUBST([abs_aux_dir])
+ abs_aux_dir=`cd "$ac_aux_dir"; pwd`
+ AC_SUBST([abs_aux_dir])
+ gt_LOCALE_FR
+ gt_LOCALE_FR_UTF8
+ gt_LOCALE_JA
+ gt_LOCALE_ZH_CN
m4_popdef([gl_MODULE_INDICATOR_CONDITION])
m4_ifval(gltests_LIBSOURCES_LIST, [
m4_syscmd([test ! -d ]m4_defn([gltests_LIBSOURCES_DIR])[ ||
@@ -497,6 +921,8 @@ changequote([, ])dnl
AC_SUBST([LIBSED_LIBDEPS])
LIBSED_LTLIBDEPS="$gl_ltlibdeps"
AC_SUBST([LIBSED_LTLIBDEPS])
+ LIBTESTS_LIBDEPS="$gltests_libdeps"
+ AC_SUBST([LIBTESTS_LIBDEPS])
])
# Like AC_LIBOBJ, except that the module name goes
@@ -547,7 +973,7 @@ AC_DEFUN([gltests_REPLACE_FUNCS], [
AC_DEFUN([gltests_LIBSOURCES], [
m4_foreach([_gl_NAME], [$1], [
m4_if(_gl_NAME, [alloca.c], [], [
- m4_define([gltests_LIBSOURCES_DIR], [tests])
+ m4_define([gltests_LIBSOURCES_DIR], [gnulib-tests])
m4_append([gltests_LIBSOURCES_LIST], _gl_NAME, [ ])
])
])
@@ -556,14 +982,32 @@ AC_DEFUN([gltests_LIBSOURCES], [
# This macro records the list of files which have been installed by
# gnulib-tool and may be removed by future gnulib-tool invocations.
AC_DEFUN([gl_FILE_LIST], [
+ build-aux/announce-gen
+ build-aux/config.rpath
+ build-aux/do-release-commit-and-tag
+ build-aux/gendocs.sh
+ build-aux/git-version-gen
+ build-aux/gitlog-to-changelog
+ 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/acl-errno-valid.c
+ lib/acl-internal.c
lib/acl-internal.h
lib/acl.h
lib/acl_entries.c
+ lib/alignof.h
lib/alloca.c
lib/alloca.in.h
lib/basename-lgpl.c
@@ -575,8 +1019,15 @@ AC_DEFUN([gl_FILE_LIST], [
lib/c-strcaseeq.h
lib/c-strncasecmp.c
lib/canonicalize-lgpl.c
+ lib/close-stream.c
+ lib/close-stream.h
+ lib/closeout.c
+ lib/closeout.h
lib/config.charset
lib/copy-acl.c
+ lib/ctype.in.h
+ lib/dfa.c
+ lib/dfa.h
lib/dirname-lgpl.c
lib/dirname.h
lib/dosname.h
@@ -586,24 +1037,38 @@ AC_DEFUN([gl_FILE_LIST], [
lib/exitfail.c
lib/exitfail.h
lib/fcntl.in.h
- lib/file-has-acl.c
+ lib/fpending.c
+ lib/fpending.h
lib/fstat.c
lib/fwriting.c
lib/fwriting.h
+ lib/get-permissions.c
lib/getdelim.c
lib/getfilecon.c
lib/getopt.c
lib/getopt.in.h
lib/getopt1.c
lib/getopt_int.h
+ lib/getprogname.c
+ lib/getprogname.h
lib/gettext.h
lib/gettimeofday.c
+ lib/glthread/lock.c
+ lib/glthread/lock.h
+ lib/glthread/threadlib.c
+ lib/hard-locale.c
+ lib/hard-locale.h
+ lib/ignore-value.h
lib/intprops.h
+ lib/isblank.c
lib/langinfo.in.h
+ lib/limits.in.h
lib/localcharset.c
lib/localcharset.h
lib/locale.in.h
lib/localeconv.c
+ lib/localeinfo.c
+ lib/localeinfo.h
lib/lstat.c
lib/malloc.c
lib/malloca.c
@@ -616,6 +1081,8 @@ AC_DEFUN([gl_FILE_LIST], [
lib/mbtowc.c
lib/memchr.c
lib/memchr.valgrind
+ lib/memrchr.c
+ lib/minmax.h
lib/mkostemp.c
lib/msvc-inval.c
lib/msvc-inval.h
@@ -625,11 +1092,14 @@ AC_DEFUN([gl_FILE_LIST], [
lib/obstack.c
lib/obstack.h
lib/pathmax.h
+ lib/progname.c
+ lib/progname.h
+ lib/qcopy-acl.c
+ lib/qset-acl.c
lib/quote.h
lib/quotearg.c
lib/quotearg.h
lib/readlink.c
- lib/realloc.c
lib/ref-add.sin
lib/ref-del.sin
lib/regcomp.c
@@ -645,15 +1115,17 @@ AC_DEFUN([gl_FILE_LIST], [
lib/se-context.in.h
lib/se-selinux.c
lib/se-selinux.in.h
- lib/set-mode-acl.c
+ lib/secure_getenv.c
+ lib/set-acl.c
+ lib/set-permissions.c
lib/stat-macros.h
lib/stat.c
+ lib/stdalign.in.h
lib/stdarg.in.h
lib/stdbool.in.h
lib/stddef.in.h
lib/stdint.in.h
lib/stdio-impl.h
- lib/stdio.c
lib/stdio.in.h
lib/stdlib.in.h
lib/streq.h
@@ -688,86 +1160,147 @@ AC_DEFUN([gl_FILE_LIST], [
lib/xalloc.h
lib/xmalloc.c
m4/00gnulib.m4
+ m4/absolute-header.m4
m4/acl.m4
m4/alloca.m4
+ m4/assert.m4
m4/btowc.m4
+ m4/builtin-expect.m4
m4/canonicalize.m4
+ m4/close-stream.m4
+ m4/close.m4
+ m4/closedir.m4
+ m4/closeout.m4
m4/codeset.m4
m4/configmake.m4
+ m4/ctype.m4
+ m4/dirent_h.m4
+ m4/dirfd.m4
m4/dirname.m4
m4/double-slash-root.m4
+ m4/dup2.m4
m4/eealloc.m4
+ m4/environ.m4
m4/errno_h.m4
m4/error.m4
m4/extensions.m4
m4/extern-inline.m4
m4/fcntl-o.m4
m4/fcntl_h.m4
+ m4/fdopen.m4
+ m4/fflush.m4
+ m4/flexmember.m4
+ m4/fpending.m4
+ m4/fpurge.m4
+ m4/freading.m4
+ m4/fseek.m4
+ m4/fseeko.m4
m4/fstat.m4
+ m4/ftell.m4
+ m4/ftello.m4
m4/fwriting.m4
+ m4/getcwd.m4
m4/getdelim.m4
+ m4/getdtablesize.m4
m4/getopt.m4
+ m4/getpagesize.m4
+ m4/getprogname.m4
m4/gettimeofday.m4
m4/glibc21.m4
m4/gnulib-common.m4
+ m4/hard-locale.m4
m4/include_next.m4
+ m4/intlmacosx.m4
+ m4/inttypes-pri.m4
+ m4/inttypes.m4
+ m4/isblank.m4
m4/langinfo_h.m4
m4/largefile.m4
+ m4/lcmessage.m4
+ m4/lib-ld.m4
+ m4/lib-link.m4
+ m4/lib-prefix.m4
+ m4/limits-h.m4
+ m4/link.m4
m4/localcharset.m4
m4/locale-fr.m4
m4/locale-ja.m4
+ m4/locale-tr.m4
m4/locale-zh.m4
m4/locale_h.m4
m4/localeconv.m4
+ m4/localename.m4
+ m4/lock.m4
m4/longlong.m4
+ m4/lseek.m4
m4/lstat.m4
m4/malloc.m4
m4/malloca.m4
+ m4/manywarnings.m4
m4/mbrlen.m4
m4/mbrtowc.m4
m4/mbsinit.m4
m4/mbstate_t.m4
m4/mbtowc.m4
m4/memchr.m4
+ m4/memrchr.m4
+ m4/minmax.m4
m4/mkostemp.m4
m4/mmap-anon.m4
+ m4/mode_t.m4
m4/msvc-inval.m4
m4/msvc-nothrow.m4
m4/multiarch.m4
m4/nl_langinfo.m4
m4/nocrash.m4
+ m4/non-recursive-gnulib-prefix-hack.m4
+ m4/obstack.m4
m4/off_t.m4
+ m4/open.m4
+ m4/opendir.m4
m4/pathmax.m4
+ m4/putenv.m4
m4/quote.m4
m4/quotearg.m4
+ m4/read-file.m4
+ m4/readdir.m4
m4/readlink.m4
m4/realloc.m4
m4/regex.m4
m4/rename.m4
m4/rmdir.m4
+ m4/secure_getenv.m4
m4/selinux-context-h.m4
m4/selinux-selinux-h.m4
+ m4/setenv.m4
+ m4/setlocale.m4
m4/ssize_t.m4
m4/stat.m4
+ m4/stdalign.m4
m4/stdarg.m4
m4/stdbool.m4
m4/stddef_h.m4
m4/stdint.m4
m4/stdio_h.m4
m4/stdlib_h.m4
+ m4/strdup.m4
m4/strerror.m4
m4/string_h.m4
m4/strverscmp.m4
+ m4/symlink.m4
m4/sys_socket_h.m4
m4/sys_stat_h.m4
m4/sys_time_h.m4
m4/sys_types_h.m4
m4/tempname.m4
+ m4/threadlib.m4
m4/time_h.m4
+ m4/ungetc.m4
m4/unistd_h.m4
m4/unlocked-io.m4
m4/version-etc.m4
m4/warn-on-use.m4
+ m4/warnings.m4
m4/wchar_h.m4
m4/wchar_t.m4
m4/wcrtomb.m4
@@ -776,4 +1309,226 @@ AC_DEFUN([gl_FILE_LIST], [
m4/wctype_h.m4
m4/wint_t.m4
m4/xalloc.m4
+ tests/dfa-invalid-char-class.sh
+ tests/dfa-match-aux.c
+ tests/dfa-match.sh
+ tests/init.sh
+ tests/macros.h
+ tests/signature.h
+ tests/test-alignof.c
+ tests/test-alloca-opt.c
+ tests/test-binary-io.c
+ tests/test-binary-io.sh
+ tests/test-btowc.c
+ tests/test-btowc1.sh
+ tests/test-btowc2.sh
+ tests/test-c-ctype.c
+ tests/test-c-strcase.sh
+ tests/test-c-strcasecmp.c
+ tests/test-c-strncasecmp.c
+ tests/test-canonicalize-lgpl.c
+ tests/test-chdir.c
+ tests/test-close.c
+ tests/test-copy-acl-1.sh
+ tests/test-copy-acl-2.sh
+ tests/test-copy-acl.c
+ tests/test-copy-acl.sh
+ tests/test-ctype.c
+ tests/test-dirent.c
+ tests/test-dup2.c
+ tests/test-environ.c
+ tests/test-errno.c
+ tests/test-fcntl-h.c
+ tests/test-fdopen.c
+ tests/test-fflush.c
+ tests/test-fflush2.c
+ tests/test-fflush2.sh
+ tests/test-fgetc.c
+ tests/test-file-has-acl-1.sh
+ tests/test-file-has-acl-2.sh
+ tests/test-file-has-acl.c
+ tests/test-file-has-acl.sh
+ tests/test-fpending.c
+ tests/test-fpending.sh
+ tests/test-fpurge.c
+ tests/test-fputc.c
+ tests/test-fread.c
+ tests/test-freading.c
+ tests/test-fseek.c
+ tests/test-fseek.sh
+ tests/test-fseek2.sh
+ tests/test-fseeko.c
+ tests/test-fseeko.sh
+ tests/test-fseeko2.sh
+ tests/test-fseeko3.c
+ tests/test-fseeko3.sh
+ tests/test-fseeko4.c
+ tests/test-fseeko4.sh
+ tests/test-fstat.c
+ tests/test-ftell.c
+ tests/test-ftell.sh
+ tests/test-ftell2.sh
+ tests/test-ftell3.c
+ tests/test-ftello.c
+ tests/test-ftello.sh
+ tests/test-ftello2.sh
+ tests/test-ftello3.c
+ tests/test-ftello4.c
+ tests/test-ftello4.sh
+ tests/test-fwrite.c
+ tests/test-fwriting.c
+ tests/test-getcwd-lgpl.c
+ tests/test-getdelim.c
+ tests/test-getdtablesize.c
+ tests/test-getopt-gnu.c
+ tests/test-getopt-main.h
+ tests/test-getopt-posix.c
+ tests/test-getopt.h
+ tests/test-getopt_long.h
+ tests/test-getprogname.c
+ tests/test-gettimeofday.c
+ tests/test-ignore-value.c
+ tests/test-init.sh
+ tests/test-intprops.c
+ tests/test-inttypes.c
+ tests/test-isblank.c
+ tests/test-langinfo.c
+ tests/test-limits-h.c
+ tests/test-link.c
+ tests/test-link.h
+ tests/test-locale.c
+ tests/test-localeconv.c
+ tests/test-localename.c
+ tests/test-lseek.c
+ tests/test-lseek.sh
+ tests/test-lstat.c
+ tests/test-lstat.h
+ tests/test-malloca.c
+ tests/test-mbrtowc-w32-1.sh
+ tests/test-mbrtowc-w32-2.sh
+ tests/test-mbrtowc-w32-3.sh
+ tests/test-mbrtowc-w32-4.sh
+ tests/test-mbrtowc-w32-5.sh
+ tests/test-mbrtowc-w32.c
+ tests/test-mbrtowc.c
+ tests/test-mbrtowc1.sh
+ tests/test-mbrtowc2.sh
+ tests/test-mbrtowc3.sh
+ tests/test-mbrtowc4.sh
+ tests/test-mbrtowc5.sh
+ tests/test-mbsinit.c
+ tests/test-mbsinit.sh
+ tests/test-memchr.c
+ tests/test-memrchr.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-quotearg-simple.c
+ tests/test-quotearg.h
+ tests/test-read-file.c
+ tests/test-readlink.c
+ tests/test-readlink.h
+ tests/test-regex.c
+ tests/test-rename.c
+ tests/test-rename.h
+ tests/test-rmdir.c
+ tests/test-rmdir.h
+ tests/test-sameacls.c
+ tests/test-set-mode-acl-1.sh
+ tests/test-set-mode-acl-2.sh
+ tests/test-set-mode-acl.c
+ tests/test-set-mode-acl.sh
+ tests/test-setenv.c
+ tests/test-setlocale1.c
+ tests/test-setlocale1.sh
+ tests/test-setlocale2.c
+ tests/test-setlocale2.sh
+ tests/test-stat.c
+ tests/test-stat.h
+ tests/test-stdalign.c
+ tests/test-stdbool.c
+ tests/test-stddef.c
+ tests/test-stdint.c
+ tests/test-stdio.c
+ tests/test-stdlib.c
+ tests/test-strerror.c
+ tests/test-string.c
+ tests/test-strverscmp.c
+ tests/test-symlink.c
+ tests/test-symlink.h
+ tests/test-sys_stat.c
+ tests/test-sys_time.c
+ tests/test-sys_types.c
+ tests/test-sys_wait.h
+ tests/test-time.c
+ tests/test-unistd.c
+ tests/test-unsetenv.c
+ tests/test-update-copyright.sh
+ tests/test-vc-list-files-cvs.sh
+ tests/test-vc-list-files-git.sh
+ tests/test-verify.c
+ tests/test-verify.sh
+ tests/test-version-etc.c
+ tests/test-version-etc.sh
+ tests/test-wchar.c
+ tests/test-wcrtomb-w32-1.sh
+ tests/test-wcrtomb-w32-2.sh
+ tests/test-wcrtomb-w32-3.sh
+ tests/test-wcrtomb-w32-4.sh
+ tests/test-wcrtomb-w32-5.sh
+ tests/test-wcrtomb-w32.c
+ tests/test-wcrtomb.c
+ tests/test-wcrtomb.sh
+ tests/test-wctype-h.c
+ tests/test-xalloc-die.c
+ tests/test-xalloc-die.sh
+ tests/zerosize-ptr.h
+ tests=lib/binary-io.c
+ tests=lib/binary-io.h
+ tests=lib/close.c
+ tests=lib/closedir.c
+ tests=lib/dirent-private.h
+ tests=lib/dirent.in.h
+ tests=lib/dirfd.c
+ tests=lib/dup2.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
+ tests=lib/freading.h
+ tests=lib/fseek.c
+ tests=lib/fseeko.c
+ tests=lib/ftell.c
+ tests=lib/ftello.c
+ tests=lib/getcwd-lgpl.c
+ tests=lib/getdtablesize.c
+ tests=lib/getpagesize.c
+ tests=lib/inttypes.in.h
+ tests=lib/link.c
+ tests=lib/localename.c
+ tests=lib/localename.h
+ tests=lib/lseek.c
+ tests=lib/open.c
+ tests=lib/opendir.c
+ tests=lib/putenv.c
+ tests=lib/read-file.c
+ tests=lib/read-file.h
+ tests=lib/readdir.c
+ tests=lib/realloc.c
+ tests=lib/setenv.c
+ tests=lib/setlocale.c
+ tests=lib/stdio-impl.h
+ tests=lib/strdup.c
+ tests=lib/symlink.c
+ tests=lib/unsetenv.c
+ top/GNUmakefile
+ top/README-release
+ top/maint.mk
])
diff --git a/m4/hard-locale.m4 b/m4/hard-locale.m4
new file mode 100644
index 0000000..4661bfc
--- /dev/null
+++ b/m4/hard-locale.m4
@@ -0,0 +1,11 @@
+# hard-locale.m4 serial 8
+dnl Copyright (C) 2002-2006, 2009-2016 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 No prerequisites of lib/hard-locale.c.
+AC_DEFUN([gl_HARD_LOCALE],
+[
+ :
+])
diff --git a/m4/iconv.m4 b/m4/iconv.m4
index 7e7d13c..4b29c5f 100644
--- a/m4/iconv.m4
+++ b/m4/iconv.m4
@@ -1,7 +1,5 @@
-# -*- buffer-read-only: t -*- vi: set ro:
-# DO NOT EDIT! GENERATED AUTOMATICALLY!
-# iconv.m4 serial AM6 (gettext-0.17)
-dnl Copyright (C) 2000-2002, 2007 Free Software Foundation, Inc.
+# iconv.m4 serial 18 (gettext-0.18.2)
+dnl Copyright (C) 2000-2002, 2007-2014 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,44 +30,55 @@ AC_DEFUN([AM_ICONV_LINK],
dnl Add $INCICONV to CPPFLAGS before performing the following checks,
dnl because if the user has installed libiconv and not disabled its use
dnl via --without-libiconv-prefix, he wants to use it. The first
- dnl AC_TRY_LINK will then fail, the second AC_TRY_LINK will succeed.
+ dnl AC_LINK_IFELSE will then fail, the second AC_LINK_IFELSE will succeed.
am_save_CPPFLAGS="$CPPFLAGS"
AC_LIB_APPENDTOVAR([CPPFLAGS], [$INCICONV])
- AC_CACHE_CHECK([for iconv], am_cv_func_iconv, [
+ AC_CACHE_CHECK([for iconv], [am_cv_func_iconv], [
am_cv_func_iconv="no, consider installing GNU libiconv"
am_cv_lib_iconv=no
- AC_TRY_LINK([#include <stdlib.h>
-#include <iconv.h>],
- [iconv_t cd = iconv_open("","");
- iconv(cd,NULL,NULL,NULL,NULL);
- iconv_close(cd);],
- am_cv_func_iconv=yes)
+ AC_LINK_IFELSE(
+ [AC_LANG_PROGRAM(
+ [[
+#include <stdlib.h>
+#include <iconv.h>
+ ]],
+ [[iconv_t cd = iconv_open("","");
+ iconv(cd,NULL,NULL,NULL,NULL);
+ iconv_close(cd);]])],
+ [am_cv_func_iconv=yes])
if test "$am_cv_func_iconv" != yes; then
am_save_LIBS="$LIBS"
LIBS="$LIBS $LIBICONV"
- AC_TRY_LINK([#include <stdlib.h>
-#include <iconv.h>],
- [iconv_t cd = iconv_open("","");
- iconv(cd,NULL,NULL,NULL,NULL);
- iconv_close(cd);],
- am_cv_lib_iconv=yes
- am_cv_func_iconv=yes)
+ AC_LINK_IFELSE(
+ [AC_LANG_PROGRAM(
+ [[
+#include <stdlib.h>
+#include <iconv.h>
+ ]],
+ [[iconv_t cd = iconv_open("","");
+ iconv(cd,NULL,NULL,NULL,NULL);
+ iconv_close(cd);]])],
+ [am_cv_lib_iconv=yes]
+ [am_cv_func_iconv=yes])
LIBS="$am_save_LIBS"
fi
])
if test "$am_cv_func_iconv" = yes; then
- AC_CACHE_CHECK([for working iconv], am_cv_func_iconv_works, [
- dnl This tests against bugs in AIX 5.1 and HP-UX 11.11.
+ AC_CACHE_CHECK([for working iconv], [am_cv_func_iconv_works], [
+ dnl This tests against bugs in AIX 5.1, AIX 6.1..7.1, HP-UX 11.11,
+ dnl Solaris 10.
am_save_LIBS="$LIBS"
if test $am_cv_lib_iconv = yes; then
LIBS="$LIBS $LIBICONV"
fi
- AC_TRY_RUN([
+ AC_RUN_IFELSE(
+ [AC_LANG_SOURCE([[
#include <iconv.h>
#include <string.h>
int main ()
{
+ int result = 0;
/* Test against AIX 5.1 bug: Failures are not distinguishable from successful
returns. */
{
@@ -86,7 +95,47 @@ int main ()
(char **) &inptr, &inbytesleft,
&outptr, &outbytesleft);
if (res == 0)
- return 1;
+ result |= 1;
+ iconv_close (cd_utf8_to_88591);
+ }
+ }
+ /* Test against Solaris 10 bug: Failures are not distinguishable from
+ successful returns. */
+ {
+ iconv_t cd_ascii_to_88591 = iconv_open ("ISO8859-1", "646");
+ if (cd_ascii_to_88591 != (iconv_t)(-1))
+ {
+ static const char input[] = "\263";
+ char buf[10];
+ const char *inptr = input;
+ size_t inbytesleft = strlen (input);
+ char *outptr = buf;
+ size_t outbytesleft = sizeof (buf);
+ size_t res = iconv (cd_ascii_to_88591,
+ (char **) &inptr, &inbytesleft,
+ &outptr, &outbytesleft);
+ if (res == 0)
+ result |= 2;
+ iconv_close (cd_ascii_to_88591);
+ }
+ }
+ /* Test against AIX 6.1..7.1 bug: Buffer overrun. */
+ {
+ iconv_t cd_88591_to_utf8 = iconv_open ("UTF-8", "ISO-8859-1");
+ if (cd_88591_to_utf8 != (iconv_t)(-1))
+ {
+ static const char input[] = "\304";
+ static char buf[2] = { (char)0xDE, (char)0xAD };
+ const char *inptr = input;
+ size_t inbytesleft = 1;
+ char *outptr = buf;
+ size_t outbytesleft = 1;
+ size_t res = iconv (cd_88591_to_utf8,
+ (char **) &inptr, &inbytesleft,
+ &outptr, &outbytesleft);
+ if (res != (size_t)(-1) || outptr - buf > 1 || buf[1] != (char)0xAD)
+ result |= 4;
+ iconv_close (cd_88591_to_utf8);
}
}
#if 0 /* This bug could be worked around by the caller. */
@@ -105,7 +154,8 @@ int main ()
(char **) &inptr, &inbytesleft,
&outptr, &outbytesleft);
if ((int)res > 0)
- return 1;
+ result |= 8;
+ iconv_close (cd_88591_to_utf8);
}
}
#endif
@@ -119,13 +169,19 @@ int main ()
&& iconv_open ("UTF-8", "IBM-eucJP") == (iconv_t)(-1)
/* Try HP-UX names. */
&& iconv_open ("utf8", "eucJP") == (iconv_t)(-1))
- return 1;
- return 0;
-}], [am_cv_func_iconv_works=yes], [am_cv_func_iconv_works=no],
- [case "$host_os" in
+ result |= 16;
+ return result;
+}]])],
+ [am_cv_func_iconv_works=yes],
+ [am_cv_func_iconv_works=no],
+ [
+changequote(,)dnl
+ case "$host_os" in
aix* | hpux*) am_cv_func_iconv_works="guessing no" ;;
*) am_cv_func_iconv_works="guessing yes" ;;
- esac])
+ esac
+changequote([,])dnl
+ ])
LIBS="$am_save_LIBS"
])
case "$am_cv_func_iconv_works" in
@@ -136,7 +192,7 @@ int main ()
am_func_iconv=no am_cv_lib_iconv=no
fi
if test "$am_func_iconv" = yes; then
- AC_DEFINE(HAVE_ICONV, 1,
+ AC_DEFINE([HAVE_ICONV], [1],
[Define if you have the iconv() function and it works.])
fi
if test "$am_cv_lib_iconv" = yes; then
@@ -149,34 +205,64 @@ int main ()
LIBICONV=
LTLIBICONV=
fi
- AC_SUBST(LIBICONV)
- AC_SUBST(LTLIBICONV)
+ AC_SUBST([LIBICONV])
+ AC_SUBST([LTLIBICONV])
])
-AC_DEFUN([AM_ICONV],
+dnl Define AM_ICONV using AC_DEFUN_ONCE for Autoconf >= 2.64, in order to
+dnl avoid warnings like
+dnl "warning: AC_REQUIRE: `AM_ICONV' was expanded before it was required".
+dnl This is tricky because of the way 'aclocal' is implemented:
+dnl - It requires defining an auxiliary macro whose name ends in AC_DEFUN.
+dnl Otherwise aclocal's initial scan pass would miss the macro definition.
+dnl - It requires a line break inside the AC_DEFUN_ONCE and AC_DEFUN expansions.
+dnl Otherwise aclocal would emit many "Use of uninitialized value $1"
+dnl warnings.
+m4_define([gl_iconv_AC_DEFUN],
+ m4_version_prereq([2.64],
+ [[AC_DEFUN_ONCE(
+ [$1], [$2])]],
+ [m4_ifdef([gl_00GNULIB],
+ [[AC_DEFUN_ONCE(
+ [$1], [$2])]],
+ [[AC_DEFUN(
+ [$1], [$2])]])]))
+gl_iconv_AC_DEFUN([AM_ICONV],
[
AM_ICONV_LINK
if test "$am_cv_func_iconv" = yes; then
AC_MSG_CHECKING([for iconv declaration])
- AC_CACHE_VAL(am_cv_proto_iconv, [
- AC_TRY_COMPILE([
+ AC_CACHE_VAL([am_cv_proto_iconv], [
+ AC_COMPILE_IFELSE(
+ [AC_LANG_PROGRAM(
+ [[
#include <stdlib.h>
#include <iconv.h>
extern
#ifdef __cplusplus
"C"
#endif
-#if defined(__STDC__) || defined(__cplusplus)
+#if defined(__STDC__) || defined(_MSC_VER) || defined(__cplusplus)
size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
#else
size_t iconv();
#endif
-], [], am_cv_proto_iconv_arg1="", am_cv_proto_iconv_arg1="const")
+ ]],
+ [[]])],
+ [am_cv_proto_iconv_arg1=""],
+ [am_cv_proto_iconv_arg1="const"])
am_cv_proto_iconv="extern size_t iconv (iconv_t cd, $am_cv_proto_iconv_arg1 char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);"])
am_cv_proto_iconv=`echo "[$]am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'`
- AC_MSG_RESULT([$]{ac_t:-
- }[$]am_cv_proto_iconv)
- AC_DEFINE_UNQUOTED(ICONV_CONST, $am_cv_proto_iconv_arg1,
+ AC_MSG_RESULT([
+ $am_cv_proto_iconv])
+ AC_DEFINE_UNQUOTED([ICONV_CONST], [$am_cv_proto_iconv_arg1],
[Define as const if the declaration of iconv() needs const.])
+ dnl Also substitute ICONV_CONST in the gnulib generated <iconv.h>.
+ m4_ifdef([gl_ICONV_H_DEFAULTS],
+ [AC_REQUIRE([gl_ICONV_H_DEFAULTS])
+ if test -n "$am_cv_proto_iconv_arg1"; then
+ ICONV_CONST="const"
+ fi
+ ])
fi
])
diff --git a/m4/include_next.m4 b/m4/include_next.m4
index a60a261..db0f2c0 100644
--- a/m4/include_next.m4
+++ b/m4/include_next.m4
@@ -1,5 +1,5 @@
# include_next.m4 serial 23
-dnl Copyright (C) 2006-2012 Free Software Foundation, Inc.
+dnl Copyright (C) 2006-2016 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.
@@ -192,56 +192,9 @@ dnl until we can assume autoconf 2.64 or newer.
if test AS_VAR_GET(gl_header_exists) = yes; then
AS_VAR_POPDEF([gl_header_exists])
])
- AC_LANG_CONFTEST(
- [AC_LANG_SOURCE(
- [[#include <]]m4_dquote(m4_defn([gl_HEADER_NAME]))[[>]]
- )])
- dnl AIX "xlc -E" and "cc -E" omit #line directives for header
- dnl files that contain only a #include of other header files and
- dnl no non-comment tokens of their own. This leads to a failure
- dnl to detect the absolute name of <dirent.h>, <signal.h>,
- dnl <poll.h> and others. The workaround is to force preservation
- dnl of comments through option -C. This ensures all necessary
- dnl #line directives are present. GCC supports option -C as well.
- case "$host_os" in
- aix*) gl_absname_cpp="$ac_cpp -C" ;;
- *) gl_absname_cpp="$ac_cpp" ;;
- esac
-changequote(,)
- case "$host_os" in
- mingw*)
- dnl For the sake of native Windows compilers (excluding gcc),
- dnl treat backslash as a directory separator, like /.
- dnl Actually, these compilers use a double-backslash as
- dnl directory separator, inside the
- dnl # line "filename"
- dnl directives.
- gl_dirsep_regex='[/\\]'
- ;;
- *)
- gl_dirsep_regex='\/'
- ;;
- esac
- dnl A sed expression that turns a string into a basic regular
- dnl expression, for use within "/.../".
- gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
-changequote([,])
- gl_header_literal_regex=`echo ']m4_defn([gl_HEADER_NAME])[' \
- | 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/
-changequote(,)dnl
- s|^/[^/]|//&|
-changequote([,])dnl
- p
- q
- }'
- dnl eval is necessary to expand gl_absname_cpp.
- dnl Ultrix and Pyramid sh refuse to redirect output of eval,
- dnl so use subshell.
- AS_VAR_SET(gl_next_header,
- ['"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&AS_MESSAGE_LOG_FD |
- sed -n "$gl_absolute_header_sed"`'"'])
+ gl_ABSOLUTE_HEADER_ONE(gl_HEADER_NAME)
+ AS_VAR_COPY([gl_header], [gl_cv_absolute_]AS_TR_SH(gl_HEADER_NAME))
+ AS_VAR_SET(gl_next_header, ['"'$gl_header'"'])
m4_if([$2], [check],
[else
AS_VAR_SET(gl_next_header, ['<'gl_HEADER_NAME'>'])
diff --git a/m4/intlmacosx.m4 b/m4/intlmacosx.m4
index 2fe4c81..aca924c 100644
--- a/m4/intlmacosx.m4
+++ b/m4/intlmacosx.m4
@@ -1,49 +1,52 @@
-# -*- buffer-read-only: t -*- vi: set ro:
-# DO NOT EDIT! GENERATED AUTOMATICALLY!
-# intlmacosx.m4 serial 1 (gettext-0.17)
-dnl Copyright (C) 2004-2007 Free Software Foundation, Inc.
+# intlmacosx.m4 serial 5 (gettext-0.18.2)
+dnl Copyright (C) 2004-2014, 2016 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
-dnl This file can can be used in projects which are not available under
+dnl This file can be used in projects which are not available under
dnl the GNU General Public License or the GNU Library General Public
dnl License but which still want to provide support for the GNU gettext
dnl functionality.
dnl Please note that the actual code of the GNU gettext library is covered
dnl by the GNU Library General Public License, and the rest of the GNU
-dnl gettext package package is covered by the GNU General Public License.
+dnl gettext package is covered by the GNU General Public License.
dnl They are *not* in the public domain.
-dnl Checks for special options needed on MacOS X.
+dnl Checks for special options needed on Mac OS X.
dnl Defines INTL_MACOSX_LIBS.
AC_DEFUN([gt_INTL_MACOSX],
[
- dnl Check for API introduced in MacOS X 10.2.
+ dnl Check for API introduced in Mac OS X 10.2.
AC_CACHE_CHECK([for CFPreferencesCopyAppValue],
- gt_cv_func_CFPreferencesCopyAppValue,
+ [gt_cv_func_CFPreferencesCopyAppValue],
[gt_save_LIBS="$LIBS"
LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation"
- AC_TRY_LINK([#include <CoreFoundation/CFPreferences.h>],
- [CFPreferencesCopyAppValue(NULL, NULL)],
+ AC_LINK_IFELSE(
+ [AC_LANG_PROGRAM(
+ [[#include <CoreFoundation/CFPreferences.h>]],
+ [[CFPreferencesCopyAppValue(NULL, NULL)]])],
[gt_cv_func_CFPreferencesCopyAppValue=yes],
[gt_cv_func_CFPreferencesCopyAppValue=no])
LIBS="$gt_save_LIBS"])
if test $gt_cv_func_CFPreferencesCopyAppValue = yes; then
- AC_DEFINE([HAVE_CFPREFERENCESCOPYAPPVALUE], 1,
- [Define to 1 if you have the MacOS X function CFPreferencesCopyAppValue in the CoreFoundation framework.])
+ AC_DEFINE([HAVE_CFPREFERENCESCOPYAPPVALUE], [1],
+ [Define to 1 if you have the Mac OS X function CFPreferencesCopyAppValue in the CoreFoundation framework.])
fi
- dnl Check for API introduced in MacOS X 10.3.
- AC_CACHE_CHECK([for CFLocaleCopyCurrent], gt_cv_func_CFLocaleCopyCurrent,
+ dnl Check for API introduced in Mac OS X 10.3.
+ AC_CACHE_CHECK([for CFLocaleCopyCurrent], [gt_cv_func_CFLocaleCopyCurrent],
[gt_save_LIBS="$LIBS"
LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation"
- AC_TRY_LINK([#include <CoreFoundation/CFLocale.h>], [CFLocaleCopyCurrent();],
+ AC_LINK_IFELSE(
+ [AC_LANG_PROGRAM(
+ [[#include <CoreFoundation/CFLocale.h>]],
+ [[CFLocaleCopyCurrent();]])],
[gt_cv_func_CFLocaleCopyCurrent=yes],
[gt_cv_func_CFLocaleCopyCurrent=no])
LIBS="$gt_save_LIBS"])
if test $gt_cv_func_CFLocaleCopyCurrent = yes; then
- AC_DEFINE([HAVE_CFLOCALECOPYCURRENT], 1,
- [Define to 1 if you have the MacOS X function CFLocaleCopyCurrent in the CoreFoundation framework.])
+ AC_DEFINE([HAVE_CFLOCALECOPYCURRENT], [1],
+ [Define to 1 if you have the Mac OS X function CFLocaleCopyCurrent in the CoreFoundation framework.])
fi
INTL_MACOSX_LIBS=
if test $gt_cv_func_CFPreferencesCopyAppValue = yes || test $gt_cv_func_CFLocaleCopyCurrent = yes; then
diff --git a/m4/inttypes-pri.m4 b/m4/inttypes-pri.m4
new file mode 100644
index 0000000..ae20183
--- /dev/null
+++ b/m4/inttypes-pri.m4
@@ -0,0 +1,42 @@
+# inttypes-pri.m4 serial 7 (gettext-0.18.2)
+dnl Copyright (C) 1997-2002, 2006, 2008-2016 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.
+
+AC_PREREQ([2.53])
+
+# Define PRI_MACROS_BROKEN if <inttypes.h> exists and defines the PRI*
+# macros to non-string values. This is the case on AIX 4.3.3.
+
+AC_DEFUN([gt_INTTYPES_PRI],
+[
+ AC_CHECK_HEADERS([inttypes.h])
+ if test $ac_cv_header_inttypes_h = yes; then
+ AC_CACHE_CHECK([whether the inttypes.h PRIxNN macros are broken],
+ [gt_cv_inttypes_pri_broken],
+ [
+ AC_COMPILE_IFELSE(
+ [AC_LANG_PROGRAM(
+ [[
+#include <inttypes.h>
+#ifdef PRId32
+char *p = PRId32;
+#endif
+ ]],
+ [[]])],
+ [gt_cv_inttypes_pri_broken=no],
+ [gt_cv_inttypes_pri_broken=yes])
+ ])
+ fi
+ if test "$gt_cv_inttypes_pri_broken" = yes; then
+ AC_DEFINE_UNQUOTED([PRI_MACROS_BROKEN], [1],
+ [Define if <inttypes.h> exists and defines unusable PRI* macros.])
+ PRI_MACROS_BROKEN=1
+ else
+ PRI_MACROS_BROKEN=0
+ fi
+ AC_SUBST([PRI_MACROS_BROKEN])
+])
diff --git a/m4/inttypes.m4 b/m4/inttypes.m4
new file mode 100644
index 0000000..61cdb1a
--- /dev/null
+++ b/m4/inttypes.m4
@@ -0,0 +1,158 @@
+# inttypes.m4 serial 26
+dnl Copyright (C) 2006-2016 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 Derek Price, Bruno Haible.
+dnl Test whether <inttypes.h> is supported or must be substituted.
+
+AC_DEFUN([gl_INTTYPES_H],
+[
+ AC_REQUIRE([gl_INTTYPES_INCOMPLETE])
+ gl_INTTYPES_PRI_SCN
+])
+
+AC_DEFUN_ONCE([gl_INTTYPES_INCOMPLETE],
+[
+ AC_REQUIRE([gl_STDINT_H])
+ AC_CHECK_HEADERS_ONCE([inttypes.h])
+
+ dnl Override <inttypes.h> always, so that the portability warnings work.
+ AC_REQUIRE([gl_INTTYPES_H_DEFAULTS])
+ gl_CHECK_NEXT_HEADERS([inttypes.h])
+
+ AC_REQUIRE([gl_MULTIARCH])
+
+ 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 <inttypes.h>
+ ]], [imaxabs imaxdiv strtoimax strtoumax])
+])
+
+# Ensure that the PRI* and SCN* macros are defined appropriately.
+AC_DEFUN([gl_INTTYPES_PRI_SCN],
+[
+ AC_REQUIRE([gt_INTTYPES_PRI])
+
+ PRIPTR_PREFIX=
+ if test -n "$STDINT_H"; then
+ dnl Using the gnulib <stdint.h>. It always defines intptr_t to 'long'.
+ PRIPTR_PREFIX='"l"'
+ else
+ dnl Using the system's <stdint.h>.
+ for glpfx in '' l ll I64; do
+ case $glpfx in
+ '') gltype1='int';;
+ l) gltype1='long int';;
+ ll) gltype1='long long int';;
+ I64) gltype1='__int64';;
+ esac
+ AC_COMPILE_IFELSE(
+ [AC_LANG_PROGRAM([[#include <stdint.h>
+ extern intptr_t foo;
+ extern $gltype1 foo;]])],
+ [PRIPTR_PREFIX='"'$glpfx'"'])
+ test -n "$PRIPTR_PREFIX" && break
+ done
+ fi
+ AC_SUBST([PRIPTR_PREFIX])
+
+ gl_INTTYPES_CHECK_LONG_LONG_INT_CONDITION(
+ [INT32_MAX_LT_INTMAX_MAX],
+ [defined INT32_MAX && defined INTMAX_MAX],
+ [INT32_MAX < INTMAX_MAX],
+ [sizeof (int) < sizeof (long long int)])
+ if test $APPLE_UNIVERSAL_BUILD = 0; then
+ gl_INTTYPES_CHECK_LONG_LONG_INT_CONDITION(
+ [INT64_MAX_EQ_LONG_MAX],
+ [defined INT64_MAX],
+ [INT64_MAX == LONG_MAX],
+ [sizeof (long long int) == sizeof (long int)])
+ else
+ INT64_MAX_EQ_LONG_MAX=-1
+ fi
+ gl_INTTYPES_CHECK_LONG_LONG_INT_CONDITION(
+ [UINT32_MAX_LT_UINTMAX_MAX],
+ [defined UINT32_MAX && defined UINTMAX_MAX],
+ [UINT32_MAX < UINTMAX_MAX],
+ [sizeof (unsigned int) < sizeof (unsigned long long int)])
+ if test $APPLE_UNIVERSAL_BUILD = 0; then
+ gl_INTTYPES_CHECK_LONG_LONG_INT_CONDITION(
+ [UINT64_MAX_EQ_ULONG_MAX],
+ [defined UINT64_MAX],
+ [UINT64_MAX == ULONG_MAX],
+ [sizeof (unsigned long long int) == sizeof (unsigned long int)])
+ else
+ UINT64_MAX_EQ_ULONG_MAX=-1
+ fi
+])
+
+# Define the symbol $1 to be 1 if the condition is true, 0 otherwise.
+# If $2 is true, the condition is $3; otherwise if long long int is supported
+# approximate the condition with $4; otherwise, assume the condition is false.
+# The condition should work on all C99 platforms; the approximations should be
+# good enough to work on all practical pre-C99 platforms.
+# $2 is evaluated by the C preprocessor, $3 and $4 as compile-time constants.
+AC_DEFUN([gl_INTTYPES_CHECK_LONG_LONG_INT_CONDITION],
+[
+ AC_CACHE_CHECK([whether $3],
+ [gl_cv_test_$1],
+ [AC_COMPILE_IFELSE(
+ [AC_LANG_PROGRAM(
+ [[/* Work also in C++ mode. */
+ #define __STDC_LIMIT_MACROS 1
+
+ /* Work if build is not clean. */
+ #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H
+
+ #include <limits.h>
+ #if HAVE_STDINT_H
+ #include <stdint.h>
+ #endif
+
+ #if $2
+ #define CONDITION ($3)
+ #elif HAVE_LONG_LONG_INT
+ #define CONDITION ($4)
+ #else
+ #define CONDITION 0
+ #endif
+ int test[CONDITION ? 1 : -1];]])],
+ [gl_cv_test_$1=yes],
+ [gl_cv_test_$1=no])])
+ if test $gl_cv_test_$1 = yes; then
+ $1=1;
+ else
+ $1=0;
+ fi
+ AC_SUBST([$1])
+])
+
+AC_DEFUN([gl_INTTYPES_MODULE_INDICATOR],
+[
+ dnl Use AC_REQUIRE here, so that the default settings are expanded once only.
+ AC_REQUIRE([gl_INTTYPES_H_DEFAULTS])
+ gl_MODULE_INDICATOR_SET_VARIABLE([$1])
+])
+
+AC_DEFUN([gl_INTTYPES_H_DEFAULTS],
+[
+ GNULIB_IMAXABS=0; AC_SUBST([GNULIB_IMAXABS])
+ GNULIB_IMAXDIV=0; AC_SUBST([GNULIB_IMAXDIV])
+ GNULIB_STRTOIMAX=0; AC_SUBST([GNULIB_STRTOIMAX])
+ GNULIB_STRTOUMAX=0; AC_SUBST([GNULIB_STRTOUMAX])
+ dnl Assume proper GNU behavior unless another module says otherwise.
+ HAVE_DECL_IMAXABS=1; AC_SUBST([HAVE_DECL_IMAXABS])
+ HAVE_DECL_IMAXDIV=1; AC_SUBST([HAVE_DECL_IMAXDIV])
+ HAVE_DECL_STRTOIMAX=1; AC_SUBST([HAVE_DECL_STRTOIMAX])
+ HAVE_DECL_STRTOUMAX=1; AC_SUBST([HAVE_DECL_STRTOUMAX])
+ REPLACE_STRTOIMAX=0; AC_SUBST([REPLACE_STRTOIMAX])
+ REPLACE_STRTOUMAX=0; AC_SUBST([REPLACE_STRTOUMAX])
+ INT32_MAX_LT_INTMAX_MAX=1; AC_SUBST([INT32_MAX_LT_INTMAX_MAX])
+ INT64_MAX_EQ_LONG_MAX='defined _LP64'; AC_SUBST([INT64_MAX_EQ_LONG_MAX])
+ PRI_MACROS_BROKEN=0; AC_SUBST([PRI_MACROS_BROKEN])
+ PRIPTR_PREFIX=__PRIPTR_PREFIX; AC_SUBST([PRIPTR_PREFIX])
+ UINT32_MAX_LT_UINTMAX_MAX=1; AC_SUBST([UINT32_MAX_LT_UINTMAX_MAX])
+ UINT64_MAX_EQ_ULONG_MAX='defined _LP64'; AC_SUBST([UINT64_MAX_EQ_ULONG_MAX])
+])
diff --git a/m4/isblank.m4 b/m4/isblank.m4
new file mode 100644
index 0000000..63d4a39
--- /dev/null
+++ b/m4/isblank.m4
@@ -0,0 +1,17 @@
+# isblank.m4 serial 3
+dnl Copyright (C) 2009-2016 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_ISBLANK],
+[
+ dnl Persuade glibc <ctype.h> to declare isblank().
+ AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS])
+
+ AC_REQUIRE([gl_CTYPE_H_DEFAULTS])
+ AC_CHECK_FUNCS_ONCE([isblank])
+ if test $ac_cv_func_isblank = no; then
+ HAVE_ISBLANK=0
+ fi
+])
diff --git a/m4/langinfo_h.m4 b/m4/langinfo_h.m4
index b93fe70..edbbe76 100644
--- a/m4/langinfo_h.m4
+++ b/m4/langinfo_h.m4
@@ -1,5 +1,5 @@
# langinfo_h.m4 serial 7
-dnl Copyright (C) 2009-2012 Free Software Foundation, Inc.
+dnl Copyright (C) 2009-2016 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/largefile.m4 b/m4/largefile.m4
index a88850a..8bbdfaa 100644
--- a/m4/largefile.m4
+++ b/m4/largefile.m4
@@ -1,13 +1,14 @@
# Enable large files on systems where this is not the default.
-# Copyright 1992-1996, 1998-2012 Free Software Foundation, Inc.
+# Copyright 1992-1996, 1998-2016 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.
-# The following implementation works around a problem in autoconf <= 2.68;
-# AC_SYS_LARGEFILE does not configure for large inodes on Mac OS X 10.5.
-m4_version_prereq([2.69], [] ,[
+# The following implementation works around a problem in autoconf <= 2.69;
+# AC_SYS_LARGEFILE does not configure for large inodes on Mac OS X 10.5,
+# or configures them incorrectly in some cases.
+m4_version_prereq([2.70], [] ,[
# _AC_SYS_LARGEFILE_TEST_INCLUDES
# -------------------------------
@@ -25,9 +26,9 @@ m4_define([_AC_SYS_LARGEFILE_TEST_INCLUDES],
# _AC_SYS_LARGEFILE_MACRO_VALUE(C-MACRO, VALUE,
-# CACHE-VAR,
-# DESCRIPTION,
-# PROLOGUE, [FUNCTION-BODY])
+# CACHE-VAR,
+# DESCRIPTION,
+# PROLOGUE, [FUNCTION-BODY])
# --------------------------------------------------------
m4_define([_AC_SYS_LARGEFILE_MACRO_VALUE],
[AC_CACHE_CHECK([for $1 value needed for large files], [$3],
@@ -93,15 +94,11 @@ if test "$enable_largefile" != no; then
[_AC_SYS_LARGEFILE_TEST_INCLUDES])
fi
- AH_VERBATIM([_DARWIN_USE_64_BIT_INODE],
-[/* Enable large inode numbers on Mac OS X. */
-#ifndef _DARWIN_USE_64_BIT_INODE
-# define _DARWIN_USE_64_BIT_INODE 1
-#endif])
+ AC_DEFINE([_DARWIN_USE_64_BIT_INODE], [1],
+ [Enable large inode numbers on Mac OS X 10.5.])
fi
])# AC_SYS_LARGEFILE
-
-])# m4_version_prereq 2.69
+])# m4_version_prereq 2.70
# Enable large files on systems where this is implemented by Gnulib, not by the
# system headers.
diff --git a/m4/lcmessage.m4 b/m4/lcmessage.m4
new file mode 100644
index 0000000..1c24d6d
--- /dev/null
+++ b/m4/lcmessage.m4
@@ -0,0 +1,35 @@
+# lcmessage.m4 serial 7 (gettext-0.18.2)
+dnl Copyright (C) 1995-2002, 2004-2005, 2008-2014, 2016 Free Software
+dnl 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
+dnl This file can be used in projects which are not available under
+dnl the GNU General Public License or the GNU Library General Public
+dnl License but which still want to provide support for the GNU gettext
+dnl functionality.
+dnl Please note that the actual code of the GNU gettext library is covered
+dnl by the GNU Library General Public License, and the rest of the GNU
+dnl gettext package is covered by the GNU General Public License.
+dnl They are *not* in the public domain.
+
+dnl Authors:
+dnl Ulrich Drepper <drepper@cygnus.com>, 1995.
+
+# Check whether LC_MESSAGES is available in <locale.h>.
+
+AC_DEFUN([gt_LC_MESSAGES],
+[
+ AC_CACHE_CHECK([for LC_MESSAGES], [gt_cv_val_LC_MESSAGES],
+ [AC_LINK_IFELSE(
+ [AC_LANG_PROGRAM(
+ [[#include <locale.h>]],
+ [[return LC_MESSAGES]])],
+ [gt_cv_val_LC_MESSAGES=yes],
+ [gt_cv_val_LC_MESSAGES=no])])
+ if test $gt_cv_val_LC_MESSAGES = yes; then
+ AC_DEFINE([HAVE_LC_MESSAGES], [1],
+ [Define if your <locale.h> file defines LC_MESSAGES.])
+ fi
+])
diff --git a/m4/lib-ld.m4 b/m4/lib-ld.m4
index f88bb95..6209de6 100644
--- a/m4/lib-ld.m4
+++ b/m4/lib-ld.m4
@@ -1,52 +1,56 @@
-# -*- buffer-read-only: t -*- vi: set ro:
-# DO NOT EDIT! GENERATED AUTOMATICALLY!
-# lib-ld.m4 serial 3 (gettext-0.13)
-dnl Copyright (C) 1996-2003 Free Software Foundation, Inc.
+# lib-ld.m4 serial 6
+dnl Copyright (C) 1996-2003, 2009-2016 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 Subroutines of libtool.m4,
-dnl with replacements s/AC_/AC_LIB/ and s/lt_cv/acl_cv/ to avoid collision
-dnl with libtool.m4.
+dnl with replacements s/_*LT_PATH/AC_LIB_PROG/ and s/lt_/acl_/ to avoid
+dnl collision with libtool.m4.
-dnl From libtool-1.4. Sets the variable with_gnu_ld to yes or no.
+dnl From libtool-2.4. Sets the variable with_gnu_ld to yes or no.
AC_DEFUN([AC_LIB_PROG_LD_GNU],
-[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], acl_cv_prog_gnu_ld,
-[# I'd rather use --version here, but apparently some GNU ld's only accept -v.
+[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], [acl_cv_prog_gnu_ld],
+[# I'd rather use --version here, but apparently some GNU lds only accept -v.
case `$LD -v 2>&1 </dev/null` in
*GNU* | *'with BFD'*)
- acl_cv_prog_gnu_ld=yes ;;
+ acl_cv_prog_gnu_ld=yes
+ ;;
*)
- acl_cv_prog_gnu_ld=no ;;
+ acl_cv_prog_gnu_ld=no
+ ;;
esac])
with_gnu_ld=$acl_cv_prog_gnu_ld
])
-dnl From libtool-1.4. Sets the variable LD.
+dnl From libtool-2.4. Sets the variable LD.
AC_DEFUN([AC_LIB_PROG_LD],
-[AC_ARG_WITH(gnu-ld,
-[ --with-gnu-ld assume the C compiler uses GNU ld [default=no]],
-test "$withval" = no || with_gnu_ld=yes, with_gnu_ld=no)
-AC_REQUIRE([AC_PROG_CC])dnl
+[AC_REQUIRE([AC_PROG_CC])dnl
AC_REQUIRE([AC_CANONICAL_HOST])dnl
+
+AC_ARG_WITH([gnu-ld],
+ [AS_HELP_STRING([--with-gnu-ld],
+ [assume the C compiler uses GNU ld [default=no]])],
+ [test "$withval" = no || with_gnu_ld=yes],
+ [with_gnu_ld=no])dnl
+
# Prepare PATH_SEPARATOR.
# The user is always right.
if test "${PATH_SEPARATOR+set}" != set; then
- echo "#! /bin/sh" >conf$$.sh
- echo "exit 0" >>conf$$.sh
- chmod +x conf$$.sh
- if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
- PATH_SEPARATOR=';'
- else
- PATH_SEPARATOR=:
- fi
- rm -f conf$$.sh
+ # 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
+
ac_prog=ld
if test "$GCC" = yes; then
# Check if gcc -print-prog-name=ld gives a path.
- AC_MSG_CHECKING([for ld used by GCC])
+ AC_MSG_CHECKING([for ld used by $CC])
case $host in
*-*-mingw*)
# gcc leaves a trailing carriage return which upsets mingw
@@ -56,12 +60,12 @@ if test "$GCC" = yes; then
esac
case $ac_prog in
# Accept absolute paths.
- [[\\/]* | [A-Za-z]:[\\/]*)]
- [re_direlt='/[^/][^/]*/\.\./']
- # Canonicalize the path 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%/%"`
+ [[\\/]]* | ?:[[\\/]]*)
+ 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"
;;
@@ -79,33 +83,36 @@ elif test "$with_gnu_ld" = yes; then
else
AC_MSG_CHECKING([for non-GNU ld])
fi
-AC_CACHE_VAL(acl_cv_path_LD,
+AC_CACHE_VAL([acl_cv_path_LD],
[if test -z "$LD"; then
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
+ 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 GNU ld's only accept -v.
+ # 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
+ case `"$acl_cv_path_LD" -v 2>&1 </dev/null` in
*GNU* | *'with BFD'*)
- test "$with_gnu_ld" != no && break ;;
+ test "$with_gnu_ld" != no && break
+ ;;
*)
- test "$with_gnu_ld" != yes && break ;;
+ test "$with_gnu_ld" != yes && break
+ ;;
esac
fi
done
- IFS="$ac_save_ifs"
+ 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 "$LD"; then
- AC_MSG_RESULT($LD)
+ AC_MSG_RESULT([$LD])
else
- AC_MSG_RESULT(no)
+ AC_MSG_RESULT([no])
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 9a1a9b1..2f51855 100644
--- a/m4/lib-link.m4
+++ b/m4/lib-link.m4
@@ -1,14 +1,12 @@
-# -*- buffer-read-only: t -*- vi: set ro:
-# DO NOT EDIT! GENERATED AUTOMATICALLY!
-# lib-link.m4 serial 13 (gettext-0.17)
-dnl Copyright (C) 2001-2007 Free Software Foundation, Inc.
+# lib-link.m4 serial 26 (gettext-0.18.2)
+dnl Copyright (C) 2001-2016 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.
-AC_PREREQ(2.54)
+AC_PREREQ([2.54])
dnl AC_LIB_LINKFLAGS(name [, dependencies]) searches for libname and
dnl the libraries corresponding to explicit and implicit dependencies.
@@ -20,9 +18,9 @@ AC_DEFUN([AC_LIB_LINKFLAGS],
[
AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
AC_REQUIRE([AC_LIB_RPATH])
- define([Name],[translit([$1],[./-], [___])])
- define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
- [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
+ pushdef([Name],[m4_translit([$1],[./+-], [____])])
+ pushdef([NAME],[m4_translit([$1],[abcdefghijklmnopqrstuvwxyz./+-],
+ [ABCDEFGHIJKLMNOPQRSTUVWXYZ____])])
AC_CACHE_CHECK([how to link with lib[]$1], [ac_cv_lib[]Name[]_libs], [
AC_LIB_LINKFLAGS_BODY([$1], [$2])
ac_cv_lib[]Name[]_libs="$LIB[]NAME"
@@ -41,16 +39,17 @@ AC_DEFUN([AC_LIB_LINKFLAGS],
dnl Also set HAVE_LIB[]NAME so that AC_LIB_HAVE_LINKFLAGS can reuse the
dnl results of this search when this library appears as a dependency.
HAVE_LIB[]NAME=yes
- undefine([Name])
- undefine([NAME])
+ popdef([NAME])
+ popdef([Name])
])
-dnl AC_LIB_HAVE_LINKFLAGS(name, dependencies, includes, testcode)
+dnl AC_LIB_HAVE_LINKFLAGS(name, dependencies, includes, testcode, [missing-message])
dnl searches for libname and the libraries corresponding to explicit and
dnl implicit dependencies, together with the specified include files and
-dnl the ability to compile and link the specified testcode. If found, it
-dnl sets and AC_SUBSTs HAVE_LIB${NAME}=yes and the LIB${NAME} and
-dnl LTLIB${NAME} variables and augments the CPPFLAGS variable, and
+dnl the ability to compile and link the specified testcode. The missing-message
+dnl defaults to 'no' and may contain additional hints for the user.
+dnl If found, it sets and AC_SUBSTs HAVE_LIB${NAME}=yes and the LIB${NAME}
+dnl and LTLIB${NAME} variables and augments the CPPFLAGS variable, and
dnl #defines HAVE_LIB${NAME} to 1. Otherwise, it sets and AC_SUBSTs
dnl HAVE_LIB${NAME}=no and LIB${NAME} and LTLIB${NAME} to empty.
dnl Sets and AC_SUBSTs the LIB${NAME}_PREFIX variable to nonempty if libname
@@ -59,9 +58,9 @@ AC_DEFUN([AC_LIB_HAVE_LINKFLAGS],
[
AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
AC_REQUIRE([AC_LIB_RPATH])
- define([Name],[translit([$1],[./-], [___])])
- define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
- [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
+ pushdef([Name],[m4_translit([$1],[./+-], [____])])
+ pushdef([NAME],[m4_translit([$1],[abcdefghijklmnopqrstuvwxyz./+-],
+ [ABCDEFGHIJKLMNOPQRSTUVWXYZ____])])
dnl Search for lib[]Name and define LIB[]NAME, LTLIB[]NAME and INC[]NAME
dnl accordingly.
@@ -75,13 +74,26 @@ AC_DEFUN([AC_LIB_HAVE_LINKFLAGS],
AC_CACHE_CHECK([for lib[]$1], [ac_cv_lib[]Name], [
ac_save_LIBS="$LIBS"
- LIBS="$LIBS $LIB[]NAME"
- AC_TRY_LINK([$3], [$4], [ac_cv_lib[]Name=yes], [ac_cv_lib[]Name=no])
+ dnl If $LIB[]NAME contains some -l options, add it to the end of LIBS,
+ dnl because these -l options might require -L options that are present in
+ dnl LIBS. -l options benefit only from the -L options listed before it.
+ dnl Otherwise, add it to the front of LIBS, because it may be a static
+ dnl library that depends on another static library that is present in LIBS.
+ dnl Static libraries benefit only from the static libraries listed after
+ dnl it.
+ case " $LIB[]NAME" in
+ *" -l"*) LIBS="$LIBS $LIB[]NAME" ;;
+ *) LIBS="$LIB[]NAME $LIBS" ;;
+ esac
+ AC_LINK_IFELSE(
+ [AC_LANG_PROGRAM([[$3]], [[$4]])],
+ [ac_cv_lib[]Name=yes],
+ [ac_cv_lib[]Name='m4_if([$5], [], [no], [[$5]])'])
LIBS="$ac_save_LIBS"
])
if test "$ac_cv_lib[]Name" = yes; then
HAVE_LIB[]NAME=yes
- AC_DEFINE([HAVE_LIB]NAME, 1, [Define if you have the $1 library.])
+ AC_DEFINE([HAVE_LIB]NAME, 1, [Define if you have the lib][$1 library.])
AC_MSG_CHECKING([how to link with lib[]$1])
AC_MSG_RESULT([$LIB[]NAME])
else
@@ -97,13 +109,15 @@ AC_DEFUN([AC_LIB_HAVE_LINKFLAGS],
AC_SUBST([LIB]NAME)
AC_SUBST([LTLIB]NAME)
AC_SUBST([LIB]NAME[_PREFIX])
- undefine([Name])
- undefine([NAME])
+ popdef([NAME])
+ popdef([Name])
])
dnl Determine the platform dependent parameters needed to use rpath:
dnl acl_libext,
dnl acl_shlibext,
+dnl acl_libname_spec,
+dnl acl_library_names_spec,
dnl acl_hardcode_libdir_flag_spec,
dnl acl_hardcode_libdir_separator,
dnl acl_hardcode_direct,
@@ -116,7 +130,7 @@ AC_DEFUN([AC_LIB_RPATH],
AC_REQUIRE([AC_LIB_PROG_LD]) dnl we use $LD, $with_gnu_ld
AC_REQUIRE([AC_CANONICAL_HOST]) dnl we use $host
AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT]) dnl we use $ac_aux_dir
- AC_CACHE_CHECK([for shared library run path origin], acl_cv_rpath, [
+ AC_CACHE_CHECK([for shared library run path origin], [acl_cv_rpath], [
CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \
${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh
. ./conftest.sh
@@ -133,11 +147,32 @@ AC_DEFUN([AC_LIB_RPATH],
acl_hardcode_direct="$acl_cv_hardcode_direct"
acl_hardcode_minus_L="$acl_cv_hardcode_minus_L"
dnl Determine whether the user wants rpath handling at all.
- AC_ARG_ENABLE(rpath,
+ AC_ARG_ENABLE([rpath],
[ --disable-rpath do not hardcode runtime library paths],
:, enable_rpath=yes)
])
+dnl AC_LIB_FROMPACKAGE(name, package)
+dnl declares that libname comes from the given package. The configure file
+dnl will then not have a --with-libname-prefix option but a
+dnl --with-package-prefix option. Several libraries can come from the same
+dnl package. This declaration must occur before an AC_LIB_LINKFLAGS or similar
+dnl macro call that searches for libname.
+AC_DEFUN([AC_LIB_FROMPACKAGE],
+[
+ pushdef([NAME],[m4_translit([$1],[abcdefghijklmnopqrstuvwxyz./+-],
+ [ABCDEFGHIJKLMNOPQRSTUVWXYZ____])])
+ define([acl_frompackage_]NAME, [$2])
+ popdef([NAME])
+ pushdef([PACK],[$2])
+ pushdef([PACKUP],[m4_translit(PACK,[abcdefghijklmnopqrstuvwxyz./+-],
+ [ABCDEFGHIJKLMNOPQRSTUVWXYZ____])])
+ define([acl_libsinpackage_]PACKUP,
+ m4_ifdef([acl_libsinpackage_]PACKUP, [m4_defn([acl_libsinpackage_]PACKUP)[, ]],)[lib$1])
+ popdef([PACKUP])
+ popdef([PACK])
+])
+
dnl AC_LIB_LINKFLAGS_BODY(name [, dependencies]) searches for libname and
dnl the libraries corresponding to explicit and implicit dependencies.
dnl Sets the LIB${NAME}, LTLIB${NAME} and INC${NAME} variables.
@@ -146,19 +181,23 @@ dnl in ${LIB${NAME}_PREFIX}/$acl_libdirstem.
AC_DEFUN([AC_LIB_LINKFLAGS_BODY],
[
AC_REQUIRE([AC_LIB_PREPARE_MULTILIB])
- define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
- [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
+ pushdef([NAME],[m4_translit([$1],[abcdefghijklmnopqrstuvwxyz./+-],
+ [ABCDEFGHIJKLMNOPQRSTUVWXYZ____])])
+ pushdef([PACK],[m4_ifdef([acl_frompackage_]NAME, [acl_frompackage_]NAME, lib[$1])])
+ pushdef([PACKUP],[m4_translit(PACK,[abcdefghijklmnopqrstuvwxyz./+-],
+ [ABCDEFGHIJKLMNOPQRSTUVWXYZ____])])
+ pushdef([PACKLIBS],[m4_ifdef([acl_frompackage_]NAME, [acl_libsinpackage_]PACKUP, lib[$1])])
dnl Autoconf >= 2.61 supports dots in --with options.
- define([N_A_M_E],[m4_if(m4_version_compare(m4_defn([m4_PACKAGE_VERSION]),[2.61]),[-1],[translit([$1],[.],[_])],[$1])])
+ pushdef([P_A_C_K],[m4_if(m4_version_compare(m4_defn([m4_PACKAGE_VERSION]),[2.61]),[-1],[m4_translit(PACK,[.],[_])],PACK)])
dnl By default, look in $includedir and $libdir.
use_additional=yes
AC_LIB_WITH_FINAL_PREFIX([
eval additional_includedir=\"$includedir\"
eval additional_libdir=\"$libdir\"
])
- AC_LIB_ARG_WITH([lib]N_A_M_E[-prefix],
-[ --with-lib]N_A_M_E[-prefix[=DIR] search for lib$1 in DIR/include and DIR/lib
- --without-lib]N_A_M_E[-prefix don't search for lib$1 in includedir and libdir],
+ AC_ARG_WITH(P_A_C_K[-prefix],
+[[ --with-]]P_A_C_K[[-prefix[=DIR] search for ]PACKLIBS[ in DIR/include and DIR/lib
+ --without-]]P_A_C_K[[-prefix don't search for ]PACKLIBS[ in includedir and libdir]],
[
if test "X$withval" = "Xno"; then
use_additional=no
@@ -171,6 +210,10 @@ AC_DEFUN([AC_LIB_LINKFLAGS_BODY],
else
additional_includedir="$withval/include"
additional_libdir="$withval/$acl_libdirstem"
+ if test "$acl_libdirstem2" != "$acl_libdirstem" \
+ && ! test -d "$withval/$acl_libdirstem"; then
+ additional_libdir="$withval/$acl_libdirstem2"
+ fi
fi
fi
])
@@ -180,6 +223,9 @@ AC_DEFUN([AC_LIB_LINKFLAGS_BODY],
LTLIB[]NAME=
INC[]NAME=
LIB[]NAME[]_PREFIX=
+ dnl HAVE_LIB${NAME} is an indicator that LIB${NAME}, LTLIB${NAME} have been
+ dnl computed. So it has to be reset here.
+ HAVE_LIB[]NAME=
rpathdirs=
ltrpathdirs=
names_already_handled=
@@ -199,7 +245,7 @@ AC_DEFUN([AC_LIB_LINKFLAGS_BODY],
names_already_handled="$names_already_handled $name"
dnl See if it was already located by an earlier AC_LIB_LINKFLAGS
dnl or AC_LIB_HAVE_LINKFLAGS call.
- uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
+ uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./+-|ABCDEFGHIJKLMNOPQRSTUVWXYZ____|'`
eval value=\"\$HAVE_LIB$uppername\"
if test -n "$value"; then
if test "$value" = yes; then
@@ -329,7 +375,9 @@ AC_DEFUN([AC_LIB_LINKFLAGS_BODY],
dnl Linking with a shared library. We attempt to hardcode its
dnl directory into the executable's runpath, unless it's the
dnl standard /usr/lib.
- if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/$acl_libdirstem"; then
+ if test "$enable_rpath" = no \
+ || test "X$found_dir" = "X/usr/$acl_libdirstem" \
+ || test "X$found_dir" = "X/usr/$acl_libdirstem2"; then
dnl No hardcoding is needed.
LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
else
@@ -417,7 +465,16 @@ AC_DEFUN([AC_LIB_LINKFLAGS_BODY],
case "$found_dir" in
*/$acl_libdirstem | */$acl_libdirstem/)
basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem/"'*$,,'`
- LIB[]NAME[]_PREFIX="$basedir"
+ if test "$name" = '$1'; then
+ LIB[]NAME[]_PREFIX="$basedir"
+ fi
+ additional_includedir="$basedir/include"
+ ;;
+ */$acl_libdirstem2 | */$acl_libdirstem2/)
+ basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem2/"'*$,,'`
+ if test "$name" = '$1'; then
+ LIB[]NAME[]_PREFIX="$basedir"
+ fi
additional_includedir="$basedir/include"
;;
esac
@@ -478,9 +535,11 @@ AC_DEFUN([AC_LIB_LINKFLAGS_BODY],
dnl 3. if it's already present in $LDFLAGS or the already
dnl constructed $LIBNAME,
dnl 4. if it doesn't exist as a directory.
- if test "X$additional_libdir" != "X/usr/$acl_libdirstem"; then
+ if test "X$additional_libdir" != "X/usr/$acl_libdirstem" \
+ && test "X$additional_libdir" != "X/usr/$acl_libdirstem2"; then
haveit=
- if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem"; then
+ if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem" \
+ || test "X$additional_libdir" = "X/usr/local/$acl_libdirstem2"; then
if test -n "$GCC"; then
case $host_os in
linux* | gnu* | k*bsd*-gnu) haveit=yes;;
@@ -611,6 +670,11 @@ AC_DEFUN([AC_LIB_LINKFLAGS_BODY],
LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-R$found_dir"
done
fi
+ popdef([P_A_C_K])
+ popdef([PACKLIBS])
+ popdef([PACKUP])
+ popdef([PACK])
+ popdef([NAME])
])
dnl AC_LIB_APPENDTOVAR(VAR, CONTENTS) appends the elements of CONTENTS to VAR,
@@ -656,7 +720,8 @@ AC_DEFUN([AC_LIB_LINKFLAGS_FROM_LIBS],
if test -n "$next"; then
dir="$next"
dnl No need to hardcode the standard /usr/lib.
- if test "X$dir" != "X/usr/$acl_libdirstem"; then
+ if test "X$dir" != "X/usr/$acl_libdirstem" \
+ && test "X$dir" != "X/usr/$acl_libdirstem2"; then
rpathdirs="$rpathdirs $dir"
fi
next=
@@ -665,7 +730,8 @@ AC_DEFUN([AC_LIB_LINKFLAGS_FROM_LIBS],
-L) next=yes ;;
-L*) dir=`echo "X$opt" | sed -e 's,^X-L,,'`
dnl No need to hardcode the standard /usr/lib.
- if test "X$dir" != "X/usr/$acl_libdirstem"; then
+ if test "X$dir" != "X/usr/$acl_libdirstem" \
+ && test "X$dir" != "X/usr/$acl_libdirstem2"; then
rpathdirs="$rpathdirs $dir"
fi
next= ;;
diff --git a/m4/lib-prefix.m4 b/m4/lib-prefix.m4
index 49a8400..6851031 100644
--- a/m4/lib-prefix.m4
+++ b/m4/lib-prefix.m4
@@ -1,7 +1,5 @@
-# -*- buffer-read-only: t -*- vi: set ro:
-# DO NOT EDIT! GENERATED AUTOMATICALLY!
-# lib-prefix.m4 serial 5 (gettext-0.15)
-dnl Copyright (C) 2001-2005 Free Software Foundation, Inc.
+# lib-prefix.m4 serial 7 (gettext-0.18)
+dnl Copyright (C) 2001-2005, 2008-2016 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.
@@ -155,33 +153,72 @@ AC_DEFUN([AC_LIB_WITH_FINAL_PREFIX],
prefix="$acl_save_prefix"
])
-dnl AC_LIB_PREPARE_MULTILIB creates a variable acl_libdirstem, containing
-dnl the basename of the libdir, either "lib" or "lib64".
+dnl AC_LIB_PREPARE_MULTILIB creates
+dnl - a variable acl_libdirstem, containing the basename of the libdir, either
+dnl "lib" or "lib64" or "lib/64",
+dnl - a variable acl_libdirstem2, as a secondary possible value for
+dnl acl_libdirstem, either the same as acl_libdirstem or "lib/sparcv9" or
+dnl "lib/amd64".
AC_DEFUN([AC_LIB_PREPARE_MULTILIB],
[
- dnl There is no formal standard regarding lib and lib64. The current
- dnl practice is that on a system supporting 32-bit and 64-bit instruction
- dnl sets or ABIs, 64-bit libraries go under $prefix/lib64 and 32-bit
- dnl libraries go under $prefix/lib. We determine the compiler's default
- dnl mode by looking at the compiler's library search path. If at least
- dnl of its elements ends in /lib64 or points to a directory whose absolute
- dnl pathname ends in /lib64, we assume a 64-bit ABI. Otherwise we use the
- dnl default, namely "lib".
+ dnl There is no formal standard regarding lib and lib64.
+ dnl On glibc systems, the current practice is that on a system supporting
+ dnl 32-bit and 64-bit instruction sets or ABIs, 64-bit libraries go under
+ dnl $prefix/lib64 and 32-bit libraries go under $prefix/lib. We determine
+ dnl the compiler's default mode by looking at the compiler's library search
+ dnl path. If at least one of its elements ends in /lib64 or points to a
+ dnl directory whose absolute pathname ends in /lib64, we assume a 64-bit ABI.
+ dnl Otherwise we use the default, namely "lib".
+ dnl On Solaris systems, the current practice is that on a system supporting
+ dnl 32-bit and 64-bit instruction sets or ABIs, 64-bit libraries go under
+ 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
- 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 ;;
- *) searchdir=`cd "$searchdir" && pwd`
- case "$searchdir" in
- */lib64 ) acl_libdirstem=lib64 ;;
- esac ;;
+ 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
- done
- IFS="$acl_save_IFS"
- 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"
])
diff --git a/m4/limits-h.m4 b/m4/limits-h.m4
new file mode 100644
index 0000000..31fdf0a
--- /dev/null
+++ b/m4/limits-h.m4
@@ -0,0 +1,31 @@
+dnl Check whether limits.h has needed features.
+
+dnl Copyright 2016 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.
+
+AC_DEFUN_ONCE([gl_LIMITS_H],
+[
+ gl_CHECK_NEXT_HEADERS([limits.h])
+
+ AC_CACHE_CHECK([whether limits.h has ULLONG_WIDTH etc.],
+ [gl_cv_header_limits_width],
+ [AC_COMPILE_IFELSE(
+ [AC_LANG_PROGRAM([[#ifndef __STDC_WANT_IEC_60559_BFP_EXT__
+ #define __STDC_WANT_IEC_60559_BFP_EXT__ 1
+ #endif
+ #include <limits.h>
+ int ullw = ULLONG_WIDTH;]])],
+ [gl_cv_header_limits_width=yes],
+ [gl_cv_header_limits_width=no])])
+ if test "$gl_cv_header_limits_width" = yes; then
+ LIMITS_H=
+ else
+ LIMITS_H=limits.h
+ fi
+ AC_SUBST([LIMITS_H])
+ AM_CONDITIONAL([GL_GENERATE_LIMITS_H], [test -n "$LIMITS_H"])
+])
diff --git a/m4/link.m4 b/m4/link.m4
new file mode 100644
index 0000000..34e7708
--- /dev/null
+++ b/m4/link.m4
@@ -0,0 +1,56 @@
+# link.m4 serial 8
+dnl Copyright (C) 2009-2016 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_LINK],
+[
+ AC_REQUIRE([gl_UNISTD_H_DEFAULTS])
+ AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
+ AC_CHECK_FUNCS_ONCE([link])
+ if test $ac_cv_func_link = no; then
+ HAVE_LINK=0
+ else
+ AC_CACHE_CHECK([whether link obeys POSIX],
+ [gl_cv_func_link_works],
+ [touch conftest.a
+ # Assume that if we have lstat, we can also check symlinks.
+ if test $ac_cv_func_lstat = yes; then
+ ln -s conftest.a conftest.lnk
+ fi
+ AC_RUN_IFELSE(
+ [AC_LANG_PROGRAM(
+ [[#include <unistd.h>
+ #include <stdio.h>
+ ]],
+ [[int result = 0;
+ if (!link ("conftest.a", "conftest.b/"))
+ result |= 1;
+#if HAVE_LSTAT
+ if (!link ("conftest.lnk/", "conftest.b"))
+ result |= 2;
+ if (rename ("conftest.a", "conftest.b"))
+ result |= 4;
+ if (!link ("conftest.b", "conftest.lnk"))
+ result |= 8;
+#endif
+ return result;
+ ]])],
+ [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" ;;
+ esac
+ ])
+ rm -f conftest.a conftest.b conftest.lnk])
+ case "$gl_cv_func_link_works" in
+ *yes) ;;
+ *)
+ REPLACE_LINK=1
+ ;;
+ esac
+ fi
+])
diff --git a/m4/localcharset.m4 b/m4/localcharset.m4
index 8010379..22c311b 100644
--- a/m4/localcharset.m4
+++ b/m4/localcharset.m4
@@ -1,5 +1,5 @@
# localcharset.m4 serial 7
-dnl Copyright (C) 2002, 2004, 2006, 2009-2012 Free Software Foundation, Inc.
+dnl Copyright (C) 2002, 2004, 2006, 2009-2016 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 71b6847..92896a0 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-2012 Free Software Foundation, Inc.
+dnl Copyright (C) 2003, 2005-2016 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-ja.m4 b/m4/locale-ja.m4
index 5ba0e43..f222a08 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-2012 Free Software Foundation, Inc.
+dnl Copyright (C) 2003, 2005-2016 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-tr.m4 b/m4/locale-tr.m4
new file mode 100644
index 0000000..75aa295
--- /dev/null
+++ b/m4/locale-tr.m4
@@ -0,0 +1,127 @@
+# locale-tr.m4 serial 10
+dnl Copyright (C) 2003, 2005-2016 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.
+
+dnl Determine the name of a turkish locale with UTF-8 encoding.
+AC_DEFUN([gt_LOCALE_TR_UTF8],
+[
+ AC_REQUIRE([AC_CANONICAL_HOST])
+ AC_REQUIRE([AM_LANGINFO_CODESET])
+ AC_CACHE_CHECK([for a turkish Unicode locale], [gt_cv_locale_tr_utf8], [
+ AC_LANG_CONFTEST([AC_LANG_SOURCE([
+changequote(,)dnl
+#include <locale.h>
+#include <time.h>
+#if HAVE_LANGINFO_CODESET
+# include <langinfo.h>
+#endif
+#include <stdlib.h>
+#include <string.h>
+struct tm t;
+char buf[16];
+int main () {
+ /* On BeOS, 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. But BeOS does not
+ implement the Turkish upper-/lowercase mappings. Therefore, let this
+ program return 1 on BeOS. */
+ /* Check whether the given locale name is recognized by the system. */
+#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
+ category of the locale to "C". */
+ if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
+ || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
+ return 1;
+#else
+ if (setlocale (LC_ALL, "") == NULL) return 1;
+#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 tr_TR locale, nl_langinfo(CODESET)
+ is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
+ On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
+ succeeds but then nl_langinfo(CODESET) is "646". In this situation,
+ some unit tests fail. */
+#if HAVE_LANGINFO_CODESET
+ {
+ const char *cs = nl_langinfo (CODESET);
+ if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0)
+ return 1;
+ }
+#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
+ /* Check whether in the abbreviation of the eighth month, the second
+ character (should be U+011F: LATIN SMALL LETTER G WITH BREVE) is
+ two bytes long, with UTF-8 encoding. */
+ t.tm_year = 1992 - 1900; t.tm_mon = 8 - 1; t.tm_mday = 19;
+ if (strftime (buf, sizeof (buf), "%b", &t) < 4
+ || buf[1] != (char) 0xc4 || buf[2] != (char) 0x9f)
+ return 1;
+ /* Check whether the upper-/lowercase mappings are as expected for
+ Turkish. */
+ if (towupper ('i') != 0x0130 || towlower (0x0130) != 'i'
+ || towupper(0x0131) != 'I' || towlower ('I') != 0x0131)
+ return 1;
+ return 0;
+}
+changequote([,])dnl
+ ])])
+ if AC_TRY_EVAL([ac_link]) && test -s conftest$ac_exeext; then
+ case "$host_os" in
+ # Handle native Windows specially, because there setlocale() interprets
+ # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
+ # "fr" or "fra" as "French" or "French_France.1252",
+ # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
+ # "ja" as "Japanese" or "Japanese_Japan.932",
+ # and similar.
+ mingw*)
+ # Test for the hypothetical native Windows locale name.
+ if (LC_ALL=Turkish_Turkey.65001 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+ gt_cv_locale_tr_utf8=Turkish_Turkey.65001
+ else
+ # None found.
+ gt_cv_locale_tr_utf8=none
+ fi
+ ;;
+ *)
+ # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
+ # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
+ # configure script would override the LC_ALL setting. Likewise for
+ # LC_CTYPE, which is also set at the beginning of the configure script.
+ # Test for the usual locale name.
+ if (LC_ALL=tr_TR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+ gt_cv_locale_tr_utf8=tr_TR
+ else
+ # Test for the locale name with explicit encoding suffix.
+ if (LC_ALL=tr_TR.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+ gt_cv_locale_tr_utf8=tr_TR.UTF-8
+ else
+ # Test for the Solaris 7 locale name.
+ if (LC_ALL=tr.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+ gt_cv_locale_tr_utf8=tr.UTF-8
+ else
+ # None found.
+ gt_cv_locale_tr_utf8=none
+ fi
+ fi
+ fi
+ ;;
+ esac
+ else
+ gt_cv_locale_tr_utf8=none
+ fi
+ rm -fr conftest*
+ ])
+ LOCALE_TR_UTF8=$gt_cv_locale_tr_utf8
+ AC_SUBST([LOCALE_TR_UTF8])
+])
diff --git a/m4/locale-zh.m4 b/m4/locale-zh.m4
index e5502b2..2271f77 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-2012 Free Software Foundation, Inc.
+dnl Copyright (C) 2003, 2005-2016 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_h.m4 b/m4/locale_h.m4
index c0f4d52..563f8f8 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-2012 Free Software Foundation, Inc.
+dnl Copyright (C) 2007, 2009-2016 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/localeconv.m4 b/m4/localeconv.m4
index 5fae06d..6e1dbf1 100644
--- a/m4/localeconv.m4
+++ b/m4/localeconv.m4
@@ -1,5 +1,5 @@
# localeconv.m4 serial 1
-dnl Copyright (C) 2012 Free Software Foundation, Inc.
+dnl Copyright (C) 2012-2016 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
new file mode 100644
index 0000000..fc1d3ea
--- /dev/null
+++ b/m4/localename.m4
@@ -0,0 +1,17 @@
+# localename.m4 serial 2
+dnl Copyright (C) 2007, 2009-2016 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_LOCALENAME],
+[
+ AC_REQUIRE([gt_LC_MESSAGES])
+ AC_REQUIRE([gt_INTL_MACOSX])
+ AC_CHECK_FUNCS([setlocale uselocale])
+ dnl Solaris 12 provides getlocalename_l, while Illumos doesn't have
+ dnl it nor the equivalent.
+ if test $ac_cv_func_uselocale = yes; then
+ AC_CHECK_FUNCS([getlocalename_l])
+ fi
+])
diff --git a/m4/lock.m4 b/m4/lock.m4
new file mode 100644
index 0000000..1e83e23
--- /dev/null
+++ b/m4/lock.m4
@@ -0,0 +1,42 @@
+# lock.m4 serial 13 (gettext-0.18.2)
+dnl Copyright (C) 2005-2016 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.
+
+AC_DEFUN([gl_LOCK],
+[
+ AC_REQUIRE([gl_THREADLIB])
+ 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.
+ AC_CHECK_TYPE([pthread_rwlock_t],
+ [AC_DEFINE([HAVE_PTHREAD_RWLOCK], [1],
+ [Define if the POSIX multithreading library has read/write locks.])],
+ [],
+ [#include <pthread.h>])
+ # glibc defines PTHREAD_MUTEX_RECURSIVE as enum, not as a macro.
+ AC_COMPILE_IFELSE([
+ AC_LANG_PROGRAM(
+ [[#include <pthread.h>]],
+ [[
+#if __FreeBSD__ == 4
+error "No, in FreeBSD 4.0 recursive mutexes actually don't work."
+#elif (defined __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ \
+ && __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ < 1070)
+error "No, in Mac OS X < 10.7 recursive mutexes actually don't work."
+#else
+int x = (int)PTHREAD_MUTEX_RECURSIVE;
+return !x;
+#endif
+ ]])],
+ [AC_DEFINE([HAVE_PTHREAD_MUTEX_RECURSIVE], [1],
+ [Define if the <pthread.h> defines PTHREAD_MUTEX_RECURSIVE.])])
+ fi
+ gl_PREREQ_LOCK
+])
+
+# Prerequisites of lib/glthread/lock.c.
+AC_DEFUN([gl_PREREQ_LOCK], [:])
diff --git a/m4/longlong.m4 b/m4/longlong.m4
index b9c65c7..36d8b12 100644
--- a/m4/longlong.m4
+++ b/m4/longlong.m4
@@ -1,5 +1,5 @@
# longlong.m4 serial 17
-dnl Copyright (C) 1999-2007, 2009-2012 Free Software Foundation, Inc.
+dnl Copyright (C) 1999-2007, 2009-2016 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
new file mode 100644
index 0000000..4a95440
--- /dev/null
+++ b/m4/lseek.m4
@@ -0,0 +1,71 @@
+# lseek.m4 serial 10
+dnl Copyright (C) 2007, 2009-2016 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_LSEEK],
+[
+ AC_REQUIRE([gl_UNISTD_H_DEFAULTS])
+
+ AC_REQUIRE([AC_CANONICAL_HOST])
+ AC_REQUIRE([AC_PROG_CC])
+ AC_CHECK_HEADERS_ONCE([unistd.h])
+ AC_CACHE_CHECK([whether lseek detects pipes], [gl_cv_func_lseek_pipe],
+ [case "$host_os" in
+ mingw*)
+ dnl Native Windows.
+ dnl The result of lseek (fd, (off_t)0, SEEK_CUR) or
+ dnl SetFilePointer(handle, 0, NULL, FILE_CURRENT)
+ dnl for a pipe depends on the environment: In a Cygwin 1.5
+ dnl environment it succeeds (wrong); in a Cygwin 1.7 environment
+ dnl it fails with a wrong errno value.
+ gl_cv_func_lseek_pipe=no
+ ;;
+ *)
+ if test $cross_compiling = no; then
+ AC_LINK_IFELSE([AC_LANG_PROGRAM([[
+#include <sys/types.h> /* for off_t */
+#include <stdio.h> /* for SEEK_CUR */
+#if HAVE_UNISTD_H
+# include <unistd.h>
+#else /* on Windows with MSVC */
+# include <io.h>
+#endif
+]], [[
+ /* Exit with success only if stdin is seekable. */
+ return lseek (0, (off_t)0, SEEK_CUR) < 0;
+]])],
+ [if test -s conftest$ac_exeext \
+ && ./conftest$ac_exeext < conftest.$ac_ext \
+ && test 1 = "`echo hi \
+ | { ./conftest$ac_exeext; echo $?; cat >/dev/null; }`"; then
+ gl_cv_func_lseek_pipe=yes
+ else
+ gl_cv_func_lseek_pipe=no
+ fi
+ ],
+ [gl_cv_func_lseek_pipe=no])
+ else
+ AC_COMPILE_IFELSE(
+ [AC_LANG_SOURCE([[
+#if defined __BEOS__
+/* BeOS mistakenly return 0 when trying to seek on pipes. */
+ Choke me.
+#endif]])],
+ [gl_cv_func_lseek_pipe=yes], [gl_cv_func_lseek_pipe=no])
+ fi
+ ;;
+ esac
+ ])
+ if test $gl_cv_func_lseek_pipe = no; then
+ REPLACE_LSEEK=1
+ AC_DEFINE([LSEEK_PIPE_BROKEN], [1],
+ [Define to 1 if lseek does not detect pipes.])
+ fi
+
+ AC_REQUIRE([gl_SYS_TYPES_H])
+ if test $WINDOWS_64_BIT_OFF_T = 1; then
+ REPLACE_LSEEK=1
+ fi
+])
diff --git a/m4/lstat.m4 b/m4/lstat.m4
index 01b4eb9..e143d5c 100644
--- a/m4/lstat.m4
+++ b/m4/lstat.m4
@@ -1,6 +1,6 @@
-# serial 26
+# serial 27
-# Copyright (C) 1997-2001, 2003-2012 Free Software Foundation, Inc.
+# Copyright (C) 1997-2001, 2003-2016 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -37,30 +37,28 @@ AC_DEFUN([gl_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK],
[gl_cv_func_lstat_dereferences_slashed_symlink],
[rm -f conftest.sym conftest.file
echo >conftest.file
- if test "$as_ln_s" = "ln -s" && ln -s conftest.file conftest.sym; then
- AC_RUN_IFELSE(
- [AC_LANG_PROGRAM(
- [AC_INCLUDES_DEFAULT],
- [[struct stat sbuf;
- /* Linux will dereference the symlink and fail, as required by
- POSIX. That is better in the sense that it means we will not
- have to compile and use the lstat wrapper. */
- return lstat ("conftest.sym/", &sbuf) == 0;
- ]])],
- [gl_cv_func_lstat_dereferences_slashed_symlink=yes],
- [gl_cv_func_lstat_dereferences_slashed_symlink=no],
- [case "$host_os" in
- # Guess yes on glibc systems.
- *-gnu*) gl_cv_func_lstat_dereferences_slashed_symlink="guessing yes" ;;
- # If we don't know, assume the worst.
- *) gl_cv_func_lstat_dereferences_slashed_symlink="guessing no" ;;
- esac
- ])
- else
- # If the 'ln -s' command failed, then we probably don't even
- # have an lstat function.
- gl_cv_func_lstat_dereferences_slashed_symlink="guessing no"
- fi
+ AC_RUN_IFELSE(
+ [AC_LANG_PROGRAM(
+ [AC_INCLUDES_DEFAULT],
+ [[struct stat sbuf;
+ if (symlink ("conftest.file", "conftest.sym") != 0)
+ return 1;
+ /* Linux will dereference the symlink and fail, as required by
+ POSIX. That is better in the sense that it means we will not
+ have to compile and use the lstat wrapper. */
+ return lstat ("conftest.sym/", &sbuf) == 0;
+ ]])],
+ [gl_cv_func_lstat_dereferences_slashed_symlink=yes],
+ [gl_cv_func_lstat_dereferences_slashed_symlink=no],
+ [case "$host_os" in
+ *-gnu*)
+ # Guess yes on glibc systems.
+ gl_cv_func_lstat_dereferences_slashed_symlink="guessing yes" ;;
+ *)
+ # If we don't know, assume the worst.
+ gl_cv_func_lstat_dereferences_slashed_symlink="guessing no" ;;
+ esac
+ ])
rm -f conftest.sym conftest.file
])
case "$gl_cv_func_lstat_dereferences_slashed_symlink" in
diff --git a/m4/malloc.m4 b/m4/malloc.m4
index 8fa48e9..c393690 100644
--- a/m4/malloc.m4
+++ b/m4/malloc.m4
@@ -1,13 +1,13 @@
-# malloc.m4 serial 14
-dnl Copyright (C) 2007, 2009-2012 Free Software Foundation, Inc.
+# malloc.m4 serial 15
+dnl Copyright (C) 2007, 2009-2016 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.
m4_version_prereq([2.70], [] ,[
-# This is taken from the following Autoconf patch:
-# http://git.savannah.gnu.org/gitweb/?p=autoconf.git;a=commitdiff;h=7fbb553727ed7e0e689a17594b58559ecf3ea6e9
+# This is adapted with modifications from upstream Autoconf here:
+# http://git.savannah.gnu.org/cgit/autoconf.git/commit/?id=04be2b7a29d65d9a08e64e8e56e594c91749598c
AC_DEFUN([_AC_FUNC_MALLOC_IF],
[
AC_REQUIRE([AC_HEADER_STDC])dnl
@@ -23,7 +23,10 @@ AC_DEFUN([_AC_FUNC_MALLOC_IF],
char *malloc ();
#endif
]],
- [[return ! malloc (0);]])
+ [[char *p = malloc (0);
+ int result = !p;
+ free (p);
+ return result;]])
],
[ac_cv_func_malloc_0_nonnull=yes],
[ac_cv_func_malloc_0_nonnull=no],
diff --git a/m4/malloca.m4 b/m4/malloca.m4
index 7841979..b368b20 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-2012 Free Software Foundation,
+dnl Copyright (C) 2003-2004, 2006-2007, 2009-2016 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
new file mode 100644
index 0000000..4f701f4
--- /dev/null
+++ b/m4/manywarnings.m4
@@ -0,0 +1,276 @@
+# manywarnings.m4 serial 8
+dnl Copyright (C) 2008-2016 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 Simon Josefsson
+
+# gl_MANYWARN_COMPLEMENT(OUTVAR, LISTVAR, REMOVEVAR)
+# --------------------------------------------------
+# Copy LISTVAR to OUTVAR except for the entries in REMOVEVAR.
+# Elements separated by whitespace. In set logic terms, the function
+# does OUTVAR = LISTVAR \ REMOVEVAR.
+AC_DEFUN([gl_MANYWARN_COMPLEMENT],
+[
+ gl_warn_set=
+ set x $2; shift
+ for gl_warn_item
+ do
+ case " $3 " in
+ *" $gl_warn_item "*)
+ ;;
+ *)
+ gl_warn_set="$gl_warn_set $gl_warn_item"
+ ;;
+ esac
+ done
+ $1=$gl_warn_set
+])
+
+# gl_MANYWARN_ALL_GCC(VARIABLE)
+# -----------------------------
+# 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.
+AC_DEFUN([gl_MANYWARN_ALL_GCC],
+[
+ dnl First, check for some issues that only occur when combining multiple
+ dnl gcc warning categories.
+ AC_REQUIRE([AC_PROG_CC])
+ if test -n "$GCC"; then
+
+ dnl Check if -W -Werror -Wno-missing-field-initializers is supported
+ dnl with the current $CC $CFLAGS $CPPFLAGS.
+ AC_MSG_CHECKING([whether -Wno-missing-field-initializers is supported])
+ AC_CACHE_VAL([gl_cv_cc_nomfi_supported], [
+ gl_save_CFLAGS="$CFLAGS"
+ CFLAGS="$CFLAGS -W -Werror -Wno-missing-field-initializers"
+ AC_COMPILE_IFELSE(
+ [AC_LANG_PROGRAM([[]], [[]])],
+ [gl_cv_cc_nomfi_supported=yes],
+ [gl_cv_cc_nomfi_supported=no])
+ CFLAGS="$gl_save_CFLAGS"])
+ AC_MSG_RESULT([$gl_cv_cc_nomfi_supported])
+
+ if test "$gl_cv_cc_nomfi_supported" = yes; then
+ dnl Now check whether -Wno-missing-field-initializers is needed
+ dnl for the { 0, } construct.
+ AC_MSG_CHECKING([whether -Wno-missing-field-initializers is needed])
+ AC_CACHE_VAL([gl_cv_cc_nomfi_needed], [
+ gl_save_CFLAGS="$CFLAGS"
+ CFLAGS="$CFLAGS -W -Werror"
+ AC_COMPILE_IFELSE(
+ [AC_LANG_PROGRAM(
+ [[int f (void)
+ {
+ typedef struct { int a; int b; } s_t;
+ s_t s1 = { 0, };
+ return s1.b;
+ }
+ ]],
+ [[]])],
+ [gl_cv_cc_nomfi_needed=no],
+ [gl_cv_cc_nomfi_needed=yes])
+ CFLAGS="$gl_save_CFLAGS"
+ ])
+ AC_MSG_RESULT([$gl_cv_cc_nomfi_needed])
+ fi
+
+ dnl Next, check if -Werror -Wuninitialized is useful with the
+ dnl user's choice of $CFLAGS; some versions of gcc warn that it
+ dnl has no effect if -O is not also used
+ AC_MSG_CHECKING([whether -Wuninitialized is supported])
+ AC_CACHE_VAL([gl_cv_cc_uninitialized_supported], [
+ gl_save_CFLAGS="$CFLAGS"
+ CFLAGS="$CFLAGS -Werror -Wuninitialized"
+ AC_COMPILE_IFELSE(
+ [AC_LANG_PROGRAM([[]], [[]])],
+ [gl_cv_cc_uninitialized_supported=yes],
+ [gl_cv_cc_uninitialized_supported=no])
+ CFLAGS="$gl_save_CFLAGS"])
+ AC_MSG_RESULT([$gl_cv_cc_uninitialized_supported])
+
+ fi
+
+ # List all gcc warning categories.
+ # To compare this list to your installed GCC's, run this Bash command:
+ #
+ # comm -3 \
+ # <(sed -n 's/^ *\(-[^ ]*\) .*/\1/p' manywarnings.m4 | sort) \
+ # <(gcc --help=warnings | sed -n 's/^ \(-[^ ]*\) .*/\1/p' | sort |
+ # grep -v -x -f <(
+ # awk '/^[^#]/ {print $1}' ../build-aux/gcc-warning.spec))
+
+ gl_manywarn_set=
+ for gl_manywarn_item in \
+ -fno-common \
+ -W \
+ -Wabi \
+ -Waddress \
+ -Waggressive-loop-optimizations \
+ -Wall \
+ -Wattributes \
+ -Wbad-function-cast \
+ -Wbool-compare \
+ -Wbuiltin-macro-redefined \
+ -Wcast-align \
+ -Wchar-subscripts \
+ -Wchkp \
+ -Wclobbered \
+ -Wcomment \
+ -Wcomments \
+ -Wcoverage-mismatch \
+ -Wcpp \
+ -Wdate-time \
+ -Wdeprecated \
+ -Wdeprecated-declarations \
+ -Wdesignated-init \
+ -Wdisabled-optimization \
+ -Wdiscarded-array-qualifiers \
+ -Wdiscarded-qualifiers \
+ -Wdiv-by-zero \
+ -Wdouble-promotion \
+ -Wduplicated-cond \
+ -Wempty-body \
+ -Wendif-labels \
+ -Wenum-compare \
+ -Wextra \
+ -Wformat-contains-nul \
+ -Wformat-extra-args \
+ -Wformat-nonliteral \
+ -Wformat-security \
+ -Wformat-signedness \
+ -Wformat-y2k \
+ -Wformat-zero-length \
+ -Wframe-address \
+ -Wfree-nonheap-object \
+ -Whsa \
+ -Wignored-attributes \
+ -Wignored-qualifiers \
+ -Wimplicit \
+ -Wimplicit-function-declaration \
+ -Wimplicit-int \
+ -Wincompatible-pointer-types \
+ -Winit-self \
+ -Winline \
+ -Wint-conversion \
+ -Wint-to-pointer-cast \
+ -Winvalid-memory-model \
+ -Winvalid-pch \
+ -Wjump-misses-init \
+ -Wlogical-not-parentheses \
+ -Wlogical-op \
+ -Wmain \
+ -Wmaybe-uninitialized \
+ -Wmemset-transposed-args \
+ -Wmisleading-indentation \
+ -Wmissing-braces \
+ -Wmissing-declarations \
+ -Wmissing-field-initializers \
+ -Wmissing-include-dirs \
+ -Wmissing-parameter-type \
+ -Wmissing-prototypes \
+ -Wmultichar \
+ -Wnarrowing \
+ -Wnested-externs \
+ -Wnonnull \
+ -Wnonnull-compare \
+ -Wnull-dereference \
+ -Wodr \
+ -Wold-style-declaration \
+ -Wold-style-definition \
+ -Wopenmp-simd \
+ -Woverflow \
+ -Woverlength-strings \
+ -Woverride-init \
+ -Wpacked \
+ -Wpacked-bitfield-compat \
+ -Wparentheses \
+ -Wpointer-arith \
+ -Wpointer-sign \
+ -Wpointer-to-int-cast \
+ -Wpragmas \
+ -Wreturn-local-addr \
+ -Wreturn-type \
+ -Wscalar-storage-order \
+ -Wsequence-point \
+ -Wshadow \
+ -Wshift-count-negative \
+ -Wshift-count-overflow \
+ -Wshift-negative-value \
+ -Wsizeof-array-argument \
+ -Wsizeof-pointer-memaccess \
+ -Wstack-protector \
+ -Wstrict-aliasing \
+ -Wstrict-overflow \
+ -Wstrict-prototypes \
+ -Wsuggest-attribute=const \
+ -Wsuggest-attribute=format \
+ -Wsuggest-attribute=noreturn \
+ -Wsuggest-attribute=pure \
+ -Wsuggest-final-methods \
+ -Wsuggest-final-types \
+ -Wswitch \
+ -Wswitch-bool \
+ -Wswitch-default \
+ -Wsync-nand \
+ -Wsystem-headers \
+ -Wtautological-compare \
+ -Wtrampolines \
+ -Wtrigraphs \
+ -Wtype-limits \
+ -Wuninitialized \
+ -Wunknown-pragmas \
+ -Wunsafe-loop-optimizations \
+ -Wunused \
+ -Wunused-but-set-parameter \
+ -Wunused-but-set-variable \
+ -Wunused-function \
+ -Wunused-label \
+ -Wunused-local-typedefs \
+ -Wunused-macros \
+ -Wunused-parameter \
+ -Wunused-result \
+ -Wunused-value \
+ -Wunused-variable \
+ -Wvarargs \
+ -Wvariadic-macros \
+ -Wvector-operation-performance \
+ -Wvla \
+ -Wvolatile-register-var \
+ -Wwrite-strings \
+ \
+ ; do
+ gl_manywarn_set="$gl_manywarn_set $gl_manywarn_item"
+ done
+
+ # 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.
+ gl_manywarn_set="$gl_manywarn_set -Warray-bounds=2"
+ gl_manywarn_set="$gl_manywarn_set -Wnormalized=nfc"
+ gl_manywarn_set="$gl_manywarn_set -Wshift-overflow=2"
+ gl_manywarn_set="$gl_manywarn_set -Wunused-const-variable=2"
+
+ # These are needed for older GCC versions.
+ if test -n "$GCC"; then
+ case `($CC --version) 2>/dev/null` in
+ 'gcc (GCC) '[[0-3]].* | \
+ 'gcc (GCC) '4.[[0-7]].*)
+ gl_manywarn_set="$gl_manywarn_set -fdiagnostics-show-option"
+ gl_manywarn_set="$gl_manywarn_set -funit-at-a-time"
+ ;;
+ esac
+ fi
+
+ # Disable specific options as needed.
+ if test "$gl_cv_cc_nomfi_needed" = yes; then
+ gl_manywarn_set="$gl_manywarn_set -Wno-missing-field-initializers"
+ fi
+
+ if test "$gl_cv_cc_uninitialized_supported" = no; then
+ gl_manywarn_set="$gl_manywarn_set -Wno-uninitialized"
+ fi
+
+ $1=$gl_manywarn_set
+])
diff --git a/m4/mbrlen.m4 b/m4/mbrlen.m4
index 8bf0756..5baf8e3 100644
--- a/m4/mbrlen.m4
+++ b/m4/mbrlen.m4
@@ -1,5 +1,5 @@
-# mbrlen.m4 serial 8
-dnl Copyright (C) 2008, 2010-2012 Free Software Foundation, Inc.
+# mbrlen.m4 serial 9 -*- coding: utf-8 -*-
+dnl Copyright (C) 2008, 2010-2016 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.
@@ -227,6 +227,40 @@ int main ()
])
])
+dnl Test whether mbrlen returns the correct value on empty input.
+
+AC_DEFUN([gl_MBRLEN_EMPTY_INPUT],
+[
+ AC_REQUIRE([AC_PROG_CC])
+ AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
+ AC_CACHE_CHECK([whether mbrlen works on empty input],
+ [gl_cv_func_mbrlen_empty_input],
+ [
+ dnl Initial guess, used when cross-compiling or when no suitable locale
+ 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" ;;
+ esac
+changequote([,])dnl
+ AC_RUN_IFELSE(
+ [AC_LANG_SOURCE([[
+ #include <wchar.h>
+ static mbstate_t mbs;
+ int
+ main (void)
+ {
+ return mbrlen ("", 0, &mbs) != (size_t) -2;
+ }]])],
+ [gl_cv_func_mbrlen_empty_input=yes],
+ [gl_cv_func_mbrlen_empty_input=no],
+ [:])
+ ])
+])
+
# Prerequisites of lib/mbrlen.c.
AC_DEFUN([gl_PREREQ_MBRLEN], [
:
diff --git a/m4/mbrtowc.m4 b/m4/mbrtowc.m4
index 8f829c8..5edf08b 100644
--- a/m4/mbrtowc.m4
+++ b/m4/mbrtowc.m4
@@ -1,5 +1,5 @@
-# mbrtowc.m4 serial 25
-dnl Copyright (C) 2001-2002, 2004-2005, 2008-2012 Free Software Foundation,
+# mbrtowc.m4 serial 27 -*- coding: utf-8 -*-
+dnl Copyright (C) 2001-2002, 2004-2005, 2008-2016 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,
@@ -39,6 +39,8 @@ AC_DEFUN([gl_FUNC_MBRTOWC],
gl_MBRTOWC_NULL_ARG2
gl_MBRTOWC_RETVAL
gl_MBRTOWC_NUL_RETVAL
+ gl_MBRTOWC_EMPTY_INPUT
+ gl_MBRTOWC_C_LOCALE
case "$gl_cv_func_mbrtowc_null_arg1" in
*yes) ;;
*) AC_DEFINE([MBRTOWC_NULL_ARG1_BUG], [1],
@@ -67,6 +69,21 @@ AC_DEFUN([gl_FUNC_MBRTOWC],
REPLACE_MBRTOWC=1
;;
esac
+ case "$gl_cv_func_mbrtowc_empty_input" in
+ *yes) ;;
+ *) AC_DEFINE([MBRTOWC_EMPTY_INPUT_BUG], [1],
+ [Define if the mbrtowc function does not return (size_t) -2
+ for empty input.])
+ REPLACE_MBRTOWC=1
+ ;;
+ esac
+ case $gl_cv_C_locale_sans_EILSEQ in
+ *yes) ;;
+ *) AC_DEFINE([C_LOCALE_MAYBE_EILSEQ], [1],
+ [Define to 1 if the C locale may have encoding errors.])
+ REPLACE_MBRTOWC=1
+ ;;
+ esac
fi
fi
])
@@ -147,7 +164,7 @@ int main ()
memset (&state, '\0', sizeof (mbstate_t));
if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
if (mbsinit (&state))
- return 1;
+ return 2;
}
return 0;
}]])],
@@ -207,7 +224,7 @@ int main ()
memset (&state, '\0', sizeof (mbstate_t));
if (mbrtowc (&wc, input + 3, 6, &state) != 4
&& mbtowc (&wc, input + 3, 6) == 4)
- return 1;
+ return 2;
}
return 0;
}]])],
@@ -335,7 +352,7 @@ int main ()
mbrtowc (&wc, NULL, 5, &state);
/* Check that wc was not modified. */
if (wc != (wchar_t) 0xBADFACE)
- return 1;
+ return 2;
}
return 0;
}]])],
@@ -522,7 +539,7 @@ int main ()
memset (&state, '\0', sizeof (mbstate_t));
if (mbrtowc (&wc, "", 1, &state) != 0)
- return 1;
+ return 2;
}
return 0;
}]])],
@@ -533,6 +550,81 @@ int main ()
])
])
+dnl Test whether mbrtowc returns the correct value on empty input.
+
+AC_DEFUN([gl_MBRTOWC_EMPTY_INPUT],
+[
+ AC_REQUIRE([AC_PROG_CC])
+ AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
+ AC_CACHE_CHECK([whether mbrtowc works on empty input],
+ [gl_cv_func_mbrtowc_empty_input],
+ [
+ dnl Initial guess, used when cross-compiling or when no suitable locale
+ 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" ;;
+ esac
+changequote([,])dnl
+ AC_RUN_IFELSE(
+ [AC_LANG_SOURCE([[
+ #include <wchar.h>
+ static wchar_t wc;
+ static mbstate_t mbs;
+ int
+ main (void)
+ {
+ return mbrtowc (&wc, "", 0, &mbs) != (size_t) -2;
+ }]])],
+ [gl_cv_func_mbrtowc_empty_input=yes],
+ [gl_cv_func_mbrtowc_empty_input=no],
+ [:])
+ ])
+])
+
+dnl Test whether mbrtowc reports encoding errors in the C locale.
+dnl Although POSIX was never intended to allow this, the GNU C Library
+dnl and other implementations do it. See:
+dnl https://sourceware.org/bugzilla/show_bug.cgi?id=19932
+
+AC_DEFUN([gl_MBRTOWC_C_LOCALE],
+[
+ AC_CACHE_CHECK([whether the C locale is free of encoding errors],
+ [gl_cv_C_locale_sans_EILSEQ],
+ [
+ dnl Initial guess, used when cross-compiling or when no suitable locale
+ dnl is present.
+ gl_cv_C_locale_sans_EILSEQ="guessing no"
+
+ AC_RUN_IFELSE(
+ [AC_LANG_PROGRAM(
+ [[#include <limits.h>
+ #include <locale.h>
+ #include <wchar.h>
+ ]], [[
+ int i;
+ char *locale = setlocale (LC_ALL, "C");
+ if (! locale)
+ return 2;
+ for (i = CHAR_MIN; i <= CHAR_MAX; i++)
+ {
+ char c = i;
+ wchar_t wc;
+ mbstate_t mbs = { 0, };
+ size_t ss = mbrtowc (&wc, &c, 1, &mbs);
+ if (1 < ss)
+ return 3;
+ }
+ return 0;
+ ]])],
+ [gl_cv_C_locale_sans_EILSEQ=yes],
+ [gl_cv_C_locale_sans_EILSEQ=no],
+ [:])])
+])
+
# Prerequisites of lib/mbrtowc.c.
AC_DEFUN([gl_PREREQ_MBRTOWC], [
:
diff --git a/m4/mbsinit.m4 b/m4/mbsinit.m4
index da56c3d..88f0836 100644
--- a/m4/mbsinit.m4
+++ b/m4/mbsinit.m4
@@ -1,5 +1,5 @@
# mbsinit.m4 serial 8
-dnl Copyright (C) 2008, 2010-2012 Free Software Foundation, Inc.
+dnl Copyright (C) 2008, 2010-2016 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 61a8190..0a8eae2 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-2012 Free Software Foundation, Inc.
+dnl Copyright (C) 2000-2002, 2008-2016 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 fec0d25..e770bbf 100644
--- a/m4/mbtowc.m4
+++ b/m4/mbtowc.m4
@@ -1,5 +1,5 @@
# mbtowc.m4 serial 2
-dnl Copyright (C) 2011-2012 Free Software Foundation, Inc.
+dnl Copyright (C) 2011-2016 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 0040294..25d32f0 100644
--- a/m4/memchr.m4
+++ b/m4/memchr.m4
@@ -1,5 +1,5 @@
# memchr.m4 serial 12
-dnl Copyright (C) 2002-2004, 2009-2012 Free Software Foundation, Inc.
+dnl Copyright (C) 2002-2004, 2009-2016 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/memrchr.m4 b/m4/memrchr.m4
new file mode 100644
index 0000000..6e7df5c
--- /dev/null
+++ b/m4/memrchr.m4
@@ -0,0 +1,23 @@
+# memrchr.m4 serial 10
+dnl Copyright (C) 2002-2003, 2005-2007, 2009-2016 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,
+dnl with or without modifications, as long as this notice is preserved.
+
+AC_DEFUN([gl_FUNC_MEMRCHR],
+[
+ dnl Persuade glibc <string.h> to declare memrchr().
+ AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS])
+
+ AC_REQUIRE([gl_HEADER_STRING_H_DEFAULTS])
+ AC_CHECK_DECLS_ONCE([memrchr])
+ if test $ac_cv_have_decl_memrchr = no; then
+ HAVE_DECL_MEMRCHR=0
+ fi
+
+ AC_CHECK_FUNCS([memrchr])
+])
+
+# Prerequisites of lib/memrchr.c.
+AC_DEFUN([gl_PREREQ_MEMRCHR], [:])
diff --git a/m4/minmax.m4 b/m4/minmax.m4
new file mode 100644
index 0000000..9c43e64
--- /dev/null
+++ b/m4/minmax.m4
@@ -0,0 +1,44 @@
+# minmax.m4 serial 4
+dnl Copyright (C) 2005, 2009-2016 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_PREREQ([2.53])
+
+AC_DEFUN([gl_MINMAX],
+[
+ AC_REQUIRE([gl_PREREQ_MINMAX])
+])
+
+# Prerequisites of lib/minmax.h.
+AC_DEFUN([gl_PREREQ_MINMAX],
+[
+ gl_MINMAX_IN_HEADER([limits.h])
+ gl_MINMAX_IN_HEADER([sys/param.h])
+])
+
+dnl gl_MINMAX_IN_HEADER(HEADER)
+dnl The parameter has to be a literal header name; it cannot be macro,
+dnl nor a shell variable. (Because autoheader collects only AC_DEFINE
+dnl invocations with a literal macro name.)
+AC_DEFUN([gl_MINMAX_IN_HEADER],
+[
+ m4_pushdef([header], AS_TR_SH([$1]))
+ m4_pushdef([HEADER], AS_TR_CPP([$1]))
+ AC_CACHE_CHECK([whether <$1> defines MIN and MAX],
+ [gl_cv_minmax_in_]header,
+ [AC_COMPILE_IFELSE(
+ [AC_LANG_PROGRAM(
+ [[#include <$1>
+ int x = MIN (42, 17);]],
+ [[]])],
+ [gl_cv_minmax_in_]header[=yes],
+ [gl_cv_minmax_in_]header[=no])])
+ if test $gl_cv_minmax_in_[]header = yes; then
+ AC_DEFINE([HAVE_MINMAX_IN_]HEADER, 1,
+ [Define to 1 if <$1> defines the MIN and MAX macros.])
+ fi
+ m4_popdef([HEADER])
+ m4_popdef([header])
+])
diff --git a/m4/mkostemp.m4 b/m4/mkostemp.m4
index ff4fb6b..1f44a03 100644
--- a/m4/mkostemp.m4
+++ b/m4/mkostemp.m4
@@ -1,5 +1,5 @@
# mkostemp.m4 serial 2
-dnl Copyright (C) 2009-2012 Free Software Foundation, Inc.
+dnl Copyright (C) 2009-2016 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 748b17d..853c89d 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-2012 Free Software Foundation, Inc.
+dnl Copyright (C) 2005, 2007, 2009-2016 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
new file mode 100644
index 0000000..0cd40db
--- /dev/null
+++ b/m4/mode_t.m4
@@ -0,0 +1,26 @@
+# mode_t.m4 serial 2
+dnl Copyright (C) 2009-2016 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 using mode_t, it's sufficient to use AC_TYPE_MODE_T and
+# include <sys/types.h>.
+
+# Define PROMOTED_MODE_T to the type that is the result of "default argument
+# promotion" (ISO C 6.5.2.2.(6)) of the type mode_t.
+AC_DEFUN([gl_PROMOTED_TYPE_MODE_T],
+[
+ AC_REQUIRE([AC_TYPE_MODE_T])
+ AC_CACHE_CHECK([for promoted mode_t type], [gl_cv_promoted_mode_t], [
+ dnl Assume mode_t promotes to 'int' if and only if it is smaller than 'int',
+ dnl and to itself otherwise. This assumption is not guaranteed by the ISO C
+ dnl standard, but we don't know of any real-world counterexamples.
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <sys/types.h>]],
+ [[typedef int array[2 * (sizeof (mode_t) < sizeof (int)) - 1];]])],
+ [gl_cv_promoted_mode_t='int'],
+ [gl_cv_promoted_mode_t='mode_t'])
+ ])
+ AC_DEFINE_UNQUOTED([PROMOTED_MODE_T], [$gl_cv_promoted_mode_t],
+ [Define to the type that is the result of default argument promotions of type mode_t.])
+])
diff --git a/m4/msvc-inval.m4 b/m4/msvc-inval.m4
index 8db4617..f5e4c89 100644
--- a/m4/msvc-inval.m4
+++ b/m4/msvc-inval.m4
@@ -1,5 +1,5 @@
# msvc-inval.m4 serial 1
-dnl Copyright (C) 2011-2012 Free Software Foundation, Inc.
+dnl Copyright (C) 2011-2016 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 0125050..58f5c0b 100644
--- a/m4/msvc-nothrow.m4
+++ b/m4/msvc-nothrow.m4
@@ -1,5 +1,5 @@
# msvc-nothrow.m4 serial 1
-dnl Copyright (C) 2011-2012 Free Software Foundation, Inc.
+dnl Copyright (C) 2011-2016 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 0c288b8..43b5d05 100644
--- a/m4/multiarch.m4
+++ b/m4/multiarch.m4
@@ -1,5 +1,5 @@
# multiarch.m4 serial 7
-dnl Copyright (C) 2008-2012 Free Software Foundation, Inc.
+dnl Copyright (C) 2008-2016 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/nl_langinfo.m4 b/m4/nl_langinfo.m4
index 80fe60d..a2f7196 100644
--- a/m4/nl_langinfo.m4
+++ b/m4/nl_langinfo.m4
@@ -1,5 +1,5 @@
# nl_langinfo.m4 serial 5
-dnl Copyright (C) 2009-2012 Free Software Foundation, Inc.
+dnl Copyright (C) 2009-2016 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/nls.m4 b/m4/nls.m4
index 36cbbe5..53cdc8b 100644
--- a/m4/nls.m4
+++ b/m4/nls.m4
@@ -1,7 +1,6 @@
-# -*- buffer-read-only: t -*- vi: set ro:
-# DO NOT EDIT! GENERATED AUTOMATICALLY!
-# nls.m4 serial 3 (gettext-0.15)
-dnl Copyright (C) 1995-2003, 2005-2006 Free Software Foundation, Inc.
+# nls.m4 serial 5 (gettext-0.18)
+dnl Copyright (C) 1995-2003, 2005-2006, 2008-2014 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,
dnl with or without modifications, as long as this notice is preserved.
@@ -19,15 +18,15 @@ dnl Authors:
dnl Ulrich Drepper <drepper@cygnus.com>, 1995-2000.
dnl Bruno Haible <haible@clisp.cons.org>, 2000-2003.
-AC_PREREQ(2.50)
+AC_PREREQ([2.50])
AC_DEFUN([AM_NLS],
[
AC_MSG_CHECKING([whether NLS is requested])
dnl Default is enabled NLS
- AC_ARG_ENABLE(nls,
+ AC_ARG_ENABLE([nls],
[ --disable-nls do not use Native Language Support],
USE_NLS=$enableval, USE_NLS=yes)
- AC_MSG_RESULT($USE_NLS)
- AC_SUBST(USE_NLS)
+ AC_MSG_RESULT([$USE_NLS])
+ AC_SUBST([USE_NLS])
])
diff --git a/m4/nocrash.m4 b/m4/nocrash.m4
index c2638df..d8dd8f1 100644
--- a/m4/nocrash.m4
+++ b/m4/nocrash.m4
@@ -1,5 +1,5 @@
# nocrash.m4 serial 4
-dnl Copyright (C) 2005, 2009-2012 Free Software Foundation, Inc.
+dnl Copyright (C) 2005, 2009-2016 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.
@@ -110,11 +110,12 @@ nocrash_init (void)
#else
/* Avoid a crash on POSIX systems. */
#include <signal.h>
+#include <unistd.h>
/* A POSIX signal handler. */
static void
exception_handler (int sig)
{
- exit (1);
+ _exit (1);
}
static void
nocrash_init (void)
diff --git a/m4/non-recursive-gnulib-prefix-hack.m4 b/m4/non-recursive-gnulib-prefix-hack.m4
new file mode 100644
index 0000000..1cc2629
--- /dev/null
+++ b/m4/non-recursive-gnulib-prefix-hack.m4
@@ -0,0 +1,32 @@
+dnl Copyright (C) 2012-2016 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_NON_RECURSIVE_GNULIB_PREFIX_HACK LIB_DIR
+dnl Adjust configure-set $gl_LIBOBJS and each AC_SUBST'd *_H variable
+dnl with a value ending in ".h" to reflect that these files are located
+dnl in the directory specified by LIB_DIR.
+AC_DEFUN([gl_NON_RECURSIVE_GNULIB_PREFIX_HACK],
+[
+ # Tell AC_LIBSOURCES where to find source files like alloca.c.
+ AC_CONFIG_LIBOBJ_DIR([$1])
+
+ # This hack originated in bison. It is required when using non-recursive
+ # automake rules to build from gnulib-provided lib/ sources. Hence, LIB_DIR
+ # is usually simply "lib". Those rules use the list of names like "fchdir.o"
+ # and "strstr.o" in gl_LIBOBJS. With non-recursive make, we must prefix each
+ # such file name with the "lib/" prefix. See also build-aux/prefix-gnulib-mk.
+ gl_LIBOBJS=`echo "$gl_LIBOBJS" | sed -e 's, , $1/,g'`
+
+ # Listing the names of the variables to prefix is error-prone.
+ # Rather, adjust each AC_SUBST'd variable whose name ends in '_H'
+ # and whose value ends in '.h'.
+ for ac_var in $ac_subst_vars
+ do
+ eval "ac_val=\$$ac_var"
+ case $ac_var:$ac_val in
+ *_H:*.h) eval "$ac_var=$1/\$$ac_var";;
+ esac
+ done
+])
diff --git a/m4/obstack.m4 b/m4/obstack.m4
new file mode 100644
index 0000000..98ca5f9
--- /dev/null
+++ b/m4/obstack.m4
@@ -0,0 +1,35 @@
+# See if we need to provide obstacks.
+
+dnl Copyright 1996-2016 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 This replaces Autoconf's AC_FUNC_OBSTACK.
+dnl The Autoconf version should be marked obsolete at some point.
+
+AC_DEFUN([AC_FUNC_OBSTACK],
+ [AC_LIBSOURCES([obstack.h, obstack.c])dnl
+ AC_CACHE_CHECK([for obstacks that work with any size object],
+ [ac_cv_func_obstack],
+ [AC_LINK_IFELSE(
+ [AC_LANG_PROGRAM(
+ [[#include "obstack.h"
+ void *obstack_chunk_alloc (size_t n) { return 0; }
+ void obstack_chunk_free (void *p) { }
+ /* Check that an internal function returns size_t, not int. */
+ size_t _obstack_memory_used (struct obstack *);
+ ]],
+ [[struct obstack mem;
+ obstack_init (&mem);
+ obstack_free (&mem, 0);
+ ]])],
+ [ac_cv_func_obstack=yes],
+ [ac_cv_func_obstack=no])])
+ if test "$ac_cv_func_obstack" = yes; then
+ AC_DEFINE([HAVE_OBSTACK], 1,
+ [Define to 1 if the system has obstacks that work with any size object.])
+ else
+ AC_LIBOBJ([obstack])
+ fi
+])
diff --git a/m4/off_t.m4 b/m4/off_t.m4
index dfca2df..282751b 100644
--- a/m4/off_t.m4
+++ b/m4/off_t.m4
@@ -1,5 +1,5 @@
# off_t.m4 serial 1
-dnl Copyright (C) 2012 Free Software Foundation, Inc.
+dnl Copyright (C) 2012-2016 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.m4 b/m4/open.m4
new file mode 100644
index 0000000..53d3038
--- /dev/null
+++ b/m4/open.m4
@@ -0,0 +1,91 @@
+# open.m4 serial 14
+dnl Copyright (C) 2007-2016 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_OPEN],
+[
+ AC_REQUIRE([AC_CANONICAL_HOST])
+ case "$host_os" in
+ mingw* | pw*)
+ REPLACE_OPEN=1
+ ;;
+ *)
+ 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])
+ 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.
+ if test $ac_cv_func_lstat = yes; then
+ touch conftest.tmp
+ ln -s conftest.tmp conftest.lnk
+ fi
+ AC_RUN_IFELSE(
+ [AC_LANG_SOURCE([[
+#include <fcntl.h>
+#if HAVE_UNISTD_H
+# include <unistd.h>
+#endif
+int main ()
+{
+ int result = 0;
+#if HAVE_LSTAT
+ if (open ("conftest.lnk/", O_RDONLY) != -1)
+ result |= 1;
+#endif
+ if (open ("conftest.sl/", O_CREAT, 0600) >= 0)
+ result |= 2;
+ return result;
+}]])],
+ [gl_cv_func_open_slash=yes],
+ [gl_cv_func_open_slash=no],
+ [
+changequote(,)dnl
+ case "$host_os" in
+ freebsd* | aix* | hpux* | solaris2.[0-9] | solaris2.[0-9].*)
+ gl_cv_func_open_slash="guessing no" ;;
+ *)
+ gl_cv_func_open_slash="guessing yes" ;;
+ esac
+changequote([,])dnl
+ ])
+ rm -f conftest.sl conftest.tmp conftest.lnk
+ ])
+ case "$gl_cv_func_open_slash" in
+ *no)
+ AC_DEFINE([OPEN_TRAILING_SLASH_BUG], [1],
+ [Define to 1 if open() fails to recognize a trailing slash.])
+ REPLACE_OPEN=1
+ ;;
+ esac
+ ;;
+ esac
+ dnl Replace open() for supporting the gnulib-defined fchdir() function,
+ dnl to keep fchdir's bookkeeping up-to-date.
+ m4_ifdef([gl_FUNC_FCHDIR], [
+ if test $REPLACE_OPEN = 0; then
+ gl_TEST_FCHDIR
+ if test $HAVE_FCHDIR = 0; then
+ REPLACE_OPEN=1
+ fi
+ fi
+ ])
+ dnl Replace open() for supporting the gnulib-defined O_NONBLOCK flag.
+ m4_ifdef([gl_NONBLOCKING_IO], [
+ if test $REPLACE_OPEN = 0; then
+ gl_NONBLOCKING_IO
+ if test $gl_cv_have_open_O_NONBLOCK != yes; then
+ REPLACE_OPEN=1
+ fi
+ fi
+ ])
+])
+
+# Prerequisites of lib/open.c.
+AC_DEFUN([gl_PREREQ_OPEN],
+[
+ AC_REQUIRE([gl_PROMOTED_TYPE_MODE_T])
+ :
+])
diff --git a/m4/opendir.m4 b/m4/opendir.m4
new file mode 100644
index 0000000..ffaa6ae
--- /dev/null
+++ b/m4/opendir.m4
@@ -0,0 +1,31 @@
+# opendir.m4 serial 4
+dnl Copyright (C) 2011-2016 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_OPENDIR],
+[
+ AC_REQUIRE([gl_DIRENT_H_DEFAULTS])
+
+ AC_CHECK_FUNCS([opendir])
+ if test $ac_cv_func_opendir = no; then
+ HAVE_OPENDIR=0
+ fi
+ dnl Replace opendir() 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
+ if test $HAVE_OPENDIR = 1; then
+ REPLACE_OPENDIR=1
+ fi
+ fi
+ ])
+ dnl Replace opendir() on OS/2 kLIBC to support dirfd() function replaced
+ dnl by gnulib.
+ case $host_os,$HAVE_OPENDIR in
+ os2*,1)
+ REPLACE_OPENDIR=1;;
+ esac
+])
diff --git a/m4/pathmax.m4 b/m4/pathmax.m4
index 0117861..6f8e59a 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-2012 Free Software Foundation,
+dnl Copyright (C) 2002-2003, 2005-2006, 2009-2016 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/po.m4 b/m4/po.m4
index 529e1a7..84659ea 100644
--- a/m4/po.m4
+++ b/m4/po.m4
@@ -1,7 +1,5 @@
-# -*- buffer-read-only: t -*- vi: set ro:
-# DO NOT EDIT! GENERATED AUTOMATICALLY!
-# po.m4 serial 15 (gettext-0.17)
-dnl Copyright (C) 1995-2007 Free Software Foundation, Inc.
+# po.m4 serial 22 (gettext-0.19)
+dnl Copyright (C) 1995-2014 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,19 +17,20 @@ dnl Authors:
dnl Ulrich Drepper <drepper@cygnus.com>, 1995-2000.
dnl Bruno Haible <haible@clisp.cons.org>, 2000-2003.
-AC_PREREQ(2.50)
+AC_PREREQ([2.60])
dnl Checks for all prerequisites of the po subdirectory.
AC_DEFUN([AM_PO_SUBDIRS],
[
AC_REQUIRE([AC_PROG_MAKE_SET])dnl
AC_REQUIRE([AC_PROG_INSTALL])dnl
- AC_REQUIRE([AM_PROG_MKDIR_P])dnl defined by automake
+ AC_REQUIRE([AC_PROG_MKDIR_P])dnl
+ AC_REQUIRE([AC_PROG_SED])dnl
AC_REQUIRE([AM_NLS])dnl
dnl Release version of the gettext macros. This is used to ensure that
dnl the gettext macros and po/Makefile.in.in are in sync.
- AC_SUBST([GETTEXT_MACRO_VERSION], [0.17])
+ AC_SUBST([GETTEXT_MACRO_VERSION], [0.19])
dnl Perform the following tests also if --disable-nls has been given,
dnl because they are needed for "make dist" to work.
@@ -43,7 +42,7 @@ AC_DEFUN([AM_PO_SUBDIRS],
[$ac_dir/$ac_word --statistics /dev/null >&]AS_MESSAGE_LOG_FD[ 2>&1 &&
(if $ac_dir/$ac_word --statistics /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi)],
:)
- AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
+ AC_PATH_PROG([GMSGFMT], [gmsgfmt], [$MSGFMT])
dnl Test whether it is GNU msgfmt >= 0.15.
changequote(,)dnl
@@ -104,7 +103,7 @@ changequote([,])dnl
case "$ac_file" in */Makefile.in)
# Adjust a relative srcdir.
ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'`
- ac_dir_suffix="/`echo "$ac_dir"|sed 's%^\./%%'`"
+ ac_dir_suffix=/`echo "$ac_dir"|sed 's%^\./%%'`
ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'`
# In autoconf-2.13 it is called $ac_given_srcdir.
# In autoconf-2.50 it is called $srcdir.
@@ -120,7 +119,8 @@ changequote([,])dnl
if test -f "$ac_given_srcdir/$ac_dir/POTFILES.in"; then
rm -f "$ac_dir/POTFILES"
test -n "$as_me" && echo "$as_me: creating $ac_dir/POTFILES" || echo "creating $ac_dir/POTFILES"
- cat "$ac_given_srcdir/$ac_dir/POTFILES.in" | sed -e "/^#/d" -e "/^[ ]*\$/d" -e "s,.*, $top_srcdir/& \\\\," | sed -e "\$s/\(.*\) \\\\/\1/" > "$ac_dir/POTFILES"
+ gt_tab=`printf '\t'`
+ cat "$ac_given_srcdir/$ac_dir/POTFILES.in" | sed -e "/^#/d" -e "/^[ ${gt_tab}]*\$/d" -e "s,.*, $top_srcdir/& \\\\," | sed -e "\$s/\(.*\) \\\\/\1/" > "$ac_dir/POTFILES"
POMAKEFILEDEPS="POTFILES.in"
# ALL_LINGUAS, POFILES, UPDATEPOFILES, DUMMYPOFILES, GMOFILES depend
# on $ac_dir but don't depend on user-specified configuration
@@ -131,12 +131,12 @@ changequote([,])dnl
test -n "$as_me" && echo "$as_me: setting ALL_LINGUAS in configure.in is obsolete" || echo "setting ALL_LINGUAS in configure.in is obsolete"
fi
ALL_LINGUAS_=`sed -e "/^#/d" -e "s/#.*//" "$ac_given_srcdir/$ac_dir/LINGUAS"`
- # Hide the ALL_LINGUAS assigment from automake < 1.5.
+ # Hide the ALL_LINGUAS assignment from automake < 1.5.
eval 'ALL_LINGUAS''=$ALL_LINGUAS_'
POMAKEFILEDEPS="$POMAKEFILEDEPS LINGUAS"
else
# The set of available languages was given in configure.in.
- # Hide the ALL_LINGUAS assigment from automake < 1.5.
+ # Hide the ALL_LINGUAS assignment from automake < 1.5.
eval 'ALL_LINGUAS''=$OBSOLETE_ALL_LINGUAS'
fi
# Compute POFILES
@@ -228,7 +228,7 @@ AC_DEFUN([AM_POSTPROCESS_PO_MAKEFILE],
changequote(,)dnl
# Adjust a relative srcdir.
ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'`
- ac_dir_suffix="/`echo "$ac_dir"|sed 's%^\./%%'`"
+ ac_dir_suffix=/`echo "$ac_dir"|sed 's%^\./%%'`
ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'`
# In autoconf-2.13 it is called $ac_given_srcdir.
# In autoconf-2.50 it is called $srcdir.
@@ -256,6 +256,7 @@ EOT
fi
# A sed script that extracts the value of VARIABLE from a Makefile.
+ tab=`printf '\t'`
sed_x_variable='
# Test if the hold space is empty.
x
@@ -263,9 +264,9 @@ s/P/P/
x
ta
# Yes it was empty. Look if we have the expected variable definition.
-/^[ ]*VARIABLE[ ]*=/{
+/^['"${tab}"' ]*VARIABLE['"${tab}"' ]*=/{
# Seen the first line of the variable definition.
- s/^[ ]*VARIABLE[ ]*=//
+ s/^['"${tab}"' ]*VARIABLE['"${tab}"' ]*=//
ba
}
bd
@@ -317,7 +318,7 @@ changequote([,])dnl
sed_x_LINGUAS=`$gt_echo "$sed_x_variable" | sed -e '/^ *#/d' -e 's/VARIABLE/LINGUAS/g'`
ALL_LINGUAS_=`sed -n -e "$sed_x_LINGUAS" < "$ac_file"`
fi
- # Hide the ALL_LINGUAS assigment from automake < 1.5.
+ # Hide the ALL_LINGUAS assignment from automake < 1.5.
eval 'ALL_LINGUAS''=$ALL_LINGUAS_'
# Compute POFILES
# as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).po)
@@ -407,14 +408,15 @@ changequote([,])dnl
fi
sed -e "s|@POTFILES_DEPS@|$POTFILES_DEPS|g" -e "s|@POFILES@|$POFILES|g" -e "s|@UPDATEPOFILES@|$UPDATEPOFILES|g" -e "s|@DUMMYPOFILES@|$DUMMYPOFILES|g" -e "s|@GMOFILES@|$GMOFILES|g" -e "s|@PROPERTIESFILES@|$PROPERTIESFILES|g" -e "s|@CLASSFILES@|$CLASSFILES|g" -e "s|@QMFILES@|$QMFILES|g" -e "s|@MSGFILES@|$MSGFILES|g" -e "s|@RESOURCESDLLFILES@|$RESOURCESDLLFILES|g" -e "s|@CATALOGS@|$CATALOGS|g" -e "s|@JAVACATALOGS@|$JAVACATALOGS|g" -e "s|@QTCATALOGS@|$QTCATALOGS|g" -e "s|@TCLCATALOGS@|$TCLCATALOGS|g" -e "s|@CSHARPCATALOGS@|$CSHARPCATALOGS|g" -e 's,^#distdir:,distdir:,' < "$ac_file" > "$ac_file.tmp"
+ tab=`printf '\t'`
if grep -l '@TCLCATALOGS@' "$ac_file" > /dev/null; then
# Add dependencies that cannot be formulated as a simple suffix rule.
for lang in $ALL_LINGUAS; do
frobbedlang=`echo $lang | sed -e 's/\..*$//' -e 'y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/'`
cat >> "$ac_file.tmp" <<EOF
$frobbedlang.msg: $lang.po
- @echo "\$(MSGFMT) -c --tcl -d \$(srcdir) -l $lang $srcdirpre$lang.po"; \
- \$(MSGFMT) -c --tcl -d "\$(srcdir)" -l $lang $srcdirpre$lang.po || { rm -f "\$(srcdir)/$frobbedlang.msg"; exit 1; }
+${tab}@echo "\$(MSGFMT) -c --tcl -d \$(srcdir) -l $lang $srcdirpre$lang.po"; \
+${tab}\$(MSGFMT) -c --tcl -d "\$(srcdir)" -l $lang $srcdirpre$lang.po || { rm -f "\$(srcdir)/$frobbedlang.msg"; exit 1; }
EOF
done
fi
@@ -424,8 +426,8 @@ EOF
frobbedlang=`echo $lang | sed -e 's/_/-/g' -e 's/^sr-CS/sr-SP/' -e 's/@latin$/-Latn/' -e 's/@cyrillic$/-Cyrl/' -e 's/^sr-SP$/sr-SP-Latn/' -e 's/^uz-UZ$/uz-UZ-Latn/'`
cat >> "$ac_file.tmp" <<EOF
$frobbedlang/\$(DOMAIN).resources.dll: $lang.po
- @echo "\$(MSGFMT) -c --csharp -d \$(srcdir) -l $lang $srcdirpre$lang.po -r \$(DOMAIN)"; \
- \$(MSGFMT) -c --csharp -d "\$(srcdir)" -l $lang $srcdirpre$lang.po -r "\$(DOMAIN)" || { rm -f "\$(srcdir)/$frobbedlang.msg"; exit 1; }
+${tab}@echo "\$(MSGFMT) -c --csharp -d \$(srcdir) -l $lang $srcdirpre$lang.po -r \$(DOMAIN)"; \
+${tab}\$(MSGFMT) -c --csharp -d "\$(srcdir)" -l $lang $srcdirpre$lang.po -r "\$(DOMAIN)" || { rm -f "\$(srcdir)/$frobbedlang.msg"; exit 1; }
EOF
done
fi
diff --git a/m4/progtest.m4 b/m4/progtest.m4
index 6b44328..b499f79 100644
--- a/m4/progtest.m4
+++ b/m4/progtest.m4
@@ -1,7 +1,5 @@
-# -*- buffer-read-only: t -*- vi: set ro:
-# DO NOT EDIT! GENERATED AUTOMATICALLY!
-# progtest.m4 serial 4 (gettext-0.14.2)
-dnl Copyright (C) 1996-2003, 2005 Free Software Foundation, Inc.
+# progtest.m4 serial 7 (gettext-0.18.2)
+dnl Copyright (C) 1996-2003, 2005, 2008-2014 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 +16,7 @@ dnl They are *not* in the public domain.
dnl Authors:
dnl Ulrich Drepper <drepper@cygnus.com>, 1996.
-AC_PREREQ(2.50)
+AC_PREREQ([2.50])
# Search path for a program which passes the given test.
@@ -29,15 +27,14 @@ AC_DEFUN([AM_PATH_PROG_WITH_TEST],
# Prepare PATH_SEPARATOR.
# The user is always right.
if test "${PATH_SEPARATOR+set}" != set; then
- echo "#! /bin/sh" >conf$$.sh
- echo "exit 0" >>conf$$.sh
- chmod +x conf$$.sh
- if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
- PATH_SEPARATOR=';'
- else
- PATH_SEPARATOR=:
- fi
- rm -f conf$$.sh
+ # 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
# Find out how to test for executable files. Don't use a zero-byte file,
@@ -57,7 +54,7 @@ rm -f conf$$.file
# Extract the first word of "$2", so it can be a program name with args.
set dummy $2; ac_word=[$]2
AC_MSG_CHECKING([for $ac_word])
-AC_CACHE_VAL(ac_cv_path_$1,
+AC_CACHE_VAL([ac_cv_path_$1],
[case "[$]$1" in
[[\\/]]* | ?:[[\\/]]*)
ac_cv_path_$1="[$]$1" # Let the user override the test with a path.
@@ -86,9 +83,9 @@ ifelse([$4], , , [ test -z "[$]ac_cv_path_$1" && ac_cv_path_$1="$4"
esac])dnl
$1="$ac_cv_path_$1"
if test ifelse([$4], , [-n "[$]$1"], ["[$]$1" != "$4"]); then
- AC_MSG_RESULT([$]$1)
+ AC_MSG_RESULT([$][$1])
else
- AC_MSG_RESULT(no)
+ AC_MSG_RESULT([no])
fi
-AC_SUBST($1)dnl
+AC_SUBST([$1])dnl
])
diff --git a/m4/putenv.m4 b/m4/putenv.m4
new file mode 100644
index 0000000..c3c30d8
--- /dev/null
+++ b/m4/putenv.m4
@@ -0,0 +1,56 @@
+# putenv.m4 serial 20
+dnl Copyright (C) 2002-2016 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 Jim Meyering.
+dnl
+dnl Check whether putenv ("FOO") removes FOO from the environment.
+dnl The putenv in libc on at least SunOS 4.1.4 does *not* do that.
+
+AC_DEFUN([gl_FUNC_PUTENV],
+[
+ AC_REQUIRE([gl_STDLIB_H_DEFAULTS])
+ AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
+ AC_CACHE_CHECK([for putenv compatible with GNU and SVID],
+ [gl_cv_func_svid_putenv],
+ [AC_RUN_IFELSE([AC_LANG_PROGRAM([AC_INCLUDES_DEFAULT],[[
+ /* Put it in env. */
+ if (putenv ("CONFTEST_putenv=val"))
+ return 1;
+
+ /* Try to remove it. */
+ if (putenv ("CONFTEST_putenv"))
+ return 2;
+
+ /* Make sure it was deleted. */
+ if (getenv ("CONFTEST_putenv") != 0)
+ return 3;
+
+ return 0;
+ ]])],
+ gl_cv_func_svid_putenv=yes,
+ 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" ;;
+ esac
+ ])
+ ])
+ case "$gl_cv_func_svid_putenv" in
+ *yes) ;;
+ *)
+ REPLACE_PUTENV=1
+ ;;
+ esac
+])
+
+# Prerequisites of lib/putenv.c.
+AC_DEFUN([gl_PREREQ_PUTENV],
+[
+ AC_CHECK_DECLS([_putenv])
+])
diff --git a/m4/quote.m4 b/m4/quote.m4
index 7b05584..50894f8 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-2012 Free Software Foundation,
+dnl Copyright (C) 2002-2003, 2005-2006, 2009-2016 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 09c36bb..2562375 100644
--- a/m4/quotearg.m4
+++ b/m4/quotearg.m4
@@ -1,5 +1,5 @@
# quotearg.m4 serial 9
-dnl Copyright (C) 2002, 2004-2012 Free Software Foundation, Inc.
+dnl Copyright (C) 2002, 2004-2016 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/read-file.m4 b/m4/read-file.m4
new file mode 100644
index 0000000..aa23b58
--- /dev/null
+++ b/m4/read-file.m4
@@ -0,0 +1,8 @@
+# read-file.m4 serial 3
+dnl Copyright (C) 2002-2006, 2009-2016 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.
+
+# Prerequisites of lib/read-file.c.
+AC_DEFUN([gl_PREREQ_READ_FILE], [:])
diff --git a/m4/readdir.m4 b/m4/readdir.m4
new file mode 100644
index 0000000..eda3acf
--- /dev/null
+++ b/m4/readdir.m4
@@ -0,0 +1,15 @@
+# readdir.m4 serial 1
+dnl Copyright (C) 2011-2016 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_READDIR],
+[
+ AC_REQUIRE([gl_DIRENT_H_DEFAULTS])
+
+ AC_CHECK_FUNCS([readdir])
+ if test $ac_cv_func_readdir = no; then
+ HAVE_READDIR=0
+ fi
+])
diff --git a/m4/readlink.m4 b/m4/readlink.m4
index ccf5141..ede0378 100644
--- a/m4/readlink.m4
+++ b/m4/readlink.m4
@@ -1,5 +1,5 @@
# readlink.m4 serial 12
-dnl Copyright (C) 2003, 2007, 2009-2012 Free Software Foundation, Inc.
+dnl Copyright (C) 2003, 2007, 2009-2016 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/realloc.m4 b/m4/realloc.m4
index 954c2f0..fc22825 100644
--- a/m4/realloc.m4
+++ b/m4/realloc.m4
@@ -1,13 +1,13 @@
-# realloc.m4 serial 13
-dnl Copyright (C) 2007, 2009-2012 Free Software Foundation, Inc.
+# realloc.m4 serial 14
+dnl Copyright (C) 2007, 2009-2016 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.
m4_version_prereq([2.70], [] ,[
-# This is taken from the following Autoconf patch:
-# http://git.savannah.gnu.org/gitweb/?p=autoconf.git;a=commitdiff;h=7fbb553727ed7e0e689a17594b58559ecf3ea6e9
+# This is adapted with modifications from upstream Autoconf here:
+# http://git.savannah.gnu.org/cgit/autoconf.git/commit/?id=04be2b7a29d65d9a08e64e8e56e594c91749598c
AC_DEFUN([_AC_FUNC_REALLOC_IF],
[
AC_REQUIRE([AC_HEADER_STDC])dnl
@@ -23,7 +23,10 @@ AC_DEFUN([_AC_FUNC_REALLOC_IF],
char *realloc ();
#endif
]],
- [[return ! realloc (0, 0);]])
+ [[char *p = realloc (0, 0);
+ int result = !p;
+ free (p);
+ return result;]])
],
[ac_cv_func_realloc_0_nonnull=yes],
[ac_cv_func_realloc_0_nonnull=no],
diff --git a/m4/regex.m4 b/m4/regex.m4
index 41be5e8..abfd262 100644
--- a/m4/regex.m4
+++ b/m4/regex.m4
@@ -1,6 +1,6 @@
-# serial 61
+# serial 66
-# Copyright (C) 1996-2001, 2003-2012 Free Software Foundation, Inc.
+# Copyright (C) 1996-2001, 2003-2016 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -27,15 +27,32 @@ AC_DEFUN([gl_REGEX],
# following run test, then default to *not* using the included regex.c.
# If cross compiling, assume the test would fail and use the included
# regex.c.
+ AC_CHECK_DECLS_ONCE([alarm])
+ AC_CHECK_HEADERS_ONCE([malloc.h])
AC_CACHE_CHECK([for working re_compile_pattern],
[gl_cv_func_re_compile_pattern_working],
[AC_RUN_IFELSE(
[AC_LANG_PROGRAM(
- [AC_INCLUDES_DEFAULT[
- #include <locale.h>
- #include <limits.h>
- #include <regex.h>
- ]],
+ [[#include <regex.h>
+
+ #include <locale.h>
+ #include <limits.h>
+ #include <string.h>
+
+ #if defined M_CHECK_ACTION || HAVE_DECL_ALARM
+ # include <signal.h>
+ # include <unistd.h>
+ #endif
+
+ #if HAVE_MALLOC_H
+ # include <malloc.h>
+ #endif
+
+ #ifdef M_CHECK_ACTION
+ /* Exit with distinguishable exit code. */
+ static void sigabrt_no_core (int sig) { raise (SIGTERM); }
+ #endif
+ ]],
[[int result = 0;
static struct re_pattern_buffer regex;
unsigned char folded_chars[UCHAR_MAX + 1];
@@ -43,26 +60,74 @@ AC_DEFUN([gl_REGEX],
const char *s;
struct re_registers regs;
- /* http://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
- test here. */
+ /* Some builds of glibc go into an infinite loop on this
+ test. Use alarm to force death, and mallopt to avoid
+ malloc recursion in diagnosing the corrupted heap. */
+#if HAVE_DECL_ALARM
+ signal (SIGALRM, SIG_DFL);
+ alarm (2);
+#endif
+#ifdef M_CHECK_ACTION
+ signal (SIGABRT, sigabrt_no_core);
+ mallopt (M_CHECK_ACTION, 2);
+#endif
+
if (setlocale (LC_ALL, "en_US.UTF-8"))
{
- static char const pat[] = "insert into";
- static char const data[] =
- "\xFF\0\x12\xA2\xAA\xC4\xB1,K\x12\xC4\xB1*\xACK";
- re_set_syntax (RE_SYNTAX_GREP | RE_HAT_LISTS_NOT_NEWLINE
- | RE_ICASE);
- memset (&regex, 0, sizeof regex);
- s = re_compile_pattern (pat, sizeof pat - 1, &regex);
- if (s)
- result |= 1;
- else if (re_search (&regex, data, sizeof data - 1,
- 0, sizeof data - 1, &regs)
- != -1)
- result |= 1;
+ {
+ /* http://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
+ test here. */
+ static char const pat[] = "insert into";
+ static char const data[] =
+ "\xFF\0\x12\xA2\xAA\xC4\xB1,K\x12\xC4\xB1*\xACK";
+ re_set_syntax (RE_SYNTAX_GREP | RE_HAT_LISTS_NOT_NEWLINE
+ | RE_ICASE);
+ memset (&regex, 0, sizeof regex);
+ s = re_compile_pattern (pat, sizeof pat - 1, &regex);
+ if (s)
+ result |= 1;
+ else if (re_search (&regex, data, sizeof data - 1,
+ 0, sizeof data - 1, &regs)
+ != -1)
+ result |= 1;
+ regfree (&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>.
+ */
+ static char const pat[] = "[^x]x";
+ static char const data[] =
+ /* <U1000><U103B><U103D><U1014><U103A><U102F><U1015><U103A> */
+ "\xe1\x80\x80"
+ "\xe1\x80\xbb"
+ "\xe1\x80\xbd"
+ "\xe1\x80\x94"
+ "\xe1\x80\xba"
+ "\xe1\x80\xaf"
+ "\xe1\x80\x95"
+ "\xe1\x80\xba"
+ "x";
+ re_set_syntax (0);
+ memset (&regex, 0, sizeof regex);
+ s = re_compile_pattern (pat, sizeof pat - 1, &regex);
+ if (s)
+ result |= 1;
+ else
+ {
+ i = re_search (&regex, data, sizeof data - 1,
+ 0, sizeof data - 1, 0);
+ if (i != 0 && i != 21)
+ result |= 1;
+ }
+ regfree (&regex);
+ }
+
if (! setlocale (LC_ALL, "C"))
return 1;
}
@@ -220,7 +285,9 @@ AC_DEFUN([gl_PREREQ_REGEX],
AC_REQUIRE([AC_C_INLINE])
AC_REQUIRE([AC_C_RESTRICT])
AC_REQUIRE([AC_TYPE_MBSTATE_T])
+ AC_REQUIRE([gl_EEMALLOC])
+ AC_REQUIRE([gl_GLIBC21])
AC_CHECK_HEADERS([libintl.h])
- AC_CHECK_FUNCS_ONCE([isblank iswctype wcscoll])
+ AC_CHECK_FUNCS_ONCE([isblank iswctype])
AC_CHECK_DECLS([isblank], [], [], [[#include <ctype.h>]])
])
diff --git a/m4/rename.m4 b/m4/rename.m4
index 378b5ec..fbcc758 100644
--- a/m4/rename.m4
+++ b/m4/rename.m4
@@ -1,6 +1,6 @@
# serial 26
-# Copyright (C) 2001, 2003, 2005-2006, 2009-2012 Free Software Foundation, Inc.
+# Copyright (C) 2001, 2003, 2005-2006, 2009-2016 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/rmdir.m4 b/m4/rmdir.m4
index 34ca876..ebb3b5d 100644
--- a/m4/rmdir.m4
+++ b/m4/rmdir.m4
@@ -1,5 +1,5 @@
# rmdir.m4 serial 13
-dnl Copyright (C) 2002, 2005, 2009-2012 Free Software Foundation, Inc.
+dnl Copyright (C) 2002, 2005, 2009-2016 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/secure_getenv.m4 b/m4/secure_getenv.m4
new file mode 100644
index 0000000..3983173
--- /dev/null
+++ b/m4/secure_getenv.m4
@@ -0,0 +1,26 @@
+# Look up an environment variable more securely.
+dnl Copyright 2013-2016 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/selinux-context-h.m4 b/m4/selinux-context-h.m4
index 7ad67bb..35ae11c 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-2012 Free Software Foundation, Inc.
+# Copyright (C) 2006-2007, 2009-2016 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 ed5215b..2153b36 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-2012 Free Software Foundation, Inc.
+# Copyright (C) 2006-2007, 2009-2016 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.
@@ -61,9 +61,11 @@ AC_DEFUN([gl_LIBSELINUX],
AC_SUBST([LIB_SELINUX])
# Warn if SELinux is found but libselinux is absent;
- if test "$ac_cv_search_setfilecon" = no &&
- test "$host" = "$build" && test -d /selinux; then
- AC_MSG_WARN([This system supports SELinux but libselinux is missing.])
- AC_MSG_WARN([AC_PACKAGE_NAME will be compiled without SELinux support.])
+ if test "$ac_cv_search_setfilecon" = no; then
+ if test "$host" = "$build" && test -d /selinux; then
+ AC_MSG_WARN([This system supports SELinux but libselinux is missing.])
+ AC_MSG_WARN([AC_PACKAGE_NAME will be compiled without SELinux support.])
+ fi
+ with_selinux=no
fi
])
diff --git a/m4/setenv.m4 b/m4/setenv.m4
new file mode 100644
index 0000000..5d49aba
--- /dev/null
+++ b/m4/setenv.m4
@@ -0,0 +1,160 @@
+# setenv.m4 serial 26
+dnl Copyright (C) 2001-2004, 2006-2016 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_SETENV],
+[
+ AC_REQUIRE([gl_FUNC_SETENV_SEPARATE])
+ AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
+ if test $ac_cv_func_setenv = no; then
+ HAVE_SETENV=0
+ else
+ AC_CACHE_CHECK([whether setenv validates arguments],
+ [gl_cv_func_setenv_works],
+ [AC_RUN_IFELSE([AC_LANG_PROGRAM([[
+ #include <stdlib.h>
+ #include <errno.h>
+ #include <string.h>
+ ]], [[
+ int result = 0;
+ {
+ if (setenv ("", "", 0) != -1)
+ result |= 1;
+ else if (errno != EINVAL)
+ result |= 2;
+ }
+ {
+ if (setenv ("a", "=", 1) != 0)
+ result |= 4;
+ else if (strcmp (getenv ("a"), "=") != 0)
+ result |= 8;
+ }
+ return result;
+ ]])],
+ [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" ;;
+ esac
+ ])])
+ case "$gl_cv_func_setenv_works" in
+ *yes) ;;
+ *)
+ REPLACE_SETENV=1
+ ;;
+ esac
+ fi
+])
+
+# Like gl_FUNC_SETENV, except prepare for separate compilation
+# (no REPLACE_SETENV, no AC_LIBOBJ).
+AC_DEFUN([gl_FUNC_SETENV_SEPARATE],
+[
+ AC_REQUIRE([gl_STDLIB_H_DEFAULTS])
+ AC_CHECK_DECLS_ONCE([setenv])
+ if test $ac_cv_have_decl_setenv = no; then
+ HAVE_DECL_SETENV=0
+ fi
+ AC_CHECK_FUNCS_ONCE([setenv])
+ gl_PREREQ_SETENV
+])
+
+AC_DEFUN([gl_FUNC_UNSETENV],
+[
+ AC_REQUIRE([gl_STDLIB_H_DEFAULTS])
+ AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
+ AC_CHECK_DECLS_ONCE([unsetenv])
+ if test $ac_cv_have_decl_unsetenv = no; then
+ HAVE_DECL_UNSETENV=0
+ fi
+ AC_CHECK_FUNCS([unsetenv])
+ if test $ac_cv_func_unsetenv = no; then
+ HAVE_UNSETENV=0
+ else
+ HAVE_UNSETENV=1
+ dnl Some BSDs return void, failing to do error checking.
+ AC_CACHE_CHECK([for unsetenv() return type], [gt_cv_func_unsetenv_ret],
+ [AC_COMPILE_IFELSE(
+ [AC_LANG_PROGRAM(
+ [[
+#undef _BSD
+#define _BSD 1 /* unhide unsetenv declaration in OSF/1 5.1 <stdlib.h> */
+#include <stdlib.h>
+extern
+#ifdef __cplusplus
+"C"
+#endif
+int unsetenv (const char *name);
+ ]],
+ [[]])],
+ [gt_cv_func_unsetenv_ret='int'],
+ [gt_cv_func_unsetenv_ret='void'])])
+ if test $gt_cv_func_unsetenv_ret = 'void'; then
+ AC_DEFINE([VOID_UNSETENV], [1], [Define to 1 if unsetenv returns void
+ instead of int.])
+ REPLACE_UNSETENV=1
+ fi
+
+ dnl Solaris 10 unsetenv does not remove all copies of a name.
+ dnl Haiku alpha 2 unsetenv gets confused by assignment to environ.
+ dnl OpenBSD 4.7 unsetenv("") does not fail.
+ AC_CACHE_CHECK([whether unsetenv obeys POSIX],
+ [gl_cv_func_unsetenv_works],
+ [AC_RUN_IFELSE([AC_LANG_PROGRAM([[
+ #include <stdlib.h>
+ #include <errno.h>
+ extern char **environ;
+ ]], [[
+ char entry1[] = "a=1";
+ char entry2[] = "b=2";
+ char *env[] = { entry1, entry2, NULL };
+ if (putenv ((char *) "a=1")) return 1;
+ if (putenv (entry2)) return 2;
+ entry2[0] = 'a';
+ unsetenv ("a");
+ if (getenv ("a")) return 3;
+ if (!unsetenv ("") || errno != EINVAL) return 4;
+ entry2[0] = 'b';
+ environ = env;
+ if (!getenv ("a")) return 5;
+ entry2[0] = 'a';
+ unsetenv ("a");
+ if (getenv ("a")) return 6;
+ ]])],
+ [gl_cv_func_unsetenv_works=yes], [gl_cv_func_unsetenv_works=no],
+ [case "$host_os" in
+ # Guess yes on glibc systems.
+ *-gnu*) gl_cv_func_unsetenv_works="guessing yes" ;;
+ # If we don't know, assume the worst.
+ *) gl_cv_func_unsetenv_works="guessing no" ;;
+ esac
+ ])])
+ case "$gl_cv_func_unsetenv_works" in
+ *yes) ;;
+ *)
+ REPLACE_UNSETENV=1
+ ;;
+ esac
+ fi
+])
+
+# Prerequisites of lib/setenv.c.
+AC_DEFUN([gl_PREREQ_SETENV],
+[
+ AC_REQUIRE([AC_FUNC_ALLOCA])
+ AC_REQUIRE([gl_ENVIRON])
+ AC_CHECK_HEADERS_ONCE([unistd.h])
+ AC_CHECK_HEADERS([search.h])
+ AC_CHECK_FUNCS([tsearch])
+])
+
+# Prerequisites of lib/unsetenv.c.
+AC_DEFUN([gl_PREREQ_UNSETENV],
+[
+ AC_REQUIRE([gl_ENVIRON])
+ AC_CHECK_HEADERS_ONCE([unistd.h])
+])
diff --git a/m4/setlocale.m4 b/m4/setlocale.m4
new file mode 100644
index 0000000..a359069
--- /dev/null
+++ b/m4/setlocale.m4
@@ -0,0 +1,29 @@
+# setlocale.m4 serial 4
+dnl Copyright (C) 2011-2016 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_SETLOCALE],
+[
+ AC_REQUIRE([gl_LOCALE_H_DEFAULTS])
+ AC_REQUIRE([AC_CANONICAL_HOST])
+ case "$host_os" in
+ dnl On native Windows systems, setlocale(category,NULL) does not look at
+ dnl the environment variables LC_ALL, category, and LANG.
+ mingw*) REPLACE_SETLOCALE=1 ;;
+ dnl On Cygwin 1.5.x, setlocale always succeeds but setlocale(LC_CTYPE,NULL)
+ dnl is then still "C".
+ cygwin*)
+ case `uname -r` in
+ 1.5.*) REPLACE_SETLOCALE=1 ;;
+ esac
+ ;;
+ esac
+])
+
+# Prerequisites of lib/setlocale.c.
+AC_DEFUN([gl_PREREQ_SETLOCALE],
+[
+ :
+])
diff --git a/m4/ssize_t.m4 b/m4/ssize_t.m4
index 209d64c..3e7b9e6 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-2012 Free Software Foundation, Inc.
+dnl Copyright (C) 2001-2003, 2006, 2010-2016 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.m4 b/m4/stat.m4
index 0fd117e..a794975 100644
--- a/m4/stat.m4
+++ b/m4/stat.m4
@@ -1,6 +1,6 @@
# serial 11
-# Copyright (C) 2009-2012 Free Software Foundation, Inc.
+# Copyright (C) 2009-2016 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/stdalign.m4 b/m4/stdalign.m4
new file mode 100644
index 0000000..49980cd
--- /dev/null
+++ b/m4/stdalign.m4
@@ -0,0 +1,57 @@
+# Check for stdalign.h that conforms to C11.
+
+dnl Copyright 2011-2016 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.
+
+# Prepare for substituting <stdalign.h> if it is not supported.
+
+AC_DEFUN([gl_STDALIGN_H],
+[
+ AC_CACHE_CHECK([for working stdalign.h],
+ [gl_cv_header_working_stdalign_h],
+ [AC_COMPILE_IFELSE(
+ [AC_LANG_PROGRAM(
+ [[#include <stdalign.h>
+ #include <stddef.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>. */
+ #ifdef __cplusplus
+ template <class t> struct alignof_helper { char a; t b; };
+ # define ao(type) offsetof (alignof_helper<type>, b)
+ #else
+ # define ao(type) offsetof (struct { char a; type b; }, b)
+ #endif
+ char test_double[ao (double) % _Alignof (double) == 0 ? 1 : -1];
+ char test_long[ao (long int) % _Alignof (long int) == 0 ? 1 : -1];
+ char test_alignof[alignof (double) == _Alignof (double) ? 1 : -1];
+
+ /* Test _Alignas only on platforms where gnulib can help. */
+ #if \
+ ((defined __cplusplus && 201103 <= __cplusplus) \
+ || (defined __APPLE__ && defined __MACH__ \
+ ? 4 < __GNUC__ + (1 <= __GNUC_MINOR__) \
+ : __GNUC__) \
+ || __HP_cc || __HP_aCC || __IBMC__ || __IBMCPP__ \
+ || __ICC || 0x5110 <= __SUNPRO_C \
+ || 1300 <= _MSC_VER)
+ struct alignas_test { char c; char alignas (8) alignas_8; };
+ char test_alignas[offsetof (struct alignas_test, alignas_8) == 8
+ ? 1 : -1];
+ #endif
+ ]])],
+ [gl_cv_header_working_stdalign_h=yes],
+ [gl_cv_header_working_stdalign_h=no])])
+
+ if test $gl_cv_header_working_stdalign_h = yes; then
+ STDALIGN_H=''
+ else
+ STDALIGN_H='stdalign.h'
+ fi
+
+ AC_SUBST([STDALIGN_H])
+ AM_CONDITIONAL([GL_GENERATE_STDALIGN_H], [test -n "$STDALIGN_H"])
+])
diff --git a/m4/stdarg.m4 b/m4/stdarg.m4
index 5c313cb..ab3e7f5 100644
--- a/m4/stdarg.m4
+++ b/m4/stdarg.m4
@@ -1,5 +1,5 @@
# stdarg.m4 serial 6
-dnl Copyright (C) 2006, 2008-2012 Free Software Foundation, Inc.
+dnl Copyright (C) 2006, 2008-2016 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 eabfa64..2a9b1db 100644
--- a/m4/stdbool.m4
+++ b/m4/stdbool.m4
@@ -1,11 +1,11 @@
# Check for stdbool.h that conforms to C99.
-dnl Copyright (C) 2002-2006, 2009-2012 Free Software Foundation, Inc.
+dnl Copyright (C) 2002-2006, 2009-2016 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.
-#serial 5
+#serial 7
# Prepare for substituting <stdbool.h> if it is not supported.
@@ -43,56 +43,64 @@ AC_DEFUN([AC_CHECK_HEADER_STDBOOL],
[AC_LANG_PROGRAM(
[[
#include <stdbool.h>
- #ifndef bool
- "error: bool is not defined"
- #endif
- #ifndef false
- "error: false is not defined"
- #endif
- #if false
- "error: false is not 0"
- #endif
- #ifndef true
- "error: true is not defined"
- #endif
- #if true != 1
- "error: true is not 1"
+
+ #ifdef __cplusplus
+ typedef bool Bool;
+ #else
+ typedef _Bool Bool;
+ #ifndef bool
+ "error: bool is not defined"
+ #endif
+ #ifndef false
+ "error: false is not defined"
+ #endif
+ #if false
+ "error: false is not 0"
+ #endif
+ #ifndef true
+ "error: true is not defined"
+ #endif
+ #if true != 1
+ "error: true is not 1"
+ #endif
#endif
+
#ifndef __bool_true_false_are_defined
"error: __bool_true_false_are_defined is not defined"
#endif
- struct s { _Bool s: 1; _Bool t; } s;
+ struct s { Bool s: 1; Bool t; bool u: 1; bool v; } s;
char a[true == 1 ? 1 : -1];
char b[false == 0 ? 1 : -1];
char c[__bool_true_false_are_defined == 1 ? 1 : -1];
char d[(bool) 0.5 == true ? 1 : -1];
/* See body of main program for 'e'. */
- char f[(_Bool) 0.0 == false ? 1 : -1];
+ char f[(Bool) 0.0 == false ? 1 : -1];
char g[true];
- char h[sizeof (_Bool)];
+ char h[sizeof (Bool)];
char i[sizeof s.t];
enum { j = false, k = true, l = false * true, m = true * 256 };
/* The following fails for
HP aC++/ANSI C B3910B A.05.55 [Dec 04 2003]. */
- _Bool n[m];
+ 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];
+ 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
*/
- _Bool q = true;
- _Bool *pq = &q;
+ Bool q = true;
+ Bool *pq = &q;
+ bool *qq = &q;
]],
[[
bool e = &s;
- *pq |= q;
- *pq |= ! q;
+ *pq |= q; *pq |= ! q;
+ *qq |= q; *qq |= ! q;
/* Refer to every declared value, to avoid compiler optimizations. */
return (!a + !b + !c + !d + !e + !f + !g + !h + !i + !!j + !k + !!l
- + !m + !n + !o + !p + !q + !pq);
+ + !m + !n + !o + !p + !q + !pq + !qq);
]])],
[ac_cv_header_stdbool_h=yes],
[ac_cv_header_stdbool_h=no])])
diff --git a/m4/stddef_h.m4 b/m4/stddef_h.m4
index cc11609..c045c65 100644
--- a/m4/stddef_h.m4
+++ b/m4/stddef_h.m4
@@ -1,6 +1,6 @@
-dnl A placeholder for POSIX 2008 <stddef.h>, for platforms that have issues.
-# stddef_h.m4 serial 4
-dnl Copyright (C) 2009-2012 Free Software Foundation, Inc.
+dnl A placeholder for <stddef.h>, for platforms that have issues.
+# stddef_h.m4 serial 5
+dnl Copyright (C) 2009-2016 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,9 @@ AC_DEFUN([gl_STDDEF_H],
AC_REQUIRE([gl_STDDEF_H_DEFAULTS])
AC_REQUIRE([gt_TYPE_WCHAR_T])
STDDEF_H=
+ AC_CHECK_TYPE([max_align_t], [], [HAVE_MAX_ALIGN_T=0; STDDEF_H=stddef.h],
+ [[#include <stddef.h>
+ ]])
if test $gt_cv_c_wchar_t = no; then
HAVE_WCHAR_T=0
STDDEF_H=stddef.h
@@ -43,5 +46,6 @@ AC_DEFUN([gl_STDDEF_H_DEFAULTS],
[
dnl Assume proper GNU behavior unless another module says otherwise.
REPLACE_NULL=0; AC_SUBST([REPLACE_NULL])
+ HAVE_MAX_ALIGN_T=1; AC_SUBST([HAVE_MAX_ALIGN_T])
HAVE_WCHAR_T=1; AC_SUBST([HAVE_WCHAR_T])
])
diff --git a/m4/stdint.m4 b/m4/stdint.m4
index 28d342e..1d0d951 100644
--- a/m4/stdint.m4
+++ b/m4/stdint.m4
@@ -1,5 +1,5 @@
-# stdint.m4 serial 43
-dnl Copyright (C) 2001-2012 Free Software Foundation, Inc.
+# stdint.m4 serial 50
+dnl Copyright (C) 2001-2016 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,6 +11,9 @@ AC_DEFUN_ONCE([gl_STDINT_H],
[
AC_PREREQ([2.59])dnl
+ AC_REQUIRE([gl_LIMITS_H])
+ AC_REQUIRE([gt_TYPE_WINT_T])
+
dnl Check for long long int and unsigned long long int.
AC_REQUIRE([AC_TYPE_LONG_LONG_INT])
if test $ac_cv_type_long_long_int = yes; then
@@ -70,6 +73,8 @@ AC_DEFUN_ONCE([gl_STDINT_H],
AC_COMPILE_IFELSE([
AC_LANG_PROGRAM([[
#define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */
+#define __STDC_CONSTANT_MACROS 1
+#define __STDC_LIMIT_MACROS 1
#include <stdint.h>
/* Dragonfly defines WCHAR_MIN, WCHAR_MAX only in <wchar.h>. */
#if !(defined WCHAR_MIN && defined WCHAR_MAX)
@@ -150,6 +155,15 @@ uintptr_t h = UINTPTR_MAX;
intmax_t i = INTMAX_MAX;
uintmax_t j = UINTMAX_MAX;
+/* Check that SIZE_MAX has the correct type, if possible. */
+#if 201112 <= __STDC_VERSION__
+int k = _Generic (SIZE_MAX, size_t: 0);
+#elif (2 <= __GNUC__ || defined __IBM__TYPEOF__ \
+ || (0x5110 <= __SUNPRO_C && !__STDC__))
+extern size_t k;
+extern __typeof__ (SIZE_MAX) k;
+#endif
+
#include <limits.h> /* for CHAR_BIT */
#define TYPE_MINIMUM(t) \
((t) ((t) 0 < (t) -1 ? (t) 0 : ~ TYPE_MAXIMUM (t)))
@@ -218,6 +232,8 @@ struct s {
AC_RUN_IFELSE([
AC_LANG_PROGRAM([[
#define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */
+#define __STDC_CONSTANT_MACROS 1
+#define __STDC_LIMIT_MACROS 1
#include <stdint.h>
]
gl_STDINT_INCLUDES
@@ -278,28 +294,74 @@ static const char *macro_values[] =
])
])
fi
+
+ HAVE_C99_STDINT_H=0
+ HAVE_SYS_BITYPES_H=0
+ HAVE_SYS_INTTYPES_H=0
+ STDINT_H=stdint.h
if test "$gl_cv_header_working_stdint_h" = yes; then
- STDINT_H=
+ 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>
+]
+gl_STDINT_INCLUDES
+[
+intmax_t im = INTMAX_MAX;
+int32_t i32 = INT32_C (0x7fffffff);
+ ]])],
+ [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
- else
- HAVE_SYS_INTTYPES_H=0
fi
- AC_SUBST([HAVE_SYS_INTTYPES_H])
if test $ac_cv_header_sys_bitypes_h = yes; then
HAVE_SYS_BITYPES_H=1
- else
- HAVE_SYS_BITYPES_H=0
fi
- AC_SUBST([HAVE_SYS_BITYPES_H])
-
gl_STDINT_TYPE_PROPERTIES
- STDINT_H=stdint.h
fi
+
+ dnl The substitute stdint.h needs the substitute limit.h's _GL_INTEGER_WIDTH.
+ LIMITS_H=limits.h
+ AM_CONDITIONAL([GL_GENERATE_LIMITS_H], [test -n "$LIMITS_H"])
+
+ AC_SUBST([HAVE_C99_STDINT_H])
+ AC_SUBST([HAVE_SYS_BITYPES_H])
+ AC_SUBST([HAVE_SYS_INTTYPES_H])
AC_SUBST([STDINT_H])
AM_CONDITIONAL([GL_GENERATE_STDINT_H], [test -n "$STDINT_H"])
])
@@ -467,7 +529,7 @@ AC_DEFUN([gl_STDINT_TYPE_PROPERTIES],
dnl requirement that wint_t is "unchanged by default argument promotions".
dnl In this case gnulib's <wchar.h> and <wctype.h> override wint_t.
dnl Set the variable BITSIZEOF_WINT_T accordingly.
- if test $BITSIZEOF_WINT_T -lt 32; then
+ if test $GNULIB_OVERRIDES_WINT_T = 1; then
BITSIZEOF_WINT_T=32
fi
])
@@ -477,8 +539,3 @@ dnl Remove this when we can assume autoconf >= 2.61.
m4_ifdef([AC_COMPUTE_INT], [], [
AC_DEFUN([AC_COMPUTE_INT], [_AC_COMPUTE_INT([$2],[$1],[$3],[$4])])
])
-
-# Hey Emacs!
-# Local Variables:
-# indent-tabs-mode: nil
-# End:
diff --git a/m4/stdio_h.m4 b/m4/stdio_h.m4
index 3bd6580..eaa25a0 100644
--- a/m4/stdio_h.m4
+++ b/m4/stdio_h.m4
@@ -1,14 +1,45 @@
-# stdio_h.m4 serial 43
-dnl Copyright (C) 2007-2012 Free Software Foundation, Inc.
+# stdio_h.m4 serial 48
+dnl Copyright (C) 2007-2016 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_STDIO_H],
[
+ AH_VERBATIM([MINGW_ANSI_STDIO],
+[/* Use GNU style printf and scanf. */
+#ifndef __USE_MINGW_ANSI_STDIO
+# undef __USE_MINGW_ANSI_STDIO
+#endif
+])
+ AC_DEFINE([__USE_MINGW_ANSI_STDIO])
AC_REQUIRE([gl_STDIO_H_DEFAULTS])
gl_NEXT_HEADERS([stdio.h])
+ dnl Determine whether __USE_MINGW_ANSI_STDIO makes printf and
+ dnl inttypes.h behave like gnu instead of system; we must give our
+ dnl printf wrapper the right attribute to match.
+ AC_CACHE_CHECK([which flavor of printf attribute matches inttypes macros],
+ [gl_cv_func_printf_attribute_flavor],
+ [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
+ #define __STDC_FORMAT_MACROS 1
+ #include <stdio.h>
+ #include <inttypes.h>
+ /* For non-mingw systems, compilation will trivially succeed.
+ For mingw, compilation will succeed for older mingw (system
+ printf, "I64d") and fail for newer mingw (gnu printf, "lld"). */
+ #if ((defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__) && \
+ (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4))
+ extern char PRIdMAX_probe[sizeof PRIdMAX == sizeof "I64d" ? 1 : -1];
+ #endif
+ ]])], [gl_cv_func_printf_attribute_flavor=system],
+ [gl_cv_func_printf_attribute_flavor=gnu])])
+ if test "$gl_cv_func_printf_attribute_flavor" = gnu; then
+ AC_DEFINE([GNULIB_PRINTF_ATTRIBUTE_FLAVOR_GNU], [1],
+ [Define to 1 if printf and friends should be labeled with
+ attribute "__gnu_printf__" instead of "__printf__"])
+ fi
+
dnl No need to create extra modules for these functions. Everyone who uses
dnl <stdio.h> likely needs them.
GNULIB_FSCANF=1
diff --git a/m4/stdlib_h.m4 b/m4/stdlib_h.m4
index 9c69f2e..3999068 100644
--- a/m4/stdlib_h.m4
+++ b/m4/stdlib_h.m4
@@ -1,5 +1,5 @@
-# stdlib_h.m4 serial 41
-dnl Copyright (C) 2007-2012 Free Software Foundation, Inc.
+# stdlib_h.m4 serial 43
+dnl Copyright (C) 2007-2016 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.
@@ -21,8 +21,8 @@ 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 random random_r realpath rpmatch
- setenv setstate setstate_r srandom srandom_r
+ 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])
])
@@ -55,11 +55,13 @@ AC_DEFUN([gl_STDLIB_H_DEFAULTS],
GNULIB_PTSNAME=0; AC_SUBST([GNULIB_PTSNAME])
GNULIB_PTSNAME_R=0; AC_SUBST([GNULIB_PTSNAME_R])
GNULIB_PUTENV=0; AC_SUBST([GNULIB_PUTENV])
+ 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_REALLOC_POSIX=0; AC_SUBST([GNULIB_REALLOC_POSIX])
GNULIB_REALPATH=0; AC_SUBST([GNULIB_REALPATH])
GNULIB_RPMATCH=0; AC_SUBST([GNULIB_RPMATCH])
+ GNULIB_SECURE_GETENV=0; AC_SUBST([GNULIB_SECURE_GETENV])
GNULIB_SETENV=0; AC_SUBST([GNULIB_SETENV])
GNULIB_STRTOD=0; AC_SUBST([GNULIB_STRTOD])
GNULIB_STRTOLL=0; AC_SUBST([GNULIB_STRTOLL])
@@ -83,11 +85,13 @@ AC_DEFUN([gl_STDLIB_H_DEFAULTS],
HAVE_POSIX_OPENPT=1; AC_SUBST([HAVE_POSIX_OPENPT])
HAVE_PTSNAME=1; AC_SUBST([HAVE_PTSNAME])
HAVE_PTSNAME_R=1; AC_SUBST([HAVE_PTSNAME_R])
+ HAVE_QSORT_R=1; AC_SUBST([HAVE_QSORT_R])
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_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_STRTOD=1; AC_SUBST([HAVE_STRTOD])
@@ -105,6 +109,7 @@ AC_DEFUN([gl_STDLIB_H_DEFAULTS],
REPLACE_PTSNAME=0; AC_SUBST([REPLACE_PTSNAME])
REPLACE_PTSNAME_R=0; AC_SUBST([REPLACE_PTSNAME_R])
REPLACE_PUTENV=0; AC_SUBST([REPLACE_PUTENV])
+ REPLACE_QSORT_R=0; AC_SUBST([REPLACE_QSORT_R])
REPLACE_RANDOM_R=0; AC_SUBST([REPLACE_RANDOM_R])
REPLACE_REALLOC=0; AC_SUBST([REPLACE_REALLOC])
REPLACE_REALPATH=0; AC_SUBST([REPLACE_REALPATH])
diff --git a/m4/strdup.m4 b/m4/strdup.m4
new file mode 100644
index 0000000..ff7060a
--- /dev/null
+++ b/m4/strdup.m4
@@ -0,0 +1,36 @@
+# strdup.m4 serial 13
+
+dnl Copyright (C) 2002-2016 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_STRDUP],
+[
+ AC_REQUIRE([gl_HEADER_STRING_H_DEFAULTS])
+ AC_CHECK_FUNCS_ONCE([strdup])
+ AC_CHECK_DECLS_ONCE([strdup])
+ if test $ac_cv_have_decl_strdup = no; then
+ HAVE_DECL_STRDUP=0
+ fi
+])
+
+AC_DEFUN([gl_FUNC_STRDUP_POSIX],
+[
+ AC_REQUIRE([gl_HEADER_STRING_H_DEFAULTS])
+ AC_REQUIRE([gl_CHECK_MALLOC_POSIX])
+ AC_CHECK_FUNCS_ONCE([strdup])
+ if test $ac_cv_func_strdup = yes; then
+ if test $gl_cv_func_malloc_posix != yes; then
+ REPLACE_STRDUP=1
+ fi
+ fi
+ AC_CHECK_DECLS_ONCE([strdup])
+ if test $ac_cv_have_decl_strdup = no; then
+ HAVE_DECL_STRDUP=0
+ fi
+])
+
+# Prerequisites of lib/strdup.c.
+AC_DEFUN([gl_PREREQ_STRDUP], [:])
diff --git a/m4/strerror.m4 b/m4/strerror.m4
index 1c96e52..e286594 100644
--- a/m4/strerror.m4
+++ b/m4/strerror.m4
@@ -1,5 +1,5 @@
# strerror.m4 serial 17
-dnl Copyright (C) 2002, 2007-2012 Free Software Foundation, Inc.
+dnl Copyright (C) 2002, 2007-2016 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/string_h.m4 b/m4/string_h.m4
index 5677e09..0c5ec6f 100644
--- a/m4/string_h.m4
+++ b/m4/string_h.m4
@@ -1,6 +1,6 @@
# Configure a GNU-like replacement for <string.h>.
-# Copyright (C) 2007-2012 Free Software Foundation, Inc.
+# Copyright (C) 2007-2016 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/strverscmp.m4 b/m4/strverscmp.m4
index d744647..5524294 100644
--- a/m4/strverscmp.m4
+++ b/m4/strverscmp.m4
@@ -1,5 +1,5 @@
# strverscmp.m4 serial 8
-dnl Copyright (C) 2002, 2005-2012 Free Software Foundation, Inc.
+dnl Copyright (C) 2002, 2005-2016 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
new file mode 100644
index 0000000..d15d915
--- /dev/null
+++ b/m4/symlink.m4
@@ -0,0 +1,53 @@
+# serial 6
+# See if we need to provide symlink replacement.
+
+dnl Copyright (C) 2009-2016 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.
+
+# Written by Eric Blake.
+
+AC_DEFUN([gl_FUNC_SYMLINK],
+[
+ AC_REQUIRE([gl_UNISTD_H_DEFAULTS])
+ AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
+ AC_CHECK_FUNCS_ONCE([symlink])
+ dnl The best we can do on mingw is provide a dummy that always fails, so
+ dnl that compilation can proceed with fewer ifdefs. On FreeBSD 7.2, AIX 7.1,
+ dnl and Solaris 9, we want to fix a bug with trailing slash handling.
+ if test $ac_cv_func_symlink = no; then
+ HAVE_SYMLINK=0
+ else
+ AC_CACHE_CHECK([whether symlink handles trailing slash correctly],
+ [gl_cv_func_symlink_works],
+ [AC_RUN_IFELSE(
+ [AC_LANG_PROGRAM(
+ [[#include <unistd.h>
+ ]],
+ [[int result = 0;
+ if (!symlink ("a", "conftest.link/"))
+ result |= 1;
+ if (symlink ("conftest.f", "conftest.lnk2"))
+ result |= 2;
+ else if (!symlink ("a", "conftest.lnk2/"))
+ result |= 4;
+ return result;
+ ]])],
+ [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" ;;
+ esac
+ ])
+ rm -f conftest.f conftest.link conftest.lnk2])
+ case "$gl_cv_func_symlink_works" in
+ *yes) ;;
+ *)
+ REPLACE_SYMLINK=1
+ ;;
+ esac
+ fi
+])
diff --git a/m4/sys_socket_h.m4 b/m4/sys_socket_h.m4
index acfae41..ae500c7 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-2012 Free Software Foundation, Inc.
+dnl Copyright (C) 2005-2016 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 8af3353..3d43b6f 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-2012 Free Software Foundation, Inc.
+dnl Copyright (C) 2006-2016 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_time_h.m4 b/m4/sys_time_h.m4
index c4a30cd..3061a9c 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
-# Copyright (C) 2007, 2009-2012 Free Software Foundation, Inc.
+# Copyright (C) 2007, 2009-2016 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,6 +105,7 @@ 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 f11eef2..159b005 100644
--- a/m4/sys_types_h.m4
+++ b/m4/sys_types_h.m4
@@ -1,10 +1,10 @@
-# sys_types_h.m4 serial 4
-dnl Copyright (C) 2011-2012 Free Software Foundation, Inc.
+# sys_types_h.m4 serial 6
+dnl Copyright (C) 2011-2016 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_SYS_TYPES_H],
+AC_DEFUN_ONCE([gl_SYS_TYPES_H],
[
AC_REQUIRE([gl_SYS_TYPES_H_DEFAULTS])
gl_NEXT_HEADERS([sys/types.h])
@@ -22,3 +22,28 @@ AC_DEFUN([gl_SYS_TYPES_H],
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>
+
+m4_version_prereq([2.70], [], [
+
+# This is taken from the following Autoconf patch:
+# http://git.sv.gnu.org/cgit/autoconf.git/commit/?id=e17a30e98
+
+m4_undefine([AC_HEADER_MAJOR])
+AC_DEFUN([AC_HEADER_MAJOR],
+[AC_CHECK_HEADERS_ONCE([sys/types.h])
+AC_CHECK_HEADER([sys/mkdev.h],
+ [AC_DEFINE([MAJOR_IN_MKDEV], [1],
+ [Define to 1 if `major', `minor', and `makedev' are declared in
+ <mkdev.h>.])])
+if test $ac_cv_header_sys_mkdev_h = no; then
+ AC_CHECK_HEADER([sys/sysmacros.h],
+ [AC_DEFINE([MAJOR_IN_SYSMACROS], [1],
+ [Define to 1 if `major', `minor', and `makedev' are declared in
+ <sysmacros.h>.])])
+fi
+])
+
+])
diff --git a/m4/tempname.m4 b/m4/tempname.m4
index 20ad78b..acf4c8d 100644
--- a/m4/tempname.m4
+++ b/m4/tempname.m4
@@ -1,6 +1,6 @@
#serial 5
-# Copyright (C) 2006-2007, 2009-2012 Free Software Foundation, Inc.
+# Copyright (C) 2006-2007, 2009-2016 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 cb93391..2b6b6cf 100644
--- a/m4/threadlib.m4
+++ b/m4/threadlib.m4
@@ -1,5 +1,5 @@
-# threadlib.m4 serial 10 (gettext-0.18.2)
-dnl Copyright (C) 2005-2012 Free Software Foundation, Inc.
+# threadlib.m4 serial 12
+dnl Copyright (C) 2005-2016 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.
@@ -22,7 +22,7 @@ dnl libtool).
dnl Sets the variables LIBMULTITHREAD and LTLIBMULTITHREAD similarly, for
dnl programs that really need multithread functionality. The difference
dnl between LIBTHREAD and LIBMULTITHREAD is that on platforms supporting weak
-dnl symbols, typically LIBTHREAD="" whereas LIBMULTITHREAD="-lpthread".
+dnl symbols, typically LIBTHREAD is empty whereas LIBMULTITHREAD is not.
dnl Adds to CPPFLAGS the flag -D_REENTRANT or -D_THREAD_SAFE if needed for
dnl multithread-safe programs.
@@ -162,15 +162,31 @@ int main ()
# Test whether both pthread_mutex_lock and pthread_mutexattr_init exist
# in libc. IRIX 6.5 has the first one in both libc and libpthread, but
# the second one only in libpthread, and lock.c needs it.
- AC_LINK_IFELSE(
- [AC_LANG_PROGRAM(
- [[#include <pthread.h>]],
- [[pthread_mutex_lock((pthread_mutex_t*)0);
- pthread_mutexattr_init((pthread_mutexattr_t*)0);]])],
- [gl_have_pthread=yes])
+ #
+ # 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
+ save_LIBS=$LIBS
+ for gl_pthread in '' '-pthread'; do
+ LIBS="$LIBS $gl_pthread"
+ AC_LINK_IFELSE(
+ [AC_LANG_PROGRAM(
+ [[#include <pthread.h>
+ pthread_mutex_t m;
+ pthread_mutexattr_t ma;
+ ]],
+ [[pthread_mutex_lock (&m);
+ pthread_mutexattr_init (&ma);]])],
+ [gl_have_pthread=yes
+ LIBTHREAD=$gl_pthread LTLIBTHREAD=$gl_pthread
+ LIBMULTITHREAD=$gl_pthread LTLIBMULTITHREAD=$gl_pthread])
+ LIBS=$save_LIBS
+ test -n "$gl_have_pthread" && break
+ done
+
# Test for libpthread by looking for pthread_kill. (Not pthread_self,
# since it is defined as a macro on OSF/1.)
- if test -n "$gl_have_pthread"; then
+ if test -n "$gl_have_pthread" && test -z "$LIBTHREAD"; then
# The program links fine without libpthread. But it may actually
# need to link with libpthread in order to create multiple threads.
AC_CHECK_LIB([pthread], [pthread_kill],
@@ -179,13 +195,15 @@ int main ()
# Therefore pthread_in_use() needs to actually try to create a
# thread: pthread_create from libc will fail, whereas
# pthread_create will actually create a thread.
+ # On Solaris 10 or newer, this test is no longer needed, because
+ # libc contains the fully functional pthread functions.
case "$host_os" in
- solaris* | hpux*)
+ solaris | solaris2.[1-9] | solaris2.[1-9].* | hpux*)
AC_DEFINE([PTHREAD_IN_USE_DETECTION_HARD], [1],
[Define if the pthread_in_use() detection is hard.])
esac
])
- else
+ elif test -z "$gl_have_pthread"; then
# Some library is needed. Try libpthread and libc_r.
AC_CHECK_LIB([pthread], [pthread_kill],
[gl_have_pthread=yes
@@ -326,6 +344,8 @@ dnl Linux 2.4/glibc posix -lpthread Y OK
dnl
dnl GNU Hurd/glibc posix
dnl
+dnl Ubuntu 14.04 posix -pthread Y OK
+dnl
dnl FreeBSD 5.3 posix -lc_r Y
dnl posix -lkse ? Y
dnl posix -lpthread ? Y
diff --git a/m4/time_h.m4 b/m4/time_h.m4
index 6415bfb..eb2a631 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-2012 Free Software Foundation, Inc.
+# Copyright (C) 2000-2001, 2003-2007, 2009-2016 Free Software Foundation, Inc.
-# serial 7
+# serial 9
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -26,7 +26,7 @@ AC_DEFUN([gl_HEADER_TIME_H_BODY],
])
dnl Check whether 'struct timespec' is declared
-dnl in time.h, sys/time.h, or pthread.h.
+dnl in time.h, sys/time.h, pthread.h, or unistd.h.
AC_DEFUN([gl_CHECK_TYPE_STRUCT_TIMESPEC],
[
@@ -44,6 +44,7 @@ AC_DEFUN([gl_CHECK_TYPE_STRUCT_TIMESPEC],
TIME_H_DEFINES_STRUCT_TIMESPEC=0
SYS_TIME_H_DEFINES_STRUCT_TIMESPEC=0
PTHREAD_H_DEFINES_STRUCT_TIMESPEC=0
+ UNISTD_H_DEFINES_STRUCT_TIMESPEC=0
if test $gl_cv_sys_struct_timespec_in_time_h = yes; then
TIME_H_DEFINES_STRUCT_TIMESPEC=1
else
@@ -70,12 +71,26 @@ AC_DEFUN([gl_CHECK_TYPE_STRUCT_TIMESPEC],
[gl_cv_sys_struct_timespec_in_pthread_h=no])])
if test $gl_cv_sys_struct_timespec_in_pthread_h = yes; then
PTHREAD_H_DEFINES_STRUCT_TIMESPEC=1
+ else
+ AC_CACHE_CHECK([for struct timespec in <unistd.h>],
+ [gl_cv_sys_struct_timespec_in_unistd_h],
+ [AC_COMPILE_IFELSE(
+ [AC_LANG_PROGRAM(
+ [[#include <unistd.h>
+ ]],
+ [[static struct timespec x; x.tv_sec = x.tv_nsec;]])],
+ [gl_cv_sys_struct_timespec_in_unistd_h=yes],
+ [gl_cv_sys_struct_timespec_in_unistd_h=no])])
+ if test $gl_cv_sys_struct_timespec_in_unistd_h = yes; then
+ UNISTD_H_DEFINES_STRUCT_TIMESPEC=1
+ fi
fi
fi
fi
AC_SUBST([TIME_H_DEFINES_STRUCT_TIMESPEC])
AC_SUBST([SYS_TIME_H_DEFINES_STRUCT_TIMESPEC])
AC_SUBST([PTHREAD_H_DEFINES_STRUCT_TIMESPEC])
+ AC_SUBST([UNISTD_H_DEFINES_STRUCT_TIMESPEC])
])
AC_DEFUN([gl_TIME_MODULE_INDICATOR],
@@ -94,6 +109,7 @@ AC_DEFUN([gl_HEADER_TIME_H_DEFAULTS],
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])
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])
@@ -106,4 +122,13 @@ AC_DEFUN([gl_HEADER_TIME_H_DEFAULTS],
REPLACE_MKTIME=GNULIB_PORTCHECK; AC_SUBST([REPLACE_MKTIME])
REPLACE_NANOSLEEP=GNULIB_PORTCHECK; AC_SUBST([REPLACE_NANOSLEEP])
REPLACE_TIMEGM=GNULIB_PORTCHECK; AC_SUBST([REPLACE_TIMEGM])
+
+ 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.
+ : ${GNULIB_GETTIMEOFDAY=0}; AC_SUBST([GNULIB_GETTIMEOFDAY])
+ dnl Second, it's OK to not use GNULIB_PORTCHECK for REPLACE_GMTIME
+ dnl and REPLACE_LOCALTIME, as portability to Solaris 2.6 and earlier
+ dnl is no longer a big deal.
+ REPLACE_GMTIME=0; AC_SUBST([REPLACE_GMTIME])
+ REPLACE_LOCALTIME=0; AC_SUBST([REPLACE_LOCALTIME])
])
diff --git a/m4/ungetc.m4 b/m4/ungetc.m4
new file mode 100644
index 0000000..e5d10eb
--- /dev/null
+++ b/m4/ungetc.m4
@@ -0,0 +1,47 @@
+# ungetc.m4 serial 3
+dnl Copyright (C) 2009-2016 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_UNGETC_WORKS],
+[
+ AC_REQUIRE([AC_PROG_CC])
+ AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
+
+ AC_CACHE_CHECK([whether ungetc works on arbitrary bytes],
+ [gl_cv_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;
+ 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");])],
+ [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" ;;
+ esac
+ ])
+ ])
+ case "$gl_cv_func_ungetc_works" in
+ *yes) ;;
+ *)
+ AC_DEFINE([FUNC_UNGETC_BROKEN], [1],
+ [Define to 1 if ungetc is broken when used on arbitrary bytes.])
+ ;;
+ esac
+])
diff --git a/m4/unistd_h.m4 b/m4/unistd_h.m4
index f68fbff..46ff109 100644
--- a/m4/unistd_h.m4
+++ b/m4/unistd_h.m4
@@ -1,5 +1,5 @@
-# unistd_h.m4 serial 66
-dnl Copyright (C) 2006-2012 Free Software Foundation, Inc.
+# unistd_h.m4 serial 69
+dnl Copyright (C) 2006-2016 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.
@@ -145,6 +145,7 @@ AC_DEFUN([gl_UNISTD_H_DEFAULTS],
HAVE_DECL_FCHDIR=1; AC_SUBST([HAVE_DECL_FCHDIR])
HAVE_DECL_FDATASYNC=1; AC_SUBST([HAVE_DECL_FDATASYNC])
HAVE_DECL_GETDOMAINNAME=1; AC_SUBST([HAVE_DECL_GETDOMAINNAME])
+ HAVE_DECL_GETLOGIN=1; AC_SUBST([HAVE_DECL_GETLOGIN])
HAVE_DECL_GETLOGIN_R=1; AC_SUBST([HAVE_DECL_GETLOGIN_R])
HAVE_DECL_GETPAGESIZE=1; AC_SUBST([HAVE_DECL_GETPAGESIZE])
HAVE_DECL_GETUSERSHELL=1; AC_SUBST([HAVE_DECL_GETUSERSHELL])
@@ -160,6 +161,7 @@ AC_DEFUN([gl_UNISTD_H_DEFAULTS],
REPLACE_FTRUNCATE=0; AC_SUBST([REPLACE_FTRUNCATE])
REPLACE_GETCWD=0; AC_SUBST([REPLACE_GETCWD])
REPLACE_GETDOMAINNAME=0; AC_SUBST([REPLACE_GETDOMAINNAME])
+ REPLACE_GETDTABLESIZE=0; AC_SUBST([REPLACE_GETDTABLESIZE])
REPLACE_GETLOGIN_R=0; AC_SUBST([REPLACE_GETLOGIN_R])
REPLACE_GETGROUPS=0; AC_SUBST([REPLACE_GETGROUPS])
REPLACE_GETPAGESIZE=0; AC_SUBST([REPLACE_GETPAGESIZE])
@@ -172,9 +174,11 @@ AC_DEFUN([gl_UNISTD_H_DEFAULTS],
REPLACE_PWRITE=0; AC_SUBST([REPLACE_PWRITE])
REPLACE_READ=0; AC_SUBST([REPLACE_READ])
REPLACE_READLINK=0; AC_SUBST([REPLACE_READLINK])
+ REPLACE_READLINKAT=0; AC_SUBST([REPLACE_READLINKAT])
REPLACE_RMDIR=0; AC_SUBST([REPLACE_RMDIR])
REPLACE_SLEEP=0; AC_SUBST([REPLACE_SLEEP])
REPLACE_SYMLINK=0; AC_SUBST([REPLACE_SYMLINK])
+ REPLACE_SYMLINKAT=0; AC_SUBST([REPLACE_SYMLINKAT])
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 c44adae..c29ec20 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-2012 Free Software Foundation, Inc.
+# Copyright (C) 1998-2006, 2009-2016 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 4c6c678..a719182 100644
--- a/m4/version-etc.m4
+++ b/m4/version-etc.m4
@@ -1,5 +1,5 @@
# version-etc.m4 serial 1
-# Copyright (C) 2009-2012 Free Software Foundation, Inc.
+# Copyright (C) 2009-2016 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 a77802e..08440ec 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-2012 Free Software Foundation, Inc.
+dnl Copyright (C) 2010-2016 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
new file mode 100644
index 0000000..924e21d
--- /dev/null
+++ b/m4/warnings.m4
@@ -0,0 +1,79 @@
+# warnings.m4 serial 11
+dnl Copyright (C) 2008-2016 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 Simon Josefsson
+
+# gl_AS_VAR_APPEND(VAR, VALUE)
+# ----------------------------
+# Provide the functionality of AS_VAR_APPEND if Autoconf does not have it.
+m4_ifdef([AS_VAR_APPEND],
+[m4_copy([AS_VAR_APPEND], [gl_AS_VAR_APPEND])],
+[m4_define([gl_AS_VAR_APPEND],
+[AS_VAR_SET([$1], [AS_VAR_GET([$1])$2])])])
+
+
+# gl_COMPILER_OPTION_IF(OPTION, [IF-SUPPORTED], [IF-NOT-SUPPORTED],
+# [PROGRAM = AC_LANG_PROGRAM()])
+# -----------------------------------------------------------------
+# 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.
+AC_DEFUN([gl_COMPILER_OPTION_IF],
+[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]))],
+ [gl_positive="$1"
+case $gl_positive in
+ -Wno-*) gl_positive=-W`expr "X$gl_positive" : 'X-Wno-\(.*\)'` ;;
+esac
+m4_pushdef([gl_Positive], [$gl_positive])])dnl
+AC_CACHE_CHECK([whether _AC_LANG compiler handles $1], m4_defn([gl_Warn]), [
+ gl_save_compiler_FLAGS="$gl_Flags"
+ gl_AS_VAR_APPEND(m4_defn([gl_Flags]),
+ [" $gl_unknown_warnings_are_errors ]m4_defn([gl_Positive])["])
+ AC_LINK_IFELSE([m4_default([$4], [AC_LANG_PROGRAM([])])],
+ [AS_VAR_SET(gl_Warn, [yes])],
+ [AS_VAR_SET(gl_Warn, [no])])
+ gl_Flags="$gl_save_compiler_FLAGS"
+])
+AS_VAR_IF(gl_Warn, [yes], [$2], [$3])
+m4_popdef([gl_Positive])dnl
+AS_VAR_POPDEF([gl_Flags])dnl
+AS_VAR_POPDEF([gl_Warn])dnl
+])
+
+# gl_UNKNOWN_WARNINGS_ARE_ERRORS
+# ------------------------------
+# Clang doesn't complain about unknown warning options unless one also
+# specifies -Wunknown-warning-option -Werror. Detect this.
+AC_DEFUN([gl_UNKNOWN_WARNINGS_ARE_ERRORS],
+[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],
+# [PROGRAM = AC_LANG_PROGRAM()])
+# ---------------------------------------------
+# Adds parameter to WARN_CFLAGS if the compiler supports it when
+# compiling PROGRAM. For example, gl_WARN_ADD([-Wparentheses]).
+#
+# If VARIABLE is a variable name, AC_SUBST it.
+AC_DEFUN([gl_WARN_ADD],
+[AC_REQUIRE([gl_UNKNOWN_WARNINGS_ARE_ERRORS])
+gl_COMPILER_OPTION_IF([$1],
+ [gl_AS_VAR_APPEND(m4_if([$2], [], [[WARN_CFLAGS]], [[$2]]), [" $1"])],
+ [],
+ [$3])
+m4_ifval([$2],
+ [AS_LITERAL_IF([$2], [AC_SUBST([$2])])],
+ [AC_SUBST([WARN_CFLAGS])])dnl
+])
+
+# Local Variables:
+# mode: autoconf
+# End:
diff --git a/m4/wchar_h.m4 b/m4/wchar_h.m4
index c7a8b2d..16017a5 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-2012 Free Software Foundation, Inc.
+dnl Copyright (C) 2007-2016 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 39
+# wchar_h.m4 serial 40
AC_DEFUN([gl_WCHAR_H],
[
@@ -81,8 +81,14 @@ AC_DEFUN([gl_WCHAR_H_INLINE_OK],
extern int zero (void);
int main () { return zero(); }
]])])
+ dnl Do not rename the object file from conftest.$ac_objext to
+ dnl conftest1.$ac_objext, as this will cause the link to fail on
+ dnl z/OS when using the XPLINK object format (due to duplicate
+ dnl CSECT names). Instead, temporarily redefine $ac_compile so
+ dnl that the object file has the latter name from the start.
+ save_ac_compile="$ac_compile"
+ ac_compile=`echo "$save_ac_compile" | sed s/conftest/conftest1/`
if AC_TRY_EVAL([ac_compile]); then
- mv conftest.$ac_objext conftest1.$ac_objext
AC_LANG_CONFTEST([
AC_LANG_SOURCE([[#define wcstod renamed_wcstod
/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
@@ -95,8 +101,9 @@ int main () { return zero(); }
#include <wchar.h>
int zero (void) { return 0; }
]])])
+ dnl See note above about renaming object files.
+ ac_compile=`echo "$save_ac_compile" | sed s/conftest/conftest2/`
if AC_TRY_EVAL([ac_compile]); then
- mv conftest.$ac_objext conftest2.$ac_objext
if $CC -o conftest$ac_exeext $CFLAGS $LDFLAGS conftest1.$ac_objext conftest2.$ac_objext $LIBS >&AS_MESSAGE_LOG_FD 2>&1; then
:
else
@@ -104,6 +111,7 @@ int zero (void) { return 0; }
fi
fi
fi
+ ac_compile="$save_ac_compile"
rm -f conftest1.$ac_objext conftest2.$ac_objext conftest$ac_exeext
])
if test $gl_cv_header_wchar_h_correct_inline = no; then
diff --git a/m4/wchar_t.m4 b/m4/wchar_t.m4
index 534735d..2db8c3f 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-2012 Free Software Foundation, Inc.
+dnl Copyright (C) 2002-2003, 2008-2016 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 00d7302..267b3c9 100644
--- a/m4/wcrtomb.m4
+++ b/m4/wcrtomb.m4
@@ -1,5 +1,5 @@
# wcrtomb.m4 serial 11
-dnl Copyright (C) 2008-2012 Free Software Foundation, Inc.
+dnl Copyright (C) 2008-2016 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/wctob.m4 b/m4/wctob.m4
index 786c881..bdb5299 100644
--- a/m4/wctob.m4
+++ b/m4/wctob.m4
@@ -1,5 +1,5 @@
# wctob.m4 serial 10
-dnl Copyright (C) 2008-2012 Free Software Foundation, Inc.
+dnl Copyright (C) 2008-2016 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/wctomb.m4 b/m4/wctomb.m4
index 88fd6be..7c8b3ef 100644
--- a/m4/wctomb.m4
+++ b/m4/wctomb.m4
@@ -1,5 +1,5 @@
# wctomb.m4 serial 2
-dnl Copyright (C) 2011-2012 Free Software Foundation, Inc.
+dnl Copyright (C) 2011-2016 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 885e6fc..accc001 100644
--- a/m4/wctype_h.m4
+++ b/m4/wctype_h.m4
@@ -2,7 +2,7 @@
dnl A placeholder for ISO C99 <wctype.h>, for platforms that lack it.
-dnl Copyright (C) 2006-2012 Free Software Foundation, Inc.
+dnl Copyright (C) 2006-2016 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/wint_t.m4 b/m4/wint_t.m4
index 3260cce..59b22bf 100644
--- a/m4/wint_t.m4
+++ b/m4/wint_t.m4
@@ -1,11 +1,12 @@
-# wint_t.m4 serial 5 (gettext-0.18.2)
-dnl Copyright (C) 2003, 2007-2012 Free Software Foundation, Inc.
+# wint_t.m4 serial 6
+dnl Copyright (C) 2003, 2007-2016 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.
-dnl Test whether <wchar.h> has the 'wint_t' type.
+dnl Test whether <wchar.h> has the 'wint_t' type and whether gnulib's
+dnl <wchar.h> or <wctype.h> would, if present, override 'wint_t'.
dnl Prerequisite: AC_PROG_CC
AC_DEFUN([gt_TYPE_WINT_T],
@@ -28,5 +29,34 @@ AC_DEFUN([gt_TYPE_WINT_T],
[gt_cv_c_wint_t=no])])
if test $gt_cv_c_wint_t = yes; then
AC_DEFINE([HAVE_WINT_T], [1], [Define if you have the 'wint_t' type.])
+
+ dnl Determine whether gnulib's <wchar.h> or <wctype.h> would, if present,
+ dnl override 'wint_t'.
+ AC_CACHE_CHECK([whether wint_t is too small],
+ [gl_cv_type_wint_t_too_small],
+ [AC_COMPILE_IFELSE(
+ [AC_LANG_PROGRAM([[
+/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
+ <wchar.h>.
+ BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
+ included before <wchar.h>. */
+#if !(defined __GLIBC__ && !defined __UCLIBC__)
+# include <stddef.h>
+# include <stdio.h>
+# include <time.h>
+#endif
+#include <wchar.h>
+ int verify[sizeof (wint_t) < sizeof (int) ? -1 : 1];
+ ]])],
+ [gl_cv_type_wint_t_too_small=no],
+ [gl_cv_type_wint_t_too_small=yes])])
+ if test $gl_cv_type_wint_t_too_small = yes; then
+ GNULIB_OVERRIDES_WINT_T=1
+ else
+ GNULIB_OVERRIDES_WINT_T=0
+ fi
+ else
+ GNULIB_OVERRIDES_WINT_T=0
fi
+ AC_SUBST([GNULIB_OVERRIDES_WINT_T])
])
diff --git a/m4/xalloc.m4 b/m4/xalloc.m4
index 6c2d5d0..f4f540d 100644
--- a/m4/xalloc.m4
+++ b/m4/xalloc.m4
@@ -1,5 +1,5 @@
# xalloc.m4 serial 18
-dnl Copyright (C) 2002-2006, 2009-2012 Free Software Foundation, Inc.
+dnl Copyright (C) 2002-2006, 2009-2016 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
new file mode 100644
index 0000000..53a1e69
--- /dev/null
+++ b/maint.mk
@@ -0,0 +1,1671 @@
+# -*-Makefile-*-
+# This Makefile fragment tries to be general-purpose enough to be
+# used by many projects via the gnulib maintainer-makefile module.
+
+## Copyright (C) 2001-2016 Free Software Foundation, Inc.
+##
+## This program is free software: you can redistribute it and/or modify
+## it under the terms of the GNU General Public License as published by
+## the Free Software Foundation, either version 3 of the License, or
+## (at your option) any later version.
+##
+## This program is distributed in the hope that it will be useful,
+## but WITHOUT ANY WARRANTY; without even the implied warranty of
+## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+## GNU General Public License for more details.
+##
+## You should have received a copy of the GNU General Public License
+## along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# This is reported not to work with make-3.79.1
+# ME := $(word $(words $(MAKEFILE_LIST)),$(MAKEFILE_LIST))
+ME := maint.mk
+
+# Helper variables.
+_empty =
+_sp = $(_empty) $(_empty)
+
+# _equal,S1,S2
+# ------------
+# If S1 == S2, return S1, otherwise the empty string.
+_equal = $(and $(findstring $(1),$(2)),$(findstring $(2),$(1)))
+
+# member-check,VARIABLE,VALID-VALUES
+# ----------------------------------
+# Check that $(VARIABLE) is in the space-separated list of VALID-VALUES, and
+# return it. Die otherwise.
+member-check = \
+ $(strip \
+ $(if $($(1)), \
+ $(if $(findstring $(_sp),$($(1))), \
+ $(error invalid $(1): '$($(1))', expected $(2)), \
+ $(or $(findstring $(_sp)$($(1))$(_sp),$(_sp)$(2)$(_sp)), \
+ $(error invalid $(1): '$($(1))', expected $(2)))), \
+ $(error $(1) undefined)))
+
+# Do not save the original name or timestamp in the .tar.gz file.
+# Use --rsyncable if available.
+gzip_rsyncable := \
+ $(shell gzip --help 2>/dev/null|grep rsyncable >/dev/null \
+ && printf %s --rsyncable)
+GZIP_ENV = '--no-name --best $(gzip_rsyncable)'
+
+GIT = git
+VC = $(GIT)
+
+VC_LIST = $(srcdir)/$(_build-aux)/vc-list-files -C $(srcdir)
+
+# You can override this variable in cfg.mk to set your own regexp
+# matching files to ignore.
+VC_LIST_ALWAYS_EXCLUDE_REGEX ?= ^$$
+
+# This is to preprocess robustly the output of $(VC_LIST), so that even
+# when $(srcdir) is a pathological name like "....", the leading sed command
+# removes only the intended prefix.
+_dot_escaped_srcdir = $(subst .,\.,$(srcdir))
+
+# Post-process $(VC_LIST) output, prepending $(srcdir)/, but only
+# when $(srcdir) is not ".".
+ifeq ($(srcdir),.)
+ _prepend_srcdir_prefix =
+else
+ _prepend_srcdir_prefix = | $(SED) 's|^|$(srcdir)/|'
+endif
+
+# In order to be able to consistently filter "."-relative names,
+# (i.e., with no $(srcdir) prefix), this definition is careful to
+# remove any $(srcdir) prefix, and to restore what it removes.
+_sc_excl = \
+ $(or $(exclude_file_name_regexp--$@),^$$)
+VC_LIST_EXCEPT = \
+ $(VC_LIST) | $(SED) 's|^$(_dot_escaped_srcdir)/||' \
+ | if test -f $(srcdir)/.x-$@; then grep -vEf $(srcdir)/.x-$@; \
+ else grep -Ev -e "$${VC_LIST_EXCEPT_DEFAULT-ChangeLog}"; fi \
+ | grep -Ev -e '($(VC_LIST_ALWAYS_EXCLUDE_REGEX)|$(_sc_excl))' \
+ $(_prepend_srcdir_prefix)
+
+ifeq ($(origin prev_version_file), undefined)
+ prev_version_file = $(srcdir)/.prev-version
+endif
+
+PREV_VERSION := $(shell cat $(prev_version_file) 2>/dev/null)
+VERSION_REGEXP = $(subst .,\.,$(VERSION))
+PREV_VERSION_REGEXP = $(subst .,\.,$(PREV_VERSION))
+
+ifeq ($(VC),$(GIT))
+ this-vc-tag = v$(VERSION)
+ this-vc-tag-regexp = v$(VERSION_REGEXP)
+else
+ tag-package = $(shell echo "$(PACKAGE)" | tr '[:lower:]' '[:upper:]')
+ tag-this-version = $(subst .,_,$(VERSION))
+ this-vc-tag = $(tag-package)-$(tag-this-version)
+ this-vc-tag-regexp = $(this-vc-tag)
+endif
+my_distdir = $(PACKAGE)-$(VERSION)
+
+# Old releases are stored here.
+release_archive_dir ?= ../release
+
+# If RELEASE_TYPE is undefined, but RELEASE is, use its second word.
+# But overwrite VERSION.
+ifdef RELEASE
+ VERSION := $(word 1, $(RELEASE))
+ RELEASE_TYPE ?= $(word 2, $(RELEASE))
+endif
+
+# Validate and return $(RELEASE_TYPE), or die.
+RELEASE_TYPES = alpha beta stable
+release-type = $(call member-check,RELEASE_TYPE,$(RELEASE_TYPES))
+
+# Override gnu_rel_host and url_dir_list in cfg.mk if these are not right.
+# Use alpha.gnu.org for alpha and beta releases.
+# Use ftp.gnu.org for stable releases.
+gnu_ftp_host-alpha = alpha.gnu.org
+gnu_ftp_host-beta = alpha.gnu.org
+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))
+
+# Override this in cfg.mk if you are using a different format in your
+# NEWS file.
+today = $(shell date +%Y-%m-%d)
+
+# Select which lines of NEWS are searched for $(news-check-regexp).
+# This is a sed line number spec. The default says that we search
+# lines 1..10 of NEWS for $(news-check-regexp).
+# If you want to search only line 3 or only lines 20-22, use "3" or "20,22".
+news-check-lines-spec ?= 1,10
+news-check-regexp ?= '^\*.* $(VERSION_REGEXP) \($(today)\)'
+
+# Prevent programs like 'sort' from considering distinct strings to be equal.
+# Doing it here saves us from having to set LC_ALL elsewhere in this file.
+export LC_ALL = C
+
+## --------------- ##
+## Sanity checks. ##
+## --------------- ##
+
+ifneq ($(_gl-Makefile),)
+_cfg_mk := $(wildcard $(srcdir)/cfg.mk)
+
+# Collect the names of rules starting with 'sc_'.
+syntax-check-rules := $(sort $(shell $(SED) -n \
+ 's/^\(sc_[a-zA-Z0-9_-]*\):.*/\1/p' $(srcdir)/$(ME) $(_cfg_mk)))
+.PHONY: $(syntax-check-rules)
+
+ifeq ($(shell $(VC_LIST) >/dev/null 2>&1; echo $$?),0)
+ local-checks-available += $(syntax-check-rules)
+else
+ local-checks-available += no-vc-detected
+no-vc-detected:
+ @echo "No version control files detected; skipping syntax check"
+endif
+.PHONY: $(local-checks-available)
+
+# Arrange to print the name of each syntax-checking rule just before running it.
+$(syntax-check-rules): %: %.m
+sc_m_rules_ = $(patsubst %, %.m, $(syntax-check-rules))
+.PHONY: $(sc_m_rules_)
+$(sc_m_rules_):
+ @echo $(patsubst sc_%.m, %, $@)
+ @date +%s.%N > .sc-start-$(basename $@)
+
+# Compute and print the elapsed time for each syntax-check rule.
+sc_z_rules_ = $(patsubst %, %.z, $(syntax-check-rules))
+.PHONY: $(sc_z_rules_)
+$(sc_z_rules_): %.z: %
+ @end=$$(date +%s.%N); \
+ start=$$(cat .sc-start-$*); \
+ rm -f .sc-start-$*; \
+ awk -v s=$$start -v e=$$end \
+ 'END {printf "%.2f $(patsubst sc_%,%,$*)\n", e - s}' < /dev/null
+
+# The patsubst here is to replace each sc_% rule with its sc_%.z wrapper
+# that computes and prints elapsed time.
+local-check := \
+ $(patsubst sc_%, sc_%.z, \
+ $(filter-out $(local-checks-to-skip), $(local-checks-available)))
+
+syntax-check: $(local-check)
+endif
+
+# _sc_search_regexp
+#
+# This macro searches for a given construct in the selected files and
+# then takes some action.
+#
+# Parameters (shell variables):
+#
+# prohibit | require
+#
+# Regular expression (ERE) denoting either a forbidden construct
+# or a required construct. Those arguments are exclusive.
+#
+# exclude
+#
+# Regular expression (ERE) denoting lines to ignore that matched
+# a prohibit construct. For example, this can be used to exclude
+# comments that mention why the nearby code uses an alternative
+# construct instead of the simpler prohibited construct.
+#
+# in_vc_files | in_files
+#
+# grep-E-style regexp selecting the files to check. For in_vc_files,
+# the regexp is used to select matching files from the list of all
+# version-controlled files; for in_files, it's from the names printed
+# by "find $(srcdir)". When neither is specified, use all files that
+# are under version control.
+#
+# containing | non_containing
+#
+# Select the files (non) containing strings matching this regexp.
+# If both arguments are specified then CONTAINING takes
+# precedence.
+#
+# with_grep_options
+#
+# Extra options for grep.
+#
+# ignore_case
+#
+# Ignore case.
+#
+# halt
+#
+# Message to display before to halting execution.
+#
+# Finally, you may exempt files based on an ERE matching file names.
+# For example, to exempt from the sc_space_tab check all files with the
+# .diff suffix, set this Make variable:
+#
+# exclude_file_name_regexp--sc_space_tab = \.diff$
+#
+# Note that while this functionality is mostly inherited via VC_LIST_EXCEPT,
+# when filtering by name via in_files, we explicitly filter out matching
+# names here as well.
+
+# Initialize each, so that envvar settings cannot interfere.
+export require =
+export prohibit =
+export exclude =
+export in_vc_files =
+export in_files =
+export containing =
+export non_containing =
+export halt =
+export with_grep_options =
+
+# By default, _sc_search_regexp does not ignore case.
+export ignore_case =
+_ignore_case = $$(test -n "$$ignore_case" && printf %s -i || :)
+
+define _sc_say_and_exit
+ dummy=; : so we do not need a semicolon before each use; \
+ { printf '%s\n' "$(ME): $$msg" 1>&2; exit 1; };
+endef
+
+define _sc_search_regexp
+ dummy=; : so we do not need a semicolon before each use; \
+ \
+ : Check arguments; \
+ test -n "$$prohibit" && test -n "$$require" \
+ && { msg='Cannot specify both prohibit and require' \
+ $(_sc_say_and_exit) } || :; \
+ test -z "$$prohibit" && test -z "$$require" \
+ && { msg='Should specify either prohibit or require' \
+ $(_sc_say_and_exit) } || :; \
+ test -z "$$prohibit" && test -n "$$exclude" \
+ && { msg='Use of exclude requires a prohibit pattern' \
+ $(_sc_say_and_exit) } || :; \
+ test -n "$$in_vc_files" && test -n "$$in_files" \
+ && { msg='Cannot specify both in_vc_files and in_files' \
+ $(_sc_say_and_exit) } || :; \
+ test "x$$halt" != x \
+ || { msg='halt not defined' $(_sc_say_and_exit) }; \
+ \
+ : Filter by file name; \
+ if test -n "$$in_files"; then \
+ files=$$(find $(srcdir) | grep -E "$$in_files" \
+ | grep -Ev '$(_sc_excl)'); \
+ else \
+ files=$$($(VC_LIST_EXCEPT)); \
+ if test -n "$$in_vc_files"; then \
+ files=$$(echo "$$files" | grep -E "$$in_vc_files"); \
+ fi; \
+ fi; \
+ \
+ : Filter by content; \
+ test -n "$$files" && test -n "$$containing" \
+ && { files=$$(grep -l "$$containing" $$files); } || :; \
+ test -n "$$files" && test -n "$$non_containing" \
+ && { files=$$(grep -vl "$$non_containing" $$files); } || :; \
+ \
+ : Check for the construct; \
+ if test -n "$$files"; then \
+ if test -n "$$prohibit"; then \
+ grep $$with_grep_options $(_ignore_case) -nE "$$prohibit" $$files \
+ | grep -vE "$${exclude:-^$$}" \
+ && { msg="$$halt" $(_sc_say_and_exit) } || :; \
+ else \
+ grep $$with_grep_options $(_ignore_case) -LE "$$require" $$files \
+ | grep . \
+ && { msg="$$halt" $(_sc_say_and_exit) } || :; \
+ fi \
+ else :; \
+ fi || :;
+endef
+
+sc_avoid_if_before_free:
+ @$(srcdir)/$(_build-aux)/useless-if-before-free \
+ $(useless_free_options) \
+ $$($(VC_LIST_EXCEPT) | grep -v useless-if-before-free) && \
+ { echo '$(ME): found useless "if" before "free" above' 1>&2; \
+ exit 1; } || :
+
+sc_cast_of_argument_to_free:
+ @prohibit='\<free *\( *\(' halt="don't cast free argument" \
+ $(_sc_search_regexp)
+
+sc_cast_of_x_alloc_return_value:
+ @prohibit='\*\) *x(m|c|re)alloc\>' \
+ halt="don't cast x*alloc return value" \
+ $(_sc_search_regexp)
+
+sc_cast_of_alloca_return_value:
+ @prohibit='\*\) *alloca\>' \
+ halt="don't cast alloca return value" \
+ $(_sc_search_regexp)
+
+sc_space_tab:
+ @prohibit='[ ] ' \
+ halt='found SPACE-TAB sequence; remove the SPACE' \
+ $(_sc_search_regexp)
+
+# Don't use *scanf or the old ato* functions in "real" code.
+# They provide no error checking mechanism.
+# Instead, use strto* functions.
+sc_prohibit_atoi_atof:
+ @prohibit='\<([fs]?scanf|ato([filq]|ll)) *\(' \
+ halt='do not use *scan''f, ato''f, ato''i, ato''l, ato''ll or ato''q' \
+ $(_sc_search_regexp)
+
+# Use STREQ rather than comparing strcmp == 0, or != 0.
+sp_ = strcmp *\(.+\)
+sc_prohibit_strcmp:
+ @prohibit='! *strcmp *\(|\<$(sp_) *[!=]=|[!=]= *$(sp_)' \
+ exclude='# *define STRN?EQ\(' \
+ halt='replace strcmp calls above with STREQ/STRNEQ' \
+ $(_sc_search_regexp)
+
+# Really. You don't want to use this function.
+# It may fail to NUL-terminate the destination,
+# and always NUL-pads out to the specified length.
+sc_prohibit_strncpy:
+ @prohibit='\<strncpy *\(' \
+ halt='do not use strncpy, period' \
+ $(_sc_search_regexp)
+
+# Pass EXIT_*, not number, to usage, exit, and error (when exiting)
+# Convert all uses automatically, via these two commands:
+# git grep -l '\<exit *(1)' \
+# | grep -vEf .x-sc_prohibit_magic_number_exit \
+# | xargs --no-run-if-empty \
+# perl -pi -e 's/(^|[^.])\b(exit ?)\(1\)/$1$2(EXIT_FAILURE)/'
+# git grep -l '\<exit *(0)' \
+# | grep -vEf .x-sc_prohibit_magic_number_exit \
+# | xargs --no-run-if-empty \
+# perl -pi -e 's/(^|[^.])\b(exit ?)\(0\)/$1$2(EXIT_SUCCESS)/'
+sc_prohibit_magic_number_exit:
+ @prohibit='(^|[^.])\<(usage|exit|error) ?\(-?[0-9]+[,)]' \
+ exclude='exit \(77\)|error ?\(((0|77),|[^,]*)' \
+ halt='use EXIT_* values rather than magic number' \
+ $(_sc_search_regexp)
+
+# Using EXIT_SUCCESS as the first argument to error is misleading,
+# since when that parameter is 0, error does not exit. Use '0' instead.
+sc_error_exit_success:
+ @prohibit='error *\(EXIT_SUCCESS,' \
+ in_vc_files='\.[chly]$$' \
+ halt='found error (EXIT_SUCCESS' \
+ $(_sc_search_regexp)
+
+# "FATAL:" should be fully upper-cased in error messages
+# "WARNING:" should be fully upper-cased, or fully lower-cased
+sc_error_message_warn_fatal:
+ @grep -nEA2 '[^rp]error *\(' $$($(VC_LIST_EXCEPT)) \
+ | grep -E '"Warning|"Fatal|"fatal' && \
+ { echo '$(ME): use FATAL, WARNING or warning' 1>&2; \
+ exit 1; } || :
+
+# Error messages should not start with a capital letter
+sc_error_message_uppercase:
+ @grep -nEA2 '[^rp]error *\(' $$($(VC_LIST_EXCEPT)) \
+ | grep -E '"[A-Z]' \
+ | grep -vE '"FATAL|"WARNING|"Java|"C#|PRIuMAX' && \
+ { echo '$(ME): found capitalized error message' 1>&2; \
+ exit 1; } || :
+
+# Error messages should not end with a period
+sc_error_message_period:
+ @grep -nEA2 '[^rp]error *\(' $$($(VC_LIST_EXCEPT)) \
+ | grep -E '[^."]\."' && \
+ { echo '$(ME): found error message ending in period' 1>&2; \
+ exit 1; } || :
+
+sc_file_system:
+ @prohibit=file''system \
+ ignore_case=1 \
+ halt='found use of "file''system"; spell it "file system"' \
+ $(_sc_search_regexp)
+
+# Don't use cpp tests of this symbol. All code assumes config.h is included.
+sc_prohibit_have_config_h:
+ @prohibit='^# *if.*HAVE''_CONFIG_H' \
+ halt='found use of HAVE''_CONFIG_H; remove' \
+ $(_sc_search_regexp)
+
+# Nearly all .c files must include <config.h>. However, we also permit this
+# via inclusion of a package-specific header, if cfg.mk specified one.
+# config_h_header must be suitable for grep -E.
+config_h_header ?= <config\.h>
+sc_require_config_h:
+ @require='^# *include $(config_h_header)' \
+ in_vc_files='\.c$$' \
+ halt='the above files do not include <config.h>' \
+ $(_sc_search_regexp)
+
+# Print each file name for which the first #include does not match
+# $(config_h_header). Like grep -m 1, this only looks at the first match.
+perl_config_h_first_ = \
+ -e 'BEGIN {$$ret = 0}' \
+ -e 'if (/^\# *include\b/) {' \
+ -e ' if (not m{^\# *include $(config_h_header)}) {' \
+ -e ' print "$$ARGV\n";' \
+ -e ' $$ret = 1;' \
+ -e ' }' \
+ -e ' \# Move on to next file after first include' \
+ -e ' close ARGV;' \
+ -e '}' \
+ -e 'END {exit $$ret}'
+
+# You must include <config.h> before including any other header file.
+# This can possibly be via a package-specific header, if given by cfg.mk.
+sc_require_config_h_first:
+ @if $(VC_LIST_EXCEPT) | grep '\.c$$' > /dev/null; then \
+ files=$$($(VC_LIST_EXCEPT) | grep '\.c$$') && \
+ perl -n $(perl_config_h_first_) $$files || \
+ { echo '$(ME): the above files include some other header' \
+ 'before <config.h>' 1>&2; exit 1; } || :; \
+ else :; \
+ fi
+
+sc_prohibit_HAVE_MBRTOWC:
+ @prohibit='\bHAVE_MBRTOWC\b' \
+ halt="do not use $$prohibit; it is always defined" \
+ $(_sc_search_regexp)
+
+# To use this "command" macro, you must first define two shell variables:
+# h: the header name, with no enclosing <> or ""
+# re: a regular expression that matches IFF something provided by $h is used.
+define _sc_header_without_use
+ dummy=; : so we do not need a semicolon before each use; \
+ h_esc=`echo '[<"]'"$$h"'[">]'|$(SED) 's/\./\\\\./g'`; \
+ if $(VC_LIST_EXCEPT) | grep '\.c$$' > /dev/null; then \
+ files=$$(grep -l '^# *include '"$$h_esc" \
+ $$($(VC_LIST_EXCEPT) | grep '\.c$$')) && \
+ grep -LE "$$re" $$files | grep . && \
+ { echo "$(ME): the above files include $$h but don't use it" \
+ 1>&2; exit 1; } || :; \
+ else :; \
+ fi
+endef
+
+# Prohibit the inclusion of assert.h without an actual use of assert.
+sc_prohibit_assert_without_use:
+ @h='assert.h' re='\<assert *\(' $(_sc_header_without_use)
+
+# Prohibit the inclusion of close-stream.h without an actual use.
+sc_prohibit_close_stream_without_use:
+ @h='close-stream.h' re='\<close_stream *\(' $(_sc_header_without_use)
+
+# Prohibit the inclusion of getopt.h without an actual use.
+sc_prohibit_getopt_without_use:
+ @h='getopt.h' re='\<getopt(_long)? *\(' $(_sc_header_without_use)
+
+# Don't include quotearg.h unless you use one of its functions.
+sc_prohibit_quotearg_without_use:
+ @h='quotearg.h' re='\<quotearg(_[^ ]+)? *\(' $(_sc_header_without_use)
+
+# Don't include quote.h unless you use one of its functions.
+sc_prohibit_quote_without_use:
+ @h='quote.h' re='\<quote((_n)? *\(|_quoting_options\>)' \
+ $(_sc_header_without_use)
+
+# Don't include this header unless you use one of its functions.
+sc_prohibit_long_options_without_use:
+ @h='long-options.h' re='\<parse_long_options *\(' \
+ $(_sc_header_without_use)
+
+# Don't include this header unless you use one of its functions.
+sc_prohibit_inttostr_without_use:
+ @h='inttostr.h' re='\<(off|[iu]max|uint)tostr *\(' \
+ $(_sc_header_without_use)
+
+# Don't include this header unless you use one of its functions.
+sc_prohibit_ignore_value_without_use:
+ @h='ignore-value.h' re='\<ignore_(value|ptr) *\(' \
+ $(_sc_header_without_use)
+
+# Don't include this header unless you use one of its functions.
+sc_prohibit_error_without_use:
+ @h='error.h' \
+ re='\<error(_at_line|_print_progname|_one_per_line|_message_count)? *\('\
+ $(_sc_header_without_use)
+
+# Don't include xalloc.h unless you use one of its functions.
+# Consider these symbols:
+# perl -lne '/^# *define (\w+)\(/ and print $1' lib/xalloc.h|grep -v '^__';
+# perl -lne '/^(?:extern )?(?:void|char) \*?(\w+) *\(/ and print $1' lib/xalloc.h
+# Divide into two sets on case, and filter each through this:
+# | sort | perl -MRegexp::Assemble -le \
+# 'print Regexp::Assemble->new(file => "/dev/stdin")->as_string'|sed 's/\?://g'
+# Note this was produced by the above:
+# _xa1 = \
+#x(((2n?)?re|c(har)?|n(re|m)|z)alloc|alloc_(oversized|die)|m(alloc|emdup)|strdup)
+# But we can do better, in at least two ways:
+# 1) take advantage of two "dup"-suffixed strings:
+# x(((2n?)?re|c(har)?|n(re|m)|[mz])alloc|alloc_(oversized|die)|(mem|str)dup)
+# 2) notice that "c(har)?|[mz]" is equivalent to the shorter and more readable
+# "char|[cmz]"
+# x(((2n?)?re|char|n(re|m)|[cmz])alloc|alloc_(oversized|die)|(mem|str)dup)
+_xa1 = x(((2n?)?re|char|n(re|m)|[cmz])alloc|alloc_(oversized|die)|(mem|str)dup)
+_xa2 = X([CZ]|N?M)ALLOC
+sc_prohibit_xalloc_without_use:
+ @h='xalloc.h' \
+ re='\<($(_xa1)|$(_xa2)) *\('\
+ $(_sc_header_without_use)
+
+# Extract function names:
+# perl -lne '/^(?:extern )?(?:void|char) \*?(\w+) *\(/ and print $1' lib/hash.h
+_hash_re = \
+clear|delete|free|get_(first|next)|insert|lookup|print_statistics|reset_tuning
+_hash_fn = \<($(_hash_re)) *\(
+_hash_struct = (struct )?\<[Hh]ash_(table|tuning)\>
+sc_prohibit_hash_without_use:
+ @h='hash.h' \
+ re='$(_hash_fn)|$(_hash_struct)'\
+ $(_sc_header_without_use)
+
+sc_prohibit_cloexec_without_use:
+ @h='cloexec.h' re='\<(set_cloexec_flag|dup_cloexec) *\(' \
+ $(_sc_header_without_use)
+
+sc_prohibit_posixver_without_use:
+ @h='posixver.h' re='\<posix2_version *\(' $(_sc_header_without_use)
+
+sc_prohibit_same_without_use:
+ @h='same.h' re='\<same_name *\(' $(_sc_header_without_use)
+
+sc_prohibit_hash_pjw_without_use:
+ @h='hash-pjw.h' \
+ re='\<hash_pjw\>' \
+ $(_sc_header_without_use)
+
+sc_prohibit_safe_read_without_use:
+ @h='safe-read.h' re='(\<SAFE_READ_ERROR\>|\<safe_read *\()' \
+ $(_sc_header_without_use)
+
+sc_prohibit_argmatch_without_use:
+ @h='argmatch.h' \
+ re='(\<(ARRAY_CARDINALITY|X?ARGMATCH(|_TO_ARGUMENT|_VERIFY))\>|\<(invalid_arg|argmatch(_exit_fn|_(in)?valid)?) *\()' \
+ $(_sc_header_without_use)
+
+sc_prohibit_canonicalize_without_use:
+ @h='canonicalize.h' \
+ re='CAN_(EXISTING|ALL_BUT_LAST|MISSING)|canonicalize_(mode_t|filename_mode|file_name)' \
+ $(_sc_header_without_use)
+
+sc_prohibit_root_dev_ino_without_use:
+ @h='root-dev-ino.h' \
+ re='(\<ROOT_DEV_INO_(CHECK|WARN)\>|\<get_root_dev_ino *\()' \
+ $(_sc_header_without_use)
+
+sc_prohibit_openat_without_use:
+ @h='openat.h' \
+ re='\<(openat_(permissive|needs_fchdir|(save|restore)_fail)|l?(stat|ch(own|mod))at|(euid)?accessat|(FCHMOD|FCHOWN|STAT)AT_INLINE)\>' \
+ $(_sc_header_without_use)
+
+# Prohibit the inclusion of c-ctype.h without an actual use.
+ctype_re = isalnum|isalpha|isascii|isblank|iscntrl|isdigit|isgraph|islower\
+|isprint|ispunct|isspace|isupper|isxdigit|tolower|toupper
+sc_prohibit_c_ctype_without_use:
+ @h='c-ctype.h' re='\<c_($(ctype_re)) *\(' \
+ $(_sc_header_without_use)
+
+# The following list was generated by running:
+# man signal.h|col -b|perl -ne '/bsd_signal.*;/.../sigwaitinfo.*;/ and print' \
+# | perl -lne '/^\s+(?:int|void).*?(\w+).*/ and print $1' | fmt
+_sig_functions = \
+ bsd_signal kill killpg pthread_kill pthread_sigmask raise sigaction \
+ sigaddset sigaltstack sigdelset sigemptyset sigfillset sighold sigignore \
+ siginterrupt sigismember signal sigpause sigpending sigprocmask sigqueue \
+ sigrelse sigset sigsuspend sigtimedwait sigwait sigwaitinfo
+_sig_function_re = $(subst $(_sp),|,$(strip $(_sig_functions)))
+# The following were extracted from "man signal.h" manually.
+_sig_types_and_consts = \
+ MINSIGSTKSZ SA_NOCLDSTOP SA_NOCLDWAIT SA_NODEFER SA_ONSTACK \
+ SA_RESETHAND SA_RESTART SA_SIGINFO SIGEV_NONE SIGEV_SIGNAL \
+ SIGEV_THREAD SIGSTKSZ SIG_BLOCK SIG_SETMASK SIG_UNBLOCK SS_DISABLE \
+ SS_ONSTACK mcontext_t pid_t sig_atomic_t sigevent siginfo_t sigset_t \
+ sigstack sigval stack_t ucontext_t
+# generated via this:
+# perl -lne '/^#ifdef (SIG\w+)/ and print $1' lib/sig2str.c|sort -u|fmt -70
+_sig_names = \
+ SIGABRT SIGALRM SIGALRM1 SIGBUS SIGCANCEL SIGCHLD SIGCLD SIGCONT \
+ SIGDANGER SIGDIL SIGEMT SIGFPE SIGFREEZE SIGGRANT SIGHUP SIGILL \
+ SIGINFO SIGINT SIGIO SIGIOT SIGKAP SIGKILL SIGKILLTHR SIGLOST SIGLWP \
+ SIGMIGRATE SIGMSG SIGPHONE SIGPIPE SIGPOLL SIGPRE SIGPROF SIGPWR \
+ SIGQUIT SIGRETRACT SIGSAK SIGSEGV SIGSOUND SIGSTKFLT SIGSTOP SIGSYS \
+ SIGTERM SIGTHAW SIGTRAP SIGTSTP SIGTTIN SIGTTOU SIGURG SIGUSR1 \
+ SIGUSR2 SIGVIRT SIGVTALRM SIGWAITING SIGWINCH SIGWIND SIGWINDOW \
+ SIGXCPU SIGXFSZ
+_sig_syms_re = $(subst $(_sp),|,$(strip $(_sig_names) $(_sig_types_and_consts)))
+
+# Prohibit the inclusion of signal.h without an actual use.
+sc_prohibit_signal_without_use:
+ @h='signal.h' \
+ re='\<($(_sig_function_re)) *\(|\<($(_sig_syms_re))\>' \
+ $(_sc_header_without_use)
+
+# Don't include stdio--.h unless you use one of its functions.
+sc_prohibit_stdio--_without_use:
+ @h='stdio--.h' re='\<((f(re)?|p)open|tmpfile) *\(' \
+ $(_sc_header_without_use)
+
+# Don't include stdio-safer.h unless you use one of its functions.
+sc_prohibit_stdio-safer_without_use:
+ @h='stdio-safer.h' re='\<((f(re)?|p)open|tmpfile)_safer *\(' \
+ $(_sc_header_without_use)
+
+# Prohibit the inclusion of strings.h without a sensible use.
+# Using the likes of bcmp, bcopy, bzero, index or rindex is not sensible.
+sc_prohibit_strings_without_use:
+ @h='strings.h' \
+ re='\<(strn?casecmp|ffs(ll)?)\>' \
+ $(_sc_header_without_use)
+
+# Get the list of symbol names with this:
+# perl -lne '/^# *define ([A-Z]\w+)\(/ and print $1' lib/intprops.h|fmt
+_intprops_names = \
+ TYPE_IS_INTEGER TYPE_SIGNED EXPR_SIGNED TYPE_WIDTH TYPE_MINIMUM \
+ TYPE_MAXIMUM INT_BITS_STRLEN_BOUND INT_STRLEN_BOUND INT_BUFSIZE_BOUND \
+ INT_ADD_RANGE_OVERFLOW INT_SUBTRACT_RANGE_OVERFLOW \
+ INT_NEGATE_RANGE_OVERFLOW INT_MULTIPLY_RANGE_OVERFLOW \
+ INT_DIVIDE_RANGE_OVERFLOW INT_REMAINDER_RANGE_OVERFLOW \
+ INT_LEFT_SHIFT_RANGE_OVERFLOW INT_ADD_OVERFLOW INT_SUBTRACT_OVERFLOW \
+ INT_NEGATE_OVERFLOW INT_NEGATE_OVERFLOW INT_MULTIPLY_OVERFLOW \
+ INT_DIVIDE_OVERFLOW INT_REMAINDER_OVERFLOW INT_LEFT_SHIFT_OVERFLOW \
+ INT_ADD_WRAPV INT_SUBTRACT_WRAPV INT_MULTIPLY_WRAPV
+_intprops_syms_re = $(subst $(_sp),|,$(strip $(_intprops_names)))
+# Prohibit the inclusion of intprops.h without an actual use.
+sc_prohibit_intprops_without_use:
+ @h='intprops.h' \
+ re='\<($(_intprops_syms_re)) *\(' \
+ $(_sc_header_without_use)
+
+_stddef_syms_re = NULL|offsetof|ptrdiff_t|size_t|wchar_t
+# Prohibit the inclusion of stddef.h without an actual use.
+sc_prohibit_stddef_without_use:
+ @h='stddef.h' \
+ re='\<($(_stddef_syms_re))\>' \
+ $(_sc_header_without_use)
+
+_de1 = dirfd|(close|(fd)?open|read|rewind|seek|tell)dir(64)?(_r)?
+_de2 = (versionsort|struct dirent|getdirentries|alphasort|scandir(at)?)(64)?
+_de3 = MAXNAMLEN|DIR|ino_t|d_ino|d_fileno|d_namlen
+_dirent_syms_re = $(_de1)|$(_de2)|$(_de3)
+# Prohibit the inclusion of dirent.h without an actual use.
+sc_prohibit_dirent_without_use:
+ @h='dirent.h' \
+ re='\<($(_dirent_syms_re))\>' \
+ $(_sc_header_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) *\(' \
+ $(_sc_header_without_use)
+
+# Don't include xfreopen.h unless you use one of its functions.
+sc_prohibit_xfreopen_without_use:
+ @h='xfreopen.h' re='\<xfreopen *\(' $(_sc_header_without_use)
+
+sc_obsolete_symbols:
+ @prohibit='\<(HAVE''_FCNTL_H|O''_NDELAY)\>' \
+ halt='do not use HAVE''_FCNTL_H or O'_NDELAY \
+ $(_sc_search_regexp)
+
+# FIXME: warn about definitions of EXIT_FAILURE, EXIT_SUCCESS, STREQ
+
+# Each nonempty ChangeLog line must start with a year number, or a TAB.
+sc_changelog:
+ @prohibit='^[^12 ]' \
+ in_vc_files='^ChangeLog$$' \
+ halt='found unexpected prefix in a ChangeLog' \
+ $(_sc_search_regexp)
+
+# Ensure that each .c file containing a "main" function also
+# calls bindtextdomain.
+sc_bindtextdomain:
+ @require='bindtextdomain *\(' \
+ in_vc_files='\.c$$' \
+ containing='\<main *(' \
+ halt='the above files do not call bindtextdomain' \
+ $(_sc_search_regexp)
+
+# Require that the final line of each test-lib.sh-using test be this one:
+# Exit $fail
+# Note: this test requires GNU grep's --label= option.
+Exit_witness_file ?= tests/test-lib.sh
+Exit_base := $(notdir $(Exit_witness_file))
+sc_require_test_exit_idiom:
+ @if test -f $(srcdir)/$(Exit_witness_file); then \
+ die=0; \
+ for i in $$(grep -l -F 'srcdir/$(Exit_base)' \
+ $$($(VC_LIST) tests)); do \
+ tail -n1 $$i | grep '^Exit .' > /dev/null \
+ && : || { die=1; echo $$i; } \
+ done; \
+ test $$die = 1 && \
+ { echo 1>&2 '$(ME): the final line in each of the above is not:'; \
+ echo 1>&2 'Exit something'; \
+ exit 1; } || :; \
+ fi
+
+sc_trailing_blank:
+ @prohibit='[ ]$$' \
+ halt='found trailing blank(s)' \
+ exclude='^Binary file .* matches$$' \
+ $(_sc_search_regexp)
+
+# Match lines like the following, but where there is only one space
+# between the options and the description:
+# -D, --all-repeated[=delimit-method] print all duplicate lines\n
+longopt_re = --[a-z][0-9A-Za-z-]*(\[?=[0-9A-Za-z-]*\]?)?
+sc_two_space_separator_in_usage:
+ @prohibit='^ *(-[A-Za-z],)? $(longopt_re) [^ ].*\\$$' \
+ halt='help2man requires at least two spaces between an option and its description'\
+ $(_sc_search_regexp)
+
+# A regexp matching function names like "error" that may be used
+# to emit translatable messages.
+_gl_translatable_diag_func_re ?= error
+
+# Look for diagnostics that aren't marked for translation.
+# This won't find any for which error's format string is on a separate line.
+sc_unmarked_diagnostics:
+ @prohibit='\<$(_gl_translatable_diag_func_re) *\([^"]*"[^"]*[a-z]{3}' \
+ exclude='(_|ngettext ?)\(' \
+ halt='found unmarked diagnostic(s)' \
+ $(_sc_search_regexp)
+
+# Avoid useless parentheses like those in this example:
+# #if defined (SYMBOL) || defined (SYM2)
+sc_useless_cpp_parens:
+ @prohibit='^# *if .*defined *\(' \
+ halt='found useless parentheses in cpp directive' \
+ $(_sc_search_regexp)
+
+# List headers for which HAVE_HEADER_H is always true, assuming you are
+# using the appropriate gnulib module. CAUTION: for each "unnecessary"
+# #if HAVE_HEADER_H that you remove, be sure that your project explicitly
+# requires the gnulib module that guarantees the usability of that header.
+gl_assured_headers_ = \
+ cd $(gnulib_dir)/lib && echo *.in.h|$(SED) 's/\.in\.h//g'
+
+# Convert the list of names to upper case, and replace each space with "|".
+az_ = abcdefghijklmnopqrstuvwxyz
+AZ_ = ABCDEFGHIJKLMNOPQRSTUVWXYZ
+gl_header_upper_case_or_ = \
+ $$($(gl_assured_headers_) \
+ | tr $(az_)/.- $(AZ_)___ \
+ | tr -s ' ' '|' \
+ )
+sc_prohibit_always_true_header_tests:
+ @or=$(gl_header_upper_case_or_); \
+ re="HAVE_($$or)_H"; \
+ prohibit='\<'"$$re"'\>' \
+ halt=$$(printf '%s\n' \
+ 'do not test the above HAVE_<header>_H symbol(s);' \
+ ' with the corresponding gnulib module, they are always true') \
+ $(_sc_search_regexp)
+
+sc_prohibit_defined_have_decl_tests:
+ @prohibit='(#[ ]*ifn?def|\<defined)\>[ (]+HAVE_DECL_' \
+ halt='HAVE_DECL macros are always defined' \
+ $(_sc_search_regexp)
+
+# ==================================================================
+gl_other_headers_ ?= \
+ intprops.h \
+ openat.h \
+ stat-macros.h
+
+# Perl -lne code to extract "significant" cpp-defined symbols from a
+# gnulib header file, eliminating a few common false-positives.
+# The exempted names below are defined only conditionally in gnulib,
+# and hence sometimes must/may be defined in application code.
+gl_extract_significant_defines_ = \
+ /^\# *define ([^_ (][^ (]*)(\s*\(|\s+\w+)/\
+ && $$2 !~ /(?:rpl_|_used_without_)/\
+ && $$1 !~ /^(?:NSIG|ENODATA)$$/\
+ && $$1 !~ /^(?:SA_RESETHAND|SA_RESTART)$$/\
+ and print $$1
+
+# Create a list of regular expressions matching the names
+# of macros that are guaranteed to be defined by parts of gnulib.
+define def_sym_regex
+ gen_h=$(gl_generated_headers_); \
+ (cd $(gnulib_dir)/lib; \
+ for f in *.in.h $(gl_other_headers_); do \
+ test -f $$f \
+ && perl -lne '$(gl_extract_significant_defines_)' $$f; \
+ done; \
+ ) | sort -u \
+ | $(SED) 's/^/^ *# *(define|undef) */;s/$$/\\>/'
+endef
+
+# Don't define macros that we already get from gnulib header files.
+sc_prohibit_always-defined_macros:
+ @if test -d $(gnulib_dir); then \
+ case $$(echo all: | grep -l -f - Makefile) in Makefile);; *) \
+ echo '$(ME): skipping $@: you lack GNU grep' 1>&2; exit 0;; \
+ esac; \
+ $(def_sym_regex) | grep -E -f - $$($(VC_LIST_EXCEPT)) \
+ && { echo '$(ME): define the above via some gnulib .h file' \
+ 1>&2; exit 1; } || :; \
+ fi
+# ==================================================================
+
+# Prohibit checked in backup files.
+sc_prohibit_backup_files:
+ @$(VC_LIST) | grep '~$$' && \
+ { echo '$(ME): found version controlled backup file' 1>&2; \
+ exit 1; } || :
+
+# Require the latest GPL.
+sc_GPL_version:
+ @prohibit='either ''version [^3]' \
+ halt='GPL vN, N!=3' \
+ $(_sc_search_regexp)
+
+# Require the latest GFDL. Two regexp, since some .texi files end up
+# line wrapping between 'Free Documentation License,' and 'Version'.
+_GFDL_regexp = (Free ''Documentation.*Version 1\.[^3]|Version 1\.[^3] or any)
+sc_GFDL_version:
+ @prohibit='$(_GFDL_regexp)' \
+ halt='GFDL vN, N!=3' \
+ $(_sc_search_regexp)
+
+# Don't use Texinfo's @acronym{}.
+# http://lists.gnu.org/archive/html/bug-gnulib/2010-03/msg00321.html
+texinfo_suffix_re_ ?= \.(txi|texi(nfo)?)$$
+sc_texinfo_acronym:
+ @prohibit='@acronym\{' \
+ in_vc_files='$(texinfo_suffix_re_)' \
+ halt='found use of Texinfo @acronym{}' \
+ $(_sc_search_regexp)
+
+cvs_keywords = \
+ Author|Date|Header|Id|Name|Locker|Log|RCSfile|Revision|Source|State
+
+sc_prohibit_cvs_keyword:
+ @prohibit='\$$($(cvs_keywords))\$$' \
+ halt='do not use CVS keyword expansion' \
+ $(_sc_search_regexp)
+
+# This Perl code is slightly obfuscated. Not only is each "$" doubled
+# because it's in a Makefile, but the $$c's are comments; we cannot
+# use "#" due to the way the script ends up concatenated onto one line.
+# It would be much more concise, and would produce better output (including
+# counts) if written as:
+# perl -ln -0777 -e '/\n(\n+)$/ and print "$ARGV: ".length $1' ...
+# but that would be far less efficient, reading the entire contents
+# of each file, rather than just the last two bytes of each.
+# In addition, while the code below detects both blank lines and a missing
+# newline at EOF, the above detects only the former.
+#
+# This is a perl script that is expected to be the single-quoted argument
+# to a command-line "-le". The remaining arguments are file names.
+# Print the name of each file that does not end in exactly one newline byte.
+# I.e., warn if there are blank lines (2 or more newlines), or if the
+# last byte is not a newline. However, currently we don't complain
+# about any file that contains exactly one byte.
+# Exit nonzero if at least one such file is found, otherwise, exit 0.
+# Warn about, but otherwise ignore open failure. Ignore seek/read failure.
+#
+# Use this if you want to remove trailing empty lines from selected files:
+# perl -pi -0777 -e 's/\n\n+$/\n/' files...
+#
+require_exactly_one_NL_at_EOF_ = \
+ foreach my $$f (@ARGV) \
+ { \
+ open F, "<", $$f or (warn "failed to open $$f: $$!\n"), next; \
+ my $$p = sysseek (F, -2, 2); \
+ my $$c = "seek failure probably means file has < 2 bytes; ignore"; \
+ my $$last_two_bytes; \
+ defined $$p and $$p = sysread F, $$last_two_bytes, 2; \
+ close F; \
+ $$c = "ignore read failure"; \
+ $$p && ($$last_two_bytes eq "\n\n" \
+ || substr ($$last_two_bytes,1) ne "\n") \
+ and (print $$f), $$fail=1; \
+ } \
+ END { exit defined $$fail }
+sc_prohibit_empty_lines_at_EOF:
+ @perl -le '$(require_exactly_one_NL_at_EOF_)' $$($(VC_LIST_EXCEPT)) \
+ || { echo '$(ME): empty line(s) or no newline at EOF' \
+ 1>&2; exit 1; } || :
+
+# Make sure we don't use st_blocks. Use ST_NBLOCKS instead.
+# This is a bit of a kludge, since it prevents use of the string
+# even in comments, but for now it does the job with no false positives.
+sc_prohibit_stat_st_blocks:
+ @prohibit='[.>]st_blocks' \
+ halt='do not use st_blocks; use ST_NBLOCKS' \
+ $(_sc_search_regexp)
+
+# Make sure we don't define any S_IS* macros in src/*.c files.
+# They're already defined via gnulib's sys/stat.h replacement.
+sc_prohibit_S_IS_definition:
+ @prohibit='^ *# *define *S_IS' \
+ halt='do not define S_IS* macros; include <sys/stat.h>' \
+ $(_sc_search_regexp)
+
+# Perl block to convert a match to FILE_NAME:LINENO:TEST,
+# that is shared by two definitions below.
+perl_filename_lineno_text_ = \
+ -e ' {' \
+ -e ' $$n = ($$` =~ tr/\n/\n/ + 1);' \
+ -e ' ($$v = $$&) =~ s/\n/\\n/g;' \
+ -e ' print "$$ARGV:$$n:$$v\n";' \
+ -e ' }'
+
+prohibit_doubled_words_ = \
+ the then in an on if is it but for or at and do to
+# expand the regex before running the check to avoid using expensive captures
+prohibit_doubled_word_expanded_ = \
+ $(join $(prohibit_doubled_words_),$(addprefix \s+,$(prohibit_doubled_words_)))
+prohibit_doubled_word_RE_ ?= \
+ /\b(?:$(subst $(_sp),|,$(prohibit_doubled_word_expanded_)))\b/gims
+prohibit_doubled_word_ = \
+ -e 'while ($(prohibit_doubled_word_RE_))' \
+ $(perl_filename_lineno_text_)
+
+# Define this to a regular expression that matches
+# any filename:dd:match lines you want to ignore.
+# The default is to ignore no matches.
+ignore_doubled_word_match_RE_ ?= ^$$
+
+sc_prohibit_doubled_word:
+ @perl -n -0777 $(prohibit_doubled_word_) $$($(VC_LIST_EXCEPT)) \
+ | grep -vE '$(ignore_doubled_word_match_RE_)' \
+ | grep . && { echo '$(ME): doubled words' 1>&2; exit 1; } || :
+
+# A regular expression matching undesirable combinations of words like
+# "can not"; this matches them even when the two words appear on different
+# lines, but not when there is an intervening delimiter like "#" or "*".
+# Similarly undesirable, "See @xref{...}", since an @xref should start
+# a sentence. Explicitly prohibit any prefix of "see" or "also".
+# Also prohibit a prefix matching "\w+ +".
+# @pxref gets the same see/also treatment and should be parenthesized;
+# presume it must *not* start a sentence.
+bad_xref_re_ ?= (?:[\w,:;] +|(?:see|also)\s+)\@xref\{
+bad_pxref_re_ ?= (?:[.!?]|(?:see|also))\s+\@pxref\{
+prohibit_undesirable_word_seq_RE_ ?= \
+ /(?:\bcan\s+not\b|$(bad_xref_re_)|$(bad_pxref_re_))/gims
+prohibit_undesirable_word_seq_ = \
+ -e 'while ($(prohibit_undesirable_word_seq_RE_))' \
+ $(perl_filename_lineno_text_)
+# Define this to a regular expression that matches
+# any filename:dd:match lines you want to ignore.
+# The default is to ignore no matches.
+ignore_undesirable_word_sequence_RE_ ?= ^$$
+
+sc_prohibit_undesirable_word_seq:
+ @perl -n -0777 $(prohibit_undesirable_word_seq_) \
+ $$($(VC_LIST_EXCEPT)) \
+ | grep -vE '$(ignore_undesirable_word_sequence_RE_)' | grep . \
+ && { echo '$(ME): undesirable word sequence' >&2; exit 1; } || :
+
+# Except for shell files and for loops, double semicolon is probably a mistake
+sc_prohibit_double_semicolon:
+ @prohibit='; *;[ {} \]*(/[/*]|$$)' \
+ in_vc_files='\.[chly]$$' \
+ exclude='\bfor *\(.*\)' \
+ halt="Double semicolon detected" \
+ $(_sc_search_regexp)
+
+_ptm1 = use "test C1 && test C2", not "test C1 -''a C2"
+_ptm2 = use "test C1 || test C2", not "test C1 -''o C2"
+# Using test's -a and -o operators is not portable.
+# We prefer test over [, since the latter is spelled [[ in configure.ac.
+sc_prohibit_test_minus_ao:
+ @prohibit='(\<test| \[+) .+ -[ao] ' \
+ halt='$(_ptm1); $(_ptm2)' \
+ $(_sc_search_regexp)
+
+# Avoid a test bashism.
+sc_prohibit_test_double_equal:
+ @prohibit='(\<test| \[+) .+ == ' \
+ containing='#! */bin/[a-z]*sh' \
+ halt='use "test x = x", not "test x =''= x"' \
+ $(_sc_search_regexp)
+
+# Each program that uses proper_name_utf8 must link with one of the
+# ICONV libraries. Otherwise, some ICONV library must appear in LDADD.
+# The perl -0777 invocation below extracts the possibly-multi-line
+# definition of LDADD from the appropriate Makefile.am and exits 0
+# when it contains "ICONV".
+sc_proper_name_utf8_requires_ICONV:
+ @progs=$$(grep -l 'proper_name_utf8 ''("' $$($(VC_LIST_EXCEPT)));\
+ if test "x$$progs" != x; then \
+ fail=0; \
+ for p in $$progs; do \
+ dir=$$(dirname "$$p"); \
+ perl -0777 \
+ -ne 'exit !(/^LDADD =(.+?[^\\]\n)/ms && $$1 =~ /ICONV/)' \
+ $$dir/Makefile.am && continue; \
+ base=$$(basename "$$p" .c); \
+ grep "$${base}_LDADD.*ICONV)" $$dir/Makefile.am > /dev/null \
+ || { fail=1; echo 1>&2 "$(ME): $$p uses proper_name_utf8"; }; \
+ done; \
+ test $$fail = 1 && \
+ { echo 1>&2 '$(ME): the above do not link with any ICONV library'; \
+ exit 1; } || :; \
+ fi
+
+# Warn about "c0nst struct Foo const foo[]",
+# but not about "char const *const foo" or "#define const const".
+sc_redundant_const:
+ @prohibit='\bconst\b[[:space:][:alnum:]]{2,}\bconst\b' \
+ halt='redundant "const" in declarations' \
+ $(_sc_search_regexp)
+
+sc_const_long_option:
+ @prohibit='^ *static.*struct option ' \
+ exclude='const struct option|struct option const' \
+ halt='add "const" to the above declarations' \
+ $(_sc_search_regexp)
+
+NEWS_hash = \
+ $$($(SED) -n '/^\*.* $(PREV_VERSION_REGEXP) ([0-9-]*)/,$$p' \
+ $(srcdir)/NEWS \
+ | perl -0777 -pe \
+ 's/^Copyright.+?Free\sSoftware\sFoundation,\sInc\.\n//ms' \
+ | md5sum - \
+ | $(SED) 's/ .*//')
+
+# Ensure that we don't accidentally insert an entry into an old NEWS block.
+sc_immutable_NEWS:
+ @if test -f $(srcdir)/NEWS; then \
+ test "$(NEWS_hash)" = '$(old_NEWS_hash)' && : || \
+ { echo '$(ME): you have modified old NEWS' 1>&2; exit 1; }; \
+ fi
+
+# Update the hash stored above. Do this after each release and
+# for any corrections to old entries.
+update-NEWS-hash: NEWS
+ perl -pi -e 's/^(old_NEWS_hash[ \t]+:?=[ \t]+).*/$${1}'"$(NEWS_hash)/" \
+ $(srcdir)/cfg.mk
+
+# Ensure that we use only the standard $(VAR) notation,
+# not @...@ in Makefile.am, now that we can rely on automake
+# to emit a definition for each substituted variable.
+# However, there is still one case in which @VAR@ use is not just
+# legitimate, but actually required: when augmenting an automake-defined
+# variable with a prefix. For example, gettext uses this:
+# MAKEINFO = env LANG= LC_MESSAGES= LC_ALL= LANGUAGE= @MAKEINFO@
+# otherwise, makeinfo would put German or French (current locale)
+# navigation hints in the otherwise-English documentation.
+#
+# Allow the package to add exceptions via a hook in cfg.mk;
+# for example, @PRAGMA_SYSTEM_HEADER@ can be permitted by
+# setting this to ' && !/PRAGMA_SYSTEM_HEADER/'.
+_makefile_at_at_check_exceptions ?=
+sc_makefile_at_at_check:
+ @perl -ne '/\@\w+\@/' \
+ -e ' && !/(\w+)\s+=.*\@\1\@$$/' \
+ -e ''$(_makefile_at_at_check_exceptions) \
+ -e 'and (print "$$ARGV:$$.: $$_"), $$m=1; END {exit !$$m}' \
+ $$($(VC_LIST_EXCEPT) | grep -E '(^|/)(Makefile\.am|[^/]+\.mk)$$') \
+ && { echo '$(ME): use $$(...), not @...@' 1>&2; exit 1; } || :
+
+news-check: NEWS
+ $(AM_V_GEN)if $(SED) -n $(news-check-lines-spec)p $< \
+ | grep -E $(news-check-regexp) >/dev/null; then \
+ :; \
+ else \
+ echo 'NEWS: $$(news-check-regexp) failed to match' 1>&2; \
+ exit 1; \
+ fi
+
+sc_makefile_TAB_only_indentation:
+ @prohibit='^ [ ]{8}' \
+ in_vc_files='akefile|\.mk$$' \
+ halt='found TAB-8-space indentation' \
+ $(_sc_search_regexp)
+
+sc_m4_quote_check:
+ @prohibit='(AC_DEFINE(_UNQUOTED)?|AC_DEFUN)\([^[]' \
+ in_vc_files='(^configure\.ac|\.m4)$$' \
+ halt='quote the first arg to AC_DEF*' \
+ $(_sc_search_regexp)
+
+fix_po_file_diag = \
+'you have changed the set of files with translatable diagnostics;\n\
+apply the above patch\n'
+
+# Generate a list of files in which to search for translatable strings.
+perl_translatable_files_list_ = \
+ -e 'foreach $$file (@ARGV) {' \
+ -e ' \# Consider only file extensions with one or two letters' \
+ -e ' $$file =~ /\...?$$/ or next;' \
+ -e ' \# Ignore m4 and mk files' \
+ -e ' $$file =~ /\.m[4k]$$/ and next;' \
+ -e ' \# Ignore a .c or .h file with a corresponding .l or .y file' \
+ -e ' $$file =~ /(.+)\.[ch]$$/ && (-e "$${1}.l" || -e "$${1}.y")' \
+ -e ' and next;' \
+ -e ' \# Skip unreadable files' \
+ -e ' -r $$file or next;' \
+ -e ' print "$$file ";' \
+ -e '}'
+
+# Verify that all source files using _() (more specifically, files that
+# match $(_gl_translatable_string_re)) are listed in po/POTFILES.in.
+po_file ?= $(srcdir)/po/POTFILES.in
+generated_files ?= $(srcdir)/lib/*.[ch]
+_gl_translatable_string_re ?= \b(N?_|gettext *)\([^)"]*("|$$)
+sc_po_check:
+ @if test -f $(po_file); then \
+ grep -E -v '^(#|$$)' $(po_file) \
+ | grep -v '^src/false\.c$$' | sort > $@-1; \
+ files=$$(perl $(perl_translatable_files_list_) \
+ $$($(VC_LIST_EXCEPT)) $(generated_files)); \
+ grep -E -l '$(_gl_translatable_string_re)' $$files \
+ | $(SED) 's|^$(_dot_escaped_srcdir)/||' | sort -u > $@-2; \
+ diff -u -L $(po_file) -L $(po_file) $@-1 $@-2 \
+ || { printf '$(ME): '$(fix_po_file_diag) 1>&2; exit 1; }; \
+ rm -f $@-1 $@-2; \
+ fi
+
+# Sometimes it is useful to change the PATH environment variable
+# in Makefiles. When doing so, it's better not to use the Unix-centric
+# path separator of ':', but rather the automake-provided '$(PATH_SEPARATOR)'.
+msg = 'Do not use ":" above; use $$(PATH_SEPARATOR) instead'
+sc_makefile_path_separator_check:
+ @prohibit='PATH[=].*:' \
+ in_vc_files='akefile|\.mk$$' \
+ halt=$(msg) \
+ $(_sc_search_regexp)
+
+# Check that 'make alpha' will not fail at the end of the process,
+# i.e., when pkg-M.N.tar.xz already exists (either in "." or in ../release)
+# and is read-only.
+writable-files:
+ $(AM_V_GEN)if test -d $(release_archive_dir); then \
+ for file in $(DIST_ARCHIVES); do \
+ for p in ./ $(release_archive_dir)/; do \
+ test -e $$p$$file || continue; \
+ test -w $$p$$file \
+ || { echo ERROR: $$p$$file is not writable; fail=1; }; \
+ done; \
+ done; \
+ test "$$fail" && exit 1 || : ; \
+ else :; \
+ fi
+
+v_etc_file = $(gnulib_dir)/lib/version-etc.c
+sample-test = tests/sample-test
+texi = doc/$(PACKAGE).texi
+# Make sure that the copyright date in $(v_etc_file) is up to date.
+# Do the same for the $(sample-test) and the main doc/.texi file.
+sc_copyright_check:
+ @require='enum { COPYRIGHT_YEAR = '$$(date +%Y)' };' \
+ in_files=$(v_etc_file) \
+ halt='out of date copyright in $(v_etc_file); update it' \
+ $(_sc_search_regexp)
+ @require='# Copyright \(C\) '$$(date +%Y)' Free' \
+ in_vc_files=$(sample-test) \
+ halt='out of date copyright in $(sample-test); update it' \
+ $(_sc_search_regexp)
+ @require='Copyright @copyright\{\} .*'$$(date +%Y) \
+ in_vc_files=$(texi) \
+ halt='out of date copyright in $(texi); update it' \
+ $(_sc_search_regexp)
+
+# If tests/help-version exists and seems to be new enough, assume that its
+# use of init.sh and path_prepend_ is correct, and ensure that every other
+# use of init.sh is identical.
+# This is useful because help-version cross-checks prog --version
+# with $(VERSION), which verifies that its path_prepend_ invocation
+# sets PATH correctly. This is an inexpensive way to ensure that
+# the other init.sh-using tests also get it right.
+_hv_file ?= $(srcdir)/tests/help-version
+_hv_regex_weak ?= ^ *\. .*/init\.sh"
+# Fix syntax-highlighters "
+_hv_regex_strong ?= ^ *\. "\$${srcdir=\.}/init\.sh"
+sc_cross_check_PATH_usage_in_tests:
+ @if test -f $(_hv_file); then \
+ grep -l 'VERSION mismatch' $(_hv_file) >/dev/null \
+ || { echo "$@: skipped: no such file: $(_hv_file)" 1>&2; \
+ exit 0; }; \
+ grep -lE '$(_hv_regex_strong)' $(_hv_file) >/dev/null \
+ || { echo "$@: $(_hv_file) lacks conforming use of init.sh" 1>&2; \
+ exit 1; }; \
+ good=$$(grep -E '$(_hv_regex_strong)' $(_hv_file)); \
+ grep -LFx "$$good" \
+ $$(grep -lE '$(_hv_regex_weak)' $$($(VC_LIST_EXCEPT))) \
+ | grep . && \
+ { echo "$(ME): the above files use path_prepend_ inconsistently" \
+ 1>&2; exit 1; } || :; \
+ fi
+
+# BRE regex of file contents to identify a test script.
+_test_script_regex ?= \<init\.sh\>
+
+# In tests, use "compare expected actual", not the reverse.
+sc_prohibit_reversed_compare_failure:
+ @prohibit='\<compare [^ ]+ ([^ ]*exp|/dev/null)' \
+ containing='$(_test_script_regex)' \
+ halt='reversed compare arguments' \
+ $(_sc_search_regexp)
+
+# #if HAVE_... will evaluate to false for any non numeric string.
+# That would be flagged by using -Wundef, however gnulib currently
+# tests many undefined macros, and so we can't enable that option.
+# So at least preclude common boolean strings as macro values.
+sc_Wundef_boolean:
+ @prohibit='^#define.*(yes|no|true|false)$$' \
+ in_files='$(CONFIG_INCLUDE)' \
+ halt='Use 0 or 1 for macro values' \
+ $(_sc_search_regexp)
+
+# Even if you use pathmax.h to guarantee that PATH_MAX is defined, it might
+# not be constant, or might overflow a stack. In general, use PATH_MAX as
+# a limit, not an array or alloca size.
+sc_prohibit_path_max_allocation:
+ @prohibit='(\balloca *\([^)]*|\[[^]]*)\bPATH_MAX' \
+ halt='Avoid stack allocations of size PATH_MAX' \
+ $(_sc_search_regexp)
+
+sc_vulnerable_makefile_CVE-2009-4029:
+ @prohibit='perm -777 -exec chmod a\+rwx|chmod 777 \$$\(distdir\)' \
+ in_files='(^|/)Makefile\.in$$' \
+ 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') \
+ $(_sc_search_regexp)
+
+sc_vulnerable_makefile_CVE-2012-3386:
+ @prohibit='chmod a\+w \$$\(distdir\)' \
+ in_files='(^|/)Makefile\.in$$' \
+ 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') \
+ $(_sc_search_regexp)
+
+vc-diff-check:
+ $(AM_V_GEN)(unset CDPATH; cd $(srcdir) && $(VC) diff) > vc-diffs || :
+ $(AM_V_at)if test -s vc-diffs; then \
+ cat vc-diffs; \
+ echo "Some files are locally modified:" 1>&2; \
+ exit 1; \
+ else \
+ rm vc-diffs; \
+ fi
+
+rel-files = $(DIST_ARCHIVES)
+
+gnulib_dir ?= $(srcdir)/gnulib
+gnulib-version = $$(cd $(gnulib_dir) \
+ && { git describe || git rev-parse --short=10 HEAD; } )
+bootstrap-tools ?= autoconf,automake,gnulib
+
+gpgv = $$(gpgv2 --version >/dev/null && echo gpgv2 || echo gpgv)
+# If it's not already specified, derive the GPG key ID from
+# the signed tag we've just applied to mark this release.
+gpg_key_ID ?= \
+ $$(cd $(srcdir) \
+ && git cat-file tag v$(VERSION) \
+ | $(gpgv) --status-fd 1 --keyring /dev/null - - 2>/dev/null \
+ | awk '/^\[GNUPG:\] ERRSIG / {print $$3; exit}')
+
+translation_project_ ?= coordinator@translationproject.org
+
+# Make info-gnu the default only for a stable release.
+announcement_Cc_stable = $(translation_project_), $(PACKAGE_BUGREPORT)
+announcement_mail_headers_stable = \
+ To: info-gnu@gnu.org \
+ Cc: $(announcement_Cc_) \
+ Mail-Followup-To: $(PACKAGE_BUGREPORT)
+
+announcement_Cc_alpha = $(translation_project_)
+announcement_mail_headers_alpha = \
+ To: $(PACKAGE_BUGREPORT) \
+ Cc: $(announcement_Cc_)
+
+announcement_mail_Cc_beta = $(announcement_mail_Cc_alpha)
+announcement_mail_headers_beta = $(announcement_mail_headers_alpha)
+
+announcement_mail_Cc_ ?= $(announcement_mail_Cc_$(release-type))
+announcement_mail_headers_ ?= $(announcement_mail_headers_$(release-type))
+announcement: NEWS ChangeLog $(rel-files)
+# Not $(AM_V_GEN) since the output of this command serves as
+# announcement message: it would start with " GEN announcement".
+ $(AM_V_at)$(srcdir)/$(_build-aux)/announce-gen \
+ --mail-headers='$(announcement_mail_headers_)' \
+ --release-type=$(release-type) \
+ --package=$(PACKAGE) \
+ --prev=$(PREV_VERSION) \
+ --curr=$(VERSION) \
+ --gpg-key-id=$(gpg_key_ID) \
+ --srcdir=$(srcdir) \
+ --news=$(srcdir)/NEWS \
+ --bootstrap-tools=$(bootstrap-tools) \
+ $$(case ,$(bootstrap-tools), in (*,gnulib,*) \
+ echo --gnulib-version=$(gnulib-version);; esac) \
+ --no-print-checksums \
+ $(addprefix --url-dir=, $(url_dir_list))
+
+.PHONY: release-commit
+release-commit:
+ $(AM_V_GEN)cd $(srcdir) \
+ && $(_build-aux)/do-release-commit-and-tag \
+ -C $(abs_builddir) $(RELEASE)
+
+## ---------------- ##
+## Updating files. ##
+## ---------------- ##
+
+ftp-gnu = ftp://ftp.gnu.org/gnu
+www-gnu = http://www.gnu.org
+
+upload_dest_dir_ ?= $(PACKAGE)
+upload_command = \
+ $(srcdir)/$(_build-aux)/gnupload $(GNUPLOADFLAGS) \
+ --to $(gnu_rel_host):$(upload_dest_dir_) \
+ $(rel-files)
+emit_upload_commands:
+ @echo =====================================
+ @echo =====================================
+ @echo '$(upload_command)'
+ @echo '# send the ~/announce-$(my_distdir) e-mail'
+ @echo =====================================
+ @echo =====================================
+
+.PHONY: upload
+upload:
+ $(AM_V_GEN)$(upload_command)
+
+define emit-commit-log
+ printf '%s\n' 'maint: post-release administrivia' '' \
+ '* NEWS: Add header line for next release.' \
+ '* .prev-version: Record previous version.' \
+ '* cfg.mk (old_NEWS_hash): Auto-update.'
+endef
+
+.PHONY: no-submodule-changes
+no-submodule-changes:
+ $(AM_V_GEN)if test -d $(srcdir)/.git \
+ && git --version >/dev/null 2>&1; then \
+ diff=$$(cd $(srcdir) && git submodule -q foreach \
+ git diff-index --name-only HEAD) \
+ || exit 1; \
+ case $$diff in '') ;; \
+ *) echo '$(ME): submodule files are locally modified:'; \
+ echo "$$diff"; exit 1;; esac; \
+ else \
+ : ; \
+ fi
+
+submodule-checks ?= no-submodule-changes public-submodule-commit
+
+# Ensure that each sub-module commit we're using is public.
+# Without this, it is too easy to tag and release code that
+# cannot be built from a fresh clone.
+.PHONY: public-submodule-commit
+public-submodule-commit:
+ $(AM_V_GEN)if test -d $(srcdir)/.git \
+ && git --version >/dev/null 2>&1; then \
+ cd $(srcdir) && \
+ git submodule --quiet foreach \
+ 'test "$$(git rev-parse "$$sha1")" \
+ = "$$(git merge-base origin "$$sha1")"' \
+ || { echo '$(ME): found non-public submodule commit' >&2; \
+ exit 1; }; \
+ else \
+ : ; \
+ fi
+# This rule has a high enough utility/cost ratio that it should be a
+# dependent of "check" by default. However, some of us do occasionally
+# commit a temporary change that deliberately points to a non-public
+# submodule commit, and want to be able to use rules like "make check".
+# In that case, run e.g., "make check gl_public_submodule_commit="
+# to disable this test.
+gl_public_submodule_commit ?= public-submodule-commit
+check: $(gl_public_submodule_commit)
+
+.PHONY: alpha beta stable release
+ALL_RECURSIVE_TARGETS += alpha beta stable
+alpha beta stable: $(local-check) writable-files $(submodule-checks)
+ $(AM_V_GEN)test $@ = stable \
+ && { echo $(VERSION) | grep -E '^[0-9]+(\.[0-9]+)+$$' \
+ || { echo "invalid version string: $(VERSION)" 1>&2; exit 1;};}\
+ || :
+ $(AM_V_at)$(MAKE) vc-diff-check
+ $(AM_V_at)$(MAKE) news-check
+ $(AM_V_at)$(MAKE) distcheck
+ $(AM_V_at)$(MAKE) dist
+ $(AM_V_at)$(MAKE) $(release-prep-hook) RELEASE_TYPE=$@
+ $(AM_V_at)$(MAKE) -s emit_upload_commands RELEASE_TYPE=$@
+
+release:
+ $(AM_V_GEN)$(MAKE) _version
+ $(AM_V_GEN)$(MAKE) $(release-type)
+
+# Override this in cfg.mk if you follow different procedures.
+release-prep-hook ?= release-prep
+
+gl_noteworthy_news_ = * Noteworthy changes in release ?.? (????-??-??) [?]
+.PHONY: release-prep
+release-prep:
+ $(AM_V_GEN)$(MAKE) --no-print-directory -s announcement \
+ > ~/announce-$(my_distdir)
+ $(AM_V_at)if test -d $(release_archive_dir); then \
+ ln $(rel-files) $(release_archive_dir); \
+ chmod a-w $(rel-files); \
+ fi
+ $(AM_V_at)echo $(VERSION) > $(prev_version_file)
+ $(AM_V_at)$(MAKE) update-NEWS-hash
+ $(AM_V_at)perl -pi \
+ -e '$$. == 3 and print "$(gl_noteworthy_news_)\n\n\n"' \
+ $(srcdir)/NEWS
+ $(AM_V_at)msg=$$($(emit-commit-log)) || exit 1; \
+ cd $(srcdir) && $(VC) commit -m "$$msg" -a
+
+# Override this with e.g., -s $(srcdir)/some_other_name.texi
+# if the default $(PACKAGE)-derived name doesn't apply.
+gendocs_options_ ?=
+
+.PHONY: web-manual
+web-manual:
+ $(AM_V_GEN)test -z "$(manual_title)" \
+ && { echo define manual_title in cfg.mk 1>&2; exit 1; } || :
+ $(AM_V_at)cd '$(srcdir)/doc'; \
+ $(SHELL) ../$(_build-aux)/gendocs.sh $(gendocs_options_) \
+ -o '$(abs_builddir)/doc/manual' \
+ --email $(PACKAGE_BUGREPORT) $(PACKAGE) \
+ "$(PACKAGE_NAME) - $(manual_title)"
+ $(AM_V_at)echo " *** Upload the doc/manual directory to web-cvs."
+
+.PHONY: web-manual-update
+web-manual-update:
+ $(AM_V_GEN)cd $(srcdir) \
+ && $(_build-aux)/gnu-web-doc-update -C $(abs_builddir)
+
+
+# Code Coverage
+
+init-coverage:
+ $(MAKE) $(AM_MAKEFLAGS) clean
+ lcov --directory . --zerocounters
+
+COVERAGE_CCOPTS ?= "-g --coverage"
+COVERAGE_OUT ?= doc/coverage
+
+build-coverage:
+ $(MAKE) $(AM_MAKEFLAGS) CFLAGS=$(COVERAGE_CCOPTS) CXXFLAGS=$(COVERAGE_CCOPTS)
+ $(MAKE) $(AM_MAKEFLAGS) CFLAGS=$(COVERAGE_CCOPTS) CXXFLAGS=$(COVERAGE_CCOPTS) check
+ mkdir -p $(COVERAGE_OUT)
+ lcov --directory . --output-file $(COVERAGE_OUT)/$(PACKAGE).info \
+ --capture
+
+gen-coverage:
+ genhtml --output-directory $(COVERAGE_OUT) \
+ $(COVERAGE_OUT)/$(PACKAGE).info \
+ --highlight --frames --legend \
+ --title "$(PACKAGE_NAME)"
+
+coverage: init-coverage build-coverage gen-coverage
+
+# Some projects carry local adjustments for gnulib modules via patches in
+# a gnulib patch directory whose default name is gl/ (defined in bootstrap
+# via local_gl_dir=gl). Those patches become stale as the originals evolve
+# in gnulib. Use this rule to refresh any stale patches. It applies each
+# patch to the original in $(gnulib_dir) and uses the temporary result to
+# generate a fuzz-free .diff file. If you customize the name of your local
+# gnulib patch directory via bootstrap.conf, this rule detects that name.
+# Run this from a non-VPATH (i.e., srcdir) build directory.
+.PHONY: refresh-gnulib-patches
+refresh-gnulib-patches:
+ gl=gl; \
+ if test -f bootstrap.conf; then \
+ t=$$(perl -lne '/^\s*local_gl_dir=(\S+)/ and $$d=$$1;' \
+ -e 'END{defined $$d and print $$d}' bootstrap.conf); \
+ test -n "$$t" && gl=$$t; \
+ fi; \
+ for diff in $$(cd $$gl; git ls-files | grep '\.diff$$'); do \
+ b=$$(printf %s "$$diff"|$(SED) 's/\.diff$$//'); \
+ VERSION_CONTROL=none \
+ patch "$(gnulib_dir)/$$b" "$$gl/$$diff" || exit 1; \
+ ( cd $(gnulib_dir) || exit 1; \
+ git diff "$$b" > "../$$gl/$$diff"; \
+ git checkout $$b ) || exit 1; \
+ done
+
+# Update gettext files.
+PACKAGE ?= $(shell basename $(PWD))
+PO_DOMAIN ?= $(PACKAGE)
+POURL = http://translationproject.org/latest/$(PO_DOMAIN)/
+PODIR ?= po
+refresh-po:
+ rm -f $(PODIR)/*.po && \
+ echo "$(ME): getting translations into po (please ignore the robots.txt ERROR 404)..." && \
+ wget --no-verbose --directory-prefix $(PODIR) --no-directories --recursive --level 1 --accept .po --accept .po.1 $(POURL) && \
+ echo 'en@boldquot' > $(PODIR)/LINGUAS && \
+ echo 'en@quot' >> $(PODIR)/LINGUAS && \
+ ls $(PODIR)/*.po | $(SED) 's/\.po//;s,$(PODIR)/,,' | \
+ sort >> $(PODIR)/LINGUAS
+
+ # Running indent once is not idempotent, but running it twice is.
+INDENT_SOURCES ?= $(C_SOURCES)
+.PHONY: indent
+indent:
+ indent $(INDENT_SOURCES)
+ indent $(INDENT_SOURCES)
+
+# If you want to set UPDATE_COPYRIGHT_* environment variables,
+# put the assignments in this variable.
+update-copyright-env ?=
+
+# Run this rule once per year (usually early in January)
+# to update all FSF copyright year lists in your project.
+# If you have an additional project-specific rule,
+# add it in cfg.mk along with a line 'update-copyright: prereq'.
+# By default, exclude all variants of COPYING; you can also
+# add exemptions (such as ChangeLog..* for rotated change logs)
+# in the file .x-update-copyright.
+.PHONY: update-copyright
+update-copyright:
+ $(AM_V_GEN)grep -l -w Copyright \
+ $$(export VC_LIST_EXCEPT_DEFAULT=COPYING && $(VC_LIST_EXCEPT)) \
+ | $(update-copyright-env) xargs $(srcdir)/$(_build-aux)/$@
+
+# This tight_scope test is skipped with a warning if $(_gl_TS_headers) is not
+# overridden and $(_gl_TS_dir)/Makefile.am does not mention noinst_HEADERS.
+
+# NOTE: to override any _gl_TS_* default value, you must
+# define the variable(s) using "export" in cfg.mk.
+_gl_TS_dir ?= src
+
+ALL_RECURSIVE_TARGETS += sc_tight_scope
+sc_tight_scope: tight-scope.mk
+ @fail=0; \
+ if ! grep '^ *export _gl_TS_headers *=' $(srcdir)/cfg.mk \
+ > /dev/null \
+ && ! grep -w noinst_HEADERS $(srcdir)/$(_gl_TS_dir)/Makefile.am \
+ > /dev/null 2>&1; then \
+ echo '$(ME): skipping $@'; \
+ else \
+ $(MAKE) -s -C $(_gl_TS_dir) \
+ -f Makefile \
+ -f $(abs_top_srcdir)/cfg.mk \
+ -f $(abs_top_builddir)/$< \
+ _gl_tight_scope \
+ || fail=1; \
+ fi; \
+ rm -f $<; \
+ exit $$fail
+
+tight-scope.mk: $(ME)
+ @rm -f $@ $@-t
+ @perl -ne '/^# TS-start/.../^# TS-end/ and print' $(srcdir)/$(ME) > $@-t
+ @chmod a=r $@-t && mv $@-t $@
+
+ifeq (a,b)
+# TS-start
+
+# Most functions should have static scope.
+# Any that don't must be marked with 'extern', but 'main'
+# and 'usage' are exceptions: they're always extern, but
+# do not need to be marked. Symbols matching '__.*' are
+# reserved by the compiler, so are automatically excluded below.
+_gl_TS_unmarked_extern_functions ?= main usage
+_gl_TS_function_match ?= /^(?:$(_gl_TS_extern)) +.*?(\w+) *\(/
+
+# If your project uses a macro like "XTERN", then put
+# the following in cfg.mk to override this default:
+# export _gl_TS_extern = extern|XTERN
+_gl_TS_extern ?= extern
+
+# The second nm|grep checks for file-scope variables with 'extern' scope.
+# Without gnulib's progname module, you might put program_name here.
+# Symbols matching '__.*' are reserved by the compiler,
+# so are automatically excluded below.
+_gl_TS_unmarked_extern_vars ?=
+
+# NOTE: the _match variables are perl expressions -- not mere regular
+# expressions -- so that you can extend them to match other patterns
+# and easily extract matched variable names.
+# For example, if your project declares some global variables via
+# a macro like this: GLOBAL(type, var_name, initializer), then you
+# can override this definition to automatically extract those names:
+# export _gl_TS_var_match = \
+# /^(?:$(_gl_TS_extern)) .*?\**(\w+)(\[.*?\])?;/ || /\bGLOBAL\(.*?,\s*(.*?),/
+_gl_TS_var_match ?= /^(?:$(_gl_TS_extern)) .*?(\w+)(\[.*?\])?;/
+
+# The names of object files in (or relative to) $(_gl_TS_dir).
+_gl_TS_obj_files ?= *.$(OBJEXT)
+
+# Files in which to search for the one-line style extern declarations.
+# $(_gl_TS_dir)-relative.
+_gl_TS_headers ?= $(noinst_HEADERS)
+_gl_TS_other_headers ?= *.h
+
+.PHONY: _gl_tight_scope
+_gl_tight_scope: $(bin_PROGRAMS)
+ sed_wrap='s/^/^_?/;s/$$/$$/'; \
+ t=exceptions-$$$$; \
+ trap 's=$$?; rm -f $$t; exit $$s' 0; \
+ for sig in 1 2 3 13 15; do \
+ eval "trap 'v=`expr $$sig + 128`; (exit $$v); exit $$v' $$sig"; \
+ done; \
+ src=`for f in $(SOURCES); do \
+ test -f $$f && d= || d=$(srcdir)/; echo $$d$$f; done`; \
+ hdr=`for f in $(_gl_TS_headers); do \
+ test -f $$f && d= || d=$(srcdir)/; echo $$d$$f; done`; \
+ ( printf '%s\n' '__.*' $(_gl_TS_unmarked_extern_functions); \
+ grep -h -A1 '^extern .*[^;]$$' $$src \
+ | grep -vE '^(extern |--|#)' | $(SED) 's/ .*//; /^$$/d'; \
+ perl -lne \
+ '$(_gl_TS_function_match) and print $$1' $$hdr; \
+ ) | sort -u | $(SED) "$$sed_wrap" > $$t; \
+ nm -g $(_gl_TS_obj_files)|$(SED) -n 's/.* T //p'|grep -Ev -f $$t \
+ && { echo the above functions should have static scope >&2; \
+ exit 1; } || : ; \
+ ( printf '%s\n' '__.*' main $(_gl_TS_unmarked_extern_vars); \
+ perl -lne '$(_gl_TS_var_match) and print $$1' \
+ $$hdr $(_gl_TS_other_headers) \
+ ) | sort -u | $(SED) "$$sed_wrap" > $$t; \
+ nm -g $(_gl_TS_obj_files) | $(SED) -n 's/.* [BCDGRS] //p' \
+ | sort -u | grep -Ev -f $$t \
+ && { echo the above variables should have static scope >&2; \
+ exit 1; } || :
+# TS-end
+endif
diff --git a/po/ChangeLog b/po/ChangeLog-2014
index 0042d6f..1f6a092 100644
--- a/po/ChangeLog
+++ b/po/ChangeLog-2014
@@ -20,7 +20,7 @@
* po/it.po: updated
* po/sed.pot: likewise.
-
+
2000-12-10 Paolo Bonzini <bonzini@gnu.org>
* po/it.po: Italian translation reviewed for new POT file.
diff --git a/po/LINGUAS b/po/LINGUAS
index 63f4f02..c8c5e4e 100644
--- a/po/LINGUAS
+++ b/po/LINGUAS
@@ -1,5 +1,6 @@
af
ast
+bg
ca
cs
da
diff --git a/po/Makefile.in.in b/po/Makefile.in.in
index be0ca59..65184f6 100644
--- a/po/Makefile.in.in
+++ b/po/Makefile.in.in
@@ -1,7 +1,5 @@
-# -*- buffer-read-only: t -*- vi: set ro:
-# DO NOT EDIT! GENERATED AUTOMATICALLY!
# Makefile for PO directory in any package using GNU gettext.
-# Copyright (C) 1995-1997, 2000-2007 by Ulrich Drepper <drepper@gnu.ai.mit.edu>
+# Copyright (C) 1995-1997, 2000-2007, 2009-2010 by Ulrich Drepper <drepper@gnu.ai.mit.edu>
#
# This file can be copied and used freely without restrictions. It can
# be used in projects which are not available under the GNU General Public
@@ -10,13 +8,14 @@
# Please note that the actual code of GNU gettext is covered by the GNU
# General Public License and is *not* in the public domain.
#
-# Origin: gettext-0.17
-GETTEXT_MACRO_VERSION = 0.17
+# Origin: gettext-0.19
+GETTEXT_MACRO_VERSION = 0.19
PACKAGE = @PACKAGE@
VERSION = @VERSION@
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+SED = @SED@
SHELL = /bin/sh
@SET_MAKE@
@@ -78,6 +77,16 @@ POTFILES = \
CATALOGS = @CATALOGS@
+POFILESDEPS_ = $(srcdir)/$(DOMAIN).pot
+POFILESDEPS_yes = $(POFILESDEPS_)
+POFILESDEPS_no =
+POFILESDEPS = $(POFILESDEPS_$(PO_DEPENDS_ON_POT))
+
+DISTFILESDEPS_ = update-po
+DISTFILESDEPS_yes = $(DISTFILESDEPS_)
+DISTFILESDEPS_no =
+DISTFILESDEPS = $(DISTFILESDEPS_$(DIST_DEPENDS_ON_UPDATE_PO))
+
# Makevars gets inserted here. (Don't remove this line!)
.SUFFIXES:
@@ -90,22 +99,22 @@ CATALOGS = @CATALOGS@
.po.gmo:
@lang=`echo $* | sed -e 's,.*/,,'`; \
test "$(srcdir)" = . && cdcmd="" || cdcmd="cd $(srcdir) && "; \
- echo "$${cdcmd}rm -f $${lang}.gmo && $(GMSGFMT) -c --statistics -o $${lang}.gmo $${lang}.po"; \
- cd $(srcdir) && rm -f $${lang}.gmo && $(GMSGFMT) -c --statistics -o t-$${lang}.gmo $${lang}.po && mv t-$${lang}.gmo $${lang}.gmo
+ echo "$${cdcmd}rm -f $${lang}.gmo && $(GMSGFMT) -c --statistics --verbose -o $${lang}.gmo $${lang}.po"; \
+ cd $(srcdir) && rm -f $${lang}.gmo && $(GMSGFMT) -c --statistics --verbose -o t-$${lang}.gmo $${lang}.po && mv t-$${lang}.gmo $${lang}.gmo
.sin.sed:
sed -e '/^#/d' $< > t-$@
mv t-$@ $@
-all: check-macro-version all-@USE_NLS@
+all: all-@USE_NLS@
all-yes: stamp-po
all-no:
# Ensure that the gettext macros and this Makefile.in.in are in sync.
-check-macro-version:
- @test "$(GETTEXT_MACRO_VERSION)" = "@GETTEXT_MACRO_VERSION@" \
+CHECK_MACRO_VERSION = \
+ test "$(GETTEXT_MACRO_VERSION)" = "@GETTEXT_MACRO_VERSION@" \
|| { echo "*** error: gettext infrastructure mismatch: using a Makefile.in.in from gettext version $(GETTEXT_MACRO_VERSION) but the autoconf macros are from gettext version @GETTEXT_MACRO_VERSION@" 1>&2; \
exit 1; \
}
@@ -125,6 +134,7 @@ check-macro-version:
# $(POFILES) has been designed to not touch files that don't need to be
# changed.
stamp-po: $(srcdir)/$(DOMAIN).pot
+ @$(CHECK_MACRO_VERSION)
test ! -f $(srcdir)/$(DOMAIN).pot || \
test -z "$(GMOFILES)" || $(MAKE) $(GMOFILES)
@test ! -f $(srcdir)/$(DOMAIN).pot || { \
@@ -139,11 +149,29 @@ stamp-po: $(srcdir)/$(DOMAIN).pot
# This target rebuilds $(DOMAIN).pot; it is an expensive operation.
# Note that $(DOMAIN).pot is not touched if it doesn't need to be changed.
+# The determination of whether the package xyz is a GNU one is based on the
+# heuristic whether some file in the top level directory mentions "GNU xyz".
+# If GNU 'find' is available, we avoid grepping through monster files.
$(DOMAIN).pot-update: $(POTFILES) $(srcdir)/POTFILES.in remove-potcdate.sed
- if LC_ALL=C grep 'GNU @PACKAGE@' $(top_srcdir)/* 2>/dev/null | grep -v 'libtool:' >/dev/null; then \
- package_gnu='GNU '; \
+ package_gnu="$(PACKAGE_GNU)"; \
+ test -n "$$package_gnu" || { \
+ if { if (LC_ALL=C find --version) 2>/dev/null | grep GNU >/dev/null; then \
+ LC_ALL=C find -L $(top_srcdir) -maxdepth 1 -type f \
+ -size -10000000c -exec grep 'GNU @PACKAGE@' \
+ /dev/null '{}' ';' 2>/dev/null; \
+ else \
+ LC_ALL=C grep 'GNU @PACKAGE@' $(top_srcdir)/* 2>/dev/null; \
+ fi; \
+ } | grep -v 'libtool:' >/dev/null; then \
+ package_gnu=yes; \
+ else \
+ package_gnu=no; \
+ fi; \
+ }; \
+ if test "$$package_gnu" = "yes"; then \
+ package_prefix='GNU '; \
else \
- package_gnu=''; \
+ package_prefix=''; \
fi; \
if test -n '$(MSGID_BUGS_ADDRESS)' || test '$(PACKAGE_BUGREPORT)' = '@'PACKAGE_BUGREPORT'@'; then \
msgid_bugs_address='$(MSGID_BUGS_ADDRESS)'; \
@@ -163,7 +191,7 @@ $(DOMAIN).pot-update: $(POTFILES) $(srcdir)/POTFILES.in remove-potcdate.sed
--add-comments=TRANSLATORS: $(XGETTEXT_OPTIONS) @XGETTEXT_EXTRA_OPTIONS@ \
--files-from=$(srcdir)/POTFILES.in \
--copyright-holder='$(COPYRIGHT_HOLDER)' \
- --package-name="$${package_gnu}@PACKAGE@" \
+ --package-name="$${package_prefix}@PACKAGE@" \
--package-version='@VERSION@' \
--msgid-bugs-address="$$msgid_bugs_address" \
;; \
@@ -191,12 +219,20 @@ $(srcdir)/$(DOMAIN).pot:
# This target rebuilds a PO file if $(DOMAIN).pot has changed.
# Note that a PO file is not touched if it doesn't need to be changed.
-$(POFILES): $(srcdir)/$(DOMAIN).pot
+$(POFILES): $(POFILESDEPS)
@lang=`echo $@ | sed -e 's,.*/,,' -e 's/\.po$$//'`; \
if test -f "$(srcdir)/$${lang}.po"; then \
+ test -f $(srcdir)/$(DOMAIN).pot || $(MAKE) $(srcdir)/$(DOMAIN).pot; \
test "$(srcdir)" = . && cdcmd="" || cdcmd="cd $(srcdir) && "; \
- echo "$${cdcmd}$(MSGMERGE_UPDATE) $${lang}.po $(DOMAIN).pot"; \
- cd $(srcdir) && $(MSGMERGE_UPDATE) $${lang}.po $(DOMAIN).pot; \
+ echo "$${cdcmd}$(MSGMERGE_UPDATE) $(MSGMERGE_OPTIONS) --lang=$${lang} $${lang}.po $(DOMAIN).pot"; \
+ cd $(srcdir) \
+ && { case `$(MSGMERGE_UPDATE) --version | sed 1q | sed -e 's,^[^0-9]*,,'` in \
+ '' | 0.[0-9] | 0.[0-9].* | 0.1[0-7] | 0.1[0-7].*) \
+ $(MSGMERGE_UPDATE) $(MSGMERGE_OPTIONS) $${lang}.po $(DOMAIN).pot;; \
+ *) \
+ $(MSGMERGE_UPDATE) $(MSGMERGE_OPTIONS) --lang=$${lang} $${lang}.po $(DOMAIN).pot;; \
+ esac; \
+ }; \
else \
$(MAKE) $${lang}.po-create; \
fi
@@ -219,7 +255,6 @@ install-data: install-data-@USE_NLS@
fi
install-data-no: all
install-data-yes: all
- $(mkdir_p) $(DESTDIR)$(datadir)
@catalogs='$(CATALOGS)'; \
for cat in $$catalogs; do \
cat=`basename $$cat`; \
@@ -271,7 +306,6 @@ installdirs-data: installdirs-data-@USE_NLS@
fi
installdirs-data-no:
installdirs-data-yes:
- $(mkdir_p) $(DESTDIR)$(datadir)
@catalogs='$(CATALOGS)'; \
for cat in $$catalogs; do \
cat=`basename $$cat`; \
@@ -349,7 +383,7 @@ maintainer-clean: distclean
distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir)
dist distdir:
- $(MAKE) update-po
+ test -z "$(DISTFILESDEPS)" || $(MAKE) $(DISTFILESDEPS)
@$(MAKE) dist2
# This is a separate target because 'update-po' must be executed before.
dist2: stamp-po $(DISTFILES)
@@ -397,9 +431,15 @@ update-po: Makefile
tmpdir=`pwd`; \
echo "$$lang:"; \
test "$(srcdir)" = . && cdcmd="" || cdcmd="cd $(srcdir) && "; \
- echo "$${cdcmd}$(MSGMERGE) $$lang.po $(DOMAIN).pot -o $$lang.new.po"; \
+ echo "$${cdcmd}$(MSGMERGE) $(MSGMERGE_OPTIONS) --lang=$$lang $$lang.po $(DOMAIN).pot -o $$lang.new.po"; \
cd $(srcdir); \
- if $(MSGMERGE) $$lang.po $(DOMAIN).pot -o $$tmpdir/$$lang.new.po; then \
+ if { case `$(MSGMERGE) --version | sed 1q | sed -e 's,^[^0-9]*,,'` in \
+ '' | 0.[0-9] | 0.[0-9].* | 0.1[0-7] | 0.1[0-7].*) \
+ $(MSGMERGE) $(MSGMERGE_OPTIONS) -o $$tmpdir/$$lang.new.po $$lang.po $(DOMAIN).pot;; \
+ *) \
+ $(MSGMERGE) $(MSGMERGE_OPTIONS) --lang=$$lang -o $$tmpdir/$$lang.new.po $$lang.po $(DOMAIN).pot;; \
+ esac; \
+ }; then \
if cmp $$lang.po $$tmpdir/$$lang.new.po >/dev/null 2>&1; then \
rm -f $$tmpdir/$$lang.new.po; \
else \
@@ -420,9 +460,13 @@ $(DUMMYPOFILES):
update-gmo: Makefile $(GMOFILES)
@:
+# Recreate Makefile by invoking config.status. Explicitly invoke the shell,
+# because execution permission bits may not work on the current file system.
+# Use @SHELL@, which is the shell determined by autoconf for the use by its
+# scripts, not $(SHELL) which is hardwired to /bin/sh and may be deficient.
Makefile: Makefile.in.in Makevars $(top_builddir)/config.status @POMAKEFILEDEPS@
cd $(top_builddir) \
- && $(SHELL) ./config.status $(subdir)/$@.in po-directories
+ && @SHELL@ ./config.status $(subdir)/$@.in po-directories
force:
diff --git a/po/Makevars b/po/Makevars
index c026e13..b3c263c 100644
--- a/po/Makevars
+++ b/po/Makevars
@@ -1,5 +1,3 @@
-# -*- buffer-read-only: t -*- vi: set ro:
-# DO NOT EDIT! GENERATED AUTOMATICALLY!
# Makefile variables for PO directory in any package using GNU gettext.
# Usually the message domain is the same as the package name.
@@ -11,16 +9,19 @@ top_builddir = ..
# These options get passed to xgettext.
XGETTEXT_OPTIONS = --keyword=_ --keyword=N_ \
- \
+ \
--flag=_:1:pass-c-format\
--flag=N_:1:pass-c-format\
--flag=error:3:c-format --flag=error_at_line:5:c-format\
\
- --from-code=UTF-8\
- --flag=asprintf:2:c-format --flag=vasprintf:2:c-format\
- --flag=asnprintf:3:c-format --flag=vasnprintf:3:c-format\
+ --flag=asnprintf:3:c-format\
+ --flag=asprintf:2:c-format\
+ --flag=error:3:c-format\
+ --flag=error_at_line:5:c-format\
+ --flag=vasnprintf:3:c-format\
+ --flag=vasprintf:2:c-format\
--flag=wrapf:1:c-format\
- --flag=error:3:c-format --flag=error_at_line:5:c-format\
+ --from-code=UTF-8\
$${end_of_xgettext_options+}
# This is the copyright holder that gets inserted into the header of the
@@ -33,6 +34,13 @@ XGETTEXT_OPTIONS = --keyword=_ --keyword=N_ \
# their copyright.
COPYRIGHT_HOLDER = Free Software Foundation, Inc.
+# This tells whether or not to prepend "GNU " prefix to the package
+# name that gets inserted into the header of the $(DOMAIN).pot file.
+# Possible values are "yes", "no", or empty. If it is empty, try to
+# detect it automatically by scanning the files in $(top_srcdir) for
+# "GNU packagename" string.
+PACKAGE_GNU =
+
# This is the email address or URL to which the translators shall report
# bugs in the untranslated strings:
# - Strings which are not entire sentences, see the maintainer guidelines
@@ -52,3 +60,27 @@ MSGID_BUGS_ADDRESS = bug-gnu-utils@gnu.org
# This is the list of locale categories, beyond LC_MESSAGES, for which the
# message catalogs shall be used. It is usually empty.
EXTRA_LOCALE_CATEGORIES =
+
+# This tells whether the $(DOMAIN).pot file contains messages with an 'msgctxt'
+# context. Possible values are "yes" and "no". Set this to yes if the
+# package uses functions taking also a message context, like pgettext(), or
+# if in $(XGETTEXT_OPTIONS) you define keywords with a context argument.
+USE_MSGCTXT = no
+
+# These options get passed to msgmerge.
+# Useful options are in particular:
+# --previous to keep previous msgids of translated messages,
+# --quiet to reduce the verbosity.
+MSGMERGE_OPTIONS =
+
+# This tells whether or not to regenerate a PO file when $(DOMAIN).pot
+# has changed. Possible values are "yes" and "no". Set this to no if
+# the POT file is checked in the repository and the version control
+# program ignores timestamps.
+PO_DEPENDS_ON_POT = yes
+
+# This tells whether or not to forcibly update $(DOMAIN).pot and
+# regenerate PO files on "make dist". Possible values are "yes" and
+# "no". Set this to no if the POT file and PO files are maintained
+# externally.
+DIST_DEPENDS_ON_UPDATE_PO = yes
diff --git a/po/POTFILES.in b/po/POTFILES.in
index a725149..238507a 100644
--- a/po/POTFILES.in
+++ b/po/POTFILES.in
@@ -1,8 +1,16 @@
+lib/closeout.c
+lib/copy-acl.c
+lib/dfa.c
+lib/error.c
+lib/getopt.c
+lib/obstack.c
+lib/quotearg.c
+lib/regcomp.c
+lib/set-acl.c
+lib/version-etc.c
+lib/xalloc-die.c
sed/compile.c
sed/execute.c
sed/regexp.c
sed/sed.c
sed/utils.c
-lib/regcomp.c
-lib/regexec.c
-lib/regex_internal.c
diff --git a/po/Rules-quot b/po/Rules-quot
index 9c2a995..7b92c7e 100644
--- a/po/Rules-quot
+++ b/po/Rules-quot
@@ -1,3 +1,4 @@
+# This file, Rules-quot, can be copied and used freely without restrictions.
# Special Makefile rules for English message catalogs with quotation marks.
DISTFILES.common.extra1 = quot.sed boldquot.sed en@quot.header en@boldquot.header insert-header.sin Rules-quot
@@ -14,13 +15,23 @@ en@boldquot.po-update: en@boldquot.po-update-en
.insert-header.po-update-en:
@lang=`echo $@ | sed -e 's/\.po-update-en$$//'`; \
- if test "$(PACKAGE)" = "gettext"; then PATH=`pwd`/../src:$$PATH; GETTEXTLIBDIR=`cd $(top_srcdir)/src && pwd`; export GETTEXTLIBDIR; fi; \
+ if test "$(PACKAGE)" = "gettext-tools"; then PATH=`pwd`/../src:$$PATH; GETTEXTLIBDIR=`cd $(top_srcdir)/src && pwd`; export GETTEXTLIBDIR; fi; \
tmpdir=`pwd`; \
echo "$$lang:"; \
ll=`echo $$lang | sed -e 's/@.*//'`; \
LC_ALL=C; export LC_ALL; \
cd $(srcdir); \
- if $(MSGINIT) -i $(DOMAIN).pot --no-translator -l $$ll -o - 2>/dev/null | sed -f $$tmpdir/$$lang.insert-header | $(MSGCONV) -t UTF-8 | $(MSGFILTER) sed -f `echo $$lang | sed -e 's/.*@//'`.sed 2>/dev/null > $$tmpdir/$$lang.new.po; then \
+ if $(MSGINIT) -i $(DOMAIN).pot --no-translator -l $$lang -o - 2>/dev/null \
+ | $(SED) -f $$tmpdir/$$lang.insert-header | $(MSGCONV) -t UTF-8 | \
+ { case `$(MSGFILTER) --version | sed 1q | sed -e 's,^[^0-9]*,,'` in \
+ '' | 0.[0-9] | 0.[0-9].* | 0.1[0-8] | 0.1[0-8].*) \
+ $(MSGFILTER) $(SED) -f `echo $$lang | sed -e 's/.*@//'`.sed \
+ ;; \
+ *) \
+ $(MSGFILTER) `echo $$lang | sed -e 's/.*@//'` \
+ ;; \
+ esac } 2>/dev/null > $$tmpdir/$$lang.new.po \
+ ; then \
if cmp $$lang.po $$tmpdir/$$lang.new.po >/dev/null 2>&1; then \
rm -f $$tmpdir/$$lang.new.po; \
else \
diff --git a/po/af.gmo b/po/af.gmo
index ba09e02..4561f72 100644
--- a/po/af.gmo
+++ b/po/af.gmo
Binary files differ
diff --git a/po/af.po b/po/af.po
index 1afb52d..58d6405 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: 2012-12-22 14:36+0100\n"
+"POT-Creation-Date: 2016-12-30 00:59-0800\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"
@@ -15,239 +15,618 @@ msgstr ""
"MIME-Version: 1.0\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"
-#: sed/compile.c:144
+#: lib/closeout.c:112
+msgid "write error"
+msgstr ""
+
+#: lib/copy-acl.c:54
+#, c-format
+msgid "preserving permissions for %s"
+msgstr ""
+
+#: lib/dfa.c:1025 lib/dfa.c:1028 lib/dfa.c:1047 lib/dfa.c:1057 lib/dfa.c:1070
+#: lib/dfa.c:1098 lib/dfa.c:1107 lib/dfa.c:1110 lib/dfa.c:1115 lib/dfa.c:1137
+#: lib/dfa.c:1140
+msgid "unbalanced ["
+msgstr ""
+
+#: lib/dfa.c:1083
+#, fuzzy
+msgid "invalid character class"
+msgstr "Ongeldige karakterklasnaam"
+
+#: lib/dfa.c:1206
+msgid "character class syntax is [[:space:]], not [:space:]"
+msgstr ""
+
+#: lib/dfa.c:1275
+msgid "unfinished \\ escape"
+msgstr ""
+
+#: lib/dfa.c:1436
+#, fuzzy
+msgid "invalid content of \\{\\}"
+msgstr "Ongeldige inhoud binne \\{\\}"
+
+#: lib/dfa.c:1439
+#, fuzzy
+msgid "regular expression too big"
+msgstr "Regex te groot"
+
+#: lib/dfa.c:1853
+msgid "unbalanced ("
+msgstr ""
+
+#: lib/dfa.c:1980
+msgid "no syntax specified"
+msgstr ""
+
+#: lib/dfa.c:1988
+msgid "unbalanced )"
+msgstr ""
+
+#: lib/error.c:191
+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 ""
+
+#: lib/getopt.c:654 lib/getopt.c:658
+#, c-format
+msgid "%s: option '--%s' doesn't allow an argument\n"
+msgstr ""
+
+#: 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:715 lib/getopt.c:734
+#, c-format
+msgid "%s: option '--%s' requires an argument\n"
+msgstr ""
+
+#: 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
+#, 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
+#, 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 "Geheue uitgeput"
+
+#. TRANSLATORS:
+#. Get translations for open and closing quotation marks.
+#. The message catalog should translate "`" to a left
+#. quotation mark suitable for the locale, and similarly for
+#. "'". For example, a French Unicode local should translate
+#. these to U+00AB (LEFT-POINTING DOUBLE ANGLE
+#. QUOTATION MARK), and U+00BB (RIGHT-POINTING DOUBLE ANGLE
+#. QUOTATION MARK), respectively.
+#.
+#. If the catalog has no translation, we will try to
+#. use Unicode U+2018 (LEFT SINGLE QUOTATION MARK) and
+#. Unicode U+2019 (RIGHT SINGLE QUOTATION MARK). If the
+#. current locale is not Unicode, locale_quoting_style
+#. will quote 'like this', and clocale_quoting_style will
+#. quote "like this". You should always include translations
+#. for "`" and "'" even if U+2018 and U+2019 are appropriate
+#. for your locale.
+#.
+#. If you don't know what to put here, please see
+#. <http://en.wikipedia.org/wiki/Quotation_marks_in_other_languages>
+#. and use glyphs suitable for your language.
+#: lib/quotearg.c:354
+msgid "`"
+msgstr ""
+
+#: lib/quotearg.c:355
+msgid "'"
+msgstr ""
+
+#: lib/regcomp.c:135
+msgid "Success"
+msgstr "Sukses"
+
+#: lib/regcomp.c:138
+msgid "No match"
+msgstr "Geen paring"
+
+#: lib/regcomp.c:141
+msgid "Invalid regular expression"
+msgstr "Ongeldige regex"
+
+#: lib/regcomp.c:144
+msgid "Invalid collation character"
+msgstr "Ongeldige kollasiekarakter"
+
+#: lib/regcomp.c:147
+msgid "Invalid character class name"
+msgstr "Ongeldige karakterklasnaam"
+
+#: lib/regcomp.c:150
+msgid "Trailing backslash"
+msgstr "Sleep terugstreep"
+
+#: lib/regcomp.c:153
+msgid "Invalid back reference"
+msgstr "Ongeldige terugverwysing"
+
+#: lib/regcomp.c:156
+#, fuzzy
+msgid "Unmatched [, [^, [:, [., or [="
+msgstr "Ongepaarde [ of [^"
+
+#: lib/regcomp.c:159
+msgid "Unmatched ( or \\("
+msgstr "Ongepaarde ( or \\("
+
+#: lib/regcomp.c:162
+msgid "Unmatched \\{"
+msgstr "Ongepaarde \\{"
+
+#: lib/regcomp.c:165
+msgid "Invalid content of \\{\\}"
+msgstr "Ongeldige inhoud binne \\{\\}"
+
+#: lib/regcomp.c:168
+msgid "Invalid range end"
+msgstr "Ongeldige bereikseinde"
+
+#: lib/regcomp.c:171
+msgid "Memory exhausted"
+msgstr "Geheue uitgeput"
+
+#: lib/regcomp.c:174
+msgid "Invalid preceding regular expression"
+msgstr "Ongeldige vorige regex"
+
+#: lib/regcomp.c:177
+msgid "Premature end of regular expression"
+msgstr "Premature einde vir regex"
+
+#: lib/regcomp.c:180
+msgid "Regular expression too big"
+msgstr "Regex te groot"
+
+#: lib/regcomp.c:183
+msgid "Unmatched ) or \\)"
+msgstr "Ongepaarde ) of \\)"
+
+#: lib/regcomp.c:687
+msgid "No previous regular expression"
+msgstr "Geen vorige regex nie"
+
+#: lib/set-acl.c:46
+#, c-format
+msgid "setting permissions for %s"
+msgstr ""
+
+#: lib/version-etc.c:74
+#, c-format
+msgid "Packaged by %s (%s)\n"
+msgstr ""
+
+#: lib/version-etc.c:77
+#, c-format
+msgid "Packaged by %s\n"
+msgstr ""
+
+#. 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 ""
+
+#: lib/version-etc.c:86
+msgid ""
+"\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"
+msgstr ""
+
+#. TRANSLATORS: %s denotes an author name.
+#: lib/version-etc.c:102
+#, c-format
+msgid "Written by %s.\n"
+msgstr ""
+
+#. TRANSLATORS: Each %s denotes an author name.
+#: lib/version-etc.c:106
+#, c-format
+msgid "Written by %s and %s.\n"
+msgstr ""
+
+#. TRANSLATORS: Each %s denotes an author name.
+#: lib/version-etc.c:110
+#, c-format
+msgid "Written by %s, %s, and %s.\n"
+msgstr ""
+
+#. TRANSLATORS: Each %s denotes an author name.
+#. You can use line breaks, estimating that each author name occupies
+#. ca. 16 screen columns and that a screen line has ca. 80 columns.
+#: lib/version-etc.c:117
+#, c-format
+msgid ""
+"Written by %s, %s, %s,\n"
+"and %s.\n"
+msgstr ""
+
+#. TRANSLATORS: Each %s denotes an author name.
+#. You can use line breaks, estimating that each author name occupies
+#. ca. 16 screen columns and that a screen line has ca. 80 columns.
+#: lib/version-etc.c:124
+#, c-format
+msgid ""
+"Written by %s, %s, %s,\n"
+"%s, and %s.\n"
+msgstr ""
+
+#. TRANSLATORS: Each %s denotes an author name.
+#. You can use line breaks, estimating that each author name occupies
+#. ca. 16 screen columns and that a screen line has ca. 80 columns.
+#: lib/version-etc.c:131
+#, c-format
+msgid ""
+"Written by %s, %s, %s,\n"
+"%s, %s, and %s.\n"
+msgstr ""
+
+#. TRANSLATORS: Each %s denotes an author name.
+#. You can use line breaks, estimating that each author name occupies
+#. ca. 16 screen columns and that a screen line has ca. 80 columns.
+#: lib/version-etc.c:139
+#, c-format
+msgid ""
+"Written by %s, %s, %s,\n"
+"%s, %s, %s, and %s.\n"
+msgstr ""
+
+#. TRANSLATORS: Each %s denotes an author name.
+#. You can use line breaks, estimating that each author name occupies
+#. ca. 16 screen columns and that a screen line has ca. 80 columns.
+#: lib/version-etc.c:147
+#, c-format
+msgid ""
+"Written by %s, %s, %s,\n"
+"%s, %s, %s, %s,\n"
+"and %s.\n"
+msgstr ""
+
+#. TRANSLATORS: Each %s denotes an author name.
+#. You can use line breaks, estimating that each author name occupies
+#. ca. 16 screen columns and that a screen line has ca. 80 columns.
+#: lib/version-etc.c:156
+#, c-format
+msgid ""
+"Written by %s, %s, %s,\n"
+"%s, %s, %s, %s,\n"
+"%s, and %s.\n"
+msgstr ""
+
+#. TRANSLATORS: Each %s denotes an author name.
+#. You can use line breaks, estimating that each author name occupies
+#. ca. 16 screen columns and that a screen line has ca. 80 columns.
+#: lib/version-etc.c:167
+#, c-format
+msgid ""
+"Written by %s, %s, %s,\n"
+"%s, %s, %s, %s,\n"
+"%s, %s, and others.\n"
+msgstr ""
+
+#. TRANSLATORS: The placeholder indicates the bug-reporting address
+#. for this package. Please add _another line_ saying
+#. "Report translation bugs to <...>\n" with the address for translation
+#. bugs (typically your translation team's web or email address).
+#: lib/version-etc.c:245
+#, c-format
+msgid ""
+"\n"
+"Report bugs to: %s\n"
+msgstr ""
+
+#: lib/version-etc.c:247
+#, c-format
+msgid "Report %s bugs to: %s\n"
+msgstr ""
+
+#: lib/version-etc.c:251
+#, c-format
+msgid "%s home page: <%s>\n"
+msgstr ""
+
+#: lib/version-etc.c:253
+#, c-format
+msgid "%s home page: <http://www.gnu.org/software/%s/>\n"
+msgstr ""
+
+#: lib/version-etc.c:256
+msgid "General help using GNU software: <http://www.gnu.org/gethelp/>\n"
+msgstr ""
+
+#: sed/compile.c:146
#, fuzzy
msgid "multiple `!'s"
msgstr "Meervoudige `!'s"
-#: sed/compile.c:145
+#: sed/compile.c:147
#, fuzzy
msgid "unexpected `,'"
msgstr "Onverwagte `,'"
-#: sed/compile.c:146
+#: sed/compile.c:149
#, fuzzy
msgid "invalid usage of +N or ~N as first address"
msgstr "Kan nie +N or ~N as die eerste adres gebruik nie"
-#: sed/compile.c:147
+#: sed/compile.c:150
#, fuzzy
msgid "unmatched `{'"
msgstr "Ongepaarde `{'"
-#: sed/compile.c:148
+#: sed/compile.c:151
#, fuzzy
msgid "unexpected `}'"
msgstr "Onverwagte `}'"
-#: sed/compile.c:149
+#: sed/compile.c:153
#, fuzzy
msgid "extra characters after command"
msgstr "Ekstra karakters na instruksie"
-#: sed/compile.c:150
+#: sed/compile.c:155
#, fuzzy
msgid "expected \\ after `a', `c' or `i'"
msgstr "Het \\ na `a', `c' or `i' verwag"
-#: sed/compile.c:151
+#: sed/compile.c:157
msgid "`}' doesn't want any addresses"
msgstr "`}' soek nie 'n adres nie"
-#: sed/compile.c:152
+#: sed/compile.c:159
msgid ": doesn't want any addresses"
msgstr ": soek nie 'n adres nie"
-#: sed/compile.c:153
+#: sed/compile.c:161
#, fuzzy
msgid "comments don't accept any addresses"
msgstr "Kommentare aanvaar nie adresse nie"
-#: sed/compile.c:154
+#: sed/compile.c:162
#, fuzzy
msgid "missing command"
msgstr "Vermiste instruksie"
-#: sed/compile.c:155
+#: sed/compile.c:163
#, fuzzy
msgid "command only uses one address"
msgstr "Instruksie gebruik slegs een adres"
-#: sed/compile.c:156
+#: sed/compile.c:164
#, fuzzy
msgid "unterminated address regex"
msgstr "Ongetermineerde adresregex"
-#: sed/compile.c:157
+#: sed/compile.c:165
#, fuzzy
msgid "unterminated `s' command"
msgstr "Ongetermineerde `s' instruksie"
-#: sed/compile.c:158
+#: sed/compile.c:166
#, fuzzy
msgid "unterminated `y' command"
msgstr "Ongetermineerde `y' instruksie"
-#: sed/compile.c:159
+#: sed/compile.c:167
#, fuzzy
msgid "unknown option to `s'"
msgstr "Onbekende opsie vir `s'"
-#: sed/compile.c:160
+#: sed/compile.c:169
msgid "multiple `p' options to `s' command"
msgstr "meervoudige `p' opsies vir `s' instruksie"
-#: sed/compile.c:161
+#: sed/compile.c:171
msgid "multiple `g' options to `s' command"
msgstr "meervoudige `g' opsies vir `s' instruksie"
-#: sed/compile.c:162
+#: sed/compile.c:173
msgid "multiple number options to `s' command"
msgstr "meervoudige nommeropsies vir `s' instruksie"
-#: sed/compile.c:163
+#: sed/compile.c:175
msgid "number option to `s' command may not be zero"
msgstr "nommeropsie vir `s' instruksie mag nie nul wees nie"
-#: sed/compile.c:164
+#: sed/compile.c:177
#, fuzzy
msgid "strings for `y' command are different lengths"
msgstr "stringe vir y-instruksie het verskillende lengtes"
-#: sed/compile.c:165
+#: sed/compile.c:179
msgid "delimiter character is not a single-byte character"
msgstr ""
-#: sed/compile.c:166
+#: sed/compile.c:181
msgid "expected newer version of sed"
msgstr "het nuwer sed-weergawe verwag"
-#: sed/compile.c:167
+#: sed/compile.c:183
#, fuzzy
msgid "invalid usage of line address 0"
msgstr "Instruksie gebruik slegs een adres"
-#: sed/compile.c:168
+#: sed/compile.c:184
#, fuzzy, c-format
msgid "unknown command: `%c'"
msgstr "Onbekende instruksie:"
-#: sed/compile.c:169
+#: sed/compile.c:186
#, fuzzy
msgid "incomplete command"
msgstr "Vermiste instruksie"
-#: sed/compile.c:192
+#: sed/compile.c:188
+msgid "\":\" lacks a label"
+msgstr ""
+
+#: sed/compile.c:190
+msgid "recursive escaping after \\c not allowed"
+msgstr ""
+
+#: sed/compile.c:213
#, c-format
msgid "%s: file %s line %lu: %s\n"
msgstr "%s: lêer %s lyn %lu: %s\n"
-#: sed/compile.c:195
+#: sed/compile.c:216
#, c-format
msgid "%s: -e expression #%lu, char %lu: %s\n"
msgstr "%s: -e uitdrukking #%lu, karakter %lu: %s\n"
-#: sed/compile.c:1657
+#: sed/compile.c:1639
#, 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:595
+#: sed/execute.c:264 sed/execute.c:281
+#, c-format
+msgid "case conversion produced an invalid character"
+msgstr ""
+
+#: sed/execute.c:575
#, c-format
msgid "%s: can't read %s: %s\n"
msgstr "%s: Kan nie %s lees nie: %s\n"
-#: sed/execute.c:624
+#: sed/execute.c:600
#, fuzzy, c-format
msgid "couldn't edit %s: is a terminal"
msgstr "kon nie %d item na %s skryf nie: %s"
-#: sed/execute.c:629
+#: sed/execute.c:605
#, c-format
msgid "couldn't edit %s: not a regular file"
msgstr ""
-#: sed/execute.c:640
+#: sed/execute.c:616
#, c-format
msgid "%s: warning: failed to set default file creation context to %s: %s"
msgstr ""
-#: sed/execute.c:647
+#: sed/execute.c:624
#, c-format
msgid "%s: warning: failed to get security context of %s: %s"
msgstr ""
-#: sed/execute.c:664 sed/utils.c:211
+#: sed/execute.c:643 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:1193 sed/execute.c:1373
+#: sed/execute.c:1158 sed/execute.c:1368
msgid "error in subprocess"
msgstr "fout in subproses"
-#: sed/execute.c:1195
+#: sed/execute.c:1160
msgid "option `e' not supported"
msgstr "opsie `e' word nie ondersteun nie"
-#: sed/execute.c:1375
+#: sed/execute.c:1349
msgid "`e' command not supported"
msgstr "`e' instruksie word nie ondersteun nie"
-#: sed/execute.c:1725
+#: sed/execute.c:1675
msgid "no input files"
msgstr ""
-#: sed/regexp.c:39
+#: sed/regexp.c:38
#, fuzzy
msgid "no previous regular expression"
msgstr "Geen vorige regex nie"
-#: sed/regexp.c:40
-#, fuzzy
-msgid "cannot specify modifiers on empty regexp"
-msgstr "Kan nie veranderaars vir leë regex spesifiseer nie"
-
-#: sed/regexp.c:129
+#: sed/regexp.c:138
#, fuzzy, c-format
msgid "invalid reference \\%d on `s' command's RHS"
msgstr "Ongeldige regterhandsverwysing \\%d vir `s' instruksie"
-#: sed/sed.c:32
+#: sed/sed.c:35
msgid "Jay Fenlason"
msgstr ""
-#: sed/sed.c:33
+#: sed/sed.c:36
msgid "Tom Lord"
msgstr ""
-#: sed/sed.c:34
+#: sed/sed.c:37
msgid "Ken Pizzini"
msgstr ""
-#: sed/sed.c:35
+#: sed/sed.c:38
msgid "Paolo Bonzini"
msgstr ""
-#: sed/sed.c:79
+#: 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"
msgstr ""
-#: sed/sed.c:86
-#, fuzzy, c-format
-msgid ""
-"E-mail bug reports to: <%s>.\n"
-"Be sure to include the word ``%s'' somewhere in the ``Subject:'' field.\n"
+#: sed/sed.c:120
+#, c-format
+msgid "E-mail bug reports to: <%s>.\n"
msgstr ""
-"Rapporteer foute per e-pos aan: %s .\n"
-"Sluit asb. die woord ``%s'' êrens in die onderwerplyn in.\n"
-#: sed/sed.c:99
+#: sed/sed.c:129
msgid ""
" -R, --regexp-perl\n"
" use Perl 5's regular expressions syntax in the script.\n"
@@ -255,28 +634,28 @@ msgstr ""
" -R, --regexp-perl\n"
" gebruik Perl 5 se regexsintaks in die skrip.\n"
-#: sed/sed.c:104
+#: sed/sed.c:134
#, c-format
msgid ""
"Usage: %s [OPTION]... {script-only-if-no-other-script} [input-file]...\n"
"\n"
msgstr ""
-#: sed/sed.c:108
+#: sed/sed.c:138
#, c-format
msgid ""
" -n, --quiet, --silent\n"
" suppress automatic printing of pattern space\n"
msgstr ""
-#: sed/sed.c:110
+#: sed/sed.c:140
#, c-format
msgid ""
" -e script, --expression=script\n"
" add the script to the commands to be executed\n"
msgstr ""
-#: sed/sed.c:112
+#: sed/sed.c:142
#, c-format
msgid ""
" -f script-file, --file=script-file\n"
@@ -284,21 +663,21 @@ msgid ""
"executed\n"
msgstr ""
-#: sed/sed.c:115
+#: sed/sed.c:146
#, c-format
msgid ""
" --follow-symlinks\n"
" follow symlinks when processing in place\n"
msgstr ""
-#: sed/sed.c:118
+#: sed/sed.c:149
#, c-format
msgid ""
" -i[SUFFIX], --in-place[=SUFFIX]\n"
" edit files in place (makes backup if SUFFIX supplied)\n"
msgstr ""
-#: sed/sed.c:121
+#: sed/sed.c:153
#, c-format
msgid ""
" -b, --binary\n"
@@ -306,39 +685,46 @@ msgid ""
"specially)\n"
msgstr ""
-#: sed/sed.c:124
+#: sed/sed.c:157
#, c-format
msgid ""
" -l N, --line-length=N\n"
" specify the desired line-wrap length for the `l' command\n"
msgstr ""
-#: sed/sed.c:126
+#: sed/sed.c:159
#, c-format
msgid ""
" --posix\n"
" disable all GNU extensions.\n"
msgstr ""
-#: sed/sed.c:128
+#: sed/sed.c:161
#, fuzzy, c-format
msgid ""
-" -r, --regexp-extended\n"
-" use extended regular expressions in the script.\n"
+" -E, -r, --regexp-extended\n"
+" use extended regular expressions in the script\n"
+" (for portability use POSIX -E).\n"
msgstr ""
" -R, --regexp-perl\n"
" gebruik Perl 5 se regexsintaks in die skrip.\n"
-#: sed/sed.c:133
+#: sed/sed.c:167
#, c-format
msgid ""
" -s, --separate\n"
-" consider files as separate rather than as a single "
-"continuous\n"
-" long stream.\n"
+" consider files as separate rather than as a single,\n"
+" continuous long stream.\n"
msgstr ""
-#: sed/sed.c:136
+#: sed/sed.c:170
+#, c-format
+msgid ""
+" --sandbox\n"
+" operate in sandbox mode.\n"
+msgstr ""
+
+#: sed/sed.c:172
#, c-format
msgid ""
" -u, --unbuffered\n"
@@ -347,24 +733,24 @@ msgid ""
" the output buffers more often\n"
msgstr ""
-#: sed/sed.c:139
+#: sed/sed.c:175
#, c-format
msgid ""
" -z, --null-data\n"
" separate lines by NUL characters\n"
msgstr ""
-#: sed/sed.c:141
+#: sed/sed.c:177
#, c-format
msgid " --help display this help and exit\n"
msgstr ""
-#: sed/sed.c:142
+#: sed/sed.c:178
#, c-format
msgid " --version output version information and exit\n"
msgstr ""
-#: sed/sed.c:143
+#: sed/sed.c:179
#, c-format
msgid ""
"\n"
@@ -375,120 +761,48 @@ msgid ""
"\n"
msgstr ""
-#: sed/utils.c:74 sed/utils.c:432
+#: sed/utils.c:73 sed/utils.c:384
#, fuzzy, c-format
msgid "cannot remove %s: %s"
msgstr "%s: Kan nie %s lees nie: %s\n"
-#: sed/utils.c:144
+#: sed/utils.c:136
#, fuzzy, c-format
msgid "couldn't open file %s: %s"
msgstr "Kon nie die lêer %s oopmaak nie: %s"
-#: sed/utils.c:167
+#: sed/utils.c:155
#, fuzzy, c-format
msgid "couldn't attach to %s: %s"
msgstr "kon nie %d item na %s skryf nie: %s"
-#: sed/utils.c:229
-#, c-format
-msgid "couldn't write %d item to %s: %s"
-msgid_plural "couldn't write %d items to %s: %s"
+#: sed/utils.c:192
+#, fuzzy, c-format
+msgid "couldn't write %llu item to %s: %s"
+msgid_plural "couldn't write %llu items to %s: %s"
msgstr[0] "kon nie %d item na %s skryf nie: %s"
msgstr[1] "kon nie %d items na %s skryf nie: %s"
-#: sed/utils.c:244 sed/utils.c:267
+#: sed/utils.c:204 sed/utils.c:223
#, c-format
msgid "read error on %s: %s"
msgstr "leesfout op %s: %s"
-#: sed/utils.c:372
+#: sed/utils.c:325
#, fuzzy, c-format
msgid "couldn't follow symlink %s: %s"
msgstr "Kon nie die lêer %s oopmaak nie: %s"
-#: sed/utils.c:406
+#: sed/utils.c:359
#, fuzzy, c-format
msgid "cannot stat %s: %s"
msgstr "%s: Kan nie %s lees nie: %s\n"
-#: sed/utils.c:437
+#: sed/utils.c:389
#, fuzzy, c-format
msgid "cannot rename %s: %s"
msgstr "%s: Kan nie %s lees nie: %s\n"
-#: lib/regcomp.c:132
-msgid "Success"
-msgstr "Sukses"
-
-#: lib/regcomp.c:135
-msgid "No match"
-msgstr "Geen paring"
-
-#: lib/regcomp.c:138
-msgid "Invalid regular expression"
-msgstr "Ongeldige regex"
-
-#: lib/regcomp.c:141
-msgid "Invalid collation character"
-msgstr "Ongeldige kollasiekarakter"
-
-#: lib/regcomp.c:144
-msgid "Invalid character class name"
-msgstr "Ongeldige karakterklasnaam"
-
-#: lib/regcomp.c:147
-msgid "Trailing backslash"
-msgstr "Sleep terugstreep"
-
-#: lib/regcomp.c:150
-msgid "Invalid back reference"
-msgstr "Ongeldige terugverwysing"
-
-#: lib/regcomp.c:153
-msgid "Unmatched [ or [^"
-msgstr "Ongepaarde [ of [^"
-
-#: lib/regcomp.c:156
-msgid "Unmatched ( or \\("
-msgstr "Ongepaarde ( or \\("
-
-#: lib/regcomp.c:159
-msgid "Unmatched \\{"
-msgstr "Ongepaarde \\{"
-
-#: lib/regcomp.c:162
-msgid "Invalid content of \\{\\}"
-msgstr "Ongeldige inhoud binne \\{\\}"
-
-#: lib/regcomp.c:165
-msgid "Invalid range end"
-msgstr "Ongeldige bereikseinde"
-
-#: lib/regcomp.c:168
-msgid "Memory exhausted"
-msgstr "Geheue uitgeput"
-
-#: lib/regcomp.c:171
-msgid "Invalid preceding regular expression"
-msgstr "Ongeldige vorige regex"
-
-#: lib/regcomp.c:174
-msgid "Premature end of regular expression"
-msgstr "Premature einde vir regex"
-
-#: lib/regcomp.c:177
-msgid "Regular expression too big"
-msgstr "Regex te groot"
-
-#: lib/regcomp.c:180
-msgid "Unmatched ) or \\)"
-msgstr "Ongepaarde ) of \\)"
-
-#: lib/regcomp.c:705
-msgid "No previous regular expression"
-msgstr "Geen vorige regex nie"
-
#~ msgid "Called savchar() with unexpected pushback (%x)"
#~ msgstr "Het savchar() met onverwagte agterstoot (%x) geroep"
@@ -498,6 +812,9 @@ msgstr "Geen vorige regex nie"
#~ msgid "INTERNAL ERROR: Bad cmd %c"
#~ msgstr "INTERNE FOUT: Swak instruksie %c"
+#~ msgid "Cannot specify modifiers on empty regexp"
+#~ msgstr "Kan nie veranderaars vir leë regex spesifiseer nie"
+
#~ msgid ""
#~ "Usage: %s [OPTION]... {script-only-if-no-other-script} [input-file]...\n"
#~ "\n"
@@ -570,6 +887,13 @@ msgstr "Geen vorige regex nie"
#~ "\n"
#~ "\n"
+#~ msgid ""
+#~ "E-mail bug reports to: %s .\n"
+#~ "Be sure to include the word ``%s'' somewhere in the ``Subject:'' field.\n"
+#~ msgstr ""
+#~ "Rapporteer foute per e-pos aan: %s .\n"
+#~ "Sluit asb. die woord ``%s'' êrens in die onderwerplyn in.\n"
+
#~ msgid "super-sed version %s\n"
#~ msgstr "super-sed weergawe %s\n"
diff --git a/po/ast.gmo b/po/ast.gmo
index 5662564..323e681 100644
--- a/po/ast.gmo
+++ b/po/ast.gmo
Binary files differ
diff --git a/po/ast.po b/po/ast.po
index ae7a2d3..d882e88 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: 2012-12-22 14:36+0100\n"
+"POT-Creation-Date: 2016-12-30 00:59-0800\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"
@@ -15,223 +15,601 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=ISO-8859-1\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"
-#: sed/compile.c:144
+#: lib/closeout.c:112
+msgid "write error"
+msgstr ""
+
+#: lib/copy-acl.c:54
+#, c-format
+msgid "preserving permissions for %s"
+msgstr ""
+
+#: lib/dfa.c:1025 lib/dfa.c:1028 lib/dfa.c:1047 lib/dfa.c:1057 lib/dfa.c:1070
+#: lib/dfa.c:1098 lib/dfa.c:1107 lib/dfa.c:1110 lib/dfa.c:1115 lib/dfa.c:1137
+#: lib/dfa.c:1140
+msgid "unbalanced ["
+msgstr ""
+
+#: lib/dfa.c:1083
+#, fuzzy
+msgid "invalid character class"
+msgstr "Caruter de nome de clase invlidu"
+
+#: lib/dfa.c:1206
+msgid "character class syntax is [[:space:]], not [:space:]"
+msgstr ""
+
+#: lib/dfa.c:1275
+msgid "unfinished \\ escape"
+msgstr ""
+
+#: lib/dfa.c:1436
+#, fuzzy
+msgid "invalid content of \\{\\}"
+msgstr "Contenu invlidu de \\{\\}"
+
+#: lib/dfa.c:1439
+#, fuzzy
+msgid "regular expression too big"
+msgstr "Espresin regular enforma grande"
+
+#: lib/dfa.c:1853
+msgid "unbalanced ("
+msgstr ""
+
+#: lib/dfa.c:1980
+msgid "no syntax specified"
+msgstr ""
+
+#: lib/dfa.c:1988
+msgid "unbalanced )"
+msgstr ""
+
+#: lib/error.c:191
+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 ""
+
+#: lib/getopt.c:654 lib/getopt.c:658
+#, c-format
+msgid "%s: option '--%s' doesn't allow an argument\n"
+msgstr ""
+
+#: 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:715 lib/getopt.c:734
+#, c-format
+msgid "%s: option '--%s' requires an argument\n"
+msgstr ""
+
+#: 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
+#, 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
+#, 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 "Memoria escosada"
+
+#. TRANSLATORS:
+#. Get translations for open and closing quotation marks.
+#. The message catalog should translate "`" to a left
+#. quotation mark suitable for the locale, and similarly for
+#. "'". For example, a French Unicode local should translate
+#. these to U+00AB (LEFT-POINTING DOUBLE ANGLE
+#. QUOTATION MARK), and U+00BB (RIGHT-POINTING DOUBLE ANGLE
+#. QUOTATION MARK), respectively.
+#.
+#. If the catalog has no translation, we will try to
+#. use Unicode U+2018 (LEFT SINGLE QUOTATION MARK) and
+#. Unicode U+2019 (RIGHT SINGLE QUOTATION MARK). If the
+#. current locale is not Unicode, locale_quoting_style
+#. will quote 'like this', and clocale_quoting_style will
+#. quote "like this". You should always include translations
+#. for "`" and "'" even if U+2018 and U+2019 are appropriate
+#. for your locale.
+#.
+#. If you don't know what to put here, please see
+#. <http://en.wikipedia.org/wiki/Quotation_marks_in_other_languages>
+#. and use glyphs suitable for your language.
+#: lib/quotearg.c:354
+msgid "`"
+msgstr ""
+
+#: lib/quotearg.c:355
+msgid "'"
+msgstr ""
+
+#: lib/regcomp.c:135
+msgid "Success"
+msgstr "xitu"
+
+#: lib/regcomp.c:138
+msgid "No match"
+msgstr "Nun hai coincidencia"
+
+#: lib/regcomp.c:141
+msgid "Invalid regular expression"
+msgstr "Espresion regular invlida"
+
+#: lib/regcomp.c:144
+msgid "Invalid collation character"
+msgstr "Caruter d'ordenamientu invlidu"
+
+#: lib/regcomp.c:147
+msgid "Invalid character class name"
+msgstr "Caruter de nome de clase invlidu"
+
+#: lib/regcomp.c:150
+msgid "Trailing backslash"
+msgstr "Diagonal invertida al final"
+
+#: lib/regcomp.c:153
+msgid "Invalid back reference"
+msgstr "Referencia haza atrs non invlida"
+
+#: lib/regcomp.c:156
+#, fuzzy
+msgid "Unmatched [, [^, [:, [., or [="
+msgstr "[ O [^ ensin pareya"
+
+#: lib/regcomp.c:159
+msgid "Unmatched ( or \\("
+msgstr "( O \\( ensin pareya"
+
+#: lib/regcomp.c:162
+msgid "Unmatched \\{"
+msgstr "\\{ ensin pareya"
+
+#: lib/regcomp.c:165
+msgid "Invalid content of \\{\\}"
+msgstr "Contenu invlidu de \\{\\}"
+
+#: lib/regcomp.c:168
+msgid "Invalid range end"
+msgstr "Final de rangu invlidu"
+
+#: lib/regcomp.c:171
+msgid "Memory exhausted"
+msgstr "Memoria escosada"
+
+#: lib/regcomp.c:174
+msgid "Invalid preceding regular expression"
+msgstr "Espresin regular precedente invlida"
+
+#: lib/regcomp.c:177
+msgid "Premature end of regular expression"
+msgstr "Final prematuru de la espresin regular"
+
+#: lib/regcomp.c:180
+msgid "Regular expression too big"
+msgstr "Espresin regular enforma grande"
+
+#: lib/regcomp.c:183
+msgid "Unmatched ) or \\)"
+msgstr ") O \\) ensin pareya"
+
+#: lib/regcomp.c:687
+msgid "No previous regular expression"
+msgstr "Nun hai una espresin regular previa"
+
+#: lib/set-acl.c:46
+#, c-format
+msgid "setting permissions for %s"
+msgstr ""
+
+#: lib/version-etc.c:74
+#, c-format
+msgid "Packaged by %s (%s)\n"
+msgstr ""
+
+#: lib/version-etc.c:77
+#, c-format
+msgid "Packaged by %s\n"
+msgstr ""
+
+#. 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 ""
+
+#: lib/version-etc.c:86
+msgid ""
+"\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"
+msgstr ""
+
+#. TRANSLATORS: %s denotes an author name.
+#: lib/version-etc.c:102
+#, c-format
+msgid "Written by %s.\n"
+msgstr ""
+
+#. TRANSLATORS: Each %s denotes an author name.
+#: lib/version-etc.c:106
+#, c-format
+msgid "Written by %s and %s.\n"
+msgstr ""
+
+#. TRANSLATORS: Each %s denotes an author name.
+#: lib/version-etc.c:110
+#, c-format
+msgid "Written by %s, %s, and %s.\n"
+msgstr ""
+
+#. TRANSLATORS: Each %s denotes an author name.
+#. You can use line breaks, estimating that each author name occupies
+#. ca. 16 screen columns and that a screen line has ca. 80 columns.
+#: lib/version-etc.c:117
+#, c-format
+msgid ""
+"Written by %s, %s, %s,\n"
+"and %s.\n"
+msgstr ""
+
+#. TRANSLATORS: Each %s denotes an author name.
+#. You can use line breaks, estimating that each author name occupies
+#. ca. 16 screen columns and that a screen line has ca. 80 columns.
+#: lib/version-etc.c:124
+#, c-format
+msgid ""
+"Written by %s, %s, %s,\n"
+"%s, and %s.\n"
+msgstr ""
+
+#. TRANSLATORS: Each %s denotes an author name.
+#. You can use line breaks, estimating that each author name occupies
+#. ca. 16 screen columns and that a screen line has ca. 80 columns.
+#: lib/version-etc.c:131
+#, c-format
+msgid ""
+"Written by %s, %s, %s,\n"
+"%s, %s, and %s.\n"
+msgstr ""
+
+#. TRANSLATORS: Each %s denotes an author name.
+#. You can use line breaks, estimating that each author name occupies
+#. ca. 16 screen columns and that a screen line has ca. 80 columns.
+#: lib/version-etc.c:139
+#, c-format
+msgid ""
+"Written by %s, %s, %s,\n"
+"%s, %s, %s, and %s.\n"
+msgstr ""
+
+#. TRANSLATORS: Each %s denotes an author name.
+#. You can use line breaks, estimating that each author name occupies
+#. ca. 16 screen columns and that a screen line has ca. 80 columns.
+#: lib/version-etc.c:147
+#, c-format
+msgid ""
+"Written by %s, %s, %s,\n"
+"%s, %s, %s, %s,\n"
+"and %s.\n"
+msgstr ""
+
+#. TRANSLATORS: Each %s denotes an author name.
+#. You can use line breaks, estimating that each author name occupies
+#. ca. 16 screen columns and that a screen line has ca. 80 columns.
+#: lib/version-etc.c:156
+#, c-format
+msgid ""
+"Written by %s, %s, %s,\n"
+"%s, %s, %s, %s,\n"
+"%s, and %s.\n"
+msgstr ""
+
+#. TRANSLATORS: Each %s denotes an author name.
+#. You can use line breaks, estimating that each author name occupies
+#. ca. 16 screen columns and that a screen line has ca. 80 columns.
+#: lib/version-etc.c:167
+#, c-format
+msgid ""
+"Written by %s, %s, %s,\n"
+"%s, %s, %s, %s,\n"
+"%s, %s, and others.\n"
+msgstr ""
+
+#. TRANSLATORS: The placeholder indicates the bug-reporting address
+#. for this package. Please add _another line_ saying
+#. "Report translation bugs to <...>\n" with the address for translation
+#. bugs (typically your translation team's web or email address).
+#: lib/version-etc.c:245
+#, c-format
+msgid ""
+"\n"
+"Report bugs to: %s\n"
+msgstr ""
+
+#: lib/version-etc.c:247
+#, c-format
+msgid "Report %s bugs to: %s\n"
+msgstr ""
+
+#: lib/version-etc.c:251
+#, c-format
+msgid "%s home page: <%s>\n"
+msgstr ""
+
+#: lib/version-etc.c:253
+#, c-format
+msgid "%s home page: <http://www.gnu.org/software/%s/>\n"
+msgstr ""
+
+#: lib/version-etc.c:256
+msgid "General help using GNU software: <http://www.gnu.org/gethelp/>\n"
+msgstr ""
+
+#: sed/compile.c:146
msgid "multiple `!'s"
msgstr "`!'s mltiples"
-#: sed/compile.c:145
+#: sed/compile.c:147
msgid "unexpected `,'"
msgstr "`,' inesperada"
-#: sed/compile.c:146
+#: sed/compile.c:149
msgid "invalid usage of +N or ~N as first address"
msgstr "usu invlidu de +N o ~N como primer direicin"
-#: sed/compile.c:147
+#: sed/compile.c:150
msgid "unmatched `{'"
msgstr "`{' ensin pareya"
-#: sed/compile.c:148
+#: sed/compile.c:151
msgid "unexpected `}'"
msgstr "`}' inesperu"
-#: sed/compile.c:149
+#: sed/compile.c:153
msgid "extra characters after command"
msgstr "carauteres extra dempus de la orde"
-#: sed/compile.c:150
+#: sed/compile.c:155
msgid "expected \\ after `a', `c' or `i'"
msgstr "esperbase \\ dempus de `a', `c' o `i'"
-#: sed/compile.c:151
+#: sed/compile.c:157
msgid "`}' doesn't want any addresses"
msgstr "`}' nun acepta denguna direicin"
-#: sed/compile.c:152
+#: sed/compile.c:159
msgid ": doesn't want any addresses"
msgstr ": nun acepta denguna direicin"
-#: sed/compile.c:153
+#: sed/compile.c:161
msgid "comments don't accept any addresses"
msgstr "los comentarios nun aceptan denguna direicin"
-#: sed/compile.c:154
+#: sed/compile.c:162
msgid "missing command"
msgstr "orde que falta"
-#: sed/compile.c:155
+#: sed/compile.c:163
msgid "command only uses one address"
msgstr "la orde solamente usa una direicin"
-#: sed/compile.c:156
+#: sed/compile.c:164
msgid "unterminated address regex"
msgstr "direicinn de espresin regular ensin finar"
-#: sed/compile.c:157
+#: sed/compile.c:165
msgid "unterminated `s' command"
msgstr "orde `s' ensin finar"
-#: sed/compile.c:158
+#: sed/compile.c:166
msgid "unterminated `y' command"
msgstr "orde `y' ensin finar"
-#: sed/compile.c:159
+#: sed/compile.c:167
msgid "unknown option to `s'"
msgstr "opcin desconocida pa `s'"
-#: sed/compile.c:160
+#: sed/compile.c:169
msgid "multiple `p' options to `s' command"
msgstr "mltiples opciones `p' pa la orde `s'"
-#: sed/compile.c:161
+#: sed/compile.c:171
msgid "multiple `g' options to `s' command"
msgstr "mltiples opciones `g' pa la orde `s'"
-#: sed/compile.c:162
+#: sed/compile.c:173
msgid "multiple number options to `s' command"
msgstr "mltiples opciones numriques pa la orde `s'"
-#: sed/compile.c:163
+#: sed/compile.c:175
msgid "number option to `s' command may not be zero"
msgstr "una opcin numrica pa la orde `s' nun puede ser cero"
-#: sed/compile.c:164
+#: sed/compile.c:177
msgid "strings for `y' command are different lengths"
msgstr "les cadenes pa la orde `y' son de llargores estremaos"
-#: sed/compile.c:165
+#: sed/compile.c:179
msgid "delimiter character is not a single-byte character"
msgstr "el caruter llendador nun ye un caruter d'un solu byte"
-#: sed/compile.c:166
+#: sed/compile.c:181
msgid "expected newer version of sed"
msgstr "esperbase una versin ms reciente de sed"
-#: sed/compile.c:167
+#: sed/compile.c:183
msgid "invalid usage of line address 0"
msgstr "usu invlidu de la direicin de llinia 0"
-#: sed/compile.c:168
+#: sed/compile.c:184
#, c-format
msgid "unknown command: `%c'"
msgstr "orde desconocida: `%c'"
-#: sed/compile.c:169
+#: sed/compile.c:186
#, fuzzy
msgid "incomplete command"
msgstr "orde que falta"
-#: sed/compile.c:192
+#: sed/compile.c:188
+msgid "\":\" lacks a label"
+msgstr ""
+
+#: sed/compile.c:190
+msgid "recursive escaping after \\c not allowed"
+msgstr ""
+
+#: sed/compile.c:213
#, c-format
msgid "%s: file %s line %lu: %s\n"
msgstr "%s: ficheru %s llinia %lu: %s\n"
-#: sed/compile.c:195
+#: sed/compile.c:216
#, c-format
msgid "%s: -e expression #%lu, char %lu: %s\n"
msgstr "%s: -e espresin #%lu, caruter %lu: %s\n"
-#: sed/compile.c:1657
+#: sed/compile.c:1639
#, 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:595
+#: sed/execute.c:264 sed/execute.c:281
+#, c-format
+msgid "case conversion produced an invalid character"
+msgstr ""
+
+#: sed/execute.c:575
#, c-format
msgid "%s: can't read %s: %s\n"
msgstr "%s: nun se puede lleer %s: %s\n"
-#: sed/execute.c:624
+#: sed/execute.c:600
#, c-format
msgid "couldn't edit %s: is a terminal"
msgstr "nun se puede editar %s: ye una terminal"
-#: sed/execute.c:629
+#: sed/execute.c:605
#, 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:640
+#: sed/execute.c:616
#, c-format
msgid "%s: warning: failed to set default file creation context to %s: %s"
msgstr ""
-#: sed/execute.c:647
+#: sed/execute.c:624
#, c-format
msgid "%s: warning: failed to get security context of %s: %s"
msgstr ""
-#: sed/execute.c:664 sed/utils.c:211
+#: sed/execute.c:643 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:1193 sed/execute.c:1373
+#: sed/execute.c:1158 sed/execute.c:1368
msgid "error in subprocess"
msgstr "fallu nel subprocesu"
-#: sed/execute.c:1195
+#: sed/execute.c:1160
msgid "option `e' not supported"
msgstr "nun hai sofitu pa la opcin `e'"
-#: sed/execute.c:1375
+#: sed/execute.c:1349
msgid "`e' command not supported"
msgstr "nun hai sofitu pa la orde `e'"
-#: sed/execute.c:1725
+#: sed/execute.c:1675
msgid "no input files"
msgstr "nun hai ficheros d'entrada"
-#: sed/regexp.c:39
+#: sed/regexp.c:38
msgid "no previous regular expression"
msgstr "nun hai una espresin regular previa"
-#: sed/regexp.c:40
-msgid "cannot specify modifiers on empty regexp"
-msgstr ""
-"nun se pueden especificar modificadores n'espresiones regulares baleres"
-
-#: sed/regexp.c:129
+#: sed/regexp.c:138
#, c-format
msgid "invalid reference \\%d on `s' command's RHS"
msgstr "referencia \\%d invlida nel llau drechu de la orde `s'"
-#: sed/sed.c:32
+#: sed/sed.c:35
msgid "Jay Fenlason"
msgstr ""
-#: sed/sed.c:33
+#: sed/sed.c:36
msgid "Tom Lord"
msgstr ""
-#: sed/sed.c:34
+#: sed/sed.c:37
msgid "Ken Pizzini"
msgstr ""
-#: sed/sed.c:35
+#: sed/sed.c:38
msgid "Paolo Bonzini"
msgstr ""
-#: sed/sed.c:79
+#: 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"
msgstr ""
-#: sed/sed.c:86
-#, fuzzy, c-format
-msgid ""
-"E-mail bug reports to: <%s>.\n"
-"Be sure to include the word ``%s'' somewhere in the ``Subject:'' field.\n"
+#: sed/sed.c:120
+#, c-format
+msgid "E-mail bug reports to: <%s>.\n"
msgstr ""
-"Enve reportes de bichos por e-mail a: %s .\n"
-"Asegrate d'incluyir la pallabra ``%s'' en dalgn llugar nel campu "
-"``Subject:''.\n"
-#: sed/sed.c:99
+#: sed/sed.c:129
msgid ""
" -R, --regexp-perl\n"
" use Perl 5's regular expressions syntax in the script.\n"
@@ -240,7 +618,7 @@ msgstr ""
" usa la sintaxis d'espresiones regulares de Perl 5\n"
" nel guin.\n"
-#: sed/sed.c:104
+#: sed/sed.c:134
#, c-format
msgid ""
"Usage: %s [OPTION]... {script-only-if-no-other-script} [input-file]...\n"
@@ -250,7 +628,7 @@ msgstr ""
"entrada]...\n"
"\n"
-#: sed/sed.c:108
+#: sed/sed.c:138
#, c-format
msgid ""
" -n, --quiet, --silent\n"
@@ -259,7 +637,7 @@ msgstr ""
" -n, --quiet, --silent\n"
" desanicia l'amuesa automtica del espaciu de patrones\n"
-#: sed/sed.c:110
+#: sed/sed.c:140
#, c-format
msgid ""
" -e script, --expression=script\n"
@@ -268,7 +646,7 @@ msgstr ""
" -e guin, --expression=guin\n"
" agrega el guin a la llista d'rdenes pa executar\n"
-#: sed/sed.c:112
+#: sed/sed.c:142
#, c-format
msgid ""
" -f script-file, --file=script-file\n"
@@ -279,7 +657,7 @@ msgstr ""
" amiesta'l contenu del ficheru guin a la llista d'rdenes\n"
" pa executar\n"
-#: sed/sed.c:115
+#: sed/sed.c:146
#, c-format
msgid ""
" --follow-symlinks\n"
@@ -288,7 +666,7 @@ msgstr ""
" --follow-symlinks\n"
" sigue los enllaces simblicos al procesar nel llugar\n"
-#: sed/sed.c:118
+#: sed/sed.c:149
#, fuzzy, c-format
msgid ""
" -i[SUFFIX], --in-place[=SUFFIX]\n"
@@ -298,7 +676,7 @@ msgstr ""
" edita ficheros nel llugar (cria un respaldu si se da\n"
" una estensin)\n"
-#: sed/sed.c:121
+#: sed/sed.c:153
#, c-format
msgid ""
" -b, --binary\n"
@@ -309,7 +687,7 @@ msgstr ""
" abre ficheros en mou binariu (los RC+FLs nun se procesen\n"
" especialmente)\n"
-#: sed/sed.c:124
+#: sed/sed.c:157
#, c-format
msgid ""
" -l N, --line-length=N\n"
@@ -319,7 +697,7 @@ msgstr ""
" especifica'l llargor de corte de llinia que te pete pa\n"
" la orde `l'\n"
-#: sed/sed.c:126
+#: sed/sed.c:159
#, c-format
msgid ""
" --posix\n"
@@ -328,28 +706,35 @@ msgstr ""
" --posix\n"
" desactiva toles estensiones de GNU.\n"
-#: sed/sed.c:128
-#, c-format
+#: sed/sed.c:161
+#, fuzzy, c-format
msgid ""
-" -r, --regexp-extended\n"
-" use extended regular expressions in the script.\n"
+" -E, -r, --regexp-extended\n"
+" use extended regular expressions in the script\n"
+" (for portability use POSIX -E).\n"
msgstr ""
" -r, --regexp-extended\n"
" usa espresiones regulares extendes nel guin.\n"
-#: sed/sed.c:133
-#, c-format
+#: sed/sed.c:167
+#, fuzzy, c-format
msgid ""
" -s, --separate\n"
-" consider files as separate rather than as a single "
-"continuous\n"
-" long stream.\n"
+" consider files as separate rather than as a single,\n"
+" continuous long stream.\n"
msgstr ""
" -s, --separate\n"
" considera los ficheros como separtaos en vez d'un solu\n"
" fluxu, llargu y continuu.\n"
-#: sed/sed.c:136
+#: sed/sed.c:170
+#, c-format
+msgid ""
+" --sandbox\n"
+" operate in sandbox mode.\n"
+msgstr ""
+
+#: sed/sed.c:172
#, c-format
msgid ""
" -u, --unbuffered\n"
@@ -362,24 +747,24 @@ msgstr ""
" y vacia los almacenamientos temporales de salida con ms\n"
" frecuencia\n"
-#: sed/sed.c:139
+#: sed/sed.c:175
#, c-format
msgid ""
" -z, --null-data\n"
" separate lines by NUL characters\n"
msgstr ""
-#: sed/sed.c:141
+#: sed/sed.c:177
#, c-format
msgid " --help display this help and exit\n"
msgstr " --help amuesa esta aida y termina\n"
-#: sed/sed.c:142
+#: sed/sed.c:178
#, c-format
msgid " --version output version information and exit\n"
msgstr " --version amuesa la informacin de la versin y termina\n"
-#: sed/sed.c:143
+#: sed/sed.c:179
#, c-format
msgid ""
"\n"
@@ -397,124 +782,61 @@ msgstr ""
"la entrada estndard.\n"
"\n"
-#: sed/utils.c:74 sed/utils.c:432
+#: sed/utils.c:73 sed/utils.c:384
#, c-format
msgid "cannot remove %s: %s"
msgstr "nun se puede desaniciar %s: %s"
-#: sed/utils.c:144
+#: sed/utils.c:136
#, c-format
msgid "couldn't open file %s: %s"
msgstr "nun se puede abrir el ficheru %s: %s"
# FIXME: verificar col códigu fonte pa saber si es 'coneutar' o
# 'adjuntar'. cfuga
-#: sed/utils.c:167
+#: sed/utils.c:155
#, c-format
msgid "couldn't attach to %s: %s"
msgstr "nun se puede coneutar a %s: %s"
-#: sed/utils.c:229
-#, c-format
-msgid "couldn't write %d item to %s: %s"
-msgid_plural "couldn't write %d items to %s: %s"
+#: sed/utils.c:192
+#, fuzzy, c-format
+msgid "couldn't write %llu item to %s: %s"
+msgid_plural "couldn't write %llu items to %s: %s"
msgstr[0] "nun se puede escribir %d elementu a %s: %s"
msgstr[1] "nun se pueden escribir %d elementos a %s: %s"
-#: sed/utils.c:244 sed/utils.c:267
+#: sed/utils.c:204 sed/utils.c:223
#, c-format
msgid "read error on %s: %s"
msgstr "fallu al lleer de %s: %s"
-#: sed/utils.c:372
+#: sed/utils.c:325
#, c-format
msgid "couldn't follow symlink %s: %s"
msgstr "nun se puede siguir l'enllaz simblicu %s: %s"
-#: sed/utils.c:406
+#: sed/utils.c:359
#, c-format
msgid "cannot stat %s: %s"
msgstr "nun se puede obtener la informacin de stat de %s: %s"
-#: sed/utils.c:437
+#: sed/utils.c:389
#, c-format
msgid "cannot rename %s: %s"
msgstr "nun se puede renomar %s: %s"
-#: lib/regcomp.c:132
-msgid "Success"
-msgstr "xitu"
-
-#: lib/regcomp.c:135
-msgid "No match"
-msgstr "Nun hai coincidencia"
-
-#: lib/regcomp.c:138
-msgid "Invalid regular expression"
-msgstr "Espresion regular invlida"
-
-#: lib/regcomp.c:141
-msgid "Invalid collation character"
-msgstr "Caruter d'ordenamientu invlidu"
-
-#: lib/regcomp.c:144
-#, fuzzy
-msgid "Invalid character class name"
-msgstr "Caruter de nome de clase invlidu"
-
-#: lib/regcomp.c:147
-msgid "Trailing backslash"
-msgstr "Diagonal invertida al final"
-
-#: lib/regcomp.c:150
-msgid "Invalid back reference"
-msgstr "Referencia haza atrs non invlida"
-
-#: lib/regcomp.c:153
-msgid "Unmatched [ or [^"
-msgstr "[ O [^ ensin pareya"
-
-#: lib/regcomp.c:156
-msgid "Unmatched ( or \\("
-msgstr "( O \\( ensin pareya"
-
-#: lib/regcomp.c:159
-msgid "Unmatched \\{"
-msgstr "\\{ ensin pareya"
-
-#: lib/regcomp.c:162
-#, fuzzy
-msgid "Invalid content of \\{\\}"
-msgstr "Contenu invlidu de \\{\\}"
-
-#: lib/regcomp.c:165
-msgid "Invalid range end"
-msgstr "Final de rangu invlidu"
-
-#: lib/regcomp.c:168
-msgid "Memory exhausted"
-msgstr "Memoria escosada"
-
-#: lib/regcomp.c:171
-msgid "Invalid preceding regular expression"
-msgstr "Espresin regular precedente invlida"
-
-#: lib/regcomp.c:174
-msgid "Premature end of regular expression"
-msgstr "Final prematuru de la espresin regular"
-
-#: lib/regcomp.c:177
-#, fuzzy
-msgid "Regular expression too big"
-msgstr "Espresin regular enforma grande"
-
-#: lib/regcomp.c:180
-msgid "Unmatched ) or \\)"
-msgstr ") O \\) ensin pareya"
+#~ msgid "cannot specify modifiers on empty regexp"
+#~ msgstr ""
+#~ "nun se pueden especificar modificadores n'espresiones regulares baleres"
-#: lib/regcomp.c:705
-msgid "No previous regular expression"
-msgstr "Nun hai una espresin regular previa"
+#~ msgid ""
+#~ "E-mail bug reports to: %s .\n"
+#~ "Be sure to include the word ``%s'' somewhere in the ``Subject:'' field.\n"
+#~ msgstr ""
+#~ "Enve reportes de bichos por e-mail a: %s .\n"
+#~ "Asegrate d'incluyir la pallabra ``%s'' en dalgn llugar nel campu "
+#~ "``Subject:''.\n"
#~ msgid "super-sed version %s\n"
#~ msgstr "super-sed versin %s\n"
@@ -529,9 +851,8 @@ msgstr "Nun hai una espresin regular previa"
#~ msgid "GNU sed version %s\n"
#~ msgstr "GNU sed versinn %s\n"
-#, fuzzy
#~ msgid ""
-#~ "Copyright (C) %d Free Software Foundation, Inc.\n"
+#~ "%s\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 "
@@ -544,39 +865,3 @@ msgstr "Nun hai una espresin regular previa"
#~ "Nun hai DENGUNA garanta; nin siquiera de COMERCIABILID o AFAYAMIENTU PA "
#~ "UN\n"
#~ "FIN DETERMINU, na estensin permitida por llei.\n"
-
-#, fuzzy
-#~ msgid "pcregrep: unknown option %c\n"
-#~ msgstr "opcin desconocida pa `s'"
-
-#, fuzzy
-#~ msgid "pcregrep: error in regex at offset %d: %s\n"
-#~ msgstr "fallu al lleer de %s: %s"
-
-#, fuzzy
-#~ msgid "pcregrep: error while studing regex: %s\n"
-#~ msgstr "fallu al lleer de %s: %s"
-
-#, fuzzy
-#~ msgid "pcregrep: failed to open %s: %s\n"
-#~ msgstr "fallu al lleer de %s: %s"
-
-#, fuzzy
-#~ msgid "unmatched braces"
-#~ msgstr "`{' ensin pareya"
-
-#, fuzzy
-#~ msgid "unknown option bit(s) set"
-#~ msgstr "opcin desconocida pa `s'"
-
-#, fuzzy
-#~ msgid "missing ) after comment"
-#~ msgstr "orde que falta"
-
-#, fuzzy
-#~ msgid "unmatched parentheses"
-#~ msgstr "`{' ensin pareya"
-
-#, fuzzy
-#~ msgid "POSIX collating elements are not supported"
-#~ msgstr "nun hai sofitu pa la opcin `e'"
diff --git a/po/bg.gmo b/po/bg.gmo
new file mode 100644
index 0000000..ef896ce
--- /dev/null
+++ b/po/bg.gmo
Binary files differ
diff --git a/po/bg.po b/po/bg.po
new file mode 100644
index 0000000..b2382da
--- /dev/null
+++ b/po/bg.po
@@ -0,0 +1,859 @@
+# Bulgarian translation of sed.
+# Copyright (C) 2009 Free Software Foundation, Inc.
+# This file is distributed under the same license as the sed package.
+# Alexander Shopov <ash@contact.bg>, 2016.
+msgid ""
+msgstr ""
+"Project-Id-Version: sed 4.2.2.177\n"
+"Report-Msgid-Bugs-To: bug-gnu-utils@gnu.org\n"
+"POT-Creation-Date: 2016-12-30 00:59-0800\n"
+"PO-Revision-Date: 2016-12-29 13:53+0200\n"
+"Last-Translator: Alexander Shopov <ash@kambanaria.org>\n"
+"Language-Team: Bulgarian <dict@ludost.net>\n"
+"Language: bg\n"
+"MIME-Version: 1.0\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"
+
+#: lib/closeout.c:112
+msgid "write error"
+msgstr "грешка при запис"
+
+#: lib/copy-acl.c:54
+#, c-format
+msgid "preserving permissions for %s"
+msgstr "запазване на правата за „%s“"
+
+#: lib/dfa.c:1025 lib/dfa.c:1028 lib/dfa.c:1047 lib/dfa.c:1057 lib/dfa.c:1070
+#: lib/dfa.c:1098 lib/dfa.c:1107 lib/dfa.c:1110 lib/dfa.c:1115 lib/dfa.c:1137
+#: lib/dfa.c:1140
+msgid "unbalanced ["
+msgstr "„[“ без еш"
+
+#: lib/dfa.c:1083
+msgid "invalid character class"
+msgstr "неправилен клас знаци"
+
+#: lib/dfa.c:1206
+msgid "character class syntax is [[:space:]], not [:space:]"
+msgstr "клас знаци се указва чрез „[[:ИМЕ:]]“, а не „[:ИМЕ:]“"
+
+#: lib/dfa.c:1275
+msgid "unfinished \\ escape"
+msgstr "незавършена екранираща последователност чрез „\\“"
+
+#: lib/dfa.c:1436
+msgid "invalid content of \\{\\}"
+msgstr "неправилно съдържание в „\\{\\}“"
+
+#: lib/dfa.c:1439
+msgid "regular expression too big"
+msgstr "прекалено голям регулярен израз"
+
+#: lib/dfa.c:1853
+msgid "unbalanced ("
+msgstr "„(“ без еш"
+
+#: lib/dfa.c:1980
+msgid "no syntax specified"
+msgstr "не е зададен синтаксис"
+
+#: lib/dfa.c:1988
+msgid "unbalanced )"
+msgstr "„)“ без еш"
+
+#: lib/error.c:191
+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"
+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:667 lib/getopt.c:672
+#, c-format
+msgid "%s: option '%c%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"
+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
+#, 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
+#, 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 "паметта е изчерпана"
+
+#. TRANSLATORS:
+#. Get translations for open and closing quotation marks.
+#. The message catalog should translate "`" to a left
+#. quotation mark suitable for the locale, and similarly for
+#. "'". For example, a French Unicode local should translate
+#. these to U+00AB (LEFT-POINTING DOUBLE ANGLE
+#. QUOTATION MARK), and U+00BB (RIGHT-POINTING DOUBLE ANGLE
+#. QUOTATION MARK), respectively.
+#.
+#. If the catalog has no translation, we will try to
+#. use Unicode U+2018 (LEFT SINGLE QUOTATION MARK) and
+#. Unicode U+2019 (RIGHT SINGLE QUOTATION MARK). If the
+#. current locale is not Unicode, locale_quoting_style
+#. will quote 'like this', and clocale_quoting_style will
+#. quote "like this". You should always include translations
+#. for "`" and "'" even if U+2018 and U+2019 are appropriate
+#. for your locale.
+#.
+#. If you don't know what to put here, please see
+#. <http://en.wikipedia.org/wiki/Quotation_marks_in_other_languages>
+#. and use glyphs suitable for your language.
+#: lib/quotearg.c:354
+msgid "`"
+msgstr "„"
+
+#: lib/quotearg.c:355
+msgid "'"
+msgstr "“"
+
+#: lib/regcomp.c:135
+msgid "Success"
+msgstr "Успех"
+
+#: lib/regcomp.c:138
+msgid "No match"
+msgstr "Няма съвпадения"
+
+#: lib/regcomp.c:141
+msgid "Invalid regular expression"
+msgstr "Неправилен регулярен израз"
+
+#: lib/regcomp.c:144
+msgid "Invalid collation character"
+msgstr "Неправилен знак за подредба"
+
+#: lib/regcomp.c:147
+msgid "Invalid character class name"
+msgstr "Неправилно име на клас знаци"
+
+#: lib/regcomp.c:150
+msgid "Trailing backslash"
+msgstr "Самотна „\\“ накрая"
+
+#: lib/regcomp.c:153
+msgid "Invalid back reference"
+msgstr "Неправилна препратка към съвпадение"
+
+#: lib/regcomp.c:156
+msgid "Unmatched [, [^, [:, [., or [="
+msgstr "„[“, „[^“, „[:“, „[.“ или „[=“ без еш"
+
+#: lib/regcomp.c:159
+msgid "Unmatched ( or \\("
+msgstr "„(“ или „\\(“ без еш"
+
+#: lib/regcomp.c:162
+msgid "Unmatched \\{"
+msgstr "„\\{“ без еш"
+
+#: lib/regcomp.c:165
+msgid "Invalid content of \\{\\}"
+msgstr "Неправилно съдържание в „\\{\\}“"
+
+#: lib/regcomp.c:168
+msgid "Invalid range end"
+msgstr "Неправилен край на диапазон"
+
+#: lib/regcomp.c:171
+msgid "Memory exhausted"
+msgstr "Паметта свърши"
+
+#: lib/regcomp.c:174
+msgid "Invalid preceding regular expression"
+msgstr "Предхождащият регулярен израз е неправилен"
+
+#: lib/regcomp.c:177
+msgid "Premature end of regular expression"
+msgstr "Ранен край на регулярен израз"
+
+#: lib/regcomp.c:180
+msgid "Regular expression too big"
+msgstr "Регулярният израз е прекалено голям"
+
+#: lib/regcomp.c:183
+msgid "Unmatched ) or \\)"
+msgstr "„)“ или „\\)“ без еш"
+
+#: lib/regcomp.c:687
+msgid "No previous regular expression"
+msgstr "Няма предхождащ регулярен израз"
+
+#: lib/set-acl.c:46
+#, c-format
+msgid "setting permissions for %s"
+msgstr "задаване на права на „%s“"
+
+#: lib/version-etc.c:74
+#, c-format
+msgid "Packaged by %s (%s)\n"
+msgstr "Пакетирано от %s (%s)\n"
+
+#: lib/version-etc.c:77
+#, c-format
+msgid "Packaged by %s\n"
+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 "©"
+
+#: lib/version-etc.c:86
+msgid ""
+"\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"
+msgstr ""
+"\n"
+"Лиценз — Общ публичен лиценз на GNU (GNU GPL), както е публикуван от "
+"Фондацията\n"
+"за свободен софтуер — версия 3 на лиценза или (по ваше решение) по-късна "
+"версия.\n"
+"<http://gnu.org/licenses/gpl.html>\n"
+"Тази програма е свободен софтуер. Можете да я разпространявате и/или "
+"променяте.\n"
+"Тя се разпространява БЕЗ НИКАКВИ ГАРАНЦИИ доколкото е позволено от закона.\n"
+
+#. TRANSLATORS: %s denotes an author name.
+#: lib/version-etc.c:102
+#, c-format
+msgid "Written by %s.\n"
+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 "Създадено от %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 "Създадено от %s, %s и %s.\n"
+
+#. TRANSLATORS: Each %s denotes an author name.
+#. You can use line breaks, estimating that each author name occupies
+#. ca. 16 screen columns and that a screen line has ca. 80 columns.
+#: lib/version-etc.c:117
+#, c-format
+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
+#. ca. 16 screen columns and that a screen line has ca. 80 columns.
+#: lib/version-etc.c:124
+#, c-format
+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
+#. ca. 16 screen columns and that a screen line has ca. 80 columns.
+#: lib/version-etc.c:131
+#, c-format
+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
+#. ca. 16 screen columns and that a screen line has ca. 80 columns.
+#: lib/version-etc.c:139
+#, c-format
+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
+#. ca. 16 screen columns and that a screen line has ca. 80 columns.
+#: lib/version-etc.c:147
+#, c-format
+msgid ""
+"Written by %s, %s, %s,\n"
+"%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
+#. ca. 16 screen columns and that a screen line has ca. 80 columns.
+#: lib/version-etc.c:156
+#, c-format
+msgid ""
+"Written by %s, %s, %s,\n"
+"%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
+#. ca. 16 screen columns and that a screen line has ca. 80 columns.
+#: lib/version-etc.c:167
+#, c-format
+msgid ""
+"Written by %s, %s, %s,\n"
+"%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
+#. "Report translation bugs to <...>\n" with the address for translation
+#. bugs (typically your translation team's web or email address).
+#: lib/version-etc.c:245
+#, c-format
+msgid ""
+"\n"
+"Report bugs to: %s\n"
+msgstr ""
+"\n"
+"Докладвайте грешки в програмата на адрес: %s\n"
+"Докладвайте грешки в превода на адрес: <dict@ludost.net>\n"
+
+#: lib/version-etc.c:247
+#, c-format
+msgid "Report %s bugs to: %s\n"
+msgstr "Докладвайте грешки в „%s“ на адрес: %s\n"
+
+#: lib/version-etc.c:251
+#, c-format
+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"
+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 "Обща помощ за програмите на GNU: <http://www.gnu.org/gethelp/>\n"
+
+#: sed/compile.c:146
+msgid "multiple `!'s"
+msgstr "множество „!“"
+
+#: sed/compile.c:147
+msgid "unexpected `,'"
+msgstr "неочаквана „,“"
+
+#: sed/compile.c:149
+msgid "invalid usage of +N or ~N as first address"
+msgstr "неправилна употреба на „+`ЧИСЛО“ или „~ЧИСЛО“ като първи адрес"
+
+#: sed/compile.c:150
+msgid "unmatched `{'"
+msgstr "„{“ без еш"
+
+#: sed/compile.c:151
+msgid "unexpected `}'"
+msgstr "„}“ без еш"
+
+#: sed/compile.c:153
+msgid "extra characters after command"
+msgstr "излишни знаци след командата"
+
+#: sed/compile.c:155
+msgid "expected \\ after `a', `c' or `i'"
+msgstr "след „a“, „c“ и „i“ трябва да има „\\“"
+
+#: sed/compile.c:157
+msgid "`}' doesn't want any addresses"
+msgstr "„}“ не приема адреси"
+
+#: sed/compile.c:159
+msgid ": doesn't want any addresses"
+msgstr "„:“ не приема адреси"
+
+#: sed/compile.c:161
+msgid "comments don't accept any addresses"
+msgstr "коментарите не приемат адреси"
+
+#: sed/compile.c:162
+msgid "missing command"
+msgstr "липсва команда"
+
+#: sed/compile.c:163
+msgid "command only uses one address"
+msgstr "командата приема само един адрес"
+
+#: sed/compile.c:164
+msgid "unterminated address regex"
+msgstr "незавършен регулярен израз за адрес"
+
+#: sed/compile.c:165
+msgid "unterminated `s' command"
+msgstr "незавършена команда „s“"
+
+#: sed/compile.c:166
+msgid "unterminated `y' command"
+msgstr "незавършена команда „y“"
+
+#: sed/compile.c:167
+msgid "unknown option to `s'"
+msgstr "непозната опция за командата „s“"
+
+#: sed/compile.c:169
+msgid "multiple `p' options to `s' command"
+msgstr "множество опции „p“ за командата „s“"
+
+#: sed/compile.c:171
+msgid "multiple `g' options to `s' command"
+msgstr "множество опции „g“ за командата „s“"
+
+#: sed/compile.c:173
+msgid "multiple number options to `s' command"
+msgstr "множество числови опции за командата „s“"
+
+#: sed/compile.c:175
+msgid "number option to `s' command may not be zero"
+msgstr "числовата опция за командата „s“ не може да е 0"
+
+#: sed/compile.c:177
+msgid "strings for `y' command are different lengths"
+msgstr "низовете за командата „y“ не трябва да са с различни дължини"
+
+#: sed/compile.c:179
+msgid "delimiter character is not a single-byte character"
+msgstr "знакът за разделител трябва да е еднобайтов"
+
+#: sed/compile.c:181
+msgid "expected newer version of sed"
+msgstr "нужна е по-нова версия на sed"
+
+#: sed/compile.c:183
+msgid "invalid usage of line address 0"
+msgstr "адресът 0 е употребен неправилно"
+
+#: sed/compile.c:184
+#, c-format
+msgid "unknown command: `%c'"
+msgstr "непозната команда: „%c“"
+
+#: sed/compile.c:186
+msgid "incomplete command"
+msgstr "непълна команда"
+
+#: sed/compile.c:188
+msgid "\":\" lacks a label"
+msgstr "„:“ без етикет"
+
+#: sed/compile.c:190
+msgid "recursive escaping after \\c not allowed"
+msgstr "рекурсивното екраниране след „\\c“ е забранено"
+
+#: sed/compile.c:213
+#, c-format
+msgid "%s: file %s line %lu: %s\n"
+msgstr "%s: файл „%s“, ред %lu: %s\n"
+
+#: sed/compile.c:216
+#, c-format
+msgid "%s: -e expression #%lu, char %lu: %s\n"
+msgstr "%s: -e израз №%lu, знак %lu: %s\n"
+
+#: sed/compile.c:1639
+#, c-format
+msgid "can't find label for jump to `%s'"
+msgstr "етикетът „%s“, към който трябва да се премине, липсва"
+
+#: sed/execute.c:264 sed/execute.c:281
+#, c-format
+msgid "case conversion produced an invalid character"
+msgstr "смяната на регистъра доведе до неправилен знак"
+
+#: sed/execute.c:575
+#, c-format
+msgid "%s: can't read %s: %s\n"
+msgstr "%s: не може да се чете от „%s“: %s\n"
+
+#: sed/execute.c:600
+#, c-format
+msgid "couldn't edit %s: is a terminal"
+msgstr "„%s“ не може да се редактира, защото е терминал"
+
+#: sed/execute.c:605
+#, c-format
+msgid "couldn't edit %s: not a regular file"
+msgstr "„%s“ не може да се редактира, защото не е нормален файл"
+
+#: sed/execute.c:616
+#, c-format
+msgid "%s: warning: failed to set default file creation context to %s: %s"
+msgstr ""
+"%s: ПРЕДУПРЕЖДЕНИЕ: на „%s“ не може да се зададе стандартният контекст при "
+"създаване на файлове: %s"
+
+#: sed/execute.c:624
+#, 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
+#, c-format
+msgid "couldn't open temporary file %s: %s"
+msgstr "временният файл „%s“ не може да се отвори: %s"
+
+#: sed/execute.c:1158 sed/execute.c:1368
+msgid "error in subprocess"
+msgstr "грешка в подпроцеса"
+
+#: sed/execute.c:1160
+msgid "option `e' not supported"
+msgstr "опцията „e“ не се поддържа"
+
+#: sed/execute.c:1349
+msgid "`e' command not supported"
+msgstr "командата „e“ не се поддържа"
+
+#: sed/execute.c:1675
+msgid "no input files"
+msgstr "не са зададени входни файлове"
+
+#: sed/regexp.c:38
+msgid "no previous regular expression"
+msgstr "няма предишен регулярен израз"
+
+#: sed/regexp.c:138
+#, c-format
+msgid "invalid reference \\%d on `s' command's RHS"
+msgstr "неправилен указател „\\%d“ в дясната страна на командата „s“"
+
+#: sed/sed.c:35
+msgid "Jay Fenlason"
+msgstr "Jay Fenlason"
+
+#: sed/sed.c:36
+msgid "Tom Lord"
+msgstr "Tom Lord"
+
+#: sed/sed.c:37
+msgid "Ken Pizzini"
+msgstr "Ken Pizzini"
+
+#: sed/sed.c:38
+msgid "Paolo Bonzini"
+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"
+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 "Докладвайте грешки в програмата на адрес: %s\n"
+
+#: sed/sed.c:129
+msgid ""
+" -R, --regexp-perl\n"
+" use Perl 5's regular expressions syntax in the script.\n"
+msgstr ""
+" -R, --regexp-perl\n"
+" използване на синтаксиса на Perl 5 за регулярни изрази\n"
+
+#: sed/sed.c:134
+#, c-format
+msgid ""
+"Usage: %s [OPTION]... {script-only-if-no-other-script} [input-file]...\n"
+"\n"
+msgstr ""
+"Употреба: %s [ОПЦИЯ]… {СКРИПТ_АКО_НЕ_E_ЗАДАДЕН_ИНАЧЕ} [ВХОДЕН_ФАЙЛ]…\n"
+"\n"
+
+#: sed/sed.c:138
+#, c-format
+msgid ""
+" -n, --quiet, --silent\n"
+" suppress automatic printing of pattern space\n"
+msgstr ""
+" -n, --quiet, --silent\n"
+" без автоматичното отпечатване на буфера за напасване на "
+"шаблони\n"
+
+#: sed/sed.c:140
+#, c-format
+msgid ""
+" -e script, --expression=script\n"
+" add the script to the commands to be executed\n"
+msgstr ""
+" -e СКРИПТ, --expression=СКРИПТ\n"
+" добавяне на СКРИПТа към командите за изпълнение\n"
+
+#: sed/sed.c:142
+#, c-format
+msgid ""
+" -f script-file, --file=script-file\n"
+" add the contents of script-file to the commands to be "
+"executed\n"
+msgstr ""
+" -f ФАЙЛ_СЪС_СКРИПТОВЕ, --file=ФАЙЛ_СЪС_СКРИПТОВЕ\n"
+" добавяне на съдържанието на ФАЙЛа_СЪС_СКРИПТОВЕ към "
+"командите\n"
+" за изпълнение\n"
+
+#: sed/sed.c:146
+#, c-format
+msgid ""
+" --follow-symlinks\n"
+" follow symlinks when processing in place\n"
+msgstr ""
+" --follow-symlinks\n"
+" следване на символните връзки при обработката на място\n"
+
+#: sed/sed.c:149
+#, c-format
+msgid ""
+" -i[SUFFIX], --in-place[=SUFFIX]\n"
+" edit files in place (makes backup if SUFFIX supplied)\n"
+msgstr ""
+" -i[РАЗШИРЕНИЕ], --in-place[=РАЗШИРЕНИЕ]\n"
+" редактиране на файловете на място (като се прави резервно "
+"копие\n"
+" с това РАЗШИРЕНИЕ, ако е зададено)\n"
+
+#: sed/sed.c:153
+#, c-format
+msgid ""
+" -b, --binary\n"
+" open files in binary mode (CR+LFs are not processed "
+"specially)\n"
+msgstr ""
+" -b, --binary\n"
+" отваряне на файловете в двоичен режим (CR+LF няма "
+"специално\n"
+" значение)\n"
+
+#: sed/sed.c:157
+#, c-format
+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"
+" желана дължина на реда, след която командата „l“ го "
+"пренася\n"
+
+#: sed/sed.c:159
+#, c-format
+msgid ""
+" --posix\n"
+" disable all GNU extensions.\n"
+msgstr ""
+" --posix\n"
+" изключване на всички разширения на GNU\n"
+
+#: sed/sed.c:161
+#, c-format
+msgid ""
+" -E, -r, --regexp-extended\n"
+" use extended regular expressions in the script\n"
+" (for portability use POSIX -E).\n"
+msgstr ""
+" -E, -r, --regexp-extended\n"
+" използване на разширени регулярни изрази в скриптовете\n"
+" (за съвместимост с POSIX ползвайте „-E“)\n"
+
+#: sed/sed.c:167
+#, c-format
+msgid ""
+" -s, --separate\n"
+" consider files as separate rather than as a single,\n"
+" continuous long stream.\n"
+msgstr ""
+" -s, --separate\n"
+" обработка на файловете поотделно, а не като един обединен "
+"поток\n"
+
+#: sed/sed.c:170
+#, c-format
+msgid ""
+" --sandbox\n"
+" operate in sandbox mode.\n"
+msgstr ""
+" --sandbox\n"
+" безопасен режим (без командите „r“/„w“/„e“. Ползват се "
+"само\n"
+" файлове зададени през командния ред)\n"
+
+#: sed/sed.c:172
+#, c-format
+msgid ""
+" -u, --unbuffered\n"
+" load minimal amounts of data from the input files and "
+"flush\n"
+" the output buffers more often\n"
+msgstr ""
+" -u, --unbuffered\n"
+" зареждане на минимално количество входни данни и често\n"
+" изчистване на буферите\n"
+
+#: sed/sed.c:175
+#, c-format
+msgid ""
+" -z, --null-data\n"
+" separate lines by NUL characters\n"
+msgstr ""
+" -z, --null-data\n"
+" отделяне на редовете със знака NUL\n"
+
+#: sed/sed.c:177
+#, c-format
+msgid " --help display this help and exit\n"
+msgstr " --help извеждане на тази помощ и изход\n"
+
+#: sed/sed.c:178
+#, c-format
+msgid " --version output version information and exit\n"
+msgstr " --version извеждане на версията на GNU sed и изход\n"
+
+#: sed/sed.c:179
+#, c-format
+msgid ""
+"\n"
+"If no -e, --expression, -f, or --file option is given, then the first\n"
+"non-option argument is taken as the sed script to interpret. All\n"
+"remaining arguments are names of input files; if no input files are\n"
+"specified, then the standard input is read.\n"
+"\n"
+msgstr ""
+"\n"
+"Ако никоя от опциите „-e“, „--expression“, „-f“ и „--file“ не е зададена,\n"
+"първият аргумент, който не е опция, се използва като скрипт за sed. Всички\n"
+"останали аргументи се третират като имена на входни файлове. Ако не са\n"
+"зададени такива, се чете от стандартния вход.\n"
+
+#: sed/utils.c:73 sed/utils.c:384
+#, c-format
+msgid "cannot remove %s: %s"
+msgstr "„%s“ не може да се изтрие: %s"
+
+#: sed/utils.c:136
+#, c-format
+msgid "couldn't open file %s: %s"
+msgstr "файлът „%s“ не може да се отвори: %s"
+
+#: sed/utils.c:155
+#, c-format
+msgid "couldn't attach to %s: %s"
+msgstr "неуспешно свързване към „%s“: %s"
+
+#: sed/utils.c:192
+#, c-format
+msgid "couldn't write %llu item to %s: %s"
+msgid_plural "couldn't write %llu items to %s: %s"
+msgstr[0] "%llu елемент не може да се запише в „%s“: %s"
+msgstr[1] "%llu елемента не може да се запишат в „%s“: %s"
+
+#: sed/utils.c:204 sed/utils.c:223
+#, c-format
+msgid "read error on %s: %s"
+msgstr "грешка при четене на „%s“: %s"
+
+#: sed/utils.c:325
+#, c-format
+msgid "couldn't follow symlink %s: %s"
+msgstr "символната връзка „%s“ не може да се проследи: %s"
+
+#: sed/utils.c:359
+#, c-format
+msgid "cannot stat %s: %s"
+msgstr "не може да се получи информация за „%s“ чрез „stat“: %s"
+
+#: sed/utils.c:389
+#, c-format
+msgid "cannot rename %s: %s"
+msgstr "„%s“ не може да се преименува: %s"
diff --git a/po/ca.gmo b/po/ca.gmo
index 9694ec6..0de8701 100644
--- a/po/ca.gmo
+++ b/po/ca.gmo
Binary files differ
diff --git a/po/ca.po b/po/ca.po
index 30f2887..9f0b8c8 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: 2012-12-22 14:36+0100\n"
+"POT-Creation-Date: 2016-12-30 00:59-0800\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"
@@ -15,207 +15,594 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=ISO-8859-1\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"
-#: sed/compile.c:144
+#: lib/closeout.c:112
+msgid "write error"
+msgstr ""
+
+#: lib/copy-acl.c:54
+#, c-format
+msgid "preserving permissions for %s"
+msgstr ""
+
+#: lib/dfa.c:1025 lib/dfa.c:1028 lib/dfa.c:1047 lib/dfa.c:1057 lib/dfa.c:1070
+#: lib/dfa.c:1098 lib/dfa.c:1107 lib/dfa.c:1110 lib/dfa.c:1115 lib/dfa.c:1137
+#: lib/dfa.c:1140
+msgid "unbalanced ["
+msgstr ""
+
+#: lib/dfa.c:1083
+#, fuzzy
+msgid "invalid character class"
+msgstr "Nom de classe de carcter no vlid"
+
+#: lib/dfa.c:1206
+msgid "character class syntax is [[:space:]], not [:space:]"
+msgstr ""
+
+#: lib/dfa.c:1275
+msgid "unfinished \\ escape"
+msgstr ""
+
+#: lib/dfa.c:1436
+#, fuzzy
+msgid "invalid content of \\{\\}"
+msgstr "El contingut de \\{\\} no s vlid"
+
+#: lib/dfa.c:1439
+#, fuzzy
+msgid "regular expression too big"
+msgstr "L'expressi regular s massa gran"
+
+#: lib/dfa.c:1853
+msgid "unbalanced ("
+msgstr ""
+
+#: lib/dfa.c:1980
+msgid "no syntax specified"
+msgstr ""
+
+#: lib/dfa.c:1988
+msgid "unbalanced )"
+msgstr ""
+
+#: lib/error.c:191
+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 ""
+
+#: lib/getopt.c:654 lib/getopt.c:658
+#, c-format
+msgid "%s: option '--%s' doesn't allow an argument\n"
+msgstr ""
+
+#: 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:715 lib/getopt.c:734
+#, c-format
+msgid "%s: option '--%s' requires an argument\n"
+msgstr ""
+
+#: 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
+#, 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
+#, 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 "Memria exhaurida"
+
+#. TRANSLATORS:
+#. Get translations for open and closing quotation marks.
+#. The message catalog should translate "`" to a left
+#. quotation mark suitable for the locale, and similarly for
+#. "'". For example, a French Unicode local should translate
+#. these to U+00AB (LEFT-POINTING DOUBLE ANGLE
+#. QUOTATION MARK), and U+00BB (RIGHT-POINTING DOUBLE ANGLE
+#. QUOTATION MARK), respectively.
+#.
+#. If the catalog has no translation, we will try to
+#. use Unicode U+2018 (LEFT SINGLE QUOTATION MARK) and
+#. Unicode U+2019 (RIGHT SINGLE QUOTATION MARK). If the
+#. current locale is not Unicode, locale_quoting_style
+#. will quote 'like this', and clocale_quoting_style will
+#. quote "like this". You should always include translations
+#. for "`" and "'" even if U+2018 and U+2019 are appropriate
+#. for your locale.
+#.
+#. If you don't know what to put here, please see
+#. <http://en.wikipedia.org/wiki/Quotation_marks_in_other_languages>
+#. and use glyphs suitable for your language.
+#: lib/quotearg.c:354
+msgid "`"
+msgstr ""
+
+#: lib/quotearg.c:355
+msgid "'"
+msgstr ""
+
+#: lib/regcomp.c:135
+msgid "Success"
+msgstr "xit"
+
+#: lib/regcomp.c:138
+msgid "No match"
+msgstr "Sense parella"
+
+#: lib/regcomp.c:141
+msgid "Invalid regular expression"
+msgstr "Expressi regular no vlida"
+
+#: lib/regcomp.c:144
+msgid "Invalid collation character"
+msgstr "El carcter de comparaci no s vlid"
+
+#: lib/regcomp.c:147
+msgid "Invalid character class name"
+msgstr "Nom de classe de carcter no vlid"
+
+#: lib/regcomp.c:150
+msgid "Trailing backslash"
+msgstr "Barra invertida al final"
+
+#: lib/regcomp.c:153
+msgid "Invalid back reference"
+msgstr "La referncia cap enrere no s vlida"
+
+#: lib/regcomp.c:156
+#, fuzzy
+msgid "Unmatched [, [^, [:, [., or [="
+msgstr "[ o [^ no emparellat"
+
+#: lib/regcomp.c:159
+msgid "Unmatched ( or \\("
+msgstr "( o \\( no emparellat"
+
+#: lib/regcomp.c:162
+msgid "Unmatched \\{"
+msgstr "\\{ no emparellat"
+
+#: lib/regcomp.c:165
+msgid "Invalid content of \\{\\}"
+msgstr "El contingut de \\{\\} no s vlid"
+
+#: lib/regcomp.c:168
+msgid "Invalid range end"
+msgstr "El rang final no s vlid"
+
+#: lib/regcomp.c:171
+msgid "Memory exhausted"
+msgstr "Memria exhaurida"
+
+#: lib/regcomp.c:174
+msgid "Invalid preceding regular expression"
+msgstr "L'expressi regular precedent no vlida"
+
+#: lib/regcomp.c:177
+msgid "Premature end of regular expression"
+msgstr "Fi prematur de l'expressi regular"
+
+#: lib/regcomp.c:180
+msgid "Regular expression too big"
+msgstr "L'expressi regular s massa gran"
+
+#: lib/regcomp.c:183
+msgid "Unmatched ) or \\)"
+msgstr ") o \\) no emparellat"
+
+#: lib/regcomp.c:687
+msgid "No previous regular expression"
+msgstr "No hi ha una expressi regular prvia"
+
+#: lib/set-acl.c:46
+#, c-format
+msgid "setting permissions for %s"
+msgstr ""
+
+#: lib/version-etc.c:74
+#, c-format
+msgid "Packaged by %s (%s)\n"
+msgstr ""
+
+#: lib/version-etc.c:77
+#, c-format
+msgid "Packaged by %s\n"
+msgstr ""
+
+#. 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 ""
+
+#: lib/version-etc.c:86
+msgid ""
+"\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"
+msgstr ""
+
+#. TRANSLATORS: %s denotes an author name.
+#: lib/version-etc.c:102
+#, c-format
+msgid "Written by %s.\n"
+msgstr ""
+
+#. TRANSLATORS: Each %s denotes an author name.
+#: lib/version-etc.c:106
+#, c-format
+msgid "Written by %s and %s.\n"
+msgstr ""
+
+#. TRANSLATORS: Each %s denotes an author name.
+#: lib/version-etc.c:110
+#, c-format
+msgid "Written by %s, %s, and %s.\n"
+msgstr ""
+
+#. TRANSLATORS: Each %s denotes an author name.
+#. You can use line breaks, estimating that each author name occupies
+#. ca. 16 screen columns and that a screen line has ca. 80 columns.
+#: lib/version-etc.c:117
+#, c-format
+msgid ""
+"Written by %s, %s, %s,\n"
+"and %s.\n"
+msgstr ""
+
+#. TRANSLATORS: Each %s denotes an author name.
+#. You can use line breaks, estimating that each author name occupies
+#. ca. 16 screen columns and that a screen line has ca. 80 columns.
+#: lib/version-etc.c:124
+#, c-format
+msgid ""
+"Written by %s, %s, %s,\n"
+"%s, and %s.\n"
+msgstr ""
+
+#. TRANSLATORS: Each %s denotes an author name.
+#. You can use line breaks, estimating that each author name occupies
+#. ca. 16 screen columns and that a screen line has ca. 80 columns.
+#: lib/version-etc.c:131
+#, c-format
+msgid ""
+"Written by %s, %s, %s,\n"
+"%s, %s, and %s.\n"
+msgstr ""
+
+#. TRANSLATORS: Each %s denotes an author name.
+#. You can use line breaks, estimating that each author name occupies
+#. ca. 16 screen columns and that a screen line has ca. 80 columns.
+#: lib/version-etc.c:139
+#, c-format
+msgid ""
+"Written by %s, %s, %s,\n"
+"%s, %s, %s, and %s.\n"
+msgstr ""
+
+#. TRANSLATORS: Each %s denotes an author name.
+#. You can use line breaks, estimating that each author name occupies
+#. ca. 16 screen columns and that a screen line has ca. 80 columns.
+#: lib/version-etc.c:147
+#, c-format
+msgid ""
+"Written by %s, %s, %s,\n"
+"%s, %s, %s, %s,\n"
+"and %s.\n"
+msgstr ""
+
+#. TRANSLATORS: Each %s denotes an author name.
+#. You can use line breaks, estimating that each author name occupies
+#. ca. 16 screen columns and that a screen line has ca. 80 columns.
+#: lib/version-etc.c:156
+#, c-format
+msgid ""
+"Written by %s, %s, %s,\n"
+"%s, %s, %s, %s,\n"
+"%s, and %s.\n"
+msgstr ""
+
+#. TRANSLATORS: Each %s denotes an author name.
+#. You can use line breaks, estimating that each author name occupies
+#. ca. 16 screen columns and that a screen line has ca. 80 columns.
+#: lib/version-etc.c:167
+#, c-format
+msgid ""
+"Written by %s, %s, %s,\n"
+"%s, %s, %s, %s,\n"
+"%s, %s, and others.\n"
+msgstr ""
+
+#. TRANSLATORS: The placeholder indicates the bug-reporting address
+#. for this package. Please add _another line_ saying
+#. "Report translation bugs to <...>\n" with the address for translation
+#. bugs (typically your translation team's web or email address).
+#: lib/version-etc.c:245
+#, c-format
+msgid ""
+"\n"
+"Report bugs to: %s\n"
+msgstr ""
+
+#: lib/version-etc.c:247
+#, c-format
+msgid "Report %s bugs to: %s\n"
+msgstr ""
+
+#: lib/version-etc.c:251
+#, c-format
+msgid "%s home page: <%s>\n"
+msgstr ""
+
+#: lib/version-etc.c:253
+#, c-format
+msgid "%s home page: <http://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"
+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"
+
+#: sed/compile.c:146
msgid "multiple `!'s"
msgstr "mltiples !"
-#: sed/compile.c:145
+#: sed/compile.c:147
msgid "unexpected `,'"
msgstr ", inesperada"
-#: sed/compile.c:146
+#: sed/compile.c:149
msgid "invalid usage of +N or ~N as first address"
msgstr "no es pot utilitzar +N o ~N com a primera adrea"
-#: sed/compile.c:147
+#: sed/compile.c:150
msgid "unmatched `{'"
msgstr "{ no emparellat"
-#: sed/compile.c:148
+#: sed/compile.c:151
msgid "unexpected `}'"
msgstr "} inesperat"
-#: sed/compile.c:149
+#: sed/compile.c:153
msgid "extra characters after command"
msgstr "hi ha carcters extra desprs de l'ordre"
-#: sed/compile.c:150
+#: sed/compile.c:155
msgid "expected \\ after `a', `c' or `i'"
msgstr "s'espera \\ desprs de a, c i i"
-#: sed/compile.c:151
+#: sed/compile.c:157
msgid "`}' doesn't want any addresses"
msgstr "} no accepta cap adrea"
-#: sed/compile.c:152
+#: sed/compile.c:159
msgid ": doesn't want any addresses"
msgstr ": no accepta cap adrea"
-#: sed/compile.c:153
+#: sed/compile.c:161
msgid "comments don't accept any addresses"
msgstr "els comentaris no accepten cap adrea"
-#: sed/compile.c:154
+#: sed/compile.c:162
msgid "missing command"
msgstr "cal una ordre"
-#: sed/compile.c:155
+#: sed/compile.c:163
msgid "command only uses one address"
msgstr "l'ordre utilitza noms una adrea"
-#: sed/compile.c:156
+#: sed/compile.c:164
msgid "unterminated address regex"
msgstr "l'expressi regular d'adrea no est terminada"
-#: sed/compile.c:157
+#: sed/compile.c:165
msgid "unterminated `s' command"
msgstr "ordre s no terminada"
-#: sed/compile.c:158
+#: sed/compile.c:166
msgid "unterminated `y' command"
msgstr "ordre y no terminada"
-#: sed/compile.c:159
+#: sed/compile.c:167
msgid "unknown option to `s'"
msgstr "opci desconeguda per a s"
-#: sed/compile.c:160
+#: sed/compile.c:169
msgid "multiple `p' options to `s' command"
msgstr "mltiples opcions p per a l'ordre s"
-#: sed/compile.c:161
+#: sed/compile.c:171
msgid "multiple `g' options to `s' command"
msgstr "mltiples opcions g per a l'ordre s"
-#: sed/compile.c:162
+#: sed/compile.c:173
msgid "multiple number options to `s' command"
msgstr "mltiples opcions numriques per a l'ordre s"
-#: sed/compile.c:163
+#: sed/compile.c:175
msgid "number option to `s' command may not be zero"
msgstr "l'opci numrica per a l'ordre s no pot ser zero"
-#: sed/compile.c:164
+#: sed/compile.c:177
msgid "strings for `y' command are different lengths"
msgstr "les cadenes per a l'ordre y sn de longituds diferents"
-#: sed/compile.c:165
+#: sed/compile.c:179
msgid "delimiter character is not a single-byte character"
msgstr "el carcter delimitador no s un carcter d'un byte"
-#: sed/compile.c:166
+#: sed/compile.c:181
msgid "expected newer version of sed"
msgstr "s'esperava una versi ms nova de sed"
-#: sed/compile.c:167
+#: sed/compile.c:183
msgid "invalid usage of line address 0"
msgstr "s de l'adrea de lnia 0 invlid"
-#: sed/compile.c:168
+#: sed/compile.c:184
#, c-format
msgid "unknown command: `%c'"
msgstr "ordre desconeguda: %c"
-#: sed/compile.c:169
+#: sed/compile.c:186
#, fuzzy
msgid "incomplete command"
msgstr "cal una ordre"
-#: sed/compile.c:192
+#: sed/compile.c:188
+msgid "\":\" lacks a label"
+msgstr ""
+
+#: sed/compile.c:190
+msgid "recursive escaping after \\c not allowed"
+msgstr ""
+
+#: sed/compile.c:213
#, c-format
msgid "%s: file %s line %lu: %s\n"
msgstr "%s: fitxer %s lnia %lu: %s\n"
-#: sed/compile.c:195
+#: sed/compile.c:216
#, c-format
msgid "%s: -e expression #%lu, char %lu: %s\n"
msgstr "%s: -e expressi #%lu, carcter %lu: %s\n"
-#: sed/compile.c:1657
+#: sed/compile.c:1639
#, 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:595
+#: sed/execute.c:264 sed/execute.c:281
+#, c-format
+msgid "case conversion produced an invalid character"
+msgstr ""
+
+#: sed/execute.c:575
#, c-format
msgid "%s: can't read %s: %s\n"
msgstr "%s: no es pot llegir %s: %s\n"
-#: sed/execute.c:624
+#: sed/execute.c:600
#, c-format
msgid "couldn't edit %s: is a terminal"
msgstr "no s'ha pogut editar %s: s un terminal"
-#: sed/execute.c:629
+#: sed/execute.c:605
#, 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:640
+#: sed/execute.c:616
#, 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:647
+#: sed/execute.c:624
#, 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:664 sed/utils.c:211
+#: sed/execute.c:643 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:1193 sed/execute.c:1373
+#: sed/execute.c:1158 sed/execute.c:1368
msgid "error in subprocess"
msgstr "s'ha produt un error en el subprocs"
-#: sed/execute.c:1195
+#: sed/execute.c:1160
msgid "option `e' not supported"
msgstr "l'opci e no est suportada"
-#: sed/execute.c:1375
+#: sed/execute.c:1349
msgid "`e' command not supported"
msgstr "l'ordre e no est suportada"
-#: sed/execute.c:1725
+#: sed/execute.c:1675
msgid "no input files"
msgstr "no hi ha fitxers d'entrada"
-#: sed/regexp.c:39
+#: sed/regexp.c:38
msgid "no previous regular expression"
msgstr "no hi ha una expressi regular prvia"
-#: sed/regexp.c:40
-msgid "cannot specify modifiers on empty regexp"
-msgstr "no es poden especificar modificadors en expregs buides"
-
-#: sed/regexp.c:129
+#: sed/regexp.c:138
#, 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/sed.c:32
+#: sed/sed.c:35
msgid "Jay Fenlason"
msgstr ""
-#: sed/sed.c:33
+#: sed/sed.c:36
msgid "Tom Lord"
msgstr ""
-#: sed/sed.c:34
+#: sed/sed.c:37
msgid "Ken Pizzini"
msgstr ""
-#: sed/sed.c:35
+#: sed/sed.c:38
msgid "Paolo Bonzini"
msgstr ""
-#: sed/sed.c:79
+#: sed/sed.c:113
#, c-format
msgid ""
"GNU sed home page: <http://www.gnu.org/software/sed/>.\n"
@@ -224,17 +611,12 @@ 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"
-#: sed/sed.c:86
+#: sed/sed.c:120
#, c-format
-msgid ""
-"E-mail bug reports to: <%s>.\n"
-"Be sure to include the word ``%s'' somewhere in the ``Subject:'' field.\n"
+msgid "E-mail bug reports to: <%s>.\n"
msgstr ""
-"Envieu informes d'error a: <%s>.\n"
-"Assegureu-vos d'incloure la paraula %s en alguna part del camp "
-"Assumpte:.\n"
-#: sed/sed.c:99
+#: sed/sed.c:129
msgid ""
" -R, --regexp-perl\n"
" use Perl 5's regular expressions syntax in the script.\n"
@@ -243,7 +625,7 @@ msgstr ""
" usa la sintaxi d'expressions regulars de Perl 5 en aquesta\n"
" sequncia.\n"
-#: sed/sed.c:104
+#: sed/sed.c:134
#, c-format
msgid ""
"Usage: %s [OPTION]... {script-only-if-no-other-script} [input-file]...\n"
@@ -253,7 +635,7 @@ msgstr ""
" [fitxer-entrada]...\n"
"\n"
-#: sed/sed.c:108
+#: sed/sed.c:138
#, c-format
msgid ""
" -n, --quiet, --silent\n"
@@ -262,7 +644,7 @@ msgstr ""
" -n, --quiet, --silent\n"
" suprimeix la impressi automtica de l'espai de patrons\n"
-#: sed/sed.c:110
+#: sed/sed.c:140
#, c-format
msgid ""
" -e script, --expression=script\n"
@@ -271,7 +653,7 @@ msgstr ""
" -e script, --expression=script\n"
" afegeix el script a les ordres a executar\n"
-#: sed/sed.c:112
+#: sed/sed.c:142
#, c-format
msgid ""
" -f script-file, --file=script-file\n"
@@ -282,7 +664,7 @@ msgstr ""
" afegeix els continguts de fitxer-script a les ordres a "
"executar\n"
-#: sed/sed.c:115
+#: sed/sed.c:146
#, c-format
msgid ""
" --follow-symlinks\n"
@@ -292,7 +674,7 @@ msgstr ""
" segueix enllaos simblics quan s'editen els mateixos "
"fitxers\n"
-#: sed/sed.c:118
+#: sed/sed.c:149
#, fuzzy, c-format
msgid ""
" -i[SUFFIX], --in-place[=SUFFIX]\n"
@@ -302,7 +684,7 @@ msgstr ""
" edita els mateixos fitxers (fa cpia de seguretat si es\n"
" proveeix una extensi)\n"
-#: sed/sed.c:121
+#: sed/sed.c:153
#, c-format
msgid ""
" -b, --binary\n"
@@ -313,7 +695,7 @@ msgstr ""
" obre els fitxers en mode binari (no es processen els CR+LF\n"
" de manera especial)\n"
-#: sed/sed.c:124
+#: sed/sed.c:157
#, c-format
msgid ""
" -l N, --line-length=N\n"
@@ -323,7 +705,7 @@ msgstr ""
" especifica la longitud desitjada per a l'ajust de final de\n"
" lnia per a l'ordre l\n"
-#: sed/sed.c:126
+#: sed/sed.c:159
#, c-format
msgid ""
" --posix\n"
@@ -332,28 +714,35 @@ msgstr ""
" --posix\n"
" inhabilita totes les extensions GNU.\n"
-#: sed/sed.c:128
-#, c-format
+#: sed/sed.c:161
+#, fuzzy, c-format
msgid ""
-" -r, --regexp-extended\n"
-" use extended regular expressions in the script.\n"
+" -E, -r, --regexp-extended\n"
+" use extended regular expressions in the script\n"
+" (for portability use POSIX -E).\n"
msgstr ""
" -r, --regexp-extended\n"
" usa expressions regulars exteses en el script.\n"
-#: sed/sed.c:133
-#, c-format
+#: sed/sed.c:167
+#, fuzzy, c-format
msgid ""
" -s, --separate\n"
-" consider files as separate rather than as a single "
-"continuous\n"
-" long stream.\n"
+" consider files as separate rather than as a single,\n"
+" continuous long stream.\n"
msgstr ""
" -s, --separate\n"
" considera els fitxers com independents, en compte d'un\n"
" llarg flux continu.\n"
-#: sed/sed.c:136
+#: sed/sed.c:170
+#, c-format
+msgid ""
+" --sandbox\n"
+" operate in sandbox mode.\n"
+msgstr ""
+
+#: sed/sed.c:172
#, c-format
msgid ""
" -u, --unbuffered\n"
@@ -366,24 +755,24 @@ msgstr ""
"d'entrada\n"
" i buida els bfers d'eixida ms sovint\n"
-#: sed/sed.c:139
+#: sed/sed.c:175
#, c-format
msgid ""
" -z, --null-data\n"
" separate lines by NUL characters\n"
msgstr ""
-#: sed/sed.c:141
+#: sed/sed.c:177
#, c-format
msgid " --help display this help and exit\n"
msgstr " --help mostra aquest missatge d'ajuda i surt\n"
-#: sed/sed.c:142
+#: sed/sed.c:178
#, c-format
msgid " --version output version information and exit\n"
msgstr " --version mostra la informaci de la versi i surt\n"
-#: sed/sed.c:143
+#: sed/sed.c:179
#, c-format
msgid ""
"\n"
@@ -402,119 +791,58 @@ msgstr ""
"es llegeix l'entrada estndard.\n"
"\n"
-#: sed/utils.c:74 sed/utils.c:432
+#: sed/utils.c:73 sed/utils.c:384
#, c-format
msgid "cannot remove %s: %s"
msgstr "no es pot eliminar %s: %s"
-#: sed/utils.c:144
+#: sed/utils.c:136
#, c-format
msgid "couldn't open file %s: %s"
msgstr "no s'ha pogut obrir el fitxer %s: %s"
-#: sed/utils.c:167
+#: sed/utils.c:155
#, c-format
msgid "couldn't attach to %s: %s"
msgstr "no s'ha pogut adjuntar a %s: %s"
-#: sed/utils.c:229
-#, c-format
-msgid "couldn't write %d item to %s: %s"
-msgid_plural "couldn't write %d items to %s: %s"
+#: sed/utils.c:192
+#, fuzzy, c-format
+msgid "couldn't write %llu item to %s: %s"
+msgid_plural "couldn't write %llu items to %s: %s"
msgstr[0] "no s'ha pogut escriure %d element a %s: %s"
msgstr[1] "no s'han pogut escriure %d elements a %s: %s"
-#: sed/utils.c:244 sed/utils.c:267
+#: sed/utils.c:204 sed/utils.c:223
#, c-format
msgid "read error on %s: %s"
msgstr "error de lectura en %s: %s"
-#: sed/utils.c:372
+#: sed/utils.c:325
#, c-format
msgid "couldn't follow symlink %s: %s"
msgstr "no s'ha pogut seguir l'enlla simblic %s: %s"
-#: sed/utils.c:406
+#: sed/utils.c:359
#, c-format
msgid "cannot stat %s: %s"
msgstr "no es pot fer stat de %s: %s"
-#: sed/utils.c:437
+#: sed/utils.c:389
#, c-format
msgid "cannot rename %s: %s"
msgstr "no es pot reanomenar %s: %s"
-#: lib/regcomp.c:132
-msgid "Success"
-msgstr "xit"
-
-#: lib/regcomp.c:135
-msgid "No match"
-msgstr "Sense parella"
+#~ msgid "cannot specify modifiers on empty regexp"
+#~ msgstr "no es poden especificar modificadors en expregs buides"
-#: lib/regcomp.c:138
-msgid "Invalid regular expression"
-msgstr "Expressi regular no vlida"
-
-#: lib/regcomp.c:141
-msgid "Invalid collation character"
-msgstr "El carcter de comparaci no s vlid"
-
-#: lib/regcomp.c:144
-msgid "Invalid character class name"
-msgstr "Nom de classe de carcter no vlid"
-
-#: lib/regcomp.c:147
-msgid "Trailing backslash"
-msgstr "Barra invertida al final"
-
-#: lib/regcomp.c:150
-msgid "Invalid back reference"
-msgstr "La referncia cap enrere no s vlida"
-
-#: lib/regcomp.c:153
-msgid "Unmatched [ or [^"
-msgstr "[ o [^ no emparellat"
-
-#: lib/regcomp.c:156
-msgid "Unmatched ( or \\("
-msgstr "( o \\( no emparellat"
-
-#: lib/regcomp.c:159
-msgid "Unmatched \\{"
-msgstr "\\{ no emparellat"
-
-#: lib/regcomp.c:162
-msgid "Invalid content of \\{\\}"
-msgstr "El contingut de \\{\\} no s vlid"
-
-#: lib/regcomp.c:165
-msgid "Invalid range end"
-msgstr "El rang final no s vlid"
-
-#: lib/regcomp.c:168
-msgid "Memory exhausted"
-msgstr "Memria exhaurida"
-
-#: lib/regcomp.c:171
-msgid "Invalid preceding regular expression"
-msgstr "L'expressi regular precedent no vlida"
-
-#: lib/regcomp.c:174
-msgid "Premature end of regular expression"
-msgstr "Fi prematur de l'expressi regular"
-
-#: lib/regcomp.c:177
-msgid "Regular expression too big"
-msgstr "L'expressi regular s massa gran"
-
-#: lib/regcomp.c:180
-msgid "Unmatched ) or \\)"
-msgstr ") o \\) no emparellat"
-
-#: lib/regcomp.c:705
-msgid "No previous regular expression"
-msgstr "No hi ha una expressi regular prvia"
+#~ msgid ""
+#~ "E-mail bug reports to: <%s>.\n"
+#~ "Be sure to include the word ``%s'' somewhere in the ``Subject:'' field.\n"
+#~ msgstr ""
+#~ "Envieu informes d'error a: <%s>.\n"
+#~ "Assegureu-vos d'incloure la paraula %s en alguna part del camp "
+#~ "Assumpte:.\n"
#~ msgid "super-sed version %s\n"
#~ msgstr "super-sed versi %s\n"
diff --git a/po/cs.gmo b/po/cs.gmo
index 2d38e53..66a9087 100644
--- a/po/cs.gmo
+++ b/po/cs.gmo
Binary files differ
diff --git a/po/cs.po b/po/cs.po
index 0084e35..95cdbbe 100644
--- a/po/cs.po
+++ b/po/cs.po
@@ -2,220 +2,606 @@
# 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.
+# Petr Pisar <petr.pisar@atlas.cz>, 2008, 2010, 2016.
#
msgid ""
msgstr ""
-"Project-Id-Version: sed 4.2.1\n"
+"Project-Id-Version: sed 4.2.2\n"
"Report-Msgid-Bugs-To: bug-gnu-utils@gnu.org\n"
-"POT-Creation-Date: 2012-12-22 14:36+0100\n"
-"PO-Revision-Date: 2010-06-11 15:18+0200\n"
+"POT-Creation-Date: 2016-12-30 00:59-0800\n"
+"PO-Revision-Date: 2016-06-19 20:26+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"
"MIME-Version: 1.0\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=3; plural=(n==1) ? 0 : (n>=2 && n<=4) ? 1 : 2;\n"
-#: sed/compile.c:144
+#: lib/closeout.c:112
+msgid "write error"
+msgstr ""
+
+#: lib/copy-acl.c:54
+#, c-format
+msgid "preserving permissions for %s"
+msgstr ""
+
+#: lib/dfa.c:1025 lib/dfa.c:1028 lib/dfa.c:1047 lib/dfa.c:1057 lib/dfa.c:1070
+#: lib/dfa.c:1098 lib/dfa.c:1107 lib/dfa.c:1110 lib/dfa.c:1115 lib/dfa.c:1137
+#: lib/dfa.c:1140
+msgid "unbalanced ["
+msgstr ""
+
+#: lib/dfa.c:1083
+#, fuzzy
+msgid "invalid character class"
+msgstr "Chybný název třídu znaků"
+
+#: lib/dfa.c:1206
+msgid "character class syntax is [[:space:]], not [:space:]"
+msgstr ""
+
+#: lib/dfa.c:1275
+msgid "unfinished \\ escape"
+msgstr ""
+
+#: lib/dfa.c:1436
+#, fuzzy
+msgid "invalid content of \\{\\}"
+msgstr "Chybný obsah \\{\\}"
+
+#: lib/dfa.c:1439
+#, fuzzy
+msgid "regular expression too big"
+msgstr "Regulární výraz je příliš velký"
+
+#: lib/dfa.c:1853
+msgid "unbalanced ("
+msgstr ""
+
+#: lib/dfa.c:1980
+msgid "no syntax specified"
+msgstr ""
+
+#: lib/dfa.c:1988
+msgid "unbalanced )"
+msgstr ""
+
+#: lib/error.c:191
+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 ""
+
+#: lib/getopt.c:654 lib/getopt.c:658
+#, c-format
+msgid "%s: option '--%s' doesn't allow an argument\n"
+msgstr ""
+
+#: 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:715 lib/getopt.c:734
+#, c-format
+msgid "%s: option '--%s' requires an argument\n"
+msgstr ""
+
+#: 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
+#, 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
+#, 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 "Paměť vyčerpána"
+
+#. TRANSLATORS:
+#. Get translations for open and closing quotation marks.
+#. The message catalog should translate "`" to a left
+#. quotation mark suitable for the locale, and similarly for
+#. "'". For example, a French Unicode local should translate
+#. these to U+00AB (LEFT-POINTING DOUBLE ANGLE
+#. QUOTATION MARK), and U+00BB (RIGHT-POINTING DOUBLE ANGLE
+#. QUOTATION MARK), respectively.
+#.
+#. If the catalog has no translation, we will try to
+#. use Unicode U+2018 (LEFT SINGLE QUOTATION MARK) and
+#. Unicode U+2019 (RIGHT SINGLE QUOTATION MARK). If the
+#. current locale is not Unicode, locale_quoting_style
+#. will quote 'like this', and clocale_quoting_style will
+#. quote "like this". You should always include translations
+#. for "`" and "'" even if U+2018 and U+2019 are appropriate
+#. for your locale.
+#.
+#. If you don't know what to put here, please see
+#. <http://en.wikipedia.org/wiki/Quotation_marks_in_other_languages>
+#. and use glyphs suitable for your language.
+#: lib/quotearg.c:354
+msgid "`"
+msgstr ""
+
+#: lib/quotearg.c:355
+msgid "'"
+msgstr ""
+
+#: lib/regcomp.c:135
+msgid "Success"
+msgstr "Úspěch"
+
+#: lib/regcomp.c:138
+msgid "No match"
+msgstr "Žádná shoda"
+
+#: lib/regcomp.c:141
+msgid "Invalid regular expression"
+msgstr "Chybný regulární výraz"
+
+#: lib/regcomp.c:144
+msgid "Invalid collation character"
+msgstr "Chybný srovnávací znak"
+
+#: lib/regcomp.c:147
+msgid "Invalid character class name"
+msgstr "Chybný název třídu znaků"
+
+#: lib/regcomp.c:150
+msgid "Trailing backslash"
+msgstr "Zpětné lomítko na konci"
+
+#: lib/regcomp.c:153
+msgid "Invalid back reference"
+msgstr "Chybný zpětný odkaz"
+
+#: lib/regcomp.c:156
+#, fuzzy
+msgid "Unmatched [, [^, [:, [., or [="
+msgstr "Neodpovídající [ nebo [^"
+
+#: lib/regcomp.c:159
+msgid "Unmatched ( or \\("
+msgstr "Neodpovídající ( nebo \\("
+
+#: lib/regcomp.c:162
+msgid "Unmatched \\{"
+msgstr "Neodpovídající \\{"
+
+#: lib/regcomp.c:165
+msgid "Invalid content of \\{\\}"
+msgstr "Chybný obsah \\{\\}"
+
+#: lib/regcomp.c:168
+msgid "Invalid range end"
+msgstr "Chybný konec rozsahu"
+
+#: lib/regcomp.c:171
+msgid "Memory exhausted"
+msgstr "Paměť vyčerpána"
+
+#: lib/regcomp.c:174
+msgid "Invalid preceding regular expression"
+msgstr "Chybný předešlý regulární výraz"
+
+#: lib/regcomp.c:177
+msgid "Premature end of regular expression"
+msgstr "Předčasný konec regulárního výrazu"
+
+#: lib/regcomp.c:180
+msgid "Regular expression too big"
+msgstr "Regulární výraz je příliš velký"
+
+#: lib/regcomp.c:183
+msgid "Unmatched ) or \\)"
+msgstr "Neodpovídající ) nebo \\)"
+
+#: lib/regcomp.c:687
+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 ""
+
+#: lib/version-etc.c:74
+#, c-format
+msgid "Packaged by %s (%s)\n"
+msgstr ""
+
+#: lib/version-etc.c:77
+#, c-format
+msgid "Packaged by %s\n"
+msgstr ""
+
+#. 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 ""
+
+#: lib/version-etc.c:86
+msgid ""
+"\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"
+msgstr ""
+
+#. TRANSLATORS: %s denotes an author name.
+#: lib/version-etc.c:102
+#, c-format
+msgid "Written by %s.\n"
+msgstr ""
+
+#. TRANSLATORS: Each %s denotes an author name.
+#: lib/version-etc.c:106
+#, c-format
+msgid "Written by %s and %s.\n"
+msgstr ""
+
+#. TRANSLATORS: Each %s denotes an author name.
+#: lib/version-etc.c:110
+#, c-format
+msgid "Written by %s, %s, and %s.\n"
+msgstr ""
+
+#. TRANSLATORS: Each %s denotes an author name.
+#. You can use line breaks, estimating that each author name occupies
+#. ca. 16 screen columns and that a screen line has ca. 80 columns.
+#: lib/version-etc.c:117
+#, c-format
+msgid ""
+"Written by %s, %s, %s,\n"
+"and %s.\n"
+msgstr ""
+
+#. TRANSLATORS: Each %s denotes an author name.
+#. You can use line breaks, estimating that each author name occupies
+#. ca. 16 screen columns and that a screen line has ca. 80 columns.
+#: lib/version-etc.c:124
+#, c-format
+msgid ""
+"Written by %s, %s, %s,\n"
+"%s, and %s.\n"
+msgstr ""
+
+#. TRANSLATORS: Each %s denotes an author name.
+#. You can use line breaks, estimating that each author name occupies
+#. ca. 16 screen columns and that a screen line has ca. 80 columns.
+#: lib/version-etc.c:131
+#, c-format
+msgid ""
+"Written by %s, %s, %s,\n"
+"%s, %s, and %s.\n"
+msgstr ""
+
+#. TRANSLATORS: Each %s denotes an author name.
+#. You can use line breaks, estimating that each author name occupies
+#. ca. 16 screen columns and that a screen line has ca. 80 columns.
+#: lib/version-etc.c:139
+#, c-format
+msgid ""
+"Written by %s, %s, %s,\n"
+"%s, %s, %s, and %s.\n"
+msgstr ""
+
+#. TRANSLATORS: Each %s denotes an author name.
+#. You can use line breaks, estimating that each author name occupies
+#. ca. 16 screen columns and that a screen line has ca. 80 columns.
+#: lib/version-etc.c:147
+#, c-format
+msgid ""
+"Written by %s, %s, %s,\n"
+"%s, %s, %s, %s,\n"
+"and %s.\n"
+msgstr ""
+
+#. TRANSLATORS: Each %s denotes an author name.
+#. You can use line breaks, estimating that each author name occupies
+#. ca. 16 screen columns and that a screen line has ca. 80 columns.
+#: lib/version-etc.c:156
+#, c-format
+msgid ""
+"Written by %s, %s, %s,\n"
+"%s, %s, %s, %s,\n"
+"%s, and %s.\n"
+msgstr ""
+
+#. TRANSLATORS: Each %s denotes an author name.
+#. You can use line breaks, estimating that each author name occupies
+#. ca. 16 screen columns and that a screen line has ca. 80 columns.
+#: lib/version-etc.c:167
+#, c-format
+msgid ""
+"Written by %s, %s, %s,\n"
+"%s, %s, %s, %s,\n"
+"%s, %s, and others.\n"
+msgstr ""
+
+#. TRANSLATORS: The placeholder indicates the bug-reporting address
+#. for this package. Please add _another line_ saying
+#. "Report translation bugs to <...>\n" with the address for translation
+#. bugs (typically your translation team's web or email address).
+#: lib/version-etc.c:245
+#, c-format
+msgid ""
+"\n"
+"Report bugs to: %s\n"
+msgstr ""
+
+#: lib/version-etc.c:247
+#, c-format
+msgid "Report %s bugs to: %s\n"
+msgstr ""
+
+#: lib/version-etc.c:251
+#, c-format
+msgid "%s home page: <%s>\n"
+msgstr ""
+
+#: lib/version-etc.c:253
+#, c-format
+msgid "%s home page: <http://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"
+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"
+
+#: sed/compile.c:146
msgid "multiple `!'s"
msgstr "vícenásobný „!“"
-#: sed/compile.c:145
+#: sed/compile.c:147
msgid "unexpected `,'"
msgstr "neočekávaná „,“"
-#: sed/compile.c:146
+#: sed/compile.c:149
msgid "invalid usage of +N or ~N as first address"
msgstr "+N nebo ~N nelze použít jako první adresu"
-#: sed/compile.c:147
+#: sed/compile.c:150
msgid "unmatched `{'"
msgstr "neodpovídající „{“"
-#: sed/compile.c:148
+#: sed/compile.c:151
msgid "unexpected `}'"
msgstr "neočekávaná „}“"
-#: sed/compile.c:149
+#: sed/compile.c:153
msgid "extra characters after command"
msgstr "nadbytečné znaky po příkazu"
-#: sed/compile.c:150
+#: sed/compile.c:155
msgid "expected \\ after `a', `c' or `i'"
msgstr "po „a“, „c“ nebo „i“ je očekávané „\\“"
-#: sed/compile.c:151
+#: sed/compile.c:157
msgid "`}' doesn't want any addresses"
msgstr "„}“ nevyžaduje jakoukoliv adresu"
-#: sed/compile.c:152
+#: sed/compile.c:159
msgid ": doesn't want any addresses"
msgstr ": nechce jakoukoliv adresu"
-#: sed/compile.c:153
+#: sed/compile.c:161
msgid "comments don't accept any addresses"
msgstr "komentáře nepřipouštějí žádnou adresu"
-#: sed/compile.c:154
+#: sed/compile.c:162
msgid "missing command"
msgstr "chybějící příkaz"
-#: sed/compile.c:155
+#: sed/compile.c:163
msgid "command only uses one address"
msgstr "příkaz používá pouze jedinou adresu"
-#: sed/compile.c:156
+#: sed/compile.c:164
msgid "unterminated address regex"
msgstr "neukončená adresa regulárního výrazu"
-#: sed/compile.c:157
+#: sed/compile.c:165
msgid "unterminated `s' command"
msgstr "neukončený příkaz „s“"
-#: sed/compile.c:158
+#: sed/compile.c:166
msgid "unterminated `y' command"
msgstr "neukončený příkaz „y“"
-#: sed/compile.c:159
+#: sed/compile.c:167
msgid "unknown option to `s'"
msgstr "neznámý přepínač pro „s“"
-#: sed/compile.c:160
+#: sed/compile.c:169
msgid "multiple `p' options to `s' command"
msgstr "vícenásobné použití přepínače „p“ s příkazem „s“"
-#: sed/compile.c:161
+#: sed/compile.c:171
msgid "multiple `g' options to `s' command"
msgstr "vícenásobné použití přepínače „g“ s příkazem „s“"
-#: sed/compile.c:162
+#: sed/compile.c:173
msgid "multiple number options to `s' command"
msgstr "příkaz „s“ může mít maximálně jednu číselný přepínač"
-#: sed/compile.c:163
+#: sed/compile.c:175
msgid "number option to `s' command may not be zero"
msgstr "číselný přepínač příkazu „s“ nemůže být nula"
-#: sed/compile.c:164
+#: sed/compile.c:177
msgid "strings for `y' command are different lengths"
msgstr "řetězce pro příkaz „y“ mají rozdílnou délku"
-#: sed/compile.c:165
+#: sed/compile.c:179
msgid "delimiter character is not a single-byte character"
msgstr "oddělovací znak není jednobajtovým znakem"
-#: sed/compile.c:166
+#: sed/compile.c:181
msgid "expected newer version of sed"
msgstr "očekávána nová verze sedu"
-#: sed/compile.c:167
+#: sed/compile.c:183
msgid "invalid usage of line address 0"
msgstr "chybné použití adresy řádku 0"
-#: sed/compile.c:168
+#: sed/compile.c:184
#, c-format
msgid "unknown command: `%c'"
msgstr "neznámý příkaz: „%c“"
-#: sed/compile.c:169
-#, fuzzy
+#: sed/compile.c:186
msgid "incomplete command"
-msgstr "chybějící příkaz"
+msgstr "neúplný příkaz"
+
+#: sed/compile.c:188
+msgid "\":\" lacks a label"
+msgstr ""
+
+#: sed/compile.c:190
+msgid "recursive escaping after \\c not allowed"
+msgstr ""
-#: sed/compile.c:192
+#: sed/compile.c:213
#, c-format
msgid "%s: file %s line %lu: %s\n"
msgstr "%s: soubor %s, řádek %'lu: %s\n"
-#: sed/compile.c:195
+#: sed/compile.c:216
#, c-format
msgid "%s: -e expression #%lu, char %lu: %s\n"
msgstr "%s: -e výraz č. %'lu, znak %'lu: %s\n"
-#: sed/compile.c:1657
+#: sed/compile.c:1639
#, 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:595
+#: sed/execute.c:264 sed/execute.c:281
+#, c-format
+msgid "case conversion produced an invalid character"
+msgstr ""
+
+#: sed/execute.c:575
#, c-format
msgid "%s: can't read %s: %s\n"
msgstr "%s: %s nelze číst: %s\n"
-#: sed/execute.c:624
+#: sed/execute.c:600
#, c-format
msgid "couldn't edit %s: is a terminal"
msgstr "%s nelze upravovat: je to terminál"
-#: sed/execute.c:629
+#: sed/execute.c:605
#, c-format
msgid "couldn't edit %s: not a regular file"
msgstr "%s nelze upravovat: není obyčejným souborem"
-#: sed/execute.c:640
+#: sed/execute.c:616
#, 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:647
+#: sed/execute.c:624
#, 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:664 sed/utils.c:211
+#: sed/execute.c:643 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:1193 sed/execute.c:1373
+#: sed/execute.c:1158 sed/execute.c:1368
msgid "error in subprocess"
msgstr "chyba v podprocesu"
-#: sed/execute.c:1195
+#: sed/execute.c:1160
msgid "option `e' not supported"
msgstr "přepínač „e“ není podporován"
-#: sed/execute.c:1375
+#: sed/execute.c:1349
msgid "`e' command not supported"
msgstr "příkaz „e“ není podporován"
-#: sed/execute.c:1725
+#: sed/execute.c:1675
msgid "no input files"
msgstr "žádné vstupní soubory"
-#: sed/regexp.c:39
+#: sed/regexp.c:38
msgid "no previous regular expression"
msgstr "žádný předcházející regulární výraz"
-#: sed/regexp.c:40
-msgid "cannot specify modifiers on empty regexp"
-msgstr "prázdný regulární výraz nemůže mít modifikátory"
-
-#: sed/regexp.c:129
+#: sed/regexp.c:138
#, c-format
msgid "invalid reference \\%d on `s' command's RHS"
msgstr "chybný odkaz \\%d na pravé straně příkazu „s“"
-#: sed/sed.c:32
+#: sed/sed.c:35
msgid "Jay Fenlason"
-msgstr ""
+msgstr "Jay Fenlason"
-#: sed/sed.c:33
+#: sed/sed.c:36
msgid "Tom Lord"
-msgstr ""
+msgstr "Tom Lord"
-#: sed/sed.c:34
+#: sed/sed.c:37
msgid "Ken Pizzini"
-msgstr ""
+msgstr "Ken Pizzini"
-#: sed/sed.c:35
+#: sed/sed.c:38
msgid "Paolo Bonzini"
-msgstr ""
+msgstr "Paolo Bonzini"
-#: sed/sed.c:79
+#: sed/sed.c:113
#, c-format
msgid ""
"GNU sed home page: <http://www.gnu.org/software/sed/>.\n"
@@ -224,17 +610,12 @@ 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"
-#: sed/sed.c:86
+#: sed/sed.c:120
#, c-format
-msgid ""
-"E-mail bug reports to: <%s>.\n"
-"Be sure to include the word ``%s'' somewhere in the ``Subject:'' field.\n"
+msgid "E-mail bug reports to: <%s>.\n"
msgstr ""
-"Chyby v programu oznamujte na: <%s> (anglicky)\n"
-"Kamkoliv do položky „Předmět:“ vložte „%s“. Připomínky k překladu\n"
-"zasílejte na adresu <translation-team-cs@lists.sourceforge.net> (česky).\n"
-#: sed/sed.c:99
+#: sed/sed.c:129
msgid ""
" -R, --regexp-perl\n"
" use Perl 5's regular expressions syntax in the script.\n"
@@ -242,7 +623,7 @@ msgstr ""
" -R, --regexp-perl\n"
" použije syntaxi regulárních výrazů podle Perlu verze 5\n"
-#: sed/sed.c:104
+#: sed/sed.c:134
#, c-format
msgid ""
"Usage: %s [OPTION]... {script-only-if-no-other-script} [input-file]...\n"
@@ -251,7 +632,7 @@ msgstr ""
"Použití: %s [PŘEPÍNAČ]… {SKRIPT_JEN_KDYŽ_JE_JEDINÝ} [VSTUPNÍ_SOUBOR]…\n"
"\n"
-#: sed/sed.c:108
+#: sed/sed.c:138
#, c-format
msgid ""
" -n, --quiet, --silent\n"
@@ -260,7 +641,7 @@ msgstr ""
" -n, --quiet, --silent\n"
" potlačí automatické vypisování prostoru vzorů\n"
-#: sed/sed.c:110
+#: sed/sed.c:140
#, c-format
msgid ""
" -e script, --expression=script\n"
@@ -269,7 +650,7 @@ msgstr ""
" -e script, --expression=SKRIPT\n"
" přidá skript mezi příkazy k provedení\n"
-#: sed/sed.c:112
+#: sed/sed.c:142
#, c-format
msgid ""
" -f script-file, --file=script-file\n"
@@ -279,7 +660,7 @@ msgstr ""
" -f script-file, --file=SKRIPTOVÝ_SOUBOR\n"
" přidá obsah SKRIPTOVÉHO_SOUBORU mezi příkazy k provedení\n"
-#: sed/sed.c:115
+#: sed/sed.c:146
#, c-format
msgid ""
" --follow-symlinks\n"
@@ -289,8 +670,8 @@ msgstr ""
" následuje symbolické odkazy, když zapisuje do vstupního\n"
" souboru\n"
-#: sed/sed.c:118
-#, fuzzy, c-format
+#: sed/sed.c:149
+#, c-format
msgid ""
" -i[SUFFIX], --in-place[=SUFFIX]\n"
" edit files in place (makes backup if SUFFIX supplied)\n"
@@ -299,7 +680,7 @@ msgstr ""
" upravuje přímo vstupní soubory (vytváří zálohy, pokud je\n"
" poskytnuta PŘÍPONA)\n"
-#: sed/sed.c:121
+#: sed/sed.c:153
#, c-format
msgid ""
" -b, --binary\n"
@@ -310,7 +691,7 @@ msgstr ""
" otevře soubory v binárním režimu (znaky CR+LF nejsou\n"
" zpracovávány zvláštně)\n"
-#: sed/sed.c:124
+#: sed/sed.c:157
#, c-format
msgid ""
" -l N, --line-length=N\n"
@@ -319,7 +700,7 @@ msgstr ""
" -l N, --line-length=N\n"
" určuje délku zarovnání řádku u příkazu „l“\n"
-#: sed/sed.c:126
+#: sed/sed.c:159
#, c-format
msgid ""
" --posix\n"
@@ -328,28 +709,37 @@ msgstr ""
" --posix\n"
" vypne všechna GNU rozšíření\n"
-#: sed/sed.c:128
-#, c-format
+#: sed/sed.c:161
+#, fuzzy, c-format
msgid ""
-" -r, --regexp-extended\n"
-" use extended regular expressions in the script.\n"
+" -E, -r, --regexp-extended\n"
+" use extended regular expressions in the script\n"
+" (for portability use POSIX -E).\n"
msgstr ""
" -r, --regexp-extended\n"
" použije rozšířené regulární výrazy\n"
-#: sed/sed.c:133
-#, c-format
+#: sed/sed.c:167
+#, fuzzy, c-format
msgid ""
" -s, --separate\n"
-" consider files as separate rather than as a single "
-"continuous\n"
-" long stream.\n"
+" consider files as separate rather than as a single,\n"
+" continuous long stream.\n"
msgstr ""
" -s, --separate\n"
" považuje soubory za samostatné a ne za jeden dlouhý\n"
" souvislý proud\n"
-#: sed/sed.c:136
+#: sed/sed.c:170
+#, fuzzy, c-format
+msgid ""
+" --sandbox\n"
+" operate in sandbox mode.\n"
+msgstr ""
+" -z, --null-data\n"
+" oddělí řádky znaky NUL\n"
+
+#: sed/sed.c:172
#, c-format
msgid ""
" -u, --unbuffered\n"
@@ -361,24 +751,26 @@ msgstr ""
" čte co nejméně dat ze vstupních souborů a výstupní\n"
" buffery vyprazdňuje častěji\n"
-#: sed/sed.c:139
+#: sed/sed.c:175
#, c-format
msgid ""
" -z, --null-data\n"
" separate lines by NUL characters\n"
msgstr ""
+" -z, --null-data\n"
+" oddělí řádky znaky NUL\n"
-#: sed/sed.c:141
+#: sed/sed.c:177
#, c-format
msgid " --help display this help and exit\n"
msgstr " --help zobrazí tuto nápovědu a skončí\n"
-#: sed/sed.c:142
+#: sed/sed.c:178
#, c-format
msgid " --version output version information and exit\n"
msgstr " --version vypíše informace o verzi a skončí\n"
-#: sed/sed.c:143
+#: sed/sed.c:179
#, c-format
msgid ""
"\n"
@@ -396,120 +788,59 @@ msgstr ""
"zadány žádné vstupní soubory, bude čten standardní vstup.\n"
"\n"
-#: sed/utils.c:74 sed/utils.c:432
+#: sed/utils.c:73 sed/utils.c:384
#, c-format
msgid "cannot remove %s: %s"
msgstr "%s nelze odstranit: %s"
-#: sed/utils.c:144
+#: sed/utils.c:136
#, c-format
msgid "couldn't open file %s: %s"
msgstr "soubor %s nelze otevřít: %s"
-#: sed/utils.c:167
+#: sed/utils.c:155
#, c-format
msgid "couldn't attach to %s: %s"
msgstr "do %s nelze připisovat: %s"
-#: sed/utils.c:229
-#, c-format
-msgid "couldn't write %d item to %s: %s"
-msgid_plural "couldn't write %d items to %s: %s"
+#: sed/utils.c:192
+#, fuzzy, 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"
-#: sed/utils.c:244 sed/utils.c:267
+#: sed/utils.c:204 sed/utils.c:223
#, c-format
msgid "read error on %s: %s"
msgstr "chyba při čtení z %s: %s"
-#: sed/utils.c:372
+#: sed/utils.c:325
#, c-format
msgid "couldn't follow symlink %s: %s"
msgstr "symbolický odkaz %s nelze následovat: %s"
-#: sed/utils.c:406
+#: sed/utils.c:359
#, c-format
msgid "cannot stat %s: %s"
msgstr "o %s nelze získat údaje: %s"
-#: sed/utils.c:437
+#: sed/utils.c:389
#, c-format
msgid "cannot rename %s: %s"
msgstr "%s nelze přejmenovat: %s"
-#: lib/regcomp.c:132
-msgid "Success"
-msgstr "Úspěch"
-
-#: lib/regcomp.c:135
-msgid "No match"
-msgstr "Žádná shoda"
-
-#: lib/regcomp.c:138
-msgid "Invalid regular expression"
-msgstr "Chybný regulární výraz"
-
-#: lib/regcomp.c:141
-msgid "Invalid collation character"
-msgstr "Chybný srovnávací znak"
-
-#: lib/regcomp.c:144
-msgid "Invalid character class name"
-msgstr "Chybný název třídu znaků"
-
-#: lib/regcomp.c:147
-msgid "Trailing backslash"
-msgstr "Zpětné lomítko na konci"
-
-#: lib/regcomp.c:150
-msgid "Invalid back reference"
-msgstr "Chybný zpětný odkaz"
-
-#: lib/regcomp.c:153
-msgid "Unmatched [ or [^"
-msgstr "Neodpovídající [ nebo [^"
-
-#: lib/regcomp.c:156
-msgid "Unmatched ( or \\("
-msgstr "Neodpovídající ( nebo \\("
-
-#: lib/regcomp.c:159
-msgid "Unmatched \\{"
-msgstr "Neodpovídající \\{"
-
-#: lib/regcomp.c:162
-msgid "Invalid content of \\{\\}"
-msgstr "Chybný obsah \\{\\}"
-
-#: lib/regcomp.c:165
-msgid "Invalid range end"
-msgstr "Chybný konec rozsahu"
-
-#: lib/regcomp.c:168
-msgid "Memory exhausted"
-msgstr "Paměť vyčerpána"
-
-#: lib/regcomp.c:171
-msgid "Invalid preceding regular expression"
-msgstr "Chybný předešlý regulární výraz"
-
-#: lib/regcomp.c:174
-msgid "Premature end of regular expression"
-msgstr "Předčasný konec regulárního výrazu"
-
-#: lib/regcomp.c:177
-msgid "Regular expression too big"
-msgstr "Regulární výraz je příliš velký"
+#~ msgid "cannot specify modifiers on empty regexp"
+#~ msgstr "prázdný regulární výraz nemůže mít modifikátory"
-#: lib/regcomp.c:180
-msgid "Unmatched ) or \\)"
-msgstr "Neodpovídající ) nebo \\)"
-
-#: lib/regcomp.c:705
-msgid "No previous regular expression"
-msgstr "Žádný předcházející regulární výraz"
+#~ msgid ""
+#~ "E-mail bug reports to: <%s>.\n"
+#~ "Be sure to include the word ``%s'' somewhere in the ``Subject:'' field.\n"
+#~ msgstr ""
+#~ "Chyby v programu oznamujte na: <%s> (anglicky)\n"
+#~ "Kamkoliv do položky „Předmět:“ vložte „%s“. Připomínky k překladu\n"
+#~ "zasílejte na adresu <translation-team-cs@lists.sourceforge.net> (česky).\n"
#~ msgid "super-sed version %s\n"
#~ msgstr "super-sed verze %s\n"
diff --git a/po/da.gmo b/po/da.gmo
index 534263d..5621c24 100644
--- a/po/da.gmo
+++ b/po/da.gmo
Binary files differ
diff --git a/po/da.po b/po/da.po
index ce5c9be..0690e09 100644
--- a/po/da.po
+++ b/po/da.po
@@ -1,221 +1,607 @@
# Danish messages for sed
# This file is distributed under the same license as the sed package.
-# Copyright (C) 2001 Free Software Foundation, Inc.
+# Copyright (C) 2001, 2016 Free Software Foundation, Inc.
#
# Byrial Ole Jensen <byrial@image.dk>, 2001-2003.
-# Ask Hjorth Larsen <asklarsen@gmail.com>, 2010.
+# Ask Hjorth Larsen <asklarsen@gmail.com>, 2010, 2016.
msgid ""
msgstr ""
-"Project-Id-Version: sed-4.2.1\n"
+"Project-Id-Version: sed-4.2.2\n"
"Report-Msgid-Bugs-To: bug-gnu-utils@gnu.org\n"
-"POT-Creation-Date: 2012-12-22 14:36+0100\n"
-"PO-Revision-Date: 2010-07-18 12:47+0200\n"
+"POT-Creation-Date: 2016-12-30 00:59-0800\n"
+"PO-Revision-Date: 2016-10-15 19:06+0200\n"
"Last-Translator: Ask Hjorth Larsen <asklarsen@gmail.com>\n"
"Language-Team: Danish <dansk@dansk-gruppen.dk>\n"
"Language: da\n"
"MIME-Version: 1.0\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"
-#: sed/compile.c:144
+#: lib/closeout.c:112
+msgid "write error"
+msgstr ""
+
+#: lib/copy-acl.c:54
+#, c-format
+msgid "preserving permissions for %s"
+msgstr ""
+
+#: lib/dfa.c:1025 lib/dfa.c:1028 lib/dfa.c:1047 lib/dfa.c:1057 lib/dfa.c:1070
+#: lib/dfa.c:1098 lib/dfa.c:1107 lib/dfa.c:1110 lib/dfa.c:1115 lib/dfa.c:1137
+#: lib/dfa.c:1140
+msgid "unbalanced ["
+msgstr ""
+
+#: lib/dfa.c:1083
+#, fuzzy
+msgid "invalid character class"
+msgstr "Ugyldigt navn på tegnklasse"
+
+#: lib/dfa.c:1206
+msgid "character class syntax is [[:space:]], not [:space:]"
+msgstr ""
+
+#: lib/dfa.c:1275
+msgid "unfinished \\ escape"
+msgstr ""
+
+#: lib/dfa.c:1436
+#, fuzzy
+msgid "invalid content of \\{\\}"
+msgstr "Ugyldigt indhold af \\{\\}"
+
+#: lib/dfa.c:1439
+#, fuzzy
+msgid "regular expression too big"
+msgstr "Regulært udtryk for stort"
+
+#: lib/dfa.c:1853
+msgid "unbalanced ("
+msgstr ""
+
+#: lib/dfa.c:1980
+msgid "no syntax specified"
+msgstr ""
+
+#: lib/dfa.c:1988
+msgid "unbalanced )"
+msgstr ""
+
+#: lib/error.c:191
+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 ""
+
+#: lib/getopt.c:654 lib/getopt.c:658
+#, c-format
+msgid "%s: option '--%s' doesn't allow an argument\n"
+msgstr ""
+
+#: 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:715 lib/getopt.c:734
+#, c-format
+msgid "%s: option '--%s' requires an argument\n"
+msgstr ""
+
+#: 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
+#, 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
+#, 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 "Hukommelsen opbrugt"
+
+#. TRANSLATORS:
+#. Get translations for open and closing quotation marks.
+#. The message catalog should translate "`" to a left
+#. quotation mark suitable for the locale, and similarly for
+#. "'". For example, a French Unicode local should translate
+#. these to U+00AB (LEFT-POINTING DOUBLE ANGLE
+#. QUOTATION MARK), and U+00BB (RIGHT-POINTING DOUBLE ANGLE
+#. QUOTATION MARK), respectively.
+#.
+#. If the catalog has no translation, we will try to
+#. use Unicode U+2018 (LEFT SINGLE QUOTATION MARK) and
+#. Unicode U+2019 (RIGHT SINGLE QUOTATION MARK). If the
+#. current locale is not Unicode, locale_quoting_style
+#. will quote 'like this', and clocale_quoting_style will
+#. quote "like this". You should always include translations
+#. for "`" and "'" even if U+2018 and U+2019 are appropriate
+#. for your locale.
+#.
+#. If you don't know what to put here, please see
+#. <http://en.wikipedia.org/wiki/Quotation_marks_in_other_languages>
+#. and use glyphs suitable for your language.
+#: lib/quotearg.c:354
+msgid "`"
+msgstr ""
+
+#: lib/quotearg.c:355
+msgid "'"
+msgstr ""
+
+#: lib/regcomp.c:135
+msgid "Success"
+msgstr "Godt resultat"
+
+#: lib/regcomp.c:138
+msgid "No match"
+msgstr "Intet resultat"
+
+#: lib/regcomp.c:141
+msgid "Invalid regular expression"
+msgstr "Ugyldigt regulært udtryk"
+
+#: lib/regcomp.c:144
+msgid "Invalid collation character"
+msgstr "Ugyldigt sorteringstegn"
+
+#: lib/regcomp.c:147
+msgid "Invalid character class name"
+msgstr "Ugyldigt navn på tegnklasse"
+
+#: lib/regcomp.c:150
+msgid "Trailing backslash"
+msgstr "Afsluttende omvendt skråstreg"
+
+#: lib/regcomp.c:153
+msgid "Invalid back reference"
+msgstr "Ugyldig reference bagud"
+
+#: lib/regcomp.c:156
+#, fuzzy
+msgid "Unmatched [, [^, [:, [., or [="
+msgstr "Uparret [ eller [^"
+
+#: lib/regcomp.c:159
+msgid "Unmatched ( or \\("
+msgstr "Uparret ( eller \\("
+
+#: lib/regcomp.c:162
+msgid "Unmatched \\{"
+msgstr "Uparret \\{"
+
+#: lib/regcomp.c:165
+msgid "Invalid content of \\{\\}"
+msgstr "Ugyldigt indhold af \\{\\}"
+
+#: lib/regcomp.c:168
+msgid "Invalid range end"
+msgstr "Ugyldig slutning på område"
+
+#: lib/regcomp.c:171
+msgid "Memory exhausted"
+msgstr "Hukommelsen opbrugt"
+
+#: lib/regcomp.c:174
+msgid "Invalid preceding regular expression"
+msgstr "Ugyldigt forudgående regulært udtryk"
+
+#: lib/regcomp.c:177
+msgid "Premature end of regular expression"
+msgstr "Ufuldstændigt regulært udtryk"
+
+#: lib/regcomp.c:180
+msgid "Regular expression too big"
+msgstr "Regulært udtryk for stort"
+
+#: lib/regcomp.c:183
+msgid "Unmatched ) or \\)"
+msgstr "Uparret ) eller \\)"
+
+#: lib/regcomp.c:687
+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 ""
+
+#: lib/version-etc.c:74
+#, c-format
+msgid "Packaged by %s (%s)\n"
+msgstr ""
+
+#: lib/version-etc.c:77
+#, c-format
+msgid "Packaged by %s\n"
+msgstr ""
+
+#. 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 ""
+
+#: lib/version-etc.c:86
+msgid ""
+"\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"
+msgstr ""
+
+#. TRANSLATORS: %s denotes an author name.
+#: lib/version-etc.c:102
+#, c-format
+msgid "Written by %s.\n"
+msgstr ""
+
+#. TRANSLATORS: Each %s denotes an author name.
+#: lib/version-etc.c:106
+#, c-format
+msgid "Written by %s and %s.\n"
+msgstr ""
+
+#. TRANSLATORS: Each %s denotes an author name.
+#: lib/version-etc.c:110
+#, c-format
+msgid "Written by %s, %s, and %s.\n"
+msgstr ""
+
+#. TRANSLATORS: Each %s denotes an author name.
+#. You can use line breaks, estimating that each author name occupies
+#. ca. 16 screen columns and that a screen line has ca. 80 columns.
+#: lib/version-etc.c:117
+#, c-format
+msgid ""
+"Written by %s, %s, %s,\n"
+"and %s.\n"
+msgstr ""
+
+#. TRANSLATORS: Each %s denotes an author name.
+#. You can use line breaks, estimating that each author name occupies
+#. ca. 16 screen columns and that a screen line has ca. 80 columns.
+#: lib/version-etc.c:124
+#, c-format
+msgid ""
+"Written by %s, %s, %s,\n"
+"%s, and %s.\n"
+msgstr ""
+
+#. TRANSLATORS: Each %s denotes an author name.
+#. You can use line breaks, estimating that each author name occupies
+#. ca. 16 screen columns and that a screen line has ca. 80 columns.
+#: lib/version-etc.c:131
+#, c-format
+msgid ""
+"Written by %s, %s, %s,\n"
+"%s, %s, and %s.\n"
+msgstr ""
+
+#. TRANSLATORS: Each %s denotes an author name.
+#. You can use line breaks, estimating that each author name occupies
+#. ca. 16 screen columns and that a screen line has ca. 80 columns.
+#: lib/version-etc.c:139
+#, c-format
+msgid ""
+"Written by %s, %s, %s,\n"
+"%s, %s, %s, and %s.\n"
+msgstr ""
+
+#. TRANSLATORS: Each %s denotes an author name.
+#. You can use line breaks, estimating that each author name occupies
+#. ca. 16 screen columns and that a screen line has ca. 80 columns.
+#: lib/version-etc.c:147
+#, c-format
+msgid ""
+"Written by %s, %s, %s,\n"
+"%s, %s, %s, %s,\n"
+"and %s.\n"
+msgstr ""
+
+#. TRANSLATORS: Each %s denotes an author name.
+#. You can use line breaks, estimating that each author name occupies
+#. ca. 16 screen columns and that a screen line has ca. 80 columns.
+#: lib/version-etc.c:156
+#, c-format
+msgid ""
+"Written by %s, %s, %s,\n"
+"%s, %s, %s, %s,\n"
+"%s, and %s.\n"
+msgstr ""
+
+#. TRANSLATORS: Each %s denotes an author name.
+#. You can use line breaks, estimating that each author name occupies
+#. ca. 16 screen columns and that a screen line has ca. 80 columns.
+#: lib/version-etc.c:167
+#, c-format
+msgid ""
+"Written by %s, %s, %s,\n"
+"%s, %s, %s, %s,\n"
+"%s, %s, and others.\n"
+msgstr ""
+
+#. TRANSLATORS: The placeholder indicates the bug-reporting address
+#. for this package. Please add _another line_ saying
+#. "Report translation bugs to <...>\n" with the address for translation
+#. bugs (typically your translation team's web or email address).
+#: lib/version-etc.c:245
+#, c-format
+msgid ""
+"\n"
+"Report bugs to: %s\n"
+msgstr ""
+
+#: lib/version-etc.c:247
+#, c-format
+msgid "Report %s bugs to: %s\n"
+msgstr ""
+
+#: lib/version-etc.c:251
+#, c-format
+msgid "%s home page: <%s>\n"
+msgstr ""
+
+#: lib/version-etc.c:253
+#, c-format
+msgid "%s home page: <http://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"
+msgstr ""
+"Hjemmeside for GNU sed: <http://www.gnu.org/software/sed/>.\n"
+"Generel hjælp til GNU-programmer: <http://www.gnu.org/gethelp/>.\n"
+
+#: sed/compile.c:146
msgid "multiple `!'s"
msgstr "flere '!'"
-#: sed/compile.c:145
+#: sed/compile.c:147
msgid "unexpected `,'"
msgstr "uventet ','"
-#: sed/compile.c:146
+#: sed/compile.c:149
msgid "invalid usage of +N or ~N as first address"
msgstr "ugyldig brug af +N eller ~N som første adresse"
-#: sed/compile.c:147
+#: sed/compile.c:150
msgid "unmatched `{'"
msgstr "uparret '{'"
-#: sed/compile.c:148
+#: sed/compile.c:151
msgid "unexpected `}'"
msgstr "uventet '}'"
-#: sed/compile.c:149
+#: sed/compile.c:153
msgid "extra characters after command"
msgstr "ekstra tegn efter kommando"
-#: sed/compile.c:150
+#: sed/compile.c:155
msgid "expected \\ after `a', `c' or `i'"
msgstr "forventede \\ efter 'a', 'c' eller 'i'"
-#: sed/compile.c:151
+#: sed/compile.c:157
msgid "`}' doesn't want any addresses"
msgstr "'}' vil ikke have adresser"
-#: sed/compile.c:152
+#: sed/compile.c:159
msgid ": doesn't want any addresses"
msgstr ": vil ikke have adresser"
-#: sed/compile.c:153
+#: sed/compile.c:161
msgid "comments don't accept any addresses"
msgstr "kommentarer vil ikke have adresser"
-#: sed/compile.c:154
+#: sed/compile.c:162
msgid "missing command"
msgstr "der mangler en kommando"
-#: sed/compile.c:155
+#: sed/compile.c:163
msgid "command only uses one address"
msgstr "kommandoen bruger kun én adresse"
-#: sed/compile.c:156
+#: sed/compile.c:164
msgid "unterminated address regex"
msgstr "uafsluttet regulært udtryk for adresse"
-#: sed/compile.c:157
+#: sed/compile.c:165
msgid "unterminated `s' command"
msgstr "uafsluttet 's'-kommando"
-#: sed/compile.c:158
+#: sed/compile.c:166
msgid "unterminated `y' command"
msgstr "uafsluttet 'y'-kommando"
-#: sed/compile.c:159
+#: sed/compile.c:167
msgid "unknown option to `s'"
msgstr "ukendt flag til 's'"
-#: sed/compile.c:160
+#: sed/compile.c:169
msgid "multiple `p' options to `s' command"
msgstr "flere 'p'-flag til 's'-kommando"
-#: sed/compile.c:161
+#: sed/compile.c:171
msgid "multiple `g' options to `s' command"
msgstr "flere 'g'-flag til 's'-kommando"
-#: sed/compile.c:162
+#: sed/compile.c:173
msgid "multiple number options to `s' command"
msgstr "flere tal-flag til 's'-kommando"
-#: sed/compile.c:163
+#: sed/compile.c:175
msgid "number option to `s' command may not be zero"
msgstr "s-kommandoens tal-flag må ikke være nul"
-#: sed/compile.c:164
+#: sed/compile.c:177
msgid "strings for `y' command are different lengths"
msgstr "'y'-kommandoens strenge har forskellige længder"
-#: sed/compile.c:165
+#: sed/compile.c:179
msgid "delimiter character is not a single-byte character"
msgstr "adskillelsestegn er ikke et en-byte-tegn"
-#: sed/compile.c:166
+#: sed/compile.c:181
msgid "expected newer version of sed"
msgstr "forventede en nyere version af sed"
-#: sed/compile.c:167
+#: sed/compile.c:183
msgid "invalid usage of line address 0"
msgstr "ugylig brug af linjeadresse 0"
-#: sed/compile.c:168
+#: sed/compile.c:184
#, c-format
msgid "unknown command: `%c'"
msgstr "ukendt kommando: '%c'"
-#: sed/compile.c:169
-#, fuzzy
+#: sed/compile.c:186
msgid "incomplete command"
-msgstr "der mangler en kommando"
+msgstr "ufuldstændig kommando"
+
+#: sed/compile.c:188
+msgid "\":\" lacks a label"
+msgstr ""
+
+#: sed/compile.c:190
+msgid "recursive escaping after \\c not allowed"
+msgstr ""
-#: sed/compile.c:192
+#: sed/compile.c:213
#, c-format
msgid "%s: file %s line %lu: %s\n"
msgstr "%s: fil %s, linje %lu: %s\n"
-#: sed/compile.c:195
+#: sed/compile.c:216
#, c-format
msgid "%s: -e expression #%lu, char %lu: %s\n"
msgstr "%s: -e udtryk nr. %lu, tegn %lu: %s\n"
-#: sed/compile.c:1657
+#: sed/compile.c:1639
#, c-format
msgid "can't find label for jump to `%s'"
msgstr "kan ikke finde etiket for hop til '%s'"
-#: sed/execute.c:595
+#: sed/execute.c:264 sed/execute.c:281
+#, c-format
+msgid "case conversion produced an invalid character"
+msgstr ""
+
+#: sed/execute.c:575
#, c-format
msgid "%s: can't read %s: %s\n"
msgstr "%s: kan ikke læse %s: %s\n"
-#: sed/execute.c:624
+#: sed/execute.c:600
#, c-format
msgid "couldn't edit %s: is a terminal"
msgstr "kunne ikke redigere %s: er en terminal"
-#: sed/execute.c:629
+#: sed/execute.c:605
#, c-format
msgid "couldn't edit %s: not a regular file"
msgstr "kunne ikke redigere %s: ikke en regulær fil"
-#: sed/execute.c:640
+#: sed/execute.c:616
#, 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:647
+#: sed/execute.c:624
#, 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:664 sed/utils.c:211
+#: sed/execute.c:643 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:1193 sed/execute.c:1373
+#: sed/execute.c:1158 sed/execute.c:1368
msgid "error in subprocess"
msgstr "fejl i underproces"
-#: sed/execute.c:1195
+#: sed/execute.c:1160
msgid "option `e' not supported"
msgstr "tilvalg 'e' er ikke understøttet"
-#: sed/execute.c:1375
+#: sed/execute.c:1349
msgid "`e' command not supported"
msgstr "'e'-kommando er ikke understøttet"
-#: sed/execute.c:1725
+#: sed/execute.c:1675
msgid "no input files"
msgstr "ingen inddatafiler"
-#: sed/regexp.c:39
+#: sed/regexp.c:38
msgid "no previous regular expression"
msgstr "intet forudgående regulært udtryk"
-#: sed/regexp.c:40
-msgid "cannot specify modifiers on empty regexp"
-msgstr "kan ikke angive modifikatorer på tomt regulært udtryk"
-
-#: sed/regexp.c:129
+#: sed/regexp.c:138
#, c-format
msgid "invalid reference \\%d on `s' command's RHS"
msgstr "ugyldig reference \\%d på 's'-kommandos højreside"
-#: sed/sed.c:32
+#: sed/sed.c:35
msgid "Jay Fenlason"
-msgstr ""
+msgstr "Jay Fenlason"
-#: sed/sed.c:33
+#: sed/sed.c:36
msgid "Tom Lord"
-msgstr ""
+msgstr "Tom Lord"
-#: sed/sed.c:34
+#: sed/sed.c:37
msgid "Ken Pizzini"
-msgstr ""
+msgstr "Ken Pizzini"
-#: sed/sed.c:35
+#: sed/sed.c:38
msgid "Paolo Bonzini"
-msgstr ""
+msgstr "Paolo Bonzini"
-#: sed/sed.c:79
+#: sed/sed.c:113
#, c-format
msgid ""
"GNU sed home page: <http://www.gnu.org/software/sed/>.\n"
@@ -224,16 +610,12 @@ msgstr ""
"Hjemmeside for GNU sed: <http://www.gnu.org/software/sed/>.\n"
"Generel hjælp til GNU-programmer: <http://www.gnu.org/gethelp/>.\n"
-#: sed/sed.c:86
+#: sed/sed.c:120
#, c-format
-msgid ""
-"E-mail bug reports to: <%s>.\n"
-"Be sure to include the word ``%s'' somewhere in the ``Subject:'' field.\n"
+msgid "E-mail bug reports to: <%s>.\n"
msgstr ""
-"Send fejlrapporter på engelsk pr. e-post til: <%s>.\n"
-"Sørg venligst for at skrive ordet \"%s\" et sted i emnefeltet.\n"
-#: sed/sed.c:99
+#: sed/sed.c:129
msgid ""
" -R, --regexp-perl\n"
" use Perl 5's regular expressions syntax in the script.\n"
@@ -241,7 +623,7 @@ msgstr ""
" -R, --regexp-perl\n"
" brug Perl 5's syntaks for regulære udtryk i skriptet\n"
-#: sed/sed.c:104
+#: sed/sed.c:134
#, c-format
msgid ""
"Usage: %s [OPTION]... {script-only-if-no-other-script} [input-file]...\n"
@@ -250,7 +632,7 @@ msgstr ""
"Brug: %s [FLAG]... {script-kun-hvis-intet-andet-script} [inddatafil]...\n"
"\n"
-#: sed/sed.c:108
+#: sed/sed.c:138
#, c-format
msgid ""
" -n, --quiet, --silent\n"
@@ -259,7 +641,7 @@ msgstr ""
" -n, --quiet, --silent\n"
" undertryk automatisk udskrift af mønsterrum\n"
-#: sed/sed.c:110
+#: sed/sed.c:140
#, c-format
msgid ""
" -e script, --expression=script\n"
@@ -268,7 +650,7 @@ msgstr ""
" -e script, --expression=script\n"
" tilføj scriptet til kommandoerne, der skal køres\n"
-#: sed/sed.c:112
+#: sed/sed.c:142
#, c-format
msgid ""
" -f script-file, --file=script-file\n"
@@ -279,7 +661,7 @@ msgstr ""
" føj indholdet af scriptfil til kommandoerne, der skal "
"køres\n"
-#: sed/sed.c:115
+#: sed/sed.c:146
#, c-format
msgid ""
" --follow-symlinks\n"
@@ -288,17 +670,16 @@ msgstr ""
" --follow-symlinks\n"
" følg symlænker når der redigeres i filer\n"
-#: sed/sed.c:118
-#, fuzzy, c-format
+#: sed/sed.c:149
+#, c-format
msgid ""
" -i[SUFFIX], --in-place[=SUFFIX]\n"
" edit files in place (makes backup if SUFFIX supplied)\n"
msgstr ""
" -i[SUFFIKS], --in-place[=SUFFIKS]\n"
-" redigér filer (laver sikkerhedskopi hvis filendelse er "
-"givet)\n"
+" redigér filer (laver sikkerhedskopi hvis SUFFIKS er givet)\n"
-#: sed/sed.c:121
+#: sed/sed.c:153
#, c-format
msgid ""
" -b, --binary\n"
@@ -308,7 +689,7 @@ msgstr ""
" -b, --binary\n"
" åbn filer i binær tilstand (CR+LF specialbehandles ikke)\n"
-#: sed/sed.c:124
+#: sed/sed.c:157
#, c-format
msgid ""
" -l N, --line-length=N\n"
@@ -317,7 +698,7 @@ msgstr ""
" -l N, --line-length=N\n"
" angiv ønsket længde for linjeombrydning til 'l'-kommandoen\n"
-#: sed/sed.c:126
+#: sed/sed.c:159
#, c-format
msgid ""
" --posix\n"
@@ -326,29 +707,38 @@ msgstr ""
" --posix\n"
" slå alle GNU-udvidelser fra.\n"
-#: sed/sed.c:128
-#, c-format
+#: sed/sed.c:161
+#, fuzzy, c-format
msgid ""
-" -r, --regexp-extended\n"
-" use extended regular expressions in the script.\n"
+" -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"
-#: sed/sed.c:133
-#, c-format
+#: sed/sed.c:167
+#, fuzzy, c-format
msgid ""
" -s, --separate\n"
-" consider files as separate rather than as a single "
-"continuous\n"
-" long stream.\n"
+" consider files as separate rather than as a single,\n"
+" continuous long stream.\n"
msgstr ""
" -s, --separate\n"
" betragt filer som separate frem for som en enkelt, "
"kontinuert\n"
" strøm.\n"
-#: sed/sed.c:136
+#: sed/sed.c:170
+#, fuzzy, c-format
+msgid ""
+" --sandbox\n"
+" operate in sandbox mode.\n"
+msgstr ""
+" -z, --null-data\n"
+" adskil linjer med NUL-tegn\n"
+
+#: sed/sed.c:172
#, c-format
msgid ""
" -u, --unbuffered\n"
@@ -360,24 +750,26 @@ msgstr ""
" indlæs minimale mængder af data fra inddatafilerne, og tøm\n"
" uddatabufferne oftere\n"
-#: sed/sed.c:139
+#: sed/sed.c:175
#, c-format
msgid ""
" -z, --null-data\n"
" separate lines by NUL characters\n"
msgstr ""
+" -z, --null-data\n"
+" adskil linjer med NUL-tegn\n"
-#: sed/sed.c:141
+#: sed/sed.c:177
#, c-format
msgid " --help display this help and exit\n"
msgstr " --help vis denne hjælp og afslut\n"
-#: sed/sed.c:142
+#: sed/sed.c:178
#, c-format
msgid " --version output version information and exit\n"
msgstr " --version udskriv versionsinformation og afslut\n"
-#: sed/sed.c:143
+#: sed/sed.c:179
#, c-format
msgid ""
"\n"
@@ -395,119 +787,57 @@ msgstr ""
"fortolkes. Alle resterende argumenter er navne på inddatafiler; hvis ingen\n"
"inddatafiler er angivet, læses standard-inddata.\n"
-#: sed/utils.c:74 sed/utils.c:432
+#: sed/utils.c:73 sed/utils.c:384
#, c-format
msgid "cannot remove %s: %s"
msgstr "kan ikke fjerne %s: %s"
-#: sed/utils.c:144
+#: sed/utils.c:136
#, c-format
msgid "couldn't open file %s: %s"
msgstr "kunne ikke åbne filen %s: %s"
-#: sed/utils.c:167
+#: sed/utils.c:155
#, c-format
msgid "couldn't attach to %s: %s"
msgstr "kunne ikke vedhæfte til %s: %s"
-#: sed/utils.c:229
-#, c-format
-msgid "couldn't write %d item to %s: %s"
-msgid_plural "couldn't write %d items to %s: %s"
+#: sed/utils.c:192
+#, fuzzy, 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"
-#: sed/utils.c:244 sed/utils.c:267
+#: sed/utils.c:204 sed/utils.c:223
#, c-format
msgid "read error on %s: %s"
msgstr "læsefejl på %s: %s"
-#: sed/utils.c:372
+#: sed/utils.c:325
#, c-format
msgid "couldn't follow symlink %s: %s"
msgstr "kunne ikke følge symlænken %s: %s"
-#: sed/utils.c:406
+#: sed/utils.c:359
#, c-format
msgid "cannot stat %s: %s"
msgstr "kan ikke køre stat på %s: %s"
-#: sed/utils.c:437
+#: sed/utils.c:389
#, c-format
msgid "cannot rename %s: %s"
msgstr "kan ikke omdøbe %s: %s"
-#: lib/regcomp.c:132
-msgid "Success"
-msgstr "Godt resultat"
-
-#: lib/regcomp.c:135
-msgid "No match"
-msgstr "Intet resultat"
-
-#: lib/regcomp.c:138
-msgid "Invalid regular expression"
-msgstr "Ugyldigt regulært udtryk"
-
-#: lib/regcomp.c:141
-msgid "Invalid collation character"
-msgstr "Ugyldigt sorteringstegn"
-
-#: lib/regcomp.c:144
-msgid "Invalid character class name"
-msgstr "Ugyldigt navn på tegnklasse"
-
-#: lib/regcomp.c:147
-msgid "Trailing backslash"
-msgstr "Afsluttende omvendt skråstreg"
-
-#: lib/regcomp.c:150
-msgid "Invalid back reference"
-msgstr "Ugyldig reference bagud"
-
-#: lib/regcomp.c:153
-msgid "Unmatched [ or [^"
-msgstr "Uparret [ eller [^"
-
-#: lib/regcomp.c:156
-msgid "Unmatched ( or \\("
-msgstr "Uparret ( eller \\("
-
-#: lib/regcomp.c:159
-msgid "Unmatched \\{"
-msgstr "Uparret \\{"
-
-#: lib/regcomp.c:162
-msgid "Invalid content of \\{\\}"
-msgstr "Ugyldigt indhold af \\{\\}"
-
-#: lib/regcomp.c:165
-msgid "Invalid range end"
-msgstr "Ugyldig slutning på område"
-
-#: lib/regcomp.c:168
-msgid "Memory exhausted"
-msgstr "Hukommelsen opbrugt"
-
-#: lib/regcomp.c:171
-msgid "Invalid preceding regular expression"
-msgstr "Ugyldigt forudgående regulært udtryk"
-
-#: lib/regcomp.c:174
-msgid "Premature end of regular expression"
-msgstr "Ufuldstændigt regulært udtryk"
-
-#: lib/regcomp.c:177
-msgid "Regular expression too big"
-msgstr "Regulært udtryk for stort"
+#~ msgid "cannot specify modifiers on empty regexp"
+#~ msgstr "kan ikke angive modifikatorer på tomt regulært udtryk"
-#: lib/regcomp.c:180
-msgid "Unmatched ) or \\)"
-msgstr "Uparret ) eller \\)"
-
-#: lib/regcomp.c:705
-msgid "No previous regular expression"
-msgstr "Intet forudgående regulært udtryk"
+#~ msgid ""
+#~ "E-mail bug reports to: <%s>.\n"
+#~ "Be sure to include the word ``%s'' somewhere in the ``Subject:'' field.\n"
+#~ msgstr ""
+#~ "Send fejlrapporter på engelsk pr. e-post til: <%s>.\n"
+#~ "Sørg venligst for at skrive ordet \"%s\" et sted i emnefeltet.\n"
#~ msgid "super-sed version %s\n"
#~ msgstr "super-sed version %s\n"
diff --git a/po/de.gmo b/po/de.gmo
index 3d8fab7..1f9ebad 100644
--- a/po/de.gmo
+++ b/po/de.gmo
Binary files differ
diff --git a/po/de.po b/po/de.po
index ae048da..995aa5f 100644
--- a/po/de.po
+++ b/po/de.po
@@ -1,218 +1,622 @@
# sed german translation
# This file is distributed under the same license as the sed package.
# Copyright (C) 2001, 2002, 2003, 2004, 2005, 2009 Free Software Foundation, Inc.
-# Walter Koch <koch@u32.de>, 2001, 2002, 2003, 2004, 2005, 2009
+# Walter Koch <koch@u32.de>, 2001, 2002, 2003, 2004, 2005, 2009.
+# Mario Blättermann <mario.blaettermann@gmail.com>, 2014.
+# Walter Koch <koch@u32.de>, 2016.
+#
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: 2012-12-22 14:36+0100\n"
-"PO-Revision-Date: 2009-05-01 12:54+0200\n"
+"POT-Creation-Date: 2016-12-30 00:59-0800\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"
"Language: de\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"
-#: sed/compile.c:144
+#: lib/closeout.c:112
+msgid "write error"
+msgstr "Schreibfehler"
+
+#: lib/copy-acl.c:54
+#, c-format
+msgid "preserving permissions for %s"
+msgstr "behalte Rechte für %s bei"
+
+#: lib/dfa.c:1025 lib/dfa.c:1028 lib/dfa.c:1047 lib/dfa.c:1057 lib/dfa.c:1070
+#: lib/dfa.c:1098 lib/dfa.c:1107 lib/dfa.c:1110 lib/dfa.c:1115 lib/dfa.c:1137
+#: lib/dfa.c:1140
+msgid "unbalanced ["
+msgstr "nicht geschlossenes ["
+
+#: lib/dfa.c:1083
+msgid "invalid character class"
+msgstr "Ungültige Zeichenklasse"
+
+#: lib/dfa.c:1206
+msgid "character class syntax is [[:space:]], not [:space:]"
+msgstr "Die Syntax für Zeichenklasse lautet [[:space:]], nicht [:space:]"
+
+#: lib/dfa.c:1275
+msgid "unfinished \\ escape"
+msgstr "nicht bendete \\-Escapesequenz"
+
+#: lib/dfa.c:1436
+msgid "invalid content of \\{\\}"
+msgstr "Ungültiger Inhalt in \\{\\}"
+
+#: lib/dfa.c:1439
+msgid "regular expression too big"
+msgstr "Regulärer Ausdruck ist zu groß"
+
+#: lib/dfa.c:1853
+msgid "unbalanced ("
+msgstr "nicht geschlossenes ("
+
+#: lib/dfa.c:1980
+msgid "no syntax specified"
+msgstr "keine Syntax angegeben"
+
+#: lib/dfa.c:1988
+msgid "unbalanced )"
+msgstr "nicht geschlossens )"
+
+#: lib/error.c:191
+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"
+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:667 lib/getopt.c:672
+#, c-format
+msgid "%s: option '%c%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"
+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
+#, 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
+#, 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"
+
+#. TRANSLATORS:
+#. Get translations for open and closing quotation marks.
+#. The message catalog should translate "`" to a left
+#. quotation mark suitable for the locale, and similarly for
+#. "'". For example, a French Unicode local should translate
+#. these to U+00AB (LEFT-POINTING DOUBLE ANGLE
+#. QUOTATION MARK), and U+00BB (RIGHT-POINTING DOUBLE ANGLE
+#. QUOTATION MARK), respectively.
+#.
+#. If the catalog has no translation, we will try to
+#. use Unicode U+2018 (LEFT SINGLE QUOTATION MARK) and
+#. Unicode U+2019 (RIGHT SINGLE QUOTATION MARK). If the
+#. current locale is not Unicode, locale_quoting_style
+#. will quote 'like this', and clocale_quoting_style will
+#. quote "like this". You should always include translations
+#. for "`" and "'" even if U+2018 and U+2019 are appropriate
+#. for your locale.
+#.
+#. If you don't know what to put here, please see
+#. <http://en.wikipedia.org/wiki/Quotation_marks_in_other_languages>
+#. and use glyphs suitable for your language.
+#: lib/quotearg.c:354
+msgid "`"
+msgstr "&bdquo;"
+
+#: lib/quotearg.c:355
+msgid "'"
+msgstr "&ldquo;"
+
+#: lib/regcomp.c:135
+msgid "Success"
+msgstr "Erfolgreich"
+
+#: lib/regcomp.c:138
+msgid "No match"
+msgstr "Keine Übereinstimmung"
+
+#: lib/regcomp.c:141
+msgid "Invalid regular expression"
+msgstr "Ungültiger regulärer Ausdruck"
+
+#: lib/regcomp.c:144
+msgid "Invalid collation character"
+msgstr "Ungültiges Vergleichszeichen"
+
+#: lib/regcomp.c:147
+msgid "Invalid character class name"
+msgstr "Ungültiger Zeichenklassenname"
+
+#: lib/regcomp.c:150
+msgid "Trailing backslash"
+msgstr "Abschließender Backslash"
+
+#: lib/regcomp.c:153
+msgid "Invalid back reference"
+msgstr "Ungültiger Rückverweis"
+
+#: lib/regcomp.c:156
+msgid "Unmatched [, [^, [:, [., or [="
+msgstr "Nicht paarweises [, [^, [:, [., bzw. [="
+
+#: lib/regcomp.c:159
+msgid "Unmatched ( or \\("
+msgstr "Nicht paarweises ( bzw. \\("
+
+#: lib/regcomp.c:162
+msgid "Unmatched \\{"
+msgstr "Nicht paarweises \\{"
+
+#: lib/regcomp.c:165
+msgid "Invalid content of \\{\\}"
+msgstr "Ungültiger Inhalt in \\{\\}"
+
+#: lib/regcomp.c:168
+msgid "Invalid range end"
+msgstr "Ungültiges Bereichsende"
+
+#: lib/regcomp.c:171
+msgid "Memory exhausted"
+msgstr "Speicher erschöpft"
+
+#: lib/regcomp.c:174
+msgid "Invalid preceding regular expression"
+msgstr "Vorheriger regulärer Ausdruck ist ungültig"
+
+#: lib/regcomp.c:177
+msgid "Premature end of regular expression"
+msgstr "Regulärer Ausdruck endet zu früh"
+
+#: lib/regcomp.c:180
+msgid "Regular expression too big"
+msgstr "Regulärer Ausdruck ist zu groß"
+
+#: lib/regcomp.c:183
+msgid "Unmatched ) or \\)"
+msgstr "Nicht paarweises ) bzw. \\)"
+
+#: lib/regcomp.c:687
+msgid "No previous regular expression"
+msgstr "Kein vorheriger regulärer Ausdruck"
+
+#: lib/set-acl.c:46
+#, c-format
+msgid "setting permissions for %s"
+msgstr ""
+
+#: lib/version-etc.c:74
+#, c-format
+msgid "Packaged by %s (%s)\n"
+msgstr ""
+
+#: lib/version-etc.c:77
+#, c-format
+msgid "Packaged by %s\n"
+msgstr ""
+
+#. 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 "(C)"
+
+#: lib/version-etc.c:86
+msgid ""
+"\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"
+msgstr ""
+"\n"
+"Lizenz GPLv3+: GNU GPL Version 3 oder später <http://gnu.org/licenses/gpl."
+"html>.\n"
+"Dies ist freie Software: Sie dürfen sie verändern und verbreiten.\n"
+"Es gibt KEINE GARANTIE, soweit diese nicht durch Gesetz vorgeschrieben\n"
+"wird.\n"
+"\n"
+
+#. TRANSLATORS: %s denotes an author name.
+#: lib/version-etc.c:102
+#, c-format
+msgid "Written by %s.\n"
+msgstr "Geschrieben von %s.\n"
+
+#. TRANSLATORS: Each %s denotes an author name.
+#: lib/version-etc.c:106
+#, c-format
+msgid "Written by %s and %s.\n"
+msgstr "Geschrieben von %s und %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 "Geschrieben von %s, %s und %s.\n"
+
+#. TRANSLATORS: Each %s denotes an author name.
+#. You can use line breaks, estimating that each author name occupies
+#. ca. 16 screen columns and that a screen line has ca. 80 columns.
+#: lib/version-etc.c:117
+#, c-format
+msgid ""
+"Written by %s, %s, %s,\n"
+"and %s.\n"
+msgstr ""
+"Geschrieben von %s, %s, %s\n"
+"und %s.\n"
+
+#. TRANSLATORS: Each %s denotes an author name.
+#. You can use line breaks, estimating that each author name occupies
+#. ca. 16 screen columns and that a screen line has ca. 80 columns.
+#: lib/version-etc.c:124
+#, c-format
+msgid ""
+"Written by %s, %s, %s,\n"
+"%s, and %s.\n"
+msgstr ""
+"Geschrieben von %s, %s, %s,\n"
+"%s und %s.\n"
+
+#. TRANSLATORS: Each %s denotes an author name.
+#. You can use line breaks, estimating that each author name occupies
+#. ca. 16 screen columns and that a screen line has ca. 80 columns.
+#: lib/version-etc.c:131
+#, c-format
+msgid ""
+"Written by %s, %s, %s,\n"
+"%s, %s, and %s.\n"
+msgstr ""
+
+#. TRANSLATORS: Each %s denotes an author name.
+#. You can use line breaks, estimating that each author name occupies
+#. ca. 16 screen columns and that a screen line has ca. 80 columns.
+#: lib/version-etc.c:139
+#, c-format
+msgid ""
+"Written by %s, %s, %s,\n"
+"%s, %s, %s, and %s.\n"
+msgstr ""
+
+#. TRANSLATORS: Each %s denotes an author name.
+#. You can use line breaks, estimating that each author name occupies
+#. ca. 16 screen columns and that a screen line has ca. 80 columns.
+#: lib/version-etc.c:147
+#, c-format
+msgid ""
+"Written by %s, %s, %s,\n"
+"%s, %s, %s, %s,\n"
+"and %s.\n"
+msgstr ""
+"Geschrieben von %s, %s, %s,\n"
+"%s, %s, %s, %s,\n"
+"und %s.\n"
+
+#. TRANSLATORS: Each %s denotes an author name.
+#. You can use line breaks, estimating that each author name occupies
+#. ca. 16 screen columns and that a screen line has ca. 80 columns.
+#: lib/version-etc.c:156
+#, c-format
+msgid ""
+"Written by %s, %s, %s,\n"
+"%s, %s, %s, %s,\n"
+"%s, and %s.\n"
+msgstr ""
+"Geschrieben von %s, %s, %s,\n"
+"%s, %s, %s, %s,\n"
+"%s und %s.\n"
+
+#. TRANSLATORS: Each %s denotes an author name.
+#. You can use line breaks, estimating that each author name occupies
+#. ca. 16 screen columns and that a screen line has ca. 80 columns.
+#: lib/version-etc.c:167
+#, c-format
+msgid ""
+"Written by %s, %s, %s,\n"
+"%s, %s, %s, %s,\n"
+"%s, %s, and others.\n"
+msgstr ""
+
+#. TRANSLATORS: The placeholder indicates the bug-reporting address
+#. for this package. Please add _another line_ saying
+#. "Report translation bugs to <...>\n" with the address for translation
+#. bugs (typically your translation team's web or email address).
+#: lib/version-etc.c:245
+#, c-format
+msgid ""
+"\n"
+"Report bugs to: %s\n"
+msgstr ""
+"\n"
+"Fehlerberichte an %s.\n"
+"Übersetzungsfehler an <http://translationproject.org/team/de.html>.\n"
+
+#: lib/version-etc.c:247
+#, c-format
+msgid "Report %s bugs to: %s\n"
+msgstr ""
+
+#: lib/version-etc.c:251
+#, c-format
+msgid "%s home page: <%s>\n"
+msgstr ""
+
+#: lib/version-etc.c:253
+#, c-format
+msgid "%s home page: <http://www.gnu.org/software/%s/>\n"
+msgstr ""
+
+#: lib/version-etc.c:256
+msgid "General help using GNU software: <http://www.gnu.org/gethelp/>\n"
+msgstr "Allgemeine Hilfe zu GNU-Software: <http://www.gnu.org/gethelp/>.\n"
+
+#: sed/compile.c:146
msgid "multiple `!'s"
-msgstr "Mehrfache `!'"
+msgstr "Mehrfache »!«"
-#: sed/compile.c:145
+#: sed/compile.c:147
msgid "unexpected `,'"
-msgstr "Unerwartetes `,'"
+msgstr "Unerwartetes »,«"
-#: sed/compile.c:146
+#: sed/compile.c:149
msgid "invalid usage of +N or ~N as first address"
-msgstr "+N oder ~N knnen nicht als erste Adresse benutzt werden"
+msgstr "+N oder ~N können nicht als erste Adresse benutzt werden"
-#: sed/compile.c:147
+#: sed/compile.c:150
msgid "unmatched `{'"
-msgstr "Nicht paarweises `{'"
+msgstr "Nicht paarweises »{«"
-#: sed/compile.c:148
+#: sed/compile.c:151
msgid "unexpected `}'"
-msgstr "Unerwartetes `}'"
+msgstr "Unerwartetes »}«"
-#: sed/compile.c:149
+#: sed/compile.c:153
msgid "extra characters after command"
-msgstr "Zustzliche Zeichen nach dem Befehl"
+msgstr "Zusätzliche Zeichen nach dem Befehl"
-#: sed/compile.c:150
+#: sed/compile.c:155
msgid "expected \\ after `a', `c' or `i'"
-msgstr "Nach `a', `c' oder `i' wird \\ erwartet"
+msgstr "Nach »a«, »c« oder »i« wird \\ erwartet"
-#: sed/compile.c:151
+#: sed/compile.c:157
msgid "`}' doesn't want any addresses"
-msgstr "`}' erwartet keine Adressen"
+msgstr "»}« erwartet keine Adressen"
-#: sed/compile.c:152
+#: sed/compile.c:159
msgid ": doesn't want any addresses"
-msgstr "`:' erwartet keine Adressen"
+msgstr "»:« erwartet keine Adressen"
-#: sed/compile.c:153
+#: sed/compile.c:161
msgid "comments don't accept any addresses"
msgstr "Kommentare erlauben keine Adressen"
-#: sed/compile.c:154
+#: sed/compile.c:162
msgid "missing command"
msgstr "Fehlender Befehl"
-#: sed/compile.c:155
+#: sed/compile.c:163
msgid "command only uses one address"
msgstr "Befehl verwendet nur eine Adresse"
-#: sed/compile.c:156
+#: sed/compile.c:164
msgid "unterminated address regex"
-msgstr "Nicht beendeter regulrer Adressausdruck"
+msgstr "Nicht beendeter regulärer Adressausdruck"
-#: sed/compile.c:157
+#: sed/compile.c:165
msgid "unterminated `s' command"
-msgstr "Nicht beendeter `s'-Befehl"
+msgstr "Nicht beendeter »s«-Befehl"
-#: sed/compile.c:158
+#: sed/compile.c:166
msgid "unterminated `y' command"
-msgstr "Nicht beendeter `y'-Befehl"
+msgstr "Nicht beendeter »y«-Befehl"
-#: sed/compile.c:159
+#: sed/compile.c:167
msgid "unknown option to `s'"
-msgstr "Unbekannte Option fr `s'"
+msgstr "Unbekannte Option für »s«"
-#: sed/compile.c:160
+#: sed/compile.c:169
msgid "multiple `p' options to `s' command"
-msgstr "Mehrere 'p'-Optionen am `s'-Befehl"
+msgstr "Mehrere »p«-Optionen am »s«-Befehl"
-#: sed/compile.c:161
+#: sed/compile.c:171
msgid "multiple `g' options to `s' command"
-msgstr "Mehrere 'g'-Optionen am `s'-Befehl"
+msgstr "Mehrere »g«-Optionen am »s«-Befehl"
-#: sed/compile.c:162
+#: sed/compile.c:173
msgid "multiple number options to `s' command"
-msgstr "Mehrere numerische Optionen am `s'-Befehl"
+msgstr "Mehrere numerische Optionen am »s«-Befehl"
-#: sed/compile.c:163
+#: sed/compile.c:175
msgid "number option to `s' command may not be zero"
-msgstr "Numerische Option am `s'-Befehl kann nicht Null sein"
+msgstr "Numerische Option am »s«-Befehl kann nicht Null sein"
-#: sed/compile.c:164
+#: sed/compile.c:177
msgid "strings for `y' command are different lengths"
-msgstr "Unterschiedliche Lnge der Zeichenketten des `y'-Befehls"
+msgstr "Unterschiedliche Länge der Zeichenketten des »y«-Befehls"
-#: sed/compile.c:165
+#: sed/compile.c:179
msgid "delimiter character is not a single-byte character"
msgstr "Trennzeichen ist kein Einzelbytezeichen"
-#: sed/compile.c:166
+#: sed/compile.c:181
msgid "expected newer version of sed"
msgstr "Neuere Version von sed erwartet"
-#: sed/compile.c:167
+#: sed/compile.c:183
msgid "invalid usage of line address 0"
-msgstr "Ungltige Verwendung der Zeilenadresse 0"
+msgstr "Ungültige Verwendung der Zeilenadresse 0"
-#: sed/compile.c:168
+#: sed/compile.c:184
#, c-format
msgid "unknown command: `%c'"
-msgstr "Unbekannter Befehl: `%c'"
+msgstr "Unbekannter Befehl: »%c«"
-#: sed/compile.c:169
-#, fuzzy
+#: sed/compile.c:186
msgid "incomplete command"
-msgstr "Fehlender Befehl"
+msgstr "Unvollständiger Befehl"
-#: sed/compile.c:192
+#: sed/compile.c:188
+msgid "\":\" lacks a label"
+msgstr ""
+
+#: sed/compile.c:190
+msgid "recursive escaping after \\c not allowed"
+msgstr ""
+
+#: sed/compile.c:213
#, c-format
msgid "%s: file %s line %lu: %s\n"
msgstr "%s: Datei %s Zeile %lu: %s\n"
-#: sed/compile.c:195
+#: sed/compile.c:216
#, c-format
msgid "%s: -e expression #%lu, char %lu: %s\n"
msgstr "%s: -e Ausdruck #%lu, Zeichen %lu: %s\n"
-#: sed/compile.c:1657
+#: sed/compile.c:1639
#, c-format
msgid "can't find label for jump to `%s'"
-msgstr "Kann die Zielmarke fr den Sprung zu `%s' nicht finden"
+msgstr "Zielmarke für den Sprung zu »%s« kann nicht gefunden werden"
-#: sed/execute.c:595
+#: sed/execute.c:264 sed/execute.c:281
+#, c-format
+msgid "case conversion produced an invalid character"
+msgstr ""
+
+#: sed/execute.c:575
#, c-format
msgid "%s: can't read %s: %s\n"
-msgstr "%s: kann %s nicht lesen: %s\n"
+msgstr "%s: %s kann nicht gelesen werden: %s\n"
-#: sed/execute.c:624
+#: sed/execute.c:600
#, c-format
msgid "couldn't edit %s: is a terminal"
-msgstr "Kann %s nicht bearbeiten: Das ist ein Terminal"
+msgstr "%s kann nicht bearbeitet werden: Das ist ein Terminal"
-#: sed/execute.c:629
+#: sed/execute.c:605
#, c-format
msgid "couldn't edit %s: not a regular file"
-msgstr "Kann %s nicht bearbeiten: Das ist keine normale Datei"
+msgstr "%s kann nicht bearbeitet werden: Das ist keine normale Datei"
-#: sed/execute.c:640
+#: sed/execute.c:616
#, 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:647
+#: sed/execute.c:624
#, 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:664 sed/utils.c:211
+#: sed/execute.c:643 sed/utils.c:178
#, c-format
msgid "couldn't open temporary file %s: %s"
-msgstr "Kann temporre Datei %s nicht ffnen: %s"
+msgstr "Temporäre Datei %s kann nicht geöffnet werden: %s"
-#: sed/execute.c:1193 sed/execute.c:1373
+#: sed/execute.c:1158 sed/execute.c:1368
msgid "error in subprocess"
msgstr "Fehler im Unterprozess"
-#: sed/execute.c:1195
+#: sed/execute.c:1160
msgid "option `e' not supported"
-msgstr "Option `e' wird nicht untersttzt"
+msgstr "Option »e« wird nicht unterstützt"
-#: sed/execute.c:1375
+#: sed/execute.c:1349
msgid "`e' command not supported"
-msgstr "`e'-Kommando wird nicht untersttzt"
+msgstr "Befehl »e« wird nicht unterstützt"
-#: sed/execute.c:1725
+#: sed/execute.c:1675
msgid "no input files"
msgstr "Keine Eingabedateien"
-#: sed/regexp.c:39
+#: sed/regexp.c:38
msgid "no previous regular expression"
-msgstr "Kein vorheriger regulrer Ausdruck"
+msgstr "Kein vorheriger regulärer Ausdruck"
-#: sed/regexp.c:40
-msgid "cannot specify modifiers on empty regexp"
-msgstr "Fr leere regulre Ausdrcke knnen keine `modifier' angegeben werden"
-
-#: sed/regexp.c:129
+#: sed/regexp.c:138
#, c-format
msgid "invalid reference \\%d on `s' command's RHS"
-msgstr "Ungltiger Verweis \\%d im rechten Teil (`RHS') des `s'-Befehls"
+msgstr "Ungültiger Verweis \\%d im rechten Teil (»RHS«) des »s«-Befehls"
-#: sed/sed.c:32
+#: sed/sed.c:35
msgid "Jay Fenlason"
-msgstr ""
+msgstr "Jay Fenlason"
-#: sed/sed.c:33
+#: sed/sed.c:36
msgid "Tom Lord"
-msgstr ""
+msgstr "Tom Lord"
-#: sed/sed.c:34
+#: sed/sed.c:37
msgid "Ken Pizzini"
-msgstr ""
+msgstr "Ken Pizzini"
-#: sed/sed.c:35
+#: sed/sed.c:38
msgid "Paolo Bonzini"
-msgstr ""
+msgstr "Paolo Bonzini"
-#: sed/sed.c:79
+#: sed/sed.c:113
#, c-format
msgid ""
"GNU sed home page: <http://www.gnu.org/software/sed/>.\n"
@@ -221,83 +625,77 @@ msgstr ""
"GNU-sed-Homepage: <http://www.gnu.org/software/sed/>.\n"
"Allgemeine Hilfe zu GNU-Software: <http://www.gnu.org/gethelp/>.\n"
-#: sed/sed.c:86
-#, fuzzy, c-format
-msgid ""
-"E-mail bug reports to: <%s>.\n"
-"Be sure to include the word ``%s'' somewhere in the ``Subject:'' field.\n"
-msgstr ""
-"Fehlerberichte bitte per E-Mail (auf englisch) an: <%s>.\n"
-"Verwenden Sie dabei den Begriff `%s' irgendwo in der `Betreff:'-Zeile.\n"
-"Sinn- oder Schreibfehler in den deutschen Texten bitte an <de@li.org>.\n"
+#: sed/sed.c:120
+#, c-format
+msgid "E-mail bug reports to: <%s>.\n"
+msgstr "Fehlerberichte bitte per E-Mail (auf englisch) an: <%s>.\n"
-#: sed/sed.c:99
+#: sed/sed.c:129
msgid ""
" -R, --regexp-perl\n"
" use Perl 5's regular expressions syntax in the script.\n"
msgstr ""
" -R, --regexp-perl\n"
-" Verwende die Perl-5-Syntax fr reg. Ausdrcke im Skript.\n"
+" verwendet die Perl-5-Syntax für reg. Ausdrücke im Skript.\n"
-#: sed/sed.c:104
+#: sed/sed.c:134
#, c-format
msgid ""
"Usage: %s [OPTION]... {script-only-if-no-other-script} [input-file]...\n"
"\n"
msgstr ""
-"Aufruf: %s [OPTION]... {Skript-falls-kein-anderes-Skript} [Eingabe-"
-"Datei]...\n"
+"Aufruf: %s [OPTION] ¿ {Skript-falls-kein-anderes-Skript} [Eingabedatei] ¿\n"
"\n"
-#: sed/sed.c:108
+#: sed/sed.c:138
#, c-format
msgid ""
" -n, --quiet, --silent\n"
" suppress automatic printing of pattern space\n"
msgstr ""
" -n, --quiet, --silent\n"
-" verhindert die automatische Ausgabe des Arbeitspuffers\n"
+" verhindert die automatische Ausgabe des Arbeitspuffers.\n"
-#: sed/sed.c:110
+#: sed/sed.c:140
#, c-format
msgid ""
" -e script, --expression=script\n"
" add the script to the commands to be executed\n"
msgstr ""
-" -e skript, --expression=skript\n"
-" hngt `skript' an die auszufhrenden Befehle an\n"
+" -e skript, --expression=Skript\n"
+" hängt »Skript« an die auszuführenden Befehle an.\n"
-#: sed/sed.c:112
+#: sed/sed.c:142
#, c-format
msgid ""
" -f script-file, --file=script-file\n"
" add the contents of script-file to the commands to be "
"executed\n"
msgstr ""
-" -f skript-Datei, --file=skript-Datei\n"
-" hngt den Inhalt von `Skript-Datei' an die\n"
-" auszufhrenden Befehle an\n"
+" -f Skriptdatei, --file=Skriptdatei\n"
+" hängt den Inhalt von »Skriptdatei« an die\n"
+" auszuführenden Befehle an.\n"
-#: sed/sed.c:115
+#: sed/sed.c:146
#, c-format
msgid ""
" --follow-symlinks\n"
" follow symlinks when processing in place\n"
msgstr ""
" --follow-symlinks\n"
-" symbolischen Verknpfungen bei Verwendung von -i folgen\n"
+" folgt symbolischen Verknüpfungen bei Verwendung von -i.\n"
-#: sed/sed.c:118
-#, fuzzy, c-format
+#: sed/sed.c:149
+#, c-format
msgid ""
" -i[SUFFIX], --in-place[=SUFFIX]\n"
" edit files in place (makes backup if SUFFIX supplied)\n"
msgstr ""
" -i[Suffix], --in-place[=Suffix]\n"
-" ndert die Eingabedatei (Backup wird erzeugt, falls Suffix\n"
-" angegeben wurde)\n"
+" ändert die Eingabedatei (Sicherungsdatei wird erzeugt,\n"
+" falls Suffix angegeben wurde)\n"
-#: sed/sed.c:121
+#: sed/sed.c:153
#, c-format
msgid ""
" -b, --binary\n"
@@ -305,20 +703,20 @@ msgid ""
"specially)\n"
msgstr ""
" -b, --binary\n"
-" ffnet Dateien binr (CR+LFs werden nicht besonders "
-"behandelt)\n"
+" öffnet Dateien binär (CR+LFs werden nicht besonders "
+"behandelt).\n"
-#: sed/sed.c:124
+#: sed/sed.c:157
#, c-format
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"
-" gibt die gewnschte Zeilenumbruchlnge fr den `l'-Befehl "
-"an\n"
+" gibt die gewünschte Zeilenumbruchlänge für den »l«-Befehl "
+"an.\n"
-#: sed/sed.c:126
+#: sed/sed.c:159
#, c-format
msgid ""
" --posix\n"
@@ -327,28 +725,36 @@ msgstr ""
" --posix\n"
" schaltet alle GNU-Funktions-Erweiterungen ab.\n"
-#: sed/sed.c:128
+#: sed/sed.c:161
#, c-format
msgid ""
-" -r, --regexp-extended\n"
-" use extended regular expressions in the script.\n"
+" -E, -r, --regexp-extended\n"
+" use extended regular expressions in the script\n"
+" (for portability use POSIX -E).\n"
msgstr ""
-" -r, --regexp-extended\n"
-" verwendet die erweiterten reg. Ausdrcke fr das Skript.\n"
+" -E, -r, --regexp-extended\n"
+" verwendet erweiterte reg. Ausdrücke für das Skript.\n"
+" (für Portabilität verwende man POSIX -E).\n"
-#: sed/sed.c:133
+#: sed/sed.c:167
#, c-format
msgid ""
" -s, --separate\n"
-" consider files as separate rather than as a single "
-"continuous\n"
-" long stream.\n"
+" consider files as separate rather than as a single,\n"
+" continuous long stream.\n"
msgstr ""
" -s, --separate\n"
-" die Dateien werden getrennt und nicht als einzige\n"
-" zusammenhngende Quelle betrachtet.\n"
+" nimmt an, die Dateien sind seperat und nicht eine\n"
+" einzige lange zusammenhängende Quelle.\n"
+
+#: sed/sed.c:170
+#, c-format
+msgid ""
+" --sandbox\n"
+" operate in sandbox mode.\n"
+msgstr ""
-#: sed/sed.c:136
+#: sed/sed.c:172
#, c-format
msgid ""
" -u, --unbuffered\n"
@@ -357,27 +763,27 @@ msgid ""
" the output buffers more often\n"
msgstr ""
" -u, --unbuffered\n"
-" lade nur kleinste Datenmengen aus den Eingabedateien\n"
-" und schreibe die Ausgabepuffer hufiger zurck.\n"
+" lädt nur kleinste Datenmengen aus den Eingabedateien\n"
+" und schreibt die Ausgabepuffer häufiger zurück.\n"
-#: sed/sed.c:139
+#: sed/sed.c:175
#, c-format
msgid ""
" -z, --null-data\n"
" separate lines by NUL characters\n"
msgstr ""
-#: sed/sed.c:141
+#: sed/sed.c:177
#, c-format
msgid " --help display this help and exit\n"
-msgstr " --help nur diese Hilfe anzeigen und dann beenden\n"
+msgstr " --help zeigt diese Hilfe an und beendet das Programm.\n"
-#: sed/sed.c:142
+#: sed/sed.c:178
#, c-format
msgid " --version output version information and exit\n"
-msgstr " --version nur die Versionsinfo ausgeben und dann beenden\n"
+msgstr " --version zeigt die Versionsinfo an und beendet das Programm.\n"
-#: sed/sed.c:143
+#: sed/sed.c:179
#, c-format
msgid ""
"\n"
@@ -389,125 +795,66 @@ msgid ""
msgstr ""
"\n"
"Falls kein -e, --expression, -f oder --file als Option angegeben ist, \n"
-"wird das erste Argument, das keine Option ist als sed-Skript verwendet.\n"
-"Alle restlichen Argumente werden als Eingabedateinamen behandelt.\n"
+"wird das erste Argument, das keine Option ist, als sed-Skript verwendet.\n"
+"Alle übrigen Argumente werden als Eingabedateinamen behandelt.\n"
"Falls keine Eingabedateien angegeben sind, wird von der Standardeingabe "
"gelesen.\n"
"\n"
-#: sed/utils.c:74 sed/utils.c:432
+#: sed/utils.c:73 sed/utils.c:384
#, c-format
msgid "cannot remove %s: %s"
msgstr "%s kann nicht entfernt werden: %s"
-#: sed/utils.c:144
+#: sed/utils.c:136
#, c-format
msgid "couldn't open file %s: %s"
-msgstr "Datei %s kann nicht geffnet werden: %s"
+msgstr "Datei %s kann nicht geöffnet werden: %s"
-#: sed/utils.c:167
+#: sed/utils.c:155
#, c-format
msgid "couldn't attach to %s: %s"
-msgstr "Kann nicht in %s einklinken: %s"
+msgstr "Einklinken in %s nicht möglich: %s"
-#: sed/utils.c:229
+#: sed/utils.c:192
#, c-format
-msgid "couldn't write %d item to %s: %s"
-msgid_plural "couldn't write %d items to %s: %s"
-msgstr[0] "Kann %d Element nicht auf %s schreiben: %s"
-msgstr[1] "Kann %d Elemente nicht auf %s schreiben: %s"
+msgid "couldn't write %llu item to %s: %s"
+msgid_plural "couldn't write %llu items to %s: %s"
+msgstr[0] "%llu Element kann nicht auf %s geschrieben werden: %s"
+msgstr[1] "%llu Elemente können nicht auf %s geschrieben werden: %s"
-#: sed/utils.c:244 sed/utils.c:267
+#: sed/utils.c:204 sed/utils.c:223
#, c-format
msgid "read error on %s: %s"
msgstr "Lesefehler in %s: %s"
-#: sed/utils.c:372
+#: sed/utils.c:325
#, c-format
msgid "couldn't follow symlink %s: %s"
msgstr "Symbolischem Link %s kann nicht gefolgt werden: %s"
-#: sed/utils.c:406
+#: sed/utils.c:359
#, c-format
msgid "cannot stat %s: %s"
msgstr "Statusermittlung von %s schlug fehl: %s"
-#: sed/utils.c:437
+#: sed/utils.c:389
#, c-format
msgid "cannot rename %s: %s"
msgstr "%s kann nicht umbenannt werden: %s"
-#: lib/regcomp.c:132
-msgid "Success"
-msgstr "Erfolgreich"
-
-#: lib/regcomp.c:135
-msgid "No match"
-msgstr "Keine bereinstimmung"
-
-#: lib/regcomp.c:138
-msgid "Invalid regular expression"
-msgstr "Ungltiger regulrer Ausdruck"
-
-#: lib/regcomp.c:141
-msgid "Invalid collation character"
-msgstr "Ungltiges Vergleichszeichen"
-
-#: lib/regcomp.c:144
-msgid "Invalid character class name"
-msgstr "Ungltiger Zeichenklassenname"
-
-#: lib/regcomp.c:147
-msgid "Trailing backslash"
-msgstr "Abschlieender Backslash"
-
-#: lib/regcomp.c:150
-msgid "Invalid back reference"
-msgstr "Ungltiger Rckverweis"
-
-#: lib/regcomp.c:153
-msgid "Unmatched [ or [^"
-msgstr "Nicht paarweises [ bzw. [^"
-
-#: lib/regcomp.c:156
-msgid "Unmatched ( or \\("
-msgstr "Nicht paarweises ( bzw. \\("
-
-#: lib/regcomp.c:159
-msgid "Unmatched \\{"
-msgstr "Nicht paarweises \\{"
-
-#: lib/regcomp.c:162
-msgid "Invalid content of \\{\\}"
-msgstr "Ungltiger Inhalt in \\{\\}"
-
-#: lib/regcomp.c:165
-msgid "Invalid range end"
-msgstr "Ungltiges Bereichende"
-
-#: lib/regcomp.c:168
-msgid "Memory exhausted"
-msgstr "Speicher erschpft"
-
-#: lib/regcomp.c:171
-msgid "Invalid preceding regular expression"
-msgstr "Vorheriger regulrer Ausdruck ist ungltig"
-
-#: lib/regcomp.c:174
-msgid "Premature end of regular expression"
-msgstr "Regulrer Ausdruck endet zu frh"
-
-#: lib/regcomp.c:177
-msgid "Regular expression too big"
-msgstr "Regulrer Ausdruck ist zu gro"
-
-#: lib/regcomp.c:180
-msgid "Unmatched ) or \\)"
-msgstr "Nicht paarweises ) bzw. \\)"
+#~ msgid "cannot specify modifiers on empty regexp"
+#~ msgstr ""
+#~ "Für leere reguläre Ausdrücke können keine »modifier« angegeben werden"
-#: lib/regcomp.c:705
-msgid "No previous regular expression"
-msgstr "Kein vorheriger regulrer Ausdruck"
+#~ msgid ""
+#~ "E-mail bug reports to: <%s>.\n"
+#~ "Be sure to include the word ``%s'' somewhere in the ``Subject:'' field.\n"
+#~ msgstr ""
+#~ "Fehlerberichte bitte per E-Mail (auf englisch) an: <%s>.\n"
+#~ "Verwenden Sie dabei den Begriff »%s« irgendwo in der Betreffzeile.\n"
+#~ "Übersetzungsfehler in den deutschen Texten melden Sie bitte an\n"
+#~ "<translation-team-de@lists.sourceforge.net>.\n"
#~ msgid "super-sed version %s\n"
#~ msgstr "Super-sed version %s\n"
@@ -523,22 +870,22 @@ msgstr "Kein vorheriger regulrer Ausdruck"
#~ msgstr "GNU-sed-Version %s\n"
#~ msgid ""
-#~ "%s\n"
+#~ "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 ""
-#~ "%s\n"
-#~ "(Der folgende Text ist eine nicht berprfte bersetzung, die zur\n"
+#~ "Copyright (C) %d Free Software Foundation, Inc.\n"
+#~ "(Der folgende Text ist eine nicht überprüfte Übersetzung, die zur\n"
#~ " Information dient; in rechtlichen Fragen ist immer das englische\n"
#~ " Original ausschlaggebend)\n"
#~ "\n"
-#~ "Dieses Programm ist freie Software; In den Quelldateien knnen Sie die\n"
-#~ "Bedingungen fr die Weitergabe nachlesen.\n"
+#~ "Dieses Programm ist freie Software; In den Quelldateien können Sie die\n"
+#~ "Bedingungen für die Weitergabe nachlesen.\n"
#~ "Es gibt KEINE GARANTIE; nicht einmal die implizite Garantie der\n"
-#~ "MARKTFHIGKEIT oder der ERFLLUNG EINES BESTIMMTEN ZWECKES.\n"
+#~ "MARKTREIFE oder der EIGNUNG FÜR EINEN BESTIMMTEN ZWECK.\n"
#~ msgid "Called savchar() with unexpected pushback (%x)"
#~ msgstr "Aufruf von savchar() mit unerwartetem \"pushback\" (%x)"
@@ -553,7 +900,7 @@ msgstr "Kein vorheriger regulrer Ausdruck"
#~ msgstr "Unerwartetes Dateiende"
#~ msgid "bad regexp: %s\n"
-#~ msgstr "Falscher regulrer Ausdruck: %s\n"
+#~ msgstr "Falscher regulärer Ausdruck: %s\n"
#~ msgid "input read error: %s"
#~ msgstr "Eingabe-Lesefehler: %s"
diff --git a/po/el.gmo b/po/el.gmo
index f46a345..4f6c58a 100644
--- a/po/el.gmo
+++ b/po/el.gmo
Binary files differ
diff --git a/po/el.po b/po/el.po
index 2a631b9..af9a10f 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: 2012-12-22 14:36+0100\n"
+"POT-Creation-Date: 2016-12-30 00:59-0800\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"
@@ -15,208 +15,597 @@ msgstr ""
"MIME-Version: 1.0\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"
-#: sed/compile.c:144
+#: lib/closeout.c:112
+#, fuzzy
+msgid "write error"
+msgstr "εσωτερικό σφάλμα"
+
+#: lib/copy-acl.c:54
+#, c-format
+msgid "preserving permissions for %s"
+msgstr ""
+
+#: lib/dfa.c:1025 lib/dfa.c:1028 lib/dfa.c:1047 lib/dfa.c:1057 lib/dfa.c:1070
+#: lib/dfa.c:1098 lib/dfa.c:1107 lib/dfa.c:1110 lib/dfa.c:1115 lib/dfa.c:1137
+#: lib/dfa.c:1140
+msgid "unbalanced ["
+msgstr ""
+
+#: lib/dfa.c:1083
+#, fuzzy
+msgid "invalid character class"
+msgstr "Μη έγκυρο όνομα κλάσης χαρακτήρων"
+
+#: lib/dfa.c:1206
+msgid "character class syntax is [[:space:]], not [:space:]"
+msgstr ""
+
+#: lib/dfa.c:1275
+msgid "unfinished \\ escape"
+msgstr ""
+
+#: lib/dfa.c:1436
+#, fuzzy
+msgid "invalid content of \\{\\}"
+msgstr "Μη έγκυρο περιεχόμενο εντός \\{\\}"
+
+#: lib/dfa.c:1439
+#, fuzzy
+msgid "regular expression too big"
+msgstr "Πολύ μεγάλη κανονική έκφραση"
+
+#: lib/dfa.c:1853
+msgid "unbalanced ("
+msgstr ""
+
+#: lib/dfa.c:1980
+msgid "no syntax specified"
+msgstr ""
+
+#: lib/dfa.c:1988
+msgid "unbalanced )"
+msgstr ""
+
+#: lib/error.c:191
+#, 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
+#, 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:667 lib/getopt.c:672
+#, c-format
+msgid "%s: option '%c%s' doesn't allow an argument\n"
+msgstr ""
+
+#: lib/getopt.c:715 lib/getopt.c:734
+#, c-format
+msgid "%s: option '--%s' requires an argument\n"
+msgstr ""
+
+#: 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
+#, 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
+#, 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 "Εξάντληση διαθέσιμης μνήμης"
+
+#. TRANSLATORS:
+#. Get translations for open and closing quotation marks.
+#. The message catalog should translate "`" to a left
+#. quotation mark suitable for the locale, and similarly for
+#. "'". For example, a French Unicode local should translate
+#. these to U+00AB (LEFT-POINTING DOUBLE ANGLE
+#. QUOTATION MARK), and U+00BB (RIGHT-POINTING DOUBLE ANGLE
+#. QUOTATION MARK), respectively.
+#.
+#. If the catalog has no translation, we will try to
+#. use Unicode U+2018 (LEFT SINGLE QUOTATION MARK) and
+#. Unicode U+2019 (RIGHT SINGLE QUOTATION MARK). If the
+#. current locale is not Unicode, locale_quoting_style
+#. will quote 'like this', and clocale_quoting_style will
+#. quote "like this". You should always include translations
+#. for "`" and "'" even if U+2018 and U+2019 are appropriate
+#. for your locale.
+#.
+#. If you don't know what to put here, please see
+#. <http://en.wikipedia.org/wiki/Quotation_marks_in_other_languages>
+#. and use glyphs suitable for your language.
+#: lib/quotearg.c:354
+msgid "`"
+msgstr ""
+
+#: lib/quotearg.c:355
+msgid "'"
+msgstr ""
+
+#: lib/regcomp.c:135
+msgid "Success"
+msgstr "Επιτυχία"
+
+#: lib/regcomp.c:138
+msgid "No match"
+msgstr "Κανένα ταίριασμα"
+
+#: lib/regcomp.c:141
+msgid "Invalid regular expression"
+msgstr "Μη έγκυρη κανονική έκφραση"
+
+#: lib/regcomp.c:144
+msgid "Invalid collation character"
+msgstr "Μη έγκυρος χαρακτήρας ταξινόμησης"
+
+#: lib/regcomp.c:147
+msgid "Invalid character class name"
+msgstr "Μη έγκυρο όνομα κλάσης χαρακτήρων"
+
+#: lib/regcomp.c:150
+msgid "Trailing backslash"
+msgstr "Τελευταίος χαρακτήρας η πισωκάθετος"
+
+#: lib/regcomp.c:153
+msgid "Invalid back reference"
+msgstr "Μη έγκυρη οπισθαναφορά"
+
+#: lib/regcomp.c:156
+#, fuzzy
+msgid "Unmatched [, [^, [:, [., or [="
+msgstr "Αταίριαστο [ ή [^"
+
+#: lib/regcomp.c:159
+msgid "Unmatched ( or \\("
+msgstr "Αταίριαστο ( ή \\("
+
+#: lib/regcomp.c:162
+msgid "Unmatched \\{"
+msgstr "Αταίριαστο \\{"
+
+#: lib/regcomp.c:165
+msgid "Invalid content of \\{\\}"
+msgstr "Μη έγκυρο περιεχόμενο εντός \\{\\}"
+
+#: lib/regcomp.c:168
+msgid "Invalid range end"
+msgstr "Μη έγκυρο τέλος εύρους"
+
+#: lib/regcomp.c:171
+msgid "Memory exhausted"
+msgstr "Εξάντληση διαθέσιμης μνήμης"
+
+#: lib/regcomp.c:174
+msgid "Invalid preceding regular expression"
+msgstr "Μη έγκυρη προηγούμενη κανονική έκφραση"
+
+#: lib/regcomp.c:177
+msgid "Premature end of regular expression"
+msgstr "Πρόωρος τερματισμός κανονικής έκφρασης"
+
+#: lib/regcomp.c:180
+msgid "Regular expression too big"
+msgstr "Πολύ μεγάλη κανονική έκφραση"
+
+#: lib/regcomp.c:183
+msgid "Unmatched ) or \\)"
+msgstr "Αταίριαστο ) ή \\)"
+
+#: lib/regcomp.c:687
+msgid "No previous regular expression"
+msgstr "Δεν βρέθηκε προηγούμενη κανονική έκφραση"
+
+#: lib/set-acl.c:46
+#, c-format
+msgid "setting permissions for %s"
+msgstr ""
+
+#: lib/version-etc.c:74
+#, c-format
+msgid "Packaged by %s (%s)\n"
+msgstr ""
+
+#: lib/version-etc.c:77
+#, c-format
+msgid "Packaged by %s\n"
+msgstr ""
+
+#. 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 ""
+
+#: lib/version-etc.c:86
+msgid ""
+"\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"
+msgstr ""
+
+#. TRANSLATORS: %s denotes an author name.
+#: lib/version-etc.c:102
+#, c-format
+msgid "Written by %s.\n"
+msgstr ""
+
+#. TRANSLATORS: Each %s denotes an author name.
+#: lib/version-etc.c:106
+#, c-format
+msgid "Written by %s and %s.\n"
+msgstr ""
+
+#. TRANSLATORS: Each %s denotes an author name.
+#: lib/version-etc.c:110
+#, c-format
+msgid "Written by %s, %s, and %s.\n"
+msgstr ""
+
+#. TRANSLATORS: Each %s denotes an author name.
+#. You can use line breaks, estimating that each author name occupies
+#. ca. 16 screen columns and that a screen line has ca. 80 columns.
+#: lib/version-etc.c:117
+#, c-format
+msgid ""
+"Written by %s, %s, %s,\n"
+"and %s.\n"
+msgstr ""
+
+#. TRANSLATORS: Each %s denotes an author name.
+#. You can use line breaks, estimating that each author name occupies
+#. ca. 16 screen columns and that a screen line has ca. 80 columns.
+#: lib/version-etc.c:124
+#, c-format
+msgid ""
+"Written by %s, %s, %s,\n"
+"%s, and %s.\n"
+msgstr ""
+
+#. TRANSLATORS: Each %s denotes an author name.
+#. You can use line breaks, estimating that each author name occupies
+#. ca. 16 screen columns and that a screen line has ca. 80 columns.
+#: lib/version-etc.c:131
+#, c-format
+msgid ""
+"Written by %s, %s, %s,\n"
+"%s, %s, and %s.\n"
+msgstr ""
+
+#. TRANSLATORS: Each %s denotes an author name.
+#. You can use line breaks, estimating that each author name occupies
+#. ca. 16 screen columns and that a screen line has ca. 80 columns.
+#: lib/version-etc.c:139
+#, c-format
+msgid ""
+"Written by %s, %s, %s,\n"
+"%s, %s, %s, and %s.\n"
+msgstr ""
+
+#. TRANSLATORS: Each %s denotes an author name.
+#. You can use line breaks, estimating that each author name occupies
+#. ca. 16 screen columns and that a screen line has ca. 80 columns.
+#: lib/version-etc.c:147
+#, c-format
+msgid ""
+"Written by %s, %s, %s,\n"
+"%s, %s, %s, %s,\n"
+"and %s.\n"
+msgstr ""
+
+#. TRANSLATORS: Each %s denotes an author name.
+#. You can use line breaks, estimating that each author name occupies
+#. ca. 16 screen columns and that a screen line has ca. 80 columns.
+#: lib/version-etc.c:156
+#, c-format
+msgid ""
+"Written by %s, %s, %s,\n"
+"%s, %s, %s, %s,\n"
+"%s, and %s.\n"
+msgstr ""
+
+#. TRANSLATORS: Each %s denotes an author name.
+#. You can use line breaks, estimating that each author name occupies
+#. ca. 16 screen columns and that a screen line has ca. 80 columns.
+#: lib/version-etc.c:167
+#, c-format
+msgid ""
+"Written by %s, %s, %s,\n"
+"%s, %s, %s, %s,\n"
+"%s, %s, and others.\n"
+msgstr ""
+
+#. TRANSLATORS: The placeholder indicates the bug-reporting address
+#. for this package. Please add _another line_ saying
+#. "Report translation bugs to <...>\n" with the address for translation
+#. bugs (typically your translation team's web or email address).
+#: lib/version-etc.c:245
+#, c-format
+msgid ""
+"\n"
+"Report bugs to: %s\n"
+msgstr ""
+
+#: lib/version-etc.c:247
+#, c-format
+msgid "Report %s bugs to: %s\n"
+msgstr ""
+
+#: lib/version-etc.c:251
+#, c-format
+msgid "%s home page: <%s>\n"
+msgstr ""
+
+#: lib/version-etc.c:253
+#, c-format
+msgid "%s home page: <http://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"
+msgstr ""
+"Κεντρική ιστοσελίδα GNU sed: <http://www.gnu.org/software/sed/>.\n"
+"Γενική βοήθεια χρήσης GNU λογισμικού: <http://www.gnu.org/gethelp/>.\n"
+
+#: sed/compile.c:146
msgid "multiple `!'s"
msgstr "πολλαπλά `!'"
-#: sed/compile.c:145
+#: sed/compile.c:147
msgid "unexpected `,'"
msgstr "αναπάντεχο `,'"
-#: sed/compile.c:146
+#: sed/compile.c:149
msgid "invalid usage of +N or ~N as first address"
msgstr "δεν επιτρέπεται η χρήση των +N ή ~N ως πρώτη διεύθυνση"
-#: sed/compile.c:147
+#: sed/compile.c:150
msgid "unmatched `{'"
msgstr "αταίριαστο `{'"
-#: sed/compile.c:148
+#: sed/compile.c:151
msgid "unexpected `}'"
msgstr "αναπάντεχο `}'"
-#: sed/compile.c:149
+#: sed/compile.c:153
msgid "extra characters after command"
msgstr "επιπλέον χαρακτήρες μετά την εντολή"
-#: sed/compile.c:150
+#: sed/compile.c:155
msgid "expected \\ after `a', `c' or `i'"
msgstr "απαιτείται \\ μετά τις εντολές `a', `c' ή `i'"
-#: sed/compile.c:151
+#: sed/compile.c:157
msgid "`}' doesn't want any addresses"
msgstr "το `}' δεν χρειάζεται διευθύνσεις"
-#: sed/compile.c:152
+#: sed/compile.c:159
msgid ": doesn't want any addresses"
msgstr ": δεν χρειάζονται διευθύνσεις"
-#: sed/compile.c:153
+#: sed/compile.c:161
msgid "comments don't accept any addresses"
msgstr "τα σχόλια δεν δέχονται διευθύνσεις"
-#: sed/compile.c:154
+#: sed/compile.c:162
msgid "missing command"
msgstr "λείπει η εντολή"
-#: sed/compile.c:155
+#: sed/compile.c:163
msgid "command only uses one address"
msgstr "η εντολή χρησιμοποιεί μόνο μια διεύθυνση"
-#: sed/compile.c:156
+#: sed/compile.c:164
msgid "unterminated address regex"
msgstr "μη τερματισμένη κανονικής έκφραση διεύθυνσης"
-#: sed/compile.c:157
+#: sed/compile.c:165
msgid "unterminated `s' command"
msgstr "μη τερματισμένη εντολή `s'"
-#: sed/compile.c:158
+#: sed/compile.c:166
msgid "unterminated `y' command"
msgstr "μη τερματισμένη εντολή `y'"
-#: sed/compile.c:159
+#: sed/compile.c:167
msgid "unknown option to `s'"
msgstr "άγνωστη επιλογή για το `s'"
-#: sed/compile.c:160
+#: sed/compile.c:169
msgid "multiple `p' options to `s' command"
msgstr "πολλαπλές επιλογές `p' στην εντολή `s'"
-#: sed/compile.c:161
+#: sed/compile.c:171
msgid "multiple `g' options to `s' command"
msgstr "πολλαπλές επιλογές `g' στην εντολή `s'"
-#: sed/compile.c:162
+#: sed/compile.c:173
msgid "multiple number options to `s' command"
msgstr "πολλαπλός αριθμητικές επιλογές στην εντολή `s'"
-#: sed/compile.c:163
+#: sed/compile.c:175
msgid "number option to `s' command may not be zero"
msgstr "η αριθμητική επιλογή στην εντολή `s' δεν μπορεί να είναι μηδέν"
-#: sed/compile.c:164
+#: sed/compile.c:177
msgid "strings for `y' command are different lengths"
msgstr "τα αλφαριθμητικά για την εντολή `y' είναι διαφορετικού μεγέθους"
-#: sed/compile.c:165
+#: sed/compile.c:179
msgid "delimiter character is not a single-byte character"
msgstr "ο χαρακτήρας διαχωριστής έχει μέγεθος μεγαλύτερο από ένα byte"
-#: sed/compile.c:166
+#: sed/compile.c:181
msgid "expected newer version of sed"
msgstr "αναμενόταν νεώτερη έκδοση του sed"
-#: sed/compile.c:167
+#: sed/compile.c:183
msgid "invalid usage of line address 0"
msgstr "ακατάλληλη χρήση διεύθυνσης γραμμής 0"
-#: sed/compile.c:168
+#: sed/compile.c:184
#, c-format
msgid "unknown command: `%c'"
msgstr "άγνωστη εντολή: `%c'"
-#: sed/compile.c:169
+#: sed/compile.c:186
#, fuzzy
msgid "incomplete command"
msgstr "λείπει η εντολή"
-#: sed/compile.c:192
+#: sed/compile.c:188
+msgid "\":\" lacks a label"
+msgstr ""
+
+#: sed/compile.c:190
+msgid "recursive escaping after \\c not allowed"
+msgstr ""
+
+#: sed/compile.c:213
#, c-format
msgid "%s: file %s line %lu: %s\n"
msgstr "%s: αρχείο %s γραμμή %lu: %s\n"
-#: sed/compile.c:195
+#: sed/compile.c:216
#, c-format
msgid "%s: -e expression #%lu, char %lu: %s\n"
msgstr "%s: -e έκφραση #%lu, χαρακτήρας %lu: %s\n"
-#: sed/compile.c:1657
+#: sed/compile.c:1639
#, c-format
msgid "can't find label for jump to `%s'"
msgstr "αδυναμία εύρεσης ετικέττας για μετάβαση στο `%s'"
-#: sed/execute.c:595
+#: sed/execute.c:264 sed/execute.c:281
+#, c-format
+msgid "case conversion produced an invalid character"
+msgstr ""
+
+#: sed/execute.c:575
#, c-format
msgid "%s: can't read %s: %s\n"
msgstr "%s: αδυναμία ανάγνωσης του %s: %s\n"
-#: sed/execute.c:624
+#: sed/execute.c:600
#, c-format
msgid "couldn't edit %s: is a terminal"
msgstr "αδυναμία επεξεργασίας του %s: είναι τερματικό"
-#: sed/execute.c:629
+#: sed/execute.c:605
#, c-format
msgid "couldn't edit %s: not a regular file"
msgstr "αδυναμία επεξεργασίας του %s: δεν είναι κανονικό αρχείο"
-#: sed/execute.c:640
+#: sed/execute.c:616
#, c-format
msgid "%s: warning: failed to set default file creation context to %s: %s"
msgstr ""
"%s: προειδοποίηση: αποτυχία ορισμού προεπιλεγμένου πλαισίου δημιουργίας "
"αρχείου ως %s: %s"
-#: sed/execute.c:647
+#: sed/execute.c:624
#, c-format
msgid "%s: warning: failed to get security context of %s: %s"
msgstr ""
"%s: προειδοποίηση: αποτυχία πάρσης πλαίσιου ασφαλείας του αρχείου %s: %s"
-#: sed/execute.c:664 sed/utils.c:211
+#: sed/execute.c:643 sed/utils.c:178
#, c-format
msgid "couldn't open temporary file %s: %s"
msgstr "αδυναμία ανοίγματος του αρχείου %s: %s"
-#: sed/execute.c:1193 sed/execute.c:1373
+#: sed/execute.c:1158 sed/execute.c:1368
msgid "error in subprocess"
msgstr "σφάλμα στη υποδιαδικασία"
-#: sed/execute.c:1195
+#: sed/execute.c:1160
msgid "option `e' not supported"
msgstr "η επιλογή `e' δεν υποστηρίζεται"
-#: sed/execute.c:1375
+#: sed/execute.c:1349
msgid "`e' command not supported"
msgstr "η εντολή `e' δεν υποστηρίζεται"
-#: sed/execute.c:1725
+#: sed/execute.c:1675
msgid "no input files"
msgstr "δεν υπάρχουν αρχεία εισόδου"
-#: sed/regexp.c:39
+#: sed/regexp.c:38
msgid "no previous regular expression"
msgstr "δεν βρέθηκε προηγούμενη κανονική έκφραση"
-#: sed/regexp.c:40
-msgid "cannot specify modifiers on empty regexp"
-msgstr "δεν επιτρέπεται ο ορισμός διαμορφωτών σε κενή κανονική έκφραση"
-
-#: sed/regexp.c:129
+#: sed/regexp.c:138
#, c-format
msgid "invalid reference \\%d on `s' command's RHS"
msgstr "μη έγκυρη αναφορά \\%d στο δεξί τμήμα της εντολής `s'"
-#: sed/sed.c:32
+#: sed/sed.c:35
msgid "Jay Fenlason"
msgstr ""
-#: sed/sed.c:33
+#: sed/sed.c:36
msgid "Tom Lord"
msgstr ""
-#: sed/sed.c:34
+#: sed/sed.c:37
msgid "Ken Pizzini"
msgstr ""
-#: sed/sed.c:35
+#: sed/sed.c:38
msgid "Paolo Bonzini"
msgstr ""
-#: sed/sed.c:79
+#: sed/sed.c:113
#, c-format
msgid ""
"GNU sed home page: <http://www.gnu.org/software/sed/>.\n"
@@ -225,16 +614,12 @@ msgstr ""
"Κεντρική ιστοσελίδα GNU sed: <http://www.gnu.org/software/sed/>.\n"
"Γενική βοήθεια χρήσης GNU λογισμικού: <http://www.gnu.org/gethelp/>.\n"
-#: sed/sed.c:86
+#: sed/sed.c:120
#, c-format
-msgid ""
-"E-mail bug reports to: <%s>.\n"
-"Be sure to include the word ``%s'' somewhere in the ``Subject:'' field.\n"
+msgid "E-mail bug reports to: <%s>.\n"
msgstr ""
-"Αναφορές σφαλμάτων μέσω ηλεκτρονικού ταχυδρομείου στο: %s .\n"
-"Προσέξτε να συμπεριλάβετε τη λέξη ``%s'' κάπου στο πεδίο ``Subject:''.\n"
-#: sed/sed.c:99
+#: sed/sed.c:129
msgid ""
" -R, --regexp-perl\n"
" use Perl 5's regular expressions syntax in the script.\n"
@@ -242,7 +627,7 @@ msgstr ""
" -R, --regexp-perl\n"
" χρήση κανονικών εκφράσεων με σύνταξη Perl 5 στο σενάριο.\n"
-#: sed/sed.c:104
+#: sed/sed.c:134
#, c-format
msgid ""
"Usage: %s [OPTION]... {script-only-if-no-other-script} [input-file]...\n"
@@ -252,7 +637,7 @@ msgstr ""
"εισόδου]...\n"
"\n"
-#: sed/sed.c:108
+#: sed/sed.c:138
#, c-format
msgid ""
" -n, --quiet, --silent\n"
@@ -261,7 +646,7 @@ msgstr ""
" -n, --quiet, --silent\n"
" δεν γίνεται αυτόματη εκτύπωση του χώρου υποδείγματος\n"
-#: sed/sed.c:110
+#: sed/sed.c:140
#, c-format
msgid ""
" -e script, --expression=script\n"
@@ -270,7 +655,7 @@ msgstr ""
" -e σενάριο --expression=σενάριο\n"
" προσθήκη του σεναρίου στις εντολές προς εκτέλεση\n"
-#: sed/sed.c:112
+#: sed/sed.c:142
#, c-format
msgid ""
" -f script-file, --file=script-file\n"
@@ -280,7 +665,7 @@ msgstr ""
" -f αρχείο-σεναρίου --file=αρχείο-σεναρίου\n"
" προσθήκη του αρχείου-σεναρίου στις εντολές προς εκτέλεση\n"
-#: sed/sed.c:115
+#: sed/sed.c:146
#, c-format
msgid ""
" --follow-symlinks\n"
@@ -289,7 +674,7 @@ msgstr ""
" --follow-symlinks\n"
" ακολούθηση συμβολικών συνδέσμων στην επιτόπια επεξεργασία\n"
-#: sed/sed.c:118
+#: sed/sed.c:149
#, fuzzy, c-format
msgid ""
" -i[SUFFIX], --in-place[=SUFFIX]\n"
@@ -299,7 +684,7 @@ msgstr ""
" επιτόπια επεξεργασία (δημιουργίας αντιγράφου αν παρέχεται "
"ΕΠΙΘΗΜΑ)\n"
-#: sed/sed.c:121
+#: sed/sed.c:153
#, c-format
msgid ""
" -b, --binary\n"
@@ -310,7 +695,7 @@ msgstr ""
" άνοιγμα αρχείων ως δυαδικά (οι χαρακτήρες CR και LF δεν "
"έχουν ειδική σημασία)\n"
-#: sed/sed.c:124
+#: sed/sed.c:157
#, c-format
msgid ""
" -l N, --line-length=N\n"
@@ -320,7 +705,7 @@ msgstr ""
" καθορισμός επιθυμητού μήκους γραμμής για αναδίπλωση γραμμών "
"στην εντολή `l'\n"
-#: sed/sed.c:126
+#: sed/sed.c:159
#, c-format
msgid ""
" --posix\n"
@@ -329,28 +714,35 @@ msgstr ""
" --posix\n"
" απενεργοποίηση όλων των επεκτάσεων GNU στο πρωτότυπο sed.\n"
-#: sed/sed.c:128
-#, c-format
+#: sed/sed.c:161
+#, fuzzy, c-format
msgid ""
-" -r, --regexp-extended\n"
-" use extended regular expressions in the script.\n"
+" -E, -r, --regexp-extended\n"
+" use extended regular expressions in the script\n"
+" (for portability use POSIX -E).\n"
msgstr ""
" -r, --regexp-extended\n"
" χρήση επεκτεταμένων κανονικών εκφράσεων στο σενάριο.\n"
-#: sed/sed.c:133
-#, c-format
+#: sed/sed.c:167
+#, fuzzy, c-format
msgid ""
" -s, --separate\n"
-" consider files as separate rather than as a single "
-"continuous\n"
-" long stream.\n"
+" consider files as separate rather than as a single,\n"
+" continuous long stream.\n"
msgstr ""
" -s, --separate\n"
" τα αρχεία εισόδου να λογίζονται ξεχωριστά, αντί ως ένας\n"
" συνεχής μακρύς χείμαρρος.\n"
-#: sed/sed.c:136
+#: sed/sed.c:170
+#, c-format
+msgid ""
+" --sandbox\n"
+" operate in sandbox mode.\n"
+msgstr ""
+
+#: sed/sed.c:172
#, c-format
msgid ""
" -u, --unbuffered\n"
@@ -363,25 +755,25 @@ msgstr ""
"εισόδου\n"
" και άδειασμα των ενταμιευτών εξόδου συχνότερα\n"
-#: sed/sed.c:139
+#: sed/sed.c:175
#, c-format
msgid ""
" -z, --null-data\n"
" separate lines by NUL characters\n"
msgstr ""
-#: sed/sed.c:141
+#: sed/sed.c:177
#, c-format
msgid " --help display this help and exit\n"
msgstr " --help εμφάνιση αυτού του κειμένου βοηθείας και έξοδος\n"
-#: sed/sed.c:142
+#: sed/sed.c:178
#, c-format
msgid " --version output version information and exit\n"
msgstr ""
" --version εμφάνιση πληροφοριών έκδοσης προγράμματος και έξοδος\n"
-#: sed/sed.c:143
+#: sed/sed.c:179
#, c-format
msgid ""
"\n"
@@ -398,119 +790,57 @@ msgstr ""
"καθοριστεί αρχεία εισόδου, τότε γίνεται ανάγνωση της κανονικής εισόδου.\n"
"\n"
-#: sed/utils.c:74 sed/utils.c:432
+#: sed/utils.c:73 sed/utils.c:384
#, c-format
msgid "cannot remove %s: %s"
msgstr "αδυναμία διαγραφής του %s: %s"
-#: sed/utils.c:144
+#: sed/utils.c:136
#, c-format
msgid "couldn't open file %s: %s"
msgstr "αδυναμία ανοίγματος του %s: %s"
-#: sed/utils.c:167
+#: sed/utils.c:155
#, c-format
msgid "couldn't attach to %s: %s"
msgstr "αδυναμία προσάρτησης στο %s: %s"
-#: sed/utils.c:229
-#, c-format
-msgid "couldn't write %d item to %s: %s"
-msgid_plural "couldn't write %d items to %s: %s"
+#: sed/utils.c:192
+#, fuzzy, c-format
+msgid "couldn't write %llu item to %s: %s"
+msgid_plural "couldn't write %llu items to %s: %s"
msgstr[0] "αδυναμία εγγραφής %d στοιχείου στο %s: %s"
msgstr[1] "αδυναμία εγγραφής %d στοιχείων στο %s: %s"
-#: sed/utils.c:244 sed/utils.c:267
+#: sed/utils.c:204 sed/utils.c:223
#, c-format
msgid "read error on %s: %s"
msgstr "σφάλμα ανάγνωσης στο %s: %s"
-#: sed/utils.c:372
+#: sed/utils.c:325
#, c-format
msgid "couldn't follow symlink %s: %s"
msgstr "αδυναμία ακολούθησης του συμβολικού συνδέσμου %s: %s"
-#: sed/utils.c:406
+#: sed/utils.c:359
#, c-format
msgid "cannot stat %s: %s"
msgstr "αδυναμία ανάγνωσης εγγραφής για το %s στον κατάλογο αρχείων: %s"
-#: sed/utils.c:437
+#: sed/utils.c:389
#, c-format
msgid "cannot rename %s: %s"
msgstr "αδυναμία μετονομασίας του %s: %s"
-#: lib/regcomp.c:132
-msgid "Success"
-msgstr "Επιτυχία"
-
-#: lib/regcomp.c:135
-msgid "No match"
-msgstr "Κανένα ταίριασμα"
-
-#: lib/regcomp.c:138
-msgid "Invalid regular expression"
-msgstr "Μη έγκυρη κανονική έκφραση"
-
-#: lib/regcomp.c:141
-msgid "Invalid collation character"
-msgstr "Μη έγκυρος χαρακτήρας ταξινόμησης"
-
-#: lib/regcomp.c:144
-msgid "Invalid character class name"
-msgstr "Μη έγκυρο όνομα κλάσης χαρακτήρων"
-
-#: lib/regcomp.c:147
-msgid "Trailing backslash"
-msgstr "Τελευταίος χαρακτήρας η πισωκάθετος"
-
-#: lib/regcomp.c:150
-msgid "Invalid back reference"
-msgstr "Μη έγκυρη οπισθαναφορά"
-
-#: lib/regcomp.c:153
-msgid "Unmatched [ or [^"
-msgstr "Αταίριαστο [ ή [^"
-
-#: lib/regcomp.c:156
-msgid "Unmatched ( or \\("
-msgstr "Αταίριαστο ( ή \\("
-
-#: lib/regcomp.c:159
-msgid "Unmatched \\{"
-msgstr "Αταίριαστο \\{"
-
-#: lib/regcomp.c:162
-msgid "Invalid content of \\{\\}"
-msgstr "Μη έγκυρο περιεχόμενο εντός \\{\\}"
-
-#: lib/regcomp.c:165
-msgid "Invalid range end"
-msgstr "Μη έγκυρο τέλος εύρους"
+#~ msgid "cannot specify modifiers on empty regexp"
+#~ msgstr "δεν επιτρέπεται ο ορισμός διαμορφωτών σε κενή κανονική έκφραση"
-#: lib/regcomp.c:168
-msgid "Memory exhausted"
-msgstr "Εξάντληση διαθέσιμης μνήμης"
-
-#: lib/regcomp.c:171
-msgid "Invalid preceding regular expression"
-msgstr "Μη έγκυρη προηγούμενη κανονική έκφραση"
-
-#: lib/regcomp.c:174
-msgid "Premature end of regular expression"
-msgstr "Πρόωρος τερματισμός κανονικής έκφρασης"
-
-#: lib/regcomp.c:177
-msgid "Regular expression too big"
-msgstr "Πολύ μεγάλη κανονική έκφραση"
-
-#: lib/regcomp.c:180
-msgid "Unmatched ) or \\)"
-msgstr "Αταίριαστο ) ή \\)"
-
-#: lib/regcomp.c:705
-msgid "No previous regular expression"
-msgstr "Δεν βρέθηκε προηγούμενη κανονική έκφραση"
+#~ msgid ""
+#~ "E-mail bug reports to: <%s>.\n"
+#~ "Be sure to include the word ``%s'' somewhere in the ``Subject:'' field.\n"
+#~ msgstr ""
+#~ "Αναφορές σφαλμάτων μέσω ηλεκτρονικού ταχυδρομείου στο: %s .\n"
+#~ "Προσέξτε να συμπεριλάβετε τη λέξη ``%s'' κάπου στο πεδίο ``Subject:''.\n"
#~ msgid "super-sed version %s\n"
#~ msgstr "super-sed έκδοση %s\n"
@@ -715,9 +1045,6 @@ msgstr "Δεν βρέθηκε προηγούμενη κανονική έκφρα
#~ msgid "bad condition (?(0)"
#~ msgstr "λανθασμένη υπόθεση (?(0"
-#~ msgid "internal error"
-#~ msgstr "εσωτερικό σφάλμα"
-
#~ msgid "pattern error"
#~ msgstr "μη έγκυρο υπόδειγμα"
@@ -736,8 +1063,5 @@ msgstr "Δεν βρέθηκε προηγούμενη κανονική έκφρα
#~ msgid "match failed"
#~ msgstr "κανένα ταίριασμα"
-#~ msgid "unknown error code"
-#~ msgstr "άγνωστος κώδικας σφάλματος"
-
#~ msgid "%s at offset %-6d"
#~ msgstr "%s στη θέση %-6d"
diff --git a/po/eo.gmo b/po/eo.gmo
index 1e91dd7..7cd7597 100644
--- a/po/eo.gmo
+++ b/po/eo.gmo
Binary files differ
diff --git a/po/eo.po b/po/eo.po
index e05c8c3..d25ba85 100644
--- a/po/eo.po
+++ b/po/eo.po
@@ -1,234 +1,622 @@
# Esperantaj mesaĝoj por GNU sed.
-# Copyright (C) 2002 Free Software Foundation, Inc.
-# Edmund GRIMLEY EVANS <edmundo@rano.org>, 2001-2008.
+# Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2013, 2016 Free Software Foundation, Inc.
+# This file is distributed under the same license as the sed package.
+# Edmund GRIMLEY EVANS <edmundo@rano.org> 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008.
+# Felipe Castro <fefcas@gmail.com> 2013, 2016.
#
msgid ""
msgstr ""
-"Project-Id-Version: GNU sed 4.2.0\n"
+"Project-Id-Version: GNU sed 4.2.2\n"
"Report-Msgid-Bugs-To: bug-gnu-utils@gnu.org\n"
-"POT-Creation-Date: 2012-12-22 14:36+0100\n"
-"PO-Revision-Date: 2008-01-17 22:41+0000\n"
-"Last-Translator: Edmund GRIMLEY EVANS <edmundo@rano.org>\n"
+"POT-Creation-Date: 2016-12-30 00:59-0800\n"
+"PO-Revision-Date: 2016-11-13 22:08-0300\n"
+"Last-Translator: Felipe Castro <fefcas@gmail.com>\n"
"Language-Team: Esperanto <translation-team-eo@lists.sourceforge.net>\n"
"Language: eo\n"
"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=utf-8\n"
-"Content-Transfer-Encoding: 8-bit\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"
+"X-Generator: Poedit 1.5.4\n"
-#: sed/compile.c:144
+#: lib/closeout.c:112
+msgid "write error"
+msgstr ""
+
+#: lib/copy-acl.c:54
+#, c-format
+msgid "preserving permissions for %s"
+msgstr ""
+
+#: lib/dfa.c:1025 lib/dfa.c:1028 lib/dfa.c:1047 lib/dfa.c:1057 lib/dfa.c:1070
+#: lib/dfa.c:1098 lib/dfa.c:1107 lib/dfa.c:1110 lib/dfa.c:1115 lib/dfa.c:1137
+#: lib/dfa.c:1140
+msgid "unbalanced ["
+msgstr ""
+
+#: lib/dfa.c:1083
+#, fuzzy
+msgid "invalid character class"
+msgstr "Nevalida nomo de signoklaso"
+
+#: lib/dfa.c:1206
+msgid "character class syntax is [[:space:]], not [:space:]"
+msgstr ""
+
+#: lib/dfa.c:1275
+msgid "unfinished \\ escape"
+msgstr ""
+
+#: lib/dfa.c:1436
+#, fuzzy
+msgid "invalid content of \\{\\}"
+msgstr "Nevalida enhavo de \\{\\}"
+
+#: lib/dfa.c:1439
+#, fuzzy
+msgid "regular expression too big"
+msgstr "Regula esprimo tro granda"
+
+#: lib/dfa.c:1853
+msgid "unbalanced ("
+msgstr ""
+
+#: lib/dfa.c:1980
+msgid "no syntax specified"
+msgstr ""
+
+#: lib/dfa.c:1988
+msgid "unbalanced )"
+msgstr ""
+
+#: lib/error.c:191
+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 ""
+
+#: lib/getopt.c:654 lib/getopt.c:658
+#, c-format
+msgid "%s: option '--%s' doesn't allow an argument\n"
+msgstr ""
+
+#: 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:715 lib/getopt.c:734
+#, c-format
+msgid "%s: option '--%s' requires an argument\n"
+msgstr ""
+
+#: 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
+#, 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
+#, 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 "Mankas memoro"
+
+#. TRANSLATORS:
+#. Get translations for open and closing quotation marks.
+#. The message catalog should translate "`" to a left
+#. quotation mark suitable for the locale, and similarly for
+#. "'". For example, a French Unicode local should translate
+#. these to U+00AB (LEFT-POINTING DOUBLE ANGLE
+#. QUOTATION MARK), and U+00BB (RIGHT-POINTING DOUBLE ANGLE
+#. QUOTATION MARK), respectively.
+#.
+#. If the catalog has no translation, we will try to
+#. use Unicode U+2018 (LEFT SINGLE QUOTATION MARK) and
+#. Unicode U+2019 (RIGHT SINGLE QUOTATION MARK). If the
+#. current locale is not Unicode, locale_quoting_style
+#. will quote 'like this', and clocale_quoting_style will
+#. quote "like this". You should always include translations
+#. for "`" and "'" even if U+2018 and U+2019 are appropriate
+#. for your locale.
+#.
+#. If you don't know what to put here, please see
+#. <http://en.wikipedia.org/wiki/Quotation_marks_in_other_languages>
+#. and use glyphs suitable for your language.
+#: lib/quotearg.c:354
+msgid "`"
+msgstr ""
+
+#: lib/quotearg.c:355
+msgid "'"
+msgstr ""
+
+#: lib/regcomp.c:135
+msgid "Success"
+msgstr "Sukceso"
+
+#: lib/regcomp.c:138
+msgid "No match"
+msgstr "Maltrafo"
+
+#: lib/regcomp.c:141
+msgid "Invalid regular expression"
+msgstr "Nevalida regula esprimo"
+
+#: lib/regcomp.c:144
+msgid "Invalid collation character"
+msgstr "Nevalida kunfanda signo"
+
+#: lib/regcomp.c:147
+msgid "Invalid character class name"
+msgstr "Nevalida nomo de signoklaso"
+
+#: lib/regcomp.c:150
+msgid "Trailing backslash"
+msgstr "Malsuprenstreko ĉe fino"
+
+#: lib/regcomp.c:153
+msgid "Invalid back reference"
+msgstr "Nevalida retroreferenco"
+
+#: lib/regcomp.c:156
+#, fuzzy
+msgid "Unmatched [, [^, [:, [., or [="
+msgstr "Neparigita [ aŭ [^"
+
+#: lib/regcomp.c:159
+msgid "Unmatched ( or \\("
+msgstr "Neparigita ( aŭ \\("
+
+#: lib/regcomp.c:162
+msgid "Unmatched \\{"
+msgstr "Neparigita \\{"
+
+#: lib/regcomp.c:165
+msgid "Invalid content of \\{\\}"
+msgstr "Nevalida enhavo de \\{\\}"
+
+#: lib/regcomp.c:168
+msgid "Invalid range end"
+msgstr "Nevalida fino de gamo"
+
+#: lib/regcomp.c:171
+msgid "Memory exhausted"
+msgstr "Mankas memoro"
+
+#: lib/regcomp.c:174
+msgid "Invalid preceding regular expression"
+msgstr "Nevalida antaŭa regula esprimo"
+
+#: lib/regcomp.c:177
+msgid "Premature end of regular expression"
+msgstr "Neatendita fino de regula esprimo"
+
+#: lib/regcomp.c:180
+msgid "Regular expression too big"
+msgstr "Regula esprimo tro granda"
+
+#: lib/regcomp.c:183
+msgid "Unmatched ) or \\)"
+msgstr "Neparigita ) aŭ \\)"
+
+#: lib/regcomp.c:687
+msgid "No previous regular expression"
+msgstr "Mankas antaŭa regula esprimo"
+
+#: lib/set-acl.c:46
+#, c-format
+msgid "setting permissions for %s"
+msgstr ""
+
+#: lib/version-etc.c:74
+#, c-format
+msgid "Packaged by %s (%s)\n"
+msgstr ""
+
+#: lib/version-etc.c:77
+#, c-format
+msgid "Packaged by %s\n"
+msgstr ""
+
+#. 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 ""
+
+#: lib/version-etc.c:86
+msgid ""
+"\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"
+msgstr ""
+
+#. TRANSLATORS: %s denotes an author name.
+#: lib/version-etc.c:102
+#, c-format
+msgid "Written by %s.\n"
+msgstr ""
+
+#. TRANSLATORS: Each %s denotes an author name.
+#: lib/version-etc.c:106
+#, c-format
+msgid "Written by %s and %s.\n"
+msgstr ""
+
+#. TRANSLATORS: Each %s denotes an author name.
+#: lib/version-etc.c:110
+#, c-format
+msgid "Written by %s, %s, and %s.\n"
+msgstr ""
+
+#. TRANSLATORS: Each %s denotes an author name.
+#. You can use line breaks, estimating that each author name occupies
+#. ca. 16 screen columns and that a screen line has ca. 80 columns.
+#: lib/version-etc.c:117
+#, c-format
+msgid ""
+"Written by %s, %s, %s,\n"
+"and %s.\n"
+msgstr ""
+
+#. TRANSLATORS: Each %s denotes an author name.
+#. You can use line breaks, estimating that each author name occupies
+#. ca. 16 screen columns and that a screen line has ca. 80 columns.
+#: lib/version-etc.c:124
+#, c-format
+msgid ""
+"Written by %s, %s, %s,\n"
+"%s, and %s.\n"
+msgstr ""
+
+#. TRANSLATORS: Each %s denotes an author name.
+#. You can use line breaks, estimating that each author name occupies
+#. ca. 16 screen columns and that a screen line has ca. 80 columns.
+#: lib/version-etc.c:131
+#, c-format
+msgid ""
+"Written by %s, %s, %s,\n"
+"%s, %s, and %s.\n"
+msgstr ""
+
+#. TRANSLATORS: Each %s denotes an author name.
+#. You can use line breaks, estimating that each author name occupies
+#. ca. 16 screen columns and that a screen line has ca. 80 columns.
+#: lib/version-etc.c:139
+#, c-format
+msgid ""
+"Written by %s, %s, %s,\n"
+"%s, %s, %s, and %s.\n"
+msgstr ""
+
+#. TRANSLATORS: Each %s denotes an author name.
+#. You can use line breaks, estimating that each author name occupies
+#. ca. 16 screen columns and that a screen line has ca. 80 columns.
+#: lib/version-etc.c:147
+#, c-format
+msgid ""
+"Written by %s, %s, %s,\n"
+"%s, %s, %s, %s,\n"
+"and %s.\n"
+msgstr ""
+
+#. TRANSLATORS: Each %s denotes an author name.
+#. You can use line breaks, estimating that each author name occupies
+#. ca. 16 screen columns and that a screen line has ca. 80 columns.
+#: lib/version-etc.c:156
+#, c-format
+msgid ""
+"Written by %s, %s, %s,\n"
+"%s, %s, %s, %s,\n"
+"%s, and %s.\n"
+msgstr ""
+
+#. TRANSLATORS: Each %s denotes an author name.
+#. You can use line breaks, estimating that each author name occupies
+#. ca. 16 screen columns and that a screen line has ca. 80 columns.
+#: lib/version-etc.c:167
+#, c-format
+msgid ""
+"Written by %s, %s, %s,\n"
+"%s, %s, %s, %s,\n"
+"%s, %s, and others.\n"
+msgstr ""
+
+#. TRANSLATORS: The placeholder indicates the bug-reporting address
+#. for this package. Please add _another line_ saying
+#. "Report translation bugs to <...>\n" with the address for translation
+#. bugs (typically your translation team's web or email address).
+#: lib/version-etc.c:245
+#, c-format
+msgid ""
+"\n"
+"Report bugs to: %s\n"
+msgstr ""
+
+#: lib/version-etc.c:247
+#, c-format
+msgid "Report %s bugs to: %s\n"
+msgstr ""
+
+#: lib/version-etc.c:251
+#, c-format
+msgid "%s home page: <%s>\n"
+msgstr ""
+
+#: lib/version-etc.c:253
+#, c-format
+msgid "%s home page: <http://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"
+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"
+
+#: sed/compile.c:146
msgid "multiple `!'s"
msgstr "pluraj '!'oj"
-#: sed/compile.c:145
+#: sed/compile.c:147
msgid "unexpected `,'"
msgstr "neatendita ','"
-#: sed/compile.c:146
+#: sed/compile.c:149
msgid "invalid usage of +N or ~N as first address"
msgstr "nevalida uzo de +N aŭ ~N kiel unua adreso"
-#: sed/compile.c:147
+#: sed/compile.c:150
msgid "unmatched `{'"
msgstr "neparigita '{'"
-#: sed/compile.c:148
+#: sed/compile.c:151
msgid "unexpected `}'"
msgstr "neatendita '}'"
-#: sed/compile.c:149
+#: sed/compile.c:153
msgid "extra characters after command"
msgstr "kromaj signoj post komando"
-#: sed/compile.c:150
+#: sed/compile.c:155
msgid "expected \\ after `a', `c' or `i'"
msgstr "atendita \\ post 'a', 'c' aŭ 'i'"
-#: sed/compile.c:151
+#: sed/compile.c:157
msgid "`}' doesn't want any addresses"
msgstr "'}' ne deziras adresojn"
-#: sed/compile.c:152
+#: sed/compile.c:159
msgid ": doesn't want any addresses"
msgstr ": ne deziras adresojn"
-#: sed/compile.c:153
+#: sed/compile.c:161
msgid "comments don't accept any addresses"
msgstr "komentoj ne akceptas adresojn"
-#: sed/compile.c:154
+#: sed/compile.c:162
msgid "missing command"
msgstr "mankas komando"
-#: sed/compile.c:155
+#: sed/compile.c:163
msgid "command only uses one address"
msgstr "komando uzas nur unu adreson"
-#: sed/compile.c:156
+#: sed/compile.c:164
msgid "unterminated address regex"
msgstr "nefinita adresa regesp"
-#: sed/compile.c:157
+#: sed/compile.c:165
msgid "unterminated `s' command"
msgstr "nefinita komando 's'"
-#: sed/compile.c:158
+#: sed/compile.c:166
msgid "unterminated `y' command"
msgstr "nefinita komando 'y'"
-#: sed/compile.c:159
+#: sed/compile.c:167
msgid "unknown option to `s'"
msgstr "nekonata opcio por 's'"
-#: sed/compile.c:160
+#: sed/compile.c:169
msgid "multiple `p' options to `s' command"
msgstr "pluraj 'p'-opcioj por komando 's'"
-#: sed/compile.c:161
+#: sed/compile.c:171
msgid "multiple `g' options to `s' command"
msgstr "pluraj 'g'-opcioj por komando 's'"
-#: sed/compile.c:162
+#: sed/compile.c:173
msgid "multiple number options to `s' command"
msgstr "pluraj nombro-opcioj por komando 's'"
-#: sed/compile.c:163
+#: sed/compile.c:175
msgid "number option to `s' command may not be zero"
msgstr "nombro-opcio por komando 's' ne povas esti nul"
-#: sed/compile.c:164
+#: sed/compile.c:177
msgid "strings for `y' command are different lengths"
msgstr "ĉenoj por komando 'y' havas malsamajn longojn"
-#: sed/compile.c:165
+#: sed/compile.c:179
msgid "delimiter character is not a single-byte character"
msgstr "apartiga signo ne estas unubitoka signo"
-#: sed/compile.c:166
+#: sed/compile.c:181
msgid "expected newer version of sed"
msgstr "atendis pli novan version de sed"
-#: sed/compile.c:167
+#: sed/compile.c:183
msgid "invalid usage of line address 0"
msgstr "nevalida uzo de liniadreso 0"
-#: sed/compile.c:168
+#: sed/compile.c:184
#, c-format
msgid "unknown command: `%c'"
msgstr "nekonata komando: '%c'"
-#: sed/compile.c:169
-#, fuzzy
+#: sed/compile.c:186
msgid "incomplete command"
-msgstr "mankas komando"
+msgstr "malkompleta komando"
+
+#: sed/compile.c:188
+msgid "\":\" lacks a label"
+msgstr ""
-#: sed/compile.c:192
+#: sed/compile.c:190
+msgid "recursive escaping after \\c not allowed"
+msgstr ""
+
+#: sed/compile.c:213
#, c-format
msgid "%s: file %s line %lu: %s\n"
msgstr "%s: dosiero %s linio %lu: %s\n"
-#: sed/compile.c:195
+#: sed/compile.c:216
#, c-format
msgid "%s: -e expression #%lu, char %lu: %s\n"
msgstr "%s: -e esprimo #%lu, signo %lu: %s\n"
-#: sed/compile.c:1657
+#: sed/compile.c:1639
#, c-format
msgid "can't find label for jump to `%s'"
msgstr "ne povas trovi etikedon por salto al '%s'"
-#: sed/execute.c:595
+#: sed/execute.c:264 sed/execute.c:281
+#, c-format
+msgid "case conversion produced an invalid character"
+msgstr ""
+
+#: sed/execute.c:575
#, c-format
msgid "%s: can't read %s: %s\n"
msgstr "%s: ne povas legi %s: %s\n"
-#: sed/execute.c:624
+#: sed/execute.c:600
#, c-format
msgid "couldn't edit %s: is a terminal"
msgstr "ne povis redakti %s: estas terminalo"
-#: sed/execute.c:629
+#: sed/execute.c:605
#, c-format
msgid "couldn't edit %s: not a regular file"
msgstr "ne povis redakti %s: ne estas normala dosiero"
-#: sed/execute.c:640
+#: sed/execute.c:616
#, 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:647
+#: sed/execute.c:624
#, c-format
msgid "%s: warning: failed to get security context of %s: %s"
-msgstr ""
+msgstr "%s: averto: malsukcesis preni sekurecan kuntekston de %s: %s"
-#: sed/execute.c:664 sed/utils.c:211
+#: sed/execute.c:643 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:1193 sed/execute.c:1373
+#: sed/execute.c:1158 sed/execute.c:1368
msgid "error in subprocess"
msgstr "eraro en subprocezo"
-#: sed/execute.c:1195
+#: sed/execute.c:1160
msgid "option `e' not supported"
msgstr "opcio 'e' ne realigita"
-#: sed/execute.c:1375
+#: sed/execute.c:1349
msgid "`e' command not supported"
msgstr "komando 'e' ne realigita"
-#: sed/execute.c:1725
+#: sed/execute.c:1675
msgid "no input files"
msgstr "mankas enig-dosieroj"
-#: sed/regexp.c:39
+#: sed/regexp.c:38
msgid "no previous regular expression"
msgstr "mankas antaŭa regula esprimo"
-#: sed/regexp.c:40
-msgid "cannot specify modifiers on empty regexp"
-msgstr "ne eblas specifi modifilojn ĉe malplena regula esprimo"
-
-#: sed/regexp.c:129
+#: sed/regexp.c:138
#, c-format
msgid "invalid reference \\%d on `s' command's RHS"
msgstr "nevalida referenco \\%d ĉe dekstra flanko de komando 's'"
-#: sed/sed.c:32
+#: sed/sed.c:35
msgid "Jay Fenlason"
-msgstr ""
+msgstr "Jay Fenlason"
-#: sed/sed.c:33
+#: sed/sed.c:36
msgid "Tom Lord"
-msgstr ""
+msgstr "Tom Lord"
-#: sed/sed.c:34
+#: sed/sed.c:37
msgid "Ken Pizzini"
-msgstr ""
+msgstr "Ken Pizzini"
-#: sed/sed.c:35
+#: sed/sed.c:38
msgid "Paolo Bonzini"
-msgstr ""
+msgstr "Paolo Bonzini"
-#: sed/sed.c:79
+#: 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"
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"
-#: sed/sed.c:86
-#, fuzzy, c-format
-msgid ""
-"E-mail bug reports to: <%s>.\n"
-"Be sure to include the word ``%s'' somewhere in the ``Subject:'' field.\n"
+#: sed/sed.c:120
+#, c-format
+msgid "E-mail bug reports to: <%s>.\n"
msgstr ""
-"Retpoŝtu cimo-raportojn al: %s .\n"
-"Nepre menciu la vorton '%s' ie en la temlinio.\n"
-#: sed/sed.c:99
+#: sed/sed.c:129
msgid ""
" -R, --regexp-perl\n"
" use Perl 5's regular expressions syntax in the script.\n"
@@ -236,7 +624,7 @@ msgstr ""
" -R, --regexp-perl\n"
" uzi sintakso de Perl 5 por regulaj esprimoj en programo.\n"
-#: sed/sed.c:104
+#: sed/sed.c:134
#, c-format
msgid ""
"Usage: %s [OPTION]... {script-only-if-no-other-script} [input-file]...\n"
@@ -246,7 +634,7 @@ msgstr ""
"dosiero]...\n"
"\n"
-#: sed/sed.c:108
+#: sed/sed.c:138
#, c-format
msgid ""
" -n, --quiet, --silent\n"
@@ -255,7 +643,7 @@ msgstr ""
" -n, --quiet, --silent\n"
" subpremi aŭtomatan presadon de ŝablono-spaco\n"
-#: sed/sed.c:110
+#: sed/sed.c:140
#, c-format
msgid ""
" -e script, --expression=script\n"
@@ -264,7 +652,7 @@ msgstr ""
" -e programo, --expression=programo\n"
" aldoni la programon al la plenumotaj komandoj\n"
-#: sed/sed.c:112
+#: sed/sed.c:142
#, c-format
msgid ""
" -f script-file, --file=script-file\n"
@@ -275,7 +663,7 @@ msgstr ""
" aldoni la enhavon de programdosiero al la plenumotaj "
"komandoj\n"
-#: sed/sed.c:115
+#: sed/sed.c:146
#, c-format
msgid ""
" --follow-symlinks\n"
@@ -284,16 +672,16 @@ msgstr ""
" --follow-symlinks\n"
" sekvi simbolajn ligojn, traktante dosierojn surloke\n"
-#: sed/sed.c:118
-#, fuzzy, c-format
+#: sed/sed.c:149
+#, c-format
msgid ""
" -i[SUFFIX], --in-place[=SUFFIX]\n"
" edit files in place (makes backup if SUFFIX supplied)\n"
msgstr ""
-" -i[sufikso], --in-place[=sufikso]\n"
-" redakti dosierojn surloke (fari savkopion, se sufikso)\n"
+" -i[SUFIKSO], --in-place[=SUFIKSO]\n"
+" redakti dosierojn surloke (savkopii se estas SUFIKSO)\n"
-#: sed/sed.c:121
+#: sed/sed.c:153
#, c-format
msgid ""
" -b, --binary\n"
@@ -304,7 +692,7 @@ msgstr ""
" malfermi dosierojn en binara reĝimo (linifinoj ne traktiĝas "
"speciale)\n"
-#: sed/sed.c:124
+#: sed/sed.c:157
#, c-format
msgid ""
" -l N, --line-length=N\n"
@@ -313,7 +701,7 @@ msgstr ""
" -l N, --line-length=N\n"
" specifi la deziratan linilongon por la komando 'l'\n"
-#: sed/sed.c:126
+#: sed/sed.c:159
#, c-format
msgid ""
" --posix\n"
@@ -322,29 +710,38 @@ msgstr ""
" --posix\n"
" malŝalti ĉiujn GNU-ajn aldonaĵojn.\n"
-#: sed/sed.c:128
-#, c-format
+#: sed/sed.c:161
+#, fuzzy, c-format
msgid ""
-" -r, --regexp-extended\n"
-" use extended regular expressions in the script.\n"
+" -E, -r, --regexp-extended\n"
+" use extended regular expressions in the script\n"
+" (for portability use POSIX -E).\n"
msgstr ""
" -r, --regexp-extended\n"
" uzi etenditajn regulajn esprimojn en la programo.\n"
-#: sed/sed.c:133
-#, c-format
+#: sed/sed.c:167
+#, fuzzy, c-format
msgid ""
" -s, --separate\n"
-" consider files as separate rather than as a single "
-"continuous\n"
-" long stream.\n"
+" consider files as separate rather than as a single,\n"
+" continuous long stream.\n"
msgstr ""
" -s, --separate\n"
" konsideri dosierojn kiel apartajn anstataŭ kiel unu "
"kontinuan\n"
" longan fluon.\n"
-#: sed/sed.c:136
+#: sed/sed.c:170
+#, fuzzy, c-format
+msgid ""
+" --sandbox\n"
+" operate in sandbox mode.\n"
+msgstr ""
+" -z, --null-data\n"
+" apartigi liniojn per signoj NUL\n"
+
+#: sed/sed.c:172
#, c-format
msgid ""
" -u, --unbuffered\n"
@@ -357,24 +754,26 @@ msgstr ""
"kaj\n"
" malplenigi la eligobufrojn pli ofte\n"
-#: sed/sed.c:139
+#: sed/sed.c:175
#, c-format
msgid ""
" -z, --null-data\n"
" separate lines by NUL characters\n"
msgstr ""
+" -z, --null-data\n"
+" apartigi liniojn per signoj NUL\n"
-#: sed/sed.c:141
+#: sed/sed.c:177
#, c-format
msgid " --help display this help and exit\n"
msgstr " --help montri ĉi tiun helpon kaj eliri\n"
-#: sed/sed.c:142
+#: sed/sed.c:178
#, c-format
msgid " --version output version information and exit\n"
msgstr " --version montri version kaj eliri\n"
-#: sed/sed.c:143
+#: sed/sed.c:179
#, c-format
msgid ""
"\n"
@@ -391,119 +790,57 @@ msgstr ""
"estas specifita, tiam la normala enigo estas legata.\n"
"\n"
-#: sed/utils.c:74 sed/utils.c:432
+#: sed/utils.c:73 sed/utils.c:384
#, c-format
msgid "cannot remove %s: %s"
msgstr "ne povas forigi %s: %s"
-#: sed/utils.c:144
+#: sed/utils.c:136
#, c-format
msgid "couldn't open file %s: %s"
msgstr "ne povis malfermi dosieron %s: %s"
-#: sed/utils.c:167
+#: sed/utils.c:155
#, c-format
msgid "couldn't attach to %s: %s"
msgstr "ne povis alligiĝi al %s: %s"
-#: sed/utils.c:229
-#, c-format
-msgid "couldn't write %d item to %s: %s"
-msgid_plural "couldn't write %d items to %s: %s"
+#: sed/utils.c:192
+#, fuzzy, c-format
+msgid "couldn't write %llu item to %s: %s"
+msgid_plural "couldn't write %llu items to %s: %s"
msgstr[0] "ne povis skribi %d eron al %s: %s"
msgstr[1] "ne povis skribi %d erojn al %s: %s"
-#: sed/utils.c:244 sed/utils.c:267
+#: sed/utils.c:204 sed/utils.c:223
#, c-format
msgid "read error on %s: %s"
msgstr "legeraro ĉe %s: %s"
-#: sed/utils.c:372
+#: sed/utils.c:325
#, c-format
msgid "couldn't follow symlink %s: %s"
msgstr "ne povis sekvi simbolan ligon %s: %s"
-#: sed/utils.c:406
+#: sed/utils.c:359
#, c-format
msgid "cannot stat %s: %s"
msgstr "ne povas stat-i %s: %s"
-#: sed/utils.c:437
+#: sed/utils.c:389
#, c-format
msgid "cannot rename %s: %s"
msgstr "ne povas renomi %s: %s"
-#: lib/regcomp.c:132
-msgid "Success"
-msgstr "Sukceso"
-
-#: lib/regcomp.c:135
-msgid "No match"
-msgstr "Maltrafo"
-
-#: lib/regcomp.c:138
-msgid "Invalid regular expression"
-msgstr "Nevalida regula esprimo"
-
-#: lib/regcomp.c:141
-msgid "Invalid collation character"
-msgstr "Nevalida kunfanda signo"
-
-#: lib/regcomp.c:144
-msgid "Invalid character class name"
-msgstr "Nevalida nomo de signoklaso"
-
-#: lib/regcomp.c:147
-msgid "Trailing backslash"
-msgstr "Malsuprenstreko ĉe fino"
-
-#: lib/regcomp.c:150
-msgid "Invalid back reference"
-msgstr "Nevalida retroreferenco"
-
-#: lib/regcomp.c:153
-msgid "Unmatched [ or [^"
-msgstr "Neparigita [ aŭ [^"
-
-#: lib/regcomp.c:156
-msgid "Unmatched ( or \\("
-msgstr "Neparigita ( aŭ \\("
-
-#: lib/regcomp.c:159
-msgid "Unmatched \\{"
-msgstr "Neparigita \\{"
-
-#: lib/regcomp.c:162
-msgid "Invalid content of \\{\\}"
-msgstr "Nevalida enhavo de \\{\\}"
-
-#: lib/regcomp.c:165
-msgid "Invalid range end"
-msgstr "Nevalida fino de gamo"
-
-#: lib/regcomp.c:168
-msgid "Memory exhausted"
-msgstr "Mankas memoro"
-
-#: lib/regcomp.c:171
-msgid "Invalid preceding regular expression"
-msgstr "Nevalida antaŭa regula esprimo"
-
-#: lib/regcomp.c:174
-msgid "Premature end of regular expression"
-msgstr "Neatendita fino de regula esprimo"
-
-#: lib/regcomp.c:177
-msgid "Regular expression too big"
-msgstr "Regula esprimo tro granda"
+#~ msgid "cannot specify modifiers on empty regexp"
+#~ msgstr "ne eblas specifi modifilojn ĉe malplena regula esprimo"
-#: lib/regcomp.c:180
-msgid "Unmatched ) or \\)"
-msgstr "Neparigita ) aŭ \\)"
-
-#: lib/regcomp.c:705
-msgid "No previous regular expression"
-msgstr "Mankas antaŭa regula esprimo"
+#~ msgid ""
+#~ "E-mail bug reports to: <%s>.\n"
+#~ "Be sure to include the word ``%s'' somewhere in the ``Subject:'' field.\n"
+#~ msgstr ""
+#~ "Retpoŝtu cimo-raportojn al: <%s>.\n"
+#~ "Nepre menciu la vorton '%s' ie en la temlinio.\n"
#~ msgid "super-sed version %s\n"
#~ msgstr "super-sed versio %s\n"
@@ -519,17 +856,16 @@ msgstr "Mankas antaŭa regula esprimo"
#~ msgstr "GNU sed versio %s\n"
#~ msgid ""
-#~ "%s\n"
+#~ "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 ""
-#~ "%s\n"
-#~ "Ĉi tio estas libera programo; vidu la fonton por kopi-kondiĉoj. Estas\n"
-#~ "NENIA GARANTIO; eĉ ne por KOMERCA KVALITO aŭ ADEKVATECO POR DIFINITA "
-#~ "CELO,\n"
+#~ "Kopirajto © %d Free Software Foundation, Inc.\n"
+#~ "Ĉi tio estas libera programaro; vidu la fonton por kopi-kondiĉoj. Estas\n"
+#~ "NENIA GARANTIO; eĉ ne por KOMERCA KVALITO aŭ TAŬGECO POR DIFINITA CELO,\n"
#~ "laŭ la grado permesita de juro.\n"
#~ msgid "Called savchar() with unexpected pushback (%x)"
diff --git a/po/es.gmo b/po/es.gmo
index 652a6f8..81639a9 100644
--- a/po/es.gmo
+++ b/po/es.gmo
Binary files differ
diff --git a/po/es.po b/po/es.po
index e895f23..accece6 100644
--- a/po/es.po
+++ b/po/es.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: 2012-12-22 14:36+0100\n"
+"POT-Creation-Date: 2016-12-30 00:59-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"
@@ -15,207 +15,594 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8-bit\n"
+"X-Bugs: Report translation errors to the Language-Team address.\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
-#: sed/compile.c:144
+#: lib/closeout.c:112
+msgid "write error"
+msgstr ""
+
+#: lib/copy-acl.c:54
+#, c-format
+msgid "preserving permissions for %s"
+msgstr ""
+
+#: lib/dfa.c:1025 lib/dfa.c:1028 lib/dfa.c:1047 lib/dfa.c:1057 lib/dfa.c:1070
+#: lib/dfa.c:1098 lib/dfa.c:1107 lib/dfa.c:1110 lib/dfa.c:1115 lib/dfa.c:1137
+#: lib/dfa.c:1140
+msgid "unbalanced ["
+msgstr ""
+
+#: lib/dfa.c:1083
+#, fuzzy
+msgid "invalid character class"
+msgstr "Carácter de nombre de clase inválido"
+
+#: lib/dfa.c:1206
+msgid "character class syntax is [[:space:]], not [:space:]"
+msgstr ""
+
+#: lib/dfa.c:1275
+msgid "unfinished \\ escape"
+msgstr ""
+
+#: lib/dfa.c:1436
+#, fuzzy
+msgid "invalid content of \\{\\}"
+msgstr "Contenido inválido de \\{\\}"
+
+#: lib/dfa.c:1439
+#, fuzzy
+msgid "regular expression too big"
+msgstr "Expresión regular demasiado grande"
+
+#: lib/dfa.c:1853
+msgid "unbalanced ("
+msgstr ""
+
+#: lib/dfa.c:1980
+msgid "no syntax specified"
+msgstr ""
+
+#: lib/dfa.c:1988
+msgid "unbalanced )"
+msgstr ""
+
+#: lib/error.c:191
+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 ""
+
+#: lib/getopt.c:654 lib/getopt.c:658
+#, c-format
+msgid "%s: option '--%s' doesn't allow an argument\n"
+msgstr ""
+
+#: 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:715 lib/getopt.c:734
+#, c-format
+msgid "%s: option '--%s' requires an argument\n"
+msgstr ""
+
+#: 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
+#, 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
+#, 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 "Memoria agotada"
+
+#. TRANSLATORS:
+#. Get translations for open and closing quotation marks.
+#. The message catalog should translate "`" to a left
+#. quotation mark suitable for the locale, and similarly for
+#. "'". For example, a French Unicode local should translate
+#. these to U+00AB (LEFT-POINTING DOUBLE ANGLE
+#. QUOTATION MARK), and U+00BB (RIGHT-POINTING DOUBLE ANGLE
+#. QUOTATION MARK), respectively.
+#.
+#. If the catalog has no translation, we will try to
+#. use Unicode U+2018 (LEFT SINGLE QUOTATION MARK) and
+#. Unicode U+2019 (RIGHT SINGLE QUOTATION MARK). If the
+#. current locale is not Unicode, locale_quoting_style
+#. will quote 'like this', and clocale_quoting_style will
+#. quote "like this". You should always include translations
+#. for "`" and "'" even if U+2018 and U+2019 are appropriate
+#. for your locale.
+#.
+#. If you don't know what to put here, please see
+#. <http://en.wikipedia.org/wiki/Quotation_marks_in_other_languages>
+#. and use glyphs suitable for your language.
+#: lib/quotearg.c:354
+msgid "`"
+msgstr ""
+
+#: lib/quotearg.c:355
+msgid "'"
+msgstr ""
+
+#: lib/regcomp.c:135
+msgid "Success"
+msgstr "Éxito"
+
+#: lib/regcomp.c:138
+msgid "No match"
+msgstr "No hay coincidencia"
+
+#: lib/regcomp.c:141
+msgid "Invalid regular expression"
+msgstr "Expresion regular inválida"
+
+#: lib/regcomp.c:144
+msgid "Invalid collation character"
+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"
+
+#: lib/regcomp.c:150
+msgid "Trailing backslash"
+msgstr "Diagonal invertida al final"
+
+#: lib/regcomp.c:153
+msgid "Invalid back reference"
+msgstr "Referencia hacia atrás inválida"
+
+#: lib/regcomp.c:156
+#, fuzzy
+msgid "Unmatched [, [^, [:, [., or [="
+msgstr "[ ó [^ sin pareja"
+
+#: lib/regcomp.c:159
+msgid "Unmatched ( or \\("
+msgstr "( ó \\( sin pareja"
+
+#: lib/regcomp.c:162
+msgid "Unmatched \\{"
+msgstr "\\{ sin pareja"
+
+#: lib/regcomp.c:165
+msgid "Invalid content of \\{\\}"
+msgstr "Contenido inválido de \\{\\}"
+
+#: lib/regcomp.c:168
+msgid "Invalid range end"
+msgstr "Final de rango inválido"
+
+#: lib/regcomp.c:171
+msgid "Memory exhausted"
+msgstr "Memoria agotada"
+
+#: lib/regcomp.c:174
+msgid "Invalid preceding regular expression"
+msgstr "Expresión regular precedente inválida"
+
+#: lib/regcomp.c:177
+msgid "Premature end of regular expression"
+msgstr "Final prematuro de la expresión regular"
+
+#: lib/regcomp.c:180
+msgid "Regular expression too big"
+msgstr "Expresión regular demasiado grande"
+
+#: lib/regcomp.c:183
+msgid "Unmatched ) or \\)"
+msgstr ") ó \\) sin pareja"
+
+#: lib/regcomp.c:687
+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 ""
+
+#: lib/version-etc.c:74
+#, c-format
+msgid "Packaged by %s (%s)\n"
+msgstr ""
+
+#: lib/version-etc.c:77
+#, c-format
+msgid "Packaged by %s\n"
+msgstr ""
+
+#. 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 ""
+
+#: lib/version-etc.c:86
+msgid ""
+"\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"
+msgstr ""
+
+#. TRANSLATORS: %s denotes an author name.
+#: lib/version-etc.c:102
+#, c-format
+msgid "Written by %s.\n"
+msgstr ""
+
+#. TRANSLATORS: Each %s denotes an author name.
+#: lib/version-etc.c:106
+#, c-format
+msgid "Written by %s and %s.\n"
+msgstr ""
+
+#. TRANSLATORS: Each %s denotes an author name.
+#: lib/version-etc.c:110
+#, c-format
+msgid "Written by %s, %s, and %s.\n"
+msgstr ""
+
+#. TRANSLATORS: Each %s denotes an author name.
+#. You can use line breaks, estimating that each author name occupies
+#. ca. 16 screen columns and that a screen line has ca. 80 columns.
+#: lib/version-etc.c:117
+#, c-format
+msgid ""
+"Written by %s, %s, %s,\n"
+"and %s.\n"
+msgstr ""
+
+#. TRANSLATORS: Each %s denotes an author name.
+#. You can use line breaks, estimating that each author name occupies
+#. ca. 16 screen columns and that a screen line has ca. 80 columns.
+#: lib/version-etc.c:124
+#, c-format
+msgid ""
+"Written by %s, %s, %s,\n"
+"%s, and %s.\n"
+msgstr ""
+
+#. TRANSLATORS: Each %s denotes an author name.
+#. You can use line breaks, estimating that each author name occupies
+#. ca. 16 screen columns and that a screen line has ca. 80 columns.
+#: lib/version-etc.c:131
+#, c-format
+msgid ""
+"Written by %s, %s, %s,\n"
+"%s, %s, and %s.\n"
+msgstr ""
+
+#. TRANSLATORS: Each %s denotes an author name.
+#. You can use line breaks, estimating that each author name occupies
+#. ca. 16 screen columns and that a screen line has ca. 80 columns.
+#: lib/version-etc.c:139
+#, c-format
+msgid ""
+"Written by %s, %s, %s,\n"
+"%s, %s, %s, and %s.\n"
+msgstr ""
+
+#. TRANSLATORS: Each %s denotes an author name.
+#. You can use line breaks, estimating that each author name occupies
+#. ca. 16 screen columns and that a screen line has ca. 80 columns.
+#: lib/version-etc.c:147
+#, c-format
+msgid ""
+"Written by %s, %s, %s,\n"
+"%s, %s, %s, %s,\n"
+"and %s.\n"
+msgstr ""
+
+#. TRANSLATORS: Each %s denotes an author name.
+#. You can use line breaks, estimating that each author name occupies
+#. ca. 16 screen columns and that a screen line has ca. 80 columns.
+#: lib/version-etc.c:156
+#, c-format
+msgid ""
+"Written by %s, %s, %s,\n"
+"%s, %s, %s, %s,\n"
+"%s, and %s.\n"
+msgstr ""
+
+#. TRANSLATORS: Each %s denotes an author name.
+#. You can use line breaks, estimating that each author name occupies
+#. ca. 16 screen columns and that a screen line has ca. 80 columns.
+#: lib/version-etc.c:167
+#, c-format
+msgid ""
+"Written by %s, %s, %s,\n"
+"%s, %s, %s, %s,\n"
+"%s, %s, and others.\n"
+msgstr ""
+
+#. TRANSLATORS: The placeholder indicates the bug-reporting address
+#. for this package. Please add _another line_ saying
+#. "Report translation bugs to <...>\n" with the address for translation
+#. bugs (typically your translation team's web or email address).
+#: lib/version-etc.c:245
+#, c-format
+msgid ""
+"\n"
+"Report bugs to: %s\n"
+msgstr ""
+
+#: lib/version-etc.c:247
+#, c-format
+msgid "Report %s bugs to: %s\n"
+msgstr ""
+
+#: lib/version-etc.c:251
+#, c-format
+msgid "%s home page: <%s>\n"
+msgstr ""
+
+#: lib/version-etc.c:253
+#, c-format
+msgid "%s home page: <http://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"
+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"
+
+#: sed/compile.c:146
msgid "multiple `!'s"
msgstr "`!'s múltiples"
-#: sed/compile.c:145
+#: sed/compile.c:147
msgid "unexpected `,'"
msgstr "`,' inesperada"
-#: sed/compile.c:146
+#: sed/compile.c:149
msgid "invalid usage of +N or ~N as first address"
msgstr "uso inválido de +N o ~N como primera dirección"
-#: sed/compile.c:147
+#: sed/compile.c:150
msgid "unmatched `{'"
msgstr "`{' sin pareja"
-#: sed/compile.c:148
+#: sed/compile.c:151
msgid "unexpected `}'"
msgstr "`}' inesperado"
-#: sed/compile.c:149
+#: sed/compile.c:153
msgid "extra characters after command"
msgstr "caracteres extra después de la orden"
-#: sed/compile.c:150
+#: sed/compile.c:155
msgid "expected \\ after `a', `c' or `i'"
msgstr "se esperaba \\ después de `a', `c' ó `i'"
-#: sed/compile.c:151
+#: sed/compile.c:157
msgid "`}' doesn't want any addresses"
msgstr "`}' no acepta ninguna dirección"
-#: sed/compile.c:152
+#: sed/compile.c:159
msgid ": doesn't want any addresses"
msgstr ": no acepta ninguna dirección"
-#: sed/compile.c:153
+#: sed/compile.c:161
msgid "comments don't accept any addresses"
msgstr "los comentarios no aceptan ninguna dirección"
-#: sed/compile.c:154
+#: sed/compile.c:162
msgid "missing command"
msgstr "orden faltante"
-#: sed/compile.c:155
+#: sed/compile.c:163
msgid "command only uses one address"
msgstr "la orden solamente usa una dirección"
-#: sed/compile.c:156
+#: sed/compile.c:164
msgid "unterminated address regex"
msgstr "dirección de expresión regular sin terminar"
-#: sed/compile.c:157
+#: sed/compile.c:165
msgid "unterminated `s' command"
msgstr "orden `s' sin terminar"
-#: sed/compile.c:158
+#: sed/compile.c:166
msgid "unterminated `y' command"
msgstr "orden `y' sin terminar"
-#: sed/compile.c:159
+#: sed/compile.c:167
msgid "unknown option to `s'"
msgstr "opción desconocida para `s'"
-#: sed/compile.c:160
+#: sed/compile.c:169
msgid "multiple `p' options to `s' command"
msgstr "múltiples opciones `p' para la orden `s'"
-#: sed/compile.c:161
+#: sed/compile.c:171
msgid "multiple `g' options to `s' command"
msgstr "múltiples opciones `g' para la orden `s'"
-#: sed/compile.c:162
+#: sed/compile.c:173
msgid "multiple number options to `s' command"
msgstr "múltiples opciones numéricas para la orden `s'"
-#: sed/compile.c:163
+#: sed/compile.c:175
msgid "number option to `s' command may not be zero"
msgstr "una opción numérica para la orden `s' no puede ser cero"
-#: sed/compile.c:164
+#: sed/compile.c:177
msgid "strings for `y' command are different lengths"
msgstr "las cadenas para la orden `y' son de longitudes diferentes"
-#: sed/compile.c:165
+#: sed/compile.c:179
msgid "delimiter character is not a single-byte character"
msgstr "el carácter delimitador no es un carácter de un solo byte"
-#: sed/compile.c:166
+#: sed/compile.c:181
msgid "expected newer version of sed"
msgstr "se esperaba una versión más reciente de sed"
-#: sed/compile.c:167
+#: sed/compile.c:183
msgid "invalid usage of line address 0"
msgstr "uso inválido de la dirección de línea 0"
-#: sed/compile.c:168
+#: sed/compile.c:184
#, c-format
msgid "unknown command: `%c'"
msgstr "orden desconocida: `%c'"
-#: sed/compile.c:169
+#: sed/compile.c:186
#, fuzzy
msgid "incomplete command"
msgstr "orden faltante"
-#: sed/compile.c:192
+#: sed/compile.c:188
+msgid "\":\" lacks a label"
+msgstr ""
+
+#: sed/compile.c:190
+msgid "recursive escaping after \\c not allowed"
+msgstr ""
+
+#: sed/compile.c:213
#, c-format
msgid "%s: file %s line %lu: %s\n"
msgstr "%s: fichero %s línea %lu: %s\n"
-#: sed/compile.c:195
+#: sed/compile.c:216
#, c-format
msgid "%s: -e expression #%lu, char %lu: %s\n"
msgstr "%s: -e expresión #%lu, carácter %lu: %s\n"
-#: sed/compile.c:1657
+#: sed/compile.c:1639
#, 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:595
+#: sed/execute.c:264 sed/execute.c:281
+#, c-format
+msgid "case conversion produced an invalid character"
+msgstr ""
+
+#: sed/execute.c:575
#, c-format
msgid "%s: can't read %s: %s\n"
msgstr "%s: no se puede leer %s: %s\n"
-#: sed/execute.c:624
+#: sed/execute.c:600
#, c-format
msgid "couldn't edit %s: is a terminal"
msgstr "no se puede editar %s: es una terminal"
-#: sed/execute.c:629
+#: sed/execute.c:605
#, 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:640
+#: sed/execute.c:616
#, 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:647
+#: sed/execute.c:624
#, 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:664 sed/utils.c:211
+#: sed/execute.c:643 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:1193 sed/execute.c:1373
+#: sed/execute.c:1158 sed/execute.c:1368
msgid "error in subprocess"
msgstr "error en el subproceso"
-#: sed/execute.c:1195
+#: sed/execute.c:1160
msgid "option `e' not supported"
msgstr "no hay soporte para la opción `e'"
-#: sed/execute.c:1375
+#: sed/execute.c:1349
msgid "`e' command not supported"
msgstr "no hay soporte para la orden `e'"
-#: sed/execute.c:1725
+#: sed/execute.c:1675
msgid "no input files"
msgstr "no hay ficheros de entrada"
-#: sed/regexp.c:39
+#: sed/regexp.c:38
msgid "no previous regular expression"
msgstr "no hay una expresión regular previa"
-#: sed/regexp.c:40
-msgid "cannot specify modifiers on empty regexp"
-msgstr "no se pueden especificar modificadores en expresiones regulares vacías"
-
-#: sed/regexp.c:129
+#: sed/regexp.c:138
#, c-format
msgid "invalid reference \\%d on `s' command's RHS"
msgstr "referencia \\%d inválida en el lado derecho de la orden `s'"
-#: sed/sed.c:32
+#: sed/sed.c:35
msgid "Jay Fenlason"
msgstr ""
-#: sed/sed.c:33
+#: sed/sed.c:36
msgid "Tom Lord"
msgstr ""
-#: sed/sed.c:34
+#: sed/sed.c:37
msgid "Ken Pizzini"
msgstr ""
-#: sed/sed.c:35
+#: sed/sed.c:38
msgid "Paolo Bonzini"
msgstr ""
-#: sed/sed.c:79
+#: sed/sed.c:113
#, c-format
msgid ""
"GNU sed home page: <http://www.gnu.org/software/sed/>.\n"
@@ -224,17 +611,12 @@ 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"
-#: sed/sed.c:86
+#: sed/sed.c:120
#, c-format
-msgid ""
-"E-mail bug reports to: <%s>.\n"
-"Be sure to include the word ``%s'' somewhere in the ``Subject:'' field.\n"
+msgid "E-mail bug reports to: <%s>.\n"
msgstr ""
-"Envíe reportes de bichos por e-mail a: <%s>.\n"
-"Asegúrese de incluir la palabra ``%s'' en algún lugar en el campo "
-"``Subject:''.\n"
-#: sed/sed.c:99
+#: sed/sed.c:129
msgid ""
" -R, --regexp-perl\n"
" use Perl 5's regular expressions syntax in the script.\n"
@@ -243,7 +625,7 @@ msgstr ""
" utiliza la sintaxis de expresiones regulares de Perl 5\n"
" en el guión.\n"
-#: sed/sed.c:104
+#: sed/sed.c:134
#, c-format
msgid ""
"Usage: %s [OPTION]... {script-only-if-no-other-script} [input-file]...\n"
@@ -252,7 +634,7 @@ msgstr ""
"Uso: %s [OPCIÓN]... {guión-sólo-si-no-hay-otro-guión} [fichero-entrada]...\n"
"\n"
-#: sed/sed.c:108
+#: sed/sed.c:138
#, c-format
msgid ""
" -n, --quiet, --silent\n"
@@ -261,7 +643,7 @@ msgstr ""
" -n, --quiet, --silent\n"
" suprime la muestra automática del espacio de patrones\n"
-#: sed/sed.c:110
+#: sed/sed.c:140
#, c-format
msgid ""
" -e script, --expression=script\n"
@@ -270,7 +652,7 @@ msgstr ""
" -e guión, --expression=guión\n"
" agrega el guión a la lista de órdenes para ejecutar\n"
-#: sed/sed.c:112
+#: sed/sed.c:142
#, c-format
msgid ""
" -f script-file, --file=script-file\n"
@@ -282,7 +664,7 @@ msgstr ""
"órdenes\n"
" para ejecutar\n"
-#: sed/sed.c:115
+#: sed/sed.c:146
#, c-format
msgid ""
" --follow-symlinks\n"
@@ -291,7 +673,7 @@ msgstr ""
" --follow-symlinks\n"
" sigue los enlaces simbólicos al procesar en el lugar\n"
-#: sed/sed.c:118
+#: sed/sed.c:149
#, fuzzy, c-format
msgid ""
" -i[SUFFIX], --in-place[=SUFFIX]\n"
@@ -301,7 +683,7 @@ msgstr ""
" edita ficheros en el lugar (crea un respaldo si se da\n"
" una extensión)\n"
-#: sed/sed.c:121
+#: sed/sed.c:153
#, c-format
msgid ""
" -b, --binary\n"
@@ -312,7 +694,7 @@ msgstr ""
" abre ficheros en modo binario (los RC+FLs no se procesan\n"
" especialmente)\n"
-#: sed/sed.c:124
+#: sed/sed.c:157
#, c-format
msgid ""
" -l N, --line-length=N\n"
@@ -322,7 +704,7 @@ msgstr ""
" especifica la longitud de corte de línea deseado para\n"
" la orden `l'\n"
-#: sed/sed.c:126
+#: sed/sed.c:159
#, c-format
msgid ""
" --posix\n"
@@ -331,28 +713,35 @@ msgstr ""
" --posix\n"
" desactiva todas las extensiones de GNU.\n"
-#: sed/sed.c:128
-#, c-format
+#: sed/sed.c:161
+#, fuzzy, c-format
msgid ""
-" -r, --regexp-extended\n"
-" use extended regular expressions in the script.\n"
+" -E, -r, --regexp-extended\n"
+" use extended regular expressions in the script\n"
+" (for portability use POSIX -E).\n"
msgstr ""
" -r, --regexp-extended\n"
" utiliza expresiones regulares extendidas en el guión.\n"
-#: sed/sed.c:133
-#, c-format
+#: sed/sed.c:167
+#, fuzzy, c-format
msgid ""
" -s, --separate\n"
-" consider files as separate rather than as a single "
-"continuous\n"
-" long stream.\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"
-#: sed/sed.c:136
+#: sed/sed.c:170
+#, c-format
+msgid ""
+" --sandbox\n"
+" operate in sandbox mode.\n"
+msgstr ""
+
+#: sed/sed.c:172
#, c-format
msgid ""
" -u, --unbuffered\n"
@@ -366,24 +755,24 @@ msgstr ""
" y vacía los almacenamientos temporales de salida con más\n"
" frecuencia\n"
-#: sed/sed.c:139
+#: sed/sed.c:175
#, c-format
msgid ""
" -z, --null-data\n"
" separate lines by NUL characters\n"
msgstr ""
-#: sed/sed.c:141
+#: sed/sed.c:177
#, c-format
msgid " --help display this help and exit\n"
msgstr " --help muestra esta ayuda y termina\n"
-#: sed/sed.c:142
+#: sed/sed.c:178
#, c-format
msgid " --version output version information and exit\n"
msgstr " --version muestra la información de la versión y termina\n"
-#: sed/sed.c:143
+#: sed/sed.c:179
#, c-format
msgid ""
"\n"
@@ -401,121 +790,61 @@ msgstr ""
"la entrada estándard.\n"
"\n"
-#: sed/utils.c:74 sed/utils.c:432
+#: sed/utils.c:73 sed/utils.c:384
#, c-format
msgid "cannot remove %s: %s"
msgstr "no se puede eliminar %s: %s"
-#: sed/utils.c:144
+#: sed/utils.c:136
#, c-format
msgid "couldn't open file %s: %s"
msgstr "no se puede abrir el fichero %s: %s"
# FIXME: verificar con el código fuente para saber si es 'conectar' o
# 'adjuntar'. cfuga
-#: sed/utils.c:167
+#: sed/utils.c:155
#, c-format
msgid "couldn't attach to %s: %s"
msgstr "no se puede conectar a %s: %s"
-#: sed/utils.c:229
-#, c-format
-msgid "couldn't write %d item to %s: %s"
-msgid_plural "couldn't write %d items to %s: %s"
+#: sed/utils.c:192
+#, fuzzy, 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"
-#: sed/utils.c:244 sed/utils.c:267
+#: sed/utils.c:204 sed/utils.c:223
#, c-format
msgid "read error on %s: %s"
msgstr "error al leer de %s: %s"
-#: sed/utils.c:372
+#: sed/utils.c:325
#, c-format
msgid "couldn't follow symlink %s: %s"
msgstr "no se puede seguir el enlace simbólico %s: %s"
-#: sed/utils.c:406
+#: sed/utils.c:359
#, c-format
msgid "cannot stat %s: %s"
msgstr "no se puede obtener la información de stat de %s: %s"
-#: sed/utils.c:437
+#: sed/utils.c:389
#, c-format
msgid "cannot rename %s: %s"
msgstr "no se puede renombrar %s: %s"
-#: lib/regcomp.c:132
-msgid "Success"
-msgstr "Éxito"
-
-#: lib/regcomp.c:135
-msgid "No match"
-msgstr "No hay coincidencia"
-
-#: lib/regcomp.c:138
-msgid "Invalid regular expression"
-msgstr "Expresion regular inválida"
-
-#: lib/regcomp.c:141
-msgid "Invalid collation character"
-msgstr "Carácter de ordenamiento inválido"
-
-#: lib/regcomp.c:144
-msgid "Invalid character class name"
-msgstr "Carácter de nombre de clase inválido"
-
-#: lib/regcomp.c:147
-msgid "Trailing backslash"
-msgstr "Diagonal invertida al final"
-
-#: lib/regcomp.c:150
-msgid "Invalid back reference"
-msgstr "Referencia hacia atrás inválida"
-
-#: lib/regcomp.c:153
-msgid "Unmatched [ or [^"
-msgstr "[ ó [^ sin pareja"
-
-#: lib/regcomp.c:156
-msgid "Unmatched ( or \\("
-msgstr "( ó \\( sin pareja"
-
-#: lib/regcomp.c:159
-msgid "Unmatched \\{"
-msgstr "\\{ sin pareja"
-
-#: lib/regcomp.c:162
-msgid "Invalid content of \\{\\}"
-msgstr "Contenido inválido de \\{\\}"
-
-#: lib/regcomp.c:165
-msgid "Invalid range end"
-msgstr "Final de rango inválido"
-
-#: lib/regcomp.c:168
-msgid "Memory exhausted"
-msgstr "Memoria agotada"
-
-#: lib/regcomp.c:171
-msgid "Invalid preceding regular expression"
-msgstr "Expresión regular precedente inválida"
-
-#: lib/regcomp.c:174
-msgid "Premature end of regular expression"
-msgstr "Final prematuro de la expresión regular"
-
-#: lib/regcomp.c:177
-msgid "Regular expression too big"
-msgstr "Expresión regular demasiado grande"
-
-#: lib/regcomp.c:180
-msgid "Unmatched ) or \\)"
-msgstr ") ó \\) sin pareja"
+#~ msgid "cannot specify modifiers on empty regexp"
+#~ msgstr ""
+#~ "no se pueden especificar modificadores en expresiones regulares vacías"
-#: lib/regcomp.c:705
-msgid "No previous regular expression"
-msgstr "No hay una expresión regular previa"
+#~ msgid ""
+#~ "E-mail bug reports to: <%s>.\n"
+#~ "Be sure to include the word ``%s'' somewhere in the ``Subject:'' field.\n"
+#~ msgstr ""
+#~ "Envíe reportes de bichos por e-mail a: <%s>.\n"
+#~ "Asegúrese de incluir la palabra ``%s'' en algún lugar en el campo "
+#~ "``Subject:''.\n"
#~ msgid "super-sed version %s\n"
#~ msgstr "super-sed versión %s\n"
diff --git a/po/et.gmo b/po/et.gmo
index 02eb80a..c54042f 100644
--- a/po/et.gmo
+++ b/po/et.gmo
Binary files differ
diff --git a/po/et.po b/po/et.po
index f978f88..e8be755 100644
--- a/po/et.po
+++ b/po/et.po
@@ -1,276 +1,675 @@
# This file is distributed under the same license as the sed package.
# Estonian translations for GNU sed.
# Copyright (C) 2001 Free Software Foundation, Inc.
-# Toomas Soome <Toomas.Soome@microlink.ee>, 2010.
+# Toomas Soome <tsoome@me.com>, 2016.
#
msgid ""
msgstr ""
-"Project-Id-Version: sed 4.2.1\n"
+"Project-Id-Version: sed 4.2.2.177\n"
"Report-Msgid-Bugs-To: bug-gnu-utils@gnu.org\n"
-"POT-Creation-Date: 2012-12-22 14:36+0100\n"
-"PO-Revision-Date: 2010-08-04 15:18+0300\n"
-"Last-Translator: Toomas Soome <Toomas.Soome@microlink.ee>\n"
+"POT-Creation-Date: 2016-12-30 00:59-0800\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"
"Language: et\n"
"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=iso-8859-15\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"
"X-Poedit-Language: Estonian\n"
"X-Poedit-Country: ESTONIA\n"
-#: sed/compile.c:144
+#: lib/closeout.c:112
+msgid "write error"
+msgstr "viga kirjutamisel"
+
+#: lib/copy-acl.c:54
+#, c-format
+msgid "preserving permissions for %s"
+msgstr "säilitan %s õigused"
+
+#: lib/dfa.c:1025 lib/dfa.c:1028 lib/dfa.c:1047 lib/dfa.c:1057 lib/dfa.c:1070
+#: lib/dfa.c:1098 lib/dfa.c:1107 lib/dfa.c:1110 lib/dfa.c:1115 lib/dfa.c:1137
+#: lib/dfa.c:1140
+msgid "unbalanced ["
+msgstr "balanseerimata ["
+
+#: lib/dfa.c:1083
+msgid "invalid character class"
+msgstr "vigane sümbolite klass"
+
+#: lib/dfa.c:1206
+msgid "character class syntax is [[:space:]], not [:space:]"
+msgstr "sümbolite klassi süntaks on [[:space:]], mitte [:space:]"
+
+#: lib/dfa.c:1275
+msgid "unfinished \\ escape"
+msgstr "lõpetamata \\ paojada"
+
+#: lib/dfa.c:1436
+msgid "invalid content of \\{\\}"
+msgstr "vigane \\{\\} sisu"
+
+#: lib/dfa.c:1439
+msgid "regular expression too big"
+msgstr "regulaaravaldis on liiga suur"
+
+#: lib/dfa.c:1853
+msgid "unbalanced ("
+msgstr "balanseerimata ("
+
+#: lib/dfa.c:1980
+msgid "no syntax specified"
+msgstr "süntaksi pole antud"
+
+#: lib/dfa.c:1988
+msgid "unbalanced )"
+msgstr "balanseerimata )"
+
+#: lib/error.c:191
+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"
+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:667 lib/getopt.c:672
+#, c-format
+msgid "%s: option '%c%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"
+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
+#, 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
+#, 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"
+
+#. TRANSLATORS:
+#. Get translations for open and closing quotation marks.
+#. The message catalog should translate "`" to a left
+#. quotation mark suitable for the locale, and similarly for
+#. "'". For example, a French Unicode local should translate
+#. these to U+00AB (LEFT-POINTING DOUBLE ANGLE
+#. QUOTATION MARK), and U+00BB (RIGHT-POINTING DOUBLE ANGLE
+#. QUOTATION MARK), respectively.
+#.
+#. If the catalog has no translation, we will try to
+#. use Unicode U+2018 (LEFT SINGLE QUOTATION MARK) and
+#. Unicode U+2019 (RIGHT SINGLE QUOTATION MARK). If the
+#. current locale is not Unicode, locale_quoting_style
+#. will quote 'like this', and clocale_quoting_style will
+#. quote "like this". You should always include translations
+#. for "`" and "'" even if U+2018 and U+2019 are appropriate
+#. for your locale.
+#.
+#. If you don't know what to put here, please see
+#. <http://en.wikipedia.org/wiki/Quotation_marks_in_other_languages>
+#. and use glyphs suitable for your language.
+#: lib/quotearg.c:354
+msgid "`"
+msgstr "`"
+
+#: lib/quotearg.c:355
+msgid "'"
+msgstr "'"
+
+#: lib/regcomp.c:135
+msgid "Success"
+msgstr "Edukas"
+
+#: lib/regcomp.c:138
+msgid "No match"
+msgstr "Ei leia"
+
+#: lib/regcomp.c:141
+msgid "Invalid regular expression"
+msgstr "Vigane regulaaravaldis"
+
+#: lib/regcomp.c:144
+msgid "Invalid collation character"
+msgstr "Vigane sortimise sümbol"
+
+#: lib/regcomp.c:147
+msgid "Invalid character class name"
+msgstr "Vigane sümbolite klassi nimi"
+
+#: lib/regcomp.c:150
+msgid "Trailing backslash"
+msgstr "Lõpetav langkriips"
+
+#: lib/regcomp.c:153
+msgid "Invalid back reference"
+msgstr "Vigane tagasi viide"
+
+#: lib/regcomp.c:156
+msgid "Unmatched [, [^, [:, [., or [="
+msgstr "Paariliseta [, [^, [:, [. või [="
+
+#: lib/regcomp.c:159
+msgid "Unmatched ( or \\("
+msgstr "Paariliseta ( või \\("
+
+#: lib/regcomp.c:162
+msgid "Unmatched \\{"
+msgstr "Paariliseta \\{"
+
+#: lib/regcomp.c:165
+msgid "Invalid content of \\{\\}"
+msgstr "Vigane \\{\\} sisu"
+
+#: lib/regcomp.c:168
+msgid "Invalid range end"
+msgstr "Vigane vahemiku lõpp"
+
+#: lib/regcomp.c:171
+msgid "Memory exhausted"
+msgstr "Mälu on otsas"
+
+#: lib/regcomp.c:174
+msgid "Invalid preceding regular expression"
+msgstr "Vigane eelnev regulaaravaldis"
+
+#: lib/regcomp.c:177
+msgid "Premature end of regular expression"
+msgstr "Ootamatu regulaaravaldise lõpp"
+
+#: lib/regcomp.c:180
+msgid "Regular expression too big"
+msgstr "Regulaaravaldis on liiga suur"
+
+#: lib/regcomp.c:183
+msgid "Unmatched ) or \\)"
+msgstr "Puudub ) või \\)"
+
+#: lib/regcomp.c:687
+msgid "No previous regular expression"
+msgstr "Eelmist regulaaravaldist pole"
+
+#: lib/set-acl.c:46
+#, c-format
+msgid "setting permissions for %s"
+msgstr "sean %s õigused"
+
+#: lib/version-etc.c:74
+#, c-format
+msgid "Packaged by %s (%s)\n"
+msgstr "Paketeerinud %s (%s)\n"
+
+#: lib/version-etc.c:77
+#, c-format
+msgid "Packaged by %s\n"
+msgstr "Paketeerinud %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 "©"
+
+#: lib/version-etc.c:86
+msgid ""
+"\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"
+msgstr ""
+"\n"
+"Litsents GPLv3+: GNU GPL versioon 3 või uuem <http://gnu.org/licenses/gpl."
+"html>.\n"
+"See on vaba tarkvara: teil on lubatud seda muuta ja levitada.\n"
+"Garantii puudub ulatuseni, mida lubab rakendatav seadus.\n"
+"\n"
+
+#. TRANSLATORS: %s denotes an author name.
+#: lib/version-etc.c:102
+#, c-format
+msgid "Written by %s.\n"
+msgstr "Kirjutanud %s.\n"
+
+#. TRANSLATORS: Each %s denotes an author name.
+#: lib/version-etc.c:106
+#, c-format
+msgid "Written by %s and %s.\n"
+msgstr "Kirjutanud %s ja %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 "Kirjutanud %s, %s ja %s.\n"
+
+#. TRANSLATORS: Each %s denotes an author name.
+#. You can use line breaks, estimating that each author name occupies
+#. ca. 16 screen columns and that a screen line has ca. 80 columns.
+#: lib/version-etc.c:117
+#, c-format
+msgid ""
+"Written by %s, %s, %s,\n"
+"and %s.\n"
+msgstr ""
+"Kirjutanud %s, %s, %s,\n"
+"ja %s.\n"
+
+#. TRANSLATORS: Each %s denotes an author name.
+#. You can use line breaks, estimating that each author name occupies
+#. ca. 16 screen columns and that a screen line has ca. 80 columns.
+#: lib/version-etc.c:124
+#, c-format
+msgid ""
+"Written by %s, %s, %s,\n"
+"%s, and %s.\n"
+msgstr ""
+"Kirjutanud %s, %s, %s,\n"
+"%s ja %s.\n"
+
+#. TRANSLATORS: Each %s denotes an author name.
+#. You can use line breaks, estimating that each author name occupies
+#. ca. 16 screen columns and that a screen line has ca. 80 columns.
+#: lib/version-etc.c:131
+#, c-format
+msgid ""
+"Written by %s, %s, %s,\n"
+"%s, %s, and %s.\n"
+msgstr ""
+"Kirjutanud %s, %s, %s,\n"
+"%s, %s ja %s.\n"
+
+#. TRANSLATORS: Each %s denotes an author name.
+#. You can use line breaks, estimating that each author name occupies
+#. ca. 16 screen columns and that a screen line has ca. 80 columns.
+#: lib/version-etc.c:139
+#, c-format
+msgid ""
+"Written by %s, %s, %s,\n"
+"%s, %s, %s, and %s.\n"
+msgstr ""
+"Kirjutanud %s, %s, %s,\n"
+"%s, %s, %s ja %s.\n"
+
+#. TRANSLATORS: Each %s denotes an author name.
+#. You can use line breaks, estimating that each author name occupies
+#. ca. 16 screen columns and that a screen line has ca. 80 columns.
+#: lib/version-etc.c:147
+#, c-format
+msgid ""
+"Written by %s, %s, %s,\n"
+"%s, %s, %s, %s,\n"
+"and %s.\n"
+msgstr ""
+"Kirjutanud %s, %s, %s,\n"
+"%s, %s, %s, %s,\n"
+"ja %s.\n"
+
+#. TRANSLATORS: Each %s denotes an author name.
+#. You can use line breaks, estimating that each author name occupies
+#. ca. 16 screen columns and that a screen line has ca. 80 columns.
+#: lib/version-etc.c:156
+#, c-format
+msgid ""
+"Written by %s, %s, %s,\n"
+"%s, %s, %s, %s,\n"
+"%s, and %s.\n"
+msgstr ""
+"Kirjutanud %s, %s, %s,\n"
+"%s, %s, %s, %s,\n"
+"%s ja %s.\n"
+
+#. TRANSLATORS: Each %s denotes an author name.
+#. You can use line breaks, estimating that each author name occupies
+#. ca. 16 screen columns and that a screen line has ca. 80 columns.
+#: lib/version-etc.c:167
+#, c-format
+msgid ""
+"Written by %s, %s, %s,\n"
+"%s, %s, %s, %s,\n"
+"%s, %s, and others.\n"
+msgstr ""
+"Kirjutanud %s, %s, %s,\n"
+"%s, %s, %s, %s,\n"
+"%s, %s ja teised.\n"
+
+#. TRANSLATORS: The placeholder indicates the bug-reporting address
+#. for this package. Please add _another line_ saying
+#. "Report translation bugs to <...>\n" with the address for translation
+#. bugs (typically your translation team's web or email address).
+#: lib/version-etc.c:245
+#, c-format
+msgid ""
+"\n"
+"Report bugs to: %s\n"
+msgstr ""
+"\n"
+"Raporteerige vigadest: %s\n"
+
+#: lib/version-etc.c:247
+#, c-format
+msgid "Report %s bugs to: %s\n"
+msgstr "%s vigadest teatage: %s\n"
+
+#: lib/version-etc.c:251
+#, c-format
+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"
+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"
+msgstr "Üldine abi GNU tarkvara kasutamiseks: <http://www.gnu.org/gethelp/>\n"
+
+#: sed/compile.c:146
msgid "multiple `!'s"
msgstr "korduv `!'"
-#: sed/compile.c:145
+#: sed/compile.c:147
msgid "unexpected `,'"
msgstr "ootamatu `,'"
-#: sed/compile.c:146
+#: sed/compile.c:149
msgid "invalid usage of +N or ~N as first address"
-msgstr "+N vi ~N ei vi kasutada esimese aadressina"
+msgstr "+N või ~N ei või kasutada esimese aadressina"
-#: sed/compile.c:147
+#: sed/compile.c:150
msgid "unmatched `{'"
msgstr "liigne `{'"
-#: sed/compile.c:148
+#: sed/compile.c:151
msgid "unexpected `}'"
msgstr "ootamatu `}'"
-#: sed/compile.c:149
+#: sed/compile.c:153
msgid "extra characters after command"
-msgstr "lisasmbolid peale ksku"
+msgstr "lisasümbolid peale käsku"
-#: sed/compile.c:150
+#: sed/compile.c:155
msgid "expected \\ after `a', `c' or `i'"
-msgstr "peale `a', `c' vi `i' peab olema \\"
+msgstr "peale `a', `c' või `i' peab olema \\"
-#: sed/compile.c:151
+#: sed/compile.c:157
msgid "`}' doesn't want any addresses"
msgstr "`}' ei vaja aadresse"
-#: sed/compile.c:152
+#: sed/compile.c:159
msgid ": doesn't want any addresses"
msgstr ": ei vaja aadresse"
-#: sed/compile.c:153
+#: sed/compile.c:161
msgid "comments don't accept any addresses"
msgstr "kommentaarid ei vaja aadresse"
-#: sed/compile.c:154
+#: sed/compile.c:162
msgid "missing command"
-msgstr "ksk puudub"
+msgstr "käsk puudub"
-#: sed/compile.c:155
+#: sed/compile.c:163
msgid "command only uses one address"
-msgstr "ksk kasutab vaid ht aadressi"
+msgstr "käsk kasutab vaid üht aadressi"
-#: sed/compile.c:156
+#: sed/compile.c:164
msgid "unterminated address regex"
-msgstr "lpetamata aadressi avaldis"
+msgstr "lõpetamata aadressi avaldis"
-#: sed/compile.c:157
+#: sed/compile.c:165
msgid "unterminated `s' command"
-msgstr "lpetamata `s' ksk"
+msgstr "lõpetamata `s' käsk"
-#: sed/compile.c:158
+#: sed/compile.c:166
msgid "unterminated `y' command"
-msgstr "lpetamata `y' ksk"
+msgstr "lõpetamata `y' käsk"
-#: sed/compile.c:159
+#: sed/compile.c:167
msgid "unknown option to `s'"
-msgstr "tundmatu vti `s' ksule"
+msgstr "tundmatu võti `s' käsule"
-#: sed/compile.c:160
+#: sed/compile.c:169
msgid "multiple `p' options to `s' command"
-msgstr "korduv `p' vti `s' ksus"
+msgstr "korduv `p' võti `s' käsus"
-#: sed/compile.c:161
+#: sed/compile.c:171
msgid "multiple `g' options to `s' command"
-msgstr "korduv `g' vti `s' ksus"
+msgstr "korduv `g' võti `s' käsus"
-#: sed/compile.c:162
+#: sed/compile.c:173
msgid "multiple number options to `s' command"
-msgstr "korduvad numbrivtmed `s' ksus"
+msgstr "korduvad numbrivõtmed `s' käsus"
-#: sed/compile.c:163
+#: sed/compile.c:175
msgid "number option to `s' command may not be zero"
-msgstr "numbrivti `s' ksus ei vi olla null"
+msgstr "numbrivõti `s' käsus ei või olla null"
-#: sed/compile.c:164
+#: sed/compile.c:177
msgid "strings for `y' command are different lengths"
-msgstr "sned ksus `y' on erineva pikkusega"
+msgstr "sõned käsus `y' on erineva pikkusega"
-#: sed/compile.c:165
+#: sed/compile.c:179
msgid "delimiter character is not a single-byte character"
-msgstr "eraldav sbol ei ole he-baidiline smbol"
+msgstr "eraldav sübol ei ole ühe-baidiline sümbol"
-#: sed/compile.c:166
+#: sed/compile.c:181
msgid "expected newer version of sed"
msgstr "oodati sedi uuemat versiooni"
-#: sed/compile.c:167
+#: sed/compile.c:183
msgid "invalid usage of line address 0"
msgstr "vigane rea aadressi 0 kasutamine"
-#: sed/compile.c:168
+#: sed/compile.c:184
#, c-format
msgid "unknown command: `%c'"
-msgstr "tundmatu ksk: `%c'"
+msgstr "tundmatu käsk: `%c'"
-#: sed/compile.c:169
-#, fuzzy
+#: sed/compile.c:186
msgid "incomplete command"
-msgstr "ksk puudub"
+msgstr "poolik käsk"
+
+#: sed/compile.c:188
+msgid "\":\" lacks a label"
+msgstr "\":\" märgend puudub"
+
+#: sed/compile.c:190
+msgid "recursive escaping after \\c not allowed"
+msgstr "rekursiivne paojada peale \\c ei ole lubatud"
-#: sed/compile.c:192
+#: sed/compile.c:213
#, c-format
msgid "%s: file %s line %lu: %s\n"
msgstr "%s: fail %s rida %lu: %s\n"
-#: sed/compile.c:195
+#: sed/compile.c:216
#, c-format
msgid "%s: -e expression #%lu, char %lu: %s\n"
-msgstr "%s: -e avaldis #%lu, smbol %lu: %s\n"
+msgstr "%s: -e avaldis #%lu, sümbol %lu: %s\n"
-#: sed/compile.c:1657
+#: sed/compile.c:1639
#, c-format
msgid "can't find label for jump to `%s'"
-msgstr "ei leia mrgendit, et hpata kohale `%s'"
+msgstr "ei leia märgendit, et hüpata kohale `%s'"
-#: sed/execute.c:595
+#: sed/execute.c:264 sed/execute.c:281
+#, c-format
+msgid "case conversion produced an invalid character"
+msgstr "Sümboli suuruse teisendus tekitas vigase sümboli"
+
+#: sed/execute.c:575
#, c-format
msgid "%s: can't read %s: %s\n"
msgstr "%s: ei saa lugeda %s: %s\n"
-#: sed/execute.c:624
+#: sed/execute.c:600
#, c-format
msgid "couldn't edit %s: is a terminal"
msgstr "%s ei saa toimetada: see on terminal"
-#: sed/execute.c:629
+#: sed/execute.c:605
#, c-format
msgid "couldn't edit %s: not a regular file"
msgstr "%s ei saa toimetada: see ei ole tavaline fail"
-#: sed/execute.c:640
+#: sed/execute.c:616
#, c-format
msgid "%s: warning: failed to set default file creation context to %s: %s"
msgstr ""
-"%s: hoiatus: faili loomise vaikimisi konteksti seadmine ebannestus %s: %s"
+"%s: hoiatus: faili loomise vaikimisi konteksti seadmine ebaõnnestus %s: %s"
-#: sed/execute.c:647
+#: sed/execute.c:624
#, c-format
msgid "%s: warning: failed to get security context of %s: %s"
-msgstr "%s: hoiatus: %s turvakonteksti lugemine ebannestus: %s"
+msgstr "%s: hoiatus: %s turvakonteksti lugemine ebaõnnestus: %s"
-#: sed/execute.c:664 sed/utils.c:211
+#: sed/execute.c:643 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:1193 sed/execute.c:1373
+#: sed/execute.c:1158 sed/execute.c:1368
msgid "error in subprocess"
msgstr "viga alamprotsessis"
-#: sed/execute.c:1195
+#: sed/execute.c:1160
msgid "option `e' not supported"
-msgstr "vtit `e' ei toetata"
+msgstr "võtit `e' ei toetata"
-#: sed/execute.c:1375
+#: sed/execute.c:1349
msgid "`e' command not supported"
-msgstr "ksku `e' ei toetata"
+msgstr "käsku `e' ei toetata"
-#: sed/execute.c:1725
+#: sed/execute.c:1675
msgid "no input files"
msgstr "sisendfaile pole"
-#: sed/regexp.c:39
+#: sed/regexp.c:38
msgid "no previous regular expression"
msgstr "eelmist regulaaravaldist pole"
-#: sed/regexp.c:40
-msgid "cannot specify modifiers on empty regexp"
-msgstr "muudatusi thjale regulaaravaldisele ei saa mrata"
-
-#: sed/regexp.c:129
+#: sed/regexp.c:138
#, c-format
msgid "invalid reference \\%d on `s' command's RHS"
-msgstr "vigane viide \\%d ksu `s' paremas pooles"
+msgstr "vigane viide \\%d käsu `s' paremas pooles"
-#: sed/sed.c:32
+#: sed/sed.c:35
msgid "Jay Fenlason"
-msgstr ""
+msgstr "Jay Fenlason"
-#: sed/sed.c:33
+#: sed/sed.c:36
msgid "Tom Lord"
-msgstr ""
+msgstr "Tom Lord"
-#: sed/sed.c:34
+#: sed/sed.c:37
msgid "Ken Pizzini"
-msgstr ""
+msgstr "Ken Pizzini"
-#: sed/sed.c:35
+#: sed/sed.c:38
msgid "Paolo Bonzini"
-msgstr ""
+msgstr "Paolo Bonzini"
-#: sed/sed.c:79
+#: 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"
msgstr ""
-"GNU sed koduleheklg: <http://www.gnu.org/software/sed/>.\n"
-"ldine abi GNU tarkvara kasutamiseks: <http://www.gnu.org/gethelp/>.\n"
+"GNU sed kodulehekülg: <http://www.gnu.org/software/sed/>.\n"
+"Üldine abi GNU tarkvara kasutamiseks: <http://www.gnu.org/gethelp/>.\n"
-#: sed/sed.c:86
+#: sed/sed.c:120
#, c-format
-msgid ""
-"E-mail bug reports to: <%s>.\n"
-"Be sure to include the word ``%s'' somewhere in the ``Subject:'' field.\n"
-msgstr ""
-"Postitage teated vigadest: <%s> .\n"
-"Lisage kindlasti sna ``%s'' ``Subject:'' reale.\n"
+msgid "E-mail bug reports to: <%s>.\n"
+msgstr "Mailige veateated aadressil: <%s>.\n"
-#: sed/sed.c:99
+#: sed/sed.c:129
msgid ""
" -R, --regexp-perl\n"
" use Perl 5's regular expressions syntax in the script.\n"
msgstr ""
" -R, --regexp-perl\n"
-" kasuta skriptis Perl 5 regulaaravaldiste sntaksit.\n"
+" kasuta skriptis Perl 5 regulaaravaldiste süntaksit.\n"
-#: sed/sed.c:104
+#: sed/sed.c:134
#, c-format
msgid ""
"Usage: %s [OPTION]... {script-only-if-no-other-script} [input-file]...\n"
"\n"
msgstr ""
-"Kasutamine: %s [vti]... {ainult-skript-kui-teisi-skripte-pole} [sisend-"
+"Kasutamine: %s [võti]... {ainult-skript-kui-teisi-skripte-pole} [sisend-"
"fail]...\n"
"\n"
-#: sed/sed.c:108
+#: sed/sed.c:138
#, c-format
msgid ""
" -n, --quiet, --silent\n"
" suppress automatic printing of pattern space\n"
msgstr ""
" -n, --quiet, --silent\n"
-" keela mustriruumi automaatne vljastamine\n"
+" keela mustriruumi automaatne väljastamine\n"
-#: sed/sed.c:110
+#: sed/sed.c:140
#, c-format
msgid ""
" -e script, --expression=script\n"
" add the script to the commands to be executed\n"
msgstr ""
" -e skript, --expression=skript\n"
-" lisa tidetavate kskluste skript\n"
+" lisa täidetavate käskluste skript\n"
-#: sed/sed.c:112
+#: sed/sed.c:142
#, c-format
msgid ""
" -f script-file, --file=script-file\n"
@@ -278,27 +677,27 @@ msgid ""
"executed\n"
msgstr ""
" -f skripti-fail, --file=skripti-fail\n"
-" lisa skripti-faili sisu tidetavate kskluste hulka\n"
+" lisa skripti-faili sisu täidetavate käskluste hulka\n"
-#: sed/sed.c:115
+#: sed/sed.c:146
#, c-format
msgid ""
" --follow-symlinks\n"
" follow symlinks when processing in place\n"
msgstr ""
" --follow-symlinks\n"
-" jrgi nimeviiteid\n"
+" järgi nimeviiteid\n"
-#: sed/sed.c:118
-#, fuzzy, c-format
+#: sed/sed.c:149
+#, 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"
-" toimeta faile (kui kasutati sifiksit, loob ka varukoopia)\n"
+" toimeta faile (kui kasutati sufiksit, loob ka varukoopia)\n"
-#: sed/sed.c:121
+#: sed/sed.c:153
#, c-format
msgid ""
" -b, --binary\n"
@@ -306,47 +705,57 @@ msgid ""
"specially)\n"
msgstr ""
" -b, --binary\n"
-" ava failid binaarmoodis (CR+LF ei ksitleta eriliselt)\n"
+" ava failid binaarmoodis (CR+LF ei käsitleta eriliselt)\n"
-#: sed/sed.c:124
+#: sed/sed.c:157
#, c-format
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"
-" mra `l' ksule soovitatav rea pikkus\n"
+" määra `l' käsule soovitatav rea pikkus\n"
-#: sed/sed.c:126
+#: sed/sed.c:159
#, c-format
msgid ""
" --posix\n"
" disable all GNU extensions.\n"
msgstr ""
" --posix\n"
-" blokeeri kik GNU laiendused.\n"
+" blokeeri kõik GNU laiendused.\n"
-#: sed/sed.c:128
+#: sed/sed.c:161
#, c-format
msgid ""
-" -r, --regexp-extended\n"
-" use extended regular expressions in the script.\n"
+" -E, -r, --regexp-extended\n"
+" use extended regular expressions in the script\n"
+" (for portability use POSIX -E).\n"
msgstr ""
-" -r, --regexp-extended\n"
-" kasuta skriptis laiendatud regulaaravaldiste sntaksit.\n"
+" -E, -r, --regexp-extended\n"
+" kasuta skriptis laiendatud regulaaravaldiste süntaksit\n"
+" (ühilduvuse jaoks kasutage POSIX -E).\n"
-#: sed/sed.c:133
+#: sed/sed.c:167
#, c-format
msgid ""
" -s, --separate\n"
-" consider files as separate rather than as a single "
-"continuous\n"
-" long stream.\n"
+" consider files as separate rather than as a single,\n"
+" continuous long stream.\n"
msgstr ""
" -s, --separate\n"
-" ksitle faile kshaaval, mitte he jtkuva voona.\n"
+" käsitle faile ükshaaval, mitte ühe jätkuva voona.\n"
-#: sed/sed.c:136
+#: sed/sed.c:170
+#, c-format
+msgid ""
+" --sandbox\n"
+" operate in sandbox mode.\n"
+msgstr ""
+" --sandbox\n"
+" opereeri liivakasti moodis.\n"
+
+#: sed/sed.c:172
#, c-format
msgid ""
" -u, --unbuffered\n"
@@ -355,27 +764,29 @@ msgid ""
" the output buffers more often\n"
msgstr ""
" -u, --unbuffered\n"
-" loe sisendfailist minimaalne kogus andmeid ja thjenda\n"
-" vljundpuhvreid sagedamini\n"
+" loe sisendfailist minimaalne kogus andmeid ja tühjenda\n"
+" väljundpuhvreid sagedamini\n"
-#: sed/sed.c:139
+#: sed/sed.c:175
#, c-format
msgid ""
" -z, --null-data\n"
" separate lines by NUL characters\n"
msgstr ""
+" -z, --null-data\n"
+" eralda read sümboliga NUL\n"
-#: sed/sed.c:141
+#: sed/sed.c:177
#, c-format
msgid " --help display this help and exit\n"
-msgstr " --help vljast see abiinfo ja lpeta t\n"
+msgstr " --help väljast see abiinfo ja lõpeta töö\n"
-#: sed/sed.c:142
+#: sed/sed.c:178
#, c-format
msgid " --version output version information and exit\n"
-msgstr " --version vljasta versiooniinfo ja lpeta t\n"
+msgstr " --version väljasta versiooniinfo ja lõpeta töö\n"
-#: sed/sed.c:143
+#: sed/sed.c:179
#, c-format
msgid ""
"\n"
@@ -386,150 +797,50 @@ msgid ""
"\n"
msgstr ""
"\n"
-"Kui vtmeid -e, --expression, -f vi --file ei kasutata, loetakse\n"
-"esimene argument, mis pole vti, sed skriptiks. Kik jrgnevad argumendid "
+"Kui võtmeid -e, --expression, -f või --file ei kasutata, loetakse\n"
+"esimene argument, mis pole võti, sed skriptiks. Kõik järgnevad argumendid "
"on\n"
"sisendfailide nimed; kui sisendfaile ei antud, loetakse standardsisendit.\n"
"\n"
-#: sed/utils.c:74 sed/utils.c:432
+#: sed/utils.c:73 sed/utils.c:384
#, c-format
msgid "cannot remove %s: %s"
msgstr "%s ei saa eemaldada: %s"
-#: sed/utils.c:144
+#: sed/utils.c:136
#, c-format
msgid "couldn't open file %s: %s"
msgstr "faili %s ei saa avada: %s"
-#: sed/utils.c:167
+#: sed/utils.c:155
#, c-format
msgid "couldn't attach to %s: %s"
-msgstr "%s klge haakimine ebannestus: %s"
+msgstr "%s külge haakimine ebaõnnestus: %s"
-#: sed/utils.c:229
+#: sed/utils.c:192
#, c-format
-msgid "couldn't write %d item to %s: %s"
-msgid_plural "couldn't write %d items to %s: %s"
-msgstr[0] "%d elemendi faili %s kirjutamine ebannestus: %s"
-msgstr[1] "%d elemendi faili %s kirjutamine ebannestus: %s"
+msgid "couldn't write %llu item to %s: %s"
+msgid_plural "couldn't write %llu items to %s: %s"
+msgstr[0] "%llu elemendi faili %s kirjutamine ebaõnnestus: %s"
+msgstr[1] "%llu elemendi faili %s kirjutamine ebaõnnestus: %s"
-#: sed/utils.c:244 sed/utils.c:267
+#: sed/utils.c:204 sed/utils.c:223
#, c-format
msgid "read error on %s: %s"
msgstr "lugemisviga %s: %s"
-#: sed/utils.c:372
+#: sed/utils.c:325
#, c-format
msgid "couldn't follow symlink %s: %s"
-msgstr "nimeviidet %s ei saa jrgida: %s"
+msgstr "nimeviidet %s ei saa järgida: %s"
-#: sed/utils.c:406
+#: sed/utils.c:359
#, c-format
msgid "cannot stat %s: %s"
msgstr "stat %s ei saa teha: %s"
-#: sed/utils.c:437
+#: sed/utils.c:389
#, c-format
msgid "cannot rename %s: %s"
-msgstr "%s ei saa mber nimetada: %s"
-
-#: lib/regcomp.c:132
-msgid "Success"
-msgstr "Edukas"
-
-#: lib/regcomp.c:135
-msgid "No match"
-msgstr "Ei leia"
-
-#: lib/regcomp.c:138
-msgid "Invalid regular expression"
-msgstr "Vigane regulaaravaldis"
-
-#: lib/regcomp.c:141
-msgid "Invalid collation character"
-msgstr "Vigane sortimise smbol"
-
-#: lib/regcomp.c:144
-msgid "Invalid character class name"
-msgstr "Vigane smbolite klassi nimi"
-
-#: lib/regcomp.c:147
-msgid "Trailing backslash"
-msgstr "Lpetav langkriips"
-
-#: lib/regcomp.c:150
-msgid "Invalid back reference"
-msgstr "Vigane tagasi viide"
-
-#: lib/regcomp.c:153
-msgid "Unmatched [ or [^"
-msgstr "Puudub [ vi [^"
-
-#: lib/regcomp.c:156
-msgid "Unmatched ( or \\("
-msgstr "Puudub ( vi \\("
-
-#: lib/regcomp.c:159
-msgid "Unmatched \\{"
-msgstr "Puudub \\{"
-
-#: lib/regcomp.c:162
-msgid "Invalid content of \\{\\}"
-msgstr "Vigane \\{\\} sisu"
-
-#: lib/regcomp.c:165
-msgid "Invalid range end"
-msgstr "Vigane vahemiku lpp"
-
-#: lib/regcomp.c:168
-msgid "Memory exhausted"
-msgstr "Mlu on otsas"
-
-#: lib/regcomp.c:171
-msgid "Invalid preceding regular expression"
-msgstr "Vigane eelnev regulaaravaldis"
-
-#: lib/regcomp.c:174
-msgid "Premature end of regular expression"
-msgstr "Ootamatu regulaaravaldise lpp"
-
-#: lib/regcomp.c:177
-msgid "Regular expression too big"
-msgstr "Regulaaravaldis on liiga suur"
-
-#: lib/regcomp.c:180
-msgid "Unmatched ) or \\)"
-msgstr "Puudub ) vi \\)"
-
-#: lib/regcomp.c:705
-msgid "No previous regular expression"
-msgstr "Eelmist regulaaravaldist pole"
-
-#~ msgid "super-sed version %s\n"
-#~ msgstr "super-sed versioon %s\n"
-
-#~ msgid ""
-#~ "based on GNU sed version %s\n"
-#~ "\n"
-#~ msgstr ""
-#~ "phineb GNU sed versioonil %s\n"
-#~ "\n"
-
-#~ msgid "GNU sed version %s\n"
-#~ msgstr "GNU sed versioon %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 ""
-#~ "Autoriigus (C) %d Free Software Foundation, Inc.\n"
-#~ "See on vaba tarkvara; kopeerimistingimused leiate lhtetekstidest. "
-#~ "Garantii\n"
-#~ "PUUDUB; ka MGIKS vi MINGIL EESMRGIL KASUTAMISEKS, vastavalt "
-#~ "seadustega\n"
-#~ "lubatud piiridele.\n"
+msgstr "%s ei saa ümber nimetada: %s"
diff --git a/po/eu.gmo b/po/eu.gmo
index 376d093..c7d395b 100644
--- a/po/eu.gmo
+++ b/po/eu.gmo
Binary files differ
diff --git a/po/eu.po b/po/eu.po
index 8037752..ab4a577 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: 2012-12-22 14:36+0100\n"
+"POT-Creation-Date: 2016-12-30 00:59-0800\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"
@@ -17,247 +17,623 @@ msgstr ""
"MIME-Version: 1.0\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"
-#: sed/compile.c:144
+#: lib/closeout.c:112
+msgid "write error"
+msgstr ""
+
+#: lib/copy-acl.c:54
+#, c-format
+msgid "preserving permissions for %s"
+msgstr ""
+
+#: lib/dfa.c:1025 lib/dfa.c:1028 lib/dfa.c:1047 lib/dfa.c:1057 lib/dfa.c:1070
+#: lib/dfa.c:1098 lib/dfa.c:1107 lib/dfa.c:1110 lib/dfa.c:1115 lib/dfa.c:1137
+#: lib/dfa.c:1140
+msgid "unbalanced ["
+msgstr ""
+
+#: lib/dfa.c:1083
+msgid "invalid character class"
+msgstr ""
+
+#: lib/dfa.c:1206
+msgid "character class syntax is [[:space:]], not [:space:]"
+msgstr ""
+
+#: lib/dfa.c:1275
+msgid "unfinished \\ escape"
+msgstr ""
+
+#: lib/dfa.c:1436
+msgid "invalid content of \\{\\}"
+msgstr ""
+
+#: lib/dfa.c:1439
+msgid "regular expression too big"
+msgstr ""
+
+#: lib/dfa.c:1853
+msgid "unbalanced ("
+msgstr ""
+
+#: lib/dfa.c:1980
+msgid "no syntax specified"
+msgstr ""
+
+#: lib/dfa.c:1988
+msgid "unbalanced )"
+msgstr ""
+
+#: lib/error.c:191
+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 ""
+
+#: lib/getopt.c:654 lib/getopt.c:658
+#, c-format
+msgid "%s: option '--%s' doesn't allow an argument\n"
+msgstr ""
+
+#: 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:715 lib/getopt.c:734
+#, c-format
+msgid "%s: option '--%s' requires an argument\n"
+msgstr ""
+
+#: 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
+#, 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
+#, 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 "Memoria agortuta"
+
+#. TRANSLATORS:
+#. Get translations for open and closing quotation marks.
+#. The message catalog should translate "`" to a left
+#. quotation mark suitable for the locale, and similarly for
+#. "'". For example, a French Unicode local should translate
+#. these to U+00AB (LEFT-POINTING DOUBLE ANGLE
+#. QUOTATION MARK), and U+00BB (RIGHT-POINTING DOUBLE ANGLE
+#. QUOTATION MARK), respectively.
+#.
+#. If the catalog has no translation, we will try to
+#. use Unicode U+2018 (LEFT SINGLE QUOTATION MARK) and
+#. Unicode U+2019 (RIGHT SINGLE QUOTATION MARK). If the
+#. current locale is not Unicode, locale_quoting_style
+#. will quote 'like this', and clocale_quoting_style will
+#. quote "like this". You should always include translations
+#. for "`" and "'" even if U+2018 and U+2019 are appropriate
+#. for your locale.
+#.
+#. If you don't know what to put here, please see
+#. <http://en.wikipedia.org/wiki/Quotation_marks_in_other_languages>
+#. and use glyphs suitable for your language.
+#: lib/quotearg.c:354
+msgid "`"
+msgstr ""
+
+#: lib/quotearg.c:355
+msgid "'"
+msgstr ""
+
+#: lib/regcomp.c:135
+msgid "Success"
+msgstr "Arrakasta"
+
+#: lib/regcomp.c:138
+msgid "No match"
+msgstr "Parekotasunik ez"
+
+#: lib/regcomp.c:141
+msgid "Invalid regular expression"
+msgstr ""
+
+#: lib/regcomp.c:144
+msgid "Invalid collation character"
+msgstr ""
+
+#: lib/regcomp.c:147
+msgid "Invalid character class name"
+msgstr ""
+
+#: lib/regcomp.c:150
+msgid "Trailing backslash"
+msgstr ""
+
+#: lib/regcomp.c:153
+msgid "Invalid back reference"
+msgstr ""
+
+#: lib/regcomp.c:156
+msgid "Unmatched [, [^, [:, [., or [="
+msgstr ""
+
+#: lib/regcomp.c:159
+msgid "Unmatched ( or \\("
+msgstr ""
+
+#: lib/regcomp.c:162
+msgid "Unmatched \\{"
+msgstr ""
+
+#: lib/regcomp.c:165
+msgid "Invalid content of \\{\\}"
+msgstr ""
+
+#: lib/regcomp.c:168
+msgid "Invalid range end"
+msgstr ""
+
+#: lib/regcomp.c:171
+msgid "Memory exhausted"
+msgstr "Memoria agortuta"
+
+#: lib/regcomp.c:174
+msgid "Invalid preceding regular expression"
+msgstr ""
+
+#: lib/regcomp.c:177
+msgid "Premature end of regular expression"
+msgstr ""
+
+#: lib/regcomp.c:180
+msgid "Regular expression too big"
+msgstr ""
+
+#: lib/regcomp.c:183
+msgid "Unmatched ) or \\)"
+msgstr ""
+
+#: lib/regcomp.c:687
+msgid "No previous regular expression"
+msgstr ""
+
+#: lib/set-acl.c:46
+#, c-format
+msgid "setting permissions for %s"
+msgstr ""
+
+#: lib/version-etc.c:74
+#, c-format
+msgid "Packaged by %s (%s)\n"
+msgstr ""
+
+#: lib/version-etc.c:77
+#, c-format
+msgid "Packaged by %s\n"
+msgstr ""
+
+#. 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 ""
+
+#: lib/version-etc.c:86
+msgid ""
+"\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"
+msgstr ""
+
+#. TRANSLATORS: %s denotes an author name.
+#: lib/version-etc.c:102
+#, c-format
+msgid "Written by %s.\n"
+msgstr ""
+
+#. TRANSLATORS: Each %s denotes an author name.
+#: lib/version-etc.c:106
+#, c-format
+msgid "Written by %s and %s.\n"
+msgstr ""
+
+#. TRANSLATORS: Each %s denotes an author name.
+#: lib/version-etc.c:110
+#, c-format
+msgid "Written by %s, %s, and %s.\n"
+msgstr ""
+
+#. TRANSLATORS: Each %s denotes an author name.
+#. You can use line breaks, estimating that each author name occupies
+#. ca. 16 screen columns and that a screen line has ca. 80 columns.
+#: lib/version-etc.c:117
+#, c-format
+msgid ""
+"Written by %s, %s, %s,\n"
+"and %s.\n"
+msgstr ""
+
+#. TRANSLATORS: Each %s denotes an author name.
+#. You can use line breaks, estimating that each author name occupies
+#. ca. 16 screen columns and that a screen line has ca. 80 columns.
+#: lib/version-etc.c:124
+#, c-format
+msgid ""
+"Written by %s, %s, %s,\n"
+"%s, and %s.\n"
+msgstr ""
+
+#. TRANSLATORS: Each %s denotes an author name.
+#. You can use line breaks, estimating that each author name occupies
+#. ca. 16 screen columns and that a screen line has ca. 80 columns.
+#: lib/version-etc.c:131
+#, c-format
+msgid ""
+"Written by %s, %s, %s,\n"
+"%s, %s, and %s.\n"
+msgstr ""
+
+#. TRANSLATORS: Each %s denotes an author name.
+#. You can use line breaks, estimating that each author name occupies
+#. ca. 16 screen columns and that a screen line has ca. 80 columns.
+#: lib/version-etc.c:139
+#, c-format
+msgid ""
+"Written by %s, %s, %s,\n"
+"%s, %s, %s, and %s.\n"
+msgstr ""
+
+#. TRANSLATORS: Each %s denotes an author name.
+#. You can use line breaks, estimating that each author name occupies
+#. ca. 16 screen columns and that a screen line has ca. 80 columns.
+#: lib/version-etc.c:147
+#, c-format
+msgid ""
+"Written by %s, %s, %s,\n"
+"%s, %s, %s, %s,\n"
+"and %s.\n"
+msgstr ""
+
+#. TRANSLATORS: Each %s denotes an author name.
+#. You can use line breaks, estimating that each author name occupies
+#. ca. 16 screen columns and that a screen line has ca. 80 columns.
+#: lib/version-etc.c:156
+#, c-format
+msgid ""
+"Written by %s, %s, %s,\n"
+"%s, %s, %s, %s,\n"
+"%s, and %s.\n"
+msgstr ""
+
+#. TRANSLATORS: Each %s denotes an author name.
+#. You can use line breaks, estimating that each author name occupies
+#. ca. 16 screen columns and that a screen line has ca. 80 columns.
+#: lib/version-etc.c:167
+#, c-format
+msgid ""
+"Written by %s, %s, %s,\n"
+"%s, %s, %s, %s,\n"
+"%s, %s, and others.\n"
+msgstr ""
+
+#. TRANSLATORS: The placeholder indicates the bug-reporting address
+#. for this package. Please add _another line_ saying
+#. "Report translation bugs to <...>\n" with the address for translation
+#. bugs (typically your translation team's web or email address).
+#: lib/version-etc.c:245
+#, c-format
+msgid ""
+"\n"
+"Report bugs to: %s\n"
+msgstr ""
+
+#: lib/version-etc.c:247
+#, c-format
+msgid "Report %s bugs to: %s\n"
+msgstr ""
+
+#: lib/version-etc.c:251
+#, c-format
+msgid "%s home page: <%s>\n"
+msgstr ""
+
+#: lib/version-etc.c:253
+#, c-format
+msgid "%s home page: <http://www.gnu.org/software/%s/>\n"
+msgstr ""
+
+#: lib/version-etc.c:256
+msgid "General help using GNU software: <http://www.gnu.org/gethelp/>\n"
+msgstr ""
+
+#: sed/compile.c:146
msgid "multiple `!'s"
msgstr ""
-#: sed/compile.c:145
+#: sed/compile.c:147
msgid "unexpected `,'"
msgstr "ustekabeko `,'"
-#: sed/compile.c:146
+#: sed/compile.c:149
msgid "invalid usage of +N or ~N as first address"
msgstr ""
-#: sed/compile.c:147
+#: sed/compile.c:150
msgid "unmatched `{'"
msgstr ""
-#: sed/compile.c:148
+#: sed/compile.c:151
msgid "unexpected `}'"
msgstr "ustekabeko `}'"
-#: sed/compile.c:149
+#: sed/compile.c:153
msgid "extra characters after command"
msgstr ""
-#: sed/compile.c:150
+#: sed/compile.c:155
msgid "expected \\ after `a', `c' or `i'"
msgstr ""
-#: sed/compile.c:151
+#: sed/compile.c:157
msgid "`}' doesn't want any addresses"
msgstr ""
-#: sed/compile.c:152
+#: sed/compile.c:159
msgid ": doesn't want any addresses"
msgstr ""
-#: sed/compile.c:153
+#: sed/compile.c:161
msgid "comments don't accept any addresses"
msgstr ""
-#: sed/compile.c:154
+#: sed/compile.c:162
msgid "missing command"
msgstr ""
-#: sed/compile.c:155
+#: sed/compile.c:163
msgid "command only uses one address"
msgstr ""
-#: sed/compile.c:156
+#: sed/compile.c:164
msgid "unterminated address regex"
msgstr ""
-#: sed/compile.c:157
+#: sed/compile.c:165
msgid "unterminated `s' command"
msgstr ""
-#: sed/compile.c:158
+#: sed/compile.c:166
msgid "unterminated `y' command"
msgstr ""
-#: sed/compile.c:159
+#: sed/compile.c:167
msgid "unknown option to `s'"
msgstr "`s' aukera ezezaguna"
-#: sed/compile.c:160
+#: sed/compile.c:169
msgid "multiple `p' options to `s' command"
msgstr ""
-#: sed/compile.c:161
+#: sed/compile.c:171
msgid "multiple `g' options to `s' command"
msgstr ""
-#: sed/compile.c:162
+#: sed/compile.c:173
msgid "multiple number options to `s' command"
msgstr ""
-#: sed/compile.c:163
+#: sed/compile.c:175
msgid "number option to `s' command may not be zero"
msgstr ""
-#: sed/compile.c:164
+#: sed/compile.c:177
msgid "strings for `y' command are different lengths"
msgstr ""
-#: sed/compile.c:165
+#: sed/compile.c:179
msgid "delimiter character is not a single-byte character"
msgstr ""
-#: sed/compile.c:166
+#: sed/compile.c:181
msgid "expected newer version of sed"
msgstr ""
-#: sed/compile.c:167
+#: sed/compile.c:183
msgid "invalid usage of line address 0"
msgstr ""
-#: sed/compile.c:168
+#: sed/compile.c:184
#, c-format
msgid "unknown command: `%c'"
msgstr "komando ezezaguna: `%c'"
-#: sed/compile.c:169
+#: sed/compile.c:186
msgid "incomplete command"
msgstr ""
-#: sed/compile.c:192
+#: sed/compile.c:188
+msgid "\":\" lacks a label"
+msgstr ""
+
+#: sed/compile.c:190
+msgid "recursive escaping after \\c not allowed"
+msgstr ""
+
+#: sed/compile.c:213
#, c-format
msgid "%s: file %s line %lu: %s\n"
msgstr "%s: %s fitxategia %lu lerroa: %s\n"
-#: sed/compile.c:195
+#: sed/compile.c:216
#, c-format
msgid "%s: -e expression #%lu, char %lu: %s\n"
msgstr "%s: -e expresioa #%lu, %lu karakterea: %s\n"
-#: sed/compile.c:1657
+#: sed/compile.c:1639
#, c-format
msgid "can't find label for jump to `%s'"
msgstr ""
-#: sed/execute.c:595
+#: sed/execute.c:264 sed/execute.c:281
+#, c-format
+msgid "case conversion produced an invalid character"
+msgstr ""
+
+#: sed/execute.c:575
#, c-format
msgid "%s: can't read %s: %s\n"
msgstr "%s: ezin irakurri %s: %s\n"
-#: sed/execute.c:624
+#: sed/execute.c:600
#, c-format
msgid "couldn't edit %s: is a terminal"
msgstr "ezin izan da %s editatu: terminal bat da"
-#: sed/execute.c:629
+#: sed/execute.c:605
#, 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:640
+#: sed/execute.c:616
#, c-format
msgid "%s: warning: failed to set default file creation context to %s: %s"
msgstr ""
-#: sed/execute.c:647
+#: sed/execute.c:624
#, c-format
msgid "%s: warning: failed to get security context of %s: %s"
msgstr ""
-#: sed/execute.c:664 sed/utils.c:211
+#: sed/execute.c:643 sed/utils.c:178
#, c-format
msgid "couldn't open temporary file %s: %s"
msgstr ""
-#: sed/execute.c:1193 sed/execute.c:1373
+#: sed/execute.c:1158 sed/execute.c:1368
msgid "error in subprocess"
msgstr "errorea subprozezuan"
-#: sed/execute.c:1195
+#: sed/execute.c:1160
msgid "option `e' not supported"
msgstr ""
-#: sed/execute.c:1375
+#: sed/execute.c:1349
msgid "`e' command not supported"
msgstr ""
-#: sed/execute.c:1725
+#: sed/execute.c:1675
msgid "no input files"
msgstr ""
-#: sed/regexp.c:39
+#: sed/regexp.c:38
msgid "no previous regular expression"
msgstr ""
-#: sed/regexp.c:40
-msgid "cannot specify modifiers on empty regexp"
-msgstr ""
-
-#: sed/regexp.c:129
+#: sed/regexp.c:138
#, c-format
msgid "invalid reference \\%d on `s' command's RHS"
msgstr ""
-#: sed/sed.c:32
+#: sed/sed.c:35
msgid "Jay Fenlason"
msgstr ""
-#: sed/sed.c:33
+#: sed/sed.c:36
msgid "Tom Lord"
msgstr ""
-#: sed/sed.c:34
+#: sed/sed.c:37
msgid "Ken Pizzini"
msgstr ""
-#: sed/sed.c:35
+#: sed/sed.c:38
msgid "Paolo Bonzini"
msgstr ""
-#: sed/sed.c:79
+#: 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"
msgstr ""
-#: sed/sed.c:86
-#, fuzzy, c-format
-msgid ""
-"E-mail bug reports to: <%s>.\n"
-"Be sure to include the word ``%s'' somewhere in the ``Subject:'' field.\n"
+#: sed/sed.c:120
+#, c-format
+msgid "E-mail bug reports to: <%s>.\n"
msgstr ""
-"Bidali bug txostenak honi: %s.\n"
-"Ziurtatu ``%s'' hitza ``Gaia:'' eremuan edonon agertzeaz.\n"
-#: sed/sed.c:99
+#: sed/sed.c:129
msgid ""
" -R, --regexp-perl\n"
" use Perl 5's regular expressions syntax in the script.\n"
msgstr ""
-#: sed/sed.c:104
+#: sed/sed.c:134
#, c-format
msgid ""
"Usage: %s [OPTION]... {script-only-if-no-other-script} [input-file]...\n"
"\n"
msgstr ""
-#: sed/sed.c:108
+#: sed/sed.c:138
#, c-format
msgid ""
" -n, --quiet, --silent\n"
" suppress automatic printing of pattern space\n"
msgstr ""
-#: sed/sed.c:110
+#: sed/sed.c:140
#, c-format
msgid ""
" -e script, --expression=script\n"
" add the script to the commands to be executed\n"
msgstr ""
-#: sed/sed.c:112
+#: sed/sed.c:142
#, c-format
msgid ""
" -f script-file, --file=script-file\n"
@@ -265,21 +641,21 @@ msgid ""
"executed\n"
msgstr ""
-#: sed/sed.c:115
+#: sed/sed.c:146
#, c-format
msgid ""
" --follow-symlinks\n"
" follow symlinks when processing in place\n"
msgstr ""
-#: sed/sed.c:118
+#: sed/sed.c:149
#, c-format
msgid ""
" -i[SUFFIX], --in-place[=SUFFIX]\n"
" edit files in place (makes backup if SUFFIX supplied)\n"
msgstr ""
-#: sed/sed.c:121
+#: sed/sed.c:153
#, c-format
msgid ""
" -b, --binary\n"
@@ -287,37 +663,44 @@ msgid ""
"specially)\n"
msgstr ""
-#: sed/sed.c:124
+#: sed/sed.c:157
#, c-format
msgid ""
" -l N, --line-length=N\n"
" specify the desired line-wrap length for the `l' command\n"
msgstr ""
-#: sed/sed.c:126
+#: sed/sed.c:159
#, c-format
msgid ""
" --posix\n"
" disable all GNU extensions.\n"
msgstr ""
-#: sed/sed.c:128
+#: sed/sed.c:161
#, c-format
msgid ""
-" -r, --regexp-extended\n"
-" use extended regular expressions in the script.\n"
+" -E, -r, --regexp-extended\n"
+" use extended regular expressions in the script\n"
+" (for portability use POSIX -E).\n"
msgstr ""
-#: sed/sed.c:133
+#: sed/sed.c:167
#, c-format
msgid ""
" -s, --separate\n"
-" consider files as separate rather than as a single "
-"continuous\n"
-" long stream.\n"
+" consider files as separate rather than as a single,\n"
+" continuous long stream.\n"
+msgstr ""
+
+#: sed/sed.c:170
+#, c-format
+msgid ""
+" --sandbox\n"
+" operate in sandbox mode.\n"
msgstr ""
-#: sed/sed.c:136
+#: sed/sed.c:172
#, c-format
msgid ""
" -u, --unbuffered\n"
@@ -326,24 +709,24 @@ msgid ""
" the output buffers more often\n"
msgstr ""
-#: sed/sed.c:139
+#: sed/sed.c:175
#, c-format
msgid ""
" -z, --null-data\n"
" separate lines by NUL characters\n"
msgstr ""
-#: sed/sed.c:141
+#: sed/sed.c:177
#, c-format
msgid " --help display this help and exit\n"
msgstr ""
-#: sed/sed.c:142
+#: sed/sed.c:178
#, c-format
msgid " --version output version information and exit\n"
msgstr ""
-#: sed/sed.c:143
+#: sed/sed.c:179
#, c-format
msgid ""
"\n"
@@ -354,119 +737,54 @@ msgid ""
"\n"
msgstr ""
-#: sed/utils.c:74 sed/utils.c:432
+#: sed/utils.c:73 sed/utils.c:384
#, c-format
msgid "cannot remove %s: %s"
msgstr "ezin da %s kendu: %s"
-#: sed/utils.c:144
+#: sed/utils.c:136
#, c-format
msgid "couldn't open file %s: %s"
msgstr "ezin izan da %s fitxategia ireki: %s"
-#: sed/utils.c:167
+#: sed/utils.c:155
#, fuzzy, c-format
msgid "couldn't attach to %s: %s"
msgstr "ezin izan da %d gaia %s-ri idatzi: %s"
-#: sed/utils.c:229
+#: sed/utils.c:192
#, fuzzy, c-format
-msgid "couldn't write %d item to %s: %s"
-msgid_plural "couldn't write %d items to %s: %s"
+msgid "couldn't write %llu item to %s: %s"
+msgid_plural "couldn't write %llu items to %s: %s"
msgstr[0] "ezin izan da %d gaia %s-ri idatzi: %s"
msgstr[1] "ezin izan da %d gaia %s-ri idatzi: %s"
-#: sed/utils.c:244 sed/utils.c:267
+#: sed/utils.c:204 sed/utils.c:223
#, c-format
msgid "read error on %s: %s"
msgstr "irakurketa errorea %s-n: %s"
-#: sed/utils.c:372
+#: sed/utils.c:325
#, fuzzy, c-format
msgid "couldn't follow symlink %s: %s"
msgstr "ezin izan da %s fitxategia ireki: %s"
-#: sed/utils.c:406
+#: sed/utils.c:359
#, fuzzy, c-format
msgid "cannot stat %s: %s"
msgstr "ezin da %s berrizendatu: %s"
-#: sed/utils.c:437
+#: sed/utils.c:389
#, c-format
msgid "cannot rename %s: %s"
msgstr "ezin da %s berrizendatu: %s"
-#: lib/regcomp.c:132
-msgid "Success"
-msgstr "Arrakasta"
-
-#: lib/regcomp.c:135
-msgid "No match"
-msgstr "Parekotasunik ez"
-
-#: lib/regcomp.c:138
-msgid "Invalid regular expression"
-msgstr ""
-
-#: lib/regcomp.c:141
-msgid "Invalid collation character"
-msgstr ""
-
-#: lib/regcomp.c:144
-msgid "Invalid character class name"
-msgstr ""
-
-#: lib/regcomp.c:147
-msgid "Trailing backslash"
-msgstr ""
-
-#: lib/regcomp.c:150
-msgid "Invalid back reference"
-msgstr ""
-
-#: lib/regcomp.c:153
-msgid "Unmatched [ or [^"
-msgstr ""
-
-#: lib/regcomp.c:156
-msgid "Unmatched ( or \\("
-msgstr ""
-
-#: lib/regcomp.c:159
-msgid "Unmatched \\{"
-msgstr ""
-
-#: lib/regcomp.c:162
-msgid "Invalid content of \\{\\}"
-msgstr ""
-
-#: lib/regcomp.c:165
-msgid "Invalid range end"
-msgstr ""
-
-#: lib/regcomp.c:168
-msgid "Memory exhausted"
-msgstr "Memoria agortuta"
-
-#: lib/regcomp.c:171
-msgid "Invalid preceding regular expression"
-msgstr ""
-
-#: lib/regcomp.c:174
-msgid "Premature end of regular expression"
-msgstr ""
-
-#: lib/regcomp.c:177
-msgid "Regular expression too big"
-msgstr ""
-
-#: lib/regcomp.c:180
-msgid "Unmatched ) or \\)"
-msgstr ""
-
-#: lib/regcomp.c:705
-msgid "No previous regular expression"
-msgstr ""
+#~ msgid ""
+#~ "E-mail bug reports to: %s .\n"
+#~ "Be sure to include the word ``%s'' somewhere in the ``Subject:'' field.\n"
+#~ msgstr ""
+#~ "Bidali bug txostenak honi: %s.\n"
+#~ "Ziurtatu ``%s'' hitza ``Gaia:'' eremuan edonon agertzeaz.\n"
#~ msgid "super-sed version %s\n"
#~ msgstr "super-sed %s bertsioa\n"
diff --git a/po/fi.gmo b/po/fi.gmo
index 7df79e1..3398fbf 100644
--- a/po/fi.gmo
+++ b/po/fi.gmo
Binary files differ
diff --git a/po/fi.po b/po/fi.po
index c48fa4c..912840b 100644
--- a/po/fi.po
+++ b/po/fi.po
@@ -1,224 +1,637 @@
# Finnish messages for GNU sed.
-# Copyright © 2002, 2007, 2008 Free Software Foundation, Inc.
+# Copyright © 2002, 2007, 2008, 2016 Free Software Foundation, Inc.
# This file is distributed under the same license as the sed package.
# Sami J. Laine <sami.laine@iki.fi>, 2002.
# Jorma Karvonen <karvjorm@users.sf.net>, 2007, 2008.
-# Jorma Karvonen <karvonen.jorma@gmail.com>, 2010.
+# Jorma Karvonen <karvonen.jorma@gmail.com>, 2010, 2016.
#
msgid ""
msgstr ""
-"Project-Id-Version: sed 4.2.1\n"
+"Project-Id-Version: sed 4.2.2.177\n"
"Report-Msgid-Bugs-To: bug-gnu-utils@gnu.org\n"
-"POT-Creation-Date: 2012-12-22 14:36+0100\n"
-"PO-Revision-Date: 2010-06-11 20:45+0200\n"
+"POT-Creation-Date: 2016-12-30 00:59-0800\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"
"Language: fi\n"
"MIME-Version: 1.0\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"
"X-Generator: KBabel 1.11.2\n"
-#: sed/compile.c:144
+#: lib/closeout.c:112
+msgid "write error"
+msgstr "kirjoitusvirhe"
+
+#: lib/copy-acl.c:54
+#, c-format
+msgid "preserving permissions for %s"
+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:1025 lib/dfa.c:1028 lib/dfa.c:1047 lib/dfa.c:1057 lib/dfa.c:1070
+#: lib/dfa.c:1098 lib/dfa.c:1107 lib/dfa.c:1110 lib/dfa.c:1115 lib/dfa.c:1137
+#: lib/dfa.c:1140
+msgid "unbalanced ["
+msgstr "pariton ”[”"
+
+#: lib/dfa.c:1083
+msgid "invalid character class"
+msgstr "Virheellinen merkkiluokka"
+
+#: lib/dfa.c:1206
+msgid "character class syntax is [[:space:]], not [:space:]"
+msgstr "merkkiluokan syntaksi on [[:space:]], ei [:space:]"
+
+#: lib/dfa.c:1275
+msgid "unfinished \\ escape"
+msgstr "päättämätön \\-koodinvaihto"
+
+#: lib/dfa.c:1436
+msgid "invalid content of \\{\\}"
+msgstr "Kohteen \\{\\} virheellinen sisältö"
+
+#: lib/dfa.c:1439
+msgid "regular expression too big"
+msgstr "säännöllinen lauseke on liian suuri"
+
+#: lib/dfa.c:1853
+msgid "unbalanced ("
+msgstr "pariton ”(”"
+
+#: lib/dfa.c:1980
+msgid "no syntax specified"
+msgstr "syntaksia ei ole määritelty"
+
+#: lib/dfa.c:1988
+msgid "unbalanced )"
+msgstr "pariton ”)”"
+
+#: lib/error.c:191
+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"
+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:667 lib/getopt.c:672
+#, c-format
+msgid "%s: option '%c%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"
+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
+#, 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
+#, 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"
+
+#. TRANSLATORS:
+#. Get translations for open and closing quotation marks.
+#. The message catalog should translate "`" to a left
+#. quotation mark suitable for the locale, and similarly for
+#. "'". For example, a French Unicode local should translate
+#. these to U+00AB (LEFT-POINTING DOUBLE ANGLE
+#. QUOTATION MARK), and U+00BB (RIGHT-POINTING DOUBLE ANGLE
+#. QUOTATION MARK), respectively.
+#.
+#. If the catalog has no translation, we will try to
+#. use Unicode U+2018 (LEFT SINGLE QUOTATION MARK) and
+#. Unicode U+2019 (RIGHT SINGLE QUOTATION MARK). If the
+#. current locale is not Unicode, locale_quoting_style
+#. will quote 'like this', and clocale_quoting_style will
+#. quote "like this". You should always include translations
+#. for "`" and "'" even if U+2018 and U+2019 are appropriate
+#. for your locale.
+#.
+#. If you don't know what to put here, please see
+#. <http://en.wikipedia.org/wiki/Quotation_marks_in_other_languages>
+#. and use glyphs suitable for your language.
+#: lib/quotearg.c:354
+msgid "`"
+msgstr "”"
+
+#: lib/quotearg.c:355
+msgid "'"
+msgstr "”"
+
+#: lib/regcomp.c:135
+msgid "Success"
+msgstr "Onnistui"
+
+#: lib/regcomp.c:138
+msgid "No match"
+msgstr "Ei osumaa"
+
+#: lib/regcomp.c:141
+msgid "Invalid regular expression"
+msgstr "Virheellinen säännöllinen lauseke"
+
+#: lib/regcomp.c:144
+msgid "Invalid collation character"
+msgstr "Virheellinen vertailumerkki"
+
+#: lib/regcomp.c:147
+msgid "Invalid character class name"
+msgstr "Virheellinen merkkiluokan nimi"
+
+#: lib/regcomp.c:150
+msgid "Trailing backslash"
+msgstr "Seuraava kenoviiva"
+
+#: lib/regcomp.c:153
+msgid "Invalid back reference"
+msgstr "Virheellinen takaisinviittaus"
+
+#: lib/regcomp.c:156
+msgid "Unmatched [, [^, [:, [., or [="
+msgstr "Pariton ”[”, ”[^”, ”[:”, ”[.”, tai ”[=”"
+
+#: lib/regcomp.c:159
+msgid "Unmatched ( or \\("
+msgstr "Pariton ”(” tai ”\\(”"
+
+#: lib/regcomp.c:162
+msgid "Unmatched \\{"
+msgstr "Pariton ”\\{”"
+
+#: lib/regcomp.c:165
+msgid "Invalid content of \\{\\}"
+msgstr "Kohteen \\{\\} virheellinen sisältö"
+
+#: lib/regcomp.c:168
+msgid "Invalid range end"
+msgstr "Virheellinen lukualueen loppu"
+
+#: lib/regcomp.c:171
+msgid "Memory exhausted"
+msgstr "Muisti loppui"
+
+#: lib/regcomp.c:174
+msgid "Invalid preceding regular expression"
+msgstr "Virheellinen edeltävä säännöllinen lauseke"
+
+#: lib/regcomp.c:177
+msgid "Premature end of regular expression"
+msgstr "Ennenaikainen säännöllisen lausekkeen loppu"
+
+#: lib/regcomp.c:180
+msgid "Regular expression too big"
+msgstr "Säännöllinen lauseke on liian suuri"
+
+#: lib/regcomp.c:183
+msgid "Unmatched ) or \\)"
+msgstr "Pariton ”)” tai ”\\)”"
+
+#: lib/regcomp.c:687
+msgid "No previous regular expression"
+msgstr "Ei aikaisempaa säännöllistä lausetta"
+
+#: lib/set-acl.c:46
+#, c-format
+msgid "setting permissions for %s"
+msgstr "kohteen %s käyttöoikeuksien asetukset"
+
+#: lib/version-etc.c:74
+#, c-format
+msgid "Packaged by %s (%s)\n"
+msgstr "Pakkaaja: %s (%s)\n"
+
+#: lib/version-etc.c:77
+#, c-format
+msgid "Packaged by %s\n"
+msgstr "Pakkaaja: %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 "©"
+
+#: lib/version-etc.c:86
+msgid ""
+"\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"
+msgstr ""
+"\n"
+"License GPLv3+: GNU GPL versio 3 tai myöhäisempi <http://gnu.org/licenses/"
+"gpl.html>.\n"
+"Tämä on vapaa ohjelmisto: voit vapaasti muuttaa sitä ja jakaa sitä "
+"edelleen.\n"
+"Ohjelmistolle EI OLE TAKUUTA, siinä laajuudessa kuin laki sen sallii.\n"
+"\n"
+
+#. TRANSLATORS: %s denotes an author name.
+#: lib/version-etc.c:102
+#, c-format
+msgid "Written by %s.\n"
+msgstr "Tekijä: %s.\n"
+
+#. TRANSLATORS: Each %s denotes an author name.
+#: lib/version-etc.c:106
+#, c-format
+msgid "Written by %s and %s.\n"
+msgstr "Tekijät: %s ja %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 "Tekijät: %s, %s, ja %s.\n"
+
+#. TRANSLATORS: Each %s denotes an author name.
+#. You can use line breaks, estimating that each author name occupies
+#. ca. 16 screen columns and that a screen line has ca. 80 columns.
+#: lib/version-etc.c:117
+#, c-format
+msgid ""
+"Written by %s, %s, %s,\n"
+"and %s.\n"
+msgstr ""
+"Tekijät: %s, %s, %s,\n"
+"ja %s.\n"
+
+#. TRANSLATORS: Each %s denotes an author name.
+#. You can use line breaks, estimating that each author name occupies
+#. ca. 16 screen columns and that a screen line has ca. 80 columns.
+#: lib/version-etc.c:124
+#, c-format
+msgid ""
+"Written by %s, %s, %s,\n"
+"%s, and %s.\n"
+msgstr ""
+"Tekijät: %s, %s, %s,\n"
+"%s, ja %s.\n"
+
+#. TRANSLATORS: Each %s denotes an author name.
+#. You can use line breaks, estimating that each author name occupies
+#. ca. 16 screen columns and that a screen line has ca. 80 columns.
+#: lib/version-etc.c:131
+#, c-format
+msgid ""
+"Written by %s, %s, %s,\n"
+"%s, %s, and %s.\n"
+msgstr ""
+"Tekijät: %s, %s, %s,\n"
+"%s, %s, ja %s.\n"
+
+#. TRANSLATORS: Each %s denotes an author name.
+#. You can use line breaks, estimating that each author name occupies
+#. ca. 16 screen columns and that a screen line has ca. 80 columns.
+#: lib/version-etc.c:139
+#, c-format
+msgid ""
+"Written by %s, %s, %s,\n"
+"%s, %s, %s, and %s.\n"
+msgstr ""
+"Tekijät: %s, %s, %s,\n"
+"%s, %s, %s, ja %s.\n"
+
+#. TRANSLATORS: Each %s denotes an author name.
+#. You can use line breaks, estimating that each author name occupies
+#. ca. 16 screen columns and that a screen line has ca. 80 columns.
+#: lib/version-etc.c:147
+#, c-format
+msgid ""
+"Written by %s, %s, %s,\n"
+"%s, %s, %s, %s,\n"
+"and %s.\n"
+msgstr ""
+"Tekijät: %s, %s, %s,\n"
+"%s, %s, %s, %s,\n"
+"ja %s.\n"
+
+#. TRANSLATORS: Each %s denotes an author name.
+#. You can use line breaks, estimating that each author name occupies
+#. ca. 16 screen columns and that a screen line has ca. 80 columns.
+#: lib/version-etc.c:156
+#, c-format
+msgid ""
+"Written by %s, %s, %s,\n"
+"%s, %s, %s, %s,\n"
+"%s, and %s.\n"
+msgstr ""
+"Tekijät: %s, %s, %s,\n"
+"%s, %s, %s, %s,\n"
+"%s, ja %s.\n"
+
+#. TRANSLATORS: Each %s denotes an author name.
+#. You can use line breaks, estimating that each author name occupies
+#. ca. 16 screen columns and that a screen line has ca. 80 columns.
+#: lib/version-etc.c:167
+#, c-format
+msgid ""
+"Written by %s, %s, %s,\n"
+"%s, %s, %s, %s,\n"
+"%s, %s, and others.\n"
+msgstr ""
+"Tekijät: %s, %s, %s,\n"
+"%s, %s, %s, %s,\n"
+"%s, %s, ja muut.\n"
+
+#. TRANSLATORS: The placeholder indicates the bug-reporting address
+#. for this package. Please add _another line_ saying
+#. "Report translation bugs to <...>\n" with the address for translation
+#. bugs (typically your translation team's web or email address).
+#: lib/version-etc.c:245
+#, c-format
+msgid ""
+"\n"
+"Report bugs to: %s\n"
+msgstr ""
+"\n"
+"Ilmoita ohjelmointivirheistä osoitteeseen: %s\n"
+"Ilmoita käännösvirheistä osoitteeseen: <translation-team-fi@lists."
+"sourceforge.net>\n"
+
+#: lib/version-etc.c:247
+#, c-format
+msgid "Report %s bugs to: %s\n"
+msgstr ""
+"Ilmoita %s ohjelmointivirhettä osoitteeseen: %s\n"
+"Ilmoita käännösvirheistä osoitteeseen: <translation-team-fi@lists."
+"sourceforge.net>\n"
+
+#: lib/version-etc.c:251
+#, c-format
+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"
+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"
+msgstr ""
+"Yleinen opaste GNU-ohjelmiston käytöstä: <http://www.gnu.org/gethelp/>\n"
+
+#: sed/compile.c:146
msgid "multiple `!'s"
msgstr "useita ”!”-merkkejä"
-#: sed/compile.c:145
+#: sed/compile.c:147
msgid "unexpected `,'"
msgstr "odottamaton ”,”"
-#: sed/compile.c:146
+#: sed/compile.c:149
msgid "invalid usage of +N or ~N as first address"
msgstr "ensimmäisenä osoitteena ei voi olla ”+N” eikä ”~N”"
-#: sed/compile.c:147
+#: sed/compile.c:150
msgid "unmatched `{'"
msgstr "pariton ”{”"
-#: sed/compile.c:148
+#: sed/compile.c:151
msgid "unexpected `}'"
msgstr "pariton ”}”"
-#: sed/compile.c:149
+#: sed/compile.c:153
msgid "extra characters after command"
msgstr "ylimääräisiä merkkejä komennon jälkeen"
-#: sed/compile.c:150
+#: sed/compile.c:155
msgid "expected \\ after `a', `c' or `i'"
msgstr "\\ odotettiin merkkien ”a”, ”c” tai ”i” jälkeen"
-#: sed/compile.c:151
+#: sed/compile.c:157
msgid "`}' doesn't want any addresses"
msgstr "”}” ei tarvitse osoitteita"
-#: sed/compile.c:152
+#: sed/compile.c:159
msgid ": doesn't want any addresses"
msgstr ": ei tarvitse osoitteita"
-#: sed/compile.c:153
+#: sed/compile.c:161
msgid "comments don't accept any addresses"
msgstr "kommentit eivät hyväksy osoitteita"
-#: sed/compile.c:154
+#: sed/compile.c:162
msgid "missing command"
msgstr "puuttuva komento"
-#: sed/compile.c:155
+#: sed/compile.c:163
msgid "command only uses one address"
msgstr "komento käyttää vain yhtä osoitetta"
-#: sed/compile.c:156
+#: sed/compile.c:164
msgid "unterminated address regex"
msgstr "päättymätön osoite vakiolauseessa"
-#: sed/compile.c:157
+#: sed/compile.c:165
msgid "unterminated `s' command"
msgstr "päättymätön ”s”-komento"
-#: sed/compile.c:158
+#: sed/compile.c:166
msgid "unterminated `y' command"
msgstr "päättymätön ”y”-komento"
-#: sed/compile.c:159
+#: sed/compile.c:167
msgid "unknown option to `s'"
-msgstr "tuntematon valitsin ”s”:lle"
+msgstr "tuntematon valitsin kohteelle ”s”"
-#: sed/compile.c:160
+#: sed/compile.c:169
msgid "multiple `p' options to `s' command"
msgstr "useita ”p”-valitsimia ”s”-komennolle"
-#: sed/compile.c:161
+#: sed/compile.c:171
msgid "multiple `g' options to `s' command"
msgstr "useita ”g”-valitsimia ”s”-komennolle"
-#: sed/compile.c:162
+#: sed/compile.c:173
msgid "multiple number options to `s' command"
msgstr "useita valitsimia ”s”-komennolle"
-#: sed/compile.c:163
+#: sed/compile.c:175
msgid "number option to `s' command may not be zero"
-msgstr "numeerinen valitsin ”s”-komennolle ei voi olla nolla"
+msgstr "numeerinen valitsin ”s”-komennolle ei saa olla nolla"
-#: sed/compile.c:164
+#: sed/compile.c:177
msgid "strings for `y' command are different lengths"
msgstr "merkkijonot ”y”-komennolle ovat pituudeltaan vaihtelevia"
-#: sed/compile.c:165
+#: sed/compile.c:179
msgid "delimiter character is not a single-byte character"
msgstr "erotinmerkki ei ole yksitavuinen merkki"
-#: sed/compile.c:166
+#: sed/compile.c:181
msgid "expected newer version of sed"
msgstr "odotettiin uudempaa sed-versiota"
-#: sed/compile.c:167
+#: sed/compile.c:183
msgid "invalid usage of line address 0"
msgstr "riviosoitteen nolla virheellinen käyttö"
-#: sed/compile.c:168
+#: sed/compile.c:184
#, c-format
msgid "unknown command: `%c'"
msgstr "tuntematon komento: ”%c”"
-#: sed/compile.c:169
-#, fuzzy
+#: sed/compile.c:186
msgid "incomplete command"
-msgstr "puuttuva komento"
+msgstr "vaillinainen komento"
-#: sed/compile.c:192
+#: sed/compile.c:188
+msgid "\":\" lacks a label"
+msgstr "\":\" nimiö puuttuu"
+
+#: sed/compile.c:190
+msgid "recursive escaping after \\c not allowed"
+msgstr "rekursiivinen koodinvaihto ei ole sallittu merkin \\c jälkeen"
+
+#: sed/compile.c:213
#, c-format
msgid "%s: file %s line %lu: %s\n"
msgstr "%s: tiedosto %s rivi %lu: %s\n"
-#: sed/compile.c:195
+#: sed/compile.c:216
#, c-format
msgid "%s: -e expression #%lu, char %lu: %s\n"
msgstr "%s: -e lauseke #%lu, merkki %lu: %s\n"
-#: sed/compile.c:1657
+#: sed/compile.c:1639
#, c-format
msgid "can't find label for jump to `%s'"
msgstr "nimikettä hypylle kohteeseen ”%s” ei löydy"
-#: sed/execute.c:595
+#: sed/execute.c:264 sed/execute.c:281
+#, c-format
+msgid "case conversion produced an invalid character"
+msgstr "kirjainkoon muunnos tuotti virheellisen merkin"
+
+#: sed/execute.c:575
#, c-format
msgid "%s: can't read %s: %s\n"
-msgstr "%s: ei voida lukea syötettä %s: %s\n"
+msgstr "%s: syötteen %s lukeminen epäonnistui: %s\n"
-#: sed/execute.c:624
+#: sed/execute.c:600
#, c-format
msgid "couldn't edit %s: is a terminal"
-msgstr "ei voitu muokata %s: se on pääte"
+msgstr "kohteen %s muokkaaminen epäonnistui: se on pääte"
-#: sed/execute.c:629
+#: sed/execute.c:605
#, c-format
msgid "couldn't edit %s: not a regular file"
-msgstr "ei voitu muokata %s: se ei ole tavallinen tiedosto"
+msgstr "kohteen %s muokkaaminen epäonnistui: se ei ole tavallinen tiedosto"
-#: sed/execute.c:640
+#: sed/execute.c:616
#, 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:647
+#: sed/execute.c:624
#, 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:664 sed/utils.c:211
+#: sed/execute.c:643 sed/utils.c:178
#, c-format
msgid "couldn't open temporary file %s: %s"
-msgstr "Väliaikaistiedostoa %s ei voitu avata: %s"
+msgstr "Väliaikaistiedoston %s avaaminen epäonnistui: %s"
-#: sed/execute.c:1193 sed/execute.c:1373
+#: sed/execute.c:1158 sed/execute.c:1368
msgid "error in subprocess"
msgstr "virhe lapsiprosessissa"
-#: sed/execute.c:1195
+#: sed/execute.c:1160
msgid "option `e' not supported"
msgstr "valitsin ”e” ei ole tuettu"
-#: sed/execute.c:1375
+#: sed/execute.c:1349
msgid "`e' command not supported"
msgstr "komento ”e” ei ole tuettu"
-#: sed/execute.c:1725
+#: sed/execute.c:1675
msgid "no input files"
msgstr "ei syötetiedostoja"
-#: sed/regexp.c:39
+#: sed/regexp.c:38
msgid "no previous regular expression"
msgstr "ei aikaisempaa säännöllistä lauseketta"
-#: sed/regexp.c:40
-msgid "cannot specify modifiers on empty regexp"
-msgstr "muuttajia ei voida määritellä tyhjään säännölliseen lausekkeeseen"
-
-#: sed/regexp.c:129
+#: sed/regexp.c:138
#, c-format
msgid "invalid reference \\%d on `s' command's RHS"
msgstr "virheellinen viittaus \\%d komennon ”s” oikealla puolella"
-#: sed/sed.c:32
+#: sed/sed.c:35
msgid "Jay Fenlason"
-msgstr ""
+msgstr "Jay Fenlason"
-#: sed/sed.c:33
+#: sed/sed.c:36
msgid "Tom Lord"
-msgstr ""
+msgstr "Tom Lord"
-#: sed/sed.c:34
+#: sed/sed.c:37
msgid "Ken Pizzini"
-msgstr ""
+msgstr "Ken Pizzini"
-#: sed/sed.c:35
+#: sed/sed.c:38
msgid "Paolo Bonzini"
-msgstr ""
+msgstr "Paolo Bonzini"
-#: sed/sed.c:79
+#: sed/sed.c:113
#, c-format
msgid ""
"GNU sed home page: <http://www.gnu.org/software/sed/>.\n"
@@ -227,18 +640,12 @@ msgstr ""
"GNU sed -kotisivu: <http://www.gnu.org/software/sed/>.\n"
"Yleinen opaste GNU-ohjelmiston käytöstä: <http://www.gnu.org/gethelp/>.\n"
-#: sed/sed.c:86
+#: sed/sed.c:120
#, c-format
-msgid ""
-"E-mail bug reports to: <%s>.\n"
-"Be sure to include the word ``%s'' somewhere in the ``Subject:'' field.\n"
-msgstr ""
-"Lähetä vikailmoitukset (englanniksi) osoitteeseen: <%s> .\n"
-"Ilmoita käännösvirheistä osoitteeseen: <translation-team-fi@lists."
-"sourceforge.net>.\n"
-"Sisällytä sana ”%s” viestin aihekenttään (”Subject”-kenttään).\n"
+msgid "E-mail bug reports to: <%s>.\n"
+msgstr "Ilmoita ohjelmointivirheistä osoitteeseen: <%s>.\n"
-#: sed/sed.c:99
+#: sed/sed.c:129
msgid ""
" -R, --regexp-perl\n"
" use Perl 5's regular expressions syntax in the script.\n"
@@ -247,7 +654,7 @@ msgstr ""
" käytä Perl 5:n mukaista säännöllisten lauseiden\n"
" syntaksia skriptissä.\n"
-#: sed/sed.c:104
+#: sed/sed.c:134
#, c-format
msgid ""
"Usage: %s [OPTION]... {script-only-if-no-other-script} [input-file]...\n"
@@ -257,7 +664,7 @@ msgstr ""
"[syötetiedosto]...\n"
"\n"
-#: sed/sed.c:108
+#: sed/sed.c:138
#, c-format
msgid ""
" -n, --quiet, --silent\n"
@@ -266,7 +673,7 @@ msgstr ""
" -n, --quiet, --silent\n"
" vaienna automaattinen mallitilan tulostus\n"
-#: sed/sed.c:110
+#: sed/sed.c:140
#, c-format
msgid ""
" -e script, --expression=script\n"
@@ -275,7 +682,7 @@ msgstr ""
" -e script, --expression=skripti\n"
" lisää skripti suoritettaviin komentoihin\n"
-#: sed/sed.c:112
+#: sed/sed.c:142
#, c-format
msgid ""
" -f script-file, --file=script-file\n"
@@ -285,7 +692,7 @@ msgstr ""
" -f script-file, --file=skriptitiedosto\n"
" lisää skriptitiedoston sisältö suoritettaviin komentoihin\n"
-#: sed/sed.c:115
+#: sed/sed.c:146
#, c-format
msgid ""
" --follow-symlinks\n"
@@ -294,17 +701,17 @@ msgstr ""
" --follow-symlinks\n"
" seuraa symbolisia linkkejä, kun prosessoidaan paikallaan\n"
-#: sed/sed.c:118
-#, fuzzy, c-format
+#: sed/sed.c:149
+#, c-format
msgid ""
" -i[SUFFIX], --in-place[=SUFFIX]\n"
" edit files in place (makes backup if SUFFIX supplied)\n"
msgstr ""
" -i[SUFFIKSI], --in-place[=SUFFIKSI]\n"
" muokkaa tiedostoja paikallaan (tekee varmuuskopion, jos "
-"tiedostotarkennin on annettu)\n"
+"SUFFIKSI on annettu)\n"
-#: sed/sed.c:121
+#: sed/sed.c:153
#, c-format
msgid ""
" -b, --binary\n"
@@ -315,7 +722,7 @@ msgstr ""
" avaa tiedostot binääritilassa (rivinvaihtomerkkejä CR+LF ei "
"erityisemmin prosessoida)\n"
-#: sed/sed.c:124
+#: sed/sed.c:157
#, c-format
msgid ""
" -l N, --line-length=N\n"
@@ -324,7 +731,7 @@ msgstr ""
" -l N, --line-length=N\n"
" määrittelee halutun rivinvaihtopituuden komennolle ”l”\n"
-#: sed/sed.c:126
+#: sed/sed.c:159
#, c-format
msgid ""
" --posix\n"
@@ -333,28 +740,38 @@ msgstr ""
" --posix\n"
" passivoi kaikki GNU-laajennukset.\n"
-#: sed/sed.c:128
+#: sed/sed.c:161
#, c-format
msgid ""
-" -r, --regexp-extended\n"
-" use extended regular expressions in the script.\n"
+" -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"
" käytä laajennettuja säännöllisiä lausekkeita skriptissä.\n"
+" (käytä siirrettävyyttä varten valitsinta POSIX -E)).\n"
-#: sed/sed.c:133
+#: sed/sed.c:167
#, c-format
msgid ""
" -s, --separate\n"
-" consider files as separate rather than as a single "
-"continuous\n"
-" long stream.\n"
+" consider files as separate rather than as a single,\n"
+" continuous long stream.\n"
msgstr ""
" -s, --separate\n"
-" pidä tiedostoja erillisinä pikemmin kuin yhtenä jatkuvana\n"
-" pitkänä virtana.\n"
+" pidä tiedostoja erillisinä pikemmin kuin yhtenä,\n"
+" jatkuvana pitkänä virtana.\n"
-#: sed/sed.c:136
+#: sed/sed.c:170
+#, c-format
+msgid ""
+" --sandbox\n"
+" operate in sandbox mode.\n"
+msgstr ""
+" --sandbox\n"
+" toimi hiekkalaatikkotilassa.\n"
+
+#: sed/sed.c:172
#, c-format
msgid ""
" -u, --unbuffered\n"
@@ -366,24 +783,26 @@ msgstr ""
" lataa syötetiedostoista minimimäärä dataa ja tyhjennä\n"
" tulostepuskurit useammin\n"
-#: sed/sed.c:139
+#: sed/sed.c:175
#, c-format
msgid ""
" -z, --null-data\n"
" separate lines by NUL characters\n"
msgstr ""
+" -z, --null-data\n"
+" erottele rivit NUL-merkeillä\n"
-#: sed/sed.c:141
+#: sed/sed.c:177
#, c-format
msgid " --help display this help and exit\n"
msgstr " --help näytä tämä opaste ja poistu\n"
-#: sed/sed.c:142
+#: sed/sed.c:178
#, c-format
msgid " --version output version information and exit\n"
msgstr " --version tulosta versiotiedot ja poistu\n"
-#: sed/sed.c:143
+#: sed/sed.c:179
#, c-format
msgid ""
"\n"
@@ -403,119 +822,61 @@ msgstr ""
"ole määritelty, luetaan vakiosyötettä.\n"
"\n"
-#: sed/utils.c:74 sed/utils.c:432
+#: sed/utils.c:73 sed/utils.c:384
#, c-format
msgid "cannot remove %s: %s"
-msgstr "ei voida siirtää %s: %s"
+msgstr "kohteen %s poistaminen epäonnistui: %s"
-#: sed/utils.c:144
+#: sed/utils.c:136
#, c-format
msgid "couldn't open file %s: %s"
-msgstr "ei voitu avata tiedostoa %s: %s"
+msgstr "tiedoston %s avaaminen epäonnistui: %s"
-#: sed/utils.c:167
+#: sed/utils.c:155
#, c-format
msgid "couldn't attach to %s: %s"
-msgstr "ei voitu liittyä kohteeseen %s: %s"
+msgstr "kohteeseen %s liittyminen epäonnistui: %s"
-#: sed/utils.c:229
+#: sed/utils.c:192
#, c-format
-msgid "couldn't write %d item to %s: %s"
-msgid_plural "couldn't write %d items to %s: %s"
-msgstr[0] "%d kohdetta ei voitu kirjoittaa tulosteeseen %s: %s"
-msgstr[1] "%d kohdetta ei voitu kirjoittaa tulosteeseen %s: %s"
+msgid "couldn't write %llu item to %s: %s"
+msgid_plural "couldn't write %llu items to %s: %s"
+msgstr[0] "%llu kohteen kirjoittaminen tulosteeseen %s epäonnistui: %s"
+msgstr[1] "%llu kohteen kirjoittaminen tulosteeseen %s epäonnistui: %s"
-#: sed/utils.c:244 sed/utils.c:267
+#: sed/utils.c:204 sed/utils.c:223
#, c-format
msgid "read error on %s: %s"
msgstr "lukuvirhe syötteessä %s: %s"
-#: sed/utils.c:372
+#: sed/utils.c:325
#, c-format
msgid "couldn't follow symlink %s: %s"
-msgstr "ei voitu seurata symbolista linkkiä %s: %s"
+msgstr "symbolisen linkin %s seuraaminen epäonnistui: %s"
-#: sed/utils.c:406
+#: sed/utils.c:359
#, c-format
msgid "cannot stat %s: %s"
-msgstr "ei voida suorittaa stat-käskyä %s: %s"
+msgstr "stat %s-käskyn suorittaminen epäonnistui: %s"
-#: sed/utils.c:437
+#: sed/utils.c:389
#, c-format
msgid "cannot rename %s: %s"
-msgstr "ei voida nimetä uudelleen %s: %s"
-
-#: lib/regcomp.c:132
-msgid "Success"
-msgstr "Onnistui"
-
-#: lib/regcomp.c:135
-msgid "No match"
-msgstr "Ei osumaa"
-
-#: lib/regcomp.c:138
-msgid "Invalid regular expression"
-msgstr "Virheellinen säännöllinen lauseke"
-
-#: lib/regcomp.c:141
-msgid "Invalid collation character"
-msgstr "Virheellinen vertailumerkki"
-
-#: lib/regcomp.c:144
-msgid "Invalid character class name"
-msgstr "Virheellinen merkkiluokan nimi"
-
-#: lib/regcomp.c:147
-msgid "Trailing backslash"
-msgstr "Seuraava kenoviiva"
-
-#: lib/regcomp.c:150
-msgid "Invalid back reference"
-msgstr "Virheellinen takaisinviittaus"
-
-#: lib/regcomp.c:153
-msgid "Unmatched [ or [^"
-msgstr "Pariton ”[” tai ”[^”"
-
-#: lib/regcomp.c:156
-msgid "Unmatched ( or \\("
-msgstr "Pariton ”(” tai ”\\(”"
-
-#: lib/regcomp.c:159
-msgid "Unmatched \\{"
-msgstr "Pariton ”\\{”"
+msgstr "kohteen %s nimeäminen uudelleen epäonnistui: %s"
-#: lib/regcomp.c:162
-msgid "Invalid content of \\{\\}"
-msgstr "Virheellinen sisältö \\{\\}:ssä"
-
-#: lib/regcomp.c:165
-msgid "Invalid range end"
-msgstr "Virheellinen lukualueen loppu"
-
-#: lib/regcomp.c:168
-msgid "Memory exhausted"
-msgstr "Muisti loppui"
-
-#: lib/regcomp.c:171
-msgid "Invalid preceding regular expression"
-msgstr "Virheellinen edeltävä säännöllinen lauseke"
-
-#: lib/regcomp.c:174
-msgid "Premature end of regular expression"
-msgstr "Ennenaikainen säännöllisen lausekkeen loppu"
-
-#: lib/regcomp.c:177
-msgid "Regular expression too big"
-msgstr "Säännöllinen lauseke on liian suuri"
-
-#: lib/regcomp.c:180
-msgid "Unmatched ) or \\)"
-msgstr "Pariton ”)” tai ”\\)”"
+#~ msgid "cannot specify modifiers on empty regexp"
+#~ msgstr ""
+#~ "määriteosien määritteleminen tyhjään säännölliseen lausekkeeseen "
+#~ "epäonnistui"
-#: lib/regcomp.c:705
-msgid "No previous regular expression"
-msgstr "Ei aikaisempaa säännöllistä lausetta"
+#~ msgid ""
+#~ "E-mail bug reports to: <%s>.\n"
+#~ "Be sure to include the word ``%s'' somewhere in the ``Subject:'' field.\n"
+#~ msgstr ""
+#~ "Lähetä vikailmoitukset (englanniksi) osoitteeseen: <%s> .\n"
+#~ "Ilmoita käännösvirheistä osoitteeseen: <translation-team-fi@lists."
+#~ "sourceforge.net>.\n"
+#~ "Sisällytä sana ”%s” viestin aihekenttään (”Subject”-kenttään).\n"
#~ msgid "super-sed version %s\n"
#~ msgstr "super-sed versio %s\n"
diff --git a/po/fr.gmo b/po/fr.gmo
index 1bedf23..c4a2d88 100644
--- a/po/fr.gmo
+++ b/po/fr.gmo
Binary files differ
diff --git a/po/fr.po b/po/fr.po
index a4498ac..4dcc432 100644
--- a/po/fr.po
+++ b/po/fr.po
@@ -11,7 +11,7 @@ msgid ""
msgstr ""
"Project-Id-Version: sed 4.2.1\n"
"Report-Msgid-Bugs-To: bug-gnu-utils@gnu.org\n"
-"POT-Creation-Date: 2012-12-22 14:36+0100\n"
+"POT-Creation-Date: 2016-12-30 00:59-0800\n"
"PO-Revision-Date: 2009-11-04 13:22+0100\n"
"Last-Translator: Gael Queri <gael@lautre.net>\n"
"Language-Team: French <traduc@traduc.org>\n"
@@ -19,210 +19,596 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=ISO-8859-1\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"
-#: sed/compile.c:144
+#: lib/closeout.c:112
+msgid "write error"
+msgstr ""
+
+#: lib/copy-acl.c:54
+#, c-format
+msgid "preserving permissions for %s"
+msgstr ""
+
+#: lib/dfa.c:1025 lib/dfa.c:1028 lib/dfa.c:1047 lib/dfa.c:1057 lib/dfa.c:1070
+#: lib/dfa.c:1098 lib/dfa.c:1107 lib/dfa.c:1110 lib/dfa.c:1115 lib/dfa.c:1137
+#: lib/dfa.c:1140
+msgid "unbalanced ["
+msgstr ""
+
+#: lib/dfa.c:1083
+#, fuzzy
+msgid "invalid character class"
+msgstr "Nom de classe de caractres invalide"
+
+#: lib/dfa.c:1206
+msgid "character class syntax is [[:space:]], not [:space:]"
+msgstr ""
+
+#: lib/dfa.c:1275
+msgid "unfinished \\ escape"
+msgstr ""
+
+#: lib/dfa.c:1436
+#, fuzzy
+msgid "invalid content of \\{\\}"
+msgstr "Contenu de \\{\\} invalide"
+
+#: lib/dfa.c:1439
+#, fuzzy
+msgid "regular expression too big"
+msgstr "Expression rgulire trop grande"
+
+#: lib/dfa.c:1853
+msgid "unbalanced ("
+msgstr ""
+
+#: lib/dfa.c:1980
+msgid "no syntax specified"
+msgstr ""
+
+#: lib/dfa.c:1988
+msgid "unbalanced )"
+msgstr ""
+
+#: lib/error.c:191
+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 ""
+
+#: lib/getopt.c:654 lib/getopt.c:658
+#, c-format
+msgid "%s: option '--%s' doesn't allow an argument\n"
+msgstr ""
+
+#: 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:715 lib/getopt.c:734
+#, c-format
+msgid "%s: option '--%s' requires an argument\n"
+msgstr ""
+
+#: 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
+#, 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
+#, 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 "Mmoire puise"
+
+#. TRANSLATORS:
+#. Get translations for open and closing quotation marks.
+#. The message catalog should translate "`" to a left
+#. quotation mark suitable for the locale, and similarly for
+#. "'". For example, a French Unicode local should translate
+#. these to U+00AB (LEFT-POINTING DOUBLE ANGLE
+#. QUOTATION MARK), and U+00BB (RIGHT-POINTING DOUBLE ANGLE
+#. QUOTATION MARK), respectively.
+#.
+#. If the catalog has no translation, we will try to
+#. use Unicode U+2018 (LEFT SINGLE QUOTATION MARK) and
+#. Unicode U+2019 (RIGHT SINGLE QUOTATION MARK). If the
+#. current locale is not Unicode, locale_quoting_style
+#. will quote 'like this', and clocale_quoting_style will
+#. quote "like this". You should always include translations
+#. for "`" and "'" even if U+2018 and U+2019 are appropriate
+#. for your locale.
+#.
+#. If you don't know what to put here, please see
+#. <http://en.wikipedia.org/wiki/Quotation_marks_in_other_languages>
+#. and use glyphs suitable for your language.
+#: lib/quotearg.c:354
+msgid "`"
+msgstr ""
+
+#: lib/quotearg.c:355
+msgid "'"
+msgstr ""
+
+#: lib/regcomp.c:135
+msgid "Success"
+msgstr "Succs"
+
+#: lib/regcomp.c:138
+msgid "No match"
+msgstr "Pas de concordance"
+
+#: lib/regcomp.c:141
+msgid "Invalid regular expression"
+msgstr "Expression rgulire invalide"
+
+#: lib/regcomp.c:144
+msgid "Invalid collation character"
+msgstr "Caractre de collation invalide"
+
+#: lib/regcomp.c:147
+msgid "Invalid character class name"
+msgstr "Nom de classe de caractres invalide"
+
+#: lib/regcomp.c:150
+msgid "Trailing backslash"
+msgstr "Antislash de protection"
+
+#: lib/regcomp.c:153
+msgid "Invalid back reference"
+msgstr "Rfrence arrire invalide"
+
+#: lib/regcomp.c:156
+#, fuzzy
+msgid "Unmatched [, [^, [:, [., or [="
+msgstr "[ ou [^ non referm"
+
+#: lib/regcomp.c:159
+msgid "Unmatched ( or \\("
+msgstr "( ou \\( non referm"
+
+#: lib/regcomp.c:162
+msgid "Unmatched \\{"
+msgstr "\\{ non referm"
+
+#: lib/regcomp.c:165
+msgid "Invalid content of \\{\\}"
+msgstr "Contenu de \\{\\} invalide"
+
+#: lib/regcomp.c:168
+msgid "Invalid range end"
+msgstr "Fin d'intervalle invalide"
+
+#: lib/regcomp.c:171
+msgid "Memory exhausted"
+msgstr "Mmoire puise"
+
+#: lib/regcomp.c:174
+msgid "Invalid preceding regular expression"
+msgstr "L'expression rgulire prcdente est invalide"
+
+#: lib/regcomp.c:177
+msgid "Premature end of regular expression"
+msgstr "Fin prmature d'une expression rgulire"
+
+#: lib/regcomp.c:180
+msgid "Regular expression too big"
+msgstr "Expression rgulire trop grande"
+
+#: lib/regcomp.c:183
+msgid "Unmatched ) or \\)"
+msgstr ") ou \\) non referm"
+
+#: lib/regcomp.c:687
+msgid "No previous regular expression"
+msgstr "Pas d'expression rgulire prcdente"
+
+#: lib/set-acl.c:46
+#, c-format
+msgid "setting permissions for %s"
+msgstr ""
+
+#: lib/version-etc.c:74
+#, c-format
+msgid "Packaged by %s (%s)\n"
+msgstr ""
+
+#: lib/version-etc.c:77
+#, c-format
+msgid "Packaged by %s\n"
+msgstr ""
+
+#. 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 ""
+
+#: lib/version-etc.c:86
+msgid ""
+"\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"
+msgstr ""
+
+#. TRANSLATORS: %s denotes an author name.
+#: lib/version-etc.c:102
+#, c-format
+msgid "Written by %s.\n"
+msgstr ""
+
+#. TRANSLATORS: Each %s denotes an author name.
+#: lib/version-etc.c:106
+#, c-format
+msgid "Written by %s and %s.\n"
+msgstr ""
+
+#. TRANSLATORS: Each %s denotes an author name.
+#: lib/version-etc.c:110
+#, c-format
+msgid "Written by %s, %s, and %s.\n"
+msgstr ""
+
+#. TRANSLATORS: Each %s denotes an author name.
+#. You can use line breaks, estimating that each author name occupies
+#. ca. 16 screen columns and that a screen line has ca. 80 columns.
+#: lib/version-etc.c:117
+#, c-format
+msgid ""
+"Written by %s, %s, %s,\n"
+"and %s.\n"
+msgstr ""
+
+#. TRANSLATORS: Each %s denotes an author name.
+#. You can use line breaks, estimating that each author name occupies
+#. ca. 16 screen columns and that a screen line has ca. 80 columns.
+#: lib/version-etc.c:124
+#, c-format
+msgid ""
+"Written by %s, %s, %s,\n"
+"%s, and %s.\n"
+msgstr ""
+
+#. TRANSLATORS: Each %s denotes an author name.
+#. You can use line breaks, estimating that each author name occupies
+#. ca. 16 screen columns and that a screen line has ca. 80 columns.
+#: lib/version-etc.c:131
+#, c-format
+msgid ""
+"Written by %s, %s, %s,\n"
+"%s, %s, and %s.\n"
+msgstr ""
+
+#. TRANSLATORS: Each %s denotes an author name.
+#. You can use line breaks, estimating that each author name occupies
+#. ca. 16 screen columns and that a screen line has ca. 80 columns.
+#: lib/version-etc.c:139
+#, c-format
+msgid ""
+"Written by %s, %s, %s,\n"
+"%s, %s, %s, and %s.\n"
+msgstr ""
+
+#. TRANSLATORS: Each %s denotes an author name.
+#. You can use line breaks, estimating that each author name occupies
+#. ca. 16 screen columns and that a screen line has ca. 80 columns.
+#: lib/version-etc.c:147
+#, c-format
+msgid ""
+"Written by %s, %s, %s,\n"
+"%s, %s, %s, %s,\n"
+"and %s.\n"
+msgstr ""
+
+#. TRANSLATORS: Each %s denotes an author name.
+#. You can use line breaks, estimating that each author name occupies
+#. ca. 16 screen columns and that a screen line has ca. 80 columns.
+#: lib/version-etc.c:156
+#, c-format
+msgid ""
+"Written by %s, %s, %s,\n"
+"%s, %s, %s, %s,\n"
+"%s, and %s.\n"
+msgstr ""
+
+#. TRANSLATORS: Each %s denotes an author name.
+#. You can use line breaks, estimating that each author name occupies
+#. ca. 16 screen columns and that a screen line has ca. 80 columns.
+#: lib/version-etc.c:167
+#, c-format
+msgid ""
+"Written by %s, %s, %s,\n"
+"%s, %s, %s, %s,\n"
+"%s, %s, and others.\n"
+msgstr ""
+
+#. TRANSLATORS: The placeholder indicates the bug-reporting address
+#. for this package. Please add _another line_ saying
+#. "Report translation bugs to <...>\n" with the address for translation
+#. bugs (typically your translation team's web or email address).
+#: lib/version-etc.c:245
+#, c-format
+msgid ""
+"\n"
+"Report bugs to: %s\n"
+msgstr ""
+
+#: lib/version-etc.c:247
+#, c-format
+msgid "Report %s bugs to: %s\n"
+msgstr ""
+
+#: lib/version-etc.c:251
+#, c-format
+msgid "%s home page: <%s>\n"
+msgstr ""
+
+#: lib/version-etc.c:253
+#, c-format
+msgid "%s home page: <http://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"
+msgstr ""
+"Page de GNU sed: <http://www.gnu.org/software/sed/>.\n"
+"Aide gnrale pour utiliser les logiciels GNU: <http://www.gnu.org/help/"
+"gethelp.fr.html>.\n"
+
+#: sed/compile.c:146
msgid "multiple `!'s"
msgstr "`!' multiples"
-#: sed/compile.c:145
+#: sed/compile.c:147
msgid "unexpected `,'"
msgstr "`,' inattendue"
-#: sed/compile.c:146
+#: sed/compile.c:149
msgid "invalid usage of +N or ~N as first address"
msgstr "utilisation invalide de +N ou ~N comme premire adresse"
-#: sed/compile.c:147
+#: sed/compile.c:150
msgid "unmatched `{'"
msgstr "`{' non referme"
-#: sed/compile.c:148
+#: sed/compile.c:151
msgid "unexpected `}'"
msgstr "`}' inattendu"
-#: sed/compile.c:149
+#: sed/compile.c:153
msgid "extra characters after command"
msgstr "caractres inutiles aprs la commande"
-#: sed/compile.c:150
+#: sed/compile.c:155
msgid "expected \\ after `a', `c' or `i'"
msgstr "\\ attendu aprs `a', `c' ou `i'"
-#: sed/compile.c:151
+#: sed/compile.c:157
msgid "`}' doesn't want any addresses"
msgstr "`}' n'a besoin d'aucune adresse"
-#: sed/compile.c:152
+#: sed/compile.c:159
msgid ": doesn't want any addresses"
msgstr ": n'a besoin d'aucune adresse"
-#: sed/compile.c:153
+#: sed/compile.c:161
msgid "comments don't accept any addresses"
msgstr "les commentaires n'acceptent aucune adresse"
-#: sed/compile.c:154
+#: sed/compile.c:162
msgid "missing command"
msgstr "commande manquante"
-#: sed/compile.c:155
+#: sed/compile.c:163
msgid "command only uses one address"
msgstr "la commande n'utilise qu'une adresse"
-#: sed/compile.c:156
+#: sed/compile.c:164
msgid "unterminated address regex"
msgstr "expression rgulire d'adresse inacheve"
-#: sed/compile.c:157
+#: sed/compile.c:165
msgid "unterminated `s' command"
msgstr "commande `s' inacheve"
-#: sed/compile.c:158
+#: sed/compile.c:166
msgid "unterminated `y' command"
msgstr "commande `y' inacheve"
-#: sed/compile.c:159
+#: sed/compile.c:167
msgid "unknown option to `s'"
msgstr "option inconnue pour `s'"
-#: sed/compile.c:160
+#: sed/compile.c:169
msgid "multiple `p' options to `s' command"
msgstr "plusieurs options `p' la commande `s'"
-#: sed/compile.c:161
+#: sed/compile.c:171
msgid "multiple `g' options to `s' command"
msgstr "plusieurs options `g' la commande `s'"
-#: sed/compile.c:162
+#: sed/compile.c:173
msgid "multiple number options to `s' command"
msgstr "plusieurs options numriques la commande `s'"
-#: sed/compile.c:163
+#: 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"
-#: sed/compile.c:164
+#: sed/compile.c:177
msgid "strings for `y' command are different lengths"
msgstr "les chanes destines la commande `y' ont des longueurs diffrentes"
-#: sed/compile.c:165
+#: 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"
-#: sed/compile.c:166
+#: sed/compile.c:181
msgid "expected newer version of sed"
msgstr "une version plus rcente de sed est attendue"
-#: sed/compile.c:167
+#: sed/compile.c:183
msgid "invalid usage of line address 0"
msgstr "utilisation invalide de l'adresse de ligne 0"
-#: sed/compile.c:168
+#: sed/compile.c:184
#, c-format
msgid "unknown command: `%c'"
msgstr "commande inconnue: `%c'"
-#: sed/compile.c:169
+#: sed/compile.c:186
#, fuzzy
msgid "incomplete command"
msgstr "commande manquante"
-#: sed/compile.c:192
+#: sed/compile.c:188
+msgid "\":\" lacks a label"
+msgstr ""
+
+#: sed/compile.c:190
+msgid "recursive escaping after \\c not allowed"
+msgstr ""
+
+#: sed/compile.c:213
#, c-format
msgid "%s: file %s line %lu: %s\n"
msgstr "%s: fichier %s ligne %lu: %s\n"
-#: sed/compile.c:195
+#: 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"
-#: sed/compile.c:1657
+#: sed/compile.c:1639
#, c-format
msgid "can't find label for jump to `%s'"
msgstr "impossible de trouver l'tiquette pour sauter `%s'"
-#: sed/execute.c:595
+#: sed/execute.c:264 sed/execute.c:281
+#, c-format
+msgid "case conversion produced an invalid character"
+msgstr ""
+
+#: sed/execute.c:575
#, c-format
msgid "%s: can't read %s: %s\n"
msgstr "%s: impossible de lire %s: %s\n"
-#: sed/execute.c:624
+#: sed/execute.c:600
#, c-format
msgid "couldn't edit %s: is a terminal"
msgstr "impossible d'diter %s: est un terminal"
-#: sed/execute.c:629
+#: sed/execute.c:605
#, c-format
msgid "couldn't edit %s: not a regular file"
msgstr "impossible d'diter %s: ce n'est pas un fichier rgulier"
-#: sed/execute.c:640
+#: sed/execute.c:616
#, 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"
-#: sed/execute.c:647
+#: sed/execute.c:624
#, 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"
-#: sed/execute.c:664 sed/utils.c:211
+#: sed/execute.c:643 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:1193 sed/execute.c:1373
+#: sed/execute.c:1158 sed/execute.c:1368
msgid "error in subprocess"
msgstr "erreur dans le sous-processus"
-#: sed/execute.c:1195
+#: sed/execute.c:1160
msgid "option `e' not supported"
msgstr "l'option `e' n'est pas supporte"
-#: sed/execute.c:1375
+#: sed/execute.c:1349
msgid "`e' command not supported"
msgstr "la commande `e' n'est pas supporte"
-#: sed/execute.c:1725
+#: sed/execute.c:1675
msgid "no input files"
msgstr "pas de fichier d'entre"
-#: sed/regexp.c:39
+#: sed/regexp.c:38
msgid "no previous regular expression"
msgstr "pas d'expression rgulire prcdente"
-#: sed/regexp.c:40
-msgid "cannot specify modifiers on empty regexp"
-msgstr ""
-"impossible de spcifier des modifieurs sur une expression\n"
-"rationnelle vide"
-
-#: sed/regexp.c:129
+#: sed/regexp.c:138
#, c-format
msgid "invalid reference \\%d on `s' command's RHS"
msgstr "rfrence \\%d invalide dans le ct droit de la commande `s'"
-#: sed/sed.c:32
+#: sed/sed.c:35
msgid "Jay Fenlason"
msgstr ""
-#: sed/sed.c:33
+#: sed/sed.c:36
msgid "Tom Lord"
msgstr ""
-#: sed/sed.c:34
+#: sed/sed.c:37
msgid "Ken Pizzini"
msgstr ""
-#: sed/sed.c:35
+#: sed/sed.c:38
msgid "Paolo Bonzini"
msgstr ""
-#: sed/sed.c:79
+#: sed/sed.c:113
#, c-format
msgid ""
"GNU sed home page: <http://www.gnu.org/software/sed/>.\n"
@@ -232,17 +618,12 @@ msgstr ""
"Aide gnrale pour utiliser les logiciels GNU: <http://www.gnu.org/help/"
"gethelp.fr.html>.\n"
-#: sed/sed.c:86
+#: sed/sed.c:120
#, c-format
-msgid ""
-"E-mail bug reports to: <%s>.\n"
-"Be sure to include the word ``%s'' somewhere in the ``Subject:'' field.\n"
+msgid "E-mail bug reports to: <%s>.\n"
msgstr ""
-"Rapporter toutes anomalies : <%s>.\n"
-"N'oubliez pas d'inclure le mot ``%s'' quelque-part dans la zone "
-"``Subject:''.\n"
-#: sed/sed.c:99
+#: sed/sed.c:129
msgid ""
" -R, --regexp-perl\n"
" use Perl 5's regular expressions syntax in the script.\n"
@@ -251,7 +632,7 @@ msgstr ""
" utiliser la syntaxe des expressions rgulires\n"
" de Perl 5 dans le script.\n"
-#: sed/sed.c:104
+#: sed/sed.c:134
#, c-format
msgid ""
"Usage: %s [OPTION]... {script-only-if-no-other-script} [input-file]...\n"
@@ -261,7 +642,7 @@ msgstr ""
"[fichier-d'entre]...\n"
"\n"
-#: sed/sed.c:108
+#: sed/sed.c:138
#, c-format
msgid ""
" -n, --quiet, --silent\n"
@@ -270,7 +651,7 @@ msgstr ""
" -n, --quiet, --silent\n"
" supprimer l'criture automatique de l'espace des motifs\n"
-#: sed/sed.c:110
+#: sed/sed.c:140
#, c-format
msgid ""
" -e script, --expression=script\n"
@@ -279,7 +660,7 @@ msgstr ""
" -e script, --expression=script\n"
" ajouter le script aux commandes tre excutes\n"
-#: sed/sed.c:112
+#: sed/sed.c:142
#, c-format
msgid ""
" -f script-file, --file=script-file\n"
@@ -290,7 +671,7 @@ msgstr ""
" ajouter le contenu de fichier-script aux commandes\n"
" tre excutes\n"
-#: sed/sed.c:115
+#: sed/sed.c:146
#, c-format
msgid ""
" --follow-symlinks\n"
@@ -299,7 +680,7 @@ msgstr ""
" --follow-symlinks\n"
" suivre les liens symboliques pendant le traitement\n"
-#: sed/sed.c:118
+#: sed/sed.c:149
#, fuzzy, c-format
msgid ""
" -i[SUFFIX], --in-place[=SUFFIX]\n"
@@ -309,7 +690,7 @@ msgstr ""
" diter les fichiers leur place (fait une\n"
" sauvegarde si l'extension est fournie)\n"
-#: sed/sed.c:121
+#: sed/sed.c:153
#, c-format
msgid ""
" -b, --binary\n"
@@ -320,7 +701,7 @@ msgstr ""
" ouvrir les fichiers en mode binaire (CR+LF ne sont pas "
"traits comme une exception)\n"
-#: sed/sed.c:124
+#: sed/sed.c:157
#, c-format
msgid ""
" -l N, --line-length=N\n"
@@ -330,7 +711,7 @@ msgstr ""
" spcifier la longueur de coupure de ligne dsire pour la\n"
" commande `l'\n"
-#: sed/sed.c:126
+#: sed/sed.c:159
#, c-format
msgid ""
" --posix\n"
@@ -339,29 +720,36 @@ msgstr ""
" --posix\n"
" dsactiver toutes les extensions GNU.\n"
-#: sed/sed.c:128
-#, c-format
+#: sed/sed.c:161
+#, fuzzy, c-format
msgid ""
-" -r, --regexp-extended\n"
-" use extended regular expressions in the script.\n"
+" -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"
-#: sed/sed.c:133
-#, c-format
+#: sed/sed.c:167
+#, fuzzy, c-format
msgid ""
" -s, --separate\n"
-" consider files as separate rather than as a single "
-"continuous\n"
-" long stream.\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"
" simple flux long et continu.\n"
-#: sed/sed.c:136
+#: sed/sed.c:170
+#, c-format
+msgid ""
+" --sandbox\n"
+" operate in sandbox mode.\n"
+msgstr ""
+
+#: sed/sed.c:172
#, c-format
msgid ""
" -u, --unbuffered\n"
@@ -374,25 +762,25 @@ msgstr ""
" fichiers d'entre et librer les tampons de sortie plus\n"
" souvent\n"
-#: sed/sed.c:139
+#: sed/sed.c:175
#, c-format
msgid ""
" -z, --null-data\n"
" separate lines by NUL characters\n"
msgstr ""
-#: sed/sed.c:141
+#: sed/sed.c:177
#, c-format
msgid " --help display this help and exit\n"
msgstr " --help afficher cette aide et sortir\n"
-#: sed/sed.c:142
+#: sed/sed.c:178
#, c-format
msgid " --version output version information and exit\n"
msgstr ""
" --version afficher les informations de version du logiciel et sortir\n"
-#: sed/sed.c:143
+#: sed/sed.c:179
#, c-format
msgid ""
"\n"
@@ -409,119 +797,60 @@ msgstr ""
"d'entre; si aucun fichier d'entre n'est spcifie, l'entre standard\n"
"est lue.\n"
-#: sed/utils.c:74 sed/utils.c:432
+#: sed/utils.c:73 sed/utils.c:384
#, c-format
msgid "cannot remove %s: %s"
msgstr "impossible de supprimer %s: %s"
-#: sed/utils.c:144
+#: sed/utils.c:136
#, c-format
msgid "couldn't open file %s: %s"
msgstr "impossible d'ouvrir le fichier %s: %s"
-#: sed/utils.c:167
+#: sed/utils.c:155
#, c-format
msgid "couldn't attach to %s: %s"
msgstr "impossible d'attacher %s: %s"
-#: sed/utils.c:229
-#, c-format
-msgid "couldn't write %d item to %s: %s"
-msgid_plural "couldn't write %d items to %s: %s"
+#: sed/utils.c:192
+#, fuzzy, 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"
-#: sed/utils.c:244 sed/utils.c:267
+#: sed/utils.c:204 sed/utils.c:223
#, c-format
msgid "read error on %s: %s"
msgstr "erreur de lecture sur %s: %s"
-#: sed/utils.c:372
+#: sed/utils.c:325
#, c-format
msgid "couldn't follow symlink %s: %s"
msgstr "impossible de suivre le lien symbolique %s: %s"
-#: sed/utils.c:406
+#: sed/utils.c:359
#, c-format
msgid "cannot stat %s: %s"
msgstr "impossible de faire un appel systme \"stat\" sur le fichier %s: %s"
-#: sed/utils.c:437
+#: sed/utils.c:389
#, c-format
msgid "cannot rename %s: %s"
msgstr "impossible de renommer %s: %s"
-#: lib/regcomp.c:132
-msgid "Success"
-msgstr "Succs"
-
-#: lib/regcomp.c:135
-msgid "No match"
-msgstr "Pas de concordance"
-
-#: lib/regcomp.c:138
-msgid "Invalid regular expression"
-msgstr "Expression rgulire invalide"
-
-#: lib/regcomp.c:141
-msgid "Invalid collation character"
-msgstr "Caractre de collation invalide"
-
-#: lib/regcomp.c:144
-msgid "Invalid character class name"
-msgstr "Nom de classe de caractres invalide"
-
-#: lib/regcomp.c:147
-msgid "Trailing backslash"
-msgstr "Antislash de protection"
-
-#: lib/regcomp.c:150
-msgid "Invalid back reference"
-msgstr "Rfrence arrire invalide"
-
-#: lib/regcomp.c:153
-msgid "Unmatched [ or [^"
-msgstr "[ ou [^ non referm"
-
-#: lib/regcomp.c:156
-msgid "Unmatched ( or \\("
-msgstr "( ou \\( non referm"
-
-#: lib/regcomp.c:159
-msgid "Unmatched \\{"
-msgstr "\\{ non referm"
-
-#: lib/regcomp.c:162
-msgid "Invalid content of \\{\\}"
-msgstr "Contenu de \\{\\} invalide"
-
-#: lib/regcomp.c:165
-msgid "Invalid range end"
-msgstr "Fin d'intervalle invalide"
-
-#: lib/regcomp.c:168
-msgid "Memory exhausted"
-msgstr "Mmoire puise"
-
-#: lib/regcomp.c:171
-msgid "Invalid preceding regular expression"
-msgstr "L'expression rgulire prcdente est invalide"
-
-#: lib/regcomp.c:174
-msgid "Premature end of regular expression"
-msgstr "Fin prmature d'une expression rgulire"
-
-#: lib/regcomp.c:177
-msgid "Regular expression too big"
-msgstr "Expression rgulire trop grande"
-
-#: lib/regcomp.c:180
-msgid "Unmatched ) or \\)"
-msgstr ") ou \\) non referm"
+#~ msgid "cannot specify modifiers on empty regexp"
+#~ msgstr ""
+#~ "impossible de spcifier des modifieurs sur une expression\n"
+#~ "rationnelle vide"
-#: lib/regcomp.c:705
-msgid "No previous regular expression"
-msgstr "Pas d'expression rgulire prcdente"
+#~ 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"
+#~ "N'oubliez pas d'inclure le mot ``%s'' quelque-part dans la zone "
+#~ "``Subject:''.\n"
#~ msgid "super-sed version %s\n"
#~ msgstr "super-sed version %s\n"
diff --git a/po/ga.gmo b/po/ga.gmo
index 0938c10..de00219 100644
--- a/po/ga.gmo
+++ b/po/ga.gmo
Binary files differ
diff --git a/po/ga.po b/po/ga.po
index 94d3a80..c588dfc 100644
--- a/po/ga.po
+++ b/po/ga.po
@@ -6,7 +6,7 @@ msgid ""
msgstr ""
"Project-Id-Version: sed 4.2.0\n"
"Report-Msgid-Bugs-To: bug-gnu-utils@gnu.org\n"
-"POT-Creation-Date: 2012-12-22 14:36+0100\n"
+"POT-Creation-Date: 2016-12-30 00:59-0800\n"
"PO-Revision-Date: 2008-01-13 11:04-0500\n"
"Last-Translator: Kevin Scannell <kscanne@gmail.com>\n"
"Language-Team: Irish <gaeilge-gnulinux@lists.sourceforge.net>\n"
@@ -14,224 +14,605 @@ msgstr ""
"MIME-Version: 1.0\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=5; plural=n==1 ? 0 : n==2 ? 1 : (n>2 && n<7) ? 2 :"
"(n>6 && n<11) ? 3 : 4;\n"
-#: sed/compile.c:144
+#: lib/closeout.c:112
+msgid "write error"
+msgstr ""
+
+#: lib/copy-acl.c:54
+#, c-format
+msgid "preserving permissions for %s"
+msgstr ""
+
+#: lib/dfa.c:1025 lib/dfa.c:1028 lib/dfa.c:1047 lib/dfa.c:1057 lib/dfa.c:1070
+#: lib/dfa.c:1098 lib/dfa.c:1107 lib/dfa.c:1110 lib/dfa.c:1115 lib/dfa.c:1137
+#: lib/dfa.c:1140
+msgid "unbalanced ["
+msgstr ""
+
+#: lib/dfa.c:1083
+#, fuzzy
+msgid "invalid character class"
+msgstr "Ainm neamhbhailí ar aicme charachtar"
+
+#: lib/dfa.c:1206
+msgid "character class syntax is [[:space:]], not [:space:]"
+msgstr ""
+
+#: lib/dfa.c:1275
+msgid "unfinished \\ escape"
+msgstr ""
+
+#: lib/dfa.c:1436
+#, fuzzy
+msgid "invalid content of \\{\\}"
+msgstr "Ábhar neamhbhailí idir \\{\\}"
+
+#: lib/dfa.c:1439
+#, fuzzy
+msgid "regular expression too big"
+msgstr "Slonn ionadaíochta rómhór"
+
+#: lib/dfa.c:1853
+msgid "unbalanced ("
+msgstr ""
+
+#: lib/dfa.c:1980
+msgid "no syntax specified"
+msgstr ""
+
+#: lib/dfa.c:1988
+msgid "unbalanced )"
+msgstr ""
+
+#: lib/error.c:191
+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 ""
+
+#: lib/getopt.c:654 lib/getopt.c:658
+#, c-format
+msgid "%s: option '--%s' doesn't allow an argument\n"
+msgstr ""
+
+#: 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:715 lib/getopt.c:734
+#, c-format
+msgid "%s: option '--%s' requires an argument\n"
+msgstr ""
+
+#: 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
+#, 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
+#, 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 "Cuimhne ídithe"
+
+#. TRANSLATORS:
+#. Get translations for open and closing quotation marks.
+#. The message catalog should translate "`" to a left
+#. quotation mark suitable for the locale, and similarly for
+#. "'". For example, a French Unicode local should translate
+#. these to U+00AB (LEFT-POINTING DOUBLE ANGLE
+#. QUOTATION MARK), and U+00BB (RIGHT-POINTING DOUBLE ANGLE
+#. QUOTATION MARK), respectively.
+#.
+#. If the catalog has no translation, we will try to
+#. use Unicode U+2018 (LEFT SINGLE QUOTATION MARK) and
+#. Unicode U+2019 (RIGHT SINGLE QUOTATION MARK). If the
+#. current locale is not Unicode, locale_quoting_style
+#. will quote 'like this', and clocale_quoting_style will
+#. quote "like this". You should always include translations
+#. for "`" and "'" even if U+2018 and U+2019 are appropriate
+#. for your locale.
+#.
+#. If you don't know what to put here, please see
+#. <http://en.wikipedia.org/wiki/Quotation_marks_in_other_languages>
+#. and use glyphs suitable for your language.
+#: lib/quotearg.c:354
+msgid "`"
+msgstr ""
+
+#: lib/quotearg.c:355
+msgid "'"
+msgstr ""
+
+#: lib/regcomp.c:135
+msgid "Success"
+msgstr "D'éirigh leis"
+
+#: lib/regcomp.c:138
+msgid "No match"
+msgstr "Níl a leithéid ann"
+
+#: lib/regcomp.c:141
+msgid "Invalid regular expression"
+msgstr "Slonn ionadaíochta neamhbhailí"
+
+#: lib/regcomp.c:144
+msgid "Invalid collation character"
+msgstr "Carachtar neamhbhailí comhordaithe"
+
+#: lib/regcomp.c:147
+msgid "Invalid character class name"
+msgstr "Ainm neamhbhailí ar aicme charachtar"
+
+#: lib/regcomp.c:150
+msgid "Trailing backslash"
+msgstr "Cúlslais ag deireadh"
+
+# coinage - KPS
+#: lib/regcomp.c:153
+msgid "Invalid back reference"
+msgstr "Cúltagairt neamhbhailí"
+
+#: lib/regcomp.c:156
+#, fuzzy
+msgid "Unmatched [, [^, [:, [., or [="
+msgstr "[ nó [^ corr"
+
+#: lib/regcomp.c:159
+msgid "Unmatched ( or \\("
+msgstr "( nó \\( corr"
+
+#: lib/regcomp.c:162
+msgid "Unmatched \\{"
+msgstr "\\{ corr"
+
+#: lib/regcomp.c:165
+msgid "Invalid content of \\{\\}"
+msgstr "Ábhar neamhbhailí idir \\{\\}"
+
+#: lib/regcomp.c:168
+msgid "Invalid range end"
+msgstr "Deireadh raoin neamhbhailí"
+
+#: lib/regcomp.c:171
+msgid "Memory exhausted"
+msgstr "Cuimhne ídithe"
+
+#: lib/regcomp.c:174
+msgid "Invalid preceding regular expression"
+msgstr "Is neamhbhailí an slonn ionadaíochta roimhe seo"
+
+#: lib/regcomp.c:177
+msgid "Premature end of regular expression"
+msgstr "Deireadh le slonn ionadaíochta gan choinne"
+
+#: lib/regcomp.c:180
+msgid "Regular expression too big"
+msgstr "Slonn ionadaíochta rómhór"
+
+#: lib/regcomp.c:183
+msgid "Unmatched ) or \\)"
+msgstr ") nó \\) corr"
+
+#: lib/regcomp.c:687
+msgid "No previous regular expression"
+msgstr "Níl aon slonn ionadaíochta roimhe seo"
+
+#: lib/set-acl.c:46
+#, c-format
+msgid "setting permissions for %s"
+msgstr ""
+
+#: lib/version-etc.c:74
+#, c-format
+msgid "Packaged by %s (%s)\n"
+msgstr ""
+
+#: lib/version-etc.c:77
+#, c-format
+msgid "Packaged by %s\n"
+msgstr ""
+
+#. 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 ""
+
+#: lib/version-etc.c:86
+msgid ""
+"\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"
+msgstr ""
+
+#. TRANSLATORS: %s denotes an author name.
+#: lib/version-etc.c:102
+#, c-format
+msgid "Written by %s.\n"
+msgstr ""
+
+#. TRANSLATORS: Each %s denotes an author name.
+#: lib/version-etc.c:106
+#, c-format
+msgid "Written by %s and %s.\n"
+msgstr ""
+
+#. TRANSLATORS: Each %s denotes an author name.
+#: lib/version-etc.c:110
+#, c-format
+msgid "Written by %s, %s, and %s.\n"
+msgstr ""
+
+#. TRANSLATORS: Each %s denotes an author name.
+#. You can use line breaks, estimating that each author name occupies
+#. ca. 16 screen columns and that a screen line has ca. 80 columns.
+#: lib/version-etc.c:117
+#, c-format
+msgid ""
+"Written by %s, %s, %s,\n"
+"and %s.\n"
+msgstr ""
+
+#. TRANSLATORS: Each %s denotes an author name.
+#. You can use line breaks, estimating that each author name occupies
+#. ca. 16 screen columns and that a screen line has ca. 80 columns.
+#: lib/version-etc.c:124
+#, c-format
+msgid ""
+"Written by %s, %s, %s,\n"
+"%s, and %s.\n"
+msgstr ""
+
+#. TRANSLATORS: Each %s denotes an author name.
+#. You can use line breaks, estimating that each author name occupies
+#. ca. 16 screen columns and that a screen line has ca. 80 columns.
+#: lib/version-etc.c:131
+#, c-format
+msgid ""
+"Written by %s, %s, %s,\n"
+"%s, %s, and %s.\n"
+msgstr ""
+
+#. TRANSLATORS: Each %s denotes an author name.
+#. You can use line breaks, estimating that each author name occupies
+#. ca. 16 screen columns and that a screen line has ca. 80 columns.
+#: lib/version-etc.c:139
+#, c-format
+msgid ""
+"Written by %s, %s, %s,\n"
+"%s, %s, %s, and %s.\n"
+msgstr ""
+
+#. TRANSLATORS: Each %s denotes an author name.
+#. You can use line breaks, estimating that each author name occupies
+#. ca. 16 screen columns and that a screen line has ca. 80 columns.
+#: lib/version-etc.c:147
+#, c-format
+msgid ""
+"Written by %s, %s, %s,\n"
+"%s, %s, %s, %s,\n"
+"and %s.\n"
+msgstr ""
+
+#. TRANSLATORS: Each %s denotes an author name.
+#. You can use line breaks, estimating that each author name occupies
+#. ca. 16 screen columns and that a screen line has ca. 80 columns.
+#: lib/version-etc.c:156
+#, c-format
+msgid ""
+"Written by %s, %s, %s,\n"
+"%s, %s, %s, %s,\n"
+"%s, and %s.\n"
+msgstr ""
+
+#. TRANSLATORS: Each %s denotes an author name.
+#. You can use line breaks, estimating that each author name occupies
+#. ca. 16 screen columns and that a screen line has ca. 80 columns.
+#: lib/version-etc.c:167
+#, c-format
+msgid ""
+"Written by %s, %s, %s,\n"
+"%s, %s, %s, %s,\n"
+"%s, %s, and others.\n"
+msgstr ""
+
+#. TRANSLATORS: The placeholder indicates the bug-reporting address
+#. for this package. Please add _another line_ saying
+#. "Report translation bugs to <...>\n" with the address for translation
+#. bugs (typically your translation team's web or email address).
+#: lib/version-etc.c:245
+#, c-format
+msgid ""
+"\n"
+"Report bugs to: %s\n"
+msgstr ""
+
+#: lib/version-etc.c:247
+#, c-format
+msgid "Report %s bugs to: %s\n"
+msgstr ""
+
+#: lib/version-etc.c:251
+#, c-format
+msgid "%s home page: <%s>\n"
+msgstr ""
+
+#: lib/version-etc.c:253
+#, c-format
+msgid "%s home page: <http://www.gnu.org/software/%s/>\n"
+msgstr ""
+
+#: lib/version-etc.c:256
+msgid "General help using GNU software: <http://www.gnu.org/gethelp/>\n"
+msgstr ""
+
+#: sed/compile.c:146
msgid "multiple `!'s"
msgstr "`!'-anna iomadúla"
-#: sed/compile.c:145
+#: sed/compile.c:147
msgid "unexpected `,'"
msgstr "`,' gan choinne"
-#: sed/compile.c:146
+#: sed/compile.c:149
msgid "invalid usage of +N or ~N as first address"
msgstr "ní féidir +N nó ~N a úsáid mar an chéad seoladh"
-#: sed/compile.c:147
+#: sed/compile.c:150
msgid "unmatched `{'"
msgstr "`{' corr"
-#: sed/compile.c:148
+#: sed/compile.c:151
msgid "unexpected `}'"
msgstr "`}' gan choinne"
-#: sed/compile.c:149
+#: sed/compile.c:153
msgid "extra characters after command"
msgstr "carachtair breise i ndiaidh an ordaithe"
-#: sed/compile.c:150
+#: sed/compile.c:155
msgid "expected \\ after `a', `c' or `i'"
msgstr "bhíothas ag súil le \\ i ndiaidh `a', `c', nó `i'"
-#: sed/compile.c:151
+#: sed/compile.c:157
msgid "`}' doesn't want any addresses"
msgstr "Níl fáilte roimh sheoltaí le `}'"
-#: sed/compile.c:152
+#: sed/compile.c:159
msgid ": doesn't want any addresses"
msgstr "Níl fáilte roimh sheoltaí le `:'"
-#: sed/compile.c:153
+#: sed/compile.c:161
msgid "comments don't accept any addresses"
msgstr "níl fáilte roimh sheoltaí le nótaí tráchta"
-#: sed/compile.c:154
+#: sed/compile.c:162
msgid "missing command"
msgstr "ordú ar iarraidh"
-#: sed/compile.c:155
+#: sed/compile.c:163
msgid "command only uses one address"
msgstr "ní úsáidtear an t-ordú ach seoladh amháin"
-#: sed/compile.c:156
+#: sed/compile.c:164
msgid "unterminated address regex"
msgstr "seoladh regex gan chríochnú"
-#: sed/compile.c:157
+#: sed/compile.c:165
msgid "unterminated `s' command"
msgstr "ordú `s' gan chríochnú"
-#: sed/compile.c:158
+#: sed/compile.c:166
msgid "unterminated `y' command"
msgstr "ordú `y' gan chríochnú"
-#: sed/compile.c:159
+#: sed/compile.c:167
msgid "unknown option to `s'"
msgstr "rogha anaithnid i ndiaidh `s'"
-#: sed/compile.c:160
+#: sed/compile.c:169
msgid "multiple `p' options to `s' command"
msgstr "an iomarca roghanna `p' i ndiaidh `s'"
-#: sed/compile.c:161
+#: sed/compile.c:171
msgid "multiple `g' options to `s' command"
msgstr "an iomarca roghanna `g' i ndiaidh `s'"
-#: sed/compile.c:162
+#: sed/compile.c:173
msgid "multiple number options to `s' command"
msgstr "an iomarca roghanna uimhriúla i ndiaidh `s'"
-#: sed/compile.c:163
+#: sed/compile.c:175
msgid "number option to `s' command may not be zero"
msgstr "ní cheadaítear nialas mar rogha uimhriúil leis an ordú `s'"
-#: sed/compile.c:164
+#: sed/compile.c:177
msgid "strings for `y' command are different lengths"
msgstr "níl aon fhad amháin ar na teaghráin leis an ordú `y'"
-#: sed/compile.c:165
+#: sed/compile.c:179
msgid "delimiter character is not a single-byte character"
msgstr "tá an teormharcóir ina charachtar ilbheart"
-#: sed/compile.c:166
+#: sed/compile.c:181
msgid "expected newer version of sed"
msgstr "bhíothas ag súil le leagan `sed' níos úire"
-#: sed/compile.c:167
+#: sed/compile.c:183
msgid "invalid usage of line address 0"
msgstr "ní féidir an seoladh líne 0 a úsáid"
-#: sed/compile.c:168
+#: sed/compile.c:184
#, c-format
msgid "unknown command: `%c'"
msgstr "ordú anaithnid: `%c'"
-#: sed/compile.c:169
+#: sed/compile.c:186
#, fuzzy
msgid "incomplete command"
msgstr "ordú ar iarraidh"
-#: sed/compile.c:192
+#: sed/compile.c:188
+msgid "\":\" lacks a label"
+msgstr ""
+
+#: sed/compile.c:190
+msgid "recursive escaping after \\c not allowed"
+msgstr ""
+
+#: sed/compile.c:213
#, c-format
msgid "%s: file %s line %lu: %s\n"
msgstr "%s: comhad %s líne %lu: %s\n"
-#: sed/compile.c:195
+#: sed/compile.c:216
#, c-format
msgid "%s: -e expression #%lu, char %lu: %s\n"
msgstr "%s: -e slonn #%lu, char %lu: %s\n"
-#: sed/compile.c:1657
+#: sed/compile.c:1639
#, 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:595
+#: sed/execute.c:264 sed/execute.c:281
+#, c-format
+msgid "case conversion produced an invalid character"
+msgstr ""
+
+#: sed/execute.c:575
#, 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:624
+#: sed/execute.c:600
#, 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:629
+#: sed/execute.c:605
#, 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:640
+#: sed/execute.c:616
#, c-format
msgid "%s: warning: failed to set default file creation context to %s: %s"
msgstr ""
-#: sed/execute.c:647
+#: sed/execute.c:624
#, c-format
msgid "%s: warning: failed to get security context of %s: %s"
msgstr ""
-#: sed/execute.c:664 sed/utils.c:211
+#: sed/execute.c:643 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:1193 sed/execute.c:1373
+#: sed/execute.c:1158 sed/execute.c:1368
msgid "error in subprocess"
msgstr "earráid i bhfo-phróiseas"
-#: sed/execute.c:1195
+#: sed/execute.c:1160
msgid "option `e' not supported"
msgstr "níl an rogha `e' ar fáil"
-#: sed/execute.c:1375
+#: sed/execute.c:1349
msgid "`e' command not supported"
msgstr "níl an t-ordú `e' ar fáil"
-#: sed/execute.c:1725
+#: sed/execute.c:1675
msgid "no input files"
msgstr "gan inchomhad"
-#: sed/regexp.c:39
+#: sed/regexp.c:38
msgid "no previous regular expression"
msgstr "níl aon slonn ionadaíochta roimhe seo"
-#: sed/regexp.c:40
-msgid "cannot specify modifiers on empty regexp"
-msgstr "ní féidir mionathraitheoirí a shonrú le slonn bán"
-
-#: sed/regexp.c:129
+#: sed/regexp.c:138
#, c-format
msgid "invalid reference \\%d on `s' command's RHS"
msgstr "tagairt neamhbhailí \\%d ar dheis ordú `s'"
-#: sed/sed.c:32
+#: sed/sed.c:35
msgid "Jay Fenlason"
msgstr ""
-#: sed/sed.c:33
+#: sed/sed.c:36
msgid "Tom Lord"
msgstr ""
-#: sed/sed.c:34
+#: sed/sed.c:37
msgid "Ken Pizzini"
msgstr ""
-#: sed/sed.c:35
+#: sed/sed.c:38
msgid "Paolo Bonzini"
msgstr ""
-#: sed/sed.c:79
+#: 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"
msgstr ""
-#: sed/sed.c:86
-#, fuzzy, c-format
-msgid ""
-"E-mail bug reports to: <%s>.\n"
-"Be sure to include the word ``%s'' somewhere in the ``Subject:'' field.\n"
+#: sed/sed.c:120
+#, c-format
+msgid "E-mail bug reports to: <%s>.\n"
msgstr ""
-"Seol tuairiscí fabhtanna chuig: %s .\n"
-"Cuir an focal ``%s'' áit éigin sa líne ``Subject:'' le do thoil.\n"
-#: sed/sed.c:99
+#: sed/sed.c:129
msgid ""
" -R, --regexp-perl\n"
" use Perl 5's regular expressions syntax in the script.\n"
@@ -239,7 +620,7 @@ msgstr ""
" -R, --regexp-perl\n"
" bain úsáid as sloinn ionadaíochta atá ag Perl 5.\n"
-#: sed/sed.c:104
+#: sed/sed.c:134
#, c-format
msgid ""
"Usage: %s [OPTION]... {script-only-if-no-other-script} [input-file]...\n"
@@ -248,7 +629,7 @@ msgstr ""
"Úsáid: %s [ROGHA]... {script-mura-bhfuil-script-eile} [inchomhad]...\n"
"\n"
-#: sed/sed.c:108
+#: sed/sed.c:138
#, c-format
msgid ""
" -n, --quiet, --silent\n"
@@ -257,7 +638,7 @@ msgstr ""
" -n, --quiet, --silent\n"
" stop priontáil uathoibríoch den spás patrúin\n"
-#: sed/sed.c:110
+#: sed/sed.c:140
#, c-format
msgid ""
" -e script, --expression=script\n"
@@ -266,7 +647,7 @@ msgstr ""
" -e script, --expression=script\n"
" cuir an script leis na horduithe le rith\n"
-#: sed/sed.c:112
+#: sed/sed.c:142
#, c-format
msgid ""
" -f script-file, --file=script-file\n"
@@ -276,7 +657,7 @@ msgstr ""
" -f comhad-script, --file=comhad-script\n"
" cuir na línte i `comhad-script' leis na horduithe le rith\n"
-#: sed/sed.c:115
+#: sed/sed.c:146
#, c-format
msgid ""
" --follow-symlinks\n"
@@ -286,7 +667,7 @@ msgstr ""
" lean naisc shiombalacha má phróiseáiltear an comhad san\n"
" áit a bhfuil sé\n"
-#: sed/sed.c:118
+#: sed/sed.c:149
#, fuzzy, c-format
msgid ""
" -i[SUFFIX], --in-place[=SUFFIX]\n"
@@ -296,7 +677,7 @@ msgstr ""
" cuir eagar ar chomhaid san áit a bhfuil siad (agus déan\n"
" cúltaca má thugtar IARMHÍR)\n"
-#: sed/sed.c:121
+#: sed/sed.c:153
#, c-format
msgid ""
" -b, --binary\n"
@@ -308,7 +689,7 @@ msgstr ""
"+LFanna\n"
" ar bhealach speisialta)\n"
-#: sed/sed.c:124
+#: sed/sed.c:157
#, c-format
msgid ""
" -l N, --line-length=N\n"
@@ -317,7 +698,7 @@ msgstr ""
" -l N, --line-length=N\n"
" ceap an fad timfhillte le haghaidh an ordaithe `l'\n"
-#: sed/sed.c:126
+#: sed/sed.c:159
#, c-format
msgid ""
" --posix\n"
@@ -326,27 +707,34 @@ msgstr ""
" --posix\n"
" díchumasaigh gach feabhsúchán GNU.\n"
-#: sed/sed.c:128
-#, c-format
+#: sed/sed.c:161
+#, fuzzy, c-format
msgid ""
-" -r, --regexp-extended\n"
-" use extended regular expressions in the script.\n"
+" -E, -r, --regexp-extended\n"
+" use extended regular expressions in the script\n"
+" (for portability use POSIX -E).\n"
msgstr ""
" -r, --regexp-extended\n"
" úsáid sloinn ionadaíochta feabhsaithe sa script.\n"
-#: sed/sed.c:133
-#, c-format
+#: sed/sed.c:167
+#, fuzzy, c-format
msgid ""
" -s, --separate\n"
-" consider files as separate rather than as a single "
-"continuous\n"
-" long stream.\n"
+" consider files as separate rather than as a single,\n"
+" continuous long stream.\n"
msgstr ""
" -s, --separate\n"
" féach ar chomhaid ina leith seachas mar shruth leanúnach.\n"
-#: sed/sed.c:136
+#: sed/sed.c:170
+#, c-format
+msgid ""
+" --sandbox\n"
+" operate in sandbox mode.\n"
+msgstr ""
+
+#: sed/sed.c:172
#, c-format
msgid ""
" -u, --unbuffered\n"
@@ -359,24 +747,24 @@ msgstr ""
"sruthlaigh\n"
" na maoláin aschuir níos minice\n"
-#: sed/sed.c:139
+#: sed/sed.c:175
#, c-format
msgid ""
" -z, --null-data\n"
" separate lines by NUL characters\n"
msgstr ""
-#: sed/sed.c:141
+#: sed/sed.c:177
#, c-format
msgid " --help display this help and exit\n"
msgstr " --help taispeáin an chabhair seo agus scoir\n"
-#: sed/sed.c:142
+#: sed/sed.c:178
#, c-format
msgid " --version output version information and exit\n"
msgstr " --version taispeáin eolas faoin leagan agus scoir\n"
-#: sed/sed.c:143
+#: sed/sed.c:179
#, c-format
msgid ""
"\n"
@@ -393,125 +781,62 @@ msgstr ""
"léigh ón ghnáth-ionchur.\n"
"\n"
-#: sed/utils.c:74 sed/utils.c:432
+#: sed/utils.c:73 sed/utils.c:384
#, c-format
msgid "cannot remove %s: %s"
msgstr "ní féidir %s a scriosadh: %s"
-#: sed/utils.c:144
+#: sed/utils.c:136
#, c-format
msgid "couldn't open file %s: %s"
msgstr "níorbh fhéidir an comhad %s a oscailt: %s"
-#: sed/utils.c:167
+#: sed/utils.c:155
#, c-format
msgid "couldn't attach to %s: %s"
msgstr "níorbh fhéidir ceangal le %s: %s"
# 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/utils.c:229
-#, c-format
-msgid "couldn't write %d item to %s: %s"
-msgid_plural "couldn't write %d items to %s: %s"
+#: sed/utils.c:192
+#, fuzzy, c-format
+msgid "couldn't write %llu item to %s: %s"
+msgid_plural "couldn't write %llu items to %s: %s"
msgstr[0] "níorbh fhéidir %d rud a scríobh i %s: %s"
msgstr[1] "níorbh fhéidir %d rud a scríobh i %s: %s"
msgstr[2] "níorbh fhéidir %d rud a scríobh i %s: %s"
msgstr[3] "níorbh fhéidir %d rud a scríobh i %s: %s"
msgstr[4] "níorbh fhéidir %d rud a scríobh i %s: %s"
-#: sed/utils.c:244 sed/utils.c:267
+#: sed/utils.c:204 sed/utils.c:223
#, c-format
msgid "read error on %s: %s"
msgstr "earráid ag léamh %s: %s"
-#: sed/utils.c:372
+#: sed/utils.c:325
#, c-format
msgid "couldn't follow symlink %s: %s"
msgstr "níorbh fhéidir nasc siombalach %s a leanúint: %s"
-#: sed/utils.c:406
+#: sed/utils.c:359
#, c-format
msgid "cannot stat %s: %s"
msgstr "ní féidir %s a 'stat': %s"
-#: sed/utils.c:437
+#: sed/utils.c:389
#, c-format
msgid "cannot rename %s: %s"
msgstr "ní féidir %s a athainmniú: %s"
-#: lib/regcomp.c:132
-msgid "Success"
-msgstr "D'éirigh leis"
+#~ msgid "cannot specify modifiers on empty regexp"
+#~ msgstr "ní féidir mionathraitheoirí a shonrú le slonn bán"
-#: lib/regcomp.c:135
-msgid "No match"
-msgstr "Níl a leithéid ann"
-
-#: lib/regcomp.c:138
-msgid "Invalid regular expression"
-msgstr "Slonn ionadaíochta neamhbhailí"
-
-#: lib/regcomp.c:141
-msgid "Invalid collation character"
-msgstr "Carachtar neamhbhailí comhordaithe"
-
-#: lib/regcomp.c:144
-msgid "Invalid character class name"
-msgstr "Ainm neamhbhailí ar aicme charachtar"
-
-#: lib/regcomp.c:147
-msgid "Trailing backslash"
-msgstr "Cúlslais ag deireadh"
-
-# coinage - KPS
-#: lib/regcomp.c:150
-msgid "Invalid back reference"
-msgstr "Cúltagairt neamhbhailí"
-
-#: lib/regcomp.c:153
-msgid "Unmatched [ or [^"
-msgstr "[ nó [^ corr"
-
-#: lib/regcomp.c:156
-msgid "Unmatched ( or \\("
-msgstr "( nó \\( corr"
-
-#: lib/regcomp.c:159
-msgid "Unmatched \\{"
-msgstr "\\{ corr"
-
-#: lib/regcomp.c:162
-msgid "Invalid content of \\{\\}"
-msgstr "Ábhar neamhbhailí idir \\{\\}"
-
-#: lib/regcomp.c:165
-msgid "Invalid range end"
-msgstr "Deireadh raoin neamhbhailí"
-
-#: lib/regcomp.c:168
-msgid "Memory exhausted"
-msgstr "Cuimhne ídithe"
-
-#: lib/regcomp.c:171
-msgid "Invalid preceding regular expression"
-msgstr "Is neamhbhailí an slonn ionadaíochta roimhe seo"
-
-#: lib/regcomp.c:174
-msgid "Premature end of regular expression"
-msgstr "Deireadh le slonn ionadaíochta gan choinne"
-
-#: lib/regcomp.c:177
-msgid "Regular expression too big"
-msgstr "Slonn ionadaíochta rómhór"
-
-#: lib/regcomp.c:180
-msgid "Unmatched ) or \\)"
-msgstr ") nó \\) corr"
-
-#: lib/regcomp.c:705
-msgid "No previous regular expression"
-msgstr "Níl aon slonn ionadaíochta roimhe seo"
+#~ msgid ""
+#~ "E-mail bug reports to: %s .\n"
+#~ "Be sure to include the word ``%s'' somewhere in the ``Subject:'' field.\n"
+#~ msgstr ""
+#~ "Seol tuairiscí fabhtanna chuig: %s .\n"
+#~ "Cuir an focal ``%s'' áit éigin sa líne ``Subject:'' le do thoil.\n"
#~ msgid "super-sed version %s\n"
#~ msgstr "super-sed, leagan %s\n"
diff --git a/po/gl.gmo b/po/gl.gmo
index 5d17eef..8b5cf94 100644
--- a/po/gl.gmo
+++ b/po/gl.gmo
Binary files differ
diff --git a/po/gl.po b/po/gl.po
index a3a9b7b..659f0cc 100644
--- a/po/gl.po
+++ b/po/gl.po
@@ -2,221 +2,607 @@
# Copyright (C) 1999, 2002 Free Software Foundation, Inc.
# This file is distributed under the same license as the sed package.
# Jacobo Tarrío Barreiro <jtarrio@trasno.net>, 1999, 2002.
-# Francisco Javier Tsao Santín <tsao@enelparaiso.org>, 2008, 2011.
+# Francisco Javier Tsao Santín <tsao@members.fsf.org>, 2008, 2011,2016.
#
msgid ""
msgstr ""
-"Project-Id-Version: sed 4.2.1\n"
+"Project-Id-Version: sed 4.2.2\n"
"Report-Msgid-Bugs-To: bug-gnu-utils@gnu.org\n"
-"POT-Creation-Date: 2012-12-22 14:36+0100\n"
-"PO-Revision-Date: 2011-02-04 02:21+0100\n"
-"Last-Translator: Francisco Javier Tsao Santín <tsao@enelparaiso.org>\n"
+"POT-Creation-Date: 2016-12-30 00:59-0800\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"
"Language: gl\n"
"MIME-Version: 1.0\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"
-#: sed/compile.c:144
+#: lib/closeout.c:112
+msgid "write error"
+msgstr ""
+
+#: lib/copy-acl.c:54
+#, c-format
+msgid "preserving permissions for %s"
+msgstr ""
+
+#: lib/dfa.c:1025 lib/dfa.c:1028 lib/dfa.c:1047 lib/dfa.c:1057 lib/dfa.c:1070
+#: lib/dfa.c:1098 lib/dfa.c:1107 lib/dfa.c:1110 lib/dfa.c:1115 lib/dfa.c:1137
+#: lib/dfa.c:1140
+msgid "unbalanced ["
+msgstr ""
+
+#: lib/dfa.c:1083
+#, fuzzy
+msgid "invalid character class"
+msgstr "Nome de clase de caracteres non válido"
+
+#: lib/dfa.c:1206
+msgid "character class syntax is [[:space:]], not [:space:]"
+msgstr ""
+
+#: lib/dfa.c:1275
+msgid "unfinished \\ escape"
+msgstr ""
+
+#: lib/dfa.c:1436
+#, fuzzy
+msgid "invalid content of \\{\\}"
+msgstr "Contido de \\{\\} non válido"
+
+#: lib/dfa.c:1439
+#, fuzzy
+msgid "regular expression too big"
+msgstr "Expresión regular grande de máis"
+
+#: lib/dfa.c:1853
+msgid "unbalanced ("
+msgstr ""
+
+#: lib/dfa.c:1980
+msgid "no syntax specified"
+msgstr ""
+
+#: lib/dfa.c:1988
+msgid "unbalanced )"
+msgstr ""
+
+#: lib/error.c:191
+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 ""
+
+#: lib/getopt.c:654 lib/getopt.c:658
+#, c-format
+msgid "%s: option '--%s' doesn't allow an argument\n"
+msgstr ""
+
+#: 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:715 lib/getopt.c:734
+#, c-format
+msgid "%s: option '--%s' requires an argument\n"
+msgstr ""
+
+#: 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
+#, 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
+#, 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 "Memoria esgotada"
+
+#. TRANSLATORS:
+#. Get translations for open and closing quotation marks.
+#. The message catalog should translate "`" to a left
+#. quotation mark suitable for the locale, and similarly for
+#. "'". For example, a French Unicode local should translate
+#. these to U+00AB (LEFT-POINTING DOUBLE ANGLE
+#. QUOTATION MARK), and U+00BB (RIGHT-POINTING DOUBLE ANGLE
+#. QUOTATION MARK), respectively.
+#.
+#. If the catalog has no translation, we will try to
+#. use Unicode U+2018 (LEFT SINGLE QUOTATION MARK) and
+#. Unicode U+2019 (RIGHT SINGLE QUOTATION MARK). If the
+#. current locale is not Unicode, locale_quoting_style
+#. will quote 'like this', and clocale_quoting_style will
+#. quote "like this". You should always include translations
+#. for "`" and "'" even if U+2018 and U+2019 are appropriate
+#. for your locale.
+#.
+#. If you don't know what to put here, please see
+#. <http://en.wikipedia.org/wiki/Quotation_marks_in_other_languages>
+#. and use glyphs suitable for your language.
+#: lib/quotearg.c:354
+msgid "`"
+msgstr ""
+
+#: lib/quotearg.c:355
+msgid "'"
+msgstr ""
+
+#: lib/regcomp.c:135
+msgid "Success"
+msgstr "Éxito"
+
+#: lib/regcomp.c:138
+msgid "No match"
+msgstr "Non se atopou"
+
+#: lib/regcomp.c:141
+msgid "Invalid regular expression"
+msgstr "Expresión regular non válida"
+
+#: lib/regcomp.c:144
+msgid "Invalid collation character"
+msgstr "Carácter de ordeamento non válido"
+
+#: lib/regcomp.c:147
+msgid "Invalid character class name"
+msgstr "Nome de clase de caracteres non válido"
+
+#: lib/regcomp.c:150
+msgid "Trailing backslash"
+msgstr "Barra invertida á fin de liña"
+
+#: lib/regcomp.c:153
+msgid "Invalid back reference"
+msgstr "Referencia cara a atrás non válida"
+
+#: lib/regcomp.c:156
+#, fuzzy
+msgid "Unmatched [, [^, [:, [., or [="
+msgstr "[ ou [^ sen parella"
+
+#: lib/regcomp.c:159
+msgid "Unmatched ( or \\("
+msgstr "( ou \\( sen parella"
+
+#: lib/regcomp.c:162
+msgid "Unmatched \\{"
+msgstr "\\{ sen parella"
+
+#: lib/regcomp.c:165
+msgid "Invalid content of \\{\\}"
+msgstr "Contido de \\{\\} non válido"
+
+#: lib/regcomp.c:168
+msgid "Invalid range end"
+msgstr "Fin de rango non válida"
+
+#: lib/regcomp.c:171
+msgid "Memory exhausted"
+msgstr "Memoria esgotada"
+
+#: lib/regcomp.c:174
+msgid "Invalid preceding regular expression"
+msgstr "Expresión regular anterior non válida"
+
+#: lib/regcomp.c:177
+msgid "Premature end of regular expression"
+msgstr "Fin prematura da expresión regular"
+
+#: lib/regcomp.c:180
+msgid "Regular expression too big"
+msgstr "Expresión regular grande de máis"
+
+#: lib/regcomp.c:183
+msgid "Unmatched ) or \\)"
+msgstr ") ou \\) sen parella"
+
+#: lib/regcomp.c:687
+msgid "No previous regular expression"
+msgstr "Non hai unha expresión regular anterior"
+
+#: lib/set-acl.c:46
+#, c-format
+msgid "setting permissions for %s"
+msgstr ""
+
+#: lib/version-etc.c:74
+#, c-format
+msgid "Packaged by %s (%s)\n"
+msgstr ""
+
+#: lib/version-etc.c:77
+#, c-format
+msgid "Packaged by %s\n"
+msgstr ""
+
+#. 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 ""
+
+#: lib/version-etc.c:86
+msgid ""
+"\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"
+msgstr ""
+
+#. TRANSLATORS: %s denotes an author name.
+#: lib/version-etc.c:102
+#, c-format
+msgid "Written by %s.\n"
+msgstr ""
+
+#. TRANSLATORS: Each %s denotes an author name.
+#: lib/version-etc.c:106
+#, c-format
+msgid "Written by %s and %s.\n"
+msgstr ""
+
+#. TRANSLATORS: Each %s denotes an author name.
+#: lib/version-etc.c:110
+#, c-format
+msgid "Written by %s, %s, and %s.\n"
+msgstr ""
+
+#. TRANSLATORS: Each %s denotes an author name.
+#. You can use line breaks, estimating that each author name occupies
+#. ca. 16 screen columns and that a screen line has ca. 80 columns.
+#: lib/version-etc.c:117
+#, c-format
+msgid ""
+"Written by %s, %s, %s,\n"
+"and %s.\n"
+msgstr ""
+
+#. TRANSLATORS: Each %s denotes an author name.
+#. You can use line breaks, estimating that each author name occupies
+#. ca. 16 screen columns and that a screen line has ca. 80 columns.
+#: lib/version-etc.c:124
+#, c-format
+msgid ""
+"Written by %s, %s, %s,\n"
+"%s, and %s.\n"
+msgstr ""
+
+#. TRANSLATORS: Each %s denotes an author name.
+#. You can use line breaks, estimating that each author name occupies
+#. ca. 16 screen columns and that a screen line has ca. 80 columns.
+#: lib/version-etc.c:131
+#, c-format
+msgid ""
+"Written by %s, %s, %s,\n"
+"%s, %s, and %s.\n"
+msgstr ""
+
+#. TRANSLATORS: Each %s denotes an author name.
+#. You can use line breaks, estimating that each author name occupies
+#. ca. 16 screen columns and that a screen line has ca. 80 columns.
+#: lib/version-etc.c:139
+#, c-format
+msgid ""
+"Written by %s, %s, %s,\n"
+"%s, %s, %s, and %s.\n"
+msgstr ""
+
+#. TRANSLATORS: Each %s denotes an author name.
+#. You can use line breaks, estimating that each author name occupies
+#. ca. 16 screen columns and that a screen line has ca. 80 columns.
+#: lib/version-etc.c:147
+#, c-format
+msgid ""
+"Written by %s, %s, %s,\n"
+"%s, %s, %s, %s,\n"
+"and %s.\n"
+msgstr ""
+
+#. TRANSLATORS: Each %s denotes an author name.
+#. You can use line breaks, estimating that each author name occupies
+#. ca. 16 screen columns and that a screen line has ca. 80 columns.
+#: lib/version-etc.c:156
+#, c-format
+msgid ""
+"Written by %s, %s, %s,\n"
+"%s, %s, %s, %s,\n"
+"%s, and %s.\n"
+msgstr ""
+
+#. TRANSLATORS: Each %s denotes an author name.
+#. You can use line breaks, estimating that each author name occupies
+#. ca. 16 screen columns and that a screen line has ca. 80 columns.
+#: lib/version-etc.c:167
+#, c-format
+msgid ""
+"Written by %s, %s, %s,\n"
+"%s, %s, %s, %s,\n"
+"%s, %s, and others.\n"
+msgstr ""
+
+#. TRANSLATORS: The placeholder indicates the bug-reporting address
+#. for this package. Please add _another line_ saying
+#. "Report translation bugs to <...>\n" with the address for translation
+#. bugs (typically your translation team's web or email address).
+#: lib/version-etc.c:245
+#, c-format
+msgid ""
+"\n"
+"Report bugs to: %s\n"
+msgstr ""
+
+#: lib/version-etc.c:247
+#, c-format
+msgid "Report %s bugs to: %s\n"
+msgstr ""
+
+#: lib/version-etc.c:251
+#, c-format
+msgid "%s home page: <%s>\n"
+msgstr ""
+
+#: lib/version-etc.c:253
+#, c-format
+msgid "%s home page: <http://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"
+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"
+
+#: sed/compile.c:146
msgid "multiple `!'s"
msgstr "múltiples `!'s"
-#: sed/compile.c:145
+#: sed/compile.c:147
msgid "unexpected `,'"
msgstr "`,' inesperada"
-#: sed/compile.c:146
+#: sed/compile.c:149
msgid "invalid usage of +N or ~N as first address"
msgstr "non se pode usar +N ou ~N como primeira dirección"
-#: sed/compile.c:147
+#: sed/compile.c:150
msgid "unmatched `{'"
msgstr "`{' sen parella"
-#: sed/compile.c:148
+#: sed/compile.c:151
msgid "unexpected `}'"
msgstr "`}' inesperado"
-#: sed/compile.c:149
+#: sed/compile.c:153
msgid "extra characters after command"
msgstr "caracteres extra despois da instrucción"
-#: sed/compile.c:150
+#: sed/compile.c:155
msgid "expected \\ after `a', `c' or `i'"
msgstr "esperábase \\ despois de `a', `c' ou `i'"
-#: sed/compile.c:151
+#: sed/compile.c:157
msgid "`}' doesn't want any addresses"
msgstr "`}' non acepta un enderezo"
-#: sed/compile.c:152
+#: sed/compile.c:159
msgid ": doesn't want any addresses"
msgstr ": non acepta un enderezo"
-#: sed/compile.c:153
+#: sed/compile.c:161
msgid "comments don't accept any addresses"
msgstr "os comentarios non aceptan enderezos"
-#: sed/compile.c:154
+#: sed/compile.c:162
msgid "missing command"
msgstr "falta unha instrucción"
-#: sed/compile.c:155
+#: sed/compile.c:163
msgid "command only uses one address"
msgstr "a instrucción só usa un enderezo"
-#: sed/compile.c:156
+#: sed/compile.c:164
msgid "unterminated address regex"
msgstr "expresión regular de enderezo non rematada"
-#: sed/compile.c:157
+#: sed/compile.c:165
msgid "unterminated `s' command"
msgstr "instrucción `s' non rematada"
-#: sed/compile.c:158
+#: sed/compile.c:166
msgid "unterminated `y' command"
msgstr "instrucción `y' non rematada"
-#: sed/compile.c:159
+#: sed/compile.c:167
msgid "unknown option to `s'"
msgstr "opción de `s' descoñecida"
-#: sed/compile.c:160
+#: sed/compile.c:169
msgid "multiple `p' options to `s' command"
msgstr "múltiples opcións `p' para a instrucción `s'"
-#: sed/compile.c:161
+#: sed/compile.c:171
msgid "multiple `g' options to `s' command"
msgstr "múltiples opcións `g' para a instrucción `s'"
-#: sed/compile.c:162
+#: sed/compile.c:173
msgid "multiple number options to `s' command"
msgstr "múltiples opcións numéricas para a instrucción `s'"
-#: sed/compile.c:163
+#: sed/compile.c:175
msgid "number option to `s' command may not be zero"
msgstr "unha opción numérica para a instrucción `s' non pode ser cero"
-#: sed/compile.c:164
+#: sed/compile.c:177
msgid "strings for `y' command are different lengths"
msgstr "as cadeas para a instrucción `y' teñen lonxitudes diferentes"
-#: sed/compile.c:165
+#: sed/compile.c:179
msgid "delimiter character is not a single-byte character"
msgstr "o carácter delimitador non é un carácter de byte simple"
-#: sed/compile.c:166
+#: sed/compile.c:181
msgid "expected newer version of sed"
msgstr "se esperaba unha versión de sed máis nova"
-#: sed/compile.c:167
+#: sed/compile.c:183
msgid "invalid usage of line address 0"
msgstr "uso non válido da dirección de liña 0"
-#: sed/compile.c:168
+#: sed/compile.c:184
#, c-format
msgid "unknown command: `%c'"
msgstr "instrucción descoñecida:`%c'"
-#: sed/compile.c:169
-#, fuzzy
+#: sed/compile.c:186
msgid "incomplete command"
-msgstr "falta unha instrucción"
+msgstr "instrucción incompleta"
+
+#: sed/compile.c:188
+msgid "\":\" lacks a label"
+msgstr ""
-#: sed/compile.c:192
+#: sed/compile.c:190
+msgid "recursive escaping after \\c not allowed"
+msgstr ""
+
+#: sed/compile.c:213
#, c-format
msgid "%s: file %s line %lu: %s\n"
msgstr "%s: ficheiro %s liña %lu: %s\n"
-#: sed/compile.c:195
+#: sed/compile.c:216
#, c-format
msgid "%s: -e expression #%lu, char %lu: %s\n"
msgstr "%s: -e expresión #%lu, carácter %lu: %s\n"
-#: sed/compile.c:1657
+#: sed/compile.c:1639
#, 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:595
+#: sed/execute.c:264 sed/execute.c:281
+#, c-format
+msgid "case conversion produced an invalid character"
+msgstr ""
+
+#: sed/execute.c:575
#, c-format
msgid "%s: can't read %s: %s\n"
msgstr "%s: non se puido ler %s: %s\n"
-#: sed/execute.c:624
+#: sed/execute.c:600
#, c-format
msgid "couldn't edit %s: is a terminal"
msgstr "non se puido editar %s: é unha terminal"
-#: sed/execute.c:629
+#: sed/execute.c:605
#, c-format
msgid "couldn't edit %s: not a regular file"
msgstr "non se puido editar %s: non é un ficheiro regular"
-#: sed/execute.c:640
+#: sed/execute.c:616
#, 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:647
+#: sed/execute.c:624
#, 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:664 sed/utils.c:211
+#: sed/execute.c:643 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:1193 sed/execute.c:1373
+#: sed/execute.c:1158 sed/execute.c:1368
msgid "error in subprocess"
msgstr "erro no subproceso"
-#: sed/execute.c:1195
+#: sed/execute.c:1160
msgid "option `e' not supported"
msgstr "a opción `e' non está soportada"
-#: sed/execute.c:1375
+#: sed/execute.c:1349
msgid "`e' command not supported"
msgstr "o comando `e' non está soportado"
-#: sed/execute.c:1725
+#: sed/execute.c:1675
msgid "no input files"
msgstr "non hai ficheiros de entrada"
-#: sed/regexp.c:39
+#: sed/regexp.c:38
msgid "no previous regular expression"
msgstr "non hai unha expresión regular anterior"
-#: sed/regexp.c:40
-msgid "cannot specify modifiers on empty regexp"
-msgstr "non se poden especificar modificadores nunha expresión regular baleira"
-
-#: sed/regexp.c:129
+#: sed/regexp.c:138
#, c-format
msgid "invalid reference \\%d on `s' command's RHS"
msgstr "referencia \\%d non válida no lado dereito do comando `s'"
-#: sed/sed.c:32
+#: sed/sed.c:35
msgid "Jay Fenlason"
-msgstr ""
+msgstr "Jay Fenlason"
-#: sed/sed.c:33
+#: sed/sed.c:36
msgid "Tom Lord"
-msgstr ""
+msgstr "Tom Lord"
-#: sed/sed.c:34
+#: sed/sed.c:37
msgid "Ken Pizzini"
-msgstr ""
+msgstr "Ken Pizzini"
-#: sed/sed.c:35
+#: sed/sed.c:38
msgid "Paolo Bonzini"
-msgstr ""
+msgstr "Paolo Bonzini"
-#: sed/sed.c:79
+#: sed/sed.c:113
#, c-format
msgid ""
"GNU sed home page: <http://www.gnu.org/software/sed/>.\n"
@@ -225,17 +611,12 @@ 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"
-#: sed/sed.c:86
+#: sed/sed.c:120
#, c-format
-msgid ""
-"E-mail bug reports to: <%s>.\n"
-"Be sure to include the word ``%s'' somewhere in the ``Subject:'' field.\n"
+msgid "E-mail bug reports to: <%s>.\n"
msgstr ""
-"Informe dos erros no programa a: <%s> .\n"
-"Informe dos erros na traducción a tsao@enelparaiso.org .\n"
-"Asegúrese de incluí-la palabra ``%s'' nalgunha parte do campo ``Subject:''.\n"
-#: sed/sed.c:99
+#: sed/sed.c:129
msgid ""
" -R, --regexp-perl\n"
" use Perl 5's regular expressions syntax in the script.\n"
@@ -244,7 +625,7 @@ msgstr ""
" usa-la sintaxe de expresións regulares de Perl 5 no "
"script.\n"
-#: sed/sed.c:104
+#: sed/sed.c:134
#, c-format
msgid ""
"Usage: %s [OPTION]... {script-only-if-no-other-script} [input-file]...\n"
@@ -252,7 +633,7 @@ msgid ""
msgstr ""
"Uso: %s [OPCIÓN]... {script-só-sen-outro-script} [ficheiro-de-entrada]...\n"
-#: sed/sed.c:108
+#: sed/sed.c:138
#, c-format
msgid ""
" -n, --quiet, --silent\n"
@@ -261,7 +642,7 @@ msgstr ""
" -n, --quiet, --silent\n"
" suprime a visualización automática do espacio de patróns\n"
-#: sed/sed.c:110
+#: sed/sed.c:140
#, c-format
msgid ""
" -e script, --expression=script\n"
@@ -270,7 +651,7 @@ msgstr ""
"-e script, --expression=script\n"
" engade script ás instruccións que serán executadas\n"
-#: sed/sed.c:112
+#: sed/sed.c:142
#, c-format
msgid ""
" -f script-file, --file=script-file\n"
@@ -281,7 +662,7 @@ msgstr ""
" engade o contido do ficheiro do script ás instruccións que "
"serán executadas\n"
-#: sed/sed.c:115
+#: sed/sed.c:146
#, c-format
msgid ""
" --follow-symlinks\n"
@@ -290,17 +671,17 @@ msgstr ""
" --follow-symlinks\n"
" segue ligazóns simbólicas cando se procesan no seu sitio\n"
-#: sed/sed.c:118
-#, fuzzy, c-format
+#: sed/sed.c:149
+#, c-format
msgid ""
" -i[SUFFIX], --in-place[=SUFFIX]\n"
" edit files in place (makes backup if SUFFIX supplied)\n"
msgstr ""
" -i[SUFIXO], --in-place[=SUFIXO]\n"
-" edita ficheiros no seu sitio (facendo copia de seguridade "
-"se se indica un sufixo)\n"
+" edita ficheiros no seu sitio (fai copia de seguridade se se "
+"indica un SUFIXO)\n"
-#: sed/sed.c:121
+#: sed/sed.c:153
#, c-format
msgid ""
" -b, --binary\n"
@@ -311,7 +692,7 @@ msgstr ""
" ficheiros abertos en modo binario (non se procesan de xeito "
"especial CR+LFs)\n"
-#: sed/sed.c:124
+#: sed/sed.c:157
#, c-format
msgid ""
" -l N, --line-length=N\n"
@@ -321,7 +702,7 @@ msgstr ""
" especifica a lonxitude de axuste da liña desexado para a "
"instrucción `l' \n"
-#: sed/sed.c:126
+#: sed/sed.c:159
#, c-format
msgid ""
" --posix\n"
@@ -330,28 +711,37 @@ msgstr ""
" --posix\n"
" desactiva tódalas extensións GNU.\n"
-#: sed/sed.c:128
-#, c-format
+#: sed/sed.c:161
+#, fuzzy, c-format
msgid ""
-" -r, --regexp-extended\n"
-" use extended regular expressions in the script.\n"
+" -E, -r, --regexp-extended\n"
+" use extended regular expressions in the script\n"
+" (for portability use POSIX -E).\n"
msgstr ""
" -r, --regexp-extended\n"
" usa a sintaxe extendida de expresións regulares no script.\n"
-#: sed/sed.c:133
-#, c-format
+#: sed/sed.c:167
+#, fuzzy, c-format
msgid ""
" -s, --separate\n"
-" consider files as separate rather than as a single "
-"continuous\n"
-" long stream.\n"
+" consider files as separate rather than as a single,\n"
+" continuous long stream.\n"
msgstr ""
" -s, --separate\n"
" trata os ficheiros coma separados no canto de coma unha\n"
" longa tira de caracteres continua.\n"
-#: sed/sed.c:136
+#: sed/sed.c:170
+#, fuzzy, c-format
+msgid ""
+" --sandbox\n"
+" operate in sandbox mode.\n"
+msgstr ""
+" -z, --null-data\n"
+" separa liñas por caracteres NUL\n"
+
+#: sed/sed.c:172
#, c-format
msgid ""
" -u, --unbuffered\n"
@@ -363,24 +753,26 @@ msgstr ""
" carga cantidades mínimas de datos dos ficheiros de entrada\n"
" e baleira os buffers de saída máis decote\n"
-#: sed/sed.c:139
+#: sed/sed.c:175
#, c-format
msgid ""
" -z, --null-data\n"
" separate lines by NUL characters\n"
msgstr ""
+" -z, --null-data\n"
+" separa liñas por caracteres NUL\n"
-#: sed/sed.c:141
+#: sed/sed.c:177
#, c-format
msgid " --help display this help and exit\n"
msgstr " --help amosa esta axuda e sae\n"
-#: sed/sed.c:142
+#: sed/sed.c:178
#, c-format
msgid " --version output version information and exit\n"
msgstr " --version amosa-la información da versión e saír\n"
-#: sed/sed.c:143
+#: sed/sed.c:179
#, c-format
msgid ""
"\n"
@@ -400,144 +792,57 @@ msgstr ""
"ficheiros de entrada, entón se le a entrada standard.\n"
"\n"
-#: sed/utils.c:74 sed/utils.c:432
+#: sed/utils.c:73 sed/utils.c:384
#, c-format
msgid "cannot remove %s: %s"
msgstr "non se puido borrar %s: %s"
-#: sed/utils.c:144
+#: sed/utils.c:136
#, c-format
msgid "couldn't open file %s: %s"
msgstr "non se puido abri-lo ficheiro %s: %s"
-#: sed/utils.c:167
+#: sed/utils.c:155
#, c-format
msgid "couldn't attach to %s: %s"
msgstr "non se puido adxuntar elemento en %s: %s"
-#: sed/utils.c:229
-#, c-format
-msgid "couldn't write %d item to %s: %s"
-msgid_plural "couldn't write %d items to %s: %s"
+#: sed/utils.c:192
+#, fuzzy, c-format
+msgid "couldn't write %llu item to %s: %s"
+msgid_plural "couldn't write %llu items to %s: %s"
msgstr[0] "non se puido escribir %d elemento en %s: %s"
msgstr[1] "non se puideron escribir %d elementos en %s: %s"
-#: sed/utils.c:244 sed/utils.c:267
+#: sed/utils.c:204 sed/utils.c:223
#, c-format
msgid "read error on %s: %s"
msgstr "erro de lectura en %s: %s"
-#: sed/utils.c:372
+#: sed/utils.c:325
#, c-format
msgid "couldn't follow symlink %s: %s"
msgstr "non se puido segui-la ligazón simbólica %s: %s"
-#: sed/utils.c:406
+#: sed/utils.c:359
#, c-format
msgid "cannot stat %s: %s"
msgstr "non se puido ler %s: %s"
-#: sed/utils.c:437
+#: sed/utils.c:389
#, c-format
msgid "cannot rename %s: %s"
msgstr "non se puido renomear %s: %s"
-#: lib/regcomp.c:132
-msgid "Success"
-msgstr "Éxito"
-
-#: lib/regcomp.c:135
-msgid "No match"
-msgstr "Non se atopou"
-
-#: lib/regcomp.c:138
-msgid "Invalid regular expression"
-msgstr "Expresión regular non válida"
-
-#: lib/regcomp.c:141
-msgid "Invalid collation character"
-msgstr "Carácter de ordeamento non válido"
-
-#: lib/regcomp.c:144
-msgid "Invalid character class name"
-msgstr "Nome de clase de caracteres non válido"
-
-#: lib/regcomp.c:147
-msgid "Trailing backslash"
-msgstr "Barra invertida á fin de liña"
-
-#: lib/regcomp.c:150
-msgid "Invalid back reference"
-msgstr "Referencia cara a atrás non válida"
-
-#: lib/regcomp.c:153
-msgid "Unmatched [ or [^"
-msgstr "[ ou [^ sen parella"
-
-#: lib/regcomp.c:156
-msgid "Unmatched ( or \\("
-msgstr "( ou \\( sen parella"
-
-#: lib/regcomp.c:159
-msgid "Unmatched \\{"
-msgstr "\\{ sen parella"
-
-#: lib/regcomp.c:162
-msgid "Invalid content of \\{\\}"
-msgstr "Contido de \\{\\} non válido"
-
-#: lib/regcomp.c:165
-msgid "Invalid range end"
-msgstr "Fin de rango non válida"
-
-#: lib/regcomp.c:168
-msgid "Memory exhausted"
-msgstr "Memoria esgotada"
-
-#: lib/regcomp.c:171
-msgid "Invalid preceding regular expression"
-msgstr "Expresión regular anterior non válida"
-
-#: lib/regcomp.c:174
-msgid "Premature end of regular expression"
-msgstr "Fin prematura da expresión regular"
-
-#: lib/regcomp.c:177
-msgid "Regular expression too big"
-msgstr "Expresión regular grande de máis"
-
-#: lib/regcomp.c:180
-msgid "Unmatched ) or \\)"
-msgstr ") ou \\) sen parella"
-
-#: lib/regcomp.c:705
-msgid "No previous regular expression"
-msgstr "Non hai unha expresión regular anterior"
-
-#~ msgid "super-sed version %s\n"
-#~ msgstr "super-sed versión %s\n"
-
-#~ msgid ""
-#~ "based on GNU sed version %s\n"
-#~ "\n"
+#~ msgid "cannot specify modifiers on empty regexp"
#~ msgstr ""
-#~ "baseado en GNU sed versión %s\n"
-#~ "\n"
-
-#~ msgid "GNU sed version %s\n"
-#~ msgstr "GNU sed versión %s\n"
+#~ "non se poden especificar modificadores nunha expresión regular baleira"
#~ 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"
+#~ "E-mail bug reports to: <%s>.\n"
+#~ "Be sure to include the word ``%s'' somewhere in the ``Subject:'' field.\n"
#~ msgstr ""
-#~ "Copyright (C) %d da Free Software Foundation, Inc.\n"
-#~ "Isto é software libre; vexa o código fonte polas condicións de copia. NON "
-#~ "hai\n"
-#~ "garantía; nin sequera de COMERCIABILIDADE ou APTITUDE PARA UN FIN "
-#~ "DETERMINADO,\n"
-#~ "ata o que permite a lei.\n"
+#~ "Informe dos erros no programa a: <%s> .\n"
+#~ "Informe dos erros na traducción a tsao@enelparaiso.org .\n"
+#~ "Asegúrese de incluí-la palabra ``%s'' nalgunha parte do campo "
+#~ "``Subject:''.\n"
diff --git a/po/he.gmo b/po/he.gmo
index fd20a06..e4275cf 100644
--- a/po/he.gmo
+++ b/po/he.gmo
Binary files differ
diff --git a/po/he.po b/po/he.po
index 7cc51e9..3990632 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: 2012-12-22 14:36+0100\n"
+"POT-Creation-Date: 2016-12-30 00:59-0800\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"
@@ -14,262 +14,640 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=ISO-8859-8\n"
"Content-Transfer-Encoding: 8-bit\n"
+"X-Bugs: Report translation errors to the Language-Team address.\n"
-#: sed/compile.c:144
+#: lib/closeout.c:112
+msgid "write error"
+msgstr ""
+
+#: lib/copy-acl.c:54
+#, c-format
+msgid "preserving permissions for %s"
+msgstr ""
+
+#: lib/dfa.c:1025 lib/dfa.c:1028 lib/dfa.c:1047 lib/dfa.c:1057 lib/dfa.c:1070
+#: lib/dfa.c:1098 lib/dfa.c:1107 lib/dfa.c:1110 lib/dfa.c:1115 lib/dfa.c:1137
+#: lib/dfa.c:1140
+msgid "unbalanced ["
+msgstr ""
+
+#: lib/dfa.c:1083
+msgid "invalid character class"
+msgstr ""
+
+#: lib/dfa.c:1206
+msgid "character class syntax is [[:space:]], not [:space:]"
+msgstr ""
+
+#: lib/dfa.c:1275
+msgid "unfinished \\ escape"
+msgstr ""
+
+#: lib/dfa.c:1436
+msgid "invalid content of \\{\\}"
+msgstr ""
+
+#: lib/dfa.c:1439
+msgid "regular expression too big"
+msgstr ""
+
+#: lib/dfa.c:1853
+msgid "unbalanced ("
+msgstr ""
+
+#: lib/dfa.c:1980
+msgid "no syntax specified"
+msgstr ""
+
+#: lib/dfa.c:1988
+msgid "unbalanced )"
+msgstr ""
+
+#: lib/error.c:191
+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 ""
+
+#: lib/getopt.c:654 lib/getopt.c:658
+#, c-format
+msgid "%s: option '--%s' doesn't allow an argument\n"
+msgstr ""
+
+#: 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:715 lib/getopt.c:734
+#, c-format
+msgid "%s: option '--%s' requires an argument\n"
+msgstr ""
+
+#: 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
+#, 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
+#, 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 ""
+
+#. TRANSLATORS:
+#. Get translations for open and closing quotation marks.
+#. The message catalog should translate "`" to a left
+#. quotation mark suitable for the locale, and similarly for
+#. "'". For example, a French Unicode local should translate
+#. these to U+00AB (LEFT-POINTING DOUBLE ANGLE
+#. QUOTATION MARK), and U+00BB (RIGHT-POINTING DOUBLE ANGLE
+#. QUOTATION MARK), respectively.
+#.
+#. If the catalog has no translation, we will try to
+#. use Unicode U+2018 (LEFT SINGLE QUOTATION MARK) and
+#. Unicode U+2019 (RIGHT SINGLE QUOTATION MARK). If the
+#. current locale is not Unicode, locale_quoting_style
+#. will quote 'like this', and clocale_quoting_style will
+#. quote "like this". You should always include translations
+#. for "`" and "'" even if U+2018 and U+2019 are appropriate
+#. for your locale.
+#.
+#. If you don't know what to put here, please see
+#. <http://en.wikipedia.org/wiki/Quotation_marks_in_other_languages>
+#. and use glyphs suitable for your language.
+#: lib/quotearg.c:354
+msgid "`"
+msgstr ""
+
+#: lib/quotearg.c:355
+msgid "'"
+msgstr ""
+
+#: lib/regcomp.c:135
+msgid "Success"
+msgstr ""
+
+#: lib/regcomp.c:138
+msgid "No match"
+msgstr ""
+
+#: lib/regcomp.c:141
+msgid "Invalid regular expression"
+msgstr ""
+
+#: lib/regcomp.c:144
+msgid "Invalid collation character"
+msgstr ""
+
+#: lib/regcomp.c:147
+msgid "Invalid character class name"
+msgstr ""
+
+#: lib/regcomp.c:150
+msgid "Trailing backslash"
+msgstr ""
+
+#: lib/regcomp.c:153
+msgid "Invalid back reference"
+msgstr ""
+
+#: lib/regcomp.c:156
+msgid "Unmatched [, [^, [:, [., or [="
+msgstr ""
+
+#: lib/regcomp.c:159
+#, fuzzy
+msgid "Unmatched ( or \\("
+msgstr "- `{'"
+
+#: lib/regcomp.c:162
+#, fuzzy
+msgid "Unmatched \\{"
+msgstr "- `{'"
+
+#: lib/regcomp.c:165
+msgid "Invalid content of \\{\\}"
+msgstr ""
+
+#: lib/regcomp.c:168
+msgid "Invalid range end"
+msgstr ""
+
+#: lib/regcomp.c:171
+msgid "Memory exhausted"
+msgstr ""
+
+#: lib/regcomp.c:174
+msgid "Invalid preceding regular expression"
+msgstr ""
+
+#: lib/regcomp.c:177
+msgid "Premature end of regular expression"
+msgstr ""
+
+#: lib/regcomp.c:180
+msgid "Regular expression too big"
+msgstr ""
+
+#: lib/regcomp.c:183
+#, fuzzy
+msgid "Unmatched ) or \\)"
+msgstr "- `{'"
+
+#: lib/regcomp.c:687
+msgid "No previous regular expression"
+msgstr ""
+
+#: lib/set-acl.c:46
+#, c-format
+msgid "setting permissions for %s"
+msgstr ""
+
+#: lib/version-etc.c:74
+#, c-format
+msgid "Packaged by %s (%s)\n"
+msgstr ""
+
+#: lib/version-etc.c:77
+#, c-format
+msgid "Packaged by %s\n"
+msgstr ""
+
+#. 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 ""
+
+#: lib/version-etc.c:86
+msgid ""
+"\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"
+msgstr ""
+
+#. TRANSLATORS: %s denotes an author name.
+#: lib/version-etc.c:102
+#, c-format
+msgid "Written by %s.\n"
+msgstr ""
+
+#. TRANSLATORS: Each %s denotes an author name.
+#: lib/version-etc.c:106
+#, c-format
+msgid "Written by %s and %s.\n"
+msgstr ""
+
+#. TRANSLATORS: Each %s denotes an author name.
+#: lib/version-etc.c:110
+#, c-format
+msgid "Written by %s, %s, and %s.\n"
+msgstr ""
+
+#. TRANSLATORS: Each %s denotes an author name.
+#. You can use line breaks, estimating that each author name occupies
+#. ca. 16 screen columns and that a screen line has ca. 80 columns.
+#: lib/version-etc.c:117
+#, c-format
+msgid ""
+"Written by %s, %s, %s,\n"
+"and %s.\n"
+msgstr ""
+
+#. TRANSLATORS: Each %s denotes an author name.
+#. You can use line breaks, estimating that each author name occupies
+#. ca. 16 screen columns and that a screen line has ca. 80 columns.
+#: lib/version-etc.c:124
+#, c-format
+msgid ""
+"Written by %s, %s, %s,\n"
+"%s, and %s.\n"
+msgstr ""
+
+#. TRANSLATORS: Each %s denotes an author name.
+#. You can use line breaks, estimating that each author name occupies
+#. ca. 16 screen columns and that a screen line has ca. 80 columns.
+#: lib/version-etc.c:131
+#, c-format
+msgid ""
+"Written by %s, %s, %s,\n"
+"%s, %s, and %s.\n"
+msgstr ""
+
+#. TRANSLATORS: Each %s denotes an author name.
+#. You can use line breaks, estimating that each author name occupies
+#. ca. 16 screen columns and that a screen line has ca. 80 columns.
+#: lib/version-etc.c:139
+#, c-format
+msgid ""
+"Written by %s, %s, %s,\n"
+"%s, %s, %s, and %s.\n"
+msgstr ""
+
+#. TRANSLATORS: Each %s denotes an author name.
+#. You can use line breaks, estimating that each author name occupies
+#. ca. 16 screen columns and that a screen line has ca. 80 columns.
+#: lib/version-etc.c:147
+#, c-format
+msgid ""
+"Written by %s, %s, %s,\n"
+"%s, %s, %s, %s,\n"
+"and %s.\n"
+msgstr ""
+
+#. TRANSLATORS: Each %s denotes an author name.
+#. You can use line breaks, estimating that each author name occupies
+#. ca. 16 screen columns and that a screen line has ca. 80 columns.
+#: lib/version-etc.c:156
+#, c-format
+msgid ""
+"Written by %s, %s, %s,\n"
+"%s, %s, %s, %s,\n"
+"%s, and %s.\n"
+msgstr ""
+
+#. TRANSLATORS: Each %s denotes an author name.
+#. You can use line breaks, estimating that each author name occupies
+#. ca. 16 screen columns and that a screen line has ca. 80 columns.
+#: lib/version-etc.c:167
+#, c-format
+msgid ""
+"Written by %s, %s, %s,\n"
+"%s, %s, %s, %s,\n"
+"%s, %s, and others.\n"
+msgstr ""
+
+#. TRANSLATORS: The placeholder indicates the bug-reporting address
+#. for this package. Please add _another line_ saying
+#. "Report translation bugs to <...>\n" with the address for translation
+#. bugs (typically your translation team's web or email address).
+#: lib/version-etc.c:245
+#, c-format
+msgid ""
+"\n"
+"Report bugs to: %s\n"
+msgstr ""
+
+#: lib/version-etc.c:247
+#, c-format
+msgid "Report %s bugs to: %s\n"
+msgstr ""
+
+#: lib/version-etc.c:251
+#, c-format
+msgid "%s home page: <%s>\n"
+msgstr ""
+
+#: lib/version-etc.c:253
+#, c-format
+msgid "%s home page: <http://www.gnu.org/software/%s/>\n"
+msgstr ""
+
+#: lib/version-etc.c:256
+msgid "General help using GNU software: <http://www.gnu.org/gethelp/>\n"
+msgstr ""
+
+#: sed/compile.c:146
#, fuzzy
msgid "multiple `!'s"
msgstr "`!' "
-#: sed/compile.c:145
+#: sed/compile.c:147
#, fuzzy
msgid "unexpected `,'"
msgstr "- `,'"
-#: sed/compile.c:146
+#: sed/compile.c:149
#, fuzzy
msgid "invalid usage of +N or ~N as first address"
msgstr " ~N +N- "
-#: sed/compile.c:147
+#: sed/compile.c:150
#, fuzzy
msgid "unmatched `{'"
msgstr "- `{'"
-#: sed/compile.c:148
+#: sed/compile.c:151
#, fuzzy
msgid "unexpected `}'"
msgstr "- `}'"
-#: sed/compile.c:149
+#: sed/compile.c:153
#, fuzzy
msgid "extra characters after command"
msgstr " "
-#: sed/compile.c:150
+#: sed/compile.c:155
msgid "expected \\ after `a', `c' or `i'"
msgstr ""
-#: sed/compile.c:151
+#: sed/compile.c:157
msgid "`}' doesn't want any addresses"
msgstr " `}'"
-#: sed/compile.c:152
+#: sed/compile.c:159
msgid ": doesn't want any addresses"
msgstr " :"
-#: sed/compile.c:153
+#: sed/compile.c:161
#, fuzzy
msgid "comments don't accept any addresses"
msgstr " "
-#: sed/compile.c:154
+#: sed/compile.c:162
#, fuzzy
msgid "missing command"
msgstr " "
-#: sed/compile.c:155
+#: sed/compile.c:163
#, fuzzy
msgid "command only uses one address"
msgstr " "
-#: sed/compile.c:156
+#: sed/compile.c:164
#, fuzzy
msgid "unterminated address regex"
msgstr " "
-#: sed/compile.c:157
+#: sed/compile.c:165
#, fuzzy
msgid "unterminated `s' command"
msgstr " `s' "
-#: sed/compile.c:158
+#: sed/compile.c:166
#, fuzzy
msgid "unterminated `y' command"
msgstr " `y' "
-#: sed/compile.c:159
+#: sed/compile.c:167
#, fuzzy
msgid "unknown option to `s'"
msgstr "`s' - "
-#: sed/compile.c:160
+#: sed/compile.c:169
msgid "multiple `p' options to `s' command"
msgstr "`s' `p' "
-#: sed/compile.c:161
+#: sed/compile.c:171
msgid "multiple `g' options to `s' command"
msgstr "`s' `g' "
-#: sed/compile.c:162
+#: sed/compile.c:173
msgid "multiple number options to `s' command"
msgstr "`s' "
-#: sed/compile.c:163
+#: sed/compile.c:175
msgid "number option to `s' command may not be zero"
msgstr " `s' "
-#: sed/compile.c:164
+#: sed/compile.c:177
#, fuzzy
msgid "strings for `y' command are different lengths"
msgstr " `y' "
-#: sed/compile.c:165
+#: sed/compile.c:179
msgid "delimiter character is not a single-byte character"
msgstr ""
-#: sed/compile.c:166
+#: sed/compile.c:181
msgid "expected newer version of sed"
msgstr ""
-#: sed/compile.c:167
+#: sed/compile.c:183
#, fuzzy
msgid "invalid usage of line address 0"
msgstr " "
-#: sed/compile.c:168
+#: sed/compile.c:184
#, fuzzy, c-format
msgid "unknown command: `%c'"
msgstr "- "
-#: sed/compile.c:169
+#: sed/compile.c:186
#, fuzzy
msgid "incomplete command"
msgstr " "
-#: sed/compile.c:192
+#: sed/compile.c:188
+msgid "\":\" lacks a label"
+msgstr ""
+
+#: sed/compile.c:190
+msgid "recursive escaping after \\c not allowed"
+msgstr ""
+
+#: sed/compile.c:213
#, c-format
msgid "%s: file %s line %lu: %s\n"
msgstr "%s (%s %lu ) %s \n"
-#: sed/compile.c:195
+#: sed/compile.c:216
#, c-format
msgid "%s: -e expression #%lu, char %lu: %s\n"
msgstr "%s (%lu ' -e %lu ' ) %s \n"
-#: sed/compile.c:1657
+#: sed/compile.c:1639
#, fuzzy, c-format
msgid "can't find label for jump to `%s'"
msgstr " `%s' "
-#: sed/execute.c:595
+#: sed/execute.c:264 sed/execute.c:281
+#, c-format
+msgid "case conversion produced an invalid character"
+msgstr ""
+
+#: sed/execute.c:575
#, c-format
msgid "%s: can't read %s: %s\n"
msgstr "%s %s (%s) \n"
-#: sed/execute.c:624
+#: sed/execute.c:600
#, c-format
msgid "couldn't edit %s: is a terminal"
msgstr ""
-#: sed/execute.c:629
+#: sed/execute.c:605
#, c-format
msgid "couldn't edit %s: not a regular file"
msgstr ""
-#: sed/execute.c:640
+#: sed/execute.c:616
#, c-format
msgid "%s: warning: failed to set default file creation context to %s: %s"
msgstr ""
-#: sed/execute.c:647
+#: sed/execute.c:624
#, c-format
msgid "%s: warning: failed to get security context of %s: %s"
msgstr ""
-#: sed/execute.c:664 sed/utils.c:211
+#: sed/execute.c:643 sed/utils.c:178
#, fuzzy, c-format
msgid "couldn't open temporary file %s: %s"
msgstr "%s "
-#: sed/execute.c:1193 sed/execute.c:1373
+#: sed/execute.c:1158 sed/execute.c:1368
msgid "error in subprocess"
msgstr ""
-#: sed/execute.c:1195
+#: sed/execute.c:1160
msgid "option `e' not supported"
msgstr ""
-#: sed/execute.c:1375
+#: sed/execute.c:1349
msgid "`e' command not supported"
msgstr ""
-#: sed/execute.c:1725
+#: sed/execute.c:1675
msgid "no input files"
msgstr ""
-#: sed/regexp.c:39
+#: sed/regexp.c:38
msgid "no previous regular expression"
msgstr ""
-#: sed/regexp.c:40
-msgid "cannot specify modifiers on empty regexp"
-msgstr ""
-
-#: sed/regexp.c:129
+#: sed/regexp.c:138
#, c-format
msgid "invalid reference \\%d on `s' command's RHS"
msgstr ""
-#: sed/sed.c:32
+#: sed/sed.c:35
msgid "Jay Fenlason"
msgstr ""
-#: sed/sed.c:33
+#: sed/sed.c:36
msgid "Tom Lord"
msgstr ""
-#: sed/sed.c:34
+#: sed/sed.c:37
msgid "Ken Pizzini"
msgstr ""
-#: sed/sed.c:35
+#: sed/sed.c:38
msgid "Paolo Bonzini"
msgstr ""
-#: sed/sed.c:79
+#: 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"
msgstr ""
-#: sed/sed.c:86
-#, fuzzy, c-format
-msgid ""
-"E-mail bug reports to: <%s>.\n"
-"Be sure to include the word ``%s'' somewhere in the ``Subject:'' field.\n"
+#: sed/sed.c:120
+#, c-format
+msgid "E-mail bug reports to: <%s>.\n"
msgstr ""
-" .%s (bugs) \n"
-" .(``Subject'') ``'' ``%s'' \n"
-#: sed/sed.c:99
+#: sed/sed.c:129
msgid ""
" -R, --regexp-perl\n"
" use Perl 5's regular expressions syntax in the script.\n"
msgstr ""
-#: sed/sed.c:104
+#: sed/sed.c:134
#, c-format
msgid ""
"Usage: %s [OPTION]... {script-only-if-no-other-script} [input-file]...\n"
"\n"
msgstr ""
-#: sed/sed.c:108
+#: sed/sed.c:138
#, c-format
msgid ""
" -n, --quiet, --silent\n"
" suppress automatic printing of pattern space\n"
msgstr ""
-#: sed/sed.c:110
+#: sed/sed.c:140
#, c-format
msgid ""
" -e script, --expression=script\n"
" add the script to the commands to be executed\n"
msgstr ""
-#: sed/sed.c:112
+#: sed/sed.c:142
#, c-format
msgid ""
" -f script-file, --file=script-file\n"
@@ -277,21 +655,21 @@ msgid ""
"executed\n"
msgstr ""
-#: sed/sed.c:115
+#: sed/sed.c:146
#, c-format
msgid ""
" --follow-symlinks\n"
" follow symlinks when processing in place\n"
msgstr ""
-#: sed/sed.c:118
+#: sed/sed.c:149
#, c-format
msgid ""
" -i[SUFFIX], --in-place[=SUFFIX]\n"
" edit files in place (makes backup if SUFFIX supplied)\n"
msgstr ""
-#: sed/sed.c:121
+#: sed/sed.c:153
#, c-format
msgid ""
" -b, --binary\n"
@@ -299,37 +677,44 @@ msgid ""
"specially)\n"
msgstr ""
-#: sed/sed.c:124
+#: sed/sed.c:157
#, c-format
msgid ""
" -l N, --line-length=N\n"
" specify the desired line-wrap length for the `l' command\n"
msgstr ""
-#: sed/sed.c:126
+#: sed/sed.c:159
#, c-format
msgid ""
" --posix\n"
" disable all GNU extensions.\n"
msgstr ""
-#: sed/sed.c:128
+#: sed/sed.c:161
#, c-format
msgid ""
-" -r, --regexp-extended\n"
-" use extended regular expressions in the script.\n"
+" -E, -r, --regexp-extended\n"
+" use extended regular expressions in the script\n"
+" (for portability use POSIX -E).\n"
msgstr ""
-#: sed/sed.c:133
+#: sed/sed.c:167
#, c-format
msgid ""
" -s, --separate\n"
-" consider files as separate rather than as a single "
-"continuous\n"
-" long stream.\n"
+" consider files as separate rather than as a single,\n"
+" continuous long stream.\n"
+msgstr ""
+
+#: sed/sed.c:170
+#, c-format
+msgid ""
+" --sandbox\n"
+" operate in sandbox mode.\n"
msgstr ""
-#: sed/sed.c:136
+#: sed/sed.c:172
#, c-format
msgid ""
" -u, --unbuffered\n"
@@ -338,24 +723,24 @@ msgid ""
" the output buffers more often\n"
msgstr ""
-#: sed/sed.c:139
+#: sed/sed.c:175
#, c-format
msgid ""
" -z, --null-data\n"
" separate lines by NUL characters\n"
msgstr ""
-#: sed/sed.c:141
+#: sed/sed.c:177
#, c-format
msgid " --help display this help and exit\n"
msgstr ""
-#: sed/sed.c:142
+#: sed/sed.c:178
#, c-format
msgid " --version output version information and exit\n"
msgstr ""
-#: sed/sed.c:143
+#: sed/sed.c:179
#, c-format
msgid ""
"\n"
@@ -366,124 +751,48 @@ msgid ""
"\n"
msgstr ""
-#: sed/utils.c:74 sed/utils.c:432
+#: sed/utils.c:73 sed/utils.c:384
#, fuzzy, c-format
msgid "cannot remove %s: %s"
msgstr "%s %s (%s) \n"
-#: sed/utils.c:144
+#: sed/utils.c:136
#, fuzzy, c-format
msgid "couldn't open file %s: %s"
msgstr "%s "
-#: sed/utils.c:167
+#: sed/utils.c:155
#, fuzzy, c-format
msgid "couldn't attach to %s: %s"
msgstr "%s- (%s) "
-#: sed/utils.c:229
+#: sed/utils.c:192
#, fuzzy, c-format
-msgid "couldn't write %d item to %s: %s"
-msgid_plural "couldn't write %d items to %s: %s"
+msgid "couldn't write %llu item to %s: %s"
+msgid_plural "couldn't write %llu items to %s: %s"
msgstr[0] " %d %s- (%s) "
msgstr[1] " %d %s- (%s) "
-#: sed/utils.c:244 sed/utils.c:267
+#: sed/utils.c:204 sed/utils.c:223
#, c-format
msgid "read error on %s: %s"
msgstr "%s (%s) "
-#: sed/utils.c:372
+#: sed/utils.c:325
#, fuzzy, c-format
msgid "couldn't follow symlink %s: %s"
msgstr "%s- (%s) "
-#: sed/utils.c:406
+#: sed/utils.c:359
#, fuzzy, c-format
msgid "cannot stat %s: %s"
msgstr "%s %s (%s) \n"
-#: sed/utils.c:437
+#: sed/utils.c:389
#, fuzzy, c-format
msgid "cannot rename %s: %s"
msgstr "%s %s (%s) \n"
-#: lib/regcomp.c:132
-msgid "Success"
-msgstr ""
-
-#: lib/regcomp.c:135
-msgid "No match"
-msgstr ""
-
-#: lib/regcomp.c:138
-msgid "Invalid regular expression"
-msgstr ""
-
-#: lib/regcomp.c:141
-msgid "Invalid collation character"
-msgstr ""
-
-#: lib/regcomp.c:144
-msgid "Invalid character class name"
-msgstr ""
-
-#: lib/regcomp.c:147
-msgid "Trailing backslash"
-msgstr ""
-
-#: lib/regcomp.c:150
-msgid "Invalid back reference"
-msgstr ""
-
-#: lib/regcomp.c:153
-#, fuzzy
-msgid "Unmatched [ or [^"
-msgstr "- `{'"
-
-#: lib/regcomp.c:156
-#, fuzzy
-msgid "Unmatched ( or \\("
-msgstr "- `{'"
-
-#: lib/regcomp.c:159
-#, fuzzy
-msgid "Unmatched \\{"
-msgstr "- `{'"
-
-#: lib/regcomp.c:162
-msgid "Invalid content of \\{\\}"
-msgstr ""
-
-#: lib/regcomp.c:165
-msgid "Invalid range end"
-msgstr ""
-
-#: lib/regcomp.c:168
-msgid "Memory exhausted"
-msgstr ""
-
-#: lib/regcomp.c:171
-msgid "Invalid preceding regular expression"
-msgstr ""
-
-#: lib/regcomp.c:174
-msgid "Premature end of regular expression"
-msgstr ""
-
-#: lib/regcomp.c:177
-msgid "Regular expression too big"
-msgstr ""
-
-#: lib/regcomp.c:180
-#, fuzzy
-msgid "Unmatched ) or \\)"
-msgstr "- `{'"
-
-#: lib/regcomp.c:705
-msgid "No previous regular expression"
-msgstr ""
-
#~ msgid "bad regexp: %s\n"
#~ msgstr "%s \n"
@@ -547,6 +856,13 @@ msgstr ""
#~ "\n"
#~ msgid ""
+#~ "E-mail bug reports to: %s .\n"
+#~ "Be sure to include the word ``%s'' somewhere in the ``Subject:'' field.\n"
+#~ msgstr ""
+#~ " .%s (bugs) \n"
+#~ " .(``Subject'') ``'' ``%s'' \n"
+
+#~ msgid ""
#~ "%s\n"
#~ "This is free software; see the source for copying conditions. There is "
#~ "NO\n"
diff --git a/po/hr.gmo b/po/hr.gmo
index 3c090c1..fb9a201 100644
--- a/po/hr.gmo
+++ b/po/hr.gmo
Binary files differ
diff --git a/po/hr.po b/po/hr.po
index 4205ec7..a75aa64 100644
--- a/po/hr.po
+++ b/po/hr.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: 2012-12-22 14:36+0100\n"
+"POT-Creation-Date: 2016-12-30 00:59-0800\n"
"PO-Revision-Date: 2012-07-04 18:15+0200\n"
"Last-Translator: Tomislav Krznar <tomislav.krznar@gmail.com>\n"
"Language-Team: Croatian <lokalizacija@linux.hr>\n"
@@ -16,209 +16,596 @@ msgstr ""
"MIME-Version: 1.0\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=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"
-#: sed/compile.c:144
+#: lib/closeout.c:112
+msgid "write error"
+msgstr ""
+
+#: lib/copy-acl.c:54
+#, c-format
+msgid "preserving permissions for %s"
+msgstr ""
+
+#: lib/dfa.c:1025 lib/dfa.c:1028 lib/dfa.c:1047 lib/dfa.c:1057 lib/dfa.c:1070
+#: lib/dfa.c:1098 lib/dfa.c:1107 lib/dfa.c:1110 lib/dfa.c:1115 lib/dfa.c:1137
+#: lib/dfa.c:1140
+msgid "unbalanced ["
+msgstr ""
+
+#: lib/dfa.c:1083
+#, fuzzy
+msgid "invalid character class"
+msgstr "Neispravno ime razreda znakova"
+
+#: lib/dfa.c:1206
+msgid "character class syntax is [[:space:]], not [:space:]"
+msgstr ""
+
+#: lib/dfa.c:1275
+msgid "unfinished \\ escape"
+msgstr ""
+
+#: lib/dfa.c:1436
+#, fuzzy
+msgid "invalid content of \\{\\}"
+msgstr "Neispravan sadržaj \\{\\}"
+
+#: lib/dfa.c:1439
+#, fuzzy
+msgid "regular expression too big"
+msgstr "Regularni izraz je prevelik"
+
+#: lib/dfa.c:1853
+msgid "unbalanced ("
+msgstr ""
+
+#: lib/dfa.c:1980
+msgid "no syntax specified"
+msgstr ""
+
+#: lib/dfa.c:1988
+msgid "unbalanced )"
+msgstr ""
+
+#: lib/error.c:191
+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 ""
+
+#: lib/getopt.c:654 lib/getopt.c:658
+#, c-format
+msgid "%s: option '--%s' doesn't allow an argument\n"
+msgstr ""
+
+#: 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:715 lib/getopt.c:734
+#, c-format
+msgid "%s: option '--%s' requires an argument\n"
+msgstr ""
+
+#: 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
+#, 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
+#, 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 "Memorija iscrpljena"
+
+#. TRANSLATORS:
+#. Get translations for open and closing quotation marks.
+#. The message catalog should translate "`" to a left
+#. quotation mark suitable for the locale, and similarly for
+#. "'". For example, a French Unicode local should translate
+#. these to U+00AB (LEFT-POINTING DOUBLE ANGLE
+#. QUOTATION MARK), and U+00BB (RIGHT-POINTING DOUBLE ANGLE
+#. QUOTATION MARK), respectively.
+#.
+#. If the catalog has no translation, we will try to
+#. use Unicode U+2018 (LEFT SINGLE QUOTATION MARK) and
+#. Unicode U+2019 (RIGHT SINGLE QUOTATION MARK). If the
+#. current locale is not Unicode, locale_quoting_style
+#. will quote 'like this', and clocale_quoting_style will
+#. quote "like this". You should always include translations
+#. for "`" and "'" even if U+2018 and U+2019 are appropriate
+#. for your locale.
+#.
+#. If you don't know what to put here, please see
+#. <http://en.wikipedia.org/wiki/Quotation_marks_in_other_languages>
+#. and use glyphs suitable for your language.
+#: lib/quotearg.c:354
+msgid "`"
+msgstr ""
+
+#: lib/quotearg.c:355
+msgid "'"
+msgstr ""
+
+#: lib/regcomp.c:135
+msgid "Success"
+msgstr "Uspjeh"
+
+#: lib/regcomp.c:138
+msgid "No match"
+msgstr "Nema poklapanja"
+
+#: lib/regcomp.c:141
+msgid "Invalid regular expression"
+msgstr "Neispravan regularni izraz"
+
+#: lib/regcomp.c:144
+msgid "Invalid collation character"
+msgstr "Neispravan znak razvrstavanja"
+
+#: lib/regcomp.c:147
+msgid "Invalid character class name"
+msgstr "Neispravno ime razreda znakova"
+
+#: lib/regcomp.c:150
+msgid "Trailing backslash"
+msgstr "Obrnuta kosa crta na kraju"
+
+#: lib/regcomp.c:153
+msgid "Invalid back reference"
+msgstr "Neispravna povratna referenca"
+
+#: lib/regcomp.c:156
+#, fuzzy
+msgid "Unmatched [, [^, [:, [., or [="
+msgstr "Neuparena [ ili [^"
+
+#: lib/regcomp.c:159
+msgid "Unmatched ( or \\("
+msgstr "Neuparena ( ili \\("
+
+#: lib/regcomp.c:162
+msgid "Unmatched \\{"
+msgstr "Neuparena \\{"
+
+#: lib/regcomp.c:165
+msgid "Invalid content of \\{\\}"
+msgstr "Neispravan sadržaj \\{\\}"
+
+#: lib/regcomp.c:168
+msgid "Invalid range end"
+msgstr "Neispravan kraj raspona"
+
+#: lib/regcomp.c:171
+msgid "Memory exhausted"
+msgstr "Memorija iscrpljena"
+
+#: lib/regcomp.c:174
+msgid "Invalid preceding regular expression"
+msgstr "Neispravan prethodni regularni izraz"
+
+#: lib/regcomp.c:177
+msgid "Premature end of regular expression"
+msgstr "Preuranjen kraj regularnog izraza"
+
+#: lib/regcomp.c:180
+msgid "Regular expression too big"
+msgstr "Regularni izraz je prevelik"
+
+#: lib/regcomp.c:183
+msgid "Unmatched ) or \\)"
+msgstr "Neuparena ) ili \\)"
+
+#: lib/regcomp.c:687
+msgid "No previous regular expression"
+msgstr "Nedostaje prethodni regularni izraz"
+
+#: lib/set-acl.c:46
+#, c-format
+msgid "setting permissions for %s"
+msgstr ""
+
+#: lib/version-etc.c:74
+#, c-format
+msgid "Packaged by %s (%s)\n"
+msgstr ""
+
+#: lib/version-etc.c:77
+#, c-format
+msgid "Packaged by %s\n"
+msgstr ""
+
+#. 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 ""
+
+#: lib/version-etc.c:86
+msgid ""
+"\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"
+msgstr ""
+
+#. TRANSLATORS: %s denotes an author name.
+#: lib/version-etc.c:102
+#, c-format
+msgid "Written by %s.\n"
+msgstr ""
+
+#. TRANSLATORS: Each %s denotes an author name.
+#: lib/version-etc.c:106
+#, c-format
+msgid "Written by %s and %s.\n"
+msgstr ""
+
+#. TRANSLATORS: Each %s denotes an author name.
+#: lib/version-etc.c:110
+#, c-format
+msgid "Written by %s, %s, and %s.\n"
+msgstr ""
+
+#. TRANSLATORS: Each %s denotes an author name.
+#. You can use line breaks, estimating that each author name occupies
+#. ca. 16 screen columns and that a screen line has ca. 80 columns.
+#: lib/version-etc.c:117
+#, c-format
+msgid ""
+"Written by %s, %s, %s,\n"
+"and %s.\n"
+msgstr ""
+
+#. TRANSLATORS: Each %s denotes an author name.
+#. You can use line breaks, estimating that each author name occupies
+#. ca. 16 screen columns and that a screen line has ca. 80 columns.
+#: lib/version-etc.c:124
+#, c-format
+msgid ""
+"Written by %s, %s, %s,\n"
+"%s, and %s.\n"
+msgstr ""
+
+#. TRANSLATORS: Each %s denotes an author name.
+#. You can use line breaks, estimating that each author name occupies
+#. ca. 16 screen columns and that a screen line has ca. 80 columns.
+#: lib/version-etc.c:131
+#, c-format
+msgid ""
+"Written by %s, %s, %s,\n"
+"%s, %s, and %s.\n"
+msgstr ""
+
+#. TRANSLATORS: Each %s denotes an author name.
+#. You can use line breaks, estimating that each author name occupies
+#. ca. 16 screen columns and that a screen line has ca. 80 columns.
+#: lib/version-etc.c:139
+#, c-format
+msgid ""
+"Written by %s, %s, %s,\n"
+"%s, %s, %s, and %s.\n"
+msgstr ""
+
+#. TRANSLATORS: Each %s denotes an author name.
+#. You can use line breaks, estimating that each author name occupies
+#. ca. 16 screen columns and that a screen line has ca. 80 columns.
+#: lib/version-etc.c:147
+#, c-format
+msgid ""
+"Written by %s, %s, %s,\n"
+"%s, %s, %s, %s,\n"
+"and %s.\n"
+msgstr ""
+
+#. TRANSLATORS: Each %s denotes an author name.
+#. You can use line breaks, estimating that each author name occupies
+#. ca. 16 screen columns and that a screen line has ca. 80 columns.
+#: lib/version-etc.c:156
+#, c-format
+msgid ""
+"Written by %s, %s, %s,\n"
+"%s, %s, %s, %s,\n"
+"%s, and %s.\n"
+msgstr ""
+
+#. TRANSLATORS: Each %s denotes an author name.
+#. You can use line breaks, estimating that each author name occupies
+#. ca. 16 screen columns and that a screen line has ca. 80 columns.
+#: lib/version-etc.c:167
+#, c-format
+msgid ""
+"Written by %s, %s, %s,\n"
+"%s, %s, %s, %s,\n"
+"%s, %s, and others.\n"
+msgstr ""
+
+#. TRANSLATORS: The placeholder indicates the bug-reporting address
+#. for this package. Please add _another line_ saying
+#. "Report translation bugs to <...>\n" with the address for translation
+#. bugs (typically your translation team's web or email address).
+#: lib/version-etc.c:245
+#, c-format
+msgid ""
+"\n"
+"Report bugs to: %s\n"
+msgstr ""
+
+#: lib/version-etc.c:247
+#, c-format
+msgid "Report %s bugs to: %s\n"
+msgstr ""
+
+#: lib/version-etc.c:251
+#, c-format
+msgid "%s home page: <%s>\n"
+msgstr ""
+
+#: lib/version-etc.c:253
+#, c-format
+msgid "%s home page: <http://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"
+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"
+
+#: sed/compile.c:146
msgid "multiple `!'s"
msgstr "višestruki „!”"
-#: sed/compile.c:145
+#: sed/compile.c:147
msgid "unexpected `,'"
msgstr "neočekivani „,”"
-#: sed/compile.c:146
+#: sed/compile.c:149
msgid "invalid usage of +N or ~N as first address"
msgstr "neispravno korištenje +N ili ~N za prvu adresu"
-#: sed/compile.c:147
+#: sed/compile.c:150
msgid "unmatched `{'"
msgstr "neuparena „{”"
-#: sed/compile.c:148
+#: sed/compile.c:151
msgid "unexpected `}'"
msgstr "neočekivana „}”"
-#: sed/compile.c:149
+#: sed/compile.c:153
msgid "extra characters after command"
msgstr "višak znakova nakon naredbe"
-#: sed/compile.c:150
+#: sed/compile.c:155
msgid "expected \\ after `a', `c' or `i'"
msgstr "očekujem \\ nakon „a”, „c” ili „i”"
-#: sed/compile.c:151
+#: sed/compile.c:157
msgid "`}' doesn't want any addresses"
msgstr "„}” ne želi nikakve adrese"
-#: sed/compile.c:152
+#: sed/compile.c:159
msgid ": doesn't want any addresses"
msgstr ": ne želi nikakve adrese"
-#: sed/compile.c:153
+#: sed/compile.c:161
msgid "comments don't accept any addresses"
msgstr "komentari ne prihvaćaju adrese"
-#: sed/compile.c:154
+#: sed/compile.c:162
msgid "missing command"
msgstr "nedostaje naredba"
-#: sed/compile.c:155
+#: sed/compile.c:163
msgid "command only uses one address"
msgstr "naredba koristi samo jednu adresu"
-#: sed/compile.c:156
+#: sed/compile.c:164
msgid "unterminated address regex"
msgstr "nezavršeni regularni izraz adrese"
-#: sed/compile.c:157
+#: sed/compile.c:165
msgid "unterminated `s' command"
msgstr "nezavršena naredba „s”"
-#: sed/compile.c:158
+#: sed/compile.c:166
msgid "unterminated `y' command"
msgstr "nezavršena naredba „y”"
-#: sed/compile.c:159
+#: sed/compile.c:167
msgid "unknown option to `s'"
msgstr "nepoznata opcija za „s”"
-#: sed/compile.c:160
+#: sed/compile.c:169
msgid "multiple `p' options to `s' command"
msgstr "višestruke opcije „p” za naredbu „s”"
-#: sed/compile.c:161
+#: sed/compile.c:171
msgid "multiple `g' options to `s' command"
msgstr "višestruke opcije „g” za naredbu „s”"
-#: sed/compile.c:162
+#: sed/compile.c:173
msgid "multiple number options to `s' command"
msgstr "višestruke brojčane opcije za naredbu „s”"
-#: sed/compile.c:163
+#: 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"
-#: sed/compile.c:164
+#: sed/compile.c:177
msgid "strings for `y' command are different lengths"
msgstr "znakovni nizovi za naredbu „y” su različitih duljina"
-#: sed/compile.c:165
+#: sed/compile.c:179
msgid "delimiter character is not a single-byte character"
msgstr "znak razdvajanja nije jednobajtni znak"
-#: sed/compile.c:166
+#: sed/compile.c:181
msgid "expected newer version of sed"
msgstr "očekujem noviju inačicu programa sed"
-#: sed/compile.c:167
+#: sed/compile.c:183
msgid "invalid usage of line address 0"
msgstr "neispravno korištenje adrese retka 0"
-#: sed/compile.c:168
+#: sed/compile.c:184
#, c-format
msgid "unknown command: `%c'"
msgstr "nepoznata naredba: „%c”"
-#: sed/compile.c:169
+#: sed/compile.c:186
#, fuzzy
msgid "incomplete command"
msgstr "nedostaje naredba"
-#: sed/compile.c:192
+#: sed/compile.c:188
+msgid "\":\" lacks a label"
+msgstr ""
+
+#: sed/compile.c:190
+msgid "recursive escaping after \\c not allowed"
+msgstr ""
+
+#: sed/compile.c:213
#, c-format
msgid "%s: file %s line %lu: %s\n"
msgstr "%s: datoteka %s redak %lu: %s\n"
-#: sed/compile.c:195
+#: sed/compile.c:216
#, c-format
msgid "%s: -e expression #%lu, char %lu: %s\n"
msgstr "%s: -e izraz #%lu, znak %lu: %s\n"
-#: sed/compile.c:1657
+#: sed/compile.c:1639
#, c-format
msgid "can't find label for jump to `%s'"
msgstr "ne mogu pronaći oznaku na koju bi trebalo skočiti „%s”"
-#: sed/execute.c:595
+#: sed/execute.c:264 sed/execute.c:281
+#, c-format
+msgid "case conversion produced an invalid character"
+msgstr ""
+
+#: sed/execute.c:575
#, c-format
msgid "%s: can't read %s: %s\n"
msgstr "%s: ne mogu čitati %s: %s\n"
-#: sed/execute.c:624
+#: sed/execute.c:600
#, c-format
msgid "couldn't edit %s: is a terminal"
msgstr "ne mogu urediti %s: to je terminal"
-#: sed/execute.c:629
+#: sed/execute.c:605
#, c-format
msgid "couldn't edit %s: not a regular file"
msgstr "ne mogu urediti %s: nije obična datoteka"
-#: sed/execute.c:640
+#: sed/execute.c:616
#, 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"
-#: sed/execute.c:647
+#: sed/execute.c:624
#, c-format
msgid "%s: warning: failed to get security context of %s: %s"
msgstr "%s: upozorenje: nisam uspio dohvatiti sigurnosni kontekst %s: %s"
-#: sed/execute.c:664 sed/utils.c:211
+#: sed/execute.c:643 sed/utils.c:178
#, c-format
msgid "couldn't open temporary file %s: %s"
msgstr "ne mogu otvoriti privremenu datoteku %s: %s"
-#: sed/execute.c:1193 sed/execute.c:1373
+#: sed/execute.c:1158 sed/execute.c:1368
msgid "error in subprocess"
msgstr "greška u potprocesu"
-#: sed/execute.c:1195
+#: sed/execute.c:1160
msgid "option `e' not supported"
msgstr "opcija „e” nije podržana"
-#: sed/execute.c:1375
+#: sed/execute.c:1349
msgid "`e' command not supported"
msgstr "naredba „e” nije podržana"
-#: sed/execute.c:1725
+#: sed/execute.c:1675
msgid "no input files"
msgstr "nema ulaznih datoteka"
-#: sed/regexp.c:39
+#: sed/regexp.c:38
msgid "no previous regular expression"
msgstr "nedostaje prethodni regularni izraz"
-#: sed/regexp.c:40
-msgid "cannot specify modifiers on empty regexp"
-msgstr "ne možete navesti modifikatore praznog regularnog izraza"
-
-#: sed/regexp.c:129
+#: sed/regexp.c:138
#, c-format
msgid "invalid reference \\%d on `s' command's RHS"
msgstr "neispravna referenca \\%d na RHS-u naredbe „s”"
-#: sed/sed.c:32
+#: sed/sed.c:35
msgid "Jay Fenlason"
msgstr ""
-#: sed/sed.c:33
+#: sed/sed.c:36
msgid "Tom Lord"
msgstr ""
-#: sed/sed.c:34
+#: sed/sed.c:37
msgid "Ken Pizzini"
msgstr ""
-#: sed/sed.c:35
+#: sed/sed.c:38
msgid "Paolo Bonzini"
msgstr ""
-#: sed/sed.c:79
+#: sed/sed.c:113
#, c-format
msgid ""
"GNU sed home page: <http://www.gnu.org/software/sed/>.\n"
@@ -227,16 +614,12 @@ 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"
-#: sed/sed.c:86
+#: sed/sed.c:120
#, c-format
-msgid ""
-"E-mail bug reports to: <%s>.\n"
-"Be sure to include the word ``%s'' somewhere in the ``Subject:'' field.\n"
+msgid "E-mail bug reports to: <%s>.\n"
msgstr ""
-"Prijavite greške na: <%s>.\n"
-"Obavezno dodajte riječ „%s” u polju „Predmet:”.\n"
-#: sed/sed.c:99
+#: sed/sed.c:129
msgid ""
" -R, --regexp-perl\n"
" use Perl 5's regular expressions syntax in the script.\n"
@@ -244,7 +627,7 @@ msgstr ""
" -R, --regexp-perl\n"
" koristi Perl 5 sintaksu regularnih izraza u skripti.\n"
-#: sed/sed.c:104
+#: sed/sed.c:134
#, c-format
msgid ""
"Usage: %s [OPTION]... {script-only-if-no-other-script} [input-file]...\n"
@@ -253,7 +636,7 @@ msgstr ""
"Uporaba: %s [OPCIJA]... {skripta-samo-ako-nema-drugih} [ulazna-datoteka]...\n"
"\n"
-#: sed/sed.c:108
+#: sed/sed.c:138
#, c-format
msgid ""
" -n, --quiet, --silent\n"
@@ -262,7 +645,7 @@ msgstr ""
" -n, --quiet, --silent\n"
" izostavi automatsko ispisivanje prostora uzoraka\n"
-#: sed/sed.c:110
+#: sed/sed.c:140
#, c-format
msgid ""
" -e script, --expression=script\n"
@@ -271,7 +654,7 @@ msgstr ""
" -e script, --expression=script\n"
" dodaj skriptu naredbama koje će se izvršiti\n"
-#: sed/sed.c:112
+#: sed/sed.c:142
#, c-format
msgid ""
" -f script-file, --file=script-file\n"
@@ -282,7 +665,7 @@ msgstr ""
" dodaj sadržaj datoteke skripte naredbama koje će se "
"izvršiti\n"
-#: sed/sed.c:115
+#: sed/sed.c:146
#, c-format
msgid ""
" --follow-symlinks\n"
@@ -291,7 +674,7 @@ msgstr ""
" --follow-symlinks\n"
" slijedi simboličke veze dok je obrada u tijeku\n"
-#: sed/sed.c:118
+#: sed/sed.c:149
#, fuzzy, c-format
msgid ""
" -i[SUFFIX], --in-place[=SUFFIX]\n"
@@ -301,7 +684,7 @@ msgstr ""
" uredi datoteke bez kopiranja (osim ako je navedena "
"ekstenzija)\n"
-#: sed/sed.c:121
+#: sed/sed.c:153
#, c-format
msgid ""
" -b, --binary\n"
@@ -312,7 +695,7 @@ msgstr ""
" otvori datoteke u binarnom načinu (CR+LF se posebno ne "
"obrađuje)\n"
-#: sed/sed.c:124
+#: sed/sed.c:157
#, c-format
msgid ""
" -l N, --line-length=N\n"
@@ -321,7 +704,7 @@ msgstr ""
" -l N, --line-length=N\n"
" navodi željeno prelamanje redaka za naredbu „l”\n"
-#: sed/sed.c:126
+#: sed/sed.c:159
#, c-format
msgid ""
" --posix\n"
@@ -330,29 +713,36 @@ msgstr ""
" --posix\n"
" onemogućuje sva GNU proširenja.\n"
-#: sed/sed.c:128
-#, c-format
+#: sed/sed.c:161
+#, fuzzy, c-format
msgid ""
-" -r, --regexp-extended\n"
-" use extended regular expressions in the script.\n"
+" -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"
-#: sed/sed.c:133
-#, c-format
+#: sed/sed.c:167
+#, fuzzy, c-format
msgid ""
" -s, --separate\n"
-" consider files as separate rather than as a single "
-"continuous\n"
-" long stream.\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"
-#: sed/sed.c:136
+#: sed/sed.c:170
+#, c-format
+msgid ""
+" --sandbox\n"
+" operate in sandbox mode.\n"
+msgstr ""
+
+#: sed/sed.c:172
#, c-format
msgid ""
" -u, --unbuffered\n"
@@ -364,24 +754,24 @@ msgstr ""
" učitava minimalne količine podataka iz ulaznih datoteka i\n"
" češće prazni izlazne međuspremnike\n"
-#: sed/sed.c:139
+#: sed/sed.c:175
#, c-format
msgid ""
" -z, --null-data\n"
" separate lines by NUL characters\n"
msgstr ""
-#: sed/sed.c:141
+#: sed/sed.c:177
#, c-format
msgid " --help display this help and exit\n"
msgstr " --help prikaži ovu pomoć i izađi\n"
-#: sed/sed.c:142
+#: 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"
-#: sed/sed.c:143
+#: sed/sed.c:179
#, c-format
msgid ""
"\n"
@@ -398,120 +788,58 @@ msgstr ""
"standardnog ulaza.\n"
"\n"
-#: sed/utils.c:74 sed/utils.c:432
+#: sed/utils.c:73 sed/utils.c:384
#, c-format
msgid "cannot remove %s: %s"
msgstr "ne mogu ukloniti %s: %s"
-#: sed/utils.c:144
+#: sed/utils.c:136
#, c-format
msgid "couldn't open file %s: %s"
msgstr "ne mogu otvoriti datoteku %s: %s"
-#: sed/utils.c:167
+#: sed/utils.c:155
#, c-format
msgid "couldn't attach to %s: %s"
msgstr "ne mogu povezati na %s: %s"
-#: sed/utils.c:229
-#, c-format
-msgid "couldn't write %d item to %s: %s"
-msgid_plural "couldn't write %d items to %s: %s"
+#: sed/utils.c:192
+#, fuzzy, 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"
-#: sed/utils.c:244 sed/utils.c:267
+#: sed/utils.c:204 sed/utils.c:223
#, c-format
msgid "read error on %s: %s"
msgstr "greška čitanja na %s: %s"
-#: sed/utils.c:372
+#: sed/utils.c:325
#, c-format
msgid "couldn't follow symlink %s: %s"
msgstr "ne mogu slijediti simboličku vezu %s: %s"
-#: sed/utils.c:406
+#: sed/utils.c:359
#, c-format
msgid "cannot stat %s: %s"
msgstr "ne mogu izvršiti stat %s: %s"
-#: sed/utils.c:437
+#: sed/utils.c:389
#, c-format
msgid "cannot rename %s: %s"
msgstr "ne mogu preimenovati %s: %s"
-#: lib/regcomp.c:132
-msgid "Success"
-msgstr "Uspjeh"
-
-#: lib/regcomp.c:135
-msgid "No match"
-msgstr "Nema poklapanja"
+#~ msgid "cannot specify modifiers on empty regexp"
+#~ msgstr "ne možete navesti modifikatore praznog regularnog izraza"
-#: lib/regcomp.c:138
-msgid "Invalid regular expression"
-msgstr "Neispravan regularni izraz"
-
-#: lib/regcomp.c:141
-msgid "Invalid collation character"
-msgstr "Neispravan znak razvrstavanja"
-
-#: lib/regcomp.c:144
-msgid "Invalid character class name"
-msgstr "Neispravno ime razreda znakova"
-
-#: lib/regcomp.c:147
-msgid "Trailing backslash"
-msgstr "Obrnuta kosa crta na kraju"
-
-#: lib/regcomp.c:150
-msgid "Invalid back reference"
-msgstr "Neispravna povratna referenca"
-
-#: lib/regcomp.c:153
-msgid "Unmatched [ or [^"
-msgstr "Neuparena [ ili [^"
-
-#: lib/regcomp.c:156
-msgid "Unmatched ( or \\("
-msgstr "Neuparena ( ili \\("
-
-#: lib/regcomp.c:159
-msgid "Unmatched \\{"
-msgstr "Neuparena \\{"
-
-#: lib/regcomp.c:162
-msgid "Invalid content of \\{\\}"
-msgstr "Neispravan sadržaj \\{\\}"
-
-#: lib/regcomp.c:165
-msgid "Invalid range end"
-msgstr "Neispravan kraj raspona"
-
-#: lib/regcomp.c:168
-msgid "Memory exhausted"
-msgstr "Memorija iscrpljena"
-
-#: lib/regcomp.c:171
-msgid "Invalid preceding regular expression"
-msgstr "Neispravan prethodni regularni izraz"
-
-#: lib/regcomp.c:174
-msgid "Premature end of regular expression"
-msgstr "Preuranjen kraj regularnog izraza"
-
-#: lib/regcomp.c:177
-msgid "Regular expression too big"
-msgstr "Regularni izraz je prevelik"
-
-#: lib/regcomp.c:180
-msgid "Unmatched ) or \\)"
-msgstr "Neuparena ) ili \\)"
-
-#: lib/regcomp.c:705
-msgid "No previous regular expression"
-msgstr "Nedostaje prethodni regularni izraz"
+#~ msgid ""
+#~ "E-mail bug reports to: <%s>.\n"
+#~ "Be sure to include the word ``%s'' somewhere in the ``Subject:'' field.\n"
+#~ msgstr ""
+#~ "Prijavite greške na: <%s>.\n"
+#~ "Obavezno dodajte riječ „%s” u polju „Predmet:”.\n"
#~ msgid "super-sed version %s\n"
#~ msgstr "super-sed inačica %s\n"
diff --git a/po/hu.gmo b/po/hu.gmo
index 3eb85c7..c12ecee 100644
--- a/po/hu.gmo
+++ b/po/hu.gmo
Binary files differ
diff --git a/po/hu.po b/po/hu.po
index 551dfd6..9048331 100644
--- a/po/hu.po
+++ b/po/hu.po
@@ -1,344 +1,755 @@
-# A GNU sed magyar fordtsa
-# Copyright (C) 2002 Free Software Foundation, Inc.
-# Mihly Gyulai <gyulai@fbi.hu>, 2003,2004.
-# First translator: Gbor Istvn <stive@mezobereny.hu>, 2002.
+# Hungarian translation of sed
+# Copyright (C) 2002, 2014, 2016 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.
msgid ""
msgstr ""
-"Project-Id-Version: sed 4.1.1\n"
+"Project-Id-Version: sed 4.2.2\n"
"Report-Msgid-Bugs-To: bug-gnu-utils@gnu.org\n"
-"POT-Creation-Date: 2012-12-22 14:36+0100\n"
-"PO-Revision-Date: 2004-07-20 18:49+0200\n"
-"Last-Translator: Mihly Gyulai <gyulai@fbi.hu>\n"
+"POT-Creation-Date: 2016-12-30 00:59-0800\n"
+"PO-Revision-Date: 2016-06-19 13:19+0200\n"
+"Last-Translator: Balazs Ur <urbalazs@gmail.com>\n"
"Language-Team: Hungarian <translation-team-hu@lists.sourceforge.net>\n"
"Language: hu\n"
"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=ISO-8859-2\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=1; plural=0;\n"
+"X-Generator: Lokalize 1.5\n"
-#: sed/compile.c:144
+#: lib/closeout.c:112
+msgid "write error"
+msgstr ""
+
+#: lib/copy-acl.c:54
+#, c-format
+msgid "preserving permissions for %s"
+msgstr ""
+
+#: lib/dfa.c:1025 lib/dfa.c:1028 lib/dfa.c:1047 lib/dfa.c:1057 lib/dfa.c:1070
+#: lib/dfa.c:1098 lib/dfa.c:1107 lib/dfa.c:1110 lib/dfa.c:1115 lib/dfa.c:1137
+#: lib/dfa.c:1140
+msgid "unbalanced ["
+msgstr ""
+
+#: lib/dfa.c:1083
+#, fuzzy
+msgid "invalid character class"
+msgstr "Érvénytelen karakterosztály-név"
+
+#: lib/dfa.c:1206
+msgid "character class syntax is [[:space:]], not [:space:]"
+msgstr ""
+
+#: lib/dfa.c:1275
+msgid "unfinished \\ escape"
+msgstr ""
+
+#: lib/dfa.c:1436
+#, fuzzy
+msgid "invalid content of \\{\\}"
+msgstr "\\{\\}-nek érvénytelen a tartalma"
+
+#: lib/dfa.c:1439
+#, fuzzy
+msgid "regular expression too big"
+msgstr "Túl nagy reguláris kifejezés"
+
+#: lib/dfa.c:1853
+msgid "unbalanced ("
+msgstr ""
+
+#: lib/dfa.c:1980
+msgid "no syntax specified"
+msgstr ""
+
+#: lib/dfa.c:1988
+msgid "unbalanced )"
+msgstr ""
+
+#: lib/error.c:191
+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 ""
+
+#: lib/getopt.c:654 lib/getopt.c:658
+#, c-format
+msgid "%s: option '--%s' doesn't allow an argument\n"
+msgstr ""
+
+#: 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:715 lib/getopt.c:734
+#, c-format
+msgid "%s: option '--%s' requires an argument\n"
+msgstr ""
+
+#: 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
+#, 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
+#, 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 "Elfogyott a memória"
+
+#. TRANSLATORS:
+#. Get translations for open and closing quotation marks.
+#. The message catalog should translate "`" to a left
+#. quotation mark suitable for the locale, and similarly for
+#. "'". For example, a French Unicode local should translate
+#. these to U+00AB (LEFT-POINTING DOUBLE ANGLE
+#. QUOTATION MARK), and U+00BB (RIGHT-POINTING DOUBLE ANGLE
+#. QUOTATION MARK), respectively.
+#.
+#. If the catalog has no translation, we will try to
+#. use Unicode U+2018 (LEFT SINGLE QUOTATION MARK) and
+#. Unicode U+2019 (RIGHT SINGLE QUOTATION MARK). If the
+#. current locale is not Unicode, locale_quoting_style
+#. will quote 'like this', and clocale_quoting_style will
+#. quote "like this". You should always include translations
+#. for "`" and "'" even if U+2018 and U+2019 are appropriate
+#. for your locale.
+#.
+#. If you don't know what to put here, please see
+#. <http://en.wikipedia.org/wiki/Quotation_marks_in_other_languages>
+#. and use glyphs suitable for your language.
+#: lib/quotearg.c:354
+msgid "`"
+msgstr ""
+
+#: lib/quotearg.c:355
+msgid "'"
+msgstr ""
+
+#: lib/regcomp.c:135
+msgid "Success"
+msgstr "Sikeres"
+
+#: lib/regcomp.c:138
+msgid "No match"
+msgstr "Nincs találat"
+
+#: lib/regcomp.c:141
+msgid "Invalid regular expression"
+msgstr "Érvénytelen reguláris kifejezés"
+
+#: lib/regcomp.c:144
+msgid "Invalid collation character"
+msgstr "Érvénytelen összehasonlító karakter"
+
+#: lib/regcomp.c:147
+msgid "Invalid character class name"
+msgstr "Érvénytelen karakterosztály-név"
+
+#: lib/regcomp.c:150
+msgid "Trailing backslash"
+msgstr "Lezáró fordított perjel"
+
+#: lib/regcomp.c:153
+msgid "Invalid back reference"
+msgstr "Érvénytelen vissza-hivatkozás"
+
+#: lib/regcomp.c:156
+#, fuzzy
+msgid "Unmatched [, [^, [:, [., or [="
+msgstr "Nincs párban [ vagy [^"
+
+#: lib/regcomp.c:159
+msgid "Unmatched ( or \\("
+msgstr "Nincs párban ( vagy \\("
+
+#: lib/regcomp.c:162
+msgid "Unmatched \\{"
+msgstr "Nincs párban \\{"
+
+#: lib/regcomp.c:165
+msgid "Invalid content of \\{\\}"
+msgstr "\\{\\}-nek érvénytelen a tartalma"
+
+#: lib/regcomp.c:168
+msgid "Invalid range end"
+msgstr "Érvénytelen tartományvég"
+
+#: lib/regcomp.c:171
+msgid "Memory exhausted"
+msgstr "Elfogyott a memória"
+
+#: lib/regcomp.c:174
+msgid "Invalid preceding regular expression"
+msgstr "Érvénytelen megelőző reguláris kifejezés"
+
+#: lib/regcomp.c:177
+msgid "Premature end of regular expression"
+msgstr "Reguláris kifejezés túl korai vége"
+
+#: lib/regcomp.c:180
+msgid "Regular expression too big"
+msgstr "Túl nagy reguláris kifejezés"
+
+#: lib/regcomp.c:183
+msgid "Unmatched ) or \\)"
+msgstr "Nincs párban ) vagy \\)"
+
+#: lib/regcomp.c:687
+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 ""
+
+#: lib/version-etc.c:74
+#, c-format
+msgid "Packaged by %s (%s)\n"
+msgstr ""
+
+#: lib/version-etc.c:77
+#, c-format
+msgid "Packaged by %s\n"
+msgstr ""
+
+#. 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 ""
+
+#: lib/version-etc.c:86
+msgid ""
+"\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"
+msgstr ""
+
+#. TRANSLATORS: %s denotes an author name.
+#: lib/version-etc.c:102
+#, c-format
+msgid "Written by %s.\n"
+msgstr ""
+
+#. TRANSLATORS: Each %s denotes an author name.
+#: lib/version-etc.c:106
+#, c-format
+msgid "Written by %s and %s.\n"
+msgstr ""
+
+#. TRANSLATORS: Each %s denotes an author name.
+#: lib/version-etc.c:110
+#, c-format
+msgid "Written by %s, %s, and %s.\n"
+msgstr ""
+
+#. TRANSLATORS: Each %s denotes an author name.
+#. You can use line breaks, estimating that each author name occupies
+#. ca. 16 screen columns and that a screen line has ca. 80 columns.
+#: lib/version-etc.c:117
+#, c-format
+msgid ""
+"Written by %s, %s, %s,\n"
+"and %s.\n"
+msgstr ""
+
+#. TRANSLATORS: Each %s denotes an author name.
+#. You can use line breaks, estimating that each author name occupies
+#. ca. 16 screen columns and that a screen line has ca. 80 columns.
+#: lib/version-etc.c:124
+#, c-format
+msgid ""
+"Written by %s, %s, %s,\n"
+"%s, and %s.\n"
+msgstr ""
+
+#. TRANSLATORS: Each %s denotes an author name.
+#. You can use line breaks, estimating that each author name occupies
+#. ca. 16 screen columns and that a screen line has ca. 80 columns.
+#: lib/version-etc.c:131
+#, c-format
+msgid ""
+"Written by %s, %s, %s,\n"
+"%s, %s, and %s.\n"
+msgstr ""
+
+#. TRANSLATORS: Each %s denotes an author name.
+#. You can use line breaks, estimating that each author name occupies
+#. ca. 16 screen columns and that a screen line has ca. 80 columns.
+#: lib/version-etc.c:139
+#, c-format
+msgid ""
+"Written by %s, %s, %s,\n"
+"%s, %s, %s, and %s.\n"
+msgstr ""
+
+#. TRANSLATORS: Each %s denotes an author name.
+#. You can use line breaks, estimating that each author name occupies
+#. ca. 16 screen columns and that a screen line has ca. 80 columns.
+#: lib/version-etc.c:147
+#, c-format
+msgid ""
+"Written by %s, %s, %s,\n"
+"%s, %s, %s, %s,\n"
+"and %s.\n"
+msgstr ""
+
+#. TRANSLATORS: Each %s denotes an author name.
+#. You can use line breaks, estimating that each author name occupies
+#. ca. 16 screen columns and that a screen line has ca. 80 columns.
+#: lib/version-etc.c:156
+#, c-format
+msgid ""
+"Written by %s, %s, %s,\n"
+"%s, %s, %s, %s,\n"
+"%s, and %s.\n"
+msgstr ""
+
+#. TRANSLATORS: Each %s denotes an author name.
+#. You can use line breaks, estimating that each author name occupies
+#. ca. 16 screen columns and that a screen line has ca. 80 columns.
+#: lib/version-etc.c:167
+#, c-format
+msgid ""
+"Written by %s, %s, %s,\n"
+"%s, %s, %s, %s,\n"
+"%s, %s, and others.\n"
+msgstr ""
+
+#. TRANSLATORS: The placeholder indicates the bug-reporting address
+#. for this package. Please add _another line_ saying
+#. "Report translation bugs to <...>\n" with the address for translation
+#. bugs (typically your translation team's web or email address).
+#: lib/version-etc.c:245
+#, c-format
+msgid ""
+"\n"
+"Report bugs to: %s\n"
+msgstr ""
+
+#: lib/version-etc.c:247
+#, c-format
+msgid "Report %s bugs to: %s\n"
+msgstr ""
+
+#: lib/version-etc.c:251
+#, c-format
+msgid "%s home page: <%s>\n"
+msgstr ""
+
+#: lib/version-etc.c:253
+#, c-format
+msgid "%s home page: <http://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"
+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"
+
+#: sed/compile.c:146
msgid "multiple `!'s"
-msgstr "Tbb `!'"
+msgstr "több „!”"
-#: sed/compile.c:145
+#: sed/compile.c:147
msgid "unexpected `,'"
-msgstr "Vratlan `,'"
+msgstr "váratlan „,”"
-#: sed/compile.c:146
+#: sed/compile.c:149
msgid "invalid usage of +N or ~N as first address"
-msgstr "Nem lehet hasznlni a +N-t vagy ~N-t els cmknt"
+msgstr "a +N vagy ~N használata első címként érvénytelen"
-#: sed/compile.c:147
+#: sed/compile.c:150
msgid "unmatched `{'"
-msgstr "Nincs prban `{'"
+msgstr "nincs párban „{”"
-#: sed/compile.c:148
+#: sed/compile.c:151
msgid "unexpected `}'"
-msgstr "Nincs prban `}'"
+msgstr "nincs párban „}”"
-#: sed/compile.c:149
+#: sed/compile.c:153
msgid "extra characters after command"
-msgstr "Extra karakterek a parancs utn"
+msgstr "extra karakterek a parancs után"
-#: sed/compile.c:150
+#: sed/compile.c:155
msgid "expected \\ after `a', `c' or `i'"
-msgstr "`a', `c' vagy `i' parancs utn \\ szksges"
+msgstr "az „a”, „c” vagy „i” után \\ szükséges"
-#: sed/compile.c:151
+#: sed/compile.c:157
msgid "`}' doesn't want any addresses"
-msgstr "`}' nem ignyel cmzst"
+msgstr "„}” nem igényel címzést"
-#: sed/compile.c:152
+#: sed/compile.c:159
msgid ": doesn't want any addresses"
-msgstr ": nem ignyel cmzst"
+msgstr ": nem igényel címzést"
-#: sed/compile.c:153
+#: sed/compile.c:161
msgid "comments don't accept any addresses"
-msgstr "Megjegyzsben nem lehet cmzs"
+msgstr "megjegyzésben nem lehet címzés"
-#: sed/compile.c:154
+#: sed/compile.c:162
msgid "missing command"
-msgstr "Hinyz parancs"
+msgstr "hiányzó parancs"
-#: sed/compile.c:155
+#: sed/compile.c:163
msgid "command only uses one address"
-msgstr "A parancs csak egy cmzst hasznl"
+msgstr "a parancs csak egy címzést használ"
-#: sed/compile.c:156
+#: sed/compile.c:164
msgid "unterminated address regex"
-msgstr "Befejezetlen regex cm"
+msgstr "befejezetlen regex cím"
-#: sed/compile.c:157
+#: sed/compile.c:165
msgid "unterminated `s' command"
-msgstr "Befejezetlen `s' parancs"
+msgstr "befejezetlen „s” parancs"
-#: sed/compile.c:158
+#: sed/compile.c:166
msgid "unterminated `y' command"
-msgstr "Befejezetlen `y' parancs"
+msgstr "befejezetlen „y” parancs"
-#: sed/compile.c:159
+#: sed/compile.c:167
msgid "unknown option to `s'"
-msgstr "Ismeretlen `s' opci"
+msgstr "ismeretlen „s” kapcsoló"
-#: sed/compile.c:160
+#: sed/compile.c:169
msgid "multiple `p' options to `s' command"
-msgstr "tbbszrs `p' opci, `s' parancs mellett"
+msgstr "többszörös „p” kapcsoló az „s” parancshoz"
-#: sed/compile.c:161
+#: sed/compile.c:171
msgid "multiple `g' options to `s' command"
-msgstr "tbbszrs `g' opci, `s' parancs mellett"
+msgstr "többszörös „g” kapcsoló az „s” parancshoz"
-#: sed/compile.c:162
+#: sed/compile.c:173
msgid "multiple number options to `s' command"
-msgstr "tbbszrs szm opci, `s' parancs mellett"
+msgstr "többszörös szám kapcsoló az „s” parancshoz"
-#: sed/compile.c:163
+#: sed/compile.c:175
msgid "number option to `s' command may not be zero"
-msgstr "a(z) `s' parancs szm opcija nem lehet nulla"
+msgstr "az „s” parancs szám kapcsolója nem lehet nulla"
-#: sed/compile.c:164
+#: sed/compile.c:177
msgid "strings for `y' command are different lengths"
-msgstr "a(z) `y' parancs szvegeinek hossza klnbz"
+msgstr "az „y” parancs szövegeinek hossza különböző"
-#: sed/compile.c:165
+#: sed/compile.c:179
msgid "delimiter character is not a single-byte character"
-msgstr "az elvlaszt karakter nem egy bjtbl ll"
+msgstr "az elválasztó karakter nem egy bájtból áll"
-#: sed/compile.c:166
+#: sed/compile.c:181
msgid "expected newer version of sed"
-msgstr "a 'sed' program jabb verzijra van szksg"
+msgstr "a sed újabb verziójára van szükség"
-#: sed/compile.c:167
+#: sed/compile.c:183
msgid "invalid usage of line address 0"
-msgstr "rvnytelen 0 cmzs"
+msgstr "a 0 sor címzés használata érvénytelen"
-#: sed/compile.c:168
+#: sed/compile.c:184
#, c-format
msgid "unknown command: `%c'"
-msgstr "Ismeretlen parancs: `%c'"
+msgstr "ismeretlen parancs: „%c”"
-#: sed/compile.c:169
-#, fuzzy
+#: sed/compile.c:186
msgid "incomplete command"
-msgstr "Hinyz parancs"
+msgstr "hiányos parancs"
+
+#: sed/compile.c:188
+msgid "\":\" lacks a label"
+msgstr ""
+
+#: sed/compile.c:190
+msgid "recursive escaping after \\c not allowed"
+msgstr ""
-#: sed/compile.c:192
+#: sed/compile.c:213
#, c-format
msgid "%s: file %s line %lu: %s\n"
-msgstr "%s: fjl %s sor %lu: %s\n"
+msgstr "%s: %s fájl %lu sor: %s\n"
-#: sed/compile.c:195
+#: sed/compile.c:216
#, c-format
msgid "%s: -e expression #%lu, char %lu: %s\n"
-msgstr "%s: -e kifejezs #%lu, karakter %lu: %s\n"
+msgstr "%s: -e kifejezés #%lu, karakter %lu: %s\n"
-#: sed/compile.c:1657
+#: sed/compile.c:1639
#, c-format
msgid "can't find label for jump to `%s'"
-msgstr "Az ugrshoz (`%s') nem tallom a cmkt"
+msgstr "az ugráshoz („%s”) nem található címke"
-#: sed/execute.c:595
+#: sed/execute.c:264 sed/execute.c:281
+#, c-format
+msgid "case conversion produced an invalid character"
+msgstr ""
+
+#: sed/execute.c:575
#, c-format
msgid "%s: can't read %s: %s\n"
-msgstr "%s: nem lehet olvasni %s: %s\n"
+msgstr "%s: %s nem olvasható: %s\n"
-#: sed/execute.c:624
+#: sed/execute.c:600
#, c-format
msgid "couldn't edit %s: is a terminal"
-msgstr "nem lehet szerkeszteni (%s): terminl"
+msgstr "nem lehet szerkeszteni (%s): terminál"
-#: sed/execute.c:629
+#: sed/execute.c:605
#, c-format
msgid "couldn't edit %s: not a regular file"
-msgstr "nem lehet szerkeszteni (%s): nem szablyos fjl"
+msgstr "nem lehet szerkeszteni (%s): nem szabályos fájl"
-#: sed/execute.c:640
+#: sed/execute.c:616
#, 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:647
+#: sed/execute.c:624
#, c-format
msgid "%s: warning: failed to get security context of %s: %s"
-msgstr ""
+msgstr "%s: figyelem: nem sikerült lekérni a(z) %s biztonsági környezetét: %s"
-#: sed/execute.c:664 sed/utils.c:211
+#: sed/execute.c:643 sed/utils.c:178
#, c-format
msgid "couldn't open temporary file %s: %s"
-msgstr "Nem lehet megnyitni az tmeneti fjlt: %s: %s"
+msgstr "nem lehet megnyitni a(z) %s átmeneti fájlt: %s"
-#: sed/execute.c:1193 sed/execute.c:1373
+#: sed/execute.c:1158 sed/execute.c:1368
msgid "error in subprocess"
msgstr "hiba az alfolyamatban"
-#: sed/execute.c:1195
+#: sed/execute.c:1160
msgid "option `e' not supported"
-msgstr "az `e' opci nincs tmogatva"
+msgstr "az „e” kapcsoló nem támogatott"
-#: sed/execute.c:1375
+#: sed/execute.c:1349
msgid "`e' command not supported"
-msgstr "az `e' parancs nincs tmogatva"
+msgstr "az „e” parancs nem támogatott"
-#: sed/execute.c:1725
+#: sed/execute.c:1675
msgid "no input files"
-msgstr ""
+msgstr "nincsenek bemeneti fájlok"
-#: sed/regexp.c:39
+#: sed/regexp.c:38
msgid "no previous regular expression"
-msgstr "Nincsen elz regulris kifejezs"
-
-#: sed/regexp.c:40
-msgid "cannot specify modifiers on empty regexp"
-msgstr "Nem lehet mdostt megadni res regulris kifejezshez"
+msgstr "nincs előző reguláris kifejezés"
-#: sed/regexp.c:129
+#: sed/regexp.c:138
#, c-format
msgid "invalid reference \\%d on `s' command's RHS"
-msgstr "Hibs hivatkozs (\\%d) a(z) `s' parancs RHS-re"
+msgstr "érvénytelen hivatkozás (\\%d) az „s” parancs RHS-ére"
-#: sed/sed.c:32
+#: sed/sed.c:35
msgid "Jay Fenlason"
-msgstr ""
+msgstr "Jay Fenlason"
-#: sed/sed.c:33
+#: sed/sed.c:36
msgid "Tom Lord"
-msgstr ""
+msgstr "Tom Lord"
-#: sed/sed.c:34
+#: sed/sed.c:37
msgid "Ken Pizzini"
-msgstr ""
+msgstr "Ken Pizzini"
-#: sed/sed.c:35
+#: sed/sed.c:38
msgid "Paolo Bonzini"
-msgstr ""
+msgstr "Paolo Bonzini"
-#: sed/sed.c:79
+#: 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"
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"
-#: sed/sed.c:86
-#, fuzzy, c-format
-msgid ""
-"E-mail bug reports to: <%s>.\n"
-"Be sure to include the word ``%s'' somewhere in the ``Subject:'' field.\n"
+#: sed/sed.c:120
+#, c-format
+msgid "E-mail bug reports to: <%s>.\n"
msgstr ""
-"A fordtsi hibkat krem a gyulai@fbi.hu cmre kldeni. \n"
-"Angolul ide lehet a hibkrl rni: %s . A levl \"Trgy:\" mezejben \n"
-"legyen ott a `%s' sz.\n"
-#: sed/sed.c:99
+#: sed/sed.c:129
msgid ""
" -R, --regexp-perl\n"
" use Perl 5's regular expressions syntax in the script.\n"
msgstr ""
" -R --regexp-perl\n"
-" Perl 5 regulris kifejezs nyelvtannak hasznlata.\n"
+" Perl 5 reguláris kifejezés nyelvtanának használata a\n"
+" parancsfájlban.\n"
-#: sed/sed.c:104
+#: sed/sed.c:134
#, c-format
msgid ""
"Usage: %s [OPTION]... {script-only-if-no-other-script} [input-file]...\n"
"\n"
msgstr ""
-"Hasznlat: %s [OPCI]... {hjprogram} [bemeneti fjl]...\n"
+"Használat: %s [OPCIÓ]... {parancsfájl-csak-ha-nincs-más-parancsfájl} "
+"[bemeneti fájl]…\n"
"\n"
-#: sed/sed.c:108
-#, fuzzy, c-format
+#: sed/sed.c:138
+#, c-format
msgid ""
" -n, --quiet, --silent\n"
" suppress automatic printing of pattern space\n"
msgstr ""
" -n, --quiet, --silent\n"
-" minta nyomtatsnak mellzse\n"
+" a minta tér automatikus kiírásának elnyomása\n"
-#: sed/sed.c:110
+#: sed/sed.c:140
#, c-format
msgid ""
" -e script, --expression=script\n"
" add the script to the commands to be executed\n"
msgstr ""
-" -e hjprogram, --expression=hjprogram\n"
-" hjprogram hozzadsa a vgrehajtand parancsokhoz\n"
+" -e parancsfájl, --expression=parancsfájl\n"
+" parancsfájl hozzáadása a végrehajtandó parancsokhoz\n"
-#: sed/sed.c:112
+#: sed/sed.c:142
#, c-format
msgid ""
" -f script-file, --file=script-file\n"
" add the contents of script-file to the commands to be "
"executed\n"
msgstr ""
-" -f, hjprogram, --file=hjprogram\n"
-" a megadott hjprogram hozzadsa a vgrehajtand "
-"parancsokhoz\n"
+" -f parancsfájl, --file=parancsfájl\n"
+" a megadott parancsfájl tartalmának hozzáadása a "
+"végrehajtandó\n"
+" parancsokhoz\n"
-#: sed/sed.c:115
+#: sed/sed.c:146
#, c-format
msgid ""
" --follow-symlinks\n"
" follow symlinks when processing in place\n"
msgstr ""
+" --follow-symlinks\n"
+" szimbolikus linkek követése helyben feldolgozáskor\n"
-#: sed/sed.c:118
-#, fuzzy, c-format
+#: sed/sed.c:149
+#, c-format
msgid ""
" -i[SUFFIX], --in-place[=SUFFIX]\n"
" edit files in place (makes backup if SUFFIX supplied)\n"
msgstr ""
-" -i[SZUFFIX], --in-place[=SZUFFIX]\n"
-" fjlok szerkesztse a megadott helyen (ha van szuffix, akkor\n"
-" ments is kszl)\n"
+" -i[UTÓTAG], --in-place[=UTÓTAG]\n"
+" fájlok szerkesztése helyben (biztonsági mentést készít, ha\n"
+" az UTÓTAG meg van adva)\n"
-#: sed/sed.c:121
+#: sed/sed.c:153
#, c-format
msgid ""
" -b, --binary\n"
" open files in binary mode (CR+LFs are not processed "
"specially)\n"
msgstr ""
+" -b, --binary\n"
+" fájlok megnyitása bináris módban (a CR+LF karakterek nem\n"
+" lesznek speciálisan feldolgozva)\n"
-#: sed/sed.c:124
+#: sed/sed.c:157
#, c-format
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"
-" sor-hossz megadsa az `l' parancshoz\n"
+" a kívánt sortörési hossz megadása az „l” parancshoz\n"
-#: sed/sed.c:126
+#: sed/sed.c:159
#, c-format
msgid ""
" --posix\n"
" disable all GNU extensions.\n"
msgstr ""
" --posix\n"
-" a GNU bvtsek kikapcsolsa\n"
+" minden GNU kiterjesztés letiltása.\n"
-#: sed/sed.c:128
-#, c-format
+#: sed/sed.c:161
+#, fuzzy, c-format
msgid ""
-" -r, --regexp-extended\n"
-" use extended regular expressions in the script.\n"
+" -E, -r, --regexp-extended\n"
+" use extended regular expressions in the script\n"
+" (for portability use POSIX -E).\n"
msgstr ""
" -r, --regexp-extended\n"
-" kiterjesztett regulris kifejezsek hasznlata.\n"
+" kiterjesztett reguláris kifejezések használata a\n"
+" parancsfájlban.\n"
-#: sed/sed.c:133
-#, c-format
+#: sed/sed.c:167
+#, fuzzy, c-format
msgid ""
" -s, --separate\n"
-" consider files as separate rather than as a single "
-"continuous\n"
-" long stream.\n"
+" consider files as separate rather than as a single,\n"
+" continuous long stream.\n"
msgstr ""
" -s, --separate\n"
-" a fjlokat kln kezeljk, egyetlen folyamatos adatfolyam helyett\n"
+" a fájlokat külön kezeli egyetlen folyamatos, hosszú folyam\n"
+" helyett.\n"
+
+#: sed/sed.c:170
+#, fuzzy, c-format
+msgid ""
+" --sandbox\n"
+" operate in sandbox mode.\n"
+msgstr ""
+" -z, --null-data\n"
+" sorok elválasztása NULL karakterekkel\n"
-#: sed/sed.c:136
+#: sed/sed.c:172
#, c-format
msgid ""
" -u, --unbuffered\n"
@@ -347,27 +758,30 @@ msgid ""
" the output buffers more often\n"
msgstr ""
" -u, --unbuffered\n"
-" kevs adat betltse a bemeneti fjlokbl s a kimeneti pufferek\n"
-" gyakori rtse\n"
+" minimális mennyiségű adat betöltése a bemeneti fájlokból és "
+"a\n"
+" kimeneti pufferek gyakori ürítése\n"
-#: sed/sed.c:139
+#: sed/sed.c:175
#, c-format
msgid ""
" -z, --null-data\n"
" separate lines by NUL characters\n"
msgstr ""
+" -z, --null-data\n"
+" sorok elválasztása NULL karakterekkel\n"
-#: sed/sed.c:141
+#: sed/sed.c:177
#, c-format
msgid " --help display this help and exit\n"
-msgstr " --help kirja ezt az oldalt s kilp\n"
+msgstr " --help kiírja ezt a súgót és kilép\n"
-#: sed/sed.c:142
+#: sed/sed.c:178
#, c-format
msgid " --version output version information and exit\n"
-msgstr " --version kirja a programverzit s kilp\n"
+msgstr " --version kiírja a verzióinformációt és kilép\n"
-#: sed/sed.c:143
+#: sed/sed.c:179
#, c-format
msgid ""
"\n"
@@ -378,149 +792,87 @@ msgid ""
"\n"
msgstr ""
"\n"
-"Ha nincs megadva -e, --expression, -f vagy --file opci, akkor az els\n"
-"nem-opci paramtert hjprogramnak tekintjk. Minden tovbbi paramter\n"
-"fjlnvnek szmt. Ha nincs megadva fjlnv, akkor a szoksos bemenetrl\n"
-"olvas.\n"
+"Ha nincs megadva -e, --expression, -f vagy --file kapcsoló, akkor az első\n"
+"nem-kapcsoló paramétert héjprogramnak tekintjük. Minden további paraméter\n"
+"fájlnévnek számít. Ha nincs megadva bemeneti fájlnév, akkor a szabványos\n"
+"bemenetről olvas.\n"
"\n"
-#: sed/utils.c:74 sed/utils.c:432
+#: sed/utils.c:73 sed/utils.c:384
#, c-format
msgid "cannot remove %s: %s"
-msgstr "nem lehet trlni %s: %s"
+msgstr "%s nem távolítható el: %s"
-#: sed/utils.c:144
+#: sed/utils.c:136
#, c-format
msgid "couldn't open file %s: %s"
-msgstr "Nem lehet megnyitni a(z) %s fjlt: %s"
+msgstr "nem nyitható meg a(z) %s fájl: %s"
-#: sed/utils.c:167
-#, fuzzy, c-format
+#: sed/utils.c:155
+#, c-format
msgid "couldn't attach to %s: %s"
-msgstr "nem tudom a(z) %d elemet ide rni %s: %s"
+msgstr "nem lehet csatolni ehhez: %s: %s"
-#: sed/utils.c:229
-#, c-format
-msgid "couldn't write %d item to %s: %s"
-msgid_plural "couldn't write %d items to %s: %s"
-msgstr[0] "nem tudom a(z) %d elemet ide rni %s: %s"
+#: sed/utils.c:192
+#, fuzzy, 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"
-#: sed/utils.c:244 sed/utils.c:267
+#: sed/utils.c:204 sed/utils.c:223
#, c-format
msgid "read error on %s: %s"
-msgstr "olvassi hiba %s: %s"
+msgstr "olvasási hiba ezen: %s: %s"
-#: sed/utils.c:372
-#, fuzzy, c-format
+#: sed/utils.c:325
+#, c-format
msgid "couldn't follow symlink %s: %s"
-msgstr "Nem lehet megnyitni a(z) %s fjlt: %s"
+msgstr "nem lehet követni a(z) %s szimbolikus linket: %s"
-#: sed/utils.c:406
-#, fuzzy, c-format
+#: sed/utils.c:359
+#, c-format
msgid "cannot stat %s: %s"
-msgstr "nem lehet tnevezni %s: %s"
+msgstr "nem lehet stat-olni: %s: %s"
-#: sed/utils.c:437
+#: sed/utils.c:389
#, c-format
msgid "cannot rename %s: %s"
-msgstr "nem lehet tnevezni %s: %s"
-
-#: lib/regcomp.c:132
-msgid "Success"
-msgstr "Sikeres"
-
-#: lib/regcomp.c:135
-msgid "No match"
-msgstr "Nincs tallat"
-
-#: lib/regcomp.c:138
-msgid "Invalid regular expression"
-msgstr "Hibs regulris kifejezs"
+msgstr "nem lehet átnevezni: %s: %s"
-#: lib/regcomp.c:141
-msgid "Invalid collation character"
-msgstr "rvnytelen sszehasonlt karakter"
+#~ msgid "cannot specify modifiers on empty regexp"
+#~ msgstr "nem lehet módosítót megadni üres reguláris kifejezéshez"
-#: lib/regcomp.c:144
-msgid "Invalid character class name"
-msgstr "rvnytelen karakterosztly-nv"
-
-#: lib/regcomp.c:147
-msgid "Trailing backslash"
-msgstr "Lezr visszaperjel"
-
-#: lib/regcomp.c:150
-msgid "Invalid back reference"
-msgstr "rvnytelen vissza-hivatkozs"
-
-#: lib/regcomp.c:153
-msgid "Unmatched [ or [^"
-msgstr "Nincs prban [ vagy [^"
-
-#: lib/regcomp.c:156
-msgid "Unmatched ( or \\("
-msgstr "Nincs prban ( vagy \\("
-
-#: lib/regcomp.c:159
-msgid "Unmatched \\{"
-msgstr "Nincs prban \\{"
-
-#: lib/regcomp.c:162
-msgid "Invalid content of \\{\\}"
-msgstr "\\{\\}-nak rvnytelen a tartalma"
-
-#: lib/regcomp.c:165
-msgid "Invalid range end"
-msgstr "Sorozat rvnytelen vge"
-
-#: lib/regcomp.c:168
-msgid "Memory exhausted"
-msgstr "Kevs a memria"
-
-#: lib/regcomp.c:171
-msgid "Invalid preceding regular expression"
-msgstr "rvnytelen megelz regulris kifejezs"
-
-#: lib/regcomp.c:174
-msgid "Premature end of regular expression"
-msgstr "Regulris kifejezs tl korai vge"
-
-#: lib/regcomp.c:177
-msgid "Regular expression too big"
-msgstr "Tl nagy regulris kifejezs"
-
-#: lib/regcomp.c:180
-msgid "Unmatched ) or \\)"
-msgstr "Nincs prban ) vagy \\)"
-
-#: lib/regcomp.c:705
-msgid "No previous regular expression"
-msgstr "Nincsen elz regulris kifejezs"
+#~ msgid ""
+#~ "E-mail bug reports to: <%s>.\n"
+#~ "Be sure to include the word ``%s'' somewhere in the ``Subject:'' field.\n"
+#~ msgstr ""
+#~ "Hibajelentéseket erre a címre küldhet: <%s>.\n"
+#~ "Győződjön meg arról, hogy szerepeljen a(z) „%s” szó a „Tárgy:” mezőben "
+#~ "valahol.\n"
#~ msgid "super-sed version %s\n"
-#~ msgstr "super-sed verzi %s\n"
+#~ msgstr "super-sed verzió %s\n"
#~ msgid ""
#~ "based on GNU sed version %s\n"
#~ "\n"
#~ msgstr ""
-#~ "A GNU %s sed verzin alapszik\n"
+#~ "a GNU sed %s verziója alapján\n"
#~ "\n"
#~ msgid "GNU sed version %s\n"
-#~ msgstr "GNU sed verzi %s\n"
+#~ msgstr "GNU sed %s verzió\n"
#~ msgid ""
-#~ "%s\n"
+#~ "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 ""
-#~ "%s\n"
-#~ "Ez egy ingyenes szmtgpes program. A forrsban megtallhatk a \n"
-#~ "programterjeszts felttelei.\n"
-#~ "SEMMILYEN garancit nem vllalunk, mg azt sem lltjuk, hogy ez a "
+#~ "Copyright (C) %d Free Software Foundation, Inc.\n"
+#~ "Ez egy szabad szoftver. A forrásban megtalálhatók a másolás feltételei.\n"
+#~ "SEMMILYEN garanciát nem vállalunk, még azt sem állítjuk, hogy ez a "
#~ "program\n"
-#~ "KERESKEDELMI CLOKRA ALKALMAS vagy HASZNLHAT EGY ADOTT FELADATRA.\n"
+#~ "KERESKEDELMI CÉLOKRA ALKALMAS vagy HASZNÁLHATÓ EGY ADOTT FELADATRA.\n"
diff --git a/po/id.gmo b/po/id.gmo
index 8e9b5dc..d092c5c 100644
--- a/po/id.gmo
+++ b/po/id.gmo
Binary files differ
diff --git a/po/id.po b/po/id.po
index dc5528f..382a507 100644
--- a/po/id.po
+++ b/po/id.po
@@ -3,235 +3,620 @@
# Copyright (C) 1999, 2000, 2001, 2003, 2004 Free Software Foundation, Inc.
# This file is distributed under the same license as the sed package.
# Tedi Heriyanto <tedi_h@gmx.net>, 2002, 2003, 2004.
-# Arif E. Nugroho <arif_endro@yahoo.com>, 2008.
+# Arif E. Nugroho <arif_endro@yahoo.com>, 2008, 2009, 2010, 2011, 2012, 2013, 2014.
#
msgid ""
msgstr ""
-"Project-Id-Version: sed 4.2.0\n"
+"Project-Id-Version: sed 4.2.1\n"
"Report-Msgid-Bugs-To: bug-gnu-utils@gnu.org\n"
-"POT-Creation-Date: 2012-12-22 14:36+0100\n"
-"PO-Revision-Date: 2008-11-09 20:15+0700\n"
+"POT-Creation-Date: 2016-12-30 00:59-0800\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"
"Language: id\n"
"MIME-Version: 1.0\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=1; plural=0;\n"
-#: sed/compile.c:144
+#: lib/closeout.c:112
+msgid "write error"
+msgstr ""
+
+#: lib/copy-acl.c:54
+#, c-format
+msgid "preserving permissions for %s"
+msgstr ""
+
+#: lib/dfa.c:1025 lib/dfa.c:1028 lib/dfa.c:1047 lib/dfa.c:1057 lib/dfa.c:1070
+#: lib/dfa.c:1098 lib/dfa.c:1107 lib/dfa.c:1110 lib/dfa.c:1115 lib/dfa.c:1137
+#: lib/dfa.c:1140
+msgid "unbalanced ["
+msgstr ""
+
+#: lib/dfa.c:1083
+#, fuzzy
+msgid "invalid character class"
+msgstr "Nama kelas karakter tidak valid"
+
+#: lib/dfa.c:1206
+msgid "character class syntax is [[:space:]], not [:space:]"
+msgstr ""
+
+#: lib/dfa.c:1275
+msgid "unfinished \\ escape"
+msgstr ""
+
+#: lib/dfa.c:1436
+#, fuzzy
+msgid "invalid content of \\{\\}"
+msgstr "Isi \\{\\} tidak valid"
+
+#: lib/dfa.c:1439
+#, fuzzy
+msgid "regular expression too big"
+msgstr "Reguler ekspresi terlalu besar"
+
+#: lib/dfa.c:1853
+msgid "unbalanced ("
+msgstr ""
+
+#: lib/dfa.c:1980
+msgid "no syntax specified"
+msgstr ""
+
+#: lib/dfa.c:1988
+msgid "unbalanced )"
+msgstr ""
+
+#: lib/error.c:191
+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 ""
+
+#: lib/getopt.c:654 lib/getopt.c:658
+#, c-format
+msgid "%s: option '--%s' doesn't allow an argument\n"
+msgstr ""
+
+#: 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:715 lib/getopt.c:734
+#, c-format
+msgid "%s: option '--%s' requires an argument\n"
+msgstr ""
+
+#: 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
+#, 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
+#, 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 "Kehabisan memori"
+
+#. TRANSLATORS:
+#. Get translations for open and closing quotation marks.
+#. The message catalog should translate "`" to a left
+#. quotation mark suitable for the locale, and similarly for
+#. "'". For example, a French Unicode local should translate
+#. these to U+00AB (LEFT-POINTING DOUBLE ANGLE
+#. QUOTATION MARK), and U+00BB (RIGHT-POINTING DOUBLE ANGLE
+#. QUOTATION MARK), respectively.
+#.
+#. If the catalog has no translation, we will try to
+#. use Unicode U+2018 (LEFT SINGLE QUOTATION MARK) and
+#. Unicode U+2019 (RIGHT SINGLE QUOTATION MARK). If the
+#. current locale is not Unicode, locale_quoting_style
+#. will quote 'like this', and clocale_quoting_style will
+#. quote "like this". You should always include translations
+#. for "`" and "'" even if U+2018 and U+2019 are appropriate
+#. for your locale.
+#.
+#. If you don't know what to put here, please see
+#. <http://en.wikipedia.org/wiki/Quotation_marks_in_other_languages>
+#. and use glyphs suitable for your language.
+#: lib/quotearg.c:354
+msgid "`"
+msgstr ""
+
+#: lib/quotearg.c:355
+msgid "'"
+msgstr ""
+
+#: lib/regcomp.c:135
+msgid "Success"
+msgstr "Sukses"
+
+#: lib/regcomp.c:138
+msgid "No match"
+msgstr "Tidak cocok"
+
+#: lib/regcomp.c:141
+msgid "Invalid regular expression"
+msgstr "Reguler ekspresi tidak valid"
+
+#: lib/regcomp.c:144
+msgid "Invalid collation character"
+msgstr "Karakter kolasi tidak valid"
+
+#: lib/regcomp.c:147
+msgid "Invalid character class name"
+msgstr "Nama kelas karakter tidak valid"
+
+#: lib/regcomp.c:150
+msgid "Trailing backslash"
+msgstr "Trailing backslash"
+
+#: lib/regcomp.c:153
+msgid "Invalid back reference"
+msgstr "Referensi balik tidak valid"
+
+#: lib/regcomp.c:156
+#, fuzzy
+msgid "Unmatched [, [^, [:, [., or [="
+msgstr "[ atau [^ tidak sesuai"
+
+#: lib/regcomp.c:159
+msgid "Unmatched ( or \\("
+msgstr "( atau \\( tidak sesuai"
+
+#: lib/regcomp.c:162
+msgid "Unmatched \\{"
+msgstr "\\{ tidak sesuai"
+
+#: lib/regcomp.c:165
+msgid "Invalid content of \\{\\}"
+msgstr "Isi \\{\\} tidak valid"
+
+#: lib/regcomp.c:168
+msgid "Invalid range end"
+msgstr "Batas akhir tidak valid"
+
+#: lib/regcomp.c:171
+msgid "Memory exhausted"
+msgstr "Kehabisan memori"
+
+#: lib/regcomp.c:174
+msgid "Invalid preceding regular expression"
+msgstr "Reguler ekspresi yang mengawali tidak valid"
+
+#: lib/regcomp.c:177
+msgid "Premature end of regular expression"
+msgstr "Reguler ekspresi berakhir prematur"
+
+#: lib/regcomp.c:180
+msgid "Regular expression too big"
+msgstr "Reguler ekspresi terlalu besar"
+
+#: lib/regcomp.c:183
+msgid "Unmatched ) or \\)"
+msgstr ") atau \\) tidak sesuai"
+
+#: lib/regcomp.c:687
+msgid "No previous regular expression"
+msgstr "Tidak ada reguler ekspresi sebelumnya"
+
+#: lib/set-acl.c:46
+#, c-format
+msgid "setting permissions for %s"
+msgstr ""
+
+#: lib/version-etc.c:74
+#, c-format
+msgid "Packaged by %s (%s)\n"
+msgstr ""
+
+#: lib/version-etc.c:77
+#, c-format
+msgid "Packaged by %s\n"
+msgstr ""
+
+#. 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 ""
+
+#: lib/version-etc.c:86
+msgid ""
+"\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"
+msgstr ""
+
+#. TRANSLATORS: %s denotes an author name.
+#: lib/version-etc.c:102
+#, c-format
+msgid "Written by %s.\n"
+msgstr ""
+
+#. TRANSLATORS: Each %s denotes an author name.
+#: lib/version-etc.c:106
+#, c-format
+msgid "Written by %s and %s.\n"
+msgstr ""
+
+#. TRANSLATORS: Each %s denotes an author name.
+#: lib/version-etc.c:110
+#, c-format
+msgid "Written by %s, %s, and %s.\n"
+msgstr ""
+
+#. TRANSLATORS: Each %s denotes an author name.
+#. You can use line breaks, estimating that each author name occupies
+#. ca. 16 screen columns and that a screen line has ca. 80 columns.
+#: lib/version-etc.c:117
+#, c-format
+msgid ""
+"Written by %s, %s, %s,\n"
+"and %s.\n"
+msgstr ""
+
+#. TRANSLATORS: Each %s denotes an author name.
+#. You can use line breaks, estimating that each author name occupies
+#. ca. 16 screen columns and that a screen line has ca. 80 columns.
+#: lib/version-etc.c:124
+#, c-format
+msgid ""
+"Written by %s, %s, %s,\n"
+"%s, and %s.\n"
+msgstr ""
+
+#. TRANSLATORS: Each %s denotes an author name.
+#. You can use line breaks, estimating that each author name occupies
+#. ca. 16 screen columns and that a screen line has ca. 80 columns.
+#: lib/version-etc.c:131
+#, c-format
+msgid ""
+"Written by %s, %s, %s,\n"
+"%s, %s, and %s.\n"
+msgstr ""
+
+#. TRANSLATORS: Each %s denotes an author name.
+#. You can use line breaks, estimating that each author name occupies
+#. ca. 16 screen columns and that a screen line has ca. 80 columns.
+#: lib/version-etc.c:139
+#, c-format
+msgid ""
+"Written by %s, %s, %s,\n"
+"%s, %s, %s, and %s.\n"
+msgstr ""
+
+#. TRANSLATORS: Each %s denotes an author name.
+#. You can use line breaks, estimating that each author name occupies
+#. ca. 16 screen columns and that a screen line has ca. 80 columns.
+#: lib/version-etc.c:147
+#, c-format
+msgid ""
+"Written by %s, %s, %s,\n"
+"%s, %s, %s, %s,\n"
+"and %s.\n"
+msgstr ""
+
+#. TRANSLATORS: Each %s denotes an author name.
+#. You can use line breaks, estimating that each author name occupies
+#. ca. 16 screen columns and that a screen line has ca. 80 columns.
+#: lib/version-etc.c:156
+#, c-format
+msgid ""
+"Written by %s, %s, %s,\n"
+"%s, %s, %s, %s,\n"
+"%s, and %s.\n"
+msgstr ""
+
+#. TRANSLATORS: Each %s denotes an author name.
+#. You can use line breaks, estimating that each author name occupies
+#. ca. 16 screen columns and that a screen line has ca. 80 columns.
+#: lib/version-etc.c:167
+#, c-format
+msgid ""
+"Written by %s, %s, %s,\n"
+"%s, %s, %s, %s,\n"
+"%s, %s, and others.\n"
+msgstr ""
+
+#. TRANSLATORS: The placeholder indicates the bug-reporting address
+#. for this package. Please add _another line_ saying
+#. "Report translation bugs to <...>\n" with the address for translation
+#. bugs (typically your translation team's web or email address).
+#: lib/version-etc.c:245
+#, c-format
+msgid ""
+"\n"
+"Report bugs to: %s\n"
+msgstr ""
+
+#: lib/version-etc.c:247
+#, c-format
+msgid "Report %s bugs to: %s\n"
+msgstr ""
+
+#: lib/version-etc.c:251
+#, c-format
+msgid "%s home page: <%s>\n"
+msgstr ""
+
+#: lib/version-etc.c:253
+#, c-format
+msgid "%s home page: <http://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"
+msgstr ""
+"GNU sed home page: <http://www.gnu.org/software/sed/>.\n"
+"Bantuan umum dalam menggunakan aplikasi GNU: <http://www.gnu.org/gethelp/>.\n"
+
+#: sed/compile.c:146
msgid "multiple `!'s"
msgstr "multiple `!'"
-#: sed/compile.c:145
+#: sed/compile.c:147
msgid "unexpected `,'"
msgstr "tidak diduga `,'"
-#: sed/compile.c:146
+#: sed/compile.c:149
msgid "invalid usage of +N or ~N as first address"
msgstr "penggunaan tidak valid dari +N atau ~N sebagai alamat pertama"
-#: sed/compile.c:147
+#: sed/compile.c:150
msgid "unmatched `{'"
msgstr "tidak cocok `{'"
-#: sed/compile.c:148
+#: sed/compile.c:151
msgid "unexpected `}'"
msgstr "tidak diduga `}'"
-#: sed/compile.c:149
+#: sed/compile.c:153
msgid "extra characters after command"
msgstr "karakter tambahan setelah perintah"
-#: sed/compile.c:150
+#: sed/compile.c:155
msgid "expected \\ after `a', `c' or `i'"
msgstr "diharapkan \\ setelah `a', `c' atau `i'"
-#: sed/compile.c:151
+#: sed/compile.c:157
msgid "`}' doesn't want any addresses"
msgstr "`}' tidak menginginkan alamat apapun"
-#: sed/compile.c:152
+#: sed/compile.c:159
msgid ": doesn't want any addresses"
msgstr ": tidak menginginkan alamat apapun"
-#: sed/compile.c:153
+#: sed/compile.c:161
msgid "comments don't accept any addresses"
msgstr "komentar tidak menerima alamat apapun"
-#: sed/compile.c:154
+#: sed/compile.c:162
msgid "missing command"
msgstr "perintah hilang"
-#: sed/compile.c:155
+#: sed/compile.c:163
msgid "command only uses one address"
msgstr "perintah hanya menggunakan satu alamat"
-#: sed/compile.c:156
+#: sed/compile.c:164
msgid "unterminated address regex"
msgstr "alamat regex yang tidak selesai"
-#: sed/compile.c:157
+#: sed/compile.c:165
msgid "unterminated `s' command"
msgstr "perintah `s' tidak selesai"
-#: sed/compile.c:158
+#: sed/compile.c:166
msgid "unterminated `y' command"
msgstr "perintah `y' tidak selesai"
-#: sed/compile.c:159
+#: sed/compile.c:167
msgid "unknown option to `s'"
msgstr "opsi `s' tidak diketahui"
-#: sed/compile.c:160
+#: sed/compile.c:169
msgid "multiple `p' options to `s' command"
msgstr "multiple opsi `p' untuk perintah `s'"
-#: sed/compile.c:161
+#: sed/compile.c:171
msgid "multiple `g' options to `s' command"
msgstr "multiple opsi `g' untuk perintah `s'"
-#: sed/compile.c:162
+#: sed/compile.c:173
msgid "multiple number options to `s' command"
msgstr "multiple jumlah opsi untuk perintah `s'"
-#: sed/compile.c:163
+#: sed/compile.c:175
msgid "number option to `s' command may not be zero"
msgstr "jumlah opsi untuk perintah `s' tidak boleh nol"
-#: sed/compile.c:164
+#: sed/compile.c:177
msgid "strings for `y' command are different lengths"
msgstr "string untuk perintah `y' memiliki panjang berbeda"
-#: sed/compile.c:165
+#: sed/compile.c:179
msgid "delimiter character is not a single-byte character"
msgstr "karakter pembatas bukan sebuah karakter byte-tunggal"
-#: sed/compile.c:166
+#: sed/compile.c:181
msgid "expected newer version of sed"
msgstr "diduga versi baru sed"
-#: sed/compile.c:167
+#: sed/compile.c:183
msgid "invalid usage of line address 0"
msgstr "penggunaan tidak dari baris alamat 0"
-#: sed/compile.c:168
+#: sed/compile.c:184
#, c-format
msgid "unknown command: `%c'"
msgstr "perintah: `%c' tidak dikenal"
-#: sed/compile.c:169
+#: sed/compile.c:186
#, fuzzy
msgid "incomplete command"
msgstr "perintah hilang"
-#: sed/compile.c:192
+#: sed/compile.c:188
+msgid "\":\" lacks a label"
+msgstr ""
+
+#: sed/compile.c:190
+msgid "recursive escaping after \\c not allowed"
+msgstr ""
+
+#: sed/compile.c:213
#, c-format
msgid "%s: file %s line %lu: %s\n"
msgstr "%s: berkas %s baris %lu: %s\n"
-#: sed/compile.c:195
+#: sed/compile.c:216
#, c-format
msgid "%s: -e expression #%lu, char %lu: %s\n"
msgstr "%s: -e ekspresi #%lu, char %lu: %s\n"
-#: sed/compile.c:1657
+#: sed/compile.c:1639
#, c-format
msgid "can't find label for jump to `%s'"
msgstr "Tidak dapat menemukan label untuk melompat ke `%s'"
-#: sed/execute.c:595
+#: sed/execute.c:264 sed/execute.c:281
+#, c-format
+msgid "case conversion produced an invalid character"
+msgstr ""
+
+#: sed/execute.c:575
#, c-format
msgid "%s: can't read %s: %s\n"
msgstr "%s: tidak dapat membaca %s: %s\n"
-#: sed/execute.c:624
+#: sed/execute.c:600
#, c-format
msgid "couldn't edit %s: is a terminal"
msgstr "tidak dapat mengubah %s: adalah sebuah terminal"
-#: sed/execute.c:629
+#: sed/execute.c:605
#, c-format
msgid "couldn't edit %s: not a regular file"
msgstr "tidak dapat mengubah %s: bukan berkas regular"
-#: sed/execute.c:640
+#: sed/execute.c:616
#, c-format
msgid "%s: warning: failed to set default file creation context to %s: %s"
-msgstr ""
+msgstr "%s: warning: failed to set default file creation context to %s: %s"
-#: sed/execute.c:647
+#: sed/execute.c:624
#, c-format
msgid "%s: warning: failed to get security context of %s: %s"
-msgstr ""
+msgstr "%s: warning: failed to get security context of %s: %s"
-#: sed/execute.c:664 sed/utils.c:211
+#: sed/execute.c:643 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:1193 sed/execute.c:1373
+#: sed/execute.c:1158 sed/execute.c:1368
msgid "error in subprocess"
msgstr "kesalahan dalam subproses"
-#: sed/execute.c:1195
+#: sed/execute.c:1160
msgid "option `e' not supported"
msgstr "optsi `e' tidak didukung"
-#: sed/execute.c:1375
+#: sed/execute.c:1349
msgid "`e' command not supported"
msgstr "perintah `e' tidak didukung"
-#: sed/execute.c:1725
+#: sed/execute.c:1675
msgid "no input files"
msgstr "tidak ada berkas masukan"
-#: sed/regexp.c:39
+#: sed/regexp.c:38
msgid "no previous regular expression"
msgstr "Tidak ada reguler ekspresi sebelumnya"
-#: sed/regexp.c:40
-msgid "cannot specify modifiers on empty regexp"
-msgstr "Tidak dapat menspesifikasikan pemodifikasi pada regexp kosong"
-
-#: sed/regexp.c:129
+#: sed/regexp.c:138
#, c-format
msgid "invalid reference \\%d on `s' command's RHS"
msgstr "referensi tidak valid \\%d pada perintah `s' RHS"
-#: sed/sed.c:32
+#: sed/sed.c:35
msgid "Jay Fenlason"
msgstr ""
-#: sed/sed.c:33
+#: sed/sed.c:36
msgid "Tom Lord"
msgstr ""
-#: sed/sed.c:34
+#: sed/sed.c:37
msgid "Ken Pizzini"
msgstr ""
-#: sed/sed.c:35
+#: sed/sed.c:38
msgid "Paolo Bonzini"
msgstr ""
-#: sed/sed.c:79
+#: 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"
msgstr ""
+"GNU sed home page: <http://www.gnu.org/software/sed/>.\n"
+"Bantuan umum dalam menggunakan aplikasi GNU: <http://www.gnu.org/gethelp/>.\n"
-#: sed/sed.c:86
-#, fuzzy, c-format
-msgid ""
-"E-mail bug reports to: <%s>.\n"
-"Be sure to include the word ``%s'' somewhere in the ``Subject:'' field.\n"
+#: sed/sed.c:120
+#, c-format
+msgid "E-mail bug reports to: <%s>.\n"
msgstr ""
-"Laporkan bug ke email: %s \n"
-"Pastikan untuk menyertakan kata \"%s\" di field \"Subject:\".\n"
-#: sed/sed.c:99
+#: sed/sed.c:129
msgid ""
" -R, --regexp-perl\n"
" use Perl 5's regular expressions syntax in the script.\n"
@@ -239,7 +624,7 @@ msgstr ""
" -R, --regexp-perl\n"
" gunakan sintaks reguler ekspresi Perl 5 dalam skrip.\n"
-#: sed/sed.c:104
+#: sed/sed.c:134
#, c-format
msgid ""
"Usage: %s [OPTION]... {script-only-if-no-other-script} [input-file]...\n"
@@ -249,7 +634,7 @@ msgstr ""
"masukan]...\n"
"\n"
-#: sed/sed.c:108
+#: sed/sed.c:138
#, c-format
msgid ""
" -n, --quiet, --silent\n"
@@ -258,7 +643,7 @@ msgstr ""
" -n, --quiet, --silent\n"
" tekan penampilan otomatis dari pola ruang\n"
-#: sed/sed.c:110
+#: sed/sed.c:140
#, c-format
msgid ""
" -e script, --expression=script\n"
@@ -267,7 +652,7 @@ msgstr ""
" -e script, --expression=script\n"
" tambahkan script ke perintah untuk dijalankan\n"
-#: sed/sed.c:112
+#: sed/sed.c:142
#, c-format
msgid ""
" -f script-file, --file=script-file\n"
@@ -278,7 +663,7 @@ msgstr ""
" tambahkan isi dari berkas-script ke perintah yang akan "
"dijalankan\n"
-#: sed/sed.c:115
+#: sed/sed.c:146
#, c-format
msgid ""
" --follow-symlinks\n"
@@ -287,7 +672,7 @@ msgstr ""
" --follow-symlinks\n"
" ikuti symlinks ketika pemrosesan di tempat\n"
-#: sed/sed.c:118
+#: sed/sed.c:149
#, fuzzy, c-format
msgid ""
" -i[SUFFIX], --in-place[=SUFFIX]\n"
@@ -297,7 +682,7 @@ msgstr ""
" ubah berkas di tempat (buat backup jika ekstensi "
"diberikan)\n"
-#: sed/sed.c:121
+#: sed/sed.c:153
#, c-format
msgid ""
" -b, --binary\n"
@@ -308,7 +693,7 @@ msgstr ""
" buka berkas dalam mode binari (CR+LF tidak diproses secara "
"spesial)\n"
-#: sed/sed.c:124
+#: sed/sed.c:157
#, c-format
msgid ""
" -l N, --line-length=N\n"
@@ -318,7 +703,7 @@ msgstr ""
" spesifikasikan panjang line-wrap yang diinginkan untuk "
"perintah `l'\n"
-#: sed/sed.c:126
+#: sed/sed.c:159
#, c-format
msgid ""
" --posix\n"
@@ -327,29 +712,36 @@ msgstr ""
" --posix\n"
" non-aktifkan seluruh ekstensi GNU.\n"
-#: sed/sed.c:128
-#, c-format
+#: sed/sed.c:161
+#, fuzzy, c-format
msgid ""
-" -r, --regexp-extended\n"
-" use extended regular expressions in the script.\n"
+" -E, -r, --regexp-extended\n"
+" use extended regular expressions in the script\n"
+" (for portability use POSIX -E).\n"
msgstr ""
" -r, --regexp-extended\n"
" gunakan ekspresi ekstensi regular dalam skrip.\n"
-#: sed/sed.c:133
-#, c-format
+#: sed/sed.c:167
+#, fuzzy, c-format
msgid ""
" -s, --separate\n"
-" consider files as separate rather than as a single "
-"continuous\n"
-" long stream.\n"
+" consider files as separate rather than as a single,\n"
+" continuous long stream.\n"
msgstr ""
" -s, --separate\n"
" pertimbangkat berkas sebagai terpisah daripa sebagai "
"sebuah\n"
" stream tunggal panjang berkelanjutan.\n"
-#: sed/sed.c:136
+#: sed/sed.c:170
+#, c-format
+msgid ""
+" --sandbox\n"
+" operate in sandbox mode.\n"
+msgstr ""
+
+#: sed/sed.c:172
#, c-format
msgid ""
" -u, --unbuffered\n"
@@ -362,24 +754,24 @@ msgstr ""
"flush\n"
" buffer keluaran lebih sering\n"
-#: sed/sed.c:139
+#: sed/sed.c:175
#, c-format
msgid ""
" -z, --null-data\n"
" separate lines by NUL characters\n"
msgstr ""
-#: sed/sed.c:141
+#: sed/sed.c:177
#, c-format
msgid " --help display this help and exit\n"
msgstr " --help tampilkan pesan bantuan dan keluar\n"
-#: sed/sed.c:142
+#: sed/sed.c:178
#, c-format
msgid " --version output version information and exit\n"
msgstr " --version keluarkan informasi versi dan keluar\n"
-#: sed/sed.c:143
+#: sed/sed.c:179
#, c-format
msgid ""
"\n"
@@ -397,118 +789,56 @@ msgstr ""
"berkas masukan yang dispesifikasikan, maka standar masukan yang dibaca.\n"
"\n"
-#: sed/utils.c:74 sed/utils.c:432
+#: sed/utils.c:73 sed/utils.c:384
#, c-format
msgid "cannot remove %s: %s"
msgstr "tidak dapat menghapus %s: %s"
-#: sed/utils.c:144
+#: sed/utils.c:136
#, c-format
msgid "couldn't open file %s: %s"
msgstr "tidak dapat membuka berkas %s: %s"
-#: sed/utils.c:167
+#: sed/utils.c:155
#, c-format
msgid "couldn't attach to %s: %s"
msgstr "tidak dapat meng-attach ke %s: %s"
-#: sed/utils.c:229
-#, c-format
-msgid "couldn't write %d item to %s: %s"
-msgid_plural "couldn't write %d items to %s: %s"
+#: sed/utils.c:192
+#, fuzzy, c-format
+msgid "couldn't write %llu item to %s: %s"
+msgid_plural "couldn't write %llu items to %s: %s"
msgstr[0] "tidak dapat menulis %d item ke %s: %s"
-#: sed/utils.c:244 sed/utils.c:267
+#: sed/utils.c:204 sed/utils.c:223
#, c-format
msgid "read error on %s: %s"
msgstr "kesalahan pembacaan pada %s: %s"
-#: sed/utils.c:372
+#: sed/utils.c:325
#, c-format
msgid "couldn't follow symlink %s: %s"
msgstr "tidak dapat mengikuti symlink %s: %s"
-#: sed/utils.c:406
+#: sed/utils.c:359
#, c-format
msgid "cannot stat %s: %s"
msgstr "tidak dapat memperoleh statistik %s: %s"
-#: sed/utils.c:437
+#: sed/utils.c:389
#, c-format
msgid "cannot rename %s: %s"
msgstr "tidak dapat mengubah nama %s: %s"
-#: lib/regcomp.c:132
-msgid "Success"
-msgstr "Sukses"
-
-#: lib/regcomp.c:135
-msgid "No match"
-msgstr "Tidak cocok"
-
-#: lib/regcomp.c:138
-msgid "Invalid regular expression"
-msgstr "Reguler ekspresi tidak valid"
-
-#: lib/regcomp.c:141
-msgid "Invalid collation character"
-msgstr "Karakter kolasi tidak valid"
-
-#: lib/regcomp.c:144
-msgid "Invalid character class name"
-msgstr "Nama kelas karakter tidak valid"
-
-#: lib/regcomp.c:147
-msgid "Trailing backslash"
-msgstr "Trailing backslash"
-
-#: lib/regcomp.c:150
-msgid "Invalid back reference"
-msgstr "Referensi balik tidak valid"
-
-#: lib/regcomp.c:153
-msgid "Unmatched [ or [^"
-msgstr "[ atau [^ tidak sesuai"
-
-#: lib/regcomp.c:156
-msgid "Unmatched ( or \\("
-msgstr "( atau \\( tidak sesuai"
-
-#: lib/regcomp.c:159
-msgid "Unmatched \\{"
-msgstr "\\{ tidak sesuai"
-
-#: lib/regcomp.c:162
-msgid "Invalid content of \\{\\}"
-msgstr "Isi \\{\\} tidak valid"
+#~ msgid "cannot specify modifiers on empty regexp"
+#~ msgstr "Tidak dapat menspesifikasikan pemodifikasi pada regexp kosong"
-#: lib/regcomp.c:165
-msgid "Invalid range end"
-msgstr "Batas akhir tidak valid"
-
-#: lib/regcomp.c:168
-msgid "Memory exhausted"
-msgstr "Kehabisan memori"
-
-#: lib/regcomp.c:171
-msgid "Invalid preceding regular expression"
-msgstr "Reguler ekspresi yang mengawali tidak valid"
-
-#: lib/regcomp.c:174
-msgid "Premature end of regular expression"
-msgstr "Reguler ekspresi berakhir prematur"
-
-#: lib/regcomp.c:177
-msgid "Regular expression too big"
-msgstr "Reguler ekspresi terlalu besar"
-
-#: lib/regcomp.c:180
-msgid "Unmatched ) or \\)"
-msgstr ") atau \\) tidak sesuai"
-
-#: lib/regcomp.c:705
-msgid "No previous regular expression"
-msgstr "Tidak ada reguler ekspresi sebelumnya"
+#~ msgid ""
+#~ "E-mail bug reports to: <%s>.\n"
+#~ "Be sure to include the word ``%s'' somewhere in the ``Subject:'' field.\n"
+#~ msgstr ""
+#~ "Laporkan bug ke email: <%s>.\n"
+#~ "Pastikan untuk menyertakan kata ``%s'' di field ``Subject:''.\n"
#~ msgid "super-sed version %s\n"
#~ msgstr "super-sed versi %s\n"
@@ -524,14 +854,14 @@ msgstr "Tidak ada reguler ekspresi sebelumnya"
#~ msgstr "GNU sed versi %s\n"
#~ msgid ""
-#~ "%s\n"
+#~ "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 ""
-#~ "%s\n"
+#~ "Hak Cipta (C) %d Free Software Foundation, Inc.\n"
#~ "Ini adalah aplikasi bebas; lihat kode program untuk persyaratan "
#~ "penyalinan.\n"
#~ "TIDAK ADA garansi disini; bahkan untuk DIPERDAGANGKAN atau KECOCOKAN "
diff --git a/po/it.gmo b/po/it.gmo
index 3172103..a3cd9df 100644
--- a/po/it.gmo
+++ b/po/it.gmo
Binary files differ
diff --git a/po/it.po b/po/it.po
index 0c9e163..9cecc09 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: 2012-12-22 14:36+0100\n"
+"POT-Creation-Date: 2016-12-30 00:59-0800\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"
@@ -15,259 +15,659 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=ISO-8859-1\n"
"Content-Transfer-Encoding: 8-bit\n"
+"X-Bugs: Report translation errors to the Language-Team address.\n"
"Plural-Forms: nplurals=2; plural=n != 1;\n"
+#: lib/closeout.c:112
+msgid "write error"
+msgstr ""
+
+#: lib/copy-acl.c:54
+#, c-format
+msgid "preserving permissions for %s"
+msgstr ""
+
+#: lib/dfa.c:1025 lib/dfa.c:1028 lib/dfa.c:1047 lib/dfa.c:1057 lib/dfa.c:1070
+#: lib/dfa.c:1098 lib/dfa.c:1107 lib/dfa.c:1110 lib/dfa.c:1115 lib/dfa.c:1137
+#: lib/dfa.c:1140
+msgid "unbalanced ["
+msgstr ""
+
+# lib/regcomp.c:191
+#: lib/dfa.c:1083
+#, fuzzy
+msgid "invalid character class"
+msgstr "Nome non valido per una classe di caratteri"
+
+#: lib/dfa.c:1206
+msgid "character class syntax is [[:space:]], not [:space:]"
+msgstr ""
+
+#: lib/dfa.c:1275
+msgid "unfinished \\ escape"
+msgstr ""
+
+# lib/regcomp.c:209
+#: lib/dfa.c:1436
+#, fuzzy
+msgid "invalid content of \\{\\}"
+msgstr "numero di ripetizioni specificato tra graffe non valido"
+
+# lib/regcomp.c:224
+#: lib/dfa.c:1439
+#, fuzzy
+msgid "regular expression too big"
+msgstr "Espressione regolare troppo grande"
+
+#: lib/dfa.c:1853
+msgid "unbalanced ("
+msgstr ""
+
+#: lib/dfa.c:1980
+msgid "no syntax specified"
+msgstr ""
+
+#: lib/dfa.c:1988
+msgid "unbalanced )"
+msgstr ""
+
+#: lib/error.c:191
+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 ""
+
+#: lib/getopt.c:654 lib/getopt.c:658
+#, c-format
+msgid "%s: option '--%s' doesn't allow an argument\n"
+msgstr ""
+
+#: 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:715 lib/getopt.c:734
+#, c-format
+msgid "%s: option '--%s' requires an argument\n"
+msgstr ""
+
+#: 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
+#, 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
+#, 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
+msgid "memory exhausted"
+msgstr "Memoria esaurita"
+
+#. TRANSLATORS:
+#. Get translations for open and closing quotation marks.
+#. The message catalog should translate "`" to a left
+#. quotation mark suitable for the locale, and similarly for
+#. "'". For example, a French Unicode local should translate
+#. these to U+00AB (LEFT-POINTING DOUBLE ANGLE
+#. QUOTATION MARK), and U+00BB (RIGHT-POINTING DOUBLE ANGLE
+#. QUOTATION MARK), respectively.
+#.
+#. If the catalog has no translation, we will try to
+#. use Unicode U+2018 (LEFT SINGLE QUOTATION MARK) and
+#. Unicode U+2019 (RIGHT SINGLE QUOTATION MARK). If the
+#. current locale is not Unicode, locale_quoting_style
+#. will quote 'like this', and clocale_quoting_style will
+#. quote "like this". You should always include translations
+#. for "`" and "'" even if U+2018 and U+2019 are appropriate
+#. for your locale.
+#.
+#. If you don't know what to put here, please see
+#. <http://en.wikipedia.org/wiki/Quotation_marks_in_other_languages>
+#. and use glyphs suitable for your language.
+#: lib/quotearg.c:354
+msgid "`"
+msgstr ""
+
+#: lib/quotearg.c:355
+msgid "'"
+msgstr ""
+
+# lib/regcomp.c:179
+#: lib/regcomp.c:135
+msgid "Success"
+msgstr "Successo"
+
+# lib/regcomp.c:182
+#: lib/regcomp.c:138
+msgid "No match"
+msgstr "Nessuna corrispondenza trovata"
+
+# lib/regcomp.c:185
+#: lib/regcomp.c:141
+msgid "Invalid regular expression"
+msgstr "Espressione regolare non valida"
+
+# lib/regcomp.c:188
+#: lib/regcomp.c:144
+msgid "Invalid collation character"
+msgstr "Carattere di ordinamento non valido"
+
+# lib/regcomp.c:191
+#: lib/regcomp.c:147
+msgid "Invalid character class name"
+msgstr "Nome non valido per una classe di caratteri"
+
+# lib/regcomp.c:194
+#: lib/regcomp.c:150
+msgid "Trailing backslash"
+msgstr "Barra rovesciata alla fine dell'espressione regolare"
+
+# lib/regcomp.c:197
+#: lib/regcomp.c:153
+msgid "Invalid back reference"
+msgstr "Riferimento non valido"
+
+# lib/regcomp.c:200
+#: lib/regcomp.c:156
+#, fuzzy
+msgid "Unmatched [, [^, [:, [., or [="
+msgstr "`[' non bilanciata"
+
+# lib/regcomp.c:203
+#: lib/regcomp.c:159
+msgid "Unmatched ( or \\("
+msgstr "`(' o `\\(' non bilanciata"
+
+# lib/regcomp.c:206
+#: lib/regcomp.c:162
+msgid "Unmatched \\{"
+msgstr "`\\{' non bilanciata"
+
+# lib/regcomp.c:209
+#: lib/regcomp.c:165
+msgid "Invalid content of \\{\\}"
+msgstr "numero di ripetizioni specificato tra graffe non valido"
+
+# lib/regcomp.c:212
+#: lib/regcomp.c:168
+msgid "Invalid range end"
+msgstr "Fine dell'intervallo non valida"
+
+# lib/regcomp.c:215
+#: lib/regcomp.c:171
+msgid "Memory exhausted"
+msgstr "Memoria esaurita"
+
+# lib/regcomp.c:218
+#: lib/regcomp.c:174
+msgid "Invalid preceding regular expression"
+msgstr "Espressione regolare precedente non valida"
+
+# lib/regcomp.c:221
+#: lib/regcomp.c:177
+msgid "Premature end of regular expression"
+msgstr "Fine prematura dell'espressione regolare"
+
+# lib/regcomp.c:224
+#: lib/regcomp.c:180
+msgid "Regular expression too big"
+msgstr "Espressione regolare troppo grande"
+
+# lib/regcomp.c:227
+#: lib/regcomp.c:183
+msgid "Unmatched ) or \\)"
+msgstr "`)' o `\\)' non bilanciata"
+
+# lib/regcomp.c:658 sed/regex.c:47
+#: lib/regcomp.c:687
+msgid "No previous regular expression"
+msgstr "Occorre un'espressione regolare precedente"
+
+#: lib/set-acl.c:46
+#, c-format
+msgid "setting permissions for %s"
+msgstr ""
+
+#: lib/version-etc.c:74
+#, c-format
+msgid "Packaged by %s (%s)\n"
+msgstr ""
+
+#: lib/version-etc.c:77
+#, c-format
+msgid "Packaged by %s\n"
+msgstr ""
+
+#. 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 ""
+
+#: lib/version-etc.c:86
+msgid ""
+"\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"
+msgstr ""
+
+#. TRANSLATORS: %s denotes an author name.
+#: lib/version-etc.c:102
+#, c-format
+msgid "Written by %s.\n"
+msgstr ""
+
+#. TRANSLATORS: Each %s denotes an author name.
+#: lib/version-etc.c:106
+#, c-format
+msgid "Written by %s and %s.\n"
+msgstr ""
+
+#. TRANSLATORS: Each %s denotes an author name.
+#: lib/version-etc.c:110
+#, c-format
+msgid "Written by %s, %s, and %s.\n"
+msgstr ""
+
+#. TRANSLATORS: Each %s denotes an author name.
+#. You can use line breaks, estimating that each author name occupies
+#. ca. 16 screen columns and that a screen line has ca. 80 columns.
+#: lib/version-etc.c:117
+#, c-format
+msgid ""
+"Written by %s, %s, %s,\n"
+"and %s.\n"
+msgstr ""
+
+#. TRANSLATORS: Each %s denotes an author name.
+#. You can use line breaks, estimating that each author name occupies
+#. ca. 16 screen columns and that a screen line has ca. 80 columns.
+#: lib/version-etc.c:124
+#, c-format
+msgid ""
+"Written by %s, %s, %s,\n"
+"%s, and %s.\n"
+msgstr ""
+
+#. TRANSLATORS: Each %s denotes an author name.
+#. You can use line breaks, estimating that each author name occupies
+#. ca. 16 screen columns and that a screen line has ca. 80 columns.
+#: lib/version-etc.c:131
+#, c-format
+msgid ""
+"Written by %s, %s, %s,\n"
+"%s, %s, and %s.\n"
+msgstr ""
+
+#. TRANSLATORS: Each %s denotes an author name.
+#. You can use line breaks, estimating that each author name occupies
+#. ca. 16 screen columns and that a screen line has ca. 80 columns.
+#: lib/version-etc.c:139
+#, c-format
+msgid ""
+"Written by %s, %s, %s,\n"
+"%s, %s, %s, and %s.\n"
+msgstr ""
+
+#. TRANSLATORS: Each %s denotes an author name.
+#. You can use line breaks, estimating that each author name occupies
+#. ca. 16 screen columns and that a screen line has ca. 80 columns.
+#: lib/version-etc.c:147
+#, c-format
+msgid ""
+"Written by %s, %s, %s,\n"
+"%s, %s, %s, %s,\n"
+"and %s.\n"
+msgstr ""
+
+#. TRANSLATORS: Each %s denotes an author name.
+#. You can use line breaks, estimating that each author name occupies
+#. ca. 16 screen columns and that a screen line has ca. 80 columns.
+#: lib/version-etc.c:156
+#, c-format
+msgid ""
+"Written by %s, %s, %s,\n"
+"%s, %s, %s, %s,\n"
+"%s, and %s.\n"
+msgstr ""
+
+#. TRANSLATORS: Each %s denotes an author name.
+#. You can use line breaks, estimating that each author name occupies
+#. ca. 16 screen columns and that a screen line has ca. 80 columns.
+#: lib/version-etc.c:167
+#, c-format
+msgid ""
+"Written by %s, %s, %s,\n"
+"%s, %s, %s, %s,\n"
+"%s, %s, and others.\n"
+msgstr ""
+
+#. TRANSLATORS: The placeholder indicates the bug-reporting address
+#. for this package. Please add _another line_ saying
+#. "Report translation bugs to <...>\n" with the address for translation
+#. bugs (typically your translation team's web or email address).
+#: lib/version-etc.c:245
+#, c-format
+msgid ""
+"\n"
+"Report bugs to: %s\n"
+msgstr ""
+
+#: lib/version-etc.c:247
+#, c-format
+msgid "Report %s bugs to: %s\n"
+msgstr ""
+
+#: lib/version-etc.c:251
+#, c-format
+msgid "%s home page: <%s>\n"
+msgstr ""
+
+#: lib/version-etc.c:253
+#, c-format
+msgid "%s home page: <http://www.gnu.org/software/%s/>\n"
+msgstr ""
+
+#: lib/version-etc.c:256
+msgid "General help using GNU software: <http://www.gnu.org/gethelp/>\n"
+msgstr ""
+
# sed/compile.c:166
-#: sed/compile.c:144
+#: sed/compile.c:146
msgid "multiple `!'s"
msgstr "`!' multipli"
# sed/compile.c:167
-#: sed/compile.c:145
+#: sed/compile.c:147
msgid "unexpected `,'"
msgstr "`,' inattesa"
# sed/compile.c:169
-#: sed/compile.c:146
+#: sed/compile.c:149
msgid "invalid usage of +N or ~N as first address"
msgstr "impossibile usare +N o ~N come primo indirizzo"
# sed/compile.c:170
-#: sed/compile.c:147
+#: sed/compile.c:150
msgid "unmatched `{'"
msgstr "`{' non bilanciata"
# sed/compile.c:171
-#: sed/compile.c:148
+#: sed/compile.c:151
msgid "unexpected `}'"
msgstr "`}' inattesa"
# sed/compile.c:172
-#: sed/compile.c:149
+#: sed/compile.c:153
msgid "extra characters after command"
msgstr "ci sono altri caratteri dopo il comando"
# sed/compile.c:173
-#: sed/compile.c:150
+#: sed/compile.c:155
msgid "expected \\ after `a', `c' or `i'"
msgstr "atteso \\ dopo `a', `c' o `i'"
# sed/compile.c:174
-#: sed/compile.c:151
+#: sed/compile.c:157
msgid "`}' doesn't want any addresses"
msgstr "`}' non accetta indirizzi"
# sed/compile.c:175
-#: sed/compile.c:152
+#: sed/compile.c:159
msgid ": doesn't want any addresses"
msgstr ": non accetta indirizzi"
# sed/compile.c:176
-#: sed/compile.c:153
+#: sed/compile.c:161
msgid "comments don't accept any addresses"
msgstr "i commenti non accettano indirizzi"
# sed/compile.c:177
-#: sed/compile.c:154
+#: sed/compile.c:162
msgid "missing command"
msgstr "manca il comando"
# sed/compile.c:178
-#: sed/compile.c:155
+#: sed/compile.c:163
msgid "command only uses one address"
msgstr "il comando usa solo un indirizzo"
# sed/compile.c:179
-#: sed/compile.c:156
+#: sed/compile.c:164
msgid "unterminated address regex"
msgstr "espressione regolare non terminata nell'indirizzo"
# sed/compile.c:180
-#: sed/compile.c:157
+#: sed/compile.c:165
msgid "unterminated `s' command"
msgstr "comando `s' non terminato"
# sed/compile.c:181
-#: sed/compile.c:158
+#: sed/compile.c:166
msgid "unterminated `y' command"
msgstr "comando `y' non terminato"
# sed/compile.c:182
-#: sed/compile.c:159
+#: sed/compile.c:167
msgid "unknown option to `s'"
msgstr "opzione di `s' sconosciuta"
# sed/compile.c:183
-#: sed/compile.c:160
+#: sed/compile.c:169
msgid "multiple `p' options to `s' command"
msgstr "opzioni `p' multiple al comando `s'"
# sed/compile.c:184
-#: sed/compile.c:161
+#: sed/compile.c:171
msgid "multiple `g' options to `s' command"
msgstr "opzioni `g' multiple al comando `s'"
# sed/compile.c:186
-#: sed/compile.c:162
+#: sed/compile.c:173
msgid "multiple number options to `s' command"
msgstr "opzioni numeriche multiple al comando `s'"
# sed/compile.c:188
-#: sed/compile.c:163
+#: sed/compile.c:175
msgid "number option to `s' command may not be zero"
msgstr "l'opzione numerica del comando `s' non pu essere zero"
# sed/compile.c:190
-#: sed/compile.c:164
+#: sed/compile.c:177
msgid "strings for `y' command are different lengths"
msgstr "le stringhe per il comandi `y' hanno lunghezze diverse"
-#: sed/compile.c:165
+#: sed/compile.c:179
msgid "delimiter character is not a single-byte character"
msgstr "il carattere delimitatore multi-byte"
-#: sed/compile.c:166
+#: sed/compile.c:181
msgid "expected newer version of sed"
msgstr "attesa una versione piu' recente di sed"
# sed/compile.c:178
-#: sed/compile.c:167
+#: sed/compile.c:183
msgid "invalid usage of line address 0"
msgstr "utilizzo non valido dell'indirizzo 0"
# sed/compile.c:1319
-#: sed/compile.c:168
+#: sed/compile.c:184
#, c-format
msgid "unknown command: `%c'"
msgstr "comando sconosciuto: `%c'"
# sed/compile.c:177
-#: sed/compile.c:169
+#: sed/compile.c:186
#, fuzzy
msgid "incomplete command"
msgstr "manca il comando"
+#: sed/compile.c:188
+msgid "\":\" lacks a label"
+msgstr ""
+
+#: sed/compile.c:190
+msgid "recursive escaping after \\c not allowed"
+msgstr ""
+
# sed/compile.c:1340
-#: sed/compile.c:192
+#: sed/compile.c:213
#, c-format
msgid "%s: file %s line %lu: %s\n"
msgstr "%s: file %s riga %lu: %s\n"
# sed/compile.c:1343
-#: sed/compile.c:195
+#: sed/compile.c:216
#, c-format
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:1657
+#: sed/compile.c:1639
#, 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
+#, c-format
+msgid "case conversion produced an invalid character"
+msgstr ""
+
# sed/execute.c:516
-#: sed/execute.c:595
+#: sed/execute.c:575
#, c-format
msgid "%s: can't read %s: %s\n"
msgstr "%s: impossibile leggere %s: %s\n"
# sed/execute.c:675
-#: sed/execute.c:624
+#: sed/execute.c:600
#, c-format
msgid "couldn't edit %s: is a terminal"
msgstr "impossibile modificare %s: un terminale"
-#: sed/execute.c:629
+#: sed/execute.c:605
#, c-format
msgid "couldn't edit %s: not a regular file"
msgstr "impossibile modificare %s: non un file normale"
-#: sed/execute.c:640
+#: sed/execute.c:616
#, c-format
msgid "%s: warning: failed to set default file creation context to %s: %s"
msgstr ""
-#: sed/execute.c:647
+#: sed/execute.c:624
#, c-format
msgid "%s: warning: failed to get security context of %s: %s"
msgstr ""
# lib/utils.c:131
-#: sed/execute.c:664 sed/utils.c:211
+#: sed/execute.c:643 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:1193 sed/execute.c:1373
+#: sed/execute.c:1158 sed/execute.c:1368
msgid "error in subprocess"
msgstr "errore in un sottoprocesso"
# sed/execute.c:1005
-#: sed/execute.c:1195
+#: sed/execute.c:1160
msgid "option `e' not supported"
msgstr "opzione `e' non supportata"
# sed/execute.c:1185
-#: sed/execute.c:1375
+#: sed/execute.c:1349
msgid "`e' command not supported"
msgstr "comando `e' non supportato"
-#: sed/execute.c:1725
+#: sed/execute.c:1675
msgid "no input files"
msgstr "nessun file in ingresso"
# lib/regcomp.c:658 sed/regex.c:47
-#: sed/regexp.c:39
+#: sed/regexp.c:38
msgid "no previous regular expression"
msgstr "occorre un'espressione regolare precedente"
-# sed/regex.c:48
-#: sed/regexp.c:40
-msgid "cannot specify modifiers on empty regexp"
-msgstr "non possibile specificare dei modificatori per l'espressione vuota"
-
# sed/regex.c:146
-#: sed/regexp.c:129
+#: sed/regexp.c:138
#, c-format
msgid "invalid reference \\%d on `s' command's RHS"
msgstr "riferimento non valido \\%d nel secondo membro del comando `s'"
-#: sed/sed.c:32
+#: sed/sed.c:35
msgid "Jay Fenlason"
msgstr ""
-#: sed/sed.c:33
+#: sed/sed.c:36
msgid "Tom Lord"
msgstr ""
-#: sed/sed.c:34
+#: sed/sed.c:37
msgid "Ken Pizzini"
msgstr ""
-#: sed/sed.c:35
+#: sed/sed.c:38
msgid "Paolo Bonzini"
msgstr ""
-#: sed/sed.c:79
+#: 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"
msgstr ""
-# sed/sed.c:132
-#: sed/sed.c:86
-#, fuzzy, c-format
-msgid ""
-"E-mail bug reports to: <%s>.\n"
-"Be sure to include the word ``%s'' somewhere in the ``Subject:'' field.\n"
+#: sed/sed.c:120
+#, c-format
+msgid "E-mail bug reports to: <%s>.\n"
msgstr ""
-"Segnalare eventuali bug a: %s .\n"
-"Assicurarsi di includere la parola ``%s'' nell'oggetto del messaggio.\n"
# sed/sed.c:98
-#: sed/sed.c:99
+#: sed/sed.c:129
msgid ""
" -R, --regexp-perl\n"
" use Perl 5's regular expressions syntax in the script.\n"
@@ -275,7 +675,7 @@ msgstr ""
" -R, --regexp-perl\n"
" usa la sintassi Perl 5 per le espressioni regolari\n"
-#: sed/sed.c:104
+#: sed/sed.c:134
#, c-format
msgid ""
"Usage: %s [OPTION]... {script-only-if-no-other-script} [input-file]...\n"
@@ -285,7 +685,7 @@ msgstr ""
"file]...\n"
"\n"
-#: sed/sed.c:108
+#: sed/sed.c:138
#, c-format
msgid ""
" -n, --quiet, --silent\n"
@@ -294,7 +694,7 @@ msgstr ""
" -n, --quiet, --silent\n"
" sopprime la stampa automatica del pattern space\n"
-#: sed/sed.c:110
+#: sed/sed.c:140
#, c-format
msgid ""
" -e script, --expression=script\n"
@@ -303,7 +703,7 @@ msgstr ""
" -e script, --expression=script\n"
" aggiunge lo script ai comandi da eseguire\n"
-#: sed/sed.c:112
+#: sed/sed.c:142
#, c-format
msgid ""
" -f script-file, --file=script-file\n"
@@ -314,7 +714,7 @@ msgstr ""
" aggiunge il contenuto di file-script ai comandi da "
"eseguire\n"
-#: sed/sed.c:115
+#: sed/sed.c:146
#, c-format
msgid ""
" --follow-symlinks\n"
@@ -323,7 +723,7 @@ msgstr ""
" --follow-symlinks\n"
" segue i link simbolici quando viene utilizzato -i\n"
-#: sed/sed.c:118
+#: sed/sed.c:149
#, fuzzy, c-format
msgid ""
" -i[SUFFIX], --in-place[=SUFFIX]\n"
@@ -333,7 +733,7 @@ msgstr ""
" scrive il risultato sul file originale (facendo una copia\n"
" se fornita un'estensione)\n"
-#: sed/sed.c:121
+#: sed/sed.c:153
#, c-format
msgid ""
" -b, --binary\n"
@@ -344,7 +744,7 @@ msgstr ""
" apre i file in modo binario (lasciando le sequenze CR+LF "
"immutate)\n"
-#: sed/sed.c:124
+#: sed/sed.c:157
#, c-format
msgid ""
" -l N, --line-length=N\n"
@@ -354,7 +754,7 @@ msgstr ""
" specifica la lunghezza delle linee generate dal comando "
"`l'\n"
-#: sed/sed.c:126
+#: sed/sed.c:159
#, c-format
msgid ""
" --posix\n"
@@ -364,28 +764,35 @@ msgstr ""
" disabilita tutte le estensioni GNU.\n"
# sed/sed.c:98
-#: sed/sed.c:128
-#, c-format
+#: sed/sed.c:161
+#, fuzzy, c-format
msgid ""
-" -r, --regexp-extended\n"
-" use extended regular expressions in the script.\n"
+" -E, -r, --regexp-extended\n"
+" use extended regular expressions in the script\n"
+" (for portability use POSIX -E).\n"
msgstr ""
" -r, --regexp-extended\n"
" usa la sintassi di `egrep' per le espressioni regolari\n"
-#: sed/sed.c:133
-#, c-format
+#: sed/sed.c:167
+#, fuzzy, c-format
msgid ""
" -s, --separate\n"
-" consider files as separate rather than as a single "
-"continuous\n"
-" long stream.\n"
+" consider files as separate rather than as a single,\n"
+" continuous long stream.\n"
msgstr ""
" -s, --separate\n"
" considera i file di input come separati invece che come un\n"
" unico file lungo.\n"
-#: sed/sed.c:136
+#: sed/sed.c:170
+#, c-format
+msgid ""
+" --sandbox\n"
+" operate in sandbox mode.\n"
+msgstr ""
+
+#: sed/sed.c:172
#, c-format
msgid ""
" -u, --unbuffered\n"
@@ -396,24 +803,24 @@ msgstr ""
" -u, --unbuffered\n"
" carica e visualizza i dati una a pezzetti piu' piccoli\n"
-#: sed/sed.c:139
+#: sed/sed.c:175
#, c-format
msgid ""
" -z, --null-data\n"
" separate lines by NUL characters\n"
msgstr ""
-#: sed/sed.c:141
+#: sed/sed.c:177
#, c-format
msgid " --help display this help and exit\n"
msgstr " --help mostra questo aiuto ed esce\n"
-#: sed/sed.c:142
+#: sed/sed.c:178
#, c-format
msgid " --version output version information and exit\n"
msgstr " --version stampa le informazioni sulla versione ed esce\n"
-#: sed/sed.c:143
+#: sed/sed.c:179
#, c-format
msgid ""
"\n"
@@ -433,144 +840,67 @@ msgstr ""
"\n"
# sed/execute.c:516
-#: sed/utils.c:74 sed/utils.c:432
+#: sed/utils.c:73 sed/utils.c:384
#, c-format
msgid "cannot remove %s: %s"
msgstr "impossibile rimuovere %s: %s"
# lib/utils.c:131
-#: sed/utils.c:144
+#: sed/utils.c:136
#, c-format
msgid "couldn't open file %s: %s"
msgstr "impossibile aprire il file %s: %s"
# lib/utils.c:161
-#: sed/utils.c:167
+#: sed/utils.c:155
#, c-format
msgid "couldn't attach to %s: %s"
msgstr "impossibile accedere a %s: %s"
# lib/utils.c:161
-#: sed/utils.c:229
-#, c-format
-msgid "couldn't write %d item to %s: %s"
-msgid_plural "couldn't write %d items to %s: %s"
+#: sed/utils.c:192
+#, fuzzy, c-format
+msgid "couldn't write %llu item to %s: %s"
+msgid_plural "couldn't write %llu items to %s: %s"
msgstr[0] "impossibile scrivere %d elemento su %s: %s"
msgstr[1] "impossibile scrivere %d elementi su %s: %s"
# lib/utils.c:176
-#: sed/utils.c:244 sed/utils.c:267
+#: sed/utils.c:204 sed/utils.c:223
#, c-format
msgid "read error on %s: %s"
msgstr "errore di lettura su %s: %s"
# lib/utils.c:131
-#: sed/utils.c:372
+#: sed/utils.c:325
#, c-format
msgid "couldn't follow symlink %s: %s"
msgstr "impossibile seguire il link simbolico %s: %s"
# sed/execute.c:516
-#: sed/utils.c:406
+#: sed/utils.c:359
#, c-format
msgid "cannot stat %s: %s"
msgstr "impossibile ottenere informazioni su %s: %s"
# sed/execute.c:516
-#: sed/utils.c:437
+#: sed/utils.c:389
#, c-format
msgid "cannot rename %s: %s"
msgstr "impossibile rinominare %s: %s"
-# lib/regcomp.c:179
-#: lib/regcomp.c:132
-msgid "Success"
-msgstr "Successo"
-
-# lib/regcomp.c:182
-#: lib/regcomp.c:135
-msgid "No match"
-msgstr "Nessuna corrispondenza trovata"
-
-# lib/regcomp.c:185
-#: lib/regcomp.c:138
-msgid "Invalid regular expression"
-msgstr "Espressione regolare non valida"
-
-# lib/regcomp.c:188
-#: lib/regcomp.c:141
-msgid "Invalid collation character"
-msgstr "Carattere di ordinamento non valido"
-
-# lib/regcomp.c:191
-#: lib/regcomp.c:144
-msgid "Invalid character class name"
-msgstr "Nome non valido per una classe di caratteri"
-
-# lib/regcomp.c:194
-#: lib/regcomp.c:147
-msgid "Trailing backslash"
-msgstr "Barra rovesciata alla fine dell'espressione regolare"
-
-# lib/regcomp.c:197
-#: lib/regcomp.c:150
-msgid "Invalid back reference"
-msgstr "Riferimento non valido"
-
-# lib/regcomp.c:200
-#: lib/regcomp.c:153
-msgid "Unmatched [ or [^"
-msgstr "`[' non bilanciata"
-
-# lib/regcomp.c:203
-#: lib/regcomp.c:156
-msgid "Unmatched ( or \\("
-msgstr "`(' o `\\(' non bilanciata"
-
-# lib/regcomp.c:206
-#: lib/regcomp.c:159
-msgid "Unmatched \\{"
-msgstr "`\\{' non bilanciata"
-
-# lib/regcomp.c:209
-#: lib/regcomp.c:162
-msgid "Invalid content of \\{\\}"
-msgstr "numero di ripetizioni specificato tra graffe non valido"
-
-# lib/regcomp.c:212
-#: lib/regcomp.c:165
-msgid "Invalid range end"
-msgstr "Fine dell'intervallo non valida"
-
-# lib/regcomp.c:215
-#: lib/regcomp.c:168
-msgid "Memory exhausted"
-msgstr "Memoria esaurita"
-
-# lib/regcomp.c:218
-#: lib/regcomp.c:171
-msgid "Invalid preceding regular expression"
-msgstr "Espressione regolare precedente non valida"
-
-# lib/regcomp.c:221
-#: lib/regcomp.c:174
-msgid "Premature end of regular expression"
-msgstr "Fine prematura dell'espressione regolare"
-
-# lib/regcomp.c:224
-#: lib/regcomp.c:177
-msgid "Regular expression too big"
-msgstr "Espressione regolare troppo grande"
-
-# lib/regcomp.c:227
-#: lib/regcomp.c:180
-msgid "Unmatched ) or \\)"
-msgstr "`)' o `\\)' non bilanciata"
+# sed/regex.c:48
+#~ msgid "cannot specify modifiers on empty regexp"
+#~ msgstr ""
+#~ "non possibile specificare dei modificatori per l'espressione vuota"
-# lib/regcomp.c:658 sed/regex.c:47
-#: lib/regcomp.c:705
-msgid "No previous regular expression"
-msgstr "Occorre un'espressione regolare precedente"
+# sed/sed.c:132
+#~ msgid ""
+#~ "E-mail bug reports to: %s .\n"
+#~ "Be sure to include the word ``%s'' somewhere in the ``Subject:'' field.\n"
+#~ msgstr ""
+#~ "Segnalare eventuali bug a: %s .\n"
+#~ "Assicurarsi di includere la parola ``%s'' nell'oggetto del messaggio.\n"
# sed/sed.c:255
#~ msgid "super-sed version %s\n"
diff --git a/po/ja.gmo b/po/ja.gmo
index 11390a6..d57237e 100644
--- a/po/ja.gmo
+++ b/po/ja.gmo
Binary files differ
diff --git a/po/ja.po b/po/ja.po
index 68788d8..55745a0 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: 2012-12-22 14:36+0100\n"
+"POT-Creation-Date: 2016-12-30 00:59-0800\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"
@@ -23,206 +23,617 @@ msgstr ""
"MIME-Version: 1.0\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=1; plural=0;\n"
-#: sed/compile.c:144
+#: lib/closeout.c:112
+msgid "write error"
+msgstr "書き込みエラー"
+
+#: lib/copy-acl.c:54
+#, c-format
+msgid "preserving permissions for %s"
+msgstr "%s のパーミッションを保存しています"
+
+#: lib/dfa.c:1025 lib/dfa.c:1028 lib/dfa.c:1047 lib/dfa.c:1057 lib/dfa.c:1070
+#: lib/dfa.c:1098 lib/dfa.c:1107 lib/dfa.c:1110 lib/dfa.c:1115 lib/dfa.c:1137
+#: lib/dfa.c:1140
+msgid "unbalanced ["
+msgstr ""
+
+#: lib/dfa.c:1083
+#, fuzzy
+msgid "invalid character class"
+msgstr "無効な文字クラス名です"
+
+#: lib/dfa.c:1206
+msgid "character class syntax is [[:space:]], not [:space:]"
+msgstr ""
+
+#: lib/dfa.c:1275
+msgid "unfinished \\ escape"
+msgstr ""
+
+#: lib/dfa.c:1436
+#, fuzzy
+msgid "invalid content of \\{\\}"
+msgstr "\\{\\} の中身が無効です"
+
+#: lib/dfa.c:1439
+#, fuzzy
+msgid "regular expression too big"
+msgstr "正規表現が大きすぎます"
+
+#: lib/dfa.c:1853
+msgid "unbalanced ("
+msgstr ""
+
+#: lib/dfa.c:1980
+msgid "no syntax specified"
+msgstr ""
+
+#: lib/dfa.c:1988
+msgid "unbalanced )"
+msgstr ""
+
+#: lib/error.c:191
+msgid "Unknown system error"
+msgstr "不明なシステムエラー"
+
+#: lib/getopt.c:575 lib/getopt.c:604
+#, fuzzy, c-format
+msgid "%s: option '%s' is ambiguous; possibilities:"
+msgstr "%s: オプション '%s' は曖昧です\n"
+
+#: lib/getopt.c:619
+#, c-format
+msgid "%s: option '%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:667 lib/getopt.c:672
+#, c-format
+msgid "%s: option '%c%s' doesn't allow an argument\n"
+msgstr "%s: オプション '%c%s' は引数を取ることができません\n"
+
+#: lib/getopt.c:715 lib/getopt.c:734
+#, fuzzy, c-format
+msgid "%s: option '--%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
+#, 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
+#, 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 "メモリを使い果たしました"
+
+#. TRANSLATORS:
+#. Get translations for open and closing quotation marks.
+#. The message catalog should translate "`" to a left
+#. quotation mark suitable for the locale, and similarly for
+#. "'". For example, a French Unicode local should translate
+#. these to U+00AB (LEFT-POINTING DOUBLE ANGLE
+#. QUOTATION MARK), and U+00BB (RIGHT-POINTING DOUBLE ANGLE
+#. QUOTATION MARK), respectively.
+#.
+#. If the catalog has no translation, we will try to
+#. use Unicode U+2018 (LEFT SINGLE QUOTATION MARK) and
+#. Unicode U+2019 (RIGHT SINGLE QUOTATION MARK). If the
+#. current locale is not Unicode, locale_quoting_style
+#. will quote 'like this', and clocale_quoting_style will
+#. quote "like this". You should always include translations
+#. for "`" and "'" even if U+2018 and U+2019 are appropriate
+#. for your locale.
+#.
+#. If you don't know what to put here, please see
+#. <http://en.wikipedia.org/wiki/Quotation_marks_in_other_languages>
+#. and use glyphs suitable for your language.
+#: lib/quotearg.c:354
+msgid "`"
+msgstr "`"
+
+#: lib/quotearg.c:355
+msgid "'"
+msgstr "'"
+
+#: lib/regcomp.c:135
+msgid "Success"
+msgstr "成功です"
+
+#: lib/regcomp.c:138
+msgid "No match"
+msgstr "一致しません"
+
+#: lib/regcomp.c:141
+msgid "Invalid regular expression"
+msgstr "無効な正規表現です"
+
+#: lib/regcomp.c:144
+msgid "Invalid collation character"
+msgstr "無効な照合文字です"
+
+#: lib/regcomp.c:147
+msgid "Invalid character class name"
+msgstr "無効な文字クラス名です"
+
+#: lib/regcomp.c:150
+msgid "Trailing backslash"
+msgstr "終端のバックスラッシュ"
+
+#: lib/regcomp.c:153
+msgid "Invalid back reference"
+msgstr "無効な前方参照です"
+
+#: lib/regcomp.c:156
+#, fuzzy
+msgid "Unmatched [, [^, [:, [., or [="
+msgstr "[ または [^ が不一致です"
+
+#: lib/regcomp.c:159
+msgid "Unmatched ( or \\("
+msgstr "( または \\( が不一致です"
+
+#: lib/regcomp.c:162
+msgid "Unmatched \\{"
+msgstr "\\{ が不一致です"
+
+#: lib/regcomp.c:165
+msgid "Invalid content of \\{\\}"
+msgstr "\\{\\} の中身が無効です"
+
+#: lib/regcomp.c:168
+msgid "Invalid range end"
+msgstr "無効な範囲終了です"
+
+#: lib/regcomp.c:171
+msgid "Memory exhausted"
+msgstr "メモリを使い果たしました"
+
+#: lib/regcomp.c:174
+msgid "Invalid preceding regular expression"
+msgstr "無効な前方正規表現です"
+
+#: lib/regcomp.c:177
+msgid "Premature end of regular expression"
+msgstr "正規表現が途中で終了しました"
+
+#: lib/regcomp.c:180
+msgid "Regular expression too big"
+msgstr "正規表現が大きすぎます"
+
+#: lib/regcomp.c:183
+msgid "Unmatched ) or \\)"
+msgstr ") または \\) が不一致です"
+
+#: lib/regcomp.c:687
+msgid "No previous regular expression"
+msgstr "以前に正規表現がありません"
+
+#: lib/set-acl.c:46
+#, c-format
+msgid "setting permissions for %s"
+msgstr "%s のパーミッションを設定します"
+
+#: lib/version-etc.c:74
+#, c-format
+msgid "Packaged by %s (%s)\n"
+msgstr "パッケージ作成者: %s (%s)\n"
+
+#: lib/version-etc.c:77
+#, c-format
+msgid "Packaged by %s\n"
+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 "(C)"
+
+#: lib/version-etc.c:86
+msgid ""
+"\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"
+msgstr ""
+"\n"
+"ライセンス 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 "作者 %s。\n"
+
+#. TRANSLATORS: Each %s denotes an author name.
+#: lib/version-etc.c:106
+#, c-format
+msgid "Written by %s and %s.\n"
+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 "作者 %s、 %s、および %s。\n"
+
+#. TRANSLATORS: Each %s denotes an author name.
+#. You can use line breaks, estimating that each author name occupies
+#. ca. 16 screen columns and that a screen line has ca. 80 columns.
+#: lib/version-etc.c:117
+#, c-format
+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
+#. ca. 16 screen columns and that a screen line has ca. 80 columns.
+#: lib/version-etc.c:124
+#, c-format
+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
+#. ca. 16 screen columns and that a screen line has ca. 80 columns.
+#: lib/version-etc.c:131
+#, c-format
+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
+#. ca. 16 screen columns and that a screen line has ca. 80 columns.
+#: lib/version-etc.c:139
+#, c-format
+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
+#. ca. 16 screen columns and that a screen line has ca. 80 columns.
+#: lib/version-etc.c:147
+#, c-format
+msgid ""
+"Written by %s, %s, %s,\n"
+"%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
+#. ca. 16 screen columns and that a screen line has ca. 80 columns.
+#: lib/version-etc.c:156
+#, c-format
+msgid ""
+"Written by %s, %s, %s,\n"
+"%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
+#. ca. 16 screen columns and that a screen line has ca. 80 columns.
+#: lib/version-etc.c:167
+#, c-format
+msgid ""
+"Written by %s, %s, %s,\n"
+"%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
+#. "Report translation bugs to <...>\n" with the address for translation
+#. bugs (typically your translation team's web or email address).
+#: lib/version-etc.c:245
+#, c-format
+msgid ""
+"\n"
+"Report bugs to: %s\n"
+msgstr ""
+"\n"
+"バグを発見したら <%s> に報告して下さい。\n"
+"翻訳に関するバグは<translation-team-ja@lists.sourceforge.net>に報告してくださ"
+"い。\n"
+
+#: lib/version-etc.c:247
+#, c-format
+msgid "Report %s bugs to: %s\n"
+msgstr "%s のバグは <%s> に報告してください。\n"
+
+#: lib/version-etc.c:251
+#, c-format
+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"
+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 ""
+"GNU ソフトウェアを使用する際の一般的なヘルプ: <http://www.gnu.org/gethelp/>\n"
+
+#: sed/compile.c:146
msgid "multiple `!'s"
msgstr "複数の `!' があります"
-#: sed/compile.c:145
+#: sed/compile.c:147
msgid "unexpected `,'"
msgstr "予期しない `,' です"
-#: sed/compile.c:146
+#: sed/compile.c:149
msgid "invalid usage of +N or ~N as first address"
msgstr "最初のアドレスへの +N または ~N の指定は無効です"
-#: sed/compile.c:147
+#: sed/compile.c:150
msgid "unmatched `{'"
msgstr "`{' が不一致です"
-#: sed/compile.c:148
+#: sed/compile.c:151
msgid "unexpected `}'"
msgstr "予期しない `}' です"
-#: sed/compile.c:149
+#: sed/compile.c:153
msgid "extra characters after command"
msgstr "コマンドの後ろに余計な文字があります"
-#: sed/compile.c:150
+#: sed/compile.c:155
msgid "expected \\ after `a', `c' or `i'"
msgstr "\\ が `a'、`c'、`i' の後に予期されます"
-#: sed/compile.c:151
+#: sed/compile.c:157
msgid "`}' doesn't want any addresses"
msgstr "`}' にアドレスは不要です"
-#: sed/compile.c:152
+#: sed/compile.c:159
msgid ": doesn't want any addresses"
msgstr ": にアドレスは不要です"
-#: sed/compile.c:153
+#: sed/compile.c:161
msgid "comments don't accept any addresses"
msgstr "コメントはアドレスを受け付けません"
-#: sed/compile.c:154
+#: sed/compile.c:162
msgid "missing command"
msgstr "コマンドが足りません"
-#: sed/compile.c:155
+#: sed/compile.c:163
msgid "command only uses one address"
msgstr "コマンドはアドレスを1つだけ使います"
-#: sed/compile.c:156
+#: sed/compile.c:164
msgid "unterminated address regex"
msgstr "アドレスregexが終了していません"
-#: sed/compile.c:157
+#: sed/compile.c:165
msgid "unterminated `s' command"
msgstr "`s' コマンドが終了していません"
-#: sed/compile.c:158
+#: sed/compile.c:166
msgid "unterminated `y' command"
msgstr "`y' コマンドが終了していません"
-#: sed/compile.c:159
+#: sed/compile.c:167
msgid "unknown option to `s'"
msgstr "`s' に対するオプションが不明です"
-#: sed/compile.c:160
+#: sed/compile.c:169
msgid "multiple `p' options to `s' command"
msgstr "`s' コマンドに対して複数の `p' オプションがあります"
-#: sed/compile.c:161
+#: sed/compile.c:171
msgid "multiple `g' options to `s' command"
msgstr "`s' コマンドに対して複数の `g' オプションがあります"
-#: sed/compile.c:162
+#: sed/compile.c:173
msgid "multiple number options to `s' command"
msgstr "`s' コマンドに対して複数の数値オプションがあります"
-#: sed/compile.c:163
+#: sed/compile.c:175
msgid "number option to `s' command may not be zero"
msgstr "`s' コマンドに対する数値オプションは 0 (ゼロ) ではいけません"
-#: sed/compile.c:164
+#: sed/compile.c:177
msgid "strings for `y' command are different lengths"
msgstr "`y' コマンドに対する文字列の長さが異なります"
-#: sed/compile.c:165
+#: sed/compile.c:179
msgid "delimiter character is not a single-byte character"
msgstr "区切り文字が単一バイト文字でありません"
-#: sed/compile.c:166
+#: sed/compile.c:181
msgid "expected newer version of sed"
msgstr "sed の新版が前提です"
-#: sed/compile.c:167
+#: sed/compile.c:183
msgid "invalid usage of line address 0"
msgstr "無効な行アドレス 0 の使用方法です"
-#: sed/compile.c:168
+#: sed/compile.c:184
#, c-format
msgid "unknown command: `%c'"
msgstr "不明なコマンド: `%c'"
-#: sed/compile.c:169
+#: sed/compile.c:186
#, fuzzy
msgid "incomplete command"
msgstr "コマンドが足りません"
-#: sed/compile.c:192
+#: sed/compile.c:188
+msgid "\":\" lacks a label"
+msgstr ""
+
+#: sed/compile.c:190
+msgid "recursive escaping after \\c not allowed"
+msgstr ""
+
+#: sed/compile.c:213
#, c-format
msgid "%s: file %s line %lu: %s\n"
msgstr "%s: ファイル %s 行 %lu: %s\n"
-#: sed/compile.c:195
+#: sed/compile.c:216
#, c-format
msgid "%s: -e expression #%lu, char %lu: %s\n"
msgstr "%s: -e expression #%lu, char %lu: %s\n"
-#: sed/compile.c:1657
+#: sed/compile.c:1639
#, c-format
msgid "can't find label for jump to `%s'"
msgstr "`%s' へジャンプするためのラベルが見つかりません"
-#: sed/execute.c:595
+#: sed/execute.c:264 sed/execute.c:281
+#, c-format
+msgid "case conversion produced an invalid character"
+msgstr ""
+
+#: sed/execute.c:575
#, c-format
msgid "%s: can't read %s: %s\n"
msgstr "%s: %s を読み込めません: %s\n"
-#: sed/execute.c:624
+#: sed/execute.c:600
#, c-format
msgid "couldn't edit %s: is a terminal"
msgstr "%s を編集できませんでした: 端末です"
-#: sed/execute.c:629
+#: sed/execute.c:605
#, c-format
msgid "couldn't edit %s: not a regular file"
msgstr "%s を編集できませんでした: 通常ファイルでありません"
-#: sed/execute.c:640
+#: sed/execute.c:616
#, c-format
msgid "%s: warning: failed to set default file creation context to %s: %s"
msgstr ""
"%s: 警告: %s にデフォルトのファイル作成コンテキストを設定できませんでした: %s"
-#: sed/execute.c:647
+#: sed/execute.c:624
#, c-format
msgid "%s: warning: failed to get security context of %s: %s"
msgstr "%s: 警告: %s のセキュリティコンテキストの取得に失敗しました: %s"
-#: sed/execute.c:664 sed/utils.c:211
+#: sed/execute.c:643 sed/utils.c:178
#, c-format
msgid "couldn't open temporary file %s: %s"
msgstr "一時ファイル %s を開くことができませんでした: %s"
-#: sed/execute.c:1193 sed/execute.c:1373
+#: sed/execute.c:1158 sed/execute.c:1368
msgid "error in subprocess"
msgstr "子プロセスのエラーです"
-#: sed/execute.c:1195
+#: sed/execute.c:1160
msgid "option `e' not supported"
msgstr "オプション `e' はサポートされていません"
-#: sed/execute.c:1375
+#: sed/execute.c:1349
msgid "`e' command not supported"
msgstr "`e' コマンドはサポートされていません"
-#: sed/execute.c:1725
+#: sed/execute.c:1675
msgid "no input files"
msgstr "入力ファイルがありません"
-#: sed/regexp.c:39
+#: sed/regexp.c:38
msgid "no previous regular expression"
msgstr "以前に正規表現がありません"
-#: sed/regexp.c:40
-msgid "cannot specify modifiers on empty regexp"
-msgstr "空の正規表現に対して修飾子を指定できません"
-
-#: sed/regexp.c:129
+#: sed/regexp.c:138
#, c-format
msgid "invalid reference \\%d on `s' command's RHS"
msgstr "`s' コマンドの右側に無効な参照 \\%d があります"
-#: sed/sed.c:32
+#: sed/sed.c:35
msgid "Jay Fenlason"
msgstr ""
-#: sed/sed.c:33
+#: sed/sed.c:36
msgid "Tom Lord"
msgstr ""
-#: sed/sed.c:34
+#: sed/sed.c:37
msgid "Ken Pizzini"
msgstr ""
-#: sed/sed.c:35
+#: sed/sed.c:38
msgid "Paolo Bonzini"
msgstr ""
-#: sed/sed.c:79
+#: sed/sed.c:113
#, c-format
msgid ""
"GNU sed home page: <http://www.gnu.org/software/sed/>.\n"
@@ -232,18 +643,12 @@ msgstr ""
"GNU ソフトウェアを使用する際の一般的なヘルプ: <http://www.gnu.org/gethelp/"
">.\n"
-#: sed/sed.c:86
+#: sed/sed.c:120
#, c-format
-msgid ""
-"E-mail bug reports to: <%s>.\n"
-"Be sure to include the word ``%s'' somewhere in the ``Subject:'' field.\n"
+msgid "E-mail bug reports to: <%s>.\n"
msgstr ""
-"電子メールによるバグ報告の宛先: <%s>\n"
-"報告の際、“Subject:” フィールドのどこかに “%s” を入れてください。\n"
-"翻訳に関するバグは<translation-team-ja@lists.sourceforge.net>に報告してくださ"
-"い。\n"
-#: sed/sed.c:99
+#: sed/sed.c:129
msgid ""
" -R, --regexp-perl\n"
" use Perl 5's regular expressions syntax in the script.\n"
@@ -251,7 +656,7 @@ msgstr ""
" -R, --regexp-perl\n"
" スクリプトで Perl 5 の正規表現構文を使用する\n"
-#: sed/sed.c:104
+#: sed/sed.c:134
#, c-format
msgid ""
"Usage: %s [OPTION]... {script-only-if-no-other-script} [input-file]...\n"
@@ -260,7 +665,7 @@ msgstr ""
"使用法: %s [OPTION]... {script-only-if-no-other-script} [input-file]...\n"
"\n"
-#: sed/sed.c:108
+#: sed/sed.c:138
#, c-format
msgid ""
" -n, --quiet, --silent\n"
@@ -269,7 +674,7 @@ msgstr ""
"-n, --quiet, --silent\n"
" パターン空間の自動出力を抑制する\n"
-#: sed/sed.c:110
+#: sed/sed.c:140
#, c-format
msgid ""
" -e script, --expression=script\n"
@@ -278,7 +683,7 @@ msgstr ""
" -e script, --expression=script\n"
" 実行するコマンドとして script を追加する\n"
-#: sed/sed.c:112
+#: sed/sed.c:142
#, c-format
msgid ""
" -f script-file, --file=script-file\n"
@@ -288,7 +693,7 @@ msgstr ""
" -f script-file, --file=script-file\n"
" 実行するコマンドとして script-file の中身を追加する\n"
-#: sed/sed.c:115
+#: sed/sed.c:146
#, c-format
msgid ""
" --follow-symlinks\n"
@@ -297,7 +702,7 @@ msgstr ""
" --follow-symlinks\n"
" 処理の際にその場でシンボリックリンクを辿る\n"
-#: sed/sed.c:118
+#: sed/sed.c:149
#, fuzzy, c-format
msgid ""
" -i[SUFFIX], --in-place[=SUFFIX]\n"
@@ -307,7 +712,7 @@ msgstr ""
" ファイルを自体をその場で編集する (SUFFIX が与えられた\n"
" 場合はバックアップを作成する)\n"
-#: sed/sed.c:121
+#: sed/sed.c:153
#, c-format
msgid ""
" -b, --binary\n"
@@ -317,7 +722,7 @@ msgstr ""
" -b, --binary\n"
" ファイルをバイナリモードで開く (CR+LFs を特別に処理しない)\n"
-#: sed/sed.c:124
+#: sed/sed.c:157
#, c-format
msgid ""
" -l N, --line-length=N\n"
@@ -326,7 +731,7 @@ msgstr ""
" -l N, --line-length=N\n"
" `l' コマンドの行折り返しの長さを指定する\n"
-#: sed/sed.c:126
+#: sed/sed.c:159
#, c-format
msgid ""
" --posix\n"
@@ -335,28 +740,35 @@ msgstr ""
" --posix\n"
" 全ての GNU 拡張を無効にする\n"
-#: sed/sed.c:128
-#, c-format
+#: sed/sed.c:161
+#, fuzzy, c-format
msgid ""
-" -r, --regexp-extended\n"
-" use extended regular expressions in the script.\n"
+" -E, -r, --regexp-extended\n"
+" use extended regular expressions in the script\n"
+" (for portability use POSIX -E).\n"
msgstr ""
" -r, --regexp-extended\n"
" スクリプトで拡張正規表現を使用する\n"
-#: sed/sed.c:133
-#, c-format
+#: sed/sed.c:167
+#, fuzzy, c-format
msgid ""
" -s, --separate\n"
-" consider files as separate rather than as a single "
-"continuous\n"
-" long stream.\n"
+" consider files as separate rather than as a single,\n"
+" continuous long stream.\n"
msgstr ""
" -s, --separate\n"
" 複数のファイルを処理する際に連続した単一の長いストリーム\n"
" としてではなく、個別に取り扱う\n"
-#: sed/sed.c:136
+#: sed/sed.c:170
+#, c-format
+msgid ""
+" --sandbox\n"
+" operate in sandbox mode.\n"
+msgstr ""
+
+#: sed/sed.c:172
#, c-format
msgid ""
" -u, --unbuffered\n"
@@ -368,24 +780,24 @@ msgstr ""
" 入力ファイルからデータをごく少量ずつ取り込み、頻繁に出力\n"
" バッファに出力 (flush) する\n"
-#: sed/sed.c:139
+#: sed/sed.c:175
#, c-format
msgid ""
" -z, --null-data\n"
" separate lines by NUL characters\n"
msgstr ""
-#: sed/sed.c:141
+#: sed/sed.c:177
#, c-format
msgid " --help display this help and exit\n"
msgstr " --help このヘルプを表示して終了する\n"
-#: sed/sed.c:142
+#: sed/sed.c:178
#, c-format
msgid " --version output version information and exit\n"
msgstr " --version バージョン情報を表示して終了する\n"
-#: sed/sed.c:143
+#: sed/sed.c:179
#, c-format
msgid ""
"\n"
@@ -402,118 +814,58 @@ msgstr ""
"れていない場合は、標準入力から読み込みます。\n"
"\n"
-#: sed/utils.c:74 sed/utils.c:432
+#: sed/utils.c:73 sed/utils.c:384
#, c-format
msgid "cannot remove %s: %s"
msgstr "%s を削除できません: %s"
-#: sed/utils.c:144
+#: sed/utils.c:136
#, c-format
msgid "couldn't open file %s: %s"
msgstr "ファイル %s を開けませんでした: %s"
-#: sed/utils.c:167
+#: sed/utils.c:155
#, c-format
msgid "couldn't attach to %s: %s"
msgstr "%s に接続 (attach) できませんでした: %s"
-#: sed/utils.c:229
-#, c-format
-msgid "couldn't write %d item to %s: %s"
-msgid_plural "couldn't write %d items to %s: %s"
+#: sed/utils.c:192
+#, fuzzy, c-format
+msgid "couldn't write %llu item to %s: %s"
+msgid_plural "couldn't write %llu items to %s: %s"
msgstr[0] "%d 個の項目を %s に書き込めませんでした: %s"
-#: sed/utils.c:244 sed/utils.c:267
+#: sed/utils.c:204 sed/utils.c:223
#, c-format
msgid "read error on %s: %s"
msgstr "%s の読み込みエラーです: %s"
-#: sed/utils.c:372
+#: sed/utils.c:325
#, c-format
msgid "couldn't follow symlink %s: %s"
msgstr "シンボリックリンク %s を辿れませんでした: %s"
-#: sed/utils.c:406
+#: sed/utils.c:359
#, c-format
msgid "cannot stat %s: %s"
msgstr "%s の状態取得 (stat) ができません: %s"
-#: sed/utils.c:437
+#: sed/utils.c:389
#, c-format
msgid "cannot rename %s: %s"
msgstr "%s の名前を変更できません: %s"
-#: lib/regcomp.c:132
-msgid "Success"
-msgstr "成功です"
-
-#: lib/regcomp.c:135
-msgid "No match"
-msgstr "一致しません"
-
-#: lib/regcomp.c:138
-msgid "Invalid regular expression"
-msgstr "無効な正規表現です"
-
-#: lib/regcomp.c:141
-msgid "Invalid collation character"
-msgstr "無効な照合文字です"
-
-#: lib/regcomp.c:144
-msgid "Invalid character class name"
-msgstr "無効な文字クラス名です"
-
-#: lib/regcomp.c:147
-msgid "Trailing backslash"
-msgstr "終端のバックスラッシュ"
-
-#: lib/regcomp.c:150
-msgid "Invalid back reference"
-msgstr "無効な前方参照です"
-
-#: lib/regcomp.c:153
-msgid "Unmatched [ or [^"
-msgstr "[ または [^ が不一致です"
-
-#: lib/regcomp.c:156
-msgid "Unmatched ( or \\("
-msgstr "( または \\( が不一致です"
-
-#: lib/regcomp.c:159
-msgid "Unmatched \\{"
-msgstr "\\{ が不一致です"
-
-#: lib/regcomp.c:162
-msgid "Invalid content of \\{\\}"
-msgstr "\\{\\} の中身が無効です"
-
-#: lib/regcomp.c:165
-msgid "Invalid range end"
-msgstr "無効な範囲終了です"
-
-#: lib/regcomp.c:168
-msgid "Memory exhausted"
-msgstr "メモリを使い果たしました"
-
-#: lib/regcomp.c:171
-msgid "Invalid preceding regular expression"
-msgstr "無効な前方正規表現です"
-
-#: lib/regcomp.c:174
-msgid "Premature end of regular expression"
-msgstr "正規表現が途中で終了しました"
-
-#: lib/regcomp.c:177
-msgid "Regular expression too big"
-msgstr "正規表現が大きすぎます"
-
-#: lib/regcomp.c:180
-msgid "Unmatched ) or \\)"
-msgstr ") または \\) が不一致です"
+#~ msgid "cannot specify modifiers on empty regexp"
+#~ msgstr "空の正規表現に対して修飾子を指定できません"
-#: lib/regcomp.c:705
-msgid "No previous regular expression"
-msgstr "以前に正規表現がありません"
+#~ msgid ""
+#~ "E-mail bug reports to: <%s>.\n"
+#~ "Be sure to include the word ``%s'' somewhere in the ``Subject:'' field.\n"
+#~ msgstr ""
+#~ "電子メールによるバグ報告の宛先: <%s>\n"
+#~ "報告の際、“Subject:” フィールドのどこかに “%s” を入れてください。\n"
+#~ "翻訳に関するバグは<translation-team-ja@lists.sourceforge.net>に報告してく"
+#~ "ださい。\n"
#~ msgid "super-sed version %s\n"
#~ msgstr "super-sed バージョン %s\n"
@@ -593,9 +945,6 @@ msgstr "以前に正規表現がありません"
#~ msgid "Report bugs to %s.\n"
#~ msgstr "バグを発見したら %s 宛に報告して下さい。\n"
-#~ msgid "Unknown system error"
-#~ msgstr "不明なシステムエラー"
-
#~ msgid "give this help list"
#~ msgstr "このヘルプを表示する"
@@ -647,12 +996,6 @@ msgstr "以前に正規表現がありません"
#~ msgid "error closing file"
#~ msgstr "ファイルクローズエラー"
-#~ msgid "write error"
-#~ msgstr "書き込みエラー"
-
-#~ msgid "preserving permissions for %s"
-#~ msgstr "%s のパーミッションを保存しています"
-
#~ msgid "error while opening \"%s\" for reading"
#~ msgstr "\"%s\"を読込むため開いている際にエラーが発生しました"
@@ -776,36 +1119,6 @@ msgstr "以前に正規表現がありません"
#~ msgid "Unknown error"
#~ msgstr "不明なエラー"
-#~ msgid "%s: option '%s' is ambiguous\n"
-#~ msgstr "%s: オプション '%s' は曖昧です\n"
-
-#~ msgid "%s: option '--%s' doesn't allow an argument\n"
-#~ msgstr "%s: オプション '--%s' は引数を取ることができません\n"
-
-#~ msgid "%s: option '%c%s' doesn't allow an argument\n"
-#~ msgstr "%s: オプション '%c%s' は引数を取ることができません\n"
-
-#~ msgid "%s: option '%s' requires an argument\n"
-#~ msgstr "%s: オプション '--%s' は引数が必要です\n"
-
-#~ msgid "%s: unrecognized option '--%s'\n"
-#~ msgstr "%s: オプション '--%s' を認識できません\n"
-
-#~ msgid "%s: unrecognized option '%c%s'\n"
-#~ msgstr "%s: オプション '%c%s' を認識できません\n"
-
-#~ msgid "%s: invalid option -- '%c'\n"
-#~ msgstr "%s: 無効なオプション -- '%c'\n"
-
-#~ msgid "%s: option requires an argument -- '%c'\n"
-#~ msgstr "%s: オプションには引数が必要です -- '%c'\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 "invalid source_version argument to compile_java_class"
#~ msgstr "compile_java_class への source_version 引数が無効です"
@@ -837,9 +1150,6 @@ msgstr "以前に正規表現がありません"
#~ msgid "cannot create directory %s"
#~ msgstr "ディレクトリ %s を作成できません"
-#~ msgid "memory exhausted"
-#~ msgstr "メモリを使い果たしました"
-
#~ msgid "unable to record current working directory"
#~ msgstr "現在の作業ディレクトリを記録することができません"
@@ -876,21 +1186,12 @@ msgstr "以前に正規表現がありません"
#~ msgid "cannot create pipe"
#~ msgstr "パイプを作成できません"
-#~ msgid "`"
-#~ msgstr "`"
-
-#~ msgid "'"
-#~ msgstr "'"
-
#~ msgid "^[yY]"
#~ msgstr "^[yY]"
#~ msgid "^[nN]"
#~ msgstr "^[nN]"
-#~ msgid "setting permissions for %s"
-#~ msgstr "%s のパーミッションを設定します"
-
#~ msgid "Hangup"
#~ msgstr "Hangup"
@@ -1029,117 +1330,6 @@ msgstr "以前に正規表現がありません"
#~ msgid "unable to display error message"
#~ msgstr "エラーメッセージを表示できません"
-#~ msgid "Packaged by %s (%s)\n"
-#~ msgstr "パッケージ作成者: %s (%s)\n"
-
-#~ msgid "Packaged by %s\n"
-#~ msgstr "パッケージ作成者: %s\n"
-
-#~ msgid "(C)"
-#~ msgstr "(C)"
-
-#~ msgid ""
-#~ "\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"
-#~ msgstr ""
-#~ "\n"
-#~ "ライセンス 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"
-
-#~ msgid "Written by %s.\n"
-#~ msgstr "作者 %s。\n"
-
-#~ msgid "Written by %s and %s.\n"
-#~ msgstr "作者 %s および %s。\n"
-
-#~ msgid "Written by %s, %s, and %s.\n"
-#~ msgstr "作者 %s、 %s、および %s。\n"
-
-#~ msgid ""
-#~ "Written by %s, %s, %s,\n"
-#~ "and %s.\n"
-#~ msgstr ""
-#~ "作者 %s、 %s、 %s、\n"
-#~ "および %s。\n"
-
-#~ msgid ""
-#~ "Written by %s, %s, %s,\n"
-#~ "%s, and %s.\n"
-#~ msgstr ""
-#~ "作者 %s、 %s、 %s、\n"
-#~ "%s、および %s。\n"
-
-#~ msgid ""
-#~ "Written by %s, %s, %s,\n"
-#~ "%s, %s, and %s.\n"
-#~ msgstr ""
-#~ "作者 %s、 %s、 %s、\n"
-#~ "%s、 %s、および %s。\n"
-
-#~ msgid ""
-#~ "Written by %s, %s, %s,\n"
-#~ "%s, %s, %s, and %s.\n"
-#~ msgstr ""
-#~ "作者 %s、 %s、 %s、\n"
-#~ "%s、 %s、 %s、および %s。\n"
-
-#~ msgid ""
-#~ "Written by %s, %s, %s,\n"
-#~ "%s, %s, %s, %s,\n"
-#~ "and %s.\n"
-#~ msgstr ""
-#~ "作者 %s、 %s、 %s、\n"
-#~ "%s、 %s、 %s、 %s、\n"
-#~ "および %s。\n"
-
-#~ msgid ""
-#~ "Written by %s, %s, %s,\n"
-#~ "%s, %s, %s, %s,\n"
-#~ "%s, and %s.\n"
-#~ msgstr ""
-#~ "作者 %s、 %s、 %s、\n"
-#~ "%s、 %s、 %s、 %s、\n"
-#~ "%s、および %s。\n"
-
-#~ msgid ""
-#~ "Written by %s, %s, %s,\n"
-#~ "%s, %s, %s, %s,\n"
-#~ "%s, %s, and others.\n"
-#~ msgstr ""
-#~ "作者 %s、 %s、 %s、\n"
-#~ "%s、 %s、 %s、 %s、\n"
-#~ "%s、 %s、 および他の方々。\n"
-
-#~ msgid ""
-#~ "\n"
-#~ "Report bugs to: %s\n"
-#~ msgstr ""
-#~ "\n"
-#~ "バグを発見したら <%s> に報告して下さい。\n"
-#~ "翻訳に関するバグは<translation-team-ja@lists.sourceforge.net>に報告してく"
-#~ "ださい。\n"
-
-#~ msgid "Report %s bugs to: %s\n"
-#~ msgstr "%s のバグは <%s> に報告してください。\n"
-
-#~ msgid "%s home page: <%s>\n"
-#~ msgstr "%s のホームページ: <%s>\n"
-
-#~ msgid "%s home page: <http://www.gnu.org/software/%s/>\n"
-#~ msgstr "%s のホームページ: <http://www.gnu.org/software/%s/>\n"
-
-#~ msgid "General help using GNU software: <http://www.gnu.org/gethelp/>\n"
-#~ msgstr ""
-#~ "GNU ソフトウェアを使用する際の一般的なヘルプ: <http://www.gnu.org/gethelp/"
-#~ ">\n"
-
#~ msgid "_open_osfhandle failed"
#~ msgstr "_open_osfhandle に失敗しました"
diff --git a/po/ko.gmo b/po/ko.gmo
index 221dc31..9f6b524 100644
--- a/po/ko.gmo
+++ b/po/ko.gmo
Binary files differ
diff --git a/po/ko.po b/po/ko.po
index 54ff27d..98b4a4c 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: 2012-12-22 14:36+0100\n"
+"POT-Creation-Date: 2016-12-30 00:59-0800\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"
@@ -14,262 +14,640 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=EUC-KR\n"
"Content-Transfer-Encoding: 8bit\n"
+"X-Bugs: Report translation errors to the Language-Team address.\n"
-#: sed/compile.c:144
+#: lib/closeout.c:112
+msgid "write error"
+msgstr ""
+
+#: lib/copy-acl.c:54
+#, c-format
+msgid "preserving permissions for %s"
+msgstr ""
+
+#: lib/dfa.c:1025 lib/dfa.c:1028 lib/dfa.c:1047 lib/dfa.c:1057 lib/dfa.c:1070
+#: lib/dfa.c:1098 lib/dfa.c:1107 lib/dfa.c:1110 lib/dfa.c:1115 lib/dfa.c:1137
+#: lib/dfa.c:1140
+msgid "unbalanced ["
+msgstr ""
+
+#: lib/dfa.c:1083
+msgid "invalid character class"
+msgstr ""
+
+#: lib/dfa.c:1206
+msgid "character class syntax is [[:space:]], not [:space:]"
+msgstr ""
+
+#: lib/dfa.c:1275
+msgid "unfinished \\ escape"
+msgstr ""
+
+#: lib/dfa.c:1436
+msgid "invalid content of \\{\\}"
+msgstr ""
+
+#: lib/dfa.c:1439
+msgid "regular expression too big"
+msgstr ""
+
+#: lib/dfa.c:1853
+msgid "unbalanced ("
+msgstr ""
+
+#: lib/dfa.c:1980
+msgid "no syntax specified"
+msgstr ""
+
+#: lib/dfa.c:1988
+msgid "unbalanced )"
+msgstr ""
+
+#: lib/error.c:191
+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 ""
+
+#: lib/getopt.c:654 lib/getopt.c:658
+#, c-format
+msgid "%s: option '--%s' doesn't allow an argument\n"
+msgstr ""
+
+#: 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:715 lib/getopt.c:734
+#, c-format
+msgid "%s: option '--%s' requires an argument\n"
+msgstr ""
+
+#: 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
+#, 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
+#, 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 ""
+
+#. TRANSLATORS:
+#. Get translations for open and closing quotation marks.
+#. The message catalog should translate "`" to a left
+#. quotation mark suitable for the locale, and similarly for
+#. "'". For example, a French Unicode local should translate
+#. these to U+00AB (LEFT-POINTING DOUBLE ANGLE
+#. QUOTATION MARK), and U+00BB (RIGHT-POINTING DOUBLE ANGLE
+#. QUOTATION MARK), respectively.
+#.
+#. If the catalog has no translation, we will try to
+#. use Unicode U+2018 (LEFT SINGLE QUOTATION MARK) and
+#. Unicode U+2019 (RIGHT SINGLE QUOTATION MARK). If the
+#. current locale is not Unicode, locale_quoting_style
+#. will quote 'like this', and clocale_quoting_style will
+#. quote "like this". You should always include translations
+#. for "`" and "'" even if U+2018 and U+2019 are appropriate
+#. for your locale.
+#.
+#. If you don't know what to put here, please see
+#. <http://en.wikipedia.org/wiki/Quotation_marks_in_other_languages>
+#. and use glyphs suitable for your language.
+#: lib/quotearg.c:354
+msgid "`"
+msgstr ""
+
+#: lib/quotearg.c:355
+msgid "'"
+msgstr ""
+
+#: lib/regcomp.c:135
+msgid "Success"
+msgstr ""
+
+#: lib/regcomp.c:138
+msgid "No match"
+msgstr ""
+
+#: lib/regcomp.c:141
+msgid "Invalid regular expression"
+msgstr ""
+
+#: lib/regcomp.c:144
+msgid "Invalid collation character"
+msgstr ""
+
+#: lib/regcomp.c:147
+msgid "Invalid character class name"
+msgstr ""
+
+#: lib/regcomp.c:150
+msgid "Trailing backslash"
+msgstr ""
+
+#: lib/regcomp.c:153
+msgid "Invalid back reference"
+msgstr ""
+
+#: lib/regcomp.c:156
+msgid "Unmatched [, [^, [:, [., or [="
+msgstr ""
+
+#: lib/regcomp.c:159
+#, fuzzy
+msgid "Unmatched ( or \\("
+msgstr "`{' ġ ʽϴ"
+
+#: lib/regcomp.c:162
+#, fuzzy
+msgid "Unmatched \\{"
+msgstr "`{' ġ ʽϴ"
+
+#: lib/regcomp.c:165
+msgid "Invalid content of \\{\\}"
+msgstr ""
+
+#: lib/regcomp.c:168
+msgid "Invalid range end"
+msgstr ""
+
+#: lib/regcomp.c:171
+msgid "Memory exhausted"
+msgstr ""
+
+#: lib/regcomp.c:174
+msgid "Invalid preceding regular expression"
+msgstr ""
+
+#: lib/regcomp.c:177
+msgid "Premature end of regular expression"
+msgstr ""
+
+#: lib/regcomp.c:180
+msgid "Regular expression too big"
+msgstr ""
+
+#: lib/regcomp.c:183
+#, fuzzy
+msgid "Unmatched ) or \\)"
+msgstr "`{' ġ ʽϴ"
+
+#: lib/regcomp.c:687
+msgid "No previous regular expression"
+msgstr ""
+
+#: lib/set-acl.c:46
+#, c-format
+msgid "setting permissions for %s"
+msgstr ""
+
+#: lib/version-etc.c:74
+#, c-format
+msgid "Packaged by %s (%s)\n"
+msgstr ""
+
+#: lib/version-etc.c:77
+#, c-format
+msgid "Packaged by %s\n"
+msgstr ""
+
+#. 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 ""
+
+#: lib/version-etc.c:86
+msgid ""
+"\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"
+msgstr ""
+
+#. TRANSLATORS: %s denotes an author name.
+#: lib/version-etc.c:102
+#, c-format
+msgid "Written by %s.\n"
+msgstr ""
+
+#. TRANSLATORS: Each %s denotes an author name.
+#: lib/version-etc.c:106
+#, c-format
+msgid "Written by %s and %s.\n"
+msgstr ""
+
+#. TRANSLATORS: Each %s denotes an author name.
+#: lib/version-etc.c:110
+#, c-format
+msgid "Written by %s, %s, and %s.\n"
+msgstr ""
+
+#. TRANSLATORS: Each %s denotes an author name.
+#. You can use line breaks, estimating that each author name occupies
+#. ca. 16 screen columns and that a screen line has ca. 80 columns.
+#: lib/version-etc.c:117
+#, c-format
+msgid ""
+"Written by %s, %s, %s,\n"
+"and %s.\n"
+msgstr ""
+
+#. TRANSLATORS: Each %s denotes an author name.
+#. You can use line breaks, estimating that each author name occupies
+#. ca. 16 screen columns and that a screen line has ca. 80 columns.
+#: lib/version-etc.c:124
+#, c-format
+msgid ""
+"Written by %s, %s, %s,\n"
+"%s, and %s.\n"
+msgstr ""
+
+#. TRANSLATORS: Each %s denotes an author name.
+#. You can use line breaks, estimating that each author name occupies
+#. ca. 16 screen columns and that a screen line has ca. 80 columns.
+#: lib/version-etc.c:131
+#, c-format
+msgid ""
+"Written by %s, %s, %s,\n"
+"%s, %s, and %s.\n"
+msgstr ""
+
+#. TRANSLATORS: Each %s denotes an author name.
+#. You can use line breaks, estimating that each author name occupies
+#. ca. 16 screen columns and that a screen line has ca. 80 columns.
+#: lib/version-etc.c:139
+#, c-format
+msgid ""
+"Written by %s, %s, %s,\n"
+"%s, %s, %s, and %s.\n"
+msgstr ""
+
+#. TRANSLATORS: Each %s denotes an author name.
+#. You can use line breaks, estimating that each author name occupies
+#. ca. 16 screen columns and that a screen line has ca. 80 columns.
+#: lib/version-etc.c:147
+#, c-format
+msgid ""
+"Written by %s, %s, %s,\n"
+"%s, %s, %s, %s,\n"
+"and %s.\n"
+msgstr ""
+
+#. TRANSLATORS: Each %s denotes an author name.
+#. You can use line breaks, estimating that each author name occupies
+#. ca. 16 screen columns and that a screen line has ca. 80 columns.
+#: lib/version-etc.c:156
+#, c-format
+msgid ""
+"Written by %s, %s, %s,\n"
+"%s, %s, %s, %s,\n"
+"%s, and %s.\n"
+msgstr ""
+
+#. TRANSLATORS: Each %s denotes an author name.
+#. You can use line breaks, estimating that each author name occupies
+#. ca. 16 screen columns and that a screen line has ca. 80 columns.
+#: lib/version-etc.c:167
+#, c-format
+msgid ""
+"Written by %s, %s, %s,\n"
+"%s, %s, %s, %s,\n"
+"%s, %s, and others.\n"
+msgstr ""
+
+#. TRANSLATORS: The placeholder indicates the bug-reporting address
+#. for this package. Please add _another line_ saying
+#. "Report translation bugs to <...>\n" with the address for translation
+#. bugs (typically your translation team's web or email address).
+#: lib/version-etc.c:245
+#, c-format
+msgid ""
+"\n"
+"Report bugs to: %s\n"
+msgstr ""
+
+#: lib/version-etc.c:247
+#, c-format
+msgid "Report %s bugs to: %s\n"
+msgstr ""
+
+#: lib/version-etc.c:251
+#, c-format
+msgid "%s home page: <%s>\n"
+msgstr ""
+
+#: lib/version-etc.c:253
+#, c-format
+msgid "%s home page: <http://www.gnu.org/software/%s/>\n"
+msgstr ""
+
+#: lib/version-etc.c:256
+msgid "General help using GNU software: <http://www.gnu.org/gethelp/>\n"
+msgstr ""
+
+#: sed/compile.c:146
#, fuzzy
msgid "multiple `!'s"
msgstr "`!' ߺǾϴ"
-#: sed/compile.c:145
+#: sed/compile.c:147
#, fuzzy
msgid "unexpected `,'"
msgstr "ʿ `,' ǰ ֽϴ"
-#: sed/compile.c:146
+#: sed/compile.c:149
#, fuzzy
msgid "invalid usage of +N or ~N as first address"
msgstr "ù° ּҷ '+N' Ǵ '~N' ϴ"
-#: sed/compile.c:147
+#: sed/compile.c:150
#, fuzzy
msgid "unmatched `{'"
msgstr "`{' ġ ʽϴ"
-#: sed/compile.c:148
+#: sed/compile.c:151
#, fuzzy
msgid "unexpected `}'"
msgstr "ʿ `}' ǰ ֽϴ"
-#: sed/compile.c:149
+#: sed/compile.c:153
#, fuzzy
msgid "extra characters after command"
msgstr "ɵڿ ʿ ڵ ֽϴ"
-#: sed/compile.c:150
+#: sed/compile.c:155
msgid "expected \\ after `a', `c' or `i'"
msgstr ""
-#: sed/compile.c:151
+#: sed/compile.c:157
msgid "`}' doesn't want any addresses"
msgstr "`}'  ּҵ ʿġ ʽϴ"
-#: sed/compile.c:152
+#: sed/compile.c:159
msgid ": doesn't want any addresses"
msgstr ":  ּҵ ʿġ ʽϴ"
-#: sed/compile.c:153
+#: sed/compile.c:161
#, fuzzy
msgid "comments don't accept any addresses"
msgstr "ڸƮ  ּҵ ϴ"
-#: sed/compile.c:154
+#: sed/compile.c:162
#, fuzzy
msgid "missing command"
msgstr " ʾҽϴ"
-#: sed/compile.c:155
+#: sed/compile.c:163
#, fuzzy
msgid "command only uses one address"
msgstr "ɿ ϳ ּҸ ֽϴ"
-#: sed/compile.c:156
+#: sed/compile.c:164
#, fuzzy
msgid "unterminated address regex"
msgstr "ּ ǥ ʾҽϴ"
-#: sed/compile.c:157
+#: sed/compile.c:165
#, fuzzy
msgid "unterminated `s' command"
msgstr "`s' ʾҽϴ"
-#: sed/compile.c:158
+#: sed/compile.c:166
#, fuzzy
msgid "unterminated `y' command"
msgstr "`y' ʾҽϴ"
-#: sed/compile.c:159
+#: sed/compile.c:167
#, fuzzy
msgid "unknown option to `s'"
msgstr "`s' ɼ ֽϴ"
-#: sed/compile.c:160
+#: sed/compile.c:169
msgid "multiple `p' options to `s' command"
msgstr "`s' ɿ `p' ɼ ߺǾ ֽϴ"
-#: sed/compile.c:161
+#: sed/compile.c:171
msgid "multiple `g' options to `s' command"
msgstr "`s' ɿ `g' ɼ ߺǾ ֽϴ"
-#: sed/compile.c:162
+#: sed/compile.c:173
msgid "multiple number options to `s' command"
msgstr "`s' ɿ ɼ ߺǾ ֽϴ"
-#: sed/compile.c:163
+#: sed/compile.c:175
msgid "number option to `s' command may not be zero"
msgstr "`s' ɼǿ '0' ϴ"
-#: sed/compile.c:164
+#: sed/compile.c:177
#, fuzzy
msgid "strings for `y' command are different lengths"
msgstr "`y' ڿ ̰ ٸϴ"
-#: sed/compile.c:165
+#: sed/compile.c:179
msgid "delimiter character is not a single-byte character"
msgstr ""
-#: sed/compile.c:166
+#: sed/compile.c:181
msgid "expected newer version of sed"
msgstr ""
-#: sed/compile.c:167
+#: sed/compile.c:183
#, fuzzy
msgid "invalid usage of line address 0"
msgstr "ּ (modifier) ùٸ ʽϴ"
-#: sed/compile.c:168
+#: sed/compile.c:184
#, fuzzy, c-format
msgid "unknown command: `%c'"
msgstr " :"
-#: sed/compile.c:169
+#: sed/compile.c:186
#, fuzzy
msgid "incomplete command"
msgstr " ʾҽϴ"
-#: sed/compile.c:192
+#: sed/compile.c:188
+msgid "\":\" lacks a label"
+msgstr ""
+
+#: sed/compile.c:190
+msgid "recursive escaping after \\c not allowed"
+msgstr ""
+
+#: sed/compile.c:213
#, c-format
msgid "%s: file %s line %lu: %s\n"
msgstr "%s: %s %lu ° : %s\n"
-#: sed/compile.c:195
+#: sed/compile.c:216
#, c-format
msgid "%s: -e expression #%lu, char %lu: %s\n"
msgstr "%s: -e expression #%lu, char %lu: %s\n"
-#: sed/compile.c:1657
+#: sed/compile.c:1639
#, fuzzy, c-format
msgid "can't find label for jump to `%s'"
msgstr "`%s' () ̺ ã ϴ"
-#: sed/execute.c:595
+#: sed/execute.c:264 sed/execute.c:281
+#, c-format
+msgid "case conversion produced an invalid character"
+msgstr ""
+
+#: sed/execute.c:575
#, c-format
msgid "%s: can't read %s: %s\n"
msgstr "%s: %s () : %s\n"
-#: sed/execute.c:624
+#: sed/execute.c:600
#, c-format
msgid "couldn't edit %s: is a terminal"
msgstr ""
-#: sed/execute.c:629
+#: sed/execute.c:605
#, c-format
msgid "couldn't edit %s: not a regular file"
msgstr ""
-#: sed/execute.c:640
+#: sed/execute.c:616
#, c-format
msgid "%s: warning: failed to set default file creation context to %s: %s"
msgstr ""
-#: sed/execute.c:647
+#: sed/execute.c:624
#, c-format
msgid "%s: warning: failed to get security context of %s: %s"
msgstr ""
-#: sed/execute.c:664 sed/utils.c:211
+#: sed/execute.c:643 sed/utils.c:178
#, fuzzy, c-format
msgid "couldn't open temporary file %s: %s"
msgstr "%s ϴ"
-#: sed/execute.c:1193 sed/execute.c:1373
+#: sed/execute.c:1158 sed/execute.c:1368
msgid "error in subprocess"
msgstr ""
-#: sed/execute.c:1195
+#: sed/execute.c:1160
msgid "option `e' not supported"
msgstr ""
-#: sed/execute.c:1375
+#: sed/execute.c:1349
msgid "`e' command not supported"
msgstr ""
-#: sed/execute.c:1725
+#: sed/execute.c:1675
msgid "no input files"
msgstr ""
-#: sed/regexp.c:39
+#: sed/regexp.c:38
msgid "no previous regular expression"
msgstr ""
-#: sed/regexp.c:40
-msgid "cannot specify modifiers on empty regexp"
-msgstr ""
-
-#: sed/regexp.c:129
+#: sed/regexp.c:138
#, c-format
msgid "invalid reference \\%d on `s' command's RHS"
msgstr ""
-#: sed/sed.c:32
+#: sed/sed.c:35
msgid "Jay Fenlason"
msgstr ""
-#: sed/sed.c:33
+#: sed/sed.c:36
msgid "Tom Lord"
msgstr ""
-#: sed/sed.c:34
+#: sed/sed.c:37
msgid "Ken Pizzini"
msgstr ""
-#: sed/sed.c:35
+#: sed/sed.c:38
msgid "Paolo Bonzini"
msgstr ""
-#: sed/sed.c:79
+#: 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"
msgstr ""
-#: sed/sed.c:86
-#, fuzzy, c-format
-msgid ""
-"E-mail bug reports to: <%s>.\n"
-"Be sure to include the word ``%s'' somewhere in the ``Subject:'' field.\n"
+#: sed/sed.c:120
+#, c-format
+msgid "E-mail bug reports to: <%s>.\n"
msgstr ""
-"׸ E-mail ּ: %s .\n"
-"``Subject:'' ׸ ݵ ``%s'' ܾ ֽñ ٶϴ.\n"
-#: sed/sed.c:99
+#: sed/sed.c:129
msgid ""
" -R, --regexp-perl\n"
" use Perl 5's regular expressions syntax in the script.\n"
msgstr ""
-#: sed/sed.c:104
+#: sed/sed.c:134
#, c-format
msgid ""
"Usage: %s [OPTION]... {script-only-if-no-other-script} [input-file]...\n"
"\n"
msgstr ""
-#: sed/sed.c:108
+#: sed/sed.c:138
#, c-format
msgid ""
" -n, --quiet, --silent\n"
" suppress automatic printing of pattern space\n"
msgstr ""
-#: sed/sed.c:110
+#: sed/sed.c:140
#, c-format
msgid ""
" -e script, --expression=script\n"
" add the script to the commands to be executed\n"
msgstr ""
-#: sed/sed.c:112
+#: sed/sed.c:142
#, c-format
msgid ""
" -f script-file, --file=script-file\n"
@@ -277,21 +655,21 @@ msgid ""
"executed\n"
msgstr ""
-#: sed/sed.c:115
+#: sed/sed.c:146
#, c-format
msgid ""
" --follow-symlinks\n"
" follow symlinks when processing in place\n"
msgstr ""
-#: sed/sed.c:118
+#: sed/sed.c:149
#, c-format
msgid ""
" -i[SUFFIX], --in-place[=SUFFIX]\n"
" edit files in place (makes backup if SUFFIX supplied)\n"
msgstr ""
-#: sed/sed.c:121
+#: sed/sed.c:153
#, c-format
msgid ""
" -b, --binary\n"
@@ -299,37 +677,44 @@ msgid ""
"specially)\n"
msgstr ""
-#: sed/sed.c:124
+#: sed/sed.c:157
#, c-format
msgid ""
" -l N, --line-length=N\n"
" specify the desired line-wrap length for the `l' command\n"
msgstr ""
-#: sed/sed.c:126
+#: sed/sed.c:159
#, c-format
msgid ""
" --posix\n"
" disable all GNU extensions.\n"
msgstr ""
-#: sed/sed.c:128
+#: sed/sed.c:161
#, c-format
msgid ""
-" -r, --regexp-extended\n"
-" use extended regular expressions in the script.\n"
+" -E, -r, --regexp-extended\n"
+" use extended regular expressions in the script\n"
+" (for portability use POSIX -E).\n"
msgstr ""
-#: sed/sed.c:133
+#: sed/sed.c:167
#, c-format
msgid ""
" -s, --separate\n"
-" consider files as separate rather than as a single "
-"continuous\n"
-" long stream.\n"
+" consider files as separate rather than as a single,\n"
+" continuous long stream.\n"
+msgstr ""
+
+#: sed/sed.c:170
+#, c-format
+msgid ""
+" --sandbox\n"
+" operate in sandbox mode.\n"
msgstr ""
-#: sed/sed.c:136
+#: sed/sed.c:172
#, c-format
msgid ""
" -u, --unbuffered\n"
@@ -338,24 +723,24 @@ msgid ""
" the output buffers more often\n"
msgstr ""
-#: sed/sed.c:139
+#: sed/sed.c:175
#, c-format
msgid ""
" -z, --null-data\n"
" separate lines by NUL characters\n"
msgstr ""
-#: sed/sed.c:141
+#: sed/sed.c:177
#, c-format
msgid " --help display this help and exit\n"
msgstr ""
-#: sed/sed.c:142
+#: sed/sed.c:178
#, c-format
msgid " --version output version information and exit\n"
msgstr ""
-#: sed/sed.c:143
+#: sed/sed.c:179
#, c-format
msgid ""
"\n"
@@ -366,124 +751,48 @@ msgid ""
"\n"
msgstr ""
-#: sed/utils.c:74 sed/utils.c:432
+#: sed/utils.c:73 sed/utils.c:384
#, fuzzy, c-format
msgid "cannot remove %s: %s"
msgstr "%s: %s () : %s\n"
-#: sed/utils.c:144
+#: sed/utils.c:136
#, fuzzy, c-format
msgid "couldn't open file %s: %s"
msgstr "%s ϴ"
-#: sed/utils.c:167
+#: sed/utils.c:155
#, fuzzy, c-format
msgid "couldn't attach to %s: %s"
msgstr "%s ׸(item) ϴ: %s"
-#: sed/utils.c:229
+#: sed/utils.c:192
#, fuzzy, c-format
-msgid "couldn't write %d item to %s: %s"
-msgid_plural "couldn't write %d items to %s: %s"
+msgid "couldn't write %llu item to %s: %s"
+msgid_plural "couldn't write %llu items to %s: %s"
msgstr[0] "%2$s %1$d ׸(item) ϴ: %3$s"
msgstr[1] "%2$s %1$d ׸(item) ϴ: %3$s"
-#: sed/utils.c:244 sed/utils.c:267
+#: sed/utils.c:204 sed/utils.c:223
#, c-format
msgid "read error on %s: %s"
msgstr "%s б : %s"
-#: sed/utils.c:372
+#: sed/utils.c:325
#, fuzzy, c-format
msgid "couldn't follow symlink %s: %s"
msgstr "%s ׸(item) ϴ: %s"
-#: sed/utils.c:406
+#: sed/utils.c:359
#, fuzzy, c-format
msgid "cannot stat %s: %s"
msgstr "%s: %s () : %s\n"
-#: sed/utils.c:437
+#: sed/utils.c:389
#, fuzzy, c-format
msgid "cannot rename %s: %s"
msgstr "%s: %s () : %s\n"
-#: lib/regcomp.c:132
-msgid "Success"
-msgstr ""
-
-#: lib/regcomp.c:135
-msgid "No match"
-msgstr ""
-
-#: lib/regcomp.c:138
-msgid "Invalid regular expression"
-msgstr ""
-
-#: lib/regcomp.c:141
-msgid "Invalid collation character"
-msgstr ""
-
-#: lib/regcomp.c:144
-msgid "Invalid character class name"
-msgstr ""
-
-#: lib/regcomp.c:147
-msgid "Trailing backslash"
-msgstr ""
-
-#: lib/regcomp.c:150
-msgid "Invalid back reference"
-msgstr ""
-
-#: lib/regcomp.c:153
-#, fuzzy
-msgid "Unmatched [ or [^"
-msgstr "`{' ġ ʽϴ"
-
-#: lib/regcomp.c:156
-#, fuzzy
-msgid "Unmatched ( or \\("
-msgstr "`{' ġ ʽϴ"
-
-#: lib/regcomp.c:159
-#, fuzzy
-msgid "Unmatched \\{"
-msgstr "`{' ġ ʽϴ"
-
-#: lib/regcomp.c:162
-msgid "Invalid content of \\{\\}"
-msgstr ""
-
-#: lib/regcomp.c:165
-msgid "Invalid range end"
-msgstr ""
-
-#: lib/regcomp.c:168
-msgid "Memory exhausted"
-msgstr ""
-
-#: lib/regcomp.c:171
-msgid "Invalid preceding regular expression"
-msgstr ""
-
-#: lib/regcomp.c:174
-msgid "Premature end of regular expression"
-msgstr ""
-
-#: lib/regcomp.c:177
-msgid "Regular expression too big"
-msgstr ""
-
-#: lib/regcomp.c:180
-#, fuzzy
-msgid "Unmatched ) or \\)"
-msgstr "`{' ġ ʽϴ"
-
-#: lib/regcomp.c:705
-msgid "No previous regular expression"
-msgstr ""
-
#~ msgid "bad regexp: %s\n"
#~ msgstr "߸ ǥ: %s\n"
@@ -551,6 +860,13 @@ msgstr ""
#~ "\n"
#~ msgid ""
+#~ "E-mail bug reports to: %s .\n"
+#~ "Be sure to include the word ``%s'' somewhere in the ``Subject:'' field.\n"
+#~ msgstr ""
+#~ "׸ E-mail ּ: %s .\n"
+#~ "``Subject:'' ׸ ݵ ``%s'' ܾ ֽñ ٶϴ.\n"
+
+#~ msgid ""
#~ "%s\n"
#~ "This is free software; see the source for copying conditions. There is "
#~ "NO\n"
diff --git a/po/nb.gmo b/po/nb.gmo
index c8ed171..9c073e9 100644
--- a/po/nb.gmo
+++ b/po/nb.gmo
Binary files differ
diff --git a/po/nb.po b/po/nb.po
index f2b66eb..3f3b0fb 100644
--- a/po/nb.po
+++ b/po/nb.po
@@ -2,238 +2,621 @@
# 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.
+# Johnny A. Solbu <johnny@solbu.net>, 2012 - 2016
#
msgid ""
msgstr ""
-"Project-Id-Version: sed 4.2.1\n"
+"Project-Id-Version: sed 4.2.2\n"
"Report-Msgid-Bugs-To: bug-gnu-utils@gnu.org\n"
-"POT-Creation-Date: 2012-12-22 14:36+0100\n"
-"PO-Revision-Date: 2012-11-08 19:34+0100\n"
+"POT-Creation-Date: 2016-12-30 00:59-0800\n"
+"PO-Revision-Date: 2016-06-20 17:22+0200\n"
"Last-Translator: Johnny A. Solbu <johnny@solbu.net>\n"
"Language-Team: Norwegian Bokmaal <i18n-nb@lister.ping.uio.no>\n"
-"Language: nb_NO\n"
+"Language: nb\n"
"MIME-Version: 1.0\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"
+"X-Generator: Poedit 1.8.7.1\n"
-#: sed/compile.c:144
+#: lib/closeout.c:112
+msgid "write error"
+msgstr ""
+
+#: lib/copy-acl.c:54
+#, c-format
+msgid "preserving permissions for %s"
+msgstr ""
+
+#: lib/dfa.c:1025 lib/dfa.c:1028 lib/dfa.c:1047 lib/dfa.c:1057 lib/dfa.c:1070
+#: lib/dfa.c:1098 lib/dfa.c:1107 lib/dfa.c:1110 lib/dfa.c:1115 lib/dfa.c:1137
+#: lib/dfa.c:1140
+msgid "unbalanced ["
+msgstr ""
+
+#: lib/dfa.c:1083
+#, fuzzy
+msgid "invalid character class"
+msgstr "Ugyldig tegnklassenavn"
+
+#: lib/dfa.c:1206
+msgid "character class syntax is [[:space:]], not [:space:]"
+msgstr ""
+
+#: lib/dfa.c:1275
+msgid "unfinished \\ escape"
+msgstr ""
+
+#: lib/dfa.c:1436
+#, fuzzy
+msgid "invalid content of \\{\\}"
+msgstr "Ugyldig bruk av \\{\\}"
+
+#: lib/dfa.c:1439
+#, fuzzy
+msgid "regular expression too big"
+msgstr "Regulært uttrykk for stort"
+
+#: lib/dfa.c:1853
+msgid "unbalanced ("
+msgstr ""
+
+#: lib/dfa.c:1980
+msgid "no syntax specified"
+msgstr ""
+
+#: lib/dfa.c:1988
+msgid "unbalanced )"
+msgstr ""
+
+#: lib/error.c:191
+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 ""
+
+#: lib/getopt.c:654 lib/getopt.c:658
+#, c-format
+msgid "%s: option '--%s' doesn't allow an argument\n"
+msgstr ""
+
+#: 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:715 lib/getopt.c:734
+#, c-format
+msgid "%s: option '--%s' requires an argument\n"
+msgstr ""
+
+#: 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
+#, 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
+#, 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 "Minnet oppbrukt"
+
+#. TRANSLATORS:
+#. Get translations for open and closing quotation marks.
+#. The message catalog should translate "`" to a left
+#. quotation mark suitable for the locale, and similarly for
+#. "'". For example, a French Unicode local should translate
+#. these to U+00AB (LEFT-POINTING DOUBLE ANGLE
+#. QUOTATION MARK), and U+00BB (RIGHT-POINTING DOUBLE ANGLE
+#. QUOTATION MARK), respectively.
+#.
+#. If the catalog has no translation, we will try to
+#. use Unicode U+2018 (LEFT SINGLE QUOTATION MARK) and
+#. Unicode U+2019 (RIGHT SINGLE QUOTATION MARK). If the
+#. current locale is not Unicode, locale_quoting_style
+#. will quote 'like this', and clocale_quoting_style will
+#. quote "like this". You should always include translations
+#. for "`" and "'" even if U+2018 and U+2019 are appropriate
+#. for your locale.
+#.
+#. If you don't know what to put here, please see
+#. <http://en.wikipedia.org/wiki/Quotation_marks_in_other_languages>
+#. and use glyphs suitable for your language.
+#: lib/quotearg.c:354
+msgid "`"
+msgstr ""
+
+#: lib/quotearg.c:355
+msgid "'"
+msgstr ""
+
+#: lib/regcomp.c:135
+msgid "Success"
+msgstr "Suksess"
+
+#: lib/regcomp.c:138
+msgid "No match"
+msgstr "Ingen treff"
+
+#: lib/regcomp.c:141
+msgid "Invalid regular expression"
+msgstr "Ugyldig regulært uttrykk"
+
+#: lib/regcomp.c:144
+msgid "Invalid collation character"
+msgstr "Ugyldig sorteringstegn"
+
+#: lib/regcomp.c:147
+msgid "Invalid character class name"
+msgstr "Ugyldig tegnklassenavn"
+
+#: lib/regcomp.c:150
+msgid "Trailing backslash"
+msgstr "Etterfølgende backslash"
+
+#: lib/regcomp.c:153
+msgid "Invalid back reference"
+msgstr "Ugyldig bak-referanse"
+
+#: lib/regcomp.c:156
+#, fuzzy
+msgid "Unmatched [, [^, [:, [., or [="
+msgstr "Ubalansert [ eller [^"
+
+#: lib/regcomp.c:159
+msgid "Unmatched ( or \\("
+msgstr "Ubalansert ( eller \\("
+
+#: lib/regcomp.c:162
+msgid "Unmatched \\{"
+msgstr "Ubalansert \\{"
+
+#: lib/regcomp.c:165
+msgid "Invalid content of \\{\\}"
+msgstr "Ugyldig bruk av \\{\\}"
+
+#: lib/regcomp.c:168
+msgid "Invalid range end"
+msgstr "Ugyldig intervallslutt"
+
+#: lib/regcomp.c:171
+msgid "Memory exhausted"
+msgstr "Minnet oppbrukt"
+
+#: lib/regcomp.c:174
+msgid "Invalid preceding regular expression"
+msgstr "Ugyldig foregående regulært uttrykk"
+
+#: lib/regcomp.c:177
+msgid "Premature end of regular expression"
+msgstr "For tidlig slutt på regulært uttrykk"
+
+#: lib/regcomp.c:180
+msgid "Regular expression too big"
+msgstr "Regulært uttrykk for stort"
+
+#: lib/regcomp.c:183
+msgid "Unmatched ) or \\)"
+msgstr "Ubalansert ) eller \\)"
+
+#: lib/regcomp.c:687
+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 ""
+
+#: lib/version-etc.c:74
+#, c-format
+msgid "Packaged by %s (%s)\n"
+msgstr ""
+
+#: lib/version-etc.c:77
+#, c-format
+msgid "Packaged by %s\n"
+msgstr ""
+
+#. 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 ""
+
+#: lib/version-etc.c:86
+msgid ""
+"\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"
+msgstr ""
+
+#. TRANSLATORS: %s denotes an author name.
+#: lib/version-etc.c:102
+#, c-format
+msgid "Written by %s.\n"
+msgstr ""
+
+#. TRANSLATORS: Each %s denotes an author name.
+#: lib/version-etc.c:106
+#, c-format
+msgid "Written by %s and %s.\n"
+msgstr ""
+
+#. TRANSLATORS: Each %s denotes an author name.
+#: lib/version-etc.c:110
+#, c-format
+msgid "Written by %s, %s, and %s.\n"
+msgstr ""
+
+#. TRANSLATORS: Each %s denotes an author name.
+#. You can use line breaks, estimating that each author name occupies
+#. ca. 16 screen columns and that a screen line has ca. 80 columns.
+#: lib/version-etc.c:117
+#, c-format
+msgid ""
+"Written by %s, %s, %s,\n"
+"and %s.\n"
+msgstr ""
+
+#. TRANSLATORS: Each %s denotes an author name.
+#. You can use line breaks, estimating that each author name occupies
+#. ca. 16 screen columns and that a screen line has ca. 80 columns.
+#: lib/version-etc.c:124
+#, c-format
+msgid ""
+"Written by %s, %s, %s,\n"
+"%s, and %s.\n"
+msgstr ""
+
+#. TRANSLATORS: Each %s denotes an author name.
+#. You can use line breaks, estimating that each author name occupies
+#. ca. 16 screen columns and that a screen line has ca. 80 columns.
+#: lib/version-etc.c:131
+#, c-format
+msgid ""
+"Written by %s, %s, %s,\n"
+"%s, %s, and %s.\n"
+msgstr ""
+
+#. TRANSLATORS: Each %s denotes an author name.
+#. You can use line breaks, estimating that each author name occupies
+#. ca. 16 screen columns and that a screen line has ca. 80 columns.
+#: lib/version-etc.c:139
+#, c-format
+msgid ""
+"Written by %s, %s, %s,\n"
+"%s, %s, %s, and %s.\n"
+msgstr ""
+
+#. TRANSLATORS: Each %s denotes an author name.
+#. You can use line breaks, estimating that each author name occupies
+#. ca. 16 screen columns and that a screen line has ca. 80 columns.
+#: lib/version-etc.c:147
+#, c-format
+msgid ""
+"Written by %s, %s, %s,\n"
+"%s, %s, %s, %s,\n"
+"and %s.\n"
+msgstr ""
+
+#. TRANSLATORS: Each %s denotes an author name.
+#. You can use line breaks, estimating that each author name occupies
+#. ca. 16 screen columns and that a screen line has ca. 80 columns.
+#: lib/version-etc.c:156
+#, c-format
+msgid ""
+"Written by %s, %s, %s,\n"
+"%s, %s, %s, %s,\n"
+"%s, and %s.\n"
+msgstr ""
+
+#. TRANSLATORS: Each %s denotes an author name.
+#. You can use line breaks, estimating that each author name occupies
+#. ca. 16 screen columns and that a screen line has ca. 80 columns.
+#: lib/version-etc.c:167
+#, c-format
+msgid ""
+"Written by %s, %s, %s,\n"
+"%s, %s, %s, %s,\n"
+"%s, %s, and others.\n"
+msgstr ""
+
+#. TRANSLATORS: The placeholder indicates the bug-reporting address
+#. for this package. Please add _another line_ saying
+#. "Report translation bugs to <...>\n" with the address for translation
+#. bugs (typically your translation team's web or email address).
+#: lib/version-etc.c:245
+#, c-format
+msgid ""
+"\n"
+"Report bugs to: %s\n"
+msgstr ""
+
+#: lib/version-etc.c:247
+#, c-format
+msgid "Report %s bugs to: %s\n"
+msgstr ""
+
+#: lib/version-etc.c:251
+#, c-format
+msgid "%s home page: <%s>\n"
+msgstr ""
+
+#: lib/version-etc.c:253
+#, c-format
+msgid "%s home page: <http://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"
+msgstr ""
+"GNU sed hjemmeside:. <http://www.gnu.org/software/sed/>\n"
+"Generelt hjelp med GNU-programvare:. <http://www.gnu.org/gethelp/>.\n"
+
+#: sed/compile.c:146
msgid "multiple `!'s"
msgstr "flere `!'s"
-#: sed/compile.c:145
+#: sed/compile.c:147
msgid "unexpected `,'"
msgstr "uventet `,'"
-#: sed/compile.c:146
+#: sed/compile.c:149
msgid "invalid usage of +N or ~N as first address"
msgstr "ugyldig bruk av +N eller ~N som første adresse"
-#: sed/compile.c:147
+#: sed/compile.c:150
msgid "unmatched `{'"
msgstr "ubalansert `{'"
-#: sed/compile.c:148
+#: sed/compile.c:151
msgid "unexpected `}'"
msgstr "uventet `}'"
-#: sed/compile.c:149
+#: sed/compile.c:153
msgid "extra characters after command"
msgstr "ekstra tegn etter kommando"
-#: sed/compile.c:150
+#: sed/compile.c:155
msgid "expected \\ after `a', `c' or `i'"
msgstr "forventet \\ etter «a», «c» eller «i»"
-#: sed/compile.c:151
+#: sed/compile.c:157
msgid "`}' doesn't want any addresses"
msgstr "`}' ønsker ingen adresser"
-#: sed/compile.c:152
+#: sed/compile.c:159
msgid ": doesn't want any addresses"
msgstr ": ønsker ingen adresser"
-#: sed/compile.c:153
+#: sed/compile.c:161
msgid "comments don't accept any addresses"
msgstr "kommentarer aksepterer ingen adresser"
-#: sed/compile.c:154
+#: sed/compile.c:162
msgid "missing command"
msgstr "kommandoen mangler"
-#: sed/compile.c:155
+#: sed/compile.c:163
msgid "command only uses one address"
msgstr "kommandoen bruker bare én adresse"
-#: sed/compile.c:156
+#: sed/compile.c:164
msgid "unterminated address regex"
msgstr "uterminert regulært adresseuttryk"
-#: sed/compile.c:157
+#: sed/compile.c:165
msgid "unterminated `s' command"
msgstr "uterminert «s»-kommando "
-#: sed/compile.c:158
+#: sed/compile.c:166
msgid "unterminated `y' command"
msgstr "uterminert «y»-kommando "
-#: sed/compile.c:159
+#: sed/compile.c:167
msgid "unknown option to `s'"
msgstr "ukjent alternativ til «%s»"
-#: sed/compile.c:160
+#: sed/compile.c:169
msgid "multiple `p' options to `s' command"
msgstr "flere «p»-alternativer til «s»-kommando"
-#: sed/compile.c:161
+#: sed/compile.c:171
msgid "multiple `g' options to `s' command"
msgstr "flere «g»-alternativer til «s»-kommando"
-#: sed/compile.c:162
+#: sed/compile.c:173
msgid "multiple number options to `s' command"
msgstr "flere tallvalg til «s»-kommando"
-#: sed/compile.c:163
+#: sed/compile.c:175
msgid "number option to `s' command may not be zero"
msgstr "tallvalget til «s»-kommandoen kan ikke være null"
-#: sed/compile.c:164
+#: sed/compile.c:177
msgid "strings for `y' command are different lengths"
msgstr "strenger for «y»-kommandoen er ulike lengder"
-#: sed/compile.c:165
+#: sed/compile.c:179
msgid "delimiter character is not a single-byte character"
msgstr "skilletegn er ikke et enkeltbitstegn"
-#: sed/compile.c:166
+#: sed/compile.c:181
msgid "expected newer version of sed"
msgstr "forventet nyere versjon av sed"
-#: sed/compile.c:167
+#: sed/compile.c:183
msgid "invalid usage of line address 0"
msgstr "ugyldig bruk av linjeadresse 0"
-#: sed/compile.c:168
+#: sed/compile.c:184
#, c-format
msgid "unknown command: `%c'"
msgstr "ukjent kommando: «%c»"
-#: sed/compile.c:169
-#, fuzzy
+#: sed/compile.c:186
msgid "incomplete command"
-msgstr "kommandoen mangler"
+msgstr "ufullstendig kommando"
-#: sed/compile.c:192
+#: sed/compile.c:188
+msgid "\":\" lacks a label"
+msgstr ""
+
+#: sed/compile.c:190
+msgid "recursive escaping after \\c not allowed"
+msgstr ""
+
+#: sed/compile.c:213
#, c-format
msgid "%s: file %s line %lu: %s\n"
msgstr "%s: fil %s linje %lu: %s\n"
-#: sed/compile.c:195
+#: sed/compile.c:216
#, c-format
msgid "%s: -e expression #%lu, char %lu: %s\n"
msgstr "%s: -e uttrykk #%lu, tegn %lu: %s\n"
-#: sed/compile.c:1657
+#: sed/compile.c:1639
#, c-format
msgid "can't find label for jump to `%s'"
msgstr "kan ikke finne etiketten for hopp til «%s»"
-#: sed/execute.c:595
+#: sed/execute.c:264 sed/execute.c:281
+#, c-format
+msgid "case conversion produced an invalid character"
+msgstr ""
+
+#: sed/execute.c:575
#, c-format
msgid "%s: can't read %s: %s\n"
msgstr "%s: kan ikke lese %s: %s\n"
-#: sed/execute.c:624
+#: sed/execute.c:600
#, c-format
msgid "couldn't edit %s: is a terminal"
msgstr "Kan ikke redigere %s: er en terminal"
-#: sed/execute.c:629
+#: sed/execute.c:605
#, c-format
msgid "couldn't edit %s: not a regular file"
msgstr "Kan ikke redigere %s: ikke en vanlig fil "
-#: sed/execute.c:640
+#: sed/execute.c:616
#, 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:647
+#: sed/execute.c:624
#, 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:664 sed/utils.c:211
+#: sed/execute.c:643 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:1193 sed/execute.c:1373
+#: sed/execute.c:1158 sed/execute.c:1368
msgid "error in subprocess"
msgstr "Feil i underprosessen"
-#: sed/execute.c:1195
+#: sed/execute.c:1160
msgid "option `e' not supported"
msgstr "«e»-valget støttes ikke"
-#: sed/execute.c:1375
+#: sed/execute.c:1349
msgid "`e' command not supported"
msgstr "«e»-kommandoen støttes ikke"
-#: sed/execute.c:1725
+#: sed/execute.c:1675
msgid "no input files"
msgstr "ingen inndatafiler"
-#: sed/regexp.c:39
+#: sed/regexp.c:38
msgid "no previous regular expression"
msgstr "Intet foregående regulært uttrykk"
-#: sed/regexp.c:40
-msgid "cannot specify modifiers on empty regexp"
-msgstr "kan ikke angi modifikatorer på tomt regulært uttrykk"
-
-#: sed/regexp.c:129
+#: sed/regexp.c:138
#, c-format
msgid "invalid reference \\%d on `s' command's RHS"
msgstr "ugyldig referanse \\%d på «s»-kommandoens RHS"
-#: sed/sed.c:32
+#: sed/sed.c:35
msgid "Jay Fenlason"
-msgstr ""
+msgstr "Jay Fenlason"
-#: sed/sed.c:33
+#: sed/sed.c:36
msgid "Tom Lord"
-msgstr ""
+msgstr "Tom Lord"
-#: sed/sed.c:34
+#: sed/sed.c:37
msgid "Ken Pizzini"
-msgstr ""
+msgstr "Ken Pizzini"
-#: sed/sed.c:35
+#: sed/sed.c:38
msgid "Paolo Bonzini"
-msgstr ""
+msgstr "Paolo Bonzini"
-#: sed/sed.c:79
+#: 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"
msgstr ""
"GNU sed hjemmeside:. <http://www.gnu.org/software/sed/>\n"
-"Generelt hjelp med GNU programvare:. <http://www.gnu.org/gethelp/>.\n"
+"Generelt hjelp med GNU-programvare:. <http://www.gnu.org/gethelp/>.\n"
-#: sed/sed.c:86
+#: sed/sed.c:120
#, c-format
-msgid ""
-"E-mail bug reports to: <%s>.\n"
-"Be sure to include the word ``%s'' somewhere in the ``Subject:'' field.\n"
+msgid "E-mail bug reports to: <%s>.\n"
msgstr ""
-"Send feilrapporter på epost til: <%s>\n"
-"Sørg for å inkludere ordet «%s» et sted i emnefeltet\n"
-#: sed/sed.c:99
+#: sed/sed.c:129
msgid ""
" -R, --regexp-perl\n"
" use Perl 5's regular expressions syntax in the script.\n"
@@ -241,7 +624,7 @@ msgstr ""
" -R, --regexp-perl\n"
" Bruk Perl 5-syntaks for regulær uttrykk i skriptet.\n"
-#: sed/sed.c:104
+#: sed/sed.c:134
#, c-format
msgid ""
"Usage: %s [OPTION]... {script-only-if-no-other-script} [input-file]...\n"
@@ -250,7 +633,7 @@ msgstr ""
"Bruk: %s [VALG] ... {skript-bare-hvis-ingen-andre-skript} [inndatafil]...\n"
"\n"
-#: sed/sed.c:108
+#: sed/sed.c:138
#, c-format
msgid ""
" -n, --quiet, --silent\n"
@@ -259,7 +642,7 @@ msgstr ""
" -n, --quiet, --silent\n"
" undertrykk automatisk utskrift av mønsterplass\n"
-#: sed/sed.c:110
+#: sed/sed.c:140
#, c-format
msgid ""
" -e script, --expression=script\n"
@@ -268,7 +651,7 @@ msgstr ""
" -e script, --expression=script\n"
" legge skriptet til kommandoer som skal utføres\n"
-#: sed/sed.c:112
+#: sed/sed.c:142
#, c-format
msgid ""
" -f script-file, --file=script-file\n"
@@ -279,7 +662,7 @@ msgstr ""
" legge innholdet i skriptfil til kommandoer som skal "
"utføres\n"
-#: sed/sed.c:115
+#: sed/sed.c:146
#, c-format
msgid ""
" --follow-symlinks\n"
@@ -288,17 +671,16 @@ msgstr ""
" --follow-symlinks\n"
" Følg symbolske lenker ved prosessering «på stedet»\n"
-#: sed/sed.c:118
-#, fuzzy, c-format
+#: sed/sed.c:149
+#, c-format
msgid ""
" -i[SUFFIX], --in-place[=SUFFIX]\n"
" edit files in place (makes backup if SUFFIX supplied)\n"
msgstr ""
" -i[SUFFIKS], --in-place[=SUFFIKS]\n"
-" rediger filer «på stedet» (tar backup hvis filendelse "
-"oppgis)\n"
+" rediger filer «på stedet» (tar backup hvis SUFFIKS oppgis)\n"
-#: sed/sed.c:121
+#: sed/sed.c:153
#, c-format
msgid ""
" -b, --binary\n"
@@ -308,7 +690,7 @@ msgstr ""
" -b, --binary\n"
" åpne filer i binært (CR+LFs prosesseres ikke spesielt)\n"
-#: sed/sed.c:124
+#: sed/sed.c:157
#, c-format
msgid ""
" -l N, --line-length=N\n"
@@ -317,7 +699,7 @@ msgstr ""
" -l N, --line-length=N\n"
" angi ønsket linjebrytingslengde for «l»-kommandoen\n"
-#: sed/sed.c:126
+#: sed/sed.c:159
#, c-format
msgid ""
" --posix\n"
@@ -326,28 +708,37 @@ msgstr ""
" --posix\n"
" deaktivere alle GNU-utvidelser.\n"
-#: sed/sed.c:128
-#, c-format
+#: sed/sed.c:161
+#, fuzzy, c-format
msgid ""
-" -r, --regexp-extended\n"
-" use extended regular expressions in the script.\n"
+" -E, -r, --regexp-extended\n"
+" use extended regular expressions in the script\n"
+" (for portability use POSIX -E).\n"
msgstr ""
" -r, --regexp-extended\n"
" bruk utvidede regulære uttrykk i skriptet.\n"
-#: sed/sed.c:133
-#, c-format
+#: sed/sed.c:167
+#, fuzzy, c-format
msgid ""
" -s, --separate\n"
-" consider files as separate rather than as a single "
-"continuous\n"
-" long stream.\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"
" sammenhengende lang strøm.\n"
-#: sed/sed.c:136
+#: sed/sed.c:170
+#, fuzzy, c-format
+msgid ""
+" --sandbox\n"
+" operate in sandbox mode.\n"
+msgstr ""
+" -z, --null-data\n"
+" skille linjer ved NULL-tegn\n"
+
+#: sed/sed.c:172
#, c-format
msgid ""
" -u, --unbuffered\n"
@@ -359,24 +750,26 @@ msgstr ""
" last minimale mengder data fra inndatafiler og skyll\n"
" utdatabufferne oftere\n"
-#: sed/sed.c:139
+#: sed/sed.c:175
#, c-format
msgid ""
" -z, --null-data\n"
" separate lines by NUL characters\n"
msgstr ""
+" -z, --null-data\n"
+" skille linjer ved NULL-tegn\n"
-#: sed/sed.c:141
+#: sed/sed.c:177
#, c-format
msgid " --help display this help and exit\n"
msgstr " --help vis denne hjelpteksten og avslutt\n"
-#: sed/sed.c:142
+#: sed/sed.c:178
#, c-format
msgid " --version output version information and exit\n"
msgstr " --version vis programversjon og avslutt\n"
-#: sed/sed.c:143
+#: sed/sed.c:179
#, c-format
msgid ""
"\n"
@@ -393,119 +786,57 @@ msgstr ""
"inndatafiler angis leses standard inndata.\n"
"\n"
-#: sed/utils.c:74 sed/utils.c:432
+#: sed/utils.c:73 sed/utils.c:384
#, c-format
msgid "cannot remove %s: %s"
msgstr "kan ikke fjerne %s: %s "
-#: sed/utils.c:144
+#: sed/utils.c:136
#, c-format
msgid "couldn't open file %s: %s"
msgstr "Kunne ikke åpne filen %s: %s"
-#: sed/utils.c:167
+#: sed/utils.c:155
#, c-format
msgid "couldn't attach to %s: %s"
msgstr "kunne ikke koble til %s: %s"
-#: sed/utils.c:229
-#, c-format
-msgid "couldn't write %d item to %s: %s"
-msgid_plural "couldn't write %d items to %s: %s"
+#: sed/utils.c:192
+#, fuzzy, 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"
-#: sed/utils.c:244 sed/utils.c:267
+#: sed/utils.c:204 sed/utils.c:223
#, c-format
msgid "read error on %s: %s"
msgstr "lesefeil på fil %s: %s"
-#: sed/utils.c:372
+#: sed/utils.c:325
#, c-format
msgid "couldn't follow symlink %s: %s"
msgstr "kunne ikke følge symbolsk lenke %s: %s"
-#: sed/utils.c:406
+#: sed/utils.c:359
#, c-format
msgid "cannot stat %s: %s"
msgstr "kan ikke lese status på %s: %s"
-#: sed/utils.c:437
+#: sed/utils.c:389
#, c-format
msgid "cannot rename %s: %s"
msgstr "Kan ikke omdøpe %s: %s"
-#: lib/regcomp.c:132
-msgid "Success"
-msgstr "Suksess"
-
-#: lib/regcomp.c:135
-msgid "No match"
-msgstr "Ingen treff"
-
-#: lib/regcomp.c:138
-msgid "Invalid regular expression"
-msgstr "Ugyldig regulært uttrykk"
-
-#: lib/regcomp.c:141
-msgid "Invalid collation character"
-msgstr "Ugyldig sorteringstegn"
-
-#: lib/regcomp.c:144
-msgid "Invalid character class name"
-msgstr "Ugyldig tegnklassenavn"
-
-#: lib/regcomp.c:147
-msgid "Trailing backslash"
-msgstr "Etterfølgende backslash"
-
-#: lib/regcomp.c:150
-msgid "Invalid back reference"
-msgstr "Ugyldig bak-referanse"
+#~ msgid "cannot specify modifiers on empty regexp"
+#~ msgstr "kan ikke angi modifikatorer på tomt regulært uttrykk"
-#: lib/regcomp.c:153
-msgid "Unmatched [ or [^"
-msgstr "Ubalansert [ eller [^"
-
-#: lib/regcomp.c:156
-msgid "Unmatched ( or \\("
-msgstr "Ubalansert ( eller \\("
-
-#: lib/regcomp.c:159
-msgid "Unmatched \\{"
-msgstr "Ubalansert \\{"
-
-#: lib/regcomp.c:162
-msgid "Invalid content of \\{\\}"
-msgstr "Ugyldig bruk av \\{\\}"
-
-#: lib/regcomp.c:165
-msgid "Invalid range end"
-msgstr "Ugyldig intervallslutt"
-
-#: lib/regcomp.c:168
-msgid "Memory exhausted"
-msgstr "Minnet oppbrukt"
-
-#: lib/regcomp.c:171
-msgid "Invalid preceding regular expression"
-msgstr "Ugyldig foregående regulært uttrykk"
-
-#: lib/regcomp.c:174
-msgid "Premature end of regular expression"
-msgstr "For tidlig slutt på regulært uttrykk"
-
-#: lib/regcomp.c:177
-msgid "Regular expression too big"
-msgstr "Regulært uttrykk for stort"
-
-#: lib/regcomp.c:180
-msgid "Unmatched ) or \\)"
-msgstr "Ubalansert ) eller \\)"
-
-#: lib/regcomp.c:705
-msgid "No previous regular expression"
-msgstr "Intet foregående regulært uttrykk"
+#~ msgid ""
+#~ "E-mail bug reports to: <%s>.\n"
+#~ "Be sure to include the word ``%s'' somewhere in the ``Subject:'' field.\n"
+#~ msgstr ""
+#~ "Send feilrapporter på e-post til: <%s>\n"
+#~ "Sørg for å inkludere ordet «%s» et sted i emnefeltet\n"
#~ msgid "super-sed version %s\n"
#~ msgstr "super-sed versjon %s\n"
diff --git a/po/nl.gmo b/po/nl.gmo
index c8e1c17..a6de1ad 100644
--- a/po/nl.gmo
+++ b/po/nl.gmo
Binary files differ
diff --git a/po/nl.po b/po/nl.po
index f2d9d35..442cc22 100644
--- a/po/nl.po
+++ b/po/nl.po
@@ -1,223 +1,634 @@
-# Dutch translation for sed.
-# Copyright (C) 2010 Free Software Foundation, Inc.
+# Dutch translations for GNU sed.
+# Copyright (C) 2016 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."
+#
# Taco Witte <tcwitte@cs.uu.nl>, 2004, 2005.
-# Benno Schulenberg <benno@vertaalt.nl>, 2005, 2006, 2007, 2008, 2010.
+# Benno Schulenberg <benno@vertaalt.nl>, 2005, 2006, 2007, 2008, 2010, 2016.
msgid ""
msgstr ""
-"Project-Id-Version: sed-4.2.1\n"
+"Project-Id-Version: sed-4.2.2.177\n"
"Report-Msgid-Bugs-To: bug-gnu-utils@gnu.org\n"
-"POT-Creation-Date: 2012-12-22 14:36+0100\n"
-"PO-Revision-Date: 2010-06-11 11:42+0200\n"
+"POT-Creation-Date: 2016-12-30 00:59-0800\n"
+"PO-Revision-Date: 2016-12-06 11:39+0100\n"
"Last-Translator: Benno Schulenberg <benno@vertaalt.nl>\n"
"Language-Team: Dutch <vertaling@vrijschrift.org>\n"
"Language: nl\n"
"MIME-Version: 1.0\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"
"X-Generator: Lokalize 1.0\n"
-#: sed/compile.c:144
+#: lib/closeout.c:112
+msgid "write error"
+msgstr "schrijffout"
+
+#: lib/copy-acl.c:54
+#, c-format
+msgid "preserving permissions for %s"
+msgstr "behouden van toegangsrechten van %s"
+
+#: lib/dfa.c:1025 lib/dfa.c:1028 lib/dfa.c:1047 lib/dfa.c:1057 lib/dfa.c:1070
+#: lib/dfa.c:1098 lib/dfa.c:1107 lib/dfa.c:1110 lib/dfa.c:1115 lib/dfa.c:1137
+#: lib/dfa.c:1140
+msgid "unbalanced ["
+msgstr "ongepaarde ["
+
+#: lib/dfa.c:1083
+msgid "invalid character class"
+msgstr "ongeldige tekenklasse"
+
+#: lib/dfa.c:1206
+msgid "character class syntax is [[:space:]], not [:space:]"
+msgstr "syntax van tekenklasse is [[:space:]], niet [:space:]"
+
+#: lib/dfa.c:1275
+msgid "unfinished \\ escape"
+msgstr "onafgemaakte \\-stuurcode"
+
+#: lib/dfa.c:1436
+msgid "invalid content of \\{\\}"
+msgstr "ongeldige inhoud van \\{\\}"
+
+#: lib/dfa.c:1439
+msgid "regular expression too big"
+msgstr "reguliere expressie is te groot"
+
+#: lib/dfa.c:1853
+msgid "unbalanced ("
+msgstr "ongepaarde ("
+
+#: lib/dfa.c:1980
+msgid "no syntax specified"
+msgstr "geen syntax opgegeven"
+
+#: lib/dfa.c:1988
+msgid "unbalanced )"
+msgstr "ongepaarde )"
+
+#: lib/error.c:191
+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
+#, c-format
+msgid "%s: option '--%s' doesn't allow an argument\n"
+msgstr "%s: optie '--%s' staat geen argument toe\n"
+
+#: lib/getopt.c:667 lib/getopt.c:672
+#, c-format
+msgid "%s: option '%c%s' doesn't allow an argument\n"
+msgstr "%s: optie '%c%s' staat geen argument toe\n"
+
+#: lib/getopt.c:715 lib/getopt.c:734
+#, c-format
+msgid "%s: option '--%s' requires an argument\n"
+msgstr "%s: optie '--%s' vereist een argument\n"
+
+#: lib/getopt.c:772 lib/getopt.c:775
+#, c-format
+msgid "%s: unrecognized option '--%s'\n"
+msgstr "%s: onbekende optie '--%s'\n"
+
+#: lib/getopt.c:783 lib/getopt.c:786
+#, c-format
+msgid "%s: unrecognized option '%c%s'\n"
+msgstr "%s: onbekende optie '%c%s'\n"
+
+#: lib/getopt.c:835 lib/getopt.c:838
+#, 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
+#, 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"
+
+#. TRANSLATORS:
+#. Get translations for open and closing quotation marks.
+#. The message catalog should translate "`" to a left
+#. quotation mark suitable for the locale, and similarly for
+#. "'". For example, a French Unicode local should translate
+#. these to U+00AB (LEFT-POINTING DOUBLE ANGLE
+#. QUOTATION MARK), and U+00BB (RIGHT-POINTING DOUBLE ANGLE
+#. QUOTATION MARK), respectively.
+#.
+#. If the catalog has no translation, we will try to
+#. use Unicode U+2018 (LEFT SINGLE QUOTATION MARK) and
+#. Unicode U+2019 (RIGHT SINGLE QUOTATION MARK). If the
+#. current locale is not Unicode, locale_quoting_style
+#. will quote 'like this', and clocale_quoting_style will
+#. quote "like this". You should always include translations
+#. for "`" and "'" even if U+2018 and U+2019 are appropriate
+#. for your locale.
+#.
+#. If you don't know what to put here, please see
+#. <http://en.wikipedia.org/wiki/Quotation_marks_in_other_languages>
+#. and use glyphs suitable for your language.
+#: lib/quotearg.c:354
+msgid "`"
+msgstr "‘"
+
+#: lib/quotearg.c:355
+msgid "'"
+msgstr "’"
+
+#: lib/regcomp.c:135
+msgid "Success"
+msgstr "Gelukt"
+
+#: lib/regcomp.c:138
+msgid "No match"
+msgstr "Geen overeenkomsten"
+
+#: lib/regcomp.c:141
+msgid "Invalid regular expression"
+msgstr "Ongeldige reguliere expressie"
+
+#: lib/regcomp.c:144
+msgid "Invalid collation character"
+msgstr "Ongeldig samengesteld teken"
+
+#: lib/regcomp.c:147
+msgid "Invalid character class name"
+msgstr "Ongeldige tekenklassenaam"
+
+#: lib/regcomp.c:150
+msgid "Trailing backslash"
+msgstr "Backslash aan het eind"
+
+#: lib/regcomp.c:153
+msgid "Invalid back reference"
+msgstr "Ongeldige terugverwijzing"
+
+#: lib/regcomp.c:156
+msgid "Unmatched [, [^, [:, [., or [="
+msgstr "Ongepaarde [, [^, [:, [., of [="
+
+#: lib/regcomp.c:159
+msgid "Unmatched ( or \\("
+msgstr "Ongepaarde ( of \\("
+
+#: lib/regcomp.c:162
+msgid "Unmatched \\{"
+msgstr "Ongepaarde \\{"
+
+#: lib/regcomp.c:165
+msgid "Invalid content of \\{\\}"
+msgstr "Ongeldige inhoud van \\{\\}"
+
+#: lib/regcomp.c:168
+msgid "Invalid range end"
+msgstr "Ongeldig bereikeinde"
+
+#: lib/regcomp.c:171
+msgid "Memory exhausted"
+msgstr "Onvoldoende geheugen beschikbaar"
+
+#: lib/regcomp.c:174
+msgid "Invalid preceding regular expression"
+msgstr "Ongeldige voorafgaande reguliere expressie"
+
+#: lib/regcomp.c:177
+msgid "Premature end of regular expression"
+msgstr "Voortijdig einde van reguliere expressie"
+
+#: lib/regcomp.c:180
+msgid "Regular expression too big"
+msgstr "Reguliere expressie is te groot"
+
+#: lib/regcomp.c:183
+msgid "Unmatched ) or \\)"
+msgstr "Ongepaarde ) of \\)"
+
+#: lib/regcomp.c:687
+msgid "No previous regular expression"
+msgstr "Geen eerdere reguliere expressie"
+
+#: lib/set-acl.c:46
+#, c-format
+msgid "setting permissions for %s"
+msgstr "instellen van toegangsrechten van %s"
+
+#: lib/version-etc.c:74
+#, c-format
+msgid "Packaged by %s (%s)\n"
+msgstr "In pakketvorm gebracht door %s (%s)\n"
+
+#: lib/version-etc.c:77
+#, c-format
+msgid "Packaged by %s\n"
+msgstr "In pakketvorm gebracht door %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 "©"
+
+#: lib/version-etc.c:86
+msgid ""
+"\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"
+msgstr ""
+"\n"
+"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"
+"Deze software kent GEEN GARANTIE, voor zover de wet dit toestaat.\n"
+"\n"
+
+#. TRANSLATORS: %s denotes an author name.
+#: lib/version-etc.c:102
+#, c-format
+msgid "Written by %s.\n"
+msgstr "Geschreven door %s.\n"
+
+#. TRANSLATORS: Each %s denotes an author name.
+#: lib/version-etc.c:106
+#, c-format
+msgid "Written by %s and %s.\n"
+msgstr "Geschreven door %s en %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 "Geschreven door %s, %s en %s.\n"
+
+#. TRANSLATORS: Each %s denotes an author name.
+#. You can use line breaks, estimating that each author name occupies
+#. ca. 16 screen columns and that a screen line has ca. 80 columns.
+#: lib/version-etc.c:117
+#, c-format
+msgid ""
+"Written by %s, %s, %s,\n"
+"and %s.\n"
+msgstr ""
+"Geschreven door %s, %s, %s\n"
+"en %s.\n"
+
+#. TRANSLATORS: Each %s denotes an author name.
+#. You can use line breaks, estimating that each author name occupies
+#. ca. 16 screen columns and that a screen line has ca. 80 columns.
+#: lib/version-etc.c:124
+#, c-format
+msgid ""
+"Written by %s, %s, %s,\n"
+"%s, and %s.\n"
+msgstr ""
+"Geschreven door %s, %s, %s,\n"
+"%s en %s.\n"
+
+#. TRANSLATORS: Each %s denotes an author name.
+#. You can use line breaks, estimating that each author name occupies
+#. ca. 16 screen columns and that a screen line has ca. 80 columns.
+#: lib/version-etc.c:131
+#, c-format
+msgid ""
+"Written by %s, %s, %s,\n"
+"%s, %s, and %s.\n"
+msgstr ""
+"Geschreven door %s, %s, %s,\n"
+"%s, %s en %s.\n"
+
+#. TRANSLATORS: Each %s denotes an author name.
+#. You can use line breaks, estimating that each author name occupies
+#. ca. 16 screen columns and that a screen line has ca. 80 columns.
+#: lib/version-etc.c:139
+#, c-format
+msgid ""
+"Written by %s, %s, %s,\n"
+"%s, %s, %s, and %s.\n"
+msgstr ""
+"Geschreven door %s, %s, %s,\n"
+"%s, %s, %s en %s.\n"
+
+#. TRANSLATORS: Each %s denotes an author name.
+#. You can use line breaks, estimating that each author name occupies
+#. ca. 16 screen columns and that a screen line has ca. 80 columns.
+#: lib/version-etc.c:147
+#, c-format
+msgid ""
+"Written by %s, %s, %s,\n"
+"%s, %s, %s, %s,\n"
+"and %s.\n"
+msgstr ""
+"Geschreven door %s, %s, %s,\n"
+"%s, %s, %s, %s\n"
+"en %s.\n"
+
+#. TRANSLATORS: Each %s denotes an author name.
+#. You can use line breaks, estimating that each author name occupies
+#. ca. 16 screen columns and that a screen line has ca. 80 columns.
+#: lib/version-etc.c:156
+#, c-format
+msgid ""
+"Written by %s, %s, %s,\n"
+"%s, %s, %s, %s,\n"
+"%s, and %s.\n"
+msgstr ""
+"Geschreven door %s, %s, %s,\n"
+"%s, %s, %s, %s,\n"
+"%s en %s.\n"
+
+#. TRANSLATORS: Each %s denotes an author name.
+#. You can use line breaks, estimating that each author name occupies
+#. ca. 16 screen columns and that a screen line has ca. 80 columns.
+#: lib/version-etc.c:167
+#, c-format
+msgid ""
+"Written by %s, %s, %s,\n"
+"%s, %s, %s, %s,\n"
+"%s, %s, and others.\n"
+msgstr ""
+"Geschreven door %s, %s, %s,\n"
+"%s, %s, %s, %s,\n"
+"%s, %s en anderen.\n"
+
+#. TRANSLATORS: The placeholder indicates the bug-reporting address
+#. for this package. Please add _another line_ saying
+#. "Report translation bugs to <...>\n" with the address for translation
+#. bugs (typically your translation team's web or email address).
+#: lib/version-etc.c:245
+#, c-format
+msgid ""
+"\n"
+"Report bugs to: %s\n"
+msgstr ""
+"\n"
+"Rapporteer gebreken in het programma aan <%s>;\n"
+"meld fouten in de vertaling aan <vertaling@vrijschrift.org>.\n"
+
+#: lib/version-etc.c:247
+#, c-format
+msgid "Report %s bugs to: %s\n"
+msgstr ""
+"Rapporteer gebreken in het programma '%s' aan <%s>;\n"
+"meld fouten in de vertaling aan <vertaling@vrijschrift.org>.\n"
+
+#: lib/version-etc.c:251
+#, c-format
+msgid "%s home page: <%s>\n"
+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"
+
+#: lib/version-etc.c:256
+msgid "General help using GNU software: <http://www.gnu.org/gethelp/>\n"
+msgstr ""
+"Algemene hulp bij gebruik van GNU-software: <http://www.gnu.org/gethelp/>\n"
+
+#: sed/compile.c:146
msgid "multiple `!'s"
msgstr "meerdere '!'"
-#: sed/compile.c:145
+#: sed/compile.c:147
msgid "unexpected `,'"
msgstr "onverwachte ','"
-#: sed/compile.c:146
+#: sed/compile.c:149
msgid "invalid usage of +N or ~N as first address"
msgstr "ongeldig gebruik van +N of ~N als eerste adres"
-#: sed/compile.c:147
+#: sed/compile.c:150
msgid "unmatched `{'"
msgstr "ongepaarde '{'"
-#: sed/compile.c:148
+#: sed/compile.c:151
msgid "unexpected `}'"
msgstr "onverwachte '}'"
-#: sed/compile.c:149
+#: sed/compile.c:153
msgid "extra characters after command"
msgstr "extra tekens na opdracht"
-#: sed/compile.c:150
+#: sed/compile.c:155
msgid "expected \\ after `a', `c' or `i'"
msgstr "een '\\' werd verwacht na 'a', 'c' of 'i'"
-#: sed/compile.c:151
+#: sed/compile.c:157
msgid "`}' doesn't want any addresses"
msgstr "'}' accepteert geen adressen"
-#: sed/compile.c:152
+#: sed/compile.c:159
msgid ": doesn't want any addresses"
msgstr "':' accepteert geen adressen"
-#: sed/compile.c:153
+#: sed/compile.c:161
msgid "comments don't accept any addresses"
msgstr "opmerkingen accepteren geen adres"
-#: sed/compile.c:154
+#: sed/compile.c:162
msgid "missing command"
msgstr "ontbrekende opdracht"
-#: sed/compile.c:155
+#: sed/compile.c:163
msgid "command only uses one address"
msgstr "opdracht accepteert slechts één adres"
-#: sed/compile.c:156
+#: sed/compile.c:164
msgid "unterminated address regex"
msgstr "onafgemaakte reguliere expressie voor adres"
-#: sed/compile.c:157
+#: sed/compile.c:165
msgid "unterminated `s' command"
msgstr "onafgemaakte 's'-opdracht"
-#: sed/compile.c:158
+#: sed/compile.c:166
msgid "unterminated `y' command"
msgstr "onafgemaakte 'y'-opdracht"
-#: sed/compile.c:159
+#: sed/compile.c:167
msgid "unknown option to `s'"
msgstr "onbekende optie bij 's'-opdracht"
-#: sed/compile.c:160
+#: sed/compile.c:169
msgid "multiple `p' options to `s' command"
msgstr "meerdere 'p'-opties bij 's'-opdracht"
-#: sed/compile.c:161
+#: sed/compile.c:171
msgid "multiple `g' options to `s' command"
msgstr "meerdere 'g'-opties bij 's'-opdracht"
-#: sed/compile.c:162
+#: sed/compile.c:173
msgid "multiple number options to `s' command"
msgstr "meerdere getalopties bij 's'-opdracht"
-#: sed/compile.c:163
+#: sed/compile.c:175
msgid "number option to `s' command may not be zero"
msgstr "getaloptie bij 's'-opdracht mag niet nul zijn"
-#: sed/compile.c:164
+#: sed/compile.c:177
msgid "strings for `y' command are different lengths"
msgstr "tekenreeksen bij 'y'-opdracht zijn van verschillende lengte"
-#: sed/compile.c:165
+#: sed/compile.c:179
msgid "delimiter character is not a single-byte character"
msgstr "scheidingsteken is niet één enkele byte"
-#: sed/compile.c:166
+#: sed/compile.c:181
msgid "expected newer version of sed"
msgstr "een nieuwere versie van 'sed' werd verwacht"
-#: sed/compile.c:167
+#: sed/compile.c:183
msgid "invalid usage of line address 0"
msgstr "ongeldig gebruik van regeladres 0"
-#: sed/compile.c:168
+#: sed/compile.c:184
#, c-format
msgid "unknown command: `%c'"
msgstr "onbekende opdracht: '%c'"
-#: sed/compile.c:169
-#, fuzzy
+#: sed/compile.c:186
msgid "incomplete command"
-msgstr "ontbrekende opdracht"
+msgstr "onvolledige opdracht"
+
+#: sed/compile.c:188
+msgid "\":\" lacks a label"
+msgstr "\":\" mist een label"
+
+#: sed/compile.c:190
+msgid "recursive escaping after \\c not allowed"
+msgstr "recursief escapen is niet toegestaan na \\c"
-#: sed/compile.c:192
+#: sed/compile.c:213
#, c-format
msgid "%s: file %s line %lu: %s\n"
msgstr "%s: bestand %s, regel %lu: %s\n"
-#: sed/compile.c:195
+#: sed/compile.c:216
#, c-format
msgid "%s: -e expression #%lu, char %lu: %s\n"
msgstr "%s: expressie #%lu, teken %lu: %s\n"
-#: sed/compile.c:1657
+#: sed/compile.c:1639
#, c-format
msgid "can't find label for jump to `%s'"
msgstr "kan label voor sprong naar '%s' niet vinden"
-#: sed/execute.c:595
+#: sed/execute.c:264 sed/execute.c:281
+#, c-format
+msgid "case conversion produced an invalid character"
+msgstr "kastomzetting produceerde een ongeldig teken"
+
+#: sed/execute.c:575
#, c-format
msgid "%s: can't read %s: %s\n"
msgstr "%s: kan %s niet lezen: %s\n"
-#: sed/execute.c:624
+#: sed/execute.c:600
#, c-format
msgid "couldn't edit %s: is a terminal"
msgstr "kan %s niet bewerken: is een terminal"
-#: sed/execute.c:629
+#: sed/execute.c:605
#, c-format
msgid "couldn't edit %s: not a regular file"
msgstr "kan %s niet bewerken: is geen gewoon bestand"
-#: sed/execute.c:640
+#: sed/execute.c:616
#, 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:647
+#: sed/execute.c:624
#, 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:664 sed/utils.c:211
+#: sed/execute.c:643 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:1193 sed/execute.c:1373
+#: sed/execute.c:1158 sed/execute.c:1368
msgid "error in subprocess"
msgstr "fout in subproces"
-#: sed/execute.c:1195
+#: sed/execute.c:1160
msgid "option `e' not supported"
msgstr "'e'-opdracht is niet mogelijk"
-#: sed/execute.c:1375
+#: sed/execute.c:1349
msgid "`e' command not supported"
msgstr "'e'-opdracht is niet mogelijk"
-#: sed/execute.c:1725
+#: sed/execute.c:1675
msgid "no input files"
msgstr "geen invoerbestanden"
-#: sed/regexp.c:39
+#: sed/regexp.c:38
msgid "no previous regular expression"
msgstr "geen eerdere reguliere expressie"
-#: sed/regexp.c:40
-msgid "cannot specify modifiers on empty regexp"
-msgstr "bij een lege reguliere expressie passen geen veranderaars"
-
-#: sed/regexp.c:129
+#: sed/regexp.c:138
#, c-format
msgid "invalid reference \\%d on `s' command's RHS"
msgstr "ongeldige verwijzing \\%d rechts van 's'-opdracht"
-#: sed/sed.c:32
+#: sed/sed.c:35
msgid "Jay Fenlason"
-msgstr ""
+msgstr "Jay Fenlason"
-#: sed/sed.c:33
+#: sed/sed.c:36
msgid "Tom Lord"
-msgstr ""
+msgstr "Tom Lord"
-#: sed/sed.c:34
+#: sed/sed.c:37
msgid "Ken Pizzini"
-msgstr ""
+msgstr "Ken Pizzini"
-#: sed/sed.c:35
+#: sed/sed.c:38
msgid "Paolo Bonzini"
-msgstr ""
+msgstr "Paolo Bonzini"
-#: sed/sed.c:79
+#: sed/sed.c:113
#, c-format
msgid ""
"GNU sed home page: <http://www.gnu.org/software/sed/>.\n"
@@ -226,17 +637,14 @@ 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"
-#: sed/sed.c:86
+#: sed/sed.c:120
#, c-format
-msgid ""
-"E-mail bug reports to: <%s>.\n"
-"Be sure to include the word ``%s'' somewhere in the ``Subject:'' field.\n"
+msgid "E-mail bug reports to: <%s>.\n"
msgstr ""
-"Rapporteer gebreken in het programma aan <%s>\n"
-"met het woord \"%s\" ergens in de Onderwerp-regel;\n"
-"meld fouten in de vertaling aan <vertaling@vrijschrift.org>.\n"
+"Rapporteer gebreken in het programma aan: <%s>;\n"
+"meld fouten in de vertaling aan: <vertaling@vrijschriftorg>.\n"
-#: sed/sed.c:99
+#: sed/sed.c:129
msgid ""
" -R, --regexp-perl\n"
" use Perl 5's regular expressions syntax in the script.\n"
@@ -244,7 +652,7 @@ msgstr ""
" -R, --regexp-perl\n"
" reguliere expressies van Perl-5 gebruiken in het script\n"
-#: sed/sed.c:104
+#: sed/sed.c:134
#, c-format
msgid ""
"Usage: %s [OPTION]... {script-only-if-no-other-script} [input-file]...\n"
@@ -253,7 +661,7 @@ msgstr ""
"Gebruik: %s [OPTIE]... {SCRIPT_als_verder_geen_script} [INVOERBESTAND]...\n"
"\n"
-#: sed/sed.c:108
+#: sed/sed.c:138
#, c-format
msgid ""
" -n, --quiet, --silent\n"
@@ -262,7 +670,7 @@ msgstr ""
" -n, --quiet, --silent\n"
" automatische weergave van patroonruimte onderdrukken\n"
-#: sed/sed.c:110
+#: sed/sed.c:140
#, c-format
msgid ""
" -e script, --expression=script\n"
@@ -271,7 +679,7 @@ msgstr ""
" -e SCRIPT, --expression=SCRIPT\n"
" dit SCRIPT toevoegen aan de uit te voeren opdrachten\n"
-#: sed/sed.c:112
+#: sed/sed.c:142
#, c-format
msgid ""
" -f script-file, --file=script-file\n"
@@ -282,7 +690,7 @@ msgstr ""
" inhoud van SCRIPTBESTAND toevoegen aan de uit te voeren "
"opdrachten\n"
-#: sed/sed.c:115
+#: sed/sed.c:146
#, c-format
msgid ""
" --follow-symlinks\n"
@@ -291,8 +699,8 @@ msgstr ""
" --follow-symlinks\n"
" symbolische koppelingen volgen (bij bewerking ter plekke)\n"
-#: sed/sed.c:118
-#, fuzzy, c-format
+#: sed/sed.c:149
+#, c-format
msgid ""
" -i[SUFFIX], --in-place[=SUFFIX]\n"
" edit files in place (makes backup if SUFFIX supplied)\n"
@@ -301,7 +709,7 @@ msgstr ""
" bestanden ter plekke bewerken\n"
" (en een reservekopie maken als een ACHTERVOEGSEL gegeven is)\n"
-#: sed/sed.c:121
+#: sed/sed.c:153
#, c-format
msgid ""
" -b, --binary\n"
@@ -312,7 +720,7 @@ msgstr ""
" bestanden openen in binaire modus (regeleinden zijn niet "
"speciaal)\n"
-#: sed/sed.c:124
+#: sed/sed.c:157
#, c-format
msgid ""
" -l N, --line-length=N\n"
@@ -321,7 +729,7 @@ msgstr ""
" -l AANTAL, --line-length=AANTAL\n"
" de gewenste regelafbreeklengte voor de 'l'-opdracht\n"
-#: sed/sed.c:126
+#: sed/sed.c:159
#, c-format
msgid ""
" --posix\n"
@@ -330,27 +738,37 @@ msgstr ""
" --posix\n"
" alle GNU-uitbreidingen uitschakelen\n"
-#: sed/sed.c:128
+#: sed/sed.c:161
#, c-format
msgid ""
-" -r, --regexp-extended\n"
-" use extended regular expressions in the script.\n"
+" -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"
" uitgebreide reguliere expressies gebruiken in het script\n"
+" (gebruik voor portabiliteit de POSIX-optie '-E')\n"
-#: sed/sed.c:133
+#: sed/sed.c:167
#, c-format
msgid ""
" -s, --separate\n"
-" consider files as separate rather than as a single "
-"continuous\n"
-" long stream.\n"
+" consider files as separate rather than as a single,\n"
+" continuous long stream.\n"
msgstr ""
" -s, --separate\n"
" bestanden als losstaand beschouwen, niet als één enkele stroom\n"
-#: sed/sed.c:136
+#: sed/sed.c:170
+#, c-format
+msgid ""
+" --sandbox\n"
+" operate in sandbox mode.\n"
+msgstr ""
+" --sandbox\n"
+" in sandbox-modus opereren\n"
+
+#: sed/sed.c:172
#, c-format
msgid ""
" -u, --unbuffered\n"
@@ -361,26 +779,28 @@ msgstr ""
" -u, --unbuffered\n"
" minimale hoeveelheden gegevens laden uit de invoerbestanden,\n"
" en de uitvoerbuffers vaker leegmaken\n"
-"\n"
-#: sed/sed.c:139
+#: sed/sed.c:175
#, c-format
msgid ""
" -z, --null-data\n"
" separate lines by NUL characters\n"
msgstr ""
+" -z, --null-data\n"
+" regels scheiden met NUL-tekens\n"
+"\n"
-#: sed/sed.c:141
+#: sed/sed.c:177
#, c-format
msgid " --help display this help and exit\n"
msgstr " --help deze hulptekst tonen en stoppen\n"
-#: sed/sed.c:142
+#: sed/sed.c:178
#, c-format
msgid " --version output version information and exit\n"
-msgstr " --version versie-informatie tonen en stoppen\n"
+msgstr " --version programmaversie tonen en stoppen\n"
-#: sed/sed.c:143
+#: sed/sed.c:179
#, c-format
msgid ""
"\n"
@@ -397,119 +817,58 @@ msgstr ""
"invoerbestanden gegeven zijn, wordt standaardinvoer gelezen.\n"
"\n"
-#: sed/utils.c:74 sed/utils.c:432
+#: sed/utils.c:73 sed/utils.c:384
#, c-format
msgid "cannot remove %s: %s"
msgstr "kan %s niet verwijderen: %s"
-#: sed/utils.c:144
+#: sed/utils.c:136
#, c-format
msgid "couldn't open file %s: %s"
msgstr "kan bestand %s niet openen: %s"
-#: sed/utils.c:167
+#: sed/utils.c:155
#, c-format
msgid "couldn't attach to %s: %s"
msgstr "kan niet aan %s aanhechten: %s"
-#: sed/utils.c:229
+#: sed/utils.c:192
#, c-format
-msgid "couldn't write %d item to %s: %s"
-msgid_plural "couldn't write %d items to %s: %s"
-msgstr[0] "kan %d item niet naar %s schrijven: %s"
-msgstr[1] "kan %d items niet naar %s schrijven: %s"
+msgid "couldn't write %llu item to %s: %s"
+msgid_plural "couldn't write %llu items to %s: %s"
+msgstr[0] "kan %llu item niet naar %s schrijven: %s"
+msgstr[1] "kan %llu items niet naar %s schrijven: %s"
-#: sed/utils.c:244 sed/utils.c:267
+#: sed/utils.c:204 sed/utils.c:223
#, c-format
msgid "read error on %s: %s"
msgstr "leesfout op %s: %s"
-#: sed/utils.c:372
+#: sed/utils.c:325
#, c-format
msgid "couldn't follow symlink %s: %s"
msgstr "kan symbolische koppeling %s niet volgen: %s"
-#: sed/utils.c:406
+#: sed/utils.c:359
#, c-format
msgid "cannot stat %s: %s"
msgstr "kan de status van %s niet opvragen: %s"
-#: sed/utils.c:437
+#: sed/utils.c:389
#, c-format
msgid "cannot rename %s: %s"
msgstr "kan %s niet hernoemen: %s"
-#: lib/regcomp.c:132
-msgid "Success"
-msgstr "Gelukt"
-
-#: lib/regcomp.c:135
-msgid "No match"
-msgstr "Geen overeenkomsten"
-
-#: lib/regcomp.c:138
-msgid "Invalid regular expression"
-msgstr "Ongeldige reguliere expressie"
-
-#: lib/regcomp.c:141
-msgid "Invalid collation character"
-msgstr "Ongeldig samengesteld teken"
-
-#: lib/regcomp.c:144
-msgid "Invalid character class name"
-msgstr "Ongeldige tekenklassenaam"
-
-#: lib/regcomp.c:147
-msgid "Trailing backslash"
-msgstr "Backslash aan het eind"
+#~ msgid "cannot specify modifiers on empty regexp"
+#~ msgstr "bij een lege reguliere expressie passen geen veranderaars"
-#: lib/regcomp.c:150
-msgid "Invalid back reference"
-msgstr "Ongeldige terugverwijzing"
-
-#: lib/regcomp.c:153
-msgid "Unmatched [ or [^"
-msgstr "Ongepaarde [ of [^"
-
-#: lib/regcomp.c:156
-msgid "Unmatched ( or \\("
-msgstr "Ongepaarde ( of \\("
-
-#: lib/regcomp.c:159
-msgid "Unmatched \\{"
-msgstr "Ongepaarde \\{"
-
-#: lib/regcomp.c:162
-msgid "Invalid content of \\{\\}"
-msgstr "Ongeldige inhoud van \\{\\}"
-
-#: lib/regcomp.c:165
-msgid "Invalid range end"
-msgstr "Ongeldig bereikeinde"
-
-#: lib/regcomp.c:168
-msgid "Memory exhausted"
-msgstr "Onvoldoende geheugen beschikbaar"
-
-#: lib/regcomp.c:171
-msgid "Invalid preceding regular expression"
-msgstr "Ongeldige voorafgaande reguliere expressie"
-
-#: lib/regcomp.c:174
-msgid "Premature end of regular expression"
-msgstr "Voortijdig einde van reguliere expressie"
-
-#: lib/regcomp.c:177
-msgid "Regular expression too big"
-msgstr "Reguliere expressie is te groot"
-
-#: lib/regcomp.c:180
-msgid "Unmatched ) or \\)"
-msgstr "Ongepaarde ) of \\)"
-
-#: lib/regcomp.c:705
-msgid "No previous regular expression"
-msgstr "Geen eerdere reguliere expressie"
+#~ msgid ""
+#~ "E-mail bug reports to: <%s>.\n"
+#~ "Be sure to include the word ``%s'' somewhere in the ``Subject:'' field.\n"
+#~ msgstr ""
+#~ "Rapporteer gebreken in het programma aan <%s>\n"
+#~ "met het woord \"%s\" ergens in de Onderwerp-regel;\n"
+#~ "meld fouten in de vertaling aan <vertaling@vrijschrift.org>.\n"
#~ msgid "super-sed version %s\n"
#~ msgstr "super-sed versie %s\n"
diff --git a/po/pl.gmo b/po/pl.gmo
index 04dfd61..a07ba0e 100644
--- a/po/pl.gmo
+++ b/po/pl.gmo
Binary files differ
diff --git a/po/pl.po b/po/pl.po
index 59d1544..b61db79 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: 2012-12-22 14:36+0100\n"
+"POT-Creation-Date: 2016-12-30 00:59-0800\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"
@@ -17,209 +17,596 @@ msgstr ""
"MIME-Version: 1.0\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=3; plural=(n==1 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 "
"|| n%100>=20) ? 1 : 2);\n"
-#: sed/compile.c:144
+#: lib/closeout.c:112
+msgid "write error"
+msgstr ""
+
+#: lib/copy-acl.c:54
+#, c-format
+msgid "preserving permissions for %s"
+msgstr ""
+
+#: lib/dfa.c:1025 lib/dfa.c:1028 lib/dfa.c:1047 lib/dfa.c:1057 lib/dfa.c:1070
+#: lib/dfa.c:1098 lib/dfa.c:1107 lib/dfa.c:1110 lib/dfa.c:1115 lib/dfa.c:1137
+#: lib/dfa.c:1140
+msgid "unbalanced ["
+msgstr ""
+
+#: lib/dfa.c:1083
+#, fuzzy
+msgid "invalid character class"
+msgstr "Nieprawidłowa nazwa klasy znaku"
+
+#: lib/dfa.c:1206
+msgid "character class syntax is [[:space:]], not [:space:]"
+msgstr ""
+
+#: lib/dfa.c:1275
+msgid "unfinished \\ escape"
+msgstr ""
+
+#: lib/dfa.c:1436
+#, fuzzy
+msgid "invalid content of \\{\\}"
+msgstr "Nieprawidłowa zawartość \\{\\}"
+
+#: lib/dfa.c:1439
+#, fuzzy
+msgid "regular expression too big"
+msgstr "Wyrażenie regularne jest zbyt duże"
+
+#: lib/dfa.c:1853
+msgid "unbalanced ("
+msgstr ""
+
+#: lib/dfa.c:1980
+msgid "no syntax specified"
+msgstr ""
+
+#: lib/dfa.c:1988
+msgid "unbalanced )"
+msgstr ""
+
+#: lib/error.c:191
+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 ""
+
+#: lib/getopt.c:654 lib/getopt.c:658
+#, c-format
+msgid "%s: option '--%s' doesn't allow an argument\n"
+msgstr ""
+
+#: 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:715 lib/getopt.c:734
+#, c-format
+msgid "%s: option '--%s' requires an argument\n"
+msgstr ""
+
+#: 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
+#, 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
+#, 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 "Pamięć wyczerpana"
+
+#. TRANSLATORS:
+#. Get translations for open and closing quotation marks.
+#. The message catalog should translate "`" to a left
+#. quotation mark suitable for the locale, and similarly for
+#. "'". For example, a French Unicode local should translate
+#. these to U+00AB (LEFT-POINTING DOUBLE ANGLE
+#. QUOTATION MARK), and U+00BB (RIGHT-POINTING DOUBLE ANGLE
+#. QUOTATION MARK), respectively.
+#.
+#. If the catalog has no translation, we will try to
+#. use Unicode U+2018 (LEFT SINGLE QUOTATION MARK) and
+#. Unicode U+2019 (RIGHT SINGLE QUOTATION MARK). If the
+#. current locale is not Unicode, locale_quoting_style
+#. will quote 'like this', and clocale_quoting_style will
+#. quote "like this". You should always include translations
+#. for "`" and "'" even if U+2018 and U+2019 are appropriate
+#. for your locale.
+#.
+#. If you don't know what to put here, please see
+#. <http://en.wikipedia.org/wiki/Quotation_marks_in_other_languages>
+#. and use glyphs suitable for your language.
+#: lib/quotearg.c:354
+msgid "`"
+msgstr ""
+
+#: lib/quotearg.c:355
+msgid "'"
+msgstr ""
+
+#: lib/regcomp.c:135
+msgid "Success"
+msgstr "Sukces"
+
+#: lib/regcomp.c:138
+msgid "No match"
+msgstr "Brak dopasowania"
+
+#: lib/regcomp.c:141
+msgid "Invalid regular expression"
+msgstr "Nieprawidłowe wyrażenie regularne"
+
+#: lib/regcomp.c:144
+msgid "Invalid collation character"
+msgstr "Nieprawidłowy znak porównania"
+
+#: lib/regcomp.c:147
+msgid "Invalid character class name"
+msgstr "Nieprawidłowa nazwa klasy znaku"
+
+#: lib/regcomp.c:150
+msgid "Trailing backslash"
+msgstr "Końcowy znak backslash"
+
+#: lib/regcomp.c:153
+msgid "Invalid back reference"
+msgstr "Nieprawidłowe odwołanie wsteczne"
+
+#: lib/regcomp.c:156
+#, fuzzy
+msgid "Unmatched [, [^, [:, [., or [="
+msgstr "Niedopasowany znak [ lub [^"
+
+#: lib/regcomp.c:159
+msgid "Unmatched ( or \\("
+msgstr "Niedopasowany znak ( lub \\("
+
+#: lib/regcomp.c:162
+msgid "Unmatched \\{"
+msgstr "Niedopasowany znak \\{"
+
+#: lib/regcomp.c:165
+msgid "Invalid content of \\{\\}"
+msgstr "Nieprawidłowa zawartość \\{\\}"
+
+#: lib/regcomp.c:168
+msgid "Invalid range end"
+msgstr "Nieprawidłowy koniec zakresu"
+
+#: lib/regcomp.c:171
+msgid "Memory exhausted"
+msgstr "Pamięć wyczerpana"
+
+#: lib/regcomp.c:174
+msgid "Invalid preceding regular expression"
+msgstr "Nieprawidłowe poprzedzające wyrażenie regularne"
+
+#: lib/regcomp.c:177
+msgid "Premature end of regular expression"
+msgstr "Przedwczesny koniec wyrażenia regularnego"
+
+#: lib/regcomp.c:180
+msgid "Regular expression too big"
+msgstr "Wyrażenie regularne jest zbyt duże"
+
+#: lib/regcomp.c:183
+msgid "Unmatched ) or \\)"
+msgstr "Niedopasowany znak ) lub \\)"
+
+#: lib/regcomp.c:687
+msgid "No previous regular expression"
+msgstr "Brak poprzedniego wyrażenia regularnego"
+
+#: lib/set-acl.c:46
+#, c-format
+msgid "setting permissions for %s"
+msgstr ""
+
+#: lib/version-etc.c:74
+#, c-format
+msgid "Packaged by %s (%s)\n"
+msgstr ""
+
+#: lib/version-etc.c:77
+#, c-format
+msgid "Packaged by %s\n"
+msgstr ""
+
+#. 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 ""
+
+#: lib/version-etc.c:86
+msgid ""
+"\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"
+msgstr ""
+
+#. TRANSLATORS: %s denotes an author name.
+#: lib/version-etc.c:102
+#, c-format
+msgid "Written by %s.\n"
+msgstr ""
+
+#. TRANSLATORS: Each %s denotes an author name.
+#: lib/version-etc.c:106
+#, c-format
+msgid "Written by %s and %s.\n"
+msgstr ""
+
+#. TRANSLATORS: Each %s denotes an author name.
+#: lib/version-etc.c:110
+#, c-format
+msgid "Written by %s, %s, and %s.\n"
+msgstr ""
+
+#. TRANSLATORS: Each %s denotes an author name.
+#. You can use line breaks, estimating that each author name occupies
+#. ca. 16 screen columns and that a screen line has ca. 80 columns.
+#: lib/version-etc.c:117
+#, c-format
+msgid ""
+"Written by %s, %s, %s,\n"
+"and %s.\n"
+msgstr ""
+
+#. TRANSLATORS: Each %s denotes an author name.
+#. You can use line breaks, estimating that each author name occupies
+#. ca. 16 screen columns and that a screen line has ca. 80 columns.
+#: lib/version-etc.c:124
+#, c-format
+msgid ""
+"Written by %s, %s, %s,\n"
+"%s, and %s.\n"
+msgstr ""
+
+#. TRANSLATORS: Each %s denotes an author name.
+#. You can use line breaks, estimating that each author name occupies
+#. ca. 16 screen columns and that a screen line has ca. 80 columns.
+#: lib/version-etc.c:131
+#, c-format
+msgid ""
+"Written by %s, %s, %s,\n"
+"%s, %s, and %s.\n"
+msgstr ""
+
+#. TRANSLATORS: Each %s denotes an author name.
+#. You can use line breaks, estimating that each author name occupies
+#. ca. 16 screen columns and that a screen line has ca. 80 columns.
+#: lib/version-etc.c:139
+#, c-format
+msgid ""
+"Written by %s, %s, %s,\n"
+"%s, %s, %s, and %s.\n"
+msgstr ""
+
+#. TRANSLATORS: Each %s denotes an author name.
+#. You can use line breaks, estimating that each author name occupies
+#. ca. 16 screen columns and that a screen line has ca. 80 columns.
+#: lib/version-etc.c:147
+#, c-format
+msgid ""
+"Written by %s, %s, %s,\n"
+"%s, %s, %s, %s,\n"
+"and %s.\n"
+msgstr ""
+
+#. TRANSLATORS: Each %s denotes an author name.
+#. You can use line breaks, estimating that each author name occupies
+#. ca. 16 screen columns and that a screen line has ca. 80 columns.
+#: lib/version-etc.c:156
+#, c-format
+msgid ""
+"Written by %s, %s, %s,\n"
+"%s, %s, %s, %s,\n"
+"%s, and %s.\n"
+msgstr ""
+
+#. TRANSLATORS: Each %s denotes an author name.
+#. You can use line breaks, estimating that each author name occupies
+#. ca. 16 screen columns and that a screen line has ca. 80 columns.
+#: lib/version-etc.c:167
+#, c-format
+msgid ""
+"Written by %s, %s, %s,\n"
+"%s, %s, %s, %s,\n"
+"%s, %s, and others.\n"
+msgstr ""
+
+#. TRANSLATORS: The placeholder indicates the bug-reporting address
+#. for this package. Please add _another line_ saying
+#. "Report translation bugs to <...>\n" with the address for translation
+#. bugs (typically your translation team's web or email address).
+#: lib/version-etc.c:245
+#, c-format
+msgid ""
+"\n"
+"Report bugs to: %s\n"
+msgstr ""
+
+#: lib/version-etc.c:247
+#, c-format
+msgid "Report %s bugs to: %s\n"
+msgstr ""
+
+#: lib/version-etc.c:251
+#, c-format
+msgid "%s home page: <%s>\n"
+msgstr ""
+
+#: lib/version-etc.c:253
+#, c-format
+msgid "%s home page: <http://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"
+msgstr ""
+"Strona projektu GNU sed: <http://www.gnu.org/software/sed/>.\n"
+"Pomoc dotycząca oprogramowania GNU: <http://www.gnu.org/gethelp/>.\n"
+
+#: sed/compile.c:146
msgid "multiple `!'s"
msgstr "wielokrotny znak `!'"
-#: sed/compile.c:145
+#: sed/compile.c:147
msgid "unexpected `,'"
msgstr "nieoczekiwany znak `,'"
-#: sed/compile.c:146
+#: sed/compile.c:149
msgid "invalid usage of +N or ~N as first address"
msgstr "nieprawidłowe użycie +N lub ~N jako pierwszego adresu"
-#: sed/compile.c:147
+#: sed/compile.c:150
msgid "unmatched `{'"
msgstr "niedopasowany znak `{'"
-#: sed/compile.c:148
+#: sed/compile.c:151
msgid "unexpected `}'"
msgstr "nieoczekiwany znak `}'"
-#: sed/compile.c:149
+#: sed/compile.c:153
msgid "extra characters after command"
msgstr "dodatkowe znaki po poleceniu"
-#: sed/compile.c:150
+#: sed/compile.c:155
msgid "expected \\ after `a', `c' or `i'"
msgstr "oczekiwano znaku \\ po `a', `c' lub `i'"
-#: sed/compile.c:151
+#: sed/compile.c:157
msgid "`}' doesn't want any addresses"
msgstr "`}' nie chce żadnych adresów"
-#: sed/compile.c:152
+#: sed/compile.c:159
msgid ": doesn't want any addresses"
msgstr ": nie chce żadnych adresów"
-#: sed/compile.c:153
+#: sed/compile.c:161
msgid "comments don't accept any addresses"
msgstr "komentarze nie akceptują żadnych adresów"
-#: sed/compile.c:154
+#: sed/compile.c:162
msgid "missing command"
msgstr "brakuje polecenia"
-#: sed/compile.c:155
+#: sed/compile.c:163
msgid "command only uses one address"
msgstr "polecenie używa tylko jednego adresu"
-#: sed/compile.c:156
+#: sed/compile.c:164
msgid "unterminated address regex"
msgstr "niezakończony adres wyrażenia regularnego"
-#: sed/compile.c:157
+#: sed/compile.c:165
msgid "unterminated `s' command"
msgstr "niezakończone polecenie `s'"
-#: sed/compile.c:158
+#: sed/compile.c:166
msgid "unterminated `y' command"
msgstr "niezakończone polecenie `y'"
-#: sed/compile.c:159
+#: sed/compile.c:167
msgid "unknown option to `s'"
msgstr "nieznana opcja dla polecenia `s'"
-#: sed/compile.c:160
+#: sed/compile.c:169
msgid "multiple `p' options to `s' command"
msgstr "wielokrotne opcje `p' dla polecenia `s'"
-#: sed/compile.c:161
+#: sed/compile.c:171
msgid "multiple `g' options to `s' command"
msgstr "wielokrotne opcje `g' dla polecenia `s'"
-#: sed/compile.c:162
+#: sed/compile.c:173
msgid "multiple number options to `s' command"
msgstr "wielokrotne opcje liczbowe dla polecenia `s'"
-#: sed/compile.c:163
+#: sed/compile.c:175
msgid "number option to `s' command may not be zero"
msgstr "opcja liczbowa dla polecenia `s' nie może być zerem"
-#: sed/compile.c:164
+#: sed/compile.c:177
msgid "strings for `y' command are different lengths"
msgstr "łańcuchy dla polecenia `y' są różnych długości"
-#: sed/compile.c:165
+#: sed/compile.c:179
msgid "delimiter character is not a single-byte character"
msgstr "znak ogranicznika nie jest pojedynczym znakiem-bajtem"
-#: sed/compile.c:166
+#: sed/compile.c:181
msgid "expected newer version of sed"
msgstr "oczekiwano nowszej wersji programu sed"
-#: sed/compile.c:167
+#: sed/compile.c:183
msgid "invalid usage of line address 0"
msgstr "nieprawidłowe użycie adresu linii 0"
-#: sed/compile.c:168
+#: sed/compile.c:184
#, c-format
msgid "unknown command: `%c'"
msgstr "nieznane polecenie: `%c'"
-#: sed/compile.c:169
+#: sed/compile.c:186
#, fuzzy
msgid "incomplete command"
msgstr "brakuje polecenia"
-#: sed/compile.c:192
+#: sed/compile.c:188
+msgid "\":\" lacks a label"
+msgstr ""
+
+#: sed/compile.c:190
+msgid "recursive escaping after \\c not allowed"
+msgstr ""
+
+#: sed/compile.c:213
#, c-format
msgid "%s: file %s line %lu: %s\n"
msgstr "%s: plik %s linia %lu: %s\n"
-#: sed/compile.c:195
+#: sed/compile.c:216
#, c-format
msgid "%s: -e expression #%lu, char %lu: %s\n"
msgstr "%s: -e wyrażenie #%lu, znak %lu: %s\n"
-#: sed/compile.c:1657
+#: sed/compile.c:1639
#, c-format
msgid "can't find label for jump to `%s'"
msgstr "nie można znaleźć etykiety dla skoku do `%s'"
-#: sed/execute.c:595
+#: sed/execute.c:264 sed/execute.c:281
+#, c-format
+msgid "case conversion produced an invalid character"
+msgstr ""
+
+#: sed/execute.c:575
#, c-format
msgid "%s: can't read %s: %s\n"
msgstr "%s: nie można odczytać %s: %s\n"
-#: sed/execute.c:624
+#: sed/execute.c:600
#, c-format
msgid "couldn't edit %s: is a terminal"
msgstr "nie można edytować %s: plik jest terminalem"
-#: sed/execute.c:629
+#: sed/execute.c:605
#, 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:640
+#: sed/execute.c:616
#, 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:647
+#: sed/execute.c:624
#, 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:664 sed/utils.c:211
+#: sed/execute.c:643 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:1193 sed/execute.c:1373
+#: sed/execute.c:1158 sed/execute.c:1368
msgid "error in subprocess"
msgstr "błąd w podprocesie"
-#: sed/execute.c:1195
+#: sed/execute.c:1160
msgid "option `e' not supported"
msgstr "opcja `e' nie jest wspierana"
-#: sed/execute.c:1375
+#: sed/execute.c:1349
msgid "`e' command not supported"
msgstr "polecenie `e' nie jest wspierane"
-#: sed/execute.c:1725
+#: sed/execute.c:1675
msgid "no input files"
msgstr "brak plików wejściowych"
-#: sed/regexp.c:39
+#: sed/regexp.c:38
msgid "no previous regular expression"
msgstr "brak poprzedniego wyrażenia regularnego"
-#: sed/regexp.c:40
-msgid "cannot specify modifiers on empty regexp"
-msgstr "nie można wyszczególnić modyfikatorów w pustym wyrażeniu regularnym"
-
-#: sed/regexp.c:129
+#: sed/regexp.c:138
#, c-format
msgid "invalid reference \\%d on `s' command's RHS"
msgstr "nieprawidłowe odwołanie \\%d po prawej stronie polecenia `s'"
-#: sed/sed.c:32
+#: sed/sed.c:35
msgid "Jay Fenlason"
msgstr ""
-#: sed/sed.c:33
+#: sed/sed.c:36
msgid "Tom Lord"
msgstr ""
-#: sed/sed.c:34
+#: sed/sed.c:37
msgid "Ken Pizzini"
msgstr ""
-#: sed/sed.c:35
+#: sed/sed.c:38
msgid "Paolo Bonzini"
msgstr ""
-#: sed/sed.c:79
+#: sed/sed.c:113
#, c-format
msgid ""
"GNU sed home page: <http://www.gnu.org/software/sed/>.\n"
@@ -228,16 +615,12 @@ msgstr ""
"Strona projektu GNU sed: <http://www.gnu.org/software/sed/>.\n"
"Pomoc dotycząca oprogramowania GNU: <http://www.gnu.org/gethelp/>.\n"
-#: sed/sed.c:86
+#: sed/sed.c:120
#, c-format
-msgid ""
-"E-mail bug reports to: <%s>.\n"
-"Be sure to include the word ``%s'' somewhere in the ``Subject:'' field.\n"
+msgid "E-mail bug reports to: <%s>.\n"
msgstr ""
-"Ewentualne błędy prosimy zgłaszać na adres: <%s>.\n"
-"W tym celu proszę dodać słowo ``%s'' do tematu listu.\n"
-#: sed/sed.c:99
+#: sed/sed.c:129
msgid ""
" -R, --regexp-perl\n"
" use Perl 5's regular expressions syntax in the script.\n"
@@ -246,7 +629,7 @@ msgstr ""
" używa w skrypcie wyrażenia regularne zgodne ze składnią "
"Perl 5.\n"
-#: sed/sed.c:104
+#: sed/sed.c:134
#, c-format
msgid ""
"Usage: %s [OPTION]... {script-only-if-no-other-script} [input-file]...\n"
@@ -256,7 +639,7 @@ msgstr ""
"wejściowy]...\n"
"\n"
-#: sed/sed.c:108
+#: sed/sed.c:138
#, c-format
msgid ""
" -n, --quiet, --silent\n"
@@ -265,7 +648,7 @@ msgstr ""
" -n, --quiet, --silent\n"
" powstrzymuje automatyczne drukowanie przetwarzanych linii.\n"
-#: sed/sed.c:110
+#: sed/sed.c:140
#, c-format
msgid ""
" -e script, --expression=script\n"
@@ -274,7 +657,7 @@ msgstr ""
" -e skrypt, --expression=skrypt\n"
" dodaje skrypt do poleceń, które mają być wykonane.\n"
-#: sed/sed.c:112
+#: sed/sed.c:142
#, c-format
msgid ""
" -f script-file, --file=script-file\n"
@@ -285,7 +668,7 @@ msgstr ""
" dodaje zawartość pliku skryptowego do poleceń,\n"
" które mają być wykonane.\n"
-#: sed/sed.c:115
+#: sed/sed.c:146
#, c-format
msgid ""
" --follow-symlinks\n"
@@ -295,7 +678,7 @@ msgstr ""
" podąża za dowiązaniami symbolicznymi,\n"
" gdy przetwarza \"w miejscu\".\n"
-#: sed/sed.c:118
+#: sed/sed.c:149
#, fuzzy, c-format
msgid ""
" -i[SUFFIX], --in-place[=SUFFIX]\n"
@@ -305,7 +688,7 @@ msgstr ""
" edytuje pliki \"w miejscu\" (tworzy kopie zapasowe\n"
" jeżeli zostało podane rozszerzenie).\n"
-#: sed/sed.c:121
+#: sed/sed.c:153
#, c-format
msgid ""
" -b, --binary\n"
@@ -316,7 +699,7 @@ msgstr ""
" otwiera pliki w trybie binarnym (CR+LF nie jest "
"przetwarzane).\n"
-#: sed/sed.c:124
+#: sed/sed.c:157
#, c-format
msgid ""
" -l N, --line-length=N\n"
@@ -325,7 +708,7 @@ msgstr ""
" -l N, --line-length=N\n"
" ustala pożądaną długość łamanych linii dla polecenia `l'.\n"
-#: sed/sed.c:126
+#: sed/sed.c:159
#, c-format
msgid ""
" --posix\n"
@@ -334,28 +717,35 @@ msgstr ""
" --posix\n"
" wyłącza wszystkie rozszerzenia GNU.\n"
-#: sed/sed.c:128
-#, c-format
+#: sed/sed.c:161
+#, fuzzy, c-format
msgid ""
-" -r, --regexp-extended\n"
-" use extended regular expressions in the script.\n"
+" -E, -r, --regexp-extended\n"
+" use extended regular expressions in the script\n"
+" (for portability use POSIX -E).\n"
msgstr ""
" -r, --regexp-extended\n"
" używa w skrypcie rozszerzonych wyrażeń regularnych.\n"
-#: sed/sed.c:133
-#, c-format
+#: sed/sed.c:167
+#, fuzzy, c-format
msgid ""
" -s, --separate\n"
-" consider files as separate rather than as a single "
-"continuous\n"
-" long stream.\n"
+" consider files as separate rather than as a single,\n"
+" continuous long stream.\n"
msgstr ""
" -s, --separate\n"
" traktuje pliki jako oddzielne, a nie jako pojedynczy,\n"
" długi i ciągły strumień.\n"
-#: sed/sed.c:136
+#: sed/sed.c:170
+#, c-format
+msgid ""
+" --sandbox\n"
+" operate in sandbox mode.\n"
+msgstr ""
+
+#: sed/sed.c:172
#, c-format
msgid ""
" -u, --unbuffered\n"
@@ -367,24 +757,24 @@ msgstr ""
" ładuje minimalną ilość danych z plików wejściowych\n"
" i częściej oczyszcza bufor wyjściowy.\n"
-#: sed/sed.c:139
+#: sed/sed.c:175
#, c-format
msgid ""
" -z, --null-data\n"
" separate lines by NUL characters\n"
msgstr ""
-#: sed/sed.c:141
+#: sed/sed.c:177
#, c-format
msgid " --help display this help and exit\n"
msgstr " --help wyświetla tę oto pomoc i kończy pracę.\n"
-#: sed/sed.c:142
+#: sed/sed.c:178
#, c-format
msgid " --version output version information and exit\n"
msgstr " --version wyświetla numer wersji i kończy pracę.\n"
-#: sed/sed.c:143
+#: sed/sed.c:179
#, c-format
msgid ""
"\n"
@@ -402,120 +792,58 @@ msgstr ""
"żadne pliki wejściowe, to wtedy odczytane zostanie standardowe wejście.\n"
"\n"
-#: sed/utils.c:74 sed/utils.c:432
+#: sed/utils.c:73 sed/utils.c:384
#, c-format
msgid "cannot remove %s: %s"
msgstr "nie można usunąć %s: %s"
-#: sed/utils.c:144
+#: sed/utils.c:136
#, c-format
msgid "couldn't open file %s: %s"
msgstr "nie można otworzyć pliku %s: %s"
-#: sed/utils.c:167
+#: sed/utils.c:155
#, c-format
msgid "couldn't attach to %s: %s"
msgstr "nie można dołączyć do %s: %s"
-#: sed/utils.c:229
-#, c-format
-msgid "couldn't write %d item to %s: %s"
-msgid_plural "couldn't write %d items to %s: %s"
+#: sed/utils.c:192
+#, fuzzy, c-format
+msgid "couldn't write %llu item to %s: %s"
+msgid_plural "couldn't write %llu items to %s: %s"
msgstr[0] "nie można zapisać %d elementu do %s: %s"
msgstr[1] "nie można zapisać %d elementów do %s: %s"
msgstr[2] "nie można zapisać %d elementów do %s: %s"
-#: sed/utils.c:244 sed/utils.c:267
+#: sed/utils.c:204 sed/utils.c:223
#, c-format
msgid "read error on %s: %s"
msgstr "błąd odczytu w %s: %s"
-#: sed/utils.c:372
+#: sed/utils.c:325
#, c-format
msgid "couldn't follow symlink %s: %s"
msgstr "nie można podążyć za dowiązaniem %s: %s"
-#: sed/utils.c:406
+#: sed/utils.c:359
#, c-format
msgid "cannot stat %s: %s"
msgstr "nie można uzyskać informacji o %s: %s"
-#: sed/utils.c:437
+#: sed/utils.c:389
#, c-format
msgid "cannot rename %s: %s"
msgstr "nie można zmienić nazwy %s: %s"
-#: lib/regcomp.c:132
-msgid "Success"
-msgstr "Sukces"
-
-#: lib/regcomp.c:135
-msgid "No match"
-msgstr "Brak dopasowania"
+#~ msgid "cannot specify modifiers on empty regexp"
+#~ msgstr "nie można wyszczególnić modyfikatorów w pustym wyrażeniu regularnym"
-#: lib/regcomp.c:138
-msgid "Invalid regular expression"
-msgstr "Nieprawidłowe wyrażenie regularne"
-
-#: lib/regcomp.c:141
-msgid "Invalid collation character"
-msgstr "Nieprawidłowy znak porównania"
-
-#: lib/regcomp.c:144
-msgid "Invalid character class name"
-msgstr "Nieprawidłowa nazwa klasy znaku"
-
-#: lib/regcomp.c:147
-msgid "Trailing backslash"
-msgstr "Końcowy znak backslash"
-
-#: lib/regcomp.c:150
-msgid "Invalid back reference"
-msgstr "Nieprawidłowe odwołanie wsteczne"
-
-#: lib/regcomp.c:153
-msgid "Unmatched [ or [^"
-msgstr "Niedopasowany znak [ lub [^"
-
-#: lib/regcomp.c:156
-msgid "Unmatched ( or \\("
-msgstr "Niedopasowany znak ( lub \\("
-
-#: lib/regcomp.c:159
-msgid "Unmatched \\{"
-msgstr "Niedopasowany znak \\{"
-
-#: lib/regcomp.c:162
-msgid "Invalid content of \\{\\}"
-msgstr "Nieprawidłowa zawartość \\{\\}"
-
-#: lib/regcomp.c:165
-msgid "Invalid range end"
-msgstr "Nieprawidłowy koniec zakresu"
-
-#: lib/regcomp.c:168
-msgid "Memory exhausted"
-msgstr "Pamięć wyczerpana"
-
-#: lib/regcomp.c:171
-msgid "Invalid preceding regular expression"
-msgstr "Nieprawidłowe poprzedzające wyrażenie regularne"
-
-#: lib/regcomp.c:174
-msgid "Premature end of regular expression"
-msgstr "Przedwczesny koniec wyrażenia regularnego"
-
-#: lib/regcomp.c:177
-msgid "Regular expression too big"
-msgstr "Wyrażenie regularne jest zbyt duże"
-
-#: lib/regcomp.c:180
-msgid "Unmatched ) or \\)"
-msgstr "Niedopasowany znak ) lub \\)"
-
-#: lib/regcomp.c:705
-msgid "No previous regular expression"
-msgstr "Brak poprzedniego wyrażenia regularnego"
+#~ msgid ""
+#~ "E-mail bug reports to: <%s>.\n"
+#~ "Be sure to include the word ``%s'' somewhere in the ``Subject:'' field.\n"
+#~ msgstr ""
+#~ "Ewentualne błędy prosimy zgłaszać na adres: <%s>.\n"
+#~ "W tym celu proszę dodać słowo ``%s'' do tematu listu.\n"
#~ msgid "super-sed version %s\n"
#~ msgstr "super-sed wersja %s\n"
diff --git a/po/pt.gmo b/po/pt.gmo
index 537492d..9eb683e 100644
--- a/po/pt.gmo
+++ b/po/pt.gmo
Binary files differ
diff --git a/po/pt.po b/po/pt.po
index 733e250..59581d5 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: 2012-12-22 14:36+0100\n"
+"POT-Creation-Date: 2016-12-30 00:59-0800\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"
@@ -15,221 +15,601 @@ msgstr ""
"MIME-Version: 1.0\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"
-#: sed/compile.c:144
+#: lib/closeout.c:112
+msgid "write error"
+msgstr ""
+
+#: lib/copy-acl.c:54
+#, c-format
+msgid "preserving permissions for %s"
+msgstr ""
+
+#: lib/dfa.c:1025 lib/dfa.c:1028 lib/dfa.c:1047 lib/dfa.c:1057 lib/dfa.c:1070
+#: lib/dfa.c:1098 lib/dfa.c:1107 lib/dfa.c:1110 lib/dfa.c:1115 lib/dfa.c:1137
+#: lib/dfa.c:1140
+msgid "unbalanced ["
+msgstr ""
+
+#: lib/dfa.c:1083
+#, fuzzy
+msgid "invalid character class"
+msgstr "Nome de classe de carácter inválido"
+
+#: lib/dfa.c:1206
+msgid "character class syntax is [[:space:]], not [:space:]"
+msgstr ""
+
+#: lib/dfa.c:1275
+msgid "unfinished \\ escape"
+msgstr ""
+
+#: lib/dfa.c:1436
+#, fuzzy
+msgid "invalid content of \\{\\}"
+msgstr "Conteúdo de \\{\\} inválido"
+
+#: lib/dfa.c:1439
+#, fuzzy
+msgid "regular expression too big"
+msgstr "Expressão regular demasiado grande"
+
+#: lib/dfa.c:1853
+msgid "unbalanced ("
+msgstr ""
+
+#: lib/dfa.c:1980
+msgid "no syntax specified"
+msgstr ""
+
+#: lib/dfa.c:1988
+msgid "unbalanced )"
+msgstr ""
+
+#: lib/error.c:191
+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 ""
+
+#: lib/getopt.c:654 lib/getopt.c:658
+#, c-format
+msgid "%s: option '--%s' doesn't allow an argument\n"
+msgstr ""
+
+#: 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:715 lib/getopt.c:734
+#, c-format
+msgid "%s: option '--%s' requires an argument\n"
+msgstr ""
+
+#: 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
+#, 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
+#, 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 "Memória esgotada"
+
+#. TRANSLATORS:
+#. Get translations for open and closing quotation marks.
+#. The message catalog should translate "`" to a left
+#. quotation mark suitable for the locale, and similarly for
+#. "'". For example, a French Unicode local should translate
+#. these to U+00AB (LEFT-POINTING DOUBLE ANGLE
+#. QUOTATION MARK), and U+00BB (RIGHT-POINTING DOUBLE ANGLE
+#. QUOTATION MARK), respectively.
+#.
+#. If the catalog has no translation, we will try to
+#. use Unicode U+2018 (LEFT SINGLE QUOTATION MARK) and
+#. Unicode U+2019 (RIGHT SINGLE QUOTATION MARK). If the
+#. current locale is not Unicode, locale_quoting_style
+#. will quote 'like this', and clocale_quoting_style will
+#. quote "like this". You should always include translations
+#. for "`" and "'" even if U+2018 and U+2019 are appropriate
+#. for your locale.
+#.
+#. If you don't know what to put here, please see
+#. <http://en.wikipedia.org/wiki/Quotation_marks_in_other_languages>
+#. and use glyphs suitable for your language.
+#: lib/quotearg.c:354
+msgid "`"
+msgstr ""
+
+#: lib/quotearg.c:355
+msgid "'"
+msgstr ""
+
+#: lib/regcomp.c:135
+msgid "Success"
+msgstr "Sucesso"
+
+#: lib/regcomp.c:138
+msgid "No match"
+msgstr "Sem correspondência"
+
+#: lib/regcomp.c:141
+msgid "Invalid regular expression"
+msgstr "Expressão regular inválida"
+
+#: lib/regcomp.c:144
+msgid "Invalid collation character"
+msgstr "Caráter inválido"
+
+#: lib/regcomp.c:147
+msgid "Invalid character class name"
+msgstr "Nome de classe de carácter inválido"
+
+#: lib/regcomp.c:150
+msgid "Trailing backslash"
+msgstr "'Backslash' no final"
+
+#: lib/regcomp.c:153
+msgid "Invalid back reference"
+msgstr "Referência de recuo inválida"
+
+#: lib/regcomp.c:156
+#, fuzzy
+msgid "Unmatched [, [^, [:, [., or [="
+msgstr "[ ou [^ não correspondido"
+
+#: lib/regcomp.c:159
+msgid "Unmatched ( or \\("
+msgstr "( ou \\( não correspondido"
+
+#: lib/regcomp.c:162
+msgid "Unmatched \\{"
+msgstr "\\{ não correspondido"
+
+#: lib/regcomp.c:165
+msgid "Invalid content of \\{\\}"
+msgstr "Conteúdo de \\{\\} inválido"
+
+#: lib/regcomp.c:168
+msgid "Invalid range end"
+msgstr "Limite de intervalo inválido"
+
+#: lib/regcomp.c:171
+msgid "Memory exhausted"
+msgstr "Memória esgotada"
+
+#: lib/regcomp.c:174
+msgid "Invalid preceding regular expression"
+msgstr "Expressão regular precedente inválida"
+
+#: lib/regcomp.c:177
+msgid "Premature end of regular expression"
+msgstr "Fim prematuro de expressão regular"
+
+#: lib/regcomp.c:180
+msgid "Regular expression too big"
+msgstr "Expressão regular demasiado grande"
+
+#: lib/regcomp.c:183
+msgid "Unmatched ) or \\)"
+msgstr ") ou \\) não correspondido"
+
+#: lib/regcomp.c:687
+msgid "No previous regular expression"
+msgstr "Expressão regular anterior não existente"
+
+#: lib/set-acl.c:46
+#, c-format
+msgid "setting permissions for %s"
+msgstr ""
+
+#: lib/version-etc.c:74
+#, c-format
+msgid "Packaged by %s (%s)\n"
+msgstr ""
+
+#: lib/version-etc.c:77
+#, c-format
+msgid "Packaged by %s\n"
+msgstr ""
+
+#. 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 ""
+
+#: lib/version-etc.c:86
+msgid ""
+"\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"
+msgstr ""
+
+#. TRANSLATORS: %s denotes an author name.
+#: lib/version-etc.c:102
+#, c-format
+msgid "Written by %s.\n"
+msgstr ""
+
+#. TRANSLATORS: Each %s denotes an author name.
+#: lib/version-etc.c:106
+#, c-format
+msgid "Written by %s and %s.\n"
+msgstr ""
+
+#. TRANSLATORS: Each %s denotes an author name.
+#: lib/version-etc.c:110
+#, c-format
+msgid "Written by %s, %s, and %s.\n"
+msgstr ""
+
+#. TRANSLATORS: Each %s denotes an author name.
+#. You can use line breaks, estimating that each author name occupies
+#. ca. 16 screen columns and that a screen line has ca. 80 columns.
+#: lib/version-etc.c:117
+#, c-format
+msgid ""
+"Written by %s, %s, %s,\n"
+"and %s.\n"
+msgstr ""
+
+#. TRANSLATORS: Each %s denotes an author name.
+#. You can use line breaks, estimating that each author name occupies
+#. ca. 16 screen columns and that a screen line has ca. 80 columns.
+#: lib/version-etc.c:124
+#, c-format
+msgid ""
+"Written by %s, %s, %s,\n"
+"%s, and %s.\n"
+msgstr ""
+
+#. TRANSLATORS: Each %s denotes an author name.
+#. You can use line breaks, estimating that each author name occupies
+#. ca. 16 screen columns and that a screen line has ca. 80 columns.
+#: lib/version-etc.c:131
+#, c-format
+msgid ""
+"Written by %s, %s, %s,\n"
+"%s, %s, and %s.\n"
+msgstr ""
+
+#. TRANSLATORS: Each %s denotes an author name.
+#. You can use line breaks, estimating that each author name occupies
+#. ca. 16 screen columns and that a screen line has ca. 80 columns.
+#: lib/version-etc.c:139
+#, c-format
+msgid ""
+"Written by %s, %s, %s,\n"
+"%s, %s, %s, and %s.\n"
+msgstr ""
+
+#. TRANSLATORS: Each %s denotes an author name.
+#. You can use line breaks, estimating that each author name occupies
+#. ca. 16 screen columns and that a screen line has ca. 80 columns.
+#: lib/version-etc.c:147
+#, c-format
+msgid ""
+"Written by %s, %s, %s,\n"
+"%s, %s, %s, %s,\n"
+"and %s.\n"
+msgstr ""
+
+#. TRANSLATORS: Each %s denotes an author name.
+#. You can use line breaks, estimating that each author name occupies
+#. ca. 16 screen columns and that a screen line has ca. 80 columns.
+#: lib/version-etc.c:156
+#, c-format
+msgid ""
+"Written by %s, %s, %s,\n"
+"%s, %s, %s, %s,\n"
+"%s, and %s.\n"
+msgstr ""
+
+#. TRANSLATORS: Each %s denotes an author name.
+#. You can use line breaks, estimating that each author name occupies
+#. ca. 16 screen columns and that a screen line has ca. 80 columns.
+#: lib/version-etc.c:167
+#, c-format
+msgid ""
+"Written by %s, %s, %s,\n"
+"%s, %s, %s, %s,\n"
+"%s, %s, and others.\n"
+msgstr ""
+
+#. TRANSLATORS: The placeholder indicates the bug-reporting address
+#. for this package. Please add _another line_ saying
+#. "Report translation bugs to <...>\n" with the address for translation
+#. bugs (typically your translation team's web or email address).
+#: lib/version-etc.c:245
+#, c-format
+msgid ""
+"\n"
+"Report bugs to: %s\n"
+msgstr ""
+
+#: lib/version-etc.c:247
+#, c-format
+msgid "Report %s bugs to: %s\n"
+msgstr ""
+
+#: lib/version-etc.c:251
+#, c-format
+msgid "%s home page: <%s>\n"
+msgstr ""
+
+#: lib/version-etc.c:253
+#, c-format
+msgid "%s home page: <http://www.gnu.org/software/%s/>\n"
+msgstr ""
+
+#: lib/version-etc.c:256
+msgid "General help using GNU software: <http://www.gnu.org/gethelp/>\n"
+msgstr ""
+
+#: sed/compile.c:146
msgid "multiple `!'s"
msgstr "múltiplos \"!\"s"
-#: sed/compile.c:145
+#: sed/compile.c:147
msgid "unexpected `,'"
msgstr "',' inesperada"
-#: sed/compile.c:146
+#: sed/compile.c:149
msgid "invalid usage of +N or ~N as first address"
msgstr "uso inválido de +N ou ~N como primeiro endereço"
-#: sed/compile.c:147
+#: sed/compile.c:150
msgid "unmatched `{'"
msgstr "\"{\" sem correspondência"
-#: sed/compile.c:148
+#: sed/compile.c:151
msgid "unexpected `}'"
msgstr "'{' inesperado"
-#: sed/compile.c:149
+#: sed/compile.c:153
msgid "extra characters after command"
msgstr "caracteres extra após comando"
-#: sed/compile.c:150
+#: sed/compile.c:155
msgid "expected \\ after `a', `c' or `i'"
msgstr "\\ esperado após 'a', 'c' ou 'i'"
-#: sed/compile.c:151
+#: sed/compile.c:157
msgid "`}' doesn't want any addresses"
msgstr "'}' não quer quaisquer endereços"
-#: sed/compile.c:152
+#: sed/compile.c:159
msgid ": doesn't want any addresses"
msgstr ": não quer quaisquer endereços"
-#: sed/compile.c:153
+#: sed/compile.c:161
msgid "comments don't accept any addresses"
msgstr "comentários não aceitam quaisquer endereços"
-#: sed/compile.c:154
+#: sed/compile.c:162
msgid "missing command"
msgstr "comando em falta"
-#: sed/compile.c:155
+#: sed/compile.c:163
msgid "command only uses one address"
msgstr "comando usa apenas um endereço"
-#: sed/compile.c:156
+#: sed/compile.c:164
msgid "unterminated address regex"
msgstr "expressão regular de endereço não concluída"
-#: sed/compile.c:157
+#: sed/compile.c:165
msgid "unterminated `s' command"
msgstr "comando 's' não concluído"
-#: sed/compile.c:158
+#: sed/compile.c:166
msgid "unterminated `y' command"
msgstr "comando 'y' não concluído"
-#: sed/compile.c:159
+#: sed/compile.c:167
msgid "unknown option to `s'"
msgstr "opção desconhecida para 's'"
-#: sed/compile.c:160
+#: sed/compile.c:169
msgid "multiple `p' options to `s' command"
msgstr "múltiplas opções 'p' para comando 's'"
-#: sed/compile.c:161
+#: sed/compile.c:171
msgid "multiple `g' options to `s' command"
msgstr "múltiplas opções 'g' para comando 's'"
-#: sed/compile.c:162
+#: sed/compile.c:173
msgid "multiple number options to `s' command"
msgstr "múltiplas opções de número para comando 's'"
-#: sed/compile.c:163
+#: sed/compile.c:175
msgid "number option to `s' command may not be zero"
msgstr "opção de número para comando 's' pode não ser zero"
-#: sed/compile.c:164
+#: sed/compile.c:177
msgid "strings for `y' command are different lengths"
msgstr "cadeias para o comando 'y' têm comprimentos diferentes"
-#: sed/compile.c:165
+#: sed/compile.c:179
msgid "delimiter character is not a single-byte character"
msgstr "carácter delimitador não tem um único 'byte'"
-#: sed/compile.c:166
+#: sed/compile.c:181
msgid "expected newer version of sed"
msgstr "esperada versão mais recente do sed"
-#: sed/compile.c:167
+#: sed/compile.c:183
msgid "invalid usage of line address 0"
msgstr "uso inválido do endereço de linha 0"
-#: sed/compile.c:168
+#: sed/compile.c:184
#, c-format
msgid "unknown command: `%c'"
msgstr "comando desconhecido: '%c'"
-#: sed/compile.c:169
+#: sed/compile.c:186
#, fuzzy
msgid "incomplete command"
msgstr "comando em falta"
-#: sed/compile.c:192
+#: sed/compile.c:188
+msgid "\":\" lacks a label"
+msgstr ""
+
+#: sed/compile.c:190
+msgid "recursive escaping after \\c not allowed"
+msgstr ""
+
+#: sed/compile.c:213
#, c-format
msgid "%s: file %s line %lu: %s\n"
msgstr "%s: ficheiro %s linha %lu: %s\n"
-#: sed/compile.c:195
+#: sed/compile.c:216
#, c-format
msgid "%s: -e expression #%lu, char %lu: %s\n"
msgstr "%s: -e expressão #%lu, carácter %lu: %s\n"
-#: sed/compile.c:1657
+#: sed/compile.c:1639
#, c-format
msgid "can't find label for jump to `%s'"
msgstr "etiqueta para saltar para '%s' não encontrada"
-#: sed/execute.c:595
+#: sed/execute.c:264 sed/execute.c:281
+#, c-format
+msgid "case conversion produced an invalid character"
+msgstr ""
+
+#: sed/execute.c:575
#, c-format
msgid "%s: can't read %s: %s\n"
msgstr "%s: não é possível ler %s: %s\n"
-#: sed/execute.c:624
+#: sed/execute.c:600
#, c-format
msgid "couldn't edit %s: is a terminal"
msgstr "não foi possível editar %s: é um terminal"
-#: sed/execute.c:629
+#: sed/execute.c:605
#, 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:640
+#: sed/execute.c:616
#, c-format
msgid "%s: warning: failed to set default file creation context to %s: %s"
msgstr ""
-#: sed/execute.c:647
+#: sed/execute.c:624
#, c-format
msgid "%s: warning: failed to get security context of %s: %s"
msgstr ""
-#: sed/execute.c:664 sed/utils.c:211
+#: sed/execute.c:643 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:1193 sed/execute.c:1373
+#: sed/execute.c:1158 sed/execute.c:1368
msgid "error in subprocess"
msgstr "erro no subprocesso"
-#: sed/execute.c:1195
+#: sed/execute.c:1160
msgid "option `e' not supported"
msgstr "opção 'e' não suportada"
-#: sed/execute.c:1375
+#: sed/execute.c:1349
msgid "`e' command not supported"
msgstr "comando 'e' não suportado"
-#: sed/execute.c:1725
+#: sed/execute.c:1675
msgid "no input files"
msgstr "nenhum ficheiro de entrada"
-#: sed/regexp.c:39
+#: sed/regexp.c:38
msgid "no previous regular expression"
msgstr "não há expressão regular anterior"
-#: sed/regexp.c:40
-msgid "cannot specify modifiers on empty regexp"
-msgstr "não é possível especificar modificadores numa expressão regular vazia"
-
-#: sed/regexp.c:129
+#: sed/regexp.c:138
#, c-format
msgid "invalid reference \\%d on `s' command's RHS"
msgstr "referência \\%d inválida no RHS do comando 's'"
-#: sed/sed.c:32
+#: sed/sed.c:35
msgid "Jay Fenlason"
msgstr ""
-#: sed/sed.c:33
+#: sed/sed.c:36
msgid "Tom Lord"
msgstr ""
-#: sed/sed.c:34
+#: sed/sed.c:37
msgid "Ken Pizzini"
msgstr ""
-#: sed/sed.c:35
+#: sed/sed.c:38
msgid "Paolo Bonzini"
msgstr ""
-#: sed/sed.c:79
+#: 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"
msgstr ""
-#: sed/sed.c:86
-#, fuzzy, c-format
-msgid ""
-"E-mail bug reports to: <%s>.\n"
-"Be sure to include the word ``%s'' somewhere in the ``Subject:'' field.\n"
+#: sed/sed.c:120
+#, c-format
+msgid "E-mail bug reports to: <%s>.\n"
msgstr ""
-"Envie erros encontrados para: %s .\n"
-"Certifique-se que inclui a palavra '%s' no campo 'Assunto:'.\n"
-#: sed/sed.c:99
+#: sed/sed.c:129
msgid ""
" -R, --regexp-perl\n"
" use Perl 5's regular expressions syntax in the script.\n"
@@ -237,7 +617,7 @@ msgstr ""
" -R, --regexp-perl\n"
" usar sintaxe expressões regulares Perl 5 no 'script'.\n"
-#: sed/sed.c:104
+#: sed/sed.c:134
#, c-format
msgid ""
"Usage: %s [OPTION]... {script-only-if-no-other-script} [input-file]...\n"
@@ -247,7 +627,7 @@ msgstr ""
"[ficheiro-de-entrada]...\n"
"\n"
-#: sed/sed.c:108
+#: sed/sed.c:138
#, c-format
msgid ""
" -n, --quiet, --silent\n"
@@ -256,7 +636,7 @@ msgstr ""
" -n, --quiet, --silent\n"
" elimir exibição automática do espaço de padrões\n"
-#: sed/sed.c:110
+#: sed/sed.c:140
#, c-format
msgid ""
" -e script, --expression=script\n"
@@ -265,7 +645,7 @@ msgstr ""
" -e script, --expression=script\n"
" adicionar o 'script' aos comandos a serem executados\n"
-#: sed/sed.c:112
+#: sed/sed.c:142
#, c-format
msgid ""
" -f script-file, --file=script-file\n"
@@ -276,7 +656,7 @@ msgstr ""
" adicionar os conteúdos de 'script' aos comandos a serem "
"executados\n"
-#: sed/sed.c:115
+#: sed/sed.c:146
#, c-format
msgid ""
" --follow-symlinks\n"
@@ -285,7 +665,7 @@ msgstr ""
" --follow-symlinks\n"
" wguir ligações simbólicas ao processar no lugar\n"
-#: sed/sed.c:118
+#: sed/sed.c:149
#, fuzzy, c-format
msgid ""
" -i[SUFFIX], --in-place[=SUFFIX]\n"
@@ -295,7 +675,7 @@ msgstr ""
" editar ficheiros no lugar (salvaguarda se extensão "
"fornecida)\n"
-#: sed/sed.c:121
+#: sed/sed.c:153
#, c-format
msgid ""
" -b, --binary\n"
@@ -306,7 +686,7 @@ msgstr ""
" abrir ficheiros em modo binário (CR+LFs não são processados "
"de forma especial)\n"
-#: sed/sed.c:124
+#: sed/sed.c:157
#, c-format
msgid ""
" -l N, --line-length=N\n"
@@ -315,7 +695,7 @@ msgstr ""
" -l N, --line-length=N\n"
" especificar comprimento de linha desejado no comando 'l'\n"
-#: sed/sed.c:126
+#: sed/sed.c:159
#, c-format
msgid ""
" --posix\n"
@@ -324,28 +704,35 @@ msgstr ""
" --posix\n"
" desactivar todas as extensões GNU.\n"
-#: sed/sed.c:128
-#, c-format
+#: sed/sed.c:161
+#, fuzzy, c-format
msgid ""
-" -r, --regexp-extended\n"
-" use extended regular expressions in the script.\n"
+" -E, -r, --regexp-extended\n"
+" use extended regular expressions in the script\n"
+" (for portability use POSIX -E).\n"
msgstr ""
" -r, --regexp-extended\n"
" usar expressões regulares extendidas no 'script'.\n"
-#: sed/sed.c:133
-#, c-format
+#: sed/sed.c:167
+#, fuzzy, c-format
msgid ""
" -s, --separate\n"
-" consider files as separate rather than as a single "
-"continuous\n"
-" long stream.\n"
+" consider files as separate rather than as a single,\n"
+" continuous long stream.\n"
msgstr ""
" -s, --separate\n"
" considerar ficheiros como separados em vez de uma única "
"longa corrente contínua.\n"
-#: sed/sed.c:136
+#: sed/sed.c:170
+#, c-format
+msgid ""
+" --sandbox\n"
+" operate in sandbox mode.\n"
+msgstr ""
+
+#: sed/sed.c:172
#, c-format
msgid ""
" -u, --unbuffered\n"
@@ -357,24 +744,24 @@ msgstr ""
" carregar quantidades mínimas de dados dos ficheiros de "
"entrada e despejar mais frequentemente a memória temporária de saída\n"
-#: sed/sed.c:139
+#: sed/sed.c:175
#, c-format
msgid ""
" -z, --null-data\n"
" separate lines by NUL characters\n"
msgstr ""
-#: sed/sed.c:141
+#: sed/sed.c:177
#, c-format
msgid " --help display this help and exit\n"
msgstr " --help exibir esta ajuda e sair\n"
-#: sed/sed.c:142
+#: sed/sed.c:178
#, c-format
msgid " --version output version information and exit\n"
msgstr " --version exibir informação de versão e sair\n"
-#: sed/sed.c:143
+#: sed/sed.c:179
#, c-format
msgid ""
"\n"
@@ -393,119 +780,58 @@ msgstr ""
"ficheiros de entrada, então, a entrada padrão (standard input) é lida.\n"
"\n"
-#: sed/utils.c:74 sed/utils.c:432
+#: sed/utils.c:73 sed/utils.c:384
#, c-format
msgid "cannot remove %s: %s"
msgstr "não é possível remover %s: %s"
-#: sed/utils.c:144
+#: sed/utils.c:136
#, c-format
msgid "couldn't open file %s: %s"
msgstr "não foi possível abrir o ficheiro %s: %s"
-#: sed/utils.c:167
+#: sed/utils.c:155
#, c-format
msgid "couldn't attach to %s: %s"
msgstr "não foi possível anexar a %s: %s"
-#: sed/utils.c:229
-#, c-format
-msgid "couldn't write %d item to %s: %s"
-msgid_plural "couldn't write %d items to %s: %s"
+#: sed/utils.c:192
+#, fuzzy, c-format
+msgid "couldn't write %llu item to %s: %s"
+msgid_plural "couldn't write %llu items to %s: %s"
msgstr[0] "não foi possível escrever o %d item para %s: %s"
msgstr[1] "não foi possível escrever %d items para %s: %s"
-#: sed/utils.c:244 sed/utils.c:267
+#: sed/utils.c:204 sed/utils.c:223
#, c-format
msgid "read error on %s: %s"
msgstr "erro de leitura em %s: %s"
-#: sed/utils.c:372
+#: sed/utils.c:325
#, c-format
msgid "couldn't follow symlink %s: %s"
msgstr "não foi possível eguir a ligação simbólica %s: %s"
-#: sed/utils.c:406
+#: sed/utils.c:359
#, c-format
msgid "cannot stat %s: %s"
msgstr "não é possível obter informações de %s: %s"
-#: sed/utils.c:437
+#: sed/utils.c:389
#, c-format
msgid "cannot rename %s: %s"
msgstr "não é possível renomear %s: %s"
-#: lib/regcomp.c:132
-msgid "Success"
-msgstr "Sucesso"
-
-#: lib/regcomp.c:135
-msgid "No match"
-msgstr "Sem correspondência"
-
-#: lib/regcomp.c:138
-msgid "Invalid regular expression"
-msgstr "Expressão regular inválida"
-
-#: lib/regcomp.c:141
-msgid "Invalid collation character"
-msgstr "Caráter inválido"
-
-#: lib/regcomp.c:144
-msgid "Invalid character class name"
-msgstr "Nome de classe de carácter inválido"
-
-#: lib/regcomp.c:147
-msgid "Trailing backslash"
-msgstr "'Backslash' no final"
-
-#: lib/regcomp.c:150
-msgid "Invalid back reference"
-msgstr "Referência de recuo inválida"
-
-#: lib/regcomp.c:153
-msgid "Unmatched [ or [^"
-msgstr "[ ou [^ não correspondido"
-
-#: lib/regcomp.c:156
-msgid "Unmatched ( or \\("
-msgstr "( ou \\( não correspondido"
-
-#: lib/regcomp.c:159
-msgid "Unmatched \\{"
-msgstr "\\{ não correspondido"
-
-#: lib/regcomp.c:162
-msgid "Invalid content of \\{\\}"
-msgstr "Conteúdo de \\{\\} inválido"
-
-#: lib/regcomp.c:165
-msgid "Invalid range end"
-msgstr "Limite de intervalo inválido"
-
-#: lib/regcomp.c:168
-msgid "Memory exhausted"
-msgstr "Memória esgotada"
-
-#: lib/regcomp.c:171
-msgid "Invalid preceding regular expression"
-msgstr "Expressão regular precedente inválida"
-
-#: lib/regcomp.c:174
-msgid "Premature end of regular expression"
-msgstr "Fim prematuro de expressão regular"
-
-#: lib/regcomp.c:177
-msgid "Regular expression too big"
-msgstr "Expressão regular demasiado grande"
-
-#: lib/regcomp.c:180
-msgid "Unmatched ) or \\)"
-msgstr ") ou \\) não correspondido"
+#~ msgid "cannot specify modifiers on empty regexp"
+#~ msgstr ""
+#~ "não é possível especificar modificadores numa expressão regular vazia"
-#: lib/regcomp.c:705
-msgid "No previous regular expression"
-msgstr "Expressão regular anterior não existente"
+#~ msgid ""
+#~ "E-mail bug reports to: %s .\n"
+#~ "Be sure to include the word ``%s'' somewhere in the ``Subject:'' field.\n"
+#~ msgstr ""
+#~ "Envie erros encontrados para: %s .\n"
+#~ "Certifique-se que inclui a palavra '%s' no campo 'Assunto:'.\n"
#~ msgid "super-sed version %s\n"
#~ msgstr "super-sed versão %s\n"
diff --git a/po/pt_BR.gmo b/po/pt_BR.gmo
index fc7de7d..51951f6 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 d368ff8..4231ba6 100644
--- a/po/pt_BR.po
+++ b/po/pt_BR.po
@@ -1,223 +1,627 @@
-# Tradues para o portugus do Brasil das mensagens de erro do sed
-# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
+# Traduções para o português do Brasil das mensagens de erro do sed
+# Copyright (C) 2016 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.
# Aurelio Jargas <verde@aurelio.net>, 1999-2010.
-#
-# Traduo original da verso 4.01:
-# Juan Carlos Castro y Castro <jcastro@vialink.com.br>, 2002.
-#
+# Rafael Fontenelle <rffontenelle@gmail.com>, 2016.
msgid ""
msgstr ""
-"Project-Id-Version: sed 4.2.1\n"
+"Project-Id-Version: sed 4.2.2.177\n"
"Report-Msgid-Bugs-To: bug-gnu-utils@gnu.org\n"
-"POT-Creation-Date: 2012-12-22 14:36+0100\n"
-"PO-Revision-Date: 2010-07-23 09:21-0300\n"
-"Last-Translator: Aurelio Jargas <verde@aurelio.net>\n"
-"Language-Team: Brazilian Portuguese <ldp-br@bazar.conectiva.com.br>\n"
+"POT-Creation-Date: 2016-12-30 00:59-0800\n"
+"PO-Revision-Date: 2016-12-06 23:48-0200\n"
+"Last-Translator: Rafael Fontenelle <rffontenelle@gmail.com>\n"
+"Language-Team: Brazilian Portuguese <ldpbr-translation@lists.sourceforge."
+"net>\n"
"Language: pt_BR\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"
"Plural-Forms: nplurals=2; plural=(n > 1);\n"
+"X-Generator: Virtaal 1.0.0-beta1\n"
+"X-Bugs: Report translation errors to the Language-Team address.\n"
-#: sed/compile.c:144
+#: lib/closeout.c:112
+msgid "write error"
+msgstr "erro de escrita"
+
+#: lib/copy-acl.c:54
+#, c-format
+msgid "preserving permissions for %s"
+msgstr "preservando permissões para %s"
+
+#: lib/dfa.c:1025 lib/dfa.c:1028 lib/dfa.c:1047 lib/dfa.c:1057 lib/dfa.c:1070
+#: lib/dfa.c:1098 lib/dfa.c:1107 lib/dfa.c:1110 lib/dfa.c:1115 lib/dfa.c:1137
+#: lib/dfa.c:1140
+msgid "unbalanced ["
+msgstr "[ sem correspondente"
+
+#: lib/dfa.c:1083
+msgid "invalid character class"
+msgstr "classe de caracteres inválida"
+
+#: lib/dfa.c:1206
+msgid "character class syntax is [[:space:]], not [:space:]"
+msgstr "a sintaxe de classe de caracteres é [[:space:]], e não [:space:]"
+
+#: lib/dfa.c:1275
+msgid "unfinished \\ escape"
+msgstr "escape \\ não terminado"
+
+#: lib/dfa.c:1436
+msgid "invalid content of \\{\\}"
+msgstr "conteúdo inválido de \\{\\}"
+
+#: lib/dfa.c:1439
+msgid "regular expression too big"
+msgstr "expressão regular grande demais"
+
+#: lib/dfa.c:1853
+msgid "unbalanced ("
+msgstr "( sem correspondente"
+
+#: lib/dfa.c:1980
+msgid "no syntax specified"
+msgstr "nenhuma sintaxe especificada"
+
+#: lib/dfa.c:1988
+msgid "unbalanced )"
+msgstr ") sem correspondente"
+
+#: lib/error.c:191
+msgid "Unknown system error"
+msgstr "Erro desconhecido de sistema"
+
+#: lib/getopt.c:575 lib/getopt.c:604
+#, c-format
+msgid "%s: option '%s' is ambiguous; possibilities:"
+msgstr "%s: a opção \"%s\" é ambígua; possibilidades:"
+
+#: lib/getopt.c:619
+#, c-format
+msgid "%s: option '%s' is ambiguous\n"
+msgstr "%s: a opção \"%s\" é ambígua\n"
+
+#: lib/getopt.c:654 lib/getopt.c:658
+#, c-format
+msgid "%s: option '--%s' doesn't allow an argument\n"
+msgstr "%s: a opção \"--%s\" não permite um argumento\n"
+
+#: lib/getopt.c:667 lib/getopt.c:672
+#, 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"
+
+#: lib/getopt.c:715 lib/getopt.c:734
+#, c-format
+msgid "%s: option '--%s' requires an argument\n"
+msgstr "%s: a opção \"--%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 não reconhecida \"--%s\"\n"
+
+#: lib/getopt.c:783 lib/getopt.c:786
+#, c-format
+msgid "%s: unrecognized option '%c%s'\n"
+msgstr "%s: opção não reconhecida '%c%s'\n"
+
+#: lib/getopt.c:835 lib/getopt.c:838
+#, 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
+#, c-format
+msgid "%s: option requires an argument -- '%c'\n"
+msgstr "%s: a opção requer 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\" requer um argumento\n"
+
+#: lib/obstack.c:338 lib/obstack.c:340 lib/xalloc-die.c:34
+msgid "memory exhausted"
+msgstr "memória esgotada"
+
+#. TRANSLATORS:
+#. Get translations for open and closing quotation marks.
+#. The message catalog should translate "`" to a left
+#. quotation mark suitable for the locale, and similarly for
+#. "'". For example, a French Unicode local should translate
+#. these to U+00AB (LEFT-POINTING DOUBLE ANGLE
+#. QUOTATION MARK), and U+00BB (RIGHT-POINTING DOUBLE ANGLE
+#. QUOTATION MARK), respectively.
+#.
+#. If the catalog has no translation, we will try to
+#. use Unicode U+2018 (LEFT SINGLE QUOTATION MARK) and
+#. Unicode U+2019 (RIGHT SINGLE QUOTATION MARK). If the
+#. current locale is not Unicode, locale_quoting_style
+#. will quote 'like this', and clocale_quoting_style will
+#. quote "like this". You should always include translations
+#. for "`" and "'" even if U+2018 and U+2019 are appropriate
+#. for your locale.
+#.
+#. If you don't know what to put here, please see
+#. <http://en.wikipedia.org/wiki/Quotation_marks_in_other_languages>
+#. and use glyphs suitable for your language.
+#: lib/quotearg.c:354
+msgid "`"
+msgstr "“"
+
+#: lib/quotearg.c:355
+msgid "'"
+msgstr "”"
+
+#: lib/regcomp.c:135
+msgid "Success"
+msgstr "Sucesso"
+
+#: lib/regcomp.c:138
+msgid "No match"
+msgstr "Nada encontrado"
+
+#: lib/regcomp.c:141
+msgid "Invalid regular expression"
+msgstr "Expressão regular inválida"
+
+#: lib/regcomp.c:144
+msgid "Invalid collation character"
+msgstr "Caractere de ordenação inválido"
+
+#: lib/regcomp.c:147
+msgid "Invalid character class name"
+msgstr "Nome inválido de classe de caracteres"
+
+#: lib/regcomp.c:150
+msgid "Trailing backslash"
+msgstr "Escape \\ no final"
+
+#: lib/regcomp.c:153
+msgid "Invalid back reference"
+msgstr "Retrovisor \\n inválido"
+
+#: lib/regcomp.c:156
+msgid "Unmatched [, [^, [:, [., or [="
+msgstr "[, [^, [:, [. ou [= sem correspondente"
+
+#: lib/regcomp.c:159
+msgid "Unmatched ( or \\("
+msgstr "( ou \\( sem correspondente"
+
+#: lib/regcomp.c:162
+msgid "Unmatched \\{"
+msgstr "\\{ sem correspondente"
+
+#: lib/regcomp.c:165
+msgid "Invalid content of \\{\\}"
+msgstr "Conteúdo inválido no \\{\\} (permitidos números e vírgula)"
+
+#: lib/regcomp.c:168
+msgid "Invalid range end"
+msgstr "Fim de intervalo (range) inválido"
+
+#: lib/regcomp.c:171
+msgid "Memory exhausted"
+msgstr "Falta de memória"
+
+#: lib/regcomp.c:174
+msgid "Invalid preceding regular expression"
+msgstr "Expressão regular anterior inválida"
+
+#: lib/regcomp.c:177
+msgid "Premature end of regular expression"
+msgstr "Fim prematuro da expressão regular"
+
+#: lib/regcomp.c:180
+msgid "Regular expression too big"
+msgstr "Expressão regular grande demais"
+
+#: lib/regcomp.c:183
+msgid "Unmatched ) or \\)"
+msgstr ") ou \\) sem correspondente"
+
+#: lib/regcomp.c:687
+msgid "No previous regular expression"
+msgstr "Não há expressão regular anterior"
+
+#: lib/set-acl.c:46
+#, c-format
+msgid "setting permissions for %s"
+msgstr "definindo permissões para %s"
+
+#: lib/version-etc.c:74
+#, c-format
+msgid "Packaged by %s (%s)\n"
+msgstr "Empacotado por %s (%s)\n"
+
+#: lib/version-etc.c:77
+#, c-format
+msgid "Packaged by %s\n"
+msgstr "Empacotado 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 "(C)"
+
+#: lib/version-etc.c:86
+msgid ""
+"\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"
+msgstr ""
+"\n"
+"Licença GPLv3+: GNU GPL versão 3 ou posterior <http://gnu.org/licenses/gpl."
+"html>.\n"
+"Esse é um software livre: você é livre para modificá-lo e redistribuí-lo.\n"
+"NÃO HÁ GARANTIA, na extensão permitida pela lei.\n"
+"\n"
+
+#. TRANSLATORS: %s denotes an author name.
+#: lib/version-etc.c:102
+#, c-format
+msgid "Written by %s.\n"
+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 "Escrito por %s e %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 "Escrito por %s, %s e %s.\n"
+
+#. TRANSLATORS: Each %s denotes an author name.
+#. You can use line breaks, estimating that each author name occupies
+#. ca. 16 screen columns and that a screen line has ca. 80 columns.
+#: lib/version-etc.c:117
+#, c-format
+msgid ""
+"Written by %s, %s, %s,\n"
+"and %s.\n"
+msgstr ""
+"Escrito por %s, %s, %s\n"
+"e %s.\n"
+
+#. TRANSLATORS: Each %s denotes an author name.
+#. You can use line breaks, estimating that each author name occupies
+#. ca. 16 screen columns and that a screen line has ca. 80 columns.
+#: lib/version-etc.c:124
+#, c-format
+msgid ""
+"Written by %s, %s, %s,\n"
+"%s, and %s.\n"
+msgstr ""
+"Escrito por %s, %s, %s,\n"
+"%s e %s.\n"
+
+#. TRANSLATORS: Each %s denotes an author name.
+#. You can use line breaks, estimating that each author name occupies
+#. ca. 16 screen columns and that a screen line has ca. 80 columns.
+#: lib/version-etc.c:131
+#, c-format
+msgid ""
+"Written by %s, %s, %s,\n"
+"%s, %s, and %s.\n"
+msgstr ""
+"Escrito por %s, %s, %s,\n"
+"%s, %s e %s.\n"
+
+#. TRANSLATORS: Each %s denotes an author name.
+#. You can use line breaks, estimating that each author name occupies
+#. ca. 16 screen columns and that a screen line has ca. 80 columns.
+#: lib/version-etc.c:139
+#, c-format
+msgid ""
+"Written by %s, %s, %s,\n"
+"%s, %s, %s, and %s.\n"
+msgstr ""
+"Escrito por %s, %s, %s,\n"
+"%s, %s, %s e %s.\n"
+
+#. TRANSLATORS: Each %s denotes an author name.
+#. You can use line breaks, estimating that each author name occupies
+#. ca. 16 screen columns and that a screen line has ca. 80 columns.
+#: lib/version-etc.c:147
+#, c-format
+msgid ""
+"Written by %s, %s, %s,\n"
+"%s, %s, %s, %s,\n"
+"and %s.\n"
+msgstr ""
+"Escrito por %s, %s, %s,\n"
+"%s, %s, %s, %s\n"
+"e %s.\n"
+
+#. TRANSLATORS: Each %s denotes an author name.
+#. You can use line breaks, estimating that each author name occupies
+#. ca. 16 screen columns and that a screen line has ca. 80 columns.
+#: lib/version-etc.c:156
+#, c-format
+msgid ""
+"Written by %s, %s, %s,\n"
+"%s, %s, %s, %s,\n"
+"%s, and %s.\n"
+msgstr ""
+"Escrito por %s, %s, %s,\n"
+"%s, %s, %s, %s,\n"
+"%s e %s.\n"
+
+#. TRANSLATORS: Each %s denotes an author name.
+#. You can use line breaks, estimating that each author name occupies
+#. ca. 16 screen columns and that a screen line has ca. 80 columns.
+#: lib/version-etc.c:167
+#, c-format
+msgid ""
+"Written by %s, %s, %s,\n"
+"%s, %s, %s, %s,\n"
+"%s, %s, and others.\n"
+msgstr ""
+"Escrito por %s, %s, %s,\n"
+"%s, %s, %s, %s,\n"
+"%s, %s e outros.\n"
+
+#. TRANSLATORS: The placeholder indicates the bug-reporting address
+#. for this package. Please add _another line_ saying
+#. "Report translation bugs to <...>\n" with the address for translation
+#. bugs (typically your translation team's web or email address).
+#: lib/version-etc.c:245
+#, c-format
+msgid ""
+"\n"
+"Report bugs to: %s\n"
+msgstr ""
+"\n"
+"Relate os problemas para: %s\n"
+
+#: lib/version-etc.c:247
+#, c-format
+msgid "Report %s bugs to: %s\n"
+msgstr "Relate os problemas de %s para: %s\n"
+
+#: lib/version-etc.c:251
+#, c-format
+msgid "%s home page: <%s>\n"
+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"
+
+#: lib/version-etc.c:256
+msgid "General help using GNU software: <http://www.gnu.org/gethelp/>\n"
+msgstr "Ajuda geral sobre uso de software GNU: <http://www.gnu.org/gethelp/>\n"
+
+#: sed/compile.c:146
msgid "multiple `!'s"
-msgstr "Exclamaes `!' mltiplas"
+msgstr "exclamações `!' múltiplas"
-#: sed/compile.c:145
+#: sed/compile.c:147
msgid "unexpected `,'"
-msgstr "Vrgula `,' inesperada"
+msgstr "vírgula `,' inesperada"
-#: sed/compile.c:146
+#: sed/compile.c:149
msgid "invalid usage of +N or ~N as first address"
-msgstr "No use +N ou ~N como o primeiro endereo"
+msgstr "não use +N ou ~N como o primeiro endereço"
-#: sed/compile.c:147
+#: sed/compile.c:150
msgid "unmatched `{'"
-msgstr "`{' no terminada"
+msgstr "`{' sem correspondente"
-#: sed/compile.c:148
+#: sed/compile.c:151
msgid "unexpected `}'"
msgstr "`}' inesperada"
-#: sed/compile.c:149
+#: sed/compile.c:153
msgid "extra characters after command"
-msgstr "H caracteres sobrando aps o comando"
+msgstr "há caracteres sobrando após o comando"
-#: sed/compile.c:150
+#: sed/compile.c:155
msgid "expected \\ after `a', `c' or `i'"
-msgstr "Deve haver um escape \\ depois dos comandos `a', `c' e `i'"
+msgstr "deve haver um escape \\ depois dos comandos `a', `c' e `i'"
-#: sed/compile.c:151
+#: sed/compile.c:157
msgid "`}' doesn't want any addresses"
-msgstr "`}' no recebe endereos"
+msgstr "`}' não recebe endereços"
-#: sed/compile.c:152
+#: sed/compile.c:159
msgid ": doesn't want any addresses"
-msgstr "`:' no recebe endereos"
+msgstr "`:' não recebe endereços"
-#: sed/compile.c:153
+#: sed/compile.c:161
msgid "comments don't accept any addresses"
-msgstr "Comentrios no aceitam endereos"
+msgstr "comentários não aceitam endereços"
-#: sed/compile.c:154
+#: sed/compile.c:162
msgid "missing command"
-msgstr "Falta especificar um comando ao endereo"
+msgstr "falta especificar um comando"
-#: sed/compile.c:155
+#: sed/compile.c:163
msgid "command only uses one address"
-msgstr "Este comando usa apenas um endereo"
+msgstr "este comando usa apenas um endereço"
-#: sed/compile.c:156
+#: sed/compile.c:164
msgid "unterminated address regex"
-msgstr "A expresso regular do endereo est inacabada (falta a /)"
+msgstr "a expressão regular do endereço está inacabada (falta a /)"
-#: sed/compile.c:157
+#: sed/compile.c:165
msgid "unterminated `s' command"
-msgstr "Comando `s' inacabado (s/// - faltou delimitador)"
+msgstr "comando `s' inacabado (s/// - faltou delimitador)"
-#: sed/compile.c:158
+#: sed/compile.c:166
msgid "unterminated `y' command"
-msgstr "Comando `y' inacabado (y/// - faltou delimitador)"
+msgstr "comando `y' inacabado (y/// - faltou delimitador)"
-#: sed/compile.c:159
+#: sed/compile.c:167
msgid "unknown option to `s'"
-msgstr "Opo desconhecida para o comando `s' (s///?)"
+msgstr "opção desconhecida para o comando `s' (s///?)"
-#: sed/compile.c:160
+#: sed/compile.c:169
msgid "multiple `p' options to `s' command"
-msgstr "opes `p' mltiplas para o comando `s'"
+msgstr "opções `p' múltiplas para o comando `s'"
-#: sed/compile.c:161
+#: sed/compile.c:171
msgid "multiple `g' options to `s' command"
-msgstr "opes `g' mltiplas para o comando `s'"
+msgstr "opções `g' múltiplas para o comando `s'"
-#: sed/compile.c:162
+#: sed/compile.c:173
msgid "multiple number options to `s' command"
-msgstr "opes numricas mltiplas para o comando `s' (s///n)"
+msgstr "opções numéricas múltiplas para o comando `s' (s///n)"
-#: sed/compile.c:163
+#: sed/compile.c:175
msgid "number option to `s' command may not be zero"
-msgstr "A opo numrica para o comando `s' no pode ser zero (s///0)"
+msgstr "a opção numérica para o comando `s' não pode ser zero (s///0)"
-#: sed/compile.c:164
+#: sed/compile.c:177
msgid "strings for `y' command are different lengths"
-msgstr "Os textos para o comando `y' tm tamanhos diferentes (y/abc/z/)"
+msgstr "os textos para o comando `y' têm tamanhos diferentes (y/abc/z/)"
-#: sed/compile.c:165
+#: sed/compile.c:179
msgid "delimiter character is not a single-byte character"
-msgstr "O delimitador deve ser um caractere normal, ASCII"
+msgstr "o delimitador deve ser um caractere normal, ASCII"
-#: sed/compile.c:166
+#: sed/compile.c:181
msgid "expected newer version of sed"
-msgstr "Esperada uma verso mais recente do sed"
+msgstr "esperada uma versão mais recente do sed"
-#: sed/compile.c:167
+#: sed/compile.c:183
msgid "invalid usage of line address 0"
-msgstr "Uso incorreto do endereo de linha 0"
+msgstr "uso incorreto do endereço de linha 0"
-#: sed/compile.c:168
+#: sed/compile.c:184
#, c-format
msgid "unknown command: `%c'"
-msgstr "Comando desconhecido: `%c'"
+msgstr "comando desconhecido: `%c'"
-#: sed/compile.c:169
-#, fuzzy
+#: sed/compile.c:186
msgid "incomplete command"
-msgstr "Falta especificar um comando ao endereo"
+msgstr "comando incompleto"
-#: sed/compile.c:192
+#: sed/compile.c:188
+msgid "\":\" lacks a label"
+msgstr "\":\" carece de uma marcação"
+
+#: sed/compile.c:190
+msgid "recursive escaping after \\c not allowed"
+msgstr "escape recursivo após \\c não permitido"
+
+#: sed/compile.c:213
#, c-format
msgid "%s: file %s line %lu: %s\n"
msgstr "%s: arquivo %s linha %lu: %s\n"
-#: sed/compile.c:195
+#: sed/compile.c:216
#, c-format
msgid "%s: -e expression #%lu, char %lu: %s\n"
-msgstr "%s: -e expresso #%lu, caractere %lu: %s\n"
+msgstr "%s: -e expressão #%lu, caractere %lu: %s\n"
-#: sed/compile.c:1657
+#: sed/compile.c:1639
#, c-format
msgid "can't find label for jump to `%s'"
-msgstr "No foi possvel encontrar a marcao `%s'"
+msgstr "não foi possível encontrar a marcação `%s'"
+
+#: sed/execute.c:264 sed/execute.c:281
+#, c-format
+msgid "case conversion produced an invalid character"
+msgstr "conversão maiúsculo/minúsculo produziu um caractere inválido"
-#: sed/execute.c:595
+#: sed/execute.c:575
#, c-format
msgid "%s: can't read %s: %s\n"
-msgstr "%s: no foi possvel ler %s: %s\n"
+msgstr "%s: não foi possível ler %s: %s\n"
-#: sed/execute.c:624
+#: sed/execute.c:600
#, c-format
msgid "couldn't edit %s: is a terminal"
-msgstr "No foi possvel editar %s, pois um terminal"
+msgstr "não foi possível editar %s, pois é um terminal"
-#: sed/execute.c:629
+#: sed/execute.c:605
#, c-format
msgid "couldn't edit %s: not a regular file"
-msgstr "No foi possvel editar %s, pois no um arquivo comum"
+msgstr "não foi possível editar %s, pois não é um arquivo comum"
-#: sed/execute.c:640
+#: sed/execute.c:616
#, 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:647
+#: sed/execute.c:624
#, c-format
msgid "%s: warning: failed to get security context of %s: %s"
-msgstr "%s: aviso: falha ao obter o security context de %s: %s"
+msgstr "%s: aviso: falha ao obter o contexto de segurança de %s: %s"
-#: sed/execute.c:664 sed/utils.c:211
+#: sed/execute.c:643 sed/utils.c:178
#, c-format
msgid "couldn't open temporary file %s: %s"
-msgstr "No foi possvel abrir o arquivo temporrio %s: %s"
+msgstr "não foi possível abrir o arquivo temporário %s: %s"
-#: sed/execute.c:1193 sed/execute.c:1373
+#: sed/execute.c:1158 sed/execute.c:1368
msgid "error in subprocess"
msgstr "erro no subprocesso"
-#: sed/execute.c:1195
+#: sed/execute.c:1160
msgid "option `e' not supported"
-msgstr "opo `e' no suportada"
+msgstr "sem suporte à opção `e'"
-#: sed/execute.c:1375
+#: sed/execute.c:1349
msgid "`e' command not supported"
-msgstr "comando `e' no suportado"
+msgstr "sem suporte ao comando `e'"
-#: sed/execute.c:1725
+#: sed/execute.c:1675
msgid "no input files"
msgstr "nenhum arquivo de entrada"
-#: sed/regexp.c:39
+#: sed/regexp.c:38
msgid "no previous regular expression"
-msgstr "No h expresso regular anterior"
+msgstr "não há expressão regular anterior"
-#: sed/regexp.c:40
-msgid "cannot specify modifiers on empty regexp"
-msgstr "No permitido especificar modificadores numa expresso regular vazia"
-
-#: sed/regexp.c:129
+#: sed/regexp.c:138
#, c-format
msgid "invalid reference \\%d on `s' command's RHS"
-msgstr "Referncia invlida \\%d na segunda parte do comando `s'"
+msgstr "referência inválida \\%d na segunda parte do comando `s'"
-#: sed/sed.c:32
+#: sed/sed.c:35
msgid "Jay Fenlason"
-msgstr ""
+msgstr "Jay Fenlason"
-#: sed/sed.c:33
+#: sed/sed.c:36
msgid "Tom Lord"
-msgstr ""
+msgstr "Tom Lord"
-#: sed/sed.c:34
+#: sed/sed.c:37
msgid "Ken Pizzini"
-msgstr ""
+msgstr "Ken Pizzini"
-#: sed/sed.c:35
+#: sed/sed.c:38
msgid "Paolo Bonzini"
-msgstr ""
+msgstr "Paolo Bonzini"
-#: sed/sed.c:79
+#: sed/sed.c:113
#, c-format
msgid ""
"GNU sed home page: <http://www.gnu.org/software/sed/>.\n"
@@ -226,42 +630,38 @@ msgstr ""
"Site do GNU sed: <http://www.gnu.org/software/sed/>.\n"
"Ajuda sobre softwares GNU: <http://www.gnu.org/gethelp/>.\n"
-#: sed/sed.c:86
+#: sed/sed.c:120
#, c-format
-msgid ""
-"E-mail bug reports to: <%s>.\n"
-"Be sure to include the word ``%s'' somewhere in the ``Subject:'' field.\n"
-msgstr ""
-"Envie relatrios de erros (em ingls) para: %s.\n"
-"Inclua a palavra ``%s'' no campo ``Assunto:''.\n"
+msgid "E-mail bug reports to: <%s>.\n"
+msgstr "Envie relatórios de problemas para: <%s>.\n"
-#: sed/sed.c:99
+#: sed/sed.c:129
msgid ""
" -R, --regexp-perl\n"
" use Perl 5's regular expressions syntax in the script.\n"
msgstr ""
" -R, --regexp-perl\n"
-" usar sintaxe de expresses regulares do Perl 5 no script.\n"
+" usa sintaxe de expressões regulares do Perl 5 no script.\n"
-#: sed/sed.c:104
+#: sed/sed.c:134
#, c-format
msgid ""
"Usage: %s [OPTION]... {script-only-if-no-other-script} [input-file]...\n"
"\n"
msgstr ""
-"Uso: %s [OPO]... {script-apenas-se-for-nico} [arquivo-entrada]...\n"
+"Uso: %s [OPÇÃO]... {script-apenas-se-for-único} [arquivo-entrada]...\n"
"\n"
-#: sed/sed.c:108
+#: sed/sed.c:138
#, c-format
msgid ""
" -n, --quiet, --silent\n"
" suppress automatic printing of pattern space\n"
msgstr ""
" -n, --quiet, --silent\n"
-" suprime a impresso automtica do buffer padro\n"
+" suprime a impressão automática do buffer padrão\n"
-#: sed/sed.c:110
+#: sed/sed.c:140
#, c-format
msgid ""
" -e script, --expression=script\n"
@@ -270,29 +670,29 @@ msgstr ""
" -e script, --expression=script\n"
" adiciona o script aos comandos a serem executados\n"
-#: sed/sed.c:112
+#: sed/sed.c:142
#, c-format
msgid ""
" -f script-file, --file=script-file\n"
" add the contents of script-file to the commands to be "
"executed\n"
msgstr ""
-" -f script-file, --file=script-file\n"
-" adiciona o contedo do arquivo-script aos comandos\n"
+" -f arquivo-script, --file=arquivo-script\n"
+" adiciona o conteúdo do arquivo-script aos comandos\n"
" a serem executados\n"
-#: sed/sed.c:115
+#: sed/sed.c:146
#, c-format
msgid ""
" --follow-symlinks\n"
" follow symlinks when processing in place\n"
msgstr ""
" --follow-symlinks\n"
-" segue links simblicos ao editar o prprio arquivo "
+" segue links simbólicos ao editar o próprio arquivo "
"original\n"
-#: sed/sed.c:118
-#, fuzzy, c-format
+#: sed/sed.c:149
+#, c-format
msgid ""
" -i[SUFFIX], --in-place[=SUFFIX]\n"
" edit files in place (makes backup if SUFFIX supplied)\n"
@@ -300,7 +700,7 @@ msgstr ""
" -i[SUFIXO], --in-place[=SUFIXO]\n"
" edita o arquivo original (faz backup se usado SUFIXO)\n"
-#: sed/sed.c:121
+#: sed/sed.c:153
#, c-format
msgid ""
" -b, --binary\n"
@@ -308,10 +708,10 @@ msgid ""
"specially)\n"
msgstr ""
" -b, --binary\n"
-" abre os arquivos em modo binrio (CR+LFs no so "
+" abre os arquivos em modo binário (CR+LFs não são "
"especiais)\n"
-#: sed/sed.c:124
+#: sed/sed.c:157
#, c-format
msgid ""
" -l N, --line-length=N\n"
@@ -320,38 +720,47 @@ msgstr ""
" -l N, --line-length=N\n"
" determina comprimento da quebra de linha para comando `l'\n"
-#: sed/sed.c:126
+#: sed/sed.c:159
#, c-format
msgid ""
" --posix\n"
" disable all GNU extensions.\n"
msgstr ""
" --posix\n"
-" desativa todas as extenses GNU.\n"
+" desativa todas as extensões GNU.\n"
-#: sed/sed.c:128
+#: sed/sed.c:161
#, c-format
msgid ""
-" -r, --regexp-extended\n"
-" use extended regular expressions in the script.\n"
+" -E, -r, --regexp-extended\n"
+" use extended regular expressions in the script\n"
+" (for portability use POSIX -E).\n"
msgstr ""
-" -r, --regexp-extended\n"
-" usar sintaxe moderna de expresses regulares (sem "
-"escapes).\n"
+" -E, -r, --regexp-extended\n"
+" usa sintaxe moderna de expressões regulares, sem escapes.\n"
+" (para portabilidade, use POSIX -E).\n"
-#: sed/sed.c:133
+#: sed/sed.c:167
#, c-format
msgid ""
" -s, --separate\n"
-" consider files as separate rather than as a single "
-"continuous\n"
-" long stream.\n"
+" consider files as separate rather than as a single,\n"
+" continuous long stream.\n"
msgstr ""
" -s, --separate\n"
-" considera arquivos como entidades separadas, e no como um\n"
-" longo e nico fluxo de dados.\n"
+" considera arquivos como entidades separadas, e não\n"
+" como um longo e único fluxo de dados.\n"
-#: sed/sed.c:136
+#: sed/sed.c:170
+#, c-format
+msgid ""
+" --sandbox\n"
+" operate in sandbox mode.\n"
+msgstr ""
+" --sandbox\n"
+" opera em modo sandbox.\n"
+
+#: sed/sed.c:172
#, c-format
msgid ""
" -u, --unbuffered\n"
@@ -360,28 +769,30 @@ msgid ""
" the output buffers more often\n"
msgstr ""
" -u, --unbuffered\n"
-" carrega uma quantidade mnima de dados dos arquivos de "
+" carrega uma quantidade mínima de dados dos arquivos de "
"entrada\n"
-" e descarrega os buffers de sada com mais freqncia\n"
+" e descarrega os buffers de saída com mais frequência\n"
-#: sed/sed.c:139
+#: sed/sed.c:175
#, c-format
msgid ""
" -z, --null-data\n"
" separate lines by NUL characters\n"
msgstr ""
+" -z, --null-data\n"
+" separa linhas por caracteres NULOs\n"
-#: sed/sed.c:141
+#: sed/sed.c:177
#, c-format
msgid " --help display this help and exit\n"
msgstr " --help mostra esta ajuda e sai\n"
-#: sed/sed.c:142
+#: sed/sed.c:178
#, c-format
msgid " --version output version information and exit\n"
-msgstr " --version mostra informaes sobre a verso e sai\n"
+msgstr " --version mostra informações sobre a versão e sai\n"
-#: sed/sed.c:143
+#: sed/sed.c:179
#, c-format
msgid ""
"\n"
@@ -392,139 +803,78 @@ msgid ""
"\n"
msgstr ""
"\n"
-"Se nenhuma opo -e, --expression, -f, ou --file dada, o primeiro\n"
-"argumento que no seja uma opo considerado como o script sed a ser\n"
-"interpretado. Todos os argumentos restantes so considerados como\n"
-"nomes de arquivos de entrada. Caso nenhum arquivo de entrada seja\n"
-"especificado, ento a entrada padro ser lida.\n"
+"Se nenhuma opção -e, --expression, -f, ou --file é dada, o primeiro\n"
+"argumento que não seja uma opção é considerado como o script sed a\n"
+"ser interpretado. Todos os argumentos restantes são considerados\n"
+"como nomes de arquivos de entrada. Caso nenhum arquivo de entrada\n"
+"seja especificado, então a entrada padrão será lida.\n"
"\n"
-#: sed/utils.c:74 sed/utils.c:432
+#: sed/utils.c:73 sed/utils.c:384
#, c-format
msgid "cannot remove %s: %s"
-msgstr "No foi possvel remover %s: %s"
+msgstr "não foi possível remover %s: %s"
-#: sed/utils.c:144
+#: sed/utils.c:136
#, c-format
msgid "couldn't open file %s: %s"
-msgstr "No foi possvel abrir o arquivo %s: %s"
+msgstr "não foi possível abrir o arquivo %s: %s"
-#: sed/utils.c:167
+#: sed/utils.c:155
#, c-format
msgid "couldn't attach to %s: %s"
-msgstr "no foi possvel anexar ao %s: %s"
+msgstr "não foi possível anexar ao %s: %s"
-#: sed/utils.c:229
+#: sed/utils.c:192
#, c-format
-msgid "couldn't write %d item to %s: %s"
-msgid_plural "couldn't write %d items to %s: %s"
-msgstr[0] "no foi possvel escrever %d item para %s: %s"
-msgstr[1] "no foi possvel escrever %d items para %s: %s"
+msgid "couldn't write %llu item to %s: %s"
+msgid_plural "couldn't write %llu items to %s: %s"
+msgstr[0] "não foi possível escrever %llu item para %s: %s"
+msgstr[1] "não foi possível escrever %llu itens para %s: %s"
-#: sed/utils.c:244 sed/utils.c:267
+#: sed/utils.c:204 sed/utils.c:223
#, c-format
msgid "read error on %s: %s"
msgstr "erro de leitura em %s: %s"
-#: sed/utils.c:372
+#: sed/utils.c:325
#, c-format
msgid "couldn't follow symlink %s: %s"
-msgstr "No foi possvel seguir o link %s: %s"
+msgstr "não foi possível seguir o link %s: %s"
-#: sed/utils.c:406
+#: sed/utils.c:359
#, c-format
msgid "cannot stat %s: %s"
-msgstr "No foi possvel ler %s: %s"
+msgstr "não foi possível obter o estado de %s: %s"
-#: sed/utils.c:437
+#: sed/utils.c:389
#, c-format
msgid "cannot rename %s: %s"
-msgstr "No foi possvel renomear %s: %s"
-
-#: lib/regcomp.c:132
-msgid "Success"
-msgstr "Sucesso"
-
-#: lib/regcomp.c:135
-msgid "No match"
-msgstr "Nada encontrado"
-
-#: lib/regcomp.c:138
-msgid "Invalid regular expression"
-msgstr "Expresso regular invlida"
+msgstr "não foi possível renomear %s: %s"
-#: lib/regcomp.c:141
-msgid "Invalid collation character"
-msgstr "Caractere de ordenao invlido"
-
-#: lib/regcomp.c:144
-msgid "Invalid character class name"
-msgstr "Nome invlido de classe de caracteres"
-
-#: lib/regcomp.c:147
-msgid "Trailing backslash"
-msgstr "Escape \\ no final"
-
-#: lib/regcomp.c:150
-msgid "Invalid back reference"
-msgstr "Retrovisor \\n invlido"
-
-#: lib/regcomp.c:153
-msgid "Unmatched [ or [^"
-msgstr "[ ou [^ no terminado"
-
-#: lib/regcomp.c:156
-msgid "Unmatched ( or \\("
-msgstr "( ou \\( no terminado"
-
-#: lib/regcomp.c:159
-msgid "Unmatched \\{"
-msgstr "\\{ no terminado"
-
-#: lib/regcomp.c:162
-msgid "Invalid content of \\{\\}"
-msgstr "Contedo invlido no \\{\\} (permitidos nmeros e vrgula)"
-
-#: lib/regcomp.c:165
-msgid "Invalid range end"
-msgstr "Fim de intervalo (range) invlido"
-
-#: lib/regcomp.c:168
-msgid "Memory exhausted"
-msgstr "Falta de memria"
-
-#: lib/regcomp.c:171
-msgid "Invalid preceding regular expression"
-msgstr "Expresso regular anterior invlida"
-
-#: lib/regcomp.c:174
-msgid "Premature end of regular expression"
-msgstr "Fim prematuro da expresso regular"
-
-#: lib/regcomp.c:177
-msgid "Regular expression too big"
-msgstr "Expresso regular grande demais"
-
-#: lib/regcomp.c:180
-msgid "Unmatched ) or \\)"
-msgstr ") or \\) inesperado"
+#~ msgid "cannot specify modifiers on empty regexp"
+#~ msgstr ""
+#~ "Não é permitido especificar modificadores numa expressão regular vazia"
-#: lib/regcomp.c:705
-msgid "No previous regular expression"
-msgstr "No h expresso regular anterior"
+#~ msgid ""
+#~ "E-mail bug reports to: <%s>.\n"
+#~ "Be sure to include the word ``%s'' somewhere in the ``Subject:'' field.\n"
+#~ msgstr ""
+#~ "Envie relatórios de erros (em inglês) para: %s.\n"
+#~ "Inclua a palavra ``%s'' no campo ``Assunto:''.\n"
#~ msgid "super-sed version %s\n"
-#~ msgstr "super-sed verso %s\n"
+#~ msgstr "super-sed versão %s\n"
#~ msgid ""
#~ "based on GNU sed version %s\n"
#~ "\n"
#~ msgstr ""
-#~ "baseado no GNU sed verso %s\n"
+#~ "baseado no GNU sed versão %s\n"
#~ "\n"
#~ msgid "GNU sed version %s\n"
-#~ msgstr "GNU sed verso %s\n"
+#~ msgstr "GNU sed versão %s\n"
#~ msgid ""
#~ "Copyright (C) %d Free Software Foundation, Inc.\n"
@@ -535,7 +885,7 @@ msgstr "No h expresso regular anterior"
#~ "to the extent permitted by law.\n"
#~ msgstr ""
#~ "Copyright (C) %d Free Software Foundation, Inc.\n"
-#~ "Este programa Software Livre. Veja os fontes para conhecer as "
-#~ "condies\n"
-#~ "de cpia. NO h garantias, nem mesmo para os aspectos mercantis ou de\n"
-#~ "atendimento a finalidades especficas, tanto quanto a lei permita.\n"
+#~ "Este programa é Software Livre. Veja os fontes para conhecer as "
+#~ "condições\n"
+#~ "de cópia. NÃO há garantias, nem mesmo para os aspectos mercantis ou de\n"
+#~ "atendimento a finalidades específicas, tanto quanto a lei permita.\n"
diff --git a/po/ro.gmo b/po/ro.gmo
index 36e3289..717836c 100644
--- a/po/ro.gmo
+++ b/po/ro.gmo
Binary files differ
diff --git a/po/ro.po b/po/ro.po
index 355c63f..45fe22f 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: 2012-12-22 14:36+0100\n"
+"POT-Creation-Date: 2016-12-30 00:59-0800\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"
@@ -16,221 +16,601 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=ISO-8859-2\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"
-#: sed/compile.c:144
+#: lib/closeout.c:112
+msgid "write error"
+msgstr ""
+
+#: lib/copy-acl.c:54
+#, c-format
+msgid "preserving permissions for %s"
+msgstr ""
+
+#: lib/dfa.c:1025 lib/dfa.c:1028 lib/dfa.c:1047 lib/dfa.c:1057 lib/dfa.c:1070
+#: lib/dfa.c:1098 lib/dfa.c:1107 lib/dfa.c:1110 lib/dfa.c:1115 lib/dfa.c:1137
+#: lib/dfa.c:1140
+msgid "unbalanced ["
+msgstr ""
+
+#: lib/dfa.c:1083
+#, fuzzy
+msgid "invalid character class"
+msgstr "Nume de clas de caractere incorect"
+
+#: lib/dfa.c:1206
+msgid "character class syntax is [[:space:]], not [:space:]"
+msgstr ""
+
+#: lib/dfa.c:1275
+msgid "unfinished \\ escape"
+msgstr ""
+
+#: lib/dfa.c:1436
+#, fuzzy
+msgid "invalid content of \\{\\}"
+msgstr "Coninut incorect pentru \\{\\}"
+
+#: lib/dfa.c:1439
+#, fuzzy
+msgid "regular expression too big"
+msgstr "Expresie regular prea mare"
+
+#: lib/dfa.c:1853
+msgid "unbalanced ("
+msgstr ""
+
+#: lib/dfa.c:1980
+msgid "no syntax specified"
+msgstr ""
+
+#: lib/dfa.c:1988
+msgid "unbalanced )"
+msgstr ""
+
+#: lib/error.c:191
+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 ""
+
+#: lib/getopt.c:654 lib/getopt.c:658
+#, c-format
+msgid "%s: option '--%s' doesn't allow an argument\n"
+msgstr ""
+
+#: 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:715 lib/getopt.c:734
+#, c-format
+msgid "%s: option '--%s' requires an argument\n"
+msgstr ""
+
+#: 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
+#, 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
+#, 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 "Memorie epuizat"
+
+#. TRANSLATORS:
+#. Get translations for open and closing quotation marks.
+#. The message catalog should translate "`" to a left
+#. quotation mark suitable for the locale, and similarly for
+#. "'". For example, a French Unicode local should translate
+#. these to U+00AB (LEFT-POINTING DOUBLE ANGLE
+#. QUOTATION MARK), and U+00BB (RIGHT-POINTING DOUBLE ANGLE
+#. QUOTATION MARK), respectively.
+#.
+#. If the catalog has no translation, we will try to
+#. use Unicode U+2018 (LEFT SINGLE QUOTATION MARK) and
+#. Unicode U+2019 (RIGHT SINGLE QUOTATION MARK). If the
+#. current locale is not Unicode, locale_quoting_style
+#. will quote 'like this', and clocale_quoting_style will
+#. quote "like this". You should always include translations
+#. for "`" and "'" even if U+2018 and U+2019 are appropriate
+#. for your locale.
+#.
+#. If you don't know what to put here, please see
+#. <http://en.wikipedia.org/wiki/Quotation_marks_in_other_languages>
+#. and use glyphs suitable for your language.
+#: lib/quotearg.c:354
+msgid "`"
+msgstr ""
+
+#: lib/quotearg.c:355
+msgid "'"
+msgstr ""
+
+#: lib/regcomp.c:135
+msgid "Success"
+msgstr "Succes"
+
+#: lib/regcomp.c:138
+msgid "No match"
+msgstr "Nici o potrivire"
+
+#: lib/regcomp.c:141
+msgid "Invalid regular expression"
+msgstr "Expresie regular incorect"
+
+#: lib/regcomp.c:144
+msgid "Invalid collation character"
+msgstr "Colaiune de caractere incorect"
+
+#: lib/regcomp.c:147
+msgid "Invalid character class name"
+msgstr "Nume de clas de caractere incorect"
+
+#: lib/regcomp.c:150
+msgid "Trailing backslash"
+msgstr "Backslash n coad"
+
+#: lib/regcomp.c:153
+msgid "Invalid back reference"
+msgstr "Referin napoi incorect"
+
+#: lib/regcomp.c:156
+#, fuzzy
+msgid "Unmatched [, [^, [:, [., or [="
+msgstr "[ sau [^ fr pereche"
+
+#: lib/regcomp.c:159
+msgid "Unmatched ( or \\("
+msgstr "( sau \\( fr pereche"
+
+#: lib/regcomp.c:162
+msgid "Unmatched \\{"
+msgstr "\\{ fr pereche"
+
+#: lib/regcomp.c:165
+msgid "Invalid content of \\{\\}"
+msgstr "Coninut incorect pentru \\{\\}"
+
+#: lib/regcomp.c:168
+msgid "Invalid range end"
+msgstr "Sfrit de interval incorect"
+
+#: lib/regcomp.c:171
+msgid "Memory exhausted"
+msgstr "Memorie epuizat"
+
+#: lib/regcomp.c:174
+msgid "Invalid preceding regular expression"
+msgstr "Expresie regular precedent incorect"
+
+#: lib/regcomp.c:177
+msgid "Premature end of regular expression"
+msgstr "Sfrit prematur al expresiei regulare"
+
+#: lib/regcomp.c:180
+msgid "Regular expression too big"
+msgstr "Expresie regular prea mare"
+
+#: lib/regcomp.c:183
+msgid "Unmatched ) or \\)"
+msgstr ") sau \\) fr pereche"
+
+#: lib/regcomp.c:687
+msgid "No previous regular expression"
+msgstr "Nici o expresie regular anterioar"
+
+#: lib/set-acl.c:46
+#, c-format
+msgid "setting permissions for %s"
+msgstr ""
+
+#: lib/version-etc.c:74
+#, c-format
+msgid "Packaged by %s (%s)\n"
+msgstr ""
+
+#: lib/version-etc.c:77
+#, c-format
+msgid "Packaged by %s\n"
+msgstr ""
+
+#. 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 ""
+
+#: lib/version-etc.c:86
+msgid ""
+"\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"
+msgstr ""
+
+#. TRANSLATORS: %s denotes an author name.
+#: lib/version-etc.c:102
+#, c-format
+msgid "Written by %s.\n"
+msgstr ""
+
+#. TRANSLATORS: Each %s denotes an author name.
+#: lib/version-etc.c:106
+#, c-format
+msgid "Written by %s and %s.\n"
+msgstr ""
+
+#. TRANSLATORS: Each %s denotes an author name.
+#: lib/version-etc.c:110
+#, c-format
+msgid "Written by %s, %s, and %s.\n"
+msgstr ""
+
+#. TRANSLATORS: Each %s denotes an author name.
+#. You can use line breaks, estimating that each author name occupies
+#. ca. 16 screen columns and that a screen line has ca. 80 columns.
+#: lib/version-etc.c:117
+#, c-format
+msgid ""
+"Written by %s, %s, %s,\n"
+"and %s.\n"
+msgstr ""
+
+#. TRANSLATORS: Each %s denotes an author name.
+#. You can use line breaks, estimating that each author name occupies
+#. ca. 16 screen columns and that a screen line has ca. 80 columns.
+#: lib/version-etc.c:124
+#, c-format
+msgid ""
+"Written by %s, %s, %s,\n"
+"%s, and %s.\n"
+msgstr ""
+
+#. TRANSLATORS: Each %s denotes an author name.
+#. You can use line breaks, estimating that each author name occupies
+#. ca. 16 screen columns and that a screen line has ca. 80 columns.
+#: lib/version-etc.c:131
+#, c-format
+msgid ""
+"Written by %s, %s, %s,\n"
+"%s, %s, and %s.\n"
+msgstr ""
+
+#. TRANSLATORS: Each %s denotes an author name.
+#. You can use line breaks, estimating that each author name occupies
+#. ca. 16 screen columns and that a screen line has ca. 80 columns.
+#: lib/version-etc.c:139
+#, c-format
+msgid ""
+"Written by %s, %s, %s,\n"
+"%s, %s, %s, and %s.\n"
+msgstr ""
+
+#. TRANSLATORS: Each %s denotes an author name.
+#. You can use line breaks, estimating that each author name occupies
+#. ca. 16 screen columns and that a screen line has ca. 80 columns.
+#: lib/version-etc.c:147
+#, c-format
+msgid ""
+"Written by %s, %s, %s,\n"
+"%s, %s, %s, %s,\n"
+"and %s.\n"
+msgstr ""
+
+#. TRANSLATORS: Each %s denotes an author name.
+#. You can use line breaks, estimating that each author name occupies
+#. ca. 16 screen columns and that a screen line has ca. 80 columns.
+#: lib/version-etc.c:156
+#, c-format
+msgid ""
+"Written by %s, %s, %s,\n"
+"%s, %s, %s, %s,\n"
+"%s, and %s.\n"
+msgstr ""
+
+#. TRANSLATORS: Each %s denotes an author name.
+#. You can use line breaks, estimating that each author name occupies
+#. ca. 16 screen columns and that a screen line has ca. 80 columns.
+#: lib/version-etc.c:167
+#, c-format
+msgid ""
+"Written by %s, %s, %s,\n"
+"%s, %s, %s, %s,\n"
+"%s, %s, and others.\n"
+msgstr ""
+
+#. TRANSLATORS: The placeholder indicates the bug-reporting address
+#. for this package. Please add _another line_ saying
+#. "Report translation bugs to <...>\n" with the address for translation
+#. bugs (typically your translation team's web or email address).
+#: lib/version-etc.c:245
+#, c-format
+msgid ""
+"\n"
+"Report bugs to: %s\n"
+msgstr ""
+
+#: lib/version-etc.c:247
+#, c-format
+msgid "Report %s bugs to: %s\n"
+msgstr ""
+
+#: lib/version-etc.c:251
+#, c-format
+msgid "%s home page: <%s>\n"
+msgstr ""
+
+#: lib/version-etc.c:253
+#, c-format
+msgid "%s home page: <http://www.gnu.org/software/%s/>\n"
+msgstr ""
+
+#: lib/version-etc.c:256
+msgid "General help using GNU software: <http://www.gnu.org/gethelp/>\n"
+msgstr ""
+
+#: sed/compile.c:146
msgid "multiple `!'s"
msgstr "`!'-uri multiple"
-#: sed/compile.c:145
+#: sed/compile.c:147
msgid "unexpected `,'"
msgstr "`,' neateptat"
-#: sed/compile.c:146
+#: sed/compile.c:149
msgid "invalid usage of +N or ~N as first address"
msgstr "Nu se poate folosi +N sau ~N ca prima adres"
-#: sed/compile.c:147
+#: sed/compile.c:150
msgid "unmatched `{'"
msgstr "`{' fr pereche"
-#: sed/compile.c:148
+#: sed/compile.c:151
msgid "unexpected `}'"
msgstr "`}' neateptat"
-#: sed/compile.c:149
+#: sed/compile.c:153
msgid "extra characters after command"
msgstr "extra caractere dup comand"
-#: sed/compile.c:150
+#: sed/compile.c:155
msgid "expected \\ after `a', `c' or `i'"
msgstr "este ateptat \\ dup `a', `c' sau `i'"
-#: sed/compile.c:151
+#: sed/compile.c:157
msgid "`}' doesn't want any addresses"
msgstr "`}' nu vrea nici o adres"
-#: sed/compile.c:152
+#: sed/compile.c:159
msgid ": doesn't want any addresses"
msgstr ": nu vrea nici o adres"
-#: sed/compile.c:153
+#: sed/compile.c:161
msgid "comments don't accept any addresses"
msgstr "comentariile nu accept nici o adres"
-#: sed/compile.c:154
+#: sed/compile.c:162
msgid "missing command"
msgstr "comand absent"
-#: sed/compile.c:155
+#: sed/compile.c:163
msgid "command only uses one address"
msgstr "comanda folosete numai o adres"
-#: sed/compile.c:156
+#: sed/compile.c:164
msgid "unterminated address regex"
msgstr "regex adres neterminat"
-#: sed/compile.c:157
+#: sed/compile.c:165
msgid "unterminated `s' command"
msgstr "comand `s' neterminat"
-#: sed/compile.c:158
+#: sed/compile.c:166
msgid "unterminated `y' command"
msgstr "comand `y' neterminat"
-#: sed/compile.c:159
+#: sed/compile.c:167
msgid "unknown option to `s'"
msgstr "opiune necunoscut pentru `s'"
-#: sed/compile.c:160
+#: sed/compile.c:169
msgid "multiple `p' options to `s' command"
msgstr "multiple opiuni `p' pentru comanda `s'"
-#: sed/compile.c:161
+#: sed/compile.c:171
msgid "multiple `g' options to `s' command"
msgstr "multiple opiuni `g' pentru comanda `s'"
-#: sed/compile.c:162
+#: sed/compile.c:173
msgid "multiple number options to `s' command"
msgstr "numr multiplu de opiuni pentru comanda `s'"
-#: sed/compile.c:163
+#: sed/compile.c:175
msgid "number option to `s' command may not be zero"
msgstr "numrul de opiuni pentru comanda `s' nu poate fi zero"
-#: sed/compile.c:164
+#: sed/compile.c:177
msgid "strings for `y' command are different lengths"
msgstr "irurile pentru comanda y au lungimi diferite"
-#: sed/compile.c:165
+#: sed/compile.c:179
msgid "delimiter character is not a single-byte character"
msgstr "caacterul delimitator nu este un caracter de un octet"
-#: sed/compile.c:166
+#: sed/compile.c:181
msgid "expected newer version of sed"
msgstr "am ateptat o versiune mai recent de sed"
-#: sed/compile.c:167
+#: sed/compile.c:183
msgid "invalid usage of line address 0"
msgstr "folosire invalid adres linie 0"
-#: sed/compile.c:168
+#: sed/compile.c:184
#, c-format
msgid "unknown command: `%c'"
msgstr "comand necunoscut: `%c'"
-#: sed/compile.c:169
+#: sed/compile.c:186
#, fuzzy
msgid "incomplete command"
msgstr "comand absent"
-#: sed/compile.c:192
+#: sed/compile.c:188
+msgid "\":\" lacks a label"
+msgstr ""
+
+#: sed/compile.c:190
+msgid "recursive escaping after \\c not allowed"
+msgstr ""
+
+#: sed/compile.c:213
#, c-format
msgid "%s: file %s line %lu: %s\n"
msgstr "%s: fiierul %s linia %lu: %s\n"
-#: sed/compile.c:195
+#: sed/compile.c:216
#, c-format
msgid "%s: -e expression #%lu, char %lu: %s\n"
msgstr "%s: -e expresia #%lu, caracterul %lu: %s\n"
-#: sed/compile.c:1657
+#: sed/compile.c:1639
#, c-format
msgid "can't find label for jump to `%s'"
msgstr "nu pot gsi eticheta pentru saltul la `%s'"
-#: sed/execute.c:595
+#: sed/execute.c:264 sed/execute.c:281
+#, c-format
+msgid "case conversion produced an invalid character"
+msgstr ""
+
+#: sed/execute.c:575
#, c-format
msgid "%s: can't read %s: %s\n"
msgstr "%s: nu pot citi %s: %s\n"
-#: sed/execute.c:624
+#: sed/execute.c:600
#, c-format
msgid "couldn't edit %s: is a terminal"
msgstr "nu am putut edita %s: acesta este un terminal"
-#: sed/execute.c:629
+#: sed/execute.c:605
#, 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:640
+#: sed/execute.c:616
#, c-format
msgid "%s: warning: failed to set default file creation context to %s: %s"
msgstr ""
-#: sed/execute.c:647
+#: sed/execute.c:624
#, c-format
msgid "%s: warning: failed to get security context of %s: %s"
msgstr ""
-#: sed/execute.c:664 sed/utils.c:211
+#: sed/execute.c:643 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:1193 sed/execute.c:1373
+#: sed/execute.c:1158 sed/execute.c:1368
msgid "error in subprocess"
msgstr "eroare n subproces"
-#: sed/execute.c:1195
+#: sed/execute.c:1160
msgid "option `e' not supported"
msgstr "opiunea `e' nu e suportat"
-#: sed/execute.c:1375
+#: sed/execute.c:1349
msgid "`e' command not supported"
msgstr "comanda `e' nu e suportat"
-#: sed/execute.c:1725
+#: sed/execute.c:1675
msgid "no input files"
msgstr ""
-#: sed/regexp.c:39
+#: sed/regexp.c:38
msgid "no previous regular expression"
msgstr "nici o expresie regular anterioar"
-#: sed/regexp.c:40
-msgid "cannot specify modifiers on empty regexp"
-msgstr "nu se pot specifica modificatori pentru regexp vid"
-
-#: sed/regexp.c:129
+#: sed/regexp.c:138
#, c-format
msgid "invalid reference \\%d on `s' command's RHS"
msgstr "referin invalid \\%d pentru expresia din dreapta a comenzii `s'"
-#: sed/sed.c:32
+#: sed/sed.c:35
msgid "Jay Fenlason"
msgstr ""
-#: sed/sed.c:33
+#: sed/sed.c:36
msgid "Tom Lord"
msgstr ""
-#: sed/sed.c:34
+#: sed/sed.c:37
msgid "Ken Pizzini"
msgstr ""
-#: sed/sed.c:35
+#: sed/sed.c:38
msgid "Paolo Bonzini"
msgstr ""
-#: sed/sed.c:79
+#: 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"
msgstr ""
-#: sed/sed.c:86
-#, fuzzy, c-format
-msgid ""
-"E-mail bug reports to: <%s>.\n"
-"Be sure to include the word ``%s'' somewhere in the ``Subject:'' field.\n"
+#: sed/sed.c:120
+#, c-format
+msgid "E-mail bug reports to: <%s>.\n"
msgstr ""
-"Raportai bug-uri prin e-mail la: %s .\n"
-"Fii siguri c includei ``%s'' undeva n cmpul ``Subject:''.\n"
-#: sed/sed.c:99
+#: sed/sed.c:129
msgid ""
" -R, --regexp-perl\n"
" use Perl 5's regular expressions syntax in the script.\n"
@@ -239,7 +619,7 @@ msgstr ""
" folosete sintaxa expresiilor regulare din Perl 5 n "
"script.\n"
-#: sed/sed.c:104
+#: sed/sed.c:134
#, c-format
msgid ""
"Usage: %s [OPTION]... {script-only-if-no-other-script} [input-file]...\n"
@@ -248,7 +628,7 @@ msgstr ""
"Folosire: %s [OPIUNE]... {script-dac-nu-alt-script} [fiier-intrare]...\n"
"\n"
-#: sed/sed.c:108
+#: sed/sed.c:138
#, c-format
msgid ""
" -n, --quiet, --silent\n"
@@ -257,7 +637,7 @@ msgstr ""
" -n, --quiet, --silent\n"
" elimin afiarea automat a spaiului de pattern\n"
-#: sed/sed.c:110
+#: sed/sed.c:140
#, c-format
msgid ""
" -e script, --expression=script\n"
@@ -266,7 +646,7 @@ msgstr ""
" -e script, --expression=script\n"
" adaug scriptul la comenzile ce trebuie executate\n"
-#: sed/sed.c:112
+#: sed/sed.c:142
#, c-format
msgid ""
" -f script-file, --file=script-file\n"
@@ -277,14 +657,14 @@ msgstr ""
" adaug coninutul scriptului-fiier la comenzile ce\n"
" trebuie executate\n"
-#: sed/sed.c:115
+#: sed/sed.c:146
#, c-format
msgid ""
" --follow-symlinks\n"
" follow symlinks when processing in place\n"
msgstr ""
-#: sed/sed.c:118
+#: sed/sed.c:149
#, fuzzy, c-format
msgid ""
" -i[SUFFIX], --in-place[=SUFFIX]\n"
@@ -294,7 +674,7 @@ msgstr ""
" editeaz fiierele pe loc (creaz copii de siguran\n"
" dac este furnizat extensia)\n"
-#: sed/sed.c:121
+#: sed/sed.c:153
#, c-format
msgid ""
" -b, --binary\n"
@@ -302,7 +682,7 @@ msgid ""
"specially)\n"
msgstr ""
-#: sed/sed.c:124
+#: sed/sed.c:157
#, c-format
msgid ""
" -l N, --line-length=N\n"
@@ -312,7 +692,7 @@ msgstr ""
" specific lungimea dorit pentru trecut la linia urmtoare\n"
" pentru comanda `l'\n"
-#: sed/sed.c:126
+#: sed/sed.c:159
#, c-format
msgid ""
" --posix\n"
@@ -321,29 +701,36 @@ msgstr ""
" --posix\n"
" deactiveaz toate extensiile GNU.\n"
-#: sed/sed.c:128
-#, c-format
+#: sed/sed.c:161
+#, fuzzy, c-format
msgid ""
-" -r, --regexp-extended\n"
-" use extended regular expressions in the script.\n"
+" -E, -r, --regexp-extended\n"
+" use extended regular expressions in the script\n"
+" (for portability use POSIX -E).\n"
msgstr ""
" -r, --regexp-extended\n"
" folosete sintaxa extins a expresiilor regulare n "
"script.\n"
-#: sed/sed.c:133
-#, c-format
+#: sed/sed.c:167
+#, fuzzy, c-format
msgid ""
" -s, --separate\n"
-" consider files as separate rather than as a single "
-"continuous\n"
-" long stream.\n"
+" consider files as separate rather than as a single,\n"
+" continuous long stream.\n"
msgstr ""
" -s, --separate\n"
" consider fiierele ca fiind separate, n loc de a le\n"
" considera un flux lung continuu.\n"
-#: sed/sed.c:136
+#: sed/sed.c:170
+#, c-format
+msgid ""
+" --sandbox\n"
+" operate in sandbox mode.\n"
+msgstr ""
+
+#: sed/sed.c:172
#, c-format
msgid ""
" -u, --unbuffered\n"
@@ -356,24 +743,24 @@ msgstr ""
"intrare\n"
" i golete bufferele mai des\n"
-#: sed/sed.c:139
+#: sed/sed.c:175
#, c-format
msgid ""
" -z, --null-data\n"
" separate lines by NUL characters\n"
msgstr ""
-#: sed/sed.c:141
+#: sed/sed.c:177
#, c-format
msgid " --help display this help and exit\n"
msgstr " --help afieaz aceste mesaje i termin\n"
-#: sed/sed.c:142
+#: sed/sed.c:178
#, c-format
msgid " --version output version information and exit\n"
msgstr " --version afieaz informaii despre versiune i termin\n"
-#: sed/sed.c:143
+#: sed/sed.c:179
#, c-format
msgid ""
"\n"
@@ -392,119 +779,57 @@ msgstr ""
"standard.\n"
"\n"
-#: sed/utils.c:74 sed/utils.c:432
+#: sed/utils.c:73 sed/utils.c:384
#, c-format
msgid "cannot remove %s: %s"
msgstr "nu pot terge %s: %s"
-#: sed/utils.c:144
+#: sed/utils.c:136
#, c-format
msgid "couldn't open file %s: %s"
msgstr "nu am putut deschide fiierul %s: %s"
-#: sed/utils.c:167
+#: sed/utils.c:155
#, fuzzy, c-format
msgid "couldn't attach to %s: %s"
msgstr "Nu am putut scrie %d articol n %s: %s"
-#: sed/utils.c:229
-#, c-format
-msgid "couldn't write %d item to %s: %s"
-msgid_plural "couldn't write %d items to %s: %s"
+#: sed/utils.c:192
+#, fuzzy, c-format
+msgid "couldn't write %llu item to %s: %s"
+msgid_plural "couldn't write %llu items to %s: %s"
msgstr[0] "Nu am putut scrie %d articol n %s: %s"
msgstr[1] "Nu am putut scrie %d articole n %s: %s"
-#: sed/utils.c:244 sed/utils.c:267
+#: sed/utils.c:204 sed/utils.c:223
#, c-format
msgid "read error on %s: %s"
msgstr "eroare citire pentru %s: %s"
-#: sed/utils.c:372
+#: sed/utils.c:325
#, fuzzy, c-format
msgid "couldn't follow symlink %s: %s"
msgstr "nu am putut deschide fiierul %s: %s"
-#: sed/utils.c:406
+#: sed/utils.c:359
#, fuzzy, c-format
msgid "cannot stat %s: %s"
msgstr "nu pot redenumi %s: %s"
-#: sed/utils.c:437
+#: sed/utils.c:389
#, c-format
msgid "cannot rename %s: %s"
msgstr "nu pot redenumi %s: %s"
-#: lib/regcomp.c:132
-msgid "Success"
-msgstr "Succes"
-
-#: lib/regcomp.c:135
-msgid "No match"
-msgstr "Nici o potrivire"
+#~ msgid "cannot specify modifiers on empty regexp"
+#~ msgstr "nu se pot specifica modificatori pentru regexp vid"
-#: lib/regcomp.c:138
-msgid "Invalid regular expression"
-msgstr "Expresie regular incorect"
-
-#: lib/regcomp.c:141
-msgid "Invalid collation character"
-msgstr "Colaiune de caractere incorect"
-
-#: lib/regcomp.c:144
-msgid "Invalid character class name"
-msgstr "Nume de clas de caractere incorect"
-
-#: lib/regcomp.c:147
-msgid "Trailing backslash"
-msgstr "Backslash n coad"
-
-#: lib/regcomp.c:150
-msgid "Invalid back reference"
-msgstr "Referin napoi incorect"
-
-#: lib/regcomp.c:153
-msgid "Unmatched [ or [^"
-msgstr "[ sau [^ fr pereche"
-
-#: lib/regcomp.c:156
-msgid "Unmatched ( or \\("
-msgstr "( sau \\( fr pereche"
-
-#: lib/regcomp.c:159
-msgid "Unmatched \\{"
-msgstr "\\{ fr pereche"
-
-#: lib/regcomp.c:162
-msgid "Invalid content of \\{\\}"
-msgstr "Coninut incorect pentru \\{\\}"
-
-#: lib/regcomp.c:165
-msgid "Invalid range end"
-msgstr "Sfrit de interval incorect"
-
-#: lib/regcomp.c:168
-msgid "Memory exhausted"
-msgstr "Memorie epuizat"
-
-#: lib/regcomp.c:171
-msgid "Invalid preceding regular expression"
-msgstr "Expresie regular precedent incorect"
-
-#: lib/regcomp.c:174
-msgid "Premature end of regular expression"
-msgstr "Sfrit prematur al expresiei regulare"
-
-#: lib/regcomp.c:177
-msgid "Regular expression too big"
-msgstr "Expresie regular prea mare"
-
-#: lib/regcomp.c:180
-msgid "Unmatched ) or \\)"
-msgstr ") sau \\) fr pereche"
-
-#: lib/regcomp.c:705
-msgid "No previous regular expression"
-msgstr "Nici o expresie regular anterioar"
+#~ msgid ""
+#~ "E-mail bug reports to: %s .\n"
+#~ "Be sure to include the word ``%s'' somewhere in the ``Subject:'' field.\n"
+#~ msgstr ""
+#~ "Raportai bug-uri prin e-mail la: %s .\n"
+#~ "Fii siguri c includei ``%s'' undeva n cmpul ``Subject:''.\n"
#~ msgid "super-sed version %s\n"
#~ msgstr "versiunea super-sed %s\n"
diff --git a/po/ru.gmo b/po/ru.gmo
index 13d039e..eaba7e2 100644
--- a/po/ru.gmo
+++ b/po/ru.gmo
Binary files differ
diff --git a/po/ru.po b/po/ru.po
index 30824b3..a19cef6 100644
--- a/po/ru.po
+++ b/po/ru.po
@@ -1,235 +1,643 @@
# Translation of sed to Russian
# Copyright (C) 1998, 2004 Free Software Foundation, Inc.
+# This file is distributed under the same license as the sed package.
+#
# Const Kaplinsky <const@ce.cctpu.edu.ru>, 1998.
# Pavel Maryanov <acid_jack@ukr.net>, 2004, 2008.
-#
+# Yuri Kozlov <yuray@komyakino.ru>, 2013, 2016.
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: 2012-12-22 14:36+0100\n"
-"PO-Revision-Date: 2008-01-17 23:34+0200\n"
-"Last-Translator: Pavel Maryanov <acid_jack@ukr.net>\n"
-"Language-Team: Russian <gnu@mx.ru>\n"
+"POT-Creation-Date: 2016-12-30 00:59-0800\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"
"Language: ru\n"
"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=utf-8\n"
+"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"Plural-Forms: nplurals=2; plural=n>1;\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: Lokalize 1.5\n"
+
+#: lib/closeout.c:112
+msgid "write error"
+msgstr "ошибка записи"
+
+#: lib/copy-acl.c:54
+#, c-format
+msgid "preserving permissions for %s"
+msgstr "сохранение прав доступа для %s"
+
+#: lib/dfa.c:1025 lib/dfa.c:1028 lib/dfa.c:1047 lib/dfa.c:1057 lib/dfa.c:1070
+#: lib/dfa.c:1098 lib/dfa.c:1107 lib/dfa.c:1110 lib/dfa.c:1115 lib/dfa.c:1137
+#: lib/dfa.c:1140
+msgid "unbalanced ["
+msgstr "несбалансированная ["
+
+#: lib/dfa.c:1083
+msgid "invalid character class"
+msgstr "неправильный класс символов"
+
+#: lib/dfa.c:1206
+msgid "character class syntax is [[:space:]], not [:space:]"
+msgstr "синтаксис класса символов: [[:space:]], а не [:space:]"
+
+#: lib/dfa.c:1275
+msgid "unfinished \\ escape"
+msgstr "незавершённая \\ экранирующая последовательность"
+
+#: lib/dfa.c:1436
+msgid "invalid content of \\{\\}"
+msgstr "неправильное содержимое в \\{\\}"
+
+#: lib/dfa.c:1439
+msgid "regular expression too big"
+msgstr "регулярное выражение слишком большое"
+
+#: lib/dfa.c:1853
+msgid "unbalanced ("
+msgstr "несбалансированная ("
+
+#: lib/dfa.c:1980
+msgid "no syntax specified"
+msgstr "не указан синтаксис"
+
+#: lib/dfa.c:1988
+msgid "unbalanced )"
+msgstr "несбалансированная )"
+
+#: lib/error.c:191
+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"
+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:667 lib/getopt.c:672
+#, c-format
+msgid "%s: option '%c%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"
+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
+#, 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
+#, 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 "память исчерпана"
+
+#. TRANSLATORS:
+#. Get translations for open and closing quotation marks.
+#. The message catalog should translate "`" to a left
+#. quotation mark suitable for the locale, and similarly for
+#. "'". For example, a French Unicode local should translate
+#. these to U+00AB (LEFT-POINTING DOUBLE ANGLE
+#. QUOTATION MARK), and U+00BB (RIGHT-POINTING DOUBLE ANGLE
+#. QUOTATION MARK), respectively.
+#.
+#. If the catalog has no translation, we will try to
+#. use Unicode U+2018 (LEFT SINGLE QUOTATION MARK) and
+#. Unicode U+2019 (RIGHT SINGLE QUOTATION MARK). If the
+#. current locale is not Unicode, locale_quoting_style
+#. will quote 'like this', and clocale_quoting_style will
+#. quote "like this". You should always include translations
+#. for "`" and "'" even if U+2018 and U+2019 are appropriate
+#. for your locale.
+#.
+#. If you don't know what to put here, please see
+#. <http://en.wikipedia.org/wiki/Quotation_marks_in_other_languages>
+#. and use glyphs suitable for your language.
+#: lib/quotearg.c:354
+msgid "`"
+msgstr "«"
+
+#: lib/quotearg.c:355
+msgid "'"
+msgstr "»"
+
+#: lib/regcomp.c:135
+msgid "Success"
+msgstr "Успешно"
+
+#: lib/regcomp.c:138
+msgid "No match"
+msgstr "Нет соответствия"
+
+#: lib/regcomp.c:141
+msgid "Invalid regular expression"
+msgstr "Недопустимое регулярное выражение"
+
+#: lib/regcomp.c:144
+msgid "Invalid collation character"
+msgstr "Недопустимый символ сравнения"
+
+#: lib/regcomp.c:147
+msgid "Invalid character class name"
+msgstr "Недопустимое имя для класса символа"
+
+#: lib/regcomp.c:150
+msgid "Trailing backslash"
+msgstr "Завершающая обратная косая черта"
+
+#: lib/regcomp.c:153
+msgid "Invalid back reference"
+msgstr "Недопустимая обратная ссылка"
+
+#: lib/regcomp.c:156
+msgid "Unmatched [, [^, [:, [., or [="
+msgstr "Непарная [, [^, [:, [. или [="
+
+#: lib/regcomp.c:159
+msgid "Unmatched ( or \\("
+msgstr "Непарный символ ( or \\("
+
+#: lib/regcomp.c:162
+msgid "Unmatched \\{"
+msgstr "Непарный символ \\{"
+
+#: lib/regcomp.c:165
+msgid "Invalid content of \\{\\}"
+msgstr "Недопустимое содержимое в \\{\\}"
+
+#: lib/regcomp.c:168
+msgid "Invalid range end"
+msgstr "Недопустимое окончание диапазона"
+
+#: lib/regcomp.c:171
+msgid "Memory exhausted"
+msgstr "Память исчерпана"
+
+#: lib/regcomp.c:174
+msgid "Invalid preceding regular expression"
+msgstr "Недопустимое предшествующее регулярное выражение"
+
+#: lib/regcomp.c:177
+msgid "Premature end of regular expression"
+msgstr "Преждевременное окончание регулярного выражения"
+
+#: lib/regcomp.c:180
+msgid "Regular expression too big"
+msgstr "Регулярное выражение слишком большое"
+
+#: lib/regcomp.c:183
+msgid "Unmatched ) or \\)"
+msgstr "Непарный символ ) или \\)"
+
+#: lib/regcomp.c:687
+msgid "No previous regular expression"
+msgstr "Нет предыдущего регулярного выражения"
+
+#: lib/set-acl.c:46
+#, c-format
+msgid "setting permissions for %s"
+msgstr "установка прав доступа для %s"
+
+#: lib/version-etc.c:74
+#, c-format
+msgid "Packaged by %s (%s)\n"
+msgstr "Упакован %s (%s)\n"
+
+#: lib/version-etc.c:77
+#, c-format
+msgid "Packaged by %s\n"
+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 "©"
+
+#: lib/version-etc.c:86
+msgid ""
+"\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"
+msgstr ""
+"\n"
+"Лицензия GPLv3+: GNU GPL версии 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 "Автор программы — %s.\n"
+
+#. TRANSLATORS: Each %s denotes an author name.
+#: lib/version-etc.c:106
+#, c-format
+msgid "Written by %s and %s.\n"
+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 "Авторы программы — %s, %s и %s.\n"
+
+#. TRANSLATORS: Each %s denotes an author name.
+#. You can use line breaks, estimating that each author name occupies
+#. ca. 16 screen columns and that a screen line has ca. 80 columns.
+#: lib/version-etc.c:117
+#, c-format
+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
+#. ca. 16 screen columns and that a screen line has ca. 80 columns.
+#: lib/version-etc.c:124
+#, c-format
+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
+#. ca. 16 screen columns and that a screen line has ca. 80 columns.
+#: lib/version-etc.c:131
+#, c-format
+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
+#. ca. 16 screen columns and that a screen line has ca. 80 columns.
+#: lib/version-etc.c:139
+#, c-format
+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
+#. ca. 16 screen columns and that a screen line has ca. 80 columns.
+#: lib/version-etc.c:147
+#, c-format
+msgid ""
+"Written by %s, %s, %s,\n"
+"%s, %s, %s, %s,\n"
+"and %s.\n"
+msgstr ""
+"Авторы программы — %s, %s, %s,\n"
+"%s, %s, %s, %s\n"
+"и %s.\n"
-#: sed/compile.c:144
+#. TRANSLATORS: Each %s denotes an author name.
+#. You can use line breaks, estimating that each author name occupies
+#. ca. 16 screen columns and that a screen line has ca. 80 columns.
+#: lib/version-etc.c:156
+#, c-format
+msgid ""
+"Written by %s, %s, %s,\n"
+"%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
+#. ca. 16 screen columns and that a screen line has ca. 80 columns.
+#: lib/version-etc.c:167
+#, c-format
+msgid ""
+"Written by %s, %s, %s,\n"
+"%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
+#. "Report translation bugs to <...>\n" with the address for translation
+#. bugs (typically your translation team's web or email address).
+#: lib/version-etc.c:245
+#, c-format
+msgid ""
+"\n"
+"Report bugs to: %s\n"
+msgstr ""
+"\n"
+"Об ошибках сообщайте по адресу <%s>\n"
+"Об ошибках в переводе сообщайте по адресу <gnu@d07.ru>\n"
+
+#: lib/version-etc.c:247
+#, c-format
+msgid "Report %s bugs to: %s\n"
+msgstr "Об ошибках в %s сообщайте по адресу %s\n"
+
+#: lib/version-etc.c:251
+#, c-format
+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"
+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 "Справка по работе с программами GNU: <http://www.gnu.org/gethelp/>\n"
+
+#: sed/compile.c:146
msgid "multiple `!'s"
-msgstr "несколько символов `!'"
+msgstr "несколько символов «!»"
-#: sed/compile.c:145
+#: sed/compile.c:147
msgid "unexpected `,'"
-msgstr "непредвиденный символ `,'"
+msgstr "непредвиденный символ «,»"
-#: sed/compile.c:146
+#: sed/compile.c:149
msgid "invalid usage of +N or ~N as first address"
msgstr "использование +N или ~N в качестве первого адреса недопустимо"
-#: sed/compile.c:147
+#: sed/compile.c:150
msgid "unmatched `{'"
-msgstr "непарный символ `{'"
+msgstr "непарный символ «{»"
-#: sed/compile.c:148
+#: sed/compile.c:151
msgid "unexpected `}'"
-msgstr "непредвиденный символ `}'"
+msgstr "непредвиденный символ «}»"
-#: sed/compile.c:149
+#: sed/compile.c:153
msgid "extra characters after command"
msgstr "лишние символы после команды"
-#: sed/compile.c:150
+#: sed/compile.c:155
msgid "expected \\ after `a', `c' or `i'"
-msgstr "ожидалась \\ после `a', `c' или `i'"
+msgstr "ожидалась \\ после «a», «c» или «i»"
-#: sed/compile.c:151
+#: sed/compile.c:157
msgid "`}' doesn't want any addresses"
-msgstr "`}' не допускает указания каких-либо адресов"
+msgstr "«}» не допускает указания каких-либо адресов"
-#: sed/compile.c:152
+#: sed/compile.c:159
msgid ": doesn't want any addresses"
-msgstr "`:' не допускает указания каких-либо адресов"
+msgstr "«:» не допускает указания каких-либо адресов"
-#: sed/compile.c:153
+#: sed/compile.c:161
msgid "comments don't accept any addresses"
msgstr "комментарии не допускают указания каких-либо адресов"
-#: sed/compile.c:154
+#: sed/compile.c:162
msgid "missing command"
msgstr "отсутствует команда"
-#: sed/compile.c:155
+#: sed/compile.c:163
msgid "command only uses one address"
msgstr "команда использует только один адрес"
-#: sed/compile.c:156
+#: sed/compile.c:164
msgid "unterminated address regex"
msgstr "незавершенное адресное регулярное выражение"
-#: sed/compile.c:157
+#: sed/compile.c:165
msgid "unterminated `s' command"
msgstr "незавершенная команда `s'"
-#: sed/compile.c:158
+#: sed/compile.c:166
msgid "unterminated `y' command"
msgstr "незавершенная команда `y'"
-#: sed/compile.c:159
+#: sed/compile.c:167
msgid "unknown option to `s'"
msgstr "неизвестный модификатор к `s'"
-#: sed/compile.c:160
+#: sed/compile.c:169
msgid "multiple `p' options to `s' command"
msgstr "несколько модификаторов `p' с командой `s'"
-#: sed/compile.c:161
+#: sed/compile.c:171
msgid "multiple `g' options to `s' command"
msgstr "несколько модификаторов `g' с командой `s'"
-#: sed/compile.c:162
+#: sed/compile.c:173
msgid "multiple number options to `s' command"
msgstr "несколько числовых модификаторов с командой `s'"
-#: sed/compile.c:163
+#: sed/compile.c:175
msgid "number option to `s' command may not be zero"
msgstr "числовой модификатор для команды `s' не может быть нулевым"
-#: sed/compile.c:164
+#: sed/compile.c:177
msgid "strings for `y' command are different lengths"
msgstr "строки для команды `y' имеют разную длину"
-#: sed/compile.c:165
+#: sed/compile.c:179
msgid "delimiter character is not a single-byte character"
msgstr "символ-разделитель не является однобайтовым символом"
-#: sed/compile.c:166
+#: sed/compile.c:181
msgid "expected newer version of sed"
msgstr "ожидалась более новая версия sed"
-#: sed/compile.c:167
+#: sed/compile.c:183
msgid "invalid usage of line address 0"
msgstr "недопустимое использование строки адреса 0"
-#: sed/compile.c:168
+#: sed/compile.c:184
#, c-format
msgid "unknown command: `%c'"
msgstr "неизвестная команда: `%c'"
-#: sed/compile.c:169
-#, fuzzy
+#: sed/compile.c:186
msgid "incomplete command"
-msgstr "отсутствует команда"
+msgstr "незавершённая команда"
-#: sed/compile.c:192
+#: sed/compile.c:188
+msgid "\":\" lacks a label"
+msgstr "у «:» отсутствует метка"
+
+#: sed/compile.c:190
+msgid "recursive escaping after \\c not allowed"
+msgstr "рекурсивное экранирование после \\c запрещено"
+
+#: sed/compile.c:213
#, c-format
msgid "%s: file %s line %lu: %s\n"
msgstr "%s: файл %s строка %lu: %s\n"
-#: sed/compile.c:195
+#: sed/compile.c:216
#, c-format
msgid "%s: -e expression #%lu, char %lu: %s\n"
msgstr "%s: -e выражение #%lu, символ %lu: %s\n"
-#: sed/compile.c:1657
+#: sed/compile.c:1639
#, c-format
msgid "can't find label for jump to `%s'"
msgstr "невозможно найти метку для перехода к `%s'"
-#: sed/execute.c:595
+#: sed/execute.c:264 sed/execute.c:281
+#, c-format
+msgid "case conversion produced an invalid character"
+msgstr "при преобразовании регистра получился некорректный символ"
+
+#: sed/execute.c:575
#, c-format
msgid "%s: can't read %s: %s\n"
msgstr "%s: невозможно прочитать %s: %s\n"
-#: sed/execute.c:624
+#: sed/execute.c:600
#, c-format
msgid "couldn't edit %s: is a terminal"
msgstr "невозможно редактировать %s: это терминал"
-#: sed/execute.c:629
+#: sed/execute.c:605
#, c-format
msgid "couldn't edit %s: not a regular file"
msgstr "невозможно редактировать %s: это не обычный файл"
-#: sed/execute.c:640
+#: sed/execute.c:616
#, c-format
msgid "%s: warning: failed to set default file creation context to %s: %s"
msgstr ""
+"%s: предупреждение: не удалось установить контекст безопасности файла по "
+"умолчанию в %s: %s"
-#: sed/execute.c:647
+#: sed/execute.c:624
#, c-format
msgid "%s: warning: failed to get security context of %s: %s"
-msgstr ""
+msgstr "%s: предупреждение: не удалось получить контекст безопасности %s: %s"
-#: sed/execute.c:664 sed/utils.c:211
+#: sed/execute.c:643 sed/utils.c:178
#, c-format
msgid "couldn't open temporary file %s: %s"
msgstr "невозможно открыть временный файл %s: %s"
-#: sed/execute.c:1193 sed/execute.c:1373
+#: sed/execute.c:1158 sed/execute.c:1368
msgid "error in subprocess"
msgstr "ошибка в подпроцессе"
-#: sed/execute.c:1195
+#: sed/execute.c:1160
msgid "option `e' not supported"
msgstr "опция `e' не поддерживается"
-#: sed/execute.c:1375
+#: sed/execute.c:1349
msgid "`e' command not supported"
msgstr "команда `e' не поддерживается"
-#: sed/execute.c:1725
+#: sed/execute.c:1675
msgid "no input files"
msgstr "отсутствуют входные файлы"
-#: sed/regexp.c:39
+#: sed/regexp.c:38
msgid "no previous regular expression"
msgstr "нет предыдущего регулярного выражения"
-#: sed/regexp.c:40
-msgid "cannot specify modifiers on empty regexp"
-msgstr "невозможно указать модификаторы в пустом регулярном выражении"
-
-#: sed/regexp.c:129
+#: sed/regexp.c:138
#, c-format
msgid "invalid reference \\%d on `s' command's RHS"
msgstr "недопустимая ссылка \\%d на RHS команды `s'"
-#: sed/sed.c:32
+#: sed/sed.c:35
msgid "Jay Fenlason"
-msgstr ""
+msgstr "Джей Фенласон (Jay Fenlason)"
-#: sed/sed.c:33
+#: sed/sed.c:36
msgid "Tom Lord"
-msgstr ""
+msgstr "Том Лорд (Tom Lord)"
-#: sed/sed.c:34
+#: sed/sed.c:37
msgid "Ken Pizzini"
-msgstr ""
+msgstr "Кен Пиццини (Ken Pizzini)"
-#: sed/sed.c:35
+#: sed/sed.c:38
msgid "Paolo Bonzini"
-msgstr ""
+msgstr "Паоло Бонзини (Paolo Bonzini)"
-#: sed/sed.c:79
+#: 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"
msgstr ""
+"Домашняя страница GNU sed: <http://www.gnu.org/software/sed/>.\n"
+"Справка по работе с программами GNU: <http://www.gnu.org/gethelp/>.\n"
-#: sed/sed.c:86
-#, fuzzy, c-format
-msgid ""
-"E-mail bug reports to: <%s>.\n"
-"Be sure to include the word ``%s'' somewhere in the ``Subject:'' field.\n"
-msgstr ""
-"Отчеты об ошибках отправляйте по адресу: %s .\n"
-"Убедитесь, что включили где-либо в поле ``Тема:'' слово ``%s''.\n"
+#: sed/sed.c:120
+#, c-format
+msgid "E-mail bug reports to: <%s>.\n"
+msgstr "Сообщения об ошибках отправляйте на <%s>.\n"
-#: sed/sed.c:99
+#: sed/sed.c:129
msgid ""
" -R, --regexp-perl\n"
" use Perl 5's regular expressions syntax in the script.\n"
@@ -238,7 +646,7 @@ msgstr ""
" использование в скрипте синтаксиса регулярных выражений "
"Perl 5.\n"
-#: sed/sed.c:104
+#: sed/sed.c:134
#, c-format
msgid ""
"Usage: %s [OPTION]... {script-only-if-no-other-script} [input-file]...\n"
@@ -248,7 +656,7 @@ msgstr ""
"[входной-файл]...\n"
"\n"
-#: sed/sed.c:108
+#: sed/sed.c:138
#, c-format
msgid ""
" -n, --quiet, --silent\n"
@@ -257,7 +665,7 @@ msgstr ""
" -n, --quiet, --silent\n"
" не выводить автоматически промежутки\n"
-#: sed/sed.c:110
+#: sed/sed.c:140
#, c-format
msgid ""
" -e script, --expression=script\n"
@@ -266,7 +674,7 @@ msgstr ""
" -e script, --expression=script\n"
" добавление скрипта в исполняемые команды\n"
-#: sed/sed.c:112
+#: sed/sed.c:142
#, c-format
msgid ""
" -f script-file, --file=script-file\n"
@@ -276,7 +684,7 @@ msgstr ""
" -f script-file, --file=script-file\n"
" добавление содержимого файла-скрипта в исполняемые команды\n"
-#: sed/sed.c:115
+#: sed/sed.c:146
#, c-format
msgid ""
" --follow-symlinks\n"
@@ -285,17 +693,17 @@ msgstr ""
" --follow-symlinks\n"
" переходить по символьным ссылкам при обработке на месте\n"
-#: sed/sed.c:118
-#, fuzzy, c-format
+#: sed/sed.c:149
+#, c-format
msgid ""
" -i[SUFFIX], --in-place[=SUFFIX]\n"
" edit files in place (makes backup if SUFFIX supplied)\n"
msgstr ""
" -i[СУФФИКС], --in-place[=СУФФИКС]\n"
-" редактирование файлов на месте (создает копию, если указано "
-"расширение)\n"
+" правка файлов на месте (создаёт копию, если указан "
+"СУФФИКС)\n"
-#: sed/sed.c:121
+#: sed/sed.c:153
#, c-format
msgid ""
" -b, --binary\n"
@@ -306,7 +714,7 @@ msgstr ""
" открывать файлы в бинарном режиме (CR+LF не "
"обрабатываются)\n"
-#: sed/sed.c:124
+#: sed/sed.c:157
#, c-format
msgid ""
" -l N, --line-length=N\n"
@@ -315,7 +723,7 @@ msgstr ""
" -l N, --line-length=N\n"
" указание желаемой длины переносимой строки для команды `l'\n"
-#: sed/sed.c:126
+#: sed/sed.c:159
#, c-format
msgid ""
" --posix\n"
@@ -324,28 +732,38 @@ msgstr ""
" --posix\n"
" отключение всех расширений GNU.\n"
-#: sed/sed.c:128
+#: sed/sed.c:161
#, c-format
msgid ""
-" -r, --regexp-extended\n"
-" use extended regular expressions in the script.\n"
+" -E, -r, --regexp-extended\n"
+" use extended regular expressions in the script\n"
+" (for portability use POSIX -E).\n"
msgstr ""
-" -r, --regexp-extended\n"
-" использование в скрипте расширенных регулярных выражений.\n"
+" -E, -r, --regexp-extended\n"
+" использование в скрипте расширенных регулярных выражений\n"
+" (для переносимости используйте -E (POSIX)\n"
-#: sed/sed.c:133
+#: sed/sed.c:167
#, c-format
msgid ""
" -s, --separate\n"
-" consider files as separate rather than as a single "
-"continuous\n"
-" long stream.\n"
+" consider files as separate rather than as a single,\n"
+" continuous long stream.\n"
msgstr ""
" -s, --separate\n"
" допущение, что файлы разделены, а не в виде одного\n"
-" длинного непрерывного потока.\n"
+" длинного непрерывного потока\n"
+
+#: sed/sed.c:170
+#, c-format
+msgid ""
+" --sandbox\n"
+" operate in sandbox mode.\n"
+msgstr ""
+" --sandbox\n"
+" работать в режиме «песочницы»\n"
-#: sed/sed.c:136
+#: sed/sed.c:172
#, c-format
msgid ""
" -u, --unbuffered\n"
@@ -357,24 +775,26 @@ msgstr ""
" загрузка минимального объема данных из входных файлов\n"
" и более частый сброс на диск выходных буферов\n"
-#: sed/sed.c:139
+#: sed/sed.c:175
#, c-format
msgid ""
" -z, --null-data\n"
" separate lines by NUL characters\n"
msgstr ""
+" -z, --null-data\n"
+" разделять строки символами NUL\n"
-#: sed/sed.c:141
+#: sed/sed.c:177
#, c-format
msgid " --help display this help and exit\n"
msgstr " --help вывод этой справки и выход\n"
-#: sed/sed.c:142
+#: sed/sed.c:178
#, c-format
msgid " --version output version information and exit\n"
msgstr " --version вывод информации о версии и выход\n"
-#: sed/sed.c:143
+#: sed/sed.c:179
#, c-format
msgid ""
"\n"
@@ -386,124 +806,63 @@ msgid ""
msgstr ""
"\n"
"Если опция -e, --expression, -f, или --file не указана, тогда первый\n"
-"неопциональный аргумент берется как скрипт sed для интерпретации. Все\n"
+"необязательный аргумент берётся как скрипт sed для интерпретации. Все\n"
"оставшиеся аргументы являются именами входных файлов; если входные\n"
-"файлы не указаны, тогда читается стантартный ввод.\n"
+"файлы не указаны, тогда читается стандартный ввод.\n"
"\n"
-#: sed/utils.c:74 sed/utils.c:432
+#: sed/utils.c:73 sed/utils.c:384
#, c-format
msgid "cannot remove %s: %s"
msgstr "невозможно удалить %s: %s"
-#: sed/utils.c:144
+#: sed/utils.c:136
#, c-format
msgid "couldn't open file %s: %s"
msgstr "невозможно открыть файл %s: %s"
-#: sed/utils.c:167
+#: sed/utils.c:155
#, c-format
msgid "couldn't attach to %s: %s"
msgstr "невозможно прикрепить к %s: %s"
-#: sed/utils.c:229
+#: sed/utils.c:192
#, c-format
-msgid "couldn't write %d item to %s: %s"
-msgid_plural "couldn't write %d items to %s: %s"
-msgstr[0] "невозможно записать %d элемент в %s: %s"
-msgstr[1] "невозможно записать %d элементов в %s: %s"
+msgid "couldn't write %llu item to %s: %s"
+msgid_plural "couldn't write %llu items to %s: %s"
+msgstr[0] "невозможно записать %llu элемент в %s: %s"
+msgstr[1] "невозможно записать %llu элемента в %s: %s"
+msgstr[2] "невозможно записать %llu элементов в %s: %s"
-#: sed/utils.c:244 sed/utils.c:267
+#: sed/utils.c:204 sed/utils.c:223
#, c-format
msgid "read error on %s: %s"
msgstr "ошибка чтения %s: %s"
-#: sed/utils.c:372
+#: sed/utils.c:325
#, c-format
msgid "couldn't follow symlink %s: %s"
msgstr "невозможно перейти по символьной ссылке %s: %s"
-#: sed/utils.c:406
+#: sed/utils.c:359
#, c-format
msgid "cannot stat %s: %s"
msgstr "невозможно выполнить stat для %s: %s"
-#: sed/utils.c:437
+#: sed/utils.c:389
#, c-format
msgid "cannot rename %s: %s"
msgstr "невозможно переименовать %s: %s"
-#: lib/regcomp.c:132
-msgid "Success"
-msgstr "Успешно"
-
-#: lib/regcomp.c:135
-msgid "No match"
-msgstr "Нет соотвествия"
-
-#: lib/regcomp.c:138
-msgid "Invalid regular expression"
-msgstr "Недопустимое регулярное выражение"
-
-#: lib/regcomp.c:141
-msgid "Invalid collation character"
-msgstr "Недопустимый символ сравнения"
-
-#: lib/regcomp.c:144
-msgid "Invalid character class name"
-msgstr "Недопустимое имя для класса символа"
-
-#: lib/regcomp.c:147
-msgid "Trailing backslash"
-msgstr "Завершающая обратная косая черта"
-
-#: lib/regcomp.c:150
-msgid "Invalid back reference"
-msgstr "Недопустимая обратная ссылка"
-
-#: lib/regcomp.c:153
-msgid "Unmatched [ or [^"
-msgstr "Непарный символ [ или [^"
-
-#: lib/regcomp.c:156
-msgid "Unmatched ( or \\("
-msgstr "Непарный символ ( or \\("
-
-#: lib/regcomp.c:159
-msgid "Unmatched \\{"
-msgstr "Непарный символ \\{"
-
-#: lib/regcomp.c:162
-msgid "Invalid content of \\{\\}"
-msgstr "Недопустимое содержимое в \\{\\}"
+#~ msgid "cannot specify modifiers on empty regexp"
+#~ msgstr "невозможно указать модификаторы в пустом регулярном выражении"
-#: lib/regcomp.c:165
-msgid "Invalid range end"
-msgstr "Недопустимое окончание диапазона"
-
-#: lib/regcomp.c:168
-msgid "Memory exhausted"
-msgstr "Память исчерпана"
-
-#: lib/regcomp.c:171
-msgid "Invalid preceding regular expression"
-msgstr "Недопустимое предшествующее регулярное выражение"
-
-#: lib/regcomp.c:174
-msgid "Premature end of regular expression"
-msgstr "Преждевременное окончание регулярного выражения"
-
-#: lib/regcomp.c:177
-msgid "Regular expression too big"
-msgstr "Регулярное выражение слишком большое"
-
-#: lib/regcomp.c:180
-msgid "Unmatched ) or \\)"
-msgstr "Непарный символ ) или \\)"
-
-#: lib/regcomp.c:705
-msgid "No previous regular expression"
-msgstr "Нет предыдущего регулярного выражения"
+#~ msgid ""
+#~ "E-mail bug reports to: <%s>.\n"
+#~ "Be sure to include the word ``%s'' somewhere in the ``Subject:'' field.\n"
+#~ msgstr ""
+#~ "Сообщения об ошибках отправляйте по адресу: <%s>.\n"
+#~ "Убедитесь, что включили где-либо в поле «Тема:» слово «%s».\n"
#~ msgid "super-sed version %s\n"
#~ msgstr "super-sed версия %s\n"
@@ -519,17 +878,16 @@ msgstr "Нет предыдущего регулярного выражения"
#~ msgstr "GNU sed версия %s\n"
#~ msgid ""
-#~ "%s\n"
+#~ "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 ""
-#~ "%s\n"
-#~ "Это свободное программное обеспечение; условия его копирования смотрите "
-#~ "в\n"
-#~ "исходных текстах. Не предоставляется НИКАКОЙ гарантии; даже гарантии\n"
+#~ "Copyright (C) %d Free Software Foundation, Inc.\n"
+#~ "Это свободное ПО; условия его копирования смотрите в\n"
+#~ "исходном коде. Не предоставляется НИКАКОЙ гарантии; даже гарантии\n"
#~ "ПРИГОДНОСТИ ДЛЯ ПРОДАЖИ или ПРИМЕНИМОСТИ ДЛЯ КОНКРЕТНОЙ ЦЕЛИ, в той "
#~ "мере,\n"
#~ "в которой это может быть допущено законодательством.\n"
diff --git a/po/sed.pot b/po/sed.pot
index 3524c6c..e07364a 100644
--- a/po/sed.pot
+++ b/po/sed.pot
@@ -1,14 +1,14 @@
# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR Free Software Foundation, Inc.
-# This file is distributed under the same license as the PACKAGE package.
+# This file is distributed under the same license as the GNU sed package.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
#
#, fuzzy
msgid ""
msgstr ""
-"Project-Id-Version: GNU sed 4.2.2\n"
+"Project-Id-Version: GNU sed 4.3\n"
"Report-Msgid-Bugs-To: bug-gnu-utils@gnu.org\n"
-"POT-Creation-Date: 2012-12-22 14:36+0100\n"
+"POT-Creation-Date: 2016-12-30 00:59-0800\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,243 +18,619 @@ msgstr ""
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=INTEGER; plural=EXPRESSION;\n"
-#: sed/compile.c:144
+#: lib/closeout.c:112
+msgid "write error"
+msgstr ""
+
+#: lib/copy-acl.c:54
+#, c-format
+msgid "preserving permissions for %s"
+msgstr ""
+
+#: lib/dfa.c:1025 lib/dfa.c:1028 lib/dfa.c:1047 lib/dfa.c:1057 lib/dfa.c:1070
+#: lib/dfa.c:1098 lib/dfa.c:1107 lib/dfa.c:1110 lib/dfa.c:1115 lib/dfa.c:1137
+#: lib/dfa.c:1140
+msgid "unbalanced ["
+msgstr ""
+
+#: lib/dfa.c:1083
+msgid "invalid character class"
+msgstr ""
+
+#: lib/dfa.c:1206
+msgid "character class syntax is [[:space:]], not [:space:]"
+msgstr ""
+
+#: lib/dfa.c:1275
+msgid "unfinished \\ escape"
+msgstr ""
+
+#: lib/dfa.c:1436
+msgid "invalid content of \\{\\}"
+msgstr ""
+
+#: lib/dfa.c:1439
+msgid "regular expression too big"
+msgstr ""
+
+#: lib/dfa.c:1853
+msgid "unbalanced ("
+msgstr ""
+
+#: lib/dfa.c:1980
+msgid "no syntax specified"
+msgstr ""
+
+#: lib/dfa.c:1988
+msgid "unbalanced )"
+msgstr ""
+
+#: lib/error.c:191
+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 ""
+
+#: lib/getopt.c:654 lib/getopt.c:658
+#, c-format
+msgid "%s: option '--%s' doesn't allow an argument\n"
+msgstr ""
+
+#: 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:715 lib/getopt.c:734
+#, c-format
+msgid "%s: option '--%s' requires an argument\n"
+msgstr ""
+
+#: 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
+#, 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
+#, 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 ""
+
+#. TRANSLATORS:
+#. Get translations for open and closing quotation marks.
+#. The message catalog should translate "`" to a left
+#. quotation mark suitable for the locale, and similarly for
+#. "'". For example, a French Unicode local should translate
+#. these to U+00AB (LEFT-POINTING DOUBLE ANGLE
+#. QUOTATION MARK), and U+00BB (RIGHT-POINTING DOUBLE ANGLE
+#. QUOTATION MARK), respectively.
+#.
+#. If the catalog has no translation, we will try to
+#. use Unicode U+2018 (LEFT SINGLE QUOTATION MARK) and
+#. Unicode U+2019 (RIGHT SINGLE QUOTATION MARK). If the
+#. current locale is not Unicode, locale_quoting_style
+#. will quote 'like this', and clocale_quoting_style will
+#. quote "like this". You should always include translations
+#. for "`" and "'" even if U+2018 and U+2019 are appropriate
+#. for your locale.
+#.
+#. If you don't know what to put here, please see
+#. <http://en.wikipedia.org/wiki/Quotation_marks_in_other_languages>
+#. and use glyphs suitable for your language.
+#: lib/quotearg.c:354
+msgid "`"
+msgstr ""
+
+#: lib/quotearg.c:355
+msgid "'"
+msgstr ""
+
+#: lib/regcomp.c:135
+msgid "Success"
+msgstr ""
+
+#: lib/regcomp.c:138
+msgid "No match"
+msgstr ""
+
+#: lib/regcomp.c:141
+msgid "Invalid regular expression"
+msgstr ""
+
+#: lib/regcomp.c:144
+msgid "Invalid collation character"
+msgstr ""
+
+#: lib/regcomp.c:147
+msgid "Invalid character class name"
+msgstr ""
+
+#: lib/regcomp.c:150
+msgid "Trailing backslash"
+msgstr ""
+
+#: lib/regcomp.c:153
+msgid "Invalid back reference"
+msgstr ""
+
+#: lib/regcomp.c:156
+msgid "Unmatched [, [^, [:, [., or [="
+msgstr ""
+
+#: lib/regcomp.c:159
+msgid "Unmatched ( or \\("
+msgstr ""
+
+#: lib/regcomp.c:162
+msgid "Unmatched \\{"
+msgstr ""
+
+#: lib/regcomp.c:165
+msgid "Invalid content of \\{\\}"
+msgstr ""
+
+#: lib/regcomp.c:168
+msgid "Invalid range end"
+msgstr ""
+
+#: lib/regcomp.c:171
+msgid "Memory exhausted"
+msgstr ""
+
+#: lib/regcomp.c:174
+msgid "Invalid preceding regular expression"
+msgstr ""
+
+#: lib/regcomp.c:177
+msgid "Premature end of regular expression"
+msgstr ""
+
+#: lib/regcomp.c:180
+msgid "Regular expression too big"
+msgstr ""
+
+#: lib/regcomp.c:183
+msgid "Unmatched ) or \\)"
+msgstr ""
+
+#: lib/regcomp.c:687
+msgid "No previous regular expression"
+msgstr ""
+
+#: lib/set-acl.c:46
+#, c-format
+msgid "setting permissions for %s"
+msgstr ""
+
+#: lib/version-etc.c:74
+#, c-format
+msgid "Packaged by %s (%s)\n"
+msgstr ""
+
+#: lib/version-etc.c:77
+#, c-format
+msgid "Packaged by %s\n"
+msgstr ""
+
+#. 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 ""
+
+#: lib/version-etc.c:86
+msgid ""
+"\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"
+msgstr ""
+
+#. TRANSLATORS: %s denotes an author name.
+#: lib/version-etc.c:102
+#, c-format
+msgid "Written by %s.\n"
+msgstr ""
+
+#. TRANSLATORS: Each %s denotes an author name.
+#: lib/version-etc.c:106
+#, c-format
+msgid "Written by %s and %s.\n"
+msgstr ""
+
+#. TRANSLATORS: Each %s denotes an author name.
+#: lib/version-etc.c:110
+#, c-format
+msgid "Written by %s, %s, and %s.\n"
+msgstr ""
+
+#. TRANSLATORS: Each %s denotes an author name.
+#. You can use line breaks, estimating that each author name occupies
+#. ca. 16 screen columns and that a screen line has ca. 80 columns.
+#: lib/version-etc.c:117
+#, c-format
+msgid ""
+"Written by %s, %s, %s,\n"
+"and %s.\n"
+msgstr ""
+
+#. TRANSLATORS: Each %s denotes an author name.
+#. You can use line breaks, estimating that each author name occupies
+#. ca. 16 screen columns and that a screen line has ca. 80 columns.
+#: lib/version-etc.c:124
+#, c-format
+msgid ""
+"Written by %s, %s, %s,\n"
+"%s, and %s.\n"
+msgstr ""
+
+#. TRANSLATORS: Each %s denotes an author name.
+#. You can use line breaks, estimating that each author name occupies
+#. ca. 16 screen columns and that a screen line has ca. 80 columns.
+#: lib/version-etc.c:131
+#, c-format
+msgid ""
+"Written by %s, %s, %s,\n"
+"%s, %s, and %s.\n"
+msgstr ""
+
+#. TRANSLATORS: Each %s denotes an author name.
+#. You can use line breaks, estimating that each author name occupies
+#. ca. 16 screen columns and that a screen line has ca. 80 columns.
+#: lib/version-etc.c:139
+#, c-format
+msgid ""
+"Written by %s, %s, %s,\n"
+"%s, %s, %s, and %s.\n"
+msgstr ""
+
+#. TRANSLATORS: Each %s denotes an author name.
+#. You can use line breaks, estimating that each author name occupies
+#. ca. 16 screen columns and that a screen line has ca. 80 columns.
+#: lib/version-etc.c:147
+#, c-format
+msgid ""
+"Written by %s, %s, %s,\n"
+"%s, %s, %s, %s,\n"
+"and %s.\n"
+msgstr ""
+
+#. TRANSLATORS: Each %s denotes an author name.
+#. You can use line breaks, estimating that each author name occupies
+#. ca. 16 screen columns and that a screen line has ca. 80 columns.
+#: lib/version-etc.c:156
+#, c-format
+msgid ""
+"Written by %s, %s, %s,\n"
+"%s, %s, %s, %s,\n"
+"%s, and %s.\n"
+msgstr ""
+
+#. TRANSLATORS: Each %s denotes an author name.
+#. You can use line breaks, estimating that each author name occupies
+#. ca. 16 screen columns and that a screen line has ca. 80 columns.
+#: lib/version-etc.c:167
+#, c-format
+msgid ""
+"Written by %s, %s, %s,\n"
+"%s, %s, %s, %s,\n"
+"%s, %s, and others.\n"
+msgstr ""
+
+#. TRANSLATORS: The placeholder indicates the bug-reporting address
+#. for this package. Please add _another line_ saying
+#. "Report translation bugs to <...>\n" with the address for translation
+#. bugs (typically your translation team's web or email address).
+#: lib/version-etc.c:245
+#, c-format
+msgid ""
+"\n"
+"Report bugs to: %s\n"
+msgstr ""
+
+#: lib/version-etc.c:247
+#, c-format
+msgid "Report %s bugs to: %s\n"
+msgstr ""
+
+#: lib/version-etc.c:251
+#, c-format
+msgid "%s home page: <%s>\n"
+msgstr ""
+
+#: lib/version-etc.c:253
+#, c-format
+msgid "%s home page: <http://www.gnu.org/software/%s/>\n"
+msgstr ""
+
+#: lib/version-etc.c:256
+msgid "General help using GNU software: <http://www.gnu.org/gethelp/>\n"
+msgstr ""
+
+#: sed/compile.c:146
msgid "multiple `!'s"
msgstr ""
-#: sed/compile.c:145
+#: sed/compile.c:147
msgid "unexpected `,'"
msgstr ""
-#: sed/compile.c:146
+#: sed/compile.c:149
msgid "invalid usage of +N or ~N as first address"
msgstr ""
-#: sed/compile.c:147
+#: sed/compile.c:150
msgid "unmatched `{'"
msgstr ""
-#: sed/compile.c:148
+#: sed/compile.c:151
msgid "unexpected `}'"
msgstr ""
-#: sed/compile.c:149
+#: sed/compile.c:153
msgid "extra characters after command"
msgstr ""
-#: sed/compile.c:150
+#: sed/compile.c:155
msgid "expected \\ after `a', `c' or `i'"
msgstr ""
-#: sed/compile.c:151
+#: sed/compile.c:157
msgid "`}' doesn't want any addresses"
msgstr ""
-#: sed/compile.c:152
+#: sed/compile.c:159
msgid ": doesn't want any addresses"
msgstr ""
-#: sed/compile.c:153
+#: sed/compile.c:161
msgid "comments don't accept any addresses"
msgstr ""
-#: sed/compile.c:154
+#: sed/compile.c:162
msgid "missing command"
msgstr ""
-#: sed/compile.c:155
+#: sed/compile.c:163
msgid "command only uses one address"
msgstr ""
-#: sed/compile.c:156
+#: sed/compile.c:164
msgid "unterminated address regex"
msgstr ""
-#: sed/compile.c:157
+#: sed/compile.c:165
msgid "unterminated `s' command"
msgstr ""
-#: sed/compile.c:158
+#: sed/compile.c:166
msgid "unterminated `y' command"
msgstr ""
-#: sed/compile.c:159
+#: sed/compile.c:167
msgid "unknown option to `s'"
msgstr ""
-#: sed/compile.c:160
+#: sed/compile.c:169
msgid "multiple `p' options to `s' command"
msgstr ""
-#: sed/compile.c:161
+#: sed/compile.c:171
msgid "multiple `g' options to `s' command"
msgstr ""
-#: sed/compile.c:162
+#: sed/compile.c:173
msgid "multiple number options to `s' command"
msgstr ""
-#: sed/compile.c:163
+#: sed/compile.c:175
msgid "number option to `s' command may not be zero"
msgstr ""
-#: sed/compile.c:164
+#: sed/compile.c:177
msgid "strings for `y' command are different lengths"
msgstr ""
-#: sed/compile.c:165
+#: sed/compile.c:179
msgid "delimiter character is not a single-byte character"
msgstr ""
-#: sed/compile.c:166
+#: sed/compile.c:181
msgid "expected newer version of sed"
msgstr ""
-#: sed/compile.c:167
+#: sed/compile.c:183
msgid "invalid usage of line address 0"
msgstr ""
-#: sed/compile.c:168
+#: sed/compile.c:184
#, c-format
msgid "unknown command: `%c'"
msgstr ""
-#: sed/compile.c:169
+#: sed/compile.c:186
msgid "incomplete command"
msgstr ""
-#: sed/compile.c:192
+#: sed/compile.c:188
+msgid "\":\" lacks a label"
+msgstr ""
+
+#: sed/compile.c:190
+msgid "recursive escaping after \\c not allowed"
+msgstr ""
+
+#: sed/compile.c:213
#, c-format
msgid "%s: file %s line %lu: %s\n"
msgstr ""
-#: sed/compile.c:195
+#: sed/compile.c:216
#, c-format
msgid "%s: -e expression #%lu, char %lu: %s\n"
msgstr ""
-#: sed/compile.c:1657
+#: sed/compile.c:1639
#, c-format
msgid "can't find label for jump to `%s'"
msgstr ""
-#: sed/execute.c:595
+#: sed/execute.c:264 sed/execute.c:281
+#, c-format
+msgid "case conversion produced an invalid character"
+msgstr ""
+
+#: sed/execute.c:575
#, c-format
msgid "%s: can't read %s: %s\n"
msgstr ""
-#: sed/execute.c:624
+#: sed/execute.c:600
#, c-format
msgid "couldn't edit %s: is a terminal"
msgstr ""
-#: sed/execute.c:629
+#: sed/execute.c:605
#, c-format
msgid "couldn't edit %s: not a regular file"
msgstr ""
-#: sed/execute.c:640
+#: sed/execute.c:616
#, c-format
msgid "%s: warning: failed to set default file creation context to %s: %s"
msgstr ""
-#: sed/execute.c:647
+#: sed/execute.c:624
#, c-format
msgid "%s: warning: failed to get security context of %s: %s"
msgstr ""
-#: sed/execute.c:664 sed/utils.c:211
+#: sed/execute.c:643 sed/utils.c:178
#, c-format
msgid "couldn't open temporary file %s: %s"
msgstr ""
-#: sed/execute.c:1193 sed/execute.c:1373
+#: sed/execute.c:1158 sed/execute.c:1368
msgid "error in subprocess"
msgstr ""
-#: sed/execute.c:1195
+#: sed/execute.c:1160
msgid "option `e' not supported"
msgstr ""
-#: sed/execute.c:1375
+#: sed/execute.c:1349
msgid "`e' command not supported"
msgstr ""
-#: sed/execute.c:1725
+#: sed/execute.c:1675
msgid "no input files"
msgstr ""
-#: sed/regexp.c:39
+#: sed/regexp.c:38
msgid "no previous regular expression"
msgstr ""
-#: sed/regexp.c:40
-msgid "cannot specify modifiers on empty regexp"
-msgstr ""
-
-#: sed/regexp.c:129
+#: sed/regexp.c:138
#, c-format
msgid "invalid reference \\%d on `s' command's RHS"
msgstr ""
-#: sed/sed.c:32
+#: sed/sed.c:35
msgid "Jay Fenlason"
msgstr ""
-#: sed/sed.c:33
+#: sed/sed.c:36
msgid "Tom Lord"
msgstr ""
-#: sed/sed.c:34
+#: sed/sed.c:37
msgid "Ken Pizzini"
msgstr ""
-#: sed/sed.c:35
+#: sed/sed.c:38
msgid "Paolo Bonzini"
msgstr ""
-#: sed/sed.c:79
+#: 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"
msgstr ""
-#: sed/sed.c:86
+#: sed/sed.c:120
#, c-format
-msgid ""
-"E-mail bug reports to: <%s>.\n"
-"Be sure to include the word ``%s'' somewhere in the ``Subject:'' field.\n"
+msgid "E-mail bug reports to: <%s>.\n"
msgstr ""
-#: sed/sed.c:99
+#: sed/sed.c:129
msgid ""
" -R, --regexp-perl\n"
" use Perl 5's regular expressions syntax in the script.\n"
msgstr ""
-#: sed/sed.c:104
+#: sed/sed.c:134
#, c-format
msgid ""
"Usage: %s [OPTION]... {script-only-if-no-other-script} [input-file]...\n"
"\n"
msgstr ""
-#: sed/sed.c:108
+#: sed/sed.c:138
#, c-format
msgid ""
" -n, --quiet, --silent\n"
" suppress automatic printing of pattern space\n"
msgstr ""
-#: sed/sed.c:110
+#: sed/sed.c:140
#, c-format
msgid ""
" -e script, --expression=script\n"
" add the script to the commands to be executed\n"
msgstr ""
-#: sed/sed.c:112
+#: sed/sed.c:142
#, c-format
msgid ""
" -f script-file, --file=script-file\n"
@@ -262,21 +638,21 @@ msgid ""
"executed\n"
msgstr ""
-#: sed/sed.c:115
+#: sed/sed.c:146
#, c-format
msgid ""
" --follow-symlinks\n"
" follow symlinks when processing in place\n"
msgstr ""
-#: sed/sed.c:118
+#: sed/sed.c:149
#, c-format
msgid ""
" -i[SUFFIX], --in-place[=SUFFIX]\n"
" edit files in place (makes backup if SUFFIX supplied)\n"
msgstr ""
-#: sed/sed.c:121
+#: sed/sed.c:153
#, c-format
msgid ""
" -b, --binary\n"
@@ -284,37 +660,44 @@ msgid ""
"specially)\n"
msgstr ""
-#: sed/sed.c:124
+#: sed/sed.c:157
#, c-format
msgid ""
" -l N, --line-length=N\n"
" specify the desired line-wrap length for the `l' command\n"
msgstr ""
-#: sed/sed.c:126
+#: sed/sed.c:159
#, c-format
msgid ""
" --posix\n"
" disable all GNU extensions.\n"
msgstr ""
-#: sed/sed.c:128
+#: sed/sed.c:161
#, c-format
msgid ""
-" -r, --regexp-extended\n"
-" use extended regular expressions in the script.\n"
+" -E, -r, --regexp-extended\n"
+" use extended regular expressions in the script\n"
+" (for portability use POSIX -E).\n"
msgstr ""
-#: sed/sed.c:133
+#: sed/sed.c:167
#, c-format
msgid ""
" -s, --separate\n"
-" consider files as separate rather than as a single "
-"continuous\n"
-" long stream.\n"
+" consider files as separate rather than as a single,\n"
+" continuous long stream.\n"
msgstr ""
-#: sed/sed.c:136
+#: sed/sed.c:170
+#, c-format
+msgid ""
+" --sandbox\n"
+" operate in sandbox mode.\n"
+msgstr ""
+
+#: sed/sed.c:172
#, c-format
msgid ""
" -u, --unbuffered\n"
@@ -323,24 +706,24 @@ msgid ""
" the output buffers more often\n"
msgstr ""
-#: sed/sed.c:139
+#: sed/sed.c:175
#, c-format
msgid ""
" -z, --null-data\n"
" separate lines by NUL characters\n"
msgstr ""
-#: sed/sed.c:141
+#: sed/sed.c:177
#, c-format
msgid " --help display this help and exit\n"
msgstr ""
-#: sed/sed.c:142
+#: sed/sed.c:178
#, c-format
msgid " --version output version information and exit\n"
msgstr ""
-#: sed/sed.c:143
+#: sed/sed.c:179
#, c-format
msgid ""
"\n"
@@ -351,116 +734,44 @@ msgid ""
"\n"
msgstr ""
-#: sed/utils.c:74 sed/utils.c:432
+#: sed/utils.c:73 sed/utils.c:384
#, c-format
msgid "cannot remove %s: %s"
msgstr ""
-#: sed/utils.c:144
+#: sed/utils.c:136
#, c-format
msgid "couldn't open file %s: %s"
msgstr ""
-#: sed/utils.c:167
+#: sed/utils.c:155
#, c-format
msgid "couldn't attach to %s: %s"
msgstr ""
-#: sed/utils.c:229
+#: sed/utils.c:192
#, c-format
-msgid "couldn't write %d item to %s: %s"
-msgid_plural "couldn't write %d items to %s: %s"
+msgid "couldn't write %llu item to %s: %s"
+msgid_plural "couldn't write %llu items to %s: %s"
msgstr[0] ""
msgstr[1] ""
-#: sed/utils.c:244 sed/utils.c:267
+#: sed/utils.c:204 sed/utils.c:223
#, c-format
msgid "read error on %s: %s"
msgstr ""
-#: sed/utils.c:372
+#: sed/utils.c:325
#, c-format
msgid "couldn't follow symlink %s: %s"
msgstr ""
-#: sed/utils.c:406
+#: sed/utils.c:359
#, c-format
msgid "cannot stat %s: %s"
msgstr ""
-#: sed/utils.c:437
+#: sed/utils.c:389
#, c-format
msgid "cannot rename %s: %s"
msgstr ""
-
-#: lib/regcomp.c:132
-msgid "Success"
-msgstr ""
-
-#: lib/regcomp.c:135
-msgid "No match"
-msgstr ""
-
-#: lib/regcomp.c:138
-msgid "Invalid regular expression"
-msgstr ""
-
-#: lib/regcomp.c:141
-msgid "Invalid collation character"
-msgstr ""
-
-#: lib/regcomp.c:144
-msgid "Invalid character class name"
-msgstr ""
-
-#: lib/regcomp.c:147
-msgid "Trailing backslash"
-msgstr ""
-
-#: lib/regcomp.c:150
-msgid "Invalid back reference"
-msgstr ""
-
-#: lib/regcomp.c:153
-msgid "Unmatched [ or [^"
-msgstr ""
-
-#: lib/regcomp.c:156
-msgid "Unmatched ( or \\("
-msgstr ""
-
-#: lib/regcomp.c:159
-msgid "Unmatched \\{"
-msgstr ""
-
-#: lib/regcomp.c:162
-msgid "Invalid content of \\{\\}"
-msgstr ""
-
-#: lib/regcomp.c:165
-msgid "Invalid range end"
-msgstr ""
-
-#: lib/regcomp.c:168
-msgid "Memory exhausted"
-msgstr ""
-
-#: lib/regcomp.c:171
-msgid "Invalid preceding regular expression"
-msgstr ""
-
-#: lib/regcomp.c:174
-msgid "Premature end of regular expression"
-msgstr ""
-
-#: lib/regcomp.c:177
-msgid "Regular expression too big"
-msgstr ""
-
-#: lib/regcomp.c:180
-msgid "Unmatched ) or \\)"
-msgstr ""
-
-#: lib/regcomp.c:705
-msgid "No previous regular expression"
-msgstr ""
diff --git a/po/sk.gmo b/po/sk.gmo
index 5de88de..13f145d 100644
--- a/po/sk.gmo
+++ b/po/sk.gmo
Binary files differ
diff --git a/po/sk.po b/po/sk.po
index 5c30e6e..8db7410 100644
--- a/po/sk.po
+++ b/po/sk.po
@@ -1,222 +1,630 @@
# Slovak translations for GNU sed package.
-# Copyright (C) 1999, 2002, 2003, 2004, 2005, 2008, 2010 Free Software Foundation, Inc.
+# Copyright (C) 1999, 2002, 2003, 2004, 2005, 2008, 2010, 2016 Free Software Foundation, Inc.
# This file is distributed under the same license as the sed package.
-# Marcel Telka <marcel@telka.sk>, 2002, 2003, 2004, 2005, 2008, 2010.
# Miroslav Vasko <vasko@debian.cz>, 1999.
+# Marcel Telka <marcel@telka.sk>, 2002, 2003, 2004, 2005, 2008, 2010, 2016.
#
msgid ""
msgstr ""
-"Project-Id-Version: GNU sed 4.2.1\n"
+"Project-Id-Version: GNU sed 4.2.2.177\n"
"Report-Msgid-Bugs-To: bug-gnu-utils@gnu.org\n"
-"POT-Creation-Date: 2012-12-22 14:36+0100\n"
-"PO-Revision-Date: 2010-06-13 23:03+0200\n"
+"POT-Creation-Date: 2016-12-30 00:59-0800\n"
+"PO-Revision-Date: 2016-12-25 14:08+0100\n"
"Last-Translator: Marcel Telka <marcel@telka.sk>\n"
"Language-Team: Slovak <sk-i18n@lists.linux.sk>\n"
"Language: sk\n"
"MIME-Version: 1.0\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=3; plural= (n==1) ? 1 : (n>=2 && n<=4) ? 2 : 0;\n"
-#: sed/compile.c:144
+#: lib/closeout.c:112
+msgid "write error"
+msgstr "chyba zápisu"
+
+#: lib/copy-acl.c:54
+#, c-format
+msgid "preserving permissions for %s"
+msgstr "zachovanie oprávnení pre %s"
+
+#: lib/dfa.c:1025 lib/dfa.c:1028 lib/dfa.c:1047 lib/dfa.c:1057 lib/dfa.c:1070
+#: lib/dfa.c:1098 lib/dfa.c:1107 lib/dfa.c:1110 lib/dfa.c:1115 lib/dfa.c:1137
+#: lib/dfa.c:1140
+msgid "unbalanced ["
+msgstr "neuzavretá ["
+
+#: lib/dfa.c:1083
+msgid "invalid character class"
+msgstr "neplatná trieda znakov"
+
+#: lib/dfa.c:1206
+msgid "character class syntax is [[:space:]], not [:space:]"
+msgstr "syntax triedy znakov je [[:space:]], nie [:space:]"
+
+#: lib/dfa.c:1275
+msgid "unfinished \\ escape"
+msgstr "neukončená riadiaca sekvencia \\"
+
+#: lib/dfa.c:1436
+msgid "invalid content of \\{\\}"
+msgstr "neplatný obsah \\{\\}"
+
+#: lib/dfa.c:1439
+msgid "regular expression too big"
+msgstr "regulárny výraz je príliš veľký"
+
+#: lib/dfa.c:1853
+msgid "unbalanced ("
+msgstr "neuzavretá ("
+
+#: lib/dfa.c:1980
+msgid "no syntax specified"
+msgstr "nebola zadaná syntax"
+
+#: lib/dfa.c:1988
+msgid "unbalanced )"
+msgstr "neuzavretá )"
+
+#: lib/error.c:191
+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
+#, c-format
+msgid "%s: option '%s' is ambiguous\n"
+msgstr "%s: voľba '%s' nie je jednoznačná\n"
+
+#: lib/getopt.c:654 lib/getopt.c:658
+#, c-format
+msgid "%s: option '--%s' doesn't allow an argument\n"
+msgstr "%s: voľba '--%s' nepovoľuje parameter\n"
+
+#: lib/getopt.c:667 lib/getopt.c:672
+#, c-format
+msgid "%s: option '%c%s' doesn't allow an argument\n"
+msgstr "%s: voľba '%c%s' nepovoľuje parameter\n"
+
+#: lib/getopt.c:715 lib/getopt.c:734
+#, c-format
+msgid "%s: option '--%s' requires an argument\n"
+msgstr "%s: voľba '--%s' vyžaduje parameter\n"
+
+#: lib/getopt.c:772 lib/getopt.c:775
+#, c-format
+msgid "%s: unrecognized option '--%s'\n"
+msgstr "%s: neznáma voľba '--%s'\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
+#, 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
+#, 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äť"
+
+#. TRANSLATORS:
+#. Get translations for open and closing quotation marks.
+#. The message catalog should translate "`" to a left
+#. quotation mark suitable for the locale, and similarly for
+#. "'". For example, a French Unicode local should translate
+#. these to U+00AB (LEFT-POINTING DOUBLE ANGLE
+#. QUOTATION MARK), and U+00BB (RIGHT-POINTING DOUBLE ANGLE
+#. QUOTATION MARK), respectively.
+#.
+#. If the catalog has no translation, we will try to
+#. use Unicode U+2018 (LEFT SINGLE QUOTATION MARK) and
+#. Unicode U+2019 (RIGHT SINGLE QUOTATION MARK). If the
+#. current locale is not Unicode, locale_quoting_style
+#. will quote 'like this', and clocale_quoting_style will
+#. quote "like this". You should always include translations
+#. for "`" and "'" even if U+2018 and U+2019 are appropriate
+#. for your locale.
+#.
+#. If you don't know what to put here, please see
+#. <http://en.wikipedia.org/wiki/Quotation_marks_in_other_languages>
+#. and use glyphs suitable for your language.
+#: lib/quotearg.c:354
+msgid "`"
+msgstr "„"
+
+#: lib/quotearg.c:355
+msgid "'"
+msgstr "“"
+
+#: lib/regcomp.c:135
+msgid "Success"
+msgstr "Úspech"
+
+#: lib/regcomp.c:138
+msgid "No match"
+msgstr "Nezodpovedá"
+
+#: lib/regcomp.c:141
+msgid "Invalid regular expression"
+msgstr "Neplatný regulárny výraz"
+
+#: lib/regcomp.c:144
+msgid "Invalid collation character"
+msgstr "Neplatný znak pre porovnávanie"
+
+#: lib/regcomp.c:147
+msgid "Invalid character class name"
+msgstr "Neplatný názov triedy znakov"
+
+#: lib/regcomp.c:150
+msgid "Trailing backslash"
+msgstr "Ukončovacie opačné lomítko"
+
+#: lib/regcomp.c:153
+msgid "Invalid back reference"
+msgstr "Neplatný spätný odkaz"
+
+#: lib/regcomp.c:156
+msgid "Unmatched [, [^, [:, [., or [="
+msgstr "Nezodpovedajúce [, [^, [:, [. alebo [="
+
+#: lib/regcomp.c:159
+msgid "Unmatched ( or \\("
+msgstr "Nezodpovedajúca ( alebo \\("
+
+#: lib/regcomp.c:162
+msgid "Unmatched \\{"
+msgstr "Nezodpovedajúca \\{"
+
+#: lib/regcomp.c:165
+msgid "Invalid content of \\{\\}"
+msgstr "Neplatný obsah \\{\\}"
+
+#: lib/regcomp.c:168
+msgid "Invalid range end"
+msgstr "Neplatný koniec rozsahu"
+
+#: lib/regcomp.c:171
+msgid "Memory exhausted"
+msgstr "Vyčerpaná pamäť"
+
+#: lib/regcomp.c:174
+msgid "Invalid preceding regular expression"
+msgstr "Neplatný predchádzajúci regulárny výraz"
+
+#: lib/regcomp.c:177
+msgid "Premature end of regular expression"
+msgstr "Neočakávaný koniec regulárneho výrazu"
+
+#: lib/regcomp.c:180
+msgid "Regular expression too big"
+msgstr "Regulárny výraz je príliš veľký"
+
+#: lib/regcomp.c:183
+msgid "Unmatched ) or \\)"
+msgstr "Nezodpovedajúca ) alebo \\)"
+
+#: lib/regcomp.c:687
+msgid "No previous regular expression"
+msgstr "Bez predchádzajúceho regulárneho výrazu"
+
+#: lib/set-acl.c:46
+#, c-format
+msgid "setting permissions for %s"
+msgstr "nastavovanie prístupových práv pre %s"
+
+#: lib/version-etc.c:74
+#, c-format
+msgid "Packaged by %s (%s)\n"
+msgstr "Zabalil %s (%s)\n"
+
+#: lib/version-etc.c:77
+#, c-format
+msgid "Packaged by %s\n"
+msgstr "Zabalil %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 "©"
+
+#: lib/version-etc.c:86
+msgid ""
+"\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"
+msgstr ""
+"\n"
+"Licencia GPLv3+: GNU GPL verzia 3 alebo novšia <http://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"
+"\n"
+
+#. TRANSLATORS: %s denotes an author name.
+#: lib/version-etc.c:102
+#, c-format
+msgid "Written by %s.\n"
+msgstr "Napísal %s.\n"
+
+#. TRANSLATORS: Each %s denotes an author name.
+#: lib/version-etc.c:106
+#, c-format
+msgid "Written by %s and %s.\n"
+msgstr "Napísali %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 "Napísali %s, %s a %s.\n"
+
+#. TRANSLATORS: Each %s denotes an author name.
+#. You can use line breaks, estimating that each author name occupies
+#. ca. 16 screen columns and that a screen line has ca. 80 columns.
+#: lib/version-etc.c:117
+#, c-format
+msgid ""
+"Written by %s, %s, %s,\n"
+"and %s.\n"
+msgstr ""
+"Napísali %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
+#. ca. 16 screen columns and that a screen line has ca. 80 columns.
+#: lib/version-etc.c:124
+#, c-format
+msgid ""
+"Written by %s, %s, %s,\n"
+"%s, and %s.\n"
+msgstr ""
+"Napísali %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
+#. ca. 16 screen columns and that a screen line has ca. 80 columns.
+#: lib/version-etc.c:131
+#, c-format
+msgid ""
+"Written by %s, %s, %s,\n"
+"%s, %s, and %s.\n"
+msgstr ""
+"Napísali %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
+#. ca. 16 screen columns and that a screen line has ca. 80 columns.
+#: lib/version-etc.c:139
+#, c-format
+msgid ""
+"Written by %s, %s, %s,\n"
+"%s, %s, %s, and %s.\n"
+msgstr ""
+"Napísali %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
+#. ca. 16 screen columns and that a screen line has ca. 80 columns.
+#: lib/version-etc.c:147
+#, c-format
+msgid ""
+"Written by %s, %s, %s,\n"
+"%s, %s, %s, %s,\n"
+"and %s.\n"
+msgstr ""
+"Napísali %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
+#. ca. 16 screen columns and that a screen line has ca. 80 columns.
+#: lib/version-etc.c:156
+#, c-format
+msgid ""
+"Written by %s, %s, %s,\n"
+"%s, %s, %s, %s,\n"
+"%s, and %s.\n"
+msgstr ""
+"Napísali %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
+#. ca. 16 screen columns and that a screen line has ca. 80 columns.
+#: lib/version-etc.c:167
+#, c-format
+msgid ""
+"Written by %s, %s, %s,\n"
+"%s, %s, %s, %s,\n"
+"%s, %s, and others.\n"
+msgstr ""
+"Napísali %s, %s, %s,\n"
+"%s, %s, %s, %s,\n"
+"%s, %s a ďalší.\n"
+
+#. TRANSLATORS: The placeholder indicates the bug-reporting address
+#. for this package. Please add _another line_ saying
+#. "Report translation bugs to <...>\n" with the address for translation
+#. bugs (typically your translation team's web or email address).
+#: lib/version-etc.c:245
+#, c-format
+msgid ""
+"\n"
+"Report bugs to: %s\n"
+msgstr ""
+"\n"
+"Chyby oznamujte na: %s (iba anglicky)\n"
+"Chyby slovenského prekladu oznamujte na: <sk-i18n@lists.linux.sk>\n"
+
+#: lib/version-etc.c:247
+#, c-format
+msgid "Report %s bugs to: %s\n"
+msgstr ""
+"Chyby %s oznamujte na: %s (iba anglicky)\n"
+"Chyby slovenského prekladu oznamujte na: <sk-i18n@lists.linux.sk>\n"
+
+#: lib/version-etc.c:251
+#, c-format
+msgid "%s home page: <%s>\n"
+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"
+
+#: lib/version-etc.c:256
+msgid "General help using GNU software: <http://www.gnu.org/gethelp/>\n"
+msgstr ""
+"Všeobecný pomocník na používanie softvéru GNU: <http://www.gnu.org/gethelp/"
+">\n"
+
+#: sed/compile.c:146
msgid "multiple `!'s"
msgstr "viacnásobný `!'"
-#: sed/compile.c:145
+#: sed/compile.c:147
msgid "unexpected `,'"
msgstr "neočakávaná `,'"
-#: sed/compile.c:146
+#: sed/compile.c:149
msgid "invalid usage of +N or ~N as first address"
msgstr "+N alebo ~N sa nedá použiť ako prvá adresa"
-#: sed/compile.c:147
+#: sed/compile.c:150
msgid "unmatched `{'"
msgstr "nezodpovedajúca `{'"
-#: sed/compile.c:148
+#: sed/compile.c:151
msgid "unexpected `}'"
msgstr "neočakávaná `}'"
-#: sed/compile.c:149
+#: sed/compile.c:153
msgid "extra characters after command"
msgstr "nadbytočné znaky po príkaze"
-#: sed/compile.c:150
+#: sed/compile.c:155
msgid "expected \\ after `a', `c' or `i'"
msgstr "očakávané \\ po `a', `c' alebo `i'"
-#: sed/compile.c:151
+#: sed/compile.c:157
msgid "`}' doesn't want any addresses"
msgstr "`}' nevyžaduje akúkoľvek adresu"
-#: sed/compile.c:152
+#: sed/compile.c:159
msgid ": doesn't want any addresses"
msgstr ": nechce akúkoľvek adresu"
-#: sed/compile.c:153
+#: sed/compile.c:161
msgid "comments don't accept any addresses"
msgstr "v komentári nie je prípustná akákoľvek adresa"
-#: sed/compile.c:154
+#: sed/compile.c:162
msgid "missing command"
msgstr "chýbajúci príkaz"
-#: sed/compile.c:155
+#: sed/compile.c:163
msgid "command only uses one address"
msgstr "príkaz používa iba jednu adresu"
-#: sed/compile.c:156
+#: sed/compile.c:164
msgid "unterminated address regex"
msgstr "neukončený regulárny výraz adresy"
-#: sed/compile.c:157
+#: sed/compile.c:165
msgid "unterminated `s' command"
msgstr "neukončený príkaz `s'"
-#: sed/compile.c:158
+#: sed/compile.c:166
msgid "unterminated `y' command"
msgstr "neukončený príkaz `y'"
-#: sed/compile.c:159
+#: sed/compile.c:167
msgid "unknown option to `s'"
msgstr "neznáma voľba pre `s'"
-#: sed/compile.c:160
+#: sed/compile.c:169
msgid "multiple `p' options to `s' command"
msgstr "viacnásobné použitie voľby `p' s príkazom `s'"
-#: sed/compile.c:161
+#: sed/compile.c:171
msgid "multiple `g' options to `s' command"
msgstr "viacnásobné použitie voľby `g' s príkazom `s'"
-#: sed/compile.c:162
+#: sed/compile.c:173
msgid "multiple number options to `s' command"
msgstr "príkaz `s' môže mať maximálne jednu číselnú voľbu"
-#: sed/compile.c:163
+#: sed/compile.c:175
msgid "number option to `s' command may not be zero"
msgstr "číselná voľba príkazu `s' nemôže byť nula"
-#: sed/compile.c:164
+#: sed/compile.c:177
msgid "strings for `y' command are different lengths"
msgstr "reťazce pre príkaz `y' majú rôzne dĺžky"
-#: sed/compile.c:165
+#: sed/compile.c:179
msgid "delimiter character is not a single-byte character"
msgstr "oddeľovací znak nie je jednobajtový"
-#: sed/compile.c:166
+#: sed/compile.c:181
msgid "expected newer version of sed"
msgstr "očakávaná novšia verzia programu sed"
-#: sed/compile.c:167
+#: sed/compile.c:183
msgid "invalid usage of line address 0"
msgstr "neplatné použitie adresy riadku 0"
-#: sed/compile.c:168
+#: sed/compile.c:184
#, c-format
msgid "unknown command: `%c'"
msgstr "neznámy príkaz: `%c'"
-#: sed/compile.c:169
-#, fuzzy
+#: sed/compile.c:186
msgid "incomplete command"
-msgstr "chýbajúci príkaz"
+msgstr "nekompletný príkaz"
+
+#: sed/compile.c:188
+msgid "\":\" lacks a label"
+msgstr "chýba návestie pri \":\""
+
+#: sed/compile.c:190
+msgid "recursive escaping after \\c not allowed"
+msgstr "rekurzívne riadiace sekvencie za \\c nie sú dovolené"
-#: sed/compile.c:192
+#: sed/compile.c:213
#, c-format
msgid "%s: file %s line %lu: %s\n"
msgstr "%s: súbor %s, riadok %lu: %s\n"
-#: sed/compile.c:195
+#: sed/compile.c:216
#, c-format
msgid "%s: -e expression #%lu, char %lu: %s\n"
msgstr "%s: -e výraz #%lu, znak %lu: %s\n"
-#: sed/compile.c:1657
+#: sed/compile.c:1639
#, 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:595
+#: sed/execute.c:264 sed/execute.c:281
+#, c-format
+msgid "case conversion produced an invalid character"
+msgstr "konverzia veľkosti znakov vytvorila neplatný znak"
+
+#: sed/execute.c:575
#, c-format
msgid "%s: can't read %s: %s\n"
msgstr "%s: %s nie je možné čítať: %s\n"
-#: sed/execute.c:624
+#: sed/execute.c:600
#, c-format
msgid "couldn't edit %s: is a terminal"
msgstr "nebolo možné upraviť %s: je to terminál"
-#: sed/execute.c:629
+#: sed/execute.c:605
#, 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:640
+#: sed/execute.c:616
#, 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:647
+#: sed/execute.c:624
#, 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:664 sed/utils.c:211
+#: sed/execute.c:643 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:1193 sed/execute.c:1373
+#: sed/execute.c:1158 sed/execute.c:1368
msgid "error in subprocess"
msgstr "chyba v podprocese"
-#: sed/execute.c:1195
+#: sed/execute.c:1160
msgid "option `e' not supported"
msgstr "voľba `e' nie je podporovaná"
-#: sed/execute.c:1375
+#: sed/execute.c:1349
msgid "`e' command not supported"
msgstr "príkaz `e' nie je podporovaný"
-#: sed/execute.c:1725
+#: sed/execute.c:1675
msgid "no input files"
msgstr "bez vstupných súborov"
-#: sed/regexp.c:39
+#: sed/regexp.c:38
msgid "no previous regular expression"
msgstr "bez predchádzajúceho regulárneho výrazu"
-#: sed/regexp.c:40
-msgid "cannot specify modifiers on empty regexp"
-msgstr "nie je možné zadať modifikátory pre prázdny regulárny výraz"
-
-#: sed/regexp.c:129
+#: sed/regexp.c:138
#, c-format
msgid "invalid reference \\%d on `s' command's RHS"
msgstr "neplatný odkaz \\%d na `s' príkazu RHS"
-#: sed/sed.c:32
+#: sed/sed.c:35
msgid "Jay Fenlason"
-msgstr ""
+msgstr "Jay Fenlason"
-#: sed/sed.c:33
+#: sed/sed.c:36
msgid "Tom Lord"
-msgstr ""
+msgstr "Tom Lord"
-#: sed/sed.c:34
+#: sed/sed.c:37
msgid "Ken Pizzini"
-msgstr ""
+msgstr "Ken Pizzini"
-#: sed/sed.c:35
+#: sed/sed.c:38
msgid "Paolo Bonzini"
-msgstr ""
+msgstr "Paolo Bonzini"
-#: sed/sed.c:79
+#: sed/sed.c:113
#, c-format
msgid ""
"GNU sed home page: <http://www.gnu.org/software/sed/>.\n"
@@ -226,18 +634,12 @@ msgstr ""
"Všeobecný pomocník na používanie softvéru GNU: <http://www.gnu.org/gethelp/"
">.\n"
-#: sed/sed.c:86
+#: sed/sed.c:120
#, c-format
-msgid ""
-"E-mail bug reports to: <%s>.\n"
-"Be sure to include the word ``%s'' somewhere in the ``Subject:'' field.\n"
-msgstr ""
-"Správy o chybách zasielajte na adresu <%s> (iba anglicky).\n"
-"Prosím vložte slovo ``%s'' niekde do položky ``Predmet:''\n"
-"Komentáre k slovenskému prekladu zasielajte na adresu <sk-i18n@lists.linux."
-"sk>.\n"
+msgid "E-mail bug reports to: <%s>.\n"
+msgstr "Správy o chybách zasielajte na adresu <%s> (iba anglicky).\n"
-#: sed/sed.c:99
+#: sed/sed.c:129
msgid ""
" -R, --regexp-perl\n"
" use Perl 5's regular expressions syntax in the script.\n"
@@ -245,7 +647,7 @@ msgstr ""
" -R, --regexp-perl\n"
" použiť syntax regulárnych výrazov z Perlu 5 v skripte.\n"
-#: sed/sed.c:104
+#: sed/sed.c:134
#, c-format
msgid ""
"Usage: %s [OPTION]... {script-only-if-no-other-script} [input-file]...\n"
@@ -255,7 +657,7 @@ msgstr ""
"súbor]...\n"
"\n"
-#: sed/sed.c:108
+#: sed/sed.c:138
#, c-format
msgid ""
" -n, --quiet, --silent\n"
@@ -264,7 +666,7 @@ msgstr ""
" -n, --quiet, --silent\n"
" potlačiť automatický výpis priestoru vzorov\n"
-#: sed/sed.c:110
+#: sed/sed.c:140
#, c-format
msgid ""
" -e script, --expression=script\n"
@@ -273,7 +675,7 @@ msgstr ""
" -e skript, --expression=skript\n"
" pridať skript k príkazom, ktoré majú byť vykonané\n"
-#: sed/sed.c:112
+#: sed/sed.c:142
#, c-format
msgid ""
" -f script-file, --file=script-file\n"
@@ -284,7 +686,7 @@ msgstr ""
" pridať obsah súboru skript-súbor k príkazom, ktoré majú byť "
"vykonané\n"
-#: sed/sed.c:115
+#: sed/sed.c:146
#, c-format
msgid ""
" --follow-symlinks\n"
@@ -293,17 +695,17 @@ msgstr ""
" --follow-symlinks\n"
" nasledovať symbolické odkazy pri spracovávaní na mieste\n"
-#: sed/sed.c:118
-#, fuzzy, c-format
+#: sed/sed.c:149
+#, c-format
msgid ""
" -i[SUFFIX], --in-place[=SUFFIX]\n"
" edit files in place (makes backup if SUFFIX supplied)\n"
msgstr ""
" -i[PRÍPONA], --in-place[=PRÍPONA]\n"
" upraviť súbory na mieste (vytvoria sa zálohy, ak je zadaná "
-"prípona)\n"
+"PRÍPONA)\n"
-#: sed/sed.c:121
+#: sed/sed.c:153
#, c-format
msgid ""
" -b, --binary\n"
@@ -314,7 +716,7 @@ msgstr ""
" otvoriť súbory v binárnom režime (CR+LF nie sú špeciálne "
"spracovávané)\n"
-#: sed/sed.c:124
+#: sed/sed.c:157
#, c-format
msgid ""
" -l N, --line-length=N\n"
@@ -324,7 +726,7 @@ msgstr ""
" nastaviť požadovanú dĺžku pre zalomenie riadkov pre príkaz "
"`l'\n"
-#: sed/sed.c:126
+#: sed/sed.c:159
#, c-format
msgid ""
" --posix\n"
@@ -333,27 +735,37 @@ msgstr ""
" --posix\n"
" zakázať všetky rozšírenia GNU.\n"
-#: sed/sed.c:128
+#: sed/sed.c:161
#, c-format
msgid ""
-" -r, --regexp-extended\n"
-" use extended regular expressions in the script.\n"
+" -E, -r, --regexp-extended\n"
+" use extended regular expressions in the script\n"
+" (for portability use POSIX -E).\n"
msgstr ""
-" -r, --regexp-extended\n"
-" použiť rozšírené regulárne výrazy v skripte.\n"
+" -E, -r, --regexp-extended\n"
+" použiť rozšírené regulárne výrazy v skripte\n"
+" (pre prenositeľnosť použite POSIXové -E).\n"
-#: sed/sed.c:133
+#: sed/sed.c:167
#, c-format
msgid ""
" -s, --separate\n"
-" consider files as separate rather than as a single "
-"continuous\n"
-" long stream.\n"
+" consider files as separate rather than as a single,\n"
+" continuous long stream.\n"
msgstr ""
" -s, --separate\n"
" spracovať súbory ako oddelené a nie ako jeden spojitý.\n"
-#: sed/sed.c:136
+#: sed/sed.c:170
+#, c-format
+msgid ""
+" --sandbox\n"
+" operate in sandbox mode.\n"
+msgstr ""
+" --sandbox\n"
+" pracovať v režime sandbox.\n"
+
+#: sed/sed.c:172
#, c-format
msgid ""
" -u, --unbuffered\n"
@@ -366,24 +778,26 @@ msgstr ""
"vyprázdňovať\n"
" výstupné vyrovnávacie pamäte častejšie\n"
-#: sed/sed.c:139
+#: sed/sed.c:175
#, c-format
msgid ""
" -z, --null-data\n"
" separate lines by NUL characters\n"
msgstr ""
+" -z, --null-data\n"
+" oddeliť riadky znakmi NUL\n"
-#: sed/sed.c:141
+#: sed/sed.c:177
#, c-format
msgid " --help display this help and exit\n"
msgstr " --help vypísať túto pomoc a skončiť\n"
-#: sed/sed.c:142
+#: sed/sed.c:178
#, c-format
msgid " --version output version information and exit\n"
msgstr " --version vypísať informáciu o verzii a skončiť\n"
-#: sed/sed.c:143
+#: sed/sed.c:179
#, c-format
msgid ""
"\n"
@@ -401,134 +815,49 @@ msgstr ""
"Ak nebudú vstupné súbory zadané, bude čítaný štandardný vstup.\n"
"\n"
-#: sed/utils.c:74 sed/utils.c:432
+#: sed/utils.c:73 sed/utils.c:384
#, c-format
msgid "cannot remove %s: %s"
msgstr "nepodarilo sa odstrániť %s: %s"
-#: sed/utils.c:144
+#: sed/utils.c:136
#, c-format
msgid "couldn't open file %s: %s"
msgstr "nebolo možné otvoriť súbor %s: %s"
-#: sed/utils.c:167
+#: sed/utils.c:155
#, c-format
msgid "couldn't attach to %s: %s"
msgstr "nebolo možné sa pripojiť k %s: %s"
-#: sed/utils.c:229
+#: sed/utils.c:192
#, c-format
-msgid "couldn't write %d item to %s: %s"
-msgid_plural "couldn't write %d items to %s: %s"
-msgstr[0] "nebolo možné zapísať %d položiek do %s: %s"
-msgstr[1] "nebolo možné zapísať %d položku do %s: %s"
-msgstr[2] "nebolo možné zapísať %d položky do %s: %s"
+msgid "couldn't write %llu item to %s: %s"
+msgid_plural "couldn't write %llu items to %s: %s"
+msgstr[0] "nebolo možné zapísať %llu položiek do %s: %s"
+msgstr[1] "nebolo možné zapísať %llu položku do %s: %s"
+msgstr[2] "nebolo možné zapísať %llu položky do %s: %s"
-#: sed/utils.c:244 sed/utils.c:267
+#: sed/utils.c:204 sed/utils.c:223
#, c-format
msgid "read error on %s: %s"
msgstr "chyba pri čítaní z %s: %s"
-#: sed/utils.c:372
+#: sed/utils.c:325
#, c-format
msgid "couldn't follow symlink %s: %s"
msgstr "nebolo možné nasledovať symbolický odkaz %s: %s"
-#: sed/utils.c:406
+#: sed/utils.c:359
#, c-format
msgid "cannot stat %s: %s"
msgstr "nepodarilo sa zistiť stav %s: %s"
-#: sed/utils.c:437
+#: sed/utils.c:389
#, c-format
msgid "cannot rename %s: %s"
msgstr "nepodarilo sa premenovať %s: %s"
-#: lib/regcomp.c:132
-msgid "Success"
-msgstr "Úspech"
-
-#: lib/regcomp.c:135
-msgid "No match"
-msgstr "Nezodpovedá"
-
-#: lib/regcomp.c:138
-msgid "Invalid regular expression"
-msgstr "Neplatný regulárny výraz"
-
-#: lib/regcomp.c:141
-msgid "Invalid collation character"
-msgstr "Neplatný znak pre porovnávanie"
-
-#: lib/regcomp.c:144
-msgid "Invalid character class name"
-msgstr "Neplatný názov triedy znakov"
-
-#: lib/regcomp.c:147
-msgid "Trailing backslash"
-msgstr "Ukončovacie opačné lomítko"
-
-#: lib/regcomp.c:150
-msgid "Invalid back reference"
-msgstr "Neplatný spätný odkaz"
-
-#: lib/regcomp.c:153
-msgid "Unmatched [ or [^"
-msgstr "Nezodpovedajúca [ alebo [^"
-
-#: lib/regcomp.c:156
-msgid "Unmatched ( or \\("
-msgstr "Nezodpovedajúca ( alebo \\("
-
-#: lib/regcomp.c:159
-msgid "Unmatched \\{"
-msgstr "Nezodpovedajúca \\{"
-
-#: lib/regcomp.c:162
-msgid "Invalid content of \\{\\}"
-msgstr "Neplatný obsah \\{\\}"
-
-#: lib/regcomp.c:165
-msgid "Invalid range end"
-msgstr "Neplatný koniec rozsahu"
-
-#: lib/regcomp.c:168
-msgid "Memory exhausted"
-msgstr "Vyčerpaná pamäť"
-
-#: lib/regcomp.c:171
-msgid "Invalid preceding regular expression"
-msgstr "Neplatný predchádzajúci regulárny výraz"
-
-#: lib/regcomp.c:174
-msgid "Premature end of regular expression"
-msgstr "Neočakávaný koniec regulárneho výrazu"
-
-#: lib/regcomp.c:177
-msgid "Regular expression too big"
-msgstr "Regulárny výraz je príliš veľký"
-
-#: lib/regcomp.c:180
-msgid "Unmatched ) or \\)"
-msgstr "Nezodpovedajúca ) alebo \\)"
-
-#: lib/regcomp.c:705
-msgid "No previous regular expression"
-msgstr "Bez predchádzajúceho regulárneho výrazu"
-
-#~ msgid "super-sed version %s\n"
-#~ msgstr "super-sed verzia %s\n"
-
-#~ msgid ""
-#~ "based on GNU sed version %s\n"
-#~ "\n"
-#~ msgstr ""
-#~ "založené na GNU sed verzia %s\n"
-#~ "\n"
-
-#~ msgid "GNU sed version %s\n"
-#~ msgstr "GNU sed verzia %s\n"
-
#~ msgid ""
#~ "Copyright (C) %d Free Software Foundation, Inc.\n"
#~ "This is free software; see the source for copying conditions. There is "
diff --git a/po/sl.gmo b/po/sl.gmo
index 48a2a84..7335f8f 100644
--- a/po/sl.gmo
+++ b/po/sl.gmo
Binary files differ
diff --git a/po/sl.po b/po/sl.po
index 04fd741..21ce906 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: 2012-12-22 14:36+0100\n"
+"POT-Creation-Date: 2016-12-30 00:59-0800\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"
@@ -16,208 +16,595 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8-bit\n"
+"X-Bugs: Report translation errors to the Language-Team address.\n"
"Plural-Forms: nplurals=4; plural=(n%100==1 ? 1 : n%100==2 ? 2 : n%100==3 || n"
"%100==4 ? 3 : 0);\n"
-#: sed/compile.c:144
+#: lib/closeout.c:112
+msgid "write error"
+msgstr ""
+
+#: lib/copy-acl.c:54
+#, c-format
+msgid "preserving permissions for %s"
+msgstr ""
+
+#: lib/dfa.c:1025 lib/dfa.c:1028 lib/dfa.c:1047 lib/dfa.c:1057 lib/dfa.c:1070
+#: lib/dfa.c:1098 lib/dfa.c:1107 lib/dfa.c:1110 lib/dfa.c:1115 lib/dfa.c:1137
+#: lib/dfa.c:1140
+msgid "unbalanced ["
+msgstr ""
+
+#: lib/dfa.c:1083
+#, fuzzy
+msgid "invalid character class"
+msgstr "Neveljavno ime razreda znakov"
+
+#: lib/dfa.c:1206
+msgid "character class syntax is [[:space:]], not [:space:]"
+msgstr ""
+
+#: lib/dfa.c:1275
+msgid "unfinished \\ escape"
+msgstr ""
+
+#: lib/dfa.c:1436
+#, fuzzy
+msgid "invalid content of \\{\\}"
+msgstr "Neveljavna vsebina \\{\\}"
+
+#: lib/dfa.c:1439
+#, fuzzy
+msgid "regular expression too big"
+msgstr "Regularni izraz prevelik"
+
+#: lib/dfa.c:1853
+msgid "unbalanced ("
+msgstr ""
+
+#: lib/dfa.c:1980
+msgid "no syntax specified"
+msgstr ""
+
+#: lib/dfa.c:1988
+msgid "unbalanced )"
+msgstr ""
+
+#: lib/error.c:191
+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 ""
+
+#: lib/getopt.c:654 lib/getopt.c:658
+#, c-format
+msgid "%s: option '--%s' doesn't allow an argument\n"
+msgstr ""
+
+#: 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:715 lib/getopt.c:734
+#, c-format
+msgid "%s: option '--%s' requires an argument\n"
+msgstr ""
+
+#: 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
+#, 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
+#, 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 "Zmanjkalo pomnilnika"
+
+#. TRANSLATORS:
+#. Get translations for open and closing quotation marks.
+#. The message catalog should translate "`" to a left
+#. quotation mark suitable for the locale, and similarly for
+#. "'". For example, a French Unicode local should translate
+#. these to U+00AB (LEFT-POINTING DOUBLE ANGLE
+#. QUOTATION MARK), and U+00BB (RIGHT-POINTING DOUBLE ANGLE
+#. QUOTATION MARK), respectively.
+#.
+#. If the catalog has no translation, we will try to
+#. use Unicode U+2018 (LEFT SINGLE QUOTATION MARK) and
+#. Unicode U+2019 (RIGHT SINGLE QUOTATION MARK). If the
+#. current locale is not Unicode, locale_quoting_style
+#. will quote 'like this', and clocale_quoting_style will
+#. quote "like this". You should always include translations
+#. for "`" and "'" even if U+2018 and U+2019 are appropriate
+#. for your locale.
+#.
+#. If you don't know what to put here, please see
+#. <http://en.wikipedia.org/wiki/Quotation_marks_in_other_languages>
+#. and use glyphs suitable for your language.
+#: lib/quotearg.c:354
+msgid "`"
+msgstr ""
+
+#: lib/quotearg.c:355
+msgid "'"
+msgstr ""
+
+#: lib/regcomp.c:135
+msgid "Success"
+msgstr "Uspešno"
+
+#: lib/regcomp.c:138
+msgid "No match"
+msgstr "Ni ujemanja"
+
+#: lib/regcomp.c:141
+msgid "Invalid regular expression"
+msgstr "Neveljavni regularni izraz"
+
+#: lib/regcomp.c:144
+msgid "Invalid collation character"
+msgstr "Znaka izven abecede"
+
+#: lib/regcomp.c:147
+msgid "Invalid character class name"
+msgstr "Neveljavno ime razreda znakov"
+
+#: lib/regcomp.c:150
+msgid "Trailing backslash"
+msgstr "Zaključna obrnjena poševnica"
+
+#: lib/regcomp.c:153
+msgid "Invalid back reference"
+msgstr "Neveljavni povratni sklic"
+
+#: lib/regcomp.c:156
+#, fuzzy
+msgid "Unmatched [, [^, [:, [., or [="
+msgstr "Oklepaj [ ali [^ brez zaklepaja"
+
+#: lib/regcomp.c:159
+msgid "Unmatched ( or \\("
+msgstr "Oklepaj ( ali \\( brez zaklepaja"
+
+#: lib/regcomp.c:162
+msgid "Unmatched \\{"
+msgstr "Oklepaj \\{ brez zaklepaja"
+
+#: lib/regcomp.c:165
+msgid "Invalid content of \\{\\}"
+msgstr "Neveljavna vsebina \\{\\}"
+
+#: lib/regcomp.c:168
+msgid "Invalid range end"
+msgstr "Neveljavna zgornja meja intervala"
+
+#: lib/regcomp.c:171
+msgid "Memory exhausted"
+msgstr "Zmanjkalo pomnilnika"
+
+#: lib/regcomp.c:174
+msgid "Invalid preceding regular expression"
+msgstr "Neveljaven prejšnji regularni izraz"
+
+#: lib/regcomp.c:177
+msgid "Premature end of regular expression"
+msgstr "Predčasni zaključek regularnega izraza"
+
+#: lib/regcomp.c:180
+msgid "Regular expression too big"
+msgstr "Regularni izraz prevelik"
+
+#: lib/regcomp.c:183
+msgid "Unmatched ) or \\)"
+msgstr "Oklepaj ) ali \\) brez zaklepaja"
+
+#: lib/regcomp.c:687
+msgid "No previous regular expression"
+msgstr "Prejšnji regularni izraz manjka"
+
+#: lib/set-acl.c:46
+#, c-format
+msgid "setting permissions for %s"
+msgstr ""
+
+#: lib/version-etc.c:74
+#, c-format
+msgid "Packaged by %s (%s)\n"
+msgstr ""
+
+#: lib/version-etc.c:77
+#, c-format
+msgid "Packaged by %s\n"
+msgstr ""
+
+#. 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 ""
+
+#: lib/version-etc.c:86
+msgid ""
+"\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"
+msgstr ""
+
+#. TRANSLATORS: %s denotes an author name.
+#: lib/version-etc.c:102
+#, c-format
+msgid "Written by %s.\n"
+msgstr ""
+
+#. TRANSLATORS: Each %s denotes an author name.
+#: lib/version-etc.c:106
+#, c-format
+msgid "Written by %s and %s.\n"
+msgstr ""
+
+#. TRANSLATORS: Each %s denotes an author name.
+#: lib/version-etc.c:110
+#, c-format
+msgid "Written by %s, %s, and %s.\n"
+msgstr ""
+
+#. TRANSLATORS: Each %s denotes an author name.
+#. You can use line breaks, estimating that each author name occupies
+#. ca. 16 screen columns and that a screen line has ca. 80 columns.
+#: lib/version-etc.c:117
+#, c-format
+msgid ""
+"Written by %s, %s, %s,\n"
+"and %s.\n"
+msgstr ""
+
+#. TRANSLATORS: Each %s denotes an author name.
+#. You can use line breaks, estimating that each author name occupies
+#. ca. 16 screen columns and that a screen line has ca. 80 columns.
+#: lib/version-etc.c:124
+#, c-format
+msgid ""
+"Written by %s, %s, %s,\n"
+"%s, and %s.\n"
+msgstr ""
+
+#. TRANSLATORS: Each %s denotes an author name.
+#. You can use line breaks, estimating that each author name occupies
+#. ca. 16 screen columns and that a screen line has ca. 80 columns.
+#: lib/version-etc.c:131
+#, c-format
+msgid ""
+"Written by %s, %s, %s,\n"
+"%s, %s, and %s.\n"
+msgstr ""
+
+#. TRANSLATORS: Each %s denotes an author name.
+#. You can use line breaks, estimating that each author name occupies
+#. ca. 16 screen columns and that a screen line has ca. 80 columns.
+#: lib/version-etc.c:139
+#, c-format
+msgid ""
+"Written by %s, %s, %s,\n"
+"%s, %s, %s, and %s.\n"
+msgstr ""
+
+#. TRANSLATORS: Each %s denotes an author name.
+#. You can use line breaks, estimating that each author name occupies
+#. ca. 16 screen columns and that a screen line has ca. 80 columns.
+#: lib/version-etc.c:147
+#, c-format
+msgid ""
+"Written by %s, %s, %s,\n"
+"%s, %s, %s, %s,\n"
+"and %s.\n"
+msgstr ""
+
+#. TRANSLATORS: Each %s denotes an author name.
+#. You can use line breaks, estimating that each author name occupies
+#. ca. 16 screen columns and that a screen line has ca. 80 columns.
+#: lib/version-etc.c:156
+#, c-format
+msgid ""
+"Written by %s, %s, %s,\n"
+"%s, %s, %s, %s,\n"
+"%s, and %s.\n"
+msgstr ""
+
+#. TRANSLATORS: Each %s denotes an author name.
+#. You can use line breaks, estimating that each author name occupies
+#. ca. 16 screen columns and that a screen line has ca. 80 columns.
+#: lib/version-etc.c:167
+#, c-format
+msgid ""
+"Written by %s, %s, %s,\n"
+"%s, %s, %s, %s,\n"
+"%s, %s, and others.\n"
+msgstr ""
+
+#. TRANSLATORS: The placeholder indicates the bug-reporting address
+#. for this package. Please add _another line_ saying
+#. "Report translation bugs to <...>\n" with the address for translation
+#. bugs (typically your translation team's web or email address).
+#: lib/version-etc.c:245
+#, c-format
+msgid ""
+"\n"
+"Report bugs to: %s\n"
+msgstr ""
+
+#: lib/version-etc.c:247
+#, c-format
+msgid "Report %s bugs to: %s\n"
+msgstr ""
+
+#: lib/version-etc.c:251
+#, c-format
+msgid "%s home page: <%s>\n"
+msgstr ""
+
+#: lib/version-etc.c:253
+#, c-format
+msgid "%s home page: <http://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"
+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"
+
+#: sed/compile.c:146
msgid "multiple `!'s"
msgstr "večterni klicaji »!«"
-#: sed/compile.c:145
+#: sed/compile.c:147
msgid "unexpected `,'"
msgstr "nepričakovana vejica »,«"
-#: sed/compile.c:146
+#: sed/compile.c:149
msgid "invalid usage of +N or ~N as first address"
msgstr "nepravilna raba izbir +N ali ~N kot začetnih naslovov"
-#: sed/compile.c:147
+#: sed/compile.c:150
msgid "unmatched `{'"
msgstr "oklepaj { brez zaklepaja"
-#: sed/compile.c:148
+#: sed/compile.c:151
msgid "unexpected `}'"
msgstr "nepričakovan zaklepaj }"
-#: sed/compile.c:149
+#: sed/compile.c:153
msgid "extra characters after command"
msgstr "dodatni znaki za ukazom"
-#: sed/compile.c:150
+#: sed/compile.c:155
msgid "expected \\ after `a', `c' or `i'"
msgstr "Za »a«, »c« ali »i« se pričakuje \\"
-#: sed/compile.c:151
+#: sed/compile.c:157
msgid "`}' doesn't want any addresses"
msgstr "Zaklepaj } ne zahteva naslova"
-#: sed/compile.c:152
+#: sed/compile.c:159
msgid ": doesn't want any addresses"
msgstr ": ne zahteva naslova"
-#: sed/compile.c:153
+#: sed/compile.c:161
msgid "comments don't accept any addresses"
msgstr "komentarji ne sprejemajo naslovov"
-#: sed/compile.c:154
+#: sed/compile.c:162
msgid "missing command"
msgstr "manjkajoč ukaz"
-#: sed/compile.c:155
+#: sed/compile.c:163
msgid "command only uses one address"
msgstr "ukaz uporablja le en naslov"
-#: sed/compile.c:156
+#: sed/compile.c:164
msgid "unterminated address regex"
msgstr "regularni izraz z nezaključenim naslovom"
-#: sed/compile.c:157
+#: sed/compile.c:165
msgid "unterminated `s' command"
msgstr "nezaključen ukaz »s«"
-#: sed/compile.c:158
+#: sed/compile.c:166
msgid "unterminated `y' command"
msgstr "nezaključen ukaz »y«"
-#: sed/compile.c:159
+#: sed/compile.c:167
msgid "unknown option to `s'"
msgstr "neznana izbira pri ukazu »s«"
-#: sed/compile.c:160
+#: sed/compile.c:169
msgid "multiple `p' options to `s' command"
msgstr "večterne izbire »p« pri ukazu »s«"
-#: sed/compile.c:161
+#: sed/compile.c:171
msgid "multiple `g' options to `s' command"
msgstr "večterne izbire »g« pri ukazu »s«"
-#: sed/compile.c:162
+#: sed/compile.c:173
msgid "multiple number options to `s' command"
msgstr "večterne številčne izbire pri ukazu »s«"
-#: sed/compile.c:163
+#: sed/compile.c:175
msgid "number option to `s' command may not be zero"
msgstr "številčna izbira pri ukazu »s« mora biti neničelna"
-#: sed/compile.c:164
+#: sed/compile.c:177
msgid "strings for `y' command are different lengths"
msgstr "niza pri ukazu »y« sta različno dolga"
-#: sed/compile.c:165
+#: sed/compile.c:179
msgid "delimiter character is not a single-byte character"
msgstr "razmejilni znak je dolg več kot en bajt"
-#: sed/compile.c:166
+#: sed/compile.c:181
msgid "expected newer version of sed"
msgstr "pričakovana novejša izdaja programa sed"
-#: sed/compile.c:167
+#: sed/compile.c:183
msgid "invalid usage of line address 0"
msgstr "neveljavna raba naslovne vrstice 0"
-#: sed/compile.c:168
+#: sed/compile.c:184
#, c-format
msgid "unknown command: `%c'"
msgstr "neznan ukaz: »%c«"
-#: sed/compile.c:169
+#: sed/compile.c:186
#, fuzzy
msgid "incomplete command"
msgstr "manjkajoč ukaz"
-#: sed/compile.c:192
+#: sed/compile.c:188
+msgid "\":\" lacks a label"
+msgstr ""
+
+#: sed/compile.c:190
+msgid "recursive escaping after \\c not allowed"
+msgstr ""
+
+#: sed/compile.c:213
#, c-format
msgid "%s: file %s line %lu: %s\n"
msgstr "%s: datoteka %s vrstica %lu: %s\n"
-#: sed/compile.c:195
+#: sed/compile.c:216
#, c-format
msgid "%s: -e expression #%lu, char %lu: %s\n"
msgstr "%s: -e izraz #%lu, znak %lu: %s\n"
-#: sed/compile.c:1657
+#: sed/compile.c:1639
#, c-format
msgid "can't find label for jump to `%s'"
msgstr "ni moč najti oznake za skok na »%s«"
-#: sed/execute.c:595
+#: sed/execute.c:264 sed/execute.c:281
+#, c-format
+msgid "case conversion produced an invalid character"
+msgstr ""
+
+#: sed/execute.c:575
#, c-format
msgid "%s: can't read %s: %s\n"
msgstr "%s: %s ni mogoče prebrati: %s\n"
-#: sed/execute.c:624
+#: sed/execute.c:600
#, c-format
msgid "couldn't edit %s: is a terminal"
msgstr "ni mogoče urejati %s: je terminal"
-#: sed/execute.c:629
+#: sed/execute.c:605
#, c-format
msgid "couldn't edit %s: not a regular file"
msgstr "ni mogoče urejati %s: ni navadna datoteka"
-#: sed/execute.c:640
+#: sed/execute.c:616
#, 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:647
+#: sed/execute.c:624
#, 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:664 sed/utils.c:211
+#: sed/execute.c:643 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:1193 sed/execute.c:1373
+#: sed/execute.c:1158 sed/execute.c:1368
msgid "error in subprocess"
msgstr "napaka v podprocesu"
-#: sed/execute.c:1195
+#: sed/execute.c:1160
msgid "option `e' not supported"
msgstr "izbira »e« ni podprta"
-#: sed/execute.c:1375
+#: sed/execute.c:1349
msgid "`e' command not supported"
msgstr "ukaz »e« ni podprt"
-#: sed/execute.c:1725
+#: sed/execute.c:1675
msgid "no input files"
msgstr "ni vhodnih datotek"
-#: sed/regexp.c:39
+#: sed/regexp.c:38
msgid "no previous regular expression"
msgstr "ni prejšnjega regularnega izraza"
-#: sed/regexp.c:40
-msgid "cannot specify modifiers on empty regexp"
-msgstr "navajanje modifikatorjev pri praznem regularnem izrazu ni mogoče"
-
-#: sed/regexp.c:129
+#: sed/regexp.c:138
#, c-format
msgid "invalid reference \\%d on `s' command's RHS"
msgstr "neveljavni sklic \\%d na desni strani ukaza »s«"
-#: sed/sed.c:32
+#: sed/sed.c:35
msgid "Jay Fenlason"
msgstr ""
-#: sed/sed.c:33
+#: sed/sed.c:36
msgid "Tom Lord"
msgstr ""
-#: sed/sed.c:34
+#: sed/sed.c:37
msgid "Ken Pizzini"
msgstr ""
-#: sed/sed.c:35
+#: sed/sed.c:38
msgid "Paolo Bonzini"
msgstr ""
-#: sed/sed.c:79
+#: sed/sed.c:113
#, c-format
msgid ""
"GNU sed home page: <http://www.gnu.org/software/sed/>.\n"
@@ -226,16 +613,12 @@ 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"
-#: sed/sed.c:86
+#: sed/sed.c:120
#, c-format
-msgid ""
-"E-mail bug reports to: <%s>.\n"
-"Be sure to include the word ``%s'' somewhere in the ``Subject:'' field.\n"
+msgid "E-mail bug reports to: <%s>.\n"
msgstr ""
-"Sporočila o napakah pošljite na: <%s> .\n"
-"Poskrbite, da bo nekje v polju »Subject« nastopal izraz »%s«.\n"
-#: sed/sed.c:99
+#: sed/sed.c:129
msgid ""
" -R, --regexp-perl\n"
" use Perl 5's regular expressions syntax in the script.\n"
@@ -243,7 +626,7 @@ msgstr ""
" -R, --regexp-perl\n"
" dovoli uporabo regularnih izrazov, ki jih podpira Perl 5\n"
-#: sed/sed.c:104
+#: sed/sed.c:134
#, c-format
msgid ""
"Usage: %s [OPTION]... {script-only-if-no-other-script} [input-file]...\n"
@@ -252,7 +635,7 @@ msgstr ""
"Uporaba: %s [IZBIRA]... {skript--če-je-en-sam} [vhodna-datoteka]...\n"
"\n"
-#: sed/sed.c:108
+#: sed/sed.c:138
#, c-format
msgid ""
" -n, --quiet, --silent\n"
@@ -261,7 +644,7 @@ msgstr ""
" -n, --quiet, --silent\n"
" brez samodejnega izpisa prostora vzorcev\n"
-#: sed/sed.c:110
+#: sed/sed.c:140
#, c-format
msgid ""
" -e script, --expression=script\n"
@@ -270,7 +653,7 @@ msgstr ""
" -e SKRIPT, --expression=SKRIPT\n"
" dodaj SKRIPT med ukaze, ki se izvedejo\n"
-#: sed/sed.c:112
+#: sed/sed.c:142
#, c-format
msgid ""
" -f script-file, --file=script-file\n"
@@ -280,7 +663,7 @@ msgstr ""
" -f SKRIPTNA_DATOTEKA, --file=SKRIPTNA_DATOTEKA\n"
" dodaj vsebino SKRIPTNE DATOTEKE med ukaze, ki se izvedejo\n"
-#: sed/sed.c:115
+#: sed/sed.c:146
#, c-format
msgid ""
" --follow-symlinks\n"
@@ -289,7 +672,7 @@ msgstr ""
" --follow-symlinks\n"
" pri obdelavi na mestu sledi simbolnim povezavam\n"
-#: sed/sed.c:118
+#: sed/sed.c:149
#, fuzzy, c-format
msgid ""
" -i[SUFFIX], --in-place[=SUFFIX]\n"
@@ -300,7 +683,7 @@ msgstr ""
"z\n"
" dano pripono, če je ta podana)\n"
-#: sed/sed.c:121
+#: sed/sed.c:153
#, c-format
msgid ""
" -b, --binary\n"
@@ -310,7 +693,7 @@ msgstr ""
" -b, --binary\n"
" odpri kot binarno datoteko (brez posebne obravnave CR+LF)\n"
-#: sed/sed.c:124
+#: sed/sed.c:157
#, c-format
msgid ""
" -l N, --line-length=N\n"
@@ -319,7 +702,7 @@ msgstr ""
" -l N, --line-length=N\n"
" določi širino vrstice za ukaz ,l` na N znakov\n"
-#: sed/sed.c:126
+#: sed/sed.c:159
#, c-format
msgid ""
" --posix\n"
@@ -328,28 +711,35 @@ msgstr ""
" --posix\n"
" onemogoči vse razširitve GNU\n"
-#: sed/sed.c:128
-#, c-format
+#: sed/sed.c:161
+#, fuzzy, c-format
msgid ""
-" -r, --regexp-extended\n"
-" use extended regular expressions in the script.\n"
+" -E, -r, --regexp-extended\n"
+" use extended regular expressions in the script\n"
+" (for portability use POSIX -E).\n"
msgstr ""
" -r, --regexp-extended\n"
" dovoli uporabo razširjenih regularnih izrazov.\n"
-#: sed/sed.c:133
-#, c-format
+#: sed/sed.c:167
+#, fuzzy, c-format
msgid ""
" -s, --separate\n"
-" consider files as separate rather than as a single "
-"continuous\n"
-" long stream.\n"
+" consider files as separate rather than as a single,\n"
+" continuous long stream.\n"
msgstr ""
" -s, --separate\n"
" datoteke obravnavaj kot ločene, ne pa kot neprekinjen tok\n"
" podatkov\n"
-#: sed/sed.c:136
+#: sed/sed.c:170
+#, c-format
+msgid ""
+" --sandbox\n"
+" operate in sandbox mode.\n"
+msgstr ""
+
+#: sed/sed.c:172
#, c-format
msgid ""
" -u, --unbuffered\n"
@@ -362,24 +752,24 @@ msgstr ""
"pogosteje\n"
" izprazni izhodni medpomnilnik\n"
-#: sed/sed.c:139
+#: sed/sed.c:175
#, c-format
msgid ""
" -z, --null-data\n"
" separate lines by NUL characters\n"
msgstr ""
-#: sed/sed.c:141
+#: sed/sed.c:177
#, c-format
msgid " --help display this help and exit\n"
msgstr " --help prikaži ta navodila in končaj\n"
-#: sed/sed.c:142
+#: sed/sed.c:178
#, c-format
msgid " --version output version information and exit\n"
msgstr " --version različica programa\n"
-#: sed/sed.c:143
+#: sed/sed.c:179
#, c-format
msgid ""
"\n"
@@ -396,121 +786,59 @@ msgstr ""
"Če ni podano nobeno ime datoteke, se bere standardni vhod.\n"
"\n"
-#: sed/utils.c:74 sed/utils.c:432
+#: sed/utils.c:73 sed/utils.c:384
#, c-format
msgid "cannot remove %s: %s"
msgstr "ni mogoče odstraniti %s: %s"
-#: sed/utils.c:144
+#: sed/utils.c:136
#, c-format
msgid "couldn't open file %s: %s"
msgstr "ni mogoče odpreti datoteke %s: %s"
-#: sed/utils.c:167
+#: sed/utils.c:155
#, c-format
msgid "couldn't attach to %s: %s"
msgstr "ni mogoče pripeti k %s: %s"
-#: sed/utils.c:229
-#, c-format
-msgid "couldn't write %d item to %s: %s"
-msgid_plural "couldn't write %d items to %s: %s"
+#: sed/utils.c:192
+#, fuzzy, c-format
+msgid "couldn't write %llu item to %s: %s"
+msgid_plural "couldn't write %llu items to %s: %s"
msgstr[0] "ni mogoče zapisati %d elementov na %s: %s"
msgstr[1] "ni mogoče zapisati %d elementa na %s: %s"
msgstr[2] "ni mogoče zapisati %d elementov na %s: %s"
msgstr[3] "ni mogoče zapisati %d elementov na %s: %s"
-#: sed/utils.c:244 sed/utils.c:267
+#: sed/utils.c:204 sed/utils.c:223
#, c-format
msgid "read error on %s: %s"
msgstr "napaka pri branju z %s: %s"
-#: sed/utils.c:372
+#: sed/utils.c:325
#, c-format
msgid "couldn't follow symlink %s: %s"
msgstr "ni mogoče slediti simbolni povezavi %s: %s"
-#: sed/utils.c:406
+#: sed/utils.c:359
#, c-format
msgid "cannot stat %s: %s"
msgstr "ni mogoče ugotoviti statistike %s: %s"
-#: sed/utils.c:437
+#: sed/utils.c:389
#, c-format
msgid "cannot rename %s: %s"
msgstr "ni mogoče preimenovati %s: %s"
-#: lib/regcomp.c:132
-msgid "Success"
-msgstr "Uspešno"
-
-#: lib/regcomp.c:135
-msgid "No match"
-msgstr "Ni ujemanja"
+#~ msgid "cannot specify modifiers on empty regexp"
+#~ msgstr "navajanje modifikatorjev pri praznem regularnem izrazu ni mogoče"
-#: lib/regcomp.c:138
-msgid "Invalid regular expression"
-msgstr "Neveljavni regularni izraz"
-
-#: lib/regcomp.c:141
-msgid "Invalid collation character"
-msgstr "Znaka izven abecede"
-
-#: lib/regcomp.c:144
-msgid "Invalid character class name"
-msgstr "Neveljavno ime razreda znakov"
-
-#: lib/regcomp.c:147
-msgid "Trailing backslash"
-msgstr "Zaključna obrnjena poševnica"
-
-#: lib/regcomp.c:150
-msgid "Invalid back reference"
-msgstr "Neveljavni povratni sklic"
-
-#: lib/regcomp.c:153
-msgid "Unmatched [ or [^"
-msgstr "Oklepaj [ ali [^ brez zaklepaja"
-
-#: lib/regcomp.c:156
-msgid "Unmatched ( or \\("
-msgstr "Oklepaj ( ali \\( brez zaklepaja"
-
-#: lib/regcomp.c:159
-msgid "Unmatched \\{"
-msgstr "Oklepaj \\{ brez zaklepaja"
-
-#: lib/regcomp.c:162
-msgid "Invalid content of \\{\\}"
-msgstr "Neveljavna vsebina \\{\\}"
-
-#: lib/regcomp.c:165
-msgid "Invalid range end"
-msgstr "Neveljavna zgornja meja intervala"
-
-#: lib/regcomp.c:168
-msgid "Memory exhausted"
-msgstr "Zmanjkalo pomnilnika"
-
-#: lib/regcomp.c:171
-msgid "Invalid preceding regular expression"
-msgstr "Neveljaven prejšnji regularni izraz"
-
-#: lib/regcomp.c:174
-msgid "Premature end of regular expression"
-msgstr "Predčasni zaključek regularnega izraza"
-
-#: lib/regcomp.c:177
-msgid "Regular expression too big"
-msgstr "Regularni izraz prevelik"
-
-#: lib/regcomp.c:180
-msgid "Unmatched ) or \\)"
-msgstr "Oklepaj ) ali \\) brez zaklepaja"
-
-#: lib/regcomp.c:705
-msgid "No previous regular expression"
-msgstr "Prejšnji regularni izraz manjka"
+#~ msgid ""
+#~ "E-mail bug reports to: <%s>.\n"
+#~ "Be sure to include the word ``%s'' somewhere in the ``Subject:'' field.\n"
+#~ msgstr ""
+#~ "Sporočila o napakah pošljite na: <%s> .\n"
+#~ "Poskrbite, da bo nekje v polju »Subject« nastopal izraz »%s«.\n"
#~ msgid "super-sed version %s\n"
#~ msgstr "super-sed, različica %s\n"
diff --git a/po/sr.gmo b/po/sr.gmo
index 4c3ab84..4b6a33d 100644
--- a/po/sr.gmo
+++ b/po/sr.gmo
Binary files differ
diff --git a/po/sr.po b/po/sr.po
index a8e4b64..95ef3d4 100644
--- a/po/sr.po
+++ b/po/sr.po
@@ -1,222 +1,625 @@
# Serbian translation of sed.
-# Copyright (C) 2012 Free Software Foundation, Inc.
+# Copyright (C) 2016 Free Software Foundation, Inc.
# This file is distributed under the same license as the sed package.
# Aleksandar Jelenak <jelenak@verizon.net>, 2006.
-# Мирослав Николић <miroslavnikolic@rocketmail.com>, 2012.
+# Мирослав Николић <miroslavnikolic@rocketmail.com>, 2012—2016.
msgid ""
msgstr ""
-"Project-Id-Version: sed-4.2.1\n"
+"Project-Id-Version: sed-4.2.2.177\n"
"Report-Msgid-Bugs-To: bug-gnu-utils@gnu.org\n"
-"POT-Creation-Date: 2012-12-22 14:36+0100\n"
-"PO-Revision-Date: 2012-01-15 01:16+0200\n"
+"POT-Creation-Date: 2016-12-30 00:59-0800\n"
+"PO-Revision-Date: 2016-12-18 08:03+0200\n"
"Last-Translator: Мирослав Николић <miroslavnikolic@rocketmail.com>\n"
-"Language-Team: Serbian <gnu@prevod.org>\n"
+"Language-Team: Serbian <(nothing)>\n"
"Language: sr\n"
"MIME-Version: 1.0\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=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n"
"%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n"
-#: sed/compile.c:144
+#: lib/closeout.c:112
+msgid "write error"
+msgstr "грешка писања"
+
+#: lib/copy-acl.c:54
+#, c-format
+msgid "preserving permissions for %s"
+msgstr "причувавам овлашћења за %s"
+
+#: lib/dfa.c:1025 lib/dfa.c:1028 lib/dfa.c:1047 lib/dfa.c:1057 lib/dfa.c:1070
+#: lib/dfa.c:1098 lib/dfa.c:1107 lib/dfa.c:1110 lib/dfa.c:1115 lib/dfa.c:1137
+#: lib/dfa.c:1140
+msgid "unbalanced ["
+msgstr "неуравнотежена ["
+
+#: lib/dfa.c:1083
+msgid "invalid character class"
+msgstr "неисправна класа знака"
+
+#: lib/dfa.c:1206
+msgid "character class syntax is [[:space:]], not [:space:]"
+msgstr "синтакса класе знака је [[:размак:]], а не [:размак:]"
+
+#: lib/dfa.c:1275
+msgid "unfinished \\ escape"
+msgstr "недовршена \\ излазим"
+
+#: lib/dfa.c:1436
+msgid "invalid content of \\{\\}"
+msgstr "неисправан садржај \\{\\}"
+
+#: lib/dfa.c:1439
+msgid "regular expression too big"
+msgstr "регуларни израз је превелик"
+
+#: lib/dfa.c:1853
+msgid "unbalanced ("
+msgstr "неуравнотежена ("
+
+#: lib/dfa.c:1980
+msgid "no syntax specified"
+msgstr "синтакса није наведена"
+
+#: lib/dfa.c:1988
+msgid "unbalanced )"
+msgstr "неуравнотежена )"
+
+#: lib/error.c:191
+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"
+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:667 lib/getopt.c:672
+#, c-format
+msgid "%s: option '%c%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"
+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
+#, 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
+#, 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 "нема више меморије"
+
+#. TRANSLATORS:
+#. Get translations for open and closing quotation marks.
+#. The message catalog should translate "`" to a left
+#. quotation mark suitable for the locale, and similarly for
+#. "'". For example, a French Unicode local should translate
+#. these to U+00AB (LEFT-POINTING DOUBLE ANGLE
+#. QUOTATION MARK), and U+00BB (RIGHT-POINTING DOUBLE ANGLE
+#. QUOTATION MARK), respectively.
+#.
+#. If the catalog has no translation, we will try to
+#. use Unicode U+2018 (LEFT SINGLE QUOTATION MARK) and
+#. Unicode U+2019 (RIGHT SINGLE QUOTATION MARK). If the
+#. current locale is not Unicode, locale_quoting_style
+#. will quote 'like this', and clocale_quoting_style will
+#. quote "like this". You should always include translations
+#. for "`" and "'" even if U+2018 and U+2019 are appropriate
+#. for your locale.
+#.
+#. If you don't know what to put here, please see
+#. <http://en.wikipedia.org/wiki/Quotation_marks_in_other_languages>
+#. and use glyphs suitable for your language.
+#: lib/quotearg.c:354
+msgid "`"
+msgstr "„"
+
+#: lib/quotearg.c:355
+msgid "'"
+msgstr "“"
+
+#: lib/regcomp.c:135
+msgid "Success"
+msgstr "Успешно"
+
+#: lib/regcomp.c:138
+msgid "No match"
+msgstr "Нема поклапања"
+
+#: lib/regcomp.c:141
+msgid "Invalid regular expression"
+msgstr "Неисправан регуларни израз"
+
+#: lib/regcomp.c:144
+msgid "Invalid collation character"
+msgstr "Неисправан знак слагања"
+
+#: lib/regcomp.c:147
+msgid "Invalid character class name"
+msgstr "Неисправан назив класе знака"
+
+#: lib/regcomp.c:150
+msgid "Trailing backslash"
+msgstr "Пратећа обрнута коса црта"
+
+#: lib/regcomp.c:153
+msgid "Invalid back reference"
+msgstr "Неисправна повратна упута"
+
+#: lib/regcomp.c:156
+msgid "Unmatched [, [^, [:, [., or [="
+msgstr "Није упарена [, [^, [:, [., или [="
+
+#: lib/regcomp.c:159
+msgid "Unmatched ( or \\("
+msgstr "Није упарена ( или \\("
+
+#: lib/regcomp.c:162
+msgid "Unmatched \\{"
+msgstr "Није упарена \\{"
+
+#: lib/regcomp.c:165
+msgid "Invalid content of \\{\\}"
+msgstr "Неисправан садржај у \\{\\}"
+
+#: lib/regcomp.c:168
+msgid "Invalid range end"
+msgstr "Неисправан крај опсега"
+
+#: lib/regcomp.c:171
+msgid "Memory exhausted"
+msgstr "Нема више меморије"
+
+#: lib/regcomp.c:174
+msgid "Invalid preceding regular expression"
+msgstr "Неисправан регуларни израз који претходи"
+
+#: lib/regcomp.c:177
+msgid "Premature end of regular expression"
+msgstr "Прерани крај регуларног израза"
+
+#: lib/regcomp.c:180
+msgid "Regular expression too big"
+msgstr "Регуларан израз је превелик"
+
+#: lib/regcomp.c:183
+msgid "Unmatched ) or \\)"
+msgstr "Није упарена ) или \\)"
+
+#: lib/regcomp.c:687
+msgid "No previous regular expression"
+msgstr "Нема претходног регуларног израза"
+
+#: lib/set-acl.c:46
+#, c-format
+msgid "setting permissions for %s"
+msgstr "подешавам овлашћења за %s"
+
+#: lib/version-etc.c:74
+#, c-format
+msgid "Packaged by %s (%s)\n"
+msgstr "Запаковао је %s (%s)\n"
+
+#: lib/version-etc.c:77
+#, c-format
+msgid "Packaged by %s\n"
+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 "©"
+
+#: lib/version-etc.c:86
+msgid ""
+"\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"
+msgstr ""
+"\n"
+"Дозвола ОЈЛв3+: Гнуова ОЈЛ издање 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 "Написао је %s.\n"
+
+#. TRANSLATORS: Each %s denotes an author name.
+#: lib/version-etc.c:106
+#, c-format
+msgid "Written by %s and %s.\n"
+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 "Написали су %s, %s, и %s.\n"
+
+#. TRANSLATORS: Each %s denotes an author name.
+#. You can use line breaks, estimating that each author name occupies
+#. ca. 16 screen columns and that a screen line has ca. 80 columns.
+#: lib/version-etc.c:117
+#, c-format
+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
+#. ca. 16 screen columns and that a screen line has ca. 80 columns.
+#: lib/version-etc.c:124
+#, c-format
+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
+#. ca. 16 screen columns and that a screen line has ca. 80 columns.
+#: lib/version-etc.c:131
+#, c-format
+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
+#. ca. 16 screen columns and that a screen line has ca. 80 columns.
+#: lib/version-etc.c:139
+#, c-format
+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
+#. ca. 16 screen columns and that a screen line has ca. 80 columns.
+#: lib/version-etc.c:147
+#, c-format
+msgid ""
+"Written by %s, %s, %s,\n"
+"%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
+#. ca. 16 screen columns and that a screen line has ca. 80 columns.
+#: lib/version-etc.c:156
+#, c-format
+msgid ""
+"Written by %s, %s, %s,\n"
+"%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
+#. ca. 16 screen columns and that a screen line has ca. 80 columns.
+#: lib/version-etc.c:167
+#, c-format
+msgid ""
+"Written by %s, %s, %s,\n"
+"%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
+#. "Report translation bugs to <...>\n" with the address for translation
+#. bugs (typically your translation team's web or email address).
+#: lib/version-etc.c:245
+#, c-format
+msgid ""
+"\n"
+"Report bugs to: %s\n"
+msgstr ""
+"\n"
+"Грешке пријавите на: %s\n"
+
+#: lib/version-etc.c:247
+#, c-format
+msgid "Report %s bugs to: %s\n"
+msgstr "Грешке програма „%s“ пријавите на: %s\n"
+
+#: lib/version-etc.c:251
+#, c-format
+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"
+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 "Општа помоћ за Гнуов софтвер: <http://www.gnu.org/gethelp/>\n"
+
+#: sed/compile.c:146
msgid "multiple `!'s"
msgstr "више „!“"
-#: sed/compile.c:145
+#: sed/compile.c:147
msgid "unexpected `,'"
msgstr "неочекиван „,“"
-#: sed/compile.c:146
+#: sed/compile.c:149
msgid "invalid usage of +N or ~N as first address"
msgstr "неисправно употребљено +N или ~N као прва адреса"
-#: sed/compile.c:147
+#: sed/compile.c:150
msgid "unmatched `{'"
-msgstr "неупарена „{“"
+msgstr "није упарена {"
-#: sed/compile.c:148
+#: sed/compile.c:151
msgid "unexpected `}'"
msgstr "неочекивана „}“"
-#: sed/compile.c:149
+#: sed/compile.c:153
msgid "extra characters after command"
msgstr "вишак знакова после наредбе"
-#: sed/compile.c:150
+#: sed/compile.c:155
msgid "expected \\ after `a', `c' or `i'"
msgstr "очекивана је \\ после „a“, „c“ или „i“"
-#: sed/compile.c:151
+#: sed/compile.c:157
msgid "`}' doesn't want any addresses"
msgstr "„}“ не захтева никакве адресе"
-#: sed/compile.c:152
+#: sed/compile.c:159
msgid ": doesn't want any addresses"
msgstr ": не захтева никакве адресе"
-#: sed/compile.c:153
+#: sed/compile.c:161
msgid "comments don't accept any addresses"
msgstr "примедбе не прихватају никакве адресе"
-#: sed/compile.c:154
+#: sed/compile.c:162
msgid "missing command"
msgstr "недостаје наредба"
-#: sed/compile.c:155
+#: sed/compile.c:163
msgid "command only uses one address"
msgstr "наредба користи само једну адресу"
-#: sed/compile.c:156
+#: sed/compile.c:164
msgid "unterminated address regex"
msgstr "недовршен рег. израз адресе"
-#: sed/compile.c:157
+#: sed/compile.c:165
msgid "unterminated `s' command"
msgstr "недовршена наредба „s“"
-#: sed/compile.c:158
+#: sed/compile.c:166
msgid "unterminated `y' command"
msgstr "недовршена наредба „y“"
-#: sed/compile.c:159
+#: sed/compile.c:167
msgid "unknown option to `s'"
msgstr "непозната опција за „s“"
-#: sed/compile.c:160
+#: sed/compile.c:169
msgid "multiple `p' options to `s' command"
msgstr "више „p“ опција за „s“ наредбу"
-#: sed/compile.c:161
+#: sed/compile.c:171
msgid "multiple `g' options to `s' command"
msgstr "више „g“ опција за „s“ наредбу"
-#: sed/compile.c:162
+#: sed/compile.c:173
msgid "multiple number options to `s' command"
msgstr "више бројчаних опција за „s“ наредбу"
-#: sed/compile.c:163
+#: sed/compile.c:175
msgid "number option to `s' command may not be zero"
msgstr "бројчана опција наредбе „s“ не може бити нула"
-#: sed/compile.c:164
+#: sed/compile.c:177
msgid "strings for `y' command are different lengths"
msgstr "ниске за наредбу „y“ су различитих дужина"
-#: sed/compile.c:165
+#: sed/compile.c:179
msgid "delimiter character is not a single-byte character"
msgstr "раздвојник није једнобајтни знак"
-#: sed/compile.c:166
+#: sed/compile.c:181
msgid "expected newer version of sed"
msgstr "очекивано је новије издање седа"
-#: sed/compile.c:167
+#: sed/compile.c:183
msgid "invalid usage of line address 0"
msgstr "неправилна употреба адресе реда 0"
-#: sed/compile.c:168
+#: sed/compile.c:184
#, c-format
msgid "unknown command: `%c'"
msgstr "непозната наредба: „%c“"
-#: sed/compile.c:169
-#, fuzzy
+#: sed/compile.c:186
msgid "incomplete command"
-msgstr "недостаје наредба"
+msgstr "непотпуна наредба"
-#: sed/compile.c:192
+#: sed/compile.c:188
+msgid "\":\" lacks a label"
+msgstr "„:“ недостаје натпис"
+
+#: sed/compile.c:190
+msgid "recursive escaping after \\c not allowed"
+msgstr "дубинско завршавање реда након „\\c“ није дозвољено"
+
+#: sed/compile.c:213
#, c-format
msgid "%s: file %s line %lu: %s\n"
msgstr "%s: датотека %s ред %lu: %s\n"
-#: sed/compile.c:195
+#: sed/compile.c:216
#, c-format
msgid "%s: -e expression #%lu, char %lu: %s\n"
msgstr "%s: -e израз #%lu, знак %lu: %s\n"
-#: sed/compile.c:1657
+#: sed/compile.c:1639
#, c-format
msgid "can't find label for jump to `%s'"
msgstr "не могу да нађем ознаку за скок на „%s“"
-#: sed/execute.c:595
+#: sed/execute.c:264 sed/execute.c:281
+#, c-format
+msgid "case conversion produced an invalid character"
+msgstr "претварање величине знакова је резултирало неисправним знаком"
+
+#: sed/execute.c:575
#, c-format
msgid "%s: can't read %s: %s\n"
msgstr "%s: не могу да прочитам %s: %s\n"
-#: sed/execute.c:624
+#: sed/execute.c:600
#, c-format
msgid "couldn't edit %s: is a terminal"
msgstr "не могу да уредим %s: то је терминал"
-#: sed/execute.c:629
+#: sed/execute.c:605
#, c-format
msgid "couldn't edit %s: not a regular file"
msgstr "не могу да уредим %s: није обична датотека"
-#: sed/execute.c:640
+#: sed/execute.c:616
#, c-format
msgid "%s: warning: failed to set default file creation context to %s: %s"
msgstr ""
"%s: упозорење: нисам успео да подесим основни контекст стварања датотеке на "
"%s: %s"
-#: sed/execute.c:647
+#: sed/execute.c:624
#, c-format
msgid "%s: warning: failed to get security context of %s: %s"
msgstr "%s: упозорење: нисам успео да добавим безбедносни контекст за %s: %s"
-#: sed/execute.c:664 sed/utils.c:211
+#: sed/execute.c:643 sed/utils.c:178
#, c-format
msgid "couldn't open temporary file %s: %s"
msgstr "не могу да отворим привремену датотеку %s: %s"
-#: sed/execute.c:1193 sed/execute.c:1373
+#: sed/execute.c:1158 sed/execute.c:1368
msgid "error in subprocess"
msgstr "грешка у потпроцесу"
-#: sed/execute.c:1195
+#: sed/execute.c:1160
msgid "option `e' not supported"
msgstr "опција „e“ није подржана"
-#: sed/execute.c:1375
+#: sed/execute.c:1349
msgid "`e' command not supported"
msgstr "наредба „e“ није подржана"
-#: sed/execute.c:1725
+#: sed/execute.c:1675
msgid "no input files"
msgstr "нема улазних датотека"
-#: sed/regexp.c:39
+#: sed/regexp.c:38
msgid "no previous regular expression"
msgstr "без претходног регуларног израза"
-#: sed/regexp.c:40
-msgid "cannot specify modifiers on empty regexp"
-msgstr "не можете навести измењивач празном рег. изразу"
-
-#: sed/regexp.c:129
+#: sed/regexp.c:138
#, c-format
msgid "invalid reference \\%d on `s' command's RHS"
msgstr "неисправна референца \\%d на десној страни наредбе „s“"
-#: sed/sed.c:32
+#: sed/sed.c:35
msgid "Jay Fenlason"
-msgstr ""
+msgstr "Џеј Фенласон"
-#: sed/sed.c:33
+#: sed/sed.c:36
msgid "Tom Lord"
-msgstr ""
+msgstr "Том Лорд"
-#: sed/sed.c:34
+#: sed/sed.c:37
msgid "Ken Pizzini"
-msgstr ""
+msgstr "Кен Пицини"
-#: sed/sed.c:35
+#: sed/sed.c:38
msgid "Paolo Bonzini"
-msgstr ""
+msgstr "Паоло Бонцини"
-#: sed/sed.c:79
+#: sed/sed.c:113
#, c-format
msgid ""
"GNU sed home page: <http://www.gnu.org/software/sed/>.\n"
@@ -225,16 +628,12 @@ msgstr ""
"Матична страница ГНУ-овог седа: <http://www.gnu.org/software/sed/>.\n"
"Општа помоћ за коришћење ГНУ-ових програма: <http://www.gnu.org/gethelp/>.\n"
-#: sed/sed.c:86
+#: sed/sed.c:120
#, c-format
-msgid ""
-"E-mail bug reports to: <%s>.\n"
-"Be sure to include the word ``%s'' somewhere in the ``Subject:'' field.\n"
-msgstr ""
-"Ел. пошта за пријаву грешака: <%s>.\n"
-"Постарајте се да укључите реч „%s“ негде у пољу „Тема:“.\n"
+msgid "E-mail bug reports to: <%s>.\n"
+msgstr "Извештаје о грешкама пошаљите на: <%s>.\n"
-#: sed/sed.c:99
+#: sed/sed.c:129
msgid ""
" -R, --regexp-perl\n"
" use Perl 5's regular expressions syntax in the script.\n"
@@ -242,7 +641,7 @@ msgstr ""
" -R, --regexp-perl\n"
" користи синтаксу регуларних израза Перла 5 у скрипти.\n"
-#: sed/sed.c:104
+#: sed/sed.c:134
#, c-format
msgid ""
"Usage: %s [OPTION]... {script-only-if-no-other-script} [input-file]...\n"
@@ -252,7 +651,7 @@ msgstr ""
"датотека]...\n"
"\n"
-#: sed/sed.c:108
+#: sed/sed.c:138
#, c-format
msgid ""
" -n, --quiet, --silent\n"
@@ -261,7 +660,7 @@ msgstr ""
" -n, --quiet, --silent\n"
" обуставља аутоматски испис простора образаца\n"
-#: sed/sed.c:110
+#: sed/sed.c:140
#, c-format
msgid ""
" -e script, --expression=script\n"
@@ -270,7 +669,7 @@ msgstr ""
" -e спис, --expression=скрипта\n"
" додаје скрипту наредбама да би била извршена\n"
-#: sed/sed.c:112
+#: sed/sed.c:142
#, c-format
msgid ""
" -f script-file, --file=script-file\n"
@@ -280,7 +679,7 @@ msgstr ""
" -f списотека, --file=списотека\n"
" додаје садржај списотеке наредбама да би била извршена\n"
-#: sed/sed.c:115
+#: sed/sed.c:146
#, c-format
msgid ""
" --follow-symlinks\n"
@@ -289,17 +688,17 @@ msgstr ""
" --follow-symlinks\n"
" прати симболичне везе када обрађује на месту\n"
-#: sed/sed.c:118
-#, fuzzy, c-format
+#: sed/sed.c:149
+#, c-format
msgid ""
" -i[SUFFIX], --in-place[=SUFFIX]\n"
" edit files in place (makes backup if SUFFIX supplied)\n"
msgstr ""
" -i[СУФИКС], --in-place[=СУФИКС]\n"
-" уређује датотеке на месту (прави резерву ако је дато "
-"проширење)\n"
+" уређује датотеке на месту (прави резерву ако је дат "
+"СУФИКС)\n"
-#: sed/sed.c:121
+#: sed/sed.c:153
#, c-format
msgid ""
" -b, --binary\n"
@@ -310,7 +709,7 @@ msgstr ""
" отвара датотеке у бинарном режиму (ЦР+ЛФ нису посебно "
"обрађени)\n"
-#: sed/sed.c:124
+#: sed/sed.c:157
#, c-format
msgid ""
" -l N, --line-length=N\n"
@@ -319,7 +718,7 @@ msgstr ""
" -l N, --line-length=Н\n"
" наводи жељену ширину реда за наредбу „l“\n"
-#: sed/sed.c:126
+#: sed/sed.c:159
#, c-format
msgid ""
" --posix\n"
@@ -328,27 +727,38 @@ msgstr ""
" --posix\n"
" искључује сва ГНУ-ова проширења.\n"
-#: sed/sed.c:128
+#: sed/sed.c:161
#, c-format
msgid ""
-" -r, --regexp-extended\n"
-" use extended regular expressions in the script.\n"
+" -E, -r, --regexp-extended\n"
+" use extended regular expressions in the script\n"
+" (for portability use POSIX -E).\n"
msgstr ""
-" -r, --regexp-extended\n"
-" користи проширене регуларне изразе у спису.\n"
+" -E, -r, --regexp-extended\n"
+" користи проширене регуларне изразе у спису\n"
+" (зарад преносивости користитие „POSIX -E).\n"
-#: sed/sed.c:133
+#: sed/sed.c:167
#, c-format
msgid ""
" -s, --separate\n"
-" consider files as separate rather than as a single "
-"continuous\n"
-" long stream.\n"
+" consider files as separate rather than as a single,\n"
+" continuous long stream.\n"
msgstr ""
" -s, --separate\n"
-" сматра датотеке одвојеним а не као један непрекидан ток\n"
+" сматра датотеке одвојеним а не као један,\n"
+" непрекидан дуги ток.\n"
+
+#: sed/sed.c:170
+#, c-format
+msgid ""
+" --sandbox\n"
+" operate in sandbox mode.\n"
+msgstr ""
+" --sandbox\n"
+" ради у режиму заштићеног окружења.\n"
-#: sed/sed.c:136
+#: sed/sed.c:172
#, c-format
msgid ""
" -u, --unbuffered\n"
@@ -360,24 +770,26 @@ msgstr ""
" учитава најмање количине података из улазних датотека и\n"
" чешће празни излазне бафере\n"
-#: sed/sed.c:139
+#: sed/sed.c:175
#, c-format
msgid ""
" -z, --null-data\n"
" separate lines by NUL characters\n"
msgstr ""
+" -z, --null-data\n"
+" раздваја редове НИШТАВНИМ знацима\n"
-#: sed/sed.c:141
+#: sed/sed.c:177
#, c-format
msgid " --help display this help and exit\n"
msgstr " --help приказује ову помоћ и излази\n"
-#: sed/sed.c:142
+#: sed/sed.c:178
#, c-format
msgid " --version output version information and exit\n"
-msgstr " --version испишисује издање и излази\n"
+msgstr " --version исписује податке о издању и излази\n"
-#: sed/sed.c:143
+#: sed/sed.c:179
#, c-format
msgid ""
"\n"
@@ -394,120 +806,58 @@ msgstr ""
"стандардног улаза.\n"
"\n"
-#: sed/utils.c:74 sed/utils.c:432
+#: sed/utils.c:73 sed/utils.c:384
#, c-format
msgid "cannot remove %s: %s"
msgstr "не могу да уклоним %s: %s"
-#: sed/utils.c:144
+#: sed/utils.c:136
#, c-format
msgid "couldn't open file %s: %s"
msgstr "не могу да отворим датотеку %s: %s"
-#: sed/utils.c:167
+#: sed/utils.c:155
#, c-format
msgid "couldn't attach to %s: %s"
msgstr "не могу да прикачим на %s: %s"
-#: sed/utils.c:229
+#: sed/utils.c:192
#, c-format
-msgid "couldn't write %d item to %s: %s"
-msgid_plural "couldn't write %d items to %s: %s"
-msgstr[0] "не могу да запишем %d ставку на %s: %s"
-msgstr[1] "не могу да запишем %d ставке на %s: %s"
-msgstr[2] "не могу да запишем %d ставки на %s: %s"
+msgid "couldn't write %llu item to %s: %s"
+msgid_plural "couldn't write %llu items to %s: %s"
+msgstr[0] "не могу да запишем %llu ставку на %s: %s"
+msgstr[1] "не могу да запишем %llu ставке на %s: %s"
+msgstr[2] "не могу да запишем %llu ставки на %s: %s"
-#: sed/utils.c:244 sed/utils.c:267
+#: sed/utils.c:204 sed/utils.c:223
#, c-format
msgid "read error on %s: %s"
msgstr "грешка читања на %s: %s"
-#: sed/utils.c:372
+#: sed/utils.c:325
#, c-format
msgid "couldn't follow symlink %s: %s"
msgstr "не могу да пратим симболичку везу %s: %s"
-#: sed/utils.c:406
+#: sed/utils.c:359
#, c-format
msgid "cannot stat %s: %s"
-msgstr "не могу да утврдим стање %s: %s"
+msgstr "не могу да добавим податке „%s“: %s"
-#: sed/utils.c:437
+#: sed/utils.c:389
#, c-format
msgid "cannot rename %s: %s"
msgstr "не могу да преименујем %s: %s"
-#: lib/regcomp.c:132
-msgid "Success"
-msgstr "Успешно"
-
-#: lib/regcomp.c:135
-msgid "No match"
-msgstr "Нема поклапања"
-
-#: lib/regcomp.c:138
-msgid "Invalid regular expression"
-msgstr "Неисправан регуларни израз"
-
-#: lib/regcomp.c:141
-msgid "Invalid collation character"
-msgstr "Неисправан знак прикупљања"
-
-#: lib/regcomp.c:144
-msgid "Invalid character class name"
-msgstr "Неисправан назив класе знакова"
-
-#: lib/regcomp.c:147
-msgid "Trailing backslash"
-msgstr "Пратећа обрнута коса црта"
-
-#: lib/regcomp.c:150
-msgid "Invalid back reference"
-msgstr "Неисправна повратна референца"
-
-#: lib/regcomp.c:153
-msgid "Unmatched [ or [^"
-msgstr "Неупарено [ или ^["
-
-#: lib/regcomp.c:156
-msgid "Unmatched ( or \\("
-msgstr "Неупарено ( или \\("
-
-#: lib/regcomp.c:159
-msgid "Unmatched \\{"
-msgstr "Неупарено \\{"
-
-#: lib/regcomp.c:162
-msgid "Invalid content of \\{\\}"
-msgstr "Неисправан садржај у \\{\\}"
-
-#: lib/regcomp.c:165
-msgid "Invalid range end"
-msgstr "Неисправан крај опсега"
-
-#: lib/regcomp.c:168
-msgid "Memory exhausted"
-msgstr "Меморија је исцрпљена"
-
-#: lib/regcomp.c:171
-msgid "Invalid preceding regular expression"
-msgstr "Неисправан претходећи регуларни израз"
+#~ msgid "cannot specify modifiers on empty regexp"
+#~ msgstr "не можете навести измењивач празном рег. изразу"
-#: lib/regcomp.c:174
-msgid "Premature end of regular expression"
-msgstr "Преран крај регуларног израза"
-
-#: lib/regcomp.c:177
-msgid "Regular expression too big"
-msgstr "Регуларни израз је сувише велик"
-
-#: lib/regcomp.c:180
-msgid "Unmatched ) or \\)"
-msgstr "Неупарено ) или \\)"
-
-#: lib/regcomp.c:705
-msgid "No previous regular expression"
-msgstr "Без претходног регуларног израза"
+#~ msgid ""
+#~ "E-mail bug reports to: <%s>.\n"
+#~ "Be sure to include the word ``%s'' somewhere in the ``Subject:'' field.\n"
+#~ msgstr ""
+#~ "Ел. пошта за пријаву грешака: <%s>.\n"
+#~ "Постарајте се да укључите реч „%s“ негде у пољу „Тема:“.\n"
#~ msgid "super-sed version %s\n"
#~ msgstr "супер-сед издање %s\n"
diff --git a/po/sv.gmo b/po/sv.gmo
index c83d4c1..2cd9a50 100644
--- a/po/sv.gmo
+++ b/po/sv.gmo
Binary files differ
diff --git a/po/sv.po b/po/sv.po
index edbc968..b95bb97 100644
--- a/po/sv.po
+++ b/po/sv.po
@@ -1,239 +1,627 @@
# Swedish messages for sed.
-# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2008 Free Software Foundation, Inc.
+# Copyright © 1999, 2000, 2001, 2002, 2003, 2004, 2008, 2015, 2016 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.
#
msgid ""
msgstr ""
-"Project-Id-Version: sed 4.2.0\n"
+"Project-Id-Version: sed 4.2.2\n"
"Report-Msgid-Bugs-To: bug-gnu-utils@gnu.org\n"
-"POT-Creation-Date: 2012-12-22 14:36+0100\n"
-"PO-Revision-Date: 2008-02-24 17:20+0100\n"
-"Last-Translator: Christian Rose <menthos@menthos.com>\n"
+"POT-Creation-Date: 2016-12-30 00:59-0800\n"
+"PO-Revision-Date: 2016-06-19 23:57+0200\n"
+"Last-Translator: Anders Jonsson <anders.jonsson@norsjovallen.se>\n"
"Language-Team: Swedish <tp-sv@listor.tp-sv.se>\n"
"Language: sv\n"
"MIME-Version: 1.0\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"
+"X-Generator: Poedit 1.8.8\n"
-#: sed/compile.c:144
+#: lib/closeout.c:112
+msgid "write error"
+msgstr ""
+
+#: lib/copy-acl.c:54
+#, c-format
+msgid "preserving permissions for %s"
+msgstr ""
+
+#: lib/dfa.c:1025 lib/dfa.c:1028 lib/dfa.c:1047 lib/dfa.c:1057 lib/dfa.c:1070
+#: lib/dfa.c:1098 lib/dfa.c:1107 lib/dfa.c:1110 lib/dfa.c:1115 lib/dfa.c:1137
+#: lib/dfa.c:1140
+msgid "unbalanced ["
+msgstr ""
+
+#: lib/dfa.c:1083
+#, fuzzy
+msgid "invalid character class"
+msgstr "Ogiltigt teckenklassnamn"
+
+#: lib/dfa.c:1206
+msgid "character class syntax is [[:space:]], not [:space:]"
+msgstr ""
+
+#: lib/dfa.c:1275
+msgid "unfinished \\ escape"
+msgstr ""
+
+#: lib/dfa.c:1436
+#, fuzzy
+msgid "invalid content of \\{\\}"
+msgstr "Ogiltigt innehåll i \\{\\}"
+
+#: lib/dfa.c:1439
+#, fuzzy
+msgid "regular expression too big"
+msgstr "Reguljärt uttryck för stort"
+
+#: lib/dfa.c:1853
+msgid "unbalanced ("
+msgstr ""
+
+#: lib/dfa.c:1980
+msgid "no syntax specified"
+msgstr ""
+
+#: lib/dfa.c:1988
+msgid "unbalanced )"
+msgstr ""
+
+#: lib/error.c:191
+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 ""
+
+#: lib/getopt.c:654 lib/getopt.c:658
+#, c-format
+msgid "%s: option '--%s' doesn't allow an argument\n"
+msgstr ""
+
+#: 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:715 lib/getopt.c:734
+#, c-format
+msgid "%s: option '--%s' requires an argument\n"
+msgstr ""
+
+#: 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
+#, 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
+#, 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 "Minnet slut"
+
+#. TRANSLATORS:
+#. Get translations for open and closing quotation marks.
+#. The message catalog should translate "`" to a left
+#. quotation mark suitable for the locale, and similarly for
+#. "'". For example, a French Unicode local should translate
+#. these to U+00AB (LEFT-POINTING DOUBLE ANGLE
+#. QUOTATION MARK), and U+00BB (RIGHT-POINTING DOUBLE ANGLE
+#. QUOTATION MARK), respectively.
+#.
+#. If the catalog has no translation, we will try to
+#. use Unicode U+2018 (LEFT SINGLE QUOTATION MARK) and
+#. Unicode U+2019 (RIGHT SINGLE QUOTATION MARK). If the
+#. current locale is not Unicode, locale_quoting_style
+#. will quote 'like this', and clocale_quoting_style will
+#. quote "like this". You should always include translations
+#. for "`" and "'" even if U+2018 and U+2019 are appropriate
+#. for your locale.
+#.
+#. If you don't know what to put here, please see
+#. <http://en.wikipedia.org/wiki/Quotation_marks_in_other_languages>
+#. and use glyphs suitable for your language.
+#: lib/quotearg.c:354
+msgid "`"
+msgstr ""
+
+#: lib/quotearg.c:355
+msgid "'"
+msgstr ""
+
+#: lib/regcomp.c:135
+msgid "Success"
+msgstr "Lyckades"
+
+#: lib/regcomp.c:138
+msgid "No match"
+msgstr "Ingen träff"
+
+#: lib/regcomp.c:141
+msgid "Invalid regular expression"
+msgstr "Ogiltigt reguljärt uttryck"
+
+#: lib/regcomp.c:144
+msgid "Invalid collation character"
+msgstr "Ogiltigt sorteringstecken"
+
+#: lib/regcomp.c:147
+msgid "Invalid character class name"
+msgstr "Ogiltigt teckenklassnamn"
+
+#: lib/regcomp.c:150
+msgid "Trailing backslash"
+msgstr "Eftersläpande omvänt snedstreck"
+
+#: lib/regcomp.c:153
+msgid "Invalid back reference"
+msgstr "Ogiltig bakåtreferens"
+
+#: lib/regcomp.c:156
+#, fuzzy
+msgid "Unmatched [, [^, [:, [., or [="
+msgstr "Obalanserad [ eller [^"
+
+#: lib/regcomp.c:159
+msgid "Unmatched ( or \\("
+msgstr "Obalanserad ( eller \\("
+
+#: lib/regcomp.c:162
+msgid "Unmatched \\{"
+msgstr "Obalanserad \\{"
+
+#: lib/regcomp.c:165
+msgid "Invalid content of \\{\\}"
+msgstr "Ogiltigt innehåll i \\{\\}"
+
+#: lib/regcomp.c:168
+msgid "Invalid range end"
+msgstr "Ogiltigt intervallslut"
+
+#: lib/regcomp.c:171
+msgid "Memory exhausted"
+msgstr "Minnet slut"
+
+#: lib/regcomp.c:174
+msgid "Invalid preceding regular expression"
+msgstr "Ogiltigt föregående reguljärt uttryck"
+
+#: lib/regcomp.c:177
+msgid "Premature end of regular expression"
+msgstr "För tidigt slut på reguljärt uttryck"
+
+#: lib/regcomp.c:180
+msgid "Regular expression too big"
+msgstr "Reguljärt uttryck för stort"
+
+#: lib/regcomp.c:183
+msgid "Unmatched ) or \\)"
+msgstr "Obalanserad ) eller \\)"
+
+#: lib/regcomp.c:687
+msgid "No previous regular expression"
+msgstr "Inget tidigare reguljärt uttryck"
+
+#: lib/set-acl.c:46
+#, c-format
+msgid "setting permissions for %s"
+msgstr ""
+
+#: lib/version-etc.c:74
+#, c-format
+msgid "Packaged by %s (%s)\n"
+msgstr ""
+
+#: lib/version-etc.c:77
+#, c-format
+msgid "Packaged by %s\n"
+msgstr ""
+
+#. 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 ""
+
+#: lib/version-etc.c:86
+msgid ""
+"\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"
+msgstr ""
+
+#. TRANSLATORS: %s denotes an author name.
+#: lib/version-etc.c:102
+#, c-format
+msgid "Written by %s.\n"
+msgstr ""
+
+#. TRANSLATORS: Each %s denotes an author name.
+#: lib/version-etc.c:106
+#, c-format
+msgid "Written by %s and %s.\n"
+msgstr ""
+
+#. TRANSLATORS: Each %s denotes an author name.
+#: lib/version-etc.c:110
+#, c-format
+msgid "Written by %s, %s, and %s.\n"
+msgstr ""
+
+#. TRANSLATORS: Each %s denotes an author name.
+#. You can use line breaks, estimating that each author name occupies
+#. ca. 16 screen columns and that a screen line has ca. 80 columns.
+#: lib/version-etc.c:117
+#, c-format
+msgid ""
+"Written by %s, %s, %s,\n"
+"and %s.\n"
+msgstr ""
+
+#. TRANSLATORS: Each %s denotes an author name.
+#. You can use line breaks, estimating that each author name occupies
+#. ca. 16 screen columns and that a screen line has ca. 80 columns.
+#: lib/version-etc.c:124
+#, c-format
+msgid ""
+"Written by %s, %s, %s,\n"
+"%s, and %s.\n"
+msgstr ""
+
+#. TRANSLATORS: Each %s denotes an author name.
+#. You can use line breaks, estimating that each author name occupies
+#. ca. 16 screen columns and that a screen line has ca. 80 columns.
+#: lib/version-etc.c:131
+#, c-format
+msgid ""
+"Written by %s, %s, %s,\n"
+"%s, %s, and %s.\n"
+msgstr ""
+
+#. TRANSLATORS: Each %s denotes an author name.
+#. You can use line breaks, estimating that each author name occupies
+#. ca. 16 screen columns and that a screen line has ca. 80 columns.
+#: lib/version-etc.c:139
+#, c-format
+msgid ""
+"Written by %s, %s, %s,\n"
+"%s, %s, %s, and %s.\n"
+msgstr ""
+
+#. TRANSLATORS: Each %s denotes an author name.
+#. You can use line breaks, estimating that each author name occupies
+#. ca. 16 screen columns and that a screen line has ca. 80 columns.
+#: lib/version-etc.c:147
+#, c-format
+msgid ""
+"Written by %s, %s, %s,\n"
+"%s, %s, %s, %s,\n"
+"and %s.\n"
+msgstr ""
+
+#. TRANSLATORS: Each %s denotes an author name.
+#. You can use line breaks, estimating that each author name occupies
+#. ca. 16 screen columns and that a screen line has ca. 80 columns.
+#: lib/version-etc.c:156
+#, c-format
+msgid ""
+"Written by %s, %s, %s,\n"
+"%s, %s, %s, %s,\n"
+"%s, and %s.\n"
+msgstr ""
+
+#. TRANSLATORS: Each %s denotes an author name.
+#. You can use line breaks, estimating that each author name occupies
+#. ca. 16 screen columns and that a screen line has ca. 80 columns.
+#: lib/version-etc.c:167
+#, c-format
+msgid ""
+"Written by %s, %s, %s,\n"
+"%s, %s, %s, %s,\n"
+"%s, %s, and others.\n"
+msgstr ""
+
+#. TRANSLATORS: The placeholder indicates the bug-reporting address
+#. for this package. Please add _another line_ saying
+#. "Report translation bugs to <...>\n" with the address for translation
+#. bugs (typically your translation team's web or email address).
+#: lib/version-etc.c:245
+#, c-format
+msgid ""
+"\n"
+"Report bugs to: %s\n"
+msgstr ""
+
+#: lib/version-etc.c:247
+#, c-format
+msgid "Report %s bugs to: %s\n"
+msgstr ""
+
+#: lib/version-etc.c:251
+#, c-format
+msgid "%s home page: <%s>\n"
+msgstr ""
+
+#: lib/version-etc.c:253
+#, c-format
+msgid "%s home page: <http://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"
+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"
+
+#: sed/compile.c:146
msgid "multiple `!'s"
-msgstr "flera \"!\""
+msgstr "flera ”!”"
-#: sed/compile.c:145
+#: sed/compile.c:147
msgid "unexpected `,'"
-msgstr "oväntat \",\""
+msgstr "oväntat ”,”"
-#: sed/compile.c:146
+#: sed/compile.c:149
msgid "invalid usage of +N or ~N as first address"
msgstr "ogiltig användning av +N eller ~N som första adress"
-#: sed/compile.c:147
+#: sed/compile.c:150
msgid "unmatched `{'"
-msgstr "obalanserad \"{\""
+msgstr "obalanserad ”{”"
-#: sed/compile.c:148
+#: sed/compile.c:151
msgid "unexpected `}'"
-msgstr "oväntad \"}\""
+msgstr "oväntad ”}”"
-#: sed/compile.c:149
+#: sed/compile.c:153
msgid "extra characters after command"
msgstr "extra tecken efter kommandot"
-#: sed/compile.c:150
+#: sed/compile.c:155
msgid "expected \\ after `a', `c' or `i'"
-msgstr "\\ förväntades efter \"a\", \"c\" eller \"i\""
+msgstr "\\ förväntades efter ”a”, ”c” eller ”i”"
-#: sed/compile.c:151
+#: sed/compile.c:157
msgid "`}' doesn't want any addresses"
-msgstr "\"}\" vill inte ha några adresser"
+msgstr "”}” vill inte ha några adresser"
-#: sed/compile.c:152
+#: sed/compile.c:159
msgid ": doesn't want any addresses"
msgstr ": vill inte ha några adresser"
-#: sed/compile.c:153
+#: sed/compile.c:161
msgid "comments don't accept any addresses"
msgstr "kommentarer accepterar inga adresser"
-#: sed/compile.c:154
+#: sed/compile.c:162
msgid "missing command"
msgstr "kommando saknas"
-#: sed/compile.c:155
+#: sed/compile.c:163
msgid "command only uses one address"
msgstr "kommandot använder endast en adress"
-#: sed/compile.c:156
+#: sed/compile.c:164
msgid "unterminated address regex"
msgstr "oavslutat reguljärt uttryck för adress"
-#: sed/compile.c:157
+#: sed/compile.c:165
msgid "unterminated `s' command"
-msgstr "oavslutat \"s\"-kommando"
+msgstr "oavslutat ”s”-kommando"
-#: sed/compile.c:158
+#: sed/compile.c:166
msgid "unterminated `y' command"
-msgstr "oavslutat \"y\"-kommando"
+msgstr "oavslutat ”y”-kommando"
-#: sed/compile.c:159
+#: sed/compile.c:167
msgid "unknown option to `s'"
-msgstr "flaggan okänd för \"s\""
+msgstr "flaggan okänd för ”s”"
-#: sed/compile.c:160
+#: sed/compile.c:169
msgid "multiple `p' options to `s' command"
-msgstr "flera \"p\"-flaggor till \"s\"-kommandot"
+msgstr "flera ”p”-flaggor till ”s”-kommandot"
-#: sed/compile.c:161
+#: sed/compile.c:171
msgid "multiple `g' options to `s' command"
-msgstr "flera \"g\"-flaggor till \"s\"-kommandot"
+msgstr "flera ”g”-flaggor till ”s”-kommandot"
-#: sed/compile.c:162
+#: sed/compile.c:173
msgid "multiple number options to `s' command"
-msgstr "flera sifferflaggor till \"s\"-kommandot"
+msgstr "flera sifferflaggor till ”s”-kommandot"
-#: sed/compile.c:163
+#: sed/compile.c:175
msgid "number option to `s' command may not be zero"
-msgstr "sifferflagga till kommandot \"s\" får inte vara noll"
+msgstr "sifferflagga till kommandot ”s” får inte vara noll"
-#: sed/compile.c:164
+#: sed/compile.c:177
msgid "strings for `y' command are different lengths"
-msgstr "strängarna för kommandot \"y\" är olika långa"
+msgstr "strängarna för kommandot ”y” är olika långa"
-#: sed/compile.c:165
+#: sed/compile.c:179
msgid "delimiter character is not a single-byte character"
msgstr "avgränsningstecknet är inte en ensam byte"
-#: sed/compile.c:166
+#: sed/compile.c:181
msgid "expected newer version of sed"
msgstr "nyare version av sed förväntades"
-#: sed/compile.c:167
+#: sed/compile.c:183
msgid "invalid usage of line address 0"
msgstr "felaktig användning av radadress 0"
-#: sed/compile.c:168
+#: sed/compile.c:184
#, c-format
msgid "unknown command: `%c'"
-msgstr "okänt kommando: \"%c\""
+msgstr "okänt kommando: ”%c”"
-#: sed/compile.c:169
-#, fuzzy
+#: sed/compile.c:186
msgid "incomplete command"
-msgstr "kommando saknas"
+msgstr "ofullständigt kommando"
+
+#: sed/compile.c:188
+msgid "\":\" lacks a label"
+msgstr ""
-#: sed/compile.c:192
+#: sed/compile.c:190
+msgid "recursive escaping after \\c not allowed"
+msgstr ""
+
+#: sed/compile.c:213
#, c-format
msgid "%s: file %s line %lu: %s\n"
msgstr "%s: fil %s rad %lu: %s\n"
-#: sed/compile.c:195
+#: sed/compile.c:216
#, c-format
msgid "%s: -e expression #%lu, char %lu: %s\n"
msgstr "%s: -e uttryck #%lu, tecken %lu: %s\n"
-#: sed/compile.c:1657
+#: sed/compile.c:1639
#, c-format
msgid "can't find label for jump to `%s'"
-msgstr "kan inte hitta etiketten för hopp till \"%s\""
+msgstr "kan inte hitta etiketten för hopp till ”%s”"
+
+#: sed/execute.c:264 sed/execute.c:281
+#, c-format
+msgid "case conversion produced an invalid character"
+msgstr ""
-#: sed/execute.c:595
+#: sed/execute.c:575
#, c-format
msgid "%s: can't read %s: %s\n"
msgstr "%s: kan inte läsa %s: %s\n"
-#: sed/execute.c:624
+#: sed/execute.c:600
#, c-format
msgid "couldn't edit %s: is a terminal"
msgstr "kunde inte redigera %s: är en terminal"
-#: sed/execute.c:629
+#: sed/execute.c:605
#, c-format
msgid "couldn't edit %s: not a regular file"
msgstr "kunde inte redigera %s: inte en vanlig fil"
-#: sed/execute.c:640
+#: sed/execute.c:616
#, 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:647
+#: sed/execute.c:624
#, c-format
msgid "%s: warning: failed to get security context of %s: %s"
-msgstr ""
+msgstr "%s: varning: misslyckades med att erhålla säkerhetskontext för %s: %s"
-#: sed/execute.c:664 sed/utils.c:211
+#: sed/execute.c:643 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:1193 sed/execute.c:1373
+#: sed/execute.c:1158 sed/execute.c:1368
msgid "error in subprocess"
msgstr "fel i underprocess"
-#: sed/execute.c:1195
+#: sed/execute.c:1160
msgid "option `e' not supported"
-msgstr "flaggan \"e\" stöds inte"
+msgstr "flaggan ”e” stöds inte"
-#: sed/execute.c:1375
+#: sed/execute.c:1349
msgid "`e' command not supported"
-msgstr "kommandot \"e\" stöds inte"
+msgstr "kommandot ”e” stöds inte"
-#: sed/execute.c:1725
+#: sed/execute.c:1675
msgid "no input files"
msgstr "inga indatafiler"
-#: sed/regexp.c:39
+#: sed/regexp.c:38
msgid "no previous regular expression"
msgstr "inget tidigare reguljärt uttryck"
-#: sed/regexp.c:40
-msgid "cannot specify modifiers on empty regexp"
-msgstr "kan inte ange modifierare på tomt reguljärt uttryck"
-
# Kommentar från Jan Djärv:
# Jag antar RHS står för "right hand side". Man kan då säga
# "... kommandots högersida"
#
-#: sed/regexp.c:129
+#: sed/regexp.c:138
#, c-format
msgid "invalid reference \\%d on `s' command's RHS"
-msgstr "ogiltig referens \\%d på \"s\"-kommandots högersida"
+msgstr "ogiltig referens \\%d på ”s”-kommandots högersida"
-#: sed/sed.c:32
+#: sed/sed.c:35
msgid "Jay Fenlason"
-msgstr ""
+msgstr "Jay Fenlason"
-#: sed/sed.c:33
+#: sed/sed.c:36
msgid "Tom Lord"
-msgstr ""
+msgstr "Tom Lord"
-#: sed/sed.c:34
+#: sed/sed.c:37
msgid "Ken Pizzini"
-msgstr ""
+msgstr "Ken Pizzini"
-#: sed/sed.c:35
+#: sed/sed.c:38
msgid "Paolo Bonzini"
-msgstr ""
+msgstr "Paolo Bonzini"
-#: sed/sed.c:79
+#: 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"
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"
-#: sed/sed.c:86
-#, fuzzy, c-format
-msgid ""
-"E-mail bug reports to: <%s>.\n"
-"Be sure to include the word ``%s'' somewhere in the ``Subject:'' field.\n"
+#: sed/sed.c:120
+#, c-format
+msgid "E-mail bug reports to: <%s>.\n"
msgstr ""
-"Rapportera fel till: %s .\n"
-"Ange ordet \"%s\" på något ställe i \"Ärende:\"-fältet.\n"
-"Skicka anmärkningar på översättningen till <sv@li.org>.\n"
-#: sed/sed.c:99
+#: sed/sed.c:129
msgid ""
" -R, --regexp-perl\n"
" use Perl 5's regular expressions syntax in the script.\n"
@@ -241,16 +629,16 @@ msgstr ""
" -R, --regexp-perl\n"
" använd Perl 5:s syntax för reguljära uttryck i skriptet.\n"
-#: sed/sed.c:104
+#: sed/sed.c:134
#, c-format
msgid ""
"Usage: %s [OPTION]... {script-only-if-no-other-script} [input-file]...\n"
"\n"
msgstr ""
-"Användning: %s [FLAGGA]... {skript-endast-om-inga-andra} [indatafil]...\n"
+"Användning: %s [FLAGGA]… {skript-endast-om-inga-andra} [indatafil]…\n"
"\n"
-#: sed/sed.c:108
+#: sed/sed.c:138
#, c-format
msgid ""
" -n, --quiet, --silent\n"
@@ -259,7 +647,7 @@ msgstr ""
" -n, --quiet, --silent\n"
" förhindrar automatisk utskrift av mönsterutrymme\n"
-#: sed/sed.c:110
+#: sed/sed.c:140
#, c-format
msgid ""
" -e script, --expression=script\n"
@@ -268,7 +656,7 @@ msgstr ""
" -e skript, --expression=skript\n"
" lägg till skript till de kommandon som ska utföras\n"
-#: sed/sed.c:112
+#: sed/sed.c:142
#, c-format
msgid ""
" -f script-file, --file=script-file\n"
@@ -279,7 +667,7 @@ msgstr ""
" lägg till innehållet i skriptfil till de kommandon som ska\n"
" utföras\n"
-#: sed/sed.c:115
+#: sed/sed.c:146
#, c-format
msgid ""
" --follow-symlinks\n"
@@ -288,17 +676,17 @@ msgstr ""
" --follow-symlinks\n"
" följ symlänkar när behandling sker på plats\n"
-#: sed/sed.c:118
-#, fuzzy, c-format
+#: sed/sed.c:149
+#, c-format
msgid ""
" -i[SUFFIX], --in-place[=SUFFIX]\n"
" edit files in place (makes backup if SUFFIX supplied)\n"
msgstr ""
" -i[ÄNDELSE], --in-place[=ÄNDELSE]\n"
-" redigera filer på plats (skapar säkerhetskopia om ändelse\n"
+" redigera filer på plats (skapar säkerhetskopia om ÄNDELSE\n"
" tillhandahålls)\n"
-#: sed/sed.c:121
+#: sed/sed.c:153
#, c-format
msgid ""
" -b, --binary\n"
@@ -308,16 +696,16 @@ msgstr ""
" -b, --binary\n"
" öppna filer i binärläge (CR+LF särbehandlas inte)\n"
-#: sed/sed.c:124
+#: sed/sed.c:157
#, c-format
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"
-" ange önskad radbrytningslängd för \"l\"-kommandot\n"
+" ange önskad radbrytningslängd för ”l”-kommandot\n"
-#: sed/sed.c:126
+#: sed/sed.c:159
#, c-format
msgid ""
" --posix\n"
@@ -326,28 +714,37 @@ msgstr ""
" --posix\n"
" inaktivera alla GNU-utökningar.\n"
-#: sed/sed.c:128
-#, c-format
+#: sed/sed.c:161
+#, fuzzy, c-format
msgid ""
-" -r, --regexp-extended\n"
-" use extended regular expressions in the script.\n"
+" -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"
-#: sed/sed.c:133
-#, c-format
+#: sed/sed.c:167
+#, fuzzy, c-format
msgid ""
" -s, --separate\n"
-" consider files as separate rather than as a single "
-"continuous\n"
-" long stream.\n"
+" consider files as separate rather than as a single,\n"
+" continuous long stream.\n"
msgstr ""
" -s, --separate\n"
" betrakta filer som separata istället för som en\n"
" kontinuerlig lång dataström.\n"
-#: sed/sed.c:136
+#: sed/sed.c:170
+#, fuzzy, c-format
+msgid ""
+" --sandbox\n"
+" operate in sandbox mode.\n"
+msgstr ""
+" -z, --null-data\n"
+" separera rader med nolltecken\n"
+
+#: sed/sed.c:172
#, c-format
msgid ""
" -u, --unbuffered\n"
@@ -357,26 +754,28 @@ msgid ""
msgstr ""
" -u, --unbuffered\n"
" läs in minimala mängder data från indatafilerna och töm\n"
-" utdatabufferterna oftare\n"
+" utdatabuffertarna oftare\n"
-#: sed/sed.c:139
+#: sed/sed.c:175
#, c-format
msgid ""
" -z, --null-data\n"
" separate lines by NUL characters\n"
msgstr ""
+" -z, --null-data\n"
+" separera rader med nolltecken\n"
-#: sed/sed.c:141
+#: sed/sed.c:177
#, c-format
msgid " --help display this help and exit\n"
msgstr " --help visa denna hjälptext och avsluta\n"
-#: sed/sed.c:142
+#: sed/sed.c:178
#, c-format
msgid " --version output version information and exit\n"
msgstr " --version visa versionsinformation och avsluta\n"
-#: sed/sed.c:143
+#: sed/sed.c:179
#, c-format
msgid ""
"\n"
@@ -393,119 +792,58 @@ msgstr ""
"läses standard in.\n"
"\n"
-#: sed/utils.c:74 sed/utils.c:432
+#: sed/utils.c:73 sed/utils.c:384
#, c-format
msgid "cannot remove %s: %s"
msgstr "kan inte ta bort %s: %s"
-#: sed/utils.c:144
+#: sed/utils.c:136
#, c-format
msgid "couldn't open file %s: %s"
msgstr "kunde inte öppna filen %s: %s"
-#: sed/utils.c:167
+#: sed/utils.c:155
#, c-format
msgid "couldn't attach to %s: %s"
msgstr "kunde inte fästa vid %s: %s"
-#: sed/utils.c:229
-#, c-format
-msgid "couldn't write %d item to %s: %s"
-msgid_plural "couldn't write %d items to %s: %s"
+#: sed/utils.c:192
+#, fuzzy, 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"
-#: sed/utils.c:244 sed/utils.c:267
+#: sed/utils.c:204 sed/utils.c:223
#, c-format
msgid "read error on %s: %s"
msgstr "läsfel vid %s: %s"
-#: sed/utils.c:372
+#: sed/utils.c:325
#, c-format
msgid "couldn't follow symlink %s: %s"
msgstr "kunde inte följa symlänken %s: %s"
-#: sed/utils.c:406
+#: sed/utils.c:359
#, c-format
msgid "cannot stat %s: %s"
msgstr "kan inte ta status på %s: %s"
-#: sed/utils.c:437
+#: sed/utils.c:389
#, c-format
msgid "cannot rename %s: %s"
msgstr "kan inte byta namn på %s: %s"
-#: lib/regcomp.c:132
-msgid "Success"
-msgstr "Lyckades"
-
-#: lib/regcomp.c:135
-msgid "No match"
-msgstr "Ingen träff"
-
-#: lib/regcomp.c:138
-msgid "Invalid regular expression"
-msgstr "Ogiltigt reguljärt uttryck"
-
-#: lib/regcomp.c:141
-msgid "Invalid collation character"
-msgstr "Ogiltigt sorteringstecken"
-
-#: lib/regcomp.c:144
-msgid "Invalid character class name"
-msgstr "Ogiltigt teckenklassnamn"
-
-#: lib/regcomp.c:147
-msgid "Trailing backslash"
-msgstr "Eftersläpande omvänt snedstreck"
-
-#: lib/regcomp.c:150
-msgid "Invalid back reference"
-msgstr "Ogiltig bakåtreferens"
-
-#: lib/regcomp.c:153
-msgid "Unmatched [ or [^"
-msgstr "Obalanserad [ eller [^"
-
-#: lib/regcomp.c:156
-msgid "Unmatched ( or \\("
-msgstr "Obalanserad ( eller \\("
-
-#: lib/regcomp.c:159
-msgid "Unmatched \\{"
-msgstr "Obalanserad \\{"
-
-#: lib/regcomp.c:162
-msgid "Invalid content of \\{\\}"
-msgstr "Ogiltigt innehåll i \\{\\}"
-
-#: lib/regcomp.c:165
-msgid "Invalid range end"
-msgstr "Ogiltigt intervallslut"
-
-#: lib/regcomp.c:168
-msgid "Memory exhausted"
-msgstr "Minnet slut"
-
-#: lib/regcomp.c:171
-msgid "Invalid preceding regular expression"
-msgstr "Ogiltigt föregående reguljärt uttryck"
-
-#: lib/regcomp.c:174
-msgid "Premature end of regular expression"
-msgstr "För tidigt slut på reguljärt uttryck"
-
-#: lib/regcomp.c:177
-msgid "Regular expression too big"
-msgstr "Reguljärt uttryck för stort"
+#~ msgid "cannot specify modifiers on empty regexp"
+#~ msgstr "kan inte ange modifierare på tomt reguljärt uttryck"
-#: lib/regcomp.c:180
-msgid "Unmatched ) or \\)"
-msgstr "Obalanserad ) eller \\)"
-
-#: lib/regcomp.c:705
-msgid "No previous regular expression"
-msgstr "Inget tidigare reguljärt uttryck"
+#~ msgid ""
+#~ "E-mail bug reports to: <%s>.\n"
+#~ "Be sure to include the word ``%s'' somewhere in the ``Subject:'' field.\n"
+#~ msgstr ""
+#~ "Skicka felrapporter till: <%s>.\n"
+#~ "Kom ihåg att ange ordet ”%s” på något ställe i ”Ärende:”-fältet.\n"
+#~ "Skicka synpunkter på översättningen till <tp-sv@listor.tp-sv.se>.\n"
#~ msgid "super-sed version %s\n"
#~ msgstr "super-sed version %s\n"
@@ -521,17 +859,17 @@ msgstr "Inget tidigare reguljärt uttryck"
#~ msgstr "GNU sed version %s\n"
#~ msgid ""
-#~ "%s\n"
+#~ "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 ""
-#~ "%s\n"
+#~ "Copyright © %d Free Software Foundation, Inc.\n"
#~ "(Följande text är en informell översättning som enbart tillhandahålls\n"
-#~ " i informativt syfte. För alla juridiska tolkningar gäller den engelska\n"
-#~ " originaltexten.)\n"
+#~ "i informativt syfte. För alla juridiska tolkningar gäller den engelska\n"
+#~ "originaltexten.)\n"
#~ "Det här är fri programvara; se källkoden angående villkor för kopiering.\n"
#~ "Det finns INGEN garanti; inte ens för SÄLJBARHET eller LÄMPLIGHET FÖR "
#~ "NÅGOT\n"
diff --git a/po/tr.gmo b/po/tr.gmo
index 63213b9..0224918 100644
--- a/po/tr.gmo
+++ b/po/tr.gmo
Binary files differ
diff --git a/po/tr.po b/po/tr.po
index 8acda69..3e51ece 100644
--- a/po/tr.po
+++ b/po/tr.po
@@ -1,236 +1,633 @@
-# translation of sed-4.1.1.tr.po to Turkish
-# Copyright (C) 2003, 2004 Free Software Foundation, Inc.
-# Deniz Akkus Kanca <deniz@arayan.com>, 2001,2003, 2004.
-#
+# translation of sed-4.2.1.tr.po to Turkish
+# Copyright (C) 2003, 2013 Free Software Foundation, Inc.
+# This file is distributed under the same license as the sed package.
+# Deniz Akkus Kanca <deniz@arayan.com>, 2001,2003, 2004, 2013.
+# Volkan Gezer <vlkngzr@gmail.com>, 2013.
msgid ""
msgstr ""
-"Project-Id-Version: sed 4.1.1\n"
+"Project-Id-Version: sed 4.2.1\n"
"Report-Msgid-Bugs-To: bug-gnu-utils@gnu.org\n"
-"POT-Creation-Date: 2012-12-22 14:36+0100\n"
-"PO-Revision-Date: 2004-12-05 10:03+0200\n"
-"Last-Translator: Deniz Akkus Kanca <deniz@arayan.com>\n"
+"POT-Creation-Date: 2016-12-30 00:59-0800\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"
"Language: tr\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Generator: KBabel 1.3.1\n"
+"X-Bugs: Report translation errors to the Language-Team address.\n"
+"X-Generator: Lokalize 1.5\n"
"Plural-Forms: nplurals=1; plural=0;\n"
-#: sed/compile.c:144
+#: lib/closeout.c:112
+msgid "write error"
+msgstr ""
+
+#: lib/copy-acl.c:54
+#, c-format
+msgid "preserving permissions for %s"
+msgstr ""
+
+#: lib/dfa.c:1025 lib/dfa.c:1028 lib/dfa.c:1047 lib/dfa.c:1057 lib/dfa.c:1070
+#: lib/dfa.c:1098 lib/dfa.c:1107 lib/dfa.c:1110 lib/dfa.c:1115 lib/dfa.c:1137
+#: lib/dfa.c:1140
+msgid "unbalanced ["
+msgstr ""
+
+#: lib/dfa.c:1083
+#, fuzzy
+msgid "invalid character class"
+msgstr "Hatalı karakter sınıf ismi"
+
+#: lib/dfa.c:1206
+msgid "character class syntax is [[:space:]], not [:space:]"
+msgstr ""
+
+#: lib/dfa.c:1275
+msgid "unfinished \\ escape"
+msgstr ""
+
+#: lib/dfa.c:1436
+#, fuzzy
+msgid "invalid content of \\{\\}"
+msgstr "\\{\\} içeriği hatalı"
+
+#
+#: lib/dfa.c:1439
+#, fuzzy
+msgid "regular expression too big"
+msgstr "Düzenli ifade fazla büyük"
+
+#: lib/dfa.c:1853
+msgid "unbalanced ("
+msgstr ""
+
+#: lib/dfa.c:1980
+msgid "no syntax specified"
+msgstr ""
+
+#: lib/dfa.c:1988
+msgid "unbalanced )"
+msgstr ""
+
+#: lib/error.c:191
+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 ""
+
+#: lib/getopt.c:654 lib/getopt.c:658
+#, c-format
+msgid "%s: option '--%s' doesn't allow an argument\n"
+msgstr ""
+
+#: 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:715 lib/getopt.c:734
+#, c-format
+msgid "%s: option '--%s' requires an argument\n"
+msgstr ""
+
+#: 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
+#, 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
+#, 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 "Bellek tükendi"
+
+#. TRANSLATORS:
+#. Get translations for open and closing quotation marks.
+#. The message catalog should translate "`" to a left
+#. quotation mark suitable for the locale, and similarly for
+#. "'". For example, a French Unicode local should translate
+#. these to U+00AB (LEFT-POINTING DOUBLE ANGLE
+#. QUOTATION MARK), and U+00BB (RIGHT-POINTING DOUBLE ANGLE
+#. QUOTATION MARK), respectively.
+#.
+#. If the catalog has no translation, we will try to
+#. use Unicode U+2018 (LEFT SINGLE QUOTATION MARK) and
+#. Unicode U+2019 (RIGHT SINGLE QUOTATION MARK). If the
+#. current locale is not Unicode, locale_quoting_style
+#. will quote 'like this', and clocale_quoting_style will
+#. quote "like this". You should always include translations
+#. for "`" and "'" even if U+2018 and U+2019 are appropriate
+#. for your locale.
+#.
+#. If you don't know what to put here, please see
+#. <http://en.wikipedia.org/wiki/Quotation_marks_in_other_languages>
+#. and use glyphs suitable for your language.
+#: lib/quotearg.c:354
+msgid "`"
+msgstr ""
+
+#: lib/quotearg.c:355
+msgid "'"
+msgstr ""
+
+#: lib/regcomp.c:135
+msgid "Success"
+msgstr "Başarılı"
+
+#: lib/regcomp.c:138
+msgid "No match"
+msgstr "Eşleşme bulunamadı"
+
+#
+#: lib/regcomp.c:141
+msgid "Invalid regular expression"
+msgstr "Hatalı düzenli ifade"
+
+#: lib/regcomp.c:144
+msgid "Invalid collation character"
+msgstr "Hatalı birleştirme karakteri"
+
+#: lib/regcomp.c:147
+msgid "Invalid character class name"
+msgstr "Hatalı karakter sınıf ismi"
+
+#: lib/regcomp.c:150
+msgid "Trailing backslash"
+msgstr "Sonda fazla gerikesme var"
+
+#: lib/regcomp.c:153
+msgid "Invalid back reference"
+msgstr "Hatalı geri referans"
+
+#
+#: lib/regcomp.c:156
+#, fuzzy
+msgid "Unmatched [, [^, [:, [., or [="
+msgstr "Eşleşmeyen [ veya [^"
+
+#
+#: lib/regcomp.c:159
+msgid "Unmatched ( or \\("
+msgstr "Eşleşmeyen ( veya \\("
+
+#
+#: lib/regcomp.c:162
+msgid "Unmatched \\{"
+msgstr "Eşleşmeyen \\{"
+
+#: lib/regcomp.c:165
+msgid "Invalid content of \\{\\}"
+msgstr "\\{\\} içeriği hatalı"
+
+#: lib/regcomp.c:168
+msgid "Invalid range end"
+msgstr "Geçersiz kapsam sonu"
+
+#: lib/regcomp.c:171
+msgid "Memory exhausted"
+msgstr "Bellek tükendi"
+
+#
+#: lib/regcomp.c:174
+msgid "Invalid preceding regular expression"
+msgstr "Bir önceki düzenli ifade hatalı"
+
+#
+#: lib/regcomp.c:177
+msgid "Premature end of regular expression"
+msgstr "Düzenli ifade erken sonlandı"
+
+#
+#: lib/regcomp.c:180
+msgid "Regular expression too big"
+msgstr "Düzenli ifade fazla büyük"
+
+#
+#: lib/regcomp.c:183
+msgid "Unmatched ) or \\)"
+msgstr "Eşleşmeyen ) or \\)"
+
+#: lib/regcomp.c:687
+msgid "No previous regular expression"
+msgstr "Daha önce düzenli ifade yok"
+
+#: lib/set-acl.c:46
+#, c-format
+msgid "setting permissions for %s"
+msgstr ""
+
+#: lib/version-etc.c:74
+#, c-format
+msgid "Packaged by %s (%s)\n"
+msgstr ""
+
+#: lib/version-etc.c:77
+#, c-format
+msgid "Packaged by %s\n"
+msgstr ""
+
+#. 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 ""
+
+#: lib/version-etc.c:86
+msgid ""
+"\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"
+msgstr ""
+
+#. TRANSLATORS: %s denotes an author name.
+#: lib/version-etc.c:102
+#, c-format
+msgid "Written by %s.\n"
+msgstr ""
+
+#. TRANSLATORS: Each %s denotes an author name.
+#: lib/version-etc.c:106
+#, c-format
+msgid "Written by %s and %s.\n"
+msgstr ""
+
+#. TRANSLATORS: Each %s denotes an author name.
+#: lib/version-etc.c:110
+#, c-format
+msgid "Written by %s, %s, and %s.\n"
+msgstr ""
+
+#. TRANSLATORS: Each %s denotes an author name.
+#. You can use line breaks, estimating that each author name occupies
+#. ca. 16 screen columns and that a screen line has ca. 80 columns.
+#: lib/version-etc.c:117
+#, c-format
+msgid ""
+"Written by %s, %s, %s,\n"
+"and %s.\n"
+msgstr ""
+
+#. TRANSLATORS: Each %s denotes an author name.
+#. You can use line breaks, estimating that each author name occupies
+#. ca. 16 screen columns and that a screen line has ca. 80 columns.
+#: lib/version-etc.c:124
+#, c-format
+msgid ""
+"Written by %s, %s, %s,\n"
+"%s, and %s.\n"
+msgstr ""
+
+#. TRANSLATORS: Each %s denotes an author name.
+#. You can use line breaks, estimating that each author name occupies
+#. ca. 16 screen columns and that a screen line has ca. 80 columns.
+#: lib/version-etc.c:131
+#, c-format
+msgid ""
+"Written by %s, %s, %s,\n"
+"%s, %s, and %s.\n"
+msgstr ""
+
+#. TRANSLATORS: Each %s denotes an author name.
+#. You can use line breaks, estimating that each author name occupies
+#. ca. 16 screen columns and that a screen line has ca. 80 columns.
+#: lib/version-etc.c:139
+#, c-format
+msgid ""
+"Written by %s, %s, %s,\n"
+"%s, %s, %s, and %s.\n"
+msgstr ""
+
+#. TRANSLATORS: Each %s denotes an author name.
+#. You can use line breaks, estimating that each author name occupies
+#. ca. 16 screen columns and that a screen line has ca. 80 columns.
+#: lib/version-etc.c:147
+#, c-format
+msgid ""
+"Written by %s, %s, %s,\n"
+"%s, %s, %s, %s,\n"
+"and %s.\n"
+msgstr ""
+
+#. TRANSLATORS: Each %s denotes an author name.
+#. You can use line breaks, estimating that each author name occupies
+#. ca. 16 screen columns and that a screen line has ca. 80 columns.
+#: lib/version-etc.c:156
+#, c-format
+msgid ""
+"Written by %s, %s, %s,\n"
+"%s, %s, %s, %s,\n"
+"%s, and %s.\n"
+msgstr ""
+
+#. TRANSLATORS: Each %s denotes an author name.
+#. You can use line breaks, estimating that each author name occupies
+#. ca. 16 screen columns and that a screen line has ca. 80 columns.
+#: lib/version-etc.c:167
+#, c-format
+msgid ""
+"Written by %s, %s, %s,\n"
+"%s, %s, %s, %s,\n"
+"%s, %s, and others.\n"
+msgstr ""
+
+#. TRANSLATORS: The placeholder indicates the bug-reporting address
+#. for this package. Please add _another line_ saying
+#. "Report translation bugs to <...>\n" with the address for translation
+#. bugs (typically your translation team's web or email address).
+#: lib/version-etc.c:245
+#, c-format
+msgid ""
+"\n"
+"Report bugs to: %s\n"
+msgstr ""
+
+#: lib/version-etc.c:247
+#, c-format
+msgid "Report %s bugs to: %s\n"
+msgstr ""
+
+#: lib/version-etc.c:251
+#, c-format
+msgid "%s home page: <%s>\n"
+msgstr ""
+
+#: lib/version-etc.c:253
+#, c-format
+msgid "%s home page: <http://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"
+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/"
+">.\n"
+
+#: sed/compile.c:146
msgid "multiple `!'s"
msgstr "birden fazla '!'"
-#: sed/compile.c:145
+#: sed/compile.c:147
msgid "unexpected `,'"
msgstr "beklenmeyen ','"
-#: sed/compile.c:146
+#: sed/compile.c:149
msgid "invalid usage of +N or ~N as first address"
msgstr "ilk adres olarak +N veya ~N kullanılamaz"
-#: sed/compile.c:147
+#: sed/compile.c:150
msgid "unmatched `{'"
msgstr "eşleşmeyen '{'"
-#: sed/compile.c:148
+#: sed/compile.c:151
msgid "unexpected `}'"
msgstr "beklenmeyen '}'"
-#: sed/compile.c:149
+#: sed/compile.c:153
msgid "extra characters after command"
msgstr "komuttan sonra fazla karakterler var"
-#: sed/compile.c:150
+#: sed/compile.c:155
msgid "expected \\ after `a', `c' or `i'"
msgstr "`a', `c' veya `i' sonrası \\ beklendi"
-#: sed/compile.c:151
+#: sed/compile.c:157
msgid "`}' doesn't want any addresses"
msgstr "'}' için adres istenmez"
-#: sed/compile.c:152
+#: sed/compile.c:159
msgid ": doesn't want any addresses"
msgstr ": için hiç adres istenmez"
-#: sed/compile.c:153
+#: sed/compile.c:161
msgid "comments don't accept any addresses"
msgstr "açıklamalarda adres kabul edilmez"
-#: sed/compile.c:154
+#: sed/compile.c:162
msgid "missing command"
msgstr "komut eksik"
-#: sed/compile.c:155
+#: sed/compile.c:163
msgid "command only uses one address"
msgstr "komutta yalnızca tek adres kullanılır"
-#: sed/compile.c:156
+#: sed/compile.c:164
msgid "unterminated address regex"
msgstr "sonlandırılmamış adres düzenli ifadesi"
-#: sed/compile.c:157
+#: sed/compile.c:165
msgid "unterminated `s' command"
msgstr "sonlandırılmamış 's' komutu"
-#: sed/compile.c:158
+#: sed/compile.c:166
msgid "unterminated `y' command"
msgstr "sonlandırılmamış 'y' komutu"
-#: sed/compile.c:159
+#: sed/compile.c:167
msgid "unknown option to `s'"
msgstr "`s' komutuna bilinmeyen seçenek verilmiş"
-#: sed/compile.c:160
+#: sed/compile.c:169
msgid "multiple `p' options to `s' command"
msgstr "`s' komutuna birden fazla `p' seçeneği verilmiş"
-#: sed/compile.c:161
+#: sed/compile.c:171
msgid "multiple `g' options to `s' command"
msgstr "`s' komutuna birden fazla `g' seçeneği verilmiş"
-#: sed/compile.c:162
+#: sed/compile.c:173
msgid "multiple number options to `s' command"
msgstr "`s' komutuna birden fazla sayı seçeneği verilmiş"
-#: sed/compile.c:163
+#: sed/compile.c:175
msgid "number option to `s' command may not be zero"
msgstr "`s' komutuna verilen sayı seçeneği sıfır olamaz"
-#: sed/compile.c:164
+#: sed/compile.c:177
msgid "strings for `y' command are different lengths"
msgstr "`y' komutu için dizgeler değişik uzunluklarda"
-#: sed/compile.c:165
+#: sed/compile.c:179
msgid "delimiter character is not a single-byte character"
msgstr "ayraç karakteri tek baytlık değil"
-#: sed/compile.c:166
+#: sed/compile.c:181
msgid "expected newer version of sed"
msgstr "sed'in daha yeni bir sürümü beklendi"
-#: sed/compile.c:167
+#: sed/compile.c:183
msgid "invalid usage of line address 0"
msgstr "satır adresi 0'ın hatalı kullanımı"
-#: sed/compile.c:168
+#: sed/compile.c:184
#, c-format
msgid "unknown command: `%c'"
msgstr "bilinmeyen komut: `%c'"
-#: sed/compile.c:169
+#: sed/compile.c:186
#, fuzzy
msgid "incomplete command"
msgstr "komut eksik"
-#: sed/compile.c:192
+#: sed/compile.c:188
+msgid "\":\" lacks a label"
+msgstr ""
+
+#: sed/compile.c:190
+msgid "recursive escaping after \\c not allowed"
+msgstr ""
+
+#: sed/compile.c:213
#, c-format
msgid "%s: file %s line %lu: %s\n"
msgstr "%s: dosya %s satır %lu: %s\n"
-#: sed/compile.c:195
+#: sed/compile.c:216
#, c-format
msgid "%s: -e expression #%lu, char %lu: %s\n"
msgstr "%s: -e ifade #%lu, harf %lu: %s\n"
-#: sed/compile.c:1657
+#: sed/compile.c:1639
#, c-format
msgid "can't find label for jump to `%s'"
msgstr "`%s'e atlamak için etiket bulunamıyor"
-#: sed/execute.c:595
+#: sed/execute.c:264 sed/execute.c:281
+#, c-format
+msgid "case conversion produced an invalid character"
+msgstr ""
+
+#: sed/execute.c:575
#, c-format
msgid "%s: can't read %s: %s\n"
msgstr "%s: %s okunamıyor: %s\n"
-#: sed/execute.c:624
+#: sed/execute.c:600
#, c-format
msgid "couldn't edit %s: is a terminal"
msgstr "%s düzenlenemedi: bu bir terminal"
-#: sed/execute.c:629
+#: sed/execute.c:605
#, c-format
msgid "couldn't edit %s: not a regular file"
msgstr "%s düzenlenemedi: normal dosya değil"
-#: sed/execute.c:640
+#: sed/execute.c:616
#, 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:647
+#: sed/execute.c:624
#, c-format
msgid "%s: warning: failed to get security context of %s: %s"
-msgstr ""
+msgstr "%s: uyarı: %s için güvenlik bağlamı alma başarısız: %s"
-#: sed/execute.c:664 sed/utils.c:211
+#: sed/execute.c:643 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:1193 sed/execute.c:1373
+#: sed/execute.c:1158 sed/execute.c:1368
msgid "error in subprocess"
msgstr "altsüreçte hata"
-#: sed/execute.c:1195
+#: sed/execute.c:1160
msgid "option `e' not supported"
msgstr " e' seçeneği desteklenmiyor"
-#: sed/execute.c:1375
+#: sed/execute.c:1349
msgid "`e' command not supported"
msgstr "`e' komutu desteklenmiyor"
-#: sed/execute.c:1725
+#: sed/execute.c:1675
msgid "no input files"
-msgstr ""
+msgstr "girdi dosyası yok"
-#: sed/regexp.c:39
+#: sed/regexp.c:38
msgid "no previous regular expression"
msgstr "daha önce bir düzenli ifade yok"
-#: sed/regexp.c:40
-msgid "cannot specify modifiers on empty regexp"
-msgstr "boş düzenli ifadeye değiştirici atanamaz"
-
-#: sed/regexp.c:129
+#: sed/regexp.c:138
#, c-format
msgid "invalid reference \\%d on `s' command's RHS"
msgstr "`s' komutunun RHS'sinde geçersiz \\%d referansı"
-#: sed/sed.c:32
+#: sed/sed.c:35
msgid "Jay Fenlason"
msgstr ""
-#: sed/sed.c:33
+#: sed/sed.c:36
msgid "Tom Lord"
msgstr ""
-#: sed/sed.c:34
+#: sed/sed.c:37
msgid "Ken Pizzini"
msgstr ""
-#: sed/sed.c:35
+#: sed/sed.c:38
msgid "Paolo Bonzini"
msgstr ""
-#: sed/sed.c:79
+#: 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"
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/"
+">.\n"
-#: sed/sed.c:86
-#, fuzzy, c-format
-msgid ""
-"E-mail bug reports to: <%s>.\n"
-"Be sure to include the word ``%s'' somewhere in the ``Subject:'' field.\n"
+#: sed/sed.c:120
+#, c-format
+msgid "E-mail bug reports to: <%s>.\n"
msgstr ""
-"Yazılım hatalarını %s adresine, çeviri hatalarını \n"
-"<gnu-tr-u12a@lists.sourceforge.net> adresine bildirin. \n"
-"``%s'' sözcüğünün Konu başlığında yer almasına dikkat edin. \n"
-#: sed/sed.c:99
+#: sed/sed.c:129
msgid ""
" -R, --regexp-perl\n"
" use Perl 5's regular expressions syntax in the script.\n"
@@ -238,7 +635,7 @@ msgstr ""
" -R, --regexp-perl\n"
" betikte Perl 5'in düzenli ifade sözdizimini kullanır.\n"
-#: sed/sed.c:104
+#: sed/sed.c:134
#, c-format
msgid ""
"Usage: %s [OPTION]... {script-only-if-no-other-script} [input-file]...\n"
@@ -247,16 +644,16 @@ msgstr ""
"Kullanım: %s [SEÇENEK]... {betik-eğer-başka-betik-yoksa} [girdi-dosyası]...\n"
"\n"
-#: sed/sed.c:108
-#, fuzzy, c-format
+#: sed/sed.c:138
+#, c-format
msgid ""
" -n, --quiet, --silent\n"
" suppress automatic printing of pattern space\n"
msgstr ""
-"-n, --quiet, --silent\n"
+" -n, --quiet, --silent\n"
" kalıp uzayının otomatik yazdırılmasını kaldırır\n"
-#: sed/sed.c:110
+#: sed/sed.c:140
#, c-format
msgid ""
" -e script, --expression=script\n"
@@ -265,7 +662,7 @@ msgstr ""
" -e script, --expression=betik\n"
" betiği, koşturulacak komutlara ekler\n"
-#: sed/sed.c:112
+#: sed/sed.c:142
#, c-format
msgid ""
" -f script-file, --file=script-file\n"
@@ -275,14 +672,16 @@ msgstr ""
" -f betik-dosyası, --file=betik-dosyası\n"
" betik-dosyası'nın içeriğini, koşturulacak komutlara ekler\n"
-#: sed/sed.c:115
+#: sed/sed.c:146
#, c-format
msgid ""
" --follow-symlinks\n"
" follow symlinks when processing in place\n"
msgstr ""
+" --follow-symlinks\n"
+" symlink'leri yerinde işlerken takip et\n"
-#: sed/sed.c:118
+#: sed/sed.c:149
#, fuzzy, c-format
msgid ""
" -i[SUFFIX], --in-place[=SUFFIX]\n"
@@ -292,15 +691,17 @@ msgstr ""
" dosyaları yerinde değiştirir (eğer uzantı verilmişse yedek\n"
" oluşturur)\n"
-#: sed/sed.c:121
+#: sed/sed.c:153
#, c-format
msgid ""
" -b, --binary\n"
" open files in binary mode (CR+LFs are not processed "
"specially)\n"
msgstr ""
+" -b, --binary\n"
+" dosyaları ikili kipte aç (CR+LF'ler özel olarak işlenmez)\n"
-#: sed/sed.c:124
+#: sed/sed.c:157
#, c-format
msgid ""
" -l N, --line-length=N\n"
@@ -309,7 +710,7 @@ msgstr ""
" -l N, --line-length=N\n"
" `l' komutu için istenen satır sarma uzunluğunu belirtir\n"
-#: sed/sed.c:126
+#: sed/sed.c:159
#, c-format
msgid ""
" --posix\n"
@@ -318,28 +719,35 @@ msgstr ""
" --posix\n"
" bütün GNU eklentilerini devre dışı bırakır.\n"
-#: sed/sed.c:128
-#, c-format
+#: sed/sed.c:161
+#, fuzzy, c-format
msgid ""
-" -r, --regexp-extended\n"
-" use extended regular expressions in the script.\n"
+" -E, -r, --regexp-extended\n"
+" use extended regular expressions in the script\n"
+" (for portability use POSIX -E).\n"
msgstr ""
" -r, --regexp-extended\n"
" betikte geliştirilmiş düzenli ifadeler kullanır.\n"
-#: sed/sed.c:133
-#, c-format
+#: sed/sed.c:167
+#, fuzzy, c-format
msgid ""
" -s, --separate\n"
-" consider files as separate rather than as a single "
-"continuous\n"
-" long stream.\n"
+" consider files as separate rather than as a single,\n"
+" continuous long stream.\n"
msgstr ""
" -s, --separate\n"
" dosyaları, tek uzun bir akış yerine ayrı ayrı "
"değerlendirir.\n"
-#: sed/sed.c:136
+#: sed/sed.c:170
+#, c-format
+msgid ""
+" --sandbox\n"
+" operate in sandbox mode.\n"
+msgstr ""
+
+#: sed/sed.c:172
#, c-format
msgid ""
" -u, --unbuffered\n"
@@ -351,24 +759,24 @@ msgstr ""
" girdi dosyalarından asgari miktarda veri yükler ve\n"
" çıktı yastıklarını daha sık boşaltır\n"
-#: sed/sed.c:139
+#: sed/sed.c:175
#, c-format
msgid ""
" -z, --null-data\n"
" separate lines by NUL characters\n"
msgstr ""
-#: sed/sed.c:141
+#: sed/sed.c:177
#, c-format
msgid " --help display this help and exit\n"
msgstr " --help bu yardımı gösterir ve çıkar\n"
-#: sed/sed.c:142
+#: sed/sed.c:178
#, c-format
msgid " --version output version information and exit\n"
msgstr " --version sürüm bilgisinin gösterir ve çıkar\n"
-#: sed/sed.c:143
+#: sed/sed.c:179
#, c-format
msgid ""
"\n"
@@ -385,126 +793,56 @@ msgstr ""
"verilmemiş ise, standart girdi okunur.\n"
"\n"
-#: sed/utils.c:74 sed/utils.c:432
+#: sed/utils.c:73 sed/utils.c:384
#, c-format
msgid "cannot remove %s: %s"
msgstr "%s kaldırılamıyor: %s"
-#: sed/utils.c:144
+#: sed/utils.c:136
#, c-format
msgid "couldn't open file %s: %s"
msgstr "%s dosyası açılamadı: %s"
-#: sed/utils.c:167
-#, fuzzy, c-format
+#: sed/utils.c:155
+#, c-format
msgid "couldn't attach to %s: %s"
-msgstr "%d sayıda öğe %s'e yazılamadı: %s"
+msgstr "%s içine ekleme yapılamadı: %s"
-#: sed/utils.c:229
-#, c-format
-msgid "couldn't write %d item to %s: %s"
-msgid_plural "couldn't write %d items to %s: %s"
+#: sed/utils.c:192
+#, fuzzy, c-format
+msgid "couldn't write %llu item to %s: %s"
+msgid_plural "couldn't write %llu items to %s: %s"
msgstr[0] "%d sayıda öğe %s'e yazılamadı: %s"
-#: sed/utils.c:244 sed/utils.c:267
+#: sed/utils.c:204 sed/utils.c:223
#, c-format
msgid "read error on %s: %s"
msgstr "%s'de okuma hatası: %s"
-#: sed/utils.c:372
-#, fuzzy, c-format
+#: sed/utils.c:325
+#, c-format
msgid "couldn't follow symlink %s: %s"
-msgstr "%s dosyası açılamadı: %s"
+msgstr "%s symlink takip edilemedi: %s"
-#: sed/utils.c:406
-#, fuzzy, c-format
+#: sed/utils.c:359
+#, c-format
msgid "cannot stat %s: %s"
-msgstr "%s yeniden adlandırılamadı: %s"
+msgstr "%s durumu alınamadı: %s"
-#: sed/utils.c:437
+#: sed/utils.c:389
#, c-format
msgid "cannot rename %s: %s"
msgstr "%s yeniden adlandırılamadı: %s"
-#: lib/regcomp.c:132
-msgid "Success"
-msgstr "Başarılı"
-
-#: lib/regcomp.c:135
-msgid "No match"
-msgstr "Eşleşme bulunamadı"
-
-#
-#: lib/regcomp.c:138
-msgid "Invalid regular expression"
-msgstr "Hatalı düzenli ifade"
-
-#: lib/regcomp.c:141
-msgid "Invalid collation character"
-msgstr "Hatalı birleştirme karakteri"
-
-#: lib/regcomp.c:144
-msgid "Invalid character class name"
-msgstr "Hatalı karakter sınıf ismi"
-
-#: lib/regcomp.c:147
-msgid "Trailing backslash"
-msgstr "Sonda fazla gerikesme var"
-
-#: lib/regcomp.c:150
-msgid "Invalid back reference"
-msgstr "Hatalı geri referans"
-
-#
-#: lib/regcomp.c:153
-msgid "Unmatched [ or [^"
-msgstr "Eşleşmeyen [ veya [^"
+#~ msgid "cannot specify modifiers on empty regexp"
+#~ msgstr "boş düzenli ifadeye değiştirici atanamaz"
-#
-#: lib/regcomp.c:156
-msgid "Unmatched ( or \\("
-msgstr "Eşleşmeyen ( veya \\("
-
-#
-#: lib/regcomp.c:159
-msgid "Unmatched \\{"
-msgstr "Eşleşmeyen \\{"
-
-#: lib/regcomp.c:162
-msgid "Invalid content of \\{\\}"
-msgstr "\\{\\} içeriği hatalı"
-
-#: lib/regcomp.c:165
-msgid "Invalid range end"
-msgstr "Geçersiz kapsam sonu"
-
-#: lib/regcomp.c:168
-msgid "Memory exhausted"
-msgstr "Bellek tükendi"
-
-#
-#: lib/regcomp.c:171
-msgid "Invalid preceding regular expression"
-msgstr "Bir önceki düzenli ifade hatalı"
-
-#
-#: lib/regcomp.c:174
-msgid "Premature end of regular expression"
-msgstr "Düzenli ifade erken sonlandı"
-
-#
-#: lib/regcomp.c:177
-msgid "Regular expression too big"
-msgstr "Düzenli ifade fazla büyük"
-
-#
-#: lib/regcomp.c:180
-msgid "Unmatched ) or \\)"
-msgstr "Eşleşmeyen ) or \\)"
-
-#: lib/regcomp.c:705
-msgid "No previous regular expression"
-msgstr "Daha önce düzenli ifade yok"
+#~ msgid ""
+#~ "E-mail bug reports to: <%s>.\n"
+#~ "Be sure to include the word ``%s'' somewhere in the ``Subject:'' field.\n"
+#~ msgstr ""
+#~ "Hataları bize bildirin: <%s>.\n"
+#~ "``Konu:'' alanında ayrıca ``%s'' kelimesini eklediğinizden emin olun.\n"
#~ msgid "super-sed version %s\n"
#~ msgstr "super-sed sürüm %s\n"
@@ -520,14 +858,14 @@ msgstr "Daha önce düzenli ifade yok"
#~ msgstr "GNU sed sürümü %s\n"
#~ msgid ""
-#~ "%s\n"
+#~ "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 ""
-#~ "%s\n"
+#~ "Telif Hakkı (C) %d Özgür Yazılım Vakfı\n"
#~ "Bu serbest yazılımdır; kopyalama koşulları için kaynak koduna bakınız.\n"
#~ "Hiçbir garantisi yoktur; hatta SATILABİLİRLİĞİ veya HERHANGİ BİR AMACA\n"
#~ "UYGUNLUĞU için bile garanti verilmez.\n"
diff --git a/po/uk.gmo b/po/uk.gmo
index 3f67d33..3431559 100644
--- a/po/uk.gmo
+++ b/po/uk.gmo
Binary files differ
diff --git a/po/uk.po b/po/uk.po
index 566e5a6..e64bcb7 100644
--- a/po/uk.po
+++ b/po/uk.po
@@ -4,222 +4,628 @@
#
# Volodymyr M. Lisivka <lvm@mystery.lviv.net>, 2003.
# Dmytro O. Redchuk <dor@kiev-online.net>, 2002.
-# Yuri Chornoivan <yurchor@ukr.net>, 2012.
+# Yuri Chornoivan <yurchor@ukr.net>, 2012, 2016.
msgid ""
msgstr ""
-"Project-Id-Version: sed 4.2.1\n"
+"Project-Id-Version: sed 4.2.2.177\n"
"Report-Msgid-Bugs-To: bug-gnu-utils@gnu.org\n"
-"POT-Creation-Date: 2012-12-22 14:36+0100\n"
-"PO-Revision-Date: 2012-09-02 16:54+0300\n"
+"POT-Creation-Date: 2016-12-30 00:59-0800\n"
+"PO-Revision-Date: 2016-12-06 12:33+0200\n"
"Last-Translator: Yuri Chornoivan <yurchor@ukr.net>\n"
"Language-Team: Ukrainian <translation-team-uk@lists.sourceforge.net>\n"
"Language: uk\n"
"MIME-Version: 1.0\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"
"X-Generator: Lokalize 1.5\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"
-#: sed/compile.c:144
+#: lib/closeout.c:112
+msgid "write error"
+msgstr "помилка під час спроби запису"
+
+#: lib/copy-acl.c:54
+#, c-format
+msgid "preserving permissions for %s"
+msgstr "зберігаємо права доступу для %s"
+
+#: lib/dfa.c:1025 lib/dfa.c:1028 lib/dfa.c:1047 lib/dfa.c:1057 lib/dfa.c:1070
+#: lib/dfa.c:1098 lib/dfa.c:1107 lib/dfa.c:1110 lib/dfa.c:1115 lib/dfa.c:1137
+#: lib/dfa.c:1140
+msgid "unbalanced ["
+msgstr "неурівноважена ["
+
+#: lib/dfa.c:1083
+msgid "invalid character class"
+msgstr "некоректний клас символів"
+
+#: lib/dfa.c:1206
+msgid "character class syntax is [[:space:]], not [:space:]"
+msgstr "синтаксис класу символів передбачає [[:space:]], а не [:space:]"
+
+#: lib/dfa.c:1275
+msgid "unfinished \\ escape"
+msgstr "незавершене екранування \\"
+
+#: lib/dfa.c:1436
+msgid "invalid content of \\{\\}"
+msgstr "некоректний вміст \\{\\}"
+
+#: lib/dfa.c:1439
+msgid "regular expression too big"
+msgstr "занадто об'ємний формальний вираз"
+
+#: lib/dfa.c:1853
+msgid "unbalanced ("
+msgstr "неурівноважена ("
+
+#: lib/dfa.c:1980
+msgid "no syntax specified"
+msgstr "не вказано синтаксису"
+
+#: lib/dfa.c:1988
+msgid "unbalanced )"
+msgstr "неурівноважена )"
+
+#: lib/error.c:191
+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"
+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:667 lib/getopt.c:672
+#, c-format
+msgid "%s: option '%c%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"
+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
+#, 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
+#, 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 "пам’ять вичерпано"
+
+#. TRANSLATORS:
+#. Get translations for open and closing quotation marks.
+#. The message catalog should translate "`" to a left
+#. quotation mark suitable for the locale, and similarly for
+#. "'". For example, a French Unicode local should translate
+#. these to U+00AB (LEFT-POINTING DOUBLE ANGLE
+#. QUOTATION MARK), and U+00BB (RIGHT-POINTING DOUBLE ANGLE
+#. QUOTATION MARK), respectively.
+#.
+#. If the catalog has no translation, we will try to
+#. use Unicode U+2018 (LEFT SINGLE QUOTATION MARK) and
+#. Unicode U+2019 (RIGHT SINGLE QUOTATION MARK). If the
+#. current locale is not Unicode, locale_quoting_style
+#. will quote 'like this', and clocale_quoting_style will
+#. quote "like this". You should always include translations
+#. for "`" and "'" even if U+2018 and U+2019 are appropriate
+#. for your locale.
+#.
+#. If you don't know what to put here, please see
+#. <http://en.wikipedia.org/wiki/Quotation_marks_in_other_languages>
+#. and use glyphs suitable for your language.
+#: lib/quotearg.c:354
+msgid "`"
+msgstr "«"
+
+#: lib/quotearg.c:355
+msgid "'"
+msgstr "»"
+
+#: lib/regcomp.c:135
+msgid "Success"
+msgstr "Успішно"
+
+#: lib/regcomp.c:138
+msgid "No match"
+msgstr "Немає відповідності"
+
+#: lib/regcomp.c:141
+msgid "Invalid regular expression"
+msgstr "Неправильний регулярний вираз"
+
+#: lib/regcomp.c:144
+msgid "Invalid collation character"
+msgstr "Неправильний символ співставлення"
+
+#: lib/regcomp.c:147
+msgid "Invalid character class name"
+msgstr "Невірне ім'я класу символів"
+
+#: lib/regcomp.c:150
+msgid "Trailing backslash"
+msgstr "Зворотній слеш у кінці рядка"
+
+#: lib/regcomp.c:153
+msgid "Invalid back reference"
+msgstr "Неправильне зворотнє посилання"
+
+#: lib/regcomp.c:156
+msgid "Unmatched [, [^, [:, [., or [="
+msgstr "Не закрито [, [^, [:, [. або [="
+
+#: lib/regcomp.c:159
+msgid "Unmatched ( or \\("
+msgstr "Не закрито ( чи \\("
+
+#: lib/regcomp.c:162
+msgid "Unmatched \\{"
+msgstr "Не закрито \\{"
+
+#: lib/regcomp.c:165
+msgid "Invalid content of \\{\\}"
+msgstr "Неправильний вміст \\{\\}"
+
+#: lib/regcomp.c:168
+msgid "Invalid range end"
+msgstr "Неправильний кінець діапазону"
+
+#: lib/regcomp.c:171
+msgid "Memory exhausted"
+msgstr "Пам'ять вичерпано"
+
+#: lib/regcomp.c:174
+msgid "Invalid preceding regular expression"
+msgstr "Неправильний попередній регулярний вираз"
+
+#: lib/regcomp.c:177
+msgid "Premature end of regular expression"
+msgstr "Передчасне закінчення регулярного виразу"
+
+#: lib/regcomp.c:180
+msgid "Regular expression too big"
+msgstr "Надто великий регулярний вираз"
+
+#: lib/regcomp.c:183
+msgid "Unmatched ) or \\)"
+msgstr "Не закрито ) чи \\)"
+
+#: lib/regcomp.c:687
+msgid "No previous regular expression"
+msgstr "Немає попереднього регулярного виразу"
+
+#: lib/set-acl.c:46
+#, c-format
+msgid "setting permissions for %s"
+msgstr "встановлення прав доступу для %s"
+
+#: lib/version-etc.c:74
+#, c-format
+msgid "Packaged by %s (%s)\n"
+msgstr "Пакування — %s (%s)\n"
+
+#: lib/version-etc.c:77
+#, c-format
+msgid "Packaged by %s\n"
+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 "©"
+
+#: lib/version-etc.c:86
+msgid ""
+"\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"
+msgstr ""
+"\n"
+"Умови ліцензування викладено у GPLv3+: GNU GPL версії 3 або новішій, <http://"
+"gnu.org/licenses/gpl.html>\n"
+"Це вільне програмне забезпечення: ви можете вільно змінювати і поширювати "
+"його.\n"
+"Вам не надається ЖОДНИХ ГАРАНТІЙ, окрім гарантій передбачених "
+"законодавством.\n"
+
+#. TRANSLATORS: %s denotes an author name.
+#: lib/version-etc.c:102
+#, c-format
+msgid "Written by %s.\n"
+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 "Автор — %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 "Автори — %s, %s і %s.\n"
+
+#. TRANSLATORS: Each %s denotes an author name.
+#. You can use line breaks, estimating that each author name occupies
+#. ca. 16 screen columns and that a screen line has ca. 80 columns.
+#: lib/version-etc.c:117
+#, c-format
+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
+#. ca. 16 screen columns and that a screen line has ca. 80 columns.
+#: lib/version-etc.c:124
+#, c-format
+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
+#. ca. 16 screen columns and that a screen line has ca. 80 columns.
+#: lib/version-etc.c:131
+#, c-format
+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
+#. ca. 16 screen columns and that a screen line has ca. 80 columns.
+#: lib/version-etc.c:139
+#, c-format
+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
+#. ca. 16 screen columns and that a screen line has ca. 80 columns.
+#: lib/version-etc.c:147
+#, c-format
+msgid ""
+"Written by %s, %s, %s,\n"
+"%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
+#. ca. 16 screen columns and that a screen line has ca. 80 columns.
+#: lib/version-etc.c:156
+#, c-format
+msgid ""
+"Written by %s, %s, %s,\n"
+"%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
+#. ca. 16 screen columns and that a screen line has ca. 80 columns.
+#: lib/version-etc.c:167
+#, c-format
+msgid ""
+"Written by %s, %s, %s,\n"
+"%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
+#. "Report translation bugs to <...>\n" with the address for translation
+#. bugs (typically your translation team's web or email address).
+#: lib/version-etc.c:245
+#, c-format
+msgid ""
+"\n"
+"Report bugs to: %s\n"
+msgstr ""
+"\n"
+"Повідомляйте про вади на адресу: %s\n"
+
+#: lib/version-etc.c:247
+#, c-format
+msgid "Report %s bugs to: %s\n"
+msgstr "Про вади у %s повідомляйте на адресу %s\n"
+
+#: lib/version-etc.c:251
+#, c-format
+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"
+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 ""
+"Загальна довідкова інформація щодо використання програмного забезпечення "
+"GNU: <http://www.gnu.org/gethelp/>\n"
+
+#: sed/compile.c:146
msgid "multiple `!'s"
msgstr "декілька знаків «!»"
-#: sed/compile.c:145
+#: sed/compile.c:147
msgid "unexpected `,'"
msgstr "неочікувана кома (,)"
-#: sed/compile.c:146
+#: sed/compile.c:149
msgid "invalid usage of +N or ~N as first address"
msgstr "некоректне використання +N чи ~N як першої адреси"
-#: sed/compile.c:147
+#: sed/compile.c:150
msgid "unmatched `{'"
msgstr "незакрита дужка «{»"
-#: sed/compile.c:148
+#: sed/compile.c:151
msgid "unexpected `}'"
msgstr "неочікувана дужка «}»"
-#: sed/compile.c:149
+#: sed/compile.c:153
msgid "extra characters after command"
msgstr "зайві символи після команди"
-#: sed/compile.c:150
+#: sed/compile.c:155
msgid "expected \\ after `a', `c' or `i'"
msgstr "очікувалося \\ після «a», «c» чи «i»"
-#: sed/compile.c:151
+#: sed/compile.c:157
msgid "`}' doesn't want any addresses"
msgstr "«}» не потребує ніяких адрес"
-#: sed/compile.c:152
+#: sed/compile.c:159
msgid ": doesn't want any addresses"
msgstr ": не потребує ніяких адрес"
-#: sed/compile.c:153
+#: sed/compile.c:161
msgid "comments don't accept any addresses"
msgstr "у коментарях не може бути жодних адрес"
-#: sed/compile.c:154
+#: sed/compile.c:162
msgid "missing command"
msgstr "пропущено команду"
-#: sed/compile.c:155
+#: sed/compile.c:163
msgid "command only uses one address"
msgstr "у команді використовується лише одна адреса"
-#: sed/compile.c:156
+#: sed/compile.c:164
msgid "unterminated address regex"
msgstr "незавершений формальний вираз адреси"
-#: sed/compile.c:157
+#: sed/compile.c:165
msgid "unterminated `s' command"
msgstr "незавершена команда «s»"
-#: sed/compile.c:158
+#: sed/compile.c:166
msgid "unterminated `y' command"
msgstr "незавершена команда «y»"
-#: sed/compile.c:159
+#: sed/compile.c:167
msgid "unknown option to `s'"
msgstr "невідомий параметр «s»"
-#: sed/compile.c:160
+#: sed/compile.c:169
msgid "multiple `p' options to `s' command"
msgstr "забагато ключів \"p\" до команди \"s\""
-#: sed/compile.c:161
+#: sed/compile.c:171
msgid "multiple `g' options to `s' command"
msgstr "забагато ключів \"g\" до команди \"s\""
-#: sed/compile.c:162
+#: sed/compile.c:173
msgid "multiple number options to `s' command"
msgstr "забагато числових параметрів до команди \"s\""
-#: sed/compile.c:163
+#: sed/compile.c:175
msgid "number option to `s' command may not be zero"
msgstr "числовий параметр до команди \"s\" не може бути нулем"
-#: sed/compile.c:164
+#: sed/compile.c:177
msgid "strings for `y' command are different lengths"
msgstr "рядки для команди «y» мають різну довжину"
-#: sed/compile.c:165
+#: sed/compile.c:179
msgid "delimiter character is not a single-byte character"
msgstr "символ-роздільник не є однобайтовим символом"
-#: sed/compile.c:166
+#: sed/compile.c:181
msgid "expected newer version of sed"
msgstr "мало бути використано новішу версію sed"
-#: sed/compile.c:167
+#: sed/compile.c:183
msgid "invalid usage of line address 0"
msgstr "некоректне використання рядка адреси 0"
-#: sed/compile.c:168
+#: sed/compile.c:184
#, c-format
msgid "unknown command: `%c'"
msgstr "невідома команда: «%c»"
-#: sed/compile.c:169
-#, fuzzy
+#: sed/compile.c:186
msgid "incomplete command"
-msgstr "пропущено команду"
+msgstr "неповна команда"
-#: sed/compile.c:192
+#: sed/compile.c:188
+msgid "\":\" lacks a label"
+msgstr "«:», не вистачає мітки"
+
+#: sed/compile.c:190
+msgid "recursive escaping after \\c not allowed"
+msgstr "не можна використовувати рекурсивне екранування після \\c"
+
+#: sed/compile.c:213
#, c-format
msgid "%s: file %s line %lu: %s\n"
msgstr "%s: файл %s, рядок %lu: %s\n"
-#: sed/compile.c:195
+#: sed/compile.c:216
#, c-format
msgid "%s: -e expression #%lu, char %lu: %s\n"
msgstr "%s: -e вираз #%lu, літера %lu: %s\n"
-#: sed/compile.c:1657
+#: sed/compile.c:1639
#, c-format
msgid "can't find label for jump to `%s'"
msgstr "не вдалося знайти мітку для переходу до «%s»"
-#: sed/execute.c:595
+#: sed/execute.c:264 sed/execute.c:281
+#, c-format
+msgid "case conversion produced an invalid character"
+msgstr "перетворення регістрів літер призвело до появи некоректного символу"
+
+#: sed/execute.c:575
#, c-format
msgid "%s: can't read %s: %s\n"
msgstr "%s: неможливо прочитати %s: %s\n"
-#: sed/execute.c:624
+#: sed/execute.c:600
#, c-format
msgid "couldn't edit %s: is a terminal"
msgstr "не вдалося змінити %s: цей об’єкт є терміналом"
-#: sed/execute.c:629
+#: sed/execute.c:605
#, c-format
msgid "couldn't edit %s: not a regular file"
msgstr "не вдалося змінити %s: не є звичайним файлом"
-#: sed/execute.c:640
+#: sed/execute.c:616
#, c-format
msgid "%s: warning: failed to set default file creation context to %s: %s"
msgstr ""
"%s: попередження: не вдалося встановити типовий контекст створення файла у "
"%s: %s"
-#: sed/execute.c:647
+#: sed/execute.c:624
#, c-format
msgid "%s: warning: failed to get security context of %s: %s"
msgstr "%s: попередження: не вдалося отримати контекст захисту %s: %s"
-#: sed/execute.c:664 sed/utils.c:211
+#: sed/execute.c:643 sed/utils.c:178
#, c-format
msgid "couldn't open temporary file %s: %s"
msgstr "не вдалося відкрити тимчасовий файл %s: %s"
-#: sed/execute.c:1193 sed/execute.c:1373
+#: sed/execute.c:1158 sed/execute.c:1368
msgid "error in subprocess"
msgstr "помилка у підпроцесі"
-#: sed/execute.c:1195
+#: sed/execute.c:1160
msgid "option `e' not supported"
msgstr "ключ \"e\" не підтримується"
-#: sed/execute.c:1375
+#: sed/execute.c:1349
msgid "`e' command not supported"
msgstr "команда \"e\" не підтримується"
-#: sed/execute.c:1725
+#: sed/execute.c:1675
msgid "no input files"
msgstr "немає вхідних даних"
-#: sed/regexp.c:39
+#: sed/regexp.c:38
msgid "no previous regular expression"
msgstr "немає попереднього формального виразу"
-#: sed/regexp.c:40
-msgid "cannot specify modifiers on empty regexp"
-msgstr "не можна вказувати модифікатори щодо порожнього формального виразу"
-
-#: sed/regexp.c:129
+#: sed/regexp.c:138
#, c-format
msgid "invalid reference \\%d on `s' command's RHS"
msgstr "некоректне посилання \\%d праворуч від команди «s»"
-#: sed/sed.c:32
+#: sed/sed.c:35
msgid "Jay Fenlason"
-msgstr ""
+msgstr "Jay Fenlason"
-#: sed/sed.c:33
+#: sed/sed.c:36
msgid "Tom Lord"
-msgstr ""
+msgstr "Tom Lord"
-#: sed/sed.c:34
+#: sed/sed.c:37
msgid "Ken Pizzini"
-msgstr ""
+msgstr "Ken Pizzini"
-#: sed/sed.c:35
+#: sed/sed.c:38
msgid "Paolo Bonzini"
-msgstr ""
+msgstr "Paolo Bonzini"
-#: sed/sed.c:79
+#: sed/sed.c:113
#, c-format
msgid ""
"GNU sed home page: <http://www.gnu.org/software/sed/>.\n"
@@ -229,16 +635,12 @@ msgstr ""
"Загальні довідкові матеріали щодо користування програмами GNU: <http://www."
"gnu.org/gethelp/>.\n"
-#: sed/sed.c:86
+#: sed/sed.c:120
#, c-format
-msgid ""
-"E-mail bug reports to: <%s>.\n"
-"Be sure to include the word ``%s'' somewhere in the ``Subject:'' field.\n"
-msgstr ""
-"Повідомлення про помилки надсилайте на адресу <%s>.\n"
-"Обов'язково додайте слово «%s» будь-де у полі «Тема:».\n"
+msgid "E-mail bug reports to: <%s>.\n"
+msgstr "Про вади слід повідомляти на таку адресу: <%s>.\n"
-#: sed/sed.c:99
+#: sed/sed.c:129
msgid ""
" -R, --regexp-perl\n"
" use Perl 5's regular expressions syntax in the script.\n"
@@ -246,7 +648,7 @@ msgstr ""
" -R, --regexp-perl\n"
" використовувати у сценаріях регулярні вирази Perl 5.\n"
-#: sed/sed.c:104
+#: sed/sed.c:134
#, c-format
msgid ""
"Usage: %s [OPTION]... {script-only-if-no-other-script} [input-file]...\n"
@@ -256,7 +658,7 @@ msgstr ""
"вхідних даних]...\n"
"\n"
-#: sed/sed.c:108
+#: sed/sed.c:138
#, c-format
msgid ""
" -n, --quiet, --silent\n"
@@ -265,7 +667,7 @@ msgstr ""
" -n, --quiet, --silent\n"
" не виводити автоматично пробіли шаблонів\n"
-#: sed/sed.c:110
+#: sed/sed.c:140
#, c-format
msgid ""
" -e script, --expression=script\n"
@@ -274,7 +676,7 @@ msgstr ""
" -e скрипт, --expression=скрипт\n"
" додати скрипт до команд, які слід виконати\n"
-#: sed/sed.c:112
+#: sed/sed.c:142
#, c-format
msgid ""
" -f script-file, --file=script-file\n"
@@ -285,7 +687,7 @@ msgstr ""
" додати вміст файла файл-скрипту до команд, які слід "
"виконати\n"
-#: sed/sed.c:115
+#: sed/sed.c:146
#, c-format
msgid ""
" --follow-symlinks\n"
@@ -294,8 +696,8 @@ msgstr ""
" --follow-symlinks\n"
" переходити за символічними посиланням під час обробки\n"
-#: sed/sed.c:118
-#, fuzzy, c-format
+#: sed/sed.c:149
+#, c-format
msgid ""
" -i[SUFFIX], --in-place[=SUFFIX]\n"
" edit files in place (makes backup if SUFFIX supplied)\n"
@@ -304,7 +706,7 @@ msgstr ""
" редагувати файл на місці (створювати резервні копії, якщо "
"вказано суфікс назви)\n"
-#: sed/sed.c:121
+#: sed/sed.c:153
#, c-format
msgid ""
" -b, --binary\n"
@@ -315,7 +717,7 @@ msgstr ""
" відкривати файли у бінарному режимі (CR+LF не "
"обробляються)\n"
-#: sed/sed.c:124
+#: sed/sed.c:157
#, c-format
msgid ""
" -l N, --line-length=N\n"
@@ -325,7 +727,7 @@ msgstr ""
" вказати бажану довжину рядка для перенесення для команди "
"«l»\n"
-#: sed/sed.c:126
+#: sed/sed.c:159
#, c-format
msgid ""
" --posix\n"
@@ -334,29 +736,39 @@ msgstr ""
" --posix\n"
" вимкнути всі розширення GNU.\n"
-#: sed/sed.c:128
+#: sed/sed.c:161
#, c-format
msgid ""
-" -r, --regexp-extended\n"
-" use extended regular expressions in the script.\n"
+" -E, -r, --regexp-extended\n"
+" use extended regular expressions in the script\n"
+" (for portability use POSIX -E).\n"
msgstr ""
-" -r, --regexp-extended\n"
-" використовувати у скрипті розширені формальні вирази.\n"
+" -E, -r, --regexp-extended\n"
+" використовувати розширені формальні вирази у скрипті\n"
+" (для сумісності користуйтеся -E POSIX).\n"
-#: sed/sed.c:133
+#: sed/sed.c:167
#, c-format
msgid ""
" -s, --separate\n"
-" consider files as separate rather than as a single "
-"continuous\n"
-" long stream.\n"
+" consider files as separate rather than as a single,\n"
+" continuous long stream.\n"
msgstr ""
" -s, --separate\n"
" вважати файли окремими блоками даних, а не єдиним "
"неперервним\n"
" довгим потоком.\n"
-#: sed/sed.c:136
+#: sed/sed.c:170
+#, c-format
+msgid ""
+" --sandbox\n"
+" operate in sandbox mode.\n"
+msgstr ""
+" --sandbox\n"
+" працювати у режимі пісочниці.\n"
+
+#: sed/sed.c:172
#, c-format
msgid ""
" -u, --unbuffered\n"
@@ -369,26 +781,28 @@ msgstr ""
"даних і\n"
" частіше спорожняти буфери вихідних даних\n"
-#: sed/sed.c:139
+#: sed/sed.c:175
#, c-format
msgid ""
" -z, --null-data\n"
" separate lines by NUL characters\n"
msgstr ""
+" -z, --null-data\n"
+" відокремити рядки символами NUL\n"
-#: sed/sed.c:141
+#: sed/sed.c:177
#, c-format
msgid " --help display this help and exit\n"
msgstr " --help показати цю довідку та вийти\n"
-#: sed/sed.c:142
+#: sed/sed.c:178
#, c-format
msgid " --version output version information and exit\n"
msgstr ""
" --version показати інформацію щодо версії і вийти\n"
"\n"
-#: sed/sed.c:143
+#: sed/sed.c:179
#, c-format
msgid ""
"\n"
@@ -406,121 +820,59 @@ msgstr ""
"прочитано зі стандартного джерела вхідних даних.\n"
"\n"
-#: sed/utils.c:74 sed/utils.c:432
+#: sed/utils.c:73 sed/utils.c:384
#, c-format
msgid "cannot remove %s: %s"
msgstr "не вдалося вилучити %s: %s"
-#: sed/utils.c:144
+#: sed/utils.c:136
#, c-format
msgid "couldn't open file %s: %s"
msgstr "не вдалося відкрити файл %s: %s"
-#: sed/utils.c:167
+#: sed/utils.c:155
#, c-format
msgid "couldn't attach to %s: %s"
msgstr "не вдалося під’єднатися до %s: %s"
-#: sed/utils.c:229
+#: sed/utils.c:192
#, c-format
-msgid "couldn't write %d item to %s: %s"
-msgid_plural "couldn't write %d items to %s: %s"
-msgstr[0] "не вдалося записати %d елемент до %s: %s"
-msgstr[1] "не вдалося записати %d елементів до %s: %s"
-msgstr[2] "не вдалося записати %d елементів до %s: %s"
-msgstr[3] "не вдалося записати %d елемент до %s: %s"
+msgid "couldn't write %llu item to %s: %s"
+msgid_plural "couldn't write %llu items to %s: %s"
+msgstr[0] "не вдалося записати %llu елемент до %s: %s"
+msgstr[1] "не вдалося записати %llu елементи до %s: %s"
+msgstr[2] "не вдалося записати %llu елементів до %s: %s"
+msgstr[3] "не вдалося записати %llu елемент до %s: %s"
-#: sed/utils.c:244 sed/utils.c:267
+#: sed/utils.c:204 sed/utils.c:223
#, c-format
msgid "read error on %s: %s"
msgstr "помилка читання %s: %s"
-#: sed/utils.c:372
+#: sed/utils.c:325
#, c-format
msgid "couldn't follow symlink %s: %s"
msgstr "не вдалося перейти за символічним посиланням %s: %s"
-#: sed/utils.c:406
+#: sed/utils.c:359
#, c-format
msgid "cannot stat %s: %s"
msgstr "не вдалося отримати статистичні дані щодо %s: %s"
-#: sed/utils.c:437
+#: sed/utils.c:389
#, c-format
msgid "cannot rename %s: %s"
msgstr "не вдалося перейменувати %s: %s"
-#: lib/regcomp.c:132
-msgid "Success"
-msgstr "Успішно"
-
-#: lib/regcomp.c:135
-msgid "No match"
-msgstr "Немає відповідності"
-
-#: lib/regcomp.c:138
-msgid "Invalid regular expression"
-msgstr "Неправильний регулярний вираз"
-
-#: lib/regcomp.c:141
-msgid "Invalid collation character"
-msgstr "Неправильний символ співставлення"
-
-#: lib/regcomp.c:144
-msgid "Invalid character class name"
-msgstr "Невірне ім'я класу символів"
-
-#: lib/regcomp.c:147
-msgid "Trailing backslash"
-msgstr "Зворотній слеш у кінці рядка"
-
-#: lib/regcomp.c:150
-msgid "Invalid back reference"
-msgstr "Неправильне зворотнє посилання"
-
-#: lib/regcomp.c:153
-msgid "Unmatched [ or [^"
-msgstr "Не закрито [ чи [^"
-
-#: lib/regcomp.c:156
-msgid "Unmatched ( or \\("
-msgstr "Не закрито ( чи \\("
+#~ msgid "cannot specify modifiers on empty regexp"
+#~ msgstr "не можна вказувати модифікатори щодо порожнього формального виразу"
-#: lib/regcomp.c:159
-msgid "Unmatched \\{"
-msgstr "Не закрито \\{"
-
-#: lib/regcomp.c:162
-msgid "Invalid content of \\{\\}"
-msgstr "Неправильний вміст \\{\\}"
-
-#: lib/regcomp.c:165
-msgid "Invalid range end"
-msgstr "Неправильний кінець діапазону"
-
-#: lib/regcomp.c:168
-msgid "Memory exhausted"
-msgstr "Пам'ять вичерпано"
-
-#: lib/regcomp.c:171
-msgid "Invalid preceding regular expression"
-msgstr "Неправильний попередній регулярний вираз"
-
-#: lib/regcomp.c:174
-msgid "Premature end of regular expression"
-msgstr "Передчасне закінчення регулярного виразу"
-
-#: lib/regcomp.c:177
-msgid "Regular expression too big"
-msgstr "Надто великий регулярний вираз"
-
-#: lib/regcomp.c:180
-msgid "Unmatched ) or \\)"
-msgstr "Не закрито ) чи \\)"
-
-#: lib/regcomp.c:705
-msgid "No previous regular expression"
-msgstr "Немає попереднього регулярного виразу"
+#~ msgid ""
+#~ "E-mail bug reports to: <%s>.\n"
+#~ "Be sure to include the word ``%s'' somewhere in the ``Subject:'' field.\n"
+#~ msgstr ""
+#~ "Повідомлення про помилки надсилайте на адресу <%s>.\n"
+#~ "Обов'язково додайте слово «%s» будь-де у полі «Тема:».\n"
#~ msgid "super-sed version %s\n"
#~ msgstr "super-sed версії %s\n"
diff --git a/po/vi.gmo b/po/vi.gmo
index d1826f6..106cfe2 100644
--- a/po/vi.gmo
+++ b/po/vi.gmo
Binary files differ
diff --git a/po/vi.po b/po/vi.po
index 1ce9797..bcaa672 100644
--- a/po/vi.po
+++ b/po/vi.po
@@ -1,222 +1,629 @@
# Vietnamese translation for Sed.
-# Copyright © 2012 Free Software Foundation, Inc.
+# Bản dịch tiếng Việt dành cho sed.
+# 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.
+# Trần Ngọc Quân <vnwildman@gmail.com>, 2012-2014, 2016.
#
msgid ""
msgstr ""
-"Project-Id-Version: sed 4.2.1\n"
+"Project-Id-Version: sed 4.2.2.177\n"
"Report-Msgid-Bugs-To: bug-gnu-utils@gnu.org\n"
-"POT-Creation-Date: 2012-12-22 14:36+0100\n"
-"PO-Revision-Date: 2012-09-28 08:41+0700\n"
+"POT-Creation-Date: 2016-12-30 00:59-0800\n"
+"PO-Revision-Date: 2016-12-09 13:31+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"
"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=utf-8\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=1; plural=0;\n"
-"X-Generator: LocFactory Editor 1.8\n"
+"X-Generator: Gtranslator 2.91.7\n"
-#: sed/compile.c:144
+#: lib/closeout.c:112
+msgid "write error"
+msgstr "lỗi ghi"
+
+#: lib/copy-acl.c:54
+#, c-format
+msgid "preserving permissions for %s"
+msgstr "giữ nguyên quyền hạn cho %s"
+
+#: lib/dfa.c:1025 lib/dfa.c:1028 lib/dfa.c:1047 lib/dfa.c:1057 lib/dfa.c:1070
+#: lib/dfa.c:1098 lib/dfa.c:1107 lib/dfa.c:1110 lib/dfa.c:1115 lib/dfa.c:1137
+#: lib/dfa.c:1140
+msgid "unbalanced ["
+msgstr "thiếu dấu ngoặc vuông mở ["
+
+#: lib/dfa.c:1083
+msgid "invalid character class"
+msgstr "sai lớp ký tự"
+
+#: lib/dfa.c:1206
+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
+msgid "unfinished \\ escape"
+msgstr "chưa kết thúc thoát chuỗi \\"
+
+#: lib/dfa.c:1436
+msgid "invalid content of \\{\\}"
+msgstr "nội dung của “\\{\\}” không hợp lệ"
+
+#: lib/dfa.c:1439
+msgid "regular expression too big"
+msgstr "biểu thức chính quy quá lớn"
+
+#: lib/dfa.c:1853
+msgid "unbalanced ("
+msgstr "thiếu dấu ngoặc đơn mở ("
+
+#: lib/dfa.c:1980
+msgid "no syntax specified"
+msgstr "chưa đưa ra cú pháp"
+
+#: lib/dfa.c:1988
+msgid "unbalanced )"
+msgstr "thiếu dấu ngoặc đơn đóng )"
+
+#: lib/error.c:191
+msgid "Unknown system error"
+msgstr "Gặp lỗi hệ thống chưa biết"
+
+#: lib/getopt.c:575 lib/getopt.c:604
+#, 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à:"
+
+#: lib/getopt.c:619
+#, c-format
+msgid "%s: option '%s' is ambiguous\n"
+msgstr "%s: tùy chọn “%s” chưa rõ ràng\n"
+
+#: lib/getopt.c:654 lib/getopt.c:658
+#, 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"
+
+#: lib/getopt.c:667 lib/getopt.c:672
+#, 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"
+
+#: lib/getopt.c:715 lib/getopt.c:734
+#, 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"
+
+#: 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
+#, 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
+#, 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ớ"
+
+#. TRANSLATORS:
+#. Get translations for open and closing quotation marks.
+#. The message catalog should translate "`" to a left
+#. quotation mark suitable for the locale, and similarly for
+#. "'". For example, a French Unicode local should translate
+#. these to U+00AB (LEFT-POINTING DOUBLE ANGLE
+#. QUOTATION MARK), and U+00BB (RIGHT-POINTING DOUBLE ANGLE
+#. QUOTATION MARK), respectively.
+#.
+#. If the catalog has no translation, we will try to
+#. use Unicode U+2018 (LEFT SINGLE QUOTATION MARK) and
+#. Unicode U+2019 (RIGHT SINGLE QUOTATION MARK). If the
+#. current locale is not Unicode, locale_quoting_style
+#. will quote 'like this', and clocale_quoting_style will
+#. quote "like this". You should always include translations
+#. for "`" and "'" even if U+2018 and U+2019 are appropriate
+#. for your locale.
+#.
+#. If you don't know what to put here, please see
+#. <http://en.wikipedia.org/wiki/Quotation_marks_in_other_languages>
+#. and use glyphs suitable for your language.
+#: lib/quotearg.c:354
+msgid "`"
+msgstr "“"
+
+#: lib/quotearg.c:355
+msgid "'"
+msgstr "”"
+
+#: lib/regcomp.c:135
+msgid "Success"
+msgstr "Thành công"
+
+#: lib/regcomp.c:138
+msgid "No match"
+msgstr "Không tìm thấy"
+
+#: lib/regcomp.c:141
+msgid "Invalid regular expression"
+msgstr "Biểu thức chính quy không hợp lệ"
+
+#: lib/regcomp.c:144
+msgid "Invalid collation character"
+msgstr "Ký tự đối chiếu không hợp lệ"
+
+#: lib/regcomp.c:147
+msgid "Invalid character class name"
+msgstr "Tên lớp ký tự không hợp lệ"
+
+#: lib/regcomp.c:150
+msgid "Trailing backslash"
+msgstr "Có dấu gạch ngược theo sau"
+
+#: lib/regcomp.c:153
+msgid "Invalid back reference"
+msgstr "Tham chiếu ngược không hợp lệ"
+
+#: lib/regcomp.c:156
+msgid "Unmatched [, [^, [:, [., or [="
+msgstr "Có ký tự [, [^, [:, [., hay [= lẻ cặp"
+
+#: lib/regcomp.c:159
+msgid "Unmatched ( or \\("
+msgstr "Có dấu ngoặc mở “(” hay “\\(” lẻ đôi"
+
+#: lib/regcomp.c:162
+msgid "Unmatched \\{"
+msgstr "Có dấu ngoặc đơn mở “\\(” lẻ đôi"
+
+#: lib/regcomp.c:165
+msgid "Invalid content of \\{\\}"
+msgstr "“\\{\\}” có nội dung không hợp lệ"
+
+#: lib/regcomp.c:168
+msgid "Invalid range end"
+msgstr "Kết thúc phạm vi không hợp lệ"
+
+#: lib/regcomp.c:171
+msgid "Memory exhausted"
+msgstr "Hết bộ nhớ"
+
+#: lib/regcomp.c:174
+msgid "Invalid preceding regular expression"
+msgstr "Biểu thức chính quy đi trước không hợp lệ"
+
+#: lib/regcomp.c:177
+msgid "Premature end of regular expression"
+msgstr "Biểu thức chính quy kết thúc quá sớm"
+
+#: lib/regcomp.c:180
+msgid "Regular expression too big"
+msgstr "Biểu thức chính quy quá lớn"
+
+#: lib/regcomp.c:183
+msgid "Unmatched ) or \\)"
+msgstr "Có dấu ngoặc đơn đóng “)” hay “\\)” lẻ đôi"
+
+#: lib/regcomp.c:687
+msgid "No previous regular expression"
+msgstr "Không có biểu thức chính quy đi trước"
+
+#: lib/set-acl.c:46
+#, c-format
+msgid "setting permissions for %s"
+msgstr "đang cài đặt quyền hạn cho %s"
+
+#: lib/version-etc.c:74
+#, c-format
+msgid "Packaged by %s (%s)\n"
+msgstr "Đóng gói bởi %s (%s)\n"
+
+#: lib/version-etc.c:77
+#, c-format
+msgid "Packaged by %s\n"
+msgstr "Đóng gói bởi %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 "©"
+
+#: lib/version-etc.c:86
+msgid ""
+"\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"
+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"
+"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"
+
+#. TRANSLATORS: %s denotes an author name.
+#: lib/version-etc.c:102
+#, c-format
+msgid "Written by %s.\n"
+msgstr "Viết bởi %s.\n"
+
+#. TRANSLATORS: Each %s denotes an author name.
+#: lib/version-etc.c:106
+#, c-format
+msgid "Written by %s and %s.\n"
+msgstr "Viết bởi %s và %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 "Viết bởi %s, %s và %s.\n"
+
+#. TRANSLATORS: Each %s denotes an author name.
+#. You can use line breaks, estimating that each author name occupies
+#. ca. 16 screen columns and that a screen line has ca. 80 columns.
+#: lib/version-etc.c:117
+#, c-format
+msgid ""
+"Written by %s, %s, %s,\n"
+"and %s.\n"
+msgstr ""
+"Viết bởi %s, %s, %s\n"
+"và %s.\n"
+
+#. TRANSLATORS: Each %s denotes an author name.
+#. You can use line breaks, estimating that each author name occupies
+#. ca. 16 screen columns and that a screen line has ca. 80 columns.
+#: lib/version-etc.c:124
+#, c-format
+msgid ""
+"Written by %s, %s, %s,\n"
+"%s, and %s.\n"
+msgstr ""
+"Viết bởi %s, %s, %s,\n"
+"%s và %s.\n"
+
+#. TRANSLATORS: Each %s denotes an author name.
+#. You can use line breaks, estimating that each author name occupies
+#. ca. 16 screen columns and that a screen line has ca. 80 columns.
+#: lib/version-etc.c:131
+#, c-format
+msgid ""
+"Written by %s, %s, %s,\n"
+"%s, %s, and %s.\n"
+msgstr ""
+"Viết bởi %s, %s, %s,\n"
+"%s, %s và %s.\n"
+
+#. TRANSLATORS: Each %s denotes an author name.
+#. You can use line breaks, estimating that each author name occupies
+#. ca. 16 screen columns and that a screen line has ca. 80 columns.
+#: lib/version-etc.c:139
+#, c-format
+msgid ""
+"Written by %s, %s, %s,\n"
+"%s, %s, %s, and %s.\n"
+msgstr ""
+"Viết bởi %s, %s, %s,\n"
+"%s, %s, %s và %s.\n"
+
+#. TRANSLATORS: Each %s denotes an author name.
+#. You can use line breaks, estimating that each author name occupies
+#. ca. 16 screen columns and that a screen line has ca. 80 columns.
+#: lib/version-etc.c:147
+#, c-format
+msgid ""
+"Written by %s, %s, %s,\n"
+"%s, %s, %s, %s,\n"
+"and %s.\n"
+msgstr ""
+"Viết bởi %s, %s, %s,\n"
+"%s, %s, %s, %s\n"
+"và %s.\n"
+
+#. TRANSLATORS: Each %s denotes an author name.
+#. You can use line breaks, estimating that each author name occupies
+#. ca. 16 screen columns and that a screen line has ca. 80 columns.
+#: lib/version-etc.c:156
+#, c-format
+msgid ""
+"Written by %s, %s, %s,\n"
+"%s, %s, %s, %s,\n"
+"%s, and %s.\n"
+msgstr ""
+"Viết bởi %s, %s, %s,\n"
+"%s, %s, %s, %s,\n"
+"%s và %s.\n"
+
+#. TRANSLATORS: Each %s denotes an author name.
+#. You can use line breaks, estimating that each author name occupies
+#. ca. 16 screen columns and that a screen line has ca. 80 columns.
+#: lib/version-etc.c:167
+#, c-format
+msgid ""
+"Written by %s, %s, %s,\n"
+"%s, %s, %s, %s,\n"
+"%s, %s, and others.\n"
+msgstr ""
+"Viết bởi %s, %s, %s,\n"
+"%s, %s, %s, %s,\n"
+"%s, %s và các người khác.\n"
+
+#. TRANSLATORS: The placeholder indicates the bug-reporting address
+#. for this package. Please add _another line_ saying
+#. "Report translation bugs to <...>\n" with the address for translation
+#. bugs (typically your translation team's web or email address).
+#: lib/version-etc.c:245
+#, c-format
+msgid ""
+"\n"
+"Report bugs to: %s\n"
+msgstr ""
+"\n"
+"Báo cáo lỗi cho: %s\n"
+"Báo cáo lỗi dịch cho nhóm dịch tiếng Việt: <translation-team-vi@lists."
+"sourceforge.net>\n"
+
+#: lib/version-etc.c:247
+#, c-format
+msgid "Report %s bugs to: %s\n"
+msgstr "Báo cáo lỗi %s cho: %s\n"
+
+#: lib/version-etc.c:251
+#, c-format
+msgid "%s home page: <%s>\n"
+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"
+
+#: lib/version-etc.c:256
+msgid "General help using GNU software: <http://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"
+
+#: sed/compile.c:146
msgid "multiple `!'s"
-msgstr "có nhiều dấu cảm `!'"
+msgstr "có nhiều dấu cảm “!”"
-#: sed/compile.c:145
+#: sed/compile.c:147
msgid "unexpected `,'"
-msgstr "gặp dấu phẩy `,' bất thường"
+msgstr "gặp dấu phẩy “,” bất thường"
-#: sed/compile.c:146
+#: sed/compile.c:149
msgid "invalid usage of +N or ~N as first address"
-msgstr "dùng `+N' hay `-N' như là địa chỉ đầu tiên một cách không là hợp lệ"
+msgstr "dùng “+N” hay “-N” như là địa chỉ đầu tiên một cách không là hợp lệ"
-#: sed/compile.c:147
+#: sed/compile.c:150
msgid "unmatched `{'"
-msgstr "có dấu ngoặc móc mở `{' lẻ đôi"
+msgstr "có dấu ngoặc móc mở “{” lẻ đôi"
-#: sed/compile.c:148
+#: sed/compile.c:151
msgid "unexpected `}'"
-msgstr "gặp dấu ngoặc móc đóng `}' bất thường"
+msgstr "gặp dấu ngoặc móc đóng “}” bất thường"
-#: sed/compile.c:149
+#: sed/compile.c:153
msgid "extra characters after command"
msgstr "có ký tự thêm nằm sau lệnh"
-#: sed/compile.c:150
+#: sed/compile.c:155
msgid "expected \\ after `a', `c' or `i'"
-msgstr "yêu cầu `\\' nằm sau `a', `c' hay `i'"
+msgstr "cần “\\” nằm sau “a”, “c” hay “i”"
-#: sed/compile.c:151
+#: sed/compile.c:157
msgid "`}' doesn't want any addresses"
-msgstr "dấu ngoặc móc đóng `}' không yêu cầu địa chỉ"
+msgstr "dấu ngoặc móc đóng “}” không cần địa chỉ"
-#: sed/compile.c:152
+#: sed/compile.c:159
msgid ": doesn't want any addresses"
-msgstr "dấu hai chấm `:' không yêu cầu địa chỉ"
+msgstr "dấu hai chấm “:” không yêu cầu địa chỉ"
-#: sed/compile.c:153
+#: sed/compile.c:161
msgid "comments don't accept any addresses"
msgstr "chú thích không chấp nhận địa chỉ"
-#: sed/compile.c:154
+#: sed/compile.c:162
msgid "missing command"
msgstr "thiếu lệnh"
-#: sed/compile.c:155
+#: sed/compile.c:163
msgid "command only uses one address"
msgstr "lệnh chỉ dùng một địa chỉ riêng lẻ"
-#: sed/compile.c:156
+#: sed/compile.c:164
msgid "unterminated address regex"
msgstr "biểu thức chính quy kiểu đia chỉ chưa kết thúc"
-#: sed/compile.c:157
+#: sed/compile.c:165
msgid "unterminated `s' command"
-msgstr "lệnh `s' chưa kết thúc"
+msgstr "lệnh “s” chưa kết thúc"
-#: sed/compile.c:158
+#: sed/compile.c:166
msgid "unterminated `y' command"
-msgstr "lệnh `y' chưa kết thúc"
+msgstr "lệnh “y” chưa kết thúc"
-#: sed/compile.c:159
+#: sed/compile.c:167
msgid "unknown option to `s'"
-msgstr "không hiểu tùy chọn cho `s'"
+msgstr "không hiểu tùy chọn cho “s”"
-#: sed/compile.c:160
+#: sed/compile.c:169
msgid "multiple `p' options to `s' command"
-msgstr "lệnh `s' có nhiều tùy chọn kiểu `p'"
+msgstr "lệnh “s” có nhiều tùy chọn kiểu “p”"
-#: sed/compile.c:161
+#: sed/compile.c:171
msgid "multiple `g' options to `s' command"
-msgstr "lệnh `s' có nhiều tùy chọn kiểu `g'"
+msgstr "lệnh “s” có nhiều tùy chọn kiểu “g”"
-#: sed/compile.c:162
+#: sed/compile.c:173
msgid "multiple number options to `s' command"
-msgstr "lệnh `s' có nhiều tùy chọn kiểu con số"
+msgstr "lệnh “s” có nhiều tùy chọn kiểu con số"
-#: sed/compile.c:163
+#: sed/compile.c:175
msgid "number option to `s' command may not be zero"
-msgstr "không cho phép lệnh `s' có tùy chọn con số là số không"
+msgstr "không cho phép lệnh “s” có tùy chọn con số là số không"
-#: sed/compile.c:164
+#: sed/compile.c:177
msgid "strings for `y' command are different lengths"
-msgstr "lệnh `y' có các chuỗi có chiều dài khác nhau"
+msgstr "lệnh “y” có các chuỗi có chiều dài khác nhau"
-#: sed/compile.c:165
+#: sed/compile.c:179
msgid "delimiter character is not a single-byte character"
msgstr "ký tự định giới không phải là ký tự byte đơn"
-#: sed/compile.c:166
+#: sed/compile.c:181
msgid "expected newer version of sed"
msgstr "cần phiên bản sed mới hơn"
-#: sed/compile.c:167
+#: sed/compile.c:183
msgid "invalid usage of line address 0"
msgstr "sai dùng địa chỉ dòng 0"
-#: sed/compile.c:168
+#: sed/compile.c:184
#, c-format
msgid "unknown command: `%c'"
-msgstr "không hiểu lệnh: `%c'"
+msgstr "không hiểu lệnh: “%c”"
-#: sed/compile.c:169
-#, fuzzy
+#: sed/compile.c:186
msgid "incomplete command"
-msgstr "thiếu lệnh"
+msgstr "lệnh chưa hoàn thiện"
+
+#: sed/compile.c:188
+msgid "\":\" lacks a label"
+msgstr "\":\" thiếu một nhãn"
-#: sed/compile.c:192
+#: sed/compile.c:190
+msgid "recursive escaping after \\c not allowed"
+msgstr "thoát đệ quy sau \\c là không được phép"
+
+#: sed/compile.c:213
#, c-format
msgid "%s: file %s line %lu: %s\n"
msgstr "%s: tập tin %s dòng %lu: %s\n"
-#: sed/compile.c:195
+#: sed/compile.c:216
#, c-format
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:1657
+#: sed/compile.c:1639
#, 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'"
+msgstr "không tìm thấy nhãn để nhảy tới “%s”"
-#: sed/execute.c:595
+#: sed/execute.c:264 sed/execute.c:281
+#, 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
#, c-format
msgid "%s: can't read %s: %s\n"
msgstr "%s: không thể đọc %s: %s\n"
-#: sed/execute.c:624
+#: sed/execute.c:600
#, 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:629
+#: sed/execute.c:605
#, 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:640
+#: sed/execute.c:616
#, 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:647
+#: sed/execute.c:624
#, 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:664 sed/utils.c:211
+#: sed/execute.c:643 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:1193 sed/execute.c:1373
+#: sed/execute.c:1158 sed/execute.c:1368
msgid "error in subprocess"
msgstr "gặp lỗi trong tiến trình con"
-#: sed/execute.c:1195
+#: sed/execute.c:1160
msgid "option `e' not supported"
-msgstr "không hỗ trợ tùy chọn `e'"
+msgstr "không hỗ trợ tùy chọn “e”"
-#: sed/execute.c:1375
+#: sed/execute.c:1349
msgid "`e' command not supported"
-msgstr "không hỗ trợ lệnh `e'"
+msgstr "không hỗ trợ lệnh “e”"
-#: sed/execute.c:1725
+#: sed/execute.c:1675
msgid "no input files"
msgstr "không có tập tin đầu vào"
-#: sed/regexp.c:39
+#: sed/regexp.c:38
msgid "no previous regular expression"
msgstr "không có biểu thức chính quy nằm trước"
-#: sed/regexp.c:40
-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"
-
-#: sed/regexp.c:129
+#: sed/regexp.c:138
#, 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'"
+msgstr "tham chiếu không hợp lệ “\\%d” bên phải lệnh “s”"
-#: sed/sed.c:32
+#: sed/sed.c:35
msgid "Jay Fenlason"
-msgstr ""
+msgstr "Jay Fenlason"
-#: sed/sed.c:33
+#: sed/sed.c:36
msgid "Tom Lord"
-msgstr ""
+msgstr "Tom Lord"
-#: sed/sed.c:34
+#: sed/sed.c:37
msgid "Ken Pizzini"
-msgstr ""
+msgstr "Ken Pizzini"
-#: sed/sed.c:35
+#: sed/sed.c:38
msgid "Paolo Bonzini"
-msgstr ""
+msgstr "Paolo Bonzini"
-#: sed/sed.c:79
+#: sed/sed.c:113
#, c-format
msgid ""
"GNU sed home page: <http://www.gnu.org/software/sed/>.\n"
@@ -226,16 +633,12 @@ msgstr ""
"Trợ giúp dùng chung cho các phần mềm tại GNU: <http://www.gnu.org/gethelp/"
">.\n"
-#: sed/sed.c:86
+#: sed/sed.c:120
#, c-format
-msgid ""
-"E-mail bug reports to: <%s>.\n"
-"Be sure to include the word ``%s'' somewhere in the ``Subject:'' field.\n"
-msgstr ""
-"Hãy thông báo lỗi cho: <%s> .\n"
-"Thư thông báo nên chứa từ `%s' trong trường `Chủ đề:'.\n"
+msgid "E-mail bug reports to: <%s>.\n"
+msgstr "Gửi thư điện tử báo cáo lỗi đến: <%s>.\n"
-#: sed/sed.c:99
+#: sed/sed.c:129
msgid ""
" -R, --regexp-perl\n"
" use Perl 5's regular expressions syntax in the script.\n"
@@ -244,17 +647,17 @@ msgstr ""
" sử dụng cú pháp của biểu thức chính quy kiểu Perl 5\n"
" trong văn lệnh.\n"
-#: sed/sed.c:104
+#: sed/sed.c:134
#, c-format
msgid ""
"Usage: %s [OPTION]... {script-only-if-no-other-script} [input-file]...\n"
"\n"
msgstr ""
-"Sử dụng: %s [TÙY_CHỌN]... {bó-văn-lệnh-nếu-không-có-bó-văn-lệnh-khác} [tập-"
+"Cách dùng: %s [TÙY_CHỌN]... {bó-văn-lệnh-nếu-không-có-bó-văn-lệnh-khác} [tập-"
"tin-đầu-vào]...\n"
"\n"
-#: sed/sed.c:108
+#: sed/sed.c:138
#, c-format
msgid ""
" -n, --quiet, --silent\n"
@@ -263,7 +666,7 @@ msgstr ""
" -n, --quiet, --silent\n"
" thu hồi chức năng tự động in ra khoảng cách mẫu\n"
-#: sed/sed.c:110
+#: sed/sed.c:140
#, c-format
msgid ""
" -e script, --expression=script\n"
@@ -272,7 +675,7 @@ msgstr ""
" -e văn_lệnh, --expression=văn_lệnh\n"
" thêm văn lệnh này vào các câu lệnh cần thực hiện\n"
-#: sed/sed.c:112
+#: sed/sed.c:142
#, c-format
msgid ""
" -f script-file, --file=script-file\n"
@@ -280,20 +683,20 @@ msgid ""
"executed\n"
msgstr ""
" -f tập_tin_văn_lệnh --file=tập_tin_văn_lệnh\n"
-" thêm nội dụng của tập tin văn lệnh này\n"
+" thêm nội dung của tập tin văn lệnh này\n"
" vào các câu lệnh cần thực hiện\n"
-#: sed/sed.c:115
+#: sed/sed.c:146
#, c-format
msgid ""
" --follow-symlinks\n"
" follow symlinks when processing in place\n"
msgstr ""
" --follow-symlinks\n"
-" theo liên kết tượng trưng khi xử lý tại chỗ\n"
+" theo liên kết mềm khi xử lý tại chỗ\n"
-#: sed/sed.c:118
-#, fuzzy, c-format
+#: sed/sed.c:149
+#, c-format
msgid ""
" -i[SUFFIX], --in-place[=SUFFIX]\n"
" edit files in place (makes backup if SUFFIX supplied)\n"
@@ -302,7 +705,7 @@ msgstr ""
" chỉnh sửa tập tin tại chỗ\n"
" (tạo bản sao lưu nếu phần mở rộng được áp dụng)\n"
-#: sed/sed.c:121
+#: sed/sed.c:153
#, c-format
msgid ""
" -b, --binary\n"
@@ -313,46 +716,56 @@ msgstr ""
" mở tập tin ở chế độ nhị phân (không phải xử lý một cách\n"
" đặc biệt đối với các ký tự xuống dòng CR+LF)\n"
-#: sed/sed.c:124
+#: sed/sed.c:157
#, c-format
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"
-" chỉ ra chiều dài muốn ngắt dòng cho lệnh `l'\n"
+" chỉ ra chiều dài muốn ngắt dòng cho lệnh “l”\n"
-#: sed/sed.c:126
+#: sed/sed.c:159
#, c-format
msgid ""
" --posix\n"
" disable all GNU extensions.\n"
msgstr ""
" --posix\n"
-" tắt mọi phần mở rộng kiểu GNU\n"
+" tắt mọi phần mở rộng của GNU.\n"
-#: sed/sed.c:128
+#: sed/sed.c:161
#, c-format
msgid ""
-" -r, --regexp-extended\n"
-" use extended regular expressions in the script.\n"
+" -E, -r, --regexp-extended\n"
+" use extended regular expressions in the script\n"
+" (for portability use POSIX -E).\n"
msgstr ""
" -r, --regexp-extended\n"
" dùng biểu thức chính quy đã mở rộng trong văn lệnh.\n"
+" (để tương thích dùng POSIX -E).\n"
-#: sed/sed.c:133
+#: sed/sed.c:167
#, c-format
msgid ""
" -s, --separate\n"
-" consider files as separate rather than as a single "
-"continuous\n"
-" long stream.\n"
+" consider files as separate rather than as a single,\n"
+" continuous long stream.\n"
msgstr ""
" -s, --separate\n"
-" coi các tập tin là riêng với nhau, hơn là một luồng liên "
-"tục riêng lẻ.\n"
+" coi các tập tin là riêng với nhau, chứ không phải đơn,\n"
+" luồng liên tục.\n"
-#: sed/sed.c:136
+#: sed/sed.c:170
+#, c-format
+msgid ""
+" --sandbox\n"
+" operate in sandbox mode.\n"
+msgstr ""
+" --sandbox\n"
+" thực hiện trong chế độ sandbox.\n"
+
+#: sed/sed.c:172
#, c-format
msgid ""
" -u, --unbuffered\n"
@@ -362,27 +775,29 @@ msgid ""
msgstr ""
" -u, --unbuffered\n"
" nạp số lượng dữ liệu tối thiểu từ các tập tin đầu vào,\n"
-" và làm đẩy dữ liệu của bộ đệm kết xuất lên đĩa thường xuyên "
+" và đẩy dữ liệu của bộ đệm kết xuất lên đĩa thường xuyên "
"hơn\n"
-#: sed/sed.c:139
+#: sed/sed.c:175
#, c-format
msgid ""
" -z, --null-data\n"
" separate lines by NUL characters\n"
msgstr ""
+" -z, --null-data\n"
+" ngăn cách các dòng bằng ký tự NUL\n"
-#: sed/sed.c:141
+#: sed/sed.c:177
#, c-format
msgid " --help display this help and exit\n"
msgstr " --help hiện trợ giúp này rồi thoát\n"
-#: sed/sed.c:142
+#: sed/sed.c:178
#, c-format
msgid " --version output version information and exit\n"
msgstr " --version xuất thông tin phiên bản rồi thoát\n"
-#: sed/sed.c:143
+#: sed/sed.c:179
#, c-format
msgid ""
"\n"
@@ -393,124 +808,63 @@ msgid ""
"\n"
msgstr ""
"\n"
-"Không đưa ra tùy chọn `-e', `--expression' (biểu thức),\n"
-"`-f' hay `--file' (tập tin) thì đối số khác tùy chọn thứ nhất\n"
+"Không đưa ra tùy chọn “-e”, “--expression” (biểu thức),\n"
+"“-f” hay “--file” (tập tin) thì đối số khác tùy chọn thứ nhất\n"
"được lấy làm văn lệnh sed cần giải dịch. Tất cả các đối số\n"
"còn lại là tên của tập tin đầu vào; không chỉ ra tập tin đầu\n"
"vào thì nó dùng đầu vào tiêu chuẩn.\n"
-#: sed/utils.c:74 sed/utils.c:432
+#: sed/utils.c:73 sed/utils.c:384
#, c-format
msgid "cannot remove %s: %s"
msgstr "không thể gỡ bỏ %s: %s "
-#: sed/utils.c:144
+#: sed/utils.c:136
#, c-format
msgid "couldn't open file %s: %s"
msgstr "không thể mở tập tin %s: %s"
-#: sed/utils.c:167
+#: sed/utils.c:155
#, c-format
msgid "couldn't attach to %s: %s"
msgstr "không thể gắn với %s: %s"
-#: sed/utils.c:229
+#: sed/utils.c:192
#, c-format
-msgid "couldn't write %d item to %s: %s"
-msgid_plural "couldn't write %d items to %s: %s"
-msgstr[0] "không thể ghi %d mục vào %s: %s"
+msgid "couldn't write %llu item to %s: %s"
+msgid_plural "couldn't write %llu items to %s: %s"
+msgstr[0] "không thể ghi %llu mục vào %s: %s"
-#: sed/utils.c:244 sed/utils.c:267
+#: sed/utils.c:204 sed/utils.c:223
#, c-format
msgid "read error on %s: %s"
msgstr "lỗi đọc trên %s: %s"
-#: sed/utils.c:372
+#: sed/utils.c:325
#, c-format
msgid "couldn't follow symlink %s: %s"
-msgstr "không thể theo liên kết tượng trưng %s: %s"
+msgstr "không thể theo liên kết mềm %s: %s"
-#: sed/utils.c:406
+#: sed/utils.c:359
#, c-format
msgid "cannot stat %s: %s"
-msgstr "không thể lấy trạng thái về %s: %s"
+msgstr "không thể lấy thống kê %s: %s"
-#: sed/utils.c:437
+#: sed/utils.c:389
#, c-format
msgid "cannot rename %s: %s"
msgstr "không thể đổi tên %s: %s"
-#: lib/regcomp.c:132
-msgid "Success"
-msgstr "Thành công"
-
-#: lib/regcomp.c:135
-msgid "No match"
-msgstr "Không tìm thấy"
-
-#: lib/regcomp.c:138
-msgid "Invalid regular expression"
-msgstr "Biểu thức chính quy không hợp lệ"
-
-#: lib/regcomp.c:141
-msgid "Invalid collation character"
-msgstr "Ký tự đối chiếu không hợp lệ"
-
-#: lib/regcomp.c:144
-msgid "Invalid character class name"
-msgstr "Tên lớp ký tự không hợp lệ"
-
-#: lib/regcomp.c:147
-msgid "Trailing backslash"
-msgstr "Có dấu gạch ngược theo sau"
-
-#: lib/regcomp.c:150
-msgid "Invalid back reference"
-msgstr "Tham chiếu ngược không hợp lệ"
-
-#: lib/regcomp.c:153
-msgid "Unmatched [ or [^"
-msgstr "Có dấu ngoặc vuông mở `[' hay `[^' lẻ đôi"
+#~ 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"
-#: lib/regcomp.c:156
-msgid "Unmatched ( or \\("
-msgstr "Có dấu ngoặc mở `(' hay `\\(' lẻ đôi"
-
-#: lib/regcomp.c:159
-msgid "Unmatched \\{"
-msgstr "Có dấu ngoặc đơn mở `\\(' lẻ đôi"
-
-#: lib/regcomp.c:162
-msgid "Invalid content of \\{\\}"
-msgstr "`\\{\\}' có nội dung không hợp lệ"
-
-#: lib/regcomp.c:165
-msgid "Invalid range end"
-msgstr "Kết thúc phạm vi không hợp lệ"
-
-#: lib/regcomp.c:168
-msgid "Memory exhausted"
-msgstr "Cạn bộ nhớ"
-
-#: lib/regcomp.c:171
-msgid "Invalid preceding regular expression"
-msgstr "Biểu thức chính quy đi trước không hợp lệ"
-
-#: lib/regcomp.c:174
-msgid "Premature end of regular expression"
-msgstr "Biểu thức chính quy kết thúc quá sớm"
-
-#: lib/regcomp.c:177
-msgid "Regular expression too big"
-msgstr "Biểu thức chính quy quá lớn"
-
-#: lib/regcomp.c:180
-msgid "Unmatched ) or \\)"
-msgstr "Có dấu ngoặc đơn đóng `)' hay `\\)' lẻ đôi"
-
-#: lib/regcomp.c:705
-msgid "No previous regular expression"
-msgstr "Không có biểu thức chính quy đi trước"
+#~ msgid ""
+#~ "E-mail bug reports to: <%s>.\n"
+#~ "Be sure to include the word ``%s'' somewhere in the ``Subject:'' field.\n"
+#~ msgstr ""
+#~ "Hãy thông báo lỗi cho: <%s> .\n"
+#~ "Thư thông báo nên chứa từ “%s” trong trường “Chủ đề:”.\n"
+#~ "Thông báo lỗi dịch cho: <http://translationproject.org/team/vi.html>.\n"
#~ msgid "super-sed version %s\n"
#~ msgstr "super-sed phiên bản %s\n"
diff --git a/po/zh_CN.gmo b/po/zh_CN.gmo
index 0de7eb1..713256b 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 36206da..8890be1 100644
--- a/po/zh_CN.po
+++ b/po/zh_CN.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: 2012-12-22 14:36+0100\n"
+"POT-Creation-Date: 2016-12-30 00:59-0800\n"
"PO-Revision-Date: 2008-01-28 23:17+0800\n"
"Last-Translator: LI Daobing <lidaobing@gmail.com>\n"
"Language-Team: Chinese (simplified) <i18n-zh@googlegroups.com>\n"
@@ -15,221 +15,601 @@ msgstr ""
"MIME-Version: 1.0\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=1; plural=0;\n"
-#: sed/compile.c:144
+#: lib/closeout.c:112
+msgid "write error"
+msgstr ""
+
+#: lib/copy-acl.c:54
+#, c-format
+msgid "preserving permissions for %s"
+msgstr ""
+
+#: lib/dfa.c:1025 lib/dfa.c:1028 lib/dfa.c:1047 lib/dfa.c:1057 lib/dfa.c:1070
+#: lib/dfa.c:1098 lib/dfa.c:1107 lib/dfa.c:1110 lib/dfa.c:1115 lib/dfa.c:1137
+#: lib/dfa.c:1140
+msgid "unbalanced ["
+msgstr ""
+
+#: lib/dfa.c:1083
+#, fuzzy
+msgid "invalid character class"
+msgstr "非法的字符类型名"
+
+#: lib/dfa.c:1206
+msgid "character class syntax is [[:space:]], not [:space:]"
+msgstr ""
+
+#: lib/dfa.c:1275
+msgid "unfinished \\ escape"
+msgstr ""
+
+#: lib/dfa.c:1436
+#, fuzzy
+msgid "invalid content of \\{\\}"
+msgstr "“\\{\\}”中内容非法"
+
+#: lib/dfa.c:1439
+#, fuzzy
+msgid "regular expression too big"
+msgstr "正则表达式过大"
+
+#: lib/dfa.c:1853
+msgid "unbalanced ("
+msgstr ""
+
+#: lib/dfa.c:1980
+msgid "no syntax specified"
+msgstr ""
+
+#: lib/dfa.c:1988
+msgid "unbalanced )"
+msgstr ""
+
+#: lib/error.c:191
+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 ""
+
+#: lib/getopt.c:654 lib/getopt.c:658
+#, c-format
+msgid "%s: option '--%s' doesn't allow an argument\n"
+msgstr ""
+
+#: 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:715 lib/getopt.c:734
+#, c-format
+msgid "%s: option '--%s' requires an argument\n"
+msgstr ""
+
+#: 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
+#, 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
+#, 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 "内存耗尽"
+
+#. TRANSLATORS:
+#. Get translations for open and closing quotation marks.
+#. The message catalog should translate "`" to a left
+#. quotation mark suitable for the locale, and similarly for
+#. "'". For example, a French Unicode local should translate
+#. these to U+00AB (LEFT-POINTING DOUBLE ANGLE
+#. QUOTATION MARK), and U+00BB (RIGHT-POINTING DOUBLE ANGLE
+#. QUOTATION MARK), respectively.
+#.
+#. If the catalog has no translation, we will try to
+#. use Unicode U+2018 (LEFT SINGLE QUOTATION MARK) and
+#. Unicode U+2019 (RIGHT SINGLE QUOTATION MARK). If the
+#. current locale is not Unicode, locale_quoting_style
+#. will quote 'like this', and clocale_quoting_style will
+#. quote "like this". You should always include translations
+#. for "`" and "'" even if U+2018 and U+2019 are appropriate
+#. for your locale.
+#.
+#. If you don't know what to put here, please see
+#. <http://en.wikipedia.org/wiki/Quotation_marks_in_other_languages>
+#. and use glyphs suitable for your language.
+#: lib/quotearg.c:354
+msgid "`"
+msgstr ""
+
+#: lib/quotearg.c:355
+msgid "'"
+msgstr ""
+
+#: lib/regcomp.c:135
+msgid "Success"
+msgstr "成功"
+
+#: lib/regcomp.c:138
+msgid "No match"
+msgstr "没有匹配项"
+
+#: lib/regcomp.c:141
+msgid "Invalid regular expression"
+msgstr "非法的正则表达式"
+
+#: lib/regcomp.c:144
+msgid "Invalid collation character"
+msgstr "非法的收集字符"
+
+#: lib/regcomp.c:147
+msgid "Invalid character class name"
+msgstr "非法的字符类型名"
+
+#: lib/regcomp.c:150
+msgid "Trailing backslash"
+msgstr "尾端的“\\”"
+
+#: lib/regcomp.c:153
+msgid "Invalid back reference"
+msgstr "非法回引用"
+
+#: lib/regcomp.c:156
+#, fuzzy
+msgid "Unmatched [, [^, [:, [., or [="
+msgstr "未匹配的“[”或者“[^”"
+
+#: lib/regcomp.c:159
+msgid "Unmatched ( or \\("
+msgstr "未匹配的“(”或者“\\(”"
+
+#: lib/regcomp.c:162
+msgid "Unmatched \\{"
+msgstr "未匹配的“\\{”"
+
+#: lib/regcomp.c:165
+msgid "Invalid content of \\{\\}"
+msgstr "“\\{\\}”中内容非法"
+
+#: lib/regcomp.c:168
+msgid "Invalid range end"
+msgstr "非法的范围结束"
+
+#: lib/regcomp.c:171
+msgid "Memory exhausted"
+msgstr "内存耗尽"
+
+#: lib/regcomp.c:174
+msgid "Invalid preceding regular expression"
+msgstr "非法的正则表达式头"
+
+#: lib/regcomp.c:177
+msgid "Premature end of regular expression"
+msgstr "正则表达式不完整"
+
+#: lib/regcomp.c:180
+msgid "Regular expression too big"
+msgstr "正则表达式过大"
+
+#: lib/regcomp.c:183
+msgid "Unmatched ) or \\)"
+msgstr "未匹配的“)”或者“\\)”"
+
+#: lib/regcomp.c:687
+msgid "No previous regular expression"
+msgstr "前面没有正则表达式"
+
+#: lib/set-acl.c:46
+#, c-format
+msgid "setting permissions for %s"
+msgstr ""
+
+#: lib/version-etc.c:74
+#, c-format
+msgid "Packaged by %s (%s)\n"
+msgstr ""
+
+#: lib/version-etc.c:77
+#, c-format
+msgid "Packaged by %s\n"
+msgstr ""
+
+#. 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 ""
+
+#: lib/version-etc.c:86
+msgid ""
+"\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"
+msgstr ""
+
+#. TRANSLATORS: %s denotes an author name.
+#: lib/version-etc.c:102
+#, c-format
+msgid "Written by %s.\n"
+msgstr ""
+
+#. TRANSLATORS: Each %s denotes an author name.
+#: lib/version-etc.c:106
+#, c-format
+msgid "Written by %s and %s.\n"
+msgstr ""
+
+#. TRANSLATORS: Each %s denotes an author name.
+#: lib/version-etc.c:110
+#, c-format
+msgid "Written by %s, %s, and %s.\n"
+msgstr ""
+
+#. TRANSLATORS: Each %s denotes an author name.
+#. You can use line breaks, estimating that each author name occupies
+#. ca. 16 screen columns and that a screen line has ca. 80 columns.
+#: lib/version-etc.c:117
+#, c-format
+msgid ""
+"Written by %s, %s, %s,\n"
+"and %s.\n"
+msgstr ""
+
+#. TRANSLATORS: Each %s denotes an author name.
+#. You can use line breaks, estimating that each author name occupies
+#. ca. 16 screen columns and that a screen line has ca. 80 columns.
+#: lib/version-etc.c:124
+#, c-format
+msgid ""
+"Written by %s, %s, %s,\n"
+"%s, and %s.\n"
+msgstr ""
+
+#. TRANSLATORS: Each %s denotes an author name.
+#. You can use line breaks, estimating that each author name occupies
+#. ca. 16 screen columns and that a screen line has ca. 80 columns.
+#: lib/version-etc.c:131
+#, c-format
+msgid ""
+"Written by %s, %s, %s,\n"
+"%s, %s, and %s.\n"
+msgstr ""
+
+#. TRANSLATORS: Each %s denotes an author name.
+#. You can use line breaks, estimating that each author name occupies
+#. ca. 16 screen columns and that a screen line has ca. 80 columns.
+#: lib/version-etc.c:139
+#, c-format
+msgid ""
+"Written by %s, %s, %s,\n"
+"%s, %s, %s, and %s.\n"
+msgstr ""
+
+#. TRANSLATORS: Each %s denotes an author name.
+#. You can use line breaks, estimating that each author name occupies
+#. ca. 16 screen columns and that a screen line has ca. 80 columns.
+#: lib/version-etc.c:147
+#, c-format
+msgid ""
+"Written by %s, %s, %s,\n"
+"%s, %s, %s, %s,\n"
+"and %s.\n"
+msgstr ""
+
+#. TRANSLATORS: Each %s denotes an author name.
+#. You can use line breaks, estimating that each author name occupies
+#. ca. 16 screen columns and that a screen line has ca. 80 columns.
+#: lib/version-etc.c:156
+#, c-format
+msgid ""
+"Written by %s, %s, %s,\n"
+"%s, %s, %s, %s,\n"
+"%s, and %s.\n"
+msgstr ""
+
+#. TRANSLATORS: Each %s denotes an author name.
+#. You can use line breaks, estimating that each author name occupies
+#. ca. 16 screen columns and that a screen line has ca. 80 columns.
+#: lib/version-etc.c:167
+#, c-format
+msgid ""
+"Written by %s, %s, %s,\n"
+"%s, %s, %s, %s,\n"
+"%s, %s, and others.\n"
+msgstr ""
+
+#. TRANSLATORS: The placeholder indicates the bug-reporting address
+#. for this package. Please add _another line_ saying
+#. "Report translation bugs to <...>\n" with the address for translation
+#. bugs (typically your translation team's web or email address).
+#: lib/version-etc.c:245
+#, c-format
+msgid ""
+"\n"
+"Report bugs to: %s\n"
+msgstr ""
+
+#: lib/version-etc.c:247
+#, c-format
+msgid "Report %s bugs to: %s\n"
+msgstr ""
+
+#: lib/version-etc.c:251
+#, c-format
+msgid "%s home page: <%s>\n"
+msgstr ""
+
+#: lib/version-etc.c:253
+#, c-format
+msgid "%s home page: <http://www.gnu.org/software/%s/>\n"
+msgstr ""
+
+#: lib/version-etc.c:256
+msgid "General help using GNU software: <http://www.gnu.org/gethelp/>\n"
+msgstr ""
+
+#: sed/compile.c:146
msgid "multiple `!'s"
msgstr "多个“!”"
-#: sed/compile.c:145
+#: sed/compile.c:147
msgid "unexpected `,'"
msgstr "意外的“,”"
-#: sed/compile.c:146
+#: sed/compile.c:149
msgid "invalid usage of +N or ~N as first address"
msgstr "无法将 +N 或 ~N 作为第一个地址"
-#: sed/compile.c:147
+#: sed/compile.c:150
msgid "unmatched `{'"
msgstr "未匹配的“{”"
-#: sed/compile.c:148
+#: sed/compile.c:151
msgid "unexpected `}'"
msgstr "意外的“}”"
-#: sed/compile.c:149
+#: sed/compile.c:153
msgid "extra characters after command"
msgstr "命令后含有多余的字符"
-#: sed/compile.c:150
+#: sed/compile.c:155
msgid "expected \\ after `a', `c' or `i'"
msgstr "期望在“a”, “c”, “i”之后有“\\”"
-#: sed/compile.c:151
+#: sed/compile.c:157
msgid "`}' doesn't want any addresses"
msgstr "“}”不需要任何地址"
-#: sed/compile.c:152
+#: sed/compile.c:159
msgid ": doesn't want any addresses"
msgstr ": 不需要任何地址"
-#: sed/compile.c:153
+#: sed/compile.c:161
msgid "comments don't accept any addresses"
msgstr "注释不接受任何地址"
-#: sed/compile.c:154
+#: sed/compile.c:162
msgid "missing command"
msgstr "遗漏命令"
-#: sed/compile.c:155
+#: sed/compile.c:163
msgid "command only uses one address"
msgstr "命令只使用一个地址"
-#: sed/compile.c:156
+#: sed/compile.c:164
msgid "unterminated address regex"
msgstr "未终止的地址正则表达式"
-#: sed/compile.c:157
+#: sed/compile.c:165
msgid "unterminated `s' command"
msgstr "未终止的“s”命令"
-#: sed/compile.c:158
+#: sed/compile.c:166
msgid "unterminated `y' command"
msgstr "未终止的“y”命令"
-#: sed/compile.c:159
+#: sed/compile.c:167
msgid "unknown option to `s'"
msgstr "“s”的未知选项"
-#: sed/compile.c:160
+#: sed/compile.c:169
msgid "multiple `p' options to `s' command"
msgstr "多个“s”命令的选项“p”"
-#: sed/compile.c:161
+#: sed/compile.c:171
msgid "multiple `g' options to `s' command"
msgstr "多个“s”命令的选项“g”"
-#: sed/compile.c:162
+#: sed/compile.c:173
msgid "multiple number options to `s' command"
msgstr "多个“s”命令的数值选项"
-#: sed/compile.c:163
+#: sed/compile.c:175
msgid "number option to `s' command may not be zero"
msgstr "“s”命令的数值选项不能为零"
-#: sed/compile.c:164
+#: sed/compile.c:177
msgid "strings for `y' command are different lengths"
msgstr "“y”命令的字符串长度不同"
-#: sed/compile.c:165
+#: sed/compile.c:179
msgid "delimiter character is not a single-byte character"
msgstr "分割符长度不为1"
-#: sed/compile.c:166
+#: sed/compile.c:181
msgid "expected newer version of sed"
msgstr "需要更高版本的sed"
-#: sed/compile.c:167
+#: sed/compile.c:183
msgid "invalid usage of line address 0"
msgstr "非法使用地址0"
-#: sed/compile.c:168
+#: sed/compile.c:184
#, c-format
msgid "unknown command: `%c'"
msgstr "未知的命令:“%c”"
-#: sed/compile.c:169
+#: sed/compile.c:186
#, fuzzy
msgid "incomplete command"
msgstr "遗漏命令"
-#: sed/compile.c:192
+#: sed/compile.c:188
+msgid "\":\" lacks a label"
+msgstr ""
+
+#: sed/compile.c:190
+msgid "recursive escaping after \\c not allowed"
+msgstr ""
+
+#: sed/compile.c:213
#, c-format
msgid "%s: file %s line %lu: %s\n"
msgstr "%s:文件 %s 行号:%lu:%s\n"
-#: sed/compile.c:195
+#: sed/compile.c:216
#, c-format
msgid "%s: -e expression #%lu, char %lu: %s\n"
msgstr "%s:-e 表达式 #%lu,字符 %lu:%s\n"
-#: sed/compile.c:1657
+#: sed/compile.c:1639
#, c-format
msgid "can't find label for jump to `%s'"
msgstr "无法为目的为“%s”的跳转找到标签"
-#: sed/execute.c:595
+#: sed/execute.c:264 sed/execute.c:281
+#, c-format
+msgid "case conversion produced an invalid character"
+msgstr ""
+
+#: sed/execute.c:575
#, c-format
msgid "%s: can't read %s: %s\n"
msgstr "%s:无法读取 %s:%s\n"
-#: sed/execute.c:624
+#: sed/execute.c:600
#, c-format
msgid "couldn't edit %s: is a terminal"
msgstr "无法编辑文件 %s: 这是一个终端"
-#: sed/execute.c:629
+#: sed/execute.c:605
#, c-format
msgid "couldn't edit %s: not a regular file"
msgstr "无法编辑文件 %s: 不是一个普通文件"
-#: sed/execute.c:640
+#: sed/execute.c:616
#, c-format
msgid "%s: warning: failed to set default file creation context to %s: %s"
msgstr ""
-#: sed/execute.c:647
+#: sed/execute.c:624
#, c-format
msgid "%s: warning: failed to get security context of %s: %s"
msgstr ""
-#: sed/execute.c:664 sed/utils.c:211
+#: sed/execute.c:643 sed/utils.c:178
#, c-format
msgid "couldn't open temporary file %s: %s"
msgstr "无法打开临时文件 %s: %s"
-#: sed/execute.c:1193 sed/execute.c:1373
+#: sed/execute.c:1158 sed/execute.c:1368
msgid "error in subprocess"
msgstr "子进程出错"
-#: sed/execute.c:1195
+#: sed/execute.c:1160
msgid "option `e' not supported"
msgstr "不支持选项“e”"
-#: sed/execute.c:1375
+#: sed/execute.c:1349
msgid "`e' command not supported"
msgstr "不支持命令“e”"
-#: sed/execute.c:1725
+#: sed/execute.c:1675
msgid "no input files"
msgstr "没有输入文件"
-#: sed/regexp.c:39
+#: sed/regexp.c:38
msgid "no previous regular expression"
msgstr "前面没有正则表达式"
-#: sed/regexp.c:40
-msgid "cannot specify modifiers on empty regexp"
-msgstr "无法对空正则表达式指定修饰符"
-
-#: sed/regexp.c:129
+#: sed/regexp.c:138
#, c-format
msgid "invalid reference \\%d on `s' command's RHS"
msgstr "“s”命令的RHS非法引用\\%d"
-#: sed/sed.c:32
+#: sed/sed.c:35
msgid "Jay Fenlason"
msgstr ""
-#: sed/sed.c:33
+#: sed/sed.c:36
msgid "Tom Lord"
msgstr ""
-#: sed/sed.c:34
+#: sed/sed.c:37
msgid "Ken Pizzini"
msgstr ""
-#: sed/sed.c:35
+#: sed/sed.c:38
msgid "Paolo Bonzini"
msgstr ""
-#: sed/sed.c:79
+#: 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"
msgstr ""
-#: sed/sed.c:86
-#, fuzzy, c-format
-msgid ""
-"E-mail bug reports to: <%s>.\n"
-"Be sure to include the word ``%s'' somewhere in the ``Subject:'' field.\n"
+#: sed/sed.c:120
+#, c-format
+msgid "E-mail bug reports to: <%s>.\n"
msgstr ""
-"将错误报告通过电子邮件发送到:%s .\n"
-"请务必将单词“%s”放在标题的某处。\n"
-#: sed/sed.c:99
+#: sed/sed.c:129
msgid ""
" -R, --regexp-perl\n"
" use Perl 5's regular expressions syntax in the script.\n"
@@ -237,7 +617,7 @@ msgstr ""
" -R, --regexp-perl\n"
" 使用 Perl 5 的正则表达式语法\n"
-#: sed/sed.c:104
+#: sed/sed.c:134
#, c-format
msgid ""
"Usage: %s [OPTION]... {script-only-if-no-other-script} [input-file]...\n"
@@ -246,7 +626,7 @@ msgstr ""
"用法: %s [选项]... {脚本(如果没有其他脚本)} [输入文件]...\n"
"\n"
-#: sed/sed.c:108
+#: sed/sed.c:138
#, c-format
msgid ""
" -n, --quiet, --silent\n"
@@ -255,7 +635,7 @@ msgstr ""
" -n, --quiet, --silent\n"
" 取消自动打印模式空间\n"
-#: sed/sed.c:110
+#: sed/sed.c:140
#, c-format
msgid ""
" -e script, --expression=script\n"
@@ -264,7 +644,7 @@ msgstr ""
" -e 脚本, --expression=脚本\n"
" 添加“脚本”到程序的运行列表\n"
-#: sed/sed.c:112
+#: sed/sed.c:142
#, c-format
msgid ""
" -f script-file, --file=script-file\n"
@@ -274,7 +654,7 @@ msgstr ""
" -f 脚本文件, --file=脚本文件\n"
" 添加“脚本文件”到程序的运行列表\n"
-#: sed/sed.c:115
+#: sed/sed.c:146
#, c-format
msgid ""
" --follow-symlinks\n"
@@ -283,7 +663,7 @@ msgstr ""
" --follow-symlinks\n"
" 直接修改文件时跟随软链接\n"
-#: sed/sed.c:118
+#: sed/sed.c:149
#, fuzzy, c-format
msgid ""
" -i[SUFFIX], --in-place[=SUFFIX]\n"
@@ -292,7 +672,7 @@ msgstr ""
" -i[扩展名], --in-place[=扩展名]\n"
" 直接修改文件(如果指定扩展名就备份文件)\n"
-#: sed/sed.c:121
+#: sed/sed.c:153
#, c-format
msgid ""
" -b, --binary\n"
@@ -302,7 +682,7 @@ msgstr ""
" -b, --binary\n"
" 以二进制方式打开文件 (回车加换行不做特殊处理)\n"
-#: sed/sed.c:124
+#: sed/sed.c:157
#, c-format
msgid ""
" -l N, --line-length=N\n"
@@ -311,7 +691,7 @@ msgstr ""
" -l N, --line-length=N\n"
" 指定“l”命令的换行期望长度\n"
-#: sed/sed.c:126
+#: sed/sed.c:159
#, c-format
msgid ""
" --posix\n"
@@ -320,27 +700,34 @@ msgstr ""
" --posix\n"
" 关闭所有 GNU 扩展\n"
-#: sed/sed.c:128
-#, c-format
+#: sed/sed.c:161
+#, fuzzy, c-format
msgid ""
-" -r, --regexp-extended\n"
-" use extended regular expressions in the script.\n"
+" -E, -r, --regexp-extended\n"
+" use extended regular expressions in the script\n"
+" (for portability use POSIX -E).\n"
msgstr ""
" -r, --regexp-extended\n"
" 在脚本中使用扩展正则表达式\n"
-#: sed/sed.c:133
-#, c-format
+#: sed/sed.c:167
+#, fuzzy, c-format
msgid ""
" -s, --separate\n"
-" consider files as separate rather than as a single "
-"continuous\n"
-" long stream.\n"
+" consider files as separate rather than as a single,\n"
+" continuous long stream.\n"
msgstr ""
" -s, --separate\n"
" 将输入文件视为各个独立的文件而不是一个长的连续输入\n"
-#: sed/sed.c:136
+#: sed/sed.c:170
+#, c-format
+msgid ""
+" --sandbox\n"
+" operate in sandbox mode.\n"
+msgstr ""
+
+#: sed/sed.c:172
#, c-format
msgid ""
" -u, --unbuffered\n"
@@ -351,24 +738,24 @@ msgstr ""
" -u, --unbuffered\n"
" 从输入文件读取最少的数据,更频繁的刷新输出\n"
-#: sed/sed.c:139
+#: sed/sed.c:175
#, c-format
msgid ""
" -z, --null-data\n"
" separate lines by NUL characters\n"
msgstr ""
-#: sed/sed.c:141
+#: sed/sed.c:177
#, c-format
msgid " --help display this help and exit\n"
msgstr " --help 打印帮助并退出\n"
-#: sed/sed.c:142
+#: sed/sed.c:178
#, c-format
msgid " --version output version information and exit\n"
msgstr " --version 输出版本信息并退出\n"
-#: sed/sed.c:143
+#: sed/sed.c:179
#, c-format
msgid ""
"\n"
@@ -383,118 +770,56 @@ msgstr ""
"sed脚本。其他非选项参数被视为输入文件,如果没有输入文件,那么程序将从标准\n"
"输入读取数据。\n"
-#: sed/utils.c:74 sed/utils.c:432
+#: sed/utils.c:73 sed/utils.c:384
#, c-format
msgid "cannot remove %s: %s"
msgstr "无法移除 %s:%s"
-#: sed/utils.c:144
+#: sed/utils.c:136
#, c-format
msgid "couldn't open file %s: %s"
msgstr "无法打开文件 %s: %s"
-#: sed/utils.c:167
+#: sed/utils.c:155
#, c-format
msgid "couldn't attach to %s: %s"
msgstr "无法绑定 %s: %s"
-#: sed/utils.c:229
-#, c-format
-msgid "couldn't write %d item to %s: %s"
-msgid_plural "couldn't write %d items to %s: %s"
+#: sed/utils.c:192
+#, fuzzy, c-format
+msgid "couldn't write %llu item to %s: %s"
+msgid_plural "couldn't write %llu items to %s: %s"
msgstr[0] "无法将 %d 个项目写入 %s:%s"
-#: sed/utils.c:244 sed/utils.c:267
+#: sed/utils.c:204 sed/utils.c:223
#, c-format
msgid "read error on %s: %s"
msgstr "读取 %s 出错:%s"
-#: sed/utils.c:372
+#: sed/utils.c:325
#, c-format
msgid "couldn't follow symlink %s: %s"
msgstr "无法跟随软链接 %s: %s"
-#: sed/utils.c:406
+#: sed/utils.c:359
#, c-format
msgid "cannot stat %s: %s"
msgstr "无法获取 %s 的状态: %s"
-#: sed/utils.c:437
+#: sed/utils.c:389
#, c-format
msgid "cannot rename %s: %s"
msgstr "无法重命名 %s:%s"
-#: lib/regcomp.c:132
-msgid "Success"
-msgstr "成功"
-
-#: lib/regcomp.c:135
-msgid "No match"
-msgstr "没有匹配项"
+#~ msgid "cannot specify modifiers on empty regexp"
+#~ msgstr "无法对空正则表达式指定修饰符"
-#: lib/regcomp.c:138
-msgid "Invalid regular expression"
-msgstr "非法的正则表达式"
-
-#: lib/regcomp.c:141
-msgid "Invalid collation character"
-msgstr "非法的收集字符"
-
-#: lib/regcomp.c:144
-msgid "Invalid character class name"
-msgstr "非法的字符类型名"
-
-#: lib/regcomp.c:147
-msgid "Trailing backslash"
-msgstr "尾端的“\\”"
-
-#: lib/regcomp.c:150
-msgid "Invalid back reference"
-msgstr "非法回引用"
-
-#: lib/regcomp.c:153
-msgid "Unmatched [ or [^"
-msgstr "未匹配的“[”或者“[^”"
-
-#: lib/regcomp.c:156
-msgid "Unmatched ( or \\("
-msgstr "未匹配的“(”或者“\\(”"
-
-#: lib/regcomp.c:159
-msgid "Unmatched \\{"
-msgstr "未匹配的“\\{”"
-
-#: lib/regcomp.c:162
-msgid "Invalid content of \\{\\}"
-msgstr "“\\{\\}”中内容非法"
-
-#: lib/regcomp.c:165
-msgid "Invalid range end"
-msgstr "非法的范围结束"
-
-#: lib/regcomp.c:168
-msgid "Memory exhausted"
-msgstr "内存耗尽"
-
-#: lib/regcomp.c:171
-msgid "Invalid preceding regular expression"
-msgstr "非法的正则表达式头"
-
-#: lib/regcomp.c:174
-msgid "Premature end of regular expression"
-msgstr "正则表达式不完整"
-
-#: lib/regcomp.c:177
-msgid "Regular expression too big"
-msgstr "正则表达式过大"
-
-#: lib/regcomp.c:180
-msgid "Unmatched ) or \\)"
-msgstr "未匹配的“)”或者“\\)”"
-
-#: lib/regcomp.c:705
-msgid "No previous regular expression"
-msgstr "前面没有正则表达式"
+#~ msgid ""
+#~ "E-mail bug reports to: %s .\n"
+#~ "Be sure to include the word ``%s'' somewhere in the ``Subject:'' field.\n"
+#~ msgstr ""
+#~ "将错误报告通过电子邮件发送到:%s .\n"
+#~ "请务必将单词“%s”放在标题的某处。\n"
#~ msgid "super-sed version %s\n"
#~ msgstr "超级-sed 版本 %s\n"
diff --git a/po/zh_TW.gmo b/po/zh_TW.gmo
index 5c57952..c8842fb 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 8539cf4..0cdc378 100644
--- a/po/zh_TW.po
+++ b/po/zh_TW.po
@@ -1,235 +1,621 @@
-# Traditional Chinese Messages for the sed
+# Traditional Chinese Messages for the sed.
# Copyright (C) 2002, 05 Free Software Foundation, Inc.
-# Wang Li <charles@linux.net.cn>, 2002
-# Wei-Lun Chao <chaoweilun@pcmail.com.tw>, 2005
+# This file is distributed under the same license as the sed package.
+# Wang Li <charles@linux.net.cn>, 2002.
+# Wei-Lun Chao <bluebat@member.fsf.org>, 2005, 2013.
#
msgid ""
msgstr ""
-"Project-Id-Version: sed 4.1.4\n"
+"Project-Id-Version: sed 4.2.1\n"
"Report-Msgid-Bugs-To: bug-gnu-utils@gnu.org\n"
-"POT-Creation-Date: 2012-12-22 14:36+0100\n"
-"PO-Revision-Date: 2005-04-20 09:37+0800\n"
-"Last-Translator: Wei-Lun Chao <chaoweilun@pcmail.com.tw>\n"
+"POT-Creation-Date: 2016-12-30 00:59-0800\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"
"Language: zh_TW\n"
"MIME-Version: 1.0\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=1; plural=0;\n"
-#: sed/compile.c:144
+#: lib/closeout.c:112
+msgid "write error"
+msgstr ""
+
+#: lib/copy-acl.c:54
+#, c-format
+msgid "preserving permissions for %s"
+msgstr ""
+
+#: lib/dfa.c:1025 lib/dfa.c:1028 lib/dfa.c:1047 lib/dfa.c:1057 lib/dfa.c:1070
+#: lib/dfa.c:1098 lib/dfa.c:1107 lib/dfa.c:1110 lib/dfa.c:1115 lib/dfa.c:1137
+#: lib/dfa.c:1140
+msgid "unbalanced ["
+msgstr ""
+
+#: lib/dfa.c:1083
+#, fuzzy
+msgid "invalid character class"
+msgstr "不正確的字元等級名稱"
+
+#: lib/dfa.c:1206
+msgid "character class syntax is [[:space:]], not [:space:]"
+msgstr ""
+
+#: lib/dfa.c:1275
+msgid "unfinished \\ escape"
+msgstr ""
+
+#: lib/dfa.c:1436
+#, fuzzy
+msgid "invalid content of \\{\\}"
+msgstr "不正確的「\\{\\}」內容"
+
+#: lib/dfa.c:1439
+#, fuzzy
+msgid "regular expression too big"
+msgstr "正規表示式太大"
+
+#: lib/dfa.c:1853
+msgid "unbalanced ("
+msgstr ""
+
+#: lib/dfa.c:1980
+msgid "no syntax specified"
+msgstr ""
+
+#: lib/dfa.c:1988
+msgid "unbalanced )"
+msgstr ""
+
+#: lib/error.c:191
+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 ""
+
+#: lib/getopt.c:654 lib/getopt.c:658
+#, c-format
+msgid "%s: option '--%s' doesn't allow an argument\n"
+msgstr ""
+
+#: 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:715 lib/getopt.c:734
+#, c-format
+msgid "%s: option '--%s' requires an argument\n"
+msgstr ""
+
+#: 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
+#, 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
+#, 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 "記憶體耗盡"
+
+#. TRANSLATORS:
+#. Get translations for open and closing quotation marks.
+#. The message catalog should translate "`" to a left
+#. quotation mark suitable for the locale, and similarly for
+#. "'". For example, a French Unicode local should translate
+#. these to U+00AB (LEFT-POINTING DOUBLE ANGLE
+#. QUOTATION MARK), and U+00BB (RIGHT-POINTING DOUBLE ANGLE
+#. QUOTATION MARK), respectively.
+#.
+#. If the catalog has no translation, we will try to
+#. use Unicode U+2018 (LEFT SINGLE QUOTATION MARK) and
+#. Unicode U+2019 (RIGHT SINGLE QUOTATION MARK). If the
+#. current locale is not Unicode, locale_quoting_style
+#. will quote 'like this', and clocale_quoting_style will
+#. quote "like this". You should always include translations
+#. for "`" and "'" even if U+2018 and U+2019 are appropriate
+#. for your locale.
+#.
+#. If you don't know what to put here, please see
+#. <http://en.wikipedia.org/wiki/Quotation_marks_in_other_languages>
+#. and use glyphs suitable for your language.
+#: lib/quotearg.c:354
+msgid "`"
+msgstr ""
+
+#: lib/quotearg.c:355
+msgid "'"
+msgstr ""
+
+#: lib/regcomp.c:135
+msgid "Success"
+msgstr "成功"
+
+#: lib/regcomp.c:138
+msgid "No match"
+msgstr "沒有符合者"
+
+#: lib/regcomp.c:141
+msgid "Invalid regular expression"
+msgstr "不正確的正規表示式"
+
+#: lib/regcomp.c:144
+msgid "Invalid collation character"
+msgstr "不正確的核對字元"
+
+#: lib/regcomp.c:147
+msgid "Invalid character class name"
+msgstr "不正確的字元等級名稱"
+
+#: lib/regcomp.c:150
+msgid "Trailing backslash"
+msgstr "末端有倒斜線"
+
+#: lib/regcomp.c:153
+msgid "Invalid back reference"
+msgstr "不正確的返回參考"
+
+#: lib/regcomp.c:156
+#, fuzzy
+msgid "Unmatched [, [^, [:, [., or [="
+msgstr "未匹配的「[」或「[^」"
+
+#: lib/regcomp.c:159
+msgid "Unmatched ( or \\("
+msgstr "未匹配的「(」或「\\」"
+
+#: lib/regcomp.c:162
+msgid "Unmatched \\{"
+msgstr "未匹配的「\\{」"
+
+#: lib/regcomp.c:165
+msgid "Invalid content of \\{\\}"
+msgstr "不正確的「\\{\\}」內容"
+
+#: lib/regcomp.c:168
+msgid "Invalid range end"
+msgstr "不正確的範圍結束"
+
+#: lib/regcomp.c:171
+msgid "Memory exhausted"
+msgstr "記憶體耗盡"
+
+#: lib/regcomp.c:174
+msgid "Invalid preceding regular expression"
+msgstr "不正確的前導正規表示式"
+
+#: lib/regcomp.c:177
+msgid "Premature end of regular expression"
+msgstr "正規表示式的過早結束"
+
+#: lib/regcomp.c:180
+msgid "Regular expression too big"
+msgstr "正規表示式太大"
+
+#: lib/regcomp.c:183
+msgid "Unmatched ) or \\)"
+msgstr "未匹配的「)」或「\\」"
+
+#: lib/regcomp.c:687
+msgid "No previous regular expression"
+msgstr "沒有先前的正規表示式"
+
+#: lib/set-acl.c:46
+#, c-format
+msgid "setting permissions for %s"
+msgstr ""
+
+#: lib/version-etc.c:74
+#, c-format
+msgid "Packaged by %s (%s)\n"
+msgstr ""
+
+#: lib/version-etc.c:77
+#, c-format
+msgid "Packaged by %s\n"
+msgstr ""
+
+#. 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 ""
+
+#: lib/version-etc.c:86
+msgid ""
+"\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"
+msgstr ""
+
+#. TRANSLATORS: %s denotes an author name.
+#: lib/version-etc.c:102
+#, c-format
+msgid "Written by %s.\n"
+msgstr ""
+
+#. TRANSLATORS: Each %s denotes an author name.
+#: lib/version-etc.c:106
+#, c-format
+msgid "Written by %s and %s.\n"
+msgstr ""
+
+#. TRANSLATORS: Each %s denotes an author name.
+#: lib/version-etc.c:110
+#, c-format
+msgid "Written by %s, %s, and %s.\n"
+msgstr ""
+
+#. TRANSLATORS: Each %s denotes an author name.
+#. You can use line breaks, estimating that each author name occupies
+#. ca. 16 screen columns and that a screen line has ca. 80 columns.
+#: lib/version-etc.c:117
+#, c-format
+msgid ""
+"Written by %s, %s, %s,\n"
+"and %s.\n"
+msgstr ""
+
+#. TRANSLATORS: Each %s denotes an author name.
+#. You can use line breaks, estimating that each author name occupies
+#. ca. 16 screen columns and that a screen line has ca. 80 columns.
+#: lib/version-etc.c:124
+#, c-format
+msgid ""
+"Written by %s, %s, %s,\n"
+"%s, and %s.\n"
+msgstr ""
+
+#. TRANSLATORS: Each %s denotes an author name.
+#. You can use line breaks, estimating that each author name occupies
+#. ca. 16 screen columns and that a screen line has ca. 80 columns.
+#: lib/version-etc.c:131
+#, c-format
+msgid ""
+"Written by %s, %s, %s,\n"
+"%s, %s, and %s.\n"
+msgstr ""
+
+#. TRANSLATORS: Each %s denotes an author name.
+#. You can use line breaks, estimating that each author name occupies
+#. ca. 16 screen columns and that a screen line has ca. 80 columns.
+#: lib/version-etc.c:139
+#, c-format
+msgid ""
+"Written by %s, %s, %s,\n"
+"%s, %s, %s, and %s.\n"
+msgstr ""
+
+#. TRANSLATORS: Each %s denotes an author name.
+#. You can use line breaks, estimating that each author name occupies
+#. ca. 16 screen columns and that a screen line has ca. 80 columns.
+#: lib/version-etc.c:147
+#, c-format
+msgid ""
+"Written by %s, %s, %s,\n"
+"%s, %s, %s, %s,\n"
+"and %s.\n"
+msgstr ""
+
+#. TRANSLATORS: Each %s denotes an author name.
+#. You can use line breaks, estimating that each author name occupies
+#. ca. 16 screen columns and that a screen line has ca. 80 columns.
+#: lib/version-etc.c:156
+#, c-format
+msgid ""
+"Written by %s, %s, %s,\n"
+"%s, %s, %s, %s,\n"
+"%s, and %s.\n"
+msgstr ""
+
+#. TRANSLATORS: Each %s denotes an author name.
+#. You can use line breaks, estimating that each author name occupies
+#. ca. 16 screen columns and that a screen line has ca. 80 columns.
+#: lib/version-etc.c:167
+#, c-format
+msgid ""
+"Written by %s, %s, %s,\n"
+"%s, %s, %s, %s,\n"
+"%s, %s, and others.\n"
+msgstr ""
+
+#. TRANSLATORS: The placeholder indicates the bug-reporting address
+#. for this package. Please add _another line_ saying
+#. "Report translation bugs to <...>\n" with the address for translation
+#. bugs (typically your translation team's web or email address).
+#: lib/version-etc.c:245
+#, c-format
+msgid ""
+"\n"
+"Report bugs to: %s\n"
+msgstr ""
+
+#: lib/version-etc.c:247
+#, c-format
+msgid "Report %s bugs to: %s\n"
+msgstr ""
+
+#: lib/version-etc.c:251
+#, c-format
+msgid "%s home page: <%s>\n"
+msgstr ""
+
+#: lib/version-etc.c:253
+#, c-format
+msgid "%s home page: <http://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"
+msgstr ""
+"GNU sed 首頁:<http://www.gnu.org/software/sed/>。\n"
+"使用 GNU 軟體的一般說明:<http://www.gnu.org/gethelp/>。\n"
+
+#: sed/compile.c:146
msgid "multiple `!'s"
msgstr "多個「!」"
-#: sed/compile.c:145
+#: sed/compile.c:147
msgid "unexpected `,'"
msgstr "未預期的「,」"
-#: sed/compile.c:146
+#: sed/compile.c:149
msgid "invalid usage of +N or ~N as first address"
msgstr "無法將 +N 或 ~N 作為第一個位址"
-#: sed/compile.c:147
+#: sed/compile.c:150
msgid "unmatched `{'"
msgstr "未匹配的「{」"
-#: sed/compile.c:148
+#: sed/compile.c:151
msgid "unexpected `}'"
msgstr "未預期的「}」"
-#: sed/compile.c:149
+#: sed/compile.c:153
msgid "extra characters after command"
msgstr "命令後含有多餘的字元"
-#: sed/compile.c:150
+#: sed/compile.c:155
msgid "expected \\ after `a', `c' or `i'"
msgstr "預期在「a」、「c」或「i」之後出現 \\"
-#: sed/compile.c:151
+#: sed/compile.c:157
msgid "`}' doesn't want any addresses"
msgstr "「}」不需要任何位址"
-#: sed/compile.c:152
+#: sed/compile.c:159
msgid ": doesn't want any addresses"
msgstr ": 不需要任何位址"
-#: sed/compile.c:153
+#: sed/compile.c:161
msgid "comments don't accept any addresses"
msgstr "備註不接受任何位址"
-#: sed/compile.c:154
+#: sed/compile.c:162
msgid "missing command"
msgstr "遺漏命令"
-#: sed/compile.c:155
+#: sed/compile.c:163
msgid "command only uses one address"
msgstr "命令只使用一個位址"
-#: sed/compile.c:156
+#: sed/compile.c:164
msgid "unterminated address regex"
msgstr "未結束的位址正規表示式"
-#: sed/compile.c:157
+#: sed/compile.c:165
msgid "unterminated `s' command"
msgstr "未結束的「s」命令"
-#: sed/compile.c:158
+#: sed/compile.c:166
msgid "unterminated `y' command"
msgstr "未結束的「y」命令"
-#: sed/compile.c:159
+#: sed/compile.c:167
msgid "unknown option to `s'"
msgstr "「s」的未知選項"
-#: sed/compile.c:160
+#: sed/compile.c:169
msgid "multiple `p' options to `s' command"
msgstr "多個「s」命令的選項「p」"
-#: sed/compile.c:161
+#: sed/compile.c:171
msgid "multiple `g' options to `s' command"
msgstr "多個「s」命令的選項「g」"
-#: sed/compile.c:162
+#: sed/compile.c:173
msgid "multiple number options to `s' command"
msgstr "多個「s」命令的數值選項"
-#: sed/compile.c:163
+#: sed/compile.c:175
msgid "number option to `s' command may not be zero"
msgstr "「s」命令的數值選項不能為零"
-#: sed/compile.c:164
+#: sed/compile.c:177
msgid "strings for `y' command are different lengths"
msgstr "y 命令的字串長度不同"
-#: sed/compile.c:165
+#: sed/compile.c:179
msgid "delimiter character is not a single-byte character"
msgstr "分隔字元不是單一位元字元"
-#: sed/compile.c:166
+#: sed/compile.c:181
msgid "expected newer version of sed"
msgstr "預期使用新版的 sed"
-#: sed/compile.c:167
+#: sed/compile.c:183
msgid "invalid usage of line address 0"
msgstr "非法使用位址第 0 列"
-#: sed/compile.c:168
+#: sed/compile.c:184
#, c-format
msgid "unknown command: `%c'"
msgstr "未知的命令: 「%c」"
-#: sed/compile.c:169
+#: sed/compile.c:186
#, fuzzy
msgid "incomplete command"
msgstr "遺漏命令"
-#: sed/compile.c:192
+#: sed/compile.c:188
+msgid "\":\" lacks a label"
+msgstr ""
+
+#: sed/compile.c:190
+msgid "recursive escaping after \\c not allowed"
+msgstr ""
+
+#: sed/compile.c:213
#, c-format
msgid "%s: file %s line %lu: %s\n"
-msgstr "%s: 檔案 %s 行號: %lu: %s\n"
+msgstr "%s: 檔案 %s 列號: %lu: %s\n"
-#: sed/compile.c:195
+#: sed/compile.c:216
#, c-format
msgid "%s: -e expression #%lu, char %lu: %s\n"
msgstr "%s: -e 表示式 #%lu,字元 %lu: %s\n"
-#: sed/compile.c:1657
+#: sed/compile.c:1639
#, c-format
msgid "can't find label for jump to `%s'"
msgstr "無法為目的是「%s」的跳移找到標籤"
-#: sed/execute.c:595
+#: sed/execute.c:264 sed/execute.c:281
+#, c-format
+msgid "case conversion produced an invalid character"
+msgstr ""
+
+#: sed/execute.c:575
#, c-format
msgid "%s: can't read %s: %s\n"
msgstr "%s: 無法讀取 %s: %s\n"
-#: sed/execute.c:624
+#: sed/execute.c:600
#, c-format
msgid "couldn't edit %s: is a terminal"
msgstr "無法編輯 %s: 是一個終端機"
-#: sed/execute.c:629
+#: sed/execute.c:605
#, c-format
msgid "couldn't edit %s: not a regular file"
msgstr "無法編輯 %s: 不是一個正常檔案"
-#: sed/execute.c:640
+#: sed/execute.c:616
#, c-format
msgid "%s: warning: failed to set default file creation context to %s: %s"
-msgstr ""
+msgstr "%s:警告:無法設定 %s:%s 的預設檔案建立語境"
-#: sed/execute.c:647
+#: sed/execute.c:624
#, c-format
msgid "%s: warning: failed to get security context of %s: %s"
-msgstr ""
+msgstr "%s:警告:無法提取 %s:%s 的安全語境"
-#: sed/execute.c:664 sed/utils.c:211
+#: sed/execute.c:643 sed/utils.c:178
#, c-format
msgid "couldn't open temporary file %s: %s"
msgstr "無法打開暫存檔案 %s: %s"
-#: sed/execute.c:1193 sed/execute.c:1373
+#: sed/execute.c:1158 sed/execute.c:1368
msgid "error in subprocess"
msgstr "錯誤發生於副行程中"
-#: sed/execute.c:1195
+#: sed/execute.c:1160
msgid "option `e' not supported"
msgstr "不支援選項「e」"
-#: sed/execute.c:1375
+#: sed/execute.c:1349
msgid "`e' command not supported"
msgstr "不支援命令「e」"
-#: sed/execute.c:1725
+#: sed/execute.c:1675
msgid "no input files"
-msgstr ""
+msgstr "沒有輸入檔案"
-#: sed/regexp.c:39
+#: sed/regexp.c:38
msgid "no previous regular expression"
msgstr "不存在之前的正規表示式"
-#: sed/regexp.c:40
-msgid "cannot specify modifiers on empty regexp"
-msgstr "無法指定修飾字元給空的正規表示式"
-
-#: sed/regexp.c:129
+#: sed/regexp.c:138
#, c-format
msgid "invalid reference \\%d on `s' command's RHS"
msgstr "「s」命令的 RHS 上不正確的參考值 \\%d"
-#: sed/sed.c:32
+#: sed/sed.c:35
msgid "Jay Fenlason"
msgstr ""
-#: sed/sed.c:33
+#: sed/sed.c:36
msgid "Tom Lord"
msgstr ""
-#: sed/sed.c:34
+#: sed/sed.c:37
msgid "Ken Pizzini"
msgstr ""
-#: sed/sed.c:35
+#: sed/sed.c:38
msgid "Paolo Bonzini"
msgstr ""
-#: sed/sed.c:79
+#: 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"
msgstr ""
+"GNU sed 首頁:<http://www.gnu.org/software/sed/>。\n"
+"使用 GNU 軟體的一般說明:<http://www.gnu.org/gethelp/>。\n"
-#: sed/sed.c:86
-#, fuzzy, c-format
-msgid ""
-"E-mail bug reports to: <%s>.\n"
-"Be sure to include the word ``%s'' somewhere in the ``Subject:'' field.\n"
+#: sed/sed.c:120
+#, c-format
+msgid "E-mail bug reports to: <%s>.\n"
msgstr ""
-"將錯誤報告經由電子郵件發送到: %s 。\n"
-"請確定將單字「%s」放在「Subject:」欄的某處。\n"
-#: sed/sed.c:99
+#: sed/sed.c:129
msgid ""
" -R, --regexp-perl\n"
" use Perl 5's regular expressions syntax in the script.\n"
@@ -237,7 +623,7 @@ msgstr ""
" -R, --regexp-perl\n"
" 在命令稿中使用 Perl 5 的正規表示式語法。\n"
-#: sed/sed.c:104
+#: sed/sed.c:134
#, c-format
msgid ""
"Usage: %s [OPTION]... {script-only-if-no-other-script} [input-file]...\n"
@@ -246,7 +632,7 @@ msgstr ""
"用法: %s [選項]... {若無其他命令稿則只能放命令稿} [輸入檔]...\n"
"\n"
-#: sed/sed.c:108
+#: sed/sed.c:138
#, c-format
msgid ""
" -n, --quiet, --silent\n"
@@ -255,7 +641,7 @@ msgstr ""
" -n, --quiet, --silent\n"
" 抑止樣版空間的自動顯示\n"
-#: sed/sed.c:110
+#: sed/sed.c:140
#, c-format
msgid ""
" -e script, --expression=script\n"
@@ -264,7 +650,7 @@ msgstr ""
" -e 命令稿, --expression=命令稿\n"
" 加入命令稿做為執行的命令\n"
-#: sed/sed.c:112
+#: sed/sed.c:142
#, c-format
msgid ""
" -f script-file, --file=script-file\n"
@@ -274,14 +660,16 @@ msgstr ""
" -f 命令稿檔案, --file=命令稿檔案\n"
" 加入命令稿檔案內容做為執行的命令\n"
-#: sed/sed.c:115
+#: sed/sed.c:146
#, c-format
msgid ""
" --follow-symlinks\n"
" follow symlinks when processing in place\n"
msgstr ""
+" --follow-symlinks\n"
+" 就地處理時追隨符號連結\n"
-#: sed/sed.c:118
+#: sed/sed.c:149
#, fuzzy, c-format
msgid ""
" -i[SUFFIX], --in-place[=SUFFIX]\n"
@@ -290,15 +678,17 @@ msgstr ""
" -i[副檔名], --in-place[=副檔名]\n"
" 直接編輯檔案 (若提供副檔名則會產生備份)\n"
-#: sed/sed.c:121
+#: sed/sed.c:153
#, c-format
msgid ""
" -b, --binary\n"
" open files in binary mode (CR+LFs are not processed "
"specially)\n"
msgstr ""
+" -b, --binary\n"
+" 以二進位模式開啟檔案 (並未特殊處理 CR+LF)\n"
-#: sed/sed.c:124
+#: sed/sed.c:157
#, c-format
msgid ""
" -l N, --line-length=N\n"
@@ -307,7 +697,7 @@ msgstr ""
" -l N, --line-length=N\n"
" 指定使用「l」命令時想要的換列長度\n"
-#: sed/sed.c:126
+#: sed/sed.c:159
#, c-format
msgid ""
" --posix\n"
@@ -316,27 +706,34 @@ msgstr ""
" --posix\n"
" 停用所有 GNU 擴充功能。\n"
-#: sed/sed.c:128
-#, c-format
+#: sed/sed.c:161
+#, fuzzy, c-format
msgid ""
-" -r, --regexp-extended\n"
-" use extended regular expressions in the script.\n"
+" -E, -r, --regexp-extended\n"
+" use extended regular expressions in the script\n"
+" (for portability use POSIX -E).\n"
msgstr ""
" -r, --regexp-extended\n"
" 在命令稿中使用擴充的正規表示式。\n"
-#: sed/sed.c:133
-#, c-format
+#: sed/sed.c:167
+#, fuzzy, c-format
msgid ""
" -s, --separate\n"
-" consider files as separate rather than as a single "
-"continuous\n"
-" long stream.\n"
+" consider files as separate rather than as a single,\n"
+" continuous long stream.\n"
msgstr ""
" -s, --separate\n"
" 將檔案視為各自分離而非單一連續的長字串。\n"
-#: sed/sed.c:136
+#: sed/sed.c:170
+#, c-format
+msgid ""
+" --sandbox\n"
+" operate in sandbox mode.\n"
+msgstr ""
+
+#: sed/sed.c:172
#, c-format
msgid ""
" -u, --unbuffered\n"
@@ -347,24 +744,24 @@ msgstr ""
" -u, --unbuffered\n"
" 從輸入檔中讀取最少量的資料並更常清空輸出緩衝區\n"
-#: sed/sed.c:139
+#: sed/sed.c:175
#, c-format
msgid ""
" -z, --null-data\n"
" separate lines by NUL characters\n"
msgstr ""
-#: sed/sed.c:141
+#: sed/sed.c:177
#, c-format
msgid " --help display this help and exit\n"
msgstr " --help 顯示本輔助訊息並離開\n"
-#: sed/sed.c:142
+#: sed/sed.c:178
#, c-format
msgid " --version output version information and exit\n"
msgstr " --version 輸出版本資訊並離開\n"
-#: sed/sed.c:143
+#: sed/sed.c:179
#, c-format
msgid ""
"\n"
@@ -380,118 +777,56 @@ msgstr ""
"假如未指定輸入檔,就會從標準輸入來讀取。\n"
"\n"
-#: sed/utils.c:74 sed/utils.c:432
+#: sed/utils.c:73 sed/utils.c:384
#, c-format
msgid "cannot remove %s: %s"
msgstr "無法移除 %s: %s"
-#: sed/utils.c:144
+#: sed/utils.c:136
#, c-format
msgid "couldn't open file %s: %s"
msgstr "無法打開檔案 %s: %s"
-#: sed/utils.c:167
-#, fuzzy, c-format
+#: sed/utils.c:155
+#, c-format
msgid "couldn't attach to %s: %s"
-msgstr "無法將 %d 個項目寫入 %s: %s"
+msgstr "無法附加到 %s:%s"
-#: sed/utils.c:229
-#, c-format
-msgid "couldn't write %d item to %s: %s"
-msgid_plural "couldn't write %d items to %s: %s"
+#: sed/utils.c:192
+#, fuzzy, c-format
+msgid "couldn't write %llu item to %s: %s"
+msgid_plural "couldn't write %llu items to %s: %s"
msgstr[0] "無法將 %d 個項目寫入 %s: %s"
-#: sed/utils.c:244 sed/utils.c:267
+#: sed/utils.c:204 sed/utils.c:223
#, c-format
msgid "read error on %s: %s"
-msgstr "讀取 %s 出錯: %s"
+msgstr "讀取 %s 時出錯: %s"
-#: sed/utils.c:372
-#, fuzzy, c-format
+#: sed/utils.c:325
+#, c-format
msgid "couldn't follow symlink %s: %s"
-msgstr "無法打開檔案 %s: %s"
+msgstr "無法追隨符號連結 %s:%s"
-#: sed/utils.c:406
-#, fuzzy, c-format
+#: sed/utils.c:359
+#, c-format
msgid "cannot stat %s: %s"
-msgstr "無法更改名稱 %s: %s"
+msgstr "無法取得狀態 %s:%s"
-#: sed/utils.c:437
+#: sed/utils.c:389
#, c-format
msgid "cannot rename %s: %s"
msgstr "無法更改名稱 %s: %s"
-#: lib/regcomp.c:132
-msgid "Success"
-msgstr "成功"
-
-#: lib/regcomp.c:135
-msgid "No match"
-msgstr "沒有符合者"
-
-#: lib/regcomp.c:138
-msgid "Invalid regular expression"
-msgstr "不正確的正規表示式"
-
-#: lib/regcomp.c:141
-msgid "Invalid collation character"
-msgstr "不正確的核對字元"
-
-#: lib/regcomp.c:144
-msgid "Invalid character class name"
-msgstr "不正確的字元等級名稱"
-
-#: lib/regcomp.c:147
-msgid "Trailing backslash"
-msgstr "末端有倒斜線"
-
-#: lib/regcomp.c:150
-msgid "Invalid back reference"
-msgstr "不正確的返回參考"
-
-#: lib/regcomp.c:153
-msgid "Unmatched [ or [^"
-msgstr "未匹配的「[」或「[^」"
-
-#: lib/regcomp.c:156
-msgid "Unmatched ( or \\("
-msgstr "未匹配的「(」或「\\」"
-
-#: lib/regcomp.c:159
-msgid "Unmatched \\{"
-msgstr "未匹配的「\\{」"
-
-#: lib/regcomp.c:162
-msgid "Invalid content of \\{\\}"
-msgstr "不正確的「\\{\\}」內容"
-
-#: lib/regcomp.c:165
-msgid "Invalid range end"
-msgstr "不正確的範圍結束"
-
-#: lib/regcomp.c:168
-msgid "Memory exhausted"
-msgstr "記憶體耗盡"
-
-#: lib/regcomp.c:171
-msgid "Invalid preceding regular expression"
-msgstr "不正確的前導正規表示式"
-
-#: lib/regcomp.c:174
-msgid "Premature end of regular expression"
-msgstr "正規表示式的過早結束"
-
-#: lib/regcomp.c:177
-msgid "Regular expression too big"
-msgstr "正規表示式太大"
+#~ msgid "cannot specify modifiers on empty regexp"
+#~ msgstr "無法指定修飾字元給空的正規表示式"
-#: lib/regcomp.c:180
-msgid "Unmatched ) or \\)"
-msgstr "未匹配的「)」或「\\」"
-
-#: lib/regcomp.c:705
-msgid "No previous regular expression"
-msgstr "沒有先前的正規表示式"
+#~ msgid ""
+#~ "E-mail bug reports to: <%s>.\n"
+#~ "Be sure to include the word ``%s'' somewhere in the ``Subject:'' field.\n"
+#~ msgstr ""
+#~ "將錯誤報告以電子郵件寄到:<%s>。\n"
+#~ "請記得在『 主旨:』欄位中包含字詞『%s』。\n"
#~ msgid "super-sed version %s\n"
#~ msgstr "超級 sed 版本 %s\n"
@@ -507,14 +842,14 @@ msgstr "沒有先前的正規表示式"
#~ msgstr "GNU sed 版本 %s\n"
#~ msgid ""
-#~ "%s\n"
+#~ "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 ""
-#~ "%s\n"
-#~ "這是自由軟體;參閱原始碼以獲得版權狀態。在法律允許的範圍內不提供任何保"
-#~ "證;\n"
-#~ "即使是對於銷售權利或是為了適合於某種特殊目的。\n"
+#~ "著作權 © %d 自由軟體基金會。\n"
+#~ "這是自由軟體;複製條件請參看原始碼。 沒有任何\n"
+#~ "擔保;在法律所允許的範圍內,甚至不含對於某一特定目的之\n"
+#~ "適售性與適用性。\n"
diff --git a/sed/Makefile.am b/sed/Makefile.am
deleted file mode 100644
index a164255..0000000
--- a/sed/Makefile.am
+++ /dev/null
@@ -1,17 +0,0 @@
-## Process this file with automake to produce Makefile.in
-bin_PROGRAMS = sed
-
-localedir = $(datadir)/locale
-
-sed_SOURCES = sed.c compile.c execute.c regexp.c fmt.c mbcs.c utils.c
-noinst_HEADERS = sed.h utils.h
-
-AM_CPPFLAGS = -I$(top_srcdir)/lib -I$(top_srcdir) -I$(top_builddir)/lib \
- -DLOCALEDIR=\"$(localedir)\"
-
-sed_LDADD = ../lib/libsed.a @INTLLIBS@ @LIB_ACL@ @LIB_SELINUX@
-sed_DEPENDENCIES = ../lib/libsed.a
-
-$(PROGRAMS): $(LDADD)
-
-
diff --git a/sed/Makefile.in b/sed/Makefile.in
deleted file mode 100644
index 3a6a33b..0000000
--- a/sed/Makefile.in
+++ /dev/null
@@ -1,1274 +0,0 @@
-# Makefile.in generated by automake 1.12.2 from Makefile.am.
-# @configure_input@
-
-# Copyright (C) 1994-2012 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.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
-# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
-# PARTICULAR PURPOSE.
-
-@SET_MAKE@
-
-
-VPATH = @srcdir@
-am__make_dryrun = \
- { \
- am__dry=no; \
- case $$MAKEFLAGS in \
- *\\[\ \ ]*) \
- echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \
- | grep '^AM OK$$' >/dev/null || am__dry=yes;; \
- *) \
- for am__flg in $$MAKEFLAGS; do \
- case $$am__flg in \
- *=*|--*) ;; \
- *n*) am__dry=yes; break;; \
- esac; \
- done;; \
- esac; \
- test $$am__dry = yes; \
- }
-pkgdatadir = $(datadir)/@PACKAGE@
-pkgincludedir = $(includedir)/@PACKAGE@
-pkglibdir = $(libdir)/@PACKAGE@
-am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
-install_sh_DATA = $(install_sh) -c -m 644
-install_sh_PROGRAM = $(install_sh) -c
-install_sh_SCRIPT = $(install_sh) -c
-INSTALL_HEADER = $(INSTALL_DATA)
-transform = $(program_transform_name)
-NORMAL_INSTALL = :
-PRE_INSTALL = :
-POST_INSTALL = :
-NORMAL_UNINSTALL = :
-PRE_UNINSTALL = :
-POST_UNINSTALL = :
-build_triplet = @build@
-host_triplet = @host@
-bin_PROGRAMS = sed$(EXEEXT)
-subdir = sed
-DIST_COMMON = $(noinst_HEADERS) $(srcdir)/Makefile.am \
- $(srcdir)/Makefile.in $(top_srcdir)/build-aux/depcomp
-ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
-am__aclocal_m4_deps = $(top_srcdir)/m4/00gnulib.m4 \
- $(top_srcdir)/m4/acl.m4 $(top_srcdir)/m4/alloca.m4 \
- $(top_srcdir)/m4/btowc.m4 $(top_srcdir)/m4/canonicalize.m4 \
- $(top_srcdir)/m4/codeset.m4 $(top_srcdir)/m4/configmake.m4 \
- $(top_srcdir)/m4/dirname.m4 \
- $(top_srcdir)/m4/double-slash-root.m4 \
- $(top_srcdir)/m4/eealloc.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/fstat.m4 \
- $(top_srcdir)/m4/fwriting.m4 $(top_srcdir)/m4/getdelim.m4 \
- $(top_srcdir)/m4/getopt.m4 $(top_srcdir)/m4/gettext.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/iconv.m4 \
- $(top_srcdir)/m4/include_next.m4 \
- $(top_srcdir)/m4/intlmacosx.m4 $(top_srcdir)/m4/langinfo_h.m4 \
- $(top_srcdir)/m4/largefile.m4 $(top_srcdir)/m4/lib-ld.m4 \
- $(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \
- $(top_srcdir)/m4/localcharset.m4 $(top_srcdir)/m4/locale-fr.m4 \
- $(top_srcdir)/m4/locale-ja.m4 $(top_srcdir)/m4/locale-zh.m4 \
- $(top_srcdir)/m4/locale_h.m4 $(top_srcdir)/m4/localeconv.m4 \
- $(top_srcdir)/m4/longlong.m4 $(top_srcdir)/m4/lstat.m4 \
- $(top_srcdir)/m4/malloc.m4 $(top_srcdir)/m4/malloca.m4 \
- $(top_srcdir)/m4/mbrlen.m4 $(top_srcdir)/m4/mbrtowc.m4 \
- $(top_srcdir)/m4/mbsinit.m4 $(top_srcdir)/m4/mbstate_t.m4 \
- $(top_srcdir)/m4/mbtowc.m4 $(top_srcdir)/m4/memchr.m4 \
- $(top_srcdir)/m4/mkostemp.m4 $(top_srcdir)/m4/mmap-anon.m4 \
- $(top_srcdir)/m4/msvc-inval.m4 \
- $(top_srcdir)/m4/msvc-nothrow.m4 $(top_srcdir)/m4/multiarch.m4 \
- $(top_srcdir)/m4/nl_langinfo.m4 $(top_srcdir)/m4/nls.m4 \
- $(top_srcdir)/m4/nocrash.m4 $(top_srcdir)/m4/off_t.m4 \
- $(top_srcdir)/m4/pathmax.m4 $(top_srcdir)/m4/po.m4 \
- $(top_srcdir)/m4/progtest.m4 $(top_srcdir)/m4/quote.m4 \
- $(top_srcdir)/m4/quotearg.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/selinux-context-h.m4 \
- $(top_srcdir)/m4/selinux-selinux-h.m4 \
- $(top_srcdir)/m4/ssize_t.m4 $(top_srcdir)/m4/stat.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/strerror.m4 $(top_srcdir)/m4/string_h.m4 \
- $(top_srcdir)/m4/strverscmp.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/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/wchar_h.m4 \
- $(top_srcdir)/m4/wchar_t.m4 $(top_srcdir)/m4/wcrtomb.m4 \
- $(top_srcdir)/m4/wctob.m4 $(top_srcdir)/m4/wctomb.m4 \
- $(top_srcdir)/m4/wctype_h.m4 $(top_srcdir)/m4/wint_t.m4 \
- $(top_srcdir)/m4/xalloc.m4 $(top_srcdir)/configure.ac
-am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
- $(ACLOCAL_M4)
-mkinstalldirs = $(install_sh) -d
-CONFIG_HEADER = $(top_builddir)/config.h
-CONFIG_CLEAN_FILES =
-CONFIG_CLEAN_VPATH_FILES =
-am__installdirs = "$(DESTDIR)$(bindir)"
-PROGRAMS = $(bin_PROGRAMS)
-am_sed_OBJECTS = sed.$(OBJEXT) compile.$(OBJEXT) execute.$(OBJEXT) \
- regexp.$(OBJEXT) fmt.$(OBJEXT) mbcs.$(OBJEXT) utils.$(OBJEXT)
-sed_OBJECTS = $(am_sed_OBJECTS)
-DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)
-depcomp = $(SHELL) $(top_srcdir)/build-aux/depcomp
-am__depfiles_maybe = depfiles
-am__mv = mv -f
-COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
- $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
-CCLD = $(CC)
-LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
-SOURCES = $(sed_SOURCES)
-DIST_SOURCES = $(sed_SOURCES)
-am__can_run_installinfo = \
- case $$AM_UPDATE_INFO_DIR in \
- n|no|NO) false;; \
- *) (install-info --version) >/dev/null 2>&1;; \
- esac
-HEADERS = $(noinst_HEADERS)
-ETAGS = etags
-CTAGS = ctags
-DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
-pkglibexecdir = @pkglibexecdir@
-ACLOCAL = @ACLOCAL@
-ALLOCA = @ALLOCA@
-ALLOCA_H = @ALLOCA_H@
-AMTAR = @AMTAR@
-APPLE_UNIVERSAL_BUILD = @APPLE_UNIVERSAL_BUILD@
-AR = @AR@
-ARFLAGS = @ARFLAGS@
-AUTOCONF = @AUTOCONF@
-AUTOHEADER = @AUTOHEADER@
-AUTOMAKE = @AUTOMAKE@
-AWK = @AWK@
-BITSIZEOF_PTRDIFF_T = @BITSIZEOF_PTRDIFF_T@
-BITSIZEOF_SIG_ATOMIC_T = @BITSIZEOF_SIG_ATOMIC_T@
-BITSIZEOF_SIZE_T = @BITSIZEOF_SIZE_T@
-BITSIZEOF_WCHAR_T = @BITSIZEOF_WCHAR_T@
-BITSIZEOF_WINT_T = @BITSIZEOF_WINT_T@
-CC = @CC@
-CCDEPMODE = @CCDEPMODE@
-CFLAGS = @CFLAGS@
-COPYRIGHT_YEAR = @COPYRIGHT_YEAR@
-CPP = @CPP@
-CPPFLAGS = @CPPFLAGS@
-CYGPATH_W = @CYGPATH_W@
-DEFS = @DEFS@
-DEPDIR = @DEPDIR@
-ECHO_C = @ECHO_C@
-ECHO_N = @ECHO_N@
-ECHO_T = @ECHO_T@
-EGREP = @EGREP@
-EMULTIHOP_HIDDEN = @EMULTIHOP_HIDDEN@
-EMULTIHOP_VALUE = @EMULTIHOP_VALUE@
-ENOLINK_HIDDEN = @ENOLINK_HIDDEN@
-ENOLINK_VALUE = @ENOLINK_VALUE@
-EOVERFLOW_HIDDEN = @EOVERFLOW_HIDDEN@
-EOVERFLOW_VALUE = @EOVERFLOW_VALUE@
-ERRNO_H = @ERRNO_H@
-EXEEXT = @EXEEXT@
-GETOPT_H = @GETOPT_H@
-GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@
-GLIBC21 = @GLIBC21@
-GMSGFMT = @GMSGFMT@
-GMSGFMT_015 = @GMSGFMT_015@
-GNULIB_ATOLL = @GNULIB_ATOLL@
-GNULIB_BTOWC = @GNULIB_BTOWC@
-GNULIB_CALLOC_POSIX = @GNULIB_CALLOC_POSIX@
-GNULIB_CANONICALIZE_FILE_NAME = @GNULIB_CANONICALIZE_FILE_NAME@
-GNULIB_CHDIR = @GNULIB_CHDIR@
-GNULIB_CHOWN = @GNULIB_CHOWN@
-GNULIB_CLOSE = @GNULIB_CLOSE@
-GNULIB_DPRINTF = @GNULIB_DPRINTF@
-GNULIB_DUP = @GNULIB_DUP@
-GNULIB_DUP2 = @GNULIB_DUP2@
-GNULIB_DUP3 = @GNULIB_DUP3@
-GNULIB_DUPLOCALE = @GNULIB_DUPLOCALE@
-GNULIB_ENVIRON = @GNULIB_ENVIRON@
-GNULIB_EUIDACCESS = @GNULIB_EUIDACCESS@
-GNULIB_FACCESSAT = @GNULIB_FACCESSAT@
-GNULIB_FCHDIR = @GNULIB_FCHDIR@
-GNULIB_FCHMODAT = @GNULIB_FCHMODAT@
-GNULIB_FCHOWNAT = @GNULIB_FCHOWNAT@
-GNULIB_FCLOSE = @GNULIB_FCLOSE@
-GNULIB_FCNTL = @GNULIB_FCNTL@
-GNULIB_FDATASYNC = @GNULIB_FDATASYNC@
-GNULIB_FDOPEN = @GNULIB_FDOPEN@
-GNULIB_FFLUSH = @GNULIB_FFLUSH@
-GNULIB_FFSL = @GNULIB_FFSL@
-GNULIB_FFSLL = @GNULIB_FFSLL@
-GNULIB_FGETC = @GNULIB_FGETC@
-GNULIB_FGETS = @GNULIB_FGETS@
-GNULIB_FOPEN = @GNULIB_FOPEN@
-GNULIB_FPRINTF = @GNULIB_FPRINTF@
-GNULIB_FPRINTF_POSIX = @GNULIB_FPRINTF_POSIX@
-GNULIB_FPURGE = @GNULIB_FPURGE@
-GNULIB_FPUTC = @GNULIB_FPUTC@
-GNULIB_FPUTS = @GNULIB_FPUTS@
-GNULIB_FREAD = @GNULIB_FREAD@
-GNULIB_FREOPEN = @GNULIB_FREOPEN@
-GNULIB_FSCANF = @GNULIB_FSCANF@
-GNULIB_FSEEK = @GNULIB_FSEEK@
-GNULIB_FSEEKO = @GNULIB_FSEEKO@
-GNULIB_FSTAT = @GNULIB_FSTAT@
-GNULIB_FSTATAT = @GNULIB_FSTATAT@
-GNULIB_FSYNC = @GNULIB_FSYNC@
-GNULIB_FTELL = @GNULIB_FTELL@
-GNULIB_FTELLO = @GNULIB_FTELLO@
-GNULIB_FTRUNCATE = @GNULIB_FTRUNCATE@
-GNULIB_FUTIMENS = @GNULIB_FUTIMENS@
-GNULIB_FWRITE = @GNULIB_FWRITE@
-GNULIB_GETC = @GNULIB_GETC@
-GNULIB_GETCHAR = @GNULIB_GETCHAR@
-GNULIB_GETCWD = @GNULIB_GETCWD@
-GNULIB_GETDELIM = @GNULIB_GETDELIM@
-GNULIB_GETDOMAINNAME = @GNULIB_GETDOMAINNAME@
-GNULIB_GETDTABLESIZE = @GNULIB_GETDTABLESIZE@
-GNULIB_GETGROUPS = @GNULIB_GETGROUPS@
-GNULIB_GETHOSTNAME = @GNULIB_GETHOSTNAME@
-GNULIB_GETLINE = @GNULIB_GETLINE@
-GNULIB_GETLOADAVG = @GNULIB_GETLOADAVG@
-GNULIB_GETLOGIN = @GNULIB_GETLOGIN@
-GNULIB_GETLOGIN_R = @GNULIB_GETLOGIN_R@
-GNULIB_GETPAGESIZE = @GNULIB_GETPAGESIZE@
-GNULIB_GETSUBOPT = @GNULIB_GETSUBOPT@
-GNULIB_GETTIMEOFDAY = @GNULIB_GETTIMEOFDAY@
-GNULIB_GETUSERSHELL = @GNULIB_GETUSERSHELL@
-GNULIB_GL_UNISTD_H_GETOPT = @GNULIB_GL_UNISTD_H_GETOPT@
-GNULIB_GRANTPT = @GNULIB_GRANTPT@
-GNULIB_GROUP_MEMBER = @GNULIB_GROUP_MEMBER@
-GNULIB_ISATTY = @GNULIB_ISATTY@
-GNULIB_ISWBLANK = @GNULIB_ISWBLANK@
-GNULIB_ISWCTYPE = @GNULIB_ISWCTYPE@
-GNULIB_LCHMOD = @GNULIB_LCHMOD@
-GNULIB_LCHOWN = @GNULIB_LCHOWN@
-GNULIB_LINK = @GNULIB_LINK@
-GNULIB_LINKAT = @GNULIB_LINKAT@
-GNULIB_LOCALECONV = @GNULIB_LOCALECONV@
-GNULIB_LSEEK = @GNULIB_LSEEK@
-GNULIB_LSTAT = @GNULIB_LSTAT@
-GNULIB_MALLOC_POSIX = @GNULIB_MALLOC_POSIX@
-GNULIB_MBRLEN = @GNULIB_MBRLEN@
-GNULIB_MBRTOWC = @GNULIB_MBRTOWC@
-GNULIB_MBSCASECMP = @GNULIB_MBSCASECMP@
-GNULIB_MBSCASESTR = @GNULIB_MBSCASESTR@
-GNULIB_MBSCHR = @GNULIB_MBSCHR@
-GNULIB_MBSCSPN = @GNULIB_MBSCSPN@
-GNULIB_MBSINIT = @GNULIB_MBSINIT@
-GNULIB_MBSLEN = @GNULIB_MBSLEN@
-GNULIB_MBSNCASECMP = @GNULIB_MBSNCASECMP@
-GNULIB_MBSNLEN = @GNULIB_MBSNLEN@
-GNULIB_MBSNRTOWCS = @GNULIB_MBSNRTOWCS@
-GNULIB_MBSPBRK = @GNULIB_MBSPBRK@
-GNULIB_MBSPCASECMP = @GNULIB_MBSPCASECMP@
-GNULIB_MBSRCHR = @GNULIB_MBSRCHR@
-GNULIB_MBSRTOWCS = @GNULIB_MBSRTOWCS@
-GNULIB_MBSSEP = @GNULIB_MBSSEP@
-GNULIB_MBSSPN = @GNULIB_MBSSPN@
-GNULIB_MBSSTR = @GNULIB_MBSSTR@
-GNULIB_MBSTOK_R = @GNULIB_MBSTOK_R@
-GNULIB_MBTOWC = @GNULIB_MBTOWC@
-GNULIB_MEMCHR = @GNULIB_MEMCHR@
-GNULIB_MEMMEM = @GNULIB_MEMMEM@
-GNULIB_MEMPCPY = @GNULIB_MEMPCPY@
-GNULIB_MEMRCHR = @GNULIB_MEMRCHR@
-GNULIB_MKDIRAT = @GNULIB_MKDIRAT@
-GNULIB_MKDTEMP = @GNULIB_MKDTEMP@
-GNULIB_MKFIFO = @GNULIB_MKFIFO@
-GNULIB_MKFIFOAT = @GNULIB_MKFIFOAT@
-GNULIB_MKNOD = @GNULIB_MKNOD@
-GNULIB_MKNODAT = @GNULIB_MKNODAT@
-GNULIB_MKOSTEMP = @GNULIB_MKOSTEMP@
-GNULIB_MKOSTEMPS = @GNULIB_MKOSTEMPS@
-GNULIB_MKSTEMP = @GNULIB_MKSTEMP@
-GNULIB_MKSTEMPS = @GNULIB_MKSTEMPS@
-GNULIB_MKTIME = @GNULIB_MKTIME@
-GNULIB_NANOSLEEP = @GNULIB_NANOSLEEP@
-GNULIB_NL_LANGINFO = @GNULIB_NL_LANGINFO@
-GNULIB_NONBLOCKING = @GNULIB_NONBLOCKING@
-GNULIB_OBSTACK_PRINTF = @GNULIB_OBSTACK_PRINTF@
-GNULIB_OBSTACK_PRINTF_POSIX = @GNULIB_OBSTACK_PRINTF_POSIX@
-GNULIB_OPEN = @GNULIB_OPEN@
-GNULIB_OPENAT = @GNULIB_OPENAT@
-GNULIB_PCLOSE = @GNULIB_PCLOSE@
-GNULIB_PERROR = @GNULIB_PERROR@
-GNULIB_PIPE = @GNULIB_PIPE@
-GNULIB_PIPE2 = @GNULIB_PIPE2@
-GNULIB_POPEN = @GNULIB_POPEN@
-GNULIB_POSIX_OPENPT = @GNULIB_POSIX_OPENPT@
-GNULIB_PREAD = @GNULIB_PREAD@
-GNULIB_PRINTF = @GNULIB_PRINTF@
-GNULIB_PRINTF_POSIX = @GNULIB_PRINTF_POSIX@
-GNULIB_PTSNAME = @GNULIB_PTSNAME@
-GNULIB_PTSNAME_R = @GNULIB_PTSNAME_R@
-GNULIB_PUTC = @GNULIB_PUTC@
-GNULIB_PUTCHAR = @GNULIB_PUTCHAR@
-GNULIB_PUTENV = @GNULIB_PUTENV@
-GNULIB_PUTS = @GNULIB_PUTS@
-GNULIB_PWRITE = @GNULIB_PWRITE@
-GNULIB_RANDOM = @GNULIB_RANDOM@
-GNULIB_RANDOM_R = @GNULIB_RANDOM_R@
-GNULIB_RAWMEMCHR = @GNULIB_RAWMEMCHR@
-GNULIB_READ = @GNULIB_READ@
-GNULIB_READLINK = @GNULIB_READLINK@
-GNULIB_READLINKAT = @GNULIB_READLINKAT@
-GNULIB_REALLOC_POSIX = @GNULIB_REALLOC_POSIX@
-GNULIB_REALPATH = @GNULIB_REALPATH@
-GNULIB_REMOVE = @GNULIB_REMOVE@
-GNULIB_RENAME = @GNULIB_RENAME@
-GNULIB_RENAMEAT = @GNULIB_RENAMEAT@
-GNULIB_RMDIR = @GNULIB_RMDIR@
-GNULIB_RPMATCH = @GNULIB_RPMATCH@
-GNULIB_SCANF = @GNULIB_SCANF@
-GNULIB_SETENV = @GNULIB_SETENV@
-GNULIB_SETHOSTNAME = @GNULIB_SETHOSTNAME@
-GNULIB_SETLOCALE = @GNULIB_SETLOCALE@
-GNULIB_SLEEP = @GNULIB_SLEEP@
-GNULIB_SNPRINTF = @GNULIB_SNPRINTF@
-GNULIB_SPRINTF_POSIX = @GNULIB_SPRINTF_POSIX@
-GNULIB_STAT = @GNULIB_STAT@
-GNULIB_STDIO_H_NONBLOCKING = @GNULIB_STDIO_H_NONBLOCKING@
-GNULIB_STDIO_H_SIGPIPE = @GNULIB_STDIO_H_SIGPIPE@
-GNULIB_STPCPY = @GNULIB_STPCPY@
-GNULIB_STPNCPY = @GNULIB_STPNCPY@
-GNULIB_STRCASESTR = @GNULIB_STRCASESTR@
-GNULIB_STRCHRNUL = @GNULIB_STRCHRNUL@
-GNULIB_STRDUP = @GNULIB_STRDUP@
-GNULIB_STRERROR = @GNULIB_STRERROR@
-GNULIB_STRERROR_R = @GNULIB_STRERROR_R@
-GNULIB_STRNCAT = @GNULIB_STRNCAT@
-GNULIB_STRNDUP = @GNULIB_STRNDUP@
-GNULIB_STRNLEN = @GNULIB_STRNLEN@
-GNULIB_STRPBRK = @GNULIB_STRPBRK@
-GNULIB_STRPTIME = @GNULIB_STRPTIME@
-GNULIB_STRSEP = @GNULIB_STRSEP@
-GNULIB_STRSIGNAL = @GNULIB_STRSIGNAL@
-GNULIB_STRSTR = @GNULIB_STRSTR@
-GNULIB_STRTOD = @GNULIB_STRTOD@
-GNULIB_STRTOK_R = @GNULIB_STRTOK_R@
-GNULIB_STRTOLL = @GNULIB_STRTOLL@
-GNULIB_STRTOULL = @GNULIB_STRTOULL@
-GNULIB_STRVERSCMP = @GNULIB_STRVERSCMP@
-GNULIB_SYMLINK = @GNULIB_SYMLINK@
-GNULIB_SYMLINKAT = @GNULIB_SYMLINKAT@
-GNULIB_SYSTEM_POSIX = @GNULIB_SYSTEM_POSIX@
-GNULIB_TIMEGM = @GNULIB_TIMEGM@
-GNULIB_TIME_R = @GNULIB_TIME_R@
-GNULIB_TMPFILE = @GNULIB_TMPFILE@
-GNULIB_TOWCTRANS = @GNULIB_TOWCTRANS@
-GNULIB_TTYNAME_R = @GNULIB_TTYNAME_R@
-GNULIB_UNISTD_H_NONBLOCKING = @GNULIB_UNISTD_H_NONBLOCKING@
-GNULIB_UNISTD_H_SIGPIPE = @GNULIB_UNISTD_H_SIGPIPE@
-GNULIB_UNLINK = @GNULIB_UNLINK@
-GNULIB_UNLINKAT = @GNULIB_UNLINKAT@
-GNULIB_UNLOCKPT = @GNULIB_UNLOCKPT@
-GNULIB_UNSETENV = @GNULIB_UNSETENV@
-GNULIB_USLEEP = @GNULIB_USLEEP@
-GNULIB_UTIMENSAT = @GNULIB_UTIMENSAT@
-GNULIB_VASPRINTF = @GNULIB_VASPRINTF@
-GNULIB_VDPRINTF = @GNULIB_VDPRINTF@
-GNULIB_VFPRINTF = @GNULIB_VFPRINTF@
-GNULIB_VFPRINTF_POSIX = @GNULIB_VFPRINTF_POSIX@
-GNULIB_VFSCANF = @GNULIB_VFSCANF@
-GNULIB_VPRINTF = @GNULIB_VPRINTF@
-GNULIB_VPRINTF_POSIX = @GNULIB_VPRINTF_POSIX@
-GNULIB_VSCANF = @GNULIB_VSCANF@
-GNULIB_VSNPRINTF = @GNULIB_VSNPRINTF@
-GNULIB_VSPRINTF_POSIX = @GNULIB_VSPRINTF_POSIX@
-GNULIB_WCPCPY = @GNULIB_WCPCPY@
-GNULIB_WCPNCPY = @GNULIB_WCPNCPY@
-GNULIB_WCRTOMB = @GNULIB_WCRTOMB@
-GNULIB_WCSCASECMP = @GNULIB_WCSCASECMP@
-GNULIB_WCSCAT = @GNULIB_WCSCAT@
-GNULIB_WCSCHR = @GNULIB_WCSCHR@
-GNULIB_WCSCMP = @GNULIB_WCSCMP@
-GNULIB_WCSCOLL = @GNULIB_WCSCOLL@
-GNULIB_WCSCPY = @GNULIB_WCSCPY@
-GNULIB_WCSCSPN = @GNULIB_WCSCSPN@
-GNULIB_WCSDUP = @GNULIB_WCSDUP@
-GNULIB_WCSLEN = @GNULIB_WCSLEN@
-GNULIB_WCSNCASECMP = @GNULIB_WCSNCASECMP@
-GNULIB_WCSNCAT = @GNULIB_WCSNCAT@
-GNULIB_WCSNCMP = @GNULIB_WCSNCMP@
-GNULIB_WCSNCPY = @GNULIB_WCSNCPY@
-GNULIB_WCSNLEN = @GNULIB_WCSNLEN@
-GNULIB_WCSNRTOMBS = @GNULIB_WCSNRTOMBS@
-GNULIB_WCSPBRK = @GNULIB_WCSPBRK@
-GNULIB_WCSRCHR = @GNULIB_WCSRCHR@
-GNULIB_WCSRTOMBS = @GNULIB_WCSRTOMBS@
-GNULIB_WCSSPN = @GNULIB_WCSSPN@
-GNULIB_WCSSTR = @GNULIB_WCSSTR@
-GNULIB_WCSTOK = @GNULIB_WCSTOK@
-GNULIB_WCSWIDTH = @GNULIB_WCSWIDTH@
-GNULIB_WCSXFRM = @GNULIB_WCSXFRM@
-GNULIB_WCTOB = @GNULIB_WCTOB@
-GNULIB_WCTOMB = @GNULIB_WCTOMB@
-GNULIB_WCTRANS = @GNULIB_WCTRANS@
-GNULIB_WCTYPE = @GNULIB_WCTYPE@
-GNULIB_WCWIDTH = @GNULIB_WCWIDTH@
-GNULIB_WMEMCHR = @GNULIB_WMEMCHR@
-GNULIB_WMEMCMP = @GNULIB_WMEMCMP@
-GNULIB_WMEMCPY = @GNULIB_WMEMCPY@
-GNULIB_WMEMMOVE = @GNULIB_WMEMMOVE@
-GNULIB_WMEMSET = @GNULIB_WMEMSET@
-GNULIB_WRITE = @GNULIB_WRITE@
-GNULIB__EXIT = @GNULIB__EXIT@
-GREP = @GREP@
-HAVE_ATOLL = @HAVE_ATOLL@
-HAVE_BTOWC = @HAVE_BTOWC@
-HAVE_CANONICALIZE_FILE_NAME = @HAVE_CANONICALIZE_FILE_NAME@
-HAVE_CHOWN = @HAVE_CHOWN@
-HAVE_DECL_ENVIRON = @HAVE_DECL_ENVIRON@
-HAVE_DECL_FCHDIR = @HAVE_DECL_FCHDIR@
-HAVE_DECL_FDATASYNC = @HAVE_DECL_FDATASYNC@
-HAVE_DECL_FPURGE = @HAVE_DECL_FPURGE@
-HAVE_DECL_FSEEKO = @HAVE_DECL_FSEEKO@
-HAVE_DECL_FTELLO = @HAVE_DECL_FTELLO@
-HAVE_DECL_GETDELIM = @HAVE_DECL_GETDELIM@
-HAVE_DECL_GETDOMAINNAME = @HAVE_DECL_GETDOMAINNAME@
-HAVE_DECL_GETLINE = @HAVE_DECL_GETLINE@
-HAVE_DECL_GETLOADAVG = @HAVE_DECL_GETLOADAVG@
-HAVE_DECL_GETLOGIN_R = @HAVE_DECL_GETLOGIN_R@
-HAVE_DECL_GETPAGESIZE = @HAVE_DECL_GETPAGESIZE@
-HAVE_DECL_GETUSERSHELL = @HAVE_DECL_GETUSERSHELL@
-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_SNPRINTF = @HAVE_DECL_SNPRINTF@
-HAVE_DECL_STRDUP = @HAVE_DECL_STRDUP@
-HAVE_DECL_STRERROR_R = @HAVE_DECL_STRERROR_R@
-HAVE_DECL_STRNDUP = @HAVE_DECL_STRNDUP@
-HAVE_DECL_STRNLEN = @HAVE_DECL_STRNLEN@
-HAVE_DECL_STRSIGNAL = @HAVE_DECL_STRSIGNAL@
-HAVE_DECL_STRTOK_R = @HAVE_DECL_STRTOK_R@
-HAVE_DECL_TTYNAME_R = @HAVE_DECL_TTYNAME_R@
-HAVE_DECL_UNSETENV = @HAVE_DECL_UNSETENV@
-HAVE_DECL_VSNPRINTF = @HAVE_DECL_VSNPRINTF@
-HAVE_DECL_WCTOB = @HAVE_DECL_WCTOB@
-HAVE_DECL_WCWIDTH = @HAVE_DECL_WCWIDTH@
-HAVE_DPRINTF = @HAVE_DPRINTF@
-HAVE_DUP2 = @HAVE_DUP2@
-HAVE_DUP3 = @HAVE_DUP3@
-HAVE_DUPLOCALE = @HAVE_DUPLOCALE@
-HAVE_EUIDACCESS = @HAVE_EUIDACCESS@
-HAVE_FACCESSAT = @HAVE_FACCESSAT@
-HAVE_FCHDIR = @HAVE_FCHDIR@
-HAVE_FCHMODAT = @HAVE_FCHMODAT@
-HAVE_FCHOWNAT = @HAVE_FCHOWNAT@
-HAVE_FCNTL = @HAVE_FCNTL@
-HAVE_FDATASYNC = @HAVE_FDATASYNC@
-HAVE_FEATURES_H = @HAVE_FEATURES_H@
-HAVE_FFSL = @HAVE_FFSL@
-HAVE_FFSLL = @HAVE_FFSLL@
-HAVE_FSEEKO = @HAVE_FSEEKO@
-HAVE_FSTATAT = @HAVE_FSTATAT@
-HAVE_FSYNC = @HAVE_FSYNC@
-HAVE_FTELLO = @HAVE_FTELLO@
-HAVE_FTRUNCATE = @HAVE_FTRUNCATE@
-HAVE_FUTIMENS = @HAVE_FUTIMENS@
-HAVE_GETDTABLESIZE = @HAVE_GETDTABLESIZE@
-HAVE_GETGROUPS = @HAVE_GETGROUPS@
-HAVE_GETHOSTNAME = @HAVE_GETHOSTNAME@
-HAVE_GETLOGIN = @HAVE_GETLOGIN@
-HAVE_GETOPT_H = @HAVE_GETOPT_H@
-HAVE_GETPAGESIZE = @HAVE_GETPAGESIZE@
-HAVE_GETSUBOPT = @HAVE_GETSUBOPT@
-HAVE_GETTIMEOFDAY = @HAVE_GETTIMEOFDAY@
-HAVE_GRANTPT = @HAVE_GRANTPT@
-HAVE_GROUP_MEMBER = @HAVE_GROUP_MEMBER@
-HAVE_INTTYPES_H = @HAVE_INTTYPES_H@
-HAVE_ISWBLANK = @HAVE_ISWBLANK@
-HAVE_ISWCNTRL = @HAVE_ISWCNTRL@
-HAVE_LANGINFO_CODESET = @HAVE_LANGINFO_CODESET@
-HAVE_LANGINFO_ERA = @HAVE_LANGINFO_ERA@
-HAVE_LANGINFO_H = @HAVE_LANGINFO_H@
-HAVE_LANGINFO_T_FMT_AMPM = @HAVE_LANGINFO_T_FMT_AMPM@
-HAVE_LANGINFO_YESEXPR = @HAVE_LANGINFO_YESEXPR@
-HAVE_LCHMOD = @HAVE_LCHMOD@
-HAVE_LCHOWN = @HAVE_LCHOWN@
-HAVE_LINK = @HAVE_LINK@
-HAVE_LINKAT = @HAVE_LINKAT@
-HAVE_LONG_LONG_INT = @HAVE_LONG_LONG_INT@
-HAVE_LSTAT = @HAVE_LSTAT@
-HAVE_MBRLEN = @HAVE_MBRLEN@
-HAVE_MBRTOWC = @HAVE_MBRTOWC@
-HAVE_MBSINIT = @HAVE_MBSINIT@
-HAVE_MBSLEN = @HAVE_MBSLEN@
-HAVE_MBSNRTOWCS = @HAVE_MBSNRTOWCS@
-HAVE_MBSRTOWCS = @HAVE_MBSRTOWCS@
-HAVE_MEMCHR = @HAVE_MEMCHR@
-HAVE_MEMPCPY = @HAVE_MEMPCPY@
-HAVE_MKDIRAT = @HAVE_MKDIRAT@
-HAVE_MKDTEMP = @HAVE_MKDTEMP@
-HAVE_MKFIFO = @HAVE_MKFIFO@
-HAVE_MKFIFOAT = @HAVE_MKFIFOAT@
-HAVE_MKNOD = @HAVE_MKNOD@
-HAVE_MKNODAT = @HAVE_MKNODAT@
-HAVE_MKOSTEMP = @HAVE_MKOSTEMP@
-HAVE_MKOSTEMPS = @HAVE_MKOSTEMPS@
-HAVE_MKSTEMP = @HAVE_MKSTEMP@
-HAVE_MKSTEMPS = @HAVE_MKSTEMPS@
-HAVE_MSVC_INVALID_PARAMETER_HANDLER = @HAVE_MSVC_INVALID_PARAMETER_HANDLER@
-HAVE_NANOSLEEP = @HAVE_NANOSLEEP@
-HAVE_NL_LANGINFO = @HAVE_NL_LANGINFO@
-HAVE_OPENAT = @HAVE_OPENAT@
-HAVE_OS_H = @HAVE_OS_H@
-HAVE_PCLOSE = @HAVE_PCLOSE@
-HAVE_PIPE = @HAVE_PIPE@
-HAVE_PIPE2 = @HAVE_PIPE2@
-HAVE_POPEN = @HAVE_POPEN@
-HAVE_POSIX_OPENPT = @HAVE_POSIX_OPENPT@
-HAVE_PREAD = @HAVE_PREAD@
-HAVE_PTSNAME = @HAVE_PTSNAME@
-HAVE_PTSNAME_R = @HAVE_PTSNAME_R@
-HAVE_PWRITE = @HAVE_PWRITE@
-HAVE_RANDOM = @HAVE_RANDOM@
-HAVE_RANDOM_H = @HAVE_RANDOM_H@
-HAVE_RANDOM_R = @HAVE_RANDOM_R@
-HAVE_RAWMEMCHR = @HAVE_RAWMEMCHR@
-HAVE_READLINK = @HAVE_READLINK@
-HAVE_READLINKAT = @HAVE_READLINKAT@
-HAVE_REALPATH = @HAVE_REALPATH@
-HAVE_RENAMEAT = @HAVE_RENAMEAT@
-HAVE_RPMATCH = @HAVE_RPMATCH@
-HAVE_SETENV = @HAVE_SETENV@
-HAVE_SETHOSTNAME = @HAVE_SETHOSTNAME@
-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_SLEEP = @HAVE_SLEEP@
-HAVE_STDINT_H = @HAVE_STDINT_H@
-HAVE_STPCPY = @HAVE_STPCPY@
-HAVE_STPNCPY = @HAVE_STPNCPY@
-HAVE_STRCASESTR = @HAVE_STRCASESTR@
-HAVE_STRCHRNUL = @HAVE_STRCHRNUL@
-HAVE_STRPBRK = @HAVE_STRPBRK@
-HAVE_STRPTIME = @HAVE_STRPTIME@
-HAVE_STRSEP = @HAVE_STRSEP@
-HAVE_STRTOD = @HAVE_STRTOD@
-HAVE_STRTOLL = @HAVE_STRTOLL@
-HAVE_STRTOULL = @HAVE_STRTOULL@
-HAVE_STRUCT_RANDOM_DATA = @HAVE_STRUCT_RANDOM_DATA@
-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_INTTYPES_H = @HAVE_SYS_INTTYPES_H@
-HAVE_SYS_LOADAVG_H = @HAVE_SYS_LOADAVG_H@
-HAVE_SYS_PARAM_H = @HAVE_SYS_PARAM_H@
-HAVE_SYS_TIME_H = @HAVE_SYS_TIME_H@
-HAVE_SYS_TYPES_H = @HAVE_SYS_TYPES_H@
-HAVE_TIMEGM = @HAVE_TIMEGM@
-HAVE_UNISTD_H = @HAVE_UNISTD_H@
-HAVE_UNLINKAT = @HAVE_UNLINKAT@
-HAVE_UNLOCKPT = @HAVE_UNLOCKPT@
-HAVE_UNSIGNED_LONG_LONG_INT = @HAVE_UNSIGNED_LONG_LONG_INT@
-HAVE_USLEEP = @HAVE_USLEEP@
-HAVE_UTIMENSAT = @HAVE_UTIMENSAT@
-HAVE_VASPRINTF = @HAVE_VASPRINTF@
-HAVE_VDPRINTF = @HAVE_VDPRINTF@
-HAVE_WCHAR_H = @HAVE_WCHAR_H@
-HAVE_WCHAR_T = @HAVE_WCHAR_T@
-HAVE_WCPCPY = @HAVE_WCPCPY@
-HAVE_WCPNCPY = @HAVE_WCPNCPY@
-HAVE_WCRTOMB = @HAVE_WCRTOMB@
-HAVE_WCSCASECMP = @HAVE_WCSCASECMP@
-HAVE_WCSCAT = @HAVE_WCSCAT@
-HAVE_WCSCHR = @HAVE_WCSCHR@
-HAVE_WCSCMP = @HAVE_WCSCMP@
-HAVE_WCSCOLL = @HAVE_WCSCOLL@
-HAVE_WCSCPY = @HAVE_WCSCPY@
-HAVE_WCSCSPN = @HAVE_WCSCSPN@
-HAVE_WCSDUP = @HAVE_WCSDUP@
-HAVE_WCSLEN = @HAVE_WCSLEN@
-HAVE_WCSNCASECMP = @HAVE_WCSNCASECMP@
-HAVE_WCSNCAT = @HAVE_WCSNCAT@
-HAVE_WCSNCMP = @HAVE_WCSNCMP@
-HAVE_WCSNCPY = @HAVE_WCSNCPY@
-HAVE_WCSNLEN = @HAVE_WCSNLEN@
-HAVE_WCSNRTOMBS = @HAVE_WCSNRTOMBS@
-HAVE_WCSPBRK = @HAVE_WCSPBRK@
-HAVE_WCSRCHR = @HAVE_WCSRCHR@
-HAVE_WCSRTOMBS = @HAVE_WCSRTOMBS@
-HAVE_WCSSPN = @HAVE_WCSSPN@
-HAVE_WCSSTR = @HAVE_WCSSTR@
-HAVE_WCSTOK = @HAVE_WCSTOK@
-HAVE_WCSWIDTH = @HAVE_WCSWIDTH@
-HAVE_WCSXFRM = @HAVE_WCSXFRM@
-HAVE_WCTRANS_T = @HAVE_WCTRANS_T@
-HAVE_WCTYPE_H = @HAVE_WCTYPE_H@
-HAVE_WCTYPE_T = @HAVE_WCTYPE_T@
-HAVE_WINSOCK2_H = @HAVE_WINSOCK2_H@
-HAVE_WINT_T = @HAVE_WINT_T@
-HAVE_WMEMCHR = @HAVE_WMEMCHR@
-HAVE_WMEMCMP = @HAVE_WMEMCMP@
-HAVE_WMEMCPY = @HAVE_WMEMCPY@
-HAVE_WMEMMOVE = @HAVE_WMEMMOVE@
-HAVE_WMEMSET = @HAVE_WMEMSET@
-HAVE_XLOCALE_H = @HAVE_XLOCALE_H@
-HAVE__BOOL = @HAVE__BOOL@
-HAVE__EXIT = @HAVE__EXIT@
-INCLUDE_NEXT = @INCLUDE_NEXT@
-INCLUDE_NEXT_AS_FIRST_DIRECTIVE = @INCLUDE_NEXT_AS_FIRST_DIRECTIVE@
-INSTALL = @INSTALL@
-INSTALL_DATA = @INSTALL_DATA@
-INSTALL_PROGRAM = @INSTALL_PROGRAM@
-INSTALL_SCRIPT = @INSTALL_SCRIPT@
-INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
-INTLLIBS = @INTLLIBS@
-INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@
-LDFLAGS = @LDFLAGS@
-LIBICONV = @LIBICONV@
-LIBINTL = @LIBINTL@
-LIBOBJS = @LIBOBJS@
-LIBS = @LIBS@
-LIBSED_LIBDEPS = @LIBSED_LIBDEPS@
-LIBSED_LTLIBDEPS = @LIBSED_LTLIBDEPS@
-LIB_ACL = @LIB_ACL@
-LIB_SELINUX = @LIB_SELINUX@
-LOCALCHARSET_TESTS_ENVIRONMENT = @LOCALCHARSET_TESTS_ENVIRONMENT@
-LOCALE_FR = @LOCALE_FR@
-LOCALE_FR_UTF8 = @LOCALE_FR_UTF8@
-LOCALE_JA = @LOCALE_JA@
-LOCALE_ZH_CN = @LOCALE_ZH_CN@
-LTLIBICONV = @LTLIBICONV@
-LTLIBINTL = @LTLIBINTL@
-LTLIBOBJS = @LTLIBOBJS@
-MAKEINFO = @MAKEINFO@
-MKDIR_P = @MKDIR_P@
-MSGFMT = @MSGFMT@
-MSGFMT_015 = @MSGFMT_015@
-MSGMERGE = @MSGMERGE@
-NEXT_AS_FIRST_DIRECTIVE_ERRNO_H = @NEXT_AS_FIRST_DIRECTIVE_ERRNO_H@
-NEXT_AS_FIRST_DIRECTIVE_FCNTL_H = @NEXT_AS_FIRST_DIRECTIVE_FCNTL_H@
-NEXT_AS_FIRST_DIRECTIVE_GETOPT_H = @NEXT_AS_FIRST_DIRECTIVE_GETOPT_H@
-NEXT_AS_FIRST_DIRECTIVE_LANGINFO_H = @NEXT_AS_FIRST_DIRECTIVE_LANGINFO_H@
-NEXT_AS_FIRST_DIRECTIVE_LOCALE_H = @NEXT_AS_FIRST_DIRECTIVE_LOCALE_H@
-NEXT_AS_FIRST_DIRECTIVE_SELINUX_SELINUX_H = @NEXT_AS_FIRST_DIRECTIVE_SELINUX_SELINUX_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_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_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@
-NEXT_AS_FIRST_DIRECTIVE_WCTYPE_H = @NEXT_AS_FIRST_DIRECTIVE_WCTYPE_H@
-NEXT_ERRNO_H = @NEXT_ERRNO_H@
-NEXT_FCNTL_H = @NEXT_FCNTL_H@
-NEXT_GETOPT_H = @NEXT_GETOPT_H@
-NEXT_LANGINFO_H = @NEXT_LANGINFO_H@
-NEXT_LOCALE_H = @NEXT_LOCALE_H@
-NEXT_SELINUX_SELINUX_H = @NEXT_SELINUX_SELINUX_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_STAT_H = @NEXT_SYS_STAT_H@
-NEXT_SYS_TIME_H = @NEXT_SYS_TIME_H@
-NEXT_SYS_TYPES_H = @NEXT_SYS_TYPES_H@
-NEXT_TIME_H = @NEXT_TIME_H@
-NEXT_UNISTD_H = @NEXT_UNISTD_H@
-NEXT_WCHAR_H = @NEXT_WCHAR_H@
-NEXT_WCTYPE_H = @NEXT_WCTYPE_H@
-OBJEXT = @OBJEXT@
-PACKAGE = @PACKAGE@
-PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
-PACKAGE_NAME = @PACKAGE_NAME@
-PACKAGE_STRING = @PACKAGE_STRING@
-PACKAGE_TARNAME = @PACKAGE_TARNAME@
-PACKAGE_URL = @PACKAGE_URL@
-PACKAGE_VERSION = @PACKAGE_VERSION@
-PATH_SEPARATOR = @PATH_SEPARATOR@
-POSUB = @POSUB@
-PRAGMA_COLUMNS = @PRAGMA_COLUMNS@
-PRAGMA_SYSTEM_HEADER = @PRAGMA_SYSTEM_HEADER@
-PTHREAD_H_DEFINES_STRUCT_TIMESPEC = @PTHREAD_H_DEFINES_STRUCT_TIMESPEC@
-PTRDIFF_T_SUFFIX = @PTRDIFF_T_SUFFIX@
-RANLIB = @RANLIB@
-REPLACE_BTOWC = @REPLACE_BTOWC@
-REPLACE_CALLOC = @REPLACE_CALLOC@
-REPLACE_CANONICALIZE_FILE_NAME = @REPLACE_CANONICALIZE_FILE_NAME@
-REPLACE_CHOWN = @REPLACE_CHOWN@
-REPLACE_CLOSE = @REPLACE_CLOSE@
-REPLACE_DPRINTF = @REPLACE_DPRINTF@
-REPLACE_DUP = @REPLACE_DUP@
-REPLACE_DUP2 = @REPLACE_DUP2@
-REPLACE_DUPLOCALE = @REPLACE_DUPLOCALE@
-REPLACE_FCHOWNAT = @REPLACE_FCHOWNAT@
-REPLACE_FCLOSE = @REPLACE_FCLOSE@
-REPLACE_FCNTL = @REPLACE_FCNTL@
-REPLACE_FDOPEN = @REPLACE_FDOPEN@
-REPLACE_FFLUSH = @REPLACE_FFLUSH@
-REPLACE_FOPEN = @REPLACE_FOPEN@
-REPLACE_FPRINTF = @REPLACE_FPRINTF@
-REPLACE_FPURGE = @REPLACE_FPURGE@
-REPLACE_FREOPEN = @REPLACE_FREOPEN@
-REPLACE_FSEEK = @REPLACE_FSEEK@
-REPLACE_FSEEKO = @REPLACE_FSEEKO@
-REPLACE_FSTAT = @REPLACE_FSTAT@
-REPLACE_FSTATAT = @REPLACE_FSTATAT@
-REPLACE_FTELL = @REPLACE_FTELL@
-REPLACE_FTELLO = @REPLACE_FTELLO@
-REPLACE_FTRUNCATE = @REPLACE_FTRUNCATE@
-REPLACE_FUTIMENS = @REPLACE_FUTIMENS@
-REPLACE_GETCWD = @REPLACE_GETCWD@
-REPLACE_GETDELIM = @REPLACE_GETDELIM@
-REPLACE_GETDOMAINNAME = @REPLACE_GETDOMAINNAME@
-REPLACE_GETGROUPS = @REPLACE_GETGROUPS@
-REPLACE_GETLINE = @REPLACE_GETLINE@
-REPLACE_GETLOGIN_R = @REPLACE_GETLOGIN_R@
-REPLACE_GETPAGESIZE = @REPLACE_GETPAGESIZE@
-REPLACE_GETTIMEOFDAY = @REPLACE_GETTIMEOFDAY@
-REPLACE_ISATTY = @REPLACE_ISATTY@
-REPLACE_ISWBLANK = @REPLACE_ISWBLANK@
-REPLACE_ISWCNTRL = @REPLACE_ISWCNTRL@
-REPLACE_LCHOWN = @REPLACE_LCHOWN@
-REPLACE_LINK = @REPLACE_LINK@
-REPLACE_LINKAT = @REPLACE_LINKAT@
-REPLACE_LOCALECONV = @REPLACE_LOCALECONV@
-REPLACE_LOCALTIME_R = @REPLACE_LOCALTIME_R@
-REPLACE_LSEEK = @REPLACE_LSEEK@
-REPLACE_LSTAT = @REPLACE_LSTAT@
-REPLACE_MALLOC = @REPLACE_MALLOC@
-REPLACE_MBRLEN = @REPLACE_MBRLEN@
-REPLACE_MBRTOWC = @REPLACE_MBRTOWC@
-REPLACE_MBSINIT = @REPLACE_MBSINIT@
-REPLACE_MBSNRTOWCS = @REPLACE_MBSNRTOWCS@
-REPLACE_MBSRTOWCS = @REPLACE_MBSRTOWCS@
-REPLACE_MBSTATE_T = @REPLACE_MBSTATE_T@
-REPLACE_MBTOWC = @REPLACE_MBTOWC@
-REPLACE_MEMCHR = @REPLACE_MEMCHR@
-REPLACE_MEMMEM = @REPLACE_MEMMEM@
-REPLACE_MKDIR = @REPLACE_MKDIR@
-REPLACE_MKFIFO = @REPLACE_MKFIFO@
-REPLACE_MKNOD = @REPLACE_MKNOD@
-REPLACE_MKSTEMP = @REPLACE_MKSTEMP@
-REPLACE_MKTIME = @REPLACE_MKTIME@
-REPLACE_NANOSLEEP = @REPLACE_NANOSLEEP@
-REPLACE_NL_LANGINFO = @REPLACE_NL_LANGINFO@
-REPLACE_NULL = @REPLACE_NULL@
-REPLACE_OBSTACK_PRINTF = @REPLACE_OBSTACK_PRINTF@
-REPLACE_OPEN = @REPLACE_OPEN@
-REPLACE_OPENAT = @REPLACE_OPENAT@
-REPLACE_PERROR = @REPLACE_PERROR@
-REPLACE_POPEN = @REPLACE_POPEN@
-REPLACE_PREAD = @REPLACE_PREAD@
-REPLACE_PRINTF = @REPLACE_PRINTF@
-REPLACE_PTSNAME = @REPLACE_PTSNAME@
-REPLACE_PTSNAME_R = @REPLACE_PTSNAME_R@
-REPLACE_PUTENV = @REPLACE_PUTENV@
-REPLACE_PWRITE = @REPLACE_PWRITE@
-REPLACE_RANDOM_R = @REPLACE_RANDOM_R@
-REPLACE_READ = @REPLACE_READ@
-REPLACE_READLINK = @REPLACE_READLINK@
-REPLACE_REALLOC = @REPLACE_REALLOC@
-REPLACE_REALPATH = @REPLACE_REALPATH@
-REPLACE_REMOVE = @REPLACE_REMOVE@
-REPLACE_RENAME = @REPLACE_RENAME@
-REPLACE_RENAMEAT = @REPLACE_RENAMEAT@
-REPLACE_RMDIR = @REPLACE_RMDIR@
-REPLACE_SETENV = @REPLACE_SETENV@
-REPLACE_SETLOCALE = @REPLACE_SETLOCALE@
-REPLACE_SLEEP = @REPLACE_SLEEP@
-REPLACE_SNPRINTF = @REPLACE_SNPRINTF@
-REPLACE_SPRINTF = @REPLACE_SPRINTF@
-REPLACE_STAT = @REPLACE_STAT@
-REPLACE_STDIO_READ_FUNCS = @REPLACE_STDIO_READ_FUNCS@
-REPLACE_STDIO_WRITE_FUNCS = @REPLACE_STDIO_WRITE_FUNCS@
-REPLACE_STPNCPY = @REPLACE_STPNCPY@
-REPLACE_STRCASESTR = @REPLACE_STRCASESTR@
-REPLACE_STRCHRNUL = @REPLACE_STRCHRNUL@
-REPLACE_STRDUP = @REPLACE_STRDUP@
-REPLACE_STRERROR = @REPLACE_STRERROR@
-REPLACE_STRERROR_R = @REPLACE_STRERROR_R@
-REPLACE_STRNCAT = @REPLACE_STRNCAT@
-REPLACE_STRNDUP = @REPLACE_STRNDUP@
-REPLACE_STRNLEN = @REPLACE_STRNLEN@
-REPLACE_STRSIGNAL = @REPLACE_STRSIGNAL@
-REPLACE_STRSTR = @REPLACE_STRSTR@
-REPLACE_STRTOD = @REPLACE_STRTOD@
-REPLACE_STRTOK_R = @REPLACE_STRTOK_R@
-REPLACE_STRUCT_LCONV = @REPLACE_STRUCT_LCONV@
-REPLACE_STRUCT_TIMEVAL = @REPLACE_STRUCT_TIMEVAL@
-REPLACE_SYMLINK = @REPLACE_SYMLINK@
-REPLACE_TIMEGM = @REPLACE_TIMEGM@
-REPLACE_TMPFILE = @REPLACE_TMPFILE@
-REPLACE_TOWLOWER = @REPLACE_TOWLOWER@
-REPLACE_TTYNAME_R = @REPLACE_TTYNAME_R@
-REPLACE_UNLINK = @REPLACE_UNLINK@
-REPLACE_UNLINKAT = @REPLACE_UNLINKAT@
-REPLACE_UNSETENV = @REPLACE_UNSETENV@
-REPLACE_USLEEP = @REPLACE_USLEEP@
-REPLACE_UTIMENSAT = @REPLACE_UTIMENSAT@
-REPLACE_VASPRINTF = @REPLACE_VASPRINTF@
-REPLACE_VDPRINTF = @REPLACE_VDPRINTF@
-REPLACE_VFPRINTF = @REPLACE_VFPRINTF@
-REPLACE_VPRINTF = @REPLACE_VPRINTF@
-REPLACE_VSNPRINTF = @REPLACE_VSNPRINTF@
-REPLACE_VSPRINTF = @REPLACE_VSPRINTF@
-REPLACE_WCRTOMB = @REPLACE_WCRTOMB@
-REPLACE_WCSNRTOMBS = @REPLACE_WCSNRTOMBS@
-REPLACE_WCSRTOMBS = @REPLACE_WCSRTOMBS@
-REPLACE_WCSWIDTH = @REPLACE_WCSWIDTH@
-REPLACE_WCTOB = @REPLACE_WCTOB@
-REPLACE_WCTOMB = @REPLACE_WCTOMB@
-REPLACE_WCWIDTH = @REPLACE_WCWIDTH@
-REPLACE_WRITE = @REPLACE_WRITE@
-SED_FEATURE_VERSION = @SED_FEATURE_VERSION@
-SELINUX_CONTEXT_H = @SELINUX_CONTEXT_H@
-SET_MAKE = @SET_MAKE@
-SHELL = @SHELL@
-SIG_ATOMIC_T_SUFFIX = @SIG_ATOMIC_T_SUFFIX@
-SIZE_T_SUFFIX = @SIZE_T_SUFFIX@
-STDARG_H = @STDARG_H@
-STDBOOL_H = @STDBOOL_H@
-STDDEF_H = @STDDEF_H@
-STDINT_H = @STDINT_H@
-STRIP = @STRIP@
-SYS_TIME_H_DEFINES_STRUCT_TIMESPEC = @SYS_TIME_H_DEFINES_STRUCT_TIMESPEC@
-TIME_H_DEFINES_STRUCT_TIMESPEC = @TIME_H_DEFINES_STRUCT_TIMESPEC@
-UNDEFINE_STRTOK_R = @UNDEFINE_STRTOK_R@
-UNISTD_H_HAVE_WINSOCK2_H = @UNISTD_H_HAVE_WINSOCK2_H@
-UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS = @UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS@
-USE_ACL = @USE_ACL@
-USE_NLS = @USE_NLS@
-VERSION = @VERSION@
-WCHAR_T_SUFFIX = @WCHAR_T_SUFFIX@
-WINDOWS_64_BIT_OFF_T = @WINDOWS_64_BIT_OFF_T@
-WINDOWS_64_BIT_ST_SIZE = @WINDOWS_64_BIT_ST_SIZE@
-WINT_T_SUFFIX = @WINT_T_SUFFIX@
-XFAIL_TESTS = @XFAIL_TESTS@
-XGETTEXT = @XGETTEXT@
-XGETTEXT_015 = @XGETTEXT_015@
-XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@
-abs_builddir = @abs_builddir@
-abs_srcdir = @abs_srcdir@
-abs_top_builddir = @abs_top_builddir@
-abs_top_srcdir = @abs_top_srcdir@
-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@
-bindir = @bindir@
-build = @build@
-build_alias = @build_alias@
-build_cpu = @build_cpu@
-build_os = @build_os@
-build_vendor = @build_vendor@
-builddir = @builddir@
-datadir = @datadir@
-datarootdir = @datarootdir@
-docdir = @docdir@
-dvidir = @dvidir@
-exec_prefix = @exec_prefix@
-gl_LIBOBJS = @gl_LIBOBJS@
-gl_LTLIBOBJS = @gl_LTLIBOBJS@
-gltests_LIBOBJS = @gltests_LIBOBJS@
-gltests_LTLIBOBJS = @gltests_LTLIBOBJS@
-gltests_WITNESS = @gltests_WITNESS@
-host = @host@
-host_alias = @host_alias@
-host_cpu = @host_cpu@
-host_os = @host_os@
-host_vendor = @host_vendor@
-htmldir = @htmldir@
-includedir = @includedir@
-infodir = @infodir@
-install_sh = @install_sh@
-libdir = @libdir@
-libexecdir = @libexecdir@
-lispdir = @lispdir@
-localedir = $(datadir)/locale
-localstatedir = @localstatedir@
-mandir = @mandir@
-mkdir_p = @mkdir_p@
-oldincludedir = @oldincludedir@
-pdfdir = @pdfdir@
-prefix = @prefix@
-program_transform_name = @program_transform_name@
-psdir = @psdir@
-sbindir = @sbindir@
-sharedstatedir = @sharedstatedir@
-srcdir = @srcdir@
-sysconfdir = @sysconfdir@
-target_alias = @target_alias@
-top_build_prefix = @top_build_prefix@
-top_builddir = @top_builddir@
-top_srcdir = @top_srcdir@
-sed_SOURCES = sed.c compile.c execute.c regexp.c fmt.c mbcs.c utils.c
-noinst_HEADERS = sed.h utils.h
-AM_CPPFLAGS = -I$(top_srcdir)/lib -I$(top_srcdir) -I$(top_builddir)/lib \
- -DLOCALEDIR=\"$(localedir)\"
-
-sed_LDADD = ../lib/libsed.a @INTLLIBS@ @LIB_ACL@ @LIB_SELINUX@
-sed_DEPENDENCIES = ../lib/libsed.a
-all: all-am
-
-.SUFFIXES:
-.SUFFIXES: .c .o .obj
-$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
- @for dep in $?; do \
- case '$(am__configure_deps)' in \
- *$$dep*) \
- ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
- && { if test -f $@; then exit 0; else break; fi; }; \
- exit 1;; \
- esac; \
- done; \
- echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnits sed/Makefile'; \
- $(am__cd) $(top_srcdir) && \
- $(AUTOMAKE) --gnits sed/Makefile
-.PRECIOUS: Makefile
-Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
- @case '$?' in \
- *config.status*) \
- cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
- *) \
- echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
- cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
- esac;
-
-$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
- cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
-
-$(top_srcdir)/configure: $(am__configure_deps)
- cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
-$(ACLOCAL_M4): $(am__aclocal_m4_deps)
- cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
-$(am__aclocal_m4_deps):
-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)
-
-installcheck-binPROGRAMS: $(bin_PROGRAMS)
- bad=0; pid=$$$$; list="$(bin_PROGRAMS)"; for p in $$list; do \
- case ' $(AM_INSTALLCHECK_STD_OPTIONS_EXEMPT) ' in \
- *" $$p "* | *" $(srcdir)/$$p "*) continue;; \
- esac; \
- f=`echo "$$p" | \
- sed 's,^.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/'`; \
- for opt in --help --version; do \
- if "$(DESTDIR)$(bindir)/$$f" $$opt >c$${pid}_.out \
- 2>c$${pid}_.err </dev/null \
- && test -n "`cat c$${pid}_.out`" \
- && test -z "`cat c$${pid}_.err`"; then :; \
- else echo "$$f does not support $$opt" 1>&2; bad=1; fi; \
- done; \
- done; rm -f c$${pid}_.???; exit $$bad
-sed$(EXEEXT): $(sed_OBJECTS) $(sed_DEPENDENCIES) $(EXTRA_sed_DEPENDENCIES)
- @rm -f sed$(EXEEXT)
- $(LINK) $(sed_OBJECTS) $(sed_LDADD) $(LIBS)
-
-mostlyclean-compile:
- -rm -f *.$(OBJEXT)
-
-distclean-compile:
- -rm -f *.tab.c
-
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/compile.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/execute.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fmt.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mbcs.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/regexp.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sed.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/utils.Po@am__quote@
-
-.c.o:
-@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
-@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(COMPILE) -c $<
-
-.c.obj:
-@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
-@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'`
-
-ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
- list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
- unique=`for i in $$list; do \
- if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
- done | \
- $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
- END { if (nonempty) { for (i in files) print i; }; }'`; \
- mkid -fID $$unique
-tags: TAGS
-
-TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
- $(TAGS_FILES) $(LISP)
- set x; \
- here=`pwd`; \
- list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
- unique=`for i in $$list; do \
- if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
- done | \
- $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
- END { if (nonempty) { for (i in files) print i; }; }'`; \
- shift; \
- if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
- test -n "$$unique" || unique=$$empty_fix; \
- if test $$# -gt 0; then \
- $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
- "$$@" $$unique; \
- else \
- $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
- $$unique; \
- fi; \
- fi
-ctags: CTAGS
-CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
- $(TAGS_FILES) $(LISP)
- list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
- unique=`for i in $$list; do \
- if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
- done | \
- $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
- END { if (nonempty) { for (i in files) print i; }; }'`; \
- test -z "$(CTAGS_ARGS)$$unique" \
- || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
- $$unique
-
-GTAGS:
- here=`$(am__cd) $(top_builddir) && pwd` \
- && $(am__cd) $(top_srcdir) \
- && gtags -i $(GTAGS_ARGS) "$$here"
-
-cscopelist: $(HEADERS) $(SOURCES) $(LISP)
- list='$(SOURCES) $(HEADERS) $(LISP)'; \
- case "$(srcdir)" in \
- [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \
- *) sdir=$(subdir)/$(srcdir) ;; \
- esac; \
- for i in $$list; do \
- if test -f "$$i"; then \
- echo "$(subdir)/$$i"; \
- else \
- echo "$$sdir/$$i"; \
- fi; \
- done >> $(top_builddir)/cscope.files
-
-distclean-tags:
- -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
-
-distdir: $(DISTFILES)
- @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
- topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
- list='$(DISTFILES)'; \
- dist_files=`for file in $$list; do echo $$file; done | \
- sed -e "s|^$$srcdirstrip/||;t" \
- -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
- case $$dist_files in \
- */*) $(MKDIR_P) `echo "$$dist_files" | \
- sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
- sort -u` ;; \
- esac; \
- for file in $$dist_files; do \
- if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
- if test -d $$d/$$file; then \
- dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
- if test -d "$(distdir)/$$file"; then \
- find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
- fi; \
- if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
- cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
- find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
- fi; \
- cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
- else \
- test -f "$(distdir)/$$file" \
- || cp -p $$d/$$file "$(distdir)/$$file" \
- || exit 1; \
- fi; \
- done
-check-am: all-am
-check: check-am
-all-am: Makefile $(PROGRAMS) $(HEADERS)
-installdirs:
- for dir in "$(DESTDIR)$(bindir)"; do \
- test -z "$$dir" || $(MKDIR_P) "$$dir"; \
- done
-install: install-am
-install-exec: install-exec-am
-install-data: install-data-am
-uninstall: uninstall-am
-
-install-am: all-am
- @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
-
-installcheck: installcheck-am
-install-strip:
- if test -z '$(STRIP)'; then \
- $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
- install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
- install; \
- else \
- $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
- install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
- "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
- fi
-mostlyclean-generic:
-
-clean-generic:
-
-distclean-generic:
- -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
- -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
-
-maintainer-clean-generic:
- @echo "This command is intended for maintainers to use"
- @echo "it deletes files that may require special tools to rebuild."
-clean: clean-am
-
-clean-am: clean-binPROGRAMS clean-generic mostlyclean-am
-
-distclean: distclean-am
- -rm -rf ./$(DEPDIR)
- -rm -f Makefile
-distclean-am: clean-am distclean-compile distclean-generic \
- distclean-tags
-
-dvi: dvi-am
-
-dvi-am:
-
-html: html-am
-
-html-am:
-
-info: info-am
-
-info-am:
-
-install-data-am:
-
-install-dvi: install-dvi-am
-
-install-dvi-am:
-
-install-exec-am: install-binPROGRAMS
-
-install-html: install-html-am
-
-install-html-am:
-
-install-info: install-info-am
-
-install-info-am:
-
-install-man:
-
-install-pdf: install-pdf-am
-
-install-pdf-am:
-
-install-ps: install-ps-am
-
-install-ps-am:
-
-installcheck-am: installcheck-binPROGRAMS
-
-maintainer-clean: maintainer-clean-am
- -rm -rf ./$(DEPDIR)
- -rm -f Makefile
-maintainer-clean-am: distclean-am maintainer-clean-generic
-
-mostlyclean: mostlyclean-am
-
-mostlyclean-am: mostlyclean-compile mostlyclean-generic
-
-pdf: pdf-am
-
-pdf-am:
-
-ps: ps-am
-
-ps-am:
-
-uninstall-am: uninstall-binPROGRAMS
-
-.MAKE: install-am install-strip
-
-.PHONY: CTAGS GTAGS all all-am check check-am clean clean-binPROGRAMS \
- clean-generic cscopelist ctags distclean distclean-compile \
- distclean-generic distclean-tags distdir 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-html install-html-am \
- install-info install-info-am install-man install-pdf \
- install-pdf-am install-ps install-ps-am install-strip \
- installcheck installcheck-am installcheck-binPROGRAMS \
- installdirs maintainer-clean maintainer-clean-generic \
- mostlyclean mostlyclean-compile mostlyclean-generic pdf pdf-am \
- ps ps-am tags uninstall uninstall-am uninstall-binPROGRAMS
-
-
-$(PROGRAMS): $(LDADD)
-
-# 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/sed/compile.c b/sed/compile.c
index 513fac5..7a28e56 100644
--- a/sed/compile.c
+++ b/sed/compile.c
@@ -1,6 +1,5 @@
/* GNU SED, a batch stream editor.
- Copyright (C) 1989,90,91,92,93,94,95,98,99,2002,2003,2004,2005,2006,2008,2010
- Free Software Foundation, Inc.
+ Copyright (C) 1989-2016 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -33,7 +32,7 @@
/* let's not confuse text editors that have only dumb bracket-matching... */
#define OPEN_BRACKET '['
#define CLOSE_BRACKET ']'
-#define OPEN_BRACE '{'
+/* #define OPEN_BRACE '{' */
#define CLOSE_BRACE '}'
struct prog_info {
@@ -78,11 +77,11 @@ struct special_files {
FILE **pfp;
};
-FILE *my_stdin, *my_stdout, *my_stderr;
-struct special_files special_files[] = {
- { { "/dev/stdin", false, NULL, NULL }, &my_stdin },
- { { "/dev/stdout", false, NULL, NULL }, &my_stdout },
- { { "/dev/stderr", false, NULL, NULL }, &my_stderr },
+static FILE *my_stdin, *my_stdout, *my_stderr;
+static struct special_files special_files[] = {
+ { { (char *) "/dev/stdin", false, NULL, NULL }, &my_stdin },
+ { { (char *) "/dev/stdout", false, NULL, NULL }, &my_stdout },
+ { { (char *) "/dev/stderr", false, NULL, NULL }, &my_stderr },
{ { NULL, false, NULL, NULL }, NULL }
};
@@ -138,44 +137,67 @@ static const char errors[] =
"expected newer version of sed\0"
"invalid usage of line address 0\0"
"unknown command: `%c'\0"
- "incomplete command";
+ "incomplete command\0"
+ "\":\" lacks a label\0"
+ "recursive escaping after \\c not allowed\0"
+ "e/r/w commands disabled in sandbox mode";
#define BAD_BANG (errors)
#define BAD_COMMA (BAD_BANG + sizeof(N_("multiple `!'s")))
#define BAD_STEP (BAD_COMMA + sizeof(N_("unexpected `,'")))
-#define EXCESS_OPEN_BRACE (BAD_STEP + sizeof(N_("invalid usage of +N or ~N as first address")))
+#define EXCESS_OPEN_BRACE (BAD_STEP \
+ + sizeof(N_("invalid usage of +N or ~N as first address")))
#define EXCESS_CLOSE_BRACE (EXCESS_OPEN_BRACE + sizeof(N_("unmatched `{'")))
#define EXCESS_JUNK (EXCESS_CLOSE_BRACE + sizeof(N_("unexpected `}'")))
-#define EXPECTED_SLASH (EXCESS_JUNK + sizeof(N_("extra characters after command")))
-#define NO_CLOSE_BRACE_ADDR (EXPECTED_SLASH + sizeof(N_("expected \\ after `a', `c' or `i'")))
-#define NO_COLON_ADDR (NO_CLOSE_BRACE_ADDR + sizeof(N_("`}' doesn't want any addresses")))
-#define NO_SHARP_ADDR (NO_COLON_ADDR + sizeof(N_(": doesn't want any addresses")))
-#define NO_COMMAND (NO_SHARP_ADDR + sizeof(N_("comments don't accept any addresses")))
+#define EXPECTED_SLASH (EXCESS_JUNK \
+ + sizeof(N_("extra characters after command")))
+#define NO_CLOSE_BRACE_ADDR (EXPECTED_SLASH \
+ + sizeof(N_("expected \\ after `a', `c' or `i'")))
+#define NO_COLON_ADDR (NO_CLOSE_BRACE_ADDR \
+ + sizeof(N_("`}' doesn't want any addresses")))
+#define NO_SHARP_ADDR (NO_COLON_ADDR \
+ + sizeof(N_(": doesn't want any addresses")))
+#define NO_COMMAND (NO_SHARP_ADDR \
+ + sizeof(N_("comments don't accept any addresses")))
#define ONE_ADDR (NO_COMMAND + sizeof(N_("missing command")))
#define UNTERM_ADDR_RE (ONE_ADDR + sizeof(N_("command only uses one address")))
#define UNTERM_S_CMD (UNTERM_ADDR_RE + sizeof(N_("unterminated address regex")))
#define UNTERM_Y_CMD (UNTERM_S_CMD + sizeof(N_("unterminated `s' command")))
#define UNKNOWN_S_OPT (UNTERM_Y_CMD + sizeof(N_("unterminated `y' command")))
#define EXCESS_P_OPT (UNKNOWN_S_OPT + sizeof(N_("unknown option to `s'")))
-#define EXCESS_G_OPT (EXCESS_P_OPT + sizeof(N_("multiple `p' options to `s' command")))
-#define EXCESS_N_OPT (EXCESS_G_OPT + sizeof(N_("multiple `g' options to `s' command")))
-#define ZERO_N_OPT (EXCESS_N_OPT + sizeof(N_("multiple number options to `s' command")))
-#define Y_CMD_LEN (ZERO_N_OPT + sizeof(N_("number option to `s' command may not be zero")))
-#define BAD_DELIM (Y_CMD_LEN + sizeof(N_("strings for `y' command are different lengths")))
-#define ANCIENT_VERSION (BAD_DELIM + sizeof(N_("delimiter character is not a single-byte character")))
-#define INVALID_LINE_0 (ANCIENT_VERSION + sizeof(N_("expected newer version of sed")))
-#define UNKNOWN_CMD (INVALID_LINE_0 + sizeof(N_("invalid usage of line address 0")))
+#define EXCESS_G_OPT (EXCESS_P_OPT \
+ + sizeof(N_("multiple `p' options to `s' command")))
+#define EXCESS_N_OPT (EXCESS_G_OPT \
+ + sizeof(N_("multiple `g' options to `s' command")))
+#define ZERO_N_OPT (EXCESS_N_OPT \
+ + sizeof(N_("multiple number options to `s' command")))
+#define Y_CMD_LEN (ZERO_N_OPT \
+ + sizeof(N_("number option to `s' command may not be zero")))
+#define BAD_DELIM (Y_CMD_LEN \
+ + sizeof(N_("strings for `y' command are different lengths")))
+#define ANCIENT_VERSION (BAD_DELIM \
+ + sizeof(N_("delimiter character is not a single-byte character")))
+#define INVALID_LINE_0 (ANCIENT_VERSION \
+ + sizeof(N_("expected newer version of sed")))
+#define UNKNOWN_CMD (INVALID_LINE_0 \
+ + sizeof(N_("invalid usage of line address 0")))
#define INCOMPLETE_CMD (UNKNOWN_CMD + sizeof(N_("unknown command: `%c'")))
-#define END_ERRORS (INCOMPLETE_CMD + sizeof(N_("incomplete command")))
+#define COLON_LACKS_LABEL (INCOMPLETE_CMD \
+ + sizeof(N_("incomplete command")))
+#define RECURSIVE_ESCAPE_C (COLON_LACKS_LABEL \
+ + sizeof(N_("\":\" lacks a label")))
+#define DISALLOWED_CMD (RECURSIVE_ESCAPE_C \
+ + sizeof(N_("recursive escaping after \\c not allowed")))
+/* #define END_ERRORS (DISALLOWED_CMD \
+ + sizeof(N_( "e/r/w commands disabled in sandbox mode"))) */
static struct output *file_read = NULL;
static struct output *file_write = NULL;
/* Complain about an unknown command and exit. */
-void
-bad_command(ch)
- char ch;
+static void
+bad_command(char ch)
{
const char *msg = _(UNKNOWN_CMD);
char *unknown_cmd = xmalloc(strlen(msg));
@@ -185,40 +207,38 @@ bad_command(ch)
/* Complain about a programming error and exit. */
void
-bad_prog(why)
- const char *why;
+bad_prog(const char *why)
{
if (cur_input.name)
fprintf(stderr, _("%s: file %s line %lu: %s\n"),
- myname, cur_input.name, (unsigned long)cur_input.line, why);
+ myname, cur_input.name, (unsigned long)cur_input.line, why);
else
fprintf(stderr, _("%s: -e expression #%lu, char %lu: %s\n"),
- myname,
- (unsigned long)cur_input.string_expr_count,
- (unsigned long)(prog.cur-prog.base),
- why);
- exit(EXIT_FAILURE);
+ myname,
+ (unsigned long)cur_input.string_expr_count,
+ (unsigned long)(prog.cur-prog.base),
+ why);
+ exit(EXIT_BAD_USAGE);
}
/* Read the next character from the program. Return EOF if there isn't
anything to read. Keep cur_input.line up to date, so error messages
can be meaningful. */
-static int inchar (void);
static int
-inchar()
+inchar(void)
{
int ch = EOF;
if (prog.cur)
{
if (prog.cur < prog.end)
- ch = *prog.cur++;
+ ch = *prog.cur++;
}
else if (prog.file)
{
if (!feof(prog.file))
- ch = getc(prog.file);
+ ch = getc(prog.file);
}
if (ch == '\n')
++cur_input.line;
@@ -226,10 +246,8 @@ inchar()
}
/* unget `ch' so the next call to inchar will return it. */
-static void savchar (int ch);
static void
-savchar(ch)
- int ch;
+savchar(int ch)
{
if (ch == EOF)
return;
@@ -238,17 +256,16 @@ savchar(ch)
if (prog.cur)
{
if (prog.cur <= prog.base || *--prog.cur != ch)
- panic("Called savchar() with unexpected pushback (%x)",
- (unsigned char)ch);
+ panic("Called savchar() with unexpected pushback (%x)",
+ (unsigned char)ch);
}
else
ungetc(ch, prog.file);
}
/* Read the next non-blank character from the program. */
-static int in_nonblank (void);
static int
-in_nonblank()
+in_nonblank(void)
{
int ch;
do
@@ -258,10 +275,8 @@ in_nonblank()
}
/* Read an integer value from the program. */
-static countT in_integer (int ch);
static countT
-in_integer(ch)
- int ch;
+in_integer (int ch)
{
countT num = 0;
@@ -274,23 +289,15 @@ in_integer(ch)
return num;
}
-static int add_then_next (struct buffer *b, int ch);
static int
-add_then_next(b, ch)
- struct buffer *b;
- int ch;
+add_then_next(struct buffer *b, int ch)
{
add1_buffer(b, ch);
return inchar();
}
-static char * convert_number (char *, char *, const char *, int);
static char *
-convert_number(result, buf, bufend, base)
- char *result;
- char *buf;
- const char *bufend;
- int base;
+convert_number(char *result, char *buf, const char *bufend, int base)
{
int n = 0;
int max = 1;
@@ -300,26 +307,26 @@ convert_number(result, buf, bufend, base)
{
int d = -1;
switch (*p)
- {
- case '0': d = 0x0; break;
- case '1': d = 0x1; break;
- case '2': d = 0x2; break;
- case '3': d = 0x3; break;
- case '4': d = 0x4; break;
- case '5': d = 0x5; break;
- case '6': d = 0x6; break;
- case '7': d = 0x7; break;
- case '8': d = 0x8; break;
- case '9': d = 0x9; break;
- case 'A': case 'a': d = 0xa; break;
- case 'B': case 'b': d = 0xb; break;
- case 'C': case 'c': d = 0xc; break;
- case 'D': case 'd': d = 0xd; break;
- case 'E': case 'e': d = 0xe; break;
- case 'F': case 'f': d = 0xf; break;
- }
+ {
+ case '0': d = 0x0; break;
+ case '1': d = 0x1; break;
+ case '2': d = 0x2; break;
+ case '3': d = 0x3; break;
+ case '4': d = 0x4; break;
+ case '5': d = 0x5; break;
+ case '6': d = 0x6; break;
+ case '7': d = 0x7; break;
+ case '8': d = 0x8; break;
+ case '9': d = 0x9; break;
+ case 'A': case 'a': d = 0xa; break;
+ case 'B': case 'b': d = 0xb; break;
+ case 'C': case 'c': d = 0xc; break;
+ case 'D': case 'd': d = 0xd; break;
+ case 'E': case 'e': d = 0xe; break;
+ case 'F': case 'f': d = 0xf; break;
+ }
if (d < 0 || base <= d)
- break;
+ break;
n = n * base + d;
}
if (p == buf+1)
@@ -331,24 +338,26 @@ convert_number(result, buf, bufend, base)
/* Read in a filename for a `r', `w', or `s///w' command. */
-static struct buffer *read_filename (void);
static struct buffer *
-read_filename()
+read_filename(void)
{
struct buffer *b;
int ch;
+ if (sandbox)
+ bad_prog(_(DISALLOWED_CMD));
+
b = init_buffer();
ch = in_nonblank();
while (ch != EOF && ch != '\n')
{
#if 0 /*XXX ZZZ 1998-09-12 kpp: added, then had second thoughts*/
if (posixicity == POSIXLY_EXTENDED)
- if (ch == ';' || ch == '#')
- {
- savchar(ch);
- break;
- }
+ if (ch == ';' || ch == '#')
+ {
+ savchar(ch);
+ break;
+ }
#endif
ch = add_then_next(b, ch);
}
@@ -356,12 +365,8 @@ read_filename()
return b;
}
-static struct output *get_openfile (struct output **file_ptrs, const char *mode, int fail);
static struct output *
-get_openfile(file_ptrs, mode, fail)
- struct output **file_ptrs;
- const char *mode;
- int fail;
+get_openfile (struct output **file_ptrs, const char *mode, int fail)
{
struct buffer *b;
char *file_name;
@@ -377,16 +382,16 @@ get_openfile(file_ptrs, mode, fail)
{
/* Check whether it is a special file (stdin, stdout or stderr) */
struct special_files *special = special_files;
-
+
/* std* sometimes are not constants, so they
cannot be used in the initializer for special_files */
my_stdin = stdin; my_stdout = stdout; my_stderr = stderr;
for (special = special_files; special->outf.name; special++)
if (strcmp(special->outf.name, file_name) == 0)
{
- special->outf.fp = *special->pfp;
- free_buffer (b);
- return &special->outf;
+ special->outf.fp = *special->pfp;
+ free_buffer (b);
+ return &special->outf;
}
}
@@ -404,10 +409,8 @@ get_openfile(file_ptrs, mode, fail)
}
-static struct sed_cmd *next_cmd_entry (struct vector **vectorp);
static struct sed_cmd *
-next_cmd_entry(vectorp)
- struct vector **vectorp;
+next_cmd_entry (struct vector **vectorp)
{
struct sed_cmd *cmd;
struct vector *v;
@@ -430,79 +433,75 @@ next_cmd_entry(vectorp)
return cmd;
}
-static int snarf_char_class (struct buffer *b, mbstate_t *cur_stat);
static int
-snarf_char_class(b, cur_stat)
- struct buffer *b;
- mbstate_t *cur_stat;
+snarf_char_class (struct buffer *b, mbstate_t *cur_stat)
{
int ch;
int state = 0;
- int delim;
- bool pending_mb = 0;
-
+ int delim IF_LINT ( = 0) ;
+
ch = inchar();
if (ch == '^')
ch = add_then_next(b, ch);
if (ch == CLOSE_BRACKET)
ch = add_then_next(b, ch);
-
+
/* States are:
- 0 outside a collation element, character class or collation class
- 1 after the bracket
- 2 after the opening ./:/=
- 3 after the closing ./:/= */
+ 0 outside a collation element, character class or collation class
+ 1 after the bracket
+ 2 after the opening ./:/=
+ 3 after the closing ./:/= */
for (;; ch = add_then_next (b, ch))
{
- pending_mb = BRLEN (ch, cur_stat) != 1;
+ const int mb_char = IS_MB_CHAR (ch, cur_stat);
switch (ch)
- {
- case EOF:
- case '\n':
- return ch;
-
- case '.':
- case ':':
- case '=':
- if (pending_mb)
- continue;
-
- if (state == 1)
- {
- delim = ch;
- state = 2;
- }
- else if (state == 2 && ch == delim)
- state = 3;
- else
- break;
-
- continue;
-
- case OPEN_BRACKET:
- if (pending_mb)
- continue;
-
- if (state == 0)
- state = 1;
- continue;
-
- case CLOSE_BRACKET:
- if (pending_mb)
- continue;
-
- if (state == 0 || state == 1)
- return ch;
- else if (state == 3)
- state = 0;
-
- break;
-
- default:
- break;
- }
+ {
+ case EOF:
+ case '\n':
+ return ch;
+
+ case '.':
+ case ':':
+ case '=':
+ if (mb_char)
+ continue;
+
+ if (state == 1)
+ {
+ delim = ch;
+ state = 2;
+ }
+ else if (state == 2 && ch == delim)
+ state = 3;
+ else
+ break;
+
+ continue;
+
+ case OPEN_BRACKET:
+ if (mb_char)
+ continue;
+
+ if (state == 0)
+ state = 1;
+ continue;
+
+ case CLOSE_BRACKET:
+ if (mb_char)
+ continue;
+
+ if (state == 0 || state == 1)
+ return ch;
+ else if (state == 3)
+ state = 0;
+
+ break;
+
+ default:
+ break;
+ }
/* Getting a character different from .=: whilst in state 1
goes back to state 0, getting a character different from ]
@@ -511,52 +510,48 @@ snarf_char_class(b, cur_stat)
}
}
-static struct buffer *match_slash (int slash, int regex);
static struct buffer *
-match_slash(slash, regex)
- int slash;
- int regex;
+match_slash (int slash, int regex)
{
struct buffer *b;
int ch;
- mbstate_t cur_stat;
-
- memset (&cur_stat, 0, sizeof (mbstate_t));
+ mbstate_t cur_stat = { 0, };
/* We allow only 1 byte characters for a slash. */
- if (BRLEN (slash, &cur_stat) == -2)
+ if (IS_MB_CHAR (slash, &cur_stat))
bad_prog (BAD_DELIM);
- memset (&cur_stat, 0, sizeof (mbstate_t));
+ memset (&cur_stat, 0, sizeof cur_stat);
b = init_buffer();
while ((ch = inchar()) != EOF && ch != '\n')
{
- bool pending_mb = !MBSINIT (&cur_stat);
- if (BRLEN (ch, &cur_stat) == 1 && !pending_mb)
- {
- if (ch == slash)
- return b;
- else if (ch == '\\')
- {
- ch = inchar();
- if (ch == EOF)
- break;
+ const int mb_char = IS_MB_CHAR (ch, &cur_stat);
+
+ if (!mb_char)
+ {
+ if (ch == slash)
+ return b;
+ else if (ch == '\\')
+ {
+ ch = inchar();
+ if (ch == EOF)
+ break;
#ifndef REG_PERL
- else if (ch == 'n' && regex)
- ch = '\n';
+ else if (ch == 'n' && regex)
+ ch = '\n';
#endif
- else if (ch != '\n' && (ch != slash || (!regex && ch == '&')))
- add1_buffer(b, '\\');
- }
+ else if (ch != '\n' && (ch != slash || (!regex && ch == '&')))
+ add1_buffer(b, '\\');
+ }
else if (ch == OPEN_BRACKET && regex)
- {
- add1_buffer(b, ch);
- ch = snarf_char_class(b, &cur_stat);
- if (ch != CLOSE_BRACKET)
- break;
- }
- }
+ {
+ add1_buffer(b, ch);
+ ch = snarf_char_class(b, &cur_stat);
+ if (ch != CLOSE_BRACKET)
+ break;
+ }
+ }
add1_buffer(b, ch);
}
@@ -567,10 +562,8 @@ match_slash(slash, regex)
return NULL;
}
-static int mark_subst_opts (struct subst *cmd);
static int
-mark_subst_opts(cmd)
- struct subst *cmd;
+mark_subst_opts (struct subst *cmd)
{
int flags = 0;
int ch;
@@ -586,90 +579,91 @@ mark_subst_opts(cmd)
{
case 'i': /* GNU extension */
case 'I': /* GNU extension */
- if (posixicity == POSIXLY_BASIC)
- bad_prog(_(UNKNOWN_S_OPT));
- flags |= REG_ICASE;
- break;
+ if (posixicity == POSIXLY_BASIC)
+ bad_prog(_(UNKNOWN_S_OPT));
+ flags |= REG_ICASE;
+ break;
#ifdef REG_PERL
case 's': /* GNU extension */
case 'S': /* GNU extension */
- if (posixicity == POSIXLY_BASIC)
- bad_prog(_(UNKNOWN_S_OPT));
- if (extended_regexp_flags & REG_PERL)
- flags |= REG_DOTALL;
- break;
+ if (posixicity == POSIXLY_BASIC)
+ bad_prog(_(UNKNOWN_S_OPT));
+ if (extended_regexp_flags & REG_PERL)
+ flags |= REG_DOTALL;
+ break;
case 'x': /* GNU extension */
case 'X': /* GNU extension */
- if (posixicity == POSIXLY_BASIC)
- bad_prog(_(UNKNOWN_S_OPT));
- if (extended_regexp_flags & REG_PERL)
- flags |= REG_EXTENDED;
- break;
+ if (posixicity == POSIXLY_BASIC)
+ bad_prog(_(UNKNOWN_S_OPT));
+ if (extended_regexp_flags & REG_PERL)
+ flags |= REG_EXTENDED;
+ break;
#endif
case 'm': /* GNU extension */
case 'M': /* GNU extension */
- if (posixicity == POSIXLY_BASIC)
- bad_prog(_(UNKNOWN_S_OPT));
- flags |= REG_NEWLINE;
- break;
+ if (posixicity == POSIXLY_BASIC)
+ bad_prog(_(UNKNOWN_S_OPT));
+ flags |= REG_NEWLINE;
+ break;
case 'e':
- cmd->eval = true;
- break;
+ if (posixicity == POSIXLY_BASIC)
+ bad_prog(_(UNKNOWN_S_OPT));
+ cmd->eval = true;
+ break;
case 'p':
- if (cmd->print)
- bad_prog(_(EXCESS_P_OPT));
- cmd->print |= (1 << cmd->eval); /* 1=before eval, 2=after */
- break;
+ if (cmd->print)
+ bad_prog(_(EXCESS_P_OPT));
+ cmd->print |= (1 << cmd->eval); /* 1=before eval, 2=after */
+ break;
case 'g':
- if (cmd->global)
- bad_prog(_(EXCESS_G_OPT));
- cmd->global = true;
- break;
+ if (cmd->global)
+ bad_prog(_(EXCESS_G_OPT));
+ cmd->global = true;
+ break;
case 'w':
- cmd->outf = get_openfile(&file_write, write_mode, true);
- return flags;
+ cmd->outf = get_openfile(&file_write, write_mode, true);
+ return flags;
case '0': case '1': case '2': case '3': case '4':
case '5': case '6': case '7': case '8': case '9':
- if (cmd->numb)
- bad_prog(_(EXCESS_N_OPT));
- cmd->numb = in_integer(ch);
- if (!cmd->numb)
- bad_prog(_(ZERO_N_OPT));
- break;
+ if (cmd->numb)
+ bad_prog(_(EXCESS_N_OPT));
+ cmd->numb = in_integer(ch);
+ if (!cmd->numb)
+ bad_prog(_(ZERO_N_OPT));
+ break;
case CLOSE_BRACE:
case '#':
- savchar(ch);
- /* Fall Through */
+ savchar(ch);
+ /* Fall Through */
case EOF:
case '\n':
case ';':
- return flags;
+ return flags;
case '\r':
- if (inchar() == '\n')
- return flags;
- /* FALLTHROUGH */
+ if (inchar() == '\n')
+ return flags;
+ /* FALLTHROUGH */
default:
- bad_prog(_(UNKNOWN_S_OPT));
- /*NOTREACHED*/
+ bad_prog(_(UNKNOWN_S_OPT));
+ /*NOTREACHED*/
}
}
/* read in a label for a `:', `b', or `t' command */
-static char *read_label (void);
static char *
-read_label()
+read_label (void)
{
struct buffer *b;
int ch;
@@ -679,7 +673,7 @@ read_label()
ch = in_nonblank();
while (ch != EOF && ch != '\n'
- && !ISBLANK(ch) && ch != ';' && ch != CLOSE_BRACE && ch != '#')
+ && !ISBLANK(ch) && ch != ';' && ch != CLOSE_BRACE && ch != '#')
ch = add_then_next (b, ch);
savchar(ch);
@@ -693,14 +687,9 @@ read_label()
command so that the jump to/from the label can be backpatched after
compilation is complete, or a reference created by a `{' to be
backpatched when the corresponding `}' is found. */
-static struct sed_label *setup_label
- (struct sed_label *, countT, char *, const struct error_info *);
static struct sed_label *
-setup_label(list, idx, name, err_info)
- struct sed_label *list;
- countT idx;
- char *name;
- const struct error_info *err_info;
+setup_label(struct sed_label *list, countT idx, char *name,
+ const struct error_info *err_info)
{
struct sed_label *ret = OB_MALLOC(&obs, 1, struct sed_label);
ret->v_index = idx;
@@ -711,10 +700,8 @@ setup_label(list, idx, name, err_info)
return ret;
}
-static struct sed_label *release_label (struct sed_label *list_head);
static struct sed_label *
-release_label(list_head)
- struct sed_label *list_head;
+release_label (struct sed_label *list_head)
{
struct sed_label *ret;
@@ -745,12 +732,8 @@ new_replacement(char *text, size_t length, enum replacement_types type)
return r;
}
-static void setup_replacement (struct subst *, const char *, size_t);
static void
-setup_replacement(sub, text, length)
- struct subst *sub;
- const char *text;
- size_t length;
+setup_replacement (struct subst *sub, const char *text, size_t length)
{
char *base;
char *p;
@@ -769,77 +752,77 @@ setup_replacement(sub, text, length)
for (p=base; p<text_end; ++p)
{
if (*p == '\\')
- {
- /* Preceding the backslash may be some literal text: */
- tail = tail->next =
- new_replacement(base, (size_t)(p - base), repl_type);
-
- repl_type = save_type;
-
- /* Skip the backslash and look for a numeric back-reference,
- or a case-munging escape if not in POSIX mode: */
- ++p;
- if (p == text_end)
- ++tail->prefix_length;
-
- else if (posixicity == POSIXLY_BASIC && !ISDIGIT (*p))
- {
- p[-1] = *p;
- ++tail->prefix_length;
- }
-
- else
- switch (*p)
- {
- case '0': case '1': case '2': case '3': case '4':
- case '5': case '6': case '7': case '8': case '9':
- tail->subst_id = *p - '0';
- if (sub->max_id < tail->subst_id)
- sub->max_id = tail->subst_id;
- break;
-
- case 'L':
- repl_type = REPL_LOWERCASE;
- save_type = REPL_LOWERCASE;
- break;
-
- case 'U':
- repl_type = REPL_UPPERCASE;
- save_type = REPL_UPPERCASE;
- break;
-
- case 'E':
- repl_type = REPL_ASIS;
- save_type = REPL_ASIS;
- break;
-
- case 'l':
- save_type = repl_type;
- repl_type |= REPL_LOWERCASE_FIRST;
- break;
-
- case 'u':
- save_type = repl_type;
- repl_type |= REPL_UPPERCASE_FIRST;
- break;
-
- default:
- p[-1] = *p;
- ++tail->prefix_length;
- }
-
- base = p + 1;
- }
+ {
+ /* Preceding the backslash may be some literal text: */
+ tail = tail->next =
+ new_replacement(base, (size_t)(p - base), repl_type);
+
+ repl_type = save_type;
+
+ /* Skip the backslash and look for a numeric back-reference,
+ or a case-munging escape if not in POSIX mode: */
+ ++p;
+ if (p == text_end)
+ ++tail->prefix_length;
+
+ else if (posixicity == POSIXLY_BASIC && !ISDIGIT (*p))
+ {
+ p[-1] = *p;
+ ++tail->prefix_length;
+ }
+
+ else
+ switch (*p)
+ {
+ case '0': case '1': case '2': case '3': case '4':
+ case '5': case '6': case '7': case '8': case '9':
+ tail->subst_id = *p - '0';
+ if (sub->max_id < tail->subst_id)
+ sub->max_id = tail->subst_id;
+ break;
+
+ case 'L':
+ repl_type = REPL_LOWERCASE;
+ save_type = REPL_LOWERCASE;
+ break;
+
+ case 'U':
+ repl_type = REPL_UPPERCASE;
+ save_type = REPL_UPPERCASE;
+ break;
+
+ case 'E':
+ repl_type = REPL_ASIS;
+ save_type = REPL_ASIS;
+ break;
+
+ case 'l':
+ save_type = repl_type;
+ repl_type |= REPL_LOWERCASE_FIRST;
+ break;
+
+ case 'u':
+ save_type = repl_type;
+ repl_type |= REPL_UPPERCASE_FIRST;
+ break;
+
+ default:
+ p[-1] = *p;
+ ++tail->prefix_length;
+ }
+
+ base = p + 1;
+ }
else if (*p == '&')
- {
- /* Preceding the ampersand may be some literal text: */
- tail = tail->next =
- new_replacement(base, (size_t)(p - base), repl_type);
-
- repl_type = save_type;
- tail->subst_id = 0;
- base = p + 1;
- }
+ {
+ /* Preceding the ampersand may be some literal text: */
+ tail = tail->next =
+ new_replacement(base, (size_t)(p - base), repl_type);
+
+ repl_type = save_type;
+ tail->subst_id = 0;
+ base = p + 1;
+ }
}
/* There may be some trailing literal text: */
if (base < text_end)
@@ -850,11 +833,8 @@ setup_replacement(sub, text, length)
sub->replacement = root.next;
}
-static void read_text (struct text_buf *buf, int leadin_ch);
static void
-read_text(buf, leadin_ch)
- struct text_buf *buf;
- int leadin_ch;
+read_text (struct text_buf *buf, int leadin_ch)
{
int ch;
@@ -862,7 +842,7 @@ read_text(buf, leadin_ch)
if (buf)
{
if (pending_text)
- free_buffer(pending_text);
+ free_buffer(pending_text);
pending_text = init_buffer();
buf->text = NULL;
buf->text_length = 0;
@@ -880,17 +860,17 @@ read_text(buf, leadin_ch)
while (ch != EOF && ch != '\n')
{
if (ch == '\\')
- {
- ch = inchar();
- if (ch != EOF)
- add1_buffer (pending_text, '\\');
- }
+ {
+ ch = inchar();
+ if (ch != EOF)
+ add1_buffer (pending_text, '\\');
+ }
if (ch == EOF)
- {
- add1_buffer (pending_text, '\n');
- return;
- }
+ {
+ add1_buffer (pending_text, '\n');
+ return;
+ }
ch = add_then_next (pending_text, ch);
}
@@ -899,7 +879,7 @@ read_text(buf, leadin_ch)
if (!buf)
buf = old_text_buf;
buf->text_length = normalize_text (get_buffer (pending_text),
- size_buffer (pending_text), TEXT_BUFFER);
+ size_buffer (pending_text), TEXT_BUFFER);
buf->text = MEMDUP(get_buffer(pending_text), buf->text_length, char);
free_buffer(pending_text);
pending_text = NULL;
@@ -910,11 +890,8 @@ read_text(buf, leadin_ch)
return non-zero and store the resulting address in `*addr'.
If the input doesn't look like an address read nothing
and return zero. */
-static bool compile_address (struct addr *addr, int ch);
static bool
-compile_address(addr, ch)
- struct addr *addr;
- int ch;
+compile_address (struct addr *addr, int ch)
{
addr->addr_type = ADDR_IS_NULL;
addr->addr_step = 0;
@@ -927,45 +904,45 @@ compile_address(addr, ch)
struct buffer *b;
addr->addr_type = ADDR_IS_REGEX;
if (ch == '\\')
- ch = inchar();
+ ch = inchar();
if ( !(b = match_slash(ch, true)) )
- bad_prog(_(UNTERM_ADDR_RE));
+ bad_prog(_(UNTERM_ADDR_RE));
for(;;)
- {
- ch = in_nonblank();
- if (posixicity == POSIXLY_BASIC)
- goto posix_address_modifier;
+ {
+ ch = in_nonblank();
+ if (posixicity == POSIXLY_BASIC)
+ goto posix_address_modifier;
switch(ch)
- {
- case 'I': /* GNU extension */
- flags |= REG_ICASE;
- break;
+ {
+ case 'I': /* GNU extension */
+ flags |= REG_ICASE;
+ break;
#ifdef REG_PERL
- case 'S': /* GNU extension */
- if (extended_regexp_flags & REG_PERL)
- flags |= REG_DOTALL;
- break;
-
- case 'X': /* GNU extension */
- if (extended_regexp_flags & REG_PERL)
- flags |= REG_EXTENDED;
- break;
+ case 'S': /* GNU extension */
+ if (extended_regexp_flags & REG_PERL)
+ flags |= REG_DOTALL;
+ break;
+
+ case 'X': /* GNU extension */
+ if (extended_regexp_flags & REG_PERL)
+ flags |= REG_EXTENDED;
+ break;
#endif
- case 'M': /* GNU extension */
- flags |= REG_NEWLINE;
- break;
-
- default:
- posix_address_modifier:
- savchar (ch);
- addr->addr_regex = compile_regex (b, flags, 0);
- free_buffer(b);
- return true;
- }
- }
+ case 'M': /* GNU extension */
+ flags |= REG_NEWLINE;
+ break;
+
+ default:
+ posix_address_modifier:
+ savchar (ch);
+ addr->addr_regex = compile_regex (b, flags, 0);
+ free_buffer(b);
+ return true;
+ }
+ }
}
else if (ISDIGIT(ch))
{
@@ -973,28 +950,28 @@ compile_address(addr, ch)
addr->addr_type = ADDR_IS_NUM;
ch = in_nonblank();
if (ch != '~' || posixicity == POSIXLY_BASIC)
- {
- savchar(ch);
- }
+ {
+ savchar(ch);
+ }
else
- {
- countT step = in_integer(in_nonblank());
- if (step > 0)
- {
- addr->addr_step = step;
- addr->addr_type = ADDR_IS_NUM_MOD;
- }
- }
+ {
+ countT step = in_integer(in_nonblank());
+ if (step > 0)
+ {
+ addr->addr_step = step;
+ addr->addr_type = ADDR_IS_NUM_MOD;
+ }
+ }
}
else if ((ch == '+' || ch == '~') && posixicity != POSIXLY_BASIC)
{
addr->addr_step = in_integer(in_nonblank());
if (addr->addr_step==0)
- ; /* default to ADDR_IS_NULL; forces matching to stop on next line */
+ ; /* default to ADDR_IS_NULL; forces matching to stop on next line */
else if (ch == '+')
- addr->addr_type = ADDR_IS_STEP;
+ addr->addr_type = ADDR_IS_STEP;
else
- addr->addr_type = ADDR_IS_STEP_MOD;
+ addr->addr_type = ADDR_IS_STEP_MOD;
}
else if (ch == '$')
{
@@ -1008,10 +985,8 @@ compile_address(addr, ch)
/* Read a program (or a subprogram within `{' `}' pairs) in and store
the compiled form in `*vector'. Return a pointer to the new vector. */
-static struct vector *compile_program (struct vector *);
static struct vector *
-compile_program(vector)
- struct vector *vector;
+compile_program(struct vector *vector)
{
struct sed_cmd *cur_cmd;
struct buffer *b;
@@ -1034,176 +1009,185 @@ compile_program(vector)
struct addr a;
while ((ch=inchar()) == ';' || ISSPACE(ch))
- ;
+ ;
if (ch == EOF)
- break;
+ break;
cur_cmd = next_cmd_entry(&vector);
if (compile_address(&a, ch))
- {
- if (a.addr_type == ADDR_IS_STEP
- || a.addr_type == ADDR_IS_STEP_MOD)
- bad_prog(_(BAD_STEP));
-
- cur_cmd->a1 = MEMDUP(&a, 1, struct addr);
- ch = in_nonblank();
- if (ch == ',')
- {
- if (!compile_address(&a, in_nonblank()))
- bad_prog(_(BAD_COMMA));
-
- cur_cmd->a2 = MEMDUP(&a, 1, struct addr);
- ch = in_nonblank();
- }
-
- if ((cur_cmd->a1->addr_type == ADDR_IS_NUM
- && cur_cmd->a1->addr_number == 0)
- && ((!cur_cmd->a2 || cur_cmd->a2->addr_type != ADDR_IS_REGEX)
- || posixicity == POSIXLY_BASIC))
- bad_prog(_(INVALID_LINE_0));
- }
+ {
+ if (a.addr_type == ADDR_IS_STEP
+ || a.addr_type == ADDR_IS_STEP_MOD)
+ bad_prog(_(BAD_STEP));
+
+ cur_cmd->a1 = MEMDUP(&a, 1, struct addr);
+ ch = in_nonblank();
+ if (ch == ',')
+ {
+ if (!compile_address(&a, in_nonblank()))
+ bad_prog(_(BAD_COMMA));
+
+ cur_cmd->a2 = MEMDUP(&a, 1, struct addr);
+ ch = in_nonblank();
+ }
+
+ if ((cur_cmd->a1->addr_type == ADDR_IS_NUM
+ && cur_cmd->a1->addr_number == 0)
+ && ((!cur_cmd->a2 || cur_cmd->a2->addr_type != ADDR_IS_REGEX)
+ || posixicity == POSIXLY_BASIC))
+ bad_prog(_(INVALID_LINE_0));
+ }
if (ch == '!')
- {
- cur_cmd->addr_bang = true;
- ch = in_nonblank();
- if (ch == '!')
- bad_prog(_(BAD_BANG));
- }
+ {
+ cur_cmd->addr_bang = true;
+ ch = in_nonblank();
+ if (ch == '!')
+ bad_prog(_(BAD_BANG));
+ }
/* Do not accept extended commands in --posix mode. Also,
- a few commands only accept one address in that mode. */
+ a few commands only accept one address in that mode. */
if (posixicity == POSIXLY_BASIC)
switch (ch)
{
case 'e': case 'F': case 'v': case 'z': case 'L':
case 'Q': case 'T': case 'R': case 'W':
bad_command(ch);
+ /* FALLTHROUGH */
- case 'a': case 'i': case 'l':
- case '=': case 'r':
- if (cur_cmd->a2)
- bad_prog(_(ONE_ADDR));
- }
+ case 'a': case 'i': case 'l':
+ case '=': case 'r':
+ if (cur_cmd->a2)
+ bad_prog(_(ONE_ADDR));
+ }
cur_cmd->cmd = ch;
switch (ch)
- {
- case '#':
- if (cur_cmd->a1)
- bad_prog(_(NO_SHARP_ADDR));
- ch = inchar();
- if (ch=='n' && first_script && cur_input.line < 2)
- if ( (prog.base && prog.cur==2+prog.base)
- || (prog.file && !prog.base && 2==ftell(prog.file)))
- no_default_output = true;
- while (ch != EOF && ch != '\n')
- ch = inchar();
- continue; /* restart the for (;;) loop */
-
- case 'v':
- /* This is an extension. Programs needing GNU sed might start
- * with a `v' command so that other seds will stop.
- * We compare the version and ignore POSIXLY_CORRECT.
- */
- {
- char *version = read_label ();
- char *compared_version;
- compared_version = (*version == '\0') ? "4.0" : version;
- if (strverscmp (compared_version, SED_FEATURE_VERSION) > 0)
- bad_prog(_(ANCIENT_VERSION));
-
- free (version);
- posixicity = POSIXLY_EXTENDED;
- }
- continue;
-
- case '{':
- blocks = setup_label(blocks, vector->v_length, NULL, &cur_input);
- cur_cmd->addr_bang = !cur_cmd->addr_bang;
- break;
-
- case '}':
- if (!blocks)
- 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));
-
- vector->v[blocks->v_index].x.jump_index = vector->v_length;
- blocks = release_label(blocks); /* done with this entry */
- break;
-
- case 'e':
- ch = in_nonblank();
- if (ch == EOF || ch == '\n')
- {
- cur_cmd->x.cmd_txt.text_length = 0;
- break;
- }
- else
- goto read_text_to_slash;
-
- case 'a':
- case 'i':
- case 'c':
- ch = in_nonblank();
-
- read_text_to_slash:
- if (ch == EOF)
- bad_prog(_(EXPECTED_SLASH));
-
- if (ch == '\\')
- ch = inchar();
- else
- {
- if (posixicity == POSIXLY_BASIC)
- bad_prog(_(EXPECTED_SLASH));
- savchar(ch);
- ch = '\n';
- }
-
- read_text(&cur_cmd->x.cmd_txt, ch);
- break;
-
- case ':':
- if (cur_cmd->a1)
- bad_prog(_(NO_COLON_ADDR));
- labels = setup_label(labels, vector->v_length, read_label(), NULL);
- break;
-
- case 'T':
- case 'b':
- case 't':
- jumps = setup_label(jumps, vector->v_length, read_label(), NULL);
- break;
-
- case 'Q':
- case 'q':
- if (cur_cmd->a2)
- bad_prog(_(ONE_ADDR));
- /* Fall through */
-
- case 'L':
- case 'l':
- ch = in_nonblank();
- 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));
-
- break;
+ {
+ case '#':
+ if (cur_cmd->a1)
+ bad_prog(_(NO_SHARP_ADDR));
+ ch = inchar();
+ if (ch=='n' && first_script && cur_input.line < 2)
+ if ( (prog.base && prog.cur==2+prog.base)
+ || (prog.file && !prog.base && 2==ftell(prog.file)))
+ no_default_output = true;
+ while (ch != EOF && ch != '\n')
+ ch = inchar();
+ continue; /* restart the for (;;) loop */
+
+ case 'v':
+ /* This is an extension. Programs needing GNU sed might start
+ * with a `v' command so that other seds will stop.
+ * We compare the version and ignore POSIXLY_CORRECT.
+ */
+ {
+ char *version = read_label ();
+ char const *compared_version;
+ compared_version = (*version == '\0') ? "4.0" : version;
+ if (strverscmp (compared_version, PACKAGE_VERSION) > 0)
+ bad_prog(_(ANCIENT_VERSION));
+
+ free (version);
+ posixicity = POSIXLY_EXTENDED;
+ }
+ continue;
+
+ case '{':
+ blocks = setup_label(blocks, vector->v_length, NULL, &cur_input);
+ cur_cmd->addr_bang = !cur_cmd->addr_bang;
+ break;
+
+ case '}':
+ if (!blocks)
+ 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));
+
+ vector->v[blocks->v_index].x.jump_index = vector->v_length;
+ blocks = release_label(blocks); /* done with this entry */
+ break;
+
+ case 'e':
+ if (sandbox)
+ bad_prog(_(DISALLOWED_CMD));
+
+ ch = in_nonblank();
+ if (ch == EOF || ch == '\n')
+ {
+ cur_cmd->x.cmd_txt.text_length = 0;
+ break;
+ }
+ else
+ goto read_text_to_slash;
+
+ case 'a':
+ case 'i':
+ case 'c':
+ ch = in_nonblank();
+
+ read_text_to_slash:
+ if (ch == EOF)
+ bad_prog(_(EXPECTED_SLASH));
+
+ if (ch == '\\')
+ ch = inchar();
+ else
+ {
+ if (posixicity == POSIXLY_BASIC)
+ bad_prog(_(EXPECTED_SLASH));
+ savchar(ch);
+ ch = '\n';
+ }
+
+ read_text(&cur_cmd->x.cmd_txt, ch);
+ break;
+
+ case ':':
+ if (cur_cmd->a1)
+ bad_prog(_(NO_COLON_ADDR));
+ {
+ char *label = read_label ();
+ if (!*label)
+ bad_prog(_(COLON_LACKS_LABEL));
+ labels = setup_label(labels, vector->v_length, label, NULL);
+ }
+ break;
+
+ case 'T':
+ case 'b':
+ case 't':
+ jumps = setup_label(jumps, vector->v_length, read_label(), NULL);
+ break;
+
+ case 'Q':
+ case 'q':
+ if (cur_cmd->a2)
+ bad_prog(_(ONE_ADDR));
+ /* Fall through */
+
+ case 'L':
+ case 'l':
+ ch = in_nonblank();
+ 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));
+
+ break;
case '=':
case 'd':
@@ -1212,92 +1196,94 @@ compile_program(vector)
case 'g':
case 'G':
case 'h':
- case 'H':
- case 'n':
- case 'N':
- case 'p':
- 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));
- break;
-
- case 'r':
- b = read_filename();
- cur_cmd->x.fname = ck_strdup(get_buffer(b));
- free_buffer(b);
- break;
+ case 'H':
+ case 'n':
+ case 'N':
+ case 'p':
+ 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));
+ break;
+
+ case 'r':
+ b = read_filename();
+ cur_cmd->x.fname = ck_strdup(get_buffer(b));
+ free_buffer(b);
+ break;
case 'R':
- cur_cmd->x.fp = get_openfile(&file_read, read_mode, false)->fp;
- break;
+ cur_cmd->x.fp = get_openfile(&file_read, read_mode, false)->fp;
+ break;
case 'W':
- case 'w':
- cur_cmd->x.outf = get_openfile(&file_write, write_mode, true);
- break;
-
- case 's':
- {
- struct buffer *b2;
- int flags;
- int slash;
-
- slash = inchar();
- if ( !(b = match_slash(slash, true)) )
- bad_prog(_(UNTERM_S_CMD));
- if ( !(b2 = match_slash(slash, false)) )
- bad_prog(_(UNTERM_S_CMD));
-
- cur_cmd->x.cmd_subst = OB_MALLOC(&obs, 1, struct subst);
- setup_replacement(cur_cmd->x.cmd_subst,
- get_buffer(b2), size_buffer(b2));
- free_buffer(b2);
-
- flags = mark_subst_opts(cur_cmd->x.cmd_subst);
- cur_cmd->x.cmd_subst->regx =
- compile_regex(b, flags, cur_cmd->x.cmd_subst->max_id + 1);
- free_buffer(b);
- }
- break;
-
- case 'y':
- {
- size_t len, dest_len;
- int slash;
- struct buffer *b2;
+ case 'w':
+ cur_cmd->x.outf = get_openfile(&file_write, write_mode, true);
+ break;
+
+ case 's':
+ {
+ struct buffer *b2;
+ int flags;
+ int slash;
+
+ slash = inchar();
+ if ( !(b = match_slash(slash, true)) )
+ bad_prog(_(UNTERM_S_CMD));
+ if ( !(b2 = match_slash(slash, false)) )
+ bad_prog(_(UNTERM_S_CMD));
+
+ cur_cmd->x.cmd_subst = OB_MALLOC(&obs, 1, struct subst);
+ setup_replacement(cur_cmd->x.cmd_subst,
+ get_buffer(b2), size_buffer(b2));
+ free_buffer(b2);
+
+ flags = mark_subst_opts(cur_cmd->x.cmd_subst);
+ cur_cmd->x.cmd_subst->regx =
+ compile_regex(b, flags, cur_cmd->x.cmd_subst->max_id + 1);
+ free_buffer(b);
+
+ if (cur_cmd->x.cmd_subst->eval && sandbox)
+ bad_prog(_(DISALLOWED_CMD));
+ }
+ break;
+
+ case 'y':
+ {
+ size_t len, dest_len;
+ int slash;
+ struct buffer *b2;
char *src_buf, *dest_buf;
-
- slash = inchar();
- if ( !(b = match_slash(slash, false)) )
- bad_prog(_(UNTERM_Y_CMD));
+
+ slash = inchar();
+ if ( !(b = match_slash(slash, false)) )
+ bad_prog(_(UNTERM_Y_CMD));
src_buf = get_buffer(b);
- len = normalize_text(src_buf, size_buffer (b), TEXT_BUFFER);
+ len = normalize_text(src_buf, size_buffer (b), TEXT_BUFFER);
if ( !(b2 = match_slash(slash, false)) )
- bad_prog(_(UNTERM_Y_CMD));
+ bad_prog(_(UNTERM_Y_CMD));
dest_buf = get_buffer(b2);
- dest_len = normalize_text(dest_buf, size_buffer (b2), TEXT_BUFFER);
+ dest_len = normalize_text(dest_buf, size_buffer (b2), TEXT_BUFFER);
if (mb_cur_max > 1)
- {
- int i, j, idx, src_char_num;
+ {
+ size_t i, j, idx, src_char_num;
size_t *src_lens = MALLOC(len, size_t);
char **trans_pairs;
size_t mbclen;
- mbstate_t cur_stat;
+ mbstate_t cur_stat = { 0, };
/* Enumerate how many character the source buffer has. */
- memset(&cur_stat, 0, sizeof(mbstate_t));
for (i = 0, j = 0; i < len;)
{
mbclen = MBRLEN (src_buf + i, len - i, &cur_stat);
/* An invalid sequence, or a truncated multibyte character.
- We treat it as a singlebyte character. */
+ We treat it as a single-byte character. */
if (mbclen == (size_t) -1 || mbclen == (size_t) -2
|| mbclen == 0)
mbclen = 1;
@@ -1306,7 +1292,7 @@ compile_program(vector)
}
src_char_num = j;
- memset(&cur_stat, 0, sizeof(mbstate_t));
+ memset(&cur_stat, 0, sizeof cur_stat);
idx = 0;
/* trans_pairs = {src(0), dest(0), src(1), dest(1), ..., NULL}
@@ -1322,21 +1308,21 @@ compile_program(vector)
/* Set the i-th source character. */
trans_pairs[2 * i] = MALLOC(src_lens[i] + 1, char);
- strncpy(trans_pairs[2 * i], src_buf, src_lens[i]);
+ memcpy(trans_pairs[2 * i], src_buf, src_lens[i]);
trans_pairs[2 * i][src_lens[i]] = '\0';
src_buf += src_lens[i]; /* Forward to next character. */
/* Fetch the i-th destination character. */
mbclen = MBRLEN (dest_buf + idx, dest_len - idx, &cur_stat);
/* An invalid sequence, or a truncated multibyte character.
- We treat it as a singlebyte character. */
+ We treat it as a single-byte character. */
if (mbclen == (size_t) -1 || mbclen == (size_t) -2
|| mbclen == 0)
mbclen = 1;
/* Set the i-th destination character. */
trans_pairs[2 * i + 1] = MALLOC(mbclen + 1, char);
- strncpy(trans_pairs[2 * i + 1], dest_buf + idx, mbclen);
+ memcpy(trans_pairs[2 * i + 1], dest_buf + idx, mbclen);
trans_pairs[2 * i + 1][mbclen] = '\0';
idx += mbclen; /* Forward to next character. */
}
@@ -1346,38 +1332,38 @@ compile_program(vector)
}
else
{
- unsigned char *translate =
- OB_MALLOC(&obs, YMAP_LENGTH, unsigned char);
+ unsigned char *translate =
+ OB_MALLOC(&obs, YMAP_LENGTH, unsigned char);
unsigned char *ustring = (unsigned char *)src_buf;
- if (len != dest_len)
+ if (len != dest_len)
bad_prog(_(Y_CMD_LEN));
- for (len = 0; len < YMAP_LENGTH; len++)
- translate[len] = len;
+ for (len = 0; len < YMAP_LENGTH; len++)
+ translate[len] = len;
while (dest_len--)
translate[*ustring++] = (unsigned char)*dest_buf++;
- cur_cmd->x.translate = translate;
- }
+ cur_cmd->x.translate = translate;
+ }
if ((ch = in_nonblank()) != EOF && ch != '\n' && ch != ';')
bad_prog(_(EXCESS_JUNK));
free_buffer(b);
free_buffer(b2);
- }
- break;
+ }
+ break;
- case EOF:
- bad_prog(_(NO_COMMAND));
- /*NOTREACHED*/
+ case EOF:
+ bad_prog(_(NO_COMMAND));
+ /*NOTREACHED*/
- default:
- bad_command (ch);
- /*NOTREACHED*/
- }
+ default:
+ bad_command (ch);
+ /*NOTREACHED*/
+ }
/* this is buried down here so that "continue" statements will miss it */
++vector->v_length;
@@ -1390,10 +1376,7 @@ compile_program(vector)
/* deal with \X escapes */
size_t
-normalize_text(buf, len, buftype)
- char *buf;
- size_t len;
- enum text_types buftype;
+normalize_text(char *buf, size_t len, enum text_types buftype)
{
const char *bufend = buf + len;
char *p = buf;
@@ -1410,84 +1393,83 @@ normalize_text(buf, len, buftype)
int bracket_state = 0;
int mbclen;
- mbstate_t cur_stat;
- memset(&cur_stat, 0, sizeof(mbstate_t));
+ mbstate_t cur_stat = { 0, };
while (p < bufend)
{
mbclen = MBRLEN (p, bufend - p, &cur_stat);
if (mbclen != 1)
- {
+ {
/* An invalid sequence, or a truncated multibyte character.
- We treat it as a singlebyte character. */
+ We treat it as a single-byte character. */
if (mbclen == (size_t) -1 || mbclen == (size_t) -2 || mbclen == 0)
mbclen = 1;
memmove (q, p, mbclen);
q += mbclen;
p += mbclen;
- continue;
- }
+ continue;
+ }
if (*p == '\\' && p+1 < bufend && bracket_state == 0)
- switch (*++p)
- {
+ switch (*++p)
+ {
#if defined __STDC__ && __STDC__-0
- case 'a': *q++ = '\a'; p++; continue;
+ case 'a': *q++ = '\a'; p++; continue;
#else /* Not STDC; we'll just assume ASCII */
- case 'a': *q++ = '\007'; p++; continue;
+ case 'a': *q++ = '\007'; p++; continue;
#endif
- /* case 'b': *q++ = '\b'; p++; continue; --- conflicts with \b RE */
- case 'f': *q++ = '\f'; p++; continue;
- case '\n': /*fall through */
- case 'n': *q++ = '\n'; p++; continue;
- case 'r': *q++ = '\r'; p++; continue;
- case 't': *q++ = '\t'; p++; continue;
- case 'v': *q++ = '\v'; p++; continue;
-
- case 'd': /* decimal byte */
+ /* case 'b': *q++ = '\b'; p++; continue; --- conflicts with \b RE */
+ case 'f': *q++ = '\f'; p++; continue;
+ case '\n': /*fall through */
+ case 'n': *q++ = '\n'; p++; continue;
+ case 'r': *q++ = '\r'; p++; continue;
+ case 't': *q++ = '\t'; p++; continue;
+ case 'v': *q++ = '\v'; p++; continue;
+
+ case 'd': /* decimal byte */
base = 10;
goto convert;
- case 'x': /* hexadecimal byte */
+ case 'x': /* hexadecimal byte */
base = 16;
goto convert;
#ifdef REG_PERL
- case '0': case '1': case '2': case '3':
- case '4': case '5': case '6': case '7':
- if ((extended_regexp_flags & REG_PERL)
- && p+1 < bufend
- && p[1] >= '0' && p[1] <= '9')
- {
+ case '0': case '1': case '2': case '3':
+ case '4': case '5': case '6': case '7':
+ if ((extended_regexp_flags & REG_PERL)
+ && p+1 < bufend
+ && p[1] >= '0' && p[1] <= '9')
+ {
base = 8;
goto convert;
- }
- else
- {
- /* we just pass the \ up one level for interpretation */
- if (buftype != TEXT_BUFFER)
- *q++ = '\\';
- }
-
- continue;
-
- case 'o': /* octal byte */
- if (!(extended_regexp_flags & REG_PERL))
- {
+ }
+ else
+ {
+ /* we just pass the \ up one level for interpretation */
+ if (buftype != TEXT_BUFFER)
+ *q++ = '\\';
+ }
+
+ continue;
+
+ case 'o': /* octal byte */
+ if (!(extended_regexp_flags & REG_PERL))
+ {
base = 8;
goto convert;
- }
- else
- {
- /* we just pass the \ up one level for interpretation */
- if (buftype != TEXT_BUFFER)
- *q++ = '\\';
- }
-
- continue;
+ }
+ else
+ {
+ /* we just pass the \ up one level for interpretation */
+ if (buftype != TEXT_BUFFER)
+ *q++ = '\\';
+ }
+
+ continue;
#else
- case 'o': /* octal byte */
+ case 'o': /* octal byte */
base = 8;
#endif
convert:
@@ -1499,27 +1481,33 @@ convert:
*q++ = ch;
continue;
- case 'c':
- if (++p < bufend)
- {
- *q++ = toupper((unsigned char) *p) ^ 0x40;
- p++;
- continue;
- }
- else
- {
- /* we just pass the \ up one level for interpretation */
- if (buftype != TEXT_BUFFER)
- *q++ = '\\';
- continue;
- }
-
- default:
- /* we just pass the \ up one level for interpretation */
- if (buftype != TEXT_BUFFER)
- *q++ = '\\';
- break;
- }
+ case 'c':
+ if (++p < bufend)
+ {
+ *q++ = toupper((unsigned char) *p) ^ 0x40;
+ if (*p == '\\')
+ {
+ p++;
+ if (*p != '\\')
+ bad_prog(RECURSIVE_ESCAPE_C);
+ }
+ p++;
+ continue;
+ }
+ else
+ {
+ /* we just pass the \ up one level for interpretation */
+ if (buftype != TEXT_BUFFER)
+ *q++ = '\\';
+ continue;
+ }
+
+ default:
+ /* we just pass the \ up one level for interpretation */
+ if (buftype != TEXT_BUFFER)
+ *q++ = '\\';
+ break;
+ }
else if (buftype == TEXT_REGEX && posixicity != POSIXLY_EXTENDED)
switch (*p)
{
@@ -1527,17 +1515,17 @@ convert:
if (!bracket_state)
bracket_state = -1;
break;
-
- case ':':
- case '.':
- case '=':
+
+ case ':':
+ case '.':
+ case '=':
if (bracket_state == -1 && p[-1] == '[')
bracket_state = *p;
break;
case ']':
if (bracket_state == 0)
- ;
+ ;
else if (bracket_state == -1)
bracket_state = 0;
else if (p[-2] != bracket_state && p[-1] == bracket_state)
@@ -1554,10 +1542,7 @@ convert:
/* `str' is a string (from the command line) that contains a sed command.
Compile the command, and add it to the end of `cur_program'. */
struct vector *
-compile_string(cur_program, str, len)
- struct vector *cur_program;
- char *str;
- size_t len;
+compile_string(struct vector *cur_program, char *str, size_t len)
{
static countT string_expr_count = 0;
struct vector *ret;
@@ -1584,9 +1569,7 @@ compile_string(cur_program, str, len)
Read them in and add them to the end of `cur_program'.
*/
struct vector *
-compile_file(cur_program, cmdfile)
- struct vector *cur_program;
- const char *cmdfile;
+compile_file(struct vector *cur_program, const char *cmdfile)
{
struct vector *ret;
@@ -1617,8 +1600,7 @@ compile_file(cur_program, cmdfile)
In particular: this backpatches the jump targets.
Any cleanup which can be done after these checks is done here also. */
void
-check_final_program(program)
- struct vector *program;
+check_final_program(struct vector *program)
{
struct sed_label *go;
struct sed_label *lbl;
@@ -1637,7 +1619,7 @@ check_final_program(program)
old_text_buf->text_length = size_buffer(pending_text);
if (old_text_buf->text_length)
old_text_buf->text = MEMDUP(get_buffer(pending_text),
- old_text_buf->text_length, char);
+ old_text_buf->text_length, char);
free_buffer(pending_text);
pending_text = NULL;
}
@@ -1645,18 +1627,18 @@ check_final_program(program)
for (go = jumps; go; go = release_label(go))
{
for (lbl = labels; lbl; lbl = lbl->next)
- if (strcmp(lbl->name, go->name) == 0)
- break;
+ if (strcmp(lbl->name, go->name) == 0)
+ break;
if (lbl)
- {
- program->v[go->v_index].x.jump_index = lbl->v_index;
- }
+ {
+ program->v[go->v_index].x.jump_index = lbl->v_index;
+ }
else
- {
- if (*go->name)
- panic(_("can't find label for jump to `%s'"), go->name);
- program->v[go->v_index].x.jump_index = program->v_length;
- }
+ {
+ if (*go->name)
+ panic(_("can't find label for jump to `%s'"), go->name);
+ program->v[go->v_index].x.jump_index = program->v_length;
+ }
}
jumps = NULL;
@@ -1670,23 +1652,23 @@ check_final_program(program)
for (p=file_read; p; p=p->link)
if (p->name)
- {
- free(p->name);
- p->name = NULL;
- }
+ {
+ free(p->name);
+ p->name = NULL;
+ }
for (p=file_write; p; p=p->link)
if (p->name)
- {
- free(p->name);
- p->name = NULL;
- }
+ {
+ free(p->name);
+ p->name = NULL;
+ }
}
}
/* Rewind all resources which were allocated in this module. */
void
-rewind_read_files()
+rewind_read_files(void)
{
struct output *p;
@@ -1697,8 +1679,7 @@ rewind_read_files()
/* Release all resources which were allocated in this module. */
void
-finish_program(program)
- struct vector *program;
+finish_program(void)
{
/* close all files... */
{
@@ -1706,23 +1687,23 @@ finish_program(program)
for (p=file_read; p; p=q)
{
- if (p->fp)
- ck_fclose(p->fp);
- q = p->link;
+ if (p->fp)
+ ck_fclose(p->fp);
+ q = p->link;
#if 0
- /* We use obstacks. */
- free(p);
+ /* We use obstacks. */
+ free(p);
#endif
}
for (p=file_write; p; p=q)
{
- if (p->fp)
- ck_fclose(p->fp);
- q = p->link;
+ if (p->fp)
+ ck_fclose(p->fp);
+ q = p->link;
#if 0
- /* We use obstacks. */
- free(p);
+ /* We use obstacks. */
+ free(p);
#endif
}
file_read = file_write = NULL;
diff --git a/sed/execute.c b/sed/execute.c
index cb84192..009d188 100644
--- a/sed/execute.c
+++ b/sed/execute.c
@@ -1,6 +1,5 @@
/* GNU SED, a batch stream editor.
- Copyright (C) 1989,90,91,92,93,94,95,98,99,2002,2003,2004,2005,2006,2008,2009
- Free Software Foundation, Inc.
+ Copyright (C) 1989-2016 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -36,6 +35,7 @@
#include <selinux/selinux.h>
#include <selinux/context.h>
#include "acl.h"
+#include "ignore-value.h"
#ifdef __GNUC__
# if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__-0 >= 7)
@@ -47,7 +47,11 @@
# 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. */
+#define DFA_SLOP 1
+
/* Sed operates a line at a time. */
struct line {
char *text; /* Pointer to line allocated by malloc. */
@@ -79,10 +83,10 @@ struct input {
char **file_list;
/* Count of files we failed to open. */
- countT bad_count;
+ countT bad_count;
/* Current input line number (over all files). */
- countT line_number;
+ countT line_number;
/* True if we'll reset line numbers and addresses before
starting to process the next (possibly the first) file. */
@@ -132,11 +136,8 @@ static struct append_queue *append_tail = NULL;
/* increase a struct line's length, making some attempt at
keeping realloc() calls under control by padding for future growth. */
-static void resize_line (struct line *, size_t);
static void
-resize_line(lb, len)
- struct line *lb;
- size_t len;
+resize_line (struct line *lb, size_t len)
{
int inactive;
inactive = lb->active - lb->text;
@@ -151,7 +152,7 @@ resize_line(lb, len)
inactive = 0;
if (lb->alloc > len)
- return;
+ return;
}
lb->alloc *= 2;
@@ -159,18 +160,14 @@ resize_line(lb, len)
lb->alloc = len;
if (lb->alloc < INITIAL_BUFFER_SIZE)
lb->alloc = INITIAL_BUFFER_SIZE;
-
- lb->text = REALLOC(lb->text, inactive + lb->alloc, char);
+
+ lb->text = REALLOC(lb->text, inactive + lb->alloc + DFA_SLOP, char);
lb->active = lb->text + inactive;
}
-/* Append `length' bytes from `string' to the line `to'. */
-static void str_append (struct line *, const char *, size_t);
+/* Append LENGTH bytes from STRING to the line, TO. */
static void
-str_append(to, string, length)
- struct line *to;
- const char *string;
- size_t length;
+str_append(struct line *to, const char *string, size_t length)
{
size_t new_length = to->length + length;
@@ -184,26 +181,25 @@ str_append(to, string, length)
{
size_t n = MBRLEN (string, length, &to->mbstate);
- /* An invalid or imcomplete sequence is treated like a singlebyte character. */
+ /* Treat an invalid or incomplete sequence like a
+ single-byte character. */
if (n == (size_t) -1 || n == (size_t) -2)
- {
- memset (&to->mbstate, 0, sizeof (to->mbstate));
- n = 1;
- }
-
- if (n > 0)
- {
- string += n;
- length -= n;
- }
- else
- break;
+ {
+ memset (&to->mbstate, 0, sizeof (to->mbstate));
+ n = 1;
+ }
+
+ if (n == 0)
+ break;
+
+ string += n;
+ length -= n;
}
}
static void
str_append_modified(struct line *to, const char *string, size_t length,
- enum replacement_types type)
+ enum replacement_types type)
{
mbstate_t from_stat;
@@ -220,42 +216,58 @@ str_append_modified(struct line *to, const char *string, size_t length,
while (length)
{
wchar_t wc;
- int n = MBRTOWC (&wc, string, length, &from_stat);
+ size_t n = MBRTOWC (&wc, string, length, &from_stat);
- /* An invalid sequence is treated like a singlebyte character. */
- if (n == -1)
+ /* Treat an invalid sequence like a single-byte character. */
+ if (n == (size_t) -1)
{
+ type &= ~(REPL_LOWERCASE_FIRST | REPL_UPPERCASE_FIRST);
+ if (type == REPL_ASIS)
+ {
+ str_append(to, string, length);
+ return;
+ }
+
+ str_append (to, string, 1);
memset (&to->mbstate, 0, sizeof (from_stat));
n = 1;
+ string += n, length -= n;
+ continue;
}
- if (n > 0)
- string += n, length -= n;
- else
- {
- /* Incomplete sequence, copy it manually. */
- str_append(to, string, length);
- return;
- }
+ if (n == 0 || n == (size_t) -2)
+ {
+ /* L'\0' or an incomplete sequence: copy it manually. */
+ str_append(to, string, length);
+ return;
+ }
+
+ string += n, length -= n;
/* Convert the first character specially... */
if (type & (REPL_UPPERCASE_FIRST | REPL_LOWERCASE_FIRST))
- {
+ {
if (type & REPL_UPPERCASE_FIRST)
wc = towupper(wc);
else
wc = towlower(wc);
type &= ~(REPL_LOWERCASE_FIRST | REPL_UPPERCASE_FIRST);
- if (type == REPL_ASIS)
- {
- n = WCRTOMB (to->active + to->length, wc, &to->mbstate);
- to->length += n;
- str_append(to, string, length);
- return;
- }
+ if (type == REPL_ASIS)
+ {
+ /* Copy the new wide character to the end of the string. */
+ n = WCRTOMB (to->active + to->length, wc, &to->mbstate);
+ to->length += n;
+ if (n == (size_t) -1 || n == (size_t) -2)
+ {
+ fprintf (stderr,
+ _("case conversion produced an invalid character"));
+ abort ();
+ }
+ str_append(to, string, length);
+ return;
+ }
}
-
else if (type & REPL_UPPERCASE)
wc = towupper(wc);
else
@@ -265,23 +277,19 @@ str_append_modified(struct line *to, const char *string, size_t length,
n = WCRTOMB (to->active + to->length, wc, &to->mbstate);
to->length += n;
if (n == -1 || n == -2)
- {
- fprintf (stderr, "Case conversion produced an invalid character!");
- abort ();
- }
+ {
+ fprintf (stderr, _("case conversion produced an invalid character"));
+ abort ();
+ }
}
}
/* Initialize a "struct line" buffer. Copy multibyte state from `state'
if not null. */
-static void line_init (struct line *, struct line *, size_t initial_size);
static void
-line_init(buf, state, initial_size)
- struct line *buf;
- struct line *state;
- size_t initial_size;
+line_init(struct line *buf, struct line *state, size_t initial_size)
{
- buf->text = MALLOC(initial_size, char);
+ buf->text = MALLOC(initial_size + DFA_SLOP, char);
buf->active = buf->text;
buf->alloc = initial_size;
buf->length = 0;
@@ -295,10 +303,8 @@ line_init(buf, state, initial_size)
/* Reset a "struct line" buffer to length zero. Copy multibyte state from
`state' if not null. */
-static void line_reset (struct line *, struct line *);
static void
-line_reset(buf, state)
- struct line *buf, *state;
+line_reset(struct line *buf, struct line *state)
{
if (buf->alloc == 0)
line_init(buf, state, INITIAL_BUFFER_SIZE);
@@ -315,12 +321,8 @@ line_reset(buf, state)
/* Copy the contents of the line `from' into the line `to'.
This destroys the old contents of `to'.
Copy the multibyte state if `state' is true. */
-static void line_copy (struct line *from, struct line *to, int state);
static void
-line_copy(from, to, state)
- struct line *from;
- struct line *to;
- int state;
+line_copy(struct line *from, struct line *to, int state)
{
/* Remove the inactive portion in the destination buffer. */
to->alloc += to->active - to->text;
@@ -329,13 +331,13 @@ line_copy(from, to, state)
{
to->alloc *= 2;
if (to->alloc < from->length)
- to->alloc = from->length;
+ to->alloc = from->length;
if (to->alloc < INITIAL_BUFFER_SIZE)
- to->alloc = INITIAL_BUFFER_SIZE;
+ to->alloc = INITIAL_BUFFER_SIZE;
/* Use free()+MALLOC() instead of REALLOC() to
- avoid unnecessary copying of old text. */
+ avoid unnecessary copying of old text. */
free(to->text);
- to->text = MALLOC(to->alloc, char);
+ to->text = MALLOC(to->alloc + DFA_SLOP, char);
}
to->active = to->text;
@@ -349,12 +351,8 @@ line_copy(from, to, state)
/* Append the contents of the line `from' to the line `to'.
Copy the multibyte state if `state' is true. */
-static void line_append (struct line *from, struct line *to, int state);
static void
-line_append(from, to, state)
- struct line *from;
- struct line *to;
- int state;
+line_append (struct line *from, struct line *to, int state)
{
str_append(to, &buffer_delimiter, 1);
str_append(to, from->active, from->length);
@@ -366,12 +364,8 @@ line_append(from, to, state)
/* Exchange two "struct line" buffers.
Copy the multibyte state if `state' is true. */
-static void line_exchange (struct line *a, struct line *b, int state);
static void
-line_exchange(a, b, state)
- struct line *a;
- struct line *b;
- int state;
+line_exchange (struct line *a, struct line *b, int state)
{
struct line t;
@@ -391,18 +385,14 @@ line_exchange(a, b, state)
/* dummy function to simplify read_pattern_space() */
-static bool read_always_fail (struct input *);
static bool
-read_always_fail(input)
- struct input *input UNUSED;
+read_always_fail(struct input *input UNUSED)
{
return false;
}
-static bool read_file_line (struct input *);
static bool
-read_file_line(input)
- struct input *input;
+read_file_line(struct input *input)
{
static char *b;
static size_t blen;
@@ -422,10 +412,8 @@ read_file_line(input)
}
-static inline void output_missing_newline (struct output *);
static inline void
-output_missing_newline(outf)
- struct output *outf;
+output_missing_newline(struct output *outf)
{
if (outf->missing_newline)
{
@@ -434,22 +422,15 @@ output_missing_newline(outf)
}
}
-static inline void flush_output (FILE *);
static inline void
-flush_output(fp)
- FILE *fp;
+flush_output(FILE *fp)
{
if (fp != stdout || unbuffered)
ck_fflush(fp);
}
-static void output_line (const char *, size_t, int, struct output *);
static void
-output_line(text, length, nl, outf)
- const char *text;
- size_t length;
- int nl;
- struct output *outf;
+output_line(const char *text, size_t length, int nl, struct output *outf)
{
if (!text)
return;
@@ -465,9 +446,8 @@ output_line(text, length, nl, outf)
flush_output(outf->fp);
}
-static struct append_queue *next_append_slot (void);
static struct append_queue *
-next_append_slot()
+next_append_slot(void)
{
struct append_queue *n = MALLOC(1, struct append_queue);
@@ -484,9 +464,8 @@ next_append_slot()
return append_tail = n;
}
-static void release_append_queue (void);
static void
-release_append_queue()
+release_append_queue(void)
{
struct append_queue *p, *q;
@@ -501,9 +480,8 @@ release_append_queue()
append_head = append_tail = NULL;
}
-static void dump_append_queue (void);
static void
-dump_append_queue()
+dump_append_queue(void)
{
struct append_queue *p;
@@ -514,23 +492,23 @@ dump_append_queue()
ck_fwrite(p->text, 1, p->textlen, output_file.fp);
if (p->fname)
- {
- char buf[FREAD_BUFFER_SIZE];
- size_t cnt;
- FILE *fp;
-
- /* "If _fname_ does not exist or cannot be read, it shall
- be treated as if it were an empty file, causing no error
- condition." IEEE Std 1003.2-1992
- So, don't fail. */
- fp = ck_fopen(p->fname, read_mode, false);
- if (fp)
- {
- while ((cnt = ck_fread(buf, 1, sizeof buf, fp)) > 0)
- ck_fwrite(buf, 1, cnt, output_file.fp);
- ck_fclose(fp);
- }
- }
+ {
+ char buf[FREAD_BUFFER_SIZE];
+ size_t cnt;
+ FILE *fp;
+
+ /* "If _fname_ does not exist or cannot be read, it shall
+ be treated as if it were an empty file, causing no error
+ condition." IEEE Std 1003.2-1992
+ So, don't fail. */
+ fp = ck_fopen(p->fname, read_mode, false);
+ if (fp)
+ {
+ while ((cnt = ck_fread(buf, 1, sizeof buf, fp)) > 0)
+ ck_fwrite(buf, 1, cnt, output_file.fp);
+ ck_fclose(fp);
+ }
+ }
}
flush_output(output_file.fp);
@@ -539,10 +517,8 @@ dump_append_queue()
/* Compute the name of the backup file for in-place editing */
-static char *get_backup_file_name (const char *);
static char *
-get_backup_file_name(name)
- const char *name;
+get_backup_file_name(const char *name)
{
char *old_asterisk, *asterisk, *backup, *p;
int name_length = strlen(name), backup_length = strlen(in_place_extension);
@@ -572,39 +548,39 @@ get_backup_file_name(name)
}
/* Initialize a struct input for the named file. */
-static void open_next_file (const char *name, struct input *);
static void
-open_next_file(name, input)
- const char *name;
- struct input *input;
+open_next_file(const char *name, struct input *input)
{
buffer.length = 0;
+ input->in_file_name = name;
if (name[0] == '-' && name[1] == '\0' && !in_place_extension)
{
clearerr(stdin); /* clear any stale EOF indication */
-#if defined(WIN32) || defined(_WIN32) || defined(__CYGWIN__) || defined(MSDOS) || defined(__EMX__)
+#if defined WIN32 || defined _WIN32 || defined __CYGWIN__ \
+ || defined MSDOS || defined __EMX__
input->fp = ck_fdopen (fileno (stdin), "stdin", read_mode, false);
#else
input->fp = stdin;
#endif
}
- else if ( ! (input->fp = ck_fopen(name, read_mode, false)) )
+ else
{
- const char *ptr = strerror(errno);
- fprintf(stderr, _("%s: can't read %s: %s\n"), myname, name, ptr);
- input->read_fn = read_always_fail; /* a redundancy */
- ++input->bad_count;
- return;
+ if (follow_symlinks)
+ input->in_file_name = follow_symlink (name);
+
+ if ( ! (input->fp = ck_fopen (name, read_mode, false)) )
+ {
+ const char *ptr = strerror (errno);
+ fprintf (stderr, _("%s: can't read %s: %s\n"), myname, name, ptr);
+ input->read_fn = read_always_fail; /* a redundancy */
+ ++input->bad_count;
+ return;
+ }
}
input->read_fn = read_file_line;
- if (follow_symlinks)
- input->in_file_name = follow_symlink (name);
- else
- input->in_file_name = name;
-
if (in_place_extension)
{
int input_fd;
@@ -616,9 +592,9 @@ open_next_file(name, input)
/* get the base name */
tmpdir = ck_strdup(input->in_file_name);
if ((p = strrchr(tmpdir, '/')))
- *p = 0;
+ *p = 0;
else
- strcpy(tmpdir, ".");
+ strcpy(tmpdir, ".");
if (isatty (fileno (input->fp)))
panic(_("couldn't edit %s: is a terminal"), input->in_file_name);
@@ -629,39 +605,43 @@ open_next_file(name, input)
panic(_("couldn't edit %s: not a regular file"), input->in_file_name);
if (is_selinux_enabled () > 0)
- {
+ {
security_context_t con;
- if (getfilecon (input->in_file_name, &con) != -1)
- {
- /* Save and restore the old context for the sake of w and W
- commands. */
- reset_fscreatecon = getfscreatecon (&old_fscreatecon) >= 0;
- if (setfscreatecon (con) < 0)
- fprintf (stderr, _("%s: warning: failed to set default file creation context to %s: %s"),
- myname, con, strerror (errno));
- freecon (con);
- }
- else
- {
- if (errno != ENOSYS)
- fprintf (stderr, _("%s: warning: failed to get security context of %s: %s"),
- myname, input->in_file_name, strerror (errno));
- }
- }
+ if (getfilecon (input->in_file_name, &con) != -1)
+ {
+ /* Save and restore the old context for the sake of w and W
+ commands. */
+ reset_fscreatecon = getfscreatecon (&old_fscreatecon) >= 0;
+ if (setfscreatecon (con) < 0)
+ fprintf (stderr, _("%s: warning: failed to set default" \
+ " file creation context to %s: %s"),
+ myname, con, strerror (errno));
+ freecon (con);
+ }
+ else
+ {
+ if (errno != ENOSYS)
+ fprintf (stderr, _("%s: warning: failed to get" \
+ " security context of %s: %s"),
+ myname, input->in_file_name, strerror (errno));
+ }
+ }
output_file.fp = ck_mkstemp (&input->out_file_name, tmpdir, "sed",
- write_mode);
+ write_mode);
+ register_cleanup_file (input->out_file_name);
output_file.missing_newline = false;
free (tmpdir);
if (reset_fscreatecon)
- {
- setfscreatecon (old_fscreatecon);
- freecon (old_fscreatecon);
- }
+ {
+ setfscreatecon (old_fscreatecon);
+ freecon (old_fscreatecon);
+ }
if (!output_file.fp)
- panic(_("couldn't open temporary file %s: %s"), input->out_file_name, strerror(errno));
+ panic(_("couldn't open temporary file %s: %s"), input->out_file_name,
+ strerror(errno));
}
else
{
@@ -673,10 +653,8 @@ open_next_file(name, input)
/* Clean up an input stream that we are done with. */
-static void closedown (struct input *);
static void
-closedown(input)
- struct input *input;
+closedown(struct input *input)
{
input->read_fn = read_always_fail;
if (!input->fp)
@@ -691,23 +669,26 @@ closedown(input)
input_fd = fileno (input->fp);
output_fd = fileno (output_file.fp);
#ifdef HAVE_FCHOWN
+ /* Try to set both UID and GID, but if that fails,
+ try to set only the GID. Ignore failure. */
if (fchown (output_fd, input->st.st_uid, input->st.st_gid) == -1)
- fchown (output_fd, -1, input->st.st_gid);
+ ignore_value (fchown (output_fd, -1, input->st.st_gid));
#endif
copy_acl (input->in_file_name, input_fd,
- input->out_file_name, output_fd,
- input->st.st_mode);
+ input->out_file_name, output_fd,
+ input->st.st_mode);
ck_fclose (input->fp);
ck_fclose (output_file.fp);
if (strcmp(in_place_extension, "*") != 0)
{
char *backup_file_name = get_backup_file_name(target_name);
- ck_rename (target_name, backup_file_name, input->out_file_name);
+ ck_rename (target_name, backup_file_name, input->out_file_name);
free (backup_file_name);
- }
+ }
ck_rename (input->out_file_name, target_name, input->out_file_name);
+ cancel_cleanup ();
free (input->out_file_name);
}
else
@@ -717,18 +698,16 @@ closedown(input)
}
/* Reset range commands so that they are marked as non-matching */
-static void reset_addresses (struct vector *);
static void
-reset_addresses(vec)
- struct vector *vec;
+reset_addresses(struct vector *vec)
{
struct sed_cmd *cur_cmd;
int n;
for (cur_cmd = vec->v, n = vec->v_length; n--; cur_cmd++)
if (cur_cmd->a1
- && cur_cmd->a1->addr_type == ADDR_IS_NUM
- && cur_cmd->a1->addr_number == 0)
+ && cur_cmd->a1->addr_type == ADDR_IS_NUM
+ && cur_cmd->a1->addr_number == 0)
cur_cmd->range_state = RANGE_ACTIVE;
else
cur_cmd->range_state = RANGE_INACTIVE;
@@ -736,12 +715,8 @@ reset_addresses(vec)
/* Read in the next line of input, and store it in the pattern space.
Return zero if there is nothing left to input. */
-static bool read_pattern_space (struct input *, struct vector *, int);
static bool
-read_pattern_space(input, the_program, append)
- struct input *input;
- struct vector *the_program;
- int append;
+read_pattern_space(struct input *input, struct vector *the_program, int append)
{
if (append_head) /* redundant test to optimize for common case */
dump_append_queue();
@@ -755,23 +730,23 @@ read_pattern_space(input, the_program, append)
closedown(input);
if (!*input->file_list)
- return false;
+ return false;
if (input->reset_at_next_file)
- {
- input->line_number = 0;
- hold.length = 0;
- reset_addresses (the_program);
- rewind_read_files ();
-
- /* If doing in-place editing, we will never append the
- new-line to this file; but if the output goes to stdout,
- we might still have to output the missing new-line. */
- if (in_place_extension)
- output_file.missing_newline = false;
-
- input->reset_at_next_file = separate_files;
- }
+ {
+ input->line_number = 0;
+ hold.length = 0;
+ reset_addresses (the_program);
+ rewind_read_files ();
+
+ /* If doing in-place editing, we will never append the
+ new-line to this file; but if the output goes to stdout,
+ we might still have to output the missing new-line. */
+ if (in_place_extension)
+ output_file.missing_newline = false;
+
+ input->reset_at_next_file = separate_files;
+ }
open_next_file (*input->file_list++, input);
}
@@ -781,10 +756,8 @@ read_pattern_space(input, the_program, append)
}
-static bool last_file_with_data_p (struct input *);
static bool
-last_file_with_data_p(input)
- struct input *input;
+last_file_with_data_p(struct input *input)
{
for (;;)
{
@@ -792,24 +765,22 @@ last_file_with_data_p(input)
closedown(input);
if (!*input->file_list)
- return true;
+ return true;
open_next_file(*input->file_list++, input);
if (input->fp)
- {
- if ((ch = getc(input->fp)) != EOF)
- {
- ungetc(ch, input->fp);
- return false;
- }
- }
+ {
+ if ((ch = getc(input->fp)) != EOF)
+ {
+ ungetc(ch, input->fp);
+ return false;
+ }
+ }
}
}
/* Determine if we match the `$' address. */
-static bool test_eof (struct input *);
static bool
-test_eof(input)
- struct input *input;
+test_eof(struct input *input)
{
int ch;
@@ -827,11 +798,8 @@ test_eof(input)
/* Return non-zero if the current line matches the address
pointed to by `addr'. */
-static bool match_an_address_p (struct addr *, struct input *);
static bool
-match_an_address_p(addr, input)
- struct addr *addr;
- struct input *input;
+match_an_address_p(struct addr *addr, struct input *input)
{
switch (addr->addr_type)
{
@@ -839,11 +807,13 @@ match_an_address_p(addr, input)
return true;
case ADDR_IS_REGEX:
- return match_regex(addr->addr_regex, line.active, line.length, 0, NULL, 0);
+ return match_regex(addr->addr_regex, line.active, line.length, 0,
+ NULL, 0);
case ADDR_IS_NUM_MOD:
return (input->line_number >= addr->addr_number
- && ((input->line_number - addr->addr_number) % addr->addr_step) == 0);
+ && ((input->line_number - addr->addr_number)
+ % addr->addr_step) == 0);
case ADDR_IS_STEP:
case ADDR_IS_STEP_MOD:
@@ -855,8 +825,10 @@ match_an_address_p(addr, input)
case ADDR_IS_LAST:
return test_eof(input);
- /* ADDR_IS_NUM is handled in match_address_p. */
case ADDR_IS_NUM:
+ /* reminder: these are only meaningful for a1 addresses */
+ return (addr->addr_number == input->line_number);
+
default:
panic("INTERNAL ERROR: bad address type");
}
@@ -865,59 +837,54 @@ match_an_address_p(addr, input)
}
/* return non-zero if current address is valid for cmd */
-static bool match_address_p (struct sed_cmd *, struct input *);
static bool
-match_address_p(cmd, input)
- struct sed_cmd *cmd;
- struct input *input;
+match_address_p(struct sed_cmd *cmd, struct input *input)
{
if (!cmd->a1)
return true;
if (cmd->range_state != RANGE_ACTIVE)
{
+ if (!cmd->a2)
+ return match_an_address_p(cmd->a1, input);
+
/* Find if we are going to activate a range. Handle ADDR_IS_NUM
- specially: it represent an "absolute" state, it should not
- be computed like regexes. */
+ specially: it represent an "absolute" state, it should not
+ be computed like regexes. */
if (cmd->a1->addr_type == ADDR_IS_NUM)
- {
- if (!cmd->a2)
- return (input->line_number == cmd->a1->addr_number);
-
- if (cmd->range_state == RANGE_CLOSED
- || input->line_number < cmd->a1->addr_number)
- return false;
- }
+ {
+ if (cmd->range_state == RANGE_CLOSED
+ || input->line_number < cmd->a1->addr_number)
+ return false;
+ }
else
- {
- if (!cmd->a2)
- return match_an_address_p(cmd->a1, input);
-
- if (!match_an_address_p(cmd->a1, input))
+ {
+ if (!match_an_address_p(cmd->a1, input))
return false;
- }
+ }
/* Ok, start a new range. */
cmd->range_state = RANGE_ACTIVE;
switch (cmd->a2->addr_type)
- {
- case ADDR_IS_REGEX:
- /* Always include at least two lines. */
- return true;
- case ADDR_IS_NUM:
- /* Same handling as below, but always include at least one line. */
+ {
+ case ADDR_IS_REGEX:
+ /* Always include at least two lines. */
+ return true;
+ case ADDR_IS_NUM:
+ /* Same handling as below, but always include at least one line. */
if (input->line_number >= cmd->a2->addr_number)
- cmd->range_state = RANGE_CLOSED;
+ cmd->range_state = RANGE_CLOSED;
+ return (input->line_number <= cmd->a2->addr_number
+ || match_an_address_p(cmd->a1, input));
+ case ADDR_IS_STEP:
+ cmd->a2->addr_number = input->line_number + cmd->a2->addr_step;
+ return true;
+ case ADDR_IS_STEP_MOD:
+ cmd->a2->addr_number = input->line_number + cmd->a2->addr_step
+ - (input->line_number%cmd->a2->addr_step);
return true;
- case ADDR_IS_STEP:
- cmd->a2->addr_number = input->line_number + cmd->a2->addr_step;
- return true;
- case ADDR_IS_STEP_MOD:
- cmd->a2->addr_number = input->line_number + cmd->a2->addr_step
- - (input->line_number%cmd->a2->addr_step);
- return true;
- default:
- break;
+ default:
+ break;
}
}
@@ -928,10 +895,10 @@ match_address_p(cmd, input)
{
/* If the second address is a line number, and if we got past
that line, fail to match (it can happen when you jump
- over such addresses with `b' and `t'. Use RANGE_CLOSED
+ over such addresses with `b' and `t'. Use RANGE_CLOSED
so that the range is not re-enabled anymore. */
if (input->line_number >= cmd->a2->addr_number)
- cmd->range_state = RANGE_CLOSED;
+ cmd->range_state = RANGE_CLOSED;
return (input->line_number <= cmd->a2->addr_number);
}
@@ -944,10 +911,8 @@ match_address_p(cmd, input)
}
-static void do_list (int line_len);
static void
-do_list(line_len)
- int line_len;
+do_list(int line_len)
{
unsigned char *p = (unsigned char *)line.active;
countT len = line.length;
@@ -960,53 +925,55 @@ do_list(line_len)
output_missing_newline(&output_file);
for (; len--; ++p) {
o = obuf;
-
+
/* Some locales define 8-bit characters as printable. This makes the
- testsuite fail at 8to7.sed because the `l' command in fact will not
- convert the 8-bit characters. */
+ testsuite fail at 8to7.sed because the `l' command in fact will not
+ convert the 8-bit characters. */
#if defined isascii || defined HAVE_ISASCII
if (isascii(*p) && ISPRINT(*p)) {
#else
if (ISPRINT(*p)) {
#endif
- *o++ = *p;
- if (*p == '\\')
- *o++ = '\\';
+ *o++ = *p;
+ if (*p == '\\')
+ *o++ = '\\';
} else {
- *o++ = '\\';
- switch (*p) {
+ *o++ = '\\';
+ switch (*p) {
#if defined __STDC__ && __STDC__-0
- case '\a': *o++ = 'a'; break;
+ case '\a': *o++ = 'a'; break;
#else /* Not STDC; we'll just assume ASCII */
- case 007: *o++ = 'a'; break;
+ case 007: *o++ = 'a'; break;
#endif
- case '\b': *o++ = 'b'; break;
- case '\f': *o++ = 'f'; break;
- case '\n': *o++ = 'n'; break;
- case '\r': *o++ = 'r'; break;
- case '\t': *o++ = 't'; break;
- case '\v': *o++ = 'v'; break;
- default:
- sprintf(o, "%03o", *p);
- o += strlen(o);
- break;
- }
+ case '\b': *o++ = 'b'; break;
+ case '\f': *o++ = 'f'; break;
+ case '\n': *o++ = 'n'; break;
+ case '\r': *o++ = 'r'; break;
+ case '\t': *o++ = 't'; break;
+ case '\v': *o++ = 'v'; break;
+ default:
+ sprintf(o, "%03o", *p);
+ o += strlen(o);
+ break;
+ }
}
olen = o - obuf;
if (width+olen >= line_len && line_len > 0) {
- ck_fwrite("\\\n", 1, 2, fp);
- width = 0;
+ ck_fwrite("\\", 1, 1, fp);
+ ck_fwrite(&buffer_delimiter, 1, 1, fp);
+ width = 0;
}
ck_fwrite(obuf, 1, olen, fp);
width += olen;
}
- ck_fwrite("$\n", 1, 2, fp);
+ ck_fwrite("$", 1, 1, fp);
+ ck_fwrite(&buffer_delimiter, 1, 1, fp);
flush_output (fp);
}
static void append_replacement (struct line *buf, struct replacement *p,
- struct re_registers *regs)
+ struct re_registers *regs)
{
enum replacement_types repl_mod = 0;
@@ -1026,30 +993,28 @@ static void append_replacement (struct line *buf, struct replacement *p,
if (p->prefix_length)
{
str_append_modified(buf, p->prefix, p->prefix_length,
- curr_type);
+ curr_type);
curr_type &= ~REPL_MODIFIERS;
}
if (0 <= i)
- {
+ {
if (regs->end[i] == regs->start[i] && p->repl_type & REPL_MODIFIERS)
/* Save this modifier, we shall apply it later.
- e.g. in s/()([a-z])/\u\1\2/
- the \u modifier is applied to \2, not \1 */
- repl_mod = curr_type & REPL_MODIFIERS;
-
- else if (regs->end[i] != regs->start[i])
- str_append_modified(buf, line.active + regs->start[i],
- (size_t)(regs->end[i] - regs->start[i]),
- curr_type);
- }
+ e.g. in s/()([a-z])/\u\1\2/
+ the \u modifier is applied to \2, not \1 */
+ repl_mod = curr_type & REPL_MODIFIERS;
+
+ else if (regs->end[i] != regs->start[i])
+ str_append_modified(buf, line.active + regs->start[i],
+ (size_t)(regs->end[i] - regs->start[i]),
+ curr_type);
+ }
}
}
-static void do_subst (struct subst *);
static void
-do_subst(sub)
- struct subst *sub;
+do_subst(struct subst *sub)
{
size_t start = 0; /* where to start scan for (next) match in LINE */
size_t last_end = 0; /* where did the last successful match end in LINE */
@@ -1063,28 +1028,28 @@ do_subst(sub)
/* The first part of the loop optimizes s/xxx// when xxx is at the
start, and s/xxx$// */
if (!match_regex(sub->regx, line.active, line.length, start,
- &regs, sub->max_id + 1))
+ &regs, sub->max_id + 1))
return;
-
+
if (!sub->replacement && sub->numb <= 1)
{
if (regs.start[0] == 0 && !sub->global)
{
- /* We found a match, set the `replaced' flag. */
- replaced = true;
+ /* We found a match, set the `replaced' flag. */
+ replaced = true;
- line.active += regs.end[0];
- line.length -= regs.end[0];
- line.alloc -= regs.end[0];
- goto post_subst;
+ line.active += regs.end[0];
+ line.length -= regs.end[0];
+ line.alloc -= regs.end[0];
+ goto post_subst;
}
else if (regs.end[0] == line.length)
{
- /* We found a match, set the `replaced' flag. */
- replaced = true;
+ /* We found a match, set the `replaced' flag. */
+ replaced = true;
- line.length = regs.start[0];
- goto post_subst;
+ line.length = regs.start[0];
+ goto post_subst;
}
}
@@ -1095,11 +1060,11 @@ do_subst(sub)
/* Copy stuff to the left of this match into the output string. */
if (start < offset)
- str_append(&s_accum, line.active + start, offset - start);
+ str_append(&s_accum, line.active + start, offset - start);
/* If we're counting up to the Nth match, are we there yet?
And even if we are there, there is another case we have to
- skip: are we matching an empty string immediately following
+ skip: are we matching an empty string immediately following
another match?
This latter case avoids that baaaac, when passed through
@@ -1107,41 +1072,41 @@ do_subst(sub)
unacceptable because it is not consistently applied (for
example, `baaaa' gives `xbx', not `xbxx'). */
if ((matched > 0 || count == 0 || offset > last_end)
- && ++count >= sub->numb)
+ && ++count >= sub->numb)
{
/* We found a match, set the `replaced' flag. */
replaced = true;
/* Now expand the replacement string into the output string. */
append_replacement (&s_accum, sub->replacement, &regs);
- again = sub->global;
+ again = sub->global;
}
else
- {
+ {
/* The match was not replaced. Copy the text until its
end; if it was vacuous, skip over one character and
- add that character to the output. */
- if (matched == 0)
- {
- if (start < line.length)
- matched = 1;
- else
- break;
- }
-
- str_append(&s_accum, line.active + offset, matched);
+ add that character to the output. */
+ if (matched == 0)
+ {
+ if (start < line.length)
+ matched = 1;
+ else
+ break;
+ }
+
+ str_append(&s_accum, line.active + offset, matched);
}
/* Start after the match. last_end is the real end of the matched
- substring, excluding characters that were skipped in case the RE
- matched the empty string. */
+ substring, excluding characters that were skipped in case the RE
+ matched the empty string. */
start = offset + matched;
last_end = regs.end[0];
}
while (again
- && start <= line.length
- && match_regex(sub->regx, line.active, line.length, start,
- &regs, sub->max_id + 1));
+ && start <= line.length
+ && match_regex(sub->regx, line.active, line.length, start,
+ &regs, sub->max_id + 1));
/* Copy stuff to the right of the last match into the output string. */
if (start < line.length)
@@ -1159,43 +1124,43 @@ do_subst(sub)
post_subst:
if (sub->print & 1)
output_line(line.active, line.length, line.chomped, &output_file);
-
- if (sub->eval)
+
+ if (sub->eval)
{
#ifdef HAVE_POPEN
FILE *pipe_fp;
line_reset(&s_accum, NULL);
-
+
str_append (&line, "", 1);
pipe_fp = popen(line.active, "r");
-
- if (pipe_fp != NULL)
- {
- while (!feof (pipe_fp))
- {
- char buf[4096];
- int n = fread (buf, sizeof(char), 4096, pipe_fp);
- if (n > 0)
- str_append(&s_accum, buf, n);
- }
-
- pclose (pipe_fp);
-
- /* Exchange line and s_accum. This can be much cheaper than copying
- s_accum.active into line.text (for huge lines). See comment above
- for 'g' as to while the third argument is incorrect anyway. */
- line_exchange(&line, &s_accum, true);
- if (line.length &&
- line.active[line.length - 1] == buffer_delimiter)
- line.length--;
- }
+
+ if (pipe_fp != NULL)
+ {
+ while (!feof (pipe_fp))
+ {
+ char buf[4096];
+ int n = fread (buf, sizeof(char), 4096, pipe_fp);
+ if (n > 0)
+ str_append(&s_accum, buf, n);
+ }
+
+ pclose (pipe_fp);
+
+ /* Exchange line and s_accum. This can be much cheaper than copying
+ s_accum.active into line.text (for huge lines). See comment above
+ for 'g' as to while the third argument is incorrect anyway. */
+ line_exchange(&line, &s_accum, true);
+ if (line.length &&
+ line.active[line.length - 1] == buffer_delimiter)
+ line.length--;
+ }
else
- panic(_("error in subprocess"));
+ panic(_("error in subprocess"));
#else
panic(_("option `e' not supported"));
#endif
- }
-
+ }
+
if (sub->print & 2)
output_line(line.active, line.length, line.chomped, &output_file);
if (sub->outf)
@@ -1207,7 +1172,6 @@ do_subst(sub)
static countT branches;
-static countT count_branches (struct vector *);
static countT
count_branches(program)
struct vector *program;
@@ -1219,18 +1183,17 @@ count_branches(program)
while (isn_cnt-- > 0)
{
switch (cur_cmd->cmd)
- {
- case 'b':
- case 't':
- case 'T':
- case '{':
- ++cnt;
- }
+ {
+ case 'b':
+ case 't':
+ case 'T':
+ case '{':
+ ++cnt;
+ }
}
return cnt;
}
-static struct sed_cmd *shrink_program (struct vector *, struct sed_cmd *);
static struct sed_cmd *
shrink_program(vec, cur_cmd)
struct vector *vec;
@@ -1255,13 +1218,74 @@ shrink_program(vec, cur_cmd)
}
#endif /*EXPERIMENTAL_DASH_N_OPTIMIZATION*/
+/* Translate the global input LINE via TRANS.
+ This function handles the multi-byte case. */
+static void
+translate_mb (char *const *trans)
+{
+ size_t idx; /* index in the input line. */
+ mbstate_t mbstate = { 0, };
+ for (idx = 0; idx < line.length;)
+ {
+ unsigned int i;
+ size_t mbclen = MBRLEN (line.active + idx,
+ line.length - idx, &mbstate);
+ /* An invalid sequence, or a truncated multibyte
+ character. Treat it as a single-byte character. */
+ if (mbclen == (size_t) -1 || mbclen == (size_t) -2 || mbclen == 0)
+ mbclen = 1;
+
+ /* `i' indicate i-th translate pair. */
+ for (i = 0; trans[2*i] != NULL; i++)
+ {
+ if (strncmp(line.active + idx, trans[2*i], mbclen) == 0)
+ {
+ bool move_remain_buffer = false;
+ const char *tr = trans[2*i+1];
+ size_t trans_len = *tr == '\0' ? 1 : strlen (tr);
+
+ if (mbclen < trans_len)
+ {
+ size_t new_len = (line.length + 1
+ + trans_len - mbclen);
+ /* We must extend the line buffer. */
+ if (line.alloc < new_len)
+ {
+ /* And we must resize the buffer. */
+ resize_line(&line, new_len);
+ }
+ move_remain_buffer = true;
+ }
+ else if (mbclen > trans_len)
+ {
+ /* We must truncate the line buffer. */
+ move_remain_buffer = true;
+ }
+ size_t prev_idx = idx;
+ if (move_remain_buffer)
+ {
+ /* Move the remaining with \0. */
+ char const *move_from = (line.active + idx + mbclen);
+ char *move_to = line.active + idx + trans_len;
+ size_t move_len = line.length + 1 - idx - mbclen;
+ size_t move_offset = trans_len - mbclen;
+ memmove(move_to, move_from, move_len);
+ line.length += move_offset;
+ idx += move_offset;
+ }
+ memcpy(line.active + prev_idx, trans[2*i+1],
+ trans_len);
+ break;
+ }
+ }
+ idx += mbclen;
+ }
+}
+
/* Execute the program `vec' on the current input line.
Return exit status if caller should quit, -1 otherwise. */
-static int execute_program (struct vector *, struct input *);
static int
-execute_program(vec, input)
- struct vector *vec;
- struct input *input;
+execute_program(struct vector *vec, struct input *input)
{
struct sed_cmd *cur_cmd;
struct sed_cmd *end_cmd;
@@ -1271,174 +1295,164 @@ execute_program(vec, input)
while (cur_cmd < end_cmd)
{
if (match_address_p(cur_cmd, input) != cur_cmd->addr_bang)
- {
- switch (cur_cmd->cmd)
- {
- case 'a':
- {
- struct append_queue *aq = next_append_slot();
- aq->text = cur_cmd->x.cmd_txt.text;
- aq->textlen = cur_cmd->x.cmd_txt.text_length;
- }
- break;
-
- case '{':
- case 'b':
- cur_cmd = vec->v + cur_cmd->x.jump_index;
- continue;
-
- case '}':
- case '#':
- case ':':
- /* Executing labels and block-ends are easy. */
- break;
-
- case 'c':
- if (cur_cmd->range_state != RANGE_ACTIVE)
- output_line(cur_cmd->x.cmd_txt.text,
- cur_cmd->x.cmd_txt.text_length - 1, true,
- &output_file);
- /* POSIX.2 is silent about c starting a new cycle,
- but it seems to be expected (and make sense). */
- /* Fall Through */
- case 'd':
- return -1;
-
- case 'D':
- {
- char *p = memchr(line.active, buffer_delimiter, line.length);
- if (!p)
- return -1;
-
- ++p;
- line.alloc -= p - line.active;
- line.length -= p - line.active;
- line.active += p - line.active;
-
- /* reset to start next cycle without reading a new line: */
- cur_cmd = vec->v;
- continue;
- }
-
- case 'e': {
-#ifdef HAVE_POPEN
- FILE *pipe_fp;
- int cmd_length = cur_cmd->x.cmd_txt.text_length;
- line_reset(&s_accum, NULL);
-
- if (!cmd_length)
- {
- str_append (&line, "", 1);
- pipe_fp = popen(line.active, "r");
- }
- else
- {
- cur_cmd->x.cmd_txt.text[cmd_length - 1] = 0;
- pipe_fp = popen(cur_cmd->x.cmd_txt.text, "r");
- output_missing_newline(&output_file);
- }
-
- if (pipe_fp != NULL)
- {
- char buf[4096];
- int n;
- while (!feof (pipe_fp))
- if ((n = fread (buf, sizeof(char), 4096, pipe_fp)) > 0)
- {
- if (!cmd_length)
- str_append(&s_accum, buf, n);
- else
- ck_fwrite(buf, 1, n, output_file.fp);
- }
-
- pclose (pipe_fp);
- if (!cmd_length)
- {
- /* Store into pattern space for plain `e' commands */
- if (s_accum.length &&
- s_accum.active[s_accum.length - 1] == buffer_delimiter)
- s_accum.length--;
-
- /* Exchange line and s_accum. This can be much
- cheaper than copying s_accum.active into line.text
- (for huge lines). See comment above for 'g' as
- to while the third argument is incorrect anyway. */
- line_exchange(&line, &s_accum, true);
- }
- else
- flush_output(output_file.fp);
-
- }
- else
- panic(_("error in subprocess"));
+ {
+ switch (cur_cmd->cmd)
+ {
+ case 'a':
+ {
+ struct append_queue *aq = next_append_slot();
+ aq->text = cur_cmd->x.cmd_txt.text;
+ aq->textlen = cur_cmd->x.cmd_txt.text_length;
+ }
+ break;
+
+ case '{':
+ case 'b':
+ cur_cmd = vec->v + cur_cmd->x.jump_index;
+ continue;
+
+ case '}':
+ case '#':
+ case ':':
+ /* Executing labels and block-ends are easy. */
+ break;
+
+ case 'c':
+ if (cur_cmd->range_state != RANGE_ACTIVE)
+ output_line(cur_cmd->x.cmd_txt.text,
+ cur_cmd->x.cmd_txt.text_length - 1, true,
+ &output_file);
+ /* POSIX.2 is silent about c starting a new cycle,
+ but it seems to be expected (and make sense). */
+ /* Fall Through */
+ case 'd':
+ return -1;
+
+ case 'D':
+ {
+ char *p = memchr(line.active, buffer_delimiter, line.length);
+ if (!p)
+ return -1;
+
+ ++p;
+ line.alloc -= p - line.active;
+ line.length -= p - line.active;
+ line.active += p - line.active;
+
+ /* reset to start next cycle without reading a new line: */
+ cur_cmd = vec->v;
+ continue;
+ }
+
+ case 'e': {
+#ifndef HAVE_POPEN
+ panic(_("`e' command not supported"));
#else
- panic(_("`e' command not supported"));
+ FILE *pipe_fp;
+ int cmd_length = cur_cmd->x.cmd_txt.text_length;
+ line_reset(&s_accum, NULL);
+
+ if (!cmd_length)
+ {
+ str_append (&line, "", 1);
+ pipe_fp = popen(line.active, "r");
+ }
+ else
+ {
+ cur_cmd->x.cmd_txt.text[cmd_length - 1] = 0;
+ pipe_fp = popen(cur_cmd->x.cmd_txt.text, "r");
+ output_missing_newline(&output_file);
+ }
+
+ if (pipe_fp == NULL)
+ panic(_("error in subprocess"));
+
+ {
+ char buf[4096];
+ int n;
+ while (!feof (pipe_fp))
+ if ((n = fread (buf, sizeof(char), 4096, pipe_fp)) > 0)
+ {
+ if (!cmd_length)
+ str_append(&s_accum, buf, n);
+ else
+ ck_fwrite(buf, 1, n, output_file.fp);
+ }
+
+ pclose (pipe_fp);
+ if (!cmd_length)
+ {
+ /* Store into pattern space for plain `e' commands */
+ if (s_accum.length &&
+ s_accum.active[s_accum.length - 1] == buffer_delimiter)
+ s_accum.length--;
+
+ /* Exchange line and s_accum. This can be much
+ cheaper than copying s_accum.active into line.text
+ (for huge lines). See comment above for 'g' as
+ to while the third argument is incorrect anyway. */
+ line_exchange(&line, &s_accum, true);
+ }
+ else
+ flush_output(output_file.fp);
+ }
#endif
- break;
- }
-
- case 'g':
- /* We do not have a really good choice for the third parameter.
- The problem is that hold space and the input file might as
- well have different states; copying it from hold space means
- that subsequent input might be read incorrectly, while
- keeping it as in pattern space means that commands operating
- on the moved buffer might consider a wrong character set.
- We keep it true because it's what sed <= 4.1.5 did. */
- line_copy(&hold, &line, true);
- break;
-
- case 'G':
- /* We do not have a really good choice for the third parameter.
- The problem is that hold space and pattern space might as
- well have different states. So, true is as wrong as false.
- We keep it true because it's what sed <= 4.1.5 did, but
- we could consider having line_ap. */
- line_append(&hold, &line, true);
- break;
-
- case 'h':
- /* Here, it is ok to have true. */
- line_copy(&line, &hold, true);
- break;
-
- case 'H':
- /* See comment above for 'G' regarding the third parameter. */
- line_append(&line, &hold, true);
- break;
-
- case 'i':
- output_line(cur_cmd->x.cmd_txt.text,
- cur_cmd->x.cmd_txt.text_length - 1,
- true, &output_file);
- break;
-
- case 'l':
- do_list(cur_cmd->x.int_arg == -1
- ? lcmd_out_line_len
- : cur_cmd->x.int_arg);
- break;
-
- case 'L':
- output_missing_newline(&output_file);
- fmt(line.active, line.active + line.length,
- cur_cmd->x.int_arg == -1
- ? lcmd_out_line_len
- : cur_cmd->x.int_arg,
- output_file.fp);
- flush_output(output_file.fp);
- break;
-
- case 'n':
- if (!no_default_output)
- output_line(line.active, line.length, line.chomped, &output_file);
- if (test_eof(input) || !read_pattern_space(input, vec, false))
- return -1;
- break;
-
- case 'N':
- str_append(&line, &buffer_delimiter, 1);
-
+ break;
+ }
+
+ case 'g':
+ /* We do not have a really good choice for the third parameter.
+ The problem is that hold space and the input file might as
+ well have different states; copying it from hold space means
+ that subsequent input might be read incorrectly, while
+ keeping it as in pattern space means that commands operating
+ on the moved buffer might consider a wrong character set.
+ We keep it true because it's what sed <= 4.1.5 did. */
+ line_copy(&hold, &line, true);
+ break;
+
+ case 'G':
+ /* We do not have a really good choice for the third parameter.
+ The problem is that hold space and pattern space might as
+ well have different states. So, true is as wrong as false.
+ We keep it true because it's what sed <= 4.1.5 did, but
+ we could consider having line_ap. */
+ line_append(&hold, &line, true);
+ break;
+
+ case 'h':
+ /* Here, it is ok to have true. */
+ line_copy(&line, &hold, true);
+ break;
+
+ case 'H':
+ /* See comment above for 'G' regarding the third parameter. */
+ line_append(&line, &hold, true);
+ break;
+
+ case 'i':
+ output_line(cur_cmd->x.cmd_txt.text,
+ cur_cmd->x.cmd_txt.text_length - 1,
+ true, &output_file);
+ break;
+
+ case 'l':
+ do_list(cur_cmd->x.int_arg == -1
+ ? lcmd_out_line_len
+ : cur_cmd->x.int_arg);
+ break;
+
+ case 'n':
+ if (!no_default_output)
+ output_line(line.active, line.length, line.chomped,
+ &output_file);
+ if (test_eof(input) || !read_pattern_space(input, vec, false))
+ return -1;
+ break;
+
+ case 'N':
+ str_append(&line, &buffer_delimiter, 1);
+
if (test_eof(input) || !read_pattern_space(input, vec, true))
{
line.length--;
@@ -1447,199 +1461,137 @@ execute_program(vec, input)
&output_file);
return -1;
}
- break;
+ break;
- case 'p':
- output_line(line.active, line.length, line.chomped, &output_file);
- break;
+ case 'p':
+ output_line(line.active, line.length, line.chomped, &output_file);
+ break;
- case 'P':
- {
- char *p = memchr(line.active, buffer_delimiter, line.length);
- output_line(line.active, p ? p - line.active : line.length,
- p ? true : line.chomped, &output_file);
- }
- break;
+ case 'P':
+ {
+ char *p = memchr(line.active, buffer_delimiter, line.length);
+ output_line(line.active, p ? p - line.active : line.length,
+ p ? true : line.chomped, &output_file);
+ }
+ break;
case 'q':
if (!no_default_output)
- output_line(line.active, line.length, line.chomped, &output_file);
- dump_append_queue();
-
- case 'Q':
- return cur_cmd->x.int_arg == -1 ? 0 : cur_cmd->x.int_arg;
-
- case 'r':
- if (cur_cmd->x.fname)
- {
- struct append_queue *aq = next_append_slot();
- aq->fname = cur_cmd->x.fname;
- }
- break;
-
- case 'R':
- if (cur_cmd->x.fp && !feof (cur_cmd->x.fp))
- {
- struct append_queue *aq;
- size_t buflen;
- char *text = NULL;
- int result;
-
- result = ck_getdelim (&text, &buflen, buffer_delimiter,
- cur_cmd->x.fp);
- if (result != EOF)
- {
- aq = next_append_slot();
- aq->free = true;
- aq->text = text;
- aq->textlen = result;
- }
- }
- break;
-
- case 's':
- do_subst(cur_cmd->x.cmd_subst);
- break;
-
- case 't':
- if (replaced)
- {
- replaced = false;
- cur_cmd = vec->v + cur_cmd->x.jump_index;
- continue;
- }
- break;
-
- case 'T':
- if (!replaced)
- {
- cur_cmd = vec->v + cur_cmd->x.jump_index;
- continue;
- }
- else
- replaced = false;
- break;
-
- case 'w':
- if (cur_cmd->x.fp)
- output_line(line.active, line.length,
- line.chomped, cur_cmd->x.outf);
- break;
-
- case 'W':
- if (cur_cmd->x.fp)
- {
- char *p = memchr(line.active, buffer_delimiter, line.length);
- output_line(line.active, p ? p - line.active : line.length,
- p ? true : line.chomped, cur_cmd->x.outf);
- }
- break;
-
- case 'x':
- /* See comment above for 'g' regarding the third parameter. */
- line_exchange(&line, &hold, false);
- break;
-
- case 'y':
- {
- if (mb_cur_max > 1)
- {
- int idx, prev_idx; /* index in the input line. */
- char **trans;
- mbstate_t mbstate;
- memset(&mbstate, 0, sizeof(mbstate_t));
- for (idx = 0; idx < line.length;)
- {
- int mbclen, i;
- mbclen = MBRLEN (line.active + idx, line.length - idx,
- &mbstate);
- /* An invalid sequence, or a truncated multibyte
- character. We treat it as a singlebyte character.
- */
- if (mbclen == (size_t) -1 || mbclen == (size_t) -2
- || mbclen == 0)
- mbclen = 1;
-
- trans = cur_cmd->x.translatemb;
- /* `i' indicate i-th translate pair. */
- for (i = 0; trans[2*i] != NULL; i++)
- {
- if (strncmp(line.active + idx, trans[2*i], mbclen) == 0)
- {
- bool move_remain_buffer = false;
- int trans_len = strlen(trans[2*i+1]);
-
- if (mbclen < trans_len)
- {
- int new_len;
- new_len = line.length + 1 + trans_len - mbclen;
- /* We must extend the line buffer. */
- if (line.alloc < new_len)
- {
- /* And we must resize the buffer. */
- resize_line(&line, new_len);
- }
- move_remain_buffer = true;
- }
- else if (mbclen > trans_len)
- {
- /* We must truncate the line buffer. */
- move_remain_buffer = true;
- }
- prev_idx = idx;
- if (move_remain_buffer)
- {
- int move_len, move_offset;
- char *move_from, *move_to;
- /* Move the remaining with \0. */
- move_from = line.active + idx + mbclen;
- move_to = line.active + idx + trans_len;
- move_len = line.length + 1 - idx - mbclen;
- move_offset = trans_len - mbclen;
- memmove(move_to, move_from, move_len);
- line.length += move_offset;
- idx += move_offset;
- }
- strncpy(line.active + prev_idx, trans[2*i+1],
- trans_len);
- break;
- }
- }
- idx += mbclen;
- }
- }
- else
- {
- unsigned char *p, *e;
- p = (unsigned char *)line.active;
- for (e=p+line.length; p<e; ++p)
- *p = cur_cmd->x.translate[*p];
- }
- }
- break;
-
- case 'z':
- line.length = 0;
- break;
-
- case '=':
+ output_line(line.active, line.length, line.chomped,
+ &output_file);
+ dump_append_queue();
+ /* FALLTHROUGH */
+
+ case 'Q':
+ return cur_cmd->x.int_arg == -1 ? 0 : cur_cmd->x.int_arg;
+
+ case 'r':
+ if (cur_cmd->x.fname)
+ {
+ struct append_queue *aq = next_append_slot();
+ aq->fname = cur_cmd->x.fname;
+ }
+ break;
+
+ case 'R':
+ if (cur_cmd->x.fp && !feof (cur_cmd->x.fp))
+ {
+ struct append_queue *aq;
+ size_t buflen;
+ char *text = NULL;
+ int result;
+
+ result = ck_getdelim (&text, &buflen, buffer_delimiter,
+ cur_cmd->x.fp);
+ if (result != EOF)
+ {
+ aq = next_append_slot();
+ aq->free = true;
+ aq->text = text;
+ aq->textlen = result;
+ }
+ }
+ break;
+
+ case 's':
+ do_subst(cur_cmd->x.cmd_subst);
+ break;
+
+ case 't':
+ if (replaced)
+ {
+ replaced = false;
+ cur_cmd = vec->v + cur_cmd->x.jump_index;
+ continue;
+ }
+ break;
+
+ case 'T':
+ if (!replaced)
+ {
+ cur_cmd = vec->v + cur_cmd->x.jump_index;
+ continue;
+ }
+ else
+ replaced = false;
+ break;
+
+ case 'w':
+ if (cur_cmd->x.fp)
+ output_line(line.active, line.length,
+ line.chomped, cur_cmd->x.outf);
+ break;
+
+ case 'W':
+ if (cur_cmd->x.fp)
+ {
+ char *p = memchr(line.active, buffer_delimiter, line.length);
+ output_line(line.active, p ? p - line.active : line.length,
+ p ? true : line.chomped, cur_cmd->x.outf);
+ }
+ break;
+
+ case 'x':
+ /* See comment above for 'g' regarding the third parameter. */
+ line_exchange(&line, &hold, false);
+ break;
+
+ case 'y':
+ if (mb_cur_max > 1)
+ translate_mb (cur_cmd->x.translatemb);
+ else
+ {
+ unsigned char *p, *e;
+ p = (unsigned char *)line.active;
+ for (e=p+line.length; p<e; ++p)
+ *p = cur_cmd->x.translate[*p];
+ }
+ break;
+
+ case 'z':
+ line.length = 0;
+ break;
+
+ case '=':
output_missing_newline(&output_file);
- fprintf(output_file.fp, "%lu\n",
- (unsigned long)input->line_number);
+ fprintf(output_file.fp, "%lu%c",
+ (unsigned long)input->line_number,
+ buffer_delimiter);
flush_output(output_file.fp);
break;
case 'F':
output_missing_newline(&output_file);
- fprintf(output_file.fp, "%s\n",
- input->in_file_name);
+ fprintf(output_file.fp, "%s%c",
+ input->in_file_name,
+ buffer_delimiter);
flush_output(output_file.fp);
break;
default:
panic("INTERNAL ERROR: Bad cmd %c", cur_cmd->cmd);
}
- }
+ }
#ifdef EXPERIMENTAL_DASH_N_OPTIMIZATION
/* If our top-level program consists solely of commands with
@@ -1651,42 +1603,42 @@ execute_program(vec, input)
compared against how much time is saved. One semantic
difference (which I think is an improvement) is that *this*
version will terminate after printing line two in the script
- "yes | sed -n 2p".
-
+ "yes | sed -n 2p".
+
Don't use this when in-place editing is active, because line
numbers restart each time then. */
else if (!separate_files)
- {
- if (cur_cmd->a1->addr_type == ADDR_IS_NUM
- && (cur_cmd->a2
- ? cur_cmd->range_state == RANGE_CLOSED
- : cur_cmd->a1->addr_number < input->line_number))
- {
- /* Skip this address next time */
- cur_cmd->addr_bang = !cur_cmd->addr_bang;
- cur_cmd->a1->addr_type = ADDR_IS_NULL;
- if (cur_cmd->a2)
- cur_cmd->a2->addr_type = ADDR_IS_NULL;
-
- /* can we make an optimization? */
- if (cur_cmd->addr_bang)
- {
- if (cur_cmd->cmd == 'b' || cur_cmd->cmd == 't'
- || cur_cmd->cmd == 'T' || cur_cmd->cmd == '}')
- branches--;
-
- cur_cmd->cmd = '#'; /* replace with no-op */
- if (branches == 0)
- cur_cmd = shrink_program(vec, cur_cmd);
- if (!cur_cmd && no_default_output)
- return 0;
- end_cmd = vec->v + vec->v_length;
- if (!cur_cmd)
- cur_cmd = end_cmd;
- continue;
- }
- }
- }
+ {
+ if (cur_cmd->a1->addr_type == ADDR_IS_NUM
+ && (cur_cmd->a2
+ ? cur_cmd->range_state == RANGE_CLOSED
+ : cur_cmd->a1->addr_number < input->line_number))
+ {
+ /* Skip this address next time */
+ cur_cmd->addr_bang = !cur_cmd->addr_bang;
+ cur_cmd->a1->addr_type = ADDR_IS_NULL;
+ if (cur_cmd->a2)
+ cur_cmd->a2->addr_type = ADDR_IS_NULL;
+
+ /* can we make an optimization? */
+ if (cur_cmd->addr_bang)
+ {
+ if (cur_cmd->cmd == 'b' || cur_cmd->cmd == 't'
+ || cur_cmd->cmd == 'T' || cur_cmd->cmd == '}')
+ branches--;
+
+ cur_cmd->cmd = '#'; /* replace with no-op */
+ if (branches == 0)
+ cur_cmd = shrink_program(vec, cur_cmd);
+ if (!cur_cmd && no_default_output)
+ return 0;
+ end_cmd = vec->v + vec->v_length;
+ if (!cur_cmd)
+ cur_cmd = end_cmd;
+ continue;
+ }
+ }
+ }
#endif /*EXPERIMENTAL_DASH_N_OPTIMIZATION*/
/* this is buried down here so that a "continue" statement can skip it */
@@ -1702,9 +1654,7 @@ execute_program(vec, input)
/* Apply the compiled script to all the named files. */
int
-process_files(the_program, argv)
- struct vector *the_program;
- char **argv;
+process_files(struct vector *the_program, char **argv)
{
static char dash[] = "-";
static char *stdin_argv[2] = { dash, NULL };
@@ -1736,9 +1686,9 @@ process_files(the_program, argv)
{
status = execute_program(the_program, &input);
if (status == -1)
- status = EXIT_SUCCESS;
+ status = EXIT_SUCCESS;
else
- break;
+ break;
}
closedown(&input);
@@ -1756,7 +1706,7 @@ process_files(the_program, argv)
#endif /*DEBUG_LEAKS*/
if (input.bad_count)
- status = 2;
+ status = EXIT_BAD_INPUT;
return status;
}
diff --git a/sed/fmt.c b/sed/fmt.c
deleted file mode 100644
index 3d15d69..0000000
--- a/sed/fmt.c
+++ /dev/null
@@ -1,577 +0,0 @@
-/* `L' command implementation for GNU sed, based on GNU fmt 1.22.
- Copyright (C) 1994, 1995, 1996, 2002, 2003 Free Software Foundation, Inc.
-
- This 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, write to the Free Software Foundation,
- Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
-
-/* GNU fmt was written by Ross Paterson <rap@doc.ic.ac.uk>. */
-
-#include "sed.h"
-
-#include <stdio.h>
-#include <string.h>
-#include <ctype.h>
-#include <sys/types.h>
-#include <limits.h>
-
-/* The following parameters represent the program's idea of what is
- "best". Adjust to taste, subject to the caveats given. */
-
-/* Prefer lines to be LEEWAY % shorter than the maximum width, giving
- room for optimization. */
-#define LEEWAY 7
-
-/* Costs and bonuses are expressed as the equivalent departure from the
- optimal line length, multiplied by 10. e.g. assigning something a
- cost of 50 means that it is as bad as a line 5 characters too short
- or too long. The definition of SHORT_COST(n) should not be changed.
- However, EQUIV(n) may need tuning. */
-
-typedef long COST;
-
-#define MAXCOST (~(((unsigned long) 1) << (8 * sizeof (COST) -1)))
-
-#define SQR(n) ((n) * (n))
-#define EQUIV(n) SQR ((COST) (n))
-
-/* Cost of a filled line n chars longer or shorter than best_width. */
-#define SHORT_COST(n) EQUIV ((n) * 10)
-
-/* Cost of the difference between adjacent filled lines. */
-#define RAGGED_COST(n) (SHORT_COST (n) / 2)
-
-/* Basic cost per line. */
-#define LINE_COST EQUIV (70)
-
-/* Cost of breaking a line after the first word of a sentence, where
- the length of the word is N. */
-#define WIDOW_COST(n) (EQUIV (200) / ((n) + 2))
-
-/* Cost of breaking a line before the last word of a sentence, where
- the length of the word is N. */
-#define ORPHAN_COST(n) (EQUIV (150) / ((n) + 2))
-
-/* Bonus for breaking a line at the end of a sentence. */
-#define SENTENCE_BONUS EQUIV (50)
-
-/* Cost of breaking a line after a period not marking end of a sentence.
- With the definition of sentence we are using (borrowed from emacs, see
- get_line()) such a break would then look like a sentence break. Hence
- we assign a very high cost -- it should be avoided unless things are
- really bad. */
-#define NOBREAK_COST EQUIV (600)
-
-/* Bonus for breaking a line before open parenthesis. */
-#define PAREN_BONUS EQUIV (40)
-
-/* Bonus for breaking a line after other punctuation. */
-#define PUNCT_BONUS EQUIV(40)
-
-/* Credit for breaking a long paragraph one line later. */
-#define LINE_CREDIT EQUIV(3)
-
-/* Size of paragraph buffer in words. Longer paragraphs are handled
- neatly (cf. flush_paragraph()), so there's little to gain by making
- these larger. */
-#define MAXWORDS 1000
-
-#define GETC() (parabuf == end_of_parabuf ? EOF : *parabuf++)
-
-/* Extra ctype(3)-style macros. */
-
-#define isopen(c) (strchr ("([`'\"", (c)) != NULL)
-#define isclose(c) (strchr (")]'\"", (c)) != NULL)
-#define isperiod(c) (strchr (".?!", (c)) != NULL)
-
-/* Size of a tab stop, for expansion on input and re-introduction on
- output. */
-#define TABWIDTH 8
-
-/* Word descriptor structure. */
-
-typedef struct Word WORD;
-
-struct Word
- {
-
- /* Static attributes determined during input. */
-
- const char *text; /* the text of the word */
- short length; /* length of this word */
- short space; /* the size of the following space */
- unsigned paren:1; /* starts with open paren */
- unsigned period:1; /* ends in [.?!])* */
- unsigned punct:1; /* ends in punctuation */
- unsigned final:1; /* end of sentence */
-
- /* The remaining fields are computed during the optimization. */
-
- short line_length; /* length of the best line starting here */
- COST best_cost; /* cost of best paragraph starting here */
- WORD *next_break; /* break which achieves best_cost */
- };
-
-/* Forward declarations. */
-
-static bool get_paragraph (void);
-static int get_line (int c);
-static int get_space (int c);
-static int copy_rest (int c);
-static bool same_para (int c);
-static void flush_paragraph (void);
-static void fmt_paragraph (void);
-static void check_punctuation (WORD *w);
-static COST base_cost (WORD *this);
-static COST line_cost (WORD *next, int len);
-static void put_paragraph (WORD *finish);
-static void put_line (WORD *w, int indent);
-static void put_word (WORD *w);
-static void put_space (int space);
-
-/* Option values. */
-
-/* User-supplied maximum line width (default WIDTH). The only output
- lines
- longer than this will each comprise a single word. */
-static int max_width;
-
-/* Space for the paragraph text. */
-static const char *parabuf;
-
-/* End of space for the paragraph text. */
-static const char *end_of_parabuf;
-
-/* The file on which we output */
-static FILE *outfile;
-
-/* Values derived from the option values. */
-
-/* The preferred width of text lines, set to LEEWAY % less than max_width. */
-static int best_width;
-
-/* Dynamic variables. */
-
-/* Start column of the character most recently read from the input file. */
-static int in_column;
-
-/* Start column of the next character to be written to stdout. */
-static int out_column;
-
-/* The words of a paragraph -- longer paragraphs are handled neatly
- (cf. flush_paragraph()). */
-static WORD words[MAXWORDS];
-
-/* A pointer into the above word array, indicating the first position
- after the last complete word. Sometimes it will point at an incomplete
- word. */
-static WORD *word_limit;
-
-/* Indentation of the first line of the current paragraph. */
-static int first_indent;
-
-/* Indentation of other lines of the current paragraph */
-static int other_indent;
-
-/* The last character read from the input file. */
-static int next_char;
-
-/* If nonzero, the length of the last line output in the current
- paragraph, used to charge for raggedness at the split point for long
- paragraphs chosen by fmt_paragraph(). */
-static int last_line_length;
-
-/* read file F and send formatted output to stdout. */
-
-void
-fmt (const char *line, const char *line_end, int max_length, FILE *output_file)
-{
- parabuf = line;
- end_of_parabuf = line_end;
- outfile = output_file;
-
- max_width = max_length;
- best_width = max_width * (201 - 2 * LEEWAY) / 200;
-
- in_column = 0;
- other_indent = 0;
- next_char = GETC();
- while (get_paragraph ())
- {
- fmt_paragraph ();
- put_paragraph (word_limit);
- }
-}
-
-/* Read a paragraph from input file F. A paragraph consists of a
- maximal number of non-blank (excluding any prefix) lines
- with the same indent.
-
- Return false if end-of-file was encountered before the start of a
- paragraph, else true. */
-
-static bool
-get_paragraph ()
-{
- register int c;
-
- last_line_length = 0;
- c = next_char;
-
- /* Scan (and copy) blank lines, and lines not introduced by the prefix. */
-
- while (c == '\n' || c == EOF)
- {
- c = copy_rest (c);
- if (c == EOF)
- {
- next_char = EOF;
- return false;
- }
- putc ('\n', outfile);
- c = GETC();
- }
-
- /* Got a suitable first line for a paragraph. */
-
- first_indent = in_column;
- word_limit = words;
- c = get_line (c);
-
- /* Read rest of paragraph. */
-
- other_indent = in_column;
- while (same_para (c) && in_column == other_indent)
- c = get_line (c);
-
- (word_limit - 1)->period = (word_limit - 1)->final = true;
- next_char = c;
- return true;
-}
-
-/* Copy to the output a blank line. In the latter, C is \n or EOF.
- Return the character (\n or EOF) ending the line. */
-
-static int
-copy_rest (register int c)
-{
- out_column = 0;
- while (c != '\n' && c != EOF)
- {
- putc (c, outfile);
- c = GETC();
- }
- return c;
-}
-
-/* Return true if a line whose first non-blank character after the
- prefix (if any) is C could belong to the current paragraph,
- otherwise false. */
-
-static bool
-same_para (register int c)
-{
- return (c != '\n' && c != EOF);
-}
-
-/* Read a line from the input data given first non-blank character C
- after the prefix, and the following indent, and break it into words.
- A word is a maximal non-empty string of non-white characters. A word
- ending in [.?!]["')\]]* and followed by end-of-line or at least two
- spaces ends a sentence, as in emacs.
-
- Return the first non-blank character of the next line. */
-
-static int
-get_line (register int c)
-{
- int start;
- register WORD *end_of_word;
-
- end_of_word = &words[MAXWORDS - 2];
-
- do
- { /* for each word in a line */
-
- /* Scan word. */
-
- word_limit->text = parabuf - 1;
- do
- c = GETC();
- while (c != EOF && !ISSPACE (c));
- word_limit->length = parabuf - word_limit->text - (c != EOF);
- in_column += word_limit->length;
-
- check_punctuation (word_limit);
-
- /* Scan inter-word space. */
-
- start = in_column;
- c = get_space (c);
- word_limit->space = in_column - start;
- word_limit->final = (c == EOF
- || (word_limit->period
- && (c == '\n' || word_limit->space > 1)));
- if (c == '\n' || c == EOF)
- word_limit->space = word_limit->final ? 2 : 1;
- if (word_limit == end_of_word)
- flush_paragraph ();
- word_limit++;
- if (c == EOF)
- {
- in_column = first_indent;
- return EOF;
- }
- }
- while (c != '\n');
-
- in_column = 0;
- c = GETC();
- return get_space (c);
-}
-
-/* Read blank characters from the input data, starting with C, and keeping
- in_column up-to-date. Return first non-blank character. */
-
-static int
-get_space (register int c)
-{
- for (;;)
- {
- if (c == ' ')
- in_column++;
- else if (c == '\t')
- in_column = (in_column / TABWIDTH + 1) * TABWIDTH;
- else
- return c;
- c = GETC();
- }
-}
-
-/* Set extra fields in word W describing any attached punctuation. */
-
-static void
-check_punctuation (register WORD *w)
-{
- register const char *start, *finish;
-
- start = w->text;
- finish = start + (w->length - 1);
- w->paren = isopen (*start);
- w->punct = ISPUNCT (*finish);
- while (isclose (*finish) && finish > start)
- finish--;
- w->period = isperiod (*finish);
-}
-
-/* Flush part of the paragraph to make room. This function is called on
- hitting the limit on the number of words or characters. */
-
-static void
-flush_paragraph (void)
-{
- WORD *split_point;
- register WORD *w;
- COST best_break;
-
- /* - format what you have so far as a paragraph,
- - find a low-cost line break near the end,
- - output to there,
- - make that the start of the paragraph. */
-
- fmt_paragraph ();
-
- /* Choose a good split point. */
-
- split_point = word_limit;
- best_break = MAXCOST;
- for (w = words->next_break; w != word_limit; w = w->next_break)
- {
- if (w->best_cost - w->next_break->best_cost < best_break)
- {
- split_point = w;
- best_break = w->best_cost - w->next_break->best_cost;
- }
- if (best_break <= MAXCOST - LINE_CREDIT)
- best_break += LINE_CREDIT;
- }
- put_paragraph (split_point);
-
- /* Copy words from split_point down to word -- we use memmove because
- the source and target may overlap. */
-
- memmove ((char *) words, (char *) split_point,
- (word_limit - split_point + 1) * sizeof (WORD));
- word_limit -= split_point - words;
-}
-
-/* Compute the optimal formatting for the whole paragraph by computing
- and remembering the optimal formatting for each suffix from the empty
- one to the whole paragraph. */
-
-static void
-fmt_paragraph (void)
-{
- register WORD *start, *w;
- register int len;
- register COST wcost, best;
- int saved_length;
-
- word_limit->best_cost = 0;
- saved_length = word_limit->length;
- word_limit->length = max_width; /* sentinel */
-
- for (start = word_limit - 1; start >= words; start--)
- {
- best = MAXCOST;
- len = start == words ? first_indent : other_indent;
-
- /* At least one word, however long, in the line. */
-
- w = start;
- len += w->length;
- do
- {
- w++;
-
- /* Consider breaking before w. */
-
- wcost = line_cost (w, len) + w->best_cost;
- if (start == words && last_line_length > 0)
- wcost += RAGGED_COST (len - last_line_length);
- if (wcost < best)
- {
- best = wcost;
- start->next_break = w;
- start->line_length = len;
- }
- len += (w - 1)->space + w->length; /* w > start >= words */
- }
- while (len < max_width);
- start->best_cost = best + base_cost (start);
- }
-
- word_limit->length = saved_length;
-}
-
-/* Return the constant component of the cost of breaking before the
- word THIS. */
-
-static COST
-base_cost (register WORD *this)
-{
- register COST cost;
-
- cost = LINE_COST;
-
- if (this > words)
- {
- if ((this - 1)->period)
- {
- if ((this - 1)->final)
- cost -= SENTENCE_BONUS;
- else
- cost += NOBREAK_COST;
- }
- else if ((this - 1)->punct)
- cost -= PUNCT_BONUS;
- else if (this > words + 1 && (this - 2)->final)
- cost += WIDOW_COST ((this - 1)->length);
- }
-
- if (this->paren)
- cost -= PAREN_BONUS;
- else if (this->final)
- cost += ORPHAN_COST (this->length);
-
- return cost;
-}
-
-/* Return the component of the cost of breaking before word NEXT that
- depends on LEN, the length of the line beginning there. */
-
-static COST
-line_cost (register WORD *next, register int len)
-{
- register int n;
- register COST cost;
-
- if (next == word_limit)
- return 0;
- n = best_width - len;
- cost = SHORT_COST (n);
- if (next->next_break != word_limit)
- {
- n = len - next->line_length;
- cost += RAGGED_COST (n);
- }
- return cost;
-}
-
-/* Output to stdout a paragraph from word up to (but not including)
- FINISH, which must be in the next_break chain from word. */
-
-static void
-put_paragraph (register WORD *finish)
-{
- register WORD *w;
-
- put_line (words, first_indent);
- for (w = words->next_break; w != finish; w = w->next_break)
- put_line (w, other_indent);
-}
-
-/* Output to stdout the line beginning with word W, beginning in column
- INDENT, including the prefix (if any). */
-
-static void
-put_line (register WORD *w, int indent)
-{
- register WORD *endline;
- out_column = 0;
- put_space (indent);
-
- endline = w->next_break - 1;
- for (; w != endline; w++)
- {
- put_word (w);
- put_space (w->space);
- }
- put_word (w);
- last_line_length = out_column;
- putc ('\n', outfile);
-}
-
-/* Output to stdout the word W. */
-
-static void
-put_word (register WORD *w)
-{
- register const char *s;
- register int n;
-
- s = w->text;
- for (n = w->length; n != 0; n--)
- putc (*s++, outfile);
- out_column += w->length;
-}
-
-/* Output to stdout SPACE spaces, or equivalent tabs. */
-
-static void
-put_space (int space)
-{
- out_column += space;
- while (space--)
- putc (' ', outfile);
-}
diff --git a/sed/local.mk b/sed/local.mk
new file mode 100644
index 0000000..dd1da0a
--- /dev/null
+++ b/sed/local.mk
@@ -0,0 +1,57 @@
+# Copyright (C) 2016 Free Software Foundation, Inc.
+
+# This 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/>.
+
+bin_PROGRAMS += sed/sed
+
+localedir = $(datadir)/locale
+
+sed_sed_SOURCES = \
+ sed/compile.c \
+ sed/execute.c \
+ sed/mbcs.c \
+ sed/regexp.c \
+ sed/sed.c \
+ sed/utils.c
+
+noinst_HEADERS += \
+ sed/sed.h \
+ sed/utils.h
+
+sed_sed_CPPFLAGS = $(AM_CPPFLAGS) -DLOCALEDIR=\"$(localedir)\"
+sed_sed_CFLAGS = $(AM_CFLAGS) $(WARN_CFLAGS) $(WERROR_CFLAGS)
+sed_sed_LDADD = sed/libver.a lib/libsed.a $(INTLLIBS) $(LIB_ACL) $(LIB_SELINUX)
+sed_sed_DEPENDENCIES = lib/libsed.a sed/libver.a
+
+$(sed_sed_OBJECTS): $(BUILT_SOURCES)
+
+BUILT_SOURCES += sed/version.c
+DISTCLEANFILES += sed/version.c
+sed/version.c: Makefile
+ $(AM_V_GEN)rm -f $@
+ $(AM_V_at)printf '#include <config.h>\n' > $@t
+ $(AM_V_at)printf 'char const *Version = "$(PACKAGE_VERSION)";\n' >> $@t
+ $(AM_V_at)chmod a-w $@t
+ $(AM_V_at)mv $@t $@
+
+BUILT_SOURCES += sed/version.h
+DISTCLEANFILES += sed/version.h
+sed/version.h: Makefile
+ $(AM_V_GEN)rm -f $@
+ $(AM_V_at)printf 'extern char const *Version;\n' > $@t
+ $(AM_V_at)chmod a-w $@t
+ $(AM_V_at)mv $@t $@
+
+noinst_LIBRARIES += sed/libver.a
+nodist_sed_libver_a_SOURCES = sed/version.c sed/version.h
diff --git a/sed/mbcs.c b/sed/mbcs.c
index 964e352..3505ef6 100644
--- a/sed/mbcs.c
+++ b/sed/mbcs.c
@@ -1,5 +1,5 @@
/* GNU SED, a batch stream editor.
- Copyright (C) 2003, 2006, 2009 Free Software Foundation, Inc.
+ Copyright (C) 2003-2016 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -24,30 +24,48 @@
int mb_cur_max;
bool is_utf8;
-/* Add a byte to the multibyte character represented by the state
- CUR_STAT, and answer its length if a character is completed,
- or -2 if it is yet to be completed. */
-int brlen (ch, cur_stat)
- int ch;
- mbstate_t *cur_stat;
-{
- char c = ch;
+/* Return non-zero if CH is part of a valid multibyte sequence:
+ Either incomplete yet valid sequence (in case of a leading byte),
+ or the last byte of a valid multibyte sequence.
+
+ Return zero in all other cases:
+ CH is a valid single-byte character (e.g. 0x01-0x7F in UTF-8 locales);
+ CH is an invalid byte in a multibyte sequence for the currentl locale,
+ CH is the NUL byte.
- /* If we use the generic brlen, then MBRLEN == mbrlen. */
- int result = mbrtowc(NULL, &c, 1, cur_stat);
+ Reset CUR_STAT in the case of an invalid byte.
+*/
+int
+is_mb_char (int ch, mbstate_t *cur_stat)
+{
+ const char c = ch ;
+ const int mb_pending = !mbsinit (cur_stat);
+ const int result = mbrtowc (NULL, &c, 1, cur_stat);
- /* An invalid sequence is treated like a singlebyte character. */
- if (result == -1)
+ switch (result)
{
+ case -2: /* Beginning or middle of valid multibyte sequence */
+ return 1;
+
+ case -1: /* Invalid sequence, byte treated like a single-byte character */
memset (cur_stat, 0, sizeof (mbstate_t));
+ return 0;
+
+ case 1: /* A valid byte, check if part of on-going multibyte sequence */
+ return mb_pending;
+
+ case 0: /* Special case of mbrtowc(3): the NUL character */
+ /* TODO: test this */
return 1;
- }
- return result;
+ default: /* Should never happen, as per mbrtowc(3) documentation */
+ panic ("is_mb_char: mbrtowc (0x%x) returned %d",
+ (unsigned int) ch, result);
+ }
}
void
-initialize_mbcs ()
+initialize_mbcs (void)
{
/* For UTF-8, we know that the encoding is stateless. */
const char *codeset_name;
@@ -57,4 +75,3 @@ initialize_mbcs ()
mb_cur_max = MB_CUR_MAX;
}
-
diff --git a/sed/regexp.c b/sed/regexp.c
index bbeccb5..ff898a8 100644
--- a/sed/regexp.c
+++ b/sed/regexp.c
@@ -1,6 +1,5 @@
/* GNU SED, a batch stream editor.
- Copyright (C) 1999, 2002, 2003, 2004, 2005, 2006
- Free Software Foundation, Inc.
+ Copyright (C) 1999-2016 Free Software Foundation, Inc.
This 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,21 +36,33 @@ static const char errors[] =
#define NO_REGEX (errors)
#define BAD_MODIF (NO_REGEX + sizeof(N_("no previous regular expression")))
-#define END_ERRORS (BAD_MODIF + sizeof(N_("cannot specify modifiers on empty regexp")))
+
+
+
+void
+dfaerror (char const *mesg)
+{
+ panic ("%s", mesg);
+}
+
+void
+dfawarn (char const *mesg)
+{
+ if (!getenv ("POSIXLY_CORRECT"))
+ dfaerror (mesg);
+}
static void
-compile_regex_1 (new_regex, needed_sub)
- struct regex *new_regex;
- int needed_sub;
+compile_regex_1 (struct regex *new_regex, int needed_sub)
{
#ifdef REG_PERL
int errcode;
errcode = regncomp(&new_regex->pattern, new_regex->re, new_regex->sz,
- (needed_sub ? 0 : REG_NOSUB)
- | new_regex->flags
- | extended_regexp_flags);
+ (needed_sub ? 0 : REG_NOSUB)
+ | new_regex->flags
+ | extended_regexp_flags);
if (errcode)
{
@@ -62,7 +73,7 @@ compile_regex_1 (new_regex, needed_sub)
#else
const char *error;
int syntax = ((extended_regexp_flags & REG_EXTENDED)
- ? RE_SYNTAX_POSIX_EXTENDED
+ ? RE_SYNTAX_POSIX_EXTENDED
: RE_SYNTAX_POSIX_BASIC);
syntax &= ~RE_DOT_NOT_NULL;
@@ -81,14 +92,11 @@ compile_regex_1 (new_regex, needed_sub)
break;
}
-#ifdef RE_ICASE
- syntax |= (new_regex->flags & REG_ICASE) ? RE_ICASE : 0;
-#endif
-#ifdef RE_NO_SUB
+ if (new_regex->flags & REG_ICASE)
+ syntax |= RE_ICASE;
+ else
+ new_regex->pattern.fastmap = malloc (1 << (sizeof (char) * 8));
syntax |= needed_sub ? 0 : RE_NO_SUB;
-#endif
-
- new_regex->pattern.fastmap = malloc (1 << (sizeof (char) * 8));
/* If REG_NEWLINE is set, newlines are treated differently. */
if (new_regex->flags & REG_NEWLINE)
@@ -100,8 +108,9 @@ compile_regex_1 (new_regex, needed_sub)
re_set_syntax (syntax);
error = re_compile_pattern (new_regex->re, new_regex->sz,
- &new_regex->pattern);
- new_regex->pattern.newline_anchor = (new_regex->flags & REG_NEWLINE) != 0;
+ &new_regex->pattern);
+ new_regex->pattern.newline_anchor =
+ buffer_delimiter == '\n' && (new_regex->flags & REG_NEWLINE) != 0;
new_regex->pattern.translate = NULL;
#ifndef RE_ICASE
@@ -110,7 +119,7 @@ compile_regex_1 (new_regex, needed_sub)
static char translate[1 << (sizeof(char) * 8)];
int i;
for (i = 0; i < sizeof(translate) / sizeof(char); i++)
- translate[i] = tolower (i);
+ translate[i] = tolower (i);
new_regex->pattern.translate = translate;
}
@@ -127,16 +136,30 @@ compile_regex_1 (new_regex, needed_sub)
{
char buf[200];
sprintf(buf, _("invalid reference \\%d on `s' command's RHS"),
- needed_sub - 1);
+ needed_sub - 1);
bad_prog(buf);
}
+
+ int dfaopts = buffer_delimiter == '\n' ? 0 : DFA_EOL_NUL;
+ new_regex->dfa = dfaalloc ();
+ dfasyntax (new_regex->dfa, &localeinfo, syntax, dfaopts);
+ dfacomp (new_regex->re, new_regex->sz, new_regex->dfa, 1);
+
+ /* The patterns which consist of only ^ or $ often appear in
+ substitution, but regex and dfa are not good at them, as regex does
+ not build fastmap, and as all in buffer must be scanned for $. So
+ we mark them to handle manually. */
+ if (new_regex->sz == 1)
+ {
+ if (new_regex->re[0] == '^')
+ new_regex->begline = true;
+ if (new_regex->re[0] == '$')
+ new_regex->endline = true;
+ }
}
struct regex *
-compile_regex(b, flags, needed_sub)
- struct buffer *b;
- int flags;
- int needed_sub;
+compile_regex(struct buffer *b, int flags, int needed_sub)
{
struct regex *new_regex;
size_t re_len;
@@ -145,7 +168,7 @@ compile_regex(b, flags, needed_sub)
if (size_buffer(b) == 0)
{
if (flags > 0)
- bad_prog(_(BAD_MODIF));
+ bad_prog(_(BAD_MODIF));
return NULL;
}
@@ -204,20 +227,16 @@ copy_regs (regs, pmatch, nregs)
#endif
int
-match_regex(regex, buf, buflen, buf_start_offset, regarray, regsize)
- struct regex *regex;
- char *buf;
- size_t buflen;
- size_t buf_start_offset;
- struct re_registers *regarray;
- int regsize;
+match_regex(struct regex *regex, char *buf, size_t buflen,
+ size_t buf_start_offset, struct re_registers *regarray,
+ int regsize)
{
int ret;
static struct regex *regex_last;
#ifdef REG_PERL
regmatch_t rm[10], *regmatch = rm;
if (regsize > 10)
- regmatch = (regmatch_t *) alloca (sizeof (regmatch_t) * regsize);
+ regmatch = alloca (sizeof (regmatch_t) * regsize);
#endif
/* printf ("Matching from %d/%d\n", buf_start_offset, buflen); */
@@ -227,7 +246,7 @@ match_regex(regex, buf, buflen, buf_start_offset, regarray, regsize)
{
regex = regex_last;
if (!regex_last)
- bad_prog(_(NO_REGEX));
+ bad_prog(_(NO_REGEX));
}
else
regex_last = regex;
@@ -247,9 +266,151 @@ match_regex(regex, buf, buflen, buf_start_offset, regarray, regsize)
regex->pattern.regs_allocated = REGS_REALLOCATE;
- ret = re_search (&regex->pattern, buf, buflen, buf_start_offset,
- buflen - buf_start_offset,
- regsize ? regarray : NULL);
+ /* Optimized handling for '^' and '$' patterns */
+ if (regex->begline || regex->endline)
+ {
+ size_t offset;
+
+ if (regex->endline)
+ {
+ const char *p = NULL;
+
+ if (regex->flags & REG_NEWLINE)
+ p = memchr (buf + buf_start_offset, buffer_delimiter, buflen);
+
+ offset = p ? p - buf : buflen;
+ }
+ else if (buf_start_offset == 0)
+ /* begline anchor, starting at beginning of the buffer. */
+ offset = 0;
+ else if (!(regex->flags & REG_NEWLINE))
+ /* begline anchor, starting in the middle of the text buffer,
+ and multiline regex is not specified - will never match.
+ Example: seq 2 | sed 'N;s/^/X/g' */
+ return 0;
+ else if (buf[buf_start_offset - 1] == buffer_delimiter)
+ /* begline anchor, starting in the middle of the text buffer,
+ with multiline match, and the current character
+ is the line delimiter - start here.
+ Example: seq 2 | sed 'N;s/^/X/mg' */
+ offset = buf_start_offset;
+ else
+ {
+ /* begline anchor, starting in the middle of the search buffer,
+ all previous optimizions didn't work: search
+ for the next line delimiter character in the buffer,
+ and start from there if found. */
+ const char *p = memchr (buf + buf_start_offset, buffer_delimiter,
+ buflen - buf_start_offset);
+
+ if (p == NULL)
+ return 0;
+
+ offset = p - buf + 1;
+ }
+
+ if (regsize)
+ {
+ size_t i;
+
+ if (!regarray->start)
+ {
+ regarray->start = MALLOC (1, regoff_t);
+ regarray->end = MALLOC (1, regoff_t);
+ regarray->num_regs = 1;
+ }
+
+ regarray->start[0] = offset;
+ regarray->end[0] = offset;
+
+ for (i = 1 ; i < regarray->num_regs; ++i)
+ regarray->start[i] = regarray->end[i] = -1;
+ }
+
+ return 1;
+ }
+
+ if (buf_start_offset == 0)
+ {
+ struct dfa *superset = dfasuperset (regex->dfa);
+
+ if (superset && !dfaexec (superset, buf, buf + buflen, true, NULL, NULL))
+ return 0;
+
+ if ((!regsize && (regex->flags & REG_NEWLINE))
+ || (!superset && dfaisfast (regex->dfa)))
+ {
+ bool backref = false;
+
+ if (!dfaexec (regex->dfa, buf, buf + buflen, true, NULL, &backref))
+ return 0;
+
+ if (!regsize && (regex->flags & REG_NEWLINE) && !backref)
+ return 1;
+ }
+ }
+
+ /* If the buffer delimiter is not newline character, we cannot use
+ newline_anchor flag of regex. So do it line-by-line, and add offset
+ value to results. */
+ if ((regex->flags & REG_NEWLINE) && buffer_delimiter != '\n')
+ {
+ const char *beg, *end;
+ const char *start;
+
+ beg = buf;
+
+ if (buf_start_offset > 0)
+ {
+ const char *eol = memrchr (buf, buffer_delimiter, buf_start_offset);
+
+ if (eol != NULL)
+ beg = eol + 1;
+ }
+
+ start = buf + buf_start_offset;
+
+ for (;;)
+ {
+ end = memchr (beg, buffer_delimiter, buf + buflen - beg);
+
+ if (end == NULL)
+ end = buf + buflen;
+
+ ret = re_search (&regex->pattern, beg, end - beg,
+ start - beg, end - start,
+ regsize ? regarray : NULL);
+
+ if (ret > -1)
+ {
+ size_t i;
+
+ ret += beg - buf;
+
+ if (regsize)
+ {
+ for (i = 0; i < regarray->num_regs; ++i)
+ {
+ if (regarray->start[i] > -1)
+ regarray->start[i] += beg - buf;
+ if (regarray->end[i] > -1)
+ regarray->end[i] += beg - buf;
+ }
+ }
+
+ break;
+ }
+
+ if (end == buf + buflen)
+ break;
+
+ beg = start = end + 1;
+ }
+ }
+ else
+ ret = re_search (&regex->pattern, buf, buflen, buf_start_offset,
+ buflen - buf_start_offset,
+ regsize ? regarray : NULL);
return (ret > -1);
#endif
diff --git a/sed/sed.c b/sed/sed.c
index af985e6..7445178 100644
--- a/sed/sed.c
+++ b/sed/sed.c
@@ -1,6 +1,5 @@
/* GNU SED, a batch stream editor.
- Copyright (C) 1989,90,91,92,93,94,95,98,99,2002,2003,2006,2008,2009,2010
- Free Software Foundation, Inc.
+ Copyright (C) 1989-2016 Free Software Foundation, Inc.
This 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,11 +19,15 @@
#include "sed.h"
+#include <limits.h>
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <sys/types.h>
+#include <unistd.h>
#include "getopt.h"
+#include "progname.h"
+#include "version.h"
#include "version-etc.h"
@@ -34,8 +37,6 @@
_("Ken Pizzini"), \
_("Paolo Bonzini")
-char *program_name;
-
int extended_regexp_flags = 0;
/* one-byte buffer delimiter */
@@ -53,12 +54,15 @@ bool separate_files = false;
/* If set, follow symlinks when processing in place */
bool follow_symlinks = false;
+/* If set, opearate in 'sandbox' mode */
+bool sandbox = false;
+
/* How do we edit files in-place? (we don't if NULL) */
char *in_place_extension = NULL;
/* The mode to use to read/write files, either "r"/"w" or "rb"/"wb". */
-char *read_mode = "r";
-char *write_mode = "w";
+char const *read_mode = "r";
+char const *write_mode = "w";
/* Do we need to be pedantically POSIX compliant? */
enum posixicity_types posixicity;
@@ -69,10 +73,40 @@ countT lcmd_out_line_len = 70;
/* The complete compiled SED program that we are going to run: */
static struct vector *the_program = NULL;
+/* When we've created a temporary for an in-place update,
+ we may have to exit before the rename. This is the name
+ of the temporary that we'll have to unlink via an atexit-
+ registered cleanup function. */
+static char const *G_file_to_unlink;
+
+struct localeinfo localeinfo;
+
+/* When exiting between temporary file creation and the rename
+ associated with a sed -i invocation, remove that file. */
+static void
+cleanup (void)
+{
+ if (G_file_to_unlink)
+ unlink (G_file_to_unlink);
+}
+
+/* Note that FILE must be removed upon exit. */
+void
+register_cleanup_file (char const *file)
+{
+ G_file_to_unlink = file;
+}
+
+/* Clear the global file-to-unlink global. */
+void
+cancel_cleanup (void)
+{
+ G_file_to_unlink = NULL;
+}
+
static void usage (int);
static void
-contact(errmsg)
- int errmsg;
+contact(int errmsg)
{
FILE *out = errmsg ? stderr : stdout;
#ifndef REG_PERL
@@ -83,22 +117,18 @@ General help using GNU software: <http://www.gnu.org/gethelp/>.\n"));
/* Only print the bug report address for `sed --help', otherwise we'll
get reports for other people's bugs. */
if (!errmsg)
- fprintf(out, _("E-mail bug reports to: <%s>.\n\
-Be sure to include the word ``%s'' somewhere in the ``Subject:'' field.\n"),
- PACKAGE_BUGREPORT, PACKAGE);
+ fprintf(out, _("E-mail bug reports to: <%s>.\n"), PACKAGE_BUGREPORT);
}
-static void usage (int);
-static void
-usage(status)
- int status;
+_Noreturn static void
+usage(int status)
{
FILE *out = status ? stderr : stdout;
#ifdef REG_PERL
-#define PERL_HELP _(" -R, --regexp-perl\n use Perl 5's regular expressions syntax in the script.\n")
-#else
-#define PERL_HELP ""
+#define PERL_HELP _(" -R, --regexp-perl" \
+ "\n use Perl 5's regular expressions" \
+ " syntax in the script.\n")
#endif
fprintf(out, _("\
@@ -110,29 +140,35 @@ Usage: %s [OPTION]... {script-only-if-no-other-script} [input-file]...\n\
fprintf(out, _(" -e script, --expression=script\n\
add the script to the commands to be executed\n"));
fprintf(out, _(" -f script-file, --file=script-file\n\
- add the contents of script-file to the commands to be executed\n"));
+ add the contents of script-file to the commands" \
+ " to be executed\n"));
#ifdef ENABLE_FOLLOW_SYMLINKS
fprintf(out, _(" --follow-symlinks\n\
follow symlinks when processing in place\n"));
#endif
fprintf(out, _(" -i[SUFFIX], --in-place[=SUFFIX]\n\
edit files in place (makes backup if SUFFIX supplied)\n"));
-#if defined(WIN32) || defined(_WIN32) || defined(__CYGWIN__) || defined(MSDOS) || defined(__EMX__)
+#if defined WIN32 || defined _WIN32 || defined __CYGWIN__ \
+ || defined MSDOS || defined __EMX__
fprintf(out, _(" -b, --binary\n\
- open files in binary mode (CR+LFs are not processed specially)\n"));
+ open files in binary mode (CR+LFs are not" \
+ " processed specially)\n"));
#endif
fprintf(out, _(" -l N, --line-length=N\n\
specify the desired line-wrap length for the `l' command\n"));
fprintf(out, _(" --posix\n\
disable all GNU extensions.\n"));
- fprintf(out, _(" -r, --regexp-extended\n\
- use extended regular expressions in the script.\n"));
+ fprintf(out, _(" -E, -r, --regexp-extended\n\
+ use extended regular expressions in the script\n\
+ (for portability use POSIX -E).\n"));
#ifdef REG_PERL
fprintf(out, PERL_HELP);
#endif
fprintf(out, _(" -s, --separate\n\
- consider files as separate rather than as a single continuous\n\
- long stream.\n"));
+ consider files as separate rather than as a single,\n\
+ continuous long stream.\n"));
+ fprintf(out, _(" --sandbox\n\
+ operate in sandbox mode.\n"));
fprintf(out, _(" -u, --unbuffered\n\
load minimal amounts of data from the input files and flush\n\
the output buffers more often\n"));
@@ -153,9 +189,7 @@ specified, then the standard input is read.\n\
}
int
-main(argc, argv)
- int argc;
- char **argv;
+main (int argc, char **argv)
{
#ifdef REG_PERL
#define SHORTOPTS "bsnrzRuEe:f:l:i::V:"
@@ -163,7 +197,9 @@ main(argc, argv)
#define SHORTOPTS "bsnrzuEe:f:l:i::V:"
#endif
- static struct option longopts[] = {
+ enum { SANDBOX_OPTION = CHAR_MAX+1 };
+
+ static const struct option longopts[] = {
{"binary", 0, NULL, 'b'},
{"regexp-extended", 0, NULL, 'r'},
#ifdef REG_PERL
@@ -178,6 +214,7 @@ main(argc, argv)
{"quiet", 0, NULL, 'n'},
{"posix", 0, NULL, 'p'},
{"silent", 0, NULL, 'n'},
+ {"sandbox", 0, NULL, SANDBOX_OPTION},
{"separate", 0, NULL, 's'},
{"unbuffered", 0, NULL, 'u'},
{"version", 0, NULL, 'v'},
@@ -198,7 +235,13 @@ main(argc, argv)
/* Set locale according to user's wishes. */
setlocale (LC_ALL, "");
#endif
+ set_program_name (argv[0]);
initialize_mbcs ();
+ init_localeinfo (&localeinfo);
+
+ /* Arrange to remove any un-renamed temporary file,
+ upon premature exit. */
+ atexit (cleanup);
#if ENABLE_NLS
@@ -220,115 +263,120 @@ main(argc, argv)
{
countT t = atoi(cols);
if (t > 1)
- lcmd_out_line_len = t-1;
+ lcmd_out_line_len = t-1;
}
myname = *argv;
while ((opt = getopt_long(argc, argv, SHORTOPTS, longopts, NULL)) != EOF)
{
switch (opt)
- {
- case 'n':
- no_default_output = true;
- break;
- case 'e':
- the_program = compile_string(the_program, optarg, strlen(optarg));
- break;
- case 'f':
- the_program = compile_file(the_program, optarg);
- break;
-
- case 'z':
- buffer_delimiter = 0;
- break;
-
- case 'F':
- follow_symlinks = true;
- break;
-
- case 'i':
- separate_files = true;
- if (optarg == NULL)
- /* use no backups */
- in_place_extension = ck_strdup ("*");
-
- else if (strchr(optarg, '*') != NULL)
- in_place_extension = ck_strdup(optarg);
-
- else
- {
- in_place_extension = MALLOC (strlen(optarg) + 2, char);
- in_place_extension[0] = '*';
- strcpy (in_place_extension + 1, optarg);
- }
-
- break;
-
- case 'l':
- lcmd_out_line_len = atoi(optarg);
- break;
-
- case 'p':
- posixicity = POSIXLY_BASIC;
- break;
+ {
+ case 'n':
+ no_default_output = true;
+ break;
+ case 'e':
+ the_program = compile_string(the_program, optarg, strlen(optarg));
+ break;
+ case 'f':
+ the_program = compile_file(the_program, optarg);
+ break;
+
+ case 'z':
+ buffer_delimiter = 0;
+ break;
+
+ case 'F':
+ follow_symlinks = true;
+ break;
+
+ case 'i':
+ separate_files = true;
+ if (optarg == NULL)
+ /* use no backups */
+ in_place_extension = ck_strdup ("*");
+
+ else if (strchr(optarg, '*') != NULL)
+ in_place_extension = ck_strdup(optarg);
+
+ else
+ {
+ in_place_extension = MALLOC (strlen(optarg) + 2, char);
+ in_place_extension[0] = '*';
+ strcpy (in_place_extension + 1, optarg);
+ }
+
+ break;
+
+ case 'l':
+ lcmd_out_line_len = atoi(optarg);
+ break;
+
+ case 'p':
+ posixicity = POSIXLY_BASIC;
+ break;
case 'b':
- read_mode = "rb";
- write_mode = "wb";
- break;
-
- /* Undocumented, for compatibility with BSD sed. */
- case 'E':
- case 'r':
- if (extended_regexp_flags)
- usage(4);
- extended_regexp_flags = REG_EXTENDED;
- break;
+ read_mode = "rb";
+ write_mode = "wb";
+ break;
+ case 'E':
+ case 'r':
#ifdef REG_PERL
- case 'R':
- if (extended_regexp_flags)
- usage(4);
- extended_regexp_flags = REG_PERL;
- break;
+ if (extended_regexp_flags && (extended_regexp_flags!=REG_EXTENDED))
+ usage(EXIT_BAD_USAGE);
#endif
+ extended_regexp_flags = REG_EXTENDED;
+ break;
+
+#ifdef REG_PERL
+ case 'R':
+ if (extended_regexp_flags && (extended_regexp_flags!=REG_PERL)))
+ usage(EXIT_BAD_USAGE);
+ extended_regexp_flags = REG_PERL;
+ break;
+#endif
+
+ case 's':
+ separate_files = true;
+ break;
- case 's':
- separate_files = true;
- break;
+ case SANDBOX_OPTION:
+ sandbox = true;
+ break;
- case 'u':
- unbuffered = true;
- break;
+ case 'u':
+ unbuffered = true;
+ break;
- case 'v':
- version_etc(stdout, program_name, PACKAGE_NAME, VERSION,
+ case 'v':
+ version_etc(stdout, program_name, PACKAGE_NAME, Version,
AUTHORS, (char *) NULL);
- contact(false);
- ck_fclose (NULL);
- exit (0);
- case 'h':
- usage(0);
- default:
- usage(4);
- }
+ contact(false);
+ ck_fclose (NULL);
+ exit (EXIT_SUCCESS);
+ case 'h':
+ usage(EXIT_SUCCESS);
+ default:
+ usage(EXIT_BAD_USAGE);
+ }
}
if (!the_program)
{
if (optind < argc)
- {
- char *arg = argv[optind++];
- the_program = compile_string(the_program, arg, strlen(arg));
- }
+ {
+ char *arg = argv[optind++];
+ the_program = compile_string(the_program, arg, strlen(arg));
+ }
else
- usage(4);
+ usage(EXIT_BAD_USAGE);
}
check_final_program(the_program);
return_code = process_files(the_program, argv+optind);
- finish_program(the_program);
+ finish_program();
ck_fclose(NULL);
return return_code;
diff --git a/sed/sed.h b/sed/sed.h
index 2c6aff5..0d056e3 100644
--- a/sed/sed.h
+++ b/sed/sed.h
@@ -1,6 +1,5 @@
/* GNU SED, a batch stream editor.
- Copyright (C) 1989,90,91,92,93,94,95,98,99,2002,2003
- Free Software Foundation, Inc.
+ Copyright (C) 1989-2016 Free Software Foundation, Inc.
This 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,8 +15,10 @@
along with this program; if not, write to the Free Software
Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
-#include "config.h"
+#include <config.h>
#include "basicdefs.h"
+#include "dfa.h"
+#include "localeinfo.h"
#include "regex.h"
#include <stdio.h>
#include "unlocked-io.h"
@@ -51,9 +52,12 @@ struct regex {
regex_t pattern;
int flags;
size_t sz;
+ struct dfa *dfa;
+ bool begline;
+ bool endline;
char re[1];
};
-
+
enum replacement_types {
REPL_ASIS = 0,
REPL_UPPERCASE = 1,
@@ -181,18 +185,18 @@ struct sed_cmd {
-void bad_prog (const char *why);
+_Noreturn void bad_prog (const char *why);
size_t normalize_text (char *text, size_t len, enum text_types buftype);
struct vector *compile_string (struct vector *, char *str, size_t len);
struct vector *compile_file (struct vector *, const char *cmdfile);
void check_final_program (struct vector *);
void rewind_read_files (void);
-void finish_program (struct vector *);
+void finish_program (void);
struct regex *compile_regex (struct buffer *b, int flags, int needed_sub);
int match_regex (struct regex *regex,
- char *buf, size_t buflen, size_t buf_start_offset,
- struct re_registers *regarray, int regsize);
+ char *buf, size_t buflen, size_t buf_start_offset,
+ struct re_registers *regarray, int regsize);
#ifdef DEBUG_LEAKS
void release_regex (struct regex *);
#endif
@@ -201,7 +205,7 @@ int process_files (struct vector *, char **argv);
int main (int, char **);
-extern void fmt (const char *line, const char *line_end, int max_length, FILE *output_file);
+extern struct localeinfo localeinfo;
extern int extended_regexp_flags;
@@ -231,8 +235,8 @@ extern countT lcmd_out_line_len;
extern char *in_place_extension;
/* The mode to use to read and write files, either "rt"/"w" or "rb"/"wb". */
-extern char *read_mode;
-extern char *write_mode;
+extern char const *read_mode;
+extern char const *write_mode;
/* Should we use EREs? */
extern bool use_extended_syntax_p;
@@ -241,6 +245,9 @@ extern bool use_extended_syntax_p;
extern int mb_cur_max;
extern bool is_utf8;
+/* If set, operate in 'sandbox' mode - disable e/r/w commands */
+extern bool sandbox;
+
#define MBRTOWC(pwc, s, n, ps) \
(mb_cur_max == 1 ? \
(*(pwc) = btowc (*(unsigned char *) (s)), 1) : \
@@ -257,9 +264,17 @@ extern bool is_utf8;
#define MBRLEN(s, n, ps) \
(mb_cur_max == 1 ? 1 : mbrtowc (NULL, s, n, ps))
-#define BRLEN(ch, ps) \
- (mb_cur_max == 1 ? 1 : brlen (ch, ps))
+#define IS_MB_CHAR(ch, ps) \
+ (mb_cur_max == 1 ? 0 : is_mb_char (ch, ps))
-extern int brlen (int ch, mbstate_t *ps);
+extern int is_mb_char (int ch, mbstate_t *ps);
extern void initialize_mbcs (void);
-
+extern void register_cleanup_file (char const *file);
+extern void cancel_cleanup (void);
+
+/* Use this to suppress gcc's '...may be used before initialized' warnings. */
+#ifdef lint
+# define IF_LINT(Code) Code
+#else
+# define IF_LINT(Code) /* empty */
+#endif
diff --git a/sed/utils.c b/sed/utils.c
index aa674fd..8afea8e 100644
--- a/sed/utils.c
+++ b/sed/utils.c
@@ -1,6 +1,5 @@
/* Functions from hack's utils library.
- Copyright (C) 1989, 1990, 1991, 1998, 1999, 2003, 2008, 2009, 2011
- Free Software Foundation, Inc.
+ Copyright (C) 1989-2016 Free Software Foundation, Inc.
This 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 +15,7 @@
along with this program; if not, write to the Free Software
Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
-#include "config.h"
+#include <config.h>
#include <stdio.h>
#include <stdarg.h>
@@ -28,8 +27,8 @@
#include <unistd.h>
#include <limits.h>
+#include "unlocked-io.h"
#include "utils.h"
-#include "pathmax.h"
#include "fwriting.h"
const char *myname;
@@ -66,26 +65,25 @@ panic(const char *str, ...)
while (open_files)
{
if (open_files->temp)
- {
- fclose (open_files->fp);
- errno = 0;
- unlink (open_files->name);
+ {
+ fclose (open_files->fp);
+ errno = 0;
+ unlink (open_files->name);
if (errno != 0)
- fprintf (stderr, _("cannot remove %s: %s"), open_files->name, strerror (errno));
- }
+ fprintf (stderr, _("cannot remove %s: %s"), open_files->name,
+ strerror (errno));
+ }
open_files = open_files->link;
}
- exit(4);
+ exit(EXIT_PANIC);
}
/* Internal routine to get a filename from open_files */
-static const char *utils_fp_name (FILE *fp);
-static const char *
-utils_fp_name(fp)
- FILE *fp;
+static const char * _GL_ATTRIBUTE_PURE
+utils_fp_name(FILE *fp)
{
struct open_file *p;
@@ -103,19 +101,16 @@ utils_fp_name(fp)
}
static void
-register_open_file (fp, name, temp)
- FILE *fp;
- const char *name;
- int temp;
+register_open_file (FILE *fp, const char *name)
{
struct open_file *p;
for (p=open_files; p; p=p->link)
{
if (fp == p->fp)
- {
- free(p->name);
- break;
- }
+ {
+ free(p->name);
+ break;
+ }
}
if (!p)
{
@@ -130,10 +125,7 @@ register_open_file (fp, name, temp)
/* Panic on failing fopen */
FILE *
-ck_fopen(name, mode, fail)
- const char *name;
- const char *mode;
- int fail;
+ck_fopen(const char *name, const char *mode, int fail)
{
FILE *fp;
@@ -146,17 +138,13 @@ ck_fopen(name, mode, fail)
return NULL;
}
- register_open_file (fp, name, false);
+ register_open_file (fp, name);
return fp;
}
/* Panic on failing fdopen */
FILE *
-ck_fdopen(fd, name, mode, fail)
- int fd;
- const char *name;
- const char *mode;
- int fail;
+ck_fdopen( int fd, const char *name, const char *mode, int fail)
{
FILE *fp;
@@ -169,75 +157,47 @@ ck_fdopen(fd, name, mode, fail)
return NULL;
}
- register_open_file (fp, name, false);
+ register_open_file (fp, name);
return fp;
}
FILE *
-ck_mkstemp (p_filename, tmpdir, base, mode)
- char **p_filename;
- const char *base, *tmpdir;
- const char *mode;
+ck_mkstemp (char **p_filename, const char *tmpdir,
+ const char *base, const char *mode)
{
- char *template;
- FILE *fp;
- int fd;
- int save_umask;
-
- if (tmpdir == NULL)
- tmpdir = getenv("TMPDIR");
- if (tmpdir == NULL)
- {
- tmpdir = getenv("TMP");
- if (tmpdir == NULL)
-#ifdef P_tmpdir
- tmpdir = P_tmpdir;
-#else
- tmpdir = "/tmp";
-#endif
- }
-
- template = xmalloc (strlen (tmpdir) + strlen (base) + 8);
+ char *template = xmalloc (strlen (tmpdir) + strlen (base) + 8);
sprintf (template, "%s/%sXXXXXX", tmpdir, base);
/* The ownership might change, so omit some permissions at first
so unauthorized users cannot nip in before the file is ready.
-
mkstemp forces O_BINARY on cygwin, so use mkostemp instead. */
- save_umask = umask (0700);
- fd = mkostemp (template, 0);
+ mode_t save_umask = umask (0700);
+ int fd = mkostemp (template, 0);
umask (save_umask);
if (fd == -1)
panic(_("couldn't open temporary file %s: %s"), template, strerror(errno));
*p_filename = template;
- fp = fdopen (fd, mode);
- register_open_file (fp, template, true);
+ FILE *fp = fdopen (fd, mode);
+ register_open_file (fp, template);
return fp;
}
/* Panic on failing fwrite */
void
-ck_fwrite(ptr, size, nmemb, stream)
- const void *ptr;
- size_t size;
- size_t nmemb;
- FILE *stream;
+ck_fwrite(const void *ptr, size_t size, size_t nmemb, FILE *stream)
{
clearerr(stream);
if (size && fwrite(ptr, size, nmemb, stream) != nmemb)
- panic(ngettext("couldn't write %d item to %s: %s",
- "couldn't write %d items to %s: %s", nmemb),
- nmemb, utils_fp_name(stream), strerror(errno));
+ panic(ngettext("couldn't write %llu item to %s: %s",
+ "couldn't write %llu items to %s: %s", nmemb),
+ (unsigned long long) nmemb, utils_fp_name(stream),
+ strerror(errno));
}
/* Panic on failing fread */
size_t
-ck_fread(ptr, size, nmemb, stream)
- void *ptr;
- size_t size;
- size_t nmemb;
- FILE *stream;
+ck_fread(void *ptr, size_t size, size_t nmemb, FILE *stream)
{
clearerr(stream);
if (size && (nmemb=fread(ptr, size, nmemb, stream)) <= 0 && ferror(stream))
@@ -247,11 +207,7 @@ ck_fread(ptr, size, nmemb, stream)
}
size_t
-ck_getdelim(text, buflen, buffer_delimiter, stream)
- char **text;
- size_t *buflen;
- char buffer_delimiter;
- FILE *stream;
+ck_getdelim(char **text, size_t *buflen, char buffer_delimiter, FILE *stream)
{
ssize_t result;
bool error;
@@ -271,8 +227,7 @@ ck_getdelim(text, buflen, buffer_delimiter, stream)
/* Panic on failing fflush */
void
-ck_fflush(stream)
- FILE *stream;
+ck_fflush(FILE *stream)
{
if (!fwriting(stream))
return;
@@ -284,8 +239,7 @@ ck_fflush(stream)
/* Panic on failing fclose */
void
-ck_fclose(stream)
- FILE *stream;
+ck_fclose(FILE *stream)
{
struct open_file r;
struct open_file *prev;
@@ -297,14 +251,14 @@ ck_fclose(stream)
while ( (cur = prev->link) )
{
if (!stream || stream == cur->fp)
- {
- do_ck_fclose (cur->fp);
- prev->link = cur->link;
- free(cur->name);
- free(cur);
- }
+ {
+ do_ck_fclose (cur->fp);
+ prev->link = cur->link;
+ free(cur->name);
+ free(cur);
+ }
else
- prev = cur;
+ prev = cur;
}
open_files = r.link;
@@ -321,8 +275,7 @@ ck_fclose(stream)
/* Close a single file. */
void
-do_ck_fclose(fp)
- FILE *fp;
+do_ck_fclose(FILE *fp)
{
ck_fflush(fp);
clearerr(fp);
@@ -369,37 +322,37 @@ follow_symlink(const char *fname)
buf2 = ck_realloc (buf2, buf_size);
}
if (rc < 0)
- panic (_("couldn't follow symlink %s: %s"), buf, strerror(errno));
+ panic (_("couldn't follow symlink %s: %s"), buf, strerror(errno));
else
- buf2 [rc] = '\0';
+ buf2 [rc] = '\0';
if (buf2[0] != '/' && (c = strrchr (buf, '/')) != NULL)
- {
- /* Need to handle relative paths with care. Reallocate buf1 and
- buf2 to be big enough. */
- int len = c - buf + 1;
- if (len + rc + 1 > buf_size)
- {
- buf_size = len + rc + 1;
- buf1 = ck_realloc (buf1, buf_size);
- buf2 = ck_realloc (buf2, buf_size);
- }
-
- /* Always store the new path in buf1. */
- if (buf != buf1)
+ {
+ /* Need to handle relative paths with care. Reallocate buf1 and
+ buf2 to be big enough. */
+ int len = c - buf + 1;
+ if (len + rc + 1 > buf_size)
+ {
+ buf_size = len + rc + 1;
+ buf1 = ck_realloc (buf1, buf_size);
+ buf2 = ck_realloc (buf2, buf_size);
+ }
+
+ /* Always store the new path in buf1. */
+ if (buf != buf1)
memcpy (buf1, buf, len);
/* Tack the relative symlink at the end of buf1. */
memcpy (buf1 + len, buf2, rc + 1);
- buf = buf1;
- }
+ buf = buf1;
+ }
else
- {
- /* Use buf2 as the buffer, it saves a strcpy if it is not pointing to
- another link. It works for absolute symlinks, and as long as
- symlinks do not leave the current directory. */
- buf = buf2;
- }
+ {
+ /* Use buf2 as the buffer, it saves a strcpy if it is not pointing to
+ another link. It works for absolute symlinks, and as long as
+ symlinks do not leave the current directory. */
+ buf = buf2;
+ }
}
if (rc < 0)
@@ -413,9 +366,7 @@ follow_symlink(const char *fname)
/* Panic on failing rename */
void
-ck_rename (from, to, unlink_if_fail)
- const char *from, *to;
- const char *unlink_if_fail;
+ck_rename (const char *from, const char *to, const char *unlink_if_fail)
{
int rd = rename (from, to);
if (rd != -1)
@@ -427,7 +378,8 @@ ck_rename (from, to, unlink_if_fail)
errno = 0;
unlink (unlink_if_fail);
- /* Failure to remove the temporary file is more severe, so trigger it first. */
+ /* Failure to remove the temporary file is more severe,
+ so trigger it first. */
if (errno != 0)
panic (_("cannot remove %s: %s"), unlink_if_fail, strerror (errno));
@@ -442,8 +394,7 @@ ck_rename (from, to, unlink_if_fail)
/* Panic on failing malloc */
void *
-ck_malloc(size)
- size_t size;
+ck_malloc(size_t size)
{
void *ret = calloc(1, size ? size : 1);
if (!ret)
@@ -453,9 +404,7 @@ ck_malloc(size)
/* Panic on failing realloc */
void *
-ck_realloc(ptr, size)
- void *ptr;
- size_t size;
+ck_realloc(void *ptr, size_t size)
{
void *ret;
@@ -474,8 +423,7 @@ ck_realloc(ptr, size)
/* Return a malloc()'d copy of a string */
char *
-ck_strdup(str)
- const char *str;
+ck_strdup(const char *str)
{
char *ret = MALLOC(strlen(str)+1, char);
return strcpy(ret, str);
@@ -483,9 +431,7 @@ ck_strdup(str)
/* Return a malloc()'d copy of a block of memory */
void *
-ck_memdup(buf, len)
- const void *buf;
- size_t len;
+ck_memdup(const void *buf, size_t len)
{
void *ret = ck_malloc(len);
return memcpy(ret, buf, len);
@@ -505,7 +451,7 @@ struct buffer
#define MIN_ALLOCATE 50
struct buffer *
-init_buffer()
+init_buffer(void)
{
struct buffer *b = MALLOC(1, struct buffer);
b->b = MALLOC(MIN_ALLOCATE, char);
@@ -515,24 +461,19 @@ init_buffer()
}
char *
-get_buffer(b)
- struct buffer *b;
+get_buffer(struct buffer const *b)
{
return b->b;
}
size_t
-size_buffer(b)
- struct buffer *b;
+size_buffer(struct buffer const *b)
{
return b->length;
}
-static void resize_buffer (struct buffer *b, size_t newlen);
static void
-resize_buffer(b, newlen)
- struct buffer *b;
- size_t newlen;
+resize_buffer(struct buffer *b, size_t newlen)
{
char *try = NULL;
size_t alen = b->allocated;
@@ -552,10 +493,7 @@ resize_buffer(b, newlen)
}
char *
-add_buffer(b, p, n)
- struct buffer *b;
- const char *p;
- size_t n;
+add_buffer(struct buffer *b, const char *p, size_t n)
{
char *result;
if (b->allocated - b->length < n)
@@ -566,9 +504,7 @@ add_buffer(b, p, n)
}
char *
-add1_buffer(b, c)
- struct buffer *b;
- int c;
+add1_buffer(struct buffer *b, int c)
{
/* This special case should be kept cheap;
* don't make it just a mere convenience
@@ -580,7 +516,7 @@ add1_buffer(b, c)
{
char *result;
if (b->allocated - b->length < 1)
- resize_buffer(b, b->length+1);
+ resize_buffer(b, b->length+1);
result = b->b + b->length++;
*result = c;
return result;
@@ -590,8 +526,7 @@ add1_buffer(b, c)
}
void
-free_buffer(b)
- struct buffer *b;
+free_buffer(struct buffer *b)
{
if (b)
free(b->b);
diff --git a/sed/utils.h b/sed/utils.h
index 4b44cd8..6b9f8ef 100644
--- a/sed/utils.h
+++ b/sed/utils.h
@@ -1,6 +1,5 @@
/* Functions from hack's utils library.
- Copyright (C) 1989, 1990, 1991, 1998, 1999, 2003
- Free Software Foundation, Inc.
+ Copyright (C) 1989-2016 Free Software Foundation, Inc.
This 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 +19,15 @@
#include "basicdefs.h"
-void panic (const char *str, ...);
+enum exit_codes {
+ /* EXIT_SUCCESS is already defined as 0 */
+ EXIT_BAD_USAGE = 1, /* bad program syntax, invalid command-line options */
+ EXIT_BAD_INPUT = 2, /* failed to open some of the input files */
+ EXIT_PANIC = 4 /* PANIC during program execution */
+};
+
+
+_Noreturn void panic (const char *str, ...) _GL_ATTRIBUTE_FORMAT_PRINTF (1, 2);
FILE *ck_fopen (const char *name, const char *mode, int fail);
FILE *ck_fdopen (int fd, const char *name, const char *mode, int fail);
@@ -29,9 +36,10 @@ size_t ck_fread (void *ptr, size_t size, size_t nmemb, FILE *stream);
void ck_fflush (FILE *stream);
void ck_fclose (FILE *stream);
const char *follow_symlink (const char *path);
-size_t ck_getdelim (char **text, size_t *buflen, char buffer_delimiter, FILE *stream);
+size_t ck_getdelim (char **text, size_t *buflen, char buffer_delimiter,
+ FILE *stream);
FILE * ck_mkstemp (char **p_filename, const char *tmpdir, const char *base,
- const char *mode);
+ const char *mode) _GL_ARG_NONNULL ((1, 2, 3, 4));
void ck_rename (const char *from, const char *to, const char *unlink_if_fail);
void *ck_malloc (size_t size);
@@ -41,8 +49,8 @@ char *ck_strdup (const char *str);
void *ck_memdup (const void *buf, size_t len);
struct buffer *init_buffer (void);
-char *get_buffer (struct buffer *b);
-size_t size_buffer (struct buffer *b);
+char *get_buffer (struct buffer const *b) _GL_ATTRIBUTE_PURE;
+size_t size_buffer (struct buffer const *b) _GL_ATTRIBUTE_PURE;
char *add_buffer (struct buffer *b, const char *p, size_t n);
char *add1_buffer (struct buffer *b, int ch);
void free_buffer (struct buffer *b);
diff --git a/testsuite/8bit.sed b/testsuite/8bit.sed
index 7b3ed8d..37c0624 100644
--- a/testsuite/8bit.sed
+++ b/testsuite/8bit.sed
@@ -16,6 +16,6 @@
# Oh, well I remember
# How on such a day we used to meet--
# My lover and I!
-# -- Kakinomoto Hitomaro
+# -- Kakinomoto Hitomaro
#
s///
diff --git a/testsuite/BOOST.tests b/testsuite/BOOST.tests
index 98fd3b6..3ec355c 100644
--- a/testsuite/BOOST.tests
+++ b/testsuite/BOOST.tests
@@ -1,5 +1,5 @@
-;
-;
+;
+;
; this file contains a script of tests to run through regress.exe
;
; comments start with a semicolon and proceed to the end of the line
@@ -289,7 +289,7 @@ a((b)*\2)*d abbbd 0 5 1 4 2 3
(a)\1bc*[ce]d aabcccd 0 7 0 1
^(a)\1b(c)*cd$ aabcccd 0 7 0 1 4 5
-; posix only:
+; posix only:
- match_default extended REG_EXTENDED
(ab*)[ab]*\1 ababaaa 0 7 0 1
@@ -391,11 +391,11 @@ a(b*|c|e)d ad 0 2 1 1
a(b?)c abc 0 3 1 2
a(b?)c ac 0 2 1 1
a(b+)c abc 0 3 1 2
-a(b+)c abbbc 0 5 1 4
-a(b*)c ac 0 2 1 1
+a(b+)c abbbc 0 5 1 4
+a(b*)c ac 0 2 1 1
(a|ab)(bc([de]+)f|cde) abcdef 0 6 0 1 1 6 3 5
a([bc]?)c abc 0 3 1 2
-a([bc]?)c ac 0 2 1 1
+a([bc]?)c ac 0 2 1 1
a([bc]+)c abc 0 3 1 2
a([bc]+)c abcc 0 4 1 3
a([bc]+)bc abcbc 0 5 1 3
@@ -774,13 +774,13 @@ a()b\1 ab 0 2 1 1
; subtleties of matching with no sub-expressions marked
- normal match_nosubs REG_NO_POSIX_TEST
-a(b?c)+d accd 0 4
-(wee|week)(knights|night) weeknights 0 10
+a(b?c)+d accd 0 4
+(wee|week)(knights|night) weeknights 0 10
.* abc 0 3
-a(b|(c))d abd 0 3
+a(b|(c))d abd 0 3
a(b|(c))d acd 0 3
a(b*|c|e)d abbd 0 4
-a(b*|c|e)d acd 0 3
+a(b*|c|e)d acd 0 3
a(b*|c|e)d ad 0 2
a(b?)c abc 0 3
a(b?)c ac 0 2
@@ -801,13 +801,13 @@ a(bbb+|bb+|b)bb abbb 0 4
(a*)* bc 0 0
- normal nosubs REG_NO_POSIX_TEST
-a(b?c)+d accd 0 4
-(wee|week)(knights|night) weeknights 0 10
+a(b?c)+d accd 0 4
+(wee|week)(knights|night) weeknights 0 10
.* abc 0 3
-a(b|(c))d abd 0 3
+a(b|(c))d abd 0 3
a(b|(c))d acd 0 3
a(b*|c|e)d abbd 0 4
-a(b*|c|e)d acd 0 3
+a(b*|c|e)d acd 0 3
a(b*|c|e)d ad 0 2
a(b?)c abc 0 3
a(b?)c ac 0 2
@@ -826,4 +826,3 @@ a(bbb+|bb+|b)b abbb 0 4
a(bbb+|bb+|b)bb abbb 0 4
(.*).* abcdef 0 6
(a*)* bc 0 0
-
diff --git a/testsuite/Makefile.am b/testsuite/Makefile.am
deleted file mode 100644
index d80e72c..0000000
--- a/testsuite/Makefile.am
+++ /dev/null
@@ -1,103 +0,0 @@
-CLEANFILES = tmp* core *.core $(EXTRA_PROGRAMS) *.*out *.log eval.in2
-
-TESTS = $(check_PROGRAMS) $(SEDTESTS)
-SEDTESTS =
-
-LDADD = ../lib/libsed.a @INTLLIBS@
-noinst_HEADERS = testcases.h ptestcases.h
-AM_CPPFLAGS = -I$(top_srcdir)/lib -I$(top_builddir)/lib
-
-if TEST_REGEX
-check_PROGRAMS = bug-regex7 \
- bug-regex8 bug-regex9 bug-regex10 bug-regex11 bug-regex12 \
- bug-regex13 bug-regex14 bug-regex15 bug-regex16 bug-regex21 \
- bug-regex27 bug-regex28 \
- tst-pcre tst-boost runtests runptests tst-rxspencer tst-regex2
-
-SEDTESTS += space
-endif
-
-SEDTESTS += \
- appquit enable sep inclib 8bit newjis xabcx dollar noeol noeolw \
- modulo numsub numsub2 numsub3 numsub4 numsub5 0range bkslashes \
- head madding mac-mf empty xbxcx xbxcx3 recall recall2 xemacs \
- fasts uniq manis khadafy linecnt eval distrib 8to7 y-bracket \
- y-newline allsub cv-vars classes middle bsd stdin flipcase \
- insens subwrite writeout readin insert utf8-1 utf8-2 utf8-3 utf8-4 \
- badenc inplace-hold brackets amp-escape \
- help version file quiet \
- factor binary3 binary2 binary dc
-
-TESTS_ENVIRONMENT = MAKE="$(MAKE)" VERSION="$(VERSION)" \
- @LOCALCHARSET_TESTS_ENVIRONMENT@ $(srcdir)/runtest
-
-
-EXTRA_DIST = \
- PCRE.tests BOOST.tests SPENCER.tests \
- runtest Makefile.tests \
- 0range.good 0range.inp 0range.sed \
- 8bit.good 8bit.inp 8bit.sed \
- 8to7.good 8to7.inp 8to7.sed \
- allsub.good allsub.inp allsub.sed \
- amp-escape.good amp-escape.inp amp-escape.sed \
- appquit.good appquit.inp appquit.sed \
- binary.good binary.inp binary.sed binary2.sed binary3.sed \
- bkslashes.good bkslashes.inp bkslashes.sed \
- brackets.good brackets.inp brackets.sed \
- bsd.good bsd.sh \
- cv-vars.good cv-vars.inp cv-vars.sed \
- classes.good classes.inp classes.sed \
- dc.good dc.inp dc.sed \
- distrib.good distrib.inp distrib.sed distrib.sh \
- dollar.good dollar.inp dollar.sed \
- empty.good empty.inp empty.sed \
- enable.good enable.inp enable.sed \
- eval.good eval.inp eval.sed \
- factor.good factor.inp factor.sed \
- fasts.good fasts.inp fasts.sed \
- flipcase.good flipcase.inp flipcase.sed \
- head.good head.inp head.sed \
- inclib.good inclib.inp inclib.sed \
- insens.good insens.inp insens.sed \
- insert.good insert.inp insert.sed \
- khadafy.good khadafy.inp khadafy.sed \
- linecnt.good linecnt.inp linecnt.sed \
- space.good space.inp space.sed \
- mac-mf.good mac-mf.inp mac-mf.sed \
- madding.good madding.inp madding.sed \
- manis.good manis.inp manis.sed \
- middle.good middle.sed middle.inp \
- modulo.good modulo.sed modulo.inp \
- newjis.good newjis.inp newjis.sed \
- noeol.good noeol.inp noeol.sed \
- noeolw.good noeolw.1good noeolw.2good noeolw.sed \
- numsub.good numsub.inp numsub.sed \
- numsub2.good numsub2.inp numsub2.sed \
- numsub3.good numsub3.inp numsub3.sed \
- numsub4.good numsub4.inp numsub4.sed \
- numsub5.good numsub5.inp numsub5.sed \
- readin.good readin.inp readin.sed \
- recall.good recall.inp recall.sed \
- recall2.good recall2.inp recall2.sed \
- sep.good sep.inp sep.sed \
- subwrite.inp subwrite.sed subwrt1.good subwrt2.good \
- uniq.good uniq.inp uniq.sed \
- utf8-1.good utf8-1.inp utf8-1.sed \
- utf8-2.good utf8-2.inp utf8-2.sed \
- utf8-3.good utf8-3.inp utf8-3.sed \
- utf8-4.good utf8-4.inp utf8-4.sed \
- badenc.good badenc.inp badenc.sed \
- version.gin \
- writeout.inp writeout.sed wrtout1.good wrtout2.good \
- xabcx.good xabcx.inp xabcx.sed \
- xbxcx.good xbxcx.inp xbxcx.sed \
- xbxcx3.good xbxcx3.inp xbxcx3.sed \
- xemacs.good xemacs.inp xemacs.sed \
- y-bracket.good y-bracket.sed y-bracket.inp \
- y-newline.good y-newline.sed y-newline.inp
-
-# automake makes `check' depend on $(TESTS). Declare
-# dummy targets for $(TESTS) so that make does not complain.
-
-.PHONY: $(SEDTESTS)
-$(SEDTESTS):
diff --git a/testsuite/Makefile.in b/testsuite/Makefile.in
deleted file mode 100644
index 66e72ce..0000000
--- a/testsuite/Makefile.in
+++ /dev/null
@@ -1,1553 +0,0 @@
-# Makefile.in generated by automake 1.12.2 from Makefile.am.
-# @configure_input@
-
-# Copyright (C) 1994-2012 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.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
-# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
-# PARTICULAR PURPOSE.
-
-@SET_MAKE@
-
-VPATH = @srcdir@
-am__make_dryrun = \
- { \
- am__dry=no; \
- case $$MAKEFLAGS in \
- *\\[\ \ ]*) \
- echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \
- | grep '^AM OK$$' >/dev/null || am__dry=yes;; \
- *) \
- for am__flg in $$MAKEFLAGS; do \
- case $$am__flg in \
- *=*|--*) ;; \
- *n*) am__dry=yes; break;; \
- esac; \
- done;; \
- esac; \
- test $$am__dry = yes; \
- }
-pkgdatadir = $(datadir)/@PACKAGE@
-pkgincludedir = $(includedir)/@PACKAGE@
-pkglibdir = $(libdir)/@PACKAGE@
-am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
-install_sh_DATA = $(install_sh) -c -m 644
-install_sh_PROGRAM = $(install_sh) -c
-install_sh_SCRIPT = $(install_sh) -c
-INSTALL_HEADER = $(INSTALL_DATA)
-transform = $(program_transform_name)
-NORMAL_INSTALL = :
-PRE_INSTALL = :
-POST_INSTALL = :
-NORMAL_UNINSTALL = :
-PRE_UNINSTALL = :
-POST_UNINSTALL = :
-build_triplet = @build@
-host_triplet = @host@
-@TEST_REGEX_TRUE@check_PROGRAMS = bug-regex7$(EXEEXT) \
-@TEST_REGEX_TRUE@ bug-regex8$(EXEEXT) bug-regex9$(EXEEXT) \
-@TEST_REGEX_TRUE@ bug-regex10$(EXEEXT) bug-regex11$(EXEEXT) \
-@TEST_REGEX_TRUE@ bug-regex12$(EXEEXT) bug-regex13$(EXEEXT) \
-@TEST_REGEX_TRUE@ bug-regex14$(EXEEXT) bug-regex15$(EXEEXT) \
-@TEST_REGEX_TRUE@ bug-regex16$(EXEEXT) bug-regex21$(EXEEXT) \
-@TEST_REGEX_TRUE@ bug-regex27$(EXEEXT) bug-regex28$(EXEEXT) \
-@TEST_REGEX_TRUE@ tst-pcre$(EXEEXT) tst-boost$(EXEEXT) \
-@TEST_REGEX_TRUE@ runtests$(EXEEXT) runptests$(EXEEXT) \
-@TEST_REGEX_TRUE@ tst-rxspencer$(EXEEXT) tst-regex2$(EXEEXT)
-@TEST_REGEX_TRUE@am__append_1 = space
-subdir = testsuite
-DIST_COMMON = $(noinst_HEADERS) $(srcdir)/Makefile.am \
- $(srcdir)/Makefile.in $(srcdir)/version.gin \
- $(top_srcdir)/build-aux/depcomp
-ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
-am__aclocal_m4_deps = $(top_srcdir)/m4/00gnulib.m4 \
- $(top_srcdir)/m4/acl.m4 $(top_srcdir)/m4/alloca.m4 \
- $(top_srcdir)/m4/btowc.m4 $(top_srcdir)/m4/canonicalize.m4 \
- $(top_srcdir)/m4/codeset.m4 $(top_srcdir)/m4/configmake.m4 \
- $(top_srcdir)/m4/dirname.m4 \
- $(top_srcdir)/m4/double-slash-root.m4 \
- $(top_srcdir)/m4/eealloc.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/fstat.m4 \
- $(top_srcdir)/m4/fwriting.m4 $(top_srcdir)/m4/getdelim.m4 \
- $(top_srcdir)/m4/getopt.m4 $(top_srcdir)/m4/gettext.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/iconv.m4 \
- $(top_srcdir)/m4/include_next.m4 \
- $(top_srcdir)/m4/intlmacosx.m4 $(top_srcdir)/m4/langinfo_h.m4 \
- $(top_srcdir)/m4/largefile.m4 $(top_srcdir)/m4/lib-ld.m4 \
- $(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \
- $(top_srcdir)/m4/localcharset.m4 $(top_srcdir)/m4/locale-fr.m4 \
- $(top_srcdir)/m4/locale-ja.m4 $(top_srcdir)/m4/locale-zh.m4 \
- $(top_srcdir)/m4/locale_h.m4 $(top_srcdir)/m4/localeconv.m4 \
- $(top_srcdir)/m4/longlong.m4 $(top_srcdir)/m4/lstat.m4 \
- $(top_srcdir)/m4/malloc.m4 $(top_srcdir)/m4/malloca.m4 \
- $(top_srcdir)/m4/mbrlen.m4 $(top_srcdir)/m4/mbrtowc.m4 \
- $(top_srcdir)/m4/mbsinit.m4 $(top_srcdir)/m4/mbstate_t.m4 \
- $(top_srcdir)/m4/mbtowc.m4 $(top_srcdir)/m4/memchr.m4 \
- $(top_srcdir)/m4/mkostemp.m4 $(top_srcdir)/m4/mmap-anon.m4 \
- $(top_srcdir)/m4/msvc-inval.m4 \
- $(top_srcdir)/m4/msvc-nothrow.m4 $(top_srcdir)/m4/multiarch.m4 \
- $(top_srcdir)/m4/nl_langinfo.m4 $(top_srcdir)/m4/nls.m4 \
- $(top_srcdir)/m4/nocrash.m4 $(top_srcdir)/m4/off_t.m4 \
- $(top_srcdir)/m4/pathmax.m4 $(top_srcdir)/m4/po.m4 \
- $(top_srcdir)/m4/progtest.m4 $(top_srcdir)/m4/quote.m4 \
- $(top_srcdir)/m4/quotearg.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/selinux-context-h.m4 \
- $(top_srcdir)/m4/selinux-selinux-h.m4 \
- $(top_srcdir)/m4/ssize_t.m4 $(top_srcdir)/m4/stat.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/strerror.m4 $(top_srcdir)/m4/string_h.m4 \
- $(top_srcdir)/m4/strverscmp.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/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/wchar_h.m4 \
- $(top_srcdir)/m4/wchar_t.m4 $(top_srcdir)/m4/wcrtomb.m4 \
- $(top_srcdir)/m4/wctob.m4 $(top_srcdir)/m4/wctomb.m4 \
- $(top_srcdir)/m4/wctype_h.m4 $(top_srcdir)/m4/wint_t.m4 \
- $(top_srcdir)/m4/xalloc.m4 $(top_srcdir)/configure.ac
-am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
- $(ACLOCAL_M4)
-mkinstalldirs = $(install_sh) -d
-CONFIG_HEADER = $(top_builddir)/config.h
-CONFIG_CLEAN_FILES = version.good
-CONFIG_CLEAN_VPATH_FILES =
-bug_regex10_SOURCES = bug-regex10.c
-bug_regex10_OBJECTS = bug-regex10.$(OBJEXT)
-bug_regex10_LDADD = $(LDADD)
-bug_regex10_DEPENDENCIES = ../lib/libsed.a
-bug_regex11_SOURCES = bug-regex11.c
-bug_regex11_OBJECTS = bug-regex11.$(OBJEXT)
-bug_regex11_LDADD = $(LDADD)
-bug_regex11_DEPENDENCIES = ../lib/libsed.a
-bug_regex12_SOURCES = bug-regex12.c
-bug_regex12_OBJECTS = bug-regex12.$(OBJEXT)
-bug_regex12_LDADD = $(LDADD)
-bug_regex12_DEPENDENCIES = ../lib/libsed.a
-bug_regex13_SOURCES = bug-regex13.c
-bug_regex13_OBJECTS = bug-regex13.$(OBJEXT)
-bug_regex13_LDADD = $(LDADD)
-bug_regex13_DEPENDENCIES = ../lib/libsed.a
-bug_regex14_SOURCES = bug-regex14.c
-bug_regex14_OBJECTS = bug-regex14.$(OBJEXT)
-bug_regex14_LDADD = $(LDADD)
-bug_regex14_DEPENDENCIES = ../lib/libsed.a
-bug_regex15_SOURCES = bug-regex15.c
-bug_regex15_OBJECTS = bug-regex15.$(OBJEXT)
-bug_regex15_LDADD = $(LDADD)
-bug_regex15_DEPENDENCIES = ../lib/libsed.a
-bug_regex16_SOURCES = bug-regex16.c
-bug_regex16_OBJECTS = bug-regex16.$(OBJEXT)
-bug_regex16_LDADD = $(LDADD)
-bug_regex16_DEPENDENCIES = ../lib/libsed.a
-bug_regex21_SOURCES = bug-regex21.c
-bug_regex21_OBJECTS = bug-regex21.$(OBJEXT)
-bug_regex21_LDADD = $(LDADD)
-bug_regex21_DEPENDENCIES = ../lib/libsed.a
-bug_regex27_SOURCES = bug-regex27.c
-bug_regex27_OBJECTS = bug-regex27.$(OBJEXT)
-bug_regex27_LDADD = $(LDADD)
-bug_regex27_DEPENDENCIES = ../lib/libsed.a
-bug_regex28_SOURCES = bug-regex28.c
-bug_regex28_OBJECTS = bug-regex28.$(OBJEXT)
-bug_regex28_LDADD = $(LDADD)
-bug_regex28_DEPENDENCIES = ../lib/libsed.a
-bug_regex7_SOURCES = bug-regex7.c
-bug_regex7_OBJECTS = bug-regex7.$(OBJEXT)
-bug_regex7_LDADD = $(LDADD)
-bug_regex7_DEPENDENCIES = ../lib/libsed.a
-bug_regex8_SOURCES = bug-regex8.c
-bug_regex8_OBJECTS = bug-regex8.$(OBJEXT)
-bug_regex8_LDADD = $(LDADD)
-bug_regex8_DEPENDENCIES = ../lib/libsed.a
-bug_regex9_SOURCES = bug-regex9.c
-bug_regex9_OBJECTS = bug-regex9.$(OBJEXT)
-bug_regex9_LDADD = $(LDADD)
-bug_regex9_DEPENDENCIES = ../lib/libsed.a
-runptests_SOURCES = runptests.c
-runptests_OBJECTS = runptests.$(OBJEXT)
-runptests_LDADD = $(LDADD)
-runptests_DEPENDENCIES = ../lib/libsed.a
-runtests_SOURCES = runtests.c
-runtests_OBJECTS = runtests.$(OBJEXT)
-runtests_LDADD = $(LDADD)
-runtests_DEPENDENCIES = ../lib/libsed.a
-tst_boost_SOURCES = tst-boost.c
-tst_boost_OBJECTS = tst-boost.$(OBJEXT)
-tst_boost_LDADD = $(LDADD)
-tst_boost_DEPENDENCIES = ../lib/libsed.a
-tst_pcre_SOURCES = tst-pcre.c
-tst_pcre_OBJECTS = tst-pcre.$(OBJEXT)
-tst_pcre_LDADD = $(LDADD)
-tst_pcre_DEPENDENCIES = ../lib/libsed.a
-tst_regex2_SOURCES = tst-regex2.c
-tst_regex2_OBJECTS = tst-regex2.$(OBJEXT)
-tst_regex2_LDADD = $(LDADD)
-tst_regex2_DEPENDENCIES = ../lib/libsed.a
-tst_rxspencer_SOURCES = tst-rxspencer.c
-tst_rxspencer_OBJECTS = tst-rxspencer.$(OBJEXT)
-tst_rxspencer_LDADD = $(LDADD)
-tst_rxspencer_DEPENDENCIES = ../lib/libsed.a
-DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)
-depcomp = $(SHELL) $(top_srcdir)/build-aux/depcomp
-am__depfiles_maybe = depfiles
-am__mv = mv -f
-COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
- $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
-CCLD = $(CC)
-LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
-SOURCES = 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-regex2.c tst-rxspencer.c
-DIST_SOURCES = 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-regex2.c tst-rxspencer.c
-am__can_run_installinfo = \
- case $$AM_UPDATE_INFO_DIR in \
- n|no|NO) false;; \
- *) (install-info --version) >/dev/null 2>&1;; \
- esac
-HEADERS = $(noinst_HEADERS)
-ETAGS = etags
-CTAGS = ctags
-am__tty_colors_dummy = \
- mgn= red= grn= lgn= blu= brg= std=; \
- am__color_tests=no
-am__tty_colors = $(am__tty_colors_dummy)
-DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
-pkglibexecdir = @pkglibexecdir@
-ACLOCAL = @ACLOCAL@
-ALLOCA = @ALLOCA@
-ALLOCA_H = @ALLOCA_H@
-AMTAR = @AMTAR@
-APPLE_UNIVERSAL_BUILD = @APPLE_UNIVERSAL_BUILD@
-AR = @AR@
-ARFLAGS = @ARFLAGS@
-AUTOCONF = @AUTOCONF@
-AUTOHEADER = @AUTOHEADER@
-AUTOMAKE = @AUTOMAKE@
-AWK = @AWK@
-BITSIZEOF_PTRDIFF_T = @BITSIZEOF_PTRDIFF_T@
-BITSIZEOF_SIG_ATOMIC_T = @BITSIZEOF_SIG_ATOMIC_T@
-BITSIZEOF_SIZE_T = @BITSIZEOF_SIZE_T@
-BITSIZEOF_WCHAR_T = @BITSIZEOF_WCHAR_T@
-BITSIZEOF_WINT_T = @BITSIZEOF_WINT_T@
-CC = @CC@
-CCDEPMODE = @CCDEPMODE@
-CFLAGS = @CFLAGS@
-COPYRIGHT_YEAR = @COPYRIGHT_YEAR@
-CPP = @CPP@
-CPPFLAGS = @CPPFLAGS@
-CYGPATH_W = @CYGPATH_W@
-DEFS = @DEFS@
-DEPDIR = @DEPDIR@
-ECHO_C = @ECHO_C@
-ECHO_N = @ECHO_N@
-ECHO_T = @ECHO_T@
-EGREP = @EGREP@
-EMULTIHOP_HIDDEN = @EMULTIHOP_HIDDEN@
-EMULTIHOP_VALUE = @EMULTIHOP_VALUE@
-ENOLINK_HIDDEN = @ENOLINK_HIDDEN@
-ENOLINK_VALUE = @ENOLINK_VALUE@
-EOVERFLOW_HIDDEN = @EOVERFLOW_HIDDEN@
-EOVERFLOW_VALUE = @EOVERFLOW_VALUE@
-ERRNO_H = @ERRNO_H@
-EXEEXT = @EXEEXT@
-GETOPT_H = @GETOPT_H@
-GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@
-GLIBC21 = @GLIBC21@
-GMSGFMT = @GMSGFMT@
-GMSGFMT_015 = @GMSGFMT_015@
-GNULIB_ATOLL = @GNULIB_ATOLL@
-GNULIB_BTOWC = @GNULIB_BTOWC@
-GNULIB_CALLOC_POSIX = @GNULIB_CALLOC_POSIX@
-GNULIB_CANONICALIZE_FILE_NAME = @GNULIB_CANONICALIZE_FILE_NAME@
-GNULIB_CHDIR = @GNULIB_CHDIR@
-GNULIB_CHOWN = @GNULIB_CHOWN@
-GNULIB_CLOSE = @GNULIB_CLOSE@
-GNULIB_DPRINTF = @GNULIB_DPRINTF@
-GNULIB_DUP = @GNULIB_DUP@
-GNULIB_DUP2 = @GNULIB_DUP2@
-GNULIB_DUP3 = @GNULIB_DUP3@
-GNULIB_DUPLOCALE = @GNULIB_DUPLOCALE@
-GNULIB_ENVIRON = @GNULIB_ENVIRON@
-GNULIB_EUIDACCESS = @GNULIB_EUIDACCESS@
-GNULIB_FACCESSAT = @GNULIB_FACCESSAT@
-GNULIB_FCHDIR = @GNULIB_FCHDIR@
-GNULIB_FCHMODAT = @GNULIB_FCHMODAT@
-GNULIB_FCHOWNAT = @GNULIB_FCHOWNAT@
-GNULIB_FCLOSE = @GNULIB_FCLOSE@
-GNULIB_FCNTL = @GNULIB_FCNTL@
-GNULIB_FDATASYNC = @GNULIB_FDATASYNC@
-GNULIB_FDOPEN = @GNULIB_FDOPEN@
-GNULIB_FFLUSH = @GNULIB_FFLUSH@
-GNULIB_FFSL = @GNULIB_FFSL@
-GNULIB_FFSLL = @GNULIB_FFSLL@
-GNULIB_FGETC = @GNULIB_FGETC@
-GNULIB_FGETS = @GNULIB_FGETS@
-GNULIB_FOPEN = @GNULIB_FOPEN@
-GNULIB_FPRINTF = @GNULIB_FPRINTF@
-GNULIB_FPRINTF_POSIX = @GNULIB_FPRINTF_POSIX@
-GNULIB_FPURGE = @GNULIB_FPURGE@
-GNULIB_FPUTC = @GNULIB_FPUTC@
-GNULIB_FPUTS = @GNULIB_FPUTS@
-GNULIB_FREAD = @GNULIB_FREAD@
-GNULIB_FREOPEN = @GNULIB_FREOPEN@
-GNULIB_FSCANF = @GNULIB_FSCANF@
-GNULIB_FSEEK = @GNULIB_FSEEK@
-GNULIB_FSEEKO = @GNULIB_FSEEKO@
-GNULIB_FSTAT = @GNULIB_FSTAT@
-GNULIB_FSTATAT = @GNULIB_FSTATAT@
-GNULIB_FSYNC = @GNULIB_FSYNC@
-GNULIB_FTELL = @GNULIB_FTELL@
-GNULIB_FTELLO = @GNULIB_FTELLO@
-GNULIB_FTRUNCATE = @GNULIB_FTRUNCATE@
-GNULIB_FUTIMENS = @GNULIB_FUTIMENS@
-GNULIB_FWRITE = @GNULIB_FWRITE@
-GNULIB_GETC = @GNULIB_GETC@
-GNULIB_GETCHAR = @GNULIB_GETCHAR@
-GNULIB_GETCWD = @GNULIB_GETCWD@
-GNULIB_GETDELIM = @GNULIB_GETDELIM@
-GNULIB_GETDOMAINNAME = @GNULIB_GETDOMAINNAME@
-GNULIB_GETDTABLESIZE = @GNULIB_GETDTABLESIZE@
-GNULIB_GETGROUPS = @GNULIB_GETGROUPS@
-GNULIB_GETHOSTNAME = @GNULIB_GETHOSTNAME@
-GNULIB_GETLINE = @GNULIB_GETLINE@
-GNULIB_GETLOADAVG = @GNULIB_GETLOADAVG@
-GNULIB_GETLOGIN = @GNULIB_GETLOGIN@
-GNULIB_GETLOGIN_R = @GNULIB_GETLOGIN_R@
-GNULIB_GETPAGESIZE = @GNULIB_GETPAGESIZE@
-GNULIB_GETSUBOPT = @GNULIB_GETSUBOPT@
-GNULIB_GETTIMEOFDAY = @GNULIB_GETTIMEOFDAY@
-GNULIB_GETUSERSHELL = @GNULIB_GETUSERSHELL@
-GNULIB_GL_UNISTD_H_GETOPT = @GNULIB_GL_UNISTD_H_GETOPT@
-GNULIB_GRANTPT = @GNULIB_GRANTPT@
-GNULIB_GROUP_MEMBER = @GNULIB_GROUP_MEMBER@
-GNULIB_ISATTY = @GNULIB_ISATTY@
-GNULIB_ISWBLANK = @GNULIB_ISWBLANK@
-GNULIB_ISWCTYPE = @GNULIB_ISWCTYPE@
-GNULIB_LCHMOD = @GNULIB_LCHMOD@
-GNULIB_LCHOWN = @GNULIB_LCHOWN@
-GNULIB_LINK = @GNULIB_LINK@
-GNULIB_LINKAT = @GNULIB_LINKAT@
-GNULIB_LOCALECONV = @GNULIB_LOCALECONV@
-GNULIB_LSEEK = @GNULIB_LSEEK@
-GNULIB_LSTAT = @GNULIB_LSTAT@
-GNULIB_MALLOC_POSIX = @GNULIB_MALLOC_POSIX@
-GNULIB_MBRLEN = @GNULIB_MBRLEN@
-GNULIB_MBRTOWC = @GNULIB_MBRTOWC@
-GNULIB_MBSCASECMP = @GNULIB_MBSCASECMP@
-GNULIB_MBSCASESTR = @GNULIB_MBSCASESTR@
-GNULIB_MBSCHR = @GNULIB_MBSCHR@
-GNULIB_MBSCSPN = @GNULIB_MBSCSPN@
-GNULIB_MBSINIT = @GNULIB_MBSINIT@
-GNULIB_MBSLEN = @GNULIB_MBSLEN@
-GNULIB_MBSNCASECMP = @GNULIB_MBSNCASECMP@
-GNULIB_MBSNLEN = @GNULIB_MBSNLEN@
-GNULIB_MBSNRTOWCS = @GNULIB_MBSNRTOWCS@
-GNULIB_MBSPBRK = @GNULIB_MBSPBRK@
-GNULIB_MBSPCASECMP = @GNULIB_MBSPCASECMP@
-GNULIB_MBSRCHR = @GNULIB_MBSRCHR@
-GNULIB_MBSRTOWCS = @GNULIB_MBSRTOWCS@
-GNULIB_MBSSEP = @GNULIB_MBSSEP@
-GNULIB_MBSSPN = @GNULIB_MBSSPN@
-GNULIB_MBSSTR = @GNULIB_MBSSTR@
-GNULIB_MBSTOK_R = @GNULIB_MBSTOK_R@
-GNULIB_MBTOWC = @GNULIB_MBTOWC@
-GNULIB_MEMCHR = @GNULIB_MEMCHR@
-GNULIB_MEMMEM = @GNULIB_MEMMEM@
-GNULIB_MEMPCPY = @GNULIB_MEMPCPY@
-GNULIB_MEMRCHR = @GNULIB_MEMRCHR@
-GNULIB_MKDIRAT = @GNULIB_MKDIRAT@
-GNULIB_MKDTEMP = @GNULIB_MKDTEMP@
-GNULIB_MKFIFO = @GNULIB_MKFIFO@
-GNULIB_MKFIFOAT = @GNULIB_MKFIFOAT@
-GNULIB_MKNOD = @GNULIB_MKNOD@
-GNULIB_MKNODAT = @GNULIB_MKNODAT@
-GNULIB_MKOSTEMP = @GNULIB_MKOSTEMP@
-GNULIB_MKOSTEMPS = @GNULIB_MKOSTEMPS@
-GNULIB_MKSTEMP = @GNULIB_MKSTEMP@
-GNULIB_MKSTEMPS = @GNULIB_MKSTEMPS@
-GNULIB_MKTIME = @GNULIB_MKTIME@
-GNULIB_NANOSLEEP = @GNULIB_NANOSLEEP@
-GNULIB_NL_LANGINFO = @GNULIB_NL_LANGINFO@
-GNULIB_NONBLOCKING = @GNULIB_NONBLOCKING@
-GNULIB_OBSTACK_PRINTF = @GNULIB_OBSTACK_PRINTF@
-GNULIB_OBSTACK_PRINTF_POSIX = @GNULIB_OBSTACK_PRINTF_POSIX@
-GNULIB_OPEN = @GNULIB_OPEN@
-GNULIB_OPENAT = @GNULIB_OPENAT@
-GNULIB_PCLOSE = @GNULIB_PCLOSE@
-GNULIB_PERROR = @GNULIB_PERROR@
-GNULIB_PIPE = @GNULIB_PIPE@
-GNULIB_PIPE2 = @GNULIB_PIPE2@
-GNULIB_POPEN = @GNULIB_POPEN@
-GNULIB_POSIX_OPENPT = @GNULIB_POSIX_OPENPT@
-GNULIB_PREAD = @GNULIB_PREAD@
-GNULIB_PRINTF = @GNULIB_PRINTF@
-GNULIB_PRINTF_POSIX = @GNULIB_PRINTF_POSIX@
-GNULIB_PTSNAME = @GNULIB_PTSNAME@
-GNULIB_PTSNAME_R = @GNULIB_PTSNAME_R@
-GNULIB_PUTC = @GNULIB_PUTC@
-GNULIB_PUTCHAR = @GNULIB_PUTCHAR@
-GNULIB_PUTENV = @GNULIB_PUTENV@
-GNULIB_PUTS = @GNULIB_PUTS@
-GNULIB_PWRITE = @GNULIB_PWRITE@
-GNULIB_RANDOM = @GNULIB_RANDOM@
-GNULIB_RANDOM_R = @GNULIB_RANDOM_R@
-GNULIB_RAWMEMCHR = @GNULIB_RAWMEMCHR@
-GNULIB_READ = @GNULIB_READ@
-GNULIB_READLINK = @GNULIB_READLINK@
-GNULIB_READLINKAT = @GNULIB_READLINKAT@
-GNULIB_REALLOC_POSIX = @GNULIB_REALLOC_POSIX@
-GNULIB_REALPATH = @GNULIB_REALPATH@
-GNULIB_REMOVE = @GNULIB_REMOVE@
-GNULIB_RENAME = @GNULIB_RENAME@
-GNULIB_RENAMEAT = @GNULIB_RENAMEAT@
-GNULIB_RMDIR = @GNULIB_RMDIR@
-GNULIB_RPMATCH = @GNULIB_RPMATCH@
-GNULIB_SCANF = @GNULIB_SCANF@
-GNULIB_SETENV = @GNULIB_SETENV@
-GNULIB_SETHOSTNAME = @GNULIB_SETHOSTNAME@
-GNULIB_SETLOCALE = @GNULIB_SETLOCALE@
-GNULIB_SLEEP = @GNULIB_SLEEP@
-GNULIB_SNPRINTF = @GNULIB_SNPRINTF@
-GNULIB_SPRINTF_POSIX = @GNULIB_SPRINTF_POSIX@
-GNULIB_STAT = @GNULIB_STAT@
-GNULIB_STDIO_H_NONBLOCKING = @GNULIB_STDIO_H_NONBLOCKING@
-GNULIB_STDIO_H_SIGPIPE = @GNULIB_STDIO_H_SIGPIPE@
-GNULIB_STPCPY = @GNULIB_STPCPY@
-GNULIB_STPNCPY = @GNULIB_STPNCPY@
-GNULIB_STRCASESTR = @GNULIB_STRCASESTR@
-GNULIB_STRCHRNUL = @GNULIB_STRCHRNUL@
-GNULIB_STRDUP = @GNULIB_STRDUP@
-GNULIB_STRERROR = @GNULIB_STRERROR@
-GNULIB_STRERROR_R = @GNULIB_STRERROR_R@
-GNULIB_STRNCAT = @GNULIB_STRNCAT@
-GNULIB_STRNDUP = @GNULIB_STRNDUP@
-GNULIB_STRNLEN = @GNULIB_STRNLEN@
-GNULIB_STRPBRK = @GNULIB_STRPBRK@
-GNULIB_STRPTIME = @GNULIB_STRPTIME@
-GNULIB_STRSEP = @GNULIB_STRSEP@
-GNULIB_STRSIGNAL = @GNULIB_STRSIGNAL@
-GNULIB_STRSTR = @GNULIB_STRSTR@
-GNULIB_STRTOD = @GNULIB_STRTOD@
-GNULIB_STRTOK_R = @GNULIB_STRTOK_R@
-GNULIB_STRTOLL = @GNULIB_STRTOLL@
-GNULIB_STRTOULL = @GNULIB_STRTOULL@
-GNULIB_STRVERSCMP = @GNULIB_STRVERSCMP@
-GNULIB_SYMLINK = @GNULIB_SYMLINK@
-GNULIB_SYMLINKAT = @GNULIB_SYMLINKAT@
-GNULIB_SYSTEM_POSIX = @GNULIB_SYSTEM_POSIX@
-GNULIB_TIMEGM = @GNULIB_TIMEGM@
-GNULIB_TIME_R = @GNULIB_TIME_R@
-GNULIB_TMPFILE = @GNULIB_TMPFILE@
-GNULIB_TOWCTRANS = @GNULIB_TOWCTRANS@
-GNULIB_TTYNAME_R = @GNULIB_TTYNAME_R@
-GNULIB_UNISTD_H_NONBLOCKING = @GNULIB_UNISTD_H_NONBLOCKING@
-GNULIB_UNISTD_H_SIGPIPE = @GNULIB_UNISTD_H_SIGPIPE@
-GNULIB_UNLINK = @GNULIB_UNLINK@
-GNULIB_UNLINKAT = @GNULIB_UNLINKAT@
-GNULIB_UNLOCKPT = @GNULIB_UNLOCKPT@
-GNULIB_UNSETENV = @GNULIB_UNSETENV@
-GNULIB_USLEEP = @GNULIB_USLEEP@
-GNULIB_UTIMENSAT = @GNULIB_UTIMENSAT@
-GNULIB_VASPRINTF = @GNULIB_VASPRINTF@
-GNULIB_VDPRINTF = @GNULIB_VDPRINTF@
-GNULIB_VFPRINTF = @GNULIB_VFPRINTF@
-GNULIB_VFPRINTF_POSIX = @GNULIB_VFPRINTF_POSIX@
-GNULIB_VFSCANF = @GNULIB_VFSCANF@
-GNULIB_VPRINTF = @GNULIB_VPRINTF@
-GNULIB_VPRINTF_POSIX = @GNULIB_VPRINTF_POSIX@
-GNULIB_VSCANF = @GNULIB_VSCANF@
-GNULIB_VSNPRINTF = @GNULIB_VSNPRINTF@
-GNULIB_VSPRINTF_POSIX = @GNULIB_VSPRINTF_POSIX@
-GNULIB_WCPCPY = @GNULIB_WCPCPY@
-GNULIB_WCPNCPY = @GNULIB_WCPNCPY@
-GNULIB_WCRTOMB = @GNULIB_WCRTOMB@
-GNULIB_WCSCASECMP = @GNULIB_WCSCASECMP@
-GNULIB_WCSCAT = @GNULIB_WCSCAT@
-GNULIB_WCSCHR = @GNULIB_WCSCHR@
-GNULIB_WCSCMP = @GNULIB_WCSCMP@
-GNULIB_WCSCOLL = @GNULIB_WCSCOLL@
-GNULIB_WCSCPY = @GNULIB_WCSCPY@
-GNULIB_WCSCSPN = @GNULIB_WCSCSPN@
-GNULIB_WCSDUP = @GNULIB_WCSDUP@
-GNULIB_WCSLEN = @GNULIB_WCSLEN@
-GNULIB_WCSNCASECMP = @GNULIB_WCSNCASECMP@
-GNULIB_WCSNCAT = @GNULIB_WCSNCAT@
-GNULIB_WCSNCMP = @GNULIB_WCSNCMP@
-GNULIB_WCSNCPY = @GNULIB_WCSNCPY@
-GNULIB_WCSNLEN = @GNULIB_WCSNLEN@
-GNULIB_WCSNRTOMBS = @GNULIB_WCSNRTOMBS@
-GNULIB_WCSPBRK = @GNULIB_WCSPBRK@
-GNULIB_WCSRCHR = @GNULIB_WCSRCHR@
-GNULIB_WCSRTOMBS = @GNULIB_WCSRTOMBS@
-GNULIB_WCSSPN = @GNULIB_WCSSPN@
-GNULIB_WCSSTR = @GNULIB_WCSSTR@
-GNULIB_WCSTOK = @GNULIB_WCSTOK@
-GNULIB_WCSWIDTH = @GNULIB_WCSWIDTH@
-GNULIB_WCSXFRM = @GNULIB_WCSXFRM@
-GNULIB_WCTOB = @GNULIB_WCTOB@
-GNULIB_WCTOMB = @GNULIB_WCTOMB@
-GNULIB_WCTRANS = @GNULIB_WCTRANS@
-GNULIB_WCTYPE = @GNULIB_WCTYPE@
-GNULIB_WCWIDTH = @GNULIB_WCWIDTH@
-GNULIB_WMEMCHR = @GNULIB_WMEMCHR@
-GNULIB_WMEMCMP = @GNULIB_WMEMCMP@
-GNULIB_WMEMCPY = @GNULIB_WMEMCPY@
-GNULIB_WMEMMOVE = @GNULIB_WMEMMOVE@
-GNULIB_WMEMSET = @GNULIB_WMEMSET@
-GNULIB_WRITE = @GNULIB_WRITE@
-GNULIB__EXIT = @GNULIB__EXIT@
-GREP = @GREP@
-HAVE_ATOLL = @HAVE_ATOLL@
-HAVE_BTOWC = @HAVE_BTOWC@
-HAVE_CANONICALIZE_FILE_NAME = @HAVE_CANONICALIZE_FILE_NAME@
-HAVE_CHOWN = @HAVE_CHOWN@
-HAVE_DECL_ENVIRON = @HAVE_DECL_ENVIRON@
-HAVE_DECL_FCHDIR = @HAVE_DECL_FCHDIR@
-HAVE_DECL_FDATASYNC = @HAVE_DECL_FDATASYNC@
-HAVE_DECL_FPURGE = @HAVE_DECL_FPURGE@
-HAVE_DECL_FSEEKO = @HAVE_DECL_FSEEKO@
-HAVE_DECL_FTELLO = @HAVE_DECL_FTELLO@
-HAVE_DECL_GETDELIM = @HAVE_DECL_GETDELIM@
-HAVE_DECL_GETDOMAINNAME = @HAVE_DECL_GETDOMAINNAME@
-HAVE_DECL_GETLINE = @HAVE_DECL_GETLINE@
-HAVE_DECL_GETLOADAVG = @HAVE_DECL_GETLOADAVG@
-HAVE_DECL_GETLOGIN_R = @HAVE_DECL_GETLOGIN_R@
-HAVE_DECL_GETPAGESIZE = @HAVE_DECL_GETPAGESIZE@
-HAVE_DECL_GETUSERSHELL = @HAVE_DECL_GETUSERSHELL@
-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_SNPRINTF = @HAVE_DECL_SNPRINTF@
-HAVE_DECL_STRDUP = @HAVE_DECL_STRDUP@
-HAVE_DECL_STRERROR_R = @HAVE_DECL_STRERROR_R@
-HAVE_DECL_STRNDUP = @HAVE_DECL_STRNDUP@
-HAVE_DECL_STRNLEN = @HAVE_DECL_STRNLEN@
-HAVE_DECL_STRSIGNAL = @HAVE_DECL_STRSIGNAL@
-HAVE_DECL_STRTOK_R = @HAVE_DECL_STRTOK_R@
-HAVE_DECL_TTYNAME_R = @HAVE_DECL_TTYNAME_R@
-HAVE_DECL_UNSETENV = @HAVE_DECL_UNSETENV@
-HAVE_DECL_VSNPRINTF = @HAVE_DECL_VSNPRINTF@
-HAVE_DECL_WCTOB = @HAVE_DECL_WCTOB@
-HAVE_DECL_WCWIDTH = @HAVE_DECL_WCWIDTH@
-HAVE_DPRINTF = @HAVE_DPRINTF@
-HAVE_DUP2 = @HAVE_DUP2@
-HAVE_DUP3 = @HAVE_DUP3@
-HAVE_DUPLOCALE = @HAVE_DUPLOCALE@
-HAVE_EUIDACCESS = @HAVE_EUIDACCESS@
-HAVE_FACCESSAT = @HAVE_FACCESSAT@
-HAVE_FCHDIR = @HAVE_FCHDIR@
-HAVE_FCHMODAT = @HAVE_FCHMODAT@
-HAVE_FCHOWNAT = @HAVE_FCHOWNAT@
-HAVE_FCNTL = @HAVE_FCNTL@
-HAVE_FDATASYNC = @HAVE_FDATASYNC@
-HAVE_FEATURES_H = @HAVE_FEATURES_H@
-HAVE_FFSL = @HAVE_FFSL@
-HAVE_FFSLL = @HAVE_FFSLL@
-HAVE_FSEEKO = @HAVE_FSEEKO@
-HAVE_FSTATAT = @HAVE_FSTATAT@
-HAVE_FSYNC = @HAVE_FSYNC@
-HAVE_FTELLO = @HAVE_FTELLO@
-HAVE_FTRUNCATE = @HAVE_FTRUNCATE@
-HAVE_FUTIMENS = @HAVE_FUTIMENS@
-HAVE_GETDTABLESIZE = @HAVE_GETDTABLESIZE@
-HAVE_GETGROUPS = @HAVE_GETGROUPS@
-HAVE_GETHOSTNAME = @HAVE_GETHOSTNAME@
-HAVE_GETLOGIN = @HAVE_GETLOGIN@
-HAVE_GETOPT_H = @HAVE_GETOPT_H@
-HAVE_GETPAGESIZE = @HAVE_GETPAGESIZE@
-HAVE_GETSUBOPT = @HAVE_GETSUBOPT@
-HAVE_GETTIMEOFDAY = @HAVE_GETTIMEOFDAY@
-HAVE_GRANTPT = @HAVE_GRANTPT@
-HAVE_GROUP_MEMBER = @HAVE_GROUP_MEMBER@
-HAVE_INTTYPES_H = @HAVE_INTTYPES_H@
-HAVE_ISWBLANK = @HAVE_ISWBLANK@
-HAVE_ISWCNTRL = @HAVE_ISWCNTRL@
-HAVE_LANGINFO_CODESET = @HAVE_LANGINFO_CODESET@
-HAVE_LANGINFO_ERA = @HAVE_LANGINFO_ERA@
-HAVE_LANGINFO_H = @HAVE_LANGINFO_H@
-HAVE_LANGINFO_T_FMT_AMPM = @HAVE_LANGINFO_T_FMT_AMPM@
-HAVE_LANGINFO_YESEXPR = @HAVE_LANGINFO_YESEXPR@
-HAVE_LCHMOD = @HAVE_LCHMOD@
-HAVE_LCHOWN = @HAVE_LCHOWN@
-HAVE_LINK = @HAVE_LINK@
-HAVE_LINKAT = @HAVE_LINKAT@
-HAVE_LONG_LONG_INT = @HAVE_LONG_LONG_INT@
-HAVE_LSTAT = @HAVE_LSTAT@
-HAVE_MBRLEN = @HAVE_MBRLEN@
-HAVE_MBRTOWC = @HAVE_MBRTOWC@
-HAVE_MBSINIT = @HAVE_MBSINIT@
-HAVE_MBSLEN = @HAVE_MBSLEN@
-HAVE_MBSNRTOWCS = @HAVE_MBSNRTOWCS@
-HAVE_MBSRTOWCS = @HAVE_MBSRTOWCS@
-HAVE_MEMCHR = @HAVE_MEMCHR@
-HAVE_MEMPCPY = @HAVE_MEMPCPY@
-HAVE_MKDIRAT = @HAVE_MKDIRAT@
-HAVE_MKDTEMP = @HAVE_MKDTEMP@
-HAVE_MKFIFO = @HAVE_MKFIFO@
-HAVE_MKFIFOAT = @HAVE_MKFIFOAT@
-HAVE_MKNOD = @HAVE_MKNOD@
-HAVE_MKNODAT = @HAVE_MKNODAT@
-HAVE_MKOSTEMP = @HAVE_MKOSTEMP@
-HAVE_MKOSTEMPS = @HAVE_MKOSTEMPS@
-HAVE_MKSTEMP = @HAVE_MKSTEMP@
-HAVE_MKSTEMPS = @HAVE_MKSTEMPS@
-HAVE_MSVC_INVALID_PARAMETER_HANDLER = @HAVE_MSVC_INVALID_PARAMETER_HANDLER@
-HAVE_NANOSLEEP = @HAVE_NANOSLEEP@
-HAVE_NL_LANGINFO = @HAVE_NL_LANGINFO@
-HAVE_OPENAT = @HAVE_OPENAT@
-HAVE_OS_H = @HAVE_OS_H@
-HAVE_PCLOSE = @HAVE_PCLOSE@
-HAVE_PIPE = @HAVE_PIPE@
-HAVE_PIPE2 = @HAVE_PIPE2@
-HAVE_POPEN = @HAVE_POPEN@
-HAVE_POSIX_OPENPT = @HAVE_POSIX_OPENPT@
-HAVE_PREAD = @HAVE_PREAD@
-HAVE_PTSNAME = @HAVE_PTSNAME@
-HAVE_PTSNAME_R = @HAVE_PTSNAME_R@
-HAVE_PWRITE = @HAVE_PWRITE@
-HAVE_RANDOM = @HAVE_RANDOM@
-HAVE_RANDOM_H = @HAVE_RANDOM_H@
-HAVE_RANDOM_R = @HAVE_RANDOM_R@
-HAVE_RAWMEMCHR = @HAVE_RAWMEMCHR@
-HAVE_READLINK = @HAVE_READLINK@
-HAVE_READLINKAT = @HAVE_READLINKAT@
-HAVE_REALPATH = @HAVE_REALPATH@
-HAVE_RENAMEAT = @HAVE_RENAMEAT@
-HAVE_RPMATCH = @HAVE_RPMATCH@
-HAVE_SETENV = @HAVE_SETENV@
-HAVE_SETHOSTNAME = @HAVE_SETHOSTNAME@
-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_SLEEP = @HAVE_SLEEP@
-HAVE_STDINT_H = @HAVE_STDINT_H@
-HAVE_STPCPY = @HAVE_STPCPY@
-HAVE_STPNCPY = @HAVE_STPNCPY@
-HAVE_STRCASESTR = @HAVE_STRCASESTR@
-HAVE_STRCHRNUL = @HAVE_STRCHRNUL@
-HAVE_STRPBRK = @HAVE_STRPBRK@
-HAVE_STRPTIME = @HAVE_STRPTIME@
-HAVE_STRSEP = @HAVE_STRSEP@
-HAVE_STRTOD = @HAVE_STRTOD@
-HAVE_STRTOLL = @HAVE_STRTOLL@
-HAVE_STRTOULL = @HAVE_STRTOULL@
-HAVE_STRUCT_RANDOM_DATA = @HAVE_STRUCT_RANDOM_DATA@
-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_INTTYPES_H = @HAVE_SYS_INTTYPES_H@
-HAVE_SYS_LOADAVG_H = @HAVE_SYS_LOADAVG_H@
-HAVE_SYS_PARAM_H = @HAVE_SYS_PARAM_H@
-HAVE_SYS_TIME_H = @HAVE_SYS_TIME_H@
-HAVE_SYS_TYPES_H = @HAVE_SYS_TYPES_H@
-HAVE_TIMEGM = @HAVE_TIMEGM@
-HAVE_UNISTD_H = @HAVE_UNISTD_H@
-HAVE_UNLINKAT = @HAVE_UNLINKAT@
-HAVE_UNLOCKPT = @HAVE_UNLOCKPT@
-HAVE_UNSIGNED_LONG_LONG_INT = @HAVE_UNSIGNED_LONG_LONG_INT@
-HAVE_USLEEP = @HAVE_USLEEP@
-HAVE_UTIMENSAT = @HAVE_UTIMENSAT@
-HAVE_VASPRINTF = @HAVE_VASPRINTF@
-HAVE_VDPRINTF = @HAVE_VDPRINTF@
-HAVE_WCHAR_H = @HAVE_WCHAR_H@
-HAVE_WCHAR_T = @HAVE_WCHAR_T@
-HAVE_WCPCPY = @HAVE_WCPCPY@
-HAVE_WCPNCPY = @HAVE_WCPNCPY@
-HAVE_WCRTOMB = @HAVE_WCRTOMB@
-HAVE_WCSCASECMP = @HAVE_WCSCASECMP@
-HAVE_WCSCAT = @HAVE_WCSCAT@
-HAVE_WCSCHR = @HAVE_WCSCHR@
-HAVE_WCSCMP = @HAVE_WCSCMP@
-HAVE_WCSCOLL = @HAVE_WCSCOLL@
-HAVE_WCSCPY = @HAVE_WCSCPY@
-HAVE_WCSCSPN = @HAVE_WCSCSPN@
-HAVE_WCSDUP = @HAVE_WCSDUP@
-HAVE_WCSLEN = @HAVE_WCSLEN@
-HAVE_WCSNCASECMP = @HAVE_WCSNCASECMP@
-HAVE_WCSNCAT = @HAVE_WCSNCAT@
-HAVE_WCSNCMP = @HAVE_WCSNCMP@
-HAVE_WCSNCPY = @HAVE_WCSNCPY@
-HAVE_WCSNLEN = @HAVE_WCSNLEN@
-HAVE_WCSNRTOMBS = @HAVE_WCSNRTOMBS@
-HAVE_WCSPBRK = @HAVE_WCSPBRK@
-HAVE_WCSRCHR = @HAVE_WCSRCHR@
-HAVE_WCSRTOMBS = @HAVE_WCSRTOMBS@
-HAVE_WCSSPN = @HAVE_WCSSPN@
-HAVE_WCSSTR = @HAVE_WCSSTR@
-HAVE_WCSTOK = @HAVE_WCSTOK@
-HAVE_WCSWIDTH = @HAVE_WCSWIDTH@
-HAVE_WCSXFRM = @HAVE_WCSXFRM@
-HAVE_WCTRANS_T = @HAVE_WCTRANS_T@
-HAVE_WCTYPE_H = @HAVE_WCTYPE_H@
-HAVE_WCTYPE_T = @HAVE_WCTYPE_T@
-HAVE_WINSOCK2_H = @HAVE_WINSOCK2_H@
-HAVE_WINT_T = @HAVE_WINT_T@
-HAVE_WMEMCHR = @HAVE_WMEMCHR@
-HAVE_WMEMCMP = @HAVE_WMEMCMP@
-HAVE_WMEMCPY = @HAVE_WMEMCPY@
-HAVE_WMEMMOVE = @HAVE_WMEMMOVE@
-HAVE_WMEMSET = @HAVE_WMEMSET@
-HAVE_XLOCALE_H = @HAVE_XLOCALE_H@
-HAVE__BOOL = @HAVE__BOOL@
-HAVE__EXIT = @HAVE__EXIT@
-INCLUDE_NEXT = @INCLUDE_NEXT@
-INCLUDE_NEXT_AS_FIRST_DIRECTIVE = @INCLUDE_NEXT_AS_FIRST_DIRECTIVE@
-INSTALL = @INSTALL@
-INSTALL_DATA = @INSTALL_DATA@
-INSTALL_PROGRAM = @INSTALL_PROGRAM@
-INSTALL_SCRIPT = @INSTALL_SCRIPT@
-INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
-INTLLIBS = @INTLLIBS@
-INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@
-LDFLAGS = @LDFLAGS@
-LIBICONV = @LIBICONV@
-LIBINTL = @LIBINTL@
-LIBOBJS = @LIBOBJS@
-LIBS = @LIBS@
-LIBSED_LIBDEPS = @LIBSED_LIBDEPS@
-LIBSED_LTLIBDEPS = @LIBSED_LTLIBDEPS@
-LIB_ACL = @LIB_ACL@
-LIB_SELINUX = @LIB_SELINUX@
-LOCALCHARSET_TESTS_ENVIRONMENT = @LOCALCHARSET_TESTS_ENVIRONMENT@
-LOCALE_FR = @LOCALE_FR@
-LOCALE_FR_UTF8 = @LOCALE_FR_UTF8@
-LOCALE_JA = @LOCALE_JA@
-LOCALE_ZH_CN = @LOCALE_ZH_CN@
-LTLIBICONV = @LTLIBICONV@
-LTLIBINTL = @LTLIBINTL@
-LTLIBOBJS = @LTLIBOBJS@
-MAKEINFO = @MAKEINFO@
-MKDIR_P = @MKDIR_P@
-MSGFMT = @MSGFMT@
-MSGFMT_015 = @MSGFMT_015@
-MSGMERGE = @MSGMERGE@
-NEXT_AS_FIRST_DIRECTIVE_ERRNO_H = @NEXT_AS_FIRST_DIRECTIVE_ERRNO_H@
-NEXT_AS_FIRST_DIRECTIVE_FCNTL_H = @NEXT_AS_FIRST_DIRECTIVE_FCNTL_H@
-NEXT_AS_FIRST_DIRECTIVE_GETOPT_H = @NEXT_AS_FIRST_DIRECTIVE_GETOPT_H@
-NEXT_AS_FIRST_DIRECTIVE_LANGINFO_H = @NEXT_AS_FIRST_DIRECTIVE_LANGINFO_H@
-NEXT_AS_FIRST_DIRECTIVE_LOCALE_H = @NEXT_AS_FIRST_DIRECTIVE_LOCALE_H@
-NEXT_AS_FIRST_DIRECTIVE_SELINUX_SELINUX_H = @NEXT_AS_FIRST_DIRECTIVE_SELINUX_SELINUX_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_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_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@
-NEXT_AS_FIRST_DIRECTIVE_WCTYPE_H = @NEXT_AS_FIRST_DIRECTIVE_WCTYPE_H@
-NEXT_ERRNO_H = @NEXT_ERRNO_H@
-NEXT_FCNTL_H = @NEXT_FCNTL_H@
-NEXT_GETOPT_H = @NEXT_GETOPT_H@
-NEXT_LANGINFO_H = @NEXT_LANGINFO_H@
-NEXT_LOCALE_H = @NEXT_LOCALE_H@
-NEXT_SELINUX_SELINUX_H = @NEXT_SELINUX_SELINUX_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_STAT_H = @NEXT_SYS_STAT_H@
-NEXT_SYS_TIME_H = @NEXT_SYS_TIME_H@
-NEXT_SYS_TYPES_H = @NEXT_SYS_TYPES_H@
-NEXT_TIME_H = @NEXT_TIME_H@
-NEXT_UNISTD_H = @NEXT_UNISTD_H@
-NEXT_WCHAR_H = @NEXT_WCHAR_H@
-NEXT_WCTYPE_H = @NEXT_WCTYPE_H@
-OBJEXT = @OBJEXT@
-PACKAGE = @PACKAGE@
-PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
-PACKAGE_NAME = @PACKAGE_NAME@
-PACKAGE_STRING = @PACKAGE_STRING@
-PACKAGE_TARNAME = @PACKAGE_TARNAME@
-PACKAGE_URL = @PACKAGE_URL@
-PACKAGE_VERSION = @PACKAGE_VERSION@
-PATH_SEPARATOR = @PATH_SEPARATOR@
-POSUB = @POSUB@
-PRAGMA_COLUMNS = @PRAGMA_COLUMNS@
-PRAGMA_SYSTEM_HEADER = @PRAGMA_SYSTEM_HEADER@
-PTHREAD_H_DEFINES_STRUCT_TIMESPEC = @PTHREAD_H_DEFINES_STRUCT_TIMESPEC@
-PTRDIFF_T_SUFFIX = @PTRDIFF_T_SUFFIX@
-RANLIB = @RANLIB@
-REPLACE_BTOWC = @REPLACE_BTOWC@
-REPLACE_CALLOC = @REPLACE_CALLOC@
-REPLACE_CANONICALIZE_FILE_NAME = @REPLACE_CANONICALIZE_FILE_NAME@
-REPLACE_CHOWN = @REPLACE_CHOWN@
-REPLACE_CLOSE = @REPLACE_CLOSE@
-REPLACE_DPRINTF = @REPLACE_DPRINTF@
-REPLACE_DUP = @REPLACE_DUP@
-REPLACE_DUP2 = @REPLACE_DUP2@
-REPLACE_DUPLOCALE = @REPLACE_DUPLOCALE@
-REPLACE_FCHOWNAT = @REPLACE_FCHOWNAT@
-REPLACE_FCLOSE = @REPLACE_FCLOSE@
-REPLACE_FCNTL = @REPLACE_FCNTL@
-REPLACE_FDOPEN = @REPLACE_FDOPEN@
-REPLACE_FFLUSH = @REPLACE_FFLUSH@
-REPLACE_FOPEN = @REPLACE_FOPEN@
-REPLACE_FPRINTF = @REPLACE_FPRINTF@
-REPLACE_FPURGE = @REPLACE_FPURGE@
-REPLACE_FREOPEN = @REPLACE_FREOPEN@
-REPLACE_FSEEK = @REPLACE_FSEEK@
-REPLACE_FSEEKO = @REPLACE_FSEEKO@
-REPLACE_FSTAT = @REPLACE_FSTAT@
-REPLACE_FSTATAT = @REPLACE_FSTATAT@
-REPLACE_FTELL = @REPLACE_FTELL@
-REPLACE_FTELLO = @REPLACE_FTELLO@
-REPLACE_FTRUNCATE = @REPLACE_FTRUNCATE@
-REPLACE_FUTIMENS = @REPLACE_FUTIMENS@
-REPLACE_GETCWD = @REPLACE_GETCWD@
-REPLACE_GETDELIM = @REPLACE_GETDELIM@
-REPLACE_GETDOMAINNAME = @REPLACE_GETDOMAINNAME@
-REPLACE_GETGROUPS = @REPLACE_GETGROUPS@
-REPLACE_GETLINE = @REPLACE_GETLINE@
-REPLACE_GETLOGIN_R = @REPLACE_GETLOGIN_R@
-REPLACE_GETPAGESIZE = @REPLACE_GETPAGESIZE@
-REPLACE_GETTIMEOFDAY = @REPLACE_GETTIMEOFDAY@
-REPLACE_ISATTY = @REPLACE_ISATTY@
-REPLACE_ISWBLANK = @REPLACE_ISWBLANK@
-REPLACE_ISWCNTRL = @REPLACE_ISWCNTRL@
-REPLACE_LCHOWN = @REPLACE_LCHOWN@
-REPLACE_LINK = @REPLACE_LINK@
-REPLACE_LINKAT = @REPLACE_LINKAT@
-REPLACE_LOCALECONV = @REPLACE_LOCALECONV@
-REPLACE_LOCALTIME_R = @REPLACE_LOCALTIME_R@
-REPLACE_LSEEK = @REPLACE_LSEEK@
-REPLACE_LSTAT = @REPLACE_LSTAT@
-REPLACE_MALLOC = @REPLACE_MALLOC@
-REPLACE_MBRLEN = @REPLACE_MBRLEN@
-REPLACE_MBRTOWC = @REPLACE_MBRTOWC@
-REPLACE_MBSINIT = @REPLACE_MBSINIT@
-REPLACE_MBSNRTOWCS = @REPLACE_MBSNRTOWCS@
-REPLACE_MBSRTOWCS = @REPLACE_MBSRTOWCS@
-REPLACE_MBSTATE_T = @REPLACE_MBSTATE_T@
-REPLACE_MBTOWC = @REPLACE_MBTOWC@
-REPLACE_MEMCHR = @REPLACE_MEMCHR@
-REPLACE_MEMMEM = @REPLACE_MEMMEM@
-REPLACE_MKDIR = @REPLACE_MKDIR@
-REPLACE_MKFIFO = @REPLACE_MKFIFO@
-REPLACE_MKNOD = @REPLACE_MKNOD@
-REPLACE_MKSTEMP = @REPLACE_MKSTEMP@
-REPLACE_MKTIME = @REPLACE_MKTIME@
-REPLACE_NANOSLEEP = @REPLACE_NANOSLEEP@
-REPLACE_NL_LANGINFO = @REPLACE_NL_LANGINFO@
-REPLACE_NULL = @REPLACE_NULL@
-REPLACE_OBSTACK_PRINTF = @REPLACE_OBSTACK_PRINTF@
-REPLACE_OPEN = @REPLACE_OPEN@
-REPLACE_OPENAT = @REPLACE_OPENAT@
-REPLACE_PERROR = @REPLACE_PERROR@
-REPLACE_POPEN = @REPLACE_POPEN@
-REPLACE_PREAD = @REPLACE_PREAD@
-REPLACE_PRINTF = @REPLACE_PRINTF@
-REPLACE_PTSNAME = @REPLACE_PTSNAME@
-REPLACE_PTSNAME_R = @REPLACE_PTSNAME_R@
-REPLACE_PUTENV = @REPLACE_PUTENV@
-REPLACE_PWRITE = @REPLACE_PWRITE@
-REPLACE_RANDOM_R = @REPLACE_RANDOM_R@
-REPLACE_READ = @REPLACE_READ@
-REPLACE_READLINK = @REPLACE_READLINK@
-REPLACE_REALLOC = @REPLACE_REALLOC@
-REPLACE_REALPATH = @REPLACE_REALPATH@
-REPLACE_REMOVE = @REPLACE_REMOVE@
-REPLACE_RENAME = @REPLACE_RENAME@
-REPLACE_RENAMEAT = @REPLACE_RENAMEAT@
-REPLACE_RMDIR = @REPLACE_RMDIR@
-REPLACE_SETENV = @REPLACE_SETENV@
-REPLACE_SETLOCALE = @REPLACE_SETLOCALE@
-REPLACE_SLEEP = @REPLACE_SLEEP@
-REPLACE_SNPRINTF = @REPLACE_SNPRINTF@
-REPLACE_SPRINTF = @REPLACE_SPRINTF@
-REPLACE_STAT = @REPLACE_STAT@
-REPLACE_STDIO_READ_FUNCS = @REPLACE_STDIO_READ_FUNCS@
-REPLACE_STDIO_WRITE_FUNCS = @REPLACE_STDIO_WRITE_FUNCS@
-REPLACE_STPNCPY = @REPLACE_STPNCPY@
-REPLACE_STRCASESTR = @REPLACE_STRCASESTR@
-REPLACE_STRCHRNUL = @REPLACE_STRCHRNUL@
-REPLACE_STRDUP = @REPLACE_STRDUP@
-REPLACE_STRERROR = @REPLACE_STRERROR@
-REPLACE_STRERROR_R = @REPLACE_STRERROR_R@
-REPLACE_STRNCAT = @REPLACE_STRNCAT@
-REPLACE_STRNDUP = @REPLACE_STRNDUP@
-REPLACE_STRNLEN = @REPLACE_STRNLEN@
-REPLACE_STRSIGNAL = @REPLACE_STRSIGNAL@
-REPLACE_STRSTR = @REPLACE_STRSTR@
-REPLACE_STRTOD = @REPLACE_STRTOD@
-REPLACE_STRTOK_R = @REPLACE_STRTOK_R@
-REPLACE_STRUCT_LCONV = @REPLACE_STRUCT_LCONV@
-REPLACE_STRUCT_TIMEVAL = @REPLACE_STRUCT_TIMEVAL@
-REPLACE_SYMLINK = @REPLACE_SYMLINK@
-REPLACE_TIMEGM = @REPLACE_TIMEGM@
-REPLACE_TMPFILE = @REPLACE_TMPFILE@
-REPLACE_TOWLOWER = @REPLACE_TOWLOWER@
-REPLACE_TTYNAME_R = @REPLACE_TTYNAME_R@
-REPLACE_UNLINK = @REPLACE_UNLINK@
-REPLACE_UNLINKAT = @REPLACE_UNLINKAT@
-REPLACE_UNSETENV = @REPLACE_UNSETENV@
-REPLACE_USLEEP = @REPLACE_USLEEP@
-REPLACE_UTIMENSAT = @REPLACE_UTIMENSAT@
-REPLACE_VASPRINTF = @REPLACE_VASPRINTF@
-REPLACE_VDPRINTF = @REPLACE_VDPRINTF@
-REPLACE_VFPRINTF = @REPLACE_VFPRINTF@
-REPLACE_VPRINTF = @REPLACE_VPRINTF@
-REPLACE_VSNPRINTF = @REPLACE_VSNPRINTF@
-REPLACE_VSPRINTF = @REPLACE_VSPRINTF@
-REPLACE_WCRTOMB = @REPLACE_WCRTOMB@
-REPLACE_WCSNRTOMBS = @REPLACE_WCSNRTOMBS@
-REPLACE_WCSRTOMBS = @REPLACE_WCSRTOMBS@
-REPLACE_WCSWIDTH = @REPLACE_WCSWIDTH@
-REPLACE_WCTOB = @REPLACE_WCTOB@
-REPLACE_WCTOMB = @REPLACE_WCTOMB@
-REPLACE_WCWIDTH = @REPLACE_WCWIDTH@
-REPLACE_WRITE = @REPLACE_WRITE@
-SED_FEATURE_VERSION = @SED_FEATURE_VERSION@
-SELINUX_CONTEXT_H = @SELINUX_CONTEXT_H@
-SET_MAKE = @SET_MAKE@
-SHELL = @SHELL@
-SIG_ATOMIC_T_SUFFIX = @SIG_ATOMIC_T_SUFFIX@
-SIZE_T_SUFFIX = @SIZE_T_SUFFIX@
-STDARG_H = @STDARG_H@
-STDBOOL_H = @STDBOOL_H@
-STDDEF_H = @STDDEF_H@
-STDINT_H = @STDINT_H@
-STRIP = @STRIP@
-SYS_TIME_H_DEFINES_STRUCT_TIMESPEC = @SYS_TIME_H_DEFINES_STRUCT_TIMESPEC@
-TIME_H_DEFINES_STRUCT_TIMESPEC = @TIME_H_DEFINES_STRUCT_TIMESPEC@
-UNDEFINE_STRTOK_R = @UNDEFINE_STRTOK_R@
-UNISTD_H_HAVE_WINSOCK2_H = @UNISTD_H_HAVE_WINSOCK2_H@
-UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS = @UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS@
-USE_ACL = @USE_ACL@
-USE_NLS = @USE_NLS@
-VERSION = @VERSION@
-WCHAR_T_SUFFIX = @WCHAR_T_SUFFIX@
-WINDOWS_64_BIT_OFF_T = @WINDOWS_64_BIT_OFF_T@
-WINDOWS_64_BIT_ST_SIZE = @WINDOWS_64_BIT_ST_SIZE@
-WINT_T_SUFFIX = @WINT_T_SUFFIX@
-XFAIL_TESTS = @XFAIL_TESTS@
-XGETTEXT = @XGETTEXT@
-XGETTEXT_015 = @XGETTEXT_015@
-XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@
-abs_builddir = @abs_builddir@
-abs_srcdir = @abs_srcdir@
-abs_top_builddir = @abs_top_builddir@
-abs_top_srcdir = @abs_top_srcdir@
-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@
-bindir = @bindir@
-build = @build@
-build_alias = @build_alias@
-build_cpu = @build_cpu@
-build_os = @build_os@
-build_vendor = @build_vendor@
-builddir = @builddir@
-datadir = @datadir@
-datarootdir = @datarootdir@
-docdir = @docdir@
-dvidir = @dvidir@
-exec_prefix = @exec_prefix@
-gl_LIBOBJS = @gl_LIBOBJS@
-gl_LTLIBOBJS = @gl_LTLIBOBJS@
-gltests_LIBOBJS = @gltests_LIBOBJS@
-gltests_LTLIBOBJS = @gltests_LTLIBOBJS@
-gltests_WITNESS = @gltests_WITNESS@
-host = @host@
-host_alias = @host_alias@
-host_cpu = @host_cpu@
-host_os = @host_os@
-host_vendor = @host_vendor@
-htmldir = @htmldir@
-includedir = @includedir@
-infodir = @infodir@
-install_sh = @install_sh@
-libdir = @libdir@
-libexecdir = @libexecdir@
-lispdir = @lispdir@
-localedir = @localedir@
-localstatedir = @localstatedir@
-mandir = @mandir@
-mkdir_p = @mkdir_p@
-oldincludedir = @oldincludedir@
-pdfdir = @pdfdir@
-prefix = @prefix@
-program_transform_name = @program_transform_name@
-psdir = @psdir@
-sbindir = @sbindir@
-sharedstatedir = @sharedstatedir@
-srcdir = @srcdir@
-sysconfdir = @sysconfdir@
-target_alias = @target_alias@
-top_build_prefix = @top_build_prefix@
-top_builddir = @top_builddir@
-top_srcdir = @top_srcdir@
-CLEANFILES = tmp* core *.core $(EXTRA_PROGRAMS) *.*out *.log eval.in2
-TESTS = $(check_PROGRAMS) $(SEDTESTS)
-SEDTESTS = $(am__append_1) appquit enable sep inclib 8bit newjis xabcx \
- dollar noeol noeolw modulo numsub numsub2 numsub3 numsub4 \
- numsub5 0range bkslashes head madding mac-mf empty xbxcx \
- xbxcx3 recall recall2 xemacs fasts uniq manis khadafy linecnt \
- eval distrib 8to7 y-bracket y-newline allsub cv-vars classes \
- middle bsd stdin flipcase insens subwrite writeout readin \
- insert utf8-1 utf8-2 utf8-3 utf8-4 badenc inplace-hold \
- brackets amp-escape help version file quiet factor binary3 \
- binary2 binary dc
-LDADD = ../lib/libsed.a @INTLLIBS@
-noinst_HEADERS = testcases.h ptestcases.h
-AM_CPPFLAGS = -I$(top_srcdir)/lib -I$(top_builddir)/lib
-TESTS_ENVIRONMENT = MAKE="$(MAKE)" VERSION="$(VERSION)" \
- @LOCALCHARSET_TESTS_ENVIRONMENT@ $(srcdir)/runtest
-
-EXTRA_DIST = \
- PCRE.tests BOOST.tests SPENCER.tests \
- runtest Makefile.tests \
- 0range.good 0range.inp 0range.sed \
- 8bit.good 8bit.inp 8bit.sed \
- 8to7.good 8to7.inp 8to7.sed \
- allsub.good allsub.inp allsub.sed \
- amp-escape.good amp-escape.inp amp-escape.sed \
- appquit.good appquit.inp appquit.sed \
- binary.good binary.inp binary.sed binary2.sed binary3.sed \
- bkslashes.good bkslashes.inp bkslashes.sed \
- brackets.good brackets.inp brackets.sed \
- bsd.good bsd.sh \
- cv-vars.good cv-vars.inp cv-vars.sed \
- classes.good classes.inp classes.sed \
- dc.good dc.inp dc.sed \
- distrib.good distrib.inp distrib.sed distrib.sh \
- dollar.good dollar.inp dollar.sed \
- empty.good empty.inp empty.sed \
- enable.good enable.inp enable.sed \
- eval.good eval.inp eval.sed \
- factor.good factor.inp factor.sed \
- fasts.good fasts.inp fasts.sed \
- flipcase.good flipcase.inp flipcase.sed \
- head.good head.inp head.sed \
- inclib.good inclib.inp inclib.sed \
- insens.good insens.inp insens.sed \
- insert.good insert.inp insert.sed \
- khadafy.good khadafy.inp khadafy.sed \
- linecnt.good linecnt.inp linecnt.sed \
- space.good space.inp space.sed \
- mac-mf.good mac-mf.inp mac-mf.sed \
- madding.good madding.inp madding.sed \
- manis.good manis.inp manis.sed \
- middle.good middle.sed middle.inp \
- modulo.good modulo.sed modulo.inp \
- newjis.good newjis.inp newjis.sed \
- noeol.good noeol.inp noeol.sed \
- noeolw.good noeolw.1good noeolw.2good noeolw.sed \
- numsub.good numsub.inp numsub.sed \
- numsub2.good numsub2.inp numsub2.sed \
- numsub3.good numsub3.inp numsub3.sed \
- numsub4.good numsub4.inp numsub4.sed \
- numsub5.good numsub5.inp numsub5.sed \
- readin.good readin.inp readin.sed \
- recall.good recall.inp recall.sed \
- recall2.good recall2.inp recall2.sed \
- sep.good sep.inp sep.sed \
- subwrite.inp subwrite.sed subwrt1.good subwrt2.good \
- uniq.good uniq.inp uniq.sed \
- utf8-1.good utf8-1.inp utf8-1.sed \
- utf8-2.good utf8-2.inp utf8-2.sed \
- utf8-3.good utf8-3.inp utf8-3.sed \
- utf8-4.good utf8-4.inp utf8-4.sed \
- badenc.good badenc.inp badenc.sed \
- version.gin \
- writeout.inp writeout.sed wrtout1.good wrtout2.good \
- xabcx.good xabcx.inp xabcx.sed \
- xbxcx.good xbxcx.inp xbxcx.sed \
- xbxcx3.good xbxcx3.inp xbxcx3.sed \
- xemacs.good xemacs.inp xemacs.sed \
- y-bracket.good y-bracket.sed y-bracket.inp \
- y-newline.good y-newline.sed y-newline.inp
-
-all: all-am
-
-.SUFFIXES:
-.SUFFIXES: .c .o .obj
-$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
- @for dep in $?; do \
- case '$(am__configure_deps)' in \
- *$$dep*) \
- ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
- && { if test -f $@; then exit 0; else break; fi; }; \
- exit 1;; \
- esac; \
- done; \
- echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnits testsuite/Makefile'; \
- $(am__cd) $(top_srcdir) && \
- $(AUTOMAKE) --gnits testsuite/Makefile
-.PRECIOUS: Makefile
-Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
- @case '$?' in \
- *config.status*) \
- cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
- *) \
- echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
- cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
- esac;
-
-$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
- cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
-
-$(top_srcdir)/configure: $(am__configure_deps)
- cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
-$(ACLOCAL_M4): $(am__aclocal_m4_deps)
- cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
-$(am__aclocal_m4_deps):
-version.good: $(top_builddir)/config.status $(srcdir)/version.gin
- cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
-
-clean-checkPROGRAMS:
- -test -z "$(check_PROGRAMS)" || rm -f $(check_PROGRAMS)
-bug-regex10$(EXEEXT): $(bug_regex10_OBJECTS) $(bug_regex10_DEPENDENCIES) $(EXTRA_bug_regex10_DEPENDENCIES)
- @rm -f bug-regex10$(EXEEXT)
- $(LINK) $(bug_regex10_OBJECTS) $(bug_regex10_LDADD) $(LIBS)
-bug-regex11$(EXEEXT): $(bug_regex11_OBJECTS) $(bug_regex11_DEPENDENCIES) $(EXTRA_bug_regex11_DEPENDENCIES)
- @rm -f bug-regex11$(EXEEXT)
- $(LINK) $(bug_regex11_OBJECTS) $(bug_regex11_LDADD) $(LIBS)
-bug-regex12$(EXEEXT): $(bug_regex12_OBJECTS) $(bug_regex12_DEPENDENCIES) $(EXTRA_bug_regex12_DEPENDENCIES)
- @rm -f bug-regex12$(EXEEXT)
- $(LINK) $(bug_regex12_OBJECTS) $(bug_regex12_LDADD) $(LIBS)
-bug-regex13$(EXEEXT): $(bug_regex13_OBJECTS) $(bug_regex13_DEPENDENCIES) $(EXTRA_bug_regex13_DEPENDENCIES)
- @rm -f bug-regex13$(EXEEXT)
- $(LINK) $(bug_regex13_OBJECTS) $(bug_regex13_LDADD) $(LIBS)
-bug-regex14$(EXEEXT): $(bug_regex14_OBJECTS) $(bug_regex14_DEPENDENCIES) $(EXTRA_bug_regex14_DEPENDENCIES)
- @rm -f bug-regex14$(EXEEXT)
- $(LINK) $(bug_regex14_OBJECTS) $(bug_regex14_LDADD) $(LIBS)
-bug-regex15$(EXEEXT): $(bug_regex15_OBJECTS) $(bug_regex15_DEPENDENCIES) $(EXTRA_bug_regex15_DEPENDENCIES)
- @rm -f bug-regex15$(EXEEXT)
- $(LINK) $(bug_regex15_OBJECTS) $(bug_regex15_LDADD) $(LIBS)
-bug-regex16$(EXEEXT): $(bug_regex16_OBJECTS) $(bug_regex16_DEPENDENCIES) $(EXTRA_bug_regex16_DEPENDENCIES)
- @rm -f bug-regex16$(EXEEXT)
- $(LINK) $(bug_regex16_OBJECTS) $(bug_regex16_LDADD) $(LIBS)
-bug-regex21$(EXEEXT): $(bug_regex21_OBJECTS) $(bug_regex21_DEPENDENCIES) $(EXTRA_bug_regex21_DEPENDENCIES)
- @rm -f bug-regex21$(EXEEXT)
- $(LINK) $(bug_regex21_OBJECTS) $(bug_regex21_LDADD) $(LIBS)
-bug-regex27$(EXEEXT): $(bug_regex27_OBJECTS) $(bug_regex27_DEPENDENCIES) $(EXTRA_bug_regex27_DEPENDENCIES)
- @rm -f bug-regex27$(EXEEXT)
- $(LINK) $(bug_regex27_OBJECTS) $(bug_regex27_LDADD) $(LIBS)
-bug-regex28$(EXEEXT): $(bug_regex28_OBJECTS) $(bug_regex28_DEPENDENCIES) $(EXTRA_bug_regex28_DEPENDENCIES)
- @rm -f bug-regex28$(EXEEXT)
- $(LINK) $(bug_regex28_OBJECTS) $(bug_regex28_LDADD) $(LIBS)
-bug-regex7$(EXEEXT): $(bug_regex7_OBJECTS) $(bug_regex7_DEPENDENCIES) $(EXTRA_bug_regex7_DEPENDENCIES)
- @rm -f bug-regex7$(EXEEXT)
- $(LINK) $(bug_regex7_OBJECTS) $(bug_regex7_LDADD) $(LIBS)
-bug-regex8$(EXEEXT): $(bug_regex8_OBJECTS) $(bug_regex8_DEPENDENCIES) $(EXTRA_bug_regex8_DEPENDENCIES)
- @rm -f bug-regex8$(EXEEXT)
- $(LINK) $(bug_regex8_OBJECTS) $(bug_regex8_LDADD) $(LIBS)
-bug-regex9$(EXEEXT): $(bug_regex9_OBJECTS) $(bug_regex9_DEPENDENCIES) $(EXTRA_bug_regex9_DEPENDENCIES)
- @rm -f bug-regex9$(EXEEXT)
- $(LINK) $(bug_regex9_OBJECTS) $(bug_regex9_LDADD) $(LIBS)
-runptests$(EXEEXT): $(runptests_OBJECTS) $(runptests_DEPENDENCIES) $(EXTRA_runptests_DEPENDENCIES)
- @rm -f runptests$(EXEEXT)
- $(LINK) $(runptests_OBJECTS) $(runptests_LDADD) $(LIBS)
-runtests$(EXEEXT): $(runtests_OBJECTS) $(runtests_DEPENDENCIES) $(EXTRA_runtests_DEPENDENCIES)
- @rm -f runtests$(EXEEXT)
- $(LINK) $(runtests_OBJECTS) $(runtests_LDADD) $(LIBS)
-tst-boost$(EXEEXT): $(tst_boost_OBJECTS) $(tst_boost_DEPENDENCIES) $(EXTRA_tst_boost_DEPENDENCIES)
- @rm -f tst-boost$(EXEEXT)
- $(LINK) $(tst_boost_OBJECTS) $(tst_boost_LDADD) $(LIBS)
-tst-pcre$(EXEEXT): $(tst_pcre_OBJECTS) $(tst_pcre_DEPENDENCIES) $(EXTRA_tst_pcre_DEPENDENCIES)
- @rm -f tst-pcre$(EXEEXT)
- $(LINK) $(tst_pcre_OBJECTS) $(tst_pcre_LDADD) $(LIBS)
-tst-regex2$(EXEEXT): $(tst_regex2_OBJECTS) $(tst_regex2_DEPENDENCIES) $(EXTRA_tst_regex2_DEPENDENCIES)
- @rm -f tst-regex2$(EXEEXT)
- $(LINK) $(tst_regex2_OBJECTS) $(tst_regex2_LDADD) $(LIBS)
-tst-rxspencer$(EXEEXT): $(tst_rxspencer_OBJECTS) $(tst_rxspencer_DEPENDENCIES) $(EXTRA_tst_rxspencer_DEPENDENCIES)
- @rm -f tst-rxspencer$(EXEEXT)
- $(LINK) $(tst_rxspencer_OBJECTS) $(tst_rxspencer_LDADD) $(LIBS)
-
-mostlyclean-compile:
- -rm -f *.$(OBJEXT)
-
-distclean-compile:
- -rm -f *.tab.c
-
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bug-regex10.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bug-regex11.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bug-regex12.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bug-regex13.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bug-regex14.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bug-regex15.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bug-regex16.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bug-regex21.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bug-regex27.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bug-regex28.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bug-regex7.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bug-regex8.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bug-regex9.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/runptests.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/runtests.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tst-boost.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tst-pcre.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tst-regex2.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tst-rxspencer.Po@am__quote@
-
-.c.o:
-@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
-@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(COMPILE) -c $<
-
-.c.obj:
-@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
-@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'`
-
-ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
- list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
- unique=`for i in $$list; do \
- if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
- done | \
- $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
- END { if (nonempty) { for (i in files) print i; }; }'`; \
- mkid -fID $$unique
-tags: TAGS
-
-TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
- $(TAGS_FILES) $(LISP)
- set x; \
- here=`pwd`; \
- list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
- unique=`for i in $$list; do \
- if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
- done | \
- $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
- END { if (nonempty) { for (i in files) print i; }; }'`; \
- shift; \
- if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
- test -n "$$unique" || unique=$$empty_fix; \
- if test $$# -gt 0; then \
- $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
- "$$@" $$unique; \
- else \
- $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
- $$unique; \
- fi; \
- fi
-ctags: CTAGS
-CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
- $(TAGS_FILES) $(LISP)
- list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
- unique=`for i in $$list; do \
- if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
- done | \
- $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
- END { if (nonempty) { for (i in files) print i; }; }'`; \
- test -z "$(CTAGS_ARGS)$$unique" \
- || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
- $$unique
-
-GTAGS:
- here=`$(am__cd) $(top_builddir) && pwd` \
- && $(am__cd) $(top_srcdir) \
- && gtags -i $(GTAGS_ARGS) "$$here"
-
-cscopelist: $(HEADERS) $(SOURCES) $(LISP)
- list='$(SOURCES) $(HEADERS) $(LISP)'; \
- case "$(srcdir)" in \
- [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \
- *) sdir=$(subdir)/$(srcdir) ;; \
- esac; \
- for i in $$list; do \
- if test -f "$$i"; then \
- echo "$(subdir)/$$i"; \
- else \
- echo "$$sdir/$$i"; \
- fi; \
- done >> $(top_builddir)/cscope.files
-
-distclean-tags:
- -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
-
-check-TESTS: $(TESTS)
- @failed=0; all=0; xfail=0; xpass=0; skip=0; \
- srcdir=$(srcdir); export srcdir; \
- list=' $(TESTS) '; \
- $(am__tty_colors); \
- if test -n "$$list"; then \
- for tst in $$list; do \
- if test -f ./$$tst; then dir=./; \
- elif test -f $$tst; then dir=; \
- else dir="$(srcdir)/"; fi; \
- if $(TESTS_ENVIRONMENT) $${dir}$$tst $(AM_TESTS_FD_REDIRECT); then \
- all=`expr $$all + 1`; \
- case " $(XFAIL_TESTS) " in \
- *[\ \ ]$$tst[\ \ ]*) \
- xpass=`expr $$xpass + 1`; \
- failed=`expr $$failed + 1`; \
- col=$$red; res=XPASS; \
- ;; \
- *) \
- col=$$grn; res=PASS; \
- ;; \
- esac; \
- elif test $$? -ne 77; then \
- all=`expr $$all + 1`; \
- case " $(XFAIL_TESTS) " in \
- *[\ \ ]$$tst[\ \ ]*) \
- xfail=`expr $$xfail + 1`; \
- col=$$lgn; res=XFAIL; \
- ;; \
- *) \
- failed=`expr $$failed + 1`; \
- col=$$red; res=FAIL; \
- ;; \
- esac; \
- else \
- skip=`expr $$skip + 1`; \
- col=$$blu; res=SKIP; \
- fi; \
- echo "$${col}$$res$${std}: $$tst"; \
- done; \
- if test "$$all" -eq 1; then \
- tests="test"; \
- All=""; \
- else \
- tests="tests"; \
- All="All "; \
- fi; \
- if test "$$failed" -eq 0; then \
- if test "$$xfail" -eq 0; then \
- banner="$$All$$all $$tests passed"; \
- else \
- if test "$$xfail" -eq 1; then failures=failure; else failures=failures; fi; \
- banner="$$All$$all $$tests behaved as expected ($$xfail expected $$failures)"; \
- fi; \
- else \
- if test "$$xpass" -eq 0; then \
- banner="$$failed of $$all $$tests failed"; \
- else \
- if test "$$xpass" -eq 1; then passes=pass; else passes=passes; fi; \
- banner="$$failed of $$all $$tests did not behave as expected ($$xpass unexpected $$passes)"; \
- fi; \
- fi; \
- dashes="$$banner"; \
- skipped=""; \
- if test "$$skip" -ne 0; then \
- if test "$$skip" -eq 1; then \
- skipped="($$skip test was not run)"; \
- else \
- skipped="($$skip tests were not run)"; \
- fi; \
- test `echo "$$skipped" | wc -c` -le `echo "$$banner" | wc -c` || \
- dashes="$$skipped"; \
- fi; \
- report=""; \
- if test "$$failed" -ne 0 && test -n "$(PACKAGE_BUGREPORT)"; then \
- report="Please report to $(PACKAGE_BUGREPORT)"; \
- test `echo "$$report" | wc -c` -le `echo "$$banner" | wc -c` || \
- dashes="$$report"; \
- fi; \
- dashes=`echo "$$dashes" | sed s/./=/g`; \
- if test "$$failed" -eq 0; then \
- col="$$grn"; \
- else \
- col="$$red"; \
- fi; \
- echo "$${col}$$dashes$${std}"; \
- echo "$${col}$$banner$${std}"; \
- test -z "$$skipped" || echo "$${col}$$skipped$${std}"; \
- test -z "$$report" || echo "$${col}$$report$${std}"; \
- echo "$${col}$$dashes$${std}"; \
- test "$$failed" -eq 0; \
- else :; fi
-
-distdir: $(DISTFILES)
- @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
- topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
- list='$(DISTFILES)'; \
- dist_files=`for file in $$list; do echo $$file; done | \
- sed -e "s|^$$srcdirstrip/||;t" \
- -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
- case $$dist_files in \
- */*) $(MKDIR_P) `echo "$$dist_files" | \
- sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
- sort -u` ;; \
- esac; \
- for file in $$dist_files; do \
- if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
- if test -d $$d/$$file; then \
- dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
- if test -d "$(distdir)/$$file"; then \
- find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
- fi; \
- if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
- cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
- find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
- fi; \
- cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
- else \
- test -f "$(distdir)/$$file" \
- || cp -p $$d/$$file "$(distdir)/$$file" \
- || exit 1; \
- fi; \
- done
-check-am: all-am
- $(MAKE) $(AM_MAKEFLAGS) $(check_PROGRAMS)
- $(MAKE) $(AM_MAKEFLAGS) check-TESTS
-check: check-am
-all-am: Makefile $(HEADERS)
-installdirs:
-install: install-am
-install-exec: install-exec-am
-install-data: install-data-am
-uninstall: uninstall-am
-
-install-am: all-am
- @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
-
-installcheck: installcheck-am
-install-strip:
- if test -z '$(STRIP)'; then \
- $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
- install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
- install; \
- else \
- $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
- install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
- "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
- fi
-mostlyclean-generic:
-
-clean-generic:
- -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
-
-distclean-generic:
- -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
- -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
-
-maintainer-clean-generic:
- @echo "This command is intended for maintainers to use"
- @echo "it deletes files that may require special tools to rebuild."
-clean: clean-am
-
-clean-am: clean-checkPROGRAMS clean-generic mostlyclean-am
-
-distclean: distclean-am
- -rm -rf ./$(DEPDIR)
- -rm -f Makefile
-distclean-am: clean-am distclean-compile distclean-generic \
- distclean-tags
-
-dvi: dvi-am
-
-dvi-am:
-
-html: html-am
-
-html-am:
-
-info: info-am
-
-info-am:
-
-install-data-am:
-
-install-dvi: install-dvi-am
-
-install-dvi-am:
-
-install-exec-am:
-
-install-html: install-html-am
-
-install-html-am:
-
-install-info: install-info-am
-
-install-info-am:
-
-install-man:
-
-install-pdf: install-pdf-am
-
-install-pdf-am:
-
-install-ps: install-ps-am
-
-install-ps-am:
-
-installcheck-am:
-
-maintainer-clean: maintainer-clean-am
- -rm -rf ./$(DEPDIR)
- -rm -f Makefile
-maintainer-clean-am: distclean-am maintainer-clean-generic
-
-mostlyclean: mostlyclean-am
-
-mostlyclean-am: mostlyclean-compile mostlyclean-generic
-
-pdf: pdf-am
-
-pdf-am:
-
-ps: ps-am
-
-ps-am:
-
-uninstall-am:
-
-.MAKE: check-am install-am install-strip
-
-.PHONY: CTAGS GTAGS all all-am check check-TESTS check-am clean \
- clean-checkPROGRAMS clean-generic cscopelist ctags distclean \
- distclean-compile distclean-generic distclean-tags distdir dvi \
- dvi-am html html-am info info-am install install-am \
- install-data install-data-am install-dvi install-dvi-am \
- install-exec install-exec-am install-html install-html-am \
- install-info install-info-am install-man install-pdf \
- install-pdf-am install-ps install-ps-am install-strip \
- installcheck installcheck-am installdirs maintainer-clean \
- maintainer-clean-generic mostlyclean mostlyclean-compile \
- mostlyclean-generic pdf pdf-am ps ps-am tags uninstall \
- uninstall-am
-
-
-# automake makes `check' depend on $(TESTS). Declare
-# dummy targets for $(TESTS) so that make does not complain.
-
-.PHONY: $(SEDTESTS)
-$(SEDTESTS):
-
-# 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/testsuite/Makefile.tests b/testsuite/Makefile.tests
index 7aaf622..00a4ec8 100644
--- a/testsuite/Makefile.tests
+++ b/testsuite/Makefile.tests
@@ -4,7 +4,7 @@ SHELL = /bin/sh
# These are only fallback values. They are usually overridden by runtest.
srcdir = .
-SED = ../sed/sed
+SED = ./sed/sed
TIME=
#TIME=time
@@ -15,48 +15,55 @@ 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 insert brackets amp-escape::
+y-bracket y-newline y-zero insert brackets amp-escape newline-anchor::
$(SEDENV) $(SED) -f $(srcdir)/$@.sed \
- < $(srcdir)/$@.inp | $(TR) -d \\r > $@.out
- $(CMP) $(srcdir)/$@.good $@.out
- @$(RM) $@.out
+ < $(srcdir)/$@.inp | $(elide_cr) > $@.out
+ $(CMP) $(srcdir)/$@.good $@.out
+ @$(RM) $@.out
0range::
$(SEDENV) $(SED) -s -f $(srcdir)/$@.sed \
- < $(srcdir)/$@.inp | $(TR) -d \\r > $@.out
- $(CMP) $(srcdir)/$@.good $@.out
- @$(RM) $@.out
+ < $(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 | $(TR) -d \\r > $@.out
- $(CMP) $(srcdir)/$@.good $@.out
+ < $(srcdir)/$@.inp | $(elide_cr) > $@.out
+ $(CMP) $(srcdir)/$@.good $@.out
LC_ALL=it_IT.UTF-8 $(TIME) $(SED) -nf $(srcdir)/$@.sed \
- < $(srcdir)/$@.inp | $(TR) -d \\r > $@.out
- $(CMP) $(srcdir)/$@.good $@.out
+ < $(srcdir)/$@.inp | $(elide_cr) > $@.out
+ $(CMP) $(srcdir)/$@.good $@.out
LC_ALL=en_US.UTF-8 $(TIME) $(SED) -nf $(srcdir)/$@.sed \
- < $(srcdir)/$@.inp | $(TR) -d \\r > $@.out
- $(CMP) $(srcdir)/$@.good $@.out
+ < $(srcdir)/$@.inp | $(elide_cr) > $@.out
+ $(CMP) $(srcdir)/$@.good $@.out
LC_ALL=en_GB.UTF-8 $(TIME) $(SED) -nf $(srcdir)/$@.sed \
- < $(srcdir)/$@.inp | $(TR) -d \\r > $@.out
- $(CMP) $(srcdir)/$@.good $@.out
- @$(RM) $@.out
+ < $(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 | $(TR) -d \\r > $@.out"; \
+ "< $(srcdir)/$@.inp | $(elide_cr) > $@.out"; \
LC_ALL=ru_RU.UTF-8 \
$(TIME) $(SED) -f $(srcdir)/$@.sed \
- < $(srcdir)/$@.inp | $(TR) -d \\r > $@.out; \
+ < $(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); }; \
@@ -64,9 +71,9 @@ utf8-1 utf8-2 utf8-3 utf8-4::
case "$$LC_CTYPE" in \
*UTF-8 | *UTF8 | *utf8 | *utf-8) \
echo "$(TIME) $(SED) -f $(srcdir)/$@.sed" \
- " < $(srcdir)/$@.inp | $(TR) -d \\r > $@.out"; \
+ " < $(srcdir)/$@.inp | $(elide_cr) > $@.out"; \
$(TIME) $(SED) -f $(srcdir)/$@.sed \
- < $(srcdir)/$@.inp | $(TR) -d \\r > $@.out; \
+ < $(srcdir)/$@.inp | $(elide_cr) > $@.out; \
$(CMP) $(srcdir)/$@.good $@.out && exit 0; \
$(CMP) $(srcdir)/$@.inp $@.out || exit 1 ;; \
*) ;; \
@@ -76,60 +83,60 @@ utf8-1 utf8-2 utf8-3 utf8-4::
# This checks for a bug in 3.02 and 3.02.80
stdin::
($(SEDENV) $(SED) d; $(SEDENV) $(SED) G) < $(srcdir)/numsub.inp \
- | $(TR) -d \\r > $@.1out
+ | $(elide_cr) > $@.1out
$(SEDENV) cat $(srcdir)/numsub.inp \
- | ($(SEDENV) $(SED) d; $(SEDENV) $(SED) G) | $(TR) -d \\r > $@.2out
- $(CMP) $@.1out $@.2out
- @$(RM) $@.1out $@.2out
+ | ($(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
+ $(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 | $(TR) -d \\r > $@.out
- $(CMP) $(srcdir)/$@.good $@.out
- @$(RM) $@.out
+ < $(srcdir)/$@.inp | $(elide_cr) > $@.out
+ $(CMP) $(srcdir)/$@.good $@.out
+ @$(RM) $@.out
noeolw::
$(SEDENV) $(SED) -n -f $(srcdir)/$@.sed \
- $(srcdir)/noeol.inp $(srcdir)/noeol.inp | $(TR) -d \\r > $@.out
- $(CMP) $(srcdir)/$@.good $@.out
- $(TR) -d \\r < $@.1out | $(CMP) $(srcdir)/$@.1good -
- $(TR) -d \\r < $@.2out | $(CMP) $(srcdir)/$@.2good -
+ $(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 | $(TR) -d \\r > $@.1out
+ < $(srcdir)/$@.inp | $(elide_cr) > $@.1out
$(CMP) $(srcdir)/subwrt1.good $@.1out
- $(TR) -d \\r < $@.wout | $(CMP) $(srcdir)/subwrt2.good -
+ $(elide_cr) < $@.wout | $(CMP) $(srcdir)/subwrt2.good -
@$(RM) $@.1out $@.wout
bsd::
$(SEDENV_2) sh $(srcdir)/$@.sh '$(TIME) $(SED)' $@.out
- $(TR) -d \\r < $@.out | $(CMP) $(srcdir)/$@.good -
- @$(RM) $@.out
+ $(elide_cr) < $@.out | $(CMP) $(srcdir)/$@.good -
+ @$(RM) $@.out
writeout::
$(SEDENV) $(SED) -f $(srcdir)/$@.sed \
- < $(srcdir)/$@.inp | $(TR) -d \\r > $@.1out
- $(CMP) $(srcdir)/wrtout1.good $@.1out
- $(TR) -d \\r < $@.wout | $(CMP) $(srcdir)/wrtout2.good -
+ < $(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 | $(TR) -d \\r > $@.out
- $(CMP) $(srcdir)/$@.good $@.out
+ < $(srcdir)/$@.inp | $(elide_cr) > $@.out
+ $(CMP) $(srcdir)/$@.good $@.out
@$(RM) $@.out $@.in2
eval.in2: $(srcdir)/eval.inp
@@ -137,15 +144,15 @@ eval.in2: $(srcdir)/eval.inp
eval:: eval.in2
$(SEDENV) $(SED) -f $(srcdir)/$@.sed \
- < $(srcdir)/$@.inp | $(TR) -d \\r > $@.out
- $(CMP) $(srcdir)/$@.good $@.out
- @$(RM) $@.out
+ < $(srcdir)/$@.inp | $(elide_cr) > $@.out
+ $(CMP) $(srcdir)/$@.good $@.out
+ @$(RM) $@.out
binary binary2 binary3::
$(SEDENV) $(SED) -n -f $(srcdir)/$@.sed \
- < $(srcdir)/binary.inp | $(TR) -d \\r > $@.out
- $(CMP) $(srcdir)/binary.good $@.out
- @$(RM) $@.out
+ < $(srcdir)/binary.inp | $(elide_cr) > $@.out
+ $(CMP) $(srcdir)/binary.good $@.out
+ @$(RM) $@.out
#
# cmdlines targets
@@ -153,27 +160,27 @@ binary binary2 binary3::
help::
$(SEDENV) $(SED) --help | grep E-mail > /dev/null 2>&1
- $(SEDENV) $(SED) --help | $(SEDENV) $(SED) '1s/ [^ ]* / sed /; /^E-mail/,$$d' > $@.1out
+ $(SEDENV) $(SED) --help | $(SEDENV) $(SED) '1s/ [^ ]* / sed /; /^E-mail/,$$d' > $@.1out
$(SEDENV) $(SED) 2>&1 | $(SEDENV) $(SED) '1s/ [^ ]* / sed /' > $@.2out || :
- $(CMP) $@.1out $@.2out
+ $(CMP) $@.1out $@.2out
@$(RM) $@.1out $@.2out
version::
- $(SEDENV) $(SED) --version 2>&1 | $(TR) -d \\r > $@.out
- $(CMP) $@.good $@.out
+ $(SEDENV) $(SED) --version 2>&1 | $(elide_cr) > $@.out
+ $(CMP) $@.good $@.out
@$(RM) $@.out
file::
$(SEDENV) $(SED) --file=$(srcdir)/newjis.sed \
- < $(srcdir)/newjis.inp | $(TR) -d \\r > $@.out
- $(CMP) $(srcdir)/newjis.good $@.out
- @$(RM) $@.out
+ < $(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 | $(TR) -d \\r > $@.out
- $(CMP) $(srcdir)/cv-vars.good $@.out
- @$(RM) $@.out
+ < $(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)
diff --git a/testsuite/PCRE.tests b/testsuite/PCRE.tests
index 0fb9cad..7816dce 100644
--- a/testsuite/PCRE.tests
+++ b/testsuite/PCRE.tests
@@ -552,21 +552,21 @@ No match
1: cataract
2: aract
3: ract
- 4:
+ 4:
5: 3
catatonic catatonic23
0: catatonic catatonic23
1: catatonic
2: atonic
3: tonic
- 4:
+ 4:
5: 3
caterpillar caterpillar23
0: caterpillar caterpillar23
1: caterpillar
2: erpillar
3: <unset>
- 4:
+ 4:
5: 3
@@ -578,10 +578,10 @@ No match
/^From\s+\S+\s+([a-zA-Z]{3}\s+){2}[0-9]{1,2}\s+[0-9][0-9]:[0-9][0-9]/
From abcd Mon Sep 01 12:33:02 1997
0: From abcd Mon Sep 01 12:33
- 1: Sep
+ 1: Sep
From abcd Mon Sep 1 12:33:02 1997
0: From abcd Mon Sep 1 12:33
- 1: Sep
+ 1: Sep
*** Failers
No match
From abcd Sep 01 12:33:02 1997
@@ -617,7 +617,7 @@ No match
2: bell
bell
0: bell
- 1:
+ 1:
2: bell
*** Failers
No match
@@ -633,7 +633,7 @@ No match
1: a
b
0: b
- 1:
+ 1:
*** Failers
No match
ab
@@ -645,7 +645,7 @@ No match
1: a
b
0: b
- 1:
+ 1:
*** Failers
No match
ab
@@ -664,7 +664,7 @@ No match
1: a
b
0: b
- 1:
+ 1:
*** Failers
No match
ab
@@ -781,7 +781,7 @@ No match
0: baccc
1: b
2: a
- 3:
+ 3:
4: ccc
*** Failers
0: *** Failers
@@ -799,7 +799,7 @@ No match
0: A
/[^a]/i
- Abc
+ Abc
0: b
/[^a]+/
@@ -831,7 +831,7 @@ No match
No match
akb
No match
- akk
+ akk
No match
/^[0-9]{8,}@.+[^k]$/
@@ -843,7 +843,7 @@ No match
No match
12345678@x.y.uk
No match
- 1234567@a.b.c.d
+ 1234567@a.b.c.d
No match
/(a)\1{8,}/
@@ -855,31 +855,31 @@ No match
1: a
*** Failers
No match
- aaaaaaa
+ aaaaaaa
No match
/[^a]/
aaaabcd
0: b
- aaAabcd
+ aaAabcd
0: A
/[^a]/i
aaaabcd
0: b
- aaAabcd
+ aaAabcd
0: b
/[^az]/
aaaabcd
0: b
- aaAabcd
+ aaAabcd
0: A
/[^az]/i
aaaabcd
0: b
- aaAabcd
+ aaAabcd
0: b
/P[^*]TAIRE[^*]{1,6}LL/
@@ -894,30 +894,30 @@ No match
1.230003938
0: .230003938
1: .23
- 1.875000282
+ 1.875000282
0: .875000282
1: .875
- 1.235
+ 1.235
0: .235
1: .23
-
+
/\b(foo)\s+(\w+)/i
Food is on the foo table
0: foo table
1: foo
2: table
-
+
/foo(.*)bar/
The food is under the bar in the barn.
0: food is under the bar in the bar
- 1: d is under the bar in the
-
+ 1: d is under the bar in the
+
/(.*)([0-9]*)/
I have 2 numbers: 53147
0: I have 2 numbers: 53147
1: I have 2 numbers: 53147
- 2:
-
+ 2:
+
/(.*)([0-9]+)/
I have 2 numbers: 53147
0: I have 2 numbers: 53147
@@ -933,13 +933,13 @@ No match
/(.*)\b([0-9]+)$/
I have 2 numbers: 53147
0: I have 2 numbers: 53147
- 1: I have 2 numbers:
+ 1: I have 2 numbers:
2: 53147
/(.*[^0-9])([0-9]+)$/
I have 2 numbers: 53147
0: I have 2 numbers: 53147
- 1: I have 2 numbers:
+ 1: I have 2 numbers:
2: 53147
/[[:digit:]][[:digit:]]\/[[:digit:]][[:digit:]]\/[[:digit:]][[:digit:]][[:digit:]][[:digit:]]/
@@ -948,48 +948,48 @@ No match
/^(a){0,0}/
bcd
- 0:
+ 0:
abc
- 0:
- aab
- 0:
+ 0:
+ aab
+ 0:
/^(a){0,1}/
bcd
- 0:
+ 0:
abc
0: a
1: a
- aab
+ aab
0: a
1: a
/^(a){0,2}/
bcd
- 0:
+ 0:
abc
0: a
1: a
- aab
+ aab
0: aa
1: a
/^(a){0,3}/
bcd
- 0:
+ 0:
abc
0: a
1: a
aab
0: aa
1: a
- aaa
+ aaa
0: aaa
1: a
/^(a){0,}/
bcd
- 0:
+ 0:
abc
0: a
1: a
@@ -999,7 +999,7 @@ No match
aaa
0: aaa
1: a
- aaaaaaaa
+ aaaaaaaa
0: aaaaaaaa
1: a
@@ -1009,7 +1009,7 @@ No match
abc
0: a
1: a
- aab
+ aab
0: a
1: a
@@ -1019,7 +1019,7 @@ No match
abc
0: a
1: a
- aab
+ aab
0: aa
1: a
@@ -1032,7 +1032,7 @@ No match
aab
0: aa
1: a
- aaa
+ aaa
0: aaa
1: a
@@ -1048,7 +1048,7 @@ No match
aaa
0: aaa
1: a
- aaaaaaaa
+ aaaaaaaa
0: aaaaaaaa
1: a
@@ -1057,28 +1057,28 @@ No match
0: 123456654321
/^[[:digit:]][[:digit:]][[:digit:]][[:digit:]][[:digit:]][[:digit:]][[:digit:]][[:digit:]][[:digit:]][[:digit:]][[:digit:]][[:digit:]]/
- 123456654321
+ 123456654321
0: 123456654321
/^[abc]{12}/
abcabcabcabc
0: abcabcabcabc
-
+
/^[a-c]{12}/
abcabcabcabc
0: abcabcabcabc
-
+
/^(a|b|c){12}/
- abcabcabcabc
+ abcabcabcabc
0: abcabcabcabc
1: c
/^[abcdefghijklmnopqrstuvwxy0123456789]/
n
0: n
- *** Failers
+ *** Failers
No match
- z
+ z
No match
/abcde{0,0}/
@@ -1086,7 +1086,7 @@ No match
0: abcd
*** Failers
No match
- abce
+ abce
No match
/ab[cd]{0,0}e/
@@ -1094,21 +1094,21 @@ No match
0: abe
*** Failers
No match
- abcde
+ abcde
No match
-
+
/ab(c){0,0}d/
abd
0: abd
*** Failers
No match
- abcd
+ abcd
No match
/a(b*)/
a
0: a
- 1:
+ 1:
ab
0: ab
1: b
@@ -1117,33 +1117,33 @@ No match
1: bbbb
*** Failers
0: a
- 1:
- bbbbb
+ 1:
+ bbbbb
No match
-
+
/ab[0-9]{0}e/
abe
0: abe
*** Failers
No match
- ab1e
+ ab1e
No match
-
+
/(A|B)*CD/
- CD
+ CD
0: CD
/(AB)*\1/
ABABAB
0: ABABAB
1: AB
-
+
/([0-9]+)(\w)/
12345a
0: 12345a
1: 12345
2: a
- 12345+
+ 12345+
0: 12345
1: 1234
2: 5
@@ -1158,15 +1158,15 @@ No match
abcabcabc
0: abcabcabc
1: abc
- xyz
- 0:
- 1:
+ xyz
+ 0:
+ 1:
/([a]*)*/
a
0: a
1: a
- aaaaa
+ aaaaa
0: aaaaa
1: aaaaa
@@ -1183,7 +1183,7 @@ No match
aaaabcde
0: aaaab
1: aaaab
- bbbb
+ bbbb
0: bbbb
1: bbbb
@@ -1194,15 +1194,15 @@ No match
bbbb
0: bbbb
1: bbbb
- aaa
- 0:
+ aaa
+ 0:
/([^ab]*)*/
cccc
0: cccc
1: cccc
- abab
- 0:
+ abab
+ 0:
/abc/
abc
@@ -1322,11 +1322,11 @@ No match
/^/
abc
- 0:
+ 0:
/$/
abc
- 0:
+ 0:
/a.c/
abc
@@ -1483,7 +1483,7 @@ No match
/()ef/
def
0: ef
- 1:
+ 1:
/a\(b/
a(b
@@ -1554,10 +1554,10 @@ No match
No match
b
No match
-
+
/a*/
-
+
/([abc])*d/
abbbcd
@@ -1600,7 +1600,7 @@ No match
/(abc|)ef/
abcdef
0: ef
- 1:
+ 1:
/(a|b)c*d/
abcd
@@ -1847,11 +1847,11 @@ No match
/^/i
ABC
- 0:
+ 0:
/$/i
ABC
- 0:
+ 0:
/a.c/i
ABC
@@ -1924,7 +1924,7 @@ No match
/()ef/i
DEF
0: EF
- 1:
+ 1:
/$b/i
*** Failers
@@ -2043,7 +2043,7 @@ No match
/(abc|)ef/i
ABCDEF
0: EF
- 1:
+ 1:
/(a|b)c*d/i
ABCD
@@ -2236,8 +2236,8 @@ No match
/^(){3,5}/
abc
- 0:
- 1:
+ 0:
+ 1:
/^(a+)*ax/
aax
@@ -2339,20 +2339,20 @@ No match
ZABCDEFG
0: ZA
1: A
- 2:
+ 2:
/(Z(())|A)*/
ZABCDEFG
0: ZA
1: A
- 2:
- 3:
+ 2:
+ 3:
/(.*)[0-9]+\1/
abc123abc
0: abc123abc
1: abc
- abc123bc
+ abc123bc
0: bc123bc
1: bc
@@ -2361,7 +2361,7 @@ No match
0: abc123abc
1: abc
2: abc
- abc123bc
+ abc123bc
0: bc123bc
1: bc
2: bc
diff --git a/testsuite/badenc.sed b/testsuite/badenc.sed
index dc80982..c46bb69 100644
--- a/testsuite/badenc.sed
+++ b/testsuite/badenc.sed
@@ -1 +1 @@
-/.*/ { H ; g ; s/\n// ; p ; z ; x }
+/.*/ { H ; g ; s/\n// ; p ; z ; x }
diff --git a/testsuite/binary.sed b/testsuite/binary.sed
index 92a6a06..e8ffd3b 100644
--- a/testsuite/binary.sed
+++ b/testsuite/binary.sed
@@ -37,23 +37,23 @@
# 255.255.255.0; 2 parameters => given host address and netmask compute
# network and broadcast addresses):
#
-# if [ $# = 1 ]; then
+# if [ $# = 1 ]; then
# OUTPUT='$1.$2.$3.$4'
# set 255.255.255.255 $1
# else
# OUTPUT='$1.$2.$3.$4 $5.$6.$7.$8'
# fi
-#
+#
# if [ `expr $2 : ".*\\."` -gt 0 ]; then
# MASK="$2 br b8<r b16<r b24< R|R|R|"
# else
# MASK="$2b 31b ^d D
# 11111111111111111111111111111111 x>1> x<1<"
# fi
-#
+#
# set `echo "$1 br b8<r b16<r b24< R|R|R| D # Load address
# $MASK D ~r # Load mask
-#
+#
# & DDD 24>dpP 16>11111111& dpP 8>11111111& dpP 11111111& dpP
# | DDD 24>dpP 16>11111111& dpP 8>11111111& dpP 11111111& dpP
# " | sed -f binary.sed`
diff --git a/testsuite/binary2.sed b/testsuite/binary2.sed
index daf7706..115b942 100644
--- a/testsuite/binary2.sed
+++ b/testsuite/binary2.sed
@@ -38,23 +38,23 @@
# 255.255.255.0; 2 parameters => given host address and netmask compute
# network and broadcast addresses):
#
-# if [ $# = 1 ]; then
+# if [ $# = 1 ]; then
# OUTPUT='$1.$2.$3.$4'
# set 255.255.255.255 $1
# else
# OUTPUT='$1.$2.$3.$4 $5.$6.$7.$8'
# fi
-#
+#
# if [ `expr $2 : ".*\\."` -gt 0 ]; then
# MASK="$2 br b8<r b16<r b24< R|R|R|"
# else
# MASK="$2b 31b ^d D
# 11111111111111111111111111111111 x>1> x<1<"
# fi
-#
+#
# set `echo "$1 br b8<r b16<r b24< R|R|R| D # Load address
# $MASK D ~r # Load mask
-#
+#
# & DDD 24>dpP 16>11111111& dpP 8>11111111& dpP 11111111& dpP
# | DDD 24>dpP 16>11111111& dpP 8>11111111& dpP 11111111& dpP
# " | sed -f binary.sed`
diff --git a/testsuite/binary3.sed b/testsuite/binary3.sed
index b877f14..ba6b7d1 100644
--- a/testsuite/binary3.sed
+++ b/testsuite/binary3.sed
@@ -41,23 +41,23 @@
# 255.255.255.0; 2 parameters => given host address and netmask compute
# network and broadcast addresses):
#
-# if [ $# = 1 ]; then
+# if [ $# = 1 ]; then
# OUTPUT='$1.$2.$3.$4'
# set 255.255.255.255 $1
# else
# OUTPUT='$1.$2.$3.$4 $5.$6.$7.$8'
# fi
-#
+#
# if [ `expr $2 : ".*\\."` -gt 0 ]; then
# MASK="$2 br b8<r b16<r b24< R|R|R|"
# else
# MASK="$2b 31b ^d D
# 11111111111111111111111111111111 x>1> x<1<"
# fi
-#
+#
# set `echo "$1 br b8<r b16<r b24< R|R|R| D # Load address
# $MASK D ~r # Load mask
-#
+#
# & DDD 24>dpP 16>11111111& dpP 8>11111111& dpP 11111111& dpP
# | DDD 24>dpP 16>11111111& dpP 8>11111111& dpP 11111111& dpP
# " | sed -f binary.sed`
diff --git a/testsuite/bug-regex10.c b/testsuite/bug-regex10.c
index 1a21617..cdb0a46 100644
--- a/testsuite/bug-regex10.c
+++ b/testsuite/bug-regex10.c
@@ -1,5 +1,5 @@
/* Test for re_match with non-zero start.
- Copyright (C) 2002 Free Software Foundation, Inc.
+ Copyright (C) 2002-2016 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Jakub Jelinek <jakub@redhat.com>, 2002.
@@ -18,9 +18,7 @@
Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
02110-1301 USA. */
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
+#include <config.h>
#include <locale.h>
#include <stdio.h>
diff --git a/testsuite/bug-regex11.c b/testsuite/bug-regex11.c
index dbfa3f9..22a4bb0 100644
--- a/testsuite/bug-regex11.c
+++ b/testsuite/bug-regex11.c
@@ -1,5 +1,5 @@
/* Regular expression tests.
- Copyright (C) 2002, 2003 Free Software Foundation, Inc.
+ Copyright (C) 2002-2016 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Jakub Jelinek <jakub@redhat.com>, 2002.
@@ -18,9 +18,7 @@
Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
02110-1301 USA. */
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
+#include <config.h>
#include <sys/types.h>
#ifdef HAVE_MCHECK_H
diff --git a/testsuite/bug-regex12.c b/testsuite/bug-regex12.c
index a4db0cc..867e5fa 100644
--- a/testsuite/bug-regex12.c
+++ b/testsuite/bug-regex12.c
@@ -1,5 +1,5 @@
/* Regular expression tests.
- Copyright (C) 2002, 2003 Free Software Foundation, Inc.
+ Copyright (C) 2002-2016 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Jakub Jelinek <jakub@redhat.com>, 2002.
@@ -18,9 +18,7 @@
Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
02110-1301 USA. */
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
+#include <config.h>
#include <sys/types.h>
#ifdef HAVE_MCHECK_H
diff --git a/testsuite/bug-regex13.c b/testsuite/bug-regex13.c
index a28c5fa..d04f246 100644
--- a/testsuite/bug-regex13.c
+++ b/testsuite/bug-regex13.c
@@ -1,5 +1,5 @@
/* Regular expression tests.
- Copyright (C) 2002 Free Software Foundation, Inc.
+ Copyright (C) 2002-2016 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Isamu Hasegawa <isamu@yamato.ibm.com>, 2002.
@@ -18,9 +18,7 @@
Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
02110-1301 USA. */
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
+#include <config.h>
#include <sys/types.h>
#ifdef HAVE_MCHECK_H
diff --git a/testsuite/bug-regex14.c b/testsuite/bug-regex14.c
index 4b296d8..f20b183 100644
--- a/testsuite/bug-regex14.c
+++ b/testsuite/bug-regex14.c
@@ -1,5 +1,5 @@
/* Tests re_comp and re_exec.
- Copyright (C) 2002 Free Software Foundation, Inc.
+ Copyright (C) 2002-2016 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Isamu Hasegawa <isamu@yamato.ibm.com>, 2002.
@@ -18,9 +18,7 @@
Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
02110-1301 USA. */
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
+#include <config.h>
#define _REGEX_RE_COMP
#include <sys/types.h>
diff --git a/testsuite/bug-regex15.c b/testsuite/bug-regex15.c
index 14707e8..4d348a4 100644
--- a/testsuite/bug-regex15.c
+++ b/testsuite/bug-regex15.c
@@ -1,8 +1,6 @@
/* Test for memory/CPU leak in regcomp. */
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
+#include <config.h>
#include <sys/types.h>
#include <sys/time.h>
diff --git a/testsuite/bug-regex16.c b/testsuite/bug-regex16.c
index 7a1d3c8..c767f42 100644
--- a/testsuite/bug-regex16.c
+++ b/testsuite/bug-regex16.c
@@ -1,8 +1,6 @@
/* Test re_compile_pattern error messages. */
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
+#include <config.h>
#include <stdio.h>
#include <string.h>
diff --git a/testsuite/bug-regex21.c b/testsuite/bug-regex21.c
index 0232876..53a975d 100644
--- a/testsuite/bug-regex21.c
+++ b/testsuite/bug-regex21.c
@@ -1,5 +1,5 @@
/* Test for memory leaks in regcomp.
- Copyright (C) 2003 Free Software Foundation, Inc.
+ Copyright (C) 2003-2016 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Jakub Jelinek <jakub@redhat.com>, 2003.
@@ -18,9 +18,7 @@
Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
02110-1301 USA. */
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
+#include <config.h>
#ifdef HAVE_MCHECK_H
#include <mcheck.h>
diff --git a/testsuite/bug-regex27.c b/testsuite/bug-regex27.c
index 340ade9..eb7ad5b 100644
--- a/testsuite/bug-regex27.c
+++ b/testsuite/bug-regex27.c
@@ -1,5 +1,5 @@
/* Test REG_NEWLINE.
- Copyright (C) 2007 Free Software Foundation, Inc.
+ Copyright (C) 2007-2016 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Jakub Jelinek <jakub@redhat.com>, 2007.
diff --git a/testsuite/bug-regex28.c b/testsuite/bug-regex28.c
index f546b35..42dadd3 100644
--- a/testsuite/bug-regex28.c
+++ b/testsuite/bug-regex28.c
@@ -1,5 +1,5 @@
/* Test RE_HAT_LISTS_NOT_NEWLINE and RE_DOT_NEWLINE.
- Copyright (C) 2007 Free Software Foundation, Inc.
+ Copyright (C) 2007-2016 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Jakub Jelinek <jakub@redhat.com>, 2007.
diff --git a/testsuite/bug-regex7.c b/testsuite/bug-regex7.c
index 2051985..6f3e435 100644
--- a/testsuite/bug-regex7.c
+++ b/testsuite/bug-regex7.c
@@ -1,5 +1,5 @@
/* Test for regs allocation in re_search and re_match.
- Copyright (C) 2002 Free Software Foundation, Inc.
+ Copyright (C) 2002-2016 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Stepan Kasal <kasal@math.cas.cz>, 2002.
@@ -18,9 +18,7 @@
Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
02110-1301 USA. */
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
+#include <config.h>
#include <locale.h>
#include <stdio.h>
diff --git a/testsuite/bug-regex8.c b/testsuite/bug-regex8.c
index e39ad59..dfb27b8 100644
--- a/testsuite/bug-regex8.c
+++ b/testsuite/bug-regex8.c
@@ -1,5 +1,5 @@
/* Test for the STOP parameter of re_match_2 and re_search_2.
- Copyright (C) 2002 Free Software Foundation, Inc.
+ Copyright (C) 2002-2016 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Stepan Kasal <kasal@math.cas.cz>, 2002.
@@ -18,9 +18,7 @@
Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
02110-1301 USA. */
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
+#include <config.h>
#include <locale.h>
#include <stdio.h>
diff --git a/testsuite/bug-regex9.c b/testsuite/bug-regex9.c
index c0e9e18..e4d41c1 100644
--- a/testsuite/bug-regex9.c
+++ b/testsuite/bug-regex9.c
@@ -1,5 +1,5 @@
/* Test for memory handling in regex.
- Copyright (C) 2002 Free Software Foundation, Inc.
+ Copyright (C) 2002-2016 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@redhat.com>, 2001.
@@ -18,9 +18,7 @@
Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
02110-1301 USA. */
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
+#include <config.h>
#include <sys/types.h>
#ifdef HAVE_MCHECK_H
diff --git a/testsuite/cmd-R.sh b/testsuite/cmd-R.sh
new file mode 100644
index 0000000..55ed685
--- /dev/null
+++ b/testsuite/cmd-R.sh
@@ -0,0 +1,49 @@
+#!/bin/sh
+# Test 'R' command
+
+# Copyright (C) 2016 Free Software Foundation, Inc.
+
+# This 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/>.
+. "${srcdir=.}/testsuite/init.sh"; path_prepend_ ./sed
+print_ver_ sed
+
+fail=0
+
+printf "%s\n" x y > a || framework_failure_
+printf "%s\n" 1 2 > b || framework_failure_
+printf "%s\n" X > c || framework_failure_
+touch d || framework_failure_
+
+# Read and interleave two lines
+printf "%s\n" x 1 y 2 > exp1 || framework_failure_
+sed -e 1Rb -e 2Rb a > out1 || fail=1
+compare_ exp1 out1 || fail=1
+
+# Read a non-existing file, silently ignored
+sed -e 1Rq a > out2 || fail=1
+compare_ a out2
+
+# Read two lines from a file, second time will be EOF
+# (implementation note: EOF from get_delim())
+printf "%s\n" x X y > exp3 || framework_failure_
+sed -e 1Rc -e 2Rc a > out3 || fail=1
+compare_ exp3 out3 || fail=1
+
+# Read two lines from an empty file, both will be EOF
+# (implementation note: EOF in before get_delim())
+sed -e 1Rd -e 2Rd a > out4 || fail=1
+compare_ a out4 || fail=1
+
+
+Exit $fail
diff --git a/testsuite/cmd-l.sh b/testsuite/cmd-l.sh
new file mode 100755
index 0000000..743e326
--- /dev/null
+++ b/testsuite/cmd-l.sh
@@ -0,0 +1,77 @@
+#!/bin/sh
+# Test 'l' command with different widths
+
+# Copyright (C) 2016 Free Software Foundation, Inc.
+
+# This 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/>.
+. "${srcdir=.}/testsuite/init.sh"; path_prepend_ ./sed
+print_ver_ sed
+
+fail=0
+
+# 10 20 30 40 50 60 70 75
+cat <<\EOF >in1 || framework_failure_
+0123456789012345678901234567890123456789012345678901234567890123456789012345
+EOF
+
+# default: 70 characters (including the \n)
+cat <<\EOF >exp-def || framework_failure_
+012345678901234567890123456789012345678901234567890123456789012345678\
+9012345$
+EOF
+
+# 11 characters
+cat <<\EOF >exp-11 || framework_failure_
+0123456789\
+0123456789\
+0123456789\
+0123456789\
+0123456789\
+0123456789\
+0123456789\
+012345$
+EOF
+
+# command 'l n' is a gnu extension, rejected in posix mode
+cat <<\EOF >exp-err-posix-ln || framework_failure_
+sed: -e expression #1, char 2: extra characters after command
+EOF
+
+# sed's default: 70 characters
+sed -n l in1 >out-def || fail=1
+compare_ exp-def out-def || fail=1
+
+# limit with COLS envvar, sed subtracts one to avoid ttys linewraps
+COLS=12 sed -n l in1 >out-cols12 || fail=1
+compare_ exp-11 out-cols12 || fail=1
+
+# invalid COLS envvar should be ignored (wrap at default=70)
+COLS=0 sed -n l in1 >out-cols0 || fail=1
+compare_ exp-def out-cols0 || fail=1
+COLS=foo sed -n l in1 >out-cols-foo || fail=1
+compare_ exp-def out-cols-foo || fail=1
+
+# limit with -l parameter
+sed -l 11 -n l in1 >out-l11 || fail=1
+compare_ exp-11 out-l11 || fail=1
+
+# limit with 'ln' command (gnu extension)
+sed -n l11 in1 >out-ln-11 || fail=1
+compare_ exp-11 out-ln-11 || fail=1
+
+# limit with 'ln' command (gnu extension)
+returns_ 1 sed --posix -n l11 in1 2>err-posix-ln || fail=1
+compare_ exp-err-posix-ln err-posix-ln || fail=1
+
+Exit $fail
diff --git a/testsuite/colon-with-no-label.sh b/testsuite/colon-with-no-label.sh
new file mode 100755
index 0000000..42de378
--- /dev/null
+++ b/testsuite/colon-with-no-label.sh
@@ -0,0 +1,33 @@
+#!/bin/sh
+# Verify that a ":" command with no label is now rejected.
+
+# Copyright (C) 2015-2016 Free Software Foundation, Inc.
+
+# This 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/>.
+. "${srcdir=.}/testsuite/init.sh"; path_prepend_ ./sed
+print_ver_ sed
+
+echo 'sed: -e expression #1, char 1: ":" lacks a label' > exp-err \
+ || framework_failure_
+
+fail=0
+
+# Before sed-4.3, sed would mistakenly accept a ":" with no following
+# label name.
+echo x | returns_ 1 sed : > out 2> err || fail=1
+
+compare /dev/null out || fail=1
+compare exp-err err || fail=1
+
+Exit $fail
diff --git a/testsuite/comment-n.sh b/testsuite/comment-n.sh
new file mode 100644
index 0000000..240cf86
--- /dev/null
+++ b/testsuite/comment-n.sh
@@ -0,0 +1,97 @@
+#!/bin/sh
+# Test the '#n' silent mode (activated by first line comment)
+
+# Copyright (C) 2016 Free Software Foundation, Inc.
+
+# This 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/>.
+. "${srcdir=.}/testsuite/init.sh"; path_prepend_ ./sed
+print_ver_ sed
+
+fail=0
+
+echo X > in1 || framework_failure_
+
+# expected output with 'sed -n = in1' (silent mode)
+echo 1 > exp-silent || framework_failure_
+
+# expected output with 'sed = in1' (not silent mode)
+printf "1\nX\n" > exp-norm || framework_failure_
+
+
+# A comment '#n' in the first script, in the first line
+sed -e '#n' in1 > out1 || fail=1
+compare_ /dev/null out1 || fail=1
+
+sed -e '#n' -e = in1 > out2 || fail=1
+compare_ exp-silent out2 || fail=1
+
+sed -e '#ni!' -e = in1 > out3 || fail=1
+compare_ exp-silent out3 || fail=1
+
+# not the first 2 characters, or space before n,
+# or uppercase N - do not activate silent mode
+sed -e '=#n' in1 > out4 || fail=1
+compare_ exp-norm out4 || fail=1
+
+sed -e '# n' -e = in1 > out5 || fail=1
+compare_ exp-norm out5 || fail=1
+
+sed -e '#N' -e = in1 > out6 || fail=1
+compare_ exp-norm out6 || fail=1
+
+sed -e = -e '#n' in1 > out7 || fail=1
+compare_ exp-norm out7 || fail=1
+
+
+#
+# Test the same, with a program instead of -e.
+#
+cat << \EOF > prog1 || framework_failure_
+#n
+=
+EOF
+sed -f prog1 in1 > out8 || fail=1
+compare_ exp-silent out8 || fail=1
+
+# not in the first 2 characters
+cat << \EOF > prog2 || framework_failure_
+=
+#n
+EOF
+sed -f prog2 in1 > out9 || fail=1
+compare_ exp-norm out9 || fail=1
+
+# not in the first 2 characters
+cat << \EOF > prog3 || framework_failure_
+# n
+=
+EOF
+sed -f prog3 in1 > out10 || fail=1
+compare_ exp-norm out10 || fail=1
+
+
+# -e then a program file.
+cat << \EOF > prog4 || framework_failure_
+#n
+EOF
+sed -e = -f prog4 in1 > out11 || fail=1
+compare_ exp-norm out11 || fail=1
+
+
+# If the program comes before -e , silent mode is activated.
+sed -f prog4 -e = in1 > out12 || fail=1
+compare_ exp-silent out12 || fail=1
+
+
+Exit $fail
diff --git a/testsuite/compile-errors.sh b/testsuite/compile-errors.sh
new file mode 100644
index 0000000..9e7414c
--- /dev/null
+++ b/testsuite/compile-errors.sh
@@ -0,0 +1,292 @@
+#!/bin/sh
+# Test compilation errors
+
+# Copyright (C) 2016 Free Software Foundation, Inc.
+
+# This 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/>.
+. "${srcdir=.}/testsuite/init.sh"; path_prepend_ ./sed
+print_ver_ sed
+
+fail=0
+
+#
+# Excess P modifier to s// (EXCESS_P_OPT)
+#
+cat <<\EOF >exp-exs-p || framework_failure_
+sed: -e expression #1, char 8: multiple `p' options to `s' command
+EOF
+returns_ 1 sed 's/./x/pp' </dev/null 2>err-exs-p || fail=1
+compare_ exp-exs-p err-exs-p || fail=1
+
+#
+# Excess G modifier to s// (EXCESS_G_OPT)
+#
+cat <<\EOF >exp-exs-g || framework_failure_
+sed: -e expression #1, char 8: multiple `g' options to `s' command
+EOF
+returns_ 1 sed 's/./x/gg' </dev/null 2>err-exs-g || fail=1
+compare_ exp-exs-g err-exs-g || fail=1
+
+#
+# zero numeric modifier to s// (ZERO_N_OPT)
+#
+cat <<\EOF >exp-exs-0 || framework_failure_
+sed: -e expression #1, char 7: number option to `s' command may not be zero
+EOF
+returns_ 1 sed 's/./x/0' </dev/null 2>err-exs-0 || fail=1
+compare_ exp-exs-0 err-exs-0 || fail=1
+
+
+#
+# Multiple number modifiers to s// (EXCESS_N_OPT)
+#
+cat <<\EOF >exp-exs-n || framework_failure_
+sed: -e expression #1, char 9: multiple number options to `s' command
+EOF
+returns_ 1 sed 's/./x/2p3' </dev/null 2>err-exs-n || fail=1
+compare_ exp-exs-n err-exs-n || fail=1
+
+
+#
+# Unknown s/// modifier letter
+#
+cat << \EOF >exp-unk-s-opt || framework_failure_
+sed: -e expression #1, char 7: unknown option to `s'
+EOF
+returns_ 1 sed 's/./x/Q' </dev/null 2>err-unk-s-opt || fail=1
+compare_ exp-unk-s-opt err-unk-s-opt || fail=1
+
+#
+# Special case: s/// followed by \r alone
+#
+printf "s/./x/\r" > s-opt-r-in || framework_failure_
+cat << \EOF >exp-s-opt-r || framework_failure_
+sed: file s-opt-r-in line 1: unknown option to `s'
+EOF
+returns_ 1 sed -f s-opt-r-in </dev/null 2>err-s-opt-r || fail=1
+compare_ exp-s-opt-r err-s-opt-r || fail=1
+
+
+#
+# Step-address as first address (BAD_STEP)
+# (both +N and ~N addresses)
+cat <<\EOF >exp-step-addr || framework_failure_
+sed: -e expression #1, char 2: invalid usage of +N or ~N as first address
+EOF
+returns_ 1 sed '~1d' </dev/null 2>err-step-addr1 || fail=1
+compare_ exp-step-addr err-step-addr1 || fail=1
+returns_ 1 sed '+1d' </dev/null 2>err-step-addr2 || fail=1
+compare_ exp-step-addr err-step-addr2 || fail=1
+
+
+#
+# Multiple '!' (BAD_BANG)
+#
+cat <<\EOF >exp-bad-bang || framework_failure_
+sed: -e expression #1, char 3: multiple `!'s
+EOF
+returns_ 1 sed '1!!d' </dev/null 2>err-bad-bang || fail=1
+compare_ exp-bad-bang err-bad-bang || fail=1
+
+
+#
+# GNU extension commands, not accepted in --posix mode
+# (bad_command(OPT))
+for opt in e F v z L Q T R W ;
+do
+ cat <<EOF >exp-posix-cmd-$opt || framework_failure_
+sed: -e expression #1, char 2: unknown command: \`$opt'
+EOF
+ returns_ 1 sed --posix "1$opt" </dev/null 2>err-posix-cmd-$opt || fail=1
+ compare_ exp-posix-cmd-$opt err-posix-cmd-$opt || fail=1
+done
+
+#
+# GNU extension commands, accepting only one address in --posix mode
+# (ONE_ADDR)
+cat <<\EOF >exp-one-addr || framework_failure_
+sed: -e expression #1, char 4: command only uses one address
+EOF
+for opt in a i l = r ;
+do
+ returns_ 1 sed --posix "1,2$opt" </dev/null 2>err-posix-cmd-$opt || fail=1
+ compare_ exp-one-addr err-posix-cmd-$opt || fail=1
+done
+
+# q/Q always accept one address (Q is gnu extension, can't use --posix, above)
+for opt in q Q ;
+do
+ returns_ 1 sed "1,2$opt" </dev/null 2>err-posix-cmd-$opt || fail=1
+ compare_ exp-one-addr err-posix-cmd-$opt || fail=1
+done
+
+#
+# Comment with address (NO_CLOSE_BRACE_ADDR)
+#
+cat <<\EOF >exp-no-sharp || framework_failure_
+sed: -e expression #1, char 2: comments don't accept any addresses
+EOF
+returns_ 1 sed '1#foo' </dev/null 2>err-no-sharp || fail=1
+compare_ exp-no-sharp err-no-sharp || fail=1
+
+
+#
+# Unexpected closing braces (EXCESS_CLOSE_BRACE)
+#
+cat <<\EOF >exp-unexp-brace || framework_failure_
+sed: -e expression #1, char 2: unexpected `}'
+EOF
+returns_ 1 sed '1}' </dev/null 2>err-unexp-brace || fail=1
+compare_ exp-unexp-brace err-unexp-brace || fail=1
+
+
+#
+# Umatched opening braces (EXCESS_OPEN_BRACE)
+# TODO: why 'char 0' ?
+cat <<\EOF >exp-unmatched-braces || framework_failure_
+sed: -e expression #1, char 0: unmatched `{'
+EOF
+returns_ 1 sed '1{' </dev/null 2>err-unmatched-braces || fail=1
+compare_ exp-unmatched-braces err-unmatched-braces || fail=1
+
+
+#
+# '}' with address (NO_CLOSE_BRACE_ADDR)
+#
+cat <<\EOF >exp-brace-addr || framework_failure_
+sed: -e expression #1, char 3: `}' doesn't want any addresses
+EOF
+returns_ 1 sed '{1}' </dev/null 2>err-brace-addr || fail=1
+compare_ exp-brace-addr err-brace-addr || fail=1
+
+
+#
+# Too new version requested (ANCIENT_VERSION)
+# (i.e. this version of SED is too old)
+cat <<\EOF >exp-anc-ver || framework_failure_
+sed: -e expression #1, char 4: expected newer version of sed
+EOF
+returns_ 1 sed 'v9.0' </dev/null 2>err-anc-ver || fail=1
+compare_ exp-anc-ver err-anc-ver || fail=1
+
+
+#
+# Junk after command (EXCESS_JUNK)
+# notes: EOF, \n or ';' are allowed after a command.
+# multiple places abort with EXCESS_JUNK, check them all.
+# dummy addresses ensure the offending char is the same.
+cat <<\EOF >exp-junk || framework_failure_
+sed: -e expression #1, char 7: extra characters after command
+EOF
+returns_ 1 sed '11111=d' </dev/null 2>err-junk || fail=1
+compare_ exp-junk err-junk || fail=1
+returns_ 1 sed 'y/a/b/d' </dev/null 2>err-junk-y || fail=1
+compare_ exp-junk err-junk-y || fail=1
+returns_ 1 sed '1111{}d' </dev/null 2>err-junk-braces || fail=1
+compare_ exp-junk err-junk-braces || fail=1
+returns_ 1 sed '22222ld' </dev/null 2>err-junk-braces || fail=1
+compare_ exp-junk err-junk-braces || fail=1
+
+
+#
+# Slash after a/c/i (EXPECTED_SLASH)
+# note: GNU extensions are less strict than --posix.
+cat <<\EOF >exp-junk || framework_failure_
+sed: -e expression #1, char 2: expected \ after `a', `c' or `i'
+EOF
+for opt in a c i ;
+do
+ # EOF after command
+ returns_ 1 sed "1$opt" </dev/null 2>err-junk-$opt || fail=1
+ compare_ exp-junk err-junk-$opt || fail=1
+
+ # no slash after command, in GNU extension mode - accepted.
+ sed "1${opt}foo" </dev/null >/dev/null || fail=1
+
+ # no slash after command, in --posix mode - rejected.
+ returns_ 1 sed --posix "${opt}foo" </dev/null 2>err-junk-$opt-psx || fail=1
+ compare_ exp-junk err-junk-$opt-psx || fail=1
+done
+
+
+#
+# ':' with address (NO_COLON_ADDR)
+#
+cat <<\EOF >exp-colon-addr || framework_failure_
+sed: -e expression #1, char 2: : doesn't want any addresses
+EOF
+returns_ 1 sed '2:' </dev/null 2>err-colon-addr || fail=1
+compare_ exp-colon-addr err-colon-addr || fail=1
+
+
+
+#
+# q/Q need one address (ONE_ADDR)
+#
+cat <<\EOF >exp-colon-addr || framework_failure_
+sed: -e expression #1, char 2: : doesn't want any addresses
+EOF
+returns_ 1 sed '2:' </dev/null 2>err-colon-addr || fail=1
+compare_ exp-colon-addr err-colon-addr || fail=1
+
+
+#
+# unterminated Y commands (UNTERM_Y_CMD)
+# NOTE: the code calls bad_proc(UNTERM_Y_CMD)
+# in multiple places due to varied conditions - check them all.
+# dummy addresses ensures the offending character is always 5.
+cat <<\EOF >exp-unterm-y || framework_failure_
+sed: -e expression #1, char 5: unterminated `y' command
+EOF
+returns_ 1 sed '1111y' </dev/null 2>err-unterm-y1 || fail=1
+compare_ exp-unterm-y err-unterm-y1 || fail=1
+returns_ 1 sed '111y/' </dev/null 2>err-unterm-y2 || fail=1
+compare_ exp-unterm-y err-unterm-y2 || fail=1
+returns_ 1 sed '11y/a' </dev/null 2>err-unterm-y3 || fail=1
+compare_ exp-unterm-y err-unterm-y3 || fail=1
+returns_ 1 sed '1y/a/' </dev/null 2>err-unterm-y4 || fail=1
+compare_ exp-unterm-y err-unterm-y4 || fail=1
+returns_ 1 sed 'y/a/a' </dev/null 2>err-unterm-y5 || fail=1
+compare_ exp-unterm-y err-unterm-y5 || fail=1
+
+#
+# Y command with bad legth (Y_CMD_LEN)
+# TODO: check with multibyte strings.
+cat <<\EOF >exp-bad-y-len || framework_failure_
+sed: -e expression #1, char 7: strings for `y' command are different lengths
+EOF
+returns_ 1 sed 'y/a/bb/' </dev/null 2>err-bad-y-len || fail=1
+compare_ exp-bad-y-len err-bad-y-len || fail=1
+
+
+#
+# GNU Extension: allow a/c/i to continue in next 'program'.
+# in --posix mode, reject it with "incomplete command" (INCOMPLETE_CMD)
+#
+cat <<\EOF >exp-inc-cmd || framework_failure_
+sed: -e expression #1, char 2: incomplete command
+EOF
+for opt in a c i ;
+do
+ # works as a gnu extension
+ sed -e "$opt\\" -e foo < /dev/null || fail=1
+
+ # rejected in posix mode
+ returns_ 1 sed --posix -e "$opt\\" -e foo </dev/null 2>err-inc-cmd-$opt \
+ || fail=1
+ compare_ exp-inc-cmd err-inc-cmd-$opt || fail=1
+done
+
+
+Exit $fail
diff --git a/testsuite/compile-tests.sh b/testsuite/compile-tests.sh
new file mode 100644
index 0000000..d1117b4
--- /dev/null
+++ b/testsuite/compile-tests.sh
@@ -0,0 +1,138 @@
+#!/bin/sh
+# Test compilation less-common cases
+
+# Copyright (C) 2016 Free Software Foundation, Inc.
+
+# This 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/>.
+. "${srcdir=.}/testsuite/init.sh"; path_prepend_ ./sed
+print_ver_ sed
+
+fail=0
+
+
+#
+# Special file names, with gnu extensions and without (if the host
+# supports /dev/std{out,err} )
+#
+echo a > a || framework_failure_
+
+# With gnu extension enabled, /dev/stderr is emulated internally
+# regardless of the operating system.
+sed 'w/dev/stderr' a >out 2>err|| fail=1
+compare_ a out || fail=1
+compare_ a err || fail=1
+
+# In posix mode /dev/std* are not emulated internally. Skip if they
+# don't exist. 'env' is used to avoid built-in 'test' which
+# simulates /dev/stderr, e.g. bash on AIX.
+if env test -w /dev/stderr ; then
+ sed --posix 'w/dev/stderr' a >out-psx 2>err-psx || fail=1
+ compare_ a out-psx || fail=1
+ compare_ a err-psx || fail=1
+fi
+
+
+#
+# labels followed by various characters
+# (read_label)
+echo a > lbl-in-exp || framework_failure_
+cat << \EOF > lbl-prog || framework_failure_
+bZ
+:Z
+bY;
+:Y
+{bX}
+:X ;
+b W
+: W
+EOF
+sed -f lbl-prog lbl-in-exp > lbl-out || fail=1
+compare_ lbl-in-exp lbl-out
+
+
+
+#
+# character classes (compile.c:snarf_char_class)
+#
+
+# open brackets followed by EOF
+cat <<\EOF >exp-err-op-bracket || framework_failure_
+sed: -e expression #1, char 2: unterminated address regex
+EOF
+returns_ 1 sed '/[' </dev/null 2>err-op-bracket1 || fail=1
+compare_ exp-err-op-bracket err-op-bracket1 || fail=1
+
+
+# open brackets followed by \n
+printf "/[\n" > op-bracket-prog || framework_failure_
+cat <<\EOF >exp-err-op-bracket || framework_failure_
+sed: file op-bracket-prog line 1: unterminated address regex
+EOF
+returns_ 1 sed -f op-bracket-prog </dev/null 2>err-op-bracket2 || fail=1
+compare_ exp-err-op-bracket err-op-bracket2 || fail=1
+
+
+# unterminated character class '[.'
+# (snarf_char_class terminates on char 7, then returns)
+cat <<\EOF >exp-chr-class || framework_failure_
+sed: -e expression #1, char 7: unterminated `s' command
+EOF
+returns_ 1 sed 's/[[.//' </dev/null 2>err-chr-class || fail=1
+compare_ exp-chr-class err-chr-class || fail=1
+
+
+# closing bracket immediately after char-class opening
+# sequence (e.g. '[:]' instead of '[:alpha:]' ).
+cat<< \EOF >exp-chr-class2 || framework_failure_
+sed: -e expression #1, char 9: unterminated `s' command
+EOF
+returns_ 1 sed 's/[[:]]//' </dev/null 2>err-chr-class2 || fail=1
+compare_ exp-chr-class2 err-chr-class2 || fail=1
+
+
+# EOF after backslash in a regex (compile.c:match_slash())
+cat<< \EOF >exp-backslash-eof || framework_failure_
+sed: -e expression #1, char 2: unterminated address regex
+EOF
+returns_ 1 sed '/\' </dev/null 2>err-backslash-eof || fail=1
+compare_ exp-backslash-eof err-backslash-eof || fail=1
+
+
+# Valid version requirement
+sed 'v4' < /dev/null || fail=1
+
+# Closing braces followed by another closing braces, and '#'
+echo X > in-exp || framework_failure_
+sed -n '{{p}}' in-exp > out-braces-1 || fail=1
+compare_ in-exp out-braces-1 || fail=1
+
+sed -n '{p}#foo' in-exp > out-braces-2 || fail=1
+compare_ in-exp out-braces-2 || fail=1
+
+# 'l' followed by closing braces, and '#'
+printf 'X$\n' > exp-l || framework_failure_
+sed -n '{l}' in-exp > out-l-braces || fail=1
+compare_ exp-l out-l-braces || fail=1
+sed -n 'l#foo' in-exp > out-l-hash || fail=1
+compare_ exp-l out-l-hash || fail=1
+
+
+#
+# unterminated a/c/i as last command
+# (pending_text)
+sed -e 'a\' in-exp > out-unterm-a1 || fail=1
+compare_ in-exp out-unterm-a1 || fail=1
+
+
+Exit $fail
diff --git a/testsuite/convert-number.sh b/testsuite/convert-number.sh
new file mode 100755
index 0000000..e80a23e
--- /dev/null
+++ b/testsuite/convert-number.sh
@@ -0,0 +1,181 @@
+#!/bin/sh
+# Test number conversion from escape sequences \xNN \oNNN \dNNN
+# (compile.c:convert_number())
+
+# Copyright (C) 2016 Free Software Foundation, Inc.
+
+# This 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/>.
+. "${srcdir=.}/testsuite/init.sh"; path_prepend_ ./sed
+print_ver_ sed
+
+fail=0
+
+
+#
+# Test \dNNN conversions
+#
+printf "%s\n" a a a a a a a > in-d || framework_failure_
+
+# Each line is a separate test case
+cat <<\EOF >prog-d
+# Expected output: ASCII 0x0D '\r'
+1s/./\d13/
+
+# Expected output: ASCII 0xff '\3ff'
+2s/./\d255/
+
+# Expected (?) output: 'dB'
+# (\d followed by character >= base 10, treated as '\d', which is 'd').
+3s/./\dB/
+
+# Expected (?) output: 'dQ'
+# (\d followed by non-hex character, treated as '\d', which is 'd').
+4s/./\dQ/
+
+# Expected output: '{4'
+# \dNNN is limited to three digits.
+# The first three digits are 123 = 0x7b = '{'. '4' is treated as-is.
+5s/./\d1234/
+
+# Expected (?) output: '\1'
+# undocumented implementation-specific limitation:
+# After 3 digit limits, the 8-bit value is used,
+# decimal 513 wraps-around to 1.
+6s/./\d513/
+
+# Expected output: '\0','7'
+# (three digit limit)
+7s/./\d0007/
+EOF
+
+printf '\r\n\377\ndB\ndQ\n{4\n\1\n\0007\n' > exp-d || framework_failure_
+
+sed -f prog-d in-d > out-d || fail=1
+compare_ exp-d out-d || fail=1
+
+if test "$fail" -eq 1 ; then
+ od -tx1c prog-d
+ od -tx1c exp-d
+ od -tx1c out-d
+fi
+
+
+
+
+#
+# Test \oNNN conversions
+#
+printf "%s\n" a a a a a a > in-o || framework_failure_
+
+# Each line is a separate test case
+cat <<\EOF >prog-o
+# Expected output: '\5'
+1s/./\o5/
+
+# Expected output: ASCII 0xff '\3ff'
+2s/./\o377/
+
+# Expected (?) output: 'o9'
+# (\o followed by character >= base 18, treated as '\o', which is 'o').
+3s/./\o9/
+
+# Expected (?) output: 'oQ'
+# (\o followed by non-hex character, treated as '\o', which is 'o').
+4s/./\oQ/
+
+# Expected output: 'S4'
+# \oNNN is limited to three digits.
+# The first three digits are o123 = 0x53 = 'S'. '4' is treated as-is.
+5s/./\o1234/
+
+# Expected (?) output: '\1'
+# undocumented implementation-specific limitation:
+# After 3 digit limits, the 8-bit value is used,
+# octal 401 wraps-around to 1.
+6s/./\o401/
+EOF
+
+printf '\5\n\377\no9\noQ\nS4\n\1\n' > exp-o || framework_failure_
+
+sed -f prog-o in-o > out-o || fail=1
+compare_ exp-o out-o || fail=1
+
+if test "$fail" -eq 1 ; then
+ od -tx1c prog-o
+ od -tx1c exp-o
+ od -tx1c out-o
+fi
+
+
+
+
+
+#
+# Test \xNN conversions
+#
+printf "%s\n" a a a a > in-x || framework_failure_
+
+# Each line is a separate test case
+cat <<\EOF >prog-x
+# Expected output: ASCII 0x06 '\6'
+1s/./\x6/
+
+# Expected output: ASCII 0xCE '\316'
+2s/./\xce/
+
+# Expected (?) output: 'xy'
+# (\x followed by non-hex character, treated as '\x', which is 'x').
+3s/./\xy/
+
+# Expected output: '\253' 'c' (0xAB = 253 octal)
+# \xNN is limited to two digits.
+4s/./\xabc/
+EOF
+
+printf '\6\n\316\nxy\n\253c\n' > exp-x || framework_failure_
+
+sed -f prog-x in-x > out-x || fail=1
+compare_ exp-x out-x || fail=1
+
+if test "$fail" -eq 1 ; then
+ od -tx1c prog-x
+ od -tx1c exp-x
+ od -tx1c out-x
+fi
+
+
+# for completeness, cover all possible letters/digits
+
+printf "%s\n" a a a a a a a a a a a > cnv-num-in || framework_failure_
+cat << \EOF > cnv-num-prog || framework_failure_
+1s/./\x01/
+2s/./\x23/
+3s/./\x45/
+4s/./\x67/
+5s/./\x89/
+6s/./\xAB/
+7s/./\xab/
+8s/./\xCD/
+9s/./\xcd/
+10s/./\xef/
+11s/./\xEF/
+EOF
+
+printf '\1\n#\nE\ng\n\211\n\253\n\253\n\315\n\315\n\357\n\357\n' \
+ > cnv-num-exp || framework_failure_
+
+sed -f cnv-num-prog cnv-num-in > cnv-num-out || fail=1
+compare_ cnv-num-exp cnv-num-out || fail=1
+
+Exit $fail
diff --git a/testsuite/dc.inp b/testsuite/dc.inp
index e4b731b..95e17a4 100644
--- a/testsuite/dc.inp
+++ b/testsuite/dc.inp
@@ -11,4 +11,4 @@ d[30+]s@0>@d[[1+]s@lg11<@]s@25=@d[1+]s@24=@se44le-d[30+]s@21>@dld+7%-7+
# Compute square root of 2
-16oAk2vpq \ No newline at end of file
+16oAk2vpq
diff --git a/testsuite/distrib.sh b/testsuite/distrib.sh
index dbadbdc..21e4c08 100644
--- a/testsuite/distrib.sh
+++ b/testsuite/distrib.sh
@@ -1,7 +1,7 @@
#! /bin/sh
#
# This is stolen from C News
-#
+#
#
diff --git a/testsuite/envvar-check b/testsuite/envvar-check
new file mode 100644
index 0000000..ad672fa
--- /dev/null
+++ b/testsuite/envvar-check
@@ -0,0 +1,64 @@
+# -*- sh -*-
+# Check environment variables for sane values while testing.
+
+# Copyright (C) 2000-2016 Free Software Foundation, Inc.
+
+# This 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/>.
+
+if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
+ as_unset=unset
+else
+ as_unset=false
+fi
+
+envvar_check_fail=0
+vars='
+ _POSIX2_VERSION
+ _STDBUF_E
+ _STDBUF_I
+ _STDBUF_O
+ BASH_ENV
+ BLOCKSIZE
+ BLOCK_SIZE
+ CDPATH
+ COLS
+ COLUMNS
+ DF_BLOCK_SIZE
+ DU_BLOCK_SIZE
+ ENV
+ LANGUAGE
+ LS_BLOCK_SIZE
+ LS_COLORS
+ OMP_NUM_THREADS
+ POSIXLY_CORRECT
+ QUOTING_STYLE
+ SIMPLE_BACKUP_SUFFIX
+ TABSIZE
+ TERM
+ COLORTERM
+ TIME_STYLE
+ TMPDIR
+ VERSION_CONTROL
+'
+for var in $vars
+do
+ $as_unset $var
+ if eval test \"\${$var+set}\" = set; then
+ echo "$0: the $var environment variable is set --" \
+ ' unset it and rerun this test' >&2
+ envvar_check_fail=1
+ fi
+done
+
+test "$envvar_check_fail" = 1 && exit 1
diff --git a/testsuite/eval.good b/testsuite/eval.good
index 6fd021b..4d2a8ff 100644
--- a/testsuite/eval.good
+++ b/testsuite/eval.good
@@ -13,28 +13,28 @@ cpu
17380: 2 2 5 11 79
cpu
---
- abcd
+ abcd
---
- abcd
+ abcd
---
- abcd
+ abcd
---
17380: 2 2 5 11 79
- cpu
+ cpu
---
17380: 2 2 5 11 79
- cpu
+ cpu
---
17380: 2 2 5 11 79
- cpu
+ cpu
---
Doing some more tests -----------------------
17380: 2 2 5 11 79
---
-../sed/sed 1q eval.in2
+./sed/sed 1q eval.in2
---
17380: 2 2 5 11 79
---
-../sed/sed 1q eval.in2
+./sed/sed 1q eval.in2
---
-../sed/sed 1q eval.in2
+./sed/sed 1q eval.in2
diff --git a/testsuite/eval.inp b/testsuite/eval.inp
index 4e30989..6c3df08 100644
--- a/testsuite/eval.inp
+++ b/testsuite/eval.inp
@@ -1,5 +1,5 @@
17380: 2 2 5 11 79
abcd
cpu
- abcd
- cpu
+ abcd
+ cpu
diff --git a/testsuite/eval.sed b/testsuite/eval.sed
index 5734786..1223419 100644
--- a/testsuite/eval.sed
+++ b/testsuite/eval.sed
@@ -2,7 +2,7 @@
#Try eval command
/cpu/!b2
- e../sed/sed 1q eval.in2
+ e./sed/sed 1q eval.in2
:2
p
@@ -10,7 +10,7 @@ i---
h
#Try eval option
- s,.* *cpu *,../sed/sed 1q eval.in2; echo "&",e
+ s,.* *cpu *,./sed/sed 1q eval.in2; echo "&",e
:3
p
@@ -19,7 +19,7 @@ i---
h
#Try eval option with print
- s,.* *cpu.*,../sed/sed 1q eval.in2,ep
+ s,.* *cpu.*,./sed/sed 1q eval.in2,ep
g
@@ -31,11 +31,11 @@ $!d
#Do some more tests
s/.*/Doing some more tests -----------------------/p
-s,.*,../sed/sed 1q eval.in2,ep
+s,.*,./sed/sed 1q eval.in2,ep
i---
-s,.*,../sed/sed 1q eval.in2,pe
+s,.*,./sed/sed 1q eval.in2,pe
i---
-s,.*,../sed/sed 1q eval.in2,
+s,.*,./sed/sed 1q eval.in2,
h
e
p
diff --git a/testsuite/execute-tests.sh b/testsuite/execute-tests.sh
new file mode 100644
index 0000000..2075c6f
--- /dev/null
+++ b/testsuite/execute-tests.sh
@@ -0,0 +1,145 @@
+#!/bin/sh
+# Test execution less-common cases
+
+# Copyright (C) 2016 Free Software Foundation, Inc.
+
+# This 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/>.
+. "${srcdir=.}/testsuite/init.sh"; path_prepend_ ./sed
+print_ver_ sed
+
+fail=0
+
+
+#
+# 'D' when pattern-space has no newline (act like 'd')
+#
+echo a | sed 1D > out1 || fail=1
+compare_ /dev/null out1 || fail=1
+
+#
+# s///e with a command that returns zero output
+#
+printf "\n" > exp2 || framework_failure_
+echo "" | sed '1etrue' > out2 || fail=1
+compare_ exp2 out2 || fail=1
+
+
+#
+# plain 'e' with a command that returns non-delimted output
+#
+printf "a\n" > exp3 || framework_failure_
+echo "printf a" | sed '1e' > out3 || fail=1
+compare_ exp3 out3 || fail=1
+
+#
+# plain 'e' with a command that returns delimted '\n' output
+# (implementation note: the delimiter is first chomp'd)
+printf "a\n" > exp4 || framework_failure_
+echo "echo a" | sed '1e' > out4 || fail=1
+compare_ exp4 out4 || fail=1
+
+#
+# e with a command that returns delimted '\0' output
+#
+printf "b\0" > exp5 || framework_failure_
+# This input file contains the shell command to be excuted:
+printf 'cat exp5' > in5 || framework_failure_
+sed -z '1e' <in5 > out5 || fail=1
+compare_ exp5 out5 || fail=1
+
+if test "$fail" -eq 1 ; then
+ od -tx1c exp5
+ od -tx1c out5
+fi
+
+#
+# 'P' command, with and without '\n' in the pattern space
+#
+echo a > in6 || framework_failure_
+printf "%s\n" a b | sed -n 'N;P' > out6 || fail=1
+compare_ in6 out6 || fail=1
+
+printf "%s\n" a | sed -n 'P' > out7 || fail=1
+compare_ in6 out7 || fail=1
+
+#
+# 'Q' with exit code
+#
+echo a > in7 || framework_failure_
+returns_ 42 sed '1Q42' in7 || fail=1
+
+#
+# 'r' without a filename (silently ignored)
+#
+echo c > in8 || framework_failure_
+sed 'rfoo.bar' in8 > out8 || fail=1
+compare_ in8 out8 || fail=1
+
+#
+# 'W' without a filename (silently ignored)
+#
+echo d > in9 || framework_failure_
+sed 'Wfoo1' in9 > out9 || fail=1
+compare_ in9 out9 || fail=1
+
+#
+# 'W', with and without '\n' in pattern space
+#
+
+# pattern-space with '\n', only 'a' should be written
+printf "%s\n" a b > in10 || framework_failure_
+echo a > a || framework_failure_
+sed 'N;Ww1.txt' in10 > out10 || fail=1
+compare_ a w1.txt || fail=1
+compare_ in10 out10 || fail=1
+
+# pattern-space without '\n', entire pattern-space ('a') should be written
+sed 'Ww2.txt' a > out11 || fail=1
+compare_ a out11 || fail=1
+compare_ a w2.txt || fail=1
+
+
+#
+# 'T' command
+#
+
+# Unsuccessful substitute, 'T' jumps to 'skip'.
+echo a | sed -n 's/X/Y/ ; Tskip ; Q42 ; :skip' || fail=1
+
+# Successful substitute, 'T' does not jumps to 'skip', sed exits with code 42.
+echo a | returns_ 42 sed -n 's/a/Y/ ; Tskip ; Q42 ; :skip' || fail=1
+
+
+#
+# 'F' command
+#
+echo a > in12 || framework_failure_
+printf "%s\n" in12 a > exp12 || framework_failure_
+sed F in12 > out12 || fail=1
+compare_ exp12 out12 || fail=1
+
+# 'F' with multiple files
+echo b > in13 || framework_failure_
+echo c > in14 || framework_failure_
+printf "%s\n" in12 a in13 b in14 c > exp14 || framework_failure_
+sed F in12 in13 in14 > out14 || fail=1
+compare_ exp14 out14 || fail=1
+
+# 'F' with stdin
+printf "%s\n" - a > exp15 || framework_failure_
+sed F < in12 > out15 || fail=1
+compare_ exp15 out15 || fail=1
+
+
+Exit $fail
diff --git a/testsuite/fasts.sed b/testsuite/fasts.sed
index 5e482f7..fb5161b 100644
--- a/testsuite/fasts.sed
+++ b/testsuite/fasts.sed
@@ -41,6 +41,3 @@ g
s/b$//
p
g
-
-
-
diff --git a/testsuite/flipcase.sed b/testsuite/flipcase.sed
index 211d0d0..7e8edc6 100644
--- a/testsuite/flipcase.sed
+++ b/testsuite/flipcase.sed
@@ -1 +1 @@
-s,\([^A-Za-z]*\)\([A-Za-z]*\),\1\L\u\2,g \ No newline at end of file
+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
new file mode 100755
index 0000000..fc04fe9
--- /dev/null
+++ b/testsuite/follow-symlinks-stdin.sh
@@ -0,0 +1,29 @@
+#!/bin/sh
+# Verify that --follow-symlinks does not break reading from stdin.
+
+# Copyright (C) 2015-2016 Free Software Foundation, Inc.
+
+# This 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/>.
+. "${srcdir=.}/testsuite/init.sh"; path_prepend_ ./sed
+print_ver_ sed
+
+echo dbc > exp-out || framework_failure_
+
+fail=0
+echo abc | sed --follow-symlinks s/a/d/ > out 2> err || fail=1
+
+compare exp-out out || fail=1
+compare /dev/null err || fail=1
+
+Exit $fail
diff --git a/testsuite/follow-symlinks.sh b/testsuite/follow-symlinks.sh
new file mode 100644
index 0000000..09dde3f
--- /dev/null
+++ b/testsuite/follow-symlinks.sh
@@ -0,0 +1,74 @@
+#!/bin/sh
+# Test --follow-symlinks option
+
+# Copyright (C) 2016 Free Software Foundation, Inc.
+
+# This 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/>.
+. "${srcdir=.}/testsuite/init.sh"; path_prepend_ ./sed
+print_ver_ sed
+
+fail=0
+
+#
+# 'F' with/out follow-symlinks
+#
+echo dummy > a || framework_failure_
+ln -s a la1 || framework_failure_
+ln -s la1 la2 || framework_failure_
+
+echo a > exp-a || framework_failure_
+echo la1 > exp-la1 || framework_failure_
+
+# Sanity-check: the real file
+sed 'F;Q' a > out-a || fail=1
+compare_ exp-a out-a || fail=1
+
+# Without follow-symlinks
+sed -n 'F' la1 > out-la1 || fail=1
+compare_ exp-la1 out-la1 || fail=1
+
+# With follow-symlinks
+sed -n --follow-symlinks 'F' la1 > out-la1-flw || fail=1
+compare_ exp-a out-la1-flw || fail=1
+
+# With follow-symlinks and two levels of indirections
+sed -n --follow-symlinks 'F' la2 > out-la2-flw || fail=1
+compare_ exp-a out-la2-flw || fail=1
+
+# Two symlinks input
+# (implementation note: utils.c:follow_symlinks() uses a static buffer
+# which will be non-empty on the second invocation)
+printf "%s\n" a a > exp-two-symlinks || framework_failure_
+sed --follow-symlinks -n 'F' la1 la2 > out-two-symlinks || fail=1
+compare_ exp-two-symlinks out-two-symlinks || fail=1
+
+# non-existing input with --follow-symlink
+# implementation note: lstat() will be called before open(), thus 'cannot stat'.
+cat <<\EOF >exp-stat || framework_failure_
+sed: cannot stat badfile:
+EOF
+returns_ 4 sed --follow-symlinks 'F' badfile >/dev/null 2>err-stat || fail=1
+
+# trim the filename/errno message (using sed itself...)
+sed -i 's/badfile:.*$/badfile:/' err-stat || framework_failure_
+compare_ exp-stat err-stat || fail=1
+
+
+# symlinks with absolute path
+ln -s "$PWD/a" la-abs || framework_failure_
+echo "$PWD/a" > exp-la-abs || framework_failure_
+sed -n --follow-symlinks 'F' la-abs > out-la-abs || fail=1
+compare_ exp-la-abs out-la-abs || fail=1
+
+Exit $fail
diff --git a/testsuite/get-mb-cur-max.c b/testsuite/get-mb-cur-max.c
new file mode 100644
index 0000000..403beb4
--- /dev/null
+++ b/testsuite/get-mb-cur-max.c
@@ -0,0 +1,37 @@
+/* Auxiliary program to detect support for a locale.
+ Copyright 2010-2016 Free Software Foundation, Inc.
+
+ This 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, 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 "progname.h"
+
+int
+main (int argc, char **argv)
+{
+ set_program_name (argv[0]);
+ if (1 < argc && setlocale (LC_ALL, argv[1]))
+ {
+ printf ("%d\n", (int) MB_CUR_MAX);
+ exit (EXIT_SUCCESS);
+ }
+
+ exit (EXIT_FAILURE);
+}
diff --git a/testsuite/help-version.sh b/testsuite/help-version.sh
new file mode 100755
index 0000000..c93e51e
--- /dev/null
+++ b/testsuite/help-version.sh
@@ -0,0 +1,276 @@
+#! /bin/sh
+# Make sure all of these programs work properly
+# when invoked with --help or --version.
+
+# Copyright (C) 2000-2016 Free Software Foundation, Inc.
+
+# This 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/>.
+
+# Ensure that $SHELL is set to *some* value and exported.
+# This is required for dircolors, which would fail e.g., when
+# invoked via debuild (which removes SHELL from the environment).
+test "x$SHELL" = x && SHELL=/bin/sh
+export SHELL
+
+. "${srcdir=.}/testsuite/init.sh"; path_prepend_ ./sed
+
+expected_failure_status_chroot=125
+expected_failure_status_env=125
+expected_failure_status_nice=125
+expected_failure_status_nohup=125
+expected_failure_status_stdbuf=125
+expected_failure_status_timeout=125
+expected_failure_status_printenv=2
+expected_failure_status_tty=3
+expected_failure_status_sort=2
+expected_failure_status_expr=3
+expected_failure_status_lbracket=2
+expected_failure_status_dir=2
+expected_failure_status_ls=2
+expected_failure_status_vdir=2
+
+expected_failure_status_cmp=2
+expected_failure_status_zcmp=2
+expected_failure_status_sdiff=2
+expected_failure_status_diff3=2
+expected_failure_status_diff=2
+expected_failure_status_zdiff=2
+expected_failure_status_zgrep=2
+expected_failure_status_zegrep=2
+expected_failure_status_zfgrep=2
+
+expected_failure_status_grep=2
+expected_failure_status_egrep=2
+expected_failure_status_fgrep=2
+
+expected_failure_status_sed=4
+
+test "$built_programs" \
+ || fail_ "built_programs not specified!?!"
+
+test "$VERSION" \
+ || fail_ "set envvar VERSION; it is required for a PATH sanity-check"
+
+# Extract version from --version output of the first program
+for i in $built_programs; do
+ v=$(env $i --version | sed -n '1s/.* //p;q')
+ break
+done
+
+# Ensure that it matches $VERSION.
+test "x$v" = "x$VERSION" \
+ || fail_ "--version-\$VERSION mismatch"
+
+for i in $built_programs; do
+
+ # Skip 'test'; it doesn't accept --help or --version.
+ test $i = test && continue
+
+ # false fails even when invoked with --help or --version.
+ # true and false are tested with these options separately.
+ test $i = false || test $i = true && continue
+
+ # The just-built install executable is always named 'ginstall'.
+ test $i = install && i=ginstall
+
+ # Make sure they exit successfully, under normal conditions.
+ env $i --help >/dev/null || fail=1
+ env $i --version >/dev/null || fail=1
+
+ # Make sure they fail upon 'disk full' error.
+ if test -w /dev/full && test -c /dev/full; then
+ env $i --help >/dev/full 2>/dev/null && fail=1
+ env $i --version >/dev/full 2>/dev/null && fail=1
+ status=$?
+ test $i = [ && prog=lbracket || prog=$(echo $i|sed "s/$EXEEXT$//")
+ eval "expected=\$expected_failure_status_$prog"
+ test x$expected = x && expected=1
+ if test $status = $expected; then
+ : # ok
+ else
+ fail=1
+ echo "*** $i: bad exit status '$status' (expected $expected)," 1>&2
+ echo " with --help or --version output redirected to /dev/full" 1>&2
+ fi
+ fi
+done
+
+bigZ_in=bigZ-in.Z
+zin=zin.gz
+zin2=zin2.gz
+
+tmp=tmp-$$
+tmp_in=in-$$
+tmp_in2=in2-$$
+tmp_dir=dir-$$
+tmp_out=out-$$
+mkdir $tmp || fail=1
+cd $tmp || fail=1
+
+comm_setup () { args="$tmp_in $tmp_in"; }
+csplit_setup () { args="$tmp_in //"; }
+cut_setup () { args='-f 1'; }
+join_setup () { args="$tmp_in $tmp_in"; }
+tr_setup () { args='a a'; }
+
+chmod_setup () { args="a+x $tmp_in"; }
+# Punt on these.
+chgrp_setup () { args=--version; }
+chown_setup () { args=--version; }
+mkfifo_setup () { args=--version; }
+mknod_setup () { args=--version; }
+# Punt on uptime, since it fails (e.g., failing to get boot time)
+# on some systems, and we shouldn't let that stop 'make check'.
+uptime_setup () { args=--version; }
+
+# Create a file in the current directory, not in $TMPDIR.
+mktemp_setup () { args=mktemp.XXXX; }
+
+cmp_setup () { args="$tmp_in $tmp_in2"; }
+
+# Tell dd not to print the line with transfer rate and total.
+# The transfer rate would vary between runs.
+dd_setup () { args=status=noxfer; }
+
+zdiff_setup () { args="$zin $zin2"; }
+zcmp_setup () { args="$zin $zin2"; }
+zcat_setup () { args=$zin; }
+gunzip_setup () { args=$zin; }
+zmore_setup () { args=$zin; }
+zless_setup () { args=$zin; }
+znew_setup () { args=$bigZ_in; }
+zforce_setup () { args=$zin; }
+zgrep_setup () { args="z $zin"; }
+zegrep_setup () { args="z $zin"; }
+zfgrep_setup () { args="z $zin"; }
+gzexe_setup () { args=$tmp_in; }
+
+# We know that $tmp_in contains a "0"
+grep_setup () { args="0 $tmp_in"; }
+egrep_setup () { args="0 $tmp_in"; }
+fgrep_setup () { args="0 $tmp_in"; }
+
+sed_setup () { args="s/a/b/ $tmp_in"; }
+
+diff_setup () { args="$tmp_in $tmp_in2"; }
+sdiff_setup () { args="$tmp_in $tmp_in2"; }
+diff3_setup () { args="$tmp_in $tmp_in2 $tmp_in2"; }
+cp_setup () { args="$tmp_in $tmp_in2"; }
+ln_setup () { args="$tmp_in ln-target"; }
+ginstall_setup () { args="$tmp_in $tmp_in2"; }
+mv_setup () { args="$tmp_in $tmp_in2"; }
+mkdir_setup () { args=$tmp_dir/subdir; }
+realpath_setup () { args=$tmp_in; }
+rmdir_setup () { args=$tmp_dir; }
+rm_setup () { args=$tmp_in; }
+shred_setup () { args=$tmp_in; }
+touch_setup () { args=$tmp_in2; }
+truncate_setup () { args="--reference=$tmp_in $tmp_in2"; }
+
+mkid_setup () { printf 'f(){}\ntypedef int t;\n' > f.c; args=. ; }
+lid_setup () { args=; }
+fid_setup () { args=f.c; }
+fnid_setup () { args=; }
+xtokid_setup () { args=; }
+aid_setup () { args=f; }
+eid_setup () { args=--version; }
+gid_setup () { args=f; }
+defid_setup () { args=t; }
+
+basename_setup () { args=$tmp_in; }
+dirname_setup () { args=$tmp_in; }
+expr_setup () { args=foo; }
+
+# Punt, in case GNU 'id' hasn't been installed yet.
+groups_setup () { args=--version; }
+
+pathchk_setup () { args=$tmp_in; }
+yes_setup () { args=--version; }
+logname_setup () { args=--version; }
+nohup_setup () { args=--version; }
+printf_setup () { args=foo; }
+seq_setup () { args=10; }
+sleep_setup () { args=0; }
+stdbuf_setup () { args="-oL true"; }
+timeout_setup () { args=--version; }
+
+# I'd rather not run sync, since it spins up disks that I've
+# deliberately caused to spin down (but not unmounted).
+sync_setup () { args=--version; }
+
+test_setup () { args=foo; }
+
+# This is necessary in the unusual event that there is
+# no valid entry in /etc/mtab.
+df_setup () { args=/; }
+
+# This is necessary in the unusual event that getpwuid (getuid ()) fails.
+id_setup () { args=-u; }
+
+# Use env to avoid invoking built-in sleep of Solaris 11's /bin/sh.
+kill_setup () {
+ env sleep 31.5 &
+ args=$!
+}
+
+link_setup () { args="$tmp_in link-target"; }
+unlink_setup () { args=$tmp_in; }
+
+readlink_setup () {
+ ln -s . slink
+ args=slink;
+}
+
+stat_setup () { args=$tmp_in; }
+unlink_setup () { args=$tmp_in; }
+lbracket_setup () { args=": ]"; }
+
+parted_setup () { args="-s $tmp_in mklabel gpt"
+ dd if=/dev/null of=$tmp_in seek=2000; }
+
+# Ensure that each program "works" (exits successfully) when doing
+# something more than --help or --version.
+for i in $built_programs; do
+ # Skip these.
+ case $i in chroot|stty|tty|false|chcon|runcon|coreutils) continue;; esac
+
+ rm -rf $tmp_in $tmp_in2 $tmp_dir $tmp_out $bigZ_in $zin $zin2
+ echo z |gzip > $zin
+ cp $zin $zin2
+ cp $zin $bigZ_in
+
+ # This is sort of kludgey: use numbers so this is valid input for factor,
+ # and two tokens so it's valid input for tsort.
+ echo 2147483647 0 > $tmp_in
+ # Make $tmp_in2 identical. Then, using $tmp_in and $tmp_in2 as arguments
+ # to the likes of cmp and diff makes them exit successfully.
+ cp $tmp_in $tmp_in2
+ mkdir $tmp_dir
+ # echo ================== $i
+ test $i = [ && prog=lbracket || prog=$(echo $i|sed "s/$EXEEXT$//")
+ if type ${prog}_setup > /dev/null 2>&1; then
+ ${prog}_setup
+ else
+ args=
+ fi
+ if env $i $args < $tmp_in > $tmp_out; then
+ : # ok
+ else
+ echo FAIL: $i
+ fail=1
+ fi
+ rm -rf $tmp_in $tmp_in2 $tmp_out $tmp_dir
+done
+
+Exit $fail
diff --git a/testsuite/in-place-hyphen.sh b/testsuite/in-place-hyphen.sh
new file mode 100755
index 0000000..8b6752e
--- /dev/null
+++ b/testsuite/in-place-hyphen.sh
@@ -0,0 +1,30 @@
+#!/bin/sh
+# Verify that "-" is treated as a file name with --in-place.
+
+# Copyright (C) 2015-2016 Free Software Foundation, Inc.
+
+# This 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/>.
+. "${srcdir=.}/testsuite/init.sh"; path_prepend_ ./sed
+print_ver_ sed
+
+echo abc > ./- || framework_failure_
+echo aXc > exp-out || framework_failure_
+
+fail=0
+sed -i 's/b/X/' - > out 2> err || fail=1
+
+compare exp-out ./- || fail=1
+compare /dev/null err || fail=1
+
+Exit $fail
diff --git a/testsuite/in-place-suffix-backup.sh b/testsuite/in-place-suffix-backup.sh
new file mode 100644
index 0000000..6eaea82
--- /dev/null
+++ b/testsuite/in-place-suffix-backup.sh
@@ -0,0 +1,64 @@
+#!/bin/sh
+# Test -i/--inplace with backup suffixes
+
+# Copyright (C) 2016 Free Software Foundation, Inc.
+
+# This 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/>.
+. "${srcdir=.}/testsuite/init.sh"; path_prepend_ ./sed
+print_ver_ sed
+
+
+# create multiple uniquely-named input files
+# (the content does not matter for the first few)
+touch a b c d e || framework_failure_
+echo z > z || framework_failure_
+printf "1\nz\n" >> exp-z || framework_failure_
+
+
+# TODO: misleading error: the problem is the target filename of rename(2),
+# not the source filename.
+cat <<\EOF >exp-err-rename || framework_failure_
+sed: cannot rename ./e: No such file or directory
+EOF
+
+
+# simple backup suffix
+sed -i.bak = a || fail=1
+test -e a.bak || fail=1
+
+# backup suffix with explicit wildcard
+sed -i'*.foo' = b || fail=1
+test -e b.foo || fail=1
+
+sed -i'==*==' = c || fail=1
+test -e ==c== || fail=1
+
+# abuse the suffix-name resolver
+sed -i'*=*' = d || fail=1
+test -e d=d || fail=1
+
+# This fails (as expected, with the backup name resolving './e./e./e').
+# TODO: improve error message;
+# document why exit code is 4.
+returns_ 4 sed -i'***' = ./e 2>err-rename || fail=1
+compare_ exp-err-rename err-rename || fail=1
+
+# backup filename resolving to the same as the input filename,
+# silently ignored, backup not created (in execute.c:closedown() ).
+sed -i'*' = z || fail=1
+# ensure the input file was modified in-place
+compare_ exp-z z || fail=1
+
+
+Exit $fail
diff --git a/testsuite/inclib.good b/testsuite/inclib.good
index 6b1279a..cb04b39 100644
--- a/testsuite/inclib.good
+++ b/testsuite/inclib.good
@@ -1,34 +1,34 @@
- /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
+ /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
index 552e9e2..1f71277 100644
--- a/testsuite/inclib.inp
+++ b/testsuite/inclib.inp
@@ -1,34 +1,34 @@
- /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
+ /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/init.sh b/testsuite/init.sh
new file mode 100644
index 0000000..ee08022
--- /dev/null
+++ b/testsuite/init.sh
@@ -0,0 +1,613 @@
+# source this file; set up for tests
+
+# Copyright (C) 2009-2016 Free Software Foundation, Inc.
+
+# This 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/>.
+
+# Using this file in a test
+# =========================
+#
+# The typical skeleton of a test looks like this:
+#
+# #!/bin/sh
+# . "${srcdir=.}/init.sh"; path_prepend_ .
+# Execute some commands.
+# Note that these commands are executed in a subdirectory, therefore you
+# need to prepend "../" to relative filenames in the build directory.
+# Note that the "path_prepend_ ." is useful only if the body of your
+# test invokes programs residing in the initial directory.
+# For example, if the programs you want to test are in src/, and this test
+# script is named tests/test-1, then you would use "path_prepend_ ../src",
+# or perhaps export PATH='$(abs_top_builddir)/src$(PATH_SEPARATOR)'"$$PATH"
+# to all tests via automake's TESTS_ENVIRONMENT.
+# Set the exit code 0 for success, 77 for skipped, or 1 or other for failure.
+# Use the skip_ and fail_ functions to print a diagnostic and then exit
+# with the corresponding exit code.
+# Exit $?
+
+# Executing a test that uses this file
+# ====================================
+#
+# Running a single test:
+# $ make check TESTS=test-foo.sh
+#
+# Running a single test, with verbose output:
+# $ make check TESTS=test-foo.sh VERBOSE=yes
+#
+# Running a single test, with single-stepping:
+# 1. Go into a sub-shell:
+# $ bash
+# 2. Set relevant environment variables from TESTS_ENVIRONMENT in the
+# Makefile:
+# $ export srcdir=../../tests # this is an example
+# 3. Execute the commands from the test, copy&pasting them one by one:
+# $ . "$srcdir/init.sh"; path_prepend_ .
+# ...
+# 4. Finally
+# $ exit
+
+ME_=`expr "./$0" : '.*/\(.*\)$'`
+
+# 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.
+# Turn off errexit here so that we don't trip the bug with OSF1/Tru64
+# sh inside this function.
+Exit () { set +e; (exit $1); exit $1; }
+
+# Print warnings (e.g., about skipped and failed tests) to this file number.
+# Override by defining to say, 9, in init.cfg, and putting say,
+# export ...ENVVAR_SETTINGS...; $(SHELL) 9>&2
+# in the definition of TESTS_ENVIRONMENT in your tests/Makefile.am file.
+# This is useful when using automake's parallel tests mode, to print
+# the reason for skip/failure to console, rather than to the .log files.
+: ${stderr_fileno_=2}
+
+# Note that correct expansion of "$*" depends on IFS starting with ' '.
+# Always write the full diagnostic to stderr.
+# When stderr_fileno_ is not 2, also emit the first line of the
+# diagnostic to that file descriptor.
+warn_ ()
+{
+ # If IFS does not start with ' ', set it and emit the warning in a subshell.
+ case $IFS in
+ ' '*) printf '%s\n' "$*" >&2
+ test $stderr_fileno_ = 2 \
+ || { printf '%s\n' "$*" | sed 1q >&$stderr_fileno_ ; } ;;
+ *) (IFS=' '; warn_ "$@");;
+ esac
+}
+fail_ () { warn_ "$ME_: failed test: $@"; Exit 1; }
+skip_ () { warn_ "$ME_: skipped test: $@"; Exit 77; }
+fatal_ () { warn_ "$ME_: hard error: $@"; Exit 99; }
+framework_failure_ () { warn_ "$ME_: set-up failure: $@"; Exit 99; }
+
+# This is used to simplify checking of the return value
+# which is useful when ensuring a command fails as desired.
+# I.e., just doing `command ... &&fail=1` will not catch
+# a segfault in command for example. With this helper you
+# instead check an explicit exit code like
+# returns_ 1 command ... || fail
+returns_ () {
+ # Disable tracing so it doesn't interfere with stderr of the wrapped command
+ { set +x; } 2>/dev/null
+
+ local exp_exit="$1"
+ shift
+ "$@"
+ test $? -eq $exp_exit && ret_=0 || ret_=1
+
+ if test "$VERBOSE" = yes && test "$gl_set_x_corrupts_stderr_" = false; then
+ set -x
+ fi
+ { return $ret_; } 2>/dev/null
+}
+
+# Sanitize this shell to POSIX mode, if possible.
+DUALCASE=1; export DUALCASE
+if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
+ emulate sh
+ NULLCMD=:
+ alias -g '${1+"$@"}'='"$@"'
+ setopt NO_GLOB_SUBST
+else
+ case `(set -o) 2>/dev/null` in
+ *posix*) set -o posix ;;
+ esac
+fi
+
+# We require $(...) support unconditionally.
+# We require a few additional shell features only when $EXEEXT is nonempty,
+# in order to support automatic $EXEEXT emulation:
+# - hyphen-containing alias names
+# - we prefer to use ${var#...} substitution, rather than having
+# to work around lack of support for that feature.
+# The following code attempts to find a shell with support for these features.
+# If the current shell passes the test, we're done. Otherwise, test other
+# shells until we find one that passes. If one is found, re-exec it.
+# If no acceptable shell is found, skip the current test.
+#
+# The "...set -x; P=1 true 2>err..." test is to disqualify any shell that
+# emits "P=1" into err, as /bin/sh from SunOS 5.11 and OpenBSD 4.7 do.
+#
+# Use "9" to indicate success (rather than 0), in case some shell acts
+# like Solaris 10's /bin/sh but exits successfully instead of with status 2.
+
+# Eval this code in a subshell to determine a shell's suitability.
+# 10 - passes all tests; ok to use
+# 9 - ok, but enabling "set -x" corrupts app stderr; prefer higher score
+# ? - not ok
+gl_shell_test_script_='
+test $(echo y) = y || exit 1
+f_local_() { local v=1; }; f_local_ || exit 1
+score_=10
+if test "$VERBOSE" = yes; then
+ test -n "$( (exec 3>&1; set -x; P=1 true 2>&3) 2> /dev/null)" && score_=9
+fi
+test -z "$EXEEXT" && exit $score_
+shopt -s expand_aliases
+alias a-b="echo zoo"
+v=abx
+ test ${v%x} = ab \
+ && test ${v#a} = bx \
+ && test $(a-b) = zoo \
+ && exit $score_
+'
+
+if test "x$1" = "x--no-reexec"; then
+ shift
+else
+ # Assume a working shell. Export to subshells (setup_ needs this).
+ gl_set_x_corrupts_stderr_=false
+ export gl_set_x_corrupts_stderr_
+
+ # Record the first marginally acceptable shell.
+ marginal_=
+
+ # Search for a shell that meets our requirements.
+ for re_shell_ in __current__ "${CONFIG_SHELL:-no_shell}" \
+ /bin/sh bash dash zsh pdksh fail
+ do
+ test "$re_shell_" = no_shell && continue
+
+ # If we've made it all the way to the sentinel, "fail" without
+ # finding even a marginal shell, skip this test.
+ if test "$re_shell_" = fail; then
+ test -z "$marginal_" && skip_ failed to find an adequate shell
+ re_shell_=$marginal_
+ break
+ fi
+
+ # When testing the current shell, simply "eval" the test code.
+ # Otherwise, run it via $re_shell_ -c ...
+ if test "$re_shell_" = __current__; then
+ # 'eval'ing this code makes Solaris 10's /bin/sh exit with
+ # $? set to 2. It does not evaluate any of the code after the
+ # "unexpected" first '('. Thus, we must run it in a subshell.
+ ( eval "$gl_shell_test_script_" ) > /dev/null 2>&1
+ else
+ "$re_shell_" -c "$gl_shell_test_script_" 2>/dev/null
+ fi
+
+ st_=$?
+
+ # $re_shell_ works just fine. Use it.
+ if test $st_ = 10; then
+ gl_set_x_corrupts_stderr_=false
+ break
+ fi
+
+ # If this is our first marginally acceptable shell, remember it.
+ if test "$st_:$marginal_" = 9: ; then
+ marginal_="$re_shell_"
+ gl_set_x_corrupts_stderr_=true
+ fi
+ done
+
+ if test "$re_shell_" != __current__; then
+ # Found a usable shell. Preserve -v and -x.
+ case $- in
+ *v*x* | *x*v*) opts_=-vx ;;
+ *v*) opts_=-v ;;
+ *x*) opts_=-x ;;
+ *) opts_= ;;
+ esac
+ re_shell=$re_shell_
+ export re_shell
+ exec "$re_shell_" $opts_ "$0" --no-reexec "$@"
+ echo "$ME_: exec failed" 1>&2
+ exit 127
+ fi
+fi
+
+# If this is bash, turn off all aliases.
+test -n "$BASH_VERSION" && unalias -a
+
+# Note that when supporting $EXEEXT (transparently mapping from PROG_NAME to
+# PROG_NAME.exe), we want to support hyphen-containing names like test-acos.
+# 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
+
+# Enable glibc's malloc-perturbing option.
+# This is useful for exposing code that depends on the fact that
+# malloc-related functions often return memory that is mostly zeroed.
+# If you have the time and cycles, use valgrind to do an even better job.
+: ${MALLOC_PERTURB_=87}
+export MALLOC_PERTURB_
+
+# This is a stub function that is run upon trap (upon regular exit and
+# interrupt). Override it with a per-test function, e.g., to unmount
+# a partition, or to undo any other global state changes.
+cleanup_ () { :; }
+
+# Emit a header similar to that from diff -u; Print the simulated "diff"
+# command so that the order of arguments is clear. Don't bother with @@ lines.
+emit_diff_u_header_ ()
+{
+ printf '%s\n' "diff -u $*" \
+ "--- $1 1970-01-01" \
+ "+++ $2 1970-01-01"
+}
+
+# Arrange not to let diff or cmp operate on /dev/null,
+# since on some systems (at least OSF/1 5.1), that doesn't work.
+# When there are not two arguments, or no argument is /dev/null, return 2.
+# When one argument is /dev/null and the other is not empty,
+# cat the nonempty file to stderr and return 1.
+# Otherwise, return 0.
+compare_dev_null_ ()
+{
+ test $# = 2 || return 2
+
+ if test "x$1" = x/dev/null; then
+ test -s "$2" || return 0
+ emit_diff_u_header_ "$@"; sed 's/^/+/' "$2"
+ return 1
+ fi
+
+ if test "x$2" = x/dev/null; then
+ test -s "$1" || return 0
+ emit_diff_u_header_ "$@"; sed 's/^/-/' "$1"
+ return 1
+ fi
+
+ return 2
+}
+
+if diff_out_=`exec 2>/dev/null; diff -u "$0" "$0" < /dev/null` \
+ && diff -u Makefile "$0" 2>/dev/null | grep '^[+]#!' >/dev/null; then
+ # diff accepts the -u option and does not (like AIX 7 'diff') produce an
+ # extra space on column 1 of every content line.
+ if test -z "$diff_out_"; then
+ compare_ () { diff -u "$@"; }
+ else
+ compare_ ()
+ {
+ if diff -u "$@" > diff.out; then
+ # No differences were found, but Solaris 'diff' produces output
+ # "No differences encountered". Hide this output.
+ rm -f diff.out
+ true
+ else
+ cat diff.out
+ rm -f diff.out
+ false
+ fi
+ }
+ fi
+elif diff_out_=`exec 2>/dev/null; diff -c "$0" "$0" < /dev/null`; then
+ if test -z "$diff_out_"; then
+ compare_ () { diff -c "$@"; }
+ else
+ compare_ ()
+ {
+ if diff -c "$@" > diff.out; then
+ # No differences were found, but AIX and HP-UX 'diff' produce output
+ # "No differences encountered" or "There are no differences between the
+ # files.". Hide this output.
+ rm -f diff.out
+ true
+ else
+ cat diff.out
+ rm -f diff.out
+ false
+ fi
+ }
+ fi
+elif cmp -s /dev/null /dev/null 2>/dev/null; then
+ compare_ () { cmp -s "$@"; }
+else
+ compare_ () { cmp "$@"; }
+fi
+
+# Usage: compare EXPECTED ACTUAL
+#
+# Given compare_dev_null_'s preprocessing, defer to compare_ if 2 or more.
+# Otherwise, propagate $? to caller: any diffs have already been printed.
+compare ()
+{
+ # This looks like it can be factored to use a simple "case $?"
+ # after unchecked compare_dev_null_ invocation, but that would
+ # fail in a "set -e" environment.
+ if compare_dev_null_ "$@"; then
+ return 0
+ else
+ case $? in
+ 1) return 1;;
+ *) compare_ "$@";;
+ esac
+ fi
+}
+
+# An arbitrary prefix to help distinguish test directories.
+testdir_prefix_ () { printf gt; }
+
+# Run the user-overridable cleanup_ function, remove the temporary
+# directory and exit with the incoming value of $?.
+remove_tmp_ ()
+{
+ __st=$?
+ cleanup_
+ # cd out of the directory we're about to remove
+ cd "$initial_cwd_" || cd / || cd /tmp
+ chmod -R u+rwx "$test_dir_"
+ # If removal fails and exit status was to be 0, then change it to 1.
+ rm -rf "$test_dir_" || { test $__st = 0 && __st=1; }
+ exit $__st
+}
+
+# Given a directory name, DIR, if every entry in it that matches *.exe
+# contains only the specified bytes (see the case stmt below), then print
+# a space-separated list of those names and return 0. Otherwise, don't
+# print anything and return 1. Naming constraints apply also to DIR.
+find_exe_basenames_ ()
+{
+ feb_dir_=$1
+ feb_fail_=0
+ feb_result_=
+ feb_sp_=
+ for feb_file_ in $feb_dir_/*.exe; do
+ # If there was no *.exe file, or there existed a file named "*.exe" that
+ # was deleted between the above glob expansion and the existence test
+ # below, just skip it.
+ test "x$feb_file_" = "x$feb_dir_/*.exe" && test ! -f "$feb_file_" \
+ && continue
+ # Exempt [.exe, since we can't create a function by that name, yet
+ # we can't invoke [ by PATH search anyways due to shell builtins.
+ test "x$feb_file_" = "x$feb_dir_/[.exe" && continue
+ case $feb_file_ in
+ *[!-a-zA-Z/0-9_.+]*) feb_fail_=1; break;;
+ *) # Remove leading file name components as well as the .exe suffix.
+ feb_file_=${feb_file_##*/}
+ feb_file_=${feb_file_%.exe}
+ feb_result_="$feb_result_$feb_sp_$feb_file_";;
+ esac
+ feb_sp_=' '
+ done
+ test $feb_fail_ = 0 && printf %s "$feb_result_"
+ return $feb_fail_
+}
+
+# Consider the files in directory, $1.
+# For each file name of the form PROG.exe, create an alias named
+# PROG that simply invokes PROG.exe, then return 0. If any selected
+# file name or the directory name, $1, contains an unexpected character,
+# define no alias and return 1.
+create_exe_shims_ ()
+{
+ case $EXEEXT in
+ '') return 0 ;;
+ .exe) ;;
+ *) echo "$0: unexpected \$EXEEXT value: $EXEEXT" 1>&2; return 1 ;;
+ esac
+
+ base_names_=`find_exe_basenames_ $1` \
+ || { echo "$0 (exe_shim): skipping directory: $1" 1>&2; return 0; }
+
+ if test -n "$base_names_"; then
+ for base_ in $base_names_; do
+ alias "$base_"="$base_$EXEEXT"
+ done
+ fi
+
+ return 0
+}
+
+# Use this function to prepend to PATH an absolute name for each
+# specified, possibly-$initial_cwd_-relative, directory.
+path_prepend_ ()
+{
+ while test $# != 0; do
+ path_dir_=$1
+ case $path_dir_ in
+ '') fail_ "invalid path dir: '$1'";;
+ /*) 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_'";;
+ esac
+ PATH="$abs_path_dir_:$PATH"
+
+ # Create an alias, FOO, for each FOO.exe in this directory.
+ create_exe_shims_ "$abs_path_dir_" \
+ || fail_ "something failed (above): $abs_path_dir_"
+ shift
+ done
+ export PATH
+}
+
+setup_ ()
+{
+ if test "$VERBOSE" = yes; then
+ # Test whether set -x may cause the selected shell to corrupt an
+ # application's stderr. Many do, including zsh-4.3.10 and the /bin/sh
+ # from SunOS 5.11, OpenBSD 4.7 and Irix 5.x and 6.5.
+ # If enabling verbose output this way would cause trouble, simply
+ # issue a warning and refrain.
+ if $gl_set_x_corrupts_stderr_; then
+ warn_ "using SHELL=$SHELL with 'set -x' corrupts stderr"
+ else
+ set -x
+ fi
+ fi
+
+ initial_cwd_=$PWD
+ fail=0
+
+ pfx_=`testdir_prefix_`
+ test_dir_=`mktempd_ "$initial_cwd_" "$pfx_-$ME_.XXXX"` \
+ || fail_ "failed to create temporary directory in $initial_cwd_"
+ cd "$test_dir_" || fail_ "failed to cd to temporary directory"
+
+ # As autoconf-generated configure scripts do, ensure that IFS
+ # is defined initially, so that saving and restoring $IFS works.
+ gl_init_sh_nl_='
+'
+ IFS=" "" $gl_init_sh_nl_"
+
+ # This trap statement, along with a trap on 0 below, ensure that the
+ # temporary directory, $test_dir_, is removed upon exit as well as
+ # upon receipt of any of the listed signals.
+ for sig_ in 1 2 3 13 15; do
+ eval "trap 'Exit $(expr $sig_ + 128)' $sig_"
+ done
+}
+
+# Create a temporary directory, much like mktemp -d does.
+# Written by Jim Meyering.
+#
+# Usage: mktempd_ /tmp phoey.XXXXXXXXXX
+#
+# First, try to use the mktemp program.
+# Failing that, we'll roll our own mktemp-like function:
+# - try to get random bytes from /dev/urandom
+# - failing that, generate output from a combination of quickly-varying
+# sources and gzip. Ignore non-varying gzip header, and extract
+# "random" bits from there.
+# - given those bits, map to file-name bytes using tr, and try to create
+# the desired directory.
+# - make only $MAX_TRIES_ attempts
+
+# Helper function. Print $N pseudo-random bytes from a-zA-Z0-9.
+rand_bytes_ ()
+{
+ n_=$1
+
+ # Maybe try openssl rand -base64 $n_prime_|tr '+/=\012' abcd first?
+ # But if they have openssl, they probably have mktemp, too.
+
+ chars_=abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789
+ dev_rand_=/dev/urandom
+ if test -r "$dev_rand_"; then
+ # Note: 256-length($chars_) == 194; 3 copies of $chars_ is 186 + 8 = 194.
+ dd ibs=$n_ count=1 if=$dev_rand_ 2>/dev/null \
+ | LC_ALL=C tr -c $chars_ 01234567$chars_$chars_$chars_
+ return
+ fi
+
+ n_plus_50_=`expr $n_ + 50`
+ cmds_='date; date +%N; free; who -a; w; ps auxww; ps ef; netstat -n'
+ data_=` (eval "$cmds_") 2>&1 | gzip `
+
+ # Ensure that $data_ has length at least 50+$n_
+ while :; do
+ len_=`echo "$data_"|wc -c`
+ test $n_plus_50_ -le $len_ && break;
+ data_=` (echo "$data_"; eval "$cmds_") 2>&1 | gzip `
+ done
+
+ echo "$data_" \
+ | dd bs=1 skip=50 count=$n_ 2>/dev/null \
+ | LC_ALL=C tr -c $chars_ 01234567$chars_$chars_$chars_
+}
+
+mktempd_ ()
+{
+ case $# in
+ 2);;
+ *) fail_ "Usage: mktempd_ DIR TEMPLATE";;
+ esac
+
+ destdir_=$1
+ template_=$2
+
+ MAX_TRIES_=4
+
+ # Disallow any trailing slash on specified destdir:
+ # it would subvert the post-mktemp "case"-based destdir test.
+ case $destdir_ in
+ /) ;;
+ */) fail_ "invalid destination dir: remove trailing slash(es)";;
+ esac
+
+ case $template_ in
+ *XXXX) ;;
+ *) fail_ \
+ "invalid template: $template_ (must have a suffix of at least 4 X's)";;
+ esac
+
+ # First, try to use mktemp.
+ d=`unset TMPDIR; { mktemp -d -t -p "$destdir_" "$template_"; } 2>/dev/null` \
+ || fail=1
+
+ # The resulting name must be in the specified directory.
+ case $d in "$destdir_"*);; *) fail=1;; esac
+
+ # It must have created the directory.
+ test -d "$d" || fail=1
+
+ # It must have 0700 permissions. Handle sticky "S" bits.
+ perms=`ls -dgo "$d" 2>/dev/null|tr S -` || fail=1
+ case $perms in drwx------*) ;; *) fail=1;; esac
+
+ test $fail = 0 && {
+ echo "$d"
+ return
+ }
+
+ # If we reach this point, we'll have to create a directory manually.
+
+ # Get a copy of the template without its suffix of X's.
+ base_template_=`echo "$template_"|sed 's/XX*$//'`
+
+ # Calculate how many X's we've just removed.
+ template_length_=`echo "$template_" | wc -c`
+ nx_=`echo "$base_template_" | wc -c`
+ nx_=`expr $template_length_ - $nx_`
+
+ err_=
+ i_=1
+ while :; do
+ X_=`rand_bytes_ $nx_`
+ candidate_dir_="$destdir_/$base_template_$X_"
+ err_=`mkdir -m 0700 "$candidate_dir_" 2>&1` \
+ && { echo "$candidate_dir_"; return; }
+ test $MAX_TRIES_ -le $i_ && break;
+ i_=`expr $i_ + 1`
+ done
+ fail_ "$err_"
+}
+
+# If you want to override the testdir_prefix_ function,
+# or to add more utility functions, use this file.
+test -f "$srcdir/init.cfg" \
+ && . "$srcdir/init.cfg"
+
+setup_ "$@"
+# This trap is here, rather than in the setup_ function, because some
+# shells run the exit trap at shell function exit, rather than script exit.
+trap remove_tmp_ 0
diff --git a/testsuite/invalid-mb-seq-UMR.sh b/testsuite/invalid-mb-seq-UMR.sh
new file mode 100755
index 0000000..d87bd4c
--- /dev/null
+++ b/testsuite/invalid-mb-seq-UMR.sh
@@ -0,0 +1,42 @@
+#!/bin/sh
+# Inserting an invalid multibyte sequence could lead to
+# reading uninitialized memory.
+
+# Copyright (C) 2015-2016 Free Software Foundation, Inc.
+
+# This 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/>.
+. "${srcdir=.}/testsuite/init.sh"; path_prepend_ ./sed
+print_ver_ sed
+
+require_valgrind_
+
+test "$LOCALE_JA" = none && skip_ found no Japanese EUC locale
+
+# Ensure the implementation is not buggy (skip otherwise)
+require_valid_ja_eucjp_locale_ "$LOCALE_JA"
+
+echo a > in || framework_failure_
+printf 'b\262C\n' > exp || framework_failure_
+LC_ALL=$LOCALE_JA valgrind --quiet --error-exitcode=1 \
+ sed 's/a/b\U\xb2c/' in > out 2> err || fail=1
+
+# Work around a bug in CentOS 5.10's valgrind
+# FIXME: remove in 2018 or when CentOS 5 is no longer officially supported
+grep 'valgrind: .*Assertion.*failed' err > /dev/null \
+ && skip_ 'you seem to have a buggy version of valgrind'
+
+compare exp out || fail=1
+compare /dev/null err || fail=1
+
+Exit $fail
diff --git a/testsuite/khadafy.good b/testsuite/khadafy.good
index e719f4e..57e21a1 100644
--- a/testsuite/khadafy.good
+++ b/testsuite/khadafy.good
@@ -26,7 +26,7 @@
26) Muammar Quathafi
27) Muammar Gheddafi
28) Muamar Al-Kaddafi
-29) Moammar Khadafy
+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
index e719f4e..57e21a1 100644
--- a/testsuite/khadafy.inp
+++ b/testsuite/khadafy.inp
@@ -26,7 +26,7 @@
26) Muammar Quathafi
27) Muammar Gheddafi
28) Muamar Al-Kaddafi
-29) Moammar Khadafy
+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/linecnt.good b/testsuite/linecnt.good
index 3cc1bd6..0488b62 100644
--- a/testsuite/linecnt.good
+++ b/testsuite/linecnt.good
@@ -33,7 +33,7 @@ A dialogue on poverty
17
But cold and bitter is the night!
18
- As for those poorer than myself,
+ As for those poorer than myself,
19
Their parents must be cold and hungry,
20
@@ -41,7 +41,7 @@ A dialogue on poverty
21
Then, how do you struggle through life?
22
-
+
23
Wide as they call the heaven and earth,
24
diff --git a/testsuite/linecnt.inp b/testsuite/linecnt.inp
index 9eb6070..a34df29 100644
--- a/testsuite/linecnt.inp
+++ b/testsuite/linecnt.inp
@@ -15,11 +15,11 @@ A dialogue on poverty
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,
+ 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,
diff --git a/testsuite/local.mk b/testsuite/local.mk
new file mode 100644
index 0000000..ae1f06c
--- /dev/null
+++ b/testsuite/local.mk
@@ -0,0 +1,370 @@
+# Copyright (C) 2016 Free Software Foundation, Inc.
+
+# This 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/>.
+
+CLEANFILES += tmp* core *.core $(EXTRA_PROGRAMS) *.*out *.log eval.in2
+
+TEST_EXTENSIONS = .sh
+SH_LOG_COMPILER = $(SHELL)
+
+# 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 \
+ 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/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/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-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/subst-replacement.sh \
+ testsuite/temp-file-cleanup.sh \
+ testsuite/title-case.sh \
+ testsuite/unbuffered.sh
+
+if TEST_SYMLINKS
+T += testsuite/follow-symlinks.sh \
+ testsuite/follow-symlinks-stdin.sh
+endif
+
+
+
+TESTS = $(check_PROGRAMS) $(SEDTESTS) $(T)
+
+SEDTESTS =
+
+noinst_HEADERS += testsuite/testcases.h testsuite/ptestcases.h
+
+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
+# variables to test scripts.
+TESTS_ENVIRONMENT = \
+ tmp__=$${TMPDIR-/tmp}; \
+ test -d "$$tmp__" && test -w "$$tmp__" || tmp__=.; \
+ . $(srcdir)/testsuite/envvar-check; \
+ TMPDIR=$$tmp__; export TMPDIR; \
+ \
+ if test -n "$$BASH_VERSION" || (eval "export v=x") 2>/dev/null; then \
+ export_with_values () { export "$$@"; }; \
+ else \
+ export_with_values () \
+ { \
+ sed_extract_var='s/=.*//'; \
+ sed_quote_value="s/'/'\\\\''/g;s/=\\(.*\\)/='\\1'/";\
+ for arg in "$$@"; do \
+ var=`echo "$$arg" | sed "$$sed_extract_var"`; \
+ arg=`echo "$$arg" | sed "$$sed_quote_value"`; \
+ eval "$$arg"; \
+ export "$$var"; \
+ done; \
+ }; \
+ fi; \
+ \
+ export_with_values \
+ VERSION='$(VERSION)' \
+ LOCALE_FR='$(LOCALE_FR)' \
+ LOCALE_FR_UTF8='$(LOCALE_FR_UTF8)' \
+ LOCALE_JA='$(LOCALE_JA)' \
+ AWK=$(AWK) \
+ LC_ALL=C \
+ abs_top_builddir='$(abs_top_builddir)' \
+ abs_top_srcdir='$(abs_top_srcdir)' \
+ abs_srcdir='$(abs_srcdir)' \
+ built_programs=sed; \
+ srcdir='$(srcdir)' \
+ top_srcdir='$(top_srcdir)' \
+ CC='$(CC)' \
+ SED_TEST_NAME=`echo $$tst|sed 's,^\./,,;s,/,-,g'` \
+ MAKE=$(MAKE) \
+ MALLOC_PERTURB_=$(MALLOC_PERTURB_) \
+ PACKAGE_BUGREPORT='$(PACKAGE_BUGREPORT)' \
+ PACKAGE_VERSION=$(PACKAGE_VERSION) \
+ PERL='$(PERL)' \
+ SHELL='$(SHELL)' \
+ PATH='$(abs_top_builddir)/src$(PATH_SEPARATOR)'"$$PATH" \
+ $(LOCALCHARSET_TESTS_ENVIRONMENT) \
+ ; 9>&2
+
+LOG_COMPILER = $(top_srcdir)/testsuite/runtest
+
+
+EXTRA_DIST += \
+ $(T) \
+ 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
+
+# automake makes `check' depend on $(TESTS). Declare
+# dummy targets for $(TESTS) so that make does not complain.
+
+.PHONY: $(SEDTESTS)
+$(SEDTESTS):
diff --git a/testsuite/mac-mf.good b/testsuite/mac-mf.good
index 9be165d..4e8bc45 100644
--- a/testsuite/mac-mf.good
+++ b/testsuite/mac-mf.good
@@ -6,72 +6,72 @@
#
# This first part is long enough that NFS:Share doesn't notice the non-ASCII
# characters in the rest of the file, so it claims that the file is type
-# TEXT, which is what we want. The non-ASCII chars are necessary for MPW
+# TEXT, which is what we want. The non-ASCII chars are necessary for MPW
# Make
#
# This first part is long enough that NFS:Share doesn't notice the non-ASCII
# characters in the rest of the file, so it claims that the file is type
-# TEXT, which is what we want. The non-ASCII chars are necessary for MPW
+# TEXT, which is what we want. The non-ASCII chars are necessary for MPW
# Make
#
# This first part is long enough that NFS:Share doesn't notice the non-ASCII
# characters in the rest of the file, so it claims that the file is type
-# TEXT, which is what we want. The non-ASCII chars are necessary for MPW
+# TEXT, which is what we want. The non-ASCII chars are necessary for MPW
# Make
#
# This first part is long enough that NFS:Share doesn't notice the non-ASCII
# characters in the rest of the file, so it claims that the file is type
-# TEXT, which is what we want. The non-ASCII chars are necessary for MPW
+# TEXT, which is what we want. The non-ASCII chars are necessary for MPW
# Make
#
# This first part is long enough that NFS:Share doesn't notice the non-ASCII
# characters in the rest of the file, so it claims that the file is type
-# TEXT, which is what we want. The non-ASCII chars are necessary for MPW
+# TEXT, which is what we want. The non-ASCII chars are necessary for MPW
# Make
#
# This first part is long enough that NFS:Share doesn't notice the non-ASCII
# characters in the rest of the file, so it claims that the file is type
-# TEXT, which is what we want. The non-ASCII chars are necessary for MPW
+# TEXT, which is what we want. The non-ASCII chars are necessary for MPW
# Make
#
# This first part is long enough that NFS:Share doesn't notice the non-ASCII
# characters in the rest of the file, so it claims that the file is type
-# TEXT, which is what we want. The non-ASCII chars are necessary for MPW
+# TEXT, which is what we want. The non-ASCII chars are necessary for MPW
# Make
#
# This first part is long enough that NFS:Share doesn't notice the non-ASCII
# characters in the rest of the file, so it claims that the file is type
-# TEXT, which is what we want. The non-ASCII chars are necessary for MPW
+# TEXT, which is what we want. The non-ASCII chars are necessary for MPW
# Make
#
# This first part is long enough that NFS:Share doesn't notice the non-ASCII
# characters in the rest of the file, so it claims that the file is type
-# TEXT, which is what we want. The non-ASCII chars are necessary for MPW
+# TEXT, which is what we want. The non-ASCII chars are necessary for MPW
# Make
#
# This first part is long enough that NFS:Share doesn't notice the non-ASCII
# characters in the rest of the file, so it claims that the file is type
-# TEXT, which is what we want. The non-ASCII chars are necessary for MPW
+# TEXT, which is what we want. The non-ASCII chars are necessary for MPW
# Make
#
# This first part is long enough that NFS:Share doesn't notice the non-ASCII
# characters in the rest of the file, so it claims that the file is type
-# TEXT, which is what we want. The non-ASCII chars are necessary for MPW
+# TEXT, which is what we want. The non-ASCII chars are necessary for MPW
# Make
#
# This first part is long enough that NFS:Share doesn't notice the non-ASCII
# characters in the rest of the file, so it claims that the file is type
-# TEXT, which is what we want. The non-ASCII chars are necessary for MPW
+# TEXT, which is what we want. The non-ASCII chars are necessary for MPW
# Make
#
# This first part is long enough that NFS:Share doesn't notice the non-ASCII
# characters in the rest of the file, so it claims that the file is type
-# TEXT, which is what we want. The non-ASCII chars are necessary for MPW
+# TEXT, which is what we want. The non-ASCII chars are necessary for MPW
# Make
#
# This first part is long enough that NFS:Share doesn't notice the non-ASCII
# characters in the rest of the file, so it claims that the file is type
-# TEXT, which is what we want. The non-ASCII chars are necessary for MPW
+# TEXT, which is what we want. The non-ASCII chars are necessary for MPW
# Make
#
@@ -80,18 +80,18 @@
WHAT = mac
-# Directory syntax
+# Directory syntax
R=
C=
S=:
U=:
BUILDTOP = :::
-srcdir =
+srcdir =
# FIXME This doesn't translate to MPW yet, srcdir must be same as objdir
# File in object dir can come from either the current dir or srcdir
-#
+#
# . . "{srcdir}"
# Default rule that puts each file into separate segment
@@ -106,8 +106,8 @@ LD = link
# The funny quoting in the LDFLAGS is to avoid xxx.c.o being mangled by
# mac-mf.sed into xxx.c.o
LDFLAGS=-t MPST -c "MPS " -sym on {Libraries}"Runtime."o {CLibraries}"StdClib."o {Libraries}"ToolLibs."o {Libraries}"Interface."o
-CCOPTS =
-LIBS =
+CCOPTS =
+LIBS =
KRB5ROOT= @KRB5ROOT@
KRB4=@KRB4@
INSTALL=Duplicate -y
@@ -157,7 +157,7 @@ OBJEXT = c.o
LIBEXT = a
EXEEXT =
-all
+all
# Generated automatically from Makefile.in by configure
CFLAGS = {CCOPTS} {DEFS} -i ::des
@@ -169,32 +169,32 @@ OBJS= md5.{OBJEXT} md5glue.{OBJEXT} md5crypto.{OBJEXT}
SRCS= md5.c md5glue.c md5crypto.c
-all {OBJS}
+all {OBJS}
t_mddriver t_mddriver.c.o md5.c.o
Link {LDFLAGS} -o t_mddriver t_mddriver.c.o md5.c.o
-t_mddriver.exe
+t_mddriver.exe
{CC} {CFLAGS2} -o t_mddriver.exe t_mddriver.c md5.c
check t_mddriver{EXEEXT}
{C}t_mddriver{EXEEXT} -x
-clean
+clean
{RM} t_mddriver{EXEEXT} t_mddriver.{OBJEXT}
# config:post.in
# put all first just in case no other rules occur here
#
-all
+all
-check
+check
clean clean-{WHAT}
{RM} config.log pre.c.out post.c.out Makefile.c.out
-clean-unix
+clean-unix
if test -n "{OBJS}" ; then {RM} {OBJS}; else ; fi
-clean-windows
+clean-windows
{RM} .{OBJEXT}
{RM} msvc.pdb .err
diff --git a/testsuite/mac-mf.inp b/testsuite/mac-mf.inp
index 3adaee2..7d80191 100644
--- a/testsuite/mac-mf.inp
+++ b/testsuite/mac-mf.inp
@@ -6,72 +6,72 @@
#
# This first part is long enough that NFS/Share doesn't notice the non-ASCII
# characters in the rest of the file, so it claims that the file is type
-# TEXT, which is what we want. The non-ASCII chars are necessary for MPW
+# TEXT, which is what we want. The non-ASCII chars are necessary for MPW
# Make.
#
# This first part is long enough that NFS/Share doesn't notice the non-ASCII
# characters in the rest of the file, so it claims that the file is type
-# TEXT, which is what we want. The non-ASCII chars are necessary for MPW
+# TEXT, which is what we want. The non-ASCII chars are necessary for MPW
# Make.
#
# This first part is long enough that NFS/Share doesn't notice the non-ASCII
# characters in the rest of the file, so it claims that the file is type
-# TEXT, which is what we want. The non-ASCII chars are necessary for MPW
+# TEXT, which is what we want. The non-ASCII chars are necessary for MPW
# Make.
#
# This first part is long enough that NFS/Share doesn't notice the non-ASCII
# characters in the rest of the file, so it claims that the file is type
-# TEXT, which is what we want. The non-ASCII chars are necessary for MPW
+# TEXT, which is what we want. The non-ASCII chars are necessary for MPW
# Make.
#
# This first part is long enough that NFS/Share doesn't notice the non-ASCII
# characters in the rest of the file, so it claims that the file is type
-# TEXT, which is what we want. The non-ASCII chars are necessary for MPW
+# TEXT, which is what we want. The non-ASCII chars are necessary for MPW
# Make.
#
# This first part is long enough that NFS/Share doesn't notice the non-ASCII
# characters in the rest of the file, so it claims that the file is type
-# TEXT, which is what we want. The non-ASCII chars are necessary for MPW
+# TEXT, which is what we want. The non-ASCII chars are necessary for MPW
# Make.
#
# This first part is long enough that NFS/Share doesn't notice the non-ASCII
# characters in the rest of the file, so it claims that the file is type
-# TEXT, which is what we want. The non-ASCII chars are necessary for MPW
+# TEXT, which is what we want. The non-ASCII chars are necessary for MPW
# Make.
#
# This first part is long enough that NFS/Share doesn't notice the non-ASCII
# characters in the rest of the file, so it claims that the file is type
-# TEXT, which is what we want. The non-ASCII chars are necessary for MPW
+# TEXT, which is what we want. The non-ASCII chars are necessary for MPW
# Make.
#
# This first part is long enough that NFS/Share doesn't notice the non-ASCII
# characters in the rest of the file, so it claims that the file is type
-# TEXT, which is what we want. The non-ASCII chars are necessary for MPW
+# TEXT, which is what we want. The non-ASCII chars are necessary for MPW
# Make.
#
# This first part is long enough that NFS/Share doesn't notice the non-ASCII
# characters in the rest of the file, so it claims that the file is type
-# TEXT, which is what we want. The non-ASCII chars are necessary for MPW
+# TEXT, which is what we want. The non-ASCII chars are necessary for MPW
# Make.
#
# This first part is long enough that NFS/Share doesn't notice the non-ASCII
# characters in the rest of the file, so it claims that the file is type
-# TEXT, which is what we want. The non-ASCII chars are necessary for MPW
+# TEXT, which is what we want. The non-ASCII chars are necessary for MPW
# Make.
#
# This first part is long enough that NFS/Share doesn't notice the non-ASCII
# characters in the rest of the file, so it claims that the file is type
-# TEXT, which is what we want. The non-ASCII chars are necessary for MPW
+# TEXT, which is what we want. The non-ASCII chars are necessary for MPW
# Make.
#
# This first part is long enough that NFS/Share doesn't notice the non-ASCII
# characters in the rest of the file, so it claims that the file is type
-# TEXT, which is what we want. The non-ASCII chars are necessary for MPW
+# TEXT, which is what we want. The non-ASCII chars are necessary for MPW
# Make.
#
# This first part is long enough that NFS/Share doesn't notice the non-ASCII
# characters in the rest of the file, so it claims that the file is type
-# TEXT, which is what we want. The non-ASCII chars are necessary for MPW
+# TEXT, which is what we want. The non-ASCII chars are necessary for MPW
# Make.
#
@@ -91,7 +91,7 @@ srcdir = .
# FIXME: This doesn't translate to MPW yet, srcdir must be same as objdir.
# File in object dir can come from either the current dir or srcdir.
-#
+#
# . : . "{srcdir}"
# Default rule that puts each file into separate segment.
@@ -106,8 +106,8 @@ LD = link
# The funny quoting in the LDFLAGS is to avoid xxx.o being mangled by
# mac-mf.sed into xxx.c.o.
LDFLAGS=-t MPST -c "MPS " -sym on {Libraries}"Runtime."o {CLibraries}"StdClib."o {Libraries}"ToolLibs."o {Libraries}"Interface."o
-CCOPTS =
-LIBS =
+CCOPTS =
+LIBS =
KRB5ROOT= @KRB5ROOT@
KRB4=@KRB4@
INSTALL=Duplicate -y
@@ -169,7 +169,7 @@ OBJS= md5.$(OBJEXT) md5glue.$(OBJEXT) md5crypto.$(OBJEXT)
SRCS= $(srcdir)/md5.c $(srcdir)/md5glue.c $(srcdir)/md5crypto.c
-all:: $(OBJS)
+all:: $(OBJS)
t_mddriver: t_mddriver.o md5.o
$(CC) $(CFLAGS) $(LDFLAGS) -o t_mddriver t_mddriver.o md5.o
diff --git a/testsuite/mac-mf.sed b/testsuite/mac-mf.sed
index 9b08e60..680ce89 100644
--- a/testsuite/mac-mf.sed
+++ b/testsuite/mac-mf.sed
@@ -26,7 +26,7 @@
# Rules for .. and . elsewhere in the line
# Convert ../: to ::, recur to get whole paths.
/\./s,\.\./:,::,g
-# Convert ../../ to :::
+# Convert ../../ to :::
/\./s,\.\./\.\./,:::,g
/\./s,\.\./,::,g
/\.\//s,\./,:,g
@@ -152,3 +152,4 @@
/Option/s/\\Option-f//g
/Option/s/\\Option-d//g
/Option/s/\\Option-x//g
+s/ $//
diff --git a/testsuite/manis.sed b/testsuite/manis.sed
index 5017845..51c9a50 100644
--- a/testsuite/manis.sed
+++ b/testsuite/manis.sed
@@ -1,6 +1,6 @@
# 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;
+# 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
new file mode 100755
index 0000000..ac43a49
--- /dev/null
+++ b/testsuite/mb-bad-delim.sh
@@ -0,0 +1,84 @@
+#!/bin/sh
+# Test 's' and 'y' non-slash delimiters in multibyte locales
+
+# Copyright (C) 2016 Free Software Foundation, Inc.
+
+# This 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/>.
+. "${srcdir=.}/testsuite/init.sh"; path_prepend_ ./sed
+print_ver_ sed
+
+fail=0
+require_en_utf8_locale_
+
+# These tests use the following unicode character in various ways:
+# GREEK CAPITAL LETTER PHI (U+03A6)
+# UTF-8: hex: 0xCE 0xA6
+# oct: 0316 0246
+# bin: 11001110 10100110
+#
+# Octal encoding is used due to printf not supporting hex on older systems.
+# Using the first octet alone (\316) causes various multibyte related functions
+# to return '-2' (incomplete multibyte sequence).
+# using the second octet alone (\246) causess same functions to return '-1'
+# (ivalid multibyte sequence).
+
+
+# Reject a valid multibyte delimiter (instead of slash).
+printf 's\316\246a\316\246b\316\246' > prog1 || framework_failure_
+
+cat <<\EOF > exp-err1 || framework_failure_
+sed: file prog1 line 1: delimiter character is not a single-byte character
+EOF
+
+returns_ 1 env LC_ALL=en_US.UTF-8 sed -f prog1 < /dev/null 2>err1 || fail=1
+compare_ exp-err1 err1 || fail=1
+
+
+# Reject an incomplete multibyte delimiter (instead of slash).
+# This is an implmentation-specific behavior:
+# error is triggered upon first octet, before entire multibyte character
+# is scanned.
+printf 's\316a\316b\316' > prog2 || framework_failure_
+
+cat <<\EOF > exp-err2 || framework_failure_
+sed: file prog2 line 1: delimiter character is not a single-byte character
+EOF
+
+returns_ 1 env LC_ALL=en_US.UTF-8 sed -f prog2 </dev/null 2>err2 || fail=1
+compare_ exp-err2 err2 || fail=1
+
+# ... but accept octet \316 as delimiter in C locale
+echo a > in2 || framework_failure_
+echo b > exp2 || framework_failure_
+LC_ALL=C sed -f prog2 <in2 >out2 || fail=1
+compare_ exp2 out2 || fail=1
+
+
+
+# An invalid multibyte sequence is treated as a valid single byte,
+# thus accepted as a delimter (instead of slash).
+# This is an implmentation-specific behavior.
+printf 's\246a\246b\246' > prog3 || framework_failure_
+echo a > in3 || framework_failure_
+echo b > exp3 || framework_failure_
+
+LC_ALL=en_US.UTF-8 sed -f prog3 <in3 >out3 || fail=1
+compare_ exp3 out3 || fail=1
+
+# Expect identical result in C locale
+LC_ALL=C sed -f prog3 <in3 >out4 || fail=1
+compare_ exp3 out4 || fail=1
+
+
+Exit $fail
diff --git a/testsuite/mb-charclass-non-utf8.sh b/testsuite/mb-charclass-non-utf8.sh
new file mode 100755
index 0000000..ab3d2fd
--- /dev/null
+++ b/testsuite/mb-charclass-non-utf8.sh
@@ -0,0 +1,132 @@
+#!/bin/sh
+# Test multibyte locale which is not UTF-8 (ja_JP.shift_jis)
+# This is a stateful locale. Same byte value can be either
+# a single-byte character, or the second byte of a multibyte
+# character.
+
+# Copyright (C) 2016 Free Software Foundation, Inc.
+
+# This 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/>.
+. "${srcdir=.}/testsuite/init.sh"; path_prepend_ ./sed
+print_ver_ sed
+
+# If found, LOCALE_JA_SJIS will contain the locale name.
+require_ja_shiftjis_locale_
+
+# Ensure the implementation is not buggy (skip otherwise)
+require_valid_ja_shiftjis_locale_ "$LOCALE_JA_SJIS"
+
+fail=0
+
+# This test uses two characters:
+# Unicode Character 'KATAKANA LETTER ZE' (U+30BC)
+# Unicode Character 'KATAKANA LETTER ZO' (U+30BE)
+#
+# In SHIFT-JIS locale, these multibyte characters contain
+# open/close brackets (ASCII 0x5B/0x5D) as the trailing byte.
+#
+# See also:
+# https://en.wikipedia.org/wiki/Shift_JIS
+# http://www.rikai.com/library/kanjitables/kanji_codes.sjis.shtml
+
+# Unicode Character 'KATAKANA LETTER ZE' (U+30BC)
+#
+# UTF-8: hex: 0xE3 0x82 0xBC
+# bin: 11100011 10000010 10111100
+#
+# Shift-jis hex: 0x83 0x5B
+# oct: 203 133
+# bin: 10000011 01011011
+#
+# Conversion example:
+# $ printf '\x83\x5B' | iconv -f SHIFT-JIS -t UTF-8 | od -tx1o1c
+# 0000000 e3 82 bc
+# 343 202 274
+# 343 202 274
+
+# Unicode Character 'KATAKANA LETTER ZO' (U+30BE)
+#
+# UTF-8: hex: 0xE3 0x82 0xBE
+# bin: 11100011 10000010 10111110
+#
+# Shift-jis hex: 0x83 0x5D
+# oct: 203 135
+# bin: 10000011 01011101
+#
+# Conversion example:
+# $ printf '\x83\x5D' | iconv -f SHIFT-JIS -t UTF-8 | od -tx1o1c
+# 0000000 e3 82 be
+# 343 202 276
+# 343 202 276
+#
+
+
+#
+# Tests 1,2: Test y/// command with multibyte, non-utf8 seqeunce.
+# Implmenetation notes: str_append() has special code path for non-utf8 cases.
+#
+
+# Test 1: valid multibyte seqeunce
+printf 'y/a/\203\133/' > p1 || framework_failure_
+echo Xa > in1 || framework_failure_
+printf 'X\203\133\n' > exp1 || framework_failure_
+
+LC_ALL="$LOCALE_JA_SJIS" sed -f p1 <in1 >out1 || fail=1
+compare_ exp1 out1 || fail=1
+
+# Test 2: invalid multibyte seqeunce, treated as two single-byte characters.
+printf 'y/aa/\203\060/' > p2 || framework_failure_
+LC_ALL="$LOCALE_JA_SJIS" sed -f p2 </dev/null 2>out2 || fail=1
+compare_ /dev/null out2 || fail=1
+
+#
+# Test 3: multibyte character class with these characters.
+#
+# Before sed-4.3, snarf_char_class would parse it incorrectly,
+# Treating the first closing-bracket as closing the character-class,
+# instead of being part of a multibyte sequence.
+
+printf '/[\203]/]/p' > p3 || framework_failure_
+LC_ALL="$LOCALE_JA_SJIS" sed -f p3 </dev/null >out3 || fail=1
+compare_ /dev/null out3 || fail=1
+
+# Test 4:
+# Same as test 3, but with the other multibyte character.
+# (this did not cause a failure before sed-4.3, but the code was incorrect).
+# Keep this test for code-coverage purposes.
+printf '/[\203[/]/p' > p4 || framework_failure_
+LC_ALL="$LOCALE_JA_SJIS" sed -f p4 </dev/null >out4 || fail=1
+compare_ /dev/null out4 || fail=1
+
+# TODO: Find a locale in which ':.=' can be part of a valid multibyte octet.
+#
+# snarf_char_class specifically tests for five bytes: ':.=[]' .
+# '[' and ']' are tested above, yet '.:=' are not valid as part of a
+# multibyte shift-jis sequence.
+#
+# valid:
+# $ printf '\203]' | iconv -f SHIFT-JIS -t utf-8
+# $ printf '\203[' | iconv -f SHIFT-JIS -t utf-8
+#
+# invalid:
+# $ printf '\203:' | iconv -f SHIFT-JIS -t utf-8
+# iconv: (stdin):1:0: cannot convert
+#
+# $ printf '\203=' | iconv -f SHIFT-JIS -t utf-8
+# iconv: (stdin):1:0: cannot convert
+#
+# $ printf '\203.' | iconv -f SHIFT-JIS -t utf-8
+# iconv: (stdin):0:0: cannot convert
+
+Exit $fail
diff --git a/testsuite/mb-match-slash.sh b/testsuite/mb-match-slash.sh
new file mode 100755
index 0000000..787b5d6
--- /dev/null
+++ b/testsuite/mb-match-slash.sh
@@ -0,0 +1,48 @@
+#!/bin/sh
+# Test slash following an incomplete multibyte character
+
+# Copyright (C) 2016 Free Software Foundation, Inc.
+
+# This 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/>.
+. "${srcdir=.}/testsuite/init.sh"; path_prepend_ ./sed
+print_ver_ sed
+
+require_en_utf8_locale_
+
+fail=0
+
+# before sed-4.3, a slash following an incomplete multibyte character
+# would be ignored during program compilation, leading to an error.
+
+
+# Test 1: match_slash in 's' command.
+# Before sed-4.3, this would fail with "unterminated `s' command".
+printf 's/\316/X/' > p1 || framework_failure_
+LC_ALL=en_US.UTF-8 sed -f p1 </dev/null >out1 || fail=1
+compare_ /dev/null out1 || fail=1
+
+# Test 2: match_slash in address regex.
+# Before sed-4.3, this would fail with "unterminated address regex".
+printf '/\316/p' >p2 || framework_failure_
+LC_ALL=en_US.UTF-8 sed -f p2 </dev/null >out2 || fail=1
+compare_ /dev/null out2 || fail=1
+
+# Test 3: match_slash in 'y' command..
+# Before sed-4.3, this would fail with "unterminated `y' command".
+printf 'y/\316/X/' >p3 || framework_failure_
+LC_ALL=en_US.UTF-8 sed -f p3 </dev/null >out3 || fail=1
+compare_ /dev/null out3 || fail=1
+
+
+Exit $fail
diff --git a/testsuite/mb-y-translate.sh b/testsuite/mb-y-translate.sh
new file mode 100755
index 0000000..a1f59c4
--- /dev/null
+++ b/testsuite/mb-y-translate.sh
@@ -0,0 +1,135 @@
+#!/bin/sh
+# Test multibyte y/// translations
+
+# Copyright (C) 2016 Free Software Foundation, Inc.
+
+# This 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/>.
+. "${srcdir=.}/testsuite/init.sh"; path_prepend_ ./sed
+print_ver_ sed
+
+fail=0
+require_en_utf8_locale_
+
+# These tests use the following unicode characters in various ways:
+# GREEK CAPITAL LETTER PHI (U+03A6)
+# UTF-8: hex: 0xCE 0xA6
+# oct: 0316 0246
+# bin: 11001110 10100110
+#
+# GREEK CAPITAL LETTER DELTA (U+0394)
+# UTF-8: hex: 0xCE 0x94
+# oct: 0316 0224
+# bin: 11001110 10010100
+#
+# Octal encoding is used due to printf not supporting hex on older systems.
+# Using the first octet alone (\316) causes various multibyte related functions
+# to return '-2' (incomplete multibyte sequence).
+# using the second octet alone (\246) causess same functions to return '-1'
+# (invalid multibyte sequence).
+
+
+#
+# Test 1: valid multibyte 'dest-chars'
+#
+printf 'y/a/\316\246/' > p1 || framework_failure_
+echo Xa > in1 || framework_failure_
+printf 'X\316\246\n' > exp1 || framework_failure_
+
+LC_ALL=en_US.UTF-8 sed -f p1 <in1 >out1 || fail=1
+compare_ exp1 out1 || fail=1
+
+# in C locale, report error of mismatched length
+cat <<\EOF > exp-err1 || framework_failure_
+sed: file p1 line 1: strings for `y' command are different lengths
+EOF
+returns_ 1 env LC_ALL=C sed -f p1 </dev/null 2>err1 || fail=1
+compare_ exp-err1 err1 || fail=1
+
+
+#
+# Test 2: valid multibyte 'src-chars'
+#
+printf 'y/\316\246/a/' > p2 || framework_failure_
+printf 'X\316\246\n' > in2 || framework_failure_
+echo Xa > exp2 || framework_failure_
+
+LC_ALL=en_US.UTF-8 sed -f p2 <in2 >out2 || fail=1
+compare_ exp2 out2 || fail=1
+
+# in C locale, report error of mismatched length
+cat <<\EOF > exp-err2 || framework_failure_
+sed: file p2 line 1: strings for `y' command are different lengths
+EOF
+returns_ 1 env LC_ALL=C sed -f p2 </dev/null 2>err2 || fail=1
+compare_ exp-err2 err2 || fail=1
+
+
+#
+# Tests 3-6: invalid/incomplete multibyte characters in src/dest.
+# All work as-is in C locale, treated as single-bytes in multibyte locales.
+# None should fail.
+
+# Test 3: invalid multibyte 'dest-chars'.
+echo Xa > in3 || framework_failure_
+printf 'y/a/\246/' > p3 || framework_failure_
+printf 'X\246\n' > exp3 || framework_failure_
+
+# Test 4: incomplete multibyte 'dest-chars'.
+echo Xa > in4 || framework_failure_
+printf 'y/a/\316/' > p4 || framework_failure_
+printf 'X\316\n' > exp4 || framework_failure_
+
+# Test 5: invalid multibyte 'src-chars'.
+printf 'X\246\n' > in5 || framework_failure_
+printf 'y/\246/a/' > p5 || framework_failure_
+echo Xa > exp5 || framework_failure_
+
+# Test 6: incomplete multibyte 'dest-chars'.
+printf 'X\316\n' > in6 || framework_failure_
+printf 'y/\316/a/' > p6 || framework_failure_
+echo Xa > exp6 || framework_failure_
+
+for t in 3 4 5 6 ;
+do
+ for l in C en_US.UTF-8 ;
+ do
+ LC_ALL=$l sed -f p$t <in$t >out$t-$l || fail=1
+ compare_ exp$t out$t-$l || fail=1
+ done
+done
+
+
+#
+# Tests 7,8: length mismatch in multibyte locales
+# Implementation note: the code path for length check differ between
+# single-byte/multibyte locales. The actual characters don't have to be
+# multibyte themselves.
+printf 'y/abc/d/' > p7 || framework_failure_
+cat <<\EOF > exp-err7 || framework_failure_
+sed: file p7 line 1: strings for `y' command are different lengths
+EOF
+
+returns_ 1 env LC_ALL=en_US.UTF-8 sed -f p7 </dev/null 2>err7 || fail=1
+compare_ exp-err7 err7 || fail=1
+
+printf 'y/a/bcd/' > p8 || framework_failure_
+cat <<\EOF > exp-err8 || framework_failure_
+sed: file p8 line 1: strings for `y' command are different lengths
+EOF
+
+returns_ 1 env LC_ALL=en_US.UTF-8 sed -f p8 </dev/null 2>err8 || fail=1
+compare_ exp-err8 err8 || fail=1
+
+
+Exit $fail
diff --git a/testsuite/newline-anchor.good b/testsuite/newline-anchor.good
new file mode 100644
index 0000000..5742735
--- /dev/null
+++ b/testsuite/newline-anchor.good
@@ -0,0 +1,3 @@
+XXaY
+XbY
+XcYY
diff --git a/testsuite/newline-anchor.inp b/testsuite/newline-anchor.inp
new file mode 100644
index 0000000..de98044
--- /dev/null
+++ b/testsuite/newline-anchor.inp
@@ -0,0 +1,3 @@
+a
+b
+c
diff --git a/testsuite/newline-anchor.sed b/testsuite/newline-anchor.sed
new file mode 100644
index 0000000..b3d2de1
--- /dev/null
+++ b/testsuite/newline-anchor.sed
@@ -0,0 +1,6 @@
+N
+N
+s/^/X/g
+s/^/X/mg
+s/$/Y/g
+s/$/Y/mg
diff --git a/testsuite/normalize-text.sh b/testsuite/normalize-text.sh
new file mode 100644
index 0000000..9a34a03
--- /dev/null
+++ b/testsuite/normalize-text.sh
@@ -0,0 +1,83 @@
+#!/bin/sh
+# Text text escaping (compile.c:normalize_text()).
+# NOTE:
+# \dNNN \xNN \oNNN - tested in 'convert-number.sh'
+# character-classes in POSIX mode - tested in 'posix-char-class.sh'
+
+# Copyright (C) 2016 Free Software Foundation, Inc.
+
+# This 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/>.
+. "${srcdir=.}/testsuite/init.sh"; path_prepend_ ./sed
+print_ver_ sed
+
+fail=0
+
+#
+# Common backslash combinations
+#
+printf "%s\n" a a a a a a >in1 || framework_failure_
+cat <<\EOF >prog1 || framework_failure_
+1y/a/\a/
+2y/a/\f/
+3y/a/\n/
+4y/a/\r/
+5y/a/\t/
+6y/a/\v/
+EOF
+printf "\a\n\f\n\n\n\r\n\t\n\v\n" > exp1 || framework_failure_
+
+sed -f prog1 in1 > out1 || fail=1
+compare_ exp1 out1 || fail=1
+
+#
+# test '\\\n' (backslash followed by ASCII 0x0A)
+# normalized to a simple '\n' .
+#
+echo a > in2 || framework_failure_
+printf "y/a/\\\n/" > prog2 || framework_failure_
+printf "\n\n" > exp2 || framework_failure_
+sed -f prog2 in2 > out2 || fail=1
+compare_ exp2 out2 || fail=1
+
+#
+# \cX combination
+#
+printf "%s\n" a a a a a a a a a a > in3 || framework_failure_
+cat <<\EOF >prog3 || framework_failure_
+1y/a/\cA/
+2y/a/\ca/
+3y/a/\cZ/
+4y/a/\cz/
+5y/a/\c{/
+6y/a/\c;/
+7y/a/\c#/
+8y/a/\c[/
+9y/a/\c\\/
+10y/a/\c]/
+EOF
+
+printf "\1\n\1\n\32\n\32\n;\n{\nc\n\33\n\34\n\35\n" > exp3 || framework_failure_
+sed -f prog3 in3 > out3 || fail=1
+compare_ exp3 out3 || fail=1
+
+# \c at end of (valid) text - normalize_text() stops, returns control to caller.
+# TODO: is this a bug?
+# compare with 'y/a/\d/' and 'y/a/\x/'
+cat <<\EOF >exp-err-c || framework_failure_
+sed: -e expression #1, char 7: strings for `y' command are different lengths
+EOF
+returns_ 1 sed 'y/a/\c/' </dev/null 2>err-c || fail=1
+compare_ exp-err-c err-c || fail=1
+
+Exit $fail
diff --git a/testsuite/nulldata.sh b/testsuite/nulldata.sh
new file mode 100755
index 0000000..91befc6
--- /dev/null
+++ b/testsuite/nulldata.sh
@@ -0,0 +1,87 @@
+#!/bin/sh
+# Test -z/--null-data option
+
+# Copyright (C) 2016 Free Software Foundation, Inc.
+
+# This 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/>.
+. "${srcdir=.}/testsuite/init.sh"; path_prepend_ ./sed
+print_ver_ sed
+
+# Two lines, differ based on the EOL character.
+printf "AB\000CD\nEF\n\000" > in1 || framework_failure_
+
+# 's/^./x/' cmd processed with EOF=\n
+printf "xB\000CD\nxF\nx" > exp-s-nl || framework_failure_
+# 's/^./x/' cmd processed with EOF=\0
+printf "xB\000xD\nEF\n\000" > exp-s-z || framework_failure_
+
+# '=' cmd processed with EOF=\n
+printf "1\nAB\000CD\n2\nEF\n3\n\000" > exp-=-nl || framework_failure_
+
+# '=' cmd processed with EOF=\0
+printf "1\000AB\0002\000CD\nEF\n\000" > exp-=-z || framework_failure_
+
+
+# 'l' cmd processed with EOF=\n
+cat <<\EOF >exp-l-nl || framework_failure_
+AB\000CD$
+EF$
+\000$
+EOF
+
+# 'l' cmd processed with EOF=\0
+printf 'AB$\000CD\\nEF\\n$\000' >exp-l-z || framework_failure_
+
+# 'F' cmd with EOL=\n
+printf "in1\n" > exp-F-nl || framework_failure_
+
+# 'F' cmd with EOL=\0
+printf "in1\000" > exp-F-z || framework_failure_
+
+
+# Test substitution
+sed 's/^./x/' in1 > out-s-nl || fail=1
+compare_ exp-s-nl out-s-nl || fail=1
+
+sed -z 's/^./x/' in1 > out-s-z || fail=1
+compare_ exp-s-z out-s-z || fail=1
+
+
+
+# Test '=' command
+sed = in1 > out-=-nl || fail=1
+compare_ exp-=-nl out-=-nl || fail=1
+
+sed -z = in1 > out-=-z || fail=1
+compare_ exp-=-z out-=-z || fail=1
+
+
+
+# Test 'l' command
+sed -n l in1 > out-l-nl || fail=1
+compare_ exp-l-nl out-l-nl || fail=1
+
+sed -zn l in1 > out-l-z || fail=1
+compare_ exp-l-z out-l-z || fail=1
+
+
+# Test 'F' command
+sed -n 1F in1 > out-F-nl || fail=1
+compare_ exp-F-nl out-F-nl || fail=1
+
+sed -zn 1F in1 > out-F-z || fail=1
+compare_ exp-F-z out-F-z || fail=1
+
+
+Exit $fail
diff --git a/testsuite/panic-tests.sh b/testsuite/panic-tests.sh
new file mode 100644
index 0000000..a2dba00
--- /dev/null
+++ b/testsuite/panic-tests.sh
@@ -0,0 +1,101 @@
+#!/bin/sh
+# Exercise some panic stops
+
+# Copyright (C) 2016 Free Software Foundation, Inc.
+
+# This 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/>.
+. "${srcdir=.}/testsuite/init.sh"; path_prepend_ ./sed
+print_ver_ sed
+
+#
+# failure to create temp file
+#
+
+# inplace with an unwritable directory
+mkdir a || framework_failure_
+touch a/a || framework_failure_
+chmod a-w a || framework_failure_
+
+# Expected error message, with actual filename/errno trimmed
+cat <<\EOF >exp-err-temp || framework_failure_
+sed: couldn't open temporary file
+EOF
+
+# TODO: why exit-code 4 (currently hard-coded)
+returns_ 4 sed -i = a/a 2>err-temp || fail=1
+
+# trim the filename/errno message (using sed itself...)
+sed -i 's/file.*$/file/' err-temp || framework_failure_
+compare_ exp-err-temp err-temp || fail=1
+
+# restore writability, to ensure it can be deleted
+chmod a+w a || framework_failure_
+
+
+#
+# no input files (with inplace)
+#
+
+# Expected error message
+cat <<\EOF> exp-err-no-files || framework_failure_
+sed: no input files
+EOF
+
+# /dev/null to ensure it doesn't hang if panic is not invoked
+returns_ 4 sed -i = </dev/null 2>err-no-files || fail=1
+compare_ exp-err-no-files err-no-files || fail=1
+
+
+#
+# Not a regular file (with inplace)
+#
+cat <<\EOF >exp-err-not-reg-file || framework_failure_
+sed: couldn't edit f: not a regular file
+EOF
+
+mkfifo f || framework_failure_
+
+# NOTE: the file-mode check is not performed until the first line is read.
+# an empty/blocking fifo will hang forever.
+printf a > f &
+
+# TODO: add a timeout in case of bug leading to a blocking fifo?
+returns_ 4 sed -i = f 2>err-not-reg-file || fail=1
+compare_ exp-err-not-reg-file err-not-reg-file || fail=1
+
+
+#
+# inplace on a terminal device
+# (if available)
+#
+
+#NOTE: device name is replaced later
+cat <<\EOF >exp-err-tty || framework_failure_
+sed: couldn't edit X: is a terminal
+EOF
+
+ttydev=no-such-file
+type tty >/dev/null 2>&1 && ttydev=$(tty 2>/dev/null)
+if test -w "$ttydev" ; then
+ returns_ 4 sed -i = "$ttydev" 2>err-tty || fail=1
+
+ # remove the actual terminal device name (using sed itself...)
+ sed -i 's/edit.*:/edit X:/' err-tty || framework_failure_
+
+ compare_ exp-err-tty err-tty || fail=1
+fi
+
+
+
+Exit $fail
diff --git a/testsuite/posix-char-class.sh b/testsuite/posix-char-class.sh
new file mode 100644
index 0000000..db7a97f
--- /dev/null
+++ b/testsuite/posix-char-class.sh
@@ -0,0 +1,67 @@
+#!/bin/sh
+# Test character-class definitions in POSIX mode.
+
+# Copyright (C) 2016 Free Software Foundation, Inc.
+
+# This 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/>.
+
+# NOTE:
+# In GNU Extension mode, all text is normalized (e.g. backslash-X combinations).
+# In POSIX mode, normalize_text() ensures content of character
+# classes is not normalized.
+#
+# Compare:
+# $ printf "t\t\n" | sed 's/[\t]/X/' | od -a
+# 0000000 t X nl
+# $ printf "t\t\n" | sed --posix 's/[\t]/X/' | od -a
+# 0000000 X ht nl
+#
+# This test unit validates the special handling of character classes
+# in posix mode (compile.c:normalize_text() implementation).
+
+
+. "${srcdir=.}/testsuite/init.sh"; path_prepend_ ./sed
+print_ver_ sed
+
+fail=0
+
+echo X > exp || framework_failure_
+
+# Closing bracket without opening bracket, match as-is
+echo ']' | sed --posix 's/]/X/' > out1 || fail=1
+compare_ exp out1 || fail=1
+
+# Two opening brackets (same state when opening the second one)
+echo '[' | sed --posix 's/[[]/X/' > out2 || fail=1
+compare_ exp out2 || fail=1
+
+# Escaping before and after the character class, but not inside it (POSIX MODE)
+printf "\tt\t\n" | sed --posix 's/\t[\t]\t/X/' > out3 || fail=1
+compare_ exp out3 || fail=1
+
+# Escaping before, inside, and after the character class (GNU MODE)
+printf "\t\t\t\n" | sed 's/\t[\t]\t/X/' > out4 || fail=1
+compare_ exp out4 || fail=1
+
+# Special characters, but outside a valid character-class syntax
+printf "=\n" | sed --posix 's/[.=:.]/X/' > out5 || fail=1
+compare_ exp out5 || fail=1
+
+# A valid character class definition
+printf "b\n" | sed --posix 's/[[:alpha:]]/X/' > out6 || fail=1
+compare_ exp out6 || fail=1
+
+
+
+Exit $fail
diff --git a/testsuite/posix-mode-N.sh b/testsuite/posix-mode-N.sh
new file mode 100755
index 0000000..2c7c128
--- /dev/null
+++ b/testsuite/posix-mode-N.sh
@@ -0,0 +1,58 @@
+#!/bin/sh
+# Test 'N' command with/without posix conformity
+
+# Copyright (C) 2016 Free Software Foundation, Inc.
+
+# This 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/>.
+. "${srcdir=.}/testsuite/init.sh"; path_prepend_ ./sed
+print_ver_ sed
+
+fail=0
+
+# in/exp as identical, but using 'exp' for both input and output
+# will cause unneeded confusion when looking at the logs.
+printf "A\nB\n" > in1 || framework_failure_
+cp in1 exp1 || framework_failure_
+printf "A\n" > in2 || framework_failure_
+cp in2 exp2 || framework_failure_
+
+# If there is a 'next' line, N behaves the same regardless of posixicity
+sed N in1 > out1 || fail=1
+compare exp1 out1 || fail=1
+
+sed --posix N in1 > out2 || fail=1
+compare exp1 out2 || fail=1
+
+POSIXLY_CORRECT=y sed N in1 > out3 || fail=1
+compare exp1 out3 || fail=1
+
+
+# If there is no 'next' line,
+# gnu-N quits with printing
+# posix-N quits without printing.
+sed N in2 > out4 || fail=1
+compare exp2 out4 || fail=1
+
+sed --posix N in2 > out5 || fail=1
+compare /dev/null out5 || fail=1
+
+POSIXLY_CORRECT=y sed N in2 > out6 || fail=1
+compare /dev/null out6 || fail=1
+
+# exception: gnu-mode N but no default output, should not print anything.
+sed -n N in2 > out7 || fail=1
+compare /dev/null out7 || fail=1
+
+
+Exit $fail
diff --git a/testsuite/posix-mode-addr.sh b/testsuite/posix-mode-addr.sh
new file mode 100644
index 0000000..6f3c112
--- /dev/null
+++ b/testsuite/posix-mode-addr.sh
@@ -0,0 +1,91 @@
+#!/bin/sh
+# Ensure GNU address extensions are rejected in posix mode
+
+# Copyright (C) 2016 Free Software Foundation, Inc.
+
+# This 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/>.
+. "${srcdir=.}/testsuite/init.sh"; path_prepend_ ./sed
+print_ver_ sed
+
+fail=0
+
+cat <<\EOF> exp-err-addr0 || framework_failure_
+sed: -e expression #1, char 6: invalid usage of line address 0
+EOF
+
+cat <<\EOF >exp-err-bad-addr || framework_failure_
+sed: -e expression #1, char 3: unexpected `,'
+EOF
+
+printf "%s\n" A B A C D E F G H I J >in1 || framework_failure_
+
+# The expected output with zero-line address '0,/A/'
+# the regex will match the first line
+printf "A\n" >exp-l0 || framework_failure_
+
+# The expected output with one-line address '1,/A/'
+# the regex will not be checked against the first line,
+# will match the third line
+printf "%s\n" A B A >exp-l1 || framework_failure_
+
+# The expected output with address '2,+1'
+# (from line 2, count 1 addition line = line 3)
+printf "%s\n" B A >exp-plus || framework_failure_
+
+# The expected output with address '5,~4'
+# (from line 5 till a multiple of 4 = line 8)
+printf "%s\n" D E F G >exp-mult || framework_failure_
+
+
+#
+# Addressing extension: 0,/regexp/
+#
+
+# sanity check: address line=1 is valid for both posix and gnu
+sed -n '1,/A/p' in1 > out-l1 || fail=1
+compare_ exp-l1 out-l1 || fail=1
+
+# address line=0 is a gnu extension
+sed -n '0,/A/p' in1 > out-gnu-l0 || fail=1
+compare_ exp-l0 out-gnu-l0 || fail=1
+# rejected in posix mode
+returns_ 1 sed --posix -n '0,/A/p' in1 2>err-posix-l0 || fail=1
+compare_ exp-err-addr0 err-posix-l0 || fail=1
+
+
+
+#
+# Addressing extension: addr,+N
+#
+sed -n '2,+1p' in1 > out-plus || fail=1
+compare_ exp-plus out-plus || fail=1
+
+returns_ 1 sed --posix -n '2,+1p' in1 2> err-plus || fail=1
+compare_ exp-err-bad-addr err-plus || fail=1
+
+
+
+#
+# Addressing extension: addr,~N
+#
+
+sed -n '5,~4p' in1 > out-mult || fail=1
+compare_ exp-mult out-mult || fail=1
+
+returns_ 1 sed --posix -n '5,~4p' in1 2> err-mult || fail=1
+compare_ exp-err-bad-addr err-mult || fail=1
+
+
+
+Exit $fail
diff --git a/testsuite/posix-mode-bad-ref.sh b/testsuite/posix-mode-bad-ref.sh
new file mode 100755
index 0000000..f578917
--- /dev/null
+++ b/testsuite/posix-mode-bad-ref.sh
@@ -0,0 +1,34 @@
+#!/bin/sh
+# Test non-posix-conforming gnu extensions when using --posix.
+
+# Copyright (C) 2016 Free Software Foundation, Inc.
+
+# This 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/>.
+. "${srcdir=.}/testsuite/init.sh"; path_prepend_ ./sed
+print_ver_ sed
+
+fail=0
+
+cat <<\EOF >exp-err || framework_failure_
+sed: -e expression #1, char 10: invalid reference \1 on `s' command's RHS
+EOF
+
+# Invalid references are errors in non-posix mode
+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
+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
new file mode 100644
index 0000000..d284a4d
--- /dev/null
+++ b/testsuite/posix-mode-s.sh
@@ -0,0 +1,73 @@
+#!/bin/sh
+# Ensure GNU extensions are rejected in posix mode
+
+# Copyright (C) 2016 Free Software Foundation, Inc.
+
+# This 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/>.
+. "${srcdir=.}/testsuite/init.sh"; path_prepend_ ./sed
+print_ver_ sed
+
+fail=0
+
+cat <<\EOF >exp-err || framework_failure_
+sed: -e expression #1, char 7: unknown option to `s'
+EOF
+
+# substitution command options (
+# TODO: conditionally test sSxX in perl mode
+for opt in i I m M ;
+do
+ # These options should fail in strict POSIX mode
+ returns_ 1 sed --posix "s/a/b/$opt" </dev/null 2>err || fail=1
+ compare_ exp-err err || fail=1
+
+ # These options are allowed otherwise
+ sed "s/a/b/$opt" </dev/null || fail=1
+
+ # POSIXLY_CORRECT alone does not disable them
+ POSIXLY_CORRECT=y sed "s/a/b/$opt" </dev/null || fail=1
+done
+
+
+# test s//e (execute pattern-space as shell)
+printf "A\n" > in1 || framework_failure_
+
+printf "hello\n" >exp-gnu-e || framework_failure_
+sed 's/./printf hello/e' in1 > out-gnu-e || fail=1
+compare exp-gnu-e out-gnu-e || fail=1
+
+
+# s///e rejected in POSIX mode
+cat <<\EOF >exp-err-psx-e || framework_failure_
+sed: -e expression #1, char 10: unknown option to `s'
+EOF
+returns_ 1 sed --posix 's/./echo/e' in1 2>err-posix-e || fail=1
+compare_ exp-err-psx-e err-posix-e || fail=1
+
+
+# substitution special commands (e.g \l \L \U \u \E).
+# see compile.c:setup_replacement()
+printf "a\n" > exp-gnu || framework_failure_
+printf "lA\n" > exp-posix || framework_failure_
+
+# gnu-extension: turn the next character to lowercase
+sed 's/./\l&/' in1 > out-gnu || fail=1
+compare_ exp-gnu out-gnu || fail=1
+
+# posix: '\l' is just 'l'
+sed --posix 's/./\l&/' in1 > out-posix || fail=1
+compare_ exp-posix out-posix || fail=1
+
+
+Exit $fail
diff --git a/testsuite/range-overlap.sh b/testsuite/range-overlap.sh
new file mode 100755
index 0000000..267eb03
--- /dev/null
+++ b/testsuite/range-overlap.sh
@@ -0,0 +1,35 @@
+#!/bin/sh
+# Verify that even with overlapping ranges of line numbers,
+# only the selected lines are affected.
+
+# Copyright (C) 2015-2016 Free Software Foundation, Inc.
+
+# This 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/>.
+. "${srcdir=.}/testsuite/init.sh"; path_prepend_ ./sed
+print_ver_ sed
+
+printf '%s\n' 1 2 3 4 5 6 > in || framework_failure_
+printf '%s\n' 1 5 6 > exp || framework_failure_
+
+# Before sed-4.3, this would mistakenly modify line 5 like this:
+# 1
+# yx5
+# 6
+sed '2,4d;2,3s/^/x/;3,4s/^/y/' in > out 2> err || framework_failure_
+
+fail=0
+compare exp out || fail=1
+compare /dev/null err || fail=1
+
+Exit $fail
diff --git a/testsuite/recursive-escape-c.sh b/testsuite/recursive-escape-c.sh
new file mode 100644
index 0000000..88c9399
--- /dev/null
+++ b/testsuite/recursive-escape-c.sh
@@ -0,0 +1,72 @@
+#!/bin/sh
+# test \c escaping
+
+# Copyright (C) 2016 Free Software Foundation, Inc.
+
+# This 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/>.
+. "${srcdir=.}/testsuite/init.sh"; path_prepend_ ./sed
+print_ver_ sed
+
+fail=0
+unset POSIXLY_CORRECT
+export LC_ALL=C
+
+# input file, any 6 lines would do, each a different test case
+printf "%s\n" a a a a a a >in1 || framework_failure_
+
+# input program
+cat << \EOF > prog1 || framework_failure_
+1s/./\cA/
+2s/./\cB/
+3s/./\c[/
+4s/./\c]/
+
+# '\c' at end-of-buffer, a backslash is pushed up
+# on level of interpretation, and the '.' match is replaced
+# with one backslash.
+5s/./\c/
+
+# This would return incorrect results before 4.3,
+# producing both \034 and another backslash.
+6s/./\c\\/
+EOF
+
+# expected output:
+printf '\001\n\002\n\033\n\035\n\\\n\034\n' > exp1 || framework_failure_
+
+#
+# Run simple test cases
+#
+sed -f prog1 in1 > out1 || fail=1
+compare_ exp1 out1 || fail=1
+
+# for easier troubleshooting, if users ever report errors
+if test "$fail" -eq 1 ; then
+ od -tx1c prog1
+ od -tx1c exp1
+ od -tx1c out1
+fi
+
+#
+# Test invalid usage
+#
+cat << \EOF > exp-err || framework_failure_
+sed: -e expression #1, char 10: recursive escaping after \c not allowed
+EOF
+
+# Before sed-4.3, this resulted in '\034d'. Now, it is rejected.
+returns_ 1 sed '1s/./\c\d/' in1 2>err || fail=1
+compare_ exp-err err || fail=1
+
+Exit $fail
diff --git a/testsuite/regex-errors.sh b/testsuite/regex-errors.sh
new file mode 100644
index 0000000..292b2b3
--- /dev/null
+++ b/testsuite/regex-errors.sh
@@ -0,0 +1,43 @@
+#!/bin/sh
+# Exercise regex_compile errors
+
+# Copyright (C) 2016 Free Software Foundation, Inc.
+
+# This 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/>.
+. "${srcdir=.}/testsuite/init.sh"; path_prepend_ ./sed
+print_ver_ sed
+
+#
+# Invalid backref in address regex
+#
+cat <<\EOF >exp-err-inv-backref || framework_failure_
+sed: -e expression #1, char 4: Invalid back reference
+EOF
+
+returns_ 1 sed '/\1/,$p' </dev/null 2>err-inv-backref || fail=1
+compare_ exp-err-inv-backref err-inv-backref || fail=1
+
+
+#
+# modifiers on empty regex (BAD_MODIF in regex.c)
+#
+cat <<\EOF >exp-err-bad-modif || framework_failure_
+sed: -e expression #1, char 3: cannot specify modifiers on empty regexp
+EOF
+
+returns_ 1 sed '//M,$p' </dev/null 2>err-bad-modif || fail=1
+compare_ exp-err-bad-modif err-bad-modif || fail=1
+
+
+Exit $fail
diff --git a/testsuite/runptests.c b/testsuite/runptests.c
index cbe61cc..fb787e7 100644
--- a/testsuite/runptests.c
+++ b/testsuite/runptests.c
@@ -1,5 +1,5 @@
/* POSIX regex testsuite from IEEE 2003.2.
- Copyright (C) 1998, 2003 Free Software Foundation, Inc.
+ Copyright (C) 1998-2016 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1998.
@@ -18,9 +18,7 @@
Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
02110-1301 USA. */
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
+#include <config.h>
#include <sys/types.h>
#include <regex.h>
diff --git a/testsuite/runtest b/testsuite/runtest
index 80ce903..60f53ef 100755
--- a/testsuite/runtest
+++ b/testsuite/runtest
@@ -1,23 +1,25 @@
#! /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"}
+: ${SED="./sed/sed"}
+
+makefile="${abs_top_srcdir}/testsuite/Makefile.tests"
-makefile="$srcdir/Makefile.tests"
+# Strip the directory './testsuite/' from the test name.
test=`echo "$@"| sed 's,.*/,,'`
-# As a convenience, suppress the output of make if the test passes
-if $MAKE SED="$SED" srcdir="$srcdir" -f "$makefile" $test > $test.test 2>&1; then
- exitcode=0
- rm -f $test.test
-else
- exitcode=$?
-fi
-if test -f $test.skip; then
- exitcode=77
-else
- test -f $test.test && cat $test.test
-fi
-rm -f $test.test $test.skip
+# 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
index 2f62315..3db7a77 100644
--- a/testsuite/runtests.c
+++ b/testsuite/runtests.c
@@ -22,11 +22,7 @@ PERFORMANCE OF THIS SOFTWARE.
******************************************************************/
-
-
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
+#include <config.h>
#include <sys/types.h>
#include <regex.h>
@@ -34,8 +30,6 @@ PERFORMANCE OF THIS SOFTWARE.
#include <stdlib.h>
#include <string.h>
-
-
struct a_test
{
int expected;
diff --git a/testsuite/sandbox.sh b/testsuite/sandbox.sh
new file mode 100755
index 0000000..3e529fe
--- /dev/null
+++ b/testsuite/sandbox.sh
@@ -0,0 +1,92 @@
+#!/bin/sh
+# Test --sandbox mode
+
+# Copyright (C) 2016 Free Software Foundation, Inc.
+
+# This 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/>.
+. "${srcdir=.}/testsuite/init.sh"; path_prepend_ ./sed
+print_ver_ sed
+
+echo a > a || framework_failure_
+echo b > b || framework_failure_
+
+# Same error message, different character position in the sed program.
+for i in 1 6 14 ; do
+ err="sed: -e expression #1, char $i: e/r/w commands disabled in sandbox mode"
+ echo "$err" > exp-err$i || framework_failure_
+done
+
+fail=0
+
+# read command - without sandbox
+printf "a\nb\n" > exp || framework_failure_
+sed rb a > out || fail=1
+compare exp out || fail=1
+
+# read command - with sandbox
+returns_ 1 sed --sandbox -e 'ra' b >/dev/null 2>err1 || fail=1
+compare exp-err1 err1 || fail=1
+
+
+# write command (create file 'c') - without sandbox
+sed wc a > out || fail=1
+compare a c || fail=1
+compare out a || fail=1
+
+# write command - with sandbox
+returns_ 1 sed --sandbox -e 'wd' a >/dev/null 2>err2 || fail=1
+compare exp-err1 err1 || fail=1
+# ensure file 'd' was not created
+test -e d && fail=1
+
+
+
+# execute command - without sandbox
+sed 'etouch e' b > out || fail=1
+compare b out || fail=1
+# ensure 'e' was created
+test -e e || fail=1
+
+# execute command - with sandbox
+returns_ 1 sed --sandbox -e 'etouch f' b >/dev/null 2>err3 || fail=1
+compare exp-err1 err3 || fail=1
+# ensure 'f' was not created
+test -e f && fail=1
+
+
+
+# substitute+write option - without sandbox
+sed 's/^//wg' a > out || fail=1
+test -e g || fail=1
+
+# substitute+write option - with sandbox
+returns_ 1 sed --sandbox 's/^//wh' a >/dev/null 2>err4 || fail=1
+compare exp-err6 err4 || fail=1
+# ensure file 'h' was not created
+test -e h && fail=1
+
+
+
+# substitute+execute option - without sandbox
+sed 's/.*/touch i/e' a > out || fail=1
+test -e i || fail=1
+
+# substitute+execute option - with sandbox
+returns_ 1 sed --sandbox 's/.*/touch j/e' a >/dev/null 2>err5 || fail=1
+compare exp-err14 err5 || fail=1
+# ensure file 'j' was not created
+test -e j && fail=1
+
+
+Exit $fail
diff --git a/testsuite/stdin-prog.sh b/testsuite/stdin-prog.sh
new file mode 100644
index 0000000..a8f992c
--- /dev/null
+++ b/testsuite/stdin-prog.sh
@@ -0,0 +1,39 @@
+#!/bin/sh
+# Test program file from STDIN
+
+# Copyright (C) 2016 Free Software Foundation, Inc.
+
+# This 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/>.
+. "${srcdir=.}/testsuite/init.sh"; path_prepend_ ./sed
+print_ver_ sed
+
+fail=0
+
+echo X > in1 || framework_failure_
+printf "1\nX\n" > exp1 || framework_failure_
+
+# program filename starts with '-'
+printf "=\n" > ./-myprog || framework_failure_
+
+
+# program from STDIN
+printf "=\n" | sed -f - in1 > out1 || fail=1
+compare_ exp1 out1 || fail=1
+
+# program filename starting with '-'
+# (if a buggy sed reads from STDIN, the 'v9' command will fail)
+printf "v9\n" | sed -f -myprog in1 > out2 || fail=1
+compare_ exp1 out2 || fail=1
+
+Exit $fail
diff --git a/testsuite/subst-mb-incomplete.sh b/testsuite/subst-mb-incomplete.sh
new file mode 100755
index 0000000..90d73cf
--- /dev/null
+++ b/testsuite/subst-mb-incomplete.sh
@@ -0,0 +1,34 @@
+#!/bin/sh
+# Ensure that sed no longer writes beyond the end of a heap buffer when
+# performing a substitution with a replacement string containing an
+# incomplete multi-byte character.
+
+# Copyright (C) 2015-2016 Free Software Foundation, Inc.
+
+# This 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/>.
+. "${srcdir=.}/testsuite/init.sh"; path_prepend_ ./sed
+print_ver_ sed
+
+require_en_utf8_locale_
+
+echo > in || framework_failure_
+printf '\233\375\200\n' > exp-out || framework_failure_
+
+fail=0
+LC_ALL=en_US.utf8 sed $(printf 's/^/\\L\233\375\\\200/') in > out 2> err
+
+compare exp-out out || fail=1
+compare /dev/null err || fail=1
+
+Exit $fail
diff --git a/testsuite/subst-options.sh b/testsuite/subst-options.sh
new file mode 100644
index 0000000..b05eb1b
--- /dev/null
+++ b/testsuite/subst-options.sh
@@ -0,0 +1,125 @@
+#!/bin/sh
+# Test Substitute options (for code-coverage purposes as well)
+
+# Copyright (C) 2016 Free Software Foundation, Inc.
+
+# This 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/>.
+. "${srcdir=.}/testsuite/init.sh"; path_prepend_ ./sed
+print_ver_ sed
+
+fail=0
+
+#
+# Simple modifiers to s//
+# (specific characters included as make_subst_opts's implementation
+# checks for them before returning control)
+printf "%s\n" a a a a a a > subst-in1 || framework_failure_
+printf "%s\n" x x x x x x > subst-exp1 || framework_failure_
+cat << \EOF >> subst-prog1 || framework_failure_
+1s/A/x/i
+2s/A/x/I
+
+# s// followed by '}'
+3{s/./x/}
+# s// followed by '#'
+4s/./x/#
+# s// followed by ';'
+5s/./x/;
+# s// followed by '\n
+6s/./x/
+EOF
+
+sed -f subst-prog1 subst-in1 > subst-out1 || fail=1
+compare_ subst-exp1 subst-out1 || fail=1
+
+
+#
+# Number modifiers to s//
+#
+
+cat << \EOF >subst-in2 || framework_failure_
+bbbbbbbbbb
+bbbbbbbbbb
+bbbbbbbbbb
+bbbbbbbbbb
+bbbbbbbbbb
+bbbbbbbbbb
+bbbbbbbbbb
+bbbbbbbbbb
+bbbbbbbbbb
+bbbbbbbbbb
+EOF
+
+cat << \EOF >subst-prog2 || framework_failure_
+1s/./x/g
+2s/./x/1
+3s/./x/2
+4s/./x/3
+5s/./x/4
+6s/./x/5
+7s/./x/6
+8s/./x/7
+9s/./x/8
+10s/./x/9
+EOF
+
+cat << \EOF >subst-exp2
+xxxxxxxxxx
+xbbbbbbbbb
+bxbbbbbbbb
+bbxbbbbbbb
+bbbxbbbbbb
+bbbbxbbbbb
+bbbbbxbbbb
+bbbbbbxbbb
+bbbbbbbxbb
+bbbbbbbbxb
+EOF
+
+sed -f subst-prog2 subst-in2 > subst-out2 || fail=1
+compare_ subst-exp2 subst-out2 || fail=1
+
+#
+# Multiline modifier: s///m
+# ('N' will read and concatenate the second line
+# into the patten space, making it "foo\nbar".
+# s// will then operate on it as one string).
+printf "foo\nbar\n" > subst-in3 || fail=1
+printf "Xoo\nXar\n" > subst-exp3 || fail=1
+
+sed 'N;s/^./X/gm' subst-in3 > subst-out3-1 || fail=1
+compare_ subst-exp3 subst-out3-1 || fail=1
+sed 'N;s/^./X/gM' subst-in3 > subst-out3-2 || fail=1
+compare_ subst-exp3 subst-out3-2 || fail=1
+
+# sanity-check: without m, only the first line should match
+printf "Xoo\nbar\n" > subst-exp3-3 || fail=1
+sed 'N;s/^./X/g' subst-in3 > subst-out3-3 || fail=1
+compare_ subst-exp3-3 subst-out3-3 || fail=1
+
+
+#
+# s// followed by \r\n
+#
+
+printf "s/./X/\r\n" > subst-prog4 || framework_failure_
+echo a > subst-in4 || framework_failure_
+echo X > subst-exp4 || framework_failure_
+sed -f subst-prog4 subst-in4 > subst-out4 || fail=1
+compare_ subst-exp4 subst-out4 || fail=1
+
+
+
+
+Exit $fail
diff --git a/testsuite/subst-replacement.sh b/testsuite/subst-replacement.sh
new file mode 100644
index 0000000..c385be3
--- /dev/null
+++ b/testsuite/subst-replacement.sh
@@ -0,0 +1,88 @@
+#!/bin/sh
+# Test Substitute replacements, e.g. 's/(.)/\U\1/'
+
+# Copyright (C) 2016 Free Software Foundation, Inc.
+
+# This 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/>.
+. "${srcdir=.}/testsuite/init.sh"; path_prepend_ ./sed
+print_ver_ sed
+
+fail=0
+
+#
+# Backslash followed by unrecognized letter,
+# use letter as-is.
+echo a > in-rpl1 || framework_failure_
+echo Q > exp-rpl1 || framework_failure_
+sed -E 's/(.)/\Q/' in-rpl1 > out-rpl1 || fail=1
+compare_ exp-rpl1 out-rpl1 || fail=1
+
+#
+# numbered backreferences
+#
+echo 123456789 > in-rpl2 || framework_failure_
+for i in 1 2 3 4 5 6 7 8 9 ;
+do
+ echo $i > exp-rpl2-$i || framework_failure_
+ sed -E "s/(.)(.)(.)(.)(.)(.)(.)(.)(.)/\\$i/" in-rpl2 > out-rpl2-$i || fail=1
+ compare_ exp-rpl2-$i out-rpl2-$i || fail=1
+done
+
+# \0 matches entire pattern (TODO: is this documented?)
+# output should be the same as the input.
+sed -E 's/(.)(.)(.)(.)(.)(.)(.)(.)(.)/\0/' in-rpl2 > out-rpl2-0 || fail=1
+compare_ in-rpl2 out-rpl2-0 || fail=1
+
+# Unescaped '&' matches entire pattern
+# output should be the same as the input.
+sed -E 's/(.)(.)(.)(.)(.)(.)(.)(.)(.)/&/' in-rpl2 > out-rpl2-amp || fail=1
+compare_ in-rpl2 out-rpl2-amp || fail=1
+
+
+#
+# gnu extension: \U \u \L \l \E
+#
+echo abCde > in-rpl3 || framework_failure_
+
+# \U - all uppercase
+echo ABCde > exp-rpl3-U || framework_failure_
+sed -E 's/(.)(.)(.)/\U\1\2\3/' in-rpl3 > out-rpl3-U || fail=1
+compare_ exp-rpl3-U out-rpl3-U || fail=1
+
+# \u - next-char uppercase
+echo AbCde > exp-rpl3-u || framework_failure_
+sed -E 's/(.)(.)(.)/\u\1\2\3/' in-rpl3 > out-rpl3-u || fail=1
+compare_ exp-rpl3-u out-rpl3-u || fail=1
+
+# \L - all lowercase
+echo abcde > exp-rpl3-L || framework_failure_
+sed -E 's/(.)(.)(.)/\L\1\2\3/' in-rpl3 > out-rpl3-L || fail=1
+compare_ exp-rpl3-L out-rpl3-L || fail=1
+
+# \l - next-char lowercase
+echo abCde > exp-rpl3-l || framework_failure_
+sed -E 's/(.)(.)(.)/\l\1\2\3/' in-rpl3 > out-rpl3-l || fail=1
+compare_ exp-rpl3-l out-rpl3-l || fail=1
+
+# \E - stop \U \u \L \l processing
+echo AbCde > exp-rpl3-E1 || framework_failure_
+sed -E 's/(.)(.)(.)/\U\1\E\2\3/' in-rpl3 > out-rpl3-E1 || fail=1
+compare_ exp-rpl3-E1 out-rpl3-E1 || fail=1
+
+echo abCde > exp-rpl3-E2 || framework_failure_
+sed -E 's/(.)(.)(.)/\L\1\2\E\3/' in-rpl3 > out-rpl3-E2 || fail=1
+compare_ exp-rpl3-E2 out-rpl3-E2 || fail=1
+
+
+Exit $fail
diff --git a/testsuite/temp-file-cleanup.sh b/testsuite/temp-file-cleanup.sh
new file mode 100755
index 0000000..aadb9ce
--- /dev/null
+++ b/testsuite/temp-file-cleanup.sh
@@ -0,0 +1,37 @@
+#!/bin/sh
+# Verify that an erroneous use of sed -i no longer leaves behind
+# a temporary file.
+
+# Copyright (C) 2015-2016 Free Software Foundation, Inc.
+
+# This 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/>.
+. "${srcdir=.}/testsuite/init.sh"; path_prepend_ ./sed
+print_ver_ sed
+
+# The input file must have at least one line.
+echo > in || framework_failure_
+printf 'sed: -e expression #1, char 0: no previous regular expression\n' \
+ > exp || framework_failure_
+
+# Before sed-4.3, this would create a file named sed??????
+returns_ 1 sed -i s//b/ in > out 2> err || fail=1
+
+compare /dev/null out || fail=1
+compare exp err || fail=1
+
+# Ensure that no other file has been created in this directory.
+files=$(echo *)
+test "$files" = "err exp in out" || fail=1
+
+Exit $fail
diff --git a/testsuite/test-mbrtowc.c b/testsuite/test-mbrtowc.c
new file mode 100644
index 0000000..04c20fc
--- /dev/null
+++ b/testsuite/test-mbrtowc.c
@@ -0,0 +1,172 @@
+/* Auxiliary program to test mbrtowc(3) behaviour.
+ Copyright 2016 Free Software Foundation, Inc.
+
+ This 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, write to the Free Software
+ Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
+ 02110-1301, USA. */
+
+/* Test the operating-system's native mbrtowc(3) function,
+ by feeding it multibyte seqeunces one byte at a time,
+ and reporting the result.
+
+ The program prints the following values after each mbrtowc invocation,
+ separated by commas:
+
+ -2 the octet is contributes to a valid yet incomplete multibyte sequence
+ in the current locale.
+
+ -1 the octet causes an encoding error.
+
+ 0 the octet represents a NUL byte
+
+ 1 the octet is a valid single-byte character, OR
+ completes a valid multibyte sequence.
+
+ Because the program invokes mbrtowc(3) byte-by-byte, the reported
+ result should never be larger than 1.
+
+ Example of typical output with UTF-8 encoding
+ ---------------------------------------------
+
+ The unicode character 'N-ARY SUMMATION' (U+2211), encoded in UTF-8 as:
+ hex: 0xE2 0x88 0x91
+ oct: 342 210 211
+
+ Decoding the valid sequence byte-by-byte gives:
+ $ printf '\342\210\221' | LC_ALL=en_US.UTF-8 test-mbrtowc
+ -2,-2,1
+
+ '\210' is not a valid leading byte in UTF-8,
+ thus the first byte gives -1, and the 'X' is treated
+ as a valid single-byte character:
+
+ $ printf '\210X' | LC_ALL=en_US.UTF-8 test-mbrtowc
+ -1,1
+
+ '\342' is a valid yet incomplete multibyte sequence.
+ Passing it to mbrtowc results in value '-2'.
+ The following value 'X' gives an encoding error '-1'
+ (as 'X' is not a valid trailing byte in a multibyte UTF-8 sequence):
+
+ $ printf '\342X' | LC_ALL=en_US.UTF-8 test-mbrtowc
+ -2,-1
+
+
+ Detecting implementation bugs in mbrtowc
+ ----------------------------------------
+
+ UTF-8 implementation is correct on most operating systems.
+ Other multibyte locales might present more difficulties.
+ An example is the Japanese SHIFT-JIS locale under Mac OS X.
+ NOTE: The locale is 'ja_JP.SJIS' under Mac OS X, 'ja_JP.shiftjis'
+ under Ubuntu. 'ja_JP.sjis' was also found on some systems.
+
+ Using unicode character 'KATAKANA LETTER ZE' (U+30BC)
+ UTF-8: hex: 0xE3 0x82 0xBC
+ Shift-jis hex: 0x83 0x5B
+ oct: 203 133
+
+ The following is a valid multibyte sequence in SHIFT-JIS,
+ the first byte should result in '-2' (valid yet incomplete),
+ and the second byte should result in '1' (a valid multibyte sequence
+ completed):
+
+ $ printf '\203\133' | LC_ALL=ja_JP.SJIS test-mbrtowc
+ -2,1
+
+ The follwing is an INVALID multibyte sequence in SHIFT-JIS
+ (The byte ':' is not valid as a second octet).
+ Buggy implementations will accept this as a valid multibyte sequence:
+
+ # NOTE: this result indicates a buggy mbrtowc
+ $ printf '\203:' | LC_ALL=ja_JP.SJIS test-mbrtowc
+ -2,1
+
+ A correct implementations should report '-1' for the second byte (i.e.
+ an encoding error):
+
+ $ printf '\203:' | LC_ALL=ja_JP.SJIS test-mbrtowc
+ -2,-1
+
+
+ Expected results with correct implementations
+ ---------------------------------------------
+
+ In GNU Sed some tests purposely use invalid multibyte sequences
+ to test sed's behaviour. A buggy implemetation of mbrtowc
+ would result in false-alarm failures.
+
+ The following are expected results in correct implementations:
+ (locale names are from Mac OS X):
+
+ $ printf '\203\133' | LC_ALL=ja_JP.SJIS test-mbrtowc
+ -2,1
+ $ printf '\203:' | LC_ALL=ja_JP.SJIS test-mbrtowc
+ -2,-1
+ $ printf '\262C' | LC_ALL=ja_JP.eucJP test-mbrtowc
+ -2,-1
+*/
+
+#include <config.h>
+#include <locale.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <wchar.h>
+
+#include "closeout.h"
+#include "error.h"
+#include "progname.h"
+
+/* stub replacement for non-standard err(3) */
+static int
+die (const char *msg)
+{
+ error (0, 0, "%s: error: %s\n", program_name, msg);
+ exit (EXIT_FAILURE);
+}
+
+int
+main (int argc, char **argv)
+{
+ int c;
+ int first = 1;
+
+ set_program_name (argv[0]);
+ if (!setlocale (LC_ALL, ""))
+ die ("failed to set locale");
+
+ while ((c = getchar ()) != EOF)
+ {
+ wchar_t wc;
+ char ch = (unsigned char) c;
+ int i = (int) mbrtowc (&wc, &ch, 1, NULL);
+
+ if (!first)
+ putchar (',');
+ first = 0;
+
+ printf ("%d", i);
+ }
+
+ if (first)
+ die ("empty input");
+
+ putchar ('\n');
+
+ if (ferror (stdin))
+ die ("read error");
+ close_stdout ();
+
+ exit (EXIT_SUCCESS);
+}
diff --git a/testsuite/title-case.sh b/testsuite/title-case.sh
new file mode 100755
index 0000000..962929b
--- /dev/null
+++ b/testsuite/title-case.sh
@@ -0,0 +1,36 @@
+#!/bin/sh
+# Test case insensitive matching for titlecase and similarly odd chars.
+
+# Copyright (C) 2016 Free Software Foundation, Inc.
+
+# This 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/>.
+. "${srcdir=.}/testsuite/init.sh"; path_prepend_ ./sed
+print_ver_ sed
+
+require_el_iso88597_locale_
+
+fail=0
+
+a='\323' # SIGMA
+b='\362' # stigma
+c='\363' # sigma
+
+printf "$a\\n$b\\n$c\\n" >in || framework_failure_
+for chr in "$a" "$b" "$c"; do
+ printf '/\(\)\\1'"$chr"/Ip >prog || fail=1
+ LC_ALL=el_GR.iso88597 sed -n -f prog in >out || fail=1
+ compare_ in out || fail=1
+done
+
+Exit $fail
diff --git a/testsuite/tst-boost.c b/testsuite/tst-boost.c
index b38a620..6265123 100644
--- a/testsuite/tst-boost.c
+++ b/testsuite/tst-boost.c
@@ -1,5 +1,5 @@
/* Regular expression tests.
- Copyright (C) 2003 Free Software Foundation, Inc.
+ Copyright (C) 2003-2016 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Jakub Jelinek <jakub@redhat.com>, 2003.
@@ -18,9 +18,7 @@
Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
02110-1301 USA. */
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
+#include <config.h>
#include <sys/types.h>
#ifdef HAVE_MCHECK_H
diff --git a/testsuite/tst-pcre.c b/testsuite/tst-pcre.c
index e8c6a0b..eb16424 100644
--- a/testsuite/tst-pcre.c
+++ b/testsuite/tst-pcre.c
@@ -1,5 +1,5 @@
/* Regular expression tests.
- Copyright (C) 2003 Free Software Foundation, Inc.
+ Copyright (C) 2003-2016 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Jakub Jelinek <jakub@redhat.com>, 2003.
@@ -18,9 +18,7 @@
Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
02110-1301 USA. */
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
+#include <config.h>
#include <sys/types.h>
#ifdef HAVE_MCHECK_H
@@ -141,7 +139,7 @@ main (int argc, char **argv)
{
regex_t re;
int n;
-
+
if (!pattern_valid)
{
printf ("%lu: No previous valid pattern %s\n", linenum, line);
diff --git a/testsuite/tst-regex2.c b/testsuite/tst-regex2.c
index 1dc14ad..dd65bb3 100644
--- a/testsuite/tst-regex2.c
+++ b/testsuite/tst-regex2.c
@@ -1,6 +1,4 @@
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
+#include <config.h>
#include <errno.h>
#include <fcntl.h>
diff --git a/testsuite/tst-rxspencer.c b/testsuite/tst-rxspencer.c
index 758fc04..0c060a4 100644
--- a/testsuite/tst-rxspencer.c
+++ b/testsuite/tst-rxspencer.c
@@ -1,5 +1,5 @@
/* Regular expression tests.
- Copyright (C) 2003 Free Software Foundation, Inc.
+ Copyright (C) 2003-2016 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Jakub Jelinek <jakub@redhat.com>, 2003.
@@ -18,9 +18,7 @@
Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
02110-1301 USA. */
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
+#include <config.h>
#include <sys/types.h>
#ifdef HAVE_MCHECK_H
@@ -340,7 +338,7 @@ mb_test (const char *pattern, int cflags, const char *string, int eflags,
free (matches_mb);
free (expect_mb);
if (string_mb != string)
- free ((char *) string_mb);
+ free (string_mb);
free (pattern_mb);
return ret;
}
diff --git a/testsuite/unbuffered.sh b/testsuite/unbuffered.sh
new file mode 100644
index 0000000..b1a4c1b
--- /dev/null
+++ b/testsuite/unbuffered.sh
@@ -0,0 +1,37 @@
+#!/bin/sh
+# Test -u/--unbuffered option
+
+# Copyright (C) 2016 Free Software Foundation, Inc.
+
+# This 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/>.
+. "${srcdir=.}/testsuite/init.sh"; path_prepend_ ./sed
+print_ver_ sed
+
+printf "1\n2\n" > in1 || framework_failure_
+
+# expected output for both programs
+printf "1\n" >> exp || framework_failure_
+
+
+# in unbuffered mode,
+# sed should consume and print the first line,
+# wc should see the rest of the input (second line).
+# The second sed trims optional leading whitespace.
+( sed -u 1q > out-sed ; wc -l | sed 's/^ *//' > out-wc ) < in1
+
+compare_ exp out-sed || fail=1
+compare_ exp out-wc || fail=1
+
+
+Exit $fail
diff --git a/testsuite/uniq.good b/testsuite/uniq.good
index 2941bec..95fc5ee 100644
--- a/testsuite/uniq.good
+++ b/testsuite/uniq.good
@@ -515,7 +515,7 @@ if (min > 0)
if (min > md->end_subject - eptr)
if (minimize)
if (number > 0)
-if (number > EXTRACT_BASIC_MAX)
+if (number > EXTRACT_BASIC_MAX)
if (offset < md->offset_max)
if (offset >= md->offset_max)
if (offset_top <= offset)
diff --git a/testsuite/uniq.inp b/testsuite/uniq.inp
index b1eddf3..aa61062 100644
--- a/testsuite/uniq.inp
+++ b/testsuite/uniq.inp
@@ -1240,8 +1240,8 @@ if (minimize)
if (minimize)
if (minimize)
if (number > 0)
-if (number > EXTRACT_BASIC_MAX)
-if (number > EXTRACT_BASIC_MAX)
+if (number > EXTRACT_BASIC_MAX)
+if (number > EXTRACT_BASIC_MAX)
if (offset < md->offset_max)
if (offset >= md->offset_max)
if (offset_top <= offset)
diff --git a/testsuite/utf8-1.good b/testsuite/utf8-1.good
index a48dac8..4e15f90 100644
--- a/testsuite/utf8-1.good
+++ b/testsuite/utf8-1.good
@@ -1 +1 @@
-Да Д \ No newline at end of file
+Да Д
diff --git a/testsuite/utf8-1.inp b/testsuite/utf8-1.inp
index 6e84e16..a596b7f 100644
--- a/testsuite/utf8-1.inp
+++ b/testsuite/utf8-1.inp
@@ -1 +1 @@
-да д \ No newline at end of file
+да д
diff --git a/testsuite/utf8-2.good b/testsuite/utf8-2.good
index a48dac8..4e15f90 100644
--- a/testsuite/utf8-2.good
+++ b/testsuite/utf8-2.good
@@ -1 +1 @@
-Да Д \ No newline at end of file
+Да Д
diff --git a/testsuite/utf8-2.inp b/testsuite/utf8-2.inp
index 6e84e16..a596b7f 100644
--- a/testsuite/utf8-2.inp
+++ b/testsuite/utf8-2.inp
@@ -1 +1 @@
-да д \ No newline at end of file
+да д
diff --git a/testsuite/utf8-3.good b/testsuite/utf8-3.good
index 4b90af9..3f39372 100644
--- a/testsuite/utf8-3.good
+++ b/testsuite/utf8-3.good
@@ -1 +1 @@
-Да д \ No newline at end of file
+Да д
diff --git a/testsuite/utf8-3.inp b/testsuite/utf8-3.inp
index 6e84e16..a596b7f 100644
--- a/testsuite/utf8-3.inp
+++ b/testsuite/utf8-3.inp
@@ -1 +1 @@
-да д \ No newline at end of file
+да д
diff --git a/testsuite/utf8-4.good b/testsuite/utf8-4.good
index 760353b..ddaa4b6 100644
--- a/testsuite/utf8-4.good
+++ b/testsuite/utf8-4.good
@@ -1 +1 @@
-ДА Д \ No newline at end of file
+ДА Д
diff --git a/testsuite/utf8-4.inp b/testsuite/utf8-4.inp
index 6e84e16..a596b7f 100644
--- a/testsuite/utf8-4.inp
+++ b/testsuite/utf8-4.inp
@@ -1 +1 @@
-да д \ No newline at end of file
+да д
diff --git a/testsuite/version.gin b/testsuite/version.gin
deleted file mode 100644
index 4b9d3fc..0000000
--- a/testsuite/version.gin
+++ /dev/null
@@ -1,12 +0,0 @@
-../sed/sed (GNU sed) @VERSION@
-Copyright (C) @COPYRIGHT_YEAR@ Free Software Foundation, Inc.
-License GPLv3+: GNU GPL version 3 or later <http://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 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/>.
-E-mail bug reports to: <@PACKAGE_BUGREPORT@>.
-Be sure to include the word ``sed'' somewhere in the ``Subject:'' field.
diff --git a/testsuite/xbxcx.good b/testsuite/xbxcx.good
index 9eadcd0..1a2eece 100644
--- a/testsuite/xbxcx.good
+++ b/testsuite/xbxcx.good
@@ -4,4 +4,4 @@ xbxcx
xbxcx
xbxcx
xbxcx
-xbxcx \ No newline at end of file
+xbxcx
diff --git a/testsuite/xbxcx.inp b/testsuite/xbxcx.inp
index 792d120..cac4334 100644
--- a/testsuite/xbxcx.inp
+++ b/testsuite/xbxcx.inp
@@ -4,4 +4,4 @@ bc
bac
baac
baaac
-baaaac \ No newline at end of file
+baaaac
diff --git a/testsuite/xemacs.good b/testsuite/xemacs.good
index 9fce4f1..4480027 100644
--- a/testsuite/xemacs.good
+++ b/testsuite/xemacs.good
@@ -1,7 +1,6 @@
#Makefile.in generated automatically by automake 1.5 from Makefile.am.
-#Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
-#Free Software Foundation, Inc.
+#Copyright 1994-2016 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.
@@ -64,4 +63,4 @@
"$(ACLOCAL_M4): configure.ac m4/codeset.m4 m4/getline.m4 m4/gettext.m4 m4/glibc21.m4 m4/iconv.m4 m4/isc-posix.m4 m4/lcmessage.m4 m4/obstack.m4 m4/progtest.m4"
" cd $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS)"
-"config.h: stamp-h" \ No newline at end of file
+"config.h: stamp-h"
diff --git a/testsuite/xemacs.inp b/testsuite/xemacs.inp
index 0fc0414..6beacff 100644
--- a/testsuite/xemacs.inp
+++ b/testsuite/xemacs.inp
@@ -1,7 +1,6 @@
# Makefile.in generated automatically by automake 1.5 from Makefile.am.
-# Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
-# Free Software Foundation, Inc.
+# Copyright 1994-2016 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.
@@ -64,4 +63,4 @@ $(srcdir)/configure: $(srcdir)/configure.ac $(ACLOCAL_M4) $(CONFIGURE_DEPENDENC
$(ACLOCAL_M4): configure.ac m4/codeset.m4 m4/getline.m4 m4/gettext.m4 m4/glibc21.m4 m4/iconv.m4 m4/isc-posix.m4 m4/lcmessage.m4 m4/obstack.m4 m4/progtest.m4
cd $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS)
-config.h: stamp-h \ No newline at end of file
+config.h: stamp-h
diff --git a/testsuite/y-bracket.good b/testsuite/y-bracket.good
index 278fee9..7e1a0ac 100644
--- a/testsuite/y-bracket.good
+++ b/testsuite/y-bracket.good
@@ -1 +1 @@
-Are you sure (y/n)? y]
+Are you sure (y/n)? y]
diff --git a/testsuite/y-bracket.inp b/testsuite/y-bracket.inp
index fe6124f..131c38c 100644
--- a/testsuite/y-bracket.inp
+++ b/testsuite/y-bracket.inp
@@ -1 +1 @@
-Are you sure (y/n)? [y]
+Are you sure (y/n)? [y]
diff --git a/testsuite/y-newline.good b/testsuite/y-newline.good
index b0f2bfe..371b9cb 100644
--- a/testsuite/y-newline.good
+++ b/testsuite/y-newline.good
@@ -1 +1 @@
-Are Sou Yure (S/n)? [S] $$Are Sou Yure (S/n)? [S]
+Are Sou Yure (S/n)? [S]$$Are Sou Yure (S/n)? [S]
diff --git a/testsuite/y-newline.inp b/testsuite/y-newline.inp
index fe6124f..131c38c 100644
--- a/testsuite/y-newline.inp
+++ b/testsuite/y-newline.inp
@@ -1 +1 @@
-Are you sure (y/n)? [y]
+Are you sure (y/n)? [y]
diff --git a/testsuite/y-zero.good b/testsuite/y-zero.good
new file mode 100644
index 0000000..659b724
--- /dev/null
+++ b/testsuite/y-zero.good
Binary files differ
diff --git a/testsuite/y-zero.inp b/testsuite/y-zero.inp
new file mode 100644
index 0000000..8baef1b
--- /dev/null
+++ b/testsuite/y-zero.inp
@@ -0,0 +1 @@
+abc
diff --git a/testsuite/y-zero.sed b/testsuite/y-zero.sed
new file mode 100644
index 0000000..6b0af7b
--- /dev/null
+++ b/testsuite/y-zero.sed
@@ -0,0 +1 @@
+y/b/\x00/
diff --git a/testsuite/zero-anchor.good b/testsuite/zero-anchor.good
new file mode 100644
index 0000000..a62d3b4
--- /dev/null
+++ b/testsuite/zero-anchor.good
Binary files differ
diff --git a/testsuite/zero-anchor.inp b/testsuite/zero-anchor.inp
new file mode 100644
index 0000000..7207ec4
--- /dev/null
+++ b/testsuite/zero-anchor.inp
Binary files differ
diff --git a/testsuite/zero-anchor.sed b/testsuite/zero-anchor.sed
new file mode 100644
index 0000000..b3d2de1
--- /dev/null
+++ b/testsuite/zero-anchor.sed
@@ -0,0 +1,6 @@
+N
+N
+s/^/X/g
+s/^/X/mg
+s/$/Y/g
+s/$/Y/mg
diff --git a/thanks-gen b/thanks-gen
new file mode 100755
index 0000000..f1c11b3
--- /dev/null
+++ b/thanks-gen
@@ -0,0 +1,16 @@
+#!/usr/bin/perl -nl
+# Use Perl's multi-byte alignment code, via sprintf, while
+# performing a rudimentary check for duplicate names and
+# removing duplicate name,email pairs.
+use Encode;
+
+BEGIN { my (%seen, %name) }
+
+chomp;
+my ($name, $email) = split '\0', decode ('UTF-8', $_);
+
+$seen{$name}++
+ and warn "$0: THANKS.in: duplicate name: $name\n";
+
+print encode ('UTF-8', sprintf ('%-36s', $name)), $email
+ unless $seen{"$name\0$email"}++;