summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorClint Adams <clint@debian.org>2018-12-22 09:23:48 -0500
committerClint Adams <clint@debian.org>2018-12-22 09:23:48 -0500
commit2f3574e82a53e080f8f476cdcc67ad00249a8435 (patch)
treeac61f87b95b08542deae34b0771861cd7d532a3c
parenta96affdeeb5c6c7a8fdb79b7196265582cf56443 (diff)
parent637a2e292881341dde845545517b0ed3d3ccfc94 (diff)
Update upstream source from tag 'upstream/4.7'
Update to upstream version '4.7' with Debian dir b35807496d60cee51ff40327e474b22738cc790f
-rw-r--r--.tarball-version2
-rw-r--r--.version2
-rw-r--r--ChangeLog629
-rw-r--r--Makefile.in418
-rw-r--r--NEWS44
-rw-r--r--THANKS4
-rw-r--r--aclocal.m410
-rw-r--r--basicdefs.h18
-rwxr-xr-xbootstrap273
-rw-r--r--bootstrap.conf2
-rwxr-xr-xbuild-aux/config.guess124
-rwxr-xr-xbuild-aux/config.sub2456
-rwxr-xr-xbuild-aux/gendocs.sh8
-rwxr-xr-xbuild-aux/gnupload35
-rwxr-xr-xbuild-aux/prefix-gnulib-mk9
-rw-r--r--build-aux/texinfo.tex6
-rw-r--r--config_h.in840
-rwxr-xr-xconfigure3058
-rw-r--r--configure.ac2
-rw-r--r--doc/sed.118
-rw-r--r--doc/sed.info264
-rw-r--r--doc/sed.texi39
-rw-r--r--doc/sed.x10
-rw-r--r--doc/stamp-vti8
-rw-r--r--doc/version.texi8
-rw-r--r--gnulib-tests/Makefile.in256
-rw-r--r--gnulib-tests/_Noreturn.h12
-rwxr-xr-xgnulib-tests/dfa-match.sh6
-rw-r--r--gnulib-tests/dup2.c2
-rw-r--r--gnulib-tests/fcntl.c556
-rw-r--r--gnulib-tests/file-has-acl.c17
-rw-r--r--gnulib-tests/fpurge.c4
-rw-r--r--gnulib-tests/freading.h2
-rw-r--r--gnulib-tests/fseeko.c4
-rw-r--r--gnulib-tests/getdtablesize.c2
-rw-r--r--gnulib-tests/getpagesize.c2
-rw-r--r--gnulib-tests/gnulib.mk28
-rw-r--r--gnulib-tests/inttypes.in.h6
-rw-r--r--gnulib-tests/link.c6
-rw-r--r--gnulib-tests/localename-table.c48
-rw-r--r--gnulib-tests/localename-table.h73
-rw-r--r--gnulib-tests/localename.c619
-rw-r--r--gnulib-tests/localename.h2
-rw-r--r--gnulib-tests/lseek.c4
-rw-r--r--gnulib-tests/nanosleep.c2
-rw-r--r--gnulib-tests/nap.h4
-rw-r--r--gnulib-tests/open.c2
-rw-r--r--gnulib-tests/pipe.c2
-rw-r--r--gnulib-tests/putenv.c4
-rw-r--r--gnulib-tests/raise.c48
-rw-r--r--gnulib-tests/select.c6
-rw-r--r--gnulib-tests/setlocale.c119
-rw-r--r--gnulib-tests/sig-handler.h9
-rw-r--r--gnulib-tests/sigaction.c2
-rw-r--r--gnulib-tests/sigprocmask.c2
-rw-r--r--gnulib-tests/sleep.c2
-rw-r--r--gnulib-tests/stdio-impl.h62
-rw-r--r--gnulib-tests/strerror_r.c27
-rw-r--r--gnulib-tests/sys_socket.in.h9
-rw-r--r--gnulib-tests/test-cloexec.c6
-rw-r--r--gnulib-tests/test-dup2.c6
-rw-r--r--gnulib-tests/test-fcntl-h.c4
-rw-r--r--gnulib-tests/test-fcntl.c6
-rw-r--r--gnulib-tests/test-intprops.c34
-rw-r--r--gnulib-tests/test-limits-h.c71
-rw-r--r--gnulib-tests/test-localcharset.c39
-rw-r--r--gnulib-tests/test-localeconv.c4
-rw-r--r--gnulib-tests/test-localename.c71
-rw-r--r--gnulib-tests/test-mbrtowc-w32.c2
-rw-r--r--gnulib-tests/test-mkdir.c47
-rw-r--r--gnulib-tests/test-mkdir.h98
-rw-r--r--gnulib-tests/test-pipe.c8
-rw-r--r--gnulib-tests/test-regex.c11
-rw-r--r--gnulib-tests/test-select.h20
-rw-r--r--gnulib-tests/test-sigprocmask.c2
-rw-r--r--gnulib-tests/test-stat-time.c2
-rw-r--r--gnulib-tests/test-wcrtomb-w32.c2
-rw-r--r--gnulib-tests/warn-on-use.h64
-rw-r--r--gnulib-tests/zerosize-ptr.h13
-rw-r--r--lib/_Noreturn.h12
-rw-r--r--lib/acl-internal.c14
-rw-r--r--lib/acl-internal.h22
-rw-r--r--lib/acl_entries.c6
-rw-r--r--lib/binary-io.c (renamed from gnulib-tests/binary-io.c)0
-rw-r--r--lib/binary-io.h (renamed from gnulib-tests/binary-io.h)0
-rw-r--r--lib/canonicalize-lgpl.c2
-rw-r--r--lib/cdefs.h514
-rw-r--r--lib/config.charset682
-rw-r--r--lib/dfa.c590
-rw-r--r--lib/dfa.h6
-rw-r--r--lib/dirname.h2
-rw-r--r--lib/dosname.h5
-rw-r--r--lib/errno.in.h4
-rw-r--r--lib/error.c4
-rw-r--r--lib/fcntl.in.h2
-rw-r--r--lib/filename.h2
-rw-r--r--lib/fpending.c3
-rw-r--r--lib/fstat.c2
-rw-r--r--lib/fwriting.c3
-rw-r--r--lib/fwriting.h2
-rw-r--r--lib/get-permissions.c98
-rw-r--r--lib/getdelim.c2
-rw-r--r--lib/getopt.c2
-rw-r--r--lib/getprogname.c70
-rw-r--r--lib/gettext.h2
-rw-r--r--lib/gettimeofday.c8
-rw-r--r--lib/glthread/lock.h20
-rw-r--r--lib/gnulib.mk209
-rw-r--r--lib/intprops.h16
-rw-r--r--lib/libc-config.h174
-rw-r--r--lib/limits.in.h44
-rw-r--r--lib/localcharset.c1083
-rw-r--r--lib/localcharset.h96
-rw-r--r--lib/locale.in.h66
-rw-r--r--lib/localtime-buffer.c2
-rw-r--r--lib/mbrtowc.c94
-rw-r--r--lib/mbsinit.c2
-rw-r--r--lib/memrchr.c2
-rw-r--r--lib/mkdir.c93
-rw-r--r--lib/msvc-nothrow.h2
-rw-r--r--lib/nl_langinfo.c8
-rw-r--r--lib/obstack.h2
-rw-r--r--lib/pathmax.h2
-rw-r--r--lib/ref-add.sin29
-rw-r--r--lib/ref-del.sin24
-rw-r--r--lib/regcomp.c336
-rw-r--r--lib/regex.c2
-rw-r--r--lib/regex.h25
-rw-r--r--lib/regex_internal.c164
-rw-r--r--lib/regex_internal.h38
-rw-r--r--lib/regexec.c409
-rw-r--r--lib/rename.c2
-rw-r--r--lib/same-inode.h2
-rw-r--r--lib/set-permissions.c268
-rw-r--r--lib/stat-time.h10
-rw-r--r--lib/stat-w32.c6
-rw-r--r--lib/stat.c2
-rw-r--r--lib/stdio-impl.h62
-rw-r--r--lib/stdio.in.h4
-rw-r--r--lib/stdlib.in.h5
-rw-r--r--lib/sys_stat.in.h6
-rw-r--r--lib/sys_types.in.h15
-rw-r--r--lib/time.in.h4
-rw-r--r--lib/unistd.in.h42
-rw-r--r--lib/verify.h3
-rw-r--r--lib/version-etc.c6
-rw-r--r--lib/warn-on-use.h64
-rw-r--r--lib/wctype.in.h2
-rw-r--r--lib/xalloc.h6
-rw-r--r--m4/__inline.m422
-rw-r--r--m4/acl.m45
-rw-r--r--m4/asm-underscore.m472
-rw-r--r--m4/canonicalize.m44
-rw-r--r--m4/configmake.m455
-rw-r--r--m4/environ.m420
-rw-r--r--m4/errno_h.m410
-rw-r--r--m4/extern-inline.m416
-rw-r--r--m4/fcntl-o.m410
-rw-r--r--m4/fseeko.m49
-rw-r--r--m4/getcwd.m44
-rw-r--r--m4/getpagesize.m423
-rw-r--r--m4/gnulib-common.m4129
-rw-r--r--m4/gnulib-comp.m439
-rw-r--r--m4/hard-locale.m411
-rw-r--r--m4/host-cpu-c-abi.m4190
-rw-r--r--m4/intl-thread-locale.m4183
-rw-r--r--m4/intlmacosx.m424
-rw-r--r--m4/inttypes.m43
-rw-r--r--m4/lib-link.m417
-rw-r--r--m4/lib-prefix.m4110
-rw-r--r--m4/limits-h.m424
-rw-r--r--m4/link.m412
-rw-r--r--m4/localcharset.m48
-rw-r--r--m4/locale-fr.m46
-rw-r--r--m4/locale-ja.m44
-rw-r--r--m4/locale-tr.m44
-rw-r--r--m4/locale-zh.m44
-rw-r--r--m4/locale_h.m49
-rw-r--r--m4/localename.m424
-rw-r--r--m4/longlong.m410
-rw-r--r--m4/lstat.m45
-rw-r--r--m4/malloc.m44
-rw-r--r--m4/manywarnings.m4101
-rw-r--r--m4/mbrtowc.m43
-rw-r--r--m4/mkdir.m482
-rw-r--r--m4/nanosleep.m445
-rw-r--r--m4/nocrash.m44
-rw-r--r--m4/pathmax.m44
-rw-r--r--m4/pthread_rwlock_rdlock.m48
-rw-r--r--m4/readlink.m412
-rw-r--r--m4/regex.m413
-rw-r--r--m4/rename.m460
-rw-r--r--m4/rmdir.m416
-rw-r--r--m4/select.m412
-rw-r--r--m4/setlocale.m45
-rw-r--r--m4/socklen.m415
-rw-r--r--m4/sockpfaf.m417
-rw-r--r--m4/stat.m412
-rw-r--r--m4/std-gnu11.m44
-rw-r--r--m4/stdarg.m422
-rw-r--r--m4/stddef_h.m429
-rw-r--r--m4/stdint.m413
-rw-r--r--m4/stdio_h.m44
-rw-r--r--m4/symlink.m412
-rw-r--r--m4/threadlib.m490
-rw-r--r--m4/unistd_h.m411
-rw-r--r--m4/warn-on-use.m440
-rw-r--r--m4/wchar_h.m410
-rw-r--r--m4/wcrtomb.m46
-rw-r--r--maint.mk2
-rw-r--r--po/af.gmobin2980 -> 2772 bytes
-rw-r--r--po/af.po203
-rw-r--r--po/ast.gmobin8685 -> 8460 bytes
-rw-r--r--po/ast.po207
-rw-r--r--po/bg.gmobin19502 -> 20143 bytes
-rw-r--r--po/bg.po204
-rw-r--r--po/ca.gmobin8934 -> 8684 bytes
-rw-r--r--po/ca.po208
-rw-r--r--po/cs.gmobin15585 -> 16044 bytes
-rw-r--r--po/cs.po209
-rw-r--r--po/da.gmobin12931 -> 12730 bytes
-rw-r--r--po/da.po205
-rw-r--r--po/de.gmobin12615 -> 12408 bytes
-rw-r--r--po/de.po206
-rw-r--r--po/el.gmobin11648 -> 11386 bytes
-rw-r--r--po/el.po209
-rw-r--r--po/eo.gmobin12981 -> 14628 bytes
-rw-r--r--po/eo.po257
-rw-r--r--po/es.gmobin15385 -> 15948 bytes
-rw-r--r--po/es.po352
-rw-r--r--po/et.gmobin12607 -> 12407 bytes
-rw-r--r--po/et.po205
-rw-r--r--po/eu.gmobin1750 -> 1750 bytes
-rw-r--r--po/eu.po194
-rw-r--r--po/fi.gmobin13964 -> 13724 bytes
-rw-r--r--po/fi.po207
-rw-r--r--po/fr.gmobin16119 -> 16528 bytes
-rw-r--r--po/fr.po211
-rw-r--r--po/ga.gmobin15575 -> 15375 bytes
-rw-r--r--po/ga.po205
-rw-r--r--po/gl.gmobin9709 -> 9501 bytes
-rw-r--r--po/gl.po207
-rw-r--r--po/he.gmobin1333 -> 1333 bytes
-rw-r--r--po/he.po194
-rw-r--r--po/hr.gmobin15455 -> 15949 bytes
-rw-r--r--po/hr.po233
-rw-r--r--po/hu.gmobin13678 -> 13441 bytes
-rw-r--r--po/hu.po207
-rw-r--r--po/id.gmobin8759 -> 8543 bytes
-rw-r--r--po/id.po205
-rw-r--r--po/it.gmobin8506 -> 8308 bytes
-rw-r--r--po/it.po209
-rw-r--r--po/ja.gmobin12028 -> 11818 bytes
-rw-r--r--po/ja.po208
-rw-r--r--po/ko.gmobin1382 -> 1382 bytes
-rw-r--r--po/ko.po194
-rw-r--r--po/nb.gmobin14742 -> 14542 bytes
-rw-r--r--po/nb.po205
-rw-r--r--po/nl.gmobin15363 -> 15772 bytes
-rw-r--r--po/nl.po210
-rw-r--r--po/pl.gmobin9249 -> 9018 bytes
-rw-r--r--po/pl.po207
-rw-r--r--po/pt.gmobin8692 -> 15428 bytes
-rw-r--r--po/pt.po482
-rw-r--r--po/pt_BR.gmobin15657 -> 16066 bytes
-rw-r--r--po/pt_BR.po215
-rw-r--r--po/ro.gmobin7820 -> 7613 bytes
-rw-r--r--po/ro.po207
-rw-r--r--po/ru.gmobin17406 -> 19513 bytes
-rw-r--r--po/ru.po304
-rw-r--r--po/sed.pot196
-rw-r--r--po/sk.gmobin15596 -> 16062 bytes
-rw-r--r--po/sk.po209
-rw-r--r--po/sl.gmobin8691 -> 8471 bytes
-rw-r--r--po/sl.po206
-rw-r--r--po/sr.gmobin16254 -> 16009 bytes
-rw-r--r--po/sr.po205
-rw-r--r--po/sv.gmobin15120 -> 15569 bytes
-rw-r--r--po/sv.po212
-rw-r--r--po/tr.gmobin8704 -> 8484 bytes
-rw-r--r--po/tr.po205
-rw-r--r--po/uk.gmobin19563 -> 20112 bytes
-rw-r--r--po/uk.po209
-rw-r--r--po/vi.gmobin16905 -> 17356 bytes
-rw-r--r--po/vi.po217
-rw-r--r--po/zh_CN.gmobin10947 -> 14340 bytes
-rw-r--r--po/zh_CN.po289
-rw-r--r--po/zh_TW.gmobin8372 -> 14271 bytes
-rw-r--r--po/zh_TW.po358
-rw-r--r--sed/compile.c685
-rw-r--r--sed/debug.c456
-rw-r--r--sed/execute.c679
-rw-r--r--sed/local.mk1
-rw-r--r--sed/mbcs.c3
-rw-r--r--sed/regexp.c145
-rw-r--r--sed/sed.c169
-rw-r--r--sed/sed.h39
-rw-r--r--sed/utils.c207
-rw-r--r--sed/utils.h8
-rwxr-xr-xtestsuite/8bit.sh2
-rwxr-xr-xtestsuite/8to7.sh2
-rwxr-xr-xtestsuite/badenc.sh3
-rwxr-xr-xtestsuite/binary.sh2
-rw-r--r--testsuite/bsd-wrapper.sh2
-rwxr-xr-xtestsuite/bug32082.sh81
-rwxr-xr-xtestsuite/bug32271-1.sh45
-rwxr-xr-xtestsuite/bug32271-2.sh75
-rw-r--r--testsuite/cmd-R.sh2
-rwxr-xr-xtestsuite/cmd-l.sh2
-rwxr-xr-xtestsuite/colon-with-no-label.sh2
-rw-r--r--testsuite/comment-n.sh2
-rw-r--r--testsuite/compile-errors.sh2
-rw-r--r--testsuite/compile-tests.sh3
-rwxr-xr-xtestsuite/convert-number.sh3
-rwxr-xr-xtestsuite/dc.sh3
-rw-r--r--testsuite/debug.pl200
-rw-r--r--testsuite/distrib.sh3
-rwxr-xr-xtestsuite/eval.sh3
-rw-r--r--testsuite/execute-tests.sh3
-rwxr-xr-xtestsuite/follow-symlinks-stdin.sh1
-rw-r--r--testsuite/follow-symlinks.sh2
-rw-r--r--testsuite/get-mb-cur-max.c4
-rw-r--r--testsuite/help.sh3
-rwxr-xr-xtestsuite/in-place-hyphen.sh1
-rw-r--r--testsuite/inplace-hold.sh2
-rwxr-xr-xtestsuite/inplace-selinux.sh2
-rw-r--r--testsuite/local.mk7
-rwxr-xr-xtestsuite/mac-mf.sh2
-rwxr-xr-xtestsuite/madding.sh2
-rwxr-xr-xtestsuite/mb-bad-delim.sh1
-rwxr-xr-xtestsuite/mb-charclass-non-utf8.sh2
-rwxr-xr-xtestsuite/mb-match-slash.sh2
-rwxr-xr-xtestsuite/mb-y-translate.sh1
-rwxr-xr-xtestsuite/missing-filename.sh36
-rwxr-xr-xtestsuite/newjis.sh2
-rw-r--r--testsuite/normalize-text.sh2
-rwxr-xr-xtestsuite/obinary.sh111
-rw-r--r--testsuite/posix-char-class.sh2
-rw-r--r--testsuite/posix-mode-ERE.sh2
-rwxr-xr-xtestsuite/posix-mode-N.sh2
-rw-r--r--testsuite/posix-mode-addr.sh2
-rwxr-xr-xtestsuite/posix-mode-bad-ref.sh2
-rw-r--r--testsuite/posix-mode-s.sh2
-rwxr-xr-xtestsuite/range-overlap.sh1
-rw-r--r--testsuite/recursive-escape-c.sh1
-rwxr-xr-xtestsuite/regex-max-int.sh3
-rwxr-xr-xtestsuite/sandbox.sh2
-rw-r--r--testsuite/stdin-prog.sh2
-rwxr-xr-xtestsuite/stdin.sh2
-rwxr-xr-xtestsuite/subst-mb-incomplete.sh1
-rw-r--r--testsuite/subst-options.sh2
-rw-r--r--testsuite/subst-replacement.sh2
-rw-r--r--testsuite/test-mbrtowc.c4
-rwxr-xr-xtestsuite/title-case.sh2
-rw-r--r--testsuite/uniq.sh2
-rw-r--r--testsuite/utf8-ru.sh3
-rwxr-xr-xtestsuite/word-delim.sh19
-rwxr-xr-xtestsuite/xemacs.sh2
358 files changed, 17494 insertions, 12634 deletions
diff --git a/.tarball-version b/.tarball-version
index 4caecc7..4f8c639 100644
--- a/.tarball-version
+++ b/.tarball-version
@@ -1 +1 @@
-4.5
+4.7
diff --git a/.version b/.version
index 4caecc7..4f8c639 100644
--- a/.version
+++ b/.version
@@ -1 +1 @@
-4.5
+4.7
diff --git a/ChangeLog b/ChangeLog
index 03c3e23..0c9c30f 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,628 @@
+2018-12-20 Jim Meyering <meyering@fb.com>
+
+ version 4.7
+ * NEWS: Record release date.
+
+ sed: fix \b DFA-bug in C locale
+ Under some conditions, \b would mistakenly fail to match. E.g.,
+ this would mistakenly print "123-x" instead of "123":
+ echo 123-x|LC_ALL=C sed 's/.\bx//'
+ * NEWS (Bug fixes): Mention it
+ * gnulib: Update to latest, for DFA regression fix.
+ * testsuite/word-delim.sh: New file, to test for the dfa.c regression.
+ * testsuite/local.mk (T): Add it.
+ Reported by Jan Palus in
+ https://lists.gnu.org/r/sed-devel/2018-12/msg00022.html
+
+2018-12-19 Jim Meyering <meyering@fb.com>
+
+ maint: post-release administrivia
+ * NEWS: Add header line for next release.
+ * .prev-version: Record previous version.
+ * cfg.mk (old_NEWS_hash): Auto-update.
+
+ version 4.6
+ * NEWS: Record release date.
+
+2018-12-17 Jim Meyering <meyering@fb.com>
+
+ build: update gnulib to latest for linux/sparc c-stack fix
+
+2018-12-16 Jim Meyering <meyering@fb.com>
+
+ build: update gnulib to latest for config.sub fix, etc.
+ * gnulib: Update for build- and test-related fixes,
+ including the config.sub fix for Solaris 10:
+ https://lists.gnu.org/r/grep-devel/2018-12/msg00013.html
+ * bootstrap: Update to latest.
+
+2018-12-13 Assaf Gordon <assafgordon@gmail.com>
+
+ tests: fix obinary test error due to 'wc' spaces
+ On BSD systems "wc -c" prefixes the count with spaces,
+ leading to test error.
+ Discussed in https://lists.gnu.org/r/sed-devel/2018-12/msg00014.html .
+
+ * testsuite/obinary.sh: Remove leading spaces from 'wc -c' output.
+
+2018-12-12 Jim Meyering <meyering@fb.com>
+
+ build: update gnulib to latest
+
+2018-12-09 Assaf Gordon <assafgordon@gmail.com>
+
+ tests: add text/binary mode tests
+ This test is skipped on most platforms (which do not support O_BINARY
+ and do not differentiate between TEXT and BINARY files).
+
+ On cygwin, the test is skipped because default cygwin installations
+ do not use O_TEXT/O_BINARY modes (unless file systems are mounted with
+ special options).
+
+ In practice this test will only run on native Windows (e.g. when compiled
+ with mingw or msvc). Note that almost every other test will fail with
+ such a binary (due to excesssive "\r" in the output). Thus it is
+ recommended to explictly run just this test alone:
+
+ make check SUBDIRS=. TESTS=testsuite/obinary.sh
+
+ The script tries to cover all cases mentioned in https://bugs.gnu.org/25459 .
+ See also https://lists.gnu.org/r/sed-devel/2018-10/msg00001.html .
+
+ * testsuite/obinary.sh: New test.
+ * testsuite/local.mk (TESTS): Add new test.
+
+2018-12-05 Assaf Gordon <assafgordon@gmail.com>
+
+ sed: fix -b/--binary mode under windows/mingw
+ Discussed in https://lists.gnu.org/r/sed-devel/2018-10/msg00001.html .
+
+ * NEWS: Mention change.
+ * bootstrap.conf: Add gnulib's binary-io module.
+ * sed/sed.c (main): Set stdin/stdout to binary mode if needed.
+ * sed/utils.c (ck_mkstemp): Explicitly set binary mode on file
+ descriptor. It seems that on (non-cygwin) Windows the fdopen(3) call
+ ignores the 'b' in the 'mode' argument - and the file was always opened
+ in O_TEXT mode. Thus "--binary" was not working with "--inplace".
+
+2018-12-05 Assaf Gordon <assafgordon@gmail.com>
+
+ maint: update .gitignore
+ Following gnulib recent update.
+ * lib/.gitignore, m4/.gitignore: Update file list.
+
+2018-12-05 Assaf Gordon <assafgordon@gmail.com>
+
+ build: update autoconf version requirements
+ Require version 2.64 to bootstrap. This is already required in practice
+ by bootstrap.conf, but was not updated in configure.ac.
+ After recent gnulib update, gnulib-tool would complain:
+
+ $ ./gnulib/gnulib-tool
+ ./gnulib/gnulib-tool: *** minimum supported autoconf version is 2.63.\
+ Try adding AC_PREREQ([2.63]) to your configure.ac.
+ ./gnulib/gnulib-tool: *** Stop.
+
+ Hence this update.
+
+ * configure.ac: Require autoconf version 2.64 or later.
+
+2018-12-05 Assaf Gordon <assafgordon@gmail.com>
+
+ gnulib: update to latest (for dfa improvements)
+
+2018-11-22 Jannick <thirdedition@gmx.net>
+
+ sed: fix memory leakage under lint
+ The NULL-initialized char string in_place_extension is free'ed everytime
+ it is redefined (using xstrdup) and at program exit with any return code.
+
+ See: https://lists.gnu.org/r/sed-devel/2018-11/msg00005.html
+
+ * sed/sed.c (main, cleanup): Free 'in_place_extension' if running with
+ lint.
+
+2018-11-01 Assaf Gordon <assafgordon@gmail.com>
+
+ build: rename stdin local variable
+ Under windows/msys2, defining 'bool stdin' variable results in
+ compilation errors:
+
+ ../sed/execute.c:1252:8: error: expected declaration specifiers or '...'
+ before numeric constant
+ bool stdin = (input->fp && fileno (input->fp) == 0);
+ ^~~~~
+
+ Reported by Jannick <thirdedition@gmx.net> in
+ https://lists.gnu.org/archive/html/sed-devel/2018-10/msg00019.html .
+
+ * sed/execute.c (debug_print_input): Rename 'stdin' to 'is_stdin'.
+
+2018-10-28 Jim Meyering <meyering@fb.com>
+
+ maint: fix a syntax-check nit
+ * sed/compile.c (MISSING_FILENAME): Insert a space before "(", and
+ in a following comment.
+
+2018-10-27 Jim Meyering <meyering@fb.com>
+
+ tests: avoid unnecessary dependency on Data::Dump
+ * testsuite/debug.pl: Don't use Data::Dump. Unnecessary.
+ That package, perl-Data-Dump, appear not to be default-installed
+ on at least a Fedora 29 beta system.
+
+ sed: avoid UMR in --debug code path
+ * sed/debug.c (debug_print_function) [b, t, T]: For a b, t or T
+ command with no LABEL, do not access uninitialized memory.
+ I.e., print the label name only when there is one.
+
+2018-10-24 Assaf Gordon <assafgordon@gmail.com>
+
+ sed: add --debug feature
+ $ seq 3 | sed --debug -e 's/./--&--/ ; 2d'
+ SED PROGRAM:
+ s/./--&--/
+ 2 d
+ INPUT: 'STDIN' line 1
+ PATTERN: 1
+ COMMAND: s/./--&--/
+ MATCHED REGEX REGISTERS
+ regex[0] = 0-1 '1'
+ PATTERN: --1--
+ COMMAND: 2 d
+ END-OF-CYCLE:
+ --1--
+ INPUT: 'STDIN' line 2
+ PATTERN: 2
+ COMMAND: s/./--&--/
+ MATCHED REGEX REGISTERS
+ regex[0] = 0-1 '2'
+ PATTERN: --2--
+ COMMAND: 2 d
+ END-OF-CYCLE:
+ INPUT: 'STDIN' line 3
+ PATTERN: 3
+ COMMAND: s/./--&--/
+ MATCHED REGEX REGISTERS
+ regex[0] = 0-1 '3'
+ PATTERN: --3--
+ COMMAND: 2 d
+ END-OF-CYCLE:
+ --3--
+
+ Discussed in https://lists.gnu.org/r/sed-devel/2018-07/msg00006.html
+ and https://lists.gnu.org/r/sed-devel/2018-10/msg00007.html .
+
+ * NEWS: Mention new option.
+ * doc/sed.texi (Program options): Mention new option.
+ * sed/debug.c: New unit with debug printing functions.
+ * sed/sed.h (debug_print_command, debug_print_char, debug_print_program,
+ debug): Declare functions and global variable.
+ (struct sed_cmd): Add label_name member variable.
+ * sed/compile.c (compile_program): Save the label's name.
+ (cleanup_program_filenames): extracted function to free filenames.
+ (check_final_program) Don't delete the filenames, instead move it to ...
+ (finish_program) ... here.
+ * sed/execute.c (debug_print_end_of_cycle, debug_print_input,
+ debug_print_line): New debug functions (cannot be defined in debug.c as
+ execute's structures are private).
+ (execute_program, process_files): Call debug functions.
+ * sed/sed.c: (DEBUG_OPTION): New option for getoptlong.
+ (debug): New global variable.
+ (usage): Mention new option.
+ (main): Process new option and call debug functions if needed.
+ * testsuite/debug.pl: New tests.
+ * testsuite/local.mk (T): Add new tests.
+
+2018-10-19 Assaf Gordon <assafgordon@gmail.com>
+
+ sed: change internal storage for 'R' command
+ For the 'R' command, keep a pointer to 'struct output' instead of just
+ to FILE*. No change in functionality. This will help future debug code
+ to know the filename of the associated file.
+
+ As a side effect, fix invalid code in W/w execution:
+ The previous code checked for 'cur_cmd->x.fp' (which was related to R
+ command, not W/w). Since 'x' is a union, 'x.fp' was not relevant to
+ the 'x.outf' (which is the struct associted with W/w commands).
+
+ * sed/sed.h (struct sed_cmd): Replace 'FILE*' with 'struct *output' for
+ R command.
+ * sed/compile.c (compile_program): Adjust as needed.
+ * sed/execute.c (execute_program): Adjust as needed.
+
+2018-10-18 Assaf Gordon <assafgordon@gmail.com>
+
+ sed: reject r/R/w/W commands without a filename
+ w/W (and s///w) commands Without a filename would print a confusing error
+ message:
+ $ sed w
+ sed: couldn't open file : No such file or directory
+ While r/R commands with empty file name were a silent no-op.
+
+ With this change, sed programs with empty filename are rejected with a
+ clear error:
+
+ $ sed 's/1/2/w'
+ sed: -e expression #1, char 7: missing filename in r/R/w/W commands
+ $ sed r
+ sed: -e expression #1, char 1: missing filename in r/R/w/W commands
+
+ * NEWS: Mention change.
+ * sed/compile.c (get_openfile): Exit with an error message if filename
+ is missing. (compile_program): Same for 'r' command code.
+ * testsuite/missing-filename.sh: New test.
+ * testsuite/local.mk (T): Add new test.
+
+2018-10-12 Clint Adams <clint@debian.org> (tiny change)
+
+ doc: use @key{TAB} in texinfo
+ Discussed in https://bugs.gnu.org/22636 .
+
+ * doc/sed.texi: Use '@kbd{@key{TAB}}' instead of '@kbd{tab}' to improve
+ rendering in HTML and info formats.
+
+2018-10-12 Bjarni Ingi Gislason <bjarniig@rhi.hi.is> (tiny change)
+
+ doc: sed.x: some formatting corrections
+ Reported in https://bugs.gnu.org/30479 .
+
+ doc/sed.x: Change a HYPHEN-MINUS (code 0x55, 2D) to a dash (\-, minus)
+ if it matches " -[:alpha:]" or \(aq-[:alpha:] (for options); Use a pronoun
+ instead of a repeated noun.
+
+2018-10-12 Assaf Gordon <assafgordon@gmail.com>
+
+ sed: update authors
+ * sed/sed.c (AUTHORS): Update.
+ * doc/sed.texi (@author): Update.
+
+2018-08-23 Assaf Gordon <assafgordon@gmail.com>
+
+ maint: remove REG_PERL code
+ Perl-regexp syntax (PCRE) in GNU Sed is shelved indefinitely.
+ See https://bugs.gnu.org/22801 , https://bugs.gnu.org/22647 .
+ Remove all (unused) REG_PERL related code.
+
+ * sed/sed.c, sed/sed.h, sed/regexp.c, sed/compile.c: Remove REG_PERL code.
+
+2018-08-23 Assaf Gordon <assafgordon@gmail.com>
+
+ maint: remove EXPERIMENTAL_DASH_N_OPTIMIZATION code
+ The optimization was buggy and was never enabled in a released version.
+
+ * sed/execute.c: Remove EXPERIMENTAL_DASH_N_OPTIMIZATION code.
+
+2018-08-23 Assaf Gordon <assafgordon@gmail.com>
+
+ maint: replace street address with URL in license text
+ * basicdefs.h, sed/compile.c, sed/execute.c, sed/mbcs.c, sed/regexp.c,
+ sed/sed.c, sed/sed.h, sed/utils.c, sed/utils.h, testsuite/get-mb-cur-max.c,
+ testsuite/test-mbrtowc.c (GPL License notice): Replace FSF's office
+ address with 'https://www.gnu.org/licenses/'.
+
+2018-08-23 Assaf Gordon <assafgordon@gmail.com>
+
+ build: use system's native sed during build
+ Use the locally built sed binary only during 'check*' targets,
+ but not during build/installation targets - it might be buggy, or contain
+ temporary debugging/ASAN features that can break the build.
+ See: https://lists.gnu.org/r/sed-devel/2018-08/msg00013.html .
+
+ * cfg.mk (PATH): Add the 'sed' directory to the PATH only if this is a
+ 'check' target.
+
+2018-08-08 Assaf Gordon <assafgordon@gmail.com>
+
+ sed: mark function as attribute(malloc)
+ Suggested by gcc-8.2.0.
+
+ * sed/compile.c (read_label): Mark as _GL_ATTRIBUTE_MALLOC.
+
+2018-08-08 Assaf Gordon <assafgordon@gmail.com>
+
+ maint: add undefined-behavior build target
+ Using gcc-specific options, a recent gcc is required.
+ build with:
+ make build-ubsan CC=gcc-8.2
+
+ * cfg.mk (build-ubsan): New target.
+
+2018-08-08 Assaf Gordon <assafgordon@gmail.com>
+
+ maint: add address-sanitizer build target
+ use 'make build-asan' to rebuild sed with gcc's address sanitizer.
+
+ * cfg.mk (build-asan): New target.
+
+2018-08-08 Assaf Gordon <assafgordon@gmail.com>
+
+ gnulib: update to latest (for regex memory leaks)
+ Specifically for gnulib commits 66b99e5259,c5e76a9560.
+ see https://lists.gnu.org/r/bug-gnulib/2018-07/msg00127.html
+
+ sed: fix memory leak
+ * sed/regexp.c (match_regex): Free the previously allocated regex struct
+ before re-building the regex during program execution.
+
+2018-08-08 Assaf Gordon <assafgordon@gmail.com>
+
+ sed: free allocated memory under lint, remove DEBUG_LEAKS
+ Under normal operation there is no need for explicit freeing,
+ as all memory will be released when sed terminates.
+ During development (and specifically, valgrind and address-sanitizing)
+ enabling lint prevents false-positive warnings about memory
+ leaks.
+ Lint mode can be enabled with CFLAGS="-Dlint". It is also automatically
+ enabled by default when building from git (as opposed to tarball).
+
+ For consistency all instances of "#ifdef DEBUG_LEAKS" are replaced
+ with "#ifdef lint".
+
+ * sed/sed.h (struct subst): Add member variable to keep the address of
+ allocated buffer in compile.c:setup_replacement().
+ (release_regex): Add declaration.
+ (finish_program): Function now takes an argument: the sed program
+ vector.
+ * sed/sed.c (main): Adjust call to finish_program.
+ * sed/compile.c (finish_program): Release program allocations.
+ (setup_replacement): Remember the allocated buffer address.
+ (compile_program): Free temporary array in 'y' command.
+ * sed/execute.c (execute_program): Free allocated but unused buffer in
+ 'R' command when reaching EOF.
+ * sed/regexp.c (release_regex): Remove 'static', free the allocated
+ dfa struct.
+ * sed/utils.c (panic): Free open files linked-list elements.
+
+2018-08-08 Assaf Gordon <assafgordon@gmail.com>
+
+ sed: do not close stderr on exit
+ Not needed, and prevents leak-sanitizing from working.
+
+ * sed/utils.c (ck_fclose): Do not close stderr.
+
+2018-08-07 Jim Meyering <meyering@fb.com>
+
+ doc: insert two missing words
+ doc/sed.texi (BRE vs ERE): Insert "with a".
+
+2018-08-04 Assaf Gordon <assafgordon@gmail.com>
+
+ maint: syntax-check: prohibit-operator-at-eol
+ * cfg.mk (sc_prohibit_operator_at_end_of_line): Copied from coreutils'
+ cfg.mk.
+ * sed/execute.c (do_subst,execute_program): Adjust as needed.
+
+ maint: syntax-check: fail-0 and fail-1 in shell script tests
+ * cfg.mk (prohibit_fail_0,sc_prohibit_and_fail_1): Copied from
+ coreutils' cfg.mk
+ * testsuite/*.sh: Remove 'fail=0'.
+
+ maint: syntax-check: add various test-related checks
+ * cfg.mk (sc_prohibit_env_returns, sc_prohibit_perl_hash_quotes,
+ sc_prohibit_verbose_version, sc_prohibit_framework_failure,
+ sc_prohibit_test_backticks, sc_prohibit_test_empty): Copied from
+ coreutils' cfg.mk.
+
+ maint: syntax-check: add sc_prohibit_strncmp
+ * cfg.mk (sc_prohibit_strncmp): Copied from coreutils' cfg.mk.
+ * basicdefs.h (STREQ,STREQ_LEN,STRPREFIX): Copied from coreutils' system.h.
+ * sed/execute.c (translate_mb): Replace strncmp with STREQ_LEN.
+
+ maint: syntax-check: add sc_gitignore_missing
+ * cfg.mk (sc_gitignore_missing): Copied from coreutils' cfg.mk.
+ * .gitignore: Add missing files.
+
+ maint: syntax-check: prohibit-form-feed
+ * cfg.mk (sc_prohibit-form-feed): Copied from coreutils' cfg.mk.
+ * sed/compile.c, sed/execute.c, sed/regexp.c, sed/sed.h, sed/utils.c:
+ Remove form feed characters.
+
+ maint: syntax-check: space-before-open-paren
+ * cfg.mk (sc_space_before_open_paren): Copy target from coreutils' cfg.mk.
+ * basicdefs.h, sed/compile.c, sed/execute.c, sed/regexp.c,
+ sed/sed.c, sed/utils.c: Add space before parentheses.
+
+ maint: syntax-check: fix tab indentation
+ * sed/execute.c (open_next_file): Replace tab with spaces.
+
+2018-08-03 Assaf Gordon <assafgordon@gmail.com>
+
+ sed: replace myname with gnulib's progname
+ * compile.c (bad_prog): Use program_name instead of myname.
+ * execute.c (open_next_file): Same.
+ * utils.c (panic): Same.
+ (myname): Remove variable.
+ * sed.c (usage): Use program_name instead of myname.
+ (main): Call set_program_name once, don't set variables directly.
+
+ sed: replace ck_realloc with gnulib's xrealloc/xnrealloc
+ * basicdefs.h (REALLOC): Call xnrealloc instead of ck_realloc.
+ * sed/utils.c (ck_realloc): Remove.
+
+2018-08-03 Assaf Gordon <assafgordon@gmail.com>
+
+ sed: replace MALLOC/ck_malloc with gnulib's XCALLOC
+ ck_malloc zero'd out the allocated buffer, thus replaced with
+ xcalloc/xzalloc (not xmalloc).
+
+ * basicdefs.h (MALLOC): Remove.
+ * utils.c (ck_malloc): Remove.
+ * sed/compile.c, sed/execute.c, sed/regexp.c, sed/sed.c: Replace
+ MALLOC with XCALLOC; ck_malloc with xzalloc.
+
+2018-08-03 Assaf Gordon <assafgordon@gmail.com>
+
+ sed: replace ck_strdup with gnulib's xstrdup
+ * sed/utils.{c,h} (ck_strdup): Remove.
+ * sed/compile.c, sed/execute.c, sed/sed.c: Replace ck_strdup with
+ xstrdup.
+
+ sed: replace ck_memdup with gnulib's xmemdup
+ * bootstrap.conf: Add gnulib's xalloc module.
+ * basicdefs.h (MEMDUP): Remove.
+ * sed/utils.{c,h} (ck_memdup): Remove.
+
+2018-08-03 Assaf Gordon <assafgordon@gmail.com>
+
+ sed: fix heap buffer overflow from multiline EOL regex optimization
+ sed would access invalid memory when matching EOF combined with
+ s///n flag:
+
+ $ yes 0 | fmt -w 40 | head -n2 | valgrind sed 'N;s/$//2m'
+ ==13131== Conditional jump or move depends on uninitialised value(s)
+ ==13131== at 0x4C3002B: memchr (vg_replace_strmem.c:883)
+ ==13131== by 0x1120BD: match_regex (regexp.c:286)
+ ==13131== by 0x110736: do_subst (execute.c:1101)
+ ==13131== by 0x1115D3: execute_program (execute.c:1591)
+ ==13131== by 0x111A4C: process_files (execute.c:1774)
+ ==13131== by 0x112E1C: main (sed.c:405)
+ ==13131==
+ ==13131== Invalid read of size 1
+ ==13131== at 0x4C30027: memchr (vg_replace_strmem.c:883)
+ ==13131== by 0x1120BD: match_regex (regexp.c:286)
+ ==13131== by 0x110736: do_subst (execute.c:1101)
+ ==13131== by 0x1115D3: execute_program (execute.c:1591)
+ ==13131== by 0x111A4C: process_files (execute.c:1774)
+ ==13131== by 0x112E1C: main (sed.c:405)
+ ==13131== Address 0x55ec765 is 0 bytes after a block of size 101 alloc'd
+ ==13131== at 0x4C2DDCF: realloc (vg_replace_malloc.c:785)
+ ==13131== by 0x113BA2: ck_realloc (utils.c:418)
+ ==13131== by 0x10E682: resize_line (execute.c:154)
+ ==13131== by 0x10E6F0: str_append (execute.c:165)
+ ==13131== by 0x110779: do_subst (execute.c:1106)
+ ==13131== by 0x1115D3: execute_program (execute.c:1591)
+ ==13131== by 0x111A4C: process_files (execute.c:1774)
+ ==13131== by 0x112E1C: main (sed.c:405)
+ ==13131==
+
+ The ^/$ optimization code added in v4.2.2-161-g6dea75e called memchr()
+ using 'buflen', ignoring the value of 'buf_start_offset' (which, if not
+ zero, reduces the number of bytes available for the search).
+
+ Reported by bugs@feusi.co (bug#32271) in
+ https://lists.gnu.org/r/bug-sed/2018-07/msg00018.html .
+
+ * NEWS: Mention the fix.
+ * sed/regexp.c (match_regex): Use correct buffer length in memchr().
+ * testsuite/bug-32271-2.sh: Test using valgrind.
+ * testsuite/local.mk (T): Add new test.
+
+2018-08-03 Assaf Gordon <assafgordon@gmail.com>
+
+ sed: fix extraneous NUL in s///n command
+ Under certain conditions sed would add an extraneous NUL:
+
+ $ echo 0 | sed -e 's/$/a/2' | od -tx1 -An
+ 30 00 0a
+
+ This would happen when the regex is an empty (zero-length) match at the
+ end of the line (e.g. '$' and 'a*$') and the substitute number flag
+ ('n' in s///n) is higher than the number of actual matches (multiple
+ EOL matches are possible with multiline match, e.g. 's/$/a/3m').
+
+ Details:
+ The comment at the top of 'execute.c:do_subst()' says:
+
+ /* The first part of the loop optimizes s/xxx// when xxx is at the
+ start, and s/xxx$// */
+
+ Which refers to lines 1051-3:
+
+ 1051 /* Copy stuff to the left of this match into the output string. */
+ 1052 if (start < offset)
+ 1053 str_append(&s_accum, line.active + start, offset - start);
+
+ The above code appends text to 's_accum' but does *not* update 'start'.
+
+ Later on, if the s/// command includes 'n' flag, and if 'matched == 0'
+ (an empty match), this comparison will be incorrect:
+
+ 1081 if (start < line.length)
+ 1082 matched = 1;
+
+ Will in turn will set 'matched' to 1, and the 'str_append' call that
+ follows (line 1087) will append an additional character.
+ Because the empty match is EOL, the appended character is NUL.
+
+ More examples that trigger the bug:
+
+ echo 0 | sed -e 's/a*$/X/3'
+ printf "%s\n" 0 0 0 | sed -e 'N;N;s/a*$/X/4m'
+
+ Examples that do not trigger the bug:
+
+ # The 'a*' empty regex matches at the beginning of the line (in
+ # addition to the end of the line), and the optimization in line
+ # 1052 is skipped.
+ echo 0 | sed -e 's/a*/X/3'
+
+ # There are 3 EOLs in the pattern space, s///3 is not too large.
+ printf "%s\n" 0 0 0 | sed -e 'N;N;s/a*$/X/3m'
+
+ This was discovered while investigating bug#32271 reported by bugs@feusi.co
+ in https://lists.gnu.org/r/bug-sed/2018-07/msg00018.html .
+
+ * NEWS: Mention the fix.
+ * sed/execute.c (do_subst): Update 'start' as needed.
+ * testsuite/bug-32271-1.sh: New test.
+ * testsuite/local.mk (T): Add test.
+
+2018-07-26 Assaf Gordon <assafgordon@gmail.com>
+
+ sed: do not flush output stream unless in unbuffered mode
+ Previously sed would explicitly flush the output after
+ every output line, except if the output was stdout in unbuffered mode.
+
+ In practice this was equivalent to forcing line-buffering, and was
+ espcially was noticable with "sed -i" (where the output is a temporary
+ file).
+
+ With this change, explicit flushing only happens with "sed -u",
+ regardless of the type of output file, making "sed -i" much faster.
+ This change also affect other write commands such as 'w'/'W' and 's///w'.
+
+ Reported by Vidar Holen <vidar@vidarholen.net> in
+ https://lists.gnu.org/r/bug-sed/2018-07/msg00014.html .
+
+ * NEWS: Mention this.
+ * sed/execute.c (flush_output): Never flush output unless in unbuffered
+ mode, regardless of which file it is.
+
+2018-07-25 Bernhard Voelker <mail@bernhard-voelker.de>
+
+ doc: tiny fix
+ * doc/sed.texi (Regexp Addresses): Remove the word 'two': there are
+ 3 examples following.
+
+2018-07-08 Assaf Gordon <assafgordon@gmail.com>
+
+ sed: fix heap buffer overflow from invalid references
+ Under certain conditions sed would access invalid memory based on
+ the requested back-reference (e.g. "s//\9/" would access the 9th element
+ in the regex registers without checking it is at least 9 element in
+ size).
+
+ The following examples would trigger valgrind errors:
+ seq 2 | valgrind sed -e '/^/s///p ; 2s//\9/'
+ seq 2 | valgrind sed --posix -e '/2/p ; 2s//\9/'
+
+ Reported by bugs@feusi.co in
+ https://lists.gnu.org/r/bug-sed/2018-07/msg00004.html .
+
+ * NEWS: Mention the bugfix.
+ * sed/execute.c (append_replacement): Check number of allocated regex
+ replacement registers before accessing the array.
+ * sed/testsuite/bug32082.sh: Test sed for this behaviour under valgrind.
+ * sed/testsuite/local.mk (T): Add new test.
+
2018-03-31 Jim Meyering <meyering@fb.com>
+ maint: post-release administrivia
+ * NEWS: Add header line for next release.
+ * .prev-version: Record previous version.
+ * cfg.mk (old_NEWS_hash): Auto-update.
+
version 4.5
* NEWS: Record release date.
@@ -2799,9 +3422,3 @@
* 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.
diff --git a/Makefile.in b/Makefile.in
index 82c299b..ab1e6f3 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -66,7 +66,65 @@
# 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
+# 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 \
+# --makefile-name=gnulib.mk \
+# --no-conditional-dependencies \
+# --no-libtool \
+# --macro-prefix=gl \
+# --avoid=lock-tests \
+# acl \
+# alloca \
+# binary-io \
+# 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 \
+# xalloc
# Copyright (C) 2016-2018 Free Software Foundation, Inc.
@@ -175,6 +233,7 @@ am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
pkgdatadir = $(datadir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
+pkglibexecdir = $(libexecdir)/@PACKAGE@
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
install_sh_DATA = $(install_sh) -c -m 644
install_sh_PROGRAM = $(install_sh) -c
@@ -199,16 +258,17 @@ check_PROGRAMS = testsuite/get-mb-cur-max$(EXEEXT) \
subdir = .
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/m4/00gnulib.m4 \
+ $(top_srcdir)/m4/__inline.m4 \
$(top_srcdir)/m4/absolute-header.m4 $(top_srcdir)/m4/acl.m4 \
$(top_srcdir)/m4/alloca.m4 $(top_srcdir)/m4/arpa_inet_h.m4 \
- $(top_srcdir)/m4/asm-underscore.m4 $(top_srcdir)/m4/assert.m4 \
- $(top_srcdir)/m4/btowc.m4 $(top_srcdir)/m4/builtin-expect.m4 \
+ $(top_srcdir)/m4/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/codeset.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 \
@@ -228,9 +288,9 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/00gnulib.m4 \
$(top_srcdir)/m4/gettimeofday.m4 $(top_srcdir)/m4/glibc21.m4 \
$(top_srcdir)/m4/gnulib-common.m4 \
$(top_srcdir)/m4/gnulib-comp.m4 \
- $(top_srcdir)/m4/hard-locale.m4 \
$(top_srcdir)/m4/host-cpu-c-abi.m4 $(top_srcdir)/m4/iconv.m4 \
$(top_srcdir)/m4/include_next.m4 $(top_srcdir)/m4/inet_pton.m4 \
+ $(top_srcdir)/m4/intl-thread-locale.m4 \
$(top_srcdir)/m4/intlmacosx.m4 \
$(top_srcdir)/m4/inttypes-pri.m4 $(top_srcdir)/m4/inttypes.m4 \
$(top_srcdir)/m4/ioctl.m4 $(top_srcdir)/m4/isblank.m4 \
@@ -250,8 +310,9 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/00gnulib.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/mkdir.m4 $(top_srcdir)/m4/mkostemp.m4 \
+ $(top_srcdir)/m4/mmap-anon.m4 $(top_srcdir)/m4/mode_t.m4 \
+ $(top_srcdir)/m4/msvc-inval.m4 \
$(top_srcdir)/m4/msvc-nothrow.m4 $(top_srcdir)/m4/multiarch.m4 \
$(top_srcdir)/m4/nanosleep.m4 $(top_srcdir)/m4/netinet_in_h.m4 \
$(top_srcdir)/m4/nl_langinfo.m4 $(top_srcdir)/m4/nls.m4 \
@@ -326,28 +387,28 @@ am__dirstamp = $(am__leading_dot)dirstamp
am_lib_libsed_a_OBJECTS = lib/copy-acl.$(OBJEXT) lib/set-acl.$(OBJEXT) \
lib/acl-errno-valid.$(OBJEXT) lib/acl-internal.$(OBJEXT) \
lib/get-permissions.$(OBJEXT) lib/set-permissions.$(OBJEXT) \
- 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/stat-time.$(OBJEXT) lib/tempname.$(OBJEXT) \
- lib/glthread/threadlib.$(OBJEXT) lib/unistd.$(OBJEXT) \
- lib/version-etc.$(OBJEXT) lib/version-etc-fsf.$(OBJEXT) \
- lib/wctype-h.$(OBJEXT) lib/xmalloc.$(OBJEXT) \
- lib/xalloc-die.$(OBJEXT)
+ lib/binary-io.$(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/stat-time.$(OBJEXT) \
+ lib/tempname.$(OBJEXT) lib/glthread/threadlib.$(OBJEXT) \
+ lib/unistd.$(OBJEXT) lib/version-etc.$(OBJEXT) \
+ lib/version-etc-fsf.$(OBJEXT) lib/wctype-h.$(OBJEXT) \
+ lib/xmalloc.$(OBJEXT) lib/xalloc-die.$(OBJEXT)
lib_libsed_a_OBJECTS = $(am_lib_libsed_a_OBJECTS)
sed_libver_a_AR = $(AR) $(ARFLAGS)
sed_libver_a_LIBADD =
nodist_sed_libver_a_OBJECTS = sed/version.$(OBJEXT)
sed_libver_a_OBJECTS = $(nodist_sed_libver_a_OBJECTS)
-am_sed_sed_OBJECTS = sed/sed-compile.$(OBJEXT) \
+am_sed_sed_OBJECTS = sed/sed-compile.$(OBJEXT) sed/sed-debug.$(OBJEXT) \
sed/sed-execute.$(OBJEXT) sed/sed-mbcs.$(OBJEXT) \
sed/sed-regexp.$(OBJEXT) sed/sed-sed.$(OBJEXT) \
sed/sed-utils.$(OBJEXT)
@@ -380,8 +441,9 @@ 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)/binary-io.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 \
@@ -399,30 +461,32 @@ am__depfiles_remade = lib/$(DEPDIR)/acl-errno-valid.Po \
lib/$(DEPDIR)/mbrlen.Po lib/$(DEPDIR)/mbrtowc.Po \
lib/$(DEPDIR)/mbsinit.Po lib/$(DEPDIR)/mbtowc.Po \
lib/$(DEPDIR)/memchr.Po lib/$(DEPDIR)/memrchr.Po \
- lib/$(DEPDIR)/mkostemp.Po lib/$(DEPDIR)/msvc-inval.Po \
- lib/$(DEPDIR)/msvc-nothrow.Po lib/$(DEPDIR)/nl_langinfo.Po \
- lib/$(DEPDIR)/obstack.Po lib/$(DEPDIR)/progname.Po \
- lib/$(DEPDIR)/qcopy-acl.Po lib/$(DEPDIR)/qset-acl.Po \
- lib/$(DEPDIR)/quotearg.Po lib/$(DEPDIR)/readlink.Po \
- lib/$(DEPDIR)/regcomp.Po lib/$(DEPDIR)/regex.Po \
- lib/$(DEPDIR)/regex_internal.Po lib/$(DEPDIR)/regexec.Po \
- lib/$(DEPDIR)/rename.Po lib/$(DEPDIR)/rmdir.Po \
- lib/$(DEPDIR)/se-context.Po lib/$(DEPDIR)/se-selinux.Po \
- lib/$(DEPDIR)/set-acl.Po lib/$(DEPDIR)/set-permissions.Po \
- lib/$(DEPDIR)/stat-time.Po lib/$(DEPDIR)/stat-w32.Po \
- lib/$(DEPDIR)/stat.Po lib/$(DEPDIR)/strerror-override.Po \
- lib/$(DEPDIR)/strerror.Po lib/$(DEPDIR)/stripslash.Po \
- lib/$(DEPDIR)/strverscmp.Po lib/$(DEPDIR)/tempname.Po \
- 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/$(DEPDIR)/mkdir.Po lib/$(DEPDIR)/mkostemp.Po \
+ lib/$(DEPDIR)/msvc-inval.Po lib/$(DEPDIR)/msvc-nothrow.Po \
+ lib/$(DEPDIR)/nl_langinfo.Po lib/$(DEPDIR)/obstack.Po \
+ lib/$(DEPDIR)/progname.Po lib/$(DEPDIR)/qcopy-acl.Po \
+ lib/$(DEPDIR)/qset-acl.Po lib/$(DEPDIR)/quotearg.Po \
+ lib/$(DEPDIR)/readlink.Po lib/$(DEPDIR)/regcomp.Po \
+ lib/$(DEPDIR)/regex.Po lib/$(DEPDIR)/regex_internal.Po \
+ lib/$(DEPDIR)/regexec.Po lib/$(DEPDIR)/rename.Po \
+ lib/$(DEPDIR)/rmdir.Po lib/$(DEPDIR)/se-context.Po \
+ lib/$(DEPDIR)/se-selinux.Po lib/$(DEPDIR)/set-acl.Po \
+ lib/$(DEPDIR)/set-permissions.Po lib/$(DEPDIR)/stat-time.Po \
+ lib/$(DEPDIR)/stat-w32.Po lib/$(DEPDIR)/stat.Po \
+ lib/$(DEPDIR)/strerror-override.Po lib/$(DEPDIR)/strerror.Po \
+ lib/$(DEPDIR)/stripslash.Po lib/$(DEPDIR)/strverscmp.Po \
+ lib/$(DEPDIR)/tempname.Po 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-compile.Po sed/$(DEPDIR)/sed-execute.Po \
- sed/$(DEPDIR)/sed-mbcs.Po sed/$(DEPDIR)/sed-regexp.Po \
- sed/$(DEPDIR)/sed-sed.Po sed/$(DEPDIR)/sed-utils.Po \
- sed/$(DEPDIR)/version.Po testsuite/$(DEPDIR)/get-mb-cur-max.Po \
+ sed/$(DEPDIR)/sed-compile.Po sed/$(DEPDIR)/sed-debug.Po \
+ sed/$(DEPDIR)/sed-execute.Po sed/$(DEPDIR)/sed-mbcs.Po \
+ sed/$(DEPDIR)/sed-regexp.Po sed/$(DEPDIR)/sed-sed.Po \
+ sed/$(DEPDIR)/sed-utils.Po sed/$(DEPDIR)/version.Po \
+ testsuite/$(DEPDIR)/get-mb-cur-max.Po \
testsuite/$(DEPDIR)/test-mbrtowc.Po
am__mv = mv -f
AM_V_lt = $(am__v_lt_@AM_V@)
@@ -799,7 +863,6 @@ distuninstallcheck_listfiles = find . -type f -print
am__distuninstallcheck_listfiles = $(distuninstallcheck_listfiles) \
| sed 's|^\./|$(prefix)/|' | grep -v '$(infodir)/dir$$'
distcleancheck_listfiles = find . -type f -print
-pkglibexecdir = @pkglibexecdir@
ACLOCAL = @ACLOCAL@
ALLOCA = @ALLOCA@
ALLOCA_H = @ALLOCA_H@
@@ -913,6 +976,7 @@ GNULIB_GETLOADAVG = @GNULIB_GETLOADAVG@
GNULIB_GETLOGIN = @GNULIB_GETLOGIN@
GNULIB_GETLOGIN_R = @GNULIB_GETLOGIN_R@
GNULIB_GETPAGESIZE = @GNULIB_GETPAGESIZE@
+GNULIB_GETPASS = @GNULIB_GETPASS@
GNULIB_GETPEERNAME = @GNULIB_GETPEERNAME@
GNULIB_GETSOCKNAME = @GNULIB_GETSOCKNAME@
GNULIB_GETSOCKOPT = @GNULIB_GETSOCKOPT@
@@ -937,6 +1001,7 @@ GNULIB_LINK = @GNULIB_LINK@
GNULIB_LINKAT = @GNULIB_LINKAT@
GNULIB_LISTEN = @GNULIB_LISTEN@
GNULIB_LOCALECONV = @GNULIB_LOCALECONV@
+GNULIB_LOCALENAME = @GNULIB_LOCALENAME@
GNULIB_LOCALTIME = @GNULIB_LOCALTIME@
GNULIB_LSEEK = @GNULIB_LSEEK@
GNULIB_LSTAT = @GNULIB_LSTAT@
@@ -1185,6 +1250,7 @@ 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_TRUNCATE = @HAVE_DECL_TRUNCATE@
HAVE_DECL_TTYNAME_R = @HAVE_DECL_TTYNAME_R@
HAVE_DECL_UNSETENV = @HAVE_DECL_UNSETENV@
HAVE_DECL_VSNPRINTF = @HAVE_DECL_VSNPRINTF@
@@ -1207,6 +1273,7 @@ HAVE_FDOPENDIR = @HAVE_FDOPENDIR@
HAVE_FEATURES_H = @HAVE_FEATURES_H@
HAVE_FFSL = @HAVE_FFSL@
HAVE_FFSLL = @HAVE_FFSLL@
+HAVE_FREELOCALE = @HAVE_FREELOCALE@
HAVE_FSEEKO = @HAVE_FSEEKO@
HAVE_FSTATAT = @HAVE_FSTATAT@
HAVE_FSYNC = @HAVE_FSYNC@
@@ -1219,10 +1286,12 @@ HAVE_GETHOSTNAME = @HAVE_GETHOSTNAME@
HAVE_GETLOGIN = @HAVE_GETLOGIN@
HAVE_GETOPT_H = @HAVE_GETOPT_H@
HAVE_GETPAGESIZE = @HAVE_GETPAGESIZE@
+HAVE_GETPASS = @HAVE_GETPASS@
HAVE_GETSUBOPT = @HAVE_GETSUBOPT@
HAVE_GETTIMEOFDAY = @HAVE_GETTIMEOFDAY@
HAVE_GRANTPT = @HAVE_GRANTPT@
HAVE_GROUP_MEMBER = @HAVE_GROUP_MEMBER@
+HAVE_IMAXDIV_T = @HAVE_IMAXDIV_T@
HAVE_INTTYPES_H = @HAVE_INTTYPES_H@
HAVE_ISBLANK = @HAVE_ISBLANK@
HAVE_ISWBLANK = @HAVE_ISWBLANK@
@@ -1261,6 +1330,7 @@ HAVE_MKSTEMPS = @HAVE_MKSTEMPS@
HAVE_MSVC_INVALID_PARAMETER_HANDLER = @HAVE_MSVC_INVALID_PARAMETER_HANDLER@
HAVE_NANOSLEEP = @HAVE_NANOSLEEP@
HAVE_NETINET_IN_H = @HAVE_NETINET_IN_H@
+HAVE_NEWLOCALE = @HAVE_NEWLOCALE@
HAVE_NL_LANGINFO = @HAVE_NL_LANGINFO@
HAVE_OPENAT = @HAVE_OPENAT@
HAVE_OPENDIR = @HAVE_OPENDIR@
@@ -1336,7 +1406,6 @@ HAVE_SYS_TYPES_H = @HAVE_SYS_TYPES_H@
HAVE_SYS_UIO_H = @HAVE_SYS_UIO_H@
HAVE_TIMEGM = @HAVE_TIMEGM@
HAVE_TIMEZONE_T = @HAVE_TIMEZONE_T@
-HAVE_TRUNCATE = @HAVE_TRUNCATE@
HAVE_TYPE_VOLATILE_SIG_ATOMIC_T = @HAVE_TYPE_VOLATILE_SIG_ATOMIC_T@
HAVE_TZSET = @HAVE_TZSET@
HAVE_UNISTD_H = @HAVE_UNISTD_H@
@@ -1390,8 +1459,6 @@ HAVE_WS2TCPIP_H = @HAVE_WS2TCPIP_H@
HAVE_XLOCALE_H = @HAVE_XLOCALE_H@
HAVE__BOOL = @HAVE__BOOL@
HAVE__EXIT = @HAVE__EXIT@
-HOST_CPU = @HOST_CPU@
-HOST_CPU_C_ABI = @HOST_CPU_C_ABI@
INCLUDE_NEXT = @INCLUDE_NEXT@
INCLUDE_NEXT_AS_FIRST_DIRECTIVE = @INCLUDE_NEXT_AS_FIRST_DIRECTIVE@
INET_PTON_LIB = @INET_PTON_LIB@
@@ -1541,6 +1608,7 @@ REPLACE_FFLUSH = @REPLACE_FFLUSH@
REPLACE_FOPEN = @REPLACE_FOPEN@
REPLACE_FPRINTF = @REPLACE_FPRINTF@
REPLACE_FPURGE = @REPLACE_FPURGE@
+REPLACE_FREELOCALE = @REPLACE_FREELOCALE@
REPLACE_FREOPEN = @REPLACE_FREOPEN@
REPLACE_FSEEK = @REPLACE_FSEEK@
REPLACE_FSEEKO = @REPLACE_FSEEKO@
@@ -1558,6 +1626,7 @@ REPLACE_GETGROUPS = @REPLACE_GETGROUPS@
REPLACE_GETLINE = @REPLACE_GETLINE@
REPLACE_GETLOGIN_R = @REPLACE_GETLOGIN_R@
REPLACE_GETPAGESIZE = @REPLACE_GETPAGESIZE@
+REPLACE_GETPASS = @REPLACE_GETPASS@
REPLACE_GETTIMEOFDAY = @REPLACE_GETTIMEOFDAY@
REPLACE_GMTIME = @REPLACE_GMTIME@
REPLACE_INET_NTOP = @REPLACE_INET_NTOP@
@@ -1590,6 +1659,7 @@ REPLACE_MKNOD = @REPLACE_MKNOD@
REPLACE_MKSTEMP = @REPLACE_MKSTEMP@
REPLACE_MKTIME = @REPLACE_MKTIME@
REPLACE_NANOSLEEP = @REPLACE_NANOSLEEP@
+REPLACE_NEWLOCALE = @REPLACE_NEWLOCALE@
REPLACE_NL_LANGINFO = @REPLACE_NL_LANGINFO@
REPLACE_NULL = @REPLACE_NULL@
REPLACE_OBSTACK_PRINTF = @REPLACE_OBSTACK_PRINTF@
@@ -1749,7 +1819,6 @@ infodir = @infodir@
install_sh = @install_sh@
libdir = @libdir@
libexecdir = @libexecdir@
-lispdir = @lispdir@
localedir = $(datadir)/locale
localstatedir = @localstatedir@
mandir = @mandir@
@@ -1777,17 +1846,15 @@ AM_CPPFLAGS = -I$(top_srcdir) \
-I$(top_builddir)/sed
AM_CFLAGS =
-BUILT_SOURCES = .version $(ALLOCA_H) lib/configmake.h lib/ctype.h \
- $(ERRNO_H) lib/fcntl.h $(GETOPT_H) $(GETOPT_CDEFS_H) \
- lib/langinfo.h $(LIMITS_H) lib/locale.h lib/selinux/selinux.h \
+BUILT_SOURCES = .version $(ALLOCA_H) lib/ctype.h $(ERRNO_H) \
+ lib/fcntl.h $(GETOPT_H) $(GETOPT_CDEFS_H) lib/langinfo.h \
+ $(LIMITS_H) lib/locale.h lib/selinux/selinux.h \
$(SELINUX_CONTEXT_H) $(STDALIGN_H) $(STDARG_H) $(STDBOOL_H) \
$(STDDEF_H) $(STDINT_H) lib/stdio.h lib/stdlib.h lib/string.h \
lib/sys/stat.h lib/sys/time.h lib/sys/types.h lib/time.h \
lib/unistd.h lib/wchar.h lib/wctype.h sed/version.c \
sed/version.h
-CLEANFILES = lib/configmake.h lib/configmake.h-t lib/charset.alias \
- lib/ref-add.sed lib/ref-del.sed tmp* core *.core \
- $(EXTRA_PROGRAMS) *.*out *.log
+CLEANFILES = tmp* core *.core $(EXTRA_PROGRAMS) *.*out *.log
EXTRA_DIST = BUGS THANKS.in .version .mailmap ChangeLog-2014 \
po/ChangeLog-2014 bootstrap bootstrap.conf build-aux/help2man \
thanks-gen lib/acl-internal.h lib/acl.h lib/acl_entries.c \
@@ -1811,13 +1878,13 @@ EXTRA_DIST = BUGS THANKS.in .version .mailmap ChangeLog-2014 \
$(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/langinfo.in.h lib/cdefs.h lib/libc-config.h \
+ lib/limits.in.h lib/localcharset.h lib/locale.in.h \
lib/localeconv.c lib/localtime-buffer.c lib/localtime-buffer.h \
lib/lstat.c $(top_srcdir)/maint.mk lib/malloc.c lib/malloca.h \
lib/mbrlen.c lib/mbrtowc.c lib/mbsinit.c lib/mbtowc-impl.h \
lib/mbtowc.c lib/memchr.c lib/memchr.valgrind lib/memrchr.c \
- lib/mkostemp.c lib/msvc-inval.c lib/msvc-inval.h \
+ lib/mkdir.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 \
@@ -1890,15 +1957,15 @@ DISTCHECK_CONFIGURE_FLAGS = XGETTEXT='$(SHELL) -c : dummy' $(EXTRA_DC_FLAGS)
EXTRA_DC_FLAGS =
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/set-permissions.c lib/binary-io.h lib/binary-io.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.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/stat-time.c lib/tempname.c \
lib/glthread/threadlib.c lib/unistd.c lib/version-etc.h \
@@ -1912,20 +1979,18 @@ EXTRA_lib_libsed_a_SOURCES = lib/acl_entries.c lib/alloca.c \
lib/getopt.c lib/getopt1.c lib/gettimeofday.c lib/isblank.c \
lib/localeconv.c lib/localtime-buffer.c lib/lstat.c \
lib/malloc.c lib/mbrlen.c lib/mbrtowc.c lib/mbsinit.c \
- lib/mbtowc.c lib/memchr.c lib/memrchr.c lib/mkostemp.c \
- lib/msvc-inval.c lib/msvc-nothrow.c lib/nl_langinfo.c \
- lib/obstack.c lib/readlink.c lib/regcomp.c lib/regex.c \
- lib/regex_internal.c lib/regexec.c lib/rename.c lib/rmdir.c \
- lib/getfilecon.c lib/stat-w32.c lib/stat.c lib/strerror.c \
- lib/strerror-override.c lib/strverscmp.c lib/wcrtomb.c \
- lib/wctob.c lib/wctomb.c
+ lib/mbtowc.c lib/memchr.c lib/memrchr.c lib/mkdir.c \
+ lib/mkostemp.c lib/msvc-inval.c lib/msvc-nothrow.c \
+ lib/nl_langinfo.c lib/obstack.c lib/readlink.c lib/regcomp.c \
+ lib/regex.c lib/regex_internal.c lib/regexec.c lib/rename.c \
+ lib/rmdir.c lib/getfilecon.c lib/stat-w32.c lib/stat.c \
+ lib/strerror.c lib/strerror-override.c lib/strverscmp.c \
+ lib/wcrtomb.c lib/wctob.c lib/wctomb.c
# 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 makefiles that
@@ -1953,6 +2018,7 @@ UNUSED_PARAMETER_H = $(top_srcdir)/lib/unused-parameter.h
WARN_ON_USE_H = $(top_srcdir)/lib/warn-on-use.h
sed_sed_SOURCES = \
sed/compile.c \
+ sed/debug.c \
sed/execute.c \
sed/mbcs.c \
sed/regexp.c \
@@ -1993,18 +2059,20 @@ LOG_COMPILER = false
# is listed in only one place.
# Old tests converted to newer init.sh style
-T = testsuite/misc.pl testsuite/cmd-l.sh testsuite/cmd-R.sh \
+T = testsuite/misc.pl testsuite/bug32082.sh testsuite/bug32271-1.sh \
+ testsuite/bug32271-2.sh 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/command-endings.sh \
- testsuite/execute-tests.sh testsuite/help-version.sh \
- testsuite/in-place-hyphen.sh \
+ testsuite/debug.pl testsuite/execute-tests.sh \
+ testsuite/help-version.sh testsuite/in-place-hyphen.sh \
testsuite/in-place-suffix-backup.sh \
testsuite/inplace-selinux.sh testsuite/invalid-mb-seq-UMR.sh \
testsuite/mb-bad-delim.sh testsuite/mb-charclass-non-utf8.sh \
testsuite/mb-match-slash.sh testsuite/mb-y-translate.sh \
- testsuite/newline-dfa-bug.sh testsuite/normalize-text.sh \
- testsuite/nulldata.sh testsuite/panic-tests.sh \
+ testsuite/missing-filename.sh testsuite/newline-dfa-bug.sh \
+ testsuite/normalize-text.sh testsuite/nulldata.sh \
+ testsuite/obinary.sh testsuite/panic-tests.sh \
testsuite/posix-char-class.sh testsuite/posix-mode-addr.sh \
testsuite/posix-mode-bad-ref.sh testsuite/posix-mode-ERE.sh \
testsuite/posix-mode-s.sh testsuite/posix-mode-N.sh \
@@ -2020,7 +2088,7 @@ T = testsuite/misc.pl testsuite/cmd-l.sh testsuite/cmd-R.sh \
testsuite/eval.sh testsuite/help.sh testsuite/inplace-hold.sh \
testsuite/mac-mf.sh testsuite/madding.sh testsuite/newjis.sh \
testsuite/stdin.sh testsuite/utf8-ru.sh testsuite/uniq.sh \
- testsuite/xemacs.sh
+ testsuite/word-delim.sh testsuite/xemacs.sh
SEDTESTS =
testsuite_get_mb_cur_max_LDADD = lib/libsed.a $(INTLLIBS)
testsuite_test_mbrtowc_LDADD = lib/libsed.a $(INTLLIBS)
@@ -2080,7 +2148,7 @@ all: $(BUILT_SOURCES) config.h
$(MAKE) $(AM_MAKEFLAGS) all-recursive
.SUFFIXES:
-.SUFFIXES: .c .dvi .log .o .obj .pl .pl$(EXEEXT) .ps .sed .sh .sh$(EXEEXT) .sin .trs
+.SUFFIXES: .c .dvi .log .o .obj .pl .pl$(EXEEXT) .ps .sh .sh$(EXEEXT) .trs
am--refresh: Makefile
@:
$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(top_srcdir)/lib/local.mk $(srcdir)/lib/gnulib.mk $(top_srcdir)/sed/local.mk $(top_srcdir)/doc/local.mk $(top_srcdir)/testsuite/local.mk $(am__configure_deps)
@@ -2197,6 +2265,8 @@ lib/get-permissions.$(OBJEXT): lib/$(am__dirstamp) \
lib/$(DEPDIR)/$(am__dirstamp)
lib/set-permissions.$(OBJEXT): lib/$(am__dirstamp) \
lib/$(DEPDIR)/$(am__dirstamp)
+lib/binary-io.$(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) \
@@ -2308,6 +2378,7 @@ lib/memchr.$(OBJEXT): lib/$(am__dirstamp) \
lib/$(DEPDIR)/$(am__dirstamp)
lib/memrchr.$(OBJEXT): lib/$(am__dirstamp) \
lib/$(DEPDIR)/$(am__dirstamp)
+lib/mkdir.$(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) \
@@ -2364,6 +2435,8 @@ sed/libver.a: $(sed_libver_a_OBJECTS) $(sed_libver_a_DEPENDENCIES) $(EXTRA_sed_l
$(AM_V_at)$(RANLIB) sed/libver.a
sed/sed-compile.$(OBJEXT): sed/$(am__dirstamp) \
sed/$(DEPDIR)/$(am__dirstamp)
+sed/sed-debug.$(OBJEXT): sed/$(am__dirstamp) \
+ sed/$(DEPDIR)/$(am__dirstamp)
sed/sed-execute.$(OBJEXT): sed/$(am__dirstamp) \
sed/$(DEPDIR)/$(am__dirstamp)
sed/sed-mbcs.$(OBJEXT): sed/$(am__dirstamp) \
@@ -2412,6 +2485,7 @@ distclean-compile:
@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)/binary-io.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
@@ -2449,6 +2523,7 @@ distclean-compile:
@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)/mkdir.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
@@ -2489,6 +2564,7 @@ distclean-compile:
@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-compile.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@sed/$(DEPDIR)/sed-debug.Po@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@sed/$(DEPDIR)/sed-execute.Po@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@sed/$(DEPDIR)/sed-mbcs.Po@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@sed/$(DEPDIR)/sed-regexp.Po@am__quote@ # am--include-marker
@@ -2534,6 +2610,20 @@ sed/sed-compile.obj: sed/compile.c
@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 sed/sed-compile.obj `if test -f 'sed/compile.c'; then $(CYGPATH_W) 'sed/compile.c'; else $(CYGPATH_W) '$(srcdir)/sed/compile.c'; fi`
+sed/sed-debug.o: sed/debug.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(sed_sed_CPPFLAGS) $(CPPFLAGS) $(sed_sed_CFLAGS) $(CFLAGS) -MT sed/sed-debug.o -MD -MP -MF sed/$(DEPDIR)/sed-debug.Tpo -c -o sed/sed-debug.o `test -f 'sed/debug.c' || echo '$(srcdir)/'`sed/debug.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) sed/$(DEPDIR)/sed-debug.Tpo sed/$(DEPDIR)/sed-debug.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='sed/debug.c' object='sed/sed-debug.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(sed_sed_CPPFLAGS) $(CPPFLAGS) $(sed_sed_CFLAGS) $(CFLAGS) -c -o sed/sed-debug.o `test -f 'sed/debug.c' || echo '$(srcdir)/'`sed/debug.c
+
+sed/sed-debug.obj: sed/debug.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(sed_sed_CPPFLAGS) $(CPPFLAGS) $(sed_sed_CFLAGS) $(CFLAGS) -MT sed/sed-debug.obj -MD -MP -MF sed/$(DEPDIR)/sed-debug.Tpo -c -o sed/sed-debug.obj `if test -f 'sed/debug.c'; then $(CYGPATH_W) 'sed/debug.c'; else $(CYGPATH_W) '$(srcdir)/sed/debug.c'; fi`
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) sed/$(DEPDIR)/sed-debug.Tpo sed/$(DEPDIR)/sed-debug.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='sed/debug.c' object='sed/sed-debug.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(sed_sed_CPPFLAGS) $(CPPFLAGS) $(sed_sed_CFLAGS) $(CFLAGS) -c -o sed/sed-debug.obj `if test -f 'sed/debug.c'; then $(CYGPATH_W) 'sed/debug.c'; else $(CYGPATH_W) '$(srcdir)/sed/debug.c'; fi`
+
sed/sed-execute.o: sed/execute.c
@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(sed_sed_CPPFLAGS) $(CPPFLAGS) $(sed_sed_CFLAGS) $(CFLAGS) -MT sed/sed-execute.o -MD -MP -MF sed/$(DEPDIR)/sed-execute.Tpo -c -o sed/sed-execute.o `test -f 'sed/execute.c' || echo '$(srcdir)/'`sed/execute.c
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) sed/$(DEPDIR)/sed-execute.Tpo sed/$(DEPDIR)/sed-execute.Po
@@ -3283,7 +3373,7 @@ check-am: all-am
check: $(BUILT_SOURCES)
$(MAKE) $(AM_MAKEFLAGS) check-recursive
all-am: Makefile $(INFO_DEPS) $(PROGRAMS) $(LIBRARIES) $(MANS) $(DATA) \
- $(HEADERS) config.h all-local
+ $(HEADERS) config.h
installdirs: installdirs-recursive
installdirs-am:
for dir in "$(DESTDIR)$(bindir)" "$(DESTDIR)$(infodir)" "$(DESTDIR)$(man1dir)"; do \
@@ -3350,6 +3440,7 @@ distclean: distclean-recursive
-rm -f lib/$(DEPDIR)/acl_entries.Po
-rm -f lib/$(DEPDIR)/alloca.Po
-rm -f lib/$(DEPDIR)/basename-lgpl.Po
+ -rm -f lib/$(DEPDIR)/binary-io.Po
-rm -f lib/$(DEPDIR)/btowc.Po
-rm -f lib/$(DEPDIR)/c-ctype.Po
-rm -f lib/$(DEPDIR)/c-strcasecmp.Po
@@ -3387,6 +3478,7 @@ distclean: distclean-recursive
-rm -f lib/$(DEPDIR)/mbtowc.Po
-rm -f lib/$(DEPDIR)/memchr.Po
-rm -f lib/$(DEPDIR)/memrchr.Po
+ -rm -f lib/$(DEPDIR)/mkdir.Po
-rm -f lib/$(DEPDIR)/mkostemp.Po
-rm -f lib/$(DEPDIR)/msvc-inval.Po
-rm -f lib/$(DEPDIR)/msvc-nothrow.Po
@@ -3427,6 +3519,7 @@ distclean: distclean-recursive
-rm -f lib/glthread/$(DEPDIR)/lock.Po
-rm -f lib/glthread/$(DEPDIR)/threadlib.Po
-rm -f sed/$(DEPDIR)/sed-compile.Po
+ -rm -f sed/$(DEPDIR)/sed-debug.Po
-rm -f sed/$(DEPDIR)/sed-execute.Po
-rm -f sed/$(DEPDIR)/sed-mbcs.Po
-rm -f sed/$(DEPDIR)/sed-regexp.Po
@@ -3470,7 +3563,7 @@ install-dvi-am: $(DVIS)
echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(dvidir)'"; \
$(INSTALL_DATA) $$files "$(DESTDIR)$(dvidir)" || exit $$?; \
done
-install-exec-am: install-binPROGRAMS install-exec-local
+install-exec-am: install-binPROGRAMS
install-html: install-html-recursive
@@ -3578,6 +3671,7 @@ maintainer-clean: maintainer-clean-recursive
-rm -f lib/$(DEPDIR)/acl_entries.Po
-rm -f lib/$(DEPDIR)/alloca.Po
-rm -f lib/$(DEPDIR)/basename-lgpl.Po
+ -rm -f lib/$(DEPDIR)/binary-io.Po
-rm -f lib/$(DEPDIR)/btowc.Po
-rm -f lib/$(DEPDIR)/c-ctype.Po
-rm -f lib/$(DEPDIR)/c-strcasecmp.Po
@@ -3615,6 +3709,7 @@ maintainer-clean: maintainer-clean-recursive
-rm -f lib/$(DEPDIR)/mbtowc.Po
-rm -f lib/$(DEPDIR)/memchr.Po
-rm -f lib/$(DEPDIR)/memrchr.Po
+ -rm -f lib/$(DEPDIR)/mkdir.Po
-rm -f lib/$(DEPDIR)/mkostemp.Po
-rm -f lib/$(DEPDIR)/msvc-inval.Po
-rm -f lib/$(DEPDIR)/msvc-nothrow.Po
@@ -3655,6 +3750,7 @@ maintainer-clean: maintainer-clean-recursive
-rm -f lib/glthread/$(DEPDIR)/lock.Po
-rm -f lib/glthread/$(DEPDIR)/threadlib.Po
-rm -f sed/$(DEPDIR)/sed-compile.Po
+ -rm -f sed/$(DEPDIR)/sed-debug.Po
-rm -f sed/$(DEPDIR)/sed-execute.Po
-rm -f sed/$(DEPDIR)/sed-mbcs.Po
-rm -f sed/$(DEPDIR)/sed-regexp.Po
@@ -3681,15 +3777,15 @@ ps: ps-recursive
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-info-am uninstall-man uninstall-pdf-am \
+ uninstall-ps-am
uninstall-man: uninstall-man1
.MAKE: $(am__recursive_targets) all check check-am install install-am \
install-strip
-.PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am all-local \
+.PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am \
am--depfiles am--refresh check check-TESTS check-am clean \
clean-aminfo clean-binPROGRAMS clean-checkPROGRAMS \
clean-cscope clean-generic clean-noinstLIBRARIES cscope \
@@ -3700,17 +3796,16 @@ uninstall-man: uninstall-man1
distcleancheck distdir distuninstallcheck dvi dvi-am html \
html-am info info-am install install-am install-binPROGRAMS \
install-data install-data-am install-dvi install-dvi-am \
- install-exec install-exec-am install-exec-local install-html \
- install-html-am install-info install-info-am install-man \
- install-man1 install-pdf install-pdf-am install-ps \
- install-ps-am install-strip installcheck installcheck-am \
- 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 \
+ 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 \
+ 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-man uninstall-man1 uninstall-pdf-am uninstall-ps-am
.PRECIOUS: Makefile
@@ -3777,44 +3872,6 @@ full-distcheck:
@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)
@@ -3883,7 +3940,7 @@ lib/fcntl.h: lib/fcntl.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NON
# We need the following in order to create <getopt.h> when the system
# doesn't have one that works with the given compiler.
-lib/getopt.h: lib/getopt.in.h $(top_builddir)/config.status
+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' \
@@ -3949,67 +4006,6 @@ lib/langinfo.h: lib/langinfo.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(W
@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)
@@ -4023,11 +4019,16 @@ lib/locale.h: lib/locale.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_N
-e 's/@''GNULIB_LOCALECONV''@/$(GNULIB_LOCALECONV)/g' \
-e 's/@''GNULIB_SETLOCALE''@/$(GNULIB_SETLOCALE)/g' \
-e 's/@''GNULIB_DUPLOCALE''@/$(GNULIB_DUPLOCALE)/g' \
+ -e 's/@''GNULIB_LOCALENAME''@/$(GNULIB_LOCALENAME)/g' \
+ -e 's|@''HAVE_NEWLOCALE''@|$(HAVE_NEWLOCALE)|g' \
-e 's|@''HAVE_DUPLOCALE''@|$(HAVE_DUPLOCALE)|g' \
+ -e 's|@''HAVE_FREELOCALE''@|$(HAVE_FREELOCALE)|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_NEWLOCALE''@|$(REPLACE_NEWLOCALE)|g' \
-e 's|@''REPLACE_DUPLOCALE''@|$(REPLACE_DUPLOCALE)|g' \
+ -e 's|@''REPLACE_FREELOCALE''@|$(REPLACE_FREELOCALE)|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)' \
@@ -4647,6 +4648,7 @@ lib/unistd.h: lib/unistd.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_N
-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_GETPASS''@/$(GNULIB_GETPASS)/g' \
-e 's/@''GNULIB_GETUSERSHELL''@/$(GNULIB_GETUSERSHELL)/g' \
-e 's/@''GNULIB_GROUP_MEMBER''@/$(GNULIB_GROUP_MEMBER)/g' \
-e 's/@''GNULIB_ISATTY''@/$(GNULIB_ISATTY)/g' \
@@ -4690,6 +4692,7 @@ lib/unistd.h: lib/unistd.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_N
-e 's|@''HAVE_GETGROUPS''@|$(HAVE_GETGROUPS)|g' \
-e 's|@''HAVE_GETHOSTNAME''@|$(HAVE_GETHOSTNAME)|g' \
-e 's|@''HAVE_GETPAGESIZE''@|$(HAVE_GETPAGESIZE)|g' \
+ -e 's|@''HAVE_GETPASS''@|$(HAVE_GETPASS)|g' \
-e 's|@''HAVE_GROUP_MEMBER''@|$(HAVE_GROUP_MEMBER)|g' \
-e 's|@''HAVE_LCHOWN''@|$(HAVE_LCHOWN)|g' \
-e 's|@''HAVE_LINK''@|$(HAVE_LINK)|g' \
@@ -4704,7 +4707,6 @@ lib/unistd.h: lib/unistd.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_N
-e 's|@''HAVE_SLEEP''@|$(HAVE_SLEEP)|g' \
-e 's|@''HAVE_SYMLINK''@|$(HAVE_SYMLINK)|g' \
-e 's|@''HAVE_SYMLINKAT''@|$(HAVE_SYMLINKAT)|g' \
- -e 's|@''HAVE_TRUNCATE''@|$(HAVE_TRUNCATE)|g' \
-e 's|@''HAVE_UNLINKAT''@|$(HAVE_UNLINKAT)|g' \
-e 's|@''HAVE_USLEEP''@|$(HAVE_USLEEP)|g' \
-e 's|@''HAVE_DECL_ENVIRON''@|$(HAVE_DECL_ENVIRON)|g' \
@@ -4716,6 +4718,7 @@ lib/unistd.h: lib/unistd.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_N
-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_TRUNCATE''@|$(HAVE_DECL_TRUNCATE)|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' \
@@ -4733,6 +4736,7 @@ lib/unistd.h: lib/unistd.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_N
-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_GETPASS''@|$(REPLACE_GETPASS)|g' \
-e 's|@''REPLACE_ISATTY''@|$(REPLACE_ISATTY)|g' \
-e 's|@''REPLACE_LCHOWN''@|$(REPLACE_LCHOWN)|g' \
-e 's|@''REPLACE_LINK''@|$(REPLACE_LINK)|g' \
diff --git a/NEWS b/NEWS
index 7666dcf..3207572 100644
--- a/NEWS
+++ b/NEWS
@@ -1,5 +1,49 @@
GNU sed NEWS -*- outline -*-
+* Noteworthy changes in release 4.7 (2018-12-20) [stable]
+
+** Bug fixes
+
+ Some uses of \b in the C locale and with the DFA matcher would fail, e.g.,
+ the following would mistakenly print "123-x" instead of "123":
+ echo 123-x|LC_ALL=C sed 's/.\bx//'
+ Using a multibyte locale or certain regexp constructs (some ranges,
+ backreferences) would avoid the bug. [bug introduced in sed 4.6]
+
+
+* Noteworthy changes in release 4.6 (2018-12-19) [stable]
+
+** Improvements
+
+ sed now prints a clear error message when r/R/w/W (and s///w) commands
+ are missing a filename. Previously, w/W commands would fail with confusing
+ error message, while r/R would be a silent no-op.
+
+ sed now uses fully-buffered output (instead of line-buffered) when
+ writing to files. This should noticeably improve performance of "sed -i"
+ and other write commands.
+ Buffering can be disabled (as before) with "sed -u".
+
+ sed in non-cygwin windows environments (e.g. mingw) now properly handles
+ '\n' newlines in -b/--binary mode.
+
+** Bug fixes
+
+ sed no longer accesses invalid memory (heap overflow) when given invalid
+ backreferences in 's' command [bug#32082, present at least since sed-4.0.6].
+
+ sed no longer adds extraneous NUL when given s/$//n command.
+ [related to bug#32271, present since sed-4.0.7]
+
+ sed no longer accesses invalid memory (heap overflow) with s/$//n regexes.
+ [bug#32271, present since sed-4.3].
+
+** New Features
+
+ New option, --debug: print the input sed script in canonical form
+ and annotate program execution.
+
+
* Noteworthy changes in release 4.5 (2018-03-31) [stable]
** Bug fixes
diff --git a/THANKS b/THANKS
index b57bbcf..a48c80e 100644
--- a/THANKS
+++ b/THANKS
@@ -13,9 +13,12 @@ Andrew Herbert andrew@werple.apana.org.au
Arnold Robbins arnold@skeeve.com
Assaf Gordon assafgordon@gmail.com
Bake Timmons b3timmons@speedymail.org
+Bernhard Voelker mail@bernhard-voelker.de
+Bjarni Ingi Gislason bjarniig@rhi.hi.is
Bruno Haible haible@ilog.fr
Chip Salzenberg chip@fin.uucp
Chris Weber weber@bucknell.edu
+Clint Adams clint@debian.org
Corinna Vinschen vinschen@redhat.com
Daniel R. Grayson dan@math.uiuc.edu
David A. Wheeler dwheeler@dwheeler.com
@@ -35,6 +38,7 @@ Greg Ubben gsu@romulus.ncsc.mil
Isamu Hasegawa isamu@yamato.ibm.com
Jakub Jelinek jakub@redhat.com
Jakub Martisko jamartis@redhat.com
+Jannick thirdedition@gmx.net
Jari Aalto jari.aalto@cante.net
Jason Molenda crash@cygnus.com
Jim Hill gjthill@gmail.com
diff --git a/aclocal.m4 b/aclocal.m4
index baa90a8..7d6512c 100644
--- a/aclocal.m4
+++ b/aclocal.m4
@@ -14,8 +14,8 @@
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.193-8974],,
-[m4_warning([this file was generated for autoconf 2.69.193-8974.
+m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.69.197-b8fd7],,
+[m4_warning([this file was generated for autoconf 2.69.197-b8fd7.
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'.])])
@@ -1163,11 +1163,11 @@ AC_SUBST([am__untar])
]) # _AM_PROG_TAR
m4_include([m4/00gnulib.m4])
+m4_include([m4/__inline.m4])
m4_include([m4/absolute-header.m4])
m4_include([m4/acl.m4])
m4_include([m4/alloca.m4])
m4_include([m4/arpa_inet_h.m4])
-m4_include([m4/asm-underscore.m4])
m4_include([m4/assert.m4])
m4_include([m4/btowc.m4])
m4_include([m4/builtin-expect.m4])
@@ -1177,7 +1177,6 @@ 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])
@@ -1217,11 +1216,11 @@ 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/host-cpu-c-abi.m4])
m4_include([m4/iconv.m4])
m4_include([m4/include_next.m4])
m4_include([m4/inet_pton.m4])
+m4_include([m4/intl-thread-locale.m4])
m4_include([m4/intlmacosx.m4])
m4_include([m4/inttypes-pri.m4])
m4_include([m4/inttypes.m4])
@@ -1259,6 +1258,7 @@ m4_include([m4/mbtowc.m4])
m4_include([m4/memchr.m4])
m4_include([m4/memrchr.m4])
m4_include([m4/minmax.m4])
+m4_include([m4/mkdir.m4])
m4_include([m4/mkostemp.m4])
m4_include([m4/mmap-anon.m4])
m4_include([m4/mode_t.m4])
diff --git a/basicdefs.h b/basicdefs.h
index bdbc45c..a5249f2 100644
--- a/basicdefs.h
+++ b/basicdefs.h
@@ -12,8 +12,7 @@
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
+ along with this program; If not, see <https://www.gnu.org/licenses/>. */
#ifndef BASICDEFS_H
#define BASICDEFS_H
@@ -31,15 +30,20 @@
/* type countT is used to keep track of line numbers, etc. */
typedef unsigned long countT;
+#include "xalloc.h"
+
/* some basic definitions to avoid undue promulgating of ugliness */
-#define MALLOC(n,t) ((t *)ck_malloc((n)*sizeof(t)))
-#define REALLOC(x,n,t) ((t *)ck_realloc((void *)(x),(n)*sizeof(t)))
-#define MEMDUP(x,n,t) ((t *)ck_memdup((void *)(x),(n)*sizeof(t)))
+#define REALLOC(x,n,t) ((t *)xnrealloc((void *)(x),(n),sizeof(t)))
+#define MEMDUP(x,n,t) ((t *)xmemdup((x),(n)*sizeof(t)))
#define OB_MALLOC(o,n,t) ((t *)(void *)obstack_alloc(o,(n)*sizeof(t)))
-#define obstack_chunk_alloc ck_malloc
+#define obstack_chunk_alloc xzalloc
#define obstack_chunk_free free
+#define STREQ(a, b) (strcmp (a, b) == 0)
+#define STREQ_LEN(a, b, n) (strncmp (a, b, n) == 0)
+#define STRPREFIX(a, b) (strncmp (a, b, strlen (b)) == 0)
+
/* 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
@@ -89,7 +93,7 @@ typedef unsigned long countT;
#ifndef initialize_main
# ifdef __EMX__
# define initialize_main(argcp, argvp) \
- { _response(argcp, argvp); _wildcard(argcp, argvp); }
+ { _response (argcp, argvp); _wildcard (argcp, argvp); }
# else /* NOT __EMX__ */
# define initialize_main(argcp, argvp)
# endif
diff --git a/bootstrap b/bootstrap
index 92be114..5264d9f 100755
--- a/bootstrap
+++ b/bootstrap
@@ -1,6 +1,6 @@
#! /bin/sh
# Print a version string.
-scriptversion=2018-03-07.03; # UTC
+scriptversion=2018-10-13.05; # UTC
# Bootstrap this package from checked-out sources.
@@ -47,6 +47,8 @@ PERL="${PERL-perl}"
me=$0
+default_gnulib_url=git://git.sv.gnu.org/gnulib
+
usage() {
cat <<EOF
Usage: $me [OPTION]...
@@ -76,6 +78,37 @@ contents are read as shell variables to configure the bootstrap.
For build prerequisites, environment variables like \$AUTOCONF and \$AMTAR
are honored.
+Gnulib sources can be fetched in various ways:
+
+ * If this package is in a git repository with a 'gnulib' submodule
+ configured, then that submodule is initialized and updated and sources
+ are fetched from there. If \$GNULIB_SRCDIR is set (directly or via
+ --gnulib-srcdir) and is a git repository, then it is used as a reference.
+
+ * Otherwise, if \$GNULIB_SRCDIR is set (directly or via --gnulib-srcdir),
+ then sources are fetched from that local directory. If it is a git
+ repository and \$GNULIB_REVISION is set, then that revision is checked
+ out.
+
+ * Otherwise, if this package is in a git repository with a 'gnulib'
+ submodule configured, then that submodule is initialized and updated and
+ sources are fetched from there.
+
+ * Otherwise, if the 'gnulib' directory does not exist, Gnulib sources are
+ cloned into that directory using git from \$GNULIB_URL, defaulting to
+ $default_gnulib_url.
+ If \$GNULIB_REVISION is set, then that revision is checked out.
+
+ * Otherwise, the existing Gnulib sources in the 'gnulib' directory are
+ used. If it is a git repository and \$GNULIB_REVISION is set, then that
+ revision is checked out.
+
+If you maintain a package and want to pin a particular revision of the
+Gnulib sources that has been tested with your package, then there are two
+possible approaches: either configure a 'gnulib' submodule with the
+appropriate revision, or set \$GNULIB_REVISION (and if necessary
+\$GNULIB_URL) in $me.conf.
+
Running without arguments will suffice in most cases.
EOF
}
@@ -129,18 +162,11 @@ bootstrap_post_import_hook() { :; }
# 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.
+# The command to download all .po files for a specified domain into a
+# specified directory. Fill in the first %s with the destination
+# directory and the second with the domain name.
po_download_command_format=\
-"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' \
+"wget --mirror --level=1 -nd -q -A.po -P '%s' \
https://translationproject.org/latest/%s/"
# Prefer a non-empty tarname (4th argument of AC_INIT if given), else
@@ -170,7 +196,15 @@ source_base=lib
m4_base=m4
doc_base=doc
tests_base=tests
-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
+"
# Additional gnulib-tool options to use. Use "\newline" to break lines.
gnulib_tool_option_extras=
@@ -264,24 +298,18 @@ 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=
test -d .git && vc_ignore=.gitignore
test -d CVS && vc_ignore="$vc_ignore .cvsignore"
fi
+if test x"$gnulib_modules$gnulib_files$gnulib_extra_files" = x; then
+ use_gnulib=false
+else
+ use_gnulib=true
+fi
+
# Translate configuration into internal form.
# Parse options.
@@ -612,95 +640,101 @@ git_modules_config () {
test -f .gitmodules && git config --file .gitmodules "$@"
}
-if $use_git; then
- gnulib_path=$(git_modules_config submodule.gnulib.path)
- test -z "$gnulib_path" && gnulib_path=gnulib
-fi
+if $use_gnulib; then
+ 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.
+ # 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 -- "$gnulib_path" || exit $?
- git submodule update -- "$gnulib_path" || exit $?
+ 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 -- "$gnulib_path" || exit $?
+ git submodule update -- "$gnulib_path" || exit $?
- elif [ ! -d "$gnulib_path" ]; then
- echo "$0: getting gnulib files..."
+ elif [ ! -d "$gnulib_path" ]; then
+ echo "$0: getting gnulib files..."
- trap cleanup_gnulib 1 2 13 15
+ trap cleanup_gnulib 1 2 13 15
- 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
+ shallow=
+ if test -z "$GNULIB_REVISION"; then
+ git clone -h 2>&1 | grep -- --depth > /dev/null && shallow='--depth 2'
+ fi
+ git clone $shallow ${GNULIB_URL:-$default_gnulib_url} "$gnulib_path" \
+ || cleanup_gnulib
- trap - 1 2 13 15
- fi
- GNULIB_SRCDIR=$gnulib_path
- ;;
-*)
- # 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..."
- 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 $?
+ trap - 1 2 13 15
+ fi
+ GNULIB_SRCDIR=$gnulib_path
+ ;;
+ *)
+ # 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..."
+ 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
- # 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 $?
+ # 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
- GNULIB_SRCDIR=$gnulib_path
+ ;;
+ esac
+
+ if test -d "$GNULIB_SRCDIR"/.git && test -n "$GNULIB_REVISION" \
+ && ! git_modules_config submodule.gnulib.url >/dev/null; then
+ (cd "$GNULIB_SRCDIR" && git checkout "$GNULIB_REVISION") || cleanup_gnulib
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.
+ # $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
-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
- }
+ gnulib_tool=$GNULIB_SRCDIR/gnulib-tool
+ <$gnulib_tool || exit $?
fi
-gnulib_tool=$GNULIB_SRCDIR/gnulib-tool
-<$gnulib_tool || exit $?
-
# Get translations.
download_po_files() {
subdir=$1
domain=$2
echo "$me: getting translations into $subdir for $domain..."
- cmd=$(printf "$po_download_command_format" "$domain" "$subdir")
- eval "$cmd" && return
- # Fallback to HTTPS.
- cmd=$(printf "$po_download_command_format2" "$subdir" "$domain")
+ cmd=$(printf "$po_download_command_format" "$subdir" "$domain")
eval "$cmd"
}
@@ -898,32 +932,33 @@ fi
# Import from gnulib.
-gnulib_tool_options="\
- --import\
- --no-changelog\
- --aux-dir $build_aux\
- --doc-base $doc_base\
- --lib $gnulib_name\
- --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 \
- || die "gnulib-tool failed"
+if $use_gnulib; then
+ gnulib_tool_options="\
+ --no-changelog\
+ --aux-dir=$build_aux\
+ --doc-base=$doc_base\
+ --lib=$gnulib_name\
+ --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 \
+ || die "gnulib-tool failed"
-for file in $gnulib_files; do
- symlink_to_dir "$GNULIB_SRCDIR" $file \
- || die "failed to symlink $file"
-done
+ for file in $gnulib_files; do
+ symlink_to_dir "$GNULIB_SRCDIR" $file \
+ || die "failed to symlink $file"
+ done
+fi
bootstrap_post_import_hook \
|| die "bootstrap_post_import_hook failed"
diff --git a/bootstrap.conf b/bootstrap.conf
index 75c6654..692ddfc 100644
--- a/bootstrap.conf
+++ b/bootstrap.conf
@@ -24,6 +24,7 @@ gnulib_modules='
acl
alloca
stdalign
+binary-io
btowc
c-ctype
closeout
@@ -64,6 +65,7 @@ verify
version-etc-fsf
wcrtomb
wctob
+xalloc
'
gnulib_name=libsed
diff --git a/build-aux/config.guess b/build-aux/config.guess
index 256083a..94c4ac1 100755
--- a/build-aux/config.guess
+++ b/build-aux/config.guess
@@ -2,7 +2,7 @@
# Attempt to guess a canonical system name.
# Copyright 1992-2018 Free Software Foundation, Inc.
-timestamp='2018-03-08'
+timestamp='2018-12-07'
# 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
@@ -84,8 +84,6 @@ if test $# != 0; then
exit 1
fi
-trap 'exit 1' 1 2 15
-
# CC_FOR_BUILD -- compiler used by this script. Note that the use of a
# compiler to aid in system detection is discouraged as it requires
# temporary files to be created and, as you can see below, it is a
@@ -96,34 +94,38 @@ trap 'exit 1' 1 2 15
# Portable tmp directory creation inspired by the Autoconf team.
-set_cc_for_build='
-trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ;
-trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ;
-: ${TMPDIR=/tmp} ;
- { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } ||
- { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } ||
- { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } ||
- { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ;
-dummy=$tmp/dummy ;
-tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ;
-case $CC_FOR_BUILD,$HOST_CC,$CC in
- ,,) echo "int x;" > "$dummy.c" ;
- for c in cc gcc c89 c99 ; do
- if ($c -c -o "$dummy.o" "$dummy.c") >/dev/null 2>&1 ; then
- CC_FOR_BUILD="$c"; break ;
- fi ;
- done ;
- if test x"$CC_FOR_BUILD" = x ; then
- CC_FOR_BUILD=no_compiler_found ;
- fi
- ;;
- ,,*) CC_FOR_BUILD=$CC ;;
- ,*,*) CC_FOR_BUILD=$HOST_CC ;;
-esac ; set_cc_for_build= ;'
+tmp=
+# shellcheck disable=SC2172
+trap 'test -z "$tmp" || rm -fr "$tmp"' 0 1 2 13 15
+
+set_cc_for_build() {
+ : "${TMPDIR=/tmp}"
+ # shellcheck disable=SC2039
+ { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } ||
+ { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir "$tmp" 2>/dev/null) ; } ||
+ { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir "$tmp" 2>/dev/null) && echo "Warning: creating insecure temp directory" >&2 ; } ||
+ { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; }
+ dummy=$tmp/dummy
+ case ${CC_FOR_BUILD-},${HOST_CC-},${CC-} in
+ ,,) echo "int x;" > "$dummy.c"
+ for driver in cc gcc c89 c99 ; do
+ if ($driver -c -o "$dummy.o" "$dummy.c") >/dev/null 2>&1 ; then
+ CC_FOR_BUILD="$driver"
+ break
+ fi
+ done
+ if test x"$CC_FOR_BUILD" = x ; then
+ CC_FOR_BUILD=no_compiler_found
+ fi
+ ;;
+ ,,*) CC_FOR_BUILD=$CC ;;
+ ,*,*) CC_FOR_BUILD=$HOST_CC ;;
+ esac
+}
# This is needed to find uname on a Pyramid OSx when run in the BSD universe.
# (ghazi@noc.rutgers.edu 1994-08-24)
-if (test -f /.attbin/uname) >/dev/null 2>&1 ; then
+if test -f /.attbin/uname ; then
PATH=$PATH:/.attbin ; export PATH
fi
@@ -138,7 +140,7 @@ Linux|GNU|GNU/*)
# We could probably try harder.
LIBC=gnu
- eval "$set_cc_for_build"
+ set_cc_for_build
cat <<-EOF > "$dummy.c"
#include <features.h>
#if defined(__UCLIBC__)
@@ -199,7 +201,7 @@ case "$UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_VERSION" in
os=netbsdelf
;;
arm*|i386|m68k|ns32k|sh3*|sparc|vax)
- eval "$set_cc_for_build"
+ set_cc_for_build
if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \
| grep -q __ELF__
then
@@ -237,7 +239,7 @@ case "$UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_VERSION" in
# Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM:
# contains redundant information, the shorter form:
# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used.
- echo "$machine-${os}${release}${abi}"
+ echo "$machine-${os}${release}${abi-}"
exit ;;
*:Bitrig:*:*)
UNAME_MACHINE_ARCH=`arch | sed 's/Bitrig.//'`
@@ -389,20 +391,15 @@ case "$UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_VERSION" in
echo i386-pc-auroraux"$UNAME_RELEASE"
exit ;;
i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*)
- eval "$set_cc_for_build"
- SUN_ARCH=i386
- # If there is a compiler, see if it is configured for 64-bit objects.
- # Note that the Sun cc does not turn __LP64__ into 1 like gcc does.
- # This test works for both compilers.
- 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) | \
- grep IS_64BIT_ARCH >/dev/null
- then
- SUN_ARCH=x86_64
- fi
- fi
- echo "$SUN_ARCH"-pc-solaris2"`echo "$UNAME_RELEASE"|sed -e 's/[^.]*//'`"
+ UNAME_REL="`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'`"
+ case `isainfo -b` in
+ 32)
+ echo i386-pc-solaris2"$UNAME_REL"
+ ;;
+ 64)
+ echo x86_64-pc-solaris2"$UNAME_REL"
+ ;;
+ esac
exit ;;
sun4*:SunOS:6*:*)
# According to config.sub, this is the proper way to canonicalize
@@ -482,7 +479,7 @@ case "$UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_VERSION" in
echo clipper-intergraph-clix"$UNAME_RELEASE"
exit ;;
mips:*:*:UMIPS | mips:*:*:RISCos)
- eval "$set_cc_for_build"
+ set_cc_for_build
sed 's/^ //' << EOF > "$dummy.c"
#ifdef __cplusplus
#include <stdio.h> /* for printf() prototype */
@@ -579,7 +576,7 @@ EOF
exit ;;
*:AIX:2:3)
if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then
- eval "$set_cc_for_build"
+ set_cc_for_build
sed 's/^ //' << EOF > "$dummy.c"
#include <sys/systemcfg.h>
@@ -660,7 +657,7 @@ EOF
esac
fi
if [ "$HP_ARCH" = "" ]; then
- eval "$set_cc_for_build"
+ set_cc_for_build
sed 's/^ //' << EOF > "$dummy.c"
#define _HPUX_SOURCE
@@ -700,7 +697,7 @@ EOF
esac
if [ "$HP_ARCH" = hppa2.0w ]
then
- eval "$set_cc_for_build"
+ set_cc_for_build
# hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating
# 32-bit code. hppa64-hp-hpux* has the same kernel and a compiler
@@ -726,7 +723,7 @@ EOF
echo ia64-hp-hpux"$HPUX_REV"
exit ;;
3050*:HI-UX:*:*)
- eval "$set_cc_for_build"
+ set_cc_for_build
sed 's/^ //' << EOF > "$dummy.c"
#include <unistd.h>
int
@@ -840,6 +837,17 @@ EOF
*:BSD/OS:*:*)
echo "$UNAME_MACHINE"-unknown-bsdi"$UNAME_RELEASE"
exit ;;
+ arm:FreeBSD:*:*)
+ UNAME_PROCESSOR=`uname -p`
+ set_cc_for_build
+ if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \
+ | grep -q __ARM_PCS_VFP
+ then
+ echo "${UNAME_PROCESSOR}"-unknown-freebsd"`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`"-gnueabi
+ else
+ echo "${UNAME_PROCESSOR}"-unknown-freebsd"`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`"-gnueabihf
+ fi
+ exit ;;
*:FreeBSD:*:*)
UNAME_PROCESSOR=`/usr/bin/uname -p`
case "$UNAME_PROCESSOR" in
@@ -881,7 +889,7 @@ EOF
echo "$UNAME_MACHINE"-pc-uwin
exit ;;
amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*)
- echo x86_64-unknown-cygwin
+ echo x86_64-pc-cygwin
exit ;;
prep*:SunOS:5.*:*)
echo powerpcle-unknown-solaris2"`echo "$UNAME_RELEASE"|sed -e 's/[^.]*//'`"
@@ -894,8 +902,8 @@ EOF
# other systems with GNU libc and userland
echo "$UNAME_MACHINE-unknown-`echo "$UNAME_SYSTEM" | sed 's,^[^/]*/,,' | tr "[:upper:]" "[:lower:]"``echo "$UNAME_RELEASE"|sed -e 's/[-(].*//'`-$LIBC"
exit ;;
- i*86:Minix:*:*)
- echo "$UNAME_MACHINE"-pc-minix
+ *:Minix:*:*)
+ echo "$UNAME_MACHINE"-unknown-minix
exit ;;
aarch64:Linux:*:*)
echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
@@ -922,7 +930,7 @@ EOF
echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
exit ;;
arm*:Linux:*:*)
- eval "$set_cc_for_build"
+ set_cc_for_build
if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \
| grep -q __ARM_EABI__
then
@@ -971,7 +979,7 @@ EOF
echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
exit ;;
mips:Linux:*:* | mips64:Linux:*:*)
- eval "$set_cc_for_build"
+ set_cc_for_build
sed 's/^ //' << EOF > "$dummy.c"
#undef CPU
#undef ${UNAME_MACHINE}
@@ -1285,7 +1293,7 @@ EOF
exit ;;
*:Darwin:*:*)
UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown
- eval "$set_cc_for_build"
+ set_cc_for_build
if test "$UNAME_PROCESSOR" = unknown ; then
UNAME_PROCESSOR=powerpc
fi
@@ -1358,6 +1366,7 @@ EOF
# "uname -m" is not consistent, so use $cputype instead. 386
# is converted to i386 for consistency with other x86
# operating systems.
+ # shellcheck disable=SC2154
if test "$cputype" = 386; then
UNAME_MACHINE=i386
else
@@ -1414,6 +1423,9 @@ EOF
amd64:Isilon\ OneFS:*:*)
echo x86_64-unknown-onefs
exit ;;
+ *:Unleashed:*:*)
+ echo "$UNAME_MACHINE"-unknown-unleashed"$UNAME_RELEASE"
+ exit ;;
esac
echo "$0: unable to guess system type" >&2
diff --git a/build-aux/config.sub b/build-aux/config.sub
index 9ccf09a..a5081b8 100755
--- a/build-aux/config.sub
+++ b/build-aux/config.sub
@@ -2,7 +2,7 @@
# Configuration validation subroutine script.
# Copyright 1992-2018 Free Software Foundation, Inc.
-timestamp='2018-03-08'
+timestamp='2018-12-16'
# 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
@@ -89,7 +89,7 @@ while test $# -gt 0 ; do
- ) # Use stdin as input.
break ;;
-* )
- echo "$me: invalid option $1$help"
+ echo "$me: invalid option $1$help" >&2
exit 1 ;;
*local*)
@@ -110,1223 +110,1160 @@ case $# in
exit 1;;
esac
-# Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any).
-# Here we must recognize all the valid KERNEL-OS combinations.
-maybe_os=`echo "$1" | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
-case $maybe_os in
- nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc | linux-newlib* | \
- 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/'`
- ;;
- android-linux)
- os=-linux-android
- basic_machine=`echo "$1" | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`-unknown
- ;;
- *)
- basic_machine=`echo "$1" | sed 's/-[^-]*$//'`
- if [ "$basic_machine" != "$1" ]
- then os=`echo "$1" | sed 's/.*-/-/'`
- else os=; fi
- ;;
-esac
+# Split fields of configuration type
+IFS="-" read field1 field2 field3 field4 <<EOF
+$1
+EOF
-### Let's recognize common machines as not being operating systems so
-### that things like config.sub decstation-3100 work. We also
-### recognize some manufacturers as not being operating systems, so we
-### can provide default operating systems below.
-case $os in
- -sun*os*)
- # Prevent following clause from handling this invalid input.
- ;;
- -dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \
- -att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \
- -unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \
- -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*)
- os=
- basic_machine=$1
- ;;
- -bluegene*)
- os=-cnk
- ;;
- -sim | -cisco | -oki | -wec | -winbond)
- os=
- basic_machine=$1
- ;;
- -scout)
- ;;
- -wrs)
- os=-vxworks
- basic_machine=$1
- ;;
- -chorusos*)
- os=-chorusos
- basic_machine=$1
- ;;
- -chorusrdb)
- os=-chorusrdb
- basic_machine=$1
- ;;
- -hiux*)
- os=-hiuxwe2
- ;;
- -sco6)
- os=-sco5v6
- basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'`
- ;;
- -sco5)
- os=-sco3.2v5
- basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'`
- ;;
- -sco4)
- os=-sco3.2v4
- basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'`
- ;;
- -sco3.2.[4-9]*)
- os=`echo $os | sed -e 's/sco3.2./sco3.2v/'`
- basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'`
- ;;
- -sco3.2v[4-9]*)
- # Don't forget version if it is 3.2v4 or newer.
- basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'`
- ;;
- -sco5v6*)
- # Don't forget version if it is 3.2v4 or newer.
- basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'`
- ;;
- -sco*)
- os=-sco3.2v2
- basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'`
- ;;
- -udk*)
- basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'`
- ;;
- -isc)
- os=-isc2.2
- basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'`
- ;;
- -clix*)
- basic_machine=clipper-intergraph
- ;;
- -isc*)
- basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'`
- ;;
- -lynx*178)
- os=-lynxos178
- ;;
- -lynx*5)
- os=-lynxos5
+# Separate into logical components for further validation
+case $1 in
+ *-*-*-*-*)
+ echo Invalid configuration \`"$1"\': more than four components >&2
+ exit 1
;;
- -lynx*)
- os=-lynxos
+ *-*-*-*)
+ basic_machine=$field1-$field2
+ os=$field3-$field4
;;
- -ptx*)
- basic_machine=`echo "$1" | sed -e 's/86-.*/86-sequent/'`
+ *-*-*)
+ # Ambiguous whether COMPANY is present, or skipped and KERNEL-OS is two
+ # parts
+ maybe_os=$field2-$field3
+ case $maybe_os in
+ nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc \
+ | linux-newlib* | 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*)
+ basic_machine=$field1
+ os=$maybe_os
+ ;;
+ android-linux)
+ basic_machine=$field1-unknown
+ os=linux-android
+ ;;
+ *)
+ basic_machine=$field1-$field2
+ os=$field3
+ ;;
+ esac
;;
- -psos*)
- os=-psos
+ *-*)
+ # A lone config we happen to match not fitting any pattern
+ case $field1-$field2 in
+ decstation-3100)
+ basic_machine=mips-dec
+ os=
+ ;;
+ *-*)
+ # Second component is usually, but not always the OS
+ case $field2 in
+ # Prevent following clause from handling this valid os
+ sun*os*)
+ basic_machine=$field1
+ os=$field2
+ ;;
+ # Manufacturers
+ dec* | mips* | sequent* | encore* | pc533* | sgi* | sony* \
+ | att* | 7300* | 3300* | delta* | motorola* | sun[234]* \
+ | unicom* | ibm* | next | hp | isi* | apollo | altos* \
+ | 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* | sim | cisco \
+ | oki | wec | wrs | winbond)
+ basic_machine=$field1-$field2
+ os=
+ ;;
+ *)
+ basic_machine=$field1
+ os=$field2
+ ;;
+ esac
+ ;;
+ esac
;;
- -mint | -mint[0-9]*)
- basic_machine=m68k-atari
- os=-mint
+ *)
+ # Convert single-component short-hands not valid as part of
+ # multi-component configurations.
+ case $field1 in
+ 386bsd)
+ basic_machine=i386-pc
+ os=bsd
+ ;;
+ a29khif)
+ basic_machine=a29k-amd
+ os=udi
+ ;;
+ adobe68k)
+ basic_machine=m68010-adobe
+ os=scout
+ ;;
+ alliant)
+ basic_machine=fx80-alliant
+ os=
+ ;;
+ altos | altos3068)
+ basic_machine=m68k-altos
+ os=
+ ;;
+ am29k)
+ basic_machine=a29k-none
+ os=bsd
+ ;;
+ amdahl)
+ basic_machine=580-amdahl
+ os=sysv
+ ;;
+ amiga)
+ basic_machine=m68k-unknown
+ os=
+ ;;
+ amigaos | amigados)
+ basic_machine=m68k-unknown
+ os=amigaos
+ ;;
+ amigaunix | amix)
+ basic_machine=m68k-unknown
+ os=sysv4
+ ;;
+ apollo68)
+ basic_machine=m68k-apollo
+ os=sysv
+ ;;
+ apollo68bsd)
+ basic_machine=m68k-apollo
+ os=bsd
+ ;;
+ aros)
+ basic_machine=i386-pc
+ os=aros
+ ;;
+ aux)
+ basic_machine=m68k-apple
+ os=aux
+ ;;
+ balance)
+ basic_machine=ns32k-sequent
+ os=dynix
+ ;;
+ blackfin)
+ basic_machine=bfin-unknown
+ os=linux
+ ;;
+ cegcc)
+ basic_machine=arm-unknown
+ os=cegcc
+ ;;
+ convex-c1)
+ basic_machine=c1-convex
+ os=bsd
+ ;;
+ convex-c2)
+ basic_machine=c2-convex
+ os=bsd
+ ;;
+ convex-c32)
+ basic_machine=c32-convex
+ os=bsd
+ ;;
+ convex-c34)
+ basic_machine=c34-convex
+ os=bsd
+ ;;
+ convex-c38)
+ basic_machine=c38-convex
+ os=bsd
+ ;;
+ cray)
+ basic_machine=j90-cray
+ os=unicos
+ ;;
+ crds | unos)
+ basic_machine=m68k-crds
+ os=
+ ;;
+ da30)
+ basic_machine=m68k-da30
+ os=
+ ;;
+ decstation | pmax | pmin | dec3100 | decstatn)
+ basic_machine=mips-dec
+ os=
+ ;;
+ delta88)
+ basic_machine=m88k-motorola
+ os=sysv3
+ ;;
+ dicos)
+ basic_machine=i686-pc
+ os=dicos
+ ;;
+ djgpp)
+ basic_machine=i586-pc
+ os=msdosdjgpp
+ ;;
+ ebmon29k)
+ basic_machine=a29k-amd
+ os=ebmon
+ ;;
+ es1800 | OSE68k | ose68k | ose | OSE)
+ basic_machine=m68k-ericsson
+ os=ose
+ ;;
+ gmicro)
+ basic_machine=tron-gmicro
+ os=sysv
+ ;;
+ go32)
+ basic_machine=i386-pc
+ os=go32
+ ;;
+ h8300hms)
+ basic_machine=h8300-hitachi
+ os=hms
+ ;;
+ h8300xray)
+ basic_machine=h8300-hitachi
+ os=xray
+ ;;
+ h8500hms)
+ basic_machine=h8500-hitachi
+ os=hms
+ ;;
+ harris)
+ basic_machine=m88k-harris
+ os=sysv3
+ ;;
+ hp300)
+ basic_machine=m68k-hp
+ ;;
+ hp300bsd)
+ basic_machine=m68k-hp
+ os=bsd
+ ;;
+ hp300hpux)
+ basic_machine=m68k-hp
+ os=hpux
+ ;;
+ hppaosf)
+ basic_machine=hppa1.1-hp
+ os=osf
+ ;;
+ hppro)
+ basic_machine=hppa1.1-hp
+ os=proelf
+ ;;
+ i386mach)
+ basic_machine=i386-mach
+ os=mach
+ ;;
+ vsta)
+ basic_machine=i386-pc
+ os=vsta
+ ;;
+ isi68 | isi)
+ basic_machine=m68k-isi
+ os=sysv
+ ;;
+ m68knommu)
+ basic_machine=m68k-unknown
+ os=linux
+ ;;
+ magnum | m3230)
+ basic_machine=mips-mips
+ os=sysv
+ ;;
+ merlin)
+ basic_machine=ns32k-utek
+ os=sysv
+ ;;
+ mingw64)
+ basic_machine=x86_64-pc
+ os=mingw64
+ ;;
+ mingw32)
+ basic_machine=i686-pc
+ os=mingw32
+ ;;
+ mingw32ce)
+ basic_machine=arm-unknown
+ os=mingw32ce
+ ;;
+ monitor)
+ basic_machine=m68k-rom68k
+ os=coff
+ ;;
+ morphos)
+ basic_machine=powerpc-unknown
+ os=morphos
+ ;;
+ moxiebox)
+ basic_machine=moxie-unknown
+ os=moxiebox
+ ;;
+ msdos)
+ basic_machine=i386-pc
+ os=msdos
+ ;;
+ msys)
+ basic_machine=i686-pc
+ os=msys
+ ;;
+ mvs)
+ basic_machine=i370-ibm
+ os=mvs
+ ;;
+ nacl)
+ basic_machine=le32-unknown
+ os=nacl
+ ;;
+ ncr3000)
+ basic_machine=i486-ncr
+ os=sysv4
+ ;;
+ netbsd386)
+ basic_machine=i386-pc
+ os=netbsd
+ ;;
+ netwinder)
+ basic_machine=armv4l-rebel
+ os=linux
+ ;;
+ news | news700 | news800 | news900)
+ basic_machine=m68k-sony
+ os=newsos
+ ;;
+ news1000)
+ basic_machine=m68030-sony
+ os=newsos
+ ;;
+ necv70)
+ basic_machine=v70-nec
+ os=sysv
+ ;;
+ nh3000)
+ basic_machine=m68k-harris
+ os=cxux
+ ;;
+ nh[45]000)
+ basic_machine=m88k-harris
+ os=cxux
+ ;;
+ nindy960)
+ basic_machine=i960-intel
+ os=nindy
+ ;;
+ mon960)
+ basic_machine=i960-intel
+ os=mon960
+ ;;
+ nonstopux)
+ basic_machine=mips-compaq
+ os=nonstopux
+ ;;
+ os400)
+ basic_machine=powerpc-ibm
+ os=os400
+ ;;
+ OSE68000 | ose68000)
+ basic_machine=m68000-ericsson
+ os=ose
+ ;;
+ os68k)
+ basic_machine=m68k-none
+ os=os68k
+ ;;
+ paragon)
+ basic_machine=i860-intel
+ os=osf
+ ;;
+ parisc)
+ basic_machine=hppa-unknown
+ os=linux
+ ;;
+ pw32)
+ basic_machine=i586-unknown
+ os=pw32
+ ;;
+ rdos | rdos64)
+ basic_machine=x86_64-pc
+ os=rdos
+ ;;
+ rdos32)
+ basic_machine=i386-pc
+ os=rdos
+ ;;
+ rom68k)
+ basic_machine=m68k-rom68k
+ os=coff
+ ;;
+ sa29200)
+ basic_machine=a29k-amd
+ os=udi
+ ;;
+ sei)
+ basic_machine=mips-sei
+ os=seiux
+ ;;
+ sequent)
+ basic_machine=i386-sequent
+ os=
+ ;;
+ sps7)
+ basic_machine=m68k-bull
+ os=sysv2
+ ;;
+ st2000)
+ basic_machine=m68k-tandem
+ os=
+ ;;
+ stratus)
+ basic_machine=i860-stratus
+ os=sysv4
+ ;;
+ sun2)
+ basic_machine=m68000-sun
+ os=
+ ;;
+ sun2os3)
+ basic_machine=m68000-sun
+ os=sunos3
+ ;;
+ sun2os4)
+ basic_machine=m68000-sun
+ os=sunos4
+ ;;
+ sun3)
+ basic_machine=m68k-sun
+ os=
+ ;;
+ sun3os3)
+ basic_machine=m68k-sun
+ os=sunos3
+ ;;
+ sun3os4)
+ basic_machine=m68k-sun
+ os=sunos4
+ ;;
+ sun4)
+ basic_machine=sparc-sun
+ os=
+ ;;
+ sun4os3)
+ basic_machine=sparc-sun
+ os=sunos3
+ ;;
+ sun4os4)
+ basic_machine=sparc-sun
+ os=sunos4
+ ;;
+ sun4sol2)
+ basic_machine=sparc-sun
+ os=solaris2
+ ;;
+ sun386 | sun386i | roadrunner)
+ basic_machine=i386-sun
+ os=
+ ;;
+ sv1)
+ basic_machine=sv1-cray
+ os=unicos
+ ;;
+ symmetry)
+ basic_machine=i386-sequent
+ os=dynix
+ ;;
+ t3e)
+ basic_machine=alphaev5-cray
+ os=unicos
+ ;;
+ t90)
+ basic_machine=t90-cray
+ os=unicos
+ ;;
+ toad1)
+ basic_machine=pdp10-xkl
+ os=tops20
+ ;;
+ tpf)
+ basic_machine=s390x-ibm
+ os=tpf
+ ;;
+ udi29k)
+ basic_machine=a29k-amd
+ os=udi
+ ;;
+ ultra3)
+ basic_machine=a29k-nyu
+ os=sym1
+ ;;
+ v810 | necv810)
+ basic_machine=v810-nec
+ os=none
+ ;;
+ vaxv)
+ basic_machine=vax-dec
+ os=sysv
+ ;;
+ vms)
+ basic_machine=vax-dec
+ os=vms
+ ;;
+ vxworks960)
+ basic_machine=i960-wrs
+ os=vxworks
+ ;;
+ vxworks68)
+ basic_machine=m68k-wrs
+ os=vxworks
+ ;;
+ vxworks29k)
+ basic_machine=a29k-wrs
+ os=vxworks
+ ;;
+ xbox)
+ basic_machine=i686-pc
+ os=mingw32
+ ;;
+ ymp)
+ basic_machine=ymp-cray
+ os=unicos
+ ;;
+ *)
+ basic_machine=$1
+ os=
+ ;;
+ esac
;;
esac
-# Decode aliases for certain CPU-COMPANY combinations.
+# Decode 1-component or ad-hoc basic machines
case $basic_machine in
- # Recognize the basic CPU types without company name.
- # Some are omitted here because they have special meanings below.
- 1750a | 580 \
- | a29k \
- | aarch64 | aarch64_be \
- | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \
- | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \
- | am33_2.0 \
- | arc | arceb \
- | arm | arm[bl]e | arme[lb] | armv[2-8] | armv[3-8][lb] | armv7[arm] \
- | avr | avr32 \
- | ba \
- | be32 | be64 \
- | bfin \
- | c4x | c8051 | clipper \
- | d10v | d30v | dlx | dsp16xx \
- | e2k | epiphany \
- | fido | fr30 | frv | ft32 \
- | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
- | hexagon \
- | i370 | i860 | i960 | ia16 | ia64 \
- | ip2k | iq2000 \
- | k1om \
- | le32 | le64 \
- | lm32 \
- | m32c | m32r | m32rle | m68000 | m68k | m88k \
- | maxq | mb | microblaze | microblazeel | mcore | mep | metag \
- | mips | mipsbe | mipseb | mipsel | mipsle \
- | mips16 \
- | mips64 | mips64el \
- | mips64octeon | mips64octeonel \
- | mips64orion | mips64orionel \
- | mips64r5900 | mips64r5900el \
- | mips64vr | mips64vrel \
- | mips64vr4100 | mips64vr4100el \
- | mips64vr4300 | mips64vr4300el \
- | mips64vr5000 | mips64vr5000el \
- | 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 | nios2eb | nios2el \
- | ns16k | ns32k \
- | open8 | or1k | or1knd | or32 \
- | pdp10 | 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[234]eb | sheb | shbe | shle | sh[1234]le | sh3ele \
- | sh64 | sh64le \
- | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \
- | sparcv8 | sparcv9 | sparcv9b | sparcv9v \
- | spu \
- | tahoe | tic4x | tic54x | tic55x | tic6x | tic80 | tron \
- | ubicom32 \
- | v850 | v850e | v850e1 | v850e2 | v850es | v850e2v3 \
- | visium \
- | wasm32 \
- | x86 | xc16x | xstormy16 | xtensa \
- | z8k | z80)
- basic_machine=$basic_machine-unknown
- ;;
- c54x)
- basic_machine=tic54x-unknown
- ;;
- c55x)
- basic_machine=tic55x-unknown
- ;;
- c6x)
- basic_machine=tic6x-unknown
- ;;
- leon|leon[3-9])
- basic_machine=sparc-$basic_machine
- ;;
- m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x | nvptx | picochip)
- basic_machine=$basic_machine-unknown
- os=-none
+ # Here we handle the default manufacturer of certain CPU types. It is in
+ # some cases the only manufacturer, in others, it is the most popular.
+ w89k)
+ cpu=hppa1.1
+ vendor=winbond
;;
- m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65)
+ op50n)
+ cpu=hppa1.1
+ vendor=oki
;;
- ms1)
- basic_machine=mt-unknown
+ op60c)
+ cpu=hppa1.1
+ vendor=oki
;;
-
- strongarm | thumb | xscale)
- basic_machine=arm-unknown
+ ibm*)
+ cpu=i370
+ vendor=ibm
;;
- xgate)
- basic_machine=$basic_machine-unknown
- os=-none
+ orion105)
+ cpu=clipper
+ vendor=highlevel
;;
- xscaleeb)
- basic_machine=armeb-unknown
+ mac | mpw | mac-mpw)
+ cpu=m68k
+ vendor=apple
;;
-
- xscaleel)
- basic_machine=armel-unknown
+ pmac | pmac-mpw)
+ cpu=powerpc
+ vendor=apple
;;
- # We use `pc' rather than `unknown'
- # because (1) that's what they normally are, and
- # (2) the word "unknown" tends to confuse beginning users.
- i*86 | x86_64)
- basic_machine=$basic_machine-pc
- ;;
- # Object if more than one company name word.
- *-*-*)
- echo Invalid configuration \`"$1"\': machine \`"$basic_machine"\' not recognized 1>&2
- exit 1
- ;;
- # Recognize the basic CPU types with company name.
- 580-* \
- | a29k-* \
- | aarch64-* | aarch64_be-* \
- | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \
- | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \
- | alphapca5[67]-* | alpha64pca5[67]-* | arc-* | arceb-* \
- | arm-* | armbe-* | armle-* | armeb-* | armv*-* \
- | avr-* | avr32-* \
- | ba-* \
- | be32-* | be64-* \
- | bfin-* | bs2000-* \
- | c[123]* | c30-* | [cjt]90-* | c4x-* \
- | c8051-* | clipper-* | craynv-* | cydra-* \
- | d10v-* | d30v-* | dlx-* \
- | 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-* | ia16-* | ia64-* \
- | ip2k-* | iq2000-* \
- | k1om-* \
- | le32-* | le64-* \
- | lm32-* \
- | m32c-* | m32r-* | m32rle-* \
- | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \
- | m88110-* | m88k-* | maxq-* | mcore-* | metag-* \
- | microblaze-* | microblazeel-* \
- | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \
- | mips16-* \
- | mips64-* | mips64el-* \
- | mips64octeon-* | mips64octeonel-* \
- | mips64orion-* | mips64orionel-* \
- | mips64r5900-* | mips64r5900el-* \
- | mips64vr-* | mips64vrel-* \
- | mips64vr4100-* | mips64vr4100el-* \
- | mips64vr4300-* | mips64vr4300el-* \
- | mips64vr5000-* | mips64vr5000el-* \
- | 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-* | 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*-* \
- | tahoe-* \
- | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \
- | tile*-* \
- | tron-* \
- | ubicom32-* \
- | v850-* | v850e-* | v850e1-* | v850es-* | v850e2-* | v850e2v3-* \
- | vax-* \
- | visium-* \
- | wasm32-* \
- | we32k-* \
- | x86-* | x86_64-* | xc16x-* | xps100-* \
- | xstormy16-* | xtensa*-* \
- | ymp-* \
- | z8k-* | z80-*)
- ;;
- # Recognize the basic CPU types without company name, with glob match.
- xtensa*)
- basic_machine=$basic_machine-unknown
- ;;
# Recognize the various machine names and aliases which stand
# for a CPU type and a company and sometimes even an OS.
- 386bsd)
- basic_machine=i386-pc
- os=-bsd
- ;;
3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc)
- basic_machine=m68000-att
+ cpu=m68000
+ vendor=att
;;
3b*)
- basic_machine=we32k-att
- ;;
- a29khif)
- basic_machine=a29k-amd
- os=-udi
- ;;
- abacus)
- basic_machine=abacus-unknown
- ;;
- adobe68k)
- basic_machine=m68010-adobe
- os=-scout
- ;;
- alliant | fx80)
- basic_machine=fx80-alliant
- ;;
- altos | altos3068)
- basic_machine=m68k-altos
- ;;
- am29k)
- basic_machine=a29k-none
- os=-bsd
- ;;
- amd64)
- basic_machine=x86_64-pc
- ;;
- amd64-*)
- basic_machine=x86_64-`echo "$basic_machine" | sed 's/^[^-]*-//'`
- ;;
- amdahl)
- basic_machine=580-amdahl
- os=-sysv
- ;;
- amiga | amiga-*)
- basic_machine=m68k-unknown
- ;;
- amigaos | amigados)
- basic_machine=m68k-unknown
- os=-amigaos
- ;;
- amigaunix | amix)
- basic_machine=m68k-unknown
- os=-sysv4
- ;;
- apollo68)
- basic_machine=m68k-apollo
- os=-sysv
- ;;
- apollo68bsd)
- basic_machine=m68k-apollo
- os=-bsd
- ;;
- aros)
- basic_machine=i386-pc
- os=-aros
- ;;
- asmjs)
- basic_machine=asmjs-unknown
- ;;
- aux)
- basic_machine=m68k-apple
- os=-aux
- ;;
- balance)
- basic_machine=ns32k-sequent
- os=-dynix
- ;;
- blackfin)
- basic_machine=bfin-unknown
- os=-linux
- ;;
- blackfin-*)
- basic_machine=bfin-`echo "$basic_machine" | sed 's/^[^-]*-//'`
- os=-linux
+ cpu=we32k
+ vendor=att
;;
bluegene*)
- basic_machine=powerpc-ibm
- os=-cnk
- ;;
- c54x-*)
- basic_machine=tic54x-`echo "$basic_machine" | sed 's/^[^-]*-//'`
- ;;
- c55x-*)
- basic_machine=tic55x-`echo "$basic_machine" | sed 's/^[^-]*-//'`
- ;;
- c6x-*)
- basic_machine=tic6x-`echo "$basic_machine" | sed 's/^[^-]*-//'`
- ;;
- c90)
- basic_machine=c90-cray
- os=-unicos
- ;;
- cegcc)
- basic_machine=arm-unknown
- os=-cegcc
- ;;
- convex-c1)
- basic_machine=c1-convex
- os=-bsd
- ;;
- convex-c2)
- basic_machine=c2-convex
- os=-bsd
- ;;
- convex-c32)
- basic_machine=c32-convex
- os=-bsd
- ;;
- convex-c34)
- basic_machine=c34-convex
- os=-bsd
- ;;
- convex-c38)
- basic_machine=c38-convex
- os=-bsd
- ;;
- cray | j90)
- basic_machine=j90-cray
- os=-unicos
- ;;
- craynv)
- basic_machine=craynv-cray
- os=-unicosmp
- ;;
- cr16 | cr16-*)
- basic_machine=cr16-unknown
- os=-elf
- ;;
- crds | unos)
- basic_machine=m68k-crds
- ;;
- crisv32 | crisv32-* | etraxfs*)
- basic_machine=crisv32-axis
- ;;
- cris | cris-* | etrax*)
- basic_machine=cris-axis
- ;;
- crx)
- basic_machine=crx-unknown
- os=-elf
- ;;
- da30 | da30-*)
- basic_machine=m68k-da30
- ;;
- decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn)
- basic_machine=mips-dec
+ cpu=powerpc
+ vendor=ibm
+ os=cnk
;;
decsystem10* | dec10*)
- basic_machine=pdp10-dec
- os=-tops10
+ cpu=pdp10
+ vendor=dec
+ os=tops10
;;
decsystem20* | dec20*)
- basic_machine=pdp10-dec
- os=-tops20
+ cpu=pdp10
+ vendor=dec
+ os=tops20
;;
delta | 3300 | motorola-3300 | motorola-delta \
| 3300-motorola | delta-motorola)
- basic_machine=m68k-motorola
- ;;
- delta88)
- basic_machine=m88k-motorola
- os=-sysv3
- ;;
- dicos)
- basic_machine=i686-pc
- os=-dicos
- ;;
- djgpp)
- basic_machine=i586-pc
- os=-msdosdjgpp
- ;;
- dpx20 | dpx20-*)
- basic_machine=rs6000-bull
- os=-bosx
+ cpu=m68k
+ vendor=motorola
;;
dpx2*)
- 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
- ;;
- elxsi)
- basic_machine=elxsi-elxsi
- os=-bsd
+ cpu=m68k
+ vendor=bull
+ os=sysv3
;;
encore | umax | mmax)
- basic_machine=ns32k-encore
+ cpu=ns32k
+ vendor=encore
;;
- es1800 | OSE68k | ose68k | ose | OSE)
- basic_machine=m68k-ericsson
- os=-ose
+ elxsi)
+ cpu=elxsi
+ vendor=elxsi
+ os=${os:-bsd}
;;
fx2800)
- basic_machine=i860-alliant
+ cpu=i860
+ vendor=alliant
;;
genix)
- basic_machine=ns32k-ns
- ;;
- gmicro)
- basic_machine=tron-gmicro
- os=-sysv
- ;;
- go32)
- basic_machine=i386-pc
- os=-go32
+ cpu=ns32k
+ vendor=ns
;;
h3050r* | hiux*)
- basic_machine=hppa1.1-hitachi
- os=-hiuxwe2
- ;;
- h8300hms)
- basic_machine=h8300-hitachi
- os=-hms
- ;;
- h8300xray)
- basic_machine=h8300-hitachi
- os=-xray
- ;;
- h8500hms)
- basic_machine=h8500-hitachi
- os=-hms
- ;;
- harris)
- basic_machine=m88k-harris
- os=-sysv3
- ;;
- hp300-*)
- basic_machine=m68k-hp
- ;;
- hp300bsd)
- basic_machine=m68k-hp
- os=-bsd
- ;;
- hp300hpux)
- basic_machine=m68k-hp
- os=-hpux
+ cpu=hppa1.1
+ vendor=hitachi
+ os=hiuxwe2
;;
hp3k9[0-9][0-9] | hp9[0-9][0-9])
- basic_machine=hppa1.0-hp
+ cpu=hppa1.0
+ vendor=hp
;;
hp9k2[0-9][0-9] | hp9k31[0-9])
- basic_machine=m68000-hp
+ cpu=m68000
+ vendor=hp
;;
hp9k3[2-9][0-9])
- basic_machine=m68k-hp
+ cpu=m68k
+ vendor=hp
;;
hp9k6[0-9][0-9] | hp6[0-9][0-9])
- basic_machine=hppa1.0-hp
+ cpu=hppa1.0
+ vendor=hp
;;
hp9k7[0-79][0-9] | hp7[0-79][0-9])
- basic_machine=hppa1.1-hp
+ cpu=hppa1.1
+ vendor=hp
;;
hp9k78[0-9] | hp78[0-9])
# FIXME: really hppa2.0-hp
- basic_machine=hppa1.1-hp
+ cpu=hppa1.1
+ vendor=hp
;;
hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893)
# FIXME: really hppa2.0-hp
- basic_machine=hppa1.1-hp
+ cpu=hppa1.1
+ vendor=hp
;;
hp9k8[0-9][13679] | hp8[0-9][13679])
- basic_machine=hppa1.1-hp
+ cpu=hppa1.1
+ vendor=hp
;;
hp9k8[0-9][0-9] | hp8[0-9][0-9])
- basic_machine=hppa1.0-hp
- ;;
- hppaosf)
- basic_machine=hppa1.1-hp
- os=-osf
- ;;
- hppro)
- basic_machine=hppa1.1-hp
- os=-proelf
- ;;
- i370-ibm* | ibm*)
- basic_machine=i370-ibm
+ cpu=hppa1.0
+ vendor=hp
;;
i*86v32)
- basic_machine=`echo "$1" | sed -e 's/86.*/86-pc/'`
- os=-sysv32
+ cpu=`echo "$1" | sed -e 's/86.*/86/'`
+ vendor=pc
+ os=sysv32
;;
i*86v4*)
- basic_machine=`echo "$1" | sed -e 's/86.*/86-pc/'`
- os=-sysv4
+ cpu=`echo "$1" | sed -e 's/86.*/86/'`
+ vendor=pc
+ os=sysv4
;;
i*86v)
- basic_machine=`echo "$1" | sed -e 's/86.*/86-pc/'`
- os=-sysv
+ cpu=`echo "$1" | sed -e 's/86.*/86/'`
+ vendor=pc
+ os=sysv
;;
i*86sol2)
- basic_machine=`echo "$1" | sed -e 's/86.*/86-pc/'`
- os=-solaris2
+ cpu=`echo "$1" | sed -e 's/86.*/86/'`
+ vendor=pc
+ os=solaris2
;;
- i386mach)
- basic_machine=i386-mach
- os=-mach
- ;;
- vsta)
- basic_machine=i386-unknown
- os=-vsta
+ j90 | j90-cray)
+ cpu=j90
+ vendor=cray
+ os=${os:-unicos}
;;
iris | iris4d)
- basic_machine=mips-sgi
+ cpu=mips
+ vendor=sgi
case $os in
- -irix*)
+ irix*)
;;
*)
- os=-irix4
+ os=irix4
;;
esac
;;
- isi68 | isi)
- 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
- ;;
- m68knommu-*)
- basic_machine=m68k-`echo "$basic_machine" | sed 's/^[^-]*-//'`
- os=-linux
- ;;
- magnum | m3230)
- basic_machine=mips-mips
- os=-sysv
- ;;
- merlin)
- basic_machine=ns32k-utek
- os=-sysv
- ;;
- microblaze*)
- basic_machine=microblaze-xilinx
- ;;
- mingw64)
- basic_machine=x86_64-pc
- os=-mingw64
- ;;
- mingw32)
- basic_machine=i686-pc
- os=-mingw32
- ;;
- mingw32ce)
- basic_machine=arm-unknown
- os=-mingw32ce
- ;;
miniframe)
- basic_machine=m68000-convergent
- ;;
- *mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*)
- basic_machine=m68k-atari
- os=-mint
- ;;
- mips3*-*)
- basic_machine=`echo "$basic_machine" | sed -e 's/mips3/mips64/'`
- ;;
- mips3*)
- basic_machine=`echo "$basic_machine" | sed -e 's/mips3/mips64/'`-unknown
- ;;
- monitor)
- basic_machine=m68k-rom68k
- os=-coff
- ;;
- morphos)
- basic_machine=powerpc-unknown
- os=-morphos
- ;;
- moxiebox)
- basic_machine=moxie-unknown
- os=-moxiebox
- ;;
- msdos)
- basic_machine=i386-pc
- os=-msdos
- ;;
- ms1-*)
- basic_machine=`echo "$basic_machine" | sed -e 's/ms1-/mt-/'`
- ;;
- msys)
- basic_machine=i686-pc
- os=-msys
- ;;
- mvs)
- basic_machine=i370-ibm
- os=-mvs
- ;;
- nacl)
- basic_machine=le32-unknown
- os=-nacl
+ cpu=m68000
+ vendor=convergent
;;
- ncr3000)
- basic_machine=i486-ncr
- os=-sysv4
- ;;
- netbsd386)
- basic_machine=i386-unknown
- os=-netbsd
- ;;
- netwinder)
- basic_machine=armv4l-rebel
- os=-linux
- ;;
- news | news700 | news800 | news900)
- basic_machine=m68k-sony
- os=-newsos
- ;;
- news1000)
- basic_machine=m68030-sony
- os=-newsos
+ *mint | mint[0-9]* | *MiNT | *MiNT[0-9]*)
+ cpu=m68k
+ vendor=atari
+ os=mint
;;
news-3600 | risc-news)
- basic_machine=mips-sony
- os=-newsos
- ;;
- necv70)
- basic_machine=v70-nec
- os=-sysv
+ cpu=mips
+ vendor=sony
+ os=newsos
;;
next | m*-next)
- basic_machine=m68k-next
+ cpu=m68k
+ vendor=next
case $os in
- -nextstep* )
+ nextstep* )
;;
- -ns2*)
- os=-nextstep2
+ ns2*)
+ os=nextstep2
;;
*)
- os=-nextstep3
+ os=nextstep3
;;
esac
;;
- nh3000)
- basic_machine=m68k-harris
- os=-cxux
- ;;
- nh[45]000)
- basic_machine=m88k-harris
- os=-cxux
- ;;
- nindy960)
- basic_machine=i960-intel
- os=-nindy
- ;;
- mon960)
- basic_machine=i960-intel
- os=-mon960
- ;;
- nonstopux)
- basic_machine=mips-compaq
- os=-nonstopux
- ;;
np1)
- basic_machine=np1-gould
- ;;
- neo-tandem)
- basic_machine=neo-tandem
- ;;
- nse-tandem)
- basic_machine=nse-tandem
- ;;
- nsr-tandem)
- basic_machine=nsr-tandem
- ;;
- nsv-tandem)
- basic_machine=nsv-tandem
- ;;
- nsx-tandem)
- basic_machine=nsx-tandem
+ cpu=np1
+ vendor=gould
;;
op50n-* | op60c-*)
- basic_machine=hppa1.1-oki
- os=-proelf
- ;;
- openrisc | openrisc-*)
- basic_machine=or32-unknown
- ;;
- os400)
- basic_machine=powerpc-ibm
- os=-os400
- ;;
- OSE68000 | ose68000)
- basic_machine=m68000-ericsson
- os=-ose
- ;;
- os68k)
- basic_machine=m68k-none
- os=-os68k
+ cpu=hppa1.1
+ vendor=oki
+ os=proelf
;;
pa-hitachi)
- basic_machine=hppa1.1-hitachi
- os=-hiuxwe2
- ;;
- paragon)
- basic_machine=i860-intel
- os=-osf
- ;;
- parisc)
- basic_machine=hppa-unknown
- os=-linux
- ;;
- parisc-*)
- basic_machine=hppa-`echo "$basic_machine" | sed 's/^[^-]*-//'`
- os=-linux
+ cpu=hppa1.1
+ vendor=hitachi
+ os=hiuxwe2
;;
pbd)
- basic_machine=sparc-tti
+ cpu=sparc
+ vendor=tti
;;
pbb)
- basic_machine=m68k-tti
- ;;
- pc532 | pc532-*)
- basic_machine=ns32k-pc532
- ;;
- pc98)
- basic_machine=i386-pc
- ;;
- pc98-*)
- basic_machine=i386-`echo "$basic_machine" | sed 's/^[^-]*-//'`
- ;;
- pentium | p5 | k5 | k6 | nexgen | viac3)
- basic_machine=i586-pc
- ;;
- pentiumpro | p6 | 6x86 | athlon | athlon_*)
- basic_machine=i686-pc
- ;;
- pentiumii | pentium2 | pentiumiii | pentium3)
- basic_machine=i686-pc
- ;;
- pentium4)
- basic_machine=i786-pc
- ;;
- pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*)
- basic_machine=i586-`echo "$basic_machine" | sed 's/^[^-]*-//'`
- ;;
- pentiumpro-* | p6-* | 6x86-* | athlon-*)
- basic_machine=i686-`echo "$basic_machine" | sed 's/^[^-]*-//'`
+ cpu=m68k
+ vendor=tti
;;
- pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*)
- basic_machine=i686-`echo "$basic_machine" | sed 's/^[^-]*-//'`
- ;;
- pentium4-*)
- basic_machine=i786-`echo "$basic_machine" | sed 's/^[^-]*-//'`
+ pc532)
+ cpu=ns32k
+ vendor=pc532
;;
pn)
- basic_machine=pn-gould
- ;;
- power) basic_machine=power-ibm
- ;;
- ppc | ppcbe) basic_machine=powerpc-unknown
- ;;
- ppc-* | ppcbe-*)
- basic_machine=powerpc-`echo "$basic_machine" | sed 's/^[^-]*-//'`
+ cpu=pn
+ vendor=gould
;;
- ppcle | powerpclittle)
- basic_machine=powerpcle-unknown
+ power)
+ cpu=power
+ vendor=ibm
;;
- ppcle-* | powerpclittle-*)
- basic_machine=powerpcle-`echo "$basic_machine" | sed 's/^[^-]*-//'`
- ;;
- ppc64) basic_machine=powerpc64-unknown
+ ps2)
+ cpu=i386
+ vendor=ibm
;;
- ppc64-*) basic_machine=powerpc64-`echo "$basic_machine" | sed 's/^[^-]*-//'`
+ rm[46]00)
+ cpu=mips
+ vendor=siemens
;;
- ppc64le | powerpc64little)
- basic_machine=powerpc64le-unknown
+ rtpc | rtpc-*)
+ cpu=romp
+ vendor=ibm
;;
- ppc64le-* | powerpc64little-*)
- basic_machine=powerpc64le-`echo "$basic_machine" | sed 's/^[^-]*-//'`
+ sde)
+ cpu=mipsisa32
+ vendor=sde
+ os=${os:-elf}
;;
- ps2)
- basic_machine=i386-ibm
+ simso-wrs)
+ cpu=sparclite
+ vendor=wrs
+ os=vxworks
;;
- pw32)
- basic_machine=i586-unknown
- os=-pw32
+ tower | tower-32)
+ cpu=m68k
+ vendor=ncr
;;
- rdos | rdos64)
- basic_machine=x86_64-pc
- os=-rdos
+ vpp*|vx|vx-*)
+ cpu=f301
+ vendor=fujitsu
;;
- rdos32)
- basic_machine=i386-pc
- os=-rdos
+ w65)
+ cpu=w65
+ vendor=wdc
;;
- rom68k)
- basic_machine=m68k-rom68k
- os=-coff
+ w89k-*)
+ cpu=hppa1.1
+ vendor=winbond
+ os=proelf
;;
- rm[46]00)
- basic_machine=mips-siemens
+ none)
+ cpu=none
+ vendor=none
;;
- rtpc | rtpc-*)
- basic_machine=romp-ibm
+ leon|leon[3-9])
+ cpu=sparc
+ vendor=$basic_machine
;;
- s390 | s390-*)
- basic_machine=s390-ibm
+ leon-*|leon[3-9]-*)
+ cpu=sparc
+ vendor=`echo "$basic_machine" | sed 's/-.*//'`
;;
- s390x | s390x-*)
- basic_machine=s390x-ibm
+
+ *-*)
+ IFS="-" read cpu vendor <<EOF
+$basic_machine
+EOF
;;
- sa29200)
- basic_machine=a29k-amd
- os=-udi
+ # We use `pc' rather than `unknown'
+ # because (1) that's what they normally are, and
+ # (2) the word "unknown" tends to confuse beginning users.
+ i*86 | x86_64)
+ cpu=$basic_machine
+ vendor=pc
;;
- sb1)
- basic_machine=mipsisa64sb1-unknown
+ # These rules are duplicated from below for sake of the special case above;
+ # i.e. things that normalized to x86 arches should also default to "pc"
+ pc98)
+ cpu=i386
+ vendor=pc
;;
- sb1el)
- basic_machine=mipsisa64sb1el-unknown
+ x64 | amd64)
+ cpu=x86_64
+ vendor=pc
;;
- sde)
- basic_machine=mipsisa32-sde
- os=-elf
+ # Recognize the basic CPU types without company name.
+ *)
+ cpu=$basic_machine
+ vendor=unknown
;;
- sei)
- basic_machine=mips-sei
- os=-seiux
+esac
+
+unset -v basic_machine
+
+# Decode basic machines in the full and proper CPU-Company form.
+case $cpu-$vendor in
+ # Here we handle the default manufacturer of certain CPU types in canonical form. It is in
+ # some cases the only manufacturer, in others, it is the most popular.
+ craynv-unknown)
+ vendor=cray
+ os=${os:-unicosmp}
;;
- sequent)
- basic_machine=i386-sequent
+ c90-unknown | c90-cray)
+ vendor=cray
+ os=${os:-unicos}
;;
- sh5el)
- basic_machine=sh5le-unknown
+ fx80-unknown)
+ vendor=alliant
;;
- simso-wrs)
- basic_machine=sparclite-wrs
- os=-vxworks
+ romp-unknown)
+ vendor=ibm
;;
- sps7)
- basic_machine=m68k-bull
- os=-sysv2
+ mmix-unknown)
+ vendor=knuth
;;
- spur)
- basic_machine=spur-unknown
+ microblaze-unknown | microblazeel-unknown)
+ vendor=xilinx
;;
- st2000)
- basic_machine=m68k-tandem
+ rs6000-unknown)
+ vendor=ibm
;;
- stratus)
- basic_machine=i860-stratus
- os=-sysv4
+ vax-unknown)
+ vendor=dec
;;
- strongarm-* | thumb-*)
- basic_machine=arm-`echo "$basic_machine" | sed 's/^[^-]*-//'`
+ pdp11-unknown)
+ vendor=dec
;;
- sun2)
- basic_machine=m68000-sun
+ we32k-unknown)
+ vendor=att
;;
- sun2os3)
- basic_machine=m68000-sun
- os=-sunos3
+ cydra-unknown)
+ vendor=cydrome
;;
- sun2os4)
- basic_machine=m68000-sun
- os=-sunos4
+ i370-ibm*)
+ vendor=ibm
;;
- sun3os3)
- basic_machine=m68k-sun
- os=-sunos3
+ orion-unknown)
+ vendor=highlevel
;;
- sun3os4)
- basic_machine=m68k-sun
- os=-sunos4
+ xps-unknown | xps100-unknown)
+ cpu=xps100
+ vendor=honeywell
;;
- sun4os3)
- basic_machine=sparc-sun
- os=-sunos3
+
+ # Here we normalize CPU types with a missing or matching vendor
+ dpx20-unknown | dpx20-bull)
+ cpu=rs6000
+ vendor=bull
+ os=${os:-bosx}
;;
- sun4os4)
- basic_machine=sparc-sun
- os=-sunos4
+
+ # Here we normalize CPU types irrespective of the vendor
+ amd64-*)
+ cpu=x86_64
;;
- sun4sol2)
- basic_machine=sparc-sun
- os=-solaris2
+ blackfin-*)
+ cpu=bfin
+ os=linux
;;
- sun3 | sun3-*)
- basic_machine=m68k-sun
+ c54x-*)
+ cpu=tic54x
;;
- sun4)
- basic_machine=sparc-sun
+ c55x-*)
+ cpu=tic55x
;;
- sun386 | sun386i | roadrunner)
- basic_machine=i386-sun
+ c6x-*)
+ cpu=tic6x
;;
- sv1)
- basic_machine=sv1-cray
- os=-unicos
+ e500v[12]-*)
+ cpu=powerpc
+ os=$os"spe"
;;
- symmetry)
- basic_machine=i386-sequent
- os=-dynix
+ mips3*-*)
+ cpu=mips64
;;
- t3e)
- basic_machine=alphaev5-cray
- os=-unicos
+ ms1-*)
+ cpu=mt
;;
- t90)
- basic_machine=t90-cray
- os=-unicos
+ m68knommu-*)
+ cpu=m68k
+ os=linux
;;
- tile*)
- basic_machine=$basic_machine-unknown
- os=-linux-gnu
+ m9s12z-* | m68hcs12z-* | hcs12z-* | s12z-*)
+ cpu=s12z
;;
- tx39)
- basic_machine=mipstx39-unknown
+ openrisc-*)
+ cpu=or32
;;
- tx39el)
- basic_machine=mipstx39el-unknown
+ parisc-*)
+ cpu=hppa
+ os=linux
;;
- toad1)
- basic_machine=pdp10-xkl
- os=-tops20
+ pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*)
+ cpu=i586
;;
- tower | tower-32)
- basic_machine=m68k-ncr
+ pentiumpro-* | p6-* | 6x86-* | athlon-* | athalon_*-*)
+ cpu=i686
;;
- tpf)
- basic_machine=s390x-ibm
- os=-tpf
+ pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*)
+ cpu=i686
;;
- udi29k)
- basic_machine=a29k-amd
- os=-udi
+ pentium4-*)
+ cpu=i786
;;
- ultra3)
- basic_machine=a29k-nyu
- os=-sym1
+ pc98-*)
+ cpu=i386
;;
- v810 | necv810)
- basic_machine=v810-nec
- os=-none
+ ppc-* | ppcbe-*)
+ cpu=powerpc
;;
- vaxv)
- basic_machine=vax-dec
- os=-sysv
+ ppcle-* | powerpclittle-*)
+ cpu=powerpcle
;;
- vms)
- basic_machine=vax-dec
- os=-vms
+ ppc64-*)
+ cpu=powerpc64
;;
- vpp*|vx|vx-*)
- basic_machine=f301-fujitsu
+ ppc64le-* | powerpc64little-*)
+ cpu=powerpc64le
;;
- vxworks960)
- basic_machine=i960-wrs
- os=-vxworks
+ sb1-*)
+ cpu=mipsisa64sb1
;;
- vxworks68)
- basic_machine=m68k-wrs
- os=-vxworks
+ sb1el-*)
+ cpu=mipsisa64sb1el
;;
- vxworks29k)
- basic_machine=a29k-wrs
- os=-vxworks
+ sh5e[lb]-*)
+ cpu=`echo "$cpu" | sed 's/^\(sh.\)e\(.\)$/\1\2e/'`
;;
- w65*)
- basic_machine=w65-wdc
- os=-none
+ spur-*)
+ cpu=spur
;;
- w89k-*)
- basic_machine=hppa1.1-winbond
- os=-proelf
+ strongarm-* | thumb-*)
+ cpu=arm
;;
- x64)
- basic_machine=x86_64-pc
+ tx39-*)
+ cpu=mipstx39
;;
- xbox)
- basic_machine=i686-pc
- os=-mingw32
+ tx39el-*)
+ cpu=mipstx39el
;;
- xps | xps100)
- basic_machine=xps100-honeywell
+ x64-*)
+ cpu=x86_64
;;
xscale-* | xscalee[bl]-*)
- basic_machine=`echo "$basic_machine" | sed 's/^xscale/arm/'`
- ;;
- ymp)
- basic_machine=ymp-cray
- os=-unicos
- ;;
- none)
- basic_machine=none-none
- os=-none
+ cpu=`echo "$cpu" | sed 's/^xscale/arm/'`
;;
-# Here we handle the default manufacturer of certain CPU types. It is in
-# some cases the only manufacturer, in others, it is the most popular.
- w89k)
- basic_machine=hppa1.1-winbond
+ # Recognize the canonical CPU Types that limit and/or modify the
+ # company names they are paired with.
+ cr16-*)
+ os=${os:-elf}
;;
- op50n)
- basic_machine=hppa1.1-oki
- ;;
- op60c)
- basic_machine=hppa1.1-oki
- ;;
- romp)
- basic_machine=romp-ibm
+ crisv32-* | etraxfs*-*)
+ cpu=crisv32
+ vendor=axis
;;
- mmix)
- basic_machine=mmix-knuth
+ cris-* | etrax*-*)
+ cpu=cris
+ vendor=axis
;;
- rs6000)
- basic_machine=rs6000-ibm
+ crx-*)
+ os=${os:-elf}
;;
- vax)
- basic_machine=vax-dec
- ;;
- pdp11)
- basic_machine=pdp11-dec
- ;;
- we32k)
- basic_machine=we32k-att
+ neo-tandem)
+ cpu=neo
+ vendor=tandem
;;
- sh[1234] | sh[24]a | sh[24]aeb | sh[34]eb | sh[1234]le | sh[23]ele)
- basic_machine=sh-unknown
+ nse-tandem)
+ cpu=nse
+ vendor=tandem
;;
- cydra)
- basic_machine=cydra-cydrome
+ nsr-tandem)
+ cpu=nsr
+ vendor=tandem
;;
- orion)
- basic_machine=orion-highlevel
+ nsv-tandem)
+ cpu=nsv
+ vendor=tandem
;;
- orion105)
- basic_machine=clipper-highlevel
+ nsx-tandem)
+ cpu=nsx
+ vendor=tandem
;;
- mac | mpw | mac-mpw)
- basic_machine=m68k-apple
+ s390-*)
+ cpu=s390
+ vendor=ibm
;;
- pmac | pmac-mpw)
- basic_machine=powerpc-apple
+ s390x-*)
+ cpu=s390x
+ vendor=ibm
;;
- *-unknown)
- # Make sure to match an already-canonicalized machine name.
+ tile*-*)
+ os=${os:-linux-gnu}
;;
+
*)
- echo Invalid configuration \`"$1"\': machine \`"$basic_machine"\' not recognized 1>&2
- exit 1
+ # Recognize the canonical CPU types that are allowed with any
+ # company name.
+ case $cpu in
+ 1750a | 580 \
+ | a29k \
+ | aarch64 | aarch64_be \
+ | abacus \
+ | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] \
+ | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] \
+ | alphapca5[67] | alpha64pca5[67] \
+ | am33_2.0 \
+ | amdgcn \
+ | arc | arceb \
+ | arm | arm[lb]e | arme[lb] | armv* \
+ | avr | avr32 \
+ | asmjs \
+ | ba \
+ | be32 | be64 \
+ | bfin | bs2000 \
+ | c[123]* | c30 | [cjt]90 | c4x \
+ | c8051 | clipper | craynv | csky | cydra \
+ | d10v | d30v | dlx | dsp16xx \
+ | e2k | elxsi | epiphany \
+ | f30[01] | f700 | fido | fr30 | frv | ft32 | fx80 \
+ | h8300 | h8500 \
+ | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
+ | hexagon \
+ | i370 | i*86 | i860 | i960 | ia16 | ia64 \
+ | ip2k | iq2000 \
+ | k1om \
+ | le32 | le64 \
+ | lm32 \
+ | m32c | m32r | m32rle \
+ | m5200 | m68000 | m680[012346]0 | m68360 | m683?2 | m68k | v70 | w65 \
+ | m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x | nvptx | picochip \
+ | m88110 | m88k | maxq | mb | mcore | mep | metag \
+ | microblaze | microblazeel \
+ | mips | mipsbe | mipseb | mipsel | mipsle \
+ | mips16 \
+ | mips64 | mips64el \
+ | mips64octeon | mips64octeonel \
+ | mips64orion | mips64orionel \
+ | mips64r5900 | mips64r5900el \
+ | mips64vr | mips64vrel \
+ | mips64vr4100 | mips64vr4100el \
+ | mips64vr4300 | mips64vr4300el \
+ | mips64vr5000 | mips64vr5000el \
+ | mips64vr5900 | mips64vr5900el \
+ | mipsisa32 | mipsisa32el \
+ | mipsisa32r2 | mipsisa32r2el \
+ | mipsisa32r6 | mipsisa32r6el \
+ | mipsisa64 | mipsisa64el \
+ | mipsisa64r2 | mipsisa64r2el \
+ | mipsisa64r6 | mipsisa64r6el \
+ | mipsisa64sb1 | mipsisa64sb1el \
+ | mipsisa64sr71k | mipsisa64sr71kel \
+ | mipsr5900 | mipsr5900el \
+ | mipstx39 | mipstx39el \
+ | mmix \
+ | mn10200 | mn10300 \
+ | moxie \
+ | mt \
+ | msp430 \
+ | nds32 | nds32le | nds32be \
+ | nfp \
+ | nios | nios2 | nios2eb | nios2el \
+ | none | np1 | ns16k | ns32k \
+ | open8 \
+ | or1k* \
+ | or32 \
+ | orion \
+ | pdp10 | pdp11 | pj | pjl | pn | power \
+ | powerpc | powerpc64 | powerpc64le | powerpcle | powerpcspe \
+ | pru \
+ | pyramid \
+ | riscv | riscv32 | riscv64 \
+ | rl78 | romp | rs6000 | rx \
+ | score \
+ | sh | sh[1234] | sh[24]a | sh[24]ae[lb] | sh[23]e | she[lb] | sh[lb]e \
+ | sh[1234]e[lb] | sh[12345][lb]e | sh[23]ele | sh64 | sh64le \
+ | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet \
+ | sparclite \
+ | sparcv8 | sparcv9 | sparcv9b | sparcv9v | sv1 | sx* \
+ | spu \
+ | tahoe \
+ | tic30 | tic4x | tic54x | tic55x | tic6x | tic80 \
+ | tron \
+ | ubicom32 \
+ | v850 | v850e | v850e1 | v850es | v850e2 | v850e2v3 \
+ | vax \
+ | visium \
+ | wasm32 \
+ | we32k \
+ | x86 | x86_64 | xc16x | xgate | xps100 \
+ | xstormy16 | xtensa* \
+ | ymp \
+ | z8k | z80)
+ ;;
+
+ *)
+ echo Invalid configuration \`"$1"\': machine \`"$cpu-$vendor"\' not recognized 1>&2
+ exit 1
+ ;;
+ esac
;;
esac
# Here we canonicalize certain aliases for manufacturers.
-case $basic_machine in
- *-digital*)
- basic_machine=`echo "$basic_machine" | sed 's/digital.*/dec/'`
+case $vendor in
+ digital*)
+ vendor=dec
;;
- *-commodore*)
- basic_machine=`echo "$basic_machine" | sed 's/commodore.*/cbm/'`
+ commodore*)
+ vendor=cbm
;;
*)
;;
@@ -1334,199 +1271,245 @@ esac
# Decode manufacturer-specific aliases for certain operating systems.
-if [ x"$os" != x"" ]
+if [ x$os != x ]
then
case $os in
# First match some system type aliases that might get confused
# with valid system types.
- # -solaris* is a basic system type, with this one exception.
- -auroraux)
- os=-auroraux
+ # solaris* is a basic system type, with this one exception.
+ auroraux)
+ os=auroraux
;;
- -solaris1 | -solaris1.*)
+ bluegene*)
+ os=cnk
+ ;;
+ solaris1 | solaris1.*)
os=`echo $os | sed -e 's|solaris1|sunos4|'`
;;
- -solaris)
- os=-solaris2
+ solaris)
+ os=solaris2
;;
- -unixware*)
- os=-sysv4.2uw
+ unixware*)
+ os=sysv4.2uw
;;
- -gnu/linux*)
+ gnu/linux*)
os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'`
;;
# es1800 is here to avoid being matched by es* (a different OS)
- -es1800*)
- os=-ose
+ es1800*)
+ os=ose
+ ;;
+ # Some version numbers need modification
+ chorusos*)
+ os=chorusos
+ ;;
+ isc)
+ os=isc2.2
+ ;;
+ sco6)
+ os=sco5v6
+ ;;
+ sco5)
+ os=sco3.2v5
+ ;;
+ sco4)
+ os=sco3.2v4
+ ;;
+ sco3.2.[4-9]*)
+ os=`echo $os | sed -e 's/sco3.2./sco3.2v/'`
+ ;;
+ sco3.2v[4-9]* | sco5v6*)
+ # Don't forget version if it is 3.2v4 or newer.
+ ;;
+ scout)
+ # Don't match below
+ ;;
+ sco*)
+ os=sco3.2v2
+ ;;
+ psos*)
+ os=psos
;;
# Now accept the basic system types.
# The portable systems comes first.
# Each alternative MUST end in a * to match a version number.
- # -sysv* is not here because it comes later, after sysvr4.
- -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \
- | -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\
- | -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \
- | -sym* | -kopensolaris* | -plan9* \
- | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \
- | -aos* | -aros* | -cloudabi* | -sortix* \
- | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
- | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
- | -hiux* | -knetbsd* | -mirbsd* | -netbsd* \
- | -bitrig* | -openbsd* | -solidbsd* | -libertybsd* \
- | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \
- | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
- | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
- | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* | -hcos* \
- | -chorusos* | -chorusrdb* | -cegcc* | -glidix* \
- | -cygwin* | -msys* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
- | -midipix* | -mingw32* | -mingw64* | -linux-gnu* | -linux-android* \
- | -linux-newlib* | -linux-musl* | -linux-uclibc* \
- | -uxpv* | -beos* | -mpeix* | -udk* | -moxiebox* \
- | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* \
- | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
- | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \
- | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \
- | -morphos* | -superux* | -rtmk* | -windiss* \
- | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \
- | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es* \
- | -onefs* | -tirtos* | -phoenix* | -fuchsia* | -redox* | -bme* \
- | -midnightbsd*)
+ # sysv* is not here because it comes later, after sysvr4.
+ gnu* | bsd* | mach* | minix* | genix* | ultrix* | irix* \
+ | *vms* | esix* | aix* | cnk* | sunos | sunos[34]*\
+ | hpux* | unos* | osf* | luna* | dgux* | auroraux* | solaris* \
+ | sym* | kopensolaris* | plan9* \
+ | amigaos* | amigados* | msdos* | newsos* | unicos* | aof* \
+ | aos* | aros* | cloudabi* | sortix* \
+ | nindy* | vxsim* | vxworks* | ebmon* | hms* | mvs* \
+ | clix* | riscos* | uniplus* | iris* | isc* | rtu* | xenix* \
+ | knetbsd* | mirbsd* | netbsd* \
+ | bitrig* | openbsd* | solidbsd* | libertybsd* \
+ | ekkobsd* | kfreebsd* | freebsd* | riscix* | lynxos* \
+ | bosx* | nextstep* | cxux* | aout* | elf* | oabi* \
+ | ptx* | coff* | ecoff* | winnt* | domain* | vsta* \
+ | udi* | eabi* | lites* | ieee* | go32* | aux* | hcos* \
+ | chorusrdb* | cegcc* | glidix* \
+ | cygwin* | msys* | pe* | moss* | proelf* | rtems* \
+ | midipix* | mingw32* | mingw64* | linux-gnu* | linux-android* \
+ | linux-newlib* | linux-musl* | linux-uclibc* \
+ | uxpv* | beos* | mpeix* | udk* | moxiebox* \
+ | interix* | uwin* | mks* | rhapsody* | darwin* \
+ | openstep* | oskit* | conix* | pw32* | nonstopux* \
+ | storm-chaos* | tops10* | tenex* | tops20* | its* \
+ | os2* | vos* | palmos* | uclinux* | nucleus* \
+ | morphos* | superux* | rtmk* | windiss* \
+ | powermax* | dnix* | nx6 | nx7 | sei* | dragonfly* \
+ | skyos* | haiku* | rdos* | toppers* | drops* | es* \
+ | onefs* | tirtos* | phoenix* | fuchsia* | redox* | bme* \
+ | midnightbsd* | amdhsa* | unleashed*)
# Remember, each alternative MUST END IN *, to match a version number.
;;
- -qnx*)
- case $basic_machine in
- x86-* | i*86-*)
+ qnx*)
+ case $cpu in
+ x86 | i*86)
;;
*)
- os=-nto$os
+ os=nto-$os
;;
esac
;;
- -nto-qnx*)
+ hiux*)
+ os=hiuxwe2
+ ;;
+ nto-qnx*)
;;
- -nto*)
+ nto*)
os=`echo $os | sed -e 's|nto|nto-qnx|'`
;;
- -sim | -xray | -os68k* | -v88r* \
- | -windows* | -osx | -abug | -netware* | -os9* \
- | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*)
+ sim | xray | os68k* | v88r* \
+ | windows* | osx | abug | netware* | os9* \
+ | macos* | mpw* | magic* | mmixware* | mon960* | lnews*)
+ ;;
+ linux-dietlibc)
+ os=linux-dietlibc
+ ;;
+ linux*)
+ os=`echo $os | sed -e 's|linux|linux-gnu|'`
+ ;;
+ lynx*178)
+ os=lynxos178
;;
- -mac*)
+ lynx*5)
+ os=lynxos5
+ ;;
+ lynx*)
+ os=lynxos
+ ;;
+ mac*)
os=`echo "$os" | sed -e 's|mac|macos|'`
;;
- -linux-dietlibc)
- os=-linux-dietlibc
+ opened*)
+ os=openedition
;;
- -linux*)
- os=`echo $os | sed -e 's|linux|linux-gnu|'`
+ os400*)
+ os=os400
;;
- -sunos5*)
+ sunos5*)
os=`echo "$os" | sed -e 's|sunos5|solaris2|'`
;;
- -sunos6*)
+ sunos6*)
os=`echo "$os" | sed -e 's|sunos6|solaris3|'`
;;
- -opened*)
- os=-openedition
- ;;
- -os400*)
- os=-os400
+ wince*)
+ os=wince
;;
- -wince*)
- os=-wince
+ utek*)
+ os=bsd
;;
- -utek*)
- os=-bsd
+ dynix*)
+ os=bsd
;;
- -dynix*)
- os=-bsd
+ acis*)
+ os=aos
;;
- -acis*)
- os=-aos
+ atheos*)
+ os=atheos
;;
- -atheos*)
- os=-atheos
+ syllable*)
+ os=syllable
;;
- -syllable*)
- os=-syllable
- ;;
- -386bsd)
- os=-bsd
+ 386bsd)
+ os=bsd
;;
- -ctix* | -uts*)
- os=-sysv
+ ctix* | uts*)
+ os=sysv
;;
- -nova*)
- os=-rtmk-nova
+ nova*)
+ os=rtmk-nova
;;
- -ns2)
- os=-nextstep2
+ ns2)
+ os=nextstep2
;;
- -nsk*)
- os=-nsk
+ nsk*)
+ os=nsk
;;
# Preserve the version number of sinix5.
- -sinix5.*)
+ sinix5.*)
os=`echo $os | sed -e 's|sinix|sysv|'`
;;
- -sinix*)
- os=-sysv4
+ sinix*)
+ os=sysv4
;;
- -tpf*)
- os=-tpf
+ tpf*)
+ os=tpf
;;
- -triton*)
- os=-sysv3
+ triton*)
+ os=sysv3
;;
- -oss*)
- os=-sysv3
+ oss*)
+ os=sysv3
;;
- -svr4*)
- os=-sysv4
+ svr4*)
+ os=sysv4
;;
- -svr3)
- os=-sysv3
+ svr3)
+ os=sysv3
;;
- -sysvr4)
- os=-sysv4
+ sysvr4)
+ os=sysv4
;;
- # This must come after -sysvr4.
- -sysv*)
+ # This must come after sysvr4.
+ sysv*)
;;
- -ose*)
- os=-ose
+ ose*)
+ os=ose
;;
- -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
- os=-mint
+ *mint | mint[0-9]* | *MiNT | MiNT[0-9]*)
+ os=mint
;;
- -zvmoe)
- os=-zvmoe
+ zvmoe)
+ os=zvmoe
;;
- -dicos*)
- os=-dicos
+ dicos*)
+ os=dicos
;;
- -pikeos*)
+ pikeos*)
# Until real need of OS specific support for
# particular features comes up, bare metal
# configurations are quite functional.
- case $basic_machine in
+ case $cpu in
arm*)
- os=-eabi
+ os=eabi
;;
*)
- os=-elf
+ os=elf
;;
esac
;;
- -nacl*)
+ nacl*)
;;
- -ios)
+ ios)
;;
- -none)
+ none)
+ ;;
+ *-eabi)
;;
*)
- # Get rid of the `-' at the beginning of $os.
- os=`echo $os | sed 's/[^-]*-//'`
echo Invalid configuration \`"$1"\': system \`"$os"\' not recognized 1>&2
exit 1
;;
@@ -1543,254 +1526,261 @@ else
# will signal an error saying that MANUFACTURER isn't an operating
# system, and we'll never get to this point.
-case $basic_machine in
+case $cpu-$vendor in
score-*)
- os=-elf
+ os=elf
;;
spu-*)
- os=-elf
+ os=elf
;;
*-acorn)
- os=-riscix1.2
+ os=riscix1.2
;;
arm*-rebel)
- os=-linux
+ os=linux
;;
arm*-semi)
- os=-aout
+ os=aout
;;
c4x-* | tic4x-*)
- os=-coff
+ os=coff
;;
c8051-*)
- os=-elf
+ os=elf
+ ;;
+ clipper-intergraph)
+ os=clix
;;
hexagon-*)
- os=-elf
+ os=elf
;;
tic54x-*)
- os=-coff
+ os=coff
;;
tic55x-*)
- os=-coff
+ os=coff
;;
tic6x-*)
- os=-coff
+ os=coff
;;
# This must come before the *-dec entry.
pdp10-*)
- os=-tops20
+ os=tops20
;;
pdp11-*)
- os=-none
+ os=none
;;
*-dec | vax-*)
- os=-ultrix4.2
+ os=ultrix4.2
;;
m68*-apollo)
- os=-domain
+ os=domain
;;
i386-sun)
- os=-sunos4.0.2
+ os=sunos4.0.2
;;
m68000-sun)
- os=-sunos3
+ os=sunos3
;;
m68*-cisco)
- os=-aout
+ os=aout
;;
mep-*)
- os=-elf
+ os=elf
;;
mips*-cisco)
- os=-elf
+ os=elf
;;
mips*-*)
- os=-elf
+ os=elf
;;
or32-*)
- os=-coff
+ os=coff
;;
*-tti) # must be before sparc entry or we get the wrong os.
- os=-sysv3
+ os=sysv3
;;
sparc-* | *-sun)
- os=-sunos4.1.1
+ os=sunos4.1.1
;;
pru-*)
- os=-elf
+ os=elf
;;
*-be)
- os=-beos
+ os=beos
;;
*-ibm)
- os=-aix
+ os=aix
;;
*-knuth)
- os=-mmixware
+ os=mmixware
;;
*-wec)
- os=-proelf
+ os=proelf
;;
*-winbond)
- os=-proelf
+ os=proelf
;;
*-oki)
- os=-proelf
+ os=proelf
;;
*-hp)
- os=-hpux
+ os=hpux
;;
*-hitachi)
- os=-hiux
+ os=hiux
;;
i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent)
- os=-sysv
+ os=sysv
;;
*-cbm)
- os=-amigaos
+ os=amigaos
;;
*-dg)
- os=-dgux
+ os=dgux
;;
*-dolphin)
- os=-sysv3
+ os=sysv3
;;
m68k-ccur)
- os=-rtu
+ os=rtu
;;
m88k-omron*)
- os=-luna
+ os=luna
;;
*-next)
- os=-nextstep
+ os=nextstep
;;
*-sequent)
- os=-ptx
+ os=ptx
;;
*-crds)
- os=-unos
+ os=unos
;;
*-ns)
- os=-genix
+ os=genix
;;
i370-*)
- os=-mvs
+ os=mvs
;;
*-gould)
- os=-sysv
+ os=sysv
;;
*-highlevel)
- os=-bsd
+ os=bsd
;;
*-encore)
- os=-bsd
+ os=bsd
;;
*-sgi)
- os=-irix
+ os=irix
;;
*-siemens)
- os=-sysv4
+ os=sysv4
;;
*-masscomp)
- os=-rtu
+ os=rtu
;;
f30[01]-fujitsu | f700-fujitsu)
- os=-uxpv
+ os=uxpv
;;
*-rom68k)
- os=-coff
+ os=coff
;;
*-*bug)
- os=-coff
+ os=coff
;;
*-apple)
- os=-macos
+ os=macos
;;
*-atari*)
- os=-mint
+ os=mint
+ ;;
+ *-wrs)
+ os=vxworks
;;
*)
- os=-none
+ os=none
;;
esac
fi
# Here we handle the case where we know the os, and the CPU type, but not the
# manufacturer. We pick the logical manufacturer.
-vendor=unknown
-case $basic_machine in
- *-unknown)
+case $vendor in
+ unknown)
case $os in
- -riscix*)
+ riscix*)
vendor=acorn
;;
- -sunos*)
+ sunos*)
vendor=sun
;;
- -cnk*|-aix*)
+ cnk*|-aix*)
vendor=ibm
;;
- -beos*)
+ beos*)
vendor=be
;;
- -hpux*)
+ hpux*)
vendor=hp
;;
- -mpeix*)
+ mpeix*)
vendor=hp
;;
- -hiux*)
+ hiux*)
vendor=hitachi
;;
- -unos*)
+ unos*)
vendor=crds
;;
- -dgux*)
+ dgux*)
vendor=dg
;;
- -luna*)
+ luna*)
vendor=omron
;;
- -genix*)
+ genix*)
vendor=ns
;;
- -mvs* | -opened*)
+ clix*)
+ vendor=intergraph
+ ;;
+ mvs* | opened*)
vendor=ibm
;;
- -os400*)
+ os400*)
vendor=ibm
;;
- -ptx*)
+ ptx*)
vendor=sequent
;;
- -tpf*)
+ tpf*)
vendor=ibm
;;
- -vxsim* | -vxworks* | -windiss*)
+ vxsim* | vxworks* | windiss*)
vendor=wrs
;;
- -aux*)
+ aux*)
vendor=apple
;;
- -hms*)
+ hms*)
vendor=hitachi
;;
- -mpw* | -macos*)
+ mpw* | macos*)
vendor=apple
;;
- -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
+ *mint | mint[0-9]* | *MiNT | MiNT[0-9]*)
vendor=atari
;;
- -vos*)
+ vos*)
vendor=stratus
;;
esac
- basic_machine=`echo "$basic_machine" | sed "s/unknown/$vendor/"`
;;
esac
-echo "$basic_machine$os"
+echo "$cpu-$vendor-$os"
exit
# Local variables:
diff --git a/build-aux/gendocs.sh b/build-aux/gendocs.sh
index 9d418b9..91c058d 100755
--- a/build-aux/gendocs.sh
+++ b/build-aux/gendocs.sh
@@ -59,6 +59,7 @@ 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"
+default_htmlarg=true
infoarg=--no-split
generate_ascii=true
generate_html=true
@@ -163,7 +164,7 @@ while test $# -gt 0; do
--common) shift; commonarg=$1;;
--docbook) docbook=yes;;
--email) shift; EMAIL=$1;;
- --html) shift; htmlarg=$1;;
+ --html) shift; default_htmlarg=false; htmlarg=$1;;
--info) shift; infoarg=$1;;
--no-ascii) generate_ascii=false;;
--no-html) generate_ascii=false;;
@@ -199,6 +200,11 @@ commonarg=" $dirargs $commonarg"
# For most of the following, the base name is just $PACKAGE
base=$PACKAGE
+if $default_htmlarg && test -n "$use_texi2html"; then
+ # The legacy texi2html doesn't support TOP_NODE_UP_URL
+ htmlarg="--css-ref=/software/gnulib/manual.css"
+fi
+
if test -n "$srcfile"; then
# but here, we use the basename of $srcfile
base=`basename "$srcfile"`
diff --git a/build-aux/gnupload b/build-aux/gnupload
index c3545b3..8f05700 100755
--- a/build-aux/gnupload
+++ b/build-aux/gnupload
@@ -1,7 +1,7 @@
#!/bin/sh
# Sign files and upload them.
-scriptversion=2018-03-07.03; # UTC
+scriptversion=2018-05-19.18; # UTC
# Copyright (C) 2004-2018 Free Software Foundation, Inc.
#
@@ -24,7 +24,30 @@ scriptversion=2018-03-07.03; # UTC
set -e
-GPG='gpg --batch --no-tty'
+GPG=gpg
+# Choose the proper version of gpg, so as to avoid a
+# "gpg-agent is not available in this session" error
+# when gpg-agent is version 3 but gpg is still version 1.
+# FIXME-2020: remove, once all major distros ship gpg version 3 as /usr/bin/gpg
+gpg_agent_version=`(gpg-agent --version) 2>/dev/null | sed -e '2,$d' -e 's/^[^0-9]*//'`
+case "$gpg_agent_version" in
+ 2.*)
+ gpg_version=`(gpg --version) 2>/dev/null | sed -e '2,$d' -e 's/^[^0-9]*//'`
+ case "$gpg_version" in
+ 1.*)
+ if (type gpg2) >/dev/null 2>/dev/null; then
+ # gpg2 is present.
+ GPG=gpg2
+ else
+ # gpg2 is missing. Ubuntu users should install the package 'gnupg2'.
+ echo "WARNING: Using 'gpg', which is too old. You should install 'gpg2'." 1>&2
+ fi
+ ;;
+ esac
+ ;;
+esac
+
+GPG="${GPG} --batch --no-tty"
conffile=.gnuploadrc
to=
dry_run=false
@@ -54,10 +77,10 @@ Options:
--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
+ -n, --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
+ -h, --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.:
@@ -125,7 +148,7 @@ while test -n "$1"; do
-*)
collect_var=
case $1 in
- --help)
+ -h | --help)
echo "$usage"
exit $?
;;
@@ -171,7 +194,7 @@ while test -n "$1"; do
--symlink)
collect_var=symlink_files
;;
- --dry-run|-n)
+ -n | --dry-run)
dry_run=:
;;
--version)
diff --git a/build-aux/prefix-gnulib-mk b/build-aux/prefix-gnulib-mk
index 67b723f..544654f 100755
--- a/build-aux/prefix-gnulib-mk
+++ b/build-aux/prefix-gnulib-mk
@@ -146,15 +146,6 @@ sub prefix ($)
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
diff --git a/build-aux/texinfo.tex b/build-aux/texinfo.tex
index aa4f256..5840aff 100644
--- a/build-aux/texinfo.tex
+++ b/build-aux/texinfo.tex
@@ -3,7 +3,7 @@
% Load plain if necessary, i.e., if running under initex.
\expandafter\ifx\csname fmtname\endcsname\relax\input plain\fi
%
-\def\texinfoversion{2018-03-10.14}
+\def\texinfoversion{2018-09-21.20}
%
% Copyright 1985, 1986, 1988, 1990, 1991, 1992, 1993, 1994, 1995,
% 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
@@ -1528,6 +1528,9 @@ output) for that.)}
\startlink attr{/Border [0 0 0]}%
user{/Subtype /Link /A << /S /URI /URI (#1) >>}%
\endgroup}
+ % \pdfgettoks - Surround page numbers in #1 with @pdflink. #1 may
+ % be a simple number, or a list of numbers in the case of an index
+ % entry.
\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}
@@ -8001,6 +8004,7 @@ end
\gdef\boldbrax{\let(=\opnr\let)=\clnr\let[=\lbrb\let]=\rbrb}
\gdef\magicamp{\let&=\amprm}
}
+\let\ampchar\&
\newcount\parencount
diff --git a/config_h.in b/config_h.in
index 8d5cb32..e0b815f 100644
--- a/config_h.in
+++ b/config_h.in
@@ -1,113 +1,5 @@
/* config_h.in. Generated from configure.ac by autoheader. */
-/* CPU and C ABI indicator */
-#ifndef __i386__
-#undef __i386__
-#endif
-#ifndef __x86_64_x32__
-#undef __x86_64_x32__
-#endif
-#ifndef __x86_64__
-#undef __x86_64__
-#endif
-#ifndef __alpha__
-#undef __alpha__
-#endif
-#ifndef __arm__
-#undef __arm__
-#endif
-#ifndef __armhf__
-#undef __armhf__
-#endif
-#ifndef __arm64_ilp32__
-#undef __arm64_ilp32__
-#endif
-#ifndef __arm64__
-#undef __arm64__
-#endif
-#ifndef __hppa__
-#undef __hppa__
-#endif
-#ifndef __hppa64__
-#undef __hppa64__
-#endif
-#ifndef __ia64_ilp32__
-#undef __ia64_ilp32__
-#endif
-#ifndef __ia64__
-#undef __ia64__
-#endif
-#ifndef __m68k__
-#undef __m68k__
-#endif
-#ifndef __mips__
-#undef __mips__
-#endif
-#ifndef __mipsn32__
-#undef __mipsn32__
-#endif
-#ifndef __mips64__
-#undef __mips64__
-#endif
-#ifndef __powerpc__
-#undef __powerpc__
-#endif
-#ifndef __powerpc64__
-#undef __powerpc64__
-#endif
-#ifndef __powerpc64_elfv2__
-#undef __powerpc64_elfv2__
-#endif
-#ifndef __riscv32__
-#undef __riscv32__
-#endif
-#ifndef __riscv64__
-#undef __riscv64__
-#endif
-#ifndef __riscv32_ilp32__
-#undef __riscv32_ilp32__
-#endif
-#ifndef __riscv32_ilp32f__
-#undef __riscv32_ilp32f__
-#endif
-#ifndef __riscv32_ilp32d__
-#undef __riscv32_ilp32d__
-#endif
-#ifndef __riscv64_ilp32__
-#undef __riscv64_ilp32__
-#endif
-#ifndef __riscv64_ilp32f__
-#undef __riscv64_ilp32f__
-#endif
-#ifndef __riscv64_ilp32d__
-#undef __riscv64_ilp32d__
-#endif
-#ifndef __riscv64_lp64__
-#undef __riscv64_lp64__
-#endif
-#ifndef __riscv64_lp64f__
-#undef __riscv64_lp64f__
-#endif
-#ifndef __riscv64_lp64d__
-#undef __riscv64_lp64d__
-#endif
-#ifndef __s390__
-#undef __s390__
-#endif
-#ifndef __s390x__
-#undef __s390x__
-#endif
-#ifndef __sh__
-#undef __sh__
-#endif
-#ifndef __sparc__
-#undef __sparc__
-#endif
-#ifndef __sparc64__
-#undef __sparc64__
-#endif
-
-
/* Define if building universal (internal helper macro) */
#undef AC_APPLE_UNIVERSAL_BUILD
@@ -183,6 +75,10 @@
fflush is known to not work, -1 if unknown. */
#undef FUNC_FFLUSH_STDIN
+/* Define to 1 if mkdir mistakenly creates a directory given with a trailing
+ dot component. */
+#undef FUNC_MKDIR_DOT_BUG
+
/* Define to 1 if nl_langinfo (YESEXPR) returns a non-empty string. */
#undef FUNC_NL_LANGINFO_YESEXPR_WORKS
@@ -345,6 +241,9 @@
/* Define to 1 when the gnulib module localeconv should be tested. */
#undef GNULIB_TEST_LOCALECONV
+/* Define to 1 when the gnulib module localename should be tested. */
+#undef GNULIB_TEST_LOCALENAME
+
/* Define to 1 when the gnulib module lseek should be tested. */
#undef GNULIB_TEST_LSEEK
@@ -569,6 +468,10 @@
CoreFoundation framework. */
#undef HAVE_CFLOCALECOPYCURRENT
+/* Define to 1 if you have the Mac OS X function
+ CFLocaleCopyPreferredLanguages in the CoreFoundation framework. */
+#undef HAVE_CFLOCALECOPYPREFERREDLANGUAGES
+
/* Define to 1 if you have the Mac OS X function CFPreferencesCopyAppValue in
the CoreFoundation framework. */
#undef HAVE_CFPREFERENCESCOPYAPPVALUE
@@ -730,6 +633,10 @@
*/
#undef HAVE_DECL_WCTOB
+/* Define to 1 if you have the declaration of `_fseeki64', and to 0 if you
+ don't. */
+#undef HAVE_DECL__FSEEKI64
+
/* Define to 1 if you have the declaration of `_putenv', and to 0 if you
don't. */
#undef HAVE_DECL__PUTENV
@@ -751,6 +658,9 @@
/* Define to 1 if you have the 'dup2' function. */
#undef HAVE_DUP2
+/* Define to 1 if you have the `duplocale' function. */
+#undef HAVE_DUPLOCALE
+
/* Define if you have the declaration of environ. */
#undef HAVE_ENVIRON_DECL
@@ -760,6 +670,10 @@
/* Define to 1 if you have the `facl' function. */
#undef HAVE_FACL
+/* Define if the locale_t type contains insufficient information, as on
+ OpenBSD. */
+#undef HAVE_FAKE_LOCALES
+
/* Define to 1 if you have the `fchmod' function. */
#undef HAVE_FCHMOD
@@ -781,6 +695,9 @@
/* Define to 1 if you have the `fpurge' function. */
#undef HAVE_FPURGE
+/* Define to 1 if you have the `freelocale' function. */
+#undef HAVE_FREELOCALE
+
/* Define to 1 if fseeko (and presumably ftello) exists and is declared. */
#undef HAVE_FSEEKO
@@ -814,9 +731,6 @@
/* 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
@@ -933,6 +847,10 @@
concept. */
#undef HAVE_MSVC_INVALID_PARAMETER_HANDLER
+/* Define if the locale_t type does not contain the name of each locale
+ category. */
+#undef HAVE_NAMELESS_LOCALES
+
/* Define to 1 if you have the <netdb.h> header file. */
#undef HAVE_NETDB_H
@@ -976,661 +894,6 @@
/* Define to 1 if you have the `raise' function. */
#undef HAVE_RAISE
-/* Define to 1 if accept is declared even after undefining macros. */
-#undef HAVE_RAW_DECL_ACCEPT
-
-/* Define to 1 if accept4 is declared even after undefining macros. */
-#undef HAVE_RAW_DECL_ACCEPT4
-
-/* Define to 1 if alphasort is declared even after undefining macros. */
-#undef HAVE_RAW_DECL_ALPHASORT
-
-/* Define to 1 if atoll is declared even after undefining macros. */
-#undef HAVE_RAW_DECL_ATOLL
-
-/* Define to 1 if bind is declared even after undefining macros. */
-#undef HAVE_RAW_DECL_BIND
-
-/* Define to 1 if btowc is declared even after undefining macros. */
-#undef HAVE_RAW_DECL_BTOWC
-
-/* Define to 1 if canonicalize_file_name is declared even after undefining
- macros. */
-#undef HAVE_RAW_DECL_CANONICALIZE_FILE_NAME
-
-/* Define to 1 if chdir is declared even after undefining macros. */
-#undef HAVE_RAW_DECL_CHDIR
-
-/* 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 connect is declared even after undefining macros. */
-#undef HAVE_RAW_DECL_CONNECT
-
-/* Define to 1 if dirfd is declared even after undefining macros. */
-#undef HAVE_RAW_DECL_DIRFD
-
-/* Define to 1 if dprintf is declared even after undefining macros. */
-#undef HAVE_RAW_DECL_DPRINTF
-
-/* Define to 1 if dup is declared even after undefining macros. */
-#undef HAVE_RAW_DECL_DUP
-
-/* Define to 1 if dup2 is declared even after undefining macros. */
-#undef HAVE_RAW_DECL_DUP2
-
-/* Define to 1 if dup3 is declared even after undefining macros. */
-#undef HAVE_RAW_DECL_DUP3
-
-/* Define to 1 if duplocale is declared even after undefining macros. */
-#undef HAVE_RAW_DECL_DUPLOCALE
-
-/* Define to 1 if endusershell is declared even after undefining macros. */
-#undef HAVE_RAW_DECL_ENDUSERSHELL
-
-/* Define to 1 if environ is declared even after undefining macros. */
-#undef HAVE_RAW_DECL_ENVIRON
-
-/* Define to 1 if euidaccess is declared even after undefining macros. */
-#undef HAVE_RAW_DECL_EUIDACCESS
-
-/* Define to 1 if faccessat is declared even after undefining macros. */
-#undef HAVE_RAW_DECL_FACCESSAT
-
-/* Define to 1 if fchdir is declared even after undefining macros. */
-#undef HAVE_RAW_DECL_FCHDIR
-
-/* Define to 1 if fchmodat is declared even after undefining macros. */
-#undef HAVE_RAW_DECL_FCHMODAT
-
-/* Define to 1 if fchownat is declared even after undefining macros. */
-#undef HAVE_RAW_DECL_FCHOWNAT
-
-/* Define to 1 if fcntl is declared even after undefining macros. */
-#undef HAVE_RAW_DECL_FCNTL
-
-/* 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
-
-/* Define to 1 if ffsll is declared even after undefining macros. */
-#undef HAVE_RAW_DECL_FFSLL
-
-/* Define to 1 if fpurge is declared even after undefining macros. */
-#undef HAVE_RAW_DECL_FPURGE
-
-/* Define to 1 if fseeko is declared even after undefining macros. */
-#undef HAVE_RAW_DECL_FSEEKO
-
-/* Define to 1 if fstat is declared even after undefining macros. */
-#undef HAVE_RAW_DECL_FSTAT
-
-/* Define to 1 if fstatat is declared even after undefining macros. */
-#undef HAVE_RAW_DECL_FSTATAT
-
-/* Define to 1 if fsync is declared even after undefining macros. */
-#undef HAVE_RAW_DECL_FSYNC
-
-/* Define to 1 if ftello is declared even after undefining macros. */
-#undef HAVE_RAW_DECL_FTELLO
-
-/* Define to 1 if ftruncate is declared even after undefining macros. */
-#undef HAVE_RAW_DECL_FTRUNCATE
-
-/* Define to 1 if futimens is declared even after undefining macros. */
-#undef HAVE_RAW_DECL_FUTIMENS
-
-/* Define to 1 if getcwd is declared even after undefining macros. */
-#undef HAVE_RAW_DECL_GETCWD
-
-/* Define to 1 if getdelim is declared even after undefining macros. */
-#undef HAVE_RAW_DECL_GETDELIM
-
-/* Define to 1 if getdomainname is declared even after undefining macros. */
-#undef HAVE_RAW_DECL_GETDOMAINNAME
-
-/* Define to 1 if getdtablesize is declared even after undefining macros. */
-#undef HAVE_RAW_DECL_GETDTABLESIZE
-
-/* Define to 1 if getgroups is declared even after undefining macros. */
-#undef HAVE_RAW_DECL_GETGROUPS
-
-/* Define to 1 if gethostname is declared even after undefining macros. */
-#undef HAVE_RAW_DECL_GETHOSTNAME
-
-/* Define to 1 if getline is declared even after undefining macros. */
-#undef HAVE_RAW_DECL_GETLINE
-
-/* Define to 1 if getloadavg is declared even after undefining macros. */
-#undef HAVE_RAW_DECL_GETLOADAVG
-
-/* Define to 1 if getlogin is declared even after undefining macros. */
-#undef HAVE_RAW_DECL_GETLOGIN
-
-/* Define to 1 if getlogin_r is declared even after undefining macros. */
-#undef HAVE_RAW_DECL_GETLOGIN_R
-
-/* Define to 1 if getpagesize is declared even after undefining macros. */
-#undef HAVE_RAW_DECL_GETPAGESIZE
-
-/* Define to 1 if getpeername is declared even after undefining macros. */
-#undef HAVE_RAW_DECL_GETPEERNAME
-
-/* Define to 1 if gets is declared even after undefining macros. */
-#undef HAVE_RAW_DECL_GETS
-
-/* Define to 1 if getsockname is declared even after undefining macros. */
-#undef HAVE_RAW_DECL_GETSOCKNAME
-
-/* Define to 1 if getsockopt is declared even after undefining macros. */
-#undef HAVE_RAW_DECL_GETSOCKOPT
-
-/* Define to 1 if getsubopt is declared even after undefining macros. */
-#undef HAVE_RAW_DECL_GETSUBOPT
-
-/* Define to 1 if gettimeofday is declared even after undefining macros. */
-#undef HAVE_RAW_DECL_GETTIMEOFDAY
-
-/* Define to 1 if getusershell is declared even after undefining macros. */
-#undef HAVE_RAW_DECL_GETUSERSHELL
-
-/* Define to 1 if grantpt is declared even after undefining macros. */
-#undef HAVE_RAW_DECL_GRANTPT
-
-/* 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 inet_ntop is declared even after undefining macros. */
-#undef HAVE_RAW_DECL_INET_NTOP
-
-/* Define to 1 if inet_pton is declared even after undefining macros. */
-#undef HAVE_RAW_DECL_INET_PTON
-
-/* Define to 1 if initstate is declared even after undefining macros. */
-#undef HAVE_RAW_DECL_INITSTATE
-
-/* Define to 1 if initstate_r is declared even after undefining macros. */
-#undef HAVE_RAW_DECL_INITSTATE_R
-
-/* Define to 1 if ioctl is declared even after undefining macros. */
-#undef HAVE_RAW_DECL_IOCTL
-
-/* Define to 1 if isatty is declared even after undefining macros. */
-#undef HAVE_RAW_DECL_ISATTY
-
-/* 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
-
-/* Define to 1 if lchmod is declared even after undefining macros. */
-#undef HAVE_RAW_DECL_LCHMOD
-
-/* Define to 1 if lchown is declared even after undefining macros. */
-#undef HAVE_RAW_DECL_LCHOWN
-
-/* Define to 1 if link is declared even after undefining macros. */
-#undef HAVE_RAW_DECL_LINK
-
-/* Define to 1 if linkat is declared even after undefining macros. */
-#undef HAVE_RAW_DECL_LINKAT
-
-/* Define to 1 if listen is declared even after undefining macros. */
-#undef HAVE_RAW_DECL_LISTEN
-
-/* Define to 1 if lseek is declared even after undefining macros. */
-#undef HAVE_RAW_DECL_LSEEK
-
-/* Define to 1 if lstat is declared even after undefining macros. */
-#undef HAVE_RAW_DECL_LSTAT
-
-/* Define to 1 if mbrlen is declared even after undefining macros. */
-#undef HAVE_RAW_DECL_MBRLEN
-
-/* Define to 1 if mbrtowc is declared even after undefining macros. */
-#undef HAVE_RAW_DECL_MBRTOWC
-
-/* Define to 1 if mbsinit is declared even after undefining macros. */
-#undef HAVE_RAW_DECL_MBSINIT
-
-/* Define to 1 if mbsnrtowcs is declared even after undefining macros. */
-#undef HAVE_RAW_DECL_MBSNRTOWCS
-
-/* Define to 1 if mbsrtowcs is declared even after undefining macros. */
-#undef HAVE_RAW_DECL_MBSRTOWCS
-
-/* Define to 1 if memmem is declared even after undefining macros. */
-#undef HAVE_RAW_DECL_MEMMEM
-
-/* Define to 1 if mempcpy is declared even after undefining macros. */
-#undef HAVE_RAW_DECL_MEMPCPY
-
-/* Define to 1 if memrchr is declared even after undefining macros. */
-#undef HAVE_RAW_DECL_MEMRCHR
-
-/* Define to 1 if mkdirat is declared even after undefining macros. */
-#undef HAVE_RAW_DECL_MKDIRAT
-
-/* Define to 1 if mkdtemp is declared even after undefining macros. */
-#undef HAVE_RAW_DECL_MKDTEMP
-
-/* Define to 1 if mkfifo is declared even after undefining macros. */
-#undef HAVE_RAW_DECL_MKFIFO
-
-/* Define to 1 if mkfifoat is declared even after undefining macros. */
-#undef HAVE_RAW_DECL_MKFIFOAT
-
-/* Define to 1 if mknod is declared even after undefining macros. */
-#undef HAVE_RAW_DECL_MKNOD
-
-/* Define to 1 if mknodat is declared even after undefining macros. */
-#undef HAVE_RAW_DECL_MKNODAT
-
-/* Define to 1 if mkostemp is declared even after undefining macros. */
-#undef HAVE_RAW_DECL_MKOSTEMP
-
-/* Define to 1 if mkostemps is declared even after undefining macros. */
-#undef HAVE_RAW_DECL_MKOSTEMPS
-
-/* Define to 1 if mkstemp is declared even after undefining macros. */
-#undef HAVE_RAW_DECL_MKSTEMP
-
-/* Define to 1 if mkstemps is declared even after undefining macros. */
-#undef HAVE_RAW_DECL_MKSTEMPS
-
-/* Define to 1 if nl_langinfo is declared even after undefining macros. */
-#undef HAVE_RAW_DECL_NL_LANGINFO
-
-/* 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
-
-/* Define to 1 if pipe is declared even after undefining macros. */
-#undef HAVE_RAW_DECL_PIPE
-
-/* Define to 1 if pipe2 is declared even after undefining macros. */
-#undef HAVE_RAW_DECL_PIPE2
-
-/* Define to 1 if popen is declared even after undefining macros. */
-#undef HAVE_RAW_DECL_POPEN
-
-/* Define to 1 if posix_openpt is declared even after undefining macros. */
-#undef HAVE_RAW_DECL_POSIX_OPENPT
-
-/* Define to 1 if pread is declared even after undefining macros. */
-#undef HAVE_RAW_DECL_PREAD
-
-/* Define to 1 if pselect is declared even after undefining macros. */
-#undef HAVE_RAW_DECL_PSELECT
-
-/* Define to 1 if pthread_sigmask is declared even after undefining macros. */
-#undef HAVE_RAW_DECL_PTHREAD_SIGMASK
-
-/* Define to 1 if ptsname is declared even after undefining macros. */
-#undef HAVE_RAW_DECL_PTSNAME
-
-/* Define to 1 if ptsname_r is declared even after undefining macros. */
-#undef HAVE_RAW_DECL_PTSNAME_R
-
-/* 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
-
-/* Define to 1 if random_r is declared even after undefining macros. */
-#undef HAVE_RAW_DECL_RANDOM_R
-
-/* 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
-
-/* Define to 1 if readlinkat is declared even after undefining macros. */
-#undef HAVE_RAW_DECL_READLINKAT
-
-/* Define to 1 if reallocarray is declared even after undefining macros. */
-#undef HAVE_RAW_DECL_REALLOCARRAY
-
-/* Define to 1 if realpath is declared even after undefining macros. */
-#undef HAVE_RAW_DECL_REALPATH
-
-/* Define to 1 if recv is declared even after undefining macros. */
-#undef HAVE_RAW_DECL_RECV
-
-/* Define to 1 if recvfrom is declared even after undefining macros. */
-#undef HAVE_RAW_DECL_RECVFROM
-
-/* Define to 1 if renameat is declared even after undefining macros. */
-#undef HAVE_RAW_DECL_RENAMEAT
-
-/* 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 select is declared even after undefining macros. */
-#undef HAVE_RAW_DECL_SELECT
-
-/* Define to 1 if send is declared even after undefining macros. */
-#undef HAVE_RAW_DECL_SEND
-
-/* Define to 1 if sendto is declared even after undefining macros. */
-#undef HAVE_RAW_DECL_SENDTO
-
-/* Define to 1 if setenv is declared even after undefining macros. */
-#undef HAVE_RAW_DECL_SETENV
-
-/* Define to 1 if sethostname is declared even after undefining macros. */
-#undef HAVE_RAW_DECL_SETHOSTNAME
-
-/* Define to 1 if setlocale is declared even after undefining macros. */
-#undef HAVE_RAW_DECL_SETLOCALE
-
-/* Define to 1 if setsockopt is declared even after undefining macros. */
-#undef HAVE_RAW_DECL_SETSOCKOPT
-
-/* Define to 1 if setstate is declared even after undefining macros. */
-#undef HAVE_RAW_DECL_SETSTATE
-
-/* Define to 1 if setstate_r is declared even after undefining macros. */
-#undef HAVE_RAW_DECL_SETSTATE_R
-
-/* Define to 1 if setusershell is declared even after undefining macros. */
-#undef HAVE_RAW_DECL_SETUSERSHELL
-
-/* Define to 1 if shutdown is declared even after undefining macros. */
-#undef HAVE_RAW_DECL_SHUTDOWN
-
-/* Define to 1 if sigaction is declared even after undefining macros. */
-#undef HAVE_RAW_DECL_SIGACTION
-
-/* Define to 1 if sigaddset is declared even after undefining macros. */
-#undef HAVE_RAW_DECL_SIGADDSET
-
-/* Define to 1 if sigdelset is declared even after undefining macros. */
-#undef HAVE_RAW_DECL_SIGDELSET
-
-/* Define to 1 if sigemptyset is declared even after undefining macros. */
-#undef HAVE_RAW_DECL_SIGEMPTYSET
-
-/* Define to 1 if sigfillset is declared even after undefining macros. */
-#undef HAVE_RAW_DECL_SIGFILLSET
-
-/* Define to 1 if sigismember is declared even after undefining macros. */
-#undef HAVE_RAW_DECL_SIGISMEMBER
-
-/* Define to 1 if sigpending is declared even after undefining macros. */
-#undef HAVE_RAW_DECL_SIGPENDING
-
-/* Define to 1 if sigprocmask is declared even after undefining macros. */
-#undef HAVE_RAW_DECL_SIGPROCMASK
-
-/* Define to 1 if sleep is declared even after undefining macros. */
-#undef HAVE_RAW_DECL_SLEEP
-
-/* Define to 1 if snprintf is declared even after undefining macros. */
-#undef HAVE_RAW_DECL_SNPRINTF
-
-/* Define to 1 if socket is declared even after undefining macros. */
-#undef HAVE_RAW_DECL_SOCKET
-
-/* Define to 1 if srandom is declared even after undefining macros. */
-#undef HAVE_RAW_DECL_SRANDOM
-
-/* Define to 1 if srandom_r is declared even after undefining macros. */
-#undef HAVE_RAW_DECL_SRANDOM_R
-
-/* Define to 1 if stat is declared even after undefining macros. */
-#undef HAVE_RAW_DECL_STAT
-
-/* Define to 1 if stpcpy is declared even after undefining macros. */
-#undef HAVE_RAW_DECL_STPCPY
-
-/* Define to 1 if stpncpy is declared even after undefining macros. */
-#undef HAVE_RAW_DECL_STPNCPY
-
-/* Define to 1 if strcasestr is declared even after undefining macros. */
-#undef HAVE_RAW_DECL_STRCASESTR
-
-/* Define to 1 if strchrnul is declared even after undefining macros. */
-#undef HAVE_RAW_DECL_STRCHRNUL
-
-/* Define to 1 if strdup is declared even after undefining macros. */
-#undef HAVE_RAW_DECL_STRDUP
-
-/* Define to 1 if strerror_r is declared even after undefining macros. */
-#undef HAVE_RAW_DECL_STRERROR_R
-
-/* Define to 1 if strncat is declared even after undefining macros. */
-#undef HAVE_RAW_DECL_STRNCAT
-
-/* Define to 1 if strndup is declared even after undefining macros. */
-#undef HAVE_RAW_DECL_STRNDUP
-
-/* Define to 1 if strnlen is declared even after undefining macros. */
-#undef HAVE_RAW_DECL_STRNLEN
-
-/* Define to 1 if strpbrk is declared even after undefining macros. */
-#undef HAVE_RAW_DECL_STRPBRK
-
-/* Define to 1 if strsep is declared even after undefining macros. */
-#undef HAVE_RAW_DECL_STRSEP
-
-/* Define to 1 if strsignal is declared even after undefining macros. */
-#undef HAVE_RAW_DECL_STRSIGNAL
-
-/* 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
-
-/* Define to 1 if strtoll is declared even after undefining macros. */
-#undef HAVE_RAW_DECL_STRTOLL
-
-/* 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
-
-/* Define to 1 if symlink is declared even after undefining macros. */
-#undef HAVE_RAW_DECL_SYMLINK
-
-/* Define to 1 if symlinkat is declared even after undefining macros. */
-#undef HAVE_RAW_DECL_SYMLINKAT
-
-/* Define to 1 if tmpfile is declared even after undefining macros. */
-#undef HAVE_RAW_DECL_TMPFILE
-
-/* Define to 1 if towctrans is declared even after undefining macros. */
-#undef HAVE_RAW_DECL_TOWCTRANS
-
-/* Define to 1 if truncate is declared even after undefining macros. */
-#undef HAVE_RAW_DECL_TRUNCATE
-
-/* Define to 1 if ttyname_r is declared even after undefining macros. */
-#undef HAVE_RAW_DECL_TTYNAME_R
-
-/* Define to 1 if unlink is declared even after undefining macros. */
-#undef HAVE_RAW_DECL_UNLINK
-
-/* Define to 1 if unlinkat is declared even after undefining macros. */
-#undef HAVE_RAW_DECL_UNLINKAT
-
-/* Define to 1 if unlockpt is declared even after undefining macros. */
-#undef HAVE_RAW_DECL_UNLOCKPT
-
-/* Define to 1 if unsetenv is declared even after undefining macros. */
-#undef HAVE_RAW_DECL_UNSETENV
-
-/* Define to 1 if usleep is declared even after undefining macros. */
-#undef HAVE_RAW_DECL_USLEEP
-
-/* Define to 1 if utimensat is declared even after undefining macros. */
-#undef HAVE_RAW_DECL_UTIMENSAT
-
-/* Define to 1 if vdprintf is declared even after undefining macros. */
-#undef HAVE_RAW_DECL_VDPRINTF
-
-/* Define to 1 if vsnprintf is declared even after undefining macros. */
-#undef HAVE_RAW_DECL_VSNPRINTF
-
-/* Define to 1 if wcpcpy is declared even after undefining macros. */
-#undef HAVE_RAW_DECL_WCPCPY
-
-/* Define to 1 if wcpncpy is declared even after undefining macros. */
-#undef HAVE_RAW_DECL_WCPNCPY
-
-/* Define to 1 if wcrtomb is declared even after undefining macros. */
-#undef HAVE_RAW_DECL_WCRTOMB
-
-/* Define to 1 if wcscasecmp is declared even after undefining macros. */
-#undef HAVE_RAW_DECL_WCSCASECMP
-
-/* Define to 1 if wcscat is declared even after undefining macros. */
-#undef HAVE_RAW_DECL_WCSCAT
-
-/* Define to 1 if wcschr is declared even after undefining macros. */
-#undef HAVE_RAW_DECL_WCSCHR
-
-/* Define to 1 if wcscmp is declared even after undefining macros. */
-#undef HAVE_RAW_DECL_WCSCMP
-
-/* Define to 1 if wcscoll is declared even after undefining macros. */
-#undef HAVE_RAW_DECL_WCSCOLL
-
-/* Define to 1 if wcscpy is declared even after undefining macros. */
-#undef HAVE_RAW_DECL_WCSCPY
-
-/* Define to 1 if wcscspn is declared even after undefining macros. */
-#undef HAVE_RAW_DECL_WCSCSPN
-
-/* Define to 1 if wcsdup is declared even after undefining macros. */
-#undef HAVE_RAW_DECL_WCSDUP
-
-/* Define to 1 if wcsftime is declared even after undefining macros. */
-#undef HAVE_RAW_DECL_WCSFTIME
-
-/* Define to 1 if wcslen is declared even after undefining macros. */
-#undef HAVE_RAW_DECL_WCSLEN
-
-/* Define to 1 if wcsncasecmp is declared even after undefining macros. */
-#undef HAVE_RAW_DECL_WCSNCASECMP
-
-/* Define to 1 if wcsncat is declared even after undefining macros. */
-#undef HAVE_RAW_DECL_WCSNCAT
-
-/* Define to 1 if wcsncmp is declared even after undefining macros. */
-#undef HAVE_RAW_DECL_WCSNCMP
-
-/* Define to 1 if wcsncpy is declared even after undefining macros. */
-#undef HAVE_RAW_DECL_WCSNCPY
-
-/* Define to 1 if wcsnlen is declared even after undefining macros. */
-#undef HAVE_RAW_DECL_WCSNLEN
-
-/* Define to 1 if wcsnrtombs is declared even after undefining macros. */
-#undef HAVE_RAW_DECL_WCSNRTOMBS
-
-/* Define to 1 if wcspbrk is declared even after undefining macros. */
-#undef HAVE_RAW_DECL_WCSPBRK
-
-/* Define to 1 if wcsrchr is declared even after undefining macros. */
-#undef HAVE_RAW_DECL_WCSRCHR
-
-/* Define to 1 if wcsrtombs is declared even after undefining macros. */
-#undef HAVE_RAW_DECL_WCSRTOMBS
-
-/* Define to 1 if wcsspn is declared even after undefining macros. */
-#undef HAVE_RAW_DECL_WCSSPN
-
-/* Define to 1 if wcsstr is declared even after undefining macros. */
-#undef HAVE_RAW_DECL_WCSSTR
-
-/* Define to 1 if wcstok is declared even after undefining macros. */
-#undef HAVE_RAW_DECL_WCSTOK
-
-/* Define to 1 if wcswidth is declared even after undefining macros. */
-#undef HAVE_RAW_DECL_WCSWIDTH
-
-/* Define to 1 if wcsxfrm is declared even after undefining macros. */
-#undef HAVE_RAW_DECL_WCSXFRM
-
-/* Define to 1 if wctob is declared even after undefining macros. */
-#undef HAVE_RAW_DECL_WCTOB
-
-/* Define to 1 if wctrans is declared even after undefining macros. */
-#undef HAVE_RAW_DECL_WCTRANS
-
-/* Define to 1 if wctype is declared even after undefining macros. */
-#undef HAVE_RAW_DECL_WCTYPE
-
-/* Define to 1 if wcwidth is declared even after undefining macros. */
-#undef HAVE_RAW_DECL_WCWIDTH
-
-/* Define to 1 if wmemchr is declared even after undefining macros. */
-#undef HAVE_RAW_DECL_WMEMCHR
-
-/* Define to 1 if wmemcmp is declared even after undefining macros. */
-#undef HAVE_RAW_DECL_WMEMCMP
-
-/* Define to 1 if wmemcpy is declared even after undefining macros. */
-#undef HAVE_RAW_DECL_WMEMCPY
-
-/* Define to 1 if wmemmove is declared even after undefining macros. */
-#undef HAVE_RAW_DECL_WMEMMOVE
-
-/* Define to 1 if wmemset is declared even after undefining macros. */
-#undef HAVE_RAW_DECL_WMEMSET
-
-/* 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
@@ -1697,6 +960,9 @@
/* Define to 1 if you have the `snprintf' function. */
#undef HAVE_SNPRINTF
+/* Define if the locale_t type is as on Solaris 11.4. */
+#undef HAVE_SOLARIS114_LOCALES
+
/* Define to 1 if you have the `statacl' function. */
#undef HAVE_STATACL
@@ -1857,6 +1123,9 @@
/* Define to 1 if O_NOFOLLOW works. */
#undef HAVE_WORKING_O_NOFOLLOW
+/* Define if the uselocale function exists any may safely be called. */
+#undef HAVE_WORKING_USELOCALE
+
/* Define to 1 if you have the <ws2tcpip.h> header file. */
#undef HAVE_WS2TCPIP_H
@@ -1894,6 +1163,9 @@
/* Define to 1 if you have the `__fwriting' function. */
#undef HAVE___FWRITING
+/* Define to 1 if the compiler supports the keyword '__inline'. */
+#undef HAVE___INLINE
+
/* Define to 1 if you have the `__xpg_strerror_r' function. */
#undef HAVE___XPG_STRERROR_R
@@ -2200,12 +1472,15 @@
#undef _NETBSD_SOURCE
/* The _Noreturn keyword of C11. */
-#if ! (defined _Noreturn \
- || (defined __STDC_VERSION__ && 201112 <= __STDC_VERSION__))
-# if (3 <= __GNUC__ || (__GNUC__ == 2 && 8 <= __GNUC_MINOR__) \
- || 0x5110 <= __SUNPRO_C)
+#ifndef _Noreturn
+# if 201103 <= (defined __cplusplus ? __cplusplus : 0)
+# define _Noreturn [[noreturn]]
+# elif (201112 <= (defined __STDC_VERSION__ ? __STDC_VERSION__ : 0) \
+ || 4 < __GNUC__ + (7 <= __GNUC_MINOR__))
+ /* _Noreturn works as-is. */
+# elif 2 < __GNUC__ + (8 <= __GNUC_MINOR__) || 0x5110 <= __SUNPRO_C
# define _Noreturn __attribute__ ((__noreturn__))
-# elif defined _MSC_VER && 1200 <= _MSC_VER
+# elif 1200 <= (defined _MSC_VER ? _MSC_VER : 0)
# define _Noreturn __declspec (noreturn)
# else
# define _Noreturn
@@ -2264,7 +1539,8 @@
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:
+ from calling static functions (ISO C 99 section 6.7.4.(3).
+ This bug is known to occur on:
OS X 10.8 and earlier; see:
https://lists.gnu.org/r/bug-gnulib/2012-12/msg00023.html
@@ -2277,7 +1553,18 @@
OS X 10.9 has a macro __header_inline indicating the bug is fixed for C and
for clang but remains for g++; see <https://trac.macports.org/ticket/41033>.
- Assume DragonFly and FreeBSD will be similar. */
+ Assume DragonFly and FreeBSD will be similar.
+
+ GCC 4.3 and above with -std=c99 or -std=gnu99 implements ISO C99
+ inline semantics, unless -fgnu89-inline is used. It defines a macro
+ __GNUC_STDC_INLINE__ to indicate this situation or a macro
+ __GNUC_GNU_INLINE__ to indicate the opposite situation.
+ GCC 4.2 with -std=c99 or -std=gnu99 implements the GNU C inline
+ semantics but warns, unless -fgnu89-inline is used:
+ warning: C99 inline functions are not supported; using GNU89
+ warning: to disable this warning use -fgnu89-inline or the gnu_inline function attribute
+ It defines a macro __GNUC_GNU_INLINE__ to indicate this situation.
+ */
#if (((defined __APPLE__ && defined __MACH__) \
|| defined __DragonFly__ || defined __FreeBSD__) \
&& (defined __header_inline \
@@ -2492,6 +1779,13 @@
# define _GL_ATTRIBUTE_CONST /* empty */
#endif
+/* The __malloc__ attribute was added in gcc 3. */
+#if 3 <= __GNUC__
+# define _GL_ATTRIBUTE_MALLOC __attribute__ ((__malloc__))
+#else
+# define _GL_ATTRIBUTE_MALLOC /* empty */
+#endif
+
/* Define as a macro for copying va_list variables. */
#undef va_copy
diff --git a/configure b/configure
index 096dc83..e12fc23 100755
--- a/configure
+++ b/configure
@@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.69.193-8974 for GNU sed 4.5.
+# Generated by GNU Autoconf 2.69.197-b8fd7 for GNU sed 4.7.
#
# Report bugs to <bug-sed@gnu.org>.
#
@@ -565,8 +565,8 @@ MAKEFLAGS=
# Identity of this package.
PACKAGE_NAME='GNU sed'
PACKAGE_TARNAME='sed'
-PACKAGE_VERSION='4.5'
-PACKAGE_STRING='GNU sed 4.5'
+PACKAGE_VERSION='4.7'
+PACKAGE_STRING='GNU sed 4.7'
PACKAGE_BUGREPORT='bug-sed@gnu.org'
PACKAGE_URL='https://www.gnu.org/software/sed/'
@@ -696,6 +696,7 @@ INT64_MAX_EQ_LONG_MAX
INT32_MAX_LT_INTMAX_MAX
REPLACE_STRTOUMAX
REPLACE_STRTOIMAX
+HAVE_IMAXDIV_T
HAVE_DECL_STRTOUMAX
HAVE_DECL_STRTOIMAX
HAVE_DECL_IMAXDIV
@@ -849,6 +850,7 @@ SELINUX_CONTEXT_H
NEXT_AS_FIRST_DIRECTIVE_SELINUX_SELINUX_H
NEXT_SELINUX_SELINUX_H
LIB_SELINUX
+GLIBC21
APPLE_UNIVERSAL_BUILD
HAVE_MSVC_INVALID_PARAMETER_HANDLER
UNDEFINE_STRTOK_R
@@ -949,15 +951,19 @@ HAVE_WCHAR_T
HAVE_MAX_ALIGN_T
REPLACE_NULL
REPLACE_STRUCT_LCONV
+REPLACE_FREELOCALE
REPLACE_DUPLOCALE
+REPLACE_NEWLOCALE
REPLACE_SETLOCALE
REPLACE_LOCALECONV
+HAVE_FREELOCALE
HAVE_DUPLOCALE
+HAVE_NEWLOCALE
+GNULIB_LOCALENAME
GNULIB_DUPLOCALE
GNULIB_SETLOCALE
GNULIB_LOCALECONV
LOCALCHARSET_TESTS_ENVIRONMENT
-GLIBC21
GL_GENERATE_LIMITS_H_FALSE
GL_GENERATE_LIMITS_H_TRUE
LIMITS_H
@@ -974,8 +980,6 @@ NEXT_LANGINFO_H
REPLACE_NL_LANGINFO
HAVE_NL_LANGINFO
GNULIB_NL_LANGINFO
-HOST_CPU_C_ABI
-HOST_CPU
REPLACE_LOCALTIME
REPLACE_GMTIME
REPLACE_TZSET
@@ -1192,8 +1196,6 @@ INCLUDE_NEXT_AS_FIRST_DIRECTIVE
INCLUDE_NEXT
HAVE_ISBLANK
GNULIB_ISBLANK
-pkglibexecdir
-lispdir
UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS
UNISTD_H_HAVE_WINSOCK2_H
REPLACE_WRITE
@@ -1216,6 +1218,7 @@ REPLACE_LINKAT
REPLACE_LINK
REPLACE_LCHOWN
REPLACE_ISATTY
+REPLACE_GETPASS
REPLACE_GETPAGESIZE
REPLACE_GETGROUPS
REPLACE_GETLOGIN_R
@@ -1232,6 +1235,7 @@ REPLACE_CHOWN
HAVE_SYS_PARAM_H
HAVE_OS_H
HAVE_DECL_TTYNAME_R
+HAVE_DECL_TRUNCATE
HAVE_DECL_SETHOSTNAME
HAVE_DECL_GETUSERSHELL
HAVE_DECL_GETPAGESIZE
@@ -1243,7 +1247,6 @@ HAVE_DECL_FCHDIR
HAVE_DECL_ENVIRON
HAVE_USLEEP
HAVE_UNLINKAT
-HAVE_TRUNCATE
HAVE_SYMLINKAT
HAVE_SYMLINK
HAVE_SLEEP
@@ -1258,6 +1261,7 @@ HAVE_LINKAT
HAVE_LINK
HAVE_LCHOWN
HAVE_GROUP_MEMBER
+HAVE_GETPASS
HAVE_GETPAGESIZE
HAVE_GETLOGIN
HAVE_GETHOSTNAME
@@ -1300,6 +1304,7 @@ GNULIB_LCHOWN
GNULIB_ISATTY
GNULIB_GROUP_MEMBER
GNULIB_GETUSERSHELL
+GNULIB_GETPASS
GNULIB_GETPAGESIZE
GNULIB_GETLOGIN_R
GNULIB_GETLOGIN
@@ -2187,7 +2192,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.5 to adapt to many kinds of systems.
+\`configure' configures GNU sed 4.7 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -2258,7 +2263,7 @@ fi
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of GNU sed 4.5:";;
+ short | recursive ) echo "Configuration of GNU sed 4.7:";;
esac
cat <<\_ACEOF
@@ -2382,8 +2387,8 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-GNU sed configure 4.5
-generated by GNU Autoconf 2.69.193-8974
+GNU sed configure 4.7
+generated by GNU Autoconf 2.69.197-b8fd7
Copyright (C) 2017 Free Software Foundation, Inc.
This configure script is free software; the Free Software Foundation
@@ -2947,11 +2952,11 @@ else
eval "$3=no"
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ ac_c_werror_flag=$ac_save_werror_flag
fi
eval ac_res=\$$3
{ 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
@@ -3015,14 +3020,34 @@ printf "%s\n" "$ac_res" >&6; }
eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
} # ac_fn_c_check_member
+ac_configure_args_raw=
+for ac_arg
+do
+ case $ac_arg in
+ *\'*)
+ ac_arg=`printf "%s\n" "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
+ esac
+ as_fn_append ac_configure_args_raw " '$ac_arg'"
+done
+
+case $ac_configure_args_raw in
+ *$as_nl*)
+ ac_safe_unquote= ;;
+ *)
+ ac_unsafe_z='|&;<>()$`\\"*?[ '' ' # This string ends in space, tab.
+ ac_unsafe_a="$ac_unsafe_z#~"
+ ac_safe_unquote="s/ '\\([^$ac_unsafe_a][^$ac_unsafe_z]*\\)'/ \\1/g"
+ ac_configure_args_raw=` printf "%s\n" "$ac_configure_args_raw" | sed "$ac_safe_unquote"`;;
+esac
+
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.5, which was
-generated by GNU Autoconf 2.69.193-8974. Invocation command line was
+It was created by GNU sed $as_me 4.7, which was
+generated by GNU Autoconf 2.69.197-b8fd7. Invocation command line was
- $ $0 $@
+ $ $0$ac_configure_args_raw
_ACEOF
exec 5>>config.log
@@ -3355,6 +3380,9 @@ as_fn_append ac_func_c_list " getdtablesize HAVE_GETDTABLESIZE"
as_fn_append ac_header_c_list " netdb.h netdb_h HAVE_NETDB_H"
as_fn_append ac_header_c_list " netinet/in.h netinet_in_h HAVE_NETINET_IN_H"
as_fn_append ac_func_c_list " newlocale HAVE_NEWLOCALE"
+as_fn_append ac_func_c_list " uselocale HAVE_USELOCALE"
+as_fn_append ac_func_c_list " duplocale HAVE_DUPLOCALE"
+as_fn_append ac_func_c_list " freelocale HAVE_FREELOCALE"
as_fn_append ac_header_c_list " sys/select.h sys_select_h HAVE_SYS_SELECT_H"
as_fn_append ac_func_c_list " pipe HAVE_PIPE"
as_fn_append ac_header_c_list " sys/wait.h sys_wait_h HAVE_SYS_WAIT_H"
@@ -3999,7 +4027,7 @@ fi
# Define the identity of the package.
PACKAGE='sed'
- VERSION='4.5'
+ VERSION='4.7'
printf "%s\n" "#define PACKAGE \"$PACKAGE\"" >>confdefs.h
@@ -6847,7 +6875,6 @@ fi
# Code from module close-tests:
# Code from module closedir:
# Code from module closeout:
- # Code from module configmake:
# Code from module connect:
# Code from module connect-tests:
# Code from module ctype:
@@ -6937,7 +6964,6 @@ fi
# Code from module gnupload:
# Code from module hard-locale:
# Code from module havelib:
- # Code from module host-cpu-c-abi:
# Code from module ignore-value:
# Code from module ignore-value-tests:
# Code from module include_next:
@@ -6956,6 +6982,7 @@ fi
# Code from module langinfo-tests:
# Code from module largefile:
+ # Code from module libc-config:
# Code from module limits-h:
# Code from module limits-h-tests:
# Code from module link:
@@ -6963,6 +6990,7 @@ fi
# Code from module listen:
# Code from module listen-tests:
# Code from module localcharset:
+ # Code from module localcharset-tests:
# Code from module locale:
# Code from module locale-tests:
# Code from module localeconv:
@@ -6991,6 +7019,8 @@ fi
# Code from module memrchr:
# Code from module memrchr-tests:
# Code from module minmax:
+ # Code from module mkdir:
+ # Code from module mkdir-tests:
# Code from module mkostemp:
# Code from module msvc-inval:
# Code from module msvc-nothrow:
@@ -7511,7 +7541,8 @@ 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
+ if echo '#include "conftest.c"' >conftest1.c &&
+ { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
(eval $ac_compile) 2>&5
ac_status=$?
printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
@@ -7532,7 +7563,8 @@ 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
+ if echo '#include "conftest.c"' >conftest2.c &&
+ { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
(eval $ac_compile) 2>&5
ac_status=$?
printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
@@ -7545,7 +7577,7 @@ _ACEOF
fi
fi
ac_compile="$save_ac_compile"
- rm -f conftest1.$ac_objext conftest2.$ac_objext conftest$ac_exeext
+ rm -f conftest12.c conftest12.$ac_objext conftest$ac_exeext
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_wchar_h_correct_inline" >&5
@@ -7629,7 +7661,7 @@ int main () {
return 1;
#else
/* Check whether the given locale name is recognized by the system. */
-# if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
+# if defined _WIN32 && !defined __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
@@ -7962,7 +7994,7 @@ nocrash_init (void)
}
}
}
-#elif (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
+#elif defined _WIN32 && ! defined __CYGWIN__
/* Avoid a crash on native Windows. */
#define WIN32_LEAN_AND_MEAN
#include <windows.h>
@@ -8107,6 +8139,7 @@ printf "%s\n" "#define FUNC_REALPATH_WORKS 1" >>confdefs.h
GNULIB_GETLOGIN=0;
GNULIB_GETLOGIN_R=0;
GNULIB_GETPAGESIZE=0;
+ GNULIB_GETPASS=0;
GNULIB_GETUSERSHELL=0;
GNULIB_GROUP_MEMBER=0;
GNULIB_ISATTY=0;
@@ -8149,6 +8182,7 @@ printf "%s\n" "#define FUNC_REALPATH_WORKS 1" >>confdefs.h
HAVE_GETHOSTNAME=1;
HAVE_GETLOGIN=1;
HAVE_GETPAGESIZE=1;
+ HAVE_GETPASS=1;
HAVE_GROUP_MEMBER=1;
HAVE_LCHOWN=1;
HAVE_LINK=1;
@@ -8163,7 +8197,6 @@ printf "%s\n" "#define FUNC_REALPATH_WORKS 1" >>confdefs.h
HAVE_SLEEP=1;
HAVE_SYMLINK=1;
HAVE_SYMLINKAT=1;
- HAVE_TRUNCATE=1;
HAVE_UNLINKAT=1;
HAVE_USLEEP=1;
HAVE_DECL_ENVIRON=1;
@@ -8175,6 +8208,7 @@ printf "%s\n" "#define FUNC_REALPATH_WORKS 1" >>confdefs.h
HAVE_DECL_GETPAGESIZE=1;
HAVE_DECL_GETUSERSHELL=1;
HAVE_DECL_SETHOSTNAME=1;
+ HAVE_DECL_TRUNCATE=1;
HAVE_DECL_TTYNAME_R=1;
HAVE_OS_H=0;
HAVE_SYS_PARAM_H=0;
@@ -8191,6 +8225,7 @@ printf "%s\n" "#define FUNC_REALPATH_WORKS 1" >>confdefs.h
REPLACE_GETLOGIN_R=0;
REPLACE_GETGROUPS=0;
REPLACE_GETPAGESIZE=0;
+ REPLACE_GETPASS=0;
REPLACE_ISATTY=0;
REPLACE_LCHOWN=0;
REPLACE_LINK=0;
@@ -9372,47 +9407,7 @@ fi
- for gl_func in fchmodat fstat fstatat futimens lchmod lstat mkdirat mkfifo mkfifoat mknod mknodat stat utimensat; do
- as_gl_Symbol=`printf "%s\n" "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
- { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
-printf %s "checking whether $gl_func is declared without a macro... " >&6; }
-if eval test \${$as_gl_Symbol+y}
-then :
- printf %s "(cached) " >&6
-else
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-#include <sys/stat.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
@@ -9924,7 +9919,7 @@ nocrash_init (void)
}
}
}
-#elif (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
+#elif defined _WIN32 && ! defined __CYGWIN__
/* Avoid a crash on native Windows. */
#define WIN32_LEAN_AND_MEAN
#include <windows.h>
@@ -10167,17 +10162,17 @@ else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
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 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 (void)
{
int s[1];
- int *$ac_kw t = s;
- t[0] = 0;
- return foo (t) + bar (t);
+ int *$ac_kw t = s;
+ t[0] = 0;
+ return foo (t) + bar (t);
;
return 0;
@@ -10405,51 +10400,7 @@ printf "%s\n" "$gl_cv_sys_struct_timeval_tv_sec" >&6; }
fi
- for gl_func in gettimeofday; 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. */
-
-#if HAVE_SYS_TIME_H
-# include <sys/time.h>
-#endif
-#include <time.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
@@ -10489,433 +10440,6 @@ fi
REPLACE_LOCALTIME=0;
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-#ifdef _MSC_VER
-MicrosoftCompiler
-#endif
-
-_ACEOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- $EGREP "MicrosoftCompiler" >/dev/null 2>&1
-then :
- gl_asmext='asm'
- gl_c_asm_opt='-c -Fa'
-
-else
- gl_asmext='s'
- gl_c_asm_opt='-S'
-
-fi
-rm -rf conftest*
-
-
-
-
-
- { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking host CPU and C ABI" >&5
-printf %s "checking host CPU and C ABI... " >&6; }
-if test ${gl_cv_host_cpu_c_abi+y}
-then :
- printf %s "(cached) " >&6
-else
- case "$host_cpu" in
-
- i[4567]86 )
- gl_cv_host_cpu_c_abi=i386
- ;;
-
- x86_64 )
- # On x86_64 systems, the C compiler may be generating code in one of
- # these ABIs:
- # - 64-bit instruction set, 64-bit pointers, 64-bit 'long': x86_64.
- # - 64-bit instruction set, 64-bit pointers, 32-bit 'long': x86_64
- # with native Windows (mingw, MSVC).
- # - 64-bit instruction set, 32-bit pointers, 32-bit 'long': x86_64-x32.
- # - 32-bit instruction set, 32-bit pointers, 32-bit 'long': i386.
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-#if (defined __x86_64__ || defined __amd64__ \
- || defined _M_X64 || defined _M_AMD64)
- int ok;
- #else
- error fail
- #endif
-
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"
-then :
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-#if defined __ILP32__ || defined _ILP32
- int ok;
- #else
- error fail
- #endif
-
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"
-then :
- gl_cv_host_cpu_c_abi=x86_64-x32
-else
- gl_cv_host_cpu_c_abi=x86_64
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-else
- gl_cv_host_cpu_c_abi=i386
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
- ;;
-
- alphaev[4-8] | alphaev56 | alphapca5[67] | alphaev6[78] )
- gl_cv_host_cpu_c_abi=alpha
- ;;
-
- arm* | aarch64 )
- # Assume arm with EABI.
- # On arm64 systems, the C compiler may be generating code in one of
- # these ABIs:
- # - aarch64 instruction set, 64-bit pointers, 64-bit 'long': arm64.
- # - aarch64 instruction set, 32-bit pointers, 32-bit 'long': arm64-ilp32.
- # - 32-bit instruction set, 32-bit pointers, 32-bit 'long': arm or armhf.
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-#ifdef __aarch64__
- int ok;
- #else
- error fail
- #endif
-
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"
-then :
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-#if defined __ILP32__ || defined _ILP32
- int ok;
- #else
- error fail
- #endif
-
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"
-then :
- gl_cv_host_cpu_c_abi=arm64-ilp32
-else
- gl_cv_host_cpu_c_abi=arm64
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-else
- # Don't distinguish little-endian and big-endian arm, since they
- # don't require different machine code for simple operations and
- # since the user can distinguish them through the preprocessor
- # defines __ARMEL__ vs. __ARMEB__.
- # But distinguish arm which passes floating-point arguments and
- # return values in integer registers (r0, r1, ...) - this is
- # gcc -mfloat-abi=soft or gcc -mfloat-abi=softfp - from arm which
- # passes them in float registers (s0, s1, ...) and double registers
- # (d0, d1, ...) - this is gcc -mfloat-abi=hard. GCC 4.6 or newer
- # sets the preprocessor defines __ARM_PCS (for the first case) and
- # __ARM_PCS_VFP (for the second case), but older GCC does not.
- echo 'double ddd; void func (double dd) { ddd = dd; }' > conftest.c
- # Look for a reference to the register d0 in the .s file.
- { ac_try='${CC-cc} $CFLAGS $CPPFLAGS $gl_c_asm_opt conftest.c'
- { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; }; } >/dev/null 2>&1
- if LC_ALL=C grep 'd0,' conftest.$gl_asmext >/dev/null; then
- gl_cv_host_cpu_c_abi=armhf
- else
- gl_cv_host_cpu_c_abi=arm
- fi
- rm -f conftest*
-
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
- ;;
-
- hppa1.0 | hppa1.1 | hppa2.0* | hppa64 )
- # On hppa, the C compiler may be generating 32-bit code or 64-bit
- # code. In the latter case, it defines _LP64 and __LP64__.
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-#ifdef __LP64__
- int ok;
- #else
- error fail
- #endif
-
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"
-then :
- gl_cv_host_cpu_c_abi=hppa64
-else
- gl_cv_host_cpu_c_abi=hppa
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
- ;;
-
- ia64* )
- # On ia64 on HP-UX, the C compiler may be generating 64-bit code or
- # 32-bit code. In the latter case, it defines _ILP32.
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-#ifdef _ILP32
- int ok;
- #else
- error fail
- #endif
-
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"
-then :
- gl_cv_host_cpu_c_abi=ia64-ilp32
-else
- gl_cv_host_cpu_c_abi=ia64
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
- ;;
-
- mips* )
- # We should also check for (_MIPS_SZPTR == 64), but gcc keeps this
- # at 32.
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-#if defined _MIPS_SZLONG && (_MIPS_SZLONG == 64)
- int ok;
- #else
- error fail
- #endif
-
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"
-then :
- gl_cv_host_cpu_c_abi=mips64
-else
- # In the n32 ABI, _ABIN32 is defined, _ABIO32 is not defined (but
- # may later get defined by <sgidefs.h>), and _MIPS_SIM == _ABIN32.
- # In the 32 ABI, _ABIO32 is defined, _ABIN32 is not defined (but
- # may later get defined by <sgidefs.h>), and _MIPS_SIM == _ABIO32.
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-#if (_MIPS_SIM == _ABIN32)
- int ok;
- #else
- error fail
- #endif
-
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"
-then :
- gl_cv_host_cpu_c_abi=mipsn32
-else
- gl_cv_host_cpu_c_abi=mips
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
- ;;
-
- powerpc* )
- # Different ABIs are in use on AIX vs. Mac OS X vs. Linux,*BSD.
- # No need to distinguish them here; the caller may distinguish
- # them based on the OS.
- # On powerpc64 systems, the C compiler may still be generating
- # 32-bit code. And on powerpc-ibm-aix systems, the C compiler may
- # be generating 64-bit code.
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-#if defined __powerpc64__ || defined _ARCH_PPC64
- int ok;
- #else
- error fail
- #endif
-
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"
-then :
- # On powerpc64, there are two ABIs on Linux: The AIX compatible
- # one and the ELFv2 one. The latter defines _CALL_ELF=2.
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-#if defined _CALL_ELF && _CALL_ELF == 2
- int ok;
- #else
- error fail
- #endif
-
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"
-then :
- gl_cv_host_cpu_c_abi=powerpc64-elfv2
-else
- gl_cv_host_cpu_c_abi=powerpc64
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-
-else
- gl_cv_host_cpu_c_abi=powerpc
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
- ;;
-
- rs6000 )
- gl_cv_host_cpu_c_abi=powerpc
- ;;
-
- riscv32 | riscv64 )
- # There are 2 architectures (with variants): rv32* and rv64*.
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-#if __riscv_xlen == 64
- int ok;
- #else
- error fail
- #endif
-
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"
-then :
- cpu=riscv64
-else
- cpu=riscv32
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
- # There are 6 ABIs: ilp32, ilp32f, ilp32d, lp64, lp64f, lp64d.
- # Size of 'long' and 'void *':
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-#if defined __LP64__
- int ok;
- #else
- error fail
- #endif
-
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"
-then :
- main_abi=lp64
-else
- main_abi=ilp32
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
- # Float ABIs:
- # __riscv_float_abi_double:
- # 'float' and 'double' are passed in floating-point registers.
- # __riscv_float_abi_single:
- # 'float' are passed in floating-point registers.
- # __riscv_float_abi_soft:
- # No values are passed in floating-point registers.
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-#if defined __riscv_float_abi_double
- int ok;
- #else
- error fail
- #endif
-
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"
-then :
- float_abi=d
-else
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-#if defined __riscv_float_abi_single
- int ok;
- #else
- error fail
- #endif
-
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"
-then :
- float_abi=f
-else
- float_abi=''
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
- gl_cv_host_cpu_c_abi="${cpu}-${main_abi}${float_abi}"
- ;;
-
- s390* )
- # On s390x, the C compiler may be generating 64-bit (= s390x) code
- # or 31-bit (= s390) code.
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-#if defined __LP64__ || defined __s390x__
- int ok;
- #else
- error fail
- #endif
-
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"
-then :
- gl_cv_host_cpu_c_abi=s390x
-else
- gl_cv_host_cpu_c_abi=s390
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
- ;;
-
- sparc | sparc64 )
- # UltraSPARCs running Linux have `uname -m` = "sparc64", but the
- # C compiler still generates 32-bit code.
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-#if defined __sparcv9 || defined __arch64__
- int ok;
- #else
- error fail
- #endif
-
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"
-then :
- gl_cv_host_cpu_c_abi=sparc64
-else
- gl_cv_host_cpu_c_abi=sparc
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
- ;;
-
- *)
- gl_cv_host_cpu_c_abi="$host_cpu"
- ;;
- esac
-
-fi
-{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_host_cpu_c_abi" >&5
-printf "%s\n" "$gl_cv_host_cpu_c_abi" >&6; }
-
- HOST_CPU=`echo "$gl_cv_host_cpu_c_abi" | sed -e 's/-.*//'`
- HOST_CPU_C_ABI="$gl_cv_host_cpu_c_abi"
-
-
-
- # This was
- # AC_DEFINE_UNQUOTED([__${HOST_CPU}__])
- # AC_DEFINE_UNQUOTED([__${HOST_CPU_C_ABI}__])
- # earlier, but KAI C++ 3.2d doesn't like this.
- sed -e 's/-/_/g' >> confdefs.h <<EOF
-#ifndef __${HOST_CPU}__
-#define __${HOST_CPU}__ 1
-#endif
-#ifndef __${HOST_CPU_C_ABI}__
-#define __${HOST_CPU_C_ABI}__ 1
-#endif
-EOF
-
-
-
-
GNULIB_NL_LANGINFO=0;
HAVE_NL_LANGINFO=1;
@@ -11004,8 +10528,8 @@ printf "%s\n" "$gl_cv_next_limits_h" >&6; }
- { 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; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether limits.h has LLONG_MAX, WORD_BIT, ULLONG_WIDTH etc." >&5
+printf %s "checking whether limits.h has LLONG_MAX, WORD_BIT, ULLONG_WIDTH etc.... " >&6; }
if test ${gl_cv_header_limits_width+y}
then :
printf %s "(cached) " >&6
@@ -11013,10 +10537,13 @@ 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;
+ #define __STDC_WANT_IEC_60559_BFP_EXT__ 1
+ #endif
+ #include <limits.h>
+ long long llm = LLONG_MAX;
+ int wb = WORD_BIT;
+ int ullw = ULLONG_WIDTH;
+
int
main (void)
{
@@ -11050,63 +10577,19 @@ else
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 :
- ac_have_decl=1
-else
- ac_have_decl=0
-fi
-
-printf "%s\n" "#define HAVE_DECL_GETC_UNLOCKED $ac_have_decl" >>confdefs.h
-
-
- { 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. */
-
-#include <features.h>
-#ifdef __GNU_LIBRARY__
- #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2)
- Lucky GNU user
- #endif
-#endif
-#ifdef __UCLIBC__
- Lucky user
-#endif
-
-_ACEOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- $EGREP "Lucky" >/dev/null 2>&1
-then :
- ac_cv_gnu_library_2_1=yes
-else
- ac_cv_gnu_library_2_1=no
-fi
-rm -rf conftest*
-
-
-
-fi
-{ 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"
-
-
GNULIB_LOCALECONV=0;
GNULIB_SETLOCALE=0;
GNULIB_DUPLOCALE=0;
- HAVE_DUPLOCALE=1;
+ GNULIB_LOCALENAME=0;
+ HAVE_NEWLOCALE=1;
+ HAVE_DUPLOCALE=1;
+ HAVE_FREELOCALE=1;
REPLACE_LOCALECONV=0;
REPLACE_SETLOCALE=0;
+ REPLACE_NEWLOCALE=0;
REPLACE_DUPLOCALE=0;
+ REPLACE_FREELOCALE=0;
REPLACE_STRUCT_LCONV=0;
@@ -11153,20 +10636,51 @@ printf "%s\n" "#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
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for good max_align_t" >&5
+printf %s "checking for good max_align_t... " >&6; }
+if test ${gl_cv_type_max_align_t+y}
then :
+ printf %s "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <stddef.h>
+ unsigned int s = sizeof (max_align_t);
+ #if defined __GNUC__ || defined __IBM__ALIGNOF__
+ int check1[2 * (__alignof__ (double) <= __alignof__ (max_align_t)) - 1];
+ int check2[2 * (__alignof__ (long double) <= __alignof__ (max_align_t)) - 1];
+ #endif
+int
+main (void)
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"
+then :
+ gl_cv_type_max_align_t=yes
else
- HAVE_MAX_ALIGN_T=0; STDDEF_H=stddef.h
+ gl_cv_type_max_align_t=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_type_max_align_t" >&5
+printf "%s\n" "$gl_cv_type_max_align_t" >&6; }
+ if test $gl_cv_type_max_align_t = no; then
+ 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
+
{ 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}
@@ -11201,6 +10715,7 @@ printf "%s\n" "$gl_cv_decl_null_works" >&6; }
STDDEF_H=stddef.h
fi
+
if test -n "$STDDEF_H"; then
GL_GENERATE_STDDEF_H_TRUE=
GL_GENERATE_STDDEF_H_FALSE='#'
@@ -11522,18 +11037,253 @@ fi
-
- { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for the common suffixes of directories in the library search path" >&5
-printf %s "checking for the common suffixes of directories in the library search path... " >&6; }
-if test ${acl_cv_libdirstems+y}
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking 32-bit host C ABI" >&5
+printf %s "checking 32-bit host C ABI... " >&6; }
+if test ${gl_cv_host_cpu_c_abi_32bit+y}
then :
printf %s "(cached) " >&6
else
- acl_libdirstem=lib
- acl_libdirstem2=
- case "$host_os" in
- solaris*)
- { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for 64-bit host" >&5
+ if test -n "$gl_cv_host_cpu_c_abi"; then
+ case "$gl_cv_host_cpu_c_abi" in
+ i386 | x86_64-x32 | arm | armhf | arm64-ilp32 | hppa | ia64-ilp32 | mips | mipsn32 | powerpc | riscv*-ilp32* | s390 | sparc)
+ gl_cv_host_cpu_c_abi_32bit=yes ;;
+ *)
+ gl_cv_host_cpu_c_abi_32bit=no ;;
+ esac
+ else
+ case "$host_cpu" in
+
+ i[4567]86 )
+ gl_cv_host_cpu_c_abi_32bit=yes
+ ;;
+
+ x86_64 )
+ # On x86_64 systems, the C compiler may be generating code in one of
+ # these ABIs:
+ # - 64-bit instruction set, 64-bit pointers, 64-bit 'long': x86_64.
+ # - 64-bit instruction set, 64-bit pointers, 32-bit 'long': x86_64
+ # with native Windows (mingw, MSVC).
+ # - 64-bit instruction set, 32-bit pointers, 32-bit 'long': x86_64-x32.
+ # - 32-bit instruction set, 32-bit pointers, 32-bit 'long': i386.
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#if (defined __x86_64__ || defined __amd64__ \
+ || defined _M_X64 || defined _M_AMD64) \
+ && !(defined __ILP32__ || defined _ILP32)
+ int ok;
+ #else
+ error fail
+ #endif
+
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"
+then :
+ gl_cv_host_cpu_c_abi_32bit=no
+else
+ gl_cv_host_cpu_c_abi_32bit=yes
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ ;;
+
+ arm* | aarch64 )
+ # Assume arm with EABI.
+ # On arm64 systems, the C compiler may be generating code in one of
+ # these ABIs:
+ # - aarch64 instruction set, 64-bit pointers, 64-bit 'long': arm64.
+ # - aarch64 instruction set, 32-bit pointers, 32-bit 'long': arm64-ilp32.
+ # - 32-bit instruction set, 32-bit pointers, 32-bit 'long': arm or armhf.
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#if defined __aarch64__ && !(defined __ILP32__ || defined _ILP32)
+ int ok;
+ #else
+ error fail
+ #endif
+
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"
+then :
+ gl_cv_host_cpu_c_abi_32bit=no
+else
+ gl_cv_host_cpu_c_abi_32bit=yes
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ ;;
+
+ hppa1.0 | hppa1.1 | hppa2.0* | hppa64 )
+ # On hppa, the C compiler may be generating 32-bit code or 64-bit
+ # code. In the latter case, it defines _LP64 and __LP64__.
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#ifdef __LP64__
+ int ok;
+ #else
+ error fail
+ #endif
+
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"
+then :
+ gl_cv_host_cpu_c_abi_32bit=no
+else
+ gl_cv_host_cpu_c_abi_32bit=yes
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ ;;
+
+ ia64* )
+ # On ia64 on HP-UX, the C compiler may be generating 64-bit code or
+ # 32-bit code. In the latter case, it defines _ILP32.
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#ifdef _ILP32
+ int ok;
+ #else
+ error fail
+ #endif
+
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"
+then :
+ gl_cv_host_cpu_c_abi_32bit=yes
+else
+ gl_cv_host_cpu_c_abi_32bit=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ ;;
+
+ mips* )
+ # We should also check for (_MIPS_SZPTR == 64), but gcc keeps this
+ # at 32.
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#if defined _MIPS_SZLONG && (_MIPS_SZLONG == 64)
+ int ok;
+ #else
+ error fail
+ #endif
+
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"
+then :
+ gl_cv_host_cpu_c_abi_32bit=no
+else
+ gl_cv_host_cpu_c_abi_32bit=yes
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ ;;
+
+ powerpc* )
+ # Different ABIs are in use on AIX vs. Mac OS X vs. Linux,*BSD.
+ # No need to distinguish them here; the caller may distinguish
+ # them based on the OS.
+ # On powerpc64 systems, the C compiler may still be generating
+ # 32-bit code. And on powerpc-ibm-aix systems, the C compiler may
+ # be generating 64-bit code.
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#if defined __powerpc64__ || defined _ARCH_PPC64
+ int ok;
+ #else
+ error fail
+ #endif
+
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"
+then :
+ gl_cv_host_cpu_c_abi_32bit=no
+else
+ gl_cv_host_cpu_c_abi_32bit=yes
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ ;;
+
+ rs6000 )
+ gl_cv_host_cpu_c_abi_32bit=yes
+ ;;
+
+ riscv32 | riscv64 )
+ # There are 6 ABIs: ilp32, ilp32f, ilp32d, lp64, lp64f, lp64d.
+ # Size of 'long' and 'void *':
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#if defined __LP64__
+ int ok;
+ #else
+ error fail
+ #endif
+
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"
+then :
+ gl_cv_host_cpu_c_abi_32bit=no
+else
+ gl_cv_host_cpu_c_abi_32bit=yes
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ ;;
+
+ s390* )
+ # On s390x, the C compiler may be generating 64-bit (= s390x) code
+ # or 31-bit (= s390) code.
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#if defined __LP64__ || defined __s390x__
+ int ok;
+ #else
+ error fail
+ #endif
+
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"
+then :
+ gl_cv_host_cpu_c_abi_32bit=no
+else
+ gl_cv_host_cpu_c_abi_32bit=yes
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ ;;
+
+ sparc | sparc64 )
+ # UltraSPARCs running Linux have `uname -m` = "sparc64", but the
+ # C compiler still generates 32-bit code.
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#if defined __sparcv9 || defined __arch64__
+ int ok;
+ #else
+ error fail
+ #endif
+
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"
+then :
+ gl_cv_host_cpu_c_abi_32bit=no
+else
+ gl_cv_host_cpu_c_abi_32bit=yes
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ ;;
+
+ *)
+ gl_cv_host_cpu_c_abi_32bit=no
+ ;;
+ esac
+ fi
+
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_host_cpu_c_abi_32bit" >&5
+printf "%s\n" "$gl_cv_host_cpu_c_abi_32bit" >&6; }
+
+ HOST_CPU_C_ABI_32BIT="$gl_cv_host_cpu_c_abi_32bit"
+
+
+
+
+
+ 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 :
@@ -11542,10 +11292,10 @@ else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#ifdef _LP64
- int ok;
- #else
- error fail
- #endif
+ int ok;
+ #else
+ error fail
+ #endif
_ACEOF
if ac_fn_c_try_compile "$LINENO"
@@ -11558,8 +11308,20 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_solaris_64bit" >&5
-printf "%s\n" "$gl_cv_solaris_64bit" >&6; }
- if test $gl_cv_solaris_64bit = yes; then
+printf "%s\n" "$gl_cv_solaris_64bit" >&6; };;
+ esac
+
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for the common suffixes of directories in the library search path" >&5
+printf %s "checking for the common suffixes of directories in the library search path... " >&6; }
+if test ${acl_cv_libdirstems+y}
+then :
+ printf %s "(cached) " >&6
+else
+ acl_libdirstem=lib
+ acl_libdirstem2=
+ case "$host_os" in
+ solaris*)
+ if test $gl_cv_solaris_64bit = yes; then
acl_libdirstem=lib/64
case "$host_cpu" in
sparc*) acl_libdirstem2=lib/sparcv9 ;;
@@ -11568,37 +11330,33 @@ printf "%s\n" "$gl_cv_solaris_64bit" >&6; }
fi
;;
*)
- case "$gl_cv_host_cpu_c_abi" in
- i386 | arm | armhf | arm64-ilp32 | hppa | ia64-ilp32 | mips | mipsn32 | powerpc | s390 | sparc)
- ;;
- *) # x86_64 | arm64 | hppa64 | ia64 | mips64 | powerpc64* | s390x | sparc64 | ...
- searchpath=`(if test -f /usr/bin/gcc \
- && LC_ALL=C /usr/bin/gcc -print-search-dirs >/dev/null 2>/dev/null; then \
- LC_ALL=C /usr/bin/gcc -print-search-dirs; \
- else \
- LC_ALL=C $CC -print-search-dirs; \
- fi) 2>/dev/null \
- | sed -n -e 's,^libraries: ,,p' | sed -e 's,^=,,'`
- if test -n "$searchpath"; then
- acl_save_IFS="${IFS= }"; IFS=":"
- for searchdir in $searchpath; do
- if test -d "$searchdir"; then
- case "$searchdir" in
- */lib64/ | */lib64 ) acl_libdirstem=lib64 ;;
- */../ | */.. )
- # Better ignore directories of this form. They are misleading.
- ;;
- *) searchdir=`cd "$searchdir" && pwd`
- case "$searchdir" in
- */lib64 ) acl_libdirstem=lib64 ;;
- esac ;;
- esac
- fi
- done
- IFS="$acl_save_IFS"
- fi
- ;;
- esac
+ if test "$HOST_CPU_C_ABI_32BIT" != yes; then
+ searchpath=`(if test -f /usr/bin/gcc \
+ && LC_ALL=C /usr/bin/gcc -print-search-dirs >/dev/null 2>/dev/null; then \
+ LC_ALL=C /usr/bin/gcc -print-search-dirs; \
+ else \
+ LC_ALL=C $CC -print-search-dirs; \
+ fi) 2>/dev/null \
+ | sed -n -e 's,^libraries: ,,p' | sed -e 's,^=,,'`
+ if test -n "$searchpath"; then
+ acl_save_IFS="${IFS= }"; IFS=":"
+ for searchdir in $searchpath; do
+ if test -d "$searchdir"; then
+ case "$searchdir" in
+ */lib64/ | */lib64 ) acl_libdirstem=lib64 ;;
+ */../ | */.. )
+ # Better ignore directories of this form. They are misleading.
+ ;;
+ *) searchdir=`cd "$searchdir" && pwd`
+ case "$searchdir" in
+ */lib64 ) acl_libdirstem=lib64 ;;
+ esac ;;
+ esac
+ fi
+ done
+ IFS="$acl_save_IFS"
+ fi
+ fi
;;
esac
test -n "$acl_libdirstem2" || acl_libdirstem2="$acl_libdirstem"
@@ -11693,6 +11451,78 @@ fi
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_have_weak" >&5
printf "%s\n" "$gl_cv_have_weak" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the linker supports --as-needed" >&5
+printf %s "checking whether the linker supports --as-needed... " >&6; }
+if test ${gl_cv_linker_have_as_needed+y}
+then :
+ printf %s "(cached) " >&6
+else
+ if test -n "$GCC"; then
+ gl_saved_ldflags="$LDFLAGS"
+ LDFLAGS="$gl_saved_ldflags -Wl,--as-needed -Wl,--no-as-needed"
+ 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_linker_have_as_needed=yes
+else
+ gl_cv_linker_have_as_needed=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+ LDFLAGS="$gl_saved_ldflags"
+ else
+ gl_cv_linker_have_as_needed=no
+ fi
+
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_linker_have_as_needed" >&5
+printf "%s\n" "$gl_cv_linker_have_as_needed" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the linker supports --push-state" >&5
+printf %s "checking whether the linker supports --push-state... " >&6; }
+if test ${gl_cv_linker_have_push_state+y}
+then :
+ printf %s "(cached) " >&6
+else
+ if test -n "$GCC"; then
+ gl_saved_ldflags="$LDFLAGS"
+ LDFLAGS="$gl_saved_ldflags -Wl,--push-state -Wl,--pop-state"
+ 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_linker_have_push_state=yes
+else
+ gl_cv_linker_have_push_state=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+ LDFLAGS="$gl_saved_ldflags"
+ else
+ gl_cv_linker_have_push_state=no
+ fi
+
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_linker_have_push_state" >&5
+printf "%s\n" "$gl_cv_linker_have_push_state" >&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.
@@ -11915,6 +11745,28 @@ printf "%s\n" "#define USE_POSIX_THREADS_WEAK 1" >>confdefs.h
LIBTHREAD=
LTLIBTHREAD=
+ case "$LIBMULTITHREAD" in
+ "") ;;
+ -pthread)
+ if test $gl_cv_linker_have_as_needed = yes; then
+ if test $gl_cv_linker_have_push_state = yes; then
+ LIBMULTITHREAD="$LIBMULTITHREAD -Wl,--push-state -Wl,--no-as-needed -lpthread -Wl,--pop-state"
+ else
+ LIBMULTITHREAD="$LIBMULTITHREAD -Wl,--no-as-needed -lpthread"
+ fi
+ fi
+ ;;
+ *)
+ if test $gl_cv_linker_have_as_needed = yes; then
+ if test $gl_cv_linker_have_push_state = yes; then
+ LIBMULTITHREAD="-Wl,--push-state -Wl,--no-as-needed $LIBMULTITHREAD -Wl,--pop-state"
+ else
+ LIBMULTITHREAD="-Wl,--no-as-needed $LIBMULTITHREAD"
+ fi
+ fi
+ ;;
+ esac
+ # TODO: May need to modify LTLIBMULTITHREAD similarly.
fi
fi
fi
@@ -11961,6 +11813,14 @@ printf "%s\n" "#define USE_SOLARIS_THREADS_WEAK 1" >>confdefs.h
LIBTHREAD=
LTLIBTHREAD=
+ if test $gl_cv_linker_have_as_needed = yes; then
+ if test $gl_cv_linker_have_push_state = yes; then
+ LIBMULTITHREAD="-Wl,--push-state -Wl,--no-as-needed $LIBMULTITHREAD -Wl,--pop-state"
+ else
+ LIBMULTITHREAD="-Wl,--no-as-needed $LIBMULTITHREAD"
+ fi
+ fi
+ # TODO: May need to modify LTLIBMULTITHREAD similarly.
fi
fi
fi
@@ -11985,7 +11845,6 @@ else
-
use_additional=yes
acl_save_prefix="$prefix"
@@ -12440,7 +12299,6 @@ fi
-
ac_cv_libpth_libs="$LIBPTH"
ac_cv_libpth_ltlibs="$LTLIBPTH"
ac_cv_libpth_cppflags="$INCPTH"
@@ -12520,6 +12378,14 @@ printf "%s\n" "#define USE_PTH_THREADS_WEAK 1" >>confdefs.h
LIBTHREAD=
LTLIBTHREAD=
+ if test $gl_cv_linker_have_as_needed = yes; then
+ if test $gl_cv_linker_have_push_state = yes; then
+ LIBMULTITHREAD="-Wl,--push-state -Wl,--no-as-needed $LIBMULTITHREAD -Wl,--pop-state"
+ else
+ LIBMULTITHREAD="-Wl,--no-as-needed $LIBMULTITHREAD"
+ fi
+ fi
+ # TODO: May need to modify LTLIBMULTITHREAD similarly.
fi
fi
else
@@ -12569,6 +12435,9 @@ else
if test "$cross_compiling" = yes
then :
case "$host_os" in
+ linux-* | linux)
+ # Guess yes on Linux systems.
+ gl_cv_func_lstat_dereferences_slashed_symlink="guessing yes" ;;
*-gnu* | gnu*)
# Guess yes on glibc systems.
gl_cv_func_lstat_dereferences_slashed_symlink="guessing yes" ;;
@@ -12711,7 +12580,7 @@ else
int
main (void)
{
-#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
+#if defined _WIN32 && ! defined __CYGWIN__
choke me
#endif
@@ -13008,7 +12877,7 @@ int main ()
return 1;
#else
/* Check whether the given locale name is recognized by the system. */
-# if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
+# if defined _WIN32 && !defined __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
@@ -13158,7 +13027,7 @@ int main ()
return 1;
#else
/* Check whether the given locale name is recognized by the system. */
-# if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
+# if defined _WIN32 && !defined __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
@@ -13296,7 +13165,7 @@ int main () {
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__
+# if 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
@@ -14104,6 +13973,50 @@ printf "%s\n" "#define C_LOCALE_MAYBE_EILSEQ 1" >>confdefs.h
fi
+{ 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
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#ifndef __cplusplus
+typedef int foo_t;
+static $ac_kw foo_t static_foo () {return 0; }
+$ac_kw foo_t foo () {return 0; }
+#endif
+
+_ACEOF
+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
+ test "$ac_cv_c_inline" != no && break
+done
+
+fi
+{ 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) ;;
+ *)
+ case $ac_cv_c_inline in
+ no) ac_val=;;
+ *) ac_val=$ac_cv_c_inline;;
+ esac
+ cat >>confdefs.h <<_ACEOF
+#ifndef __cplusplus
+#define inline $ac_val
+#endif
+_ACEOF
+ ;;
+esac
+
@@ -14517,49 +14430,44 @@ fi
printf "%s\n" "#define HAVE_DECL_ALARM $ac_have_decl" >>confdefs.h
-{ 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}
+
+ { 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
- ac_cv_c_inline=no
-for ac_kw in inline __inline__ __inline; do
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
-#ifndef __cplusplus
-typedef int foo_t;
-static $ac_kw foo_t static_foo () {return 0; }
-$ac_kw foo_t foo () {return 0; }
+
+#include <features.h>
+#ifdef __GNU_LIBRARY__
+ #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2)
+ Lucky GNU user
+ #endif
+#endif
+#ifdef __UCLIBC__
+ Lucky user
#endif
_ACEOF
-if ac_fn_c_try_compile "$LINENO"
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ $EGREP "Lucky" >/dev/null 2>&1
then :
- ac_cv_c_inline=$ac_kw
+ ac_cv_gnu_library_2_1=yes
+else
+ ac_cv_gnu_library_2_1=no
fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
- test "$ac_cv_c_inline" != no && break
-done
+rm -rf conftest*
+
+
fi
-{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
-printf "%s\n" "$ac_cv_c_inline" >&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"
-case $ac_cv_c_inline in
- inline | yes) ;;
- *)
- case $ac_cv_c_inline in
- no) ac_val=;;
- *) ac_val=$ac_cv_c_inline;;
- esac
- cat >>confdefs.h <<_ACEOF
-#ifndef __cplusplus
-#define inline $ac_val
-#endif
-_ACEOF
- ;;
-esac
@@ -15695,7 +15603,9 @@ printf "%s\n" "$ac_res" >&6; }
;;
esac
- LIMITS_H=limits.h
+
+
+ LIMITS_H='limits.h'
if test -n "$LIMITS_H"; then
GL_GENERATE_LIMITS_H_TRUE=
GL_GENERATE_LIMITS_H_FALSE='#'
@@ -15709,6 +15619,7 @@ fi
+
if test -n "$STDINT_H"; then
GL_GENERATE_STDINT_H_TRUE=
GL_GENERATE_STDINT_H_FALSE='#'
@@ -16034,47 +15945,7 @@ printf "%s\n" "$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=`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 (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
@@ -16481,6 +16352,16 @@ fi
printf "%s\n" "#define HAVE_DECL_FWRITE_UNLOCKED $ac_have_decl" >>confdefs.h
+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 :
+ ac_have_decl=1
+else
+ ac_have_decl=0
+fi
+
+printf "%s\n" "#define HAVE_DECL_GETC_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 :
@@ -16855,50 +16736,7 @@ fi
- for gl_func in socket connect accept bind getpeername getsockname getsockopt listen recv send recvfrom sendto setsockopt shutdown accept4; do
- as_gl_Symbol=`printf "%s\n" "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
- { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
-printf %s "checking whether $gl_func is declared without a macro... " >&6; }
-if eval test \${$as_gl_Symbol+y}
-then :
- printf %s "(cached) " >&6
-else
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-/* Some systems require prerequisite headers. */
-#include <sys/types.h>
-#include <sys/socket.h>
-
-int
-main (void)
-{
-#undef $gl_func
- (void) $gl_func;
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"
-then :
- eval "$as_gl_Symbol=yes"
-else
- eval "$as_gl_Symbol=no"
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-eval ac_res=\$$as_gl_Symbol
- { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
-printf "%s\n" "$ac_res" >&6; }
- if eval test \"x\$"$as_gl_Symbol"\" = x"yes"
-then :
- cat >>confdefs.h <<_ACEOF
-#define `printf "%s\n" "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
-_ACEOF
- eval ac_cv_have_decl_$gl_func=yes
-fi
- done
@@ -16943,12 +16781,11 @@ fi
{ 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}
+if test ${gt_cv_var_environ_declaration+y}
then :
printf %s "(cached) " >&6
else
-
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#if HAVE_UNISTD_H
#include <unistd.h>
@@ -16956,7 +16793,7 @@ else
/* mingw, BeOS, Haiku declare environ in <stdlib.h>, not in <unistd.h>. */
#include <stdlib.h>
- extern struct { int foo; } environ;
+ extern struct { int foo; } environ;
int
main (void)
{
@@ -16973,8 +16810,7 @@ else
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" "$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
@@ -17487,7 +17323,7 @@ int
main (void)
{
-#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
+#if defined _WIN32 && ! defined __CYGWIN__
/* mingw cwd does not start with '/', but getcwd does allocate.
However, mingw fails to honor non-zero size. */
#else
@@ -17580,7 +17416,7 @@ printf "%s\n" "#define HAVE_DECL_GETDTABLESIZE $ac_have_decl" >>confdefs.h
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for IPv4 sockets" >&5
printf %s "checking for IPv4 sockets... " >&6; }
- if test ${gl_cv_socket_ipv4+y}
+if test ${gl_cv_socket_ipv4+y}
then :
printf %s "(cached) " >&6
else
@@ -17613,8 +17449,7 @@ else
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
-
- { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_socket_ipv4" >&5
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_socket_ipv4" >&5
printf "%s\n" "$gl_cv_socket_ipv4" >&6; }
if test $gl_cv_socket_ipv4 = yes; then
@@ -17624,7 +17459,7 @@ printf "%s\n" "#define HAVE_IPV4 1" >>confdefs.h
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for IPv6 sockets" >&5
printf %s "checking for IPv6 sockets... " >&6; }
- if test ${gl_cv_socket_ipv6+y}
+if test ${gl_cv_socket_ipv6+y}
then :
printf %s "(cached) " >&6
else
@@ -17660,8 +17495,7 @@ else
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
-
- { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_socket_ipv6" >&5
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_socket_ipv6" >&5
printf "%s\n" "$gl_cv_socket_ipv6" >&6; }
if test $gl_cv_socket_ipv6 = yes; then
@@ -17678,6 +17512,7 @@ printf "%s\n" "#define HAVE_IPV6 1" >>confdefs.h
HAVE_DECL_IMAXDIV=1;
HAVE_DECL_STRTOIMAX=1;
HAVE_DECL_STRTOUMAX=1;
+ HAVE_IMAXDIV_T=1;
REPLACE_STRTOIMAX=0;
REPLACE_STRTOUMAX=0;
INT32_MAX_LT_INTMAX_MAX=1;
@@ -17775,47 +17610,7 @@ printf "%s\n" "$gl_cv_next_inttypes_h" >&6; }
- 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
@@ -17909,6 +17704,201 @@ printf "%s\n" "#define HAVE_LC_MESSAGES 1" >>confdefs.h
fi
+
+
+
+
+
+
+
+
+
+
+ if test $ac_cv_func_uselocale = yes; then
+
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether uselocale works" >&5
+printf %s "checking whether uselocale works... " >&6; }
+if test ${gt_cv_func_uselocale_works+y}
+then :
+ printf %s "(cached) " >&6
+else
+ if test "$cross_compiling" = yes
+then :
+ # Guess no on AIX, yes otherwise.
+ case "$host_os" in
+ aix*) gt_cv_func_uselocale_works="guessing no" ;;
+ *) gt_cv_func_uselocale_works="guessing yes" ;;
+ esac
+
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#include <locale.h>
+#if HAVE_XLOCALE_H
+# include <xlocale.h>
+#endif
+int main ()
+{
+ uselocale (NULL);
+ setlocale (LC_ALL, "en_US.UTF-8");
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"
+then :
+ gt_cv_func_uselocale_works=yes
+else
+ gt_cv_func_uselocale_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: $gt_cv_func_uselocale_works" >&5
+printf "%s\n" "$gt_cv_func_uselocale_works" >&6; }
+ else
+ gt_cv_func_uselocale_works=no
+ fi
+ case "$gt_cv_func_uselocale_works" in
+ *yes)
+
+printf "%s\n" "#define HAVE_WORKING_USELOCALE 1" >>confdefs.h
+
+ ;;
+ esac
+
+
+ case "$gt_cv_func_uselocale_works" in
+ *yes)
+
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for fake locale system (OpenBSD)" >&5
+printf %s "checking for fake locale system (OpenBSD)... " >&6; }
+if test ${gt_cv_locale_fake+y}
+then :
+ printf %s "(cached) " >&6
+else
+ if test "$cross_compiling" = yes
+then :
+ case "$host_os" in
+ openbsd*) gt_cv_locale_fake="guessing yes" ;;
+ *) gt_cv_locale_fake="guessing no" ;;
+ esac
+
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#include <locale.h>
+#if HAVE_XLOCALE_H
+# include <xlocale.h>
+#endif
+int main ()
+{
+ locale_t loc1, loc2;
+ if (setlocale (LC_ALL, "de_DE.UTF-8") == NULL) return 1;
+ if (setlocale (LC_ALL, "fr_FR.UTF-8") == NULL) return 1;
+ loc1 = newlocale (LC_ALL_MASK, "de_DE.UTF-8", (locale_t)0);
+ loc2 = newlocale (LC_ALL_MASK, "fr_FR.UTF-8", (locale_t)0);
+ return !(loc1 == loc2);
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"
+then :
+ gt_cv_locale_fake=yes
+else
+ gt_cv_locale_fake=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: $gt_cv_locale_fake" >&5
+printf "%s\n" "$gt_cv_locale_fake" >&6; }
+ ;;
+ *) gt_cv_locale_fake=no ;;
+ esac
+ case "$gt_cv_locale_fake" in
+ *yes)
+
+printf "%s\n" "#define HAVE_FAKE_LOCALES 1" >>confdefs.h
+
+ ;;
+ esac
+
+ case "$gt_cv_func_uselocale_works" in
+ *yes)
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for Solaris 11.4 locale system" >&5
+printf %s "checking for Solaris 11.4 locale system... " >&6; }
+if test ${gt_cv_locale_solaris114+y}
+then :
+ printf %s "(cached) " >&6
+else
+ case "$host_os" in
+ solaris*)
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+ #include <locale.h>
+ struct _LC_locale_t *x;
+ locale_t y;
+
+int
+main (void)
+{
+*y = x;
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"
+then :
+ gt_cv_locale_solaris114=yes
+else
+ gt_cv_locale_solaris114=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ ;;
+ *) gt_cv_locale_solaris114=no ;;
+ esac
+
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_solaris114" >&5
+printf "%s\n" "$gt_cv_locale_solaris114" >&6; }
+ ;;
+ *) gt_cv_locale_solaris114=no ;;
+ esac
+ if test $gt_cv_locale_solaris114 = yes; then
+
+printf "%s\n" "#define HAVE_SOLARIS114_LOCALES 1" >>confdefs.h
+
+ fi
+
+ case "$gt_cv_func_uselocale_works" in
+ *yes)
+ 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
+
+ ;;
+ esac
+
+ gt_nameless_locales=no
+ if false; then
+ gt_nameless_locales=yes
+
+printf "%s\n" "#define HAVE_NAMELESS_LOCALES 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}
@@ -17981,13 +17971,53 @@ printf "%s\n" "$gt_cv_func_CFLocaleCopyCurrent" >&6; }
printf "%s\n" "#define HAVE_CFLOCALECOPYCURRENT 1" >>confdefs.h
fi
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for CFLocaleCopyPreferredLanguages" >&5
+printf %s "checking for CFLocaleCopyPreferredLanguages... " >&6; }
+if test ${gt_cv_func_CFLocaleCopyPreferredLanguages+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)
+{
+CFLocaleCopyPreferredLanguages();
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"
+then :
+ gt_cv_func_CFLocaleCopyPreferredLanguages=yes
+else
+ gt_cv_func_CFLocaleCopyPreferredLanguages=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_CFLocaleCopyPreferredLanguages" >&5
+printf "%s\n" "$gt_cv_func_CFLocaleCopyPreferredLanguages" >&6; }
+ if test $gt_cv_func_CFLocaleCopyPreferredLanguages = yes; then
+
+printf "%s\n" "#define HAVE_CFLOCALECOPYPREFERREDLANGUAGES 1" >>confdefs.h
+
+ fi
INTL_MACOSX_LIBS=
- if test $gt_cv_func_CFPreferencesCopyAppValue = yes || test $gt_cv_func_CFLocaleCopyCurrent = yes; then
+ if test $gt_cv_func_CFPreferencesCopyAppValue = yes \
+ || test $gt_cv_func_CFLocaleCopyCurrent = yes \
+ || test $gt_cv_func_CFLocaleCopyPreferredLanguages = yes; then
INTL_MACOSX_LIBS="-Wl,-framework -Wl,CoreFoundation"
fi
+
+
GNULIB_PSELECT=0;
GNULIB_SELECT=0;
HAVE_PSELECT=1;
@@ -18192,53 +18222,7 @@ fi
- for gl_func in pselect select; do
- as_gl_Symbol=`printf "%s\n" "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
- { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
-printf %s "checking whether $gl_func is declared without a macro... " >&6; }
-if eval test \${$as_gl_Symbol+y}
-then :
- printf %s "(cached) " >&6
-else
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-/* Some systems require prerequisite headers. */
-#include <sys/types.h>
-#if !(defined __GLIBC__ && !defined __UCLIBC__) && HAVE_SYS_TIME_H
-# include <sys/time.h>
-#endif
-#include <sys/select.h>
-int
-main (void)
-{
-#undef $gl_func
- (void) $gl_func;
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"
-then :
- eval "$as_gl_Symbol=yes"
-else
- eval "$as_gl_Symbol=no"
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-eval ac_res=\$$as_gl_Symbol
- { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
-printf "%s\n" "$ac_res" >&6; }
- if eval test \"x\$"$as_gl_Symbol"\" = x"yes"
-then :
- cat >>confdefs.h <<_ACEOF
-#define `printf "%s\n" "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
-_ACEOF
-
- eval ac_cv_have_decl_$gl_func=yes
-fi
- done
@@ -18507,10 +18491,12 @@ else
then :
case "$host_os" in
- # Guess yes on glibc systems.
- *-gnu* | gnu*) gl_cv_func_select_detects_ebadf="guessing yes" ;;
- # If we don't know, assume the worst.
- *) gl_cv_func_select_detects_ebadf="guessing no" ;;
+ # Guess yes on Linux systems.
+ linux-* | linux) gl_cv_func_select_detects_ebadf="guessing yes" ;;
+ # Guess yes on glibc systems.
+ *-gnu* | gnu*) gl_cv_func_select_detects_ebadf="guessing yes" ;;
+ # If we don't know, assume the worst.
+ *) gl_cv_func_select_detects_ebadf="guessing no" ;;
esac
else
@@ -18869,7 +18855,7 @@ fi
if test $ac_cv_header_sys_acl_h = yes; then
ac_save_LIBS=$LIBS
- if test $use_acl = 0; then
+ if test $use_acl = 0; then
{ 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}
@@ -19576,8 +19562,8 @@ printf "%s\n" "$gl_cv___builtin_expect" >&6; }
HAVE_REALPATH=0
else
case "$gl_cv_func_realpath_works" in
- *yes) ;;
- *) REPLACE_REALPATH=1 ;;
+ *yes) ;;
+ *) REPLACE_REALPATH=1 ;;
esac
fi
else
@@ -19665,47 +19651,6 @@ printf "%s\n" "#define GNULIB_CLOSE_STREAM 1" >>confdefs.h
:
- if test "x$datarootdir" = x; then
- datarootdir='${datadir}'
-
- fi
- if test "x$docdir" = x; then
- docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
-
- fi
- if test "x$htmldir" = x; then
- htmldir='${docdir}'
-
- fi
- if test "x$dvidir" = x; then
- dvidir='${docdir}'
-
- fi
- if test "x$pdfdir" = x; then
- pdfdir='${docdir}'
-
- fi
- if test "x$psdir" = x; then
- psdir='${docdir}'
-
- fi
- if test "x$lispdir" = x; then
- lispdir='${datarootdir}/emacs/site-lisp'
-
- fi
- if test "x$localedir" = x; then
- localedir='${datarootdir}/locale'
-
- fi
- if test "x$runstatedir" = x; then
- runstatedir='${localstatedir}/run'
-
- fi
-
- pkglibexecdir='${libexecdir}/${PACKAGE}'
-
-
-
@@ -19782,47 +19727,7 @@ printf "%s\n" "$gl_cv_next_ctype_h" >&6; }
- 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
@@ -20006,47 +19911,7 @@ printf "%s\n" "$gl_cv_next_fcntl_h" >&6; }
- for gl_func in fcntl openat; 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 <fcntl.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
@@ -20690,10 +20555,6 @@ printf "%s\n" "#define GNULIB_TEST_GETTIMEOFDAY 1" >>confdefs.h
ac_config_links="$ac_config_links $GNUmakefile:$GNUmakefile"
- :
-
-
-
@@ -20993,60 +20854,50 @@ printf "%s\n" "$gl_cv_header_langinfo_yesexpr" >&6; }
- for gl_func in nl_langinfo; do
- as_gl_Symbol=`printf "%s\n" "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
- { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
-printf %s "checking whether $gl_func is declared without a macro... " >&6; }
-if eval test \${$as_gl_Symbol+y}
+
+
+
+
+
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports the __inline keyword" >&5
+printf %s "checking whether the compiler supports the __inline keyword... " >&6; }
+if test ${gl_cv_c___inline+y}
then :
printf %s "(cached) " >&6
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
-#include <langinfo.h>
-
+typedef int foo_t;
+ static __inline foo_t foo (void) { return 0; }
int
main (void)
{
-#undef $gl_func
- (void) $gl_func;
+return foo ();
;
return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"
then :
- eval "$as_gl_Symbol=yes"
+ gl_cv_c___inline=yes
else
- eval "$as_gl_Symbol=no"
+ gl_cv_c___inline=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}: result: $gl_cv_c___inline" >&5
+printf "%s\n" "$gl_cv_c___inline" >&6; }
+ if test $gl_cv_c___inline = yes; then
+printf "%s\n" "#define HAVE___INLINE 1" >>confdefs.h
+ fi
- LOCALCHARSET_TESTS_ENVIRONMENT="CHARSETALIASDIR=\"\$(abs_top_builddir)/$gl_source_base\""
+ LOCALCHARSET_TESTS_ENVIRONMENT=
@@ -21246,51 +21097,7 @@ printf "%s\n" "$gl_cv_next_locale_h" >&6; }
- for gl_func in setlocale duplocale; 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 <locale.h>
-/* Some systems provide declarations in a non-standard header. */
-#if HAVE_XLOCALE_H
-# include <xlocale.h>
-#endif
-
-int
-main (void)
-{
-#undef $gl_func
- (void) $gl_func;
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"
-then :
- eval "$as_gl_Symbol=yes"
-else
- eval "$as_gl_Symbol=no"
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-eval ac_res=\$$as_gl_Symbol
- { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
-printf "%s\n" "$ac_res" >&6; }
- if eval test \"x\$"$as_gl_Symbol"\" = x"yes"
-then :
- cat >>confdefs.h <<_ACEOF
-#define `printf "%s\n" "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
-_ACEOF
- eval ac_cv_have_decl_$gl_func=yes
-fi
- done
@@ -22430,6 +22237,7 @@ printf "%s\n" "#define C_LOCALE_MAYBE_EILSEQ 1" >>confdefs.h
gl_LIBOBJS="$gl_LIBOBJS mbrtowc.$ac_objext"
+
:
fi
@@ -22800,6 +22608,154 @@ printf "%s\n" "#define GNULIB_TEST_MEMRCHR 1" >>confdefs.h
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether mkdir handles trailing slash" >&5
+printf %s "checking whether mkdir handles trailing slash... " >&6; }
+if test ${gl_cv_func_mkdir_trailing_slash_works+y}
+then :
+ printf %s "(cached) " >&6
+else
+ rm -rf conftest.dir
+ if test "$cross_compiling" = yes
+then :
+ case "$host_os" in
+ # Guess yes on Linux systems.
+ linux-* | linux) gl_cv_func_mkdir_trailing_slash_works="guessing yes" ;;
+ # Guess yes on glibc systems.
+ *-gnu* | gnu*) gl_cv_func_mkdir_trailing_slash_works="guessing yes" ;;
+ # Guess yes on MSVC, no on mingw.
+ mingw*) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#ifdef _MSC_VER
+ Known
+#endif
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ $EGREP "Known" >/dev/null 2>&1
+then :
+ gl_cv_func_mkdir_trailing_slash_works="guessing yes"
+else
+ gl_cv_func_mkdir_trailing_slash_works="guessing no"
+fi
+rm -rf conftest*
+
+ ;;
+ # If we don't know, assume the worst.
+ *) gl_cv_func_mkdir_trailing_slash_works="guessing no" ;;
+ esac
+
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+# include <sys/types.h>
+# include <sys/stat.h>
+
+int
+main (void)
+{
+return mkdir ("conftest.dir/", 0700);
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"
+then :
+ gl_cv_func_mkdir_trailing_slash_works=yes
+else
+ gl_cv_func_mkdir_trailing_slash_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 -rf conftest.dir
+
+
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mkdir_trailing_slash_works" >&5
+printf "%s\n" "$gl_cv_func_mkdir_trailing_slash_works" >&6; }
+ case "$gl_cv_func_mkdir_trailing_slash_works" in
+ *yes) ;;
+ *)
+ REPLACE_MKDIR=1
+ ;;
+ esac
+
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether mkdir handles trailing dot" >&5
+printf %s "checking whether mkdir handles trailing dot... " >&6; }
+if test ${gl_cv_func_mkdir_trailing_dot_works+y}
+then :
+ printf %s "(cached) " >&6
+else
+ rm -rf conftest.dir
+ if test "$cross_compiling" = yes
+then :
+ case "$host_os" in
+ # Guess yes on glibc systems.
+ *-gnu* | gnu*) gl_cv_func_mkdir_trailing_dot_works="guessing yes" ;;
+ # Guess no on native Windows.
+ mingw*) gl_cv_func_mkdir_trailing_dot_works="guessing no" ;;
+ # If we don't know, assume the worst.
+ *) gl_cv_func_mkdir_trailing_dot_works="guessing no" ;;
+ esac
+
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+# include <sys/types.h>
+# include <sys/stat.h>
+
+int
+main (void)
+{
+return !mkdir ("conftest.dir/./", 0700);
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"
+then :
+ gl_cv_func_mkdir_trailing_dot_works=yes
+else
+ gl_cv_func_mkdir_trailing_dot_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 -rf conftest.dir
+
+
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mkdir_trailing_dot_works" >&5
+printf "%s\n" "$gl_cv_func_mkdir_trailing_dot_works" >&6; }
+ case "$gl_cv_func_mkdir_trailing_dot_works" in
+ *yes) ;;
+ *)
+ REPLACE_MKDIR=1
+
+printf "%s\n" "#define FUNC_MKDIR_DOT_BUG 1" >>confdefs.h
+
+ ;;
+ esac
+
+ if test $REPLACE_MKDIR = 1; then
+
+
+
+
+
+
+
+
+ gl_LIBOBJS="$gl_LIBOBJS mkdir.$ac_objext"
+
+ fi
+
+
@@ -23118,10 +23074,12 @@ else
if test "$cross_compiling" = yes
then :
case "$host_os" in
- # Guess yes on glibc systems.
- *-gnu* | gnu*) gl_cv_func_readlink_works="guessing yes" ;;
- # If we don't know, assume the worst.
- *) gl_cv_func_readlink_works="guessing no" ;;
+ # Guess yes on Linux systems.
+ linux-* | linux) gl_cv_func_readlink_works="guessing yes" ;;
+ # Guess yes on glibc systems.
+ *-gnu* | gnu*) gl_cv_func_readlink_works="guessing yes" ;;
+ # If we don't know, assume the worst.
+ *) gl_cv_func_readlink_works="guessing no" ;;
esac
else
@@ -23416,6 +23374,17 @@ int result = 0;
if (! REG_STARTEND)
result |= 64;
+ /* Matching with the compiled form of this regexp would provoke
+ an assertion failure prior to glibc-2.28:
+ regexec.c:1375: pop_fail_stack: Assertion 'num >= 0' failed
+ With glibc-2.28, compilation fails and reports the invalid
+ back reference. */
+ re_set_syntax (RE_SYNTAX_POSIX_EGREP);
+ memset (&regex, 0, sizeof regex);
+ s = re_compile_pattern ("0|()0|\\1|0", 10, &regex);
+ if (!s || strcmp (s, "Invalid back reference"))
+ 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
@@ -23571,12 +23540,14 @@ else
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" ;;
- # Guess no on native Windows.
- mingw*) gl_cv_func_rename_slash_dst_works="guessing no" ;;
- # If we don't know, assume the worst.
- *) gl_cv_func_rename_slash_dst_works="guessing no" ;;
+ # Guess yes on Linux systems.
+ linux-* | linux) gl_cv_func_rename_slash_dst_works="guessing yes" ;;
+ # Guess yes on glibc systems.
+ *-gnu*) gl_cv_func_rename_slash_dst_works="guessing yes" ;;
+ # Guess no on native Windows.
+ mingw*) gl_cv_func_rename_slash_dst_works="guessing no" ;;
+ # If we don't know, assume the worst.
+ *) gl_cv_func_rename_slash_dst_works="guessing no" ;;
esac
else
@@ -23645,12 +23616,14 @@ else
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" ;;
- # Guess yes on native Windows.
- mingw*) gl_cv_func_rename_slash_src_works="guessing yes" ;;
- # If we don't know, assume the worst.
- *) gl_cv_func_rename_slash_src_works="guessing no" ;;
+ # Guess yes on Linux systems.
+ linux-* | linux) gl_cv_func_rename_slash_src_works="guessing yes" ;;
+ # Guess yes on glibc systems.
+ *-gnu*) gl_cv_func_rename_slash_src_works="guessing yes" ;;
+ # Guess yes on native Windows.
+ mingw*) gl_cv_func_rename_slash_src_works="guessing yes" ;;
+ # If we don't know, assume the worst.
+ *) gl_cv_func_rename_slash_src_works="guessing no" ;;
esac
else
@@ -23717,12 +23690,14 @@ else
if test "$cross_compiling" = yes
then :
case "$host_os" in
- # Guess yes on glibc systems.
- *-gnu*) gl_cv_func_rename_link_works="guessing yes" ;;
- # Guess yes on native Windows.
- mingw*) gl_cv_func_rename_link_works="guessing yes" ;;
- # If we don't know, assume the worst.
- *) gl_cv_func_rename_link_works="guessing no" ;;
+ # Guess yes on Linux systems.
+ linux-* | linux) gl_cv_func_rename_link_works="guessing yes" ;;
+ # Guess yes on glibc systems.
+ *-gnu*) gl_cv_func_rename_link_works="guessing yes" ;;
+ # Guess yes on native Windows.
+ mingw*) gl_cv_func_rename_link_works="guessing yes" ;;
+ # If we don't know, assume the worst.
+ *) gl_cv_func_rename_link_works="guessing no" ;;
esac
else
@@ -23803,12 +23778,14 @@ else
if test "$cross_compiling" = yes
then :
case "$host_os" in
- # Guess yes on glibc systems.
- *-gnu*) gl_cv_func_rename_dest_works="guessing yes" ;;
- # Guess no on native Windows.
- mingw*) gl_cv_func_rename_dest_works="guessing no" ;;
- # If we don't know, assume the worst.
- *) gl_cv_func_rename_dest_works="guessing no" ;;
+ # Guess yes on Linux systems.
+ linux-* | linux) gl_cv_func_rename_dest_works="guessing yes" ;;
+ # Guess yes on glibc systems.
+ *-gnu*) gl_cv_func_rename_dest_works="guessing yes" ;;
+ # Guess no on native Windows.
+ mingw*) gl_cv_func_rename_dest_works="guessing no" ;;
+ # If we don't know, assume the worst.
+ *) gl_cv_func_rename_dest_works="guessing no" ;;
esac
else
@@ -23898,12 +23875,14 @@ else
if test "$cross_compiling" = yes
then :
case "$host_os" in
- # Guess yes on glibc systems.
- *-gnu* | gnu*) gl_cv_func_rmdir_works="guessing yes" ;;
- # Guess no on native Windows.
- mingw*) gl_cv_func_rmdir_works="guessing no" ;;
- # If we don't know, assume the worst.
- *) gl_cv_func_rmdir_works="guessing no" ;;
+ # Guess yes on Linux systems.
+ linux-* | linux) gl_cv_func_rmdir_works="guessing yes" ;;
+ # Guess yes on glibc systems.
+ *-gnu* | gnu*) gl_cv_func_rmdir_works="guessing yes" ;;
+ # Guess no on native Windows.
+ mingw*) gl_cv_func_rmdir_works="guessing no" ;;
+ # If we don't know, assume the worst.
+ *) gl_cv_func_rmdir_works="guessing no" ;;
esac
else
@@ -24199,10 +24178,12 @@ else
if test "$cross_compiling" = yes
then :
case "$host_os" in
- # Guess yes on glibc systems.
- *-gnu* | gnu*) gl_cv_func_stat_file_slash="guessing yes" ;;
- # If we don't know, assume the worst.
- *) gl_cv_func_stat_file_slash="guessing no" ;;
+ # Guess yes on Linux systems.
+ linux-* | linux) gl_cv_func_stat_file_slash="guessing yes" ;;
+ # Guess yes on glibc systems.
+ *-gnu* | gnu*) gl_cv_func_stat_file_slash="guessing yes" ;;
+ # If we don't know, assume the worst.
+ *) gl_cv_func_stat_file_slash="guessing no" ;;
esac
else
@@ -24512,12 +24493,11 @@ fi
NEXT_STDARG_H='<stdarg.h>'
{ 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}
+if test ${gl_cv_func_va_copy+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>
int
@@ -24539,9 +24519,9 @@ else
gl_cv_func_va_copy=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
- { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_va_copy" >&5
+fi
+{ 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
@@ -24727,20 +24707,51 @@ 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
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for good max_align_t" >&5
+printf %s "checking for good max_align_t... " >&6; }
+if test ${gl_cv_type_max_align_t+y}
then :
+ printf %s "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <stddef.h>
+ unsigned int s = sizeof (max_align_t);
+ #if defined __GNUC__ || defined __IBM__ALIGNOF__
+ int check1[2 * (__alignof__ (double) <= __alignof__ (max_align_t)) - 1];
+ int check2[2 * (__alignof__ (long double) <= __alignof__ (max_align_t)) - 1];
+ #endif
+
+int
+main (void)
+{
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"
+then :
+ gl_cv_type_max_align_t=yes
else
- HAVE_MAX_ALIGN_T=0; STDDEF_H=stddef.h
+ gl_cv_type_max_align_t=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_type_max_align_t" >&5
+printf "%s\n" "$gl_cv_type_max_align_t" >&6; }
+ if test $gl_cv_type_max_align_t = no; then
+ 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
+
{ 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}
@@ -24775,6 +24786,7 @@ printf "%s\n" "$gl_cv_decl_null_works" >&6; }
STDDEF_H=stddef.h
fi
+
if test -n "$STDDEF_H"; then
GL_GENERATE_STDDEF_H_TRUE=
GL_GENERATE_STDDEF_H_FALSE='#'
@@ -24952,7 +24964,7 @@ else
/* 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__) && \
+ #if (defined _WIN32 && ! defined __CYGWIN__) && \
(__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4))
extern char PRIdMAX_probe[sizeof PRIdMAX == sizeof "I64d" ? 1 : -1];
#endif
@@ -25014,47 +25026,7 @@ printf "%s\n" "#define GNULIB_SCANF 1" >>confdefs.h
- for gl_func in dprintf fpurge fseeko ftello getdelim getline gets pclose popen renameat snprintf tmpfile vdprintf vsnprintf; 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 <stdio.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
@@ -25133,56 +25105,7 @@ printf "%s\n" "$gl_cv_next_stdlib_h" >&6; }
- for gl_func in _Exit atoll canonicalize_file_name getloadavg getsubopt grantpt initstate initstate_r mkdtemp mkostemp mkostemps mkstemp mkstemps posix_openpt ptsname ptsname_r qsort_r random random_r reallocarray realpath rpmatch secure_getenv setenv setstate setstate_r srandom srandom_r strtod strtoll strtoull unlockpt unsetenv; do
- as_gl_Symbol=`printf "%s\n" "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
- { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
-printf %s "checking whether $gl_func is declared without a macro... " >&6; }
-if eval test \${$as_gl_Symbol+y}
-then :
- printf %s "(cached) " >&6
-else
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-#include <stdlib.h>
-#if HAVE_SYS_LOADAVG_H
-/* OpenIndiana has a bug: <sys/time.h> must be included before
- <sys/loadavg.h>. */
-# include <sys/time.h>
-# include <sys/loadavg.h>
-#endif
-#if HAVE_RANDOM_H
-# include <random.h>
-#endif
-int
-main (void)
-{
-#undef $gl_func
- (void) $gl_func;
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"
-then :
- eval "$as_gl_Symbol=yes"
-else
- eval "$as_gl_Symbol=no"
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-eval ac_res=\$$as_gl_Symbol
- { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
-printf "%s\n" "$ac_res" >&6; }
- if eval test \"x\$"$as_gl_Symbol"\" = x"yes"
-then :
- cat >>confdefs.h <<_ACEOF
-#define `printf "%s\n" "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
-_ACEOF
-
- eval ac_cv_have_decl_$gl_func=yes
-fi
- done
@@ -25477,47 +25400,7 @@ fi
- for gl_func in fchmodat fstat fstatat futimens lchmod lstat mkdirat mkfifo mkfifoat mknod mknodat stat utimensat; do
- as_gl_Symbol=`printf "%s\n" "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
- { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
-printf %s "checking whether $gl_func is declared without a macro... " >&6; }
-if eval test \${$as_gl_Symbol+y}
-then :
- printf %s "(cached) " >&6
-else
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-#include <sys/stat.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
@@ -25633,59 +25516,7 @@ printf "%s\n" "$gl_cv_next_unistd_h" >&6; }
- for gl_func in chdir chown dup dup2 dup3 environ euidaccess faccessat fchdir fchownat fdatasync fsync ftruncate getcwd getdomainname getdtablesize getgroups gethostname getlogin getlogin_r getpagesize getusershell setusershell endusershell group_member isatty lchown link linkat lseek pipe pipe2 pread pwrite readlink readlinkat rmdir sethostname sleep symlink symlinkat truncate ttyname_r unlink unlinkat usleep; do
- as_gl_Symbol=`printf "%s\n" "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
- { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
-printf %s "checking whether $gl_func is declared without a macro... " >&6; }
-if eval test \${$as_gl_Symbol+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
-/* Some systems declare various items in the wrong headers. */
-#if !(defined __GLIBC__ && !defined __UCLIBC__)
-# include <fcntl.h>
-# include <stdio.h>
-# include <stdlib.h>
-# if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
-# include <io.h>
-# endif
-#endif
-
-int
-main (void)
-{
-#undef $gl_func
- (void) $gl_func;
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"
-then :
- eval "$as_gl_Symbol=yes"
-else
- eval "$as_gl_Symbol=no"
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-eval ac_res=\$$as_gl_Symbol
- { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
-printf "%s\n" "$ac_res" >&6; }
- if eval test \"x\$"$as_gl_Symbol"\" = x"yes"
-then :
- cat >>confdefs.h <<_ACEOF
-#define `printf "%s\n" "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
-_ACEOF
- eval ac_cv_have_decl_$gl_func=yes
-fi
- done
@@ -25859,57 +25690,7 @@ printf "%s\n" "$gl_cv_next_wchar_h" >&6; }
- for gl_func in btowc wctob mbsinit mbrtowc mbrlen mbsrtowcs mbsnrtowcs wcrtomb wcsrtombs wcsnrtombs wcwidth wmemchr wmemcmp wmemcpy wmemmove wmemset wcslen wcsnlen wcscpy wcpcpy wcsncpy wcpncpy wcscat wcsncat wcscmp wcsncmp wcscasecmp wcsncasecmp wcscoll wcsxfrm wcsdup wcschr wcsrchr wcscspn wcsspn wcspbrk wcsstr wcstok wcswidth wcsftime ; do
- as_gl_Symbol=`printf "%s\n" "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
- { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
-printf %s "checking whether $gl_func is declared without a macro... " >&6; }
-if eval test \${$as_gl_Symbol+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
-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
@@ -26754,58 +26535,7 @@ printf "%s\n" "$gl_cv_type_wctrans_t" >&6; }
fi
- for gl_func in wctype iswctype wctrans towctrans ; 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. */
-
-/* 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>
-# include <wchar.h>
-#endif
-#include <wctype.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
:
@@ -26962,55 +26692,7 @@ printf "%s\n" "$gl_cv_next_arpa_inet_h" >&6; }
- for gl_func in inet_ntop inet_pton; do
- as_gl_Symbol=`printf "%s\n" "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
- { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
-printf %s "checking whether $gl_func is declared without a macro... " >&6; }
-if eval test \${$as_gl_Symbol+y}
-then :
- printf %s "(cached) " >&6
-else
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-/* On some systems, this header is not self-consistent. */
-#if !(defined __GLIBC__ || defined __UCLIBC__)
-# include <sys/socket.h>
-#endif
-#ifdef __TANDEM
-# include <netdb.h>
-#endif
-#include <arpa/inet.h>
-
-int
-main (void)
-{
-#undef $gl_func
- (void) $gl_func;
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"
-then :
- eval "$as_gl_Symbol=yes"
-else
- eval "$as_gl_Symbol=no"
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-eval ac_res=\$$as_gl_Symbol
- { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
-printf "%s\n" "$ac_res" >&6; }
- if eval test \"x\$"$as_gl_Symbol"\" = x"yes"
-then :
- cat >>confdefs.h <<_ACEOF
-#define `printf "%s\n" "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
-_ACEOF
- eval ac_cv_have_decl_$gl_func=yes
-fi
- done
@@ -27078,7 +26760,7 @@ int main () {
return 1;
#else
/* Check whether the given locale name is recognized by the system. */
-# if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
+# if defined _WIN32 && !defined __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
@@ -27218,7 +26900,7 @@ int main () {
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__
+# if 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
@@ -27350,7 +27032,7 @@ int main () {
return 1;
#else
/* Check whether the given locale name is recognized by the system. */
-# if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
+# if defined _WIN32 && !defined __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
@@ -27492,7 +27174,7 @@ int main () {
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__
+#if 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
@@ -27845,47 +27527,7 @@ printf "%s\n" "$gl_cv_next_dirent_h" >&6; }
- 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
@@ -29109,6 +28751,18 @@ then :
fi
+ if test $ac_cv_func__fseeki64 = yes; then
+ ac_fn_c_check_decl "$LINENO" "_fseeki64" "ac_cv_have_decl__fseeki64" "$ac_includes_default"
+if test "x$ac_cv_have_decl__fseeki64" = xyes
+then :
+ ac_have_decl=1
+else
+ ac_have_decl=0
+fi
+
+printf "%s\n" "#define HAVE_DECL__FSEEKI64 $ac_have_decl" >>confdefs.h
+
+ fi
fi
@@ -29583,14 +29237,39 @@ 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
+
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for getpagesize" >&5
+printf %s "checking for getpagesize... " >&6; }
+if test ${gl_cv_func_getpagesize+y}
then :
- printf "%s\n" "#define HAVE_GETPAGESIZE 1" >>confdefs.h
+ printf %s "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <unistd.h>
+int
+main (void)
+{
+return getpagesize();
+ ;
+ return 0;
+}
+
+_ACEOF
+if ac_fn_c_try_link "$LINENO"
+then :
+ gl_cv_func_getpagesize=yes
+else
+ gl_cv_func_getpagesize=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_getpagesize" >&5
+printf "%s\n" "$gl_cv_func_getpagesize" >&6; }
- if test $ac_cv_func_getpagesize = no; then
+ if test $gl_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
@@ -30450,10 +30129,12 @@ else
if test "$cross_compiling" = yes
then :
case "$host_os" in
- # Guess yes on glibc systems.
- *-gnu* | gnu*) gl_cv_func_link_works="guessing yes" ;;
- # If we don't know, assume the worst.
- *) gl_cv_func_link_works="guessing no" ;;
+ # Guess yes on Linux systems.
+ linux-* | linux) gl_cv_func_link_works="guessing yes" ;;
+ # Guess yes on glibc systems.
+ *-gnu* | gnu*) gl_cv_func_link_works="guessing yes" ;;
+ # If we don't know, assume the worst.
+ *) gl_cv_func_link_works="guessing no" ;;
esac
else
@@ -30576,33 +30257,56 @@ printf "%s\n" "#define GNULIB_TEST_LISTEN 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
+ if test $ac_cv_func_newlocale != yes; then
+ HAVE_NEWLOCALE=0
+ fi
+ if test $ac_cv_func_duplocale != yes; then
+ HAVE_DUPLOCALE=0
+ fi
+ if test $ac_cv_func_freelocale != yes; then
+ HAVE_FREELOCALE=0
+ fi
+ if test $gt_nameless_locales = yes; then
+ REPLACE_NEWLOCALE=1
+ REPLACE_DUPLOCALE=1
+ REPLACE_FREELOCALE=1
+ fi
+
-fi
+
+
+
+ if test "$GNULIB_LOCALENAME" != 1; then
+ if test "$GNULIB_LOCALENAME" = 0; then
+ GNULIB_LOCALENAME=$gl_module_indicator_condition
+ else
+ GNULIB_LOCALENAME="($GNULIB_LOCALENAME || $gl_module_indicator_condition)"
+ fi
fi
+printf "%s\n" "#define GNULIB_TEST_LOCALENAME 1" >>confdefs.h
+
+
+
+
+
+
+
@@ -30754,7 +30458,7 @@ int main () {
return 1;
#else
/* Check whether the given locale name is recognized by the system. */
-# if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
+# if defined _WIN32 && !defined __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
@@ -30894,7 +30598,7 @@ int main () {
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__
+# if 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
@@ -31027,7 +30731,7 @@ int main ()
return 1;
#else
/* Check whether the given locale name is recognized by the system. */
-# if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
+# if defined _WIN32 && !defined __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
@@ -31177,7 +30881,7 @@ int main ()
return 1;
#else
/* Check whether the given locale name is recognized by the system. */
-# if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
+# if defined _WIN32 && !defined __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
@@ -31315,7 +31019,7 @@ int main () {
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__
+# if 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
@@ -31561,6 +31265,8 @@ printf "%s\n" "#define HAVE_MAP_ANONYMOUS 1" >>confdefs.h
+
+
nanosleep_save_libs=$LIBS
# Solaris 2.5.1 needs -lposix4 to get the nanosleep function.
@@ -31676,40 +31382,49 @@ else
? (t) -1 \
: ((((t) 1 << (sizeof (t) * CHAR_BIT - 2)) - 1) * 2 + 1)))
+ #if HAVE_DECL_ALARM
static void
check_for_SIGALRM (int sig)
{
if (sig != SIGALRM)
_exit (1);
}
+ #endif
int
main ()
{
static struct timespec ts_sleep;
static struct timespec ts_remaining;
- static struct sigaction act;
/* Test for major problems first. */
if (! nanosleep)
return 2;
- act.sa_handler = check_for_SIGALRM;
- sigemptyset (&act.sa_mask);
- sigaction (SIGALRM, &act, NULL);
ts_sleep.tv_sec = 0;
ts_sleep.tv_nsec = 1;
- alarm (1);
- if (nanosleep (&ts_sleep, NULL) != 0)
+ #if HAVE_DECL_ALARM
+ {
+ static struct sigaction act;
+ act.sa_handler = check_for_SIGALRM;
+ sigemptyset (&act.sa_mask);
+ sigaction (SIGALRM, &act, NULL);
+ alarm (1);
+ if (nanosleep (&ts_sleep, NULL) != 0)
+ return 3;
+ /* Test for a minor problem: the handling of large arguments. */
+ ts_sleep.tv_sec = TYPE_MAXIMUM (time_t);
+ ts_sleep.tv_nsec = 999999999;
+ alarm (1);
+ if (nanosleep (&ts_sleep, &ts_remaining) != -1)
+ return 4;
+ if (errno != EINTR)
+ return 5;
+ if (ts_remaining.tv_sec <= TYPE_MAXIMUM (time_t) - 10)
+ return 6;
+ }
+ #else /* A simpler test for native Windows. */
+ if (nanosleep (&ts_sleep, &ts_remaining) < 0)
return 3;
- /* Test for a minor problem: the handling of large arguments. */
- ts_sleep.tv_sec = TYPE_MAXIMUM (time_t);
- ts_sleep.tv_nsec = 999999999;
- alarm (1);
- if (nanosleep (&ts_sleep, &ts_remaining) != -1)
- return 4;
- if (errno != EINTR)
- return 5;
- if (ts_remaining.tv_sec <= TYPE_MAXIMUM (time_t) - 10)
- return 6;
+ #endif
return 0;
}
_ACEOF
@@ -31963,7 +31678,7 @@ int main () {
return 1;
#else
/* Check whether the given locale name is recognized by the system. */
-# if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
+# if defined _WIN32 && !defined __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
@@ -32103,7 +31818,7 @@ int main () {
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__
+# if 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
@@ -32945,10 +32660,12 @@ else
then :
case "$host_os" in
- # Guess yes on glibc systems.
- *-gnu* | gnu*) gl_cv_func_select_detects_ebadf="guessing yes" ;;
- # If we don't know, assume the worst.
- *) gl_cv_func_select_detects_ebadf="guessing no" ;;
+ # Guess yes on Linux systems.
+ linux-* | linux) gl_cv_func_select_detects_ebadf="guessing yes" ;;
+ # Guess yes on glibc systems.
+ *-gnu* | gnu*) gl_cv_func_select_detects_ebadf="guessing yes" ;;
+ # If we don't know, assume the worst.
+ *) gl_cv_func_select_detects_ebadf="guessing no" ;;
esac
else
@@ -33193,7 +32910,7 @@ printf "%s\n" "#define GNULIB_TEST_SETENV 1" >>confdefs.h
gltests_LIBOBJS="$gltests_LIBOBJS setlocale.$ac_objext"
- :
+ :
fi
@@ -33247,7 +32964,7 @@ int main () {
return 1;
#else
/* Check whether the given locale name is recognized by the system. */
-# if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
+# if defined _WIN32 && !defined __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
@@ -33387,7 +33104,7 @@ int main () {
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__
+# if 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
@@ -33520,7 +33237,7 @@ int main ()
return 1;
#else
/* Check whether the given locale name is recognized by the system. */
-# if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
+# if defined _WIN32 && !defined __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
@@ -33670,7 +33387,7 @@ int main ()
return 1;
#else
/* Check whether the given locale name is recognized by the system. */
-# if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
+# if defined _WIN32 && !defined __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
@@ -33999,47 +33716,7 @@ fi
- for gl_func in pthread_sigmask sigaction sigaddset sigdelset sigemptyset sigfillset sigismember sigpending sigprocmask; do
- as_gl_Symbol=`printf "%s\n" "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
- { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
-printf %s "checking whether $gl_func is declared without a macro... " >&6; }
-if eval test \${$as_gl_Symbol+y}
-then :
- printf %s "(cached) " >&6
-else
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-#include <signal.h>
-int
-main (void)
-{
-#undef $gl_func
- (void) $gl_func;
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"
-then :
- eval "$as_gl_Symbol=yes"
-else
- eval "$as_gl_Symbol=no"
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-eval ac_res=\$$as_gl_Symbol
- { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
-printf "%s\n" "$ac_res" >&6; }
- if eval test \"x\$"$as_gl_Symbol"\" = x"yes"
-then :
- cat >>confdefs.h <<_ACEOF
-#define `printf "%s\n" "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
-_ACEOF
-
- eval ac_cv_have_decl_$gl_func=yes
-fi
- done
@@ -34278,7 +33955,7 @@ then :
else
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for socklen_t equivalent" >&5
printf %s "checking for socklen_t equivalent... " >&6; }
- if test ${gl_cv_socklen_t_equiv+y}
+if test ${gl_cv_socklen_t_equiv+y}
then :
printf %s "(cached) " >&6
else
@@ -34311,13 +33988,12 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
done
test "$gl_cv_socklen_t_equiv" != "" && break
done
+ if test "$gl_cv_socklen_t_equiv" = ""; then
+ as_fn_error $? "Cannot find a type to use in place of socklen_t" "$LINENO" 5
+ fi
fi
-
- if test "$gl_cv_socklen_t_equiv" = ""; then
- as_fn_error $? "Cannot find a type to use in place of socklen_t" "$LINENO" 5
- fi
- { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_socklen_t_equiv" >&5
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_socklen_t_equiv" >&5
printf "%s\n" "$gl_cv_socklen_t_equiv" >&6; }
printf "%s\n" "#define socklen_t $gl_cv_socklen_t_equiv" >>confdefs.h
@@ -34457,10 +34133,12 @@ else
if test "$cross_compiling" = yes
then :
case "$host_os" in
- # Guess yes on glibc systems.
- *-gnu* | gnu*) gl_cv_func_symlink_works="guessing yes" ;;
- # If we don't know, assume the worst.
- *) gl_cv_func_symlink_works="guessing no" ;;
+ # Guess yes on Linux systems.
+ linux-* | linux) gl_cv_func_symlink_works="guessing yes" ;;
+ # Guess yes on glibc systems.
+ *-gnu* | gnu*) gl_cv_func_symlink_works="guessing yes" ;;
+ # If we don't know, assume the worst.
+ *) gl_cv_func_symlink_works="guessing no" ;;
esac
else
@@ -34659,51 +34337,7 @@ printf "%s\n" "$gl_cv_next_sys_ioctl_h" >&6; }
- for gl_func in ioctl; do
- as_gl_Symbol=`printf "%s\n" "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
- { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
-printf %s "checking whether $gl_func is declared without a macro... " >&6; }
-if eval test \${$as_gl_Symbol+y}
-then :
- printf %s "(cached) " >&6
-else
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-#include <sys/ioctl.h>
-/* Some platforms declare ioctl in the wrong header. */
-#if !(defined __GLIBC__ && !defined __UCLIBC__)
-# include <unistd.h>
-#endif
-int
-main (void)
-{
-#undef $gl_func
- (void) $gl_func;
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"
-then :
- eval "$as_gl_Symbol=yes"
-else
- eval "$as_gl_Symbol=no"
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-eval ac_res=\$$as_gl_Symbol
- { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
-printf "%s\n" "$ac_res" >&6; }
- if eval test \"x\$"$as_gl_Symbol"\" = x"yes"
-then :
- cat >>confdefs.h <<_ACEOF
-#define `printf "%s\n" "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
-_ACEOF
-
- eval ac_cv_have_decl_$gl_func=yes
-fi
- done
@@ -35000,7 +34634,7 @@ int main () {
return 1;
#else
/* Check whether the given locale name is recognized by the system. */
-# if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
+# if defined _WIN32 && !defined __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
@@ -35140,7 +34774,7 @@ int main () {
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__
+# if 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
@@ -35273,7 +34907,7 @@ int main ()
return 1;
#else
/* Check whether the given locale name is recognized by the system. */
-# if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
+# if defined _WIN32 && !defined __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
@@ -35423,7 +35057,7 @@ int main ()
return 1;
#else
/* Check whether the given locale name is recognized by the system. */
-# if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
+# if defined _WIN32 && !defined __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
@@ -36086,7 +35720,6 @@ fi
-
use_additional=yes
acl_save_prefix="$prefix"
@@ -36566,7 +36199,6 @@ 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}
@@ -36639,8 +36271,46 @@ printf "%s\n" "$gt_cv_func_CFLocaleCopyCurrent" >&6; }
printf "%s\n" "#define HAVE_CFLOCALECOPYCURRENT 1" >>confdefs.h
fi
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for CFLocaleCopyPreferredLanguages" >&5
+printf %s "checking for CFLocaleCopyPreferredLanguages... " >&6; }
+if test ${gt_cv_func_CFLocaleCopyPreferredLanguages+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)
+{
+CFLocaleCopyPreferredLanguages();
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"
+then :
+ gt_cv_func_CFLocaleCopyPreferredLanguages=yes
+else
+ gt_cv_func_CFLocaleCopyPreferredLanguages=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_CFLocaleCopyPreferredLanguages" >&5
+printf "%s\n" "$gt_cv_func_CFLocaleCopyPreferredLanguages" >&6; }
+ if test $gt_cv_func_CFLocaleCopyPreferredLanguages = yes; then
+
+printf "%s\n" "#define HAVE_CFLOCALECOPYPREFERREDLANGUAGES 1" >>confdefs.h
+
+ fi
INTL_MACOSX_LIBS=
- if test $gt_cv_func_CFPreferencesCopyAppValue = yes || test $gt_cv_func_CFLocaleCopyCurrent = yes; then
+ if test $gt_cv_func_CFPreferencesCopyAppValue = yes \
+ || test $gt_cv_func_CFLocaleCopyCurrent = yes \
+ || test $gt_cv_func_CFLocaleCopyPreferredLanguages = yes; then
INTL_MACOSX_LIBS="-Wl,-framework -Wl,CoreFoundation"
fi
@@ -36983,7 +36653,6 @@ printf "%s\n" "$LIBICONV" >&6; }
-
use_additional=yes
acl_save_prefix="$prefix"
@@ -37438,7 +37107,6 @@ fi
-
{ 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}
@@ -37934,14 +37602,13 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
{ 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}
+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
+ gl_save_CFLAGS="$CFLAGS"
+ CFLAGS="$CFLAGS -W -Werror -Wno-missing-field-initializers"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
int
@@ -37959,30 +37626,29 @@ else
gl_cv_cc_nomfi_supported=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
- CFLAGS="$gl_save_CFLAGS"
-fi
+ CFLAGS="$gl_save_CFLAGS"
- { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_nomfi_supported" >&5
+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}
+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
+ 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;
- }
+ {
+ typedef struct { int a; int b; } s_t;
+ s_t s1 = { 0, };
+ return s1.b;
+ }
int
main (void)
@@ -37999,24 +37665,22 @@ else
gl_cv_cc_nomfi_needed=yes
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
- CFLAGS="$gl_save_CFLAGS"
+ CFLAGS="$gl_save_CFLAGS"
fi
-
- { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_nomfi_needed" >&5
+{ 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}
+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
+ gl_save_CFLAGS="$CFLAGS"
+ CFLAGS="$CFLAGS -Werror -Wuninitialized"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
int
@@ -38034,10 +37698,10 @@ else
gl_cv_cc_uninitialized_supported=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
- CFLAGS="$gl_save_CFLAGS"
-fi
+ CFLAGS="$gl_save_CFLAGS"
- { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_uninitialized_supported" >&5
+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
@@ -38046,18 +37710,17 @@ printf "%s\n" "$gl_cv_cc_uninitialized_supported" >&6; }
# To compare this list to your installed GCC's, run this Bash command:
#
# comm -3 \
- # <(sed -n 's/^ *\(-[^ 0-9][^ ]*\) .*/\1/p' manywarnings.m4 | sort) \
- # <(gcc --help=warnings | sed -n 's/^ \(-[^ ]*\) .*/\1/p' | sort |
- # grep -v -x -F -f <(
- # awk '/^[^#]/ {print ws}' ../build-aux/gcc-warning.spec))
+ # <((sed -n 's/^ *\(-[^ 0-9][^ ]*\) .*/\1/p' manywarnings.m4; \
+ # awk '/^[^#]/ {print ws}' ../build-aux/gcc-warning.spec) | sort) \
+ # <(LC_ALL=C gcc --help=warnings | sed -n 's/^ \(-[^ ]*\) .*/\1/p' | sort)
gl_manywarn_set=
for gl_manywarn_item in -fno-common \
-W \
- -Wabi \
-Waddress \
-Waggressive-loop-optimizations \
-Wall \
+ -Wattribute-alias \
-Wattributes \
-Wbad-function-cast \
-Wbool-compare \
@@ -38065,8 +37728,9 @@ printf "%s\n" "$gl_cv_cc_uninitialized_supported" >&6; }
-Wbuiltin-declaration-mismatch \
-Wbuiltin-macro-redefined \
-Wcast-align \
+ -Wcast-align=strict \
+ -Wcast-function-type \
-Wchar-subscripts \
- -Wchkp \
-Wclobbered \
-Wcomment \
-Wcomments \
@@ -38100,6 +37764,7 @@ printf "%s\n" "$gl_cv_cc_uninitialized_supported" >&6; }
-Wframe-address \
-Wfree-nonheap-object \
-Whsa \
+ -Wif-not-aligned \
-Wignored-attributes \
-Wignored-qualifiers \
-Wimplicit \
@@ -38113,7 +37778,6 @@ printf "%s\n" "$gl_cv_cc_uninitialized_supported" >&6; }
-Wint-to-pointer-cast \
-Winvalid-memory-model \
-Winvalid-pch \
- -Wjump-misses-init \
-Wlogical-not-parentheses \
-Wlogical-op \
-Wmain \
@@ -38121,6 +37785,7 @@ printf "%s\n" "$gl_cv_cc_uninitialized_supported" >&6; }
-Wmemset-elt-size \
-Wmemset-transposed-args \
-Wmisleading-indentation \
+ -Wmissing-attributes \
-Wmissing-braces \
-Wmissing-declarations \
-Wmissing-field-initializers \
@@ -38128,6 +37793,7 @@ printf "%s\n" "$gl_cv_cc_uninitialized_supported" >&6; }
-Wmissing-parameter-type \
-Wmissing-prototypes \
-Wmultichar \
+ -Wmultistatement-macros \
-Wnarrowing \
-Wnested-externs \
-Wnonnull \
@@ -38142,6 +37808,7 @@ printf "%s\n" "$gl_cv_cc_uninitialized_supported" >&6; }
-Woverride-init \
-Wpacked \
-Wpacked-bitfield-compat \
+ -Wpacked-not-aligned \
-Wparentheses \
-Wpointer-arith \
-Wpointer-compare \
@@ -38159,20 +37826,23 @@ printf "%s\n" "$gl_cv_cc_uninitialized_supported" >&6; }
-Wshift-count-overflow \
-Wshift-negative-value \
-Wsizeof-array-argument \
+ -Wsizeof-pointer-div \
-Wsizeof-pointer-memaccess \
-Wstack-protector \
-Wstrict-aliasing \
-Wstrict-overflow \
-Wstrict-prototypes \
+ -Wstringop-truncation \
+ -Wsuggest-attribute=cold \
-Wsuggest-attribute=const \
-Wsuggest-attribute=format \
+ -Wsuggest-attribute=malloc \
-Wsuggest-attribute=noreturn \
-Wsuggest-attribute=pure \
-Wsuggest-final-methods \
-Wsuggest-final-types \
-Wswitch \
-Wswitch-bool \
- -Wswitch-default \
-Wswitch-unreachable \
-Wsync-nand \
-Wsystem-headers \
@@ -39342,8 +39012,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.5, which was
-generated by GNU Autoconf 2.69.193-8974. Invocation command line was
+This file was extended by GNU sed $as_me 4.7, which was
+generated by GNU Autoconf 2.69.197-b8fd7. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
CONFIG_HEADERS = $CONFIG_HEADERS
@@ -39411,11 +39081,13 @@ GNU sed home page: <https://www.gnu.org/software/sed/>.
General help using GNU software: <https://www.gnu.org/gethelp/>."
_ACEOF
+ac_cs_config=`printf "%s\n" "$ac_configure_args" | sed "$ac_safe_unquote"`
+ac_cs_config_escaped=`printf "%s\n" "$ac_cs_config" | sed "s/^ //; s/'/'\\\\\\\\''/g"`
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
-ac_cs_config="`printf "%s\n" "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
+ac_cs_config='$ac_cs_config_escaped'
ac_cs_version="\\
-GNU sed config.status 4.5
-configured by $0, generated by GNU Autoconf 2.69.193-8974,
+GNU sed config.status 4.7
+configured by $0, generated by GNU Autoconf 2.69.197-b8fd7,
with options \\"\$ac_cs_config\\"
Copyright (C) 2017 Free Software Foundation, Inc.
diff --git a/configure.ac b/configure.ac
index 4c57d68..960efb5 100644
--- a/configure.ac
+++ b/configure.ac
@@ -20,7 +20,7 @@ AC_INIT([GNU sed],
AC_CONFIG_AUX_DIR(build-aux)
AC_CONFIG_SRCDIR([sed/sed.c])
AM_CONFIG_HEADER(config.h:config_h.in)
-AC_PREREQ(2.62)
+AC_PREREQ([2.64])
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.
diff --git a/doc/sed.1 b/doc/sed.1
index 3a85f27..2609369 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" "March 2018" "sed 4.5" "User Commands"
+.TH SED "1" "December 2018" "sed 4.7" "User Commands"
.SH NAME
sed \- stream editor for filtering and transforming text
.SH SYNOPSIS
@@ -24,6 +24,10 @@ editors.
.IP
suppress automatic printing of pattern space
.HP
+\fB\-\-debug\fR
+.IP
+annotate program execution
+.HP
\fB\-e\fR script, \fB\-\-expression\fR=\fIscript\fR
.IP
add the script to the commands to be executed
@@ -102,7 +106,7 @@ commands.
.TP
.RI # comment
The comment extends until the next newline (or the end of a
-.B -e
+.B \-e
script fragment).
.TP
}
@@ -295,7 +299,7 @@ The following address types are supported:
Match only the specified line
.IR number
(which increments cumulatively across files, unless the
-.B -s
+.B \-s
option is specified on the command line).
.TP
.IR first ~ step
@@ -303,7 +307,7 @@ Match every
.IR step 'th
line starting with line
.IR first .
-For example, ``sed -n 1~2p'' will print all the odd-numbered lines in
+For example, ``sed \-n 1~2p'' will print all the odd-numbered lines in
the input stream, and the address 2~5 will match every fifth line,
starting with the second.
.I first
@@ -374,17 +378,17 @@ and similarly for
.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
+it has been supported for years by GNU sed, and is now
included in POSIX.
.SH BUGS
.PP
E-mail bug reports to
.BR bug-sed@gnu.org .
-Also, please include the output of ``sed --version'' in the body
+Also, please include the output of ``sed \-\-version'' in the body
of your report if at all possible.
.SH AUTHOR
Written by Jay Fenlason, Tom Lord, Ken Pizzini,
-and Paolo Bonzini.
+Paolo Bonzini, Jim Meyering, and Assaf Gordon.
GNU sed home page: <https://www.gnu.org/software/sed/>.
General help using GNU software: <https://www.gnu.org/gethelp/>.
E-mail bug reports to: <bug-sed@gnu.org>.
diff --git a/doc/sed.info b/doc/sed.info
index 98df6d4..6a93301 100644
--- a/doc/sed.info
+++ b/doc/sed.info
@@ -1,6 +1,6 @@
-This is sed.info, produced by makeinfo version 6.3 from sed.texi.
+This is sed.info, produced by makeinfo version 6.5 from sed.texi.
-This file documents version 4.5 of GNU 'sed', a stream editor.
+This file documents version 4.7 of GNU 'sed', a stream editor.
Copyright (C) 1998-2018 Free Software Foundation, Inc.
@@ -22,7 +22,7 @@ File: sed.info, Node: Top, Next: Introduction, Up: (dir)
GNU 'sed'
*********
-This file documents version 4.5 of GNU 'sed', a stream editor.
+This file documents version 4.7 of GNU 'sed', a stream editor.
Copyright (C) 1998-2018 Free Software Foundation, Inc.
@@ -168,6 +168,22 @@ The full format for invoking 'sed' is:
These options disable this automatic printing, and 'sed' only
produces output when explicitly told to via the 'p' command.
+'--debug'
+ Print the input sed program in canonical form, and annotate program
+ execution.
+ $ echo 1 | sed '\%1%s21232'
+ 3
+
+ $ echo 1 | sed --debug '\%1%s21232'
+ SED PROGRAM:
+ /1/ s/1/3/
+ INPUT: 'STDIN' line 1
+ PATTERN: 1
+ COMMAND: /1/ s/1/3/
+ PATTERN: 3
+ END-OF-CYCLE:
+ 3
+
'-e SCRIPT'
'--expression=SCRIPT'
Add the commands in SCRIPT to the set of commands to be run while
@@ -584,7 +600,7 @@ in parentheses.
'#'
A comment, until the next newline.
-'{ CMD ; CMD ... }'
+'{ CMD ; CMD ... }'
Group several commands together.
'='
@@ -1546,7 +1562,7 @@ be in *note Extended Regular Expression (ERE): ERE syntax. syntax.
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
+ The following commands are equivalent. They print lines which
start with '/home/alice/documents/':
sed -n '/^\/home\/alice\/documents\//p'
@@ -1769,9 +1785,9 @@ 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 ('\').
+unless prefixed with a 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
@@ -1945,8 +1961,8 @@ Examples:
'[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
+'[^ '<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.
@@ -3038,7 +3054,7 @@ regular expressions to be matched--this is a common technique.
}
# delete leading and trailing spaces
- y/tab/ /
+ y/<TAB>/ /
s/^ *//
s/ *$//
@@ -3677,7 +3693,7 @@ commenting 'sed' scripts.
#!/usr/bin/sed -nf
# Convert words to a's
- s/[ tab][ tab]*/ /g
+ s/[ <TAB>][ <TAB>]*/ /g
s/^/ /
s/ [^ ][^ ]*/a /g
s/ //g
@@ -4770,11 +4786,11 @@ exception of the 'sed' commands and command-line options.
* exit status: Exit status. (line 6)
* exit status, example: Exit status. (line 25)
* Extended regular expressions, choosing: Command-Line Options.
- (line 119)
+ (line 135)
* Extended regular expressions, syntax: ERE syntax. (line 6)
* File name, printing: Extended Commands. (line 30)
* Files to be processed as input: Command-Line Options.
- (line 165)
+ (line 181)
* Flow of control in scripts: Programming Commands.
(line 11)
* Global substitution: The "s" Command. (line 74)
@@ -4783,7 +4799,7 @@ exception of the 'sed' commands and command-line options.
* GNU extensions, /dev/stdin file: Other Commands. (line 227)
* GNU extensions, /dev/stdin file <1>: Extended Commands. (line 53)
* GNU extensions, /dev/stdout file: Command-Line Options.
- (line 173)
+ (line 189)
* 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)
@@ -4796,8 +4812,10 @@ exception of the 'sed' commands and command-line options.
(line 29)
* GNU extensions, checking for their presence: Extended Commands.
(line 69)
+* GNU extensions, debug: Command-Line Options.
+ (line 29)
* GNU extensions, disabling: Command-Line Options.
- (line 86)
+ (line 102)
* 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.
@@ -4805,12 +4823,12 @@ exception of the 'sed' commands and command-line options.
* GNU extensions, evaluating Bourne-shell commands <1>: Extended Commands.
(line 12)
* GNU extensions, extended regular expressions: Command-Line Options.
- (line 119)
+ (line 135)
* 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)
+ (line 56)
* 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)
@@ -4869,9 +4887,9 @@ exception of the 'sed' commands and command-line options.
* i, and semicolons: sed script overview. (line 56)
* In-place editing: Reporting Bugs. (line 95)
* In-place editing, activating: Command-Line Options.
- (line 40)
+ (line 56)
* In-place editing, Perl-style backup file names: Command-Line Options.
- (line 51)
+ (line 67)
* infinite loop, branching: Branching and flow control.
(line 95)
* Inserting text before a line: Other Commands. (line 104)
@@ -4885,7 +4903,7 @@ exception of the 'sed' commands and command-line options.
(line 14)
* Last line, selecting: Numeric Addresses. (line 13)
* Line length, setting: Command-Line Options.
- (line 81)
+ (line 97)
* Line length, setting <1>: Other Commands. (line 207)
* Line number, printing: Other Commands. (line 194)
* Line selection: Numeric Addresses. (line 6)
@@ -4935,7 +4953,7 @@ exception of the 'sed' commands and command-line options.
* POSIXLY_CORRECT behavior, bracket expressions: Character Classes and Bracket Expressions.
(line 112)
* POSIXLY_CORRECT behavior, enabling: Command-Line Options.
- (line 89)
+ (line 105)
* POSIXLY_CORRECT behavior, escapes: Escapes. (line 11)
* POSIXLY_CORRECT behavior, N command: Reporting Bugs. (line 56)
* Print first line from pattern space: Other Commands. (line 269)
@@ -4979,13 +4997,13 @@ exception of the 'sed' commands and command-line options.
* restarting a cycle: Branching and flow control.
(line 75)
* Sandbox mode: Command-Line Options.
- (line 141)
+ (line 157)
* script parameter: Overview. (line 43)
* Script structure: sed script overview. (line 6)
* Script, from a file: Command-Line Options.
- (line 35)
+ (line 51)
* Script, from command line: Command-Line Options.
- (line 30)
+ (line 46)
* sed commands syntax: sed script overview. (line 13)
* sed commands, multiple: sed script overview. (line 37)
* sed script structure: sed script overview. (line 6)
@@ -5000,7 +5018,7 @@ exception of the 'sed' commands and command-line options.
* Special addressing forms: Range Addresses. (line 31)
* standard input: Overview. (line 15)
* Standard input, processing as input: Command-Line Options.
- (line 167)
+ (line 183)
* standard output: Overview. (line 23)
* stdin: Overview. (line 15)
* stdout: Overview. (line 23)
@@ -5026,7 +5044,7 @@ exception of the 'sed' commands and command-line options.
(line 101)
* Transliteration: Other Commands. (line 11)
* Unbuffered I/O, choosing: Command-Line Options.
- (line 148)
+ (line 164)
* upper-case letters: Character Classes and Bracket Expressions.
(line 84)
* Usage summary, printing: Command-Line Options.
@@ -5036,7 +5054,7 @@ exception of the 'sed' commands and command-line options.
* whitespace characters: Character Classes and Bracket Expressions.
(line 80)
* Working on separate files: Command-Line Options.
- (line 132)
+ (line 148)
* 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.
@@ -5057,62 +5075,64 @@ options.
* # (comments): Common Commands. (line 12)
* --binary: Command-Line Options.
- (line 98)
+ (line 114)
+* --debug: Command-Line Options.
+ (line 29)
* --expression: Command-Line Options.
- (line 30)
+ (line 46)
* --file: Command-Line Options.
- (line 35)
+ (line 51)
* --follow-symlinks: Command-Line Options.
- (line 109)
+ (line 125)
* --help: Command-Line Options.
(line 17)
* --in-place: Command-Line Options.
- (line 40)
+ (line 56)
* --line-length: Command-Line Options.
- (line 81)
+ (line 97)
* --null-data: Command-Line Options.
- (line 156)
+ (line 172)
* --posix: Command-Line Options.
- (line 86)
+ (line 102)
* --quiet: Command-Line Options.
(line 23)
* --regexp-extended: Command-Line Options.
- (line 119)
+ (line 135)
* --sandbox: Command-Line Options.
- (line 141)
+ (line 157)
* --separate: Command-Line Options.
- (line 132)
+ (line 148)
* --silent: Command-Line Options.
(line 23)
* --unbuffered: Command-Line Options.
- (line 148)
+ (line 164)
* --version: Command-Line Options.
(line 13)
* --zero-terminated: Command-Line Options.
- (line 156)
+ (line 172)
* -b: Command-Line Options.
- (line 98)
+ (line 114)
* -e: Command-Line Options.
- (line 30)
+ (line 46)
* -E: Command-Line Options.
- (line 119)
+ (line 135)
* -f: Command-Line Options.
- (line 35)
+ (line 51)
* -i: Command-Line Options.
- (line 40)
+ (line 56)
* -l: Command-Line Options.
- (line 81)
+ (line 97)
* -n: Command-Line Options.
(line 23)
* -n, forcing from within a script: Common Commands. (line 20)
* -r: Command-Line Options.
- (line 119)
+ (line 135)
* -s: Command-Line Options.
- (line 132)
-* -u: Command-Line Options.
(line 148)
+* -u: Command-Line Options.
+ (line 164)
* -z: Command-Line Options.
- (line 156)
+ (line 172)
* : (label) command: Programming Commands.
(line 14)
* = (print line number) command: Other Commands. (line 194)
@@ -5182,76 +5202,76 @@ Node: Introduction2172
Node: Invoking sed2726
Node: Overview3039
Node: Command-Line Options5297
-Ref: Command-Line Options-Footnote-112547
-Ref: Command-Line Options-Footnote-212739
-Node: Exit status12838
-Node: sed scripts13740
-Node: sed script overview14313
-Node: sed commands list16834
-Node: The "s" Command21624
-Ref: The "s" Command-Footnote-127086
-Node: Common Commands27158
-Node: Other Commands30183
-Ref: insert command33297
-Ref: Other Commands-Footnote-139197
-Node: Programming Commands39269
-Node: Extended Commands40181
-Node: Multiple commands syntax44073
-Node: sed addresses48390
-Node: Addresses overview48819
-Node: Numeric Addresses50595
-Node: Regexp Addresses51946
-Ref: Regexp Addresses-Footnote-155902
-Node: Range Addresses56042
-Node: sed regular expressions58522
-Node: Regular Expressions Overview59371
-Node: BRE vs ERE60878
-Node: BRE syntax62562
-Node: ERE syntax68947
-Node: Character Classes and Bracket Expressions70419
-Node: regexp extensions75257
-Node: Back-references and Subexpressions77645
-Node: Escapes80049
-Ref: Escapes-Footnote-183066
-Node: Locale Considerations83257
-Ref: Locale Considerations-Footnote-187880
-Node: advanced sed88052
-Node: Execution Cycle88411
-Ref: Execution Cycle-Footnote-189606
-Node: Hold and Pattern Buffers89907
-Node: Multiline techniques90095
-Node: Branching and flow control93309
-Node: Examples101358
-Node: Joining lines102558
-Node: Centering lines104345
-Node: Increment a number105262
-Ref: Increment a number-Footnote-1106739
-Node: Rename files to lower case106859
-Node: Print bash environment109632
-Node: Reverse chars of lines110387
-Ref: Reverse chars of lines-Footnote-1111418
-Node: Text search across multiple lines111635
-Node: Line length adjustment114860
-Node: tac116597
-Node: cat -n117364
-Node: cat -b119186
-Node: wc -c119935
-Ref: wc -c-Footnote-1121845
-Node: wc -w121914
-Node: wc -l123378
-Node: head123623
-Node: tail123954
-Node: uniq125635
-Node: uniq -d126422
-Node: uniq -u127133
-Node: cat -s127842
-Node: Limitations129689
-Node: Other Resources130530
-Node: Reporting Bugs131431
-Ref: N_command_last_line132594
-Ref: Reporting Bugs-Footnote-1138739
-Node: GNU Free Documentation License138810
-Node: Concept Index163965
-Node: Command and Option Index191107
+Ref: Command-Line Options-Footnote-112932
+Ref: Command-Line Options-Footnote-213124
+Node: Exit status13223
+Node: sed scripts14125
+Node: sed script overview14698
+Node: sed commands list17219
+Node: The "s" Command22008
+Ref: The "s" Command-Footnote-127470
+Node: Common Commands27542
+Node: Other Commands30567
+Ref: insert command33681
+Ref: Other Commands-Footnote-139581
+Node: Programming Commands39653
+Node: Extended Commands40565
+Node: Multiple commands syntax44457
+Node: sed addresses48774
+Node: Addresses overview49203
+Node: Numeric Addresses50979
+Node: Regexp Addresses52330
+Ref: Regexp Addresses-Footnote-156282
+Node: Range Addresses56422
+Node: sed regular expressions58902
+Node: Regular Expressions Overview59751
+Node: BRE vs ERE61258
+Node: BRE syntax62949
+Node: ERE syntax69338
+Node: Character Classes and Bracket Expressions70810
+Node: regexp extensions75648
+Node: Back-references and Subexpressions78036
+Node: Escapes80440
+Ref: Escapes-Footnote-183457
+Node: Locale Considerations83648
+Ref: Locale Considerations-Footnote-188271
+Node: advanced sed88443
+Node: Execution Cycle88802
+Ref: Execution Cycle-Footnote-189997
+Node: Hold and Pattern Buffers90298
+Node: Multiline techniques90486
+Node: Branching and flow control93700
+Node: Examples101749
+Node: Joining lines102949
+Node: Centering lines104736
+Node: Increment a number105655
+Ref: Increment a number-Footnote-1107132
+Node: Rename files to lower case107252
+Node: Print bash environment110025
+Node: Reverse chars of lines110780
+Ref: Reverse chars of lines-Footnote-1111811
+Node: Text search across multiple lines112028
+Node: Line length adjustment115253
+Node: tac116990
+Node: cat -n117757
+Node: cat -b119579
+Node: wc -c120328
+Ref: wc -c-Footnote-1122238
+Node: wc -w122307
+Node: wc -l123775
+Node: head124020
+Node: tail124351
+Node: uniq126032
+Node: uniq -d126819
+Node: uniq -u127530
+Node: cat -s128239
+Node: Limitations130086
+Node: Other Resources130927
+Node: Reporting Bugs131828
+Ref: N_command_last_line132991
+Ref: Reporting Bugs-Footnote-1139136
+Node: GNU Free Documentation License139207
+Node: Concept Index164362
+Node: Command and Option Index191640

End Tag Table
diff --git a/doc/sed.texi b/doc/sed.texi
index a49d76c..9529525 100644
--- a/doc/sed.texi
+++ b/doc/sed.texi
@@ -51,7 +51,7 @@ section entitled ``GNU Free Documentation License''.
@titlepage
@title @value{SSED}, a stream editor
@subtitle version @value{VERSION}, @value{UPDATED}
-@author by Ken Pizzini, Paolo Bonzini
+@author by Ken Pizzini, Paolo Bonzini, Jim Meyering, Assaf Gordon
@page
@vskip 0pt plus 1filll
@@ -253,6 +253,31 @@ These options disable this automatic printing,
and @command{sed} only produces output when explicitly told to
via the @code{p} command.
+@item --debug
+@opindex --debug
+@cindex @value{SSEDEXT}, debug
+Print the input sed program in canonical form,
+and annotate program execution.
+@codequotebacktick on
+@codequoteundirected on
+@example
+$ echo 1 | sed '\%1%s21232'
+3
+
+$ echo 1 | sed --debug '\%1%s21232'
+SED PROGRAM:
+ /1/ s/1/3/
+INPUT: 'STDIN' line 1
+PATTERN: 1
+COMMAND: /1/ s/1/3/
+PATTERN: 3
+END-OF-CYCLE:
+3
+@end example
+@codequotebacktick off
+@codequoteundirected off
+
+
@item -e @var{script}
@itemx --expression=@var{script}
@opindex -e
@@ -2226,7 +2251,7 @@ 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
+The following commands are equivalent. They print lines
which start with @samp{/home/alice/documents/}:
@example
@@ -2509,7 +2534,7 @@ 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
+unless prefixed with a backslash (@samp{\}); While with extended (ERE) syntax
it is reversed: these characters are special unless they are prefixed
with backslash (@samp{\}).
@@ -2763,8 +2788,8 @@ because it is escaped.
@item [a-zA-Z0-9]
In the C locale, this matches any ASCII letters or digits.
-@item [^ @kbd{tab}]\+
-(Here @kbd{tab} stands for a single tab character.)
+@item [^ @kbd{@key{TAB}}]\+
+(Here @kbd{@key{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.
@@ -4235,7 +4260,7 @@ technique.
@group
# delete leading and trailing spaces
-y/@kbd{tab}/ /
+y/@kbd{@key{TAB}}/ /
s/^ *//
s/ *$//
@end group
@@ -5055,7 +5080,7 @@ of commenting @command{sed} scripts.
@group
# Convert words to a's
-s/[ @kbd{tab}][ @kbd{tab}]*/ /g
+s/[ @kbd{@key{TAB}}][ @kbd{@key{TAB}}]*/ /g
s/^/ /
s/ [^ ][^ ]*/a /g
s/ //g
diff --git a/doc/sed.x b/doc/sed.x
index b2e0beb..1059382 100644
--- a/doc/sed.x
+++ b/doc/sed.x
@@ -42,7 +42,7 @@ commands.
.TP
.RI # comment
The comment extends until the next newline (or the end of a
-.B -e
+.B \-e
script fragment).
.TP
}
@@ -235,7 +235,7 @@ The following address types are supported:
Match only the specified line
.IR number
(which increments cumulatively across files, unless the
-.B -s
+.B \-s
option is specified on the command line).
.TP
.IR first ~ step
@@ -243,7 +243,7 @@ Match every
.IR step 'th
line starting with line
.IR first .
-For example, ``sed -n 1~2p'' will print all the odd-numbered lines in
+For example, ``sed \-n 1~2p'' will print all the odd-numbered lines in
the input stream, and the address 2~5 will match every fifth line,
starting with the second.
.I first
@@ -315,7 +315,7 @@ and similarly for
.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
+it has been supported for years by GNU sed, and is now
included in POSIX.
[SEE ALSO]
@@ -334,5 +334,5 @@ http://sed.sf.net/grabbag/.
.PP
E-mail bug reports to
.BR bug-sed@gnu.org .
-Also, please include the output of ``sed --version'' in the body
+Also, please include the output of ``sed \-\-version'' in the body
of your report if at all possible.
diff --git a/doc/stamp-vti b/doc/stamp-vti
index 40812fc..6b34a0a 100644
--- a/doc/stamp-vti
+++ b/doc/stamp-vti
@@ -1,4 +1,4 @@
-@set UPDATED 30 March 2018
-@set UPDATED-MONTH March 2018
-@set EDITION 4.5
-@set VERSION 4.5
+@set UPDATED 27 October 2018
+@set UPDATED-MONTH October 2018
+@set EDITION 4.7
+@set VERSION 4.7
diff --git a/doc/version.texi b/doc/version.texi
index 40812fc..6b34a0a 100644
--- a/doc/version.texi
+++ b/doc/version.texi
@@ -1,4 +1,4 @@
-@set UPDATED 30 March 2018
-@set UPDATED-MONTH March 2018
-@set EDITION 4.5
-@set VERSION 4.5
+@set UPDATED 27 October 2018
+@set UPDATED-MONTH October 2018
+@set EDITION 4.7
+@set VERSION 4.7
diff --git a/gnulib-tests/Makefile.in b/gnulib-tests/Makefile.in
index 0eeaacc..68e355e 100644
--- a/gnulib-tests/Makefile.in
+++ b/gnulib-tests/Makefile.in
@@ -97,6 +97,7 @@ am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
pkgdatadir = $(datadir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
+pkglibexecdir = $(libexecdir)/@PACKAGE@
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
install_sh_DATA = $(install_sh) -c -m 644
install_sh_PROGRAM = $(install_sh) -c
@@ -148,7 +149,7 @@ TESTS = test-accept$(EXEEXT) test-set-mode-acl.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-memchr$(EXEEXT) test-memrchr$(EXEEXT) test-mkdir$(EXEEXT) \
test-nanosleep$(EXEEXT) test-netinet_in$(EXEEXT) \
test-nl_langinfo.sh test-open$(EXEEXT) test-pathmax$(EXEEXT) \
test-perror.sh test-perror2$(EXEEXT) test-pipe$(EXEEXT) \
@@ -177,7 +178,7 @@ TESTS = test-accept$(EXEEXT) test-set-mode-acl.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 =
+noinst_PROGRAMS = test-localcharset$(EXEEXT)
check_PROGRAMS = test-accept$(EXEEXT) test-set-mode-acl$(EXEEXT) \
test-copy-acl$(EXEEXT) test-sameacls$(EXEEXT) \
test-alignof$(EXEEXT) test-alloca-opt$(EXEEXT) \
@@ -212,9 +213,10 @@ check_PROGRAMS = test-accept$(EXEEXT) test-set-mode-acl$(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-nanosleep$(EXEEXT) \
- test-netinet_in$(EXEEXT) test-nl_langinfo$(EXEEXT) \
- test-open$(EXEEXT) test-pathmax$(EXEEXT) test-perror$(EXEEXT) \
+ test-memrchr$(EXEEXT) test-mkdir$(EXEEXT) \
+ test-nanosleep$(EXEEXT) test-netinet_in$(EXEEXT) \
+ test-nl_langinfo$(EXEEXT) test-open$(EXEEXT) \
+ test-pathmax$(EXEEXT) test-perror$(EXEEXT) \
test-perror2$(EXEEXT) test-pipe$(EXEEXT) \
test-quotearg-simple$(EXEEXT) test-raise$(EXEEXT) \
test-read-file$(EXEEXT) test-readlink$(EXEEXT) \
@@ -243,16 +245,17 @@ EXTRA_PROGRAMS = test-verify-try$(EXEEXT)
subdir = gnulib-tests
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/m4/00gnulib.m4 \
+ $(top_srcdir)/m4/__inline.m4 \
$(top_srcdir)/m4/absolute-header.m4 $(top_srcdir)/m4/acl.m4 \
$(top_srcdir)/m4/alloca.m4 $(top_srcdir)/m4/arpa_inet_h.m4 \
- $(top_srcdir)/m4/asm-underscore.m4 $(top_srcdir)/m4/assert.m4 \
- $(top_srcdir)/m4/btowc.m4 $(top_srcdir)/m4/builtin-expect.m4 \
+ $(top_srcdir)/m4/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/codeset.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 \
@@ -272,9 +275,9 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/00gnulib.m4 \
$(top_srcdir)/m4/gettimeofday.m4 $(top_srcdir)/m4/glibc21.m4 \
$(top_srcdir)/m4/gnulib-common.m4 \
$(top_srcdir)/m4/gnulib-comp.m4 \
- $(top_srcdir)/m4/hard-locale.m4 \
$(top_srcdir)/m4/host-cpu-c-abi.m4 $(top_srcdir)/m4/iconv.m4 \
$(top_srcdir)/m4/include_next.m4 $(top_srcdir)/m4/inet_pton.m4 \
+ $(top_srcdir)/m4/intl-thread-locale.m4 \
$(top_srcdir)/m4/intlmacosx.m4 \
$(top_srcdir)/m4/inttypes-pri.m4 $(top_srcdir)/m4/inttypes.m4 \
$(top_srcdir)/m4/ioctl.m4 $(top_srcdir)/m4/isblank.m4 \
@@ -294,8 +297,9 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/00gnulib.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/mkdir.m4 $(top_srcdir)/m4/mkostemp.m4 \
+ $(top_srcdir)/m4/mmap-anon.m4 $(top_srcdir)/m4/mode_t.m4 \
+ $(top_srcdir)/m4/msvc-inval.m4 \
$(top_srcdir)/m4/msvc-nothrow.m4 $(top_srcdir)/m4/multiarch.m4 \
$(top_srcdir)/m4/nanosleep.m4 $(top_srcdir)/m4/netinet_in_h.m4 \
$(top_srcdir)/m4/nl_langinfo.m4 $(top_srcdir)/m4/nls.m4 \
@@ -359,10 +363,10 @@ 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) cloexec.$(OBJEXT) \
- fd-hook.$(OBJEXT) file-has-acl.$(OBJEXT) freading.$(OBJEXT) \
- localename.$(OBJEXT) read-file.$(OBJEXT) sig-handler.$(OBJEXT) \
- sockets.$(OBJEXT) sys_socket.$(OBJEXT)
+am_libtests_a_OBJECTS = cloexec.$(OBJEXT) fd-hook.$(OBJEXT) \
+ file-has-acl.$(OBJEXT) freading.$(OBJEXT) localename.$(OBJEXT) \
+ localename-table.$(OBJEXT) read-file.$(OBJEXT) \
+ sig-handler.$(OBJEXT) sockets.$(OBJEXT) sys_socket.$(OBJEXT)
libtests_a_OBJECTS = $(am_libtests_a_OBJECTS)
dfa_match_aux_SOURCES = dfa-match-aux.c
dfa_match_aux_OBJECTS = dfa-match-aux.$(OBJEXT)
@@ -668,6 +672,11 @@ test_link_DEPENDENCIES = libtests.a ../lib/libsed.a libtests.a \
test_listen_SOURCES = test-listen.c
test_listen_OBJECTS = test-listen.$(OBJEXT)
test_listen_DEPENDENCIES = $(am__DEPENDENCIES_2)
+test_localcharset_SOURCES = test-localcharset.c
+test_localcharset_OBJECTS = test-localcharset.$(OBJEXT)
+test_localcharset_LDADD = $(LDADD)
+test_localcharset_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)
@@ -722,6 +731,11 @@ test_memrchr_OBJECTS = test-memrchr.$(OBJEXT)
test_memrchr_LDADD = $(LDADD)
test_memrchr_DEPENDENCIES = libtests.a ../lib/libsed.a libtests.a \
$(am__DEPENDENCIES_1)
+test_mkdir_SOURCES = test-mkdir.c
+test_mkdir_OBJECTS = test-mkdir.$(OBJEXT)
+test_mkdir_LDADD = $(LDADD)
+test_mkdir_DEPENDENCIES = libtests.a ../lib/libsed.a libtests.a \
+ $(am__DEPENDENCIES_1)
test_nanosleep_SOURCES = test-nanosleep.c
test_nanosleep_OBJECTS = test-nanosleep.$(OBJEXT)
test_nanosleep_DEPENDENCIES = $(am__DEPENDENCIES_2) \
@@ -1013,11 +1027,11 @@ 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)/accept.Po ./$(DEPDIR)/binary-io.Po \
- ./$(DEPDIR)/bind.Po ./$(DEPDIR)/cloexec.Po \
- ./$(DEPDIR)/close.Po ./$(DEPDIR)/closedir.Po \
- ./$(DEPDIR)/connect.Po ./$(DEPDIR)/dfa-match-aux.Po \
- ./$(DEPDIR)/dirfd.Po ./$(DEPDIR)/dup2.Po ./$(DEPDIR)/fcntl.Po \
+am__depfiles_remade = ./$(DEPDIR)/accept.Po ./$(DEPDIR)/bind.Po \
+ ./$(DEPDIR)/cloexec.Po ./$(DEPDIR)/close.Po \
+ ./$(DEPDIR)/closedir.Po ./$(DEPDIR)/connect.Po \
+ ./$(DEPDIR)/dfa-match-aux.Po ./$(DEPDIR)/dirfd.Po \
+ ./$(DEPDIR)/dup2.Po ./$(DEPDIR)/fcntl.Po \
./$(DEPDIR)/fd-hook.Po ./$(DEPDIR)/fdopen.Po \
./$(DEPDIR)/fflush.Po ./$(DEPDIR)/file-has-acl.Po \
./$(DEPDIR)/fpurge.Po ./$(DEPDIR)/freading.Po \
@@ -1027,10 +1041,11 @@ am__depfiles_remade = ./$(DEPDIR)/accept.Po ./$(DEPDIR)/binary-io.Po \
./$(DEPDIR)/getdtablesize.Po ./$(DEPDIR)/getpagesize.Po \
./$(DEPDIR)/inet_pton.Po ./$(DEPDIR)/ioctl.Po \
./$(DEPDIR)/link.Po ./$(DEPDIR)/listen.Po \
- ./$(DEPDIR)/localename.Po ./$(DEPDIR)/lseek.Po \
- ./$(DEPDIR)/nanosleep.Po ./$(DEPDIR)/open.Po \
- ./$(DEPDIR)/opendir.Po ./$(DEPDIR)/perror.Po \
- ./$(DEPDIR)/pipe.Po ./$(DEPDIR)/putenv.Po ./$(DEPDIR)/raise.Po \
+ ./$(DEPDIR)/localename-table.Po ./$(DEPDIR)/localename.Po \
+ ./$(DEPDIR)/lseek.Po ./$(DEPDIR)/nanosleep.Po \
+ ./$(DEPDIR)/open.Po ./$(DEPDIR)/opendir.Po \
+ ./$(DEPDIR)/perror.Po ./$(DEPDIR)/pipe.Po \
+ ./$(DEPDIR)/putenv.Po ./$(DEPDIR)/raise.Po \
./$(DEPDIR)/read-file.Po ./$(DEPDIR)/readdir.Po \
./$(DEPDIR)/realloc.Po ./$(DEPDIR)/select.Po \
./$(DEPDIR)/setenv.Po ./$(DEPDIR)/setlocale.Po \
@@ -1074,12 +1089,13 @@ am__depfiles_remade = ./$(DEPDIR)/accept.Po ./$(DEPDIR)/binary-io.Po \
./$(DEPDIR)/test-ioctl.Po ./$(DEPDIR)/test-isblank.Po \
./$(DEPDIR)/test-langinfo.Po ./$(DEPDIR)/test-limits-h.Po \
./$(DEPDIR)/test-link.Po ./$(DEPDIR)/test-listen.Po \
- ./$(DEPDIR)/test-locale.Po ./$(DEPDIR)/test-localeconv.Po \
- ./$(DEPDIR)/test-localename.Po ./$(DEPDIR)/test-lseek.Po \
- ./$(DEPDIR)/test-lstat.Po ./$(DEPDIR)/test-malloca.Po \
- ./$(DEPDIR)/test-mbrtowc-w32.Po ./$(DEPDIR)/test-mbrtowc.Po \
- ./$(DEPDIR)/test-mbsinit.Po ./$(DEPDIR)/test-memchr.Po \
- ./$(DEPDIR)/test-memrchr.Po ./$(DEPDIR)/test-nanosleep.Po \
+ ./$(DEPDIR)/test-localcharset.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-mkdir.Po ./$(DEPDIR)/test-nanosleep.Po \
./$(DEPDIR)/test-netinet_in.Po ./$(DEPDIR)/test-nl_langinfo.Po \
./$(DEPDIR)/test-open.Po ./$(DEPDIR)/test-pathmax.Po \
./$(DEPDIR)/test-perror.Po ./$(DEPDIR)/test-perror2.Po \
@@ -1141,15 +1157,15 @@ SOURCES = $(libtests_a_SOURCES) $(EXTRA_libtests_a_SOURCES) \
test-getopt-posix.c test-getprogname.c test-gettimeofday.c \
test-ignore-value.c test-inet_pton.c test-intprops.c \
test-inttypes.c test-ioctl.c test-isblank.c test-langinfo.c \
- test-limits-h.c test-link.c test-listen.c test-locale.c \
- test-localeconv.c test-localename.c test-lseek.c test-lstat.c \
- test-malloca.c test-mbrtowc.c test-mbrtowc-w32.c \
- test-mbsinit.c test-memchr.c test-memrchr.c test-nanosleep.c \
- test-netinet_in.c test-nl_langinfo.c test-open.c \
- test-pathmax.c test-perror.c test-perror2.c test-pipe.c \
- test-quotearg-simple.c test-raise.c test-read-file.c \
- test-readlink.c test-regex.c test-rename.c test-rmdir.c \
- test-sameacls.c test-select.c test-select-fd.c \
+ test-limits-h.c test-link.c test-listen.c test-localcharset.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-mkdir.c \
+ test-nanosleep.c test-netinet_in.c test-nl_langinfo.c \
+ test-open.c test-pathmax.c test-perror.c test-perror2.c \
+ test-pipe.c test-quotearg-simple.c test-raise.c \
+ test-read-file.c test-readlink.c test-regex.c test-rename.c \
+ test-rmdir.c test-sameacls.c test-select.c test-select-fd.c \
test-select-stdin.c test-set-mode-acl.c test-setenv.c \
test-setlocale1.c test-setlocale2.c test-setsockopt.c \
test-sigaction.c test-signal-h.c test-sigprocmask.c \
@@ -1181,15 +1197,15 @@ DIST_SOURCES = $(libtests_a_SOURCES) $(EXTRA_libtests_a_SOURCES) \
test-getopt-posix.c test-getprogname.c test-gettimeofday.c \
test-ignore-value.c test-inet_pton.c test-intprops.c \
test-inttypes.c test-ioctl.c test-isblank.c test-langinfo.c \
- test-limits-h.c test-link.c test-listen.c test-locale.c \
- test-localeconv.c test-localename.c test-lseek.c test-lstat.c \
- test-malloca.c test-mbrtowc.c test-mbrtowc-w32.c \
- test-mbsinit.c test-memchr.c test-memrchr.c test-nanosleep.c \
- test-netinet_in.c test-nl_langinfo.c test-open.c \
- test-pathmax.c test-perror.c test-perror2.c test-pipe.c \
- test-quotearg-simple.c test-raise.c test-read-file.c \
- test-readlink.c test-regex.c test-rename.c test-rmdir.c \
- test-sameacls.c test-select.c test-select-fd.c \
+ test-limits-h.c test-link.c test-listen.c test-localcharset.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-mkdir.c \
+ test-nanosleep.c test-netinet_in.c test-nl_langinfo.c \
+ test-open.c test-pathmax.c test-perror.c test-perror2.c \
+ test-pipe.c test-quotearg-simple.c test-raise.c \
+ test-read-file.c test-readlink.c test-regex.c test-rename.c \
+ test-rmdir.c test-sameacls.c test-select.c test-select-fd.c \
test-select-stdin.c test-set-mode-acl.c test-setenv.c \
test-setlocale1.c test-setlocale2.c test-setsockopt.c \
test-sigaction.c test-signal-h.c test-sigprocmask.c \
@@ -1477,7 +1493,6 @@ am__relativize = \
dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \
done; \
reldir="$$dir2"
-pkglibexecdir = @pkglibexecdir@
ACLOCAL = @ACLOCAL@
ALLOCA = @ALLOCA@
ALLOCA_H = @ALLOCA_H@
@@ -1591,6 +1606,7 @@ GNULIB_GETLOADAVG = @GNULIB_GETLOADAVG@
GNULIB_GETLOGIN = @GNULIB_GETLOGIN@
GNULIB_GETLOGIN_R = @GNULIB_GETLOGIN_R@
GNULIB_GETPAGESIZE = @GNULIB_GETPAGESIZE@
+GNULIB_GETPASS = @GNULIB_GETPASS@
GNULIB_GETPEERNAME = @GNULIB_GETPEERNAME@
GNULIB_GETSOCKNAME = @GNULIB_GETSOCKNAME@
GNULIB_GETSOCKOPT = @GNULIB_GETSOCKOPT@
@@ -1615,6 +1631,7 @@ GNULIB_LINK = @GNULIB_LINK@
GNULIB_LINKAT = @GNULIB_LINKAT@
GNULIB_LISTEN = @GNULIB_LISTEN@
GNULIB_LOCALECONV = @GNULIB_LOCALECONV@
+GNULIB_LOCALENAME = @GNULIB_LOCALENAME@
GNULIB_LOCALTIME = @GNULIB_LOCALTIME@
GNULIB_LSEEK = @GNULIB_LSEEK@
GNULIB_LSTAT = @GNULIB_LSTAT@
@@ -1863,6 +1880,7 @@ 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_TRUNCATE = @HAVE_DECL_TRUNCATE@
HAVE_DECL_TTYNAME_R = @HAVE_DECL_TTYNAME_R@
HAVE_DECL_UNSETENV = @HAVE_DECL_UNSETENV@
HAVE_DECL_VSNPRINTF = @HAVE_DECL_VSNPRINTF@
@@ -1885,6 +1903,7 @@ HAVE_FDOPENDIR = @HAVE_FDOPENDIR@
HAVE_FEATURES_H = @HAVE_FEATURES_H@
HAVE_FFSL = @HAVE_FFSL@
HAVE_FFSLL = @HAVE_FFSLL@
+HAVE_FREELOCALE = @HAVE_FREELOCALE@
HAVE_FSEEKO = @HAVE_FSEEKO@
HAVE_FSTATAT = @HAVE_FSTATAT@
HAVE_FSYNC = @HAVE_FSYNC@
@@ -1897,10 +1916,12 @@ HAVE_GETHOSTNAME = @HAVE_GETHOSTNAME@
HAVE_GETLOGIN = @HAVE_GETLOGIN@
HAVE_GETOPT_H = @HAVE_GETOPT_H@
HAVE_GETPAGESIZE = @HAVE_GETPAGESIZE@
+HAVE_GETPASS = @HAVE_GETPASS@
HAVE_GETSUBOPT = @HAVE_GETSUBOPT@
HAVE_GETTIMEOFDAY = @HAVE_GETTIMEOFDAY@
HAVE_GRANTPT = @HAVE_GRANTPT@
HAVE_GROUP_MEMBER = @HAVE_GROUP_MEMBER@
+HAVE_IMAXDIV_T = @HAVE_IMAXDIV_T@
HAVE_INTTYPES_H = @HAVE_INTTYPES_H@
HAVE_ISBLANK = @HAVE_ISBLANK@
HAVE_ISWBLANK = @HAVE_ISWBLANK@
@@ -1939,6 +1960,7 @@ HAVE_MKSTEMPS = @HAVE_MKSTEMPS@
HAVE_MSVC_INVALID_PARAMETER_HANDLER = @HAVE_MSVC_INVALID_PARAMETER_HANDLER@
HAVE_NANOSLEEP = @HAVE_NANOSLEEP@
HAVE_NETINET_IN_H = @HAVE_NETINET_IN_H@
+HAVE_NEWLOCALE = @HAVE_NEWLOCALE@
HAVE_NL_LANGINFO = @HAVE_NL_LANGINFO@
HAVE_OPENAT = @HAVE_OPENAT@
HAVE_OPENDIR = @HAVE_OPENDIR@
@@ -2014,7 +2036,6 @@ HAVE_SYS_TYPES_H = @HAVE_SYS_TYPES_H@
HAVE_SYS_UIO_H = @HAVE_SYS_UIO_H@
HAVE_TIMEGM = @HAVE_TIMEGM@
HAVE_TIMEZONE_T = @HAVE_TIMEZONE_T@
-HAVE_TRUNCATE = @HAVE_TRUNCATE@
HAVE_TYPE_VOLATILE_SIG_ATOMIC_T = @HAVE_TYPE_VOLATILE_SIG_ATOMIC_T@
HAVE_TZSET = @HAVE_TZSET@
HAVE_UNISTD_H = @HAVE_UNISTD_H@
@@ -2068,8 +2089,6 @@ HAVE_WS2TCPIP_H = @HAVE_WS2TCPIP_H@
HAVE_XLOCALE_H = @HAVE_XLOCALE_H@
HAVE__BOOL = @HAVE__BOOL@
HAVE__EXIT = @HAVE__EXIT@
-HOST_CPU = @HOST_CPU@
-HOST_CPU_C_ABI = @HOST_CPU_C_ABI@
INCLUDE_NEXT = @INCLUDE_NEXT@
INCLUDE_NEXT_AS_FIRST_DIRECTIVE = @INCLUDE_NEXT_AS_FIRST_DIRECTIVE@
INET_PTON_LIB = @INET_PTON_LIB@
@@ -2219,6 +2238,7 @@ REPLACE_FFLUSH = @REPLACE_FFLUSH@
REPLACE_FOPEN = @REPLACE_FOPEN@
REPLACE_FPRINTF = @REPLACE_FPRINTF@
REPLACE_FPURGE = @REPLACE_FPURGE@
+REPLACE_FREELOCALE = @REPLACE_FREELOCALE@
REPLACE_FREOPEN = @REPLACE_FREOPEN@
REPLACE_FSEEK = @REPLACE_FSEEK@
REPLACE_FSEEKO = @REPLACE_FSEEKO@
@@ -2236,6 +2256,7 @@ REPLACE_GETGROUPS = @REPLACE_GETGROUPS@
REPLACE_GETLINE = @REPLACE_GETLINE@
REPLACE_GETLOGIN_R = @REPLACE_GETLOGIN_R@
REPLACE_GETPAGESIZE = @REPLACE_GETPAGESIZE@
+REPLACE_GETPASS = @REPLACE_GETPASS@
REPLACE_GETTIMEOFDAY = @REPLACE_GETTIMEOFDAY@
REPLACE_GMTIME = @REPLACE_GMTIME@
REPLACE_INET_NTOP = @REPLACE_INET_NTOP@
@@ -2268,6 +2289,7 @@ REPLACE_MKNOD = @REPLACE_MKNOD@
REPLACE_MKSTEMP = @REPLACE_MKSTEMP@
REPLACE_MKTIME = @REPLACE_MKTIME@
REPLACE_NANOSLEEP = @REPLACE_NANOSLEEP@
+REPLACE_NEWLOCALE = @REPLACE_NEWLOCALE@
REPLACE_NL_LANGINFO = @REPLACE_NL_LANGINFO@
REPLACE_NULL = @REPLACE_NULL@
REPLACE_OBSTACK_PRINTF = @REPLACE_OBSTACK_PRINTF@
@@ -2426,7 +2448,6 @@ infodir = @infodir@
install_sh = @install_sh@
libdir = @libdir@
libexecdir = @libexecdir@
-lispdir = @lispdir@
localedir = @localedir@
localstatedir = @localstatedir@
mandir = @mandir@
@@ -2445,7 +2466,7 @@ target_alias = @target_alias@
top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
-AUTOMAKE_OPTIONS = 1.9.6 foreign
+AUTOMAKE_OPTIONS = 1.11 foreign
SUBDIRS = .
TESTS_ENVIRONMENT = EXEEXT='@EXEEXT@' srcdir='$(srcdir)' \
USE_ACL=$(USE_ACL) LOCALE_FR='@LOCALE_FR@' \
@@ -2514,50 +2535,51 @@ EXTRA_DIST = accept.c w32sock.h test-accept.c signature.h macros.h \
macros.h test-isblank.c signature.h macros.h test-langinfo.c \
test-limits-h.c link.c test-link.h test-link.c signature.h \
macros.h listen.c w32sock.h test-listen.c signature.h macros.h \
- test-locale.c test-localeconv.c signature.h macros.h \
- localename.h test-localename.c macros.h lseek.c test-lseek.c \
- test-lseek.sh signature.h macros.h test-lstat.h test-lstat.c \
- signature.h macros.h test-malloca.c test-mbrtowc1.sh \
- test-mbrtowc2.sh test-mbrtowc3.sh test-mbrtowc4.sh \
- test-mbrtowc5.sh test-mbrtowc.c test-mbrtowc-w32-1.sh \
- test-mbrtowc-w32-2.sh test-mbrtowc-w32-3.sh \
- test-mbrtowc-w32-4.sh test-mbrtowc-w32-5.sh test-mbrtowc-w32.c \
- signature.h macros.h test-mbsinit.sh test-mbsinit.c \
- signature.h macros.h test-memchr.c zerosize-ptr.h signature.h \
- macros.h test-memrchr.c zerosize-ptr.h signature.h macros.h \
- nanosleep.c test-nanosleep.c signature.h macros.h \
- netinet_in.in.h test-netinet_in.c test-nl_langinfo.sh \
- test-nl_langinfo.c signature.h macros.h open.c test-open.h \
- test-open.c signature.h macros.h dirent-private.h opendir.c \
- test-pathmax.c perror.c macros.h signature.h test-perror.c \
- test-perror2.c test-perror.sh pipe.c test-pipe.c signature.h \
- macros.h putenv.c test-quotearg-simple.c test-quotearg.h \
- macros.h zerosize-ptr.h raise.c test-raise.c signature.h \
- macros.h read-file.h test-read-file.c dirent-private.h \
- readdir.c test-readlink.h test-readlink.c signature.h macros.h \
- realloc.c test-regex.c macros.h test-rename.h test-rename.c \
- signature.h macros.h test-rmdir.h test-rmdir.c signature.h \
- macros.h select.c macros.h signature.h test-select.c \
- test-select.h test-select-fd.c test-select-in.sh \
- test-select-out.sh test-select-stdin.c setenv.c test-setenv.c \
- signature.h macros.h setlocale.c test-setlocale1.sh \
- test-setlocale1.c test-setlocale2.sh test-setlocale2.c \
- signature.h macros.h setsockopt.c w32sock.h test-setsockopt.c \
- signature.h macros.h sig-handler.h sigaction.c \
- test-sigaction.c signature.h macros.h signal.in.h \
- test-signal-h.c sigprocmask.c test-sigprocmask.c signature.h \
- macros.h sleep.c test-sleep.c signature.h macros.h _Noreturn.h \
- arg-nonnull.h c++defs.h unused-parameter.h warn-on-use.h \
- socket.c w32sock.h w32sock.h test-sockets.c test-stat.h \
- test-stat.c signature.h macros.h test-stat-time.c macros.h \
- nap.h test-stdalign.c macros.h test-stdbool.c test-stddef.c \
- test-stdint.c test-stdio.c test-stdlib.c test-sys_wait.h \
- strdup.c test-strerror.c signature.h macros.h strerror_r.c \
- test-strerror_r.c signature.h macros.h test-string.c \
- test-strverscmp.c signature.h macros.h symlink.c \
- test-symlink.h test-symlink.c signature.h macros.h \
- sys_ioctl.in.h test-sys_ioctl.c sys_select.in.h \
- test-sys_select.c signature.h sys_socket.in.h \
+ test-localcharset.c test-locale.c test-localeconv.c \
+ signature.h macros.h localename-table.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-mkdir.h test-mkdir.c signature.h macros.h nanosleep.c \
+ test-nanosleep.c signature.h macros.h netinet_in.in.h \
+ test-netinet_in.c test-nl_langinfo.sh test-nl_langinfo.c \
+ signature.h macros.h open.c test-open.h test-open.c \
+ signature.h macros.h dirent-private.h opendir.c test-pathmax.c \
+ perror.c macros.h signature.h test-perror.c test-perror2.c \
+ test-perror.sh pipe.c test-pipe.c signature.h macros.h \
+ putenv.c test-quotearg-simple.c test-quotearg.h macros.h \
+ zerosize-ptr.h raise.c test-raise.c signature.h macros.h \
+ read-file.h test-read-file.c dirent-private.h readdir.c \
+ test-readlink.h test-readlink.c signature.h macros.h realloc.c \
+ test-regex.c macros.h test-rename.h test-rename.c signature.h \
+ macros.h test-rmdir.h test-rmdir.c signature.h macros.h \
+ select.c macros.h signature.h test-select.c test-select.h \
+ test-select-fd.c test-select-in.sh test-select-out.sh \
+ test-select-stdin.c setenv.c test-setenv.c signature.h \
+ macros.h setlocale.c test-setlocale1.sh test-setlocale1.c \
+ test-setlocale2.sh test-setlocale2.c signature.h macros.h \
+ setsockopt.c w32sock.h test-setsockopt.c signature.h macros.h \
+ sig-handler.h sigaction.c test-sigaction.c signature.h \
+ macros.h signal.in.h test-signal-h.c sigprocmask.c \
+ test-sigprocmask.c signature.h macros.h sleep.c test-sleep.c \
+ signature.h macros.h _Noreturn.h arg-nonnull.h c++defs.h \
+ unused-parameter.h warn-on-use.h socket.c w32sock.h w32sock.h \
+ test-sockets.c test-stat.h test-stat.c signature.h macros.h \
+ test-stat-time.c macros.h nap.h test-stdalign.c macros.h \
+ test-stdbool.c test-stddef.c test-stdint.c test-stdio.c \
+ test-stdlib.c test-sys_wait.h strdup.c test-strerror.c \
+ signature.h macros.h strerror_r.c test-strerror_r.c \
+ signature.h macros.h test-string.c test-strverscmp.c \
+ signature.h macros.h symlink.c test-symlink.h test-symlink.c \
+ signature.h macros.h sys_ioctl.in.h test-sys_ioctl.c \
+ sys_select.in.h test-sys_select.c signature.h sys_socket.in.h \
test-sys_socket.c test-sys_stat.c test-sys_time.c \
test-sys_types.c sys_uio.in.h test-sys_uio.c init.sh \
test-init.sh test-time.c test-unistd.c unsetenv.c \
@@ -2595,9 +2617,9 @@ AM_CPPFLAGS = \
-I../lib -I$(srcdir)/../lib
LDADD = libtests.a ../lib/libsed.a libtests.a $(LIBTESTS_LIBDEPS)
-libtests_a_SOURCES = binary-io.h binary-io.c cloexec.c fd-hook.c \
- file-has-acl.c freading.c localename.c read-file.c \
- sig-handler.c sockets.h sockets.c sys_socket.c
+libtests_a_SOURCES = cloexec.c fd-hook.c file-has-acl.c freading.c \
+ localename.c localename-table.c read-file.c sig-handler.c \
+ sockets.h sockets.c sys_socket.c
libtests_a_LIBADD = $(gltests_LIBOBJS)
libtests_a_DEPENDENCIES = $(gltests_LIBOBJS)
EXTRA_libtests_a_SOURCES = accept.c bind.c close.c closedir.c \
@@ -2970,6 +2992,10 @@ test-listen$(EXEEXT): $(test_listen_OBJECTS) $(test_listen_DEPENDENCIES) $(EXTRA
@rm -f test-listen$(EXEEXT)
$(AM_V_CCLD)$(LINK) $(test_listen_OBJECTS) $(test_listen_LDADD) $(LIBS)
+test-localcharset$(EXEEXT): $(test_localcharset_OBJECTS) $(test_localcharset_DEPENDENCIES) $(EXTRA_test_localcharset_DEPENDENCIES)
+ @rm -f test-localcharset$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(test_localcharset_OBJECTS) $(test_localcharset_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)
@@ -3014,6 +3040,10 @@ test-memrchr$(EXEEXT): $(test_memrchr_OBJECTS) $(test_memrchr_DEPENDENCIES) $(EX
@rm -f test-memrchr$(EXEEXT)
$(AM_V_CCLD)$(LINK) $(test_memrchr_OBJECTS) $(test_memrchr_LDADD) $(LIBS)
+test-mkdir$(EXEEXT): $(test_mkdir_OBJECTS) $(test_mkdir_DEPENDENCIES) $(EXTRA_test_mkdir_DEPENDENCIES)
+ @rm -f test-mkdir$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(test_mkdir_OBJECTS) $(test_mkdir_LDADD) $(LIBS)
+
test-nanosleep$(EXEEXT): $(test_nanosleep_OBJECTS) $(test_nanosleep_DEPENDENCIES) $(EXTRA_test_nanosleep_DEPENDENCIES)
@rm -f test-nanosleep$(EXEEXT)
$(AM_V_CCLD)$(LINK) $(test_nanosleep_OBJECTS) $(test_nanosleep_LDADD) $(LIBS)
@@ -3261,7 +3291,6 @@ distclean-compile:
-rm -f *.tab.c
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/accept.Po@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/binary-io.Po@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bind.Po@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cloexec.Po@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/close.Po@am__quote@ # am--include-marker
@@ -3289,6 +3318,7 @@ distclean-compile:
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ioctl.Po@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/link.Po@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/listen.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/localename-table.Po@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/localename.Po@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lseek.Po@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nanosleep.Po@am__quote@ # am--include-marker
@@ -3378,6 +3408,7 @@ distclean-compile:
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-limits-h.Po@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-link.Po@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-listen.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-localcharset.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
@@ -3389,6 +3420,7 @@ distclean-compile:
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-mbsinit.Po@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-memchr.Po@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-memrchr.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-mkdir.Po@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-nanosleep.Po@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-netinet_in.Po@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-nl_langinfo.Po@am__quote@ # am--include-marker
@@ -4378,6 +4410,13 @@ test-memrchr.log: test-memrchr$(EXEEXT)
--log-file $$b.log --trs-file $$b.trs \
$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
"$$tst" $(AM_TESTS_FD_REDIRECT)
+test-mkdir.log: test-mkdir$(EXEEXT)
+ @p='test-mkdir$(EXEEXT)'; \
+ b='test-mkdir'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
test-nanosleep.log: test-nanosleep$(EXEEXT)
@p='test-nanosleep$(EXEEXT)'; \
b='test-nanosleep'; \
@@ -4968,7 +5007,6 @@ clean-am: clean-checkLIBRARIES clean-checkPROGRAMS clean-generic \
distclean: distclean-recursive
-rm -f ./$(DEPDIR)/accept.Po
- -rm -f ./$(DEPDIR)/binary-io.Po
-rm -f ./$(DEPDIR)/bind.Po
-rm -f ./$(DEPDIR)/cloexec.Po
-rm -f ./$(DEPDIR)/close.Po
@@ -4996,6 +5034,7 @@ distclean: distclean-recursive
-rm -f ./$(DEPDIR)/ioctl.Po
-rm -f ./$(DEPDIR)/link.Po
-rm -f ./$(DEPDIR)/listen.Po
+ -rm -f ./$(DEPDIR)/localename-table.Po
-rm -f ./$(DEPDIR)/localename.Po
-rm -f ./$(DEPDIR)/lseek.Po
-rm -f ./$(DEPDIR)/nanosleep.Po
@@ -5085,6 +5124,7 @@ distclean: distclean-recursive
-rm -f ./$(DEPDIR)/test-limits-h.Po
-rm -f ./$(DEPDIR)/test-link.Po
-rm -f ./$(DEPDIR)/test-listen.Po
+ -rm -f ./$(DEPDIR)/test-localcharset.Po
-rm -f ./$(DEPDIR)/test-locale.Po
-rm -f ./$(DEPDIR)/test-localeconv.Po
-rm -f ./$(DEPDIR)/test-localename.Po
@@ -5096,6 +5136,7 @@ distclean: distclean-recursive
-rm -f ./$(DEPDIR)/test-mbsinit.Po
-rm -f ./$(DEPDIR)/test-memchr.Po
-rm -f ./$(DEPDIR)/test-memrchr.Po
+ -rm -f ./$(DEPDIR)/test-mkdir.Po
-rm -f ./$(DEPDIR)/test-nanosleep.Po
-rm -f ./$(DEPDIR)/test-netinet_in.Po
-rm -f ./$(DEPDIR)/test-nl_langinfo.Po
@@ -5203,7 +5244,6 @@ installcheck-am:
maintainer-clean: maintainer-clean-recursive
-rm -f ./$(DEPDIR)/accept.Po
- -rm -f ./$(DEPDIR)/binary-io.Po
-rm -f ./$(DEPDIR)/bind.Po
-rm -f ./$(DEPDIR)/cloexec.Po
-rm -f ./$(DEPDIR)/close.Po
@@ -5231,6 +5271,7 @@ maintainer-clean: maintainer-clean-recursive
-rm -f ./$(DEPDIR)/ioctl.Po
-rm -f ./$(DEPDIR)/link.Po
-rm -f ./$(DEPDIR)/listen.Po
+ -rm -f ./$(DEPDIR)/localename-table.Po
-rm -f ./$(DEPDIR)/localename.Po
-rm -f ./$(DEPDIR)/lseek.Po
-rm -f ./$(DEPDIR)/nanosleep.Po
@@ -5320,6 +5361,7 @@ maintainer-clean: maintainer-clean-recursive
-rm -f ./$(DEPDIR)/test-limits-h.Po
-rm -f ./$(DEPDIR)/test-link.Po
-rm -f ./$(DEPDIR)/test-listen.Po
+ -rm -f ./$(DEPDIR)/test-localcharset.Po
-rm -f ./$(DEPDIR)/test-locale.Po
-rm -f ./$(DEPDIR)/test-localeconv.Po
-rm -f ./$(DEPDIR)/test-localename.Po
@@ -5331,6 +5373,7 @@ maintainer-clean: maintainer-clean-recursive
-rm -f ./$(DEPDIR)/test-mbsinit.Po
-rm -f ./$(DEPDIR)/test-memchr.Po
-rm -f ./$(DEPDIR)/test-memrchr.Po
+ -rm -f ./$(DEPDIR)/test-mkdir.Po
-rm -f ./$(DEPDIR)/test-nanosleep.Po
-rm -f ./$(DEPDIR)/test-netinet_in.Po
-rm -f ./$(DEPDIR)/test-nl_langinfo.Po
@@ -5520,6 +5563,7 @@ inttypes.h: inttypes.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(WARN_ON_U
-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/@''HAVE_IMAXDIV_T''@/$(HAVE_IMAXDIV_T)/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' \
diff --git a/gnulib-tests/_Noreturn.h b/gnulib-tests/_Noreturn.h
index c44ad89..94fdfaf 100644
--- a/gnulib-tests/_Noreturn.h
+++ b/gnulib-tests/_Noreturn.h
@@ -1,8 +1,12 @@
-#if !defined _Noreturn && __STDC_VERSION__ < 201112
-# if (3 <= __GNUC__ || (__GNUC__ == 2 && 8 <= __GNUC_MINOR__) \
- || 0x5110 <= __SUNPRO_C)
+#ifndef _Noreturn
+# if 201103 <= (defined __cplusplus ? __cplusplus : 0)
+# define _Noreturn [[noreturn]]
+# elif (201112 <= (defined __STDC_VERSION__ ? __STDC_VERSION__ : 0) \
+ || 4 < __GNUC__ + (7 <= __GNUC_MINOR__))
+ /* _Noreturn works as-is. */
+# elif 2 < __GNUC__ + (8 <= __GNUC_MINOR__) || 0x5110 <= __SUNPRO_C
# define _Noreturn __attribute__ ((__noreturn__))
-# elif 1200 <= _MSC_VER
+# elif 1200 <= (defined _MSC_VER ? _MSC_VER : 0)
# define _Noreturn __declspec (noreturn)
# else
# define _Noreturn
diff --git a/gnulib-tests/dfa-match.sh b/gnulib-tests/dfa-match.sh
index c06bb44..1923c2d 100755
--- a/gnulib-tests/dfa-match.sh
+++ b/gnulib-tests/dfa-match.sh
@@ -22,7 +22,11 @@
path_prepend_ .
if (type timeout) >/dev/null 2>&1; then
- timeout_10='timeout 10'
+ if timeout --help 2>&1 | grep BusyBox; then
+ timeout_10='timeout -t 10'
+ else
+ timeout_10='timeout 10'
+ fi
else
timeout_10=
fi
diff --git a/gnulib-tests/dup2.c b/gnulib-tests/dup2.c
index c8b49b2..c7d1767 100644
--- a/gnulib-tests/dup2.c
+++ b/gnulib-tests/dup2.c
@@ -29,7 +29,7 @@
# undef dup2
-# if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
+# if defined _WIN32 && ! defined __CYGWIN__
/* Get declarations of the native Windows API functions. */
# define WIN32_LEAN_AND_MEAN
diff --git a/gnulib-tests/fcntl.c b/gnulib-tests/fcntl.c
index b8cb271..74e0f5d 100644
--- a/gnulib-tests/fcntl.c
+++ b/gnulib-tests/fcntl.c
@@ -27,12 +27,12 @@
#include <stdarg.h>
#include <unistd.h>
-#if !HAVE_FCNTL
-# define rpl_fcntl fcntl
+#ifdef __KLIBC__
+# define INCL_DOS
+# include <os2.h>
#endif
-#undef fcntl
-#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
+#if defined _WIN32 && ! defined __CYGWIN__
/* Get declarations of the native Windows API functions. */
# define WIN32_LEAN_AND_MEAN
# include <windows.h>
@@ -166,93 +166,18 @@ dupfd (int oldfd, int newfd, int flags)
}
#endif /* W32 */
+/* Forward declarations, because we '#undef fcntl' in the middle of this
+ compilation unit. */
+/* Our implementation of fcntl (fd, F_DUPFD, target). */
+static int rpl_fcntl_DUPFD (int fd, int target);
+/* Our implementation of fcntl (fd, F_DUPFD_CLOEXEC, target). */
+static int rpl_fcntl_DUPFD_CLOEXEC (int fd, int target);
#ifdef __KLIBC__
-
-# define INCL_DOS
-# include <os2.h>
-
-static int
-klibc_fcntl (int fd, int action, /* arg */...)
-{
- va_list arg_ptr;
- int arg;
- struct stat sbuf;
- int result = -1;
-
- va_start (arg_ptr, action);
- arg = va_arg (arg_ptr, int);
- result = fcntl (fd, action, arg);
- /* EPERM for F_DUPFD, ENOTSUP for others */
- if (result == -1 && (errno == EPERM || errno == ENOTSUP)
- && !fstat (fd, &sbuf) && S_ISDIR (sbuf.st_mode))
- {
- ULONG ulMode;
-
- switch (action)
- {
- case F_DUPFD:
- /* Find available fd */
- while (fcntl (arg, F_GETFL) != -1 || errno != EBADF)
- arg++;
-
- result = dup2 (fd, arg);
- break;
-
- /* Using underlying APIs is right ? */
- case F_GETFD:
- if (DosQueryFHState (fd, &ulMode))
- break;
-
- result = (ulMode & OPEN_FLAGS_NOINHERIT) ? FD_CLOEXEC : 0;
- break;
-
- case F_SETFD:
- if (arg & ~FD_CLOEXEC)
- break;
-
- if (DosQueryFHState (fd, &ulMode))
- break;
-
- if (arg & FD_CLOEXEC)
- ulMode |= OPEN_FLAGS_NOINHERIT;
- else
- ulMode &= ~OPEN_FLAGS_NOINHERIT;
-
- /* Filter supported flags. */
- ulMode &= (OPEN_FLAGS_WRITE_THROUGH | OPEN_FLAGS_FAIL_ON_ERROR
- | OPEN_FLAGS_NO_CACHE | OPEN_FLAGS_NOINHERIT);
-
- if (DosSetFHState (fd, ulMode))
- break;
-
- result = 0;
- break;
-
- case F_GETFL:
- result = 0;
- break;
-
- case F_SETFL:
- if (arg != 0)
- break;
-
- result = 0;
- break;
-
- default :
- errno = EINVAL;
- break;
- }
- }
-
- va_end (arg_ptr);
-
- return result;
-}
-
-# define fcntl klibc_fcntl
+/* Adds support for fcntl on directories. */
+static int klibc_fcntl (int fd, int action, /* arg */...);
#endif
+
/* Perform the specified ACTION on the file descriptor FD, possibly
using the argument ARG further described below. This replacement
handles the following actions, and forwards all others on to the
@@ -273,110 +198,35 @@ klibc_fcntl (int fd, int action, /* arg */...)
return -1 and set errno. */
int
-rpl_fcntl (int fd, int action, /* arg */...)
+fcntl (int fd, int action, /* arg */...)
+#undef fcntl
+#ifdef __KLIBC__
+# define fcntl klibc_fcntl
+#endif
{
va_list arg;
int result = -1;
va_start (arg, action);
switch (action)
{
-
-#if !HAVE_FCNTL
case F_DUPFD:
{
int target = va_arg (arg, int);
- result = dupfd (fd, target, 0);
+ result = rpl_fcntl_DUPFD (fd, target);
break;
}
-#elif FCNTL_DUPFD_BUGGY || REPLACE_FCHDIR
- case F_DUPFD:
- {
- int target = va_arg (arg, int);
- /* Detect invalid target; needed for cygwin 1.5.x. */
- if (target < 0 || getdtablesize () <= target)
- errno = EINVAL;
- else
- {
- /* Haiku alpha 2 loses fd flags on original. */
- int flags = fcntl (fd, F_GETFD);
- if (flags < 0)
- {
- result = -1;
- break;
- }
- result = fcntl (fd, action, target);
- if (0 <= result && fcntl (fd, F_SETFD, flags) == -1)
- {
- int saved_errno = errno;
- close (result);
- result = -1;
- errno = saved_errno;
- }
-# if REPLACE_FCHDIR
- if (0 <= result)
- result = _gl_register_dup (fd, result);
-# endif
- }
- break;
- } /* F_DUPFD */
-#endif /* FCNTL_DUPFD_BUGGY || REPLACE_FCHDIR */
case F_DUPFD_CLOEXEC:
{
int target = va_arg (arg, int);
-
-#if !HAVE_FCNTL
- result = dupfd (fd, target, O_CLOEXEC);
- break;
-#else /* HAVE_FCNTL */
- /* Try the system call first, if the headers claim it exists
- (that is, if GNULIB_defined_F_DUPFD_CLOEXEC is 0), since we
- may be running with a glibc that has the macro but with an
- older kernel that does not support it. Cache the
- information on whether the system call really works, but
- avoid caching failure if the corresponding F_DUPFD fails
- for any reason. 0 = unknown, 1 = yes, -1 = no. */
- static int have_dupfd_cloexec = GNULIB_defined_F_DUPFD_CLOEXEC ? -1 : 0;
- if (0 <= have_dupfd_cloexec)
- {
- result = fcntl (fd, action, target);
- if (0 <= result || errno != EINVAL)
- {
- have_dupfd_cloexec = 1;
-# if REPLACE_FCHDIR
- if (0 <= result)
- result = _gl_register_dup (fd, result);
-# endif
- }
- else
- {
- result = rpl_fcntl (fd, F_DUPFD, target);
- if (result < 0)
- break;
- have_dupfd_cloexec = -1;
- }
- }
- else
- result = rpl_fcntl (fd, F_DUPFD, target);
- if (0 <= result && have_dupfd_cloexec == -1)
- {
- int flags = fcntl (result, F_GETFD);
- if (flags < 0 || fcntl (result, F_SETFD, flags | FD_CLOEXEC) == -1)
- {
- int saved_errno = errno;
- close (result);
- errno = saved_errno;
- result = -1;
- }
- }
+ result = rpl_fcntl_DUPFD_CLOEXEC (fd, target);
break;
-#endif /* HAVE_FCNTL */
- } /* F_DUPFD_CLOEXEC */
+ }
#if !HAVE_FCNTL
case F_GETFD:
{
-# if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
+# if defined _WIN32 && ! defined __CYGWIN__
HANDLE handle = (HANDLE) _get_osfhandle (fd);
DWORD flags;
if (handle == INVALID_HANDLE_VALUE
@@ -405,8 +255,183 @@ rpl_fcntl (int fd, int action, /* arg */...)
default:
{
#if HAVE_FCNTL
- void *p = va_arg (arg, void *);
- result = fcntl (fd, action, p);
+ switch (action)
+ {
+ #ifdef F_BARRIERFSYNC /* macOS */
+ case F_BARRIERFSYNC:
+ #endif
+ #ifdef F_CHKCLEAN /* macOS */
+ case F_CHKCLEAN:
+ #endif
+ #ifdef F_CLOSEM /* NetBSD, HP-UX */
+ case F_CLOSEM:
+ #endif
+ #ifdef F_FLUSH_DATA /* macOS */
+ case F_FLUSH_DATA:
+ #endif
+ #ifdef F_FREEZE_FS /* macOS */
+ case F_FREEZE_FS:
+ #endif
+ #ifdef F_FULLFSYNC /* macOS */
+ case F_FULLFSYNC:
+ #endif
+ #ifdef F_GETCONFINED /* macOS */
+ case F_GETCONFINED:
+ #endif
+ #ifdef F_GETDEFAULTPROTLEVEL /* macOS */
+ case F_GETDEFAULTPROTLEVEL:
+ #endif
+ #ifdef F_GETFD /* POSIX */
+ case F_GETFD:
+ #endif
+ #ifdef F_GETFL /* POSIX */
+ case F_GETFL:
+ #endif
+ #ifdef F_GETLEASE /* Linux */
+ case F_GETLEASE:
+ #endif
+ #ifdef F_GETNOSIGPIPE /* macOS */
+ case F_GETNOSIGPIPE:
+ #endif
+ #ifdef F_GETOWN /* POSIX */
+ case F_GETOWN:
+ #endif
+ #ifdef F_GETPIPE_SZ /* Linux */
+ case F_GETPIPE_SZ:
+ #endif
+ #ifdef F_GETPROTECTIONCLASS /* macOS */
+ case F_GETPROTECTIONCLASS:
+ #endif
+ #ifdef F_GETPROTECTIONLEVEL /* macOS */
+ case F_GETPROTECTIONLEVEL:
+ #endif
+ #ifdef F_GET_SEALS /* Linux */
+ case F_GET_SEALS:
+ #endif
+ #ifdef F_GETSIG /* Linux */
+ case F_GETSIG:
+ #endif
+ #ifdef F_MAXFD /* NetBSD */
+ case F_MAXFD:
+ #endif
+ #ifdef F_RECYCLE /* macOS */
+ case F_RECYCLE:
+ #endif
+ #ifdef F_SETFIFOENH /* HP-UX */
+ case F_SETFIFOENH:
+ #endif
+ #ifdef F_THAW_FS /* macOS */
+ case F_THAW_FS:
+ #endif
+ /* These actions take no argument. */
+ result = fcntl (fd, action);
+ break;
+
+ #ifdef F_ADD_SEALS /* Linux */
+ case F_ADD_SEALS:
+ #endif
+ #ifdef F_BADFD /* Solaris */
+ case F_BADFD:
+ #endif
+ #ifdef F_CHECK_OPENEVT /* macOS */
+ case F_CHECK_OPENEVT:
+ #endif
+ #ifdef F_DUP2FD /* FreeBSD, AIX, Solaris */
+ case F_DUP2FD:
+ #endif
+ #ifdef F_DUP2FD_CLOEXEC /* FreeBSD, Solaris */
+ case F_DUP2FD_CLOEXEC:
+ #endif
+ #ifdef F_DUP2FD_CLOFORK /* Solaris */
+ case F_DUP2FD_CLOFORK:
+ #endif
+ #ifdef F_DUPFD /* POSIX */
+ case F_DUPFD:
+ #endif
+ #ifdef F_DUPFD_CLOEXEC /* POSIX */
+ case F_DUPFD_CLOEXEC:
+ #endif
+ #ifdef F_DUPFD_CLOFORK /* Solaris */
+ case F_DUPFD_CLOFORK:
+ #endif
+ #ifdef F_GETXFL /* Solaris */
+ case F_GETXFL:
+ #endif
+ #ifdef F_GLOBAL_NOCACHE /* macOS */
+ case F_GLOBAL_NOCACHE:
+ #endif
+ #ifdef F_MAKECOMPRESSED /* macOS */
+ case F_MAKECOMPRESSED:
+ #endif
+ #ifdef F_MOVEDATAEXTENTS /* macOS */
+ case F_MOVEDATAEXTENTS:
+ #endif
+ #ifdef F_NOCACHE /* macOS */
+ case F_NOCACHE:
+ #endif
+ #ifdef F_NODIRECT /* macOS */
+ case F_NODIRECT:
+ #endif
+ #ifdef F_NOTIFY /* Linux */
+ case F_NOTIFY:
+ #endif
+ #ifdef F_OPLKACK /* IRIX */
+ case F_OPLKACK:
+ #endif
+ #ifdef F_OPLKREG /* IRIX */
+ case F_OPLKREG:
+ #endif
+ #ifdef F_RDAHEAD /* macOS */
+ case F_RDAHEAD:
+ #endif
+ #ifdef F_SETBACKINGSTORE /* macOS */
+ case F_SETBACKINGSTORE:
+ #endif
+ #ifdef F_SETCONFINED /* macOS */
+ case F_SETCONFINED:
+ #endif
+ #ifdef F_SETFD /* POSIX */
+ case F_SETFD:
+ #endif
+ #ifdef F_SETFL /* POSIX */
+ case F_SETFL:
+ #endif
+ #ifdef F_SETLEASE /* Linux */
+ case F_SETLEASE:
+ #endif
+ #ifdef F_SETNOSIGPIPE /* macOS */
+ case F_SETNOSIGPIPE:
+ #endif
+ #ifdef F_SETOWN /* POSIX */
+ case F_SETOWN:
+ #endif
+ #ifdef F_SETPIPE_SZ /* Linux */
+ case F_SETPIPE_SZ:
+ #endif
+ #ifdef F_SETPROTECTIONCLASS /* macOS */
+ case F_SETPROTECTIONCLASS:
+ #endif
+ #ifdef F_SETSIG /* Linux */
+ case F_SETSIG:
+ #endif
+ #ifdef F_SINGLE_WRITER /* macOS */
+ case F_SINGLE_WRITER:
+ #endif
+ /* These actions take an 'int' argument. */
+ {
+ int x = va_arg (arg, int);
+ result = fcntl (fd, action, x);
+ }
+ break;
+
+ default:
+ /* Other actions take a pointer argument. */
+ {
+ void *p = va_arg (arg, void *);
+ result = fcntl (fd, action, p);
+ }
+ break;
+ }
#else
errno = EINVAL;
#endif
@@ -416,3 +441,186 @@ rpl_fcntl (int fd, int action, /* arg */...)
va_end (arg);
return result;
}
+
+static int
+rpl_fcntl_DUPFD (int fd, int target)
+{
+ int result;
+#if !HAVE_FCNTL
+ result = dupfd (fd, target, 0);
+#elif FCNTL_DUPFD_BUGGY || REPLACE_FCHDIR
+ /* Detect invalid target; needed for cygwin 1.5.x. */
+ if (target < 0 || getdtablesize () <= target)
+ {
+ result = -1;
+ errno = EINVAL;
+ }
+ else
+ {
+ /* Haiku alpha 2 loses fd flags on original. */
+ int flags = fcntl (fd, F_GETFD);
+ if (flags < 0)
+ result = -1;
+ else
+ {
+ result = fcntl (fd, F_DUPFD, target);
+ if (0 <= result && fcntl (fd, F_SETFD, flags) == -1)
+ {
+ int saved_errno = errno;
+ close (result);
+ result = -1;
+ errno = saved_errno;
+ }
+# if REPLACE_FCHDIR
+ if (0 <= result)
+ result = _gl_register_dup (fd, result);
+# endif
+ }
+ }
+#else
+ result = fcntl (fd, F_DUPFD, target);
+#endif
+ return result;
+}
+
+static int
+rpl_fcntl_DUPFD_CLOEXEC (int fd, int target)
+{
+ int result;
+#if !HAVE_FCNTL
+ result = dupfd (fd, target, O_CLOEXEC);
+#else /* HAVE_FCNTL */
+# if defined __HAIKU__
+ /* On Haiku, the system fcntl (fd, F_DUPFD_CLOEXEC, target) sets
+ the FD_CLOEXEC flag on fd, not on target. Therefore avoid the
+ system fcntl in this case. */
+# define have_dupfd_cloexec -1
+# else
+ /* Try the system call first, if the headers claim it exists
+ (that is, if GNULIB_defined_F_DUPFD_CLOEXEC is 0), since we
+ may be running with a glibc that has the macro but with an
+ older kernel that does not support it. Cache the
+ information on whether the system call really works, but
+ avoid caching failure if the corresponding F_DUPFD fails
+ for any reason. 0 = unknown, 1 = yes, -1 = no. */
+ static int have_dupfd_cloexec = GNULIB_defined_F_DUPFD_CLOEXEC ? -1 : 0;
+ if (0 <= have_dupfd_cloexec)
+ {
+ result = fcntl (fd, F_DUPFD_CLOEXEC, target);
+ if (0 <= result || errno != EINVAL)
+ {
+ have_dupfd_cloexec = 1;
+# if REPLACE_FCHDIR
+ if (0 <= result)
+ result = _gl_register_dup (fd, result);
+# endif
+ }
+ else
+ {
+ result = rpl_fcntl_DUPFD (fd, target);
+ if (result >= 0)
+ have_dupfd_cloexec = -1;
+ }
+ }
+ else
+# endif
+ result = rpl_fcntl_DUPFD (fd, target);
+ if (0 <= result && have_dupfd_cloexec == -1)
+ {
+ int flags = fcntl (result, F_GETFD);
+ if (flags < 0 || fcntl (result, F_SETFD, flags | FD_CLOEXEC) == -1)
+ {
+ int saved_errno = errno;
+ close (result);
+ errno = saved_errno;
+ result = -1;
+ }
+ }
+#endif /* HAVE_FCNTL */
+ return result;
+}
+
+#undef fcntl
+
+#ifdef __KLIBC__
+
+static int
+klibc_fcntl (int fd, int action, /* arg */...);
+{
+ va_list arg_ptr;
+ int arg;
+ struct stat sbuf;
+ int result;
+
+ va_start (arg_ptr, action);
+ arg = va_arg (arg_ptr, int);
+ result = fcntl (fd, action, arg);
+ /* EPERM for F_DUPFD, ENOTSUP for others */
+ if (result == -1 && (errno == EPERM || errno == ENOTSUP)
+ && !fstat (fd, &sbuf) && S_ISDIR (sbuf.st_mode))
+ {
+ ULONG ulMode;
+
+ switch (action)
+ {
+ case F_DUPFD:
+ /* Find available fd */
+ while (fcntl (arg, F_GETFL) != -1 || errno != EBADF)
+ arg++;
+
+ result = dup2 (fd, arg);
+ break;
+
+ /* Using underlying APIs is right ? */
+ case F_GETFD:
+ if (DosQueryFHState (fd, &ulMode))
+ break;
+
+ result = (ulMode & OPEN_FLAGS_NOINHERIT) ? FD_CLOEXEC : 0;
+ break;
+
+ case F_SETFD:
+ if (arg & ~FD_CLOEXEC)
+ break;
+
+ if (DosQueryFHState (fd, &ulMode))
+ break;
+
+ if (arg & FD_CLOEXEC)
+ ulMode |= OPEN_FLAGS_NOINHERIT;
+ else
+ ulMode &= ~OPEN_FLAGS_NOINHERIT;
+
+ /* Filter supported flags. */
+ ulMode &= (OPEN_FLAGS_WRITE_THROUGH | OPEN_FLAGS_FAIL_ON_ERROR
+ | OPEN_FLAGS_NO_CACHE | OPEN_FLAGS_NOINHERIT);
+
+ if (DosSetFHState (fd, ulMode))
+ break;
+
+ result = 0;
+ break;
+
+ case F_GETFL:
+ result = 0;
+ break;
+
+ case F_SETFL:
+ if (arg != 0)
+ break;
+
+ result = 0;
+ break;
+
+ default:
+ errno = EINVAL;
+ break;
+ }
+ }
+
+ va_end (arg_ptr);
+
+ return result;
+}
+
+#endif
diff --git a/gnulib-tests/file-has-acl.c b/gnulib-tests/file-has-acl.c
index 2434986..97fb08a 100644
--- a/gnulib-tests/file-has-acl.c
+++ b/gnulib-tests/file-has-acl.c
@@ -74,7 +74,7 @@ file_has_acl (char const *name, struct stat const *sb)
# elif HAVE_ACL_GET_FILE
/* POSIX 1003.1e (draft 17 -- abandoned) specific version. */
- /* Linux, FreeBSD, Mac OS X, IRIX, Tru64 */
+ /* Linux, FreeBSD, Mac OS X, IRIX, Tru64, Cygwin >= 2.5 */
int ret;
if (HAVE_ACL_EXTENDED_FILE) /* Linux */
@@ -84,7 +84,7 @@ file_has_acl (char const *name, struct stat const *sb)
ACL_TYPE_DEFAULT. */
ret = acl_extended_file (name);
}
- else /* FreeBSD, Mac OS X, IRIX, Tru64 */
+ else /* FreeBSD, Mac OS X, IRIX, Tru64, Cygwin >= 2.5 */
{
# if HAVE_ACL_TYPE_EXTENDED /* Mac OS X */
/* On Mac OS X, acl_get_file (name, ACL_TYPE_ACCESS)
@@ -100,7 +100,7 @@ file_has_acl (char const *name, struct stat const *sb)
}
else
ret = -1;
-# else /* FreeBSD, IRIX, Tru64 */
+# else /* FreeBSD, IRIX, Tru64, Cygwin >= 2.5 */
acl_t acl = acl_get_file (name, ACL_TYPE_ACCESS);
if (acl)
{
@@ -114,7 +114,7 @@ file_has_acl (char const *name, struct stat const *sb)
/* 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 */
+# else /* FreeBSD, IRIX, Cygwin >= 2.5 */
/* 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
@@ -125,8 +125,15 @@ file_has_acl (char const *name, struct stat const *sb)
acl = acl_get_file (name, ACL_TYPE_DEFAULT);
if (acl)
{
+# ifdef __CYGWIN__ /* Cygwin >= 2.5 */
+ ret = acl_access_nontrivial (acl);
+ saved_errno = errno;
+ acl_free (acl);
+ errno = saved_errno;
+# else
ret = (0 < acl_entries (acl));
acl_free (acl);
+# endif
}
else
ret = -1;
@@ -141,7 +148,7 @@ file_has_acl (char const *name, struct stat const *sb)
return - acl_errno_valid (errno);
return ret;
-# elif HAVE_FACL && defined GETACL /* Solaris, Cygwin, not HP-UX */
+# elif HAVE_FACL && defined GETACL /* Solaris, Cygwin < 2.5, not HP-UX */
# if defined ACL_NO_TRIVIAL
diff --git a/gnulib-tests/fpurge.c b/gnulib-tests/fpurge.c
index 554790b..f9c82cd 100644
--- a/gnulib-tests/fpurge.c
+++ b/gnulib-tests/fpurge.c
@@ -19,7 +19,7 @@
/* Specification. */
#include <stdio.h>
-#if HAVE___FPURGE /* glibc >= 2.2, Haiku, Solaris >= 7 */
+#if HAVE___FPURGE /* glibc >= 2.2, Haiku, Solaris >= 7, Android API >= 23 */
# include <stdio_ext.h>
#endif
#include <stdlib.h>
@@ -29,7 +29,7 @@
int
fpurge (FILE *fp)
{
-#if HAVE___FPURGE /* glibc >= 2.2, Haiku, Solaris >= 7, musl libc */
+#if HAVE___FPURGE /* glibc >= 2.2, Haiku, Solaris >= 7, Android API >= 23, musl libc */
__fpurge (fp);
/* The __fpurge function does not have a return value. */
diff --git a/gnulib-tests/freading.h b/gnulib-tests/freading.h
index 29d92b1..31d71fd 100644
--- a/gnulib-tests/freading.h
+++ b/gnulib-tests/freading.h
@@ -33,7 +33,7 @@
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 */
+/* Solaris >= 7, Android API >= 29, not glibc >= 2.2, but glibc >= 2.7, or musl libc */
# include <stdio_ext.h>
# define freading(stream) (__freading (stream) != 0)
diff --git a/gnulib-tests/fseeko.c b/gnulib-tests/fseeko.c
index 8cb3baf..5bd7d66 100644
--- a/gnulib-tests/fseeko.c
+++ b/gnulib-tests/fseeko.c
@@ -33,9 +33,9 @@ fseeko (FILE *fp, off_t offset, int whence)
#endif
#if _GL_WINDOWS_64_BIT_OFF_T
# undef fseeko
-# if HAVE__FSEEKI64 /* msvc, mingw64 */
+# if HAVE__FSEEKI64 && HAVE_DECL__FSEEKI64 /* msvc, mingw since msvcrt8.0, mingw64 */
# define fseeko _fseeki64
-# else /* mingw */
+# else /* mingw before msvcrt8.0 */
# define fseeko fseeko64
# endif
#endif
diff --git a/gnulib-tests/getdtablesize.c b/gnulib-tests/getdtablesize.c
index c6c1136..ac05bc4 100644
--- a/gnulib-tests/getdtablesize.c
+++ b/gnulib-tests/getdtablesize.c
@@ -20,7 +20,7 @@
/* Specification. */
#include <unistd.h>
-#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
+#if defined _WIN32 && ! defined __CYGWIN__
# include <stdio.h>
diff --git a/gnulib-tests/getpagesize.c b/gnulib-tests/getpagesize.c
index 2a01563..9e79ed6 100644
--- a/gnulib-tests/getpagesize.c
+++ b/gnulib-tests/getpagesize.c
@@ -23,7 +23,7 @@
#include <unistd.h>
/* This implementation is only for native Windows systems. */
-#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
+#if defined _WIN32 && ! defined __CYGWIN__
# define WIN32_LEAN_AND_MEAN
# include <windows.h>
diff --git a/gnulib-tests/gnulib.mk b/gnulib-tests/gnulib.mk
index 665e28e..cd6d2a8 100644
--- a/gnulib-tests/gnulib.mk
+++ b/gnulib-tests/gnulib.mk
@@ -22,7 +22,7 @@
#
# Generated by gnulib-tool.
-AUTOMAKE_OPTIONS = 1.9.6 foreign
+AUTOMAKE_OPTIONS = 1.11 foreign
SUBDIRS = .
TESTS =
@@ -153,12 +153,6 @@ EXTRA_DIST += test-arpa_inet.c
## end gnulib module arpa_inet-tests
-## begin gnulib module binary-io
-
-libtests_a_SOURCES += binary-io.h binary-io.c
-
-## end gnulib module binary-io
-
## begin gnulib module binary-io-tests
TESTS += test-binary-io.sh
@@ -832,6 +826,7 @@ inttypes.h: inttypes.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(WARN_ON_U
-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/@''HAVE_IMAXDIV_T''@/$(HAVE_IMAXDIV_T)/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' \
@@ -934,6 +929,13 @@ EXTRA_DIST += test-listen.c signature.h macros.h
## end gnulib module listen-tests
+## begin gnulib module localcharset-tests
+
+noinst_PROGRAMS += test-localcharset
+EXTRA_DIST += test-localcharset.c
+
+## end gnulib module localcharset-tests
+
## begin gnulib module locale-tests
TESTS += test-locale
@@ -952,9 +954,9 @@ EXTRA_DIST += test-localeconv.c signature.h macros.h
## begin gnulib module localename
-libtests_a_SOURCES += localename.c
+libtests_a_SOURCES += localename.c localename-table.c
-EXTRA_DIST += localename.h
+EXTRA_DIST += localename-table.h localename.h
## end gnulib module localename
@@ -1045,6 +1047,14 @@ EXTRA_DIST += test-memrchr.c zerosize-ptr.h signature.h macros.h
## end gnulib module memrchr-tests
+## begin gnulib module mkdir-tests
+
+TESTS += test-mkdir
+check_PROGRAMS += test-mkdir
+EXTRA_DIST += test-mkdir.h test-mkdir.c signature.h macros.h
+
+## end gnulib module mkdir-tests
+
## begin gnulib module nanosleep
diff --git a/gnulib-tests/inttypes.in.h b/gnulib-tests/inttypes.in.h
index ca3cec5..c7d7968 100644
--- a/gnulib-tests/inttypes.in.h
+++ b/gnulib-tests/inttypes.in.h
@@ -52,7 +52,7 @@
/* 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__
+#if defined _WIN32 && ! defined __CYGWIN__
# include <stdio.h>
#endif
@@ -1067,11 +1067,13 @@ _GL_WARN_ON_USE (imaxabs, "imaxabs is unportable - "
#endif
#if @GNULIB_IMAXDIV@
-# if !@HAVE_DECL_IMAXDIV@
+# if !@HAVE_IMAXDIV_T@
# if !GNULIB_defined_imaxdiv_t
typedef struct { intmax_t quot; intmax_t rem; } imaxdiv_t;
# define GNULIB_defined_imaxdiv_t 1
# endif
+# endif
+# if !@HAVE_DECL_IMAXDIV@
extern imaxdiv_t imaxdiv (intmax_t, intmax_t);
# endif
#elif defined GNULIB_POSIXCHECK
diff --git a/gnulib-tests/link.c b/gnulib-tests/link.c
index 8212723..c1cca7a 100644
--- a/gnulib-tests/link.c
+++ b/gnulib-tests/link.c
@@ -25,11 +25,15 @@
#include <sys/stat.h>
#if !HAVE_LINK
-# if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
+# if defined _WIN32 && ! defined __CYGWIN__
# define WIN32_LEAN_AND_MEAN
# include <windows.h>
+/* Avoid warnings from gcc -Wcast-function-type. */
+# define GetProcAddress \
+ (void *) GetProcAddress
+
/* CreateHardLink was introduced only in Windows 2000. */
typedef BOOL (WINAPI * CreateHardLinkFuncType) (LPCTSTR lpFileName,
LPCTSTR lpExistingFileName,
diff --git a/gnulib-tests/localename-table.c b/gnulib-tests/localename-table.c
new file mode 100644
index 0000000..40f0709
--- /dev/null
+++ b/gnulib-tests/localename-table.c
@@ -0,0 +1,48 @@
+/* Table that maps a locale object to the names of the locale categories.
+ Copyright (C) 2018 Free Software Foundation, Inc.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <https://www.gnu.org/licenses/>. */
+
+/* Written by Bruno Haible <bruno@clisp.org>, 2018. */
+
+#include <config.h>
+
+#if HAVE_WORKING_USELOCALE && HAVE_NAMELESS_LOCALES
+
+/* Specification. */
+#include "localename-table.h"
+
+#include <stdint.h>
+
+/* A hash function for pointers. */
+size_t _GL_ATTRIBUTE_CONST
+locale_hash_function (locale_t x)
+{
+ uintptr_t p = (uintptr_t) x;
+ size_t h = ((p % 4177) << 12) + ((p % 79) << 6) + (p % 61);
+ return h;
+}
+
+struct locale_hash_node * locale_hash_table[LOCALE_HASH_TABLE_SIZE]
+ /* = { NULL, ..., NULL } */;
+
+gl_rwlock_define_initialized(, locale_lock)
+
+#else
+
+/* This declaration is solely to ensure that after preprocessing
+ this file is never empty. */
+typedef int dummy;
+
+#endif
diff --git a/gnulib-tests/localename-table.h b/gnulib-tests/localename-table.h
new file mode 100644
index 0000000..e1a7181
--- /dev/null
+++ b/gnulib-tests/localename-table.h
@@ -0,0 +1,73 @@
+/* Table that maps a locale object to the names of the locale categories.
+ Copyright (C) 2018 Free Software Foundation, Inc.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <https://www.gnu.org/licenses/>. */
+
+/* Written by Bruno Haible <bruno@clisp.org>, 2018. */
+
+#if HAVE_WORKING_USELOCALE && HAVE_NAMELESS_LOCALES
+
+# include <stddef.h>
+# include <locale.h>
+
+# ifdef IN_LIBINTL
+# include "lock.h"
+# else
+# include "glthread/lock.h"
+# endif
+
+struct locale_categories_names
+ {
+ /* Locale category -> name (allocated with indefinite extent). */
+ const char *category_name[6];
+ };
+
+/* A hash table of fixed size. Multiple threads can access it read-only
+ simultaneously, but only one thread can insert into it or remove from it
+ at the same time.
+ This hash table has global scope, so that when an application uses both
+ GNU libintl and gnulib, the application sees only one hash table. (When
+ linking statically with libintl, the fact that localename-table.c is a
+ separate compilation unit resolves the duplicate symbol conflict. When
+ linking with libintl as a shared library, we rely on ELF and the symbol
+ conflict resolution implemented in the ELF dynamic loader here.)
+ Both the libintl overrides and the gnulib overrides of the functions
+ newlocale, duplocale, freelocale see the same hash table (and the same lock).
+ For this reason, the internal layout of the hash table and the hash function
+ MUST NEVER CHANGE. If you need to change the internal layout or the hash
+ function, introduce versioning by appending a version suffix to the symbols
+ at the linker level. */
+# define locale_hash_function libintl_locale_hash_function
+# define locale_hash_table libintl_locale_hash_table
+# define locale_lock libintl_locale_lock
+
+extern size_t _GL_ATTRIBUTE_CONST locale_hash_function (locale_t x);
+
+/* A node in a hash bucket collision list. */
+struct locale_hash_node
+ {
+ struct locale_hash_node *next;
+ locale_t locale;
+ struct locale_categories_names names;
+ };
+
+# define LOCALE_HASH_TABLE_SIZE 101
+extern struct locale_hash_node * locale_hash_table[LOCALE_HASH_TABLE_SIZE];
+
+/* This lock protects the locale_hash_table against multiple simultaneous
+ accesses (except that multiple simultaneous read accesses are allowed). */
+
+gl_rwlock_define(extern, locale_lock)
+
+#endif
diff --git a/gnulib-tests/localename.c b/gnulib-tests/localename.c
index 37a2b65..96f4a20 100644
--- a/gnulib-tests/localename.c
+++ b/gnulib-tests/localename.c
@@ -35,7 +35,13 @@
#include "flexmember.h"
-#if HAVE_USELOCALE
+/* We cannot support uselocale() on platforms where the locale_t type is fake.
+ See intl-thread-locale.m4 for details. */
+#if HAVE_WORKING_USELOCALE && !HAVE_FAKE_LOCALES
+# define HAVE_GOOD_USELOCALE 1
+#endif
+
+#if HAVE_GOOD_USELOCALE
/* Mac OS X 10.5 defines the locale_t type in <xlocale.h>. */
# if defined __APPLE__ && defined __MACH__
# include <xlocale.h>
@@ -46,9 +52,17 @@
# if !defined IN_LIBINTL
# include "glthread/lock.h"
# endif
-# if defined __sun && HAVE_GETLOCALENAME_L
+# if defined __sun
+# if HAVE_GETLOCALENAME_L
/* Solaris >= 12. */
extern char * getlocalename_l(int, locale_t);
+# elif HAVE_SOLARIS114_LOCALES
+# include <sys/localedef.h>
+# endif
+# endif
+# if HAVE_NAMELESS_LOCALES
+# include <errno.h>
+# include "localename-table.h"
# endif
#endif
@@ -61,7 +75,7 @@ extern char * getlocalename_l(int, locale_t);
# endif
#endif
-#if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
+#if defined _WIN32 && !defined __CYGWIN__
# define WINDOWS_NATIVE
# if !defined IN_LIBINTL
# include "glthread/lock.h"
@@ -1143,7 +1157,7 @@ extern char * getlocalename_l(int, locale_t);
#if HAVE_CFLOCALECOPYCURRENT || HAVE_CFPREFERENCESCOPYAPPVALUE
-/* Mac OS X 10.2 or newer */
+/* Mac OS X 10.4 or newer */
/* Canonicalize a Mac OS X locale name to a Unix locale name.
NAME is a sufficiently large buffer.
@@ -1308,22 +1322,44 @@ gl_locale_name_canonicalize (char *name)
/* 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 "bs-Cyrl", "bs-Latn".
+ The default script for bs on Unix is Latin. */
+ { "bs-Latn", "bs" },
/* 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 "kk-Cyrl".
+ The default script for kk on Unix is Cyrillic. */
+ { "kk-Cyrl", "kk" },
/* 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 "pa-Arab", "pa-Guru".
+ Country codes are used to distinguish these on Unix. */
+ { "pa-Arab", "pa_PK" },
+ { "pa-Guru", "pa_IN" },
+ /* Mac OS X has "shi-Latn", "shi-Tfng". Does not yet exist on Unix. */
+ /* Mac OS X has "sr-Cyrl", "sr-Latn".
+ The default script for sr on Unix is Cyrillic. */
+ { "sr-Cyrl", "sr" },
/* 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 "tk-Cyrl".
+ The default script for tk on Unix is Cyrillic. */
+ { "tk-Cyrl", "tk" },
/* Mac OS X has "tt-Cyrl".
The default script for tt on Unix is Cyrillic. */
{ "tt-Cyrl", "tt" },
+ /* Mac OS X has "uz-Arab", "uz-Cyrl", "uz-Latn".
+ The default script for uz on Unix is Latin. */
+ { "uz-Latn", "uz" },
+ /* Mac OS X has "vai-Latn", "vai-Vaii". Does not yet exist on Unix. */
+ /* Mac OS X has "yue-Hans", "yue-Hant".
+ The default script for yue on Unix is Simplified Han. */
+ { "yue-Hans", "yue" },
/* Mac OS X has "zh-Hans", "zh-Hant".
Country codes are used to distinguish these on Unix. */
{ "zh-Hans", "zh_CN" },
@@ -1331,12 +1367,13 @@ gl_locale_name_canonicalize (char *name)
};
/* Convert script names (ISO 15924) to Unix conventions.
- See http://www.unicode.org/iso15924/iso15924-codes.html */
+ See https://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" },
+ { "Latn", "latin" },
{ "Mong", "mongolian" }
};
@@ -1492,7 +1529,7 @@ gl_locale_name_from_win32_LANGID (LANGID langid)
sub = SUBLANGID (langid);
/* Dispatch on language.
- See also http://www.unicode.org/unicode/onlinedat/languages.html .
+ See also https://www.unicode.org/unicode/onlinedat/languages.html .
For details about languages, see https://www.ethnologue.com/ . */
switch (primary)
{
@@ -2592,7 +2629,8 @@ get_lcid (const char *locale_name)
#endif
-#if HAVE_USELOCALE /* glibc, Mac OS X, Solaris 11 OpenIndiana, or Solaris 12 */
+#if HAVE_GOOD_USELOCALE /* glibc, Mac OS X, FreeBSD >= 9.1, Cygwin >= 2.6,
+ Solaris 11 OpenIndiana, or Solaris >= 11.4 */
/* Simple hash set of strings. We don't want to drag in lots of hash table
code here. */
@@ -2618,14 +2656,14 @@ string_hash (const void *x)
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 struniq_hash_node
{
- struct hash_node * volatile next;
+ struct struniq_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]
+# define STRUNIQ_HASH_TABLE_SIZE 257
+static struct struniq_hash_node * volatile struniq_hash_table[STRUNIQ_HASH_TABLE_SIZE]
/* = { NULL, ..., NULL } */;
/* This lock protects the struniq_hash_table against multiple simultaneous
@@ -2638,17 +2676,17 @@ static const char *
struniq (const char *string)
{
size_t hashcode = string_hash (string);
- size_t slot = hashcode % HASH_TABLE_SIZE;
+ size_t slot = hashcode % STRUNIQ_HASH_TABLE_SIZE;
size_t size;
- struct hash_node *new_node;
- struct hash_node *p;
+ struct struniq_hash_node *new_node;
+ struct struniq_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));
+ (struct struniq_hash_node *)
+ malloc (FLEXSIZEOF (struct struniq_hash_node, contents, size));
if (new_node == NULL)
/* Out of memory. Return a statically allocated string. */
return "C";
@@ -2677,7 +2715,387 @@ struniq (const char *string)
#endif
-#if defined IN_LIBINTL || HAVE_USELOCALE
+#if HAVE_GOOD_USELOCALE && HAVE_NAMELESS_LOCALES
+
+/* The 'locale_t' object does not contain the names of the locale categories.
+ We have to associate them with the object through a hash table.
+ The hash table is defined in localename-table.[hc]. */
+
+/* Returns the name of a given locale category in a given locale_t object,
+ allocated as a string with indefinite extent. */
+static const char *
+get_locale_t_name (int category, locale_t locale)
+{
+ if (locale == LC_GLOBAL_LOCALE)
+ {
+ /* Query the global locale. */
+ const char *name = setlocale (category, NULL);
+ if (name != NULL)
+ return struniq (name);
+ else
+ /* Should normally not happen. */
+ return "";
+ }
+ else
+ {
+ /* Look up the names in the hash table. */
+ size_t hashcode = locale_hash_function (locale);
+ size_t slot = hashcode % LOCALE_HASH_TABLE_SIZE;
+ /* If the locale was not found in the table, return "". This can
+ happen if the application uses the original newlocale()/duplocale()
+ functions instead of the overridden ones. */
+ const char *name = "";
+ struct locale_hash_node *p;
+ /* Lock while looking up the hash node. */
+ gl_rwlock_rdlock (locale_lock);
+ for (p = locale_hash_table[slot]; p != NULL; p = p->next)
+ if (p->locale == locale)
+ {
+ name = p->names.category_name[category];
+ break;
+ }
+ gl_rwlock_unlock (locale_lock);
+ return name;
+ }
+}
+
+# if !(defined newlocale && defined duplocale && defined freelocale)
+# error "newlocale, duplocale, freelocale not being replaced as expected!"
+# endif
+
+/* newlocale() override. */
+locale_t
+newlocale (int category_mask, const char *name, locale_t base)
+#undef newlocale
+{
+ struct locale_categories_names names;
+ struct locale_hash_node *node;
+ locale_t result;
+
+ /* Make sure name has indefinite extent. */
+ if (((LC_CTYPE_MASK | LC_NUMERIC_MASK | LC_TIME_MASK | LC_COLLATE_MASK
+ | LC_MONETARY_MASK | LC_MESSAGES_MASK)
+ & category_mask) != 0)
+ name = struniq (name);
+
+ /* Determine the category names of the result. */
+ if (((LC_CTYPE_MASK | LC_NUMERIC_MASK | LC_TIME_MASK | LC_COLLATE_MASK
+ | LC_MONETARY_MASK | LC_MESSAGES_MASK)
+ & ~category_mask) == 0)
+ {
+ /* Use name, ignore base. */
+ int category;
+
+ name = struniq (name);
+ for (category = 0; category < 6; category++)
+ names.category_name[category] = name;
+ }
+ else
+ {
+ /* Use base, possibly also name. */
+ if (base == NULL)
+ {
+ int category;
+
+ for (category = 0; category < 6; category++)
+ {
+ 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:
+ abort ();
+ }
+ names.category_name[category] =
+ ((mask & category_mask) != 0 ? name : "C");
+ }
+ }
+ else if (base == LC_GLOBAL_LOCALE)
+ {
+ int category;
+
+ for (category = 0; category < 6; category++)
+ {
+ 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:
+ abort ();
+ }
+ names.category_name[category] =
+ ((mask & category_mask) != 0
+ ? name
+ : get_locale_t_name (category, LC_GLOBAL_LOCALE));
+ }
+ }
+ else
+ {
+ /* Look up the names of base in the hash table. Like multiple calls
+ of get_locale_t_name, but locking only once. */
+ struct locale_hash_node *p;
+ int category;
+
+ /* Lock while looking up the hash node. */
+ gl_rwlock_rdlock (locale_lock);
+ for (p = locale_hash_table[locale_hash_function (base) % LOCALE_HASH_TABLE_SIZE];
+ p != NULL;
+ p = p->next)
+ if (p->locale == base)
+ break;
+
+ for (category = 0; category < 6; category++)
+ {
+ 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:
+ abort ();
+ }
+ names.category_name[category] =
+ ((mask & category_mask) != 0
+ ? name
+ : (p != NULL ? p->names.category_name[category] : ""));
+ }
+
+ gl_rwlock_unlock (locale_lock);
+ }
+ }
+
+ node = (struct locale_hash_node *) malloc (sizeof (struct locale_hash_node));
+ if (node == NULL)
+ /* errno is set to ENOMEM. */
+ return NULL;
+
+ result = newlocale (category_mask, name, base);
+ if (result == NULL)
+ {
+ int saved_errno = errno;
+ free (node);
+ errno = saved_errno;
+ return NULL;
+ }
+
+ /* Fill the hash node. */
+ node->locale = result;
+ node->names = names;
+
+ /* Insert it in the hash table. */
+ {
+ size_t hashcode = locale_hash_function (result);
+ size_t slot = hashcode % LOCALE_HASH_TABLE_SIZE;
+ struct locale_hash_node *p;
+
+ /* Lock while inserting the new node. */
+ gl_rwlock_wrlock (locale_lock);
+ for (p = locale_hash_table[slot]; p != NULL; p = p->next)
+ if (p->locale == result)
+ {
+ /* This can happen if the application uses the original freelocale()
+ function instead of the overridden one. */
+ p->names = node->names;
+ break;
+ }
+ if (p == NULL)
+ {
+ node->next = locale_hash_table[slot];
+ locale_hash_table[slot] = node;
+ }
+
+ gl_rwlock_unlock (locale_lock);
+
+ if (p != NULL)
+ free (node);
+ }
+
+ return result;
+}
+
+/* duplocale() override. */
+locale_t
+duplocale (locale_t locale)
+#undef duplocale
+{
+ struct locale_hash_node *node;
+ locale_t result;
+
+ if (locale == NULL)
+ /* Invalid argument. */
+ abort ();
+
+ node = (struct locale_hash_node *) malloc (sizeof (struct locale_hash_node));
+ if (node == NULL)
+ /* errno is set to ENOMEM. */
+ return NULL;
+
+ result = duplocale (locale);
+ if (result == NULL)
+ {
+ int saved_errno = errno;
+ free (node);
+ errno = saved_errno;
+ return NULL;
+ }
+
+ /* Fill the hash node. */
+ node->locale = result;
+ if (locale == LC_GLOBAL_LOCALE)
+ {
+ int category;
+
+ for (category = 0; category < 6; category++)
+ node->names.category_name[category] =
+ get_locale_t_name (category, LC_GLOBAL_LOCALE);
+
+ /* Lock before inserting the new node. */
+ gl_rwlock_wrlock (locale_lock);
+ }
+ else
+ {
+ struct locale_hash_node *p;
+
+ /* Lock once, for the lookup and the insertion. */
+ gl_rwlock_wrlock (locale_lock);
+
+ for (p = locale_hash_table[locale_hash_function (locale) % LOCALE_HASH_TABLE_SIZE];
+ p != NULL;
+ p = p->next)
+ if (p->locale == locale)
+ break;
+ if (p != NULL)
+ node->names = p->names;
+ else
+ {
+ /* This can happen if the application uses the original
+ newlocale()/duplocale() functions instead of the overridden
+ ones. */
+ int category;
+
+ for (category = 0; category < 6; category++)
+ node->names.category_name[category] = "";
+ }
+ }
+
+ /* Insert it in the hash table. */
+ {
+ size_t hashcode = locale_hash_function (result);
+ size_t slot = hashcode % LOCALE_HASH_TABLE_SIZE;
+ struct locale_hash_node *p;
+
+ for (p = locale_hash_table[slot]; p != NULL; p = p->next)
+ if (p->locale == result)
+ {
+ /* This can happen if the application uses the original freelocale()
+ function instead of the overridden one. */
+ p->names = node->names;
+ break;
+ }
+ if (p == NULL)
+ {
+ node->next = locale_hash_table[slot];
+ locale_hash_table[slot] = node;
+ }
+
+ gl_rwlock_unlock (locale_lock);
+
+ if (p != NULL)
+ free (node);
+ }
+
+ return result;
+}
+
+/* freelocale() override. */
+void
+freelocale (locale_t locale)
+#undef freelocale
+{
+ if (locale == NULL || locale == LC_GLOBAL_LOCALE)
+ /* Invalid argument. */
+ abort ();
+
+ {
+ size_t hashcode = locale_hash_function (locale);
+ size_t slot = hashcode % LOCALE_HASH_TABLE_SIZE;
+ struct locale_hash_node *found;
+ struct locale_hash_node **p;
+
+ found = NULL;
+ /* Lock while removing the hash node. */
+ gl_rwlock_wrlock (locale_lock);
+ for (p = &locale_hash_table[slot]; *p != NULL; p = &(*p)->next)
+ if ((*p)->locale == locale)
+ {
+ found = *p;
+ *p = (*p)->next;
+ break;
+ }
+ gl_rwlock_unlock (locale_lock);
+ free (found);
+ }
+
+ freelocale (locale);
+}
+
+#endif
+
+
+#if defined IN_LIBINTL || HAVE_GOOD_USELOCALE
/* Like gl_locale_name_thread, except that the result is not in storage of
indefinite extent. */
@@ -2687,7 +3105,7 @@ static
const char *
gl_locale_name_thread_unsafe (int category, const char *categoryname)
{
-# if HAVE_USELOCALE
+# if HAVE_GOOD_USELOCALE
{
locale_t thread_locale = uselocale (NULL);
if (thread_locale != LC_GLOBAL_LOCALE)
@@ -2738,6 +3156,24 @@ gl_locale_name_thread_unsafe (int category, const char *categoryname)
# if HAVE_GETLOCALENAME_L
/* Solaris >= 12. */
return getlocalename_l (category, thread_locale);
+# elif HAVE_SOLARIS114_LOCALES
+ /* Solaris >= 11.4. */
+ void *lcp = (*thread_locale)->core.data->lcp;
+ if (lcp != NULL)
+ switch (category)
+ {
+ case LC_CTYPE:
+ case LC_NUMERIC:
+ case LC_TIME:
+ case LC_COLLATE:
+ case LC_MONETARY:
+ case LC_MESSAGES:
+ return ((const char * const *) lcp)[category];
+ default: /* We shouldn't get here. */
+ return "";
+ }
+# elif HAVE_NAMELESS_LOCALES
+ return get_locale_t_name (category, thread_locale);
# else
/* Solaris 11 OpenIndiana.
For the internal structure of locale objects, see
@@ -2782,22 +3218,42 @@ gl_locale_name_thread_unsafe (int category, const char *categoryname)
const char *
gl_locale_name_thread (int category, const char *categoryname)
{
-#if HAVE_USELOCALE
+#if HAVE_GOOD_USELOCALE
const char *name = gl_locale_name_thread_unsafe (category, categoryname);
if (name != NULL)
return struniq (name);
-#elif defined WINDOWS_NATIVE
+#endif
+ /* On WINDOWS_NATIVE, don't use GetThreadLocale() here, because when
+ SetThreadLocale has not been called - which is a very frequent case -
+ the value of GetThreadLocale() ignores past calls to 'setlocale'. */
+ 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)
+{
+#if defined WINDOWS_NATIVE
if (LC_MIN <= category && category <= LC_MAX)
{
- char *locname = setlocale (category, NULL);
- LCID lcid = 0;
+ const char *locname = setlocale (category, NULL);
+ LCID lcid;
/* 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);
+ if (category == LC_ALL && 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,
@@ -2808,46 +3264,48 @@ gl_locale_name_thread (int category, const char *categoryname)
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 *locname;
-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. */
+ /* 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);
+ locname = 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);
+ /* 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, ""). */
+ locname = gl_locale_name_environ (category, categoryname);
+#endif
+ /* Convert the locale name from the format returned by setlocale() or found
+ in the environment variables to the XPG syntax. */
+#if defined WINDOWS_NATIVE
+ {
+ /* 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 lcid = get_lcid (locname);
+
+ if (lcid > 0)
+ return gl_locale_name_from_win32_LCID (lcid);
+ }
#endif
+ return locname;
+ }
}
const char *
@@ -2928,7 +3386,7 @@ gl_locale_name_default (void)
codeset. */
# if HAVE_CFLOCALECOPYCURRENT || HAVE_CFPREFERENCESCOPYAPPVALUE
- /* Mac OS X 10.2 or newer */
+ /* Mac OS X 10.4 or newer */
{
/* Cache the locale name, since CoreFoundation calls are expensive. */
static const char *cached_localename;
@@ -2936,29 +3394,28 @@ gl_locale_name_default (void)
if (cached_localename == NULL)
{
char namebuf[256];
-# if HAVE_CFLOCALECOPYCURRENT /* Mac OS X 10.3 or newer */
+# if HAVE_CFLOCALECOPYCURRENT /* Mac OS X 10.5 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 */
+# elif HAVE_CFPREFERENCESCOPYAPPVALUE /* Mac OS X 10.4 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);
+ if (value != NULL && CFGetTypeID (value) == CFStringGetTypeID ())
+ {
+ CFStringRef name = (CFStringRef)value;
+# endif
+
+ if (CFStringGetCString (name, namebuf, sizeof (namebuf),
+ kCFStringEncodingASCII))
+ {
+ gl_locale_name_canonicalize (namebuf);
+ cached_localename = strdup (namebuf);
+ }
+
+# if HAVE_CFLOCALECOPYCURRENT /* Mac OS X 10.5 or newer */
+ CFRelease (locale);
+# elif HAVE_CFPREFERENCESCOPYAPPVALUE /* Mac OS X 10.4 or newer */
}
# endif
if (cached_localename == NULL)
diff --git a/gnulib-tests/localename.h b/gnulib-tests/localename.h
index 1b9e2bb..ab17e81 100644
--- a/gnulib-tests/localename.h
+++ b/gnulib-tests/localename.h
@@ -87,7 +87,7 @@ extern const char * gl_locale_name_environ (int category, const char *categoryna
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__)
+ || defined _WIN32 || defined __CYGWIN__)
_GL_ATTRIBUTE_CONST
#endif
;
diff --git a/gnulib-tests/lseek.c b/gnulib-tests/lseek.c
index e37aadf..9125b98 100644
--- a/gnulib-tests/lseek.c
+++ b/gnulib-tests/lseek.c
@@ -19,7 +19,7 @@
/* Specification. */
#include <unistd.h>
-#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
+#if defined _WIN32 && ! defined __CYGWIN__
/* Windows platforms. */
/* Get GetFileType. */
# include <windows.h>
@@ -39,7 +39,7 @@
off_t
rpl_lseek (int fd, off_t offset, int whence)
{
-#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
+#if defined _WIN32 && ! defined __CYGWIN__
/* mingw lseek mistakenly succeeds on pipes, sockets, and terminals. */
HANDLE h = (HANDLE) _get_osfhandle (fd);
if (h == INVALID_HANDLE_VALUE)
diff --git a/gnulib-tests/nanosleep.c b/gnulib-tests/nanosleep.c
index 8c3be40..2cc3909 100644
--- a/gnulib-tests/nanosleep.c
+++ b/gnulib-tests/nanosleep.c
@@ -86,7 +86,7 @@ nanosleep (const struct timespec *requested_delay,
}
}
-#elif (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
+#elif defined _WIN32 && ! defined __CYGWIN__
/* Native Windows platforms. */
# define WIN32_LEAN_AND_MEAN
diff --git a/gnulib-tests/nap.h b/gnulib-tests/nap.h
index 97a3cca..c4f45d8 100644
--- a/gnulib-tests/nap.h
+++ b/gnulib-tests/nap.h
@@ -64,8 +64,8 @@ nap_get_stat (struct stat *st, int do_write)
if (do_write)
{
ASSERT (write (nap_fd, "\n", 1) == 1);
-#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
- /* On native Windows, the modification times are not changed until NAP_FD
+#if defined _WIN32 || defined __CYGWIN__
+ /* On Windows, the modification times are not changed until NAP_FD
is closed. See
https://msdn.microsoft.com/en-us/library/windows/desktop/aa365747(v=vs.85).aspx */
close (nap_fd);
diff --git a/gnulib-tests/open.c b/gnulib-tests/open.c
index b344f13..792e258 100644
--- a/gnulib-tests/open.c
+++ b/gnulib-tests/open.c
@@ -86,7 +86,7 @@ open (const char *filename, int flags, ...)
flags &= ~O_NONBLOCK;
#endif
-#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
+#if defined _WIN32 && ! defined __CYGWIN__
if (strcmp (filename, "/dev/null") == 0)
filename = "NUL";
#endif
diff --git a/gnulib-tests/pipe.c b/gnulib-tests/pipe.c
index f87e11d..9f0edae 100644
--- a/gnulib-tests/pipe.c
+++ b/gnulib-tests/pipe.c
@@ -19,7 +19,7 @@
/* Specification. */
#include <unistd.h>
-#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
+#if defined _WIN32 && ! defined __CYGWIN__
/* Native Windows API. */
/* Get _pipe(). */
diff --git a/gnulib-tests/putenv.c b/gnulib-tests/putenv.c
index 556d5f8..801e372 100644
--- a/gnulib-tests/putenv.c
+++ b/gnulib-tests/putenv.c
@@ -34,7 +34,7 @@
#include <string.h>
#include <unistd.h>
-#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
+#if defined _WIN32 && ! defined __CYGWIN__
# define WIN32_LEAN_AND_MEAN
# include <windows.h>
#endif
@@ -153,7 +153,7 @@ putenv (char *string)
*ep = string;
break;
}
-# if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
+# if defined _WIN32 && ! defined __CYGWIN__
if (putenv_result == 0)
{
/* _putenv propagated "NAME= " into the subprocess environment;
diff --git a/gnulib-tests/raise.c b/gnulib-tests/raise.c
index 3a29339..8a93bea 100644
--- a/gnulib-tests/raise.c
+++ b/gnulib-tests/raise.c
@@ -31,27 +31,9 @@
# include "msvc-inval.h"
# endif
-# undef raise
-
# if HAVE_MSVC_INVALID_PARAMETER_HANDLER
-static int
-raise_nothrow (int sig)
-{
- int result;
-
- TRY_MSVC_INVAL
- {
- result = raise (sig);
- }
- CATCH_MSVC_INVAL
- {
- result = -1;
- errno = EINVAL;
- }
- DONE_MSVC_INVAL;
-
- return result;
-}
+/* Forward declaration. */
+static int raise_nothrow (int sig);
# else
# define raise_nothrow raise
# endif
@@ -61,12 +43,11 @@ raise_nothrow (int sig)
# include <unistd.h>
-# define rpl_raise raise
-
#endif
int
-rpl_raise (int sig)
+raise (int sig)
+#undef raise
{
#if GNULIB_defined_signal_blocking && GNULIB_defined_SIGPIPE
if (sig == SIGPIPE)
@@ -79,3 +60,24 @@ rpl_raise (int sig)
return kill (getpid (), sig);
#endif
}
+
+#if HAVE_RAISE && HAVE_MSVC_INVALID_PARAMETER_HANDLER
+static int
+raise_nothrow (int sig)
+{
+ int result;
+
+ TRY_MSVC_INVAL
+ {
+ result = raise (sig);
+ }
+ CATCH_MSVC_INVAL
+ {
+ result = -1;
+ errno = EINVAL;
+ }
+ DONE_MSVC_INVAL;
+
+ return result;
+}
+#endif
diff --git a/gnulib-tests/select.c b/gnulib-tests/select.c
index 92ca725..670a3e1 100644
--- a/gnulib-tests/select.c
+++ b/gnulib-tests/select.c
@@ -22,7 +22,7 @@
#include <alloca.h>
#include <assert.h>
-#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
+#if defined _WIN32 && ! defined __CYGWIN__
/* Native Windows. */
#include <sys/types.h>
@@ -47,6 +47,10 @@
#undef select
+/* Avoid warnings from gcc -Wcast-function-type. */
+#define GetProcAddress \
+ (void *) GetProcAddress
+
struct bitset {
unsigned char in[FD_SETSIZE / CHAR_BIT];
unsigned char out[FD_SETSIZE / CHAR_BIT];
diff --git a/gnulib-tests/setlocale.c b/gnulib-tests/setlocale.c
index 5ac7f72..63f870f 100644
--- a/gnulib-tests/setlocale.c
+++ b/gnulib-tests/setlocale.c
@@ -29,11 +29,24 @@
/* Specification. */
#include <locale.h>
+#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "localename.h"
+#if HAVE_CFLOCALECOPYPREFERREDLANGUAGES || HAVE_CFPREFERENCESCOPYAPPVALUE
+# if HAVE_CFLOCALECOPYPREFERREDLANGUAGES
+# include <CoreFoundation/CFLocale.h>
+# elif HAVE_CFPREFERENCESCOPYAPPVALUE
+# include <CoreFoundation/CFPreferences.h>
+# endif
+# include <CoreFoundation/CFPropertyList.h>
+# include <CoreFoundation/CFArray.h>
+# include <CoreFoundation/CFString.h>
+extern void gl_locale_name_canonicalize (char *name);
+#endif
+
#if 1
# undef setlocale
@@ -72,7 +85,7 @@ category_to_name (int category)
return retval;
}
-# if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
+# if 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
@@ -635,10 +648,8 @@ setlocale_unixlike (int category, const char *locale)
/* The native Windows implementation of setlocale understands the special
locale name "C", but not "POSIX". Therefore map "POSIX" to "C". */
-#if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
if (locale != NULL && strcmp (locale, "POSIX") == 0)
locale = "C";
-#endif
/* First, try setlocale with the original argument unchanged. */
result = setlocale (category, locale);
@@ -824,6 +835,7 @@ rpl_setlocale (int category, const char *locale)
/* Set LC_CTYPE first. Then the other categories. */
static int const categories[] =
{
+ LC_CTYPE,
LC_NUMERIC,
LC_TIME,
LC_COLLATE,
@@ -850,9 +862,22 @@ rpl_setlocale (int category, const char *locale)
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__
+ if (setlocale_unixlike (LC_ALL, base_name) != NULL)
+ {
+ /* LC_CTYPE category already set. */
+ i = 1;
+ }
+ else
+ {
+ /* On Mac OS X, "UTF-8" is a valid locale name for LC_CTYPE but
+ not for LC_ALL. Therefore this call may fail. So, try
+ another base_name. */
+ base_name = "C";
+ if (setlocale_unixlike (LC_ALL, base_name) == NULL)
+ goto fail;
+ i = 0;
+ }
+# if 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. */
@@ -861,7 +886,7 @@ rpl_setlocale (int category, const char *locale)
goto fail;
# endif
- for (i = 0; i < sizeof (categories) / sizeof (categories[0]); i++)
+ for (; i < sizeof (categories) / sizeof (categories[0]); i++)
{
int cat = categories[i];
const char *name;
@@ -878,7 +903,85 @@ rpl_setlocale (int category, const char *locale)
# endif
)
if (setlocale_single (cat, name) == NULL)
+# if defined __APPLE__ && defined __MACH__
+ {
+ /* On Mac OS X 10.13, some locales can be set through
+ System Preferences > Language & Region, that are not
+ supported by libc. The system's setlocale() falls
+ back to "C" for these locale categories. We can possibly
+ do better. If we can't, print a warning, to limit user
+ expectations. */
+ int warn = 1;
+
+ if (cat == LC_CTYPE)
+ warn = (setlocale_single (cat, "UTF-8") == NULL);
+# if HAVE_CFLOCALECOPYPREFERREDLANGUAGES || HAVE_CFPREFERENCESCOPYAPPVALUE /* MacOS X 10.4 or newer */
+ else if (cat == LC_MESSAGES)
+ {
+ /* Take the primary language preference. */
+# if HAVE_CFLOCALECOPYPREFERREDLANGUAGES /* MacOS X 10.5 or newer */
+ CFArrayRef prefArray = CFLocaleCopyPreferredLanguages ();
+# elif HAVE_CFPREFERENCESCOPYAPPVALUE /* MacOS X 10.4 or newer */
+ CFTypeRef preferences =
+ CFPreferencesCopyAppValue (CFSTR ("AppleLanguages"),
+ kCFPreferencesCurrentApplication);
+ if (preferences != NULL
+ && CFGetTypeID (preferences) == CFArrayGetTypeID ())
+ {
+ CFArrayRef prefArray = (CFArrayRef)preferences;
+# endif
+ int n = CFArrayGetCount (prefArray);
+ if (n > 0)
+ {
+ char buf[256];
+ CFTypeRef element = CFArrayGetValueAtIndex (prefArray, 0);
+ if (element != NULL
+ && CFGetTypeID (element) == CFStringGetTypeID ()
+ && CFStringGetCString ((CFStringRef)element,
+ buf, sizeof (buf),
+ kCFStringEncodingASCII))
+ {
+ /* Remove the country.
+ E.g. "zh-Hans-DE" -> "zh-Hans". */
+ char *last_minus = strrchr (buf, '-');
+ if (last_minus != NULL)
+ *last_minus = '\0';
+
+ /* Convert to Unix locale name.
+ E.g. "zh-Hans" -> "zh_CN". */
+ gl_locale_name_canonicalize (buf);
+
+ /* Try setlocale with this value. */
+ warn = (setlocale_single (cat, buf) == NULL);
+ }
+ }
+# if HAVE_CFLOCALECOPYPREFERREDLANGUAGES /* MacOS X 10.5 or newer */
+ CFRelease (prefArray);
+# elif HAVE_CFPREFERENCESCOPYAPPVALUE /* MacOS X 10.4 or newer */
+ }
+# endif
+ }
+# endif
+ /* No fallback possible for LC_NUMERIC. The application
+ should use the locale properties
+ kCFLocaleDecimalSeparator, kCFLocaleGroupingSeparator.
+ No fallback possible for LC_TIME. The application should
+ use the locale property kCFLocaleCalendarIdentifier.
+ No fallback possible for LC_COLLATE. The application
+ should use the locale properties
+ kCFLocaleCollationIdentifier, kCFLocaleCollatorIdentifier.
+ No fallback possible for LC_MONETARY. The application
+ should use the locale properties
+ kCFLocaleCurrencySymbol, kCFLocaleCurrencyCode. */
+
+ if (warn)
+ fprintf (stderr,
+ "Warning: Failed to set locale category %s to %s.\n",
+ category_to_name (cat), name);
+ }
+# else
goto fail;
+# endif
}
/* All steps were successful. */
@@ -903,7 +1006,7 @@ rpl_setlocale (int category, const char *locale)
}
else
{
-# if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
+# if defined _WIN32 && ! defined __CYGWIN__
if (category == LC_ALL && locale != NULL && strchr (locale, '.') != NULL)
{
char *saved_locale;
diff --git a/gnulib-tests/sig-handler.h b/gnulib-tests/sig-handler.h
index ce28a2a..9ea3394 100644
--- a/gnulib-tests/sig-handler.h
+++ b/gnulib-tests/sig-handler.h
@@ -37,15 +37,12 @@ typedef void (*sa_handler_t) (int);
SIG_HANDLER_INLINE sa_handler_t _GL_ATTRIBUTE_PURE
get_handler (struct sigaction const *a)
{
-#ifdef SA_SIGINFO
/* POSIX says that special values like SIG_IGN can only occur when
action.sa_flags does not contain SA_SIGINFO. But in Linux 2.4,
for example, sa_sigaction and sa_handler are aliases and a signal
- is ignored if sa_sigaction (after casting) equals SIG_IGN. So
- use (and cast) sa_sigaction in that case. */
- if (a->sa_flags & SA_SIGINFO)
- return (sa_handler_t) a->sa_sigaction;
-#endif
+ is ignored if sa_sigaction (after casting) equals SIG_IGN. In
+ this case, this implementation relies on the fact that the two
+ are aliases, and simply returns sa_handler. */
return a->sa_handler;
}
diff --git a/gnulib-tests/sigaction.c b/gnulib-tests/sigaction.c
index da46b1c..7e4af5f 100644
--- a/gnulib-tests/sigaction.c
+++ b/gnulib-tests/sigaction.c
@@ -67,7 +67,7 @@
/* On native Windows, as of 2008, the signal SIGABRT_COMPAT is an alias
for the signal SIGABRT. Only one signal handler is stored for both
SIGABRT and SIGABRT_COMPAT. SIGABRT_COMPAT is not a signal of its own. */
-#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
+#if defined _WIN32 && ! defined __CYGWIN__
# undef SIGABRT_COMPAT
# define SIGABRT_COMPAT 6
#endif
diff --git a/gnulib-tests/sigprocmask.c b/gnulib-tests/sigprocmask.c
index 0a8cd53..7a49bcd 100644
--- a/gnulib-tests/sigprocmask.c
+++ b/gnulib-tests/sigprocmask.c
@@ -50,7 +50,7 @@
/* On native Windows, as of 2008, the signal SIGABRT_COMPAT is an alias
for the signal SIGABRT. Only one signal handler is stored for both
SIGABRT and SIGABRT_COMPAT. SIGABRT_COMPAT is not a signal of its own. */
-#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
+#if defined _WIN32 && ! defined __CYGWIN__
# undef SIGABRT_COMPAT
# define SIGABRT_COMPAT 6
#endif
diff --git a/gnulib-tests/sleep.c b/gnulib-tests/sleep.c
index 0b58697..8b75390 100644
--- a/gnulib-tests/sleep.c
+++ b/gnulib-tests/sleep.c
@@ -24,7 +24,7 @@
#include "verify.h"
-#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
+#if defined _WIN32 && ! defined __CYGWIN__
# define WIN32_LEAN_AND_MEAN /* avoid including junk */
# include <windows.h>
diff --git a/gnulib-tests/stdio-impl.h b/gnulib-tests/stdio-impl.h
index 05c5752..393ef0c 100644
--- a/gnulib-tests/stdio-impl.h
+++ b/gnulib-tests/stdio-impl.h
@@ -60,25 +60,79 @@
# define _flags pub._flags
# define _r pub._r
# define _w pub._w
+# elif defined __ANDROID__ /* Android */
+ /* Up to this commit from 2015-10-12
+ <https://android.googlesource.com/platform/bionic.git/+/f0141dfab10a4b332769d52fa76631a64741297a>
+ the innards of FILE were public, and fp_ub could be defined like for OpenBSD,
+ see <https://android.googlesource.com/platform/bionic.git/+/e78392637d5086384a5631ddfdfa8d7ec8326ee3/libc/stdio/fileext.h>
+ and <https://android.googlesource.com/platform/bionic.git/+/e78392637d5086384a5631ddfdfa8d7ec8326ee3/libc/stdio/local.h>.
+ After this commit, the innards of FILE are hidden. */
+# define fp_ ((struct { unsigned char *_p; \
+ int _r; \
+ int _w; \
+ int _flags; \
+ int _file; \
+ struct { unsigned char *_base; size_t _size; } _bf; \
+ int _lbfsize; \
+ void *_cookie; \
+ void *_close; \
+ void *_read; \
+ void *_seek; \
+ void *_write; \
+ struct { unsigned char *_base; size_t _size; } _ext; \
+ unsigned char *_up; \
+ int _ur; \
+ unsigned char _ubuf[3]; \
+ unsigned char _nbuf[1]; \
+ struct { unsigned char *_base; size_t _size; } _lb; \
+ int _blksize; \
+ fpos_t _offset; \
+ /* More fields, not relevant here. */ \
+ } *) fp)
# else
# define fp_ fp
# endif
-# if (defined __NetBSD__ && __NetBSD_Version__ >= 105270000) || defined __OpenBSD__ || defined __minix || defined __ANDROID__ /* NetBSD >= 1.5ZA, OpenBSD, Minix 3, Android */
+# if (defined __NetBSD__ && __NetBSD_Version__ >= 105270000) || defined __OpenBSD__ || defined __minix /* NetBSD >= 1.5ZA, OpenBSD, Minix 3 */
/* See <http://cvsweb.netbsd.org/bsdweb.cgi/src/lib/libc/stdio/fileext.h?rev=HEAD&content-type=text/x-cvsweb-markup>
- and <https://cvsweb.openbsd.org/cgi-bin/cvsweb/src/lib/libc/stdio/fileext.h?rev=HEAD&content-type=text/x-cvsweb-markup> */
+ and <https://cvsweb.openbsd.org/cgi-bin/cvsweb/src/lib/libc/stdio/fileext.h?rev=HEAD&content-type=text/x-cvsweb-markup>
+ and <https://github.com/Stichting-MINIX-Research-Foundation/minix/blob/master/lib/libc/stdio/fileext.h> */
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 */
+# elif defined __ANDROID__ /* Android */
+ struct __sfileext
+ {
+ struct { unsigned char *_base; size_t _size; } _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 */
# define fp_ub fp_->_ub
# endif
# define HASUB(fp) (fp_ub._base != NULL)
+# if defined __ANDROID__ /* Android */
+ /* Needed after this commit from 2016-01-25
+ <https://android.googlesource.com/platform/bionic.git/+/e70e0e9267d069bf56a5078c99307e08a7280de7> */
+# ifndef __SEOF
+# define __SLBF 1
+# define __SNBF 2
+# define __SRD 4
+# define __SWR 8
+# define __SRW 0x10
+# define __SEOF 0x20
+# define __SERR 0x40
+# endif
+# ifndef __SOFF
+# define __SOFF 0x1000
+# endif
+# endif
+
#endif
@@ -118,7 +172,7 @@
# define _flag __flag
# endif
-#elif (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ /* newer Windows with MSVC */
+#elif defined _WIN32 && ! defined __CYGWIN__ /* newer Windows with MSVC */
/* <stdio.h> does not define the innards of FILE any more. */
# define WINDOWS_OPAQUE_FILE
diff --git a/gnulib-tests/strerror_r.c b/gnulib-tests/strerror_r.c
index c556c26..2a22cb4 100644
--- a/gnulib-tests/strerror_r.c
+++ b/gnulib-tests/strerror_r.c
@@ -61,7 +61,7 @@ int __xpg_strerror_r (int errnum, char *buf, size_t buflen);
# define USE_SYSTEM_STRERROR 1
-# if defined __NetBSD__ || defined __hpux || ((defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__) || defined __sgi || (defined __sun && !defined _LP64) || defined __CYGWIN__
+# if defined __NetBSD__ || defined __hpux || (defined _WIN32 && !defined __CYGWIN__) || defined __sgi || (defined __sun && !defined _LP64) || defined __CYGWIN__
/* No locking needed. */
@@ -129,22 +129,13 @@ static int
safe_copy (char *buf, size_t buflen, const char *msg)
{
size_t len = strlen (msg);
- int ret;
+ size_t moved = len < buflen ? len : buflen - 1;
- if (len < buflen)
- {
- /* Although POSIX allows memcpy() to corrupt errno, we don't
- know of any implementation where this is a real problem. */
- memcpy (buf, msg, len + 1);
- ret = 0;
- }
- else
- {
- memcpy (buf, msg, buflen - 1);
- buf[buflen - 1] = '\0';
- ret = ERANGE;
- }
- return ret;
+ /* Although POSIX lets memmove corrupt errno, we don't
+ know of any implementation where this is a real problem. */
+ memmove (buf, msg, moved);
+ buf[moved] = '\0';
+ return len < buflen ? 0 : ERANGE;
}
@@ -258,7 +249,7 @@ strerror_r (int errnum, char *buf, size_t buflen)
/* Try to do what strerror (errnum) does, but without clobbering the
buffer used by strerror(). */
-# if defined __NetBSD__ || defined __hpux || ((defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__) || defined __CYGWIN__ /* NetBSD, HP-UX, native Windows, Cygwin */
+# if defined __NetBSD__ || defined __hpux || (defined _WIN32 && !defined __CYGWIN__) || defined __CYGWIN__ /* NetBSD, HP-UX, native Windows, Cygwin */
/* NetBSD: sys_nerr, sys_errlist are declared through _NETBSD_SOURCE
and <errno.h> above.
@@ -335,7 +326,7 @@ strerror_r (int errnum, char *buf, size_t buflen)
#endif
-#if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
+#if defined _WIN32 && !defined __CYGWIN__
/* MSVC 14 defines names for many error codes in the range 100..140,
but _sys_errlist contains strings only for the error codes
< _sys_nerr = 43. */
diff --git a/gnulib-tests/sys_socket.in.h b/gnulib-tests/sys_socket.in.h
index 7a125e1..ef65dc6 100644
--- a/gnulib-tests/sys_socket.in.h
+++ b/gnulib-tests/sys_socket.in.h
@@ -215,6 +215,15 @@ struct msghdr {
#endif
+/* Ensure SO_REUSEPORT is defined. */
+/* For the subtle differences between SO_REUSEPORT and SO_REUSEADDR, see
+ https://stackoverflow.com/questions/14388706/socket-options-so-reuseaddr-and-so-reuseport-how-do-they-differ-do-they-mean-t
+ and https://lwn.net/Articles/542629/
+ */
+#ifndef SO_REUSEPORT
+# define SO_REUSEPORT SO_REUSEADDR
+#endif
+
/* Fix some definitions from <winsock2.h>. */
#if @HAVE_WINSOCK2_H@
diff --git a/gnulib-tests/test-cloexec.c b/gnulib-tests/test-cloexec.c
index 6d91154..8f8fcf6 100644
--- a/gnulib-tests/test-cloexec.c
+++ b/gnulib-tests/test-cloexec.c
@@ -24,7 +24,7 @@
#include <fcntl.h>
#include <unistd.h>
-#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
+#if defined _WIN32 && ! defined __CYGWIN__
/* Get declarations of the native Windows API functions. */
# define WIN32_LEAN_AND_MEAN
# include <windows.h>
@@ -43,7 +43,7 @@
static int
is_inheritable (int fd)
{
-#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
+#if 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. */
@@ -90,7 +90,7 @@ main (void)
/* Normal use of set_cloexec_flag. */
ASSERT (set_cloexec_flag (fd, true) == 0);
-#if !((defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__)
+#if !(defined _WIN32 && ! defined __CYGWIN__)
ASSERT (!is_inheritable (fd));
#endif
ASSERT (set_cloexec_flag (fd, false) == 0);
diff --git a/gnulib-tests/test-dup2.c b/gnulib-tests/test-dup2.c
index 90fbeb9..6654254 100644
--- a/gnulib-tests/test-dup2.c
+++ b/gnulib-tests/test-dup2.c
@@ -36,7 +36,7 @@ SIGNATURE_CHECK (dup2, int, (int, int));
# include "cloexec.h"
#endif
-#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
+#if defined _WIN32 && ! defined __CYGWIN__
/* Get declarations of the native Windows API functions. */
# define WIN32_LEAN_AND_MEAN
# include <windows.h>
@@ -54,7 +54,7 @@ SIGNATURE_CHECK (dup2, int, (int, int));
static int
is_open (int fd)
{
-#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
+#if 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. */
@@ -72,7 +72,7 @@ is_open (int fd)
static int
is_inheritable (int fd)
{
-# if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
+# if 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. */
diff --git a/gnulib-tests/test-fcntl-h.c b/gnulib-tests/test-fcntl-h.c
index 5031866..d861f51 100644
--- a/gnulib-tests/test-fcntl-h.c
+++ b/gnulib-tests/test-fcntl-h.c
@@ -22,8 +22,8 @@
/* 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);
+ | 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 };
diff --git a/gnulib-tests/test-fcntl.c b/gnulib-tests/test-fcntl.c
index 476231b..5d64674 100644
--- a/gnulib-tests/test-fcntl.c
+++ b/gnulib-tests/test-fcntl.c
@@ -30,7 +30,7 @@ SIGNATURE_CHECK (fcntl, int, (int, int, ...));
#include <stdbool.h>
#include <unistd.h>
-#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
+#if defined _WIN32 && ! defined __CYGWIN__
/* Get declarations of the native Windows API functions. */
# define WIN32_LEAN_AND_MEAN
# include <windows.h>
@@ -54,7 +54,7 @@ static int zero (void) { return 0; }
static bool
is_open (int fd)
{
-#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
+#if 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. */
@@ -71,7 +71,7 @@ is_open (int fd)
static bool
is_inheritable (int fd)
{
-#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
+#if 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. */
diff --git a/gnulib-tests/test-intprops.c b/gnulib-tests/test-intprops.c
index 78c6975..286669a 100644
--- a/gnulib-tests/test-intprops.c
+++ b/gnulib-tests/test-intprops.c
@@ -39,13 +39,17 @@
#include "macros.h"
+/* Compile-time verification of expression X.
+ In this file, we need it as a statement, rather than as a declaration. */
+#define verify_stmt(x) do { verify (x); } while (0)
+
/* 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
<https://lists.gnu.org/r/bug-gnulib/2011-05/msg00401.html>. */
#if __GNUC__ || __SUNPRO_C
-# define VERIFY(x) do { verify (x); } while (0)
+# define VERIFY(x) verify_stmt (x)
#else
# define VERIFY(x) ASSERT (x)
#endif
@@ -114,8 +118,10 @@ main (void)
VERIFY (TYPE_MINIMUM (unsigned long int) == 0);
VERIFY (TYPE_MAXIMUM (unsigned long int) == ULONG_MAX);
#ifdef LLONG_MAX
- verify (TYPE_MINIMUM (long long int) == LLONG_MIN);
- verify (TYPE_MAXIMUM (long long int) == LLONG_MAX);
+ verify_stmt (TYPE_MINIMUM (long long int) == LLONG_MIN);
+ verify_stmt (TYPE_MAXIMUM (long long int) == LLONG_MAX);
+ verify_stmt (TYPE_MINIMUM (unsigned long long int) == 0);
+ verify_stmt (TYPE_MAXIMUM (unsigned long long int) == ULLONG_MAX);
#endif
VERIFY (TYPE_MINIMUM (intmax_t) == INTMAX_MIN);
VERIFY (TYPE_MAXIMUM (intmax_t) == INTMAX_MAX);
@@ -124,18 +130,18 @@ main (void)
/* TYPE_WIDTH. */
#ifdef CHAR_WIDTH
- verify (TYPE_WIDTH (char) == CHAR_WIDTH);
- verify (TYPE_WIDTH (signed char) == SCHAR_WIDTH);
- verify (TYPE_WIDTH (unsigned char) == UCHAR_WIDTH);
- verify (TYPE_WIDTH (short int) == SHRT_WIDTH);
- verify (TYPE_WIDTH (unsigned short int) == USHRT_WIDTH);
- verify (TYPE_WIDTH (int) == INT_WIDTH);
- verify (TYPE_WIDTH (unsigned int) == UINT_WIDTH);
- verify (TYPE_WIDTH (long int) == LONG_WIDTH);
- verify (TYPE_WIDTH (unsigned long int) == ULONG_WIDTH);
+ verify_stmt (TYPE_WIDTH (char) == CHAR_WIDTH);
+ verify_stmt (TYPE_WIDTH (signed char) == SCHAR_WIDTH);
+ verify_stmt (TYPE_WIDTH (unsigned char) == UCHAR_WIDTH);
+ verify_stmt (TYPE_WIDTH (short int) == SHRT_WIDTH);
+ verify_stmt (TYPE_WIDTH (unsigned short int) == USHRT_WIDTH);
+ verify_stmt (TYPE_WIDTH (int) == INT_WIDTH);
+ verify_stmt (TYPE_WIDTH (unsigned int) == UINT_WIDTH);
+ verify_stmt (TYPE_WIDTH (long int) == LONG_WIDTH);
+ verify_stmt (TYPE_WIDTH (unsigned long int) == ULONG_WIDTH);
#ifdef LLONG_WIDTH
- verify (TYPE_WIDTH (long long int) == LLONG_WIDTH);
- verify (TYPE_WIDTH (unsigned long long int) == ULLONG_WIDTH);
+ verify_stmt (TYPE_WIDTH (long long int) == LLONG_WIDTH);
+ verify_stmt (TYPE_WIDTH (unsigned long long int) == ULLONG_WIDTH);
#endif
#endif
diff --git a/gnulib-tests/test-limits-h.c b/gnulib-tests/test-limits-h.c
index 29b5127..ee30bde 100644
--- a/gnulib-tests/test-limits-h.c
+++ b/gnulib-tests/test-limits-h.c
@@ -26,11 +26,78 @@
# 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)
+/* Macros borrowed from intprops.h. */
+#define TYPE_SIGNED(t) (! ((t) 0 < (t) -1))
+#define TYPE_WIDTH(t) (sizeof (t) * CHAR_BIT)
+#define TYPE_MINIMUM(t) ((t) ~ TYPE_MAXIMUM (t))
+#define TYPE_MAXIMUM(t) \
+ ((t) (! TYPE_SIGNED (t) \
+ ? (t) -1 \
+ : ((((t) 1 << (TYPE_WIDTH (t) - 2)) - 1) * 2 + 1)))
+
+/* Type width macros. */
+
+int type_bits[] =
+ {
+ CHAR_BIT,
+ WORD_BIT,
+ LONG_BIT
+ };
+verify_width (CHAR_BIT, CHAR_MIN, CHAR_MAX);
+verify_width (WORD_BIT, INT_MIN, INT_MAX);
+verify_width (LONG_BIT, LONG_MIN, LONG_MAX);
+
+/* Numerical limit macros. */
+
+char limits1[] = { CHAR_MIN, CHAR_MAX };
+verify (TYPE_MINIMUM (char) == CHAR_MIN);
+verify (TYPE_MAXIMUM (char) == CHAR_MAX);
+
+signed char limits2[] = { SCHAR_MIN, SCHAR_MAX };
+verify (TYPE_MINIMUM (signed char) == SCHAR_MIN);
+verify (TYPE_MAXIMUM (signed char) == SCHAR_MAX);
+
+unsigned char limits3[] = { UCHAR_MAX };
+verify (TYPE_MINIMUM (unsigned char) == 0);
+verify (TYPE_MAXIMUM (unsigned char) == UCHAR_MAX);
+
+short limits4[] = { SHRT_MIN, SHRT_MAX };
+verify (TYPE_MINIMUM (short int) == SHRT_MIN);
+verify (TYPE_MAXIMUM (short int) == SHRT_MAX);
+
+unsigned short limits5[] = { USHRT_MAX };
+verify (TYPE_MINIMUM (unsigned short int) == 0);
+verify (TYPE_MAXIMUM (unsigned short int) == USHRT_MAX);
+
+int limits6[] = { INT_MIN, INT_MAX };
+verify (TYPE_MINIMUM (int) == INT_MIN);
+verify (TYPE_MAXIMUM (int) == INT_MAX);
+
+unsigned int limits7[] = { UINT_MAX };
+verify (TYPE_MINIMUM (unsigned int) == 0);
+verify (TYPE_MAXIMUM (unsigned int) == UINT_MAX);
+
+long limits8[] = { LONG_MIN, LONG_MAX };
+verify (TYPE_MINIMUM (long int) == LONG_MIN);
+verify (TYPE_MAXIMUM (long int) == LONG_MAX);
+
+unsigned long limits9[] = { ULONG_MAX };
+verify (TYPE_MINIMUM (unsigned long int) == 0);
+verify (TYPE_MAXIMUM (unsigned long int) == ULONG_MAX);
+
+long long limits10[] = { LLONG_MIN, LLONG_MAX };
+verify (TYPE_MINIMUM (long long int) == LLONG_MIN);
+verify (TYPE_MAXIMUM (long long int) == LLONG_MAX);
+
+unsigned long long limits11[] = { ULLONG_MAX };
+verify (TYPE_MINIMUM (unsigned long long int) == 0);
+verify (TYPE_MAXIMUM (unsigned long long int) == ULLONG_MAX);
+
+/* Macros specified by ISO/IEC TS 18661-1:2014. */
+
verify_width (CHAR_WIDTH, CHAR_MIN, CHAR_MAX);
verify_width (SCHAR_WIDTH, SCHAR_MIN, SCHAR_MAX);
verify_width (UCHAR_WIDTH, 0, UCHAR_MAX);
diff --git a/gnulib-tests/test-localcharset.c b/gnulib-tests/test-localcharset.c
new file mode 100644
index 0000000..69bca0b
--- /dev/null
+++ b/gnulib-tests/test-localcharset.c
@@ -0,0 +1,39 @@
+/* Manual test of localcharset() function.
+ Copyright (C) 2018 Free Software Foundation, Inc.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <https://www.gnu.org/licenses/>. */
+
+/* This program prints the result of locale_charset in the current locale.
+ One way to use it is:
+ $ for l in `locale -a`; do
+ echo -n "$l "; LANG=$l ./test-localcharset;
+ done \
+ | sort -k 2
+ */
+
+#include <config.h>
+
+#include "localcharset.h"
+
+#include <locale.h>
+#include <stdio.h>
+
+int
+main (void)
+{
+ setlocale (LC_ALL, "");
+ printf ("%s\n", locale_charset ());
+
+ return 0;
+}
diff --git a/gnulib-tests/test-localeconv.c b/gnulib-tests/test-localeconv.c
index 65e364d..d2bd761 100644
--- a/gnulib-tests/test-localeconv.c
+++ b/gnulib-tests/test-localeconv.c
@@ -37,13 +37,13 @@ main ()
ASSERT (STREQ (l->decimal_point, "."));
ASSERT (STREQ (l->thousands_sep, ""));
-#if !((defined __FreeBSD__ || defined __DragonFly__) || defined __sun)
+#if !((defined __FreeBSD__ || defined __DragonFly__) || defined __sun || defined __CYGWIN__)
ASSERT (STREQ (l->grouping, ""));
#endif
ASSERT (STREQ (l->mon_decimal_point, ""));
ASSERT (STREQ (l->mon_thousands_sep, ""));
-#if !((defined __FreeBSD__ || defined __DragonFly__) || defined __sun)
+#if !((defined __FreeBSD__ || defined __DragonFly__) || defined __sun || defined __CYGWIN__)
ASSERT (STREQ (l->mon_grouping, ""));
#endif
ASSERT (STREQ (l->positive_sign, ""));
diff --git a/gnulib-tests/test-localename.c b/gnulib-tests/test-localename.c
index c0952a1..21a5f5d 100644
--- a/gnulib-tests/test-localename.c
+++ b/gnulib-tests/test-localename.c
@@ -26,8 +26,12 @@
#include "macros.h"
+#if HAVE_NEWLOCALE && HAVE_WORKING_USELOCALE && !HAVE_FAKE_LOCALES
+# define HAVE_GOOD_USELOCALE 1
+#endif
+
-#if HAVE_NEWLOCALE && HAVE_USELOCALE
+#if HAVE_GOOD_USELOCALE
static struct { int cat; int mask; const char *string; } const categories[] =
{
@@ -63,6 +67,7 @@ static struct { int cat; int mask; const char *string; } const categories[] =
static void
test_locale_name (void)
{
+ const char *ret;
const char *name;
/* Check that gl_locale_name returns non-NULL. */
@@ -70,7 +75,7 @@ test_locale_name (void)
/* Get into a defined state, */
setlocale (LC_ALL, "en_US.UTF-8");
-#if HAVE_NEWLOCALE && HAVE_USELOCALE
+#if HAVE_GOOD_USELOCALE
uselocale (LC_GLOBAL_LOCALE);
#endif
@@ -81,7 +86,21 @@ test_locale_name (void)
unsetenv ("LC_MESSAGES");
unsetenv ("LC_NUMERIC");
unsetenv ("LANG");
- setlocale (LC_ALL, "");
+ /* Need also to unset all environment variables that specify standard or
+ non-standard locale categories. Otherwise, on glibc systems, when some
+ of these variables are set and reference a nonexistent locale, the
+ setlocale (LC_ALL, "") call below would fail. */
+ unsetenv ("LC_COLLATE");
+ unsetenv ("LC_MONETARY");
+ unsetenv ("LC_TIME");
+ unsetenv ("LC_ADDRESS");
+ unsetenv ("LC_IDENTIFICATION");
+ unsetenv ("LC_MEASUREMENT");
+ unsetenv ("LC_NAME");
+ unsetenv ("LC_PAPER");
+ unsetenv ("LC_TELEPHONE");
+ ret = setlocale (LC_ALL, "");
+ ASSERT (ret != NULL);
ASSERT (strcmp (gl_locale_name (LC_MESSAGES, "LC_MESSAGES"),
gl_locale_name_default ()) == 0);
ASSERT (strcmp (gl_locale_name (LC_NUMERIC, "LC_NUMERIC"),
@@ -155,7 +174,16 @@ test_locale_name (void)
if (setlocale (LC_ALL, "") != NULL)
{
name = gl_locale_name (LC_CTYPE, "LC_CTYPE");
+#if defined _WIN32 && !defined __CYGWIN__
+ /* On native Windows, here,
+ gl_locale_name_thread (LC_CTYPE, "LC_CTYPE")
+ returns NULL and
+ gl_locale_name_posix (LC_CTYPE, "LC_CTYPE")
+ returns either "de_DE" or "de_DE.UTF-8". */
+ ASSERT (strcmp (name, "de_DE") == 0 || strcmp (name, "de_DE.UTF-8") == 0);
+#else
ASSERT (strcmp (name, "de_DE.UTF-8") == 0);
+#endif
name = gl_locale_name (LC_MESSAGES, "LC_MESSAGES");
ASSERT (strcmp (name, "fr_FR.UTF-8") == 0);
}
@@ -172,7 +200,7 @@ test_locale_name (void)
ASSERT (strcmp (name, "fr_FR.UTF-8") == 0);
}
-#if HAVE_NEWLOCALE && HAVE_USELOCALE
+#if HAVE_GOOD_USELOCALE
/* Check that gl_locale_name considers the thread locale. */
{
locale_t locale = newlocale (LC_ALL_MASK, "fr_FR.UTF-8", NULL);
@@ -232,7 +260,7 @@ test_locale_name_thread (void)
/* Get into a defined state, */
setlocale (LC_ALL, "en_US.UTF-8");
-#if HAVE_NEWLOCALE && HAVE_USELOCALE
+#if HAVE_GOOD_USELOCALE
/* Check that gl_locale_name_thread returns NULL when no thread locale is
set. */
uselocale (LC_GLOBAL_LOCALE);
@@ -483,11 +511,12 @@ test_locale_name_thread (void)
static void
test_locale_name_posix (void)
{
+ const char *ret;
const char *name;
/* Get into a defined state, */
setlocale (LC_ALL, "en_US.UTF-8");
-#if HAVE_NEWLOCALE && HAVE_USELOCALE
+#if HAVE_GOOD_USELOCALE
uselocale (LC_GLOBAL_LOCALE);
#endif
@@ -498,7 +527,21 @@ test_locale_name_posix (void)
unsetenv ("LC_MESSAGES");
unsetenv ("LC_NUMERIC");
unsetenv ("LANG");
- setlocale (LC_ALL, "");
+ /* Need also to unset all environment variables that specify standard or
+ non-standard locale categories. Otherwise, on glibc systems, when some
+ of these variables are set and reference a nonexistent locale, the
+ setlocale (LC_ALL, "") call below would fail. */
+ unsetenv ("LC_COLLATE");
+ unsetenv ("LC_MONETARY");
+ unsetenv ("LC_TIME");
+ unsetenv ("LC_ADDRESS");
+ unsetenv ("LC_IDENTIFICATION");
+ unsetenv ("LC_MEASUREMENT");
+ unsetenv ("LC_NAME");
+ unsetenv ("LC_PAPER");
+ unsetenv ("LC_TELEPHONE");
+ ret = setlocale (LC_ALL, "");
+ ASSERT (ret != NULL);
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");
@@ -575,7 +618,11 @@ test_locale_name_posix (void)
if (setlocale (LC_ALL, "") != NULL)
{
name = gl_locale_name_posix (LC_CTYPE, "LC_CTYPE");
+#if defined _WIN32 && !defined __CYGWIN__
+ ASSERT (strcmp (name, "de_DE") == 0 || strcmp (name, "de_DE.UTF-8") == 0);
+#else
ASSERT (strcmp (name, "de_DE.UTF-8") == 0);
+#endif
name = gl_locale_name_posix (LC_MESSAGES, "LC_MESSAGES");
ASSERT (strcmp (name, "fr_FR.UTF-8") == 0);
}
@@ -592,7 +639,7 @@ test_locale_name_posix (void)
ASSERT (strcmp (name, "fr_FR.UTF-8") == 0);
}
-#if HAVE_NEWLOCALE && HAVE_USELOCALE
+#if HAVE_GOOD_USELOCALE
/* Check that gl_locale_name_posix ignores the thread locale. */
{
locale_t locale = newlocale (LC_ALL_MASK, "fr_FR.UTF-8", NULL);
@@ -621,7 +668,7 @@ test_locale_name_environ (void)
/* Get into a defined state, */
setlocale (LC_ALL, "en_US.UTF-8");
-#if HAVE_NEWLOCALE && HAVE_USELOCALE
+#if HAVE_GOOD_USELOCALE
uselocale (LC_GLOBAL_LOCALE);
#endif
@@ -706,7 +753,7 @@ test_locale_name_environ (void)
name = gl_locale_name_environ (LC_MESSAGES, "LC_MESSAGES");
ASSERT (strcmp (name, "fr_FR.UTF-8") == 0);
-#if HAVE_NEWLOCALE && HAVE_USELOCALE
+#if HAVE_GOOD_USELOCALE
/* Check that gl_locale_name_environ ignores the thread locale. */
{
locale_t locale = newlocale (LC_ALL_MASK, "fr_FR.UTF-8", NULL);
@@ -737,11 +784,11 @@ test_locale_name_default (void)
/* 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__))
+#if !((defined __APPLE__ && defined __MACH__) || (defined _WIN32 || defined __CYGWIN__))
ASSERT (strcmp (name, "C") == 0);
#endif
-#if HAVE_NEWLOCALE && HAVE_USELOCALE
+#if HAVE_GOOD_USELOCALE
/* Check that gl_locale_name_default ignores the thread locale. */
{
locale_t locale = newlocale (LC_ALL_MASK, "fr_FR.UTF-8", NULL);
diff --git a/gnulib-tests/test-mbrtowc-w32.c b/gnulib-tests/test-mbrtowc-w32.c
index 2f83386..ba4d755 100644
--- a/gnulib-tests/test-mbrtowc-w32.c
+++ b/gnulib-tests/test-mbrtowc-w32.c
@@ -26,7 +26,7 @@
#include "macros.h"
-#if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
+#if defined _WIN32 && !defined __CYGWIN__
static int
test_one_locale (const char *name, int codepage)
diff --git a/gnulib-tests/test-mkdir.c b/gnulib-tests/test-mkdir.c
new file mode 100644
index 0000000..66a713f
--- /dev/null
+++ b/gnulib-tests/test-mkdir.c
@@ -0,0 +1,47 @@
+/* Tests of mkdir.
+ Copyright (C) 2009-2018 Free Software Foundation, Inc.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <https://www.gnu.org/licenses/>. */
+
+/* Written by Eric Blake <ebb9@byu.net>, 2009. */
+
+#include <config.h>
+
+#include <sys/stat.h>
+
+#include "signature.h"
+SIGNATURE_CHECK (mkdir, int, (char const *, mode_t));
+
+#include <fcntl.h>
+#include <errno.h>
+#include <stdbool.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <unistd.h>
+
+#include "ignore-value.h"
+#include "macros.h"
+
+#define BASE "test-mkdir.t"
+
+#include "test-mkdir.h"
+
+int
+main (void)
+{
+ /* Clean up any trash from prior testsuite runs. */
+ ignore_value (system ("rm -rf " BASE "*"));
+
+ return test_mkdir (mkdir, true);
+}
diff --git a/gnulib-tests/test-mkdir.h b/gnulib-tests/test-mkdir.h
new file mode 100644
index 0000000..9849300
--- /dev/null
+++ b/gnulib-tests/test-mkdir.h
@@ -0,0 +1,98 @@
+/* Test of mkdir() function.
+ Copyright (C) 2009-2018 Free Software Foundation, Inc.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <https://www.gnu.org/licenses/>. */
+
+/* This file is designed to test both mkdir(a,b) and
+ mkdirat(AT_FDCWD,a,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 tests with
+ status 77 when symlinks are unsupported. */
+
+static int
+test_mkdir (int (*func) (char const *, mode_t), bool print)
+{
+ /* Test basic error handling. */
+ ASSERT (close (creat (BASE "file", 0600)) == 0);
+ errno = 0;
+ ASSERT (func (BASE "file", 0700) == -1);
+ ASSERT (errno == EEXIST);
+ errno = 0;
+ ASSERT (func (BASE "file/", 0700) == -1);
+ ASSERT (errno == ENOTDIR || errno == EEXIST);
+ errno = 0;
+ ASSERT (func (BASE "file/dir", 0700) == -1);
+ ASSERT (errno == ENOTDIR || errno == ENOENT || errno == EOPNOTSUPP);
+ ASSERT (unlink (BASE "file") == 0);
+ errno = 0;
+ ASSERT (func ("", 0700) == -1);
+ ASSERT (errno == ENOENT);
+ errno = 0;
+ ASSERT (func (BASE "dir/sub", 0700) == -1);
+ ASSERT (errno == ENOENT);
+ errno = 0;
+ ASSERT (func (BASE "dir/.", 0700) == -1);
+ ASSERT (errno == ENOENT);
+ errno = 0;
+ ASSERT (func (BASE "dir/.//", 0700) == -1);
+ ASSERT (errno == ENOENT);
+
+ /* Test trailing slash handling. */
+ ASSERT (func (BASE "dir", 0700) == 0);
+ errno = 0;
+ ASSERT (func (BASE "dir", 0700) == -1);
+ ASSERT (errno == EEXIST);
+ ASSERT (rmdir (BASE "dir") == 0);
+ ASSERT (func (BASE "dir/", 0700) == 0);
+ errno = 0;
+ ASSERT (func (BASE "dir/", 0700) == -1);
+ ASSERT (errno == EEXIST);
+ ASSERT (rmdir (BASE "dir") == 0);
+
+ /* Test symlink behavior. POSIX requires the creation of
+ directories through a dangling symlink with trailing slash, but
+ GNU does not yet implement that, so we support either behavior
+ for now. */
+ if (symlink (BASE "dir", BASE "link"))
+ {
+ if (print)
+ fputs ("skipping test: symlinks not supported on this file system\n",
+ stderr);
+ return 77;
+ }
+ errno = 0;
+ ASSERT (func (BASE "link", 0700) == -1);
+ ASSERT (errno == EEXIST);
+ {
+ int result;
+ errno = 0;
+ result = func (BASE "link/", 0700);
+ if (!result)
+ ASSERT (rmdir (BASE "dir") == 0);
+ else
+ {
+ ASSERT (result == -1);
+ ASSERT (errno == EEXIST);
+ errno = 0;
+ ASSERT (rmdir (BASE "dir") == -1);
+ ASSERT (errno == ENOENT);
+ }
+ }
+ errno = 0;
+ ASSERT (func (BASE "link/.", 0700) == -1);
+ ASSERT (errno == ENOENT);
+ ASSERT (unlink (BASE "link") == 0);
+
+ return 0;
+}
diff --git a/gnulib-tests/test-pipe.c b/gnulib-tests/test-pipe.c
index b39af7f..55f6208 100644
--- a/gnulib-tests/test-pipe.c
+++ b/gnulib-tests/test-pipe.c
@@ -24,7 +24,7 @@ SIGNATURE_CHECK (pipe, int, (int[2]));
#include <fcntl.h>
#include <stdbool.h>
-#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
+#if defined _WIN32 && ! defined __CYGWIN__
/* Get declarations of the native Windows API functions. */
# define WIN32_LEAN_AND_MEAN
# include <windows.h>
@@ -43,7 +43,7 @@ SIGNATURE_CHECK (pipe, int, (int[2]));
static bool
is_open (int fd)
{
-#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
+#if 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. */
@@ -60,7 +60,7 @@ is_open (int fd)
static bool
is_cloexec (int fd)
{
-#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
+#if defined _WIN32 && ! defined __CYGWIN__
HANDLE h = (HANDLE) _get_osfhandle (fd);
DWORD flags;
ASSERT (GetHandleInformation (h, &flags));
@@ -76,7 +76,7 @@ is_cloexec (int fd)
static bool
is_nonblocking (int fd)
{
-#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
+#if defined _WIN32 && ! defined __CYGWIN__
/* We don't use the non-blocking mode for sockets here. */
return 0;
#else
diff --git a/gnulib-tests/test-regex.c b/gnulib-tests/test-regex.c
index 0a009b8..a0aa112 100644
--- a/gnulib-tests/test-regex.c
+++ b/gnulib-tests/test-regex.c
@@ -237,6 +237,17 @@ main (void)
if (! REG_STARTEND)
result |= 64;
+ /* Matching with the compiled form of this regexp would provoke
+ an assertion failure prior to glibc-2.28:
+ regexec.c:1375: pop_fail_stack: Assertion 'num >= 0' failed
+ With glibc-2.28, compilation fails and reports the invalid
+ back reference. */
+ re_set_syntax (RE_SYNTAX_POSIX_EGREP);
+ memset (&regex, 0, sizeof regex);
+ s = re_compile_pattern ("0|()0|\\1|0", 10, &regex);
+ if (!s || strcmp (s, "Invalid back reference"))
+ 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
diff --git a/gnulib-tests/test-select.h b/gnulib-tests/test-select.h
index d751e42..b0f17f3 100644
--- a/gnulib-tests/test-select.h
+++ b/gnulib-tests/test-select.h
@@ -18,6 +18,7 @@
#include <stdio.h>
#include <string.h>
+#include <sys/socket.h>
#include <netinet/in.h>
#include <arpa/inet.h>
#include <unistd.h>
@@ -29,7 +30,7 @@
#include "macros.h"
-#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
+#if defined _WIN32 && ! defined __CYGWIN__
# define WINDOWS_NATIVE
#endif
@@ -37,10 +38,6 @@
# include <sys/wait.h>
#endif
-#ifndef SO_REUSEPORT
-# define SO_REUSEPORT SO_REUSEADDR
-#endif
-
#define TEST_PORT 12345
@@ -245,9 +242,11 @@ test_bad_nfd (select_fn my_select)
/* Can't test FD_SETSIZE + 1 for EINVAL, since some systems allow
dynamically larger set size by redefining FD_SETSIZE anywhere up
to the actual maximum fd. */
- /* if (do_select_bad_nfd_nowait (FD_SETSIZE + 1, my_select) != -1 */
- /* || errno != EINVAL) */
- /* failed ("invalid errno after bogus nfds"); */
+#if 0
+ if (do_select_bad_nfd_nowait (FD_SETSIZE + 1, my_select) != -1
+ || errno != EINVAL)
+ failed ("invalid errno after bogus nfds");
+#endif
}
/* Test select(2) on invalid file descriptors. */
@@ -297,6 +296,11 @@ test_bad_fd (select_fn my_select)
# else
fd = 99;
# endif
+ /* Even on the best POSIX compliant platforms, values of fd >= FD_SETSIZE
+ require an nfds argument that is > FD_SETSIZE and thus may lead to EINVAL,
+ not EBADF. */
+ if (fd >= FD_SETSIZE)
+ fd = FD_SETSIZE - 1;
close (fd);
if (do_select_bad_fd_nowait (fd, SEL_IN, my_select) == 0 || errno != EBADF)
diff --git a/gnulib-tests/test-sigprocmask.c b/gnulib-tests/test-sigprocmask.c
index bf8e3a6..7b09bb1 100644
--- a/gnulib-tests/test-sigprocmask.c
+++ b/gnulib-tests/test-sigprocmask.c
@@ -30,7 +30,7 @@ SIGNATURE_CHECK (sigprocmask, int, (int, const sigset_t *, sigset_t *));
#include "macros.h"
-#if !((defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__)
+#if !(defined _WIN32 && !defined __CYGWIN__)
static volatile int sigint_occurred;
diff --git a/gnulib-tests/test-stat-time.c b/gnulib-tests/test-stat-time.c
index 23cf303..49d5497 100644
--- a/gnulib-tests/test-stat-time.c
+++ b/gnulib-tests/test-stat-time.c
@@ -167,7 +167,7 @@ test_mtime (const struct stat *statinfo, struct timespec *modtimes)
}
}
-#if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
+#if defined _WIN32 && !defined __CYGWIN__
/* Skip the ctime tests on native Windows platforms, because their
st_ctime is either the same as st_mtime (plus or minus an offset)
or set to the file _creation_ time, and is not influenced by rename
diff --git a/gnulib-tests/test-wcrtomb-w32.c b/gnulib-tests/test-wcrtomb-w32.c
index e8576c7..19770d1 100644
--- a/gnulib-tests/test-wcrtomb-w32.c
+++ b/gnulib-tests/test-wcrtomb-w32.c
@@ -25,7 +25,7 @@
#include "macros.h"
-#if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
+#if defined _WIN32 && !defined __CYGWIN__
static int
test_one_locale (const char *name, int codepage)
diff --git a/gnulib-tests/warn-on-use.h b/gnulib-tests/warn-on-use.h
index e76c384..72d67cc 100644
--- a/gnulib-tests/warn-on-use.h
+++ b/gnulib-tests/warn-on-use.h
@@ -20,23 +20,32 @@
supported by the compiler. If the compiler does not support this
feature, the macro expands to an unused extern declaration.
- This macro is useful for marking a function as a potential
+ _GL_WARN_ON_USE_ATTRIBUTE ("literal string") expands to the
+ attribute used in _GL_WARN_ON_USE. If the compiler does not support
+ this feature, it expands to empty.
+
+ These macros are useful for marking a function as a potential
portability trap, with the intent that "literal string" include
instructions on the replacement function that should be used
- instead. However, one of the reasons that a function is a
- portability trap is if it has the wrong signature. Declaring
- FUNCTION with a different signature in C is a compilation error, so
- this macro must use the same type as any existing declaration so
- that programs that avoid the problematic FUNCTION do not fail to
- compile merely because they included a header that poisoned the
- function. But this implies that _GL_WARN_ON_USE is only safe to
- use if FUNCTION is known to already have a declaration. Use of
- this macro implies that there must not be any other macro hiding
- the declaration of FUNCTION; but undefining FUNCTION first is part
- of the poisoning process anyway (although for symbols that are
- provided only via a macro, the result is a compilation error rather
- than a warning containing "literal string"). Also note that in
- C++, it is only safe to use if FUNCTION has no overloads.
+ instead.
+ _GL_WARN_ON_USE is for functions with 'extern' linkage.
+ _GL_WARN_ON_USE_ATTRIBUTE is for functions with 'static' or 'inline'
+ linkage.
+
+ However, one of the reasons that a function is a portability trap is
+ if it has the wrong signature. Declaring FUNCTION with a different
+ signature in C is a compilation error, so this macro must use the
+ same type as any existing declaration so that programs that avoid
+ the problematic FUNCTION do not fail to compile merely because they
+ included a header that poisoned the function. But this implies that
+ _GL_WARN_ON_USE is only safe to use if FUNCTION is known to already
+ have a declaration. Use of this macro implies that there must not
+ be any other macro hiding the declaration of FUNCTION; but
+ undefining FUNCTION first is part of the poisoning process anyway
+ (although for symbols that are provided only via a macro, the result
+ is a compilation error rather than a warning containing
+ "literal string"). Also note that in C++, it is only safe to use if
+ FUNCTION has no overloads.
For an example, it is possible to poison 'getline' by:
- adding a call to gl_WARN_ON_USE_PREPARE([[#include <stdio.h>]],
@@ -54,12 +63,21 @@
(less common usage, like &environ, will cause a compilation error
rather than issue the nice warning, but the end result of informing
the developer about their portability problem is still achieved):
- #if HAVE_RAW_DECL_ENVIRON
- static char ***rpl_environ (void) { return &environ; }
- _GL_WARN_ON_USE (rpl_environ, "environ is not always properly declared");
- # undef environ
- # define environ (*rpl_environ ())
- #endif
+ #if HAVE_RAW_DECL_ENVIRON
+ static char ***
+ rpl_environ (void) { return &environ; }
+ _GL_WARN_ON_USE (rpl_environ, "environ is not always properly declared");
+ # undef environ
+ # define environ (*rpl_environ ())
+ #endif
+ or better (avoiding contradictory use of 'static' and 'extern'):
+ #if HAVE_RAW_DECL_ENVIRON
+ static char ***
+ _GL_WARN_ON_USE_ATTRIBUTE ("environ is not always properly declared")
+ rpl_environ (void) { return &environ; }
+ # undef environ
+ # define environ (*rpl_environ ())
+ #endif
*/
#ifndef _GL_WARN_ON_USE
@@ -67,13 +85,17 @@
/* A compiler attribute is available in gcc versions 4.3.0 and later. */
# define _GL_WARN_ON_USE(function, message) \
extern __typeof__ (function) function __attribute__ ((__warning__ (message)))
+# define _GL_WARN_ON_USE_ATTRIBUTE(message) \
+ __attribute__ ((__warning__ (message)))
# elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING
/* Verify the existence of the function. */
# define _GL_WARN_ON_USE(function, message) \
extern __typeof__ (function) function
+# define _GL_WARN_ON_USE_ATTRIBUTE(message)
# else /* Unsupported. */
# define _GL_WARN_ON_USE(function, message) \
_GL_WARN_EXTERN_C int _gl_warn_on_use
+# define _GL_WARN_ON_USE_ATTRIBUTE(message)
# endif
#endif
diff --git a/gnulib-tests/zerosize-ptr.h b/gnulib-tests/zerosize-ptr.h
index e4867e9..d5592c5 100644
--- a/gnulib-tests/zerosize-ptr.h
+++ b/gnulib-tests/zerosize-ptr.h
@@ -18,6 +18,19 @@
argument. Therefore this file produces a non-NULL pointer which cannot
be dereferenced, if possible. */
+/* On Android, when targeting Android 4.4 or older with a GCC toolchain,
+ prevent a compilation error
+ "error: call to 'mmap' declared with attribute error: mmap is not
+ available with _FILE_OFFSET_BITS=64 when using GCC until android-21.
+ Either raise your minSdkVersion, disable _FILE_OFFSET_BITS=64, or
+ switch to Clang."
+ The files that we access in this compilation unit are less than 2 GB
+ large. */
+#if defined __ANDROID__
+# undef _FILE_OFFSET_BITS
+# undef __USE_FILE_OFFSET64
+#endif
+
#include <stdlib.h>
/* Test whether mmap() and mprotect() are available.
diff --git a/lib/_Noreturn.h b/lib/_Noreturn.h
index c44ad89..94fdfaf 100644
--- a/lib/_Noreturn.h
+++ b/lib/_Noreturn.h
@@ -1,8 +1,12 @@
-#if !defined _Noreturn && __STDC_VERSION__ < 201112
-# if (3 <= __GNUC__ || (__GNUC__ == 2 && 8 <= __GNUC_MINOR__) \
- || 0x5110 <= __SUNPRO_C)
+#ifndef _Noreturn
+# if 201103 <= (defined __cplusplus ? __cplusplus : 0)
+# define _Noreturn [[noreturn]]
+# elif (201112 <= (defined __STDC_VERSION__ ? __STDC_VERSION__ : 0) \
+ || 4 < __GNUC__ + (7 <= __GNUC_MINOR__))
+ /* _Noreturn works as-is. */
+# elif 2 < __GNUC__ + (8 <= __GNUC_MINOR__) || 0x5110 <= __SUNPRO_C
# define _Noreturn __attribute__ ((__noreturn__))
-# elif 1200 <= _MSC_VER
+# elif 1200 <= (defined _MSC_VER ? _MSC_VER : 0)
# define _Noreturn __declspec (noreturn)
# else
# define _Noreturn
diff --git a/lib/acl-internal.c b/lib/acl-internal.c
index 383c5dd..92e7b9b 100644
--- a/lib/acl-internal.c
+++ b/lib/acl-internal.c
@@ -23,7 +23,7 @@
#include "acl-internal.h"
-#if USE_ACL && HAVE_ACL_GET_FILE
+#if USE_ACL && HAVE_ACL_GET_FILE /* Linux, FreeBSD, Mac OS X, IRIX, Tru64, Cygwin >= 2.5 */
# if HAVE_ACL_TYPE_EXTENDED /* Mac OS X */
@@ -37,7 +37,7 @@ acl_extended_nontrivial (acl_t acl)
return (acl_entries (acl) > 0);
}
-# else /* Linux, FreeBSD, IRIX, Tru64 */
+# else /* Linux, FreeBSD, IRIX, Tru64, Cygwin >= 2.5 */
/* ACL is an ACL, from a file, stored as type ACL_TYPE_ACCESS.
Return 1 if the given ACL is non-trivial.
@@ -51,7 +51,7 @@ acl_access_nontrivial (acl_t acl)
at least, allowing us to write
return (3 < acl_entries (acl));
but the following code is more robust. */
-# if HAVE_ACL_FIRST_ENTRY /* Linux, FreeBSD */
+# if HAVE_ACL_FIRST_ENTRY /* Linux, FreeBSD, Cygwin >= 2.5 */
acl_entry_t ace;
int got_one;
@@ -124,7 +124,7 @@ acl_default_nontrivial (acl_t acl)
# endif
-#elif USE_ACL && HAVE_FACL && defined GETACL /* Solaris, Cygwin, not HP-UX */
+#elif USE_ACL && HAVE_FACL && defined GETACL /* Solaris, Cygwin < 2.5, not HP-UX */
/* Test an ACL retrieved with GETACL.
Return 1 if the given ACL, consisting of COUNT entries, is non-trivial.
@@ -355,7 +355,7 @@ acl_nontrivial (int count, struct acl_entry *entries)
struct acl_entry *ace = &entries[i];
if (ace->uid != ACL_NSUSER && ace->gid != ACL_NSGROUP)
- return 1;
+ return 1;
}
return 0;
}
@@ -479,7 +479,7 @@ void
free_permission_context (struct permission_context *ctx)
{
#if USE_ACL
-# if HAVE_ACL_GET_FILE /* Linux, FreeBSD, Mac OS X, IRIX, Tru64 */
+# if HAVE_ACL_GET_FILE /* Linux, FreeBSD, Mac OS X, IRIX, Tru64, Cygwin >= 2.5 */
if (ctx->acl)
acl_free (ctx->acl);
# if !HAVE_ACL_TYPE_EXTENDED
@@ -487,7 +487,7 @@ free_permission_context (struct permission_context *ctx)
acl_free (ctx->default_acl);
# endif
-# elif defined GETACL /* Solaris, Cygwin */
+# elif defined GETACL /* Solaris, Cygwin < 2.5 */
free (ctx->entries);
# ifdef ACE_GETACL
free (ctx->ace_entries);
diff --git a/lib/acl-internal.h b/lib/acl-internal.h
index 6c65e65..2da7c5a 100644
--- a/lib/acl-internal.h
+++ b/lib/acl-internal.h
@@ -30,7 +30,8 @@
# define GETACLCNT ACL_CNT
#endif
-/* On Linux, additional ACL related API is available in <acl/libacl.h>. */
+/* On Linux and Cygwin >= 2.5, additional ACL related API is available in
+ <acl/libacl.h>. */
#ifdef HAVE_ACL_LIBACL_H
# include <acl/libacl.h>
#endif
@@ -72,7 +73,7 @@ _GL_INLINE_HEADER_BEGIN
# if HAVE_ACL_GET_FILE
/* POSIX 1003.1e (draft 17 -- abandoned) specific version. */
-/* Linux, FreeBSD, Mac OS X, IRIX, Tru64 */
+/* Linux, FreeBSD, Mac OS X, IRIX, Tru64, Cygwin >= 2.5 */
# ifndef MIN_ACL_ENTRIES
# define MIN_ACL_ENTRIES 4
@@ -122,7 +123,10 @@ rpl_acl_set_fd (int fd, acl_t acl)
# endif
/* Linux-specific */
-# ifndef HAVE_ACL_EXTENDED_FILE
+/* Cygwin >= 2.5 implements this function, but it returns 1 for all
+ directories, thus is unusable. */
+# if !defined HAVE_ACL_EXTENDED_FILE || defined __CYGWIN__
+# undef HAVE_ACL_EXTENDED_FILE
# define HAVE_ACL_EXTENDED_FILE false
# define acl_extended_file(name) (-1)
# endif
@@ -163,7 +167,7 @@ extern int acl_access_nontrivial (acl_t);
extern int acl_default_nontrivial (acl_t);
# endif
-# elif HAVE_FACL && defined GETACL /* Solaris, Cygwin, not HP-UX */
+# elif HAVE_FACL && defined GETACL /* Solaris, Cygwin < 2.5, not HP-UX */
/* Set to 0 if a file's mode is stored independently from the ACL. */
# if defined __CYGWIN__ /* Cygwin */
@@ -256,14 +260,14 @@ extern int acl_nontrivial (int count, struct acl *entries);
struct permission_context {
mode_t mode;
#if USE_ACL
-# if HAVE_ACL_GET_FILE /* Linux, FreeBSD, Mac OS X, IRIX, Tru64 */
+# if HAVE_ACL_GET_FILE /* Linux, FreeBSD, Mac OS X, IRIX, Tru64, Cygwin >= 2.5 */
acl_t acl;
# if !HAVE_ACL_TYPE_EXTENDED
acl_t default_acl;
# endif
bool acls_not_supported;
-# elif defined GETACL /* Solaris, Cygwin */
+# elif defined GETACL /* Solaris, Cygwin < 2.5 */
int count;
aclent_t *entries;
# ifdef ACE_GETACL
@@ -293,10 +297,6 @@ struct permission_context {
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
- ;
+void free_permission_context (struct permission_context *);
_GL_INLINE_HEADER_END
diff --git a/lib/acl_entries.c b/lib/acl_entries.c
index 59dd420..ce730d4 100644
--- a/lib/acl_entries.c
+++ b/lib/acl_entries.c
@@ -22,7 +22,7 @@
#include "acl-internal.h"
/* This file assumes POSIX-draft like ACLs
- (Linux, FreeBSD, Mac OS X, IRIX, Tru64). */
+ (Linux, FreeBSD, Mac OS X, IRIX, Tru64, Cygwin >= 2.5). */
/* Return the number of entries in ACL.
Return -1 and set errno upon failure to determine it. */
@@ -34,7 +34,7 @@ acl_entries (acl_t acl)
if (acl != NULL)
{
-#if HAVE_ACL_FIRST_ENTRY /* Linux, FreeBSD, Mac OS X */
+#if HAVE_ACL_FIRST_ENTRY /* Linux, FreeBSD, Mac OS X, Cygwin >= 2.5 */
# if HAVE_ACL_TYPE_EXTENDED /* Mac OS X */
/* acl_get_entry returns 0 when it successfully fetches an entry,
and -1/EINVAL at the end. */
@@ -45,7 +45,7 @@ acl_entries (acl_t acl)
got_one >= 0;
got_one = acl_get_entry (acl, ACL_NEXT_ENTRY, &ace))
count++;
-# else /* Linux, FreeBSD */
+# else /* Linux, FreeBSD, Cygwin >= 2.5 */
/* acl_get_entry returns 1 when it successfully fetches an entry,
and 0 at the end. */
acl_entry_t ace;
diff --git a/gnulib-tests/binary-io.c b/lib/binary-io.c
index f9cc4dd..f9cc4dd 100644
--- a/gnulib-tests/binary-io.c
+++ b/lib/binary-io.c
diff --git a/gnulib-tests/binary-io.h b/lib/binary-io.h
index 1f21fc0..1f21fc0 100644
--- a/gnulib-tests/binary-io.h
+++ b/lib/binary-io.h
diff --git a/lib/canonicalize-lgpl.c b/lib/canonicalize-lgpl.c
index 898f0d1..7831b3f 100644
--- a/lib/canonicalize-lgpl.c
+++ b/lib/canonicalize-lgpl.c
@@ -95,7 +95,7 @@
static void
alloc_failed (void)
{
-#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
+#if defined _WIN32 && ! defined __CYGWIN__
/* Avoid errno problem without using the malloc or realloc modules; see:
https://lists.gnu.org/r/bug-gnulib/2016-08/msg00025.html */
errno = ENOMEM;
diff --git a/lib/cdefs.h b/lib/cdefs.h
new file mode 100644
index 0000000..70fb638
--- /dev/null
+++ b/lib/cdefs.h
@@ -0,0 +1,514 @@
+/* Copyright (C) 1992-2018 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU General Public
+ License as published by the Free Software Foundation; either
+ version 3 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ General Public License for more details.
+
+ You should have received a copy of the GNU General Public
+ License along with the GNU C Library; if not, see
+ <https://www.gnu.org/licenses/>. */
+
+#ifndef _SYS_CDEFS_H
+#define _SYS_CDEFS_H 1
+
+/* We are almost always included from features.h. */
+#ifndef _FEATURES_H
+# include <features.h>
+#endif
+
+/* The GNU libc does not support any K&R compilers or the traditional mode
+ of ISO C compilers anymore. Check for some of the combinations not
+ anymore supported. */
+#if defined __GNUC__ && !defined __STDC__
+# error "You need a ISO C conforming compiler to use the glibc headers"
+#endif
+
+/* Some user header file might have defined this before. */
+#undef __P
+#undef __PMT
+
+#ifdef __GNUC__
+
+/* All functions, except those with callbacks or those that
+ synchronize memory, are leaf functions. */
+# if __GNUC_PREREQ (4, 6) && !defined _LIBC
+# define __LEAF , __leaf__
+# define __LEAF_ATTR __attribute__ ((__leaf__))
+# else
+# define __LEAF
+# define __LEAF_ATTR
+# endif
+
+/* GCC can always grok prototypes. For C++ programs we add throw()
+ to help it optimize the function calls. But this works only with
+ gcc 2.8.x and egcs. For gcc 3.2 and up we even mark C functions
+ as non-throwing using a function attribute since programs can use
+ the -fexceptions options for C code as well. */
+# if !defined __cplusplus && __GNUC_PREREQ (3, 3)
+# define __THROW __attribute__ ((__nothrow__ __LEAF))
+# define __THROWNL __attribute__ ((__nothrow__))
+# define __NTH(fct) __attribute__ ((__nothrow__ __LEAF)) fct
+# define __NTHNL(fct) __attribute__ ((__nothrow__)) fct
+# else
+# if defined __cplusplus && __GNUC_PREREQ (2,8)
+# define __THROW throw ()
+# define __THROWNL throw ()
+# define __NTH(fct) __LEAF_ATTR fct throw ()
+# define __NTHNL(fct) fct throw ()
+# else
+# define __THROW
+# define __THROWNL
+# define __NTH(fct) fct
+# define __NTHNL(fct) fct
+# endif
+# endif
+
+#else /* Not GCC. */
+
+# if (defined __cplusplus \
+ || (defined __STDC_VERSION__ && __STDC_VERSION__ >= 199901L))
+# define __inline inline
+# else
+# define __inline /* No inline functions. */
+# endif
+
+# define __THROW
+# define __THROWNL
+# define __NTH(fct) fct
+
+#endif /* GCC. */
+
+/* Compilers that are not clang may object to
+ #if defined __clang__ && __has_extension(...)
+ even though they do not need to evaluate the right-hand side of the &&. */
+#if defined __clang__ && defined __has_extension
+# define __glibc_clang_has_extension(ext) __has_extension (ext)
+#else
+# define __glibc_clang_has_extension(ext) 0
+#endif
+
+/* These two macros are not used in glibc anymore. They are kept here
+ only because some other projects expect the macros to be defined. */
+#define __P(args) args
+#define __PMT(args) args
+
+/* For these things, GCC behaves the ANSI way normally,
+ and the non-ANSI way under -traditional. */
+
+#define __CONCAT(x,y) x ## y
+#define __STRING(x) #x
+
+/* This is not a typedef so `const __ptr_t' does the right thing. */
+#define __ptr_t void *
+
+
+/* C++ needs to know that types and declarations are C, not C++. */
+#ifdef __cplusplus
+# define __BEGIN_DECLS extern "C" {
+# define __END_DECLS }
+#else
+# define __BEGIN_DECLS
+# define __END_DECLS
+#endif
+
+
+/* Fortify support. */
+#define __bos(ptr) __builtin_object_size (ptr, __USE_FORTIFY_LEVEL > 1)
+#define __bos0(ptr) __builtin_object_size (ptr, 0)
+
+#if __GNUC_PREREQ (4,3)
+# define __warndecl(name, msg) \
+ extern void name (void) __attribute__((__warning__ (msg)))
+# define __warnattr(msg) __attribute__((__warning__ (msg)))
+# define __errordecl(name, msg) \
+ extern void name (void) __attribute__((__error__ (msg)))
+#else
+# define __warndecl(name, msg) extern void name (void)
+# define __warnattr(msg)
+# define __errordecl(name, msg) extern void name (void)
+#endif
+
+/* Support for flexible arrays.
+ Headers that should use flexible arrays only if they're "real"
+ (e.g. only if they won't affect sizeof()) should test
+ #if __glibc_c99_flexarr_available. */
+#if defined __STDC_VERSION__ && __STDC_VERSION__ >= 199901L && !defined __HP_cc
+# define __flexarr []
+# define __glibc_c99_flexarr_available 1
+#elif __GNUC_PREREQ (2,97)
+/* GCC 2.97 supports C99 flexible array members as an extension,
+ even when in C89 mode or compiling C++ (any version). */
+# define __flexarr []
+# define __glibc_c99_flexarr_available 1
+#elif defined __GNUC__
+/* Pre-2.97 GCC did not support C99 flexible arrays but did have
+ an equivalent extension with slightly different notation. */
+# define __flexarr [0]
+# define __glibc_c99_flexarr_available 1
+#else
+/* Some other non-C99 compiler. Approximate with [1]. */
+# define __flexarr [1]
+# define __glibc_c99_flexarr_available 0
+#endif
+
+
+/* __asm__ ("xyz") is used throughout the headers to rename functions
+ at the assembly language level. This is wrapped by the __REDIRECT
+ macro, in order to support compilers that can do this some other
+ way. When compilers don't support asm-names at all, we have to do
+ preprocessor tricks instead (which don't have exactly the right
+ semantics, but it's the best we can do).
+
+ Example:
+ int __REDIRECT(setpgrp, (__pid_t pid, __pid_t pgrp), setpgid); */
+
+#if defined __GNUC__ && __GNUC__ >= 2
+
+# define __REDIRECT(name, proto, alias) name proto __asm__ (__ASMNAME (#alias))
+# ifdef __cplusplus
+# define __REDIRECT_NTH(name, proto, alias) \
+ name proto __THROW __asm__ (__ASMNAME (#alias))
+# define __REDIRECT_NTHNL(name, proto, alias) \
+ name proto __THROWNL __asm__ (__ASMNAME (#alias))
+# else
+# define __REDIRECT_NTH(name, proto, alias) \
+ name proto __asm__ (__ASMNAME (#alias)) __THROW
+# define __REDIRECT_NTHNL(name, proto, alias) \
+ name proto __asm__ (__ASMNAME (#alias)) __THROWNL
+# endif
+# define __ASMNAME(cname) __ASMNAME2 (__USER_LABEL_PREFIX__, cname)
+# define __ASMNAME2(prefix, cname) __STRING (prefix) cname
+
+/*
+#elif __SOME_OTHER_COMPILER__
+
+# define __REDIRECT(name, proto, alias) name proto; \
+ _Pragma("let " #name " = " #alias)
+*/
+#endif
+
+/* GCC has various useful declarations that can be made with the
+ `__attribute__' syntax. All of the ways we use this do fine if
+ they are omitted for compilers that don't understand it. */
+#if !defined __GNUC__ || __GNUC__ < 2
+# define __attribute__(xyz) /* Ignore */
+#endif
+
+/* At some point during the gcc 2.96 development the `malloc' attribute
+ for functions was introduced. We don't want to use it unconditionally
+ (although this would be possible) since it generates warnings. */
+#if __GNUC_PREREQ (2,96)
+# define __attribute_malloc__ __attribute__ ((__malloc__))
+#else
+# define __attribute_malloc__ /* Ignore */
+#endif
+
+/* Tell the compiler which arguments to an allocation function
+ indicate the size of the allocation. */
+#if __GNUC_PREREQ (4, 3)
+# define __attribute_alloc_size__(params) \
+ __attribute__ ((__alloc_size__ params))
+#else
+# define __attribute_alloc_size__(params) /* Ignore. */
+#endif
+
+/* At some point during the gcc 2.96 development the `pure' attribute
+ for functions was introduced. We don't want to use it unconditionally
+ (although this would be possible) since it generates warnings. */
+#if __GNUC_PREREQ (2,96)
+# define __attribute_pure__ __attribute__ ((__pure__))
+#else
+# define __attribute_pure__ /* Ignore */
+#endif
+
+/* This declaration tells the compiler that the value is constant. */
+#if __GNUC_PREREQ (2,5)
+# define __attribute_const__ __attribute__ ((__const__))
+#else
+# define __attribute_const__ /* Ignore */
+#endif
+
+/* At some point during the gcc 3.1 development the `used' attribute
+ for functions was introduced. We don't want to use it unconditionally
+ (although this would be possible) since it generates warnings. */
+#if __GNUC_PREREQ (3,1)
+# define __attribute_used__ __attribute__ ((__used__))
+# define __attribute_noinline__ __attribute__ ((__noinline__))
+#else
+# define __attribute_used__ __attribute__ ((__unused__))
+# define __attribute_noinline__ /* Ignore */
+#endif
+
+/* Since version 3.2, gcc allows marking deprecated functions. */
+#if __GNUC_PREREQ (3,2)
+# define __attribute_deprecated__ __attribute__ ((__deprecated__))
+#else
+# define __attribute_deprecated__ /* Ignore */
+#endif
+
+/* Since version 4.5, gcc also allows one to specify the message printed
+ when a deprecated function is used. clang claims to be gcc 4.2, but
+ may also support this feature. */
+#if __GNUC_PREREQ (4,5) || \
+ __glibc_clang_has_extension (__attribute_deprecated_with_message__)
+# define __attribute_deprecated_msg__(msg) \
+ __attribute__ ((__deprecated__ (msg)))
+#else
+# define __attribute_deprecated_msg__(msg) __attribute_deprecated__
+#endif
+
+/* At some point during the gcc 2.8 development the `format_arg' attribute
+ for functions was introduced. We don't want to use it unconditionally
+ (although this would be possible) since it generates warnings.
+ If several `format_arg' attributes are given for the same function, in
+ gcc-3.0 and older, all but the last one are ignored. In newer gccs,
+ all designated arguments are considered. */
+#if __GNUC_PREREQ (2,8)
+# define __attribute_format_arg__(x) __attribute__ ((__format_arg__ (x)))
+#else
+# define __attribute_format_arg__(x) /* Ignore */
+#endif
+
+/* At some point during the gcc 2.97 development the `strfmon' format
+ attribute for functions was introduced. We don't want to use it
+ unconditionally (although this would be possible) since it
+ generates warnings. */
+#if __GNUC_PREREQ (2,97)
+# define __attribute_format_strfmon__(a,b) \
+ __attribute__ ((__format__ (__strfmon__, a, b)))
+#else
+# define __attribute_format_strfmon__(a,b) /* Ignore */
+#endif
+
+/* The nonnull function attribute marks pointer parameters that
+ must not be NULL. Do not define __nonnull if it is already defined,
+ for portability when this file is used in Gnulib. */
+#ifndef __nonnull
+# if __GNUC_PREREQ (3,3)
+# define __nonnull(params) __attribute__ ((__nonnull__ params))
+# else
+# define __nonnull(params)
+# endif
+#endif
+
+/* If fortification mode, we warn about unused results of certain
+ function calls which can lead to problems. */
+#if __GNUC_PREREQ (3,4)
+# define __attribute_warn_unused_result__ \
+ __attribute__ ((__warn_unused_result__))
+# if defined __USE_FORTIFY_LEVEL && __USE_FORTIFY_LEVEL > 0
+# define __wur __attribute_warn_unused_result__
+# endif
+#else
+# define __attribute_warn_unused_result__ /* empty */
+#endif
+#ifndef __wur
+# define __wur /* Ignore */
+#endif
+
+/* Forces a function to be always inlined. */
+#if __GNUC_PREREQ (3,2)
+/* The Linux kernel defines __always_inline in stddef.h (283d7573), and
+ it conflicts with this definition. Therefore undefine it first to
+ allow either header to be included first. */
+# undef __always_inline
+# define __always_inline __inline __attribute__ ((__always_inline__))
+#else
+# undef __always_inline
+# define __always_inline __inline
+#endif
+
+/* Associate error messages with the source location of the call site rather
+ than with the source location inside the function. */
+#if __GNUC_PREREQ (4,3)
+# define __attribute_artificial__ __attribute__ ((__artificial__))
+#else
+# define __attribute_artificial__ /* Ignore */
+#endif
+
+/* GCC 4.3 and above with -std=c99 or -std=gnu99 implements ISO C99
+ inline semantics, unless -fgnu89-inline is used. Using __GNUC_STDC_INLINE__
+ or __GNUC_GNU_INLINE is not a good enough check for gcc because gcc versions
+ older than 4.3 may define these macros and still not guarantee GNU inlining
+ semantics.
+
+ clang++ identifies itself as gcc-4.2, but has support for GNU inlining
+ semantics, that can be checked fot by using the __GNUC_STDC_INLINE_ and
+ __GNUC_GNU_INLINE__ macro definitions. */
+#if (!defined __cplusplus || __GNUC_PREREQ (4,3) \
+ || (defined __clang__ && (defined __GNUC_STDC_INLINE__ \
+ || defined __GNUC_GNU_INLINE__)))
+# if defined __GNUC_STDC_INLINE__ || defined __cplusplus
+# define __extern_inline extern __inline __attribute__ ((__gnu_inline__))
+# define __extern_always_inline \
+ extern __always_inline __attribute__ ((__gnu_inline__))
+# else
+# define __extern_inline extern __inline
+# define __extern_always_inline extern __always_inline
+# endif
+#endif
+
+#ifdef __extern_always_inline
+# define __fortify_function __extern_always_inline __attribute_artificial__
+#endif
+
+/* GCC 4.3 and above allow passing all anonymous arguments of an
+ __extern_always_inline function to some other vararg function. */
+#if __GNUC_PREREQ (4,3)
+# define __va_arg_pack() __builtin_va_arg_pack ()
+# define __va_arg_pack_len() __builtin_va_arg_pack_len ()
+#endif
+
+/* It is possible to compile containing GCC extensions even if GCC is
+ run in pedantic mode if the uses are carefully marked using the
+ `__extension__' keyword. But this is not generally available before
+ version 2.8. */
+#if !__GNUC_PREREQ (2,8)
+# define __extension__ /* Ignore */
+#endif
+
+/* __restrict is known in EGCS 1.2 and above. */
+#if !__GNUC_PREREQ (2,92)
+# if defined __STDC_VERSION__ && __STDC_VERSION__ >= 199901L
+# define __restrict restrict
+# else
+# define __restrict /* Ignore */
+# endif
+#endif
+
+/* ISO C99 also allows to declare arrays as non-overlapping. The syntax is
+ array_name[restrict]
+ GCC 3.1 supports this. */
+#if __GNUC_PREREQ (3,1) && !defined __GNUG__
+# define __restrict_arr __restrict
+#else
+# ifdef __GNUC__
+# define __restrict_arr /* Not supported in old GCC. */
+# else
+# if defined __STDC_VERSION__ && __STDC_VERSION__ >= 199901L
+# define __restrict_arr restrict
+# else
+/* Some other non-C99 compiler. */
+# define __restrict_arr /* Not supported. */
+# endif
+# endif
+#endif
+
+#if __GNUC__ >= 3
+# define __glibc_unlikely(cond) __builtin_expect ((cond), 0)
+# define __glibc_likely(cond) __builtin_expect ((cond), 1)
+#else
+# define __glibc_unlikely(cond) (cond)
+# define __glibc_likely(cond) (cond)
+#endif
+
+#ifdef __has_attribute
+# define __glibc_has_attribute(attr) __has_attribute (attr)
+#else
+# define __glibc_has_attribute(attr) 0
+#endif
+
+#if (!defined _Noreturn \
+ && (defined __STDC_VERSION__ ? __STDC_VERSION__ : 0) < 201112 \
+ && !__GNUC_PREREQ (4,7))
+# if __GNUC_PREREQ (2,8)
+# define _Noreturn __attribute__ ((__noreturn__))
+# else
+# define _Noreturn
+# endif
+#endif
+
+#if __GNUC_PREREQ (8, 0)
+/* Describes a char array whose address can safely be passed as the first
+ argument to strncpy and strncat, as the char array is not necessarily
+ a NUL-terminated string. */
+# define __attribute_nonstring__ __attribute__ ((__nonstring__))
+#else
+# define __attribute_nonstring__
+#endif
+
+#if (!defined _Static_assert && !defined __cplusplus \
+ && (defined __STDC_VERSION__ ? __STDC_VERSION__ : 0) < 201112 \
+ && (!__GNUC_PREREQ (4, 6) || defined __STRICT_ANSI__))
+# define _Static_assert(expr, diagnostic) \
+ extern int (*__Static_assert_function (void)) \
+ [!!sizeof (struct { int __error_if_negative: (expr) ? 2 : -1; })]
+#endif
+
+/* The #ifndef lets Gnulib avoid including these on non-glibc
+ platforms, where the includes typically do not exist. */
+#ifndef __WORDSIZE
+# include <bits/wordsize.h>
+# include <bits/long-double.h>
+#endif
+
+#if defined __LONG_DOUBLE_MATH_OPTIONAL && defined __NO_LONG_DOUBLE_MATH
+# define __LDBL_COMPAT 1
+# ifdef __REDIRECT
+# define __LDBL_REDIR1(name, proto, alias) __REDIRECT (name, proto, alias)
+# define __LDBL_REDIR(name, proto) \
+ __LDBL_REDIR1 (name, proto, __nldbl_##name)
+# define __LDBL_REDIR1_NTH(name, proto, alias) __REDIRECT_NTH (name, proto, alias)
+# define __LDBL_REDIR_NTH(name, proto) \
+ __LDBL_REDIR1_NTH (name, proto, __nldbl_##name)
+# define __LDBL_REDIR1_DECL(name, alias) \
+ extern __typeof (name) name __asm (__ASMNAME (#alias));
+# define __LDBL_REDIR_DECL(name) \
+ extern __typeof (name) name __asm (__ASMNAME ("__nldbl_" #name));
+# define __REDIRECT_LDBL(name, proto, alias) \
+ __LDBL_REDIR1 (name, proto, __nldbl_##alias)
+# define __REDIRECT_NTH_LDBL(name, proto, alias) \
+ __LDBL_REDIR1_NTH (name, proto, __nldbl_##alias)
+# endif
+#endif
+#if !defined __LDBL_COMPAT || !defined __REDIRECT
+# define __LDBL_REDIR1(name, proto, alias) name proto
+# define __LDBL_REDIR(name, proto) name proto
+# define __LDBL_REDIR1_NTH(name, proto, alias) name proto __THROW
+# define __LDBL_REDIR_NTH(name, proto) name proto __THROW
+# define __LDBL_REDIR_DECL(name)
+# ifdef __REDIRECT
+# define __REDIRECT_LDBL(name, proto, alias) __REDIRECT (name, proto, alias)
+# define __REDIRECT_NTH_LDBL(name, proto, alias) \
+ __REDIRECT_NTH (name, proto, alias)
+# endif
+#endif
+
+/* __glibc_macro_warning (MESSAGE) issues warning MESSAGE. This is
+ intended for use in preprocessor macros.
+
+ Note: MESSAGE must be a _single_ string; concatenation of string
+ literals is not supported. */
+#if __GNUC_PREREQ (4,8) || __glibc_clang_prereq (3,5)
+# define __glibc_macro_warning1(message) _Pragma (#message)
+# define __glibc_macro_warning(message) \
+ __glibc_macro_warning1 (GCC warning message)
+#else
+# define __glibc_macro_warning(msg)
+#endif
+
+/* Generic selection (ISO C11) is a C-only feature, available in GCC
+ since version 4.9. Previous versions do not provide generic
+ selection, even though they might set __STDC_VERSION__ to 201112L,
+ when in -std=c11 mode. Thus, we must check for !defined __GNUC__
+ when testing __STDC_VERSION__ for generic selection support.
+ On the other hand, Clang also defines __GNUC__, so a clang-specific
+ check is required to enable the use of generic selection. */
+#if !defined __cplusplus \
+ && (__GNUC_PREREQ (4, 9) \
+ || __glibc_clang_has_extension (c_generic_selections) \
+ || (!defined __GNUC__ && defined __STDC_VERSION__ \
+ && __STDC_VERSION__ >= 201112L))
+# define __HAVE_GENERIC_SELECTION 1
+#else
+# define __HAVE_GENERIC_SELECTION 0
+#endif
+
+#endif /* sys/cdefs.h */
diff --git a/lib/config.charset b/lib/config.charset
deleted file mode 100644
index 7101403..0000000
--- a/lib/config.charset
+++ /dev/null
@@ -1,682 +0,0 @@
-#! /bin/sh
-# Output a system dependent table of character encoding aliases.
-#
-# Copyright (C) 2000-2004, 2006-2018 Free Software Foundation, Inc.
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 3, or (at your option)
-# any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License along
-# with this program; if not, see <https://www.gnu.org/licenses/>.
-#
-# The table consists of lines of the form
-# ALIAS CANONICAL
-#
-# ALIAS is the (system dependent) result of "nl_langinfo (CODESET)".
-# ALIAS is compared in a case sensitive way.
-#
-# CANONICAL is the GNU canonical name for this character encoding.
-# It must be an encoding supported by libiconv. Support by GNU libc is
-# also desirable. CANONICAL is case insensitive. Usually an upper case
-# MIME charset name is preferred.
-# The current list of GNU canonical charset names is as follows.
-#
-# name MIME? used by which systems
-# (darwin = Mac OS X, woe32 = native Windows)
-#
-# ASCII, ANSI_X3.4-1968 glibc solaris freebsd netbsd darwin cygwin
-# ISO-8859-1 Y glibc aix hpux irix osf solaris freebsd netbsd openbsd darwin cygwin
-# ISO-8859-2 Y glibc aix hpux irix osf solaris freebsd netbsd openbsd darwin cygwin
-# ISO-8859-3 Y glibc solaris cygwin
-# ISO-8859-4 Y osf solaris freebsd netbsd openbsd darwin
-# ISO-8859-5 Y glibc aix hpux irix osf solaris freebsd netbsd openbsd darwin cygwin
-# ISO-8859-6 Y glibc aix hpux solaris cygwin
-# ISO-8859-7 Y glibc aix hpux irix osf solaris netbsd openbsd darwin cygwin
-# ISO-8859-8 Y glibc aix hpux osf solaris cygwin
-# ISO-8859-9 Y glibc aix hpux irix osf solaris darwin cygwin
-# ISO-8859-13 glibc netbsd openbsd darwin cygwin
-# ISO-8859-14 glibc cygwin
-# ISO-8859-15 glibc aix osf solaris freebsd netbsd openbsd darwin cygwin
-# KOI8-R Y glibc solaris freebsd netbsd openbsd darwin
-# KOI8-U Y glibc freebsd netbsd openbsd darwin cygwin
-# KOI8-T glibc
-# CP437 dos
-# CP775 dos
-# CP850 aix osf dos
-# CP852 dos
-# CP855 dos
-# CP856 aix
-# CP857 dos
-# CP861 dos
-# CP862 dos
-# CP864 dos
-# CP865 dos
-# CP866 freebsd netbsd openbsd darwin dos
-# CP869 dos
-# CP874 woe32 dos
-# CP922 aix
-# CP932 aix cygwin woe32 dos
-# CP943 aix
-# CP949 osf darwin woe32 dos
-# CP950 woe32 dos
-# CP1046 aix
-# CP1124 aix
-# CP1125 dos
-# CP1129 aix
-# CP1131 darwin
-# CP1250 woe32
-# CP1251 glibc solaris netbsd openbsd darwin cygwin woe32
-# CP1252 aix woe32
-# CP1253 woe32
-# CP1254 woe32
-# CP1255 glibc woe32
-# CP1256 woe32
-# CP1257 woe32
-# GB2312 Y glibc aix hpux irix solaris freebsd netbsd darwin
-# EUC-JP Y glibc aix hpux irix osf solaris freebsd netbsd darwin
-# EUC-KR Y glibc aix hpux irix osf solaris freebsd netbsd darwin cygwin
-# EUC-TW glibc aix hpux irix osf solaris netbsd
-# BIG5 Y glibc aix hpux osf solaris freebsd netbsd darwin cygwin
-# BIG5-HKSCS glibc solaris darwin
-# GBK glibc aix osf solaris darwin cygwin woe32 dos
-# GB18030 glibc solaris netbsd darwin
-# SHIFT_JIS Y hpux osf solaris freebsd netbsd darwin
-# JOHAB glibc solaris woe32
-# TIS-620 glibc aix hpux osf solaris cygwin
-# VISCII Y glibc
-# TCVN5712-1 glibc
-# ARMSCII-8 glibc darwin
-# GEORGIAN-PS glibc cygwin
-# PT154 glibc
-# HP-ROMAN8 hpux
-# HP-ARABIC8 hpux
-# HP-GREEK8 hpux
-# HP-HEBREW8 hpux
-# HP-TURKISH8 hpux
-# HP-KANA8 hpux
-# DEC-KANJI osf
-# DEC-HANYU osf
-# UTF-8 Y glibc aix hpux osf solaris netbsd darwin cygwin
-#
-# Note: Names which are not marked as being a MIME name should not be used in
-# Internet protocols for information interchange (mail, news, etc.).
-#
-# Note: ASCII and ANSI_X3.4-1968 are synonymous canonical names. Applications
-# must understand both names and treat them as equivalent.
-#
-# The first argument passed to this file is the canonical host specification,
-# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM
-# or
-# CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM
-
-host="$1"
-os=`echo "$host" | sed -e 's/^[^-]*-[^-]*-\(.*\)$/\1/'`
-echo "# This file contains a table of character encoding aliases,"
-echo "# suitable for operating system '${os}'."
-echo "# It was automatically generated from config.charset."
-# List of references, updated during installation:
-echo "# Packages using this file: "
-case "$os" in
- linux-gnulibc1*)
- # Linux libc5 doesn't have nl_langinfo(CODESET); therefore
- # localcharset.c falls back to using the full locale name
- # from the environment variables.
- echo "C ASCII"
- echo "POSIX ASCII"
- for l in af af_ZA ca ca_ES da da_DK de de_AT de_BE de_CH de_DE de_LU \
- en en_AU en_BW en_CA en_DK en_GB en_IE en_NZ en_US en_ZA \
- en_ZW es es_AR es_BO es_CL es_CO es_DO es_EC es_ES es_GT \
- es_HN es_MX es_PA es_PE es_PY es_SV es_US es_UY es_VE et \
- et_EE eu eu_ES fi fi_FI fo fo_FO fr fr_BE fr_CA fr_CH fr_FR \
- fr_LU ga ga_IE gl gl_ES id id_ID in in_ID is is_IS it it_CH \
- it_IT kl kl_GL nl nl_BE nl_NL no no_NO pt pt_BR pt_PT sv \
- sv_FI sv_SE; do
- echo "$l ISO-8859-1"
- echo "$l.iso-8859-1 ISO-8859-1"
- echo "$l.iso-8859-15 ISO-8859-15"
- echo "$l.iso-8859-15@euro ISO-8859-15"
- echo "$l@euro ISO-8859-15"
- echo "$l.cp-437 CP437"
- echo "$l.cp-850 CP850"
- echo "$l.cp-1252 CP1252"
- echo "$l.cp-1252@euro CP1252"
- #echo "$l.atari-st ATARI-ST" # not a commonly used encoding
- echo "$l.utf-8 UTF-8"
- echo "$l.utf-8@euro UTF-8"
- done
- for l in cs cs_CZ hr hr_HR hu hu_HU pl pl_PL ro ro_RO sk sk_SK sl \
- sl_SI sr sr_CS sr_YU; do
- echo "$l ISO-8859-2"
- echo "$l.iso-8859-2 ISO-8859-2"
- echo "$l.cp-852 CP852"
- echo "$l.cp-1250 CP1250"
- echo "$l.utf-8 UTF-8"
- done
- for l in mk mk_MK ru ru_RU; do
- echo "$l ISO-8859-5"
- echo "$l.iso-8859-5 ISO-8859-5"
- echo "$l.koi8-r KOI8-R"
- echo "$l.cp-866 CP866"
- echo "$l.cp-1251 CP1251"
- echo "$l.utf-8 UTF-8"
- done
- for l in ar ar_SA; do
- echo "$l ISO-8859-6"
- echo "$l.iso-8859-6 ISO-8859-6"
- echo "$l.cp-864 CP864"
- #echo "$l.cp-868 CP868" # not a commonly used encoding
- echo "$l.cp-1256 CP1256"
- echo "$l.utf-8 UTF-8"
- done
- for l in el el_GR gr gr_GR; do
- echo "$l ISO-8859-7"
- echo "$l.iso-8859-7 ISO-8859-7"
- echo "$l.cp-869 CP869"
- echo "$l.cp-1253 CP1253"
- echo "$l.cp-1253@euro CP1253"
- echo "$l.utf-8 UTF-8"
- echo "$l.utf-8@euro UTF-8"
- done
- for l in he he_IL iw iw_IL; do
- echo "$l ISO-8859-8"
- echo "$l.iso-8859-8 ISO-8859-8"
- echo "$l.cp-862 CP862"
- echo "$l.cp-1255 CP1255"
- echo "$l.utf-8 UTF-8"
- done
- for l in tr tr_TR; do
- echo "$l ISO-8859-9"
- echo "$l.iso-8859-9 ISO-8859-9"
- echo "$l.cp-857 CP857"
- echo "$l.cp-1254 CP1254"
- echo "$l.utf-8 UTF-8"
- done
- for l in lt lt_LT lv lv_LV; do
- #echo "$l BALTIC" # not a commonly used encoding, wrong encoding name
- echo "$l ISO-8859-13"
- done
- for l in ru_UA uk uk_UA; do
- echo "$l KOI8-U"
- done
- for l in zh zh_CN; do
- #echo "$l GB_2312-80" # not a commonly used encoding, wrong encoding name
- echo "$l GB2312"
- done
- for l in ja ja_JP ja_JP.EUC; do
- echo "$l EUC-JP"
- done
- for l in ko ko_KR; do
- echo "$l EUC-KR"
- done
- for l in th th_TH; do
- echo "$l TIS-620"
- done
- for l in fa fa_IR; do
- #echo "$l ISIRI-3342" # a broken encoding
- echo "$l.utf-8 UTF-8"
- done
- ;;
- linux* | *-gnu*)
- # With glibc-2.1 or newer, we don't need any canonicalization,
- # because glibc has iconv and both glibc and libiconv support all
- # GNU canonical names directly. Therefore, the Makefile does not
- # need to install the alias file at all.
- # The following applies only to glibc-2.0.x and older libcs.
- echo "ISO_646.IRV:1983 ASCII"
- ;;
- aix*)
- echo "ISO8859-1 ISO-8859-1"
- echo "ISO8859-2 ISO-8859-2"
- echo "ISO8859-5 ISO-8859-5"
- echo "ISO8859-6 ISO-8859-6"
- echo "ISO8859-7 ISO-8859-7"
- echo "ISO8859-8 ISO-8859-8"
- echo "ISO8859-9 ISO-8859-9"
- echo "ISO8859-15 ISO-8859-15"
- echo "IBM-850 CP850"
- echo "IBM-856 CP856"
- echo "IBM-921 ISO-8859-13"
- echo "IBM-922 CP922"
- echo "IBM-932 CP932"
- echo "IBM-943 CP943"
- echo "IBM-1046 CP1046"
- echo "IBM-1124 CP1124"
- echo "IBM-1129 CP1129"
- echo "IBM-1252 CP1252"
- echo "IBM-eucCN GB2312"
- echo "IBM-eucJP EUC-JP"
- echo "IBM-eucKR EUC-KR"
- echo "IBM-eucTW EUC-TW"
- echo "big5 BIG5"
- echo "GBK GBK"
- echo "TIS-620 TIS-620"
- echo "UTF-8 UTF-8"
- ;;
- hpux*)
- echo "iso88591 ISO-8859-1"
- echo "iso88592 ISO-8859-2"
- echo "iso88595 ISO-8859-5"
- echo "iso88596 ISO-8859-6"
- echo "iso88597 ISO-8859-7"
- echo "iso88598 ISO-8859-8"
- echo "iso88599 ISO-8859-9"
- echo "iso885915 ISO-8859-15"
- echo "roman8 HP-ROMAN8"
- echo "arabic8 HP-ARABIC8"
- echo "greek8 HP-GREEK8"
- echo "hebrew8 HP-HEBREW8"
- echo "turkish8 HP-TURKISH8"
- echo "kana8 HP-KANA8"
- echo "tis620 TIS-620"
- echo "big5 BIG5"
- echo "eucJP EUC-JP"
- echo "eucKR EUC-KR"
- echo "eucTW EUC-TW"
- echo "hp15CN GB2312"
- #echo "ccdc ?" # what is this?
- echo "SJIS SHIFT_JIS"
- echo "utf8 UTF-8"
- ;;
- irix*)
- echo "ISO8859-1 ISO-8859-1"
- echo "ISO8859-2 ISO-8859-2"
- echo "ISO8859-5 ISO-8859-5"
- echo "ISO8859-7 ISO-8859-7"
- echo "ISO8859-9 ISO-8859-9"
- echo "eucCN GB2312"
- echo "eucJP EUC-JP"
- echo "eucKR EUC-KR"
- echo "eucTW EUC-TW"
- ;;
- osf*)
- echo "ISO8859-1 ISO-8859-1"
- echo "ISO8859-2 ISO-8859-2"
- echo "ISO8859-4 ISO-8859-4"
- echo "ISO8859-5 ISO-8859-5"
- echo "ISO8859-7 ISO-8859-7"
- echo "ISO8859-8 ISO-8859-8"
- echo "ISO8859-9 ISO-8859-9"
- echo "ISO8859-15 ISO-8859-15"
- echo "cp850 CP850"
- echo "big5 BIG5"
- echo "dechanyu DEC-HANYU"
- echo "dechanzi GB2312"
- echo "deckanji DEC-KANJI"
- echo "deckorean EUC-KR"
- echo "eucJP EUC-JP"
- echo "eucKR EUC-KR"
- echo "eucTW EUC-TW"
- echo "GBK GBK"
- echo "KSC5601 CP949"
- echo "sdeckanji EUC-JP"
- echo "SJIS SHIFT_JIS"
- echo "TACTIS TIS-620"
- echo "UTF-8 UTF-8"
- ;;
- solaris*)
- echo "646 ASCII"
- echo "ISO8859-1 ISO-8859-1"
- echo "ISO8859-2 ISO-8859-2"
- echo "ISO8859-3 ISO-8859-3"
- echo "ISO8859-4 ISO-8859-4"
- echo "ISO8859-5 ISO-8859-5"
- echo "ISO8859-6 ISO-8859-6"
- echo "ISO8859-7 ISO-8859-7"
- echo "ISO8859-8 ISO-8859-8"
- echo "ISO8859-9 ISO-8859-9"
- echo "ISO8859-15 ISO-8859-15"
- echo "koi8-r KOI8-R"
- echo "ansi-1251 CP1251"
- echo "BIG5 BIG5"
- echo "Big5-HKSCS BIG5-HKSCS"
- echo "gb2312 GB2312"
- echo "GBK GBK"
- echo "GB18030 GB18030"
- echo "cns11643 EUC-TW"
- echo "5601 EUC-KR"
- echo "ko_KR.johap92 JOHAB"
- echo "eucJP EUC-JP"
- echo "PCK SHIFT_JIS"
- echo "TIS620.2533 TIS-620"
- #echo "sun_eu_greek ?" # what is this?
- echo "UTF-8 UTF-8"
- ;;
- 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.
- echo "C ASCII"
- echo "US-ASCII ASCII"
- for l in la_LN lt_LN; do
- echo "$l.ASCII ASCII"
- done
- for l in da_DK de_AT de_CH de_DE en_AU en_CA en_GB en_US es_ES \
- fi_FI fr_BE fr_CA fr_CH fr_FR is_IS it_CH it_IT la_LN \
- lt_LN nl_BE nl_NL no_NO pt_PT sv_SE; do
- echo "$l.ISO_8859-1 ISO-8859-1"
- echo "$l.DIS_8859-15 ISO-8859-15"
- done
- for l in cs_CZ hr_HR hu_HU la_LN lt_LN pl_PL sl_SI; do
- echo "$l.ISO_8859-2 ISO-8859-2"
- done
- for l in la_LN lt_LT; do
- echo "$l.ISO_8859-4 ISO-8859-4"
- done
- for l in ru_RU ru_SU; do
- echo "$l.KOI8-R KOI8-R"
- echo "$l.ISO_8859-5 ISO-8859-5"
- echo "$l.CP866 CP866"
- done
- echo "uk_UA.KOI8-U KOI8-U"
- echo "zh_TW.BIG5 BIG5"
- echo "zh_TW.Big5 BIG5"
- echo "zh_CN.EUC GB2312"
- echo "ja_JP.EUC EUC-JP"
- echo "ja_JP.SJIS SHIFT_JIS"
- echo "ja_JP.Shift_JIS SHIFT_JIS"
- echo "ko_KR.EUC EUC-KR"
- ;;
- netbsd*)
- echo "646 ASCII"
- echo "ISO8859-1 ISO-8859-1"
- echo "ISO8859-2 ISO-8859-2"
- echo "ISO8859-4 ISO-8859-4"
- echo "ISO8859-5 ISO-8859-5"
- echo "ISO8859-7 ISO-8859-7"
- echo "ISO8859-13 ISO-8859-13"
- echo "ISO8859-15 ISO-8859-15"
- echo "eucCN GB2312"
- echo "eucJP EUC-JP"
- echo "eucKR EUC-KR"
- echo "eucTW EUC-TW"
- echo "BIG5 BIG5"
- echo "SJIS SHIFT_JIS"
- ;;
- openbsd*)
- echo "646 ASCII"
- echo "ISO8859-1 ISO-8859-1"
- echo "ISO8859-2 ISO-8859-2"
- echo "ISO8859-4 ISO-8859-4"
- echo "ISO8859-5 ISO-8859-5"
- echo "ISO8859-7 ISO-8859-7"
- echo "ISO8859-13 ISO-8859-13"
- echo "ISO8859-15 ISO-8859-15"
- ;;
- darwin[56]*)
- # Darwin 6.8 doesn't have nl_langinfo(CODESET); therefore
- # localcharset.c falls back to using the full locale name
- # from the environment variables.
- echo "C ASCII"
- for l in en_AU en_CA en_GB en_US la_LN; do
- echo "$l.US-ASCII ASCII"
- done
- for l in da_DK de_AT de_CH de_DE en_AU en_CA en_GB en_US es_ES \
- fi_FI fr_BE fr_CA fr_CH fr_FR is_IS it_CH it_IT nl_BE \
- nl_NL no_NO pt_PT sv_SE; do
- echo "$l ISO-8859-1"
- echo "$l.ISO8859-1 ISO-8859-1"
- echo "$l.ISO8859-15 ISO-8859-15"
- done
- for l in la_LN; do
- echo "$l.ISO8859-1 ISO-8859-1"
- echo "$l.ISO8859-15 ISO-8859-15"
- done
- for l in cs_CZ hr_HR hu_HU la_LN pl_PL sl_SI; do
- echo "$l.ISO8859-2 ISO-8859-2"
- done
- for l in la_LN lt_LT; do
- echo "$l.ISO8859-4 ISO-8859-4"
- done
- for l in ru_RU; do
- echo "$l.KOI8-R KOI8-R"
- echo "$l.ISO8859-5 ISO-8859-5"
- echo "$l.CP866 CP866"
- done
- for l in bg_BG; do
- echo "$l.CP1251 CP1251"
- done
- echo "uk_UA.KOI8-U KOI8-U"
- echo "zh_TW.BIG5 BIG5"
- echo "zh_TW.Big5 BIG5"
- echo "zh_CN.EUC GB2312"
- echo "ja_JP.EUC EUC-JP"
- echo "ja_JP.SJIS SHIFT_JIS"
- echo "ko_KR.EUC EUC-KR"
- ;;
- darwin*)
- # Darwin 7.5 has nl_langinfo(CODESET), but sometimes its value is
- # useless:
- # - It returns the empty string when LANG is set to a locale of the
- # form ll_CC, although ll_CC/LC_CTYPE is a symlink to an UTF-8
- # LC_CTYPE file.
- # - The environment variables LANG, LC_CTYPE, LC_ALL are not set by
- # the system; nl_langinfo(CODESET) returns "US-ASCII" in this case.
- # - The documentation says:
- # "... all code that calls BSD system routines should ensure
- # that the const *char parameters of these routines are in UTF-8
- # encoding. All BSD system functions expect their string
- # parameters to be in UTF-8 encoding and nothing else."
- # It also says
- # "An additional caveat is that string parameters for files,
- # paths, and other file-system entities must be in canonical
- # UTF-8. In a canonical UTF-8 Unicode string, all decomposable
- # characters are decomposed ..."
- # but this is not true: You can pass non-decomposed UTF-8 strings
- # to file system functions, and it is the OS which will convert
- # them to decomposed UTF-8 before accessing the file system.
- # - The Apple Terminal application displays UTF-8 by default.
- # - However, other applications are free to use different encodings:
- # - xterm uses ISO-8859-1 by default.
- # - TextEdit uses MacRoman by default.
- # We prefer UTF-8 over decomposed UTF-8-MAC because one should
- # minimize the use of decomposed Unicode. Unfortunately, through the
- # Darwin file system, decomposed UTF-8 strings are leaked into user
- # space nevertheless.
- # Then there are also the locales with encodings other than US-ASCII
- # and UTF-8. These locales can be occasionally useful to users (e.g.
- # when grepping through ISO-8859-1 encoded text files), when all their
- # file names are in US-ASCII.
- echo "ISO8859-1 ISO-8859-1"
- echo "ISO8859-2 ISO-8859-2"
- echo "ISO8859-4 ISO-8859-4"
- echo "ISO8859-5 ISO-8859-5"
- echo "ISO8859-7 ISO-8859-7"
- echo "ISO8859-9 ISO-8859-9"
- echo "ISO8859-13 ISO-8859-13"
- echo "ISO8859-15 ISO-8859-15"
- echo "KOI8-R KOI8-R"
- echo "KOI8-U KOI8-U"
- echo "CP866 CP866"
- echo "CP949 CP949"
- echo "CP1131 CP1131"
- echo "CP1251 CP1251"
- echo "eucCN GB2312"
- echo "GB2312 GB2312"
- echo "eucJP EUC-JP"
- echo "eucKR EUC-KR"
- echo "Big5 BIG5"
- echo "Big5HKSCS BIG5-HKSCS"
- echo "GBK GBK"
- echo "GB18030 GB18030"
- echo "SJIS SHIFT_JIS"
- echo "ARMSCII-8 ARMSCII-8"
- echo "PT154 PT154"
- #echo "ISCII-DEV ?"
- echo "* UTF-8"
- ;;
- beos* | haiku*)
- # BeOS and Haiku have a single locale, and it has UTF-8 encoding.
- echo "* UTF-8"
- ;;
- msdosdjgpp*)
- # DJGPP 2.03 doesn't have nl_langinfo(CODESET); therefore
- # localcharset.c falls back to using the full locale name
- # from the environment variables.
- echo "#"
- echo "# The encodings given here may not all be correct."
- echo "# If you find that the encoding given for your language and"
- echo "# country is not the one your DOS machine actually uses, just"
- echo "# correct it in this file, and send a mail to"
- echo "# Juan Manuel Guerrero <juan.guerrero@gmx.de>"
- echo "# and Bruno Haible <bruno@clisp.org>."
- echo "#"
- echo "C ASCII"
- # ISO-8859-1 languages
- echo "ca CP850"
- echo "ca_ES CP850"
- echo "da CP865" # not CP850 ??
- echo "da_DK CP865" # not CP850 ??
- echo "de CP850"
- echo "de_AT CP850"
- echo "de_CH CP850"
- echo "de_DE CP850"
- echo "en CP850"
- echo "en_AU CP850" # not CP437 ??
- echo "en_CA CP850"
- echo "en_GB CP850"
- echo "en_NZ CP437"
- echo "en_US CP437"
- echo "en_ZA CP850" # not CP437 ??
- echo "es CP850"
- echo "es_AR CP850"
- echo "es_BO CP850"
- echo "es_CL CP850"
- echo "es_CO CP850"
- echo "es_CR CP850"
- echo "es_CU CP850"
- echo "es_DO CP850"
- echo "es_EC CP850"
- echo "es_ES CP850"
- echo "es_GT CP850"
- echo "es_HN CP850"
- echo "es_MX CP850"
- echo "es_NI CP850"
- echo "es_PA CP850"
- echo "es_PY CP850"
- echo "es_PE CP850"
- echo "es_SV CP850"
- echo "es_UY CP850"
- echo "es_VE CP850"
- echo "et CP850"
- echo "et_EE CP850"
- echo "eu CP850"
- echo "eu_ES CP850"
- echo "fi CP850"
- echo "fi_FI CP850"
- echo "fr CP850"
- echo "fr_BE CP850"
- echo "fr_CA CP850"
- echo "fr_CH CP850"
- echo "fr_FR CP850"
- echo "ga CP850"
- echo "ga_IE CP850"
- echo "gd CP850"
- echo "gd_GB CP850"
- echo "gl CP850"
- echo "gl_ES CP850"
- echo "id CP850" # not CP437 ??
- echo "id_ID CP850" # not CP437 ??
- echo "is CP861" # not CP850 ??
- echo "is_IS CP861" # not CP850 ??
- echo "it CP850"
- echo "it_CH CP850"
- echo "it_IT CP850"
- echo "lt CP775"
- echo "lt_LT CP775"
- echo "lv CP775"
- echo "lv_LV CP775"
- echo "nb CP865" # not CP850 ??
- echo "nb_NO CP865" # not CP850 ??
- echo "nl CP850"
- echo "nl_BE CP850"
- echo "nl_NL CP850"
- echo "nn CP865" # not CP850 ??
- echo "nn_NO CP865" # not CP850 ??
- echo "no CP865" # not CP850 ??
- echo "no_NO CP865" # not CP850 ??
- echo "pt CP850"
- echo "pt_BR CP850"
- echo "pt_PT CP850"
- echo "sv CP850"
- echo "sv_SE CP850"
- # ISO-8859-2 languages
- echo "cs CP852"
- echo "cs_CZ CP852"
- echo "hr CP852"
- echo "hr_HR CP852"
- echo "hu CP852"
- echo "hu_HU CP852"
- echo "pl CP852"
- echo "pl_PL CP852"
- echo "ro CP852"
- echo "ro_RO CP852"
- echo "sk CP852"
- echo "sk_SK CP852"
- echo "sl CP852"
- echo "sl_SI CP852"
- echo "sq CP852"
- echo "sq_AL CP852"
- echo "sr CP852" # CP852 or CP866 or CP855 ??
- echo "sr_CS CP852" # CP852 or CP866 or CP855 ??
- echo "sr_YU CP852" # CP852 or CP866 or CP855 ??
- # ISO-8859-3 languages
- echo "mt CP850"
- echo "mt_MT CP850"
- # ISO-8859-5 languages
- echo "be CP866"
- echo "be_BE CP866"
- echo "bg CP866" # not CP855 ??
- echo "bg_BG CP866" # not CP855 ??
- echo "mk CP866" # not CP855 ??
- echo "mk_MK CP866" # not CP855 ??
- echo "ru CP866"
- echo "ru_RU CP866"
- echo "uk CP1125"
- echo "uk_UA CP1125"
- # ISO-8859-6 languages
- echo "ar CP864"
- echo "ar_AE CP864"
- echo "ar_DZ CP864"
- echo "ar_EG CP864"
- echo "ar_IQ CP864"
- echo "ar_IR CP864"
- echo "ar_JO CP864"
- echo "ar_KW CP864"
- echo "ar_MA CP864"
- echo "ar_OM CP864"
- echo "ar_QA CP864"
- echo "ar_SA CP864"
- echo "ar_SY CP864"
- # ISO-8859-7 languages
- echo "el CP869"
- echo "el_GR CP869"
- # ISO-8859-8 languages
- echo "he CP862"
- echo "he_IL CP862"
- # ISO-8859-9 languages
- echo "tr CP857"
- echo "tr_TR CP857"
- # Japanese
- echo "ja CP932"
- echo "ja_JP CP932"
- # Chinese
- echo "zh_CN GBK"
- echo "zh_TW CP950" # not CP938 ??
- # Korean
- echo "kr CP949" # not CP934 ??
- echo "kr_KR CP949" # not CP934 ??
- # Thai
- echo "th CP874"
- echo "th_TH CP874"
- # Other
- echo "eo CP850"
- echo "eo_EO CP850"
- ;;
-esac
diff --git a/lib/dfa.c b/lib/dfa.c
index 0b694e1..c9be5e8 100644
--- a/lib/dfa.c
+++ b/lib/dfa.c
@@ -227,43 +227,20 @@ enum
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. */
+ a transition on END. This is -1, not some
+ more-negative value, to tweak the speed of
+ comparisons to END. */
/* Ordinary character values are terminal symbols that match themselves. */
+ /* CSET must come last in the following list of special tokens. Otherwise,
+ the list order matters only for performance. Related special tokens
+ should have nearby values so that code like (t == ANYCHAR || t == MBCSET
+ || CSET <= t) can be done with a single machine-level comparison. */
+
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. */
@@ -293,16 +270,49 @@ enum
RPAREN, /* RPAREN never appears in the parse tree. */
+ WCHAR, /* Only returned by lex. wctok contains
+ the wide character representation. */
+
ANYCHAR, /* ANYCHAR is a terminal symbol that matches
a valid multibyte (or single byte) character.
It is used only if MB_CUR_MAX > 1. */
+ BEG, /* BEG is an initial symbol that matches the
+ beginning of input. */
+
+ 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. */
+
+ 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. */
+
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. */
@@ -327,13 +337,6 @@ typedef struct
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. */
@@ -510,6 +513,12 @@ struct dfa
string matching, but anchored to the
beginning of the buffer. */
+ /* Fields filled by dfaanalyze. */
+ int *constraints; /* Array of union of accepting constraints
+ in the follow of a position. */
+ int *separates; /* Array of contexts on follow of a
+ position. */
+
/* Fields filled by dfaexec. */
state_num tralloc; /* Number of transition tables that have
slots so far, not counting trans[-1] and
@@ -630,9 +639,9 @@ mbs_to_wchar (wint_t *pwc, char const *s, size_t n, struct dfa *d)
static void
prtok (token t)
{
- if (t < 0)
+ if (t <= END)
fprintf (stderr, "END");
- else if (t < NOTCHAR)
+ else if (0 <= t && t < NOTCHAR)
{
unsigned int ch = t;
fprintf (stderr, "0x%02x", ch);
@@ -642,6 +651,9 @@ prtok (token t)
char const *s;
switch (t)
{
+ case BEG:
+ s = "BEG";
+ break;
case EMPTY:
s = "EMPTY";
break;
@@ -780,7 +792,7 @@ emptyset (charclass const *s)
static void *
xpalloc (void *pa, ptrdiff_t *nitems, ptrdiff_t nitems_incr_min,
- ptrdiff_t nitems_max, ptrdiff_t item_size)
+ ptrdiff_t nitems_max, ptrdiff_t item_size)
{
ptrdiff_t n0 = *nitems;
@@ -814,8 +826,8 @@ xpalloc (void *pa, ptrdiff_t *nitems, ptrdiff_t nitems_incr_min,
*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)))
+ || (0 <= nitems_max && nitems_max < n)
+ || INT_MULTIPLY_WRAPV (n, item_size, &nbytes)))
xalloc_die ();
pa = xrealloc (pa, nbytes);
*nitems = n;
@@ -1797,7 +1809,30 @@ add_utf8_anychar (struct dfa *dfa)
static void
atom (struct dfa *dfa)
{
- if (dfa->parse.tok == WCHAR)
+ if ((0 <= dfa->parse.tok && dfa->parse.tok < NOTCHAR)
+ || dfa->parse.tok >= CSET
+ || dfa->parse.tok == BEG || dfa->parse.tok == BACKREF
+ || dfa->parse.tok == BEGLINE || dfa->parse.tok == ENDLINE
+ || dfa->parse.tok == BEGWORD || dfa->parse.tok == ENDWORD
+ || dfa->parse.tok == LIMWORD || dfa->parse.tok == NOTLIMWORD
+ || dfa->parse.tok == ANYCHAR || dfa->parse.tok == MBCSET)
+ {
+ 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);
+ }
+ else
+ addtok (dfa, dfa->parse.tok);
+ dfa->parse.tok = lex (dfa);
+ }
+ else if (dfa->parse.tok == WCHAR)
{
if (dfa->lex.wctok == WEOF)
addtok (dfa, BACKREF);
@@ -1820,28 +1855,6 @@ atom (struct dfa *dfa)
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);
@@ -1967,6 +1980,9 @@ dfaparse (char const *s, size_t len, struct dfa *d)
if (!d->syntax.syntax_bits_set)
dfaerror (_("no syntax specified"));
+ if (!d->nregexps)
+ addtok (d, BEG);
+
d->parse.tok = lex (d);
d->parse.depth = d->depth;
@@ -2021,7 +2037,7 @@ insert (position p, position_set *s)
while (lo < hi)
{
ptrdiff_t mid = (lo + hi) >> 1;
- if (s->elems[mid].index > p.index)
+ if (s->elems[mid].index < p.index)
lo = mid + 1;
else if (s->elems[mid].index == p.index)
{
@@ -2039,6 +2055,14 @@ insert (position p, position_set *s)
++s->nelem;
}
+static void
+append (position p, position_set *s)
+{
+ ptrdiff_t count = s->nelem;
+ s->elems = maybe_realloc (s->elems, count, &s->alloc, -1, sizeof *s->elems);
+ s->elems[s->nelem++] = p;
+}
+
/* 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. */
@@ -2057,7 +2081,7 @@ merge_constrained (position_set const *s1, position_set const *s2,
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))
+ || (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)
@@ -2085,6 +2109,21 @@ merge (position_set const *s1, position_set const *s2, position_set *m)
merge_constrained (s1, s2, -1, m);
}
+static void
+merge2 (position_set *dst, position_set const *src, position_set *m)
+{
+ if (src->nelem < 4)
+ {
+ for (ptrdiff_t i = 0; i < src->nelem; ++i)
+ insert (src->elems[i], dst);
+ }
+ else
+ {
+ merge (src, dst, m);
+ copy (m, dst);
+ }
+}
+
/* 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
@@ -2095,7 +2134,7 @@ delete (size_t del, position_set *s)
while (lo < hi)
{
size_t mid = (lo + hi) >> 1;
- if (s->elems[mid].index > del)
+ if (s->elems[mid].index < del)
lo = mid + 1;
else if (s->elems[mid].index == del)
{
@@ -2179,8 +2218,9 @@ state_index (struct dfa *d, position_set const *s, int context)
for (state_num j = 0; j < s->nelem; j++)
{
- int c = s->elems[j].constraint;
- if (d->tokens[s->elems[j].index] < 0)
+ int c = d->constraints[s->elems[j].index];
+
+ if (c != 0)
{
if (succeeds_in_context (c, context, CTX_ANY))
constraint |= c;
@@ -2216,7 +2256,7 @@ state_index (struct dfa *d, position_set const *s, int context)
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)
+epsclosure (struct dfa const *d)
{
position_set tmp;
alloc_position_set (&tmp, d->nleaves);
@@ -2256,8 +2296,6 @@ epsclosure (position_set *initial, struct dfa const *d)
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);
}
free (tmp.elems);
}
@@ -2290,21 +2328,228 @@ charclass_context (struct dfa const *dfa, charclass const *c)
in the complement set will have the same follow set. */
static int _GL_ATTRIBUTE_PURE
-state_separate_contexts (position_set const *s)
+state_separate_contexts (struct dfa *d, position_set const *s)
{
int separate_contexts = 0;
for (size_t j = 0; j < s->nelem; j++)
+ separate_contexts |= d->separates[s->elems[j].index];
+
+ return separate_contexts;
+}
+
+enum
+{
+ /* Single token is repeated. It is distinguished from non-repeated. */
+ OPT_REPEAT = (1 << 0),
+
+ /* Multiple tokens are repeated. This flag is on at head of tokens. The
+ node is not merged. */
+ OPT_LPAREN = (1 << 1),
+
+ /* Multiple branches are joined. The node is not merged. */
+ OPT_RPAREN = (1 << 2),
+
+ /* The node is walked. If the node is found in walking again, OPT_RPAREN
+ flag is turned on. */
+ OPT_WALKED = (1 << 3),
+
+ /* The node is queued. The node is not queued again. */
+ OPT_QUEUED = (1 << 4)
+};
+
+static void
+merge_nfa_state (struct dfa *d, size_t tindex, char *flags,
+ position_set *merged)
+{
+ position_set *follows = d->follows;
+ ptrdiff_t nelem = 0;
+
+ d->constraints[tindex] = 0;
+
+ for (ptrdiff_t i = 0; i < follows[tindex].nelem; i++)
{
- if (prev_newline_dependent (s->elems[j].constraint))
- separate_contexts |= CTX_NEWLINE;
- if (prev_letter_dependent (s->elems[j].constraint))
- separate_contexts |= CTX_LETTER;
+ size_t sindex = follows[tindex].elems[i].index;
+
+ /* Skip the node as pruned in future. */
+ unsigned int iconstraint = follows[tindex].elems[i].constraint;
+ if (iconstraint == 0)
+ continue;
+
+ if (d->tokens[follows[tindex].elems[i].index] <= END)
+ {
+ d->constraints[tindex] |= follows[tindex].elems[i].constraint;
+ continue;
+ }
+
+ if (!(flags[sindex] & (OPT_LPAREN | OPT_RPAREN)))
+ {
+ ptrdiff_t j;
+
+ for (j = 0; j < nelem; j++)
+ {
+ size_t dindex = follows[tindex].elems[j].index;
+
+ if (follows[tindex].elems[j].constraint != iconstraint)
+ continue;
+
+ if (flags[dindex] & (OPT_LPAREN | OPT_RPAREN))
+ continue;
+
+ if (d->tokens[sindex] != d->tokens[dindex])
+ continue;
+
+ if ((flags[sindex] ^ flags[dindex]) & OPT_REPEAT)
+ continue;
+
+ if (flags[sindex] & OPT_REPEAT)
+ delete (sindex, &follows[sindex]);
+
+ merge2 (&follows[dindex], &follows[sindex], merged);
+
+ break;
+ }
+
+ if (j < nelem)
+ continue;
+ }
+
+ follows[tindex].elems[nelem++] = follows[tindex].elems[i];
+ flags[sindex] |= OPT_QUEUED;
}
- return separate_contexts;
+ follows[tindex].nelem = nelem;
+}
+
+static int
+compare (const void *a, const void *b)
+{
+ int aindex;
+ int bindex;
+
+ aindex = (int) ((position *) a)->index;
+ bindex = (int) ((position *) b)->index;
+
+ return aindex - bindex;
}
+static void
+reorder_tokens (struct dfa *d)
+{
+ ptrdiff_t nleaves;
+ ptrdiff_t *map;
+ token *tokens;
+ position_set *follows;
+ int *constraints;
+ char *multibyte_prop;
+
+ nleaves = 0;
+
+ map = xnmalloc (d->tindex, sizeof *map);
+
+ map[0] = nleaves++;
+
+ for (ptrdiff_t i = 1; i < d->tindex; i++)
+ map[i] = -1;
+
+ tokens = xnmalloc (d->nleaves, sizeof *tokens);
+ follows = xnmalloc (d->nleaves, sizeof *follows);
+ constraints = xnmalloc (d->nleaves, sizeof *constraints);
+
+ if (d->localeinfo.multibyte)
+ multibyte_prop = xnmalloc (d->nleaves, sizeof *multibyte_prop);
+ else
+ multibyte_prop = NULL;
+
+ for (ptrdiff_t i = 0; i < d->tindex; i++)
+ {
+ if (map[i] == -1)
+ {
+ free (d->follows[i].elems);
+ d->follows[i].elems = NULL;
+ d->follows[i].nelem = 0;
+ continue;
+ }
+
+ tokens[map[i]] = d->tokens[i];
+ follows[map[i]] = d->follows[i];
+ constraints[map[i]] = d->constraints[i];
+
+ if (multibyte_prop != NULL)
+ multibyte_prop[map[i]] = d->multibyte_prop[i];
+
+ for (ptrdiff_t j = 0; j < d->follows[i].nelem; j++)
+ {
+ if (map[d->follows[i].elems[j].index] == -1)
+ map[d->follows[i].elems[j].index] = nleaves++;
+
+ d->follows[i].elems[j].index = map[d->follows[i].elems[j].index];
+ }
+
+ qsort (d->follows[i].elems, d->follows[i].nelem,
+ sizeof *d->follows[i].elems, compare);
+ }
+
+ for (ptrdiff_t i = 0; i < nleaves; i++)
+ {
+ d->tokens[i] = tokens[i];
+ d->follows[i] = follows[i];
+ d->constraints[i] = constraints[i];
+
+ if (multibyte_prop != NULL)
+ d->multibyte_prop[i] = multibyte_prop[i];
+ }
+
+ d->tindex = d->nleaves = nleaves;
+
+ free (tokens);
+ free (follows);
+ free (constraints);
+ free (multibyte_prop);
+ free (map);
+}
+
+static void
+dfaoptimize (struct dfa *d)
+{
+ char *flags;
+ position_set merged0;
+ position_set *merged;
+
+ flags = xmalloc (d->tindex * sizeof *flags);
+ memset (flags, 0, d->tindex * sizeof *flags);
+
+ for (size_t i = 0; i < d->tindex; i++)
+ {
+ for (ptrdiff_t j = 0; j < d->follows[i].nelem; j++)
+ {
+ if (d->follows[i].elems[j].index == i)
+ flags[d->follows[i].elems[j].index] |= OPT_REPEAT;
+ else if (d->follows[i].elems[j].index < i)
+ flags[d->follows[i].elems[j].index] |= OPT_LPAREN;
+ else if (flags[d->follows[i].elems[j].index] &= OPT_WALKED)
+ flags[d->follows[i].elems[j].index] |= OPT_RPAREN;
+ else
+ flags[d->follows[i].elems[j].index] |= OPT_WALKED;
+ }
+ }
+
+ flags[0] |= OPT_QUEUED;
+
+ merged = &merged0;
+ alloc_position_set (merged, d->nleaves);
+
+ d->constraints = xnmalloc (d->tindex, sizeof *d->constraints);
+
+ for (ptrdiff_t i = 0; i < d->tindex; i++)
+ if (flags[i] & OPT_QUEUED)
+ merge_nfa_state (d, i, flags, merged);
+
+ reorder_tokens (d);
+
+ free (merged->elems);
+ free (flags);
+}
/* Perform bottom-up analysis on the parse tree, computing various functions.
Note that at this point, we're pretending constructs like \< are real
@@ -2364,8 +2609,10 @@ 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 *firstpos = posalloc;
position *lastpos = firstpos + d->nleaves;
+ position pos;
+ position_set tmp;
/* Stack for element counts and nullable flags. */
struct
@@ -2380,6 +2627,8 @@ dfaanalyze (struct dfa *d, bool searchflag)
position_set merged; /* Result of merging sets. */
+ addtok (d, CAT);
+
#ifdef DEBUG
fprintf (stderr, "dfaanalyze:\n");
for (size_t i = 0; i < d->tindex; ++i)
@@ -2412,14 +2661,13 @@ dfaanalyze (struct dfa *d, bool searchflag)
/* Every element in the firstpos of the argument is in the follow
of every element in the lastpos. */
{
- position_set tmp;
+ tmp.elems = firstpos - stk[-1].nfirstpos;
tmp.nelem = stk[-1].nfirstpos;
- tmp.elems = firstpos;
- position *pos = lastpos;
+ position *p = lastpos - stk[-1].nlastpos;
for (size_t j = 0; j < stk[-1].nlastpos; j++)
{
- merge (&tmp, &d->follows[pos[j].index], &merged);
- copy (&merged, &d->follows[pos[j].index]);
+ merge (&tmp, &d->follows[p[j].index], &merged);
+ copy (&merged, &d->follows[p[j].index]);
}
}
FALLTHROUGH;
@@ -2433,14 +2681,13 @@ dfaanalyze (struct dfa *d, bool searchflag)
/* Every element in the firstpos of the second argument is in the
follow of every element in the lastpos of the first argument. */
{
- position_set tmp;
tmp.nelem = stk[-1].nfirstpos;
- tmp.elems = firstpos;
- position *pos = lastpos + stk[-1].nlastpos;
+ tmp.elems = firstpos - stk[-1].nfirstpos;
+ position *p = lastpos - stk[-1].nlastpos - stk[-2].nlastpos;
for (size_t j = 0; j < stk[-2].nlastpos; j++)
{
- merge (&tmp, &d->follows[pos[j].index], &merged);
- copy (&merged, &d->follows[pos[j].index]);
+ merge (&tmp, &d->follows[p[j].index], &merged);
+ copy (&merged, &d->follows[p[j].index]);
}
}
@@ -2449,7 +2696,7 @@ dfaanalyze (struct dfa *d, bool searchflag)
if (stk[-2].nullable)
stk[-2].nfirstpos += stk[-1].nfirstpos;
else
- firstpos += stk[-1].nfirstpos;
+ 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. */
@@ -2457,10 +2704,10 @@ dfaanalyze (struct dfa *d, bool searchflag)
stk[-2].nlastpos += stk[-1].nlastpos;
else
{
- position *pos = lastpos + stk[-2].nlastpos;
- for (size_t j = stk[-1].nlastpos; j-- > 0;)
- pos[j] = lastpos[j];
- lastpos += stk[-2].nlastpos;
+ position *p = lastpos - stk[-1].nlastpos - stk[-2].nlastpos;
+ for (size_t j = 0; j < stk[-1].nlastpos; j++)
+ p[j] = p[j + stk[-2].nlastpos];
+ lastpos -= stk[-2].nlastpos;
stk[-2].nlastpos = stk[-1].nlastpos;
}
@@ -2493,9 +2740,9 @@ dfaanalyze (struct dfa *d, bool searchflag)
stk->nfirstpos = stk->nlastpos = 1;
stk++;
- --firstpos, --lastpos;
firstpos->index = lastpos->index = i;
firstpos->constraint = lastpos->constraint = NO_CONSTRAINT;
+ firstpos++, lastpos++;
break;
}
@@ -2507,31 +2754,37 @@ dfaanalyze (struct dfa *d, bool searchflag)
fprintf (stderr,
stk[-1].nullable ? " nullable: yes\n" : " nullable: no\n");
fprintf (stderr, " firstpos:");
- for (size_t j = stk[-1].nfirstpos; j-- > 0;)
+ for (size_t j = 0; j < stk[-1].nfirstpos; j++)
{
- fprintf (stderr, " %zu:", firstpos[j].index);
- prtok (d->tokens[firstpos[j].index]);
+ fprintf (stderr, " %zu:", firstpos[j - stk[-1].nfirstpos].index);
+ prtok (d->tokens[firstpos[j - stk[-1].nfirstpos].index]);
}
fprintf (stderr, "\n lastpos:");
- for (size_t j = stk[-1].nlastpos; j-- > 0;)
+ for (size_t j = 0; j < stk[-1].nlastpos; j++)
{
- fprintf (stderr, " %zu:", lastpos[j].index);
- prtok (d->tokens[lastpos[j].index]);
+ fprintf (stderr, " %zu:", lastpos[j - stk[-1].nlastpos].index);
+ prtok (d->tokens[lastpos[j - stk[-1].nlastpos].index]);
}
putc ('\n', stderr);
#endif
}
+ /* For each follow set that is the follow set of a real position, replace
+ it with its epsilon closure. */
+ epsclosure (d);
+
+ dfaoptimize (d);
+
#ifdef DEBUG
for (size_t 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)
+ if (d->tokens[i] == BEG || 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 (size_t j = d->follows[i].nelem; j-- > 0;)
+ for (size_t j = 0; j < d->follows[i].nelem; j++)
{
fprintf (stderr, " %zu:", d->follows[i].elems[j].index);
prtok (d->tokens[d->follows[i].elems[j].index]);
@@ -2540,32 +2793,50 @@ dfaanalyze (struct dfa *d, bool searchflag)
}
#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 (size_t i = 0; i < stk[-1].nfirstpos; ++i)
- insert (firstpos[i], &merged);
+ pos.index = 0;
+ pos.constraint = NO_CONSTRAINT;
- /* For each follow set that is the follow set of a real position, replace
- it with its epsilon closure. */
- epsclosure (&merged, d);
+ alloc_position_set (&tmp, 1);
+
+ append (pos, &tmp);
+
+ d->separates = xnmalloc (d->tindex, sizeof *d->separates);
+
+ for (ptrdiff_t i = 0; i < d->tindex; i++)
+ {
+ d->separates[i] = 0;
+
+ if (prev_newline_dependent (d->constraints[i]))
+ d->separates[i] |= CTX_NEWLINE;
+ if (prev_letter_dependent (d->constraints[i]))
+ d->separates[i] |= CTX_LETTER;
+
+ for (ptrdiff_t j = 0; j < d->follows[i].nelem; j++)
+ {
+ if (prev_newline_dependent (d->follows[i].elems[j].constraint))
+ d->separates[i] |= CTX_NEWLINE;
+ if (prev_letter_dependent (d->follows[i].elems[j].constraint))
+ d->separates[i] |= CTX_LETTER;
+ }
+ }
/* Context wanted by some position. */
- int separate_contexts = state_separate_contexts (&merged);
+ int separate_contexts = state_separate_contexts (d, &tmp);
/* Build the initial state. */
if (separate_contexts & CTX_NEWLINE)
- state_index (d, &merged, CTX_NEWLINE);
+ state_index (d, &tmp, CTX_NEWLINE);
d->initstate_notbol = d->min_trcount
- = state_index (d, &merged, separate_contexts ^ CTX_ANY);
+ = state_index (d, &tmp, separate_contexts ^ CTX_ANY);
if (separate_contexts & CTX_LETTER)
- d->min_trcount = state_index (d, &merged, CTX_LETTER);
+ d->min_trcount = state_index (d, &tmp, CTX_LETTER);
d->min_trcount++;
d->trcount = 0;
free (posalloc);
free (stkalloc);
free (merged.elems);
+ free (tmp.elems);
}
/* Make sure D's state arrays are large enough to hold NEW_STATE. */
@@ -2639,7 +2910,9 @@ realloc_trans_if_necessary (struct dfa *d)
static state_num
build_state (state_num s, struct dfa *d, unsigned char uc)
{
- position_set follows; /* Union of the follows of the group. */
+ position_set follows; /* Union of the follows for each
+ position of the current state. */
+ position_set group; /* Positions that match the input char. */
position_set tmp; /* Temporary space for merging sets. */
state_num state; /* New state. */
state_num state_newline; /* New state on a newline transition. */
@@ -2688,19 +2961,27 @@ build_state (state_num s, struct dfa *d, unsigned char uc)
if (accepts_in_context (d->states[s].context, CTX_NONE, s, d))
d->success[s] |= CTX_NONE;
+ alloc_position_set (&follows, d->nleaves);
+
+ /* Find the union of the follows of the positions of the group.
+ This is a hideously inefficient loop. Fix it someday. */
+ for (size_t j = 0; j < d->states[s].elems.nelem; ++j)
+ for (size_t k = 0;
+ k < d->follows[d->states[s].elems.elems[j].index].nelem; ++k)
+ insert (d->follows[d->states[s].elems.elems[j].index].elems[k],
+ &follows);
+
/* Positions that match the input char. */
- leaf_set group;
- group.elems = xnmalloc (d->nleaves, sizeof *group.elems);
- group.nelem = 0;
+ alloc_position_set (&group, d->nleaves);
/* The group's label. */
charclass label;
fillset (&label);
- for (size_t i = 0; i < d->states[s].elems.nelem; ++i)
+ for (size_t i = 0; i < follows.nelem; ++i)
{
charclass matches; /* Set of matching characters. */
- position pos = d->states[s].elems.elems[i];
+ position pos = follows.elems[i];
bool matched = false;
if (d->tokens[pos.index] >= 0 && d->tokens[pos.index] < NOTCHAR)
{
@@ -2731,10 +3012,8 @@ build_state (state_num s, struct dfa *d, unsigned char uc)
CTX_NONE))
{
if (d->states[s].mbps.nelem == 0)
- alloc_position_set (&d->states[s].mbps,
- d->follows[pos.index].nelem);
- for (size_t j = 0; j < d->follows[pos.index].nelem; j++)
- insert (d->follows[pos.index].elems[j], &d->states[s].mbps);
+ alloc_position_set (&d->states[s].mbps, 1);
+ insert (pos, &d->states[s].mbps);
}
}
else
@@ -2782,7 +3061,7 @@ build_state (state_num s, struct dfa *d, unsigned char uc)
{
for (size_t k = 0; k < CHARCLASS_WORDS; ++k)
label.w[k] &= matches.w[k];
- group.elems[group.nelem++] = pos.index;
+ append (pos, &group);
}
else
{
@@ -2791,19 +3070,10 @@ build_state (state_num s, struct dfa *d, unsigned char uc)
}
}
- alloc_position_set (&follows, d->nleaves);
alloc_position_set (&tmp, d->nleaves);
if (group.nelem > 0)
{
- 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 (size_t j = 0; j < group.nelem; ++j)
- for (size_t 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)
@@ -2829,13 +3099,13 @@ build_state (state_num s, struct dfa *d, unsigned char uc)
if (!mergeit)
{
mergeit = true;
- for (size_t j = 0; mergeit && j < follows.nelem; j++)
- mergeit &= d->multibyte_prop[follows.elems[j].index];
+ for (size_t j = 0; mergeit && j < group.nelem; j++)
+ mergeit &= d->multibyte_prop[group.elems[j].index];
}
if (mergeit)
{
- merge (&d->states[0].elems, &follows, &tmp);
- copy (&tmp, &follows);
+ merge (&d->states[0].elems, &group, &tmp);
+ copy (&tmp, &group);
}
}
@@ -2843,19 +3113,19 @@ build_state (state_num s, struct dfa *d, unsigned char uc)
by calculating possible contexts that the group can match,
and separate contexts that the new state wants to know. */
int possible_contexts = charclass_context (d, &label);
- int separate_contexts = state_separate_contexts (&follows);
+ int separate_contexts = state_separate_contexts (d, &group);
/* 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);
+ state = state_index (d, &group, separate_contexts ^ CTX_ANY);
else
state = -1;
if (separate_contexts & possible_contexts & CTX_NEWLINE)
- state_newline = state_index (d, &follows, CTX_NEWLINE);
+ state_newline = state_index (d, &group, CTX_NEWLINE);
else
state_newline = state;
if (separate_contexts & possible_contexts & CTX_LETTER)
- state_letter = state_index (d, &follows, CTX_LETTER);
+ state_letter = state_index (d, &group, CTX_LETTER);
else
state_letter = state;
@@ -3019,7 +3289,7 @@ transit_state (struct dfa *d, state_num s, unsigned char const **pp,
else
merge (&d->states[s1].mbps, &d->states[s].elems, &d->mb_follows);
- int separate_contexts = state_separate_contexts (&d->mb_follows);
+ int separate_contexts = state_separate_contexts (d, &d->mb_follows);
state_num s2 = state_index (d, &d->mb_follows, separate_contexts ^ CTX_ANY);
realloc_trans_if_necessary (d);
@@ -3347,8 +3617,10 @@ dfa_supported (struct dfa const *d)
return true;
}
+/* Disable use of the superset DFA if it is not likely to help
+ performance. */
static void
-dfaoptimize (struct dfa *d)
+maybe_disable_superset_dfa (struct dfa *d)
{
if (!d->localeinfo.using_utf8)
return;
@@ -3398,6 +3670,8 @@ dfassbuild (struct dfa *d)
sup->superset = NULL;
sup->states = NULL;
sup->sindex = 0;
+ sup->constraints = NULL;
+ sup->separates = NULL;
sup->follows = NULL;
sup->tralloc = 0;
sup->trans = NULL;
@@ -3476,7 +3750,7 @@ dfacomp (char const *s, size_t len, struct dfa *d, bool searchflag)
if (dfa_supported (d))
{
- dfaoptimize (d);
+ maybe_disable_superset_dfa (d);
dfaanalyze (d, searchflag);
}
else
@@ -3501,6 +3775,9 @@ dfafree (struct dfa *d)
if (d->localeinfo.multibyte)
free_mbdata (d);
+ free (d->constraints);
+ free (d->separates);
+
for (size_t i = 0; i < d->sindex; ++i)
{
free (d->states[i].elems.elems);
@@ -3530,7 +3807,10 @@ dfafree (struct dfa *d)
}
if (d->superset)
- dfafree (d->superset);
+ {
+ dfafree (d->superset);
+ free (d->superset);
+ }
}
/* Having found the postfix representation of the regular expression,
@@ -3780,7 +4060,7 @@ dfamust (struct dfa const *d)
bool need_endline = false;
bool case_fold_unibyte = d->syntax.case_fold && MB_CUR_MAX == 1;
- for (size_t ri = 0; ri < d->tindex; ++ri)
+ for (size_t ri = 1; ri + 1 < d->tindex; ri++)
{
token t = d->tokens[ri];
switch (t)
diff --git a/lib/dfa.h b/lib/dfa.h
index 4cf0331..fea815d 100644
--- a/lib/dfa.h
+++ b/lib/dfa.h
@@ -22,12 +22,6 @@
#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
diff --git a/lib/dirname.h b/lib/dirname.h
index 69aeb86..8b51111 100644
--- a/lib/dirname.h
+++ b/lib/dirname.h
@@ -36,7 +36,7 @@ extern "C" {
#endif
# if GNULIB_DIRNAME
-char *base_name (char const *file);
+char *base_name (char const *file) _GL_ATTRIBUTE_MALLOC;
char *dir_name (char const *file);
# endif
diff --git a/lib/dosname.h b/lib/dosname.h
index 66486d5..fef3b6d 100644
--- a/lib/dosname.h
+++ b/lib/dosname.h
@@ -20,9 +20,8 @@
#ifndef _DOSNAME_H
#define _DOSNAME_H
-#if (defined _WIN32 || defined __WIN32__ || \
- defined __MSDOS__ || defined __CYGWIN__ || \
- defined __EMX__ || defined __DJGPP__)
+#if (defined _WIN32 || defined __CYGWIN__ \
+ || defined __EMX__ || defined __MSDOS__ || defined __DJGPP__)
/* This internal macro assumes ASCII, but all hosts that support drive
letters use ASCII. */
# define _IS_DRIVE_LETTER(C) (((unsigned int) (C) | ('a' - 'A')) - 'a' \
diff --git a/lib/errno.in.h b/lib/errno.in.h
index 8d2f307..b95c4e9 100644
--- a/lib/errno.in.h
+++ b/lib/errno.in.h
@@ -30,7 +30,7 @@
/* On native Windows platforms, many macros are not defined. */
-# if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
+# if defined _WIN32 && ! defined __CYGWIN__
/* These are the same values as defined by MSVC 10, for interoperability. */
@@ -248,7 +248,7 @@
interoperability. */
# define EOWNERDEAD 58
# define ENOTRECOVERABLE 59
-# elif (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
+# elif defined _WIN32 && ! defined __CYGWIN__
/* We have a conflict here: pthreads-win32 defines these values
differently than MSVC 10. It's hairy to decide which one to use. */
# if defined __MINGW32__ && !defined USE_WINDOWS_THREADS
diff --git a/lib/error.c b/lib/error.c
index 81788c7..adc8733 100644
--- a/lib/error.c
+++ b/lib/error.c
@@ -93,7 +93,7 @@ extern void __error_at_line (int status, int errnum, const char *file_name,
# include <fcntl.h>
# include <unistd.h>
-# if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
+# if defined _WIN32 && ! defined __CYGWIN__
/* Get declarations of the native Windows API functions. */
# define WIN32_LEAN_AND_MEAN
# include <windows.h>
@@ -131,7 +131,7 @@ int strerror_r (int errnum, char *buf, size_t buflen);
static int
is_open (int fd)
{
-# if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
+# if 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.
There is no fcntl, and the gnulib replacement fcntl does not support
diff --git a/lib/fcntl.in.h b/lib/fcntl.in.h
index 719a54d..a1e7d35 100644
--- a/lib/fcntl.in.h
+++ b/lib/fcntl.in.h
@@ -68,7 +68,7 @@
/* Native Windows platforms declare open(), creat() in <io.h>. */
#if (@GNULIB_OPEN@ || defined GNULIB_POSIXCHECK) \
- && ((defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__)
+ && (defined _WIN32 && ! defined __CYGWIN__)
# include <io.h>
#endif
diff --git a/lib/filename.h b/lib/filename.h
index a8127e8..a7ad7e7 100644
--- a/lib/filename.h
+++ b/lib/filename.h
@@ -28,7 +28,7 @@ extern "C" {
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__
+#if defined _WIN32 || defined __CYGWIN__ || defined __EMX__ || defined __DJGPP__
/* Native Windows, Cygwin, OS/2, DOS */
# define ISSLASH(C) ((C) == '/' || (C) == '\\')
# define HAS_DEVICE(P) \
diff --git a/lib/fpending.c b/lib/fpending.c
index 7bc235d..de370d4 100644
--- a/lib/fpending.c
+++ b/lib/fpending.c
@@ -24,6 +24,9 @@
#include "stdio-impl.h"
+/* This file is not used on systems that already have the __fpending function,
+ namely glibc >= 2.2, Solaris >= 7, Android API >= 23. */
+
/* Return the number of pending (aka buffered, unflushed)
bytes on the stream, FP, that is open for writing. */
size_t
diff --git a/lib/fstat.c b/lib/fstat.c
index c143d46..41ee761 100644
--- a/lib/fstat.c
+++ b/lib/fstat.c
@@ -25,7 +25,7 @@
#include <sys/stat.h>
#undef __need_system_sys_stat_h
-#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
+#if defined _WIN32 && ! defined __CYGWIN__
# define WINDOWS_NATIVE
#endif
diff --git a/lib/fwriting.c b/lib/fwriting.c
index 9be6fb2..4ffa12d 100644
--- a/lib/fwriting.c
+++ b/lib/fwriting.c
@@ -21,6 +21,9 @@
#include "stdio-impl.h"
+/* This file is not used on systems that have the __fwritable function,
+ namely glibc >= 2.2, Solaris >= 7, Android API >= 29, musl libc. */
+
bool
fwriting (FILE *fp)
{
diff --git a/lib/fwriting.h b/lib/fwriting.h
index f2a6c5e..42f7e94 100644
--- a/lib/fwriting.h
+++ b/lib/fwriting.h
@@ -33,7 +33,7 @@
STREAM must not be wide-character oriented. */
-#if HAVE___FWRITING /* glibc >= 2.2, Solaris >= 7, musl libc */
+#if HAVE___FWRITING /* glibc >= 2.2, Solaris >= 7, Android API >= 29, musl libc */
# include <stdio_ext.h>
# define fwriting(stream) (__fwriting (stream) != 0)
diff --git a/lib/get-permissions.c b/lib/get-permissions.c
index bb1af5d..3b98451 100644
--- a/lib/get-permissions.c
+++ b/lib/get-permissions.c
@@ -31,16 +31,16 @@
int
get_permissions (const char *name, int desc, mode_t mode,
- struct permission_context *ctx)
+ 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 */
+ /* Linux, FreeBSD, Mac OS X, IRIX, Tru64, Cygwin >= 2.5 */
# if !HAVE_ACL_TYPE_EXTENDED
- /* Linux, FreeBSD, IRIX, Tru64 */
+ /* Linux, FreeBSD, IRIX, Tru64, Cygwin >= 2.5 */
if (HAVE_ACL_GET_FD && desc != -1)
ctx->acl = acl_get_fd (desc);
@@ -57,16 +57,16 @@ get_permissions (const char *name, int desc, mode_t mode,
{
ctx->default_acl = acl_get_file (name, ACL_TYPE_DEFAULT);
if (ctx->default_acl == NULL)
- return -1;
+ return -1;
}
-# if HAVE_ACL_TYPE_NFS4 /* FreeBSD */
+# if HAVE_ACL_TYPE_NFS4 /* FreeBSD */
/* TODO (see set_permissions). */
-# endif
+# endif
-# else /* HAVE_ACL_TYPE_EXTENDED */
+# else /* HAVE_ACL_TYPE_EXTENDED */
/* Mac OS X */
/* On Mac OS X, acl_get_file (name, ACL_TYPE_ACCESS)
@@ -115,16 +115,16 @@ get_permissions (const char *name, int desc, mode_t mode,
int ret;
if (desc != -1)
- ret = facl (desc, ACE_GETACLCNT, 0, NULL);
+ ret = facl (desc, ACE_GETACLCNT, 0, NULL);
else
- ret = acl (name, ACE_GETACLCNT, 0, NULL);
+ ret = acl (name, ACE_GETACLCNT, 0, NULL);
if (ret < 0)
- {
- if (errno == ENOSYS || errno == EINVAL)
- ret = 0;
- else
- return -1;
- }
+ {
+ if (errno == ENOSYS || errno == EINVAL)
+ ret = 0;
+ else
+ return -1;
+ }
ctx->ace_count = ret;
if (ctx->ace_count == 0)
@@ -138,15 +138,15 @@ get_permissions (const char *name, int desc, mode_t mode,
}
if (desc != -1)
- ret = facl (desc, ACE_GETACL, ctx->ace_count, ctx->ace_entries);
+ ret = facl (desc, ACE_GETACL, ctx->ace_count, ctx->ace_entries);
else
- ret = acl (name, ACE_GETACL, ctx->ace_count, ctx->ace_entries);
+ 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;
+ free (ctx->ace_entries);
+ ctx->ace_entries = NULL;
ctx->ace_count = 0;
break;
}
@@ -154,10 +154,10 @@ get_permissions (const char *name, int desc, mode_t mode,
return -1;
}
if (ret <= ctx->ace_count)
- {
- ctx->ace_count = ret;
- break;
- }
+ {
+ ctx->ace_count = ret;
+ break;
+ }
/* Huh? The number of ACL entries has increased since the last call.
Repeat. */
free (ctx->ace_entries);
@@ -170,20 +170,20 @@ get_permissions (const char *name, int desc, mode_t mode,
int ret;
if (desc != -1)
- ret = facl (desc, GETACLCNT, 0, NULL);
+ ret = facl (desc, GETACLCNT, 0, NULL);
else
- ret = acl (name, GETACLCNT, 0, NULL);
+ ret = acl (name, GETACLCNT, 0, NULL);
if (ret < 0)
- {
- if (errno == ENOSYS || errno == ENOTSUP || errno == EOPNOTSUPP)
- ret = 0;
- else
- return -1;
- }
+ {
+ if (errno == ENOSYS || errno == ENOTSUP || errno == EOPNOTSUPP)
+ ret = 0;
+ else
+ return -1;
+ }
ctx->count = ret;
if (ctx->count == 0)
- break;
+ break;
ctx->entries = (aclent_t *) malloc (ctx->count * sizeof (aclent_t));
if (ctx->entries == NULL)
@@ -193,26 +193,26 @@ get_permissions (const char *name, int desc, mode_t mode,
}
if (desc != -1)
- ret = facl (desc, GETACL, ctx->count, ctx->entries);
+ ret = facl (desc, GETACL, ctx->count, ctx->entries);
else
- ret = acl (name, GETACL, ctx->count, ctx->entries);
+ 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 (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;
- }
+ {
+ ctx->count = ret;
+ break;
+ }
/* Huh? The number of ACL entries has increased since the last call.
Repeat. */
free (ctx->entries);
diff --git a/lib/getdelim.c b/lib/getdelim.c
index 09b362e..cc1e9fe 100644
--- a/lib/getdelim.c
+++ b/lib/getdelim.c
@@ -50,7 +50,7 @@
static void
alloc_failed (void)
{
-#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
+#if defined _WIN32 && ! defined __CYGWIN__
/* Avoid errno problem without using the realloc module; see:
https://lists.gnu.org/r/bug-gnulib/2016-08/msg00025.html */
errno = ENOMEM;
diff --git a/lib/getopt.c b/lib/getopt.c
index 55375cc..11e36ee 100644
--- a/lib/getopt.c
+++ b/lib/getopt.c
@@ -46,7 +46,7 @@
/* When used standalone, flockfile and funlockfile might not be
available. */
# if (!defined _POSIX_THREAD_SAFE_FUNCTIONS \
- || ((defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__))
+ || (defined _WIN32 && ! defined __CYGWIN__))
# define flockfile(fp) /* nop */
# define funlockfile(fp) /* nop */
# endif
diff --git a/lib/getprogname.c b/lib/getprogname.c
index c824b47..58da144 100644
--- a/lib/getprogname.c
+++ b/lib/getprogname.c
@@ -110,9 +110,73 @@ getprogname (void)
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 (pstat_getproc (&status, sizeof status, 0, pid) > 0)
+ {
+ char *ucomm = status.pst_ucomm;
+ char *cmd = status.pst_cmd;
+ if (strlen (ucomm) < PST_UCOMMLEN - 1)
+ p = ucomm;
+ else
+ {
+ /* ucomm is truncated to length PST_UCOMMLEN - 1.
+ Look at cmd instead. */
+ char *space = strchr (cmd, ' ');
+ if (space != NULL)
+ *space = '\0';
+ p = strrchr (cmd, '/');
+ if (p != NULL)
+ p++;
+ else
+ p = cmd;
+ if (strlen (p) > PST_UCOMMLEN - 1
+ && memcmp (p, ucomm, PST_UCOMMLEN - 1) == 0)
+ /* p is less truncated than ucomm. */
+ ;
+ else
+ p = ucomm;
+ }
+ p = strdup (p);
+ }
+ else
+ {
+# if !defined __LP64__
+ /* Support for 32-bit programs running in 64-bit HP-UX.
+ The documented way to do this is to use the same source code
+ as above, but in a compilation unit where '#define _PSTAT64 1'
+ is in effect. I prefer a single compilation unit; the struct
+ size and the offsets are not going to change. */
+ char status64[1216];
+ if (__pstat_getproc64 (status64, sizeof status64, 0, pid) > 0)
+ {
+ char *ucomm = status64 + 288;
+ char *cmd = status64 + 168;
+ if (strlen (ucomm) < PST_UCOMMLEN - 1)
+ p = ucomm;
+ else
+ {
+ /* ucomm is truncated to length PST_UCOMMLEN - 1.
+ Look at cmd instead. */
+ char *space = strchr (cmd, ' ');
+ if (space != NULL)
+ *space = '\0';
+ p = strrchr (cmd, '/');
+ if (p != NULL)
+ p++;
+ else
+ p = cmd;
+ if (strlen (p) > PST_UCOMMLEN - 1
+ && memcmp (p, ucomm, PST_UCOMMLEN - 1) == 0)
+ /* p is less truncated than ucomm. */
+ ;
+ else
+ p = ucomm;
+ }
+ p = strdup (p);
+ }
+ else
+# endif
+ p = NULL;
+ }
if (!p)
p = "?";
}
diff --git a/lib/gettext.h b/lib/gettext.h
index f2d7458..8eef008 100644
--- a/lib/gettext.h
+++ b/lib/gettext.h
@@ -185,7 +185,7 @@ npgettext_aux (const char *domain,
#include <string.h>
#if (((__GNUC__ >= 3 || __GNUG__ >= 2) && !defined __STRICT_ANSI__) \
- /* || __STDC_VERSION__ == 199901L
+ /* || (__STDC_VERSION__ == 199901L && !defined __HP_cc)
|| (__STDC_VERSION__ >= 201112L && !defined __STDC_NO_VLA__) */ )
# define _LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS 1
#else
diff --git a/lib/gettimeofday.c b/lib/gettimeofday.c
index 3957565..1bd50fa 100644
--- a/lib/gettimeofday.c
+++ b/lib/gettimeofday.c
@@ -24,7 +24,7 @@
#include <time.h>
-#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
+#if defined _WIN32 && ! defined __CYGWIN__
# define WINDOWS_NATIVE
# include <windows.h>
#endif
@@ -33,6 +33,10 @@
#ifdef WINDOWS_NATIVE
+/* Avoid warnings from gcc -Wcast-function-type. */
+# define GetProcAddress \
+ (void *) GetProcAddress
+
/* GetSystemTimePreciseAsFileTime was introduced only in Windows 8. */
typedef void (WINAPI * GetSystemTimePreciseAsFileTimeFuncType) (FILETIME *lpTime);
static GetSystemTimePreciseAsFileTimeFuncType GetSystemTimePreciseAsFileTimeFunc = NULL;
@@ -45,7 +49,7 @@ initialize (void)
if (kernel32 != NULL)
{
GetSystemTimePreciseAsFileTimeFunc =
- (GetSystemTimePreciseAsFileTimeFuncType) GetProcAddress (kernel32, "GetSystemTimePreciseAsFileTime");
+ (GetSystemTimePreciseAsFileTimeFuncType) GetProcAddress (kernel32, "GetSystemTimePreciseAsFileTime");
}
initialized = TRUE;
}
diff --git a/lib/glthread/lock.h b/lib/glthread/lock.h
index fcc3f3a..30aa730 100644
--- a/lib/glthread/lock.h
+++ b/lib/glthread/lock.h
@@ -149,18 +149,14 @@ extern int glthread_in_use (void);
# endif
# if !PTHREAD_IN_USE_DETECTION_HARD
- /* On most platforms, pthread_cancel or pthread_kill can be used to
- determine whether libpthread is in use.
- On newer versions of FreeBSD, however, this is no longer possible,
- because pthread_cancel and pthread_kill got added to libc. Therefore
- use pthread_create to test whether libpthread is in use. */
-# if defined __FreeBSD__ || defined __DragonFly__ /* FreeBSD */
-# pragma weak pthread_create
-# define pthread_in_use() (pthread_create != NULL)
-# else /* glibc, NetBSD, OpenBSD, IRIX, OSF/1, Solaris */
-# pragma weak pthread_cancel
-# define pthread_in_use() (pthread_cancel != NULL)
-# endif
+ /* Considering all platforms with USE_POSIX_THREADS_WEAK, only few symbols
+ can be used to determine whether libpthread is in use. These are:
+ pthread_mutexattr_gettype
+ pthread_rwlockattr_destroy
+ pthread_rwlockattr_init
+ */
+# pragma weak pthread_mutexattr_gettype
+# define pthread_in_use() (pthread_mutexattr_gettype != NULL)
# endif
# else
diff --git a/lib/gnulib.mk b/lib/gnulib.mk
index 9a44ba0..bedc672 100644
--- a/lib/gnulib.mk
+++ b/lib/gnulib.mk
@@ -21,7 +21,65 @@
# 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
+# 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 \
+# --makefile-name=gnulib.mk \
+# --no-conditional-dependencies \
+# --no-libtool \
+# --macro-prefix=gl \
+# --avoid=lock-tests \
+# acl \
+# alloca \
+# binary-io \
+# 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 \
+# xalloc
MOSTLYCLEANFILES += lib/core lib/*.stackdump
@@ -107,6 +165,12 @@ EXTRA_DIST += $(top_srcdir)/build-aux/announce-gen
## end gnulib module announce-gen
+## begin gnulib module binary-io
+
+lib_libsed_a_SOURCES += lib/binary-io.h lib/binary-io.c
+
+## end gnulib module binary-io
+
## begin gnulib module btowc
@@ -160,51 +224,6 @@ 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+ 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 $@
-
-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
@@ -404,7 +423,7 @@ BUILT_SOURCES += $(GETOPT_H) $(GETOPT_CDEFS_H)
# We need the following in order to create <getopt.h> when the system
# doesn't have one that works with the given compiler.
-lib/getopt.h: lib/getopt.in.h $(top_builddir)/config.status
+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' \
@@ -564,6 +583,13 @@ EXTRA_DIST += lib/langinfo.in.h
## end gnulib module langinfo
+## begin gnulib module libc-config
+
+
+EXTRA_DIST += lib/cdefs.h lib/libc-config.h
+
+## end gnulib module libc-config
+
## begin gnulib module limits-h
BUILT_SOURCES += $(LIMITS_H)
@@ -594,75 +620,9 @@ EXTRA_DIST += lib/limits.in.h
## begin gnulib module localcharset
-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
-# 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
-
-charset_alias = $(DESTDIR)$(libdir)/charset.alias
-charset_tmp = $(DESTDIR)$(libdir)/charset.tmp
-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 $@
+lib_libsed_a_SOURCES += lib/localcharset.c
-CLEANFILES += lib/charset.alias lib/ref-add.sed lib/ref-del.sed
-
-EXTRA_DIST += lib/config.charset lib/ref-add.sin lib/ref-del.sin
+EXTRA_DIST += lib/localcharset.h
## end gnulib module localcharset
@@ -683,11 +643,16 @@ lib/locale.h: lib/locale.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_N
-e 's/@''GNULIB_LOCALECONV''@/$(GNULIB_LOCALECONV)/g' \
-e 's/@''GNULIB_SETLOCALE''@/$(GNULIB_SETLOCALE)/g' \
-e 's/@''GNULIB_DUPLOCALE''@/$(GNULIB_DUPLOCALE)/g' \
+ -e 's/@''GNULIB_LOCALENAME''@/$(GNULIB_LOCALENAME)/g' \
+ -e 's|@''HAVE_NEWLOCALE''@|$(HAVE_NEWLOCALE)|g' \
-e 's|@''HAVE_DUPLOCALE''@|$(HAVE_DUPLOCALE)|g' \
+ -e 's|@''HAVE_FREELOCALE''@|$(HAVE_FREELOCALE)|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_NEWLOCALE''@|$(REPLACE_NEWLOCALE)|g' \
-e 's|@''REPLACE_DUPLOCALE''@|$(REPLACE_DUPLOCALE)|g' \
+ -e 's|@''REPLACE_FREELOCALE''@|$(REPLACE_FREELOCALE)|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)' \
@@ -817,6 +782,15 @@ lib_libsed_a_SOURCES += lib/minmax.h
## end gnulib module minmax
+## begin gnulib module mkdir
+
+
+EXTRA_DIST += lib/mkdir.c
+
+EXTRA_lib_libsed_a_SOURCES += lib/mkdir.c
+
+## end gnulib module mkdir
+
## begin gnulib module mkostemp
@@ -1846,6 +1820,7 @@ lib/unistd.h: lib/unistd.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_N
-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_GETPASS''@/$(GNULIB_GETPASS)/g' \
-e 's/@''GNULIB_GETUSERSHELL''@/$(GNULIB_GETUSERSHELL)/g' \
-e 's/@''GNULIB_GROUP_MEMBER''@/$(GNULIB_GROUP_MEMBER)/g' \
-e 's/@''GNULIB_ISATTY''@/$(GNULIB_ISATTY)/g' \
@@ -1889,6 +1864,7 @@ lib/unistd.h: lib/unistd.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_N
-e 's|@''HAVE_GETGROUPS''@|$(HAVE_GETGROUPS)|g' \
-e 's|@''HAVE_GETHOSTNAME''@|$(HAVE_GETHOSTNAME)|g' \
-e 's|@''HAVE_GETPAGESIZE''@|$(HAVE_GETPAGESIZE)|g' \
+ -e 's|@''HAVE_GETPASS''@|$(HAVE_GETPASS)|g' \
-e 's|@''HAVE_GROUP_MEMBER''@|$(HAVE_GROUP_MEMBER)|g' \
-e 's|@''HAVE_LCHOWN''@|$(HAVE_LCHOWN)|g' \
-e 's|@''HAVE_LINK''@|$(HAVE_LINK)|g' \
@@ -1903,7 +1879,6 @@ lib/unistd.h: lib/unistd.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_N
-e 's|@''HAVE_SLEEP''@|$(HAVE_SLEEP)|g' \
-e 's|@''HAVE_SYMLINK''@|$(HAVE_SYMLINK)|g' \
-e 's|@''HAVE_SYMLINKAT''@|$(HAVE_SYMLINKAT)|g' \
- -e 's|@''HAVE_TRUNCATE''@|$(HAVE_TRUNCATE)|g' \
-e 's|@''HAVE_UNLINKAT''@|$(HAVE_UNLINKAT)|g' \
-e 's|@''HAVE_USLEEP''@|$(HAVE_USLEEP)|g' \
-e 's|@''HAVE_DECL_ENVIRON''@|$(HAVE_DECL_ENVIRON)|g' \
@@ -1915,6 +1890,7 @@ lib/unistd.h: lib/unistd.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_N
-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_TRUNCATE''@|$(HAVE_DECL_TRUNCATE)|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' \
@@ -1932,6 +1908,7 @@ lib/unistd.h: lib/unistd.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_N
-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_GETPASS''@|$(REPLACE_GETPASS)|g' \
-e 's|@''REPLACE_ISATTY''@|$(REPLACE_ISATTY)|g' \
-e 's|@''REPLACE_LCHOWN''@|$(REPLACE_LCHOWN)|g' \
-e 's|@''REPLACE_LINK''@|$(REPLACE_LINK)|g' \
diff --git a/lib/intprops.h b/lib/intprops.h
index 15e470c..cdaf658 100644
--- a/lib/intprops.h
+++ b/lib/intprops.h
@@ -22,12 +22,13 @@
#include <limits.h>
-/* Return a value with the common real type of E and V and the value of V. */
-#define _GL_INT_CONVERT(e, v) (0 * (e) + (v))
+/* Return a value with the common real type of E and V and the value of V.
+ Do not evaluate E. */
+#define _GL_INT_CONVERT(e, v) ((1 ? 0 : (e)) + (v))
/* Act like _GL_INT_CONVERT (E, -V) but work around a bug in IRIX 6.5 cc; see
<https://lists.gnu.org/r/bug-gnulib/2011-05/msg00406.html>. */
-#define _GL_INT_NEGATE_CONVERT(e, v) (0 * (e) - (v))
+#define _GL_INT_NEGATE_CONVERT(e, v) ((1 ? 0 : (e)) - (v))
/* The extra casts in the following macros work around compiler bugs,
e.g., in Cray C 5.0.3.0. */
@@ -40,13 +41,14 @@
#define TYPE_SIGNED(t) (! ((t) 0 < (t) -1))
/* Return 1 if the real expression E, after promotion, has a
- signed or floating type. */
+ signed or floating type. Do not evaluate E. */
#define EXPR_SIGNED(e) (_GL_INT_NEGATE_CONVERT (e, 1) < 0)
/* Minimum and maximum values for integer types and expressions. */
/* The width in bits of the integer type or expression T.
+ Do not evaluate T.
Padding bits are not supported; this is checked at compile-time below. */
#define TYPE_WIDTH(t) (sizeof (t) * CHAR_BIT)
@@ -58,7 +60,7 @@
: ((((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. */
+ after integer promotion. E is not evaluated. */
#define _GL_INT_MINIMUM(e) \
(EXPR_SIGNED (e) \
? ~ _GL_SIGNED_INT_MAXIMUM (e) \
@@ -340,8 +342,8 @@
Arguments should be free of side effects. */
#define _GL_BINARY_OP_OVERFLOW(a, b, op_result_overflow) \
op_result_overflow (a, b, \
- _GL_INT_MINIMUM (0 * (b) + (a)), \
- _GL_INT_MAXIMUM (0 * (b) + (a)))
+ _GL_INT_MINIMUM (_GL_INT_CONVERT (a, b)), \
+ _GL_INT_MAXIMUM (_GL_INT_CONVERT (a, b)))
/* 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. */
diff --git a/lib/libc-config.h b/lib/libc-config.h
new file mode 100644
index 0000000..d7b4093
--- /dev/null
+++ b/lib/libc-config.h
@@ -0,0 +1,174 @@
+/* System definitions for code taken from the GNU C Library
+
+ Copyright 2017-2018 Free Software Foundation, Inc.
+
+ This program is free software; you can redistribute it and/or
+ modify it under the terms of the GNU General Public
+ License as published by the Free Software Foundation; either
+ version 3 of the License, or (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ General Public License for more details.
+
+ You should have received a copy of the GNU General Public
+ License along with this program; if not, see
+ <https://www.gnu.org/licenses/>. */
+
+/* Written by Paul Eggert. */
+
+/* This is intended to be a good-enough substitute for glibc system
+ macros like those defined in <sys/cdefs.h>, so that Gnulib code
+ shared with glibc can do this as the first #include:
+
+ #ifndef _LIBC
+ # include <libc-config.h>
+ #endif
+
+ When compiled as part of glibc this is a no-op; when compiled as
+ part of Gnulib this includes Gnulib's <config.h> and defines macros
+ that glibc library code would normally assume. */
+
+#include <config.h>
+
+/* On glibc this includes <features.h> and <sys/cdefs.h> and #defines
+ _FEATURES_H, __WORDSIZE, and __set_errno. On FreeBSD 11 it
+ includes <sys/cdefs.h> which defines __nonnull. Elsewhere it
+ is harmless. */
+#include <errno.h>
+
+/* From glibc <errno.h>. */
+#ifndef __set_errno
+# define __set_errno(val) (errno = (val))
+#endif
+
+/* From glibc <features.h>. */
+
+#ifndef __GNUC_PREREQ
+# if defined __GNUC__ && defined __GNUC_MINOR__
+# define __GNUC_PREREQ(maj, min) ((maj) < __GNUC__ + ((min) <= __GNUC_MINOR__))
+# else
+# define __GNUC_PREREQ(maj, min) 0
+# endif
+#endif
+
+#ifndef __glibc_clang_prereq
+# if defined __clang_major__ && defined __clang_minor__
+# define __glibc_clang_prereq(maj, min) \
+ ((maj) < __clang_major__ + ((min) <= __clang_minor__))
+# else
+# define __glibc_clang_prereq(maj, min) 0
+# endif
+#endif
+
+
+/* Prepare to include <cdefs.h>, which is our copy of glibc
+ <sys/cdefs.h>. */
+
+/* Define _FEATURES_H so that <cdefs.h> does not include <features.h>. */
+#ifndef _FEATURES_H
+# define _FEATURES_H 1
+#endif
+/* Define __WORDSIZE so that <cdefs.h> does not attempt to include
+ nonexistent files. Make it a syntax error, since Gnulib does not
+ use __WORDSIZE now, and if Gnulib uses it later the syntax error
+ will let us know that __WORDSIZE needs configuring. */
+#ifndef __WORDSIZE
+# define __WORDSIZE %%%
+#endif
+/* Undef the macros unconditionally defined by our copy of glibc
+ <sys/cdefs.h>, so that they do not clash with any system-defined
+ versions. */
+#undef _SYS_CDEFS_H
+#undef __ASMNAME
+#undef __ASMNAME2
+#undef __BEGIN_DECLS
+#undef __CONCAT
+#undef __END_DECLS
+#undef __HAVE_GENERIC_SELECTION
+#undef __LDBL_COMPAT
+#undef __LDBL_REDIR
+#undef __LDBL_REDIR1
+#undef __LDBL_REDIR1_DECL
+#undef __LDBL_REDIR1_NTH
+#undef __LDBL_REDIR_DECL
+#undef __LDBL_REDIR_NTH
+#undef __LEAF
+#undef __LEAF_ATTR
+#undef __NTH
+#undef __NTHNL
+#undef __P
+#undef __PMT
+#undef __REDIRECT
+#undef __REDIRECT_LDBL
+#undef __REDIRECT_NTH
+#undef __REDIRECT_NTHNL
+#undef __REDIRECT_NTH_LDBL
+#undef __STRING
+#undef __THROW
+#undef __THROWNL
+#undef __always_inline
+#undef __attribute__
+#undef __attribute_alloc_size__
+#undef __attribute_artificial__
+#undef __attribute_const__
+#undef __attribute_deprecated__
+#undef __attribute_deprecated_msg__
+#undef __attribute_format_arg__
+#undef __attribute_format_strfmon__
+#undef __attribute_malloc__
+#undef __attribute_noinline__
+#undef __attribute_nonstring__
+#undef __attribute_pure__
+#undef __attribute_used__
+#undef __attribute_warn_unused_result__
+#undef __bos
+#undef __bos0
+#undef __errordecl
+#undef __extension__
+#undef __extern_always_inline
+#undef __extern_inline
+#undef __flexarr
+#undef __fortify_function
+#undef __glibc_c99_flexarr_available
+#undef __glibc_clang_has_extension
+#undef __glibc_likely
+#undef __glibc_macro_warning
+#undef __glibc_macro_warning1
+#undef __glibc_unlikely
+#undef __inline
+#undef __ptr_t
+#undef __restrict
+#undef __restrict_arr
+#undef __va_arg_pack
+#undef __va_arg_pack_len
+#undef __warnattr
+#undef __warndecl
+
+/* Include our copy of glibc <sys/cdefs.h>. */
+#include <cdefs.h>
+
+/* <cdefs.h> __inline is too pessimistic for non-GCC. */
+#undef __inline
+#ifndef HAVE___INLINE
+# if 199901 <= __STDC_VERSION__ || defined inline
+# define __inline inline
+# else
+# define __inline
+# endif
+#endif
+
+
+/* A substitute for glibc <libc-symbols.h>, good enough for Gnulib. */
+#define attribute_hidden
+#define libc_hidden_proto(name, ...)
+#define libc_hidden_def(name)
+#define libc_hidden_weak(name)
+#define libc_hidden_ver(local, name)
+#define strong_alias(name, aliasname)
+#define weak_alias(name, aliasname)
+
+/* A substitute for glibc <shlib-compat.h>, good enough for Gnulib. */
+#define SHLIB_COMPAT(lib, introduced, obsoleted) 0
+#define versioned_symbol(lib, local, symbol, version)
diff --git a/lib/limits.in.h b/lib/limits.in.h
index 2c809d9..89d7195 100644
--- a/lib/limits.in.h
+++ b/lib/limits.in.h
@@ -28,15 +28,32 @@
#ifndef _@GUARD_PREFIX@_LIMITS_H
#define _@GUARD_PREFIX@_LIMITS_H
-/* For HP-UX 11.31. */
-#if defined LONG_LONG_MIN && !defined LLONG_MIN
-# define LLONG_MIN LONG_LONG_MIN
+#ifndef LLONG_MIN
+# if defined LONG_LONG_MIN /* HP-UX 11.31 */
+# define LLONG_MIN LONG_LONG_MIN
+# elif defined LONGLONG_MIN /* IRIX 6.5 */
+# define LLONG_MIN LONGLONG_MIN
+# elif defined __GNUC__
+# define LLONG_MIN (- __LONG_LONG_MAX__ - 1LL)
+# endif
#endif
-#if defined LONG_LONG_MAX && !defined LLONG_MAX
-# define LLONG_MAX LONG_LONG_MAX
+#ifndef LLONG_MAX
+# if defined LONG_LONG_MAX /* HP-UX 11.31 */
+# define LLONG_MAX LONG_LONG_MAX
+# elif defined LONGLONG_MAX /* IRIX 6.5 */
+# define LLONG_MAX LONGLONG_MAX
+# elif defined __GNUC__
+# define LLONG_MAX __LONG_LONG_MAX__
+# endif
#endif
-#if defined ULONG_LONG_MAX && !defined ULLONG_MAX
-# define ULLONG_MAX ULONG_LONG_MAX
+#ifndef ULLONG_MAX
+# if defined ULONG_LONG_MAX /* HP-UX 11.31 */
+# define ULLONG_MAX ULONG_LONG_MAX
+# elif defined ULONGLONG_MAX /* IRIX 6.5 */
+# define ULLONG_MAX ULONGLONG_MAX
+# elif defined __GNUC__
+# define ULLONG_MAX (__LONG_LONG_MAX__ * 2ULL + 1ULL)
+# endif
#endif
/* The number of usable bits in an unsigned or signed integer type
@@ -53,6 +70,19 @@
#define _GL_COB8(n) (_GL_COB4 ((n) >> 4) + _GL_COB4 (n))
#define _GL_COB4(n) (!!((n) & 8) + !!((n) & 4) + !!((n) & 2) + !!((n) & 1))
+#ifndef WORD_BIT
+/* Assume 'int' is 32 bits wide. */
+# define WORD_BIT 32
+#endif
+#ifndef LONG_BIT
+/* Assume 'long' is 32 or 64 bits wide. */
+# if LONG_MAX == INT_MAX
+# define LONG_BIT 32
+# else
+# define LONG_BIT 64
+# endif
+#endif
+
/* Macros specified by ISO/IEC TS 18661-1:2014. */
#if (! defined ULLONG_WIDTH \
diff --git a/lib/localcharset.c b/lib/localcharset.c
index d583d6b..58c5718 100644
--- a/lib/localcharset.c
+++ b/lib/localcharset.c
@@ -22,7 +22,6 @@
/* Specification. */
#include "localcharset.h"
-#include <fcntl.h>
#include <stddef.h>
#include <stdio.h>
#include <string.h>
@@ -32,7 +31,7 @@
# define DARWIN7 /* Darwin 7 or newer, i.e. Mac OS X 10.3 or newer */
#endif
-#if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
+#if defined _WIN32 && !defined __CYGWIN__
# define WINDOWS_NATIVE
# include <locale.h>
#endif
@@ -45,11 +44,10 @@
#endif
#if !defined WINDOWS_NATIVE
-# include <unistd.h>
# if HAVE_LANGINFO_CODESET
# include <langinfo.h>
# else
-# if 0 /* see comment below */
+# if 0 /* see comment regarding use of setlocale(), below */
# include <locale.h>
# endif
# endif
@@ -71,321 +69,613 @@
# include <xlocale.h>
#endif
-#if ENABLE_RELOCATABLE
-# include "relocatable.h"
-#else
-# define relocate(pathname) (pathname)
-# define relocate2(pathname,allocatedp) (*(allocatedp) = NULL, (pathname))
-#endif
-
-/* Get LIBDIR. */
-#ifndef LIBDIR
-# include "configmake.h"
-#endif
-
-/* Define O_NOFOLLOW to 0 on platforms where it does not exist. */
-#ifndef O_NOFOLLOW
-# define O_NOFOLLOW 0
-#endif
-
-#if defined _WIN32 || defined __WIN32__ || defined __CYGWIN__ || defined __EMX__ || defined __DJGPP__
- /* Native Windows, Cygwin, OS/2, DOS */
-# define ISSLASH(C) ((C) == '/' || (C) == '\\')
-#endif
-#ifndef DIRECTORY_SEPARATOR
-# define DIRECTORY_SEPARATOR '/'
-#endif
+#if HAVE_LANGINFO_CODESET || defined WINDOWS_NATIVE || defined OS2
-#ifndef ISSLASH
-# define ISSLASH(C) ((C) == DIRECTORY_SEPARATOR)
-#endif
+/* On these platforms, we use a mapping from non-canonical encoding name
+ to GNU canonical encoding name. */
-#if HAVE_DECL_GETC_UNLOCKED
-# undef getc
-# define getc getc_unlocked
-#endif
+/* With glibc-2.1 or newer, we don't need any canonicalization,
+ because glibc has iconv and both glibc and libiconv support all
+ GNU canonical names directly. */
+# if !((defined __GNU_LIBRARY__ && __GLIBC__ >= 2) || defined __UCLIBC__)
-/* The following static variable is declared 'volatile' to avoid a
- possible multithread problem in the function get_charset_aliases. If we
- are running in a threaded environment, and if two threads initialize
- 'charset_aliases' simultaneously, both will produce the same value,
- and everything will be ok if the two assignments to 'charset_aliases'
- are atomic. But I don't know what will happen if the two assignments mix. */
-#if __STDC__ != 1
-# define volatile /* empty */
-#endif
-/* Pointer to the contents of the charset.alias file, if it has already been
- read, else NULL. Its format is:
- ALIAS_1 '\0' CANONICAL_1 '\0' ... ALIAS_n '\0' CANONICAL_n '\0' '\0' */
-static const char * volatile charset_aliases;
-
-/* Return a pointer to the contents of the charset.alias file. */
-static const char *
-get_charset_aliases (void)
+struct table_entry
{
- const char *cp;
-
- cp = charset_aliases;
- if (cp == NULL)
- {
-#if !(defined DARWIN7 || defined VMS || defined WINDOWS_NATIVE || defined __CYGWIN__ || defined OS2)
- char *malloc_dir = NULL;
- const char *dir;
- const char *base = "charset.alias";
- char *file_name;
-
- /* Make it possible to override the charset.alias location. This is
- necessary for running the testsuite before "make install". */
- dir = getenv ("CHARSETALIASDIR");
- if (dir == NULL || dir[0] == '\0')
- dir = relocate2 (LIBDIR, &malloc_dir);
-
- /* Concatenate dir and base into freshly allocated file_name. */
- {
- size_t dir_len = strlen (dir);
- size_t base_len = strlen (base);
- int add_slash = (dir_len > 0 && !ISSLASH (dir[dir_len - 1]));
- file_name = (char *) malloc (dir_len + add_slash + base_len + 1);
- if (file_name != NULL)
- {
- memcpy (file_name, dir, dir_len);
- if (add_slash)
- file_name[dir_len] = DIRECTORY_SEPARATOR;
- memcpy (file_name + dir_len + add_slash, base, base_len + 1);
- }
- }
-
- free (malloc_dir);
-
- if (file_name == NULL)
- /* Out of memory. Treat the file as empty. */
- cp = "";
- else
- {
- int fd;
-
- /* Open the file. Reject symbolic links on platforms that support
- O_NOFOLLOW. This is a security feature. Without it, an attacker
- could retrieve parts of the contents (namely, the tail of the
- first line that starts with "* ") of an arbitrary file by placing
- a symbolic link to that file under the name "charset.alias" in
- some writable directory and defining the environment variable
- CHARSETALIASDIR to point to that directory. */
- fd = open (file_name,
- O_RDONLY | (HAVE_WORKING_O_NOFOLLOW ? O_NOFOLLOW : 0));
- if (fd < 0)
- /* File not found. Treat it as empty. */
- cp = "";
- else
- {
- FILE *fp;
-
- fp = fdopen (fd, "r");
- if (fp == NULL)
- {
- /* Out of memory. Treat the file as empty. */
- close (fd);
- cp = "";
- }
- else
- {
- /* Parse the file's contents. */
- char *res_ptr = NULL;
- size_t res_size = 0;
-
- for (;;)
- {
- int c;
- char buf1[50+1];
- char buf2[50+1];
- size_t l1, l2;
- char *old_res_ptr;
-
- c = getc (fp);
- if (c == EOF)
- break;
- if (c == '\n' || c == ' ' || c == '\t')
- continue;
- if (c == '#')
- {
- /* Skip comment, to end of line. */
- do
- c = getc (fp);
- while (!(c == EOF || c == '\n'));
- if (c == EOF)
- break;
- continue;
- }
- ungetc (c, fp);
- if (fscanf (fp, "%50s %50s", buf1, buf2) < 2)
- break;
- l1 = strlen (buf1);
- l2 = strlen (buf2);
- old_res_ptr = res_ptr;
- if (res_size == 0)
- {
- res_size = l1 + 1 + l2 + 1;
- res_ptr = (char *) malloc (res_size + 1);
- }
- else
- {
- res_size += l1 + 1 + l2 + 1;
- res_ptr = (char *) realloc (res_ptr, res_size + 1);
- }
- if (res_ptr == NULL)
- {
- /* Out of memory. */
- res_size = 0;
- free (old_res_ptr);
- break;
- }
- strcpy (res_ptr + res_size - (l2 + 1) - (l1 + 1), buf1);
- strcpy (res_ptr + res_size - (l2 + 1), buf2);
- }
- fclose (fp);
- if (res_size == 0)
- cp = "";
- else
- {
- *(res_ptr + res_size) = '\0';
- cp = res_ptr;
- }
- }
- }
+ const char alias[11+1];
+ const char canonical[11+1];
+};
+
+/* Table of platform-dependent mappings, sorted in ascending order. */
+static const struct table_entry alias_table[] =
+ {
+# if defined __FreeBSD__ /* FreeBSD */
+ /*{ "ARMSCII-8", "ARMSCII-8" },*/
+ { "Big5", "BIG5" },
+ { "C", "ASCII" },
+ /*{ "CP1131", "CP1131" },*/
+ /*{ "CP1251", "CP1251" },*/
+ /*{ "CP866", "CP866" },*/
+ /*{ "GB18030", "GB18030" },*/
+ /*{ "GB2312", "GB2312" },*/
+ /*{ "GBK", "GBK" },*/
+ /*{ "ISCII-DEV", "?" },*/
+ { "ISO8859-1", "ISO-8859-1" },
+ { "ISO8859-13", "ISO-8859-13" },
+ { "ISO8859-15", "ISO-8859-15" },
+ { "ISO8859-2", "ISO-8859-2" },
+ { "ISO8859-5", "ISO-8859-5" },
+ { "ISO8859-7", "ISO-8859-7" },
+ { "ISO8859-9", "ISO-8859-9" },
+ /*{ "KOI8-R", "KOI8-R" },*/
+ /*{ "KOI8-U", "KOI8-U" },*/
+ { "SJIS", "SHIFT_JIS" },
+ { "US-ASCII", "ASCII" },
+ { "eucCN", "GB2312" },
+ { "eucJP", "EUC-JP" },
+ { "eucKR", "EUC-KR" }
+# define alias_table_defined
+# endif
+# if defined __NetBSD__ /* NetBSD */
+ { "646", "ASCII" },
+ /*{ "ARMSCII-8", "ARMSCII-8" },*/
+ /*{ "BIG5", "BIG5" },*/
+ { "Big5-HKSCS", "BIG5-HKSCS" },
+ /*{ "CP1251", "CP1251" },*/
+ /*{ "CP866", "CP866" },*/
+ /*{ "GB18030", "GB18030" },*/
+ /*{ "GB2312", "GB2312" },*/
+ { "ISO8859-1", "ISO-8859-1" },
+ { "ISO8859-13", "ISO-8859-13" },
+ { "ISO8859-15", "ISO-8859-15" },
+ { "ISO8859-2", "ISO-8859-2" },
+ { "ISO8859-4", "ISO-8859-4" },
+ { "ISO8859-5", "ISO-8859-5" },
+ { "ISO8859-7", "ISO-8859-7" },
+ /*{ "KOI8-R", "KOI8-R" },*/
+ /*{ "KOI8-U", "KOI8-U" },*/
+ /*{ "PT154", "PT154" },*/
+ { "SJIS", "SHIFT_JIS" },
+ { "eucCN", "GB2312" },
+ { "eucJP", "EUC-JP" },
+ { "eucKR", "EUC-KR" },
+ { "eucTW", "EUC-TW" }
+# define alias_table_defined
+# endif
+# if defined __OpenBSD__ /* OpenBSD */
+ { "646", "ASCII" },
+ { "ISO8859-1", "ISO-8859-1" },
+ { "ISO8859-13", "ISO-8859-13" },
+ { "ISO8859-15", "ISO-8859-15" },
+ { "ISO8859-2", "ISO-8859-2" },
+ { "ISO8859-4", "ISO-8859-4" },
+ { "ISO8859-5", "ISO-8859-5" },
+ { "ISO8859-7", "ISO-8859-7" }
+# define alias_table_defined
+# endif
+# if defined __APPLE__ && defined __MACH__ /* Mac OS X */
+ /* Darwin 7.5 has nl_langinfo(CODESET), but sometimes its value is
+ useless:
+ - It returns the empty string when LANG is set to a locale of the
+ form ll_CC, although ll_CC/LC_CTYPE is a symlink to an UTF-8
+ LC_CTYPE file.
+ - The environment variables LANG, LC_CTYPE, LC_ALL are not set by
+ the system; nl_langinfo(CODESET) returns "US-ASCII" in this case.
+ - The documentation says:
+ "... all code that calls BSD system routines should ensure
+ that the const *char parameters of these routines are in UTF-8
+ encoding. All BSD system functions expect their string
+ parameters to be in UTF-8 encoding and nothing else."
+ It also says
+ "An additional caveat is that string parameters for files,
+ paths, and other file-system entities must be in canonical
+ UTF-8. In a canonical UTF-8 Unicode string, all decomposable
+ characters are decomposed ..."
+ but this is not true: You can pass non-decomposed UTF-8 strings
+ to file system functions, and it is the OS which will convert
+ them to decomposed UTF-8 before accessing the file system.
+ - The Apple Terminal application displays UTF-8 by default.
+ - However, other applications are free to use different encodings:
+ - xterm uses ISO-8859-1 by default.
+ - TextEdit uses MacRoman by default.
+ We prefer UTF-8 over decomposed UTF-8-MAC because one should
+ minimize the use of decomposed Unicode. Unfortunately, through the
+ Darwin file system, decomposed UTF-8 strings are leaked into user
+ space nevertheless.
+ Then there are also the locales with encodings other than US-ASCII
+ and UTF-8. These locales can be occasionally useful to users (e.g.
+ when grepping through ISO-8859-1 encoded text files), when all their
+ file names are in US-ASCII.
+ */
+ { "ARMSCII-8", "ARMSCII-8" },
+ { "Big5", "BIG5" },
+ { "Big5HKSCS", "BIG5-HKSCS" },
+ { "CP1131", "CP1131" },
+ { "CP1251", "CP1251" },
+ { "CP866", "CP866" },
+ { "CP949", "CP949" },
+ { "GB18030", "GB18030" },
+ { "GB2312", "GB2312" },
+ { "GBK", "GBK" },
+ /*{ "ISCII-DEV", "?" },*/
+ { "ISO8859-1", "ISO-8859-1" },
+ { "ISO8859-13", "ISO-8859-13" },
+ { "ISO8859-15", "ISO-8859-15" },
+ { "ISO8859-2", "ISO-8859-2" },
+ { "ISO8859-4", "ISO-8859-4" },
+ { "ISO8859-5", "ISO-8859-5" },
+ { "ISO8859-7", "ISO-8859-7" },
+ { "ISO8859-9", "ISO-8859-9" },
+ { "KOI8-R", "KOI8-R" },
+ { "KOI8-U", "KOI8-U" },
+ { "PT154", "PT154" },
+ { "SJIS", "SHIFT_JIS" },
+ { "eucCN", "GB2312" },
+ { "eucJP", "EUC-JP" },
+ { "eucKR", "EUC-KR" }
+# define alias_table_defined
+# endif
+# if defined _AIX /* AIX */
+ /*{ "GBK", "GBK" },*/
+ { "IBM-1046", "CP1046" },
+ { "IBM-1124", "CP1124" },
+ { "IBM-1129", "CP1129" },
+ { "IBM-1252", "CP1252" },
+ { "IBM-850", "CP850" },
+ { "IBM-856", "CP856" },
+ { "IBM-921", "ISO-8859-13" },
+ { "IBM-922", "CP922" },
+ { "IBM-932", "CP932" },
+ { "IBM-943", "CP943" },
+ { "IBM-eucCN", "GB2312" },
+ { "IBM-eucJP", "EUC-JP" },
+ { "IBM-eucKR", "EUC-KR" },
+ { "IBM-eucTW", "EUC-TW" },
+ { "ISO8859-1", "ISO-8859-1" },
+ { "ISO8859-15", "ISO-8859-15" },
+ { "ISO8859-2", "ISO-8859-2" },
+ { "ISO8859-5", "ISO-8859-5" },
+ { "ISO8859-6", "ISO-8859-6" },
+ { "ISO8859-7", "ISO-8859-7" },
+ { "ISO8859-8", "ISO-8859-8" },
+ { "ISO8859-9", "ISO-8859-9" },
+ { "TIS-620", "TIS-620" },
+ /*{ "UTF-8", "UTF-8" },*/
+ { "big5", "BIG5" }
+# define alias_table_defined
+# endif
+# if defined __hpux /* HP-UX */
+ { "SJIS", "SHIFT_JIS" },
+ { "arabic8", "HP-ARABIC8" },
+ { "big5", "BIG5" },
+ { "cp1251", "CP1251" },
+ { "eucJP", "EUC-JP" },
+ { "eucKR", "EUC-KR" },
+ { "eucTW", "EUC-TW" },
+ { "gb18030", "GB18030" },
+ { "greek8", "HP-GREEK8" },
+ { "hebrew8", "HP-HEBREW8" },
+ { "hkbig5", "BIG5-HKSCS" },
+ { "hp15CN", "GB2312" },
+ { "iso88591", "ISO-8859-1" },
+ { "iso885913", "ISO-8859-13" },
+ { "iso885915", "ISO-8859-15" },
+ { "iso88592", "ISO-8859-2" },
+ { "iso88594", "ISO-8859-4" },
+ { "iso88595", "ISO-8859-5" },
+ { "iso88596", "ISO-8859-6" },
+ { "iso88597", "ISO-8859-7" },
+ { "iso88598", "ISO-8859-8" },
+ { "iso88599", "ISO-8859-9" },
+ { "kana8", "HP-KANA8" },
+ { "koi8r", "KOI8-R" },
+ { "roman8", "HP-ROMAN8" },
+ { "tis620", "TIS-620" },
+ { "turkish8", "HP-TURKISH8" },
+ { "utf8", "UTF-8" }
+# define alias_table_defined
+# endif
+# if defined __sgi /* IRIX */
+ { "ISO8859-1", "ISO-8859-1" },
+ { "ISO8859-15", "ISO-8859-15" },
+ { "ISO8859-2", "ISO-8859-2" },
+ { "ISO8859-5", "ISO-8859-5" },
+ { "ISO8859-7", "ISO-8859-7" },
+ { "ISO8859-9", "ISO-8859-9" },
+ { "eucCN", "GB2312" },
+ { "eucJP", "EUC-JP" },
+ { "eucKR", "EUC-KR" },
+ { "eucTW", "EUC-TW" }
+# define alias_table_defined
+# endif
+# if defined __osf__ /* OSF/1 */
+ /*{ "GBK", "GBK" },*/
+ { "ISO8859-1", "ISO-8859-1" },
+ { "ISO8859-15", "ISO-8859-15" },
+ { "ISO8859-2", "ISO-8859-2" },
+ { "ISO8859-4", "ISO-8859-4" },
+ { "ISO8859-5", "ISO-8859-5" },
+ { "ISO8859-7", "ISO-8859-7" },
+ { "ISO8859-8", "ISO-8859-8" },
+ { "ISO8859-9", "ISO-8859-9" },
+ { "KSC5601", "CP949" },
+ { "SJIS", "SHIFT_JIS" },
+ { "TACTIS", "TIS-620" },
+ /*{ "UTF-8", "UTF-8" },*/
+ { "big5", "BIG5" },
+ { "cp850", "CP850" },
+ { "dechanyu", "DEC-HANYU" },
+ { "dechanzi", "GB2312" },
+ { "deckanji", "DEC-KANJI" },
+ { "deckorean", "EUC-KR" },
+ { "eucJP", "EUC-JP" },
+ { "eucKR", "EUC-KR" },
+ { "eucTW", "EUC-TW" },
+ { "sdeckanji", "EUC-JP" }
+# define alias_table_defined
+# endif
+# if defined __sun /* Solaris */
+ { "5601", "EUC-KR" },
+ { "646", "ASCII" },
+ /*{ "BIG5", "BIG5" },*/
+ { "Big5-HKSCS", "BIG5-HKSCS" },
+ { "GB18030", "GB18030" },
+ /*{ "GBK", "GBK" },*/
+ { "ISO8859-1", "ISO-8859-1" },
+ { "ISO8859-11", "TIS-620" },
+ { "ISO8859-13", "ISO-8859-13" },
+ { "ISO8859-15", "ISO-8859-15" },
+ { "ISO8859-2", "ISO-8859-2" },
+ { "ISO8859-3", "ISO-8859-3" },
+ { "ISO8859-4", "ISO-8859-4" },
+ { "ISO8859-5", "ISO-8859-5" },
+ { "ISO8859-6", "ISO-8859-6" },
+ { "ISO8859-7", "ISO-8859-7" },
+ { "ISO8859-8", "ISO-8859-8" },
+ { "ISO8859-9", "ISO-8859-9" },
+ { "PCK", "SHIFT_JIS" },
+ { "TIS620.2533", "TIS-620" },
+ /*{ "UTF-8", "UTF-8" },*/
+ { "ansi-1251", "CP1251" },
+ { "cns11643", "EUC-TW" },
+ { "eucJP", "EUC-JP" },
+ { "gb2312", "GB2312" },
+ { "koi8-r", "KOI8-R" }
+# define alias_table_defined
+# endif
+# if defined __minix /* Minix */
+ { "646", "ASCII" }
+# define alias_table_defined
+# endif
+# if defined WINDOWS_NATIVE || defined __CYGWIN__ /* Windows */
+ { "CP1361", "JOHAB" },
+ { "CP20127", "ASCII" },
+ { "CP20866", "KOI8-R" },
+ { "CP20936", "GB2312" },
+ { "CP21866", "KOI8-RU" },
+ { "CP28591", "ISO-8859-1" },
+ { "CP28592", "ISO-8859-2" },
+ { "CP28593", "ISO-8859-3" },
+ { "CP28594", "ISO-8859-4" },
+ { "CP28595", "ISO-8859-5" },
+ { "CP28596", "ISO-8859-6" },
+ { "CP28597", "ISO-8859-7" },
+ { "CP28598", "ISO-8859-8" },
+ { "CP28599", "ISO-8859-9" },
+ { "CP28605", "ISO-8859-15" },
+ { "CP38598", "ISO-8859-8" },
+ { "CP51932", "EUC-JP" },
+ { "CP51936", "GB2312" },
+ { "CP51949", "EUC-KR" },
+ { "CP51950", "EUC-TW" },
+ { "CP54936", "GB18030" },
+ { "CP65001", "UTF-8" },
+ { "CP936", "GBK" }
+# define alias_table_defined
+# endif
+# if defined OS2 /* OS/2 */
+ /* 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":
+ <https://www-01.ibm.com/software/globalization/cp/cp_cpgid.html>. */
+ { "CP1089", "ISO-8859-6" },
+ { "CP1208", "UTF-8" },
+ { "CP1381", "GB2312" },
+ { "CP1386", "GBK" },
+ { "CP3372", "EUC-JP" },
+ { "CP813", "ISO-8859-7" },
+ { "CP819", "ISO-8859-1" },
+ { "CP878", "KOI8-R" },
+ { "CP912", "ISO-8859-2" },
+ { "CP913", "ISO-8859-3" },
+ { "CP914", "ISO-8859-4" },
+ { "CP915", "ISO-8859-5" },
+ { "CP916", "ISO-8859-8" },
+ { "CP920", "ISO-8859-9" },
+ { "CP921", "ISO-8859-13" },
+ { "CP923", "ISO-8859-15" },
+ { "CP954", "EUC-JP" },
+ { "CP964", "EUC-TW" },
+ { "CP970", "EUC-KR" }
+# define alias_table_defined
+# endif
+# if defined VMS /* OpenVMS */
+ /* The list of encodings is taken from the OpenVMS 7.3-1 documentation
+ "Compaq C Run-Time Library Reference Manual for OpenVMS systems"
+ section 10.7 "Handling Different Character Sets". */
+ { "DECHANYU", "DEC-HANYU" },
+ { "DECHANZI", "GB2312" },
+ { "DECKANJI", "DEC-KANJI" },
+ { "DECKOREAN", "EUC-KR" },
+ { "ISO8859-1", "ISO-8859-1" },
+ { "ISO8859-2", "ISO-8859-2" },
+ { "ISO8859-5", "ISO-8859-5" },
+ { "ISO8859-7", "ISO-8859-7" },
+ { "ISO8859-8", "ISO-8859-8" },
+ { "ISO8859-9", "ISO-8859-9" },
+ { "SDECKANJI", "EUC-JP" },
+ { "SJIS", "SHIFT_JIS" },
+ { "eucJP", "EUC-JP" },
+ { "eucTW", "EUC-TW" }
+# define alias_table_defined
+# endif
+# ifndef alias_table_defined
+ /* Just a dummy entry, to avoid a C syntax error. */
+ { "", "" }
+# endif
+ };
- free (file_name);
- }
+# endif
#else
-# if defined DARWIN7
- /* To avoid the trouble of installing a file that is shared by many
- GNU packages -- many packaging systems have problems with this --,
- simply inline the aliases here. */
- cp = "ISO8859-1" "\0" "ISO-8859-1" "\0"
- "ISO8859-2" "\0" "ISO-8859-2" "\0"
- "ISO8859-4" "\0" "ISO-8859-4" "\0"
- "ISO8859-5" "\0" "ISO-8859-5" "\0"
- "ISO8859-7" "\0" "ISO-8859-7" "\0"
- "ISO8859-9" "\0" "ISO-8859-9" "\0"
- "ISO8859-13" "\0" "ISO-8859-13" "\0"
- "ISO8859-15" "\0" "ISO-8859-15" "\0"
- "KOI8-R" "\0" "KOI8-R" "\0"
- "KOI8-U" "\0" "KOI8-U" "\0"
- "CP866" "\0" "CP866" "\0"
- "CP949" "\0" "CP949" "\0"
- "CP1131" "\0" "CP1131" "\0"
- "CP1251" "\0" "CP1251" "\0"
- "eucCN" "\0" "GB2312" "\0"
- "GB2312" "\0" "GB2312" "\0"
- "eucJP" "\0" "EUC-JP" "\0"
- "eucKR" "\0" "EUC-KR" "\0"
- "Big5" "\0" "BIG5" "\0"
- "Big5HKSCS" "\0" "BIG5-HKSCS" "\0"
- "GBK" "\0" "GBK" "\0"
- "GB18030" "\0" "GB18030" "\0"
- "SJIS" "\0" "SHIFT_JIS" "\0"
- "ARMSCII-8" "\0" "ARMSCII-8" "\0"
- "PT154" "\0" "PT154" "\0"
- /*"ISCII-DEV" "\0" "?" "\0"*/
- "*" "\0" "UTF-8" "\0";
-# endif
+/* On these platforms, we use a mapping from locale name to GNU canonical
+ encoding name. */
-# if defined VMS
- /* To avoid the troubles of an extra file charset.alias_vms in the
- sources of many GNU packages, simply inline the aliases here. */
- /* The list of encodings is taken from the OpenVMS 7.3-1 documentation
- "Compaq C Run-Time Library Reference Manual for OpenVMS systems"
- section 10.7 "Handling Different Character Sets". */
- cp = "ISO8859-1" "\0" "ISO-8859-1" "\0"
- "ISO8859-2" "\0" "ISO-8859-2" "\0"
- "ISO8859-5" "\0" "ISO-8859-5" "\0"
- "ISO8859-7" "\0" "ISO-8859-7" "\0"
- "ISO8859-8" "\0" "ISO-8859-8" "\0"
- "ISO8859-9" "\0" "ISO-8859-9" "\0"
- /* Japanese */
- "eucJP" "\0" "EUC-JP" "\0"
- "SJIS" "\0" "SHIFT_JIS" "\0"
- "DECKANJI" "\0" "DEC-KANJI" "\0"
- "SDECKANJI" "\0" "EUC-JP" "\0"
- /* Chinese */
- "eucTW" "\0" "EUC-TW" "\0"
- "DECHANYU" "\0" "DEC-HANYU" "\0"
- "DECHANZI" "\0" "GB2312" "\0"
- /* Korean */
- "DECKOREAN" "\0" "EUC-KR" "\0";
+struct table_entry
+{
+ const char locale[17+1];
+ const char canonical[11+1];
+};
+
+/* Table of platform-dependent mappings, sorted in ascending order. */
+static const struct table_entry locale_table[] =
+ {
+# if defined __FreeBSD__ /* FreeBSD 4.2 */
+ { "cs_CZ.ISO_8859-2", "ISO-8859-2" },
+ { "da_DK.DIS_8859-15", "ISO-8859-15" },
+ { "da_DK.ISO_8859-1", "ISO-8859-1" },
+ { "de_AT.DIS_8859-15", "ISO-8859-15" },
+ { "de_AT.ISO_8859-1", "ISO-8859-1" },
+ { "de_CH.DIS_8859-15", "ISO-8859-15" },
+ { "de_CH.ISO_8859-1", "ISO-8859-1" },
+ { "de_DE.DIS_8859-15", "ISO-8859-15" },
+ { "de_DE.ISO_8859-1", "ISO-8859-1" },
+ { "en_AU.DIS_8859-15", "ISO-8859-15" },
+ { "en_AU.ISO_8859-1", "ISO-8859-1" },
+ { "en_CA.DIS_8859-15", "ISO-8859-15" },
+ { "en_CA.ISO_8859-1", "ISO-8859-1" },
+ { "en_GB.DIS_8859-15", "ISO-8859-15" },
+ { "en_GB.ISO_8859-1", "ISO-8859-1" },
+ { "en_US.DIS_8859-15", "ISO-8859-15" },
+ { "en_US.ISO_8859-1", "ISO-8859-1" },
+ { "es_ES.DIS_8859-15", "ISO-8859-15" },
+ { "es_ES.ISO_8859-1", "ISO-8859-1" },
+ { "fi_FI.DIS_8859-15", "ISO-8859-15" },
+ { "fi_FI.ISO_8859-1", "ISO-8859-1" },
+ { "fr_BE.DIS_8859-15", "ISO-8859-15" },
+ { "fr_BE.ISO_8859-1", "ISO-8859-1" },
+ { "fr_CA.DIS_8859-15", "ISO-8859-15" },
+ { "fr_CA.ISO_8859-1", "ISO-8859-1" },
+ { "fr_CH.DIS_8859-15", "ISO-8859-15" },
+ { "fr_CH.ISO_8859-1", "ISO-8859-1" },
+ { "fr_FR.DIS_8859-15", "ISO-8859-15" },
+ { "fr_FR.ISO_8859-1", "ISO-8859-1" },
+ { "hr_HR.ISO_8859-2", "ISO-8859-2" },
+ { "hu_HU.ISO_8859-2", "ISO-8859-2" },
+ { "is_IS.DIS_8859-15", "ISO-8859-15" },
+ { "is_IS.ISO_8859-1", "ISO-8859-1" },
+ { "it_CH.DIS_8859-15", "ISO-8859-15" },
+ { "it_CH.ISO_8859-1", "ISO-8859-1" },
+ { "it_IT.DIS_8859-15", "ISO-8859-15" },
+ { "it_IT.ISO_8859-1", "ISO-8859-1" },
+ { "ja_JP.EUC", "EUC-JP" },
+ { "ja_JP.SJIS", "SHIFT_JIS" },
+ { "ja_JP.Shift_JIS", "SHIFT_JIS" },
+ { "ko_KR.EUC", "EUC-KR" },
+ { "la_LN.ASCII", "ASCII" },
+ { "la_LN.DIS_8859-15", "ISO-8859-15" },
+ { "la_LN.ISO_8859-1", "ISO-8859-1" },
+ { "la_LN.ISO_8859-2", "ISO-8859-2" },
+ { "la_LN.ISO_8859-4", "ISO-8859-4" },
+ { "lt_LN.ASCII", "ASCII" },
+ { "lt_LN.DIS_8859-15", "ISO-8859-15" },
+ { "lt_LN.ISO_8859-1", "ISO-8859-1" },
+ { "lt_LN.ISO_8859-2", "ISO-8859-2" },
+ { "lt_LT.ISO_8859-4", "ISO-8859-4" },
+ { "nl_BE.DIS_8859-15", "ISO-8859-15" },
+ { "nl_BE.ISO_8859-1", "ISO-8859-1" },
+ { "nl_NL.DIS_8859-15", "ISO-8859-15" },
+ { "nl_NL.ISO_8859-1", "ISO-8859-1" },
+ { "no_NO.DIS_8859-15", "ISO-8859-15" },
+ { "no_NO.ISO_8859-1", "ISO-8859-1" },
+ { "pl_PL.ISO_8859-2", "ISO-8859-2" },
+ { "pt_PT.DIS_8859-15", "ISO-8859-15" },
+ { "pt_PT.ISO_8859-1", "ISO-8859-1" },
+ { "ru_RU.CP866", "CP866" },
+ { "ru_RU.ISO_8859-5", "ISO-8859-5" },
+ { "ru_RU.KOI8-R", "KOI8-R" },
+ { "ru_SU.CP866", "CP866" },
+ { "ru_SU.ISO_8859-5", "ISO-8859-5" },
+ { "ru_SU.KOI8-R", "KOI8-R" },
+ { "sl_SI.ISO_8859-2", "ISO-8859-2" },
+ { "sv_SE.DIS_8859-15", "ISO-8859-15" },
+ { "sv_SE.ISO_8859-1", "ISO-8859-1" },
+ { "uk_UA.KOI8-U", "KOI8-U" },
+ { "zh_CN.EUC", "GB2312" },
+ { "zh_TW.BIG5", "BIG5" },
+ { "zh_TW.Big5", "BIG5" }
+# define locale_table_defined
# endif
-
-# if defined WINDOWS_NATIVE || defined __CYGWIN__
- /* 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. */
-
- cp = "CP936" "\0" "GBK" "\0"
- "CP1361" "\0" "JOHAB" "\0"
- "CP20127" "\0" "ASCII" "\0"
- "CP20866" "\0" "KOI8-R" "\0"
- "CP20936" "\0" "GB2312" "\0"
- "CP21866" "\0" "KOI8-RU" "\0"
- "CP28591" "\0" "ISO-8859-1" "\0"
- "CP28592" "\0" "ISO-8859-2" "\0"
- "CP28593" "\0" "ISO-8859-3" "\0"
- "CP28594" "\0" "ISO-8859-4" "\0"
- "CP28595" "\0" "ISO-8859-5" "\0"
- "CP28596" "\0" "ISO-8859-6" "\0"
- "CP28597" "\0" "ISO-8859-7" "\0"
- "CP28598" "\0" "ISO-8859-8" "\0"
- "CP28599" "\0" "ISO-8859-9" "\0"
- "CP28605" "\0" "ISO-8859-15" "\0"
- "CP38598" "\0" "ISO-8859-8" "\0"
- "CP51932" "\0" "EUC-JP" "\0"
- "CP51936" "\0" "GB2312" "\0"
- "CP51949" "\0" "EUC-KR" "\0"
- "CP51950" "\0" "EUC-TW" "\0"
- "CP54936" "\0" "GB18030" "\0"
- "CP65001" "\0" "UTF-8" "\0";
+# if defined __DJGPP__ /* DOS / DJGPP 2.03 */
+ /* The encodings given here may not all be correct.
+ If you find that the encoding given for your language and
+ country is not the one your DOS machine actually uses, just
+ correct it in this file, and send a mail to
+ Juan Manuel Guerrero <juan.guerrero@gmx.de>
+ and <bug-gnulib@gnu.org>. */
+ { "C", "ASCII" },
+ { "ar", "CP864" },
+ { "ar_AE", "CP864" },
+ { "ar_DZ", "CP864" },
+ { "ar_EG", "CP864" },
+ { "ar_IQ", "CP864" },
+ { "ar_IR", "CP864" },
+ { "ar_JO", "CP864" },
+ { "ar_KW", "CP864" },
+ { "ar_MA", "CP864" },
+ { "ar_OM", "CP864" },
+ { "ar_QA", "CP864" },
+ { "ar_SA", "CP864" },
+ { "ar_SY", "CP864" },
+ { "be", "CP866" },
+ { "be_BE", "CP866" },
+ { "bg", "CP866" }, /* not CP855 ?? */
+ { "bg_BG", "CP866" }, /* not CP855 ?? */
+ { "ca", "CP850" },
+ { "ca_ES", "CP850" },
+ { "cs", "CP852" },
+ { "cs_CZ", "CP852" },
+ { "da", "CP865" }, /* not CP850 ?? */
+ { "da_DK", "CP865" }, /* not CP850 ?? */
+ { "de", "CP850" },
+ { "de_AT", "CP850" },
+ { "de_CH", "CP850" },
+ { "de_DE", "CP850" },
+ { "el", "CP869" },
+ { "el_GR", "CP869" },
+ { "en", "CP850" },
+ { "en_AU", "CP850" }, /* not CP437 ?? */
+ { "en_CA", "CP850" },
+ { "en_GB", "CP850" },
+ { "en_NZ", "CP437" },
+ { "en_US", "CP437" },
+ { "en_ZA", "CP850" }, /* not CP437 ?? */
+ { "eo", "CP850" },
+ { "eo_EO", "CP850" },
+ { "es", "CP850" },
+ { "es_AR", "CP850" },
+ { "es_BO", "CP850" },
+ { "es_CL", "CP850" },
+ { "es_CO", "CP850" },
+ { "es_CR", "CP850" },
+ { "es_CU", "CP850" },
+ { "es_DO", "CP850" },
+ { "es_EC", "CP850" },
+ { "es_ES", "CP850" },
+ { "es_GT", "CP850" },
+ { "es_HN", "CP850" },
+ { "es_MX", "CP850" },
+ { "es_NI", "CP850" },
+ { "es_PA", "CP850" },
+ { "es_PE", "CP850" },
+ { "es_PY", "CP850" },
+ { "es_SV", "CP850" },
+ { "es_UY", "CP850" },
+ { "es_VE", "CP850" },
+ { "et", "CP850" },
+ { "et_EE", "CP850" },
+ { "eu", "CP850" },
+ { "eu_ES", "CP850" },
+ { "fi", "CP850" },
+ { "fi_FI", "CP850" },
+ { "fr", "CP850" },
+ { "fr_BE", "CP850" },
+ { "fr_CA", "CP850" },
+ { "fr_CH", "CP850" },
+ { "fr_FR", "CP850" },
+ { "ga", "CP850" },
+ { "ga_IE", "CP850" },
+ { "gd", "CP850" },
+ { "gd_GB", "CP850" },
+ { "gl", "CP850" },
+ { "gl_ES", "CP850" },
+ { "he", "CP862" },
+ { "he_IL", "CP862" },
+ { "hr", "CP852" },
+ { "hr_HR", "CP852" },
+ { "hu", "CP852" },
+ { "hu_HU", "CP852" },
+ { "id", "CP850" }, /* not CP437 ?? */
+ { "id_ID", "CP850" }, /* not CP437 ?? */
+ { "is", "CP861" }, /* not CP850 ?? */
+ { "is_IS", "CP861" }, /* not CP850 ?? */
+ { "it", "CP850" },
+ { "it_CH", "CP850" },
+ { "it_IT", "CP850" },
+ { "ja", "CP932" },
+ { "ja_JP", "CP932" },
+ { "kr", "CP949" }, /* not CP934 ?? */
+ { "kr_KR", "CP949" }, /* not CP934 ?? */
+ { "lt", "CP775" },
+ { "lt_LT", "CP775" },
+ { "lv", "CP775" },
+ { "lv_LV", "CP775" },
+ { "mk", "CP866" }, /* not CP855 ?? */
+ { "mk_MK", "CP866" }, /* not CP855 ?? */
+ { "mt", "CP850" },
+ { "mt_MT", "CP850" },
+ { "nb", "CP865" }, /* not CP850 ?? */
+ { "nb_NO", "CP865" }, /* not CP850 ?? */
+ { "nl", "CP850" },
+ { "nl_BE", "CP850" },
+ { "nl_NL", "CP850" },
+ { "nn", "CP865" }, /* not CP850 ?? */
+ { "nn_NO", "CP865" }, /* not CP850 ?? */
+ { "no", "CP865" }, /* not CP850 ?? */
+ { "no_NO", "CP865" }, /* not CP850 ?? */
+ { "pl", "CP852" },
+ { "pl_PL", "CP852" },
+ { "pt", "CP850" },
+ { "pt_BR", "CP850" },
+ { "pt_PT", "CP850" },
+ { "ro", "CP852" },
+ { "ro_RO", "CP852" },
+ { "ru", "CP866" },
+ { "ru_RU", "CP866" },
+ { "sk", "CP852" },
+ { "sk_SK", "CP852" },
+ { "sl", "CP852" },
+ { "sl_SI", "CP852" },
+ { "sq", "CP852" },
+ { "sq_AL", "CP852" },
+ { "sr", "CP852" }, /* CP852 or CP866 or CP855 ?? */
+ { "sr_CS", "CP852" }, /* CP852 or CP866 or CP855 ?? */
+ { "sr_YU", "CP852" }, /* CP852 or CP866 or CP855 ?? */
+ { "sv", "CP850" },
+ { "sv_SE", "CP850" },
+ { "th", "CP874" },
+ { "th_TH", "CP874" },
+ { "tr", "CP857" },
+ { "tr_TR", "CP857" },
+ { "uk", "CP1125" },
+ { "uk_UA", "CP1125" },
+ { "zh_CN", "GBK" },
+ { "zh_TW", "CP950" } /* not CP938 ?? */
+# define locale_table_defined
# 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":
- <https://www-01.ibm.com/software/globalization/cp/cp_cpgid.html>. */
- cp = "CP813" "\0" "ISO-8859-7" "\0"
- "CP878" "\0" "KOI8-R" "\0"
- "CP819" "\0" "ISO-8859-1" "\0"
- "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";
+# ifndef locale_table_defined
+ /* Just a dummy entry, to avoid a C syntax error. */
+ { "", "" }
# endif
-#endif
+ };
- charset_aliases = cp;
- }
+#endif
- return cp;
-}
/* Determine the current locale's character encoding, and canonicalize it
- into one of the canonical names listed in config.charset.
+ into one of the canonical names listed in localcharset.h.
The result must not be freed; it is statically allocated.
If the canonical name cannot be determined, the result is a non-canonical
name. */
@@ -397,9 +687,8 @@ const char *
locale_charset (void)
{
const char *codeset;
- const char *aliases;
-#if !(defined WINDOWS_NATIVE || defined OS2)
+#if HAVE_LANGINFO_CODESET || defined WINDOWS_NATIVE || defined OS2
# if HAVE_LANGINFO_CODESET
@@ -462,37 +751,11 @@ locale_charset (void)
}
# endif
-# else
-
- /* On old systems which lack it, use setlocale or getenv. */
- const char *locale = NULL;
-
- /* But most old systems don't have a complete set of locales. Some
- (like SunOS 4 or DJGPP) have only the C locale. Therefore we don't
- use setlocale here; it would return "C" when it doesn't support the
- locale name the user has set. */
-# if 0
- locale = setlocale (LC_CTYPE, NULL);
-# endif
- if (locale == NULL || locale[0] == '\0')
- {
- locale = getenv ("LC_ALL");
- if (locale == NULL || locale[0] == '\0')
- {
- locale = getenv ("LC_CTYPE");
- if (locale == NULL || locale[0] == '\0')
- locale = getenv ("LANG");
- }
- }
-
- /* On some old systems, one used to set locale = "iso8859_1". On others,
- you set it to "language_COUNTRY.charset". In any case, we resolve it
- through the charset.alias file. */
- codeset = locale;
-
-# endif
+ if (codeset == NULL)
+ /* The canonical name cannot be determined. */
+ codeset = "";
-#elif defined WINDOWS_NATIVE
+# elif defined WINDOWS_NATIVE
static char buf[2 + 10 + 1];
@@ -526,7 +789,7 @@ locale_charset (void)
}
codeset = buf;
-#elif defined OS2
+# elif defined OS2
const char *locale;
static char buf[2 + 10 + 1];
@@ -583,28 +846,144 @@ locale_charset (void)
}
}
-#endif
+# else
- if (codeset == NULL)
- /* The canonical name cannot be determined. */
- codeset = "";
+# error "Add code for other platforms here."
- /* Resolve alias. */
- for (aliases = get_charset_aliases ();
- *aliases != '\0';
- aliases += strlen (aliases) + 1, aliases += strlen (aliases) + 1)
- if (strcmp (codeset, aliases) == 0
- || (aliases[0] == '*' && aliases[1] == '\0'))
+# endif
+
+ /* Resolve alias. */
+ {
+# ifdef alias_table_defined
+ /* On some platforms, UTF-8 locales are the most frequently used ones.
+ Speed up the common case and slow down the less common cases by
+ testing for this case first. */
+# if defined __OpenBSD__ || (defined __APPLE__ && defined __MACH__) || defined __sun || defined __CYGWIN__
+ if (strcmp (codeset, "UTF-8") == 0)
+ goto done_table_lookup;
+ else
+# endif
{
- codeset = aliases + strlen (aliases) + 1;
- break;
+ const struct table_entry * const table = alias_table;
+ size_t const table_size =
+ sizeof (alias_table) / sizeof (struct table_entry);
+ /* 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].alias, codeset) < 0,
+ for i >= hi, strcmp (table[i].alias, codeset) > 0. */
+ size_t mid = (hi + lo) >> 1; /* >= lo, < hi */
+ int cmp = strcmp (table[mid].alias, codeset);
+ if (cmp < 0)
+ lo = mid + 1;
+ else if (cmp > 0)
+ hi = mid;
+ else
+ {
+ /* Found an i with
+ strcmp (table[i].alias, codeset) == 0. */
+ codeset = table[mid].canonical;
+ goto done_table_lookup;
+ }
+ }
}
+ if (0)
+ done_table_lookup: ;
+ else
+# endif
+ {
+ /* Did not find it in the table. */
+ /* On Mac OS X, all modern locales use the UTF-8 encoding.
+ BeOS and Haiku have a single locale, and it has UTF-8 encoding. */
+# if (defined __APPLE__ && defined __MACH__) || defined __BEOS__ || defined __HAIKU__
+ codeset = "UTF-8";
+# else
+ /* Don't return an empty string. GNU libc and GNU libiconv interpret
+ the empty string as denoting "the locale's character encoding",
+ thus GNU libiconv would call this function a second time. */
+ if (codeset[0] == '\0')
+ codeset = "ASCII";
+# endif
+ }
+ }
- /* Don't return an empty string. GNU libc and GNU libiconv interpret
- the empty string as denoting "the locale's character encoding",
- thus GNU libiconv would call this function a second time. */
- if (codeset[0] == '\0')
- codeset = "ASCII";
+#else
+
+ /* On old systems which lack it, use setlocale or getenv. */
+ const char *locale = NULL;
+
+ /* But most old systems don't have a complete set of locales. Some
+ (like DJGPP) have only the C locale. Therefore we don't use setlocale
+ here; it would return "C" when it doesn't support the locale name the
+ user has set. */
+# if 0
+ locale = setlocale (LC_CTYPE, NULL);
+# endif
+ if (locale == NULL || locale[0] == '\0')
+ {
+ locale = getenv ("LC_ALL");
+ if (locale == NULL || locale[0] == '\0')
+ {
+ locale = getenv ("LC_CTYPE");
+ if (locale == NULL || locale[0] == '\0')
+ locale = getenv ("LANG");
+ if (locale == NULL)
+ locale = "";
+ }
+ }
+
+ /* Map locale name to canonical encoding name. */
+ {
+# ifdef locale_table_defined
+ const struct table_entry * const table = locale_table;
+ size_t const table_size =
+ sizeof (locale_table) / sizeof (struct table_entry);
+ /* 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].locale, locale) < 0,
+ for i >= hi, strcmp (table[i].locale, locale) > 0. */
+ size_t mid = (hi + lo) >> 1; /* >= lo, < hi */
+ int cmp = strcmp (table[mid].locale, locale);
+ if (cmp < 0)
+ lo = mid + 1;
+ else if (cmp > 0)
+ hi = mid;
+ else
+ {
+ /* Found an i with
+ strcmp (table[i].locale, locale) == 0. */
+ codeset = table[mid].canonical;
+ goto done_table_lookup;
+ }
+ }
+ if (0)
+ done_table_lookup: ;
+ else
+# endif
+ {
+ /* Did not find it in the table. */
+ /* On Mac OS X, all modern locales use the UTF-8 encoding.
+ BeOS and Haiku have a single locale, and it has UTF-8 encoding. */
+# if (defined __APPLE__ && defined __MACH__) || defined __BEOS__ || defined __HAIKU__
+ codeset = "UTF-8";
+# else
+ /* The canonical name cannot be determined. */
+ /* Don't return an empty string. GNU libc and GNU libiconv interpret
+ the empty string as denoting "the locale's character encoding",
+ thus GNU libiconv would call this function a second time. */
+ codeset = "ASCII";
+# endif
+ }
+ }
+
+#endif
#ifdef DARWIN7
/* Mac OS X sets MB_CUR_MAX to 1 when LC_ALL=C, and "UTF-8"
diff --git a/lib/localcharset.h b/lib/localcharset.h
index 3ce8b94..e4ba296 100644
--- a/lib/localcharset.h
+++ b/lib/localcharset.h
@@ -25,12 +25,106 @@ extern "C" {
/* Determine the current locale's character encoding, and canonicalize it
- into one of the canonical names listed in config.charset.
+ into one of the canonical names listed below.
The result must not be freed; it is statically allocated.
If the canonical name cannot be determined, the result is a non-canonical
name. */
extern const char * locale_charset (void);
+/* About GNU canonical names for character encodings:
+
+ Every canonical name must be supported by GNU libiconv. Support by GNU libc
+ is also desirable.
+
+ The name is case insensitive. Usually an upper case MIME charset name is
+ preferred.
+
+ The current list of these GNU canonical names is:
+
+ name MIME? used by which systems
+ (darwin = Mac OS X, windows = native Windows)
+
+ ASCII, ANSI_X3.4-1968 glibc solaris freebsd netbsd darwin minix cygwin
+ ISO-8859-1 Y glibc aix hpux irix osf solaris freebsd netbsd openbsd darwin cygwin
+ ISO-8859-2 Y glibc aix hpux irix osf solaris freebsd netbsd openbsd darwin cygwin
+ ISO-8859-3 Y glibc solaris cygwin
+ ISO-8859-4 Y hpux osf solaris freebsd netbsd openbsd darwin
+ ISO-8859-5 Y glibc aix hpux irix osf solaris freebsd netbsd openbsd darwin cygwin
+ ISO-8859-6 Y glibc aix hpux solaris cygwin
+ ISO-8859-7 Y glibc aix hpux irix osf solaris freebsd netbsd openbsd darwin cygwin
+ ISO-8859-8 Y glibc aix hpux osf solaris cygwin
+ ISO-8859-9 Y glibc aix hpux irix osf solaris freebsd darwin cygwin
+ ISO-8859-13 glibc hpux solaris freebsd netbsd openbsd darwin cygwin
+ ISO-8859-14 glibc cygwin
+ ISO-8859-15 glibc aix irix osf solaris freebsd netbsd openbsd darwin cygwin
+ KOI8-R Y glibc hpux solaris freebsd netbsd openbsd darwin
+ KOI8-U Y glibc freebsd netbsd openbsd darwin cygwin
+ KOI8-T glibc
+ CP437 dos
+ CP775 dos
+ CP850 aix osf dos
+ CP852 dos
+ CP855 dos
+ CP856 aix
+ CP857 dos
+ CP861 dos
+ CP862 dos
+ CP864 dos
+ CP865 dos
+ CP866 freebsd netbsd openbsd darwin dos
+ CP869 dos
+ CP874 windows dos
+ CP922 aix
+ CP932 aix cygwin windows dos
+ CP943 aix
+ CP949 osf darwin windows dos
+ CP950 windows dos
+ CP1046 aix
+ CP1124 aix
+ CP1125 dos
+ CP1129 aix
+ CP1131 freebsd darwin
+ CP1250 windows
+ CP1251 glibc hpux solaris freebsd netbsd openbsd darwin cygwin windows
+ CP1252 aix windows
+ CP1253 windows
+ CP1254 windows
+ CP1255 glibc windows
+ CP1256 windows
+ CP1257 windows
+ GB2312 Y glibc aix hpux irix solaris freebsd netbsd darwin cygwin
+ EUC-JP Y glibc aix hpux irix osf solaris freebsd netbsd darwin cygwin
+ EUC-KR Y glibc aix hpux irix osf solaris freebsd netbsd darwin cygwin
+ EUC-TW glibc aix hpux irix osf solaris netbsd
+ BIG5 Y glibc aix hpux osf solaris freebsd netbsd darwin cygwin
+ BIG5-HKSCS glibc hpux solaris netbsd darwin
+ GBK glibc aix osf solaris freebsd darwin cygwin windows dos
+ GB18030 glibc hpux solaris freebsd netbsd darwin
+ SHIFT_JIS Y hpux osf solaris freebsd netbsd darwin
+ JOHAB glibc solaris windows
+ TIS-620 glibc aix hpux osf solaris cygwin
+ VISCII Y glibc
+ TCVN5712-1 glibc
+ ARMSCII-8 glibc freebsd netbsd darwin
+ GEORGIAN-PS glibc cygwin
+ PT154 glibc netbsd cygwin
+ HP-ROMAN8 hpux
+ HP-ARABIC8 hpux
+ HP-GREEK8 hpux
+ HP-HEBREW8 hpux
+ HP-TURKISH8 hpux
+ HP-KANA8 hpux
+ DEC-KANJI osf
+ DEC-HANYU osf
+ UTF-8 Y glibc aix hpux osf solaris netbsd darwin cygwin
+
+ Note: Names which are not marked as being a MIME name should not be used in
+ Internet protocols for information interchange (mail, news, etc.).
+
+ Note: ASCII and ANSI_X3.4-1968 are synonymous canonical names. Applications
+ must understand both names and treat them as equivalent.
+ */
+
#ifdef __cplusplus
}
diff --git a/lib/locale.in.h b/lib/locale.in.h
index 1b27f1f..123df7a 100644
--- a/lib/locale.in.h
+++ b/lib/locale.in.h
@@ -19,10 +19,13 @@
#endif
@PRAGMA_COLUMNS@
-#ifdef _GL_ALREADY_INCLUDING_LOCALE_H
+#if (defined _WIN32 && !defined __CYGWIN__ && defined __need_locale_t) \
+ || defined _GL_ALREADY_INCLUDING_LOCALE_H
-/* Special invocation conventions to handle Solaris header files
- (through Solaris 10) when combined with gettext's libintl.h. */
+/* Special invocation convention:
+ - Inside mingw header files,
+ - To handle Solaris header files (through Solaris 10) when combined
+ with gettext's libintl.h. */
#@INCLUDE_NEXT@ @NEXT_LOCALE_H@
@@ -187,11 +190,40 @@ _GL_WARN_ON_USE (setlocale, "setlocale works differently on native Windows - "
# endif
#endif
-#if @GNULIB_DUPLOCALE@
+#if /*@GNULIB_NEWLOCALE@ ||*/ (@GNULIB_LOCALENAME@ && @HAVE_NEWLOCALE@)
+# if @REPLACE_NEWLOCALE@
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# undef newlocale
+# define newlocale rpl_newlocale
+# define GNULIB_defined_newlocale 1
+# endif
+_GL_FUNCDECL_RPL (newlocale, locale_t,
+ (int category_mask, const char *name, locale_t base)
+ _GL_ARG_NONNULL ((2)));
+_GL_CXXALIAS_RPL (newlocale, locale_t,
+ (int category_mask, const char *name, locale_t base));
+# else
+# if @HAVE_NEWLOCALE@
+_GL_CXXALIAS_SYS (newlocale, locale_t,
+ (int category_mask, const char *name, locale_t base));
+# endif
+# endif
+# if @HAVE_NEWLOCALE@
+_GL_CXXALIASWARN (newlocale);
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef newlocale
+# if HAVE_RAW_DECL_NEWLOCALE
+_GL_WARN_ON_USE (newlocale, "newlocale is not portable");
+# endif
+#endif
+
+#if @GNULIB_DUPLOCALE@ || (@GNULIB_LOCALENAME@ && @HAVE_DUPLOCALE@)
# if @REPLACE_DUPLOCALE@
# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
# undef duplocale
# define duplocale rpl_duplocale
+# define GNULIB_defined_duplocale 1
# endif
_GL_FUNCDECL_RPL (duplocale, locale_t, (locale_t locale) _GL_ARG_NONNULL ((1)));
_GL_CXXALIAS_RPL (duplocale, locale_t, (locale_t locale));
@@ -211,6 +243,30 @@ _GL_WARN_ON_USE (duplocale, "duplocale is buggy on some glibc systems - "
# endif
#endif
+#if /*@GNULIB_FREELOCALE@ ||*/ (@GNULIB_LOCALENAME@ && @HAVE_FREELOCALE@)
+# if @REPLACE_FREELOCALE@
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# undef freelocale
+# define freelocale rpl_freelocale
+# define GNULIB_defined_freelocale 1
+# endif
+_GL_FUNCDECL_RPL (freelocale, void, (locale_t locale) _GL_ARG_NONNULL ((1)));
+_GL_CXXALIAS_RPL (freelocale, void, (locale_t locale));
+# else
+# if @HAVE_FREELOCALE@
+_GL_CXXALIAS_SYS (freelocale, void, (locale_t locale));
+# endif
+# endif
+# if @HAVE_FREELOCALE@
+_GL_CXXALIASWARN (freelocale);
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef freelocale
+# if HAVE_RAW_DECL_FREELOCALE
+_GL_WARN_ON_USE (freelocale, "freelocale is not portable");
+# endif
+#endif
+
#endif /* _@GUARD_PREFIX@_LOCALE_H */
-#endif /* ! _GL_ALREADY_INCLUDING_LOCALE_H */
#endif /* _@GUARD_PREFIX@_LOCALE_H */
+#endif /* !(__need_locale_t || _GL_ALREADY_INCLUDING_LOCALE_H) */
diff --git a/lib/localtime-buffer.c b/lib/localtime-buffer.c
index df11f43..910c8bc 100644
--- a/lib/localtime-buffer.c
+++ b/lib/localtime-buffer.c
@@ -34,6 +34,7 @@ struct tm *localtime_buffer_addr = &tm_zero_buffer;
struct tm *
rpl_localtime (time_t const *timep)
+#undef localtime
{
struct tm *tm = localtime (timep);
@@ -46,6 +47,7 @@ rpl_localtime (time_t const *timep)
/* Same as above, since gmtime and localtime use the same buffer. */
struct tm *
rpl_gmtime (time_t const *timep)
+#undef gmtime
{
struct tm *tm = gmtime (timep);
diff --git a/lib/mbrtowc.c b/lib/mbrtowc.c
index 22ac2c4..2f6df28 100644
--- a/lib/mbrtowc.c
+++ b/lib/mbrtowc.c
@@ -35,12 +35,60 @@
# include "streq.h"
# include "verify.h"
-#ifndef FALLTHROUGH
-# if __GNUC__ < 7
-# define FALLTHROUGH ((void) 0)
-# else
-# define FALLTHROUGH __attribute__ ((__fallthrough__))
+# ifndef FALLTHROUGH
+# if __GNUC__ < 7
+# define FALLTHROUGH ((void) 0)
+# else
+# define FALLTHROUGH __attribute__ ((__fallthrough__))
+# endif
# endif
+
+/* Returns a classification of special values of the encoding of the current
+ locale. */
+typedef enum {
+ enc_other, /* other */
+ enc_utf8, /* UTF-8 */
+ enc_eucjp, /* EUC-JP */
+ enc_94, /* EUC-KR, GB2312, BIG5 */
+ enc_euctw, /* EUC-TW */
+ enc_gb18030, /* GB18030 */
+ enc_sjis /* SJIS */
+} enc_t;
+static inline enc_t
+locale_enc (void)
+{
+ const char *encoding = locale_charset ();
+ if (STREQ_OPT (encoding, "UTF-8", 'U', 'T', 'F', '-', '8', 0, 0, 0, 0))
+ return enc_utf8;
+ if (STREQ_OPT (encoding, "EUC-JP", 'E', 'U', 'C', '-', 'J', 'P', 0, 0, 0))
+ return enc_eucjp;
+ if (STREQ_OPT (encoding, "EUC-KR", 'E', 'U', 'C', '-', 'K', 'R', 0, 0, 0)
+ || STREQ_OPT (encoding, "GB2312", 'G', 'B', '2', '3', '1', '2', 0, 0, 0)
+ || STREQ_OPT (encoding, "BIG5", 'B', 'I', 'G', '5', 0, 0, 0, 0, 0))
+ return enc_94;
+ if (STREQ_OPT (encoding, "EUC-TW", 'E', 'U', 'C', '-', 'T', 'W', 0, 0, 0))
+ return enc_euctw;
+ if (STREQ_OPT (encoding, "GB18030", 'G', 'B', '1', '8', '0', '3', '0', 0, 0))
+ return enc_gb18030;
+ if (STREQ_OPT (encoding, "SJIS", 'S', 'J', 'I', 'S', 0, 0, 0, 0, 0))
+ return enc_sjis;
+ return enc_other;
+}
+
+#if GNULIB_WCHAR_SINGLE
+/* When we know that the locale does not change, provide a speedup by
+ caching the value of locale_enc. */
+static int cached_locale_enc = -1;
+static inline enc_t
+locale_enc_cached (void)
+{
+ if (cached_locale_enc < 0)
+ cached_locale_enc = locale_enc ();
+ return cached_locale_enc;
+}
+#else
+/* By default, don't make assumptions, hence no caching. */
+# define locale_enc_cached locale_enc
#endif
verify (sizeof (mbstate_t) >= 4);
@@ -137,10 +185,9 @@ mbrtowc (wchar_t *pwc, const char *s, size_t n, mbstate_t *ps)
if (m >= 4 || m >= MB_CUR_MAX)
goto invalid;
/* Here MB_CUR_MAX > 1 and 0 < m < 4. */
- {
- const char *encoding = locale_charset ();
-
- if (STREQ_OPT (encoding, "UTF-8", 'U', 'T', 'F', '-', '8', 0, 0, 0, 0))
+ switch (locale_enc_cached ())
+ {
+ case enc_utf8: /* UTF-8 */
{
/* Cf. unistr/u8-mblen.c. */
unsigned char c = (unsigned char) p[0];
@@ -197,8 +244,7 @@ mbrtowc (wchar_t *pwc, const char *s, size_t n, mbstate_t *ps)
/* As a reference for this code, you can use the GNU libiconv
implementation. Look for uses of the RET_TOOFEW macro. */
- if (STREQ_OPT (encoding,
- "EUC-JP", 'E', 'U', 'C', '-', 'J', 'P', 0, 0, 0))
+ case enc_eucjp: /* EUC-JP */
{
if (m == 1)
{
@@ -221,12 +267,8 @@ mbrtowc (wchar_t *pwc, const char *s, size_t n, mbstate_t *ps)
}
goto invalid;
}
- if (STREQ_OPT (encoding,
- "EUC-KR", 'E', 'U', 'C', '-', 'K', 'R', 0, 0, 0)
- || STREQ_OPT (encoding,
- "GB2312", 'G', 'B', '2', '3', '1', '2', 0, 0, 0)
- || STREQ_OPT (encoding,
- "BIG5", 'B', 'I', 'G', '5', 0, 0, 0, 0, 0))
+
+ case enc_94: /* EUC-KR, GB2312, BIG5 */
{
if (m == 1)
{
@@ -237,8 +279,8 @@ mbrtowc (wchar_t *pwc, const char *s, size_t n, mbstate_t *ps)
}
goto invalid;
}
- if (STREQ_OPT (encoding,
- "EUC-TW", 'E', 'U', 'C', '-', 'T', 'W', 0, 0, 0))
+
+ case enc_euctw: /* EUC-TW */
{
if (m == 1)
{
@@ -256,8 +298,8 @@ mbrtowc (wchar_t *pwc, const char *s, size_t n, mbstate_t *ps)
}
goto invalid;
}
- if (STREQ_OPT (encoding,
- "GB18030", 'G', 'B', '1', '8', '0', '3', '0', 0, 0))
+
+ case enc_gb18030: /* GB18030 */
{
if (m == 1)
{
@@ -290,7 +332,8 @@ mbrtowc (wchar_t *pwc, const char *s, size_t n, mbstate_t *ps)
}
goto invalid;
}
- if (STREQ_OPT (encoding, "SJIS", 'S', 'J', 'I', 'S', 0, 0, 0, 0, 0))
+
+ case enc_sjis: /* SJIS */
{
if (m == 1)
{
@@ -303,9 +346,10 @@ mbrtowc (wchar_t *pwc, const char *s, size_t n, mbstate_t *ps)
goto invalid;
}
- /* An unknown multibyte encoding. */
- goto incomplete;
- }
+ default:
+ /* An unknown multibyte encoding. */
+ goto incomplete;
+ }
incomplete:
{
diff --git a/lib/mbsinit.c b/lib/mbsinit.c
index 921cbf1..e23a5ad 100644
--- a/lib/mbsinit.c
+++ b/lib/mbsinit.c
@@ -54,7 +54,7 @@ mbsinit (const mbstate_t *ps)
int
mbsinit (const mbstate_t *ps)
{
-# if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
+# if defined _WIN32 && !defined __CYGWIN__
/* Native Windows. */
# ifdef __MINGW32__
/* On mingw, 'mbstate_t' is defined as 'int'. */
diff --git a/lib/memrchr.c b/lib/memrchr.c
index 99acfd9..2efc7cb 100644
--- a/lib/memrchr.c
+++ b/lib/memrchr.c
@@ -68,7 +68,7 @@ __memrchr (void const *s, int c_in, size_t n)
if (*--char_ptr == c)
return (void *) char_ptr;
- longword_ptr = (const longword *) char_ptr;
+ longword_ptr = (const void *) char_ptr;
/* All these elucidatory comments refer to 4-byte longwords,
but the theory applies equally well to any size longwords. */
diff --git a/lib/mkdir.c b/lib/mkdir.c
new file mode 100644
index 0000000..37d5a0f
--- /dev/null
+++ b/lib/mkdir.c
@@ -0,0 +1,93 @@
+/* On some systems, mkdir ("foo/", 0700) fails because of the trailing
+ slash. On those systems, this wrapper removes the trailing slash.
+
+ Copyright (C) 2001, 2003, 2006, 2008-2018 Free Software Foundation, Inc.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <https://www.gnu.org/licenses/>. */
+
+/* written by Jim Meyering */
+
+#include <config.h>
+
+/* Specification. */
+#include <sys/stat.h>
+
+#include <errno.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+
+#include "dirname.h"
+
+/* Disable the definition of mkdir to rpl_mkdir (from the <sys/stat.h>
+ substitute) in this file. Otherwise, we'd get an endless recursion. */
+#undef mkdir
+
+/* mingw's _mkdir() function has 1 argument, but we pass 2 arguments.
+ Additionally, it declares _mkdir (and depending on compile flags, an
+ alias mkdir), only in the nonstandard includes <direct.h> and <io.h>,
+ which are included in the <sys/stat.h> override. */
+#if defined _WIN32 && ! defined __CYGWIN__
+# define mkdir(name,mode) _mkdir (name)
+# define maybe_unused _GL_UNUSED
+#else
+# define maybe_unused /* empty */
+#endif
+
+/* This function is required at least for NetBSD 1.5.2. */
+
+int
+rpl_mkdir (char const *dir, mode_t mode maybe_unused)
+{
+ int ret_val;
+ char *tmp_dir;
+ size_t len = strlen (dir);
+
+ if (len && dir[len - 1] == '/')
+ {
+ tmp_dir = strdup (dir);
+ if (!tmp_dir)
+ {
+ /* Rather than rely on strdup-posix, we set errno ourselves. */
+ errno = ENOMEM;
+ return -1;
+ }
+ strip_trailing_slashes (tmp_dir);
+ }
+ else
+ {
+ tmp_dir = (char *) dir;
+ }
+#if FUNC_MKDIR_DOT_BUG
+ /* Additionally, cygwin 1.5 mistakenly creates a directory "d/./". */
+ {
+ char *last = last_component (tmp_dir);
+ if (*last == '.' && (last[1] == '\0'
+ || (last[1] == '.' && last[2] == '\0')))
+ {
+ struct stat st;
+ if (stat (tmp_dir, &st) == 0)
+ errno = EEXIST;
+ return -1;
+ }
+ }
+#endif /* FUNC_MKDIR_DOT_BUG */
+
+ ret_val = mkdir (tmp_dir, mode);
+
+ if (tmp_dir != dir)
+ free (tmp_dir);
+
+ return ret_val;
+}
diff --git a/lib/msvc-nothrow.h b/lib/msvc-nothrow.h
index f7a7f8a..a9671c3 100644
--- a/lib/msvc-nothrow.h
+++ b/lib/msvc-nothrow.h
@@ -25,7 +25,7 @@
This file defines wrappers that turn such an invalid parameter notification
into an error code. */
-#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
+#if defined _WIN32 && ! defined __CYGWIN__
/* Get original declaration of _get_osfhandle. */
# include <io.h>
diff --git a/lib/nl_langinfo.c b/lib/nl_langinfo.c
index d98f034..ea26730 100644
--- a/lib/nl_langinfo.c
+++ b/lib/nl_langinfo.c
@@ -22,7 +22,7 @@
#include <locale.h>
#include <string.h>
-#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
+#if defined _WIN32 && ! defined __CYGWIN__
# define WIN32_LEAN_AND_MEAN /* avoid including junk */
# include <windows.h>
# include <stdio.h>
@@ -65,7 +65,7 @@ ctype_codeset (void)
}
}
-# if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
+# if 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
@@ -191,8 +191,10 @@ nl_langinfo (nl_item item)
return localeconv () ->decimal_point;
case THOUSEP:
return localeconv () ->thousands_sep;
+# ifdef GROUPING
case GROUPING:
return localeconv () ->grouping;
+# endif
/* nl_langinfo items of the LC_TIME category.
TODO: Really use the locale. */
case D_T_FMT:
@@ -320,6 +322,7 @@ nl_langinfo (nl_item item)
/* nl_langinfo items of the LC_MONETARY category. */
case CRNCYSTR:
return localeconv () ->currency_symbol;
+# ifdef INT_CURR_SYMBOL
case INT_CURR_SYMBOL:
return localeconv () ->int_curr_symbol;
case MON_DECIMAL_POINT:
@@ -348,6 +351,7 @@ nl_langinfo (nl_item item)
return & localeconv () ->p_sign_posn;
case N_SIGN_POSN:
return & localeconv () ->n_sign_posn;
+# endif
/* nl_langinfo items of the LC_MESSAGES category
TODO: Really use the locale. */
case YESEXPR:
diff --git a/lib/obstack.h b/lib/obstack.h
index 2a11e73..cff4205 100644
--- a/lib/obstack.h
+++ b/lib/obstack.h
@@ -111,7 +111,7 @@
#include <stddef.h> /* For size_t and ptrdiff_t. */
#include <string.h> /* For __GNU_LIBRARY__, and memcpy. */
-#if __STDC_VERSION__ < 199901L
+#if __STDC_VERSION__ < 199901L || defined __HP_cc
# define __FLEXIBLE_ARRAY_MEMBER 1
#else
# define __FLEXIBLE_ARRAY_MEMBER
diff --git a/lib/pathmax.h b/lib/pathmax.h
index 1eafb49..7052e6a 100644
--- a/lib/pathmax.h
+++ b/lib/pathmax.h
@@ -65,7 +65,7 @@
# define PATH_MAX 1024
# endif
-# if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
+# if defined _WIN32 && ! defined __CYGWIN__
/* The page "Naming Files, Paths, and Namespaces" on msdn.microsoft.com,
section "Maximum Path Length Limitation",
<https://msdn.microsoft.com/en-us/library/aa365247.aspx#maxpath>
diff --git a/lib/ref-add.sin b/lib/ref-add.sin
deleted file mode 100644
index 1bbf38f..0000000
--- a/lib/ref-add.sin
+++ /dev/null
@@ -1,29 +0,0 @@
-# Add this package to a list of references stored in a text file.
-#
-# Copyright (C) 2000, 2009-2018 Free Software Foundation, Inc.
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 3, or (at your option)
-# any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License along
-# with this program; if not, see <https://www.gnu.org/licenses/>.
-#
-# Written by Bruno Haible <haible@clisp.cons.org>.
-#
-/^# Packages using this file: / {
- s/# Packages using this file://
- ta
- :a
- s/ @PACKAGE@ / @PACKAGE@ /
- tb
- s/ $/ @PACKAGE@ /
- :b
- s/^/# Packages using this file:/
-}
diff --git a/lib/ref-del.sin b/lib/ref-del.sin
deleted file mode 100644
index 5965092..0000000
--- a/lib/ref-del.sin
+++ /dev/null
@@ -1,24 +0,0 @@
-# Remove this package from a list of references stored in a text file.
-#
-# Copyright (C) 2000, 2009-2018 Free Software Foundation, Inc.
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 3, or (at your option)
-# any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License along
-# with this program; if not, see <https://www.gnu.org/licenses/>.
-#
-# Written by Bruno Haible <haible@clisp.cons.org>.
-#
-/^# Packages using this file: / {
- s/# Packages using this file://
- s/ @PACKAGE@ / /
- s/^/# Packages using this file:/
-}
diff --git a/lib/regcomp.c b/lib/regcomp.c
index c2c577a..0b05a63 100644
--- a/lib/regcomp.c
+++ b/lib/regcomp.c
@@ -476,7 +476,7 @@ regcomp (regex_t *_Restrict_ preg, const char *_Restrict_ pattern, int cflags)
/* Try to allocate space for the fastmap. */
preg->fastmap = re_malloc (char, SBC_MAX);
- if (BE (preg->fastmap == NULL, 0))
+ if (__glibc_unlikely (preg->fastmap == NULL))
return REG_ESPACE;
syntax |= (cflags & REG_ICASE) ? RE_ICASE : 0;
@@ -502,7 +502,7 @@ regcomp (regex_t *_Restrict_ preg, const char *_Restrict_ pattern, int cflags)
ret = REG_EPAREN;
/* We have already checked preg->fastmap != NULL. */
- if (BE (ret == REG_NOERROR, 1))
+ if (__glibc_likely (ret == REG_NOERROR))
/* Compute the fastmap now, since regexec cannot modify the pattern
buffer. This function never fails in this implementation. */
(void) re_compile_fastmap (preg);
@@ -529,10 +529,9 @@ regerror (int errcode, const regex_t *_Restrict_ preg, char *_Restrict_ errbuf,
{
const char *msg;
size_t msg_size;
+ int nerrcodes = sizeof __re_error_msgid_idx / sizeof __re_error_msgid_idx[0];
- if (BE (errcode < 0
- || errcode >= (int) (sizeof (__re_error_msgid_idx)
- / sizeof (__re_error_msgid_idx[0])), 0))
+ if (__glibc_unlikely (errcode < 0 || errcode >= nerrcodes))
/* Only error codes returned by the rest of the code should be passed
to this routine. If we are given anything else, or if other regex
code generates an invalid error code, then the program has a bug.
@@ -543,10 +542,10 @@ regerror (int errcode, const regex_t *_Restrict_ preg, char *_Restrict_ errbuf,
msg_size = strlen (msg) + 1; /* Includes the null. */
- if (BE (errbuf_size != 0, 1))
+ if (__glibc_likely (errbuf_size != 0))
{
size_t cpy_size = msg_size;
- if (BE (msg_size > errbuf_size, 0))
+ if (__glibc_unlikely (msg_size > errbuf_size))
{
cpy_size = errbuf_size - 1;
errbuf[cpy_size] = '\0';
@@ -644,7 +643,7 @@ void
regfree (regex_t *preg)
{
re_dfa_t *dfa = preg->buffer;
- if (BE (dfa != NULL, 1))
+ if (__glibc_likely (dfa != NULL))
{
lock_fini (dfa->lock);
free_dfa_content (dfa);
@@ -754,7 +753,7 @@ re_compile_internal (regex_t *preg, const char * pattern, size_t length,
/* Initialize the dfa. */
dfa = preg->buffer;
- if (BE (preg->allocated < sizeof (re_dfa_t), 0))
+ if (__glibc_unlikely (preg->allocated < sizeof (re_dfa_t)))
{
/* If zero allocated, but buffer is non-null, try to realloc
enough space. This loses if buffer's address is bogus, but
@@ -769,9 +768,9 @@ 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))
+ if (__glibc_unlikely (err == REG_NOERROR && lock_init (dfa->lock) != 0))
err = REG_ESPACE;
- if (BE (err != REG_NOERROR, 0))
+ if (__glibc_unlikely (err != REG_NOERROR))
{
free_dfa_content (dfa);
preg->buffer = NULL;
@@ -786,7 +785,7 @@ re_compile_internal (regex_t *preg, const char * pattern, size_t length,
err = re_string_construct (&regexp, pattern, length, preg->translate,
(syntax & RE_ICASE) != 0, dfa);
- if (BE (err != REG_NOERROR, 0))
+ if (__glibc_unlikely (err != REG_NOERROR))
{
re_compile_internal_free_return:
free_workarea_compile (preg);
@@ -801,12 +800,12 @@ re_compile_internal (regex_t *preg, const char * pattern, size_t length,
/* Parse the regular expression, and build a structure tree. */
preg->re_nsub = 0;
dfa->str_tree = parse (&regexp, preg, syntax, &err);
- if (BE (dfa->str_tree == NULL, 0))
+ if (__glibc_unlikely (dfa->str_tree == NULL))
goto re_compile_internal_free_return;
/* Analyze the tree and create the nfa. */
err = analyze (preg);
- if (BE (err != REG_NOERROR, 0))
+ if (__glibc_unlikely (err != REG_NOERROR))
goto re_compile_internal_free_return;
#ifdef RE_ENABLE_I18N
@@ -822,7 +821,7 @@ re_compile_internal (regex_t *preg, const char * pattern, size_t length,
free_workarea_compile (preg);
re_string_destruct (&regexp);
- if (BE (err != REG_NOERROR, 0))
+ if (__glibc_unlikely (err != REG_NOERROR))
{
lock_fini (dfa->lock);
free_dfa_content (dfa);
@@ -864,7 +863,8 @@ init_dfa (re_dfa_t *dfa, size_t pat_len)
calculation below, and for similar doubling calculations
elsewhere. And it's <= rather than <, because some of the
doubling calculations add 1 afterwards. */
- if (BE (MIN (IDX_MAX, SIZE_MAX / max_object_size) / 2 <= pat_len, 0))
+ if (__glibc_unlikely (MIN (IDX_MAX, SIZE_MAX / max_object_size) / 2
+ <= pat_len))
return REG_ESPACE;
dfa->nodes_alloc = pat_len + 1;
@@ -908,7 +908,7 @@ init_dfa (re_dfa_t *dfa, size_t pat_len)
int i, j, ch;
dfa->sb_char = (re_bitset_ptr_t) calloc (sizeof (bitset_t), 1);
- if (BE (dfa->sb_char == NULL, 0))
+ if (__glibc_unlikely (dfa->sb_char == NULL))
return REG_ESPACE;
/* Set the bits corresponding to single byte chars. */
@@ -927,7 +927,7 @@ init_dfa (re_dfa_t *dfa, size_t pat_len)
}
#endif
- if (BE (dfa->nodes == NULL || dfa->state_table == NULL, 0))
+ if (__glibc_unlikely (dfa->nodes == NULL || dfa->state_table == NULL))
return REG_ESPACE;
return REG_NOERROR;
}
@@ -943,7 +943,7 @@ init_word_char (re_dfa_t *dfa)
int j;
int ch = 0;
dfa->word_ops_used = 1;
- if (BE (dfa->map_notascii == 0, 1))
+ if (__glibc_likely (dfa->map_notascii == 0))
{
/* Avoid uint32_t and uint64_t as some non-GCC platforms lack
them, an issue when this code is used in Gnulib. */
@@ -970,7 +970,7 @@ init_word_char (re_dfa_t *dfa)
goto general_case;
ch = 128;
- if (BE (dfa->is_utf8, 1))
+ if (__glibc_likely (dfa->is_utf8))
{
memset (&dfa->word_char[i], '\0', (SBC_MAX - ch) / 8);
return;
@@ -1017,7 +1017,7 @@ create_initial_state (re_dfa_t *dfa)
first = dfa->str_tree->first->node_idx;
dfa->init_node = first;
err = re_node_set_init_copy (&init_nodes, dfa->eclosures + first);
- if (BE (err != REG_NOERROR, 0))
+ if (__glibc_unlikely (err != REG_NOERROR))
return err;
/* The back-references which are in initial states can epsilon transit,
@@ -1061,7 +1061,7 @@ create_initial_state (re_dfa_t *dfa)
/* It must be the first time to invoke acquire_state. */
dfa->init_state = re_acquire_state_context (&err, dfa, &init_nodes, 0);
/* We don't check ERR here, since the initial state must not be NULL. */
- if (BE (dfa->init_state == NULL, 0))
+ if (__glibc_unlikely (dfa->init_state == NULL))
return err;
if (dfa->init_state->has_constraint)
{
@@ -1073,8 +1073,9 @@ create_initial_state (re_dfa_t *dfa)
&init_nodes,
CONTEXT_NEWLINE
| CONTEXT_BEGBUF);
- if (BE (dfa->init_state_word == NULL || dfa->init_state_nl == NULL
- || dfa->init_state_begbuf == NULL, 0))
+ if (__glibc_unlikely (dfa->init_state_word == NULL
+ || dfa->init_state_nl == NULL
+ || dfa->init_state_begbuf == NULL))
return err;
}
else
@@ -1181,8 +1182,8 @@ analyze (regex_t *preg)
dfa->org_indices = re_malloc (Idx, dfa->nodes_alloc);
dfa->edests = re_malloc (re_node_set, dfa->nodes_alloc);
dfa->eclosures = re_malloc (re_node_set, dfa->nodes_alloc);
- if (BE (dfa->nexts == NULL || dfa->org_indices == NULL || dfa->edests == NULL
- || dfa->eclosures == NULL, 0))
+ if (__glibc_unlikely (dfa->nexts == NULL || dfa->org_indices == NULL
+ || dfa->edests == NULL || dfa->eclosures == NULL))
return REG_ESPACE;
dfa->subexp_map = re_malloc (Idx, preg->re_nsub);
@@ -1203,17 +1204,17 @@ analyze (regex_t *preg)
}
ret = postorder (dfa->str_tree, lower_subexps, preg);
- if (BE (ret != REG_NOERROR, 0))
+ if (__glibc_unlikely (ret != REG_NOERROR))
return ret;
ret = postorder (dfa->str_tree, calc_first, dfa);
- if (BE (ret != REG_NOERROR, 0))
+ if (__glibc_unlikely (ret != REG_NOERROR))
return ret;
preorder (dfa->str_tree, calc_next, dfa);
ret = preorder (dfa->str_tree, link_nfa_nodes, dfa);
- if (BE (ret != REG_NOERROR, 0))
+ if (__glibc_unlikely (ret != REG_NOERROR))
return ret;
ret = calc_eclosure (dfa);
- if (BE (ret != REG_NOERROR, 0))
+ if (__glibc_unlikely (ret != REG_NOERROR))
return ret;
/* We only need this during the prune_impossible_nodes pass in regexec.c;
@@ -1222,7 +1223,7 @@ analyze (regex_t *preg)
|| dfa->nbackref)
{
dfa->inveclosures = re_malloc (re_node_set, dfa->nodes_len);
- if (BE (dfa->inveclosures == NULL, 0))
+ if (__glibc_unlikely (dfa->inveclosures == NULL))
return REG_ESPACE;
ret = calc_inveclosure (dfa);
}
@@ -1252,7 +1253,7 @@ postorder (bin_tree_t *root, reg_errcode_t (fn (void *, bin_tree_t *)),
do
{
reg_errcode_t err = fn (extra, node);
- if (BE (err != REG_NOERROR, 0))
+ if (__glibc_unlikely (err != REG_NOERROR))
return err;
if (node->parent == NULL)
return REG_NOERROR;
@@ -1274,7 +1275,7 @@ preorder (bin_tree_t *root, reg_errcode_t (fn (void *, bin_tree_t *)),
for (node = root; ; )
{
reg_errcode_t err = fn (extra, node);
- if (BE (err != REG_NOERROR, 0))
+ if (__glibc_unlikely (err != REG_NOERROR))
return err;
/* Go to the left node, or up and to the right. */
@@ -1375,7 +1376,8 @@ lower_subexp (reg_errcode_t *err, regex_t *preg, bin_tree_t *node)
cls = create_tree (dfa, NULL, NULL, OP_CLOSE_SUBEXP);
tree1 = body ? create_tree (dfa, body, cls, CONCAT) : cls;
tree = create_tree (dfa, op, tree1, CONCAT);
- if (BE (tree == NULL || tree1 == NULL || op == NULL || cls == NULL, 0))
+ if (__glibc_unlikely (tree == NULL || tree1 == NULL
+ || op == NULL || cls == NULL))
{
*err = REG_ESPACE;
return NULL;
@@ -1401,7 +1403,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 == -1, 0))
+ if (__glibc_unlikely (node->node_idx == -1))
return REG_ESPACE;
if (node->token.type == ANCHOR)
dfa->nodes[node->node_idx].constraint = node->token.opr.ctx_type;
@@ -1512,11 +1514,11 @@ 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 == -1, 0))
+ if (__glibc_unlikely (clone_dest == -1))
return REG_ESPACE;
dfa->nexts[clone_node] = dfa->nexts[org_node];
ok = re_node_set_insert (dfa->edests + clone_node, clone_dest);
- if (BE (! ok, 0))
+ if (__glibc_unlikely (! ok))
return REG_ESPACE;
}
else if (dfa->edests[org_node].nelem == 0)
@@ -1538,17 +1540,17 @@ duplicate_node_closure (re_dfa_t *dfa, Idx top_org_node, Idx top_clone_node,
if (org_node == root_node && clone_node != org_node)
{
ok = re_node_set_insert (dfa->edests + clone_node, org_dest);
- if (BE (! ok, 0))
+ if (__glibc_unlikely (! ok))
return REG_ESPACE;
break;
}
/* 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 == -1, 0))
+ if (__glibc_unlikely (clone_dest == -1))
return REG_ESPACE;
ok = re_node_set_insert (dfa->edests + clone_node, clone_dest);
- if (BE (! ok, 0))
+ if (__glibc_unlikely (! ok))
return REG_ESPACE;
}
else /* dfa->edests[org_node].nelem == 2 */
@@ -1564,14 +1566,14 @@ duplicate_node_closure (re_dfa_t *dfa, Idx top_org_node, Idx top_clone_node,
/* 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 == -1, 0))
+ if (__glibc_unlikely (clone_dest == -1))
return REG_ESPACE;
ok = re_node_set_insert (dfa->edests + clone_node, clone_dest);
- if (BE (! ok, 0))
+ if (__glibc_unlikely (! ok))
return REG_ESPACE;
err = duplicate_node_closure (dfa, org_dest, clone_dest,
root_node, constraint);
- if (BE (err != REG_NOERROR, 0))
+ if (__glibc_unlikely (err != REG_NOERROR))
return err;
}
else
@@ -1579,16 +1581,16 @@ duplicate_node_closure (re_dfa_t *dfa, Idx top_org_node, Idx top_clone_node,
/* There is a duplicated node which satisfies the constraint,
use it to avoid infinite loop. */
ok = re_node_set_insert (dfa->edests + clone_node, clone_dest);
- if (BE (! ok, 0))
+ if (__glibc_unlikely (! ok))
return REG_ESPACE;
}
org_dest = dfa->edests[org_node].elems[1];
clone_dest = duplicate_node (dfa, org_dest, constraint);
- if (BE (clone_dest == -1, 0))
+ if (__glibc_unlikely (clone_dest == -1))
return REG_ESPACE;
ok = re_node_set_insert (dfa->edests + clone_node, clone_dest);
- if (BE (! ok, 0))
+ if (__glibc_unlikely (! ok))
return REG_ESPACE;
}
org_node = org_dest;
@@ -1622,7 +1624,7 @@ 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 != -1, 1))
+ if (__glibc_likely (dup_idx != -1))
{
dfa->nodes[dup_idx].constraint = constraint;
dfa->nodes[dup_idx].constraint |= dfa->nodes[org_idx].constraint;
@@ -1648,7 +1650,7 @@ calc_inveclosure (re_dfa_t *dfa)
for (idx = 0; idx < dfa->eclosures[src].nelem; ++idx)
{
ok = re_node_set_insert_last (dfa->inveclosures + elems[idx], src);
- if (BE (! ok, 0))
+ if (__glibc_unlikely (! ok))
return REG_ESPACE;
}
}
@@ -1689,7 +1691,7 @@ calc_eclosure (re_dfa_t *dfa)
continue;
/* Calculate epsilon closure of 'node_idx'. */
err = calc_eclosure_iter (&eclosure_elem, dfa, node_idx, true);
- if (BE (err != REG_NOERROR, 0))
+ if (__glibc_unlikely (err != REG_NOERROR))
return err;
if (dfa->eclosures[node_idx].nelem == 0)
@@ -1712,7 +1714,7 @@ calc_eclosure_iter (re_node_set *new_set, re_dfa_t *dfa, Idx node, bool root)
bool ok;
bool incomplete = false;
err = re_node_set_alloc (&eclosure, dfa->edests[node].nelem + 1);
- if (BE (err != REG_NOERROR, 0))
+ if (__glibc_unlikely (err != REG_NOERROR))
return err;
/* This indicates that we are calculating this node now.
@@ -1727,7 +1729,7 @@ calc_eclosure_iter (re_node_set *new_set, re_dfa_t *dfa, Idx node, bool root)
{
err = duplicate_node_closure (dfa, node, node, node,
dfa->nodes[node].constraint);
- if (BE (err != REG_NOERROR, 0))
+ if (__glibc_unlikely (err != REG_NOERROR))
return err;
}
@@ -1749,14 +1751,14 @@ calc_eclosure_iter (re_node_set *new_set, re_dfa_t *dfa, Idx node, bool root)
if (dfa->eclosures[edest].nelem == 0)
{
err = calc_eclosure_iter (&eclosure_elem, dfa, edest, false);
- if (BE (err != REG_NOERROR, 0))
+ if (__glibc_unlikely (err != REG_NOERROR))
return err;
}
else
eclosure_elem = dfa->eclosures[edest];
/* Merge the epsilon closure of 'edest'. */
err = re_node_set_merge (&eclosure, &eclosure_elem);
- if (BE (err != REG_NOERROR, 0))
+ if (__glibc_unlikely (err != REG_NOERROR))
return err;
/* If the epsilon closure of 'edest' is incomplete,
the epsilon closure of this node is also incomplete. */
@@ -1769,7 +1771,7 @@ calc_eclosure_iter (re_node_set *new_set, re_dfa_t *dfa, Idx node, bool root)
/* An epsilon closure includes itself. */
ok = re_node_set_insert (&eclosure, node);
- if (BE (! ok, 0))
+ if (__glibc_unlikely (! ok))
return REG_ESPACE;
if (incomplete && !root)
dfa->eclosures[node].nelem = 0;
@@ -2139,14 +2141,14 @@ parse (re_string_t *regexp, regex_t *preg, reg_syntax_t syntax,
dfa->syntax = syntax;
fetch_token (&current_token, regexp, syntax | RE_CARET_ANCHORS_HERE);
tree = parse_reg_exp (regexp, preg, &current_token, syntax, 0, err);
- if (BE (*err != REG_NOERROR && tree == NULL, 0))
+ if (__glibc_unlikely (*err != REG_NOERROR && tree == NULL))
return NULL;
eor = create_tree (dfa, NULL, NULL, END_OF_RE);
if (tree != NULL)
root = create_tree (dfa, tree, eor, CONCAT);
else
root = eor;
- if (BE (eor == NULL || root == NULL, 0))
+ if (__glibc_unlikely (eor == NULL || root == NULL))
{
*err = REG_ESPACE;
return NULL;
@@ -2171,7 +2173,7 @@ parse_reg_exp (re_string_t *regexp, regex_t *preg, re_token_t *token,
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))
+ if (__glibc_unlikely (*err != REG_NOERROR && tree == NULL))
return NULL;
while (token->type == OP_ALT)
@@ -2183,7 +2185,7 @@ parse_reg_exp (re_string_t *regexp, regex_t *preg, re_token_t *token,
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))
+ if (__glibc_unlikely (*err != REG_NOERROR && branch == NULL))
{
if (tree != NULL)
postorder (tree, free_tree, NULL);
@@ -2194,7 +2196,7 @@ parse_reg_exp (re_string_t *regexp, regex_t *preg, re_token_t *token,
else
branch = NULL;
tree = create_tree (dfa, tree, branch, OP_ALT);
- if (BE (tree == NULL, 0))
+ if (__glibc_unlikely (tree == NULL))
{
*err = REG_ESPACE;
return NULL;
@@ -2219,14 +2221,14 @@ parse_branch (re_string_t *regexp, regex_t *preg, re_token_t *token,
bin_tree_t *tree, *expr;
re_dfa_t *dfa = preg->buffer;
tree = parse_expression (regexp, preg, token, syntax, nest, err);
- if (BE (*err != REG_NOERROR && tree == NULL, 0))
+ if (__glibc_unlikely (*err != REG_NOERROR && tree == NULL))
return NULL;
while (token->type != OP_ALT && token->type != END_OF_RE
&& (nest == 0 || token->type != OP_CLOSE_SUBEXP))
{
expr = parse_expression (regexp, preg, token, syntax, nest, err);
- if (BE (*err != REG_NOERROR && expr == NULL, 0))
+ if (__glibc_unlikely (*err != REG_NOERROR && expr == NULL))
{
if (tree != NULL)
postorder (tree, free_tree, NULL);
@@ -2267,7 +2269,7 @@ parse_expression (re_string_t *regexp, regex_t *preg, re_token_t *token,
{
case CHARACTER:
tree = create_token_tree (dfa, NULL, NULL, token);
- if (BE (tree == NULL, 0))
+ if (__glibc_unlikely (tree == NULL))
{
*err = REG_ESPACE;
return NULL;
@@ -2282,7 +2284,7 @@ parse_expression (re_string_t *regexp, regex_t *preg, re_token_t *token,
fetch_token (token, regexp, syntax);
mbc_remain = create_token_tree (dfa, NULL, NULL, token);
tree = create_tree (dfa, tree, mbc_remain, CONCAT);
- if (BE (mbc_remain == NULL || tree == NULL, 0))
+ if (__glibc_unlikely (mbc_remain == NULL || tree == NULL))
{
*err = REG_ESPACE;
return NULL;
@@ -2294,25 +2296,25 @@ parse_expression (re_string_t *regexp, regex_t *preg, re_token_t *token,
case OP_OPEN_SUBEXP:
tree = parse_sub_exp (regexp, preg, token, syntax, nest + 1, err);
- if (BE (*err != REG_NOERROR && tree == NULL, 0))
+ if (__glibc_unlikely (*err != REG_NOERROR && tree == NULL))
return NULL;
break;
case OP_OPEN_BRACKET:
tree = parse_bracket_exp (regexp, dfa, token, syntax, err);
- if (BE (*err != REG_NOERROR && tree == NULL, 0))
+ if (__glibc_unlikely (*err != REG_NOERROR && tree == NULL))
return NULL;
break;
case OP_BACK_REF:
- if (!BE (dfa->completed_bkref_map & (1 << token->opr.idx), 1))
+ if (!__glibc_likely (dfa->completed_bkref_map & (1 << token->opr.idx)))
{
*err = REG_ESUBREG;
return NULL;
}
dfa->used_bkref_map |= 1 << token->opr.idx;
tree = create_token_tree (dfa, NULL, NULL, token);
- if (BE (tree == NULL, 0))
+ if (__glibc_unlikely (tree == NULL))
{
*err = REG_ESPACE;
return NULL;
@@ -2358,7 +2360,7 @@ parse_expression (re_string_t *regexp, regex_t *preg, re_token_t *token,
/* mb_partial and word_char bits should be initialized already
by peek_token. */
tree = create_token_tree (dfa, NULL, NULL, token);
- if (BE (tree == NULL, 0))
+ if (__glibc_unlikely (tree == NULL))
{
*err = REG_ESPACE;
return NULL;
@@ -2388,7 +2390,8 @@ parse_expression (re_string_t *regexp, regex_t *preg, re_token_t *token,
}
tree_last = create_token_tree (dfa, NULL, NULL, token);
tree = create_tree (dfa, tree_first, tree_last, OP_ALT);
- if (BE (tree_first == NULL || tree_last == NULL || tree == NULL, 0))
+ if (__glibc_unlikely (tree_first == NULL || tree_last == NULL
+ || tree == NULL))
{
*err = REG_ESPACE;
return NULL;
@@ -2397,7 +2400,7 @@ parse_expression (re_string_t *regexp, regex_t *preg, re_token_t *token,
else
{
tree = create_token_tree (dfa, NULL, NULL, token);
- if (BE (tree == NULL, 0))
+ if (__glibc_unlikely (tree == NULL))
{
*err = REG_ESPACE;
return NULL;
@@ -2412,7 +2415,7 @@ parse_expression (re_string_t *regexp, regex_t *preg, re_token_t *token,
case OP_PERIOD:
tree = create_token_tree (dfa, NULL, NULL, token);
- if (BE (tree == NULL, 0))
+ if (__glibc_unlikely (tree == NULL))
{
*err = REG_ESPACE;
return NULL;
@@ -2427,7 +2430,7 @@ parse_expression (re_string_t *regexp, regex_t *preg, re_token_t *token,
"alnum",
"_",
token->type == OP_NOTWORD, err);
- if (BE (*err != REG_NOERROR && tree == NULL, 0))
+ if (__glibc_unlikely (*err != REG_NOERROR && tree == NULL))
return NULL;
break;
@@ -2437,7 +2440,7 @@ parse_expression (re_string_t *regexp, regex_t *preg, re_token_t *token,
"space",
"",
token->type == OP_NOTSPACE, err);
- if (BE (*err != REG_NOERROR && tree == NULL, 0))
+ if (__glibc_unlikely (*err != REG_NOERROR && tree == NULL))
return NULL;
break;
@@ -2463,7 +2466,7 @@ parse_expression (re_string_t *regexp, regex_t *preg, re_token_t *token,
{
bin_tree_t *dup_tree = parse_dup_op (tree, regexp, dfa, token,
syntax, err);
- if (BE (*err != REG_NOERROR && dup_tree == NULL, 0))
+ if (__glibc_unlikely (*err != REG_NOERROR && dup_tree == NULL))
{
if (tree != NULL)
postorder (tree, free_tree, NULL);
@@ -2509,13 +2512,14 @@ parse_sub_exp (re_string_t *regexp, regex_t *preg, re_token_t *token,
else
{
tree = parse_reg_exp (regexp, preg, token, syntax, nest, err);
- if (BE (*err == REG_NOERROR && token->type != OP_CLOSE_SUBEXP, 0))
+ if (__glibc_unlikely (*err == REG_NOERROR
+ && token->type != OP_CLOSE_SUBEXP))
{
if (tree != NULL)
postorder (tree, free_tree, NULL);
*err = REG_EPAREN;
}
- if (BE (*err != REG_NOERROR, 0))
+ if (__glibc_unlikely (*err != REG_NOERROR))
return NULL;
}
@@ -2523,7 +2527,7 @@ parse_sub_exp (re_string_t *regexp, regex_t *preg, re_token_t *token,
dfa->completed_bkref_map |= 1 << cur_nsub;
tree = create_tree (dfa, tree, NULL, SUBEXP);
- if (BE (tree == NULL, 0))
+ if (__glibc_unlikely (tree == NULL))
{
*err = REG_ESPACE;
return NULL;
@@ -2556,17 +2560,17 @@ parse_dup_op (bin_tree_t *elem, re_string_t *regexp, re_dfa_t *dfa,
return NULL;
}
}
- if (BE (start != -2, 1))
+ if (__glibc_likely (start != -2))
{
/* 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) : -2));
}
- if (BE (start == -2 || end == -2, 0))
+ if (__glibc_unlikely (start == -2 || end == -2))
{
/* Invalid sequence. */
- if (BE (!(syntax & RE_INVALID_INTERVAL_ORD), 0))
+ if (__glibc_unlikely (!(syntax & RE_INVALID_INTERVAL_ORD)))
{
if (token->type == END_OF_RE)
*err = REG_EBRACE;
@@ -2585,15 +2589,15 @@ parse_dup_op (bin_tree_t *elem, re_string_t *regexp, re_dfa_t *dfa,
return elem;
}
- if (BE ((end != -1 && start > end)
- || token->type != OP_CLOSE_DUP_NUM, 0))
+ if (__glibc_unlikely ((end != -1 && start > end)
+ || token->type != OP_CLOSE_DUP_NUM))
{
/* First number greater than second. */
*err = REG_BADBR;
return NULL;
}
- if (BE (RE_DUP_MAX < (end == -1 ? start : end), 0))
+ if (__glibc_unlikely (RE_DUP_MAX < (end == -1 ? start : end)))
{
*err = REG_ESIZE;
return NULL;
@@ -2607,23 +2611,23 @@ parse_dup_op (bin_tree_t *elem, re_string_t *regexp, re_dfa_t *dfa,
fetch_token (token, regexp, syntax);
- if (BE (elem == NULL, 0))
+ if (__glibc_unlikely (elem == NULL))
return NULL;
- if (BE (start == 0 && end == 0, 0))
+ if (__glibc_unlikely (start == 0 && end == 0))
{
postorder (elem, free_tree, NULL);
return NULL;
}
/* Extract "<re>{n,m}" to "<re><re>...<re><re>{0,<m-n>}". */
- if (BE (start > 0, 0))
+ if (__glibc_unlikely (start > 0))
{
tree = elem;
for (i = 2; i <= start; ++i)
{
elem = duplicate_tree (elem, dfa);
tree = create_tree (dfa, tree, elem, CONCAT);
- if (BE (elem == NULL || tree == NULL, 0))
+ if (__glibc_unlikely (elem == NULL || tree == NULL))
goto parse_dup_op_espace;
}
@@ -2632,7 +2636,7 @@ 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))
+ if (__glibc_unlikely (elem == NULL))
goto parse_dup_op_espace;
old_tree = tree;
}
@@ -2647,13 +2651,9 @@ parse_dup_op (bin_tree_t *elem, re_string_t *regexp, re_dfa_t *dfa,
tree = create_tree (dfa, elem, NULL,
(end == -1 ? OP_DUP_ASTERISK : OP_ALT));
- if (BE (tree == NULL, 0))
+ if (__glibc_unlikely (tree == NULL))
goto parse_dup_op_espace;
-/* From gnulib's "intprops.h":
- True if the arithmetic type T is signed. */
-#define TYPE_SIGNED(t) (! ((t) 0 < (t) -1))
-
/* 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. */
@@ -2662,11 +2662,11 @@ parse_dup_op (bin_tree_t *elem, re_string_t *regexp, re_dfa_t *dfa,
{
elem = duplicate_tree (elem, dfa);
tree = create_tree (dfa, tree, elem, CONCAT);
- if (BE (elem == NULL || tree == NULL, 0))
+ if (__glibc_unlikely (elem == NULL || tree == NULL))
goto parse_dup_op_espace;
tree = create_tree (dfa, tree, NULL, OP_ALT);
- if (BE (tree == NULL, 0))
+ if (__glibc_unlikely (tree == NULL))
goto parse_dup_op_espace;
}
@@ -2688,15 +2688,14 @@ parse_dup_op (bin_tree_t *elem, re_string_t *regexp, re_dfa_t *dfa,
# 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. */
+ unibyte locale, treat B as itself. 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;
+ return mbcset == NULL ? b : __btowc (b);
}
-#endif
+# 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
@@ -2722,17 +2721,18 @@ build_range_exp (const reg_syntax_t syntax,
{
unsigned int start_ch, end_ch;
/* Equivalence Classes and Character Classes can't be a range start/end. */
- if (BE (start_elem->type == EQUIV_CLASS || start_elem->type == CHAR_CLASS
- || end_elem->type == EQUIV_CLASS || end_elem->type == CHAR_CLASS,
- 0))
+ if (__glibc_unlikely (start_elem->type == EQUIV_CLASS
+ || start_elem->type == CHAR_CLASS
+ || end_elem->type == EQUIV_CLASS
+ || end_elem->type == CHAR_CLASS))
return REG_ERANGE;
/* We can handle no multi character collating elements without libc
support. */
- if (BE ((start_elem->type == COLL_SYM
- && strlen ((char *) start_elem->opr.name) > 1)
- || (end_elem->type == COLL_SYM
- && strlen ((char *) end_elem->opr.name) > 1), 0))
+ if (__glibc_unlikely ((start_elem->type == COLL_SYM
+ && strlen ((char *) start_elem->opr.name) > 1)
+ || (end_elem->type == COLL_SYM
+ && strlen ((char *) end_elem->opr.name) > 1)))
return REG_ECOLLATE;
# ifdef RE_ENABLE_I18N
@@ -2753,7 +2753,8 @@ build_range_exp (const reg_syntax_t syntax,
? parse_byte (end_ch, mbcset) : end_elem->opr.wch);
if (start_wc == WEOF || end_wc == WEOF)
return REG_ECOLLATE;
- else if (BE ((syntax & RE_NO_EMPTY_RANGES) && start_wc > end_wc, 0))
+ else if (__glibc_unlikely ((syntax & RE_NO_EMPTY_RANGES)
+ && start_wc > end_wc))
return REG_ERANGE;
/* Got valid collation sequence values, add them as a new entry.
@@ -2764,7 +2765,7 @@ build_range_exp (const reg_syntax_t syntax,
if (mbcset)
{
/* Check the space of the arrays. */
- if (BE (*range_alloc == mbcset->nranges, 0))
+ if (__glibc_unlikely (*range_alloc == mbcset->nranges))
{
/* There is not enough space, need realloc. */
wchar_t *new_array_start, *new_array_end;
@@ -2779,7 +2780,8 @@ build_range_exp (const reg_syntax_t syntax,
new_array_end = re_realloc (mbcset->range_ends, wchar_t,
new_nranges);
- if (BE (new_array_start == NULL || new_array_end == NULL, 0))
+ if (__glibc_unlikely (new_array_start == NULL
+ || new_array_end == NULL))
{
re_free (new_array_start);
re_free (new_array_end);
@@ -2839,7 +2841,7 @@ build_collating_symbol (bitset_t sbcset, const unsigned char *name)
# endif /* not RE_ENABLE_I18N */
{
size_t name_len = strlen ((const char *) name);
- if (BE (name_len != 1, 0))
+ if (__glibc_unlikely (name_len != 1))
return REG_ECOLLATE;
else
{
@@ -2974,18 +2976,21 @@ parse_bracket_exp (re_string_t *regexp, re_dfa_t *dfa, re_token_t *token,
/* Equivalence Classes and Character Classes can't be a range
start/end. */
- if (BE (start_elem->type == EQUIV_CLASS || start_elem->type == CHAR_CLASS
- || end_elem->type == EQUIV_CLASS || end_elem->type == CHAR_CLASS,
- 0))
+ if (__glibc_unlikely (start_elem->type == EQUIV_CLASS
+ || start_elem->type == CHAR_CLASS
+ || end_elem->type == EQUIV_CLASS
+ || end_elem->type == CHAR_CLASS))
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. */
- if (BE (start_collseq == UINT_MAX || end_collseq == UINT_MAX, 0))
+ if (__glibc_unlikely (start_collseq == UINT_MAX
+ || end_collseq == UINT_MAX))
return REG_ECOLLATE;
- if (BE ((syntax & RE_NO_EMPTY_RANGES) && start_collseq > end_collseq, 0))
+ if (__glibc_unlikely ((syntax & RE_NO_EMPTY_RANGES)
+ && start_collseq > end_collseq))
return REG_ERANGE;
/* Got valid collation sequence values, add them as a new entry.
@@ -2995,7 +3000,7 @@ parse_bracket_exp (re_string_t *regexp, re_dfa_t *dfa, re_token_t *token,
if (nrules > 0 || dfa->mb_cur_max > 1)
{
/* Check the space of the arrays. */
- if (BE (*range_alloc == mbcset->nranges, 0))
+ if (__glibc_unlikely (*range_alloc == mbcset->nranges))
{
/* There is not enough space, need realloc. */
uint32_t *new_array_start;
@@ -3009,7 +3014,8 @@ parse_bracket_exp (re_string_t *regexp, re_dfa_t *dfa, re_token_t *token,
new_array_end = re_realloc (mbcset->range_ends, uint32_t,
new_nranges);
- if (BE (new_array_start == NULL || new_array_end == NULL, 0))
+ if (__glibc_unlikely (new_array_start == NULL
+ || new_array_end == NULL))
return REG_ESPACE;
mbcset->range_starts = new_array_start;
@@ -3073,7 +3079,7 @@ parse_bracket_exp (re_string_t *regexp, re_dfa_t *dfa, re_token_t *token,
/* Got valid collation sequence, add it as a new entry. */
/* Check the space of the arrays. */
- if (BE (*coll_sym_alloc == mbcset->ncoll_syms, 0))
+ if (__glibc_unlikely (*coll_sym_alloc == mbcset->ncoll_syms))
{
/* Not enough, realloc it. */
/* +1 in case of mbcset->ncoll_syms is 0. */
@@ -3082,7 +3088,7 @@ parse_bracket_exp (re_string_t *regexp, re_dfa_t *dfa, re_token_t *token,
if *alloc == 0. */
int32_t *new_coll_syms = re_realloc (mbcset->coll_syms, int32_t,
new_coll_sym_alloc);
- if (BE (new_coll_syms == NULL, 0))
+ if (__glibc_unlikely (new_coll_syms == NULL))
return REG_ESPACE;
mbcset->coll_syms = new_coll_syms;
*coll_sym_alloc = new_coll_sym_alloc;
@@ -3092,7 +3098,7 @@ parse_bracket_exp (re_string_t *regexp, re_dfa_t *dfa, re_token_t *token,
}
else
{
- if (BE (name_len != 1, 0))
+ if (__glibc_unlikely (name_len != 1))
return REG_ECOLLATE;
else
{
@@ -3136,9 +3142,9 @@ parse_bracket_exp (re_string_t *regexp, re_dfa_t *dfa, re_token_t *token,
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))
+ if (__glibc_unlikely (sbcset == NULL || mbcset == NULL))
#else
- if (BE (sbcset == NULL, 0))
+ if (__glibc_unlikely (sbcset == NULL))
#endif /* RE_ENABLE_I18N */
{
re_free (sbcset);
@@ -3150,7 +3156,7 @@ parse_bracket_exp (re_string_t *regexp, re_dfa_t *dfa, re_token_t *token,
}
token_len = peek_token_bracket (token, regexp, syntax);
- if (BE (token->type == END_OF_RE, 0))
+ if (__glibc_unlikely (token->type == END_OF_RE))
{
*err = REG_BADPAT;
goto parse_bracket_exp_free_return;
@@ -3165,7 +3171,7 @@ parse_bracket_exp (re_string_t *regexp, re_dfa_t *dfa, re_token_t *token,
bitset_set (sbcset, '\n');
re_string_skip_bytes (regexp, token_len); /* Skip a token. */
token_len = peek_token_bracket (token, regexp, syntax);
- if (BE (token->type == END_OF_RE, 0))
+ if (__glibc_unlikely (token->type == END_OF_RE))
{
*err = REG_BADPAT;
goto parse_bracket_exp_free_return;
@@ -3190,7 +3196,7 @@ parse_bracket_exp (re_string_t *regexp, re_dfa_t *dfa, re_token_t *token,
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))
+ if (__glibc_unlikely (ret != REG_NOERROR))
{
*err = ret;
goto parse_bracket_exp_free_return;
@@ -3203,7 +3209,7 @@ parse_bracket_exp (re_string_t *regexp, re_dfa_t *dfa, re_token_t *token,
/* Do not check for ranges if we know they are not allowed. */
if (start_elem.type != CHAR_CLASS && start_elem.type != EQUIV_CLASS)
{
- if (BE (token->type == END_OF_RE, 0))
+ if (__glibc_unlikely (token->type == END_OF_RE))
{
*err = REG_EBRACK;
goto parse_bracket_exp_free_return;
@@ -3212,7 +3218,7 @@ parse_bracket_exp (re_string_t *regexp, re_dfa_t *dfa, re_token_t *token,
{
re_string_skip_bytes (regexp, token_len); /* Skip '-'. */
token_len2 = peek_token_bracket (&token2, regexp, syntax);
- if (BE (token2.type == END_OF_RE, 0))
+ if (__glibc_unlikely (token2.type == END_OF_RE))
{
*err = REG_EBRACK;
goto parse_bracket_exp_free_return;
@@ -3234,7 +3240,7 @@ parse_bracket_exp (re_string_t *regexp, re_dfa_t *dfa, re_token_t *token,
end_elem.type = COLL_SYM;
ret = parse_bracket_element (&end_elem, regexp, &token2, token_len2,
dfa, syntax, true);
- if (BE (ret != REG_NOERROR, 0))
+ if (__glibc_unlikely (ret != REG_NOERROR))
{
*err = ret;
goto parse_bracket_exp_free_return;
@@ -3254,7 +3260,7 @@ parse_bracket_exp (re_string_t *regexp, re_dfa_t *dfa, re_token_t *token,
*err = build_range_exp (syntax, sbcset, &start_elem, &end_elem);
# endif
#endif /* RE_ENABLE_I18N */
- if (BE (*err != REG_NOERROR, 0))
+ if (__glibc_unlikely (*err != REG_NOERROR))
goto parse_bracket_exp_free_return;
}
else
@@ -3267,7 +3273,7 @@ parse_bracket_exp (re_string_t *regexp, re_dfa_t *dfa, re_token_t *token,
#ifdef RE_ENABLE_I18N
case MB_CHAR:
/* Check whether the array has enough space. */
- if (BE (mbchar_alloc == mbcset->nmbchars, 0))
+ if (__glibc_unlikely (mbchar_alloc == mbcset->nmbchars))
{
wchar_t *new_mbchars;
/* Not enough, realloc it. */
@@ -3276,7 +3282,7 @@ parse_bracket_exp (re_string_t *regexp, re_dfa_t *dfa, re_token_t *token,
/* Use realloc since array is NULL if *alloc == 0. */
new_mbchars = re_realloc (mbcset->mbchars, wchar_t,
mbchar_alloc);
- if (BE (new_mbchars == NULL, 0))
+ if (__glibc_unlikely (new_mbchars == NULL))
goto parse_bracket_exp_espace;
mbcset->mbchars = new_mbchars;
}
@@ -3289,7 +3295,7 @@ parse_bracket_exp (re_string_t *regexp, re_dfa_t *dfa, re_token_t *token,
mbcset, &equiv_class_alloc,
#endif /* RE_ENABLE_I18N */
start_elem.opr.name);
- if (BE (*err != REG_NOERROR, 0))
+ if (__glibc_unlikely (*err != REG_NOERROR))
goto parse_bracket_exp_free_return;
break;
case COLL_SYM:
@@ -3298,7 +3304,7 @@ parse_bracket_exp (re_string_t *regexp, re_dfa_t *dfa, re_token_t *token,
mbcset, &coll_sym_alloc,
#endif /* RE_ENABLE_I18N */
start_elem.opr.name);
- if (BE (*err != REG_NOERROR, 0))
+ if (__glibc_unlikely (*err != REG_NOERROR))
goto parse_bracket_exp_free_return;
break;
case CHAR_CLASS:
@@ -3308,7 +3314,7 @@ parse_bracket_exp (re_string_t *regexp, re_dfa_t *dfa, re_token_t *token,
#endif /* RE_ENABLE_I18N */
(const char *) start_elem.opr.name,
syntax);
- if (BE (*err != REG_NOERROR, 0))
+ if (__glibc_unlikely (*err != REG_NOERROR))
goto parse_bracket_exp_free_return;
break;
default:
@@ -3316,7 +3322,7 @@ parse_bracket_exp (re_string_t *regexp, re_dfa_t *dfa, re_token_t *token,
break;
}
}
- if (BE (token->type == END_OF_RE, 0))
+ if (__glibc_unlikely (token->type == END_OF_RE))
{
*err = REG_EBRACK;
goto parse_bracket_exp_free_return;
@@ -3347,7 +3353,7 @@ parse_bracket_exp (re_string_t *regexp, re_dfa_t *dfa, re_token_t *token,
br_token.type = COMPLEX_BRACKET;
br_token.opr.mbcset = mbcset;
mbc_tree = create_token_tree (dfa, NULL, NULL, &br_token);
- if (BE (mbc_tree == NULL, 0))
+ if (__glibc_unlikely (mbc_tree == NULL))
goto parse_bracket_exp_espace;
for (sbc_idx = 0; sbc_idx < BITSET_WORDS; ++sbc_idx)
if (sbcset[sbc_idx])
@@ -3360,12 +3366,12 @@ parse_bracket_exp (re_string_t *regexp, re_dfa_t *dfa, re_token_t *token,
br_token.type = SIMPLE_BRACKET;
br_token.opr.sbcset = sbcset;
work_tree = create_token_tree (dfa, NULL, NULL, &br_token);
- if (BE (work_tree == NULL, 0))
+ if (__glibc_unlikely (work_tree == NULL))
goto parse_bracket_exp_espace;
/* Then join them by ALT node. */
work_tree = create_tree (dfa, work_tree, mbc_tree, OP_ALT);
- if (BE (work_tree == NULL, 0))
+ if (__glibc_unlikely (work_tree == NULL))
goto parse_bracket_exp_espace;
}
else
@@ -3384,7 +3390,7 @@ parse_bracket_exp (re_string_t *regexp, re_dfa_t *dfa, re_token_t *token,
br_token.type = SIMPLE_BRACKET;
br_token.opr.sbcset = sbcset;
work_tree = create_token_tree (dfa, NULL, NULL, &br_token);
- if (BE (work_tree == NULL, 0))
+ if (__glibc_unlikely (work_tree == NULL))
goto parse_bracket_exp_espace;
}
return work_tree;
@@ -3421,7 +3427,7 @@ parse_bracket_element (bracket_elem_t *elem, re_string_t *regexp,
if (token->type == OP_OPEN_COLL_ELEM || token->type == OP_OPEN_CHAR_CLASS
|| token->type == OP_OPEN_EQUIV_CLASS)
return parse_bracket_symbol (elem, regexp, token);
- if (BE (token->type == OP_CHARSET_RANGE, 0) && !accept_hyphen)
+ if (__glibc_unlikely (token->type == OP_CHARSET_RANGE) && !accept_hyphen)
{
/* A '-' must only appear as anything but a range indicator before
the closing bracket. Everything else is an error. */
@@ -3516,7 +3522,7 @@ build_equiv_class (bitset_t sbcset, const unsigned char *name)
indirect = (const int32_t *) _NL_CURRENT (LC_COLLATE,
_NL_COLLATE_INDIRECTMB);
idx1 = findidx (table, indirect, extra, &cp, -1);
- if (BE (idx1 == 0 || *cp != '\0', 0))
+ if (__glibc_unlikely (idx1 == 0 || *cp != '\0'))
/* This isn't a valid character. */
return REG_ECOLLATE;
@@ -3535,21 +3541,13 @@ build_equiv_class (bitset_t sbcset, const unsigned char *name)
continue;
/* Compare only if the length matches and the collation rule
index is the same. */
- if (len == weights[idx2 & 0xffffff] && (idx1 >> 24) == (idx2 >> 24))
- {
- int cnt = 0;
-
- while (cnt <= len &&
- weights[(idx1 & 0xffffff) + 1 + cnt]
- == weights[(idx2 & 0xffffff) + 1 + cnt])
- ++cnt;
-
- if (cnt > len)
- bitset_set (sbcset, ch);
- }
+ if (len == weights[idx2 & 0xffffff] && (idx1 >> 24) == (idx2 >> 24)
+ && memcmp (weights + (idx1 & 0xffffff) + 1,
+ weights + (idx2 & 0xffffff) + 1, len) == 0)
+ bitset_set (sbcset, ch);
}
/* Check whether the array has enough space. */
- if (BE (*equiv_class_alloc == mbcset->nequiv_classes, 0))
+ if (__glibc_unlikely (*equiv_class_alloc == mbcset->nequiv_classes))
{
/* Not enough, realloc it. */
/* +1 in case of mbcset->nequiv_classes is 0. */
@@ -3558,7 +3556,7 @@ build_equiv_class (bitset_t sbcset, const unsigned char *name)
int32_t *new_equiv_classes = re_realloc (mbcset->equiv_classes,
int32_t,
new_equiv_class_alloc);
- if (BE (new_equiv_classes == NULL, 0))
+ if (__glibc_unlikely (new_equiv_classes == NULL))
return REG_ESPACE;
mbcset->equiv_classes = new_equiv_classes;
*equiv_class_alloc = new_equiv_class_alloc;
@@ -3568,7 +3566,7 @@ build_equiv_class (bitset_t sbcset, const unsigned char *name)
else
#endif /* _LIBC */
{
- if (BE (strlen ((const char *) name) != 1, 0))
+ if (__glibc_unlikely (strlen ((const char *) name) != 1))
return REG_ECOLLATE;
bitset_set (sbcset, *name);
}
@@ -3602,7 +3600,7 @@ build_charclass (RE_TRANSLATE_TYPE trans, bitset_t sbcset,
#ifdef RE_ENABLE_I18N
/* Check the space of the arrays. */
- if (BE (*char_class_alloc == mbcset->nchar_classes, 0))
+ if (__glibc_unlikely (*char_class_alloc == mbcset->nchar_classes))
{
/* Not enough, realloc it. */
/* +1 in case of mbcset->nchar_classes is 0. */
@@ -3610,7 +3608,7 @@ build_charclass (RE_TRANSLATE_TYPE trans, bitset_t sbcset,
/* Use realloc since array is NULL if *alloc == 0. */
wctype_t *new_char_classes = re_realloc (mbcset->char_classes, wctype_t,
new_char_class_alloc);
- if (BE (new_char_classes == NULL, 0))
+ if (__glibc_unlikely (new_char_classes == NULL))
return REG_ESPACE;
mbcset->char_classes = new_char_classes;
*char_class_alloc = new_char_class_alloc;
@@ -3620,7 +3618,7 @@ build_charclass (RE_TRANSLATE_TYPE trans, bitset_t sbcset,
#define BUILD_CHARCLASS_LOOP(ctype_func) \
do { \
- if (BE (trans != NULL, 0)) \
+ if (__glibc_unlikely (trans != NULL)) \
{ \
for (i = 0; i < SBC_MAX; ++i) \
if (ctype_func (i)) \
@@ -3680,14 +3678,14 @@ 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);
- if (BE (sbcset == NULL, 0))
+ if (__glibc_unlikely (sbcset == NULL))
{
*err = REG_ESPACE;
return NULL;
}
#ifdef RE_ENABLE_I18N
mbcset = (re_charset_t *) calloc (sizeof (re_charset_t), 1);
- if (BE (mbcset == NULL, 0))
+ if (__glibc_unlikely (mbcset == NULL))
{
re_free (sbcset);
*err = REG_ESPACE;
@@ -3703,7 +3701,7 @@ build_charclass_op (re_dfa_t *dfa, RE_TRANSLATE_TYPE trans,
#endif /* RE_ENABLE_I18N */
class_name, 0);
- if (BE (ret != REG_NOERROR, 0))
+ if (__glibc_unlikely (ret != REG_NOERROR))
{
re_free (sbcset);
#ifdef RE_ENABLE_I18N
@@ -3733,7 +3731,7 @@ build_charclass_op (re_dfa_t *dfa, RE_TRANSLATE_TYPE trans,
br_token.type = SIMPLE_BRACKET;
br_token.opr.sbcset = sbcset;
tree = create_token_tree (dfa, NULL, NULL, &br_token);
- if (BE (tree == NULL, 0))
+ if (__glibc_unlikely (tree == NULL))
goto build_word_op_espace;
#ifdef RE_ENABLE_I18N
@@ -3745,11 +3743,11 @@ build_charclass_op (re_dfa_t *dfa, RE_TRANSLATE_TYPE trans,
br_token.opr.mbcset = mbcset;
dfa->has_mb_node = 1;
mbc_tree = create_token_tree (dfa, NULL, NULL, &br_token);
- if (BE (mbc_tree == NULL, 0))
+ if (__glibc_unlikely (mbc_tree == NULL))
goto build_word_op_espace;
/* Then join them by ALT node. */
tree = create_tree (dfa, tree, mbc_tree, OP_ALT);
- if (BE (mbc_tree != NULL, 1))
+ if (__glibc_likely (mbc_tree != NULL))
return tree;
}
else
@@ -3785,7 +3783,7 @@ fetch_number (re_string_t *input, re_token_t *token, reg_syntax_t syntax)
{
fetch_token (token, input, syntax);
c = token->opr.c;
- if (BE (token->type == END_OF_RE, 0))
+ if (__glibc_unlikely (token->type == END_OF_RE))
return -2;
if (token->type == OP_CLOSE_DUP_NUM || c == ',')
break;
@@ -3806,9 +3804,9 @@ free_charset (re_charset_t *cset)
# ifdef _LIBC
re_free (cset->coll_syms);
re_free (cset->equiv_classes);
+# endif
re_free (cset->range_starts);
re_free (cset->range_ends);
-# endif
re_free (cset->char_classes);
re_free (cset);
}
@@ -3835,7 +3833,7 @@ create_token_tree (re_dfa_t *dfa, bin_tree_t *left, bin_tree_t *right,
const re_token_t *token)
{
bin_tree_t *tree;
- if (BE (dfa->str_tree_storage_idx == BIN_TREE_STORAGE_SIZE, 0))
+ if (__glibc_unlikely (dfa->str_tree_storage_idx == BIN_TREE_STORAGE_SIZE))
{
bin_tree_storage_t *storage = re_malloc (bin_tree_storage_t, 1);
diff --git a/lib/regex.c b/lib/regex.c
index 499e1f0..2a86e10 100644
--- a/lib/regex.c
+++ b/lib/regex.c
@@ -18,7 +18,7 @@
<https://www.gnu.org/licenses/>. */
#ifndef _LIBC
-# include <config.h>
+# include <libc-config.h>
# if (__GNUC__ == 4 && 6 <= __GNUC_MINOR__) || 4 < __GNUC__
# pragma GCC diagnostic ignored "-Wsuggest-attribute=pure"
diff --git a/lib/regex.h b/lib/regex.h
index cf9a40c..f2ac950 100644
--- a/lib/regex.h
+++ b/lib/regex.h
@@ -1,7 +1,6 @@
/* Definitions for data structures and routines for the regular
expression library.
- Copyright (C) 1985, 1989-1993, 1995-1998, 2000-2003, 2005-2018 Free Software
- Foundation, Inc.
+ Copyright (C) 1985, 1989-2018 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -608,28 +607,28 @@ extern int re_exec (const char *);
# endif
#endif
-/* GCC 2.95 and later have "__restrict"; C99 compilers have
+/* For plain 'restrict', use glibc's __restrict if defined.
+ Otherwise, GCC 2.95 and later have "__restrict"; C99 compilers have
"restrict", and "configure" may have defined "restrict".
Other compilers use __restrict, __restrict__, and _Restrict, and
'configure' might #define 'restrict' to those words, so pick a
different name. */
#ifndef _Restrict_
-# if 199901L <= __STDC_VERSION__
-# define _Restrict_ restrict
-# elif 2 < __GNUC__ || (2 == __GNUC__ && 95 <= __GNUC_MINOR__)
+# if defined __restrict || 2 < __GNUC__ + (95 <= __GNUC_MINOR__)
# define _Restrict_ __restrict
+# elif 199901L <= __STDC_VERSION__ || defined restrict
+# define _Restrict_ restrict
# else
# define _Restrict_
# endif
#endif
-/* gcc 3.1 and up support the [restrict] syntax. Don't trust
- sys/cdefs.h's definition of __restrict_arr, though, as it
- mishandles gcc -ansi -pedantic. */
+/* For [restrict], use glibc's __restrict_arr if available.
+ Otherwise, GCC 3.1 (not in C++ mode) and C99 support [restrict]. */
#ifndef _Restrict_arr_
-# if ((199901L <= __STDC_VERSION__ \
- || ((3 < __GNUC__ || (3 == __GNUC__ && 1 <= __GNUC_MINOR__)) \
- && !defined __STRICT_ANSI__)) \
- && !defined __GNUG__)
+# ifdef __restrict_arr
+# define _Restrict_arr_ __restrict_arr
+# elif ((199901L <= __STDC_VERSION__ || 3 < __GNUC__ + (1 <= __GNUC_MINOR__)) \
+ && !defined __GNUG__)
# define _Restrict_arr_ _Restrict_
# else
# define _Restrict_arr_
diff --git a/lib/regex_internal.c b/lib/regex_internal.c
index df27f69..f13def3 100644
--- a/lib/regex_internal.c
+++ b/lib/regex_internal.c
@@ -28,6 +28,16 @@ static re_dfastate_t *create_cd_newstate (const re_dfa_t *dfa,
const re_node_set *nodes,
unsigned int context,
re_hashval_t hash);
+static reg_errcode_t re_string_realloc_buffers (re_string_t *pstr,
+ Idx new_buf_len);
+#ifdef RE_ENABLE_I18N
+static void build_wcs_buffer (re_string_t *pstr);
+static reg_errcode_t build_wcs_upper_buffer (re_string_t *pstr);
+#endif /* RE_ENABLE_I18N */
+static void build_upper_buffer (re_string_t *pstr);
+static void re_string_translate_buffer (re_string_t *pstr);
+static unsigned int re_string_context_at (const re_string_t *input, Idx idx,
+ int eflags) __attribute__ ((pure));
/* Functions for string operation. */
@@ -49,7 +59,7 @@ re_string_allocate (re_string_t *pstr, const char *str, Idx len, Idx init_len,
re_string_construct_common (str, len, pstr, trans, icase, dfa);
ret = re_string_realloc_buffers (pstr, init_buf_len);
- if (BE (ret != REG_NOERROR, 0))
+ if (__glibc_unlikely (ret != REG_NOERROR))
return ret;
pstr->word_char = dfa->word_char;
@@ -74,7 +84,7 @@ re_string_construct (re_string_t *pstr, const char *str, Idx len,
if (len > 0)
{
ret = re_string_realloc_buffers (pstr, len + 1);
- if (BE (ret != REG_NOERROR, 0))
+ if (__glibc_unlikely (ret != REG_NOERROR))
return ret;
}
pstr->mbs = pstr->mbs_allocated ? pstr->mbs : (unsigned char *) str;
@@ -87,14 +97,14 @@ re_string_construct (re_string_t *pstr, const char *str, Idx len,
while (1)
{
ret = build_wcs_upper_buffer (pstr);
- if (BE (ret != REG_NOERROR, 0))
+ if (__glibc_unlikely (ret != REG_NOERROR))
return ret;
if (pstr->valid_raw_len >= len)
break;
if (pstr->bufs_len > pstr->valid_len + dfa->mb_cur_max)
break;
ret = re_string_realloc_buffers (pstr, pstr->bufs_len * 2);
- if (BE (ret != REG_NOERROR, 0))
+ if (__glibc_unlikely (ret != REG_NOERROR))
return ret;
}
}
@@ -136,17 +146,18 @@ re_string_realloc_buffers (re_string_t *pstr, Idx new_buf_len)
/* Avoid overflow in realloc. */
const size_t max_object_size = MAX (sizeof (wint_t), sizeof (Idx));
- if (BE (MIN (IDX_MAX, SIZE_MAX / max_object_size) < new_buf_len, 0))
+ if (__glibc_unlikely (MIN (IDX_MAX, SIZE_MAX / max_object_size)
+ < new_buf_len))
return REG_ESPACE;
new_wcs = re_realloc (pstr->wcs, wint_t, new_buf_len);
- if (BE (new_wcs == NULL, 0))
+ if (__glibc_unlikely (new_wcs == NULL))
return REG_ESPACE;
pstr->wcs = new_wcs;
if (pstr->offsets != NULL)
{
Idx *new_offsets = re_realloc (pstr->offsets, Idx, new_buf_len);
- if (BE (new_offsets == NULL, 0))
+ if (__glibc_unlikely (new_offsets == NULL))
return REG_ESPACE;
pstr->offsets = new_offsets;
}
@@ -156,7 +167,7 @@ re_string_realloc_buffers (re_string_t *pstr, Idx new_buf_len)
{
unsigned char *new_mbs = re_realloc (pstr->mbs, unsigned char,
new_buf_len);
- if (BE (new_mbs == NULL, 0))
+ if (__glibc_unlikely (new_mbs == NULL))
return REG_ESPACE;
pstr->mbs = new_mbs;
}
@@ -220,7 +231,7 @@ build_wcs_buffer (re_string_t *pstr)
remain_len = end_idx - byte_idx;
prev_st = pstr->cur_state;
/* Apply the translation if we need. */
- if (BE (pstr->trans != NULL, 0))
+ if (__glibc_unlikely (pstr->trans != NULL))
{
int i, ch;
@@ -234,17 +245,18 @@ build_wcs_buffer (re_string_t *pstr)
else
p = (const char *) pstr->raw_mbs + pstr->raw_mbs_idx + byte_idx;
mbclen = __mbrtowc (&wc, p, remain_len, &pstr->cur_state);
- if (BE (mbclen == (size_t) -1 || mbclen == 0
- || (mbclen == (size_t) -2 && pstr->bufs_len >= pstr->len), 0))
+ if (__glibc_unlikely (mbclen == (size_t) -1 || mbclen == 0
+ || (mbclen == (size_t) -2
+ && pstr->bufs_len >= pstr->len)))
{
/* We treat these cases as a singlebyte character. */
mbclen = 1;
wc = (wchar_t) pstr->raw_mbs[pstr->raw_mbs_idx + byte_idx];
- if (BE (pstr->trans != NULL, 0))
+ if (__glibc_unlikely (pstr->trans != NULL))
wc = pstr->trans[wc];
pstr->cur_state = prev_st;
}
- else if (BE (mbclen == (size_t) -2, 0))
+ else if (__glibc_unlikely (mbclen == (size_t) -2))
{
/* The buffer doesn't have enough space, finish to build. */
pstr->cur_state = prev_st;
@@ -307,7 +319,7 @@ build_wcs_upper_buffer (re_string_t *pstr)
mbclen = __mbrtowc (&wc,
((const char *) pstr->raw_mbs + pstr->raw_mbs_idx
+ byte_idx), remain_len, &pstr->cur_state);
- if (BE (mbclen < (size_t) -2, 1))
+ if (__glibc_likely (0 < mbclen && mbclen < (size_t) -2))
{
wchar_t wcu = __towupper (wc);
if (wcu != wc)
@@ -315,7 +327,7 @@ build_wcs_upper_buffer (re_string_t *pstr)
size_t mbcdlen;
mbcdlen = __wcrtomb (buf, wcu, &prev_st);
- if (BE (mbclen == mbcdlen, 1))
+ if (__glibc_likely (mbclen == mbcdlen))
memcpy (pstr->mbs + byte_idx, buf, mbclen);
else
{
@@ -340,7 +352,7 @@ build_wcs_upper_buffer (re_string_t *pstr)
pstr->mbs[byte_idx] = ch;
/* And also cast it to wide char. */
pstr->wcs[byte_idx++] = (wchar_t) ch;
- if (BE (mbclen == (size_t) -1, 0))
+ if (__glibc_unlikely (mbclen == (size_t) -1))
pstr->cur_state = prev_st;
}
else
@@ -362,7 +374,7 @@ build_wcs_upper_buffer (re_string_t *pstr)
offsets_needed:
remain_len = end_idx - byte_idx;
prev_st = pstr->cur_state;
- if (BE (pstr->trans != NULL, 0))
+ if (__glibc_unlikely (pstr->trans != NULL))
{
int i, ch;
@@ -376,15 +388,15 @@ build_wcs_upper_buffer (re_string_t *pstr)
else
p = (const char *) pstr->raw_mbs + pstr->raw_mbs_idx + src_idx;
mbclen = __mbrtowc (&wc, p, remain_len, &pstr->cur_state);
- if (BE (mbclen < (size_t) -2, 1))
+ if (__glibc_likely (0 < mbclen && mbclen < (size_t) -2))
{
wchar_t wcu = __towupper (wc);
if (wcu != wc)
{
size_t mbcdlen;
- mbcdlen = wcrtomb ((char *) buf, wcu, &prev_st);
- if (BE (mbclen == mbcdlen, 1))
+ mbcdlen = __wcrtomb ((char *) buf, wcu, &prev_st);
+ if (__glibc_likely (mbclen == mbcdlen))
memcpy (pstr->mbs + byte_idx, buf, mbclen);
else if (mbcdlen != (size_t) -1)
{
@@ -434,7 +446,7 @@ build_wcs_upper_buffer (re_string_t *pstr)
else
memcpy (pstr->mbs + byte_idx, p, mbclen);
- if (BE (pstr->offsets_needed != 0, 0))
+ if (__glibc_unlikely (pstr->offsets_needed != 0))
{
size_t i;
for (i = 0; i < mbclen; ++i)
@@ -453,17 +465,17 @@ build_wcs_upper_buffer (re_string_t *pstr)
/* It is an invalid character or '\0'. Just use the byte. */
int ch = pstr->raw_mbs[pstr->raw_mbs_idx + src_idx];
- if (BE (pstr->trans != NULL, 0))
+ if (__glibc_unlikely (pstr->trans != NULL))
ch = pstr->trans [ch];
pstr->mbs[byte_idx] = ch;
- if (BE (pstr->offsets_needed != 0, 0))
+ if (__glibc_unlikely (pstr->offsets_needed != 0))
pstr->offsets[byte_idx] = src_idx;
++src_idx;
/* And also cast it to wide char. */
pstr->wcs[byte_idx++] = (wchar_t) ch;
- if (BE (mbclen == (size_t) -1, 0))
+ if (__glibc_unlikely (mbclen == (size_t) -1))
pstr->cur_state = prev_st;
}
else
@@ -498,7 +510,8 @@ re_string_skip_chars (re_string_t *pstr, Idx new_raw_idx, wint_t *last_wc)
prev_st = pstr->cur_state;
mbclen = __mbrtowc (&wc2, (const char *) pstr->raw_mbs + rawbuf_idx,
remain_len, &pstr->cur_state);
- if (BE (mbclen == (size_t) -2 || mbclen == (size_t) -1 || mbclen == 0, 0))
+ if (__glibc_unlikely (mbclen == (size_t) -2 || mbclen == (size_t) -1
+ || mbclen == 0))
{
/* We treat these cases as a single byte character. */
if (mbclen == 0 || remain_len == 0)
@@ -530,7 +543,7 @@ build_upper_buffer (re_string_t *pstr)
for (char_idx = pstr->valid_len; char_idx < end_idx; ++char_idx)
{
int ch = pstr->raw_mbs[pstr->raw_mbs_idx + char_idx];
- if (BE (pstr->trans != NULL, 0))
+ if (__glibc_unlikely (pstr->trans != NULL))
ch = pstr->trans[ch];
pstr->mbs[char_idx] = toupper (ch);
}
@@ -566,7 +579,7 @@ re_string_reconstruct (re_string_t *pstr, Idx idx, int eflags)
{
Idx offset;
- if (BE (pstr->raw_mbs_idx <= idx, 0))
+ if (__glibc_unlikely (pstr->raw_mbs_idx <= idx))
offset = idx - pstr->raw_mbs_idx;
else
{
@@ -588,14 +601,14 @@ re_string_reconstruct (re_string_t *pstr, Idx idx, int eflags)
offset = idx;
}
- if (BE (offset != 0, 1))
+ if (__glibc_likely (offset != 0))
{
/* Should the already checked characters be kept? */
- if (BE (offset < pstr->valid_raw_len, 1))
+ if (__glibc_likely (offset < pstr->valid_raw_len))
{
/* Yes, move them to the front of the buffer. */
#ifdef RE_ENABLE_I18N
- if (BE (pstr->offsets_needed, 0))
+ if (__glibc_unlikely (pstr->offsets_needed))
{
Idx low = 0, high = pstr->valid_len, mid;
do
@@ -667,7 +680,7 @@ re_string_reconstruct (re_string_t *pstr, Idx idx, int eflags)
memmove (pstr->wcs, pstr->wcs + offset,
(pstr->valid_len - offset) * sizeof (wint_t));
#endif /* RE_ENABLE_I18N */
- if (BE (pstr->mbs_allocated, 0))
+ if (__glibc_unlikely (pstr->mbs_allocated))
memmove (pstr->mbs, pstr->mbs + offset,
pstr->valid_len - offset);
pstr->valid_len -= offset;
@@ -683,7 +696,7 @@ re_string_reconstruct (re_string_t *pstr, Idx idx, int eflags)
/* No, skip all characters until IDX. */
Idx prev_valid_len = pstr->valid_len;
- if (BE (pstr->offsets_needed, 0))
+ if (__glibc_unlikely (pstr->offsets_needed))
{
pstr->len = pstr->raw_len - idx + offset;
pstr->stop = pstr->raw_stop - idx + offset;
@@ -711,7 +724,7 @@ re_string_reconstruct (re_string_t *pstr, Idx idx, int eflags)
#ifdef _LIBC
/* We know the wchar_t encoding is UCS4, so for the simple
case, ASCII characters, skip the conversion step. */
- if (isascii (*p) && BE (pstr->trans == NULL, 1))
+ if (isascii (*p) && __glibc_likely (pstr->trans == NULL))
{
memset (&pstr->cur_state, '\0', sizeof (mbstate_t));
/* pstr->valid_len = 0; */
@@ -729,7 +742,7 @@ re_string_reconstruct (re_string_t *pstr, Idx idx, int eflags)
size_t mbclen;
const unsigned char *pp = p;
- if (BE (pstr->trans != NULL, 0))
+ if (__glibc_unlikely (pstr->trans != NULL))
{
int i = mlen < 6 ? mlen : 6;
while (--i >= 0)
@@ -759,13 +772,13 @@ re_string_reconstruct (re_string_t *pstr, Idx idx, int eflags)
pstr->tip_context
= re_string_context_at (pstr, prev_valid_len - 1, eflags);
else
- pstr->tip_context = ((BE (pstr->word_ops_used != 0, 0)
+ pstr->tip_context = ((__glibc_unlikely (pstr->word_ops_used != 0)
&& IS_WIDE_WORD_CHAR (wc))
? CONTEXT_WORD
: ((IS_WIDE_NEWLINE (wc)
&& pstr->newline_anchor)
? CONTEXT_NEWLINE : 0));
- if (BE (pstr->valid_len, 0))
+ if (__glibc_unlikely (pstr->valid_len))
{
for (wcs_idx = 0; wcs_idx < pstr->valid_len; ++wcs_idx)
pstr->wcs[wcs_idx] = WEOF;
@@ -787,7 +800,7 @@ re_string_reconstruct (re_string_t *pstr, Idx idx, int eflags)
? CONTEXT_NEWLINE : 0));
}
}
- if (!BE (pstr->mbs_allocated, 0))
+ if (!__glibc_unlikely (pstr->mbs_allocated))
pstr->mbs += offset;
}
pstr->raw_mbs_idx = idx;
@@ -801,7 +814,7 @@ re_string_reconstruct (re_string_t *pstr, Idx idx, int eflags)
if (pstr->icase)
{
reg_errcode_t ret = build_wcs_upper_buffer (pstr);
- if (BE (ret != REG_NOERROR, 0))
+ if (__glibc_unlikely (ret != REG_NOERROR))
return ret;
}
else
@@ -809,7 +822,7 @@ re_string_reconstruct (re_string_t *pstr, Idx idx, int eflags)
}
else
#endif /* RE_ENABLE_I18N */
- if (BE (pstr->mbs_allocated, 0))
+ if (__glibc_unlikely (pstr->mbs_allocated))
{
if (pstr->icase)
build_upper_buffer (pstr);
@@ -831,7 +844,7 @@ re_string_peek_byte_case (const re_string_t *pstr, Idx idx)
Idx off;
/* Handle the common (easiest) cases first. */
- if (BE (!pstr->mbs_allocated, 1))
+ if (__glibc_likely (!pstr->mbs_allocated))
return re_string_peek_byte (pstr, idx);
#ifdef RE_ENABLE_I18N
@@ -863,7 +876,7 @@ re_string_peek_byte_case (const re_string_t *pstr, Idx idx)
static unsigned char
re_string_fetch_byte_case (re_string_t *pstr)
{
- if (BE (!pstr->mbs_allocated, 1))
+ if (__glibc_likely (!pstr->mbs_allocated))
return re_string_fetch_byte (pstr);
#ifdef RE_ENABLE_I18N
@@ -914,11 +927,11 @@ static unsigned int
re_string_context_at (const re_string_t *input, Idx idx, int eflags)
{
int c;
- if (BE (idx < 0, 0))
+ if (__glibc_unlikely (idx < 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;
- if (BE (idx == input->len, 0))
+ if (__glibc_unlikely (idx == input->len))
return ((eflags & REG_NOTEOL) ? CONTEXT_ENDBUF
: CONTEXT_NEWLINE | CONTEXT_ENDBUF);
#ifdef RE_ENABLE_I18N
@@ -937,7 +950,8 @@ re_string_context_at (const re_string_t *input, Idx idx, int eflags)
return input->tip_context;
}
wc = input->wcs[wc_idx];
- if (BE (input->word_ops_used != 0, 0) && IS_WIDE_WORD_CHAR (wc))
+ if (__glibc_unlikely (input->word_ops_used != 0)
+ && IS_WIDE_WORD_CHAR (wc))
return CONTEXT_WORD;
return (IS_WIDE_NEWLINE (wc) && input->newline_anchor
? CONTEXT_NEWLINE : 0);
@@ -961,7 +975,8 @@ 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) && (MALLOC_0_IS_NONNULL || size != 0))
+ if (__glibc_unlikely (set->elems == NULL)
+ && (MALLOC_0_IS_NONNULL || size != 0))
return REG_ESPACE;
return REG_NOERROR;
}
@@ -973,7 +988,7 @@ re_node_set_init_1 (re_node_set *set, Idx elem)
set->alloc = 1;
set->nelem = 1;
set->elems = re_malloc (Idx, 1);
- if (BE (set->elems == NULL, 0))
+ if (__glibc_unlikely (set->elems == NULL))
{
set->alloc = set->nelem = 0;
return REG_ESPACE;
@@ -988,7 +1003,7 @@ re_node_set_init_2 (re_node_set *set, Idx elem1, Idx elem2)
{
set->alloc = 2;
set->elems = re_malloc (Idx, 2);
- if (BE (set->elems == NULL, 0))
+ if (__glibc_unlikely (set->elems == NULL))
return REG_ESPACE;
if (elem1 == elem2)
{
@@ -1021,7 +1036,7 @@ re_node_set_init_copy (re_node_set *dest, const re_node_set *src)
{
dest->alloc = dest->nelem;
dest->elems = re_malloc (Idx, dest->alloc);
- if (BE (dest->elems == NULL, 0))
+ if (__glibc_unlikely (dest->elems == NULL))
{
dest->alloc = dest->nelem = 0;
return REG_ESPACE;
@@ -1052,7 +1067,7 @@ re_node_set_add_intersect (re_node_set *dest, const re_node_set *src1,
{
Idx new_alloc = src1->nelem + src2->nelem + dest->alloc;
Idx *new_elems = re_realloc (dest->elems, Idx, new_alloc);
- if (BE (new_elems == NULL, 0))
+ if (__glibc_unlikely (new_elems == NULL))
return REG_ESPACE;
dest->elems = new_elems;
dest->alloc = new_alloc;
@@ -1138,7 +1153,7 @@ re_node_set_init_union (re_node_set *dest, const re_node_set *src1,
{
dest->alloc = src1->nelem + src2->nelem;
dest->elems = re_malloc (Idx, dest->alloc);
- if (BE (dest->elems == NULL, 0))
+ if (__glibc_unlikely (dest->elems == NULL))
return REG_ESPACE;
}
else
@@ -1192,13 +1207,13 @@ re_node_set_merge (re_node_set *dest, const re_node_set *src)
{
Idx new_alloc = 2 * (src->nelem + dest->alloc);
Idx *new_buffer = re_realloc (dest->elems, Idx, new_alloc);
- if (BE (new_buffer == NULL, 0))
+ if (__glibc_unlikely (new_buffer == NULL))
return REG_ESPACE;
dest->elems = new_buffer;
dest->alloc = new_alloc;
}
- if (BE (dest->nelem == 0, 0))
+ if (__glibc_unlikely (dest->nelem == 0))
{
dest->nelem = src->nelem;
memcpy (dest->elems, src->elems, src->nelem * sizeof (Idx));
@@ -1271,9 +1286,9 @@ re_node_set_insert (re_node_set *set, Idx elem)
Idx idx;
/* In case the set is empty. */
if (set->alloc == 0)
- return BE (re_node_set_init_1 (set, elem) == REG_NOERROR, 1);
+ return __glibc_likely (re_node_set_init_1 (set, elem) == REG_NOERROR);
- if (BE (set->nelem, 0) == 0)
+ if (__glibc_unlikely (set->nelem) == 0)
{
/* We already guaranteed above that set->alloc != 0. */
set->elems[0] = elem;
@@ -1287,7 +1302,7 @@ re_node_set_insert (re_node_set *set, Idx elem)
Idx *new_elems;
set->alloc = set->alloc * 2;
new_elems = re_realloc (set->elems, Idx, set->alloc);
- if (BE (new_elems == NULL, 0))
+ if (__glibc_unlikely (new_elems == NULL))
return false;
set->elems = new_elems;
}
@@ -1326,7 +1341,7 @@ re_node_set_insert_last (re_node_set *set, Idx elem)
Idx *new_elems;
set->alloc = (set->alloc + 1) * 2;
new_elems = re_realloc (set->elems, Idx, set->alloc);
- if (BE (new_elems == NULL, 0))
+ if (__glibc_unlikely (new_elems == NULL))
return false;
set->elems = new_elems;
}
@@ -1393,7 +1408,7 @@ re_node_set_remove_at (re_node_set *set, Idx idx)
static Idx
re_dfa_add_node (re_dfa_t *dfa, re_token_t token)
{
- if (BE (dfa->nodes_len >= dfa->nodes_alloc, 0))
+ if (__glibc_unlikely (dfa->nodes_len >= dfa->nodes_alloc))
{
size_t new_nodes_alloc = dfa->nodes_alloc * 2;
Idx *new_nexts, *new_indices;
@@ -1404,19 +1419,20 @@ re_dfa_add_node (re_dfa_t *dfa, re_token_t token)
const size_t max_object_size = MAX (sizeof (re_token_t),
MAX (sizeof (re_node_set),
sizeof (Idx)));
- if (BE (MIN (IDX_MAX, SIZE_MAX / max_object_size) < new_nodes_alloc, 0))
+ if (__glibc_unlikely (MIN (IDX_MAX, SIZE_MAX / max_object_size)
+ < new_nodes_alloc))
return -1;
new_nodes = re_realloc (dfa->nodes, re_token_t, new_nodes_alloc);
- if (BE (new_nodes == NULL, 0))
+ if (__glibc_unlikely (new_nodes == NULL))
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);
new_edests = re_realloc (dfa->edests, re_node_set, new_nodes_alloc);
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))
+ if (__glibc_unlikely (new_nexts == NULL || new_indices == NULL
+ || new_edests == NULL || new_eclosures == NULL))
{
re_free (new_nexts);
re_free (new_indices);
@@ -1475,7 +1491,7 @@ re_acquire_state (reg_errcode_t *err, const re_dfa_t *dfa,
/* Suppress bogus uninitialized-variable warnings. */
*err = REG_NOERROR;
#endif
- if (BE (nodes->nelem == 0, 0))
+ if (__glibc_unlikely (nodes->nelem == 0))
{
*err = REG_NOERROR;
return NULL;
@@ -1494,7 +1510,7 @@ re_acquire_state (reg_errcode_t *err, const re_dfa_t *dfa,
/* There are no appropriate state in the dfa, create the new one. */
new_state = create_ci_newstate (dfa, nodes, hash);
- if (BE (new_state == NULL, 0))
+ if (__glibc_unlikely (new_state == NULL))
*err = REG_ESPACE;
return new_state;
@@ -1541,7 +1557,7 @@ re_acquire_state_context (reg_errcode_t *err, const re_dfa_t *dfa,
}
/* There are no appropriate state in 'dfa', create the new one. */
new_state = create_cd_newstate (dfa, nodes, context, hash);
- if (BE (new_state == NULL, 0))
+ if (__glibc_unlikely (new_state == NULL))
*err = REG_ESPACE;
return new_state;
@@ -1562,7 +1578,7 @@ register_state (const re_dfa_t *dfa, re_dfastate_t *newstate,
newstate->hash = hash;
err = re_node_set_alloc (&newstate->non_eps_nodes, newstate->nodes.nelem);
- if (BE (err != REG_NOERROR, 0))
+ if (__glibc_unlikely (err != REG_NOERROR))
return REG_ESPACE;
for (i = 0; i < newstate->nodes.nelem; i++)
{
@@ -1573,12 +1589,12 @@ register_state (const re_dfa_t *dfa, re_dfastate_t *newstate,
}
spot = dfa->state_table + (hash & dfa->state_hash_mask);
- if (BE (spot->alloc <= spot->num, 0))
+ if (__glibc_unlikely (spot->alloc <= spot->num))
{
Idx new_alloc = 2 * spot->num + 2;
re_dfastate_t **new_array = re_realloc (spot->array, re_dfastate_t *,
new_alloc);
- if (BE (new_array == NULL, 0))
+ if (__glibc_unlikely (new_array == NULL))
return REG_ESPACE;
spot->array = new_array;
spot->alloc = new_alloc;
@@ -1616,10 +1632,10 @@ create_ci_newstate (const re_dfa_t *dfa, const re_node_set *nodes,
re_dfastate_t *newstate;
newstate = (re_dfastate_t *) calloc (sizeof (re_dfastate_t), 1);
- if (BE (newstate == NULL, 0))
+ if (__glibc_unlikely (newstate == NULL))
return NULL;
err = re_node_set_init_copy (&newstate->nodes, nodes);
- if (BE (err != REG_NOERROR, 0))
+ if (__glibc_unlikely (err != REG_NOERROR))
{
re_free (newstate);
return NULL;
@@ -1645,7 +1661,7 @@ create_ci_newstate (const re_dfa_t *dfa, const re_node_set *nodes,
newstate->has_constraint = 1;
}
err = register_state (dfa, newstate, hash);
- if (BE (err != REG_NOERROR, 0))
+ if (__glibc_unlikely (err != REG_NOERROR))
{
free_state (newstate);
newstate = NULL;
@@ -1666,10 +1682,10 @@ create_cd_newstate (const re_dfa_t *dfa, const re_node_set *nodes,
re_dfastate_t *newstate;
newstate = (re_dfastate_t *) calloc (sizeof (re_dfastate_t), 1);
- if (BE (newstate == NULL, 0))
+ if (__glibc_unlikely (newstate == NULL))
return NULL;
err = re_node_set_init_copy (&newstate->nodes, nodes);
- if (BE (err != REG_NOERROR, 0))
+ if (__glibc_unlikely (err != REG_NOERROR))
{
re_free (newstate);
return NULL;
@@ -1701,7 +1717,7 @@ create_cd_newstate (const re_dfa_t *dfa, const re_node_set *nodes,
if (newstate->entrance_nodes == &newstate->nodes)
{
newstate->entrance_nodes = re_malloc (re_node_set, 1);
- if (BE (newstate->entrance_nodes == NULL, 0))
+ if (__glibc_unlikely (newstate->entrance_nodes == NULL))
{
free_state (newstate);
return NULL;
@@ -1721,7 +1737,7 @@ create_cd_newstate (const re_dfa_t *dfa, const re_node_set *nodes,
}
}
err = register_state (dfa, newstate, hash);
- if (BE (err != REG_NOERROR, 0))
+ if (__glibc_unlikely (err != REG_NOERROR))
{
free_state (newstate);
newstate = NULL;
diff --git a/lib/regex_internal.h b/lib/regex_internal.h
index 88add80..b0e49cd 100644
--- a/lib/regex_internal.h
+++ b/lib/regex_internal.h
@@ -33,13 +33,13 @@
#include <stdbool.h>
#include <stdint.h>
-#include "intprops.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_fini(lock) ((void) 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
@@ -116,8 +116,6 @@
# define RE_ENABLE_I18N
#endif
-#define BE(expr, val) __builtin_expect (expr, val)
-
/* Number of ASCII characters. */
#define ASCII_CHARS 0x80
@@ -133,7 +131,10 @@
/* Rename to standard API for using out of glibc. */
#ifndef _LIBC
# undef __wctype
+# undef __iswalnum
# undef __iswctype
+# undef __towlower
+# undef __towupper
# define __wctype wctype
# define __iswalnum iswalnum
# define __iswctype iswctype
@@ -441,17 +442,6 @@ typedef struct re_dfa_t re_dfa_t;
# define IS_IN(libc) false
#endif
-static reg_errcode_t re_string_realloc_buffers (re_string_t *pstr,
- Idx new_buf_len);
-#ifdef RE_ENABLE_I18N
-static void build_wcs_buffer (re_string_t *pstr);
-static reg_errcode_t build_wcs_upper_buffer (re_string_t *pstr);
-#endif /* RE_ENABLE_I18N */
-static void build_upper_buffer (re_string_t *pstr);
-static void re_string_translate_buffer (re_string_t *pstr);
-static unsigned int re_string_context_at (const re_string_t *input, Idx idx,
- int eflags) __attribute__ ((pure));
-
#define re_string_peek_byte(pstr, offset) \
((pstr)->mbs[(pstr)->cur_idx + offset])
#define re_string_fetch_byte(pstr) \
@@ -757,31 +747,31 @@ typedef struct
/* Functions for bitset_t operation. */
-static void
+static inline void
bitset_set (bitset_t set, Idx i)
{
set[i / BITSET_WORD_BITS] |= (bitset_word_t) 1 << i % BITSET_WORD_BITS;
}
-static void
+static inline void
bitset_clear (bitset_t set, Idx i)
{
set[i / BITSET_WORD_BITS] &= ~ ((bitset_word_t) 1 << i % BITSET_WORD_BITS);
}
-static bool
+static inline bool
bitset_contain (const bitset_t set, Idx i)
{
return (set[i / BITSET_WORD_BITS] >> i % BITSET_WORD_BITS) & 1;
}
-static void
+static inline void
bitset_empty (bitset_t set)
{
memset (set, '\0', sizeof (bitset_t));
}
-static void
+static inline void
bitset_set_all (bitset_t set)
{
memset (set, -1, sizeof (bitset_word_t) * (SBC_MAX / BITSET_WORD_BITS));
@@ -790,13 +780,13 @@ bitset_set_all (bitset_t set)
((bitset_word_t) 1 << SBC_MAX % BITSET_WORD_BITS) - 1;
}
-static void
+static inline void
bitset_copy (bitset_t dest, const bitset_t src)
{
memcpy (dest, src, sizeof (bitset_t));
}
-static void __attribute__ ((unused))
+static inline void
bitset_not (bitset_t set)
{
int bitset_i;
@@ -808,7 +798,7 @@ bitset_not (bitset_t set)
& ~set[BITSET_WORDS - 1]);
}
-static void __attribute__ ((unused))
+static inline void
bitset_merge (bitset_t dest, const bitset_t src)
{
int bitset_i;
@@ -816,7 +806,7 @@ bitset_merge (bitset_t dest, const bitset_t src)
dest[bitset_i] |= src[bitset_i];
}
-static void __attribute__ ((unused))
+static inline void
bitset_mask (bitset_t dest, const bitset_t src)
{
int bitset_i;
diff --git a/lib/regexec.c b/lib/regexec.c
index fc18850..c7d099c 100644
--- a/lib/regexec.c
+++ b/lib/regexec.c
@@ -328,9 +328,8 @@ re_search_2_stub (struct re_pattern_buffer *bufp, const char *string1,
Idx len;
char *s = NULL;
- if (BE ((length1 < 0 || length2 < 0 || stop < 0
- || INT_ADD_WRAPV (length1, length2, &len)),
- 0))
+ if (__glibc_unlikely ((length1 < 0 || length2 < 0 || stop < 0
+ || INT_ADD_WRAPV (length1, length2, &len))))
return -2;
/* Concatenate the strings. */
@@ -339,7 +338,7 @@ re_search_2_stub (struct re_pattern_buffer *bufp, const char *string1,
{
s = re_malloc (char, len);
- if (BE (s == NULL, 0))
+ if (__glibc_unlikely (s == NULL))
return -2;
#ifdef _LIBC
memcpy (__mempcpy (s, string1, length1), string2, length2);
@@ -379,11 +378,13 @@ re_search_stub (struct re_pattern_buffer *bufp, const char *string, Idx length,
Idx last_start = start + range;
/* Check for out-of-range. */
- if (BE (start < 0 || start > length, 0))
+ if (__glibc_unlikely (start < 0 || start > length))
return -1;
- if (BE (length < last_start || (0 <= range && last_start < start), 0))
+ if (__glibc_unlikely (length < last_start
+ || (0 <= range && last_start < start)))
last_start = length;
- else if (BE (last_start < 0 || (range < 0 && start <= last_start), 0))
+ else if (__glibc_unlikely (last_start < 0
+ || (range < 0 && start <= last_start)))
last_start = 0;
lock_lock (dfa->lock);
@@ -395,17 +396,17 @@ re_search_stub (struct re_pattern_buffer *bufp, const char *string, Idx length,
if (start < last_start && bufp->fastmap != NULL && !bufp->fastmap_accurate)
re_compile_fastmap (bufp);
- if (BE (bufp->no_sub, 0))
+ if (__glibc_unlikely (bufp->no_sub))
regs = NULL;
/* We need at least 1 register. */
if (regs == NULL)
nregs = 1;
- else if (BE (bufp->regs_allocated == REGS_FIXED
- && regs->num_regs <= bufp->re_nsub, 0))
+ else if (__glibc_unlikely (bufp->regs_allocated == REGS_FIXED
+ && regs->num_regs <= bufp->re_nsub))
{
nregs = regs->num_regs;
- if (BE (nregs < 1, 0))
+ if (__glibc_unlikely (nregs < 1))
{
/* Nothing can be copied to regs. */
regs = NULL;
@@ -415,7 +416,7 @@ re_search_stub (struct re_pattern_buffer *bufp, const char *string, Idx length,
else
nregs = bufp->re_nsub + 1;
pmatch = re_malloc (regmatch_t, nregs);
- if (BE (pmatch == NULL, 0))
+ if (__glibc_unlikely (pmatch == NULL))
{
rval = -2;
goto out;
@@ -434,11 +435,11 @@ re_search_stub (struct re_pattern_buffer *bufp, const char *string, Idx length,
/* If caller wants register contents data back, copy them. */
bufp->regs_allocated = re_copy_regs (regs, pmatch, nregs,
bufp->regs_allocated);
- if (BE (bufp->regs_allocated == REGS_UNALLOCATED, 0))
+ if (__glibc_unlikely (bufp->regs_allocated == REGS_UNALLOCATED))
rval = -2;
}
- if (BE (rval == 0, 1))
+ if (__glibc_likely (rval == 0))
{
if (ret_len)
{
@@ -468,10 +469,10 @@ re_copy_regs (struct re_registers *regs, regmatch_t *pmatch, Idx nregs,
if (regs_allocated == REGS_UNALLOCATED)
{ /* No. So allocate them with malloc. */
regs->start = re_malloc (regoff_t, need_regs);
- if (BE (regs->start == NULL, 0))
+ if (__glibc_unlikely (regs->start == NULL))
return REGS_UNALLOCATED;
regs->end = re_malloc (regoff_t, need_regs);
- if (BE (regs->end == NULL, 0))
+ if (__glibc_unlikely (regs->end == NULL))
{
re_free (regs->start);
return REGS_UNALLOCATED;
@@ -482,14 +483,14 @@ re_copy_regs (struct re_registers *regs, regmatch_t *pmatch, Idx nregs,
{ /* Yes. If we need more elements than were already
allocated, reallocate them. If we need fewer, just
leave it alone. */
- if (BE (need_regs > regs->num_regs, 0))
+ if (__glibc_unlikely (need_regs > regs->num_regs))
{
regoff_t *new_start = re_realloc (regs->start, regoff_t, need_regs);
regoff_t *new_end;
- if (BE (new_start == NULL, 0))
+ if (__glibc_unlikely (new_start == NULL))
return REGS_UNALLOCATED;
new_end = re_realloc (regs->end, regoff_t, need_regs);
- if (BE (new_end == NULL, 0))
+ if (__glibc_unlikely (new_end == NULL))
{
re_free (new_start);
return REGS_UNALLOCATED;
@@ -615,9 +616,10 @@ re_search_internal (const regex_t *preg, const char *string, Idx length,
nmatch -= extra_nmatch;
/* Check if the DFA haven't been compiled. */
- if (BE (preg->used == 0 || dfa->init_state == NULL
- || dfa->init_state_word == NULL || dfa->init_state_nl == NULL
- || dfa->init_state_begbuf == NULL, 0))
+ if (__glibc_unlikely (preg->used == 0 || dfa->init_state == NULL
+ || dfa->init_state_word == NULL
+ || dfa->init_state_nl == NULL
+ || dfa->init_state_begbuf == NULL))
return REG_NOMATCH;
#ifdef DEBUG
@@ -644,14 +646,14 @@ re_search_internal (const regex_t *preg, const char *string, Idx length,
err = re_string_allocate (&mctx.input, string, length, dfa->nodes_len + 1,
preg->translate, (preg->syntax & RE_ICASE) != 0,
dfa);
- if (BE (err != REG_NOERROR, 0))
+ if (__glibc_unlikely (err != REG_NOERROR))
goto free_return;
mctx.input.stop = stop;
mctx.input.raw_stop = stop;
mctx.input.newline_anchor = preg->newline_anchor;
err = match_ctx_init (&mctx, eflags, dfa->nbackref * 2);
- if (BE (err != REG_NOERROR, 0))
+ if (__glibc_unlikely (err != REG_NOERROR))
goto free_return;
/* We will log all the DFA states through which the dfa pass,
@@ -661,15 +663,15 @@ re_search_internal (const regex_t *preg, const char *string, Idx length,
if (nmatch > 1 || dfa->has_mb_node)
{
/* Avoid overflow. */
- if (BE ((MIN (IDX_MAX, SIZE_MAX / sizeof (re_dfastate_t *))
- <= mctx.input.bufs_len), 0))
+ if (__glibc_unlikely ((MIN (IDX_MAX, SIZE_MAX / sizeof (re_dfastate_t *))
+ <= mctx.input.bufs_len)))
{
err = REG_ESPACE;
goto free_return;
}
mctx.state_log = re_malloc (re_dfastate_t *, mctx.input.bufs_len + 1);
- if (BE (mctx.state_log == NULL, 0))
+ if (__glibc_unlikely (mctx.state_log == NULL))
{
err = REG_ESPACE;
goto free_return;
@@ -713,19 +715,19 @@ re_search_internal (const regex_t *preg, const char *string, Idx length,
case 7:
/* Fastmap with single-byte translation, match forward. */
- while (BE (match_first < right_lim, 1)
+ while (__glibc_likely (match_first < right_lim)
&& !fastmap[t[(unsigned char) string[match_first]]])
++match_first;
goto forward_match_found_start_or_reached_end;
case 6:
/* Fastmap without translation, match forward. */
- while (BE (match_first < right_lim, 1)
+ while (__glibc_likely (match_first < right_lim)
&& !fastmap[(unsigned char) string[match_first]])
++match_first;
forward_match_found_start_or_reached_end:
- if (BE (match_first == right_lim, 0))
+ if (__glibc_unlikely (match_first == right_lim))
{
ch = match_first >= length
? 0 : (unsigned char) string[match_first];
@@ -758,11 +760,12 @@ re_search_internal (const regex_t *preg, const char *string, Idx length,
/* If MATCH_FIRST is out of the valid range, reconstruct the
buffers. */
__re_size_t offset = match_first - mctx.input.raw_mbs_idx;
- if (BE (offset >= (__re_size_t) mctx.input.valid_raw_len, 0))
+ if (__glibc_unlikely (offset
+ >= (__re_size_t) mctx.input.valid_raw_len))
{
err = re_string_reconstruct (&mctx.input, match_first,
eflags);
- if (BE (err != REG_NOERROR, 0))
+ if (__glibc_unlikely (err != REG_NOERROR))
goto free_return;
offset = match_first - mctx.input.raw_mbs_idx;
@@ -786,7 +789,7 @@ re_search_internal (const regex_t *preg, const char *string, Idx length,
/* Reconstruct the buffers so that the matcher can assume that
the matching starts from the beginning of the buffer. */
err = re_string_reconstruct (&mctx.input, match_first, eflags);
- if (BE (err != REG_NOERROR, 0))
+ if (__glibc_unlikely (err != REG_NOERROR))
goto free_return;
#ifdef RE_ENABLE_I18N
@@ -803,7 +806,7 @@ re_search_internal (const regex_t *preg, const char *string, Idx length,
start <= last_start ? &match_first : NULL);
if (match_last != -1)
{
- if (BE (match_last == -2, 0))
+ if (__glibc_unlikely (match_last == -2))
{
err = REG_ESPACE;
goto free_return;
@@ -823,7 +826,7 @@ re_search_internal (const regex_t *preg, const char *string, Idx length,
err = prune_impossible_nodes (&mctx);
if (err == REG_NOERROR)
break;
- if (BE (err != REG_NOMATCH, 0))
+ if (__glibc_unlikely (err != REG_NOMATCH))
goto free_return;
match_last = -1;
}
@@ -860,7 +863,7 @@ re_search_internal (const regex_t *preg, const char *string, Idx length,
{
err = set_regs (preg, &mctx, nmatch, pmatch,
dfa->has_plural_match && dfa->nbackref > 0);
- if (BE (err != REG_NOERROR, 0))
+ if (__glibc_unlikely (err != REG_NOERROR))
goto free_return;
}
@@ -871,7 +874,7 @@ re_search_internal (const regex_t *preg, const char *string, Idx length,
if (pmatch[reg_idx].rm_so != -1)
{
#ifdef RE_ENABLE_I18N
- if (BE (mctx.input.offsets_needed != 0, 0))
+ if (__glibc_unlikely (mctx.input.offsets_needed != 0))
{
pmatch[reg_idx].rm_so =
(pmatch[reg_idx].rm_so == mctx.input.valid_len
@@ -930,11 +933,12 @@ prune_impossible_nodes (re_match_context_t *mctx)
halt_node = mctx->last_node;
/* Avoid overflow. */
- if (BE (MIN (IDX_MAX, SIZE_MAX / sizeof (re_dfastate_t *)) <= match_last, 0))
+ if (__glibc_unlikely (MIN (IDX_MAX, SIZE_MAX / sizeof (re_dfastate_t *))
+ <= match_last))
return REG_ESPACE;
sifted_states = re_malloc (re_dfastate_t *, match_last + 1);
- if (BE (sifted_states == NULL, 0))
+ if (__glibc_unlikely (sifted_states == NULL))
{
ret = REG_ESPACE;
goto free_return;
@@ -942,7 +946,7 @@ prune_impossible_nodes (re_match_context_t *mctx)
if (dfa->nbackref)
{
lim_states = re_malloc (re_dfastate_t *, match_last + 1);
- if (BE (lim_states == NULL, 0))
+ if (__glibc_unlikely (lim_states == NULL))
{
ret = REG_ESPACE;
goto free_return;
@@ -955,7 +959,7 @@ prune_impossible_nodes (re_match_context_t *mctx)
match_last);
ret = sift_states_backward (mctx, &sctx);
re_node_set_free (&sctx.limits);
- if (BE (ret != REG_NOERROR, 0))
+ if (__glibc_unlikely (ret != REG_NOERROR))
goto free_return;
if (sifted_states[0] != NULL || lim_states[0] != NULL)
break;
@@ -977,7 +981,7 @@ prune_impossible_nodes (re_match_context_t *mctx)
match_last + 1);
re_free (lim_states);
lim_states = NULL;
- if (BE (ret != REG_NOERROR, 0))
+ if (__glibc_unlikely (ret != REG_NOERROR))
goto free_return;
}
else
@@ -985,7 +989,7 @@ prune_impossible_nodes (re_match_context_t *mctx)
sift_ctx_init (&sctx, sifted_states, lim_states, halt_node, match_last);
ret = sift_states_backward (mctx, &sctx);
re_node_set_free (&sctx.limits);
- if (BE (ret != REG_NOERROR, 0))
+ if (__glibc_unlikely (ret != REG_NOERROR))
goto free_return;
if (sifted_states[0] == NULL)
{
@@ -1068,7 +1072,7 @@ check_matching (re_match_context_t *mctx, bool fl_longest_match,
err = REG_NOERROR;
cur_state = acquire_init_state_context (&err, mctx, cur_str_idx);
/* An initial state must not be NULL (invalid). */
- if (BE (cur_state == NULL, 0))
+ if (__glibc_unlikely (cur_state == NULL))
{
assert (err == REG_ESPACE);
return -2;
@@ -1080,24 +1084,24 @@ check_matching (re_match_context_t *mctx, bool fl_longest_match,
/* Check OP_OPEN_SUBEXP in the initial state in case that we use them
later. E.g. Processing back references. */
- if (BE (dfa->nbackref, 0))
+ if (__glibc_unlikely (dfa->nbackref))
{
at_init_state = false;
err = check_subexp_matching_top (mctx, &cur_state->nodes, 0);
- if (BE (err != REG_NOERROR, 0))
+ if (__glibc_unlikely (err != REG_NOERROR))
return err;
if (cur_state->has_backref)
{
err = transit_state_bkref (mctx, &cur_state->nodes);
- if (BE (err != REG_NOERROR, 0))
+ if (__glibc_unlikely (err != REG_NOERROR))
return err;
}
}
}
/* If the RE accepts NULL string. */
- if (BE (cur_state->halt, 0))
+ if (__glibc_unlikely (cur_state->halt))
{
if (!cur_state->has_constraint
|| check_halt_state_context (mctx, cur_state, cur_str_idx))
@@ -1117,13 +1121,13 @@ check_matching (re_match_context_t *mctx, bool fl_longest_match,
re_dfastate_t *old_state = cur_state;
Idx next_char_idx = re_string_cur_idx (&mctx->input) + 1;
- if ((BE (next_char_idx >= mctx->input.bufs_len, 0)
+ if ((__glibc_unlikely (next_char_idx >= mctx->input.bufs_len)
&& mctx->input.bufs_len < mctx->input.len)
- || (BE (next_char_idx >= mctx->input.valid_len, 0)
+ || (__glibc_unlikely (next_char_idx >= mctx->input.valid_len)
&& mctx->input.valid_len < mctx->input.len))
{
err = extend_buffers (mctx, next_char_idx + 1);
- if (BE (err != REG_NOERROR, 0))
+ if (__glibc_unlikely (err != REG_NOERROR))
{
assert (err == REG_ESPACE);
return -2;
@@ -1139,7 +1143,7 @@ check_matching (re_match_context_t *mctx, bool fl_longest_match,
/* Reached the invalid state or an error. Try to recover a valid
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))
+ if (__glibc_unlikely (err != REG_NOERROR))
return -2;
if (mctx->state_log == NULL
@@ -1148,7 +1152,7 @@ check_matching (re_match_context_t *mctx, bool fl_longest_match,
break;
}
- if (BE (at_init_state, 0))
+ if (__glibc_unlikely (at_init_state))
{
if (old_state == cur_state)
next_start_idx = next_char_idx;
@@ -1237,7 +1241,7 @@ proceed_next_node (const re_match_context_t *mctx, Idx nregs, regmatch_t *regs,
re_node_set *edests = &dfa->edests[node];
Idx dest_node;
ok = re_node_set_insert (eps_via_nodes, node);
- if (BE (! ok, 0))
+ if (__glibc_unlikely (! ok))
return -2;
/* Pick up a valid destination, or return -1 if none
is found. */
@@ -1299,7 +1303,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))
+ if (__glibc_unlikely (! ok))
return -2;
dest_node = dfa->edests[node].elems[0];
if (re_node_set_contains (&mctx->state_log[*pidx]->nodes,
@@ -1449,9 +1453,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 (cur_node < 0, 0))
+ if (__glibc_unlikely (cur_node < 0))
{
- if (BE (cur_node == -2, 0))
+ if (__glibc_unlikely (cur_node == -2))
{
re_node_set_free (&eps_via_nodes);
if (prev_idx_match_malloced)
@@ -1579,10 +1583,10 @@ sift_states_backward (const re_match_context_t *mctx, re_sift_context_t *sctx)
/* Build sifted state_log[str_idx]. It has the nodes which can epsilon
transit to the last_node and the last_node itself. */
err = re_node_set_init_1 (&cur_dest, sctx->last_node);
- if (BE (err != REG_NOERROR, 0))
+ if (__glibc_unlikely (err != REG_NOERROR))
return err;
err = update_cur_sifted_state (mctx, sctx, str_idx, &cur_dest);
- if (BE (err != REG_NOERROR, 0))
+ if (__glibc_unlikely (err != REG_NOERROR))
goto free_return;
/* Then check each states in the state_log. */
@@ -1603,7 +1607,7 @@ sift_states_backward (const re_match_context_t *mctx, re_sift_context_t *sctx)
if (mctx->state_log[str_idx])
{
err = build_sifted_states (mctx, sctx, str_idx, &cur_dest);
- if (BE (err != REG_NOERROR, 0))
+ if (__glibc_unlikely (err != REG_NOERROR))
goto free_return;
}
@@ -1612,7 +1616,7 @@ sift_states_backward (const re_match_context_t *mctx, re_sift_context_t *sctx)
- It is in CUR_SRC.
And update state_log. */
err = update_cur_sifted_state (mctx, sctx, str_idx, &cur_dest);
- if (BE (err != REG_NOERROR, 0))
+ if (__glibc_unlikely (err != REG_NOERROR))
goto free_return;
}
err = REG_NOERROR;
@@ -1674,7 +1678,7 @@ build_sifted_states (const re_match_context_t *mctx, re_sift_context_t *sctx,
continue;
}
ok = re_node_set_insert (cur_dest, prev_node);
- if (BE (! ok, 0))
+ if (__glibc_unlikely (! ok))
return REG_ESPACE;
}
@@ -1695,7 +1699,7 @@ clean_state_log_if_needed (re_match_context_t *mctx, Idx next_state_log_idx)
{
reg_errcode_t err;
err = extend_buffers (mctx, next_state_log_idx + 1);
- if (BE (err != REG_NOERROR, 0))
+ if (__glibc_unlikely (err != REG_NOERROR))
return err;
}
@@ -1723,11 +1727,11 @@ merge_state_array (const re_dfa_t *dfa, re_dfastate_t **dst,
re_node_set merged_set;
err = re_node_set_init_union (&merged_set, &dst[st_idx]->nodes,
&src[st_idx]->nodes);
- if (BE (err != REG_NOERROR, 0))
+ if (__glibc_unlikely (err != REG_NOERROR))
return err;
dst[st_idx] = re_acquire_state (&err, dfa, &merged_set);
re_node_set_free (&merged_set);
- if (BE (err != REG_NOERROR, 0))
+ if (__glibc_unlikely (err != REG_NOERROR))
return err;
}
}
@@ -1754,7 +1758,7 @@ update_cur_sifted_state (const re_match_context_t *mctx,
/* At first, add the nodes which can epsilon transit to a node in
DEST_NODE. */
err = add_epsilon_src_nodes (dfa, dest_nodes, candidates);
- if (BE (err != REG_NOERROR, 0))
+ if (__glibc_unlikely (err != REG_NOERROR))
return err;
/* Then, check the limitations in the current sift_context. */
@@ -1762,20 +1766,20 @@ update_cur_sifted_state (const re_match_context_t *mctx,
{
err = check_subexp_limits (dfa, dest_nodes, candidates, &sctx->limits,
mctx->bkref_ents, str_idx);
- if (BE (err != REG_NOERROR, 0))
+ if (__glibc_unlikely (err != REG_NOERROR))
return err;
}
}
sctx->sifted_states[str_idx] = re_acquire_state (&err, dfa, dest_nodes);
- if (BE (err != REG_NOERROR, 0))
+ if (__glibc_unlikely (err != REG_NOERROR))
return err;
}
if (candidates && mctx->state_log[str_idx]->has_backref)
{
err = sift_states_bkref (mctx, sctx, str_idx, candidates);
- if (BE (err != REG_NOERROR, 0))
+ if (__glibc_unlikely (err != REG_NOERROR))
return err;
}
return REG_NOERROR;
@@ -1790,19 +1794,19 @@ add_epsilon_src_nodes (const re_dfa_t *dfa, re_node_set *dest_nodes,
Idx i;
re_dfastate_t *state = re_acquire_state (&err, dfa, dest_nodes);
- if (BE (err != REG_NOERROR, 0))
+ if (__glibc_unlikely (err != REG_NOERROR))
return err;
if (!state->inveclosure.alloc)
{
err = re_node_set_alloc (&state->inveclosure, dest_nodes->nelem);
- if (BE (err != REG_NOERROR, 0))
+ if (__glibc_unlikely (err != REG_NOERROR))
return REG_ESPACE;
for (i = 0; i < dest_nodes->nelem; i++)
{
err = re_node_set_merge (&state->inveclosure,
dfa->inveclosures + dest_nodes->elems[i]);
- if (BE (err != REG_NOERROR, 0))
+ if (__glibc_unlikely (err != REG_NOERROR))
return REG_ESPACE;
}
}
@@ -1837,7 +1841,7 @@ sub_epsilon_src_nodes (const re_dfa_t *dfa, Idx node, re_node_set *dest_nodes,
{
err = re_node_set_add_intersect (&except_nodes, candidates,
dfa->inveclosures + cur_node);
- if (BE (err != REG_NOERROR, 0))
+ if (__glibc_unlikely (err != REG_NOERROR))
{
re_node_set_free (&except_nodes);
return err;
@@ -2043,7 +2047,7 @@ check_subexp_limits (const re_dfa_t *dfa, re_node_set *dest_nodes,
{
err = sub_epsilon_src_nodes (dfa, ops_node, dest_nodes,
candidates);
- if (BE (err != REG_NOERROR, 0))
+ if (__glibc_unlikely (err != REG_NOERROR))
return err;
}
@@ -2061,7 +2065,7 @@ check_subexp_limits (const re_dfa_t *dfa, re_node_set *dest_nodes,
Remove it form the current sifted state. */
err = sub_epsilon_src_nodes (dfa, node, dest_nodes,
candidates);
- if (BE (err != REG_NOERROR, 0))
+ if (__glibc_unlikely (err != REG_NOERROR))
return err;
--node_idx;
}
@@ -2081,7 +2085,7 @@ check_subexp_limits (const re_dfa_t *dfa, re_node_set *dest_nodes,
Remove it form the current sifted state. */
err = sub_epsilon_src_nodes (dfa, node, dest_nodes,
candidates);
- if (BE (err != REG_NOERROR, 0))
+ if (__glibc_unlikely (err != REG_NOERROR))
return err;
}
}
@@ -2147,27 +2151,27 @@ sift_states_bkref (const re_match_context_t *mctx, re_sift_context_t *sctx,
{
local_sctx = *sctx;
err = re_node_set_init_copy (&local_sctx.limits, &sctx->limits);
- if (BE (err != REG_NOERROR, 0))
+ if (__glibc_unlikely (err != REG_NOERROR))
goto free_return;
}
local_sctx.last_node = node;
local_sctx.last_str_idx = str_idx;
ok = re_node_set_insert (&local_sctx.limits, enabled_idx);
- if (BE (! ok, 0))
+ if (__glibc_unlikely (! ok))
{
err = REG_ESPACE;
goto free_return;
}
cur_state = local_sctx.sifted_states[str_idx];
err = sift_states_backward (mctx, &local_sctx);
- if (BE (err != REG_NOERROR, 0))
+ if (__glibc_unlikely (err != REG_NOERROR))
goto free_return;
if (sctx->limited_states != NULL)
{
err = merge_state_array (dfa, sctx->limited_states,
local_sctx.sifted_states,
str_idx + 1);
- if (BE (err != REG_NOERROR, 0))
+ if (__glibc_unlikely (err != REG_NOERROR))
goto free_return;
}
local_sctx.sifted_states[str_idx] = cur_state;
@@ -2229,10 +2233,10 @@ transit_state (reg_errcode_t *err, re_match_context_t *mctx,
#ifdef RE_ENABLE_I18N
/* If the current state can accept multibyte. */
- if (BE (state->accept_mb, 0))
+ if (__glibc_unlikely (state->accept_mb))
{
*err = transit_state_mb (mctx, state);
- if (BE (*err != REG_NOERROR, 0))
+ if (__glibc_unlikely (*err != REG_NOERROR))
return NULL;
}
#endif /* RE_ENABLE_I18N */
@@ -2249,11 +2253,11 @@ transit_state (reg_errcode_t *err, re_match_context_t *mctx,
for (;;)
{
trtable = state->trtable;
- if (BE (trtable != NULL, 1))
+ if (__glibc_likely (trtable != NULL))
return trtable[ch];
trtable = state->word_trtable;
- if (BE (trtable != NULL, 1))
+ if (__glibc_likely (trtable != NULL))
{
unsigned int context;
context
@@ -2309,7 +2313,7 @@ merge_state_with_log (reg_errcode_t *err, re_match_context_t *mctx,
table_nodes = next_state->entrance_nodes;
*err = re_node_set_init_union (&next_nodes, table_nodes,
log_nodes);
- if (BE (*err != REG_NOERROR, 0))
+ if (__glibc_unlikely (*err != REG_NOERROR))
return NULL;
}
else
@@ -2329,21 +2333,21 @@ merge_state_with_log (reg_errcode_t *err, re_match_context_t *mctx,
re_node_set_free (&next_nodes);
}
- if (BE (dfa->nbackref, 0) && next_state != NULL)
+ if (__glibc_unlikely (dfa->nbackref) && next_state != NULL)
{
/* Check OP_OPEN_SUBEXP in the current state in case that we use them
later. We must check them here, since the back references in the
next state might use them. */
*err = check_subexp_matching_top (mctx, &next_state->nodes,
cur_idx);
- if (BE (*err != REG_NOERROR, 0))
+ if (__glibc_unlikely (*err != REG_NOERROR))
return NULL;
/* If the next state has back references. */
if (next_state->has_backref)
{
*err = transit_state_bkref (mctx, &next_state->nodes);
- if (BE (*err != REG_NOERROR, 0))
+ if (__glibc_unlikely (*err != REG_NOERROR))
return NULL;
next_state = mctx->state_log[cur_idx];
}
@@ -2407,7 +2411,7 @@ check_subexp_matching_top (re_match_context_t *mctx, re_node_set *cur_nodes,
& ((bitset_word_t) 1 << dfa->nodes[node].opr.idx)))
{
err = match_ctx_add_subtop (mctx, node, str_idx);
- if (BE (err != REG_NOERROR, 0))
+ if (__glibc_unlikely (err != REG_NOERROR))
return err;
}
}
@@ -2429,7 +2433,7 @@ transit_state_sb (reg_errcode_t *err, re_match_context_t *mctx,
unsigned int context;
*err = re_node_set_alloc (&next_nodes, state->nodes.nelem + 1);
- if (BE (*err != REG_NOERROR, 0))
+ if (__glibc_unlikely (*err != REG_NOERROR))
return NULL;
for (node_cnt = 0; node_cnt < state->nodes.nelem; ++node_cnt)
{
@@ -2438,7 +2442,7 @@ transit_state_sb (reg_errcode_t *err, re_match_context_t *mctx,
{
*err = re_node_set_merge (&next_nodes,
dfa->eclosures + dfa->nexts[cur_node]);
- if (BE (*err != REG_NOERROR, 0))
+ if (__glibc_unlikely (*err != REG_NOERROR))
{
re_node_set_free (&next_nodes);
return NULL;
@@ -2497,7 +2501,7 @@ transit_state_mb (re_match_context_t *mctx, re_dfastate_t *pstate)
mctx->max_mb_elem_len = ((mctx->max_mb_elem_len < naccepted) ? naccepted
: mctx->max_mb_elem_len);
err = clean_state_log_if_needed (mctx, dest_idx);
- if (BE (err != REG_NOERROR, 0))
+ if (__glibc_unlikely (err != REG_NOERROR))
return err;
#ifdef DEBUG
assert (dfa->nexts[cur_node_idx] != -1);
@@ -2511,7 +2515,7 @@ transit_state_mb (re_match_context_t *mctx, re_dfastate_t *pstate)
{
err = re_node_set_init_union (&dest_nodes,
dest_state->entrance_nodes, new_nodes);
- if (BE (err != REG_NOERROR, 0))
+ if (__glibc_unlikely (err != REG_NOERROR))
return err;
}
context = re_string_context_at (&mctx->input, dest_idx - 1,
@@ -2520,7 +2524,8 @@ transit_state_mb (re_match_context_t *mctx, re_dfastate_t *pstate)
= re_acquire_state_context (&err, dfa, &dest_nodes, context);
if (dest_state != NULL)
re_node_set_free (&dest_nodes);
- if (BE (mctx->state_log[dest_idx] == NULL && err != REG_NOERROR, 0))
+ if (__glibc_unlikely (mctx->state_log[dest_idx] == NULL
+ && err != REG_NOERROR))
return err;
}
return REG_NOERROR;
@@ -2559,7 +2564,7 @@ transit_state_bkref (re_match_context_t *mctx, const re_node_set *nodes)
Check the substring which the substring matched. */
bkc_idx = mctx->nbkref_ents;
err = get_subexp (mctx, node_idx, cur_str_idx);
- if (BE (err != REG_NOERROR, 0))
+ if (__glibc_unlikely (err != REG_NOERROR))
goto free_return;
/* And add the epsilon closures (which is 'new_dest_nodes') of
@@ -2592,8 +2597,8 @@ transit_state_bkref (re_match_context_t *mctx, const re_node_set *nodes)
mctx->state_log[dest_str_idx]
= re_acquire_state_context (&err, dfa, new_dest_nodes,
context);
- if (BE (mctx->state_log[dest_str_idx] == NULL
- && err != REG_NOERROR, 0))
+ if (__glibc_unlikely (mctx->state_log[dest_str_idx] == NULL
+ && err != REG_NOERROR))
goto free_return;
}
else
@@ -2602,7 +2607,7 @@ transit_state_bkref (re_match_context_t *mctx, const re_node_set *nodes)
err = re_node_set_init_union (&dest_nodes,
dest_state->entrance_nodes,
new_dest_nodes);
- if (BE (err != REG_NOERROR, 0))
+ if (__glibc_unlikely (err != REG_NOERROR))
{
re_node_set_free (&dest_nodes);
goto free_return;
@@ -2610,8 +2615,8 @@ transit_state_bkref (re_match_context_t *mctx, const re_node_set *nodes)
mctx->state_log[dest_str_idx]
= re_acquire_state_context (&err, dfa, &dest_nodes, context);
re_node_set_free (&dest_nodes);
- if (BE (mctx->state_log[dest_str_idx] == NULL
- && err != REG_NOERROR, 0))
+ if (__glibc_unlikely (mctx->state_log[dest_str_idx] == NULL
+ && err != REG_NOERROR))
goto free_return;
}
/* We need to check recursively if the backreference can epsilon
@@ -2621,10 +2626,10 @@ transit_state_bkref (re_match_context_t *mctx, const re_node_set *nodes)
{
err = check_subexp_matching_top (mctx, new_dest_nodes,
cur_str_idx);
- if (BE (err != REG_NOERROR, 0))
+ if (__glibc_unlikely (err != REG_NOERROR))
goto free_return;
err = transit_state_bkref (mctx, new_dest_nodes);
- if (BE (err != REG_NOERROR, 0))
+ if (__glibc_unlikely (err != REG_NOERROR))
goto free_return;
}
}
@@ -2685,7 +2690,8 @@ get_subexp (re_match_context_t *mctx, Idx bkref_node, Idx bkref_str_idx)
at the back reference? */
if (sl_str_diff > 0)
{
- if (BE (bkref_str_off + sl_str_diff > mctx->input.valid_len, 0))
+ if (__glibc_unlikely (bkref_str_off + sl_str_diff
+ > mctx->input.valid_len))
{
/* Not enough chars for a successful match. */
if (bkref_str_off + sl_str_diff > mctx->input.len)
@@ -2694,7 +2700,7 @@ get_subexp (re_match_context_t *mctx, Idx bkref_node, Idx bkref_str_idx)
err = clean_state_log_if_needed (mctx,
bkref_str_off
+ sl_str_diff);
- if (BE (err != REG_NOERROR, 0))
+ if (__glibc_unlikely (err != REG_NOERROR))
return err;
buf = (const char *) re_string_get_buffer (&mctx->input);
}
@@ -2713,7 +2719,7 @@ get_subexp (re_match_context_t *mctx, Idx bkref_node, Idx bkref_str_idx)
if (err == REG_NOMATCH)
continue;
- if (BE (err != REG_NOERROR, 0))
+ if (__glibc_unlikely (err != REG_NOERROR))
return err;
}
@@ -2732,14 +2738,14 @@ get_subexp (re_match_context_t *mctx, Idx bkref_node, Idx bkref_str_idx)
at the back reference? */
if (sl_str_off > 0)
{
- if (BE (bkref_str_off >= mctx->input.valid_len, 0))
+ if (__glibc_unlikely (bkref_str_off >= mctx->input.valid_len))
{
/* If we are at the end of the input, we cannot match. */
if (bkref_str_off >= mctx->input.len)
break;
err = extend_buffers (mctx, bkref_str_off + 1);
- if (BE (err != REG_NOERROR, 0))
+ if (__glibc_unlikely (err != REG_NOERROR))
return err;
buf = (const char *) re_string_get_buffer (&mctx->input);
@@ -2770,15 +2776,18 @@ get_subexp (re_match_context_t *mctx, Idx bkref_node, Idx bkref_str_idx)
OP_CLOSE_SUBEXP);
if (err == REG_NOMATCH)
continue;
- if (BE (err != REG_NOERROR, 0))
+ if (__glibc_unlikely (err != REG_NOERROR))
return err;
sub_last = match_ctx_add_sublast (sub_top, cls_node, sl_str);
- if (BE (sub_last == NULL, 0))
+ if (__glibc_unlikely (sub_last == NULL))
return REG_ESPACE;
err = get_subexp_sub (mctx, sub_top, sub_last, bkref_node,
bkref_str_idx);
+ buf = (const char *) re_string_get_buffer (&mctx->input);
if (err == REG_NOMATCH)
continue;
+ if (__glibc_unlikely (err != REG_NOERROR))
+ return err;
}
}
return REG_NOERROR;
@@ -2804,7 +2813,7 @@ get_subexp_sub (re_match_context_t *mctx, const re_sub_match_top_t *sub_top,
return err;
err = match_ctx_add_entry (mctx, bkref_node, bkref_str, sub_top->str_idx,
sub_last->str_idx);
- if (BE (err != REG_NOERROR, 0))
+ if (__glibc_unlikely (err != REG_NOERROR))
return err;
to_idx = bkref_str + sub_last->str_idx - sub_top->str_idx;
return clean_state_log_if_needed (mctx, to_idx);
@@ -2854,19 +2863,19 @@ check_arrival (re_match_context_t *mctx, state_array_t *path, Idx top_node,
subexp_num = dfa->nodes[top_node].opr.idx;
/* Extend the buffer if we need. */
- if (BE (path->alloc < last_str + mctx->max_mb_elem_len + 1, 0))
+ if (__glibc_unlikely (path->alloc < last_str + mctx->max_mb_elem_len + 1))
{
re_dfastate_t **new_array;
Idx old_alloc = path->alloc;
Idx incr_alloc = last_str + mctx->max_mb_elem_len + 1;
Idx new_alloc;
- if (BE (IDX_MAX - old_alloc < incr_alloc, 0))
+ if (__glibc_unlikely (IDX_MAX - old_alloc < incr_alloc))
return REG_ESPACE;
new_alloc = old_alloc + incr_alloc;
- if (BE (SIZE_MAX / sizeof (re_dfastate_t *) < new_alloc, 0))
+ if (__glibc_unlikely (SIZE_MAX / sizeof (re_dfastate_t *) < new_alloc))
return REG_ESPACE;
new_array = re_realloc (path->array, re_dfastate_t *, new_alloc);
- if (BE (new_array == NULL, 0))
+ if (__glibc_unlikely (new_array == NULL))
return REG_ESPACE;
path->array = new_array;
path->alloc = new_alloc;
@@ -2887,10 +2896,10 @@ check_arrival (re_match_context_t *mctx, state_array_t *path, Idx top_node,
if (str_idx == top_str)
{
err = re_node_set_init_1 (&next_nodes, top_node);
- if (BE (err != REG_NOERROR, 0))
+ if (__glibc_unlikely (err != REG_NOERROR))
return err;
err = check_arrival_expand_ecl (dfa, &next_nodes, subexp_num, type);
- if (BE (err != REG_NOERROR, 0))
+ if (__glibc_unlikely (err != REG_NOERROR))
{
re_node_set_free (&next_nodes);
return err;
@@ -2902,7 +2911,7 @@ check_arrival (re_match_context_t *mctx, state_array_t *path, Idx top_node,
if (cur_state && cur_state->has_backref)
{
err = re_node_set_init_copy (&next_nodes, &cur_state->nodes);
- if (BE (err != REG_NOERROR, 0))
+ if (__glibc_unlikely (err != REG_NOERROR))
return err;
}
else
@@ -2914,14 +2923,14 @@ check_arrival (re_match_context_t *mctx, state_array_t *path, Idx top_node,
{
err = expand_bkref_cache (mctx, &next_nodes, str_idx,
subexp_num, type);
- if (BE (err != REG_NOERROR, 0))
+ if (__glibc_unlikely (err != REG_NOERROR))
{
re_node_set_free (&next_nodes);
return err;
}
}
cur_state = re_acquire_state_context (&err, dfa, &next_nodes, context);
- if (BE (cur_state == NULL && err != REG_NOERROR, 0))
+ if (__glibc_unlikely (cur_state == NULL && err != REG_NOERROR))
{
re_node_set_free (&next_nodes);
return err;
@@ -2936,7 +2945,7 @@ check_arrival (re_match_context_t *mctx, state_array_t *path, Idx top_node,
{
err = re_node_set_merge (&next_nodes,
&mctx->state_log[str_idx + 1]->nodes);
- if (BE (err != REG_NOERROR, 0))
+ if (__glibc_unlikely (err != REG_NOERROR))
{
re_node_set_free (&next_nodes);
return err;
@@ -2947,7 +2956,7 @@ check_arrival (re_match_context_t *mctx, state_array_t *path, Idx top_node,
err = check_arrival_add_next_nodes (mctx, str_idx,
&cur_state->non_eps_nodes,
&next_nodes);
- if (BE (err != REG_NOERROR, 0))
+ if (__glibc_unlikely (err != REG_NOERROR))
{
re_node_set_free (&next_nodes);
return err;
@@ -2957,14 +2966,14 @@ check_arrival (re_match_context_t *mctx, state_array_t *path, Idx top_node,
if (next_nodes.nelem)
{
err = check_arrival_expand_ecl (dfa, &next_nodes, subexp_num, type);
- if (BE (err != REG_NOERROR, 0))
+ if (__glibc_unlikely (err != REG_NOERROR))
{
re_node_set_free (&next_nodes);
return err;
}
err = expand_bkref_cache (mctx, &next_nodes, str_idx,
subexp_num, type);
- if (BE (err != REG_NOERROR, 0))
+ if (__glibc_unlikely (err != REG_NOERROR))
{
re_node_set_free (&next_nodes);
return err;
@@ -2972,7 +2981,7 @@ check_arrival (re_match_context_t *mctx, state_array_t *path, Idx top_node,
}
context = re_string_context_at (&mctx->input, str_idx - 1, mctx->eflags);
cur_state = re_acquire_state_context (&err, dfa, &next_nodes, context);
- if (BE (cur_state == NULL && err != REG_NOERROR, 0))
+ if (__glibc_unlikely (cur_state == NULL && err != REG_NOERROR))
{
re_node_set_free (&next_nodes);
return err;
@@ -3041,22 +3050,22 @@ check_arrival_add_next_nodes (re_match_context_t *mctx, Idx str_idx,
if (dest_state)
{
err = re_node_set_merge (&union_set, &dest_state->nodes);
- if (BE (err != REG_NOERROR, 0))
+ if (__glibc_unlikely (err != REG_NOERROR))
{
re_node_set_free (&union_set);
return err;
}
}
ok = re_node_set_insert (&union_set, next_node);
- if (BE (! ok, 0))
+ if (__glibc_unlikely (! ok))
{
re_node_set_free (&union_set);
return REG_ESPACE;
}
mctx->state_log[next_idx] = re_acquire_state (&err, dfa,
&union_set);
- if (BE (mctx->state_log[next_idx] == NULL
- && err != REG_NOERROR, 0))
+ if (__glibc_unlikely (mctx->state_log[next_idx] == NULL
+ && err != REG_NOERROR))
{
re_node_set_free (&union_set);
return err;
@@ -3068,7 +3077,7 @@ check_arrival_add_next_nodes (re_match_context_t *mctx, Idx str_idx,
|| check_node_accept (mctx, dfa->nodes + cur_node, str_idx))
{
ok = re_node_set_insert (next_nodes, dfa->nexts[cur_node]);
- if (BE (! ok, 0))
+ if (__glibc_unlikely (! ok))
{
re_node_set_free (&union_set);
return REG_ESPACE;
@@ -3096,7 +3105,7 @@ check_arrival_expand_ecl (const re_dfa_t *dfa, re_node_set *cur_nodes,
assert (cur_nodes->nelem);
#endif
err = re_node_set_alloc (&new_nodes, cur_nodes->nelem);
- if (BE (err != REG_NOERROR, 0))
+ if (__glibc_unlikely (err != REG_NOERROR))
return err;
/* Create a new node set NEW_NODES with the nodes which are epsilon
closures of the node in CUR_NODES. */
@@ -3110,7 +3119,7 @@ check_arrival_expand_ecl (const re_dfa_t *dfa, re_node_set *cur_nodes,
{
/* There are no problematic nodes, just merge them. */
err = re_node_set_merge (&new_nodes, eclosure);
- if (BE (err != REG_NOERROR, 0))
+ if (__glibc_unlikely (err != REG_NOERROR))
{
re_node_set_free (&new_nodes);
return err;
@@ -3121,7 +3130,7 @@ check_arrival_expand_ecl (const re_dfa_t *dfa, re_node_set *cur_nodes,
/* There are problematic nodes, re-calculate incrementally. */
err = check_arrival_expand_ecl_sub (dfa, &new_nodes, cur_node,
ex_subexp, type);
- if (BE (err != REG_NOERROR, 0))
+ if (__glibc_unlikely (err != REG_NOERROR))
{
re_node_set_free (&new_nodes);
return err;
@@ -3153,13 +3162,13 @@ check_arrival_expand_ecl_sub (const re_dfa_t *dfa, re_node_set *dst_nodes,
if (type == OP_CLOSE_SUBEXP)
{
ok = re_node_set_insert (dst_nodes, cur_node);
- if (BE (! ok, 0))
+ if (__glibc_unlikely (! ok))
return REG_ESPACE;
}
break;
}
ok = re_node_set_insert (dst_nodes, cur_node);
- if (BE (! ok, 0))
+ if (__glibc_unlikely (! ok))
return REG_ESPACE;
if (dfa->edests[cur_node].nelem == 0)
break;
@@ -3169,7 +3178,7 @@ check_arrival_expand_ecl_sub (const re_dfa_t *dfa, re_node_set *dst_nodes,
err = check_arrival_expand_ecl_sub (dfa, dst_nodes,
dfa->edests[cur_node].elems[1],
ex_subexp, type);
- if (BE (err != REG_NOERROR, 0))
+ if (__glibc_unlikely (err != REG_NOERROR))
return err;
}
cur_node = dfa->edests[cur_node].elems[0];
@@ -3221,8 +3230,8 @@ expand_bkref_cache (re_match_context_t *mctx, re_node_set *cur_nodes,
err2 = check_arrival_expand_ecl (dfa, &new_dests, subexp_num, type);
err3 = re_node_set_merge (cur_nodes, &new_dests);
re_node_set_free (&new_dests);
- if (BE (err != REG_NOERROR || err2 != REG_NOERROR
- || err3 != REG_NOERROR, 0))
+ if (__glibc_unlikely (err != REG_NOERROR || err2 != REG_NOERROR
+ || err3 != REG_NOERROR))
{
err = (err != REG_NOERROR ? err
: (err2 != REG_NOERROR ? err2 : err3));
@@ -3244,7 +3253,7 @@ expand_bkref_cache (re_match_context_t *mctx, re_node_set *cur_nodes,
err = re_node_set_init_copy (&union_set,
&mctx->state_log[to_idx]->nodes);
ok = re_node_set_insert (&union_set, next_node);
- if (BE (err != REG_NOERROR || ! ok, 0))
+ if (__glibc_unlikely (err != REG_NOERROR || ! ok))
{
re_node_set_free (&union_set);
err = err != REG_NOERROR ? err : REG_ESPACE;
@@ -3254,13 +3263,13 @@ expand_bkref_cache (re_match_context_t *mctx, re_node_set *cur_nodes,
else
{
err = re_node_set_init_1 (&union_set, next_node);
- if (BE (err != REG_NOERROR, 0))
+ if (__glibc_unlikely (err != REG_NOERROR))
return err;
}
mctx->state_log[to_idx] = re_acquire_state (&err, dfa, &union_set);
re_node_set_free (&union_set);
- if (BE (mctx->state_log[to_idx] == NULL
- && err != REG_NOERROR, 0))
+ if (__glibc_unlikely (mctx->state_log[to_idx] == NULL
+ && err != REG_NOERROR))
return err;
}
}
@@ -3303,7 +3312,7 @@ build_trtable (const re_dfa_t *dfa, re_dfastate_t *state)
else
{
dests_alloc = re_malloc (struct dests_alloc, 1);
- if (BE (dests_alloc == NULL, 0))
+ if (__glibc_unlikely (dests_alloc == NULL))
return false;
dests_node_malloced = true;
}
@@ -3316,7 +3325,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 (ndests <= 0, 0))
+ if (__glibc_unlikely (ndests <= 0))
{
if (dests_node_malloced)
re_free (dests_alloc);
@@ -3325,7 +3334,7 @@ build_trtable (const re_dfa_t *dfa, re_dfastate_t *state)
{
state->trtable = (re_dfastate_t **)
calloc (sizeof (re_dfastate_t *), SBC_MAX);
- if (BE (state->trtable == NULL, 0))
+ if (__glibc_unlikely (state->trtable == NULL))
return false;
return true;
}
@@ -3333,14 +3342,14 @@ build_trtable (const re_dfa_t *dfa, re_dfastate_t *state)
}
err = re_node_set_alloc (&follows, ndests + 1);
- if (BE (err != REG_NOERROR, 0))
+ if (__glibc_unlikely (err != REG_NOERROR))
goto out_free;
/* Avoid arithmetic overflow in size calculation. */
- if (BE ((((SIZE_MAX - (sizeof (re_node_set) + sizeof (bitset_t)) * SBC_MAX)
- / (3 * sizeof (re_dfastate_t *)))
- < ndests),
- 0))
+ size_t ndests_max
+ = ((SIZE_MAX - (sizeof (re_node_set) + sizeof (bitset_t)) * SBC_MAX)
+ / (3 * sizeof (re_dfastate_t *)));
+ if (__glibc_unlikely (ndests_max < ndests))
goto out_free;
if (__libc_use_alloca ((sizeof (re_node_set) + sizeof (bitset_t)) * SBC_MAX
@@ -3350,7 +3359,7 @@ build_trtable (const re_dfa_t *dfa, re_dfastate_t *state)
else
{
dest_states = re_malloc (re_dfastate_t *, ndests * 3);
- if (BE (dest_states == NULL, 0))
+ if (__glibc_unlikely (dest_states == NULL))
{
out_free:
if (dest_states_malloced)
@@ -3380,12 +3389,12 @@ out_free:
if (next_node != -1)
{
err = re_node_set_merge (&follows, dfa->eclosures + next_node);
- if (BE (err != REG_NOERROR, 0))
+ if (__glibc_unlikely (err != REG_NOERROR))
goto out_free;
}
}
dest_states[i] = re_acquire_state_context (&err, dfa, &follows, 0);
- if (BE (dest_states[i] == NULL && err != REG_NOERROR, 0))
+ if (__glibc_unlikely (dest_states[i] == NULL && err != REG_NOERROR))
goto out_free;
/* If the new state has context constraint,
build appropriate states for these contexts. */
@@ -3393,7 +3402,8 @@ out_free:
{
dest_states_word[i] = re_acquire_state_context (&err, dfa, &follows,
CONTEXT_WORD);
- if (BE (dest_states_word[i] == NULL && err != REG_NOERROR, 0))
+ if (__glibc_unlikely (dest_states_word[i] == NULL
+ && err != REG_NOERROR))
goto out_free;
if (dest_states[i] != dest_states_word[i] && dfa->mb_cur_max > 1)
@@ -3401,7 +3411,7 @@ out_free:
dest_states_nl[i] = re_acquire_state_context (&err, dfa, &follows,
CONTEXT_NEWLINE);
- if (BE (dest_states_nl[i] == NULL && err != REG_NOERROR, 0))
+ if (__glibc_unlikely (dest_states_nl[i] == NULL && err != REG_NOERROR))
goto out_free;
}
else
@@ -3412,7 +3422,7 @@ out_free:
bitset_merge (acceptable, dests_ch[i]);
}
- if (!BE (need_word_trtable, 0))
+ if (!__glibc_unlikely (need_word_trtable))
{
/* We don't care about whether the following character is a word
character, or we are in a single-byte character set so we can
@@ -3420,7 +3430,7 @@ out_free:
256-entry transition table. */
trtable = state->trtable =
(re_dfastate_t **) calloc (sizeof (re_dfastate_t *), SBC_MAX);
- if (BE (trtable == NULL, 0))
+ if (__glibc_unlikely (trtable == NULL))
goto out_free;
/* For all characters ch...: */
@@ -3428,7 +3438,7 @@ out_free:
for (ch = i * BITSET_WORD_BITS, elem = acceptable[i], mask = 1;
elem;
mask <<= 1, elem >>= 1, ++ch)
- if (BE (elem & 1, 0))
+ if (__glibc_unlikely (elem & 1))
{
/* There must be exactly one destination which accepts
character ch. See group_nodes_into_DFAstates. */
@@ -3451,7 +3461,7 @@ out_free:
starting at trtable[SBC_MAX]. */
trtable = state->word_trtable =
(re_dfastate_t **) calloc (sizeof (re_dfastate_t *), 2 * SBC_MAX);
- if (BE (trtable == NULL, 0))
+ if (__glibc_unlikely (trtable == NULL))
goto out_free;
/* For all characters ch...: */
@@ -3459,7 +3469,7 @@ out_free:
for (ch = i * BITSET_WORD_BITS, elem = acceptable[i], mask = 1;
elem;
mask <<= 1, elem >>= 1, ++ch)
- if (BE (elem & 1, 0))
+ if (__glibc_unlikely (elem & 1))
{
/* There must be exactly one destination which accepts
character ch. See group_nodes_into_DFAstates. */
@@ -3658,14 +3668,14 @@ group_nodes_into_DFAstates (const re_dfa_t *dfa, const re_dfastate_t *state,
bitset_copy (dests_ch[ndests], remains);
bitset_copy (dests_ch[j], intersec);
err = re_node_set_init_copy (dests_node + ndests, &dests_node[j]);
- if (BE (err != REG_NOERROR, 0))
+ if (__glibc_unlikely (err != REG_NOERROR))
goto error_return;
++ndests;
}
/* Put the position in the current group. */
ok = re_node_set_insert (&dests_node[j], cur_nodes->elems[i]);
- if (BE (! ok, 0))
+ if (__glibc_unlikely (! ok))
goto error_return;
/* If all characters are consumed, go to next node. */
@@ -3677,7 +3687,7 @@ group_nodes_into_DFAstates (const re_dfa_t *dfa, const re_dfastate_t *state,
{
bitset_copy (dests_ch[ndests], accepts);
err = re_node_set_init_1 (dests_node + ndests, cur_nodes->elems[i]);
- if (BE (err != REG_NOERROR, 0))
+ if (__glibc_unlikely (err != REG_NOERROR))
goto error_return;
++ndests;
bitset_empty (accepts);
@@ -3711,10 +3721,10 @@ check_node_accept_bytes (const re_dfa_t *dfa, Idx node_idx,
int char_len, elem_len;
Idx i;
- if (BE (node->type == OP_UTF8_PERIOD, 0))
+ if (__glibc_unlikely (node->type == OP_UTF8_PERIOD))
{
unsigned char c = re_string_byte_at (input, str_idx), d;
- if (BE (c < 0xc2, 1))
+ if (__glibc_likely (c < 0xc2))
return 0;
if (str_idx + 2 > input->len)
@@ -3878,30 +3888,27 @@ check_node_accept_bytes (const re_dfa_t *dfa, Idx node_idx,
indirect = (const int32_t *)
_NL_CURRENT (LC_COLLATE, _NL_COLLATE_INDIRECTMB);
int32_t idx = findidx (table, indirect, extra, &cp, elem_len);
+ int32_t rule = idx >> 24;
+ idx &= 0xffffff;
if (idx > 0)
- for (i = 0; i < cset->nequiv_classes; ++i)
- {
- int32_t equiv_class_idx = cset->equiv_classes[i];
- size_t weight_len = weights[idx & 0xffffff];
- if (weight_len == weights[equiv_class_idx & 0xffffff]
- && (idx >> 24) == (equiv_class_idx >> 24))
- {
- Idx cnt = 0;
-
- idx &= 0xffffff;
- equiv_class_idx &= 0xffffff;
-
- while (cnt <= weight_len
- && (weights[equiv_class_idx + 1 + cnt]
- == weights[idx + 1 + cnt]))
- ++cnt;
- if (cnt > weight_len)
- {
- match_len = elem_len;
- goto check_node_accept_bytes_match;
- }
- }
- }
+ {
+ size_t weight_len = weights[idx];
+ for (i = 0; i < cset->nequiv_classes; ++i)
+ {
+ int32_t equiv_class_idx = cset->equiv_classes[i];
+ int32_t equiv_class_rule = equiv_class_idx >> 24;
+ equiv_class_idx &= 0xffffff;
+ if (weights[equiv_class_idx] == weight_len
+ && equiv_class_rule == rule
+ && memcmp (weights + idx + 1,
+ weights + equiv_class_idx + 1,
+ weight_len) == 0)
+ {
+ match_len = elem_len;
+ goto check_node_accept_bytes_match;
+ }
+ }
+ }
}
}
else
@@ -4052,15 +4059,15 @@ extend_buffers (re_match_context_t *mctx, int min_len)
re_string_t *pstr = &mctx->input;
/* Avoid overflow. */
- if (BE (MIN (IDX_MAX, SIZE_MAX / sizeof (re_dfastate_t *)) / 2
- <= pstr->bufs_len, 0))
+ if (__glibc_unlikely (MIN (IDX_MAX, SIZE_MAX / sizeof (re_dfastate_t *)) / 2
+ <= pstr->bufs_len))
return REG_ESPACE;
/* 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))
+ if (__glibc_unlikely (ret != REG_NOERROR))
return ret;
if (mctx->state_log != NULL)
@@ -4071,7 +4078,7 @@ extend_buffers (re_match_context_t *mctx, int min_len)
does not have the right size. */
re_dfastate_t **new_array = re_realloc (mctx->state_log, re_dfastate_t *,
pstr->bufs_len + 1);
- if (BE (new_array == NULL, 0))
+ if (__glibc_unlikely (new_array == NULL))
return REG_ESPACE;
mctx->state_log = new_array;
}
@@ -4083,7 +4090,7 @@ extend_buffers (re_match_context_t *mctx, int min_len)
if (pstr->mb_cur_max > 1)
{
ret = build_wcs_upper_buffer (pstr);
- if (BE (ret != REG_NOERROR, 0))
+ if (__glibc_unlikely (ret != REG_NOERROR))
return ret;
}
else
@@ -4122,12 +4129,12 @@ match_ctx_init (re_match_context_t *mctx, int eflags, Idx n)
size_t max_object_size =
MAX (sizeof (struct re_backref_cache_entry),
sizeof (re_sub_match_top_t *));
- if (BE (MIN (IDX_MAX, SIZE_MAX / max_object_size) < n, 0))
+ if (__glibc_unlikely (MIN (IDX_MAX, SIZE_MAX / max_object_size) < n))
return REG_ESPACE;
mctx->bkref_ents = re_malloc (struct re_backref_cache_entry, n);
mctx->sub_tops = re_malloc (re_sub_match_top_t *, n);
- if (BE (mctx->bkref_ents == NULL || mctx->sub_tops == NULL, 0))
+ if (__glibc_unlikely (mctx->bkref_ents == NULL || mctx->sub_tops == NULL))
return REG_ESPACE;
}
/* Already zero-ed by the caller.
@@ -4198,7 +4205,7 @@ match_ctx_add_entry (re_match_context_t *mctx, Idx node, Idx str_idx, Idx from,
struct re_backref_cache_entry* new_entry;
new_entry = re_realloc (mctx->bkref_ents, struct re_backref_cache_entry,
mctx->abkref_ents * 2);
- if (BE (new_entry == NULL, 0))
+ if (__glibc_unlikely (new_entry == NULL))
{
re_free (mctx->bkref_ents);
return REG_ESPACE;
@@ -4267,19 +4274,19 @@ match_ctx_add_subtop (re_match_context_t *mctx, Idx node, Idx str_idx)
assert (mctx->sub_tops != NULL);
assert (mctx->asub_tops > 0);
#endif
- if (BE (mctx->nsub_tops == mctx->asub_tops, 0))
+ if (__glibc_unlikely (mctx->nsub_tops == mctx->asub_tops))
{
Idx new_asub_tops = mctx->asub_tops * 2;
re_sub_match_top_t **new_array = re_realloc (mctx->sub_tops,
re_sub_match_top_t *,
new_asub_tops);
- if (BE (new_array == NULL, 0))
+ if (__glibc_unlikely (new_array == NULL))
return REG_ESPACE;
mctx->sub_tops = new_array;
mctx->asub_tops = new_asub_tops;
}
mctx->sub_tops[mctx->nsub_tops] = calloc (1, sizeof (re_sub_match_top_t));
- if (BE (mctx->sub_tops[mctx->nsub_tops] == NULL, 0))
+ if (__glibc_unlikely (mctx->sub_tops[mctx->nsub_tops] == NULL))
return REG_ESPACE;
mctx->sub_tops[mctx->nsub_tops]->node = node;
mctx->sub_tops[mctx->nsub_tops++]->str_idx = str_idx;
@@ -4293,19 +4300,19 @@ static re_sub_match_last_t *
match_ctx_add_sublast (re_sub_match_top_t *subtop, Idx node, Idx str_idx)
{
re_sub_match_last_t *new_entry;
- if (BE (subtop->nlasts == subtop->alasts, 0))
+ if (__glibc_unlikely (subtop->nlasts == subtop->alasts))
{
Idx new_alasts = 2 * subtop->alasts + 1;
re_sub_match_last_t **new_array = re_realloc (subtop->lasts,
re_sub_match_last_t *,
new_alasts);
- if (BE (new_array == NULL, 0))
+ if (__glibc_unlikely (new_array == NULL))
return NULL;
subtop->lasts = new_array;
subtop->alasts = new_alasts;
}
new_entry = calloc (1, sizeof (re_sub_match_last_t));
- if (BE (new_entry != NULL, 1))
+ if (__glibc_likely (new_entry != NULL))
{
subtop->lasts[subtop->nlasts] = new_entry;
new_entry->node = node;
diff --git a/lib/rename.c b/lib/rename.c
index 53fa5fc..0b457aa 100644
--- a/lib/rename.c
+++ b/lib/rename.c
@@ -23,7 +23,7 @@
#undef rename
-#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
+#if defined _WIN32 && ! defined __CYGWIN__
/* The mingw rename has problems with trailing slashes; it also
requires use of native Windows calls to allow atomic renames over
existing files. */
diff --git a/lib/same-inode.h b/lib/same-inode.h
index ad8f7d7..6837795 100644
--- a/lib/same-inode.h
+++ b/lib/same-inode.h
@@ -26,7 +26,7 @@
&& (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__
+# elif defined _WIN32 && ! defined __CYGWIN__
/* Native Windows. */
# if _GL_WINDOWS_STAT_INODES
/* stat() and fstat() set st_dev and st_ino to 0 if information about
diff --git a/lib/set-permissions.c b/lib/set-permissions.c
index 4b7371c..a415e13 100644
--- a/lib/set-permissions.c
+++ b/lib/set-permissions.c
@@ -24,7 +24,7 @@
#include "acl-internal.h"
#if USE_ACL
-# if ! defined HAVE_ACL_FROM_MODE && defined HAVE_ACL_FROM_TEXT /* FreeBSD, IRIX, Tru64 */
+# if ! defined HAVE_ACL_FROM_MODE && defined HAVE_ACL_FROM_TEXT /* FreeBSD, IRIX, Tru64, Cygwin >= 2.5 */
# if HAVE_ACL_GET_FILE && !HAVE_ACL_TYPE_EXTENDED
static acl_t
@@ -32,7 +32,7 @@ acl_from_mode (mode_t mode)
{
# if HAVE_ACL_FREE_TEXT /* Tru64 */
char acl_text[] = "u::---,g::---,o::---,";
-# else /* FreeBSD, IRIX */
+# else /* FreeBSD, IRIX, Cygwin >= 2.5 */
char acl_text[] = "u::---,g::---,o::---";
# endif
@@ -51,7 +51,7 @@ acl_from_mode (mode_t mode)
# endif
# endif
-# if HAVE_FACL && defined GETACL /* Solaris, Cygwin, not HP-UX */
+# if HAVE_FACL && defined GETACL /* Solaris, Cygwin < 2.5, not HP-UX */
static int
set_acls_from_mode (const char *name, int desc, mode_t mode, bool *must_chmod)
{
@@ -229,14 +229,14 @@ set_acls_from_mode (const char *name, int desc, mode_t mode, bool *must_chmod)
if (ret < 0 && errno != EINVAL && errno != ENOTSUP)
{
if (errno == ENOSYS)
- {
- *must_chmod = true;
- return 0;
- }
+ {
+ *must_chmod = true;
+ return 0;
+ }
return -1;
}
if (ret == 0)
- return 0;
+ return 0;
}
# endif
@@ -256,18 +256,18 @@ set_acls_from_mode (const char *name, int desc, mode_t mode, bool *must_chmod)
if (desc != -1)
ret = facl (desc, SETACL,
- sizeof (entries) / sizeof (aclent_t), entries);
+ sizeof (entries) / sizeof (aclent_t), entries);
else
ret = acl (name, SETACL,
- sizeof (entries) / sizeof (aclent_t), entries);
+ sizeof (entries) / sizeof (aclent_t), entries);
if (ret < 0)
{
- if (errno == ENOSYS || errno == EOPNOTSUPP)
- {
- *must_chmod = true;
- return 0;
- }
- return -1;
+ if (errno == ENOSYS || errno == EOPNOTSUPP)
+ {
+ *must_chmod = true;
+ return 0;
+ }
+ return -1;
}
return 0;
}
@@ -483,15 +483,15 @@ context_acl_from_mode (struct permission_context *ctx)
static int
set_acls (struct permission_context *ctx, const char *name, int desc,
- int from_mode, bool *must_chmod, bool *acls_set)
+ 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 */
+ /* Linux, FreeBSD, Mac OS X, IRIX, Tru64, Cygwin >= 2.5 */
# if !HAVE_ACL_TYPE_EXTENDED
- /* Linux, FreeBSD, IRIX, Tru64 */
+ /* Linux, FreeBSD, IRIX, Tru64, Cygwin >= 2.5 */
# ifndef HAVE_ACL_FROM_TEXT
# error Must have acl_from_text (see POSIX 1003.1e draft 17).
@@ -503,53 +503,53 @@ set_acls (struct permission_context *ctx, const char *name, int desc,
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 (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_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 */
+# 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
+# endif
# else /* HAVE_ACL_TYPE_EXTENDED */
/* Mac OS X */
@@ -573,38 +573,38 @@ set_acls (struct permission_context *ctx, const char *name, int desc,
/* Remove ACLs if the file has ACLs. */
if (HAVE_ACL_GET_FD && desc != -1)
- acl = acl_get_fd (desc);
+ acl = acl_get_fd (desc);
else
- acl = acl_get_file (name, ACL_TYPE_EXTENDED);
+ 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;
- }
+ {
+ 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
{
if (HAVE_ACL_SET_FD && desc != -1)
- ret = acl_set_fd (desc, ctx->acl);
+ ret = acl_set_fd (desc, ctx->acl);
else
- ret = acl_set_file (name, ACL_TYPE_EXTENDED, ctx->acl);
+ 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;
- }
+ {
+ if (! acl_errno_valid (errno)
+ && ! acl_extended_nontrivial (ctx->acl))
+ ret = 0;
+ }
}
*acls_set = true;
@@ -626,34 +626,34 @@ set_acls (struct permission_context *ctx, const char *name, int desc,
if (ret == 0 && ctx->count)
{
if (desc != -1)
- ret = facl (desc, SETACL, ctx->count, ctx->entries);
+ ret = facl (desc, SETACL, ctx->count, ctx->entries);
else
- ret = acl (name, SETACL, ctx->count, ctx->entries);
+ 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;
- }
+ {
+ if ((errno == ENOSYS || errno == EOPNOTSUPP || errno == EINVAL)
+ && acl_nontrivial (ctx->count, ctx->entries) == 0)
+ ret = 0;
+ }
else
- *acls_set = true;
+ *acls_set = true;
}
# ifdef ACE_GETACL
if (ret == 0 && ctx->ace_count)
{
if (desc != -1)
- ret = facl (desc, ACE_SETACL, ctx->ace_count, ctx->ace_entries);
+ ret = facl (desc, ACE_SETACL, ctx->ace_count, ctx->ace_entries);
else
- ret = acl (name, ACE_SETACL, ctx->ace_count, ctx->ace_entries);
+ 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;
- }
+ {
+ if ((errno == ENOSYS || errno == EINVAL || errno == ENOTSUP)
+ && acl_ace_nontrivial (ctx->ace_count, ctx->ace_entries) == 0)
+ ret = 0;
+ }
else
- *acls_set = true;
+ *acls_set = true;
}
# endif
@@ -665,17 +665,17 @@ set_acls (struct permission_context *ctx, const char *name, int desc,
if (ret == 0 && ctx->count > 0)
{
if (desc != -1)
- ret = fsetacl (desc, ctx->count, ctx->entries);
+ ret = fsetacl (desc, ctx->count, ctx->entries);
else
- ret = setacl (name, ctx->count, ctx->entries);
+ 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;
- }
+ {
+ if ((errno == ENOSYS || errno == EOPNOTSUPP || errno == ENOTSUP)
+ && (from_mode || !acl_nontrivial (ctx->count, ctx->entries)))
+ ret = 0;
+ }
else
- *acls_set = true;
+ *acls_set = true;
}
# if HAVE_ACLV_H
@@ -686,13 +686,13 @@ set_acls (struct permission_context *ctx, const char *name, int desc,
{
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;
- }
+ {
+ if ((errno == ENOSYS || errno == EOPNOTSUPP || errno == EINVAL)
+ && (from_mode || !aclv_nontrivial (ctx->aclv_count, ctx->aclv_entries)))
+ ret = 0;
+ }
else
- *acls_set = true;
+ *acls_set = true;
}
# endif
@@ -711,16 +711,16 @@ set_acls (struct permission_context *ctx, const char *name, int desc,
if (ret == 0 && ctx->have_u)
{
if (desc != -1)
- ret = fchacl (desc, &ctx->u.a, ctx->u.a.acl_len);
+ ret = fchacl (desc, &ctx->u.a, ctx->u.a.acl_len);
else
- ret = chacl ((char *) name, &ctx->u.a, ctx->u.a.acl_len);
+ ret = chacl ((char *) name, &ctx->u.a, ctx->u.a.acl_len);
if (ret < 0)
- {
- if (errno == ENOSYS && from_mode)
- ret = 0;
- }
+ {
+ if (errno == ENOSYS && from_mode)
+ ret = 0;
+ }
else
- *acls_set = true;
+ *acls_set = true;
}
# elif HAVE_ACLSORT /* NonStop Kernel */
@@ -732,12 +732,12 @@ set_acls (struct permission_context *ctx, const char *name, int desc,
{
ret = acl ((char *) name, ACL_SET, ctx->count, ctx->entries);
if (ret != 0)
- {
- if (!acl_nontrivial (ctx->count, ctx->entries))
- ret = 0;
- }
+ {
+ if (!acl_nontrivial (ctx->count, ctx->entries))
+ ret = 0;
+ }
else
- *acls_set = true;
+ *acls_set = true;
}
# else /* No ACLs */
@@ -805,7 +805,7 @@ set_permissions (struct permission_context *ctx, const char *name, int desc)
{
ret = chmod_or_fchmod (name, desc, ctx->mode);
if (ret != 0)
- return -1;
+ return -1;
}
#if USE_ACL
@@ -815,18 +815,18 @@ set_permissions (struct permission_context *ctx, const char *name, int desc)
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. */
+ 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;
+ must_chmod = true;
if (saved_errno)
- {
- errno = saved_errno;
- ret = -1;
- }
+ {
+ errno = saved_errno;
+ ret = -1;
+ }
}
#endif
@@ -837,10 +837,10 @@ set_permissions (struct permission_context *ctx, const char *name, int desc)
ret = chmod_or_fchmod (name, desc, ctx->mode);
if (saved_errno)
- {
- errno = saved_errno;
- ret = -1;
- }
+ {
+ errno = saved_errno;
+ ret = -1;
+ }
}
return ret;
diff --git a/lib/stat-time.h b/lib/stat-time.h
index 104f537..69ebe85 100644
--- a/lib/stat-time.h
+++ b/lib/stat-time.h
@@ -168,7 +168,7 @@ get_stat_birthtime (struct stat const *st _GL_UNUSED)
#elif defined HAVE_STRUCT_STAT_ST_BIRTHTIMENSEC
t.tv_sec = st->st_birthtime;
t.tv_nsec = st->st_birthtimensec;
-#elif (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
+#elif defined _WIN32 && ! defined __CYGWIN__
/* Native Windows platforms (but not Cygwin) put the "file creation
time" in st_ctime (!). See
<https://msdn.microsoft.com/en-us/library/14h5k7ff(VS.80).aspx>. */
@@ -213,7 +213,7 @@ stat_time_normalize (int result, struct stat *st _GL_UNUSED)
#if defined __sun && defined STAT_TIMESPEC
if (result == 0)
{
- long int timespec_resolution = 1000000000;
+ long int timespec_hz = 1000000000;
short int const ts_off[] = { offsetof (struct stat, st_atim),
offsetof (struct stat, st_mtim),
offsetof (struct stat, st_ctim) };
@@ -221,11 +221,11 @@ stat_time_normalize (int result, struct stat *st _GL_UNUSED)
for (i = 0; i < sizeof ts_off / sizeof *ts_off; i++)
{
struct timespec *ts = (struct timespec *) ((char *) st + ts_off[i]);
- long int q = ts->tv_nsec / timespec_resolution;
- long int r = ts->tv_nsec % timespec_resolution;
+ long int q = ts->tv_nsec / timespec_hz;
+ long int r = ts->tv_nsec % timespec_hz;
if (r < 0)
{
- r += timespec_resolution;
+ r += timespec_hz;
q--;
}
ts->tv_nsec = r;
diff --git a/lib/stat-w32.c b/lib/stat-w32.c
index 5d76a46..c7a53f9 100644
--- a/lib/stat-w32.c
+++ b/lib/stat-w32.c
@@ -18,7 +18,7 @@
#include <config.h>
-#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
+#if defined _WIN32 && ! defined __CYGWIN__
/* Ensure that <windows.h> defines FILE_ID_INFO. */
#undef _WIN32_WINNT
@@ -38,6 +38,10 @@
#include "pathmax.h"
#include "verify.h"
+/* Avoid warnings from gcc -Wcast-function-type. */
+#define GetProcAddress \
+ (void *) GetProcAddress
+
#if _GL_WINDOWS_STAT_INODES == 2
/* GetFileInformationByHandleEx was introduced only in Windows Vista. */
typedef DWORD (WINAPI * GetFileInformationByHandleExFuncType) (HANDLE hFile,
diff --git a/lib/stat.c b/lib/stat.c
index 1c5b62e..18c0caa 100644
--- a/lib/stat.c
+++ b/lib/stat.c
@@ -27,7 +27,7 @@
#include <sys/stat.h>
#undef __need_system_sys_stat_h
-#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
+#if defined _WIN32 && ! defined __CYGWIN__
# define WINDOWS_NATIVE
#endif
diff --git a/lib/stdio-impl.h b/lib/stdio-impl.h
index 05c5752..393ef0c 100644
--- a/lib/stdio-impl.h
+++ b/lib/stdio-impl.h
@@ -60,25 +60,79 @@
# define _flags pub._flags
# define _r pub._r
# define _w pub._w
+# elif defined __ANDROID__ /* Android */
+ /* Up to this commit from 2015-10-12
+ <https://android.googlesource.com/platform/bionic.git/+/f0141dfab10a4b332769d52fa76631a64741297a>
+ the innards of FILE were public, and fp_ub could be defined like for OpenBSD,
+ see <https://android.googlesource.com/platform/bionic.git/+/e78392637d5086384a5631ddfdfa8d7ec8326ee3/libc/stdio/fileext.h>
+ and <https://android.googlesource.com/platform/bionic.git/+/e78392637d5086384a5631ddfdfa8d7ec8326ee3/libc/stdio/local.h>.
+ After this commit, the innards of FILE are hidden. */
+# define fp_ ((struct { unsigned char *_p; \
+ int _r; \
+ int _w; \
+ int _flags; \
+ int _file; \
+ struct { unsigned char *_base; size_t _size; } _bf; \
+ int _lbfsize; \
+ void *_cookie; \
+ void *_close; \
+ void *_read; \
+ void *_seek; \
+ void *_write; \
+ struct { unsigned char *_base; size_t _size; } _ext; \
+ unsigned char *_up; \
+ int _ur; \
+ unsigned char _ubuf[3]; \
+ unsigned char _nbuf[1]; \
+ struct { unsigned char *_base; size_t _size; } _lb; \
+ int _blksize; \
+ fpos_t _offset; \
+ /* More fields, not relevant here. */ \
+ } *) fp)
# else
# define fp_ fp
# endif
-# if (defined __NetBSD__ && __NetBSD_Version__ >= 105270000) || defined __OpenBSD__ || defined __minix || defined __ANDROID__ /* NetBSD >= 1.5ZA, OpenBSD, Minix 3, Android */
+# if (defined __NetBSD__ && __NetBSD_Version__ >= 105270000) || defined __OpenBSD__ || defined __minix /* NetBSD >= 1.5ZA, OpenBSD, Minix 3 */
/* See <http://cvsweb.netbsd.org/bsdweb.cgi/src/lib/libc/stdio/fileext.h?rev=HEAD&content-type=text/x-cvsweb-markup>
- and <https://cvsweb.openbsd.org/cgi-bin/cvsweb/src/lib/libc/stdio/fileext.h?rev=HEAD&content-type=text/x-cvsweb-markup> */
+ and <https://cvsweb.openbsd.org/cgi-bin/cvsweb/src/lib/libc/stdio/fileext.h?rev=HEAD&content-type=text/x-cvsweb-markup>
+ and <https://github.com/Stichting-MINIX-Research-Foundation/minix/blob/master/lib/libc/stdio/fileext.h> */
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 */
+# elif defined __ANDROID__ /* Android */
+ struct __sfileext
+ {
+ struct { unsigned char *_base; size_t _size; } _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 */
# define fp_ub fp_->_ub
# endif
# define HASUB(fp) (fp_ub._base != NULL)
+# if defined __ANDROID__ /* Android */
+ /* Needed after this commit from 2016-01-25
+ <https://android.googlesource.com/platform/bionic.git/+/e70e0e9267d069bf56a5078c99307e08a7280de7> */
+# ifndef __SEOF
+# define __SLBF 1
+# define __SNBF 2
+# define __SRD 4
+# define __SWR 8
+# define __SRW 0x10
+# define __SEOF 0x20
+# define __SERR 0x40
+# endif
+# ifndef __SOFF
+# define __SOFF 0x1000
+# endif
+# endif
+
#endif
@@ -118,7 +172,7 @@
# define _flag __flag
# endif
-#elif (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ /* newer Windows with MSVC */
+#elif defined _WIN32 && ! defined __CYGWIN__ /* newer Windows with MSVC */
/* <stdio.h> does not define the innards of FILE any more. */
# define WINDOWS_OPAQUE_FILE
diff --git a/lib/stdio.in.h b/lib/stdio.in.h
index b9a43bb..ff7c9c8 100644
--- a/lib/stdio.in.h
+++ b/lib/stdio.in.h
@@ -122,7 +122,7 @@
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 _WIN32 && ! defined __CYGWIN__) \
&& ! defined __GLIBC__
# include <stdlib.h>
#endif
@@ -133,7 +133,7 @@
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 _WIN32 && ! defined __CYGWIN__) \
&& ! defined __GLIBC__
# include <io.h>
#endif
diff --git a/lib/stdlib.in.h b/lib/stdlib.in.h
index c8a5d0d..441c018 100644
--- a/lib/stdlib.in.h
+++ b/lib/stdlib.in.h
@@ -54,7 +54,7 @@
#endif
/* Native Windows platforms declare mktemp() in <io.h>. */
-#if 0 && ((defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__)
+#if 0 && (defined _WIN32 && ! defined __CYGWIN__)
# include <io.h>
#endif
@@ -90,9 +90,10 @@ struct random_data
# endif
#endif
-#if (@GNULIB_MKSTEMP@ || @GNULIB_MKSTEMPS@ || @GNULIB_GETSUBOPT@ || defined GNULIB_POSIXCHECK) && ! defined __GLIBC__ && !((defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__)
+#if (@GNULIB_MKSTEMP@ || @GNULIB_MKSTEMPS@ || @GNULIB_MKOSTEMP@ || @GNULIB_MKOSTEMPS@ || @GNULIB_GETSUBOPT@ || defined GNULIB_POSIXCHECK) && ! defined __GLIBC__ && !(defined _WIN32 && ! defined __CYGWIN__)
/* On Mac OS X 10.3, only <unistd.h> declares mkstemp. */
/* On Mac OS X 10.5, only <unistd.h> declares mkstemps. */
+/* On Mac OS X 10.13, only <unistd.h> declares mkostemp and mkostemps. */
/* On Cygwin 1.7.1, only <unistd.h> declares getsubopt. */
/* But avoid namespace pollution on glibc systems and native Windows. */
# include <unistd.h>
diff --git a/lib/sys_stat.in.h b/lib/sys_stat.in.h
index d96fde1..6ae6ac5 100644
--- a/lib/sys_stat.in.h
+++ b/lib/sys_stat.in.h
@@ -57,13 +57,13 @@
/* Before doing "#define mkdir rpl_mkdir" below, we need to include all
headers that may declare mkdir(). Native Windows platforms declare mkdir
in <io.h> and/or <direct.h>, not in <unistd.h>. */
-#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
+#if defined _WIN32 && ! defined __CYGWIN__
# include <io.h> /* mingw32, mingw64 */
# include <direct.h> /* mingw64, MSVC 9 */
#endif
/* Native Windows platforms declare umask() in <io.h>. */
-#if 0 && ((defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__)
+#if 0 && (defined _WIN32 && ! defined __CYGWIN__)
# include <io.h>
#endif
@@ -576,7 +576,7 @@ _GL_CXXALIAS_RPL (mkdir, int, (char const *name, mode_t mode));
Additionally, it declares _mkdir (and depending on compile flags, an
alias mkdir), only in the nonstandard includes <direct.h> and <io.h>,
which are included above. */
-# if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
+# if defined _WIN32 && ! defined __CYGWIN__
# if !GNULIB_defined_rpl_mkdir
static int
diff --git a/lib/sys_types.in.h b/lib/sys_types.in.h
index 7473716..7f8c1c4 100644
--- a/lib/sys_types.in.h
+++ b/lib/sys_types.in.h
@@ -20,6 +20,17 @@
#endif
@PRAGMA_COLUMNS@
+#if defined _WIN32 && !defined __CYGWIN__ \
+ && (defined __need_off_t || defined __need___off64_t \
+ || defined __need_ssize_t || defined __need_time_t)
+
+/* Special invocation convention inside mingw header files. */
+
+#@INCLUDE_NEXT@ @NEXT_SYS_TYPES_H@
+
+#else
+/* Normal invocation convention. */
+
#ifndef _@GUARD_PREFIX@_SYS_TYPES_H
/* The include_next requires a split double-inclusion guard. */
@@ -86,10 +97,10 @@ typedef unsigned long long int rpl_ino_t;
/* MSVC 9 defines size_t in <stddef.h>, not in <sys/types.h>. */
/* But avoid namespace pollution on glibc systems. */
-#if ((defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__) \
- && ! defined __GLIBC__
+#if (defined _WIN32 && ! defined __CYGWIN__) && ! defined __GLIBC__
# include <stddef.h>
#endif
#endif /* _@GUARD_PREFIX@_SYS_TYPES_H */
#endif /* _@GUARD_PREFIX@_SYS_TYPES_H */
+#endif /* __need_XXX */
diff --git a/lib/time.in.h b/lib/time.in.h
index a2dca89..3128f44 100644
--- a/lib/time.in.h
+++ b/lib/time.in.h
@@ -48,7 +48,7 @@
/* The definition of _GL_WARN_ON_USE is copied here. */
-/* Some systems don't define struct timespec (e.g., AIX 4.1, Ultrix 4.3).
+/* Some systems don't define struct timespec (e.g., AIX 4.1).
Or they define it with the wrong member names or define it in <sys/time.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>. */
@@ -212,7 +212,7 @@ _GL_CXXALIASWARN (gmtime_r);
# define localtime rpl_localtime
# endif
_GL_FUNCDECL_RPL (localtime, struct tm *, (time_t const *__timer)
- _GL_ARG_NONNULL ((1)));
+ _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));
diff --git a/lib/unistd.in.h b/lib/unistd.in.h
index beeb8e1..66f254d 100644
--- a/lib/unistd.in.h
+++ b/lib/unistd.in.h
@@ -61,7 +61,7 @@
/* 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__)) \
+ && (defined _WIN32 && ! defined __CYGWIN__)) \
|| ((@GNULIB_SYMLINKAT@ || defined GNULIB_POSIXCHECK) \
&& defined __CYGWIN__)) \
&& ! defined __GLIBC__
@@ -94,13 +94,13 @@
lseek(), read(), unlink(), write() in <io.h>. */
#if ((@GNULIB_CHDIR@ || @GNULIB_GETCWD@ || @GNULIB_RMDIR@ \
|| defined GNULIB_POSIXCHECK) \
- && ((defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__))
+ && (defined _WIN32 && ! defined __CYGWIN__))
# include <io.h> /* mingw32, mingw64 */
# include <direct.h> /* mingw64, MSVC 9 */
#elif (@GNULIB_CLOSE@ || @GNULIB_DUP@ || @GNULIB_DUP2@ || @GNULIB_ISATTY@ \
|| @GNULIB_LSEEK@ || @GNULIB_READ@ || @GNULIB_UNLINK@ || @GNULIB_WRITE@ \
|| defined GNULIB_POSIXCHECK) \
- && ((defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__)
+ && (defined _WIN32 && ! defined __CYGWIN__)
# include <io.h>
#endif
@@ -432,12 +432,12 @@ extern char **environ;
#elif defined GNULIB_POSIXCHECK
# if HAVE_RAW_DECL_ENVIRON
_GL_UNISTD_INLINE char ***
+_GL_WARN_ON_USE_ATTRIBUTE ("environ is unportable - "
+ "use gnulib module environ for portability")
rpl_environ (void)
{
return &environ;
}
-_GL_WARN_ON_USE (rpl_environ, "environ is unportable - "
- "use gnulib module environ for portability");
# undef environ
# define environ (*rpl_environ ())
# endif
@@ -935,6 +935,36 @@ _GL_WARN_ON_USE (getpagesize, "getpagesize is unportable - "
#endif
+#if @GNULIB_GETPASS@
+/* Function getpass() from module 'getpass':
+ Read a password from /dev/tty or stdin.
+ Function getpass() from module 'getpass-gnu':
+ Read a password of arbitrary length from /dev/tty or stdin. */
+# if @REPLACE_GETPASS@
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# undef getpass
+# define getpass rpl_getpass
+# endif
+_GL_FUNCDECL_RPL (getpass, char *, (const char *prompt)
+ _GL_ARG_NONNULL ((1)));
+_GL_CXXALIAS_RPL (getpass, char *, (const char *prompt));
+# else
+# if !@HAVE_GETPASS@
+_GL_FUNCDECL_SYS (getpass, char *, (const char *prompt)
+ _GL_ARG_NONNULL ((1)));
+# endif
+_GL_CXXALIAS_SYS (getpass, char *, (const char *prompt));
+# endif
+_GL_CXXALIASWARN (getpass);
+#elif defined GNULIB_POSIXCHECK
+# undef getpass
+# if HAVE_RAW_DECL_GETPASS
+_GL_WARN_ON_USE (getpass, "getpass is unportable - "
+ "use gnulib module getpass or getpass-gnu for portability");
+# endif
+#endif
+
+
#if @GNULIB_GETUSERSHELL@
/* Return the next valid login shell on the system, or NULL when the end of
the list has been reached. */
@@ -1489,7 +1519,7 @@ _GL_FUNCDECL_RPL (truncate, int, (const char *filename, off_t length)
_GL_ARG_NONNULL ((1)));
_GL_CXXALIAS_RPL (truncate, int, (const char *filename, off_t length));
# else
-# if !@HAVE_TRUNCATE@
+# if !@HAVE_DECL_TRUNCATE@
_GL_FUNCDECL_SYS (truncate, int, (const char *filename, off_t length)
_GL_ARG_NONNULL ((1)));
# endif
diff --git a/lib/verify.h b/lib/verify.h
index bc7f99d..3b57dde 100644
--- a/lib/verify.h
+++ b/lib/verify.h
@@ -276,7 +276,8 @@ template <int w>
when 'assume' silences warnings even with older GCCs. */
# define assume(R) ((R) ? (void) 0 : __builtin_trap ())
#else
-# define assume(R) ((void) (0 && (R)))
+ /* Some tools grok NOTREACHED, e.g., Oracle Studio 12.6. */
+# define assume(R) ((R) ? (void) 0 : /*NOTREACHED*/ (void) 0)
#endif
/* @assert.h omit end@ */
diff --git a/lib/version-etc.c b/lib/version-etc.c
index 56dc249..dfec8ad 100644
--- a/lib/version-etc.c
+++ b/lib/version-etc.c
@@ -23,7 +23,6 @@
#include <stdarg.h>
#include <stdio.h>
-#include <stdlib.h>
#if USE_UNLOCKED_IO
# include "unlocked-io.h"
@@ -95,8 +94,9 @@ There is NO WARRANTY, to the extent permitted by law.\n\
switch (n_authors)
{
case 0:
- /* The caller must provide at least one author name. */
- abort ();
+ /* No authors are given. The caller should output authorship
+ info after calling this function. */
+ break;
case 1:
/* TRANSLATORS: %s denotes an author name. */
fprintf (stream, _("Written by %s.\n"), authors[0]);
diff --git a/lib/warn-on-use.h b/lib/warn-on-use.h
index e76c384..72d67cc 100644
--- a/lib/warn-on-use.h
+++ b/lib/warn-on-use.h
@@ -20,23 +20,32 @@
supported by the compiler. If the compiler does not support this
feature, the macro expands to an unused extern declaration.
- This macro is useful for marking a function as a potential
+ _GL_WARN_ON_USE_ATTRIBUTE ("literal string") expands to the
+ attribute used in _GL_WARN_ON_USE. If the compiler does not support
+ this feature, it expands to empty.
+
+ These macros are useful for marking a function as a potential
portability trap, with the intent that "literal string" include
instructions on the replacement function that should be used
- instead. However, one of the reasons that a function is a
- portability trap is if it has the wrong signature. Declaring
- FUNCTION with a different signature in C is a compilation error, so
- this macro must use the same type as any existing declaration so
- that programs that avoid the problematic FUNCTION do not fail to
- compile merely because they included a header that poisoned the
- function. But this implies that _GL_WARN_ON_USE is only safe to
- use if FUNCTION is known to already have a declaration. Use of
- this macro implies that there must not be any other macro hiding
- the declaration of FUNCTION; but undefining FUNCTION first is part
- of the poisoning process anyway (although for symbols that are
- provided only via a macro, the result is a compilation error rather
- than a warning containing "literal string"). Also note that in
- C++, it is only safe to use if FUNCTION has no overloads.
+ instead.
+ _GL_WARN_ON_USE is for functions with 'extern' linkage.
+ _GL_WARN_ON_USE_ATTRIBUTE is for functions with 'static' or 'inline'
+ linkage.
+
+ However, one of the reasons that a function is a portability trap is
+ if it has the wrong signature. Declaring FUNCTION with a different
+ signature in C is a compilation error, so this macro must use the
+ same type as any existing declaration so that programs that avoid
+ the problematic FUNCTION do not fail to compile merely because they
+ included a header that poisoned the function. But this implies that
+ _GL_WARN_ON_USE is only safe to use if FUNCTION is known to already
+ have a declaration. Use of this macro implies that there must not
+ be any other macro hiding the declaration of FUNCTION; but
+ undefining FUNCTION first is part of the poisoning process anyway
+ (although for symbols that are provided only via a macro, the result
+ is a compilation error rather than a warning containing
+ "literal string"). Also note that in C++, it is only safe to use if
+ FUNCTION has no overloads.
For an example, it is possible to poison 'getline' by:
- adding a call to gl_WARN_ON_USE_PREPARE([[#include <stdio.h>]],
@@ -54,12 +63,21 @@
(less common usage, like &environ, will cause a compilation error
rather than issue the nice warning, but the end result of informing
the developer about their portability problem is still achieved):
- #if HAVE_RAW_DECL_ENVIRON
- static char ***rpl_environ (void) { return &environ; }
- _GL_WARN_ON_USE (rpl_environ, "environ is not always properly declared");
- # undef environ
- # define environ (*rpl_environ ())
- #endif
+ #if HAVE_RAW_DECL_ENVIRON
+ static char ***
+ rpl_environ (void) { return &environ; }
+ _GL_WARN_ON_USE (rpl_environ, "environ is not always properly declared");
+ # undef environ
+ # define environ (*rpl_environ ())
+ #endif
+ or better (avoiding contradictory use of 'static' and 'extern'):
+ #if HAVE_RAW_DECL_ENVIRON
+ static char ***
+ _GL_WARN_ON_USE_ATTRIBUTE ("environ is not always properly declared")
+ rpl_environ (void) { return &environ; }
+ # undef environ
+ # define environ (*rpl_environ ())
+ #endif
*/
#ifndef _GL_WARN_ON_USE
@@ -67,13 +85,17 @@
/* A compiler attribute is available in gcc versions 4.3.0 and later. */
# define _GL_WARN_ON_USE(function, message) \
extern __typeof__ (function) function __attribute__ ((__warning__ (message)))
+# define _GL_WARN_ON_USE_ATTRIBUTE(message) \
+ __attribute__ ((__warning__ (message)))
# elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING
/* Verify the existence of the function. */
# define _GL_WARN_ON_USE(function, message) \
extern __typeof__ (function) function
+# define _GL_WARN_ON_USE_ATTRIBUTE(message)
# else /* Unsupported. */
# define _GL_WARN_ON_USE(function, message) \
_GL_WARN_EXTERN_C int _gl_warn_on_use
+# define _GL_WARN_ON_USE_ATTRIBUTE(message)
# endif
#endif
diff --git a/lib/wctype.in.h b/lib/wctype.in.h
index 1092016..3c6e5f2 100644
--- a/lib/wctype.in.h
+++ b/lib/wctype.in.h
@@ -60,7 +60,7 @@
isw* functions in <ctype.h>, <wchar.h> as well as in <wctype.h>. Include
<ctype.h>, <wchar.h> in advance to avoid rpl_ prefix being added to the
declarations. */
-#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
+#if defined _WIN32 && ! defined __CYGWIN__
# include <ctype.h>
# include <wchar.h>
#endif
diff --git a/lib/xalloc.h b/lib/xalloc.h
index 2a51b84..c419a2d 100644
--- a/lib/xalloc.h
+++ b/lib/xalloc.h
@@ -36,12 +36,6 @@ extern "C" {
#endif
-#if __GNUC__ >= 3
-# define _GL_ATTRIBUTE_MALLOC __attribute__ ((__malloc__))
-#else
-# define _GL_ATTRIBUTE_MALLOC
-#endif
-
#if ! defined __clang__ && \
(__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3))
# define _GL_ATTRIBUTE_ALLOC_SIZE(args) __attribute__ ((__alloc_size__ args))
diff --git a/m4/__inline.m4 b/m4/__inline.m4
new file mode 100644
index 0000000..3d0c479
--- /dev/null
+++ b/m4/__inline.m4
@@ -0,0 +1,22 @@
+# Test for __inline keyword
+dnl Copyright 2017-2018 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+AC_DEFUN([gl___INLINE],
+[
+ AC_CACHE_CHECK([whether the compiler supports the __inline keyword],
+ [gl_cv_c___inline],
+ [AC_COMPILE_IFELSE(
+ [AC_LANG_PROGRAM(
+ [[typedef int foo_t;
+ static __inline foo_t foo (void) { return 0; }]],
+ [[return foo ();]])],
+ [gl_cv_c___inline=yes],
+ [gl_cv_c___inline=no])])
+ if test $gl_cv_c___inline = yes; then
+ AC_DEFINE([HAVE___INLINE], [1],
+ [Define to 1 if the compiler supports the keyword '__inline'.])
+ fi
+])
diff --git a/m4/acl.m4 b/m4/acl.m4
index 485cf9a..b64aa84 100644
--- a/m4/acl.m4
+++ b/m4/acl.m4
@@ -1,5 +1,5 @@
# acl.m4 - check for access control list (ACL) primitives
-# serial 22
+# serial 23
# Copyright (C) 2002, 2004-2018 Free Software Foundation, Inc.
# This file is free software; the Free Software Foundation
@@ -30,7 +30,8 @@ AC_DEFUN([gl_FUNC_ACL],
ac_save_LIBS=$LIBS
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.
+ dnl IRIX, Tru64, Cygwin >= 2.5).
+ dnl -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
diff --git a/m4/asm-underscore.m4 b/m4/asm-underscore.m4
deleted file mode 100644
index 58a5299..0000000
--- a/m4/asm-underscore.m4
+++ /dev/null
@@ -1,72 +0,0 @@
-# asm-underscore.m4 serial 4
-dnl Copyright (C) 2010-2018 Free Software Foundation, Inc.
-dnl This file is free software; the Free Software Foundation
-dnl gives unlimited permission to copy and/or distribute it,
-dnl with or without modifications, as long as this notice is preserved.
-
-dnl From Bruno Haible. Based on as-underscore.m4 in GNU clisp.
-
-# gl_ASM_SYMBOL_PREFIX
-# Tests for the prefix of C symbols at the assembly language level and the
-# linker level. This prefix is either an underscore or empty. Defines the
-# C macro USER_LABEL_PREFIX to this prefix, and sets ASM_SYMBOL_PREFIX to
-# a stringified variant of this prefix.
-
-AC_DEFUN([gl_ASM_SYMBOL_PREFIX],
-[
- AC_REQUIRE([AC_PROG_EGREP])
- dnl We don't use GCC's __USER_LABEL_PREFIX__ here, because
- dnl 1. It works only for GCC.
- dnl 2. It is incorrectly defined on some platforms, in some GCC versions.
- AC_REQUIRE([gl_C_ASM])
- AC_CACHE_CHECK(
- [whether C symbols are prefixed with underscore at the linker level],
- [gl_cv_prog_as_underscore],
- [cat > conftest.c <<EOF
-#ifdef __cplusplus
-extern "C" int foo (void);
-#endif
-int foo(void) { return 0; }
-EOF
- # Look for the assembly language name in the .s file.
- AC_TRY_COMMAND(${CC-cc} $CFLAGS $CPPFLAGS $gl_c_asm_opt conftest.c) >/dev/null 2>&1
- if LC_ALL=C $EGREP '(^|[[^a-zA-Z0-9_]])_foo([[^a-zA-Z0-9_]]|$)' conftest.$gl_asmext >/dev/null; then
- gl_cv_prog_as_underscore=yes
- else
- gl_cv_prog_as_underscore=no
- fi
- rm -f conftest*
- ])
- if test $gl_cv_prog_as_underscore = yes; then
- USER_LABEL_PREFIX=_
- else
- USER_LABEL_PREFIX=
- fi
- AC_DEFINE_UNQUOTED([USER_LABEL_PREFIX], [$USER_LABEL_PREFIX],
- [Define to the prefix of C symbols at the assembler and linker level,
- either an underscore or empty.])
- ASM_SYMBOL_PREFIX='"'${USER_LABEL_PREFIX}'"'
- AC_SUBST([ASM_SYMBOL_PREFIX])
-])
-
-# gl_C_ASM
-# Determines how to produce an assembly language file from C source code.
-# Sets the variables:
-# gl_asmext - the extension of assembly language output,
-# gl_c_asm_opt - the C compiler option that produces assembly language output.
-
-AC_DEFUN([gl_C_ASM],
-[
- AC_EGREP_CPP([MicrosoftCompiler],
- [
-#ifdef _MSC_VER
-MicrosoftCompiler
-#endif
- ],
- [gl_asmext='asm'
- gl_c_asm_opt='-c -Fa'
- ],
- [gl_asmext='s'
- gl_c_asm_opt='-S'
- ])
-])
diff --git a/m4/canonicalize.m4 b/m4/canonicalize.m4
index 9de4f13..0c23894 100644
--- a/m4/canonicalize.m4
+++ b/m4/canonicalize.m4
@@ -35,8 +35,8 @@ AC_DEFUN([gl_CANONICALIZE_LGPL],
HAVE_REALPATH=0
else
case "$gl_cv_func_realpath_works" in
- *yes) ;;
- *) REPLACE_REALPATH=1 ;;
+ *yes) ;;
+ *) REPLACE_REALPATH=1 ;;
esac
fi
else
diff --git a/m4/configmake.m4 b/m4/configmake.m4
deleted file mode 100644
index e0b5835..0000000
--- a/m4/configmake.m4
+++ /dev/null
@@ -1,55 +0,0 @@
-# configmake.m4 serial 2
-dnl Copyright (C) 2010-2018 Free Software Foundation, Inc.
-dnl This file is free software; the Free Software Foundation
-dnl gives unlimited permission to copy and/or distribute it,
-dnl with or without modifications, as long as this notice is preserved.
-
-# gl_CONFIGMAKE_PREP
-# ------------------
-# Guarantee all of the standard directory variables, even when used with
-# 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
- dnl autoconf is too old to provide datarootdir, then reversing the
- dnl definition is a reasonable compromise. Only AC_SUBST a variable
- dnl if it was not already defined earlier by autoconf.
- if test "x$datarootdir" = x; then
- AC_SUBST([datarootdir], ['${datadir}'])
- fi
- dnl Copy the approach used in autoconf 2.60.
- if test "x$docdir" = x; then
- AC_SUBST([docdir], [m4_ifset([AC_PACKAGE_TARNAME],
- ['${datarootdir}/doc/${PACKAGE_TARNAME}'],
- ['${datarootdir}/doc/${PACKAGE}'])])
- fi
- dnl The remaining variables missing from autoconf 2.59 are easier.
- if test "x$htmldir" = x; then
- AC_SUBST([htmldir], ['${docdir}'])
- fi
- if test "x$dvidir" = x; then
- AC_SUBST([dvidir], ['${docdir}'])
- fi
- if test "x$pdfdir" = x; then
- AC_SUBST([pdfdir], ['${docdir}'])
- fi
- if test "x$psdir" = x; then
- AC_SUBST([psdir], ['${docdir}'])
- fi
- if test "x$lispdir" = x; then
- AC_SUBST([lispdir], ['${datarootdir}/emacs/site-lisp'])
- fi
- 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.
- AC_SUBST([pkglibexecdir], ['${libexecdir}/${PACKAGE}'])
-])
diff --git a/m4/environ.m4 b/m4/environ.m4
index 68b67ea..acee536 100644
--- a/m4/environ.m4
+++ b/m4/environ.m4
@@ -1,4 +1,4 @@
-# environ.m4 serial 6
+# environ.m4 serial 7
dnl Copyright (C) 2001-2004, 2006-2018 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
@@ -29,16 +29,14 @@ AC_DEFUN_ONCE([gl_ENVIRON],
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])
+ AC_CACHE_CHECK([if $2 is properly declared], [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])])
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.])
diff --git a/m4/errno_h.m4 b/m4/errno_h.m4
index 9dbdedd..e1ae295 100644
--- a/m4/errno_h.m4
+++ b/m4/errno_h.m4
@@ -1,9 +1,11 @@
-# errno_h.m4 serial 12
+# errno_h.m4 serial 13
dnl Copyright (C) 2004, 2006, 2008-2018 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
+AC_PREREQ([2.61])
+
AC_DEFUN_ONCE([gl_HEADER_ERRNO_H],
[
AC_REQUIRE([AC_PROG_CC])
@@ -129,9 +131,3 @@ yes
AC_SUBST($1[_VALUE])
fi
])
-
-dnl Autoconf >= 2.61 has AC_COMPUTE_INT built-in.
-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])])
-])
diff --git a/m4/extern-inline.m4 b/m4/extern-inline.m4
index da8a2cc..3661cbd 100644
--- a/m4/extern-inline.m4
+++ b/m4/extern-inline.m4
@@ -25,7 +25,8 @@ AC_DEFUN([gl_EXTERN_INLINE],
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:
+ from calling static functions (ISO C 99 section 6.7.4.(3).
+ This bug is known to occur on:
OS X 10.8 and earlier; see:
https://lists.gnu.org/r/bug-gnulib/2012-12/msg00023.html
@@ -38,7 +39,18 @@ AC_DEFUN([gl_EXTERN_INLINE],
OS X 10.9 has a macro __header_inline indicating the bug is fixed for C and
for clang but remains for g++; see <https://trac.macports.org/ticket/41033>.
- Assume DragonFly and FreeBSD will be similar. */
+ Assume DragonFly and FreeBSD will be similar.
+
+ GCC 4.3 and above with -std=c99 or -std=gnu99 implements ISO C99
+ inline semantics, unless -fgnu89-inline is used. It defines a macro
+ __GNUC_STDC_INLINE__ to indicate this situation or a macro
+ __GNUC_GNU_INLINE__ to indicate the opposite situation.
+ GCC 4.2 with -std=c99 or -std=gnu99 implements the GNU C inline
+ semantics but warns, unless -fgnu89-inline is used:
+ warning: C99 inline functions are not supported; using GNU89
+ warning: to disable this warning use -fgnu89-inline or the gnu_inline function attribute
+ It defines a macro __GNUC_GNU_INLINE__ to indicate this situation.
+ */
#if (((defined __APPLE__ && defined __MACH__) \
|| defined __DragonFly__ || defined __FreeBSD__) \
&& (defined __header_inline \
diff --git a/m4/fcntl-o.m4 b/m4/fcntl-o.m4
index 4dc3daa..cffb9de 100644
--- a/m4/fcntl-o.m4
+++ b/m4/fcntl-o.m4
@@ -1,4 +1,4 @@
-# fcntl-o.m4 serial 5
+# fcntl-o.m4 serial 6
dnl Copyright (C) 2006, 2009-2018 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
@@ -6,17 +6,15 @@ dnl with or without modifications, as long as this notice is preserved.
dnl Written by Paul Eggert.
+AC_PREREQ([2.60])
+
# Test whether the flags O_NOATIME and O_NOFOLLOW actually work.
# Define HAVE_WORKING_O_NOATIME to 1 if O_NOATIME works, or to 0 otherwise.
# Define HAVE_WORKING_O_NOFOLLOW to 1 if O_NOFOLLOW works, or to 0 otherwise.
AC_DEFUN([gl_FCNTL_O_FLAGS],
[
dnl Persuade glibc <fcntl.h> to define O_NOATIME and O_NOFOLLOW.
- dnl AC_USE_SYSTEM_EXTENSIONS was introduced in autoconf 2.60 and obsoletes
- dnl AC_GNU_SOURCE.
- m4_ifdef([AC_USE_SYSTEM_EXTENSIONS],
- [AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS])],
- [AC_REQUIRE([AC_GNU_SOURCE])])
+ AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS])
AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
AC_CHECK_HEADERS_ONCE([unistd.h])
diff --git a/m4/fseeko.m4 b/m4/fseeko.m4
index 8967cf1..86c246e 100644
--- a/m4/fseeko.m4
+++ b/m4/fseeko.m4
@@ -1,4 +1,4 @@
-# fseeko.m4 serial 18
+# fseeko.m4 serial 19
dnl Copyright (C) 2007-2018 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
@@ -68,7 +68,10 @@ AC_DEFUN([gl_STDIN_LARGE_OFFSET],
# 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.
+ dnl Native Windows has the function _fseeki64. mingw hides it in some
+ dnl circumstances, but mingw64 makes it usable again.
AC_CHECK_FUNCS([_fseeki64])
+ if test $ac_cv_func__fseeki64 = yes; then
+ AC_CHECK_DECLS([_fseeki64])
+ fi
])
diff --git a/m4/getcwd.m4 b/m4/getcwd.m4
index 2875fe5..019934d 100644
--- a/m4/getcwd.m4
+++ b/m4/getcwd.m4
@@ -6,7 +6,7 @@
# with or without modifications, as long as this notice is preserved.
# Written by Paul Eggert.
-# serial 15
+# serial 16
AC_DEFUN([gl_FUNC_GETCWD_NULL],
[
@@ -25,7 +25,7 @@ AC_DEFUN([gl_FUNC_GETCWD_NULL],
char *getcwd ();
# endif
]], [[
-#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
+#if defined _WIN32 && ! defined __CYGWIN__
/* mingw cwd does not start with '/', but getcwd does allocate.
However, mingw fails to honor non-zero size. */
#else
diff --git a/m4/getpagesize.m4 b/m4/getpagesize.m4
index 6492c78..eb17d60 100644
--- a/m4/getpagesize.m4
+++ b/m4/getpagesize.m4
@@ -1,4 +1,4 @@
-# getpagesize.m4 serial 9
+# getpagesize.m4 serial 10
dnl Copyright (C) 2002, 2004-2005, 2007, 2009-2018 Free Software Foundation,
dnl Inc.
dnl This file is free software; the Free Software Foundation
@@ -9,8 +9,8 @@ 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
+ gl_CHECK_FUNC_GETPAGESIZE
+ if test $gl_cv_func_getpagesize = no; then
HAVE_GETPAGESIZE=0
AC_CHECK_HEADERS([OS.h])
if test $ac_cv_header_OS_h = yes; then
@@ -30,3 +30,20 @@ AC_DEFUN([gl_FUNC_GETPAGESIZE],
dnl mingw has getpagesize() in libgcc.a but doesn't declare it.
AC_CHECK_DECL([getpagesize], , [HAVE_DECL_GETPAGESIZE=0])
])
+
+dnl Tests whether the function getpagesize() exists.
+dnl Sets gl_cv_func_getpagesize.
+AC_DEFUN([gl_CHECK_FUNC_GETPAGESIZE],
+[
+ dnl We can't use AC_CHECK_FUNC here, because getpagesize() is defined as a
+ dnl static inline function when compiling for Android 4.4 or older.
+ AC_CACHE_CHECK([for getpagesize], [gl_cv_func_getpagesize],
+ [AC_LINK_IFELSE(
+ [AC_LANG_PROGRAM(
+ [[#include <unistd.h>]],
+ [[return getpagesize();]])
+ ],
+ [gl_cv_func_getpagesize=yes],
+ [gl_cv_func_getpagesize=no])
+ ])
+])
diff --git a/m4/gnulib-common.m4 b/m4/gnulib-common.m4
index de65f6b..2b253da 100644
--- a/m4/gnulib-common.m4
+++ b/m4/gnulib-common.m4
@@ -1,9 +1,11 @@
-# gnulib-common.m4 serial 38
+# gnulib-common.m4 serial 41
dnl Copyright (C) 2007-2018 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
+AC_PREREQ([2.62])
+
# gl_COMMON
# is expanded unconditionally through gnulib-tool magic.
AC_DEFUN([gl_COMMON], [
@@ -14,12 +16,15 @@ AC_DEFUN([gl_COMMON], [
AC_DEFUN([gl_COMMON_BODY], [
AH_VERBATIM([_Noreturn],
[/* The _Noreturn keyword of C11. */
-#if ! (defined _Noreturn \
- || (defined __STDC_VERSION__ && 201112 <= __STDC_VERSION__))
-# if (3 <= __GNUC__ || (__GNUC__ == 2 && 8 <= __GNUC_MINOR__) \
- || 0x5110 <= __SUNPRO_C)
+#ifndef _Noreturn
+# if 201103 <= (defined __cplusplus ? __cplusplus : 0)
+# define _Noreturn [[noreturn]]
+# elif (201112 <= (defined __STDC_VERSION__ ? __STDC_VERSION__ : 0) \
+ || 4 < __GNUC__ + (7 <= __GNUC_MINOR__))
+ /* _Noreturn works as-is. */
+# elif 2 < __GNUC__ + (8 <= __GNUC_MINOR__) || 0x5110 <= __SUNPRO_C
# define _Noreturn __attribute__ ((__noreturn__))
-# elif defined _MSC_VER && 1200 <= _MSC_VER
+# elif 1200 <= (defined _MSC_VER ? _MSC_VER : 0)
# define _Noreturn __declspec (noreturn)
# else
# define _Noreturn
@@ -72,6 +77,13 @@ AC_DEFUN([gl_COMMON_BODY], [
#else
# define _GL_ATTRIBUTE_CONST /* empty */
#endif
+
+/* The __malloc__ attribute was added in gcc 3. */
+#if 3 <= __GNUC__
+# define _GL_ATTRIBUTE_MALLOC __attribute__ ((__malloc__))
+#else
+# define _GL_ATTRIBUTE_MALLOC /* empty */
+#endif
])
dnl Preparation for running test programs:
dnl Tell glibc to write diagnostics from -D_FORTIFY_SOURCE=2 to stderr, not
@@ -207,13 +219,6 @@ AC_DEFUN([gl_FEATURES_H],
AC_SUBST([HAVE_FEATURES_H])
])
-# m4_foreach_w
-# is a backport of autoconf-2.59c's m4_foreach_w.
-# Remove this macro when we can assume autoconf >= 2.60.
-m4_ifndef([m4_foreach_w],
- [m4_define([m4_foreach_w],
- [m4_foreach([$1], m4_split(m4_normalize([$2]), [ ]), [$3])])])
-
# AS_VAR_IF(VAR, VALUE, [IF-MATCH], [IF-NOT-MATCH])
# ----------------------------------------------------
# Backport of autoconf-2.63b's macro.
@@ -226,7 +231,6 @@ m4_ifndef([AS_VAR_IF],
# Modifies the value of the shell variable CC in an attempt to make $CC
# understand ISO C99 source code.
# This is like AC_PROG_CC_C99, except that
-# - AC_PROG_CC_C99 did not exist in Autoconf versions < 2.60,
# - AC_PROG_CC_C99 does not mix well with AC_PROG_CC_STDC
# <https://lists.gnu.org/r/bug-gnulib/2011-09/msg00367.html>,
# but many more packages use AC_PROG_CC_STDC than AC_PROG_CC_C99
@@ -315,25 +319,6 @@ Amsterdam
AC_SUBST([RANLIB])
])
-# AC_PROG_MKDIR_P
-# is a backport of autoconf-2.60's AC_PROG_MKDIR_P, with a fix
-# for interoperability with automake-1.9.6 from autoconf-2.62.
-# Remove this macro when we can assume autoconf >= 2.62 or
-# autoconf >= 2.60 && automake >= 1.10.
-# AC_AUTOCONF_VERSION was introduced in 2.62, so use that as the witness.
-m4_ifndef([AC_AUTOCONF_VERSION],[
-m4_ifdef([AC_PROG_MKDIR_P], [
- dnl For automake-1.9.6 && autoconf < 2.62: Ensure MKDIR_P is AC_SUBSTed.
- m4_define([AC_PROG_MKDIR_P],
- m4_defn([AC_PROG_MKDIR_P])[
- AC_SUBST([MKDIR_P])])], [
- dnl For autoconf < 2.60: Backport of AC_PROG_MKDIR_P.
- AC_DEFUN_ONCE([AC_PROG_MKDIR_P],
- [AC_REQUIRE([AM_PROG_MKDIR_P])dnl defined by automake
- MKDIR_P='$(mkdir_p)'
- AC_SUBST([MKDIR_P])])])
-])
-
# AC_C_RESTRICT
# 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
@@ -347,16 +332,16 @@ AC_DEFUN([AC_C_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 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);
- ]])],
+ [[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
@@ -407,61 +392,3 @@ AC_DEFUN([gl_CACHE_VAL_SILENT],
# 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 f958ac1..0d8b64f 100644
--- a/m4/gnulib-comp.m4
+++ b/m4/gnulib-comp.m4
@@ -82,7 +82,6 @@ AC_DEFUN([gl_EARLY],
# Code from module close-tests:
# Code from module closedir:
# Code from module closeout:
- # Code from module configmake:
# Code from module connect:
# Code from module connect-tests:
# Code from module ctype:
@@ -172,7 +171,6 @@ AC_DEFUN([gl_EARLY],
# Code from module gnupload:
# Code from module hard-locale:
# Code from module havelib:
- # Code from module host-cpu-c-abi:
# Code from module ignore-value:
# Code from module ignore-value-tests:
# Code from module include_next:
@@ -191,6 +189,7 @@ AC_DEFUN([gl_EARLY],
# Code from module langinfo-tests:
# Code from module largefile:
AC_REQUIRE([AC_SYS_LARGEFILE])
+ # Code from module libc-config:
# Code from module limits-h:
# Code from module limits-h-tests:
# Code from module link:
@@ -198,6 +197,7 @@ AC_DEFUN([gl_EARLY],
# Code from module listen:
# Code from module listen-tests:
# Code from module localcharset:
+ # Code from module localcharset-tests:
# Code from module locale:
# Code from module locale-tests:
# Code from module localeconv:
@@ -226,6 +226,8 @@ AC_DEFUN([gl_EARLY],
# Code from module memrchr:
# Code from module memrchr-tests:
# Code from module minmax:
+ # Code from module mkdir:
+ # Code from module mkdir-tests:
# Code from module mkostemp:
# Code from module msvc-inval:
# Code from module msvc-nothrow:
@@ -425,7 +427,6 @@ AC_DEFUN([gl_INIT],
gl_CLOSE_STREAM
gl_MODULE_INDICATOR([close-stream])
gl_CLOSEOUT
- gl_CONFIGMAKE_PREP
gl_CTYPE_H
gl_DIRNAME_LGPL
gl_DOUBLE_SLASH_ROOT
@@ -496,8 +497,6 @@ AC_DEFUN([gl_INIT],
m4_defn([m4_PACKAGE_VERSION])), [1], [],
[AC_CONFIG_LINKS([$GNUmakefile:$GNUmakefile], [],
[GNUmakefile=$GNUmakefile])])
- gl_HARD_LOCALE
- AC_REQUIRE([gl_HOST_CPU_C_ABI])
gl_FUNC_ISBLANK
if test $HAVE_ISBLANK = 0; then
AC_LIBOBJ([isblank])
@@ -505,9 +504,11 @@ AC_DEFUN([gl_INIT],
gl_CTYPE_MODULE_INDICATOR([isblank])
gl_LANGINFO_H
AC_REQUIRE([gl_LARGEFILE])
+ gl___INLINE
gl_LIMITS_H
gl_LOCALCHARSET
- LOCALCHARSET_TESTS_ENVIRONMENT="CHARSETALIASDIR=\"\$(abs_top_builddir)/$gl_source_base\""
+ dnl For backward compatibility. Some packages still use this.
+ LOCALCHARSET_TESTS_ENVIRONMENT=
AC_SUBST([LOCALCHARSET_TESTS_ENVIRONMENT])
gl_LOCALE_H
gl_FUNC_LOCALECONV
@@ -572,6 +573,10 @@ AC_DEFUN([gl_INIT],
fi
gl_STRING_MODULE_INDICATOR([memrchr])
gl_MINMAX
+ gl_FUNC_MKDIR
+ if test $REPLACE_MKDIR = 1; then
+ AC_LIBOBJ([mkdir])
+ fi
gl_FUNC_MKOSTEMP
if test $HAVE_MKOSTEMP = 0; then
AC_LIBOBJ([mkostemp])
@@ -903,6 +908,7 @@ changequote([, ])dnl
gl_SYS_SOCKET_MODULE_INDICATOR([listen])
AC_CHECK_FUNCS_ONCE([newlocale])
gl_LOCALENAME
+ gl_LOCALE_MODULE_INDICATOR([localename])
AC_CHECK_FUNCS_ONCE([newlocale])
gl_FUNC_LSEEK
if test $REPLACE_LSEEK = 1; then
@@ -1209,6 +1215,8 @@ AC_DEFUN([gl_FILE_LIST], [
lib/alloca.in.h
lib/arg-nonnull.h
lib/basename-lgpl.c
+ lib/binary-io.c
+ lib/binary-io.h
lib/btowc.c
lib/c++defs.h
lib/c-ctype.c
@@ -1218,11 +1226,11 @@ AC_DEFUN([gl_FILE_LIST], [
lib/c-strcaseeq.h
lib/c-strncasecmp.c
lib/canonicalize-lgpl.c
+ lib/cdefs.h
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
@@ -1267,6 +1275,7 @@ AC_DEFUN([gl_FILE_LIST], [
lib/intprops.h
lib/isblank.c
lib/langinfo.in.h
+ lib/libc-config.h
lib/limits.in.h
lib/localcharset.c
lib/localcharset.h
@@ -1289,6 +1298,7 @@ AC_DEFUN([gl_FILE_LIST], [
lib/memchr.valgrind
lib/memrchr.c
lib/minmax.h
+ lib/mkdir.c
lib/mkostemp.c
lib/msvc-inval.c
lib/msvc-inval.h
@@ -1306,8 +1316,6 @@ AC_DEFUN([gl_FILE_LIST], [
lib/quotearg.c
lib/quotearg.h
lib/readlink.c
- lib/ref-add.sin
- lib/ref-del.sin
lib/regcomp.c
lib/regex.c
lib/regex.h
@@ -1371,11 +1379,11 @@ AC_DEFUN([gl_FILE_LIST], [
lib/xalloc.h
lib/xmalloc.c
m4/00gnulib.m4
+ m4/__inline.m4
m4/absolute-header.m4
m4/acl.m4
m4/alloca.m4
m4/arpa_inet_h.m4
- m4/asm-underscore.m4
m4/assert.m4
m4/btowc.m4
m4/builtin-expect.m4
@@ -1385,7 +1393,6 @@ AC_DEFUN([gl_FILE_LIST], [
m4/closedir.m4
m4/closeout.m4
m4/codeset.m4
- m4/configmake.m4
m4/ctype.m4
m4/dirent_h.m4
m4/dirfd.m4
@@ -1423,10 +1430,10 @@ AC_DEFUN([gl_FILE_LIST], [
m4/gettimeofday.m4
m4/glibc21.m4
m4/gnulib-common.m4
- m4/hard-locale.m4
m4/host-cpu-c-abi.m4
m4/include_next.m4
m4/inet_pton.m4
+ m4/intl-thread-locale.m4
m4/intlmacosx.m4
m4/inttypes-pri.m4
m4/inttypes.m4
@@ -1465,6 +1472,7 @@ AC_DEFUN([gl_FILE_LIST], [
m4/memchr.m4
m4/memrchr.m4
m4/minmax.m4
+ m4/mkdir.m4
m4/mkostemp.m4
m4/mmap-anon.m4
m4/mode_t.m4
@@ -1650,6 +1658,7 @@ AC_DEFUN([gl_FILE_LIST], [
tests/test-link.c
tests/test-link.h
tests/test-listen.c
+ tests/test-localcharset.c
tests/test-locale.c
tests/test-localeconv.c
tests/test-localename.c
@@ -1674,6 +1683,8 @@ AC_DEFUN([gl_FILE_LIST], [
tests/test-mbsinit.sh
tests/test-memchr.c
tests/test-memrchr.c
+ tests/test-mkdir.c
+ tests/test-mkdir.h
tests/test-nanosleep.c
tests/test-netinet_in.c
tests/test-nl_langinfo.c
@@ -1769,8 +1780,6 @@ AC_DEFUN([gl_FILE_LIST], [
tests=lib/accept.c
tests=lib/arg-nonnull.h
tests=lib/arpa_inet.in.h
- tests=lib/binary-io.c
- tests=lib/binary-io.h
tests=lib/bind.c
tests=lib/c++defs.h
tests=lib/cloexec.c
@@ -1805,6 +1814,8 @@ AC_DEFUN([gl_FILE_LIST], [
tests=lib/ioctl.c
tests=lib/link.c
tests=lib/listen.c
+ tests=lib/localename-table.c
+ tests=lib/localename-table.h
tests=lib/localename.c
tests=lib/localename.h
tests=lib/lseek.c
diff --git a/m4/hard-locale.m4 b/m4/hard-locale.m4
deleted file mode 100644
index 1922223..0000000
--- a/m4/hard-locale.m4
+++ /dev/null
@@ -1,11 +0,0 @@
-# hard-locale.m4 serial 8
-dnl Copyright (C) 2002-2006, 2009-2018 Free Software Foundation, Inc.
-dnl This file is free software; the Free Software Foundation
-dnl gives unlimited permission to copy and/or distribute it,
-dnl with or without modifications, as long as this notice is preserved.
-
-dnl No prerequisites of lib/hard-locale.c.
-AC_DEFUN([gl_HARD_LOCALE],
-[
- :
-])
diff --git a/m4/host-cpu-c-abi.m4 b/m4/host-cpu-c-abi.m4
index 3fac6f7..cd88070 100644
--- a/m4/host-cpu-c-abi.m4
+++ b/m4/host-cpu-c-abi.m4
@@ -1,4 +1,4 @@
-# host-cpu-c-abi.m4 serial 10
+# host-cpu-c-abi.m4 serial 11
dnl Copyright (C) 2002-2018 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
@@ -454,3 +454,191 @@ EOF
])
])
+
+
+dnl Sets the HOST_CPU_C_ABI_32BIT variable to 'yes' if the C language ABI
+dnl (application binary interface) is a 32-bit one, or to 'no' otherwise.
+dnl This is a simplified variant of gl_HOST_CPU_C_ABI.
+AC_DEFUN([gl_HOST_CPU_C_ABI_32BIT],
+[
+ AC_REQUIRE([AC_CANONICAL_HOST])
+ AC_CACHE_CHECK([32-bit host C ABI], [gl_cv_host_cpu_c_abi_32bit],
+ [if test -n "$gl_cv_host_cpu_c_abi"; then
+ case "$gl_cv_host_cpu_c_abi" in
+ i386 | x86_64-x32 | arm | armhf | arm64-ilp32 | hppa | ia64-ilp32 | mips | mipsn32 | powerpc | riscv*-ilp32* | s390 | sparc)
+ gl_cv_host_cpu_c_abi_32bit=yes ;;
+ *)
+ gl_cv_host_cpu_c_abi_32bit=no ;;
+ esac
+ else
+ case "$host_cpu" in
+
+changequote(,)dnl
+ i[4567]86 )
+changequote([,])dnl
+ gl_cv_host_cpu_c_abi_32bit=yes
+ ;;
+
+ x86_64 )
+ # On x86_64 systems, the C compiler may be generating code in one of
+ # these ABIs:
+ # - 64-bit instruction set, 64-bit pointers, 64-bit 'long': x86_64.
+ # - 64-bit instruction set, 64-bit pointers, 32-bit 'long': x86_64
+ # with native Windows (mingw, MSVC).
+ # - 64-bit instruction set, 32-bit pointers, 32-bit 'long': x86_64-x32.
+ # - 32-bit instruction set, 32-bit pointers, 32-bit 'long': i386.
+ AC_COMPILE_IFELSE(
+ [AC_LANG_SOURCE(
+ [[#if (defined __x86_64__ || defined __amd64__ \
+ || defined _M_X64 || defined _M_AMD64) \
+ && !(defined __ILP32__ || defined _ILP32)
+ int ok;
+ #else
+ error fail
+ #endif
+ ]])],
+ [gl_cv_host_cpu_c_abi_32bit=no],
+ [gl_cv_host_cpu_c_abi_32bit=yes])
+ ;;
+
+ arm* | aarch64 )
+ # Assume arm with EABI.
+ # On arm64 systems, the C compiler may be generating code in one of
+ # these ABIs:
+ # - aarch64 instruction set, 64-bit pointers, 64-bit 'long': arm64.
+ # - aarch64 instruction set, 32-bit pointers, 32-bit 'long': arm64-ilp32.
+ # - 32-bit instruction set, 32-bit pointers, 32-bit 'long': arm or armhf.
+ AC_COMPILE_IFELSE(
+ [AC_LANG_SOURCE(
+ [[#if defined __aarch64__ && !(defined __ILP32__ || defined _ILP32)
+ int ok;
+ #else
+ error fail
+ #endif
+ ]])],
+ [gl_cv_host_cpu_c_abi_32bit=no],
+ [gl_cv_host_cpu_c_abi_32bit=yes])
+ ;;
+
+ hppa1.0 | hppa1.1 | hppa2.0* | hppa64 )
+ # On hppa, the C compiler may be generating 32-bit code or 64-bit
+ # code. In the latter case, it defines _LP64 and __LP64__.
+ AC_COMPILE_IFELSE(
+ [AC_LANG_SOURCE(
+ [[#ifdef __LP64__
+ int ok;
+ #else
+ error fail
+ #endif
+ ]])],
+ [gl_cv_host_cpu_c_abi_32bit=no],
+ [gl_cv_host_cpu_c_abi_32bit=yes])
+ ;;
+
+ ia64* )
+ # On ia64 on HP-UX, the C compiler may be generating 64-bit code or
+ # 32-bit code. In the latter case, it defines _ILP32.
+ AC_COMPILE_IFELSE(
+ [AC_LANG_SOURCE(
+ [[#ifdef _ILP32
+ int ok;
+ #else
+ error fail
+ #endif
+ ]])],
+ [gl_cv_host_cpu_c_abi_32bit=yes],
+ [gl_cv_host_cpu_c_abi_32bit=no])
+ ;;
+
+ mips* )
+ # We should also check for (_MIPS_SZPTR == 64), but gcc keeps this
+ # at 32.
+ AC_COMPILE_IFELSE(
+ [AC_LANG_SOURCE(
+ [[#if defined _MIPS_SZLONG && (_MIPS_SZLONG == 64)
+ int ok;
+ #else
+ error fail
+ #endif
+ ]])],
+ [gl_cv_host_cpu_c_abi_32bit=no],
+ [gl_cv_host_cpu_c_abi_32bit=yes])
+ ;;
+
+ powerpc* )
+ # Different ABIs are in use on AIX vs. Mac OS X vs. Linux,*BSD.
+ # No need to distinguish them here; the caller may distinguish
+ # them based on the OS.
+ # On powerpc64 systems, the C compiler may still be generating
+ # 32-bit code. And on powerpc-ibm-aix systems, the C compiler may
+ # be generating 64-bit code.
+ AC_COMPILE_IFELSE(
+ [AC_LANG_SOURCE(
+ [[#if defined __powerpc64__ || defined _ARCH_PPC64
+ int ok;
+ #else
+ error fail
+ #endif
+ ]])],
+ [gl_cv_host_cpu_c_abi_32bit=no],
+ [gl_cv_host_cpu_c_abi_32bit=yes])
+ ;;
+
+ rs6000 )
+ gl_cv_host_cpu_c_abi_32bit=yes
+ ;;
+
+ riscv32 | riscv64 )
+ # There are 6 ABIs: ilp32, ilp32f, ilp32d, lp64, lp64f, lp64d.
+ # Size of 'long' and 'void *':
+ AC_COMPILE_IFELSE(
+ [AC_LANG_SOURCE(
+ [[#if defined __LP64__
+ int ok;
+ #else
+ error fail
+ #endif
+ ]])],
+ [gl_cv_host_cpu_c_abi_32bit=no],
+ [gl_cv_host_cpu_c_abi_32bit=yes])
+ ;;
+
+ s390* )
+ # On s390x, the C compiler may be generating 64-bit (= s390x) code
+ # or 31-bit (= s390) code.
+ AC_COMPILE_IFELSE(
+ [AC_LANG_SOURCE(
+ [[#if defined __LP64__ || defined __s390x__
+ int ok;
+ #else
+ error fail
+ #endif
+ ]])],
+ [gl_cv_host_cpu_c_abi_32bit=no],
+ [gl_cv_host_cpu_c_abi_32bit=yes])
+ ;;
+
+ sparc | sparc64 )
+ # UltraSPARCs running Linux have `uname -m` = "sparc64", but the
+ # C compiler still generates 32-bit code.
+ AC_COMPILE_IFELSE(
+ [AC_LANG_SOURCE(
+ [[#if defined __sparcv9 || defined __arch64__
+ int ok;
+ #else
+ error fail
+ #endif
+ ]])],
+ [gl_cv_host_cpu_c_abi_32bit=no],
+ [gl_cv_host_cpu_c_abi_32bit=yes])
+ ;;
+
+ *)
+ gl_cv_host_cpu_c_abi_32bit=no
+ ;;
+ esac
+ fi
+ ])
+
+ HOST_CPU_C_ABI_32BIT="$gl_cv_host_cpu_c_abi_32bit"
+])
diff --git a/m4/intl-thread-locale.m4 b/m4/intl-thread-locale.m4
new file mode 100644
index 0000000..661a23f
--- /dev/null
+++ b/m4/intl-thread-locale.m4
@@ -0,0 +1,183 @@
+# intl-thread-locale.m4 serial 4
+dnl Copyright (C) 2015-2018 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+dnl
+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 Check how to retrieve the name of a per-thread locale (POSIX locale_t).
+dnl Sets gt_nameless_locales.
+AC_DEFUN([gt_INTL_THREAD_LOCALE_NAME],
+[
+ AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
+
+ dnl Persuade Solaris <locale.h> to define 'locale_t'.
+ AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS])
+
+ dnl Test whether uselocale() exists and works at all.
+ gt_FUNC_USELOCALE
+
+ dnl On OpenBSD >= 6.2, the locale_t type and the uselocale(), newlocale(),
+ dnl duplocale(), freelocale() functions exist but are effectively useless,
+ dnl because the locale_t value depends only on the LC_CTYPE category of the
+ dnl locale and furthermore contains only one bit of information (it
+ dnl distinguishes the "C" locale from the *.UTF-8 locales). See
+ dnl <https://cvsweb.openbsd.org/src/lib/libc/locale/newlocale.c?rev=1.1&content-type=text/x-cvsweb-markup>.
+ dnl In the setlocale() implementation they have thought about the programs
+ dnl that use the API ("Even though only LC_CTYPE has any effect in the
+ dnl OpenBSD base system, store complete information about the global locale,
+ dnl such that third-party software can access it"), but for uselocale()
+ dnl they did not think about the programs.
+ dnl In this situation, even the HAVE_NAMELESS_LOCALES support does not work.
+ dnl So, define HAVE_FAKE_LOCALES and disable all locale_t support.
+ case "$gt_cv_func_uselocale_works" in
+ *yes)
+ AC_CHECK_HEADERS_ONCE([xlocale.h])
+ AC_CACHE_CHECK([for fake locale system (OpenBSD)],
+ [gt_cv_locale_fake],
+ [AC_RUN_IFELSE(
+ [AC_LANG_SOURCE([[
+#include <locale.h>
+#if HAVE_XLOCALE_H
+# include <xlocale.h>
+#endif
+int main ()
+{
+ locale_t loc1, loc2;
+ if (setlocale (LC_ALL, "de_DE.UTF-8") == NULL) return 1;
+ if (setlocale (LC_ALL, "fr_FR.UTF-8") == NULL) return 1;
+ loc1 = newlocale (LC_ALL_MASK, "de_DE.UTF-8", (locale_t)0);
+ loc2 = newlocale (LC_ALL_MASK, "fr_FR.UTF-8", (locale_t)0);
+ return !(loc1 == loc2);
+}]])],
+ [gt_cv_locale_fake=yes],
+ [gt_cv_locale_fake=no],
+ [dnl Guess the locale system is fake only on OpenBSD.
+ case "$host_os" in
+ openbsd*) gt_cv_locale_fake="guessing yes" ;;
+ *) gt_cv_locale_fake="guessing no" ;;
+ esac
+ ])
+ ])
+ ;;
+ *) gt_cv_locale_fake=no ;;
+ esac
+ case "$gt_cv_locale_fake" in
+ *yes)
+ AC_DEFINE([HAVE_FAKE_LOCALES], [1],
+ [Define if the locale_t type contains insufficient information, as on OpenBSD.])
+ ;;
+ esac
+
+ case "$gt_cv_func_uselocale_works" in
+ *yes)
+ AC_CACHE_CHECK([for Solaris 11.4 locale system],
+ [gt_cv_locale_solaris114],
+ [case "$host_os" in
+ solaris*)
+ dnl Test whether <locale.h> defines locale_t as a typedef of
+ dnl 'struct _LC_locale_t **' (whereas Illumos defines it as a
+ dnl typedef of 'struct _locale *').
+ dnl Another possible test would be to include <sys/localedef.h>
+ dnl and test whether it defines the _LC_core_data_locale_t type.
+ dnl This type was added in Solaris 11.4.
+ AC_COMPILE_IFELSE(
+ [AC_LANG_PROGRAM([[
+ #include <locale.h>
+ struct _LC_locale_t *x;
+ locale_t y;
+ ]],
+ [[*y = x;]])],
+ [gt_cv_locale_solaris114=yes],
+ [gt_cv_locale_solaris114=no])
+ ;;
+ *) gt_cv_locale_solaris114=no ;;
+ esac
+ ])
+ ;;
+ *) gt_cv_locale_solaris114=no ;;
+ esac
+ if test $gt_cv_locale_solaris114 = yes; then
+ AC_DEFINE([HAVE_SOLARIS114_LOCALES], [1],
+ [Define if the locale_t type is as on Solaris 11.4.])
+ fi
+
+ dnl Solaris 12 will maybe provide getlocalename_l. If it does, it will
+ dnl improve the implementation of gl_locale_name_thread(), by removing
+ dnl the use of undocumented structures.
+ case "$gt_cv_func_uselocale_works" in
+ *yes)
+ AC_CHECK_FUNCS([getlocalename_l])
+ ;;
+ esac
+
+ dnl This code is for future use, in case we some day have to port to a
+ dnl platform where the locale_t type does not provide access to the name of
+ dnl each locale category. This code has the drawback that it requires the
+ dnl gnulib overrides of 'newlocale', 'duplocale', 'freelocale', which is a
+ dnl problem for GNU libunistring. Therefore try hard to avoid enabling this
+ dnl code!
+ gt_nameless_locales=no
+ if false; then
+ gt_nameless_locales=yes
+ AC_DEFINE([HAVE_NAMELESS_LOCALES], [1],
+ [Define if the locale_t type does not contain the name of each locale category.])
+ fi
+])
+
+dnl Tests whether uselocale() exists and is usable.
+dnl Sets gt_cv_func_uselocale_works. Defines HAVE_WORKING_USELOCALE.
+AC_DEFUN([gt_FUNC_USELOCALE],
+[
+ AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
+
+ dnl Persuade Solaris <locale.h> to define 'locale_t'.
+ AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS])
+
+ AC_CHECK_FUNCS_ONCE([uselocale])
+
+ dnl On AIX 7.2, the uselocale() function is not documented and leads to
+ dnl crashes in subsequent setlocale() invocations.
+ if test $ac_cv_func_uselocale = yes; then
+ AC_CHECK_HEADERS_ONCE([xlocale.h])
+ AC_CACHE_CHECK([whether uselocale works],
+ [gt_cv_func_uselocale_works],
+ [AC_RUN_IFELSE(
+ [AC_LANG_SOURCE([[
+#include <locale.h>
+#if HAVE_XLOCALE_H
+# include <xlocale.h>
+#endif
+int main ()
+{
+ uselocale (NULL);
+ setlocale (LC_ALL, "en_US.UTF-8");
+ return 0;
+}]])],
+ [gt_cv_func_uselocale_works=yes],
+ [gt_cv_func_uselocale_works=no],
+ [# Guess no on AIX, yes otherwise.
+ case "$host_os" in
+ aix*) gt_cv_func_uselocale_works="guessing no" ;;
+ *) gt_cv_func_uselocale_works="guessing yes" ;;
+ esac
+ ])
+ ])
+ else
+ gt_cv_func_uselocale_works=no
+ fi
+ case "$gt_cv_func_uselocale_works" in
+ *yes)
+ AC_DEFINE([HAVE_WORKING_USELOCALE], [1],
+ [Define if the uselocale function exists any may safely be called.])
+ ;;
+ esac
+])
diff --git a/m4/intlmacosx.m4 b/m4/intlmacosx.m4
index aca924c..17c1bd4 100644
--- a/m4/intlmacosx.m4
+++ b/m4/intlmacosx.m4
@@ -1,4 +1,4 @@
-# intlmacosx.m4 serial 5 (gettext-0.18.2)
+# intlmacosx.m4 serial 6 (gettext-0.19.9)
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,
@@ -17,7 +17,7 @@ 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 Mac OS X 10.2.
+ dnl Check for API introduced in Mac OS X 10.4.
AC_CACHE_CHECK([for CFPreferencesCopyAppValue],
[gt_cv_func_CFPreferencesCopyAppValue],
[gt_save_LIBS="$LIBS"
@@ -33,7 +33,7 @@ AC_DEFUN([gt_INTL_MACOSX],
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 Mac OS X 10.3.
+ dnl Check for API introduced in Mac OS X 10.5.
AC_CACHE_CHECK([for CFLocaleCopyCurrent], [gt_cv_func_CFLocaleCopyCurrent],
[gt_save_LIBS="$LIBS"
LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation"
@@ -48,8 +48,24 @@ AC_DEFUN([gt_INTL_MACOSX],
AC_DEFINE([HAVE_CFLOCALECOPYCURRENT], [1],
[Define to 1 if you have the Mac OS X function CFLocaleCopyCurrent in the CoreFoundation framework.])
fi
+ AC_CACHE_CHECK([for CFLocaleCopyPreferredLanguages], [gt_cv_func_CFLocaleCopyPreferredLanguages],
+ [gt_save_LIBS="$LIBS"
+ LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation"
+ AC_LINK_IFELSE(
+ [AC_LANG_PROGRAM(
+ [[#include <CoreFoundation/CFLocale.h>]],
+ [[CFLocaleCopyPreferredLanguages();]])],
+ [gt_cv_func_CFLocaleCopyPreferredLanguages=yes],
+ [gt_cv_func_CFLocaleCopyPreferredLanguages=no])
+ LIBS="$gt_save_LIBS"])
+ if test $gt_cv_func_CFLocaleCopyPreferredLanguages = yes; then
+ AC_DEFINE([HAVE_CFLOCALECOPYPREFERREDLANGUAGES], [1],
+ [Define to 1 if you have the Mac OS X function CFLocaleCopyPreferredLanguages in the CoreFoundation framework.])
+ fi
INTL_MACOSX_LIBS=
- if test $gt_cv_func_CFPreferencesCopyAppValue = yes || test $gt_cv_func_CFLocaleCopyCurrent = yes; then
+ if test $gt_cv_func_CFPreferencesCopyAppValue = yes \
+ || test $gt_cv_func_CFLocaleCopyCurrent = yes \
+ || test $gt_cv_func_CFLocaleCopyPreferredLanguages = yes; then
INTL_MACOSX_LIBS="-Wl,-framework -Wl,CoreFoundation"
fi
AC_SUBST([INTL_MACOSX_LIBS])
diff --git a/m4/inttypes.m4 b/m4/inttypes.m4
index 8069493..d756f01 100644
--- a/m4/inttypes.m4
+++ b/m4/inttypes.m4
@@ -1,4 +1,4 @@
-# inttypes.m4 serial 26
+# inttypes.m4 serial 27
dnl Copyright (C) 2006-2018 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
@@ -147,6 +147,7 @@ AC_DEFUN([gl_INTTYPES_H_DEFAULTS],
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])
+ HAVE_IMAXDIV_T=1; AC_SUBST([HAVE_IMAXDIV_T])
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])
diff --git a/m4/lib-link.m4 b/m4/lib-link.m4
index df77db9..dee3300 100644
--- a/m4/lib-link.m4
+++ b/m4/lib-link.m4
@@ -1,4 +1,4 @@
-# lib-link.m4 serial 26 (gettext-0.18.2)
+# lib-link.m4 serial 28
dnl Copyright (C) 2001-2018 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
@@ -6,7 +6,7 @@ dnl with or without modifications, as long as this notice is preserved.
dnl From Bruno Haible.
-AC_PREREQ([2.54])
+AC_PREREQ([2.61])
dnl AC_LIB_LINKFLAGS(name [, dependencies]) searches for libname and
dnl the libraries corresponding to explicit and implicit dependencies.
@@ -124,8 +124,8 @@ dnl acl_hardcode_direct,
dnl acl_hardcode_minus_L.
AC_DEFUN([AC_LIB_RPATH],
[
- dnl Tell automake >= 1.10 to complain if config.rpath is missing.
- m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([config.rpath])])
+ dnl Complain if config.rpath is missing.
+ AC_REQUIRE_AUX_FILE([config.rpath])
AC_REQUIRE([AC_PROG_CC]) dnl we use $CC, $GCC, $LDFLAGS
AC_REQUIRE([AC_LIB_PROG_LD]) dnl we use $LD, $with_gnu_ld
AC_REQUIRE([AC_CANONICAL_HOST]) dnl we use $host
@@ -187,17 +187,15 @@ AC_DEFUN([AC_LIB_LINKFLAGS_BODY],
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.
- 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_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]],
+ AC_ARG_WITH(PACK[-prefix],
+[[ --with-]]PACK[[-prefix[=DIR] search for ]PACKLIBS[ in DIR/include and DIR/lib
+ --without-]]PACK[[-prefix don't search for ]PACKLIBS[ in includedir and libdir]],
[
if test "X$withval" = "Xno"; then
use_additional=no
@@ -670,7 +668,6 @@ 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])
diff --git a/m4/lib-prefix.m4 b/m4/lib-prefix.m4
index 16b26fb..2e90b11 100644
--- a/m4/lib-prefix.m4
+++ b/m4/lib-prefix.m4
@@ -1,4 +1,4 @@
-# lib-prefix.m4 serial 11
+# lib-prefix.m4 serial 14
dnl Copyright (C) 2001-2005, 2008-2018 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
@@ -6,13 +6,6 @@ dnl with or without modifications, as long as this notice is preserved.
dnl From Bruno Haible.
-dnl AC_LIB_ARG_WITH is synonymous to AC_ARG_WITH in autoconf-2.13, and
-dnl similar to AC_ARG_WITH in autoconf 2.52...2.57 except that is doesn't
-dnl require excessive bracketing.
-ifdef([AC_HELP_STRING],
-[AC_DEFUN([AC_LIB_ARG_WITH], [AC_ARG_WITH([$1],[[$2]],[$3],[$4])])],
-[AC_DEFUN([AC_][LIB_ARG_WITH], [AC_ARG_WITH([$1],[$2],[$3],[$4])])])
-
dnl AC_LIB_PREFIX adds to the CPPFLAGS and LDFLAGS the flags that are needed
dnl to access previously installed libraries. The basic assumption is that
dnl a user will want packages to use other packages he previously installed
@@ -32,9 +25,9 @@ AC_DEFUN([AC_LIB_PREFIX],
eval additional_includedir=\"$includedir\"
eval additional_libdir=\"$libdir\"
])
- AC_LIB_ARG_WITH([lib-prefix],
-[ --with-lib-prefix[=DIR] search for libraries in DIR/include and DIR/lib
- --without-lib-prefix don't search for libraries in includedir and libdir],
+ AC_ARG_WITH([lib-prefix],
+[[ --with-lib-prefix[=DIR] search for libraries in DIR/include and DIR/lib
+ --without-lib-prefix don't search for libraries in includedir and libdir]],
[
if test "X$withval" = "Xno"; then
use_additional=no
@@ -174,7 +167,24 @@ AC_DEFUN([AC_LIB_PREPARE_MULTILIB],
dnl $prefix/lib/64 (which is a symlink to either $prefix/lib/sparcv9 or
dnl $prefix/lib/amd64) and 32-bit libraries go under $prefix/lib.
AC_REQUIRE([AC_CANONICAL_HOST])
- AC_REQUIRE([gl_HOST_CPU_C_ABI])
+ AC_REQUIRE([gl_HOST_CPU_C_ABI_32BIT])
+
+ case "$host_os" in
+ solaris*)
+ AC_CACHE_CHECK([for 64-bit host], [gl_cv_solaris_64bit],
+ [AC_COMPILE_IFELSE(
+ [AC_LANG_SOURCE(
+ [[#ifdef _LP64
+ int ok;
+ #else
+ error fail
+ #endif
+ ]])],
+ [gl_cv_solaris_64bit=yes],
+ [gl_cv_solaris_64bit=no])
+ ]);;
+ esac
+
dnl Allow the user to override the result by setting acl_cv_libdirstems.
AC_CACHE_CHECK([for the common suffixes of directories in the library search path],
[acl_cv_libdirstems],
@@ -187,18 +197,6 @@ AC_DEFUN([AC_LIB_PREPARE_MULTILIB],
dnl "Portable Makefiles should refer to any library directories using the 64 symbolic link."
dnl But we want to recognize the sparcv9 or amd64 subdirectory also if the
dnl symlink is missing, so we set acl_libdirstem2 too.
- AC_CACHE_CHECK([for 64-bit host], [gl_cv_solaris_64bit],
- [AC_COMPILE_IFELSE(
- [AC_LANG_SOURCE(
- [[#ifdef _LP64
- int ok;
- #else
- error fail
- #endif
- ]])],
- [gl_cv_solaris_64bit=yes],
- [gl_cv_solaris_64bit=no])
- ])
if test $gl_cv_solaris_64bit = yes; then
acl_libdirstem=lib/64
case "$host_cpu" in
@@ -210,40 +208,36 @@ AC_DEFUN([AC_LIB_PREPARE_MULTILIB],
*)
dnl If $CC generates code for a 32-bit ABI, the libraries are
dnl surely under $prefix/lib, not $prefix/lib64.
- case "$gl_cv_host_cpu_c_abi" in
- i386 | arm | armhf | arm64-ilp32 | hppa | ia64-ilp32 | mips | mipsn32 | powerpc | s390 | sparc)
- ;;
- *) # x86_64 | arm64 | hppa64 | ia64 | mips64 | powerpc64* | s390x | sparc64 | ...
- dnl The result is a property of the system. However, non-system
- dnl compilers sometimes have odd library search paths. Therefore
- dnl prefer asking /usr/bin/gcc, if available, rather than $CC.
- searchpath=`(if test -f /usr/bin/gcc \
- && LC_ALL=C /usr/bin/gcc -print-search-dirs >/dev/null 2>/dev/null; then \
- LC_ALL=C /usr/bin/gcc -print-search-dirs; \
- else \
- LC_ALL=C $CC -print-search-dirs; \
- fi) 2>/dev/null \
- | sed -n -e 's,^libraries: ,,p' | sed -e 's,^=,,'`
- if test -n "$searchpath"; then
- acl_save_IFS="${IFS= }"; IFS=":"
- for searchdir in $searchpath; do
- if test -d "$searchdir"; then
- case "$searchdir" in
- */lib64/ | */lib64 ) acl_libdirstem=lib64 ;;
- */../ | */.. )
- # Better ignore directories of this form. They are misleading.
- ;;
- *) searchdir=`cd "$searchdir" && pwd`
- case "$searchdir" in
- */lib64 ) acl_libdirstem=lib64 ;;
- esac ;;
- esac
- fi
- done
- IFS="$acl_save_IFS"
- fi
- ;;
- esac
+ if test "$HOST_CPU_C_ABI_32BIT" != yes; then
+ dnl The result is a property of the system. However, non-system
+ dnl compilers sometimes have odd library search paths. Therefore
+ dnl prefer asking /usr/bin/gcc, if available, rather than $CC.
+ searchpath=`(if test -f /usr/bin/gcc \
+ && LC_ALL=C /usr/bin/gcc -print-search-dirs >/dev/null 2>/dev/null; then \
+ LC_ALL=C /usr/bin/gcc -print-search-dirs; \
+ else \
+ LC_ALL=C $CC -print-search-dirs; \
+ fi) 2>/dev/null \
+ | sed -n -e 's,^libraries: ,,p' | sed -e 's,^=,,'`
+ if test -n "$searchpath"; then
+ acl_save_IFS="${IFS= }"; IFS=":"
+ for searchdir in $searchpath; do
+ if test -d "$searchdir"; then
+ case "$searchdir" in
+ */lib64/ | */lib64 ) acl_libdirstem=lib64 ;;
+ */../ | */.. )
+ # Better ignore directories of this form. They are misleading.
+ ;;
+ *) searchdir=`cd "$searchdir" && pwd`
+ case "$searchdir" in
+ */lib64 ) acl_libdirstem=lib64 ;;
+ esac ;;
+ esac
+ fi
+ done
+ IFS="$acl_save_IFS"
+ fi
+ fi
;;
esac
test -n "$acl_libdirstem2" || acl_libdirstem2="$acl_libdirstem"
diff --git a/m4/limits-h.m4 b/m4/limits-h.m4
index 511dcef..3a2cd91 100644
--- a/m4/limits-h.m4
+++ b/m4/limits-h.m4
@@ -11,14 +11,18 @@ AC_DEFUN_ONCE([gl_LIMITS_H],
[
gl_CHECK_NEXT_HEADERS([limits.h])
- AC_CACHE_CHECK([whether limits.h has ULLONG_WIDTH etc.],
+ AC_CACHE_CHECK([whether limits.h has LLONG_MAX, WORD_BIT, 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;]])],
+ [AC_LANG_PROGRAM(
+ [[#ifndef __STDC_WANT_IEC_60559_BFP_EXT__
+ #define __STDC_WANT_IEC_60559_BFP_EXT__ 1
+ #endif
+ #include <limits.h>
+ long long llm = LLONG_MAX;
+ int wb = WORD_BIT;
+ 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
@@ -29,3 +33,11 @@ AC_DEFUN_ONCE([gl_LIMITS_H],
AC_SUBST([LIMITS_H])
AM_CONDITIONAL([GL_GENERATE_LIMITS_H], [test -n "$LIMITS_H"])
])
+
+dnl Unconditionally enables the replacement of <limits.h>.
+AC_DEFUN([gl_REPLACE_LIMITS_H],
+[
+ AC_REQUIRE([gl_LIMITS_H])
+ LIMITS_H='limits.h'
+ AM_CONDITIONAL([GL_GENERATE_LIMITS_H], [test -n "$LIMITS_H"])
+])
diff --git a/m4/link.m4 b/m4/link.m4
index b0b3ff2..d06b4f2 100644
--- a/m4/link.m4
+++ b/m4/link.m4
@@ -1,4 +1,4 @@
-# link.m4 serial 9
+# link.m4 serial 10
dnl Copyright (C) 2009-2018 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
@@ -39,10 +39,12 @@ AC_DEFUN([gl_FUNC_LINK],
]])],
[gl_cv_func_link_works=yes], [gl_cv_func_link_works=no],
[case "$host_os" in
- # Guess yes on glibc systems.
- *-gnu* | gnu*) gl_cv_func_link_works="guessing yes" ;;
- # If we don't know, assume the worst.
- *) gl_cv_func_link_works="guessing no" ;;
+ # Guess yes on Linux systems.
+ linux-* | linux) gl_cv_func_link_works="guessing yes" ;;
+ # Guess yes on glibc systems.
+ *-gnu* | gnu*) gl_cv_func_link_works="guessing yes" ;;
+ # If we don't know, assume the worst.
+ *) gl_cv_func_link_works="guessing no" ;;
esac
])
rm -f conftest.a conftest.b conftest.lnk])
diff --git a/m4/localcharset.m4 b/m4/localcharset.m4
index 2d7ca64..d38a2c9 100644
--- a/m4/localcharset.m4
+++ b/m4/localcharset.m4
@@ -1,4 +1,4 @@
-# localcharset.m4 serial 7
+# localcharset.m4 serial 8
dnl Copyright (C) 2002, 2004, 2006, 2009-2018 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
@@ -8,10 +8,4 @@ AC_DEFUN([gl_LOCALCHARSET],
[
dnl Prerequisites of lib/localcharset.c.
AC_REQUIRE([AM_LANGINFO_CODESET])
- AC_REQUIRE([gl_FCNTL_O_FLAGS])
- AC_CHECK_DECLS_ONCE([getc_unlocked])
-
- dnl Prerequisites of the lib/Makefile.am snippet.
- AC_REQUIRE([AC_CANONICAL_HOST])
- AC_REQUIRE([gl_GLIBC21])
])
diff --git a/m4/locale-fr.m4 b/m4/locale-fr.m4
index 30a1d94..a37a0d2 100644
--- a/m4/locale-fr.m4
+++ b/m4/locale-fr.m4
@@ -1,4 +1,4 @@
-# locale-fr.m4 serial 18
+# locale-fr.m4 serial 19
dnl Copyright (C) 2003, 2005-2018 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
@@ -31,7 +31,7 @@ int main () {
return 1;
#else
/* Check whether the given locale name is recognized by the system. */
-# if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
+# if defined _WIN32 && !defined __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
@@ -160,7 +160,7 @@ int main () {
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__
+# if 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
diff --git a/m4/locale-ja.m4 b/m4/locale-ja.m4
index 2c34006..9f16231 100644
--- a/m4/locale-ja.m4
+++ b/m4/locale-ja.m4
@@ -1,4 +1,4 @@
-# locale-ja.m4 serial 13
+# locale-ja.m4 serial 14
dnl Copyright (C) 2003, 2005-2018 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
@@ -32,7 +32,7 @@ int main ()
return 1;
#else
/* Check whether the given locale name is recognized by the system. */
-# if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
+# if defined _WIN32 && !defined __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
diff --git a/m4/locale-tr.m4 b/m4/locale-tr.m4
index 441cae6..2f2cf47 100644
--- a/m4/locale-tr.m4
+++ b/m4/locale-tr.m4
@@ -1,4 +1,4 @@
-# locale-tr.m4 serial 10
+# locale-tr.m4 serial 11
dnl Copyright (C) 2003, 2005-2018 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
@@ -30,7 +30,7 @@ int main () {
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__
+#if 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
diff --git a/m4/locale-zh.m4 b/m4/locale-zh.m4
index f7e1901..cfb447f 100644
--- a/m4/locale-zh.m4
+++ b/m4/locale-zh.m4
@@ -1,4 +1,4 @@
-# locale-zh.m4 serial 13
+# locale-zh.m4 serial 14
dnl Copyright (C) 2003, 2005-2018 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
@@ -33,7 +33,7 @@ int main ()
return 1;
#else
/* Check whether the given locale name is recognized by the system. */
-# if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
+# if defined _WIN32 && !defined __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
diff --git a/m4/locale_h.m4 b/m4/locale_h.m4
index 4bd9e57..e619dcd 100644
--- a/m4/locale_h.m4
+++ b/m4/locale_h.m4
@@ -1,4 +1,4 @@
-# locale_h.m4 serial 20
+# locale_h.m4 serial 21
dnl Copyright (C) 2007, 2009-2018 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
@@ -96,7 +96,7 @@ AC_DEFUN([gl_LOCALE_H],
# include <xlocale.h>
#endif
]],
- [setlocale duplocale])
+ [setlocale newlocale duplocale freelocale])
])
AC_DEFUN([gl_LOCALE_MODULE_INDICATOR],
@@ -113,10 +113,15 @@ AC_DEFUN([gl_LOCALE_H_DEFAULTS],
GNULIB_LOCALECONV=0; AC_SUBST([GNULIB_LOCALECONV])
GNULIB_SETLOCALE=0; AC_SUBST([GNULIB_SETLOCALE])
GNULIB_DUPLOCALE=0; AC_SUBST([GNULIB_DUPLOCALE])
+ GNULIB_LOCALENAME=0; AC_SUBST([GNULIB_LOCALENAME])
dnl Assume proper GNU behavior unless another module says otherwise.
+ HAVE_NEWLOCALE=1; AC_SUBST([HAVE_NEWLOCALE])
HAVE_DUPLOCALE=1; AC_SUBST([HAVE_DUPLOCALE])
+ HAVE_FREELOCALE=1; AC_SUBST([HAVE_FREELOCALE])
REPLACE_LOCALECONV=0; AC_SUBST([REPLACE_LOCALECONV])
REPLACE_SETLOCALE=0; AC_SUBST([REPLACE_SETLOCALE])
+ REPLACE_NEWLOCALE=0; AC_SUBST([REPLACE_NEWLOCALE])
REPLACE_DUPLOCALE=0; AC_SUBST([REPLACE_DUPLOCALE])
+ REPLACE_FREELOCALE=0; AC_SUBST([REPLACE_FREELOCALE])
REPLACE_STRUCT_LCONV=0; AC_SUBST([REPLACE_STRUCT_LCONV])
])
diff --git a/m4/localename.m4 b/m4/localename.m4
index a0e1367..f093fa5 100644
--- a/m4/localename.m4
+++ b/m4/localename.m4
@@ -1,4 +1,4 @@
-# localename.m4 serial 3
+# localename.m4 serial 5
dnl Copyright (C) 2007, 2009-2018 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
@@ -6,13 +6,25 @@ dnl with or without modifications, as long as this notice is preserved.
AC_DEFUN([gl_LOCALENAME],
[
+ AC_REQUIRE([gl_LOCALE_H_DEFAULTS])
AC_REQUIRE([gt_LC_MESSAGES])
+ AC_REQUIRE([gt_INTL_THREAD_LOCALE_NAME])
AC_REQUIRE([gt_INTL_MACOSX])
AC_CHECK_HEADERS_ONCE([langinfo.h])
- AC_CHECK_FUNCS([setlocale uselocale])
- dnl Solaris 12 provides getlocalename_l, while Illumos doesn't have
- dnl it nor the equivalent.
- if test $ac_cv_func_uselocale = yes; then
- AC_CHECK_FUNCS([getlocalename_l])
+ AC_CHECK_FUNCS([setlocale])
+ AC_CHECK_FUNCS_ONCE([newlocale duplocale freelocale])
+ if test $ac_cv_func_newlocale != yes; then
+ HAVE_NEWLOCALE=0
+ fi
+ if test $ac_cv_func_duplocale != yes; then
+ HAVE_DUPLOCALE=0
+ fi
+ if test $ac_cv_func_freelocale != yes; then
+ HAVE_FREELOCALE=0
+ fi
+ if test $gt_nameless_locales = yes; then
+ REPLACE_NEWLOCALE=1
+ REPLACE_DUPLOCALE=1
+ REPLACE_FREELOCALE=1
fi
])
diff --git a/m4/longlong.m4 b/m4/longlong.m4
index 27e6326..582af53 100644
--- a/m4/longlong.m4
+++ b/m4/longlong.m4
@@ -1,4 +1,4 @@
-# longlong.m4 serial 17
+# longlong.m4 serial 18
dnl Copyright (C) 1999-2007, 2009-2018 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
@@ -6,9 +6,10 @@ dnl with or without modifications, as long as this notice is preserved.
dnl From Paul Eggert.
+AC_PREREQ([2.62])
+
# Define HAVE_LONG_LONG_INT if 'long long int' works.
-# This fixes a bug in Autoconf 2.61, and can be faster
-# than what's in Autoconf 2.62 through 2.68.
+# This can be faster than what's in Autoconf 2.62 through 2.68.
# Note: If the type 'long long int' exists but is only 32 bits large
# (as on some very old compilers), HAVE_LONG_LONG_INT will not be
@@ -56,8 +57,7 @@ AC_DEFUN([AC_TYPE_LONG_LONG_INT],
])
# Define HAVE_UNSIGNED_LONG_LONG_INT if 'unsigned long long int' works.
-# This fixes a bug in Autoconf 2.61, and can be faster
-# than what's in Autoconf 2.62 through 2.68.
+# This can be faster than what's in Autoconf 2.62 through 2.68.
# Note: If the type 'unsigned long long int' exists but is only 32 bits
# large (as on some very old compilers), AC_TYPE_UNSIGNED_LONG_LONG_INT
diff --git a/m4/lstat.m4 b/m4/lstat.m4
index ac6f143..3694e4c 100644
--- a/m4/lstat.m4
+++ b/m4/lstat.m4
@@ -1,4 +1,4 @@
-# serial 31
+# serial 32
# Copyright (C) 1997-2001, 2003-2018 Free Software Foundation, Inc.
#
@@ -53,6 +53,9 @@ AC_DEFUN([gl_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK],
[gl_cv_func_lstat_dereferences_slashed_symlink=yes],
[gl_cv_func_lstat_dereferences_slashed_symlink=no],
[case "$host_os" in
+ linux-* | linux)
+ # Guess yes on Linux systems.
+ gl_cv_func_lstat_dereferences_slashed_symlink="guessing yes" ;;
*-gnu* | gnu*)
# Guess yes on glibc systems.
gl_cv_func_lstat_dereferences_slashed_symlink="guessing yes" ;;
diff --git a/m4/malloc.m4 b/m4/malloc.m4
index 0ded9ba..4c182b4 100644
--- a/m4/malloc.m4
+++ b/m4/malloc.m4
@@ -1,4 +1,4 @@
-# malloc.m4 serial 16
+# malloc.m4 serial 17
dnl Copyright (C) 2007, 2009-2018 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
@@ -91,7 +91,7 @@ AC_DEFUN([gl_CHECK_MALLOC_POSIX],
AC_COMPILE_IFELSE(
[AC_LANG_PROGRAM(
[[]],
- [[#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
+ [[#if defined _WIN32 && ! defined __CYGWIN__
choke me
#endif
]])],
diff --git a/m4/manywarnings.m4 b/m4/manywarnings.m4
index 18249b8..d831ed2 100644
--- a/m4/manywarnings.m4
+++ b/m4/manywarnings.m4
@@ -1,4 +1,4 @@
-# manywarnings.m4 serial 13
+# manywarnings.m4 serial 17
dnl Copyright (C) 2008-2018 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
@@ -51,54 +51,53 @@ m4_defun([gl_MANYWARN_ALL_GCC(C)],
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])
+ AC_CACHE_CHECK([whether -Wno-missing-field-initializers is supported],
+ [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"
+ ])
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])
+ AC_CACHE_CHECK([whether -Wno-missing-field-initializers is needed],
+ [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"
+ ])
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])
+ AC_CACHE_CHECK([whether -Wuninitialized is supported],
+ [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"
+ ])
fi
@@ -106,18 +105,17 @@ m4_defun([gl_MANYWARN_ALL_GCC(C)],
# To compare this list to your installed GCC's, run this Bash command:
#
# comm -3 \
- # <(sed -n 's/^ *\(-[^ 0-9][^ ]*\) .*/\1/p' manywarnings.m4 | sort) \
- # <(gcc --help=warnings | sed -n 's/^ \(-[^ ]*\) .*/\1/p' | sort |
- # grep -v -x -F -f <(
- # awk '/^[^#]/ {print $1}' ../build-aux/gcc-warning.spec))
+ # <((sed -n 's/^ *\(-[^ 0-9][^ ]*\) .*/\1/p' manywarnings.m4; \
+ # awk '/^[^#]/ {print $1}' ../build-aux/gcc-warning.spec) | sort) \
+ # <(LC_ALL=C gcc --help=warnings | sed -n 's/^ \(-[^ ]*\) .*/\1/p' | sort)
gl_manywarn_set=
for gl_manywarn_item in -fno-common \
-W \
- -Wabi \
-Waddress \
-Waggressive-loop-optimizations \
-Wall \
+ -Wattribute-alias \
-Wattributes \
-Wbad-function-cast \
-Wbool-compare \
@@ -125,8 +123,9 @@ m4_defun([gl_MANYWARN_ALL_GCC(C)],
-Wbuiltin-declaration-mismatch \
-Wbuiltin-macro-redefined \
-Wcast-align \
+ -Wcast-align=strict \
+ -Wcast-function-type \
-Wchar-subscripts \
- -Wchkp \
-Wclobbered \
-Wcomment \
-Wcomments \
@@ -160,6 +159,7 @@ m4_defun([gl_MANYWARN_ALL_GCC(C)],
-Wframe-address \
-Wfree-nonheap-object \
-Whsa \
+ -Wif-not-aligned \
-Wignored-attributes \
-Wignored-qualifiers \
-Wimplicit \
@@ -173,7 +173,6 @@ m4_defun([gl_MANYWARN_ALL_GCC(C)],
-Wint-to-pointer-cast \
-Winvalid-memory-model \
-Winvalid-pch \
- -Wjump-misses-init \
-Wlogical-not-parentheses \
-Wlogical-op \
-Wmain \
@@ -181,6 +180,7 @@ m4_defun([gl_MANYWARN_ALL_GCC(C)],
-Wmemset-elt-size \
-Wmemset-transposed-args \
-Wmisleading-indentation \
+ -Wmissing-attributes \
-Wmissing-braces \
-Wmissing-declarations \
-Wmissing-field-initializers \
@@ -188,6 +188,7 @@ m4_defun([gl_MANYWARN_ALL_GCC(C)],
-Wmissing-parameter-type \
-Wmissing-prototypes \
-Wmultichar \
+ -Wmultistatement-macros \
-Wnarrowing \
-Wnested-externs \
-Wnonnull \
@@ -202,6 +203,7 @@ m4_defun([gl_MANYWARN_ALL_GCC(C)],
-Woverride-init \
-Wpacked \
-Wpacked-bitfield-compat \
+ -Wpacked-not-aligned \
-Wparentheses \
-Wpointer-arith \
-Wpointer-compare \
@@ -219,20 +221,23 @@ m4_defun([gl_MANYWARN_ALL_GCC(C)],
-Wshift-count-overflow \
-Wshift-negative-value \
-Wsizeof-array-argument \
+ -Wsizeof-pointer-div \
-Wsizeof-pointer-memaccess \
-Wstack-protector \
-Wstrict-aliasing \
-Wstrict-overflow \
-Wstrict-prototypes \
+ -Wstringop-truncation \
+ -Wsuggest-attribute=cold \
-Wsuggest-attribute=const \
-Wsuggest-attribute=format \
+ -Wsuggest-attribute=malloc \
-Wsuggest-attribute=noreturn \
-Wsuggest-attribute=pure \
-Wsuggest-final-methods \
-Wsuggest-final-types \
-Wswitch \
-Wswitch-bool \
- -Wswitch-default \
-Wswitch-unreachable \
-Wsync-nand \
-Wsystem-headers \
diff --git a/m4/mbrtowc.m4 b/m4/mbrtowc.m4
index f789875..c706d04 100644
--- a/m4/mbrtowc.m4
+++ b/m4/mbrtowc.m4
@@ -1,4 +1,4 @@
-# mbrtowc.m4 serial 30 -*- coding: utf-8 -*-
+# mbrtowc.m4 serial 31 -*- coding: utf-8 -*-
dnl Copyright (C) 2001-2002, 2004-2005, 2008-2018 Free Software Foundation,
dnl Inc.
dnl This file is free software; the Free Software Foundation
@@ -634,6 +634,7 @@ AC_DEFUN([gl_MBRTOWC_C_LOCALE],
# Prerequisites of lib/mbrtowc.c.
AC_DEFUN([gl_PREREQ_MBRTOWC], [
+ AC_REQUIRE([AC_C_INLINE])
:
])
diff --git a/m4/mkdir.m4 b/m4/mkdir.m4
new file mode 100644
index 0000000..1452999
--- /dev/null
+++ b/m4/mkdir.m4
@@ -0,0 +1,82 @@
+# serial 14
+
+# Copyright (C) 2001, 2003-2004, 2006, 2008-2018 Free Software Foundation, Inc.
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# On some systems, mkdir ("foo/", 0700) fails because of the trailing slash.
+# On others, mkdir ("foo/./", 0700) mistakenly succeeds.
+# On such systems, arrange to use a wrapper function.
+AC_DEFUN([gl_FUNC_MKDIR],
+[dnl
+ AC_REQUIRE([gl_SYS_STAT_H_DEFAULTS])
+ AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
+ AC_CHECK_HEADERS_ONCE([unistd.h])
+ AC_CACHE_CHECK([whether mkdir handles trailing slash],
+ [gl_cv_func_mkdir_trailing_slash_works],
+ [rm -rf conftest.dir
+ AC_RUN_IFELSE([AC_LANG_PROGRAM([[
+# include <sys/types.h>
+# include <sys/stat.h>
+]], [return mkdir ("conftest.dir/", 0700);])],
+ [gl_cv_func_mkdir_trailing_slash_works=yes],
+ [gl_cv_func_mkdir_trailing_slash_works=no],
+ [case "$host_os" in
+ # Guess yes on Linux systems.
+ linux-* | linux) gl_cv_func_mkdir_trailing_slash_works="guessing yes" ;;
+ # Guess yes on glibc systems.
+ *-gnu* | gnu*) gl_cv_func_mkdir_trailing_slash_works="guessing yes" ;;
+ # Guess yes on MSVC, no on mingw.
+ mingw*) AC_EGREP_CPP([Known], [
+#ifdef _MSC_VER
+ Known
+#endif
+ ],
+ [gl_cv_func_mkdir_trailing_slash_works="guessing yes"],
+ [gl_cv_func_mkdir_trailing_slash_works="guessing no"])
+ ;;
+ # If we don't know, assume the worst.
+ *) gl_cv_func_mkdir_trailing_slash_works="guessing no" ;;
+ esac
+ ])
+ rm -rf conftest.dir
+ ]
+ )
+ case "$gl_cv_func_mkdir_trailing_slash_works" in
+ *yes) ;;
+ *)
+ REPLACE_MKDIR=1
+ ;;
+ esac
+
+ AC_CACHE_CHECK([whether mkdir handles trailing dot],
+ [gl_cv_func_mkdir_trailing_dot_works],
+ [rm -rf conftest.dir
+ AC_RUN_IFELSE([AC_LANG_PROGRAM([[
+# include <sys/types.h>
+# include <sys/stat.h>
+]], [return !mkdir ("conftest.dir/./", 0700);])],
+ [gl_cv_func_mkdir_trailing_dot_works=yes],
+ [gl_cv_func_mkdir_trailing_dot_works=no],
+ [case "$host_os" in
+ # Guess yes on glibc systems.
+ *-gnu* | gnu*) gl_cv_func_mkdir_trailing_dot_works="guessing yes" ;;
+ # Guess no on native Windows.
+ mingw*) gl_cv_func_mkdir_trailing_dot_works="guessing no" ;;
+ # If we don't know, assume the worst.
+ *) gl_cv_func_mkdir_trailing_dot_works="guessing no" ;;
+ esac
+ ])
+ rm -rf conftest.dir
+ ]
+ )
+ case "$gl_cv_func_mkdir_trailing_dot_works" in
+ *yes) ;;
+ *)
+ REPLACE_MKDIR=1
+ AC_DEFINE([FUNC_MKDIR_DOT_BUG], [1], [Define to 1 if mkdir mistakenly
+ creates a directory given with a trailing dot component.])
+ ;;
+ esac
+])
diff --git a/m4/nanosleep.m4 b/m4/nanosleep.m4
index 8903734..7c945cc 100644
--- a/m4/nanosleep.m4
+++ b/m4/nanosleep.m4
@@ -1,4 +1,4 @@
-# serial 37
+# serial 38
dnl From Jim Meyering.
dnl Check for the nanosleep function.
@@ -22,6 +22,8 @@ AC_DEFUN([gl_FUNC_NANOSLEEP],
AC_CHECK_HEADERS_ONCE([sys/time.h])
AC_REQUIRE([gl_FUNC_SELECT])
+ AC_CHECK_DECLS_ONCE([alarm])
+
nanosleep_save_libs=$LIBS
# Solaris 2.5.1 needs -lposix4 to get the nanosleep function.
@@ -62,40 +64,49 @@ AC_DEFUN([gl_FUNC_NANOSLEEP],
? (t) -1 \
: ((((t) 1 << (sizeof (t) * CHAR_BIT - 2)) - 1) * 2 + 1)))
+ #if HAVE_DECL_ALARM
static void
check_for_SIGALRM (int sig)
{
if (sig != SIGALRM)
_exit (1);
}
+ #endif
int
main ()
{
static struct timespec ts_sleep;
static struct timespec ts_remaining;
- static struct sigaction act;
/* Test for major problems first. */
if (! nanosleep)
return 2;
- act.sa_handler = check_for_SIGALRM;
- sigemptyset (&act.sa_mask);
- sigaction (SIGALRM, &act, NULL);
ts_sleep.tv_sec = 0;
ts_sleep.tv_nsec = 1;
- alarm (1);
- if (nanosleep (&ts_sleep, NULL) != 0)
+ #if HAVE_DECL_ALARM
+ {
+ static struct sigaction act;
+ act.sa_handler = check_for_SIGALRM;
+ sigemptyset (&act.sa_mask);
+ sigaction (SIGALRM, &act, NULL);
+ alarm (1);
+ if (nanosleep (&ts_sleep, NULL) != 0)
+ return 3;
+ /* Test for a minor problem: the handling of large arguments. */
+ ts_sleep.tv_sec = TYPE_MAXIMUM (time_t);
+ ts_sleep.tv_nsec = 999999999;
+ alarm (1);
+ if (nanosleep (&ts_sleep, &ts_remaining) != -1)
+ return 4;
+ if (errno != EINTR)
+ return 5;
+ if (ts_remaining.tv_sec <= TYPE_MAXIMUM (time_t) - 10)
+ return 6;
+ }
+ #else /* A simpler test for native Windows. */
+ if (nanosleep (&ts_sleep, &ts_remaining) < 0)
return 3;
- /* Test for a minor problem: the handling of large arguments. */
- ts_sleep.tv_sec = TYPE_MAXIMUM (time_t);
- ts_sleep.tv_nsec = 999999999;
- alarm (1);
- if (nanosleep (&ts_sleep, &ts_remaining) != -1)
- return 4;
- if (errno != EINTR)
- return 5;
- if (ts_remaining.tv_sec <= TYPE_MAXIMUM (time_t) - 10)
- return 6;
+ #endif
return 0;
}]])],
[gl_cv_func_nanosleep=yes],
diff --git a/m4/nocrash.m4 b/m4/nocrash.m4
index 87b2d4c..4914007 100644
--- a/m4/nocrash.m4
+++ b/m4/nocrash.m4
@@ -1,4 +1,4 @@
-# nocrash.m4 serial 4
+# nocrash.m4 serial 5
dnl Copyright (C) 2005, 2009-2018 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
@@ -79,7 +79,7 @@ nocrash_init (void)
}
}
}
-#elif (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
+#elif defined _WIN32 && ! defined __CYGWIN__
/* Avoid a crash on native Windows. */
#define WIN32_LEAN_AND_MEAN
#include <windows.h>
diff --git a/m4/pathmax.m4 b/m4/pathmax.m4
index 403a375..292a256 100644
--- a/m4/pathmax.m4
+++ b/m4/pathmax.m4
@@ -1,4 +1,4 @@
-# pathmax.m4 serial 10
+# pathmax.m4 serial 11
dnl Copyright (C) 2002-2003, 2005-2006, 2009-2018 Free Software Foundation,
dnl Inc.
dnl This file is free software; the Free Software Foundation
@@ -29,7 +29,7 @@ AC_DEFUN([gl_PATHMAX_SNIPPET], [[
# undef PATH_MAX
# define PATH_MAX 1024
#endif
-#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
+#if defined _WIN32 && ! defined __CYGWIN__
# undef PATH_MAX
# define PATH_MAX 260
#endif
diff --git a/m4/pthread_rwlock_rdlock.m4 b/m4/pthread_rwlock_rdlock.m4
index 9c1d5d0..6812b4f 100644
--- a/m4/pthread_rwlock_rdlock.m4
+++ b/m4/pthread_rwlock_rdlock.m4
@@ -1,4 +1,4 @@
-# pthread_rwlock_rdlock.m4 serial 1
+# pthread_rwlock_rdlock.m4 serial 2
dnl Copyright (C) 2017-2018 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
@@ -23,12 +23,14 @@ dnl time, a phenomenon called "writer starvation".
dnl Without such a guarantee, applications have a hard time avoiding writer
dnl starvation.
dnl
-dnl POSIX:2008 makes this requirement only for implementations that support TPS
+dnl POSIX:2017 makes this requirement only for implementations that support TPS
dnl (Thread Priority Scheduling) and only for the scheduling policies SCHED_FIFO
dnl and SCHED_RR, see
dnl http://pubs.opengroup.org/onlinepubs/9699919799/functions/pthread_rwlock_rdlock.html
-dnl but test verifies the guarantee regardless of TPS and regardless of
+dnl but this test verifies the guarantee regardless of TPS and regardless of
dnl scheduling policy.
+dnl Glibc currently does not provide this guarantee, see
+dnl https://sourceware.org/bugzilla/show_bug.cgi?id=13701
AC_DEFUN([gl_PTHREAD_RWLOCK_RDLOCK_PREFER_WRITER],
[
AC_REQUIRE([gl_THREADLIB_EARLY])
diff --git a/m4/readlink.m4 b/m4/readlink.m4
index 9d73f5c..4d0ab48 100644
--- a/m4/readlink.m4
+++ b/m4/readlink.m4
@@ -1,4 +1,4 @@
-# readlink.m4 serial 13
+# readlink.m4 serial 14
dnl Copyright (C) 2003, 2007, 2009-2018 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
@@ -34,10 +34,12 @@ AC_DEFUN([gl_FUNC_READLINK],
return readlink ("conftest.lnk2/", buf, sizeof buf) != -1;]])],
[gl_cv_func_readlink_works=yes], [gl_cv_func_readlink_works=no],
[case "$host_os" in
- # Guess yes on glibc systems.
- *-gnu* | gnu*) gl_cv_func_readlink_works="guessing yes" ;;
- # If we don't know, assume the worst.
- *) gl_cv_func_readlink_works="guessing no" ;;
+ # Guess yes on Linux systems.
+ linux-* | linux) gl_cv_func_readlink_works="guessing yes" ;;
+ # Guess yes on glibc systems.
+ *-gnu* | gnu*) gl_cv_func_readlink_works="guessing yes" ;;
+ # If we don't know, assume the worst.
+ *) gl_cv_func_readlink_works="guessing no" ;;
esac
])
rm -f conftest.link conftest.lnk2])
diff --git a/m4/regex.m4 b/m4/regex.m4
index 055d71b..3a39b1a 100644
--- a/m4/regex.m4
+++ b/m4/regex.m4
@@ -1,4 +1,4 @@
-# serial 67
+# serial 68
# Copyright (C) 1996-2001, 2003-2018 Free Software Foundation, Inc.
#
@@ -213,6 +213,17 @@ AC_DEFUN([gl_REGEX],
if (! REG_STARTEND)
result |= 64;
+ /* Matching with the compiled form of this regexp would provoke
+ an assertion failure prior to glibc-2.28:
+ regexec.c:1375: pop_fail_stack: Assertion 'num >= 0' failed
+ With glibc-2.28, compilation fails and reports the invalid
+ back reference. */
+ re_set_syntax (RE_SYNTAX_POSIX_EGREP);
+ memset (&regex, 0, sizeof regex);
+ s = re_compile_pattern ("0|()0|\\1|0", 10, &regex);
+ if (!s || strcmp (s, "Invalid back reference"))
+ 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
diff --git a/m4/rename.m4 b/m4/rename.m4
index f7fa3bb..fcf230e 100644
--- a/m4/rename.m4
+++ b/m4/rename.m4
@@ -1,4 +1,4 @@
-# serial 29
+# serial 31
# Copyright (C) 2001, 2003, 2005-2006, 2009-2018 Free Software Foundation, Inc.
# This file is free software; the Free Software Foundation
@@ -19,7 +19,7 @@ AC_DEFUN([gl_FUNC_RENAME],
AC_REQUIRE([gl_STDIO_H_DEFAULTS])
AC_CHECK_FUNCS_ONCE([lstat])
- dnl Solaris 11, AIX 7.1 mistakenly allow rename("file","name/").
+ dnl Solaris 11.3, AIX 7.1 mistakenly allow rename("file","name/").
dnl NetBSD 1.6 mistakenly forbids rename("dir","name/").
dnl FreeBSD 7.2 mistakenly allows rename("file","link-to-file/").
dnl The Solaris bug can be worked around without stripping
@@ -55,12 +55,14 @@ AC_DEFUN([gl_FUNC_RENAME],
[gl_cv_func_rename_slash_dst_works=no],
dnl When crosscompiling, assume rename is broken.
[case "$host_os" in
- # Guess yes on glibc systems.
- *-gnu*) gl_cv_func_rename_slash_dst_works="guessing yes" ;;
- # Guess no on native Windows.
- mingw*) gl_cv_func_rename_slash_dst_works="guessing no" ;;
- # If we don't know, assume the worst.
- *) gl_cv_func_rename_slash_dst_works="guessing no" ;;
+ # Guess yes on Linux systems.
+ linux-* | linux) gl_cv_func_rename_slash_dst_works="guessing yes" ;;
+ # Guess yes on glibc systems.
+ *-gnu*) gl_cv_func_rename_slash_dst_works="guessing yes" ;;
+ # Guess no on native Windows.
+ mingw*) gl_cv_func_rename_slash_dst_works="guessing no" ;;
+ # If we don't know, assume the worst.
+ *) gl_cv_func_rename_slash_dst_works="guessing no" ;;
esac
])
rm -rf conftest.f conftest.f1 conftest.f2 conftest.d1 conftest.d2 conftest.lnk
@@ -109,12 +111,14 @@ AC_DEFUN([gl_FUNC_RENAME],
[gl_cv_func_rename_slash_src_works=no],
dnl When crosscompiling, assume rename is broken.
[case "$host_os" in
- # Guess yes on glibc systems.
- *-gnu*) gl_cv_func_rename_slash_src_works="guessing yes" ;;
- # Guess yes on native Windows.
- mingw*) gl_cv_func_rename_slash_src_works="guessing yes" ;;
- # If we don't know, assume the worst.
- *) gl_cv_func_rename_slash_src_works="guessing no" ;;
+ # Guess yes on Linux systems.
+ linux-* | linux) gl_cv_func_rename_slash_src_works="guessing yes" ;;
+ # Guess yes on glibc systems.
+ *-gnu*) gl_cv_func_rename_slash_src_works="guessing yes" ;;
+ # Guess yes on native Windows.
+ mingw*) gl_cv_func_rename_slash_src_works="guessing yes" ;;
+ # If we don't know, assume the worst.
+ *) gl_cv_func_rename_slash_src_works="guessing no" ;;
esac
])
rm -rf conftest.f conftest.f1 conftest.d1 conftest.d2 conftest.d3 conftest.lnk
@@ -169,12 +173,14 @@ AC_DEFUN([gl_FUNC_RENAME],
[gl_cv_func_rename_link_works=no],
dnl When crosscompiling, assume rename is broken.
[case "$host_os" in
- # Guess yes on glibc systems.
- *-gnu*) gl_cv_func_rename_link_works="guessing yes" ;;
- # Guess yes on native Windows.
- mingw*) gl_cv_func_rename_link_works="guessing yes" ;;
- # If we don't know, assume the worst.
- *) gl_cv_func_rename_link_works="guessing no" ;;
+ # Guess yes on Linux systems.
+ linux-* | linux) gl_cv_func_rename_link_works="guessing yes" ;;
+ # Guess yes on glibc systems.
+ *-gnu*) gl_cv_func_rename_link_works="guessing yes" ;;
+ # Guess yes on native Windows.
+ mingw*) gl_cv_func_rename_link_works="guessing yes" ;;
+ # If we don't know, assume the worst.
+ *) gl_cv_func_rename_link_works="guessing no" ;;
esac
])
else
@@ -220,12 +226,14 @@ AC_DEFUN([gl_FUNC_RENAME],
[gl_cv_func_rename_dest_works=no],
dnl When crosscompiling, assume rename is broken.
[case "$host_os" in
- # Guess yes on glibc systems.
- *-gnu*) gl_cv_func_rename_dest_works="guessing yes" ;;
- # Guess no on native Windows.
- mingw*) gl_cv_func_rename_dest_works="guessing no" ;;
- # If we don't know, assume the worst.
- *) gl_cv_func_rename_dest_works="guessing no" ;;
+ # Guess yes on Linux systems.
+ linux-* | linux) gl_cv_func_rename_dest_works="guessing yes" ;;
+ # Guess yes on glibc systems.
+ *-gnu*) gl_cv_func_rename_dest_works="guessing yes" ;;
+ # Guess no on native Windows.
+ mingw*) gl_cv_func_rename_dest_works="guessing no" ;;
+ # If we don't know, assume the worst.
+ *) gl_cv_func_rename_dest_works="guessing no" ;;
esac
])
rm -rf conftest.f conftest.d1 conftest.d2
diff --git a/m4/rmdir.m4 b/m4/rmdir.m4
index 36c4514..a24d845 100644
--- a/m4/rmdir.m4
+++ b/m4/rmdir.m4
@@ -1,4 +1,4 @@
-# rmdir.m4 serial 15
+# rmdir.m4 serial 16
dnl Copyright (C) 2002, 2005, 2009-2018 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
@@ -33,12 +33,14 @@ AC_DEFUN([gl_FUNC_RMDIR],
]])],
[gl_cv_func_rmdir_works=yes], [gl_cv_func_rmdir_works=no],
[case "$host_os" in
- # Guess yes on glibc systems.
- *-gnu* | gnu*) gl_cv_func_rmdir_works="guessing yes" ;;
- # Guess no on native Windows.
- mingw*) gl_cv_func_rmdir_works="guessing no" ;;
- # If we don't know, assume the worst.
- *) gl_cv_func_rmdir_works="guessing no" ;;
+ # Guess yes on Linux systems.
+ linux-* | linux) gl_cv_func_rmdir_works="guessing yes" ;;
+ # Guess yes on glibc systems.
+ *-gnu* | gnu*) gl_cv_func_rmdir_works="guessing yes" ;;
+ # Guess no on native Windows.
+ mingw*) gl_cv_func_rmdir_works="guessing no" ;;
+ # If we don't know, assume the worst.
+ *) gl_cv_func_rmdir_works="guessing no" ;;
esac
])
rm -rf conftest.dir conftest.file])
diff --git a/m4/select.m4 b/m4/select.m4
index db58037..098af8e 100644
--- a/m4/select.m4
+++ b/m4/select.m4
@@ -1,4 +1,4 @@
-# select.m4 serial 9
+# select.m4 serial 10
dnl Copyright (C) 2009-2018 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
@@ -74,10 +74,12 @@ changequote([,])dnl
[gl_cv_func_select_detects_ebadf=no],
[
case "$host_os" in
- # Guess yes on glibc systems.
- *-gnu* | gnu*) gl_cv_func_select_detects_ebadf="guessing yes" ;;
- # If we don't know, assume the worst.
- *) gl_cv_func_select_detects_ebadf="guessing no" ;;
+ # Guess yes on Linux systems.
+ linux-* | linux) gl_cv_func_select_detects_ebadf="guessing yes" ;;
+ # Guess yes on glibc systems.
+ *-gnu* | gnu*) gl_cv_func_select_detects_ebadf="guessing yes" ;;
+ # If we don't know, assume the worst.
+ *) gl_cv_func_select_detects_ebadf="guessing no" ;;
esac
])
])
diff --git a/m4/setlocale.m4 b/m4/setlocale.m4
index 802ee01..e0fb74a 100644
--- a/m4/setlocale.m4
+++ b/m4/setlocale.m4
@@ -1,4 +1,4 @@
-# setlocale.m4 serial 4
+# setlocale.m4 serial 5
dnl Copyright (C) 2011-2018 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
@@ -25,5 +25,8 @@ AC_DEFUN([gl_FUNC_SETLOCALE],
# Prerequisites of lib/setlocale.c.
AC_DEFUN([gl_PREREQ_SETLOCALE],
[
+ dnl No need to check for CFLocaleCopyPreferredLanguages and
+ dnl CFPreferencesCopyAppValue because lib/setlocale.c is not used on Mac OS X.
+ dnl (The Mac OS X specific code is only used in libintl.)
:
])
diff --git a/m4/socklen.m4 b/m4/socklen.m4
index f2d996d..fa79b07 100644
--- a/m4/socklen.m4
+++ b/m4/socklen.m4
@@ -1,4 +1,4 @@
-# socklen.m4 serial 10
+# socklen.m4 serial 11
dnl Copyright (C) 2005-2007, 2009-2018 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
@@ -15,8 +15,8 @@ dnl So we have to test to find something that will work.
AC_DEFUN([gl_TYPE_SOCKLEN_T],
[AC_REQUIRE([gl_CHECK_SOCKET_HEADERS])dnl
AC_CHECK_TYPE([socklen_t], ,
- [AC_MSG_CHECKING([for socklen_t equivalent])
- AC_CACHE_VAL([gl_cv_socklen_t_equiv],
+ [AC_CACHE_CHECK([for socklen_t equivalent],
+ [gl_cv_socklen_t_equiv],
[# Systems have either "struct sockaddr *" or
# "void *" as the second argument to getpeername
gl_cv_socklen_t_equiv=
@@ -34,11 +34,10 @@ AC_DEFUN([gl_TYPE_SOCKLEN_T],
done
test "$gl_cv_socklen_t_equiv" != "" && break
done
- ])
- if test "$gl_cv_socklen_t_equiv" = ""; then
- AC_MSG_ERROR([Cannot find a type to use in place of socklen_t])
- fi
- AC_MSG_RESULT([$gl_cv_socklen_t_equiv])
+ if test "$gl_cv_socklen_t_equiv" = ""; then
+ AC_MSG_ERROR([Cannot find a type to use in place of socklen_t])
+ fi
+ ])
AC_DEFINE_UNQUOTED([socklen_t], [$gl_cv_socklen_t_equiv],
[type to use in place of socklen_t if not defined])],
[gl_SOCKET_HEADERS])])
diff --git a/m4/sockpfaf.m4 b/m4/sockpfaf.m4
index e3fe2c4..cc47b8b 100644
--- a/m4/sockpfaf.m4
+++ b/m4/sockpfaf.m4
@@ -1,4 +1,4 @@
-# sockpfaf.m4 serial 8
+# sockpfaf.m4 serial 9
dnl Copyright (C) 2004, 2006, 2009-2018 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
@@ -16,8 +16,8 @@ AC_DEFUN([gl_SOCKET_FAMILIES],
AC_REQUIRE([gl_HEADER_SYS_SOCKET])
AC_CHECK_HEADERS_ONCE([netinet/in.h])
- AC_MSG_CHECKING([for IPv4 sockets])
- AC_CACHE_VAL([gl_cv_socket_ipv4],
+ AC_CACHE_CHECK([for IPv4 sockets],
+ [gl_cv_socket_ipv4],
[AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <sys/types.h>
#ifdef HAVE_SYS_SOCKET_H
#include <sys/socket.h>
@@ -31,13 +31,12 @@ AC_DEFUN([gl_SOCKET_FAMILIES],
[[int x = AF_INET; struct in_addr y; struct sockaddr_in z;
if (&x && &y && &z) return 0;]])],
gl_cv_socket_ipv4=yes, gl_cv_socket_ipv4=no)])
- AC_MSG_RESULT([$gl_cv_socket_ipv4])
if test $gl_cv_socket_ipv4 = yes; then
AC_DEFINE([HAVE_IPV4], [1], [Define to 1 if <sys/socket.h> defines AF_INET.])
fi
- AC_MSG_CHECKING([for IPv6 sockets])
- AC_CACHE_VAL([gl_cv_socket_ipv6],
+ AC_CACHE_CHECK([for IPv6 sockets],
+ [gl_cv_socket_ipv6],
[AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <sys/types.h>
#ifdef HAVE_SYS_SOCKET_H
#include <sys/socket.h>
@@ -54,7 +53,6 @@ AC_DEFUN([gl_SOCKET_FAMILIES],
[[int x = AF_INET6; struct in6_addr y; struct sockaddr_in6 z;
if (&x && &y && &z) return 0;]])],
gl_cv_socket_ipv6=yes, gl_cv_socket_ipv6=no)])
- AC_MSG_RESULT([$gl_cv_socket_ipv6])
if test $gl_cv_socket_ipv6 = yes; then
AC_DEFINE([HAVE_IPV6], [1], [Define to 1 if <sys/socket.h> defines AF_INET6.])
fi
@@ -65,8 +63,8 @@ AC_DEFUN([gl_SOCKET_FAMILY_UNIX],
AC_REQUIRE([gl_HEADER_SYS_SOCKET])
AC_CHECK_HEADERS_ONCE([sys/un.h])
- AC_MSG_CHECKING([for UNIX domain sockets])
- AC_CACHE_VAL([gl_cv_socket_unix],
+ AC_CACHE_CHECK([for UNIX domain sockets],
+ [gl_cv_socket_unix],
[AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <sys/types.h>
#ifdef HAVE_SYS_SOCKET_H
#include <sys/socket.h>
@@ -80,7 +78,6 @@ AC_DEFUN([gl_SOCKET_FAMILY_UNIX],
[[int x = AF_UNIX; struct sockaddr_un y;
if (&x && &y) return 0;]])],
gl_cv_socket_unix=yes, gl_cv_socket_unix=no)])
- AC_MSG_RESULT([$gl_cv_socket_unix])
if test $gl_cv_socket_unix = yes; then
AC_DEFINE([HAVE_UNIXSOCKET], [1], [Define to 1 if <sys/socket.h> defines AF_UNIX.])
fi
diff --git a/m4/stat.m4 b/m4/stat.m4
index d762cba..e8ec3b2 100644
--- a/m4/stat.m4
+++ b/m4/stat.m4
@@ -1,4 +1,4 @@
-# serial 14
+# serial 15
# Copyright (C) 2009-2018 Free Software Foundation, Inc.
#
@@ -43,10 +43,12 @@ AC_DEFUN([gl_FUNC_STAT],
]])],
[gl_cv_func_stat_file_slash=yes], [gl_cv_func_stat_file_slash=no],
[case "$host_os" in
- # Guess yes on glibc systems.
- *-gnu* | gnu*) gl_cv_func_stat_file_slash="guessing yes" ;;
- # If we don't know, assume the worst.
- *) gl_cv_func_stat_file_slash="guessing no" ;;
+ # Guess yes on Linux systems.
+ linux-* | linux) gl_cv_func_stat_file_slash="guessing yes" ;;
+ # Guess yes on glibc systems.
+ *-gnu* | gnu*) gl_cv_func_stat_file_slash="guessing yes" ;;
+ # If we don't know, assume the worst.
+ *) gl_cv_func_stat_file_slash="guessing no" ;;
esac
])
rm -f conftest.tmp conftest.lnk])
diff --git a/m4/std-gnu11.m4 b/m4/std-gnu11.m4
index c85ac43..bae4ed1 100644
--- a/m4/std-gnu11.m4
+++ b/m4/std-gnu11.m4
@@ -70,7 +70,7 @@ _AS_ECHO_LOG([checking for _AC_LANG compiler version])
set X $ac_compile
ac_compiler=$[2]
for ac_option in --version -v -V -qversion -version; do
- _AC_DO_LIMIT([$ac_compiler $ac_option >&AS_MESSAGE_LOG_FD])
+ m4_ifdef([_AC_DO_LIMIT],[_AC_DO_LIMIT],[_AC_DO])([$ac_compiler $ac_option >&AS_MESSAGE_LOG_FD])
done
m4_expand_once([_AC_COMPILER_EXEEXT])[]dnl
@@ -135,7 +135,7 @@ _AS_ECHO_LOG([checking for _AC_LANG compiler version])
set X $ac_compile
ac_compiler=$[2]
for ac_option in --version -v -V -qversion; do
- _AC_DO_LIMIT([$ac_compiler $ac_option >&AS_MESSAGE_LOG_FD])
+ m4_ifdef([_AC_DO_LIMIT],[_AC_DO_LIMIT],[_AC_DO])([$ac_compiler $ac_option >&AS_MESSAGE_LOG_FD])
done
m4_expand_once([_AC_COMPILER_EXEEXT])[]dnl
diff --git a/m4/stdarg.m4 b/m4/stdarg.m4
index d6f0508..f89d38b 100644
--- a/m4/stdarg.m4
+++ b/m4/stdarg.m4
@@ -1,4 +1,4 @@
-# stdarg.m4 serial 6
+# stdarg.m4 serial 7
dnl Copyright (C) 2006, 2008-2018 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
@@ -11,19 +11,19 @@ AC_DEFUN([gl_STDARG_H],
[
STDARG_H=''
NEXT_STDARG_H='<stdarg.h>'
- AC_MSG_CHECKING([for va_copy])
- AC_CACHE_VAL([gl_cv_func_va_copy], [
- AC_COMPILE_IFELSE(
- [AC_LANG_PROGRAM(
- [[#include <stdarg.h>]],
- [[
+ AC_CACHE_CHECK([for va_copy],
+ [gl_cv_func_va_copy],
+ [AC_COMPILE_IFELSE(
+ [AC_LANG_PROGRAM(
+ [[#include <stdarg.h>]],
+ [[
#ifndef va_copy
void (*func) (va_list, va_list) = va_copy;
#endif
- ]])],
- [gl_cv_func_va_copy=yes],
- [gl_cv_func_va_copy=no])])
- AC_MSG_RESULT([$gl_cv_func_va_copy])
+ ]])],
+ [gl_cv_func_va_copy=yes],
+ [gl_cv_func_va_copy=no])
+ ])
if test $gl_cv_func_va_copy = no; then
dnl Provide a substitute.
dnl Usually a simple definition in <config.h> is enough. Not so on AIX 5
diff --git a/m4/stddef_h.m4 b/m4/stddef_h.m4
index ba3d201..07b040a 100644
--- a/m4/stddef_h.m4
+++ b/m4/stddef_h.m4
@@ -1,5 +1,5 @@
dnl A placeholder for <stddef.h>, for platforms that have issues.
-# stddef_h.m4 serial 5
+# stddef_h.m4 serial 6
dnl Copyright (C) 2009-2018 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
@@ -10,13 +10,33 @@ 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>
- ]])
+
+ dnl Test whether the type max_align_t exists and whether its alignment
+ dnl "is as great as is supported by the implementation in all contexts".
+ AC_CACHE_CHECK([for good max_align_t],
+ [gl_cv_type_max_align_t],
+ [AC_COMPILE_IFELSE(
+ [AC_LANG_PROGRAM(
+ [[#include <stddef.h>
+ unsigned int s = sizeof (max_align_t);
+ #if defined __GNUC__ || defined __IBM__ALIGNOF__
+ int check1[2 * (__alignof__ (double) <= __alignof__ (max_align_t)) - 1];
+ int check2[2 * (__alignof__ (long double) <= __alignof__ (max_align_t)) - 1];
+ #endif
+ ]])],
+ [gl_cv_type_max_align_t=yes],
+ [gl_cv_type_max_align_t=no])
+ ])
+ if test $gl_cv_type_max_align_t = no; then
+ 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
+
AC_CACHE_CHECK([whether NULL can be used in arbitrary expressions],
[gl_cv_decl_null_works],
[AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <stddef.h>
@@ -28,6 +48,7 @@ AC_DEFUN([gl_STDDEF_H],
REPLACE_NULL=1
STDDEF_H=stddef.h
fi
+
AC_SUBST([STDDEF_H])
AM_CONDITIONAL([GL_GENERATE_STDDEF_H], [test -n "$STDDEF_H"])
if test -n "$STDDEF_H"; then
diff --git a/m4/stdint.m4 b/m4/stdint.m4
index b86184c..81d065f 100644
--- a/m4/stdint.m4
+++ b/m4/stdint.m4
@@ -1,4 +1,4 @@
-# stdint.m4 serial 51
+# stdint.m4 serial 53
dnl Copyright (C) 2001-2018 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
@@ -7,6 +7,8 @@ dnl with or without modifications, as long as this notice is preserved.
dnl From Paul Eggert and Bruno Haible.
dnl Test whether <stdint.h> is supported or must be substituted.
+AC_PREREQ([2.61])
+
AC_DEFUN_ONCE([gl_STDINT_H],
[
AC_PREREQ([2.59])dnl
@@ -364,8 +366,7 @@ int32_t i32 = INT32_C (0x7fffffff);
esac
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"])
+ gl_REPLACE_LIMITS_H
AC_SUBST([HAVE_C99_STDINT_H])
AC_SUBST([HAVE_SYS_BITYPES_H])
@@ -541,9 +542,3 @@ AC_DEFUN([gl_STDINT_TYPE_PROPERTIES],
BITSIZEOF_WINT_T=32
fi
])
-
-dnl Autoconf >= 2.61 has AC_COMPUTE_INT built-in.
-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])])
-])
diff --git a/m4/stdio_h.m4 b/m4/stdio_h.m4
index e06461e..0debe69 100644
--- a/m4/stdio_h.m4
+++ b/m4/stdio_h.m4
@@ -1,4 +1,4 @@
-# stdio_h.m4 serial 48
+# stdio_h.m4 serial 49
dnl Copyright (C) 2007-2018 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
@@ -28,7 +28,7 @@ AC_DEFUN([gl_STDIO_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__) && \
+ #if (defined _WIN32 && ! defined __CYGWIN__) && \
(__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4))
extern char PRIdMAX_probe[sizeof PRIdMAX == sizeof "I64d" ? 1 : -1];
#endif
diff --git a/m4/symlink.m4 b/m4/symlink.m4
index a452f7c..afaa941 100644
--- a/m4/symlink.m4
+++ b/m4/symlink.m4
@@ -1,4 +1,4 @@
-# serial 7
+# serial 8
# See if we need to provide symlink replacement.
dnl Copyright (C) 2009-2018 Free Software Foundation, Inc.
@@ -36,10 +36,12 @@ AC_DEFUN([gl_FUNC_SYMLINK],
]])],
[gl_cv_func_symlink_works=yes], [gl_cv_func_symlink_works=no],
[case "$host_os" in
- # Guess yes on glibc systems.
- *-gnu* | gnu*) gl_cv_func_symlink_works="guessing yes" ;;
- # If we don't know, assume the worst.
- *) gl_cv_func_symlink_works="guessing no" ;;
+ # Guess yes on Linux systems.
+ linux-* | linux) gl_cv_func_symlink_works="guessing yes" ;;
+ # Guess yes on glibc systems.
+ *-gnu* | gnu*) gl_cv_func_symlink_works="guessing yes" ;;
+ # If we don't know, assume the worst.
+ *) gl_cv_func_symlink_works="guessing no" ;;
esac
])
rm -f conftest.f conftest.link conftest.lnk2])
diff --git a/m4/threadlib.m4 b/m4/threadlib.m4
index 1f7b134..ed6ebd5 100644
--- a/m4/threadlib.m4
+++ b/m4/threadlib.m4
@@ -1,4 +1,4 @@
-# threadlib.m4 serial 13
+# threadlib.m4 serial 15
dnl Copyright (C) 2005-2018 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
@@ -6,6 +6,8 @@ dnl with or without modifications, as long as this notice is preserved.
dnl From Bruno Haible.
+AC_PREREQ([2.60])
+
dnl gl_THREADLIB
dnl ------------
dnl Tests for a multithreading library to be used.
@@ -43,11 +45,7 @@ AC_DEFUN([gl_THREADLIB_EARLY_BODY],
AC_REQUIRE([AC_CANONICAL_HOST])
dnl _GNU_SOURCE is needed for pthread_rwlock_t on glibc systems.
- dnl AC_USE_SYSTEM_EXTENSIONS was introduced in autoconf 2.60 and obsoletes
- dnl AC_GNU_SOURCE.
- m4_ifdef([AC_USE_SYSTEM_EXTENSIONS],
- [AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS])],
- [AC_REQUIRE([AC_GNU_SOURCE])])
+ AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS])
dnl Check for multithreading.
m4_ifdef([gl_THREADLIB_DEFAULT_NO],
[m4_divert_text([DEFAULTS], [gl_use_threads_default=no])],
@@ -153,6 +151,36 @@ int main ()
*" -static "*) gl_cv_have_weak=no ;;
esac
])
+ dnl Check whether the linker supports the --as-needed/--no-as-needed options.
+ dnl Assume GCC, so that we can use the -Wl option.
+ AC_CACHE_CHECK([whether the linker supports --as-needed],
+ [gl_cv_linker_have_as_needed],
+ [if test -n "$GCC"; then
+ gl_saved_ldflags="$LDFLAGS"
+ LDFLAGS="$gl_saved_ldflags -Wl,--as-needed -Wl,--no-as-needed"
+ AC_LINK_IFELSE([AC_LANG_PROGRAM()],
+ [gl_cv_linker_have_as_needed=yes],
+ [gl_cv_linker_have_as_needed=no])
+ LDFLAGS="$gl_saved_ldflags"
+ else
+ gl_cv_linker_have_as_needed=no
+ fi
+ ])
+ dnl Check whether the linker supports the --push-state/--pop-state options.
+ dnl Assume GCC, so that we can use the -Wl option.
+ AC_CACHE_CHECK([whether the linker supports --push-state],
+ [gl_cv_linker_have_push_state],
+ [if test -n "$GCC"; then
+ gl_saved_ldflags="$LDFLAGS"
+ LDFLAGS="$gl_saved_ldflags -Wl,--push-state -Wl,--pop-state"
+ AC_LINK_IFELSE([AC_LANG_PROGRAM()],
+ [gl_cv_linker_have_push_state=yes],
+ [gl_cv_linker_have_push_state=no])
+ LDFLAGS="$gl_saved_ldflags"
+ else
+ gl_cv_linker_have_push_state=no
+ fi
+ ])
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.
@@ -231,6 +259,32 @@ int main ()
[Define if references to the POSIX multithreading library should be made weak.])
LIBTHREAD=
LTLIBTHREAD=
+ dnl On platforms where GCC enables --as-needed by default, attempt
+ dnl to make sure that LIBMULTITHREAD really links with -lpthread.
+ dnl Otherwise linking with LIBMULTITHREAD has no effect; then
+ dnl the weak symbols are not defined and thus evaluate to NULL.
+ case "$LIBMULTITHREAD" in
+ "") ;;
+ -pthread)
+ if test $gl_cv_linker_have_as_needed = yes; then
+ if test $gl_cv_linker_have_push_state = yes; then
+ LIBMULTITHREAD="$LIBMULTITHREAD -Wl,--push-state -Wl,--no-as-needed -lpthread -Wl,--pop-state"
+ else
+ LIBMULTITHREAD="$LIBMULTITHREAD -Wl,--no-as-needed -lpthread"
+ fi
+ fi
+ ;;
+ *)
+ if test $gl_cv_linker_have_as_needed = yes; then
+ if test $gl_cv_linker_have_push_state = yes; then
+ LIBMULTITHREAD="-Wl,--push-state -Wl,--no-as-needed $LIBMULTITHREAD -Wl,--pop-state"
+ else
+ LIBMULTITHREAD="-Wl,--no-as-needed $LIBMULTITHREAD"
+ fi
+ fi
+ ;;
+ esac
+ # TODO: May need to modify LTLIBMULTITHREAD similarly.
fi
fi
fi
@@ -263,6 +317,18 @@ int main ()
[Define if references to the old Solaris multithreading library should be made weak.])
LIBTHREAD=
LTLIBTHREAD=
+ dnl On platforms where GCC enables --as-needed by default, attempt
+ dnl to make sure that LIBMULTITHREAD really links with -lthread.
+ dnl Otherwise linking with LIBMULTITHREAD has no effect; then
+ dnl the weak symbols are not defined and thus evaluate to NULL.
+ if test $gl_cv_linker_have_as_needed = yes; then
+ if test $gl_cv_linker_have_push_state = yes; then
+ LIBMULTITHREAD="-Wl,--push-state -Wl,--no-as-needed $LIBMULTITHREAD -Wl,--pop-state"
+ else
+ LIBMULTITHREAD="-Wl,--no-as-needed $LIBMULTITHREAD"
+ fi
+ fi
+ # TODO: May need to modify LTLIBMULTITHREAD similarly.
fi
fi
fi
@@ -291,6 +357,18 @@ int main ()
[Define if references to the GNU Pth multithreading library should be made weak.])
LIBTHREAD=
LTLIBTHREAD=
+ dnl On platforms where GCC enables --as-needed by default, attempt
+ dnl to make sure that LIBMULTITHREAD really links with -lpth.
+ dnl Otherwise linking with LIBMULTITHREAD has no effect; then
+ dnl the weak symbols are not defined and thus evaluate to NULL.
+ if test $gl_cv_linker_have_as_needed = yes; then
+ if test $gl_cv_linker_have_push_state = yes; then
+ LIBMULTITHREAD="-Wl,--push-state -Wl,--no-as-needed $LIBMULTITHREAD -Wl,--pop-state"
+ else
+ LIBMULTITHREAD="-Wl,--no-as-needed $LIBMULTITHREAD"
+ fi
+ fi
+ # TODO: May need to modify LTLIBMULTITHREAD similarly.
fi
fi
else
diff --git a/m4/unistd_h.m4 b/m4/unistd_h.m4
index b3b71ec..3ba64da 100644
--- a/m4/unistd_h.m4
+++ b/m4/unistd_h.m4
@@ -1,4 +1,4 @@
-# unistd_h.m4 serial 71
+# unistd_h.m4 serial 74
dnl Copyright (C) 2006-2018 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
@@ -37,13 +37,13 @@ AC_DEFUN([gl_UNISTD_H],
# include <fcntl.h>
# include <stdio.h>
# include <stdlib.h>
-# if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
+# if defined _WIN32 && ! defined __CYGWIN__
# include <io.h>
# endif
#endif
]], [chdir chown dup dup2 dup3 environ euidaccess faccessat fchdir fchownat
fdatasync fsync ftruncate getcwd getdomainname getdtablesize getgroups
- gethostname getlogin getlogin_r getpagesize
+ gethostname getlogin getlogin_r getpagesize getpass
getusershell setusershell endusershell
group_member isatty lchown link linkat lseek pipe pipe2 pread pwrite
readlink readlinkat rmdir sethostname sleep symlink symlinkat
@@ -83,6 +83,7 @@ AC_DEFUN([gl_UNISTD_H_DEFAULTS],
GNULIB_GETLOGIN=0; AC_SUBST([GNULIB_GETLOGIN])
GNULIB_GETLOGIN_R=0; AC_SUBST([GNULIB_GETLOGIN_R])
GNULIB_GETPAGESIZE=0; AC_SUBST([GNULIB_GETPAGESIZE])
+ GNULIB_GETPASS=0; AC_SUBST([GNULIB_GETPASS])
GNULIB_GETUSERSHELL=0; AC_SUBST([GNULIB_GETUSERSHELL])
GNULIB_GROUP_MEMBER=0; AC_SUBST([GNULIB_GROUP_MEMBER])
GNULIB_ISATTY=0; AC_SUBST([GNULIB_ISATTY])
@@ -126,6 +127,7 @@ AC_DEFUN([gl_UNISTD_H_DEFAULTS],
HAVE_GETHOSTNAME=1; AC_SUBST([HAVE_GETHOSTNAME])
HAVE_GETLOGIN=1; AC_SUBST([HAVE_GETLOGIN])
HAVE_GETPAGESIZE=1; AC_SUBST([HAVE_GETPAGESIZE])
+ HAVE_GETPASS=1; AC_SUBST([HAVE_GETPASS])
HAVE_GROUP_MEMBER=1; AC_SUBST([HAVE_GROUP_MEMBER])
HAVE_LCHOWN=1; AC_SUBST([HAVE_LCHOWN])
HAVE_LINK=1; AC_SUBST([HAVE_LINK])
@@ -140,7 +142,6 @@ AC_DEFUN([gl_UNISTD_H_DEFAULTS],
HAVE_SLEEP=1; AC_SUBST([HAVE_SLEEP])
HAVE_SYMLINK=1; AC_SUBST([HAVE_SYMLINK])
HAVE_SYMLINKAT=1; AC_SUBST([HAVE_SYMLINKAT])
- HAVE_TRUNCATE=1; AC_SUBST([HAVE_TRUNCATE])
HAVE_UNLINKAT=1; AC_SUBST([HAVE_UNLINKAT])
HAVE_USLEEP=1; AC_SUBST([HAVE_USLEEP])
HAVE_DECL_ENVIRON=1; AC_SUBST([HAVE_DECL_ENVIRON])
@@ -152,6 +153,7 @@ AC_DEFUN([gl_UNISTD_H_DEFAULTS],
HAVE_DECL_GETPAGESIZE=1; AC_SUBST([HAVE_DECL_GETPAGESIZE])
HAVE_DECL_GETUSERSHELL=1; AC_SUBST([HAVE_DECL_GETUSERSHELL])
HAVE_DECL_SETHOSTNAME=1; AC_SUBST([HAVE_DECL_SETHOSTNAME])
+ HAVE_DECL_TRUNCATE=1; AC_SUBST([HAVE_DECL_TRUNCATE])
HAVE_DECL_TTYNAME_R=1; AC_SUBST([HAVE_DECL_TTYNAME_R])
HAVE_OS_H=0; AC_SUBST([HAVE_OS_H])
HAVE_SYS_PARAM_H=0; AC_SUBST([HAVE_SYS_PARAM_H])
@@ -168,6 +170,7 @@ AC_DEFUN([gl_UNISTD_H_DEFAULTS],
REPLACE_GETLOGIN_R=0; AC_SUBST([REPLACE_GETLOGIN_R])
REPLACE_GETGROUPS=0; AC_SUBST([REPLACE_GETGROUPS])
REPLACE_GETPAGESIZE=0; AC_SUBST([REPLACE_GETPAGESIZE])
+ REPLACE_GETPASS=0; AC_SUBST([REPLACE_GETPASS])
REPLACE_ISATTY=0; AC_SUBST([REPLACE_ISATTY])
REPLACE_LCHOWN=0; AC_SUBST([REPLACE_LCHOWN])
REPLACE_LINK=0; AC_SUBST([REPLACE_LINK])
diff --git a/m4/warn-on-use.m4 b/m4/warn-on-use.m4
index e9c48bb..8e270cf 100644
--- a/m4/warn-on-use.m4
+++ b/m4/warn-on-use.m4
@@ -1,4 +1,4 @@
-# warn-on-use.m4 serial 5
+# warn-on-use.m4 serial 6
dnl Copyright (C) 2010-2018 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
@@ -6,6 +6,8 @@ dnl with or without modifications, as long as this notice is preserved.
# gl_WARN_ON_USE_PREPARE(INCLUDES, NAMES)
# ---------------------------------------
+# If the module 'posixcheck' is in use:
+#
# For each whitespace-separated element in the list of NAMES, define
# HAVE_RAW_DECL_name if the function has a declaration among INCLUDES
# even after being undefined as a macro.
@@ -23,25 +25,27 @@ dnl with or without modifications, as long as this notice is preserved.
# needing gl_WARN_ON_USE_PREPARE.
AC_DEFUN([gl_WARN_ON_USE_PREPARE],
[
- m4_foreach_w([gl_decl], [$2],
- [AH_TEMPLATE([HAVE_RAW_DECL_]AS_TR_CPP(m4_defn([gl_decl])),
- [Define to 1 if ]m4_defn([gl_decl])[ is declared even after
- undefining macros.])])dnl
+ m4_ifdef([gl_POSIXCHECK],
+ [m4_foreach_w([gl_decl], [$2],
+ [AH_TEMPLATE([HAVE_RAW_DECL_]AS_TR_CPP(m4_defn([gl_decl])),
+ [Define to 1 if ]m4_defn([gl_decl])[ is declared even after
+ undefining macros.])])dnl
dnl FIXME: gl_Symbol must be used unquoted until we can assume
dnl autoconf 2.64 or newer.
- for gl_func in m4_flatten([$2]); do
- AS_VAR_PUSHDEF([gl_Symbol], [gl_cv_have_raw_decl_$gl_func])dnl
- AC_CACHE_CHECK([whether $gl_func is declared without a macro],
- gl_Symbol,
- [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([$1],
+ for gl_func in m4_flatten([$2]); do
+ AS_VAR_PUSHDEF([gl_Symbol], [gl_cv_have_raw_decl_$gl_func])dnl
+ AC_CACHE_CHECK([whether $gl_func is declared without a macro],
+ gl_Symbol,
+ [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([$1],
[@%:@undef $gl_func
(void) $gl_func;])],
- [AS_VAR_SET(gl_Symbol, [yes])], [AS_VAR_SET(gl_Symbol, [no])])])
- AS_VAR_IF(gl_Symbol, [yes],
- [AC_DEFINE_UNQUOTED(AS_TR_CPP([HAVE_RAW_DECL_$gl_func]), [1])
- dnl shortcut - if the raw declaration exists, then set a cache
- dnl variable to allow skipping any later AC_CHECK_DECL efforts
- eval ac_cv_have_decl_$gl_func=yes])
- AS_VAR_POPDEF([gl_Symbol])dnl
- done
+ [AS_VAR_SET(gl_Symbol, [yes])], [AS_VAR_SET(gl_Symbol, [no])])])
+ AS_VAR_IF(gl_Symbol, [yes],
+ [AC_DEFINE_UNQUOTED(AS_TR_CPP([HAVE_RAW_DECL_$gl_func]), [1])
+ dnl shortcut - if the raw declaration exists, then set a cache
+ dnl variable to allow skipping any later AC_CHECK_DECL efforts
+ eval ac_cv_have_decl_$gl_func=yes])
+ AS_VAR_POPDEF([gl_Symbol])dnl
+ done
+ ])
])
diff --git a/m4/wchar_h.m4 b/m4/wchar_h.m4
index 416e0a1..a062ca9 100644
--- a/m4/wchar_h.m4
+++ b/m4/wchar_h.m4
@@ -7,7 +7,7 @@ dnl with or without modifications, as long as this notice is preserved.
dnl Written by Eric Blake.
-# wchar_h.m4 serial 42
+# wchar_h.m4 serial 43
AC_DEFUN([gl_WCHAR_H],
[
@@ -90,7 +90,8 @@ int main () { return zero(); }
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
+ if echo '#include "conftest.c"' >conftest1.c &&
+ AC_TRY_EVAL([ac_compile]); then
AC_LANG_CONFTEST([
AC_LANG_SOURCE([[#define wcstod renamed_wcstod
/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
@@ -105,7 +106,8 @@ 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
+ if echo '#include "conftest.c"' >conftest2.c &&
+ AC_TRY_EVAL([ac_compile]); then
if $CC -o conftest$ac_exeext $CFLAGS $LDFLAGS conftest1.$ac_objext conftest2.$ac_objext $LIBS >&AS_MESSAGE_LOG_FD 2>&1; then
:
else
@@ -114,7 +116,7 @@ int zero (void) { return 0; }
fi
fi
ac_compile="$save_ac_compile"
- rm -f conftest1.$ac_objext conftest2.$ac_objext conftest$ac_exeext
+ rm -f conftest[12].c conftest[12].$ac_objext conftest$ac_exeext
])
if test $gl_cv_header_wchar_h_correct_inline = no; then
AC_MSG_ERROR([<wchar.h> cannot be used with this compiler ($CC $CFLAGS $CPPFLAGS).
diff --git a/m4/wcrtomb.m4 b/m4/wcrtomb.m4
index c4e4463..e71c57a 100644
--- a/m4/wcrtomb.m4
+++ b/m4/wcrtomb.m4
@@ -1,4 +1,4 @@
-# wcrtomb.m4 serial 12
+# wcrtomb.m4 serial 13
dnl Copyright (C) 2008-2018 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
@@ -34,8 +34,8 @@ AC_DEFUN([gl_FUNC_WCRTOMB],
if test $REPLACE_MBSTATE_T = 1; then
REPLACE_WCRTOMB=1
else
- dnl On AIX 4.3, OSF/1 5.1 and Solaris 10, wcrtomb (NULL, 0, NULL) sometimes
- dnl returns 0 instead of 1.
+ dnl On AIX 4.3, OSF/1 5.1 and Solaris <= 11.3, wcrtomb (NULL, 0, NULL)
+ dnl sometimes returns 0 instead of 1.
AC_REQUIRE([AC_PROG_CC])
AC_REQUIRE([gt_LOCALE_FR])
AC_REQUIRE([gt_LOCALE_FR_UTF8])
diff --git a/maint.mk b/maint.mk
index 508c2f7..4889eba 100644
--- a/maint.mk
+++ b/maint.mk
@@ -572,7 +572,7 @@ 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)
+ @h='same.h' re='\<same_name(at)? *\(' $(_sc_header_without_use)
sc_prohibit_hash_pjw_without_use:
@h='hash-pjw.h' \
diff --git a/po/af.gmo b/po/af.gmo
index cc6b6ce..fb4b5d1 100644
--- a/po/af.gmo
+++ b/po/af.gmo
Binary files differ
diff --git a/po/af.po b/po/af.po
index 94e94b4..821be88 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: 2018-03-31 18:40-0700\n"
+"POT-Creation-Date: 2018-12-20 22:03-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"
@@ -27,42 +27,42 @@ msgstr ""
msgid "preserving permissions for %s"
msgstr ""
-#: lib/dfa.c:958
+#: lib/dfa.c:970
msgid "unbalanced ["
msgstr ""
-#: lib/dfa.c:1079
+#: lib/dfa.c:1091
#, fuzzy
msgid "invalid character class"
msgstr "Ongeldige karakterklasnaam"
-#: lib/dfa.c:1205
+#: lib/dfa.c:1217
msgid "character class syntax is [[:space:]], not [:space:]"
msgstr ""
-#: lib/dfa.c:1272
+#: lib/dfa.c:1284
msgid "unfinished \\ escape"
msgstr ""
-#: lib/dfa.c:1433
+#: lib/dfa.c:1445
#, fuzzy
msgid "invalid content of \\{\\}"
msgstr "Ongeldige inhoud binne \\{\\}"
-#: lib/dfa.c:1436
+#: lib/dfa.c:1448
#, fuzzy
msgid "regular expression too big"
msgstr "Regex te groot"
-#: lib/dfa.c:1850
+#: lib/dfa.c:1863
msgid "unbalanced ("
msgstr ""
-#: lib/dfa.c:1968
+#: lib/dfa.c:1981
msgid "no syntax specified"
msgstr ""
-#: lib/dfa.c:1976
+#: lib/dfa.c:1992
msgid "unbalanced )"
msgstr ""
@@ -208,7 +208,7 @@ msgstr "Regex te groot"
msgid "Unmatched ) or \\)"
msgstr "Ongepaarde ) of \\)"
-#: lib/regcomp.c:689
+#: lib/regcomp.c:688
msgid "No previous regular expression"
msgstr "Geen vorige regex nie"
@@ -217,12 +217,12 @@ msgstr "Geen vorige regex nie"
msgid "setting permissions for %s"
msgstr ""
-#: lib/version-etc.c:74
+#: lib/version-etc.c:73
#, c-format
msgid "Packaged by %s (%s)\n"
msgstr ""
-#: lib/version-etc.c:77
+#: lib/version-etc.c:76
#, c-format
msgid "Packaged by %s\n"
msgstr ""
@@ -230,11 +230,11 @@ 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
+#: lib/version-etc.c:83
msgid "(C)"
msgstr ""
-#: lib/version-etc.c:86
+#: lib/version-etc.c:85
msgid ""
"\n"
"License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl."
@@ -423,216 +423,227 @@ msgstr "Vermiste instruksie"
msgid "command only uses one address"
msgstr "Instruksie gebruik slegs een adres"
-#: sed/compile.c:164
+#: sed/compile.c:165
#, fuzzy
msgid "unterminated address regex"
msgstr "Ongetermineerde adresregex"
-#: sed/compile.c:165
+#: sed/compile.c:166
#, fuzzy
msgid "unterminated `s' command"
msgstr "Ongetermineerde `s' instruksie"
-#: sed/compile.c:166
+#: sed/compile.c:167
#, fuzzy
msgid "unterminated `y' command"
msgstr "Ongetermineerde `y' instruksie"
-#: sed/compile.c:167
+#: sed/compile.c:168
#, fuzzy
msgid "unknown option to `s'"
msgstr "Onbekende opsie vir `s'"
-#: sed/compile.c:169
+#: sed/compile.c:170
msgid "multiple `p' options to `s' command"
msgstr "meervoudige `p' opsies vir `s' instruksie"
-#: sed/compile.c:171
+#: sed/compile.c:172
msgid "multiple `g' options to `s' command"
msgstr "meervoudige `g' opsies vir `s' instruksie"
-#: sed/compile.c:173
+#: sed/compile.c:174
msgid "multiple number options to `s' command"
msgstr "meervoudige nommeropsies vir `s' instruksie"
-#: sed/compile.c:175
+#: sed/compile.c:176
msgid "number option to `s' command may not be zero"
msgstr "nommeropsie vir `s' instruksie mag nie nul wees nie"
-#: sed/compile.c:177
+#: sed/compile.c:178
#, fuzzy
msgid "strings for `y' command are different lengths"
msgstr "stringe vir y-instruksie het verskillende lengtes"
-#: sed/compile.c:179
+#: sed/compile.c:180
msgid "delimiter character is not a single-byte character"
msgstr ""
-#: sed/compile.c:181
+#: sed/compile.c:182
msgid "expected newer version of sed"
msgstr "het nuwer sed-weergawe verwag"
-#: sed/compile.c:183
+#: sed/compile.c:184
#, fuzzy
msgid "invalid usage of line address 0"
msgstr "Instruksie gebruik slegs een adres"
-#: sed/compile.c:184
+#: sed/compile.c:185
#, fuzzy, c-format
msgid "unknown command: `%c'"
msgstr "Onbekende instruksie:"
-#: sed/compile.c:186
+#: sed/compile.c:187
#, fuzzy
msgid "incomplete command"
msgstr "Vermiste instruksie"
-#: sed/compile.c:188
+#: sed/compile.c:189
msgid "\":\" lacks a label"
msgstr ""
-#: sed/compile.c:190
+#: sed/compile.c:191
msgid "recursive escaping after \\c not allowed"
msgstr ""
-#: sed/compile.c:213
+#: sed/compile.c:193
+msgid "e/r/w commands disabled in sandbox mode"
+msgstr ""
+
+#: sed/compile.c:215
#, c-format
msgid "%s: file %s line %lu: %s\n"
msgstr "%s: lêer %s lyn %lu: %s\n"
-#: sed/compile.c:216
+#: sed/compile.c:218
#, c-format
msgid "%s: -e expression #%lu, char %lu: %s\n"
msgstr "%s: -e uitdrukking #%lu, karakter %lu: %s\n"
-#: sed/compile.c:1644
+#: sed/compile.c:1607
#, 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:254 sed/execute.c:271
+#: sed/execute.c:253 sed/execute.c:270
#, c-format
msgid "case conversion produced an invalid character"
msgstr ""
-#: sed/execute.c:565
+#: sed/execute.c:561
#, c-format
msgid "%s: can't read %s: %s\n"
msgstr "%s: Kan nie %s lees nie: %s\n"
-#: sed/execute.c:590
+#: sed/execute.c:587
#, fuzzy, c-format
msgid "couldn't edit %s: is a terminal"
msgstr "kon nie %d item na %s skryf nie: %s"
-#: sed/execute.c:595
+#: sed/execute.c:592
#, c-format
msgid "couldn't edit %s: not a regular file"
msgstr ""
-#: sed/execute.c:606
+#: sed/execute.c:603
#, c-format
msgid "%s: warning: failed to set default file creation context to %s: %s"
msgstr ""
-#: sed/execute.c:614
+#: sed/execute.c:611
#, c-format
msgid "%s: warning: failed to get security context of %s: %s"
msgstr ""
-#: sed/execute.c:633 sed/utils.c:178
+#: sed/execute.c:630 sed/utils.c:188
#, fuzzy, c-format
msgid "couldn't open temporary file %s: %s"
msgstr "Kon nie tydelike lêer %s oopmaak nie: %s"
-#: sed/execute.c:1148 sed/execute.c:1358
+#: sed/execute.c:1167 sed/execute.c:1366
msgid "error in subprocess"
msgstr "fout in subproses"
-#: sed/execute.c:1150
+#: sed/execute.c:1169
msgid "option `e' not supported"
msgstr "opsie `e' word nie ondersteun nie"
-#: sed/execute.c:1339
+#: sed/execute.c:1347
msgid "`e' command not supported"
msgstr "`e' instruksie word nie ondersteun nie"
-#: sed/execute.c:1665
+#: sed/execute.c:1662
msgid "no input files"
msgstr ""
-#: sed/regexp.c:39
+#: sed/regexp.c:40
#, fuzzy
msgid "no previous regular expression"
msgstr "Geen vorige regex nie"
-#: sed/regexp.c:141
+#: sed/regexp.c:125
#, fuzzy, c-format
msgid "invalid reference \\%d on `s' command's RHS"
msgstr "Ongeldige regterhandsverwysing \\%d vir `s' instruksie"
-#: sed/regexp.c:259
+#: sed/regexp.c:196
msgid "regex input buffer length larger than INT_MAX"
msgstr ""
-#: sed/sed.c:35
+#: sed/sed.c:36
msgid "Jay Fenlason"
msgstr ""
-#: sed/sed.c:36
+#: sed/sed.c:37
msgid "Tom Lord"
msgstr ""
-#: sed/sed.c:37
+#: sed/sed.c:38
msgid "Ken Pizzini"
msgstr ""
-#: sed/sed.c:38
+#: sed/sed.c:39
msgid "Paolo Bonzini"
msgstr ""
-#: sed/sed.c:113
+#: sed/sed.c:40
+msgid "Jim Meyering"
+msgstr ""
+
+#: sed/sed.c:41
+msgid "Assaf Gordon"
+msgstr ""
+
+#: sed/sed.c:124
#, c-format
msgid ""
"GNU sed home page: <https://www.gnu.org/software/sed/>.\n"
"General help using GNU software: <https://www.gnu.org/gethelp/>.\n"
msgstr ""
-#: sed/sed.c:120
+#: sed/sed.c:130
#, c-format
msgid "E-mail bug reports to: <%s>.\n"
msgstr ""
-#: 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"
-" gebruik Perl 5 se regexsintaks in die skrip.\n"
-
-#: sed/sed.c:134
+#: sed/sed.c:138
#, c-format
msgid ""
"Usage: %s [OPTION]... {script-only-if-no-other-script} [input-file]...\n"
"\n"
msgstr ""
-#: sed/sed.c:138
+#: sed/sed.c:142
#, c-format
msgid ""
" -n, --quiet, --silent\n"
" suppress automatic printing of pattern space\n"
msgstr ""
-#: sed/sed.c:140
+#: sed/sed.c:144
+#, c-format
+msgid ""
+" --debug\n"
+" annotate program execution\n"
+msgstr ""
+
+#: sed/sed.c:146
#, c-format
msgid ""
" -e script, --expression=script\n"
" add the script to the commands to be executed\n"
msgstr ""
-#: sed/sed.c:142
+#: sed/sed.c:148
#, c-format
msgid ""
" -f script-file, --file=script-file\n"
@@ -640,21 +651,21 @@ msgid ""
"executed\n"
msgstr ""
-#: sed/sed.c:146
+#: sed/sed.c:152
#, c-format
msgid ""
" --follow-symlinks\n"
" follow symlinks when processing in place\n"
msgstr ""
-#: sed/sed.c:149
+#: sed/sed.c:155
#, c-format
msgid ""
" -i[SUFFIX], --in-place[=SUFFIX]\n"
" edit files in place (makes backup if SUFFIX supplied)\n"
msgstr ""
-#: sed/sed.c:153
+#: sed/sed.c:158
#, c-format
msgid ""
" -b, --binary\n"
@@ -662,21 +673,21 @@ msgid ""
"specially)\n"
msgstr ""
-#: sed/sed.c:157
+#: sed/sed.c:162
#, c-format
msgid ""
" -l N, --line-length=N\n"
" specify the desired line-wrap length for the `l' command\n"
msgstr ""
-#: sed/sed.c:159
+#: sed/sed.c:164
#, c-format
msgid ""
" --posix\n"
" disable all GNU extensions.\n"
msgstr ""
-#: sed/sed.c:161
+#: sed/sed.c:166
#, fuzzy, c-format
msgid ""
" -E, -r, --regexp-extended\n"
@@ -686,7 +697,7 @@ msgstr ""
" -R, --regexp-perl\n"
" gebruik Perl 5 se regexsintaks in die skrip.\n"
-#: sed/sed.c:167
+#: sed/sed.c:169
#, c-format
msgid ""
" -s, --separate\n"
@@ -694,14 +705,14 @@ msgid ""
" continuous long stream.\n"
msgstr ""
-#: sed/sed.c:170
+#: sed/sed.c:172
#, c-format
msgid ""
" --sandbox\n"
" operate in sandbox mode (disable e/r/w commands).\n"
msgstr ""
-#: sed/sed.c:172
+#: sed/sed.c:174
#, c-format
msgid ""
" -u, --unbuffered\n"
@@ -710,24 +721,24 @@ msgid ""
" the output buffers more often\n"
msgstr ""
-#: sed/sed.c:175
+#: sed/sed.c:177
#, c-format
msgid ""
" -z, --null-data\n"
" separate lines by NUL characters\n"
msgstr ""
-#: sed/sed.c:177
+#: sed/sed.c:179
#, c-format
msgid " --help display this help and exit\n"
msgstr ""
-#: sed/sed.c:178
+#: sed/sed.c:180
#, c-format
msgid " --version output version information and exit\n"
msgstr ""
-#: sed/sed.c:179
+#: sed/sed.c:181
#, c-format
msgid ""
"\n"
@@ -738,48 +749,68 @@ msgid ""
"\n"
msgstr ""
-#: sed/utils.c:73 sed/utils.c:384
+#: sed/sed.c:373
+msgid "failed to set binary mode on STDIN"
+msgstr ""
+
+#: sed/sed.c:375
+msgid "failed to set binary mode on STDOUT"
+msgstr ""
+
+#: sed/utils.c:77 sed/utils.c:395
#, fuzzy, c-format
msgid "cannot remove %s: %s"
msgstr "%s: Kan nie %s lees nie: %s\n"
-#: sed/utils.c:136
+#: sed/utils.c:146
#, fuzzy, c-format
msgid "couldn't open file %s: %s"
msgstr "Kon nie die lêer %s oopmaak nie: %s"
-#: sed/utils.c:155
+#: sed/utils.c:165
#, fuzzy, c-format
msgid "couldn't attach to %s: %s"
msgstr "kon nie %d item na %s skryf nie: %s"
#: sed/utils.c:192
+#, c-format
+msgid "failed to set binary mode on '%s'"
+msgstr ""
+
+#: sed/utils.c:207
#, 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:204 sed/utils.c:223
+#: sed/utils.c:219 sed/utils.c:238
#, c-format
msgid "read error on %s: %s"
msgstr "leesfout op %s: %s"
-#: sed/utils.c:325
+#: sed/utils.c:336
#, fuzzy, c-format
msgid "couldn't follow symlink %s: %s"
msgstr "Kon nie die lêer %s oopmaak nie: %s"
-#: sed/utils.c:359
+#: sed/utils.c:370
#, fuzzy, c-format
msgid "cannot stat %s: %s"
msgstr "%s: Kan nie %s lees nie: %s\n"
-#: sed/utils.c:389
+#: sed/utils.c:400
#, fuzzy, c-format
msgid "cannot rename %s: %s"
msgstr "%s: Kan nie %s lees nie: %s\n"
+#~ msgid ""
+#~ " -R, --regexp-perl\n"
+#~ " use Perl 5's regular expressions syntax in the script.\n"
+#~ msgstr ""
+#~ " -R, --regexp-perl\n"
+#~ " gebruik Perl 5 se regexsintaks in die skrip.\n"
+
#~ msgid "Called savchar() with unexpected pushback (%x)"
#~ msgstr "Het savchar() met onverwagte agterstoot (%x) geroep"
diff --git a/po/ast.gmo b/po/ast.gmo
index 29880d5..dc2c614 100644
--- a/po/ast.gmo
+++ b/po/ast.gmo
Binary files differ
diff --git a/po/ast.po b/po/ast.po
index 9f17140..225d9bd 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: 2018-03-31 18:40-0700\n"
+"POT-Creation-Date: 2018-12-20 22:03-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"
@@ -27,42 +27,42 @@ msgstr ""
msgid "preserving permissions for %s"
msgstr ""
-#: lib/dfa.c:958
+#: lib/dfa.c:970
msgid "unbalanced ["
msgstr ""
-#: lib/dfa.c:1079
+#: lib/dfa.c:1091
#, fuzzy
msgid "invalid character class"
msgstr "Caruter de nome de clase invlidu"
-#: lib/dfa.c:1205
+#: lib/dfa.c:1217
msgid "character class syntax is [[:space:]], not [:space:]"
msgstr ""
-#: lib/dfa.c:1272
+#: lib/dfa.c:1284
msgid "unfinished \\ escape"
msgstr ""
-#: lib/dfa.c:1433
+#: lib/dfa.c:1445
#, fuzzy
msgid "invalid content of \\{\\}"
msgstr "Contenu invlidu de \\{\\}"
-#: lib/dfa.c:1436
+#: lib/dfa.c:1448
#, fuzzy
msgid "regular expression too big"
msgstr "Espresin regular enforma grande"
-#: lib/dfa.c:1850
+#: lib/dfa.c:1863
msgid "unbalanced ("
msgstr ""
-#: lib/dfa.c:1968
+#: lib/dfa.c:1981
msgid "no syntax specified"
msgstr ""
-#: lib/dfa.c:1976
+#: lib/dfa.c:1992
msgid "unbalanced )"
msgstr ""
@@ -208,7 +208,7 @@ msgstr "Espresin regular enforma grande"
msgid "Unmatched ) or \\)"
msgstr ") O \\) ensin pareya"
-#: lib/regcomp.c:689
+#: lib/regcomp.c:688
msgid "No previous regular expression"
msgstr "Nun hai una espresin regular previa"
@@ -217,12 +217,12 @@ msgstr "Nun hai una espresin regular previa"
msgid "setting permissions for %s"
msgstr ""
-#: lib/version-etc.c:74
+#: lib/version-etc.c:73
#, c-format
msgid "Packaged by %s (%s)\n"
msgstr ""
-#: lib/version-etc.c:77
+#: lib/version-etc.c:76
#, c-format
msgid "Packaged by %s\n"
msgstr ""
@@ -230,11 +230,11 @@ 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
+#: lib/version-etc.c:83
msgid "(C)"
msgstr ""
-#: lib/version-etc.c:86
+#: lib/version-etc.c:85
msgid ""
"\n"
"License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl."
@@ -413,189 +413,192 @@ msgstr "orde que falta"
msgid "command only uses one address"
msgstr "la orde solamente usa una direicin"
-#: sed/compile.c:164
+#: sed/compile.c:165
msgid "unterminated address regex"
msgstr "direicinn de espresin regular ensin finar"
-#: sed/compile.c:165
+#: sed/compile.c:166
msgid "unterminated `s' command"
msgstr "orde `s' ensin finar"
-#: sed/compile.c:166
+#: sed/compile.c:167
msgid "unterminated `y' command"
msgstr "orde `y' ensin finar"
-#: sed/compile.c:167
+#: sed/compile.c:168
msgid "unknown option to `s'"
msgstr "opcin desconocida pa `s'"
-#: sed/compile.c:169
+#: sed/compile.c:170
msgid "multiple `p' options to `s' command"
msgstr "mltiples opciones `p' pa la orde `s'"
-#: sed/compile.c:171
+#: sed/compile.c:172
msgid "multiple `g' options to `s' command"
msgstr "mltiples opciones `g' pa la orde `s'"
-#: sed/compile.c:173
+#: sed/compile.c:174
msgid "multiple number options to `s' command"
msgstr "mltiples opciones numriques pa la orde `s'"
-#: sed/compile.c:175
+#: sed/compile.c:176
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:177
+#: sed/compile.c:178
msgid "strings for `y' command are different lengths"
msgstr "les cadenes pa la orde `y' son de llargores estremaos"
-#: sed/compile.c:179
+#: sed/compile.c:180
msgid "delimiter character is not a single-byte character"
msgstr "el caruter llendador nun ye un caruter d'un solu byte"
-#: sed/compile.c:181
+#: sed/compile.c:182
msgid "expected newer version of sed"
msgstr "esperbase una versin ms reciente de sed"
-#: sed/compile.c:183
+#: sed/compile.c:184
msgid "invalid usage of line address 0"
msgstr "usu invlidu de la direicin de llinia 0"
-#: sed/compile.c:184
+#: sed/compile.c:185
#, c-format
msgid "unknown command: `%c'"
msgstr "orde desconocida: `%c'"
-#: sed/compile.c:186
+#: sed/compile.c:187
#, fuzzy
msgid "incomplete command"
msgstr "orde que falta"
-#: sed/compile.c:188
+#: sed/compile.c:189
msgid "\":\" lacks a label"
msgstr ""
-#: sed/compile.c:190
+#: sed/compile.c:191
msgid "recursive escaping after \\c not allowed"
msgstr ""
-#: sed/compile.c:213
+#: sed/compile.c:193
+msgid "e/r/w commands disabled in sandbox mode"
+msgstr ""
+
+#: sed/compile.c:215
#, c-format
msgid "%s: file %s line %lu: %s\n"
msgstr "%s: ficheru %s llinia %lu: %s\n"
-#: sed/compile.c:216
+#: sed/compile.c:218
#, c-format
msgid "%s: -e expression #%lu, char %lu: %s\n"
msgstr "%s: -e espresin #%lu, caruter %lu: %s\n"
-#: sed/compile.c:1644
+#: sed/compile.c:1607
#, 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:254 sed/execute.c:271
+#: sed/execute.c:253 sed/execute.c:270
#, c-format
msgid "case conversion produced an invalid character"
msgstr ""
-#: sed/execute.c:565
+#: sed/execute.c:561
#, c-format
msgid "%s: can't read %s: %s\n"
msgstr "%s: nun se puede lleer %s: %s\n"
-#: sed/execute.c:590
+#: sed/execute.c:587
#, c-format
msgid "couldn't edit %s: is a terminal"
msgstr "nun se puede editar %s: ye una terminal"
-#: sed/execute.c:595
+#: sed/execute.c:592
#, 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:606
+#: sed/execute.c:603
#, c-format
msgid "%s: warning: failed to set default file creation context to %s: %s"
msgstr ""
-#: sed/execute.c:614
+#: sed/execute.c:611
#, c-format
msgid "%s: warning: failed to get security context of %s: %s"
msgstr ""
-#: sed/execute.c:633 sed/utils.c:178
+#: sed/execute.c:630 sed/utils.c:188
#, c-format
msgid "couldn't open temporary file %s: %s"
msgstr "nun se puede abrir el ficheru temporal %s: %s"
-#: sed/execute.c:1148 sed/execute.c:1358
+#: sed/execute.c:1167 sed/execute.c:1366
msgid "error in subprocess"
msgstr "fallu nel subprocesu"
-#: sed/execute.c:1150
+#: sed/execute.c:1169
msgid "option `e' not supported"
msgstr "nun hai sofitu pa la opcin `e'"
-#: sed/execute.c:1339
+#: sed/execute.c:1347
msgid "`e' command not supported"
msgstr "nun hai sofitu pa la orde `e'"
-#: sed/execute.c:1665
+#: sed/execute.c:1662
msgid "no input files"
msgstr "nun hai ficheros d'entrada"
-#: sed/regexp.c:39
+#: sed/regexp.c:40
msgid "no previous regular expression"
msgstr "nun hai una espresin regular previa"
-#: sed/regexp.c:141
+#: sed/regexp.c:125
#, c-format
msgid "invalid reference \\%d on `s' command's RHS"
msgstr "referencia \\%d invlida nel llau drechu de la orde `s'"
-#: sed/regexp.c:259
+#: sed/regexp.c:196
msgid "regex input buffer length larger than INT_MAX"
msgstr ""
-#: sed/sed.c:35
+#: sed/sed.c:36
msgid "Jay Fenlason"
msgstr ""
-#: sed/sed.c:36
+#: sed/sed.c:37
msgid "Tom Lord"
msgstr ""
-#: sed/sed.c:37
+#: sed/sed.c:38
msgid "Ken Pizzini"
msgstr ""
-#: sed/sed.c:38
+#: sed/sed.c:39
msgid "Paolo Bonzini"
msgstr ""
-#: sed/sed.c:113
+#: sed/sed.c:40
+msgid "Jim Meyering"
+msgstr ""
+
+#: sed/sed.c:41
+msgid "Assaf Gordon"
+msgstr ""
+
+#: sed/sed.c:124
#, c-format
msgid ""
"GNU sed home page: <https://www.gnu.org/software/sed/>.\n"
"General help using GNU software: <https://www.gnu.org/gethelp/>.\n"
msgstr ""
-#: sed/sed.c:120
+#: sed/sed.c:130
#, c-format
msgid "E-mail bug reports to: <%s>.\n"
msgstr ""
-#: 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"
-" usa la sintaxis d'espresiones regulares de Perl 5\n"
-" nel guin.\n"
-
-#: sed/sed.c:134
+#: sed/sed.c:138
#, c-format
msgid ""
"Usage: %s [OPTION]... {script-only-if-no-other-script} [input-file]...\n"
@@ -605,7 +608,7 @@ msgstr ""
"entrada]...\n"
"\n"
-#: sed/sed.c:138
+#: sed/sed.c:142
#, c-format
msgid ""
" -n, --quiet, --silent\n"
@@ -614,7 +617,16 @@ msgstr ""
" -n, --quiet, --silent\n"
" desanicia l'amuesa automtica del espaciu de patrones\n"
-#: sed/sed.c:140
+#: sed/sed.c:144
+#, fuzzy, c-format
+msgid ""
+" --debug\n"
+" annotate program execution\n"
+msgstr ""
+" --posix\n"
+" desactiva toles estensiones de GNU.\n"
+
+#: sed/sed.c:146
#, c-format
msgid ""
" -e script, --expression=script\n"
@@ -623,7 +635,7 @@ msgstr ""
" -e guin, --expression=guin\n"
" agrega el guin a la llista d'rdenes pa executar\n"
-#: sed/sed.c:142
+#: sed/sed.c:148
#, c-format
msgid ""
" -f script-file, --file=script-file\n"
@@ -634,7 +646,7 @@ msgstr ""
" amiesta'l contenu del ficheru guin a la llista d'rdenes\n"
" pa executar\n"
-#: sed/sed.c:146
+#: sed/sed.c:152
#, c-format
msgid ""
" --follow-symlinks\n"
@@ -643,7 +655,7 @@ msgstr ""
" --follow-symlinks\n"
" sigue los enllaces simblicos al procesar nel llugar\n"
-#: sed/sed.c:149
+#: sed/sed.c:155
#, fuzzy, c-format
msgid ""
" -i[SUFFIX], --in-place[=SUFFIX]\n"
@@ -653,7 +665,7 @@ msgstr ""
" edita ficheros nel llugar (cria un respaldu si se da\n"
" una estensin)\n"
-#: sed/sed.c:153
+#: sed/sed.c:158
#, c-format
msgid ""
" -b, --binary\n"
@@ -664,7 +676,7 @@ msgstr ""
" abre ficheros en mou binariu (los RC+FLs nun se procesen\n"
" especialmente)\n"
-#: sed/sed.c:157
+#: sed/sed.c:162
#, c-format
msgid ""
" -l N, --line-length=N\n"
@@ -674,7 +686,7 @@ msgstr ""
" especifica'l llargor de corte de llinia que te pete pa\n"
" la orde `l'\n"
-#: sed/sed.c:159
+#: sed/sed.c:164
#, c-format
msgid ""
" --posix\n"
@@ -683,7 +695,7 @@ msgstr ""
" --posix\n"
" desactiva toles estensiones de GNU.\n"
-#: sed/sed.c:161
+#: sed/sed.c:166
#, fuzzy, c-format
msgid ""
" -E, -r, --regexp-extended\n"
@@ -693,7 +705,7 @@ msgstr ""
" -r, --regexp-extended\n"
" usa espresiones regulares extendes nel guin.\n"
-#: sed/sed.c:167
+#: sed/sed.c:169
#, fuzzy, c-format
msgid ""
" -s, --separate\n"
@@ -704,14 +716,14 @@ msgstr ""
" considera los ficheros como separtaos en vez d'un solu\n"
" fluxu, llargu y continuu.\n"
-#: sed/sed.c:170
+#: sed/sed.c:172
#, c-format
msgid ""
" --sandbox\n"
" operate in sandbox mode (disable e/r/w commands).\n"
msgstr ""
-#: sed/sed.c:172
+#: sed/sed.c:174
#, c-format
msgid ""
" -u, --unbuffered\n"
@@ -724,24 +736,24 @@ msgstr ""
" y vacia los almacenamientos temporales de salida con ms\n"
" frecuencia\n"
-#: sed/sed.c:175
+#: sed/sed.c:177
#, c-format
msgid ""
" -z, --null-data\n"
" separate lines by NUL characters\n"
msgstr ""
-#: sed/sed.c:177
+#: sed/sed.c:179
#, c-format
msgid " --help display this help and exit\n"
msgstr " --help amuesa esta aida y termina\n"
-#: sed/sed.c:178
+#: sed/sed.c:180
#, c-format
msgid " --version output version information and exit\n"
msgstr " --version amuesa la informacin de la versin y termina\n"
-#: sed/sed.c:179
+#: sed/sed.c:181
#, c-format
msgid ""
"\n"
@@ -759,50 +771,71 @@ msgstr ""
"la entrada estndard.\n"
"\n"
-#: sed/utils.c:73 sed/utils.c:384
+#: sed/sed.c:373
+msgid "failed to set binary mode on STDIN"
+msgstr ""
+
+#: sed/sed.c:375
+msgid "failed to set binary mode on STDOUT"
+msgstr ""
+
+#: sed/utils.c:77 sed/utils.c:395
#, c-format
msgid "cannot remove %s: %s"
msgstr "nun se puede desaniciar %s: %s"
-#: sed/utils.c:136
+#: sed/utils.c:146
#, 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:155
+#: sed/utils.c:165
#, c-format
msgid "couldn't attach to %s: %s"
msgstr "nun se puede coneutar a %s: %s"
#: sed/utils.c:192
+#, c-format
+msgid "failed to set binary mode on '%s'"
+msgstr ""
+
+#: sed/utils.c:207
#, 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:204 sed/utils.c:223
+#: sed/utils.c:219 sed/utils.c:238
#, c-format
msgid "read error on %s: %s"
msgstr "fallu al lleer de %s: %s"
-#: sed/utils.c:325
+#: sed/utils.c:336
#, c-format
msgid "couldn't follow symlink %s: %s"
msgstr "nun se puede siguir l'enllaz simblicu %s: %s"
-#: sed/utils.c:359
+#: sed/utils.c:370
#, c-format
msgid "cannot stat %s: %s"
msgstr "nun se puede obtener la informacin de stat de %s: %s"
-#: sed/utils.c:389
+#: sed/utils.c:400
#, c-format
msgid "cannot rename %s: %s"
msgstr "nun se puede renomar %s: %s"
+#~ msgid ""
+#~ " -R, --regexp-perl\n"
+#~ " use Perl 5's regular expressions syntax in the script.\n"
+#~ msgstr ""
+#~ " -R, --regexp-perl\n"
+#~ " usa la sintaxis d'espresiones regulares de Perl 5\n"
+#~ " nel guin.\n"
+
#~ msgid "cannot specify modifiers on empty regexp"
#~ msgstr ""
#~ "nun se pueden especificar modificadores n'espresiones regulares baleres"
diff --git a/po/bg.gmo b/po/bg.gmo
index 4d4aa30..a79a969 100644
--- a/po/bg.gmo
+++ b/po/bg.gmo
Binary files differ
diff --git a/po/bg.po b/po/bg.po
index 6693558..4679643 100644
--- a/po/bg.po
+++ b/po/bg.po
@@ -4,10 +4,10 @@
# Alexander Shopov <ash@kambanaria.org>, 2016, 2018.
msgid ""
msgstr ""
-"Project-Id-Version: sed 4.4.104\n"
+"Project-Id-Version: sed 4.5.48\n"
"Report-Msgid-Bugs-To: bug-gnu-utils@gnu.org\n"
-"POT-Creation-Date: 2018-03-31 18:40-0700\n"
-"PO-Revision-Date: 2018-03-25 12:42+0200\n"
+"POT-Creation-Date: 2018-12-20 22:03-0800\n"
+"PO-Revision-Date: 2018-12-14 15:34+0100\n"
"Last-Translator: Alexander Shopov <ash@kambanaria.org>\n"
"Language-Team: Bulgarian <dict@ludost.net>\n"
"Language: bg\n"
@@ -26,39 +26,39 @@ msgstr "грешка при запис"
msgid "preserving permissions for %s"
msgstr "запазване на правата за „%s“"
-#: lib/dfa.c:958
+#: lib/dfa.c:970
msgid "unbalanced ["
msgstr "„[“ без еш"
-#: lib/dfa.c:1079
+#: lib/dfa.c:1091
msgid "invalid character class"
msgstr "неправилен клас знаци"
-#: lib/dfa.c:1205
+#: lib/dfa.c:1217
msgid "character class syntax is [[:space:]], not [:space:]"
msgstr "клас знаци се указва чрез „[[:ИМЕ:]]“, а не „[:ИМЕ:]“"
-#: lib/dfa.c:1272
+#: lib/dfa.c:1284
msgid "unfinished \\ escape"
msgstr "незавършена екранираща последователност чрез „\\“"
-#: lib/dfa.c:1433
+#: lib/dfa.c:1445
msgid "invalid content of \\{\\}"
msgstr "неправилно съдържание в „\\{\\}“"
-#: lib/dfa.c:1436
+#: lib/dfa.c:1448
msgid "regular expression too big"
msgstr "прекалено голям регулярен израз"
-#: lib/dfa.c:1850
+#: lib/dfa.c:1863
msgid "unbalanced ("
msgstr "„(“ без еш"
-#: lib/dfa.c:1968
+#: lib/dfa.c:1981
msgid "no syntax specified"
msgstr "не е зададен синтаксис"
-#: lib/dfa.c:1976
+#: lib/dfa.c:1992
msgid "unbalanced )"
msgstr "„)“ без еш"
@@ -202,7 +202,7 @@ msgstr "Регулярният израз е прекалено голям"
msgid "Unmatched ) or \\)"
msgstr "„)“ или „\\)“ без еш"
-#: lib/regcomp.c:689
+#: lib/regcomp.c:688
msgid "No previous regular expression"
msgstr "Няма предхождащ регулярен израз"
@@ -211,12 +211,12 @@ msgstr "Няма предхождащ регулярен израз"
msgid "setting permissions for %s"
msgstr "задаване на права на „%s“"
-#: lib/version-etc.c:74
+#: lib/version-etc.c:73
#, c-format
msgid "Packaged by %s (%s)\n"
msgstr "Пакетирано от %s (%s)\n"
-#: lib/version-etc.c:77
+#: lib/version-etc.c:76
#, c-format
msgid "Packaged by %s\n"
msgstr "Пакетирано от %s\n"
@@ -224,11 +224,11 @@ 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
+#: lib/version-etc.c:83
msgid "(C)"
msgstr "©"
-#: lib/version-etc.c:86
+#: lib/version-etc.c:85
msgid ""
"\n"
"License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl."
@@ -436,170 +436,182 @@ msgstr "липсва команда"
msgid "command only uses one address"
msgstr "командата приема само един адрес"
-#: sed/compile.c:164
+#: sed/compile.c:165
msgid "unterminated address regex"
msgstr "незавършен регулярен израз за адрес"
-#: sed/compile.c:165
+#: sed/compile.c:166
msgid "unterminated `s' command"
msgstr "незавършена команда „s“"
-#: sed/compile.c:166
+#: sed/compile.c:167
msgid "unterminated `y' command"
msgstr "незавършена команда „y“"
-#: sed/compile.c:167
+#: sed/compile.c:168
msgid "unknown option to `s'"
msgstr "непозната опция за командата „s“"
-#: sed/compile.c:169
+#: sed/compile.c:170
msgid "multiple `p' options to `s' command"
msgstr "множество опции „p“ за командата „s“"
-#: sed/compile.c:171
+#: sed/compile.c:172
msgid "multiple `g' options to `s' command"
msgstr "множество опции „g“ за командата „s“"
-#: sed/compile.c:173
+#: sed/compile.c:174
msgid "multiple number options to `s' command"
msgstr "множество числови опции за командата „s“"
-#: sed/compile.c:175
+#: sed/compile.c:176
msgid "number option to `s' command may not be zero"
msgstr "числовата опция за командата „s“ не може да е 0"
-#: sed/compile.c:177
+#: sed/compile.c:178
msgid "strings for `y' command are different lengths"
msgstr "низовете за командата „y“ не трябва да са с различни дължини"
-#: sed/compile.c:179
+#: sed/compile.c:180
msgid "delimiter character is not a single-byte character"
msgstr "знакът за разделител трябва да е еднобайтов"
-#: sed/compile.c:181
+#: sed/compile.c:182
msgid "expected newer version of sed"
msgstr "нужна е по-нова версия на sed"
-#: sed/compile.c:183
+#: sed/compile.c:184
msgid "invalid usage of line address 0"
msgstr "адресът 0 е употребен неправилно"
-#: sed/compile.c:184
+#: sed/compile.c:185
#, c-format
msgid "unknown command: `%c'"
msgstr "непозната команда: „%c“"
-#: sed/compile.c:186
+#: sed/compile.c:187
msgid "incomplete command"
msgstr "непълна команда"
-#: sed/compile.c:188
+#: sed/compile.c:189
msgid "\":\" lacks a label"
msgstr "„:“ без етикет"
-#: sed/compile.c:190
+#: sed/compile.c:191
msgid "recursive escaping after \\c not allowed"
msgstr "рекурсивното екраниране след „\\c“ е забранено"
-#: sed/compile.c:213
+#: sed/compile.c:193
+msgid "e/r/w commands disabled in sandbox mode"
+msgstr "в безопасен режим командите „e“/„r“/„w“ са изключени"
+
+#: sed/compile.c:215
#, c-format
msgid "%s: file %s line %lu: %s\n"
msgstr "%s: файл „%s“, ред %lu: %s\n"
-#: sed/compile.c:216
+#: sed/compile.c:218
#, c-format
msgid "%s: -e expression #%lu, char %lu: %s\n"
msgstr "%s: -e израз №%lu, знак %lu: %s\n"
-#: sed/compile.c:1644
+#: sed/compile.c:1607
#, c-format
msgid "can't find label for jump to `%s'"
msgstr "етикетът „%s“, към който трябва да се премине, липсва"
-#: sed/execute.c:254 sed/execute.c:271
+#: sed/execute.c:253 sed/execute.c:270
#, c-format
msgid "case conversion produced an invalid character"
msgstr "смяната на регистъра доведе до неправилен знак"
-#: sed/execute.c:565
+#: sed/execute.c:561
#, c-format
msgid "%s: can't read %s: %s\n"
msgstr "%s: не може да се чете от „%s“: %s\n"
-#: sed/execute.c:590
+#: sed/execute.c:587
#, c-format
msgid "couldn't edit %s: is a terminal"
msgstr "„%s“ не може да се редактира, защото е терминал"
-#: sed/execute.c:595
+#: sed/execute.c:592
#, c-format
msgid "couldn't edit %s: not a regular file"
msgstr "„%s“ не може да се редактира, защото не е нормален файл"
-#: sed/execute.c:606
+#: sed/execute.c:603
#, c-format
msgid "%s: warning: failed to set default file creation context to %s: %s"
msgstr ""
"%s: ПРЕДУПРЕЖДЕНИЕ: на „%s“ не може да се зададе стандартният контекст при "
"създаване на файлове: %s"
-#: sed/execute.c:614
+#: sed/execute.c:611
#, c-format
msgid "%s: warning: failed to get security context of %s: %s"
msgstr ""
"%s: ПРЕДУПРЕЖДЕНИЕ: контекстът за сигурност на „%s“ не може да се получи: %s"
-#: sed/execute.c:633 sed/utils.c:178
+#: sed/execute.c:630 sed/utils.c:188
#, c-format
msgid "couldn't open temporary file %s: %s"
msgstr "временният файл „%s“ не може да се отвори: %s"
-#: sed/execute.c:1148 sed/execute.c:1358
+#: sed/execute.c:1167 sed/execute.c:1366
msgid "error in subprocess"
msgstr "грешка в подпроцеса"
-#: sed/execute.c:1150
+#: sed/execute.c:1169
msgid "option `e' not supported"
msgstr "опцията „e“ не се поддържа"
-#: sed/execute.c:1339
+#: sed/execute.c:1347
msgid "`e' command not supported"
msgstr "командата „e“ не се поддържа"
-#: sed/execute.c:1665
+#: sed/execute.c:1662
msgid "no input files"
msgstr "не са зададени входни файлове"
-#: sed/regexp.c:39
+#: sed/regexp.c:40
msgid "no previous regular expression"
msgstr "няма предишен регулярен израз"
-#: sed/regexp.c:141
+#: sed/regexp.c:125
#, c-format
msgid "invalid reference \\%d on `s' command's RHS"
msgstr "неправилен указател „\\%d“ в дясната страна на командата „s“"
-#: sed/regexp.c:259
+#: sed/regexp.c:196
msgid "regex input buffer length larger than INT_MAX"
msgstr "дължината на входния буфер за регулярния израз е повече от INT_MAX"
-#: sed/sed.c:35
+#: sed/sed.c:36
msgid "Jay Fenlason"
msgstr "Jay Fenlason"
-#: sed/sed.c:36
+#: sed/sed.c:37
msgid "Tom Lord"
msgstr "Tom Lord"
-#: sed/sed.c:37
+#: sed/sed.c:38
msgid "Ken Pizzini"
msgstr "Ken Pizzini"
-#: sed/sed.c:38
+#: sed/sed.c:39
msgid "Paolo Bonzini"
msgstr "Paolo Bonzini"
-#: sed/sed.c:113
+#: sed/sed.c:40
+msgid "Jim Meyering"
+msgstr "Jim Meyering"
+
+#: sed/sed.c:41
+msgid "Assaf Gordon"
+msgstr "Assaf Gordon"
+
+#: sed/sed.c:124
#, c-format
msgid ""
"GNU sed home page: <https://www.gnu.org/software/sed/>.\n"
@@ -609,20 +621,12 @@ msgstr ""
"Обща помощ за използването на софтуера от GNU: <http://www.gnu.org/gethelp/"
">.\n"
-#: sed/sed.c:120
+#: sed/sed.c:130
#, 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
+#: sed/sed.c:138
#, c-format
msgid ""
"Usage: %s [OPTION]... {script-only-if-no-other-script} [input-file]...\n"
@@ -631,7 +635,7 @@ msgstr ""
"Употреба: %s [ОПЦИЯ]… {СКРИПТ_АКО_НЕ_E_ЗАДАДЕН_ИНАЧЕ} [ВХОДЕН_ФАЙЛ]…\n"
"\n"
-#: sed/sed.c:138
+#: sed/sed.c:142
#, c-format
msgid ""
" -n, --quiet, --silent\n"
@@ -641,7 +645,16 @@ msgstr ""
" без автоматичното отпечатване на буфера за напасване на "
"шаблони\n"
-#: sed/sed.c:140
+#: sed/sed.c:144
+#, c-format
+msgid ""
+" --debug\n"
+" annotate program execution\n"
+msgstr ""
+" --debug\n"
+" подробна информация за изпълнението\n"
+
+#: sed/sed.c:146
#, c-format
msgid ""
" -e script, --expression=script\n"
@@ -650,7 +663,7 @@ msgstr ""
" -e СКРИПТ, --expression=СКРИПТ\n"
" добавяне на СКРИПТа към командите за изпълнение\n"
-#: sed/sed.c:142
+#: sed/sed.c:148
#, c-format
msgid ""
" -f script-file, --file=script-file\n"
@@ -662,7 +675,7 @@ msgstr ""
"командите\n"
" за изпълнение\n"
-#: sed/sed.c:146
+#: sed/sed.c:152
#, c-format
msgid ""
" --follow-symlinks\n"
@@ -671,7 +684,7 @@ msgstr ""
" --follow-symlinks\n"
" следване на символните връзки при обработката на място\n"
-#: sed/sed.c:149
+#: sed/sed.c:155
#, c-format
msgid ""
" -i[SUFFIX], --in-place[=SUFFIX]\n"
@@ -682,7 +695,7 @@ msgstr ""
"копие\n"
" с това РАЗШИРЕНИЕ, ако е зададено)\n"
-#: sed/sed.c:153
+#: sed/sed.c:158
#, c-format
msgid ""
" -b, --binary\n"
@@ -694,7 +707,7 @@ msgstr ""
"специално\n"
" значение)\n"
-#: sed/sed.c:157
+#: sed/sed.c:162
#, c-format
msgid ""
" -l N, --line-length=N\n"
@@ -704,7 +717,7 @@ msgstr ""
" желана дължина на реда, след която командата „l“ го "
"пренася\n"
-#: sed/sed.c:159
+#: sed/sed.c:164
#, c-format
msgid ""
" --posix\n"
@@ -713,7 +726,7 @@ msgstr ""
" --posix\n"
" изключване на всички разширения на GNU\n"
-#: sed/sed.c:161
+#: sed/sed.c:166
#, c-format
msgid ""
" -E, -r, --regexp-extended\n"
@@ -724,7 +737,7 @@ msgstr ""
" използване на разширени регулярни изрази в скриптовете\n"
" (за съвместимост с POSIX ползвайте „-E“)\n"
-#: sed/sed.c:167
+#: sed/sed.c:169
#, c-format
msgid ""
" -s, --separate\n"
@@ -735,16 +748,16 @@ msgstr ""
" обработка на файловете поотделно, а не като един обединен "
"поток\n"
-#: sed/sed.c:170
+#: sed/sed.c:172
#, c-format
msgid ""
" --sandbox\n"
" operate in sandbox mode (disable e/r/w commands).\n"
msgstr ""
" --sandbox\n"
-" безопасен режим (без командите „e“/„r“/„w“.\n"
+" безопасен режим (без командите „e“/„r“/„w“).\n"
-#: sed/sed.c:172
+#: sed/sed.c:174
#, c-format
msgid ""
" -u, --unbuffered\n"
@@ -756,7 +769,7 @@ msgstr ""
" зареждане на минимално количество входни данни и често\n"
" изчистване на буферите\n"
-#: sed/sed.c:175
+#: sed/sed.c:177
#, c-format
msgid ""
" -z, --null-data\n"
@@ -765,17 +778,17 @@ msgstr ""
" -z, --null-data\n"
" отделяне на редовете със знака NUL\n"
-#: sed/sed.c:177
+#: sed/sed.c:179
#, c-format
msgid " --help display this help and exit\n"
msgstr " --help извеждане на тази помощ и изход\n"
-#: sed/sed.c:178
+#: sed/sed.c:180
#, c-format
msgid " --version output version information and exit\n"
msgstr " --version извеждане на версията на GNU sed и изход\n"
-#: sed/sed.c:179
+#: sed/sed.c:181
#, c-format
msgid ""
"\n"
@@ -791,44 +804,57 @@ msgstr ""
"останали аргументи се третират като имена на входни файлове. Ако не са\n"
"зададени такива, се чете от стандартния вход.\n"
-#: sed/utils.c:73 sed/utils.c:384
+#: sed/sed.c:373
+msgid "failed to set binary mode on STDIN"
+msgstr "неуспешно задаване на двоичен режим за стандартния вход (STDIN)"
+
+#: sed/sed.c:375
+msgid "failed to set binary mode on STDOUT"
+msgstr "неуспешно задаване на двоичен режим за стандартния изход (STDOUT)"
+
+#: sed/utils.c:77 sed/utils.c:395
#, c-format
msgid "cannot remove %s: %s"
msgstr "„%s“ не може да се изтрие: %s"
-#: sed/utils.c:136
+#: sed/utils.c:146
#, c-format
msgid "couldn't open file %s: %s"
msgstr "файлът „%s“ не може да се отвори: %s"
-#: sed/utils.c:155
+#: sed/utils.c:165
#, c-format
msgid "couldn't attach to %s: %s"
msgstr "неуспешно свързване към „%s“: %s"
#: sed/utils.c:192
#, c-format
+msgid "failed to set binary mode on '%s'"
+msgstr "неуспешно задаване на двоичен режим за „%s“"
+
+#: sed/utils.c:207
+#, 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
+#: sed/utils.c:219 sed/utils.c:238
#, c-format
msgid "read error on %s: %s"
msgstr "грешка при четене на „%s“: %s"
-#: sed/utils.c:325
+#: sed/utils.c:336
#, c-format
msgid "couldn't follow symlink %s: %s"
msgstr "символната връзка „%s“ не може да се проследи: %s"
-#: sed/utils.c:359
+#: sed/utils.c:370
#, c-format
msgid "cannot stat %s: %s"
msgstr "не може да се получи информация за „%s“ чрез „stat“: %s"
-#: sed/utils.c:389
+#: sed/utils.c:400
#, c-format
msgid "cannot rename %s: %s"
msgstr "„%s“ не може да се преименува: %s"
diff --git a/po/ca.gmo b/po/ca.gmo
index 7c26b16..32a87c6 100644
--- a/po/ca.gmo
+++ b/po/ca.gmo
Binary files differ
diff --git a/po/ca.po b/po/ca.po
index 09a8882..bf45555 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: 2018-03-31 18:40-0700\n"
+"POT-Creation-Date: 2018-12-20 22:03-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"
@@ -27,42 +27,42 @@ msgstr ""
msgid "preserving permissions for %s"
msgstr ""
-#: lib/dfa.c:958
+#: lib/dfa.c:970
msgid "unbalanced ["
msgstr ""
-#: lib/dfa.c:1079
+#: lib/dfa.c:1091
#, fuzzy
msgid "invalid character class"
msgstr "Nom de classe de carcter no vlid"
-#: lib/dfa.c:1205
+#: lib/dfa.c:1217
msgid "character class syntax is [[:space:]], not [:space:]"
msgstr ""
-#: lib/dfa.c:1272
+#: lib/dfa.c:1284
msgid "unfinished \\ escape"
msgstr ""
-#: lib/dfa.c:1433
+#: lib/dfa.c:1445
#, fuzzy
msgid "invalid content of \\{\\}"
msgstr "El contingut de \\{\\} no s vlid"
-#: lib/dfa.c:1436
+#: lib/dfa.c:1448
#, fuzzy
msgid "regular expression too big"
msgstr "L'expressi regular s massa gran"
-#: lib/dfa.c:1850
+#: lib/dfa.c:1863
msgid "unbalanced ("
msgstr ""
-#: lib/dfa.c:1968
+#: lib/dfa.c:1981
msgid "no syntax specified"
msgstr ""
-#: lib/dfa.c:1976
+#: lib/dfa.c:1992
msgid "unbalanced )"
msgstr ""
@@ -208,7 +208,7 @@ msgstr "L'expressi regular s massa gran"
msgid "Unmatched ) or \\)"
msgstr ") o \\) no emparellat"
-#: lib/regcomp.c:689
+#: lib/regcomp.c:688
msgid "No previous regular expression"
msgstr "No hi ha una expressi regular prvia"
@@ -217,12 +217,12 @@ msgstr "No hi ha una expressi regular prvia"
msgid "setting permissions for %s"
msgstr ""
-#: lib/version-etc.c:74
+#: lib/version-etc.c:73
#, c-format
msgid "Packaged by %s (%s)\n"
msgstr ""
-#: lib/version-etc.c:77
+#: lib/version-etc.c:76
#, c-format
msgid "Packaged by %s\n"
msgstr ""
@@ -230,11 +230,11 @@ 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
+#: lib/version-etc.c:83
msgid "(C)"
msgstr ""
-#: lib/version-etc.c:86
+#: lib/version-etc.c:85
msgid ""
"\n"
"License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl."
@@ -416,170 +416,182 @@ msgstr "cal una ordre"
msgid "command only uses one address"
msgstr "l'ordre utilitza noms una adrea"
-#: sed/compile.c:164
+#: sed/compile.c:165
msgid "unterminated address regex"
msgstr "l'expressi regular d'adrea no est terminada"
-#: sed/compile.c:165
+#: sed/compile.c:166
msgid "unterminated `s' command"
msgstr "ordre s no terminada"
-#: sed/compile.c:166
+#: sed/compile.c:167
msgid "unterminated `y' command"
msgstr "ordre y no terminada"
-#: sed/compile.c:167
+#: sed/compile.c:168
msgid "unknown option to `s'"
msgstr "opci desconeguda per a s"
-#: sed/compile.c:169
+#: sed/compile.c:170
msgid "multiple `p' options to `s' command"
msgstr "mltiples opcions p per a l'ordre s"
-#: sed/compile.c:171
+#: sed/compile.c:172
msgid "multiple `g' options to `s' command"
msgstr "mltiples opcions g per a l'ordre s"
-#: sed/compile.c:173
+#: sed/compile.c:174
msgid "multiple number options to `s' command"
msgstr "mltiples opcions numriques per a l'ordre s"
-#: sed/compile.c:175
+#: sed/compile.c:176
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:177
+#: sed/compile.c:178
msgid "strings for `y' command are different lengths"
msgstr "les cadenes per a l'ordre y sn de longituds diferents"
-#: sed/compile.c:179
+#: sed/compile.c:180
msgid "delimiter character is not a single-byte character"
msgstr "el carcter delimitador no s un carcter d'un byte"
-#: sed/compile.c:181
+#: sed/compile.c:182
msgid "expected newer version of sed"
msgstr "s'esperava una versi ms nova de sed"
-#: sed/compile.c:183
+#: sed/compile.c:184
msgid "invalid usage of line address 0"
msgstr "s de l'adrea de lnia 0 invlid"
-#: sed/compile.c:184
+#: sed/compile.c:185
#, c-format
msgid "unknown command: `%c'"
msgstr "ordre desconeguda: %c"
-#: sed/compile.c:186
+#: sed/compile.c:187
#, fuzzy
msgid "incomplete command"
msgstr "cal una ordre"
-#: sed/compile.c:188
+#: sed/compile.c:189
msgid "\":\" lacks a label"
msgstr ""
-#: sed/compile.c:190
+#: sed/compile.c:191
msgid "recursive escaping after \\c not allowed"
msgstr ""
-#: sed/compile.c:213
+#: sed/compile.c:193
+msgid "e/r/w commands disabled in sandbox mode"
+msgstr ""
+
+#: sed/compile.c:215
#, c-format
msgid "%s: file %s line %lu: %s\n"
msgstr "%s: fitxer %s lnia %lu: %s\n"
-#: sed/compile.c:216
+#: sed/compile.c:218
#, c-format
msgid "%s: -e expression #%lu, char %lu: %s\n"
msgstr "%s: -e expressi #%lu, carcter %lu: %s\n"
-#: sed/compile.c:1644
+#: sed/compile.c:1607
#, 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:254 sed/execute.c:271
+#: sed/execute.c:253 sed/execute.c:270
#, c-format
msgid "case conversion produced an invalid character"
msgstr ""
-#: sed/execute.c:565
+#: sed/execute.c:561
#, c-format
msgid "%s: can't read %s: %s\n"
msgstr "%s: no es pot llegir %s: %s\n"
-#: sed/execute.c:590
+#: sed/execute.c:587
#, c-format
msgid "couldn't edit %s: is a terminal"
msgstr "no s'ha pogut editar %s: s un terminal"
-#: sed/execute.c:595
+#: sed/execute.c:592
#, 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:606
+#: sed/execute.c:603
#, 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:614
+#: sed/execute.c:611
#, 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:633 sed/utils.c:178
+#: sed/execute.c:630 sed/utils.c:188
#, c-format
msgid "couldn't open temporary file %s: %s"
msgstr "no s'ha pogut obrir el fitxer temporal %s: %s"
-#: sed/execute.c:1148 sed/execute.c:1358
+#: sed/execute.c:1167 sed/execute.c:1366
msgid "error in subprocess"
msgstr "s'ha produt un error en el subprocs"
-#: sed/execute.c:1150
+#: sed/execute.c:1169
msgid "option `e' not supported"
msgstr "l'opci e no est suportada"
-#: sed/execute.c:1339
+#: sed/execute.c:1347
msgid "`e' command not supported"
msgstr "l'ordre e no est suportada"
-#: sed/execute.c:1665
+#: sed/execute.c:1662
msgid "no input files"
msgstr "no hi ha fitxers d'entrada"
-#: sed/regexp.c:39
+#: sed/regexp.c:40
msgid "no previous regular expression"
msgstr "no hi ha una expressi regular prvia"
-#: sed/regexp.c:141
+#: sed/regexp.c:125
#, c-format
msgid "invalid reference \\%d on `s' command's RHS"
msgstr "referncia \\%d no vlida en el costat dret de l'ordre s"
-#: sed/regexp.c:259
+#: sed/regexp.c:196
msgid "regex input buffer length larger than INT_MAX"
msgstr ""
-#: sed/sed.c:35
+#: sed/sed.c:36
msgid "Jay Fenlason"
msgstr ""
-#: sed/sed.c:36
+#: sed/sed.c:37
msgid "Tom Lord"
msgstr ""
-#: sed/sed.c:37
+#: sed/sed.c:38
msgid "Ken Pizzini"
msgstr ""
-#: sed/sed.c:38
+#: sed/sed.c:39
msgid "Paolo Bonzini"
msgstr ""
-#: sed/sed.c:113
+#: sed/sed.c:40
+msgid "Jim Meyering"
+msgstr ""
+
+#: sed/sed.c:41
+msgid "Assaf Gordon"
+msgstr ""
+
+#: sed/sed.c:124
#, fuzzy, c-format
msgid ""
"GNU sed home page: <https://www.gnu.org/software/sed/>.\n"
@@ -588,21 +600,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:120
+#: sed/sed.c:130
#, c-format
msgid "E-mail bug reports to: <%s>.\n"
msgstr ""
-#: 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"
-" usa la sintaxi d'expressions regulars de Perl 5 en aquesta\n"
-" sequncia.\n"
-
-#: sed/sed.c:134
+#: sed/sed.c:138
#, c-format
msgid ""
"Usage: %s [OPTION]... {script-only-if-no-other-script} [input-file]...\n"
@@ -612,7 +615,7 @@ msgstr ""
" [fitxer-entrada]...\n"
"\n"
-#: sed/sed.c:138
+#: sed/sed.c:142
#, c-format
msgid ""
" -n, --quiet, --silent\n"
@@ -621,7 +624,16 @@ msgstr ""
" -n, --quiet, --silent\n"
" suprimeix la impressi automtica de l'espai de patrons\n"
-#: sed/sed.c:140
+#: sed/sed.c:144
+#, fuzzy, c-format
+msgid ""
+" --debug\n"
+" annotate program execution\n"
+msgstr ""
+" --posix\n"
+" inhabilita totes les extensions GNU.\n"
+
+#: sed/sed.c:146
#, c-format
msgid ""
" -e script, --expression=script\n"
@@ -630,7 +642,7 @@ msgstr ""
" -e script, --expression=script\n"
" afegeix el script a les ordres a executar\n"
-#: sed/sed.c:142
+#: sed/sed.c:148
#, c-format
msgid ""
" -f script-file, --file=script-file\n"
@@ -641,7 +653,7 @@ msgstr ""
" afegeix els continguts de fitxer-script a les ordres a "
"executar\n"
-#: sed/sed.c:146
+#: sed/sed.c:152
#, c-format
msgid ""
" --follow-symlinks\n"
@@ -651,7 +663,7 @@ msgstr ""
" segueix enllaos simblics quan s'editen els mateixos "
"fitxers\n"
-#: sed/sed.c:149
+#: sed/sed.c:155
#, fuzzy, c-format
msgid ""
" -i[SUFFIX], --in-place[=SUFFIX]\n"
@@ -661,7 +673,7 @@ msgstr ""
" edita els mateixos fitxers (fa cpia de seguretat si es\n"
" proveeix una extensi)\n"
-#: sed/sed.c:153
+#: sed/sed.c:158
#, c-format
msgid ""
" -b, --binary\n"
@@ -672,7 +684,7 @@ msgstr ""
" obre els fitxers en mode binari (no es processen els CR+LF\n"
" de manera especial)\n"
-#: sed/sed.c:157
+#: sed/sed.c:162
#, c-format
msgid ""
" -l N, --line-length=N\n"
@@ -682,7 +694,7 @@ msgstr ""
" especifica la longitud desitjada per a l'ajust de final de\n"
" lnia per a l'ordre l\n"
-#: sed/sed.c:159
+#: sed/sed.c:164
#, c-format
msgid ""
" --posix\n"
@@ -691,7 +703,7 @@ msgstr ""
" --posix\n"
" inhabilita totes les extensions GNU.\n"
-#: sed/sed.c:161
+#: sed/sed.c:166
#, fuzzy, c-format
msgid ""
" -E, -r, --regexp-extended\n"
@@ -701,7 +713,7 @@ msgstr ""
" -r, --regexp-extended\n"
" usa expressions regulars exteses en el script.\n"
-#: sed/sed.c:167
+#: sed/sed.c:169
#, fuzzy, c-format
msgid ""
" -s, --separate\n"
@@ -712,14 +724,14 @@ msgstr ""
" considera els fitxers com independents, en compte d'un\n"
" llarg flux continu.\n"
-#: sed/sed.c:170
+#: sed/sed.c:172
#, c-format
msgid ""
" --sandbox\n"
" operate in sandbox mode (disable e/r/w commands).\n"
msgstr ""
-#: sed/sed.c:172
+#: sed/sed.c:174
#, c-format
msgid ""
" -u, --unbuffered\n"
@@ -732,24 +744,24 @@ msgstr ""
"d'entrada\n"
" i buida els bfers d'eixida ms sovint\n"
-#: sed/sed.c:175
+#: sed/sed.c:177
#, c-format
msgid ""
" -z, --null-data\n"
" separate lines by NUL characters\n"
msgstr ""
-#: sed/sed.c:177
+#: sed/sed.c:179
#, c-format
msgid " --help display this help and exit\n"
msgstr " --help mostra aquest missatge d'ajuda i surt\n"
-#: sed/sed.c:178
+#: sed/sed.c:180
#, c-format
msgid " --version output version information and exit\n"
msgstr " --version mostra la informaci de la versi i surt\n"
-#: sed/sed.c:179
+#: sed/sed.c:181
#, c-format
msgid ""
"\n"
@@ -768,48 +780,70 @@ msgstr ""
"es llegeix l'entrada estndard.\n"
"\n"
-#: sed/utils.c:73 sed/utils.c:384
+#: sed/sed.c:373
+msgid "failed to set binary mode on STDIN"
+msgstr ""
+
+#: sed/sed.c:375
+msgid "failed to set binary mode on STDOUT"
+msgstr ""
+
+#: sed/utils.c:77 sed/utils.c:395
#, c-format
msgid "cannot remove %s: %s"
msgstr "no es pot eliminar %s: %s"
-#: sed/utils.c:136
+#: sed/utils.c:146
#, c-format
msgid "couldn't open file %s: %s"
msgstr "no s'ha pogut obrir el fitxer %s: %s"
-#: sed/utils.c:155
+#: sed/utils.c:165
#, c-format
msgid "couldn't attach to %s: %s"
msgstr "no s'ha pogut adjuntar a %s: %s"
#: sed/utils.c:192
+#, c-format
+msgid "failed to set binary mode on '%s'"
+msgstr ""
+
+#: sed/utils.c:207
#, 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:204 sed/utils.c:223
+#: sed/utils.c:219 sed/utils.c:238
#, c-format
msgid "read error on %s: %s"
msgstr "error de lectura en %s: %s"
-#: sed/utils.c:325
+#: sed/utils.c:336
#, c-format
msgid "couldn't follow symlink %s: %s"
msgstr "no s'ha pogut seguir l'enlla simblic %s: %s"
-#: sed/utils.c:359
+#: sed/utils.c:370
#, c-format
msgid "cannot stat %s: %s"
msgstr "no es pot fer stat de %s: %s"
-#: sed/utils.c:389
+#: sed/utils.c:400
#, c-format
msgid "cannot rename %s: %s"
msgstr "no es pot reanomenar %s: %s"
+#~ msgid ""
+#~ " -R, --regexp-perl\n"
+#~ " use Perl 5's regular expressions syntax in the script.\n"
+#~ msgstr ""
+#~ " -R, --regexp-perl\n"
+#~ " usa la sintaxi d'expressions regulars de Perl 5 en "
+#~ "aquesta\n"
+#~ " sequncia.\n"
+
#~ msgid "cannot specify modifiers on empty regexp"
#~ msgstr "no es poden especificar modificadors en expregs buides"
diff --git a/po/cs.gmo b/po/cs.gmo
index f40c733..47804c8 100644
--- a/po/cs.gmo
+++ b/po/cs.gmo
Binary files differ
diff --git a/po/cs.po b/po/cs.po
index f53fece..ab2e7e9 100644
--- a/po/cs.po
+++ b/po/cs.po
@@ -6,10 +6,10 @@
#
msgid ""
msgstr ""
-"Project-Id-Version: sed 4.4.104\n"
+"Project-Id-Version: sed 4.5.48\n"
"Report-Msgid-Bugs-To: bug-gnu-utils@gnu.org\n"
-"POT-Creation-Date: 2018-03-31 18:40-0700\n"
-"PO-Revision-Date: 2018-03-25 20:06+02:00\n"
+"POT-Creation-Date: 2018-12-20 22:03-0800\n"
+"PO-Revision-Date: 2018-12-13 21:23+01:00\n"
"Last-Translator: Petr Pisar <petr.pisar@atlas.cz>\n"
"Language-Team: Czech <translation-team-cs@lists.sourceforge.net>\n"
"Language: cs\n"
@@ -28,39 +28,39 @@ msgstr "chyba zápisu"
msgid "preserving permissions for %s"
msgstr "zachovávají se práva pro %s"
-#: lib/dfa.c:958
+#: lib/dfa.c:970
msgid "unbalanced ["
msgstr "nepárová ["
-#: lib/dfa.c:1079
+#: lib/dfa.c:1091
msgid "invalid character class"
msgstr "chybná třída znaků"
-#: lib/dfa.c:1205
+#: lib/dfa.c:1217
msgid "character class syntax is [[:space:]], not [:space:]"
msgstr "skladba pro třídu znaků je [[:space:]], nikoliv [:space:]"
-#: lib/dfa.c:1272
+#: lib/dfa.c:1284
msgid "unfinished \\ escape"
msgstr "neukončená posloupnost \\"
-#: lib/dfa.c:1433
+#: lib/dfa.c:1445
msgid "invalid content of \\{\\}"
msgstr "chybný obsah \\{\\}"
-#: lib/dfa.c:1436
+#: lib/dfa.c:1448
msgid "regular expression too big"
msgstr "regulární výraz je příliš velký"
-#: lib/dfa.c:1850
+#: lib/dfa.c:1863
msgid "unbalanced ("
msgstr "nepárová ("
-#: lib/dfa.c:1968
+#: lib/dfa.c:1981
msgid "no syntax specified"
msgstr "nezadána žádná skladba"
-#: lib/dfa.c:1976
+#: lib/dfa.c:1992
msgid "unbalanced )"
msgstr "nepárová )"
@@ -204,7 +204,7 @@ msgstr "Regulární výraz je příliš velký"
msgid "Unmatched ) or \\)"
msgstr "Neodpovídající ) nebo \\)"
-#: lib/regcomp.c:689
+#: lib/regcomp.c:688
msgid "No previous regular expression"
msgstr "Žádný předcházející regulární výraz"
@@ -213,12 +213,12 @@ msgstr "Žádný předcházející regulární výraz"
msgid "setting permissions for %s"
msgstr "nastavují se práva pro %s"
-#: lib/version-etc.c:74
+#: lib/version-etc.c:73
#, c-format
msgid "Packaged by %s (%s)\n"
msgstr "Zabalil(a) %s (%s)\n"
-#: lib/version-etc.c:77
+#: lib/version-etc.c:76
#, c-format
msgid "Packaged by %s\n"
msgstr "Zabalil(a) %s\n"
@@ -226,11 +226,11 @@ msgstr "Zabalil(a) %s\n"
#. TRANSLATORS: Translate "(C)" to the copyright symbol
#. (C-in-a-circle), if this symbol is available in the user's
#. locale. Otherwise, do not translate "(C)"; leave it as-is.
-#: lib/version-etc.c:84
+#: lib/version-etc.c:83
msgid "(C)"
msgstr "©"
-#: lib/version-etc.c:86
+#: lib/version-etc.c:85
msgid ""
"\n"
"License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl."
@@ -436,168 +436,180 @@ msgstr "chybějící příkaz"
msgid "command only uses one address"
msgstr "příkaz používá pouze jedinou adresu"
-#: sed/compile.c:164
+#: sed/compile.c:165
msgid "unterminated address regex"
msgstr "neukončená adresa regulárního výrazu"
-#: sed/compile.c:165
+#: sed/compile.c:166
msgid "unterminated `s' command"
msgstr "neukončený příkaz „s“"
-#: sed/compile.c:166
+#: sed/compile.c:167
msgid "unterminated `y' command"
msgstr "neukončený příkaz „y“"
-#: sed/compile.c:167
+#: sed/compile.c:168
msgid "unknown option to `s'"
msgstr "neznámý přepínač pro „s“"
-#: sed/compile.c:169
+#: sed/compile.c:170
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:171
+#: sed/compile.c:172
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:173
+#: sed/compile.c:174
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:175
+#: sed/compile.c:176
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:177
+#: sed/compile.c:178
msgid "strings for `y' command are different lengths"
msgstr "řetězce pro příkaz „y“ mají rozdílnou délku"
-#: sed/compile.c:179
+#: sed/compile.c:180
msgid "delimiter character is not a single-byte character"
msgstr "oddělovací znak není jednobajtovým znakem"
-#: sed/compile.c:181
+#: sed/compile.c:182
msgid "expected newer version of sed"
msgstr "očekávána nová verze sedu"
-#: sed/compile.c:183
+#: sed/compile.c:184
msgid "invalid usage of line address 0"
msgstr "chybné použití adresy řádku 0"
-#: sed/compile.c:184
+#: sed/compile.c:185
#, c-format
msgid "unknown command: `%c'"
msgstr "neznámý příkaz: „%c“"
-#: sed/compile.c:186
+#: sed/compile.c:187
msgid "incomplete command"
msgstr "neúplný příkaz"
-#: sed/compile.c:188
+#: sed/compile.c:189
msgid "\":\" lacks a label"
msgstr "„:“ postrádá jmenovku"
-#: sed/compile.c:190
+#: sed/compile.c:191
msgid "recursive escaping after \\c not allowed"
msgstr "rekurzivní escapování po \\c není dovoleno"
-#: sed/compile.c:213
+#: sed/compile.c:193
+msgid "e/r/w commands disabled in sandbox mode"
+msgstr "v režimu pískoviště jsou příkazy e/r/w zakázány"
+
+#: sed/compile.c:215
#, c-format
msgid "%s: file %s line %lu: %s\n"
msgstr "%s: soubor %s, řádek %'lu: %s\n"
-#: sed/compile.c:216
+#: sed/compile.c:218
#, c-format
msgid "%s: -e expression #%lu, char %lu: %s\n"
msgstr "%s: -e výraz č. %'lu, znak %'lu: %s\n"
-#: sed/compile.c:1644
+#: sed/compile.c:1607
#, 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:254 sed/execute.c:271
+#: sed/execute.c:253 sed/execute.c:270
#, c-format
msgid "case conversion produced an invalid character"
msgstr "převod velikosti písmene vytvořil neplatný znak"
-#: sed/execute.c:565
+#: sed/execute.c:561
#, c-format
msgid "%s: can't read %s: %s\n"
msgstr "%s: %s nelze číst: %s\n"
-#: sed/execute.c:590
+#: sed/execute.c:587
#, c-format
msgid "couldn't edit %s: is a terminal"
msgstr "%s nelze upravovat: je to terminál"
-#: sed/execute.c:595
+#: sed/execute.c:592
#, c-format
msgid "couldn't edit %s: not a regular file"
msgstr "%s nelze upravovat: není obyčejným souborem"
-#: sed/execute.c:606
+#: sed/execute.c:603
#, 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:614
+#: sed/execute.c:611
#, 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:633 sed/utils.c:178
+#: sed/execute.c:630 sed/utils.c:188
#, c-format
msgid "couldn't open temporary file %s: %s"
msgstr "dočasný soubor %s nelze otevřít: %s"
-#: sed/execute.c:1148 sed/execute.c:1358
+#: sed/execute.c:1167 sed/execute.c:1366
msgid "error in subprocess"
msgstr "chyba v podprocesu"
-#: sed/execute.c:1150
+#: sed/execute.c:1169
msgid "option `e' not supported"
msgstr "přepínač „e“ není podporován"
-#: sed/execute.c:1339
+#: sed/execute.c:1347
msgid "`e' command not supported"
msgstr "příkaz „e“ není podporován"
-#: sed/execute.c:1665
+#: sed/execute.c:1662
msgid "no input files"
msgstr "žádné vstupní soubory"
-#: sed/regexp.c:39
+#: sed/regexp.c:40
msgid "no previous regular expression"
msgstr "žádný předcházející regulární výraz"
-#: sed/regexp.c:141
+#: sed/regexp.c:125
#, c-format
msgid "invalid reference \\%d on `s' command's RHS"
msgstr "chybný odkaz \\%d na pravé straně příkazu „s“"
-#: sed/regexp.c:259
+#: sed/regexp.c:196
msgid "regex input buffer length larger than INT_MAX"
msgstr "délka vstupního pole pro regulární výraz je větší než INT_MAX"
-#: sed/sed.c:35
+#: sed/sed.c:36
msgid "Jay Fenlason"
msgstr "Jay Fenlason"
-#: sed/sed.c:36
+#: sed/sed.c:37
msgid "Tom Lord"
msgstr "Tom Lord"
-#: sed/sed.c:37
+#: sed/sed.c:38
msgid "Ken Pizzini"
msgstr "Ken Pizzini"
-#: sed/sed.c:38
+#: sed/sed.c:39
msgid "Paolo Bonzini"
msgstr "Paolo Bonzini"
-#: sed/sed.c:113
+#: sed/sed.c:40
+msgid "Jim Meyering"
+msgstr "Jim Meyering"
+
+#: sed/sed.c:41
+msgid "Assaf Gordon"
+msgstr "Assaf Gordon"
+
+#: sed/sed.c:124
#, c-format
msgid ""
"GNU sed home page: <https://www.gnu.org/software/sed/>.\n"
@@ -606,20 +618,12 @@ msgstr ""
"Domovská stránka GNU sed: <https://www.gnu.org/software/sed/>.\n"
"Obecný návod jak používat software GNU: <https://www.gnu.org/gethelp/>.\n"
-#: sed/sed.c:120
+#: sed/sed.c:130
#, c-format
msgid "E-mail bug reports to: <%s>.\n"
msgstr "Chybové zprávy zasílejte e-mailem na: <%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"
-" použije syntaxi regulárních výrazů podle Perlu verze 5\n"
-
-#: sed/sed.c:134
+#: sed/sed.c:138
#, c-format
msgid ""
"Usage: %s [OPTION]... {script-only-if-no-other-script} [input-file]...\n"
@@ -628,7 +632,7 @@ msgstr ""
"Použití: %s [PŘEPÍNAČ]… {SKRIPT_JEN_KDYŽ_JE_JEDINÝ} [VSTUPNÍ_SOUBOR]…\n"
"\n"
-#: sed/sed.c:138
+#: sed/sed.c:142
#, c-format
msgid ""
" -n, --quiet, --silent\n"
@@ -637,7 +641,16 @@ msgstr ""
" -n, --quiet, --silent\n"
" potlačí automatické vypisování prostoru vzorů\n"
-#: sed/sed.c:140
+#: sed/sed.c:144
+#, c-format
+msgid ""
+" --debug\n"
+" annotate program execution\n"
+msgstr ""
+" --debug\n"
+" popíše běh programu\n"
+
+#: sed/sed.c:146
#, c-format
msgid ""
" -e script, --expression=script\n"
@@ -646,7 +659,7 @@ msgstr ""
" -e script, --expression=SKRIPT\n"
" přidá skript mezi příkazy k provedení\n"
-#: sed/sed.c:142
+#: sed/sed.c:148
#, c-format
msgid ""
" -f script-file, --file=script-file\n"
@@ -656,7 +669,7 @@ msgstr ""
" -f script-file, --file=SKRIPTOVÝ_SOUBOR\n"
" přidá obsah SKRIPTOVÉHO_SOUBORU mezi příkazy k provedení\n"
-#: sed/sed.c:146
+#: sed/sed.c:152
#, c-format
msgid ""
" --follow-symlinks\n"
@@ -666,7 +679,7 @@ msgstr ""
" následuje symbolické odkazy, když zapisuje do vstupního\n"
" souboru\n"
-#: sed/sed.c:149
+#: sed/sed.c:155
#, c-format
msgid ""
" -i[SUFFIX], --in-place[=SUFFIX]\n"
@@ -676,7 +689,7 @@ msgstr ""
" upravuje přímo vstupní soubory (vytváří zálohy, pokud je\n"
" poskytnuta PŘÍPONA)\n"
-#: sed/sed.c:153
+#: sed/sed.c:158
#, c-format
msgid ""
" -b, --binary\n"
@@ -687,7 +700,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:157
+#: sed/sed.c:162
#, c-format
msgid ""
" -l N, --line-length=N\n"
@@ -696,7 +709,7 @@ msgstr ""
" -l N, --line-length=N\n"
" určuje délku zarovnání řádku u příkazu „l“\n"
-#: sed/sed.c:159
+#: sed/sed.c:164
#, c-format
msgid ""
" --posix\n"
@@ -705,7 +718,7 @@ msgstr ""
" --posix\n"
" vypne všechna GNU rozšíření\n"
-#: sed/sed.c:161
+#: sed/sed.c:166
#, c-format
msgid ""
" -E, -r, --regexp-extended\n"
@@ -716,7 +729,7 @@ msgstr ""
" použije rozšířené regulární výrazy\n"
" (kvůli přenositelnosti použijte posixový -E).\n"
-#: sed/sed.c:167
+#: sed/sed.c:169
#, c-format
msgid ""
" -s, --separate\n"
@@ -727,7 +740,7 @@ msgstr ""
" považuje soubory za samostatné a ne za jeden dlouhý\n"
" souvislý proud.\n"
-#: sed/sed.c:170
+#: sed/sed.c:172
#, c-format
msgid ""
" --sandbox\n"
@@ -736,7 +749,7 @@ msgstr ""
" --sandbox\n"
" pracuje v režimu pískoviště (vypne příkazy e, r, w).\n"
-#: sed/sed.c:172
+#: sed/sed.c:174
#, c-format
msgid ""
" -u, --unbuffered\n"
@@ -748,7 +761,7 @@ msgstr ""
" čte co nejméně dat ze vstupních souborů a výstupní\n"
" buffery vyprazdňuje častěji\n"
-#: sed/sed.c:175
+#: sed/sed.c:177
#, c-format
msgid ""
" -z, --null-data\n"
@@ -757,17 +770,17 @@ msgstr ""
" -z, --null-data\n"
" oddělí řádky znaky NUL\n"
-#: sed/sed.c:177
+#: sed/sed.c:179
#, c-format
msgid " --help display this help and exit\n"
msgstr " --help zobrazí tuto nápovědu a skončí\n"
-#: sed/sed.c:178
+#: sed/sed.c:180
#, c-format
msgid " --version output version information and exit\n"
msgstr " --version vypíše informace o verzi a skončí\n"
-#: sed/sed.c:179
+#: sed/sed.c:181
#, c-format
msgid ""
"\n"
@@ -785,49 +798,69 @@ msgstr ""
"zadány žádné vstupní soubory, bude čten standardní vstup.\n"
"\n"
-#: sed/utils.c:73 sed/utils.c:384
+#: sed/sed.c:373
+msgid "failed to set binary mode on STDIN"
+msgstr "nastavit binární režim standardnímu vstupu se nepodařilo"
+
+#: sed/sed.c:375
+msgid "failed to set binary mode on STDOUT"
+msgstr "nastavit binární režim standardnímu výstupu se nepodařilo"
+
+#: sed/utils.c:77 sed/utils.c:395
#, c-format
msgid "cannot remove %s: %s"
msgstr "%s nelze odstranit: %s"
-#: sed/utils.c:136
+#: sed/utils.c:146
#, c-format
msgid "couldn't open file %s: %s"
msgstr "soubor %s nelze otevřít: %s"
-#: sed/utils.c:155
+#: sed/utils.c:165
#, c-format
msgid "couldn't attach to %s: %s"
msgstr "do %s nelze připisovat: %s"
#: sed/utils.c:192
#, c-format
+msgid "failed to set binary mode on '%s'"
+msgstr "nastavit binární režim na „%s“ se nepodařilo"
+
+#: sed/utils.c:207
+#, 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$llu položku: %3$s"
msgstr[1] "do %2$s nelze zapsat %1$llu položky: %3$s"
msgstr[2] "do %2$s nelze zapsat %1$llu položek: %3$s"
-#: sed/utils.c:204 sed/utils.c:223
+#: sed/utils.c:219 sed/utils.c:238
#, c-format
msgid "read error on %s: %s"
msgstr "chyba při čtení z %s: %s"
-#: sed/utils.c:325
+#: sed/utils.c:336
#, c-format
msgid "couldn't follow symlink %s: %s"
msgstr "symbolický odkaz %s nelze následovat: %s"
-#: sed/utils.c:359
+#: sed/utils.c:370
#, c-format
msgid "cannot stat %s: %s"
msgstr "o %s nelze získat údaje: %s"
-#: sed/utils.c:389
+#: sed/utils.c:400
#, c-format
msgid "cannot rename %s: %s"
msgstr "%s nelze přejmenovat: %s"
+#~ msgid ""
+#~ " -R, --regexp-perl\n"
+#~ " use Perl 5's regular expressions syntax in the script.\n"
+#~ msgstr ""
+#~ " -R, --regexp-perl\n"
+#~ " použije syntaxi regulárních výrazů podle Perlu verze 5\n"
+
#~ msgid "%s: option '--%s' doesn't allow an argument\n"
#~ msgstr "%s: přepínač „­­%s“ nedovoluje argument\n"
diff --git a/po/da.gmo b/po/da.gmo
index e9cb4da..93aa303 100644
--- a/po/da.gmo
+++ b/po/da.gmo
Binary files differ
diff --git a/po/da.po b/po/da.po
index 9bfbe9f..7892d8c 100644
--- a/po/da.po
+++ b/po/da.po
@@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: sed-4.2.2.177\n"
"Report-Msgid-Bugs-To: bug-gnu-utils@gnu.org\n"
-"POT-Creation-Date: 2018-03-31 18:40-0700\n"
+"POT-Creation-Date: 2018-12-20 22:03-0800\n"
"PO-Revision-Date: 2017-02-06 14:29+0100\n"
"Last-Translator: Ask Hjorth Larsen <asklarsen@gmail.com>\n"
"Language-Team: Danish <dansk@dansk-gruppen.dk>\n"
@@ -28,39 +28,39 @@ msgstr "skrivefejl"
msgid "preserving permissions for %s"
msgstr "beholder tilladelser for %s"
-#: lib/dfa.c:958
+#: lib/dfa.c:970
msgid "unbalanced ["
msgstr "uparret ["
-#: lib/dfa.c:1079
+#: lib/dfa.c:1091
msgid "invalid character class"
msgstr "ugyldig tegnklasse"
-#: lib/dfa.c:1205
+#: lib/dfa.c:1217
msgid "character class syntax is [[:space:]], not [:space:]"
msgstr "tegnklassesyntaks er [[:space:]], ikke [:space:]"
-#: lib/dfa.c:1272
+#: lib/dfa.c:1284
msgid "unfinished \\ escape"
msgstr "ufærdig \\-undvigesekvens"
-#: lib/dfa.c:1433
+#: lib/dfa.c:1445
msgid "invalid content of \\{\\}"
msgstr "ugyldigt indhold af \\{\\}"
-#: lib/dfa.c:1436
+#: lib/dfa.c:1448
msgid "regular expression too big"
msgstr "regulært udtryk for stort"
-#: lib/dfa.c:1850
+#: lib/dfa.c:1863
msgid "unbalanced ("
msgstr "uparret ("
-#: lib/dfa.c:1968
+#: lib/dfa.c:1981
msgid "no syntax specified"
msgstr "ingen syntaks angivet"
-#: lib/dfa.c:1976
+#: lib/dfa.c:1992
msgid "unbalanced )"
msgstr "uparret )"
@@ -204,7 +204,7 @@ msgstr "Regulært udtryk for stort"
msgid "Unmatched ) or \\)"
msgstr "Uparret ) eller \\)"
-#: lib/regcomp.c:689
+#: lib/regcomp.c:688
msgid "No previous regular expression"
msgstr "Intet forudgående regulært udtryk"
@@ -213,12 +213,12 @@ msgstr "Intet forudgående regulært udtryk"
msgid "setting permissions for %s"
msgstr "angiver tilladelser for %s"
-#: lib/version-etc.c:74
+#: lib/version-etc.c:73
#, c-format
msgid "Packaged by %s (%s)\n"
msgstr "Pakket af %s (%s)\n"
-#: lib/version-etc.c:77
+#: lib/version-etc.c:76
#, c-format
msgid "Packaged by %s\n"
msgstr "Pakket af %s\n"
@@ -226,11 +226,11 @@ msgstr "Pakket af %s\n"
#. TRANSLATORS: Translate "(C)" to the copyright symbol
#. (C-in-a-circle), if this symbol is available in the user's
#. locale. Otherwise, do not translate "(C)"; leave it as-is.
-#: lib/version-etc.c:84
+#: lib/version-etc.c:83
msgid "(C)"
msgstr "©"
-#: lib/version-etc.c:86
+#: lib/version-etc.c:85
#, fuzzy
msgid ""
"\n"
@@ -438,168 +438,180 @@ msgstr "der mangler en kommando"
msgid "command only uses one address"
msgstr "kommandoen bruger kun én adresse"
-#: sed/compile.c:164
+#: sed/compile.c:165
msgid "unterminated address regex"
msgstr "uafsluttet regulært udtryk for adresse"
-#: sed/compile.c:165
+#: sed/compile.c:166
msgid "unterminated `s' command"
msgstr "uafsluttet 's'-kommando"
-#: sed/compile.c:166
+#: sed/compile.c:167
msgid "unterminated `y' command"
msgstr "uafsluttet 'y'-kommando"
-#: sed/compile.c:167
+#: sed/compile.c:168
msgid "unknown option to `s'"
msgstr "ukendt flag til 's'"
-#: sed/compile.c:169
+#: sed/compile.c:170
msgid "multiple `p' options to `s' command"
msgstr "flere 'p'-flag til 's'-kommando"
-#: sed/compile.c:171
+#: sed/compile.c:172
msgid "multiple `g' options to `s' command"
msgstr "flere 'g'-flag til 's'-kommando"
-#: sed/compile.c:173
+#: sed/compile.c:174
msgid "multiple number options to `s' command"
msgstr "flere tal-flag til 's'-kommando"
-#: sed/compile.c:175
+#: sed/compile.c:176
msgid "number option to `s' command may not be zero"
msgstr "s-kommandoens tal-flag må ikke være nul"
-#: sed/compile.c:177
+#: sed/compile.c:178
msgid "strings for `y' command are different lengths"
msgstr "'y'-kommandoens strenge har forskellige længder"
-#: sed/compile.c:179
+#: sed/compile.c:180
msgid "delimiter character is not a single-byte character"
msgstr "adskillelsestegn er ikke et en-byte-tegn"
-#: sed/compile.c:181
+#: sed/compile.c:182
msgid "expected newer version of sed"
msgstr "forventede en nyere version af sed"
-#: sed/compile.c:183
+#: sed/compile.c:184
msgid "invalid usage of line address 0"
msgstr "ugylig brug af linjeadresse 0"
-#: sed/compile.c:184
+#: sed/compile.c:185
#, c-format
msgid "unknown command: `%c'"
msgstr "ukendt kommando: '%c'"
-#: sed/compile.c:186
+#: sed/compile.c:187
msgid "incomplete command"
msgstr "ufuldstændig kommando"
-#: sed/compile.c:188
+#: sed/compile.c:189
msgid "\":\" lacks a label"
msgstr "\":\" mangler en etiket"
-#: sed/compile.c:190
+#: sed/compile.c:191
msgid "recursive escaping after \\c not allowed"
msgstr "rekursiv undvigesekvens efter \\c tillades ikke"
-#: sed/compile.c:213
+#: sed/compile.c:193
+msgid "e/r/w commands disabled in sandbox mode"
+msgstr ""
+
+#: sed/compile.c:215
#, c-format
msgid "%s: file %s line %lu: %s\n"
msgstr "%s: fil %s, linje %lu: %s\n"
-#: sed/compile.c:216
+#: sed/compile.c:218
#, c-format
msgid "%s: -e expression #%lu, char %lu: %s\n"
msgstr "%s: -e udtryk nr. %lu, tegn %lu: %s\n"
-#: sed/compile.c:1644
+#: sed/compile.c:1607
#, c-format
msgid "can't find label for jump to `%s'"
msgstr "kan ikke finde etiket for hop til '%s'"
-#: sed/execute.c:254 sed/execute.c:271
+#: sed/execute.c:253 sed/execute.c:270
#, c-format
msgid "case conversion produced an invalid character"
msgstr "konvertering mellem store og små bogstaver gav et ugyldigt tegn"
-#: sed/execute.c:565
+#: sed/execute.c:561
#, c-format
msgid "%s: can't read %s: %s\n"
msgstr "%s: kan ikke læse %s: %s\n"
-#: sed/execute.c:590
+#: sed/execute.c:587
#, c-format
msgid "couldn't edit %s: is a terminal"
msgstr "kunne ikke redigere %s: er en terminal"
-#: sed/execute.c:595
+#: sed/execute.c:592
#, c-format
msgid "couldn't edit %s: not a regular file"
msgstr "kunne ikke redigere %s: ikke en regulær fil"
-#: sed/execute.c:606
+#: sed/execute.c:603
#, 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:614
+#: sed/execute.c:611
#, 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:633 sed/utils.c:178
+#: sed/execute.c:630 sed/utils.c:188
#, c-format
msgid "couldn't open temporary file %s: %s"
msgstr "kunne ikke åbne midlertidig fil %s: %s"
-#: sed/execute.c:1148 sed/execute.c:1358
+#: sed/execute.c:1167 sed/execute.c:1366
msgid "error in subprocess"
msgstr "fejl i underproces"
-#: sed/execute.c:1150
+#: sed/execute.c:1169
msgid "option `e' not supported"
msgstr "tilvalg 'e' er ikke understøttet"
-#: sed/execute.c:1339
+#: sed/execute.c:1347
msgid "`e' command not supported"
msgstr "'e'-kommando er ikke understøttet"
-#: sed/execute.c:1665
+#: sed/execute.c:1662
msgid "no input files"
msgstr "ingen inddatafiler"
-#: sed/regexp.c:39
+#: sed/regexp.c:40
msgid "no previous regular expression"
msgstr "intet forudgående regulært udtryk"
-#: sed/regexp.c:141
+#: sed/regexp.c:125
#, c-format
msgid "invalid reference \\%d on `s' command's RHS"
msgstr "ugyldig reference \\%d på 's'-kommandos højreside"
-#: sed/regexp.c:259
+#: sed/regexp.c:196
msgid "regex input buffer length larger than INT_MAX"
msgstr ""
-#: sed/sed.c:35
+#: sed/sed.c:36
msgid "Jay Fenlason"
msgstr "Jay Fenlason"
-#: sed/sed.c:36
+#: sed/sed.c:37
msgid "Tom Lord"
msgstr "Tom Lord"
-#: sed/sed.c:37
+#: sed/sed.c:38
msgid "Ken Pizzini"
msgstr "Ken Pizzini"
-#: sed/sed.c:38
+#: sed/sed.c:39
msgid "Paolo Bonzini"
msgstr "Paolo Bonzini"
-#: sed/sed.c:113
+#: sed/sed.c:40
+msgid "Jim Meyering"
+msgstr ""
+
+#: sed/sed.c:41
+msgid "Assaf Gordon"
+msgstr ""
+
+#: sed/sed.c:124
#, fuzzy, c-format
msgid ""
"GNU sed home page: <https://www.gnu.org/software/sed/>.\n"
@@ -608,20 +620,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:120
+#: sed/sed.c:130
#, c-format
msgid "E-mail bug reports to: <%s>.\n"
msgstr "Send fejlrapporter til: <%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"
-" brug Perl 5's syntaks for regulære udtryk i skriptet\n"
-
-#: sed/sed.c:134
+#: sed/sed.c:138
#, c-format
msgid ""
"Usage: %s [OPTION]... {script-only-if-no-other-script} [input-file]...\n"
@@ -630,7 +634,7 @@ msgstr ""
"Brug: %s [FLAG]... {script-kun-hvis-intet-andet-script} [inddatafil]...\n"
"\n"
-#: sed/sed.c:138
+#: sed/sed.c:142
#, c-format
msgid ""
" -n, --quiet, --silent\n"
@@ -639,7 +643,16 @@ msgstr ""
" -n, --quiet, --silent\n"
" undertryk automatisk udskrift af mønsterrum\n"
-#: sed/sed.c:140
+#: sed/sed.c:144
+#, fuzzy, c-format
+msgid ""
+" --debug\n"
+" annotate program execution\n"
+msgstr ""
+" --posix\n"
+" slå alle GNU-udvidelser fra.\n"
+
+#: sed/sed.c:146
#, c-format
msgid ""
" -e script, --expression=script\n"
@@ -648,7 +661,7 @@ msgstr ""
" -e script, --expression=script\n"
" tilføj scriptet til kommandoerne, der skal køres\n"
-#: sed/sed.c:142
+#: sed/sed.c:148
#, c-format
msgid ""
" -f script-file, --file=script-file\n"
@@ -659,7 +672,7 @@ msgstr ""
" føj indholdet af scriptfil til kommandoerne, der skal "
"køres\n"
-#: sed/sed.c:146
+#: sed/sed.c:152
#, c-format
msgid ""
" --follow-symlinks\n"
@@ -668,7 +681,7 @@ msgstr ""
" --follow-symlinks\n"
" følg symlænker når der redigeres i filer\n"
-#: sed/sed.c:149
+#: sed/sed.c:155
#, c-format
msgid ""
" -i[SUFFIX], --in-place[=SUFFIX]\n"
@@ -677,7 +690,7 @@ msgstr ""
" -i[SUFFIKS], --in-place[=SUFFIKS]\n"
" redigér filer (laver sikkerhedskopi hvis SUFFIKS er givet)\n"
-#: sed/sed.c:153
+#: sed/sed.c:158
#, c-format
msgid ""
" -b, --binary\n"
@@ -687,7 +700,7 @@ msgstr ""
" -b, --binary\n"
" åbn filer i binær tilstand (CR+LF specialbehandles ikke)\n"
-#: sed/sed.c:157
+#: sed/sed.c:162
#, c-format
msgid ""
" -l N, --line-length=N\n"
@@ -696,7 +709,7 @@ msgstr ""
" -l N, --line-length=N\n"
" angiv ønsket længde for linjeombrydning til 'l'-kommandoen\n"
-#: sed/sed.c:159
+#: sed/sed.c:164
#, c-format
msgid ""
" --posix\n"
@@ -706,7 +719,7 @@ msgstr ""
" slå alle GNU-udvidelser fra.\n"
# findes der en bedre oversættelse af portable? Portabilitet?
-#: sed/sed.c:161
+#: sed/sed.c:166
#, c-format
msgid ""
" -E, -r, --regexp-extended\n"
@@ -717,7 +730,7 @@ msgstr ""
" brug udvidede regulære udtryk i scriptet\n"
" (brug -E fra POSIX for platformsuafhængighed)\n"
-#: sed/sed.c:167
+#: sed/sed.c:169
#, c-format
msgid ""
" -s, --separate\n"
@@ -729,7 +742,7 @@ msgstr ""
"kontinuert\n"
" strøm.\n"
-#: sed/sed.c:170
+#: sed/sed.c:172
#, fuzzy, c-format
msgid ""
" --sandbox\n"
@@ -738,7 +751,7 @@ msgstr ""
" --sandbox\n"
" kør i sandkassetilstand.\n"
-#: sed/sed.c:172
+#: sed/sed.c:174
#, c-format
msgid ""
" -u, --unbuffered\n"
@@ -750,7 +763,7 @@ msgstr ""
" indlæs minimale mængder af data fra inddatafilerne, og tøm\n"
" uddatabufferne oftere\n"
-#: sed/sed.c:175
+#: sed/sed.c:177
#, c-format
msgid ""
" -z, --null-data\n"
@@ -759,17 +772,17 @@ msgstr ""
" -z, --null-data\n"
" adskil linjer med NUL-tegn\n"
-#: sed/sed.c:177
+#: sed/sed.c:179
#, c-format
msgid " --help display this help and exit\n"
msgstr " --help vis denne hjælp og afslut\n"
-#: sed/sed.c:178
+#: sed/sed.c:180
#, c-format
msgid " --version output version information and exit\n"
msgstr " --version udskriv versionsinformation og afslut\n"
-#: sed/sed.c:179
+#: sed/sed.c:181
#, c-format
msgid ""
"\n"
@@ -787,48 +800,68 @@ msgstr ""
"fortolkes. Alle resterende argumenter er navne på inddatafiler; hvis ingen\n"
"inddatafiler er angivet, læses standard-inddata.\n"
-#: sed/utils.c:73 sed/utils.c:384
+#: sed/sed.c:373
+msgid "failed to set binary mode on STDIN"
+msgstr ""
+
+#: sed/sed.c:375
+msgid "failed to set binary mode on STDOUT"
+msgstr ""
+
+#: sed/utils.c:77 sed/utils.c:395
#, c-format
msgid "cannot remove %s: %s"
msgstr "kan ikke fjerne %s: %s"
-#: sed/utils.c:136
+#: sed/utils.c:146
#, c-format
msgid "couldn't open file %s: %s"
msgstr "kunne ikke åbne filen %s: %s"
-#: sed/utils.c:155
+#: sed/utils.c:165
#, c-format
msgid "couldn't attach to %s: %s"
msgstr "kunne ikke vedhæfte til %s: %s"
#: sed/utils.c:192
#, c-format
+msgid "failed to set binary mode on '%s'"
+msgstr ""
+
+#: sed/utils.c:207
+#, 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 %llu element til %s: %s"
msgstr[1] "kunne ikke skrive %llu elementer til %s: %s"
-#: sed/utils.c:204 sed/utils.c:223
+#: sed/utils.c:219 sed/utils.c:238
#, c-format
msgid "read error on %s: %s"
msgstr "læsefejl på %s: %s"
-#: sed/utils.c:325
+#: sed/utils.c:336
#, c-format
msgid "couldn't follow symlink %s: %s"
msgstr "kunne ikke følge symlænken %s: %s"
-#: sed/utils.c:359
+#: sed/utils.c:370
#, c-format
msgid "cannot stat %s: %s"
msgstr "kan ikke køre stat på %s: %s"
-#: sed/utils.c:389
+#: sed/utils.c:400
#, c-format
msgid "cannot rename %s: %s"
msgstr "kan ikke omdøbe %s: %s"
+#~ msgid ""
+#~ " -R, --regexp-perl\n"
+#~ " use Perl 5's regular expressions syntax in the script.\n"
+#~ msgstr ""
+#~ " -R, --regexp-perl\n"
+#~ " brug Perl 5's syntaks for regulære udtryk i skriptet\n"
+
#~ msgid "%s: option '--%s' doesn't allow an argument\n"
#~ msgstr "%s: tilvalget \"--%s\" tillader ikke noget argument\n"
diff --git a/po/de.gmo b/po/de.gmo
index f5a7ece..f12b44d 100644
--- a/po/de.gmo
+++ b/po/de.gmo
Binary files differ
diff --git a/po/de.po b/po/de.po
index 9262652..36e9524 100644
--- a/po/de.po
+++ b/po/de.po
@@ -9,7 +9,7 @@ msgid ""
msgstr ""
"Project-Id-Version: sed 4.2.2.177\n"
"Report-Msgid-Bugs-To: bug-gnu-utils@gnu.org\n"
-"POT-Creation-Date: 2018-03-31 18:40-0700\n"
+"POT-Creation-Date: 2018-12-20 22:03-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"
@@ -29,39 +29,39 @@ msgstr "Schreibfehler"
msgid "preserving permissions for %s"
msgstr "behalte Rechte für %s bei"
-#: lib/dfa.c:958
+#: lib/dfa.c:970
msgid "unbalanced ["
msgstr "nicht geschlossenes ["
-#: lib/dfa.c:1079
+#: lib/dfa.c:1091
msgid "invalid character class"
msgstr "Ungültige Zeichenklasse"
-#: lib/dfa.c:1205
+#: lib/dfa.c:1217
msgid "character class syntax is [[:space:]], not [:space:]"
msgstr "Die Syntax für Zeichenklasse lautet [[:space:]], nicht [:space:]"
-#: lib/dfa.c:1272
+#: lib/dfa.c:1284
msgid "unfinished \\ escape"
msgstr "nicht bendete \\-Escapesequenz"
-#: lib/dfa.c:1433
+#: lib/dfa.c:1445
msgid "invalid content of \\{\\}"
msgstr "Ungültiger Inhalt in \\{\\}"
-#: lib/dfa.c:1436
+#: lib/dfa.c:1448
msgid "regular expression too big"
msgstr "Regulärer Ausdruck ist zu groß"
-#: lib/dfa.c:1850
+#: lib/dfa.c:1863
msgid "unbalanced ("
msgstr "nicht geschlossenes ("
-#: lib/dfa.c:1968
+#: lib/dfa.c:1981
msgid "no syntax specified"
msgstr "keine Syntax angegeben"
-#: lib/dfa.c:1976
+#: lib/dfa.c:1992
msgid "unbalanced )"
msgstr "nicht geschlossens )"
@@ -205,7 +205,7 @@ msgstr "Regulärer Ausdruck ist zu groß"
msgid "Unmatched ) or \\)"
msgstr "Nicht paarweises ) bzw. \\)"
-#: lib/regcomp.c:689
+#: lib/regcomp.c:688
msgid "No previous regular expression"
msgstr "Kein vorheriger regulärer Ausdruck"
@@ -214,12 +214,12 @@ msgstr "Kein vorheriger regulärer Ausdruck"
msgid "setting permissions for %s"
msgstr ""
-#: lib/version-etc.c:74
+#: lib/version-etc.c:73
#, c-format
msgid "Packaged by %s (%s)\n"
msgstr ""
-#: lib/version-etc.c:77
+#: lib/version-etc.c:76
#, c-format
msgid "Packaged by %s\n"
msgstr ""
@@ -227,11 +227,11 @@ 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
+#: lib/version-etc.c:83
msgid "(C)"
msgstr "(C)"
-#: lib/version-etc.c:86
+#: lib/version-etc.c:85
#, fuzzy
msgid ""
"\n"
@@ -432,170 +432,182 @@ msgstr "Fehlender Befehl"
msgid "command only uses one address"
msgstr "Befehl verwendet nur eine Adresse"
-#: sed/compile.c:164
+#: sed/compile.c:165
msgid "unterminated address regex"
msgstr "Nicht beendeter regulärer Adressausdruck"
-#: sed/compile.c:165
+#: sed/compile.c:166
msgid "unterminated `s' command"
msgstr "Nicht beendeter »s«-Befehl"
-#: sed/compile.c:166
+#: sed/compile.c:167
msgid "unterminated `y' command"
msgstr "Nicht beendeter »y«-Befehl"
-#: sed/compile.c:167
+#: sed/compile.c:168
msgid "unknown option to `s'"
msgstr "Unbekannte Option für »s«"
-#: sed/compile.c:169
+#: sed/compile.c:170
msgid "multiple `p' options to `s' command"
msgstr "Mehrere »p«-Optionen am »s«-Befehl"
-#: sed/compile.c:171
+#: sed/compile.c:172
msgid "multiple `g' options to `s' command"
msgstr "Mehrere »g«-Optionen am »s«-Befehl"
-#: sed/compile.c:173
+#: sed/compile.c:174
msgid "multiple number options to `s' command"
msgstr "Mehrere numerische Optionen am »s«-Befehl"
-#: sed/compile.c:175
+#: sed/compile.c:176
msgid "number option to `s' command may not be zero"
msgstr "Numerische Option am »s«-Befehl kann nicht Null sein"
-#: sed/compile.c:177
+#: sed/compile.c:178
msgid "strings for `y' command are different lengths"
msgstr "Unterschiedliche Länge der Zeichenketten des »y«-Befehls"
-#: sed/compile.c:179
+#: sed/compile.c:180
msgid "delimiter character is not a single-byte character"
msgstr "Trennzeichen ist kein Einzelbytezeichen"
-#: sed/compile.c:181
+#: sed/compile.c:182
msgid "expected newer version of sed"
msgstr "Neuere Version von sed erwartet"
-#: sed/compile.c:183
+#: sed/compile.c:184
msgid "invalid usage of line address 0"
msgstr "Ungültige Verwendung der Zeilenadresse 0"
-#: sed/compile.c:184
+#: sed/compile.c:185
#, c-format
msgid "unknown command: `%c'"
msgstr "Unbekannter Befehl: »%c«"
-#: sed/compile.c:186
+#: sed/compile.c:187
msgid "incomplete command"
msgstr "Unvollständiger Befehl"
-#: sed/compile.c:188
+#: sed/compile.c:189
msgid "\":\" lacks a label"
msgstr ""
-#: sed/compile.c:190
+#: sed/compile.c:191
msgid "recursive escaping after \\c not allowed"
msgstr ""
-#: sed/compile.c:213
+#: sed/compile.c:193
+msgid "e/r/w commands disabled in sandbox mode"
+msgstr ""
+
+#: sed/compile.c:215
#, c-format
msgid "%s: file %s line %lu: %s\n"
msgstr "%s: Datei %s Zeile %lu: %s\n"
-#: sed/compile.c:216
+#: sed/compile.c:218
#, c-format
msgid "%s: -e expression #%lu, char %lu: %s\n"
msgstr "%s: -e Ausdruck #%lu, Zeichen %lu: %s\n"
-#: sed/compile.c:1644
+#: sed/compile.c:1607
#, c-format
msgid "can't find label for jump to `%s'"
msgstr "Zielmarke für den Sprung zu »%s« kann nicht gefunden werden"
-#: sed/execute.c:254 sed/execute.c:271
+#: sed/execute.c:253 sed/execute.c:270
#, c-format
msgid "case conversion produced an invalid character"
msgstr ""
-#: sed/execute.c:565
+#: sed/execute.c:561
#, c-format
msgid "%s: can't read %s: %s\n"
msgstr "%s: %s kann nicht gelesen werden: %s\n"
-#: sed/execute.c:590
+#: sed/execute.c:587
#, c-format
msgid "couldn't edit %s: is a terminal"
msgstr "%s kann nicht bearbeitet werden: Das ist ein Terminal"
-#: sed/execute.c:595
+#: sed/execute.c:592
#, c-format
msgid "couldn't edit %s: not a regular file"
msgstr "%s kann nicht bearbeitet werden: Das ist keine normale Datei"
-#: sed/execute.c:606
+#: sed/execute.c:603
#, 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:614
+#: sed/execute.c:611
#, 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:633 sed/utils.c:178
+#: sed/execute.c:630 sed/utils.c:188
#, c-format
msgid "couldn't open temporary file %s: %s"
msgstr "Temporäre Datei %s kann nicht geöffnet werden: %s"
-#: sed/execute.c:1148 sed/execute.c:1358
+#: sed/execute.c:1167 sed/execute.c:1366
msgid "error in subprocess"
msgstr "Fehler im Unterprozess"
-#: sed/execute.c:1150
+#: sed/execute.c:1169
msgid "option `e' not supported"
msgstr "Option »e« wird nicht unterstützt"
-#: sed/execute.c:1339
+#: sed/execute.c:1347
msgid "`e' command not supported"
msgstr "Befehl »e« wird nicht unterstützt"
-#: sed/execute.c:1665
+#: sed/execute.c:1662
msgid "no input files"
msgstr "Keine Eingabedateien"
-#: sed/regexp.c:39
+#: sed/regexp.c:40
msgid "no previous regular expression"
msgstr "Kein vorheriger regulärer Ausdruck"
-#: sed/regexp.c:141
+#: sed/regexp.c:125
#, c-format
msgid "invalid reference \\%d on `s' command's RHS"
msgstr "Ungültiger Verweis \\%d im rechten Teil (»RHS«) des »s«-Befehls"
-#: sed/regexp.c:259
+#: sed/regexp.c:196
msgid "regex input buffer length larger than INT_MAX"
msgstr ""
-#: sed/sed.c:35
+#: sed/sed.c:36
msgid "Jay Fenlason"
msgstr "Jay Fenlason"
-#: sed/sed.c:36
+#: sed/sed.c:37
msgid "Tom Lord"
msgstr "Tom Lord"
-#: sed/sed.c:37
+#: sed/sed.c:38
msgid "Ken Pizzini"
msgstr "Ken Pizzini"
-#: sed/sed.c:38
+#: sed/sed.c:39
msgid "Paolo Bonzini"
msgstr "Paolo Bonzini"
-#: sed/sed.c:113
+#: sed/sed.c:40
+msgid "Jim Meyering"
+msgstr ""
+
+#: sed/sed.c:41
+msgid "Assaf Gordon"
+msgstr ""
+
+#: sed/sed.c:124
#, fuzzy, c-format
msgid ""
"GNU sed home page: <https://www.gnu.org/software/sed/>.\n"
@@ -604,20 +616,12 @@ 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:120
+#: sed/sed.c:130
#, c-format
msgid "E-mail bug reports to: <%s>.\n"
msgstr "Fehlerberichte bitte per E-Mail (auf englisch) an: <%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"
-" verwendet die Perl-5-Syntax für reg. Ausdrücke im Skript.\n"
-
-#: sed/sed.c:134
+#: sed/sed.c:138
#, c-format
msgid ""
"Usage: %s [OPTION]... {script-only-if-no-other-script} [input-file]...\n"
@@ -626,7 +630,7 @@ msgstr ""
"Aufruf: %s [OPTION] ¿ {Skript-falls-kein-anderes-Skript} [Eingabedatei] ¿\n"
"\n"
-#: sed/sed.c:138
+#: sed/sed.c:142
#, c-format
msgid ""
" -n, --quiet, --silent\n"
@@ -635,7 +639,16 @@ msgstr ""
" -n, --quiet, --silent\n"
" verhindert die automatische Ausgabe des Arbeitspuffers.\n"
-#: sed/sed.c:140
+#: sed/sed.c:144
+#, fuzzy, c-format
+msgid ""
+" --debug\n"
+" annotate program execution\n"
+msgstr ""
+" --posix\n"
+" schaltet alle GNU-Funktions-Erweiterungen ab.\n"
+
+#: sed/sed.c:146
#, c-format
msgid ""
" -e script, --expression=script\n"
@@ -644,7 +657,7 @@ msgstr ""
" -e skript, --expression=Skript\n"
" hängt »Skript« an die auszuführenden Befehle an.\n"
-#: sed/sed.c:142
+#: sed/sed.c:148
#, c-format
msgid ""
" -f script-file, --file=script-file\n"
@@ -655,7 +668,7 @@ msgstr ""
" hängt den Inhalt von »Skriptdatei« an die\n"
" auszuführenden Befehle an.\n"
-#: sed/sed.c:146
+#: sed/sed.c:152
#, c-format
msgid ""
" --follow-symlinks\n"
@@ -664,7 +677,7 @@ msgstr ""
" --follow-symlinks\n"
" folgt symbolischen Verknüpfungen bei Verwendung von -i.\n"
-#: sed/sed.c:149
+#: sed/sed.c:155
#, c-format
msgid ""
" -i[SUFFIX], --in-place[=SUFFIX]\n"
@@ -674,7 +687,7 @@ msgstr ""
" ändert die Eingabedatei (Sicherungsdatei wird erzeugt,\n"
" falls Suffix angegeben wurde)\n"
-#: sed/sed.c:153
+#: sed/sed.c:158
#, c-format
msgid ""
" -b, --binary\n"
@@ -685,7 +698,7 @@ msgstr ""
" öffnet Dateien binär (CR+LFs werden nicht besonders "
"behandelt).\n"
-#: sed/sed.c:157
+#: sed/sed.c:162
#, c-format
msgid ""
" -l N, --line-length=N\n"
@@ -695,7 +708,7 @@ msgstr ""
" gibt die gewünschte Zeilenumbruchlänge für den »l«-Befehl "
"an.\n"
-#: sed/sed.c:159
+#: sed/sed.c:164
#, c-format
msgid ""
" --posix\n"
@@ -704,7 +717,7 @@ msgstr ""
" --posix\n"
" schaltet alle GNU-Funktions-Erweiterungen ab.\n"
-#: sed/sed.c:161
+#: sed/sed.c:166
#, c-format
msgid ""
" -E, -r, --regexp-extended\n"
@@ -715,7 +728,7 @@ msgstr ""
" verwendet erweiterte reg. Ausdrücke für das Skript.\n"
" (für Portabilität verwende man POSIX -E).\n"
-#: sed/sed.c:167
+#: sed/sed.c:169
#, c-format
msgid ""
" -s, --separate\n"
@@ -726,14 +739,14 @@ msgstr ""
" nimmt an, die Dateien sind seperat und nicht eine\n"
" einzige lange zusammenhängende Quelle.\n"
-#: sed/sed.c:170
+#: sed/sed.c:172
#, c-format
msgid ""
" --sandbox\n"
" operate in sandbox mode (disable e/r/w commands).\n"
msgstr ""
-#: sed/sed.c:172
+#: sed/sed.c:174
#, c-format
msgid ""
" -u, --unbuffered\n"
@@ -745,24 +758,24 @@ msgstr ""
" lädt nur kleinste Datenmengen aus den Eingabedateien\n"
" und schreibt die Ausgabepuffer häufiger zurück.\n"
-#: sed/sed.c:175
+#: sed/sed.c:177
#, c-format
msgid ""
" -z, --null-data\n"
" separate lines by NUL characters\n"
msgstr ""
-#: sed/sed.c:177
+#: sed/sed.c:179
#, c-format
msgid " --help display this help and exit\n"
msgstr " --help zeigt diese Hilfe an und beendet das Programm.\n"
-#: sed/sed.c:178
+#: sed/sed.c:180
#, c-format
msgid " --version output version information and exit\n"
msgstr " --version zeigt die Versionsinfo an und beendet das Programm.\n"
-#: sed/sed.c:179
+#: sed/sed.c:181
#, c-format
msgid ""
"\n"
@@ -780,48 +793,69 @@ msgstr ""
"gelesen.\n"
"\n"
-#: sed/utils.c:73 sed/utils.c:384
+#: sed/sed.c:373
+msgid "failed to set binary mode on STDIN"
+msgstr ""
+
+#: sed/sed.c:375
+msgid "failed to set binary mode on STDOUT"
+msgstr ""
+
+#: sed/utils.c:77 sed/utils.c:395
#, c-format
msgid "cannot remove %s: %s"
msgstr "%s kann nicht entfernt werden: %s"
-#: sed/utils.c:136
+#: sed/utils.c:146
#, c-format
msgid "couldn't open file %s: %s"
msgstr "Datei %s kann nicht geöffnet werden: %s"
-#: sed/utils.c:155
+#: sed/utils.c:165
#, c-format
msgid "couldn't attach to %s: %s"
msgstr "Einklinken in %s nicht möglich: %s"
#: sed/utils.c:192
#, c-format
+msgid "failed to set binary mode on '%s'"
+msgstr ""
+
+#: sed/utils.c:207
+#, c-format
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:204 sed/utils.c:223
+#: sed/utils.c:219 sed/utils.c:238
#, c-format
msgid "read error on %s: %s"
msgstr "Lesefehler in %s: %s"
-#: sed/utils.c:325
+#: sed/utils.c:336
#, c-format
msgid "couldn't follow symlink %s: %s"
msgstr "Symbolischem Link %s kann nicht gefolgt werden: %s"
-#: sed/utils.c:359
+#: sed/utils.c:370
#, c-format
msgid "cannot stat %s: %s"
msgstr "Statusermittlung von %s schlug fehl: %s"
-#: sed/utils.c:389
+#: sed/utils.c:400
#, c-format
msgid "cannot rename %s: %s"
msgstr "%s kann nicht umbenannt werden: %s"
+#~ msgid ""
+#~ " -R, --regexp-perl\n"
+#~ " use Perl 5's regular expressions syntax in the script.\n"
+#~ msgstr ""
+#~ " -R, --regexp-perl\n"
+#~ " verwendet die Perl-5-Syntax für reg. Ausdrücke im "
+#~ "Skript.\n"
+
#~ msgid "%s: option '--%s' doesn't allow an argument\n"
#~ msgstr "%s: Option '--%s' darf kein Argument haben\n"
diff --git a/po/el.gmo b/po/el.gmo
index cb37483..78a544d 100644
--- a/po/el.gmo
+++ b/po/el.gmo
Binary files differ
diff --git a/po/el.po b/po/el.po
index 1470ac8..435ac9d 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: 2018-03-31 18:40-0700\n"
+"POT-Creation-Date: 2018-12-20 22:03-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"
@@ -28,42 +28,42 @@ msgstr "εσωτερικό σφάλμα"
msgid "preserving permissions for %s"
msgstr ""
-#: lib/dfa.c:958
+#: lib/dfa.c:970
msgid "unbalanced ["
msgstr ""
-#: lib/dfa.c:1079
+#: lib/dfa.c:1091
#, fuzzy
msgid "invalid character class"
msgstr "Μη έγκυρο όνομα κλάσης χαρακτήρων"
-#: lib/dfa.c:1205
+#: lib/dfa.c:1217
msgid "character class syntax is [[:space:]], not [:space:]"
msgstr ""
-#: lib/dfa.c:1272
+#: lib/dfa.c:1284
msgid "unfinished \\ escape"
msgstr ""
-#: lib/dfa.c:1433
+#: lib/dfa.c:1445
#, fuzzy
msgid "invalid content of \\{\\}"
msgstr "Μη έγκυρο περιεχόμενο εντός \\{\\}"
-#: lib/dfa.c:1436
+#: lib/dfa.c:1448
#, fuzzy
msgid "regular expression too big"
msgstr "Πολύ μεγάλη κανονική έκφραση"
-#: lib/dfa.c:1850
+#: lib/dfa.c:1863
msgid "unbalanced ("
msgstr ""
-#: lib/dfa.c:1968
+#: lib/dfa.c:1981
msgid "no syntax specified"
msgstr ""
-#: lib/dfa.c:1976
+#: lib/dfa.c:1992
msgid "unbalanced )"
msgstr ""
@@ -210,7 +210,7 @@ msgstr "Πολύ μεγάλη κανονική έκφραση"
msgid "Unmatched ) or \\)"
msgstr "Αταίριαστο ) ή \\)"
-#: lib/regcomp.c:689
+#: lib/regcomp.c:688
msgid "No previous regular expression"
msgstr "Δεν βρέθηκε προηγούμενη κανονική έκφραση"
@@ -219,12 +219,12 @@ msgstr "Δεν βρέθηκε προηγούμενη κανονική έκφρα
msgid "setting permissions for %s"
msgstr ""
-#: lib/version-etc.c:74
+#: lib/version-etc.c:73
#, c-format
msgid "Packaged by %s (%s)\n"
msgstr ""
-#: lib/version-etc.c:77
+#: lib/version-etc.c:76
#, c-format
msgid "Packaged by %s\n"
msgstr ""
@@ -232,11 +232,11 @@ 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
+#: lib/version-etc.c:83
msgid "(C)"
msgstr ""
-#: lib/version-etc.c:86
+#: lib/version-etc.c:85
msgid ""
"\n"
"License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl."
@@ -418,171 +418,183 @@ msgstr "λείπει η εντολή"
msgid "command only uses one address"
msgstr "η εντολή χρησιμοποιεί μόνο μια διεύθυνση"
-#: sed/compile.c:164
+#: sed/compile.c:165
msgid "unterminated address regex"
msgstr "μη τερματισμένη κανονικής έκφραση διεύθυνσης"
-#: sed/compile.c:165
+#: sed/compile.c:166
msgid "unterminated `s' command"
msgstr "μη τερματισμένη εντολή `s'"
-#: sed/compile.c:166
+#: sed/compile.c:167
msgid "unterminated `y' command"
msgstr "μη τερματισμένη εντολή `y'"
-#: sed/compile.c:167
+#: sed/compile.c:168
msgid "unknown option to `s'"
msgstr "άγνωστη επιλογή για το `s'"
-#: sed/compile.c:169
+#: sed/compile.c:170
msgid "multiple `p' options to `s' command"
msgstr "πολλαπλές επιλογές `p' στην εντολή `s'"
-#: sed/compile.c:171
+#: sed/compile.c:172
msgid "multiple `g' options to `s' command"
msgstr "πολλαπλές επιλογές `g' στην εντολή `s'"
-#: sed/compile.c:173
+#: sed/compile.c:174
msgid "multiple number options to `s' command"
msgstr "πολλαπλός αριθμητικές επιλογές στην εντολή `s'"
-#: sed/compile.c:175
+#: sed/compile.c:176
msgid "number option to `s' command may not be zero"
msgstr "η αριθμητική επιλογή στην εντολή `s' δεν μπορεί να είναι μηδέν"
-#: sed/compile.c:177
+#: sed/compile.c:178
msgid "strings for `y' command are different lengths"
msgstr "τα αλφαριθμητικά για την εντολή `y' είναι διαφορετικού μεγέθους"
-#: sed/compile.c:179
+#: sed/compile.c:180
msgid "delimiter character is not a single-byte character"
msgstr "ο χαρακτήρας διαχωριστής έχει μέγεθος μεγαλύτερο από ένα byte"
-#: sed/compile.c:181
+#: sed/compile.c:182
msgid "expected newer version of sed"
msgstr "αναμενόταν νεώτερη έκδοση του sed"
-#: sed/compile.c:183
+#: sed/compile.c:184
msgid "invalid usage of line address 0"
msgstr "ακατάλληλη χρήση διεύθυνσης γραμμής 0"
-#: sed/compile.c:184
+#: sed/compile.c:185
#, c-format
msgid "unknown command: `%c'"
msgstr "άγνωστη εντολή: `%c'"
-#: sed/compile.c:186
+#: sed/compile.c:187
#, fuzzy
msgid "incomplete command"
msgstr "λείπει η εντολή"
-#: sed/compile.c:188
+#: sed/compile.c:189
msgid "\":\" lacks a label"
msgstr ""
-#: sed/compile.c:190
+#: sed/compile.c:191
msgid "recursive escaping after \\c not allowed"
msgstr ""
-#: sed/compile.c:213
+#: sed/compile.c:193
+msgid "e/r/w commands disabled in sandbox mode"
+msgstr ""
+
+#: sed/compile.c:215
#, c-format
msgid "%s: file %s line %lu: %s\n"
msgstr "%s: αρχείο %s γραμμή %lu: %s\n"
-#: sed/compile.c:216
+#: sed/compile.c:218
#, c-format
msgid "%s: -e expression #%lu, char %lu: %s\n"
msgstr "%s: -e έκφραση #%lu, χαρακτήρας %lu: %s\n"
-#: sed/compile.c:1644
+#: sed/compile.c:1607
#, c-format
msgid "can't find label for jump to `%s'"
msgstr "αδυναμία εύρεσης ετικέττας για μετάβαση στο `%s'"
-#: sed/execute.c:254 sed/execute.c:271
+#: sed/execute.c:253 sed/execute.c:270
#, c-format
msgid "case conversion produced an invalid character"
msgstr ""
-#: sed/execute.c:565
+#: sed/execute.c:561
#, c-format
msgid "%s: can't read %s: %s\n"
msgstr "%s: αδυναμία ανάγνωσης του %s: %s\n"
-#: sed/execute.c:590
+#: sed/execute.c:587
#, c-format
msgid "couldn't edit %s: is a terminal"
msgstr "αδυναμία επεξεργασίας του %s: είναι τερματικό"
-#: sed/execute.c:595
+#: sed/execute.c:592
#, c-format
msgid "couldn't edit %s: not a regular file"
msgstr "αδυναμία επεξεργασίας του %s: δεν είναι κανονικό αρχείο"
-#: sed/execute.c:606
+#: sed/execute.c:603
#, c-format
msgid "%s: warning: failed to set default file creation context to %s: %s"
msgstr ""
"%s: προειδοποίηση: αποτυχία ορισμού προεπιλεγμένου πλαισίου δημιουργίας "
"αρχείου ως %s: %s"
-#: sed/execute.c:614
+#: sed/execute.c:611
#, c-format
msgid "%s: warning: failed to get security context of %s: %s"
msgstr ""
"%s: προειδοποίηση: αποτυχία πάρσης πλαίσιου ασφαλείας του αρχείου %s: %s"
-#: sed/execute.c:633 sed/utils.c:178
+#: sed/execute.c:630 sed/utils.c:188
#, c-format
msgid "couldn't open temporary file %s: %s"
msgstr "αδυναμία ανοίγματος του αρχείου %s: %s"
-#: sed/execute.c:1148 sed/execute.c:1358
+#: sed/execute.c:1167 sed/execute.c:1366
msgid "error in subprocess"
msgstr "σφάλμα στη υποδιαδικασία"
-#: sed/execute.c:1150
+#: sed/execute.c:1169
msgid "option `e' not supported"
msgstr "η επιλογή `e' δεν υποστηρίζεται"
-#: sed/execute.c:1339
+#: sed/execute.c:1347
msgid "`e' command not supported"
msgstr "η εντολή `e' δεν υποστηρίζεται"
-#: sed/execute.c:1665
+#: sed/execute.c:1662
msgid "no input files"
msgstr "δεν υπάρχουν αρχεία εισόδου"
-#: sed/regexp.c:39
+#: sed/regexp.c:40
msgid "no previous regular expression"
msgstr "δεν βρέθηκε προηγούμενη κανονική έκφραση"
-#: sed/regexp.c:141
+#: sed/regexp.c:125
#, c-format
msgid "invalid reference \\%d on `s' command's RHS"
msgstr "μη έγκυρη αναφορά \\%d στο δεξί τμήμα της εντολής `s'"
-#: sed/regexp.c:259
+#: sed/regexp.c:196
msgid "regex input buffer length larger than INT_MAX"
msgstr ""
-#: sed/sed.c:35
+#: sed/sed.c:36
msgid "Jay Fenlason"
msgstr ""
-#: sed/sed.c:36
+#: sed/sed.c:37
msgid "Tom Lord"
msgstr ""
-#: sed/sed.c:37
+#: sed/sed.c:38
msgid "Ken Pizzini"
msgstr ""
-#: sed/sed.c:38
+#: sed/sed.c:39
msgid "Paolo Bonzini"
msgstr ""
-#: sed/sed.c:113
+#: sed/sed.c:40
+msgid "Jim Meyering"
+msgstr ""
+
+#: sed/sed.c:41
+msgid "Assaf Gordon"
+msgstr ""
+
+#: sed/sed.c:124
#, fuzzy, c-format
msgid ""
"GNU sed home page: <https://www.gnu.org/software/sed/>.\n"
@@ -591,20 +603,12 @@ msgstr ""
"Κεντρική ιστοσελίδα GNU sed: <http://www.gnu.org/software/sed/>.\n"
"Γενική βοήθεια χρήσης GNU λογισμικού: <http://www.gnu.org/gethelp/>.\n"
-#: sed/sed.c:120
+#: sed/sed.c:130
#, c-format
msgid "E-mail bug reports to: <%s>.\n"
msgstr ""
-#: 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
+#: sed/sed.c:138
#, c-format
msgid ""
"Usage: %s [OPTION]... {script-only-if-no-other-script} [input-file]...\n"
@@ -614,7 +618,7 @@ msgstr ""
"εισόδου]...\n"
"\n"
-#: sed/sed.c:138
+#: sed/sed.c:142
#, c-format
msgid ""
" -n, --quiet, --silent\n"
@@ -623,7 +627,16 @@ msgstr ""
" -n, --quiet, --silent\n"
" δεν γίνεται αυτόματη εκτύπωση του χώρου υποδείγματος\n"
-#: sed/sed.c:140
+#: sed/sed.c:144
+#, fuzzy, c-format
+msgid ""
+" --debug\n"
+" annotate program execution\n"
+msgstr ""
+" --posix\n"
+" απενεργοποίηση όλων των επεκτάσεων GNU στο πρωτότυπο sed.\n"
+
+#: sed/sed.c:146
#, c-format
msgid ""
" -e script, --expression=script\n"
@@ -632,7 +645,7 @@ msgstr ""
" -e σενάριο --expression=σενάριο\n"
" προσθήκη του σεναρίου στις εντολές προς εκτέλεση\n"
-#: sed/sed.c:142
+#: sed/sed.c:148
#, c-format
msgid ""
" -f script-file, --file=script-file\n"
@@ -642,7 +655,7 @@ msgstr ""
" -f αρχείο-σεναρίου --file=αρχείο-σεναρίου\n"
" προσθήκη του αρχείου-σεναρίου στις εντολές προς εκτέλεση\n"
-#: sed/sed.c:146
+#: sed/sed.c:152
#, c-format
msgid ""
" --follow-symlinks\n"
@@ -651,7 +664,7 @@ msgstr ""
" --follow-symlinks\n"
" ακολούθηση συμβολικών συνδέσμων στην επιτόπια επεξεργασία\n"
-#: sed/sed.c:149
+#: sed/sed.c:155
#, fuzzy, c-format
msgid ""
" -i[SUFFIX], --in-place[=SUFFIX]\n"
@@ -661,7 +674,7 @@ msgstr ""
" επιτόπια επεξεργασία (δημιουργίας αντιγράφου αν παρέχεται "
"ΕΠΙΘΗΜΑ)\n"
-#: sed/sed.c:153
+#: sed/sed.c:158
#, c-format
msgid ""
" -b, --binary\n"
@@ -672,7 +685,7 @@ msgstr ""
" άνοιγμα αρχείων ως δυαδικά (οι χαρακτήρες CR και LF δεν "
"έχουν ειδική σημασία)\n"
-#: sed/sed.c:157
+#: sed/sed.c:162
#, c-format
msgid ""
" -l N, --line-length=N\n"
@@ -682,7 +695,7 @@ msgstr ""
" καθορισμός επιθυμητού μήκους γραμμής για αναδίπλωση γραμμών "
"στην εντολή `l'\n"
-#: sed/sed.c:159
+#: sed/sed.c:164
#, c-format
msgid ""
" --posix\n"
@@ -691,7 +704,7 @@ msgstr ""
" --posix\n"
" απενεργοποίηση όλων των επεκτάσεων GNU στο πρωτότυπο sed.\n"
-#: sed/sed.c:161
+#: sed/sed.c:166
#, fuzzy, c-format
msgid ""
" -E, -r, --regexp-extended\n"
@@ -701,7 +714,7 @@ msgstr ""
" -r, --regexp-extended\n"
" χρήση επεκτεταμένων κανονικών εκφράσεων στο σενάριο.\n"
-#: sed/sed.c:167
+#: sed/sed.c:169
#, fuzzy, c-format
msgid ""
" -s, --separate\n"
@@ -712,14 +725,14 @@ msgstr ""
" τα αρχεία εισόδου να λογίζονται ξεχωριστά, αντί ως ένας\n"
" συνεχής μακρύς χείμαρρος.\n"
-#: sed/sed.c:170
+#: sed/sed.c:172
#, c-format
msgid ""
" --sandbox\n"
" operate in sandbox mode (disable e/r/w commands).\n"
msgstr ""
-#: sed/sed.c:172
+#: sed/sed.c:174
#, c-format
msgid ""
" -u, --unbuffered\n"
@@ -732,25 +745,25 @@ msgstr ""
"εισόδου\n"
" και άδειασμα των ενταμιευτών εξόδου συχνότερα\n"
-#: sed/sed.c:175
+#: sed/sed.c:177
#, c-format
msgid ""
" -z, --null-data\n"
" separate lines by NUL characters\n"
msgstr ""
-#: sed/sed.c:177
+#: sed/sed.c:179
#, c-format
msgid " --help display this help and exit\n"
msgstr " --help εμφάνιση αυτού του κειμένου βοηθείας και έξοδος\n"
-#: sed/sed.c:178
+#: sed/sed.c:180
#, c-format
msgid " --version output version information and exit\n"
msgstr ""
" --version εμφάνιση πληροφοριών έκδοσης προγράμματος και έξοδος\n"
-#: sed/sed.c:179
+#: sed/sed.c:181
#, c-format
msgid ""
"\n"
@@ -767,48 +780,69 @@ msgstr ""
"καθοριστεί αρχεία εισόδου, τότε γίνεται ανάγνωση της κανονικής εισόδου.\n"
"\n"
-#: sed/utils.c:73 sed/utils.c:384
+#: sed/sed.c:373
+msgid "failed to set binary mode on STDIN"
+msgstr ""
+
+#: sed/sed.c:375
+msgid "failed to set binary mode on STDOUT"
+msgstr ""
+
+#: sed/utils.c:77 sed/utils.c:395
#, c-format
msgid "cannot remove %s: %s"
msgstr "αδυναμία διαγραφής του %s: %s"
-#: sed/utils.c:136
+#: sed/utils.c:146
#, c-format
msgid "couldn't open file %s: %s"
msgstr "αδυναμία ανοίγματος του %s: %s"
-#: sed/utils.c:155
+#: sed/utils.c:165
#, c-format
msgid "couldn't attach to %s: %s"
msgstr "αδυναμία προσάρτησης στο %s: %s"
#: sed/utils.c:192
#, fuzzy, c-format
+msgid "failed to set binary mode on '%s'"
+msgstr "η μνήμη εξαντλήθηκε"
+
+#: sed/utils.c:207
+#, 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:204 sed/utils.c:223
+#: sed/utils.c:219 sed/utils.c:238
#, c-format
msgid "read error on %s: %s"
msgstr "σφάλμα ανάγνωσης στο %s: %s"
-#: sed/utils.c:325
+#: sed/utils.c:336
#, c-format
msgid "couldn't follow symlink %s: %s"
msgstr "αδυναμία ακολούθησης του συμβολικού συνδέσμου %s: %s"
-#: sed/utils.c:359
+#: sed/utils.c:370
#, c-format
msgid "cannot stat %s: %s"
msgstr "αδυναμία ανάγνωσης εγγραφής για το %s στον κατάλογο αρχείων: %s"
-#: sed/utils.c:389
+#: sed/utils.c:400
#, c-format
msgid "cannot rename %s: %s"
msgstr "αδυναμία μετονομασίας του %s: %s"
+#~ msgid ""
+#~ " -R, --regexp-perl\n"
+#~ " use Perl 5's regular expressions syntax in the script.\n"
+#~ msgstr ""
+#~ " -R, --regexp-perl\n"
+#~ " χρήση κανονικών εκφράσεων με σύνταξη Perl 5 στο "
+#~ "σενάριο.\n"
+
#~ msgid "cannot specify modifiers on empty regexp"
#~ msgstr "δεν επιτρέπεται ο ορισμός διαμορφωτών σε κενή κανονική έκφραση"
@@ -986,9 +1020,6 @@ msgstr "αδυναμία μετονομασίας του %s: %s"
#~ msgid "parentheses nested too deeply"
#~ msgstr "πάρα πολλά επίπεδα παρενθέσεων"
-#~ msgid "failed to get memory"
-#~ msgstr "η μνήμη εξαντλήθηκε"
-
#~ msgid "unmatched parentheses"
#~ msgstr "αταίριαστο ( ή )"
diff --git a/po/eo.gmo b/po/eo.gmo
index 385a599..96c8251 100644
--- a/po/eo.gmo
+++ b/po/eo.gmo
Binary files differ
diff --git a/po/eo.po b/po/eo.po
index 2aab674..e5f22e6 100644
--- a/po/eo.po
+++ b/po/eo.po
@@ -1,15 +1,15 @@
# Esperantaj mesaĝoj por GNU sed.
-# Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2013, 2016, 2017 Free Software Foundation, Inc.
+# Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2013, 2016, 2017, 2018 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, 2017.
+# Felipe Castro <fefcas@gmail.com> 2013, 2016, 2017, 2018.
#
msgid ""
msgstr ""
-"Project-Id-Version: GNU sed 4.2.2.177\n"
+"Project-Id-Version: GNU sed 4.4.104\n"
"Report-Msgid-Bugs-To: bug-gnu-utils@gnu.org\n"
-"POT-Creation-Date: 2018-03-31 18:40-0700\n"
-"PO-Revision-Date: 2017-01-26 23:31-0300\n"
+"POT-Creation-Date: 2018-12-20 22:03-0800\n"
+"PO-Revision-Date: 2018-06-06 22:02-0300\n"
"Last-Translator: Felipe Castro <fefcas@gmail.com>\n"
"Language-Team: Esperanto <translation-team-eo@lists.sourceforge.net>\n"
"Language: eo\n"
@@ -30,39 +30,39 @@ msgstr "skrib-eraro"
msgid "preserving permissions for %s"
msgstr "ni tenas la permesojn por %s"
-#: lib/dfa.c:958
+#: lib/dfa.c:970
msgid "unbalanced ["
msgstr "ne spegulita ["
-#: lib/dfa.c:1079
+#: lib/dfa.c:1091
msgid "invalid character class"
msgstr "nevalida signoklaso"
-#: lib/dfa.c:1205
+#: lib/dfa.c:1217
msgid "character class syntax is [[:space:]], not [:space:]"
msgstr "sintakso de signoklaso estas [[:spaco:]], ne [:spaco:]"
-#: lib/dfa.c:1272
+#: lib/dfa.c:1284
msgid "unfinished \\ escape"
msgstr "nefinigita kodŝanĝa \\"
-#: lib/dfa.c:1433
+#: lib/dfa.c:1445
msgid "invalid content of \\{\\}"
msgstr "nevalida enhavo de \\{\\}"
-#: lib/dfa.c:1436
+#: lib/dfa.c:1448
msgid "regular expression too big"
msgstr "regula esprimo tro granda"
-#: lib/dfa.c:1850
+#: lib/dfa.c:1863
msgid "unbalanced ("
msgstr "ne spegulita ("
-#: lib/dfa.c:1968
+#: lib/dfa.c:1981
msgid "no syntax specified"
msgstr "neniu sintakso estis indikata"
-#: lib/dfa.c:1976
+#: lib/dfa.c:1992
msgid "unbalanced )"
msgstr "ne spegulita )"
@@ -71,29 +71,29 @@ msgid "Unknown system error"
msgstr "Nekonata sistem-eraro"
#: lib/getopt.c:278
-#, fuzzy, c-format
+#, c-format
msgid "%s: option '%s%s' is ambiguous\n"
-msgstr "%s: modifilo '%s' estas plursenca\n"
+msgstr "%s: modifilo '%s%s' estas plursenca\n"
#: lib/getopt.c:284
-#, fuzzy, c-format
+#, c-format
msgid "%s: option '%s%s' is ambiguous; possibilities:"
-msgstr "%s: modifilo '%s' estas plursenca; eblecoj:"
+msgstr "%s: modifilo '%s%s' estas plursenca; eblecoj:"
#: lib/getopt.c:319
-#, fuzzy, c-format
+#, c-format
msgid "%s: unrecognized option '%s%s'\n"
-msgstr "%s: nerekonata modifilo '%c%s'\n"
+msgstr "%s: nerekonata modifilo '%s%s'\n"
#: lib/getopt.c:345
-#, fuzzy, c-format
+#, c-format
msgid "%s: option '%s%s' doesn't allow an argument\n"
-msgstr "%s: modifilo '%c%s' ne permesas argumenton\n"
+msgstr "%s: modifilo '%s%s' ne permesas argumenton\n"
#: lib/getopt.c:360
-#, fuzzy, c-format
+#, c-format
msgid "%s: option '%s%s' requires an argument\n"
-msgstr "%s: modifilo '--%s' postulas argumenton\n"
+msgstr "%s: modifilo '%s%s' postulas argumenton\n"
#: lib/getopt.c:621
#, c-format
@@ -206,7 +206,7 @@ msgstr "Regula esprimo tro granda"
msgid "Unmatched ) or \\)"
msgstr "Neparigita ) aŭ \\)"
-#: lib/regcomp.c:689
+#: lib/regcomp.c:688
msgid "No previous regular expression"
msgstr "Mankas antaŭa regula esprimo"
@@ -215,12 +215,12 @@ msgstr "Mankas antaŭa regula esprimo"
msgid "setting permissions for %s"
msgstr "ni difinas permesojn por %s"
-#: lib/version-etc.c:74
+#: lib/version-etc.c:73
#, c-format
msgid "Packaged by %s (%s)\n"
msgstr "Pakigita de %s (%s)\n"
-#: lib/version-etc.c:77
+#: lib/version-etc.c:76
#, c-format
msgid "Packaged by %s\n"
msgstr "Pakigita de %s\n"
@@ -228,12 +228,11 @@ msgstr "Pakigita de %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
+#: lib/version-etc.c:83
msgid "(C)"
msgstr "©"
-#: lib/version-etc.c:86
-#, fuzzy
+#: lib/version-etc.c:85
msgid ""
"\n"
"License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl."
@@ -243,7 +242,7 @@ msgid ""
"\n"
msgstr ""
"\n"
-"Permeso GPLv3+: GNU GPL versio 3 aŭ posta <http://gnu.org/licenses/gpl."
+"Permeso GPLv3+: GNU GPL versio 3 aŭ posta <https://gnu.org/licenses/gpl."
"html>.\n"
"Tio ĉi estas libera programaro: vi estas libera por ŝanĝi kaj redisdoni "
"ĝin.\n"
@@ -383,15 +382,14 @@ msgid "%s home page: <%s>\n"
msgstr "%s hejm-paĝo: <%s>\n"
#: lib/version-etc.c:253
-#, fuzzy, c-format
+#, c-format
msgid "%s home page: <https://www.gnu.org/software/%s/>\n"
-msgstr "%s hejm-paĝo: <http://www.gnu.org/software/%s/>\n"
+msgstr "%s hejm-paĝo: <https://www.gnu.org/software/%s/>\n"
#: lib/version-etc.c:256
-#, fuzzy
msgid "General help using GNU software: <https://www.gnu.org/gethelp/>\n"
msgstr ""
-"Ĝenerala helpo por uzi programaron GNU: <http://www.gnu.org/gethelp/>\n"
+"Ĝenerala helpo por uzi programaron GNU: <https://www.gnu.org/gethelp/>\n"
#: sed/compile.c:146
msgid "multiple `!'s"
@@ -441,190 +439,194 @@ msgstr "mankas komando"
msgid "command only uses one address"
msgstr "komando uzas nur unu adreson"
-#: sed/compile.c:164
+#: sed/compile.c:165
msgid "unterminated address regex"
msgstr "nefinita adresa regesp"
-#: sed/compile.c:165
+#: sed/compile.c:166
msgid "unterminated `s' command"
msgstr "nefinita komando 's'"
-#: sed/compile.c:166
+#: sed/compile.c:167
msgid "unterminated `y' command"
msgstr "nefinita komando 'y'"
-#: sed/compile.c:167
+#: sed/compile.c:168
msgid "unknown option to `s'"
msgstr "nekonata opcio por 's'"
-#: sed/compile.c:169
+#: sed/compile.c:170
msgid "multiple `p' options to `s' command"
msgstr "pluraj 'p'-opcioj por komando 's'"
-#: sed/compile.c:171
+#: sed/compile.c:172
msgid "multiple `g' options to `s' command"
msgstr "pluraj 'g'-opcioj por komando 's'"
-#: sed/compile.c:173
+#: sed/compile.c:174
msgid "multiple number options to `s' command"
msgstr "pluraj nombro-opcioj por komando 's'"
-#: sed/compile.c:175
+#: sed/compile.c:176
msgid "number option to `s' command may not be zero"
msgstr "nombro-opcio por komando 's' ne povas esti nul"
-#: sed/compile.c:177
+#: sed/compile.c:178
msgid "strings for `y' command are different lengths"
msgstr "ĉenoj por komando 'y' havas malsamajn longojn"
-#: sed/compile.c:179
+#: sed/compile.c:180
msgid "delimiter character is not a single-byte character"
msgstr "apartiga signo ne estas unubitoka signo"
-#: sed/compile.c:181
+#: sed/compile.c:182
msgid "expected newer version of sed"
msgstr "atendis pli novan version de sed"
-#: sed/compile.c:183
+#: sed/compile.c:184
msgid "invalid usage of line address 0"
msgstr "nevalida uzo de liniadreso 0"
-#: sed/compile.c:184
+#: sed/compile.c:185
#, c-format
msgid "unknown command: `%c'"
msgstr "nekonata komando: '%c'"
-#: sed/compile.c:186
+#: sed/compile.c:187
msgid "incomplete command"
msgstr "malkompleta komando"
-#: sed/compile.c:188
+#: sed/compile.c:189
msgid "\":\" lacks a label"
msgstr "\":\" malhavas etikedon"
-#: sed/compile.c:190
+#: sed/compile.c:191
msgid "recursive escaping after \\c not allowed"
msgstr "rikura kodŝanĝo post \\c ne estas permesata"
-#: sed/compile.c:213
+#: sed/compile.c:193
+msgid "e/r/w commands disabled in sandbox mode"
+msgstr ""
+
+#: sed/compile.c:215
#, c-format
msgid "%s: file %s line %lu: %s\n"
msgstr "%s: dosiero %s linio %lu: %s\n"
-#: sed/compile.c:216
+#: sed/compile.c:218
#, c-format
msgid "%s: -e expression #%lu, char %lu: %s\n"
msgstr "%s: -e esprimo #%lu, signo %lu: %s\n"
-#: sed/compile.c:1644
+#: sed/compile.c:1607
#, c-format
msgid "can't find label for jump to `%s'"
msgstr "ne povas trovi etikedon por salto al '%s'"
-#: sed/execute.c:254 sed/execute.c:271
+#: sed/execute.c:253 sed/execute.c:270
#, c-format
msgid "case conversion produced an invalid character"
msgstr "uskleco-konverto produktis malvalidan signon"
-#: sed/execute.c:565
+#: sed/execute.c:561
#, c-format
msgid "%s: can't read %s: %s\n"
msgstr "%s: ne povas legi %s: %s\n"
-#: sed/execute.c:590
+#: sed/execute.c:587
#, c-format
msgid "couldn't edit %s: is a terminal"
msgstr "ne povis redakti %s: estas terminalo"
-#: sed/execute.c:595
+#: sed/execute.c:592
#, c-format
msgid "couldn't edit %s: not a regular file"
msgstr "ne povis redakti %s: ne estas normala dosiero"
-#: sed/execute.c:606
+#: sed/execute.c:603
#, 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:614
+#: sed/execute.c:611
#, c-format
msgid "%s: warning: failed to get security context of %s: %s"
msgstr "%s: averto: malsukcesis preni sekurecan kuntekston de %s: %s"
-#: sed/execute.c:633 sed/utils.c:178
+#: sed/execute.c:630 sed/utils.c:188
#, c-format
msgid "couldn't open temporary file %s: %s"
msgstr "ne povis malfermi dumtempan dosieron %s: %s"
-#: sed/execute.c:1148 sed/execute.c:1358
+#: sed/execute.c:1167 sed/execute.c:1366
msgid "error in subprocess"
msgstr "eraro en subprocezo"
-#: sed/execute.c:1150
+#: sed/execute.c:1169
msgid "option `e' not supported"
msgstr "opcio 'e' ne realigita"
-#: sed/execute.c:1339
+#: sed/execute.c:1347
msgid "`e' command not supported"
msgstr "komando 'e' ne realigita"
-#: sed/execute.c:1665
+#: sed/execute.c:1662
msgid "no input files"
msgstr "mankas enig-dosieroj"
-#: sed/regexp.c:39
+#: sed/regexp.c:40
msgid "no previous regular expression"
msgstr "mankas antaŭa regula esprimo"
-#: sed/regexp.c:141
+#: sed/regexp.c:125
#, c-format
msgid "invalid reference \\%d on `s' command's RHS"
msgstr "nevalida referenco \\%d ĉe dekstra flanko de komando 's'"
-#: sed/regexp.c:259
+#: sed/regexp.c:196
msgid "regex input buffer length larger than INT_MAX"
-msgstr ""
+msgstr "eniga bufro-grando de 'regex' pli granda ol INT_MAX"
-#: sed/sed.c:35
+#: sed/sed.c:36
msgid "Jay Fenlason"
msgstr "Jay Fenlason"
-#: sed/sed.c:36
+#: sed/sed.c:37
msgid "Tom Lord"
msgstr "Tom Lord"
-#: sed/sed.c:37
+#: sed/sed.c:38
msgid "Ken Pizzini"
msgstr "Ken Pizzini"
-#: sed/sed.c:38
+#: sed/sed.c:39
msgid "Paolo Bonzini"
msgstr "Paolo Bonzini"
-#: sed/sed.c:113
-#, fuzzy, c-format
+#: sed/sed.c:40
+msgid "Jim Meyering"
+msgstr ""
+
+#: sed/sed.c:41
+msgid "Assaf Gordon"
+msgstr ""
+
+#: sed/sed.c:124
+#, c-format
msgid ""
"GNU sed home page: <https://www.gnu.org/software/sed/>.\n"
"General help using GNU software: <https://www.gnu.org/gethelp/>.\n"
msgstr ""
-"Hejmpaĝo de GNU sed: <http://www.gnu.org/software/sed/>.\n"
-"Ĝenerala helpo por uzi programaron GNU: <http://www.gnu.org/gethelp/>.\n"
+"Hejmpaĝo de GNU sed: <https://www.gnu.org/software/sed/>.\n"
+"Ĝenerala helpo por uzi programaron GNU: <https://www.gnu.org/gethelp/>.\n"
-#: sed/sed.c:120
+#: sed/sed.c:130
#, c-format
msgid "E-mail bug reports to: <%s>.\n"
msgstr "Raportu program-erarojn al <%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"
-" uzi sintakso de Perl 5 por regulaj esprimoj en programo.\n"
-
-#: sed/sed.c:134
+#: sed/sed.c:138
#, c-format
msgid ""
"Usage: %s [OPTION]... {script-only-if-no-other-script} [input-file]...\n"
@@ -634,7 +636,7 @@ msgstr ""
"dosiero]...\n"
"\n"
-#: sed/sed.c:138
+#: sed/sed.c:142
#, c-format
msgid ""
" -n, --quiet, --silent\n"
@@ -643,7 +645,16 @@ msgstr ""
" -n, --quiet, --silent\n"
" subpremi aŭtomatan presadon de ŝablono-spaco\n"
-#: sed/sed.c:140
+#: sed/sed.c:144
+#, fuzzy, c-format
+msgid ""
+" --debug\n"
+" annotate program execution\n"
+msgstr ""
+" --posix\n"
+" malŝalti ĉiujn GNU-ajn aldonaĵojn.\n"
+
+#: sed/sed.c:146
#, c-format
msgid ""
" -e script, --expression=script\n"
@@ -652,7 +663,7 @@ msgstr ""
" -e programo, --expression=programo\n"
" aldoni la programon al la plenumotaj komandoj\n"
-#: sed/sed.c:142
+#: sed/sed.c:148
#, c-format
msgid ""
" -f script-file, --file=script-file\n"
@@ -663,7 +674,7 @@ msgstr ""
" aldoni la enhavon de programdosiero al la plenumotaj "
"komandoj\n"
-#: sed/sed.c:146
+#: sed/sed.c:152
#, c-format
msgid ""
" --follow-symlinks\n"
@@ -672,7 +683,7 @@ msgstr ""
" --follow-symlinks\n"
" sekvi simbolajn ligojn, traktante dosierojn surloke\n"
-#: sed/sed.c:149
+#: sed/sed.c:155
#, c-format
msgid ""
" -i[SUFFIX], --in-place[=SUFFIX]\n"
@@ -681,7 +692,7 @@ msgstr ""
" -i[SUFIKSO], --in-place[=SUFIKSO]\n"
" redakti dosierojn surloke (savkopii se estas SUFIKSO)\n"
-#: sed/sed.c:153
+#: sed/sed.c:158
#, c-format
msgid ""
" -b, --binary\n"
@@ -692,7 +703,7 @@ msgstr ""
" malfermi dosierojn en binara reĝimo (linifinoj ne traktiĝas "
"speciale)\n"
-#: sed/sed.c:157
+#: sed/sed.c:162
#, c-format
msgid ""
" -l N, --line-length=N\n"
@@ -701,7 +712,7 @@ msgstr ""
" -l N, --line-length=N\n"
" specifi la deziratan linilongon por la komando 'l'\n"
-#: sed/sed.c:159
+#: sed/sed.c:164
#, c-format
msgid ""
" --posix\n"
@@ -710,7 +721,7 @@ msgstr ""
" --posix\n"
" malŝalti ĉiujn GNU-ajn aldonaĵojn.\n"
-#: sed/sed.c:161
+#: sed/sed.c:166
#, c-format
msgid ""
" -E, -r, --regexp-extended\n"
@@ -721,7 +732,7 @@ msgstr ""
" uzi etenditajn regulajn esprimojn en la skripto.\n"
" (por porteblo uzu POSIX -E).\n"
-#: sed/sed.c:167
+#: sed/sed.c:169
#, c-format
msgid ""
" -s, --separate\n"
@@ -732,16 +743,17 @@ msgstr ""
" konsideri dosierojn kiel apartajn anstataŭ ol unuopa,\n"
" kontinua longa fluo.\n"
-#: sed/sed.c:170
-#, fuzzy, c-format
+#: sed/sed.c:172
+#, c-format
msgid ""
" --sandbox\n"
" operate in sandbox mode (disable e/r/w commands).\n"
msgstr ""
" --sandbox\n"
-" operacii laŭ reĝimo de provejo.\n"
+" operacii laŭ reĝimo de provejo (malebligi komandojn e/r/"
+"w).\n"
-#: sed/sed.c:172
+#: sed/sed.c:174
#, c-format
msgid ""
" -u, --unbuffered\n"
@@ -754,7 +766,7 @@ msgstr ""
"kaj\n"
" malplenigi la eligobufrojn pli ofte\n"
-#: sed/sed.c:175
+#: sed/sed.c:177
#, c-format
msgid ""
" -z, --null-data\n"
@@ -763,17 +775,17 @@ msgstr ""
" -z, --null-data\n"
" apartigi liniojn per signoj NUL\n"
-#: sed/sed.c:177
+#: sed/sed.c:179
#, c-format
msgid " --help display this help and exit\n"
msgstr " --help montri ĉi tiun helpon kaj eliri\n"
-#: sed/sed.c:178
+#: sed/sed.c:180
#, c-format
msgid " --version output version information and exit\n"
msgstr " --version montri version kaj eliri\n"
-#: sed/sed.c:179
+#: sed/sed.c:181
#, c-format
msgid ""
"\n"
@@ -790,48 +802,69 @@ msgstr ""
"estas specifita, tiam la normala enigo estas legata.\n"
"\n"
-#: sed/utils.c:73 sed/utils.c:384
+#: sed/sed.c:373
+msgid "failed to set binary mode on STDIN"
+msgstr ""
+
+#: sed/sed.c:375
+msgid "failed to set binary mode on STDOUT"
+msgstr ""
+
+#: sed/utils.c:77 sed/utils.c:395
#, c-format
msgid "cannot remove %s: %s"
msgstr "ne povas forigi %s: %s"
-#: sed/utils.c:136
+#: sed/utils.c:146
#, c-format
msgid "couldn't open file %s: %s"
msgstr "ne povis malfermi dosieron %s: %s"
-#: sed/utils.c:155
+#: sed/utils.c:165
#, c-format
msgid "couldn't attach to %s: %s"
msgstr "ne povis alligiĝi al %s: %s"
#: sed/utils.c:192
#, c-format
+msgid "failed to set binary mode on '%s'"
+msgstr ""
+
+#: sed/utils.c:207
+#, 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 %llu eron al %s: %s"
msgstr[1] "ne povis skribi %llu erojn al %s: %s"
-#: sed/utils.c:204 sed/utils.c:223
+#: sed/utils.c:219 sed/utils.c:238
#, c-format
msgid "read error on %s: %s"
msgstr "legeraro ĉe %s: %s"
-#: sed/utils.c:325
+#: sed/utils.c:336
#, c-format
msgid "couldn't follow symlink %s: %s"
msgstr "ne povis sekvi simbolan ligon %s: %s"
-#: sed/utils.c:359
+#: sed/utils.c:370
#, c-format
msgid "cannot stat %s: %s"
msgstr "ne povas stat-i %s: %s"
-#: sed/utils.c:389
+#: sed/utils.c:400
#, c-format
msgid "cannot rename %s: %s"
msgstr "ne povas renomi %s: %s"
+#~ msgid ""
+#~ " -R, --regexp-perl\n"
+#~ " use Perl 5's regular expressions syntax in the script.\n"
+#~ msgstr ""
+#~ " -R, --regexp-perl\n"
+#~ " uzi sintakso de Perl 5 por regulaj esprimoj en "
+#~ "programo.\n"
+
#~ msgid "%s: option '--%s' doesn't allow an argument\n"
#~ msgstr "%s: modifilo '--%s' ne permesas argumenton\n"
diff --git a/po/es.gmo b/po/es.gmo
index 2e6ae3d..547edf5 100644
--- a/po/es.gmo
+++ b/po/es.gmo
Binary files differ
diff --git a/po/es.po b/po/es.po
index 964820e..12ccd3c 100644
--- a/po/es.po
+++ b/po/es.po
@@ -1,23 +1,23 @@
-# Spanish mensages for GNU sed 4.4.104
-# Copyright (C) 2001- 2018 Free Software Foundation, Inc.
+# Mensajes en español para GNU sed.
+# Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software Foundation, Inc.
# This file is distributed under the same license as the sed package.
-# Cristian Othón Martínez Vera <cfuga@cfuga.mx>, 2001- 2011.
-# Francisco Javier Serrador <fserrador@gmail.com>, 2018
+# Cristian Othón Martínez Vera <cfuga@cfuga.mx>, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011.
+# Antonio Ceballos Roa <aceballos@gmail.com>, 2018
+#
msgid ""
msgstr ""
-"Project-Id-Version: sed 4.4.104\n"
+"Project-Id-Version: sed 4.5.48\n"
"Report-Msgid-Bugs-To: bug-gnu-utils@gnu.org\n"
-"POT-Creation-Date: 2018-03-31 18:40-0700\n"
-"PO-Revision-Date: 2018-03-25 21:23+0200\n"
-"Last-Translator: Francisco Javier Serrador <fserrador@gmail.com>\n"
+"POT-Creation-Date: 2018-12-20 22:03-0800\n"
+"PO-Revision-Date: 2018-12-18 01:30+0100\n"
+"Last-Translator: Antonio Ceballos Roa <aceballos@gmail.com>\n"
"Language-Team: Spanish <es@tp.org.es>\n"
"Language: es\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
-"Content-Transfer-Encoding: 8bit\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"
-"X-Generator: Poedit 2.0.4\n"
#: lib/closeout.c:122
msgid "write error"
@@ -26,82 +26,82 @@ msgstr "error de escritura"
#: lib/copy-acl.c:54
#, c-format
msgid "preserving permissions for %s"
-msgstr "se conservan los permisos de %s"
+msgstr "se preservan los permisos de %s"
-#: lib/dfa.c:958
+#: lib/dfa.c:970
msgid "unbalanced ["
-msgstr "desbalanceado ["
+msgstr "[ descompensado"
-#: lib/dfa.c:1079
+#: lib/dfa.c:1091
msgid "invalid character class"
-msgstr "clase de carácter inválido"
+msgstr "clase de carácter no válida"
-#: lib/dfa.c:1205
+#: lib/dfa.c:1217
msgid "character class syntax is [[:space:]], not [:space:]"
-msgstr "sintaxis de clase de carácter es [[:espacio:]], no [:espacio:]"
+msgstr "la sintaxis de esta clase de carácter es [[:space:]], no [:space:]"
-#: lib/dfa.c:1272
+#: lib/dfa.c:1284
msgid "unfinished \\ escape"
-msgstr "escape \\ no terminado"
+msgstr "escape \\ sin acabar"
-#: lib/dfa.c:1433
+#: lib/dfa.c:1445
msgid "invalid content of \\{\\}"
msgstr "contenido inválido de \\{\\}"
-#: lib/dfa.c:1436
+#: lib/dfa.c:1448
msgid "regular expression too big"
msgstr "expresión regular demasiado grande"
-#: lib/dfa.c:1850
+#: lib/dfa.c:1863
msgid "unbalanced ("
-msgstr "desbalanceado ("
+msgstr "( descompensado"
-#: lib/dfa.c:1968
+#: lib/dfa.c:1981
msgid "no syntax specified"
-msgstr "sin sintaxis especificada"
+msgstr "sintaxis no especificada"
-#: lib/dfa.c:1976
+#: lib/dfa.c:1992
msgid "unbalanced )"
-msgstr "desbalanceado )"
+msgstr ") descompensado"
#: lib/error.c:195
msgid "Unknown system error"
-msgstr "Error de sistema desconocido"
+msgstr "Error del sistema desconocido"
#: lib/getopt.c:278
#, c-format
msgid "%s: option '%s%s' is ambiguous\n"
-msgstr "%s: opción «%s%s» es ambigua\n"
+msgstr "%s: la opción '%s%s' es ambigua\n"
#: lib/getopt.c:284
#, c-format
msgid "%s: option '%s%s' is ambiguous; possibilities:"
-msgstr "%s: opción «%s%s» es ambigua; posibilidades:"
+msgstr "%s: la opción '%s%s' es ambigua: posibilidades:"
#: lib/getopt.c:319
#, c-format
msgid "%s: unrecognized option '%s%s'\n"
-msgstr "%s: opción «%s%s» no reconocida\n"
+msgstr "%s: no se reconoce la opción '%s%s'\n"
#: lib/getopt.c:345
#, c-format
msgid "%s: option '%s%s' doesn't allow an argument\n"
-msgstr "%s: opción «%s%s» no permite un argumento\n"
+msgstr "%s: la opción '%s%s' no admite argumento\n"
#: lib/getopt.c:360
#, c-format
msgid "%s: option '%s%s' requires an argument\n"
-msgstr "%s: opción «%s%s» requiere un argumento\n"
+msgstr "%s: la opción '%s%s' requiere argumento\n"
#: lib/getopt.c:621
#, c-format
msgid "%s: invalid option -- '%c'\n"
-msgstr "%s: opción no válida -- «%c»\n"
+msgstr "%s: la opción no es válida -- '%c'\n"
#: lib/getopt.c:636 lib/getopt.c:682
#, c-format
msgid "%s: option requires an argument -- '%c'\n"
-msgstr "%s: la opción requiere un argumento -- '%c'\n"
+msgstr "%s: la opción requiere argumento -- '%c'\n"
#: lib/obstack.c:338 lib/obstack.c:340 lib/xalloc-die.c:34
msgid "memory exhausted"
@@ -138,7 +138,7 @@ msgstr "»"
#: lib/regcomp.c:135
msgid "Success"
-msgstr "Correcto"
+msgstr "Éxito"
#: lib/regcomp.c:138
msgid "No match"
@@ -154,7 +154,7 @@ msgstr "Carácter de ordenamiento inválido"
#: lib/regcomp.c:147
msgid "Invalid character class name"
-msgstr "Nombre de clase de carácter inválido"
+msgstr "Carácter de nombre de clase inválido"
#: lib/regcomp.c:150
msgid "Trailing backslash"
@@ -166,11 +166,11 @@ msgstr "Referencia hacia atrás inválida"
#: lib/regcomp.c:156
msgid "Unmatched [, [^, [:, [., or [="
-msgstr "Incompleto [, [^, [:, [., or [="
+msgstr "[, [^, [:, [. o [= sin pareja"
#: lib/regcomp.c:159
msgid "Unmatched ( or \\("
-msgstr "( o \\( sin pareja"
+msgstr "( ó \\( sin pareja"
#: lib/regcomp.c:162
msgid "Unmatched \\{"
@@ -202,9 +202,9 @@ msgstr "Expresión regular demasiado grande"
#: lib/regcomp.c:183
msgid "Unmatched ) or \\)"
-msgstr ") o \\) sin pareja"
+msgstr ") ó \\) sin pareja"
-#: lib/regcomp.c:689
+#: lib/regcomp.c:688
msgid "No previous regular expression"
msgstr "No hay una expresión regular previa"
@@ -213,12 +213,12 @@ msgstr "No hay una expresión regular previa"
msgid "setting permissions for %s"
msgstr "estableciendo permisos para %s"
-#: lib/version-etc.c:74
+#: lib/version-etc.c:73
#, c-format
msgid "Packaged by %s (%s)\n"
msgstr "Empaquetado por %s (%s)\n"
-#: lib/version-etc.c:77
+#: lib/version-etc.c:76
#, c-format
msgid "Packaged by %s\n"
msgstr "Empaquetado por %s\n"
@@ -226,11 +226,11 @@ msgstr "Empaquetado por %s\n"
#. TRANSLATORS: Translate "(C)" to the copyright symbol
#. (C-in-a-circle), if this symbol is available in the user's
#. locale. Otherwise, do not translate "(C)"; leave it as-is.
-#: lib/version-etc.c:84
+#: lib/version-etc.c:83
msgid "(C)"
msgstr "©"
-#: lib/version-etc.c:86
+#: lib/version-etc.c:85
msgid ""
"\n"
"License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl."
@@ -240,10 +240,10 @@ msgid ""
"\n"
msgstr ""
"\n"
-"License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl."
-"html>\n"
-"This is free software: you are free to change and redistribute it.\n"
-"There is NO WARRANTY, to the extent permitted by law.\n"
+"Licencia GPLv3+: GNU GPL versión 3 o posterior <https://gnu.org/licenses/gpl."
+"html>.\n"
+"Esto es software libre: Puede modificarse y redistribuirse libremente.\n"
+"No hay NINGUNA GARANTÍA, dentro de los marcos legales.\n"
"\n"
#. TRANSLATORS: %s denotes an author name.
@@ -262,7 +262,7 @@ msgstr "Escrito por %s y %s.\n"
#: lib/version-etc.c:110
#, c-format
msgid "Written by %s, %s, and %s.\n"
-msgstr "Escrito por %s, %s, y %s.\n"
+msgstr "Escrito por %s, %s y %s.\n"
#. TRANSLATORS: Each %s denotes an author name.
#. You can use line breaks, estimating that each author name occupies
@@ -273,7 +273,7 @@ msgid ""
"Written by %s, %s, %s,\n"
"and %s.\n"
msgstr ""
-"Escrito por %s, %s, %s,\n"
+"Escrito por %s, %s, %s\n"
"y %s.\n"
#. TRANSLATORS: Each %s denotes an author name.
@@ -286,7 +286,7 @@ msgid ""
"%s, and %s.\n"
msgstr ""
"Escrito por %s, %s, %s,\n"
-"%s, y %s.\n"
+"%s y %s.\n"
#. TRANSLATORS: Each %s denotes an author name.
#. You can use line breaks, estimating that each author name occupies
@@ -298,7 +298,7 @@ msgid ""
"%s, %s, and %s.\n"
msgstr ""
"Escrito por %s, %s, %s,\n"
-"%s, %s, y %s.\n"
+"%s, %s y %s.\n"
#. TRANSLATORS: Each %s denotes an author name.
#. You can use line breaks, estimating that each author name occupies
@@ -310,7 +310,7 @@ msgid ""
"%s, %s, %s, and %s.\n"
msgstr ""
"Escrito por %s, %s, %s,\n"
-"%s, %s, %s, y %s.\n"
+"%s, %s, %s y %s.\n"
#. TRANSLATORS: Each %s denotes an author name.
#. You can use line breaks, estimating that each author name occupies
@@ -323,7 +323,7 @@ msgid ""
"and %s.\n"
msgstr ""
"Escrito por %s, %s, %s,\n"
-"%s, %s, %s, %s,\n"
+"%s, %s, %s, %s\n"
"y %s.\n"
#. TRANSLATORS: Each %s denotes an author name.
@@ -338,7 +338,7 @@ msgid ""
msgstr ""
"Escrito por %s, %s, %s,\n"
"%s, %s, %s, %s,\n"
-"%s, y %s.\n"
+"%s y %s.\n"
#. TRANSLATORS: Each %s denotes an author name.
#. You can use line breaks, estimating that each author name occupies
@@ -352,7 +352,7 @@ msgid ""
msgstr ""
"Escrito por %s, %s, %s,\n"
"%s, %s, %s, %s,\n"
-"%s, %s, y otros.\n"
+"%s, %s y otros.\n"
#. TRANSLATORS: The placeholder indicates the bug-reporting address
#. for this package. Please add _another line_ saying
@@ -365,27 +365,26 @@ msgid ""
"Report bugs to: %s\n"
msgstr ""
"\n"
-"Declarar defectos a: %s\n"
+"Informar de errores a: %s\n"
#: lib/version-etc.c:247
#, c-format
msgid "Report %s bugs to: %s\n"
-msgstr "Comunicar %s defectos a: %s\n"
+msgstr "Informar de errores de %s a: %s\n"
#: lib/version-etc.c:251
#, c-format
msgid "%s home page: <%s>\n"
-msgstr "%s página inicial: <%s>\n"
+msgstr "%s página de inicio: <%s>\n"
#: lib/version-etc.c:253
#, c-format
msgid "%s home page: <https://www.gnu.org/software/%s/>\n"
-msgstr "Página inicial %s: <http://www.gnu.org/software/%s/>\n"
+msgstr "%s página de inicio: <https://www.gnu.org/software/%s/>\n"
#: lib/version-etc.c:256
msgid "General help using GNU software: <https://www.gnu.org/gethelp/>\n"
-msgstr ""
-"Ayuda general utilizando software GNU: <https://www.gnu.org/gethelp/>\n"
+msgstr "Ayuda general para usar software GNU: <http://www.gnu.org/gethelp/>.\n"
#: sed/compile.c:146
msgid "multiple `!'s"
@@ -401,7 +400,7 @@ msgstr "uso inválido de +N o ~N como primera dirección"
#: sed/compile.c:150
msgid "unmatched `{'"
-msgstr "`{' desemparejado"
+msgstr "`{' sin pareja"
#: sed/compile.c:151
msgid "unexpected `}'"
@@ -413,7 +412,7 @@ msgstr "caracteres extra después de la orden"
#: sed/compile.c:155
msgid "expected \\ after `a', `c' or `i'"
-msgstr "se esperaba \\ después de `a', `c' o `i'"
+msgstr "se esperaba \\ después de `a', `c' ó `i'"
#: sed/compile.c:157
msgid "`}' doesn't want any addresses"
@@ -435,169 +434,185 @@ msgstr "orden faltante"
msgid "command only uses one address"
msgstr "la orden solamente usa una dirección"
-#: sed/compile.c:164
+#: sed/compile.c:165
msgid "unterminated address regex"
msgstr "dirección de expresión regular sin terminar"
-#: sed/compile.c:165
+#: sed/compile.c:166
msgid "unterminated `s' command"
msgstr "orden `s' sin terminar"
-#: sed/compile.c:166
+#: sed/compile.c:167
msgid "unterminated `y' command"
msgstr "orden `y' sin terminar"
-#: sed/compile.c:167
+#: sed/compile.c:168
msgid "unknown option to `s'"
msgstr "opción desconocida para `s'"
-#: sed/compile.c:169
+#: sed/compile.c:170
msgid "multiple `p' options to `s' command"
msgstr "múltiples opciones `p' para la orden `s'"
-#: sed/compile.c:171
+#: sed/compile.c:172
msgid "multiple `g' options to `s' command"
-msgstr "múltiples opciones «g» para la orden «s»"
+msgstr "múltiples opciones `g' para la orden `s'"
-#: sed/compile.c:173
+#: sed/compile.c:174
msgid "multiple number options to `s' command"
msgstr "múltiples opciones numéricas para la orden `s'"
-#: sed/compile.c:175
+#: sed/compile.c:176
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:177
+#: sed/compile.c:178
msgid "strings for `y' command are different lengths"
msgstr "las cadenas para la orden `y' son de longitudes diferentes"
-#: sed/compile.c:179
+#: sed/compile.c:180
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:181
+#: sed/compile.c:182
msgid "expected newer version of sed"
msgstr "se esperaba una versión más reciente de sed"
-#: sed/compile.c:183
+#: sed/compile.c:184
msgid "invalid usage of line address 0"
msgstr "uso inválido de la dirección de línea 0"
-#: sed/compile.c:184
+#: sed/compile.c:185
#, c-format
msgid "unknown command: `%c'"
msgstr "orden desconocida: `%c'"
-#: sed/compile.c:186
+#: sed/compile.c:187
msgid "incomplete command"
msgstr "orden incompleta"
-#: sed/compile.c:188
+#: sed/compile.c:189
msgid "\":\" lacks a label"
-msgstr "\":\" falta una etiqueta"
+msgstr "\":\" carece de etiqueta"
-#: sed/compile.c:190
+#: sed/compile.c:191
msgid "recursive escaping after \\c not allowed"
-msgstr "escape recursivo tras \\c no permitido"
+msgstr "el escape recursivo detrás de \\c no está permitido"
-#: sed/compile.c:213
+#: sed/compile.c:193
+msgid "e/r/w commands disabled in sandbox mode"
+msgstr "las órdenes e/r/w están desactivadas en el modo «sandbox»"
+
+#: sed/compile.c:215
#, c-format
msgid "%s: file %s line %lu: %s\n"
msgstr "%s: fichero %s línea %lu: %s\n"
-#: sed/compile.c:216
+#: sed/compile.c:218
#, 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:1644
+#: sed/compile.c:1607
#, 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:254 sed/execute.c:271
+#: sed/execute.c:253 sed/execute.c:270
#, c-format
msgid "case conversion produced an invalid character"
-msgstr "conversión case produjo un carácter inválido"
+msgstr ""
+"se ha obtenido un carácter no válido al convertir de mayúsculas a minúsculas "
+"o viceversa"
-#: sed/execute.c:565
+#: sed/execute.c:561
#, c-format
msgid "%s: can't read %s: %s\n"
msgstr "%s: no se puede leer %s: %s\n"
-#: sed/execute.c:590
+#: sed/execute.c:587
#, c-format
msgid "couldn't edit %s: is a terminal"
msgstr "no se puede editar %s: es una terminal"
-#: sed/execute.c:595
+#: sed/execute.c:592
#, 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:606
+#: sed/execute.c:603
#, 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:614
+#: sed/execute.c:611
#, 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:633 sed/utils.c:178
+#: sed/execute.c:630 sed/utils.c:188
#, c-format
msgid "couldn't open temporary file %s: %s"
msgstr "no se puede abrir el fichero temporal %s: %s"
-#: sed/execute.c:1148 sed/execute.c:1358
+#: sed/execute.c:1167 sed/execute.c:1366
msgid "error in subprocess"
msgstr "error en el subproceso"
-#: sed/execute.c:1150
+#: sed/execute.c:1169
msgid "option `e' not supported"
-msgstr " opción `e' no soportada"
+msgstr "no hay soporte para la opción `e'"
-#: sed/execute.c:1339
+#: sed/execute.c:1347
msgid "`e' command not supported"
-msgstr "orden `e' no soportada"
+msgstr "no hay soporte para la orden `e'"
-#: sed/execute.c:1665
+#: sed/execute.c:1662
msgid "no input files"
msgstr "no hay ficheros de entrada"
-#: sed/regexp.c:39
+#: sed/regexp.c:40
msgid "no previous regular expression"
msgstr "no hay una expresión regular previa"
-#: sed/regexp.c:141
+#: sed/regexp.c:125
#, c-format
msgid "invalid reference \\%d on `s' command's RHS"
-msgstr "referencia \\%d inválida en el lado derecho de la orden «s»"
+msgstr "referencia \\%d inválida en el lado derecho de la orden `s'"
-#: sed/regexp.c:259
+#: sed/regexp.c:196
msgid "regex input buffer length larger than INT_MAX"
-msgstr "longitud de búfer exreg entrante mayor que INT_MAX"
+msgstr ""
+"la longitud del «buffer» de entrada de la expresión regular es mayor que "
+"INT_MAX"
-#: sed/sed.c:35
+#: sed/sed.c:36
msgid "Jay Fenlason"
msgstr "Jay Fenlason"
-#: sed/sed.c:36
+#: sed/sed.c:37
msgid "Tom Lord"
msgstr "Tom Lord"
-#: sed/sed.c:37
+#: sed/sed.c:38
msgid "Ken Pizzini"
msgstr "Ken Pizzini"
-#: sed/sed.c:38
+#: sed/sed.c:39
msgid "Paolo Bonzini"
msgstr "Paolo Bonzini"
-#: sed/sed.c:113
+#: sed/sed.c:40
+msgid "Jim Meyering"
+msgstr "Jim Meyering"
+
+#: sed/sed.c:41
+msgid "Assaf Gordon"
+msgstr "Assaf Gordon"
+
+#: sed/sed.c:124
#, c-format
msgid ""
"GNU sed home page: <https://www.gnu.org/software/sed/>.\n"
@@ -606,33 +621,21 @@ msgstr ""
"Página web de sed de GNU: <https://www.gnu.org/software/sed/>.\n"
"Ayuda general para usar software GNU: <https://www.gnu.org/gethelp/>.\n"
-#: sed/sed.c:120
+#: sed/sed.c:130
#, c-format
msgid "E-mail bug reports to: <%s>.\n"
-msgstr ""
-"Correo-e del boletín de defectos a: <%s>.\n"
-" \n"
+msgstr "E-mail para informar de errores: <%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"
-" utiliza la sintaxis de expresiones regulares de Perl 5\n"
-" en el guión.\n"
-
-#: sed/sed.c:134
+#: sed/sed.c:138
#, c-format
msgid ""
"Usage: %s [OPTION]... {script-only-if-no-other-script} [input-file]...\n"
"\n"
msgstr ""
-"Modo de empleo: %s [OPCIÓN]... {guión-sólo-si-no-hay-otro-guión} [fichero-"
-"entrada]...\n"
+"Uso: %s [OPCIÓN]... {guión-sólo-si-no-hay-otro-guión} [fichero-entrada]...\n"
"\n"
-#: sed/sed.c:138
+#: sed/sed.c:142
#, c-format
msgid ""
" -n, --quiet, --silent\n"
@@ -641,16 +644,25 @@ msgstr ""
" -n, --quiet, --silent\n"
" suprime la muestra automática del espacio de patrones\n"
-#: sed/sed.c:140
+#: sed/sed.c:144
+#, c-format
+msgid ""
+" --debug\n"
+" annotate program execution\n"
+msgstr ""
+" --debug\n"
+" ejecución del programa con notas\n"
+
+#: sed/sed.c:146
#, c-format
msgid ""
" -e script, --expression=script\n"
" add the script to the commands to be executed\n"
msgstr ""
" -e guión, --expression=guión\n"
-" añade el guión a la lista de órdenes para ser ejecutado\n"
+" agrega el guión a la lista de órdenes para ejecutar\n"
-#: sed/sed.c:142
+#: sed/sed.c:148
#, c-format
msgid ""
" -f script-file, --file=script-file\n"
@@ -662,7 +674,7 @@ msgstr ""
"órdenes\n"
" para ejecutar\n"
-#: sed/sed.c:146
+#: sed/sed.c:152
#, c-format
msgid ""
" --follow-symlinks\n"
@@ -671,7 +683,7 @@ msgstr ""
" --follow-symlinks\n"
" sigue los enlaces simbólicos al procesar en el lugar\n"
-#: sed/sed.c:149
+#: sed/sed.c:155
#, c-format
msgid ""
" -i[SUFFIX], --in-place[=SUFFIX]\n"
@@ -681,7 +693,7 @@ msgstr ""
" edita ficheros en el lugar (crea un respaldo si se da\n"
" un SUFIJO)\n"
-#: sed/sed.c:153
+#: sed/sed.c:158
#, c-format
msgid ""
" -b, --binary\n"
@@ -692,7 +704,7 @@ msgstr ""
" abre ficheros en modo binario (los RC+FLs no se procesan\n"
" especialmente)\n"
-#: sed/sed.c:157
+#: sed/sed.c:162
#, c-format
msgid ""
" -l N, --line-length=N\n"
@@ -702,7 +714,7 @@ msgstr ""
" especifica la longitud de corte de línea deseado para\n"
" la orden `l'\n"
-#: sed/sed.c:159
+#: sed/sed.c:164
#, c-format
msgid ""
" --posix\n"
@@ -711,17 +723,18 @@ msgstr ""
" --posix\n"
" desactiva todas las extensiones de GNU.\n"
-#: sed/sed.c:161
+#: sed/sed.c:166
#, c-format
msgid ""
" -E, -r, --regexp-extended\n"
" use extended regular expressions in the script\n"
" (for portability use POSIX -E).\n"
msgstr ""
-" -E, --regexp-extended\n"
-" utiliza expresiones regulares extendidas en el guión.\n"
+" -E, -r, --regexp-extended\n"
+" utiliza expresiones regulares extendidas en el guión\n"
+" (para que sea portable utilice POSIX -E).\n"
-#: sed/sed.c:167
+#: sed/sed.c:169
#, c-format
msgid ""
" -s, --separate\n"
@@ -729,19 +742,19 @@ msgid ""
" continuous long stream.\n"
msgstr ""
" -s, --separate\n"
-" considera los ficheros como separados en lugar\n"
-"\t\t de un solo flujo, largo y continuo.\n"
+" considera los ficheros como separados en lugar de un solo\n"
+" flujo, largo y continuo.\n"
-#: sed/sed.c:170
+#: sed/sed.c:172
#, c-format
msgid ""
" --sandbox\n"
" operate in sandbox mode (disable e/r/w commands).\n"
msgstr ""
" --sandbox\n"
-" opera en modo sandbox (desactiva órdenes e/r/w).\n"
+" opera en modo «sandbox» (desactiva las órdenes e/r/w).\n"
-#: sed/sed.c:172
+#: sed/sed.c:174
#, c-format
msgid ""
" -u, --unbuffered\n"
@@ -755,26 +768,26 @@ msgstr ""
" y vacía los almacenamientos temporales de salida con más\n"
" frecuencia\n"
-#: sed/sed.c:175
+#: sed/sed.c:177
#, c-format
msgid ""
" -z, --null-data\n"
" separate lines by NUL characters\n"
msgstr ""
" -z, --null-data\n"
-" separa líneas por caracteres NULO\n"
+" separa con caracteres NUL las líneas\n"
-#: sed/sed.c:177
+#: sed/sed.c:179
#, c-format
msgid " --help display this help and exit\n"
msgstr " --help muestra esta ayuda y termina\n"
-#: sed/sed.c:178
+#: sed/sed.c:180
#, 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:179
+#: sed/sed.c:181
#, c-format
msgid ""
"\n"
@@ -792,50 +805,71 @@ msgstr ""
"la entrada estándard.\n"
"\n"
-#: sed/utils.c:73 sed/utils.c:384
+#: sed/sed.c:373
+msgid "failed to set binary mode on STDIN"
+msgstr "falló al establecer el modo binario en STDIN"
+
+#: sed/sed.c:375
+msgid "failed to set binary mode on STDOUT"
+msgstr "falló al establecer el modo binario en STDOUT"
+
+#: sed/utils.c:77 sed/utils.c:395
#, c-format
msgid "cannot remove %s: %s"
msgstr "no se puede eliminar %s: %s"
-#: sed/utils.c:136
+#: sed/utils.c:146
#, 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:155
+#: sed/utils.c:165
#, c-format
msgid "couldn't attach to %s: %s"
msgstr "no se puede conectar a %s: %s"
#: sed/utils.c:192
#, c-format
+msgid "failed to set binary mode on '%s'"
+msgstr "falló al establecer el modo binario en '%s'"
+
+#: sed/utils.c:207
+#, 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 %llu elemento a %s: %s"
-msgstr[1] "no se pueden escribir %llu elementos a %s: %s"
+msgstr[0] "no se pudo escribir %llu elemento a %s: %s"
+msgstr[1] "no se pudieron escribir %llu elementos a %s: %s"
-#: sed/utils.c:204 sed/utils.c:223
+#: sed/utils.c:219 sed/utils.c:238
#, c-format
msgid "read error on %s: %s"
msgstr "error al leer de %s: %s"
-#: sed/utils.c:325
+#: sed/utils.c:336
#, c-format
msgid "couldn't follow symlink %s: %s"
msgstr "no se puede seguir el enlace simbólico %s: %s"
-#: sed/utils.c:359
+#: sed/utils.c:370
#, c-format
msgid "cannot stat %s: %s"
msgstr "no se puede obtener la información de stat de %s: %s"
-#: sed/utils.c:389
+#: sed/utils.c:400
#, c-format
msgid "cannot rename %s: %s"
msgstr "no se puede renombrar %s: %s"
+#~ msgid ""
+#~ " -R, --regexp-perl\n"
+#~ " use Perl 5's regular expressions syntax in the script.\n"
+#~ msgstr ""
+#~ " -R, --regexp-perl\n"
+#~ " utiliza la sintaxis de expresiones regulares de Perl 5\n"
+#~ " en el guión.\n"
+
#~ msgid "cannot specify modifiers on empty regexp"
#~ msgstr ""
#~ "no se pueden especificar modificadores en expresiones regulares vacías"
diff --git a/po/et.gmo b/po/et.gmo
index ee8af51..d763cf3 100644
--- a/po/et.gmo
+++ b/po/et.gmo
Binary files differ
diff --git a/po/et.po b/po/et.po
index 9778d14..1bd8800 100644
--- a/po/et.po
+++ b/po/et.po
@@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: sed 4.2.2.177\n"
"Report-Msgid-Bugs-To: bug-gnu-utils@gnu.org\n"
-"POT-Creation-Date: 2018-03-31 18:40-0700\n"
+"POT-Creation-Date: 2018-12-20 22:03-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"
@@ -29,39 +29,39 @@ msgstr "viga kirjutamisel"
msgid "preserving permissions for %s"
msgstr "säilitan %s õigused"
-#: lib/dfa.c:958
+#: lib/dfa.c:970
msgid "unbalanced ["
msgstr "balanseerimata ["
-#: lib/dfa.c:1079
+#: lib/dfa.c:1091
msgid "invalid character class"
msgstr "vigane sümbolite klass"
-#: lib/dfa.c:1205
+#: lib/dfa.c:1217
msgid "character class syntax is [[:space:]], not [:space:]"
msgstr "sümbolite klassi süntaks on [[:space:]], mitte [:space:]"
-#: lib/dfa.c:1272
+#: lib/dfa.c:1284
msgid "unfinished \\ escape"
msgstr "lõpetamata \\ paojada"
-#: lib/dfa.c:1433
+#: lib/dfa.c:1445
msgid "invalid content of \\{\\}"
msgstr "vigane \\{\\} sisu"
-#: lib/dfa.c:1436
+#: lib/dfa.c:1448
msgid "regular expression too big"
msgstr "regulaaravaldis on liiga suur"
-#: lib/dfa.c:1850
+#: lib/dfa.c:1863
msgid "unbalanced ("
msgstr "balanseerimata ("
-#: lib/dfa.c:1968
+#: lib/dfa.c:1981
msgid "no syntax specified"
msgstr "süntaksi pole antud"
-#: lib/dfa.c:1976
+#: lib/dfa.c:1992
msgid "unbalanced )"
msgstr "balanseerimata )"
@@ -205,7 +205,7 @@ msgstr "Regulaaravaldis on liiga suur"
msgid "Unmatched ) or \\)"
msgstr "Puudub ) või \\)"
-#: lib/regcomp.c:689
+#: lib/regcomp.c:688
msgid "No previous regular expression"
msgstr "Eelmist regulaaravaldist pole"
@@ -214,12 +214,12 @@ msgstr "Eelmist regulaaravaldist pole"
msgid "setting permissions for %s"
msgstr "sean %s õigused"
-#: lib/version-etc.c:74
+#: lib/version-etc.c:73
#, c-format
msgid "Packaged by %s (%s)\n"
msgstr "Paketeerinud %s (%s)\n"
-#: lib/version-etc.c:77
+#: lib/version-etc.c:76
#, c-format
msgid "Packaged by %s\n"
msgstr "Paketeerinud %s\n"
@@ -227,11 +227,11 @@ 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
+#: lib/version-etc.c:83
msgid "(C)"
msgstr "©"
-#: lib/version-etc.c:86
+#: lib/version-etc.c:85
#, fuzzy
msgid ""
"\n"
@@ -437,168 +437,180 @@ msgstr "käsk puudub"
msgid "command only uses one address"
msgstr "käsk kasutab vaid üht aadressi"
-#: sed/compile.c:164
+#: sed/compile.c:165
msgid "unterminated address regex"
msgstr "lõpetamata aadressi avaldis"
-#: sed/compile.c:165
+#: sed/compile.c:166
msgid "unterminated `s' command"
msgstr "lõpetamata `s' käsk"
-#: sed/compile.c:166
+#: sed/compile.c:167
msgid "unterminated `y' command"
msgstr "lõpetamata `y' käsk"
-#: sed/compile.c:167
+#: sed/compile.c:168
msgid "unknown option to `s'"
msgstr "tundmatu võti `s' käsule"
-#: sed/compile.c:169
+#: sed/compile.c:170
msgid "multiple `p' options to `s' command"
msgstr "korduv `p' võti `s' käsus"
-#: sed/compile.c:171
+#: sed/compile.c:172
msgid "multiple `g' options to `s' command"
msgstr "korduv `g' võti `s' käsus"
-#: sed/compile.c:173
+#: sed/compile.c:174
msgid "multiple number options to `s' command"
msgstr "korduvad numbrivõtmed `s' käsus"
-#: sed/compile.c:175
+#: sed/compile.c:176
msgid "number option to `s' command may not be zero"
msgstr "numbrivõti `s' käsus ei või olla null"
-#: sed/compile.c:177
+#: sed/compile.c:178
msgid "strings for `y' command are different lengths"
msgstr "sõned käsus `y' on erineva pikkusega"
-#: sed/compile.c:179
+#: sed/compile.c:180
msgid "delimiter character is not a single-byte character"
msgstr "eraldav sübol ei ole ühe-baidiline sümbol"
-#: sed/compile.c:181
+#: sed/compile.c:182
msgid "expected newer version of sed"
msgstr "oodati sedi uuemat versiooni"
-#: sed/compile.c:183
+#: sed/compile.c:184
msgid "invalid usage of line address 0"
msgstr "vigane rea aadressi 0 kasutamine"
-#: sed/compile.c:184
+#: sed/compile.c:185
#, c-format
msgid "unknown command: `%c'"
msgstr "tundmatu käsk: `%c'"
-#: sed/compile.c:186
+#: sed/compile.c:187
msgid "incomplete command"
msgstr "poolik käsk"
-#: sed/compile.c:188
+#: sed/compile.c:189
msgid "\":\" lacks a label"
msgstr "\":\" märgend puudub"
-#: sed/compile.c:190
+#: sed/compile.c:191
msgid "recursive escaping after \\c not allowed"
msgstr "rekursiivne paojada peale \\c ei ole lubatud"
-#: sed/compile.c:213
+#: sed/compile.c:193
+msgid "e/r/w commands disabled in sandbox mode"
+msgstr ""
+
+#: sed/compile.c:215
#, c-format
msgid "%s: file %s line %lu: %s\n"
msgstr "%s: fail %s rida %lu: %s\n"
-#: sed/compile.c:216
+#: sed/compile.c:218
#, c-format
msgid "%s: -e expression #%lu, char %lu: %s\n"
msgstr "%s: -e avaldis #%lu, sümbol %lu: %s\n"
-#: sed/compile.c:1644
+#: sed/compile.c:1607
#, c-format
msgid "can't find label for jump to `%s'"
msgstr "ei leia märgendit, et hüpata kohale `%s'"
-#: sed/execute.c:254 sed/execute.c:271
+#: sed/execute.c:253 sed/execute.c:270
#, c-format
msgid "case conversion produced an invalid character"
msgstr "Sümboli suuruse teisendus tekitas vigase sümboli"
-#: sed/execute.c:565
+#: sed/execute.c:561
#, c-format
msgid "%s: can't read %s: %s\n"
msgstr "%s: ei saa lugeda %s: %s\n"
-#: sed/execute.c:590
+#: sed/execute.c:587
#, c-format
msgid "couldn't edit %s: is a terminal"
msgstr "%s ei saa toimetada: see on terminal"
-#: sed/execute.c:595
+#: sed/execute.c:592
#, c-format
msgid "couldn't edit %s: not a regular file"
msgstr "%s ei saa toimetada: see ei ole tavaline fail"
-#: sed/execute.c:606
+#: sed/execute.c:603
#, c-format
msgid "%s: warning: failed to set default file creation context to %s: %s"
msgstr ""
"%s: hoiatus: faili loomise vaikimisi konteksti seadmine ebaõnnestus %s: %s"
-#: sed/execute.c:614
+#: sed/execute.c:611
#, c-format
msgid "%s: warning: failed to get security context of %s: %s"
msgstr "%s: hoiatus: %s turvakonteksti lugemine ebaõnnestus: %s"
-#: sed/execute.c:633 sed/utils.c:178
+#: sed/execute.c:630 sed/utils.c:188
#, c-format
msgid "couldn't open temporary file %s: %s"
msgstr "ajutist faili %s ei saa avada: %s"
-#: sed/execute.c:1148 sed/execute.c:1358
+#: sed/execute.c:1167 sed/execute.c:1366
msgid "error in subprocess"
msgstr "viga alamprotsessis"
-#: sed/execute.c:1150
+#: sed/execute.c:1169
msgid "option `e' not supported"
msgstr "võtit `e' ei toetata"
-#: sed/execute.c:1339
+#: sed/execute.c:1347
msgid "`e' command not supported"
msgstr "käsku `e' ei toetata"
-#: sed/execute.c:1665
+#: sed/execute.c:1662
msgid "no input files"
msgstr "sisendfaile pole"
-#: sed/regexp.c:39
+#: sed/regexp.c:40
msgid "no previous regular expression"
msgstr "eelmist regulaaravaldist pole"
-#: sed/regexp.c:141
+#: sed/regexp.c:125
#, c-format
msgid "invalid reference \\%d on `s' command's RHS"
msgstr "vigane viide \\%d käsu `s' paremas pooles"
-#: sed/regexp.c:259
+#: sed/regexp.c:196
msgid "regex input buffer length larger than INT_MAX"
msgstr ""
-#: sed/sed.c:35
+#: sed/sed.c:36
msgid "Jay Fenlason"
msgstr "Jay Fenlason"
-#: sed/sed.c:36
+#: sed/sed.c:37
msgid "Tom Lord"
msgstr "Tom Lord"
-#: sed/sed.c:37
+#: sed/sed.c:38
msgid "Ken Pizzini"
msgstr "Ken Pizzini"
-#: sed/sed.c:38
+#: sed/sed.c:39
msgid "Paolo Bonzini"
msgstr "Paolo Bonzini"
-#: sed/sed.c:113
+#: sed/sed.c:40
+msgid "Jim Meyering"
+msgstr ""
+
+#: sed/sed.c:41
+msgid "Assaf Gordon"
+msgstr ""
+
+#: sed/sed.c:124
#, fuzzy, c-format
msgid ""
"GNU sed home page: <https://www.gnu.org/software/sed/>.\n"
@@ -607,20 +619,12 @@ msgstr ""
"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:120
+#: sed/sed.c:130
#, c-format
msgid "E-mail bug reports to: <%s>.\n"
msgstr "Mailige veateated aadressil: <%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"
-" kasuta skriptis Perl 5 regulaaravaldiste süntaksit.\n"
-
-#: sed/sed.c:134
+#: sed/sed.c:138
#, c-format
msgid ""
"Usage: %s [OPTION]... {script-only-if-no-other-script} [input-file]...\n"
@@ -630,7 +634,7 @@ msgstr ""
"fail]...\n"
"\n"
-#: sed/sed.c:138
+#: sed/sed.c:142
#, c-format
msgid ""
" -n, --quiet, --silent\n"
@@ -639,7 +643,16 @@ msgstr ""
" -n, --quiet, --silent\n"
" keela mustriruumi automaatne väljastamine\n"
-#: sed/sed.c:140
+#: sed/sed.c:144
+#, fuzzy, c-format
+msgid ""
+" --debug\n"
+" annotate program execution\n"
+msgstr ""
+" --posix\n"
+" blokeeri kõik GNU laiendused.\n"
+
+#: sed/sed.c:146
#, c-format
msgid ""
" -e script, --expression=script\n"
@@ -648,7 +661,7 @@ msgstr ""
" -e skript, --expression=skript\n"
" lisa täidetavate käskluste skript\n"
-#: sed/sed.c:142
+#: sed/sed.c:148
#, c-format
msgid ""
" -f script-file, --file=script-file\n"
@@ -658,7 +671,7 @@ msgstr ""
" -f skripti-fail, --file=skripti-fail\n"
" lisa skripti-faili sisu täidetavate käskluste hulka\n"
-#: sed/sed.c:146
+#: sed/sed.c:152
#, c-format
msgid ""
" --follow-symlinks\n"
@@ -667,7 +680,7 @@ msgstr ""
" --follow-symlinks\n"
" järgi nimeviiteid\n"
-#: sed/sed.c:149
+#: sed/sed.c:155
#, c-format
msgid ""
" -i[SUFFIX], --in-place[=SUFFIX]\n"
@@ -676,7 +689,7 @@ msgstr ""
" -i[SUFIKS], --in-place[=SUFIKS]\n"
" toimeta faile (kui kasutati sufiksit, loob ka varukoopia)\n"
-#: sed/sed.c:153
+#: sed/sed.c:158
#, c-format
msgid ""
" -b, --binary\n"
@@ -686,7 +699,7 @@ msgstr ""
" -b, --binary\n"
" ava failid binaarmoodis (CR+LF ei käsitleta eriliselt)\n"
-#: sed/sed.c:157
+#: sed/sed.c:162
#, c-format
msgid ""
" -l N, --line-length=N\n"
@@ -695,7 +708,7 @@ msgstr ""
" -l N, --line-length=N\n"
" määra `l' käsule soovitatav rea pikkus\n"
-#: sed/sed.c:159
+#: sed/sed.c:164
#, c-format
msgid ""
" --posix\n"
@@ -704,7 +717,7 @@ msgstr ""
" --posix\n"
" blokeeri kõik GNU laiendused.\n"
-#: sed/sed.c:161
+#: sed/sed.c:166
#, c-format
msgid ""
" -E, -r, --regexp-extended\n"
@@ -715,7 +728,7 @@ msgstr ""
" kasuta skriptis laiendatud regulaaravaldiste süntaksit\n"
" (ühilduvuse jaoks kasutage POSIX -E).\n"
-#: sed/sed.c:167
+#: sed/sed.c:169
#, c-format
msgid ""
" -s, --separate\n"
@@ -725,7 +738,7 @@ msgstr ""
" -s, --separate\n"
" käsitle faile ükshaaval, mitte ühe jätkuva voona.\n"
-#: sed/sed.c:170
+#: sed/sed.c:172
#, fuzzy, c-format
msgid ""
" --sandbox\n"
@@ -734,7 +747,7 @@ msgstr ""
" --sandbox\n"
" opereeri liivakasti moodis.\n"
-#: sed/sed.c:172
+#: sed/sed.c:174
#, c-format
msgid ""
" -u, --unbuffered\n"
@@ -746,7 +759,7 @@ msgstr ""
" loe sisendfailist minimaalne kogus andmeid ja tühjenda\n"
" väljundpuhvreid sagedamini\n"
-#: sed/sed.c:175
+#: sed/sed.c:177
#, c-format
msgid ""
" -z, --null-data\n"
@@ -755,17 +768,17 @@ msgstr ""
" -z, --null-data\n"
" eralda read sümboliga NUL\n"
-#: sed/sed.c:177
+#: sed/sed.c:179
#, c-format
msgid " --help display this help and exit\n"
msgstr " --help väljast see abiinfo ja lõpeta töö\n"
-#: sed/sed.c:178
+#: sed/sed.c:180
#, c-format
msgid " --version output version information and exit\n"
msgstr " --version väljasta versiooniinfo ja lõpeta töö\n"
-#: sed/sed.c:179
+#: sed/sed.c:181
#, c-format
msgid ""
"\n"
@@ -782,48 +795,68 @@ msgstr ""
"sisendfailide nimed; kui sisendfaile ei antud, loetakse standardsisendit.\n"
"\n"
-#: sed/utils.c:73 sed/utils.c:384
+#: sed/sed.c:373
+msgid "failed to set binary mode on STDIN"
+msgstr ""
+
+#: sed/sed.c:375
+msgid "failed to set binary mode on STDOUT"
+msgstr ""
+
+#: sed/utils.c:77 sed/utils.c:395
#, c-format
msgid "cannot remove %s: %s"
msgstr "%s ei saa eemaldada: %s"
-#: sed/utils.c:136
+#: sed/utils.c:146
#, c-format
msgid "couldn't open file %s: %s"
msgstr "faili %s ei saa avada: %s"
-#: sed/utils.c:155
+#: sed/utils.c:165
#, c-format
msgid "couldn't attach to %s: %s"
msgstr "%s külge haakimine ebaõnnestus: %s"
#: sed/utils.c:192
#, c-format
+msgid "failed to set binary mode on '%s'"
+msgstr ""
+
+#: sed/utils.c:207
+#, c-format
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:204 sed/utils.c:223
+#: sed/utils.c:219 sed/utils.c:238
#, c-format
msgid "read error on %s: %s"
msgstr "lugemisviga %s: %s"
-#: sed/utils.c:325
+#: sed/utils.c:336
#, c-format
msgid "couldn't follow symlink %s: %s"
msgstr "nimeviidet %s ei saa järgida: %s"
-#: sed/utils.c:359
+#: sed/utils.c:370
#, c-format
msgid "cannot stat %s: %s"
msgstr "stat %s ei saa teha: %s"
-#: sed/utils.c:389
+#: sed/utils.c:400
#, c-format
msgid "cannot rename %s: %s"
msgstr "%s ei saa ümber nimetada: %s"
+#~ 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 süntaksit.\n"
+
#~ msgid "%s: option '--%s' doesn't allow an argument\n"
#~ msgstr "%s: võti '--%s' ei luba argumenti\n"
diff --git a/po/eu.gmo b/po/eu.gmo
index a32ebde..e440052 100644
--- a/po/eu.gmo
+++ b/po/eu.gmo
Binary files differ
diff --git a/po/eu.po b/po/eu.po
index 97cdfe0..d6089e1 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: 2018-03-31 18:40-0700\n"
+"POT-Creation-Date: 2018-12-20 22:03-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"
@@ -29,39 +29,39 @@ msgstr ""
msgid "preserving permissions for %s"
msgstr ""
-#: lib/dfa.c:958
+#: lib/dfa.c:970
msgid "unbalanced ["
msgstr ""
-#: lib/dfa.c:1079
+#: lib/dfa.c:1091
msgid "invalid character class"
msgstr ""
-#: lib/dfa.c:1205
+#: lib/dfa.c:1217
msgid "character class syntax is [[:space:]], not [:space:]"
msgstr ""
-#: lib/dfa.c:1272
+#: lib/dfa.c:1284
msgid "unfinished \\ escape"
msgstr ""
-#: lib/dfa.c:1433
+#: lib/dfa.c:1445
msgid "invalid content of \\{\\}"
msgstr ""
-#: lib/dfa.c:1436
+#: lib/dfa.c:1448
msgid "regular expression too big"
msgstr ""
-#: lib/dfa.c:1850
+#: lib/dfa.c:1863
msgid "unbalanced ("
msgstr ""
-#: lib/dfa.c:1968
+#: lib/dfa.c:1981
msgid "no syntax specified"
msgstr ""
-#: lib/dfa.c:1976
+#: lib/dfa.c:1992
msgid "unbalanced )"
msgstr ""
@@ -206,7 +206,7 @@ msgstr ""
msgid "Unmatched ) or \\)"
msgstr ""
-#: lib/regcomp.c:689
+#: lib/regcomp.c:688
msgid "No previous regular expression"
msgstr ""
@@ -215,12 +215,12 @@ msgstr ""
msgid "setting permissions for %s"
msgstr ""
-#: lib/version-etc.c:74
+#: lib/version-etc.c:73
#, c-format
msgid "Packaged by %s (%s)\n"
msgstr ""
-#: lib/version-etc.c:77
+#: lib/version-etc.c:76
#, c-format
msgid "Packaged by %s\n"
msgstr ""
@@ -228,11 +228,11 @@ 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
+#: lib/version-etc.c:83
msgid "(C)"
msgstr ""
-#: lib/version-etc.c:86
+#: lib/version-etc.c:85
msgid ""
"\n"
"License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl."
@@ -411,206 +411,219 @@ msgstr ""
msgid "command only uses one address"
msgstr ""
-#: sed/compile.c:164
+#: sed/compile.c:165
msgid "unterminated address regex"
msgstr ""
-#: sed/compile.c:165
+#: sed/compile.c:166
msgid "unterminated `s' command"
msgstr ""
-#: sed/compile.c:166
+#: sed/compile.c:167
msgid "unterminated `y' command"
msgstr ""
-#: sed/compile.c:167
+#: sed/compile.c:168
msgid "unknown option to `s'"
msgstr "`s' aukera ezezaguna"
-#: sed/compile.c:169
+#: sed/compile.c:170
msgid "multiple `p' options to `s' command"
msgstr ""
-#: sed/compile.c:171
+#: sed/compile.c:172
msgid "multiple `g' options to `s' command"
msgstr ""
-#: sed/compile.c:173
+#: sed/compile.c:174
msgid "multiple number options to `s' command"
msgstr ""
-#: sed/compile.c:175
+#: sed/compile.c:176
msgid "number option to `s' command may not be zero"
msgstr ""
-#: sed/compile.c:177
+#: sed/compile.c:178
msgid "strings for `y' command are different lengths"
msgstr ""
-#: sed/compile.c:179
+#: sed/compile.c:180
msgid "delimiter character is not a single-byte character"
msgstr ""
-#: sed/compile.c:181
+#: sed/compile.c:182
msgid "expected newer version of sed"
msgstr ""
-#: sed/compile.c:183
+#: sed/compile.c:184
msgid "invalid usage of line address 0"
msgstr ""
-#: sed/compile.c:184
+#: sed/compile.c:185
#, c-format
msgid "unknown command: `%c'"
msgstr "komando ezezaguna: `%c'"
-#: sed/compile.c:186
+#: sed/compile.c:187
msgid "incomplete command"
msgstr ""
-#: sed/compile.c:188
+#: sed/compile.c:189
msgid "\":\" lacks a label"
msgstr ""
-#: sed/compile.c:190
+#: sed/compile.c:191
msgid "recursive escaping after \\c not allowed"
msgstr ""
-#: sed/compile.c:213
+#: sed/compile.c:193
+msgid "e/r/w commands disabled in sandbox mode"
+msgstr ""
+
+#: sed/compile.c:215
#, c-format
msgid "%s: file %s line %lu: %s\n"
msgstr "%s: %s fitxategia %lu lerroa: %s\n"
-#: sed/compile.c:216
+#: sed/compile.c:218
#, c-format
msgid "%s: -e expression #%lu, char %lu: %s\n"
msgstr "%s: -e expresioa #%lu, %lu karakterea: %s\n"
-#: sed/compile.c:1644
+#: sed/compile.c:1607
#, c-format
msgid "can't find label for jump to `%s'"
msgstr ""
-#: sed/execute.c:254 sed/execute.c:271
+#: sed/execute.c:253 sed/execute.c:270
#, c-format
msgid "case conversion produced an invalid character"
msgstr ""
-#: sed/execute.c:565
+#: sed/execute.c:561
#, c-format
msgid "%s: can't read %s: %s\n"
msgstr "%s: ezin irakurri %s: %s\n"
-#: sed/execute.c:590
+#: sed/execute.c:587
#, c-format
msgid "couldn't edit %s: is a terminal"
msgstr "ezin izan da %s editatu: terminal bat da"
-#: sed/execute.c:595
+#: sed/execute.c:592
#, 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:606
+#: sed/execute.c:603
#, c-format
msgid "%s: warning: failed to set default file creation context to %s: %s"
msgstr ""
-#: sed/execute.c:614
+#: sed/execute.c:611
#, c-format
msgid "%s: warning: failed to get security context of %s: %s"
msgstr ""
-#: sed/execute.c:633 sed/utils.c:178
+#: sed/execute.c:630 sed/utils.c:188
#, c-format
msgid "couldn't open temporary file %s: %s"
msgstr ""
-#: sed/execute.c:1148 sed/execute.c:1358
+#: sed/execute.c:1167 sed/execute.c:1366
msgid "error in subprocess"
msgstr "errorea subprozezuan"
-#: sed/execute.c:1150
+#: sed/execute.c:1169
msgid "option `e' not supported"
msgstr ""
-#: sed/execute.c:1339
+#: sed/execute.c:1347
msgid "`e' command not supported"
msgstr ""
-#: sed/execute.c:1665
+#: sed/execute.c:1662
msgid "no input files"
msgstr ""
-#: sed/regexp.c:39
+#: sed/regexp.c:40
msgid "no previous regular expression"
msgstr ""
-#: sed/regexp.c:141
+#: sed/regexp.c:125
#, c-format
msgid "invalid reference \\%d on `s' command's RHS"
msgstr ""
-#: sed/regexp.c:259
+#: sed/regexp.c:196
msgid "regex input buffer length larger than INT_MAX"
msgstr ""
-#: sed/sed.c:35
+#: sed/sed.c:36
msgid "Jay Fenlason"
msgstr ""
-#: sed/sed.c:36
+#: sed/sed.c:37
msgid "Tom Lord"
msgstr ""
-#: sed/sed.c:37
+#: sed/sed.c:38
msgid "Ken Pizzini"
msgstr ""
-#: sed/sed.c:38
+#: sed/sed.c:39
msgid "Paolo Bonzini"
msgstr ""
-#: sed/sed.c:113
+#: sed/sed.c:40
+msgid "Jim Meyering"
+msgstr ""
+
+#: sed/sed.c:41
+msgid "Assaf Gordon"
+msgstr ""
+
+#: sed/sed.c:124
#, c-format
msgid ""
"GNU sed home page: <https://www.gnu.org/software/sed/>.\n"
"General help using GNU software: <https://www.gnu.org/gethelp/>.\n"
msgstr ""
-#: sed/sed.c:120
+#: sed/sed.c:130
#, c-format
msgid "E-mail bug reports to: <%s>.\n"
msgstr ""
-#: sed/sed.c:129
-msgid ""
-" -R, --regexp-perl\n"
-" use Perl 5's regular expressions syntax in the script.\n"
-msgstr ""
-
-#: sed/sed.c:134
+#: sed/sed.c:138
#, c-format
msgid ""
"Usage: %s [OPTION]... {script-only-if-no-other-script} [input-file]...\n"
"\n"
msgstr ""
-#: sed/sed.c:138
+#: sed/sed.c:142
#, c-format
msgid ""
" -n, --quiet, --silent\n"
" suppress automatic printing of pattern space\n"
msgstr ""
-#: sed/sed.c:140
+#: sed/sed.c:144
+#, c-format
+msgid ""
+" --debug\n"
+" annotate program execution\n"
+msgstr ""
+
+#: sed/sed.c:146
#, c-format
msgid ""
" -e script, --expression=script\n"
" add the script to the commands to be executed\n"
msgstr ""
-#: sed/sed.c:142
+#: sed/sed.c:148
#, c-format
msgid ""
" -f script-file, --file=script-file\n"
@@ -618,21 +631,21 @@ msgid ""
"executed\n"
msgstr ""
-#: sed/sed.c:146
+#: sed/sed.c:152
#, c-format
msgid ""
" --follow-symlinks\n"
" follow symlinks when processing in place\n"
msgstr ""
-#: sed/sed.c:149
+#: sed/sed.c:155
#, c-format
msgid ""
" -i[SUFFIX], --in-place[=SUFFIX]\n"
" edit files in place (makes backup if SUFFIX supplied)\n"
msgstr ""
-#: sed/sed.c:153
+#: sed/sed.c:158
#, c-format
msgid ""
" -b, --binary\n"
@@ -640,21 +653,21 @@ msgid ""
"specially)\n"
msgstr ""
-#: sed/sed.c:157
+#: sed/sed.c:162
#, c-format
msgid ""
" -l N, --line-length=N\n"
" specify the desired line-wrap length for the `l' command\n"
msgstr ""
-#: sed/sed.c:159
+#: sed/sed.c:164
#, c-format
msgid ""
" --posix\n"
" disable all GNU extensions.\n"
msgstr ""
-#: sed/sed.c:161
+#: sed/sed.c:166
#, c-format
msgid ""
" -E, -r, --regexp-extended\n"
@@ -662,7 +675,7 @@ msgid ""
" (for portability use POSIX -E).\n"
msgstr ""
-#: sed/sed.c:167
+#: sed/sed.c:169
#, c-format
msgid ""
" -s, --separate\n"
@@ -670,14 +683,14 @@ msgid ""
" continuous long stream.\n"
msgstr ""
-#: sed/sed.c:170
+#: sed/sed.c:172
#, c-format
msgid ""
" --sandbox\n"
" operate in sandbox mode (disable e/r/w commands).\n"
msgstr ""
-#: sed/sed.c:172
+#: sed/sed.c:174
#, c-format
msgid ""
" -u, --unbuffered\n"
@@ -686,24 +699,24 @@ msgid ""
" the output buffers more often\n"
msgstr ""
-#: sed/sed.c:175
+#: sed/sed.c:177
#, c-format
msgid ""
" -z, --null-data\n"
" separate lines by NUL characters\n"
msgstr ""
-#: sed/sed.c:177
+#: sed/sed.c:179
#, c-format
msgid " --help display this help and exit\n"
msgstr ""
-#: sed/sed.c:178
+#: sed/sed.c:180
#, c-format
msgid " --version output version information and exit\n"
msgstr ""
-#: sed/sed.c:179
+#: sed/sed.c:181
#, c-format
msgid ""
"\n"
@@ -714,44 +727,57 @@ msgid ""
"\n"
msgstr ""
-#: sed/utils.c:73 sed/utils.c:384
+#: sed/sed.c:373
+msgid "failed to set binary mode on STDIN"
+msgstr ""
+
+#: sed/sed.c:375
+msgid "failed to set binary mode on STDOUT"
+msgstr ""
+
+#: sed/utils.c:77 sed/utils.c:395
#, c-format
msgid "cannot remove %s: %s"
msgstr "ezin da %s kendu: %s"
-#: sed/utils.c:136
+#: sed/utils.c:146
#, c-format
msgid "couldn't open file %s: %s"
msgstr "ezin izan da %s fitxategia ireki: %s"
-#: sed/utils.c:155
+#: sed/utils.c:165
#, fuzzy, c-format
msgid "couldn't attach to %s: %s"
msgstr "ezin izan da %d gaia %s-ri idatzi: %s"
#: sed/utils.c:192
+#, c-format
+msgid "failed to set binary mode on '%s'"
+msgstr ""
+
+#: sed/utils.c:207
#, fuzzy, c-format
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:204 sed/utils.c:223
+#: sed/utils.c:219 sed/utils.c:238
#, c-format
msgid "read error on %s: %s"
msgstr "irakurketa errorea %s-n: %s"
-#: sed/utils.c:325
+#: sed/utils.c:336
#, fuzzy, c-format
msgid "couldn't follow symlink %s: %s"
msgstr "ezin izan da %s fitxategia ireki: %s"
-#: sed/utils.c:359
+#: sed/utils.c:370
#, fuzzy, c-format
msgid "cannot stat %s: %s"
msgstr "ezin da %s berrizendatu: %s"
-#: sed/utils.c:389
+#: sed/utils.c:400
#, c-format
msgid "cannot rename %s: %s"
msgstr "ezin da %s berrizendatu: %s"
diff --git a/po/fi.gmo b/po/fi.gmo
index 7d04557..d5b826b 100644
--- a/po/fi.gmo
+++ b/po/fi.gmo
Binary files differ
diff --git a/po/fi.po b/po/fi.po
index 5f57175..e44602d 100644
--- a/po/fi.po
+++ b/po/fi.po
@@ -9,7 +9,7 @@ msgid ""
msgstr ""
"Project-Id-Version: sed 4.2.2.177\n"
"Report-Msgid-Bugs-To: bug-gnu-utils@gnu.org\n"
-"POT-Creation-Date: 2018-03-31 18:40-0700\n"
+"POT-Creation-Date: 2018-12-20 22:03-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"
@@ -33,39 +33,39 @@ 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:958
+#: lib/dfa.c:970
msgid "unbalanced ["
msgstr "pariton ”[”"
-#: lib/dfa.c:1079
+#: lib/dfa.c:1091
msgid "invalid character class"
msgstr "Virheellinen merkkiluokka"
-#: lib/dfa.c:1205
+#: lib/dfa.c:1217
msgid "character class syntax is [[:space:]], not [:space:]"
msgstr "merkkiluokan syntaksi on [[:space:]], ei [:space:]"
-#: lib/dfa.c:1272
+#: lib/dfa.c:1284
msgid "unfinished \\ escape"
msgstr "päättämätön \\-koodinvaihto"
-#: lib/dfa.c:1433
+#: lib/dfa.c:1445
msgid "invalid content of \\{\\}"
msgstr "Kohteen \\{\\} virheellinen sisältö"
-#: lib/dfa.c:1436
+#: lib/dfa.c:1448
msgid "regular expression too big"
msgstr "säännöllinen lauseke on liian suuri"
-#: lib/dfa.c:1850
+#: lib/dfa.c:1863
msgid "unbalanced ("
msgstr "pariton ”(”"
-#: lib/dfa.c:1968
+#: lib/dfa.c:1981
msgid "no syntax specified"
msgstr "syntaksia ei ole määritelty"
-#: lib/dfa.c:1976
+#: lib/dfa.c:1992
msgid "unbalanced )"
msgstr "pariton ”)”"
@@ -209,7 +209,7 @@ msgstr "Säännöllinen lauseke on liian suuri"
msgid "Unmatched ) or \\)"
msgstr "Pariton ”)” tai ”\\)”"
-#: lib/regcomp.c:689
+#: lib/regcomp.c:688
msgid "No previous regular expression"
msgstr "Ei aikaisempaa säännöllistä lausetta"
@@ -218,12 +218,12 @@ msgstr "Ei aikaisempaa säännöllistä lausetta"
msgid "setting permissions for %s"
msgstr "kohteen %s käyttöoikeuksien asetukset"
-#: lib/version-etc.c:74
+#: lib/version-etc.c:73
#, c-format
msgid "Packaged by %s (%s)\n"
msgstr "Pakkaaja: %s (%s)\n"
-#: lib/version-etc.c:77
+#: lib/version-etc.c:76
#, c-format
msgid "Packaged by %s\n"
msgstr "Pakkaaja: %s\n"
@@ -231,11 +231,11 @@ 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
+#: lib/version-etc.c:83
msgid "(C)"
msgstr "©"
-#: lib/version-etc.c:86
+#: lib/version-etc.c:85
#, fuzzy
msgid ""
"\n"
@@ -448,169 +448,181 @@ msgstr "puuttuva komento"
msgid "command only uses one address"
msgstr "komento käyttää vain yhtä osoitetta"
-#: sed/compile.c:164
+#: sed/compile.c:165
msgid "unterminated address regex"
msgstr "päättymätön osoite vakiolauseessa"
-#: sed/compile.c:165
+#: sed/compile.c:166
msgid "unterminated `s' command"
msgstr "päättymätön ”s”-komento"
-#: sed/compile.c:166
+#: sed/compile.c:167
msgid "unterminated `y' command"
msgstr "päättymätön ”y”-komento"
-#: sed/compile.c:167
+#: sed/compile.c:168
msgid "unknown option to `s'"
msgstr "tuntematon valitsin kohteelle ”s”"
-#: sed/compile.c:169
+#: sed/compile.c:170
msgid "multiple `p' options to `s' command"
msgstr "useita ”p”-valitsimia ”s”-komennolle"
-#: sed/compile.c:171
+#: sed/compile.c:172
msgid "multiple `g' options to `s' command"
msgstr "useita ”g”-valitsimia ”s”-komennolle"
-#: sed/compile.c:173
+#: sed/compile.c:174
msgid "multiple number options to `s' command"
msgstr "useita valitsimia ”s”-komennolle"
-#: sed/compile.c:175
+#: sed/compile.c:176
msgid "number option to `s' command may not be zero"
msgstr "numeerinen valitsin ”s”-komennolle ei saa olla nolla"
-#: sed/compile.c:177
+#: sed/compile.c:178
msgid "strings for `y' command are different lengths"
msgstr "merkkijonot ”y”-komennolle ovat pituudeltaan vaihtelevia"
-#: sed/compile.c:179
+#: sed/compile.c:180
msgid "delimiter character is not a single-byte character"
msgstr "erotinmerkki ei ole yksitavuinen merkki"
-#: sed/compile.c:181
+#: sed/compile.c:182
msgid "expected newer version of sed"
msgstr "odotettiin uudempaa sed-versiota"
-#: sed/compile.c:183
+#: sed/compile.c:184
msgid "invalid usage of line address 0"
msgstr "riviosoitteen nolla virheellinen käyttö"
-#: sed/compile.c:184
+#: sed/compile.c:185
#, c-format
msgid "unknown command: `%c'"
msgstr "tuntematon komento: ”%c”"
-#: sed/compile.c:186
+#: sed/compile.c:187
msgid "incomplete command"
msgstr "vaillinainen komento"
-#: sed/compile.c:188
+#: sed/compile.c:189
msgid "\":\" lacks a label"
msgstr "\":\" nimiö puuttuu"
-#: sed/compile.c:190
+#: sed/compile.c:191
msgid "recursive escaping after \\c not allowed"
msgstr "rekursiivinen koodinvaihto ei ole sallittu merkin \\c jälkeen"
-#: sed/compile.c:213
+#: sed/compile.c:193
+msgid "e/r/w commands disabled in sandbox mode"
+msgstr ""
+
+#: sed/compile.c:215
#, c-format
msgid "%s: file %s line %lu: %s\n"
msgstr "%s: tiedosto %s rivi %lu: %s\n"
-#: sed/compile.c:216
+#: sed/compile.c:218
#, c-format
msgid "%s: -e expression #%lu, char %lu: %s\n"
msgstr "%s: -e lauseke #%lu, merkki %lu: %s\n"
-#: sed/compile.c:1644
+#: sed/compile.c:1607
#, c-format
msgid "can't find label for jump to `%s'"
msgstr "nimikettä hypylle kohteeseen ”%s” ei löydy"
-#: sed/execute.c:254 sed/execute.c:271
+#: sed/execute.c:253 sed/execute.c:270
#, c-format
msgid "case conversion produced an invalid character"
msgstr "kirjainkoon muunnos tuotti virheellisen merkin"
-#: sed/execute.c:565
+#: sed/execute.c:561
#, c-format
msgid "%s: can't read %s: %s\n"
msgstr "%s: syötteen %s lukeminen epäonnistui: %s\n"
-#: sed/execute.c:590
+#: sed/execute.c:587
#, c-format
msgid "couldn't edit %s: is a terminal"
msgstr "kohteen %s muokkaaminen epäonnistui: se on pääte"
-#: sed/execute.c:595
+#: sed/execute.c:592
#, c-format
msgid "couldn't edit %s: not a regular file"
msgstr "kohteen %s muokkaaminen epäonnistui: se ei ole tavallinen tiedosto"
-#: sed/execute.c:606
+#: sed/execute.c:603
#, 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:614
+#: sed/execute.c:611
#, 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:633 sed/utils.c:178
+#: sed/execute.c:630 sed/utils.c:188
#, c-format
msgid "couldn't open temporary file %s: %s"
msgstr "Väliaikaistiedoston %s avaaminen epäonnistui: %s"
-#: sed/execute.c:1148 sed/execute.c:1358
+#: sed/execute.c:1167 sed/execute.c:1366
msgid "error in subprocess"
msgstr "virhe lapsiprosessissa"
-#: sed/execute.c:1150
+#: sed/execute.c:1169
msgid "option `e' not supported"
msgstr "valitsin ”e” ei ole tuettu"
-#: sed/execute.c:1339
+#: sed/execute.c:1347
msgid "`e' command not supported"
msgstr "komento ”e” ei ole tuettu"
-#: sed/execute.c:1665
+#: sed/execute.c:1662
msgid "no input files"
msgstr "ei syötetiedostoja"
-#: sed/regexp.c:39
+#: sed/regexp.c:40
msgid "no previous regular expression"
msgstr "ei aikaisempaa säännöllistä lauseketta"
-#: sed/regexp.c:141
+#: sed/regexp.c:125
#, c-format
msgid "invalid reference \\%d on `s' command's RHS"
msgstr "virheellinen viittaus \\%d komennon ”s” oikealla puolella"
-#: sed/regexp.c:259
+#: sed/regexp.c:196
msgid "regex input buffer length larger than INT_MAX"
msgstr ""
-#: sed/sed.c:35
+#: sed/sed.c:36
msgid "Jay Fenlason"
msgstr "Jay Fenlason"
-#: sed/sed.c:36
+#: sed/sed.c:37
msgid "Tom Lord"
msgstr "Tom Lord"
-#: sed/sed.c:37
+#: sed/sed.c:38
msgid "Ken Pizzini"
msgstr "Ken Pizzini"
-#: sed/sed.c:38
+#: sed/sed.c:39
msgid "Paolo Bonzini"
msgstr "Paolo Bonzini"
-#: sed/sed.c:113
+#: sed/sed.c:40
+msgid "Jim Meyering"
+msgstr ""
+
+#: sed/sed.c:41
+msgid "Assaf Gordon"
+msgstr ""
+
+#: sed/sed.c:124
#, fuzzy, c-format
msgid ""
"GNU sed home page: <https://www.gnu.org/software/sed/>.\n"
@@ -619,21 +631,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:120
+#: sed/sed.c:130
#, c-format
msgid "E-mail bug reports to: <%s>.\n"
msgstr "Ilmoita ohjelmointivirheistä osoitteeseen: <%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"
-" käytä Perl 5:n mukaista säännöllisten lauseiden\n"
-" syntaksia skriptissä.\n"
-
-#: sed/sed.c:134
+#: sed/sed.c:138
#, c-format
msgid ""
"Usage: %s [OPTION]... {script-only-if-no-other-script} [input-file]...\n"
@@ -643,7 +646,7 @@ msgstr ""
"[syötetiedosto]...\n"
"\n"
-#: sed/sed.c:138
+#: sed/sed.c:142
#, c-format
msgid ""
" -n, --quiet, --silent\n"
@@ -652,7 +655,16 @@ msgstr ""
" -n, --quiet, --silent\n"
" vaienna automaattinen mallitilan tulostus\n"
-#: sed/sed.c:140
+#: sed/sed.c:144
+#, fuzzy, c-format
+msgid ""
+" --debug\n"
+" annotate program execution\n"
+msgstr ""
+" --posix\n"
+" passivoi kaikki GNU-laajennukset.\n"
+
+#: sed/sed.c:146
#, c-format
msgid ""
" -e script, --expression=script\n"
@@ -661,7 +673,7 @@ msgstr ""
" -e script, --expression=skripti\n"
" lisää skripti suoritettaviin komentoihin\n"
-#: sed/sed.c:142
+#: sed/sed.c:148
#, c-format
msgid ""
" -f script-file, --file=script-file\n"
@@ -671,7 +683,7 @@ msgstr ""
" -f script-file, --file=skriptitiedosto\n"
" lisää skriptitiedoston sisältö suoritettaviin komentoihin\n"
-#: sed/sed.c:146
+#: sed/sed.c:152
#, c-format
msgid ""
" --follow-symlinks\n"
@@ -680,7 +692,7 @@ msgstr ""
" --follow-symlinks\n"
" seuraa symbolisia linkkejä, kun prosessoidaan paikallaan\n"
-#: sed/sed.c:149
+#: sed/sed.c:155
#, c-format
msgid ""
" -i[SUFFIX], --in-place[=SUFFIX]\n"
@@ -690,7 +702,7 @@ msgstr ""
" muokkaa tiedostoja paikallaan (tekee varmuuskopion, jos "
"SUFFIKSI on annettu)\n"
-#: sed/sed.c:153
+#: sed/sed.c:158
#, c-format
msgid ""
" -b, --binary\n"
@@ -701,7 +713,7 @@ msgstr ""
" avaa tiedostot binääritilassa (rivinvaihtomerkkejä CR+LF ei "
"erityisemmin prosessoida)\n"
-#: sed/sed.c:157
+#: sed/sed.c:162
#, c-format
msgid ""
" -l N, --line-length=N\n"
@@ -710,7 +722,7 @@ msgstr ""
" -l N, --line-length=N\n"
" määrittelee halutun rivinvaihtopituuden komennolle ”l”\n"
-#: sed/sed.c:159
+#: sed/sed.c:164
#, c-format
msgid ""
" --posix\n"
@@ -719,7 +731,7 @@ msgstr ""
" --posix\n"
" passivoi kaikki GNU-laajennukset.\n"
-#: sed/sed.c:161
+#: sed/sed.c:166
#, c-format
msgid ""
" -E, -r, --regexp-extended\n"
@@ -730,7 +742,7 @@ msgstr ""
" käytä laajennettuja säännöllisiä lausekkeita skriptissä.\n"
" (käytä siirrettävyyttä varten valitsinta POSIX -E)).\n"
-#: sed/sed.c:167
+#: sed/sed.c:169
#, c-format
msgid ""
" -s, --separate\n"
@@ -741,7 +753,7 @@ msgstr ""
" pidä tiedostoja erillisinä pikemmin kuin yhtenä,\n"
" jatkuvana pitkänä virtana.\n"
-#: sed/sed.c:170
+#: sed/sed.c:172
#, fuzzy, c-format
msgid ""
" --sandbox\n"
@@ -750,7 +762,7 @@ msgstr ""
" --sandbox\n"
" toimi hiekkalaatikkotilassa.\n"
-#: sed/sed.c:172
+#: sed/sed.c:174
#, c-format
msgid ""
" -u, --unbuffered\n"
@@ -762,7 +774,7 @@ msgstr ""
" lataa syötetiedostoista minimimäärä dataa ja tyhjennä\n"
" tulostepuskurit useammin\n"
-#: sed/sed.c:175
+#: sed/sed.c:177
#, c-format
msgid ""
" -z, --null-data\n"
@@ -771,17 +783,17 @@ msgstr ""
" -z, --null-data\n"
" erottele rivit NUL-merkeillä\n"
-#: sed/sed.c:177
+#: sed/sed.c:179
#, c-format
msgid " --help display this help and exit\n"
msgstr " --help näytä tämä opaste ja poistu\n"
-#: sed/sed.c:178
+#: sed/sed.c:180
#, c-format
msgid " --version output version information and exit\n"
msgstr " --version tulosta versiotiedot ja poistu\n"
-#: sed/sed.c:179
+#: sed/sed.c:181
#, c-format
msgid ""
"\n"
@@ -801,48 +813,69 @@ msgstr ""
"ole määritelty, luetaan vakiosyötettä.\n"
"\n"
-#: sed/utils.c:73 sed/utils.c:384
+#: sed/sed.c:373
+msgid "failed to set binary mode on STDIN"
+msgstr ""
+
+#: sed/sed.c:375
+msgid "failed to set binary mode on STDOUT"
+msgstr ""
+
+#: sed/utils.c:77 sed/utils.c:395
#, c-format
msgid "cannot remove %s: %s"
msgstr "kohteen %s poistaminen epäonnistui: %s"
-#: sed/utils.c:136
+#: sed/utils.c:146
#, c-format
msgid "couldn't open file %s: %s"
msgstr "tiedoston %s avaaminen epäonnistui: %s"
-#: sed/utils.c:155
+#: sed/utils.c:165
#, c-format
msgid "couldn't attach to %s: %s"
msgstr "kohteeseen %s liittyminen epäonnistui: %s"
#: sed/utils.c:192
#, c-format
+msgid "failed to set binary mode on '%s'"
+msgstr ""
+
+#: sed/utils.c:207
+#, c-format
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:204 sed/utils.c:223
+#: sed/utils.c:219 sed/utils.c:238
#, c-format
msgid "read error on %s: %s"
msgstr "lukuvirhe syötteessä %s: %s"
-#: sed/utils.c:325
+#: sed/utils.c:336
#, c-format
msgid "couldn't follow symlink %s: %s"
msgstr "symbolisen linkin %s seuraaminen epäonnistui: %s"
-#: sed/utils.c:359
+#: sed/utils.c:370
#, c-format
msgid "cannot stat %s: %s"
msgstr "stat %s-käskyn suorittaminen epäonnistui: %s"
-#: sed/utils.c:389
+#: sed/utils.c:400
#, c-format
msgid "cannot rename %s: %s"
msgstr "kohteen %s nimeäminen uudelleen epäonnistui: %s"
+#~ msgid ""
+#~ " -R, --regexp-perl\n"
+#~ " use Perl 5's regular expressions syntax in the script.\n"
+#~ msgstr ""
+#~ " -R, --regexp-perl\n"
+#~ " käytä Perl 5:n mukaista säännöllisten lauseiden\n"
+#~ " syntaksia skriptissä.\n"
+
#~ msgid "%s: option '--%s' doesn't allow an argument\n"
#~ msgstr "%s: valitsin ’--%s’ ei salli argumenttia\n"
diff --git a/po/fr.gmo b/po/fr.gmo
index 363570e..13864a3 100644
--- a/po/fr.gmo
+++ b/po/fr.gmo
Binary files differ
diff --git a/po/fr.po b/po/fr.po
index 2892b72..d3fc92b 100644
--- a/po/fr.po
+++ b/po/fr.po
@@ -10,10 +10,10 @@
#
msgid ""
msgstr ""
-"Project-Id-Version: sed 4.4.104\n"
+"Project-Id-Version: sed 4.5.48\n"
"Report-Msgid-Bugs-To: bug-gnu-utils@gnu.org\n"
-"POT-Creation-Date: 2018-03-31 18:40-0700\n"
-"PO-Revision-Date: 2018-03-24 17:45+0100\n"
+"POT-Creation-Date: 2018-12-20 22:03-0800\n"
+"PO-Revision-Date: 2018-12-15 20:04+0100\n"
"Last-Translator: Frédéric Marchal <fmarchal@perso.be>\n"
"Language-Team: French <traduc@traduc.org>\n"
"Language: fr\n"
@@ -32,39 +32,39 @@ msgstr "erreur d'écriture"
msgid "preserving permissions for %s"
msgstr "préserve les permissions de %s"
-#: lib/dfa.c:958
+#: lib/dfa.c:970
msgid "unbalanced ["
msgstr "[ non appariée"
-#: lib/dfa.c:1079
+#: lib/dfa.c:1091
msgid "invalid character class"
msgstr "classe de caractères invalide"
-#: lib/dfa.c:1205
+#: lib/dfa.c:1217
msgid "character class syntax is [[:space:]], not [:space:]"
msgstr "la syntaxe d'une classe de caractères est [[:space:]] et non [:space:]"
-#: lib/dfa.c:1272
+#: lib/dfa.c:1284
msgid "unfinished \\ escape"
msgstr "séquence d'échappement \\ non terminée"
-#: lib/dfa.c:1433
+#: lib/dfa.c:1445
msgid "invalid content of \\{\\}"
msgstr "contenu de \\{\\} invalide"
-#: lib/dfa.c:1436
+#: lib/dfa.c:1448
msgid "regular expression too big"
msgstr "expression régulière trop grande"
-#: lib/dfa.c:1850
+#: lib/dfa.c:1863
msgid "unbalanced ("
msgstr "( non appariée"
-#: lib/dfa.c:1968
+#: lib/dfa.c:1981
msgid "no syntax specified"
msgstr "aucune syntaxe spécifiée"
-#: lib/dfa.c:1976
+#: lib/dfa.c:1992
msgid "unbalanced )"
msgstr ") non appariée"
@@ -208,7 +208,7 @@ msgstr "Expression régulière trop grande"
msgid "Unmatched ) or \\)"
msgstr ") ou \\) non apparié"
-#: lib/regcomp.c:689
+#: lib/regcomp.c:688
msgid "No previous regular expression"
msgstr "Pas d'expression régulière précédente"
@@ -217,12 +217,12 @@ msgstr "Pas d'expression régulière précédente"
msgid "setting permissions for %s"
msgstr "défini les permissions pour %s"
-#: lib/version-etc.c:74
+#: lib/version-etc.c:73
#, c-format
msgid "Packaged by %s (%s)\n"
msgstr "Empaqueté par %s (%s)\n"
-#: lib/version-etc.c:77
+#: lib/version-etc.c:76
#, c-format
msgid "Packaged by %s\n"
msgstr "Empaqueté par %s\n"
@@ -230,11 +230,11 @@ msgstr "Empaqueté par %s\n"
#. TRANSLATORS: Translate "(C)" to the copyright symbol
#. (C-in-a-circle), if this symbol is available in the user's
#. locale. Otherwise, do not translate "(C)"; leave it as-is.
-#: lib/version-etc.c:84
+#: lib/version-etc.c:83
msgid "(C)"
msgstr "©"
-#: lib/version-etc.c:86
+#: lib/version-etc.c:85
msgid ""
"\n"
"License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl."
@@ -442,173 +442,185 @@ msgstr "commande manquante"
msgid "command only uses one address"
msgstr "la commande n'utilise qu'une adresse"
-#: sed/compile.c:164
+#: sed/compile.c:165
msgid "unterminated address regex"
msgstr "expression régulière d'adresse inachevée"
-#: sed/compile.c:165
+#: sed/compile.c:166
msgid "unterminated `s' command"
msgstr "commande « s » inachevée"
-#: sed/compile.c:166
+#: sed/compile.c:167
msgid "unterminated `y' command"
msgstr "commande « y » inachevée"
-#: sed/compile.c:167
+#: sed/compile.c:168
msgid "unknown option to `s'"
msgstr "option inconnue pour « s »"
-#: sed/compile.c:169
+#: sed/compile.c:170
msgid "multiple `p' options to `s' command"
msgstr "plusieurs options « p » à la commande « s »"
-#: sed/compile.c:171
+#: sed/compile.c:172
msgid "multiple `g' options to `s' command"
msgstr "plusieurs options « g » à la commande « s »"
-#: sed/compile.c:173
+#: sed/compile.c:174
msgid "multiple number options to `s' command"
msgstr "plusieurs options numériques à la commande « s »"
-#: sed/compile.c:175
+#: sed/compile.c:176
msgid "number option to `s' command may not be zero"
msgstr "l'option numérique de la commande « s » ne peut pas être nulle"
-#: sed/compile.c:177
+#: sed/compile.c:178
msgid "strings for `y' command are different lengths"
msgstr ""
"les chaînes destinées à la commande « y » ont des longueurs différentes"
-#: sed/compile.c:179
+#: sed/compile.c:180
msgid "delimiter character is not a single-byte character"
msgstr "le caractère délimiteur n'est pas un caractère à un seul octet"
-#: sed/compile.c:181
+#: sed/compile.c:182
msgid "expected newer version of sed"
msgstr "une version plus récente de sed est attendue"
-#: sed/compile.c:183
+#: sed/compile.c:184
msgid "invalid usage of line address 0"
msgstr "utilisation invalide de l'adresse de ligne 0"
-#: sed/compile.c:184
+#: sed/compile.c:185
#, c-format
msgid "unknown command: `%c'"
msgstr "commande inconnue: « %c »"
-#: sed/compile.c:186
+#: sed/compile.c:187
msgid "incomplete command"
msgstr "commande incomplète"
-#: sed/compile.c:188
+#: sed/compile.c:189
msgid "\":\" lacks a label"
msgstr "une étiquette est manquante pour « : »"
-#: sed/compile.c:190
+#: sed/compile.c:191
msgid "recursive escaping after \\c not allowed"
msgstr "un échappement récursif après \\c n'est pas permis"
-#: sed/compile.c:213
+#: sed/compile.c:193
+msgid "e/r/w commands disabled in sandbox mode"
+msgstr "les commandes e/r/w sont désactivées dans le bac à sable"
+
+#: sed/compile.c:215
#, c-format
msgid "%s: file %s line %lu: %s\n"
msgstr "%s: fichier %s ligne %lu: %s\n"
-#: sed/compile.c:216
+#: sed/compile.c:218
#, c-format
msgid "%s: -e expression #%lu, char %lu: %s\n"
msgstr "%s: -e expression n°%lu, caractère %lu: %s\n"
-#: sed/compile.c:1644
+#: sed/compile.c:1607
#, c-format
msgid "can't find label for jump to `%s'"
msgstr "impossible de trouver l'étiquette pour sauter à « %s »"
-#: sed/execute.c:254 sed/execute.c:271
+#: sed/execute.c:253 sed/execute.c:270
#, c-format
msgid "case conversion produced an invalid character"
msgstr "la conversion de casse à produit un caractère invalide"
-#: sed/execute.c:565
+#: sed/execute.c:561
#, c-format
msgid "%s: can't read %s: %s\n"
msgstr "%s: impossible de lire %s: %s\n"
-#: sed/execute.c:590
+#: sed/execute.c:587
#, c-format
msgid "couldn't edit %s: is a terminal"
msgstr "impossible d'éditer %s: est un terminal"
-#: sed/execute.c:595
+#: sed/execute.c:592
#, c-format
msgid "couldn't edit %s: not a regular file"
msgstr "impossible d'éditer %s: ce n'est pas un fichier régulier"
-#: sed/execute.c:606
+#: sed/execute.c:603
#, c-format
msgid "%s: warning: failed to set default file creation context to %s: %s"
msgstr ""
"%s: avertissement: impossible de changer le contexte de création de fichier "
"par défaut à %s: %s"
-#: sed/execute.c:614
+#: sed/execute.c:611
#, c-format
msgid "%s: warning: failed to get security context of %s: %s"
msgstr ""
"%s: avertissement: impossible d'obtenir le contexte de sécurité de %s: %s"
-#: sed/execute.c:633 sed/utils.c:178
+#: sed/execute.c:630 sed/utils.c:188
#, c-format
msgid "couldn't open temporary file %s: %s"
msgstr "impossible d'ouvrir le fichier temporaire %s: %s"
-#: sed/execute.c:1148 sed/execute.c:1358
+#: sed/execute.c:1167 sed/execute.c:1366
msgid "error in subprocess"
msgstr "erreur dans le sous-processus"
-#: sed/execute.c:1150
+#: sed/execute.c:1169
msgid "option `e' not supported"
msgstr "l'option « e » n'est pas supportée"
-#: sed/execute.c:1339
+#: sed/execute.c:1347
msgid "`e' command not supported"
msgstr "la commande « e » n'est pas supportée"
-#: sed/execute.c:1665
+#: sed/execute.c:1662
msgid "no input files"
msgstr "pas de fichier d'entrée"
-#: sed/regexp.c:39
+#: sed/regexp.c:40
msgid "no previous regular expression"
msgstr "pas d'expression régulière précédente"
-#: sed/regexp.c:141
+#: sed/regexp.c:125
#, c-format
msgid "invalid reference \\%d on `s' command's RHS"
msgstr "référence \\%d invalide dans le membre de droite de la commande « s »"
-#: sed/regexp.c:259
+#: sed/regexp.c:196
msgid "regex input buffer length larger than INT_MAX"
msgstr ""
"la taille du tampon d'entrée d'expression régulière est plus grand que "
"INT_MAX"
-#: sed/sed.c:35
+#: sed/sed.c:36
msgid "Jay Fenlason"
msgstr "Jay Fenlason"
-#: sed/sed.c:36
+#: sed/sed.c:37
msgid "Tom Lord"
msgstr "Tom Lord"
-#: sed/sed.c:37
+#: sed/sed.c:38
msgid "Ken Pizzini"
msgstr "Ken Pizzini"
-#: sed/sed.c:38
+#: sed/sed.c:39
msgid "Paolo Bonzini"
msgstr "Paolo Bonzini"
-#: sed/sed.c:113
+#: sed/sed.c:40
+msgid "Jim Meyering"
+msgstr "Jim Meyering"
+
+#: sed/sed.c:41
+msgid "Assaf Gordon"
+msgstr "Assaf Gordon"
+
+#: sed/sed.c:124
#, c-format
msgid ""
"GNU sed home page: <https://www.gnu.org/software/sed/>.\n"
@@ -618,21 +630,12 @@ msgstr ""
"Aide générale sur l'utilisation des logiciels GNU: <https://www.gnu.org/help/"
"gethelp.fr.html>.\n"
-#: sed/sed.c:120
+#: sed/sed.c:130
#, c-format
msgid "E-mail bug reports to: <%s>.\n"
msgstr "Envoyez les rapports d'anomalies par mail à: <%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"
-" utiliser la syntaxe des expressions régulières\n"
-" de Perl 5 dans le script.\n"
-
-#: sed/sed.c:134
+#: sed/sed.c:138
#, c-format
msgid ""
"Usage: %s [OPTION]... {script-only-if-no-other-script} [input-file]...\n"
@@ -642,7 +645,7 @@ msgstr ""
"[fichier-d'entrée]...\n"
"\n"
-#: sed/sed.c:138
+#: sed/sed.c:142
#, c-format
msgid ""
" -n, --quiet, --silent\n"
@@ -651,7 +654,16 @@ msgstr ""
" -n, --quiet, --silent\n"
" supprimer l'écriture automatique de l'espace des motifs\n"
-#: sed/sed.c:140
+#: sed/sed.c:144
+#, c-format
+msgid ""
+" --debug\n"
+" annotate program execution\n"
+msgstr ""
+" --debug\n"
+" annoter l'exécution du programme\n"
+
+#: sed/sed.c:146
#, c-format
msgid ""
" -e script, --expression=script\n"
@@ -660,7 +672,7 @@ msgstr ""
" -e script, --expression=script\n"
" ajouter le script aux commandes à exécuter\n"
-#: sed/sed.c:142
+#: sed/sed.c:148
#, c-format
msgid ""
" -f script-file, --file=script-file\n"
@@ -671,7 +683,7 @@ msgstr ""
" ajouter le contenu de fichier-script aux commandes\n"
" à exécuter\n"
-#: sed/sed.c:146
+#: sed/sed.c:152
#, c-format
msgid ""
" --follow-symlinks\n"
@@ -680,7 +692,7 @@ msgstr ""
" --follow-symlinks\n"
" suivre les liens symboliques pendant le traitement\n"
-#: sed/sed.c:149
+#: sed/sed.c:155
#, c-format
msgid ""
" -i[SUFFIX], --in-place[=SUFFIX]\n"
@@ -690,7 +702,7 @@ msgstr ""
" éditer les fichiers à leur place (fait une\n"
" sauvegarde si le SUFFIXE est fourni)\n"
-#: sed/sed.c:153
+#: sed/sed.c:158
#, c-format
msgid ""
" -b, --binary\n"
@@ -701,7 +713,7 @@ msgstr ""
" ouvrir les fichiers en mode binaire (CR+LF n'ont pas de "
"traitement spécial)\n"
-#: sed/sed.c:157
+#: sed/sed.c:162
#, c-format
msgid ""
" -l N, --line-length=N\n"
@@ -711,7 +723,7 @@ msgstr ""
" spécifier la longueur de coupure de ligne désirée pour la\n"
" commande « l »\n"
-#: sed/sed.c:159
+#: sed/sed.c:164
#, c-format
msgid ""
" --posix\n"
@@ -720,7 +732,7 @@ msgstr ""
" --posix\n"
" désactiver toutes les extensions GNU.\n"
-#: sed/sed.c:161
+#: sed/sed.c:166
#, c-format
msgid ""
" -E, -r, --regexp-extended\n"
@@ -732,7 +744,7 @@ msgstr ""
" étendues dans le script.\n"
" (utilisez -E pour la portabilité).\n"
-#: sed/sed.c:167
+#: sed/sed.c:169
#, c-format
msgid ""
" -s, --separate\n"
@@ -743,7 +755,7 @@ msgstr ""
" considérer les fichiers comme séparés plutôt que comme un\n"
" simple flux long et continu.\n"
-#: sed/sed.c:170
+#: sed/sed.c:172
#, c-format
msgid ""
" --sandbox\n"
@@ -752,7 +764,7 @@ msgstr ""
" --sandbox\n"
" opère en mode sandbox (désactive les commandes e/r/w)..\n"
-#: sed/sed.c:172
+#: sed/sed.c:174
#, c-format
msgid ""
" -u, --unbuffered\n"
@@ -765,7 +777,7 @@ msgstr ""
" fichiers d'entrée et écrire les tampons de sortie plus\n"
" souvent sur le disque\n"
-#: sed/sed.c:175
+#: sed/sed.c:177
#, c-format
msgid ""
" -z, --null-data\n"
@@ -774,18 +786,18 @@ msgstr ""
" -z, --null-data\n"
" séparer les lignes avec un caractère NUL\n"
-#: sed/sed.c:177
+#: sed/sed.c:179
#, c-format
msgid " --help display this help and exit\n"
msgstr " --help afficher cette aide et sortir\n"
-#: sed/sed.c:178
+#: sed/sed.c:180
#, 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:179
+#: sed/sed.c:181
#, c-format
msgid ""
"\n"
@@ -803,48 +815,69 @@ msgstr ""
"est lue.\n"
"\n"
-#: sed/utils.c:73 sed/utils.c:384
+#: sed/sed.c:373
+msgid "failed to set binary mode on STDIN"
+msgstr "impossible de passer en mode binaire sur STDIN"
+
+#: sed/sed.c:375
+msgid "failed to set binary mode on STDOUT"
+msgstr "impossible de passer en mode binaire sur STDOUT"
+
+#: sed/utils.c:77 sed/utils.c:395
#, c-format
msgid "cannot remove %s: %s"
msgstr "impossible de supprimer %s: %s"
-#: sed/utils.c:136
+#: sed/utils.c:146
#, c-format
msgid "couldn't open file %s: %s"
msgstr "impossible d'ouvrir le fichier %s: %s"
-#: sed/utils.c:155
+#: sed/utils.c:165
#, c-format
msgid "couldn't attach to %s: %s"
msgstr "impossible d'attacher à %s: %s"
#: sed/utils.c:192
#, c-format
+msgid "failed to set binary mode on '%s'"
+msgstr "impossible de passer en mode binaire sur « %s »"
+
+#: sed/utils.c:207
+#, 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 %llu élément dans %s: %s"
msgstr[1] "impossible d'écrire %llu éléments dans %s: %s"
-#: sed/utils.c:204 sed/utils.c:223
+#: sed/utils.c:219 sed/utils.c:238
#, c-format
msgid "read error on %s: %s"
msgstr "erreur de lecture sur %s: %s"
-#: sed/utils.c:325
+#: sed/utils.c:336
#, c-format
msgid "couldn't follow symlink %s: %s"
msgstr "impossible de suivre le lien symbolique %s: %s"
-#: sed/utils.c:359
+#: sed/utils.c:370
#, c-format
msgid "cannot stat %s: %s"
msgstr "impossible de faire un appel système « stat » sur le fichier %s: %s"
-#: sed/utils.c:389
+#: sed/utils.c:400
#, c-format
msgid "cannot rename %s: %s"
msgstr "impossible de renommer %s: %s"
+#~ msgid ""
+#~ " -R, --regexp-perl\n"
+#~ " use Perl 5's regular expressions syntax in the script.\n"
+#~ msgstr ""
+#~ " -R, --regexp-perl\n"
+#~ " utiliser la syntaxe des expressions régulières\n"
+#~ " de Perl 5 dans le script.\n"
+
#~ msgid "%s: option '--%s' doesn't allow an argument\n"
#~ msgstr "%s: l'option « --%s » n'accepte pas d'argument\n"
diff --git a/po/ga.gmo b/po/ga.gmo
index 9bf0787..5fa2e62 100644
--- a/po/ga.gmo
+++ b/po/ga.gmo
Binary files differ
diff --git a/po/ga.po b/po/ga.po
index 3be6eb6..70adbb8 100644
--- a/po/ga.po
+++ b/po/ga.po
@@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: sed 4.4.104\n"
"Report-Msgid-Bugs-To: bug-gnu-utils@gnu.org\n"
-"POT-Creation-Date: 2018-03-31 18:40-0700\n"
+"POT-Creation-Date: 2018-12-20 22:03-0800\n"
"PO-Revision-Date: 2018-03-24 11:04-0500\n"
"Last-Translator: Kevin Scannell <kscanne@gmail.com>\n"
"Language-Team: Irish <gaeilge-gnulinux@lists.sourceforge.net>\n"
@@ -28,40 +28,40 @@ msgstr "earráid scríofa"
msgid "preserving permissions for %s"
msgstr "ceadanna %s á gcaomhnú"
-#: lib/dfa.c:958
+#: lib/dfa.c:970
msgid "unbalanced ["
msgstr "[ corr"
-#: lib/dfa.c:1079
+#: lib/dfa.c:1091
msgid "invalid character class"
msgstr "aicme charachtair neamhbhailí"
-#: lib/dfa.c:1205
+#: lib/dfa.c:1217
msgid "character class syntax is [[:space:]], not [:space:]"
msgstr ""
"is é [[:space:]] an chomhréir cheart ar aicme charactair, in áit [:space:]"
-#: lib/dfa.c:1272
+#: lib/dfa.c:1284
msgid "unfinished \\ escape"
msgstr "éálúchán \\ gan críochnú"
-#: lib/dfa.c:1433
+#: lib/dfa.c:1445
msgid "invalid content of \\{\\}"
msgstr "ábhar neamhbhailí idir \\{\\}"
-#: lib/dfa.c:1436
+#: lib/dfa.c:1448
msgid "regular expression too big"
msgstr "slonn ionadaíochta rómhór"
-#: lib/dfa.c:1850
+#: lib/dfa.c:1863
msgid "unbalanced ("
msgstr "( corr"
-#: lib/dfa.c:1968
+#: lib/dfa.c:1981
msgid "no syntax specified"
msgstr "níor sonraíodh aon chomhréir"
-#: lib/dfa.c:1976
+#: lib/dfa.c:1992
msgid "unbalanced )"
msgstr ") corr"
@@ -206,7 +206,7 @@ msgstr "Slonn ionadaíochta rómhór"
msgid "Unmatched ) or \\)"
msgstr ") nó \\) corr"
-#: lib/regcomp.c:689
+#: lib/regcomp.c:688
msgid "No previous regular expression"
msgstr "Níl aon slonn ionadaíochta roimhe seo"
@@ -215,12 +215,12 @@ msgstr "Níl aon slonn ionadaíochta roimhe seo"
msgid "setting permissions for %s"
msgstr "ceadanna %s á socrú"
-#: lib/version-etc.c:74
+#: lib/version-etc.c:73
#, c-format
msgid "Packaged by %s (%s)\n"
msgstr "Pacáistithe ag %s (%s)\n"
-#: lib/version-etc.c:77
+#: lib/version-etc.c:76
#, c-format
msgid "Packaged by %s\n"
msgstr "Pacáistithe ag %s\n"
@@ -228,11 +228,11 @@ msgstr "Pacáistithe ag %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
+#: lib/version-etc.c:83
msgid "(C)"
msgstr "©"
-#: lib/version-etc.c:86
+#: lib/version-etc.c:85
msgid ""
"\n"
"License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl."
@@ -436,171 +436,183 @@ msgstr "ordú ar iarraidh"
msgid "command only uses one address"
msgstr "ní úsáidtear an t-ordú ach seoladh amháin"
-#: sed/compile.c:164
+#: sed/compile.c:165
msgid "unterminated address regex"
msgstr "seoladh regex gan chríochnú"
-#: sed/compile.c:165
+#: sed/compile.c:166
msgid "unterminated `s' command"
msgstr "ordú `s' gan chríochnú"
-#: sed/compile.c:166
+#: sed/compile.c:167
msgid "unterminated `y' command"
msgstr "ordú `y' gan chríochnú"
-#: sed/compile.c:167
+#: sed/compile.c:168
msgid "unknown option to `s'"
msgstr "rogha anaithnid i ndiaidh `s'"
-#: sed/compile.c:169
+#: sed/compile.c:170
msgid "multiple `p' options to `s' command"
msgstr "an iomarca roghanna `p' i ndiaidh `s'"
-#: sed/compile.c:171
+#: sed/compile.c:172
msgid "multiple `g' options to `s' command"
msgstr "an iomarca roghanna `g' i ndiaidh `s'"
-#: sed/compile.c:173
+#: sed/compile.c:174
msgid "multiple number options to `s' command"
msgstr "an iomarca roghanna uimhriúla i ndiaidh `s'"
-#: sed/compile.c:175
+#: sed/compile.c:176
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:177
+#: sed/compile.c:178
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:179
+#: sed/compile.c:180
msgid "delimiter character is not a single-byte character"
msgstr "tá an teormharcóir ina charachtar ilbheart"
-#: sed/compile.c:181
+#: sed/compile.c:182
msgid "expected newer version of sed"
msgstr "bhíothas ag súil le leagan `sed' níos úire"
-#: sed/compile.c:183
+#: sed/compile.c:184
msgid "invalid usage of line address 0"
msgstr "ní féidir an seoladh líne 0 a úsáid"
-#: sed/compile.c:184
+#: sed/compile.c:185
#, c-format
msgid "unknown command: `%c'"
msgstr "ordú anaithnid: `%c'"
-#: sed/compile.c:186
+#: sed/compile.c:187
msgid "incomplete command"
msgstr "ordú neamhiomlán"
-#: sed/compile.c:188
+#: sed/compile.c:189
msgid "\":\" lacks a label"
msgstr "lipéad de dhíth tar éis \":\""
-#: sed/compile.c:190
+#: sed/compile.c:191
msgid "recursive escaping after \\c not allowed"
msgstr "ní cheadaítear éalúchán athchúrsach tar éis \\c"
-#: sed/compile.c:213
+#: sed/compile.c:193
+msgid "e/r/w commands disabled in sandbox mode"
+msgstr ""
+
+#: sed/compile.c:215
#, c-format
msgid "%s: file %s line %lu: %s\n"
msgstr "%s: comhad %s líne %lu: %s\n"
-#: sed/compile.c:216
+#: sed/compile.c:218
#, c-format
msgid "%s: -e expression #%lu, char %lu: %s\n"
msgstr "%s: -e slonn #%lu, char %lu: %s\n"
-#: sed/compile.c:1644
+#: sed/compile.c:1607
#, 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:254 sed/execute.c:271
+#: sed/execute.c:253 sed/execute.c:270
#, c-format
msgid "case conversion produced an invalid character"
msgstr "tháinig carachtar neamhbhailí ó thiontú cáis"
-#: sed/execute.c:565
+#: sed/execute.c:561
#, 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:590
+#: sed/execute.c:587
#, 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:595
+#: sed/execute.c:592
#, 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:606
+#: sed/execute.c:603
#, c-format
msgid "%s: warning: failed to set default file creation context to %s: %s"
msgstr ""
"%s: rabhadh: níorbh fhéidir an comhthéacs réamhshocraithe cruthaithe comhad "
"a shocrú mar %s: %s"
-#: sed/execute.c:614
+#: sed/execute.c:611
#, c-format
msgid "%s: warning: failed to get security context of %s: %s"
msgstr "%s: rabhadh: níorbh fhéidir comhthéacs slándála de %s a fháil: %s"
-#: sed/execute.c:633 sed/utils.c:178
+#: sed/execute.c:630 sed/utils.c:188
#, 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:1148 sed/execute.c:1358
+#: sed/execute.c:1167 sed/execute.c:1366
msgid "error in subprocess"
msgstr "earráid i bhfo-phróiseas"
-#: sed/execute.c:1150
+#: sed/execute.c:1169
msgid "option `e' not supported"
msgstr "níl an rogha `e' ar fáil"
-#: sed/execute.c:1339
+#: sed/execute.c:1347
msgid "`e' command not supported"
msgstr "níl an t-ordú `e' ar fáil"
-#: sed/execute.c:1665
+#: sed/execute.c:1662
msgid "no input files"
msgstr "gan inchomhad"
-#: sed/regexp.c:39
+#: sed/regexp.c:40
msgid "no previous regular expression"
msgstr "níl aon slonn ionadaíochta roimhe seo"
-#: sed/regexp.c:141
+#: sed/regexp.c:125
#, c-format
msgid "invalid reference \\%d on `s' command's RHS"
msgstr "tagairt neamhbhailí \\%d ar dheis ordú `s'"
-#: sed/regexp.c:259
+#: sed/regexp.c:196
msgid "regex input buffer length larger than INT_MAX"
msgstr "fad an mhaoláin ionchurtha níos mó ná INT_MAX"
-#: sed/sed.c:35
+#: sed/sed.c:36
msgid "Jay Fenlason"
msgstr "Jay Fenlason"
-#: sed/sed.c:36
+#: sed/sed.c:37
msgid "Tom Lord"
msgstr "Tom Lord"
-#: sed/sed.c:37
+#: sed/sed.c:38
msgid "Ken Pizzini"
msgstr "Ken Pizzini"
-#: sed/sed.c:38
+#: sed/sed.c:39
msgid "Paolo Bonzini"
msgstr "Paolo Bonzini"
-#: sed/sed.c:113
+#: sed/sed.c:40
+msgid "Jim Meyering"
+msgstr ""
+
+#: sed/sed.c:41
+msgid "Assaf Gordon"
+msgstr ""
+
+#: sed/sed.c:124
#, c-format
msgid ""
"GNU sed home page: <https://www.gnu.org/software/sed/>.\n"
@@ -609,20 +621,12 @@ msgstr ""
"Leathanach baile GNU sed: <https://www.gnu.org/software/sed/>.\n"
"Cabhair ghinearálta le bogearraí GNU: <https://www.gnu.org/gethelp/>.\n"
-#: sed/sed.c:120
+#: sed/sed.c:130
#, c-format
msgid "E-mail bug reports to: <%s>.\n"
msgstr "Seol tuairiscí fabhtanna chuig: <%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"
-" bain úsáid as sloinn ionadaíochta atá ag Perl 5.\n"
-
-#: sed/sed.c:134
+#: sed/sed.c:138
#, c-format
msgid ""
"Usage: %s [OPTION]... {script-only-if-no-other-script} [input-file]...\n"
@@ -631,7 +635,7 @@ msgstr ""
"Úsáid: %s [ROGHA]... {script-mura-bhfuil-script-eile} [inchomhad]...\n"
"\n"
-#: sed/sed.c:138
+#: sed/sed.c:142
#, c-format
msgid ""
" -n, --quiet, --silent\n"
@@ -640,7 +644,16 @@ msgstr ""
" -n, --quiet, --silent\n"
" stop priontáil uathoibríoch den spás patrúin\n"
-#: sed/sed.c:140
+#: sed/sed.c:144
+#, fuzzy, c-format
+msgid ""
+" --debug\n"
+" annotate program execution\n"
+msgstr ""
+" --posix\n"
+" díchumasaigh gach feabhsúchán GNU.\n"
+
+#: sed/sed.c:146
#, c-format
msgid ""
" -e script, --expression=script\n"
@@ -649,7 +662,7 @@ msgstr ""
" -e script, --expression=script\n"
" cuir an script leis na horduithe le rith\n"
-#: sed/sed.c:142
+#: sed/sed.c:148
#, c-format
msgid ""
" -f script-file, --file=script-file\n"
@@ -659,7 +672,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:146
+#: sed/sed.c:152
#, c-format
msgid ""
" --follow-symlinks\n"
@@ -669,7 +682,7 @@ msgstr ""
" lean naisc shiombalacha má phróiseáiltear an comhad san\n"
" áit a bhfuil sé\n"
-#: sed/sed.c:149
+#: sed/sed.c:155
#, c-format
msgid ""
" -i[SUFFIX], --in-place[=SUFFIX]\n"
@@ -679,7 +692,7 @@ msgstr ""
" athraigh na comhaid féin (agus déan cúltaca má tá IARMHÍR "
"ann)\n"
-#: sed/sed.c:153
+#: sed/sed.c:158
#, c-format
msgid ""
" -b, --binary\n"
@@ -691,7 +704,7 @@ msgstr ""
"+LFanna\n"
" ar bhealach speisialta)\n"
-#: sed/sed.c:157
+#: sed/sed.c:162
#, c-format
msgid ""
" -l N, --line-length=N\n"
@@ -700,7 +713,7 @@ msgstr ""
" -l N, --line-length=N\n"
" ceap an fad timfhillte le haghaidh an ordaithe `l'\n"
-#: sed/sed.c:159
+#: sed/sed.c:164
#, c-format
msgid ""
" --posix\n"
@@ -709,7 +722,7 @@ msgstr ""
" --posix\n"
" díchumasaigh gach feabhsúchán GNU.\n"
-#: sed/sed.c:161
+#: sed/sed.c:166
#, c-format
msgid ""
" -E, -r, --regexp-extended\n"
@@ -720,7 +733,7 @@ msgstr ""
" úsáid sloinn ionadaíochta feabhsaithe sa script.\n"
" (ar mhaithe le hinaistritheacht, úsáid POSIX -E).\n"
-#: sed/sed.c:167
+#: sed/sed.c:169
#, c-format
msgid ""
" -s, --separate\n"
@@ -731,7 +744,7 @@ msgstr ""
" próiseáil gach comhad ar leith, seachas iad a phróiséail\n"
" mar shruth fada amháin.\n"
-#: sed/sed.c:170
+#: sed/sed.c:172
#, c-format
msgid ""
" --sandbox\n"
@@ -740,7 +753,7 @@ msgstr ""
" --sandbox\n"
" úsáid sed i mbosca gainimh (díchumasaigh orduithe e/r/w).\n"
-#: sed/sed.c:172
+#: sed/sed.c:174
#, c-format
msgid ""
" -u, --unbuffered\n"
@@ -753,7 +766,7 @@ msgstr ""
"sruthlaigh\n"
" na maoláin aschuir níos minice\n"
-#: sed/sed.c:175
+#: sed/sed.c:177
#, c-format
msgid ""
" -z, --null-data\n"
@@ -762,17 +775,17 @@ msgstr ""
" -z, --null-data\n"
" carachtair NUL idir línte\n"
-#: sed/sed.c:177
+#: sed/sed.c:179
#, c-format
msgid " --help display this help and exit\n"
msgstr " --help taispeáin an chabhair seo agus scoir\n"
-#: sed/sed.c:178
+#: sed/sed.c:180
#, c-format
msgid " --version output version information and exit\n"
msgstr " --version taispeáin eolas faoin leagan agus scoir\n"
-#: sed/sed.c:179
+#: sed/sed.c:181
#, c-format
msgid ""
"\n"
@@ -789,23 +802,36 @@ msgstr ""
"léigh ón ghnáth-ionchur.\n"
"\n"
-#: sed/utils.c:73 sed/utils.c:384
+#: sed/sed.c:373
+msgid "failed to set binary mode on STDIN"
+msgstr ""
+
+#: sed/sed.c:375
+msgid "failed to set binary mode on STDOUT"
+msgstr ""
+
+#: sed/utils.c:77 sed/utils.c:395
#, c-format
msgid "cannot remove %s: %s"
msgstr "ní féidir %s a scriosadh: %s"
-#: sed/utils.c:136
+#: sed/utils.c:146
#, c-format
msgid "couldn't open file %s: %s"
msgstr "níorbh fhéidir an comhad %s a oscailt: %s"
-#: sed/utils.c:155
+#: sed/utils.c:165
#, c-format
msgid "couldn't attach to %s: %s"
msgstr "níorbh fhéidir ceangal le %s: %s"
#: sed/utils.c:192
#, c-format
+msgid "failed to set binary mode on '%s'"
+msgstr ""
+
+#: sed/utils.c:207
+#, 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 %llu rud a scríobh i %s: %s"
@@ -814,26 +840,33 @@ msgstr[2] "níorbh fhéidir %llu rud a scríobh i %s: %s"
msgstr[3] "níorbh fhéidir %llu rud a scríobh i %s: %s"
msgstr[4] "níorbh fhéidir %llu rud a scríobh i %s: %s"
-#: sed/utils.c:204 sed/utils.c:223
+#: sed/utils.c:219 sed/utils.c:238
#, c-format
msgid "read error on %s: %s"
msgstr "earráid ag léamh %s: %s"
-#: sed/utils.c:325
+#: sed/utils.c:336
#, c-format
msgid "couldn't follow symlink %s: %s"
msgstr "níorbh fhéidir nasc siombalach %s a leanúint: %s"
-#: sed/utils.c:359
+#: sed/utils.c:370
#, c-format
msgid "cannot stat %s: %s"
msgstr "ní féidir %s a 'stat': %s"
-#: sed/utils.c:389
+#: sed/utils.c:400
#, c-format
msgid "cannot rename %s: %s"
msgstr "ní féidir %s a athainmniú: %s"
+#~ msgid ""
+#~ " -R, --regexp-perl\n"
+#~ " use Perl 5's regular expressions syntax in the script.\n"
+#~ msgstr ""
+#~ " -R, --regexp-perl\n"
+#~ " bain úsáid as sloinn ionadaíochta atá ag Perl 5.\n"
+
#~ msgid "%s: option '--%s' doesn't allow an argument\n"
#~ msgstr "%s: ní cheadaítear argóint i ndiaidh na rogha '--%s'\n"
diff --git a/po/gl.gmo b/po/gl.gmo
index 7cae7dd..5e4290a 100644
--- a/po/gl.gmo
+++ b/po/gl.gmo
Binary files differ
diff --git a/po/gl.po b/po/gl.po
index fb836fc..139ddf3 100644
--- a/po/gl.po
+++ b/po/gl.po
@@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: sed 4.2.2\n"
"Report-Msgid-Bugs-To: bug-gnu-utils@gnu.org\n"
-"POT-Creation-Date: 2018-03-31 18:40-0700\n"
+"POT-Creation-Date: 2018-12-20 22:03-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"
@@ -28,42 +28,42 @@ msgstr ""
msgid "preserving permissions for %s"
msgstr ""
-#: lib/dfa.c:958
+#: lib/dfa.c:970
msgid "unbalanced ["
msgstr ""
-#: lib/dfa.c:1079
+#: lib/dfa.c:1091
#, fuzzy
msgid "invalid character class"
msgstr "Nome de clase de caracteres non válido"
-#: lib/dfa.c:1205
+#: lib/dfa.c:1217
msgid "character class syntax is [[:space:]], not [:space:]"
msgstr ""
-#: lib/dfa.c:1272
+#: lib/dfa.c:1284
msgid "unfinished \\ escape"
msgstr ""
-#: lib/dfa.c:1433
+#: lib/dfa.c:1445
#, fuzzy
msgid "invalid content of \\{\\}"
msgstr "Contido de \\{\\} non válido"
-#: lib/dfa.c:1436
+#: lib/dfa.c:1448
#, fuzzy
msgid "regular expression too big"
msgstr "Expresión regular grande de máis"
-#: lib/dfa.c:1850
+#: lib/dfa.c:1863
msgid "unbalanced ("
msgstr ""
-#: lib/dfa.c:1968
+#: lib/dfa.c:1981
msgid "no syntax specified"
msgstr ""
-#: lib/dfa.c:1976
+#: lib/dfa.c:1992
msgid "unbalanced )"
msgstr ""
@@ -209,7 +209,7 @@ msgstr "Expresión regular grande de máis"
msgid "Unmatched ) or \\)"
msgstr ") ou \\) sen parella"
-#: lib/regcomp.c:689
+#: lib/regcomp.c:688
msgid "No previous regular expression"
msgstr "Non hai unha expresión regular anterior"
@@ -218,12 +218,12 @@ msgstr "Non hai unha expresión regular anterior"
msgid "setting permissions for %s"
msgstr ""
-#: lib/version-etc.c:74
+#: lib/version-etc.c:73
#, c-format
msgid "Packaged by %s (%s)\n"
msgstr ""
-#: lib/version-etc.c:77
+#: lib/version-etc.c:76
#, c-format
msgid "Packaged by %s\n"
msgstr ""
@@ -231,11 +231,11 @@ 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
+#: lib/version-etc.c:83
msgid "(C)"
msgstr ""
-#: lib/version-etc.c:86
+#: lib/version-etc.c:85
msgid ""
"\n"
"License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl."
@@ -417,169 +417,181 @@ msgstr "falta unha instrucción"
msgid "command only uses one address"
msgstr "a instrucción só usa un enderezo"
-#: sed/compile.c:164
+#: sed/compile.c:165
msgid "unterminated address regex"
msgstr "expresión regular de enderezo non rematada"
-#: sed/compile.c:165
+#: sed/compile.c:166
msgid "unterminated `s' command"
msgstr "instrucción `s' non rematada"
-#: sed/compile.c:166
+#: sed/compile.c:167
msgid "unterminated `y' command"
msgstr "instrucción `y' non rematada"
-#: sed/compile.c:167
+#: sed/compile.c:168
msgid "unknown option to `s'"
msgstr "opción de `s' descoñecida"
-#: sed/compile.c:169
+#: sed/compile.c:170
msgid "multiple `p' options to `s' command"
msgstr "múltiples opcións `p' para a instrucción `s'"
-#: sed/compile.c:171
+#: sed/compile.c:172
msgid "multiple `g' options to `s' command"
msgstr "múltiples opcións `g' para a instrucción `s'"
-#: sed/compile.c:173
+#: sed/compile.c:174
msgid "multiple number options to `s' command"
msgstr "múltiples opcións numéricas para a instrucción `s'"
-#: sed/compile.c:175
+#: sed/compile.c:176
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:177
+#: sed/compile.c:178
msgid "strings for `y' command are different lengths"
msgstr "as cadeas para a instrucción `y' teñen lonxitudes diferentes"
-#: sed/compile.c:179
+#: sed/compile.c:180
msgid "delimiter character is not a single-byte character"
msgstr "o carácter delimitador non é un carácter de byte simple"
-#: sed/compile.c:181
+#: sed/compile.c:182
msgid "expected newer version of sed"
msgstr "se esperaba unha versión de sed máis nova"
-#: sed/compile.c:183
+#: sed/compile.c:184
msgid "invalid usage of line address 0"
msgstr "uso non válido da dirección de liña 0"
-#: sed/compile.c:184
+#: sed/compile.c:185
#, c-format
msgid "unknown command: `%c'"
msgstr "instrucción descoñecida:`%c'"
-#: sed/compile.c:186
+#: sed/compile.c:187
msgid "incomplete command"
msgstr "instrucción incompleta"
-#: sed/compile.c:188
+#: sed/compile.c:189
msgid "\":\" lacks a label"
msgstr ""
-#: sed/compile.c:190
+#: sed/compile.c:191
msgid "recursive escaping after \\c not allowed"
msgstr ""
-#: sed/compile.c:213
+#: sed/compile.c:193
+msgid "e/r/w commands disabled in sandbox mode"
+msgstr ""
+
+#: sed/compile.c:215
#, c-format
msgid "%s: file %s line %lu: %s\n"
msgstr "%s: ficheiro %s liña %lu: %s\n"
-#: sed/compile.c:216
+#: sed/compile.c:218
#, 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:1644
+#: sed/compile.c:1607
#, 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:254 sed/execute.c:271
+#: sed/execute.c:253 sed/execute.c:270
#, c-format
msgid "case conversion produced an invalid character"
msgstr ""
-#: sed/execute.c:565
+#: sed/execute.c:561
#, c-format
msgid "%s: can't read %s: %s\n"
msgstr "%s: non se puido ler %s: %s\n"
-#: sed/execute.c:590
+#: sed/execute.c:587
#, c-format
msgid "couldn't edit %s: is a terminal"
msgstr "non se puido editar %s: é unha terminal"
-#: sed/execute.c:595
+#: sed/execute.c:592
#, c-format
msgid "couldn't edit %s: not a regular file"
msgstr "non se puido editar %s: non é un ficheiro regular"
-#: sed/execute.c:606
+#: sed/execute.c:603
#, 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:614
+#: sed/execute.c:611
#, 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:633 sed/utils.c:178
+#: sed/execute.c:630 sed/utils.c:188
#, c-format
msgid "couldn't open temporary file %s: %s"
msgstr "non se puido abri-lo ficheiro temporal %s: %s"
-#: sed/execute.c:1148 sed/execute.c:1358
+#: sed/execute.c:1167 sed/execute.c:1366
msgid "error in subprocess"
msgstr "erro no subproceso"
-#: sed/execute.c:1150
+#: sed/execute.c:1169
msgid "option `e' not supported"
msgstr "a opción `e' non está soportada"
-#: sed/execute.c:1339
+#: sed/execute.c:1347
msgid "`e' command not supported"
msgstr "o comando `e' non está soportado"
-#: sed/execute.c:1665
+#: sed/execute.c:1662
msgid "no input files"
msgstr "non hai ficheiros de entrada"
-#: sed/regexp.c:39
+#: sed/regexp.c:40
msgid "no previous regular expression"
msgstr "non hai unha expresión regular anterior"
-#: sed/regexp.c:141
+#: sed/regexp.c:125
#, c-format
msgid "invalid reference \\%d on `s' command's RHS"
msgstr "referencia \\%d non válida no lado dereito do comando `s'"
-#: sed/regexp.c:259
+#: sed/regexp.c:196
msgid "regex input buffer length larger than INT_MAX"
msgstr ""
-#: sed/sed.c:35
+#: sed/sed.c:36
msgid "Jay Fenlason"
msgstr "Jay Fenlason"
-#: sed/sed.c:36
+#: sed/sed.c:37
msgid "Tom Lord"
msgstr "Tom Lord"
-#: sed/sed.c:37
+#: sed/sed.c:38
msgid "Ken Pizzini"
msgstr "Ken Pizzini"
-#: sed/sed.c:38
+#: sed/sed.c:39
msgid "Paolo Bonzini"
msgstr "Paolo Bonzini"
-#: sed/sed.c:113
+#: sed/sed.c:40
+msgid "Jim Meyering"
+msgstr ""
+
+#: sed/sed.c:41
+msgid "Assaf Gordon"
+msgstr ""
+
+#: sed/sed.c:124
#, fuzzy, c-format
msgid ""
"GNU sed home page: <https://www.gnu.org/software/sed/>.\n"
@@ -588,21 +600,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:120
+#: sed/sed.c:130
#, c-format
msgid "E-mail bug reports to: <%s>.\n"
msgstr ""
-#: 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"
-" usa-la sintaxe de expresións regulares de Perl 5 no "
-"script.\n"
-
-#: sed/sed.c:134
+#: sed/sed.c:138
#, c-format
msgid ""
"Usage: %s [OPTION]... {script-only-if-no-other-script} [input-file]...\n"
@@ -610,7 +613,7 @@ msgid ""
msgstr ""
"Uso: %s [OPCIÓN]... {script-só-sen-outro-script} [ficheiro-de-entrada]...\n"
-#: sed/sed.c:138
+#: sed/sed.c:142
#, c-format
msgid ""
" -n, --quiet, --silent\n"
@@ -619,7 +622,16 @@ msgstr ""
" -n, --quiet, --silent\n"
" suprime a visualización automática do espacio de patróns\n"
-#: sed/sed.c:140
+#: sed/sed.c:144
+#, fuzzy, c-format
+msgid ""
+" --debug\n"
+" annotate program execution\n"
+msgstr ""
+" --posix\n"
+" desactiva tódalas extensións GNU.\n"
+
+#: sed/sed.c:146
#, c-format
msgid ""
" -e script, --expression=script\n"
@@ -628,7 +640,7 @@ msgstr ""
"-e script, --expression=script\n"
" engade script ás instruccións que serán executadas\n"
-#: sed/sed.c:142
+#: sed/sed.c:148
#, c-format
msgid ""
" -f script-file, --file=script-file\n"
@@ -639,7 +651,7 @@ msgstr ""
" engade o contido do ficheiro do script ás instruccións que "
"serán executadas\n"
-#: sed/sed.c:146
+#: sed/sed.c:152
#, c-format
msgid ""
" --follow-symlinks\n"
@@ -648,7 +660,7 @@ msgstr ""
" --follow-symlinks\n"
" segue ligazóns simbólicas cando se procesan no seu sitio\n"
-#: sed/sed.c:149
+#: sed/sed.c:155
#, c-format
msgid ""
" -i[SUFFIX], --in-place[=SUFFIX]\n"
@@ -658,7 +670,7 @@ msgstr ""
" edita ficheiros no seu sitio (fai copia de seguridade se se "
"indica un SUFIXO)\n"
-#: sed/sed.c:153
+#: sed/sed.c:158
#, c-format
msgid ""
" -b, --binary\n"
@@ -669,7 +681,7 @@ msgstr ""
" ficheiros abertos en modo binario (non se procesan de xeito "
"especial CR+LFs)\n"
-#: sed/sed.c:157
+#: sed/sed.c:162
#, c-format
msgid ""
" -l N, --line-length=N\n"
@@ -679,7 +691,7 @@ msgstr ""
" especifica a lonxitude de axuste da liña desexado para a "
"instrucción `l' \n"
-#: sed/sed.c:159
+#: sed/sed.c:164
#, c-format
msgid ""
" --posix\n"
@@ -688,7 +700,7 @@ msgstr ""
" --posix\n"
" desactiva tódalas extensións GNU.\n"
-#: sed/sed.c:161
+#: sed/sed.c:166
#, fuzzy, c-format
msgid ""
" -E, -r, --regexp-extended\n"
@@ -698,7 +710,7 @@ msgstr ""
" -r, --regexp-extended\n"
" usa a sintaxe extendida de expresións regulares no script.\n"
-#: sed/sed.c:167
+#: sed/sed.c:169
#, fuzzy, c-format
msgid ""
" -s, --separate\n"
@@ -709,7 +721,7 @@ msgstr ""
" trata os ficheiros coma separados no canto de coma unha\n"
" longa tira de caracteres continua.\n"
-#: sed/sed.c:170
+#: sed/sed.c:172
#, fuzzy, c-format
msgid ""
" --sandbox\n"
@@ -718,7 +730,7 @@ msgstr ""
" -z, --null-data\n"
" separa liñas por caracteres NUL\n"
-#: sed/sed.c:172
+#: sed/sed.c:174
#, c-format
msgid ""
" -u, --unbuffered\n"
@@ -730,7 +742,7 @@ 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:175
+#: sed/sed.c:177
#, c-format
msgid ""
" -z, --null-data\n"
@@ -739,17 +751,17 @@ msgstr ""
" -z, --null-data\n"
" separa liñas por caracteres NUL\n"
-#: sed/sed.c:177
+#: sed/sed.c:179
#, c-format
msgid " --help display this help and exit\n"
msgstr " --help amosa esta axuda e sae\n"
-#: sed/sed.c:178
+#: sed/sed.c:180
#, 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:179
+#: sed/sed.c:181
#, c-format
msgid ""
"\n"
@@ -769,48 +781,69 @@ msgstr ""
"ficheiros de entrada, entón se le a entrada standard.\n"
"\n"
-#: sed/utils.c:73 sed/utils.c:384
+#: sed/sed.c:373
+msgid "failed to set binary mode on STDIN"
+msgstr ""
+
+#: sed/sed.c:375
+msgid "failed to set binary mode on STDOUT"
+msgstr ""
+
+#: sed/utils.c:77 sed/utils.c:395
#, c-format
msgid "cannot remove %s: %s"
msgstr "non se puido borrar %s: %s"
-#: sed/utils.c:136
+#: sed/utils.c:146
#, c-format
msgid "couldn't open file %s: %s"
msgstr "non se puido abri-lo ficheiro %s: %s"
-#: sed/utils.c:155
+#: sed/utils.c:165
#, c-format
msgid "couldn't attach to %s: %s"
msgstr "non se puido adxuntar elemento en %s: %s"
#: sed/utils.c:192
+#, c-format
+msgid "failed to set binary mode on '%s'"
+msgstr ""
+
+#: sed/utils.c:207
#, 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:204 sed/utils.c:223
+#: sed/utils.c:219 sed/utils.c:238
#, c-format
msgid "read error on %s: %s"
msgstr "erro de lectura en %s: %s"
-#: sed/utils.c:325
+#: sed/utils.c:336
#, c-format
msgid "couldn't follow symlink %s: %s"
msgstr "non se puido segui-la ligazón simbólica %s: %s"
-#: sed/utils.c:359
+#: sed/utils.c:370
#, c-format
msgid "cannot stat %s: %s"
msgstr "non se puido ler %s: %s"
-#: sed/utils.c:389
+#: sed/utils.c:400
#, c-format
msgid "cannot rename %s: %s"
msgstr "non se puido renomear %s: %s"
+#~ msgid ""
+#~ " -R, --regexp-perl\n"
+#~ " use Perl 5's regular expressions syntax in the script.\n"
+#~ msgstr ""
+#~ " -R, --regexp-perl\n"
+#~ " usa-la sintaxe de expresións regulares de Perl 5 no "
+#~ "script.\n"
+
#~ msgid "cannot specify modifiers on empty regexp"
#~ msgstr ""
#~ "non se poden especificar modificadores nunha expresión regular baleira"
diff --git a/po/he.gmo b/po/he.gmo
index a259ef1..06f475e 100644
--- a/po/he.gmo
+++ b/po/he.gmo
Binary files differ
diff --git a/po/he.po b/po/he.po
index 115c16c..7356d2b 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: 2018-03-31 18:40-0700\n"
+"POT-Creation-Date: 2018-12-20 22:03-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"
@@ -25,39 +25,39 @@ msgstr ""
msgid "preserving permissions for %s"
msgstr ""
-#: lib/dfa.c:958
+#: lib/dfa.c:970
msgid "unbalanced ["
msgstr ""
-#: lib/dfa.c:1079
+#: lib/dfa.c:1091
msgid "invalid character class"
msgstr ""
-#: lib/dfa.c:1205
+#: lib/dfa.c:1217
msgid "character class syntax is [[:space:]], not [:space:]"
msgstr ""
-#: lib/dfa.c:1272
+#: lib/dfa.c:1284
msgid "unfinished \\ escape"
msgstr ""
-#: lib/dfa.c:1433
+#: lib/dfa.c:1445
msgid "invalid content of \\{\\}"
msgstr ""
-#: lib/dfa.c:1436
+#: lib/dfa.c:1448
msgid "regular expression too big"
msgstr ""
-#: lib/dfa.c:1850
+#: lib/dfa.c:1863
msgid "unbalanced ("
msgstr ""
-#: lib/dfa.c:1968
+#: lib/dfa.c:1981
msgid "no syntax specified"
msgstr ""
-#: lib/dfa.c:1976
+#: lib/dfa.c:1992
msgid "unbalanced )"
msgstr ""
@@ -204,7 +204,7 @@ msgstr ""
msgid "Unmatched ) or \\)"
msgstr "- `{'"
-#: lib/regcomp.c:689
+#: lib/regcomp.c:688
msgid "No previous regular expression"
msgstr ""
@@ -213,12 +213,12 @@ msgstr ""
msgid "setting permissions for %s"
msgstr ""
-#: lib/version-etc.c:74
+#: lib/version-etc.c:73
#, c-format
msgid "Packaged by %s (%s)\n"
msgstr ""
-#: lib/version-etc.c:77
+#: lib/version-etc.c:76
#, c-format
msgid "Packaged by %s\n"
msgstr ""
@@ -226,11 +226,11 @@ 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
+#: lib/version-etc.c:83
msgid "(C)"
msgstr ""
-#: lib/version-etc.c:86
+#: lib/version-etc.c:85
msgid ""
"\n"
"License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl."
@@ -418,213 +418,226 @@ msgstr " "
msgid "command only uses one address"
msgstr " "
-#: sed/compile.c:164
+#: sed/compile.c:165
#, fuzzy
msgid "unterminated address regex"
msgstr " "
-#: sed/compile.c:165
+#: sed/compile.c:166
#, fuzzy
msgid "unterminated `s' command"
msgstr " `s' "
-#: sed/compile.c:166
+#: sed/compile.c:167
#, fuzzy
msgid "unterminated `y' command"
msgstr " `y' "
-#: sed/compile.c:167
+#: sed/compile.c:168
#, fuzzy
msgid "unknown option to `s'"
msgstr "`s' - "
-#: sed/compile.c:169
+#: sed/compile.c:170
msgid "multiple `p' options to `s' command"
msgstr "`s' `p' "
-#: sed/compile.c:171
+#: sed/compile.c:172
msgid "multiple `g' options to `s' command"
msgstr "`s' `g' "
-#: sed/compile.c:173
+#: sed/compile.c:174
msgid "multiple number options to `s' command"
msgstr "`s' "
-#: sed/compile.c:175
+#: sed/compile.c:176
msgid "number option to `s' command may not be zero"
msgstr " `s' "
-#: sed/compile.c:177
+#: sed/compile.c:178
#, fuzzy
msgid "strings for `y' command are different lengths"
msgstr " `y' "
-#: sed/compile.c:179
+#: sed/compile.c:180
msgid "delimiter character is not a single-byte character"
msgstr ""
-#: sed/compile.c:181
+#: sed/compile.c:182
msgid "expected newer version of sed"
msgstr ""
-#: sed/compile.c:183
+#: sed/compile.c:184
#, fuzzy
msgid "invalid usage of line address 0"
msgstr " "
-#: sed/compile.c:184
+#: sed/compile.c:185
#, fuzzy, c-format
msgid "unknown command: `%c'"
msgstr "- "
-#: sed/compile.c:186
+#: sed/compile.c:187
#, fuzzy
msgid "incomplete command"
msgstr " "
-#: sed/compile.c:188
+#: sed/compile.c:189
msgid "\":\" lacks a label"
msgstr ""
-#: sed/compile.c:190
+#: sed/compile.c:191
msgid "recursive escaping after \\c not allowed"
msgstr ""
-#: sed/compile.c:213
+#: sed/compile.c:193
+msgid "e/r/w commands disabled in sandbox mode"
+msgstr ""
+
+#: sed/compile.c:215
#, c-format
msgid "%s: file %s line %lu: %s\n"
msgstr "%s (%s %lu ) %s \n"
-#: sed/compile.c:216
+#: sed/compile.c:218
#, c-format
msgid "%s: -e expression #%lu, char %lu: %s\n"
msgstr "%s (%lu ' -e %lu ' ) %s \n"
-#: sed/compile.c:1644
+#: sed/compile.c:1607
#, fuzzy, c-format
msgid "can't find label for jump to `%s'"
msgstr " `%s' "
-#: sed/execute.c:254 sed/execute.c:271
+#: sed/execute.c:253 sed/execute.c:270
#, c-format
msgid "case conversion produced an invalid character"
msgstr ""
-#: sed/execute.c:565
+#: sed/execute.c:561
#, c-format
msgid "%s: can't read %s: %s\n"
msgstr "%s %s (%s) \n"
-#: sed/execute.c:590
+#: sed/execute.c:587
#, c-format
msgid "couldn't edit %s: is a terminal"
msgstr ""
-#: sed/execute.c:595
+#: sed/execute.c:592
#, c-format
msgid "couldn't edit %s: not a regular file"
msgstr ""
-#: sed/execute.c:606
+#: sed/execute.c:603
#, c-format
msgid "%s: warning: failed to set default file creation context to %s: %s"
msgstr ""
-#: sed/execute.c:614
+#: sed/execute.c:611
#, c-format
msgid "%s: warning: failed to get security context of %s: %s"
msgstr ""
-#: sed/execute.c:633 sed/utils.c:178
+#: sed/execute.c:630 sed/utils.c:188
#, fuzzy, c-format
msgid "couldn't open temporary file %s: %s"
msgstr "%s "
-#: sed/execute.c:1148 sed/execute.c:1358
+#: sed/execute.c:1167 sed/execute.c:1366
msgid "error in subprocess"
msgstr ""
-#: sed/execute.c:1150
+#: sed/execute.c:1169
msgid "option `e' not supported"
msgstr ""
-#: sed/execute.c:1339
+#: sed/execute.c:1347
msgid "`e' command not supported"
msgstr ""
-#: sed/execute.c:1665
+#: sed/execute.c:1662
msgid "no input files"
msgstr ""
-#: sed/regexp.c:39
+#: sed/regexp.c:40
msgid "no previous regular expression"
msgstr ""
-#: sed/regexp.c:141
+#: sed/regexp.c:125
#, c-format
msgid "invalid reference \\%d on `s' command's RHS"
msgstr ""
-#: sed/regexp.c:259
+#: sed/regexp.c:196
msgid "regex input buffer length larger than INT_MAX"
msgstr ""
-#: sed/sed.c:35
+#: sed/sed.c:36
msgid "Jay Fenlason"
msgstr ""
-#: sed/sed.c:36
+#: sed/sed.c:37
msgid "Tom Lord"
msgstr ""
-#: sed/sed.c:37
+#: sed/sed.c:38
msgid "Ken Pizzini"
msgstr ""
-#: sed/sed.c:38
+#: sed/sed.c:39
msgid "Paolo Bonzini"
msgstr ""
-#: sed/sed.c:113
+#: sed/sed.c:40
+msgid "Jim Meyering"
+msgstr ""
+
+#: sed/sed.c:41
+msgid "Assaf Gordon"
+msgstr ""
+
+#: sed/sed.c:124
#, c-format
msgid ""
"GNU sed home page: <https://www.gnu.org/software/sed/>.\n"
"General help using GNU software: <https://www.gnu.org/gethelp/>.\n"
msgstr ""
-#: sed/sed.c:120
+#: sed/sed.c:130
#, c-format
msgid "E-mail bug reports to: <%s>.\n"
msgstr ""
-#: sed/sed.c:129
-msgid ""
-" -R, --regexp-perl\n"
-" use Perl 5's regular expressions syntax in the script.\n"
-msgstr ""
-
-#: sed/sed.c:134
+#: sed/sed.c:138
#, c-format
msgid ""
"Usage: %s [OPTION]... {script-only-if-no-other-script} [input-file]...\n"
"\n"
msgstr ""
-#: sed/sed.c:138
+#: sed/sed.c:142
#, c-format
msgid ""
" -n, --quiet, --silent\n"
" suppress automatic printing of pattern space\n"
msgstr ""
-#: sed/sed.c:140
+#: sed/sed.c:144
+#, c-format
+msgid ""
+" --debug\n"
+" annotate program execution\n"
+msgstr ""
+
+#: sed/sed.c:146
#, c-format
msgid ""
" -e script, --expression=script\n"
" add the script to the commands to be executed\n"
msgstr ""
-#: sed/sed.c:142
+#: sed/sed.c:148
#, c-format
msgid ""
" -f script-file, --file=script-file\n"
@@ -632,21 +645,21 @@ msgid ""
"executed\n"
msgstr ""
-#: sed/sed.c:146
+#: sed/sed.c:152
#, c-format
msgid ""
" --follow-symlinks\n"
" follow symlinks when processing in place\n"
msgstr ""
-#: sed/sed.c:149
+#: sed/sed.c:155
#, c-format
msgid ""
" -i[SUFFIX], --in-place[=SUFFIX]\n"
" edit files in place (makes backup if SUFFIX supplied)\n"
msgstr ""
-#: sed/sed.c:153
+#: sed/sed.c:158
#, c-format
msgid ""
" -b, --binary\n"
@@ -654,21 +667,21 @@ msgid ""
"specially)\n"
msgstr ""
-#: sed/sed.c:157
+#: sed/sed.c:162
#, c-format
msgid ""
" -l N, --line-length=N\n"
" specify the desired line-wrap length for the `l' command\n"
msgstr ""
-#: sed/sed.c:159
+#: sed/sed.c:164
#, c-format
msgid ""
" --posix\n"
" disable all GNU extensions.\n"
msgstr ""
-#: sed/sed.c:161
+#: sed/sed.c:166
#, c-format
msgid ""
" -E, -r, --regexp-extended\n"
@@ -676,7 +689,7 @@ msgid ""
" (for portability use POSIX -E).\n"
msgstr ""
-#: sed/sed.c:167
+#: sed/sed.c:169
#, c-format
msgid ""
" -s, --separate\n"
@@ -684,14 +697,14 @@ msgid ""
" continuous long stream.\n"
msgstr ""
-#: sed/sed.c:170
+#: sed/sed.c:172
#, c-format
msgid ""
" --sandbox\n"
" operate in sandbox mode (disable e/r/w commands).\n"
msgstr ""
-#: sed/sed.c:172
+#: sed/sed.c:174
#, c-format
msgid ""
" -u, --unbuffered\n"
@@ -700,24 +713,24 @@ msgid ""
" the output buffers more often\n"
msgstr ""
-#: sed/sed.c:175
+#: sed/sed.c:177
#, c-format
msgid ""
" -z, --null-data\n"
" separate lines by NUL characters\n"
msgstr ""
-#: sed/sed.c:177
+#: sed/sed.c:179
#, c-format
msgid " --help display this help and exit\n"
msgstr ""
-#: sed/sed.c:178
+#: sed/sed.c:180
#, c-format
msgid " --version output version information and exit\n"
msgstr ""
-#: sed/sed.c:179
+#: sed/sed.c:181
#, c-format
msgid ""
"\n"
@@ -728,44 +741,57 @@ msgid ""
"\n"
msgstr ""
-#: sed/utils.c:73 sed/utils.c:384
+#: sed/sed.c:373
+msgid "failed to set binary mode on STDIN"
+msgstr ""
+
+#: sed/sed.c:375
+msgid "failed to set binary mode on STDOUT"
+msgstr ""
+
+#: sed/utils.c:77 sed/utils.c:395
#, fuzzy, c-format
msgid "cannot remove %s: %s"
msgstr "%s %s (%s) \n"
-#: sed/utils.c:136
+#: sed/utils.c:146
#, fuzzy, c-format
msgid "couldn't open file %s: %s"
msgstr "%s "
-#: sed/utils.c:155
+#: sed/utils.c:165
#, fuzzy, c-format
msgid "couldn't attach to %s: %s"
msgstr "%s- (%s) "
#: sed/utils.c:192
+#, c-format
+msgid "failed to set binary mode on '%s'"
+msgstr ""
+
+#: sed/utils.c:207
#, 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:204 sed/utils.c:223
+#: sed/utils.c:219 sed/utils.c:238
#, c-format
msgid "read error on %s: %s"
msgstr "%s (%s) "
-#: sed/utils.c:325
+#: sed/utils.c:336
#, fuzzy, c-format
msgid "couldn't follow symlink %s: %s"
msgstr "%s- (%s) "
-#: sed/utils.c:359
+#: sed/utils.c:370
#, fuzzy, c-format
msgid "cannot stat %s: %s"
msgstr "%s %s (%s) \n"
-#: sed/utils.c:389
+#: sed/utils.c:400
#, fuzzy, c-format
msgid "cannot rename %s: %s"
msgstr "%s %s (%s) \n"
diff --git a/po/hr.gmo b/po/hr.gmo
index cbf7db3..2d4b760 100644
--- a/po/hr.gmo
+++ b/po/hr.gmo
Binary files differ
diff --git a/po/hr.po b/po/hr.po
index 0a2f78d..e8c8287 100644
--- a/po/hr.po
+++ b/po/hr.po
@@ -7,10 +7,10 @@
# Božidar Putanec <bozidarp@yahoo.com>, 2018.
msgid ""
msgstr ""
-"Project-Id-Version: sed-4.4.104\n"
+"Project-Id-Version: sed-4.5.48\n"
"Report-Msgid-Bugs-To: bug-gnu-utils@gnu.org\n"
-"POT-Creation-Date: 2018-03-31 18:40-0700\n"
-"PO-Revision-Date: 2018-03-29 22:34-0700\n"
+"POT-Creation-Date: 2018-12-20 22:03-0800\n"
+"PO-Revision-Date: 2018-12-13 12:52-0800\n"
"Last-Translator: Božidar Putanec <bozidarp@yahoo.com>\n"
"Language-Team: Croatian <lokalizacija@linux.hr>\n"
"Language: hr\n"
@@ -20,7 +20,7 @@ msgstr ""
"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: Poedit 2.0.6\n"
+"X-Generator: Lokalize 2.0\n"
#: lib/closeout.c:122
msgid "write error"
@@ -31,39 +31,39 @@ msgstr "greška pisanja"
msgid "preserving permissions for %s"
msgstr "zadržavaju se prava pristupa za %s"
-#: lib/dfa.c:958
+#: lib/dfa.c:970
msgid "unbalanced ["
msgstr "nesparena ["
-#: lib/dfa.c:1079
+#: lib/dfa.c:1091
msgid "invalid character class"
msgstr "nevaljana znakovna klasa"
-#: lib/dfa.c:1205
+#: lib/dfa.c:1217
msgid "character class syntax is [[:space:]], not [:space:]"
-msgstr "sintaksa znakovne klase je [[:space]], ne [:space:]"
+msgstr "sintaksa znakovne klase je [[:space]], a ne [:space:]"
-#: lib/dfa.c:1272
+#: lib/dfa.c:1284
msgid "unfinished \\ escape"
msgstr "nedovršena \\ escape sekvencija"
-#: lib/dfa.c:1433
+#: lib/dfa.c:1445
msgid "invalid content of \\{\\}"
msgstr "nevaljani sadržaj od \\{\\}"
-#: lib/dfa.c:1436
+#: lib/dfa.c:1448
msgid "regular expression too big"
msgstr "regularni izraz je preveliki"
-#: lib/dfa.c:1850
+#: lib/dfa.c:1863
msgid "unbalanced ("
msgstr "nesparena ("
-#: lib/dfa.c:1968
+#: lib/dfa.c:1981
msgid "no syntax specified"
msgstr "sintaksa nije navedena"
-#: lib/dfa.c:1976
+#: lib/dfa.c:1992
msgid "unbalanced )"
msgstr "nesparena )"
@@ -201,13 +201,13 @@ msgstr "Preuranjeni kraj regularnog izraza"
#: lib/regcomp.c:180
msgid "Regular expression too big"
-msgstr "Regularni izraz je preveliki"
+msgstr "Regularni izraz je prevelik"
#: lib/regcomp.c:183
msgid "Unmatched ) or \\)"
msgstr "Nesparena ) ili \\)"
-#: lib/regcomp.c:689
+#: lib/regcomp.c:688
msgid "No previous regular expression"
msgstr "Nema prethodnog regularnog izraza"
@@ -216,12 +216,12 @@ msgstr "Nema prethodnog regularnog izraza"
msgid "setting permissions for %s"
msgstr "postavljanje prava pristupa za %s"
-#: lib/version-etc.c:74
+#: lib/version-etc.c:73
#, c-format
msgid "Packaged by %s (%s)\n"
msgstr "Pakirao %s (%s)\n"
-#: lib/version-etc.c:77
+#: lib/version-etc.c:76
#, c-format
msgid "Packaged by %s\n"
msgstr "Pakirao %s\n"
@@ -229,11 +229,11 @@ msgstr "Pakirao %s\n"
#. TRANSLATORS: Translate "(C)" to the copyright symbol
#. (C-in-a-circle), if this symbol is available in the user's
#. locale. Otherwise, do not translate "(C)"; leave it as-is.
-#: lib/version-etc.c:84
+#: lib/version-etc.c:83
msgid "(C)"
msgstr "©"
-#: lib/version-etc.c:86
+#: lib/version-etc.c:85
msgid ""
"\n"
"License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl."
@@ -401,7 +401,7 @@ msgstr "neočekivani „,“"
#: sed/compile.c:149
msgid "invalid usage of +N or ~N as first address"
-msgstr "nevaljano korištenje +N ili ~N kao prva adresa"
+msgstr "nevaljana uporaba +N ili ~N kao prve adrese"
#: sed/compile.c:150
msgid "unmatched `{'"
@@ -439,170 +439,183 @@ msgstr "nedostaje naredba"
msgid "command only uses one address"
msgstr "naredba koristi samo jednu adresu"
-#: sed/compile.c:164
+#: sed/compile.c:165
msgid "unterminated address regex"
msgstr "nezavršeni regularni izraz adrese"
-#: sed/compile.c:165
+#: sed/compile.c:166
msgid "unterminated `s' command"
msgstr "nezavršena naredba „s“"
-#: sed/compile.c:166
+#: sed/compile.c:167
msgid "unterminated `y' command"
msgstr "nezavršena naredba „y“"
-#: sed/compile.c:167
+#: sed/compile.c:168
msgid "unknown option to `s'"
msgstr "nepoznata opcija za „s“"
-#: sed/compile.c:169
+#: sed/compile.c:170
msgid "multiple `p' options to `s' command"
msgstr "višestruke opcije „p“ za naredbu „s“"
-#: sed/compile.c:171
+#: sed/compile.c:172
msgid "multiple `g' options to `s' command"
msgstr "višestruke opcije „g“ za naredbu „s“"
-#: sed/compile.c:173
+#: sed/compile.c:174
msgid "multiple number options to `s' command"
-msgstr "višestruke brojčane opcije za naredbu „s“"
+msgstr "višestruke numeričke opcije za naredbu „s“"
-#: sed/compile.c:175
+#: sed/compile.c:176
msgid "number option to `s' command may not be zero"
-msgstr "brojčana opcija za naredbu „s“ ne smije biti nula"
+msgstr "numerička opcija za naredbu „s“ ne smije biti nula"
-#: sed/compile.c:177
+#: sed/compile.c:178
msgid "strings for `y' command are different lengths"
msgstr "stringovi za naredbu „y“ su različitih duljina"
-#: sed/compile.c:179
+#: sed/compile.c:180
msgid "delimiter character is not a single-byte character"
msgstr "znak razdvajanja nije jednobajtni znak"
-#: sed/compile.c:181
+#: sed/compile.c:182
msgid "expected newer version of sed"
-msgstr "očekivala se novija inačica programa sed"
+msgstr "očekivala se novija inačica sed programa"
-#: sed/compile.c:183
+#: sed/compile.c:184
msgid "invalid usage of line address 0"
msgstr "nevaljano korištenje adrese retka 0"
-#: sed/compile.c:184
+#: sed/compile.c:185
#, c-format
msgid "unknown command: `%c'"
msgstr "nepoznata naredba: „%c“"
-#: sed/compile.c:186
+#: sed/compile.c:187
msgid "incomplete command"
msgstr "nepotpuna naredba"
-#: sed/compile.c:188
+#: sed/compile.c:189
msgid "\":\" lacks a label"
msgstr "\":\" nema etikete"
-#: sed/compile.c:190
+#: sed/compile.c:191
msgid "recursive escaping after \\c not allowed"
msgstr "rekurzivno maskiranje (escaping) nakon \\c nije dopušteno"
-#: sed/compile.c:213
+#: sed/compile.c:193
+msgid "e/r/w commands disabled in sandbox mode"
+msgstr ""
+"e/r/w naredbe su onemogućene u „sandbox“ modu (u izoliranom načinu rada)"
+
+#: sed/compile.c:215
#, c-format
msgid "%s: file %s line %lu: %s\n"
msgstr "%s: datoteka %s redak %lu: %s\n"
-#: sed/compile.c:216
+#: sed/compile.c:218
#, c-format
msgid "%s: -e expression #%lu, char %lu: %s\n"
msgstr "%s: -e izraz #%lu, znak %lu: %s\n"
-#: sed/compile.c:1644
+#: sed/compile.c:1607
#, c-format
msgid "can't find label for jump to `%s'"
msgstr "nije moguće naći etiketu za skok na „%s“"
-#: sed/execute.c:254 sed/execute.c:271
+#: sed/execute.c:253 sed/execute.c:270
#, c-format
msgid "case conversion produced an invalid character"
msgstr "pretvaranje veličine slova proizvelo je nevaljani znak"
-#: sed/execute.c:565
+#: sed/execute.c:561
#, c-format
msgid "%s: can't read %s: %s\n"
-msgstr "%s: ne može se čitati %s: %s\n"
+msgstr "%s: ne može se pročitati %s: %s\n"
-#: sed/execute.c:590
+#: sed/execute.c:587
#, c-format
msgid "couldn't edit %s: is a terminal"
msgstr "nije bilo moguće urediti %s: to je terminal"
-#: sed/execute.c:595
+#: sed/execute.c:592
#, c-format
msgid "couldn't edit %s: not a regular file"
msgstr "ne može se uređivati %s: to nije obična datoteka"
-#: sed/execute.c:606
+#: sed/execute.c:603
#, c-format
msgid "%s: warning: failed to set default file creation context to %s: %s"
msgstr ""
"%s: upozorenje: nije uspjelo postaviti zadani kontekst za stvaranje datoteke "
"na %s: %s"
-#: sed/execute.c:614
+#: sed/execute.c:611
#, c-format
msgid "%s: warning: failed to get security context of %s: %s"
msgstr "%s: upozorenje: nije uspjelo dobiti sigurnosni kontekst %s: %s"
-#: sed/execute.c:633 sed/utils.c:178
+#: sed/execute.c:630 sed/utils.c:188
#, c-format
msgid "couldn't open temporary file %s: %s"
msgstr "nije bilo moguće otvoriti privremenu datoteku %s: %s"
-#: sed/execute.c:1148 sed/execute.c:1358
+#: sed/execute.c:1167 sed/execute.c:1366
msgid "error in subprocess"
msgstr "greška u potprocesu"
-#: sed/execute.c:1150
+#: sed/execute.c:1169
msgid "option `e' not supported"
msgstr "opcija „e“ nije podržana"
-#: sed/execute.c:1339
+#: sed/execute.c:1347
msgid "`e' command not supported"
msgstr "naredba „e“ nije podržana"
-#: sed/execute.c:1665
+#: sed/execute.c:1662
msgid "no input files"
msgstr "nema ulaznih datoteka"
-#: sed/regexp.c:39
+#: sed/regexp.c:40
msgid "no previous regular expression"
msgstr "nema prethodnoga regularnog izraza"
-#: sed/regexp.c:141
+#: sed/regexp.c:125
#, c-format
msgid "invalid reference \\%d on `s' command's RHS"
msgstr "nevaljana referencija \\%d na desnoj strani naredbe „s“"
-#: sed/regexp.c:259
+#: sed/regexp.c:196
msgid "regex input buffer length larger than INT_MAX"
msgstr ""
"duljina ulaznog međuspremnika regularnog izraza (regex) je veća od INT_MAX"
-#: sed/sed.c:35
+#: sed/sed.c:36
msgid "Jay Fenlason"
msgstr "Jay Fenlason"
-#: sed/sed.c:36
+#: sed/sed.c:37
msgid "Tom Lord"
msgstr "Tom Lord"
-#: sed/sed.c:37
+#: sed/sed.c:38
msgid "Ken Pizzini"
msgstr "Ken Pizzini"
-#: sed/sed.c:38
+#: sed/sed.c:39
msgid "Paolo Bonzini"
msgstr "Paolo Bonzini"
-#: sed/sed.c:113
+#: sed/sed.c:40
+msgid "Jim Meyering"
+msgstr "Jim Meyering"
+
+#: sed/sed.c:41
+msgid "Assaf Gordon"
+msgstr "Assaf Gordon"
+
+#: sed/sed.c:124
#, c-format
msgid ""
"GNU sed home page: <https://www.gnu.org/software/sed/>.\n"
@@ -611,20 +624,12 @@ msgstr ""
"Web stranica GNU sed: <http://www.gnu.org/software/sed/>.\n"
"Općenita pomoć za korištenje GNU softvera: <http://www.gnu.org/gethelp/>.\n"
-#: sed/sed.c:120
+#: sed/sed.c:130
#, c-format
msgid "E-mail bug reports to: <%s>.\n"
msgstr "Pogreške u ovom programu javite na: <%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"
-" koristi Perl 5 sintaksu za regularne izraze u skripti\n"
-
-#: sed/sed.c:134
+#: sed/sed.c:138
#, c-format
msgid ""
"Usage: %s [OPTION]... {script-only-if-no-other-script} [input-file]...\n"
@@ -633,16 +638,25 @@ msgstr ""
"Uporaba: %s [OPCIJA]... {SKRIPTA-samo-kad-je-jedina} [ulazna-datoteka]...\n"
"\n"
-#: sed/sed.c:138
+#: sed/sed.c:142
#, c-format
msgid ""
" -n, --quiet, --silent\n"
" suppress automatic printing of pattern space\n"
msgstr ""
" -n, --quiet, --silent\n"
-" izostavi automatsko ispisivanje prostora uzorka\n"
+" izostavi automatsko ispisivanje prostora uzoraka\n"
-#: sed/sed.c:140
+#: sed/sed.c:144
+#, c-format
+msgid ""
+" --debug\n"
+" annotate program execution\n"
+msgstr ""
+" --debug\n"
+" komentira izrvršavanje programa\n"
+
+#: sed/sed.c:146
#, c-format
msgid ""
" -e script, --expression=script\n"
@@ -651,7 +665,7 @@ msgstr ""
" -e script, --expression=SKRIPT\n"
" doda SKRIPTU naredbama koje će se izvršiti\n"
-#: sed/sed.c:142
+#: sed/sed.c:148
#, c-format
msgid ""
" -f script-file, --file=script-file\n"
@@ -661,7 +675,7 @@ msgstr ""
" -f datoteka-skripte, --file=SKRIPT-DATOTEKA\n"
" doda sadržaj SKRIPT-DATOTEKE naredbama koje će se izvršiti\n"
-#: sed/sed.c:146
+#: sed/sed.c:152
#, c-format
msgid ""
" --follow-symlinks\n"
@@ -670,7 +684,7 @@ msgstr ""
" --follow-symlinks\n"
" slijedi simboličke veze (kad radi na-mjestu (in-place))\n"
-#: sed/sed.c:149
+#: sed/sed.c:155
#, c-format
msgid ""
" -i[SUFFIX], --in-place[=SUFFIX]\n"
@@ -680,7 +694,7 @@ msgstr ""
" izravno, na-mjestu, mijenja ulaznu datoteku\n"
" (napravi osiguranje ako je navedeni SUFIKS)\n"
-#: sed/sed.c:153
+#: sed/sed.c:158
#, c-format
msgid ""
" -b, --binary\n"
@@ -691,16 +705,16 @@ msgstr ""
" otvori datoteke i obradi ih kao da su binarne\n"
" (CR+LF ne obrađuju se specijalno)\n"
-#: sed/sed.c:157
+#: sed/sed.c:162
#, 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=BROJ\n"
-" na toj duljini prelamaju se redci za „l“ naredbu\n"
+" na poziciji BROJ prelamaju se redci za „l“ naredbu\n"
-#: sed/sed.c:159
+#: sed/sed.c:164
#, c-format
msgid ""
" --posix\n"
@@ -709,7 +723,7 @@ msgstr ""
" --posix\n"
" onemogućuje sva GNU proširenja\n"
-#: sed/sed.c:161
+#: sed/sed.c:166
#, c-format
msgid ""
" -E, -r, --regexp-extended\n"
@@ -720,7 +734,7 @@ msgstr ""
" koristi proširene regularne izraze u skripti\n"
" (za prenosivost rabite POSIX opciju -E)\n"
-#: sed/sed.c:167
+#: sed/sed.c:169
#, c-format
msgid ""
" -s, --separate\n"
@@ -730,16 +744,17 @@ msgstr ""
" -s, --separate\n"
" smatra datoteke kao zasebne a ne kao jedan dugački stream\n"
-#: sed/sed.c:170
+#: sed/sed.c:172
#, c-format
msgid ""
" --sandbox\n"
" operate in sandbox mode (disable e/r/w commands).\n"
msgstr ""
" --sandbox\n"
-" radi u sandbox načinu (onemogući e/r/w naredbe)\n"
+" radi u sandbox (izoliranom) načinu (onemogući e/r/w "
+"naredbe)\n"
-#: sed/sed.c:172
+#: sed/sed.c:174
#, c-format
msgid ""
" -u, --unbuffered\n"
@@ -751,7 +766,7 @@ msgstr ""
" učitava minimalne količine podataka iz ulaznih datoteka\n"
" i češće prazni izlazne međuspremnike\n"
-#: sed/sed.c:175
+#: sed/sed.c:177
#, c-format
msgid ""
" -z, --null-data\n"
@@ -760,17 +775,17 @@ msgstr ""
" -z, --null-data\n"
" retke odvaja s NUL znakom\n"
-#: sed/sed.c:177
+#: sed/sed.c:179
#, c-format
msgid " --help display this help and exit\n"
msgstr " --help pokaže ovu pomoć i završi\n"
-#: sed/sed.c:178
+#: sed/sed.c:180
#, c-format
msgid " --version output version information and exit\n"
msgstr " --version pokaže informacije o inačici ovog programa i završi\n"
-#: sed/sed.c:179
+#: sed/sed.c:181
#, c-format
msgid ""
"\n"
@@ -789,49 +804,69 @@ msgstr ""
"datoteka, čita se standardni ulaz.\n"
"\n"
-#: sed/utils.c:73 sed/utils.c:384
+#: sed/sed.c:373
+msgid "failed to set binary mode on STDIN"
+msgstr "nije uspjelo postaviti STDIN u binarni način rada"
+
+#: sed/sed.c:375
+msgid "failed to set binary mode on STDOUT"
+msgstr "nije uspjelo postaviti STDOUT u binarni način rada"
+
+#: sed/utils.c:77 sed/utils.c:395
#, c-format
msgid "cannot remove %s: %s"
msgstr "nije moguće ukloniti %s: %s"
-#: sed/utils.c:136
+#: sed/utils.c:146
#, c-format
msgid "couldn't open file %s: %s"
msgstr "nije bilo moguće otvoriti datoteku %s: %s"
-#: sed/utils.c:155
+#: sed/utils.c:165
#, c-format
msgid "couldn't attach to %s: %s"
msgstr "nije bilo moguće pridružiti na %s: %s"
#: sed/utils.c:192
#, c-format
+msgid "failed to set binary mode on '%s'"
+msgstr "nije uspjelo postaviti binarni način rada na „%s“"
+
+#: sed/utils.c:207
+#, c-format
msgid "couldn't write %llu item to %s: %s"
msgid_plural "couldn't write %llu items to %s: %s"
msgstr[0] "ne može zapisati %llu stavku na %s: %s"
msgstr[1] "ne može zapisati %llu stavke na %s: %s"
msgstr[2] "ne može zapisati %llu stavki na %s: %s"
-#: sed/utils.c:204 sed/utils.c:223
+#: sed/utils.c:219 sed/utils.c:238
#, c-format
msgid "read error on %s: %s"
msgstr "greška čitanja na %s: %s"
-#: sed/utils.c:325
+#: sed/utils.c:336
#, c-format
msgid "couldn't follow symlink %s: %s"
msgstr "nije bilo moguće slijediti simboličku vezu %s: %s"
-#: sed/utils.c:359
+#: sed/utils.c:370
#, c-format
msgid "cannot stat %s: %s"
msgstr "ne može se dobiti status od %s: %s"
-#: sed/utils.c:389
+#: sed/utils.c:400
#, c-format
msgid "cannot rename %s: %s"
msgstr "ne može se preimenovati %s: %s"
+#~ msgid ""
+#~ " -R, --regexp-perl\n"
+#~ " use Perl 5's regular expressions syntax in the script.\n"
+#~ msgstr ""
+#~ " -R, --regexp-perl\n"
+#~ " koristi Perl 5 sintaksu za regularne izraze u skripti\n"
+
#~ msgid "cannot specify modifiers on empty regexp"
#~ msgstr "ne možete navesti modifikatore praznog regularnog izraza"
diff --git a/po/hu.gmo b/po/hu.gmo
index 11e886e..e2ed711 100644
--- a/po/hu.gmo
+++ b/po/hu.gmo
Binary files differ
diff --git a/po/hu.po b/po/hu.po
index 439f34a..a02b1c1 100644
--- a/po/hu.po
+++ b/po/hu.po
@@ -10,7 +10,7 @@ msgid ""
msgstr ""
"Project-Id-Version: sed 4.2.2.177\n"
"Report-Msgid-Bugs-To: bug-gnu-utils@gnu.org\n"
-"POT-Creation-Date: 2018-03-31 18:40-0700\n"
+"POT-Creation-Date: 2018-12-20 22:03-0800\n"
"PO-Revision-Date: 2018-03-20 22:12+0100\n"
"Last-Translator: Gabor Kelemen <kelemeng@gnome.hu>\n"
"Language-Team: Hungarian <translation-team-hu@lists.sourceforge.net>\n"
@@ -31,39 +31,39 @@ msgstr "íráshiba"
msgid "preserving permissions for %s"
msgstr "%s jogosultságainak megtartása"
-#: lib/dfa.c:958
+#: lib/dfa.c:970
msgid "unbalanced ["
msgstr "kiegyensúlyozatlan ["
-#: lib/dfa.c:1079
+#: lib/dfa.c:1091
msgid "invalid character class"
msgstr "érvénytelen karakterosztály"
-#: lib/dfa.c:1205
+#: lib/dfa.c:1217
msgid "character class syntax is [[:space:]], not [:space:]"
msgstr "a karakterosztály szintaxisa [[:space:]], nem [:space:]"
-#: lib/dfa.c:1272
+#: lib/dfa.c:1284
msgid "unfinished \\ escape"
msgstr "befejezetlen \\ escape"
-#: lib/dfa.c:1433
+#: lib/dfa.c:1445
msgid "invalid content of \\{\\}"
msgstr "a \\{\\} tartalma érvénytelen"
-#: lib/dfa.c:1436
+#: lib/dfa.c:1448
msgid "regular expression too big"
msgstr "a szabályos kifejezés túl nagy"
-#: lib/dfa.c:1850
+#: lib/dfa.c:1863
msgid "unbalanced ("
msgstr "kiegyensúlyozatlan ("
-#: lib/dfa.c:1968
+#: lib/dfa.c:1981
msgid "no syntax specified"
msgstr "nincs szintaxis megadva"
-#: lib/dfa.c:1976
+#: lib/dfa.c:1992
msgid "unbalanced )"
msgstr "kiegyensúlyozatlan )"
@@ -207,7 +207,7 @@ msgstr "Túl nagy reguláris kifejezés"
msgid "Unmatched ) or \\)"
msgstr "Nincs párban ) vagy \\)"
-#: lib/regcomp.c:689
+#: lib/regcomp.c:688
msgid "No previous regular expression"
msgstr "Nincsen előző reguláris kifejezés"
@@ -216,12 +216,12 @@ msgstr "Nincsen előző reguláris kifejezés"
msgid "setting permissions for %s"
msgstr "%s jogosultságainak beállítása"
-#: lib/version-etc.c:74
+#: lib/version-etc.c:73
#, c-format
msgid "Packaged by %s (%s)\n"
msgstr "Csomagolta: %s (%s)\n"
-#: lib/version-etc.c:77
+#: lib/version-etc.c:76
#, c-format
msgid "Packaged by %s\n"
msgstr "Csomagolta: %s\n"
@@ -229,11 +229,11 @@ msgstr "Csomagolta: %s\n"
#. TRANSLATORS: Translate "(C)" to the copyright symbol
#. (C-in-a-circle), if this symbol is available in the user's
#. locale. Otherwise, do not translate "(C)"; leave it as-is.
-#: lib/version-etc.c:84
+#: lib/version-etc.c:83
msgid "(C)"
msgstr "©"
-#: lib/version-etc.c:86
+#: lib/version-etc.c:85
#, fuzzy
msgid ""
"\n"
@@ -441,169 +441,181 @@ msgstr "hiányzó parancs"
msgid "command only uses one address"
msgstr "a parancs csak egy címzést használ"
-#: sed/compile.c:164
+#: sed/compile.c:165
msgid "unterminated address regex"
msgstr "befejezetlen regex cím"
-#: sed/compile.c:165
+#: sed/compile.c:166
msgid "unterminated `s' command"
msgstr "befejezetlen „s” parancs"
-#: sed/compile.c:166
+#: sed/compile.c:167
msgid "unterminated `y' command"
msgstr "befejezetlen „y” parancs"
-#: sed/compile.c:167
+#: sed/compile.c:168
msgid "unknown option to `s'"
msgstr "ismeretlen „s” kapcsoló"
-#: sed/compile.c:169
+#: sed/compile.c:170
msgid "multiple `p' options to `s' command"
msgstr "többszörös „p” kapcsoló az „s” parancshoz"
-#: sed/compile.c:171
+#: sed/compile.c:172
msgid "multiple `g' options to `s' command"
msgstr "többszörös „g” kapcsoló az „s” parancshoz"
-#: sed/compile.c:173
+#: sed/compile.c:174
msgid "multiple number options to `s' command"
msgstr "többszörös szám kapcsoló az „s” parancshoz"
-#: sed/compile.c:175
+#: sed/compile.c:176
msgid "number option to `s' command may not be zero"
msgstr "az „s” parancs szám kapcsolója nem lehet nulla"
-#: sed/compile.c:177
+#: sed/compile.c:178
msgid "strings for `y' command are different lengths"
msgstr "az „y” parancs szövegeinek hossza különböző"
-#: sed/compile.c:179
+#: sed/compile.c:180
msgid "delimiter character is not a single-byte character"
msgstr "az elválasztó karakter nem egy bájtból áll"
-#: sed/compile.c:181
+#: sed/compile.c:182
msgid "expected newer version of sed"
msgstr "a sed újabb verziójára van szükség"
-#: sed/compile.c:183
+#: sed/compile.c:184
msgid "invalid usage of line address 0"
msgstr "a 0 sor címzés használata érvénytelen"
-#: sed/compile.c:184
+#: sed/compile.c:185
#, c-format
msgid "unknown command: `%c'"
msgstr "ismeretlen parancs: „%c”"
-#: sed/compile.c:186
+#: sed/compile.c:187
msgid "incomplete command"
msgstr "hiányos parancs"
-#: sed/compile.c:188
+#: sed/compile.c:189
msgid "\":\" lacks a label"
msgstr "„:” után hiányzik a címke"
-#: sed/compile.c:190
+#: sed/compile.c:191
msgid "recursive escaping after \\c not allowed"
msgstr "rekurzív escapelés a \\c után nem engedélyezett"
-#: sed/compile.c:213
+#: sed/compile.c:193
+msgid "e/r/w commands disabled in sandbox mode"
+msgstr ""
+
+#: sed/compile.c:215
#, c-format
msgid "%s: file %s line %lu: %s\n"
msgstr "%s: %s fájl %lu sor: %s\n"
-#: sed/compile.c:216
+#: sed/compile.c:218
#, c-format
msgid "%s: -e expression #%lu, char %lu: %s\n"
msgstr "%s: -e kifejezés #%lu, karakter %lu: %s\n"
-#: sed/compile.c:1644
+#: sed/compile.c:1607
#, c-format
msgid "can't find label for jump to `%s'"
msgstr "az ugráshoz („%s”) nem található címke"
-#: sed/execute.c:254 sed/execute.c:271
+#: sed/execute.c:253 sed/execute.c:270
#, c-format
msgid "case conversion produced an invalid character"
msgstr "a kis- és nagybetűk átalakítása érvénytelen karaktert eredményezett"
-#: sed/execute.c:565
+#: sed/execute.c:561
#, c-format
msgid "%s: can't read %s: %s\n"
msgstr "%s: %s nem olvasható: %s\n"
-#: sed/execute.c:590
+#: sed/execute.c:587
#, c-format
msgid "couldn't edit %s: is a terminal"
msgstr "nem lehet szerkeszteni (%s): terminál"
-#: sed/execute.c:595
+#: sed/execute.c:592
#, c-format
msgid "couldn't edit %s: not a regular file"
msgstr "nem lehet szerkeszteni (%s): nem szabályos fájl"
-#: sed/execute.c:606
+#: sed/execute.c:603
#, 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:614
+#: sed/execute.c:611
#, c-format
msgid "%s: warning: failed to get security context of %s: %s"
msgstr "%s: figyelem: nem sikerült lekérni a(z) %s biztonsági környezetét: %s"
-#: sed/execute.c:633 sed/utils.c:178
+#: sed/execute.c:630 sed/utils.c:188
#, c-format
msgid "couldn't open temporary file %s: %s"
msgstr "nem lehet megnyitni a(z) %s átmeneti fájlt: %s"
-#: sed/execute.c:1148 sed/execute.c:1358
+#: sed/execute.c:1167 sed/execute.c:1366
msgid "error in subprocess"
msgstr "hiba az alfolyamatban"
-#: sed/execute.c:1150
+#: sed/execute.c:1169
msgid "option `e' not supported"
msgstr "az „e” kapcsoló nem támogatott"
-#: sed/execute.c:1339
+#: sed/execute.c:1347
msgid "`e' command not supported"
msgstr "az „e” parancs nem támogatott"
-#: sed/execute.c:1665
+#: sed/execute.c:1662
msgid "no input files"
msgstr "nincsenek bemeneti fájlok"
-#: sed/regexp.c:39
+#: sed/regexp.c:40
msgid "no previous regular expression"
msgstr "nincs előző reguláris kifejezés"
-#: sed/regexp.c:141
+#: sed/regexp.c:125
#, c-format
msgid "invalid reference \\%d on `s' command's RHS"
msgstr "érvénytelen hivatkozás (\\%d) az „s” parancs RHS-ére"
-#: sed/regexp.c:259
+#: sed/regexp.c:196
msgid "regex input buffer length larger than INT_MAX"
msgstr ""
-#: sed/sed.c:35
+#: sed/sed.c:36
msgid "Jay Fenlason"
msgstr "Jay Fenlason"
-#: sed/sed.c:36
+#: sed/sed.c:37
msgid "Tom Lord"
msgstr "Tom Lord"
-#: sed/sed.c:37
+#: sed/sed.c:38
msgid "Ken Pizzini"
msgstr "Ken Pizzini"
-#: sed/sed.c:38
+#: sed/sed.c:39
msgid "Paolo Bonzini"
msgstr "Paolo Bonzini"
-#: sed/sed.c:113
+#: sed/sed.c:40
+msgid "Jim Meyering"
+msgstr ""
+
+#: sed/sed.c:41
+msgid "Assaf Gordon"
+msgstr ""
+
+#: sed/sed.c:124
#, fuzzy, c-format
msgid ""
"GNU sed home page: <https://www.gnu.org/software/sed/>.\n"
@@ -613,21 +625,12 @@ msgstr ""
"Általános segítség a GNU szoftverek használatához: <http://www.gnu.org/"
"gethelp/>.\n"
-#: sed/sed.c:120
+#: sed/sed.c:130
#, c-format
msgid "E-mail bug reports to: <%s>.\n"
msgstr "Hibajelentést a következő címre küldhet: <%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 reguláris kifejezés nyelvtanának használata a\n"
-" parancsfájlban.\n"
-
-#: sed/sed.c:134
+#: sed/sed.c:138
#, c-format
msgid ""
"Usage: %s [OPTION]... {script-only-if-no-other-script} [input-file]...\n"
@@ -637,7 +640,7 @@ msgstr ""
"[bemeneti fájl]…\n"
"\n"
-#: sed/sed.c:138
+#: sed/sed.c:142
#, c-format
msgid ""
" -n, --quiet, --silent\n"
@@ -646,7 +649,16 @@ msgstr ""
" -n, --quiet, --silent\n"
" a minta tér automatikus kiírásának elnyomása\n"
-#: sed/sed.c:140
+#: sed/sed.c:144
+#, fuzzy, c-format
+msgid ""
+" --debug\n"
+" annotate program execution\n"
+msgstr ""
+" --posix\n"
+" minden GNU kiterjesztés letiltása.\n"
+
+#: sed/sed.c:146
#, c-format
msgid ""
" -e script, --expression=script\n"
@@ -655,7 +667,7 @@ msgstr ""
" -e parancsfájl, --expression=parancsfájl\n"
" parancsfájl hozzáadása a végrehajtandó parancsokhoz\n"
-#: sed/sed.c:142
+#: sed/sed.c:148
#, c-format
msgid ""
" -f script-file, --file=script-file\n"
@@ -667,7 +679,7 @@ msgstr ""
"végrehajtandó\n"
" parancsokhoz\n"
-#: sed/sed.c:146
+#: sed/sed.c:152
#, c-format
msgid ""
" --follow-symlinks\n"
@@ -676,7 +688,7 @@ msgstr ""
" --follow-symlinks\n"
" szimbolikus linkek követése helyben feldolgozáskor\n"
-#: sed/sed.c:149
+#: sed/sed.c:155
#, c-format
msgid ""
" -i[SUFFIX], --in-place[=SUFFIX]\n"
@@ -686,7 +698,7 @@ msgstr ""
" fájlok szerkesztése helyben (biztonsági mentést készít, ha\n"
" az UTÓTAG meg van adva)\n"
-#: sed/sed.c:153
+#: sed/sed.c:158
#, c-format
msgid ""
" -b, --binary\n"
@@ -697,7 +709,7 @@ msgstr ""
" fájlok megnyitása bináris módban (a CR+LF karakterek nem\n"
" lesznek speciálisan feldolgozva)\n"
-#: sed/sed.c:157
+#: sed/sed.c:162
#, c-format
msgid ""
" -l N, --line-length=N\n"
@@ -706,7 +718,7 @@ msgstr ""
" -l N, --line-length=N\n"
" a kívánt sortörési hossz megadása az „l” parancshoz\n"
-#: sed/sed.c:159
+#: sed/sed.c:164
#, c-format
msgid ""
" --posix\n"
@@ -715,7 +727,7 @@ msgstr ""
" --posix\n"
" minden GNU kiterjesztés letiltása.\n"
-#: sed/sed.c:161
+#: sed/sed.c:166
#, c-format
msgid ""
" -E, -r, --regexp-extended\n"
@@ -727,7 +739,7 @@ msgstr ""
" parancsfájlban (a hordozhatóságért használja a -E "
"kapcsolót)\n"
-#: sed/sed.c:167
+#: sed/sed.c:169
#, c-format
msgid ""
" -s, --separate\n"
@@ -738,7 +750,7 @@ msgstr ""
" a fájlokat külön kezeli egyetlen folyamatos, hosszú folyam\n"
" helyett.\n"
-#: sed/sed.c:170
+#: sed/sed.c:172
#, fuzzy, c-format
msgid ""
" --sandbox\n"
@@ -747,7 +759,7 @@ msgstr ""
" --sandbox\n"
" működés homokozó módban.\n"
-#: sed/sed.c:172
+#: sed/sed.c:174
#, c-format
msgid ""
" -u, --unbuffered\n"
@@ -760,7 +772,7 @@ msgstr ""
"a\n"
" kimeneti pufferek gyakori ürítése\n"
-#: sed/sed.c:175
+#: sed/sed.c:177
#, c-format
msgid ""
" -z, --null-data\n"
@@ -769,17 +781,17 @@ msgstr ""
" -z, --null-data\n"
" sorok elválasztása NULL karakterekkel\n"
-#: sed/sed.c:177
+#: sed/sed.c:179
#, c-format
msgid " --help display this help and exit\n"
msgstr " --help kiírja ezt a súgót és kilép\n"
-#: sed/sed.c:178
+#: sed/sed.c:180
#, c-format
msgid " --version output version information and exit\n"
msgstr " --version kiírja a verzióinformációt és kilép\n"
-#: sed/sed.c:179
+#: sed/sed.c:181
#, c-format
msgid ""
"\n"
@@ -796,47 +808,68 @@ msgstr ""
"bemenetről olvas.\n"
"\n"
-#: sed/utils.c:73 sed/utils.c:384
+#: sed/sed.c:373
+msgid "failed to set binary mode on STDIN"
+msgstr ""
+
+#: sed/sed.c:375
+msgid "failed to set binary mode on STDOUT"
+msgstr ""
+
+#: sed/utils.c:77 sed/utils.c:395
#, c-format
msgid "cannot remove %s: %s"
msgstr "%s nem távolítható el: %s"
-#: sed/utils.c:136
+#: sed/utils.c:146
#, c-format
msgid "couldn't open file %s: %s"
msgstr "nem nyitható meg a(z) %s fájl: %s"
-#: sed/utils.c:155
+#: sed/utils.c:165
#, c-format
msgid "couldn't attach to %s: %s"
msgstr "nem lehet csatolni ehhez: %s: %s"
#: sed/utils.c:192
#, c-format
+msgid "failed to set binary mode on '%s'"
+msgstr ""
+
+#: sed/utils.c:207
+#, 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 %llu elemet írni ebbe: %s: %s"
-#: sed/utils.c:204 sed/utils.c:223
+#: sed/utils.c:219 sed/utils.c:238
#, c-format
msgid "read error on %s: %s"
msgstr "olvasási hiba ezen: %s: %s"
-#: sed/utils.c:325
+#: sed/utils.c:336
#, c-format
msgid "couldn't follow symlink %s: %s"
msgstr "nem lehet követni a(z) %s szimbolikus linket: %s"
-#: sed/utils.c:359
+#: sed/utils.c:370
#, c-format
msgid "cannot stat %s: %s"
msgstr "nem lehet stat-olni: %s: %s"
-#: sed/utils.c:389
+#: sed/utils.c:400
#, c-format
msgid "cannot rename %s: %s"
msgstr "nem lehet átnevezni: %s: %s"
+#~ msgid ""
+#~ " -R, --regexp-perl\n"
+#~ " use Perl 5's regular expressions syntax in the script.\n"
+#~ msgstr ""
+#~ " -R --regexp-perl\n"
+#~ " Perl 5 reguláris kifejezés nyelvtanának használata a\n"
+#~ " parancsfájlban.\n"
+
#~ msgid "%s: option '--%s' doesn't allow an argument\n"
#~ msgstr "%s: a(z) „--%s” kapcsoló nem enged meg argumentumot\n"
diff --git a/po/id.gmo b/po/id.gmo
index 37c7096..5f4a256 100644
--- a/po/id.gmo
+++ b/po/id.gmo
Binary files differ
diff --git a/po/id.po b/po/id.po
index 5e42431..f4bedc1 100644
--- a/po/id.po
+++ b/po/id.po
@@ -9,7 +9,7 @@ msgid ""
msgstr ""
"Project-Id-Version: sed 4.2.1\n"
"Report-Msgid-Bugs-To: bug-gnu-utils@gnu.org\n"
-"POT-Creation-Date: 2018-03-31 18:40-0700\n"
+"POT-Creation-Date: 2018-12-20 22:03-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"
@@ -29,42 +29,42 @@ msgstr ""
msgid "preserving permissions for %s"
msgstr ""
-#: lib/dfa.c:958
+#: lib/dfa.c:970
msgid "unbalanced ["
msgstr ""
-#: lib/dfa.c:1079
+#: lib/dfa.c:1091
#, fuzzy
msgid "invalid character class"
msgstr "Nama kelas karakter tidak valid"
-#: lib/dfa.c:1205
+#: lib/dfa.c:1217
msgid "character class syntax is [[:space:]], not [:space:]"
msgstr ""
-#: lib/dfa.c:1272
+#: lib/dfa.c:1284
msgid "unfinished \\ escape"
msgstr ""
-#: lib/dfa.c:1433
+#: lib/dfa.c:1445
#, fuzzy
msgid "invalid content of \\{\\}"
msgstr "Isi \\{\\} tidak valid"
-#: lib/dfa.c:1436
+#: lib/dfa.c:1448
#, fuzzy
msgid "regular expression too big"
msgstr "Reguler ekspresi terlalu besar"
-#: lib/dfa.c:1850
+#: lib/dfa.c:1863
msgid "unbalanced ("
msgstr ""
-#: lib/dfa.c:1968
+#: lib/dfa.c:1981
msgid "no syntax specified"
msgstr ""
-#: lib/dfa.c:1976
+#: lib/dfa.c:1992
msgid "unbalanced )"
msgstr ""
@@ -210,7 +210,7 @@ msgstr "Reguler ekspresi terlalu besar"
msgid "Unmatched ) or \\)"
msgstr ") atau \\) tidak sesuai"
-#: lib/regcomp.c:689
+#: lib/regcomp.c:688
msgid "No previous regular expression"
msgstr "Tidak ada reguler ekspresi sebelumnya"
@@ -219,12 +219,12 @@ msgstr "Tidak ada reguler ekspresi sebelumnya"
msgid "setting permissions for %s"
msgstr ""
-#: lib/version-etc.c:74
+#: lib/version-etc.c:73
#, c-format
msgid "Packaged by %s (%s)\n"
msgstr ""
-#: lib/version-etc.c:77
+#: lib/version-etc.c:76
#, c-format
msgid "Packaged by %s\n"
msgstr ""
@@ -232,11 +232,11 @@ 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
+#: lib/version-etc.c:83
msgid "(C)"
msgstr ""
-#: lib/version-etc.c:86
+#: lib/version-etc.c:85
msgid ""
"\n"
"License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl."
@@ -418,168 +418,180 @@ msgstr "perintah hilang"
msgid "command only uses one address"
msgstr "perintah hanya menggunakan satu alamat"
-#: sed/compile.c:164
+#: sed/compile.c:165
msgid "unterminated address regex"
msgstr "alamat regex yang tidak selesai"
-#: sed/compile.c:165
+#: sed/compile.c:166
msgid "unterminated `s' command"
msgstr "perintah `s' tidak selesai"
-#: sed/compile.c:166
+#: sed/compile.c:167
msgid "unterminated `y' command"
msgstr "perintah `y' tidak selesai"
-#: sed/compile.c:167
+#: sed/compile.c:168
msgid "unknown option to `s'"
msgstr "opsi `s' tidak diketahui"
-#: sed/compile.c:169
+#: sed/compile.c:170
msgid "multiple `p' options to `s' command"
msgstr "multiple opsi `p' untuk perintah `s'"
-#: sed/compile.c:171
+#: sed/compile.c:172
msgid "multiple `g' options to `s' command"
msgstr "multiple opsi `g' untuk perintah `s'"
-#: sed/compile.c:173
+#: sed/compile.c:174
msgid "multiple number options to `s' command"
msgstr "multiple jumlah opsi untuk perintah `s'"
-#: sed/compile.c:175
+#: sed/compile.c:176
msgid "number option to `s' command may not be zero"
msgstr "jumlah opsi untuk perintah `s' tidak boleh nol"
-#: sed/compile.c:177
+#: sed/compile.c:178
msgid "strings for `y' command are different lengths"
msgstr "string untuk perintah `y' memiliki panjang berbeda"
-#: sed/compile.c:179
+#: sed/compile.c:180
msgid "delimiter character is not a single-byte character"
msgstr "karakter pembatas bukan sebuah karakter byte-tunggal"
-#: sed/compile.c:181
+#: sed/compile.c:182
msgid "expected newer version of sed"
msgstr "diduga versi baru sed"
-#: sed/compile.c:183
+#: sed/compile.c:184
msgid "invalid usage of line address 0"
msgstr "penggunaan tidak dari baris alamat 0"
-#: sed/compile.c:184
+#: sed/compile.c:185
#, c-format
msgid "unknown command: `%c'"
msgstr "perintah: `%c' tidak dikenal"
-#: sed/compile.c:186
+#: sed/compile.c:187
#, fuzzy
msgid "incomplete command"
msgstr "perintah hilang"
-#: sed/compile.c:188
+#: sed/compile.c:189
msgid "\":\" lacks a label"
msgstr ""
-#: sed/compile.c:190
+#: sed/compile.c:191
msgid "recursive escaping after \\c not allowed"
msgstr ""
-#: sed/compile.c:213
+#: sed/compile.c:193
+msgid "e/r/w commands disabled in sandbox mode"
+msgstr ""
+
+#: sed/compile.c:215
#, c-format
msgid "%s: file %s line %lu: %s\n"
msgstr "%s: berkas %s baris %lu: %s\n"
-#: sed/compile.c:216
+#: sed/compile.c:218
#, c-format
msgid "%s: -e expression #%lu, char %lu: %s\n"
msgstr "%s: -e ekspresi #%lu, char %lu: %s\n"
-#: sed/compile.c:1644
+#: sed/compile.c:1607
#, c-format
msgid "can't find label for jump to `%s'"
msgstr "Tidak dapat menemukan label untuk melompat ke `%s'"
-#: sed/execute.c:254 sed/execute.c:271
+#: sed/execute.c:253 sed/execute.c:270
#, c-format
msgid "case conversion produced an invalid character"
msgstr ""
-#: sed/execute.c:565
+#: sed/execute.c:561
#, c-format
msgid "%s: can't read %s: %s\n"
msgstr "%s: tidak dapat membaca %s: %s\n"
-#: sed/execute.c:590
+#: sed/execute.c:587
#, c-format
msgid "couldn't edit %s: is a terminal"
msgstr "tidak dapat mengubah %s: adalah sebuah terminal"
-#: sed/execute.c:595
+#: sed/execute.c:592
#, c-format
msgid "couldn't edit %s: not a regular file"
msgstr "tidak dapat mengubah %s: bukan berkas regular"
-#: sed/execute.c:606
+#: sed/execute.c:603
#, c-format
msgid "%s: warning: failed to set default file creation context to %s: %s"
msgstr "%s: warning: failed to set default file creation context to %s: %s"
-#: sed/execute.c:614
+#: sed/execute.c:611
#, c-format
msgid "%s: warning: failed to get security context of %s: %s"
msgstr "%s: warning: failed to get security context of %s: %s"
-#: sed/execute.c:633 sed/utils.c:178
+#: sed/execute.c:630 sed/utils.c:188
#, c-format
msgid "couldn't open temporary file %s: %s"
msgstr "Tidak dapat membuka berkas sementara %s: %s"
-#: sed/execute.c:1148 sed/execute.c:1358
+#: sed/execute.c:1167 sed/execute.c:1366
msgid "error in subprocess"
msgstr "kesalahan dalam subproses"
-#: sed/execute.c:1150
+#: sed/execute.c:1169
msgid "option `e' not supported"
msgstr "optsi `e' tidak didukung"
-#: sed/execute.c:1339
+#: sed/execute.c:1347
msgid "`e' command not supported"
msgstr "perintah `e' tidak didukung"
-#: sed/execute.c:1665
+#: sed/execute.c:1662
msgid "no input files"
msgstr "tidak ada berkas masukan"
-#: sed/regexp.c:39
+#: sed/regexp.c:40
msgid "no previous regular expression"
msgstr "Tidak ada reguler ekspresi sebelumnya"
-#: sed/regexp.c:141
+#: sed/regexp.c:125
#, c-format
msgid "invalid reference \\%d on `s' command's RHS"
msgstr "referensi tidak valid \\%d pada perintah `s' RHS"
-#: sed/regexp.c:259
+#: sed/regexp.c:196
msgid "regex input buffer length larger than INT_MAX"
msgstr ""
-#: sed/sed.c:35
+#: sed/sed.c:36
msgid "Jay Fenlason"
msgstr ""
-#: sed/sed.c:36
+#: sed/sed.c:37
msgid "Tom Lord"
msgstr ""
-#: sed/sed.c:37
+#: sed/sed.c:38
msgid "Ken Pizzini"
msgstr ""
-#: sed/sed.c:38
+#: sed/sed.c:39
msgid "Paolo Bonzini"
msgstr ""
-#: sed/sed.c:113
+#: sed/sed.c:40
+msgid "Jim Meyering"
+msgstr ""
+
+#: sed/sed.c:41
+msgid "Assaf Gordon"
+msgstr ""
+
+#: sed/sed.c:124
#, fuzzy, c-format
msgid ""
"GNU sed home page: <https://www.gnu.org/software/sed/>.\n"
@@ -588,20 +600,12 @@ 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:120
+#: sed/sed.c:130
#, c-format
msgid "E-mail bug reports to: <%s>.\n"
msgstr ""
-#: 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"
-" gunakan sintaks reguler ekspresi Perl 5 dalam skrip.\n"
-
-#: sed/sed.c:134
+#: sed/sed.c:138
#, c-format
msgid ""
"Usage: %s [OPTION]... {script-only-if-no-other-script} [input-file]...\n"
@@ -611,7 +615,7 @@ msgstr ""
"masukan]...\n"
"\n"
-#: sed/sed.c:138
+#: sed/sed.c:142
#, c-format
msgid ""
" -n, --quiet, --silent\n"
@@ -620,7 +624,16 @@ msgstr ""
" -n, --quiet, --silent\n"
" tekan penampilan otomatis dari pola ruang\n"
-#: sed/sed.c:140
+#: sed/sed.c:144
+#, fuzzy, c-format
+msgid ""
+" --debug\n"
+" annotate program execution\n"
+msgstr ""
+" --posix\n"
+" non-aktifkan seluruh ekstensi GNU.\n"
+
+#: sed/sed.c:146
#, c-format
msgid ""
" -e script, --expression=script\n"
@@ -629,7 +642,7 @@ msgstr ""
" -e script, --expression=script\n"
" tambahkan script ke perintah untuk dijalankan\n"
-#: sed/sed.c:142
+#: sed/sed.c:148
#, c-format
msgid ""
" -f script-file, --file=script-file\n"
@@ -640,7 +653,7 @@ msgstr ""
" tambahkan isi dari berkas-script ke perintah yang akan "
"dijalankan\n"
-#: sed/sed.c:146
+#: sed/sed.c:152
#, c-format
msgid ""
" --follow-symlinks\n"
@@ -649,7 +662,7 @@ msgstr ""
" --follow-symlinks\n"
" ikuti symlinks ketika pemrosesan di tempat\n"
-#: sed/sed.c:149
+#: sed/sed.c:155
#, fuzzy, c-format
msgid ""
" -i[SUFFIX], --in-place[=SUFFIX]\n"
@@ -659,7 +672,7 @@ msgstr ""
" ubah berkas di tempat (buat backup jika ekstensi "
"diberikan)\n"
-#: sed/sed.c:153
+#: sed/sed.c:158
#, c-format
msgid ""
" -b, --binary\n"
@@ -670,7 +683,7 @@ msgstr ""
" buka berkas dalam mode binari (CR+LF tidak diproses secara "
"spesial)\n"
-#: sed/sed.c:157
+#: sed/sed.c:162
#, c-format
msgid ""
" -l N, --line-length=N\n"
@@ -680,7 +693,7 @@ msgstr ""
" spesifikasikan panjang line-wrap yang diinginkan untuk "
"perintah `l'\n"
-#: sed/sed.c:159
+#: sed/sed.c:164
#, c-format
msgid ""
" --posix\n"
@@ -689,7 +702,7 @@ msgstr ""
" --posix\n"
" non-aktifkan seluruh ekstensi GNU.\n"
-#: sed/sed.c:161
+#: sed/sed.c:166
#, fuzzy, c-format
msgid ""
" -E, -r, --regexp-extended\n"
@@ -699,7 +712,7 @@ msgstr ""
" -r, --regexp-extended\n"
" gunakan ekspresi ekstensi regular dalam skrip.\n"
-#: sed/sed.c:167
+#: sed/sed.c:169
#, fuzzy, c-format
msgid ""
" -s, --separate\n"
@@ -711,14 +724,14 @@ msgstr ""
"sebuah\n"
" stream tunggal panjang berkelanjutan.\n"
-#: sed/sed.c:170
+#: sed/sed.c:172
#, c-format
msgid ""
" --sandbox\n"
" operate in sandbox mode (disable e/r/w commands).\n"
msgstr ""
-#: sed/sed.c:172
+#: sed/sed.c:174
#, c-format
msgid ""
" -u, --unbuffered\n"
@@ -731,24 +744,24 @@ msgstr ""
"flush\n"
" buffer keluaran lebih sering\n"
-#: sed/sed.c:175
+#: sed/sed.c:177
#, c-format
msgid ""
" -z, --null-data\n"
" separate lines by NUL characters\n"
msgstr ""
-#: sed/sed.c:177
+#: sed/sed.c:179
#, c-format
msgid " --help display this help and exit\n"
msgstr " --help tampilkan pesan bantuan dan keluar\n"
-#: sed/sed.c:178
+#: sed/sed.c:180
#, c-format
msgid " --version output version information and exit\n"
msgstr " --version keluarkan informasi versi dan keluar\n"
-#: sed/sed.c:179
+#: sed/sed.c:181
#, c-format
msgid ""
"\n"
@@ -766,47 +779,67 @@ msgstr ""
"berkas masukan yang dispesifikasikan, maka standar masukan yang dibaca.\n"
"\n"
-#: sed/utils.c:73 sed/utils.c:384
+#: sed/sed.c:373
+msgid "failed to set binary mode on STDIN"
+msgstr ""
+
+#: sed/sed.c:375
+msgid "failed to set binary mode on STDOUT"
+msgstr ""
+
+#: sed/utils.c:77 sed/utils.c:395
#, c-format
msgid "cannot remove %s: %s"
msgstr "tidak dapat menghapus %s: %s"
-#: sed/utils.c:136
+#: sed/utils.c:146
#, c-format
msgid "couldn't open file %s: %s"
msgstr "tidak dapat membuka berkas %s: %s"
-#: sed/utils.c:155
+#: sed/utils.c:165
#, c-format
msgid "couldn't attach to %s: %s"
msgstr "tidak dapat meng-attach ke %s: %s"
#: sed/utils.c:192
+#, c-format
+msgid "failed to set binary mode on '%s'"
+msgstr ""
+
+#: sed/utils.c:207
#, 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:204 sed/utils.c:223
+#: sed/utils.c:219 sed/utils.c:238
#, c-format
msgid "read error on %s: %s"
msgstr "kesalahan pembacaan pada %s: %s"
-#: sed/utils.c:325
+#: sed/utils.c:336
#, c-format
msgid "couldn't follow symlink %s: %s"
msgstr "tidak dapat mengikuti symlink %s: %s"
-#: sed/utils.c:359
+#: sed/utils.c:370
#, c-format
msgid "cannot stat %s: %s"
msgstr "tidak dapat memperoleh statistik %s: %s"
-#: sed/utils.c:389
+#: sed/utils.c:400
#, c-format
msgid "cannot rename %s: %s"
msgstr "tidak dapat mengubah nama %s: %s"
+#~ msgid ""
+#~ " -R, --regexp-perl\n"
+#~ " use Perl 5's regular expressions syntax in the script.\n"
+#~ msgstr ""
+#~ " -R, --regexp-perl\n"
+#~ " gunakan sintaks reguler ekspresi Perl 5 dalam skrip.\n"
+
#~ msgid "cannot specify modifiers on empty regexp"
#~ msgstr "Tidak dapat menspesifikasikan pemodifikasi pada regexp kosong"
diff --git a/po/it.gmo b/po/it.gmo
index 27fb0b0..0785444 100644
--- a/po/it.gmo
+++ b/po/it.gmo
Binary files differ
diff --git a/po/it.po b/po/it.po
index b000ead..5e24071 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: 2018-03-31 18:40-0700\n"
+"POT-Creation-Date: 2018-12-20 22:03-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"
@@ -27,45 +27,45 @@ msgstr ""
msgid "preserving permissions for %s"
msgstr ""
-#: lib/dfa.c:958
+#: lib/dfa.c:970
msgid "unbalanced ["
msgstr ""
# lib/regcomp.c:191
-#: lib/dfa.c:1079
+#: lib/dfa.c:1091
#, fuzzy
msgid "invalid character class"
msgstr "Nome non valido per una classe di caratteri"
-#: lib/dfa.c:1205
+#: lib/dfa.c:1217
msgid "character class syntax is [[:space:]], not [:space:]"
msgstr ""
-#: lib/dfa.c:1272
+#: lib/dfa.c:1284
msgid "unfinished \\ escape"
msgstr ""
# lib/regcomp.c:209
-#: lib/dfa.c:1433
+#: lib/dfa.c:1445
#, fuzzy
msgid "invalid content of \\{\\}"
msgstr "numero di ripetizioni specificato tra graffe non valido"
# lib/regcomp.c:224
-#: lib/dfa.c:1436
+#: lib/dfa.c:1448
#, fuzzy
msgid "regular expression too big"
msgstr "Espressione regolare troppo grande"
-#: lib/dfa.c:1850
+#: lib/dfa.c:1863
msgid "unbalanced ("
msgstr ""
-#: lib/dfa.c:1968
+#: lib/dfa.c:1981
msgid "no syntax specified"
msgstr ""
-#: lib/dfa.c:1976
+#: lib/dfa.c:1992
msgid "unbalanced )"
msgstr ""
@@ -230,7 +230,7 @@ msgid "Unmatched ) or \\)"
msgstr "`)' o `\\)' non bilanciata"
# lib/regcomp.c:658 sed/regex.c:47
-#: lib/regcomp.c:689
+#: lib/regcomp.c:688
msgid "No previous regular expression"
msgstr "Occorre un'espressione regolare precedente"
@@ -239,12 +239,12 @@ msgstr "Occorre un'espressione regolare precedente"
msgid "setting permissions for %s"
msgstr ""
-#: lib/version-etc.c:74
+#: lib/version-etc.c:73
#, c-format
msgid "Packaged by %s (%s)\n"
msgstr ""
-#: lib/version-etc.c:77
+#: lib/version-etc.c:76
#, c-format
msgid "Packaged by %s\n"
msgstr ""
@@ -252,11 +252,11 @@ 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
+#: lib/version-etc.c:83
msgid "(C)"
msgstr ""
-#: lib/version-etc.c:86
+#: lib/version-etc.c:85
msgid ""
"\n"
"License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl."
@@ -448,211 +448,214 @@ msgid "command only uses one address"
msgstr "il comando usa solo un indirizzo"
# sed/compile.c:179
-#: sed/compile.c:164
+#: sed/compile.c:165
msgid "unterminated address regex"
msgstr "espressione regolare non terminata nell'indirizzo"
# sed/compile.c:180
-#: sed/compile.c:165
+#: sed/compile.c:166
msgid "unterminated `s' command"
msgstr "comando `s' non terminato"
# sed/compile.c:181
-#: sed/compile.c:166
+#: sed/compile.c:167
msgid "unterminated `y' command"
msgstr "comando `y' non terminato"
# sed/compile.c:182
-#: sed/compile.c:167
+#: sed/compile.c:168
msgid "unknown option to `s'"
msgstr "opzione di `s' sconosciuta"
# sed/compile.c:183
-#: sed/compile.c:169
+#: sed/compile.c:170
msgid "multiple `p' options to `s' command"
msgstr "opzioni `p' multiple al comando `s'"
# sed/compile.c:184
-#: sed/compile.c:171
+#: sed/compile.c:172
msgid "multiple `g' options to `s' command"
msgstr "opzioni `g' multiple al comando `s'"
# sed/compile.c:186
-#: sed/compile.c:173
+#: sed/compile.c:174
msgid "multiple number options to `s' command"
msgstr "opzioni numeriche multiple al comando `s'"
# sed/compile.c:188
-#: sed/compile.c:175
+#: sed/compile.c:176
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:177
+#: sed/compile.c:178
msgid "strings for `y' command are different lengths"
msgstr "le stringhe per il comandi `y' hanno lunghezze diverse"
-#: sed/compile.c:179
+#: sed/compile.c:180
msgid "delimiter character is not a single-byte character"
msgstr "il carattere delimitatore multi-byte"
-#: sed/compile.c:181
+#: sed/compile.c:182
msgid "expected newer version of sed"
msgstr "attesa una versione piu' recente di sed"
# sed/compile.c:178
-#: sed/compile.c:183
+#: sed/compile.c:184
msgid "invalid usage of line address 0"
msgstr "utilizzo non valido dell'indirizzo 0"
# sed/compile.c:1319
-#: sed/compile.c:184
+#: sed/compile.c:185
#, c-format
msgid "unknown command: `%c'"
msgstr "comando sconosciuto: `%c'"
# sed/compile.c:177
-#: sed/compile.c:186
+#: sed/compile.c:187
#, fuzzy
msgid "incomplete command"
msgstr "manca il comando"
-#: sed/compile.c:188
+#: sed/compile.c:189
msgid "\":\" lacks a label"
msgstr ""
-#: sed/compile.c:190
+#: sed/compile.c:191
msgid "recursive escaping after \\c not allowed"
msgstr ""
+#: sed/compile.c:193
+msgid "e/r/w commands disabled in sandbox mode"
+msgstr ""
+
# sed/compile.c:1340
-#: sed/compile.c:213
+#: sed/compile.c:215
#, 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:216
+#: sed/compile.c:218
#, 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:1644
+#: sed/compile.c:1607
#, c-format
msgid "can't find label for jump to `%s'"
msgstr "impossibile trovare un'etichetta per il salto a `%s'"
-#: sed/execute.c:254 sed/execute.c:271
+#: sed/execute.c:253 sed/execute.c:270
#, c-format
msgid "case conversion produced an invalid character"
msgstr ""
# sed/execute.c:516
-#: sed/execute.c:565
+#: sed/execute.c:561
#, c-format
msgid "%s: can't read %s: %s\n"
msgstr "%s: impossibile leggere %s: %s\n"
# sed/execute.c:675
-#: sed/execute.c:590
+#: sed/execute.c:587
#, c-format
msgid "couldn't edit %s: is a terminal"
msgstr "impossibile modificare %s: un terminale"
-#: sed/execute.c:595
+#: sed/execute.c:592
#, c-format
msgid "couldn't edit %s: not a regular file"
msgstr "impossibile modificare %s: non un file normale"
-#: sed/execute.c:606
+#: sed/execute.c:603
#, c-format
msgid "%s: warning: failed to set default file creation context to %s: %s"
msgstr ""
-#: sed/execute.c:614
+#: sed/execute.c:611
#, c-format
msgid "%s: warning: failed to get security context of %s: %s"
msgstr ""
# lib/utils.c:131
-#: sed/execute.c:633 sed/utils.c:178
+#: sed/execute.c:630 sed/utils.c:188
#, 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:1148 sed/execute.c:1358
+#: sed/execute.c:1167 sed/execute.c:1366
msgid "error in subprocess"
msgstr "errore in un sottoprocesso"
# sed/execute.c:1005
-#: sed/execute.c:1150
+#: sed/execute.c:1169
msgid "option `e' not supported"
msgstr "opzione `e' non supportata"
# sed/execute.c:1185
-#: sed/execute.c:1339
+#: sed/execute.c:1347
msgid "`e' command not supported"
msgstr "comando `e' non supportato"
-#: sed/execute.c:1665
+#: sed/execute.c:1662
msgid "no input files"
msgstr "nessun file in ingresso"
# lib/regcomp.c:658 sed/regex.c:47
-#: sed/regexp.c:39
+#: sed/regexp.c:40
msgid "no previous regular expression"
msgstr "occorre un'espressione regolare precedente"
# sed/regex.c:146
-#: sed/regexp.c:141
+#: sed/regexp.c:125
#, c-format
msgid "invalid reference \\%d on `s' command's RHS"
msgstr "riferimento non valido \\%d nel secondo membro del comando `s'"
-#: sed/regexp.c:259
+#: sed/regexp.c:196
msgid "regex input buffer length larger than INT_MAX"
msgstr ""
-#: sed/sed.c:35
+#: sed/sed.c:36
msgid "Jay Fenlason"
msgstr ""
-#: sed/sed.c:36
+#: sed/sed.c:37
msgid "Tom Lord"
msgstr ""
-#: sed/sed.c:37
+#: sed/sed.c:38
msgid "Ken Pizzini"
msgstr ""
-#: sed/sed.c:38
+#: sed/sed.c:39
msgid "Paolo Bonzini"
msgstr ""
-#: sed/sed.c:113
+#: sed/sed.c:40
+msgid "Jim Meyering"
+msgstr ""
+
+#: sed/sed.c:41
+msgid "Assaf Gordon"
+msgstr ""
+
+#: sed/sed.c:124
#, c-format
msgid ""
"GNU sed home page: <https://www.gnu.org/software/sed/>.\n"
"General help using GNU software: <https://www.gnu.org/gethelp/>.\n"
msgstr ""
-#: sed/sed.c:120
+#: sed/sed.c:130
#, c-format
msgid "E-mail bug reports to: <%s>.\n"
msgstr ""
-# sed/sed.c:98
-#: 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"
-" usa la sintassi Perl 5 per le espressioni regolari\n"
-
-#: sed/sed.c:134
+#: sed/sed.c:138
#, c-format
msgid ""
"Usage: %s [OPTION]... {script-only-if-no-other-script} [input-file]...\n"
@@ -662,7 +665,7 @@ msgstr ""
"file]...\n"
"\n"
-#: sed/sed.c:138
+#: sed/sed.c:142
#, c-format
msgid ""
" -n, --quiet, --silent\n"
@@ -671,7 +674,16 @@ msgstr ""
" -n, --quiet, --silent\n"
" sopprime la stampa automatica del pattern space\n"
-#: sed/sed.c:140
+#: sed/sed.c:144
+#, fuzzy, c-format
+msgid ""
+" --debug\n"
+" annotate program execution\n"
+msgstr ""
+" --posix\n"
+" disabilita tutte le estensioni GNU.\n"
+
+#: sed/sed.c:146
#, c-format
msgid ""
" -e script, --expression=script\n"
@@ -680,7 +692,7 @@ msgstr ""
" -e script, --expression=script\n"
" aggiunge lo script ai comandi da eseguire\n"
-#: sed/sed.c:142
+#: sed/sed.c:148
#, c-format
msgid ""
" -f script-file, --file=script-file\n"
@@ -691,7 +703,7 @@ msgstr ""
" aggiunge il contenuto di file-script ai comandi da "
"eseguire\n"
-#: sed/sed.c:146
+#: sed/sed.c:152
#, c-format
msgid ""
" --follow-symlinks\n"
@@ -700,7 +712,7 @@ msgstr ""
" --follow-symlinks\n"
" segue i link simbolici quando viene utilizzato -i\n"
-#: sed/sed.c:149
+#: sed/sed.c:155
#, fuzzy, c-format
msgid ""
" -i[SUFFIX], --in-place[=SUFFIX]\n"
@@ -710,7 +722,7 @@ msgstr ""
" scrive il risultato sul file originale (facendo una copia\n"
" se fornita un'estensione)\n"
-#: sed/sed.c:153
+#: sed/sed.c:158
#, c-format
msgid ""
" -b, --binary\n"
@@ -721,7 +733,7 @@ msgstr ""
" apre i file in modo binario (lasciando le sequenze CR+LF "
"immutate)\n"
-#: sed/sed.c:157
+#: sed/sed.c:162
#, c-format
msgid ""
" -l N, --line-length=N\n"
@@ -731,7 +743,7 @@ msgstr ""
" specifica la lunghezza delle linee generate dal comando "
"`l'\n"
-#: sed/sed.c:159
+#: sed/sed.c:164
#, c-format
msgid ""
" --posix\n"
@@ -741,7 +753,7 @@ msgstr ""
" disabilita tutte le estensioni GNU.\n"
# sed/sed.c:98
-#: sed/sed.c:161
+#: sed/sed.c:166
#, fuzzy, c-format
msgid ""
" -E, -r, --regexp-extended\n"
@@ -751,7 +763,7 @@ msgstr ""
" -r, --regexp-extended\n"
" usa la sintassi di `egrep' per le espressioni regolari\n"
-#: sed/sed.c:167
+#: sed/sed.c:169
#, fuzzy, c-format
msgid ""
" -s, --separate\n"
@@ -762,14 +774,14 @@ msgstr ""
" considera i file di input come separati invece che come un\n"
" unico file lungo.\n"
-#: sed/sed.c:170
+#: sed/sed.c:172
#, c-format
msgid ""
" --sandbox\n"
" operate in sandbox mode (disable e/r/w commands).\n"
msgstr ""
-#: sed/sed.c:172
+#: sed/sed.c:174
#, c-format
msgid ""
" -u, --unbuffered\n"
@@ -780,24 +792,24 @@ msgstr ""
" -u, --unbuffered\n"
" carica e visualizza i dati una a pezzetti piu' piccoli\n"
-#: sed/sed.c:175
+#: sed/sed.c:177
#, c-format
msgid ""
" -z, --null-data\n"
" separate lines by NUL characters\n"
msgstr ""
-#: sed/sed.c:177
+#: sed/sed.c:179
#, c-format
msgid " --help display this help and exit\n"
msgstr " --help mostra questo aiuto ed esce\n"
-#: sed/sed.c:178
+#: sed/sed.c:180
#, c-format
msgid " --version output version information and exit\n"
msgstr " --version stampa le informazioni sulla versione ed esce\n"
-#: sed/sed.c:179
+#: sed/sed.c:181
#, c-format
msgid ""
"\n"
@@ -816,26 +828,39 @@ msgstr ""
"sono specificati file di input sar letto lo standard input.\n"
"\n"
+#: sed/sed.c:373
+msgid "failed to set binary mode on STDIN"
+msgstr ""
+
+#: sed/sed.c:375
+msgid "failed to set binary mode on STDOUT"
+msgstr ""
+
# sed/execute.c:516
-#: sed/utils.c:73 sed/utils.c:384
+#: sed/utils.c:77 sed/utils.c:395
#, c-format
msgid "cannot remove %s: %s"
msgstr "impossibile rimuovere %s: %s"
# lib/utils.c:131
-#: sed/utils.c:136
+#: sed/utils.c:146
#, c-format
msgid "couldn't open file %s: %s"
msgstr "impossibile aprire il file %s: %s"
# lib/utils.c:161
-#: sed/utils.c:155
+#: sed/utils.c:165
#, c-format
msgid "couldn't attach to %s: %s"
msgstr "impossibile accedere a %s: %s"
-# lib/utils.c:161
#: sed/utils.c:192
+#, c-format
+msgid "failed to set binary mode on '%s'"
+msgstr ""
+
+# lib/utils.c:161
+#: sed/utils.c:207
#, fuzzy, c-format
msgid "couldn't write %llu item to %s: %s"
msgid_plural "couldn't write %llu items to %s: %s"
@@ -843,29 +868,37 @@ 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:204 sed/utils.c:223
+#: sed/utils.c:219 sed/utils.c:238
#, c-format
msgid "read error on %s: %s"
msgstr "errore di lettura su %s: %s"
# lib/utils.c:131
-#: sed/utils.c:325
+#: sed/utils.c:336
#, c-format
msgid "couldn't follow symlink %s: %s"
msgstr "impossibile seguire il link simbolico %s: %s"
# sed/execute.c:516
-#: sed/utils.c:359
+#: sed/utils.c:370
#, c-format
msgid "cannot stat %s: %s"
msgstr "impossibile ottenere informazioni su %s: %s"
# sed/execute.c:516
-#: sed/utils.c:389
+#: sed/utils.c:400
#, c-format
msgid "cannot rename %s: %s"
msgstr "impossibile rinominare %s: %s"
+# sed/sed.c:98
+#~ msgid ""
+#~ " -R, --regexp-perl\n"
+#~ " use Perl 5's regular expressions syntax in the script.\n"
+#~ msgstr ""
+#~ " -R, --regexp-perl\n"
+#~ " usa la sintassi Perl 5 per le espressioni regolari\n"
+
# sed/regex.c:48
#~ msgid "cannot specify modifiers on empty regexp"
#~ msgstr ""
diff --git a/po/ja.gmo b/po/ja.gmo
index 84eaaea..95bf906 100644
--- a/po/ja.gmo
+++ b/po/ja.gmo
Binary files differ
diff --git a/po/ja.po b/po/ja.po
index 43018c4..160d55e 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: 2018-03-31 18:40-0700\n"
+"POT-Creation-Date: 2018-12-20 22:03-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"
@@ -35,42 +35,42 @@ msgstr "書き込みエラー"
msgid "preserving permissions for %s"
msgstr "%s のパーミッションを保存しています"
-#: lib/dfa.c:958
+#: lib/dfa.c:970
msgid "unbalanced ["
msgstr ""
-#: lib/dfa.c:1079
+#: lib/dfa.c:1091
#, fuzzy
msgid "invalid character class"
msgstr "無効な文字クラス名です"
-#: lib/dfa.c:1205
+#: lib/dfa.c:1217
msgid "character class syntax is [[:space:]], not [:space:]"
msgstr ""
-#: lib/dfa.c:1272
+#: lib/dfa.c:1284
msgid "unfinished \\ escape"
msgstr ""
-#: lib/dfa.c:1433
+#: lib/dfa.c:1445
#, fuzzy
msgid "invalid content of \\{\\}"
msgstr "\\{\\} の中身が無効です"
-#: lib/dfa.c:1436
+#: lib/dfa.c:1448
#, fuzzy
msgid "regular expression too big"
msgstr "正規表現が大きすぎます"
-#: lib/dfa.c:1850
+#: lib/dfa.c:1863
msgid "unbalanced ("
msgstr ""
-#: lib/dfa.c:1968
+#: lib/dfa.c:1981
msgid "no syntax specified"
msgstr ""
-#: lib/dfa.c:1976
+#: lib/dfa.c:1992
msgid "unbalanced )"
msgstr ""
@@ -215,7 +215,7 @@ msgstr "正規表現が大きすぎます"
msgid "Unmatched ) or \\)"
msgstr ") または \\) が不一致です"
-#: lib/regcomp.c:689
+#: lib/regcomp.c:688
msgid "No previous regular expression"
msgstr "以前に正規表現がありません"
@@ -224,12 +224,12 @@ msgstr "以前に正規表現がありません"
msgid "setting permissions for %s"
msgstr "%s のパーミッションを設定します"
-#: lib/version-etc.c:74
+#: lib/version-etc.c:73
#, c-format
msgid "Packaged by %s (%s)\n"
msgstr "パッケージ作成者: %s (%s)\n"
-#: lib/version-etc.c:77
+#: lib/version-etc.c:76
#, c-format
msgid "Packaged by %s\n"
msgstr "パッケージ作成者: %s\n"
@@ -237,11 +237,11 @@ 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
+#: lib/version-etc.c:83
msgid "(C)"
msgstr "(C)"
-#: lib/version-etc.c:86
+#: lib/version-etc.c:85
#, fuzzy
msgid ""
"\n"
@@ -450,169 +450,181 @@ msgstr "コマンドが足りません"
msgid "command only uses one address"
msgstr "コマンドはアドレスを1つだけ使います"
-#: sed/compile.c:164
+#: sed/compile.c:165
msgid "unterminated address regex"
msgstr "アドレスregexが終了していません"
-#: sed/compile.c:165
+#: sed/compile.c:166
msgid "unterminated `s' command"
msgstr "`s' コマンドが終了していません"
-#: sed/compile.c:166
+#: sed/compile.c:167
msgid "unterminated `y' command"
msgstr "`y' コマンドが終了していません"
-#: sed/compile.c:167
+#: sed/compile.c:168
msgid "unknown option to `s'"
msgstr "`s' に対するオプションが不明です"
-#: sed/compile.c:169
+#: sed/compile.c:170
msgid "multiple `p' options to `s' command"
msgstr "`s' コマンドに対して複数の `p' オプションがあります"
-#: sed/compile.c:171
+#: sed/compile.c:172
msgid "multiple `g' options to `s' command"
msgstr "`s' コマンドに対して複数の `g' オプションがあります"
-#: sed/compile.c:173
+#: sed/compile.c:174
msgid "multiple number options to `s' command"
msgstr "`s' コマンドに対して複数の数値オプションがあります"
-#: sed/compile.c:175
+#: sed/compile.c:176
msgid "number option to `s' command may not be zero"
msgstr "`s' コマンドに対する数値オプションは 0 (ゼロ) ではいけません"
-#: sed/compile.c:177
+#: sed/compile.c:178
msgid "strings for `y' command are different lengths"
msgstr "`y' コマンドに対する文字列の長さが異なります"
-#: sed/compile.c:179
+#: sed/compile.c:180
msgid "delimiter character is not a single-byte character"
msgstr "区切り文字が単一バイト文字でありません"
-#: sed/compile.c:181
+#: sed/compile.c:182
msgid "expected newer version of sed"
msgstr "sed の新版が前提です"
-#: sed/compile.c:183
+#: sed/compile.c:184
msgid "invalid usage of line address 0"
msgstr "無効な行アドレス 0 の使用方法です"
-#: sed/compile.c:184
+#: sed/compile.c:185
#, c-format
msgid "unknown command: `%c'"
msgstr "不明なコマンド: `%c'"
-#: sed/compile.c:186
+#: sed/compile.c:187
#, fuzzy
msgid "incomplete command"
msgstr "コマンドが足りません"
-#: sed/compile.c:188
+#: sed/compile.c:189
msgid "\":\" lacks a label"
msgstr ""
-#: sed/compile.c:190
+#: sed/compile.c:191
msgid "recursive escaping after \\c not allowed"
msgstr ""
-#: sed/compile.c:213
+#: sed/compile.c:193
+msgid "e/r/w commands disabled in sandbox mode"
+msgstr ""
+
+#: sed/compile.c:215
#, c-format
msgid "%s: file %s line %lu: %s\n"
msgstr "%s: ファイル %s 行 %lu: %s\n"
-#: sed/compile.c:216
+#: sed/compile.c:218
#, c-format
msgid "%s: -e expression #%lu, char %lu: %s\n"
msgstr "%s: -e expression #%lu, char %lu: %s\n"
-#: sed/compile.c:1644
+#: sed/compile.c:1607
#, c-format
msgid "can't find label for jump to `%s'"
msgstr "`%s' へジャンプするためのラベルが見つかりません"
-#: sed/execute.c:254 sed/execute.c:271
+#: sed/execute.c:253 sed/execute.c:270
#, c-format
msgid "case conversion produced an invalid character"
msgstr ""
-#: sed/execute.c:565
+#: sed/execute.c:561
#, c-format
msgid "%s: can't read %s: %s\n"
msgstr "%s: %s を読み込めません: %s\n"
-#: sed/execute.c:590
+#: sed/execute.c:587
#, c-format
msgid "couldn't edit %s: is a terminal"
msgstr "%s を編集できませんでした: 端末です"
-#: sed/execute.c:595
+#: sed/execute.c:592
#, c-format
msgid "couldn't edit %s: not a regular file"
msgstr "%s を編集できませんでした: 通常ファイルでありません"
-#: sed/execute.c:606
+#: sed/execute.c:603
#, c-format
msgid "%s: warning: failed to set default file creation context to %s: %s"
msgstr ""
"%s: 警告: %s にデフォルトのファイル作成コンテキストを設定できませんでした: %s"
-#: sed/execute.c:614
+#: sed/execute.c:611
#, c-format
msgid "%s: warning: failed to get security context of %s: %s"
msgstr "%s: 警告: %s のセキュリティコンテキストの取得に失敗しました: %s"
-#: sed/execute.c:633 sed/utils.c:178
+#: sed/execute.c:630 sed/utils.c:188
#, c-format
msgid "couldn't open temporary file %s: %s"
msgstr "一時ファイル %s を開くことができませんでした: %s"
-#: sed/execute.c:1148 sed/execute.c:1358
+#: sed/execute.c:1167 sed/execute.c:1366
msgid "error in subprocess"
msgstr "子プロセスのエラーです"
-#: sed/execute.c:1150
+#: sed/execute.c:1169
msgid "option `e' not supported"
msgstr "オプション `e' はサポートされていません"
-#: sed/execute.c:1339
+#: sed/execute.c:1347
msgid "`e' command not supported"
msgstr "`e' コマンドはサポートされていません"
-#: sed/execute.c:1665
+#: sed/execute.c:1662
msgid "no input files"
msgstr "入力ファイルがありません"
-#: sed/regexp.c:39
+#: sed/regexp.c:40
msgid "no previous regular expression"
msgstr "以前に正規表現がありません"
-#: sed/regexp.c:141
+#: sed/regexp.c:125
#, c-format
msgid "invalid reference \\%d on `s' command's RHS"
msgstr "`s' コマンドの右側に無効な参照 \\%d があります"
-#: sed/regexp.c:259
+#: sed/regexp.c:196
msgid "regex input buffer length larger than INT_MAX"
msgstr ""
-#: sed/sed.c:35
+#: sed/sed.c:36
msgid "Jay Fenlason"
msgstr ""
-#: sed/sed.c:36
+#: sed/sed.c:37
msgid "Tom Lord"
msgstr ""
-#: sed/sed.c:37
+#: sed/sed.c:38
msgid "Ken Pizzini"
msgstr ""
-#: sed/sed.c:38
+#: sed/sed.c:39
msgid "Paolo Bonzini"
msgstr ""
-#: sed/sed.c:113
+#: sed/sed.c:40
+msgid "Jim Meyering"
+msgstr ""
+
+#: sed/sed.c:41
+msgid "Assaf Gordon"
+msgstr ""
+
+#: sed/sed.c:124
#, fuzzy, c-format
msgid ""
"GNU sed home page: <https://www.gnu.org/software/sed/>.\n"
@@ -622,20 +634,12 @@ msgstr ""
"GNU ソフトウェアを使用する際の一般的なヘルプ: <http://www.gnu.org/gethelp/"
">.\n"
-#: sed/sed.c:120
+#: sed/sed.c:130
#, c-format
msgid "E-mail bug reports to: <%s>.\n"
msgstr ""
-#: 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
+#: sed/sed.c:138
#, c-format
msgid ""
"Usage: %s [OPTION]... {script-only-if-no-other-script} [input-file]...\n"
@@ -644,7 +648,7 @@ msgstr ""
"使用法: %s [OPTION]... {script-only-if-no-other-script} [input-file]...\n"
"\n"
-#: sed/sed.c:138
+#: sed/sed.c:142
#, c-format
msgid ""
" -n, --quiet, --silent\n"
@@ -653,7 +657,16 @@ msgstr ""
"-n, --quiet, --silent\n"
" パターン空間の自動出力を抑制する\n"
-#: sed/sed.c:140
+#: sed/sed.c:144
+#, fuzzy, c-format
+msgid ""
+" --debug\n"
+" annotate program execution\n"
+msgstr ""
+" --posix\n"
+" 全ての GNU 拡張を無効にする\n"
+
+#: sed/sed.c:146
#, c-format
msgid ""
" -e script, --expression=script\n"
@@ -662,7 +675,7 @@ msgstr ""
" -e script, --expression=script\n"
" 実行するコマンドとして script を追加する\n"
-#: sed/sed.c:142
+#: sed/sed.c:148
#, c-format
msgid ""
" -f script-file, --file=script-file\n"
@@ -672,7 +685,7 @@ msgstr ""
" -f script-file, --file=script-file\n"
" 実行するコマンドとして script-file の中身を追加する\n"
-#: sed/sed.c:146
+#: sed/sed.c:152
#, c-format
msgid ""
" --follow-symlinks\n"
@@ -681,7 +694,7 @@ msgstr ""
" --follow-symlinks\n"
" 処理の際にその場でシンボリックリンクを辿る\n"
-#: sed/sed.c:149
+#: sed/sed.c:155
#, fuzzy, c-format
msgid ""
" -i[SUFFIX], --in-place[=SUFFIX]\n"
@@ -691,7 +704,7 @@ msgstr ""
" ファイルを自体をその場で編集する (SUFFIX が与えられた\n"
" 場合はバックアップを作成する)\n"
-#: sed/sed.c:153
+#: sed/sed.c:158
#, c-format
msgid ""
" -b, --binary\n"
@@ -701,7 +714,7 @@ msgstr ""
" -b, --binary\n"
" ファイルをバイナリモードで開く (CR+LFs を特別に処理しない)\n"
-#: sed/sed.c:157
+#: sed/sed.c:162
#, c-format
msgid ""
" -l N, --line-length=N\n"
@@ -710,7 +723,7 @@ msgstr ""
" -l N, --line-length=N\n"
" `l' コマンドの行折り返しの長さを指定する\n"
-#: sed/sed.c:159
+#: sed/sed.c:164
#, c-format
msgid ""
" --posix\n"
@@ -719,7 +732,7 @@ msgstr ""
" --posix\n"
" 全ての GNU 拡張を無効にする\n"
-#: sed/sed.c:161
+#: sed/sed.c:166
#, fuzzy, c-format
msgid ""
" -E, -r, --regexp-extended\n"
@@ -729,7 +742,7 @@ msgstr ""
" -r, --regexp-extended\n"
" スクリプトで拡張正規表現を使用する\n"
-#: sed/sed.c:167
+#: sed/sed.c:169
#, fuzzy, c-format
msgid ""
" -s, --separate\n"
@@ -740,14 +753,14 @@ msgstr ""
" 複数のファイルを処理する際に連続した単一の長いストリーム\n"
" としてではなく、個別に取り扱う\n"
-#: sed/sed.c:170
+#: sed/sed.c:172
#, c-format
msgid ""
" --sandbox\n"
" operate in sandbox mode (disable e/r/w commands).\n"
msgstr ""
-#: sed/sed.c:172
+#: sed/sed.c:174
#, c-format
msgid ""
" -u, --unbuffered\n"
@@ -759,24 +772,24 @@ msgstr ""
" 入力ファイルからデータをごく少量ずつ取り込み、頻繁に出力\n"
" バッファに出力 (flush) する\n"
-#: sed/sed.c:175
+#: sed/sed.c:177
#, c-format
msgid ""
" -z, --null-data\n"
" separate lines by NUL characters\n"
msgstr ""
-#: sed/sed.c:177
+#: sed/sed.c:179
#, c-format
msgid " --help display this help and exit\n"
msgstr " --help このヘルプを表示して終了する\n"
-#: sed/sed.c:178
+#: sed/sed.c:180
#, c-format
msgid " --version output version information and exit\n"
msgstr " --version バージョン情報を表示して終了する\n"
-#: sed/sed.c:179
+#: sed/sed.c:181
#, c-format
msgid ""
"\n"
@@ -793,47 +806,67 @@ msgstr ""
"れていない場合は、標準入力から読み込みます。\n"
"\n"
-#: sed/utils.c:73 sed/utils.c:384
+#: sed/sed.c:373
+msgid "failed to set binary mode on STDIN"
+msgstr ""
+
+#: sed/sed.c:375
+msgid "failed to set binary mode on STDOUT"
+msgstr ""
+
+#: sed/utils.c:77 sed/utils.c:395
#, c-format
msgid "cannot remove %s: %s"
msgstr "%s を削除できません: %s"
-#: sed/utils.c:136
+#: sed/utils.c:146
#, c-format
msgid "couldn't open file %s: %s"
msgstr "ファイル %s を開けませんでした: %s"
-#: sed/utils.c:155
+#: sed/utils.c:165
#, c-format
msgid "couldn't attach to %s: %s"
msgstr "%s に接続 (attach) できませんでした: %s"
#: sed/utils.c:192
#, fuzzy, c-format
+msgid "failed to set binary mode on '%s'"
+msgstr "%s をモード %s で再度開くことに失敗しました"
+
+#: sed/utils.c:207
+#, 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:204 sed/utils.c:223
+#: sed/utils.c:219 sed/utils.c:238
#, c-format
msgid "read error on %s: %s"
msgstr "%s の読み込みエラーです: %s"
-#: sed/utils.c:325
+#: sed/utils.c:336
#, c-format
msgid "couldn't follow symlink %s: %s"
msgstr "シンボリックリンク %s を辿れませんでした: %s"
-#: sed/utils.c:359
+#: sed/utils.c:370
#, c-format
msgid "cannot stat %s: %s"
msgstr "%s の状態取得 (stat) ができません: %s"
-#: sed/utils.c:389
+#: sed/utils.c:400
#, c-format
msgid "cannot rename %s: %s"
msgstr "%s の名前を変更できません: %s"
+#~ msgid ""
+#~ " -R, --regexp-perl\n"
+#~ " use Perl 5's regular expressions syntax in the script.\n"
+#~ msgstr ""
+#~ " -R, --regexp-perl\n"
+#~ " スクリプトで Perl 5 の正規表現構文を使用する\n"
+
#~ msgid "%s: option '--%s' doesn't allow an argument\n"
#~ msgstr "%s: オプション '--%s' は引数を取ることができません\n"
@@ -1349,9 +1382,6 @@ msgstr "%s の名前を変更できません: %s"
#~ msgid "unknown stream"
#~ msgstr "不明なストリーム"
-#~ msgid "failed to reopen %s with mode %s"
-#~ msgstr "%s をモード %s で再度開くことに失敗しました"
-
#~ msgid "string comparison failed"
#~ msgstr "文字列の比較に失敗しました"
diff --git a/po/ko.gmo b/po/ko.gmo
index 98b3b7a..bf410bf 100644
--- a/po/ko.gmo
+++ b/po/ko.gmo
Binary files differ
diff --git a/po/ko.po b/po/ko.po
index a58bdf5..1b7581b 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: 2018-03-31 18:40-0700\n"
+"POT-Creation-Date: 2018-12-20 22:03-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"
@@ -25,39 +25,39 @@ msgstr ""
msgid "preserving permissions for %s"
msgstr ""
-#: lib/dfa.c:958
+#: lib/dfa.c:970
msgid "unbalanced ["
msgstr ""
-#: lib/dfa.c:1079
+#: lib/dfa.c:1091
msgid "invalid character class"
msgstr ""
-#: lib/dfa.c:1205
+#: lib/dfa.c:1217
msgid "character class syntax is [[:space:]], not [:space:]"
msgstr ""
-#: lib/dfa.c:1272
+#: lib/dfa.c:1284
msgid "unfinished \\ escape"
msgstr ""
-#: lib/dfa.c:1433
+#: lib/dfa.c:1445
msgid "invalid content of \\{\\}"
msgstr ""
-#: lib/dfa.c:1436
+#: lib/dfa.c:1448
msgid "regular expression too big"
msgstr ""
-#: lib/dfa.c:1850
+#: lib/dfa.c:1863
msgid "unbalanced ("
msgstr ""
-#: lib/dfa.c:1968
+#: lib/dfa.c:1981
msgid "no syntax specified"
msgstr ""
-#: lib/dfa.c:1976
+#: lib/dfa.c:1992
msgid "unbalanced )"
msgstr ""
@@ -204,7 +204,7 @@ msgstr ""
msgid "Unmatched ) or \\)"
msgstr "`{' ġ ʽϴ"
-#: lib/regcomp.c:689
+#: lib/regcomp.c:688
msgid "No previous regular expression"
msgstr ""
@@ -213,12 +213,12 @@ msgstr ""
msgid "setting permissions for %s"
msgstr ""
-#: lib/version-etc.c:74
+#: lib/version-etc.c:73
#, c-format
msgid "Packaged by %s (%s)\n"
msgstr ""
-#: lib/version-etc.c:77
+#: lib/version-etc.c:76
#, c-format
msgid "Packaged by %s\n"
msgstr ""
@@ -226,11 +226,11 @@ 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
+#: lib/version-etc.c:83
msgid "(C)"
msgstr ""
-#: lib/version-etc.c:86
+#: lib/version-etc.c:85
msgid ""
"\n"
"License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl."
@@ -418,213 +418,226 @@ msgstr " ʾҽϴ"
msgid "command only uses one address"
msgstr "ɿ ϳ ּҸ ֽϴ"
-#: sed/compile.c:164
+#: sed/compile.c:165
#, fuzzy
msgid "unterminated address regex"
msgstr "ּ ǥ ʾҽϴ"
-#: sed/compile.c:165
+#: sed/compile.c:166
#, fuzzy
msgid "unterminated `s' command"
msgstr "`s' ʾҽϴ"
-#: sed/compile.c:166
+#: sed/compile.c:167
#, fuzzy
msgid "unterminated `y' command"
msgstr "`y' ʾҽϴ"
-#: sed/compile.c:167
+#: sed/compile.c:168
#, fuzzy
msgid "unknown option to `s'"
msgstr "`s' ɼ ֽϴ"
-#: sed/compile.c:169
+#: sed/compile.c:170
msgid "multiple `p' options to `s' command"
msgstr "`s' ɿ `p' ɼ ߺǾ ֽϴ"
-#: sed/compile.c:171
+#: sed/compile.c:172
msgid "multiple `g' options to `s' command"
msgstr "`s' ɿ `g' ɼ ߺǾ ֽϴ"
-#: sed/compile.c:173
+#: sed/compile.c:174
msgid "multiple number options to `s' command"
msgstr "`s' ɿ ɼ ߺǾ ֽϴ"
-#: sed/compile.c:175
+#: sed/compile.c:176
msgid "number option to `s' command may not be zero"
msgstr "`s' ɼǿ '0' ϴ"
-#: sed/compile.c:177
+#: sed/compile.c:178
#, fuzzy
msgid "strings for `y' command are different lengths"
msgstr "`y' ڿ ̰ ٸϴ"
-#: sed/compile.c:179
+#: sed/compile.c:180
msgid "delimiter character is not a single-byte character"
msgstr ""
-#: sed/compile.c:181
+#: sed/compile.c:182
msgid "expected newer version of sed"
msgstr ""
-#: sed/compile.c:183
+#: sed/compile.c:184
#, fuzzy
msgid "invalid usage of line address 0"
msgstr "ּ (modifier) ùٸ ʽϴ"
-#: sed/compile.c:184
+#: sed/compile.c:185
#, fuzzy, c-format
msgid "unknown command: `%c'"
msgstr " :"
-#: sed/compile.c:186
+#: sed/compile.c:187
#, fuzzy
msgid "incomplete command"
msgstr " ʾҽϴ"
-#: sed/compile.c:188
+#: sed/compile.c:189
msgid "\":\" lacks a label"
msgstr ""
-#: sed/compile.c:190
+#: sed/compile.c:191
msgid "recursive escaping after \\c not allowed"
msgstr ""
-#: sed/compile.c:213
+#: sed/compile.c:193
+msgid "e/r/w commands disabled in sandbox mode"
+msgstr ""
+
+#: sed/compile.c:215
#, c-format
msgid "%s: file %s line %lu: %s\n"
msgstr "%s: %s %lu ° : %s\n"
-#: sed/compile.c:216
+#: sed/compile.c:218
#, c-format
msgid "%s: -e expression #%lu, char %lu: %s\n"
msgstr "%s: -e expression #%lu, char %lu: %s\n"
-#: sed/compile.c:1644
+#: sed/compile.c:1607
#, fuzzy, c-format
msgid "can't find label for jump to `%s'"
msgstr "`%s' () ̺ ã ϴ"
-#: sed/execute.c:254 sed/execute.c:271
+#: sed/execute.c:253 sed/execute.c:270
#, c-format
msgid "case conversion produced an invalid character"
msgstr ""
-#: sed/execute.c:565
+#: sed/execute.c:561
#, c-format
msgid "%s: can't read %s: %s\n"
msgstr "%s: %s () : %s\n"
-#: sed/execute.c:590
+#: sed/execute.c:587
#, c-format
msgid "couldn't edit %s: is a terminal"
msgstr ""
-#: sed/execute.c:595
+#: sed/execute.c:592
#, c-format
msgid "couldn't edit %s: not a regular file"
msgstr ""
-#: sed/execute.c:606
+#: sed/execute.c:603
#, c-format
msgid "%s: warning: failed to set default file creation context to %s: %s"
msgstr ""
-#: sed/execute.c:614
+#: sed/execute.c:611
#, c-format
msgid "%s: warning: failed to get security context of %s: %s"
msgstr ""
-#: sed/execute.c:633 sed/utils.c:178
+#: sed/execute.c:630 sed/utils.c:188
#, fuzzy, c-format
msgid "couldn't open temporary file %s: %s"
msgstr "%s ϴ"
-#: sed/execute.c:1148 sed/execute.c:1358
+#: sed/execute.c:1167 sed/execute.c:1366
msgid "error in subprocess"
msgstr ""
-#: sed/execute.c:1150
+#: sed/execute.c:1169
msgid "option `e' not supported"
msgstr ""
-#: sed/execute.c:1339
+#: sed/execute.c:1347
msgid "`e' command not supported"
msgstr ""
-#: sed/execute.c:1665
+#: sed/execute.c:1662
msgid "no input files"
msgstr ""
-#: sed/regexp.c:39
+#: sed/regexp.c:40
msgid "no previous regular expression"
msgstr ""
-#: sed/regexp.c:141
+#: sed/regexp.c:125
#, c-format
msgid "invalid reference \\%d on `s' command's RHS"
msgstr ""
-#: sed/regexp.c:259
+#: sed/regexp.c:196
msgid "regex input buffer length larger than INT_MAX"
msgstr ""
-#: sed/sed.c:35
+#: sed/sed.c:36
msgid "Jay Fenlason"
msgstr ""
-#: sed/sed.c:36
+#: sed/sed.c:37
msgid "Tom Lord"
msgstr ""
-#: sed/sed.c:37
+#: sed/sed.c:38
msgid "Ken Pizzini"
msgstr ""
-#: sed/sed.c:38
+#: sed/sed.c:39
msgid "Paolo Bonzini"
msgstr ""
-#: sed/sed.c:113
+#: sed/sed.c:40
+msgid "Jim Meyering"
+msgstr ""
+
+#: sed/sed.c:41
+msgid "Assaf Gordon"
+msgstr ""
+
+#: sed/sed.c:124
#, c-format
msgid ""
"GNU sed home page: <https://www.gnu.org/software/sed/>.\n"
"General help using GNU software: <https://www.gnu.org/gethelp/>.\n"
msgstr ""
-#: sed/sed.c:120
+#: sed/sed.c:130
#, c-format
msgid "E-mail bug reports to: <%s>.\n"
msgstr ""
-#: sed/sed.c:129
-msgid ""
-" -R, --regexp-perl\n"
-" use Perl 5's regular expressions syntax in the script.\n"
-msgstr ""
-
-#: sed/sed.c:134
+#: sed/sed.c:138
#, c-format
msgid ""
"Usage: %s [OPTION]... {script-only-if-no-other-script} [input-file]...\n"
"\n"
msgstr ""
-#: sed/sed.c:138
+#: sed/sed.c:142
#, c-format
msgid ""
" -n, --quiet, --silent\n"
" suppress automatic printing of pattern space\n"
msgstr ""
-#: sed/sed.c:140
+#: sed/sed.c:144
+#, c-format
+msgid ""
+" --debug\n"
+" annotate program execution\n"
+msgstr ""
+
+#: sed/sed.c:146
#, c-format
msgid ""
" -e script, --expression=script\n"
" add the script to the commands to be executed\n"
msgstr ""
-#: sed/sed.c:142
+#: sed/sed.c:148
#, c-format
msgid ""
" -f script-file, --file=script-file\n"
@@ -632,21 +645,21 @@ msgid ""
"executed\n"
msgstr ""
-#: sed/sed.c:146
+#: sed/sed.c:152
#, c-format
msgid ""
" --follow-symlinks\n"
" follow symlinks when processing in place\n"
msgstr ""
-#: sed/sed.c:149
+#: sed/sed.c:155
#, c-format
msgid ""
" -i[SUFFIX], --in-place[=SUFFIX]\n"
" edit files in place (makes backup if SUFFIX supplied)\n"
msgstr ""
-#: sed/sed.c:153
+#: sed/sed.c:158
#, c-format
msgid ""
" -b, --binary\n"
@@ -654,21 +667,21 @@ msgid ""
"specially)\n"
msgstr ""
-#: sed/sed.c:157
+#: sed/sed.c:162
#, c-format
msgid ""
" -l N, --line-length=N\n"
" specify the desired line-wrap length for the `l' command\n"
msgstr ""
-#: sed/sed.c:159
+#: sed/sed.c:164
#, c-format
msgid ""
" --posix\n"
" disable all GNU extensions.\n"
msgstr ""
-#: sed/sed.c:161
+#: sed/sed.c:166
#, c-format
msgid ""
" -E, -r, --regexp-extended\n"
@@ -676,7 +689,7 @@ msgid ""
" (for portability use POSIX -E).\n"
msgstr ""
-#: sed/sed.c:167
+#: sed/sed.c:169
#, c-format
msgid ""
" -s, --separate\n"
@@ -684,14 +697,14 @@ msgid ""
" continuous long stream.\n"
msgstr ""
-#: sed/sed.c:170
+#: sed/sed.c:172
#, c-format
msgid ""
" --sandbox\n"
" operate in sandbox mode (disable e/r/w commands).\n"
msgstr ""
-#: sed/sed.c:172
+#: sed/sed.c:174
#, c-format
msgid ""
" -u, --unbuffered\n"
@@ -700,24 +713,24 @@ msgid ""
" the output buffers more often\n"
msgstr ""
-#: sed/sed.c:175
+#: sed/sed.c:177
#, c-format
msgid ""
" -z, --null-data\n"
" separate lines by NUL characters\n"
msgstr ""
-#: sed/sed.c:177
+#: sed/sed.c:179
#, c-format
msgid " --help display this help and exit\n"
msgstr ""
-#: sed/sed.c:178
+#: sed/sed.c:180
#, c-format
msgid " --version output version information and exit\n"
msgstr ""
-#: sed/sed.c:179
+#: sed/sed.c:181
#, c-format
msgid ""
"\n"
@@ -728,44 +741,57 @@ msgid ""
"\n"
msgstr ""
-#: sed/utils.c:73 sed/utils.c:384
+#: sed/sed.c:373
+msgid "failed to set binary mode on STDIN"
+msgstr ""
+
+#: sed/sed.c:375
+msgid "failed to set binary mode on STDOUT"
+msgstr ""
+
+#: sed/utils.c:77 sed/utils.c:395
#, fuzzy, c-format
msgid "cannot remove %s: %s"
msgstr "%s: %s () : %s\n"
-#: sed/utils.c:136
+#: sed/utils.c:146
#, fuzzy, c-format
msgid "couldn't open file %s: %s"
msgstr "%s ϴ"
-#: sed/utils.c:155
+#: sed/utils.c:165
#, fuzzy, c-format
msgid "couldn't attach to %s: %s"
msgstr "%s ׸(item) ϴ: %s"
#: sed/utils.c:192
+#, c-format
+msgid "failed to set binary mode on '%s'"
+msgstr ""
+
+#: sed/utils.c:207
#, fuzzy, c-format
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:204 sed/utils.c:223
+#: sed/utils.c:219 sed/utils.c:238
#, c-format
msgid "read error on %s: %s"
msgstr "%s б : %s"
-#: sed/utils.c:325
+#: sed/utils.c:336
#, fuzzy, c-format
msgid "couldn't follow symlink %s: %s"
msgstr "%s ׸(item) ϴ: %s"
-#: sed/utils.c:359
+#: sed/utils.c:370
#, fuzzy, c-format
msgid "cannot stat %s: %s"
msgstr "%s: %s () : %s\n"
-#: sed/utils.c:389
+#: sed/utils.c:400
#, fuzzy, c-format
msgid "cannot rename %s: %s"
msgstr "%s: %s () : %s\n"
diff --git a/po/nb.gmo b/po/nb.gmo
index b105607..f4afba5 100644
--- a/po/nb.gmo
+++ b/po/nb.gmo
Binary files differ
diff --git a/po/nb.po b/po/nb.po
index 4cecfc5..57e455a 100644
--- a/po/nb.po
+++ b/po/nb.po
@@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: sed 4.4.104\n"
"Report-Msgid-Bugs-To: bug-gnu-utils@gnu.org\n"
-"POT-Creation-Date: 2018-03-31 18:40-0700\n"
+"POT-Creation-Date: 2018-12-20 22:03-0800\n"
"PO-Revision-Date: 2018-03-26 15:16+0200\n"
"Last-Translator: Johnny A. Solbu <johnny@solbu.net>\n"
"Language-Team: Norwegian Bokmaal <i18n-nb@lister.ping.uio.no>\n"
@@ -29,39 +29,39 @@ msgstr "skrivefeil"
msgid "preserving permissions for %s"
msgstr "bevare tillatelser for %s"
-#: lib/dfa.c:958
+#: lib/dfa.c:970
msgid "unbalanced ["
msgstr "ubalansert ["
-#: lib/dfa.c:1079
+#: lib/dfa.c:1091
msgid "invalid character class"
msgstr "ugyldig tegnklassenavn"
-#: lib/dfa.c:1205
+#: lib/dfa.c:1217
msgid "character class syntax is [[:space:]], not [:space:]"
msgstr "tegnklassesyntaksen er [[:space:]], ikke [:space:]"
-#: lib/dfa.c:1272
+#: lib/dfa.c:1284
msgid "unfinished \\ escape"
msgstr "uferdig \\ escape"
-#: lib/dfa.c:1433
+#: lib/dfa.c:1445
msgid "invalid content of \\{\\}"
msgstr "ugyldig innhold av \\{\\}"
-#: lib/dfa.c:1436
+#: lib/dfa.c:1448
msgid "regular expression too big"
msgstr "regulært uttrykk for stort"
-#: lib/dfa.c:1850
+#: lib/dfa.c:1863
msgid "unbalanced ("
msgstr "ubalansert ("
-#: lib/dfa.c:1968
+#: lib/dfa.c:1981
msgid "no syntax specified"
msgstr "ingen syntax spesifisert"
-#: lib/dfa.c:1976
+#: lib/dfa.c:1992
msgid "unbalanced )"
msgstr "ubalansert )"
@@ -205,7 +205,7 @@ msgstr "Regulært uttrykk for stort"
msgid "Unmatched ) or \\)"
msgstr "Ubalansert ) eller \\)"
-#: lib/regcomp.c:689
+#: lib/regcomp.c:688
msgid "No previous regular expression"
msgstr "Intet foregående regulært uttrykk"
@@ -214,12 +214,12 @@ msgstr "Intet foregående regulært uttrykk"
msgid "setting permissions for %s"
msgstr "setter tillatelser for %s"
-#: lib/version-etc.c:74
+#: lib/version-etc.c:73
#, c-format
msgid "Packaged by %s (%s)\n"
msgstr "Pakket av %s (%s)\n"
-#: lib/version-etc.c:77
+#: lib/version-etc.c:76
#, c-format
msgid "Packaged by %s\n"
msgstr "Pakket av %s\n"
@@ -227,11 +227,11 @@ msgstr "Pakket av %s\n"
#. TRANSLATORS: Translate "(C)" to the copyright symbol
#. (C-in-a-circle), if this symbol is available in the user's
#. locale. Otherwise, do not translate "(C)"; leave it as-is.
-#: lib/version-etc.c:84
+#: lib/version-etc.c:83
msgid "(C)"
msgstr "©"
-#: lib/version-etc.c:86
+#: lib/version-etc.c:85
msgid ""
"\n"
"License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl."
@@ -436,168 +436,180 @@ msgstr "kommandoen mangler"
msgid "command only uses one address"
msgstr "kommandoen bruker bare én adresse"
-#: sed/compile.c:164
+#: sed/compile.c:165
msgid "unterminated address regex"
msgstr "uterminert regulært adresseuttryk"
-#: sed/compile.c:165
+#: sed/compile.c:166
msgid "unterminated `s' command"
msgstr "uterminert «s»-kommando "
-#: sed/compile.c:166
+#: sed/compile.c:167
msgid "unterminated `y' command"
msgstr "uterminert «y»-kommando "
-#: sed/compile.c:167
+#: sed/compile.c:168
msgid "unknown option to `s'"
msgstr "ukjent alternativ til «%s»"
-#: sed/compile.c:169
+#: sed/compile.c:170
msgid "multiple `p' options to `s' command"
msgstr "flere «p»-alternativer til «s»-kommando"
-#: sed/compile.c:171
+#: sed/compile.c:172
msgid "multiple `g' options to `s' command"
msgstr "flere «g»-alternativer til «s»-kommando"
-#: sed/compile.c:173
+#: sed/compile.c:174
msgid "multiple number options to `s' command"
msgstr "flere tallvalg til «s»-kommando"
-#: sed/compile.c:175
+#: sed/compile.c:176
msgid "number option to `s' command may not be zero"
msgstr "tallvalget til «s»-kommandoen kan ikke være null"
-#: sed/compile.c:177
+#: sed/compile.c:178
msgid "strings for `y' command are different lengths"
msgstr "strenger for «y»-kommandoen er ulike lengder"
-#: sed/compile.c:179
+#: sed/compile.c:180
msgid "delimiter character is not a single-byte character"
msgstr "skilletegn er ikke et enkeltbitstegn"
-#: sed/compile.c:181
+#: sed/compile.c:182
msgid "expected newer version of sed"
msgstr "forventet nyere versjon av sed"
-#: sed/compile.c:183
+#: sed/compile.c:184
msgid "invalid usage of line address 0"
msgstr "ugyldig bruk av linjeadresse 0"
-#: sed/compile.c:184
+#: sed/compile.c:185
#, c-format
msgid "unknown command: `%c'"
msgstr "ukjent kommando: «%c»"
-#: sed/compile.c:186
+#: sed/compile.c:187
msgid "incomplete command"
msgstr "ufullstendig kommando"
-#: sed/compile.c:188
+#: sed/compile.c:189
msgid "\":\" lacks a label"
msgstr "«:» mangler etikett"
-#: sed/compile.c:190
+#: sed/compile.c:191
msgid "recursive escaping after \\c not allowed"
msgstr "Rekursiv escape etter \\c ikke tillatt"
-#: sed/compile.c:213
+#: sed/compile.c:193
+msgid "e/r/w commands disabled in sandbox mode"
+msgstr ""
+
+#: sed/compile.c:215
#, c-format
msgid "%s: file %s line %lu: %s\n"
msgstr "%s: fil %s linje %lu: %s\n"
-#: sed/compile.c:216
+#: sed/compile.c:218
#, c-format
msgid "%s: -e expression #%lu, char %lu: %s\n"
msgstr "%s: -e uttrykk #%lu, tegn %lu: %s\n"
-#: sed/compile.c:1644
+#: sed/compile.c:1607
#, c-format
msgid "can't find label for jump to `%s'"
msgstr "kan ikke finne etiketten for hopp til «%s»"
-#: sed/execute.c:254 sed/execute.c:271
+#: sed/execute.c:253 sed/execute.c:270
#, c-format
msgid "case conversion produced an invalid character"
msgstr "konvertering av bokstavstørrelse ga et ugyldig tegn"
-#: sed/execute.c:565
+#: sed/execute.c:561
#, c-format
msgid "%s: can't read %s: %s\n"
msgstr "%s: kan ikke lese %s: %s\n"
-#: sed/execute.c:590
+#: sed/execute.c:587
#, c-format
msgid "couldn't edit %s: is a terminal"
msgstr "Kan ikke redigere %s: er en terminal"
-#: sed/execute.c:595
+#: sed/execute.c:592
#, c-format
msgid "couldn't edit %s: not a regular file"
msgstr "Kan ikke redigere %s: ikke en vanlig fil "
-#: sed/execute.c:606
+#: sed/execute.c:603
#, 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:614
+#: sed/execute.c:611
#, 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:633 sed/utils.c:178
+#: sed/execute.c:630 sed/utils.c:188
#, c-format
msgid "couldn't open temporary file %s: %s"
msgstr "Kunne ikke åpne midlertidig fil %s: %s"
-#: sed/execute.c:1148 sed/execute.c:1358
+#: sed/execute.c:1167 sed/execute.c:1366
msgid "error in subprocess"
msgstr "Feil i underprosessen"
-#: sed/execute.c:1150
+#: sed/execute.c:1169
msgid "option `e' not supported"
msgstr "«e»-valget støttes ikke"
-#: sed/execute.c:1339
+#: sed/execute.c:1347
msgid "`e' command not supported"
msgstr "«e»-kommandoen støttes ikke"
-#: sed/execute.c:1665
+#: sed/execute.c:1662
msgid "no input files"
msgstr "ingen inndatafiler"
-#: sed/regexp.c:39
+#: sed/regexp.c:40
msgid "no previous regular expression"
msgstr "Intet foregående regulært uttrykk"
-#: sed/regexp.c:141
+#: sed/regexp.c:125
#, c-format
msgid "invalid reference \\%d on `s' command's RHS"
msgstr "ugyldig referanse \\%d på «s»-kommandoens RHS"
-#: sed/regexp.c:259
+#: sed/regexp.c:196
msgid "regex input buffer length larger than INT_MAX"
msgstr "regex inngangsbufferlengde lengre enn INT_MAX"
-#: sed/sed.c:35
+#: sed/sed.c:36
msgid "Jay Fenlason"
msgstr "Jay Fenlason"
-#: sed/sed.c:36
+#: sed/sed.c:37
msgid "Tom Lord"
msgstr "Tom Lord"
-#: sed/sed.c:37
+#: sed/sed.c:38
msgid "Ken Pizzini"
msgstr "Ken Pizzini"
-#: sed/sed.c:38
+#: sed/sed.c:39
msgid "Paolo Bonzini"
msgstr "Paolo Bonzini"
-#: sed/sed.c:113
+#: sed/sed.c:40
+msgid "Jim Meyering"
+msgstr ""
+
+#: sed/sed.c:41
+msgid "Assaf Gordon"
+msgstr ""
+
+#: sed/sed.c:124
#, c-format
msgid ""
"GNU sed home page: <https://www.gnu.org/software/sed/>.\n"
@@ -606,20 +618,12 @@ msgstr ""
"GNU sed hjemmeside:. <https://www.gnu.org/software/sed/>\n"
"Generelt hjelp med GNU-programvare:. <https://www.gnu.org/gethelp/>.\n"
-#: sed/sed.c:120
+#: sed/sed.c:130
#, c-format
msgid "E-mail bug reports to: <%s>.\n"
msgstr "Send feilrapporter på e-post til: <%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"
-" Bruk Perl 5-syntaks for regulær uttrykk i skriptet.\n"
-
-#: sed/sed.c:134
+#: sed/sed.c:138
#, c-format
msgid ""
"Usage: %s [OPTION]... {script-only-if-no-other-script} [input-file]...\n"
@@ -628,7 +632,7 @@ msgstr ""
"Bruk: %s [VALG] ... {skript-bare-hvis-ingen-andre-skript} [inndatafil]...\n"
"\n"
-#: sed/sed.c:138
+#: sed/sed.c:142
#, c-format
msgid ""
" -n, --quiet, --silent\n"
@@ -637,7 +641,16 @@ msgstr ""
" -n, --quiet, --silent\n"
" undertrykk automatisk utskrift av mønsterplass\n"
-#: sed/sed.c:140
+#: sed/sed.c:144
+#, fuzzy, c-format
+msgid ""
+" --debug\n"
+" annotate program execution\n"
+msgstr ""
+" --posix\n"
+" deaktivere alle GNU-utvidelser.\n"
+
+#: sed/sed.c:146
#, c-format
msgid ""
" -e script, --expression=script\n"
@@ -646,7 +659,7 @@ msgstr ""
" -e script, --expression=script\n"
" legge skriptet til kommandoer som skal utføres\n"
-#: sed/sed.c:142
+#: sed/sed.c:148
#, c-format
msgid ""
" -f script-file, --file=script-file\n"
@@ -657,7 +670,7 @@ msgstr ""
" legge innholdet i skriptfil til kommandoer som skal "
"utføres\n"
-#: sed/sed.c:146
+#: sed/sed.c:152
#, c-format
msgid ""
" --follow-symlinks\n"
@@ -666,7 +679,7 @@ msgstr ""
" --follow-symlinks\n"
" Følg symbolske lenker ved prosessering «på stedet»\n"
-#: sed/sed.c:149
+#: sed/sed.c:155
#, c-format
msgid ""
" -i[SUFFIX], --in-place[=SUFFIX]\n"
@@ -675,7 +688,7 @@ msgstr ""
" -i[SUFFIKS], --in-place[=SUFFIKS]\n"
" rediger filer «på stedet» (tar backup hvis SUFFIKS oppgis)\n"
-#: sed/sed.c:153
+#: sed/sed.c:158
#, c-format
msgid ""
" -b, --binary\n"
@@ -685,7 +698,7 @@ msgstr ""
" -b, --binary\n"
" åpne filer i binært (CR+LFs prosesseres ikke spesielt)\n"
-#: sed/sed.c:157
+#: sed/sed.c:162
#, c-format
msgid ""
" -l N, --line-length=N\n"
@@ -694,7 +707,7 @@ msgstr ""
" -l N, --line-length=N\n"
" angi ønsket linjebrytingslengde for «l»-kommandoen\n"
-#: sed/sed.c:159
+#: sed/sed.c:164
#, c-format
msgid ""
" --posix\n"
@@ -703,7 +716,7 @@ msgstr ""
" --posix\n"
" deaktivere alle GNU-utvidelser.\n"
-#: sed/sed.c:161
+#: sed/sed.c:166
#, c-format
msgid ""
" -E, -r, --regexp-extended\n"
@@ -714,7 +727,7 @@ msgstr ""
" bruk utvidede regulære uttrykk i skriptet.\n"
" (for portabilitet bruk POSIX -E).\n"
-#: sed/sed.c:167
+#: sed/sed.c:169
#, c-format
msgid ""
" -s, --separate\n"
@@ -725,7 +738,7 @@ msgstr ""
" vurder filer som separate i stedet for en enkelt\n"
" sammenhengende lang strøm.\n"
-#: sed/sed.c:170
+#: sed/sed.c:172
#, c-format
msgid ""
" --sandbox\n"
@@ -734,7 +747,7 @@ msgstr ""
" --sandbox\n"
" operere I sandkassemodus (deaktiver e/r/w-kommandoer).\n"
-#: sed/sed.c:172
+#: sed/sed.c:174
#, c-format
msgid ""
" -u, --unbuffered\n"
@@ -746,7 +759,7 @@ msgstr ""
" last minimale mengder data fra inndatafiler og skyll\n"
" utdatabufferne oftere\n"
-#: sed/sed.c:175
+#: sed/sed.c:177
#, c-format
msgid ""
" -z, --null-data\n"
@@ -755,17 +768,17 @@ msgstr ""
" -z, --null-data\n"
" skille linjer ved NULL-tegn\n"
-#: sed/sed.c:177
+#: sed/sed.c:179
#, c-format
msgid " --help display this help and exit\n"
msgstr " --help vis denne hjelpteksten og avslutt\n"
-#: sed/sed.c:178
+#: sed/sed.c:180
#, c-format
msgid " --version output version information and exit\n"
msgstr " --version vis programversjon og avslutt\n"
-#: sed/sed.c:179
+#: sed/sed.c:181
#, c-format
msgid ""
"\n"
@@ -782,48 +795,68 @@ msgstr ""
"inndatafiler angis leses standard inndata.\n"
"\n"
-#: sed/utils.c:73 sed/utils.c:384
+#: sed/sed.c:373
+msgid "failed to set binary mode on STDIN"
+msgstr ""
+
+#: sed/sed.c:375
+msgid "failed to set binary mode on STDOUT"
+msgstr ""
+
+#: sed/utils.c:77 sed/utils.c:395
#, c-format
msgid "cannot remove %s: %s"
msgstr "kan ikke fjerne %s: %s "
-#: sed/utils.c:136
+#: sed/utils.c:146
#, c-format
msgid "couldn't open file %s: %s"
msgstr "Kunne ikke åpne filen %s: %s"
-#: sed/utils.c:155
+#: sed/utils.c:165
#, c-format
msgid "couldn't attach to %s: %s"
msgstr "kunne ikke koble til %s: %s"
#: sed/utils.c:192
#, c-format
+msgid "failed to set binary mode on '%s'"
+msgstr ""
+
+#: sed/utils.c:207
+#, 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 %llu element til %s: %s"
msgstr[1] "Klarte ikke å skrive %llu elementer til %s: %s"
-#: sed/utils.c:204 sed/utils.c:223
+#: sed/utils.c:219 sed/utils.c:238
#, c-format
msgid "read error on %s: %s"
msgstr "lesefeil på fil %s: %s"
-#: sed/utils.c:325
+#: sed/utils.c:336
#, c-format
msgid "couldn't follow symlink %s: %s"
msgstr "kunne ikke følge symbolsk lenke %s: %s"
-#: sed/utils.c:359
+#: sed/utils.c:370
#, c-format
msgid "cannot stat %s: %s"
msgstr "kan ikke lese status på %s: %s"
-#: sed/utils.c:389
+#: sed/utils.c:400
#, c-format
msgid "cannot rename %s: %s"
msgstr "Kan ikke omdøpe %s: %s"
+#~ msgid ""
+#~ " -R, --regexp-perl\n"
+#~ " use Perl 5's regular expressions syntax in the script.\n"
+#~ msgstr ""
+#~ " -R, --regexp-perl\n"
+#~ " Bruk Perl 5-syntaks for regulær uttrykk i skriptet.\n"
+
#~ msgid "%s: option '--%s' doesn't allow an argument\n"
#~ msgstr "%s: valget «--%s» tillater ikke argumenter\n"
diff --git a/po/nl.gmo b/po/nl.gmo
index 0fc543b..302d5d1 100644
--- a/po/nl.gmo
+++ b/po/nl.gmo
Binary files differ
diff --git a/po/nl.po b/po/nl.po
index 78f0252..bce335a 100644
--- a/po/nl.po
+++ b/po/nl.po
@@ -8,10 +8,10 @@
# Benno Schulenberg <benno@vertaalt.nl>, 2005, 2006, 2007, 2008, 2010, 2016, 2018.
msgid ""
msgstr ""
-"Project-Id-Version: sed-4.4.104\n"
+"Project-Id-Version: sed-4.5.48\n"
"Report-Msgid-Bugs-To: bug-gnu-utils@gnu.org\n"
-"POT-Creation-Date: 2018-03-31 18:40-0700\n"
-"PO-Revision-Date: 2018-03-25 15:22+0200\n"
+"POT-Creation-Date: 2018-12-20 22:03-0800\n"
+"PO-Revision-Date: 2018-12-19 10:08+0100\n"
"Last-Translator: Benno Schulenberg <vertaling@coevern.nl>\n"
"Language-Team: Dutch <vertaling@vrijschrift.org>\n"
"Language: nl\n"
@@ -20,7 +20,6 @@ msgstr ""
"Content-Transfer-Encoding: 8bit\n"
"X-Bugs: Report translation errors to the Language-Team address.\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
-"X-Generator: Poedit 2.0.4\n"
#: lib/closeout.c:122
msgid "write error"
@@ -31,39 +30,39 @@ msgstr "schrijffout"
msgid "preserving permissions for %s"
msgstr "behouden van toegangsrechten van %s"
-#: lib/dfa.c:958
+#: lib/dfa.c:970
msgid "unbalanced ["
msgstr "ongepaarde ["
-#: lib/dfa.c:1079
+#: lib/dfa.c:1091
msgid "invalid character class"
msgstr "ongeldige tekenklasse"
-#: lib/dfa.c:1205
+#: lib/dfa.c:1217
msgid "character class syntax is [[:space:]], not [:space:]"
msgstr "syntax van tekenklasse is [[:space:]], niet [:space:]"
-#: lib/dfa.c:1272
+#: lib/dfa.c:1284
msgid "unfinished \\ escape"
msgstr "onafgemaakte \\-stuurcode"
-#: lib/dfa.c:1433
+#: lib/dfa.c:1445
msgid "invalid content of \\{\\}"
msgstr "ongeldige inhoud van \\{\\}"
-#: lib/dfa.c:1436
+#: lib/dfa.c:1448
msgid "regular expression too big"
msgstr "reguliere expressie is te groot"
-#: lib/dfa.c:1850
+#: lib/dfa.c:1863
msgid "unbalanced ("
msgstr "ongepaarde ("
-#: lib/dfa.c:1968
+#: lib/dfa.c:1981
msgid "no syntax specified"
msgstr "geen syntax opgegeven"
-#: lib/dfa.c:1976
+#: lib/dfa.c:1992
msgid "unbalanced )"
msgstr "ongepaarde )"
@@ -207,7 +206,7 @@ msgstr "Reguliere expressie is te groot"
msgid "Unmatched ) or \\)"
msgstr "Ongepaarde ) of \\)"
-#: lib/regcomp.c:689
+#: lib/regcomp.c:688
msgid "No previous regular expression"
msgstr "Geen eerdere reguliere expressie"
@@ -216,12 +215,12 @@ msgstr "Geen eerdere reguliere expressie"
msgid "setting permissions for %s"
msgstr "instellen van toegangsrechten van %s"
-#: lib/version-etc.c:74
+#: lib/version-etc.c:73
#, c-format
msgid "Packaged by %s (%s)\n"
msgstr "In pakketvorm gebracht door %s (%s)\n"
-#: lib/version-etc.c:77
+#: lib/version-etc.c:76
#, c-format
msgid "Packaged by %s\n"
msgstr "In pakketvorm gebracht door %s\n"
@@ -229,11 +228,11 @@ 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
+#: lib/version-etc.c:83
msgid "(C)"
msgstr "©"
-#: lib/version-etc.c:86
+#: lib/version-etc.c:85
msgid ""
"\n"
"License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl."
@@ -442,169 +441,181 @@ msgstr "ontbrekende opdracht"
msgid "command only uses one address"
msgstr "opdracht accepteert slechts één adres"
-#: sed/compile.c:164
+#: sed/compile.c:165
msgid "unterminated address regex"
msgstr "onafgemaakte reguliere expressie voor adres"
-#: sed/compile.c:165
+#: sed/compile.c:166
msgid "unterminated `s' command"
msgstr "onafgemaakte 's'-opdracht"
-#: sed/compile.c:166
+#: sed/compile.c:167
msgid "unterminated `y' command"
msgstr "onafgemaakte 'y'-opdracht"
-#: sed/compile.c:167
+#: sed/compile.c:168
msgid "unknown option to `s'"
msgstr "onbekende optie bij 's'-opdracht"
-#: sed/compile.c:169
+#: sed/compile.c:170
msgid "multiple `p' options to `s' command"
msgstr "meerdere 'p'-opties bij 's'-opdracht"
-#: sed/compile.c:171
+#: sed/compile.c:172
msgid "multiple `g' options to `s' command"
msgstr "meerdere 'g'-opties bij 's'-opdracht"
-#: sed/compile.c:173
+#: sed/compile.c:174
msgid "multiple number options to `s' command"
msgstr "meerdere getalopties bij 's'-opdracht"
-#: sed/compile.c:175
+#: sed/compile.c:176
msgid "number option to `s' command may not be zero"
msgstr "getaloptie bij 's'-opdracht mag niet nul zijn"
-#: sed/compile.c:177
+#: sed/compile.c:178
msgid "strings for `y' command are different lengths"
msgstr "tekenreeksen bij 'y'-opdracht zijn van verschillende lengte"
-#: sed/compile.c:179
+#: sed/compile.c:180
msgid "delimiter character is not a single-byte character"
msgstr "scheidingsteken is niet één enkele byte"
-#: sed/compile.c:181
+#: sed/compile.c:182
msgid "expected newer version of sed"
msgstr "een nieuwere versie van 'sed' werd verwacht"
-#: sed/compile.c:183
+#: sed/compile.c:184
msgid "invalid usage of line address 0"
msgstr "ongeldig gebruik van regeladres 0"
-#: sed/compile.c:184
+#: sed/compile.c:185
#, c-format
msgid "unknown command: `%c'"
msgstr "onbekende opdracht: '%c'"
-#: sed/compile.c:186
+#: sed/compile.c:187
msgid "incomplete command"
msgstr "onvolledige opdracht"
-#: sed/compile.c:188
+#: sed/compile.c:189
msgid "\":\" lacks a label"
msgstr "\":\" mist een label"
-#: sed/compile.c:190
+#: sed/compile.c:191
msgid "recursive escaping after \\c not allowed"
msgstr "recursief escapen is niet toegestaan na \\c"
-#: sed/compile.c:213
+#: sed/compile.c:193
+msgid "e/r/w commands disabled in sandbox mode"
+msgstr "de e/r/w-commando's zijn uitgeschakeld in sandbox-modus"
+
+#: sed/compile.c:215
#, c-format
msgid "%s: file %s line %lu: %s\n"
msgstr "%s: bestand %s, regel %lu: %s\n"
-#: sed/compile.c:216
+#: sed/compile.c:218
#, c-format
msgid "%s: -e expression #%lu, char %lu: %s\n"
msgstr "%s: expressie #%lu, teken %lu: %s\n"
-#: sed/compile.c:1644
+#: sed/compile.c:1607
#, c-format
msgid "can't find label for jump to `%s'"
msgstr "kan label voor sprong naar '%s' niet vinden"
-#: sed/execute.c:254 sed/execute.c:271
+#: sed/execute.c:253 sed/execute.c:270
#, c-format
msgid "case conversion produced an invalid character"
msgstr "kastomzetting produceerde een ongeldig teken"
-#: sed/execute.c:565
+#: sed/execute.c:561
#, c-format
msgid "%s: can't read %s: %s\n"
msgstr "%s: kan %s niet lezen: %s\n"
-#: sed/execute.c:590
+#: sed/execute.c:587
#, c-format
msgid "couldn't edit %s: is a terminal"
msgstr "kan %s niet bewerken: is een terminal"
-#: sed/execute.c:595
+#: sed/execute.c:592
#, c-format
msgid "couldn't edit %s: not a regular file"
msgstr "kan %s niet bewerken: is geen gewoon bestand"
-#: sed/execute.c:606
+#: sed/execute.c:603
#, 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:614
+#: sed/execute.c:611
#, 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:633 sed/utils.c:178
+#: sed/execute.c:630 sed/utils.c:188
#, c-format
msgid "couldn't open temporary file %s: %s"
msgstr "kan tijdelijk bestand %s niet openen: %s"
-#: sed/execute.c:1148 sed/execute.c:1358
+#: sed/execute.c:1167 sed/execute.c:1366
msgid "error in subprocess"
msgstr "fout in subproces"
-#: sed/execute.c:1150
+#: sed/execute.c:1169
msgid "option `e' not supported"
msgstr "'e'-opdracht is niet mogelijk"
-#: sed/execute.c:1339
+#: sed/execute.c:1347
msgid "`e' command not supported"
msgstr "'e'-opdracht is niet mogelijk"
-#: sed/execute.c:1665
+#: sed/execute.c:1662
msgid "no input files"
msgstr "geen invoerbestanden"
-#: sed/regexp.c:39
+#: sed/regexp.c:40
msgid "no previous regular expression"
msgstr "geen eerdere reguliere expressie"
-#: sed/regexp.c:141
+#: sed/regexp.c:125
#, c-format
msgid "invalid reference \\%d on `s' command's RHS"
msgstr "ongeldige verwijzing \\%d rechts van 's'-opdracht"
-#: sed/regexp.c:259
+#: sed/regexp.c:196
msgid "regex input buffer length larger than INT_MAX"
msgstr "lengte van regex-invoerbuffer is groter dan INT_MAX"
-#: sed/sed.c:35
+#: sed/sed.c:36
msgid "Jay Fenlason"
msgstr "Jay Fenlason"
-#: sed/sed.c:36
+#: sed/sed.c:37
msgid "Tom Lord"
msgstr "Tom Lord"
-#: sed/sed.c:37
+#: sed/sed.c:38
msgid "Ken Pizzini"
msgstr "Ken Pizzini"
-#: sed/sed.c:38
+#: sed/sed.c:39
msgid "Paolo Bonzini"
msgstr "Paolo Bonzini"
-#: sed/sed.c:113
+#: sed/sed.c:40
+msgid "Jim Meyering"
+msgstr "Jim Meyering"
+
+#: sed/sed.c:41
+msgid "Assaf Gordon"
+msgstr "Assaf Gordon"
+
+#: sed/sed.c:124
#, c-format
msgid ""
"GNU sed home page: <https://www.gnu.org/software/sed/>.\n"
@@ -613,22 +624,14 @@ msgstr ""
"Webpagina van GNU sed: <https://www.gnu.org/software/sed/>.\n"
"Algemene hulp bij gebruik van GNU-software: <https://www.gnu.org/gethelp/>.\n"
-#: sed/sed.c:120
+#: sed/sed.c:130
#, c-format
msgid "E-mail bug reports to: <%s>.\n"
msgstr ""
"Rapporteer gebreken in het programma aan: <%s>;\n"
"meld fouten in de vertaling aan: <vertaling@vrijschriftorg>.\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"
-" reguliere expressies van Perl-5 gebruiken in het script\n"
-
-#: sed/sed.c:134
+#: sed/sed.c:138
#, c-format
msgid ""
"Usage: %s [OPTION]... {script-only-if-no-other-script} [input-file]...\n"
@@ -637,7 +640,7 @@ msgstr ""
"Gebruik: %s [OPTIE]... {SCRIPT_als_verder_geen_script} [INVOERBESTAND]...\n"
"\n"
-#: sed/sed.c:138
+#: sed/sed.c:142
#, c-format
msgid ""
" -n, --quiet, --silent\n"
@@ -646,7 +649,16 @@ msgstr ""
" -n, --quiet, --silent\n"
" automatische weergave van patroonruimte onderdrukken\n"
-#: sed/sed.c:140
+#: sed/sed.c:144
+#, c-format
+msgid ""
+" --debug\n"
+" annotate program execution\n"
+msgstr ""
+" --debug\n"
+" de uitvoering van het programma annoteren\n"
+
+#: sed/sed.c:146
#, c-format
msgid ""
" -e script, --expression=script\n"
@@ -655,7 +667,7 @@ msgstr ""
" -e SCRIPT, --expression=SCRIPT\n"
" dit SCRIPT toevoegen aan de uit te voeren opdrachten\n"
-#: sed/sed.c:142
+#: sed/sed.c:148
#, c-format
msgid ""
" -f script-file, --file=script-file\n"
@@ -666,7 +678,7 @@ msgstr ""
" inhoud van SCRIPTBESTAND toevoegen aan de uit te voeren "
"opdrachten\n"
-#: sed/sed.c:146
+#: sed/sed.c:152
#, c-format
msgid ""
" --follow-symlinks\n"
@@ -675,7 +687,7 @@ msgstr ""
" --follow-symlinks\n"
" symbolische koppelingen volgen (bij bewerking ter plekke)\n"
-#: sed/sed.c:149
+#: sed/sed.c:155
#, c-format
msgid ""
" -i[SUFFIX], --in-place[=SUFFIX]\n"
@@ -685,7 +697,7 @@ msgstr ""
" bestanden ter plekke bewerken\n"
" (en een reservekopie maken als een ACHTERVOEGSEL gegeven is)\n"
-#: sed/sed.c:153
+#: sed/sed.c:158
#, c-format
msgid ""
" -b, --binary\n"
@@ -696,7 +708,7 @@ msgstr ""
" bestanden openen in binaire modus (regeleinden zijn niet "
"speciaal)\n"
-#: sed/sed.c:157
+#: sed/sed.c:162
#, c-format
msgid ""
" -l N, --line-length=N\n"
@@ -705,7 +717,7 @@ msgstr ""
" -l AANTAL, --line-length=AANTAL\n"
" de gewenste regelafbreeklengte voor de 'l'-opdracht\n"
-#: sed/sed.c:159
+#: sed/sed.c:164
#, c-format
msgid ""
" --posix\n"
@@ -714,7 +726,7 @@ msgstr ""
" --posix\n"
" alle GNU-uitbreidingen uitschakelen\n"
-#: sed/sed.c:161
+#: sed/sed.c:166
#, c-format
msgid ""
" -E, -r, --regexp-extended\n"
@@ -725,7 +737,7 @@ msgstr ""
" uitgebreide reguliere expressies gebruiken in het script\n"
" (gebruik voor portabiliteit de POSIX-optie '-E')\n"
-#: sed/sed.c:167
+#: sed/sed.c:169
#, c-format
msgid ""
" -s, --separate\n"
@@ -735,7 +747,7 @@ msgstr ""
" -s, --separate\n"
" bestanden als losstaand beschouwen, niet als één enkele stroom\n"
-#: sed/sed.c:170
+#: sed/sed.c:172
#, c-format
msgid ""
" --sandbox\n"
@@ -744,7 +756,7 @@ msgstr ""
" --sandbox\n"
" in sandbox-modus opereren (de e/r/w-commando's uitschakelen)\n"
-#: sed/sed.c:172
+#: sed/sed.c:174
#, c-format
msgid ""
" -u, --unbuffered\n"
@@ -756,7 +768,7 @@ msgstr ""
" minimale hoeveelheden gegevens laden uit de invoerbestanden,\n"
" en de uitvoerbuffers vaker leegmaken\n"
-#: sed/sed.c:175
+#: sed/sed.c:177
#, c-format
msgid ""
" -z, --null-data\n"
@@ -766,17 +778,17 @@ msgstr ""
" regels scheiden met NUL-tekens\n"
"\n"
-#: sed/sed.c:177
+#: sed/sed.c:179
#, c-format
msgid " --help display this help and exit\n"
msgstr " --help deze hulptekst tonen en stoppen\n"
-#: sed/sed.c:178
+#: sed/sed.c:180
#, c-format
msgid " --version output version information and exit\n"
msgstr " --version programmaversie tonen en stoppen\n"
-#: sed/sed.c:179
+#: sed/sed.c:181
#, c-format
msgid ""
"\n"
@@ -793,48 +805,68 @@ msgstr ""
"invoerbestanden gegeven zijn, wordt standaardinvoer gelezen.\n"
"\n"
-#: sed/utils.c:73 sed/utils.c:384
+#: sed/sed.c:373
+msgid "failed to set binary mode on STDIN"
+msgstr "kan standaardinvoer niet in binaire modus zetten"
+
+#: sed/sed.c:375
+msgid "failed to set binary mode on STDOUT"
+msgstr "kan standaarduitvoer niet in binaire modus zetten"
+
+#: sed/utils.c:77 sed/utils.c:395
#, c-format
msgid "cannot remove %s: %s"
msgstr "kan %s niet verwijderen: %s"
-#: sed/utils.c:136
+#: sed/utils.c:146
#, c-format
msgid "couldn't open file %s: %s"
msgstr "kan bestand %s niet openen: %s"
-#: sed/utils.c:155
+#: sed/utils.c:165
#, c-format
msgid "couldn't attach to %s: %s"
msgstr "kan niet aan %s aanhechten: %s"
#: sed/utils.c:192
#, c-format
+msgid "failed to set binary mode on '%s'"
+msgstr "kan '%s' niet in binaire modus zetten"
+
+#: sed/utils.c:207
+#, c-format
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:204 sed/utils.c:223
+#: sed/utils.c:219 sed/utils.c:238
#, c-format
msgid "read error on %s: %s"
msgstr "leesfout op %s: %s"
-#: sed/utils.c:325
+#: sed/utils.c:336
#, c-format
msgid "couldn't follow symlink %s: %s"
msgstr "kan symbolische koppeling %s niet volgen: %s"
-#: sed/utils.c:359
+#: sed/utils.c:370
#, c-format
msgid "cannot stat %s: %s"
msgstr "kan de status van %s niet opvragen: %s"
-#: sed/utils.c:389
+#: sed/utils.c:400
#, c-format
msgid "cannot rename %s: %s"
msgstr "kan %s niet hernoemen: %s"
+#~ msgid ""
+#~ " -R, --regexp-perl\n"
+#~ " use Perl 5's regular expressions syntax in the script.\n"
+#~ msgstr ""
+#~ " -R, --regexp-perl\n"
+#~ " reguliere expressies van Perl-5 gebruiken in het script\n"
+
#~ msgid "%s: option '--%s' doesn't allow an argument\n"
#~ msgstr "%s: optie '--%s' staat geen argument toe\n"
diff --git a/po/pl.gmo b/po/pl.gmo
index a094d0a..1891c11 100644
--- a/po/pl.gmo
+++ b/po/pl.gmo
Binary files differ
diff --git a/po/pl.po b/po/pl.po
index fd3eab9..6a3f1ab 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: 2018-03-31 18:40-0700\n"
+"POT-Creation-Date: 2018-12-20 22:03-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"
@@ -30,42 +30,42 @@ msgstr ""
msgid "preserving permissions for %s"
msgstr ""
-#: lib/dfa.c:958
+#: lib/dfa.c:970
msgid "unbalanced ["
msgstr ""
-#: lib/dfa.c:1079
+#: lib/dfa.c:1091
#, fuzzy
msgid "invalid character class"
msgstr "Nieprawidłowa nazwa klasy znaku"
-#: lib/dfa.c:1205
+#: lib/dfa.c:1217
msgid "character class syntax is [[:space:]], not [:space:]"
msgstr ""
-#: lib/dfa.c:1272
+#: lib/dfa.c:1284
msgid "unfinished \\ escape"
msgstr ""
-#: lib/dfa.c:1433
+#: lib/dfa.c:1445
#, fuzzy
msgid "invalid content of \\{\\}"
msgstr "Nieprawidłowa zawartość \\{\\}"
-#: lib/dfa.c:1436
+#: lib/dfa.c:1448
#, fuzzy
msgid "regular expression too big"
msgstr "Wyrażenie regularne jest zbyt duże"
-#: lib/dfa.c:1850
+#: lib/dfa.c:1863
msgid "unbalanced ("
msgstr ""
-#: lib/dfa.c:1968
+#: lib/dfa.c:1981
msgid "no syntax specified"
msgstr ""
-#: lib/dfa.c:1976
+#: lib/dfa.c:1992
msgid "unbalanced )"
msgstr ""
@@ -211,7 +211,7 @@ msgstr "Wyrażenie regularne jest zbyt duże"
msgid "Unmatched ) or \\)"
msgstr "Niedopasowany znak ) lub \\)"
-#: lib/regcomp.c:689
+#: lib/regcomp.c:688
msgid "No previous regular expression"
msgstr "Brak poprzedniego wyrażenia regularnego"
@@ -220,12 +220,12 @@ msgstr "Brak poprzedniego wyrażenia regularnego"
msgid "setting permissions for %s"
msgstr ""
-#: lib/version-etc.c:74
+#: lib/version-etc.c:73
#, c-format
msgid "Packaged by %s (%s)\n"
msgstr ""
-#: lib/version-etc.c:77
+#: lib/version-etc.c:76
#, c-format
msgid "Packaged by %s\n"
msgstr ""
@@ -233,11 +233,11 @@ 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
+#: lib/version-etc.c:83
msgid "(C)"
msgstr ""
-#: lib/version-etc.c:86
+#: lib/version-etc.c:85
msgid ""
"\n"
"License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl."
@@ -419,171 +419,183 @@ msgstr "brakuje polecenia"
msgid "command only uses one address"
msgstr "polecenie używa tylko jednego adresu"
-#: sed/compile.c:164
+#: sed/compile.c:165
msgid "unterminated address regex"
msgstr "niezakończony adres wyrażenia regularnego"
-#: sed/compile.c:165
+#: sed/compile.c:166
msgid "unterminated `s' command"
msgstr "niezakończone polecenie `s'"
-#: sed/compile.c:166
+#: sed/compile.c:167
msgid "unterminated `y' command"
msgstr "niezakończone polecenie `y'"
-#: sed/compile.c:167
+#: sed/compile.c:168
msgid "unknown option to `s'"
msgstr "nieznana opcja dla polecenia `s'"
-#: sed/compile.c:169
+#: sed/compile.c:170
msgid "multiple `p' options to `s' command"
msgstr "wielokrotne opcje `p' dla polecenia `s'"
-#: sed/compile.c:171
+#: sed/compile.c:172
msgid "multiple `g' options to `s' command"
msgstr "wielokrotne opcje `g' dla polecenia `s'"
-#: sed/compile.c:173
+#: sed/compile.c:174
msgid "multiple number options to `s' command"
msgstr "wielokrotne opcje liczbowe dla polecenia `s'"
-#: sed/compile.c:175
+#: sed/compile.c:176
msgid "number option to `s' command may not be zero"
msgstr "opcja liczbowa dla polecenia `s' nie może być zerem"
-#: sed/compile.c:177
+#: sed/compile.c:178
msgid "strings for `y' command are different lengths"
msgstr "łańcuchy dla polecenia `y' są różnych długości"
-#: sed/compile.c:179
+#: sed/compile.c:180
msgid "delimiter character is not a single-byte character"
msgstr "znak ogranicznika nie jest pojedynczym znakiem-bajtem"
-#: sed/compile.c:181
+#: sed/compile.c:182
msgid "expected newer version of sed"
msgstr "oczekiwano nowszej wersji programu sed"
-#: sed/compile.c:183
+#: sed/compile.c:184
msgid "invalid usage of line address 0"
msgstr "nieprawidłowe użycie adresu linii 0"
-#: sed/compile.c:184
+#: sed/compile.c:185
#, c-format
msgid "unknown command: `%c'"
msgstr "nieznane polecenie: `%c'"
-#: sed/compile.c:186
+#: sed/compile.c:187
#, fuzzy
msgid "incomplete command"
msgstr "brakuje polecenia"
-#: sed/compile.c:188
+#: sed/compile.c:189
msgid "\":\" lacks a label"
msgstr ""
-#: sed/compile.c:190
+#: sed/compile.c:191
msgid "recursive escaping after \\c not allowed"
msgstr ""
-#: sed/compile.c:213
+#: sed/compile.c:193
+msgid "e/r/w commands disabled in sandbox mode"
+msgstr ""
+
+#: sed/compile.c:215
#, c-format
msgid "%s: file %s line %lu: %s\n"
msgstr "%s: plik %s linia %lu: %s\n"
-#: sed/compile.c:216
+#: sed/compile.c:218
#, c-format
msgid "%s: -e expression #%lu, char %lu: %s\n"
msgstr "%s: -e wyrażenie #%lu, znak %lu: %s\n"
-#: sed/compile.c:1644
+#: sed/compile.c:1607
#, c-format
msgid "can't find label for jump to `%s'"
msgstr "nie można znaleźć etykiety dla skoku do `%s'"
-#: sed/execute.c:254 sed/execute.c:271
+#: sed/execute.c:253 sed/execute.c:270
#, c-format
msgid "case conversion produced an invalid character"
msgstr ""
-#: sed/execute.c:565
+#: sed/execute.c:561
#, c-format
msgid "%s: can't read %s: %s\n"
msgstr "%s: nie można odczytać %s: %s\n"
-#: sed/execute.c:590
+#: sed/execute.c:587
#, c-format
msgid "couldn't edit %s: is a terminal"
msgstr "nie można edytować %s: plik jest terminalem"
-#: sed/execute.c:595
+#: sed/execute.c:592
#, 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:606
+#: sed/execute.c:603
#, 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:614
+#: sed/execute.c:611
#, 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:633 sed/utils.c:178
+#: sed/execute.c:630 sed/utils.c:188
#, c-format
msgid "couldn't open temporary file %s: %s"
msgstr "nie można otworzyć tymczasowego pliku %s: %s"
-#: sed/execute.c:1148 sed/execute.c:1358
+#: sed/execute.c:1167 sed/execute.c:1366
msgid "error in subprocess"
msgstr "błąd w podprocesie"
-#: sed/execute.c:1150
+#: sed/execute.c:1169
msgid "option `e' not supported"
msgstr "opcja `e' nie jest wspierana"
-#: sed/execute.c:1339
+#: sed/execute.c:1347
msgid "`e' command not supported"
msgstr "polecenie `e' nie jest wspierane"
-#: sed/execute.c:1665
+#: sed/execute.c:1662
msgid "no input files"
msgstr "brak plików wejściowych"
-#: sed/regexp.c:39
+#: sed/regexp.c:40
msgid "no previous regular expression"
msgstr "brak poprzedniego wyrażenia regularnego"
-#: sed/regexp.c:141
+#: sed/regexp.c:125
#, c-format
msgid "invalid reference \\%d on `s' command's RHS"
msgstr "nieprawidłowe odwołanie \\%d po prawej stronie polecenia `s'"
-#: sed/regexp.c:259
+#: sed/regexp.c:196
msgid "regex input buffer length larger than INT_MAX"
msgstr ""
-#: sed/sed.c:35
+#: sed/sed.c:36
msgid "Jay Fenlason"
msgstr ""
-#: sed/sed.c:36
+#: sed/sed.c:37
msgid "Tom Lord"
msgstr ""
-#: sed/sed.c:37
+#: sed/sed.c:38
msgid "Ken Pizzini"
msgstr ""
-#: sed/sed.c:38
+#: sed/sed.c:39
msgid "Paolo Bonzini"
msgstr ""
-#: sed/sed.c:113
+#: sed/sed.c:40
+msgid "Jim Meyering"
+msgstr ""
+
+#: sed/sed.c:41
+msgid "Assaf Gordon"
+msgstr ""
+
+#: sed/sed.c:124
#, fuzzy, c-format
msgid ""
"GNU sed home page: <https://www.gnu.org/software/sed/>.\n"
@@ -592,21 +604,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:120
+#: sed/sed.c:130
#, c-format
msgid "E-mail bug reports to: <%s>.\n"
msgstr ""
-#: 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"
-" używa w skrypcie wyrażenia regularne zgodne ze składnią "
-"Perl 5.\n"
-
-#: sed/sed.c:134
+#: sed/sed.c:138
#, c-format
msgid ""
"Usage: %s [OPTION]... {script-only-if-no-other-script} [input-file]...\n"
@@ -616,7 +619,7 @@ msgstr ""
"wejściowy]...\n"
"\n"
-#: sed/sed.c:138
+#: sed/sed.c:142
#, c-format
msgid ""
" -n, --quiet, --silent\n"
@@ -625,7 +628,16 @@ msgstr ""
" -n, --quiet, --silent\n"
" powstrzymuje automatyczne drukowanie przetwarzanych linii.\n"
-#: sed/sed.c:140
+#: sed/sed.c:144
+#, fuzzy, c-format
+msgid ""
+" --debug\n"
+" annotate program execution\n"
+msgstr ""
+" --posix\n"
+" wyłącza wszystkie rozszerzenia GNU.\n"
+
+#: sed/sed.c:146
#, c-format
msgid ""
" -e script, --expression=script\n"
@@ -634,7 +646,7 @@ msgstr ""
" -e skrypt, --expression=skrypt\n"
" dodaje skrypt do poleceń, które mają być wykonane.\n"
-#: sed/sed.c:142
+#: sed/sed.c:148
#, c-format
msgid ""
" -f script-file, --file=script-file\n"
@@ -645,7 +657,7 @@ msgstr ""
" dodaje zawartość pliku skryptowego do poleceń,\n"
" które mają być wykonane.\n"
-#: sed/sed.c:146
+#: sed/sed.c:152
#, c-format
msgid ""
" --follow-symlinks\n"
@@ -655,7 +667,7 @@ msgstr ""
" podąża za dowiązaniami symbolicznymi,\n"
" gdy przetwarza \"w miejscu\".\n"
-#: sed/sed.c:149
+#: sed/sed.c:155
#, fuzzy, c-format
msgid ""
" -i[SUFFIX], --in-place[=SUFFIX]\n"
@@ -665,7 +677,7 @@ msgstr ""
" edytuje pliki \"w miejscu\" (tworzy kopie zapasowe\n"
" jeżeli zostało podane rozszerzenie).\n"
-#: sed/sed.c:153
+#: sed/sed.c:158
#, c-format
msgid ""
" -b, --binary\n"
@@ -676,7 +688,7 @@ msgstr ""
" otwiera pliki w trybie binarnym (CR+LF nie jest "
"przetwarzane).\n"
-#: sed/sed.c:157
+#: sed/sed.c:162
#, c-format
msgid ""
" -l N, --line-length=N\n"
@@ -685,7 +697,7 @@ msgstr ""
" -l N, --line-length=N\n"
" ustala pożądaną długość łamanych linii dla polecenia `l'.\n"
-#: sed/sed.c:159
+#: sed/sed.c:164
#, c-format
msgid ""
" --posix\n"
@@ -694,7 +706,7 @@ msgstr ""
" --posix\n"
" wyłącza wszystkie rozszerzenia GNU.\n"
-#: sed/sed.c:161
+#: sed/sed.c:166
#, fuzzy, c-format
msgid ""
" -E, -r, --regexp-extended\n"
@@ -704,7 +716,7 @@ msgstr ""
" -r, --regexp-extended\n"
" używa w skrypcie rozszerzonych wyrażeń regularnych.\n"
-#: sed/sed.c:167
+#: sed/sed.c:169
#, fuzzy, c-format
msgid ""
" -s, --separate\n"
@@ -715,14 +727,14 @@ msgstr ""
" traktuje pliki jako oddzielne, a nie jako pojedynczy,\n"
" długi i ciągły strumień.\n"
-#: sed/sed.c:170
+#: sed/sed.c:172
#, c-format
msgid ""
" --sandbox\n"
" operate in sandbox mode (disable e/r/w commands).\n"
msgstr ""
-#: sed/sed.c:172
+#: sed/sed.c:174
#, c-format
msgid ""
" -u, --unbuffered\n"
@@ -734,24 +746,24 @@ msgstr ""
" ładuje minimalną ilość danych z plików wejściowych\n"
" i częściej oczyszcza bufor wyjściowy.\n"
-#: sed/sed.c:175
+#: sed/sed.c:177
#, c-format
msgid ""
" -z, --null-data\n"
" separate lines by NUL characters\n"
msgstr ""
-#: sed/sed.c:177
+#: sed/sed.c:179
#, 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:178
+#: sed/sed.c:180
#, c-format
msgid " --version output version information and exit\n"
msgstr " --version wyświetla numer wersji i kończy pracę.\n"
-#: sed/sed.c:179
+#: sed/sed.c:181
#, c-format
msgid ""
"\n"
@@ -769,22 +781,35 @@ msgstr ""
"żadne pliki wejściowe, to wtedy odczytane zostanie standardowe wejście.\n"
"\n"
-#: sed/utils.c:73 sed/utils.c:384
+#: sed/sed.c:373
+msgid "failed to set binary mode on STDIN"
+msgstr ""
+
+#: sed/sed.c:375
+msgid "failed to set binary mode on STDOUT"
+msgstr ""
+
+#: sed/utils.c:77 sed/utils.c:395
#, c-format
msgid "cannot remove %s: %s"
msgstr "nie można usunąć %s: %s"
-#: sed/utils.c:136
+#: sed/utils.c:146
#, c-format
msgid "couldn't open file %s: %s"
msgstr "nie można otworzyć pliku %s: %s"
-#: sed/utils.c:155
+#: sed/utils.c:165
#, c-format
msgid "couldn't attach to %s: %s"
msgstr "nie można dołączyć do %s: %s"
#: sed/utils.c:192
+#, c-format
+msgid "failed to set binary mode on '%s'"
+msgstr ""
+
+#: sed/utils.c:207
#, fuzzy, c-format
msgid "couldn't write %llu item to %s: %s"
msgid_plural "couldn't write %llu items to %s: %s"
@@ -792,26 +817,34 @@ 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:204 sed/utils.c:223
+#: sed/utils.c:219 sed/utils.c:238
#, c-format
msgid "read error on %s: %s"
msgstr "błąd odczytu w %s: %s"
-#: sed/utils.c:325
+#: sed/utils.c:336
#, c-format
msgid "couldn't follow symlink %s: %s"
msgstr "nie można podążyć za dowiązaniem %s: %s"
-#: sed/utils.c:359
+#: sed/utils.c:370
#, c-format
msgid "cannot stat %s: %s"
msgstr "nie można uzyskać informacji o %s: %s"
-#: sed/utils.c:389
+#: sed/utils.c:400
#, c-format
msgid "cannot rename %s: %s"
msgstr "nie można zmienić nazwy %s: %s"
+#~ msgid ""
+#~ " -R, --regexp-perl\n"
+#~ " use Perl 5's regular expressions syntax in the script.\n"
+#~ msgstr ""
+#~ " -R, --regexp-perl\n"
+#~ " używa w skrypcie wyrażenia regularne zgodne ze składnią "
+#~ "Perl 5.\n"
+
#~ msgid "cannot specify modifiers on empty regexp"
#~ msgstr "nie można wyszczególnić modyfikatorów w pustym wyrażeniu regularnym"
diff --git a/po/pt.gmo b/po/pt.gmo
index 44c84bd..2ab90c6 100644
--- a/po/pt.gmo
+++ b/po/pt.gmo
Binary files differ
diff --git a/po/pt.po b/po/pt.po
index 57950e9..31b9570 100644
--- a/po/pt.po
+++ b/po/pt.po
@@ -1,114 +1,111 @@
# Portuguese translation of the "sed" messages
-# Copyright (C) 2005 Free Software Foundation, Inc.
+# Copyright (C) 2018 Free Software Foundation, Inc.
# This file is distributed under the same license as the sed package.
-# Helder Correia <helder.pereira.correia@gmail.com>, 2005-2008.
+# Pedro Albuquerque <palbuquerque73@gmail.com>, 2018.
#
msgid ""
msgstr ""
-"Project-Id-Version: sed 4.2.0\n"
+"Project-Id-Version: sed 4.5.48\n"
"Report-Msgid-Bugs-To: bug-gnu-utils@gnu.org\n"
-"POT-Creation-Date: 2018-03-31 18:40-0700\n"
-"PO-Revision-Date: 2008-01-17 21:25+0100\n"
-"Last-Translator: Helder Correia <helder.pereira.correia@gmail.com>\n"
+"POT-Creation-Date: 2018-12-20 22:03-0800\n"
+"PO-Revision-Date: 2018-12-14 18:07+0000\n"
+"Last-Translator: Pedro Albuquerque <palbuquerque73@gmail.com>\n"
"Language-Team: Portuguese <translation-team-pt@lists.sourceforge.net>\n"
"Language: pt\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"
+"Plural-Forms: nplurals=2; plural=n != 1;\\n\n"
+"X-Generator: Gtranslator 2.91.7\n"
#: lib/closeout.c:122
msgid "write error"
-msgstr ""
+msgstr "erro de escrita"
#: lib/copy-acl.c:54
#, c-format
msgid "preserving permissions for %s"
-msgstr ""
+msgstr "preservar permissões para %s"
-#: lib/dfa.c:958
+#: lib/dfa.c:970
msgid "unbalanced ["
-msgstr ""
+msgstr "[ sem par"
-#: lib/dfa.c:1079
-#, fuzzy
+#: lib/dfa.c:1091
msgid "invalid character class"
-msgstr "Nome de classe de carácter inválido"
+msgstr "classe de carácter inválida"
-#: lib/dfa.c:1205
+#: lib/dfa.c:1217
msgid "character class syntax is [[:space:]], not [:space:]"
-msgstr ""
+msgstr "a sintaxe da classe de carácter é [[:espaço:]], não [:espaço:]"
-#: lib/dfa.c:1272
+#: lib/dfa.c:1284
msgid "unfinished \\ escape"
-msgstr ""
+msgstr "escape \\ não terminado"
-#: lib/dfa.c:1433
-#, fuzzy
+#: lib/dfa.c:1445
msgid "invalid content of \\{\\}"
msgstr "Conteúdo de \\{\\} inválido"
-#: lib/dfa.c:1436
-#, fuzzy
+#: lib/dfa.c:1448
msgid "regular expression too big"
-msgstr "Expressão regular demasiado grande"
+msgstr "Expressão regular muito grande"
-#: lib/dfa.c:1850
+#: lib/dfa.c:1863
msgid "unbalanced ("
-msgstr ""
+msgstr "( sem par"
-#: lib/dfa.c:1968
+#: lib/dfa.c:1981
msgid "no syntax specified"
-msgstr ""
+msgstr "sem sintaxe especificada"
-#: lib/dfa.c:1976
+#: lib/dfa.c:1992
msgid "unbalanced )"
-msgstr ""
+msgstr ") sem par"
#: lib/error.c:195
msgid "Unknown system error"
-msgstr ""
+msgstr "erro de sistema desconhecido"
#: lib/getopt.c:278
#, c-format
msgid "%s: option '%s%s' is ambiguous\n"
-msgstr ""
+msgstr "%s: a opção \"%s%s\" é ambígua\n"
#: lib/getopt.c:284
#, c-format
msgid "%s: option '%s%s' is ambiguous; possibilities:"
-msgstr ""
+msgstr "%s: a opção \"%s%s\" é ambígua; possibilidades:"
#: lib/getopt.c:319
#, c-format
msgid "%s: unrecognized option '%s%s'\n"
-msgstr ""
+msgstr "%s: opção não reconhecida \"%s%s\"\n"
#: lib/getopt.c:345
#, c-format
msgid "%s: option '%s%s' doesn't allow an argument\n"
-msgstr ""
+msgstr "%s: a opção \"%s%s\" não permite um argumento\n"
#: lib/getopt.c:360
#, c-format
msgid "%s: option '%s%s' requires an argument\n"
-msgstr ""
+msgstr "%s: a opção \"%s%s\" requer um argumento\n"
#: lib/getopt.c:621
#, c-format
msgid "%s: invalid option -- '%c'\n"
-msgstr ""
+msgstr "%s: opção inválida -- \"%c\"\n"
#: lib/getopt.c:636 lib/getopt.c:682
#, c-format
msgid "%s: option requires an argument -- '%c'\n"
-msgstr ""
+msgstr "%s: a opção requer um argumento -- \"%c\"\n"
#: lib/obstack.c:338 lib/obstack.c:340 lib/xalloc-die.c:34
-#, fuzzy
msgid "memory exhausted"
-msgstr "Memória esgotada"
+msgstr "memória esgotada"
#. TRANSLATORS:
#. Get translations for open and closing quotation marks.
@@ -133,11 +130,11 @@ msgstr "Memória esgotada"
#. and use glyphs suitable for your language.
#: lib/quotearg.c:362
msgid "`"
-msgstr ""
+msgstr "\""
#: lib/quotearg.c:363
msgid "'"
-msgstr ""
+msgstr "\""
#: lib/regcomp.c:135
msgid "Success"
@@ -153,7 +150,7 @@ msgstr "Expressão regular inválida"
#: lib/regcomp.c:144
msgid "Invalid collation character"
-msgstr "Caráter inválido"
+msgstr "Carácter de agrupamento inválido"
#: lib/regcomp.c:147
msgid "Invalid character class name"
@@ -161,24 +158,23 @@ msgstr "Nome de classe de carácter inválido"
#: lib/regcomp.c:150
msgid "Trailing backslash"
-msgstr "'Backslash' no final"
+msgstr "Barra invertida 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"
+msgstr "[, [^, [:, [., ou [= sem par"
#: lib/regcomp.c:159
msgid "Unmatched ( or \\("
-msgstr "( ou \\( não correspondido"
+msgstr "( ou \\( sem par"
#: lib/regcomp.c:162
msgid "Unmatched \\{"
-msgstr "\\{ não correspondido"
+msgstr "\\{ sem par"
#: lib/regcomp.c:165
msgid "Invalid content of \\{\\}"
@@ -186,7 +182,7 @@ msgstr "Conteúdo de \\{\\} inválido"
#: lib/regcomp.c:168
msgid "Invalid range end"
-msgstr "Limite de intervalo inválido"
+msgstr "Final de intervalo inválido"
#: lib/regcomp.c:171
msgid "Memory exhausted"
@@ -202,39 +198,39 @@ msgstr "Fim prematuro de expressão regular"
#: lib/regcomp.c:180
msgid "Regular expression too big"
-msgstr "Expressão regular demasiado grande"
+msgstr "Expressão regular muito grande"
#: lib/regcomp.c:183
msgid "Unmatched ) or \\)"
-msgstr ") ou \\) não correspondido"
+msgstr ") ou \\) sem par"
-#: lib/regcomp.c:689
+#: lib/regcomp.c:688
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 ""
+msgstr "definir permissões para %s"
-#: lib/version-etc.c:74
+#: lib/version-etc.c:73
#, c-format
msgid "Packaged by %s (%s)\n"
-msgstr ""
+msgstr "Empacotado por %s (%s)\n"
-#: lib/version-etc.c:77
+#: lib/version-etc.c:76
#, c-format
msgid "Packaged by %s\n"
-msgstr ""
+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
+#: lib/version-etc.c:83
msgid "(C)"
-msgstr ""
+msgstr "(©)"
-#: lib/version-etc.c:86
+#: lib/version-etc.c:85
msgid ""
"\n"
"License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl."
@@ -243,24 +239,30 @@ msgid ""
"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"
+"Este é um programa grátis: pode alterá-lo e redistribuí-lo.\n"
+"Não há QUALQUER GARANTIA, até ao limite da Lei.\n"
+"\n"
#. TRANSLATORS: %s denotes an author name.
#: lib/version-etc.c:102
#, c-format
msgid "Written by %s.\n"
-msgstr ""
+msgstr "Escrito por %s\n"
#. TRANSLATORS: Each %s denotes an author name.
#: lib/version-etc.c:106
#, c-format
msgid "Written by %s and %s.\n"
-msgstr ""
+msgstr "Escrito por %s 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 ""
+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
@@ -271,6 +273,8 @@ 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
@@ -281,6 +285,8 @@ 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
@@ -291,6 +297,8 @@ 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
@@ -301,6 +309,8 @@ msgid ""
"Written by %s, %s, %s,\n"
"%s, %s, %s, and %s.\n"
msgstr ""
+"Escrito por %s, %s, %s,\n"
+"%s, %s, %s e %s.\n"
#. TRANSLATORS: Each %s denotes an author name.
#. You can use line breaks, estimating that each author name occupies
@@ -312,6 +322,9 @@ msgid ""
"%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
@@ -323,6 +336,9 @@ msgid ""
"%s, %s, %s, %s,\n"
"%s, and %s.\n"
msgstr ""
+"Escrito por %s, %s, %s,\n"
+"%s, %s, %s, %s,\n"
+"%s e %s.\n"
#. TRANSLATORS: Each %s denotes an author name.
#. You can use line breaks, estimating that each author name occupies
@@ -334,6 +350,9 @@ msgid ""
"%s, %s, %s, %s,\n"
"%s, %s, and others.\n"
msgstr ""
+"Escrito por %s, %s, %s,\n"
+"%s, %s, %s, %s,\n"
+"%s, %s e outros.\n"
#. TRANSLATORS: The placeholder indicates the bug-reporting address
#. for this package. Please add _another line_ saying
@@ -345,25 +364,27 @@ msgid ""
"\n"
"Report bugs to: %s\n"
msgstr ""
+"\n"
+"Reportar erros a: %s\n"
#: lib/version-etc.c:247
#, c-format
msgid "Report %s bugs to: %s\n"
-msgstr ""
+msgstr "Reportar %s erros a: %s\n"
#: lib/version-etc.c:251
#, c-format
msgid "%s home page: <%s>\n"
-msgstr ""
+msgstr "Página inicial %s: <%s>\n"
#: lib/version-etc.c:253
#, c-format
msgid "%s home page: <https://www.gnu.org/software/%s/>\n"
-msgstr ""
+msgstr "Página inicial %s: <http://www.gnu.org/software/%s/>\n"
#: lib/version-etc.c:256
msgid "General help using GNU software: <https://www.gnu.org/gethelp/>\n"
-msgstr ""
+msgstr "Ajuda geral para uso de programas GNU: <http://www.gnu.org/gethelp/>\n"
#: sed/compile.c:146
msgid "multiple `!'s"
@@ -371,7 +392,7 @@ msgstr "múltiplos \"!\"s"
#: sed/compile.c:147
msgid "unexpected `,'"
-msgstr "',' inesperada"
+msgstr "\",\" inesperada"
#: sed/compile.c:149
msgid "invalid usage of +N or ~N as first address"
@@ -379,11 +400,11 @@ msgstr "uso inválido de +N ou ~N como primeiro endereço"
#: sed/compile.c:150
msgid "unmatched `{'"
-msgstr "\"{\" sem correspondência"
+msgstr "\"{\" sem par"
#: sed/compile.c:151
msgid "unexpected `}'"
-msgstr "'{' inesperado"
+msgstr "\"{\" inesperado"
#: sed/compile.c:153
msgid "extra characters after command"
@@ -391,11 +412,11 @@ msgstr "caracteres extra após comando"
#: sed/compile.c:155
msgid "expected \\ after `a', `c' or `i'"
-msgstr "\\ esperado após 'a', 'c' ou 'i'"
+msgstr "\\ esperado após \"a\", \"c\" ou \"i\""
#: sed/compile.c:157
msgid "`}' doesn't want any addresses"
-msgstr "'}' não quer quaisquer endereços"
+msgstr "\"}\" não quer quaisquer endereços"
#: sed/compile.c:159
msgid ": doesn't want any addresses"
@@ -413,216 +434,232 @@ msgstr "comando em falta"
msgid "command only uses one address"
msgstr "comando usa apenas um endereço"
-#: sed/compile.c:164
+#: sed/compile.c:165
msgid "unterminated address regex"
-msgstr "expressão regular de endereço não concluída"
+msgstr "regexp de endereço não terminada"
-#: sed/compile.c:165
+#: sed/compile.c:166
msgid "unterminated `s' command"
-msgstr "comando 's' não concluído"
+msgstr "comando \"s\" não terminado"
-#: sed/compile.c:166
+#: sed/compile.c:167
msgid "unterminated `y' command"
-msgstr "comando 'y' não concluído"
+msgstr "comando \"y\" não terminado"
-#: sed/compile.c:167
+#: sed/compile.c:168
msgid "unknown option to `s'"
-msgstr "opção desconhecida para 's'"
+msgstr "opção desconhecida para \"s\""
-#: sed/compile.c:169
+#: sed/compile.c:170
msgid "multiple `p' options to `s' command"
-msgstr "múltiplas opções 'p' para comando 's'"
+msgstr "múltiplas opções \"p\" para comando \"s\""
-#: sed/compile.c:171
+#: sed/compile.c:172
msgid "multiple `g' options to `s' command"
-msgstr "múltiplas opções 'g' para comando 's'"
+msgstr "múltiplas opções \"g\" para comando \"s\""
-#: sed/compile.c:173
+#: sed/compile.c:174
msgid "multiple number options to `s' command"
-msgstr "múltiplas opções de número para comando 's'"
+msgstr "múltiplas opções de número para comando \"s\""
-#: sed/compile.c:175
+#: sed/compile.c:176
msgid "number option to `s' command may not be zero"
-msgstr "opção de número para comando 's' pode não ser zero"
+msgstr "opção de número para comando \"s\" pode não ser zero"
-#: sed/compile.c:177
+#: sed/compile.c:178
msgid "strings for `y' command are different lengths"
-msgstr "cadeias para o comando 'y' têm comprimentos diferentes"
+msgstr "cadeias para o comando \"y\" têm tamanhos diferentes"
-#: sed/compile.c:179
+#: sed/compile.c:180
msgid "delimiter character is not a single-byte character"
-msgstr "carácter delimitador não tem um único 'byte'"
+msgstr "carácter delimitador não é carácter de byte único"
-#: sed/compile.c:181
+#: sed/compile.c:182
msgid "expected newer version of sed"
msgstr "esperada versão mais recente do sed"
-#: sed/compile.c:183
+#: sed/compile.c:184
msgid "invalid usage of line address 0"
msgstr "uso inválido do endereço de linha 0"
-#: sed/compile.c:184
+#: sed/compile.c:185
#, c-format
msgid "unknown command: `%c'"
-msgstr "comando desconhecido: '%c'"
+msgstr "comando desconhecido: \"%c\""
-#: sed/compile.c:186
-#, fuzzy
+#: sed/compile.c:187
msgid "incomplete command"
-msgstr "comando em falta"
+msgstr "comando incompleto"
-#: sed/compile.c:188
+#: sed/compile.c:189
msgid "\":\" lacks a label"
-msgstr ""
+msgstr "\":\" precisa de uma etiqueta"
-#: sed/compile.c:190
+#: sed/compile.c:191
msgid "recursive escaping after \\c not allowed"
-msgstr ""
+msgstr "escape recursivo após \\c não permitido"
+
+#: sed/compile.c:193
+msgid "e/r/w commands disabled in sandbox mode"
+msgstr "comandos e/r/w desactivados em modo sandbox"
-#: sed/compile.c:213
+#: sed/compile.c:215
#, c-format
msgid "%s: file %s line %lu: %s\n"
msgstr "%s: ficheiro %s linha %lu: %s\n"
-#: sed/compile.c:216
+#: sed/compile.c:218
#, 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:1644
+#: sed/compile.c:1607
#, c-format
msgid "can't find label for jump to `%s'"
-msgstr "etiqueta para saltar para '%s' não encontrada"
+msgstr "etiqueta para saltar para \"%s\" não encontrada"
-#: sed/execute.c:254 sed/execute.c:271
+#: sed/execute.c:253 sed/execute.c:270
#, c-format
msgid "case conversion produced an invalid character"
-msgstr ""
+msgstr "conversão de maiúsculas produziu um carácter inválido"
-#: sed/execute.c:565
+#: sed/execute.c:561
#, c-format
msgid "%s: can't read %s: %s\n"
-msgstr "%s: não é possível ler %s: %s\n"
+msgstr "%s: impossível ler %s: %s\n"
-#: sed/execute.c:590
+#: sed/execute.c:587
#, c-format
msgid "couldn't edit %s: is a terminal"
-msgstr "não foi possível editar %s: é um terminal"
+msgstr "impossível editar %s: é um terminal"
-#: sed/execute.c:595
+#: sed/execute.c:592
#, c-format
msgid "couldn't edit %s: not a regular file"
-msgstr "não foi possível editar %s: ficheiro não regular"
+msgstr "impossível editar %s: não é um ficheiro regular"
-#: sed/execute.c:606
+#: sed/execute.c:603
#, c-format
msgid "%s: warning: failed to set default file creation context to %s: %s"
msgstr ""
+"%s: aviso: falha ao definir contexto predefinido de criação de ficheiro para "
+"%s: %s"
-#: sed/execute.c:614
+#: sed/execute.c:611
#, c-format
msgid "%s: warning: failed to get security context of %s: %s"
-msgstr ""
+msgstr "%s: aviso: falha ao obter contexto de segurança de %s: %s"
-#: sed/execute.c:633 sed/utils.c:178
+#: sed/execute.c:630 sed/utils.c:188
#, c-format
msgid "couldn't open temporary file %s: %s"
-msgstr "não foi possível abrir ficheiro temporário %s: %s"
+msgstr "impossível abrir ficheiro temporário %s: %s"
-#: sed/execute.c:1148 sed/execute.c:1358
+#: sed/execute.c:1167 sed/execute.c:1366
msgid "error in subprocess"
-msgstr "erro no subprocesso"
+msgstr "erro no sub-processo"
-#: sed/execute.c:1150
+#: sed/execute.c:1169
msgid "option `e' not supported"
-msgstr "opção 'e' não suportada"
+msgstr "opção \"e\" não suportada"
-#: sed/execute.c:1339
+#: sed/execute.c:1347
msgid "`e' command not supported"
-msgstr "comando 'e' não suportado"
+msgstr "comando \"e\" não suportado"
-#: sed/execute.c:1665
+#: sed/execute.c:1662
msgid "no input files"
msgstr "nenhum ficheiro de entrada"
-#: sed/regexp.c:39
+#: sed/regexp.c:40
msgid "no previous regular expression"
-msgstr "não há expressão regular anterior"
+msgstr "Sem expressão regular prévia"
-#: sed/regexp.c:141
+#: sed/regexp.c:125
#, c-format
msgid "invalid reference \\%d on `s' command's RHS"
-msgstr "referência \\%d inválida no RHS do comando 's'"
+msgstr "referência \\%d inválida no RHS do comando \"s\""
-#: sed/regexp.c:259
+#: sed/regexp.c:196
msgid "regex input buffer length larger than INT_MAX"
-msgstr ""
+msgstr "tamanho do buffer de entrada de regexp maior que INT_MAX"
-#: sed/sed.c:35
+#: sed/sed.c:36
msgid "Jay Fenlason"
-msgstr ""
+msgstr "Jay Fenlason"
-#: sed/sed.c:36
+#: sed/sed.c:37
msgid "Tom Lord"
-msgstr ""
+msgstr "Tom Lord"
-#: sed/sed.c:37
+#: sed/sed.c:38
msgid "Ken Pizzini"
-msgstr ""
+msgstr "Ken Pizzini"
-#: sed/sed.c:38
+#: sed/sed.c:39
msgid "Paolo Bonzini"
-msgstr ""
+msgstr "Paolo Bonzini"
+
+#: sed/sed.c:40
+msgid "Jim Meyering"
+msgstr "Jim Meyering"
+
+#: sed/sed.c:41
+msgid "Assaf Gordon"
+msgstr "Assaf Gordon"
-#: sed/sed.c:113
+#: sed/sed.c:124
#, c-format
msgid ""
"GNU sed home page: <https://www.gnu.org/software/sed/>.\n"
"General help using GNU software: <https://www.gnu.org/gethelp/>.\n"
msgstr ""
+"Página inicial do GNU sed: <https://www.gnu.org/software/sed/>.\n"
+"Ajuda geral para uso de programas GNU: <https://www.gnu.org/gethelp/>.\n"
-#: sed/sed.c:120
+#: sed/sed.c:130
#, c-format
msgid "E-mail bug reports to: <%s>.\n"
-msgstr ""
-
-#: 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 expressões regulares Perl 5 no 'script'.\n"
+msgstr "Enviar relatórios de erro para: <%s>.\n"
-#: sed/sed.c:134
+#: sed/sed.c:138
#, c-format
msgid ""
"Usage: %s [OPTION]... {script-only-if-no-other-script} [input-file]...\n"
"\n"
msgstr ""
-"Utilização: %s [OPÇÃO]... {'script'-apenas-se-não-houver-outro-'script'} "
-"[ficheiro-de-entrada]...\n"
+"Uso: %s [OPÇÃO]... {script-só-se-não-houver-outro-script} [ficheiro-de-"
+"entrada]...\n"
"\n"
-#: sed/sed.c:138
+#: sed/sed.c:142
#, c-format
msgid ""
" -n, --quiet, --silent\n"
" suppress automatic printing of pattern space\n"
msgstr ""
" -n, --quiet, --silent\n"
-" elimir exibição automática do espaço de padrões\n"
+" suprime mostra automática do espaço de padrões\n"
+
+#: sed/sed.c:144
+#, c-format
+msgid ""
+" --debug\n"
+" annotate program execution\n"
+msgstr ""
+" --debug\n"
+" anota a execução do programa\n"
-#: sed/sed.c:140
+#: sed/sed.c:146
#, c-format
msgid ""
" -e script, --expression=script\n"
" add the script to the commands to be executed\n"
msgstr ""
" -e script, --expression=script\n"
-" adicionar o 'script' aos comandos a serem executados\n"
+" adiciona script aos comandos a executar\n"
-#: sed/sed.c:142
+#: sed/sed.c:148
#, c-format
msgid ""
" -f script-file, --file=script-file\n"
@@ -630,29 +667,27 @@ msgid ""
"executed\n"
msgstr ""
" -f script, --file=script\n"
-" adicionar os conteúdos de 'script' aos comandos a serem "
-"executados\n"
+" adiciona conteúdos de script aos comandos a executar\n"
-#: sed/sed.c:146
+#: sed/sed.c:152
#, c-format
msgid ""
" --follow-symlinks\n"
" follow symlinks when processing in place\n"
msgstr ""
" --follow-symlinks\n"
-" wguir ligações simbólicas ao processar no lugar\n"
+" segue ligações simbólicas ao processar no local\n"
-#: sed/sed.c:149
-#, fuzzy, c-format
+#: sed/sed.c:155
+#, 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"
-" editar ficheiros no lugar (salvaguarda se extensão "
-"fornecida)\n"
+" edita ficheiros no local (segurança se SUFIXO fornecido)\n"
-#: sed/sed.c:153
+#: sed/sed.c:158
#, c-format
msgid ""
" -b, --binary\n"
@@ -660,56 +695,58 @@ msgid ""
"specially)\n"
msgstr ""
" -b, --binary\n"
-" abrir ficheiros em modo binário (CR+LFs não são processados "
+" abre ficheiros em modo binário (CR+LFs não são processados "
"de forma especial)\n"
-#: sed/sed.c:157
+#: sed/sed.c:162
#, 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"
-" especificar comprimento de linha desejado no comando 'l'\n"
+" especifica comprimento de linha desejado no comando \"l\"\n"
-#: sed/sed.c:159
+#: sed/sed.c:164
#, c-format
msgid ""
" --posix\n"
" disable all GNU extensions.\n"
msgstr ""
" --posix\n"
-" desactivar todas as extensões GNU.\n"
+" desactiva todas as extensões GNU.\n"
-#: sed/sed.c:161
-#, fuzzy, c-format
+#: sed/sed.c:166
+#, c-format
msgid ""
" -E, -r, --regexp-extended\n"
" use extended regular expressions in the script\n"
" (for portability use POSIX -E).\n"
msgstr ""
" -r, --regexp-extended\n"
-" usar expressões regulares extendidas no 'script'.\n"
+" usa expressões regulares estendidas no script.\n"
-#: sed/sed.c:167
-#, fuzzy, c-format
+#: sed/sed.c:169
+#, c-format
msgid ""
" -s, --separate\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"
+" considera ficheiros como separados em vez de uma única,\n"
+" longa corrente contínua.\n"
-#: sed/sed.c:170
+#: sed/sed.c:172
#, c-format
msgid ""
" --sandbox\n"
" operate in sandbox mode (disable e/r/w commands).\n"
msgstr ""
+" --sandbox\n"
+" opera em modo virtual (desactiva os comandos e/r/w).\n"
-#: sed/sed.c:172
+#: sed/sed.c:174
#, c-format
msgid ""
" -u, --unbuffered\n"
@@ -718,27 +755,30 @@ msgid ""
" the output buffers more often\n"
msgstr ""
" -u, --unbuffered\n"
-" carregar quantidades mínimas de dados dos ficheiros de "
-"entrada e despejar mais frequentemente a memória temporária de saída\n"
+" carrega quantidades mínimas de dados dos ficheiros de "
+"entrada e\n"
+" despejar mais frequentemente os buffers de saída\n"
-#: sed/sed.c:175
+#: sed/sed.c:177
#, c-format
msgid ""
" -z, --null-data\n"
" separate lines by NUL characters\n"
msgstr ""
+" -z, --null-data\n"
+" separa linhas com caracteres NUL\n"
-#: sed/sed.c:177
+#: sed/sed.c:179
#, c-format
msgid " --help display this help and exit\n"
-msgstr " --help exibir esta ajuda e sair\n"
+msgstr " --help mostra esta mensagem e sai\n"
-#: sed/sed.c:178
+#: sed/sed.c:180
#, c-format
msgid " --version output version information and exit\n"
-msgstr " --version exibir informação de versão e sair\n"
+msgstr " --version mostra informação de versão e sai\n"
-#: sed/sed.c:179
+#: sed/sed.c:181
#, c-format
msgid ""
"\n"
@@ -749,55 +789,73 @@ msgid ""
"\n"
msgstr ""
"\n"
-"Se não forem dadas as opções -e, --expression, -f ou --file, então, o "
-"primeiro\n"
-"argumento não-opção é considerado como o 'script' a interpretar. Todos os\n"
-"restantes argumentos só nomes de ficheiros de entrada; se não forem "
-"especificados\n"
-"ficheiros de entrada, então, a entrada padrão (standard input) é lida.\n"
+"Se não for dada a opção -e, --expression, -f ou --file, o primeiro\n"
+"argumento não-opção é considerado como o script sed a interpretar. Todos os\n"
+"restantes argumentos são nomes de ficheiros de entrada; se não forem\n"
+"especificados ficheiros de entrada, é lida a entrada padrão.\n"
"\n"
-#: sed/utils.c:73 sed/utils.c:384
+#: sed/sed.c:373
+msgid "failed to set binary mode on STDIN"
+msgstr "falha ao definir modo binário em STDIN"
+
+#: sed/sed.c:375
+msgid "failed to set binary mode on STDOUT"
+msgstr "falha ao definir modo binário em STDOUT"
+
+#: sed/utils.c:77 sed/utils.c:395
#, c-format
msgid "cannot remove %s: %s"
-msgstr "não é possível remover %s: %s"
+msgstr "impossível remover %s: %s"
-#: sed/utils.c:136
+#: sed/utils.c:146
#, c-format
msgid "couldn't open file %s: %s"
-msgstr "não foi possível abrir o ficheiro %s: %s"
+msgstr "impossível abrir o ficheiro %s: %s"
-#: sed/utils.c:155
+#: sed/utils.c:165
#, c-format
msgid "couldn't attach to %s: %s"
-msgstr "não foi possível anexar a %s: %s"
+msgstr "impossível anexar a %s: %s"
#: sed/utils.c:192
-#, fuzzy, c-format
+#, c-format
+msgid "failed to set binary mode on '%s'"
+msgstr "falha ao definir modo binário em \"%s\""
+
+#: sed/utils.c:207
+#, 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"
+msgstr[0] "impossível escrever %llu item em %s: %s"
+msgstr[1] "impossível escrever %llu itens em %s: %s"
-#: sed/utils.c:204 sed/utils.c:223
+#: sed/utils.c:219 sed/utils.c:238
#, c-format
msgid "read error on %s: %s"
msgstr "erro de leitura em %s: %s"
-#: sed/utils.c:325
+#: sed/utils.c:336
#, c-format
msgid "couldn't follow symlink %s: %s"
-msgstr "não foi possível eguir a ligação simbólica %s: %s"
+msgstr "impossível seguir a ligação simbólica %s: %s"
-#: sed/utils.c:359
+#: sed/utils.c:370
#, c-format
msgid "cannot stat %s: %s"
-msgstr "não é possível obter informações de %s: %s"
+msgstr "impossível obter informações de %s: %s"
-#: sed/utils.c:389
+#: sed/utils.c:400
#, c-format
msgid "cannot rename %s: %s"
-msgstr "não é possível renomear %s: %s"
+msgstr "impossível renomear %s: %s"
+
+#~ msgid ""
+#~ " -R, --regexp-perl\n"
+#~ " use Perl 5's regular expressions syntax in the script.\n"
+#~ msgstr ""
+#~ " -R, --regexp-perl\n"
+#~ " usa sintaxe de expressões regulares Perl 5 no script.\n"
#~ msgid "cannot specify modifiers on empty regexp"
#~ msgstr ""
diff --git a/po/pt_BR.gmo b/po/pt_BR.gmo
index 6f838e3..711d073 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 7a8ead3..9d600ed 100644
--- a/po/pt_BR.po
+++ b/po/pt_BR.po
@@ -8,10 +8,10 @@
# Rafael Fontenelle <rafaelff@gnome.org>, 2016-2018.
msgid ""
msgstr ""
-"Project-Id-Version: sed 4.4.104\n"
+"Project-Id-Version: sed 4.5.48\n"
"Report-Msgid-Bugs-To: bug-gnu-utils@gnu.org\n"
-"POT-Creation-Date: 2018-03-31 18:40-0700\n"
-"PO-Revision-Date: 2018-03-24 12:26-0200\n"
+"POT-Creation-Date: 2018-12-20 22:03-0800\n"
+"PO-Revision-Date: 2018-12-14 06:48-0200\n"
"Last-Translator: Rafael Fontenelle <rafaelff@gnome.org>\n"
"Language-Team: Brazilian Portuguese <ldpbr-translation@lists.sourceforge."
"net>\n"
@@ -32,39 +32,39 @@ msgstr "erro de escrita"
msgid "preserving permissions for %s"
msgstr "preservando permissões de %s"
-#: lib/dfa.c:958
+#: lib/dfa.c:970
msgid "unbalanced ["
msgstr "[ sem correspondente"
-#: lib/dfa.c:1079
+#: lib/dfa.c:1091
msgid "invalid character class"
msgstr "classe de caracteres inválida"
-#: lib/dfa.c:1205
+#: lib/dfa.c:1217
msgid "character class syntax is [[:space:]], not [:space:]"
msgstr "a sintaxe de classe de caracteres é [[:space:]], e não [:space:]"
-#: lib/dfa.c:1272
+#: lib/dfa.c:1284
msgid "unfinished \\ escape"
msgstr "escape \\ não terminado"
-#: lib/dfa.c:1433
+#: lib/dfa.c:1445
msgid "invalid content of \\{\\}"
msgstr "conteúdo inválido de \\{\\}"
-#: lib/dfa.c:1436
+#: lib/dfa.c:1448
msgid "regular expression too big"
msgstr "expressão regular grande demais"
-#: lib/dfa.c:1850
+#: lib/dfa.c:1863
msgid "unbalanced ("
msgstr "( sem correspondente"
-#: lib/dfa.c:1968
+#: lib/dfa.c:1981
msgid "no syntax specified"
msgstr "nenhuma sintaxe especificada"
-#: lib/dfa.c:1976
+#: lib/dfa.c:1992
msgid "unbalanced )"
msgstr ") sem correspondente"
@@ -208,7 +208,7 @@ msgstr "Expressão regular grande demais"
msgid "Unmatched ) or \\)"
msgstr ") ou \\) sem correspondente"
-#: lib/regcomp.c:689
+#: lib/regcomp.c:688
msgid "No previous regular expression"
msgstr "Nenhuma expressão regular anterior"
@@ -217,12 +217,12 @@ msgstr "Nenhuma expressão regular anterior"
msgid "setting permissions for %s"
msgstr "definindo permissões de %s"
-#: lib/version-etc.c:74
+#: lib/version-etc.c:73
#, c-format
msgid "Packaged by %s (%s)\n"
msgstr "Empacotado por %s (%s)\n"
-#: lib/version-etc.c:77
+#: lib/version-etc.c:76
#, c-format
msgid "Packaged by %s\n"
msgstr "Empacotado por %s\n"
@@ -230,11 +230,11 @@ 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
+#: lib/version-etc.c:83
msgid "(C)"
msgstr "(C)"
-#: lib/version-etc.c:86
+#: lib/version-etc.c:85
msgid ""
"\n"
"License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl."
@@ -440,168 +440,181 @@ msgstr "falta especificar um comando"
msgid "command only uses one address"
msgstr "este comando usa apenas um endereço"
-#: sed/compile.c:164
+#: sed/compile.c:165
msgid "unterminated address regex"
msgstr "a expressão regular do endereço está inacabada (falta a /)"
-#: sed/compile.c:165
+#: sed/compile.c:166
msgid "unterminated `s' command"
msgstr "comando `s' inacabado (s/// - faltou delimitador)"
-#: sed/compile.c:166
+#: sed/compile.c:167
msgid "unterminated `y' command"
msgstr "comando `y' inacabado (y/// - faltou delimitador)"
-#: sed/compile.c:167
+#: sed/compile.c:168
msgid "unknown option to `s'"
msgstr "opção desconhecida para o comando `s' (s///?)"
-#: sed/compile.c:169
+#: sed/compile.c:170
msgid "multiple `p' options to `s' command"
msgstr "opções `p' múltiplas para o comando `s'"
-#: sed/compile.c:171
+#: sed/compile.c:172
msgid "multiple `g' options to `s' command"
msgstr "opções `g' múltiplas para o comando `s'"
-#: sed/compile.c:173
+#: sed/compile.c:174
msgid "multiple number options to `s' command"
msgstr "opções numéricas múltiplas para o comando `s' (s///n)"
-#: sed/compile.c:175
+#: sed/compile.c:176
msgid "number option to `s' command may not be zero"
msgstr "a opção numérica para o comando `s' não pode ser zero (s///0)"
-#: sed/compile.c:177
+#: sed/compile.c:178
msgid "strings for `y' command are different lengths"
msgstr "os textos para o comando `y' têm tamanhos diferentes (y/abc/z/)"
-#: sed/compile.c:179
+#: sed/compile.c:180
msgid "delimiter character is not a single-byte character"
msgstr "o delimitador deve ser um caractere normal, ASCII"
-#: sed/compile.c:181
+#: sed/compile.c:182
msgid "expected newer version of sed"
msgstr "esperada uma versão mais recente do sed"
-#: sed/compile.c:183
+#: sed/compile.c:184
msgid "invalid usage of line address 0"
msgstr "uso incorreto do endereço de linha 0"
-#: sed/compile.c:184
+#: sed/compile.c:185
#, c-format
msgid "unknown command: `%c'"
msgstr "comando desconhecido: `%c'"
-#: sed/compile.c:186
+#: sed/compile.c:187
msgid "incomplete command"
msgstr "comando incompleto"
-#: sed/compile.c:188
+#: sed/compile.c:189
msgid "\":\" lacks a label"
msgstr "\":\" carece de uma marcação"
-#: sed/compile.c:190
+#: sed/compile.c:191
msgid "recursive escaping after \\c not allowed"
msgstr "escape recursivo após \\c não permitido"
-#: sed/compile.c:213
+#: sed/compile.c:193
+msgid "e/r/w commands disabled in sandbox mode"
+msgstr "comandos e/r/w desabilitados no modo sandbox"
+
+#: sed/compile.c:215
#, c-format
msgid "%s: file %s line %lu: %s\n"
msgstr "%s: arquivo %s linha %lu: %s\n"
-#: sed/compile.c:216
+#: sed/compile.c:218
#, c-format
msgid "%s: -e expression #%lu, char %lu: %s\n"
msgstr "%s: -e expressão #%lu, caractere %lu: %s\n"
-#: sed/compile.c:1644
+#: sed/compile.c:1607
#, c-format
msgid "can't find label for jump to `%s'"
-msgstr "não foi possível encontrar a marcação `%s'"
+msgstr "não foi possível encontrar a marcação \"%s\""
-#: sed/execute.c:254 sed/execute.c:271
+#: sed/execute.c:253 sed/execute.c:270
#, c-format
msgid "case conversion produced an invalid character"
msgstr "conversão maiúsculo/minúsculo produziu um caractere inválido"
-#: sed/execute.c:565
+#: sed/execute.c:561
#, c-format
msgid "%s: can't read %s: %s\n"
msgstr "%s: não foi possível ler %s: %s\n"
-#: sed/execute.c:590
+#: sed/execute.c:587
#, c-format
msgid "couldn't edit %s: is a terminal"
msgstr "não foi possível editar %s, pois é um terminal"
-#: sed/execute.c:595
+#: sed/execute.c:592
#, c-format
msgid "couldn't edit %s: not a regular file"
msgstr "não foi possível editar %s, pois não é um arquivo comum"
-#: sed/execute.c:606
+#: sed/execute.c:603
#, 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"
+"%s: aviso: falha ao definir o contexto de criação do arquivo padrão para %s: "
+"%s"
-#: sed/execute.c:614
+#: sed/execute.c:611
#, c-format
msgid "%s: warning: failed to get security context of %s: %s"
msgstr "%s: aviso: falha ao obter o contexto de segurança de %s: %s"
-#: sed/execute.c:633 sed/utils.c:178
+#: sed/execute.c:630 sed/utils.c:188
#, c-format
msgid "couldn't open temporary file %s: %s"
msgstr "não foi possível abrir o arquivo temporário %s: %s"
-#: sed/execute.c:1148 sed/execute.c:1358
+#: sed/execute.c:1167 sed/execute.c:1366
msgid "error in subprocess"
msgstr "erro no subprocesso"
-#: sed/execute.c:1150
+#: sed/execute.c:1169
msgid "option `e' not supported"
msgstr "sem suporte à opção `e'"
-#: sed/execute.c:1339
+#: sed/execute.c:1347
msgid "`e' command not supported"
msgstr "sem suporte ao comando `e'"
-#: sed/execute.c:1665
+#: sed/execute.c:1662
msgid "no input files"
msgstr "nenhum arquivo de entrada"
-#: sed/regexp.c:39
+#: sed/regexp.c:40
msgid "no previous regular expression"
msgstr "não há expressão regular anterior"
-#: sed/regexp.c:141
+#: sed/regexp.c:125
#, c-format
msgid "invalid reference \\%d on `s' command's RHS"
msgstr "referência inválida \\%d na segunda parte do comando `s'"
-#: sed/regexp.c:259
+#: sed/regexp.c:196
msgid "regex input buffer length larger than INT_MAX"
msgstr "tamanho do buffer de entrada da expressão regular maior que INT_MAX"
-#: sed/sed.c:35
+#: sed/sed.c:36
msgid "Jay Fenlason"
msgstr "Jay Fenlason"
-#: sed/sed.c:36
+#: sed/sed.c:37
msgid "Tom Lord"
msgstr "Tom Lord"
-#: sed/sed.c:37
+#: sed/sed.c:38
msgid "Ken Pizzini"
msgstr "Ken Pizzini"
-#: sed/sed.c:38
+#: sed/sed.c:39
msgid "Paolo Bonzini"
msgstr "Paolo Bonzini"
-#: sed/sed.c:113
+#: sed/sed.c:40
+msgid "Jim Meyering"
+msgstr "Jim Meyering"
+
+#: sed/sed.c:41
+msgid "Assaf Gordon"
+msgstr "Assaf Gordon"
+
+#: sed/sed.c:124
#, c-format
msgid ""
"GNU sed home page: <https://www.gnu.org/software/sed/>.\n"
@@ -610,20 +623,12 @@ msgstr ""
"Página do GNU sed: <https://www.gnu.org/software/sed/>.\n"
"Ajuda sobre softwares GNU: <https://www.gnu.org/gethelp/>.\n"
-#: sed/sed.c:120
+#: sed/sed.c:130
#, c-format
msgid "E-mail bug reports to: <%s>.\n"
msgstr "Envie relatórios de erros para: <%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"
-" usa sintaxe de expressões regulares do Perl 5 no script.\n"
-
-#: sed/sed.c:134
+#: sed/sed.c:138
#, c-format
msgid ""
"Usage: %s [OPTION]... {script-only-if-no-other-script} [input-file]...\n"
@@ -632,7 +637,7 @@ msgstr ""
"Uso: %s [OPÇÃO]... {script-apenas-se-for-único} [arquivo-entrada]...\n"
"\n"
-#: sed/sed.c:138
+#: sed/sed.c:142
#, c-format
msgid ""
" -n, --quiet, --silent\n"
@@ -641,7 +646,16 @@ msgstr ""
" -n, --quiet, --silent\n"
" suprime a impressão automática do buffer padrão\n"
-#: sed/sed.c:140
+#: sed/sed.c:144
+#, c-format
+msgid ""
+" --debug\n"
+" annotate program execution\n"
+msgstr ""
+" --debug\n"
+" anota a execução do programa\n"
+
+#: sed/sed.c:146
#, c-format
msgid ""
" -e script, --expression=script\n"
@@ -650,7 +664,7 @@ msgstr ""
" -e script, --expression=script\n"
" adiciona o script aos comandos a serem executados\n"
-#: sed/sed.c:142
+#: sed/sed.c:148
#, c-format
msgid ""
" -f script-file, --file=script-file\n"
@@ -661,7 +675,7 @@ msgstr ""
" adiciona o conteúdo do arquivo-script aos comandos\n"
" a serem executados\n"
-#: sed/sed.c:146
+#: sed/sed.c:152
#, c-format
msgid ""
" --follow-symlinks\n"
@@ -671,7 +685,7 @@ msgstr ""
" segue links simbólicos ao editar o próprio arquivo "
"original\n"
-#: sed/sed.c:149
+#: sed/sed.c:155
#, c-format
msgid ""
" -i[SUFFIX], --in-place[=SUFFIX]\n"
@@ -680,7 +694,7 @@ msgstr ""
" -i[SUFIXO], --in-place[=SUFIXO]\n"
" edita o arquivo original (faz backup se usado SUFIXO)\n"
-#: sed/sed.c:153
+#: sed/sed.c:158
#, c-format
msgid ""
" -b, --binary\n"
@@ -691,7 +705,7 @@ msgstr ""
" abre os arquivos em modo binário (CR+LFs não são "
"especiais)\n"
-#: sed/sed.c:157
+#: sed/sed.c:162
#, c-format
msgid ""
" -l N, --line-length=N\n"
@@ -700,7 +714,7 @@ msgstr ""
" -l N, --line-length=N\n"
" determina comprimento da quebra de linha para comando `l'\n"
-#: sed/sed.c:159
+#: sed/sed.c:164
#, c-format
msgid ""
" --posix\n"
@@ -709,7 +723,7 @@ msgstr ""
" --posix\n"
" desativa todas as extensões GNU.\n"
-#: sed/sed.c:161
+#: sed/sed.c:166
#, c-format
msgid ""
" -E, -r, --regexp-extended\n"
@@ -720,7 +734,7 @@ msgstr ""
" usa sintaxe moderna de expressões regulares, sem escapes.\n"
" (para portabilidade, use POSIX -E).\n"
-#: sed/sed.c:167
+#: sed/sed.c:169
#, c-format
msgid ""
" -s, --separate\n"
@@ -731,7 +745,7 @@ msgstr ""
" considera arquivos como entidades separadas, e não\n"
" como um longo e único fluxo de dados.\n"
-#: sed/sed.c:170
+#: sed/sed.c:172
#, c-format
msgid ""
" --sandbox\n"
@@ -740,7 +754,7 @@ msgstr ""
" --sandbox\n"
" opera em modo sandbox (desabilita comandos e/r/w).\n"
-#: sed/sed.c:172
+#: sed/sed.c:174
#, c-format
msgid ""
" -u, --unbuffered\n"
@@ -753,7 +767,7 @@ msgstr ""
"entrada\n"
" e descarrega os buffers de saída com mais frequência\n"
-#: sed/sed.c:175
+#: sed/sed.c:177
#, c-format
msgid ""
" -z, --null-data\n"
@@ -762,17 +776,17 @@ msgstr ""
" -z, --null-data\n"
" separa linhas por caracteres NULOs\n"
-#: sed/sed.c:177
+#: sed/sed.c:179
#, c-format
msgid " --help display this help and exit\n"
msgstr " --help mostra esta ajuda e sai\n"
-#: sed/sed.c:178
+#: sed/sed.c:180
#, c-format
msgid " --version output version information and exit\n"
msgstr " --version mostra informações sobre a versão e sai\n"
-#: sed/sed.c:179
+#: sed/sed.c:181
#, c-format
msgid ""
"\n"
@@ -790,48 +804,69 @@ msgstr ""
"seja especificado, então a entrada padrão será lida.\n"
"\n"
-#: sed/utils.c:73 sed/utils.c:384
+#: sed/sed.c:373
+msgid "failed to set binary mode on STDIN"
+msgstr "falha ao definir modo binário na STDIN"
+
+#: sed/sed.c:375
+msgid "failed to set binary mode on STDOUT"
+msgstr "falha ao definir modo binário na STDOUT"
+
+#: sed/utils.c:77 sed/utils.c:395
#, c-format
msgid "cannot remove %s: %s"
msgstr "não foi possível remover %s: %s"
-#: sed/utils.c:136
+#: sed/utils.c:146
#, c-format
msgid "couldn't open file %s: %s"
msgstr "não foi possível abrir o arquivo %s: %s"
-#: sed/utils.c:155
+#: sed/utils.c:165
#, c-format
msgid "couldn't attach to %s: %s"
msgstr "não foi possível anexar ao %s: %s"
#: sed/utils.c:192
#, c-format
+msgid "failed to set binary mode on '%s'"
+msgstr "falha ao definir modo binário em \"%s\""
+
+#: sed/utils.c:207
+#, 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 %llu item para %s: %s"
msgstr[1] "não foi possível escrever %llu itens para %s: %s"
-#: sed/utils.c:204 sed/utils.c:223
+#: sed/utils.c:219 sed/utils.c:238
#, c-format
msgid "read error on %s: %s"
msgstr "erro de leitura em %s: %s"
-#: sed/utils.c:325
+#: sed/utils.c:336
#, c-format
msgid "couldn't follow symlink %s: %s"
msgstr "não foi possível seguir o link %s: %s"
-#: sed/utils.c:359
+#: sed/utils.c:370
#, c-format
msgid "cannot stat %s: %s"
msgstr "não foi possível obter o estado de %s: %s"
-#: sed/utils.c:389
+#: sed/utils.c:400
#, c-format
msgid "cannot rename %s: %s"
msgstr "não foi possível renomear %s: %s"
+#~ msgid ""
+#~ " -R, --regexp-perl\n"
+#~ " use Perl 5's regular expressions syntax in the script.\n"
+#~ msgstr ""
+#~ " -R, --regexp-perl\n"
+#~ " usa sintaxe de expressões regulares do Perl 5 no "
+#~ "script.\n"
+
#~ msgid "%s: option '--%s' doesn't allow an argument\n"
#~ msgstr "%s: a opção \"--%s\" não permite um argumento\n"
diff --git a/po/ro.gmo b/po/ro.gmo
index 2c0f446..f43f1fc 100644
--- a/po/ro.gmo
+++ b/po/ro.gmo
Binary files differ
diff --git a/po/ro.po b/po/ro.po
index 2916025..3fc8d27 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: 2018-03-31 18:40-0700\n"
+"POT-Creation-Date: 2018-12-20 22:03-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"
@@ -28,42 +28,42 @@ msgstr ""
msgid "preserving permissions for %s"
msgstr ""
-#: lib/dfa.c:958
+#: lib/dfa.c:970
msgid "unbalanced ["
msgstr ""
-#: lib/dfa.c:1079
+#: lib/dfa.c:1091
#, fuzzy
msgid "invalid character class"
msgstr "Nume de clas de caractere incorect"
-#: lib/dfa.c:1205
+#: lib/dfa.c:1217
msgid "character class syntax is [[:space:]], not [:space:]"
msgstr ""
-#: lib/dfa.c:1272
+#: lib/dfa.c:1284
msgid "unfinished \\ escape"
msgstr ""
-#: lib/dfa.c:1433
+#: lib/dfa.c:1445
#, fuzzy
msgid "invalid content of \\{\\}"
msgstr "Coninut incorect pentru \\{\\}"
-#: lib/dfa.c:1436
+#: lib/dfa.c:1448
#, fuzzy
msgid "regular expression too big"
msgstr "Expresie regular prea mare"
-#: lib/dfa.c:1850
+#: lib/dfa.c:1863
msgid "unbalanced ("
msgstr ""
-#: lib/dfa.c:1968
+#: lib/dfa.c:1981
msgid "no syntax specified"
msgstr ""
-#: lib/dfa.c:1976
+#: lib/dfa.c:1992
msgid "unbalanced )"
msgstr ""
@@ -209,7 +209,7 @@ msgstr "Expresie regular prea mare"
msgid "Unmatched ) or \\)"
msgstr ") sau \\) fr pereche"
-#: lib/regcomp.c:689
+#: lib/regcomp.c:688
msgid "No previous regular expression"
msgstr "Nici o expresie regular anterioar"
@@ -218,12 +218,12 @@ msgstr "Nici o expresie regular anterioar"
msgid "setting permissions for %s"
msgstr ""
-#: lib/version-etc.c:74
+#: lib/version-etc.c:73
#, c-format
msgid "Packaged by %s (%s)\n"
msgstr ""
-#: lib/version-etc.c:77
+#: lib/version-etc.c:76
#, c-format
msgid "Packaged by %s\n"
msgstr ""
@@ -231,11 +231,11 @@ 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
+#: lib/version-etc.c:83
msgid "(C)"
msgstr ""
-#: lib/version-etc.c:86
+#: lib/version-etc.c:85
msgid ""
"\n"
"License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl."
@@ -414,189 +414,192 @@ msgstr "comand absent"
msgid "command only uses one address"
msgstr "comanda folosete numai o adres"
-#: sed/compile.c:164
+#: sed/compile.c:165
msgid "unterminated address regex"
msgstr "regex adres neterminat"
-#: sed/compile.c:165
+#: sed/compile.c:166
msgid "unterminated `s' command"
msgstr "comand `s' neterminat"
-#: sed/compile.c:166
+#: sed/compile.c:167
msgid "unterminated `y' command"
msgstr "comand `y' neterminat"
-#: sed/compile.c:167
+#: sed/compile.c:168
msgid "unknown option to `s'"
msgstr "opiune necunoscut pentru `s'"
-#: sed/compile.c:169
+#: sed/compile.c:170
msgid "multiple `p' options to `s' command"
msgstr "multiple opiuni `p' pentru comanda `s'"
-#: sed/compile.c:171
+#: sed/compile.c:172
msgid "multiple `g' options to `s' command"
msgstr "multiple opiuni `g' pentru comanda `s'"
-#: sed/compile.c:173
+#: sed/compile.c:174
msgid "multiple number options to `s' command"
msgstr "numr multiplu de opiuni pentru comanda `s'"
-#: sed/compile.c:175
+#: sed/compile.c:176
msgid "number option to `s' command may not be zero"
msgstr "numrul de opiuni pentru comanda `s' nu poate fi zero"
-#: sed/compile.c:177
+#: sed/compile.c:178
msgid "strings for `y' command are different lengths"
msgstr "irurile pentru comanda y au lungimi diferite"
-#: sed/compile.c:179
+#: sed/compile.c:180
msgid "delimiter character is not a single-byte character"
msgstr "caacterul delimitator nu este un caracter de un octet"
-#: sed/compile.c:181
+#: sed/compile.c:182
msgid "expected newer version of sed"
msgstr "am ateptat o versiune mai recent de sed"
-#: sed/compile.c:183
+#: sed/compile.c:184
msgid "invalid usage of line address 0"
msgstr "folosire invalid adres linie 0"
-#: sed/compile.c:184
+#: sed/compile.c:185
#, c-format
msgid "unknown command: `%c'"
msgstr "comand necunoscut: `%c'"
-#: sed/compile.c:186
+#: sed/compile.c:187
#, fuzzy
msgid "incomplete command"
msgstr "comand absent"
-#: sed/compile.c:188
+#: sed/compile.c:189
msgid "\":\" lacks a label"
msgstr ""
-#: sed/compile.c:190
+#: sed/compile.c:191
msgid "recursive escaping after \\c not allowed"
msgstr ""
-#: sed/compile.c:213
+#: sed/compile.c:193
+msgid "e/r/w commands disabled in sandbox mode"
+msgstr ""
+
+#: sed/compile.c:215
#, c-format
msgid "%s: file %s line %lu: %s\n"
msgstr "%s: fiierul %s linia %lu: %s\n"
-#: sed/compile.c:216
+#: sed/compile.c:218
#, c-format
msgid "%s: -e expression #%lu, char %lu: %s\n"
msgstr "%s: -e expresia #%lu, caracterul %lu: %s\n"
-#: sed/compile.c:1644
+#: sed/compile.c:1607
#, c-format
msgid "can't find label for jump to `%s'"
msgstr "nu pot gsi eticheta pentru saltul la `%s'"
-#: sed/execute.c:254 sed/execute.c:271
+#: sed/execute.c:253 sed/execute.c:270
#, c-format
msgid "case conversion produced an invalid character"
msgstr ""
-#: sed/execute.c:565
+#: sed/execute.c:561
#, c-format
msgid "%s: can't read %s: %s\n"
msgstr "%s: nu pot citi %s: %s\n"
-#: sed/execute.c:590
+#: sed/execute.c:587
#, c-format
msgid "couldn't edit %s: is a terminal"
msgstr "nu am putut edita %s: acesta este un terminal"
-#: sed/execute.c:595
+#: sed/execute.c:592
#, 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:606
+#: sed/execute.c:603
#, c-format
msgid "%s: warning: failed to set default file creation context to %s: %s"
msgstr ""
-#: sed/execute.c:614
+#: sed/execute.c:611
#, c-format
msgid "%s: warning: failed to get security context of %s: %s"
msgstr ""
-#: sed/execute.c:633 sed/utils.c:178
+#: sed/execute.c:630 sed/utils.c:188
#, c-format
msgid "couldn't open temporary file %s: %s"
msgstr "nu am putut deschide fiierul temporar %s: %s"
-#: sed/execute.c:1148 sed/execute.c:1358
+#: sed/execute.c:1167 sed/execute.c:1366
msgid "error in subprocess"
msgstr "eroare n subproces"
-#: sed/execute.c:1150
+#: sed/execute.c:1169
msgid "option `e' not supported"
msgstr "opiunea `e' nu e suportat"
-#: sed/execute.c:1339
+#: sed/execute.c:1347
msgid "`e' command not supported"
msgstr "comanda `e' nu e suportat"
-#: sed/execute.c:1665
+#: sed/execute.c:1662
msgid "no input files"
msgstr ""
-#: sed/regexp.c:39
+#: sed/regexp.c:40
msgid "no previous regular expression"
msgstr "nici o expresie regular anterioar"
-#: sed/regexp.c:141
+#: sed/regexp.c:125
#, c-format
msgid "invalid reference \\%d on `s' command's RHS"
msgstr "referin invalid \\%d pentru expresia din dreapta a comenzii `s'"
-#: sed/regexp.c:259
+#: sed/regexp.c:196
msgid "regex input buffer length larger than INT_MAX"
msgstr ""
-#: sed/sed.c:35
+#: sed/sed.c:36
msgid "Jay Fenlason"
msgstr ""
-#: sed/sed.c:36
+#: sed/sed.c:37
msgid "Tom Lord"
msgstr ""
-#: sed/sed.c:37
+#: sed/sed.c:38
msgid "Ken Pizzini"
msgstr ""
-#: sed/sed.c:38
+#: sed/sed.c:39
msgid "Paolo Bonzini"
msgstr ""
-#: sed/sed.c:113
+#: sed/sed.c:40
+msgid "Jim Meyering"
+msgstr ""
+
+#: sed/sed.c:41
+msgid "Assaf Gordon"
+msgstr ""
+
+#: sed/sed.c:124
#, c-format
msgid ""
"GNU sed home page: <https://www.gnu.org/software/sed/>.\n"
"General help using GNU software: <https://www.gnu.org/gethelp/>.\n"
msgstr ""
-#: sed/sed.c:120
+#: sed/sed.c:130
#, c-format
msgid "E-mail bug reports to: <%s>.\n"
msgstr ""
-#: 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"
-" folosete sintaxa expresiilor regulare din Perl 5 n "
-"script.\n"
-
-#: sed/sed.c:134
+#: sed/sed.c:138
#, c-format
msgid ""
"Usage: %s [OPTION]... {script-only-if-no-other-script} [input-file]...\n"
@@ -605,7 +608,7 @@ msgstr ""
"Folosire: %s [OPIUNE]... {script-dac-nu-alt-script} [fiier-intrare]...\n"
"\n"
-#: sed/sed.c:138
+#: sed/sed.c:142
#, c-format
msgid ""
" -n, --quiet, --silent\n"
@@ -614,7 +617,16 @@ msgstr ""
" -n, --quiet, --silent\n"
" elimin afiarea automat a spaiului de pattern\n"
-#: sed/sed.c:140
+#: sed/sed.c:144
+#, fuzzy, c-format
+msgid ""
+" --debug\n"
+" annotate program execution\n"
+msgstr ""
+" --posix\n"
+" deactiveaz toate extensiile GNU.\n"
+
+#: sed/sed.c:146
#, c-format
msgid ""
" -e script, --expression=script\n"
@@ -623,7 +635,7 @@ msgstr ""
" -e script, --expression=script\n"
" adaug scriptul la comenzile ce trebuie executate\n"
-#: sed/sed.c:142
+#: sed/sed.c:148
#, c-format
msgid ""
" -f script-file, --file=script-file\n"
@@ -634,14 +646,14 @@ msgstr ""
" adaug coninutul scriptului-fiier la comenzile ce\n"
" trebuie executate\n"
-#: sed/sed.c:146
+#: sed/sed.c:152
#, c-format
msgid ""
" --follow-symlinks\n"
" follow symlinks when processing in place\n"
msgstr ""
-#: sed/sed.c:149
+#: sed/sed.c:155
#, fuzzy, c-format
msgid ""
" -i[SUFFIX], --in-place[=SUFFIX]\n"
@@ -651,7 +663,7 @@ msgstr ""
" editeaz fiierele pe loc (creaz copii de siguran\n"
" dac este furnizat extensia)\n"
-#: sed/sed.c:153
+#: sed/sed.c:158
#, c-format
msgid ""
" -b, --binary\n"
@@ -659,7 +671,7 @@ msgid ""
"specially)\n"
msgstr ""
-#: sed/sed.c:157
+#: sed/sed.c:162
#, c-format
msgid ""
" -l N, --line-length=N\n"
@@ -669,7 +681,7 @@ msgstr ""
" specific lungimea dorit pentru trecut la linia urmtoare\n"
" pentru comanda `l'\n"
-#: sed/sed.c:159
+#: sed/sed.c:164
#, c-format
msgid ""
" --posix\n"
@@ -678,7 +690,7 @@ msgstr ""
" --posix\n"
" deactiveaz toate extensiile GNU.\n"
-#: sed/sed.c:161
+#: sed/sed.c:166
#, fuzzy, c-format
msgid ""
" -E, -r, --regexp-extended\n"
@@ -689,7 +701,7 @@ msgstr ""
" folosete sintaxa extins a expresiilor regulare n "
"script.\n"
-#: sed/sed.c:167
+#: sed/sed.c:169
#, fuzzy, c-format
msgid ""
" -s, --separate\n"
@@ -700,14 +712,14 @@ msgstr ""
" consider fiierele ca fiind separate, n loc de a le\n"
" considera un flux lung continuu.\n"
-#: sed/sed.c:170
+#: sed/sed.c:172
#, c-format
msgid ""
" --sandbox\n"
" operate in sandbox mode (disable e/r/w commands).\n"
msgstr ""
-#: sed/sed.c:172
+#: sed/sed.c:174
#, c-format
msgid ""
" -u, --unbuffered\n"
@@ -720,24 +732,24 @@ msgstr ""
"intrare\n"
" i golete bufferele mai des\n"
-#: sed/sed.c:175
+#: sed/sed.c:177
#, c-format
msgid ""
" -z, --null-data\n"
" separate lines by NUL characters\n"
msgstr ""
-#: sed/sed.c:177
+#: sed/sed.c:179
#, c-format
msgid " --help display this help and exit\n"
msgstr " --help afieaz aceste mesaje i termin\n"
-#: sed/sed.c:178
+#: sed/sed.c:180
#, c-format
msgid " --version output version information and exit\n"
msgstr " --version afieaz informaii despre versiune i termin\n"
-#: sed/sed.c:179
+#: sed/sed.c:181
#, c-format
msgid ""
"\n"
@@ -756,48 +768,69 @@ msgstr ""
"standard.\n"
"\n"
-#: sed/utils.c:73 sed/utils.c:384
+#: sed/sed.c:373
+msgid "failed to set binary mode on STDIN"
+msgstr ""
+
+#: sed/sed.c:375
+msgid "failed to set binary mode on STDOUT"
+msgstr ""
+
+#: sed/utils.c:77 sed/utils.c:395
#, c-format
msgid "cannot remove %s: %s"
msgstr "nu pot terge %s: %s"
-#: sed/utils.c:136
+#: sed/utils.c:146
#, c-format
msgid "couldn't open file %s: %s"
msgstr "nu am putut deschide fiierul %s: %s"
-#: sed/utils.c:155
+#: sed/utils.c:165
#, fuzzy, c-format
msgid "couldn't attach to %s: %s"
msgstr "Nu am putut scrie %d articol n %s: %s"
#: sed/utils.c:192
+#, c-format
+msgid "failed to set binary mode on '%s'"
+msgstr ""
+
+#: sed/utils.c:207
#, 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:204 sed/utils.c:223
+#: sed/utils.c:219 sed/utils.c:238
#, c-format
msgid "read error on %s: %s"
msgstr "eroare citire pentru %s: %s"
-#: sed/utils.c:325
+#: sed/utils.c:336
#, fuzzy, c-format
msgid "couldn't follow symlink %s: %s"
msgstr "nu am putut deschide fiierul %s: %s"
-#: sed/utils.c:359
+#: sed/utils.c:370
#, fuzzy, c-format
msgid "cannot stat %s: %s"
msgstr "nu pot redenumi %s: %s"
-#: sed/utils.c:389
+#: sed/utils.c:400
#, c-format
msgid "cannot rename %s: %s"
msgstr "nu pot redenumi %s: %s"
+#~ msgid ""
+#~ " -R, --regexp-perl\n"
+#~ " use Perl 5's regular expressions syntax in the script.\n"
+#~ msgstr ""
+#~ " -R, --regexp-perl\n"
+#~ " folosete sintaxa expresiilor regulare din Perl 5 n "
+#~ "script.\n"
+
#~ msgid "cannot specify modifiers on empty regexp"
#~ msgstr "nu se pot specifica modificatori pentru regexp vid"
diff --git a/po/ru.gmo b/po/ru.gmo
index 70b2802..97d2fe6 100644
--- a/po/ru.gmo
+++ b/po/ru.gmo
Binary files differ
diff --git a/po/ru.po b/po/ru.po
index c377ff3..e65146b 100644
--- a/po/ru.po
+++ b/po/ru.po
@@ -4,13 +4,13 @@
#
# Const Kaplinsky <const@ce.cctpu.edu.ru>, 1998.
# Pavel Maryanov <acid_jack@ukr.net>, 2004, 2008.
-# Yuri Kozlov <yuray@komyakino.ru>, 2013, 2016.
+# Yuri Kozlov <yuray@komyakino.ru>, 2013, 2016, 2018.
msgid ""
msgstr ""
-"Project-Id-Version: sed 4.2.2.177\n"
+"Project-Id-Version: sed 4.4.104\n"
"Report-Msgid-Bugs-To: bug-gnu-utils@gnu.org\n"
-"POT-Creation-Date: 2018-03-31 18:40-0700\n"
-"PO-Revision-Date: 2016-12-06 19:25+0300\n"
+"POT-Creation-Date: 2018-12-20 22:03-0800\n"
+"PO-Revision-Date: 2018-04-01 08:46+0300\n"
"Last-Translator: Yuri Kozlov <yuray@komyakino.ru>\n"
"Language-Team: Russian <gnu@d07.ru>\n"
"Language: ru\n"
@@ -20,7 +20,7 @@ msgstr ""
"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"
+"X-Generator: Lokalize 2.0\n"
#: lib/closeout.c:122
msgid "write error"
@@ -31,39 +31,39 @@ msgstr "ошибка записи"
msgid "preserving permissions for %s"
msgstr "сохранение прав доступа для %s"
-#: lib/dfa.c:958
+#: lib/dfa.c:970
msgid "unbalanced ["
msgstr "несбалансированная ["
-#: lib/dfa.c:1079
+#: lib/dfa.c:1091
msgid "invalid character class"
msgstr "неправильный класс символов"
-#: lib/dfa.c:1205
+#: lib/dfa.c:1217
msgid "character class syntax is [[:space:]], not [:space:]"
msgstr "синтаксис класса символов: [[:space:]], а не [:space:]"
-#: lib/dfa.c:1272
+#: lib/dfa.c:1284
msgid "unfinished \\ escape"
msgstr "незавершённая \\ экранирующая последовательность"
-#: lib/dfa.c:1433
+#: lib/dfa.c:1445
msgid "invalid content of \\{\\}"
msgstr "неправильное содержимое в \\{\\}"
-#: lib/dfa.c:1436
+#: lib/dfa.c:1448
msgid "regular expression too big"
msgstr "регулярное выражение слишком большое"
-#: lib/dfa.c:1850
+#: lib/dfa.c:1863
msgid "unbalanced ("
msgstr "несбалансированная ("
-#: lib/dfa.c:1968
+#: lib/dfa.c:1981
msgid "no syntax specified"
msgstr "не указан синтаксис"
-#: lib/dfa.c:1976
+#: lib/dfa.c:1992
msgid "unbalanced )"
msgstr "несбалансированная )"
@@ -72,29 +72,29 @@ msgid "Unknown system error"
msgstr "Неизвестная системная ошибка"
#: lib/getopt.c:278
-#, fuzzy, c-format
+#, c-format
msgid "%s: option '%s%s' is ambiguous\n"
-msgstr "%s: двусмысленный параметр «%s»\n"
+msgstr "%s: двусмысленный параметр «%s%s»\n"
#: lib/getopt.c:284
-#, fuzzy, c-format
+#, c-format
msgid "%s: option '%s%s' is ambiguous; possibilities:"
-msgstr "%s: двусмысленный параметр «%s»; возможные варианты:"
+msgstr "%s: двусмысленный параметр «%s%s»; возможные варианты:"
#: lib/getopt.c:319
-#, fuzzy, c-format
+#, c-format
msgid "%s: unrecognized option '%s%s'\n"
-msgstr "%s: нераспознанный параметр «%c%s»\n"
+msgstr "%s: нераспознанный параметр «%s%s»\n"
#: lib/getopt.c:345
-#, fuzzy, c-format
+#, c-format
msgid "%s: option '%s%s' doesn't allow an argument\n"
-msgstr "%s: у параметра «%c%s» не может быть аргумента\n"
+msgstr "%s: для параметра «%s%s» не может быть аргумента\n"
#: lib/getopt.c:360
-#, fuzzy, c-format
+#, c-format
msgid "%s: option '%s%s' requires an argument\n"
-msgstr "%s: для параметра «--%s» требуется аргумент\n"
+msgstr "%s: для параметра «%s%s» требуется аргумент\n"
#: lib/getopt.c:621
#, c-format
@@ -207,7 +207,7 @@ msgstr "Регулярное выражение слишком большое"
msgid "Unmatched ) or \\)"
msgstr "Непарный символ ) или \\)"
-#: lib/regcomp.c:689
+#: lib/regcomp.c:688
msgid "No previous regular expression"
msgstr "Нет предыдущего регулярного выражения"
@@ -216,12 +216,12 @@ msgstr "Нет предыдущего регулярного выражения"
msgid "setting permissions for %s"
msgstr "установка прав доступа для %s"
-#: lib/version-etc.c:74
+#: lib/version-etc.c:73
#, c-format
msgid "Packaged by %s (%s)\n"
msgstr "Упакован %s (%s)\n"
-#: lib/version-etc.c:77
+#: lib/version-etc.c:76
#, c-format
msgid "Packaged by %s\n"
msgstr "Упакован %s\n"
@@ -229,12 +229,11 @@ 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
+#: lib/version-etc.c:83
msgid "(C)"
msgstr "©"
-#: lib/version-etc.c:86
-#, fuzzy
+#: lib/version-etc.c:85
msgid ""
"\n"
"License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl."
@@ -244,9 +243,9 @@ msgid ""
"\n"
msgstr ""
"\n"
-"Лицензия GPLv3+: GNU GPL версии 3 или новее <http://gnu.org/licenses/gpl."
+"Лицензия GPLv3+: GNU GPL версии 3 или новее <https://gnu.org/licenses/gpl."
"html>\n"
-"Это свободное ПО: вы можете продавать и распространять его.\n"
+"Это свободное ПО: вы можете изменять и распространять его.\n"
"Нет НИКАКИХ ГАРАНТИЙ до степени, разрешённой законом.\n"
"\n"
@@ -383,14 +382,13 @@ msgid "%s home page: <%s>\n"
msgstr "Домашняя страница %s: <%s>\n"
#: lib/version-etc.c:253
-#, fuzzy, c-format
+#, c-format
msgid "%s home page: <https://www.gnu.org/software/%s/>\n"
-msgstr "Домашняя страница %s: <http://www.gnu.org/software/%s/>\n"
+msgstr "Домашняя страница %s: <https://www.gnu.org/software/%s/>\n"
#: lib/version-etc.c:256
-#, fuzzy
msgid "General help using GNU software: <https://www.gnu.org/gethelp/>\n"
-msgstr "Справка по работе с программами GNU: <http://www.gnu.org/gethelp/>\n"
+msgstr "Справка по работе с программами GNU: <https://www.gnu.org/gethelp/>\n"
#: sed/compile.c:146
msgid "multiple `!'s"
@@ -440,230 +438,242 @@ msgstr "отсутствует команда"
msgid "command only uses one address"
msgstr "команда использует только один адрес"
-#: sed/compile.c:164
+#: sed/compile.c:165
msgid "unterminated address regex"
msgstr "незавершенное адресное регулярное выражение"
-#: sed/compile.c:165
+#: sed/compile.c:166
msgid "unterminated `s' command"
msgstr "незавершенная команда `s'"
-#: sed/compile.c:166
+#: sed/compile.c:167
msgid "unterminated `y' command"
msgstr "незавершенная команда `y'"
-#: sed/compile.c:167
+#: sed/compile.c:168
msgid "unknown option to `s'"
msgstr "неизвестный модификатор к `s'"
-#: sed/compile.c:169
+#: sed/compile.c:170
msgid "multiple `p' options to `s' command"
msgstr "несколько модификаторов `p' с командой `s'"
-#: sed/compile.c:171
+#: sed/compile.c:172
msgid "multiple `g' options to `s' command"
msgstr "несколько модификаторов `g' с командой `s'"
-#: sed/compile.c:173
+#: sed/compile.c:174
msgid "multiple number options to `s' command"
msgstr "несколько числовых модификаторов с командой `s'"
-#: sed/compile.c:175
+#: sed/compile.c:176
msgid "number option to `s' command may not be zero"
msgstr "числовой модификатор для команды `s' не может быть нулевым"
-#: sed/compile.c:177
+#: sed/compile.c:178
msgid "strings for `y' command are different lengths"
msgstr "строки для команды `y' имеют разную длину"
-#: sed/compile.c:179
+#: sed/compile.c:180
msgid "delimiter character is not a single-byte character"
msgstr "символ-разделитель не является однобайтовым символом"
-#: sed/compile.c:181
+#: sed/compile.c:182
msgid "expected newer version of sed"
msgstr "ожидалась более новая версия sed"
-#: sed/compile.c:183
+#: sed/compile.c:184
msgid "invalid usage of line address 0"
msgstr "недопустимое использование строки адреса 0"
-#: sed/compile.c:184
+#: sed/compile.c:185
#, c-format
msgid "unknown command: `%c'"
msgstr "неизвестная команда: `%c'"
-#: sed/compile.c:186
+#: sed/compile.c:187
msgid "incomplete command"
msgstr "незавершённая команда"
-#: sed/compile.c:188
+#: sed/compile.c:189
msgid "\":\" lacks a label"
msgstr "у «:» отсутствует метка"
-#: sed/compile.c:190
+#: sed/compile.c:191
msgid "recursive escaping after \\c not allowed"
msgstr "рекурсивное экранирование после \\c запрещено"
-#: sed/compile.c:213
+#: sed/compile.c:193
+msgid "e/r/w commands disabled in sandbox mode"
+msgstr ""
+
+#: sed/compile.c:215
#, c-format
msgid "%s: file %s line %lu: %s\n"
msgstr "%s: файл %s строка %lu: %s\n"
-#: sed/compile.c:216
+#: sed/compile.c:218
#, c-format
msgid "%s: -e expression #%lu, char %lu: %s\n"
msgstr "%s: -e выражение #%lu, символ %lu: %s\n"
-#: sed/compile.c:1644
+#: sed/compile.c:1607
#, c-format
msgid "can't find label for jump to `%s'"
msgstr "невозможно найти метку для перехода к `%s'"
-#: sed/execute.c:254 sed/execute.c:271
+#: sed/execute.c:253 sed/execute.c:270
#, c-format
msgid "case conversion produced an invalid character"
msgstr "при преобразовании регистра получился некорректный символ"
-#: sed/execute.c:565
+#: sed/execute.c:561
#, c-format
msgid "%s: can't read %s: %s\n"
msgstr "%s: невозможно прочитать %s: %s\n"
-#: sed/execute.c:590
+#: sed/execute.c:587
#, c-format
msgid "couldn't edit %s: is a terminal"
msgstr "невозможно редактировать %s: это терминал"
-#: sed/execute.c:595
+#: sed/execute.c:592
#, c-format
msgid "couldn't edit %s: not a regular file"
msgstr "невозможно редактировать %s: это не обычный файл"
-#: sed/execute.c:606
+#: sed/execute.c:603
#, c-format
msgid "%s: warning: failed to set default file creation context to %s: %s"
msgstr ""
"%s: предупреждение: не удалось установить контекст безопасности файла по "
"умолчанию в %s: %s"
-#: sed/execute.c:614
+#: sed/execute.c:611
#, c-format
msgid "%s: warning: failed to get security context of %s: %s"
msgstr "%s: предупреждение: не удалось получить контекст безопасности %s: %s"
-#: sed/execute.c:633 sed/utils.c:178
+#: sed/execute.c:630 sed/utils.c:188
#, c-format
msgid "couldn't open temporary file %s: %s"
msgstr "невозможно открыть временный файл %s: %s"
-#: sed/execute.c:1148 sed/execute.c:1358
+#: sed/execute.c:1167 sed/execute.c:1366
msgid "error in subprocess"
msgstr "ошибка в подпроцессе"
-#: sed/execute.c:1150
+#: sed/execute.c:1169
msgid "option `e' not supported"
-msgstr "опция `e' не поддерживается"
+msgstr "параметр «e» не поддерживается"
-#: sed/execute.c:1339
+#: sed/execute.c:1347
msgid "`e' command not supported"
-msgstr "команда `e' не поддерживается"
+msgstr "команда «e» не поддерживается"
-#: sed/execute.c:1665
+#: sed/execute.c:1662
msgid "no input files"
msgstr "отсутствуют входные файлы"
-#: sed/regexp.c:39
+#: sed/regexp.c:40
msgid "no previous regular expression"
msgstr "нет предыдущего регулярного выражения"
-#: sed/regexp.c:141
+#: sed/regexp.c:125
#, c-format
msgid "invalid reference \\%d on `s' command's RHS"
-msgstr "недопустимая ссылка \\%d на RHS команды `s'"
+msgstr "недопустимая ссылка \\%d на RHS команды «s»"
-#: sed/regexp.c:259
+#: sed/regexp.c:196
msgid "regex input buffer length larger than INT_MAX"
-msgstr ""
+msgstr "длина входного буфера регулярного выражения больше INT_MAX"
-#: sed/sed.c:35
+#: sed/sed.c:36
msgid "Jay Fenlason"
msgstr "Джей Фенласон (Jay Fenlason)"
-#: sed/sed.c:36
+#: sed/sed.c:37
msgid "Tom Lord"
msgstr "Том Лорд (Tom Lord)"
-#: sed/sed.c:37
+#: sed/sed.c:38
msgid "Ken Pizzini"
msgstr "Кен Пиццини (Ken Pizzini)"
-#: sed/sed.c:38
+#: sed/sed.c:39
msgid "Paolo Bonzini"
msgstr "Паоло Бонзини (Paolo Bonzini)"
-#: sed/sed.c:113
-#, fuzzy, c-format
+#: sed/sed.c:40
+msgid "Jim Meyering"
+msgstr ""
+
+#: sed/sed.c:41
+msgid "Assaf Gordon"
+msgstr ""
+
+#: sed/sed.c:124
+#, c-format
msgid ""
"GNU sed home page: <https://www.gnu.org/software/sed/>.\n"
"General help using GNU software: <https://www.gnu.org/gethelp/>.\n"
msgstr ""
-"Домашняя страница GNU sed: <http://www.gnu.org/software/sed/>.\n"
-"Справка по работе с программами GNU: <http://www.gnu.org/gethelp/>.\n"
+"Домашняя страница GNU sed: <https://www.gnu.org/software/sed/>.\n"
+"Справка по работе с программами GNU: <https://www.gnu.org/gethelp/>.\n"
-#: sed/sed.c:120
+#: sed/sed.c:130
#, 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
+#: sed/sed.c:138
#, c-format
msgid ""
"Usage: %s [OPTION]... {script-only-if-no-other-script} [input-file]...\n"
"\n"
msgstr ""
-"Использование: %s [ОПЦИЯ]... {только-скрипт-если-нет-другого-скрипта} "
-"[входной-файл]...\n"
+"Использование: %s [ПАРАМЕТР]… {только-сценарий-если-нет-другого-сценария}\n"
+" [входной-файл]…\n"
"\n"
-#: sed/sed.c:138
+#: sed/sed.c:142
#, c-format
msgid ""
" -n, --quiet, --silent\n"
" suppress automatic printing of pattern space\n"
msgstr ""
" -n, --quiet, --silent\n"
-" не выводить автоматически промежутки\n"
+" выключить автоматическую печать образца\n"
-#: sed/sed.c:140
+#: sed/sed.c:144
+#, fuzzy, c-format
+msgid ""
+" --debug\n"
+" annotate program execution\n"
+msgstr ""
+" --posix\n"
+" отключить все расширения GNU\n"
+
+#: sed/sed.c:146
#, c-format
msgid ""
" -e script, --expression=script\n"
" add the script to the commands to be executed\n"
msgstr ""
-" -e script, --expression=script\n"
-" добавление скрипта в исполняемые команды\n"
+" -e script, --expression=сценарий\n"
+" добавить сценарий в исполняемые команды\n"
-#: sed/sed.c:142
+#: sed/sed.c:148
#, 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"
-" добавление содержимого файла-скрипта в исполняемые команды\n"
+" -f script-file, --file=файл-сценария\n"
+" добавить содержимое файла-сценария в исполняемые команды\n"
-#: sed/sed.c:146
+#: sed/sed.c:152
#, c-format
msgid ""
" --follow-symlinks\n"
@@ -672,17 +682,17 @@ msgstr ""
" --follow-symlinks\n"
" переходить по символьным ссылкам при обработке на месте\n"
-#: sed/sed.c:149
+#: sed/sed.c:155
#, 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"
-#: sed/sed.c:153
+#: sed/sed.c:158
#, c-format
msgid ""
" -b, --binary\n"
@@ -690,28 +700,28 @@ msgid ""
"specially)\n"
msgstr ""
" -b, --binary\n"
-" открывать файлы в бинарном режиме (CR+LF не "
+" открывать файлы в двоичном режиме (CR+LF не "
"обрабатываются)\n"
-#: sed/sed.c:157
+#: sed/sed.c:162
#, 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"
+" задать желаемую длину до переноса строки для команды «l»\n"
-#: sed/sed.c:159
+#: sed/sed.c:164
#, c-format
msgid ""
" --posix\n"
" disable all GNU extensions.\n"
msgstr ""
" --posix\n"
-" отключение всех расширений GNU.\n"
+" отключить все расширения GNU\n"
-#: sed/sed.c:161
+#: sed/sed.c:166
#, c-format
msgid ""
" -E, -r, --regexp-extended\n"
@@ -719,10 +729,10 @@ msgid ""
" (for portability use POSIX -E).\n"
msgstr ""
" -E, -r, --regexp-extended\n"
-" использование в скрипте расширенных регулярных выражений\n"
+" использовать в сценарии расширенные регулярные выражения\n"
" (для переносимости используйте -E (POSIX)\n"
-#: sed/sed.c:167
+#: sed/sed.c:169
#, c-format
msgid ""
" -s, --separate\n"
@@ -730,19 +740,20 @@ msgid ""
" continuous long stream.\n"
msgstr ""
" -s, --separate\n"
-" допущение, что файлы разделены, а не в виде одного\n"
+" рассматривать файлы раздельно, а не в виде одного\n"
" длинного непрерывного потока\n"
-#: sed/sed.c:170
-#, fuzzy, c-format
+#: sed/sed.c:172
+#, c-format
msgid ""
" --sandbox\n"
" operate in sandbox mode (disable e/r/w commands).\n"
msgstr ""
" --sandbox\n"
" работать в режиме «песочницы»\n"
+" (отключает команды e/r/w)\n"
-#: sed/sed.c:172
+#: sed/sed.c:174
#, c-format
msgid ""
" -u, --unbuffered\n"
@@ -751,10 +762,10 @@ msgid ""
" the output buffers more often\n"
msgstr ""
" -u, --unbuffered\n"
-" загрузка минимального объема данных из входных файлов\n"
-" и более частый сброс на диск выходных буферов\n"
+" загружать минимальный объём данных из входных файлов\n"
+" и чаще сбрасывать выходные буферы на диск\n"
-#: sed/sed.c:175
+#: sed/sed.c:177
#, c-format
msgid ""
" -z, --null-data\n"
@@ -763,17 +774,17 @@ msgstr ""
" -z, --null-data\n"
" разделять строки символами NUL\n"
-#: sed/sed.c:177
+#: sed/sed.c:179
#, c-format
msgid " --help display this help and exit\n"
-msgstr " --help вывод этой справки и выход\n"
+msgstr " --help показать эту справку и выйти\n"
-#: sed/sed.c:178
+#: sed/sed.c:180
#, c-format
msgid " --version output version information and exit\n"
-msgstr " --version вывод информации о версии и выход\n"
+msgstr " --version показать информацию о версии и выйти\n"
-#: sed/sed.c:179
+#: sed/sed.c:181
#, c-format
msgid ""
"\n"
@@ -784,55 +795,76 @@ msgid ""
"\n"
msgstr ""
"\n"
-"Если опция -e, --expression, -f, или --file не указана, тогда первый\n"
-"необязательный аргумент берётся как скрипт sed для интерпретации. Все\n"
-"оставшиеся аргументы являются именами входных файлов; если входные\n"
+"Если не указан параметр -e, --expression, -f или --file, то в качестве\n"
+"интерпретируемого сценария sed берётся первый необязательный аргумент.\n"
+"Все оставшиеся аргументы являются именами входных файлов; если входные\n"
"файлы не указаны, тогда читается стандартный ввод.\n"
"\n"
-#: sed/utils.c:73 sed/utils.c:384
+#: sed/sed.c:373
+msgid "failed to set binary mode on STDIN"
+msgstr ""
+
+#: sed/sed.c:375
+msgid "failed to set binary mode on STDOUT"
+msgstr ""
+
+#: sed/utils.c:77 sed/utils.c:395
#, c-format
msgid "cannot remove %s: %s"
msgstr "невозможно удалить %s: %s"
-#: sed/utils.c:136
+#: sed/utils.c:146
#, c-format
msgid "couldn't open file %s: %s"
msgstr "невозможно открыть файл %s: %s"
-#: sed/utils.c:155
+#: sed/utils.c:165
#, c-format
msgid "couldn't attach to %s: %s"
msgstr "невозможно прикрепить к %s: %s"
#: sed/utils.c:192
#, c-format
+msgid "failed to set binary mode on '%s'"
+msgstr ""
+
+#: sed/utils.c:207
+#, 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"
msgstr[2] "невозможно записать %llu элементов в %s: %s"
-#: sed/utils.c:204 sed/utils.c:223
+#: sed/utils.c:219 sed/utils.c:238
#, c-format
msgid "read error on %s: %s"
msgstr "ошибка чтения %s: %s"
-#: sed/utils.c:325
+#: sed/utils.c:336
#, c-format
msgid "couldn't follow symlink %s: %s"
msgstr "невозможно перейти по символьной ссылке %s: %s"
-#: sed/utils.c:359
+#: sed/utils.c:370
#, c-format
msgid "cannot stat %s: %s"
msgstr "невозможно выполнить stat для %s: %s"
-#: sed/utils.c:389
+#: sed/utils.c:400
#, c-format
msgid "cannot rename %s: %s"
msgstr "невозможно переименовать %s: %s"
+#~ msgid ""
+#~ " -R, --regexp-perl\n"
+#~ " use Perl 5's regular expressions syntax in the script.\n"
+#~ msgstr ""
+#~ " -R, --regexp-perl\n"
+#~ " использовать в сценарии синтаксис регулярных выражений "
+#~ "Perl 5\n"
+
#~ msgid "%s: option '--%s' doesn't allow an argument\n"
#~ msgstr "%s: у параметра «--%s» не может быть аргумента\n"
diff --git a/po/sed.pot b/po/sed.pot
index d3cabeb..7ad4c88 100644
--- a/po/sed.pot
+++ b/po/sed.pot
@@ -6,9 +6,9 @@
#, fuzzy
msgid ""
msgstr ""
-"Project-Id-Version: GNU sed 4.5\n"
+"Project-Id-Version: GNU sed 4.7\n"
"Report-Msgid-Bugs-To: bug-gnu-utils@gnu.org\n"
-"POT-Creation-Date: 2018-03-31 18:40-0700\n"
+"POT-Creation-Date: 2018-12-20 22:03-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"
@@ -27,39 +27,39 @@ msgstr ""
msgid "preserving permissions for %s"
msgstr ""
-#: lib/dfa.c:958
+#: lib/dfa.c:970
msgid "unbalanced ["
msgstr ""
-#: lib/dfa.c:1079
+#: lib/dfa.c:1091
msgid "invalid character class"
msgstr ""
-#: lib/dfa.c:1205
+#: lib/dfa.c:1217
msgid "character class syntax is [[:space:]], not [:space:]"
msgstr ""
-#: lib/dfa.c:1272
+#: lib/dfa.c:1284
msgid "unfinished \\ escape"
msgstr ""
-#: lib/dfa.c:1433
+#: lib/dfa.c:1445
msgid "invalid content of \\{\\}"
msgstr ""
-#: lib/dfa.c:1436
+#: lib/dfa.c:1448
msgid "regular expression too big"
msgstr ""
-#: lib/dfa.c:1850
+#: lib/dfa.c:1863
msgid "unbalanced ("
msgstr ""
-#: lib/dfa.c:1968
+#: lib/dfa.c:1981
msgid "no syntax specified"
msgstr ""
-#: lib/dfa.c:1976
+#: lib/dfa.c:1992
msgid "unbalanced )"
msgstr ""
@@ -203,7 +203,7 @@ msgstr ""
msgid "Unmatched ) or \\)"
msgstr ""
-#: lib/regcomp.c:689
+#: lib/regcomp.c:688
msgid "No previous regular expression"
msgstr ""
@@ -212,12 +212,12 @@ msgstr ""
msgid "setting permissions for %s"
msgstr ""
-#: lib/version-etc.c:74
+#: lib/version-etc.c:73
#, c-format
msgid "Packaged by %s (%s)\n"
msgstr ""
-#: lib/version-etc.c:77
+#: lib/version-etc.c:76
#, c-format
msgid "Packaged by %s\n"
msgstr ""
@@ -225,11 +225,11 @@ 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
+#: lib/version-etc.c:83
msgid "(C)"
msgstr ""
-#: lib/version-etc.c:86
+#: lib/version-etc.c:85
msgid ""
"\n"
"License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl."
@@ -408,206 +408,219 @@ msgstr ""
msgid "command only uses one address"
msgstr ""
-#: sed/compile.c:164
+#: sed/compile.c:165
msgid "unterminated address regex"
msgstr ""
-#: sed/compile.c:165
+#: sed/compile.c:166
msgid "unterminated `s' command"
msgstr ""
-#: sed/compile.c:166
+#: sed/compile.c:167
msgid "unterminated `y' command"
msgstr ""
-#: sed/compile.c:167
+#: sed/compile.c:168
msgid "unknown option to `s'"
msgstr ""
-#: sed/compile.c:169
+#: sed/compile.c:170
msgid "multiple `p' options to `s' command"
msgstr ""
-#: sed/compile.c:171
+#: sed/compile.c:172
msgid "multiple `g' options to `s' command"
msgstr ""
-#: sed/compile.c:173
+#: sed/compile.c:174
msgid "multiple number options to `s' command"
msgstr ""
-#: sed/compile.c:175
+#: sed/compile.c:176
msgid "number option to `s' command may not be zero"
msgstr ""
-#: sed/compile.c:177
+#: sed/compile.c:178
msgid "strings for `y' command are different lengths"
msgstr ""
-#: sed/compile.c:179
+#: sed/compile.c:180
msgid "delimiter character is not a single-byte character"
msgstr ""
-#: sed/compile.c:181
+#: sed/compile.c:182
msgid "expected newer version of sed"
msgstr ""
-#: sed/compile.c:183
+#: sed/compile.c:184
msgid "invalid usage of line address 0"
msgstr ""
-#: sed/compile.c:184
+#: sed/compile.c:185
#, c-format
msgid "unknown command: `%c'"
msgstr ""
-#: sed/compile.c:186
+#: sed/compile.c:187
msgid "incomplete command"
msgstr ""
-#: sed/compile.c:188
+#: sed/compile.c:189
msgid "\":\" lacks a label"
msgstr ""
-#: sed/compile.c:190
+#: sed/compile.c:191
msgid "recursive escaping after \\c not allowed"
msgstr ""
-#: sed/compile.c:213
+#: sed/compile.c:193
+msgid "e/r/w commands disabled in sandbox mode"
+msgstr ""
+
+#: sed/compile.c:215
#, c-format
msgid "%s: file %s line %lu: %s\n"
msgstr ""
-#: sed/compile.c:216
+#: sed/compile.c:218
#, c-format
msgid "%s: -e expression #%lu, char %lu: %s\n"
msgstr ""
-#: sed/compile.c:1644
+#: sed/compile.c:1607
#, c-format
msgid "can't find label for jump to `%s'"
msgstr ""
-#: sed/execute.c:254 sed/execute.c:271
+#: sed/execute.c:253 sed/execute.c:270
#, c-format
msgid "case conversion produced an invalid character"
msgstr ""
-#: sed/execute.c:565
+#: sed/execute.c:561
#, c-format
msgid "%s: can't read %s: %s\n"
msgstr ""
-#: sed/execute.c:590
+#: sed/execute.c:587
#, c-format
msgid "couldn't edit %s: is a terminal"
msgstr ""
-#: sed/execute.c:595
+#: sed/execute.c:592
#, c-format
msgid "couldn't edit %s: not a regular file"
msgstr ""
-#: sed/execute.c:606
+#: sed/execute.c:603
#, c-format
msgid "%s: warning: failed to set default file creation context to %s: %s"
msgstr ""
-#: sed/execute.c:614
+#: sed/execute.c:611
#, c-format
msgid "%s: warning: failed to get security context of %s: %s"
msgstr ""
-#: sed/execute.c:633 sed/utils.c:178
+#: sed/execute.c:630 sed/utils.c:188
#, c-format
msgid "couldn't open temporary file %s: %s"
msgstr ""
-#: sed/execute.c:1148 sed/execute.c:1358
+#: sed/execute.c:1167 sed/execute.c:1366
msgid "error in subprocess"
msgstr ""
-#: sed/execute.c:1150
+#: sed/execute.c:1169
msgid "option `e' not supported"
msgstr ""
-#: sed/execute.c:1339
+#: sed/execute.c:1347
msgid "`e' command not supported"
msgstr ""
-#: sed/execute.c:1665
+#: sed/execute.c:1662
msgid "no input files"
msgstr ""
-#: sed/regexp.c:39
+#: sed/regexp.c:40
msgid "no previous regular expression"
msgstr ""
-#: sed/regexp.c:141
+#: sed/regexp.c:125
#, c-format
msgid "invalid reference \\%d on `s' command's RHS"
msgstr ""
-#: sed/regexp.c:259
+#: sed/regexp.c:196
msgid "regex input buffer length larger than INT_MAX"
msgstr ""
-#: sed/sed.c:35
+#: sed/sed.c:36
msgid "Jay Fenlason"
msgstr ""
-#: sed/sed.c:36
+#: sed/sed.c:37
msgid "Tom Lord"
msgstr ""
-#: sed/sed.c:37
+#: sed/sed.c:38
msgid "Ken Pizzini"
msgstr ""
-#: sed/sed.c:38
+#: sed/sed.c:39
msgid "Paolo Bonzini"
msgstr ""
-#: sed/sed.c:113
+#: sed/sed.c:40
+msgid "Jim Meyering"
+msgstr ""
+
+#: sed/sed.c:41
+msgid "Assaf Gordon"
+msgstr ""
+
+#: sed/sed.c:124
#, c-format
msgid ""
"GNU sed home page: <https://www.gnu.org/software/sed/>.\n"
"General help using GNU software: <https://www.gnu.org/gethelp/>.\n"
msgstr ""
-#: sed/sed.c:120
+#: sed/sed.c:130
#, c-format
msgid "E-mail bug reports to: <%s>.\n"
msgstr ""
-#: sed/sed.c:129
-msgid ""
-" -R, --regexp-perl\n"
-" use Perl 5's regular expressions syntax in the script.\n"
-msgstr ""
-
-#: sed/sed.c:134
+#: sed/sed.c:138
#, c-format
msgid ""
"Usage: %s [OPTION]... {script-only-if-no-other-script} [input-file]...\n"
"\n"
msgstr ""
-#: sed/sed.c:138
+#: sed/sed.c:142
#, c-format
msgid ""
" -n, --quiet, --silent\n"
" suppress automatic printing of pattern space\n"
msgstr ""
-#: sed/sed.c:140
+#: sed/sed.c:144
+#, c-format
+msgid ""
+" --debug\n"
+" annotate program execution\n"
+msgstr ""
+
+#: sed/sed.c:146
#, c-format
msgid ""
" -e script, --expression=script\n"
" add the script to the commands to be executed\n"
msgstr ""
-#: sed/sed.c:142
+#: sed/sed.c:148
#, c-format
msgid ""
" -f script-file, --file=script-file\n"
@@ -615,21 +628,21 @@ msgid ""
"executed\n"
msgstr ""
-#: sed/sed.c:146
+#: sed/sed.c:152
#, c-format
msgid ""
" --follow-symlinks\n"
" follow symlinks when processing in place\n"
msgstr ""
-#: sed/sed.c:149
+#: sed/sed.c:155
#, c-format
msgid ""
" -i[SUFFIX], --in-place[=SUFFIX]\n"
" edit files in place (makes backup if SUFFIX supplied)\n"
msgstr ""
-#: sed/sed.c:153
+#: sed/sed.c:158
#, c-format
msgid ""
" -b, --binary\n"
@@ -637,21 +650,21 @@ msgid ""
"specially)\n"
msgstr ""
-#: sed/sed.c:157
+#: sed/sed.c:162
#, c-format
msgid ""
" -l N, --line-length=N\n"
" specify the desired line-wrap length for the `l' command\n"
msgstr ""
-#: sed/sed.c:159
+#: sed/sed.c:164
#, c-format
msgid ""
" --posix\n"
" disable all GNU extensions.\n"
msgstr ""
-#: sed/sed.c:161
+#: sed/sed.c:166
#, c-format
msgid ""
" -E, -r, --regexp-extended\n"
@@ -659,7 +672,7 @@ msgid ""
" (for portability use POSIX -E).\n"
msgstr ""
-#: sed/sed.c:167
+#: sed/sed.c:169
#, c-format
msgid ""
" -s, --separate\n"
@@ -667,14 +680,14 @@ msgid ""
" continuous long stream.\n"
msgstr ""
-#: sed/sed.c:170
+#: sed/sed.c:172
#, c-format
msgid ""
" --sandbox\n"
" operate in sandbox mode (disable e/r/w commands).\n"
msgstr ""
-#: sed/sed.c:172
+#: sed/sed.c:174
#, c-format
msgid ""
" -u, --unbuffered\n"
@@ -683,24 +696,24 @@ msgid ""
" the output buffers more often\n"
msgstr ""
-#: sed/sed.c:175
+#: sed/sed.c:177
#, c-format
msgid ""
" -z, --null-data\n"
" separate lines by NUL characters\n"
msgstr ""
-#: sed/sed.c:177
+#: sed/sed.c:179
#, c-format
msgid " --help display this help and exit\n"
msgstr ""
-#: sed/sed.c:178
+#: sed/sed.c:180
#, c-format
msgid " --version output version information and exit\n"
msgstr ""
-#: sed/sed.c:179
+#: sed/sed.c:181
#, c-format
msgid ""
"\n"
@@ -711,44 +724,57 @@ msgid ""
"\n"
msgstr ""
-#: sed/utils.c:73 sed/utils.c:384
+#: sed/sed.c:373
+msgid "failed to set binary mode on STDIN"
+msgstr ""
+
+#: sed/sed.c:375
+msgid "failed to set binary mode on STDOUT"
+msgstr ""
+
+#: sed/utils.c:77 sed/utils.c:395
#, c-format
msgid "cannot remove %s: %s"
msgstr ""
-#: sed/utils.c:136
+#: sed/utils.c:146
#, c-format
msgid "couldn't open file %s: %s"
msgstr ""
-#: sed/utils.c:155
+#: sed/utils.c:165
#, c-format
msgid "couldn't attach to %s: %s"
msgstr ""
#: sed/utils.c:192
#, c-format
+msgid "failed to set binary mode on '%s'"
+msgstr ""
+
+#: sed/utils.c:207
+#, c-format
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:204 sed/utils.c:223
+#: sed/utils.c:219 sed/utils.c:238
#, c-format
msgid "read error on %s: %s"
msgstr ""
-#: sed/utils.c:325
+#: sed/utils.c:336
#, c-format
msgid "couldn't follow symlink %s: %s"
msgstr ""
-#: sed/utils.c:359
+#: sed/utils.c:370
#, c-format
msgid "cannot stat %s: %s"
msgstr ""
-#: sed/utils.c:389
+#: sed/utils.c:400
#, c-format
msgid "cannot rename %s: %s"
msgstr ""
diff --git a/po/sk.gmo b/po/sk.gmo
index 3b60ca7..28f3a22 100644
--- a/po/sk.gmo
+++ b/po/sk.gmo
Binary files differ
diff --git a/po/sk.po b/po/sk.po
index 347bf50..a07d5dc 100644
--- a/po/sk.po
+++ b/po/sk.po
@@ -6,10 +6,10 @@
#
msgid ""
msgstr ""
-"Project-Id-Version: GNU sed 4.4.104\n"
+"Project-Id-Version: GNU sed 4.5.48\n"
"Report-Msgid-Bugs-To: bug-gnu-utils@gnu.org\n"
-"POT-Creation-Date: 2018-03-31 18:40-0700\n"
-"PO-Revision-Date: 2018-03-24 21:41+0100\n"
+"POT-Creation-Date: 2018-12-20 22:03-0800\n"
+"PO-Revision-Date: 2018-12-13 22:14+0100\n"
"Last-Translator: Marcel Telka <marcel@telka.sk>\n"
"Language-Team: Slovak <sk-i18n@lists.linux.sk>\n"
"Language: sk\n"
@@ -28,39 +28,39 @@ msgstr "chyba zápisu"
msgid "preserving permissions for %s"
msgstr "zachovanie oprávnení pre %s"
-#: lib/dfa.c:958
+#: lib/dfa.c:970
msgid "unbalanced ["
msgstr "neuzavretá ["
-#: lib/dfa.c:1079
+#: lib/dfa.c:1091
msgid "invalid character class"
msgstr "neplatná trieda znakov"
-#: lib/dfa.c:1205
+#: lib/dfa.c:1217
msgid "character class syntax is [[:space:]], not [:space:]"
msgstr "syntax triedy znakov je [[:space:]], nie [:space:]"
-#: lib/dfa.c:1272
+#: lib/dfa.c:1284
msgid "unfinished \\ escape"
msgstr "neukončená riadiaca sekvencia \\"
-#: lib/dfa.c:1433
+#: lib/dfa.c:1445
msgid "invalid content of \\{\\}"
msgstr "neplatný obsah \\{\\}"
-#: lib/dfa.c:1436
+#: lib/dfa.c:1448
msgid "regular expression too big"
msgstr "regulárny výraz je príliš veľký"
-#: lib/dfa.c:1850
+#: lib/dfa.c:1863
msgid "unbalanced ("
msgstr "neuzavretá ("
-#: lib/dfa.c:1968
+#: lib/dfa.c:1981
msgid "no syntax specified"
msgstr "nebola zadaná syntax"
-#: lib/dfa.c:1976
+#: lib/dfa.c:1992
msgid "unbalanced )"
msgstr "neuzavretá )"
@@ -204,7 +204,7 @@ msgstr "Regulárny výraz je príliš veľký"
msgid "Unmatched ) or \\)"
msgstr "Nezodpovedajúca ) alebo \\)"
-#: lib/regcomp.c:689
+#: lib/regcomp.c:688
msgid "No previous regular expression"
msgstr "Bez predchádzajúceho regulárneho výrazu"
@@ -213,12 +213,12 @@ msgstr "Bez predchádzajúceho regulárneho výrazu"
msgid "setting permissions for %s"
msgstr "nastavovanie prístupových práv pre %s"
-#: lib/version-etc.c:74
+#: lib/version-etc.c:73
#, c-format
msgid "Packaged by %s (%s)\n"
msgstr "Zabalil %s (%s)\n"
-#: lib/version-etc.c:77
+#: lib/version-etc.c:76
#, c-format
msgid "Packaged by %s\n"
msgstr "Zabalil %s\n"
@@ -226,11 +226,11 @@ 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
+#: lib/version-etc.c:83
msgid "(C)"
msgstr "©"
-#: lib/version-etc.c:86
+#: lib/version-etc.c:85
msgid ""
"\n"
"License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl."
@@ -439,170 +439,182 @@ msgstr "chýbajúci príkaz"
msgid "command only uses one address"
msgstr "príkaz používa iba jednu adresu"
-#: sed/compile.c:164
+#: sed/compile.c:165
msgid "unterminated address regex"
msgstr "neukončený regulárny výraz adresy"
-#: sed/compile.c:165
+#: sed/compile.c:166
msgid "unterminated `s' command"
msgstr "neukončený príkaz `s'"
-#: sed/compile.c:166
+#: sed/compile.c:167
msgid "unterminated `y' command"
msgstr "neukončený príkaz `y'"
-#: sed/compile.c:167
+#: sed/compile.c:168
msgid "unknown option to `s'"
msgstr "neznáma voľba pre `s'"
-#: sed/compile.c:169
+#: sed/compile.c:170
msgid "multiple `p' options to `s' command"
msgstr "viacnásobné použitie voľby `p' s príkazom `s'"
-#: sed/compile.c:171
+#: sed/compile.c:172
msgid "multiple `g' options to `s' command"
msgstr "viacnásobné použitie voľby `g' s príkazom `s'"
-#: sed/compile.c:173
+#: sed/compile.c:174
msgid "multiple number options to `s' command"
msgstr "príkaz `s' môže mať maximálne jednu číselnú voľbu"
-#: sed/compile.c:175
+#: sed/compile.c:176
msgid "number option to `s' command may not be zero"
msgstr "číselná voľba príkazu `s' nemôže byť nula"
-#: sed/compile.c:177
+#: sed/compile.c:178
msgid "strings for `y' command are different lengths"
msgstr "reťazce pre príkaz `y' majú rôzne dĺžky"
-#: sed/compile.c:179
+#: sed/compile.c:180
msgid "delimiter character is not a single-byte character"
msgstr "oddeľovací znak nie je jednobajtový"
-#: sed/compile.c:181
+#: sed/compile.c:182
msgid "expected newer version of sed"
msgstr "očakávaná novšia verzia programu sed"
-#: sed/compile.c:183
+#: sed/compile.c:184
msgid "invalid usage of line address 0"
msgstr "neplatné použitie adresy riadku 0"
-#: sed/compile.c:184
+#: sed/compile.c:185
#, c-format
msgid "unknown command: `%c'"
msgstr "neznámy príkaz: `%c'"
-#: sed/compile.c:186
+#: sed/compile.c:187
msgid "incomplete command"
msgstr "nekompletný príkaz"
-#: sed/compile.c:188
+#: sed/compile.c:189
msgid "\":\" lacks a label"
msgstr "chýba návestie pri \":\""
-#: sed/compile.c:190
+#: sed/compile.c:191
msgid "recursive escaping after \\c not allowed"
msgstr "rekurzívne riadiace sekvencie za \\c nie sú dovolené"
-#: sed/compile.c:213
+#: sed/compile.c:193
+msgid "e/r/w commands disabled in sandbox mode"
+msgstr "príkazy e/r/w sú neaktívne v skúšobnom režime"
+
+#: sed/compile.c:215
#, c-format
msgid "%s: file %s line %lu: %s\n"
msgstr "%s: súbor %s, riadok %lu: %s\n"
-#: sed/compile.c:216
+#: sed/compile.c:218
#, c-format
msgid "%s: -e expression #%lu, char %lu: %s\n"
msgstr "%s: -e výraz #%lu, znak %lu: %s\n"
-#: sed/compile.c:1644
+#: sed/compile.c:1607
#, 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:254 sed/execute.c:271
+#: sed/execute.c:253 sed/execute.c:270
#, c-format
msgid "case conversion produced an invalid character"
msgstr "konverzia veľkosti znakov vytvorila neplatný znak"
-#: sed/execute.c:565
+#: sed/execute.c:561
#, c-format
msgid "%s: can't read %s: %s\n"
msgstr "%s: %s nie je možné čítať: %s\n"
-#: sed/execute.c:590
+#: sed/execute.c:587
#, c-format
msgid "couldn't edit %s: is a terminal"
msgstr "nebolo možné upraviť %s: je to terminál"
-#: sed/execute.c:595
+#: sed/execute.c:592
#, 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:606
+#: sed/execute.c:603
#, 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:614
+#: sed/execute.c:611
#, 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:633 sed/utils.c:178
+#: sed/execute.c:630 sed/utils.c:188
#, c-format
msgid "couldn't open temporary file %s: %s"
msgstr "nebolo možné otvoriť dočasný súbor %s: %s"
-#: sed/execute.c:1148 sed/execute.c:1358
+#: sed/execute.c:1167 sed/execute.c:1366
msgid "error in subprocess"
msgstr "chyba v podprocese"
-#: sed/execute.c:1150
+#: sed/execute.c:1169
msgid "option `e' not supported"
msgstr "voľba `e' nie je podporovaná"
-#: sed/execute.c:1339
+#: sed/execute.c:1347
msgid "`e' command not supported"
msgstr "príkaz `e' nie je podporovaný"
-#: sed/execute.c:1665
+#: sed/execute.c:1662
msgid "no input files"
msgstr "bez vstupných súborov"
-#: sed/regexp.c:39
+#: sed/regexp.c:40
msgid "no previous regular expression"
msgstr "bez predchádzajúceho regulárneho výrazu"
-#: sed/regexp.c:141
+#: sed/regexp.c:125
#, c-format
msgid "invalid reference \\%d on `s' command's RHS"
msgstr "neplatný odkaz \\%d na `s' príkazu RHS"
-#: sed/regexp.c:259
+#: sed/regexp.c:196
msgid "regex input buffer length larger than INT_MAX"
msgstr ""
"veľkosť vstupnej vyrovnávacej pamäte regulárneho výrazu je väčšia ako INT_MAX"
-#: sed/sed.c:35
+#: sed/sed.c:36
msgid "Jay Fenlason"
msgstr "Jay Fenlason"
-#: sed/sed.c:36
+#: sed/sed.c:37
msgid "Tom Lord"
msgstr "Tom Lord"
-#: sed/sed.c:37
+#: sed/sed.c:38
msgid "Ken Pizzini"
msgstr "Ken Pizzini"
-#: sed/sed.c:38
+#: sed/sed.c:39
msgid "Paolo Bonzini"
msgstr "Paolo Bonzini"
-#: sed/sed.c:113
+#: sed/sed.c:40
+msgid "Jim Meyering"
+msgstr "Jim Meyering"
+
+#: sed/sed.c:41
+msgid "Assaf Gordon"
+msgstr "Assaf Gordon"
+
+#: sed/sed.c:124
#, c-format
msgid ""
"GNU sed home page: <https://www.gnu.org/software/sed/>.\n"
@@ -612,20 +624,12 @@ msgstr ""
"Všeobecný pomocník na používanie softvéru GNU: <https://www.gnu.org/gethelp/"
">.\n"
-#: sed/sed.c:120
+#: sed/sed.c:130
#, c-format
msgid "E-mail bug reports to: <%s>.\n"
msgstr "Správy o chybách zasielajte na adresu <%s> (iba anglicky).\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"
-" použiť syntax regulárnych výrazov z Perlu 5 v skripte.\n"
-
-#: sed/sed.c:134
+#: sed/sed.c:138
#, c-format
msgid ""
"Usage: %s [OPTION]... {script-only-if-no-other-script} [input-file]...\n"
@@ -635,7 +639,7 @@ msgstr ""
"súbor]...\n"
"\n"
-#: sed/sed.c:138
+#: sed/sed.c:142
#, c-format
msgid ""
" -n, --quiet, --silent\n"
@@ -644,7 +648,16 @@ msgstr ""
" -n, --quiet, --silent\n"
" potlačiť automatický výpis priestoru vzorov\n"
-#: sed/sed.c:140
+#: sed/sed.c:144
+#, c-format
+msgid ""
+" --debug\n"
+" annotate program execution\n"
+msgstr ""
+" --debug\n"
+" komentovať beh programu\n"
+
+#: sed/sed.c:146
#, c-format
msgid ""
" -e script, --expression=script\n"
@@ -653,7 +666,7 @@ msgstr ""
" -e skript, --expression=skript\n"
" pridať skript k príkazom, ktoré majú byť vykonané\n"
-#: sed/sed.c:142
+#: sed/sed.c:148
#, c-format
msgid ""
" -f script-file, --file=script-file\n"
@@ -664,7 +677,7 @@ msgstr ""
" pridať obsah súboru skript-súbor k príkazom, ktoré majú byť "
"vykonané\n"
-#: sed/sed.c:146
+#: sed/sed.c:152
#, c-format
msgid ""
" --follow-symlinks\n"
@@ -673,7 +686,7 @@ msgstr ""
" --follow-symlinks\n"
" nasledovať symbolické odkazy pri spracovávaní na mieste\n"
-#: sed/sed.c:149
+#: sed/sed.c:155
#, c-format
msgid ""
" -i[SUFFIX], --in-place[=SUFFIX]\n"
@@ -683,7 +696,7 @@ msgstr ""
" upraviť súbory na mieste (vytvoria sa zálohy, ak je zadaná "
"PRÍPONA)\n"
-#: sed/sed.c:153
+#: sed/sed.c:158
#, c-format
msgid ""
" -b, --binary\n"
@@ -694,7 +707,7 @@ msgstr ""
" otvoriť súbory v binárnom režime (CR+LF nie sú špeciálne "
"spracovávané)\n"
-#: sed/sed.c:157
+#: sed/sed.c:162
#, c-format
msgid ""
" -l N, --line-length=N\n"
@@ -704,7 +717,7 @@ msgstr ""
" nastaviť požadovanú dĺžku pre zalomenie riadkov pre príkaz "
"`l'\n"
-#: sed/sed.c:159
+#: sed/sed.c:164
#, c-format
msgid ""
" --posix\n"
@@ -713,7 +726,7 @@ msgstr ""
" --posix\n"
" zakázať všetky rozšírenia GNU.\n"
-#: sed/sed.c:161
+#: sed/sed.c:166
#, c-format
msgid ""
" -E, -r, --regexp-extended\n"
@@ -724,7 +737,7 @@ msgstr ""
" použiť rozšírené regulárne výrazy v skripte\n"
" (pre prenositeľnosť použite POSIXové -E).\n"
-#: sed/sed.c:167
+#: sed/sed.c:169
#, c-format
msgid ""
" -s, --separate\n"
@@ -734,7 +747,7 @@ msgstr ""
" -s, --separate\n"
" spracovať súbory ako oddelené a nie ako jeden spojitý.\n"
-#: sed/sed.c:170
+#: sed/sed.c:172
#, c-format
msgid ""
" --sandbox\n"
@@ -743,7 +756,7 @@ msgstr ""
" --sandbox\n"
" pracovať v režime sandbox (zakázať príkazy e/r/w).\n"
-#: sed/sed.c:172
+#: sed/sed.c:174
#, c-format
msgid ""
" -u, --unbuffered\n"
@@ -756,7 +769,7 @@ msgstr ""
"vyprázdňovať\n"
" výstupné vyrovnávacie pamäte častejšie\n"
-#: sed/sed.c:175
+#: sed/sed.c:177
#, c-format
msgid ""
" -z, --null-data\n"
@@ -765,17 +778,17 @@ msgstr ""
" -z, --null-data\n"
" oddeliť riadky znakmi NUL\n"
-#: sed/sed.c:177
+#: sed/sed.c:179
#, c-format
msgid " --help display this help and exit\n"
msgstr " --help vypísať túto pomoc a skončiť\n"
-#: sed/sed.c:178
+#: sed/sed.c:180
#, 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:179
+#: sed/sed.c:181
#, c-format
msgid ""
"\n"
@@ -793,45 +806,65 @@ msgstr ""
"Ak nebudú vstupné súbory zadané, bude čítaný štandardný vstup.\n"
"\n"
-#: sed/utils.c:73 sed/utils.c:384
+#: sed/sed.c:373
+msgid "failed to set binary mode on STDIN"
+msgstr "zlyhalo nastavenie binárneho režimu na štandardnom vstupe (STDIN)"
+
+#: sed/sed.c:375
+msgid "failed to set binary mode on STDOUT"
+msgstr "zlyhalo nastavenie binárneho režimu na štandardnom výstupe (STDOUT)"
+
+#: sed/utils.c:77 sed/utils.c:395
#, c-format
msgid "cannot remove %s: %s"
msgstr "nepodarilo sa odstrániť %s: %s"
-#: sed/utils.c:136
+#: sed/utils.c:146
#, c-format
msgid "couldn't open file %s: %s"
msgstr "nebolo možné otvoriť súbor %s: %s"
-#: sed/utils.c:155
+#: sed/utils.c:165
#, c-format
msgid "couldn't attach to %s: %s"
msgstr "nebolo možné sa pripojiť k %s: %s"
#: sed/utils.c:192
#, c-format
+msgid "failed to set binary mode on '%s'"
+msgstr "zlyhalo nastavennie binárneho režimu na '%s'"
+
+#: sed/utils.c:207
+#, c-format
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:204 sed/utils.c:223
+#: sed/utils.c:219 sed/utils.c:238
#, c-format
msgid "read error on %s: %s"
msgstr "chyba pri čítaní z %s: %s"
-#: sed/utils.c:325
+#: sed/utils.c:336
#, c-format
msgid "couldn't follow symlink %s: %s"
msgstr "nebolo možné nasledovať symbolický odkaz %s: %s"
-#: sed/utils.c:359
+#: sed/utils.c:370
#, c-format
msgid "cannot stat %s: %s"
msgstr "nepodarilo sa zistiť stav %s: %s"
-#: sed/utils.c:389
+#: sed/utils.c:400
#, c-format
msgid "cannot rename %s: %s"
msgstr "nepodarilo sa premenovať %s: %s"
+
+#~ msgid ""
+#~ " -R, --regexp-perl\n"
+#~ " use Perl 5's regular expressions syntax in the script.\n"
+#~ msgstr ""
+#~ " -R, --regexp-perl\n"
+#~ " použiť syntax regulárnych výrazov z Perlu 5 v skripte.\n"
diff --git a/po/sl.gmo b/po/sl.gmo
index 3ab91b0..1104e22 100644
--- a/po/sl.gmo
+++ b/po/sl.gmo
Binary files differ
diff --git a/po/sl.po b/po/sl.po
index 830715a..3424599 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: 2018-03-31 18:40-0700\n"
+"POT-Creation-Date: 2018-12-20 22:03-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"
@@ -29,42 +29,42 @@ msgstr ""
msgid "preserving permissions for %s"
msgstr ""
-#: lib/dfa.c:958
+#: lib/dfa.c:970
msgid "unbalanced ["
msgstr ""
-#: lib/dfa.c:1079
+#: lib/dfa.c:1091
#, fuzzy
msgid "invalid character class"
msgstr "Neveljavno ime razreda znakov"
-#: lib/dfa.c:1205
+#: lib/dfa.c:1217
msgid "character class syntax is [[:space:]], not [:space:]"
msgstr ""
-#: lib/dfa.c:1272
+#: lib/dfa.c:1284
msgid "unfinished \\ escape"
msgstr ""
-#: lib/dfa.c:1433
+#: lib/dfa.c:1445
#, fuzzy
msgid "invalid content of \\{\\}"
msgstr "Neveljavna vsebina \\{\\}"
-#: lib/dfa.c:1436
+#: lib/dfa.c:1448
#, fuzzy
msgid "regular expression too big"
msgstr "Regularni izraz prevelik"
-#: lib/dfa.c:1850
+#: lib/dfa.c:1863
msgid "unbalanced ("
msgstr ""
-#: lib/dfa.c:1968
+#: lib/dfa.c:1981
msgid "no syntax specified"
msgstr ""
-#: lib/dfa.c:1976
+#: lib/dfa.c:1992
msgid "unbalanced )"
msgstr ""
@@ -210,7 +210,7 @@ msgstr "Regularni izraz prevelik"
msgid "Unmatched ) or \\)"
msgstr "Oklepaj ) ali \\) brez zaklepaja"
-#: lib/regcomp.c:689
+#: lib/regcomp.c:688
msgid "No previous regular expression"
msgstr "Prejšnji regularni izraz manjka"
@@ -219,12 +219,12 @@ msgstr "Prejšnji regularni izraz manjka"
msgid "setting permissions for %s"
msgstr ""
-#: lib/version-etc.c:74
+#: lib/version-etc.c:73
#, c-format
msgid "Packaged by %s (%s)\n"
msgstr ""
-#: lib/version-etc.c:77
+#: lib/version-etc.c:76
#, c-format
msgid "Packaged by %s\n"
msgstr ""
@@ -232,11 +232,11 @@ 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
+#: lib/version-etc.c:83
msgid "(C)"
msgstr ""
-#: lib/version-etc.c:86
+#: lib/version-etc.c:85
msgid ""
"\n"
"License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl."
@@ -418,170 +418,182 @@ msgstr "manjkajoč ukaz"
msgid "command only uses one address"
msgstr "ukaz uporablja le en naslov"
-#: sed/compile.c:164
+#: sed/compile.c:165
msgid "unterminated address regex"
msgstr "regularni izraz z nezaključenim naslovom"
-#: sed/compile.c:165
+#: sed/compile.c:166
msgid "unterminated `s' command"
msgstr "nezaključen ukaz »s«"
-#: sed/compile.c:166
+#: sed/compile.c:167
msgid "unterminated `y' command"
msgstr "nezaključen ukaz »y«"
-#: sed/compile.c:167
+#: sed/compile.c:168
msgid "unknown option to `s'"
msgstr "neznana izbira pri ukazu »s«"
-#: sed/compile.c:169
+#: sed/compile.c:170
msgid "multiple `p' options to `s' command"
msgstr "večterne izbire »p« pri ukazu »s«"
-#: sed/compile.c:171
+#: sed/compile.c:172
msgid "multiple `g' options to `s' command"
msgstr "večterne izbire »g« pri ukazu »s«"
-#: sed/compile.c:173
+#: sed/compile.c:174
msgid "multiple number options to `s' command"
msgstr "večterne številčne izbire pri ukazu »s«"
-#: sed/compile.c:175
+#: sed/compile.c:176
msgid "number option to `s' command may not be zero"
msgstr "številčna izbira pri ukazu »s« mora biti neničelna"
-#: sed/compile.c:177
+#: sed/compile.c:178
msgid "strings for `y' command are different lengths"
msgstr "niza pri ukazu »y« sta različno dolga"
-#: sed/compile.c:179
+#: sed/compile.c:180
msgid "delimiter character is not a single-byte character"
msgstr "razmejilni znak je dolg več kot en bajt"
-#: sed/compile.c:181
+#: sed/compile.c:182
msgid "expected newer version of sed"
msgstr "pričakovana novejša izdaja programa sed"
-#: sed/compile.c:183
+#: sed/compile.c:184
msgid "invalid usage of line address 0"
msgstr "neveljavna raba naslovne vrstice 0"
-#: sed/compile.c:184
+#: sed/compile.c:185
#, c-format
msgid "unknown command: `%c'"
msgstr "neznan ukaz: »%c«"
-#: sed/compile.c:186
+#: sed/compile.c:187
#, fuzzy
msgid "incomplete command"
msgstr "manjkajoč ukaz"
-#: sed/compile.c:188
+#: sed/compile.c:189
msgid "\":\" lacks a label"
msgstr ""
-#: sed/compile.c:190
+#: sed/compile.c:191
msgid "recursive escaping after \\c not allowed"
msgstr ""
-#: sed/compile.c:213
+#: sed/compile.c:193
+msgid "e/r/w commands disabled in sandbox mode"
+msgstr ""
+
+#: sed/compile.c:215
#, c-format
msgid "%s: file %s line %lu: %s\n"
msgstr "%s: datoteka %s vrstica %lu: %s\n"
-#: sed/compile.c:216
+#: sed/compile.c:218
#, c-format
msgid "%s: -e expression #%lu, char %lu: %s\n"
msgstr "%s: -e izraz #%lu, znak %lu: %s\n"
-#: sed/compile.c:1644
+#: sed/compile.c:1607
#, c-format
msgid "can't find label for jump to `%s'"
msgstr "ni moč najti oznake za skok na »%s«"
-#: sed/execute.c:254 sed/execute.c:271
+#: sed/execute.c:253 sed/execute.c:270
#, c-format
msgid "case conversion produced an invalid character"
msgstr ""
-#: sed/execute.c:565
+#: sed/execute.c:561
#, c-format
msgid "%s: can't read %s: %s\n"
msgstr "%s: %s ni mogoče prebrati: %s\n"
-#: sed/execute.c:590
+#: sed/execute.c:587
#, c-format
msgid "couldn't edit %s: is a terminal"
msgstr "ni mogoče urejati %s: je terminal"
-#: sed/execute.c:595
+#: sed/execute.c:592
#, c-format
msgid "couldn't edit %s: not a regular file"
msgstr "ni mogoče urejati %s: ni navadna datoteka"
-#: sed/execute.c:606
+#: sed/execute.c:603
#, 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:614
+#: sed/execute.c:611
#, 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:633 sed/utils.c:178
+#: sed/execute.c:630 sed/utils.c:188
#, c-format
msgid "couldn't open temporary file %s: %s"
msgstr "ni mogoče odpreti začasne datoteke %s: %s"
-#: sed/execute.c:1148 sed/execute.c:1358
+#: sed/execute.c:1167 sed/execute.c:1366
msgid "error in subprocess"
msgstr "napaka v podprocesu"
-#: sed/execute.c:1150
+#: sed/execute.c:1169
msgid "option `e' not supported"
msgstr "izbira »e« ni podprta"
-#: sed/execute.c:1339
+#: sed/execute.c:1347
msgid "`e' command not supported"
msgstr "ukaz »e« ni podprt"
-#: sed/execute.c:1665
+#: sed/execute.c:1662
msgid "no input files"
msgstr "ni vhodnih datotek"
-#: sed/regexp.c:39
+#: sed/regexp.c:40
msgid "no previous regular expression"
msgstr "ni prejšnjega regularnega izraza"
-#: sed/regexp.c:141
+#: sed/regexp.c:125
#, c-format
msgid "invalid reference \\%d on `s' command's RHS"
msgstr "neveljavni sklic \\%d na desni strani ukaza »s«"
-#: sed/regexp.c:259
+#: sed/regexp.c:196
msgid "regex input buffer length larger than INT_MAX"
msgstr ""
-#: sed/sed.c:35
+#: sed/sed.c:36
msgid "Jay Fenlason"
msgstr ""
-#: sed/sed.c:36
+#: sed/sed.c:37
msgid "Tom Lord"
msgstr ""
-#: sed/sed.c:37
+#: sed/sed.c:38
msgid "Ken Pizzini"
msgstr ""
-#: sed/sed.c:38
+#: sed/sed.c:39
msgid "Paolo Bonzini"
msgstr ""
-#: sed/sed.c:113
+#: sed/sed.c:40
+msgid "Jim Meyering"
+msgstr ""
+
+#: sed/sed.c:41
+msgid "Assaf Gordon"
+msgstr ""
+
+#: sed/sed.c:124
#, fuzzy, c-format
msgid ""
"GNU sed home page: <https://www.gnu.org/software/sed/>.\n"
@@ -590,20 +602,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:120
+#: sed/sed.c:130
#, c-format
msgid "E-mail bug reports to: <%s>.\n"
msgstr ""
-#: 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"
-" dovoli uporabo regularnih izrazov, ki jih podpira Perl 5\n"
-
-#: sed/sed.c:134
+#: sed/sed.c:138
#, c-format
msgid ""
"Usage: %s [OPTION]... {script-only-if-no-other-script} [input-file]...\n"
@@ -612,7 +616,7 @@ msgstr ""
"Uporaba: %s [IZBIRA]... {skript--če-je-en-sam} [vhodna-datoteka]...\n"
"\n"
-#: sed/sed.c:138
+#: sed/sed.c:142
#, c-format
msgid ""
" -n, --quiet, --silent\n"
@@ -621,7 +625,16 @@ msgstr ""
" -n, --quiet, --silent\n"
" brez samodejnega izpisa prostora vzorcev\n"
-#: sed/sed.c:140
+#: sed/sed.c:144
+#, fuzzy, c-format
+msgid ""
+" --debug\n"
+" annotate program execution\n"
+msgstr ""
+" --posix\n"
+" onemogoči vse razširitve GNU\n"
+
+#: sed/sed.c:146
#, c-format
msgid ""
" -e script, --expression=script\n"
@@ -630,7 +643,7 @@ msgstr ""
" -e SKRIPT, --expression=SKRIPT\n"
" dodaj SKRIPT med ukaze, ki se izvedejo\n"
-#: sed/sed.c:142
+#: sed/sed.c:148
#, c-format
msgid ""
" -f script-file, --file=script-file\n"
@@ -640,7 +653,7 @@ msgstr ""
" -f SKRIPTNA_DATOTEKA, --file=SKRIPTNA_DATOTEKA\n"
" dodaj vsebino SKRIPTNE DATOTEKE med ukaze, ki se izvedejo\n"
-#: sed/sed.c:146
+#: sed/sed.c:152
#, c-format
msgid ""
" --follow-symlinks\n"
@@ -649,7 +662,7 @@ msgstr ""
" --follow-symlinks\n"
" pri obdelavi na mestu sledi simbolnim povezavam\n"
-#: sed/sed.c:149
+#: sed/sed.c:155
#, fuzzy, c-format
msgid ""
" -i[SUFFIX], --in-place[=SUFFIX]\n"
@@ -660,7 +673,7 @@ msgstr ""
"z\n"
" dano pripono, če je ta podana)\n"
-#: sed/sed.c:153
+#: sed/sed.c:158
#, c-format
msgid ""
" -b, --binary\n"
@@ -670,7 +683,7 @@ msgstr ""
" -b, --binary\n"
" odpri kot binarno datoteko (brez posebne obravnave CR+LF)\n"
-#: sed/sed.c:157
+#: sed/sed.c:162
#, c-format
msgid ""
" -l N, --line-length=N\n"
@@ -679,7 +692,7 @@ msgstr ""
" -l N, --line-length=N\n"
" določi širino vrstice za ukaz ,l` na N znakov\n"
-#: sed/sed.c:159
+#: sed/sed.c:164
#, c-format
msgid ""
" --posix\n"
@@ -688,7 +701,7 @@ msgstr ""
" --posix\n"
" onemogoči vse razširitve GNU\n"
-#: sed/sed.c:161
+#: sed/sed.c:166
#, fuzzy, c-format
msgid ""
" -E, -r, --regexp-extended\n"
@@ -698,7 +711,7 @@ msgstr ""
" -r, --regexp-extended\n"
" dovoli uporabo razširjenih regularnih izrazov.\n"
-#: sed/sed.c:167
+#: sed/sed.c:169
#, fuzzy, c-format
msgid ""
" -s, --separate\n"
@@ -709,14 +722,14 @@ msgstr ""
" datoteke obravnavaj kot ločene, ne pa kot neprekinjen tok\n"
" podatkov\n"
-#: sed/sed.c:170
+#: sed/sed.c:172
#, c-format
msgid ""
" --sandbox\n"
" operate in sandbox mode (disable e/r/w commands).\n"
msgstr ""
-#: sed/sed.c:172
+#: sed/sed.c:174
#, c-format
msgid ""
" -u, --unbuffered\n"
@@ -729,24 +742,24 @@ msgstr ""
"pogosteje\n"
" izprazni izhodni medpomnilnik\n"
-#: sed/sed.c:175
+#: sed/sed.c:177
#, c-format
msgid ""
" -z, --null-data\n"
" separate lines by NUL characters\n"
msgstr ""
-#: sed/sed.c:177
+#: sed/sed.c:179
#, c-format
msgid " --help display this help and exit\n"
msgstr " --help prikaži ta navodila in končaj\n"
-#: sed/sed.c:178
+#: sed/sed.c:180
#, c-format
msgid " --version output version information and exit\n"
msgstr " --version različica programa\n"
-#: sed/sed.c:179
+#: sed/sed.c:181
#, c-format
msgid ""
"\n"
@@ -763,22 +776,35 @@ msgstr ""
"Če ni podano nobeno ime datoteke, se bere standardni vhod.\n"
"\n"
-#: sed/utils.c:73 sed/utils.c:384
+#: sed/sed.c:373
+msgid "failed to set binary mode on STDIN"
+msgstr ""
+
+#: sed/sed.c:375
+msgid "failed to set binary mode on STDOUT"
+msgstr ""
+
+#: sed/utils.c:77 sed/utils.c:395
#, c-format
msgid "cannot remove %s: %s"
msgstr "ni mogoče odstraniti %s: %s"
-#: sed/utils.c:136
+#: sed/utils.c:146
#, c-format
msgid "couldn't open file %s: %s"
msgstr "ni mogoče odpreti datoteke %s: %s"
-#: sed/utils.c:155
+#: sed/utils.c:165
#, c-format
msgid "couldn't attach to %s: %s"
msgstr "ni mogoče pripeti k %s: %s"
#: sed/utils.c:192
+#, c-format
+msgid "failed to set binary mode on '%s'"
+msgstr ""
+
+#: sed/utils.c:207
#, fuzzy, c-format
msgid "couldn't write %llu item to %s: %s"
msgid_plural "couldn't write %llu items to %s: %s"
@@ -787,26 +813,34 @@ 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:204 sed/utils.c:223
+#: sed/utils.c:219 sed/utils.c:238
#, c-format
msgid "read error on %s: %s"
msgstr "napaka pri branju z %s: %s"
-#: sed/utils.c:325
+#: sed/utils.c:336
#, c-format
msgid "couldn't follow symlink %s: %s"
msgstr "ni mogoče slediti simbolni povezavi %s: %s"
-#: sed/utils.c:359
+#: sed/utils.c:370
#, c-format
msgid "cannot stat %s: %s"
msgstr "ni mogoče ugotoviti statistike %s: %s"
-#: sed/utils.c:389
+#: sed/utils.c:400
#, c-format
msgid "cannot rename %s: %s"
msgstr "ni mogoče preimenovati %s: %s"
+#~ msgid ""
+#~ " -R, --regexp-perl\n"
+#~ " use Perl 5's regular expressions syntax in the script.\n"
+#~ msgstr ""
+#~ " -R, --regexp-perl\n"
+#~ " dovoli uporabo regularnih izrazov, ki jih podpira Perl "
+#~ "5\n"
+
#~ msgid "cannot specify modifiers on empty regexp"
#~ msgstr "navajanje modifikatorjev pri praznem regularnem izrazu ni mogoče"
diff --git a/po/sr.gmo b/po/sr.gmo
index 3355779..ee9d816 100644
--- a/po/sr.gmo
+++ b/po/sr.gmo
Binary files differ
diff --git a/po/sr.po b/po/sr.po
index 1929756..7ac52c4 100644
--- a/po/sr.po
+++ b/po/sr.po
@@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: sed-4.2.2.177\n"
"Report-Msgid-Bugs-To: bug-gnu-utils@gnu.org\n"
-"POT-Creation-Date: 2018-03-31 18:40-0700\n"
+"POT-Creation-Date: 2018-12-20 22:03-0800\n"
"PO-Revision-Date: 2016-12-18 08:03+0200\n"
"Last-Translator: Мирослав Николић <miroslavnikolic@rocketmail.com>\n"
"Language-Team: Serbian <(nothing)>\n"
@@ -28,39 +28,39 @@ msgstr "грешка писања"
msgid "preserving permissions for %s"
msgstr "причувавам овлашћења за %s"
-#: lib/dfa.c:958
+#: lib/dfa.c:970
msgid "unbalanced ["
msgstr "неуравнотежена ["
-#: lib/dfa.c:1079
+#: lib/dfa.c:1091
msgid "invalid character class"
msgstr "неисправна класа знака"
-#: lib/dfa.c:1205
+#: lib/dfa.c:1217
msgid "character class syntax is [[:space:]], not [:space:]"
msgstr "синтакса класе знака је [[:размак:]], а не [:размак:]"
-#: lib/dfa.c:1272
+#: lib/dfa.c:1284
msgid "unfinished \\ escape"
msgstr "недовршена \\ излазим"
-#: lib/dfa.c:1433
+#: lib/dfa.c:1445
msgid "invalid content of \\{\\}"
msgstr "неисправан садржај \\{\\}"
-#: lib/dfa.c:1436
+#: lib/dfa.c:1448
msgid "regular expression too big"
msgstr "регуларни израз је превелик"
-#: lib/dfa.c:1850
+#: lib/dfa.c:1863
msgid "unbalanced ("
msgstr "неуравнотежена ("
-#: lib/dfa.c:1968
+#: lib/dfa.c:1981
msgid "no syntax specified"
msgstr "синтакса није наведена"
-#: lib/dfa.c:1976
+#: lib/dfa.c:1992
msgid "unbalanced )"
msgstr "неуравнотежена )"
@@ -204,7 +204,7 @@ msgstr "Регуларан израз је превелик"
msgid "Unmatched ) or \\)"
msgstr "Није упарена ) или \\)"
-#: lib/regcomp.c:689
+#: lib/regcomp.c:688
msgid "No previous regular expression"
msgstr "Нема претходног регуларног израза"
@@ -213,12 +213,12 @@ msgstr "Нема претходног регуларног израза"
msgid "setting permissions for %s"
msgstr "подешавам овлашћења за %s"
-#: lib/version-etc.c:74
+#: lib/version-etc.c:73
#, c-format
msgid "Packaged by %s (%s)\n"
msgstr "Запаковао је %s (%s)\n"
-#: lib/version-etc.c:77
+#: lib/version-etc.c:76
#, c-format
msgid "Packaged by %s\n"
msgstr "Запаковао је %s\n"
@@ -226,11 +226,11 @@ 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
+#: lib/version-etc.c:83
msgid "(C)"
msgstr "©"
-#: lib/version-etc.c:86
+#: lib/version-etc.c:85
#, fuzzy
msgid ""
"\n"
@@ -436,169 +436,181 @@ msgstr "недостаје наредба"
msgid "command only uses one address"
msgstr "наредба користи само једну адресу"
-#: sed/compile.c:164
+#: sed/compile.c:165
msgid "unterminated address regex"
msgstr "недовршен рег. израз адресе"
-#: sed/compile.c:165
+#: sed/compile.c:166
msgid "unterminated `s' command"
msgstr "недовршена наредба „s“"
-#: sed/compile.c:166
+#: sed/compile.c:167
msgid "unterminated `y' command"
msgstr "недовршена наредба „y“"
-#: sed/compile.c:167
+#: sed/compile.c:168
msgid "unknown option to `s'"
msgstr "непозната опција за „s“"
-#: sed/compile.c:169
+#: sed/compile.c:170
msgid "multiple `p' options to `s' command"
msgstr "више „p“ опција за „s“ наредбу"
-#: sed/compile.c:171
+#: sed/compile.c:172
msgid "multiple `g' options to `s' command"
msgstr "више „g“ опција за „s“ наредбу"
-#: sed/compile.c:173
+#: sed/compile.c:174
msgid "multiple number options to `s' command"
msgstr "више бројчаних опција за „s“ наредбу"
-#: sed/compile.c:175
+#: sed/compile.c:176
msgid "number option to `s' command may not be zero"
msgstr "бројчана опција наредбе „s“ не може бити нула"
-#: sed/compile.c:177
+#: sed/compile.c:178
msgid "strings for `y' command are different lengths"
msgstr "ниске за наредбу „y“ су различитих дужина"
-#: sed/compile.c:179
+#: sed/compile.c:180
msgid "delimiter character is not a single-byte character"
msgstr "раздвојник није једнобајтни знак"
-#: sed/compile.c:181
+#: sed/compile.c:182
msgid "expected newer version of sed"
msgstr "очекивано је новије издање седа"
-#: sed/compile.c:183
+#: sed/compile.c:184
msgid "invalid usage of line address 0"
msgstr "неправилна употреба адресе реда 0"
-#: sed/compile.c:184
+#: sed/compile.c:185
#, c-format
msgid "unknown command: `%c'"
msgstr "непозната наредба: „%c“"
-#: sed/compile.c:186
+#: sed/compile.c:187
msgid "incomplete command"
msgstr "непотпуна наредба"
-#: sed/compile.c:188
+#: sed/compile.c:189
msgid "\":\" lacks a label"
msgstr "„:“ недостаје натпис"
-#: sed/compile.c:190
+#: sed/compile.c:191
msgid "recursive escaping after \\c not allowed"
msgstr "дубинско завршавање реда након „\\c“ није дозвољено"
-#: sed/compile.c:213
+#: sed/compile.c:193
+msgid "e/r/w commands disabled in sandbox mode"
+msgstr ""
+
+#: sed/compile.c:215
#, c-format
msgid "%s: file %s line %lu: %s\n"
msgstr "%s: датотека %s ред %lu: %s\n"
-#: sed/compile.c:216
+#: sed/compile.c:218
#, c-format
msgid "%s: -e expression #%lu, char %lu: %s\n"
msgstr "%s: -e израз #%lu, знак %lu: %s\n"
-#: sed/compile.c:1644
+#: sed/compile.c:1607
#, c-format
msgid "can't find label for jump to `%s'"
msgstr "не могу да нађем ознаку за скок на „%s“"
-#: sed/execute.c:254 sed/execute.c:271
+#: sed/execute.c:253 sed/execute.c:270
#, c-format
msgid "case conversion produced an invalid character"
msgstr "претварање величине знакова је резултирало неисправним знаком"
-#: sed/execute.c:565
+#: sed/execute.c:561
#, c-format
msgid "%s: can't read %s: %s\n"
msgstr "%s: не могу да прочитам %s: %s\n"
-#: sed/execute.c:590
+#: sed/execute.c:587
#, c-format
msgid "couldn't edit %s: is a terminal"
msgstr "не могу да уредим %s: то је терминал"
-#: sed/execute.c:595
+#: sed/execute.c:592
#, c-format
msgid "couldn't edit %s: not a regular file"
msgstr "не могу да уредим %s: није обична датотека"
-#: sed/execute.c:606
+#: sed/execute.c:603
#, c-format
msgid "%s: warning: failed to set default file creation context to %s: %s"
msgstr ""
"%s: упозорење: нисам успео да подесим основни контекст стварања датотеке на "
"%s: %s"
-#: sed/execute.c:614
+#: sed/execute.c:611
#, c-format
msgid "%s: warning: failed to get security context of %s: %s"
msgstr "%s: упозорење: нисам успео да добавим безбедносни контекст за %s: %s"
-#: sed/execute.c:633 sed/utils.c:178
+#: sed/execute.c:630 sed/utils.c:188
#, c-format
msgid "couldn't open temporary file %s: %s"
msgstr "не могу да отворим привремену датотеку %s: %s"
-#: sed/execute.c:1148 sed/execute.c:1358
+#: sed/execute.c:1167 sed/execute.c:1366
msgid "error in subprocess"
msgstr "грешка у потпроцесу"
-#: sed/execute.c:1150
+#: sed/execute.c:1169
msgid "option `e' not supported"
msgstr "опција „e“ није подржана"
-#: sed/execute.c:1339
+#: sed/execute.c:1347
msgid "`e' command not supported"
msgstr "наредба „e“ није подржана"
-#: sed/execute.c:1665
+#: sed/execute.c:1662
msgid "no input files"
msgstr "нема улазних датотека"
-#: sed/regexp.c:39
+#: sed/regexp.c:40
msgid "no previous regular expression"
msgstr "без претходног регуларног израза"
-#: sed/regexp.c:141
+#: sed/regexp.c:125
#, c-format
msgid "invalid reference \\%d on `s' command's RHS"
msgstr "неисправна референца \\%d на десној страни наредбе „s“"
-#: sed/regexp.c:259
+#: sed/regexp.c:196
msgid "regex input buffer length larger than INT_MAX"
msgstr ""
-#: sed/sed.c:35
+#: sed/sed.c:36
msgid "Jay Fenlason"
msgstr "Џеј Фенласон"
-#: sed/sed.c:36
+#: sed/sed.c:37
msgid "Tom Lord"
msgstr "Том Лорд"
-#: sed/sed.c:37
+#: sed/sed.c:38
msgid "Ken Pizzini"
msgstr "Кен Пицини"
-#: sed/sed.c:38
+#: sed/sed.c:39
msgid "Paolo Bonzini"
msgstr "Паоло Бонцини"
-#: sed/sed.c:113
+#: sed/sed.c:40
+msgid "Jim Meyering"
+msgstr ""
+
+#: sed/sed.c:41
+msgid "Assaf Gordon"
+msgstr ""
+
+#: sed/sed.c:124
#, fuzzy, c-format
msgid ""
"GNU sed home page: <https://www.gnu.org/software/sed/>.\n"
@@ -607,20 +619,12 @@ msgstr ""
"Матична страница ГНУ-овог седа: <http://www.gnu.org/software/sed/>.\n"
"Општа помоћ за коришћење ГНУ-ових програма: <http://www.gnu.org/gethelp/>.\n"
-#: sed/sed.c:120
+#: sed/sed.c:130
#, 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"
-" користи синтаксу регуларних израза Перла 5 у скрипти.\n"
-
-#: sed/sed.c:134
+#: sed/sed.c:138
#, c-format
msgid ""
"Usage: %s [OPTION]... {script-only-if-no-other-script} [input-file]...\n"
@@ -630,7 +634,7 @@ msgstr ""
"датотека]...\n"
"\n"
-#: sed/sed.c:138
+#: sed/sed.c:142
#, c-format
msgid ""
" -n, --quiet, --silent\n"
@@ -639,7 +643,16 @@ msgstr ""
" -n, --quiet, --silent\n"
" обуставља аутоматски испис простора образаца\n"
-#: sed/sed.c:140
+#: sed/sed.c:144
+#, fuzzy, c-format
+msgid ""
+" --debug\n"
+" annotate program execution\n"
+msgstr ""
+" --posix\n"
+" искључује сва ГНУ-ова проширења.\n"
+
+#: sed/sed.c:146
#, c-format
msgid ""
" -e script, --expression=script\n"
@@ -648,7 +661,7 @@ msgstr ""
" -e спис, --expression=скрипта\n"
" додаје скрипту наредбама да би била извршена\n"
-#: sed/sed.c:142
+#: sed/sed.c:148
#, c-format
msgid ""
" -f script-file, --file=script-file\n"
@@ -658,7 +671,7 @@ msgstr ""
" -f списотека, --file=списотека\n"
" додаје садржај списотеке наредбама да би била извршена\n"
-#: sed/sed.c:146
+#: sed/sed.c:152
#, c-format
msgid ""
" --follow-symlinks\n"
@@ -667,7 +680,7 @@ msgstr ""
" --follow-symlinks\n"
" прати симболичне везе када обрађује на месту\n"
-#: sed/sed.c:149
+#: sed/sed.c:155
#, c-format
msgid ""
" -i[SUFFIX], --in-place[=SUFFIX]\n"
@@ -677,7 +690,7 @@ msgstr ""
" уређује датотеке на месту (прави резерву ако је дат "
"СУФИКС)\n"
-#: sed/sed.c:153
+#: sed/sed.c:158
#, c-format
msgid ""
" -b, --binary\n"
@@ -688,7 +701,7 @@ msgstr ""
" отвара датотеке у бинарном режиму (ЦР+ЛФ нису посебно "
"обрађени)\n"
-#: sed/sed.c:157
+#: sed/sed.c:162
#, c-format
msgid ""
" -l N, --line-length=N\n"
@@ -697,7 +710,7 @@ msgstr ""
" -l N, --line-length=Н\n"
" наводи жељену ширину реда за наредбу „l“\n"
-#: sed/sed.c:159
+#: sed/sed.c:164
#, c-format
msgid ""
" --posix\n"
@@ -706,7 +719,7 @@ msgstr ""
" --posix\n"
" искључује сва ГНУ-ова проширења.\n"
-#: sed/sed.c:161
+#: sed/sed.c:166
#, c-format
msgid ""
" -E, -r, --regexp-extended\n"
@@ -717,7 +730,7 @@ msgstr ""
" користи проширене регуларне изразе у спису\n"
" (зарад преносивости користитие „POSIX -E).\n"
-#: sed/sed.c:167
+#: sed/sed.c:169
#, c-format
msgid ""
" -s, --separate\n"
@@ -728,7 +741,7 @@ msgstr ""
" сматра датотеке одвојеним а не као један,\n"
" непрекидан дуги ток.\n"
-#: sed/sed.c:170
+#: sed/sed.c:172
#, fuzzy, c-format
msgid ""
" --sandbox\n"
@@ -737,7 +750,7 @@ msgstr ""
" --sandbox\n"
" ради у режиму заштићеног окружења.\n"
-#: sed/sed.c:172
+#: sed/sed.c:174
#, c-format
msgid ""
" -u, --unbuffered\n"
@@ -749,7 +762,7 @@ msgstr ""
" учитава најмање количине података из улазних датотека и\n"
" чешће празни излазне бафере\n"
-#: sed/sed.c:175
+#: sed/sed.c:177
#, c-format
msgid ""
" -z, --null-data\n"
@@ -758,17 +771,17 @@ msgstr ""
" -z, --null-data\n"
" раздваја редове НИШТАВНИМ знацима\n"
-#: sed/sed.c:177
+#: sed/sed.c:179
#, c-format
msgid " --help display this help and exit\n"
msgstr " --help приказује ову помоћ и излази\n"
-#: sed/sed.c:178
+#: sed/sed.c:180
#, c-format
msgid " --version output version information and exit\n"
msgstr " --version исписује податке о издању и излази\n"
-#: sed/sed.c:179
+#: sed/sed.c:181
#, c-format
msgid ""
"\n"
@@ -785,49 +798,69 @@ msgstr ""
"стандардног улаза.\n"
"\n"
-#: sed/utils.c:73 sed/utils.c:384
+#: sed/sed.c:373
+msgid "failed to set binary mode on STDIN"
+msgstr ""
+
+#: sed/sed.c:375
+msgid "failed to set binary mode on STDOUT"
+msgstr ""
+
+#: sed/utils.c:77 sed/utils.c:395
#, c-format
msgid "cannot remove %s: %s"
msgstr "не могу да уклоним %s: %s"
-#: sed/utils.c:136
+#: sed/utils.c:146
#, c-format
msgid "couldn't open file %s: %s"
msgstr "не могу да отворим датотеку %s: %s"
-#: sed/utils.c:155
+#: sed/utils.c:165
#, c-format
msgid "couldn't attach to %s: %s"
msgstr "не могу да прикачим на %s: %s"
#: sed/utils.c:192
#, c-format
+msgid "failed to set binary mode on '%s'"
+msgstr ""
+
+#: sed/utils.c:207
+#, 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"
msgstr[2] "не могу да запишем %llu ставки на %s: %s"
-#: sed/utils.c:204 sed/utils.c:223
+#: sed/utils.c:219 sed/utils.c:238
#, c-format
msgid "read error on %s: %s"
msgstr "грешка читања на %s: %s"
-#: sed/utils.c:325
+#: sed/utils.c:336
#, c-format
msgid "couldn't follow symlink %s: %s"
msgstr "не могу да пратим симболичку везу %s: %s"
-#: sed/utils.c:359
+#: sed/utils.c:370
#, c-format
msgid "cannot stat %s: %s"
msgstr "не могу да добавим податке „%s“: %s"
-#: sed/utils.c:389
+#: sed/utils.c:400
#, c-format
msgid "cannot rename %s: %s"
msgstr "не могу да преименујем %s: %s"
+#~ msgid ""
+#~ " -R, --regexp-perl\n"
+#~ " use Perl 5's regular expressions syntax in the script.\n"
+#~ msgstr ""
+#~ " -R, --regexp-perl\n"
+#~ " користи синтаксу регуларних израза Перла 5 у скрипти.\n"
+
#~ msgid "%s: option '--%s' doesn't allow an argument\n"
#~ msgstr "%s: опција „--%s“ не дозвољава аргумент\n"
diff --git a/po/sv.gmo b/po/sv.gmo
index 36a1fbe..788d35a 100644
--- a/po/sv.gmo
+++ b/po/sv.gmo
Binary files differ
diff --git a/po/sv.po b/po/sv.po
index 598604b..716830d 100644
--- a/po/sv.po
+++ b/po/sv.po
@@ -6,10 +6,10 @@
#
msgid ""
msgstr ""
-"Project-Id-Version: sed 4.4.104\n"
+"Project-Id-Version: sed 4.5.48\n"
"Report-Msgid-Bugs-To: bug-gnu-utils@gnu.org\n"
-"POT-Creation-Date: 2018-03-31 18:40-0700\n"
-"PO-Revision-Date: 2018-03-25 22:10+0200\n"
+"POT-Creation-Date: 2018-12-20 22:03-0800\n"
+"PO-Revision-Date: 2018-12-16 20:18+0100\n"
"Last-Translator: Anders Jonsson <anders.jonsson@norsjovallen.se>\n"
"Language-Team: Swedish <tp-sv@listor.tp-sv.se>\n"
"Language: sv\n"
@@ -18,7 +18,7 @@ msgstr ""
"Content-Transfer-Encoding: 8bit\n"
"X-Bugs: Report translation errors to the Language-Team address.\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
-"X-Generator: Poedit 2.0.6\n"
+"X-Generator: Poedit 2.2\n"
#: lib/closeout.c:122
msgid "write error"
@@ -29,39 +29,39 @@ msgstr "skrivfel"
msgid "preserving permissions for %s"
msgstr "bevarar rättigheter för %s"
-#: lib/dfa.c:958
+#: lib/dfa.c:970
msgid "unbalanced ["
msgstr "obalanserad ["
-#: lib/dfa.c:1079
+#: lib/dfa.c:1091
msgid "invalid character class"
msgstr "ogiltig teckenklass"
-#: lib/dfa.c:1205
+#: lib/dfa.c:1217
msgid "character class syntax is [[:space:]], not [:space:]"
msgstr "syntax för teckenklass är [[:space:]], inte [:space:]"
-#: lib/dfa.c:1272
+#: lib/dfa.c:1284
msgid "unfinished \\ escape"
msgstr "oavslutad \\-sekvens"
-#: lib/dfa.c:1433
+#: lib/dfa.c:1445
msgid "invalid content of \\{\\}"
msgstr "ogiltigt innehåll i \\{\\}"
-#: lib/dfa.c:1436
+#: lib/dfa.c:1448
msgid "regular expression too big"
msgstr "reguljärt uttryck för stort"
-#: lib/dfa.c:1850
+#: lib/dfa.c:1863
msgid "unbalanced ("
msgstr "obalanserad ("
-#: lib/dfa.c:1968
+#: lib/dfa.c:1981
msgid "no syntax specified"
msgstr "ingen syntax angiven"
-#: lib/dfa.c:1976
+#: lib/dfa.c:1992
msgid "unbalanced )"
msgstr "obalanserad )"
@@ -205,7 +205,7 @@ msgstr "Reguljärt uttryck för stort"
msgid "Unmatched ) or \\)"
msgstr "Obalanserad ) eller \\)"
-#: lib/regcomp.c:689
+#: lib/regcomp.c:688
msgid "No previous regular expression"
msgstr "Inget tidigare reguljärt uttryck"
@@ -214,12 +214,12 @@ msgstr "Inget tidigare reguljärt uttryck"
msgid "setting permissions for %s"
msgstr "sätter rättigheter för %s"
-#: lib/version-etc.c:74
+#: lib/version-etc.c:73
#, c-format
msgid "Packaged by %s (%s)\n"
msgstr "Paketerad av %s (%s)\n"
-#: lib/version-etc.c:77
+#: lib/version-etc.c:76
#, c-format
msgid "Packaged by %s\n"
msgstr "Paketerad av %s\n"
@@ -227,11 +227,11 @@ msgstr "Paketerad av %s\n"
#. TRANSLATORS: Translate "(C)" to the copyright symbol
#. (C-in-a-circle), if this symbol is available in the user's
#. locale. Otherwise, do not translate "(C)"; leave it as-is.
-#: lib/version-etc.c:84
+#: lib/version-etc.c:83
msgid "(C)"
msgstr "©"
-#: lib/version-etc.c:86
+#: lib/version-etc.c:85
msgid ""
"\n"
"License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl."
@@ -436,140 +436,144 @@ msgstr "kommando saknas"
msgid "command only uses one address"
msgstr "kommandot använder endast en adress"
-#: sed/compile.c:164
+#: sed/compile.c:165
msgid "unterminated address regex"
msgstr "oavslutat reguljärt uttryck för adress"
-#: sed/compile.c:165
+#: sed/compile.c:166
msgid "unterminated `s' command"
msgstr "oavslutat ”s”-kommando"
-#: sed/compile.c:166
+#: sed/compile.c:167
msgid "unterminated `y' command"
msgstr "oavslutat ”y”-kommando"
-#: sed/compile.c:167
+#: sed/compile.c:168
msgid "unknown option to `s'"
msgstr "flaggan okänd för ”s”"
-#: sed/compile.c:169
+#: sed/compile.c:170
msgid "multiple `p' options to `s' command"
msgstr "flera ”p”-flaggor till ”s”-kommandot"
-#: sed/compile.c:171
+#: sed/compile.c:172
msgid "multiple `g' options to `s' command"
msgstr "flera ”g”-flaggor till ”s”-kommandot"
-#: sed/compile.c:173
+#: sed/compile.c:174
msgid "multiple number options to `s' command"
msgstr "flera sifferflaggor till ”s”-kommandot"
-#: sed/compile.c:175
+#: sed/compile.c:176
msgid "number option to `s' command may not be zero"
msgstr "sifferflagga till kommandot ”s” får inte vara noll"
-#: sed/compile.c:177
+#: sed/compile.c:178
msgid "strings for `y' command are different lengths"
msgstr "strängarna för kommandot ”y” är olika långa"
-#: sed/compile.c:179
+#: sed/compile.c:180
msgid "delimiter character is not a single-byte character"
msgstr "avgränsningstecknet är inte en ensam byte"
-#: sed/compile.c:181
+#: sed/compile.c:182
msgid "expected newer version of sed"
msgstr "nyare version av sed förväntades"
-#: sed/compile.c:183
+#: sed/compile.c:184
msgid "invalid usage of line address 0"
msgstr "felaktig användning av radadress 0"
-#: sed/compile.c:184
+#: sed/compile.c:185
#, c-format
msgid "unknown command: `%c'"
msgstr "okänt kommando: ”%c”"
-#: sed/compile.c:186
+#: sed/compile.c:187
msgid "incomplete command"
msgstr "ofullständigt kommando"
-#: sed/compile.c:188
+#: sed/compile.c:189
msgid "\":\" lacks a label"
msgstr "”:” saknar en etikett"
-#: sed/compile.c:190
+#: sed/compile.c:191
msgid "recursive escaping after \\c not allowed"
msgstr "rekursiva kontrollsekvenser efter \\c tillåts inte"
-#: sed/compile.c:213
+#: sed/compile.c:193
+msgid "e/r/w commands disabled in sandbox mode"
+msgstr "kommandona e/r/w är inaktiverade i sandlådeläge"
+
+#: sed/compile.c:215
#, c-format
msgid "%s: file %s line %lu: %s\n"
msgstr "%s: fil %s rad %lu: %s\n"
-#: sed/compile.c:216
+#: sed/compile.c:218
#, c-format
msgid "%s: -e expression #%lu, char %lu: %s\n"
msgstr "%s: -e uttryck #%lu, tecken %lu: %s\n"
-#: sed/compile.c:1644
+#: sed/compile.c:1607
#, c-format
msgid "can't find label for jump to `%s'"
msgstr "kan inte hitta etiketten för hopp till ”%s”"
-#: sed/execute.c:254 sed/execute.c:271
+#: sed/execute.c:253 sed/execute.c:270
#, c-format
msgid "case conversion produced an invalid character"
msgstr "skiftlägeskonvertering producerade ett ogiltigt tecken"
-#: sed/execute.c:565
+#: sed/execute.c:561
#, c-format
msgid "%s: can't read %s: %s\n"
msgstr "%s: kan inte läsa %s: %s\n"
-#: sed/execute.c:590
+#: sed/execute.c:587
#, c-format
msgid "couldn't edit %s: is a terminal"
msgstr "kunde inte redigera %s: är en terminal"
-#: sed/execute.c:595
+#: sed/execute.c:592
#, c-format
msgid "couldn't edit %s: not a regular file"
msgstr "kunde inte redigera %s: inte en vanlig fil"
-#: sed/execute.c:606
+#: sed/execute.c:603
#, 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:614
+#: sed/execute.c:611
#, c-format
msgid "%s: warning: failed to get security context of %s: %s"
msgstr "%s: varning: misslyckades med att erhålla säkerhetskontext för %s: %s"
-#: sed/execute.c:633 sed/utils.c:178
+#: sed/execute.c:630 sed/utils.c:188
#, c-format
msgid "couldn't open temporary file %s: %s"
msgstr "kunde inte öppna temporära filen %s: %s"
-#: sed/execute.c:1148 sed/execute.c:1358
+#: sed/execute.c:1167 sed/execute.c:1366
msgid "error in subprocess"
msgstr "fel i underprocess"
-#: sed/execute.c:1150
+#: sed/execute.c:1169
msgid "option `e' not supported"
msgstr "flaggan ”e” stöds inte"
-#: sed/execute.c:1339
+#: sed/execute.c:1347
msgid "`e' command not supported"
msgstr "kommandot ”e” stöds inte"
-#: sed/execute.c:1665
+#: sed/execute.c:1662
msgid "no input files"
msgstr "inga indatafiler"
-#: sed/regexp.c:39
+#: sed/regexp.c:40
msgid "no previous regular expression"
msgstr "inget tidigare reguljärt uttryck"
@@ -577,32 +581,40 @@ msgstr "inget tidigare reguljärt uttryck"
# Jag antar RHS står för "right hand side". Man kan då säga
# "... kommandots högersida"
#
-#: sed/regexp.c:141
+#: sed/regexp.c:125
#, c-format
msgid "invalid reference \\%d on `s' command's RHS"
msgstr "ogiltig referens \\%d på ”s”-kommandots högersida"
-#: sed/regexp.c:259
+#: sed/regexp.c:196
msgid "regex input buffer length larger than INT_MAX"
msgstr "indatabuffertlängd för reguljära uttryck större än INT_MAX"
-#: sed/sed.c:35
+#: sed/sed.c:36
msgid "Jay Fenlason"
msgstr "Jay Fenlason"
-#: sed/sed.c:36
+#: sed/sed.c:37
msgid "Tom Lord"
msgstr "Tom Lord"
-#: sed/sed.c:37
+#: sed/sed.c:38
msgid "Ken Pizzini"
msgstr "Ken Pizzini"
-#: sed/sed.c:38
+#: sed/sed.c:39
msgid "Paolo Bonzini"
msgstr "Paolo Bonzini"
-#: sed/sed.c:113
+#: sed/sed.c:40
+msgid "Jim Meyering"
+msgstr "Jim Meyering"
+
+#: sed/sed.c:41
+msgid "Assaf Gordon"
+msgstr "Assaf Gordon"
+
+#: sed/sed.c:124
#, c-format
msgid ""
"GNU sed home page: <https://www.gnu.org/software/sed/>.\n"
@@ -611,22 +623,14 @@ msgstr ""
"Webbsida för GNU sed: <https://www.gnu.org/software/sed/>.\n"
"Allmän hjälp för GNU-programvara: <https://www.gnu.org/gethelp/>.\n"
-#: sed/sed.c:120
+#: sed/sed.c:130
#, c-format
msgid "E-mail bug reports to: <%s>.\n"
msgstr ""
"Skicka felrapporter till: <%s>.\n"
"Skicka synpunkter på översättningen till <tp-sv@listor.tp-sv.se>.\n"
-#: sed/sed.c:129
-msgid ""
-" -R, --regexp-perl\n"
-" use Perl 5's regular expressions syntax in the script.\n"
-msgstr ""
-" -R, --regexp-perl\n"
-" använd Perl 5:s syntax för reguljära uttryck i skriptet.\n"
-
-#: sed/sed.c:134
+#: sed/sed.c:138
#, c-format
msgid ""
"Usage: %s [OPTION]... {script-only-if-no-other-script} [input-file]...\n"
@@ -635,7 +639,7 @@ msgstr ""
"Användning: %s [FLAGGA]… {skript-endast-om-inga-andra} [indatafil]…\n"
"\n"
-#: sed/sed.c:138
+#: sed/sed.c:142
#, c-format
msgid ""
" -n, --quiet, --silent\n"
@@ -644,7 +648,16 @@ msgstr ""
" -n, --quiet, --silent\n"
" förhindrar automatisk utskrift av mönsterutrymme\n"
-#: sed/sed.c:140
+#: sed/sed.c:144
+#, c-format
+msgid ""
+" --debug\n"
+" annotate program execution\n"
+msgstr ""
+" --debug\n"
+" kommentera körning av program\n"
+
+#: sed/sed.c:146
#, c-format
msgid ""
" -e script, --expression=script\n"
@@ -653,7 +666,7 @@ msgstr ""
" -e skript, --expression=skript\n"
" lägg till skript till de kommandon som ska utföras\n"
-#: sed/sed.c:142
+#: sed/sed.c:148
#, c-format
msgid ""
" -f script-file, --file=script-file\n"
@@ -664,7 +677,7 @@ msgstr ""
" lägg till innehållet i skriptfil till de kommandon som ska\n"
" utföras\n"
-#: sed/sed.c:146
+#: sed/sed.c:152
#, c-format
msgid ""
" --follow-symlinks\n"
@@ -673,7 +686,7 @@ msgstr ""
" --follow-symlinks\n"
" följ symlänkar när behandling sker på plats\n"
-#: sed/sed.c:149
+#: sed/sed.c:155
#, c-format
msgid ""
" -i[SUFFIX], --in-place[=SUFFIX]\n"
@@ -683,7 +696,7 @@ msgstr ""
" redigera filer på plats (skapar säkerhetskopia om ÄNDELSE\n"
" tillhandahålls)\n"
-#: sed/sed.c:153
+#: sed/sed.c:158
#, c-format
msgid ""
" -b, --binary\n"
@@ -693,7 +706,7 @@ msgstr ""
" -b, --binary\n"
" öppna filer i binärläge (CR+LF särbehandlas inte)\n"
-#: sed/sed.c:157
+#: sed/sed.c:162
#, c-format
msgid ""
" -l N, --line-length=N\n"
@@ -702,7 +715,7 @@ msgstr ""
" -l N, --line-length=N\n"
" ange önskad radbrytningslängd för ”l”-kommandot\n"
-#: sed/sed.c:159
+#: sed/sed.c:164
#, c-format
msgid ""
" --posix\n"
@@ -711,7 +724,7 @@ msgstr ""
" --posix\n"
" inaktivera alla GNU-utökningar.\n"
-#: sed/sed.c:161
+#: sed/sed.c:166
#, c-format
msgid ""
" -E, -r, --regexp-extended\n"
@@ -722,7 +735,7 @@ msgstr ""
" använd utökade reguljära uttryck i skriptet\n"
" (för portabilitet använd POSIX -E).\n"
-#: sed/sed.c:167
+#: sed/sed.c:169
#, c-format
msgid ""
" -s, --separate\n"
@@ -733,7 +746,7 @@ msgstr ""
" betrakta filer som separata istället för som en\n"
" kontinuerlig lång dataström.\n"
-#: sed/sed.c:170
+#: sed/sed.c:172
#, c-format
msgid ""
" --sandbox\n"
@@ -742,7 +755,7 @@ msgstr ""
" --sandbox\n"
" arbeta i sandlådeläge (inaktivera kommandona e/r/w).\n"
-#: sed/sed.c:172
+#: sed/sed.c:174
#, c-format
msgid ""
" -u, --unbuffered\n"
@@ -754,7 +767,7 @@ msgstr ""
" läs in minimala mängder data från indatafilerna och töm\n"
" utdatabuffertarna oftare\n"
-#: sed/sed.c:175
+#: sed/sed.c:177
#, c-format
msgid ""
" -z, --null-data\n"
@@ -763,17 +776,17 @@ msgstr ""
" -z, --null-data\n"
" separera rader med nolltecken\n"
-#: sed/sed.c:177
+#: sed/sed.c:179
#, c-format
msgid " --help display this help and exit\n"
msgstr " --help visa denna hjälptext och avsluta\n"
-#: sed/sed.c:178
+#: sed/sed.c:180
#, c-format
msgid " --version output version information and exit\n"
msgstr " --version visa versionsinformation och avsluta\n"
-#: sed/sed.c:179
+#: sed/sed.c:181
#, c-format
msgid ""
"\n"
@@ -790,48 +803,69 @@ msgstr ""
"läses standard in.\n"
"\n"
-#: sed/utils.c:73 sed/utils.c:384
+#: sed/sed.c:373
+msgid "failed to set binary mode on STDIN"
+msgstr "misslyckades med att ställa in binärläge för STDIN"
+
+#: sed/sed.c:375
+msgid "failed to set binary mode on STDOUT"
+msgstr "misslyckades med att ställa in binärläge för STDOUT"
+
+#: sed/utils.c:77 sed/utils.c:395
#, c-format
msgid "cannot remove %s: %s"
msgstr "kan inte ta bort %s: %s"
-#: sed/utils.c:136
+#: sed/utils.c:146
#, c-format
msgid "couldn't open file %s: %s"
msgstr "kunde inte öppna filen %s: %s"
-#: sed/utils.c:155
+#: sed/utils.c:165
#, c-format
msgid "couldn't attach to %s: %s"
msgstr "kunde inte fästa vid %s: %s"
#: sed/utils.c:192
#, c-format
+msgid "failed to set binary mode on '%s'"
+msgstr "misslyckades med att ställa in binärläge för ”%s”"
+
+#: sed/utils.c:207
+#, 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 %llu objekt till %s: %s"
msgstr[1] "kunde inte skriva %llu objekt till %s: %s"
-#: sed/utils.c:204 sed/utils.c:223
+#: sed/utils.c:219 sed/utils.c:238
#, c-format
msgid "read error on %s: %s"
msgstr "läsfel vid %s: %s"
-#: sed/utils.c:325
+#: sed/utils.c:336
#, c-format
msgid "couldn't follow symlink %s: %s"
msgstr "kunde inte följa symlänken %s: %s"
-#: sed/utils.c:359
+#: sed/utils.c:370
#, c-format
msgid "cannot stat %s: %s"
msgstr "kan inte ta status på %s: %s"
-#: sed/utils.c:389
+#: sed/utils.c:400
#, c-format
msgid "cannot rename %s: %s"
msgstr "kan inte byta namn på %s: %s"
+#~ msgid ""
+#~ " -R, --regexp-perl\n"
+#~ " use Perl 5's regular expressions syntax in the script.\n"
+#~ msgstr ""
+#~ " -R, --regexp-perl\n"
+#~ " använd Perl 5:s syntax för reguljära uttryck i "
+#~ "skriptet.\n"
+
#~ msgid "%s: option '--%s' doesn't allow an argument\n"
#~ msgstr "%s: flaggan ”--%s” tar inget argument\n"
diff --git a/po/tr.gmo b/po/tr.gmo
index 29391a9..1a91fc4 100644
--- a/po/tr.gmo
+++ b/po/tr.gmo
Binary files differ
diff --git a/po/tr.po b/po/tr.po
index bcf5d4c..f374897 100644
--- a/po/tr.po
+++ b/po/tr.po
@@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: sed 4.2.1\n"
"Report-Msgid-Bugs-To: bug-gnu-utils@gnu.org\n"
-"POT-Creation-Date: 2018-03-31 18:40-0700\n"
+"POT-Creation-Date: 2018-12-20 22:03-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"
@@ -28,43 +28,43 @@ msgstr ""
msgid "preserving permissions for %s"
msgstr ""
-#: lib/dfa.c:958
+#: lib/dfa.c:970
msgid "unbalanced ["
msgstr ""
-#: lib/dfa.c:1079
+#: lib/dfa.c:1091
#, fuzzy
msgid "invalid character class"
msgstr "Hatalı karakter sınıf ismi"
-#: lib/dfa.c:1205
+#: lib/dfa.c:1217
msgid "character class syntax is [[:space:]], not [:space:]"
msgstr ""
-#: lib/dfa.c:1272
+#: lib/dfa.c:1284
msgid "unfinished \\ escape"
msgstr ""
-#: lib/dfa.c:1433
+#: lib/dfa.c:1445
#, fuzzy
msgid "invalid content of \\{\\}"
msgstr "\\{\\} içeriği hatalı"
#
-#: lib/dfa.c:1436
+#: lib/dfa.c:1448
#, fuzzy
msgid "regular expression too big"
msgstr "Düzenli ifade fazla büyük"
-#: lib/dfa.c:1850
+#: lib/dfa.c:1863
msgid "unbalanced ("
msgstr ""
-#: lib/dfa.c:1968
+#: lib/dfa.c:1981
msgid "no syntax specified"
msgstr ""
-#: lib/dfa.c:1976
+#: lib/dfa.c:1992
msgid "unbalanced )"
msgstr ""
@@ -218,7 +218,7 @@ msgstr "Düzenli ifade fazla büyük"
msgid "Unmatched ) or \\)"
msgstr "Eşleşmeyen ) or \\)"
-#: lib/regcomp.c:689
+#: lib/regcomp.c:688
msgid "No previous regular expression"
msgstr "Daha önce düzenli ifade yok"
@@ -227,12 +227,12 @@ msgstr "Daha önce düzenli ifade yok"
msgid "setting permissions for %s"
msgstr ""
-#: lib/version-etc.c:74
+#: lib/version-etc.c:73
#, c-format
msgid "Packaged by %s (%s)\n"
msgstr ""
-#: lib/version-etc.c:77
+#: lib/version-etc.c:76
#, c-format
msgid "Packaged by %s\n"
msgstr ""
@@ -240,11 +240,11 @@ 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
+#: lib/version-etc.c:83
msgid "(C)"
msgstr ""
-#: lib/version-etc.c:86
+#: lib/version-etc.c:85
msgid ""
"\n"
"License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl."
@@ -427,169 +427,181 @@ msgstr "komut eksik"
msgid "command only uses one address"
msgstr "komutta yalnızca tek adres kullanılır"
-#: sed/compile.c:164
+#: sed/compile.c:165
msgid "unterminated address regex"
msgstr "sonlandırılmamış adres düzenli ifadesi"
-#: sed/compile.c:165
+#: sed/compile.c:166
msgid "unterminated `s' command"
msgstr "sonlandırılmamış 's' komutu"
-#: sed/compile.c:166
+#: sed/compile.c:167
msgid "unterminated `y' command"
msgstr "sonlandırılmamış 'y' komutu"
-#: sed/compile.c:167
+#: sed/compile.c:168
msgid "unknown option to `s'"
msgstr "`s' komutuna bilinmeyen seçenek verilmiş"
-#: sed/compile.c:169
+#: sed/compile.c:170
msgid "multiple `p' options to `s' command"
msgstr "`s' komutuna birden fazla `p' seçeneği verilmiş"
-#: sed/compile.c:171
+#: sed/compile.c:172
msgid "multiple `g' options to `s' command"
msgstr "`s' komutuna birden fazla `g' seçeneği verilmiş"
-#: sed/compile.c:173
+#: sed/compile.c:174
msgid "multiple number options to `s' command"
msgstr "`s' komutuna birden fazla sayı seçeneği verilmiş"
-#: sed/compile.c:175
+#: sed/compile.c:176
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:177
+#: sed/compile.c:178
msgid "strings for `y' command are different lengths"
msgstr "`y' komutu için dizgeler değişik uzunluklarda"
-#: sed/compile.c:179
+#: sed/compile.c:180
msgid "delimiter character is not a single-byte character"
msgstr "ayraç karakteri tek baytlık değil"
-#: sed/compile.c:181
+#: sed/compile.c:182
msgid "expected newer version of sed"
msgstr "sed'in daha yeni bir sürümü beklendi"
-#: sed/compile.c:183
+#: sed/compile.c:184
msgid "invalid usage of line address 0"
msgstr "satır adresi 0'ın hatalı kullanımı"
-#: sed/compile.c:184
+#: sed/compile.c:185
#, c-format
msgid "unknown command: `%c'"
msgstr "bilinmeyen komut: `%c'"
-#: sed/compile.c:186
+#: sed/compile.c:187
#, fuzzy
msgid "incomplete command"
msgstr "komut eksik"
-#: sed/compile.c:188
+#: sed/compile.c:189
msgid "\":\" lacks a label"
msgstr ""
-#: sed/compile.c:190
+#: sed/compile.c:191
msgid "recursive escaping after \\c not allowed"
msgstr ""
-#: sed/compile.c:213
+#: sed/compile.c:193
+msgid "e/r/w commands disabled in sandbox mode"
+msgstr ""
+
+#: sed/compile.c:215
#, c-format
msgid "%s: file %s line %lu: %s\n"
msgstr "%s: dosya %s satır %lu: %s\n"
-#: sed/compile.c:216
+#: sed/compile.c:218
#, c-format
msgid "%s: -e expression #%lu, char %lu: %s\n"
msgstr "%s: -e ifade #%lu, harf %lu: %s\n"
-#: sed/compile.c:1644
+#: sed/compile.c:1607
#, c-format
msgid "can't find label for jump to `%s'"
msgstr "`%s'e atlamak için etiket bulunamıyor"
-#: sed/execute.c:254 sed/execute.c:271
+#: sed/execute.c:253 sed/execute.c:270
#, c-format
msgid "case conversion produced an invalid character"
msgstr ""
-#: sed/execute.c:565
+#: sed/execute.c:561
#, c-format
msgid "%s: can't read %s: %s\n"
msgstr "%s: %s okunamıyor: %s\n"
-#: sed/execute.c:590
+#: sed/execute.c:587
#, c-format
msgid "couldn't edit %s: is a terminal"
msgstr "%s düzenlenemedi: bu bir terminal"
-#: sed/execute.c:595
+#: sed/execute.c:592
#, c-format
msgid "couldn't edit %s: not a regular file"
msgstr "%s düzenlenemedi: normal dosya değil"
-#: sed/execute.c:606
+#: sed/execute.c:603
#, 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:614
+#: sed/execute.c:611
#, c-format
msgid "%s: warning: failed to get security context of %s: %s"
msgstr "%s: uyarı: %s için güvenlik bağlamı alma başarısız: %s"
-#: sed/execute.c:633 sed/utils.c:178
+#: sed/execute.c:630 sed/utils.c:188
#, c-format
msgid "couldn't open temporary file %s: %s"
msgstr "geçici dosya %s açılamadı: %s"
-#: sed/execute.c:1148 sed/execute.c:1358
+#: sed/execute.c:1167 sed/execute.c:1366
msgid "error in subprocess"
msgstr "altsüreçte hata"
-#: sed/execute.c:1150
+#: sed/execute.c:1169
msgid "option `e' not supported"
msgstr " e' seçeneği desteklenmiyor"
-#: sed/execute.c:1339
+#: sed/execute.c:1347
msgid "`e' command not supported"
msgstr "`e' komutu desteklenmiyor"
-#: sed/execute.c:1665
+#: sed/execute.c:1662
msgid "no input files"
msgstr "girdi dosyası yok"
-#: sed/regexp.c:39
+#: sed/regexp.c:40
msgid "no previous regular expression"
msgstr "daha önce bir düzenli ifade yok"
-#: sed/regexp.c:141
+#: sed/regexp.c:125
#, c-format
msgid "invalid reference \\%d on `s' command's RHS"
msgstr "`s' komutunun RHS'sinde geçersiz \\%d referansı"
-#: sed/regexp.c:259
+#: sed/regexp.c:196
msgid "regex input buffer length larger than INT_MAX"
msgstr ""
-#: sed/sed.c:35
+#: sed/sed.c:36
msgid "Jay Fenlason"
msgstr ""
-#: sed/sed.c:36
+#: sed/sed.c:37
msgid "Tom Lord"
msgstr ""
-#: sed/sed.c:37
+#: sed/sed.c:38
msgid "Ken Pizzini"
msgstr ""
-#: sed/sed.c:38
+#: sed/sed.c:39
msgid "Paolo Bonzini"
msgstr ""
-#: sed/sed.c:113
+#: sed/sed.c:40
+msgid "Jim Meyering"
+msgstr ""
+
+#: sed/sed.c:41
+msgid "Assaf Gordon"
+msgstr ""
+
+#: sed/sed.c:124
#, fuzzy, c-format
msgid ""
"GNU sed home page: <https://www.gnu.org/software/sed/>.\n"
@@ -599,20 +611,12 @@ msgstr ""
"GNU yazılımı kullanımı hakkında genel yardım: <http://www.gnu.org/gethelp/"
">.\n"
-#: sed/sed.c:120
+#: sed/sed.c:130
#, c-format
msgid "E-mail bug reports to: <%s>.\n"
msgstr ""
-#: 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"
-" betikte Perl 5'in düzenli ifade sözdizimini kullanır.\n"
-
-#: sed/sed.c:134
+#: sed/sed.c:138
#, c-format
msgid ""
"Usage: %s [OPTION]... {script-only-if-no-other-script} [input-file]...\n"
@@ -621,7 +625,7 @@ msgstr ""
"Kullanım: %s [SEÇENEK]... {betik-eğer-başka-betik-yoksa} [girdi-dosyası]...\n"
"\n"
-#: sed/sed.c:138
+#: sed/sed.c:142
#, c-format
msgid ""
" -n, --quiet, --silent\n"
@@ -630,7 +634,16 @@ msgstr ""
" -n, --quiet, --silent\n"
" kalıp uzayının otomatik yazdırılmasını kaldırır\n"
-#: sed/sed.c:140
+#: sed/sed.c:144
+#, fuzzy, c-format
+msgid ""
+" --debug\n"
+" annotate program execution\n"
+msgstr ""
+" --posix\n"
+" bütün GNU eklentilerini devre dışı bırakır.\n"
+
+#: sed/sed.c:146
#, c-format
msgid ""
" -e script, --expression=script\n"
@@ -639,7 +652,7 @@ msgstr ""
" -e script, --expression=betik\n"
" betiği, koşturulacak komutlara ekler\n"
-#: sed/sed.c:142
+#: sed/sed.c:148
#, c-format
msgid ""
" -f script-file, --file=script-file\n"
@@ -649,7 +662,7 @@ msgstr ""
" -f betik-dosyası, --file=betik-dosyası\n"
" betik-dosyası'nın içeriğini, koşturulacak komutlara ekler\n"
-#: sed/sed.c:146
+#: sed/sed.c:152
#, c-format
msgid ""
" --follow-symlinks\n"
@@ -658,7 +671,7 @@ msgstr ""
" --follow-symlinks\n"
" symlink'leri yerinde işlerken takip et\n"
-#: sed/sed.c:149
+#: sed/sed.c:155
#, fuzzy, c-format
msgid ""
" -i[SUFFIX], --in-place[=SUFFIX]\n"
@@ -668,7 +681,7 @@ msgstr ""
" dosyaları yerinde değiştirir (eğer uzantı verilmişse yedek\n"
" oluşturur)\n"
-#: sed/sed.c:153
+#: sed/sed.c:158
#, c-format
msgid ""
" -b, --binary\n"
@@ -678,7 +691,7 @@ msgstr ""
" -b, --binary\n"
" dosyaları ikili kipte aç (CR+LF'ler özel olarak işlenmez)\n"
-#: sed/sed.c:157
+#: sed/sed.c:162
#, c-format
msgid ""
" -l N, --line-length=N\n"
@@ -687,7 +700,7 @@ msgstr ""
" -l N, --line-length=N\n"
" `l' komutu için istenen satır sarma uzunluğunu belirtir\n"
-#: sed/sed.c:159
+#: sed/sed.c:164
#, c-format
msgid ""
" --posix\n"
@@ -696,7 +709,7 @@ msgstr ""
" --posix\n"
" bütün GNU eklentilerini devre dışı bırakır.\n"
-#: sed/sed.c:161
+#: sed/sed.c:166
#, fuzzy, c-format
msgid ""
" -E, -r, --regexp-extended\n"
@@ -706,7 +719,7 @@ msgstr ""
" -r, --regexp-extended\n"
" betikte geliştirilmiş düzenli ifadeler kullanır.\n"
-#: sed/sed.c:167
+#: sed/sed.c:169
#, fuzzy, c-format
msgid ""
" -s, --separate\n"
@@ -717,14 +730,14 @@ msgstr ""
" dosyaları, tek uzun bir akış yerine ayrı ayrı "
"değerlendirir.\n"
-#: sed/sed.c:170
+#: sed/sed.c:172
#, c-format
msgid ""
" --sandbox\n"
" operate in sandbox mode (disable e/r/w commands).\n"
msgstr ""
-#: sed/sed.c:172
+#: sed/sed.c:174
#, c-format
msgid ""
" -u, --unbuffered\n"
@@ -736,24 +749,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:175
+#: sed/sed.c:177
#, c-format
msgid ""
" -z, --null-data\n"
" separate lines by NUL characters\n"
msgstr ""
-#: sed/sed.c:177
+#: sed/sed.c:179
#, c-format
msgid " --help display this help and exit\n"
msgstr " --help bu yardımı gösterir ve çıkar\n"
-#: sed/sed.c:178
+#: sed/sed.c:180
#, c-format
msgid " --version output version information and exit\n"
msgstr " --version sürüm bilgisinin gösterir ve çıkar\n"
-#: sed/sed.c:179
+#: sed/sed.c:181
#, c-format
msgid ""
"\n"
@@ -770,47 +783,67 @@ msgstr ""
"verilmemiş ise, standart girdi okunur.\n"
"\n"
-#: sed/utils.c:73 sed/utils.c:384
+#: sed/sed.c:373
+msgid "failed to set binary mode on STDIN"
+msgstr ""
+
+#: sed/sed.c:375
+msgid "failed to set binary mode on STDOUT"
+msgstr ""
+
+#: sed/utils.c:77 sed/utils.c:395
#, c-format
msgid "cannot remove %s: %s"
msgstr "%s kaldırılamıyor: %s"
-#: sed/utils.c:136
+#: sed/utils.c:146
#, c-format
msgid "couldn't open file %s: %s"
msgstr "%s dosyası açılamadı: %s"
-#: sed/utils.c:155
+#: sed/utils.c:165
#, c-format
msgid "couldn't attach to %s: %s"
msgstr "%s içine ekleme yapılamadı: %s"
#: sed/utils.c:192
+#, c-format
+msgid "failed to set binary mode on '%s'"
+msgstr ""
+
+#: sed/utils.c:207
#, 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:204 sed/utils.c:223
+#: sed/utils.c:219 sed/utils.c:238
#, c-format
msgid "read error on %s: %s"
msgstr "%s'de okuma hatası: %s"
-#: sed/utils.c:325
+#: sed/utils.c:336
#, c-format
msgid "couldn't follow symlink %s: %s"
msgstr "%s symlink takip edilemedi: %s"
-#: sed/utils.c:359
+#: sed/utils.c:370
#, c-format
msgid "cannot stat %s: %s"
msgstr "%s durumu alınamadı: %s"
-#: sed/utils.c:389
+#: sed/utils.c:400
#, c-format
msgid "cannot rename %s: %s"
msgstr "%s yeniden adlandırılamadı: %s"
+#~ msgid ""
+#~ " -R, --regexp-perl\n"
+#~ " use Perl 5's regular expressions syntax in the script.\n"
+#~ msgstr ""
+#~ " -R, --regexp-perl\n"
+#~ " betikte Perl 5'in düzenli ifade sözdizimini kullanır.\n"
+
#~ msgid "cannot specify modifiers on empty regexp"
#~ msgstr "boş düzenli ifadeye değiştirici atanamaz"
diff --git a/po/uk.gmo b/po/uk.gmo
index a19f129..c175aff 100644
--- a/po/uk.gmo
+++ b/po/uk.gmo
Binary files differ
diff --git a/po/uk.po b/po/uk.po
index 8020933..b99cd43 100644
--- a/po/uk.po
+++ b/po/uk.po
@@ -7,10 +7,10 @@
# Yuri Chornoivan <yurchor@ukr.net>, 2012, 2016, 2018.
msgid ""
msgstr ""
-"Project-Id-Version: sed 4.4.104\n"
+"Project-Id-Version: sed 4.5.48\n"
"Report-Msgid-Bugs-To: bug-gnu-utils@gnu.org\n"
-"POT-Creation-Date: 2018-03-31 18:40-0700\n"
-"PO-Revision-Date: 2018-03-24 13:46+0200\n"
+"POT-Creation-Date: 2018-12-20 22:03-0800\n"
+"PO-Revision-Date: 2018-12-13 21:02+0200\n"
"Last-Translator: Yuri Chornoivan <yurchor@ukr.net>\n"
"Language-Team: Ukrainian <translation-team-uk@lists.sourceforge.net>\n"
"Language: uk\n"
@@ -31,39 +31,39 @@ msgstr "помилка під час спроби запису"
msgid "preserving permissions for %s"
msgstr "зберігаємо права доступу для %s"
-#: lib/dfa.c:958
+#: lib/dfa.c:970
msgid "unbalanced ["
msgstr "неурівноважена ["
-#: lib/dfa.c:1079
+#: lib/dfa.c:1091
msgid "invalid character class"
msgstr "некоректний клас символів"
-#: lib/dfa.c:1205
+#: lib/dfa.c:1217
msgid "character class syntax is [[:space:]], not [:space:]"
msgstr "синтаксис класу символів передбачає [[:space:]], а не [:space:]"
-#: lib/dfa.c:1272
+#: lib/dfa.c:1284
msgid "unfinished \\ escape"
msgstr "незавершене екранування \\"
-#: lib/dfa.c:1433
+#: lib/dfa.c:1445
msgid "invalid content of \\{\\}"
msgstr "некоректний вміст \\{\\}"
-#: lib/dfa.c:1436
+#: lib/dfa.c:1448
msgid "regular expression too big"
msgstr "занадто об'ємний формальний вираз"
-#: lib/dfa.c:1850
+#: lib/dfa.c:1863
msgid "unbalanced ("
msgstr "неурівноважена ("
-#: lib/dfa.c:1968
+#: lib/dfa.c:1981
msgid "no syntax specified"
msgstr "не вказано синтаксису"
-#: lib/dfa.c:1976
+#: lib/dfa.c:1992
msgid "unbalanced )"
msgstr "неурівноважена )"
@@ -207,7 +207,7 @@ msgstr "Надто великий регулярний вираз"
msgid "Unmatched ) or \\)"
msgstr "Не закрито ) чи \\)"
-#: lib/regcomp.c:689
+#: lib/regcomp.c:688
msgid "No previous regular expression"
msgstr "Немає попереднього регулярного виразу"
@@ -216,12 +216,12 @@ msgstr "Немає попереднього регулярного виразу"
msgid "setting permissions for %s"
msgstr "встановлення прав доступу для %s"
-#: lib/version-etc.c:74
+#: lib/version-etc.c:73
#, c-format
msgid "Packaged by %s (%s)\n"
msgstr "Пакування — %s (%s)\n"
-#: lib/version-etc.c:77
+#: lib/version-etc.c:76
#, c-format
msgid "Packaged by %s\n"
msgstr "Пакування — %s\n"
@@ -229,11 +229,11 @@ 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
+#: lib/version-etc.c:83
msgid "(C)"
msgstr "©"
-#: lib/version-etc.c:86
+#: lib/version-etc.c:85
msgid ""
"\n"
"License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl."
@@ -440,169 +440,181 @@ msgstr "пропущено команду"
msgid "command only uses one address"
msgstr "у команді використовується лише одна адреса"
-#: sed/compile.c:164
+#: sed/compile.c:165
msgid "unterminated address regex"
msgstr "незавершений формальний вираз адреси"
-#: sed/compile.c:165
+#: sed/compile.c:166
msgid "unterminated `s' command"
msgstr "незавершена команда «s»"
-#: sed/compile.c:166
+#: sed/compile.c:167
msgid "unterminated `y' command"
msgstr "незавершена команда «y»"
-#: sed/compile.c:167
+#: sed/compile.c:168
msgid "unknown option to `s'"
msgstr "невідомий параметр «s»"
-#: sed/compile.c:169
+#: sed/compile.c:170
msgid "multiple `p' options to `s' command"
msgstr "забагато ключів \"p\" до команди \"s\""
-#: sed/compile.c:171
+#: sed/compile.c:172
msgid "multiple `g' options to `s' command"
msgstr "забагато ключів \"g\" до команди \"s\""
-#: sed/compile.c:173
+#: sed/compile.c:174
msgid "multiple number options to `s' command"
msgstr "забагато числових параметрів до команди \"s\""
-#: sed/compile.c:175
+#: sed/compile.c:176
msgid "number option to `s' command may not be zero"
msgstr "числовий параметр до команди \"s\" не може бути нулем"
-#: sed/compile.c:177
+#: sed/compile.c:178
msgid "strings for `y' command are different lengths"
msgstr "рядки для команди «y» мають різну довжину"
-#: sed/compile.c:179
+#: sed/compile.c:180
msgid "delimiter character is not a single-byte character"
msgstr "символ-роздільник не є однобайтовим символом"
-#: sed/compile.c:181
+#: sed/compile.c:182
msgid "expected newer version of sed"
msgstr "мало бути використано новішу версію sed"
-#: sed/compile.c:183
+#: sed/compile.c:184
msgid "invalid usage of line address 0"
msgstr "некоректне використання рядка адреси 0"
-#: sed/compile.c:184
+#: sed/compile.c:185
#, c-format
msgid "unknown command: `%c'"
msgstr "невідома команда: «%c»"
-#: sed/compile.c:186
+#: sed/compile.c:187
msgid "incomplete command"
msgstr "неповна команда"
-#: sed/compile.c:188
+#: sed/compile.c:189
msgid "\":\" lacks a label"
msgstr "«:», не вистачає мітки"
-#: sed/compile.c:190
+#: sed/compile.c:191
msgid "recursive escaping after \\c not allowed"
msgstr "не можна використовувати рекурсивне екранування після \\c"
-#: sed/compile.c:213
+#: sed/compile.c:193
+msgid "e/r/w commands disabled in sandbox mode"
+msgstr "у режимі пісочниці команди e/r/w вимкнено"
+
+#: sed/compile.c:215
#, c-format
msgid "%s: file %s line %lu: %s\n"
msgstr "%s: файл %s, рядок %lu: %s\n"
-#: sed/compile.c:216
+#: sed/compile.c:218
#, c-format
msgid "%s: -e expression #%lu, char %lu: %s\n"
msgstr "%s: -e вираз #%lu, літера %lu: %s\n"
-#: sed/compile.c:1644
+#: sed/compile.c:1607
#, c-format
msgid "can't find label for jump to `%s'"
msgstr "не вдалося знайти мітку для переходу до «%s»"
-#: sed/execute.c:254 sed/execute.c:271
+#: sed/execute.c:253 sed/execute.c:270
#, c-format
msgid "case conversion produced an invalid character"
msgstr "перетворення регістрів літер призвело до появи некоректного символу"
-#: sed/execute.c:565
+#: sed/execute.c:561
#, c-format
msgid "%s: can't read %s: %s\n"
msgstr "%s: неможливо прочитати %s: %s\n"
-#: sed/execute.c:590
+#: sed/execute.c:587
#, c-format
msgid "couldn't edit %s: is a terminal"
msgstr "не вдалося змінити %s: цей об’єкт є терміналом"
-#: sed/execute.c:595
+#: sed/execute.c:592
#, c-format
msgid "couldn't edit %s: not a regular file"
msgstr "не вдалося змінити %s: не є звичайним файлом"
-#: sed/execute.c:606
+#: sed/execute.c:603
#, c-format
msgid "%s: warning: failed to set default file creation context to %s: %s"
msgstr ""
"%s: попередження: не вдалося встановити типовий контекст створення файла у "
"%s: %s"
-#: sed/execute.c:614
+#: sed/execute.c:611
#, c-format
msgid "%s: warning: failed to get security context of %s: %s"
msgstr "%s: попередження: не вдалося отримати контекст захисту %s: %s"
-#: sed/execute.c:633 sed/utils.c:178
+#: sed/execute.c:630 sed/utils.c:188
#, c-format
msgid "couldn't open temporary file %s: %s"
msgstr "не вдалося відкрити тимчасовий файл %s: %s"
-#: sed/execute.c:1148 sed/execute.c:1358
+#: sed/execute.c:1167 sed/execute.c:1366
msgid "error in subprocess"
msgstr "помилка у підпроцесі"
-#: sed/execute.c:1150
+#: sed/execute.c:1169
msgid "option `e' not supported"
msgstr "ключ \"e\" не підтримується"
-#: sed/execute.c:1339
+#: sed/execute.c:1347
msgid "`e' command not supported"
msgstr "команда \"e\" не підтримується"
-#: sed/execute.c:1665
+#: sed/execute.c:1662
msgid "no input files"
msgstr "немає вхідних даних"
-#: sed/regexp.c:39
+#: sed/regexp.c:40
msgid "no previous regular expression"
msgstr "немає попереднього формального виразу"
-#: sed/regexp.c:141
+#: sed/regexp.c:125
#, c-format
msgid "invalid reference \\%d on `s' command's RHS"
msgstr "некоректне посилання \\%d праворуч від команди «s»"
-#: sed/regexp.c:259
+#: sed/regexp.c:196
msgid "regex input buffer length larger than INT_MAX"
msgstr "довжина вхідного буфера формального виразу перевищує INT_MAX"
-#: sed/sed.c:35
+#: sed/sed.c:36
msgid "Jay Fenlason"
msgstr "Jay Fenlason"
-#: sed/sed.c:36
+#: sed/sed.c:37
msgid "Tom Lord"
msgstr "Tom Lord"
-#: sed/sed.c:37
+#: sed/sed.c:38
msgid "Ken Pizzini"
msgstr "Ken Pizzini"
-#: sed/sed.c:38
+#: sed/sed.c:39
msgid "Paolo Bonzini"
msgstr "Paolo Bonzini"
-#: sed/sed.c:113
+#: sed/sed.c:40
+msgid "Jim Meyering"
+msgstr "Jim Meyering"
+
+#: sed/sed.c:41
+msgid "Assaf Gordon"
+msgstr "Assaf Gordon"
+
+#: sed/sed.c:124
#, c-format
msgid ""
"GNU sed home page: <https://www.gnu.org/software/sed/>.\n"
@@ -612,20 +624,12 @@ msgstr ""
"Загальні довідкові матеріали щодо користування програмами GNU: <https://www."
"gnu.org/gethelp/>.\n"
-#: sed/sed.c:120
+#: sed/sed.c:130
#, 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
+#: sed/sed.c:138
#, c-format
msgid ""
"Usage: %s [OPTION]... {script-only-if-no-other-script} [input-file]...\n"
@@ -635,7 +639,7 @@ msgstr ""
"вхідних даних]...\n"
"\n"
-#: sed/sed.c:138
+#: sed/sed.c:142
#, c-format
msgid ""
" -n, --quiet, --silent\n"
@@ -644,7 +648,16 @@ msgstr ""
" -n, --quiet, --silent\n"
" не виводити автоматично пробіли шаблонів\n"
-#: sed/sed.c:140
+#: sed/sed.c:144
+#, c-format
+msgid ""
+" --debug\n"
+" annotate program execution\n"
+msgstr ""
+" --debug\n"
+" анотувати виконання програми\n"
+
+#: sed/sed.c:146
#, c-format
msgid ""
" -e script, --expression=script\n"
@@ -653,7 +666,7 @@ msgstr ""
" -e скрипт, --expression=скрипт\n"
" додати скрипт до команд, які слід виконати\n"
-#: sed/sed.c:142
+#: sed/sed.c:148
#, c-format
msgid ""
" -f script-file, --file=script-file\n"
@@ -664,7 +677,7 @@ msgstr ""
" додати вміст файла файл-скрипту до команд, які слід "
"виконати\n"
-#: sed/sed.c:146
+#: sed/sed.c:152
#, c-format
msgid ""
" --follow-symlinks\n"
@@ -673,7 +686,7 @@ msgstr ""
" --follow-symlinks\n"
" переходити за символічними посиланням під час обробки\n"
-#: sed/sed.c:149
+#: sed/sed.c:155
#, c-format
msgid ""
" -i[SUFFIX], --in-place[=SUFFIX]\n"
@@ -683,7 +696,7 @@ msgstr ""
" редагувати файл на місці (створювати резервні копії, якщо "
"вказано суфікс назви)\n"
-#: sed/sed.c:153
+#: sed/sed.c:158
#, c-format
msgid ""
" -b, --binary\n"
@@ -694,7 +707,7 @@ msgstr ""
" відкривати файли у бінарному режимі (CR+LF не "
"обробляються)\n"
-#: sed/sed.c:157
+#: sed/sed.c:162
#, c-format
msgid ""
" -l N, --line-length=N\n"
@@ -704,7 +717,7 @@ msgstr ""
" вказати бажану довжину рядка для перенесення для команди "
"«l»\n"
-#: sed/sed.c:159
+#: sed/sed.c:164
#, c-format
msgid ""
" --posix\n"
@@ -713,7 +726,7 @@ msgstr ""
" --posix\n"
" вимкнути всі розширення GNU.\n"
-#: sed/sed.c:161
+#: sed/sed.c:166
#, c-format
msgid ""
" -E, -r, --regexp-extended\n"
@@ -724,7 +737,7 @@ msgstr ""
" використовувати розширені формальні вирази у скрипті\n"
" (для сумісності користуйтеся -E POSIX).\n"
-#: sed/sed.c:167
+#: sed/sed.c:169
#, c-format
msgid ""
" -s, --separate\n"
@@ -736,7 +749,7 @@ msgstr ""
"неперервним\n"
" довгим потоком.\n"
-#: sed/sed.c:170
+#: sed/sed.c:172
#, c-format
msgid ""
" --sandbox\n"
@@ -745,7 +758,7 @@ msgstr ""
" --sandbox\n"
" працювати у режимі пісочниці (вимкнути команди e/r/w).\n"
-#: sed/sed.c:172
+#: sed/sed.c:174
#, c-format
msgid ""
" -u, --unbuffered\n"
@@ -758,7 +771,7 @@ msgstr ""
"даних і\n"
" частіше спорожняти буфери вихідних даних\n"
-#: sed/sed.c:175
+#: sed/sed.c:177
#, c-format
msgid ""
" -z, --null-data\n"
@@ -767,19 +780,19 @@ msgstr ""
" -z, --null-data\n"
" відокремити рядки символами NUL\n"
-#: sed/sed.c:177
+#: sed/sed.c:179
#, c-format
msgid " --help display this help and exit\n"
msgstr " --help показати цю довідку та вийти\n"
-#: sed/sed.c:178
+#: sed/sed.c:180
#, c-format
msgid " --version output version information and exit\n"
msgstr ""
" --version показати інформацію щодо версії і вийти\n"
"\n"
-#: sed/sed.c:179
+#: sed/sed.c:181
#, c-format
msgid ""
"\n"
@@ -797,23 +810,36 @@ msgstr ""
"прочитано зі стандартного джерела вхідних даних.\n"
"\n"
-#: sed/utils.c:73 sed/utils.c:384
+#: sed/sed.c:373
+msgid "failed to set binary mode on STDIN"
+msgstr "не вдалося встановити двійковий режим для STDIN"
+
+#: sed/sed.c:375
+msgid "failed to set binary mode on STDOUT"
+msgstr "не вдалося встановити двійковий режим для STDOUT"
+
+#: sed/utils.c:77 sed/utils.c:395
#, c-format
msgid "cannot remove %s: %s"
msgstr "не вдалося вилучити %s: %s"
-#: sed/utils.c:136
+#: sed/utils.c:146
#, c-format
msgid "couldn't open file %s: %s"
msgstr "не вдалося відкрити файл %s: %s"
-#: sed/utils.c:155
+#: sed/utils.c:165
#, c-format
msgid "couldn't attach to %s: %s"
msgstr "не вдалося під’єднатися до %s: %s"
#: sed/utils.c:192
#, c-format
+msgid "failed to set binary mode on '%s'"
+msgstr "не вдалося встановити двійковий режим для «%s»"
+
+#: sed/utils.c:207
+#, 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"
@@ -821,26 +847,33 @@ msgstr[1] "не вдалося записати %llu елементи до %s: %
msgstr[2] "не вдалося записати %llu елементів до %s: %s"
msgstr[3] "не вдалося записати %llu елемент до %s: %s"
-#: sed/utils.c:204 sed/utils.c:223
+#: sed/utils.c:219 sed/utils.c:238
#, c-format
msgid "read error on %s: %s"
msgstr "помилка читання %s: %s"
-#: sed/utils.c:325
+#: sed/utils.c:336
#, c-format
msgid "couldn't follow symlink %s: %s"
msgstr "не вдалося перейти за символічним посиланням %s: %s"
-#: sed/utils.c:359
+#: sed/utils.c:370
#, c-format
msgid "cannot stat %s: %s"
msgstr "не вдалося отримати статистичні дані щодо %s: %s"
-#: sed/utils.c:389
+#: sed/utils.c:400
#, c-format
msgid "cannot rename %s: %s"
msgstr "не вдалося перейменувати %s: %s"
+#~ msgid ""
+#~ " -R, --regexp-perl\n"
+#~ " use Perl 5's regular expressions syntax in the script.\n"
+#~ msgstr ""
+#~ " -R, --regexp-perl\n"
+#~ " використовувати у сценаріях регулярні вирази Perl 5.\n"
+
#~ msgid "%s: option '--%s' doesn't allow an argument\n"
#~ msgstr "%s: додавання аргументів до параметра «--%s» не передбачено\n"
diff --git a/po/vi.gmo b/po/vi.gmo
index 1d6122e..00584df 100644
--- a/po/vi.gmo
+++ b/po/vi.gmo
Binary files differ
diff --git a/po/vi.po b/po/vi.po
index c508722..f9a9326 100644
--- a/po/vi.po
+++ b/po/vi.po
@@ -7,10 +7,10 @@
#
msgid ""
msgstr ""
-"Project-Id-Version: sed 4.4.104\n"
+"Project-Id-Version: sed 4.5.48\n"
"Report-Msgid-Bugs-To: bug-gnu-utils@gnu.org\n"
-"POT-Creation-Date: 2018-03-31 18:40-0700\n"
-"PO-Revision-Date: 2018-03-25 08:52+0700\n"
+"POT-Creation-Date: 2018-12-20 22:03-0800\n"
+"PO-Revision-Date: 2018-12-15 14:17+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"
@@ -30,39 +30,39 @@ msgstr "lỗi ghi"
msgid "preserving permissions for %s"
msgstr "giữ nguyên quyền hạn cho %s"
-#: lib/dfa.c:958
+#: lib/dfa.c:970
msgid "unbalanced ["
msgstr "thiếu dấu ngoặc vuông mở ["
-#: lib/dfa.c:1079
+#: lib/dfa.c:1091
msgid "invalid character class"
msgstr "sai lớp ký tự"
-#: lib/dfa.c:1205
+#: lib/dfa.c:1217
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:1272
+#: lib/dfa.c:1284
msgid "unfinished \\ escape"
msgstr "chưa kết thúc thoát chuỗi \\"
-#: lib/dfa.c:1433
+#: lib/dfa.c:1445
msgid "invalid content of \\{\\}"
msgstr "nội dung của “\\{\\}” không hợp lệ"
-#: lib/dfa.c:1436
+#: lib/dfa.c:1448
msgid "regular expression too big"
msgstr "biểu thức chính quy quá lớn"
-#: lib/dfa.c:1850
+#: lib/dfa.c:1863
msgid "unbalanced ("
msgstr "thiếu dấu ngoặc đơn mở ("
-#: lib/dfa.c:1968
+#: lib/dfa.c:1981
msgid "no syntax specified"
msgstr "chưa đưa ra cú pháp"
-#: lib/dfa.c:1976
+#: lib/dfa.c:1992
msgid "unbalanced )"
msgstr "thiếu dấu ngoặc đơn đóng )"
@@ -206,7 +206,7 @@ msgstr "Biểu thức chính quy quá lớn"
msgid "Unmatched ) or \\)"
msgstr "Có dấu ngoặc đơn đóng “)” hay “\\)” lẻ đôi"
-#: lib/regcomp.c:689
+#: lib/regcomp.c:688
msgid "No previous regular expression"
msgstr "Không có biểu thức chính quy đi trước"
@@ -215,12 +215,12 @@ msgstr "Không có biểu thức chính quy đi trước"
msgid "setting permissions for %s"
msgstr "đang cài đặt quyền hạn cho %s"
-#: lib/version-etc.c:74
+#: lib/version-etc.c:73
#, c-format
msgid "Packaged by %s (%s)\n"
msgstr "Đóng gói bởi %s (%s)\n"
-#: lib/version-etc.c:77
+#: lib/version-etc.c:76
#, c-format
msgid "Packaged by %s\n"
msgstr "Đóng gói bởi %s\n"
@@ -228,11 +228,11 @@ 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
+#: lib/version-etc.c:83
msgid "(C)"
msgstr "©"
-#: lib/version-etc.c:86
+#: lib/version-etc.c:85
msgid ""
"\n"
"License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl."
@@ -439,168 +439,180 @@ msgstr "thiếu lệnh"
msgid "command only uses one address"
msgstr "lệnh chỉ dùng một địa chỉ riêng lẻ"
-#: sed/compile.c:164
+#: sed/compile.c:165
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:165
+#: sed/compile.c:166
msgid "unterminated `s' command"
msgstr "lệnh “s” chưa kết thúc"
-#: sed/compile.c:166
+#: sed/compile.c:167
msgid "unterminated `y' command"
msgstr "lệnh “y” chưa kết thúc"
-#: sed/compile.c:167
+#: sed/compile.c:168
msgid "unknown option to `s'"
msgstr "không hiểu tùy chọn cho “s”"
-#: sed/compile.c:169
+#: sed/compile.c:170
msgid "multiple `p' options to `s' command"
msgstr "lệnh “s” có nhiều tùy chọn kiểu “p”"
-#: sed/compile.c:171
+#: sed/compile.c:172
msgid "multiple `g' options to `s' command"
msgstr "lệnh “s” có nhiều tùy chọn kiểu “g”"
-#: sed/compile.c:173
+#: sed/compile.c:174
msgid "multiple number options to `s' command"
msgstr "lệnh “s” có nhiều tùy chọn kiểu con số"
-#: sed/compile.c:175
+#: sed/compile.c:176
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"
-#: sed/compile.c:177
+#: sed/compile.c:178
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"
-#: sed/compile.c:179
+#: sed/compile.c:180
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:181
+#: sed/compile.c:182
msgid "expected newer version of sed"
msgstr "cần phiên bản sed mới hơn"
-#: sed/compile.c:183
+#: sed/compile.c:184
msgid "invalid usage of line address 0"
msgstr "sai dùng địa chỉ dòng 0"
-#: sed/compile.c:184
+#: sed/compile.c:185
#, c-format
msgid "unknown command: `%c'"
msgstr "không hiểu lệnh: “%c”"
-#: sed/compile.c:186
+#: sed/compile.c:187
msgid "incomplete command"
msgstr "lệnh chưa hoàn thiện"
-#: sed/compile.c:188
+#: sed/compile.c:189
msgid "\":\" lacks a label"
msgstr "\":\" thiếu một nhãn"
-#: sed/compile.c:190
+#: sed/compile.c:191
msgid "recursive escaping after \\c not allowed"
msgstr "thoát đệ quy sau \\c là không được phép"
-#: sed/compile.c:213
+#: sed/compile.c:193
+msgid "e/r/w commands disabled in sandbox mode"
+msgstr "các lệnh e/r/w bị tắt ở chế độ hộp an toàn"
+
+#: sed/compile.c:215
#, c-format
msgid "%s: file %s line %lu: %s\n"
msgstr "%s: tập tin %s dòng %lu: %s\n"
-#: sed/compile.c:216
+#: sed/compile.c:218
#, 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:1644
+#: sed/compile.c:1607
#, c-format
msgid "can't find label for jump to `%s'"
msgstr "không tìm thấy nhãn để nhảy tới “%s”"
-#: sed/execute.c:254 sed/execute.c:271
+#: sed/execute.c:253 sed/execute.c:270
#, 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:565
+#: sed/execute.c:561
#, c-format
msgid "%s: can't read %s: %s\n"
msgstr "%s: không thể đọc %s: %s\n"
-#: sed/execute.c:590
+#: sed/execute.c:587
#, 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:595
+#: sed/execute.c:592
#, 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:606
+#: sed/execute.c:603
#, 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:614
+#: sed/execute.c:611
#, 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:633 sed/utils.c:178
+#: sed/execute.c:630 sed/utils.c:188
#, 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:1148 sed/execute.c:1358
+#: sed/execute.c:1167 sed/execute.c:1366
msgid "error in subprocess"
msgstr "gặp lỗi trong tiến trình con"
-#: sed/execute.c:1150
+#: sed/execute.c:1169
msgid "option `e' not supported"
msgstr "không hỗ trợ tùy chọn “e”"
-#: sed/execute.c:1339
+#: sed/execute.c:1347
msgid "`e' command not supported"
msgstr "không hỗ trợ lệnh “e”"
-#: sed/execute.c:1665
+#: sed/execute.c:1662
msgid "no input files"
msgstr "không có tập tin đầu vào"
-#: sed/regexp.c:39
+#: sed/regexp.c:40
msgid "no previous regular expression"
msgstr "không có biểu thức chính quy nằm trước"
-#: sed/regexp.c:141
+#: sed/regexp.c:125
#, c-format
msgid "invalid reference \\%d on `s' command's RHS"
msgstr "tham chiếu không hợp lệ “\\%d” bên phải lệnh “s”"
-#: sed/regexp.c:259
+#: sed/regexp.c:196
msgid "regex input buffer length larger than INT_MAX"
msgstr "chiều dài bộ đện đầu vào regex lớn hơn INT_MAX"
-#: sed/sed.c:35
+#: sed/sed.c:36
msgid "Jay Fenlason"
msgstr "Jay Fenlason"
-#: sed/sed.c:36
+#: sed/sed.c:37
msgid "Tom Lord"
msgstr "Tom Lord"
-#: sed/sed.c:37
+#: sed/sed.c:38
msgid "Ken Pizzini"
msgstr "Ken Pizzini"
-#: sed/sed.c:38
+#: sed/sed.c:39
msgid "Paolo Bonzini"
msgstr "Paolo Bonzini"
-#: sed/sed.c:113
+#: sed/sed.c:40
+msgid "Jim Meyering"
+msgstr "Jim Meyering"
+
+#: sed/sed.c:41
+msgid "Assaf Gordon"
+msgstr "Assaf Gordon"
+
+#: sed/sed.c:124
#, c-format
msgid ""
"GNU sed home page: <https://www.gnu.org/software/sed/>.\n"
@@ -610,31 +622,22 @@ msgstr ""
"Trợ giúp dùng chung cho các phần mềm tại GNU: <https://www.gnu.org/gethelp/"
">.\n"
-#: sed/sed.c:120
+#: sed/sed.c:130
#, c-format
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:129
-msgid ""
-" -R, --regexp-perl\n"
-" use Perl 5's regular expressions syntax in the script.\n"
-msgstr ""
-" -R, --regexp-perl\n"
-" 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:134
+#: sed/sed.c:138
#, c-format
msgid ""
"Usage: %s [OPTION]... {script-only-if-no-other-script} [input-file]...\n"
"\n"
msgstr ""
-"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"
+"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:138
+#: sed/sed.c:142
#, c-format
msgid ""
" -n, --quiet, --silent\n"
@@ -643,7 +646,16 @@ 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:140
+#: sed/sed.c:144
+#, c-format
+msgid ""
+" --debug\n"
+" annotate program execution\n"
+msgstr ""
+" --debug\n"
+" điễn giải việc thực thi chương trình\n"
+
+#: sed/sed.c:146
#, c-format
msgid ""
" -e script, --expression=script\n"
@@ -652,7 +664,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:142
+#: sed/sed.c:148
#, c-format
msgid ""
" -f script-file, --file=script-file\n"
@@ -663,7 +675,7 @@ msgstr ""
" 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:146
+#: sed/sed.c:152
#, c-format
msgid ""
" --follow-symlinks\n"
@@ -672,7 +684,7 @@ msgstr ""
" --follow-symlinks\n"
" theo liên kết mềm khi xử lý tại chỗ\n"
-#: sed/sed.c:149
+#: sed/sed.c:155
#, c-format
msgid ""
" -i[SUFFIX], --in-place[=SUFFIX]\n"
@@ -682,7 +694,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:153
+#: sed/sed.c:158
#, c-format
msgid ""
" -b, --binary\n"
@@ -693,7 +705,7 @@ 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:157
+#: sed/sed.c:162
#, c-format
msgid ""
" -l N, --line-length=N\n"
@@ -702,7 +714,7 @@ msgstr ""
" -l N, --line-length=N\n"
" chỉ ra chiều dài muốn ngắt dòng cho lệnh “l”\n"
-#: sed/sed.c:159
+#: sed/sed.c:164
#, c-format
msgid ""
" --posix\n"
@@ -711,7 +723,7 @@ msgstr ""
" --posix\n"
" tắt mọi phần mở rộng của GNU.\n"
-#: sed/sed.c:161
+#: sed/sed.c:166
#, c-format
msgid ""
" -E, -r, --regexp-extended\n"
@@ -720,9 +732,9 @@ msgid ""
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"
+" (để tương thích khi dùng POSIX -E).\n"
-#: sed/sed.c:167
+#: sed/sed.c:169
#, c-format
msgid ""
" -s, --separate\n"
@@ -733,7 +745,7 @@ msgstr ""
" 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:170
+#: sed/sed.c:172
#, c-format
msgid ""
" --sandbox\n"
@@ -742,7 +754,7 @@ msgstr ""
" --sandbox\n"
" thực hiện trong chế độ sandbox (tắt lệnh e/r/w).\n"
-#: sed/sed.c:172
+#: sed/sed.c:174
#, c-format
msgid ""
" -u, --unbuffered\n"
@@ -755,7 +767,7 @@ msgstr ""
" 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:175
+#: sed/sed.c:177
#, c-format
msgid ""
" -z, --null-data\n"
@@ -764,17 +776,17 @@ msgstr ""
" -z, --null-data\n"
" ngăn cách các dòng bằng ký tự NUL\n"
-#: sed/sed.c:177
+#: sed/sed.c:179
#, 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:178
+#: sed/sed.c:180
#, 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:179
+#: sed/sed.c:181
#, c-format
msgid ""
"\n"
@@ -791,47 +803,68 @@ msgstr ""
"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:73 sed/utils.c:384
+#: sed/sed.c:373
+msgid "failed to set binary mode on STDIN"
+msgstr "gặp lỗi khi đặt chế độ nhị phân trên STDIN"
+
+#: sed/sed.c:375
+msgid "failed to set binary mode on STDOUT"
+msgstr "gặp lỗi khi đặt chế độ nhị phân trên STDOUT"
+
+#: sed/utils.c:77 sed/utils.c:395
#, c-format
msgid "cannot remove %s: %s"
msgstr "không thể gỡ bỏ %s: %s "
-#: sed/utils.c:136
+#: sed/utils.c:146
#, c-format
msgid "couldn't open file %s: %s"
msgstr "không thể mở tập tin %s: %s"
-#: sed/utils.c:155
+#: sed/utils.c:165
#, c-format
msgid "couldn't attach to %s: %s"
msgstr "không thể gắn với %s: %s"
#: sed/utils.c:192
#, c-format
+msgid "failed to set binary mode on '%s'"
+msgstr "gặp lỗi khi đặt chế độ nhị phân trên “%s”"
+
+#: sed/utils.c:207
+#, c-format
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:204 sed/utils.c:223
+#: sed/utils.c:219 sed/utils.c:238
#, c-format
msgid "read error on %s: %s"
msgstr "lỗi đọc trên %s: %s"
-#: sed/utils.c:325
+#: sed/utils.c:336
#, c-format
msgid "couldn't follow symlink %s: %s"
msgstr "không thể theo liên kết mềm %s: %s"
-#: sed/utils.c:359
+#: sed/utils.c:370
#, c-format
msgid "cannot stat %s: %s"
msgstr "không thể lấy thống kê %s: %s"
-#: sed/utils.c:389
+#: sed/utils.c:400
#, c-format
msgid "cannot rename %s: %s"
msgstr "không thể đổi tên %s: %s"
+#~ msgid ""
+#~ " -R, --regexp-perl\n"
+#~ " use Perl 5's regular expressions syntax in the script.\n"
+#~ msgstr ""
+#~ " -R, --regexp-perl\n"
+#~ " 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"
+
#~ 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"
diff --git a/po/zh_CN.gmo b/po/zh_CN.gmo
index 1692fb3..3ac9831 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 ecc63bd..f1c9588 100644
--- a/po/zh_CN.po
+++ b/po/zh_CN.po
@@ -4,13 +4,13 @@
# Copyright (C) 2002, 2007, 2008 Free Software Foundation, Inc.
# Wang Li <charles@linux.net.cn>, 2002.
# LI Daobing <lidaobing@gmail.com>, 2007, 2008.
-# Boyuan Yang <073plan@gmail.com>, 2017.
+# Boyuan Yang <073plan@gmail.com>, 2017, 2018.
msgid ""
msgstr ""
-"Project-Id-Version: sed 4.2.2.177\n"
+"Project-Id-Version: sed 4.4.104\n"
"Report-Msgid-Bugs-To: bug-gnu-utils@gnu.org\n"
-"POT-Creation-Date: 2018-03-31 18:40-0700\n"
-"PO-Revision-Date: 2017-12-17 20:32+0800\n"
+"POT-Creation-Date: 2018-12-20 22:03-0800\n"
+"PO-Revision-Date: 2018-05-14 20:32+0800\n"
"Last-Translator: Boyuan Yang <073plan@gmail.com>\n"
"Language-Team: Chinese (simplified) <i18n-zh@googlegroups.com>\n"
"Language: zh_CN\n"
@@ -19,7 +19,7 @@ msgstr ""
"Content-Transfer-Encoding: 8bit\n"
"X-Bugs: Report translation errors to the Language-Team address.\n"
"Plural-Forms: nplurals=1; plural=0;\n"
-"X-Generator: Poedit 2.0.5\n"
+"X-Generator: Poedit 2.0.7\n"
#: lib/closeout.c:122
msgid "write error"
@@ -28,41 +28,41 @@ msgstr "写入错误"
#: lib/copy-acl.c:54
#, c-format
msgid "preserving permissions for %s"
-msgstr ""
+msgstr "保留 %s 的权限未改变"
-#: lib/dfa.c:958
+#: lib/dfa.c:970
msgid "unbalanced ["
msgstr "不对称的 ["
-#: lib/dfa.c:1079
+#: lib/dfa.c:1091
msgid "invalid character class"
msgstr "非法的字符类型"
-#: lib/dfa.c:1205
+#: lib/dfa.c:1217
msgid "character class syntax is [[:space:]], not [:space:]"
-msgstr ""
+msgstr "字符类型语法是 [[:space:]],不是 [:space:]"
-#: lib/dfa.c:1272
+#: lib/dfa.c:1284
msgid "unfinished \\ escape"
msgstr "未结束的 \\ 转义"
-#: lib/dfa.c:1433
+#: lib/dfa.c:1445
msgid "invalid content of \\{\\}"
msgstr "“\\{\\}”中内容非法"
-#: lib/dfa.c:1436
+#: lib/dfa.c:1448
msgid "regular expression too big"
msgstr "正则表达式过大"
-#: lib/dfa.c:1850
+#: lib/dfa.c:1863
msgid "unbalanced ("
msgstr "不对称的 ("
-#: lib/dfa.c:1968
+#: lib/dfa.c:1981
msgid "no syntax specified"
msgstr "未指定语法"
-#: lib/dfa.c:1976
+#: lib/dfa.c:1992
msgid "unbalanced )"
msgstr "不对称的 )"
@@ -71,29 +71,29 @@ msgid "Unknown system error"
msgstr "未知的系统错误"
#: lib/getopt.c:278
-#, fuzzy, c-format
+#, c-format
msgid "%s: option '%s%s' is ambiguous\n"
-msgstr "%s:选项“%s”是不明确的\n"
+msgstr "%s:选项“%s%s”是不明确的\n"
#: lib/getopt.c:284
-#, fuzzy, c-format
+#, c-format
msgid "%s: option '%s%s' is ambiguous; possibilities:"
-msgstr "%s:选项“%s”是不明确的;可能是:"
+msgstr "%s:选项“%s%s”是不明确的;可能是:"
#: lib/getopt.c:319
-#, fuzzy, c-format
+#, c-format
msgid "%s: unrecognized option '%s%s'\n"
-msgstr "%s:无法识别的选项“%c%s”\n"
+msgstr "%s:无法识别的选项“%s%s”\n"
#: lib/getopt.c:345
-#, fuzzy, c-format
+#, c-format
msgid "%s: option '%s%s' doesn't allow an argument\n"
-msgstr "%s:选项“-W %s”需要一个参数\n"
+msgstr "%s:选项“%s%s”不允许带参数\n"
#: lib/getopt.c:360
-#, fuzzy, c-format
+#, c-format
msgid "%s: option '%s%s' requires an argument\n"
-msgstr "%s:选项“-W %s”需要一个参数\n"
+msgstr "%s:选项“%s%s”需要一个参数\n"
#: lib/getopt.c:621
#, c-format
@@ -103,7 +103,7 @@ msgstr "%s:无效选项 -- “%c”\n"
#: lib/getopt.c:636 lib/getopt.c:682
#, c-format
msgid "%s: option requires an argument -- '%c'\n"
-msgstr ""
+msgstr "%s:选项需要一个参数 -- '%c'\n"
#: lib/obstack.c:338 lib/obstack.c:340 lib/xalloc-die.c:34
msgid "memory exhausted"
@@ -206,7 +206,7 @@ msgstr "正则表达式过大"
msgid "Unmatched ) or \\)"
msgstr "未匹配的“)”或者“\\)”"
-#: lib/regcomp.c:689
+#: lib/regcomp.c:688
msgid "No previous regular expression"
msgstr "前面没有正则表达式"
@@ -215,12 +215,12 @@ msgstr "前面没有正则表达式"
msgid "setting permissions for %s"
msgstr "设置 %s 的权限"
-#: lib/version-etc.c:74
+#: lib/version-etc.c:73
#, c-format
msgid "Packaged by %s (%s)\n"
msgstr "由 %s (%s)打包\n"
-#: lib/version-etc.c:77
+#: lib/version-etc.c:76
#, c-format
msgid "Packaged by %s\n"
msgstr "由 %s 打包\n"
@@ -228,12 +228,11 @@ 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
+#: lib/version-etc.c:83
msgid "(C)"
msgstr "(C)"
-#: lib/version-etc.c:86
-#, fuzzy
+#: lib/version-etc.c:85
msgid ""
"\n"
"License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl."
@@ -243,7 +242,7 @@ msgid ""
"\n"
msgstr ""
"\n"
-"许可证:GPLv3+:GNU 通用公共许可证第 3 版或更新版本<http://gnu.org/licenses/"
+"许可证:GPLv3+:GNU 通用公共许可证第 3 版或更新版本<https://gnu.org/licenses/"
"gpl.html>。\n"
"本软件是自由软件:您可以自由修改和重新发布它。\n"
"在法律范围内没有其他保证。\n"
@@ -381,14 +380,13 @@ msgid "%s home page: <%s>\n"
msgstr "%s 的主页:<%s>\n"
#: lib/version-etc.c:253
-#, fuzzy, c-format
+#, c-format
msgid "%s home page: <https://www.gnu.org/software/%s/>\n"
-msgstr "%s 项目主页:<http://www.gnu.org/software/%s/>\n"
+msgstr "%s 项目主页:<https://www.gnu.org/software/%s/>\n"
#: lib/version-etc.c:256
-#, fuzzy
msgid "General help using GNU software: <https://www.gnu.org/gethelp/>\n"
-msgstr "GNU 软件一般性帮助:<http://www.gnu.org/gethelp/>\n"
+msgstr "GNU 软件一般性帮助:<https://www.gnu.org/gethelp/>\n"
#: sed/compile.c:146
msgid "multiple `!'s"
@@ -438,189 +436,193 @@ msgstr "遗漏命令"
msgid "command only uses one address"
msgstr "命令只使用一个地址"
-#: sed/compile.c:164
+#: sed/compile.c:165
msgid "unterminated address regex"
msgstr "未终止的地址正则表达式"
-#: sed/compile.c:165
+#: sed/compile.c:166
msgid "unterminated `s' command"
msgstr "未终止的“s”命令"
-#: sed/compile.c:166
+#: sed/compile.c:167
msgid "unterminated `y' command"
msgstr "未终止的“y”命令"
-#: sed/compile.c:167
+#: sed/compile.c:168
msgid "unknown option to `s'"
msgstr "“s”的未知选项"
-#: sed/compile.c:169
+#: sed/compile.c:170
msgid "multiple `p' options to `s' command"
msgstr "多个“s”命令的选项“p”"
-#: sed/compile.c:171
+#: sed/compile.c:172
msgid "multiple `g' options to `s' command"
msgstr "多个“s”命令的选项“g”"
-#: sed/compile.c:173
+#: sed/compile.c:174
msgid "multiple number options to `s' command"
msgstr "多个“s”命令的数值选项"
-#: sed/compile.c:175
+#: sed/compile.c:176
msgid "number option to `s' command may not be zero"
msgstr "“s”命令的数值选项不能为零"
-#: sed/compile.c:177
+#: sed/compile.c:178
msgid "strings for `y' command are different lengths"
msgstr "“y”命令的字符串长度不同"
-#: sed/compile.c:179
+#: sed/compile.c:180
msgid "delimiter character is not a single-byte character"
msgstr "分割符长度不为1"
-#: sed/compile.c:181
+#: sed/compile.c:182
msgid "expected newer version of sed"
msgstr "需要更高版本的sed"
-#: sed/compile.c:183
+#: sed/compile.c:184
msgid "invalid usage of line address 0"
-msgstr "非法使用地址0"
+msgstr "非法使用行地址0"
-#: sed/compile.c:184
+#: sed/compile.c:185
#, c-format
msgid "unknown command: `%c'"
msgstr "未知的命令:“%c”"
-#: sed/compile.c:186
+#: sed/compile.c:187
msgid "incomplete command"
msgstr "不完整的命令"
-#: sed/compile.c:188
+#: sed/compile.c:189
msgid "\":\" lacks a label"
-msgstr ""
+msgstr "“:”缺少一个标签"
-#: sed/compile.c:190
+#: sed/compile.c:191
msgid "recursive escaping after \\c not allowed"
msgstr "不允许 \\c 后的递归转义"
-#: sed/compile.c:213
+#: sed/compile.c:193
+msgid "e/r/w commands disabled in sandbox mode"
+msgstr ""
+
+#: sed/compile.c:215
#, c-format
msgid "%s: file %s line %lu: %s\n"
msgstr "%s:文件 %s 行号:%lu:%s\n"
-#: sed/compile.c:216
+#: sed/compile.c:218
#, c-format
msgid "%s: -e expression #%lu, char %lu: %s\n"
msgstr "%s:-e 表达式 #%lu,字符 %lu:%s\n"
-#: sed/compile.c:1644
+#: sed/compile.c:1607
#, c-format
msgid "can't find label for jump to `%s'"
msgstr "无法为目的为“%s”的跳转找到标签"
-#: sed/execute.c:254 sed/execute.c:271
+#: sed/execute.c:253 sed/execute.c:270
#, c-format
msgid "case conversion produced an invalid character"
-msgstr ""
+msgstr "大小写转换产生了无效的字符"
-#: sed/execute.c:565
+#: sed/execute.c:561
#, c-format
msgid "%s: can't read %s: %s\n"
msgstr "%s:无法读取 %s:%s\n"
-#: sed/execute.c:590
+#: sed/execute.c:587
#, c-format
msgid "couldn't edit %s: is a terminal"
msgstr "无法编辑文件 %s: 这是一个终端"
-#: sed/execute.c:595
+#: sed/execute.c:592
#, c-format
msgid "couldn't edit %s: not a regular file"
msgstr "无法编辑文件 %s: 不是一个普通文件"
-#: sed/execute.c:606
+#: sed/execute.c:603
#, c-format
msgid "%s: warning: failed to set default file creation context to %s: %s"
-msgstr ""
+msgstr "%s:警告:无法设置默认文件创建上下文环境为 %s:%s"
-#: sed/execute.c:614
+#: sed/execute.c:611
#, c-format
msgid "%s: warning: failed to get security context of %s: %s"
-msgstr ""
+msgstr "%s:警告:无法获取 %s 的安全上下文环境:%s"
-#: sed/execute.c:633 sed/utils.c:178
+#: sed/execute.c:630 sed/utils.c:188
#, c-format
msgid "couldn't open temporary file %s: %s"
msgstr "无法打开临时文件 %s: %s"
-#: sed/execute.c:1148 sed/execute.c:1358
+#: sed/execute.c:1167 sed/execute.c:1366
msgid "error in subprocess"
msgstr "子进程出错"
-#: sed/execute.c:1150
+#: sed/execute.c:1169
msgid "option `e' not supported"
msgstr "不支持选项“e”"
-#: sed/execute.c:1339
+#: sed/execute.c:1347
msgid "`e' command not supported"
msgstr "不支持命令“e”"
-#: sed/execute.c:1665
+#: sed/execute.c:1662
msgid "no input files"
msgstr "没有输入文件"
-#: sed/regexp.c:39
+#: sed/regexp.c:40
msgid "no previous regular expression"
msgstr "前面没有正则表达式"
-#: sed/regexp.c:141
+#: sed/regexp.c:125
#, c-format
msgid "invalid reference \\%d on `s' command's RHS"
msgstr "“s”命令的RHS非法引用\\%d"
-#: sed/regexp.c:259
+#: sed/regexp.c:196
msgid "regex input buffer length larger than INT_MAX"
-msgstr ""
+msgstr "正则输入缓冲长度大于 INT_MAX"
-#: sed/sed.c:35
+#: sed/sed.c:36
msgid "Jay Fenlason"
msgstr "Jay Fenlason"
-#: sed/sed.c:36
+#: sed/sed.c:37
msgid "Tom Lord"
msgstr "Tom Lord"
-#: sed/sed.c:37
+#: sed/sed.c:38
msgid "Ken Pizzini"
msgstr "Ken Pizzini"
-#: sed/sed.c:38
+#: sed/sed.c:39
msgid "Paolo Bonzini"
msgstr "Paolo Bonzini"
-#: sed/sed.c:113
-#, fuzzy, c-format
+#: sed/sed.c:40
+msgid "Jim Meyering"
+msgstr ""
+
+#: sed/sed.c:41
+msgid "Assaf Gordon"
+msgstr ""
+
+#: sed/sed.c:124
+#, c-format
msgid ""
"GNU sed home page: <https://www.gnu.org/software/sed/>.\n"
"General help using GNU software: <https://www.gnu.org/gethelp/>.\n"
msgstr ""
-"GNU sed 主页:<http://www.gnu.org/software/sed/>。\n"
-"使用 GNU 软件的一般性帮助:<http://www.gnu.org/gethelp/>。\n"
+"GNU sed 主页:<https://www.gnu.org/software/sed/>。\n"
+"使用 GNU 软件的一般性帮助:<https://www.gnu.org/gethelp/>。\n"
-#: sed/sed.c:120
+#: sed/sed.c:130
#, 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
+#: sed/sed.c:138
#, c-format
msgid ""
"Usage: %s [OPTION]... {script-only-if-no-other-script} [input-file]...\n"
@@ -629,7 +631,7 @@ msgstr ""
"用法: %s [选项]... {脚本(如果没有其他脚本)} [输入文件]...\n"
"\n"
-#: sed/sed.c:138
+#: sed/sed.c:142
#, c-format
msgid ""
" -n, --quiet, --silent\n"
@@ -638,7 +640,16 @@ msgstr ""
" -n, --quiet, --silent\n"
" 取消自动打印模式空间\n"
-#: sed/sed.c:140
+#: sed/sed.c:144
+#, fuzzy, c-format
+msgid ""
+" --debug\n"
+" annotate program execution\n"
+msgstr ""
+" --posix\n"
+" 关闭所有 GNU 扩展\n"
+
+#: sed/sed.c:146
#, c-format
msgid ""
" -e script, --expression=script\n"
@@ -647,7 +658,7 @@ msgstr ""
" -e 脚本, --expression=脚本\n"
" 添加“脚本”到程序的运行列表\n"
-#: sed/sed.c:142
+#: sed/sed.c:148
#, c-format
msgid ""
" -f script-file, --file=script-file\n"
@@ -657,7 +668,7 @@ msgstr ""
" -f 脚本文件, --file=脚本文件\n"
" 添加“脚本文件”到程序的运行列表\n"
-#: sed/sed.c:146
+#: sed/sed.c:152
#, c-format
msgid ""
" --follow-symlinks\n"
@@ -666,16 +677,16 @@ msgstr ""
" --follow-symlinks\n"
" 直接修改文件时跟随软链接\n"
-#: sed/sed.c:149
-#, fuzzy, c-format
+#: sed/sed.c:155
+#, 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
+#: sed/sed.c:158
#, c-format
msgid ""
" -b, --binary\n"
@@ -685,7 +696,7 @@ msgstr ""
" -b, --binary\n"
" 以二进制方式打开文件 (回车加换行不做特殊处理)\n"
-#: sed/sed.c:157
+#: sed/sed.c:162
#, c-format
msgid ""
" -l N, --line-length=N\n"
@@ -694,7 +705,7 @@ msgstr ""
" -l N, --line-length=N\n"
" 指定“l”命令的换行期望长度\n"
-#: sed/sed.c:159
+#: sed/sed.c:164
#, c-format
msgid ""
" --posix\n"
@@ -703,36 +714,38 @@ msgstr ""
" --posix\n"
" 关闭所有 GNU 扩展\n"
-#: sed/sed.c:161
-#, fuzzy, c-format
+#: sed/sed.c:166
+#, c-format
msgid ""
" -E, -r, --regexp-extended\n"
" use extended regular expressions in the script\n"
" (for portability use POSIX -E).\n"
msgstr ""
-" -r, --regexp-extended\n"
+" -E, -r, --regexp-extended\n"
" 在脚本中使用扩展正则表达式\n"
+" (为保证可移植性使用 POSIX -E)。\n"
-#: sed/sed.c:167
-#, fuzzy, c-format
+#: sed/sed.c:169
+#, 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"
+" 将输入文件视为各个独立的文件而不是单个\n"
+" 长的连续输入流。\n"
-#: sed/sed.c:170
-#, fuzzy, c-format
+#: sed/sed.c:172
+#, c-format
msgid ""
" --sandbox\n"
" operate in sandbox mode (disable e/r/w commands).\n"
msgstr ""
" --sandbox\n"
-" 在沙盒模式中进行操作。\n"
+" 在沙盒模式中进行操作(禁用 e/r/w 命令)。\n"
-#: sed/sed.c:172
+#: sed/sed.c:174
#, c-format
msgid ""
" -u, --unbuffered\n"
@@ -743,7 +756,7 @@ msgstr ""
" -u, --unbuffered\n"
" 从输入文件读取最少的数据,更频繁的刷新输出\n"
-#: sed/sed.c:175
+#: sed/sed.c:177
#, c-format
msgid ""
" -z, --null-data\n"
@@ -752,17 +765,17 @@ msgstr ""
" -z, --null-data\n"
" 使用 NUL 字符分隔各行\n"
-#: sed/sed.c:177
+#: sed/sed.c:179
#, c-format
msgid " --help display this help and exit\n"
msgstr " --help 打印帮助并退出\n"
-#: sed/sed.c:178
+#: sed/sed.c:180
#, c-format
msgid " --version output version information and exit\n"
msgstr " --version 输出版本信息并退出\n"
-#: sed/sed.c:179
+#: sed/sed.c:181
#, c-format
msgid ""
"\n"
@@ -777,47 +790,67 @@ msgstr ""
"sed脚本。其他非选项参数被视为输入文件,如果没有输入文件,那么程序将从标准\n"
"输入读取数据。\n"
-#: sed/utils.c:73 sed/utils.c:384
+#: sed/sed.c:373
+msgid "failed to set binary mode on STDIN"
+msgstr ""
+
+#: sed/sed.c:375
+msgid "failed to set binary mode on STDOUT"
+msgstr ""
+
+#: sed/utils.c:77 sed/utils.c:395
#, c-format
msgid "cannot remove %s: %s"
msgstr "无法移除 %s:%s"
-#: sed/utils.c:136
+#: sed/utils.c:146
#, c-format
msgid "couldn't open file %s: %s"
msgstr "无法打开文件 %s: %s"
-#: sed/utils.c:155
+#: sed/utils.c:165
#, c-format
msgid "couldn't attach to %s: %s"
msgstr "无法绑定 %s: %s"
#: sed/utils.c:192
-#, fuzzy, c-format
+#, c-format
+msgid "failed to set binary mode on '%s'"
+msgstr ""
+
+#: sed/utils.c:207
+#, 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[0] "无法将 %llu 个项目写入 %s:%s"
-#: sed/utils.c:204 sed/utils.c:223
+#: sed/utils.c:219 sed/utils.c:238
#, c-format
msgid "read error on %s: %s"
msgstr "读取 %s 出错:%s"
-#: sed/utils.c:325
+#: sed/utils.c:336
#, c-format
msgid "couldn't follow symlink %s: %s"
msgstr "无法跟随软链接 %s: %s"
-#: sed/utils.c:359
+#: sed/utils.c:370
#, c-format
msgid "cannot stat %s: %s"
msgstr "无法获取 %s 的状态: %s"
-#: sed/utils.c:389
+#: sed/utils.c:400
#, c-format
msgid "cannot rename %s: %s"
msgstr "无法重命名 %s:%s"
+#~ msgid ""
+#~ " -R, --regexp-perl\n"
+#~ " use Perl 5's regular expressions syntax in the script.\n"
+#~ msgstr ""
+#~ " -R, --regexp-perl\n"
+#~ " 使用 Perl 5 的正则表达式语法\n"
+
#~ msgid "%s: unrecognized option '--%s'\n"
#~ msgstr "%s:无法识别的选项“--%s”\n"
diff --git a/po/zh_TW.gmo b/po/zh_TW.gmo
index 38217a6..573ded3 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 0cd5c5c..773f997 100644
--- a/po/zh_TW.po
+++ b/po/zh_TW.po
@@ -6,11 +6,11 @@
#
msgid ""
msgstr ""
-"Project-Id-Version: sed 4.2.1\n"
+"Project-Id-Version: sed 4.4.104\n"
"Report-Msgid-Bugs-To: bug-gnu-utils@gnu.org\n"
-"POT-Creation-Date: 2018-03-31 18:40-0700\n"
-"PO-Revision-Date: 2013-02-12 23:37+0800\n"
-"Last-Translator: Wei-Lun Chao <bluebat@member.fsf.org>\n"
+"POT-Creation-Date: 2018-12-20 22:03-0800\n"
+"PO-Revision-Date: 2018-10-12 18:34+0800\n"
+"Last-Translator: pan93412 <pan93412@gmail.com>\n"
"Language-Team: Chinese (traditional) <zh-l10n@linux.org.tw>\n"
"Language: zh_TW\n"
"MIME-Version: 1.0\n"
@@ -18,96 +18,93 @@ msgstr ""
"Content-Transfer-Encoding: 8bit\n"
"X-Bugs: Report translation errors to the Language-Team address.\n"
"Plural-Forms: nplurals=1; plural=0;\n"
+"X-Generator: Poedit 2.2\n"
#: lib/closeout.c:122
msgid "write error"
-msgstr ""
+msgstr "寫入錯誤"
#: lib/copy-acl.c:54
#, c-format
msgid "preserving permissions for %s"
-msgstr ""
+msgstr "正為 %s 保留權限"
-#: lib/dfa.c:958
+#: lib/dfa.c:970
msgid "unbalanced ["
-msgstr ""
+msgstr "不平衡的 ["
-#: lib/dfa.c:1079
-#, fuzzy
+#: lib/dfa.c:1091
msgid "invalid character class"
-msgstr "不正確的字元等級名稱"
+msgstr "無效字元類別"
-#: lib/dfa.c:1205
+#: lib/dfa.c:1217
msgid "character class syntax is [[:space:]], not [:space:]"
-msgstr ""
+msgstr "字元類別語法是 [[:space:]] 而非 [:space:]"
-#: lib/dfa.c:1272
+#: lib/dfa.c:1284
msgid "unfinished \\ escape"
-msgstr ""
+msgstr "未完成的 \\ 跳脫字元"
-#: lib/dfa.c:1433
-#, fuzzy
+#: lib/dfa.c:1445
msgid "invalid content of \\{\\}"
-msgstr "不正確的「\\{\\}」內容"
+msgstr "無效的 \\{\\} 中內容"
-#: lib/dfa.c:1436
-#, fuzzy
+#: lib/dfa.c:1448
msgid "regular expression too big"
-msgstr "正規表示式太大"
+msgstr "正規表示式過長"
-#: lib/dfa.c:1850
+#: lib/dfa.c:1863
msgid "unbalanced ("
-msgstr ""
+msgstr "不平衡的 ("
-#: lib/dfa.c:1968
+#: lib/dfa.c:1981
msgid "no syntax specified"
-msgstr ""
+msgstr "未指定語法"
-#: lib/dfa.c:1976
+#: lib/dfa.c:1992
msgid "unbalanced )"
-msgstr ""
+msgstr "不平衡的 )"
#: lib/error.c:195
msgid "Unknown system error"
-msgstr ""
+msgstr "未知系統錯誤"
#: lib/getopt.c:278
#, c-format
msgid "%s: option '%s%s' is ambiguous\n"
-msgstr ""
+msgstr "%s:「%s%s」選項不明確\n"
#: lib/getopt.c:284
#, c-format
msgid "%s: option '%s%s' is ambiguous; possibilities:"
-msgstr ""
+msgstr "%s:「%s%s」選項不明確;可能是:"
#: lib/getopt.c:319
#, c-format
msgid "%s: unrecognized option '%s%s'\n"
-msgstr ""
+msgstr "%s:無法識別的選項「%s%s」\n"
#: lib/getopt.c:345
#, c-format
msgid "%s: option '%s%s' doesn't allow an argument\n"
-msgstr ""
+msgstr "%s:「%s%s」選項不允許引數\n"
#: lib/getopt.c:360
#, c-format
msgid "%s: option '%s%s' requires an argument\n"
-msgstr ""
+msgstr "%s:「%s%s」選項需要引數\n"
#: lib/getopt.c:621
#, c-format
msgid "%s: invalid option -- '%c'\n"
-msgstr ""
+msgstr "%s:無效選項 --「%c」\n"
#: lib/getopt.c:636 lib/getopt.c:682
#, c-format
msgid "%s: option requires an argument -- '%c'\n"
-msgstr ""
+msgstr "%s:選項需要引數 --「%c」\n"
#: lib/obstack.c:338 lib/obstack.c:340 lib/xalloc-die.c:34
-#, fuzzy
msgid "memory exhausted"
msgstr "記憶體耗盡"
@@ -134,11 +131,11 @@ msgstr "記憶體耗盡"
#. and use glyphs suitable for your language.
#: lib/quotearg.c:362
msgid "`"
-msgstr ""
+msgstr "`"
#: lib/quotearg.c:363
msgid "'"
-msgstr ""
+msgstr "'"
#: lib/regcomp.c:135
msgid "Success"
@@ -169,9 +166,8 @@ msgid "Invalid back reference"
msgstr "不正確的返回參考"
#: lib/regcomp.c:156
-#, fuzzy
msgid "Unmatched [, [^, [:, [., or [="
-msgstr "未匹配的「[」或「[^」"
+msgstr "沒有符合的 [、[^、[:、[. 或 [="
#: lib/regcomp.c:159
msgid "Unmatched ( or \\("
@@ -209,33 +205,33 @@ msgstr "正規表示式太大"
msgid "Unmatched ) or \\)"
msgstr "未匹配的「)」或「\\」"
-#: lib/regcomp.c:689
+#: lib/regcomp.c:688
msgid "No previous regular expression"
msgstr "沒有先前的正規表示式"
#: lib/set-acl.c:46
#, c-format
msgid "setting permissions for %s"
-msgstr ""
+msgstr "正在為 %s 設定權限"
-#: lib/version-etc.c:74
+#: lib/version-etc.c:73
#, c-format
msgid "Packaged by %s (%s)\n"
-msgstr ""
+msgstr "由 %s (%s) 打包\n"
-#: lib/version-etc.c:77
+#: lib/version-etc.c:76
#, c-format
msgid "Packaged by %s\n"
-msgstr ""
+msgstr "由 %s 打包\n"
#. TRANSLATORS: Translate "(C)" to the copyright symbol
#. (C-in-a-circle), if this symbol is available in the user's
#. locale. Otherwise, do not translate "(C)"; leave it as-is.
-#: lib/version-etc.c:84
+#: lib/version-etc.c:83
msgid "(C)"
-msgstr ""
+msgstr "(C)"
-#: lib/version-etc.c:86
+#: lib/version-etc.c:85
msgid ""
"\n"
"License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl."
@@ -244,24 +240,29 @@ msgid ""
"There is NO WARRANTY, to the extent permitted by law.\n"
"\n"
msgstr ""
+"\n"
+"GPLv3+ 授權:GNU GPL 第三版或更新版本 <https://gnu.org/licenses/gpl.html>。\n"
+"此為自由軟體:您能修改與重散布它。\n"
+"在法律允許的範圍內沒有任何擔保。\n"
+"\n"
#. TRANSLATORS: %s denotes an author name.
#: lib/version-etc.c:102
#, c-format
msgid "Written by %s.\n"
-msgstr ""
+msgstr "由 %s 編寫。\n"
#. TRANSLATORS: Each %s denotes an author name.
#: lib/version-etc.c:106
#, c-format
msgid "Written by %s and %s.\n"
-msgstr ""
+msgstr "由 %s 與 %s 編寫。\n"
#. TRANSLATORS: Each %s denotes an author name.
#: lib/version-etc.c:110
#, c-format
msgid "Written by %s, %s, and %s.\n"
-msgstr ""
+msgstr "由 %s、%s 與 %s 編寫。\n"
#. TRANSLATORS: Each %s denotes an author name.
#. You can use line breaks, estimating that each author name occupies
@@ -271,7 +272,7 @@ msgstr ""
msgid ""
"Written by %s, %s, %s,\n"
"and %s.\n"
-msgstr ""
+msgstr "由 %s、%s、%s 與 %s 編寫。\n"
#. TRANSLATORS: Each %s denotes an author name.
#. You can use line breaks, estimating that each author name occupies
@@ -282,6 +283,8 @@ msgid ""
"Written by %s, %s, %s,\n"
"%s, and %s.\n"
msgstr ""
+"由 %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
@@ -292,6 +295,8 @@ msgid ""
"Written by %s, %s, %s,\n"
"%s, %s, and %s.\n"
msgstr ""
+"由 %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
@@ -302,6 +307,8 @@ msgid ""
"Written by %s, %s, %s,\n"
"%s, %s, %s, and %s.\n"
msgstr ""
+"由 %s、%s、%s、%s、\n"
+"%s 、%s 與 %s 編寫。\n"
#. TRANSLATORS: Each %s denotes an author name.
#. You can use line breaks, estimating that each author name occupies
@@ -313,6 +320,8 @@ msgid ""
"%s, %s, %s, %s,\n"
"and %s.\n"
msgstr ""
+"由 %s、%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
@@ -324,6 +333,9 @@ msgid ""
"%s, %s, %s, %s,\n"
"%s, and %s.\n"
msgstr ""
+"由 %s、%s、%s、%s、\n"
+"%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
@@ -335,6 +347,9 @@ msgid ""
"%s, %s, %s, %s,\n"
"%s, %s, and others.\n"
msgstr ""
+"由 %s、%s、%s、%s、\n"
+"%s 、%s、%s、\n"
+"%s、%s 與其他人編寫。\n"
#. TRANSLATORS: The placeholder indicates the bug-reporting address
#. for this package. Please add _another line_ saying
@@ -346,28 +361,27 @@ 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 ""
+msgstr "回報 %s 的漏洞到:%s\n"
#: lib/version-etc.c:251
#, c-format
msgid "%s home page: <%s>\n"
-msgstr ""
+msgstr "%s 的首頁:<%s>\n"
#: lib/version-etc.c:253
#, c-format
msgid "%s home page: <https://www.gnu.org/software/%s/>\n"
-msgstr ""
+msgstr "%s 的首頁:<https://www.gnu.org/software/%s/>\n"
#: lib/version-etc.c:256
-#, fuzzy
msgid "General help using GNU software: <https://www.gnu.org/gethelp/>\n"
-msgstr ""
-"GNU sed 首頁:<http://www.gnu.org/software/sed/>。\n"
-"使用 GNU 軟體的一般說明:<http://www.gnu.org/gethelp/>。\n"
+msgstr "使用 GNU 軟體的一般說明:<https://www.gnu.org/gethelp/>\n"
#: sed/compile.c:146
msgid "multiple `!'s"
@@ -417,190 +431,193 @@ msgstr "遺漏命令"
msgid "command only uses one address"
msgstr "命令只使用一個位址"
-#: sed/compile.c:164
+#: sed/compile.c:165
msgid "unterminated address regex"
msgstr "未結束的位址正規表示式"
-#: sed/compile.c:165
+#: sed/compile.c:166
msgid "unterminated `s' command"
msgstr "未結束的「s」命令"
-#: sed/compile.c:166
+#: sed/compile.c:167
msgid "unterminated `y' command"
msgstr "未結束的「y」命令"
-#: sed/compile.c:167
+#: sed/compile.c:168
msgid "unknown option to `s'"
msgstr "「s」的未知選項"
-#: sed/compile.c:169
+#: sed/compile.c:170
msgid "multiple `p' options to `s' command"
msgstr "多個「s」命令的選項「p」"
-#: sed/compile.c:171
+#: sed/compile.c:172
msgid "multiple `g' options to `s' command"
msgstr "多個「s」命令的選項「g」"
-#: sed/compile.c:173
+#: sed/compile.c:174
msgid "multiple number options to `s' command"
msgstr "多個「s」命令的數值選項"
-#: sed/compile.c:175
+#: sed/compile.c:176
msgid "number option to `s' command may not be zero"
msgstr "「s」命令的數值選項不能為零"
-#: sed/compile.c:177
+#: sed/compile.c:178
msgid "strings for `y' command are different lengths"
msgstr "y 命令的字串長度不同"
-#: sed/compile.c:179
+#: sed/compile.c:180
msgid "delimiter character is not a single-byte character"
msgstr "分隔字元不是單一位元字元"
-#: sed/compile.c:181
+#: sed/compile.c:182
msgid "expected newer version of sed"
msgstr "預期使用新版的 sed"
-#: sed/compile.c:183
+#: sed/compile.c:184
msgid "invalid usage of line address 0"
msgstr "非法使用位址第 0 列"
-#: sed/compile.c:184
+#: sed/compile.c:185
#, c-format
msgid "unknown command: `%c'"
msgstr "未知的命令: 「%c」"
-#: sed/compile.c:186
-#, fuzzy
+#: sed/compile.c:187
msgid "incomplete command"
-msgstr "遺漏命令"
+msgstr "不完全的指令"
-#: sed/compile.c:188
+#: sed/compile.c:189
msgid "\":\" lacks a label"
-msgstr ""
+msgstr "「:」缺少標籤"
-#: sed/compile.c:190
+#: sed/compile.c:191
msgid "recursive escaping after \\c not allowed"
+msgstr "不允許在「\\c」之後加入遞迴跳脫字元"
+
+#: sed/compile.c:193
+msgid "e/r/w commands disabled in sandbox mode"
msgstr ""
-#: sed/compile.c:213
+#: sed/compile.c:215
#, c-format
msgid "%s: file %s line %lu: %s\n"
msgstr "%s: 檔案 %s 列號: %lu: %s\n"
-#: sed/compile.c:216
+#: sed/compile.c:218
#, c-format
msgid "%s: -e expression #%lu, char %lu: %s\n"
msgstr "%s: -e 表示式 #%lu,字元 %lu: %s\n"
-#: sed/compile.c:1644
+#: sed/compile.c:1607
#, c-format
msgid "can't find label for jump to `%s'"
msgstr "無法為目的是「%s」的跳移找到標籤"
-#: sed/execute.c:254 sed/execute.c:271
+#: sed/execute.c:253 sed/execute.c:270
#, c-format
msgid "case conversion produced an invalid character"
-msgstr ""
+msgstr "大小寫轉換產生了無效字元"
-#: sed/execute.c:565
+#: sed/execute.c:561
#, c-format
msgid "%s: can't read %s: %s\n"
msgstr "%s: 無法讀取 %s: %s\n"
-#: sed/execute.c:590
+#: sed/execute.c:587
#, c-format
msgid "couldn't edit %s: is a terminal"
msgstr "無法編輯 %s: 是一個終端機"
-#: sed/execute.c:595
+#: sed/execute.c:592
#, c-format
msgid "couldn't edit %s: not a regular file"
msgstr "無法編輯 %s: 不是一個正常檔案"
-#: sed/execute.c:606
+#: sed/execute.c:603
#, c-format
msgid "%s: warning: failed to set default file creation context to %s: %s"
msgstr "%s:警告:無法設定 %s:%s 的預設檔案建立語境"
-#: sed/execute.c:614
+#: sed/execute.c:611
#, c-format
msgid "%s: warning: failed to get security context of %s: %s"
msgstr "%s:警告:無法提取 %s:%s 的安全語境"
-#: sed/execute.c:633 sed/utils.c:178
+#: sed/execute.c:630 sed/utils.c:188
#, c-format
msgid "couldn't open temporary file %s: %s"
msgstr "無法打開暫存檔案 %s: %s"
-#: sed/execute.c:1148 sed/execute.c:1358
+#: sed/execute.c:1167 sed/execute.c:1366
msgid "error in subprocess"
msgstr "錯誤發生於副行程中"
-#: sed/execute.c:1150
+#: sed/execute.c:1169
msgid "option `e' not supported"
msgstr "不支援選項「e」"
-#: sed/execute.c:1339
+#: sed/execute.c:1347
msgid "`e' command not supported"
msgstr "不支援命令「e」"
-#: sed/execute.c:1665
+#: sed/execute.c:1662
msgid "no input files"
msgstr "沒有輸入檔案"
-#: sed/regexp.c:39
+#: sed/regexp.c:40
msgid "no previous regular expression"
msgstr "不存在之前的正規表示式"
-#: sed/regexp.c:141
+#: sed/regexp.c:125
#, c-format
msgid "invalid reference \\%d on `s' command's RHS"
msgstr "「s」命令的 RHS 上不正確的參考值 \\%d"
-#: sed/regexp.c:259
+#: sed/regexp.c:196
msgid "regex input buffer length larger than INT_MAX"
-msgstr ""
+msgstr "正規表達式緩衝區長度大於 INT_MAX"
-#: sed/sed.c:35
+#: sed/sed.c:36
msgid "Jay Fenlason"
-msgstr ""
+msgstr "Jay Fenlason"
-#: sed/sed.c:36
+#: sed/sed.c:37
msgid "Tom Lord"
-msgstr ""
+msgstr "Tom Lord"
-#: sed/sed.c:37
+#: sed/sed.c:38
msgid "Ken Pizzini"
-msgstr ""
+msgstr "Ken Pizzini"
-#: sed/sed.c:38
+#: sed/sed.c:39
msgid "Paolo Bonzini"
+msgstr "Paolo Bonzini"
+
+#: sed/sed.c:40
+msgid "Jim Meyering"
msgstr ""
-#: sed/sed.c:113
-#, fuzzy, c-format
+#: sed/sed.c:41
+msgid "Assaf Gordon"
+msgstr ""
+
+#: sed/sed.c:124
+#, c-format
msgid ""
"GNU sed home page: <https://www.gnu.org/software/sed/>.\n"
"General help using GNU software: <https://www.gnu.org/gethelp/>.\n"
msgstr ""
-"GNU sed 首頁:<http://www.gnu.org/software/sed/>。\n"
-"使用 GNU 軟體的一般說明:<http://www.gnu.org/gethelp/>。\n"
+"GNU sed 首頁:<https://www.gnu.org/software/sed/>。\n"
+"使用 GNU 軟體的一般說明:<https://www.gnu.org/gethelp/>。\n"
-#: sed/sed.c:120
+#: sed/sed.c:130
#, c-format
msgid "E-mail bug reports to: <%s>.\n"
-msgstr ""
+msgstr "將漏洞回報傳到該 E-mail:<%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
+#: sed/sed.c:138
#, c-format
msgid ""
"Usage: %s [OPTION]... {script-only-if-no-other-script} [input-file]...\n"
@@ -609,7 +626,7 @@ msgstr ""
"用法: %s [選項]... {若無其他命令稿則只能放命令稿} [輸入檔]...\n"
"\n"
-#: sed/sed.c:138
+#: sed/sed.c:142
#, c-format
msgid ""
" -n, --quiet, --silent\n"
@@ -618,7 +635,16 @@ msgstr ""
" -n, --quiet, --silent\n"
" 抑止樣版空間的自動顯示\n"
-#: sed/sed.c:140
+#: sed/sed.c:144
+#, fuzzy, c-format
+msgid ""
+" --debug\n"
+" annotate program execution\n"
+msgstr ""
+" --posix\n"
+" 停用所有 GNU 擴充功能。\n"
+
+#: sed/sed.c:146
#, c-format
msgid ""
" -e script, --expression=script\n"
@@ -627,7 +653,7 @@ msgstr ""
" -e 命令稿, --expression=命令稿\n"
" 加入命令稿做為執行的命令\n"
-#: sed/sed.c:142
+#: sed/sed.c:148
#, c-format
msgid ""
" -f script-file, --file=script-file\n"
@@ -637,7 +663,7 @@ msgstr ""
" -f 命令稿檔案, --file=命令稿檔案\n"
" 加入命令稿檔案內容做為執行的命令\n"
-#: sed/sed.c:146
+#: sed/sed.c:152
#, c-format
msgid ""
" --follow-symlinks\n"
@@ -646,16 +672,16 @@ msgstr ""
" --follow-symlinks\n"
" 就地處理時追隨符號連結\n"
-#: sed/sed.c:149
-#, fuzzy, c-format
+#: sed/sed.c:155
+#, 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"
+" -i[SUFFIX], --in-place[=SUFFIX]\n"
+" 一次編輯檔案 (若提供 SUFFIX 則建立備份)\n"
-#: sed/sed.c:153
+#: sed/sed.c:158
#, c-format
msgid ""
" -b, --binary\n"
@@ -665,7 +691,7 @@ msgstr ""
" -b, --binary\n"
" 以二進位模式開啟檔案 (並未特殊處理 CR+LF)\n"
-#: sed/sed.c:157
+#: sed/sed.c:162
#, c-format
msgid ""
" -l N, --line-length=N\n"
@@ -674,7 +700,7 @@ msgstr ""
" -l N, --line-length=N\n"
" 指定使用「l」命令時想要的換列長度\n"
-#: sed/sed.c:159
+#: sed/sed.c:164
#, c-format
msgid ""
" --posix\n"
@@ -683,34 +709,38 @@ msgstr ""
" --posix\n"
" 停用所有 GNU 擴充功能。\n"
-#: sed/sed.c:161
-#, fuzzy, c-format
+#: sed/sed.c:166
+#, c-format
msgid ""
" -E, -r, --regexp-extended\n"
" use extended regular expressions in the script\n"
" (for portability use POSIX -E).\n"
msgstr ""
-" -r, --regexp-extended\n"
-" 在命令稿中使用擴充的正規表示式。\n"
+" -E, -r, --regexp-extended\n"
+" 在指令中使用延伸正規表達式\n"
+" (若要可攜性請使用 POSIX -E)。\n"
-#: sed/sed.c:167
-#, fuzzy, c-format
+#: sed/sed.c:169
+#, 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"
+" 將檔案視為各自分離而非單一且\n"
+" 連續的長字串。\n"
-#: sed/sed.c:170
+#: sed/sed.c:172
#, c-format
msgid ""
" --sandbox\n"
" operate in sandbox mode (disable e/r/w commands).\n"
msgstr ""
+" --sandbox\n"
+" 在沙盒模式中操作 (停用 e/r/w 指令)。\n"
-#: sed/sed.c:172
+#: sed/sed.c:174
#, c-format
msgid ""
" -u, --unbuffered\n"
@@ -721,24 +751,26 @@ msgstr ""
" -u, --unbuffered\n"
" 從輸入檔中讀取最少量的資料並更常清空輸出緩衝區\n"
-#: sed/sed.c:175
+#: sed/sed.c:177
#, c-format
msgid ""
" -z, --null-data\n"
" separate lines by NUL characters\n"
msgstr ""
+" -z, --null-data\n"
+" 以 NUL 字元分割行列\n"
-#: sed/sed.c:177
+#: sed/sed.c:179
#, c-format
msgid " --help display this help and exit\n"
msgstr " --help 顯示本輔助訊息並離開\n"
-#: sed/sed.c:178
+#: sed/sed.c:180
#, c-format
msgid " --version output version information and exit\n"
msgstr " --version 輸出版本資訊並離開\n"
-#: sed/sed.c:179
+#: sed/sed.c:181
#, c-format
msgid ""
"\n"
@@ -754,47 +786,67 @@ msgstr ""
"假如未指定輸入檔,就會從標準輸入來讀取。\n"
"\n"
-#: sed/utils.c:73 sed/utils.c:384
+#: sed/sed.c:373
+msgid "failed to set binary mode on STDIN"
+msgstr ""
+
+#: sed/sed.c:375
+msgid "failed to set binary mode on STDOUT"
+msgstr ""
+
+#: sed/utils.c:77 sed/utils.c:395
#, c-format
msgid "cannot remove %s: %s"
msgstr "無法移除 %s: %s"
-#: sed/utils.c:136
+#: sed/utils.c:146
#, c-format
msgid "couldn't open file %s: %s"
msgstr "無法打開檔案 %s: %s"
-#: sed/utils.c:155
+#: sed/utils.c:165
#, c-format
msgid "couldn't attach to %s: %s"
msgstr "無法附加到 %s:%s"
#: sed/utils.c:192
-#, fuzzy, c-format
+#, c-format
+msgid "failed to set binary mode on '%s'"
+msgstr ""
+
+#: sed/utils.c:207
+#, 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[0] "無法將 %llu 個項目寫到 %s:%s"
-#: sed/utils.c:204 sed/utils.c:223
+#: sed/utils.c:219 sed/utils.c:238
#, c-format
msgid "read error on %s: %s"
msgstr "讀取 %s 時出錯: %s"
-#: sed/utils.c:325
+#: sed/utils.c:336
#, c-format
msgid "couldn't follow symlink %s: %s"
msgstr "無法追隨符號連結 %s:%s"
-#: sed/utils.c:359
+#: sed/utils.c:370
#, c-format
msgid "cannot stat %s: %s"
msgstr "無法取得狀態 %s:%s"
-#: sed/utils.c:389
+#: sed/utils.c:400
#, c-format
msgid "cannot rename %s: %s"
msgstr "無法更改名稱 %s: %s"
+#~ msgid ""
+#~ " -R, --regexp-perl\n"
+#~ " use Perl 5's regular expressions syntax in the script.\n"
+#~ msgstr ""
+#~ " -R, --regexp-perl\n"
+#~ " 在命令稿中使用 Perl 5 的正規表示式語法。\n"
+
#~ msgid "cannot specify modifiers on empty regexp"
#~ msgstr "無法指定修飾字元給空的正規表示式"
diff --git a/sed/compile.c b/sed/compile.c
index 25baf5e..ca58371 100644
--- a/sed/compile.c
+++ b/sed/compile.c
@@ -12,8 +12,7 @@
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
+ along with this program; If not, see <https://www.gnu.org/licenses/>. */
/* compile.c: translate sed source into internal form */
@@ -24,8 +23,9 @@
#include <stdlib.h>
#include <sys/types.h>
#include <obstack.h>
+#include "progname.h"
+#include "xalloc.h"
-
#define YMAP_LENGTH 256 /*XXX shouldn't this be (UCHAR_MAX+1)?*/
#define VECTOR_ALLOC_INCREMENT 40
@@ -85,7 +85,6 @@ static struct special_files special_files[] = {
{ { NULL, false, NULL, NULL }, NULL }
};
-
/* Where we are in the processing of the input. */
static struct prog_info prog;
static struct error_info cur_input;
@@ -140,93 +139,95 @@ static const char errors[] =
"incomplete command\0"
"\":\" lacks a label\0"
"recursive escaping after \\c not allowed\0"
- "e/r/w commands disabled in sandbox mode";
+ "e/r/w commands disabled in sandbox mode\0"
+ "missing filename in r/R/w/W commands";
#define BAD_BANG (errors)
-#define BAD_COMMA (BAD_BANG + sizeof(N_("multiple `!'s")))
-#define BAD_STEP (BAD_COMMA + sizeof(N_("unexpected `,'")))
+#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_CLOSE_BRACE (EXCESS_OPEN_BRACE + sizeof(N_("unmatched `{'")))
-#define EXCESS_JUNK (EXCESS_CLOSE_BRACE + sizeof(N_("unexpected `}'")))
+ + 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")))
+ + sizeof (N_("extra characters after command")))
#define NO_CLOSE_BRACE_ADDR (EXPECTED_SLASH \
- + sizeof(N_("expected \\ after `a', `c' or `i'")))
+ + sizeof (N_("expected \\ after `a', `c' or `i'")))
#define NO_COLON_ADDR (NO_CLOSE_BRACE_ADDR \
- + sizeof(N_("`}' doesn't want any addresses")))
+ + sizeof (N_("`}' doesn't want any addresses")))
#define NO_SHARP_ADDR (NO_COLON_ADDR \
- + sizeof(N_(": doesn't want any addresses")))
+ + 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'")))
+ + 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")))
+ + sizeof (N_("multiple `p' options to `s' command")))
#define EXCESS_N_OPT (EXCESS_G_OPT \
- + sizeof(N_("multiple `g' options to `s' command")))
+ + sizeof (N_("multiple `g' options to `s' command")))
#define ZERO_N_OPT (EXCESS_N_OPT \
- + sizeof(N_("multiple number options to `s' command")))
+ + 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")))
+ + 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")))
+ + sizeof (N_("strings for `y' command are different lengths")))
#define ANCIENT_VERSION (BAD_DELIM \
- + sizeof(N_("delimiter character is not a single-byte character")))
+ + sizeof (N_("delimiter character is not a single-byte character")))
#define INVALID_LINE_0 (ANCIENT_VERSION \
- + sizeof(N_("expected newer version of sed")))
+ + 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'")))
+ + sizeof (N_("invalid usage of line address 0")))
+#define INCOMPLETE_CMD (UNKNOWN_CMD + sizeof (N_("unknown command: `%c'")))
#define COLON_LACKS_LABEL (INCOMPLETE_CMD \
- + sizeof(N_("incomplete command")))
+ + sizeof (N_("incomplete command")))
#define RECURSIVE_ESCAPE_C (COLON_LACKS_LABEL \
- + sizeof(N_("\":\" lacks a label")))
+ + sizeof (N_("\":\" lacks a label")))
#define DISALLOWED_CMD (RECURSIVE_ESCAPE_C \
- + sizeof(N_("recursive escaping after \\c not allowed")))
+ + sizeof (N_("recursive escaping after \\c not allowed")))
+#define MISSING_FILENAME (DISALLOWED_CMD \
+ + sizeof (N_( "e/r/w commands disabled in sandbox mode")))
/* #define END_ERRORS (DISALLOWED_CMD \
- + sizeof(N_( "e/r/w commands disabled in sandbox mode"))) */
+ + 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. */
static void
-bad_command(char ch)
+bad_command (char ch)
{
const char *msg = _(UNKNOWN_CMD);
- char *unknown_cmd = xmalloc(strlen(msg));
- sprintf(unknown_cmd, msg, ch);
- bad_prog(unknown_cmd);
+ char *unknown_cmd = xmalloc (strlen (msg));
+ sprintf (unknown_cmd, msg, ch);
+ bad_prog (unknown_cmd);
}
/* Complain about a programming error and exit. */
void
-bad_prog(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);
+ fprintf (stderr, _("%s: file %s line %lu: %s\n"), program_name,
+ 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_BAD_USAGE);
+ fprintf (stderr, _("%s: -e expression #%lu, char %lu: %s\n"),
+ program_name,
+ (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)
+inchar (void)
{
int ch = EOF;
@@ -237,8 +238,8 @@ inchar(void)
}
else if (prog.file)
{
- if (!feof(prog.file))
- ch = getc(prog.file);
+ if (!feof (prog.file))
+ ch = getc (prog.file);
}
if (ch == '\n')
++cur_input.line;
@@ -247,7 +248,7 @@ inchar(void)
/* unget `ch' so the next call to inchar will return it. */
static void
-savchar(int ch)
+savchar (int ch)
{
if (ch == EOF)
return;
@@ -256,21 +257,21 @@ savchar(int ch)
if (prog.cur)
{
if (prog.cur <= prog.base || *--prog.cur != ch)
- panic("Called savchar() with unexpected pushback (%x)",
- (unsigned int) ch);
+ panic ("Called savchar with unexpected pushback (%x)",
+ (unsigned int) ch);
}
else
- ungetc(ch, prog.file);
+ ungetc (ch, prog.file);
}
/* Read the next non-blank character from the program. */
static int
-in_nonblank(void)
+in_nonblank (void)
{
int ch;
do
- ch = inchar();
- while (ISBLANK(ch));
+ ch = inchar ();
+ while (ISBLANK (ch));
return ch;
}
@@ -282,11 +283,11 @@ in_nonblank(void)
static void
read_end_of_cmd (void)
{
- const int ch = in_nonblank();
+ const int ch = in_nonblank ();
if (ch == CLOSE_BRACE || ch == '#')
- savchar(ch);
+ savchar (ch);
else if (ch != EOF && ch != '\n' && ch != ';')
- bad_prog(_(EXCESS_JUNK));
+ bad_prog (_(EXCESS_JUNK));
}
/* Read an integer value from the program. */
@@ -295,24 +296,24 @@ in_integer (int ch)
{
countT num = 0;
- while (ISDIGIT(ch))
+ while (ISDIGIT (ch))
{
num = num * 10 + ch - '0';
- ch = inchar();
+ ch = inchar ();
}
- savchar(ch);
+ savchar (ch);
return num;
}
static int
-add_then_next(struct buffer *b, int ch)
+add_then_next (struct buffer *b, int ch)
{
- add1_buffer(b, ch);
- return inchar();
+ add1_buffer (b, ch);
+ return inchar ();
}
static char *
-convert_number(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;
@@ -351,32 +352,31 @@ convert_number(char *result, char *buf, const char *bufend, int base)
return p;
}
-
/* Read in a filename for a `r', `w', or `s///w' command. */
static struct buffer *
-read_filename(void)
+read_filename (void)
{
struct buffer *b;
int ch;
if (sandbox)
- bad_prog(_(DISALLOWED_CMD));
+ bad_prog (_(DISALLOWED_CMD));
- b = init_buffer();
- ch = in_nonblank();
+ 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);
+ savchar (ch);
break;
}
#endif
- ch = add_then_next(b, ch);
+ ch = add_then_next (b, ch);
}
- add1_buffer(b, '\0');
+ add1_buffer (b, '\0');
return b;
}
@@ -387,10 +387,13 @@ get_openfile (struct output **file_ptrs, const char *mode, int fail)
char *file_name;
struct output *p;
- b = read_filename();
- file_name = get_buffer(b);
+ b = read_filename ();
+ file_name = get_buffer (b);
+ if (strlen (file_name) == 0)
+ bad_prog (_(MISSING_FILENAME));
+
for (p=*file_ptrs; p; p=p->link)
- if (strcmp(p->name, file_name) == 0)
+ if (strcmp (p->name, file_name) == 0)
break;
if (posixicity == POSIXLY_EXTENDED)
@@ -402,7 +405,7 @@ get_openfile (struct output **file_ptrs, const char *mode, int fail)
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)
+ if (strcmp (special->outf.name, file_name) == 0)
{
special->outf.fp = *special->pfp;
free_buffer (b);
@@ -412,18 +415,17 @@ get_openfile (struct output **file_ptrs, const char *mode, int fail)
if (!p)
{
- p = OB_MALLOC(&obs, 1, struct output);
- p->name = ck_strdup(file_name);
- p->fp = ck_fopen(p->name, mode, fail);
+ p = OB_MALLOC (&obs, 1, struct output);
+ p->name = xstrdup (file_name);
+ p->fp = ck_fopen (p->name, mode, fail);
p->missing_newline = false;
p->link = *file_ptrs;
*file_ptrs = p;
}
- free_buffer(b);
+ free_buffer (b);
return p;
}
-
static struct sed_cmd *
next_cmd_entry (struct vector **vectorp)
{
@@ -434,7 +436,7 @@ next_cmd_entry (struct vector **vectorp)
if (v->v_length == v->v_allocated)
{
v->v_allocated += VECTOR_ALLOC_INCREMENT;
- v->v = REALLOC(v->v, v->v_allocated, struct sed_cmd);
+ v->v = REALLOC (v->v, v->v_allocated, struct sed_cmd);
}
cmd = v->v + v->v_length;
@@ -455,11 +457,11 @@ snarf_char_class (struct buffer *b, mbstate_t *cur_stat)
int state = 0;
int delim IF_LINT ( = 0) ;
- ch = inchar();
+ ch = inchar ();
if (ch == '^')
- ch = add_then_next(b, ch);
+ ch = add_then_next (b, ch);
if (ch == CLOSE_BRACKET)
- ch = add_then_next(b, ch);
+ ch = add_then_next (b, ch);
/* States are:
0 outside a collation element, character class or collation class
@@ -538,8 +540,8 @@ match_slash (int slash, int regex)
memset (&cur_stat, 0, sizeof cur_stat);
- b = init_buffer();
- while ((ch = inchar()) != EOF && ch != '\n')
+ b = init_buffer ();
+ while ((ch = inchar ()) != EOF && ch != '\n')
{
const int mb_char = IS_MB_CHAR (ch, &cur_stat);
@@ -549,31 +551,29 @@ match_slash (int slash, int regex)
return b;
else if (ch == '\\')
{
- ch = inchar();
+ ch = inchar ();
if (ch == EOF)
break;
-#ifndef REG_PERL
else if (ch == 'n' && regex)
ch = '\n';
-#endif
else if (ch != '\n' && (ch != slash || (!regex && ch == '&')))
- add1_buffer(b, '\\');
+ add1_buffer (b, '\\');
}
else if (ch == OPEN_BRACKET && regex)
{
- add1_buffer(b, ch);
- ch = snarf_char_class(b, &cur_stat);
+ add1_buffer (b, ch);
+ ch = snarf_char_class (b, &cur_stat);
if (ch != CLOSE_BRACKET)
break;
}
}
- add1_buffer(b, ch);
+ add1_buffer (b, ch);
}
if (ch == '\n')
- savchar(ch); /* for proper line number in error report */
- free_buffer(b);
+ savchar (ch); /* for proper line number in error report */
+ free_buffer (b);
return NULL;
}
@@ -590,74 +590,56 @@ mark_subst_opts (struct subst *cmd)
cmd->outf = NULL;
for (;;)
- switch ( (ch = in_nonblank()) )
+ switch ( (ch = in_nonblank ()) )
{
case 'i': /* GNU extension */
case 'I': /* GNU extension */
if (posixicity == POSIXLY_BASIC)
- bad_prog(_(UNKNOWN_S_OPT));
+ 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;
-
- 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;
-#endif
-
case 'm': /* GNU extension */
case 'M': /* GNU extension */
if (posixicity == POSIXLY_BASIC)
- bad_prog(_(UNKNOWN_S_OPT));
+ bad_prog (_(UNKNOWN_S_OPT));
flags |= REG_NEWLINE;
break;
case 'e':
if (posixicity == POSIXLY_BASIC)
- bad_prog(_(UNKNOWN_S_OPT));
+ bad_prog (_(UNKNOWN_S_OPT));
cmd->eval = true;
break;
case 'p':
if (cmd->print)
- bad_prog(_(EXCESS_P_OPT));
+ 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));
+ bad_prog (_(EXCESS_G_OPT));
cmd->global = true;
break;
case 'w':
- cmd->outf = get_openfile(&file_write, write_mode, true);
+ 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);
+ bad_prog (_(EXCESS_N_OPT));
+ cmd->numb = in_integer (ch);
if (!cmd->numb)
- bad_prog(_(ZERO_N_OPT));
+ bad_prog (_(ZERO_N_OPT));
break;
case CLOSE_BRACE:
case '#':
- savchar(ch);
+ savchar (ch);
FALLTHROUGH;
case EOF:
case '\n':
@@ -665,36 +647,35 @@ mark_subst_opts (struct subst *cmd)
return flags;
case '\r':
- if (inchar() == '\n')
+ if (inchar () == '\n')
return flags;
FALLTHROUGH;
default:
- bad_prog(_(UNKNOWN_S_OPT));
+ bad_prog (_(UNKNOWN_S_OPT));
/*NOTREACHED*/
}
}
-
/* read in a label for a `:', `b', or `t' command */
-static char *
+static char * _GL_ATTRIBUTE_MALLOC
read_label (void)
{
struct buffer *b;
int ch;
char *ret;
- b = init_buffer();
- ch = in_nonblank();
+ b = init_buffer ();
+ 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);
- add1_buffer(b, '\0');
- ret = ck_strdup(get_buffer(b));
- free_buffer(b);
+ savchar (ch);
+ add1_buffer (b, '\0');
+ ret = xstrdup (get_buffer (b));
+ free_buffer (b);
return ret;
}
@@ -703,14 +684,14 @@ read_label (void)
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 *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);
+ struct sed_label *ret = OB_MALLOC (&obs, 1, struct sed_label);
ret->v_index = idx;
ret->name = name;
if (err_info)
- memcpy(&ret->err_info, err_info, sizeof (ret->err_info));
+ memcpy (&ret->err_info, err_info, sizeof (ret->err_info));
ret->next = list;
return ret;
}
@@ -724,19 +705,19 @@ release_label (struct sed_label *list_head)
return NULL;
ret = list_head->next;
- free(list_head->name);
+ free (list_head->name);
#if 0
/* We use obstacks */
- free(list_head);
+ free (list_head);
#endif
return ret;
}
static struct replacement *
-new_replacement(char *text, size_t length, enum replacement_types type)
+new_replacement (char *text, size_t length, enum replacement_types type)
{
- struct replacement *r = OB_MALLOC(&obs, 1, struct replacement);
+ struct replacement *r = OB_MALLOC (&obs, 1, struct replacement);
r->prefix = text;
r->prefix_length = length;
@@ -758,8 +739,10 @@ setup_replacement (struct subst *sub, const char *text, size_t length)
struct replacement *tail;
sub->max_id = 0;
- base = MEMDUP(text, length, char);
- length = normalize_text(base, length, TEXT_REPLACEMENT);
+ base = MEMDUP (text, length, char);
+ length = normalize_text (base, length, TEXT_REPLACEMENT);
+
+ IF_LINT (sub->replacement_buffer = base);
text_end = base + length;
tail = &root;
@@ -770,7 +753,7 @@ setup_replacement (struct subst *sub, const char *text, size_t length)
{
/* Preceding the backslash may be some literal text: */
tail = tail->next =
- new_replacement(base, (size_t)(p - base), repl_type);
+ new_replacement (base, (size_t)(p - base), repl_type);
repl_type = save_type;
@@ -832,7 +815,7 @@ setup_replacement (struct subst *sub, const char *text, size_t length)
{
/* Preceding the ampersand may be some literal text: */
tail = tail->next =
- new_replacement(base, (size_t)(p - base), repl_type);
+ new_replacement (base, (size_t)(p - base), repl_type);
repl_type = save_type;
tail->subst_id = 0;
@@ -842,7 +825,7 @@ setup_replacement (struct subst *sub, const char *text, size_t length)
/* There may be some trailing literal text: */
if (base < text_end)
tail = tail->next =
- new_replacement(base, (size_t)(text_end - base), repl_type);
+ new_replacement (base, (size_t)(text_end - base), repl_type);
tail->next = NULL;
sub->replacement = root.next;
@@ -857,8 +840,8 @@ read_text (struct text_buf *buf, int leadin_ch)
if (buf)
{
if (pending_text)
- free_buffer(pending_text);
- pending_text = init_buffer();
+ free_buffer (pending_text);
+ pending_text = init_buffer ();
buf->text = NULL;
buf->text_length = 0;
old_text_buf = buf;
@@ -869,14 +852,14 @@ read_text (struct text_buf *buf, int leadin_ch)
return;
if (leadin_ch != '\n')
- add1_buffer(pending_text, leadin_ch);
+ add1_buffer (pending_text, leadin_ch);
- ch = inchar();
+ ch = inchar ();
while (ch != EOF && ch != '\n')
{
if (ch == '\\')
{
- ch = inchar();
+ ch = inchar ();
if (ch != EOF)
add1_buffer (pending_text, '\\');
}
@@ -890,17 +873,16 @@ read_text (struct text_buf *buf, int leadin_ch)
ch = add_then_next (pending_text, ch);
}
- add1_buffer(pending_text, '\n');
+ add1_buffer (pending_text, '\n');
if (!buf)
buf = old_text_buf;
buf->text_length = normalize_text (get_buffer (pending_text),
size_buffer (pending_text), TEXT_BUFFER);
- buf->text = MEMDUP(get_buffer(pending_text), buf->text_length, char);
- free_buffer(pending_text);
+ buf->text = MEMDUP (get_buffer (pending_text), buf->text_length, char);
+ free_buffer (pending_text);
pending_text = NULL;
}
-
/* Try to read an address for a sed command. If it succeeds,
return non-zero and store the resulting address in `*addr'.
If the input doesn't look like an address read nothing
@@ -919,33 +901,21 @@ compile_address (struct addr *addr, int ch)
struct buffer *b;
addr->addr_type = ADDR_IS_REGEX;
if (ch == '\\')
- ch = inchar();
- if ( !(b = match_slash(ch, true)) )
- bad_prog(_(UNTERM_ADDR_RE));
+ ch = inchar ();
+ if ( !(b = match_slash (ch, true)) )
+ bad_prog (_(UNTERM_ADDR_RE));
- for(;;)
+ for (;;)
{
- ch = in_nonblank();
+ ch = in_nonblank ();
if (posixicity == POSIXLY_BASIC)
goto posix_address_modifier;
- switch(ch)
+ switch (ch)
{
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;
-#endif
-
case 'M': /* GNU extension */
flags |= REG_NEWLINE;
break;
@@ -954,23 +924,23 @@ compile_address (struct addr *addr, int ch)
posix_address_modifier:
savchar (ch);
addr->addr_regex = compile_regex (b, flags, 0);
- free_buffer(b);
+ free_buffer (b);
return true;
}
}
}
- else if (ISDIGIT(ch))
+ else if (ISDIGIT (ch))
{
- addr->addr_number = in_integer(ch);
+ addr->addr_number = in_integer (ch);
addr->addr_type = ADDR_IS_NUM;
- ch = in_nonblank();
+ ch = in_nonblank ();
if (ch != '~' || posixicity == POSIXLY_BASIC)
{
- savchar(ch);
+ savchar (ch);
}
else
{
- countT step = in_integer(in_nonblank());
+ countT step = in_integer (in_nonblank ());
if (step > 0)
{
addr->addr_step = step;
@@ -980,7 +950,7 @@ compile_address (struct addr *addr, int ch)
}
else if ((ch == '+' || ch == '~') && posixicity != POSIXLY_BASIC)
{
- addr->addr_step = in_integer(in_nonblank());
+ addr->addr_step = in_integer (in_nonblank ());
if (addr->addr_step==0)
; /* default to ADDR_IS_NULL; forces matching to stop on next line */
else if (ch == '+')
@@ -1001,7 +971,7 @@ compile_address (struct addr *addr, int 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 *vector)
+compile_program (struct vector *vector)
{
struct sed_cmd *cur_cmd;
struct buffer *b;
@@ -1009,7 +979,7 @@ compile_program(struct vector *vector)
if (!vector)
{
- vector = MALLOC(1, struct vector);
+ vector = XCALLOC (1, struct vector);
vector->v = NULL;
vector->v_allocated = 0;
vector->v_length = 0;
@@ -1017,47 +987,47 @@ compile_program(struct vector *vector)
obstack_init (&obs);
}
if (pending_text)
- read_text(NULL, '\n');
+ read_text (NULL, '\n');
for (;;)
{
struct addr a;
- while ((ch=inchar()) == ';' || ISSPACE(ch))
+ while ((ch=inchar ()) == ';' || ISSPACE (ch))
;
if (ch == EOF)
break;
- cur_cmd = next_cmd_entry(&vector);
- if (compile_address(&a, ch))
+ 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));
+ bad_prog (_(BAD_STEP));
- cur_cmd->a1 = MEMDUP(&a, 1, struct addr);
- ch = in_nonblank();
+ cur_cmd->a1 = MEMDUP (&a, 1, struct addr);
+ ch = in_nonblank ();
if (ch == ',')
{
- if (!compile_address(&a, in_nonblank()))
- bad_prog(_(BAD_COMMA));
+ if (!compile_address (&a, in_nonblank ()))
+ bad_prog (_(BAD_COMMA));
- cur_cmd->a2 = MEMDUP(&a, 1, struct addr);
- ch = in_nonblank();
+ 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));
+ bad_prog (_(INVALID_LINE_0));
}
if (ch == '!')
{
cur_cmd->addr_bang = true;
- ch = in_nonblank();
+ ch = in_nonblank ();
if (ch == '!')
- bad_prog(_(BAD_BANG));
+ bad_prog (_(BAD_BANG));
}
/* Do not accept extended commands in --posix mode. Also,
@@ -1067,13 +1037,13 @@ compile_program(struct vector *vector)
{
case 'e': case 'F': case 'v': case 'z': case 'L':
case 'Q': case 'T': case 'R': case 'W':
- bad_command(ch);
+ bad_command (ch);
FALLTHROUGH;
case 'a': case 'i': case 'l':
case '=': case 'r':
if (cur_cmd->a2)
- bad_prog(_(ONE_ADDR));
+ bad_prog (_(ONE_ADDR));
}
cur_cmd->cmd = ch;
@@ -1081,14 +1051,14 @@ compile_program(struct vector *vector)
{
case '#':
if (cur_cmd->a1)
- bad_prog(_(NO_SHARP_ADDR));
- ch = inchar();
+ 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)))
+ || (prog.file && !prog.base && 2==ftell (prog.file)))
no_default_output = true;
while (ch != EOF && ch != '\n')
- ch = inchar();
+ ch = inchar ();
continue; /* restart the for (;;) loop */
case 'v':
@@ -1101,7 +1071,7 @@ compile_program(struct vector *vector)
char const *compared_version;
compared_version = (*version == '\0') ? "4.0" : version;
if (strverscmp (compared_version, PACKAGE_VERSION) > 0)
- bad_prog(_(ANCIENT_VERSION));
+ bad_prog (_(ANCIENT_VERSION));
free (version);
posixicity = POSIXLY_EXTENDED;
@@ -1109,27 +1079,27 @@ compile_program(struct vector *vector)
continue;
case '{':
- blocks = setup_label(blocks, vector->v_length, NULL, &cur_input);
+ 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));
+ bad_prog (_(EXCESS_CLOSE_BRACE));
if (cur_cmd->a1)
- bad_prog(_(NO_CLOSE_BRACE_ADDR));
+ bad_prog (_(NO_CLOSE_BRACE_ADDR));
read_end_of_cmd ();
vector->v[blocks->v_index].x.jump_index = vector->v_length;
- blocks = release_label(blocks); /* done with this entry */
+ blocks = release_label (blocks); /* done with this entry */
break;
case 'e':
if (sandbox)
- bad_prog(_(DISALLOWED_CMD));
+ bad_prog (_(DISALLOWED_CMD));
- ch = in_nonblank();
+ ch = in_nonblank ();
if (ch == EOF || ch == '\n')
{
cur_cmd->x.cmd_txt.text_length = 0;
@@ -1141,54 +1111,57 @@ compile_program(struct vector *vector)
case 'a':
case 'i':
case 'c':
- ch = in_nonblank();
+ ch = in_nonblank ();
read_text_to_slash:
if (ch == EOF)
- bad_prog(_(EXPECTED_SLASH));
+ bad_prog (_(EXPECTED_SLASH));
if (ch == '\\')
- ch = inchar();
+ ch = inchar ();
else
{
if (posixicity == POSIXLY_BASIC)
- bad_prog(_(EXPECTED_SLASH));
- savchar(ch);
+ bad_prog (_(EXPECTED_SLASH));
+ savchar (ch);
ch = '\n';
}
- read_text(&cur_cmd->x.cmd_txt, ch);
+ read_text (&cur_cmd->x.cmd_txt, ch);
break;
case ':':
if (cur_cmd->a1)
- bad_prog(_(NO_COLON_ADDR));
+ 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);
+ bad_prog (_(COLON_LACKS_LABEL));
+ labels = setup_label (labels, vector->v_length, label, NULL);
+
+ if (debug)
+ cur_cmd->x.label_name = strdup (label);
}
break;
case 'T':
case 'b':
case 't':
- jumps = setup_label(jumps, vector->v_length, read_label(), NULL);
+ jumps = setup_label (jumps, vector->v_length, read_label (), NULL);
break;
case 'Q':
case 'q':
if (cur_cmd->a2)
- bad_prog(_(ONE_ADDR));
+ bad_prog (_(ONE_ADDR));
FALLTHROUGH;
case 'L':
case 'l':
- ch = in_nonblank();
- if (ISDIGIT(ch) && posixicity != POSIXLY_BASIC)
+ ch = in_nonblank ();
+ if (ISDIGIT (ch) && posixicity != POSIXLY_BASIC)
{
- cur_cmd->x.int_arg = in_integer(ch);
+ cur_cmd->x.int_arg = in_integer (ch);
}
else
{
@@ -1217,18 +1190,20 @@ compile_program(struct vector *vector)
break;
case 'r':
- b = read_filename();
- cur_cmd->x.fname = ck_strdup(get_buffer(b));
- free_buffer(b);
+ b = read_filename ();
+ if (strlen (get_buffer (b)) == 0)
+ bad_prog (_(MISSING_FILENAME));
+ cur_cmd->x.fname = xstrdup (get_buffer (b));
+ free_buffer (b);
break;
case 'R':
- cur_cmd->x.fp = get_openfile(&file_read, read_mode, false)->fp;
+ cur_cmd->x.inf = get_openfile (&file_read, read_mode, false);
break;
case 'W':
case 'w':
- cur_cmd->x.outf = get_openfile(&file_write, write_mode, true);
+ cur_cmd->x.outf = get_openfile (&file_write, write_mode, true);
break;
case 's':
@@ -1237,24 +1212,24 @@ compile_program(struct vector *vector)
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));
+ 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);
+ 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);
+ 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);
+ 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));
+ bad_prog (_(DISALLOWED_CMD));
}
break;
@@ -1265,21 +1240,21 @@ compile_program(struct vector *vector)
struct buffer *b2;
char *src_buf, *dest_buf;
- 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);
+ 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);
- if ( !(b2 = match_slash(slash, false)) )
- bad_prog(_(UNTERM_Y_CMD));
- dest_buf = get_buffer(b2);
- dest_len = normalize_text(dest_buf, size_buffer (b2), TEXT_BUFFER);
+ if ( !(b2 = match_slash (slash, false)) )
+ bad_prog (_(UNTERM_Y_CMD));
+ dest_buf = get_buffer (b2);
+ dest_len = normalize_text (dest_buf, size_buffer (b2), TEXT_BUFFER);
if (mb_cur_max > 1)
{
size_t i, j, idx, src_char_num;
- size_t *src_lens = MALLOC(len, size_t);
+ size_t *src_lens = XCALLOC (len, size_t);
char **trans_pairs;
size_t mbclen;
mbstate_t cur_stat = { 0, };
@@ -1298,23 +1273,23 @@ compile_program(struct vector *vector)
}
src_char_num = j;
- memset(&cur_stat, 0, sizeof cur_stat);
+ memset (&cur_stat, 0, sizeof cur_stat);
idx = 0;
/* trans_pairs = {src(0), dest(0), src(1), dest(1), ..., NULL}
src(i) : pointer to i-th source character.
dest(i) : pointer to i-th destination character.
NULL : terminator */
- trans_pairs = MALLOC(2 * src_char_num + 1, char*);
+ trans_pairs = XCALLOC (2 * src_char_num + 1, char*);
cur_cmd->x.translatemb = trans_pairs;
for (i = 0; i < src_char_num; i++)
{
if (idx >= dest_len)
- bad_prog(_(Y_CMD_LEN));
+ bad_prog (_(Y_CMD_LEN));
/* Set the i-th source character. */
- trans_pairs[2 * i] = MALLOC(src_lens[i] + 1, char);
- memcpy(trans_pairs[2 * i], src_buf, src_lens[i]);
+ trans_pairs[2 * i] = XCALLOC (src_lens[i] + 1, char);
+ 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. */
@@ -1327,23 +1302,25 @@ compile_program(struct vector *vector)
mbclen = 1;
/* Set the i-th destination character. */
- trans_pairs[2 * i + 1] = MALLOC(mbclen + 1, char);
- memcpy(trans_pairs[2 * i + 1], dest_buf + idx, mbclen);
+ trans_pairs[2 * i + 1] = XCALLOC (mbclen + 1, char);
+ memcpy (trans_pairs[2 * i + 1], dest_buf + idx, mbclen);
trans_pairs[2 * i + 1][mbclen] = '\0';
idx += mbclen; /* Forward to next character. */
}
trans_pairs[2 * i] = NULL;
if (idx != dest_len)
- bad_prog(_(Y_CMD_LEN));
+ bad_prog (_(Y_CMD_LEN));
+
+ IF_LINT (free (src_lens));
}
else
{
unsigned char *translate =
- OB_MALLOC(&obs, YMAP_LENGTH, unsigned char);
+ OB_MALLOC (&obs, YMAP_LENGTH, unsigned char);
unsigned char *ustring = (unsigned char *)src_buf;
if (len != dest_len)
- bad_prog(_(Y_CMD_LEN));
+ bad_prog (_(Y_CMD_LEN));
for (len = 0; len < YMAP_LENGTH; len++)
translate[len] = len;
@@ -1356,13 +1333,13 @@ compile_program(struct vector *vector)
read_end_of_cmd ();
- free_buffer(b);
- free_buffer(b2);
+ free_buffer (b);
+ free_buffer (b2);
}
break;
case EOF:
- bad_prog(_(NO_COMMAND));
+ bad_prog (_(NO_COMMAND));
/*NOTREACHED*/
default:
@@ -1378,10 +1355,9 @@ compile_program(struct vector *vector)
return vector;
}
-
/* deal with \X escapes */
size_t
-normalize_text(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;
@@ -1440,45 +1416,10 @@ normalize_text(char *buf, size_t len, enum text_types buftype)
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')
- {
- 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))
- {
- base = 8;
- goto convert;
- }
- else
- {
- /* we just pass the \ up one level for interpretation */
- if (buftype != TEXT_BUFFER)
- *q++ = '\\';
- }
-
- continue;
-#else
case 'o': /* octal byte */
base = 8;
-#endif
convert:
- p = convert_number(&ch, p, bufend, base);
+ p = convert_number (&ch, p, bufend, base);
/* for an ampersand in a replacement, pass the \ up one level */
if (buftype == TEXT_REPLACEMENT && (ch == '&' || ch == '\\'))
@@ -1489,12 +1430,12 @@ convert:
case 'c':
if (++p < bufend)
{
- *q++ = toupper((unsigned char) *p) ^ 0x40;
+ *q++ = toupper ((unsigned char) *p) ^ 0x40;
if (*p == '\\')
{
p++;
if (*p != '\\')
- bad_prog(RECURSIVE_ESCAPE_C);
+ bad_prog (RECURSIVE_ESCAPE_C);
}
p++;
continue;
@@ -1547,7 +1488,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(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;
@@ -1561,7 +1502,7 @@ compile_string(struct vector *cur_program, char *str, size_t len)
cur_input.name = NULL;
cur_input.string_expr_count = ++string_expr_count;
- ret = compile_program(cur_program);
+ ret = compile_program (cur_program);
prog.base = NULL;
prog.cur = NULL;
prog.end = NULL;
@@ -1574,7 +1515,7 @@ compile_string(struct vector *cur_program, char *str, size_t len)
Read them in and add them to the end of `cur_program'.
*/
struct vector *
-compile_file(struct vector *cur_program, const char *cmdfile)
+compile_file (struct vector *cur_program, const char *cmdfile)
{
struct vector *ret;
@@ -1582,9 +1523,9 @@ compile_file(struct vector *cur_program, const char *cmdfile)
if (cmdfile[0] != '-' || cmdfile[1] != '\0')
{
#ifdef HAVE_FOPEN_RT
- prog.file = ck_fopen(cmdfile, "rt", true);
+ prog.file = ck_fopen (cmdfile, "rt", true);
#else
- prog.file = ck_fopen(cmdfile, "r", true);
+ prog.file = ck_fopen (cmdfile, "r", true);
#endif
}
@@ -1592,20 +1533,42 @@ compile_file(struct vector *cur_program, const char *cmdfile)
cur_input.name = cmdfile;
cur_input.string_expr_count = 0;
- ret = compile_program(cur_program);
+ ret = compile_program (cur_program);
if (prog.file != stdin)
- ck_fclose(prog.file);
+ ck_fclose (prog.file);
prog.file = NULL;
first_script = false;
return ret;
}
+static void
+cleanup_program_filenames (void)
+{
+ {
+ struct output *p;
+
+ for (p = file_read; p; p = p->link)
+ if (p->name)
+ {
+ free (p->name);
+ p->name = NULL;
+ }
+
+ for (p = file_write; p; p = p->link)
+ if (p->name)
+ {
+ free (p->name);
+ p->name = NULL;
+ }
+ }
+}
+
/* Make any checks which require the whole program to have been read.
In particular: this backpatches the jump targets.
Any cleanup which can be done after these checks is done here also. */
void
-check_final_program(struct vector *program)
+check_final_program (struct vector *program)
{
struct sed_label *go;
struct sed_label *lbl;
@@ -1614,25 +1577,25 @@ check_final_program(struct vector *program)
if (blocks)
{
/* update info for error reporting: */
- memcpy(&cur_input, &blocks->err_info, sizeof (cur_input));
- bad_prog(_(EXCESS_OPEN_BRACE));
+ memcpy (&cur_input, &blocks->err_info, sizeof (cur_input));
+ bad_prog (_(EXCESS_OPEN_BRACE));
}
/* was the final command an unterminated a/c/i command? */
if (pending_text)
{
- old_text_buf->text_length = size_buffer(pending_text);
+ 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);
- free_buffer(pending_text);
+ old_text_buf->text = MEMDUP (get_buffer (pending_text),
+ old_text_buf->text_length, char);
+ free_buffer (pending_text);
pending_text = NULL;
}
- for (go = jumps; go; go = release_label(go))
+ for (go = jumps; go; go = release_label (go))
{
for (lbl = labels; lbl; lbl = lbl->next)
- if (strcmp(lbl->name, go->name) == 0)
+ if (strcmp (lbl->name, go->name) == 0)
break;
if (lbl)
{
@@ -1641,51 +1604,35 @@ check_final_program(struct vector *program)
else
{
if (*go->name)
- panic(_("can't find label for jump to `%s'"), 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;
- for (lbl = labels; lbl; lbl = release_label(lbl))
+ for (lbl = labels; lbl; lbl = release_label (lbl))
;
labels = NULL;
-
- /* There is no longer a need to track file names: */
- {
- struct output *p;
-
- for (p=file_read; p; p=p->link)
- if (p->name)
- {
- free(p->name);
- p->name = NULL;
- }
-
- for (p=file_write; p; p=p->link)
- if (p->name)
- {
- free(p->name);
- p->name = NULL;
- }
- }
}
+
/* Rewind all resources which were allocated in this module. */
void
-rewind_read_files(void)
+rewind_read_files (void)
{
struct output *p;
for (p=file_read; p; p=p->link)
if (p->fp)
- rewind(p->fp);
+ rewind (p->fp);
}
/* Release all resources which were allocated in this module. */
void
-finish_program(void)
+finish_program (struct vector *program)
{
+ cleanup_program_filenames ();
+
/* close all files... */
{
struct output *p, *q;
@@ -1693,28 +1640,50 @@ finish_program(void)
for (p=file_read; p; p=q)
{
if (p->fp)
- ck_fclose(p->fp);
+ ck_fclose (p->fp);
q = p->link;
#if 0
/* We use obstacks. */
- free(p);
+ free (p);
#endif
}
for (p=file_write; p; p=q)
{
if (p->fp)
- ck_fclose(p->fp);
+ ck_fclose (p->fp);
q = p->link;
#if 0
/* We use obstacks. */
- free(p);
+ free (p);
#endif
}
file_read = file_write = NULL;
}
-#ifdef DEBUG_LEAKS
+#ifdef lint
+ for (int i = 0; i < program->v_length; ++i)
+ {
+ const struct sed_cmd *sc = &program->v[i];
+
+ if (sc->a1 && sc->a1->addr_regex)
+ release_regex (sc->a1->addr_regex);
+ if (sc->a2 && sc->a2->addr_regex)
+ release_regex (sc->a2->addr_regex);
+
+ switch (sc->cmd)
+ {
+ case 's':
+ free (sc->x.cmd_subst->replacement_buffer);
+ if (sc->x.cmd_subst->regx)
+ release_regex (sc->x.cmd_subst->regx);
+ break;
+ }
+ }
+
obstack_free (&obs, NULL);
-#endif /*DEBUG_LEAKS*/
+#else
+ (void)program;
+#endif /* lint */
+
}
diff --git a/sed/debug.c b/sed/debug.c
new file mode 100644
index 0000000..9ec37b6
--- /dev/null
+++ b/sed/debug.c
@@ -0,0 +1,456 @@
+/* GNU SED, a batch stream editor.
+ Copyright (C) 2018 Free Software Foundation, Inc.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3, or (at your option)
+ any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; If not, see <https://www.gnu.org/licenses/>. */
+
+/* Written by Assaf Gordon. */
+
+/* debug.c: debugging functions */
+
+#include "sed.h"
+#include "basicdefs.h"
+#include <stdio.h>
+#include <ctype.h>
+#include <string.h>
+#include <stdlib.h>
+#include <sys/types.h>
+#include <assert.h>
+
+/* indentation level when printing the program */
+static int block_level = 0;
+
+
+void
+debug_print_char (char c)
+{
+ if (ISPRINT (c) && c != '\\')
+ {
+ putchar (c);
+ return;
+ }
+
+ putchar ('\\');
+ switch (c)
+ {
+ case '\a':
+ putchar ('a');
+ break;
+ case '\f':
+ putchar ('f');
+ break;
+ case '\r':
+ putchar ('r');
+ break;
+ case '\t':
+ putchar ('t');
+ break;
+ case '\v':
+ putchar ('v');
+ break;
+ case '\n':
+ putchar ('n');
+ break;
+ case '\\':
+ putchar ('\\');
+ break;
+
+ default:
+ printf ("o%03o", (unsigned int) c);
+ }
+}
+
+static void
+debug_print_regex_pattern (const char *pat, size_t len)
+{
+ const char *p = pat;
+ while (len--)
+ {
+ if (*p == '/')
+ fputs ("\\/", stdout);
+ else
+ debug_print_char (*p);
+ ++p;
+ }
+}
+
+static void
+debug_print_regex_flags (const struct regex *r, bool addr)
+{
+ if (!r)
+ return;
+
+#ifdef REG_PERL
+ if (r->flags & REG_DOTALL) /* REG_PERL */
+ putchar ('s');
+ if (r->flags & REG_EXTENDED) /* REG_PERL */
+ putchar ('x');
+#endif
+
+ if (r->flags & REG_ICASE)
+ putchar (addr ? 'I' : 'i');
+ if (r->flags & REG_NEWLINE)
+ putchar (addr ? 'M' : 'm');
+}
+
+static void
+debug_print_regex (const struct regex *r)
+{
+ if (!r)
+ {
+ /* Previous Regex */
+ fputs ("//", stdout);
+ return;
+ }
+
+ putchar ('/');
+ debug_print_regex_pattern (r->re, r->sz);
+ putchar ('/');
+}
+
+static void
+debug_print_addr (const struct addr *a)
+{
+ if (!a)
+ return;
+ switch (a->addr_type)
+ {
+ case ADDR_IS_NULL:
+ fputs ("[ADDR-NULL]", stdout);
+ break;
+ case ADDR_IS_REGEX:
+ debug_print_regex (a->addr_regex);
+ debug_print_regex_flags (a->addr_regex, true);
+ break;
+ case ADDR_IS_NUM:
+ printf ("%lu", a->addr_number);
+ break;
+ case ADDR_IS_NUM_MOD:
+ printf ("%lu~%lu", a->addr_number, a->addr_step);
+ break;
+ case ADDR_IS_STEP:
+ printf ("+%lu", a->addr_step);
+ break;
+ case ADDR_IS_STEP_MOD:
+ printf ("~%lu", a->addr_step);
+ break;
+ case ADDR_IS_LAST:
+ putchar ('$');
+ break;
+ }
+}
+
+static void
+debug_print_subst_replacement (const struct replacement *r)
+{
+ enum replacement_types last_repl_type = REPL_ASIS;
+
+ if (!r)
+ return;
+
+ const struct replacement *p = r;
+ while (p)
+ {
+ if (p->repl_type != last_repl_type)
+ {
+ /* Special GNU replacements \E\U\u\L\l should be printed
+ BEFORE the 'prefix' .... the 'prefix' refers to being
+ before the backreference. */
+ putchar ('\\');
+ if (p->repl_type == 0)
+ putchar ('E');
+ else if (p->repl_type == REPL_UPPERCASE)
+ putchar ('U');
+ else if (p->repl_type == REPL_LOWERCASE)
+ putchar ('L');
+ else if ((p->repl_type & REPL_MODIFIERS) == REPL_UPPERCASE_FIRST)
+ putchar ('u');
+ else if ((p->repl_type & REPL_MODIFIERS) == REPL_LOWERCASE_FIRST)
+ putchar ('l');
+
+ last_repl_type = p->repl_type;
+ }
+
+ if (p->prefix_length)
+ fwrite (p->prefix, 1, p->prefix_length, stdout);
+
+ if (p->subst_id != -1)
+ {
+ if (p->subst_id == 0)
+ putchar ('&');
+ else
+ printf ("\\%d", p->subst_id);
+ }
+
+ p = p->next;
+ }
+}
+
+static void
+debug_print_output_file (const struct output *o)
+{
+ if (!o)
+ return;
+
+ fputs (o->name, stdout);
+}
+
+static void
+debug_print_subst (const struct subst *s)
+{
+ if (!s)
+ return;
+
+ debug_print_regex (s->regx);
+ debug_print_subst_replacement (s->replacement);
+ putchar ('/');
+
+ debug_print_regex_flags (s->regx, false);
+
+ if (s->global)
+ putchar ('g');
+ if (s->eval)
+ putchar ('e');
+ if (s->print)
+ putchar ('p');
+ if (s->numb)
+ printf ("%lu", s->numb);
+ if (s->outf)
+ {
+ putchar ('w');
+ debug_print_output_file (s->outf);
+ }
+}
+
+static void
+debug_print_translation (const struct sed_cmd *sc)
+{
+ unsigned int i;
+
+ if (mb_cur_max > 1)
+ {
+ /* multibyte translation */
+ putchar ('/');
+ for (i = 0; sc->x.translatemb[2 * i] != NULL; i++)
+ fputs (sc->x.translatemb[2 * i], stdout);
+ putchar ('/');
+ for (i = 0; sc->x.translatemb[2 * i] != NULL; i++)
+ fputs (sc->x.translatemb[2 * i + 1], stdout);
+ putchar ('/');
+ }
+ else
+ {
+ /* unibyte translation */
+ putchar ('/');
+ for (i = 0; i < 256; ++i)
+ if (sc->x.translate[i] != (unsigned char) i)
+ putchar ((unsigned char) i);
+ putchar ('/');
+ for (i = 0; i < 256; ++i)
+ if (sc->x.translate[i] != (unsigned char) i)
+ putchar (sc->x.translate[i]);
+ putchar ('/');
+ }
+}
+
+static void
+debug_print_function (const struct vector *program, const struct sed_cmd *sc)
+{
+ if (!sc)
+ return;
+
+ putchar (sc->cmd);
+
+ switch (sc->cmd) /* LCOV_EXCL_BR */
+ {
+ case '=':
+ break;
+
+ case ':':
+ printf ("%s", sc->x.label_name);
+ break;
+
+ case '{':
+ break;
+
+ case '}':
+ break;
+
+ case '#': /* LCOV_EXCL_LINE */
+ /* should not happen - discarded during compilation. */
+ assert (0); /* LCOV_EXCL_LINE */
+
+ case 'a':
+ case 'c':
+ case 'i':
+ fputs ("\\", stdout);
+ if (sc->x.cmd_txt.text_length)
+ fwrite (sc->x.cmd_txt.text, 1, sc->x.cmd_txt.text_length, stdout);
+ break;
+
+ case 'b':
+ case 't':
+ case 'T':
+ {
+ if (sc->x.jump_index < program->v_length)
+ {
+ const char *label_name = program->v[sc->x.jump_index].x.label_name;
+ if (label_name)
+ printf (" %s", label_name);
+ }
+ }
+ break;
+
+ case 'D':
+ break;
+
+ case 'd':
+ break;
+
+ case 'e':
+ putchar (' ');
+ fwrite (sc->x.cmd_txt.text, 1, sc->x.cmd_txt.text_length, stdout);
+ break;
+
+ case 'F':
+ break;
+
+ case 'g':
+ break;
+
+ case 'G':
+ break;
+
+ case 'h':
+ break;
+
+ case 'H':
+ break;
+
+ /* 'i' is lumped above with 'a' and 'c' */
+
+ case 'L':
+ case 'l':
+ case 'q':
+ case 'Q':
+ if (sc->x.int_arg != -1)
+ printf (" %d", sc->x.int_arg);
+ break;
+
+ case 'n':
+ break;
+
+ case 'N':
+ break;
+
+ case 'P':
+ break;
+
+ case 'p':
+ break;
+
+ /* 'q','Q' are lumped above with 'L' and 'l' */
+
+ case 'r':
+ putchar (' ');
+ fputs (sc->x.fname, stdout);
+ break;
+
+ case 'R':
+ putchar (' ');
+ fputs (sc->x.inf->name, stdout);
+ break;
+
+ case 's':
+ debug_print_subst (sc->x.cmd_subst);
+ break;
+
+ /* 't','T' are lumped above with 'b' */
+
+ case 'v': /* LCOV_EXCL_LINE */
+ /* should not happen - handled during compilation then discarded. */
+ assert (0); /* LCOV_EXCL_LINE */
+
+ case 'W':
+ debug_print_output_file (sc->x.outf);
+ break;
+
+ case 'w':
+ debug_print_output_file (sc->x.outf);
+ break;
+
+ case 'x':
+ break;
+
+ case 'y':
+ debug_print_translation (sc);
+ break;
+
+ case 'z':
+ break;
+
+ default: /* LCOV_EXCL_LINE */
+ /* should not happen - unless missed a sed command. */
+ assert (0); /* LCOV_EXCL_LINE */
+ }
+}
+
+void
+debug_print_command (const struct vector *program, const struct sed_cmd *sc)
+{
+ bool addr_bang;
+ if (!program)
+ return;
+
+ if (sc->cmd == '}')
+ --block_level;
+
+ for (int j = 0; j < block_level; ++j)
+ fputs (" ", stdout);
+
+ debug_print_addr (sc->a1);
+ if (sc->a2)
+ putchar (',');
+ debug_print_addr (sc->a2);
+
+ addr_bang = sc->addr_bang;
+ /* Implmentation detail: GNU Sed implements beginning of block
+ by negating the matched address and jumping if there's no match. */
+ if (sc->cmd == '{')
+ addr_bang = !addr_bang;
+ if (addr_bang)
+ putchar ('!');
+
+ if (sc->a1 || sc->a2)
+ putchar (' ');
+
+ debug_print_function (program, sc);
+
+ putchar ('\n');
+
+ if (sc->cmd == '{')
+ ++block_level;
+}
+
+void
+debug_print_program (const struct vector *program)
+{
+ if (!program)
+ return;
+
+ block_level = 1;
+ puts ("SED PROGRAM:");
+ for (size_t i = 0; i < program->v_length; ++i)
+ debug_print_command (program, &program->v[i]);
+ block_level = 0;
+}
diff --git a/sed/execute.c b/sed/execute.c
index 2804c5e..b39bab4 100644
--- a/sed/execute.c
+++ b/sed/execute.c
@@ -12,10 +12,8 @@
GNU 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, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
+ along with this program; If not, see <https://www.gnu.org/licenses/>. */
-#undef EXPERIMENTAL_DASH_N_OPTIMIZATION /*don't use -- is very buggy*/
#define INITIAL_BUFFER_SIZE 50
#define FREAD_BUFFER_SIZE 8192
@@ -36,6 +34,8 @@
#include <selinux/context.h>
#include "acl.h"
#include "ignore-value.h"
+#include "progname.h"
+#include "xalloc.h"
/* The number of extra bytes that must be allocated/usable, beyond
the declared "end" of each line buffer that may be passed to
@@ -123,7 +123,6 @@ static struct line buffer;
static struct append_queue *append_head = NULL;
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
@@ -136,7 +135,7 @@ resize_line (struct line *lb, size_t len)
* remove it. */
if (inactive > lb->alloc * 2)
{
- memmove(lb->text, lb->active, lb->length);
+ memmove (lb->text, lb->active, lb->length);
lb->alloc += lb->active - lb->text;
lb->active = lb->text;
inactive = 0;
@@ -151,19 +150,19 @@ resize_line (struct line *lb, size_t len)
if (lb->alloc < INITIAL_BUFFER_SIZE)
lb->alloc = INITIAL_BUFFER_SIZE;
- lb->text = REALLOC(lb->text, inactive + lb->alloc + DFA_SLOP, 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 *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;
if (to->alloc < new_length)
- resize_line(to, new_length);
- memcpy(to->active + to->length, string, length);
+ resize_line (to, new_length);
+ memcpy (to->active + to->length, string, length);
to->length = new_length;
if (mb_cur_max > 1 && !is_utf8)
@@ -188,21 +187,21 @@ str_append(struct line *to, const char *string, size_t length)
}
static void
-str_append_modified(struct line *to, const char *string, size_t length,
- enum replacement_types type)
+str_append_modified (struct line *to, const char *string, size_t length,
+ enum replacement_types type)
{
mbstate_t from_stat;
if (type == REPL_ASIS)
{
- str_append(to, string, length);
+ str_append (to, string, length);
return;
}
if (to->alloc - to->length < length * mb_cur_max)
- resize_line(to, to->length + length * mb_cur_max);
+ resize_line (to, to->length + length * mb_cur_max);
- memcpy (&from_stat, &to->mbstate, sizeof(mbstate_t));
+ memcpy (&from_stat, &to->mbstate, sizeof (mbstate_t));
while (length)
{
wchar_t wc;
@@ -214,7 +213,7 @@ str_append_modified(struct line *to, const char *string, size_t length,
type &= ~(REPL_LOWERCASE_FIRST | REPL_UPPERCASE_FIRST);
if (type == REPL_ASIS)
{
- str_append(to, string, length);
+ str_append (to, string, length);
return;
}
@@ -228,7 +227,7 @@ str_append_modified(struct line *to, const char *string, size_t length,
if (n == 0 || n == (size_t) -2)
{
/* L'\0' or an incomplete sequence: copy it manually. */
- str_append(to, string, length);
+ str_append (to, string, length);
return;
}
@@ -238,9 +237,9 @@ str_append_modified(struct line *to, const char *string, size_t length,
if (type & (REPL_UPPERCASE_FIRST | REPL_LOWERCASE_FIRST))
{
if (type & REPL_UPPERCASE_FIRST)
- wc = towupper(wc);
+ wc = towupper (wc);
else
- wc = towlower(wc);
+ wc = towlower (wc);
type &= ~(REPL_LOWERCASE_FIRST | REPL_UPPERCASE_FIRST);
if (type == REPL_ASIS)
@@ -254,14 +253,14 @@ str_append_modified(struct line *to, const char *string, size_t length,
_("case conversion produced an invalid character"));
abort ();
}
- str_append(to, string, length);
+ str_append (to, string, length);
return;
}
}
else if (type & REPL_UPPERCASE)
- wc = towupper(wc);
+ wc = towupper (wc);
else
- wc = towlower(wc);
+ wc = towlower (wc);
/* Copy the new wide character to the end of the string. */
n = WCRTOMB (to->active + to->length, wc, &to->mbstate);
@@ -277,9 +276,9 @@ str_append_modified(struct line *to, const char *string, size_t length,
/* Initialize a "struct line" buffer. Copy multibyte state from `state'
if not null. */
static void
-line_init(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 + DFA_SLOP, char);
+ buf->text = XCALLOC (initial_size + DFA_SLOP, char);
buf->active = buf->text;
buf->alloc = initial_size;
buf->length = 0;
@@ -294,10 +293,10 @@ line_init(struct line *buf, struct line *state, size_t initial_size)
/* Reset a "struct line" buffer to length zero. Copy multibyte state from
`state' if not null. */
static void
-line_reset(struct line *buf, struct line *state)
+line_reset (struct line *buf, struct line *state)
{
if (buf->alloc == 0)
- line_init(buf, state, INITIAL_BUFFER_SIZE);
+ line_init (buf, state, INITIAL_BUFFER_SIZE);
else
{
buf->length = 0;
@@ -312,7 +311,7 @@ line_reset(struct line *buf, struct line *state)
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)
+line_copy (struct line *from, struct line *to, int state)
{
/* Remove the inactive portion in the destination buffer. */
to->alloc += to->active - to->text;
@@ -326,17 +325,17 @@ line_copy(struct line *from, struct line *to, int state)
to->alloc = INITIAL_BUFFER_SIZE;
/* Use free()+MALLOC() instead of REALLOC() to
avoid unnecessary copying of old text. */
- free(to->text);
- to->text = MALLOC(to->alloc + DFA_SLOP, char);
+ free (to->text);
+ to->text = XCALLOC (to->alloc + DFA_SLOP, char);
}
to->active = to->text;
to->length = from->length;
to->chomped = from->chomped;
- memcpy(to->active, from->active, from->length);
+ memcpy (to->active, from->active, from->length);
if (state)
- memcpy(&to->mbstate, &from->mbstate, sizeof (from->mbstate));
+ memcpy (&to->mbstate, &from->mbstate, sizeof (from->mbstate));
}
/* Append the contents of the line `from' to the line `to'.
@@ -344,8 +343,8 @@ line_copy(struct line *from, struct line *to, int state)
static void
line_append (struct line *from, struct line *to, int state)
{
- str_append(to, &buffer_delimiter, 1);
- str_append(to, from->active, from->length);
+ str_append (to, &buffer_delimiter, 1);
+ str_append (to, from->active, from->length);
to->chomped = from->chomped;
if (state)
@@ -361,28 +360,27 @@ line_exchange (struct line *a, struct line *b, int state)
if (state)
{
- memcpy(&t, a, sizeof (struct line));
- memcpy( a, b, sizeof (struct line));
- memcpy( b, &t, sizeof (struct line));
+ memcpy (&t, a, sizeof (struct line));
+ memcpy ( a, b, sizeof (struct line));
+ memcpy ( b, &t, sizeof (struct line));
}
else
{
- memcpy(&t, a, SIZEOF_LINE);
- memcpy( a, b, SIZEOF_LINE);
- memcpy( b, &t, SIZEOF_LINE);
+ memcpy (&t, a, SIZEOF_LINE);
+ memcpy ( a, b, SIZEOF_LINE);
+ memcpy ( b, &t, SIZEOF_LINE);
}
}
-
/* dummy function to simplify read_pattern_space() */
static bool
-read_always_fail(struct input *input _GL_UNUSED)
+read_always_fail (struct input *input _GL_UNUSED)
{
return false;
}
static bool
-read_file_line(struct input *input)
+read_file_line (struct input *input)
{
static char *b;
static size_t blen;
@@ -397,49 +395,48 @@ read_file_line(struct input *input)
else
line.chomped = false;
- str_append(&line, b, result);
+ str_append (&line, b, result);
return true;
}
-
static inline void
-output_missing_newline(struct output *outf)
+output_missing_newline (struct output *outf)
{
if (outf->missing_newline)
{
- ck_fwrite(&buffer_delimiter, 1, 1, outf->fp);
+ ck_fwrite (&buffer_delimiter, 1, 1, outf->fp);
outf->missing_newline = false;
}
}
static inline void
-flush_output(FILE *fp)
+flush_output (FILE *fp)
{
- if (fp != stdout || unbuffered)
- ck_fflush(fp);
+ if (unbuffered)
+ ck_fflush (fp);
}
static void
-output_line(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;
- output_missing_newline(outf);
+ output_missing_newline (outf);
if (length)
- ck_fwrite(text, 1, length, outf->fp);
+ ck_fwrite (text, 1, length, outf->fp);
if (nl)
- ck_fwrite(&buffer_delimiter, 1, 1, outf->fp);
+ ck_fwrite (&buffer_delimiter, 1, 1, outf->fp);
else
outf->missing_newline = true;
- flush_output(outf->fp);
+ flush_output (outf->fp);
}
static struct append_queue *
-next_append_slot(void)
+next_append_slot (void)
{
- struct append_queue *n = MALLOC(1, struct append_queue);
+ struct append_queue *n = XCALLOC (1, struct append_queue);
n->fname = NULL;
n->text = NULL;
@@ -455,31 +452,31 @@ next_append_slot(void)
}
static void
-release_append_queue(void)
+release_append_queue (void)
{
struct append_queue *p, *q;
for (p=append_head; p; p=q)
{
if (p->free)
- free(p->text);
+ free (p->text);
q = p->next;
- free(p);
+ free (p);
}
append_head = append_tail = NULL;
}
static void
-dump_append_queue(void)
+dump_append_queue (void)
{
struct append_queue *p;
- output_missing_newline(&output_file);
+ output_missing_newline (&output_file);
for (p=append_head; p; p=p->next)
{
if (p->text)
- ck_fwrite(p->text, 1, p->textlen, output_file.fp);
+ ck_fwrite (p->text, 1, p->textlen, output_file.fp);
if (p->fname)
{
@@ -491,39 +488,38 @@ dump_append_queue(void)
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);
+ 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);
+ 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);
- release_append_queue();
+ flush_output (output_file.fp);
+ release_append_queue ();
}
-
/* Compute the name of the backup file for in-place editing */
static char *
-get_backup_file_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);
+ int name_length = strlen (name), backup_length = strlen (in_place_extension);
/* Compute the length of the backup file */
for (asterisk = in_place_extension - 1, old_asterisk = asterisk + 1;
- (asterisk = strchr(old_asterisk, '*'));
+ (asterisk = strchr (old_asterisk, '*'));
old_asterisk = asterisk + 1)
backup_length += name_length - 1;
- p = backup = xmalloc(backup_length + 1);
+ p = backup = xmalloc (backup_length + 1);
/* Each iteration gobbles up to an asterisk */
for (asterisk = in_place_extension - 1, old_asterisk = asterisk + 1;
- (asterisk = strchr(old_asterisk, '*'));
+ (asterisk = strchr (old_asterisk, '*'));
old_asterisk = asterisk + 1)
{
memcpy (p, old_asterisk, asterisk - old_asterisk);
@@ -539,14 +535,14 @@ get_backup_file_name(const char *name)
/* Initialize a struct input for the named file. */
static void
-open_next_file(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 */
+ clearerr (stdin); /* clear any stale EOF indication */
#if defined WIN32 || defined _WIN32 || defined __CYGWIN__ \
|| defined MSDOS || defined __EMX__
input->fp = ck_fdopen (fileno (stdin), "stdin", read_mode, false);
@@ -562,7 +558,8 @@ open_next_file(const char *name, struct input *input)
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);
+ fprintf (stderr, _("%s: can't read %s: %s\n"), program_name,
+ name, ptr);
input->read_fn = read_always_fail; /* a redundancy */
++input->bad_count;
return;
@@ -580,19 +577,19 @@ open_next_file(const char *name, struct input *input)
memset (&old_fscreatecon, 0, sizeof (old_fscreatecon));
/* get the base name */
- tmpdir = ck_strdup(input->in_file_name);
- if ((p = strrchr(tmpdir, '/')))
+ tmpdir = xstrdup (input->in_file_name);
+ if ((p = strrchr (tmpdir, '/')))
*p = 0;
else
- strcpy(tmpdir, ".");
+ strcpy (tmpdir, ".");
if (isatty (fileno (input->fp)))
- panic(_("couldn't edit %s: is a terminal"), input->in_file_name);
+ panic (_("couldn't edit %s: is a terminal"), input->in_file_name);
input_fd = fileno (input->fp);
fstat (input_fd, &input->st);
if (!S_ISREG (input->st.st_mode))
- panic(_("couldn't edit %s: not a regular file"), input->in_file_name);
+ panic (_("couldn't edit %s: not a regular file"), input->in_file_name);
if (is_selinux_enabled () > 0)
{
@@ -605,7 +602,7 @@ open_next_file(const char *name, struct input *input)
if (setfscreatecon (con) < 0)
fprintf (stderr, _("%s: warning: failed to set default" \
" file creation context to %s: %s"),
- myname, con, strerror (errno));
+ program_name, con, strerror (errno));
freecon (con);
}
else
@@ -613,7 +610,7 @@ open_next_file(const char *name, struct input *input)
if (errno != ENOSYS)
fprintf (stderr, _("%s: warning: failed to get" \
" security context of %s: %s"),
- myname, input->in_file_name, strerror (errno));
+ program_name, input->in_file_name, strerror (errno));
}
}
@@ -630,8 +627,8 @@ open_next_file(const char *name, struct input *input)
}
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
{
@@ -644,7 +641,7 @@ open_next_file(const char *name, struct input *input)
/* Clean up an input stream that we are done with. */
static void
-closedown(struct input *input)
+closedown (struct input *input)
{
input->read_fn = read_always_fail;
if (!input->fp)
@@ -670,9 +667,9 @@ closedown(struct input *input)
ck_fclose (input->fp);
ck_fclose (output_file.fp);
- if (strcmp(in_place_extension, "*") != 0)
+ if (strcmp (in_place_extension, "*") != 0)
{
- char *backup_file_name = get_backup_file_name(target_name);
+ char *backup_file_name = get_backup_file_name (target_name);
ck_rename (target_name, backup_file_name, input->out_file_name);
free (backup_file_name);
}
@@ -689,7 +686,7 @@ closedown(struct input *input)
/* Reset range commands so that they are marked as non-matching */
static void
-reset_addresses(struct vector *vec)
+reset_addresses (struct vector *vec)
{
struct sed_cmd *cur_cmd;
int n;
@@ -706,10 +703,10 @@ reset_addresses(struct vector *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 *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();
+ dump_append_queue ();
replaced = false;
if (!append)
line.length = 0;
@@ -717,7 +714,7 @@ read_pattern_space(struct input *input, struct vector *the_program, int append)
while ( ! (*input->read_fn)(input) )
{
- closedown(input);
+ closedown (input);
if (!*input->file_list)
return false;
@@ -745,23 +742,22 @@ read_pattern_space(struct input *input, struct vector *the_program, int append)
return true;
}
-
static bool
-last_file_with_data_p(struct input *input)
+last_file_with_data_p (struct input *input)
{
for (;;)
{
int ch;
- closedown(input);
+ closedown (input);
if (!*input->file_list)
return true;
- open_next_file(*input->file_list++, input);
+ open_next_file (*input->file_list++, input);
if (input->fp)
{
- if ((ch = getc(input->fp)) != EOF)
+ if ((ch = getc (input->fp)) != EOF)
{
- ungetc(ch, input->fp);
+ ungetc (ch, input->fp);
return false;
}
}
@@ -770,26 +766,26 @@ last_file_with_data_p(struct input *input)
/* Determine if we match the `$' address. */
static bool
-test_eof(struct input *input)
+test_eof (struct input *input)
{
int ch;
if (buffer.length)
return false;
if (!input->fp)
- return separate_files || last_file_with_data_p(input);
- if (feof(input->fp))
- return separate_files || last_file_with_data_p(input);
- if ((ch = getc(input->fp)) == EOF)
- return separate_files || last_file_with_data_p(input);
- ungetc(ch, input->fp);
+ return separate_files || last_file_with_data_p (input);
+ if (feof (input->fp))
+ return separate_files || last_file_with_data_p (input);
+ if ((ch = getc (input->fp)) == EOF)
+ return separate_files || last_file_with_data_p (input);
+ ungetc (ch, input->fp);
return false;
}
/* Return non-zero if the current line matches the address
pointed to by `addr'. */
static bool
-match_an_address_p(struct addr *addr, struct input *input)
+match_an_address_p (struct addr *addr, struct input *input)
{
switch (addr->addr_type)
{
@@ -797,7 +793,7 @@ match_an_address_p(struct addr *addr, struct input *input)
return true;
case ADDR_IS_REGEX:
- return match_regex(addr->addr_regex, line.active, line.length, 0,
+ return match_regex (addr->addr_regex, line.active, line.length, 0,
NULL, 0);
case ADDR_IS_NUM_MOD:
@@ -813,14 +809,14 @@ match_an_address_p(struct addr *addr, struct input *input)
return (addr->addr_number <= input->line_number);
case ADDR_IS_LAST:
- return test_eof(input);
+ return test_eof (input);
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");
+ panic ("INTERNAL ERROR: bad address type");
}
/*NOTREACHED*/
return false;
@@ -828,7 +824,7 @@ match_an_address_p(struct addr *addr, struct input *input)
/* return non-zero if current address is valid for cmd */
static bool
-match_address_p(struct sed_cmd *cmd, struct input *input)
+match_address_p (struct sed_cmd *cmd, struct input *input)
{
if (!cmd->a1)
return true;
@@ -836,7 +832,7 @@ match_address_p(struct sed_cmd *cmd, struct input *input)
if (cmd->range_state != RANGE_ACTIVE)
{
if (!cmd->a2)
- return match_an_address_p(cmd->a1, input);
+ 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
@@ -849,7 +845,7 @@ match_address_p(struct sed_cmd *cmd, struct input *input)
}
else
{
- if (!match_an_address_p(cmd->a1, input))
+ if (!match_an_address_p (cmd->a1, input))
return false;
}
@@ -865,7 +861,7 @@ match_address_p(struct sed_cmd *cmd, struct input *input)
if (input->line_number >= cmd->a2->addr_number)
cmd->range_state = RANGE_CLOSED;
return (input->line_number <= cmd->a2->addr_number
- || match_an_address_p(cmd->a1, input));
+ || match_an_address_p (cmd->a1, input));
case ADDR_IS_STEP:
cmd->a2->addr_number = input->line_number + cmd->a2->addr_step;
return true;
@@ -894,15 +890,14 @@ match_address_p(struct sed_cmd *cmd, struct input *input)
}
/* Other addresses are treated as usual. */
- if (match_an_address_p(cmd->a2, input))
+ if (match_an_address_p (cmd->a2, input))
cmd->range_state = RANGE_CLOSED;
return true;
}
-
static void
-do_list(int line_len)
+do_list (int line_len)
{
unsigned char *p = (unsigned char *)line.active;
countT len = line.length;
@@ -912,7 +907,7 @@ do_list(int line_len)
size_t olen;
FILE *fp = output_file.fp;
- output_missing_newline(&output_file);
+ output_missing_newline (&output_file);
for (; len--; ++p) {
o = obuf;
@@ -920,9 +915,9 @@ do_list(int line_len)
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)) {
+ if (isascii (*p) && ISPRINT (*p)) {
#else
- if (ISPRINT(*p)) {
+ if (ISPRINT (*p)) {
#endif
*o++ = *p;
if (*p == '\\')
@@ -942,22 +937,22 @@ do_list(int line_len)
case '\t': *o++ = 't'; break;
case '\v': *o++ = 'v'; break;
default:
- sprintf(o, "%03o", *p);
- o += strlen(o);
+ sprintf (o, "%03o", *p);
+ o += strlen (o);
break;
}
}
olen = o - obuf;
if (width+olen >= line_len && line_len > 0) {
- ck_fwrite("\\", 1, 1, fp);
- ck_fwrite(&buffer_delimiter, 1, 1, fp);
+ ck_fwrite ("\\", 1, 1, fp);
+ ck_fwrite (&buffer_delimiter, 1, 1, fp);
width = 0;
}
- ck_fwrite(obuf, 1, olen, fp);
+ ck_fwrite (obuf, 1, olen, fp);
width += olen;
}
- ck_fwrite("$", 1, 1, fp);
- ck_fwrite(&buffer_delimiter, 1, 1, fp);
+ ck_fwrite ("$", 1, 1, fp);
+ ck_fwrite (&buffer_delimiter, 1, 1, fp);
flush_output (fp);
}
@@ -982,12 +977,12 @@ static void append_replacement (struct line *buf, struct replacement *p,
repl_mod = 0;
if (p->prefix_length)
{
- str_append_modified(buf, p->prefix, p->prefix_length,
- curr_type);
+ str_append_modified (buf, p->prefix, p->prefix_length,
+ curr_type);
curr_type &= ~REPL_MODIFIERS;
}
- if (0 <= i)
+ if (0 <= i && i < regs->num_regs)
{
if (regs->end[i] == regs->start[i] && p->repl_type & REPL_MODIFIERS)
/* Save this modifier, we shall apply it later.
@@ -996,15 +991,15 @@ static void append_replacement (struct line *buf, struct replacement *p,
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);
+ 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 *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 */
@@ -1013,14 +1008,35 @@ do_subst(struct subst *sub)
static struct re_registers regs;
- line_reset(&s_accum, &line);
+ line_reset (&s_accum, &line);
/* 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))
+ if (!match_regex (sub->regx, line.active, line.length, start,
+ &regs, sub->max_id + 1))
return;
+ if (debug)
+ {
+ if (regs.num_regs>0 && regs.start[0] != -1)
+ puts ("MATCHED REGEX REGISTERS");
+
+ for (int i = 0; i < regs.num_regs; ++i)
+ {
+ if (regs.start[i] == -1)
+ break;
+
+ printf (" regex[%d] = %d-%d '", i,
+ (int)regs.start[i], (int)regs.end[i]);
+
+ if (regs.start[i] != regs.end[i])
+ fwrite (line.active + regs.start[i], regs.end[i] -regs.start[i],
+ 1, stdout);
+
+ puts ("'");
+ }
+ }
+
if (!sub->replacement && sub->numb <= 1)
{
if (regs.start[0] == 0 && !sub->global)
@@ -1050,7 +1066,10 @@ do_subst(struct 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);
+ start = offset;
+ }
/* 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
@@ -1084,7 +1103,7 @@ do_subst(struct subst *sub)
break;
}
- str_append(&s_accum, line.active + offset, matched);
+ str_append (&s_accum, line.active + offset, matched);
}
/* Start after the match. last_end is the real end of the matched
@@ -1095,17 +1114,17 @@ do_subst(struct subst *sub)
}
while (again
&& start <= line.length
- && match_regex(sub->regx, line.active, line.length, start,
- &regs, sub->max_id + 1));
+ && 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)
- str_append(&s_accum, line.active + start, line.length-start);
+ str_append (&s_accum, line.active + start, line.length-start);
s_accum.chomped = line.chomped;
/* Exchange line and s_accum. This can be much cheaper
than copying s_accum.active into line.text (for huge lines). */
- line_exchange(&line, &s_accum, false);
+ line_exchange (&line, &s_accum, false);
/* Finish up. */
if (count < sub->numb)
@@ -1113,25 +1132,25 @@ do_subst(struct subst *sub)
post_subst:
if (sub->print & 1)
- output_line(line.active, line.length, line.chomped, &output_file);
+ output_line (line.active, line.length, line.chomped, &output_file);
if (sub->eval)
{
#ifdef HAVE_POPEN
FILE *pipe_fp;
- line_reset(&s_accum, NULL);
+ line_reset (&s_accum, NULL);
str_append (&line, "", 1);
- pipe_fp = popen(line.active, "r");
+ 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);
+ int n = fread (buf, sizeof (char), 4096, pipe_fp);
if (n > 0)
- str_append(&s_accum, buf, n);
+ str_append (&s_accum, buf, n);
}
pclose (pipe_fp);
@@ -1139,74 +1158,23 @@ do_subst(struct subst *sub)
/* 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_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"));
+ panic (_("option `e' not supported"));
#endif
}
if (sub->print & 2)
- output_line(line.active, line.length, line.chomped, &output_file);
+ output_line (line.active, line.length, line.chomped, &output_file);
if (sub->outf)
- output_line(line.active, line.length, line.chomped, sub->outf);
-}
-
-#ifdef EXPERIMENTAL_DASH_N_OPTIMIZATION
-/* Used to attempt a simple-minded optimization. */
-
-static countT branches;
-
-static countT
-count_branches(program)
- struct vector *program;
-{
- struct sed_cmd *cur_cmd = program->v;
- countT isn_cnt = program->v_length;
- countT cnt = 0;
-
- while (isn_cnt-- > 0)
- {
- switch (cur_cmd->cmd)
- {
- case 'b':
- case 't':
- case 'T':
- case '{':
- ++cnt;
- }
- }
- return cnt;
-}
-
-static struct sed_cmd *
-shrink_program(vec, cur_cmd)
- struct vector *vec;
- struct sed_cmd *cur_cmd;
-{
- struct sed_cmd *v = vec->v;
- struct sed_cmd *last_cmd = v + vec->v_length;
- struct sed_cmd *p;
- countT cmd_cnt;
-
- for (p=v; p < cur_cmd; ++p)
- if (p->cmd != '#')
- memcpy(v++, p, sizeof *v);
- cmd_cnt = v - vec->v;
-
- for (; p < last_cmd; ++p)
- if (p->cmd != '#')
- memcpy(v++, p, sizeof *v);
- vec->v_length = v - vec->v;
-
- return (0 < vec->v_length) ? (vec->v + cmd_cnt) : (struct sed_cmd *)0;
+ output_line (line.active, line.length, line.chomped, sub->outf);
}
-#endif /*EXPERIMENTAL_DASH_N_OPTIMIZATION*/
/* Translate the global input LINE via TRANS.
This function handles the multi-byte case. */
@@ -1228,7 +1196,7 @@ translate_mb (char *const *trans)
/* `i' indicate i-th translate pair. */
for (i = 0; trans[2*i] != NULL; i++)
{
- if (strncmp(line.active + idx, trans[2*i], mbclen) == 0)
+ if (STREQ_LEN (line.active + idx, trans[2*i], mbclen))
{
bool move_remain_buffer = false;
const char *tr = trans[2*i+1];
@@ -1242,7 +1210,7 @@ translate_mb (char *const *trans)
if (line.alloc < new_len)
{
/* And we must resize the buffer. */
- resize_line(&line, new_len);
+ resize_line (&line, new_len);
}
move_remain_buffer = true;
}
@@ -1259,11 +1227,11 @@ translate_mb (char *const *trans)
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);
+ memmove (move_to, move_from, move_len);
line.length += move_offset;
idx += move_offset;
}
- memcpy(line.active + prev_idx, trans[2*i+1],
+ memcpy (line.active + prev_idx, trans[2*i+1],
trans_len);
break;
}
@@ -1272,10 +1240,39 @@ translate_mb (char *const *trans)
}
}
+static void
+debug_print_end_of_cycle (void)
+{
+ puts ("END-OF-CYCLE:");
+}
+
+static void
+debug_print_input (const struct input *input)
+{
+ bool is_stdin = (input->fp && fileno (input->fp) == 0);
+
+ printf ("INPUT: '%s' line %lu\n",
+ is_stdin?"STDIN":input->in_file_name,
+ input->line_number);
+}
+
+static void
+debug_print_line (struct line *ln)
+{
+ const char *src = ln->active ? ln->active : ln->text;
+ size_t l = ln->length;
+ const char *p = src;
+
+ fputs ( (ln == &hold) ? "HOLD: ":"PATTERN: ", stdout);
+ while (l--)
+ debug_print_char (*p++);
+ putchar ('\n');
+}
+
/* Execute the program `vec' on the current input line.
Return exit status if caller should quit, -1 otherwise. */
static int
-execute_program(struct vector *vec, struct input *input)
+execute_program (struct vector *vec, struct input *input)
{
struct sed_cmd *cur_cmd;
struct sed_cmd *end_cmd;
@@ -1284,13 +1281,19 @@ execute_program(struct vector *vec, struct input *input)
end_cmd = vec->v + vec->v_length;
while (cur_cmd < end_cmd)
{
- if (match_address_p(cur_cmd, input) != cur_cmd->addr_bang)
+ if (debug)
+ {
+ fputs ("COMMAND: ", stdout);
+ debug_print_command (vec, cur_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();
+ struct append_queue *aq = next_append_slot ();
aq->text = cur_cmd->x.cmd_txt.text;
aq->textlen = cur_cmd->x.cmd_txt.text_length;
}
@@ -1309,18 +1312,20 @@ execute_program(struct vector *vec, struct input *input)
case 'c':
if (cur_cmd->range_state != RANGE_ACTIVE)
- output_line(cur_cmd->x.cmd_txt.text,
+ 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). */
FALLTHROUGH;
case 'd':
+ if (debug)
+ debug_print_end_of_cycle ();
return -1;
case 'D':
{
- char *p = memchr(line.active, buffer_delimiter, line.length);
+ char *p = memchr (line.active, buffer_delimiter, line.length);
if (!p)
return -1;
@@ -1331,60 +1336,64 @@ execute_program(struct vector *vec, struct input *input)
/* reset to start next cycle without reading a new line: */
cur_cmd = vec->v;
+
+ if (debug)
+ debug_print_line (&line);
continue;
}
case 'e': {
#ifndef HAVE_POPEN
- panic(_("`e' command not supported"));
+ panic (_("`e' command not supported"));
#else
FILE *pipe_fp;
int cmd_length = cur_cmd->x.cmd_txt.text_length;
- line_reset(&s_accum, NULL);
+ line_reset (&s_accum, NULL);
if (!cmd_length)
{
str_append (&line, "", 1);
- pipe_fp = popen(line.active, "r");
+ 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);
+ pipe_fp = popen (cur_cmd->x.cmd_txt.text, "r");
+ output_missing_newline (&output_file);
}
if (pipe_fp == NULL)
- panic(_("error in subprocess"));
+ panic (_("error in subprocess"));
{
char buf[4096];
int n;
while (!feof (pipe_fp))
- if ((n = fread (buf, sizeof(char), 4096, pipe_fp)) > 0)
+ if ((n = fread (buf, sizeof (char), 4096, pipe_fp)) > 0)
{
if (!cmd_length)
- str_append(&s_accum, buf, n);
+ str_append (&s_accum, buf, n);
else
- ck_fwrite(buf, 1, n, output_file.fp);
+ 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)
+ 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);
+ line_exchange (&line, &s_accum, true);
}
else
- flush_output(output_file.fp);
+ flush_output (output_file.fp);
}
#endif
break;
@@ -1398,7 +1407,9 @@ execute_program(struct vector *vec, struct input *input)
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);
+ line_copy (&hold, &line, true);
+ if (debug)
+ debug_print_line (&hold);
break;
case 'G':
@@ -1407,69 +1418,87 @@ execute_program(struct vector *vec, struct input *input)
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);
+ line_append (&hold, &line, true);
+ if (debug)
+ debug_print_line (&line);
break;
case 'h':
/* Here, it is ok to have true. */
- line_copy(&line, &hold, true);
+ line_copy (&line, &hold, true);
+ if (debug)
+ debug_print_line (&hold);
break;
case 'H':
/* See comment above for 'G' regarding the third parameter. */
- line_append(&line, &hold, true);
+ line_append (&line, &hold, true);
+ if (debug)
+ debug_print_line (&hold);
break;
case 'i':
- output_line(cur_cmd->x.cmd_txt.text,
+ 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
+ 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;
+ output_line (line.active, line.length, line.chomped,
+ &output_file);
+ if (test_eof (input) || !read_pattern_space (input, vec, false))
+ {
+ if (debug)
+ debug_print_end_of_cycle ();
+ return -1;
+ }
+
+ if (debug)
+ debug_print_line (&line);
break;
case 'N':
- str_append(&line, &buffer_delimiter, 1);
+ str_append (&line, &buffer_delimiter, 1);
- if (test_eof(input) || !read_pattern_space(input, vec, true))
+ if (test_eof (input) || !read_pattern_space (input, vec, true))
{
+ if (debug)
+ debug_print_end_of_cycle ();
line.length--;
if (posixicity == POSIXLY_EXTENDED && !no_default_output)
- output_line(line.active, line.length, line.chomped,
- &output_file);
+ output_line (line.active, line.length, line.chomped,
+ &output_file);
return -1;
}
+ if (debug)
+ debug_print_line (&line);
break;
case 'p':
- output_line(line.active, line.length, line.chomped, &output_file);
+ 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);
+ 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_line (line.active, line.length, line.chomped,
&output_file);
- dump_append_queue();
+ dump_append_queue ();
FALLTHROUGH;
case 'Q':
@@ -1478,13 +1507,13 @@ execute_program(struct vector *vec, struct input *input)
case 'r':
if (cur_cmd->x.fname)
{
- struct append_queue *aq = next_append_slot();
+ 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))
+ if (cur_cmd->x.inf->fp && !feof (cur_cmd->x.inf->fp))
{
struct append_queue *aq;
size_t buflen;
@@ -1492,19 +1521,28 @@ execute_program(struct vector *vec, struct input *input)
int result;
result = ck_getdelim (&text, &buflen, buffer_delimiter,
- cur_cmd->x.fp);
+ cur_cmd->x.inf->fp);
if (result != EOF)
{
- aq = next_append_slot();
+ aq = next_append_slot ();
aq->free = true;
aq->text = text;
aq->textlen = result;
}
+ else
+ {
+ /* The external input file (for R command) reached EOF,
+ the 'text' buffer will not be added to the append queue
+ so release it */
+ free (text);
+ }
}
break;
case 's':
- do_subst(cur_cmd->x.cmd_subst);
+ do_subst (cur_cmd->x.cmd_subst);
+ if (debug)
+ debug_print_line (&line);
break;
case 't':
@@ -1527,23 +1565,28 @@ execute_program(struct vector *vec, struct input *input)
break;
case 'w':
- if (cur_cmd->x.fp)
- output_line(line.active, line.length,
+ if (cur_cmd->x.outf->fp)
+ output_line (line.active, line.length,
line.chomped, cur_cmd->x.outf);
break;
case 'W':
- if (cur_cmd->x.fp)
+ if (cur_cmd->x.outf->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);
+ 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);
+ line_exchange (&line, &hold, false);
+ if (debug)
+ {
+ debug_print_line (&line);
+ debug_print_line (&hold);
+ }
break;
case 'y':
@@ -1556,113 +1599,67 @@ execute_program(struct vector *vec, struct input *input)
for (e=p+line.length; p<e; ++p)
*p = cur_cmd->x.translate[*p];
}
+ if (debug)
+ debug_print_line (&line);
break;
case 'z':
line.length = 0;
+ if (debug)
+ debug_print_line (&line);
break;
case '=':
- output_missing_newline(&output_file);
- fprintf(output_file.fp, "%lu%c",
- (unsigned long)input->line_number,
- buffer_delimiter);
- flush_output(output_file.fp);
+ output_missing_newline (&output_file);
+ 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%c",
- input->in_file_name,
- buffer_delimiter);
- flush_output(output_file.fp);
+ output_missing_newline (&output_file);
+ 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);
+ panic ("INTERNAL ERROR: Bad cmd %c", cur_cmd->cmd);
}
}
-#ifdef EXPERIMENTAL_DASH_N_OPTIMIZATION
- /* If our top-level program consists solely of commands with
- ADDR_IS_NUM addresses then once we past the last mentioned
- line we should be able to quit if no_default_output is true,
- or otherwise quickly copy input to output. Now whether this
- optimization is a win or not depends on how cheaply we can
- implement this for the cases where it doesn't help, as
- 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".
-
- 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;
- }
- }
- }
-#endif /*EXPERIMENTAL_DASH_N_OPTIMIZATION*/
-
/* this is buried down here so that a "continue" statement can skip it */
++cur_cmd;
}
+ if (debug)
+ debug_print_end_of_cycle ();
if (!no_default_output)
- output_line(line.active, line.length, line.chomped, &output_file);
+ output_line (line.active, line.length, line.chomped, &output_file);
return -1;
}
-
/* Apply the compiled script to all the named files. */
int
-process_files(struct vector *the_program, char **argv)
+process_files (struct vector *the_program, char **argv)
{
static char dash[] = "-";
static char *stdin_argv[2] = { dash, NULL };
struct input input;
int status;
- line_init(&line, NULL, INITIAL_BUFFER_SIZE);
- line_init(&hold, NULL, 0);
- line_init(&buffer, NULL, 0);
+ line_init (&line, NULL, INITIAL_BUFFER_SIZE);
+ line_init (&hold, NULL, 0);
+ line_init (&buffer, NULL, 0);
-#ifdef EXPERIMENTAL_DASH_N_OPTIMIZATION
- branches = count_branches(the_program);
-#endif /*EXPERIMENTAL_DASH_N_OPTIMIZATION*/
input.reset_at_next_file = true;
if (argv && *argv)
input.file_list = argv;
else if (in_place_extension)
- panic(_("no input files"));
+ panic (_("no input files"));
else
input.file_list = stdin_argv;
@@ -1672,28 +1669,34 @@ process_files(struct vector *the_program, char **argv)
input.fp = NULL;
status = EXIT_SUCCESS;
- while (read_pattern_space(&input, the_program, false))
+ while (read_pattern_space (&input, the_program, false))
{
- status = execute_program(the_program, &input);
+ if (debug)
+ {
+ debug_print_input (&input);
+ debug_print_line (&line);
+ }
+
+ status = execute_program (the_program, &input);
if (status == -1)
status = EXIT_SUCCESS;
else
break;
}
- closedown(&input);
+ closedown (&input);
-#ifdef DEBUG_LEAKS
+#ifdef lint
/* We're about to exit, so these free()s are redundant.
But if we're running under a memory-leak detecting
implementation of malloc(), we want to explicitly
deallocate in order to avoid extraneous noise from
the allocator. */
- release_append_queue();
- free(buffer.text);
- free(hold.text);
- free(line.text);
- free(s_accum.text);
-#endif /*DEBUG_LEAKS*/
+ release_append_queue ();
+ free (buffer.text);
+ free (hold.text);
+ free (line.text);
+ free (s_accum.text);
+#endif /* lint */
if (input.bad_count)
status = EXIT_BAD_INPUT;
diff --git a/sed/local.mk b/sed/local.mk
index 19d136e..5ccaaf4 100644
--- a/sed/local.mk
+++ b/sed/local.mk
@@ -19,6 +19,7 @@ localedir = $(datadir)/locale
sed_sed_SOURCES = \
sed/compile.c \
+ sed/debug.c \
sed/execute.c \
sed/mbcs.c \
sed/regexp.c \
diff --git a/sed/mbcs.c b/sed/mbcs.c
index f8e64df..c94b219 100644
--- a/sed/mbcs.c
+++ b/sed/mbcs.c
@@ -12,8 +12,7 @@
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
+ along with this program; If not, see <https://www.gnu.org/licenses/>. */
#include "sed.h"
#include <stdlib.h>
diff --git a/sed/regexp.c b/sed/regexp.c
index f7c2851..4ac06d6 100644
--- a/sed/regexp.c
+++ b/sed/regexp.c
@@ -12,8 +12,7 @@
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
+ along with this program; If not, see <https://www.gnu.org/licenses/>. */
#include "sed.h"
@@ -23,6 +22,8 @@
#include <stdio.h>
#include <stdlib.h>
+#include "xalloc.h"
+
#ifdef gettext_noop
# define N_(String) gettext_noop(String)
#else
@@ -38,7 +39,6 @@ static const char errors[] =
#define NO_REGEX (errors)
#define BAD_MODIF (NO_REGEX + sizeof(N_("no previous regular expression")))
-
void
dfaerror (char const *mesg)
@@ -53,25 +53,10 @@ dfawarn (char const *mesg)
dfaerror (mesg);
}
-
static void
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);
-
- if (errcode)
- {
- char errorbuf[200];
- regerror(errcode, NULL, errorbuf, 200);
- bad_prog(gettext(errorbuf));
- }
-#else
const char *error;
int syntax = ((extended_regexp_flags & REG_EXTENDED)
? RE_SYNTAX_POSIX_EXTENDED
@@ -119,9 +104,9 @@ compile_regex_1 (struct regex *new_regex, int needed_sub)
#ifndef RE_ICASE
if (new_regex->flags & REG_ICASE)
{
- static char translate[1 << (sizeof(char) * 8)];
+ static char translate[1 << (sizeof (char) * 8)];
int i;
- for (i = 0; i < sizeof(translate) / sizeof(char); i++)
+ for (i = 0; i < sizeof (translate) / sizeof (char); i++)
translate[i] = tolower (i);
new_regex->pattern.translate = translate;
@@ -129,8 +114,7 @@ compile_regex_1 (struct regex *new_regex, int needed_sub)
#endif
if (error)
- bad_prog(error);
-#endif
+ bad_prog (error);
/* Just to be sure, I mark this as not POSIXLY_CORRECT behavior */
if (needed_sub
@@ -138,9 +122,9 @@ compile_regex_1 (struct regex *new_regex, int needed_sub)
&& posixicity == POSIXLY_EXTENDED)
{
char buf[200];
- sprintf(buf, _("invalid reference \\%d on `s' command's RHS"),
+ sprintf (buf, _("invalid reference \\%d on `s' command's RHS"),
needed_sub - 1);
- bad_prog(buf);
+ bad_prog (buf);
}
int dfaopts = buffer_delimiter == '\n' ? 0 : DFA_EOL_NUL;
@@ -162,85 +146,38 @@ compile_regex_1 (struct regex *new_regex, int needed_sub)
}
struct regex *
-compile_regex(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;
/* // matches the last RE */
- if (size_buffer(b) == 0)
+ if (size_buffer (b) == 0)
{
if (flags > 0)
- bad_prog(_(BAD_MODIF));
+ bad_prog (_(BAD_MODIF));
return NULL;
}
- re_len = size_buffer(b);
- new_regex = ck_malloc(sizeof (struct regex) + re_len - 1);
+ re_len = size_buffer (b);
+ new_regex = xzalloc (sizeof (struct regex) + re_len - 1);
new_regex->flags = flags;
- memcpy (new_regex->re, get_buffer(b), re_len);
+ memcpy (new_regex->re, get_buffer (b), re_len);
-#ifdef REG_PERL
- new_regex->sz = re_len;
-#else
/* GNU regex does not process \t & co. */
- new_regex->sz = normalize_text(new_regex->re, re_len, TEXT_REGEX);
-#endif
+ new_regex->sz = normalize_text (new_regex->re, re_len, TEXT_REGEX);
compile_regex_1 (new_regex, needed_sub);
return new_regex;
}
-#ifdef REG_PERL
-static void
-copy_regs (regs, pmatch, nregs)
- struct re_registers *regs;
- regmatch_t *pmatch;
- int nregs;
-{
- int i;
- int need_regs = nregs + 1;
- /* We need one extra element beyond `num_regs' for the `-1' marker GNU code
- uses. */
-
- /* Have the register data arrays been allocated? */
- if (!regs->start)
- { /* No. So allocate them with malloc. */
- regs->start = MALLOC (need_regs, regoff_t);
- regs->end = MALLOC (need_regs, regoff_t);
- regs->num_regs = need_regs;
- }
- else if (need_regs > regs->num_regs)
- { /* Yes. We also need more elements than were already
- allocated, so reallocate them. */
- regs->start = REALLOC (regs->start, need_regs, regoff_t);
- regs->end = REALLOC (regs->end, need_regs, regoff_t);
- regs->num_regs = need_regs;
- }
-
- /* Copy the regs. */
- for (i = 0; i < nregs; ++i)
- {
- regs->start[i] = pmatch[i].rm_so;
- regs->end[i] = pmatch[i].rm_eo;
- }
- for ( ; i < regs->num_regs; ++i)
- regs->start[i] = regs->end[i] = -1;
-}
-#endif
-
int
-match_regex(struct regex *regex, char *buf, size_t buflen,
+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 = alloca (sizeof (regmatch_t) * regsize);
-#endif
/* printf ("Matching from %d/%d\n", buf_start_offset, buflen); */
@@ -249,7 +186,7 @@ match_regex(struct regex *regex, char *buf, size_t buflen,
{
regex = regex_last;
if (!regex_last)
- bad_prog(_(NO_REGEX));
+ bad_prog (_(NO_REGEX));
}
else
regex_last = regex;
@@ -258,18 +195,20 @@ match_regex(struct regex *regex, char *buf, size_t buflen,
if (buflen >= INT_MAX)
panic (_("regex input buffer length larger than INT_MAX"));
-#ifdef REG_PERL
- regmatch[0].rm_so = (int)buf_start_offset;
- regmatch[0].rm_eo = (int)buflen;
- ret = regexec (&regex->pattern, buf, regsize, regmatch, REG_STARTEND);
-
- if (regsize)
- copy_regs (regarray, regmatch, regsize);
-
- return (ret == 0);
-#else
if (regex->pattern.no_sub && regsize)
- compile_regex_1 (regex, regsize);
+ {
+ /* Re-compiling an existing regex, free the previously allocated
+ structures. */
+ if (regex->dfa)
+ {
+ dfafree (regex->dfa);
+ free (regex->dfa);
+ regex->dfa = NULL;
+ }
+ regfree (&regex->pattern);
+
+ compile_regex_1 (regex, regsize);
+ }
regex->pattern.regs_allocated = REGS_REALLOCATE;
@@ -283,7 +222,8 @@ match_regex(struct regex *regex, char *buf, size_t buflen,
const char *p = NULL;
if (regex->flags & REG_NEWLINE)
- p = memchr (buf + buf_start_offset, buffer_delimiter, buflen);
+ p = memchr (buf + buf_start_offset, buffer_delimiter,
+ buflen - buf_start_offset);
offset = p ? p - buf : buflen;
}
@@ -322,8 +262,8 @@ match_regex(struct regex *regex, char *buf, size_t buflen,
if (!regarray->start)
{
- regarray->start = MALLOC (1, regoff_t);
- regarray->end = MALLOC (1, regoff_t);
+ regarray->start = XCALLOC (1, regoff_t);
+ regarray->end = XCALLOC (1, regoff_t);
regarray->num_regs = 1;
}
@@ -420,15 +360,20 @@ match_regex(struct regex *regex, char *buf, size_t buflen,
regsize ? regarray : NULL);
return (ret > -1);
-#endif
}
-#ifdef DEBUG_LEAKS
+#ifdef lint
void
-release_regex(struct regex *regex)
+release_regex (struct regex *regex)
{
- regfree(&regex->pattern);
- free(regex);
+ if (regex->dfa)
+ {
+ dfafree (regex->dfa);
+ free (regex->dfa);
+ regex->dfa = NULL;
+ }
+ regfree (&regex->pattern);
+ free (regex);
}
-#endif /*DEBUG_LEAKS*/
+#endif /* lint */
diff --git a/sed/sed.c b/sed/sed.c
index 65bcab5..e588c56 100644
--- a/sed/sed.c
+++ b/sed/sed.c
@@ -12,8 +12,7 @@
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
+ along with this program; If not, see <https://www.gnu.org/licenses/>. */
#include "sed.h"
@@ -25,9 +24,11 @@
#include <stdlib.h>
#include <sys/types.h>
#include <unistd.h>
+#include "binary-io.h"
#include "getopt.h"
#include "progname.h"
#include "version.h"
+#include "xalloc.h"
#include "version-etc.h"
@@ -35,7 +36,9 @@
_("Jay Fenlason"), \
_("Tom Lord"), \
_("Ken Pizzini"), \
- _("Paolo Bonzini")
+ _("Paolo Bonzini"), \
+ _("Jim Meyering"), \
+ _("Assaf Gordon")
int extended_regexp_flags = 0;
@@ -57,6 +60,9 @@ bool follow_symlinks = false;
/* If set, opearate in 'sandbox' mode */
bool sandbox = false;
+/* if set, print debugging information */
+bool debug = false;
+
/* How do we edit files in-place? (we don't if NULL) */
char *in_place_extension = NULL;
@@ -64,6 +70,11 @@ char *in_place_extension = NULL;
char const *read_mode = "r";
char const *write_mode = "w";
+#if O_BINARY
+/* Additional flag for binary mode on platforms with O_BINARY/O_TEXT. */
+bool binary_mode = false;
+#endif
+
/* Do we need to be pedantically POSIX compliant? */
enum posixicity_types posixicity;
@@ -86,6 +97,7 @@ struct localeinfo localeinfo;
static void
cleanup (void)
{
+ IF_LINT (free (in_place_extension));
if (G_file_to_unlink)
unlink (G_file_to_unlink);
}
@@ -106,77 +118,67 @@ cancel_cleanup (void)
static void usage (int);
static void
-contact(int errmsg)
+contact (int errmsg)
{
FILE *out = errmsg ? stderr : stdout;
-#ifndef REG_PERL
- fprintf(out, _("GNU sed home page: <https://www.gnu.org/software/sed/>.\n\
+ fprintf (out, _("GNU sed home page: <https://www.gnu.org/software/sed/>.\n\
General help using GNU software: <https://www.gnu.org/gethelp/>.\n"));
-#endif
/* Only print the bug report address for `sed --help', otherwise we'll
get reports for other people's bugs. */
if (!errmsg)
- fprintf(out, _("E-mail bug reports to: <%s>.\n"), PACKAGE_BUGREPORT);
+ fprintf (out, _("E-mail bug reports to: <%s>.\n"), PACKAGE_BUGREPORT);
}
_Noreturn static void
-usage(int status)
+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")
-#endif
-
- fprintf(out, _("\
+ fprintf (out, _("\
Usage: %s [OPTION]... {script-only-if-no-other-script} [input-file]...\n\
-\n"), myname);
+\n"), program_name);
- fprintf(out, _(" -n, --quiet, --silent\n\
+ fprintf (out, _(" -n, --quiet, --silent\n\
suppress automatic printing of pattern space\n"));
- fprintf(out, _(" -e script, --expression=script\n\
+ fprintf (out, _(" --debug\n\
+ annotate program execution\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\
+ fprintf (out, _(" -f script-file, --file=script-file\n\
add the contents of script-file to the commands" \
" to be executed\n"));
#ifdef ENABLE_FOLLOW_SYMLINKS
- fprintf(out, _(" --follow-symlinks\n\
+ fprintf (out, _(" --follow-symlinks\n\
follow symlinks when processing in place\n"));
#endif
- fprintf(out, _(" -i[SUFFIX], --in-place[=SUFFIX]\n\
+ 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__
- fprintf(out, _(" -b, --binary\n\
+#if O_BINARY
+ fprintf (out, _(" -b, --binary\n\
open files in binary mode (CR+LFs are not" \
" processed specially)\n"));
#endif
- fprintf(out, _(" -l N, --line-length=N\n\
+ fprintf (out, _(" -l N, --line-length=N\n\
specify the desired line-wrap length for the `l' command\n"));
- fprintf(out, _(" --posix\n\
+ fprintf (out, _(" --posix\n\
disable all GNU extensions.\n"));
- fprintf(out, _(" -E, -r, --regexp-extended\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\
+ fprintf (out, _(" -s, --separate\n\
consider files as separate rather than as a single,\n\
continuous long stream.\n"));
- fprintf(out, _(" --sandbox\n\
+ fprintf (out, _(" --sandbox\n\
operate in sandbox mode (disable e/r/w commands).\n"));
- fprintf(out, _(" -u, --unbuffered\n\
+ fprintf (out, _(" -u, --unbuffered\n\
load minimal amounts of data from the input files and flush\n\
the output buffers more often\n"));
- fprintf(out, _(" -z, --null-data\n\
+ fprintf (out, _(" -z, --null-data\n\
separate lines by NUL characters\n"));
- fprintf(out, _(" --help display this help and exit\n"));
- fprintf(out, _(" --version output version information and exit\n"));
- fprintf(out, _("\n\
+ fprintf (out, _(" --help display this help and exit\n"));
+ fprintf (out, _(" --version output version information and exit\n"));
+ fprintf (out, _("\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\
@@ -191,20 +193,16 @@ specified, then the standard input is read.\n\
int
main (int argc, char **argv)
{
-#ifdef REG_PERL
-#define SHORTOPTS "bsnrzRuEe:f:l:i::V:"
-#else
#define SHORTOPTS "bsnrzuEe:f:l:i::V:"
-#endif
- enum { SANDBOX_OPTION = CHAR_MAX+1 };
+ enum { SANDBOX_OPTION = CHAR_MAX+1,
+ DEBUG_OPTION
+ };
static const struct option longopts[] = {
{"binary", 0, NULL, 'b'},
{"regexp-extended", 0, NULL, 'r'},
-#ifdef REG_PERL
- {"regexp-perl", 0, NULL, 'R'},
-#endif
+ {"debug", 0, NULL, DEBUG_OPTION},
{"expression", 1, NULL, 'e'},
{"file", 1, NULL, 'f'},
{"in-place", 2, NULL, 'i'},
@@ -227,15 +225,14 @@ main (int argc, char **argv)
int opt;
int return_code;
- const char *cols = getenv("COLS");
+ const char *cols = getenv ("COLS");
- program_name = argv[0];
+ set_program_name (argv[0]);
initialize_main (&argc, &argv);
#if HAVE_SETLOCALE
/* Set locale according to user's wishes. */
setlocale (LC_ALL, "");
#endif
- set_program_name (argv[0]);
initialize_mbcs ();
init_localeinfo (&localeinfo);
@@ -250,7 +247,7 @@ main (int argc, char **argv)
textdomain (PACKAGE);
#endif
- if (getenv("POSIXLY_CORRECT") != NULL)
+ if (getenv ("POSIXLY_CORRECT") != NULL)
posixicity = POSIXLY_CORRECT;
else
posixicity = POSIXLY_EXTENDED;
@@ -261,13 +258,12 @@ main (int argc, char **argv)
*/
if (cols)
{
- countT t = atoi(cols);
+ countT t = atoi (cols);
if (t > 1)
lcmd_out_line_len = t-1;
}
- myname = *argv;
- while ((opt = getopt_long(argc, argv, SHORTOPTS, longopts, NULL)) != EOF)
+ while ((opt = getopt_long (argc, argv, SHORTOPTS, longopts, NULL)) != EOF)
{
switch (opt)
{
@@ -275,10 +271,10 @@ main (int argc, char **argv)
no_default_output = true;
break;
case 'e':
- the_program = compile_string(the_program, optarg, strlen(optarg));
+ the_program = compile_string (the_program, optarg, strlen (optarg));
break;
case 'f':
- the_program = compile_file(the_program, optarg);
+ the_program = compile_file (the_program, optarg);
break;
case 'z':
@@ -291,16 +287,17 @@ main (int argc, char **argv)
case 'i':
separate_files = true;
+ IF_LINT (free (in_place_extension));
if (optarg == NULL)
/* use no backups */
- in_place_extension = ck_strdup ("*");
+ in_place_extension = xstrdup ("*");
- else if (strchr(optarg, '*') != NULL)
- in_place_extension = ck_strdup(optarg);
+ else if (strchr (optarg, '*') != NULL)
+ in_place_extension = xstrdup (optarg);
else
{
- in_place_extension = MALLOC (strlen(optarg) + 2, char);
+ in_place_extension = XCALLOC (strlen (optarg) + 2, char);
in_place_extension[0] = '*';
strcpy (in_place_extension + 1, optarg);
}
@@ -308,7 +305,7 @@ main (int argc, char **argv)
break;
case 'l':
- lcmd_out_line_len = atoi(optarg);
+ lcmd_out_line_len = atoi (optarg);
break;
case 'p':
@@ -318,25 +315,16 @@ main (int argc, char **argv)
case 'b':
read_mode = "rb";
write_mode = "wb";
+#if O_BINARY
+ binary_mode = true;
+#endif
break;
case 'E':
case 'r':
-#ifdef REG_PERL
- 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;
@@ -345,20 +333,24 @@ main (int argc, char **argv)
sandbox = true;
break;
+ case DEBUG_OPTION:
+ debug = true;
+ break;
+
case 'u':
unbuffered = true;
break;
case 'v':
- version_etc(stdout, program_name, PACKAGE_NAME, Version,
+ version_etc (stdout, program_name, PACKAGE_NAME, Version,
AUTHORS, (char *) NULL);
- contact(false);
+ contact (false);
ck_fclose (NULL);
exit (EXIT_SUCCESS);
case 'h':
- usage(EXIT_SUCCESS);
+ usage (EXIT_SUCCESS);
default:
- usage(EXIT_BAD_USAGE);
+ usage (EXIT_BAD_USAGE);
}
}
@@ -367,17 +359,30 @@ main (int argc, char **argv)
if (optind < argc)
{
char *arg = argv[optind++];
- the_program = compile_string(the_program, arg, strlen(arg));
+ the_program = compile_string (the_program, arg, strlen (arg));
}
else
- usage(EXIT_BAD_USAGE);
+ usage (EXIT_BAD_USAGE);
}
- check_final_program(the_program);
+ check_final_program (the_program);
- return_code = process_files(the_program, argv+optind);
+#if O_BINARY
+ if (binary_mode)
+ {
+ if (set_binary_mode ( fileno (stdin), O_BINARY) == -1)
+ panic (_("failed to set binary mode on STDIN"));
+ if (set_binary_mode ( fileno (stdout), O_BINARY) == -1)
+ panic (_("failed to set binary mode on STDOUT"));
+ }
+#endif
- finish_program();
- ck_fclose(NULL);
+ if (debug)
+ debug_print_program (the_program);
+
+ return_code = process_files (the_program, argv+optind);
+
+ finish_program (the_program);
+ ck_fclose (NULL);
return return_code;
}
diff --git a/sed/sed.h b/sed/sed.h
index 290f0ce..cb28736 100644
--- a/sed/sed.h
+++ b/sed/sed.h
@@ -12,8 +12,7 @@
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
+ along with this program; If not, see <https://www.gnu.org/licenses/>. */
#include <config.h>
#include "basicdefs.h"
@@ -126,18 +125,11 @@ struct subst {
unsigned print : 2; /* 'p' option given (before/after eval) */
unsigned eval : 1; /* 'e' option given */
unsigned max_id : 4; /* maximum backreference on the RHS */
+#ifdef lint
+ char* replacement_buffer;
+#endif
};
-#ifdef REG_PERL
-/* This is the structure we store register match data in. See
- regex.texinfo for a full description of what registers match. */
-struct re_registers
-{
- unsigned num_regs;
- regoff_t *start;
- regoff_t *end;
-};
-#endif
@@ -174,33 +166,43 @@ struct sed_cmd {
/* This is used for the w command. */
struct output *outf;
- /* This is used for the R command. */
- FILE *fp;
+ /* This is used for the R command.
+ (despite the struct name, it is used for both in and out files). */
+ struct output *inf;
/* This is used for the y command. */
unsigned char *translate;
char **translatemb;
+
+ /* This is used for the ':' command (debug only). */
+ char* label_name;
} x;
};
-
_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 (void);
+void finish_program (struct vector *);
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);
-#ifdef DEBUG_LEAKS
+#ifdef lint
void release_regex (struct regex *);
#endif
+void
+debug_print_command (const struct vector *program, const struct sed_cmd *sc);
+void
+debug_print_program (const struct vector *program);
+void
+debug_print_char (char c);
+
int process_files (struct vector *, char **argv);
int main (int, char **);
@@ -248,6 +250,9 @@ extern bool is_utf8;
/* If set, operate in 'sandbox' mode - disable e/r/w commands */
extern bool sandbox;
+/* If set, print debugging information. */
+extern bool debug;
+
#define MBRTOWC(pwc, s, n, ps) \
(mb_cur_max == 1 ? \
(*(pwc) = btowc (*(unsigned char *) (s)), 1) : \
diff --git a/sed/utils.c b/sed/utils.c
index e9835d1..6f847cd 100644
--- a/sed/utils.c
+++ b/sed/utils.c
@@ -12,8 +12,7 @@
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
+ along with this program; If not, see <https://www.gnu.org/licenses/>. */
#include <config.h>
@@ -27,11 +26,16 @@
#include <unistd.h>
#include <limits.h>
+#include "binary-io.h"
#include "unlocked-io.h"
#include "utils.h"
+#include "progname.h"
#include "fwriting.h"
+#include "xalloc.h"
-const char *myname;
+#if O_BINARY
+extern bool binary_mode;
+#endif
/* Store information about files opened with ck_fopen
so that error messages from ck_fread, ck_fwrite, etc. can print the
@@ -51,15 +55,15 @@ static void do_ck_fclose (FILE *fp);
/* Print an error message and exit */
void
-panic(const char *str, ...)
+panic (const char *str, ...)
{
va_list ap;
- fprintf(stderr, "%s: ", myname);
- va_start(ap, str);
- vfprintf(stderr, str, ap);
- va_end(ap);
- putc('\n', stderr);
+ fprintf (stderr, "%s: ", program_name);
+ va_start (ap, str);
+ vfprintf (stderr, str, ap);
+ va_end (ap);
+ putc ('\n', stderr);
/* Unlink the temporary files. */
while (open_files)
@@ -74,16 +78,22 @@ panic(const char *str, ...)
strerror (errno));
}
+#ifdef lint
+ struct open_file *next = open_files->link;
+ free (open_files->name);
+ free (open_files);
+ open_files = next;
+#else
open_files = open_files->link;
+#endif
}
- exit(EXIT_PANIC);
+ exit (EXIT_PANIC);
}
-
/* Internal routine to get a filename from open_files */
static const char * _GL_ATTRIBUTE_PURE
-utils_fp_name(FILE *fp)
+utils_fp_name (FILE *fp)
{
struct open_file *p;
@@ -108,24 +118,24 @@ register_open_file (FILE *fp, const char *name)
{
if (fp == p->fp)
{
- free(p->name);
+ free (p->name);
break;
}
}
if (!p)
{
- p = MALLOC(1, struct open_file);
+ p = XCALLOC (1, struct open_file);
p->link = open_files;
open_files = p;
}
- p->name = ck_strdup(name);
+ p->name = xstrdup (name);
p->fp = fp;
p->temp = false;
}
/* Panic on failing fopen */
FILE *
-ck_fopen(const char *name, const char *mode, int fail)
+ck_fopen (const char *name, const char *mode, int fail)
{
FILE *fp;
@@ -133,7 +143,7 @@ ck_fopen(const char *name, const char *mode, int fail)
if (!fp)
{
if (fail)
- panic(_("couldn't open file %s: %s"), name, strerror(errno));
+ panic (_("couldn't open file %s: %s"), name, strerror (errno));
return NULL;
}
@@ -144,7 +154,7 @@ ck_fopen(const char *name, const char *mode, int fail)
/* Panic on failing fdopen */
FILE *
-ck_fdopen( int fd, const char *name, const char *mode, int fail)
+ck_fdopen ( int fd, const char *name, const char *mode, int fail)
{
FILE *fp;
@@ -152,7 +162,7 @@ ck_fdopen( int fd, const char *name, const char *mode, int fail)
if (!fp)
{
if (fail)
- panic(_("couldn't attach to %s: %s"), name, strerror(errno));
+ panic (_("couldn't attach to %s: %s"), name, strerror (errno));
return NULL;
}
@@ -175,7 +185,12 @@ ck_mkstemp (char **p_filename, const char *tmpdir,
int fd = mkostemp (template, 0);
umask (save_umask);
if (fd == -1)
- panic(_("couldn't open temporary file %s: %s"), template, strerror(errno));
+ panic (_("couldn't open temporary file %s: %s"), template,
+ strerror (errno));
+#if O_BINARY
+ if (binary_mode && (set_binary_mode ( fd, O_BINARY) == -1))
+ panic (_("failed to set binary mode on '%s'"), template);
+#endif
*p_filename = template;
FILE *fp = fdopen (fd, mode);
@@ -185,29 +200,29 @@ ck_mkstemp (char **p_filename, const char *tmpdir,
/* Panic on failing fwrite */
void
-ck_fwrite(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 %llu item to %s: %s",
+ clearerr (stream);
+ if (size && fwrite (ptr, size, nmemb, stream) != nmemb)
+ 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));
+ (unsigned long long) nmemb, utils_fp_name (stream),
+ strerror (errno));
}
/* Panic on failing fread */
size_t
-ck_fread(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))
- panic(_("read error on %s: %s"), utils_fp_name(stream), strerror(errno));
+ clearerr (stream);
+ if (size && (nmemb=fread (ptr, size, nmemb, stream)) <= 0 && ferror (stream))
+ panic (_("read error on %s: %s"), utils_fp_name (stream), strerror (errno));
return nmemb;
}
size_t
-ck_getdelim(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;
@@ -220,26 +235,26 @@ ck_getdelim(char **text, size_t *buflen, char buffer_delimiter, FILE *stream)
}
if (error)
- panic (_("read error on %s: %s"), utils_fp_name(stream), strerror(errno));
+ panic (_("read error on %s: %s"), utils_fp_name (stream), strerror (errno));
return result;
}
/* Panic on failing fflush */
void
-ck_fflush(FILE *stream)
+ck_fflush (FILE *stream)
{
- if (!fwriting(stream))
+ if (!fwriting (stream))
return;
- clearerr(stream);
- if (fflush(stream) == EOF && errno != EBADF)
- panic("couldn't flush %s: %s", utils_fp_name(stream), strerror(errno));
+ clearerr (stream);
+ if (fflush (stream) == EOF && errno != EBADF)
+ panic ("couldn't flush %s: %s", utils_fp_name (stream), strerror (errno));
}
/* Panic on failing fclose */
void
-ck_fclose(FILE *stream)
+ck_fclose (FILE *stream)
{
struct open_file r;
struct open_file *prev;
@@ -254,8 +269,8 @@ ck_fclose(FILE *stream)
{
do_ck_fclose (cur->fp);
prev->link = cur->link;
- free(cur->name);
- free(cur);
+ free (cur->name);
+ free (cur);
}
else
prev = cur;
@@ -267,29 +282,25 @@ ck_fclose(FILE *stream)
last output operations might fail and it is important
to signal this as an error (perhaps to make). */
if (!stream)
- {
- do_ck_fclose (stdout);
- do_ck_fclose (stderr);
- }
+ do_ck_fclose (stdout);
}
/* Close a single file. */
void
-do_ck_fclose(FILE *fp)
+do_ck_fclose (FILE *fp)
{
- ck_fflush(fp);
- clearerr(fp);
+ ck_fflush (fp);
+ clearerr (fp);
- if (fclose(fp) == EOF)
- panic("couldn't close %s: %s", utils_fp_name(fp), strerror(errno));
+ if (fclose (fp) == EOF)
+ panic ("couldn't close %s: %s", utils_fp_name (fp), strerror (errno));
}
-
/* Follow symlink and panic if something fails. Return the ultimate
symlink target, stored in a temporary buffer that the caller should
not free. */
const char *
-follow_symlink(const char *fname)
+follow_symlink (const char *fname)
{
#ifdef ENABLE_FOLLOW_SYMLINKS
static char *buf1, *buf2;
@@ -301,8 +312,8 @@ follow_symlink(const char *fname)
if (buf_size == 0)
{
- buf1 = ck_malloc (PATH_MAX + 1);
- buf2 = ck_malloc (PATH_MAX + 1);
+ buf1 = xzalloc (PATH_MAX + 1);
+ buf2 = xzalloc (PATH_MAX + 1);
buf_size = PATH_MAX + 1;
}
@@ -318,11 +329,11 @@ follow_symlink(const char *fname)
while ((rc = readlink (buf, buf2, buf_size)) == buf_size)
{
buf_size *= 2;
- buf1 = ck_realloc (buf1, buf_size);
- buf2 = ck_realloc (buf2, buf_size);
+ buf1 = xrealloc (buf1, buf_size);
+ buf2 = xrealloc (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';
@@ -334,8 +345,8 @@ follow_symlink(const char *fname)
if (len + rc + 1 > buf_size)
{
buf_size = len + rc + 1;
- buf1 = ck_realloc (buf1, buf_size);
- buf2 = ck_realloc (buf2, buf_size);
+ buf1 = xrealloc (buf1, buf_size);
+ buf2 = xrealloc (buf2, buf_size);
}
/* Always store the new path in buf1. */
@@ -356,7 +367,7 @@ follow_symlink(const char *fname)
}
if (rc < 0)
- panic (_("cannot stat %s: %s"), buf, strerror(errno));
+ panic (_("cannot stat %s: %s"), buf, strerror (errno));
return buf;
#else
@@ -391,53 +402,7 @@ ck_rename (const char *from, const char *to, const char *unlink_if_fail)
-
-/* Panic on failing malloc */
-void *
-ck_malloc(size_t size)
-{
- void *ret = calloc(1, size ? size : 1);
- if (!ret)
- panic("couldn't allocate memory");
- return ret;
-}
-
-/* Panic on failing realloc */
-void *
-ck_realloc(void *ptr, size_t size)
-{
- void *ret;
-
- if (size == 0)
- {
- free(ptr);
- return NULL;
- }
- if (!ptr)
- return ck_malloc(size);
- ret = realloc(ptr, size);
- if (!ret)
- panic("couldn't re-allocate memory");
- return ret;
-}
-
-/* Return a malloc()'d copy of a string */
-char *
-ck_strdup(const char *str)
-{
- char *ret = MALLOC(strlen(str)+1, char);
- return strcpy(ret, str);
-}
-
-/* Return a malloc()'d copy of a block of memory */
-void *
-ck_memdup(const void *buf, size_t len)
-{
- void *ret = ck_malloc(len);
- return memcpy(ret, buf, len);
-}
-
/* Implement a variable sized buffer of `stuff'. We don't know what it is,
nor do we care, as long as it doesn't mind being aligned by malloc. */
@@ -451,29 +416,29 @@ struct buffer
#define MIN_ALLOCATE 50
struct buffer *
-init_buffer(void)
+init_buffer (void)
{
- struct buffer *b = MALLOC(1, struct buffer);
- b->b = MALLOC(MIN_ALLOCATE, char);
+ struct buffer *b = XCALLOC (1, struct buffer);
+ b->b = XCALLOC (MIN_ALLOCATE, char);
b->allocated = MIN_ALLOCATE;
b->length = 0;
return b;
}
char *
-get_buffer(struct buffer const *b)
+get_buffer (struct buffer const *b)
{
return b->b;
}
size_t
-size_buffer(struct buffer const *b)
+size_buffer (struct buffer const *b)
{
return b->length;
}
static void
-resize_buffer(struct buffer *b, size_t newlen)
+resize_buffer (struct buffer *b, size_t newlen)
{
char *try = NULL;
size_t alen = b->allocated;
@@ -482,29 +447,29 @@ resize_buffer(struct buffer *b, size_t newlen)
return;
alen *= 2;
if (newlen < alen)
- try = realloc(b->b, alen); /* Note: *not* the REALLOC() macro! */
+ try = realloc (b->b, alen); /* Note: *not* the REALLOC() macro! */
if (!try)
{
alen = newlen;
- try = REALLOC(b->b, alen, char);
+ try = REALLOC (b->b, alen, char);
}
b->allocated = alen;
b->b = try;
}
char *
-add_buffer(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)
- resize_buffer(b, b->length+n);
- result = memcpy(b->b + b->length, p, n);
+ resize_buffer (b, b->length+n);
+ result = memcpy (b->b + b->length, p, n);
b->length += n;
return result;
}
char *
-add1_buffer(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
@@ -516,7 +481,7 @@ add1_buffer(struct buffer *b, int 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;
@@ -526,9 +491,9 @@ add1_buffer(struct buffer *b, int c)
}
void
-free_buffer(struct buffer *b)
+free_buffer (struct buffer *b)
{
if (b)
- free(b->b);
- free(b);
+ free (b->b);
+ free (b);
}
diff --git a/sed/utils.h b/sed/utils.h
index e3727de..810ac9f 100644
--- a/sed/utils.h
+++ b/sed/utils.h
@@ -12,8 +12,7 @@
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
+ along with this program; If not, see <https://www.gnu.org/licenses/>. */
#include <stdio.h>
@@ -43,10 +42,7 @@ FILE * ck_mkstemp (char **p_filename, const char *tmpdir, const char *base,
void ck_rename (const char *from, const char *to, const char *unlink_if_fail);
void *ck_malloc (size_t size);
-void *xmalloc (size_t size);
void *ck_realloc (void *ptr, size_t size);
-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 const *b) _GL_ATTRIBUTE_PURE;
@@ -54,5 +50,3 @@ 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);
-
-extern const char *myname;
diff --git a/testsuite/8bit.sh b/testsuite/8bit.sh
index 81d449a..35a594c 100755
--- a/testsuite/8bit.sh
+++ b/testsuite/8bit.sh
@@ -19,8 +19,6 @@
. "${srcdir=.}/testsuite/init.sh"; path_prepend_ ./sed
print_ver_ sed
-fail=0
-
# Original comment from '8bit.sed':
# The first poem from the Man'yoshu. I like Hitomaro's poems better
diff --git a/testsuite/8to7.sh b/testsuite/8to7.sh
index f4fbfd3..8b0e014 100755
--- a/testsuite/8to7.sh
+++ b/testsuite/8to7.sh
@@ -19,8 +19,6 @@
. "${srcdir=.}/testsuite/init.sh"; path_prepend_ ./sed
print_ver_ sed
-fail=0
-
# Generate the input file, containing non-ascii 8-bit octets.
# printf with octal escape sequences is the most portable way
# to produce these.
diff --git a/testsuite/badenc.sh b/testsuite/badenc.sh
index c96f4de..2dd80ab 100755
--- a/testsuite/badenc.sh
+++ b/testsuite/badenc.sh
@@ -21,9 +21,6 @@ print_ver_ sed
require_en_utf8_locale_
-fail=0
-
-
# The input (and also the expected output)
# containing an invalid multibyte sequences in utf-8 (octet \320 = 0xD0).
printf "abc\nde\320f\nghi\njkl\nmno\npqr\nstu\nvwx\nyz\n" > badenc-inp \
diff --git a/testsuite/binary.sh b/testsuite/binary.sh
index 1833cfc..8ee7ec9 100755
--- a/testsuite/binary.sh
+++ b/testsuite/binary.sh
@@ -20,8 +20,6 @@
. "${srcdir=.}/testsuite/init.sh"; path_prepend_ ./sed
print_ver_ sed
-fail=0
-
cat << \EOF > inp || framework_failure_
192.168.1.2 br b8<r b16<r b24< R|R|R| D
255.255.255.0 br b8<r b16<r b24< R|R|R| D~r
diff --git a/testsuite/bsd-wrapper.sh b/testsuite/bsd-wrapper.sh
index 64e807f..557deb7 100644
--- a/testsuite/bsd-wrapper.sh
+++ b/testsuite/bsd-wrapper.sh
@@ -19,8 +19,6 @@
. "${srcdir=.}/testsuite/init.sh"; path_prepend_ ./sed
print_ver_ sed
-fail=0
-
# location of the external SED scripts
dir="$abs_top_srcdir/testsuite"
diff --git a/testsuite/bug32082.sh b/testsuite/bug32082.sh
new file mode 100755
index 0000000..d5d4e92
--- /dev/null
+++ b/testsuite/bug32082.sh
@@ -0,0 +1,81 @@
+#!/bin/sh
+# sed would access uninitialized memory for certain invalid backreference uses.
+# Before sed 4.6 these would result in "Invalid read size of 4" reported
+# by valgrind from execute.c:992
+
+# Copyright (C) 2018 Free Software Foundation, Inc.
+
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <https://www.gnu.org/licenses/>.
+. "${srcdir=.}/testsuite/init.sh"; path_prepend_ ./sed
+print_ver_ sed
+
+require_valgrind_
+
+printf '1\n2\n' > in || framework_failure_
+printf '1\n2\n\n' > exp-posix || framework_failure_
+printf '1\n1\n2\n2\n' > exp-no-posix || framework_failure_
+
+#
+# Test 1: with "--posix"
+#
+# using "--posix" disables the backref safety check in
+# regexp.c:compile_regex_1(), which is reported as:
+# "invalid reference \\%d on `s' command's RHS"
+
+valgrind --quiet --error-exitcode=1 \
+ sed --posix -e '/2/p ; 2s//\9/' in > out-posix 2> err-posix || fail=1
+
+echo "valgrind report for 'posix' test:"
+echo "=================================="
+cat err-posix
+echo "=================================="
+
+
+# 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-posix > /dev/null \
+ && skip_ 'you seem to have a buggy version of valgrind'
+
+compare exp-posix out-posix || fail=1
+compare /dev/null err || fail=1
+
+
+
+#
+# Test 2: without "--posix"
+#
+# When not using "--posix", using a backref to a non-existing group
+# would be caught in compile_regex_1.
+# As reported in bugs.gnu.org/32082 by bugs@feusi.co,
+# using the recent begline/endline optimization with a few "previous regex"
+# tricks bypasses this check.
+
+valgrind --quiet --error-exitcode=1 \
+ sed -e '/^/s///p ; 2s//\9/' in > out-no-posix 2> err-no-posix || fail=1
+
+echo "valgrind report for 'no-posix' test:"
+echo "===================================="
+cat err-no-posix
+echo "===================================="
+
+# 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-no-posix > /dev/null \
+ && skip_ 'you seem to have a buggy version of valgrind'
+
+compare exp-no-posix out-no-posix || fail=1
+compare /dev/null err || fail=1
+
+
+Exit $fail
diff --git a/testsuite/bug32271-1.sh b/testsuite/bug32271-1.sh
new file mode 100755
index 0000000..df2e308
--- /dev/null
+++ b/testsuite/bug32271-1.sh
@@ -0,0 +1,45 @@
+#!/bin/sh
+# sed would incorrectly copy internal buffers under certain s/// uses.
+# Before sed 4.6 these would result in an extraneous NUL at end of lines.
+#
+
+# Copyright (C) 2018 Free Software Foundation, Inc.
+
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <https://www.gnu.org/licenses/>.
+. "${srcdir=.}/testsuite/init.sh"; path_prepend_ ./sed
+print_ver_ sed
+
+printf '0\n' > in || framework_failure_
+printf '0\n' > exp || framework_failure_
+
+# Before sed 4.6, this would result in: 0x30 0x00 0x0a.
+sed -e 's/$/a/2' in > out 2> err || fail=1
+
+compare exp out || fail=1
+compare /dev/null err || fail=1
+
+# To ease debugging / error reporting (the above 'compare'
+# will report "binary files differ" - not very helpful here)
+if test -n "$fail" ; then
+ echo "---- TEST FAILED"
+ echo "out:"
+ od -tx1 out
+ echo "exp:"
+ od -tx1 exp
+ echo "err:"
+ od -tx1 err
+fi
+
+
+Exit $fail
diff --git a/testsuite/bug32271-2.sh b/testsuite/bug32271-2.sh
new file mode 100755
index 0000000..d6e50ce
--- /dev/null
+++ b/testsuite/bug32271-2.sh
@@ -0,0 +1,75 @@
+#!/bin/sh
+# sed would access uninitialized memory for certain regexes.
+# Before sed 4.6 these would result in "Conditional jump or move depends on
+# uninitialised value(s)" and "Invalid read of size 1"
+# by valgrind from regexp.c:286
+
+# Copyright (C) 2018 Free Software Foundation, Inc.
+
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <https://www.gnu.org/licenses/>.
+. "${srcdir=.}/testsuite/init.sh"; path_prepend_ ./sed
+print_ver_ sed
+
+require_valgrind_
+
+# 40 characters ensures valgrind detects the bug
+# (with less than 25 - it does not).
+z=0000000000000000000000000000000000000000
+
+printf '%s\n' $z $z > in || framework_failure_
+printf '%s\n' $z $z > exp || framework_failure_
+
+# Before sed-4.6, this would fail with:
+# [...]
+# ==13131== Conditional jump or move depends on uninitialised value(s)
+# ==13131== at 0x4C3002B: memchr (vg_replace_strmem.c:883)
+# ==13131== by 0x1120BD: match_regex (regexp.c:286)
+# ==13131== by 0x110736: do_subst (execute.c:1101)
+# ==13131== by 0x1115D3: execute_program (execute.c:1591)
+# ==13131== by 0x111A4C: process_files (execute.c:1774)
+# ==13131== by 0x112E1C: main (sed.c:405)
+# ==13131==
+# ==13131== Invalid read of size 1
+# ==13131== at 0x4C30027: memchr (vg_replace_strmem.c:883)
+# ==13131== by 0x1120BD: match_regex (regexp.c:286)
+# ==13131== by 0x110736: do_subst (execute.c:1101)
+# ==13131== by 0x1115D3: execute_program (execute.c:1591)
+# ==13131== by 0x111A4C: process_files (execute.c:1774)
+# ==13131== by 0x112E1C: main (sed.c:405)
+# ==13131== Address 0x55ec765 is 0 bytes after a block of size 101 alloc'd
+# ==13131== at 0x4C2DDCF: realloc (vg_replace_malloc.c:785)
+# ==13131== by 0x113BA2: ck_realloc (utils.c:418)
+# ==13131== by 0x10E682: resize_line (execute.c:154)
+# ==13131== by 0x10E6F0: str_append (execute.c:165)
+# ==13131== by 0x110779: do_subst (execute.c:1106)
+# ==13131== by 0x1115D3: execute_program (execute.c:1591)
+# ==13131== by 0x111A4C: process_files (execute.c:1774)
+# ==13131== by 0x112E1C: main (sed.c:405)
+valgrind --quiet --error-exitcode=1 \
+ sed -e 'N; s/$//m2' 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-no-posix > /dev/null \
+ && skip_ 'you seem to have a buggy version of valgrind'
+
+compare exp out || fail=1
+compare /dev/null err || fail=1
+
+echo "valgrind report:"
+echo "=================================="
+cat err
+echo "=================================="
+
+exit $fail
diff --git a/testsuite/cmd-R.sh b/testsuite/cmd-R.sh
index 1e34a08..4f4eb99 100644
--- a/testsuite/cmd-R.sh
+++ b/testsuite/cmd-R.sh
@@ -18,8 +18,6 @@
. "${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_
diff --git a/testsuite/cmd-l.sh b/testsuite/cmd-l.sh
index fcf3c6c..f5207e9 100755
--- a/testsuite/cmd-l.sh
+++ b/testsuite/cmd-l.sh
@@ -18,8 +18,6 @@
. "${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
diff --git a/testsuite/colon-with-no-label.sh b/testsuite/colon-with-no-label.sh
index 426bb4c..915a192 100755
--- a/testsuite/colon-with-no-label.sh
+++ b/testsuite/colon-with-no-label.sh
@@ -21,8 +21,6 @@ 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
diff --git a/testsuite/comment-n.sh b/testsuite/comment-n.sh
index 03e7b95..ad94c63 100644
--- a/testsuite/comment-n.sh
+++ b/testsuite/comment-n.sh
@@ -18,8 +18,6 @@
. "${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)
diff --git a/testsuite/compile-errors.sh b/testsuite/compile-errors.sh
index d3c5bf9..7773adb 100644
--- a/testsuite/compile-errors.sh
+++ b/testsuite/compile-errors.sh
@@ -18,8 +18,6 @@
. "${srcdir=.}/testsuite/init.sh"; path_prepend_ ./sed
print_ver_ sed
-fail=0
-
#
# Excess P modifier to s// (EXCESS_P_OPT)
#
diff --git a/testsuite/compile-tests.sh b/testsuite/compile-tests.sh
index e86a27c..75d5b6d 100644
--- a/testsuite/compile-tests.sh
+++ b/testsuite/compile-tests.sh
@@ -18,9 +18,6 @@
. "${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} )
diff --git a/testsuite/convert-number.sh b/testsuite/convert-number.sh
index b2297e4..a485f47 100755
--- a/testsuite/convert-number.sh
+++ b/testsuite/convert-number.sh
@@ -19,9 +19,6 @@
. "${srcdir=.}/testsuite/init.sh"; path_prepend_ ./sed
print_ver_ sed
-fail=0
-
-
#
# Test \dNNN conversions
#
diff --git a/testsuite/dc.sh b/testsuite/dc.sh
index 421896b..96c000c 100755
--- a/testsuite/dc.sh
+++ b/testsuite/dc.sh
@@ -19,9 +19,6 @@
. "${srcdir=.}/testsuite/init.sh"; path_prepend_ ./sed
print_ver_ sed
-fail=0
-
-
# Compute Easter of 2002...
# usage: (echo YEAR; cat easter.dc) | dc.sed
cat << \EOF > easter.dc || framework_failure_
diff --git a/testsuite/debug.pl b/testsuite/debug.pl
new file mode 100644
index 0000000..661c5ed
--- /dev/null
+++ b/testsuite/debug.pl
@@ -0,0 +1,200 @@
+#!/usr/bin/perl
+# Test the --debug feature
+
+# Copyright (C) 2018 Free Software Foundation, Inc.
+
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <https://www.gnu.org/licenses/>.
+
+use strict;
+use File::stat;
+
+(my $program_name = $0) =~ s|.*/||;
+
+# Turn off localization of executable's output.
+@ENV{qw(LANGUAGE LANG LC_ALL)} = ('C') x 3;
+
+my $prog = 'sed';
+
+print "PATH = $ENV{PATH}\n";
+
+=pod
+This list contains a template for the tests.
+Two 'foreach' loops below add the '{IN/OUT}' hash entries
+of typical coreutils tests, adds single-quotes around the sed program,
+and adds the --debug command line option.
+
+NOTE: test names with "_" character will be checked with NULL input,
+but not with non-empty input (eg. to avoid executing external programs).
+=cut
+my @Tests =
+ (
+ ## Test parsing of SED commands, without any execution
+ ['c0', '=' ],
+ ['c1', ':FOO' ],
+ ['c2', '{=}' ],
+ ['c3', '#FOO' ],
+ ['c4', 'aFOO' ],
+ ['c5', 'b' ],
+ ['c6', 'bx;:x' ],
+ ['c7', 'cFOO' ],
+ ['c8', 'D' ],
+ ['c9', 'd' ],
+ ['c10_', 'e' ],
+ ['c11_', 'ew' ],
+ ['c12', 'F' ],
+ ['c13', 'G' ],
+ ['c14', 'g' ],
+ ['c15', 'H' ],
+ ['c16', 'h' ],
+ ['c17', 'iFOO' ],
+ ['c18', 'l' ],
+ ['c19', 'l3' ],
+ ['c20', 'N' ],
+ ['c21', 'n' ],
+ ['c22', 'P' ],
+ ['c23', 'p' ],
+ ['c24', 'Q' ],
+ ['c25_', 'Q3' ],
+ ['c26', 'q' ],
+ ['c27_', 'q3' ],
+ ['c28', 'Rx' ],
+ ['c29', 'rx' ],
+ ['c30', 's/x//' ],
+ ['c31', 'T' ],
+ ['c32', 'Tx;:x' ],
+ ['c33', 't' ],
+ ['c34', 'tx;:x' ],
+ ['c35', 'v' ],
+ ['c36', 'Wx' ],
+ ['c37', 'wx' ],
+ ['c38', 'x' ],
+ ['c39', 'y/x/y/' ],
+ ['c40', 'z' ],
+ ['c41', '' ],
+
+ ## Test parsing of SED addresses, without any execution
+ ['a0', '1=' ],
+ ['a1', '1!=' ],
+ ['a2', '1,2=' ],
+ ['a3', '1,2!=' ],
+ ['a4', '$=' ],
+ ['a5', '$!=' ],
+ ['a6', '1~3=' ],
+ ['a7', '1~3=' ],
+ ['a8', '50~0=' ],
+ ['a9', '/foo/=' ],
+ ['a10', '/foo/!=' ],
+ ['a11', '\@foo@=' ],
+ ['a12', '0,/foo/=' ],
+ ['a13', '1,/foo/=' ],
+ ['a14', '/foo/,1=' ],
+ ['a15', '1,+10=' ],
+ ['a16', '1,~10=' ],
+ ['a17', '/foo/,+10='],
+ ['a18', '/foo/,~10='],
+
+ ## Test strings with special characters
+ ['s1', '/\\a/=' ],
+ ['s2', '/\\b/=' ],
+ ['s3', '/\\f/=' ],
+ ['s4', '/\\r/=' ],
+ ['s5', '/\\t/=' ],
+ ['s6', '/\\v/=' ],
+ ['s7', '/\\n/=' ],
+ ['s8', '/\\\\/=' ],
+ ['s9', '/\x01/=' ],
+ ['s10','/\//=' ],
+
+ ## Address Regex variations
+ ['r0', '/a/= ; //=' ],
+ ['r1', '/a/I=' ],
+ ['r2', '/a/M=' ],
+ ['r3', '/a/IM=' ],
+
+ ## substitute variations
+ ['t0', 's/a/b/' ],
+ ['t1', 's/a/b/g' ],
+ ['t2', 's/a/b/i' ],
+ ['t3', 's/a/b/I' ],
+ ['t4', 's/a/b/m' ],
+ ['t5', 's/a/b/M' ],
+ ['t6', 's/a/b/wX' ],
+ ['t7', 's/a/b/p' ],
+ ['t8', 's/a/b/e' ],
+ ['t9', 's/a/b/3' ],
+ ['t10','s/a/b/iMg5p'],
+
+ ['t20','s/\\(a\\)/\\1/' ],
+ ['t21','s/a/\\Ua/' ],
+ ['t22','s/a/\\ua/' ],
+ ['t23','s/a/\\La/' ],
+ ['t24','s/a/\\la/' ],
+ ['t25','s/a/\\U\\Ea/' ],
+ ['t26','s/a/&/' ],
+
+ ## Some special cases
+ ['l1', 'a\\' ],
+ ['l2', 'c\\' ],
+ ['l3', 'i\\' ],
+ ['l4', 's/[0-9]/&/' ], # report matched regex register
+ ['l5', 'n;N;D' ], # n/N/D with patterns containing \n.
+ ['l6', 'n;n;n;n;n' ], # n causing end-of-cycle
+ ['l7', 's/^/a/' ], # zero-length regex match
+ ['l8', 's/\\($\\)/a/' ], # zero-length regex match
+ );
+
+
+foreach my $t (@Tests)
+{
+ my $name = shift @$t;
+ my $cmd = shift @$t;
+
+ # Add "--debug" and single-quotes around the sed program.
+ $cmd = "--debug '" . $cmd . "'";
+ unshift @$t, $cmd;
+ unshift @$t, $name;
+
+ # Add the typical coreutils hash entries.
+ # With empty input, the sed program will be printed (due to --debug),
+ # but not executed.
+ push @$t, {IN=>''};
+ push @$t, {OUT=>''};
+ push @$t, {OUT_SUBST=>'s/.*//s'};
+}
+
+# Repeat the tests with some input, to test --debug during execution.
+# Discard the output, the exact debug output is not set in stone.
+my @xtests;
+Test:
+foreach my $t (@Tests)
+{
+ # Remove the '{IN}' hash
+ my @newt = grep { ! ( ref $_ eq 'HASH' && exists $_->{IN} ) } @$t;
+ next if $newt[0] =~ /_/;
+
+ # Rename the test (add "x_" prefix, for execution)
+ $newt[0] = 'x_' . $newt[0];
+
+ # Add non-empty input.
+ push @newt, {IN=>"1\n2\n3\n4\n"};
+ push @xtests, \@newt;
+}
+
+push @Tests, @xtests;
+
+my $save_temps = $ENV{SAVE_TEMPS};
+my $verbose = $ENV{VERBOSE};
+
+my $fail = run_tests ($program_name, $prog, \@Tests, $save_temps, $verbose);
+exit $fail;
diff --git a/testsuite/distrib.sh b/testsuite/distrib.sh
index f02d431..700c983 100644
--- a/testsuite/distrib.sh
+++ b/testsuite/distrib.sh
@@ -19,9 +19,6 @@
. "${srcdir=.}/testsuite/init.sh"; path_prepend_ ./sed
print_ver_ sed
-fail=0
-
-
# This is straight out of C News
#
#
diff --git a/testsuite/eval.sh b/testsuite/eval.sh
index 215620c..33395dc 100755
--- a/testsuite/eval.sh
+++ b/testsuite/eval.sh
@@ -19,9 +19,6 @@
. "${srcdir=.}/testsuite/init.sh"; path_prepend_ ./sed
print_ver_ sed
-fail=0
-
-
cat << \EOF > eval-in || framework_failure_
17380: 2 2 5 11 79
abcd
diff --git a/testsuite/execute-tests.sh b/testsuite/execute-tests.sh
index 539cecd..191a518 100644
--- a/testsuite/execute-tests.sh
+++ b/testsuite/execute-tests.sh
@@ -18,9 +18,6 @@
. "${srcdir=.}/testsuite/init.sh"; path_prepend_ ./sed
print_ver_ sed
-fail=0
-
-
#
# 'D' when pattern-space has no newline (act like 'd')
#
diff --git a/testsuite/follow-symlinks-stdin.sh b/testsuite/follow-symlinks-stdin.sh
index 12ba236..788729c 100755
--- a/testsuite/follow-symlinks-stdin.sh
+++ b/testsuite/follow-symlinks-stdin.sh
@@ -20,7 +20,6 @@ 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
diff --git a/testsuite/follow-symlinks.sh b/testsuite/follow-symlinks.sh
index 3ccc48c..6abc822 100644
--- a/testsuite/follow-symlinks.sh
+++ b/testsuite/follow-symlinks.sh
@@ -18,8 +18,6 @@
. "${srcdir=.}/testsuite/init.sh"; path_prepend_ ./sed
print_ver_ sed
-fail=0
-
#
# 'F' with/out follow-symlinks
#
diff --git a/testsuite/get-mb-cur-max.c b/testsuite/get-mb-cur-max.c
index e2abe94..6c34a88 100644
--- a/testsuite/get-mb-cur-max.c
+++ b/testsuite/get-mb-cur-max.c
@@ -12,9 +12,7 @@
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
- 02110-1301, USA. */
+ along with this program; If not, see <https://www.gnu.org/licenses/>. */
#include <config.h>
#include <locale.h>
diff --git a/testsuite/help.sh b/testsuite/help.sh
index 68cf2a7..bddaf08 100644
--- a/testsuite/help.sh
+++ b/testsuite/help.sh
@@ -19,9 +19,6 @@
. "${srcdir=.}/testsuite/init.sh"; path_prepend_ ./sed
print_ver_ sed
-fail=0
-
-
# Help screen should include the contact email address
sed --help | grep E-mail > /dev/null 2>&1 || fail=1
diff --git a/testsuite/in-place-hyphen.sh b/testsuite/in-place-hyphen.sh
index 09ef966..8a97ba3 100755
--- a/testsuite/in-place-hyphen.sh
+++ b/testsuite/in-place-hyphen.sh
@@ -21,7 +21,6 @@ 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
diff --git a/testsuite/inplace-hold.sh b/testsuite/inplace-hold.sh
index 8ca9cac..1bc293c 100644
--- a/testsuite/inplace-hold.sh
+++ b/testsuite/inplace-hold.sh
@@ -19,8 +19,6 @@
. "${srcdir=.}/testsuite/init.sh"; path_prepend_ ./sed
print_ver_ sed
-fail=0
-
echo > inplace-hold-exp || framework_failure_
echo x > inplace-hold-out1 || framework_failure_
diff --git a/testsuite/inplace-selinux.sh b/testsuite/inplace-selinux.sh
index 47383a9..783c3de 100755
--- a/testsuite/inplace-selinux.sh
+++ b/testsuite/inplace-selinux.sh
@@ -18,8 +18,6 @@
print_ver_ sed
require_selinux_
-fail=0
-
touch a || framework_failure_
chcon -u system_u a || skip_ "chcon doesn't work"
chcon -u user_u a || skip_ "chcon doesn't work"
diff --git a/testsuite/local.mk b/testsuite/local.mk
index b4a4f5a..43623bf 100644
--- a/testsuite/local.mk
+++ b/testsuite/local.mk
@@ -43,6 +43,9 @@ LOG_COMPILER = false
T = \
testsuite/misc.pl \
+ testsuite/bug32082.sh \
+ testsuite/bug32271-1.sh \
+ testsuite/bug32271-2.sh \
testsuite/cmd-l.sh \
testsuite/cmd-R.sh \
testsuite/colon-with-no-label.sh \
@@ -51,6 +54,7 @@ T = \
testsuite/compile-tests.sh \
testsuite/convert-number.sh \
testsuite/command-endings.sh \
+ testsuite/debug.pl \
testsuite/execute-tests.sh \
testsuite/help-version.sh \
testsuite/in-place-hyphen.sh \
@@ -61,9 +65,11 @@ T = \
testsuite/mb-charclass-non-utf8.sh \
testsuite/mb-match-slash.sh \
testsuite/mb-y-translate.sh \
+ testsuite/missing-filename.sh \
testsuite/newline-dfa-bug.sh \
testsuite/normalize-text.sh \
testsuite/nulldata.sh \
+ testsuite/obinary.sh \
testsuite/panic-tests.sh \
testsuite/posix-char-class.sh \
testsuite/posix-mode-addr.sh \
@@ -106,6 +112,7 @@ T += testsuite/8bit.sh \
testsuite/stdin.sh \
testsuite/utf8-ru.sh \
testsuite/uniq.sh \
+ testsuite/word-delim.sh \
testsuite/xemacs.sh
TESTS = $(SEDTESTS) $(T)
diff --git a/testsuite/mac-mf.sh b/testsuite/mac-mf.sh
index c7094a2..d91b223 100755
--- a/testsuite/mac-mf.sh
+++ b/testsuite/mac-mf.sh
@@ -19,8 +19,6 @@
. "${srcdir=.}/testsuite/init.sh"; path_prepend_ ./sed
print_ver_ sed
-fail=0
-
# location of external test files
dir="$abs_top_srcdir/testsuite"
diff --git a/testsuite/madding.sh b/testsuite/madding.sh
index 4018510..b2ea96f 100755
--- a/testsuite/madding.sh
+++ b/testsuite/madding.sh
@@ -19,8 +19,6 @@
. "${srcdir=.}/testsuite/init.sh"; path_prepend_ ./sed
print_ver_ sed
-fail=0
-
# location of external test files
dir="$abs_top_srcdir/testsuite"
diff --git a/testsuite/mb-bad-delim.sh b/testsuite/mb-bad-delim.sh
index 26a9f98..9ef16b5 100755
--- a/testsuite/mb-bad-delim.sh
+++ b/testsuite/mb-bad-delim.sh
@@ -18,7 +18,6 @@
. "${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:
diff --git a/testsuite/mb-charclass-non-utf8.sh b/testsuite/mb-charclass-non-utf8.sh
index c9f305a..7bf8951 100755
--- a/testsuite/mb-charclass-non-utf8.sh
+++ b/testsuite/mb-charclass-non-utf8.sh
@@ -27,8 +27,6 @@ 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)
diff --git a/testsuite/mb-match-slash.sh b/testsuite/mb-match-slash.sh
index d719298..c824a2e 100755
--- a/testsuite/mb-match-slash.sh
+++ b/testsuite/mb-match-slash.sh
@@ -20,8 +20,6 @@ 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.
diff --git a/testsuite/mb-y-translate.sh b/testsuite/mb-y-translate.sh
index c3ea08f..02238ec 100755
--- a/testsuite/mb-y-translate.sh
+++ b/testsuite/mb-y-translate.sh
@@ -18,7 +18,6 @@
. "${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:
diff --git a/testsuite/missing-filename.sh b/testsuite/missing-filename.sh
new file mode 100755
index 0000000..704bc67
--- /dev/null
+++ b/testsuite/missing-filename.sh
@@ -0,0 +1,36 @@
+#!/bin/sh
+# Test r/R/w/W commands without a file name.
+
+# Copyright (C) 2018 Free Software Foundation, Inc.
+
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <https://www.gnu.org/licenses/>.
+. "${srcdir=.}/testsuite/init.sh"; path_prepend_ ./sed
+print_ver_ sed
+
+# Same error message, different character position in the sed program.
+for i in 1 7 ; do
+ err="sed: -e expression #1, char $i: missing filename in r/R/w/W commands"
+ echo "$err" > exp-err$i || framework_failure_
+done
+
+# r/R/w/W commands
+for cmd in r R w W ; do
+ returns_ 1 sed $cmd </dev/null >/dev/null 2>err1 || fail=1
+ compare exp-err1 err1 || fail=1
+done
+
+returns_ 1 sed 's/1/2/w' </dev/null >/dev/null 2>err7 || fail=1
+compare exp-err7 err7 || fail=1
+
+Exit $fail
diff --git a/testsuite/newjis.sh b/testsuite/newjis.sh
index a1f4ace..51ed78e 100755
--- a/testsuite/newjis.sh
+++ b/testsuite/newjis.sh
@@ -19,8 +19,6 @@
. "${srcdir=.}/testsuite/init.sh"; path_prepend_ ./sed
print_ver_ sed
-fail=0
-
# Input file. \033 is ASCII escape (0x1B).
{
printf '\033$B$H$J$j$N$?$1$,$-$K\033(B\n' ;
diff --git a/testsuite/normalize-text.sh b/testsuite/normalize-text.sh
index baae97d..71b03bf 100644
--- a/testsuite/normalize-text.sh
+++ b/testsuite/normalize-text.sh
@@ -21,8 +21,6 @@
. "${srcdir=.}/testsuite/init.sh"; path_prepend_ ./sed
print_ver_ sed
-fail=0
-
#
# Common backslash combinations
#
diff --git a/testsuite/obinary.sh b/testsuite/obinary.sh
new file mode 100755
index 0000000..78bffb5
--- /dev/null
+++ b/testsuite/obinary.sh
@@ -0,0 +1,111 @@
+#!/bin/sh
+# Test CR/LF behaviour on platforms which support O_BINARY file mode
+# (i.e. differentiates between text and binary files).
+
+# Copyright (C) 2018 Free Software Foundation, Inc.
+
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <https://www.gnu.org/licenses/>.
+. "${srcdir=.}/testsuite/init.sh"; path_prepend_ ./sed
+print_ver_ sed
+
+# Test if O_TEXT is enabled by default (i.e. lines terminated with "\r\n").
+# If not, skip the test.
+printf a | sed cb > out1 \
+ || framework_failure_ "failed to run sed 'cb'"
+size=$(LC_ALL=C wc -c < out1 | tr -d '[:space:]') \
+ || framework_failure_ "failed to check size of 'out1'"
+case $size in
+ 2) skip_ "platform does not enable O_TEXT by default" ;;
+ 3) ;;
+ *) framework_failure_ "unexpected size '$size'" ;;
+esac
+
+
+# files with "\r\n" and with just "\n"
+printf 'a\015\12' > inT || framework_failure_
+printf 'a\12' > inB || framework_failure_
+cp inT inplaceT1 || framework_failure_
+cp inT inplaceT2 || framework_failure_
+cp inT inplaceT3 || framework_failure_
+cp inB inplaceB1 || framework_failure_
+cp inB inplaceB2 || framework_failure_
+
+printf 'z\015\12' > expT || framework_failure_
+printf 'z\12' > expB || framework_failure_
+
+
+# First round of tests. These all seem equivalent,
+# but older seds had sublte implementation differences
+# between STDIN and explicit input files (bug#25459).
+# Similarly, also test --inplace type output.
+sed 's/a/z/' inT > out1 || fail=1
+sed 's/a/z/' < inT > out2 || fail=1
+cat inT | sed 's/a/z/' > out3 || fail=1
+sed -i 's/a/z/' inplaceT1 || fail=1
+
+compare_ expT out1 || fail=1
+compare_ expT out2 || fail=1
+compare_ expT out3 || fail=1
+compare_ expT inplaceT1 || fail=1
+
+# Input file with only "\n". Output should contain "\r\n".
+sed 's/a/z/' inB > out4 || fail=1
+sed 's/a/z/' < inB > out5 || fail=1
+cat inB | sed 's/a/z/' > out6 || fail=1
+sed -i 's/a/z/' inplaceB1 || fail=1
+
+compare_ expT out4 || fail=1
+compare_ expT out5 || fail=1
+compare_ expT out6 || fail=1
+compare_ expT inplaceB1 || fail=1
+
+# Input file with only "\n", with "sed -b" should output only "\n".
+sed -b 's/a/z/' inB > out7 || fail=1
+sed -b 's/a/z/' < inB > out8 || fail=1
+cat inB | sed -b 's/a/z/' > out9 || fail=1
+sed -b -i 's/a/z/' inplaceB2 || fail=1
+
+compare_ expB out7 || fail=1
+compare_ expB out8 || fail=1
+compare_ expB out9 || fail=1
+compare_ expB inplaceB2 || fail=1
+
+# End-of-line tests on input file with "\r\n".
+# In TEXT mode, "\r\n" is end-of-line, the "y" character will be added prior to
+# it. In BINARY mode, "\r" is just another character - the "y" character will
+# be added after the "\r".
+printf 'ay\015\012' > expTeol || framework_failure_
+printf 'a\015y\012' > expBeol || framework_failure_
+
+sed 's/$/y/' inT > out10 || fail=1
+sed 's/$/y/' < inT > out11 || fail=1
+cat inT | sed 's/$/y/' > out12 || fail=1
+sed -i 's/$/y/' inplaceT2 || fail=1
+
+sed -b 's/$/y/' inT > out13 || fail=1
+sed -b 's/$/y/' < inT > out14 || fail=1
+cat inT | sed -b 's/$/y/' > out15 || fail=1
+sed -i -b 's/$/y/' inplaceT3 || fail=1
+
+compare_ expTeol out10 || fail=1
+compare_ expTeol out11 || fail=1
+compare_ expTeol out12 || fail=1
+compare_ expTeol inplaceT2 || fail=1
+
+compare_ expBeol out13 || fail=1
+compare_ expBeol out14 || fail=1
+compare_ expBeol out15 || fail=1
+compare_ expBeol inplaceT3 || fail=1
+
+Exit $fail
diff --git a/testsuite/posix-char-class.sh b/testsuite/posix-char-class.sh
index 1d2f6f3..ecbda07 100644
--- a/testsuite/posix-char-class.sh
+++ b/testsuite/posix-char-class.sh
@@ -34,8 +34,6 @@
. "${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
diff --git a/testsuite/posix-mode-ERE.sh b/testsuite/posix-mode-ERE.sh
index 8c2afb2..223593c 100644
--- a/testsuite/posix-mode-ERE.sh
+++ b/testsuite/posix-mode-ERE.sh
@@ -18,8 +18,6 @@
. "${srcdir=.}/testsuite/init.sh"; path_prepend_ ./sed
print_ver_ sed
-fail=0
-
printf "hi+\n" > in1 || framework_failure_
printf "{hi+}\n" > exp-special || framework_failure_
diff --git a/testsuite/posix-mode-N.sh b/testsuite/posix-mode-N.sh
index c2fe840..344ec19 100755
--- a/testsuite/posix-mode-N.sh
+++ b/testsuite/posix-mode-N.sh
@@ -18,8 +18,6 @@
. "${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_
diff --git a/testsuite/posix-mode-addr.sh b/testsuite/posix-mode-addr.sh
index d335b17..1ba5fc7 100644
--- a/testsuite/posix-mode-addr.sh
+++ b/testsuite/posix-mode-addr.sh
@@ -18,8 +18,6 @@
. "${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
diff --git a/testsuite/posix-mode-bad-ref.sh b/testsuite/posix-mode-bad-ref.sh
index 412e2c3..f933f79 100755
--- a/testsuite/posix-mode-bad-ref.sh
+++ b/testsuite/posix-mode-bad-ref.sh
@@ -18,8 +18,6 @@
. "${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
diff --git a/testsuite/posix-mode-s.sh b/testsuite/posix-mode-s.sh
index cf0a708..33ad92b 100644
--- a/testsuite/posix-mode-s.sh
+++ b/testsuite/posix-mode-s.sh
@@ -18,8 +18,6 @@
. "${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
diff --git a/testsuite/range-overlap.sh b/testsuite/range-overlap.sh
index 9a21285..ddcd08f 100755
--- a/testsuite/range-overlap.sh
+++ b/testsuite/range-overlap.sh
@@ -28,7 +28,6 @@ printf '%s\n' 1 5 6 > exp || framework_failure_
# 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
diff --git a/testsuite/recursive-escape-c.sh b/testsuite/recursive-escape-c.sh
index cc29741..41bbced 100644
--- a/testsuite/recursive-escape-c.sh
+++ b/testsuite/recursive-escape-c.sh
@@ -18,7 +18,6 @@
. "${srcdir=.}/testsuite/init.sh"; path_prepend_ ./sed
print_ver_ sed
-fail=0
unset POSIXLY_CORRECT
export LC_ALL=C
diff --git a/testsuite/regex-max-int.sh b/testsuite/regex-max-int.sh
index 218a48d..fcea466 100755
--- a/testsuite/regex-max-int.sh
+++ b/testsuite/regex-max-int.sh
@@ -19,9 +19,6 @@
very_expensive_
print_ver_ sed
-fail=0
-
-
# Create a file larger than 2GB and containing a single line
# (resulting in a regex match against the entire file)
#
diff --git a/testsuite/sandbox.sh b/testsuite/sandbox.sh
index 8a296ee..cd5e7c9 100755
--- a/testsuite/sandbox.sh
+++ b/testsuite/sandbox.sh
@@ -27,8 +27,6 @@ for i in 1 6 14 ; do
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
diff --git a/testsuite/stdin-prog.sh b/testsuite/stdin-prog.sh
index 927b643..6a7167c 100644
--- a/testsuite/stdin-prog.sh
+++ b/testsuite/stdin-prog.sh
@@ -18,8 +18,6 @@
. "${srcdir=.}/testsuite/init.sh"; path_prepend_ ./sed
print_ver_ sed
-fail=0
-
echo X > in1 || framework_failure_
printf "1\nX\n" > exp1 || framework_failure_
diff --git a/testsuite/stdin.sh b/testsuite/stdin.sh
index c34e074..71c17d2 100755
--- a/testsuite/stdin.sh
+++ b/testsuite/stdin.sh
@@ -19,8 +19,6 @@
. "${srcdir=.}/testsuite/init.sh"; path_prepend_ ./sed
print_ver_ sed
-fail=0
-
cat << \EOF > stdin-in || framework_failure_
foo foo fo oo f oo foo foo foo foo foo foo foo foo foo foo foo foo foo
diff --git a/testsuite/subst-mb-incomplete.sh b/testsuite/subst-mb-incomplete.sh
index c6a65d2..5045e2d 100755
--- a/testsuite/subst-mb-incomplete.sh
+++ b/testsuite/subst-mb-incomplete.sh
@@ -25,7 +25,6 @@ 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
diff --git a/testsuite/subst-options.sh b/testsuite/subst-options.sh
index c380d43..bc206aa 100644
--- a/testsuite/subst-options.sh
+++ b/testsuite/subst-options.sh
@@ -18,8 +18,6 @@
. "${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
diff --git a/testsuite/subst-replacement.sh b/testsuite/subst-replacement.sh
index b423b3c..7f4854b 100644
--- a/testsuite/subst-replacement.sh
+++ b/testsuite/subst-replacement.sh
@@ -18,8 +18,6 @@
. "${srcdir=.}/testsuite/init.sh"; path_prepend_ ./sed
print_ver_ sed
-fail=0
-
#
# Backslash followed by unrecognized letter,
# use letter as-is.
diff --git a/testsuite/test-mbrtowc.c b/testsuite/test-mbrtowc.c
index 91c5d35..912b14b 100644
--- a/testsuite/test-mbrtowc.c
+++ b/testsuite/test-mbrtowc.c
@@ -12,9 +12,7 @@
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
- 02110-1301, USA. */
+ along with this program; If not, see <https://www.gnu.org/licenses/>. */
/* Test the operating-system's native mbrtowc(3) function,
by feeding it multibyte seqeunces one byte at a time,
diff --git a/testsuite/title-case.sh b/testsuite/title-case.sh
index 2a318af..a365f08 100755
--- a/testsuite/title-case.sh
+++ b/testsuite/title-case.sh
@@ -20,8 +20,6 @@ print_ver_ sed
require_el_iso88597_locale_
-fail=0
-
a='\323' # SIGMA
b='\362' # stigma
c='\363' # sigma
diff --git a/testsuite/uniq.sh b/testsuite/uniq.sh
index ff9a811..f394cb3 100644
--- a/testsuite/uniq.sh
+++ b/testsuite/uniq.sh
@@ -19,8 +19,6 @@
. "${srcdir=.}/testsuite/init.sh"; path_prepend_ ./sed
print_ver_ sed
-fail=0
-
# location of the external SED scripts
dir="$abs_top_srcdir/testsuite"
diff --git a/testsuite/utf8-ru.sh b/testsuite/utf8-ru.sh
index eafd4b4..695c383 100644
--- a/testsuite/utf8-ru.sh
+++ b/testsuite/utf8-ru.sh
@@ -23,9 +23,6 @@ print_ver_ sed
require_ru_utf8_locale_
-fail=0
-
-
# The letter used in these tests are:
# UTF8:Octal UTF8:HEX CodePoint Name
# А \320\220 \xD0\x90 U+0410 \N{CYRILLIC CAPITAL LETTER A}
diff --git a/testsuite/word-delim.sh b/testsuite/word-delim.sh
new file mode 100755
index 0000000..ade3137
--- /dev/null
+++ b/testsuite/word-delim.sh
@@ -0,0 +1,19 @@
+#!/bin/sh
+# Exercise the DFA regression in sed-4.6.
+. "${srcdir=.}/testsuite/init.sh"; path_prepend_ ./sed
+print_ver_ sed
+
+require_en_utf8_locale_
+
+# Also ensure that this works in both the C locale and that multibyte one.
+# In the C locale, it failed due to a dfa.c regression in sed-4.6.
+echo 123-x > in || framework_failure_
+echo 123 > exp || framework_failure_
+
+for locale in C en_US.UTF-8; do
+ LC_ALL=$locale sed 's/.\bx//' in > out 2>err || fail=1
+ compare exp out || fail=1
+ compare /dev/null err || fail=1
+done
+
+Exit $fail
diff --git a/testsuite/xemacs.sh b/testsuite/xemacs.sh
index 48a85e5..e1877a2 100755
--- a/testsuite/xemacs.sh
+++ b/testsuite/xemacs.sh
@@ -19,8 +19,6 @@
. "${srcdir=.}/testsuite/init.sh"; path_prepend_ ./sed
print_ver_ sed
-fail=0
-
# location of external test files
dir="$abs_top_srcdir/testsuite"